7#ifndef ZEPHYR_INCLUDE_POSIX_SYS_EVENTFD_H_
8#define ZEPHYR_INCLUDE_POSIX_SYS_EVENTFD_H_
21#define EFD_SEMAPHORE 0x2
22#define EFD_NONBLOCK O_NONBLOCK
23#define EFD_FLAGS_SET (EFD_SEMAPHORE | EFD_NONBLOCK)
61 obj = z_get_fd_obj_and_vtable(fd, &efd_vtable, &
lock);
65 ret = efd_vtable->
read(obj, value,
sizeof(*value));
87 obj = z_get_fd_obj_and_vtable(fd, &efd_vtable, &
lock);
91 ret = efd_vtable->
write(obj, &value,
sizeof(value));
void
Definition: eswifi_shell.c:15
static int eventfd_read(int fd, eventfd_t *value)
Read from an eventfd.
Definition: eventfd.h:54
static int eventfd_write(int fd, eventfd_t value)
Write to an eventfd.
Definition: eventfd.h:80
int eventfd(unsigned int initval, int flags)
Create a file descriptor for event notification.
uint64_t eventfd_t
Definition: eventfd.h:25
#define K_FOREVER
Generate infinite timeout delay.
Definition: kernel.h:1186
int k_mutex_unlock(struct k_mutex *mutex)
Unlock a mutex.
int k_mutex_lock(struct k_mutex *mutex, k_timeout_t timeout)
Lock a mutex.
flags
Definition: http_parser.h:131
static ZTEST_BMEM volatile int ret
Definition: k_float_disable.c:28
__SIZE_TYPE__ ssize_t
Definition: types.h:28
static struct k_spinlock lock
Definition: spinlock_error_case.c:12
__UINT64_TYPE__ uint64_t
Definition: stdint.h:61
ssize_t(* read)(void *obj, void *buf, size_t sz)
Definition: fdtable.h:23
ssize_t(* write)(void *obj, const void *buf, size_t sz)
Definition: fdtable.h:24
Definition: kernel.h:2680