Changeset 09ab0a9a in mainline for kernel/test/synch/rcu1.c
- Timestamp:
- 2018-09-13T12:05:53Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cc74cb5
- Parents:
- b2aaaa0
- git-author:
- Jiri Svoboda <jiri@…> (2018-09-13 07:09:46)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-09-13 12:05:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/synch/rcu1.c
rb2aaaa0 r09ab0a9a 40 40 #include <synch/rcu.h> 41 41 42 43 42 #define MAX_THREADS 32 44 43 … … 134 133 } 135 134 136 137 135 static void join_one(void) 138 136 { … … 150 148 /*-------------------------------------------------------------------*/ 151 149 152 153 150 static void nop_reader(void *arg) 154 151 { … … 195 192 /*-------------------------------------------------------------------*/ 196 193 197 198 199 194 static void long_reader(void *arg) 200 195 { … … 236 231 237 232 /*-------------------------------------------------------------------*/ 238 239 233 240 234 static atomic_t nop_callbacks_cnt = 0; … … 363 357 size_t start_time; 364 358 } seq_item_t; 365 366 359 367 360 static errno_t seq_test_result = EOK; … … 460 453 get_seq(0, total_cnt, get_thread_cnt(), read_cnt); 461 454 462 463 455 for (size_t i = 0; i < get_thread_cnt(); ++i) { 464 456 item[i].update_cnt = total_cnt - read_cnt[i]; … … 496 488 497 489 /*-------------------------------------------------------------------*/ 498 499 490 500 491 static void reader_unlocked(rcu_item_t *item) … … 555 546 errno_t result; 556 547 } preempt_t; 557 558 548 559 549 static void preempted_unlocked(rcu_item_t *item) … … 607 597 TPRINTF("}reader_inside_cur\n"); 608 598 } 609 610 599 611 600 static void preempted_reader_cur(void *arg) … … 683 672 } 684 673 685 686 674 static bool do_one_reader_preempt(void (*f)(void *), const char *err) 687 675 { … … 772 760 } 773 761 774 775 762 static bool do_synch(void) 776 763 { … … 800 787 rcu_synchronize(); 801 788 join_one(); 802 803 789 804 790 if (synch->reader_done) { … … 857 843 } stress_t; 858 844 859 860 845 static void stress_reader(void *arg) 861 846 { … … 1006 991 const char *desc; 1007 992 }; 1008 1009 993 1010 994 const char *test_rcu1(void)
Note:
See TracChangeset
for help on using the changeset viewer.