Changeset 10b5970 for tests/concurrency/pthread
- Timestamp:
- Jan 7, 2025, 3:22:19 PM (9 months ago)
- Branches:
- master
- Children:
- 190a833
- Parents:
- 70670e7
- Location:
- tests/concurrency/pthread
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/pthread/pthread_cond_test.cfa
r70670e7 r10b5970 9 9 pthread_cond_t cond; 10 10 11 extern "C" {12 void* S1( void* arg){11 extern "C" { 12 void* S1( void * ) { 13 13 pthread_mutex_lock(&_mutex); 14 14 for (int i = 0; i < 1000; i++) sout | "S1 done " | i; … … 19 19 } 20 20 21 void* S2( void* arg){21 void* S2( void * ) { 22 22 pthread_mutex_lock(&_mutex); 23 23 if (!done_flag) pthread_cond_wait(&cond, &_mutex); … … 30 30 31 31 32 int main(int argc, char const *argv[]) 33 { 34 /* code */ 32 int main() { 35 33 pthread_mutex_init(&_mutex, NULL); 36 34 pthread_cond_init(&cond, NULL); -
tests/concurrency/pthread/pthread_once_test.cfa
r70670e7 r10b5970 90 90 91 91 92 int main( int argc, char const *argv[])92 int main() 93 93 { 94 94 test();
Note:
See TracChangeset
for help on using the changeset viewer.