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


Groups > comp.programming.threads > #420

Re: The threading specs in the standard: a new catastrophe

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From Phil Carmody <thefatphil_demunged@yahoo.co.uk>
Newsgroups comp.std.c, comp.programming.threads, comp.unix.programmer
Subject Re: The threading specs in the standard: a new catastrophe
Date 11 Jul 2011 16:12:59 +0300
Organization A noiseless patient Spider
Lines 36
Sender phil@bazspaz.fatphil.org
Message-ID <87pqlhnep0.fsf@bazspaz.fatphil.org> (permalink)
References <iv422a$33k$1@speranza.aioe.org> <iv576t$2lm$1@dont-email.me> <iv58m6$5vo$1@speranza.aioe.org> <4e53ba11-fea9-4896-8bb9-6b45acb6e18f@y24g2000yqb.googlegroups.com> <iv5ep3$it3$2@speranza.aioe.org> <3de2d9ab-e52a-4eb3-a726-b5bed4ce7eef@q1g2000vbj.googlegroups.com> <a4b696f0-5d1a-4e7a-8988-981c82a89969@e18g2000vbx.googlegroups.com> <iv9c77$5dj$1@dont-email.me> <4E184289.9D95CABB@web.de>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Info mx04.eternal-september.org; posting-host="A8KpN8k3FkxHwF32eOLgMA"; logging-data="26732"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hp2zEkZ0Y6To8NuHagPgP"
User-Agent Gnus/5.09 (Gnus v5.9.0) Emacs/21.4
Cancel-Lock sha1:qe7cKaaBCFeqvZIUkBiAs1VQwbI=
Xref x330-a1.tempe.blueboxinc.net comp.std.c:711 comp.programming.threads:420 comp.unix.programmer:934

Cross-posted to 3 groups.

Show key headers only | View raw


Alexander Terekhov <terekhov@web.de> writes:
> James Kuyper wrote:
> > 
> > On 07/08/2011 01:47 PM, sfuerst wrote:
> > ...
> > > This is incorrect.  There are multiple libraries implementing the
> > > posix threading library for the Microsoft windows platform.  None of
> > > them have difficulty supporting the fact that posix mutexes require
> > > the possibility of static initialization.  A simple google search for
> > > "pthread windows" will give examples of how to do it.
> > 
> > On 2011-07-07, in c.l.c, c.p.t, and c.u.p, in a message with the subject
> > "POSIX threads hard to implement in Windows", William Ahern wrote:
> > ...
> > > But anyone who has used POSIX threads and Windows' native API quickly learns
> > > that they're quite different approaches. The biggest difference that I'm
> > > aware of is that Windows' mutexes cannot be statically initialized.
> > 
> > Unless I'm misunderstanding something, which is quite possible, you and
> > he appear to be in disagreement on this point. If so, could the two of
> > you discuss this issue and resolve that disagreement?
> 
> sfuerst is right, a la pthread statically initialized mutexes are no
> problem under Windows native API, e.g.:
> 
> #define SWAP_BASED_MUTEX_FOR_WINDOWS_INITIALIZER { 0, 0 } 
> 
> class swap_based_mutex_for_windows { 

When discussing language features, what would be more useful is 
an example in the language in question, namely C.

Phil
-- 
"At least you know where you are with Microsoft."
"True. I just wish I'd brought a paddle." -- Matthew Vernon

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


Thread

Re: The threading specs in the standard: a new catastrophe jameskuyper <jameskuyper@gmail.com> - 2011-07-07 15:25 -0700
  Re: The threading specs in the standard: a new catastrophe sfuerst <svfuerst@gmail.com> - 2011-07-07 16:12 -0700
    Re: The threading specs in the standard: a new catastrophe James Kuyper <jameskuyper@verizon.net> - 2011-07-07 22:41 -0400
    Re: The threading specs in the standard: a new catastrophe "Chris M. Thomasson" <cristom@charter.net> - 2011-07-08 12:47 -0700
      Re: The threading specs in the standard: a new catastrophe sfuerst <svfuerst@gmail.com> - 2011-07-08 13:11 -0700
        Re: The threading specs in the standard: a new catastrophe "Chris M. Thomasson" <cristom@charter.net> - 2011-07-08 16:56 -0700
        Re: The threading specs in the standard: a new catastrophe Marcin Grzegorczyk <mgrzegor@poczta.onet.pl> - 2011-07-09 23:55 +0200
          Re: The threading specs in the standard: a new catastrophe sfuerst <svfuerst@gmail.com> - 2011-07-09 18:40 -0700
  Re: The threading specs in the standard: a new catastrophe jacob navia <jacob@spamsink.net> - 2011-07-08 01:16 +0200
    some sane words, for sure "Greg A. Woods" <woods@robohack.org> - 2011-07-07 18:33 -0700
    Re: The threading specs in the standard: a new catastrophe jameskuyper <jameskuyper@gmail.com> - 2011-07-08 08:34 -0700
      Re: The threading specs in the standard: a new catastrophe sfuerst <svfuerst@gmail.com> - 2011-07-08 10:47 -0700
        Re: The threading specs in the standard: a new catastrophe James Kuyper <jameskuyper@verizon.net> - 2011-07-09 06:57 -0400
          Re: The threading specs in the standard: a new catastrophe Alexander Terekhov <terekhov@web.de> - 2011-07-09 13:59 +0200
            Re: The threading specs in the standard: a new catastrophe jacob navia <jacob@spamsink.net> - 2011-07-09 14:45 +0200
            Re: The threading specs in the standard: a new catastrophe "Chris M. Thomasson" <cristom@charter.net> - 2011-07-10 15:47 -0700
              Re: The threading specs in the standard: a new catastrophe Alexander Terekhov <terekhov@web.de> - 2011-07-11 13:38 +0200
            Re: The threading specs in the standard: a new catastrophe Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-07-11 16:12 +0300

csiph-web