Update contrib.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\nkern\x86\ncmonitor.cia
20 #include <kernel/monitor.h>
22 const TLinAddr Monitor_Leave = (TLinAddr)&Monitor::Leave;
24 __NAKED__ void Monitor::HandleException()
26 // Handle an exception while the monitor is running
29 // EBP points to saved exception frame
30 asm("mov ecx, dword ptr [%a0]": : "i"(&TheMonitorPtr));
31 asm("lea ecx, [ecx+%0]": : "i"_FOFF(Monitor,iExceptionInfo));
32 asm("mov eax, [ebp+%0]": : "i"_FOFF(TX86ExcInfo,iEip));
33 asm("mov ebx, [ebp+%0]": : "i"_FOFF(TX86ExcInfo,iFaultAddress));
34 asm("mov edx, [ebp+%0]": : "i"_FOFF(TX86ExcInfo,iExcErrorCode));
35 asm("mov esi, [ebp+%0]": : "i"_FOFF(TX86ExcInfo,iExcId));
36 asm("mov [ecx+0], eax");
37 asm("mov [ecx+4], ebx");
38 asm("mov [ecx+8], ecx");
39 asm("mov [ecx+12], esi");
41 //Monitor::Leave(KErrAbort);
42 asm("push %0": :"i"(KErrAbort));
43 asm("call %a0": :"i"(Monitor_Leave));