Changeset a5e7233 for tests/concurrent
- Timestamp:
- Mar 17, 2021, 1:56:12 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- c407434e
- Parents:
- e0c072c
- Location:
- tests/concurrent
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/clib.c
re0c072c ra5e7233 62 62 cfathread_cluster_add_worker( cl, NULL, NULL, NULL ); 63 63 cfathread_cluster_add_worker( cl, NULL, NULL, NULL ); 64 65 cfathread_attr_t attr; 66 cfathread_attr_init(&attr); 67 cfathread_attr_setcluster(&attr, cl); 68 64 69 cfathread_t u; 65 cfathread_create( &u, NULL, Unparker, NULL );70 cfathread_create( &u, &attr, Unparker, NULL ); 66 71 { 67 72 cfathread_t t[20]; 68 73 for(int i = 0; i < 20; i++) { 69 cfathread_create( &t[i], NULL, Worker, NULL );74 cfathread_create( &t[i], &attr, Worker, NULL ); 70 75 } 71 76 for(int i = 0; i < 20; i++) { … … 75 80 stop = true; 76 81 cfathread_join(u, NULL); 82 cfathread_attr_destroy(&attr); 77 83 fflush(stdout); 78 84 _exit(0);
Note: See TracChangeset
for help on using the changeset viewer.