Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ithread_loop()
- /*
- * Service interrupts. If another interrupt arrives while
- * we are running, it will set it_need to note that we
- * should make another pass.
- */
- while (ithd->it_need) {
- /*
- * This might need a full read and write barrier
- * to make sure that this write posts before any
- * of the memory or device accesses in the
- * handlers.
- */
- atomic_store_rel_int(&ithd->it_need, 0);
- ithread_execute_handlers(p, ie);
- }
- ......
- intr_event_schedule_thread()
- /*
- * Set it_need to tell the thread to keep running if it is already
- * running. Then, lock the thread and see if we actually need to
- * put it on the runqueue.
- */
- it->it_need = 1;
- thread_lock(td);
- if (TD_AWAITING_INTR(td)) {
- CTR3(KTR_INTR, "%s: schedule pid %d (%s)", __func__, p->p_pid,
- td->td_name);
- TD_CLR_IWAIT(td);
- sched_add(td, SRQ_INTR);
- } else {
- CTR5(KTR_INTR, "%s: pid %d (%s): it_need %d, state %d",
- __func__, p->p_pid, td->td_name, it->it_need, td->td_state);
- }
- thread_unlock(td);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement