00001 // _Id: syssetmod.c,v 1.7 2008-01-06 07:59:05 roart Exp $ 00002 // _Locker: $ 00003 00004 // Author. Roar Thronęs. 00005 00006 #include<linux/linkage.h> 00007 #include<linux/kernel.h> 00008 #include<linux/sched.h> 00009 #include<internals.h> 00010 #include<ipldef.h> 00011 #include<pcbdef.h> 00012 #include<prvdef.h> 00013 #include<ssdef.h> 00014 #include<system_data_cells.h> 00015 00016 asmlinkage int exe_setrwm(int flags) { 00017 printk("setrwm not implemented\n"); 00018 return SS__NORMAL; 00019 } 00020 00021 asmlinkage int exe_setswm(int flags) { 00022 int priv = ctl_gl_pcb->pcb$l_priv; 00023 if ((priv & PRV_M_PSWAPM) == 0) 00024 return SS__NOPRIV; // check 00025 int oldipl = vmslock(&SPIN_SCHED, IPL__SCHED); 00026 if (flags) 00027 ctl_gl_pcb->pcb$l_sts |= PCB$M_PSWAPM; 00028 else 00029 ctl_gl_pcb->pcb$l_sts &= ~PCB$M_PSWAPM; 00030 vmsunlock(&SPIN_SCHED, oldipl); 00031 return SS__NORMAL; 00032 } 00033 00034