Plan 9 from Bell Labs’s /usr/web/sources/contrib/cinap_lenrek/old/linuxemu.old/linuxsys.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


/* Linux system calls, ioctls, error numbers, signals and other constants */
/* Copied from linux headers and reformatted. */

/* syscalls */
enum {
	Lsetup = 0,
	Lexit,
	Lfork,
	Lread,
	Lwrite,
	Lopen = 5,
	Lclose,
	Lwaitpid,
	Lcreat,
	Llink,
	Lunlink		= 10 ,
	Lexecve,
	Lchdir,
	Ltime,
	Lmknod,
	Lchmod		= 15 ,
	Llchown,
	Lsyscall_17,
	Lstat,
	Llseek,
	Lgetpid		= 20 ,
	Lmount,
	Lumount,
	Lsetuid,
	Lgetuid,
	Lstime		= 25 ,
	Lptrace,
	Lalarm,
	Lfstat,
	Lpause,
	Lutime		= 30 ,
	Lsyscall_31,
	Lsyscall_32,
	Laccess,
	Lnice,
	Lsyscall_35	= 35,
	Lsync,
	Lkill,
	Lrename,
	Lmkdir,
	Lrmdir		= 40 ,
	Ldup,
	Lpipe,
	Ltimes,
	Lsyscall_44,
	Lbrk		= 45,
	Lsetgid,
	Lgetgid,
	Lsignal,
	Lgeteuid,
	Lgetegid		= 50 ,
	Lacct,
	Lsyscall_52,
	Lsyscall_53,
	Lioctl,
	Lfcntl		= 55 ,
	Lsyscall_56,
	Lsetpgid,
	Lsyscall_58,
	Lolduname,
	Lumask		= 60 ,
	Lchroot,
	Lustat,
	Ldup2,
	Lgetppid,
	Lgetpgrp		= 65 ,
	Lsetsid,
	Lsigaction,
	Lsgetmask,
	Lssetmask,
	Lsetreuid		= 70 ,
	Lsetregid,
	Lsigsuspend,
	Lsigpending,
	Lsethostname,
	Lsetrlimit	= 75 ,
	Lgetrlimit,
	Lgetrusage,
	Lgettimeofday,
	Lsettimeofday,
	Lgetgroups	= 80 ,
	Lsetgroups,
	Lold_select,
	Lsymlink,
	Llstat,
	Lreadlink		= 85 ,
	Luselib,
	Lswapon,
	Lreboot,
	Lold_readdir,
	Lold_mmap		= 90 ,
	Lmunmap,
	Ltruncate,
	Lftruncate,
	Lfchmod,
	Lfchown		= 95 ,
	Lgetpriority,
	Lsetpriority,
	Lsyscall_98,
	Lstatfs,
	Lfstatfs		= 100 ,
	Lioperm,
	Lsocketcall,
	Lsyslog,
	Lsetitimer,
	Lgetitimer	= 105 ,
	Lnewstat,
	Lnewlstat,
	Lnewfstat,
	Luname,
	Liopl		= 110 ,
	Lvhangup,
	Lidle,
	Lvm86old,
	Lwait4,
	Lswapoff		= 115 ,
	Lsysinfo,
	Lipc,
	Lfsync,
	Lsigreturn,
	Lclone		= 120 ,
	Lsetdomainname,
	Lnewuname,
	Lmodify_ldt,
	Ladjtimex,
	Lmprotect		= 125 ,
	Lsigprocmask,
	Lcreate_module,
	Linit_module,
	Ldelete_module,
	Lget_kernel_syms	= 130 ,
	Lquotactl,
	Lgetpgid,
	Lfchdir,
	Lbdflush,
	Lsysfs		= 135 ,
	Lpersonality,
	Lsyscall_137,
	Lsetfsuid,
	Lsetfsgid,
	Lllseek		= 140 ,
	Lgetdents,
	Lselect,
	Lflock,
	Lmsync,
	Lreadv		= 145 ,
	Lwritev,
	Lgetsid,
	Lfdatasync,
	Lsysctl,
	Lmlock		= 150 ,
	Lmunlock,
	Lmlockall,
	Lmunlockall,
	Lsched_setparam,
	Lsched_getparam   = 155 ,
	Lsched_setscheduler,
	Lsched_getscheduler,
	Lsched_yield,
	Lsched_get_priority_max,
	Lsched_get_priority_min  = 160 ,
	Lsched_rr_get_interval,
	Lnanosleep,
	Lmremap,
	Lsetresuid,
	Lgetresuid	= 165 ,
	Lvm86,
	Lquery_module,
	Lpoll,
	Lnfsservctl,
	Lsetresgid	= 170 ,
	Lgetresgid,
	Lprctl,
	Lrt_sigreturn,
	Lrt_sigaction,
	Lrt_sigprocmask	= 175 ,
	Lrt_sigpending,
	Lrt_sigtimedwait,
	Lrt_sigqueueinfo,
	Lrt_sigsuspend,
	Lpread		= 180 ,
	Lpwrite,
	L_chown,
	Lgetcwd,
	Lcapget,
	Lcapset		= 185,
	Lsignalstack,
	Lsendfile,
	Lgetpmsg,
	Lputpmsg,
	Lvfork14		= 190,
	Lugetrlimit,
	Lmmap2,
	Ltruncate64,
	Lftruncate64,
	Lnewstat64	= 195,
	Lnewlstat64,
	Lfstat64,
	Lnewlchown,
	Lnewgetuid,
	Lnewgetgid	= 200,
	Lnewgeteuid,
	Lnewgetegid,
	Lnewsetreuid,
	Lnewsetregid,
	Lnewgetgroups	= 205,
	Lnewsetgroups,
	Lnewfchown,
	Lnewsetresuid,
	Lnewgetresuid,
	Lnewsetresgid		= 210,
	Lnewgetresgid,
	Lnewchown,
	Lnewsetuid,
	Lnewsetgid,
	Lnewsetfsuid	= 215,
	Lnewgetfsuid,
	Lpivot_root,
	Lmincore,
	Lmadvise,
	Lgetdents64	= 220,
	Lfcntl64,
	Lcall222,
	Lcall223,
	Lgettid,
	Lreadahead	= 225,
	Lsetxattr,
	Llsetxattr,
	Lfsetxattr,
	Lgetxattr,
	Llgetxattr		= 230,
	Lfgetxattr,
	Llistxattr,
	Lllistxatt,
	Lrflistxattr,
	Lremovexattr	= 235,
	Llremovexattr,
	Lfremovexattr,
	Ltkill,
	Lsendfile64,
	Lfutex		= 240,
	Lsched_setaffinity,
	Lsched_getaffinity,
	Lset_thread_area,
	Lget_thread_area,
	Lio_setup		= 245,
	Lio_destroy,
	Lio_getevents,
	Lio_submit,
	Lio_cancel,
	Lfadvise64		= 250,
	Lcall251,	
	Lexit_group,
	Llookup_dcookie,
	Lepoll_create,
	Lepoll_ctl		= 255,
	Lepoll_wait,
	Lremap_file_pages,
	Lset_tid_address,
	Ltimer_create,
	Ltimer_settime		= 260,
	Ltimer_gettime,
	Ltimer_getoverrun,
	Ltimer_delete,
	Lclock_settime,
	Lclock_gettime		= 265,
	Lclock_getres,
	Lclock_nanosleep,
	Lstatfs64,
	Lfstatfs64,
	Ltgkill			= 270,
	Lutimes,
	Lfadvise64_64,
	Lvserver,
	LMAXSYSCALL,
};

