[patch 10/23] openmosix/openmosix-kcomd-remote-preuser-to-kcomd-api.patch
Florian Delizy <[email protected]> Mon, 25 Sep 2006 17:32:42 +0200
| Newsgroups | gmane.linux.cluster.openmosix.devel |
|---|---|
| Message-ID | <[email protected]> |
Re-send on Matt's advise -- Florian ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ openMosix-devel mailing list openMosix-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/openmosix-devel
openmosix-kcomd-remote-preuser-to-kcomd-api.patch
(text/x-patch, 1.3 KB)
Index: linux/hpc/kernel.c
===================================================================
--- linux.orig/hpc/kernel.c 2006-09-14 22:54:29.000000000 +0200
+++ linux/hpc/kernel.c 2006-09-14 22:55:47.000000000 +0200
@@ -26,6 +26,9 @@
#include <hpc/comm.h>
#include <hpc/mig.h>
+#include <hpc/kcom.h>
+#include <hpc/prototype.h>
+
struct openmosix_options om_opts;
EXPORT_SYMBOL_GPL(om_opts);
@@ -157,11 +160,26 @@
static inline int remote_pre_usermode(void)
{
- task_t *p = current;
-
- if (p->om.contact && comm_peek(p->om.contact))
- remote_do_comm(p);
+ task_t *p=current;
+ struct kcom_task *mytsk;
+ struct kcom_pkt *pkt, *pkt_next;
+
+
+ /* FIXME: should we just add a *kcom_task to the proc struct, and speed this up? */
+ mytsk=kcom_task_find(p->pid);
+ if (!list_empty(&mytsk->in_packs))
+ list_for_each_entry_safe(pkt, pkt_next, &mytsk->in_packs, list) {
+ printk("packet found.\n");
+ if ((pkt->type & MIG_MASK) == MIG_SYSCALL) {
+ if ((pkt->type & SYSCALL_MASK) == DEP_SIGNAL) {
+ printk("Signal pkt found.\n");
+ remote_do_signal(p, pkt);
+ list_del(&pkt->list);
+ }
+ }
+ }
return 0;
+
}
static inline int deputy_pre_usermode(void)
@@ -206,7 +224,6 @@
static int __init openmosix_init(void)
{
/* kick off the kernel threads: */
- kernel_thread(openmosix_mig_daemon, NULL, 0);
return 0;
}