BSD syscall#374
svc · unix #374
kevent_qos
kevent variant carrying QoS class and override information per event.
Prototype
int kevent_qos(int fd, const struct kevent_qos_s *changelist, int nchanges, struct kevent_qos_s *eventlist, int nevents, void *data_out, size_t *data_available, unsigned int flags);Returns: int
Arguments
| Name | Type | Dir | Description |
|---|---|---|---|
| fd | int | - | |
| changelist | const struct kevent_qos_s | - | |
| nchanges | int | - | |
| eventlist | struct kevent_qos_s | - | |
| nevents | int | - | |
| data_out | void | - | |
| data_available | size_t | - | |
| flags | unsigned int | - |
Version history
| XNU tag | macOS | # |
|---|---|---|
| xnu-3247.1.106 | macOS 10.11 El Capitan | 374 |
| xnu-3789.1.32 | macOS 10.12 Sierra | 374 |
| xnu-4570.1.46 | macOS 10.13 High Sierra | 374 |
| xnu-4903.221.2 | macOS 10.14 Mojave | 374 |
| xnu-6153.11.26 | macOS 10.15 Catalina | 374 |
| xnu-7195.50.7.100.1 | macOS 11.0 Big Sur | 374 |
| xnu-8019.41.5 | macOS 12.0 Monterey | 374 |
| xnu-8792.41.9 | macOS 13.0 Ventura | 374 |
| xnu-10002.1.13 | macOS 14.0 Sonoma | 374 |
| xnu-11215.1.10 | macOS 15.0 Sequoia | 374 |
| xnu-11417.101.15 | macOS 15.4 Sequoia | 374 |
| xnu-12377.1.9 | macOS 26.0 Tahoe | 374 |
| xnu-10002.41.9 | — | 374 |
| xnu-10002.61.3 | — | 374 |
| xnu-10002.81.5 | — | 374 |
| xnu-10063.101.15 | — | 374 |
| xnu-10063.121.3 | — | 374 |
| xnu-10063.141.1 | — | 374 |
| xnu-11215.41.3 | — | 374 |
| xnu-11215.61.5 | — | 374 |
| xnu-11215.81.4 | — | 374 |
| xnu-11417.121.6 | — | 374 |
| xnu-11417.140.69 | — | 374 |
| xnu-12377.101.15 | — | 374 |
| xnu-12377.41.6 | — | 374 |
| xnu-12377.61.12 | — | 374 |
| xnu-12377.81.4 | — | 374 |
| xnu-3247.10.11 | — | 374 |
| xnu-3248.20.55 | — | 374 |
| xnu-3248.30.4 | — | 374 |
| xnu-3248.40.184 | — | 374 |
| xnu-3248.50.21 | — | 374 |
| xnu-3248.60.10 | — | 374 |
| xnu-3789.21.4 | — | 374 |
| xnu-3789.31.2 | — | 374 |
| xnu-3789.41.3 | — | 374 |
| xnu-3789.51.2 | — | 374 |
| xnu-3789.60.24 | — | 374 |
| xnu-3789.70.16 | — | 374 |
| xnu-4570.20.62 | — | 374 |
| xnu-4570.31.3 | — | 374 |
| xnu-4570.41.2 | — | 374 |
| xnu-4570.51.1 | — | 374 |
| xnu-4570.61.1 | — | 374 |
| xnu-4570.71.2 | — | 374 |
| xnu-4903.231.4 | — | 374 |
| xnu-4903.241.1 | — | 374 |
| xnu-4903.270.47 | — | 374 |
| xnu-6153.101.6 | — | 374 |
| xnu-6153.121.1 | — | 374 |
| xnu-6153.141.1 | — | 374 |
| xnu-6153.41.3 | — | 374 |
| xnu-6153.61.1 | — | 374 |
| xnu-6153.81.5 | — | 374 |
| xnu-7195.101.1 | — | 374 |
| xnu-7195.121.3 | — | 374 |
| xnu-7195.141.2 | — | 374 |
| xnu-7195.60.75 | — | 374 |
| xnu-7195.81.3 | — | 374 |
| xnu-8019.61.5 | — | 374 |
| xnu-8019.80.24 | — | 374 |
| xnu-8020.101.4 | — | 374 |
| xnu-8020.121.3 | — | 374 |
| xnu-8020.140.41 | — | 374 |
| xnu-8792.61.2 | — | 374 |
| xnu-8792.81.2 | — | 374 |
| xnu-8796.101.5 | — | 374 |
| xnu-8796.121.2 | — | 374 |
| xnu-8796.141.3 | — | 374 |
Notes
kevent_qos is the modern path used by libdispatch and Foundation runloops since macOS 10.12. The extra qos argument lets the kernel promote the worker thread serving the event to the appropriate QoS class, which is essential for energy efficiency and priority inheritance. The struct kevent_qos_s replaces kevent64_s with explicit QoS and ext-buffer fields.
Detection
Dominant variant in modern process traces; absence of kevent_qos in a long-running daemon suggests hand-rolled event loops worth investigating. DTrace kevent::: applies.
Related APIs
keventkevent64kevent_idkqueuedispatch_source_create