diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-04-13 12:54:07 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-04-13 12:54:07 +0200 |
commit | cd49b9614c6583290f0388e36edfeae7f733a29f (patch) | |
tree | 0bbd9486f841fda797960cd0c0f27e5a5a704e15 /libmachdev/ds_routines.c | |
parent | d28e801d18288f8f9c4f56c39d677803f5534a63 (diff) |
sync with dde-fixes
Diffstat (limited to 'libmachdev/ds_routines.c')
-rw-r--r-- | libmachdev/ds_routines.c | 20 |
1 files changed, 7 insertions, 13 deletions
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; |