Specify the ProcessState enum to be one byte in size, with static assert
This commit is contained in:
parent
4760e1f742
commit
a16f9a4900
1 changed files with 3 additions and 1 deletions
|
|
@ -5,7 +5,7 @@
|
|||
#include <riscv.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
typedef enum : uint8_t {
|
||||
UNUSED,
|
||||
USED,
|
||||
SLEEPING,
|
||||
|
|
@ -14,6 +14,8 @@ typedef enum {
|
|||
ZOMBIE,
|
||||
} ProcessState;
|
||||
|
||||
_Static_assert(sizeof(ProcessState) == 1, "");
|
||||
|
||||
/** Saved registers for kernel context switches. */
|
||||
typedef struct Context {
|
||||
uint64_t ra;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue