return me;
}
+IOInterruptEventSource *
+IOInterruptEventSource::interruptEventSource(OSObject *inOwner,
+ IOService *inProvider,
+ int inIntIndex,
+ ActionBlock inAction)
+{
+ IOInterruptEventSource * ies;
+ ies = IOInterruptEventSource::interruptEventSource(inOwner, (Action) NULL, inProvider, inIntIndex);
+ if (ies) ies->setActionBlock((IOEventSource::ActionBlock) inAction);
+
+ return ies;
+}
+
void IOInterruptEventSource::free()
{
if (provider && intIndex >= 0)
unsigned int cacheProdCount = producerCount;
int numInts = cacheProdCount - consumerCount;
IOInterruptEventAction intAction = (IOInterruptEventAction) action;
+ ActionBlock intActionBlock = (ActionBlock) actionBlock;
bool trace = (gIOKitTrace & kIOTraceIntEventSource) ? true : false;
IOStatisticsCheckForWork();
{
if (trace)
IOTimeStampStartConstant(IODBG_INTES(IOINTES_ACTION),
- VM_KERNEL_UNSLIDE(intAction), (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
+ VM_KERNEL_ADDRHIDE(intAction), VM_KERNEL_ADDRHIDE(owner),
+ VM_KERNEL_ADDRHIDE(this), VM_KERNEL_ADDRHIDE(workLoop));
if (reserved->statistics) {
if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelSystemTimeIndex)) {
}
// Call the handler
- (*intAction)(owner, this, numInts);
+ if (kActionBlock & flags) (intActionBlock)(this, numInts);
+ else (*intAction)(owner, this, numInts);
if (reserved->statistics) {
if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelCountIndex)) {
if (trace)
IOTimeStampEndConstant(IODBG_INTES(IOINTES_ACTION),
- VM_KERNEL_UNSLIDE(intAction), (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
+ VM_KERNEL_ADDRHIDE(intAction), VM_KERNEL_ADDRHIDE(owner),
+ VM_KERNEL_ADDRHIDE(this), VM_KERNEL_ADDRHIDE(workLoop));
consumerCount = cacheProdCount;
if (autoDisable && !explicitDisable)
{
if (trace)
IOTimeStampStartConstant(IODBG_INTES(IOINTES_ACTION),
- VM_KERNEL_UNSLIDE(intAction), (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
+ VM_KERNEL_ADDRHIDE(intAction), VM_KERNEL_ADDRHIDE(owner),
+ VM_KERNEL_ADDRHIDE(this), VM_KERNEL_ADDRHIDE(workLoop));
if (reserved->statistics) {
if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelSystemTimeIndex)) {
}
// Call the handler
- (*intAction)(owner, this, -numInts);
+ if (kActionBlock & flags) (intActionBlock)(this, numInts);
+ else (*intAction)(owner, this, numInts);
if (reserved->statistics) {
if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelCountIndex)) {
if (trace)
IOTimeStampEndConstant(IODBG_INTES(IOINTES_ACTION),
- VM_KERNEL_UNSLIDE(intAction), (uintptr_t) owner, (uintptr_t) this, (uintptr_t) workLoop);
+ VM_KERNEL_ADDRHIDE(intAction), VM_KERNEL_ADDRHIDE(owner),
+ VM_KERNEL_ADDRHIDE(this), VM_KERNEL_ADDRHIDE(workLoop));
consumerCount = cacheProdCount;
if (autoDisable && !explicitDisable)
producerCount++;
if (trace)
- IOTimeStampStartConstant(IODBG_INTES(IOINTES_SEMA), (uintptr_t) this, (uintptr_t) owner);
+ IOTimeStampStartConstant(IODBG_INTES(IOINTES_SEMA), VM_KERNEL_ADDRHIDE(this), VM_KERNEL_ADDRHIDE(owner));
if (reserved->statistics) {
if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingFirstLevelCountIndex)) {
signalWorkAvailable();
if (trace)
- IOTimeStampEndConstant(IODBG_INTES(IOINTES_SEMA), (uintptr_t) this, (uintptr_t) owner);
+ IOTimeStampEndConstant(IODBG_INTES(IOINTES_SEMA), VM_KERNEL_ADDRHIDE(this), VM_KERNEL_ADDRHIDE(owner));
}
void IOInterruptEventSource::disableInterruptOccurred
producerCount++;
if (trace)
- IOTimeStampStartConstant(IODBG_INTES(IOINTES_SEMA), (uintptr_t) this, (uintptr_t) owner);
+ IOTimeStampStartConstant(IODBG_INTES(IOINTES_SEMA), VM_KERNEL_ADDRHIDE(this), VM_KERNEL_ADDRHIDE(owner));
if (reserved->statistics) {
if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingFirstLevelCountIndex)) {
signalWorkAvailable();
if (trace)
- IOTimeStampEndConstant(IODBG_INTES(IOINTES_SEMA), (uintptr_t) this, (uintptr_t) owner);
+ IOTimeStampEndConstant(IODBG_INTES(IOINTES_SEMA), VM_KERNEL_ADDRHIDE(this), VM_KERNEL_ADDRHIDE(owner));
}
void IOInterruptEventSource::interruptOccurred