This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
RE: Patch to mutex.c
- To: Neale dot Ferguson at SoftwareAG-USA dot com
- Subject: RE: Patch to mutex.c
- From: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Date: Wed, 20 Sep 2000 10:20:29 -0700 (PDT)
- cc: libc-alpha at sources dot redhat dot com
On Wed, 20 Sep 2000 Neale.Ferguson@SoftwareAG-USA.com wrote:
> Date: Wed, 20 Sep 2000 12:40:54 -0400
> From: Neale.Ferguson@SoftwareAG-USA.com
> To: kaz@ashi.footprints.net
> Cc: libc-alpha@sources.redhat.com
> Subject: RE: Patch to mutex.c
>
> I suppose the 1st question I should have asked is "What is the meaning of
> the value that compare_and_swap returns?"
It's a success indicator. A non-zero value means that the swap was successfully
carried out: the memory location was found to have a value identical to the
old_value parameter, and was thus atomically replaced with the new_value.