Lines Matching defs:pool

81 	pthread_mutex_t			lock; /* protects all pool lists */
203 struct lws_pool *pool = &tp->pool_list[n];
204 struct lws_threadpool_task *task = pool->task;
332 struct lws_pool *pool = &tp->pool_list[n];
334 task = pool->task;
392 lws_threadpool_worker_sync(struct lws_pool *pool,
402 pthread_mutex_lock(&pool->lock); /* ======================= pool lock */
405 pool->tp->name, task, task->name, lws_wsi_tag(task_to_wsi(task)));
421 "wsi to sync to\n", __func__, pool->tp->name,
456 if (pthread_cond_timedwait(&task->wake_idle, &pool->lock,
462 __func__, pool->tp->name, task,
465 pthread_mutex_unlock(&pool->lock); /* ----------------- - pool unlock */
481 pthread_mutex_unlock(&pool->lock); /* ----------------- - pool unlock */
494 struct lws_pool *pool = d;
495 struct lws_threadpool *tp = pool->tp;
519 pool->task = NULL;
529 pool->task = task = *c2;
530 task->acquired = pool->acquired = lws_now_usecs();
552 __func__, tp->name, pool->worker_index, buf);
609 if (lws_threadpool_worker_sync(pool, task)) {
628 if (pool->task->status == LWS_TP_STATUS_STOPPING)
633 pool->task->task_queue_next = tp->task_done_head;
636 pool->task->done = lws_now_usecs();
638 if (!pool->task->args.wsi &&
639 (pool->task->status == LWS_TP_STATUS_STOPPED ||
640 pool->task->status == LWS_TP_STATUS_FINISHED)) {
642 __lws_threadpool_task_dump(pool->task, buf, sizeof(buf));
644 __func__, tp->name, pool->worker_index,
652 __lws_threadpool_reap(pool->task);
655 __lws_threadpool_task_dump(pool->task, buf, sizeof(buf));
657 __func__, tp->name, pool->worker_index,
663 if (task_to_wsi(pool->task)) {
667 lws_get_context(task_to_wsi(pool->task)));
672 pool->task = NULL;
749 * pool threads will exit ASAP (they are joined in destroy) */