avoid an ifdef

pull/116/head
Daniel Micay 2020-08-04 17:22:03 -04:00
parent f214bd541a
commit bcb93cab63
1 changed files with 2 additions and 4 deletions

View File

@ -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) {