* 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
@@ -118,8 +118,7 @@ allocate_device_interface(net_device *device, net_device_module_info *module)
if (interface == NULL)
goto error_0;
if (recursive_lock_init(&interface->rx_lock, "rx lock") < B_OK)
goto error_1;
recursive_lock_init(&interface->rx_lock, "rx lock");
char name[128];
snprintf(name, sizeof(name), "%s receive queue", device->name);
@@ -154,8 +153,6 @@ error_3:
error_2:
recursive_lock_destroy(&interface->rx_lock);
error_1:
delete interface;
error_0: