subr_taskqueue.c (00537061ddf4c4c8f696e11c81afbe3d9758dfc3) subr_taskqueue.c (0f180a7cce5bed801060557dd5bdbad64318d3c6)
1/*-
2 * Copyright (c) 2000 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 351 unchanged lines hidden (view full) ---

360{
361 struct taskqueue **tqp, *tq;
362
363 tqp = arg;
364 tq = *tqp;
365 TQ_LOCK(tq);
366 do {
367 taskqueue_run(tq);
1/*-
2 * Copyright (c) 2000 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 351 unchanged lines hidden (view full) ---

360{
361 struct taskqueue **tqp, *tq;
362
363 tqp = arg;
364 tq = *tqp;
365 TQ_LOCK(tq);
366 do {
367 taskqueue_run(tq);
368 TQ_SLEEP(tq, tq, &tq->tq_mutex, curthread->td_priority, "-", 0);
368 TQ_SLEEP(tq, tq, &tq->tq_mutex, 0, "-", 0);
369 } while ((tq->tq_flags & TQ_FLAGS_ACTIVE) != 0);
370
371 /* rendezvous with thread that asked us to terminate */
372 tq->tq_pcount--;
373 wakeup_one(tq->tq_pproc);
374 TQ_UNLOCK(tq);
375 kthread_exit(0);
376}

--- 55 unchanged lines hidden ---
369 } while ((tq->tq_flags & TQ_FLAGS_ACTIVE) != 0);
370
371 /* rendezvous with thread that asked us to terminate */
372 tq->tq_pcount--;
373 wakeup_one(tq->tq_pproc);
374 TQ_UNLOCK(tq);
375 kthread_exit(0);
376}

--- 55 unchanged lines hidden ---