[PD-cvs] pd/src d_soundfile.c,1.1.1.2.2.11,1.1.1.2.2.12

Tim Blechmann timblech at users.sourceforge.net
Thu Jun 17 23:24:07 CEST 2004


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16924

Modified Files:
      Tag: devel_0_37
	d_soundfile.c 
Log Message:
modified helper thread initialisation

Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.1.1.2.2.11
retrieving revision 1.1.1.2.2.12
diff -C2 -d -r1.1.1.2.2.11 -r1.1.1.2.2.12
*** d_soundfile.c	17 Jun 2004 16:42:33 -0000	1.1.1.2.2.11
--- d_soundfile.c	17 Jun 2004 21:24:04 -0000	1.1.1.2.2.12
***************
*** 1170,1181 ****
      pthread_attr_init(&sf_attr);
      struct sched_param sf_param;
! 
!     sf_param.sched_priority=sched_get_priority_min(SCHED_FIFO);
! 
!     pthread_attr_setdetachstate(&sf_attr,PTHREAD_CREATE_DETACHED);
      pthread_attr_setschedparam(&sf_attr,&sf_param);
-     //pthread_attr_setschedpolicy(&sf_attr,SCHED_RR);
      pthread_attr_setinheritsched(&sf_attr,PTHREAD_EXPLICIT_SCHED);
  
      int status = pthread_create(&sf_thread_id, &sf_attr, 
  				(void *) soundfiler_thread,NULL);
--- 1170,1186 ----
      pthread_attr_init(&sf_attr);
      struct sched_param sf_param;
!     
! #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
!     sf_param.sched_priority=sched_get_priority_min(SCHED_RR);
      pthread_attr_setschedparam(&sf_attr,&sf_param);
      pthread_attr_setinheritsched(&sf_attr,PTHREAD_EXPLICIT_SCHED);
  
+ #ifdef UNIX
+      if (getuid() == 0)
+ 	 pthread_attr_setschedpolicy(&sf_attr,SCHED_RR);
+ #endif /* UNIX */
+ 
+ #endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+ 
      int status = pthread_create(&sf_thread_id, &sf_attr, 
  				(void *) soundfiler_thread,NULL);





More information about the Pd-cvs mailing list