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;
549549pub const DT_SOCK = 12;
550550pub const DT_WHT = 14; // XXX
551551
552/// add event to kq (implies enable)
553552pub const EV_ADD = 0x0001;
554
555/// delete event from kq
556553pub const EV_DELETE = 0x0002;
557
558/// enable event
559554pub const EV_ENABLE = 0x0004;
560
561/// disable event (not reported)
562555pub const EV_DISABLE = 0x0008;
563
564/// only report one occurrence
565556pub const EV_ONESHOT = 0x0010;
566
567/// clear event state after reporting
568557pub 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
574558pub const EV_RECEIPT = 0x0040;
575
576/// disable event after reporting
577559pub const EV_DISPATCH = 0x0080;
560pub const EV_FLAG1 = 0x2000;
561pub const EV_ERROR = 0x4000;
562pub const EV_EOF = 0x8000;
578563
579564pub const EVFILT_READ = -1;
580565pub const EVFILT_WRITE = -2;
581
582/// attached to aio requests
583566pub const EVFILT_AIO = -3;
584
585/// attached to vnodes
586567pub const EVFILT_VNODE = -4;
587
588/// attached to struct proc
589568pub const EVFILT_PROC = -5;
590
591/// attached to struct proc
592569pub const EVFILT_SIGNAL = -6;
593
594/// timers
595570pub const EVFILT_TIMER = -7;
571pub const EVFILT_EXCEPT = -9;
596572
597/// devices
598pub const EVFILT_DEVICE = -8;
599
600/// low water mark
573// data/hint flags for EVFILT_{READ|WRITE}
601574pub const NOTE_LOWAT = 0x0001;
602
603/// return on EOF
604575pub const NOTE_EOF = 0x0002;
605576
606/// vnode was removed
607pub const NOTE_DELETE = 0x0001;
577// data/hint flags for EVFILT_EXCEPT and EVFILT_{READ|WRITE}
578pub const NOTE_OOB = 0x0004;
608579
609/// data contents changed
580// data/hint flags for EVFILT_VNODE
581pub const NOTE_DELETE = 0x0001;
610582pub const NOTE_WRITE = 0x0002;
611
612/// size increased
613583pub const NOTE_EXTEND = 0x0004;
614
615/// attributes changed
616584pub const NOTE_ATTRIB = 0x0008;
617
618/// link count changed
619585pub const NOTE_LINK = 0x0010;
620
621/// vnode was renamed
622586pub const NOTE_RENAME = 0x0020;
623
624/// vnode access was revoked
625587pub const NOTE_REVOKE = 0x0040;
588pub const NOTE_TRUNCATE = 0x0080;
626589
627/// process exited
590// data/hint flags for EVFILT_PROC
628591pub const NOTE_EXIT = 0x80000000;
629
630/// process forked
631592pub const NOTE_FORK = 0x40000000;
632
633/// process exec'd
634593pub const NOTE_EXEC = 0x20000000;
635
636/// mask for signal & exit status
637594pub const NOTE_PDATAMASK = 0x000fffff;
638595pub 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
640603pub const TIOCCBRK = 0x2000747a;
641604pub const TIOCCDTR = 0x20007478;