From 65dfda3dd16da5cff236c4a84532ec40d7533578 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sat, 15 May 2021 20:20:28 +0200 Subject: [PATCH] sched_setattr.2: Use syscall(SYS_...); for system calls without a wrapper Document also why each header is required Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- man2/sched_setattr.2 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/man2/sched_setattr.2 b/man2/sched_setattr.2 index 545558a4e..1c24c65d3 100644 --- a/man2/sched_setattr.2 +++ b/man2/sched_setattr.2 @@ -29,17 +29,21 @@ sched_setattr, sched_getattr \- set and get scheduling policy and attributes .SH SYNOPSIS .nf -.B #include +.BR "#include " " /* Definition of " SCHED_* " constants */" +.BR "#include " " /* Definition of " SYS_* " constants */" +.B #include .PP -.BI "int sched_setattr(pid_t " pid ", struct sched_attr *" attr , -.BI " unsigned int " flags ); -.BI "int sched_getattr(pid_t " pid ", struct sched_attr *" attr , -.BI " unsigned int " size ", unsigned int " flags ); +.BI "int syscall(SYS_sched_setattr, pid_t " pid ", struct sched_attr *" attr , +.BI " unsigned int " flags ); +.BI "int syscall(SYS_sched_getattr, pid_t " pid ", struct sched_attr *" attr , +.BI " unsigned int " size ", unsigned int " flags ); .fi .\" FIXME . Add feature test macro requirements .PP .IR Note : -There are no glibc wrappers for these system calls; see NOTES. +glibc provides no wrappers for these system calls, +necessitating the use of +.BR syscall (2). .SH DESCRIPTION .SS sched_setattr() The