You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/12/28 10:16:16 UTC
[GitHub] [nuttx] Donny9 commented on a diff in pull request #7990: fs/timerfd/eventfd: using anonymous inodes and using isr to notify poll waiter.
Donny9 commented on code in PR #7990:
URL: https://github.com/apache/nuttx/pull/7990#discussion_r1058239261
##########
fs/vfs/fs_eventfd.c:
##########
@@ -332,7 +311,7 @@ static ssize_t eventfd_do_read(FAR struct file *filep, FAR char *buffer,
/* Device ready for read */
- if (dev->mode_semaphore)
+ if (filep->f_oflags & EFD_SEMAPHORE)
Review Comment:
Done!
##########
fs/vfs/fs_eventfd.c:
##########
@@ -528,13 +505,15 @@ static int eventfd_do_poll(FAR struct file *filep, FAR struct pollfd *fds,
int eventfd(unsigned int count, int flags)
{
- int ret;
- int new_fd;
FAR struct eventfd_priv_s *new_dev;
+ int new_fd;
+ int ret;
- /* devpath: EVENT_FD_VFS_PATH + /efd (4) + %u (10) + null char (1) */
-
- char devpath[sizeof(CONFIG_EVENT_FD_VFS_PATH) + 4 + 10 + 1];
+ if (flags & ~(EFD_NONBLOCK | EFD_SEMAPHORE | EFD_CLOEXEC))
Review Comment:
Done!
##########
fs/vfs/fs_timerfd.c:
##########
@@ -518,18 +437,15 @@ int timerfd_create(int clockid, int flags)
/* Sanity checks. */
- if (clockid != CLOCK_REALTIME &&
- clockid != CLOCK_MONOTONIC &&
- clockid != CLOCK_BOOTTIME)
+ if ((clockid != CLOCK_REALTIME &&
+ clockid != CLOCK_MONOTONIC &&
+ clockid != CLOCK_BOOTTIME) ||
+ (flags & ~(TFD_NONBLOCK | TFD_CLOEXEC)))
Review Comment:
Done! thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org