linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WaitForMultipleObjects/etc. In Kernel
@ 2014-01-25 22:01 Network Nut
  2014-01-26 18:33 ` Clemens Ladisch
  0 siblings, 1 reply; 14+ messages in thread
From: Network Nut @ 2014-01-25 22:01 UTC (permalink / raw)
  To: linux-kernel

Hi All,

This is my first post to anything Linux, so if there is a better mailing
list, please let me know.

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. Of course, this facility is available on
Windows as *WaitForMultipleObjects *with all the associated functions.

That said, I have a C++ project on Windows that is nearly 100% portable.
The part that is not portable is mostly the synchronization elements. Every
year or so I take a cursory look at Linux's (Unix's) synchronization model,
and the process thread model, and...I guess you have heard it before - it's
simply not the same.

I have also seen various attempts on the web to create wrapper functions
that provide a Windows synchro API on Linux, but again, the result is never
quite the same. IBM, in their attempt and exposition, admits this. It is
clear, at least to me, that if one wants true ability to wait for any of
the various synchronization objects simultaneously, there needs to be
deliberate, explicit kernel support.

I was wondering:

   1. What is the likelihood that the guardians of the kernel would even
   allow something so fundamentally different inside?
   2. My gut feeling is that adding such support would fundamentally change


   other aspects of Linux. For example, I am vaguely familiar with asio, but
   to do it the way it was done in Windows...

Finally, this is not a situation where the end-game is having a kernel of
my own that has such support. Support would need to be pre-existing for the
users of my project.

Please note that I am not a Windows bigot trying to impose a
Microsoft-centric world-view on Linux. I think this facility transcends any
particular OS, and I feel that it is merely fortunate coincidence that the
Microsoft (DEC) engineers had the inclination to do it.

-Nut


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-01-31 23:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-25 22:01 WaitForMultipleObjects/etc. In Kernel Network Nut
2014-01-26 18:33 ` Clemens Ladisch
2014-01-26 22:10   ` Network Nut
2014-01-27  9:06     ` Clemens Ladisch
2014-01-27 19:50       ` Network Nut
2014-01-28  9:04         ` Clemens Ladisch
2014-01-28 21:07           ` Network Nut
2014-01-29  8:30             ` Clemens Ladisch
2014-01-30 23:49               ` Network Nut
2014-01-31 17:05                 ` Austin S. Hemmelgarn
2014-01-31 22:35                   ` Network Nut
2014-01-31 22:53                     ` Clemens Ladisch
2014-01-31 23:00                       ` Network Nut
2014-01-31 23:08                         ` Network Nut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).