Changeset 3cfe2b8 in mainline
- Timestamp:
- 2018-09-07T16:01:50Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c53e813
- Parents:
- 5f1d850
- Location:
- kernel
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/atomic.h
r5f1d850 r3cfe2b8 40 40 #include <stdatomic.h> 41 41 42 typedef size_t atomic_count_t;43 42 typedef atomic_size_t atomic_t; 44 43 -
kernel/generic/src/adt/cht.c
r5f1d850 r3cfe2b8 2122 2122 2123 2123 if ((need_shrink || missed_shrink) && h->b->order > h->min_order) { 2124 atomic_count_t resize_reqs = atomic_preinc(&h->resize_reqs);2124 size_t resize_reqs = atomic_preinc(&h->resize_reqs); 2125 2125 /* The first resize request. Start the resizer. */ 2126 2126 if (1 == resize_reqs) { … … 2143 2143 2144 2144 if ((need_grow || missed_grow) && h->b->order < CHT_MAX_ORDER) { 2145 atomic_count_t resize_reqs = atomic_preinc(&h->resize_reqs);2145 size_t resize_reqs = atomic_preinc(&h->resize_reqs); 2146 2146 /* The first resize request. Start the resizer. */ 2147 2147 if (1 == resize_reqs) { … … 2178 2178 } else { 2179 2179 /* Table is just the right size. */ 2180 atomic_count_t reqs = atomic_predec(&h->resize_reqs);2180 size_t reqs = atomic_predec(&h->resize_reqs); 2181 2181 done = (reqs == 0); 2182 2182 } -
kernel/generic/src/mm/slab.c
r5f1d850 r3cfe2b8 690 690 * endless loop 691 691 */ 692 atomic_count_t magcount = atomic_load(&cache->magazine_counter);692 size_t magcount = atomic_load(&cache->magazine_counter); 693 693 694 694 slab_magazine_t *mag; -
kernel/generic/src/proc/scheduler.c
r5f1d850 r3cfe2b8 566 566 void kcpulb(void *arg) 567 567 { 568 atomic_count_t average;569 atomic_count_t rdy;568 size_t average; 569 size_t rdy; 570 570 571 571 /* … … 593 593 goto satisfied; 594 594 595 atomic_count_t count = average - rdy;595 size_t count = average - rdy; 596 596 597 597 /* -
kernel/generic/src/sysinfo/stats.c
r5f1d850 r3cfe2b8 764 764 * 765 765 */ 766 static inline load_t load_calc(load_t load, load_t exp, atomic_count_t ready)766 static inline load_t load_calc(load_t load, load_t exp, size_t ready) 767 767 { 768 768 load *= exp; … … 784 784 785 785 while (true) { 786 atomic_count_t ready = atomic_load(&nrdy);786 size_t ready = atomic_load(&nrdy); 787 787 788 788 /* Mutually exclude with get_stats_load() */ -
kernel/test/synch/rcu1.c
r5f1d850 r3cfe2b8 361 361 typedef struct { 362 362 rcu_item_t rcu; 363 atomic_count_t start_time;363 size_t start_time; 364 364 } seq_item_t; 365 365 … … 368 368 369 369 static atomic_t cur_time = { 1 }; 370 static atomic_count_t max_upd_done_time = { 0 };370 static size_t max_upd_done_time = { 0 }; 371 371 372 372 static void seq_cb(rcu_item_t *rcu_item) … … 399 399 for (size_t i = 0; i < work->read_cnt; ++i) { 400 400 rcu_read_lock(); 401 atomic_count_t start_time = atomic_postinc(&cur_time);401 size_t start_time = atomic_postinc(&cur_time); 402 402 403 403 for (volatile size_t d = 0; d < 10 * i; ++d) { -
kernel/test/synch/semaphore1.c
r5f1d850 r3cfe2b8 73 73 { 74 74 int i, j, k; 75 atomic_count_t consumers;76 atomic_count_t producers;75 size_t consumers; 76 size_t producers; 77 77 78 78 waitq_initialize(&can_start); -
kernel/test/thread/thread1.c
r5f1d850 r3cfe2b8 56 56 { 57 57 unsigned int i; 58 atomic_count_t total = 0;58 size_t total = 0; 59 59 60 60 atomic_store(&finish, 1);
Note:
See TracChangeset
for help on using the changeset viewer.