Changes in kernel/generic/src/adt/cht.c [05882233:3cfe2b8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/cht.c
r05882233 r3cfe2b8 537 537 h->new_b = NULL; 538 538 h->op = op; 539 atomic_s et(&h->item_cnt, 0);540 atomic_s et(&h->resize_reqs, 0);539 atomic_store(&h->item_cnt, 0); 540 atomic_store(&h->resize_reqs, 0); 541 541 542 542 if (NULL == op->remove_callback) { … … 618 618 619 619 /* You must clear the table of items. Otherwise cht_destroy will leak. */ 620 assert(atomic_ get(&h->item_cnt) == 0);620 assert(atomic_load(&h->item_cnt) == 0); 621 621 } 622 622 … … 625 625 { 626 626 /* Wait for resize to complete. */ 627 while (0 < atomic_ get(&h->resize_reqs)) {627 while (0 < atomic_load(&h->resize_reqs)) { 628 628 rcu_barrier(); 629 629 } … … 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) { … … 2160 2160 /* Make resize_reqs visible. */ 2161 2161 read_barrier(); 2162 assert(0 < atomic_ get(&h->resize_reqs));2162 assert(0 < atomic_load(&h->resize_reqs)); 2163 2163 #endif 2164 2164 … … 2168 2168 /* Load the most recent h->item_cnt. */ 2169 2169 read_barrier(); 2170 size_t cur_items = (size_t) atomic_ get(&h->item_cnt);2170 size_t cur_items = (size_t) atomic_load(&h->item_cnt); 2171 2171 size_t bucket_cnt = (1 << h->b->order); 2172 2172 size_t max_items = h->max_load * bucket_cnt; … … 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 }
Note:
See TracChangeset
for help on using the changeset viewer.