Skip to content

Commit

Permalink
[ios] diddle thread priority using NSThread routines instead of pthre…
Browse files Browse the repository at this point in the history
…ad. ty this for a bit and see if we have regressions
  • Loading branch information
davilla committed Jun 23, 2011
1 parent 64fa139 commit fd4fb79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions xbmc/osx/atv2/XBMCEAGLView.mm
Expand Up @@ -240,8 +240,8 @@ - (void) stopAnimation
- (void) runAnimation:(id) arg
{
CCocoaAutoPool outerpool;

//[NSThread setThreadPriority:1]
[NSThread setThreadPriority:1.0];
/*
// Changing to SCHED_RR is safe under OSX, you don't need elevated privileges and the
// OSX scheduler will monitor SCHED_RR threads and drop to SCHED_OTHER if it detects
// the thread running away. OSX automatically does this with the CoreAudio audio
Expand All @@ -261,7 +261,7 @@ - (void) runAnimation:(id) arg
// change from default SCHED_OTHER to SCHED_RR
policy = SCHED_RR;
result = pthread_setschedparam(pthread_self(), policy, &param );

*/
// signal we are alive
NSConditionLock* myLock = arg;
[myLock lock];
Expand Down
5 changes: 3 additions & 2 deletions xbmc/osx/ios/XBMCEAGLView.mm
Expand Up @@ -263,7 +263,8 @@ - (void) runAnimation:(id) arg
{
CCocoaAutoPool outerpool;

//[NSThread setThreadPriority:1]
[NSThread setThreadPriority:1.0];
/*
// Changing to SCHED_RR is safe under OSX, you don't need elevated privileges and the
// OSX scheduler will monitor SCHED_RR threads and drop to SCHED_OTHER if it detects
// the thread running away. OSX automatically does this with the CoreAudio audio
Expand All @@ -282,7 +283,7 @@ - (void) runAnimation:(id) arg
// change from default SCHED_OTHER to SCHED_RR
policy = SCHED_RR;
result = pthread_setschedparam(pthread_self(), policy, &param );

*/
// signal we are alive
NSConditionLock* myLock = arg;
[myLock lock];
Expand Down

0 comments on commit fd4fb79

Please sign in to comment.