1 /* File System and Drivers select support 2 ** 3 ** Distributed under the terms of the Haiku License. 4 */ 5 #ifndef _DRIVERS_SELECT_H 6 #define _DRIVERS_SELECT_H 7 8 9 #include <SupportDefs.h> 10 11 12 struct selectsync; 13 typedef struct selectsync selectsync; 14 15 enum select_events { 16 B_SELECT_READ = 1, // standard select() support 17 B_SELECT_WRITE, 18 B_SELECT_ERROR, 19 20 B_SELECT_PRI_READ, // additional poll() support 21 B_SELECT_PRI_WRITE, 22 23 B_SELECT_HIGH_PRI_READ, 24 B_SELECT_HIGH_PRI_WRITE, 25 26 B_SELECT_DISCONNECTED 27 }; 28 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 #ifdef COMPILE_FOR_R5 35 extern void notify_select_event(struct selectsync *sync, uint32 ref); 36 #else 37 extern status_t notify_select_event(struct selectsync *sync, uint32 ref, uint8 event); 38 #endif 39 40 #ifdef __cplusplus 41 } 42 #endif 43 44 #endif /* _DRIVERS_SELECT_H */ 45