00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <system_data_cells.h>
00013 #include <acbdef.h>
00014 #include <pridef.h>
00015 #include <cpudef.h>
00016 #include <psldef.h>
00017 #include <ssdef.h>
00018 #include <sch_routines.h>
00019 #include <linux/smp.h>
00020 #include <asm/current.h>
00021 #include <linux/sched.h>
00022 #include <linux/vmalloc.h>
00023 #include <linux/slab.h>
00024
00025
00026
00027
00028
00029
00030
00031
00032 int exe_setast(char enbflg) {
00033 struct _cpu * cpu=smp_gl_cpu_data[smp_processor_id()];
00034 struct _pcb * p=ctl_gl_pcb;
00035 int retval;
00036
00037 if (p->pcb_b_asten&(1<<p->psl_prv_mod))
00038 retval=SS__WASSET;
00039 else
00040 retval=SS__WASCLR;
00041
00042 if (p->oldpsl_prv_mod!=PSL_C_USER) {
00043 back:
00044 if (enbflg)
00045 p->pcb_b_asten|=(1<<p->psl_prv_mod);
00046 else
00047 p->pcb_b_asten&=~(1<<p->psl_prv_mod);
00048 sch_newlvl(p);
00049 return retval;
00050 }
00051 goto back;
00052 return retval;
00053 }
00054
00055
00056
00057
00058
00059
00060
00061
00062 int exe_dclast(void (*astadr)(__unknown_params), unsigned long astprm, unsigned int acmode) {
00063 struct _cpu * cpu=smp_gl_cpu_data[smp_processor_id()];
00064 struct _pcb * p=ctl_gl_pcb;
00065
00066 struct _acb * a=kmalloc(sizeof(struct _acb),GFP_KERNEL);
00067 memset(a,0,sizeof(struct _acb));
00068 a->acb_l_pid=p->pcb$l_pid;
00069 a->acb_l_ast=astadr;
00070 a->acb_l_astprm=astprm;
00071 if (p->psl_prv_mod > acmode)
00072 acmode = p->psl_prv_mod;
00073 a->acb_b_rmod=acmode;
00074
00075 sch_qast(p->pcb$l_pid,PRI$_NULL,a);
00076 return SS__NORMAL;
00077 }
00078