static inline void mark_bb_seen (basic_block bb) { unsigned int size = SBITMAP_SIZE (bb_seen); if ((unsigned int)bb->index >= size) bb_seen = sbitmap_resize (bb_seen, size * 2, 0); bitmap_set_bit (bb_seen, bb->index); }
static inline void mark_bb_seen (basic_block bb) { unsigned int size = SBITMAP_SIZE_BYTES (bb_seen) * 8; if ((unsigned int)bb->index >= size) bb_seen = sbitmap_resize (bb_seen, size * 2, 0); SET_BIT (bb_seen, bb->index); }
void sbitmap_queue_resize(struct sbitmap_queue *sbq, unsigned int depth) { unsigned int wake_batch = sbq_calc_wake_batch(depth); int i; if (sbq->wake_batch != wake_batch) { WRITE_ONCE(sbq->wake_batch, wake_batch); /* * Pairs with the memory barrier in sbq_wake_up() to ensure that * the batch size is updated before the wait counts. */ smp_mb__before_atomic(); for (i = 0; i < SBQ_WAIT_QUEUES; i++) atomic_set(&sbq->ws[i].wait_cnt, 1); } sbitmap_resize(&sbq->sb, depth); }