mirror of
https://github.com/reactos/reactos.git
synced 2025-05-01 19:50:36 +00:00
[PORTCLS]
- Return correct status code from InterruptSync::CallSynchronizedRoutine svn path=/trunk/; revision=44551
This commit is contained in:
parent
b8d2bb2058
commit
aad3e1c393
1 changed files with 7 additions and 6 deletions
|
@ -52,6 +52,7 @@ public:
|
||||||
|
|
||||||
PINTERRUPTSYNCROUTINE m_SyncRoutine;
|
PINTERRUPTSYNCROUTINE m_SyncRoutine;
|
||||||
PVOID m_DynamicContext;
|
PVOID m_DynamicContext;
|
||||||
|
NTSTATUS m_Status;
|
||||||
|
|
||||||
LONG m_Ref;
|
LONG m_Ref;
|
||||||
|
|
||||||
|
@ -97,10 +98,10 @@ CInterruptSynchronizedRoutine(
|
||||||
IN PVOID ServiceContext)
|
IN PVOID ServiceContext)
|
||||||
{
|
{
|
||||||
CInterruptSync * This = (CInterruptSync*)ServiceContext;
|
CInterruptSync * This = (CInterruptSync*)ServiceContext;
|
||||||
NTSTATUS Status = This->m_SyncRoutine(This, This->m_DynamicContext);
|
This->m_Status = This->m_SyncRoutine(This, This->m_DynamicContext);
|
||||||
|
|
||||||
DPRINT("CInterruptSynchronizedRoutine this %p SyncRoutine %p Context %p Status %x\n", This, This->m_SyncRoutine, This->m_DynamicContext, Status);
|
DPRINT("CInterruptSynchronizedRoutine this %p SyncRoutine %p Context %p Status %x\n", This, This->m_SyncRoutine, This->m_DynamicContext, This->m_Status);
|
||||||
return NT_SUCCESS(Status);
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
@ -112,7 +113,7 @@ CInterruptSync::CallSynchronizedRoutine(
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
|
||||||
DPRINT("CInterruptSync::CallSynchronizedRoutine this %p Routine %p DynamicContext %p Irql %x Interrupt %p\n", this, Routine, DynamicContext, KeGetCurrentIrql(), m_Interrupt);
|
DPRINT("CInterruptSync::CallSynchronizedRoutine this %p Routine %p DynamicContext %p Irql %x Interrupt %p\n", this, Routine, DynamicContext, KeGetCurrentIrql(), m_Interrupt);
|
||||||
|
|
||||||
if (!m_Interrupt)
|
if (!m_Interrupt)
|
||||||
{
|
{
|
||||||
DPRINT("CInterruptSync_CallSynchronizedRoutine %p no interrupt connected\n", this);
|
DPRINT("CInterruptSync_CallSynchronizedRoutine %p no interrupt connected\n", this);
|
||||||
|
@ -125,14 +126,14 @@ CInterruptSync::CallSynchronizedRoutine(
|
||||||
CInterruptSynchronizedRoutine((PVOID)this);
|
CInterruptSynchronizedRoutine((PVOID)this);
|
||||||
KeReleaseSpinLock(&m_Lock, OldIrql);
|
KeReleaseSpinLock(&m_Lock, OldIrql);
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return m_Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_SyncRoutine = Routine;
|
m_SyncRoutine = Routine;
|
||||||
m_DynamicContext = DynamicContext;
|
m_DynamicContext = DynamicContext;
|
||||||
|
|
||||||
if (KeSynchronizeExecution(m_Interrupt, CInterruptSynchronizedRoutine, (PVOID)this))
|
if (KeSynchronizeExecution(m_Interrupt, CInterruptSynchronizedRoutine, (PVOID)this))
|
||||||
return STATUS_SUCCESS;
|
return m_Status;
|
||||||
else
|
else
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue