Mach trap#-90
svc · mach trap -90
mk_timer_create
Allocate a kernel timer object that fires by sending a message to a Mach port.
Prototype
kern_return_t mk_timer_create(/* 0 args */);Returns: kern_return_t
Version history
| XNU tag | macOS | # |
|---|---|---|
| xnu-123.5 | macOS 10.0 Cheetah | -90 |
| xnu-201 | macOS 10.1 Puma | -90 |
| xnu-344 | macOS 10.2 Jaguar | -90 |
| xnu-517 | macOS 10.3 Panther | -90 |
| xnu-124.1 | — | -90 |
| xnu-124.13 | — | -90 |
| xnu-124.7 | — | -90 |
| xnu-201.14 | — | -90 |
| xnu-201.19 | — | -90 |
| xnu-201.19.3 | — | -90 |
| xnu-201.42.3 | — | -90 |
| xnu-201.5 | — | -90 |
| xnu-344.12.2 | — | -90 |
| xnu-344.2 | — | -90 |
| xnu-344.21.73 | — | -90 |
| xnu-344.21.74 | — | -90 |
| xnu-344.23 | — | -90 |
| xnu-344.26 | — | -90 |
| xnu-344.32 | — | -90 |
| xnu-344.34 | — | -90 |
| xnu-344.49 | — | -90 |
| xnu-517.11.1 | — | -90 |
| xnu-517.12.7 | — | -90 |
| xnu-517.3.15 | — | -90 |
| xnu-517.3.7 | — | -90 |
| xnu-517.7.21 | — | -90 |
| xnu-517.7.7 | — | -90 |
| xnu-517.9.4 | — | -90 |
| xnu-517.9.5 | — | -90 |
Notes
mk_timer_create returns a fresh receive-right port that the kernel will post an empty mach_msg_header_t to whenever the associated timer fires. This is the primitive that CFRunLoopTimer, NSTimer, and dispatch_source_t timers are built on top of. Each timer port is single-shot per arming and must be re-armed via mk_timer_arm after each fire.
Related APIs
mk_timer_create_trapmk_timer_armmk_timer_cancelmk_timer_destroydispatch_source_create