[libc-alpha] PATCH: Declare wait_node structure volatile
Kaz Kylheku
kaz@ashi.footprints.net
Wed Mar 20 16:02:00 GMT 2002
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;
More information about the Libc-alpha
mailing list