Changeset 31e15be in mainline for kernel/test
- Timestamp:
- 2021-08-04T15:18:08Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 98a935e
- Parents:
- de38873
- git-author:
- Dmitry Selyutin <ghostmansd@…> (2020-12-23 21:59:08)
- git-committer:
- jxsvoboda <5887334+jxsvoboda@…> (2021-08-04 15:18:08)
- Location:
- kernel/test
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/atomic/atomic1.c
rde38873 r31e15be 32 32 const char *test_atomic1(void) 33 33 { 34 atomic_ t a;34 atomic_int a; 35 35 36 36 atomic_store(&a, 10); -
kernel/test/mm/falloc2.c
rde38873 r31e15be 43 43 #define THREADS 8 44 44 45 static atomic_ t thread_cnt;46 static atomic_ t thread_fail;45 static atomic_size_t thread_cnt; 46 static atomic_size_t thread_fail; 47 47 48 48 static void falloc(void *arg) -
kernel/test/synch/semaphore1.c
rde38873 r31e15be 41 41 42 42 static waitq_t can_start; 43 static atomic_ t items_produced;44 static atomic_ t items_consumed;43 static atomic_size_t items_produced; 44 static atomic_size_t items_consumed; 45 45 46 46 static void producer(void *arg) -
kernel/test/thread/thread1.c
rde38873 r31e15be 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.