This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [libc-alpha] PATCH: Declare wait_node structure volatile
- From: Kaz Kylheku <kaz at ashi dot footprints dot net>
- To: Mark Brown <bmark at us dot ibm dot com>
- Cc: libcalpha <libc-alpha at sources dot redhat dot com>
- Date: Wed, 20 Mar 2002 15:24:13 -0800 (PST)
- Subject: Re: [libc-alpha] PATCH: Declare wait_node structure volatile
On Wed, 20 Mar 2002, Mark Brown wrote:
> 2002-01-29 Mark Brown <bmark@us.ibm.com>
> linuxthreads/spinlock.c: Declare wait_node structure volatile
>
> --- glibc-2.2.4.orig/linuxthreads/spinlock.c Sat Sep 1 04:13:46 2001
> +++ glibc-2.2.4/linuxthreads/spinlock.c Wed Mar 20 12:24:09 2002
> @@ -269,9 +269,9 @@
>
>
> struct wait_node {
> - struct wait_node *next; /* Next node in null terminated
> linked list */
> - pthread_descr thr; /* The thread waiting with this node */
> - int abandoned; /* Atomic flag */
> +volatile struct wait_node *next; /* Next node in null
> terminated linked list */
> +volatile pthread_descr thr; /* The thread waiting with this node */
> +volatile int abandoned; /* Atomic flag */
> };
May I suggest, instead:
struct wait_node *volatile next;