projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2215071
)
Pass TFD_NONBLOCK to timerfd_create to avoid later fcntl
author
Kyle Evans
<kevans@FreeBSD.org>
Thu, 3 May 2018 02:03:49 +0000
(21:03 -0500)
committer
Kyle Evans
<kevans@FreeBSD.org>
Thu, 3 May 2018 02:03:49 +0000
(21:03 -0500)
winpr/libwinpr/synch/timer.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/synch/timer.c
b/winpr/libwinpr/synch/timer.c
index
dbd628f
..
4adfdac
100644
(file)
--- a/
winpr/libwinpr/synch/timer.c
+++ b/
winpr/libwinpr/synch/timer.c
@@
-235,22
+235,13
@@
static int InitializeWaitableTimer(WINPR_TIMER* timer)
{
#ifdef HAVE_SYS_TIMERFD_H
int status;
- timer->fd = timerfd_create(CLOCK_MONOTONIC,
0
);
+ timer->fd = timerfd_create(CLOCK_MONOTONIC,
TFD_NONBLOCK
);
if (timer->fd <= 0)
{
free(timer);
return -1;
}
-
- status = fcntl(timer->fd, F_SETFL, O_NONBLOCK);
-
- if (status)
- {
- close(timer->fd);
- return -1;
- }
-
#elif defined(__APPLE__)
#else
WLog_ERR(TAG, "%s: os specific implementation is missing", __FUNCTION__);