Add an enum for the riscv64 <sys/ucontext.h> register constants.
That lets us have idempotent #defines to reduce namespace pollution. Bug: http://b/279405445 Test: treehugger Change-Id: I00312cc8911025696cf0eea2d70e3219ab361613
This commit is contained in:
parent
20fa28e564
commit
7fc63f2c9a
1 changed files with 14 additions and 6 deletions
|
@ -318,12 +318,20 @@ typedef struct ucontext {
|
|||
|
||||
#if defined(__USE_GNU)
|
||||
|
||||
#define REG_PC 0
|
||||
#define REG_RA 1
|
||||
#define REG_SP 2
|
||||
#define REG_TP 4
|
||||
#define REG_S0 8
|
||||
#define REG_A0 10
|
||||
enum {
|
||||
REG_PC = 0,
|
||||
#define REG_PC REG_PC
|
||||
REG_RA = 1,
|
||||
#define REG_RA REG_RA
|
||||
REG_SP = 2,
|
||||
#define REG_SP REG_SP
|
||||
REG_TP = 4,
|
||||
#define REG_TP REG_TP
|
||||
REG_S0 = 8,
|
||||
#define REG_S0 REG_S0
|
||||
REG_A0 = 10,
|
||||
#define REG_A0 REG_A0
|
||||
};
|
||||
|
||||
#endif // defined(__USE_GNU)
|
||||
|
||||
|
|
Loading…
Reference in a new issue