Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
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
7#ifndef ZEPHYR_INCLUDE_POSIX_SYS_EVENTFD_H_
8#define ZEPHYR_INCLUDE_POSIX_SYS_EVENTFD_H_
9
10#include <stdint.h>
11
12#include <zephyr/kernel.h>
13#include <zephyr/posix/fcntl.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#define EFD_IN_USE 0x1 __DEPRECATED_MACRO
20#define EFD_SEMAPHORE 0x2
21#define EFD_NONBLOCK O_NONBLOCK
22#define EFD_FLAGS_SET (EFD_SEMAPHORE | EFD_NONBLOCK) __DEPRECATED_MACRO
23
25
41int eventfd(unsigned int initval, int flags);
42
53int eventfd_read(int fd, eventfd_t *value);
54
63int eventfd_write(int fd, eventfd_t value);
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* ZEPHYR_INCLUDE_POSIX_SYS_EVENTFD_H_ */
int eventfd_read(int fd, eventfd_t *value)
Read from an eventfd.
int eventfd_write(int fd, eventfd_t value)
Write to an eventfd.
int eventfd(unsigned int initval, int flags)
Create a file descriptor for event notification.
uint64_t eventfd_t
Definition: eventfd.h:24
Public kernel APIs.
flags
Definition: parser.h:96
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91