mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-22 16:49:45 +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>
|
2006-07-24 Nathan Sidwell <nathan@codesourcery.com>
|
||||||
|
|
||||||
Bug 844
|
Bug 844
|
||||||
|
@ -112,10 +112,11 @@ initialise_monitor_handles (void)
|
|||||||
|
|
||||||
#ifndef __SINGLE_THREAD__
|
#ifndef __SINGLE_THREAD__
|
||||||
__lock_acquire_recursive (__arm_monitor_handles_lock);
|
__lock_acquire_recursive (__arm_monitor_handles_lock);
|
||||||
#endif
|
if (initialized)
|
||||||
initialized = 1;
|
{
|
||||||
#ifndef __SINGLE_THREAD__
|
__lock_release_recursive (__arm_monitor_handles_lock);
|
||||||
__lock_release_recursive (__arm_monitor_handles_lock);
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARM_RDI_MONITOR
|
#ifdef ARM_RDI_MONITOR
|
||||||
@ -156,6 +157,11 @@ initialise_monitor_handles (void)
|
|||||||
openfiles[0].pos = 0;
|
openfiles[0].pos = 0;
|
||||||
openfiles[1].handle = monitor_stdout;
|
openfiles[1].handle = monitor_stdout;
|
||||||
openfiles[1].pos = 0;
|
openfiles[1].pos = 0;
|
||||||
|
|
||||||
|
initialized = 1;
|
||||||
|
#ifndef __SINGLE_THREAD__
|
||||||
|
__lock_release_recursive (__arm_monitor_handles_lock);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user