mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 18:50:31 -04:00
Fix RQB_FFS for 64 bit, we need to use ffsl() for 64bit.
Use 'ifdef __mips_n64' instead of 'if defined' to be consistant with other usage.
This commit is contained in:
parent
c280c7d482
commit
63ba49fd5f
1 changed files with 6 additions and 2 deletions
|
|
@ -30,7 +30,7 @@
|
|||
#ifndef _MACHINE_RUNQ_H_
|
||||
#define _MACHINE_RUNQ_H_
|
||||
|
||||
#if defined(__mips_n64)
|
||||
#ifdef __mips_n64
|
||||
#define RQB_LEN (1) /* Number of priority status words. */
|
||||
#define RQB_L2BPW (6) /* Log2(sizeof(rqb_word_t) * NBBY)). */
|
||||
#else
|
||||
|
|
@ -42,12 +42,16 @@
|
|||
#define RQB_BIT(pri) (1ul << ((pri) & (RQB_BPW - 1)))
|
||||
#define RQB_WORD(pri) ((pri) >> RQB_L2BPW)
|
||||
|
||||
#ifdef __mips_n64
|
||||
#define RQB_FFS(word) (ffsl(word) - 1)
|
||||
#else
|
||||
#define RQB_FFS(word) (ffs(word) - 1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Type of run queue status word.
|
||||
*/
|
||||
#if defined(__mips_n64)
|
||||
#ifdef __mips_n64
|
||||
typedef u_int64_t rqb_word_t;
|
||||
#else
|
||||
typedef u_int32_t rqb_word_t;
|
||||
|
|
|
|||
Loading…
Reference in a new issue