So I’ve been doing a lot of research on lock-free algorithms the past couple
weeks, and I’m not sure that atomic operations make sense to be in the SDL
API.
My blog has some interesting details:
Thoughts?
See ya!–
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
Hi,
that looks like a very nice result
Very low latency on the event queue.
I’ve often used the fastevent Queue from Bob for multi threaded SDL
programs. Since that let you write events into the event queue from
multiple threads quite nicely.
However your lock free implementation of an event queue would be even better
than that.
cu.On Wed, Jan 26, 2011 at 9:03 AM, Sam Lantinga wrote:
So I’ve been doing a lot of research on lock-free algorithms the past
couple weeks, and I’m not sure that atomic operations make sense to be in
the SDL API.
My blog has some interesting details:
http://slouken.blogspot.com/2011/01/is-lock-free-worth-it.html
Thoughts?
See ya!
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Looks sexy. I rely on event queues a lot for thread communication in my
game, I certainly would love to have the API if it’s reliable on all
platforms.
As for the scope of SDL, it what you want to include in it. If it were just
me, mixer, image and net would be in the main library.
2011/1/26 Sam Lantinga > So I’ve been doing a lot of research on lock-free algorithms the past
couple weeks, and I’m not sure that atomic operations make sense to be in
the SDL API.
My blog has some interesting details:
http://slouken.blogspot.com/2011/01/is-lock-free-worth-it.html
Thoughts?
See ya!
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Message-ID:
? ? ? ?<AANLkTi=y9=hs9OgWF4Odp2J64-WGw2q-zZZaioAA1-35 at mail.gmail.com>
Content-Type: text/plain; charset=“iso-8859-1”
So I’ve been doing a lot of research on lock-free algorithms the past couple
weeks, and I’m not sure that atomic operations make sense to be in the SDL
API.
My blog has some interesting details:
http://slouken.blogspot.com/2011/01/is-lock-free-worth-it.html
Thoughts?
See ya!
? ?-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
I’m interested in using them, and it’s certainly a lot nicer to have a
cross-platform set of them than it is to have to either implement them
yourself with an individual platform’s set, or use the platform’s set
directly.> Date: Wed, 26 Jan 2011 01:03:18 -0800
From: Sam Lantinga
To: SDL
Subject: [SDL] SDL Atomic API thoughts
Okay, fair enough. I’ll keep them available and actually use them for the
SDL event queue.
While I was in the event code I found some ways to simplify and improve
things… whack whack whack! 
See ya!On Wed, Jan 26, 2011 at 10:13 PM, Jared Maddox wrote:
Date: Wed, 26 Jan 2011 01:03:18 -0800
From: Sam Lantinga <@slouken>
To: SDL
Subject: [SDL] SDL Atomic API thoughts
Message-ID:
<AANLkTi=y9=hs9OgWF4Odp2J64-WGw2q-zZZaioAA1-35 at mail.gmail.com>
Content-Type: text/plain; charset=“iso-8859-1”
So I’ve been doing a lot of research on lock-free algorithms the past
couple
weeks, and I’m not sure that atomic operations make sense to be in the
SDL
API.
My blog has some interesting details:
http://slouken.blogspot.com/2011/01/is-lock-free-worth-it.html
Thoughts?
See ya!
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC
I’m interested in using them, and it’s certainly a lot nicer to have a
cross-platform set of them than it is to have to either implement them
yourself with an individual platform’s set, or use the platform’s set
directly.
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
If you didn’t use atomics how did you implement your queue? If you
used spin locks as a substitute for OS based mutexes then you were
using atomics, spin locks are based on an atomic operation.
I would really like to see the results of the test with 8 readers and
8 writers. You can get some interesting behavior when you use spin
locks with more active software threads than the there are hardware
threads.
Bob PendletonOn Wed, Jan 26, 2011 at 3:03 AM, Sam Lantinga wrote:
So I’ve been doing a lot of research on lock-free algorithms the past couple
weeks, and I’m not sure that atomic operations make sense to be in the SDL
API.
My blog has some interesting details:
http://slouken.blogspot.com/2011/01/is-lock-free-worth-it.html
Thoughts?
See ya!
? ? -Sam Lantinga, Founder and President, Galaxy Gameworks LLC
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
±----------------------------------------------------------