* 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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user