* Renamed static recursive lock variables to match our coding style guidelines.
* Renamed runtime loader semphore to something clearer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27623 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -85,9 +85,9 @@ static const char *sSearchPathSubDir = NULL;
|
|||||||
static bool sInvalidImageIDs;
|
static bool sInvalidImageIDs;
|
||||||
|
|
||||||
// a recursive lock
|
// a recursive lock
|
||||||
static sem_id rld_sem;
|
static sem_id sSem;
|
||||||
static thread_id rld_sem_owner;
|
static thread_id sSemOwner;
|
||||||
static int32 rld_sem_count;
|
static int32 sSemCount;
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -152,9 +152,9 @@ ktrace_printf(const char *format, ...)
|
|||||||
static void
|
static void
|
||||||
rld_unlock()
|
rld_unlock()
|
||||||
{
|
{
|
||||||
if (rld_sem_count-- == 1) {
|
if (sSemCount-- == 1) {
|
||||||
rld_sem_owner = -1;
|
sSemOwner = -1;
|
||||||
release_sem(rld_sem);
|
release_sem(sSem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,11 +163,11 @@ static void
|
|||||||
rld_lock()
|
rld_lock()
|
||||||
{
|
{
|
||||||
thread_id self = find_thread(NULL);
|
thread_id self = find_thread(NULL);
|
||||||
if (self != rld_sem_owner) {
|
if (self != sSemOwner) {
|
||||||
acquire_sem(rld_sem);
|
acquire_sem(sSem);
|
||||||
rld_sem_owner = self;
|
sSemOwner = self;
|
||||||
}
|
}
|
||||||
rld_sem_count++;
|
sSemCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1996,9 +1996,9 @@ terminate_program(void)
|
|||||||
void
|
void
|
||||||
rldelf_init(void)
|
rldelf_init(void)
|
||||||
{
|
{
|
||||||
rld_sem = create_sem(1, "rld_lock");
|
sSem = create_sem(1, "runtime loader");
|
||||||
rld_sem_owner = -1;
|
sSemOwner = -1;
|
||||||
rld_sem_count = 0;
|
sSemCount = 0;
|
||||||
|
|
||||||
// create the debug area
|
// create the debug area
|
||||||
{
|
{
|
||||||
@@ -2030,9 +2030,9 @@ rldelf_init(void)
|
|||||||
status_t
|
status_t
|
||||||
elf_reinit_after_fork(void)
|
elf_reinit_after_fork(void)
|
||||||
{
|
{
|
||||||
rld_sem = create_sem(1, "rld_lock");
|
sSem = create_sem(1, "runtime loader");
|
||||||
if (rld_sem < 0)
|
if (sSem < 0)
|
||||||
return rld_sem;
|
return sSem;
|
||||||
|
|
||||||
// We also need to update the IDs of our images. We are the child and
|
// We also need to update the IDs of our images. We are the child and
|
||||||
// and have cloned images with different IDs. Since in most cases (fork()
|
// and have cloned images with different IDs. Since in most cases (fork()
|
||||||
|
|||||||
Reference in New Issue
Block a user