From: Sam King <sam_king18@ya...> - 2003-12-18 22:09:23
I am new to uml development, and I am trying to figure
out some details of how the kernel works.
What are the write_sigio_thread and winch_thread
processes in skas mode used for?
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
From: Jeff Dike <jdike@ad...> - 2003-12-19 01:28:42
On Thu, Dec 18, 2003 at 02:09:22PM -0800, Sam King wrote:
> What are the write_sigio_thread and winch_thread
> processes in skas mode used for?
The write SIGIO thread - until fairly recently, output SIGIO (i.e. a SIGIO
when you can write something to a device) wasn't supported by pty devices.
To work around this, and avoid losing characters when UML is spitting out
lots of stuff, I added this thread. Its job is to wait synchronously (via
poll) until a file descriptor that it has been told to keep track of reports
that it can be written to. At this point, it writes a character down a
pipe (actually a socketpair) waking up the UML kernel proper, which has an
IRQ attached to the other end.
The winch threads - we need a way to receive SIGWINCH on host devices so that
they can be relayed on to whatever UML process is running on the corresponding
console. The problem here is that only the owner of a terminal can receive
SIGWINCH, and a process can only own one terminal. This rules out having UML
itself receive the SIGWINCHs, so these guys exist solely to own a terminal,
receive any SIGWINCHs that they emit, and interrupt UML in the same way as
the SIGIO thread.