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

thread fixes #8

Closed
wants to merge 2 commits into from
Closed

thread fixes #8

wants to merge 2 commits into from

Conversation

kazzmir
Copy link

@kazzmir kazzmir commented Jul 2, 2011

this merge has two fixes

  1. fix for issue 46 in PSL1GHT: semaphore max value ps3dev/PSL1GHT#46
    by setting the maximum semaphore value to 1000
  2. set the stack size for new threads to 64k from 16k.

@zeldin
Copy link
Owner

zeldin commented Jul 2, 2011

Hi. Thank you for your contribution.

The semaphore issue has already been fixed by pull request #7.

Regarding the stack size, it is of course the case that 16K will not be enough for every possible thread function. But the same can be said about 64K. Is there some particularly important function with a stack requirement between 16K and 64K which this change aims to support?

@kazzmir
Copy link
Author

kazzmir commented Jul 4, 2011

I used email to respond but maybe it didn't work. Anyway the 64k limit is arbitrary but since 16k is as well then it seems to me whoever requests a higher limit should be accomodated until the limit is arguably unreasonable.

Would a compromise be to add a secret global variable that I can adjust in my application?

int SDL_ps3_stack_size_hack;

@zeldin
Copy link
Owner

zeldin commented Jul 4, 2011

Hm... A secret variable feels a little kludgey, but I would accept using something like SDL_getenv("SDL_THREAD_STACK_SIZE") to allow the default size to be overridden. That would make the code portable to other SDL ports (with dynamic stack size) as well.

@kazzmir
Copy link
Author

kazzmir commented Jul 4, 2011

Ok sounds good to me. I'll send a pull request if you don't get to it first.

@bgK
Copy link

bgK commented Jul 4, 2011

SDL 1.3 introduced the "hints" mecanism to replace environment variables, see SDL_hints.h.

@kazzmir
Copy link
Author

kazzmir commented Jul 5, 2011

SDL_PSL1GHT does not contain SDL_hints.h, yet. Is the plan to add it in? If not should the environment variable be used?

@bgK
Copy link

bgK commented Jul 5, 2011

@kazzmir kazzmir closed this Apr 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants