00001 #define sys_filescan sys$filescan_not
00002 #include "starlet.h"
00003 #include "sysdep.h"
00004 #include "../../linux/include/asm-i386/unistd.h"
00005 #ifdef compile_um
00006 #include "unistdum.h"
00007 #endif
00008 #include<stdarg.h>
00009
00010 #include <iosbdef.h>
00011 #include <ssdef.h>
00012
00013 #ifndef __x86_64__
00014 int sys_testcode(void) {
00015 return INLINE_SYSCALLTEST(_setprn,0);
00016 }
00017 #endif
00018
00019 #ifdef __x86_64__
00020 static int syscall_struct() {}
00021 #endif
00022
00023 int sys_setprn ( void *prcnam) {
00024 return INLINE_SYSCALL(_setprn,1,prcnam);
00025 }
00026
00027 int sys_setpri( unsigned int * pidadr, void * prcnam, unsigned int pri, unsigned int * prvpri, unsigned int * pol, unsigned int * prvpol) {
00028 struct struct_setpri s;
00029 s.pidadr=pidadr;
00030 s.prcnam=prcnam;
00031 s.pri=pri;
00032 s.prvpri=prvpri;
00033 s.pol=pol;
00034 s.prvpol=prvpol;
00035
00036 #ifdef __x86_64__
00037 syscall_struct();
00038 #endif
00039 return INLINE_SYSCALL(_setpri,1,&s);
00040
00041
00042 return 1;
00043 };
00044
00045
00046 int sys_crelnt (unsigned int *attr, void *resnam, unsigned
00047 int *reslen, unsigned int *quota,
00048 unsigned short *promsk, void *tabnam, void
00049 *partab, unsigned char *acmode) {
00050
00051 struct struct_crelnt s;
00052 s.attr=attr;
00053 s.resnam=resnam;
00054 s.reslen=reslen;
00055 s.quota=quota;
00056 s.promsk=promsk;
00057 s.tabnam=tabnam;
00058 s.partab=partab;
00059 s.acmode=acmode;
00060 #ifdef __x86_64__
00061 syscall_struct();
00062 #endif
00063 return INLINE_SYSCALL(_crelnt,1,&s);
00064 }
00065
00066 int sys_crelnm (unsigned int *attr, void *tabnam, void *lognam, unsigned char *acmode, void *itmlst) {
00067 return INLINE_SYSCALL(_crelnm,5,attr,tabnam,lognam,acmode,itmlst);
00068 }
00069
00070 int sys_dellnm (void *tabnam, void *lognam, unsigned char *acmode) {
00071 return INLINE_SYSCALL(_dellnm,3,tabnam,lognam,acmode);
00072 }
00073
00074 int sys_trnlnm (unsigned int *attr, void *tabnam, void
00075 *lognam, unsigned char *acmode, void *itmlst) {
00076 return INLINE_SYSCALL(_trnlnm,5,attr,tabnam,lognam,acmode,itmlst);
00077 }
00078
00079 int sys_dclast ( void (*astadr)(unsigned long), unsigned long astprm, unsigned int acmode) {
00080 return INLINE_SYSCALL(_dclast,3,astadr,astprm,acmode);
00081 }
00082
00083 int sys_waitfr (unsigned int efn) {
00084 return INLINE_SYSCALL(_waitfr,1,efn);
00085 }
00086
00087 int sys_wfland (unsigned int efn, unsigned int mask) {
00088 return INLINE_SYSCALL(_wfland,2,efn,mask);
00089 }
00090
00091 int sys_wflor (unsigned int efn, unsigned int mask) {
00092 return INLINE_SYSCALL(_wflor,2,efn,mask);
00093 }
00094
00095 int sys_clref (unsigned int efn) {
00096 return INLINE_SYSCALL(_clref,1,efn);
00097 }
00098
00099 int sys_setime (unsigned long long *timadr) {
00100 return INLINE_SYSCALL(_setime,1,timadr);
00101 }
00102
00103 int sys_setimr (unsigned int efn, signed long long *daytim,
00104 void (*astadr)(long), unsigned
00105 long reqidt, unsigned int flags) {
00106 return INLINE_SYSCALL(_setimr,5,efn,daytim,astadr,reqidt,flags);
00107 }
00108
00109 int sys_cantim (unsigned long long reqidt, unsigned int acmode) {
00110 return INLINE_SYSCALL(_cantim,2,(long)reqidt,acmode);
00111 }
00112
00113 int sys_numtim (unsigned short int timbuf [7], unsigned long long * timadr) {
00114 return INLINE_SYSCALL(_numtim,2,timbuf,timadr);
00115 }
00116
00117 int sys_schdwk(unsigned int *pidadr, void *prcnam, signed long long * daytim, signed long long * reptim) {
00118 return INLINE_SYSCALL(_schdwk,4,pidadr,prcnam,daytim,reptim);
00119 }
00120
00121 int sys_canwak(unsigned int *pidadr, void *prcnam) {
00122 return INLINE_SYSCALL(_canwak,2,pidadr,prcnam);
00123 }
00124
00125 int sys_gettim (unsigned long long * timadr) {
00126 return INLINE_SYSCALL(_gettim,1,timadr);
00127 }
00128
00129 int sys_hiber(void) {
00130 return INLINE_SYSCALL(_hiber,0);
00131 }
00132
00133 int sys_wake(unsigned long *pidadr, void *prcnam) {
00134 return INLINE_SYSCALL(_wake,2,pidadr,prcnam);
00135 }
00136
00137 int sys_resume (unsigned int *pidadr, void *prcnam) {
00138 return INLINE_SYSCALL(_resume,2,pidadr,prcnam);
00139 }
00140
00141 int sys_exit(unsigned int code) {
00142 return INLINE_SYSCALL(_exit,1,code);
00143 }
00144
00145 int sys_forcex(unsigned int *pidadr, void *prcnam, unsigned int code) {
00146 return INLINE_SYSCALL(_forcex,3,pidadr,prcnam,code);
00147 }
00148
00149 int sys_setrwm(int flags) {
00150 return INLINE_SYSCALL(_setrwm,1,flags);
00151 }
00152
00153 int sys_setef(unsigned int efn) {
00154 return INLINE_SYSCALL(_setef,1,efn);
00155 }
00156
00157 int sys_readef(unsigned int efn, unsigned int *state) {
00158 return INLINE_SYSCALL(_readef,2,efn,state);
00159 }
00160
00161 int sys_synch(unsigned int efn, struct _iosb *iosb) {
00162 return INLINE_SYSCALL(_synch,2,efn,iosb);
00163 }
00164
00165 int sys_enq (unsigned int efn, unsigned int lkmode, struct _lksb *lksb, unsigned int flags, void *resnam, unsigned int parid, void (*astadr)(), unsigned long astprm, void (*blkastadr)(), unsigned int acmode, unsigned int rsdm_id) {
00166 struct struct_args s;
00167 s.s1=efn;
00168 s.s2=lkmode;
00169 s.s3=lksb;
00170 s.s4=flags;
00171 s.s5=resnam;
00172 s.s6=parid;
00173 s.s7=astadr;
00174 s.s8=astprm;
00175 s.s9=blkastadr;
00176 s.s10=acmode;
00177 s.s11=rsdm_id;
00178
00179 #ifdef __x86_64__
00180 syscall_struct();
00181 #endif
00182 return INLINE_SYSCALL(_enq,1,&s);
00183 }
00184
00185 int sys_enqw (unsigned int efn, unsigned int lkmode, struct _lksb *lksb, unsigned int flags, void *resnam, unsigned int parid, void (*astadr)(), unsigned long astprm, void (*blkastadr)(), unsigned int acmode, unsigned int rsdm_id) {
00186 struct struct_args s;
00187 s.s1=efn;
00188 s.s2=lkmode;
00189 s.s3=lksb;
00190 s.s4=flags;
00191 s.s5=resnam;
00192 s.s6=parid;
00193 s.s7=astadr;
00194 s.s8=astprm;
00195 s.s9=blkastadr;
00196 s.s10=acmode;
00197 s.s11=rsdm_id;
00198
00199 #ifdef __x86_64__
00200 syscall_struct();
00201 #endif
00202 return INLINE_SYSCALL(_enqw,1,&s);
00203 }
00204
00205 int sys_deq(unsigned int lkid, void *valblk, unsigned int acmode, unsigned int flags) {
00206 return INLINE_SYSCALL(_deq,4,lkid,valblk,acmode,flags);
00207 }
00208
00209 int sys_getlki(unsigned int efn, unsigned int *lkidadr,void *itmlst, struct _iosb *iosb, void (*astadr)(int), int astprm, unsigned int reserved) {
00210 struct struct_getlki s;
00211 s.efn=efn;
00212 s.lkidadr=lkidadr;
00213 s.itmlst=itmlst;
00214 s.iosb=iosb;
00215 s.astadr=astadr;
00216 s.astprm=astprm;
00217 s.reserved=reserved;
00218 #ifdef __x86_64__
00219 syscall_struct();
00220 #endif
00221 return INLINE_SYSCALL(_getlki,1,&s);
00222 }
00223
00224 int sys_getlkiw(unsigned int efn, unsigned int *lkidadr,void *itmlst, struct _iosb *iosb, void (*astadr)(int), int astprm, unsigned int reserved) {
00225 struct struct_getlki s;
00226 s.efn=efn;
00227 s.lkidadr=lkidadr;
00228 s.itmlst=itmlst;
00229 s.iosb=iosb;
00230 s.astadr=astadr;
00231 s.astprm=astprm;
00232 s.reserved=reserved;
00233 #ifdef __x86_64__
00234 syscall_struct();
00235 #endif
00236 return INLINE_SYSCALL(_getlkiw,1,&s);
00237 }
00238
00239 int sys_dassgn(unsigned short int chan) {
00240 return INLINE_SYSCALL(_dassgn,1,chan);
00241 }
00242
00243 int sys_assign(void *devnam, unsigned short int *chan,unsigned int acmode, void *mbxnam,int flags) {
00244 return INLINE_SYSCALL(_assign,5,devnam,chan,acmode,mbxnam,flags);
00245 }
00246
00247 static int exe_synch(unsigned int efn, struct _iosb *iosb) {
00248 if (!iosb) {
00249 sys_waitfr(efn);
00250 return SS__NORMAL;
00251 }
00252 if (iosb->iosb_w_status) {
00253 return SS__NORMAL;
00254 }
00255 again:
00256 sys_waitfr(efn);
00257 if (iosb->iosb_w_status & 0xff)
00258 return iosb->iosb_w_status;
00259 sys_clref(efn);
00260 goto again;
00261 }
00262
00263 int sys_qiow(unsigned int efn, unsigned short int chan,unsigned int func, struct _iosb *iosb, void(*astadr)(__unknown_params), long astprm, void*p1, long p2, long p3, long p4, long p5, long p6) {
00264 struct struct_qio s;
00265 s.efn=efn;
00266 s.chan=chan;
00267 s.func=func;
00268 s.iosb=iosb;
00269 s.astadr=astadr;
00270 s.astprm=astprm;
00271 s.p1=p1;
00272 s.p2=p2;
00273 s.p3=p3;
00274 s.p4=p4;
00275 s.p5=p5;
00276 s.p6=p6;
00277 #ifdef __x86_64__
00278 syscall_struct();
00279 #endif
00280 int status = INLINE_SYSCALL(_qio,1,&s);
00281 if ((status&1)==0) return status;
00282 return exe_synch(efn,iosb);
00283 }
00284
00285 int sys_qio(unsigned int efn, unsigned short int chan,unsigned int func, struct _iosb *iosb, void(*astadr)(__unknown_params), long astprm, void*p1, long p2, long p3, long p4, long p5, long p6) {
00286 struct struct_qio s;
00287 s.efn=efn;
00288 s.chan=chan;
00289 s.func=func;
00290 s.iosb=iosb;
00291 s.astadr=astadr;
00292 s.astprm=astprm;
00293 s.p1=p1;
00294 s.p2=p2;
00295 s.p3=p3;
00296 s.p4=p4;
00297 s.p5=p5;
00298 s.p6=p6;
00299 #ifdef __x86_64__
00300 syscall_struct();
00301 #endif
00302 return INLINE_SYSCALL(_qio,1,&s);
00303 }
00304
00305 int sys_clrast(void) {
00306 return INLINE_SYSCALL(_clrast,0);
00307 }
00308
00309 int sys_setast(char enbflg) {
00310 return INLINE_SYSCALL(_setast,1,((unsigned long)enbflg));
00311 }
00312
00313 int sys_ascefc(unsigned int efn, void *name, char prot, char perm) {
00314 return INLINE_SYSCALL(_ascefc,4,efn,name,(unsigned long) prot, (unsigned long) perm);
00315 }
00316
00317 int sys_dacefc(unsigned int efn) {
00318 return INLINE_SYSCALL(_dacefc,1,efn);
00319 }
00320
00321 int sys_dlcefc(void *name) {
00322 return INLINE_SYSCALL(_dlcefc,1,name);
00323 }
00324
00325 int sys_crembx (char prmflg, unsigned short int *chan, unsigned int maxmsg, unsigned int bufquo, unsigned int promsk, unsigned int acmode, void *lognam,long flags,...) {
00326 struct struct_crembx s;
00327 s.prmflg=prmflg;
00328 s.chan=chan;
00329 s.maxmsg=maxmsg;
00330 s.bufquo=bufquo;
00331 s.promsk=promsk;
00332 s.acmode=acmode;
00333 s.lognam=lognam;
00334 s.flags=flags;
00335 #ifdef __x86_64__
00336 syscall_struct();
00337 #endif
00338 return INLINE_SYSCALL(_crembx,1,&s);
00339 }
00340
00341 int sys_delmbx (unsigned short int chan) {
00342 return INLINE_SYSCALL(_delmbx,1,(unsigned long) chan);
00343 }
00344
00345 int sys_mount(void *itmlst) {
00346 return INLINE_SYSCALL(_mount,1,itmlst);
00347 }
00348
00349 int sys_cretva (struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode) {
00350 return INLINE_SYSCALL(_cretva,3,inadr,retadr,acmode);
00351 }
00352
00353 int sys_expreg(unsigned int pagcnt, struct _va_range *retadr,unsigned int acmode, char region) {
00354 return INLINE_SYSCALL(_expreg,4,pagcnt,retadr,acmode,(int)region);
00355 }
00356 int sys_deltva(struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode) {
00357 return INLINE_SYSCALL(_deltva,3,inadr,retadr,acmode);
00358 }
00359
00360 int sys_mgblsc(struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode, unsigned int flags, void *gsdnam, struct _secid *ident, unsigned int relpag) {
00361 struct struct_mgblsc s;
00362 s.inadr=inadr;
00363 s.retadr=retadr;
00364 s.acmode=acmode;
00365 s.flags=flags;
00366 s.gsdnam=gsdnam;
00367 s.ident=ident;
00368 s.relpag=relpag;
00369 #ifdef __x86_64__
00370 syscall_struct();
00371 #endif
00372 return INLINE_SYSCALL(_mgblsc,1,&s);
00373 }
00374
00375 int sys_crmpsc(struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode, unsigned int flags, void *gsdnam, unsigned long long * ident, unsigned int relpag, unsigned int chan, unsigned int pagcnt, unsigned int vbn, unsigned int prot,unsigned int pfc) {
00376 struct struct_crmpsc s;
00377 s.inadr=inadr;
00378 s.retadr=retadr;
00379 s.acmode=acmode;
00380 s.flags=flags;
00381 s.gsdnam=gsdnam;
00382 s.ident=ident;
00383 s.relpag=relpag;
00384 s.chan=chan;
00385 s.pagcnt=pagcnt;
00386 s.vbn=vbn;
00387 s.prot=prot;
00388 s.pfc=pfc;
00389 #ifdef __x86_64__
00390 syscall_struct();
00391 #endif
00392 return INLINE_SYSCALL(_crmpsc,1,&s);
00393 }
00394
00395 int sys_create_region_32 ( unsigned long length, unsigned int region_prot, unsigned int flags, unsigned long long *return_region_id, void **return_va, unsigned long *return_length, unsigned long start_va) {
00396 struct struct_create_region_32 s;
00397 s.length=length;
00398 s.region_prot=region_prot;
00399 s.flags=flags;
00400 s.return_region_id=return_region_id;
00401 s.return_va=return_va;
00402 s.return_length=return_length;
00403 s.start_va=start_va;
00404 #ifdef __x86_64__
00405 syscall_struct();
00406 #endif
00407 return INLINE_SYSCALL(_create_region_32,1,&s);
00408 }
00409
00410 int sys_getjpi(unsigned int efn, unsigned int *pidadr, void * prcnam, void *itmlst, struct _iosb *iosb, void (*astadr)(), unsigned long long astprm) {
00411 struct struct_getjpi s;
00412 s.efn=efn;
00413 s.pidadr=pidadr;
00414 s.prcnam=prcnam;
00415 s.itmlst=itmlst;
00416 s.iosb=iosb;
00417 s.astadr=astadr;
00418 s.astprm=astprm;
00419 #ifdef __x86_64__
00420 syscall_struct();
00421 #endif
00422 return INLINE_SYSCALL(_getjpi,1,&s);
00423 }
00424
00425 int sys_getjpiw(unsigned int efn, unsigned int *pidadr, void * prcnam, void *itmlst, struct _iosb *iosb, void (*astadr)(), unsigned long long astprm) {
00426 struct struct_getjpi s;
00427 s.efn=efn;
00428 s.pidadr=pidadr;
00429 s.prcnam=prcnam;
00430 s.itmlst=itmlst;
00431 s.iosb=iosb;
00432 s.astadr=astadr;
00433 s.astprm=astprm;
00434 #ifdef __x86_64__
00435 syscall_struct();
00436 #endif
00437 return INLINE_SYSCALL(_getjpiw,1,&s);
00438 }
00439
00440 int sys_sndopr(void *msgbuf, unsigned short int chan) {
00441 return INLINE_SYSCALL(_sndopr,2,msgbuf,(int)chan);
00442 }
00443
00444 int sys_process_affinity (unsigned int *pidadr, void *prcnam, struct _generic_64 *select_mask, struct _generic_64 *modify_mask, struct _generic_64 *prev_mask, struct _generic_64 *flags,...) {
00445 struct struct_args s;
00446 s.s1 = pidadr;
00447 s.s2 = prcnam;
00448 s.s3 = select_mask;
00449 s.s4 = modify_mask;
00450 s.s5 = prev_mask;
00451 s.s6 = flags;
00452 #ifdef __x86_64__
00453 syscall_struct();
00454 #endif
00455 return INLINE_SYSCALL(_process_affinity, 1, &s);
00456 }
00457
00458 int sys_set_implicit_affinity (unsigned int *pidadr, void *prcnam, struct _generic_64 *state, int cpu_id, struct _generic_64 *prev_mask) {
00459 return INLINE_SYSCALL(_set_implicit_affinity, 5, pidadr, prcnam, state, cpu_id, prev_mask);
00460 }
00461
00462 int sys_cpu_capabilities (int cpu_id, struct _generic_64 *select_mask, struct _generic_64 *modify_mask, struct _generic_64 *prev_mask, struct _generic_64 *flags) {
00463 return INLINE_SYSCALL(_cpu_capabilities, 5, cpu_id, select_mask, modify_mask, prev_mask, flags);
00464 }
00465
00466 int sys_process_capabilities (unsigned int *pidadr, void *prcnam, struct _generic_64 *select_mask, struct _generic_64 *modify_mask, struct _generic_64 *prev_mask, struct _generic_64 *flags) {
00467 struct struct_args s;
00468 s.s1 = pidadr;
00469 s.s2 = prcnam;
00470 s.s3 = select_mask;
00471 s.s4 = modify_mask;
00472 s.s5 = prev_mask;
00473 s.s6 = flags;
00474 #ifdef __x86_64__
00475 syscall_struct();
00476 #endif
00477 return INLINE_SYSCALL(_process_capabilities, 1, &s);
00478 }
00479
00480 int sys_getdvi(unsigned int efn, unsigned short int chan, void *devnam, void *itmlst, struct _iosb *iosb, void (*astadr)(), int astprm, unsigned long long *nullarg) {
00481 struct struct_getdvi s;
00482 s.efn=efn;
00483 s.chan=chan;
00484 s.devnam=devnam;
00485 s.itmlst=itmlst;
00486 s.iosb=iosb;
00487 s.astadr=astadr;
00488 s.astprm=astprm;
00489 s.nullarg=nullarg;
00490 #ifdef __x86_64__
00491 syscall_struct();
00492 #endif
00493 return INLINE_SYSCALL(_getdvi,1,&s);
00494 }
00495
00496 int sys_getdviw(unsigned int efn, unsigned short int chan, void *devnam, void *itmlst, struct _iosb *iosb, void (*astadr)(), int astprm, unsigned long long *nullarg) {
00497 struct struct_getdvi s;
00498 s.efn=efn;
00499 s.chan=chan;
00500 s.devnam=devnam;
00501 s.itmlst=itmlst;
00502 s.iosb=iosb;
00503 s.astadr=astadr;
00504 s.astprm=astprm;
00505 s.nullarg=nullarg;
00506 #ifdef __x86_64__
00507 syscall_struct();
00508 #endif
00509 return INLINE_SYSCALL(_getdviw,1,&s);
00510 }
00511
00512 int sys_fao(void * ctrstr , short int * outlen , void * outbuf , ...) {
00513 struct struct_args s;
00514 va_list args;
00515 long * argv = (long *)&s;
00516 int argc=0;
00517 va_start(args,outbuf);
00518 while(argc<15) {
00519 *argv=va_arg(args,long);
00520 argv++;
00521 argc++;
00522 }
00523 va_end(args);
00524 #ifdef __x86_64__
00525 syscall_struct();
00526 #endif
00527 return INLINE_SYSCALL(_faol,4,ctrstr,outlen,outbuf,&s);
00528 }
00529
00530 int sys_faol(void * ctrstr , short int * outlen , void * outbuf , int * prmlst) {
00531 return INLINE_SYSCALL(_faol,4,ctrstr,outlen,outbuf,prmlst);
00532 }
00533
00534 int sys_device_scan(void *return_devnam, unsigned short int *retlen, void *search_devnam, void *itmlst, unsigned long long *contxt) {
00535 return INLINE_SYSCALL(_device_scan,5,return_devnam,retlen,search_devnam,itmlst,contxt);
00536 }
00537
00538 int sys_imgact(void * name, void * dflnam, void * hdrbuf, unsigned long imgctl, unsigned long long * inadr, unsigned long long * retadr, unsigned long long * ident, unsigned long acmode) {
00539 struct struct_args s;
00540 s.s1 = (unsigned long) name;
00541 s.s2 = (unsigned long) dflnam;
00542 s.s3 = (unsigned long) hdrbuf;
00543 s.s4 = (unsigned long) imgctl;
00544 s.s5 = (unsigned long) inadr;
00545 s.s6 = (unsigned long) retadr;
00546 s.s7 = (unsigned long) ident;
00547 s.s8 = (unsigned long) acmode;
00548 #ifdef __x86_64__
00549 syscall_struct();
00550 #endif
00551 return INLINE_SYSCALL(_imgact,1,&s);
00552 }
00553
00554 int sys_imgfix() {
00555 return INLINE_SYSCALL(_imgfix,0);
00556 }
00557
00558 int sys_imgsta(void * transfer, void * parseinfo, void * header, void * file, unsigned long linkstatus, unsigned long clistatus) {
00559 struct struct_args s;
00560 s.s1 = (unsigned long) transfer;
00561 s.s2 = (unsigned long) parseinfo;
00562 s.s3 = (unsigned long) header;
00563 s.s4 = (unsigned long) file;
00564 s.s5 = (unsigned long) linkstatus;
00565 s.s6 = (unsigned long) clistatus;
00566 #ifdef __x86_64__
00567 syscall_struct();
00568 #endif
00569 return INLINE_SYSCALL(_imgsta,1,&s);
00570 }
00571
00572 int sys_rundwn(int mode) {
00573 return INLINE_SYSCALL(_rundwn,1,mode);
00574 }
00575
00576 int sys_purgws (struct _va_range *inadr) {
00577 return INLINE_SYSCALL(_purgws,1,inadr);
00578 }
00579
00580 int sys_adjwsl (signed int pagcnt, unsigned int *wsetlm) {
00581 return INLINE_SYSCALL(_adjwsl,2,pagcnt, wsetlm);
00582 }
00583
00584 int sys_lkwset(struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode) {
00585 return INLINE_SYSCALL(_lkwset,3,inadr,retadr,acmode);
00586 }
00587
00588 int sys_lckpag(struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode) {
00589 return INLINE_SYSCALL(_lckpag,3,inadr,retadr,acmode);
00590 }
00591
00592 int sys_ulwset(struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode) {
00593 return INLINE_SYSCALL(_ulwset,3,inadr,retadr,acmode);
00594 }
00595
00596 int sys_ulkpag(struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode) {
00597 return INLINE_SYSCALL(_ulkpag,3,inadr,retadr,acmode);
00598 }
00599
00600 int sys_creprc(unsigned int *pidadr, void *image, void *input, void *output, void *error, struct _generic_64 *prvadr, unsigned int *quota, void*prcnam, unsigned int baspri, unsigned int uic, unsigned short int mbxunt, unsigned int stsflg) {
00601 struct struct_args s;
00602 s.s1 = (unsigned long) pidadr;
00603 s.s2 = (unsigned long) image;
00604 s.s3 = (unsigned long) input;
00605 s.s4 = (unsigned long) output;
00606 s.s5 = (unsigned long) error;
00607 s.s6 = (unsigned long) prvadr;
00608 s.s7 = (unsigned long) quota;
00609 s.s8 = (unsigned long) prcnam;
00610 s.s9 = (unsigned long) baspri;
00611 s.s10 = (unsigned long) uic;
00612 s.s11 = (unsigned long) mbxunt;
00613 s.s12 = (unsigned long) stsflg;
00614 #ifdef __x86_64__
00615 syscall_struct();
00616 #endif
00617 return INLINE_SYSCALL(_creprc,1,&s);
00618 }
00619
00620 int sys_getsyi(unsigned int efn, unsigned int *csidadr, void *nodename, void *itmlst, struct _iosb *iosb, void (*astadr)(), unsigned long astprm) {
00621 struct struct_args s;
00622 s.s1 = (unsigned long) efn;
00623 s.s2 = (unsigned long) csidadr;
00624 s.s3 = (unsigned long) nodename;
00625 s.s4 = (unsigned long) itmlst;
00626 s.s5 = (unsigned long) iosb;
00627 s.s6 = (unsigned long) astadr;
00628 s.s7 = (unsigned long) astprm;
00629 #ifdef __x86_64__
00630 syscall_struct();
00631 #endif
00632 return INLINE_SYSCALL(_getsyi,1,&s);
00633 }
00634
00635 int sys_getsyiw(unsigned int efn, unsigned int *csidadr, void *nodename, void *itmlst, struct _iosb *iosb, void (*astadr)(), unsigned long astprm) {
00636 struct struct_args s;
00637 s.s1 = (unsigned long) efn;
00638 s.s2 = (unsigned long) csidadr;
00639 s.s3 = (unsigned long) nodename;
00640 s.s4 = (unsigned long) itmlst;
00641 s.s5 = (unsigned long) iosb;
00642 s.s6 = (unsigned long) astadr;
00643 s.s7 = (unsigned long) astprm;
00644 #ifdef __x86_64__
00645 syscall_struct();
00646 #endif
00647 return INLINE_SYSCALL(_getsyiw,1,&s);
00648 }
00649
00650 int sys_set_security(void *clsnam, void *objnam, unsigned int *objhan, unsigned int flags, void *itmlst, unsigned int *contxt, unsigned int *acmode) {
00651 struct struct_args s;
00652 s.s1 = (unsigned long) clsnam;
00653 s.s2 = (unsigned long) objnam;
00654 s.s3 = (unsigned long) objhan;
00655 s.s4 = (unsigned long) flags;
00656 s.s5 = (unsigned long) itmlst;
00657 s.s6 = (unsigned long) contxt;
00658 s.s7 = (unsigned long) acmode;
00659 #ifdef __x86_64__
00660 syscall_struct();
00661 #endif
00662 return INLINE_SYSCALL(_set_security,1,&s);
00663 }
00664
00665 int sys_get_security(void *clsnam, void *objnam, unsigned int *objhan, unsigned int flags, void *itmlst, unsigned int *contxt, unsigned int *acmode) {
00666 struct struct_args s;
00667 s.s1 = (unsigned long) clsnam;
00668 s.s2 = (unsigned long) objnam;
00669 s.s3 = (unsigned long) objhan;
00670 s.s4 = (unsigned long) flags;
00671 s.s5 = (unsigned long) itmlst;
00672 s.s6 = (unsigned long) contxt;
00673 s.s7 = (unsigned long) acmode;
00674 #ifdef __x86_64__
00675 syscall_struct();
00676 #endif
00677 return INLINE_SYSCALL(_get_security,1,&s);
00678 }
00679
00680 int sys_cli(void * cliv, int par1, int par2) {
00681 return INLINE_SYSCALL(_cli,3,cliv, par1, par2);
00682 }
00683
00684 int sys_setprv (char enbflg, struct _generic_64 *prvadr, char prmflg, struct _generic_64 *prvprv) {
00685 return INLINE_SYSCALL(_setprv,4,enbflg, prvadr, prmflg, prvprv);
00686 }
00687
00688 int sys_cancel (unsigned short int chan) {
00689 return INLINE_SYSCALL(_cancel,1,(int)chan);
00690 }
00691
00692 int sys_cmkrnl(int (*routin)(), unsigned int *arglst) {
00693 return INLINE_SYSCALL(_cmkrnl,2,routin,arglst);
00694 }
00695
00696 int sys_asctoid(void *name, unsigned int *id, unsigned int *attrib) {
00697 return INLINE_SYSCALL(_asctoid,3,name,id,attrib);
00698 }
00699
00700 int sys_find_held (struct _generic_64 *holder, unsigned int *id, unsigned int *attrib, unsigned int *contxt) {
00701 return INLINE_SYSCALL(_find_held,4,holder,id,attrib,contxt);
00702 }
00703
00704 int sys_setddir (void * newdiraddr, unsigned short int * lengthaddr, void * curdiraddr) { return INLINE_SYSCALL1($setddir,3,newdiraddr,lengthaddr,curdiraddr); }
00705 int sys_close (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($close,3,fab,err,suc); }
00706 int sys_connect (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($connect,3,fab,err,suc); }
00707 int sys_create (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($create,3,fab,err,suc); }
00708 int sys_delete (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($delete,3,fab,err,suc); }
00709 int sys_disconnect (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($disconnect,3,fab,err,suc); }
00710 int sys_display (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($display,3,fab,err,suc); }
00711 int sys_enter (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($enter,3,fab,err,suc); }
00712 int sys_erase (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($erase,3,fab,err,suc); }
00713 int sys_extend (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($extend,3,fab,err,suc); }
00714 int sys_find (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($find,3,fab,err,suc); }
00715 int sys_flush (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($flush,3,fab,err,suc); }
00716 int sys_free (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($free,3,fab,err,suc); }
00717 int sys_get (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($get,3,fab,err,suc); }
00718 int sys_modify (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($modify,3,fab,err,suc); }
00719 int sys_nxtvol (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($nxtvol,3,fab,err,suc); }
00720 int sys_open (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($open,3,fab,err,suc); }
00721 int sys_parse (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($parse,3,fab,err,suc); }
00722 int sys_put (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($put,3,fab,err,suc); }
00723 int sys_read (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($read,3,fab,err,suc); }
00724 int sys_release (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($release,3,fab,err,suc); }
00725 int sys_remove (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($remove,3,fab,err,suc); }
00726 int sys_rename (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($rename,3,fab,err,suc); }
00727 int sys_rewind (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($rewind,3,fab,err,suc); }
00728 int sys_search (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($search,3,fab,err,suc); }
00729 int sys_space (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($space,3,fab,err,suc); }
00730 int sys_truncate (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($truncate,3,fab,err,suc); }
00731 int sys_update (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($update,3,fab,err,suc); }
00732 int sys_wait (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($wait,3,fab,err,suc); }
00733 int sys_write (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($write,3,fab,err,suc); }
00734 #undef sys_filescan
00735 int sys_filescan (void *srcstr, void *valuelst, unsigned int *fldflags, void *auxout, unsigned short int *retlen) { return INLINE_SYSCALL1($filescan,5,srcstr,valuelst,fldflags,auxout,retlen); }
00736 int sys_setddir2 (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($setddir,3,fab,err,suc); }
00737 int sys_setdfprot (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($setdfprot,3,fab,err,suc); }
00738 int sys_ssvexc (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($ssvexc,3,fab,err,suc); }
00739 int sys_rmsrundwn (struct _fab * fab, void * err, void * suc) { return INLINE_SYSCALL1($rmsrundwn,3,fab,err,suc); }
00740
00741 int sys_getuai(unsigned int efn, unsigned int *contxt, void *usrnam, void *itmlst, struct _iosb *iosb, void (*astadr)(__unknown_params), int astprm) {
00742 struct struct_args s;
00743 s.s1 = (unsigned long) efn;
00744 s.s2 = (unsigned long) contxt;
00745 s.s3 = (unsigned long) usrnam;
00746 s.s4 = (unsigned long) itmlst;
00747 s.s5 = (unsigned long) iosb;
00748 s.s6 = (unsigned long) astadr;
00749 s.s7 = (unsigned long) astprm;
00750 #ifdef __x86_64__
00751 syscall_struct();
00752 #endif
00753 return INLINE_SYSCALL(_getuai,1,&s);
00754 }
00755
00756 int sys_asctim (unsigned short int *timlen, void *timbuf,
00757 unsigned long long *timadr, char cvtflg) {
00758 return INLINE_SYSCALL3(_asctim,4,timlen,timbuf,timadr,(unsigned long)cvtflg);
00759 }
00760
00761 int sys_bintim (void *timbuf, unsigned long long *timadr) {
00762 return INLINE_SYSCALL3(_bintim,2,timbuf,timadr);
00763 }
00764
00765 int sys_dclexh(void *desblk) {
00766 return INLINE_SYSCALL(_dclexh,1,desblk);
00767 }
00768
00769 #if 0
00770 struct _fabdef cc_rms_fab = {NULL,0,NULL,NULL,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL};
00771 struct _namdef cc_rms_nam = {0,0,0,0,0,0,0,0,0,0,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,0,0};
00772 struct _xabdatdef cc_rms_xabdat = {XAB$C_DAT,0,
00773 0, 0, 0, 0,
00774 VMSTIME_ZERO, VMSTIME_ZERO,
00775 VMSTIME_ZERO, VMSTIME_ZERO,
00776 VMSTIME_ZERO, VMSTIME_ZERO};
00777 struct _xabfhcdef cc_rms_xabfhc = {XAB$C_FHC,0,0,0,0,0,0,0,0,0,0,0};
00778 struct _xabprodef1 cc_rms_xabpro = {XAB$C_PRO,0,0,0};
00779 struct _rabdef cc_rms_rab = {NULL,NULL,NULL,NULL,0,0,0,{0,0,0}};
00780 struct _xabkeydef cc_rms_xabkey = {XAB$C_KEY,XAB$C_KEYLEN};
00781 #endif
00782
00783 void signal(int s) {
00784 extern void exit(int);
00785 exit(s);
00786 }
00787