Did the hdac patch work? (Re: Branching CVS for 1.10 on wednesday)

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Fri Jul 20 02:59:34 PDT 2007


Simon 'corecode' Schubert wrote:
Matthew Dillon wrote:
    Simon, did that hdac patch work?
sorry, didn't have time yet to try out.  will do so in a couple of minutes.
Okay, I produced another patch which seems to be working.  It's kind of hackish, but you get my point.

cheers
 simon
--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Index: kern/kern_intr.c
===================================================================
RCS file: /home/dcvs/src/sys/kern/kern_intr.c,v
retrieving revision 1.49
diff -u -p -r1.49 kern_intr.c
--- kern/kern_intr.c	1 May 2007 23:53:51 -0000	1.49
+++ kern/kern_intr.c	20 Jul 2007 08:58:22 -0000
@@ -351,6 +351,9 @@ 		break;
 	}
 	if (rec0 == NULL)
 	    info->i_mplock_required = 0;
+
+	while (info->i_running & 2)
+		tsleep(info, 0, "wtintr", 1);
     }
 
     crit_exit();
@@ -497,8 +500,8 @@ 	    report_stray_interrupt(intr, info);
 	} else {
 #ifdef SMP
 	    if (info->i_thread.td_gd == mycpu) {
-		if (info->i_running == 0) {
-		    info->i_running = 1;
+		if (info->i_running & 1 == 0) {
+		    info->i_running |= 1;
 		    if (info->i_state != ISTATE_LIVELOCKED)
 			lwkt_schedule(&info->i_thread); /* MIGHT PREEMPT */
 		}
@@ -507,8 +510,8 @@ 		lwkt_send_ipiq(info->i_thread.td_gd, 
 				sched_ithd_remote, (void *)intr);
 	    }
 #else
-	    if (info->i_running == 0) {
-		info->i_running = 1;
+	    if ((info->i_running & 1) == 0) {
+		info->i_running |= 1;
 		if (info->i_state != ISTATE_LIVELOCKED)
 		    lwkt_schedule(&info->i_thread); /* MIGHT PREEMPT */
 	    }
@@ -782,7 +785,7 @@ 	 * FAST and SLOW designated service rou
 	 */
 	if (info->i_running) {
 	    ++ill_count;
-	    info->i_running = 0;
+	    info->i_running = 2;
 
 	    if (*list == NULL)
 		report_stray_interrupt(intr, info);
@@ -796,6 +799,7 @@ 		} else {
 		    rec->handler(rec->argument, NULL);
 		}
 	    }
+	    info->i_running &= 1;
 	}
 
 	/*




More information about the Kernel mailing list