Page MenuHomeFreeBSD

D41708.1795979401.diff
No OneTemporary

Authored By
Unknown
Size
1020 B
Referenced Files
None
Subscribers
None

D41708.1795979401.diff

diff --git a/sys/compat/linux/linux_event.h b/sys/compat/linux/linux_event.h
--- a/sys/compat/linux/linux_event.h
+++ b/sys/compat/linux/linux_event.h
@@ -54,4 +54,7 @@
#define LINUX_EFD_SEMAPHORE (1 << 0)
+#define LINUX_TFD_CLOEXEC LINUX_O_CLOEXEC
+#define LINUX_TFD_NONBLOCK LINUX_O_NONBLOCK
+
#endif /* !_LINUX_EVENT_H_ */
diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c
--- a/sys/compat/linux/linux_event.c
+++ b/sys/compat/linux/linux_event.c
@@ -611,13 +611,18 @@
linux_timerfd_create(struct thread *td, struct linux_timerfd_create_args *args)
{
clockid_t clockid;
- int error;
+ int error, flags;
error = linux_to_native_clockid(&clockid, args->clockid);
if (error != 0)
return (error);
+ flags = 0;
+ if ((args->flags & LINUX_TFD_CLOEXEC) != 0)
+ flags |= O_CLOEXEC;
+ if ((args->flags & LINUX_TFD_NONBLOCK) != 0)
+ flags |= TFD_NONBLOCK;
- return (kern_timerfd_create(td, clockid, args->flags));
+ return (kern_timerfd_create(td, clockid, flags));
}
int

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 29, 7:10 PM (16 h, 42 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42095004
Default Alt Text
D41708.1795979401.diff (1020 B)

Event Timeline