UML - Finish conversion to sigjmp_buf/siglongjmp
PATCH 1/1 UML - Finish conversion to sigjmp_buf/siglongjmp
UML needs to use siglongjmp instead of longjmp everywhere. This patch fixes the remaining longjmp/jmp_buf occurrences.
Signed-off-by Jeff Dike <[email protected]>
arch/um/kernel/process.c +1 -1
@@ -297,7 +297,7 @@int run_kernel_thread (int (*fn)(void *),void *arg,void **jmp_ptr) { -jmp_buf buf; +sigjmp_buf buf;int n; *jmp_ptr = &buf;
arch/um/kernel/skas/process.c +7 -7
@@ -209,7 +209,7 @@ void (*handler)(int)) {unsigned long flags; -jmp_buf switch_buf, fork_buf; +sigjmp_buf switch_buf, fork_buf; *switch_buf_ptr = &switch_buf; *fork_buf_ptr = &fork_buf;
@@ -233,7 +233,7 @@void thread_wait (void *sw,void *fb) { -jmp_buf buf, **switch_buf = sw, *fork_buf; +sigjmp_buf buf, **switch_buf = sw, *fork_buf; *switch_buf = &buf; fork_buf = fb;
@@ -295,23 +295,23 @@void switch_threads (void *me,void *next) { -jmp_buf my_buf, **me_ptr = me, *next_buf = next; +sigjmp_buf my_buf, **me_ptr = me, *next_buf = next; *me_ptr = &my_buf;if (sigsetjmp (my_buf,1 ) ==0 )siglongjmp (*next_buf,1 ); } -static jmp_buf initial_jmpbuf; +static sigjmp_buf initial_jmpbuf;/* XXX Make these percpu */ static void (*cb_proc)(void *arg);static void *cb_arg; -static jmp_buf *cb_back; +static sigjmp_buf *cb_back;int start_idle_thread (void *stack,void *switch_buf_ptr,void **fork_buf_ptr) { -jmp_buf **switch_buf = switch_buf_ptr; +sigjmp_buf **switch_buf = switch_buf_ptr;int n; *fork_buf_ptr = &initial_jmpbuf;
@@ -347,7 +347,7 @@void initial_thread_cb_skas (void (*proc)(void *),void *arg) { -jmp_buf here; +sigjmp_buf here; cb_proc = proc; cb_arg = arg;
arch/um/kernel/trap_user.c +1 -1
@@ -127,7 +127,7 @@void do_longjmp (void *b,int val) { -jmp_buf *buf = b; +sigjmp_buf *buf = b;siglongjmp (*buf, val); }
arch/um/kernel/tt/uaccess_user.c +1 -1
@@ -72,7 +72,7 @@struct tt_regs save =TASK_REGS (get_current ())->tt;int ret;unsigned long *faddrp = (unsigned long *)fault_addr; -jmp_buf jbuf; +sigjmp_buf jbuf; *fault_catcher = &jbuf;if (sigsetjmp (jbuf,1 ) ==0 )
arch/um/kernel/uaccess_user.c +1 -1
@@ -17,8 +17,8 @@ int n), int *faulted_out) { unsigned long *faddrp = (unsigned long *) fault_addr, ret; +sigjmp_buf jbuf; -jmp_buf jbuf; *fault_catcher = &jbuf;if (sigsetjmp (jbuf,1 ) ==0 ){ (*op)(to, from, n);
More recent patches modify files in sigjmp.