Is an atomic compare-and-swap (and preferably atomic read to go with
it) operation anywhere on the horizon? None of the current operations
support a thread-safe non-locking method to change pointer values
(a.k.a. I hate locking).
You can sort of do it with SDL_AtomicFetchThenAdd with a value of 0. I
agree that would be a useful addition to the API though.
Is anyone currently using the atomic operations in SDL 1.3? Does anyone
else have comments on what should and shouldn’t be there?On Fri, Jan 14, 2011 at 1:35 AM, Jared Maddox wrote:
Is an atomic compare-and-swap (and preferably atomic read to go with
it) operation anywhere on the horizon? None of the current operations
support a thread-safe non-locking method to change pointer values
(a.k.a. I hate locking).
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
I’m going to review the SDL atomic operations API today.
Thanks!On Fri, Jan 14, 2011 at 1:35 AM, Jared Maddox wrote:
Is an atomic compare-and-swap (and preferably atomic read to go with
it) operation anywhere on the horizon? None of the current operations
support a thread-safe non-locking method to change pointer values
(a.k.a. I hate locking).
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
Would it be possible to make these optional in the build?
I remember a while back I attempted to build the SDL 1.3 for an arm project and
I could because of these.________________________________
From: slouken@libsdl.org (slouken)
To: SDL Development List
Sent: Fri, January 14, 2011 11:06:36 AM
Subject: Re: [SDL] SDL Atomic operations
I’m going to review the SDL atomic operations API today.
Thanks!
On Fri, Jan 14, 2011 at 1:35 AM, Jared Maddox wrote:
Is an atomic compare-and-swap (and preferably atomic read to go with
it) operation anywhere on the horizon? None of the current operations
support a thread-safe non-locking method to change pointer values
(a.k.a. I hate locking).
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
There’s some great information on the design and considerations of the SDL
Atomic API here:
http://www.thegrumpyprogrammer.com/blog/1
I’m going to contact Bob and double check some things.
Cheers!On Fri, Jan 14, 2011 at 1:35 AM, Jared Maddox wrote:
Is an atomic compare-and-swap (and preferably atomic read to go with
it) operation anywhere on the horizon? None of the current operations
support a thread-safe non-locking method to change pointer values
(a.k.a. I hate locking).
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
[stuff]
And once again I’ve forgotten to edit the subject…On Sat, Jan 15, 2011 at 12:05 AM, Jared Maddox <@Jared_Maddox> wrote: