Files
clang-p2996/libc/include/sys/prctl.h.def
Schrodinger ZHU Yifan 86bde5adc8 [libc] implement prctl (#74386)
Implement `prctl` as specified in
https://man7.org/linux/man-pages/man2/prctl.2.html.

This patch also includes test cases covering two simple use cases:

1. `PR_GET_NAME/PR_SET_NAME`: where userspace data is passed via arg2.
2. `PR_GET_THP_DISABLE`: where return value is passed via syscal retval.
2023-12-05 12:31:00 -08:00

21 lines
640 B
Modula-2

//===-- Linux header prctl.h ----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_SYS_PRCTL_H
#define LLVM_LIBC_SYS_PRCTL_H
#include <__llvm-libc-common.h>
// Process control is highly platform specific, so the platform usually defines
// the macros itself.
#include <linux/prctl.h>
%%public_api()
#endif // LLVM_LIBC_SYS_PRCTL_H