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

Tim Blechmann timblech at users.sourceforge.net
Fri Jun 25 15:48:11 CEST 2004


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

Modified Files:
      Tag: devel_0_37
	d_soundfile.c 
Log Message:
changed soundfiler initialization

Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.1.1.2.2.12
retrieving revision 1.1.1.2.2.13
diff -C2 -d -r1.1.1.2.2.12 -r1.1.1.2.2.13
*** d_soundfile.c	17 Jun 2004 21:24:04 -0000	1.1.1.2.2.12
--- d_soundfile.c	25 Jun 2004 13:48:08 -0000	1.1.1.2.2.13
***************
*** 1158,1161 ****
--- 1158,1162 ----
  void sys_start_sfthread(void)
  {
+     //initialize queue
      soundfiler_queue = getbytes (sizeof(t_sfqueue));
  
***************
*** 1167,1170 ****
--- 1168,1172 ----
      pthread_mutex_unlock(&(soundfiler_queue->mutex)); 
      
+     // initialize thread
      pthread_attr_t sf_attr;
      pthread_attr_init(&sf_attr);
***************
*** 1172,1186 ****
      
  #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);
--- 1174,1192 ----
      
  #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
!     sf_param.sched_priority=sched_get_priority_min(SCHED_OTHER);
      pthread_attr_setschedparam(&sf_attr,&sf_param);
      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);
!     }
  #endif /* UNIX */
  
  #endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
  
+     //start thread
      int status = pthread_create(&sf_thread_id, &sf_attr, 
  				(void *) soundfiler_thread,NULL);





More information about the Pd-cvs mailing list