[Mono-list] Use of pthreads in io-layer/atomic.c (WAS: mono-0.11 on StrongARM)

Dick Porter dick@ximian.com
Sat, 27 Apr 2002 12:15:44 +0100


On Sat, Apr 27, 2002 at 09:01:18AM +1000, Duraid Madina wrote:
> Hi all,
> 
> 	The pthread spinlock calls are less portable than you might
> think. I tried building Mono on HP-UX 11.00 (GCC 3.1) and they were the
> first problem I ran into.

Strange, according to David Butenhof's compatibility page, HP-UX 11.0
should have a working pthreads implementation:

http://home.earthlink.net/~anneart/family/Threads/ThreadTable.html

> 
> 	What do people think of developing Mono against GNU pth
> ( http://www.gnu.org/software/pth/ ) when configured with
> --enable-pthread ? This is a nice and portable lowest common denominator
> implementation of pthreads. (But yes, we'd have to do spinlocks
> ourselves.)

No, I'm not going to rewrite the threading again.  The way to fix this
particular issue is to provide atomic versions of the code, probably in
inline assembly (or to replace the spinlock with a mutex, which is likely
a more expensive operation.)

- Dick