/* ioctls */
enum {
FIOSETOWN=0x00008901,
SIOCSPGRP=0x00008902,
FIOGETOWN=0x00008903,
SIOCGPGRP=0x00008904,
SIOCATMARK=0x00008905,
SIOCGSTAMP=0x00008906,
TCGETS=0x00005401,
TCSETS=0x00005402,
TCSETSW=0x00005403,
TCSETSF=0x00005404,
TCGETA=0x00005405,
TCSETA=0x00005406,
TCSETAW=0x00005407,
TCSETAF=0x00005408,
TCSBRK=0x00005409,
TCXONC=0x0000540A,
TCFLSH=0x0000540B,
TIOCEXCL=0x0000540C,
TIOCNXCL=0x0000540D,
TIOCSCTTY=0x0000540E,
TIOCGPGRP=0x0000540F,
TIOCSPGRP=0x00005410,
TIOCOUTQ=0x00005411,
TIOCSTI=0x00005412,
TIOCGWINSZ=0x00005413,
TIOCSWINSZ=0x00005414,
TIOCMGET=0x00005415,
TIOCMBIS=0x00005416,
TIOCMBIC=0x00005417,
TIOCMSET=0x00005418,
TIOCGSOFTCAR=0x00005419,
TIOCSSOFTCAR=0x0000541A,
FIONREAD=0x0000541B,
TIOCINQ=0x0000541B,
TIOCLINUX=0x0000541C,
TIOCCONS=0x0000541D,
TIOCGSERIAL=0x0000541E,
TIOCSSERIAL=0x0000541F,
TIOCPKT=0x00005420,
FIONBIO=0x00005421,
TIOCNOTTY=0x00005422,
TIOCSETD=0x00005423,
TIOCGETD=0x00005424,
TCSBRKP=0x00005425,
TIOCTTYGSTRUCT=0x00005426,
FIONCLEX=0x00005450,
FIOCLEX=0x00005451,
FIOASYNC=0x00005452,
TIOCSERCONFIG=0x00005453,
TIOCSERGWILD=0x00005454,
TIOCSERSWILD=0x00005455,
TIOCGLCKTRMIOS=0x00005456,
TIOCSLCKTRMIOS=0x00005457,
TIOCSERGSTRUCT=0x00005458,
TIOCSERGETLSR=0x00005459,
TIOCSERGETMULTI=0x0000545A,
TIOCSERSETMULTI=0x0000545B,
SIOCAX25GETUID=0x000089E0,
SIOCAX25ADDUID=0x000089E1,
SIOCAX25DELUID=0x000089E2,
SIOCAX25NOUID=0x000089E3,
SIOCAX25DIGCTL=0x000089E4,
SIOCAX25GETPARMS=0x000089E5,
SIOCAX25SETPARMS=0x000089E6,
STL_BINTR=0x00007314,
STL_BSTART=0x00007315,
STL_BSTOP=0x00007316,
STL_BRESET=0x00007317,
CDROMPAUSE=0x00005301,
CDROMRESUME=0x00005302,
CDROMPLAYMSF=0x00005303,
CDROMPLAYTRKIND=0x00005304,
CDROMREADTOCHDR=0x00005305,
CDROMREADTOCENTRY=0x00005306,
CDROMSTOP=0x00005307,
CDROMSTART=0x00005308,
CDROMEJECT=0x00005309,
CDROMVOLCTRL=0x0000530A,
CDROMSUBCHNL=0x0000530B,
CDROMREADMODE2=0x0000530C,
CDROMREADMODE1=0x0000530D,
CDROMREADAUDIO=0x0000530E,
CDROMEJECT_SW=0x0000530F,
CDROMMULTISESSION=0x00005310,
CDROM_GET_UPC=0x00005311,
CDROMRESET=0x00005312,
CDROMVOLREAD=0x00005313,
CDROMREADRAW=0x00005314,
CDROMREADCOOKED=0x00005315,
CDROMSEEK=0x00005316,
CM206CTL_GET_STAT=0x00002000,
CM206CTL_GET_LAST_STAT=0x00002001,
CYGETMON=0x00435901,
CYGETTHRESH=0x00435902,
CYSETTHRESH=0x00435903,
CYGETDEFTHRESH=0x00435904,
CYSETDEFTHRESH=0x00435905,
CYGETTIMEOUT=0x00435906,
CYSETTIMEOUT=0x00435907,
CYGETDEFTIMEOUT=0x00435908,
CYSETDEFTIMEOUT=0x00435909,
EXT2_IOC_GETFLAGS=0x80046601,
EXT2_IOC_SETFLAGS=0x40046602,
EXT2_IOC_GETVERSION=0x80047601,
EXT2_IOC_SETVERSION=0x40047602,
FDCLRPRM=0x00000000,
FDSETPRM=0x00000001,
FDDEFPRM=0x00000002,
FDGETPRM=0x00000003,
FDMSGON=0x00000004,
FDMSGOFF=0x00000005,
FDFMTBEG=0x00000006,
FDFMTTRK=0x00000007,
FDFMTEND=0x00000008,
FDSETEMSGTRESH=0x0000000A,
FDFLUSH=0x0000000B,
FDSETMAXERRS=0x0000000C,
FDGETMAXERRS=0x0000000E,
FDGETDRVTYP=0x00000010,
FDSETDRVPRM=0x00000014,
FDGETDRVPRM=0x00000015,
FDGETDRVSTAT=0x00000016,
FDPOLLDRVSTAT=0x00000017,
FDRESET=0x00000018,
FDGETFDCSTAT=0x00000019,
FDWERRORCLR=0x0000001B,
FDWERRORGET=0x0000001C,
FDRAWCMD=0x0000001E,
FDTWADDLE=0x00000028,
BLKROSET=0x0000125D,
BLKROGET=0x0000125E,
BLKRRPART=0x0000125F,
BLKGETSIZE=0x00001260,
BLKFLSBUF=0x00001261,
BLKRASET=0x00001262,
BLKRAGET=0x00001263,
FIBMAP=0x00000001,
FIGETBSZ=0x00000002,
HDIO_GETGEO=0x00000301,
HDIO_GET_UNMASKINTR=0x00000302,
HDIO_GET_MULTCOUNT=0x00000304,
HDIO_GET_IDENTITY=0x00000307,
HDIO_GET_KEEPSETTINGS=0x00000308,
HDIO_GET_CHIPSET=0x00000309,
HDIO_GET_NOWERR=0x0000030A,
HDIO_GET_DMA=0x0000030B,
HDIO_DRIVE_CMD=0x0000031F,
HDIO_SET_MULTCOUNT=0x00000321,
HDIO_SET_UNMASKINTR=0x00000322,
HDIO_SET_KEEPSETTINGS=0x00000323,
HDIO_SET_CHIPSET=0x00000324,
HDIO_SET_NOWERR=0x00000325,
HDIO_SET_DMA=0x00000326,
EQL_ENSLAVE=0x000089F0,
EQL_EMANCIPATE=0x000089F1,
EQL_GETSLAVECFG=0x000089F2,
EQL_SETSLAVECFG=0x000089F3,
EQL_GETMASTRCFG=0x000089F4,
EQL_SETMASTRCFG=0x000089F5,
SIOCDEVPLIP=0x000089F0,
PPPIOCGFLAGS=0x00005490,
PPPIOCSFLAGS=0x00005491,
PPPIOCGASYNCMAP=0x00005492,
PPPIOCSASYNCMAP=0x00005493,
PPPIOCGUNIT=0x00005494,
PPPIOCSINPSIG=0x00005495,
PPPIOCSDEBUG=0x00005497,
PPPIOCGDEBUG=0x00005498,
PPPIOCGSTAT=0x00005499,
PPPIOCGTIME=0x0000549A,
PPPIOCGXASYNCMAP=0x0000549B,
PPPIOCSXASYNCMAP=0x0000549C,
PPPIOCSMRU=0x0000549D,
PPPIOCRASYNCMAP=0x0000549E,
PPPIOCSMAXCID=0x0000549F,
SIOCAIPXITFCRT=0x000089E0,
SIOCAIPXPRISLT=0x000089E1,
SIOCIPXCFGDATA=0x000089E2,
GIO_FONT=0x00004B60,
PIO_FONT=0x00004B61,
GIO_FONTX=0x00004B6B,
PIO_FONTX=0x00004B6C,
GIO_CMAP=0x00004B70,
PIO_CMAP=0x00004B71,
KIOCSOUND=0x00004B2F,
KDMKTONE=0x00004B30,
KDGETLED=0x00004B31,
KDSETLED=0x00004B32,
KDGKBTYPE=0x00004B33,
KDADDIO=0x00004B34,
KDDELIO=0x00004B35,
KDENABIO=0x00004B36,
KDDISABIO=0x00004B37,
KDSETMODE=0x00004B3A,
KDGETMODE=0x00004B3B,
KDMAPDISP=0x00004B3C,
KDUNMAPDISP=0x00004B3D,
GIO_SCRNMAP=0x00004B40,
PIO_SCRNMAP=0x00004B41,
GIO_UNISCRNMAP=0x00004B69,
PIO_UNISCRNMAP=0x00004B6A,
GIO_UNIMAP=0x00004B66,
PIO_UNIMAP=0x00004B67,
PIO_UNIMAPCLR=0x00004B68,
KDGKBMODE=0x00004B44,
KDSKBMODE=0x00004B45,
KDGKBMETA=0x00004B62,
KDSKBMETA=0x00004B63,
KDGKBLED=0x00004B64,
KDSKBLED=0x00004B65,
KDGKBENT=0x00004B46,
KDSKBENT=0x00004B47,
KDGKBSENT=0x00004B48,
KDSKBSENT=0x00004B49,
KDGKBDIACR=0x00004B4A,
KDSKBDIACR=0x00004B4B,
KDGETKEYCODE=0x00004B4C,
KDSETKEYCODE=0x00004B4D,
KDSIGACCEPT=0x00004B4E,
LPCHAR=0x00000601,
LPTIME=0x00000602,
LPABORT=0x00000604,
LPSETIRQ=0x00000605,
LPGETIRQ=0x00000606,
LPWAIT=0x00000608,
LPCAREFUL=0x00000609,
LPABORTOPEN=0x0000060A,
LPGETSTATUS=0x0000060B,
LPRESET=0x0000060C,
LPGETSTATS=0x0000060D,
SIOCGETVIFCNT=0x000089E0,
SIOCGETSGCNT=0x000089E1,
MTIOCTOP=0x40086D01,
MTIOCGET=0x801C6D02,
MTIOCPOS=0x80046D03,
MTIOCGETCONFIG=0x80206D04,
MTIOCSETCONFIG=0x40206D05,
SIOCNRGETPARMS=0x000089E0,
SIOCNRSETPARMS=0x000089E1,
SIOCNRDECOBS=0x000089E2,
SIOCNRRTCTL=0x000089E3,
DDIOCSDBG=0x00009000,
CDROMAUDIOBUFSIZ=0x00005382,
TIOCSCCINI=0x00005470,
TIOCCHANINI=0x00005471,
TIOCGKISS=0x00005472,
TIOCSKISS=0x00005473,
TIOCSCCSTAT=0x00005474,
SCSI_IOCTL_GET_IDLUN=0x00005382,
SCSI_IOCTL_TAGGED_ENABLE=0x00005383,
SCSI_IOCTL_TAGGED_DISABLE=0x00005384,
SCSI_IOCTL_PROBE_HOST=0x00005385,
SMB_IOC_GETMOUNTUID=0x80027501,
SIOCADDRT=0x0000890B,
SIOCDELRT=0x0000890C,
SIOCGIFNAME=0x00008910,
SIOCSIFLINK=0x00008911,
SIOCGIFCONF=0x00008912,
SIOCGIFFLAGS=0x00008913,
SIOCSIFFLAGS=0x00008914,
SIOCGIFADDR=0x00008915,
SIOCSIFADDR=0x00008916,
SIOCGIFDSTADDR=0x00008917,
SIOCSIFDSTADDR=0x00008918,
SIOCGIFBRDADDR=0x00008919,
SIOCSIFBRDADDR=0x0000891A,
SIOCGIFNETMASK=0x0000891B,
SIOCSIFNETMASK=0x0000891C,
SIOCGIFMETRIC=0x0000891D,
SIOCSIFMETRIC=0x0000891E,
SIOCGIFMEM=0x0000891F,
SIOCSIFMEM=0x00008920,
SIOCGIFMTU=0x00008921,
SIOCSIFMTU=0x00008922,
OLD_SIOCGIFHWADDR=0x00008923,
SIOCSIFHWADDR=0x00008924,
SIOCGIFENCAP=0x00008925,
SIOCSIFENCAP=0x00008926,
SIOCGIFHWADDR=0x00008927,
SIOCGIFSLAVE=0x00008929,
SIOCSIFSLAVE=0x00008930,
SIOCADDMULTI=0x00008931,
SIOCDELMULTI=0x00008932,
SIOCADDRTOLD=0x00008940,
SIOCDELRTOLD=0x00008941,
SIOCDARP=0x00008950,
SIOCGARP=0x00008951,
SIOCSARP=0x00008952,
SIOCDRARP=0x00008960,
SIOCGRARP=0x00008961,
SIOCSRARP=0x00008962,
SIOCGIFMAP=0x00008970,
SIOCSIFMAP=0x00008971,
SNDCTL_SEQ_RESET=0x00005100,
SNDCTL_SEQ_SYNC=0x00005101,
SNDCTL_SYNTH_INFO=0xC08C5102,
SNDCTL_SEQ_CTRLRATE=0xC0045103,
SNDCTL_SEQ_GETOUTCOUNT=0x80045104,
SNDCTL_SEQ_GETINCOUNT=0x80045105,
SNDCTL_SEQ_PERCMODE=0x40045106,
SNDCTL_FM_LOAD_INSTR=0x40285107,
SNDCTL_SEQ_TESTMIDI=0x40045108,
SNDCTL_SEQ_RESETSAMPLES=0x40045109,
SNDCTL_SEQ_NRSYNTHS=0x8004510A,
SNDCTL_SEQ_NRMIDIS=0x8004510B,
SNDCTL_MIDI_INFO=0xC074510C,
SNDCTL_SEQ_THRESHOLD=0x4004510D,
SNDCTL_SYNTH_MEMAVL=0xC004510E,
SNDCTL_FM_4OP_ENABLE=0x4004510F,
SNDCTL_PMGR_ACCESS=0xCFB85110,
SNDCTL_SEQ_PANIC=0x00005111,
SNDCTL_SEQ_OUTOFBAND=0x40085112,
SNDCTL_TMR_TIMEBASE=0xC0045401,
SNDCTL_TMR_START=0x00005402,
SNDCTL_TMR_STOP=0x00005403,
SNDCTL_TMR_CONTINUE=0x00005404,
SNDCTL_TMR_TEMPO=0xC0045405,
SNDCTL_TMR_SOURCE=0xC0045406,
SNDCTL_TMR_METRONOME=0x40045407,
SNDCTL_TMR_SELECT=0x40045408,
SNDCTL_PMGR_IFACE=0xCFB85001,
SNDCTL_MIDI_PRETIME=0xC0046D00,
SNDCTL_MIDI_MPUMODE=0xC0046D01,
SNDCTL_MIDI_MPUCMD=0xC0216D02,
SNDCTL_DSP_RESET=0x00005000,
SNDCTL_DSP_SYNC=0x00005001,
SNDCTL_DSP_SPEED=0xC0045002,
SNDCTL_DSP_STEREO=0xC0045003,
SNDCTL_DSP_GETBLKSIZE=0xC0045004,
SOUND_PCM_WRITE_CHANNELS=0xC0045006,
SOUND_PCM_WRITE_FILTER=0xC0045007,
SNDCTL_DSP_POST=0x00005008,
SNDCTL_DSP_SUBDIVIDE=0xC0045009,
SNDCTL_DSP_SETFRAGMENT=0xC004500A,
SNDCTL_DSP_GETFMTS=0x8004500B,
SNDCTL_DSP_SETFMT=0xC0045005,
SNDCTL_DSP_GETOSPACE=0x800C500C,
SNDCTL_DSP_GETISPACE=0x800C500D,
SNDCTL_DSP_NONBLOCK=0x0000500E,
SOUND_PCM_READ_RATE=0x80045002,
SOUND_PCM_READ_CHANNELS=0x80045006,
SOUND_PCM_READ_BITS=0x80045005,
SOUND_PCM_READ_FILTER=0x80045007,
SNDCTL_COPR_RESET=0x00004300,
SNDCTL_COPR_LOAD=0xCFB04301,
SNDCTL_COPR_RDATA=0xC0144302,
SNDCTL_COPR_RCODE=0xC0144303,
SNDCTL_COPR_WDATA=0x40144304,
SNDCTL_COPR_WCODE=0x40144305,
SNDCTL_COPR_RUN=0xC0144306,
SNDCTL_COPR_HALT=0xC0144307,
SNDCTL_COPR_SENDMSG=0x4FA44308,
SNDCTL_COPR_RCVMSG=0x8FA44309,
SOUND_MIXER_READ_VOLUME=0x80044D00,
SOUND_MIXER_READ_BASS=0x80044D01,
SOUND_MIXER_READ_TREBLE=0x80044D02,
SOUND_MIXER_READ_SYNTH=0x80044D03,
SOUND_MIXER_READ_PCM=0x80044D04,
SOUND_MIXER_READ_SPEAKER=0x80044D05,
SOUND_MIXER_READ_LINE=0x80044D06,
SOUND_MIXER_READ_MIC=0x80044D07,
SOUND_MIXER_READ_CD=0x80044D08,
SOUND_MIXER_READ_IMIX=0x80044D09,
SOUND_MIXER_READ_ALTPCM=0x80044D0A,
SOUND_MIXER_READ_RECLEV=0x80044D0B,
SOUND_MIXER_READ_IGAIN=0x80044D0C,
SOUND_MIXER_READ_OGAIN=0x80044D0D,
SOUND_MIXER_READ_LINE1=0x80044D0E,
SOUND_MIXER_READ_LINE2=0x80044D0F,
SOUND_MIXER_READ_LINE3=0x80044D10,
SOUND_MIXER_READ_MUTE=0x80044D1C,
SOUND_MIXER_READ_ENHANCE=0x80044D1D,
SOUND_MIXER_READ_LOUD=0x80044D1E,
SOUND_MIXER_READ_RECSRC=0x80044DFF,
SOUND_MIXER_READ_DEVMASK=0x80044DFE,
SOUND_MIXER_READ_RECMASK=0x80044DFD,
SOUND_MIXER_READ_STEREODEVS=0x80044DFB,
SOUND_MIXER_READ_CAPS=0x80044DFC,
SOUND_MIXER_WRITE_VOLUME=0xC0044D00,
SOUND_MIXER_WRITE_BASS=0xC0044D01,
SOUND_MIXER_WRITE_TREBLE=0xC0044D02,
SOUND_MIXER_WRITE_SYNTH=0xC0044D03,
SOUND_MIXER_WRITE_PCM=0xC0044D04,
SOUND_MIXER_WRITE_SPEAKER=0xC0044D05,
SOUND_MIXER_WRITE_LINE=0xC0044D06,
SOUND_MIXER_WRITE_MIC=0xC0044D07,
SOUND_MIXER_WRITE_CD=0xC0044D08,
SOUND_MIXER_WRITE_IMIX=0xC0044D09,
SOUND_MIXER_WRITE_ALTPCM=0xC0044D0A,
SOUND_MIXER_WRITE_RECLEV=0xC0044D0B,
SOUND_MIXER_WRITE_IGAIN=0xC0044D0C,
SOUND_MIXER_WRITE_OGAIN=0xC0044D0D,
SOUND_MIXER_WRITE_LINE1=0xC0044D0E,
SOUND_MIXER_WRITE_LINE2=0xC0044D0F,
SOUND_MIXER_WRITE_LINE3=0xC0044D10,
SOUND_MIXER_WRITE_MUTE=0xC0044D1C,
SOUND_MIXER_WRITE_ENHANCE=0xC0044D1D,
SOUND_MIXER_WRITE_LOUD=0xC0044D1E,
SOUND_MIXER_WRITE_RECSRC=0xC0044DFF,
UMSDOS_READDIR_DOS=0x000004D2,
UMSDOS_UNLINK_DOS=0x000004D3,
UMSDOS_RMDIR_DOS=0x000004D4,
UMSDOS_STAT_DOS=0x000004D5,
UMSDOS_CREAT_EMD=0x000004D6,
UMSDOS_UNLINK_EMD=0x000004D7,
UMSDOS_READDIR_EMD=0x000004D8,
UMSDOS_GETVERSION=0x000004D9,
UMSDOS_INIT_EMD=0x000004DA,
UMSDOS_DOS_SETUP=0x000004DB,
UMSDOS_RENAME_DOS=0x000004DC,
VT_OPENQRY=0x00005600,
VT_GETMODE=0x00005601,
VT_SETMODE=0x00005602,
VT_GETSTATE=0x00005603,
VT_SENDSIG=0x00005604,
VT_RELDISP=0x00005605,
VT_ACTIVATE=0x00005606,
VT_WAITACTIVE=0x00005607,
VT_DISALLOCATE=0x00005608,
VT_RESIZE=0x00005609,
VT_RESIZEX=0x0000560A,
};

