Home
last modified time | relevance | path

Searched refs:toks (Results 1 – 5 of 5) sorted by relevance

/linux/rust/macros/
H A Dpinned_drop.rs
/linux/rust/pin-init/internal/src/
H A Dpinned_drop.rs9 let mut toks = input.into_iter().collect::<Vec<_>>(); in pinned_drop() localVariable
10 assert!(!toks.is_empty()); in pinned_drop()
12 assert!(matches!(&toks[0], TokenTree::Ident(i) if i.to_string() == "impl")); in pinned_drop()
16 for (i, tt) in toks.iter().enumerate() { in pinned_drop()
40 toks.splice(idx..idx, quote!(::pin_init::)); in pinned_drop()
42 if let Some(TokenTree::Group(last)) = toks.pop() { in pinned_drop()
45 @impl_sig(#(#toks)*), in pinned_drop()
49 TokenStream::from_iter(toks) in pinned_drop()
/linux/net/sched/
H A Dsch_tbf.c285 s64 toks; in tbf_dequeue()
290 toks = min_t(s64, now - q->t_c, q->buffer); in tbf_dequeue()
293 ptoks = toks + q->ptokens; in tbf_dequeue()
298 toks += q->tokens; in tbf_dequeue()
299 if (toks > q->buffer) in tbf_dequeue()
300 toks = q->buffer; in tbf_dequeue()
301 toks -= (s64) psched_l2t_ns(&q->rate, len); in tbf_dequeue()
303 if ((toks|ptoks) >= 0) { in tbf_dequeue()
309 q->tokens = toks; in tbf_dequeue()
318 now + max_t(long, -toks, in tbf_dequeue()
284 s64 toks; tbf_dequeue() local
[all...]
H A Dact_police.c251 s64 now, toks, ppstoks = 0, ptoks = 0; in tcf_police_act() local
277 toks = min_t(s64, now - police->tcfp_t_c, p->tcfp_burst); in tcf_police_act()
279 ptoks = toks + police->tcfp_ptoks; in tcf_police_act()
286 toks += police->tcfp_toks; in tcf_police_act()
287 if (toks > p->tcfp_burst) in tcf_police_act()
288 toks = p->tcfp_burst; in tcf_police_act()
289 toks -= (s64)psched_l2t_ns(&p->rate, qdisc_pkt_len(skb)); in tcf_police_act()
297 if ((toks | ptoks | ppstoks) >= 0) { in tcf_police_act()
299 police->tcfp_toks = toks; in tcf_police_act()
H A Dsch_htb.c535 s64 toks; in htb_class_mode() local
537 if ((toks = (cl->ctokens + *diff)) < htb_lowater(cl)) { in htb_class_mode()
538 *diff = -toks; in htb_class_mode()
542 if ((toks = (cl->tokens + *diff)) >= htb_hiwater(cl)) in htb_class_mode()
545 *diff = -toks; in htb_class_mode()
660 s64 toks = diff + cl->tokens; in htb_accnt_tokens() local
662 if (toks > cl->buffer) in htb_accnt_tokens()
663 toks = cl->buffer; in htb_accnt_tokens()
664 toks -= (s64) psched_l2t_ns(&cl->rate, bytes); in htb_accnt_tokens()
665 if (toks <= -cl->mbuffer) in htb_accnt_tokens()
[all …]