diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-25 01:47:54 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-26 12:14:18 +0200 |
commit | 3f6377e778e91b59d6fe1eb6d9f8381da04b24b4 (patch) | |
tree | a52047bfd1d39e57ffd7aa371a1f36e5cc1cd145 /device/dev_lookup.c | |
parent | e8e4cddec2daa1b3890477b9ccf817db0023c9e9 (diff) |
device: use general lock for `mach_device'
* device/dev_hdr.h (struct mach_device): Turn lock into a general lock.
(device_lock_init): New macro.
(device_lock, device_unlock): Adapt accordingly.
* device/dev_lookup.c (device_lookup): Use `device_lock_init'.
* device/ds_routines.c (device_open): Adapt accordingly.
Diffstat (limited to 'device/dev_lookup.c')
-rw-r--r-- | device/dev_lookup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/device/dev_lookup.c b/device/dev_lookup.c index a80830c..297dcde 100644 --- a/device/dev_lookup.c +++ b/device/dev_lookup.c @@ -154,7 +154,7 @@ device_lookup(char *name) new_device = (mach_device_t) kmem_cache_alloc(&dev_hdr_cache); simple_lock_init(&new_device->ref_lock); new_device->ref_count = 1; - simple_lock_init(&new_device->lock); + device_lock_init(new_device); new_device->state = DEV_STATE_INIT; new_device->flag = 0; new_device->open_count = 0; |