/* error numbers */
enum {
	EPERM=1,
	ENOENT=2,
	ESRCH=3,
	EINTR=4,
	EIO=5,
	ENXIO=6,
	E2BIG=7,
	ENOEXEC=8,
	EBADF=9,
	ECHILD=10,
	EAGAIN=11,
	ENOMEM=12,
	EACCES=13,
	EFAULT=14,
	ENOTBLK=15,
	EBUSY=16,
	EEXIST=17,
	EXDEV=18,
	ENODEV=19,
	ENOTDIR=20,
	EISDIR=21,
	EINVAL=22,
	ENFILE=23,
	EMFILE=24,
	ENOTTY=25,
	ETXTBSY=26,
	EFBIG=27,
	ENOSPC=28,
	ESPIPE=29,
	EROFS=30,
	EMLINK=31,
	EPIPE=32,
	EDOM=33,
	ERANGE=34,
	EDEADLK=35,
	ENAMETOOLONG=36,
	ENOLCK=37,
	ENOSYS=38,
	ENOTEMPTY=39,
	ELOOP=40,
	ENOMSG=42,
	EIDRM=43,
	ECHRNG=44,
	EL2NSYNC=45,
	EL3HLT=46,
	EL3RST=47,
	ELNRNG=48,
	EUNATCH=49,
	ENOCSI=50,
	EL2HLT=51,
	EBADE=52,
	EBADR=53,
	EXFULL=54,
	ENOANO=55,
	EBADRQC=56,
	EBADSLT=57,
	EBFONT=59,
	ENOSTR=60,
	ENODATA=61,
	ETIME=62,
	ENOSR=63,
	ENONET=64,
	ENOPKG=65,
	EREMOTE=66,
	ENOLINK=67,
	EADV=68,
	ESRMNT=69,
	ECOMM=70,
	EPROTO=71,
	EMULTIHOP=72,
	EDOTDOT=73,
	EBADMSG=74,
	EOVERFLOW=75,
	ENOTUNIQ=76,
	EBADFD=77,
	EREMCHG=78,
	ELIBACC=79,
	ELIBBAD=80,
	ELIBSCN=81,
	ELIBMAX=82,
	ELIBEXEC=83,
	EILSEQ=84,
	ERESTART=85,
	ESTRPIPE=86,
	EUSERS=87,
	ENOTSOCK=88,
	EDESTADDRREQ=89,
	EMSGSIZE=90,
	EPROTOTYPE=91,
	ENOPROTOOPT=92,
	EPROTONOSUPPORT=93,
	ESOCKTNOSUPPORT=94,
	EOPNOTSUPP=95,
	EPFNOSUPPORT=96,
	EAFNOSUPPORT=97,
	EADDRINUSE=98,
	EADDRNOTAVAIL=99,
	ENETDOWN=100,
	ENETUNREACH=101,
	ENETRESET=102,
	ECONNABORTED=103,
	ECONNRESET=104,
	ENOBUFS=105,
	EISCONN=106,
	ENOTCONN=107,
	ESHUTDOWN=108,
	ETOOMANYREFS=109,
	ETIMEDOUT=110,
	ECONNREFUSED=111,
	EHOSTDOWN=112,
	EHOSTUNREACH=113,
	EALREADY=114,
	EINPROGRESS=115,
	ESTALE=116,
	EUCLEAN=117,
	ENOTNAM=118,
	ENAVAIL=119,
	EISNAM=120,
	EREMOTEIO=121,
	EDQUOT=122,
	ENOMEDIUM=123,
	EMEDIUMTYPE=124,
};

