From 073464feebed0b8139b52b2045c71e20b6d8ab44 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 16 Apr 2013 23:16:51 +0200 Subject: IRC. --- microkernel/mach/deficiencies.mdwn | 16 ++++++++++++++++ .../mach/gnumach/interface/syscall/mach_print.mdwn | 8 ++++++++ .../gnumach/interface/syscall/mach_print/Makefile | 9 +++++++++ .../interface/syscall/mach_print/mach_print.S | 3 +++ .../gnumach/interface/syscall/mach_print/main.c | 21 +++++++++++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 microkernel/mach/gnumach/interface/syscall/mach_print/Makefile create mode 100644 microkernel/mach/gnumach/interface/syscall/mach_print/mach_print.S create mode 100644 microkernel/mach/gnumach/interface/syscall/mach_print/main.c (limited to 'microkernel') 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) i don't understand viengoos well enough to do it that way + + +## IRC, freenode, #hurd, 2013-04-13 + + a microkernel loosely based on mach for a future hurd-like system + ok. no way! Are you in the process of building a micro-kernel + that the hurd may someday run on? + not the hurd, a hurd-like system + ok wow. sounds pretty cool, and tricky + 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 + doing that requires deep changes in the low level interfaces + imo, a rewrite is more appropriate + sometimes, things done in x15 can be ported to the hurd + 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]]."]]"""]] k if it's fine with you, i'll commit it too I'm fine + + +## IRC, freenode, #hurd, 2013-04-07 + + 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 + +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 +#include +#include + +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; +} -- cgit v1.2.3