4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-22 00:38:06 +08:00

2006-08-22 Paul Brook <paul@codesourcery.com>

newlib/
	* libc/sys/arm/syscalls.c (initialise_monitor_handles): Fix
	multithreaded locking.
This commit is contained in:
Paul Brook 2006-08-22 20:48:23 +00:00
parent 5f6fc2565b
commit fe28d47d3b
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2006-08-22 Paul Brook <paul@codesourcery.com>
newlib/
* libc/sys/arm/syscalls.c (initialise_monitor_handles): Fix
multithreaded locking.
2006-07-24 Nathan Sidwell <nathan@codesourcery.com>
Bug 844

View File

@ -112,10 +112,11 @@ initialise_monitor_handles (void)
#ifndef __SINGLE_THREAD__
__lock_acquire_recursive (__arm_monitor_handles_lock);
#endif
initialized = 1;
#ifndef __SINGLE_THREAD__
__lock_release_recursive (__arm_monitor_handles_lock);
if (initialized)
{
__lock_release_recursive (__arm_monitor_handles_lock);
return;
}
#endif
#ifdef ARM_RDI_MONITOR
@ -156,6 +157,11 @@ initialise_monitor_handles (void)
openfiles[0].pos = 0;
openfiles[1].handle = monitor_stdout;
openfiles[1].pos = 0;
initialized = 1;
#ifndef __SINGLE_THREAD__
__lock_release_recursive (__arm_monitor_handles_lock);
#endif
}
static int