#define	EWOULDBLOCK	EAGAIN
#define	EDEADLOCK		EDEADLK
#define	ENOATTR			ENODATA

/* signals */
enum{
	NSIG			= 32,

	SIGHUP		= 1,
	SIGINT		= 2,
	SIGQUIT		= 3,
	SIGILL		= 4,
	SIGTRAP		= 5,
	SIGABRT		= 6,
	SIGIOT		= 6,
	SIGBUS		= 7,
	SIGFPE		= 8,
	SIGKILL		= 9,
	SIGUSR1		= 10,
	SIGSEGV		= 11,
	SIGUSR2		= 12,
	SIGPIPE		= 13,
	SIGALRM		= 14,
	SIGTERM		= 15,
	SIGSTKFLT	= 16,
	SIGCHLD		= 17,
	SIGCONT		= 18,
	SIGSTOP		= 19,
	SIGTSTP		= 20,
	SIGTTIN		= 21,
	SIGTTOU		= 22,
	SIGURG		= 23,
	SIGXCPU		= 24,
	SIGXFSZ		= 25,
	SIGVTALRM	= 26,
	SIGPROF		= 27,
	SIGWINCH	= 28,
	SIGIO		= 29,
	SIGPOLL		= 29,
	SIGLOST		= 29,
	SIGPWR		= 30,
	SIGSYS		= 31,
	SIGUNUSED	= 31,

