This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi!
atomic_compare_and_exchange_bool_acq returns non-zero if it failed to
exchange. This fixes getconf _NPROCESSORS_ONLN on my box.
2003-04-03 Jakub Jelinek <jakub at redhat dot com>
* sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path): Reverse test
for atomic_compare_and_exchange_bool_acq failure.
--- libc/sysdeps/unix/sysv/linux/getsysstats.c.jj 2003-03-21 05:17:37.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/getsysstats.c 2003-04-03 05:31:09.000000000 -0500
@@ -85,7 +85,7 @@ get_proc_path (char *buffer, size_t bufs
/* Now store the copied value. But do it atomically. */
assert (sizeof (long int) == sizeof (void *__unbounded));
- if (! atomic_compare_and_exchange_bool_acq (&mount_proc, copy_result, NULL))
+ if (atomic_compare_and_exchange_bool_acq (&mount_proc, copy_result, NULL))
/* Replacing the value failed. This means another thread was
faster and we don't need the copy anymore. */
free (copy_result);
Jakub
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |