* Changed recursive_lock to use a mutex instead of a semaphore.

* Adjusted code using recursive locks respectively. The initialization
  cannot fail anymore, and it is possible to use recursive locks in the
  early boot process (even uninitialized, if in BSS), which simplifies
  things a little.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25687 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-05-28 23:12:36 +00:00
parent 6d4f2038c3
commit b0f5179aa5
18 changed files with 85 additions and 182 deletions
@@ -155,14 +155,13 @@ fs_mount(nspace_id nsid, const char *device, ulong flags, void *parms, size_t le
sprintf(lockname, "ntfs_lock %lx", ns->id);
#ifdef __HAIKU__
if ((result = recursive_lock_init(&(ns->vlock), lockname)) != 0)
recursive_lock_init_etc(&(ns->vlock), lockname, MUTEX_FLAG_CLONE_NAME);
#else
if ((result = new_lock(&(ns->vlock), lockname)) != B_OK)
#endif
{
ERRPRINT("fs_mount - error creating lock (%s)\n", strerror(result));
goto exit;
if ((result = new_lock(&(ns->vlock), lockname)) != B_OK) {
ERRPRINT("fs_mount - error creating lock (%s)\n", strerror(result));
goto exit;
}
#endif
handle = load_driver_settings("ntfs");
ns->show_sys_files = ! (strcasecmp(get_driver_parameter(handle, "hide_sys_files", "true", "true"), "true") == 0);