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\ncthrd.cia
20 const TLinAddr NKern_Exit = (TLinAddr)NKern::Exit;
21 const TLinAddr NKern_Lock = (TLinAddr)NKern::Lock;
23 // Called by a thread when it first runs
24 __NAKED__ void __StartThread()
26 // On entry edi=entry point, esi=parameter block
34 asm("call %a0" : : "i"(NKern_Exit));
38 // Called by a thread which has been forced to exit
39 // Interrupts off here, kernel unlocked
40 __NAKED__ void __DoForcedExit()
43 asm("call %a0" : : "i"(NKern_Lock));
44 asm("mov ecx, [%a0]" : : "i"(&TheScheduler.iCurrentThread));
45 asm("mov dword ptr [ecx+%0], 0" : : "i"_FOFF(NThreadBase,iCsCount));
48 asm("call __ZN11NThreadBase4ExitEv");
51 TheScheduler.iCurrentThread->Exit();
57 __NAKED__ TUint32 X86::GetCR0()
63 __NAKED__ void X86::SetCR0(TUint32)
65 asm("mov eax, [esp+4]");
70 __NAKED__ TUint32 X86::ModifyCR0(TUint32 /*clear*/, TUint32 /*set*/)
72 asm("mov ecx, [esp+4]");
73 asm("mov edx, [esp+8]");