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


Groups > comp.programming.threads > #388

Re: POSIX threads hard to implement in Windows

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c, comp.programming.threads, comp.unix.programmer
Subject Re: POSIX threads hard to implement in Windows
Date Fri, 08 Jul 2011 08:07:30 +1200
Lines 38
Message-ID <97mi1gFbcvU4@mid.individual.net> (permalink)
References <4e116c59$0$13719$426a34cc@news.free.fr> <5fa80219-4bc8-4af8-9766-54501eb5ab90@j15g2000yqf.googlegroups.com> <iusm9i$g3g$1@dont-email.me> <iuso52$shb$1@dont-email.me> <iussos$ndi$1@speranza.aioe.org> <97ek3iFq2bU2@mid.individual.net> <4e13c801$0$20925$a729d347@news.telepac.pt> <lnwrfw1679.fsf@nuthaus.mib.org> <4e13d4a7$0$20921$a729d347@news.telepac.pt> <iv0ljc$fce$1@dont-email.me> <jobee8-aki.ln1@jones.homeip.net> <lnbox70xby.fsf@nuthaus.mib.org> <37pfe8-4gl.ln1@jones.homeip.net> <iv42dd$ed2$2@dont-email.me> <iv4blu$79l$1@dont-email.me> <c1ahe8-hi.ln1@wilbur.25thandClement.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net bW+dW07YKuHnRRrzLfhgiwAPA43RTKuH+c8KXmdDuiB3+jNRzQ
Cancel-Lock sha1:erHxG76AFs2dXIZAJDofTOyS9zQ=
User-Agent Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4
In-Reply-To <c1ahe8-hi.ln1@wilbur.25thandClement.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.c:7877 comp.programming.threads:388 comp.unix.programmer:898

Cross-posted to 3 groups.

Show key headers only | View raw


On 07/ 8/11 06:21 AM, William Ahern wrote:
> In comp.unix.programmer Noob<root@127.0.0.1>  wrote:
>> James Kuyper wrote:
>>> Lawrence Jones wrote:
>>>
>>>> Keith Thompson wrote:
>>>>
>>>>> I'm not very familiar with this area, but why would just
>>>>> incorporating POSIX threads (or perhaps a subset of POSIX threads)
>>>>> into the C standard not have been a good solution?
>>>>
>>>> My understanding, from people who know a whole lot more about it than I
>>>> do, is that POSIX threads cannot be implemented on top of Windows
>>>> because it presupposes a bunch of POSIX features that Windows doesn't
>>>> provide, at least in the form that POSIX threads requires.
>>>
>>> Could you ask those people to provide a more detailed explanation of the
>>> problem? I doubt that a naked assertion will convince Rui Maciel, and
>>> I'm curious about the reasons myself.
>
> POSIX threads can be implemented quite comprehensively on Windows:
>
> 	http://sourceware.org/pthreads-win32/conformance.html
>
> 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.
> pthreads-win32 handles this with a global Windows' CriticalSection in
> pthread_mutex_lock(). AFAIK, the C1x proposal doesn't allow statically
> initialized objects, presumably so the interface can be implemented atop
> Windows' API without such ugliness.

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.

-- 
Ian Collins

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