This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]