/[pdpsoft]/trunk/grid-mw-security/ees/src/app/aos_threading_test.c
ViewVC logotype

Diff of /trunk/grid-mw-security/ees/src/app/aos_threading_test.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1234 by aramv, Thu Dec 3 16:34:10 2009 UTC revision 1235 by aramv, Fri Dec 4 11:35:24 2009 UTC
# Line 5  Line 5 
5  #include "eef.h"  #include "eef.h"
6  #include "aos.h"  #include "aos.h"
7    
8  #define NUM_THREADS 2  #define NUM_THREADS 4
9    
10  void *threaded_aos_setting(void* foo);  void *threaded_aos_setting(void* foo);
11  void *threaded_aos_getting(void* foo);  void *threaded_aos_getting(void* foo);
# Line 55  int main (int argc, char* argv[]){ Line 55  int main (int argc, char* argv[]){
55      eef_log(LOG_ERR, "Failed to parse config file (%s), exiting...", config_file);      eef_log(LOG_ERR, "Failed to parse config file (%s), exiting...", config_file);
56    } else {    } else {
57      /* start threading */      /* start threading */
58      for(t=0; t < NUM_THREADS; t++){      for(t=0; t < NUM_THREADS; t+=2){
59        printf("Creating thread %li!\n", t);        printf("Creating thread %li!\n", t);
60        rc = pthread_create(&threads[t], NULL, threaded_aos_setting, (void*)t);        rc = pthread_create(&threads[t], NULL, threaded_aos_setting, (void*)t);
61        rc = pthread_create(&threads[t], NULL, threaded_aos_getting, (void*)t);        rc = pthread_create(&threads[t+1], NULL, threaded_aos_getting, (void*)t);
62      }      }
63      pthread_exit(NULL);      pthread_exit(NULL);
64    }    }

Legend:
Removed from v.1234  
changed lines
  Added in v.1235

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28