#include <linux/sem.h>
#include <linux/msg.h>
#include <linux/shm.h>
+#include <linux/vs_cvirt.h>
+#include <linux/compiler.h>
#include <asm/branch.h>
#include <asm/cachectl.h>
int do_color_align;
unsigned long task_size;
-#if CONFIG_MIPS32
+#ifdef CONFIG_MIPS32
task_size = TASK_SIZE;
#else
task_size = (current->thread.mflags & MF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE;
}
save_static_function(sys_fork);
-static_unused int _sys_fork(nabi_no_regargs struct pt_regs regs)
+__attribute_used__ noinline static int
+_sys_fork(nabi_no_regargs struct pt_regs regs)
{
return do_fork(SIGCHLD, regs.regs[29], ®s, 0, NULL, NULL);
}
save_static_function(sys_clone);
-static_unused int _sys_clone(nabi_no_regargs struct pt_regs regs)
+__attribute_used__ noinline static int
+_sys_clone(nabi_no_regargs struct pt_regs regs)
{
unsigned long clone_flags;
unsigned long newsp;
newsp = regs.regs[29];
parent_tidptr = (int *) regs.regs[6];
child_tidptr = (int *) regs.regs[7];
- return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, ®s, 0,
+ return do_fork(clone_flags, newsp, ®s, 0,
parent_tidptr, child_tidptr);
}
*/
asmlinkage int sys_uname(struct old_utsname * name)
{
- if (name && !copy_to_user(name, &system_utsname, sizeof (*name)))
+ if (name && !copy_to_user(name, vx_new_utsname(), sizeof (*name)))
return 0;
return -EFAULT;
}
asmlinkage int sys_olduname(struct oldold_utsname * name)
{
int error;
+ struct new_utsname *ptr;
if (!name)
return -EFAULT;
if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
return -EFAULT;
- error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
+ ptr = vx_new_utsname();
+ error = __copy_to_user(&name->sysname,ptr->sysname,__OLD_UTS_LEN);
error -= __put_user(0,name->sysname+__OLD_UTS_LEN);
- error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
+ error -= __copy_to_user(&name->nodename,ptr->nodename,__OLD_UTS_LEN);
error -= __put_user(0,name->nodename+__OLD_UTS_LEN);
- error -= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
+ error -= __copy_to_user(&name->release,ptr->release,__OLD_UTS_LEN);
error -= __put_user(0,name->release+__OLD_UTS_LEN);
- error -= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
+ error -= __copy_to_user(&name->version,ptr->version,__OLD_UTS_LEN);
error -= __put_user(0,name->version+__OLD_UTS_LEN);
- error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
+ error -= __copy_to_user(&name->machine,ptr->machine,__OLD_UTS_LEN);
error = __put_user(0,name->machine+__OLD_UTS_LEN);
error = error ? -EFAULT : 0;
return -EFAULT;
down_write(&uts_sem);
- strncpy(system_utsname.nodename, nodename, len);
+ strncpy(vx_new_uts(nodename), nodename, len);
nodename[__NEW_UTS_LEN] = '\0';
- strlcpy(system_utsname.nodename, nodename,
- sizeof(system_utsname.nodename));
+ strlcpy(vx_new_uts(nodename), nodename,
+ sizeof(vx_new_uts(nodename)));
up_write(&uts_sem);
return 0;
}