avoid an ifdef
This commit is contained in:
parent
f214bd541a
commit
bcb93cab63
@ -977,19 +977,17 @@ int get_metadata_key(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void thread_set_metadata_access(UNUSED unsigned access) {
|
||||||
#ifdef USE_PKEY
|
#ifdef USE_PKEY
|
||||||
static inline void thread_set_metadata_access(unsigned access) {
|
|
||||||
if (ro.metadata_pkey == -1) {
|
if (ro.metadata_pkey == -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pkey_set(ro.metadata_pkey, access);
|
pkey_set(ro.metadata_pkey, access);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static inline void thread_unseal_metadata(void) {
|
static inline void thread_unseal_metadata(void) {
|
||||||
#ifdef USE_PKEY
|
|
||||||
thread_set_metadata_access(0);
|
thread_set_metadata_access(0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void thread_seal_metadata(void) {
|
static inline void thread_seal_metadata(void) {
|
||||||
|
Loading…
Reference in New Issue
Block a user