Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #399

Re: POSIX threads hard to implement in Windows

From "MikeP" <mp011011@some.org>
Newsgroups comp.lang.c, comp.programming.threads, comp.unix.programmer
Subject Re: POSIX threads hard to implement in Windows
Date 2011-07-07 23:49 -0500
Organization A noiseless patient Spider
Message-ID <iv6286$i64$1@dont-email.me> (permalink)
References (9 earlier) <c1ahe8-hi.ln1@wilbur.25thandClement.com> <97mi1gFbcvU4@mid.individual.net> <487c17t7h0f64f1mjmm83gj5f080o56cfa@4ax.com> <iv5p2f$95u$1@dont-email.me> <tp1d17ln6tcrq8mt4vffsqitnr8h4lfc66@4ax.com>

Cross-posted to 3 groups.

Show all headers | View raw


Robert Wessel wrote:
> On Thu, 7 Jul 2011 21:12:33 -0500, "MikeP" <mp011011@some.org> wrote:
>
>> Robert Wessel wrote:
>>> On Fri, 08 Jul 2011 08:07:30 +1200, Ian Collins
>>> <ian-news@hotmail.com> wrote:
>>
>>>> Does the windows API support process shared mutexes?  The C1x
>>>> proposal doesn't include them probably because the process model is
>>>> beyond the C standard.
>>>
>>>
>>> Sure.  Most of the synchronization objects in Windows are system
>>> wide.
>>
>> CAN be. If you name them, THEN they can be used amongst processes.
>> Unnamed synch objects are intra-process. Whether having unnamed synch
>> objects makes them lighter-weight (higher performance) in usage, I
>> don't know. Simple enough to profile though.
>
>
> Not true.  Unnamed objects can be shared with child processes under
> the correct circumstances.

OK. Then I should have wrote: "Unnamed synch objects are GENERALLY 
intra-process" (or some such). (I should have not included additional 
thoughts and stopped at the first carriage return perhaps).

> Alternatively, and more generally, you can
> use DuplicateHandle on an unnamed object and create a (new) handle to
> that object for another process to use.

Sounds like a roundabout way of doing the same thing as naming an object 
though.

Anyway, my point was that they are not NECESSARILY system-wide, and your 
statement implied the opposite. You maybe should have said something 
like: "Most of the synchronization objects in Windows CAN BE system 
wide". (I would have used "inter-process" some way instead of "system 
wide"). 

Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

POSIX threads hard to implement in Windows (was: C is fixed or not ?) Noob <root@127.0.0.1> - 2011-07-07 15:17 +0200
  Re: POSIX threads hard to implement in Windows William Ahern <william@wilbur.25thandClement.com> - 2011-07-07 11:21 -0700
    Re: POSIX threads hard to implement in Windows Ian Collins <ian-news@hotmail.com> - 2011-07-08 08:07 +1200
      Re: POSIX threads hard to implement in Windows Robert Wessel <robertwessel2@yahoo.com> - 2011-07-07 16:01 -0500
        Re: POSIX threads hard to implement in Windows "MikeP" <mp011011@some.org> - 2011-07-07 21:12 -0500
          Re: POSIX threads hard to implement in Windows Robert Wessel <robertwessel2@yahoo.com> - 2011-07-07 23:33 -0500
            Re: POSIX threads hard to implement in Windows "MikeP" <mp011011@some.org> - 2011-07-07 23:49 -0500
          Re: POSIX threads hard to implement in Windows BGB <cr88192@hotmail.com> - 2011-08-03 07:32 -0700
      Re: POSIX threads hard to implement in Windows William Ahern <william@wilbur.25thandClement.com> - 2011-07-07 15:06 -0700
    Re: POSIX threads hard to implement in Windows lawrence.jones@siemens.com - 2011-07-10 16:08 -0400
      Re: POSIX threads hard to implement in Windows William Ahern <william@wilbur.25thandClement.com> - 2011-07-10 16:09 -0700
        Re: POSIX threads hard to implement in Windows James Kuyper <jameskuyper@verizon.net> - 2011-07-11 06:20 -0400
          Re: POSIX threads hard to implement in Windows Ian Collins <ian-news@hotmail.com> - 2011-07-11 22:36 +1200
      Re: POSIX threads hard to implement in Windows scott@slp53.sl.home (Scott Lurndal) - 2011-07-11 16:18 +0000
        Re: POSIX threads hard to implement in Windows Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2011-07-12 13:30 +0100
  Re: POSIX threads hard to implement in Windows (was: C is fixed or not ?) Joshua Maurice <joshuamaurice@gmail.com> - 2011-07-07 19:01 -0700
  Re: POSIX threads hard to implement in Windows (was: C is fixed or not ?) "Ersek, Laszlo" <lacos@caesar.elte.hu> - 2011-07-14 23:05 +0200

csiph-web