Subject: Re: cpu_intr_p() does not exist for all ports
To: Izumi Tsutsui <>
From: Paul Goyette <>
List: current-users
Date: 12/06/2007 05:21:33
On Thu, 6 Dec 2007, Izumi Tsutsui wrote:

> wrote:
>> It seems that even on those ports where the function is defined, it's
>> not consistently located.  It seems to show up in several different
>> source files on different ports.  Which file is best?
> It seems to indicate if the kernel is in interrupt or not,
> so sources which include interrupt handler may be appropriate.
> (sys/arch/xen/x86/intr.c for xen?)

OK.  BTW, even on those ports which _do_ have a cpu_intr_p() function, 
it doesn't seem to be exported in any header files.  So I'm not sure how 
we could ever successfully compile any kernel with LOCKDEBUG turned on.


>> But isn't this a _part_ of Andy's work?  He's the one who checked in
>> this change a couple days ago?
> I think he should focus on works which can be handled only by him.
> We should support him by other works we can do.

OK, I guess that's reasonable.

>> I'd be happy to write a dummy function for the ports that I use, but I
>> haven't a clue how to write a dummy machine-independant version and have
>> the MD version supersede it where the MD version exists.  It doesn't
>> seem smart to implement a separate dummy function for each port.
> Maybe an easy way is to put the dummy function in kern_rwlock.c
> itself and use __weak_alias()?

Oh, good.  Now I get to figure out what a __weak_alias() is and how to 
use it!

|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | |