9fans archive / 1998 / 03 / 5 /    prev next

From: forsyth@cal... forsyth@cal...
Subject: [9fans] pentium msr support
Date: Mon, 9 Mar 1998 06:42:45 GMT

>>-	qlock(&msrlock);
>>-	for (i = 0; i < nf; ++i) {
>>-		switch (*f[i]) {
>>-		case 'c':
>>-			n = get_ulong(f[i]+1, 0, 1, "bad counter");
>>-			c[n] = 1;
>>-			break;

since get_ulong calls error(), i think you need to:

	qlock(&msrlock);
	if(waserror()){
		qunlock(&msrlock);
		nexterror();
	}
	...
and
	poperror();
at the end of the routine.