Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 268 of file libsupp.c.
{ PKTHREAD Thread = KeGetCurrentThread(); /* Don't even try at ISR level or later */ if (KeGetCurrentIrql() > DISPATCH_LEVEL) return FALSE; /* Start with defaults */ *StackBegin = Thread->StackLimit; *StackEnd = (ULONG_PTR)Thread->StackBase; /* Check if EBP is inside the stack */ if ((*StackBegin <= Ebp) && (Ebp <= *StackEnd)) { /* Then make the stack start at EBP */ *StackBegin = Ebp; } else { /* Now we're going to assume we're on the DPC stack */ *StackEnd = (ULONG_PTR)(KeGetPcr()->Prcb->DpcStack); *StackBegin = *StackEnd - KERNEL_STACK_SIZE; /* Check if we seem to be on the DPC stack */ if ((*StackEnd) && (*StackBegin < Ebp) && (Ebp <= *StackEnd)) { /* We're on the DPC stack */ *StackBegin = Ebp; } else { /* We're somewhere else entirely... use EBP for safety */ *StackBegin = Ebp; *StackEnd = (ULONG_PTR)PAGE_ALIGN(*StackBegin); } } /* Return success */ return TRUE; }