Changeset 8a9a41e in mainline for kernel/test/thread/thread1.c
- Timestamp:
- 2021-10-24T08:28:43Z (4 years ago)
- Children:
- 9ea3a41
- Parents:
- 2ce943a (diff), cd981f2a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Erik Kučák <35500848+Riko196@…> (2021-10-24 08:28:43)
- git-committer:
- GitHub <noreply@…> (2021-10-24 08:28:43)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/thread/thread1.c
r2ce943a r8a9a41e 30 30 #include <test.h> 31 31 #include <atomic.h> 32 #include <stdbool.h> 32 33 #include <proc/thread.h> 33 34 … … 36 37 #define THREADS 5 37 38 38 static atomic_ tfinish;39 static atomic_ t threads_finished;39 static atomic_bool finish; 40 static atomic_size_t threads_finished; 40 41 41 42 static void threadtest(void *data) … … 55 56 size_t total = 0; 56 57 57 atomic_store(&finish, 1);58 atomic_store(&finish, true); 58 59 atomic_store(&threads_finished, 0); 59 60 … … 72 73 thread_sleep(10); 73 74 74 atomic_store(&finish, 0);75 atomic_store(&finish, false); 75 76 while (atomic_load(&threads_finished) < total) { 76 77 TPRINTF("Threads left: %zu\n", total - atomic_load(&threads_finished));
Note:
See TracChangeset
for help on using the changeset viewer.