From ebe071dae0cc99dc73f8ff61950f786f4f51bdbe Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sat, 25 Jul 2015 01:47:54 +0200 Subject: 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. --- device/ds_routines.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'device/ds_routines.c') diff --git a/device/ds_routines.c b/device/ds_routines.c index 43ed5b5..33cfd89 100644 --- a/device/ds_routines.c +++ b/device/ds_routines.c @@ -443,7 +443,7 @@ device_open(const ipc_port_t reply_port, while (device->state == DEV_STATE_OPENING || device->state == DEV_STATE_CLOSING) { device->io_wait = TRUE; - thread_sleep((event_t)device, simple_lock_addr(device->lock), TRUE); + thread_sleep_lock((event_t)device, &device->lock, TRUE); device_lock(device); } -- cgit v1.2.3