FILE
sched.h
File preview with syntax highlighting.
linux-6.19.14/tools/include/nolibc/sched.h
1/* SPDX-License-Identifier: LGPL-2.1 OR MIT */ 2/* 3 * sched function definitions for NOLIBC 4 * Copyright (C) 2025 Thomas Weißschuh <linux@weissschuh.net> 5 */ 6 7/* make sure to include all global symbols */ 8#include "nolibc.h" 9 10#ifndef _NOLIBC_SCHED_H 11#define _NOLIBC_SCHED_H 12 13#include "sys.h" 14 15#include <linux/sched.h> 16 17/* 18 * int setns(int fd, int nstype); 19 */ 20 21static __attribute__((unused)) 22int sys_setns(int fd, int nstype) 23{ 24 return my_syscall2(__NR_setns, fd, nstype); 25} 26 27static __attribute__((unused)) 28int setns(int fd, int nstype) 29{ 30 return __sysret(sys_setns(fd, nstype)); 31} 32 33 34/* 35 * int unshare(int flags); 36 */ 37 38static __attribute__((unused)) 39int sys_unshare(int flags) 40{ 41 return my_syscall1(__NR_unshare, flags); 42} 43 44static __attribute__((unused)) 45int unshare(int flags) 46{ 47 return __sysret(sys_unshare(flags)); 48} 49 50#endif /* _NOLIBC_SCHED_H */
~/
Read-only file preview.