diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2006-06-19 03:07:54 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2006-06-19 03:07:54 +0000 |
commit | 9b7e4f4ff8d6daf711224a406dbf0368c314d1f6 (patch) | |
tree | de65a1af75df21397cfbf2455d01ac6806e27c83 | |
parent | 75354be7aa44d75d6f7a34d1ba97ea78c9990e34 (diff) | |
download | gcc-9b7e4f4ff8d6daf711224a406dbf0368c314d1f6.zip gcc-9b7e4f4ff8d6daf711224a406dbf0368c314d1f6.tar.gz gcc-9b7e4f4ff8d6daf711224a406dbf0368c314d1f6.tar.bz2 |
re PR libgomp/27254 (FAIL: libgomp.fortran/reduction6.f90)
PR libgomp/27254
* io/unit.c (get_internal_unit): Initialize and lock thread mutex
for internal units.
From-SVN: r114765
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/unit.c | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index bd1aecb..8517cae 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2006-06-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR libgomp/27254 + * io/unit.c (get_internal_unit): Initialize and lock thread mutex + for internal units. + 2006-06-06 Janne Blomqvist <jb@gcc.gnu.org> * m4/in_pack.m4: Add TODO comment about detecting temporaries, diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c index 14438f8..0b7dee1 100644 --- a/libgfortran/io/unit.c +++ b/libgfortran/io/unit.c @@ -376,6 +376,15 @@ get_internal_unit (st_parameter_dt *dtp) } memset (iunit, '\0', sizeof (gfc_unit)); +#ifdef __GTHREAD_MUTEX_INIT + { + __gthread_mutex_t tmp = __GTHREAD_MUTEX_INIT; + iunit->lock = tmp; + } +#else + __GTHREAD_MUTEX_INIT_FUNCTION (&iunit->lock); +#endif + __gthread_mutex_lock (&iunit->lock); iunit->recl = dtp->internal_unit_len; |