Lines Matching refs:tp

59 	register struct tevent *tp = (struct tevent*)list;
60 if(!tp || item->milli < tp->milli)
62 item->next = tp;
67 while(tp->next && item->milli > tp->next->milli)
68 tp = tp->next;
69 item->next = tp->next;
70 tp->next = item;
72 tp = item;
73 tp->timeout = (void*)sh_timeradd(tp->milli,tp->flags&R_FLAG,trap_timeout,(void*)tp);
82 register struct tevent *tp = (struct tevent*)list;
83 if(item==tp)
84 list = (void*)tp->next;
87 while(tp && tp->next != item)
88 tp = tp->next;
89 if(tp)
90 tp->next = item->next;
99 register struct tevent *tp = (struct tevent*)list;
100 while(tp)
102 if(tp->timeout)
104 register char *name = nv_name(tp->node);
105 if(tp->flags&R_FLAG)
107 double d = tp->milli;
111 sfprintf(sfstdout,e_alrm2,name,nv_getnum(tp->node));
113 tp = tp->next;
119 register struct tevent *tp = (struct tevent*)handle;
120 tp->sh->trapnote |= SH_SIGALRM;
121 if(!(tp->flags&R_FLAG))
122 tp->timeout = 0;
123 tp->flags |= L_FLAG;
124 tp->sh->sigflag[SIGALRM] |= SH_SIGALRM;
126 sh_timetraps(tp->sh);
131 register struct tevent *tp, *tpnext;
137 for(tp=tptop;tp;tp=tpnext)
139 tpnext = tp->next;
140 if(tp->flags&L_FLAG)
142 tp->flags &= ~L_FLAG;
143 if(tp->action)
144 sh_fun(tp->action,tp->node,(char**)0);
145 tp->flags &= ~L_FLAG;
146 if(!tp->flags)
148 nv_unset(tp->node);
149 nv_close(tp->node);
165 register struct tevent *tp = (struct tevent*)fp;
174 action = tp->action;
176 tp->action = action;
185 register struct tevent *tp = (struct tevent*)fp;
187 Shell_t *shp = tp->sh;
207 tp->milli = 1000*(d+.0005);
208 if(tp->timeout)
209 shp->st.timetrap = time_delete(tp,shp->st.timetrap);
210 if(tp->milli > 0)
211 shp->st.timetrap = time_add(tp,shp->st.timetrap);
215 tp = (struct tevent*)nv_stack(np, (Namfun_t*)0);
216 shp->st.timetrap = time_delete(tp,shp->st.timetrap);
217 if(tp->action)
218 nv_close(tp->action);
237 register struct tevent *tp;
266 if(!(tp = newof(NIL(struct tevent*),struct tevent,1,0)))
268 tp->fun.disc = &alarmdisc;
269 tp->flags = rflag;
270 tp->node = np;
271 tp->sh = shp;
272 nv_stack(np,(Namfun_t*)tp);