This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Patch for PR libgomp/37938, IA64 specific.


On Thu, 2008-11-06 at 11:09 -0800, H.J. Lu wrote:

> There are
> 
> libgomp/critical.c:static gomp_mutex_t default_lock;
> libgomp/critical.c:static gomp_mutex_t create_lock_lock;
> libgomp/critical.c:  gomp_mutex_t *plock;
> libgomp/critical.c:      && sizeof (gomp_mutex_t) <= sizeof (void *)
> libgomp/critical.c:      && __alignof (gomp_mutex_t) <= sizeof (void *))
> libgomp/critical.c:    plock = (gomp_mutex_t *)pptr;
> libgomp/critical.c:	  gomp_mutex_t *nlock = gomp_malloc (sizeof (gomp_mutex_t));
> libgomp/critical.c:	      plock = gomp_malloc (sizeof (gomp_mutex_t));
> libgomp/critical.c:  gomp_mutex_t *plock;
> libgomp/critical.c:      && sizeof (gomp_mutex_t) <= sizeof (void *)
> libgomp/critical.c:      && __alignof (gomp_mutex_t) <= sizeof (void *))
> libgomp/critical.c:    plock = (gomp_mutex_t *)pptr;
> libgomp/critical.c:static gomp_mutex_t atomic_lock;
> 
> Those reads look suspicious.

I am not sure what reads you mean.  Do you mean the 'plock =
(gomp_mutex_t *) pptr' statements? The sizeof and __alignof uses are not
reads, right?  But pptr is a pointer to mutex and not a mutex itself, so
reading pptr shouldn't be a problem.

Steve Ellcey
sje@cup.hp.com


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