PTRACE_PEEKDATA consolidation
[safe/jmp/linux-2.6] / arch / um / kernel / smp.c
index 47b6908..e6a7778 100644 (file)
@@ -47,7 +47,7 @@ struct task_struct *idle_threads[NR_CPUS];
 
 void smp_send_reschedule(int cpu)
 {
-       os_write_file_k(cpu_data[cpu].ipi_pipe[1], "R", 1);
+       os_write_file(cpu_data[cpu].ipi_pipe[1], "R", 1);
        num_reschedules_sent++;
 }
 
@@ -59,7 +59,7 @@ void smp_send_stop(void)
        for(i = 0; i < num_online_cpus(); i++){
                if(i == current_thread->cpu)
                        continue;
-               os_write_file_k(cpu_data[i].ipi_pipe[1], "S", 1);
+               os_write_file(cpu_data[i].ipi_pipe[1], "S", 1);
        }
        printk("done\n");
 }
@@ -89,7 +89,7 @@ static int idle_proc(void *cpup)
 
        cpu_set(cpu, cpu_online_map);
        default_idle();
-       return(0);
+       return 0;
 }
 
 static struct task_struct *idle_thread(int cpu)
@@ -97,8 +97,8 @@ static struct task_struct *idle_thread(int cpu)
        struct task_struct *new_task;
        unsigned char c;
 
-        current->thread.request.u.thread.proc = idle_proc;
-        current->thread.request.u.thread.arg = (void *) cpu;
+       current->thread.request.u.thread.proc = idle_proc;
+       current->thread.request.u.thread.arg = (void *) cpu;
        new_task = fork_idle(cpu);
        if(IS_ERR(new_task))
                panic("copy_process failed in idle_thread, error = %ld",
@@ -108,10 +108,10 @@ static struct task_struct *idle_thread(int cpu)
                          { .pid =      new_task->thread.mode.tt.extern_pid,
                            .task =     new_task } );
        idle_threads[cpu] = new_task;
-       CHOOSE_MODE(os_write_file_k(new_task->thread.mode.tt.switch_pipe[1], &c,
-                                   sizeof(c)),
+       CHOOSE_MODE(os_write_file(new_task->thread.mode.tt.switch_pipe[1], &c,
+                                 sizeof(c)),
                    ({ panic("skas mode doesn't support SMP"); }));
-       return(new_task);
+       return new_task;
 }
 
 void smp_prepare_cpus(unsigned int maxcpus)
@@ -162,13 +162,13 @@ int __cpu_up(unsigned int cpu)
        cpu_set(cpu, smp_commenced_mask);
        while (!cpu_isset(cpu, cpu_online_map))
                mb();
-       return(0);
+       return 0;
 }
 
 int setup_profiling_timer(unsigned int multiplier)
 {
        printk(KERN_INFO "setup_profiling_timer\n");
-       return(0);
+       return 0;
 }
 
 void smp_call_function_slave(int cpu);
@@ -179,7 +179,7 @@ void IPI_handler(int cpu)
        int fd;
 
        fd = cpu_data[cpu].ipi_pipe[0];
-       while (os_read_file_k(fd, &c, 1) == 1) {
+       while (os_read_file(fd, &c, 1) == 1) {
                switch (c) {
                case 'C':
                        smp_call_function_slave(cpu);
@@ -204,7 +204,7 @@ void IPI_handler(int cpu)
 
 int hard_smp_processor_id(void)
 {
-       return(pid_to_processor_id(os_getpid()));
+       return pid_to_processor_id(os_getpid());
 }
 
 static DEFINE_SPINLOCK(call_lock);
@@ -239,7 +239,7 @@ int smp_call_function(void (*_func)(void *info), void *_info, int nonatomic,
        info = _info;
 
        for_each_online_cpu(i)
-               os_write_file_k(cpu_data[i].ipi_pipe[1], "C", 1);
+               os_write_file(cpu_data[i].ipi_pipe[1], "C", 1);
 
        while (atomic_read(&scf_started) != cpus)
                barrier();
@@ -253,14 +253,3 @@ int smp_call_function(void (*_func)(void *info), void *_info, int nonatomic,
 }
 
 #endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */