GNU bug report logs - #7073
no pthread_spinlock_t on Mac OS 10.6.4

Previous Next

Package: coreutils;

Reported by: "Gary V. Vaughan" <gary <at> gnu.org>

Date: Mon, 20 Sep 2010 05:52:01 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Bruno Haible <bruno <at> clisp.org>
To: bug-gnulib <at> gnu.org
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, bug-coreutils <at> gnu.org, "Gary V. Vaughan" <gary <at> gnu.org>
Subject: bug#7073: no pthread_spinlock_t on Mac OS 10.6.4
Date: Mon, 20 Sep 2010 11:24:55 +0200
Hi Paul,

> If MacOS doesn't have spinlocks, then from coreutils' point of view MacOS
> doesn't have proper thread support.

Usually in applications mutexes are used, not spinlocks. The comments in sort.c
say:

  "Note spin locks were seen to perform better than mutexes
   as long as the number of threads is limited to the
   number of processors."

In other words, spinlocks were chosen instead of mutexes only for performance
reasons.

So, instead of turning off the entire thread-based parallelization on MacOS X,
why not use mutexes instead of spinlocks on this platform?

Bruno




This bug report was last modified 6 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.