Skip to content

Commit

Permalink
impl Send for KEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
asomers committed Oct 24, 2016
1 parent 001fecb commit f9b178b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/sys/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f9b178b

Please sign in to comment.