Lines Matching refs:smc

21 static void timer_done(struct s_smc *smc, int restart);
23 void smt_timer_init(struct s_smc *smc) in smt_timer_init() argument
25 smc->t.st_queue = NULL; in smt_timer_init()
26 smc->t.st_fast.tm_active = FALSE ; in smt_timer_init()
27 smc->t.st_fast.tm_next = NULL; in smt_timer_init()
28 hwt_init(smc) ; in smt_timer_init()
31 void smt_timer_stop(struct s_smc *smc, struct smt_timer *timer) in smt_timer_stop() argument
40 if (smc->t.st_queue == timer && !timer->tm_next) { in smt_timer_stop()
41 hwt_stop(smc) ; in smt_timer_stop()
43 for (prev = &smc->t.st_queue ; (tm = *prev) ; prev = &tm->tm_next ) { in smt_timer_stop()
54 void smt_timer_start(struct s_smc *smc, struct smt_timer *timer, u_long time, in smt_timer_start() argument
64 smt_timer_stop(smc,timer) ; in smt_timer_start()
65 timer->tm_smc = smc ; in smt_timer_start()
68 if (!smc->t.st_queue) { in smt_timer_start()
69 smc->t.st_queue = timer ; in smt_timer_start()
72 hwt_start(smc,time) ; in smt_timer_start()
78 timer_done(smc,0) ; in smt_timer_start()
84 for (prev = &smc->t.st_queue ; (tm = *prev) ; prev = &tm->tm_next ) { in smt_timer_start()
99 hwt_start(smc,smc->t.st_queue->tm_delta) ; in smt_timer_start()
102 void smt_force_irq(struct s_smc *smc) in smt_force_irq() argument
104 smt_timer_start(smc,&smc->t.st_fast,32L, EV_TOKEN(EVENT_SMT,SM_FAST)); in smt_force_irq()
107 void smt_timer_done(struct s_smc *smc) in smt_timer_done() argument
109 timer_done(smc,1) ; in smt_timer_done()
112 static void timer_done(struct s_smc *smc, int restart) in timer_done() argument
120 delta = hwt_read(smc) ; in timer_done()
121 last = &smc->t.st_queue ; in timer_done()
122 tm = smc->t.st_queue ; in timer_done()
137 next = smc->t.st_queue ; in timer_done()
138 smc->t.st_queue = tm ; in timer_done()
142 timer_event(smc,tm->tm_token) ; in timer_done()
145 if (restart && smc->t.st_queue) in timer_done()
146 hwt_start(smc,smc->t.st_queue->tm_delta) ; in timer_done()