core.sys.linux.sched
D binding for Linux specific scheduler control and thread spawning methods.
Defines functions sched_setaffinity and sched_getaffinity and the data types they operate on, as well as clone and unshare and their related constants.
Copyright
Copyright (c) 2016 Sociomantic Labs. All rights reserved.
var CLONE_FILES CLONE_FS CLONE_NEWCGROUP CLONE_NEWIPC CLONE_NEWNET CLONE_NEWNS CLONE_NEWPID CLONE_NEWUSER CLONE_NEWUTS CLONE_SIGHAND CLONE_SYSVSEM CLONE_THREAD CLONE_VFORK CLONE_VM
alias cpu_mask
struct cpu_set_t
Types 2
aliascpu_mask = c_ulong
Type for array elements in 'cpu_set_t'.
structcpu_set_t
Data structure to describe CPU mask.
Fields
cpu_mask[__CPU_SETSIZE / __NCPUBITS] __bitsFunctions 20
fn
cpu_set_t * __CPU_ALLOC()(size_t count)fn
void __CPU_FREE()(cpu_set_t * set)fn
void CPU_FREE()(cpu_set_t * set)fn
int sched_setaffinity(pid_t pid, size_t cpusetsize, cpu_set_t * mask)fn
int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t * mask)fn
int clone(int function(void *), void * child_stack, int flags, void * arg, ...)fn
int setns(int fd, int nstype)Variables 14
enumvar
CLONE_FILES = 0x400enumvar
CLONE_FS = 0x200enumvar
CLONE_NEWCGROUP = 0x2000000enumvar
CLONE_NEWIPC = 0x8000000enumvar
CLONE_NEWNET = 0x40000000enumvar
CLONE_NEWNS = 0x20000enumvar
CLONE_NEWPID = 0x20000000enumvar
CLONE_NEWUSER = 0x10000000enumvar
CLONE_NEWUTS = 0x4000000enumvar
CLONE_SIGHAND = 0x800enumvar
CLONE_SYSVSEM = 0x40000enumvar
CLONE_THREAD = 0x10000enumvar
CLONE_VFORK = 0x4000enumvar
CLONE_VM = 0x100