equal
deleted
inserted
replaced
31 |
31 |
32 #ifdef _DEBUG |
32 #ifdef _DEBUG |
33 extern "C" void __FaultIpcClientNotNull(); // defined in ckernel.cpp |
33 extern "C" void __FaultIpcClientNotNull(); // defined in ckernel.cpp |
34 #endif |
34 #endif |
35 |
35 |
36 #ifdef _DEBUG |
36 |
37 __NAKED__ TInt DoThreadReadAndParseDesHeader(DThread* aThread, const TAny* aSrc, TDesHeader& aDest) |
|
38 #else |
|
39 __NAKED__ TInt DThread::ReadAndParseDesHeader(const TAny* aSrc, TDesHeader& aDest) |
37 __NAKED__ TInt DThread::ReadAndParseDesHeader(const TAny* aSrc, TDesHeader& aDest) |
40 #endif |
|
41 { |
38 { |
42 ASM_ASSERT_PAGING_SAFE; |
39 ASM_ASSERT_PAGING_SAFE; |
43 // save state including 'this', aSrc and sDest. Double word aligns the stack |
40 // save state including 'this', aSrc and sDest. Double word aligns the stack |
44 // which is required to call c++ functions. |
41 // which is required to call c++ functions. |
45 asm("stmdb sp!, {r0-r2, r4-r8, r10, lr} "); |
42 asm("stmdb sp!, {r0-r2, r4-r8, r10, lr} "); |
62 asm("mov r0, r4"); // r0 = target process ('this' for TryOpenOsAsid() below). |
59 asm("mov r0, r4"); // r0 = target process ('this' for TryOpenOsAsid() below). |
63 asm("bl " CSM_ZN16DMemModelProcess13TryOpenOsAsidEv); |
60 asm("bl " CSM_ZN16DMemModelProcess13TryOpenOsAsidEv); |
64 // Check a reference could be opened on target process's os asid, failed if r0 < 0. |
61 // Check a reference could be opened on target process's os asid, failed if r0 < 0. |
65 asm("cmp r0, #0"); |
62 asm("cmp r0, #0"); |
66 asm("bmi readParseDesHeader_ExitErr"); |
63 asm("bmi readParseDesHeader_ExitErr"); |
|
64 |
67 asm("mov r10, r0"); // r10 = os asid of current process |
65 asm("mov r10, r0"); // r10 = os asid of current process |
68 |
|
69 asm("ldmia sp!, {r0-r2}"); // r0 = this, r1 = aSrc, r2 = aDest |
66 asm("ldmia sp!, {r0-r2}"); // r0 = this, r1 = aSrc, r2 = aDest |
70 |
67 |
71 __ASM_CLI(); // disable all interrupts |
68 __ASM_CLI(); // disable all interrupts |
72 #ifdef __SMP__ |
69 #ifdef __SMP__ |
73 GET_RWNO_TID(,r6); // r6->TSubScheduler |
70 GET_RWNO_TID(,r6); // r6->TSubScheduler |