Commit 3725fd32 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

syscalls: Add sys_arch_prctl helper

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent d6e7afe3
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
#define __NR_exit 60 #define __NR_exit 60
#define __NR_unlink 87 #define __NR_unlink 87
#define __NR__sysctl 156
#define __NR_prctl 157
#define __NR_arch_prctl 158
#define __NR_set_thread_area 205 #define __NR_set_thread_area 205
#define __NR_get_thread_area 211 #define __NR_get_thread_area 211
......
...@@ -221,6 +221,10 @@ static always_inline long sys_get_thread_area(user_desc_t *info) ...@@ -221,6 +221,10 @@ static always_inline long sys_get_thread_area(user_desc_t *info)
return syscall1(__NR_get_thread_area, (long)info); return syscall1(__NR_get_thread_area, (long)info);
} }
static always_inline long sys_arch_prctl(int code, void *addr)
{
return syscall2(__NR_arch_prctl, code, (unsigned long)addr);
}
#else /* CONFIG_X86_64 */ #else /* CONFIG_X86_64 */
# error x86-32 bit mode not yet implemented # error x86-32 bit mode not yet implemented
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment