Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13417
Modified Files: Tag: devel_0_37 d_soundfile.c Log Message: fixed bug with realtime scheduling
Index: d_soundfile.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v retrieving revision 1.1.1.2.2.27 retrieving revision 1.1.1.2.2.28 diff -C2 -d -r1.1.1.2.2.27 -r1.1.1.2.2.28 *** d_soundfile.c 22 Oct 2004 20:40:04 -0000 1.1.1.2.2.27 --- d_soundfile.c 23 Oct 2004 10:14:04 -0000 1.1.1.2.2.28 *************** *** 1078,1086 **** pthread_attr_setinheritsched(&sf_attr,PTHREAD_EXPLICIT_SCHED);
! #ifdef UNIX /* use realtime scheduling */ ! if (pthread_attr_setschedpolicy(&sf_attr,SCHED_RR) != ENOTSUP) ! sf_param.sched_priority=sched_get_priority_min(SCHED_RR); ! else ! sf_param.sched_priority=sched_get_priority_min(SCHED_OTHER); #endif /* UNIX */
--- 1078,1096 ---- pthread_attr_setinheritsched(&sf_attr,PTHREAD_EXPLICIT_SCHED);
! #ifdef UNIX ! if (getuid() == 0) ! { ! sf_param.sched_priority=sched_get_priority_min(SCHED_RR); ! pthread_attr_setschedpolicy(&sf_attr,SCHED_RR); ! } ! ! /* we should be able use realtime scheduling if we're not root */ ! /* if (pthread_attr_setschedpolicy(&sf_attr,SCHED_RR) != ENOTSUP) */ ! /* sf_param.sched_priority=sched_get_priority_min(SCHED_RR); */ ! /* else */ ! /* { */ ! /* pthread_attr_setschedpolicy(&sf_attr,SCHED_OTHER); */ ! /* sf_param.sched_priority=sched_get_priority_min(SCHED_OTHER); */ ! /* } */ #endif /* UNIX */