32 lines · c
1//===---------- Generic stub implementations for pkey functionality. ------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_SYS_MMAN_LINUX_GENERIC_PKEY_COMMON_H_10#define LLVM_SYS_MMAN_LINUX_GENERIC_PKEY_COMMON_H_11 12#include "hdr/errno_macros.h" // For ENOSYS13#include "src/__support/common.h"14#include "src/__support/error_or.h"15 16namespace LIBC_NAMESPACE_DECL {17namespace pkey_common {18 19LIBC_INLINE ErrorOr<int> pkey_get([[maybe_unused]] int pkey) {20 return Error(ENOSYS);21}22 23LIBC_INLINE ErrorOr<int> pkey_set([[maybe_unused]] int pkey,24 [[maybe_unused]] unsigned int access_rights) {25 return Error(ENOSYS);26}27 28} // namespace pkey_common29} // namespace LIBC_NAMESPACE_DECL30 31#endif // LLVM_SYS_MMAN_LINUX_GENERIC_PKEY_COMMON_H_32