worker
struct pci_vtscsi_worker *worker = (struct pci_vtscsi_worker *)arg;
struct pci_vtscsi_queue *q = worker->vsw_queue;
while (STAILQ_EMPTY(&q->vsq_requests) && !worker->vsw_exiting)
if (worker->vsw_exiting) {
struct pci_vtscsi_worker *worker;
worker = calloc(1, sizeof(struct pci_vtscsi_worker));
if (worker == NULL)
worker->vsw_queue = queue;
pthread_create(&worker->vsw_thread, NULL, &pci_vtscsi_proc,
(void *)worker);
pthread_set_name_np(worker->vsw_thread, tname);
LIST_INSERT_HEAD(&queue->vsq_workers, worker, vsw_link);
ipmgmt_common_handler(char *if_name, char *aobj_name, db_wfunc_t worker)
err = ipmgmt_db_walk(worker, &cbarg, IPADM_DB_READ);
Runnable worker = new Runnable() {
Thread t = new Thread(worker);
stmf_worker_t worker;
if (mdb_vread(&worker, sizeof (stmf_worker_t), wsp->walk_addr) !=
wsp->walk_addr = (uintptr_t)(worker.worker_task_head);
stmf_worker_t worker;
if (mdb_vread(&worker, sizeof (stmf_worker_t),
if (worker.worker_task_head == NULL) {
(uintptr_t)worker.worker_task_head) == -1) {
worker.worker_task_head);
stmf_worker_t *worker;
if (mdb_readvar(&worker, "stmf_workers") == -1) {
wsp->walk_addr = (uintptr_t)worker;
stmf_worker_t worker;
if (mdb_vread(&worker, sizeof (stmf_worker_t),
(worker.worker_flags == STMF_WORKER_STARTED) ? "STARTED" :
(worker.worker_flags & STMF_WORKER_ACTIVE) ?
worker.worker_ref_count,
worker.worker_queue_depth);
if (worker->ltw_exiting)
req->lr_worker = worker;
struct l9p_worker *worker;
worker = calloc(1, sizeof(struct l9p_worker));
if (worker == NULL)
worker->ltw_tp = tp;
worker->ltw_responder = i == 0;
error = pthread_create(&worker->ltw_thread, NULL,
worker->ltw_responder ? l9p_responder : l9p_worker,
(void *)worker);
free(worker);
if (worker->ltw_responder)
if (worker->ltw_responder) {
pthread_set_name_np(worker->ltw_thread, "9p-responder");
pthread_set_name_np(worker->ltw_thread, threadname);
if (worker->ltw_responder) {
(void) pthread_setname_np(worker->ltw_thread,
(void) pthread_setname_np(worker->ltw_thread,
LIST_INSERT_HEAD(&tp->ltp_workers, worker, ltw_link);
struct l9p_worker *worker, *tmp;
LIST_FOREACH_SAFE(worker, &tp->ltp_workers, ltw_link, tmp) {
worker->ltw_exiting = true;
if (worker->ltw_responder)
(void) pthread_join(worker->ltw_thread, NULL);
LIST_REMOVE(worker, ltw_link);
free(worker);
struct l9p_worker *worker = arg;
tp = worker->ltw_tp;
while (STAILQ_EMPTY(&tp->ltp_replyq) && !worker->ltw_exiting) {
if (worker->ltw_exiting) {
struct l9p_worker *worker = arg;
tp = worker->ltw_tp;
while (STAILQ_EMPTY(&tp->ltp_workq) && !worker->ltw_exiting) {
pthread_create(&aThread[i], 0, worker, 0);
pthread_t worker;
(void) pthread_create(&worker, &tattr,