Reactivated check for failed semaphore creation - after kernel startup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15644 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -120,14 +120,18 @@ vm_cache_ref *
|
||||
vm_cache_ref_create(vm_cache *cache)
|
||||
{
|
||||
vm_cache_ref *ref;
|
||||
status_t status;
|
||||
|
||||
ref = malloc(sizeof(vm_cache_ref));
|
||||
if (ref == NULL)
|
||||
return NULL;
|
||||
|
||||
if (mutex_init(&ref->lock, "cache_ref_mutex") < B_OK) {
|
||||
// free(ref);
|
||||
// return NULL;
|
||||
status = mutex_init(&ref->lock, "cache_ref_mutex");
|
||||
if (status < B_OK && (!kernel_startup || status != B_NO_MORE_SEMS)) {
|
||||
// During early boot, we cannot create semaphores - they are
|
||||
// created later in vm_init_post_sem()
|
||||
free(ref);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ref->areas = NULL;
|
||||
|
||||
Reference in New Issue
Block a user