2006-07-14 00:24:03 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-10-11 21:01:01 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-01-08 01:01:31 -08:00
|
|
|
|
|
|
|
|
|
2006-01-18 17:42:45 -08:00
|
|
|
|
2006-03-27 01:14:30 -08:00
|
|
|
|
2006-03-31 02:30:23 -08:00
|
|
|
|
[PATCH] uml: thread creation tidying
fork on UML has always somewhat subtle. The underlying cause has been the
need to initialize a stack for the new process. The only portable way to
initialize a new stack is to set it as the alternate signal stack and take a
signal. The signal handler does whatever initialization is needed and jumps
back to the original stack, where the fork processing is finished. The basic
context switching mechanism is a jmp_buf for each process. You switch to a
new process by longjmping to its jmp_buf.
Now that UML has its own implementation of setjmp and longjmp, and I can poke
around inside a jmp_buf without fear that libc will change the structure, a
much simpler mechanism is possible. The jmpbuf can simply be initialized by
hand.
This eliminates -
the need to set up and remove the alternate signal stack
sending and handling a signal
the signal blocking needed around the stack switching, since
there is no stack switching
setting up the jmp_buf needed to jump back to the original
stack after the new one is set up
In addition, since jmp_buf is now defined by UML, and not by libc, it can be
embedded in the thread struct. This makes it unnecessary to have it exist on
the stack, where it used to be. It also simplifies interfaces, since the
switch jmp_buf used to be a void * inside the thread struct, and functions
which took it as an argument needed to define a jmp_buf variable and assign it
from the void *.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 01:50:40 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-05-06 14:51:09 -07:00
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
2006-03-27 01:14:36 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-06-08 15:48:01 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-27 01:14:36 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-09-03 15:57:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-27 01:14:32 -08:00
|
|
|
|
2006-03-31 02:30:25 -08:00
|
|
|
|
2005-09-03 15:57:47 -07:00
|
|
|
|
2005-09-30 11:59:00 -07:00
|
|
|
|
|
|
|
|
|
2005-10-11 21:01:01 +02:00
|
|
|
|
2005-09-30 11:59:00 -07:00
|
|
|
|
2005-10-11 21:01:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-09-30 11:59:00 -07:00
|
|
|
|
2005-09-16 19:27:50 -07:00
|
|
|
|
2005-11-07 00:58:57 -08:00
|
|
|
|
2005-09-16 19:27:50 -07:00
|
|
|
|
2005-09-03 15:57:47 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-03-07 20:41:10 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-03-07 20:41:10 -08:00
|
|
|
|
2006-02-24 13:03:55 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-05-05 16:15:32 -07:00
|
|
|
|
2006-02-24 13:03:55 -08:00
|
|
|
|
2006-09-27 01:50:38 -07:00
|
|
|
|
2005-09-03 15:57:47 -07:00
|
|
|
|
2006-10-11 01:21:33 -07:00
|
|
|
|
2006-09-27 01:50:38 -07:00
|
|
|
|
2006-07-10 04:45:07 -07:00
|
|
|
|
2005-09-03 15:57:47 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-14 00:24:03 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2006-03-31 02:30:08 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2005-09-03 15:57:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-27 01:14:30 -08:00
|
|
|
|
|
|
|
|
|
2006-01-18 17:42:41 -08:00
|
|
|
|
2005-09-16 19:27:50 -07:00
|
|
|
|
|
|
|
|
|
2005-09-03 15:57:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-07 00:58:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-25 11:09:39 -08:00
|
|
|
|
|
|
|
|
|
2005-11-07 00:58:51 -08:00
|
|
|
|
2007-07-15 23:38:56 -07:00
|
|
|
|
2005-11-07 00:58:51 -08:00
|
|
|
|
2007-07-15 23:38:56 -07:00
|
|
|
|
2005-11-07 00:58:51 -08:00
|
|
|
|
|
|
|
|
|
2006-03-31 02:30:22 -08:00
|
|
|
|
|
|
|
|
|
2006-03-31 02:30:23 -08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-03-31 02:30:23 -08:00
|
|
|
|
2006-01-06 00:18:59 -08:00
|
|
|
|
2006-01-06 00:19:01 -08:00
|
|
|
|
|
|
|
|
|
2006-01-06 00:18:59 -08:00
|
|
|
|
2006-01-08 01:01:29 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-08 01:01:31 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-18 17:42:41 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-06 14:50:59 -07:00
|
|
|
|
2006-01-18 17:42:41 -08:00
|
|
|
|
2007-05-06 14:51:39 -07:00
|
|
|
|
2006-01-18 17:42:41 -08:00
|
|
|
|
2006-01-18 17:42:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-25 23:33:05 -07:00
|
|
|
|
|
|
|
|
|
2006-01-18 17:42:42 -08:00
|
|
|
|
2006-09-25 23:33:05 -07:00
|
|
|
|
2006-01-18 17:42:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-18 17:42:45 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-06 14:51:48 -07:00
|
|
|
|
2006-01-18 17:42:45 -08:00
|
|
|
|
2007-05-06 14:51:45 -07:00
|
|
|
|
2006-01-18 17:42:45 -08:00
|
|
|
|
|
|
|
|
|
2007-05-06 14:51:48 -07:00
|
|
|
|
2006-01-18 17:42:45 -08:00
|
|
|
|
2006-01-18 17:42:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[PATCH] uml: thread creation tidying
fork on UML has always somewhat subtle. The underlying cause has been the
need to initialize a stack for the new process. The only portable way to
initialize a new stack is to set it as the alternate signal stack and take a
signal. The signal handler does whatever initialization is needed and jumps
back to the original stack, where the fork processing is finished. The basic
context switching mechanism is a jmp_buf for each process. You switch to a
new process by longjmping to its jmp_buf.
Now that UML has its own implementation of setjmp and longjmp, and I can poke
around inside a jmp_buf without fear that libc will change the structure, a
much simpler mechanism is possible. The jmpbuf can simply be initialized by
hand.
This eliminates -
the need to set up and remove the alternate signal stack
sending and handling a signal
the signal blocking needed around the stack switching, since
there is no stack switching
setting up the jmp_buf needed to jump back to the original
stack after the new one is set up
In addition, since jmp_buf is now defined by UML, and not by libc, it can be
embedded in the thread struct. This makes it unnecessary to have it exist on
the stack, where it used to be. It also simplifies interfaces, since the
switch jmp_buf used to be a void * inside the thread struct, and functions
which took it as an argument needed to define a jmp_buf variable and assign it
from the void *.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 01:50:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-18 17:42:46 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-27 01:14:30 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-03-27 01:14:33 -08:00
|
|
|
|
[PATCH] uml: SIGIO cleanups
- Various cleanups in the sigio code.
- Removed explicit zero-initializations of a few structures.
- Improved some error messages.
- An API change - there was an asymmetry between reactivate_fd calling
maybe_sigio_broken, which goes through all the machinery of figuring out if
a file descriptor supports SIGIO and applying the workaround to it if not,
and deactivate_fd, which just turns off the descriptor.
This is changed so that only activate_fd calls maybe_sigio_broken, when
the descriptor is first seen. reactivate_fd now calls add_sigio_fd, which
is symmetric with ignore_sigio_fd.
This removes a recursion which makes a critical section look more critical
than it really was, obsoleting a big comment to that effect. This requires
keeping track of all descriptors which are getting the SIGIO treatment, not
just the ones being polled at any given moment, so that reactivate_fd,
through add_sigio_fd, doesn't try to tell the SIGIO thread about descriptors
it doesn't care about.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-25 23:33:04 -07:00
|
|
|
|
2006-03-27 01:14:33 -08:00
|
|
|
|
2006-07-10 04:45:11 -07:00
|
|
|
|
2006-03-27 01:14:33 -08:00
|
|
|
|
2006-03-27 01:14:36 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-06 14:51:09 -07:00
|
|
|
|
2007-02-10 01:44:29 -08:00
|
|
|
|
|
|
|
|
|
2007-05-06 14:51:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-06 00:18:59 -08:00
|
|
|
|