lkml.org 
[lkml]   [2014]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: WaitForMultipleObjects/etc. In Kernel
Network Nut wrote:
> As you know, under Windows, synchronization objects such as {event | mutex |
> semaphore | timer}; all have names that are computer-global. Process B can
> open, and use, any {event | mutex | semaphore | timer} that was created by
> process A, as long as Process B knows the name that was used by Process A to
> create the {event | mutex | semaphore | timer}. [...]
> Is there a method I can use where Process A and Process B can both refer to
> the same eventfd by name?

In Unix, the most common method of sharing file descriptors is by
letting child processes inherit them. (This also works in Windows, but
is not as efficient due to the process creation overhead.)

Unrelated processes cannot directly open objects created by another
process (with the exception of sockets and pipes, which can be created
in the file system). However, sharing of any file descriptor is
possible by sending it in a control message through a Unix domain
socket.

> BTW, the man page for epoll_wait seems to be incorrect.

<https://www.kernel.org/doc/man-pages/reporting_bugs.html>

> "The timeout argument specifies the minimum number of milliseconds
> that epoll_wait() will block."
>
> I think the word "minimum" should be "maximum".

This sentence was copied from the poll(2) man page, where the previous
sentence says "poll() blocks until one of the events occurs". So the
word "block" implies that no event has occured.


Regards,
Clemens


\
 
 \ /
  Last update: 2014-01-27 10:21    [W:0.098 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site