authorgravatar for semarie@online.frSébastien Marie <semarie@online.fr> 2021-05-21 08:42:19+00:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-22 20:52:44-04:00
logceacb7d247950010bf42eb1390229c6fb808f949
tree465df0df0d4455f995b91863d08f732c55654164
parentb2126d33459a188272c23f2846894242a8c80e10

openbsd: complete kqueue(2) constant definitions


1 files changed, 17 insertions(+), 54 deletions(-)

lib/std/os/bits/openbsd.zig+17-54
...@@ -549,93 +549,56 @@ pub const DT_LNK = 10;...@@ -549,93 +549,56 @@ pub const DT_LNK = 10;
549pub const DT_SOCK = 12;549pub const DT_SOCK = 12;
550pub const DT_WHT = 14; // XXX550pub const DT_WHT = 14; // XXX
551551
552/// add event to kq (implies enable)
553pub const EV_ADD = 0x0001;552pub const EV_ADD = 0x0001;
554
555/// delete event from kq
556pub const EV_DELETE = 0x0002;553pub const EV_DELETE = 0x0002;
557
558/// enable event
559pub const EV_ENABLE = 0x0004;554pub const EV_ENABLE = 0x0004;
560
561/// disable event (not reported)
562pub const EV_DISABLE = 0x0008;555pub const EV_DISABLE = 0x0008;
563
564/// only report one occurrence
565pub const EV_ONESHOT = 0x0010;556pub const EV_ONESHOT = 0x0010;
566
567/// clear event state after reporting
568pub const EV_CLEAR = 0x0020;557pub const EV_CLEAR = 0x0020;
569
570/// force immediate event output
571/// ... with or without EV_ERROR
572/// ... use KEVENT_FLAG_ERROR_EVENTS
573/// on syscalls supporting flags
574pub const EV_RECEIPT = 0x0040;558pub const EV_RECEIPT = 0x0040;
575
576/// disable event after reporting
577pub const EV_DISPATCH = 0x0080;559pub const EV_DISPATCH = 0x0080;
560pub const EV_FLAG1 = 0x2000;
561pub const EV_ERROR = 0x4000;
562pub const EV_EOF = 0x8000;
578563
579pub const EVFILT_READ = -1;564pub const EVFILT_READ = -1;
580pub const EVFILT_WRITE = -2;565pub const EVFILT_WRITE = -2;
581
582/// attached to aio requests
583pub const EVFILT_AIO = -3;566pub const EVFILT_AIO = -3;
584
585/// attached to vnodes
586pub const EVFILT_VNODE = -4;567pub const EVFILT_VNODE = -4;
587
588/// attached to struct proc
589pub const EVFILT_PROC = -5;568pub const EVFILT_PROC = -5;
590
591/// attached to struct proc
592pub const EVFILT_SIGNAL = -6;569pub const EVFILT_SIGNAL = -6;
593
594/// timers
595pub const EVFILT_TIMER = -7;570pub const EVFILT_TIMER = -7;
571pub const EVFILT_EXCEPT = -9;
596572
597/// devices573// data/hint flags for EVFILT_{READ|WRITE}
598pub const EVFILT_DEVICE = -8;
599
600/// low water mark
601pub const NOTE_LOWAT = 0x0001;574pub const NOTE_LOWAT = 0x0001;
602
603/// return on EOF
604pub const NOTE_EOF = 0x0002;575pub const NOTE_EOF = 0x0002;
605576
606/// vnode was removed577// data/hint flags for EVFILT_EXCEPT and EVFILT_{READ|WRITE}
607pub const NOTE_DELETE = 0x0001;578pub const NOTE_OOB = 0x0004;
608579
609/// data contents changed580// data/hint flags for EVFILT_VNODE
581pub const NOTE_DELETE = 0x0001;
610pub const NOTE_WRITE = 0x0002;582pub const NOTE_WRITE = 0x0002;
611
612/// size increased
613pub const NOTE_EXTEND = 0x0004;583pub const NOTE_EXTEND = 0x0004;
614
615/// attributes changed
616pub const NOTE_ATTRIB = 0x0008;584pub const NOTE_ATTRIB = 0x0008;
617
618/// link count changed
619pub const NOTE_LINK = 0x0010;585pub const NOTE_LINK = 0x0010;
620
621/// vnode was renamed
622pub const NOTE_RENAME = 0x0020;586pub const NOTE_RENAME = 0x0020;
623
624/// vnode access was revoked
625pub const NOTE_REVOKE = 0x0040;587pub const NOTE_REVOKE = 0x0040;
588pub const NOTE_TRUNCATE = 0x0080;
626589
627/// process exited590// data/hint flags for EVFILT_PROC
628pub const NOTE_EXIT = 0x80000000;591pub const NOTE_EXIT = 0x80000000;
629
630/// process forked
631pub const NOTE_FORK = 0x40000000;592pub const NOTE_FORK = 0x40000000;
632
633/// process exec'd
634pub const NOTE_EXEC = 0x20000000;593pub const NOTE_EXEC = 0x20000000;
635
636/// mask for signal & exit status
637pub const NOTE_PDATAMASK = 0x000fffff;594pub const NOTE_PDATAMASK = 0x000fffff;
638pub const NOTE_PCTRLMASK = 0xf0000000;595pub const NOTE_PCTRLMASK = 0xf0000000;
596pub const NOTE_TRACK = 0x00000001;
597pub const NOTE_TRACKERR = 0x00000002;
598pub const NOTE_CHILD = 0x00000004;
599
600// data/hint flags for EVFILT_DEVICE
601pub const NOTE_CHANGE = 0x00000001;
639602
640pub const TIOCCBRK = 0x2000747a;603pub const TIOCCBRK = 0x2000747a;
641pub const TIOCCDTR = 0x20007478;604pub const TIOCCDTR = 0x20007478;