[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <012d01cf1ae3$6543e340$2fcba9c0$@gmail.com>
Date: Sun, 26 Jan 2014 16:10:16 -0600
From: "Network Nut" <sillystack@...il.com>
To: "'Clemens Ladisch'" <clemens@...isch.de>
Cc: <linux-kernel@...r.kernel.org>
Subject: RE: WaitForMultipleObjects/etc. In Kernel
> -----Original Message-----
> From: Clemens Ladisch [mailto:clemens@...isch.de]
> Sent: Sunday, January 26, 2014 12:33 PM
> To: Network Nut
> Cc: linux-kernel@...r.kernel.org
> Subject: Re: WaitForMultipleObjects/etc. In Kernel
>
> Network Nut wrote:
> > I think that the facility by which a thread can block while waiting
> > for any of several synchronization primitives (*mutex*, *semaphore*,
> > *event*, *waitable timer*)...is not only "nice to have", but
> > fundamental to complex (clean) multi-threaded programming.
>
> You mean a facility like (e)poll, which can wait for things like timerfd,
signalfd,
> or eventfd?
>
>
> Regards,
> Clemens
Yes, that seems to be what I am looking for.
I have a concern:
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}. These synchronization
objects may also be nameless if the programmer so chooses, in which case,
process B would have to use a circuitous method to determine how to find the
kernel-object created by Process A.
Is there a method I can use where Process A and Process B can both refer to
the same eventfd by name?
BTW, the man page for epoll_wait seems to be incorrect. It says:
"The timeout argument specifies the minimum number of milliseconds
that epoll_wait() will block."
I think the word "minimum" should be "maximum".
Regards,
-Nut
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists