diff options
author | Zheng Da <zhengda1936@gmail.com> | 2010-08-08 07:17:50 +0200 |
---|---|---|
committer | Zheng Da <zhengda1936@gmail.com> | 2010-08-08 07:17:50 +0200 |
commit | 38b75c82d5555d1c2248fc98fb47d6fa2265059b (patch) | |
tree | fc97ba33be33e21043035534c3612d328fb4f488 | |
parent | fee73f4e6d236a69f40e5c49e45f5f28a991d1ac (diff) |
Make the thread of DS server known to Linux.
-rw-r--r-- | libmachdev/ds_routines.c | 7 | ||||
-rw-r--r-- | libmachdev/mach_glue.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index 93ac7ecc..d31e3a9b 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_routines.c @@ -61,12 +61,15 @@ #include <mach.h> #include <cthreads.h> +#include <ddekit/thread.h> + #include "vm_param.h" #include "device_reply_U.h" #include "io_req.h" #include "dev_hdr.h" #include "util.h" #include "queue.h" +#include "mach_glue.h" static struct port_bucket *port_bucket; static struct port_class *dev_class; @@ -466,6 +469,10 @@ void reg_dev_emul (struct device_emulation_ops *ops) void ds_server() { + /* This thread calls Linux functions, + * so I need to make it known to the Linux environment. */ + l4dde26_process_from_ddekit (ddekit_thread_myself ()); + /* Launch. */ do { diff --git a/libmachdev/mach_glue.h b/libmachdev/mach_glue.h index d1bd1fc7..770ea51b 100644 --- a/libmachdev/mach_glue.h +++ b/libmachdev/mach_glue.h @@ -4,6 +4,8 @@ /* network */ #include <arpa/inet.h> +#include <ddekit/thread.h> + struct sk_buff; struct net_device; void skb_done_queue(struct sk_buff *skb); @@ -34,4 +36,6 @@ struct block_device *open_block_dev (char *name, int part, dev_mode_t mode); int block_dev_write (struct block_device *dev, int sectornr, char *data, int count, void (*write_done) (int err)); +int l4dde26_process_from_ddekit(ddekit_thread_t *t); + #endif |