nanogui: Multi threads with WIN32 API
Subject:
Re: [nanogui] Multi threads with WIN32 API
From:
Duncan Palmer ####@####.####
Date:
21 Nov 2001 17:59:12 -0000
Message-Id: <3BFBEB4A.6080603@s3group.com>
Peter Dufault wrote:
> Make sense? See any other gotchas? Is there a suggested mutex API?
> Can I just use the pthread mutex semantics and provide a default
> NULL implementation?
If you're running on a machine which uses glibc, it would make most
sense to use posix threads (which glibc provides an implementation of).
In this case, be careful what version of glibc you use - the threads
implementation in glibc-2.2.2 is a bit broken, and recursive mutex's in
particular are completely busted. With a few workarounds, i've been able
to get my multithreaded app working on an x86 with glibc-2.2.2, but have
had no luck on a StrongARM. glibc-2.1.3 works well on both platforms. If
you're running under linux, an alternative is a new posix threads
implementation being worked on by IBM at
http://oss.software.ibm.com/developerworks/opensource/pthreads/ .
Something else to keep in mind is visibility with a debugger. If you're
using IBM's implementation, you get none, with glibc-2.1.3, you do
fairly well (on x86), provided your code doesn't terminate threads, and
with glibc-2.2.2 provides more or less complete visibility.
>
> Peter
>
> --
> Peter Dufault ####@####.#### Realtime development, Machine control,
> HD Associates, Inc. Fail-Safe systems, Agency approval
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
>
>
--
Duncan Palmer ####@####.####
Software Design Engineer Phone: +353-1-2911561
Silicon and Software Systems Fax: +353-1-2911001