Lines Matching defs:rs
37 reg Rs_t* rs;
39 if(rs = (Rs_t*)vmresize(Vmheap,NIL(Void_t*),sizeof(Rs_t),VM_RSZERO))
40 rsdisc(rs,disc,RS_DISC);
41 return rs;
45 int rsinit(reg Rs_t* rs, Rsmethod_t* meth, ssize_t c_max, int type, Rskey_t* key)
47 int rsinit(rs, meth, c_max, type, key)
48 Rs_t* rs; /* handle from rsnew() */
60 rs->vmdisc.memoryf = Vmdcheap->memoryf;
61 rs->vmdisc.exceptf = Vmdcheap->exceptf;
62 if(!(rs->vm = (Vmalloc_t*)vmopen(&rs->vmdisc, Vmbest, 0)) )
63 { vmfree(Vmheap,(void*)rs);
66 rs->vmdisc.round = round <= 0 ? RS_RESERVE : round;
67 if(!(rs->vm = (Vmalloc_t*)vmopen(&rs->vmdisc, Vmbest, 0)) )
68 { vmfree(Vmheap,(void*)rs);
72 if(!(rs->methdata = (Void_t*)vmresize(Vmheap,NIL(Void_t*),meth->size,VM_RSZERO)) )
75 rs->meth = meth;
76 rs->c_max = c_max;
77 rs->type = rs->disc->type | (type&RS_TYPES);
78 rs->key = rs->disc->version < 20111011L ? (Rskey_t*)((char*)rs->disc - sizeof(Rskey_t)) : key;
80 rs->events = 0;
81 for (disc = rs->disc; disc; disc = disc->disc)
82 rs->events |= disc->events;
84 if (RSNOTIFY(rs, RS_OPEN, 0, 0, rs->disc) < 0)
89 vmclose(rs->vm);
90 vmfree(Vmheap,rs);
104 reg Rs_t* rs;
106 if((rs = rsnew(disc)) && rsinit(rs, meth, c_max, type, NiL))
107 { vmclose(rs->vm);
108 vmfree(Vmheap,rs);
109 rs = 0;
111 return rs;