Removed sys_run_binary()
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 23 Jul 2010 21:30:25 +0000 (14:30 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:35:49 +0000 (17:35 -0700)
kern/include/ros/bits/syscall.h
kern/src/syscall.c
user/include/parlib.h
user/parlib/syscall.c

index 29f571b..fca18fd 100644 (file)
@@ -1,8 +1,11 @@
 #ifndef ROS_INCLUDE_BITS_SYSCALL_H
 #define ROS_INCLUDE_BITS_SYSCALL_H
 
-/* system call numbers.  need to #def them for use in assembly. */
+/* system call numbers.  need to #def them for use in assembly.  Removing
+ * useless ones is okay, but if we change a number, we'll need to rebuild
+ * userspace (which is why we have holes). */
 #define SYS_null                                        1
+/* buster renumbered */
 #define SYS_cache_invalidate            3
 #define SYS_reboot                                      4
 #define SYS_cputs                                       5
@@ -14,7 +17,7 @@
 #define SYS_proc_run                           11
 #define SYS_proc_destroy                       12
 #define SYS_yield                                      13
-#define SYS_run_binary                         14
+/* sys_run_binary removed */
 #define SYS_fork                                       15
 #define SYS_exec                                       16
 #define SYS_trywait                                    17
index 64dc73a..c59d8b8 100644 (file)
@@ -278,33 +278,6 @@ static int sys_proc_yield(struct proc *p, bool being_nice)
        return 0;
 }
 
-static ssize_t sys_run_binary(env_t* e, void *DANGEROUS binary_buf, size_t len,
-                              procinfo_t*DANGEROUS procinfo, size_t num_colors)
-{
-       printk("sys_run_binary() is deprecated and does nothing, pending removal.");
-#if 0
-       env_t* env = proc_create(NULL,0);
-       assert(env != NULL);
-
-       // let me know if you use this.  we need to sort process creation better.
-       if(memcpy_from_user(e,e->procinfo,procinfo,sizeof(*procinfo)))
-               return -1;
-       proc_init_procinfo(e);
-
-       env_load_icode(env,e,binary_buf,len);
-       __proc_set_state(env, PROC_RUNNABLE_S);
-       schedule_proc(env);
-       if(num_colors > 0) {
-               env->cache_colors_map = cache_colors_map_alloc();
-               for(int i=0; i<num_colors; i++)
-                       cache_color_alloc(llc_cache, env->cache_colors_map);
-       }
-       proc_decref(env, 1);
-       proc_yield(e, 0);
-#endif
-       return 0;
-}
-
 static ssize_t sys_fork(env_t* e)
 {
        // TODO: right now we only support fork for single-core processes
@@ -1070,7 +1043,6 @@ intreg_t syscall(struct proc *p, uintreg_t syscallno, uintreg_t a1,
                [SYS_proc_run] = (syscall_t)sys_proc_run,
                [SYS_proc_destroy] = (syscall_t)sys_proc_destroy,
                [SYS_yield] = (syscall_t)sys_proc_yield,
-               [SYS_run_binary] = (syscall_t)sys_run_binary,
                [SYS_fork] = (syscall_t)sys_fork,
                [SYS_exec] = (syscall_t)sys_exec,
                [SYS_trywait] = (syscall_t)sys_trywait,
index 3d3bb16..8e9719c 100644 (file)
@@ -29,8 +29,6 @@ ssize_t     sys_serial_write(void* buf, size_t len);
 ssize_t     sys_serial_read(void* buf, size_t len);
 ssize_t     sys_eth_write(void *COUNT(len) buf, size_t len); 
 ssize_t     sys_eth_read(void *COUNT(len) buf, size_t len);
-ssize_t     sys_run_binary(void* binary_buf, size_t len,
-                           const procinfo_t* pi, size_t num_colors);
 size_t      sys_getcpuid(void);
 void *      sys_brk(void* addr);
 /* Process Management */
index 1a4fb2c..f9d4a4c 100644 (file)
@@ -62,14 +62,6 @@ ssize_t sys_serial_read(void* buf, size_t len)
        return ros_syscall(SYS_serial_read, buf, len, 0, 0, 0);
 }
 
-//Run a binary loaded at the specificed address with the specified arguments
-ssize_t sys_run_binary(void* binary_buf, size_t len,
-                       const procinfo_t* pi, size_t num_colors) 
-{
-       return ros_syscall(SYS_run_binary, binary_buf, len,
-                                       pi,num_colors,0);
-}
-
 //Write a buffer over ethernet
 ssize_t sys_eth_write(void* buf, size_t len) 
 {