1 /* Copyright (C) 1997-2022 Free Software Foundation, Inc. 2 This file is part of the GNU C Library. 3 4 The GNU C Library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 2.1 of the License, or (at your option) any later version. 8 9 The GNU C Library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with the GNU C Library; if not, see 16 <https://www.gnu.org/licenses/>. */ 17 18 #ifndef _SYS_PRCTL_H 19 #define _SYS_PRCTL_H 1 20 21 #include <features.h> 22 #include <linux/prctl.h> /* The magic values come from here */ 23 24 /* Recent extensions to linux which may post-date the kernel headers 25 we're picking up... */ 26 27 /* Memory tagging control operations (for AArch64). */ 28 #ifndef PR_MTE_TCF_SHIFT 29 # define PR_MTE_TCF_SHIFT 1 30 # define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT) 31 # define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT) 32 # define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT) 33 # define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT) 34 # define PR_MTE_TAG_SHIFT 3 35 # define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT) 36 #endif 37 38 __BEGIN_DECLS 39 40 /* Control process execution. */ 41 #ifndef __USE_TIME_BITS64 42 extern int prctl (int __option, ...) __THROW; 43 #else 44 # ifdef __REDIRECT 45 extern int __REDIRECT_NTH (prctl, (int __option, ...), __prctl_time64); 46 # else 47 extern int __prctl_time64 (int __option,d ...) __THROW; 48 # define ioctl __prctl_time64 49 # endif 50 #endif 51 52 53 __END_DECLS 54 55 #endif /* sys/prctl.h */ 56