	SIGRT1		= 32,
	SIGRT2		= 33,
	SIGRT3		= 34,
	SIGRT4		= 35,
	SIGRT5		= 36,
	SIGRT6		= 37,
	SIGRT7		= 38,
	SIGRT8		= 39,
};

/* signalflags */
enum {
	SA_NOCLDSTOP	= 0x00000001,
	SA_NOCLDWAIT	= 0x00000002,
	SA_SIGINFO		= 0x00000004,
	SA_ONSTACK		= 0x08000000,
	SA_RESTART		= 0x10000000,
	SA_NODEFER		= 0x40000000,
	SA_RESETHAND	= 0x80000000,
 	SA_NOMASK		= 0x40000000,
	SA_ONESHOT		= 0x80000000,
	SA_INTERRUPT		= 0x20000000, /* dummy -- ignored */
	SA_RESTORER		= 0x04000000,
};

/* wait */
enum {
	WNOHANG	=0x00000001,
	WUNTRACES	=0x00000002,
	WSTOPPED	=0x00000002,
	WEXITED		=0x00000004,
	WCONTINUES	=0x00000008,
	WNOWAIT	=0x01000000,
	WNOTHREAD	=0x20000000,
	WALL		=0x40000000,
	WCLONE		=0x80000000,

	P_ALL		=0,
	P_PID		=1,
	P_PGID		=2,
};

