On Fri, Mar 17, 2006 at 08:36:58PM +0100, Blaisorblade wrote:
> 2) write_sigio_thread should do a "down" on a semaphore/mutex and the first
> update_thread should "up" it. As usually, this semaphore would be indeed
> implemented as a pipe.
Is there anything wrong with this:
Index: linux-2.6.15/arch/um/os-Linux/sigio.c
===================================================================
--- linux-2.6.15.orig/arch/um/os-Linux/sigio.c 2006-03-20 19:48:51.000000000
-0500
+++ linux-2.6.15/arch/um/os-Linux/sigio.c 2006-03-20 19:49:55.000000000
-0500
@@ -271,6 +271,10 @@ void write_sigio_workaround(void)
if(write_sigio_pid != -1)
goto out_unlock;
+ current_poll = ((struct pollfds) { .poll = p,
+ .used = 1,
+ .size = 1 });
+
write_sigio_pid = run_helper_thread(write_sigio_thread, NULL,
CLONE_FILES | CLONE_VM, &stack, 0);
@@ -284,10 +288,6 @@ void write_sigio_workaround(void)
memcpy(write_sigio_fds, l_write_sigio_fds, sizeof(l_write_sigio_fds));
memcpy(sigio_private, l_sigio_private, sizeof(l_sigio_private));
- current_poll = ((struct pollfds) { .poll = p,
- .used = 1,
- .size = 1 });
-
sigio_unlock();
return;
That seems to me to fix the basic problem - the thread is using data
that hasn't been set up yet, and I don't see that moving it up breaks
anything.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel