diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2009-04-22 10:53:53 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2009-04-22 10:53:53 +0000 |
commit | 24a40b356f07a2a4d50d4c36e5bbb86ef06d3925 (patch) | |
tree | e11dcde40e7283e50e32e96ee6676f534174b607 /gcc/config | |
parent | aa9037807b6e7a681a4229ab2c34539323d3f8b3 (diff) | |
download | gcc-24a40b356f07a2a4d50d4c36e5bbb86ef06d3925.zip gcc-24a40b356f07a2a4d50d4c36e5bbb86ef06d3925.tar.gz gcc-24a40b356f07a2a4d50d4c36e5bbb86ef06d3925.tar.bz2 |
gthr-vxworks.h (struct __gthread_once_t): Add alignment and padding for PPC.
* gthr-vxworks.h (struct __gthread_once_t): Add alignment and
padding for PPC.
(__GTHREAD_ONCE_INIT): Adjust ppc initializer.
* config/vxlib.c (__gthread_once): Add race guard for PPC.
From-SVN: r146566
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/vxlib.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/config/vxlib.c b/gcc/config/vxlib.c index 686d66d..0ff996c 100644 --- a/gcc/config/vxlib.c +++ b/gcc/config/vxlib.c @@ -65,7 +65,15 @@ __gthread_once (__gthread_once_t *guard, void (*func)(void)) __gthread_lock_library (); #else while (!vxTas ((void *)&guard->busy)) - taskDelay (1); + { +#ifdef __PPC__ + /* This can happen on powerpc, which is using all 32 bits + of the gthread_once_t structure. */ + if (guard->done) + return; +#endif + taskDelay (1); + } #endif /* Only one thread at a time gets here. Check ->done again, then |