lkml.org 
[lkml]   [2016]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] epoll: add exclusive wakeups flag
>> By the way, in the code you have
>>
>> case EPOLL_CTL_MOD:
>> if (epi) {
>> if (!(epi->event.events & EPOLLEXCLUSIVE)) {
>> epds.events |= POLLERR | POLLHUP;
>> error = ep_modify(ep, epi, &epds);
>> }
>>
>> I think the "if" here is redundant. IIUC, earlier in the code you
>> disallow EPOLL_CTL_MOD with EPOLLEXCLUSIVE.
>>
>> Cheers,
>>
>> Michael
>>
>>
>
> Hi Michael,
>
> So the previous check ensures that you can not add the EPOLLEXCLUSIVE
> flag to the events via an EPOLL_CTL_MOD operation, where EPOLLEXCLUSIVE
> may not be the existing events set. While this check here ensure you
> can't modify an existing set that already has the EPOLLEXCLUSIVE flag.

Hmmm - I misread the code, itr seems :-/. Could you please carefully
check the man page text I sent earlier in this thread. Maybe I
injected some errors into the text.

Thanks,

Michael

--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

\
 
 \ /
  Last update: 2016-03-11 22:01    [W:0.086 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site