diff options
author | Juergen Keil <jkeil@users.sourceforge.net> | 2001-09-09 15:39:47 +0000 |
---|---|---|
committer | Juergen Keil <jkeil@users.sourceforge.net> | 2001-09-09 15:39:47 +0000 |
commit | 3987af82e5e4724c87f049f114779797191de6e2 (patch) | |
tree | 872b58e22bc29309742f2b142618249c16d28cc8 | |
parent | 64b19be1dbb17e79282f62ba7f1f458639b0e5d7 (diff) | |
download | xine-lib-3987af82e5e4724c87f049f114779797191de6e2.tar.gz xine-lib-3987af82e5e4724c87f049f114779797191de6e2.tar.bz2 |
Enable PTHREAD_SCOPE_SYSTEM, to work around xine hanging on solaris.
CVS patchset: 591
CVS date: 2001/09/09 15:39:47
-rw-r--r-- | src/xine-engine/audio_decoder.c | 3 | ||||
-rw-r--r-- | src/xine-engine/video_decoder.c | 3 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 9 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 7961b06f8..d1cc90071 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.33 2001/09/06 13:37:46 jkeil Exp $ + * $Id: audio_decoder.c,v 1.34 2001/09/09 15:39:47 jkeil Exp $ * * * functions that implement audio decoding @@ -221,6 +221,7 @@ void audio_decoder_init (xine_t *this) { pthread_attr_getschedparam(&pth_attrs, &pth_params); pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER); pthread_attr_setschedparam(&pth_attrs, &pth_params); + pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM); pthread_create (&this->audio_thread, &pth_attrs, audio_decoder_loop, this) ; } diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index f3bc6d1c5..3b4dd558f 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.46 2001/09/06 14:09:37 jkeil Exp $ + * $Id: video_decoder.c,v 1.47 2001/09/09 15:39:47 jkeil Exp $ * */ @@ -245,6 +245,7 @@ void video_decoder_init (xine_t *this) { pthread_attr_getschedparam(&pth_attrs, &pth_params); pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER); pthread_attr_setschedparam(&pth_attrs, &pth_params); + pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM); pthread_create (&this->video_thread, &pth_attrs, video_decoder_loop, this) ; } diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 7e4ac0038..a32bc8543 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.41 2001/09/06 14:09:37 jkeil Exp $ + * $Id: video_out.c,v 1.42 2001/09/09 15:39:47 jkeil Exp $ * */ @@ -327,10 +327,15 @@ static uint32_t vo_get_capabilities (vo_instance_t *this) { static void vo_open (vo_instance_t *this) { + pthread_attr_t pth_attrs; + if (!this->video_loop_running) { this->video_loop_running = 1; - pthread_create (&this->video_thread, NULL, video_out_loop, this) ; + pthread_attr_init(&pth_attrs); + pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM); + + pthread_create (&this->video_thread, &pth_attrs, video_out_loop, this) ; printf ("video_out: thread created\n"); } else printf ("video_out: vo_open : warning! video thread already running\n"); |