Semaphores created in the kernel always belong to the kernel; there is
absolutely no reason to move them to B_SYSTEM_TEAM (additionally, during startup, set_sem_owner() may crash). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9693 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+4
-12
@@ -38,10 +38,8 @@ recursive_lock_init(recursive_lock *lock, const char *name)
|
|||||||
lock->recursion = 0;
|
lock->recursion = 0;
|
||||||
lock->sem = create_sem(1, name);
|
lock->sem = create_sem(1, name);
|
||||||
|
|
||||||
if (lock->sem >= B_OK) {
|
if (lock->sem >= B_OK)
|
||||||
//set_sem_owner(lock->sem, B_SYSTEM_TEAM);
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
|
||||||
|
|
||||||
return lock->sem;
|
return lock->sem;
|
||||||
}
|
}
|
||||||
@@ -111,10 +109,8 @@ mutex_init(mutex *m, const char *name)
|
|||||||
m->holder = -1;
|
m->holder = -1;
|
||||||
|
|
||||||
m->sem = create_sem(1, name);
|
m->sem = create_sem(1, name);
|
||||||
if (m->sem >= B_OK) {
|
if (m->sem >= B_OK)
|
||||||
//set_sem_owner(m->sem, B_SYSTEM_TEAM);
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
|
||||||
|
|
||||||
return m->sem;
|
return m->sem;
|
||||||
}
|
}
|
||||||
@@ -175,10 +171,8 @@ benaphore_init(benaphore *ben, const char *name)
|
|||||||
|
|
||||||
ben->count = 1;
|
ben->count = 1;
|
||||||
ben->sem = create_sem(0, name);
|
ben->sem = create_sem(0, name);
|
||||||
if (ben->sem >= B_OK) {
|
if (ben->sem >= B_OK)
|
||||||
set_sem_owner(ben->sem, B_SYSTEM_TEAM);
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
|
||||||
|
|
||||||
return ben->sem;
|
return ben->sem;
|
||||||
}
|
}
|
||||||
@@ -205,10 +199,8 @@ rw_lock_init(rw_lock *lock, const char *name)
|
|||||||
name = "r/w lock";
|
name = "r/w lock";
|
||||||
|
|
||||||
lock->sem = create_sem(RW_MAX_READERS, name);
|
lock->sem = create_sem(RW_MAX_READERS, name);
|
||||||
if (lock->sem >= B_OK) {
|
if (lock->sem >= B_OK)
|
||||||
set_sem_owner(lock->sem, B_SYSTEM_TEAM);
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
|
||||||
|
|
||||||
return lock->sem;
|
return lock->sem;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user