[ros-bugs] [Bug 916] New: Definition of InterlockedDecrement

ReactOS.Bugzilla at reactos.org ReactOS.Bugzilla at reactos.org
Mon Oct 17 01:00:50 CEST 2005


http://www.reactos.org/bugzilla/show_bug.cgi?id=916

           Summary: Definition of InterlockedDecrement
           Product: ReactOS
           Version: 0.2.8
          Platform: x86 Hardware
        OS/Version: ReactOS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Kernel
        AssignedTo: ros-bugs at reactos.com
        ReportedBy: razvan_hobeanu at yahoo.com
         QAContact: ros-bugs at reactos.com


00084 LONG 
00085 STDCALL
00086 InterlockedDecrement(LPLONG lpAddend)
00087 {
00088         long ret;
00089 #ifdef _M_IX86
00090         __asm__
00091         (                
00092            "\tlock\n"  /* for SMP systems */
00093            "\txaddl %0, (%1)\n"
00094            "\tdecl %0\n"
00095            :"=r" (ret)
00096            :"r" (lpAddend), "0" (-1)
00097            : "memory"
00098         );
00099 #elif defined(_M_PPC)
00100         ret = *lpAddend;
00101         ret = InterlockedExchangeAdd( lpAddend, ret - 1 );
00102 #else
00103 #error Unknown compiler for inline assembler
00104 #endif
00105         return ret;
00106 
00107 
00108 }

Line 101 should be:

ret = InterlockedExchangeAdd( lpAddend, -1 ) -1;

-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.


More information about the Ros-bugs mailing list