Lines Matching defs:tb
299 tidbatch_prep(struct tidbatch *tb)
302 tb->n = 0;
306 tidbatch_add(struct tidbatch *tb, struct thread *td)
309 KASSERT(tb->n < nitems(tb->tab),
310 ("%s: count too high %d", __func__, tb->n));
311 tb->tab[tb->n] = td->td_tid;
312 tb->n++;
316 tidbatch_process(struct tidbatch *tb)
319 KASSERT(tb->n <= nitems(tb->tab),
320 ("%s: count too high %d", __func__, tb->n));
321 if (tb->n == nitems(tb->tab)) {
322 tid_free_batch(tb->tab, tb->n);
323 tb->n = 0;
328 tidbatch_final(struct tidbatch *tb)
331 KASSERT(tb->n <= nitems(tb->tab),
332 ("%s: count too high %d", __func__, tb->n));
333 if (tb->n != 0) {
334 tid_free_batch(tb->tab, tb->n);
346 tdcountbatch_prep(struct tdcountbatch *tb)
349 tb->n = 0;
353 tdcountbatch_add(struct tdcountbatch *tb, struct thread *td __unused)
356 tb->n++;
360 tdcountbatch_process(struct tdcountbatch *tb)
363 if (tb->n == 32) {
364 thread_count_sub(tb->n);
365 tb->n = 0;
370 tdcountbatch_final(struct tdcountbatch *tb)
373 if (tb->n != 0) {
374 thread_count_sub(tb->n);