#include "/sys/nsys/param.h"
#include "/sys/nsys/systm.h"
#include "/sys/nsys/user.h"
#include "/sys/nsys/proc.h"
clock(dev
, sp
, r4
, r3
, r2
, r1
, nps
, r0
, pc
, ps
)
register struct callo
*p2
;
register struct proc
*pp
;
if(callout
[0].c_func
== 0)
* if ps is high, just update times
while(p2
->c_time
<=0 && p2
->c_func
!=0)
* update times and callout
if(--callout
[0].c_time
<= 0) {
while(p1
->c_func
!= 0 && p1
->c_time
<= 0) {
(*p1
->c_func
)(p1
->c_arg
);
while(p2
->c_func
= p1
->c_func
) {
* lightning bolt time-out
if(time
[1]==tout
[1] && time
[0]==tout
[0])
if((ps
&UMODE
) == UMODE
) {
register struct callo
*p1
, *p2
;
while(p1
->c_func
!= 0 && p1
->c_time
<= tim
) {
(p2
+1)->c_time
= p2
->c_time
;
(p2
+1)->c_func
= p2
->c_func
;
(p2
+1)->c_arg
= p2
->c_arg
;