mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-12 13:51:56 +00:00
Until recently, the posix api was purely a consumer of the network subsystem. However, a dependency cycle was added as a stop-gap solution for challenges with the native platform. Specifically, 1. eventfd symbols conflict with those of the host 2. eventfd was excluded from native libc builds via cmake If any part of the posix were then to select the network subsystem (which is a legitimate use case, given that networking is a part of the posix api), we would get a build error due to the Kconfig dependency cycle. As usual, with dependency cycles, the cycle can be broken via a third, mutual dependency. What is the third mutual dependency? Naturally, it is ZVFS which was planned some time ago. ZVFS will be where we collect file-descriptor and FILE-pointer APIs so that we can ensure consistency for Zephyr users. This change deprecates EVENTFD_MAX in favour of ZVFS_EVENTFD_MAX. Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
24 lines
424 B
C
24 lines
424 B
C
/*
|
|
* Copyright (c) 2024, Tenstorrent AI ULC
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <zephyr/posix/sys/eventfd.h>
|
|
#include <zephyr/zvfs/eventfd.h>
|
|
|
|
int eventfd(unsigned int initval, int flags)
|
|
{
|
|
return zvfs_eventfd(initval, flags);
|
|
}
|
|
|
|
int eventfd_read(int fd, eventfd_t *value)
|
|
{
|
|
return zvfs_eventfd_read(fd, value);
|
|
}
|
|
|
|
int eventfd_write(int fd, eventfd_t value)
|
|
{
|
|
return zvfs_eventfd_write(fd, value);
|
|
}
|