Commit 31a47189 authored by Jeff Dike's avatar Jeff Dike

Fixes to the last merge.

parent 952b67f1
...@@ -31,7 +31,9 @@ core-y += $(ARCH_DIR)/kernel/ \ ...@@ -31,7 +31,9 @@ core-y += $(ARCH_DIR)/kernel/ \
$(ARCH_DIR)/drivers/ \ $(ARCH_DIR)/drivers/ \
$(ARCH_DIR)/sys-$(SUBARCH)/ $(ARCH_DIR)/sys-$(SUBARCH)/
ARCH_INCLUDE = $(TOPDIR)/$(ARCH_DIR)/include ARCH_INCLUDE = $(ARCH_DIR)/include
MODE_INCLUDE = -I$(ARCH_DIR)/kernel/tt/include \
-I$(ARCH_DIR)/kernel/skas/include
# -Derrno=kernel_errno - This turns all kernel references to errno into # -Derrno=kernel_errno - This turns all kernel references to errno into
# kernel_errno to separate them from the libc errno. This allows -fno-common # kernel_errno to separate them from the libc errno. This allows -fno-common
...@@ -39,7 +41,8 @@ ARCH_INCLUDE = $(TOPDIR)/$(ARCH_DIR)/include ...@@ -39,7 +41,8 @@ ARCH_INCLUDE = $(TOPDIR)/$(ARCH_DIR)/include
# errnos. # errnos.
CFLAGS += $(DEBUG) $(PROFILE) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ CFLAGS += $(DEBUG) $(PROFILE) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
-D_LARGEFILE64_SOURCE -I$(ARCH_INCLUDE) -Derrno=kernel_errno -D_LARGEFILE64_SOURCE -I$(ARCH_INCLUDE) -Derrno=kernel_errno \
$(MODE_INCLUDE)
LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
...@@ -79,7 +82,8 @@ linux: arch/um/uml.lds.s vmlinux ...@@ -79,7 +82,8 @@ linux: arch/um/uml.lds.s vmlinux
USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))
USER_CFLAGS := $(patsubst -Derrno=kernel_errno,,$(USER_CFLAGS)) USER_CFLAGS := $(patsubst -Derrno=kernel_errno,,$(USER_CFLAGS))
USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) -I$(ARCH_INCLUDE) USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) -I$(ARCH_INCLUDE) \
$(MODE_INCLUDE)
# To get a definition of F_SETSIG # To get a definition of F_SETSIG
USER_CFLAGS += -D_GNU_SOURCE USER_CFLAGS += -D_GNU_SOURCE
......
...@@ -293,6 +293,7 @@ static void init_registers(int pid) ...@@ -293,6 +293,7 @@ static void init_registers(int pid)
int can_do_skas(void) int can_do_skas(void)
{ {
#ifdef CONFIG_MODE_SKAS
struct ptrace_faultinfo fi; struct ptrace_faultinfo fi;
void *stack; void *stack;
int pid, n, ret = 1; int pid, n, ret = 1;
......
...@@ -251,7 +251,7 @@ void *switch_to(void *prev, void *next, void *last) ...@@ -251,7 +251,7 @@ void *switch_to(void *prev, void *next, void *last)
reading = 1; reading = 1;
if((from->state == TASK_ZOMBIE) || (from->state == TASK_DEAD)) if((from->state == TASK_ZOMBIE) || (from->state == TASK_DEAD))
os_kill_process(os_getpid()); os_kill_process(os_getpid(), 0);
err = os_read_file(from->thread.switch_pipe[0], &c, sizeof(c)); err = os_read_file(from->thread.switch_pipe[0], &c, sizeof(c));
if(err != sizeof(c)) if(err != sizeof(c))
...@@ -295,7 +295,7 @@ void interrupt_end(void) ...@@ -295,7 +295,7 @@ void interrupt_end(void)
void release_thread(struct task_struct *task) void release_thread(struct task_struct *task)
{ {
os_kill_process(task->thread.extern_pid); os_kill_process(task->thread.extern_pid, 0);
} }
void exit_thread(void) void exit_thread(void)
......
...@@ -18,7 +18,7 @@ static void kill_idlers(int me) ...@@ -18,7 +18,7 @@ static void kill_idlers(int me)
for(i = 0; i < sizeof(idle_threads)/sizeof(idle_threads[0]); i++){ for(i = 0; i < sizeof(idle_threads)/sizeof(idle_threads[0]); i++){
p = idle_threads[i]; p = idle_threads[i];
if((p != NULL) && (p->thread.extern_pid != me)) if((p != NULL) && (p->thread.extern_pid != me))
os_kill_process(p->thread.extern_pid); os_kill_process(p->thread.extern_pid, 0);
} }
} }
#endif #endif
...@@ -31,10 +31,10 @@ static void kill_off_processes(void) ...@@ -31,10 +31,10 @@ static void kill_off_processes(void)
me = os_getpid(); me = os_getpid();
for_each_process(p){ for_each_process(p){
if(p->thread.extern_pid != me) if(p->thread.extern_pid != me)
os_kill_process(p->thread.extern_pid); os_kill_process(p->thread.extern_pid, 0);
} }
if(init_task.thread.extern_pid != me) if(init_task.thread.extern_pid != me)
os_kill_process(init_task.thread.extern_pid); os_kill_process(init_task.thread.extern_pid, 0);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
kill_idlers(me); kill_idlers(me);
#endif #endif
...@@ -51,7 +51,7 @@ void machine_restart(char * __unused) ...@@ -51,7 +51,7 @@ void machine_restart(char * __unused)
do_uml_exitcalls(); do_uml_exitcalls();
kill_off_processes(); kill_off_processes();
tracing_reboot(); tracing_reboot();
os_kill_process(os_getpid()); os_kill_process(os_getpid(), 0);
} }
void machine_power_off(void) void machine_power_off(void)
...@@ -59,7 +59,7 @@ void machine_power_off(void) ...@@ -59,7 +59,7 @@ void machine_power_off(void)
do_uml_exitcalls(); do_uml_exitcalls();
kill_off_processes(); kill_off_processes();
tracing_halt(); tracing_halt();
os_kill_process(os_getpid()); os_kill_process(os_getpid(), 0);
} }
void machine_halt(void) void machine_halt(void)
......
...@@ -102,15 +102,6 @@ int get_signals(void) ...@@ -102,15 +102,6 @@ int get_signals(void)
return(enable_mask(&mask)); return(enable_mask(&mask));
} }
int get_signals(void)
{
sigset_t mask;
if(sigprocmask(SIG_SETMASK, NULL, &mask) < 0)
panic("Failed to get signal mask");
return(enable_mask(&mask));
}
int set_signals(int enable) int set_signals(int enable)
{ {
sigset_t mask; sigset_t mask;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment