Thread (45 messages) 45 messages, 10 authors, 2007-02-13

Re: [PATCH 6/10] lguest code: the little linux hypervisor.

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2007-02-09 09:35:40
Also in: lkml

On Fri, 09 Feb 2007 20:20:27 +1100 Rusty Russell [off-list ref] wrote:
+#define log(...)					\
+	do {						\
+		mm_segment_t oldfs = get_fs();		\
+		char buf[100];				\
+		sprintf(buf, "lguest:" __VA_ARGS__);	\
+		set_fs(KERNEL_DS);			\
+		sys_write(1, buf, strlen(buf));		\
+		set_fs(oldfs);				\
+	} while(0)
Due to gcc shortcomings, each instance of this will chew an additional 100
bytes of stack.  Unless they fixed it recently.  Is a bit of a timebomb.  I
guess ksaprintf() could be used.

It also looks a bit, umm, innovative.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help