Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: structs: define priq bitmap size via bits per long #72626

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions include/zephyr/kernel_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@
#endif

#define K_NUM_THREAD_PRIO (CONFIG_NUM_PREEMPT_PRIORITIES + CONFIG_NUM_COOP_PRIORITIES + 1)

#if defined(CONFIG_64BIT)
#define PRIQ_BITMAP_SIZE (DIV_ROUND_UP(K_NUM_THREAD_PRIO, 8 * sizeof(uint64_t)))
#else
#define PRIQ_BITMAP_SIZE (DIV_ROUND_UP(K_NUM_THREAD_PRIO, 8 * sizeof(uint32_t)))
#endif

#define PRIQ_BITMAP_SIZE (DIV_ROUND_UP(K_NUM_THREAD_PRIO, BITS_PER_LONG))

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -127,11 +121,7 @@ struct _priq_rb {
*/
struct _priq_mq {
sys_dlist_t queues[K_NUM_THREAD_PRIO];
#ifdef CONFIG_64BIT
uint64_t bitmask[PRIQ_BITMAP_SIZE];
#else
uint32_t bitmask[PRIQ_BITMAP_SIZE];
#endif
unsigned long bitmask[PRIQ_BITMAP_SIZE];
};

struct _ready_q {
Expand Down
Loading