• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/OpenLDAP-491.1/OpenLDAP/libraries/libldap_r/

Lines Matching refs:task

108 	/* pending tasks, and unused task objects */
118 /* Some active task needs to be the sole active task.
249 /* Submit a task to be performed by the thread pool */
256 ldap_int_thread_task_t *task;
272 task = LDAP_SLIST_FIRST(&pool->ltp_free_list);
273 if (task) {
276 task = (ldap_int_thread_task_t *) LDAP_MALLOC(sizeof(*task));
277 if (task == NULL)
281 task->ltt_start_routine = start_routine;
282 task->ltt_arg = arg;
285 LDAP_STAILQ_INSERT_TAIL(&pool->ltp_pending_list, task, ltt_next.q);
317 if (ptr == task) break;
318 if (ptr == task) {
319 /* no open threads, task not handled, so
320 * back out of ltp_pending_count, free the task,
324 LDAP_STAILQ_REMOVE(&pool->ltp_pending_list, task,
326 LDAP_SLIST_INSERT_HEAD(&pool->ltp_free_list, task,
332 * task will be handled eventually.
353 /* Cancel a pending task that was previously submitted.
354 * Return 1 if the task was successfully cancelled, 0 if
363 ldap_int_thread_task_t *task;
374 LDAP_STAILQ_FOREACH(task, &pool->ltp_pending_list, ltt_next.q)
375 if (task->ltt_start_routine == start_routine &&
376 task->ltt_arg == arg) {
377 /* Could LDAP_STAILQ_REMOVE the task, but that
380 task->ltt_start_routine = no_task;
381 task->ltt_arg = NULL;
385 return task != NULL;
545 ldap_int_thread_task_t *task;
572 while ((task = LDAP_STAILQ_FIRST(&pool->ltp_pending_list)) != NULL) {
574 LDAP_FREE(task);
585 while ((task = LDAP_SLIST_FIRST(&pool->ltp_free_list)) != NULL)
588 LDAP_FREE(task);
607 ldap_int_thread_task_t *task;
645 task = LDAP_STAILQ_FIRST(work_list);
646 if (task == NULL) { /* paused or no pending tasks */
675 task = LDAP_STAILQ_FIRST(work_list);
676 } while (task == NULL);
685 task->ltt_start_routine(&ctx, task->ltt_arg);
688 LDAP_SLIST_INSERT_HEAD(&pool->ltp_free_list, task, ltt_next.l);