summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-04-16 23:29:36 +0200
committerThomas Schwinge <thomas@codesourcery.com>2013-04-16 23:29:36 +0200
commitc9c05955697a4a5a82f1c7ef7cb3f6d5d817331a (patch)
treeefc9d96cd352b2b5245fec0d535667a7ac82f289
parentadbfe5d8b9645308dc03d6da922acc07802750b8 (diff)
parent073464feebed0b8139b52b2045c71e20b6d8ab44 (diff)
Merge remote-tracking branch 'fp/master' into HEAD
-rw-r--r--microkernel/mach/deficiencies.mdwn16
-rw-r--r--microkernel/mach/gnumach/interface/syscall/mach_print.mdwn8
-rw-r--r--microkernel/mach/gnumach/interface/syscall/mach_print/Makefile9
-rw-r--r--microkernel/mach/gnumach/interface/syscall/mach_print/mach_print.S3
-rw-r--r--microkernel/mach/gnumach/interface/syscall/mach_print/main.c21
5 files changed, 57 insertions, 0 deletions
diff --git a/microkernel/mach/deficiencies.mdwn b/microkernel/mach/deficiencies.mdwn
index dcabb56e..1294b8b3 100644
--- a/microkernel/mach/deficiencies.mdwn
+++ b/microkernel/mach/deficiencies.mdwn
@@ -751,3 +751,19 @@ In context of [[open_issues/multithreading]] and later [[open_issues/select]].
part AIUI, and scheduling contexts can be inherited explicitly too, like
in EROS (and in a way in Viengoos)
<braunr> i don't understand viengoos well enough to do it that way
+
+
+## IRC, freenode, #hurd, 2013-04-13
+
+ <braunr> a microkernel loosely based on mach for a future hurd-like system
+ <JoshuaB> ok. no way! Are you in the process of building a micro-kernel
+ that the hurd may someday run on?
+ <braunr> not the hurd, a hurd-like system
+ <JoshuaB> ok wow. sounds pretty cool, and tricky
+ <braunr> the hurd could, but would require many changes too, and the point
+ of this rewrite is to overcome the most difficult technical performance
+ and scalability problems of the current hurd
+ <braunr> doing that requires deep changes in the low level interfaces
+ <braunr> imo, a rewrite is more appropriate
+ <braunr> sometimes, things done in x15 can be ported to the hurd
+ <braunr> but it still requires a good deal of effort
diff --git a/microkernel/mach/gnumach/interface/syscall/mach_print.mdwn b/microkernel/mach/gnumach/interface/syscall/mach_print.mdwn
index c0b0d0b3..ca52dca5 100644
--- a/microkernel/mach/gnumach/interface/syscall/mach_print.mdwn
+++ b/microkernel/mach/gnumach/interface/syscall/mach_print.mdwn
@@ -51,3 +51,11 @@ License|/fdl]]."]]"""]]
<youpi> k
<braunr> if it's fine with you, i'll commit it too
<youpi> I'm fine
+
+
+## IRC, freenode, #hurd, 2013-04-07
+
+ <braunr> see http://www.sceen.net/~rbraun/mach_print/ for an example to use
+ it
+
+[[Makefile]], [[mach_print.S]], [[main.c]].
diff --git a/microkernel/mach/gnumach/interface/syscall/mach_print/Makefile b/microkernel/mach/gnumach/interface/syscall/mach_print/Makefile
new file mode 100644
index 00000000..8590ef7f
--- /dev/null
+++ b/microkernel/mach/gnumach/interface/syscall/mach_print/Makefile
@@ -0,0 +1,9 @@
+CFLAGS = -O0 -g3
+
+mach_print: main.o mach_print.o
+ gcc -o mach_print main.o mach_print.o
+
+clean:
+ rm -f mach_print *.o
+
+.PHONY: clean
diff --git a/microkernel/mach/gnumach/interface/syscall/mach_print/mach_print.S b/microkernel/mach/gnumach/interface/syscall/mach_print/mach_print.S
new file mode 100644
index 00000000..606a66e6
--- /dev/null
+++ b/microkernel/mach/gnumach/interface/syscall/mach_print/mach_print.S
@@ -0,0 +1,3 @@
+#include <mach/machine/syscall_sw.h>
+
+kernel_trap(mach_print,-30,1)
diff --git a/microkernel/mach/gnumach/interface/syscall/mach_print/main.c b/microkernel/mach/gnumach/interface/syscall/mach_print/main.c
new file mode 100644
index 00000000..23b9fc88
--- /dev/null
+++ b/microkernel/mach/gnumach/interface/syscall/mach_print/main.c
@@ -0,0 +1,21 @@
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void mach_print(char *);
+
+int
+main(int argc, char *argv[])
+{
+ int size;
+ char *s;
+
+ size = snprintf(NULL, 0, "%s\n", argv[1]);
+ assert(size > 0);
+ s = malloc(size);
+ assert(s != NULL);
+ sprintf(s, "%s\n", argv[1]);
+ mach_print(s);
+ free(s);
+ return EXIT_SUCCESS;
+}