UML - Eliminate setjmp_wrapper
PATCH 3/5 UML - Eliminate setjmp_wrapper
setjmp_wrapper existed to provide setjmp to kernel code when UML used libc's setjmp and longjmp. Now that UML has its own implementation, this isn't needed and kernel code can invoke setjmp directly.
do_buffer_op is massively cleaned up since it is no longer a callback from setjmp_wrapper and given a va_list from which it must extract its arguments.
The actual setjmp is moved from buffer_op to do_op_one_page because the copy operation is inside an atomic section (kmap_atomic to kunmap_atomic) and it shouldn't be longjmp-ed out of.
--- arch/um/include/os.h | 1 arch/um/kernel/skas/uaccess.c | 73 +++++++++++++++--------------------------- arch/um/os-Linux/util.c | 15 -------- 3 files changed, 27 insertions(+), 62 deletions(-)
arch/um/include/os.h +0 -1
@@ -237,7 +237,6 @@ extern void stack_protections(unsigned lextern int raw (int fd);extern void setup_machinename (char *machine_out);extern void setup_hostinfo (char *buf,int len); -extern int setjmp_wrapper (void (*proc)(void *,void *), ...);extern void os_dump_core (void );/* time.c */
arch/um/kernel/skas/uaccess.c +27 -46
118 lines not on this page · raw message
arch/um/os-Linux/util.c +0 -15
@@ -88,21 +88,6 @@ void setup_hostinfo(char *buf, int len) host.release, host.version, host.machine); } -int setjmp_wrapper (void (*proc)(void *,void *), ...) -{ -va_list args; -jmp_buf buf; -int n; - - n =UML_SETJMP (&buf); -if (n ==0 ){ -va_start (args, proc); - (*proc)(&buf, &args); - } -va_end (args); -return n; -} -void os_dump_core (void ) {int pid;
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel