Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/eventfd.h
Show All 32 Lines | |||||
typedef uint64_t eventfd_t; | typedef uint64_t eventfd_t; | ||||
#define EFD_SEMAPHORE 0x00000001 | #define EFD_SEMAPHORE 0x00000001 | ||||
#define EFD_NONBLOCK 0x00000004 | #define EFD_NONBLOCK 0x00000004 | ||||
#define EFD_CLOEXEC 0x00100000 | #define EFD_CLOEXEC 0x00100000 | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
int eventfd_create_file(struct thread *td, struct file *fp, uint32_t initval, | int eventfd_create_file(struct thread *td, uint32_t initval, int flags); | ||||
int flags); | |||||
#else | #else | ||||
__BEGIN_DECLS | __BEGIN_DECLS | ||||
int eventfd(unsigned int initval, int flags); | int eventfd(unsigned int initval, int flags); | ||||
int eventfd_read(int fd, eventfd_t *value); | int eventfd_read(int fd, eventfd_t *value); | ||||
int eventfd_write(int fd, eventfd_t value); | int eventfd_write(int fd, eventfd_t value); | ||||
__END_DECLS | __END_DECLS | ||||
#endif /* !_KERNEL */ | #endif /* !_KERNEL */ | ||||
#endif /* !_SYS_EVENTFD_H_ */ | #endif /* !_SYS_EVENTFD_H_ */ |