usr.sbin/amd/amd/sched.c
/*
 * Run any pending tasks.
 * This must be called with SIGCHLD disabled
 */
Run any pending tasks.
This must be called with SIGCHLD disabled
Run any pending tasks . This must be called with SIGCHLD disabled
void do_task_notify(P_void)
{
	while (FIRST(pjob, &proc_list_head) != HEAD(pjob, &proc_list_head)) {
		pjob *p = FIRST(pjob, &proc_list_head);
		rem_que(&p->hdr);
		--task_notify_todo;
		if (p->cb_fun)
			(*p->cb_fun)(p->w.w_retcode,
				p->w.w_termsig, p->cb_closure);
		free((voidp) p);
	}
}
void do_task_notify ( P_void ) { while ( FIRST ( pjob , & proc_list_head ) != HEAD ( pjob , & proc_list_head ) ) { pjob * p = FIRST ( pjob , & proc_list_head ) ; rem_que ( & p -> hdr ) ; -- task_notify_todo ; if ( p -> cb_fun ) ( * p -> cb_fun ) ( p -> w . w_retcode , p -> w . w_termsig , p -> cb_closure ) ; free ( ( voidp ) p ) ; } }
Run any pending tasks.
Run any pending tasks .
/*
	 * Keep taking the first item off the list and processing it.
	 *
	 * Done this way because the the callback can, quite reasonably,
	 * queue a new task, so no local reference into the list can be
	 * held here.
	 */ /*
		 * This job has completed
		 */ /*
		 * Do callback if it exists
		 */