Changeset a35b458 in mainline for uspace/app/tester/thread
- Timestamp:
- 2018-03-02T20:10:49Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- Location:
- uspace/app/tester/thread
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/thread/setjmp1.c
r3061bc1 ra35b458 64 64 { 65 65 counter = 0; 66 66 67 67 const char *err_msg = test_it(); 68 68 69 69 return err_msg; 70 70 } -
uspace/app/tester/thread/thread1.c
r3061bc1 ra35b458 45 45 { 46 46 thread_detach(thread_get_id()); 47 47 48 48 while (atomic_get(&finish)) 49 49 thread_usleep(100000); 50 50 51 51 atomic_inc(&threads_finished); 52 52 } … … 56 56 unsigned int i; 57 57 atomic_count_t total = 0; 58 58 59 59 atomic_set(&finish, 1); 60 60 atomic_set(&threads_finished, 0); 61 61 62 62 TPRINTF("Creating threads"); 63 63 for (i = 0; i < THREADS; i++) { … … 69 69 total++; 70 70 } 71 71 72 72 TPRINTF("\nRunning threads for %u seconds...", DELAY); 73 73 thread_sleep(DELAY); 74 74 TPRINTF("\n"); 75 75 76 76 atomic_set(&finish, 0); 77 77 while (atomic_get(&threads_finished) < total) { … … 80 80 thread_sleep(1); 81 81 } 82 82 83 83 return NULL; 84 84 }
Note:
See TracChangeset
for help on using the changeset viewer.