diff -r a179b74831c9 -r c1f20ce4abcf kernel/eka/euser/epoc/win32/uc_utl.cpp --- a/kernel/eka/euser/epoc/win32/uc_utl.cpp Thu Aug 19 11:14:22 2010 +0300 +++ b/kernel/eka/euser/epoc/win32/uc_utl.cpp Tue Aug 31 16:34:26 2010 +0300 @@ -114,6 +114,21 @@ RSemaphore::Wait(); } +EXPORT_C __NAKED__ TInt RFastLock::Poll() + { + _asm xor eax, eax + _asm xor edx, edx + _asm dec edx + + /* if ([ecx+4]==0) { [ecx+4]=-1; ZF=1;} else {eax=[ecx+4]; ZF=0;} */ + _asm lock cmpxchg [ecx+4], edx + _asm jz short fastlock_poll_done + _asm mov eax, -33 + + fastlock_poll_done: + _asm ret + } + EXPORT_C void RFastLock::Signal() { if (InterlockedIncrement((LPLONG)&iCount) < 0)