Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new SDL_MutexTryLock API #684

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

new SDL_MutexTryLock API #684

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: All, All

Comments on the original bug report:

On 2012-10-17 12:32:37 +0000, Edward Rudd wrote:

Created attachment 972
Implementation of MutexTryLock for all supported platforms.

This new API method allows a TryLock concept to be applied to a Mutex.. This will attempt to lock the mutex, and if someone else has it locked will return SDL_MUTEX_TIMEDOUT to let the caller know that it's locked elsewhere.

I have included implementations for generic, nds, windows, and pthread. (seems to be all of the implementations I needed to implement)

On 2012-10-17 13:54:14 +0000, Edward Rudd wrote:

Created attachment 975
quick fix for pthread TryLock implementation

Ok I forgot to add a #include <errno.h>.. So it's added and this now works on OSX/Linux

On 2013-01-01 12:57:40 +0000, Edward Rudd wrote:

Created attachment 1007
Reworked patch with different naming.

This patch renamed the method to SDL_TryLockMutex to be consistent with the current mutex method names. and combines the two patches into one.

On 2013-01-02 08:39:52 +0000, Ryan C. Gordon wrote:

Sam, any objections to this patch? I think it's worth including.

--ryan.

@SDLBugzilla SDLBugzilla added the enhancement New feature or request label Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant