1 use sys::*; 2 3 bitflags! { 4 /// Signals that can be waited upon. 5 /// 6 /// See 7 /// [Objects and signals](https://fuchsia.googlesource.com/zircon/+/master/docs/concepts.md#Objects-and-Signals) 8 /// in the Zircon kernel documentation. Note: the names of signals are still in flux. 9 #[repr(C)] 10 pub struct Signals: zx_signals_t { 11 const NONE = ZX_SIGNAL_NONE; 12 const OBJECT_ALL = ZX_OBJECT_SIGNAL_ALL; 13 const USER_ALL = ZX_USER_SIGNAL_ALL; 14 const OBJECT_0 = ZX_OBJECT_SIGNAL_0; 15 const OBJECT_1 = ZX_OBJECT_SIGNAL_1; 16 const OBJECT_2 = ZX_OBJECT_SIGNAL_2; 17 const OBJECT_3 = ZX_OBJECT_SIGNAL_3; 18 const OBJECT_4 = ZX_OBJECT_SIGNAL_4; 19 const OBJECT_5 = ZX_OBJECT_SIGNAL_5; 20 const OBJECT_6 = ZX_OBJECT_SIGNAL_6; 21 const OBJECT_7 = ZX_OBJECT_SIGNAL_7; 22 const OBJECT_8 = ZX_OBJECT_SIGNAL_8; 23 const OBJECT_9 = ZX_OBJECT_SIGNAL_9; 24 const OBJECT_10 = ZX_OBJECT_SIGNAL_10; 25 const OBJECT_11 = ZX_OBJECT_SIGNAL_11; 26 const OBJECT_12 = ZX_OBJECT_SIGNAL_12; 27 const OBJECT_13 = ZX_OBJECT_SIGNAL_13; 28 const OBJECT_14 = ZX_OBJECT_SIGNAL_14; 29 const OBJECT_15 = ZX_OBJECT_SIGNAL_15; 30 const OBJECT_16 = ZX_OBJECT_SIGNAL_16; 31 const OBJECT_17 = ZX_OBJECT_SIGNAL_17; 32 const OBJECT_18 = ZX_OBJECT_SIGNAL_18; 33 const OBJECT_19 = ZX_OBJECT_SIGNAL_19; 34 const OBJECT_20 = ZX_OBJECT_SIGNAL_20; 35 const OBJECT_21 = ZX_OBJECT_SIGNAL_21; 36 const OBJECT_22 = ZX_OBJECT_SIGNAL_22; 37 const OBJECT_HANDLE_CLOSED = ZX_OBJECT_HANDLE_CLOSED; 38 const USER_0 = ZX_USER_SIGNAL_0; 39 const USER_1 = ZX_USER_SIGNAL_1; 40 const USER_2 = ZX_USER_SIGNAL_2; 41 const USER_3 = ZX_USER_SIGNAL_3; 42 const USER_4 = ZX_USER_SIGNAL_4; 43 const USER_5 = ZX_USER_SIGNAL_5; 44 const USER_6 = ZX_USER_SIGNAL_6; 45 const USER_7 = ZX_USER_SIGNAL_7; 46 47 const OBJECT_READABLE = ZX_OBJECT_READABLE; 48 const OBJECT_WRITABLE = ZX_OBJECT_WRITABLE; 49 const OBJECT_PEER_CLOSED = ZX_OBJECT_PEER_CLOSED; 50 51 // Cancelation (handle was closed while waiting with it) 52 const HANDLE_CLOSED = ZX_SIGNAL_HANDLE_CLOSED; 53 54 // Event 55 const EVENT_SIGNALED = ZX_EVENT_SIGNALED; 56 57 // EventPair 58 const EVENT_PAIR_SIGNALED = ZX_EPAIR_SIGNALED; 59 const EVENT_PAIR_CLOSED = ZX_EPAIR_CLOSED; 60 61 // Task signals (process, thread, job) 62 const TASK_TERMINATED = ZX_TASK_TERMINATED; 63 64 // Channel 65 const CHANNEL_READABLE = ZX_CHANNEL_READABLE; 66 const CHANNEL_WRITABLE = ZX_CHANNEL_WRITABLE; 67 const CHANNEL_PEER_CLOSED = ZX_CHANNEL_PEER_CLOSED; 68 69 // Socket 70 const SOCKET_READABLE = ZX_SOCKET_READABLE; 71 const SOCKET_WRITABLE = ZX_SOCKET_WRITABLE; 72 const SOCKET_PEER_CLOSED = ZX_SOCKET_PEER_CLOSED; 73 74 // Port 75 const PORT_READABLE = ZX_PORT_READABLE; 76 77 // Resource 78 const RESOURCE_DESTROYED = ZX_RESOURCE_DESTROYED; 79 const RESOURCE_READABLE = ZX_RESOURCE_READABLE; 80 const RESOURCE_WRITABLE = ZX_RESOURCE_WRITABLE; 81 const RESOURCE_CHILD_ADDED = ZX_RESOURCE_CHILD_ADDED; 82 83 // Fifo 84 const FIFO_READABLE = ZX_FIFO_READABLE; 85 const FIFO_WRITABLE = ZX_FIFO_WRITABLE; 86 const FIFO_PEER_CLOSED = ZX_FIFO_PEER_CLOSED; 87 88 // Job 89 const JOB_NO_PROCESSES = ZX_JOB_NO_PROCESSES; 90 const JOB_NO_JOBS = ZX_JOB_NO_JOBS; 91 92 // Process 93 const PROCESS_TERMINATED = ZX_PROCESS_TERMINATED; 94 95 // Thread 96 const THREAD_TERMINATED = ZX_THREAD_TERMINATED; 97 98 // Log 99 const LOG_READABLE = ZX_LOG_READABLE; 100 const LOG_WRITABLE = ZX_LOG_WRITABLE; 101 102 // Timer 103 const TIMER_SIGNALED = ZX_TIMER_SIGNALED; 104 } 105 }