This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: malloc and threads
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: David Boreham <david_list at boreham dot org>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Sun, 1 Dec 2002 12:09:34 -0500
- Subject: Re: malloc and threads
- References: <288F9BF66CD9D5118DF400508B68C4460701D8AD@orsmsx113.jf.intel.com> <07a401c29637$88f4afa0$160aa8c0@mtbrook.boreham.org>
On Wed, Nov 27, 2002 at 09:07:58AM -0800, David Boreham wrote:
> > XScale is an ARM based processor
>
> Perhaps there is a bug in the XScale locking code
> or in the CPU hardware ?
Well, there are bugs in the ARM locking code. I recommend interested
parties look at the conversation between myself and Richard Earnshaw
about this on the gcc-patches list, on Oct. 4th-7th:
Subject: Atomic operations on the ARM
I don't believe it will affect malloc's use of locks; in short
test-and-set works but exchange-and-add is not atomic.
I'm not sure if compare_and_swap works correctly or not. A glance
suggests that it does not.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer