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:
parent
5f6fc2565b
commit
fe28d47d3b
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user