kernel: Fix bitwise operators with unsigned operators
Bitwise operators should be used only with unsigned integer operands because the result os bitwise operations on signed integers are implementation-defined. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
0866d18d03
commit
8aec087268
6 changed files with 29 additions and 12 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <atomic.h>
|
||||
#include <misc/dlist.h>
|
||||
#include <misc/rb.h>
|
||||
#include <misc/util.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
|
@ -31,22 +32,22 @@
|
|||
/* states: common uses low bits, arch-specific use high bits */
|
||||
|
||||
/* Not a real thread */
|
||||
#define _THREAD_DUMMY (1 << 0)
|
||||
#define _THREAD_DUMMY (BIT(0))
|
||||
|
||||
/* Thread is waiting on an object */
|
||||
#define _THREAD_PENDING (1 << 1)
|
||||
#define _THREAD_PENDING (BIT(1))
|
||||
|
||||
/* Thread has not yet started */
|
||||
#define _THREAD_PRESTART (1 << 2)
|
||||
#define _THREAD_PRESTART (BIT(2))
|
||||
|
||||
/* Thread has terminated */
|
||||
#define _THREAD_DEAD (1 << 3)
|
||||
#define _THREAD_DEAD (BIT(3))
|
||||
|
||||
/* Thread is suspended */
|
||||
#define _THREAD_SUSPENDED (1 << 4)
|
||||
#define _THREAD_SUSPENDED (BIT(4))
|
||||
|
||||
/* Thread is present in the ready queue */
|
||||
#define _THREAD_QUEUED (1 << 6)
|
||||
#define _THREAD_QUEUED (BIT(6))
|
||||
|
||||
/* end - states */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue