summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/sys/prctl.cpp
blob: 25d0033c7cb159f75bb880cac995308032eddda1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <sys/prctl.h>
#include <syscall.h>

extern "C" {

int prctl(int option, uintptr_t arg1, uintptr_t arg2)
{
    int rc = syscall(SC_prctl, option, arg1, arg2);
    __RETURN_WITH_ERRNO(rc, rc, -1);
}
}