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