FreeBSD/sys/kern/kern_intr.c
/*
 * Update an ithread based on the associated intr_event.
 */
Update an ithread based on the associated intr_event.
Update an ithread based on the associated intr_event .
static void
ithread_update(struct intr_thread *ithd)
{
	struct intr_event *ie;
	struct thread *td;
	u_char pri;
	ie = ithd->it_event;
	td = ithd->it_thread;
	if (TAILQ_EMPTY(&ie->ie_handlers))
		pri = PRI_MAX_ITHD;
	else
		pri = TAILQ_FIRST(&ie->ie_handlers)->ih_pri;
	strlcpy(td->td_name, ie->ie_fullname, sizeof(td->td_name));
#ifdef KTR
	sched_clear_tdname(td);
#endif
	thread_lock(td);
	sched_prio(td, pri);
	thread_unlock(td);
}
static void ithread_update ( struct intr_thread * ithd ) { struct intr_event * ie ; struct thread * td ; u_char pri ; ie = ithd -> it_event ; td = ithd -> it_thread ; if ( TAILQ_EMPTY ( & ie -> ie_handlers ) ) pri = PRI_MAX_ITHD ; else pri = TAILQ_FIRST ( & ie -> ie_handlers ) -> ih_pri ; strlcpy ( td -> td_name , ie -> ie_fullname , sizeof ( td -> td_name ) ) ; #ifdef KTR sched_clear_tdname ( td ) ; #endif thread_lock ( td ) ; sched_prio ( td , pri ) ; thread_unlock ( td ) ; }
Update an ithread based on the associated intr_event.
Update an ithread based on the associated intr_event .
/* Determine the overall priority of this event. */ /* Update name and priority. */