[cairo-bugs] [Bug 27344] _cairo_atomic_mutex not initialized

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Mar 27 20:06:33 PDT 2010


http://bugs.freedesktop.org/show_bug.cgi?id=27344





--- Comment #4 from gillen.christian at gmail.com  2010-03-27 20:06:31 PST ---
Created an attachment (id=34513)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=34513)
Win32 atomic ops

Well here is a patch that implements the needed defines with winapi functions.
It works for my very simple usecase, but I haven't tested it further. If you
want to use atomic ops, cairo also needs the ffs function which doesn't exist
in MSVC. The following code can replace it:

int ffs(int mask) 
{
        unsigned long index;
        if (_BitScanForward(&index, mask) == 0)
                return 0;
        else
                return index + 1;
}


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list