From cd49b9614c6583290f0388e36edfeae7f733a29f Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 13 Apr 2014 12:54:07 +0200 Subject: sync with dde-fixes --- libmachdev/ds_routines.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'libmachdev/ds_routines.c') diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index 0e431a33..6bd5a129 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_routines.c @@ -64,14 +64,14 @@ #include "vm_param.h" #include "device_S.h" -#include "device_reply_U.h" +#include "notify_S.h" #include "io_req.h" #include "dev_hdr.h" #include "util.h" #include "queue.h" #include "mach_glue.h" -struct port_bucket *port_bucket; +struct port_bucket *device_bucket; struct port_class *dev_class; #define NUM_EMULATION num_emul @@ -83,12 +83,6 @@ static int num_emul; boolean_t is_master_device (mach_port_t port); -static inline void -mach_device_deallocate (void *device) -{ - ports_port_deref (device); -} - /* * What follows is the interface for the native Mach devices. */ @@ -181,7 +175,6 @@ ds_device_close (struct mach_device *device) ret = (device->dev.emul_ops->close ? (*device->dev.emul_ops->close) (device->dev.emul_data) : D_SUCCESS); - mach_device_deallocate (device); return ret; } @@ -338,9 +331,10 @@ ds_device_map (struct mach_device *device, vm_prot_t prot, vm_offset_t offset, return D_INVALID_OPERATION; } -int create_device_port (int size, void *result) +error_t +create_device_port (size_t size, void *result) { - return ports_create_port (dev_class, port_bucket, + return ports_create_port (dev_class, device_bucket, size, result); } @@ -348,7 +342,7 @@ void mach_device_init() { int i; - port_bucket = ports_create_bucket (); + device_bucket = ports_create_bucket (); dev_class = ports_create_class (0, 0); for (i = 0; i < NUM_EMULATION; i++) { @@ -385,7 +379,7 @@ void * ds_server(void *arg) /* Launch. */ do { - ports_manage_port_operations_one_thread (port_bucket, demuxer, 0); + ports_manage_port_operations_one_thread (device_bucket, demuxer, 0); } while (1); return NULL; -- cgit v1.2.3