From a5bc38081e5b0e97923a6f3636b0c06cfc0426ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 27 Jun 2003 03:27:12 +0000 Subject: [PATCH] Will no longer fail if the recursive_lock couldn't be created - that does *not* change the previous behaviour (well, I added some debug output), since the former recursive_lock_create() did always return B_OK, no matter if the lock could be initialized or not. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3680 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/arch/x86/arch_vm_translation_map.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/kernel/core/arch/x86/arch_vm_translation_map.c b/src/kernel/core/arch/x86/arch_vm_translation_map.c index 398ca4547d..03b16469a1 100755 --- a/src/kernel/core/arch/x86/arch_vm_translation_map.c +++ b/src/kernel/core/arch/x86/arch_vm_translation_map.c @@ -620,8 +620,11 @@ vm_translation_map_create(vm_translation_map *new_map, bool kernel) // initialize the new object new_map->ops = &tmap_ops; new_map->map_count = 0; - if (recursive_lock_create(&new_map->lock) < 0) - return ENOMEM; + + // ToDo: lock creation fails at this point during the boot process! + // (it will boot anyway, for now, the return code was wrong previously...) + if (recursive_lock_init(&new_map->lock, "vm tm rlock") < 0) + dprintf("vm_translation_map_create(): creating lock failed - continuing..."); new_map->arch_data = (vm_translation_map_arch_info *)malloc(sizeof(vm_translation_map_arch_info)); if (new_map == NULL) {