/* mmap */
enum {
	PROT_READ		= 0x01,
	PROT_WRITE		= 0x02,
	PROT_EXEC		= 0x04,
	PROT_SEM		= 0x08,
	PROT_NONE		= 0x00,
	PROT_GROWSDOWN	= 0x01000000,
	PROT_GROWSUP	= 0x02000000,
	MAP_SHARED		= 0x01,
	MAP_PRIVATE		= 0x02,
	MAP_TYPE		= 0x0f,
	MAP_FIXED		= 0x10,
	MAP_ANONYMOUS	= 0x20,
};

/* shutdown */
enum
{
	SHUT_RD			= 0,
	SHUT_WR,
	SHUT_RDWR,
};

/* [e]poll */
enum
{
	EPOLL_CTL_ADD	= 1,
	EPOLL_CTL_DEL	= 2,
	EPOLL_CTL_MOD	= 3,

	POLLIN			= (1<<0),
	POLLPRI			= (1<<1),
	POLLOUT			= (1<<2),
	POLLERR			= (1<<3),
	POLLHUP			= (1<<4),
	POLLNVAL		= (1<<5),
	POLLRDNORM		= (1<<6),
	POLLRDBAND		= (1<<7),
	POLLWRNORM		= (1<<8),
	POLLWRBAND		= (1<<9),
	POLLMSG			= (1<<10),
	POLLREMOVE		= (1<<11),
	POLLRDHUP		= 0x2000,
	EPOLLONESHOT	= (1<<30),
	EPOLLET			= (1<<31),
};

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.