agent/qtcreator/src/agent.c
/*
 * Forks a POSIX background thread that will periodically 
 * query the state of all threads we know about. 
 */
Forks a POSIX background thread that will periodically
query the state of all threads we know about.
Forks a POSIX background thread that will periodically query the state of all threads we know about .
static void startSamplingThread(JNIEnv* jni_env) 
{
  int err;
  pthread_attr_t tattr;
#ifdef DEBUG    
  printf("Starting sampling thread (env: %p\n",jni_env);
#endif  
  pthread_attr_init(&tattr);
  pthread_attr_setstacksize(&tattr , 3 * 1024 * 1024);
  if ( ( err = pthread_create( &samplingThreadId, &tattr , &sampleThreadStates , (void*) jni_env) ) ) {
        fprintf( stderr,"ERROR: Failed to create pthread , err=%d\n", err);
        abort();
  }
}
static void startSamplingThread ( JNIEnv * jni_env ) { int err ; pthread_attr_t tattr ; #ifdef DEBUG printf ( " \n " , jni_env ) ; #endif pthread_attr_init ( & tattr ) ; pthread_attr_setstacksize ( & tattr , 3 * 1024 * 1024 ) ; if ( ( err = pthread_create ( & samplingThreadId , & tattr , & sampleThreadStates , ( void * ) jni_env ) ) ) { fprintf ( stderr , " \n " , err ) ; abort ( ) ; } }
Forks a POSIX background thread that will periodically
 query the state of all threads we know about.
Forks a POSIX background thread that will periodically query the state of all threads we know about .
/* initialized with default attributes */ /* call an appropriate functions to alter a default value */