VSF Documented
esp_vfs_eventfd.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2026 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18/*
19 * Clean-room re-implementation of ESP-IDF public API "esp_vfs_eventfd.h".
20 *
21 * Bridges to VSF Linux subsystem's eventfd implementation.
22 *
23 * Baseline: ESP-IDF v5.1 public API.
24 */
25
26#ifndef __VSF_ESPIDF_ESP_VFS_EVENTFD_H__
27#define __VSF_ESPIDF_ESP_VFS_EVENTFD_H__
28
29#include <stddef.h>
30#include <stdint.h>
31#include <sys/types.h>
32
33#include "esp_err.h"
34
36
37#define EFD_SUPPORT_ISR (1 << 4)
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43typedef struct {
44 size_t max_fds;
46
47#define ESP_VFS_EVENTD_CONFIG_DEFAULT() (esp_vfs_eventfd_config_t){ .max_fds = 5 }
48
51
52int eventfd(unsigned int initval, int flags);
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif // __VSF_ESPIDF_ESP_VFS_EVENTFD_H__
int esp_err_t
Definition esp_err.h:41
esp_err_t esp_vfs_eventfd_register(const esp_vfs_eventfd_config_t *config)
Definition esp_vfs_eventfd_port.c:31
uint64_t eventfd_t
Definition esp_vfs_eventfd.h:35
esp_err_t esp_vfs_eventfd_unregister(void)
Definition esp_vfs_eventfd_port.c:37
#define eventfd
Definition eventfd.h:20
unsigned long long uint64_t
Definition stdint.h:11
Definition esp_vfs_eventfd.h:43
size_t max_fds
Definition esp_vfs_eventfd.h:44
Generated from commit: vsfteam/vsf@c072a8d