From 38b75c82d5555d1c2248fc98fb47d6fa2265059b Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Sun, 8 Aug 2010 07:17:50 +0200 Subject: Make the thread of DS server known to Linux. --- libmachdev/ds_routines.c | 7 +++++++ libmachdev/mach_glue.h | 4 ++++ 2 files changed, 11 insertions(+) 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 #include +#include + #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 +#include + 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 -- cgit v1.2.3