#define included_clib_interrupt_h
#include <vppinfra/clib.h>
-#include <vppinfra/bitops.h> /* for count_set_bits */
#include <vppinfra/vec.h>
typedef struct
ASSERT (last >= -1 && last < h->n_int);
off = (last + 1) >> log2_uword_bits;
+ if (off > h->n_int >> log2_uword_bits || off >= h->n_uword_alloc)
+ return -1;
last -= off << log2_uword_bits;
bmp[off] |= __atomic_exchange_n (abm + off, 0, __ATOMIC_SEQ_CST);
off++;
- if (off > h->n_int >> log2_uword_bits)
+ if (off > h->n_int >> log2_uword_bits || off >= h->n_uword_alloc)
return -1;
bmp[off] |= __atomic_exchange_n (abm + off, 0, __ATOMIC_SEQ_CST);