posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
eventfd.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Tobias Svehagen
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
20#ifndef ZEPHYR_INCLUDE_POSIX_SYS_EVENTFD_H_
21#define ZEPHYR_INCLUDE_POSIX_SYS_EVENTFD_H_
22
23#include <zephyr/zvfs/eventfd.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
30#define EFD_SEMAPHORE ZVFS_EFD_SEMAPHORE
32#define EFD_NONBLOCK ZVFS_EFD_NONBLOCK
33
35typedef zvfs_eventfd_t eventfd_t;
36
53int eventfd(unsigned int initval, int flags);
54
67int eventfd_read(int fd, eventfd_t *value);
68
80int eventfd_write(int fd, eventfd_t value);
81
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif /* ZEPHYR_INCLUDE_POSIX_SYS_EVENTFD_H_ */
int eventfd_read(int fd, eventfd_t *value)
Read the current counter value from an eventfd.
int eventfd_write(int fd, eventfd_t value)
Add a value to an eventfd counter.
int eventfd(unsigned int initval, int flags)
Create a file descriptor for event notification.
zvfs_eventfd_t eventfd_t
Counter value type for eventfd operations.
Definition eventfd.h:35