kernel/eka/euser/epoc/x86/uc_utl.cia
changeset 201 43365a9b78a3
parent 0 a41df078684a
child 257 3e88ff8f41d5
equal deleted inserted replaced
200:73ea206103e6 201:43365a9b78a3
    37 	asm("fast_lock_wait_sem:");
    37 	asm("fast_lock_wait_sem:");
    38 	asm("mov eax, %0": : "i"(EExecSemaphoreWait));
    38 	asm("mov eax, %0": : "i"(EExecSemaphoreWait));
    39 	asm("mov ecx, [ecx]");
    39 	asm("mov ecx, [ecx]");
    40 	asm("xor edx, edx");
    40 	asm("xor edx, edx");
    41 	asm("int 0x21");
    41 	asm("int 0x21");
       
    42 	THISCALL_EPILOG0()
       
    43 	}
       
    44 
       
    45 EXPORT_C __NAKED__ TInt RFastLock::Poll()
       
    46 	{
       
    47 	THISCALL_PROLOG0()
       
    48 	asm("xor eax, eax ");
       
    49 	asm("xor edx, edx ");
       
    50 	asm("dec edx ");
       
    51 
       
    52 	/* if ([ecx+4]==0) { [ecx+4]=-1; ZF=1;} else {eax=[ecx+4]; ZF=0;} */
       
    53 	asm("lock cmpxchg [ecx+4], edx ");
       
    54 	asm("jz short fastlock_poll_done ");
       
    55 	asm("mov eax, %0": : "i"(KErrTimedOut));
       
    56 
       
    57 	asm("fastlock_poll_done: ");
    42 	THISCALL_EPILOG0()
    58 	THISCALL_EPILOG0()
    43 	}
    59 	}
    44 
    60 
    45 EXPORT_C __NAKED__ void RFastLock::Signal()
    61 EXPORT_C __NAKED__ void RFastLock::Signal()
    46 	{
    62 	{