Changeset 1b20da0 in mainline for uspace/app/rcutest/rcutest.c
- Timestamp:
- 2018-02-28T17:52:03Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3061bc1
- Parents:
- df6ded8
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/rcutest/rcutest.c
rdf6ded8 r1b20da0 186 186 /*--------------------------------------------------------------------*/ 187 187 188 static bool run_tests(test_info_t *info, bool (*include_filter)(test_desc_t *)) 188 static bool run_tests(test_info_t *info, bool (*include_filter)(test_desc_t *)) 189 189 { 190 190 size_t failed_cnt = 0; … … 214 214 if (failed_cnt) { 215 215 printf("%zu tests failed\n", failed_cnt); 216 } 216 } 217 217 218 218 return 0 == failed_cnt; … … 364 364 if (!info.exited_cs || info.failed) { 365 365 printf("Error: rcu_sync() returned before the reader exited its CS.\n"); 366 /* 367 * Sleep some more so we don't free info on stack while the reader 366 /* 367 * Sleep some more so we don't free info on stack while the reader 368 368 * is using it. 369 369 */ … … 440 440 } 441 441 442 /* 442 /* 443 443 * synching is set when rcu_sync() is about to be entered so wait 444 444 * some more to make sure it really does start executing. … … 459 459 memory_barrier(); 460 460 461 /* 462 * Preexisting reader should have exited by now, so rcu_synchronize() 461 /* 462 * Preexisting reader should have exited by now, so rcu_synchronize() 463 463 * must have returned. 464 464 */ … … 529 529 530 530 if (info.failed) { 531 /* 532 * Sleep some more so we don't free info on stack while readers 531 /* 532 * Sleep some more so we don't free info on stack while readers 533 533 * are using it. 534 534 */ … … 608 608 printf("Error: rcu_deregister_fibril did not unlock the CS.\n"); 609 609 return false; 610 } 610 } 611 611 612 612 return true; … … 672 672 } 673 673 674 /* 674 /* 675 675 * Check if the most recently started rcu_sync of the already 676 676 * finished rcu_syncs did not happen to start after this reader … … 713 713 static bool seq_test(test_info_t *test_info) 714 714 { 715 size_t reader_cnt = test_info->thread_cnt; 716 size_t updater_cnt = test_info->thread_cnt; 715 size_t reader_cnt = test_info->thread_cnt; 716 size_t updater_cnt = test_info->thread_cnt; 717 717 718 718 seq_test_info_t info = { … … 820 820 test_desc_t *t = &test_desc[i]; 821 821 822 if (!t->func) 822 if (!t->func) 823 823 continue; 824 824 … … 870 870 info->thread_cnt = 1; 871 871 printf("Err: Invalid number of threads '%s'; using 1.\n", argv[2]); 872 } 872 } 873 873 } else { 874 874 info->thread_cnt = 1;
Note:
See TracChangeset
for help on using the changeset viewer.