00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include<linux/config.h>
00012
00013 #include<starlet.h>
00014 #include<ddtdef.h>
00015 #include<iodef.h>
00016 #include<ipldef.h>
00017 #include<ssdef.h>
00018 #include<misc.h>
00019 #include<irpdef.h>
00020 #include<ucbdef.h>
00021 #include<ccbdef.h>
00022 #include<system_data_cells.h>
00023 #include <queue.h>
00024 #include <ipl.h>
00025 #include<linux/linkage.h>
00026 #include<linux/sched.h>
00027 #include <exe_routines.h>
00028
00029
00030
00031
00032
00033
00034 asmlinkage int exe_cancel(unsigned short int chan) {
00035
00036
00037
00038 setipl(IPL__ASTDEL);
00039 struct _ucb * ucb;
00040 struct _ccb * ccb;
00041
00042 ccb = &ctl_ga_ccb_table[chan];
00043
00044
00045 ucb = ccb->ccb_l_ucb;
00046 struct _pcb * pcb = ctl_gl_pcb;
00047 struct _irp * irph;
00048 irph = &ucb->ucb_l_ioqfl;
00049 struct _irp * irp;
00050 irp = irph->irp_l_ioqfl;
00051
00052 while (irp!=irph) {
00053 struct _irp * next = irp->irp_l_ioqfl;
00054
00055
00056 if (irp->irp_l_pid==pcb->pcb$l_pid && irp->irp$w_chan==chan) {
00057
00058 remque(irp, 0);
00059
00060 irp->irp_l_iost1 = SS$_CANCEL;
00061
00062
00063
00064 com_post(irp, ucb);
00065
00066 }
00067 irp = next;
00068 }
00069
00070 if ((irp = ucb->ucb_l_irp)) {
00071
00072
00073 struct _ddt *ddt;
00074 void (*f)(void *,void *, void* ,void *);
00075 ddt=ucb->ucb_l_ddt;
00076 f=ddt->ddt_l_cancel;
00077 f(irp,pcb,ucb,ccb);
00078
00079 }
00080
00081
00082
00083 setipl(0);
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 return SS__NORMAL;
00094 }
00095