diff options
Diffstat (limited to 'src/sys/event.rs')
-rw-r--r-- | src/sys/event.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sys/event.rs b/src/sys/event.rs index d44963db..47d18389 100644 --- a/src/sys/event.rs +++ b/src/sys/event.rs @@ -191,6 +191,15 @@ pub fn kqueue() -> Result<RawFd> { Errno::result(res) } + +/* + * KEvent can't derive Send because on some operating systems, udata is defined + * as a void*. However, KEvent's public API always treats udata as a uintptr_t, + * which is safe to Send. + */ +unsafe impl Send for KEvent { +} + impl KEvent { pub fn new(ident: uintptr_t, filter: EventFilter, flags: EventFlag, fflags:FilterFlag, data: intptr_t, udata: uintptr_t) -> KEvent { |