Changeset 205832b in mainline for kernel/test/synch
- Timestamp:
- 2012-11-05T15:37:39Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f048658
- Parents:
- 6b99156
- Location:
- kernel/test/synch
- Files:
-
- 3 edited
-
rcu1.c (modified) (8 diffs)
-
workqueue2.c (modified) (2 diffs)
-
workqueue3.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/synch/rcu1.c
r6b99156 r205832b 43 43 44 44 static int one_idx = 0; 45 static thread_t *thread[MAX_THREADS] = { 0};45 static thread_t *thread[MAX_THREADS] = { NULL }; 46 46 47 47 typedef struct { … … 100 100 101 101 for (size_t i = 0; i < thread_cnt; ++i) { 102 run_thread(i, func, 0);102 run_thread(i, func, NULL); 103 103 } 104 104 } … … 123 123 124 124 thread_detach(thread[i]); 125 thread[i] = 0;125 thread[i] = NULL; 126 126 } 127 127 } … … 145 145 thread_join(thread[one_idx]); 146 146 thread_detach(thread[one_idx]); 147 thread[one_idx] = 0;147 thread[one_idx] = NULL; 148 148 } 149 149 } … … 337 337 338 338 TPRINTF("\nRun a single reader that posts one callback.\n"); 339 run_one(one_cb_reader, 0);339 run_one(one_cb_reader, NULL); 340 340 join_one(); 341 341 … … 1015 1015 { 0, do_expedite, "do_expedite" }, 1016 1016 { 1, do_stress, "do_stress" }, 1017 { 0, 0, 0}1017 { 0, NULL, NULL } 1018 1018 }; 1019 1019 … … 1023 1023 uint64_t delta_gps = 0; 1024 1024 1025 for (int i = 0; test_func[i].func != 0; ++i) {1025 for (int i = 0; test_func[i].func; ++i) { 1026 1026 if (!test_func[i].include) { 1027 1027 TPRINTF("\nSubtest %s() skipped.\n", test_func[i].desc); … … 1047 1047 1048 1048 if (success) 1049 return 0;1049 return NULL; 1050 1050 else 1051 1051 return "One of the tests failed."; -
kernel/test/synch/workqueue2.c
r6b99156 r205832b 116 116 test_custom_workq_impl(true, "test-workq-stop"); 117 117 /* Errors are expected. */ 118 return 0;118 return NULL; 119 119 } 120 120 … … 122 122 const char *test_workqueue_all(void) 123 123 { 124 const char *err = 0;124 const char *err = NULL; 125 125 const char *res; 126 126 -
kernel/test/synch/workqueue3.c
r6b99156 r205832b 56 56 static const char *do_test(bool exit_early) 57 57 { 58 const char *err = 0;58 const char *err = NULL; 59 59 TPRINTF("Stress testing system queue.\n"); 60 60 TPRINTF("First run:\n");
Note:
See TracChangeset
for help on using the changeset viewer.
