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:
Axel Dörfler
2005-12-21 17:58:49 +00:00
parent a8a13a0ae5
commit 14e132e2bc
+7 -3
View File
@@ -120,14 +120,18 @@ vm_cache_ref *
vm_cache_ref_create(vm_cache *cache) vm_cache_ref_create(vm_cache *cache)
{ {
vm_cache_ref *ref; vm_cache_ref *ref;
status_t status;
ref = malloc(sizeof(vm_cache_ref)); ref = malloc(sizeof(vm_cache_ref));
if (ref == NULL) if (ref == NULL)
return NULL; return NULL;
if (mutex_init(&ref->lock, "cache_ref_mutex") < B_OK) { status = mutex_init(&ref->lock, "cache_ref_mutex");
// free(ref); if (status < B_OK && (!kernel_startup || status != B_NO_MORE_SEMS)) {
// return NULL; // During early boot, we cannot create semaphores - they are
// created later in vm_init_post_sem()
free(ref);
return NULL;
} }
ref->areas = NULL; ref->areas = NULL;