From: Erik Walthinsen <omega@te...> - 2003-04-28 22:35:38
I'm trying to add various bits of debugging to uml_net, and I'm finding
that there are at least 3 methods of outputting strings, and only one of
them seems to work.
The first is printf/fprintf, which never seems to do anything (though the
only existing cases are bad failure modes).
The second is the struct output with write_output(), which writes an
integer length and then the string itself. This doesn't seem to do
The third method, the only one that seems to work, is done by constructing
a message with an iov and using sendmsg().
Is this lack of consistency intentional (i.e. I'm missing something), or
is there something wrong here that needs to be corrected somehow, i.e. by
moving around the output methods and rewriting the various cases to be
consistent? If so, I'm willing to do the necessary work in order to make
it sane <g>
Erik Walthinsen <omega@...> - System Administrator
/ \ GStreamer - The only way to stream!
| | M E G A ***** http://gstreamer.net/ *****
From: Kalyana Chakravarthy Koka <koka@it...> - 2003-04-28 22:50:24
I am planning to add virtual time line to uml in an effort to simulate a
physical machine, and the user specifies the characteristics of physical
machine to be simulated.
I understood ptracing in tt mode, but not completely in skas mode. How is
ptracing different in skas mode ? I find multiple threads doing a waitpid
on single userspace thread , whats the logic behind it. A ptrace thread is
handling the event based on signal number, do the userspace UML thread in
skas again handles it.
From: Jeff Dike <jdike@ka...> - 2003-04-29 18:46:34
> I understood ptracing in tt mode, but not completely in skas mode. How
> is ptracing different in skas mode ?
In skas mode, there are two threads, one which runs the kernel and one which
runs userspace. The kernel thread ptraces the userspace thread, intercepting
and nullifying system calls and interrupts.
It reads the system call or signal information from the userspace thread
and acts on it in whatever way is appropriate, calling the system call, IRQ,
or passing the signal along to the process inside UML.
From: Kalyana Chakravarthy Koka <koka@it...> - 2003-05-03 04:02:49
I am designing a model in which UML runs on virtual timeline. When a
userspace UML thread receives a SIGVTALRM it stops in do_signal() and
notifies parent kernel UML thread. Then the kernel thread handles the
SIGVTALRM by calling do_irq(timer interrupt). After this is done kernel
UML thread restarts the userspace UML thread. Even though the userspace
UML thread gets the SIGVTALRM it is the kernel UML thread that executes
do_irq(). So a userspace thread will never execute any code in UML , as
kernel UML executes UML code on behalf of userspace UML thread.
Is my understanding about SIGVTALRM handler correct.
From: Jeff Dike <jdike@ka...> - 2003-05-04 19:58:18
> Is my understanding about SIGVTALRM handler correct.
Yes. The userspace thread never enters the kernel. Any signals it gets
are intercepted and nullified by the kernelspace thread.