[PD-cvs] pd/src m_sched.c,1.5.4.21,1.5.4.22

Tim Blechmann timblech at users.sourceforge.net
Sat Apr 9 08:51:15 CEST 2005


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

Modified Files:
      Tag: devel_0_38
	m_sched.c 
Log Message:
sys_timedlock()

Index: m_sched.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_sched.c,v
retrieving revision 1.5.4.21
retrieving revision 1.5.4.22
diff -C2 -d -r1.5.4.21 -r1.5.4.22
*** m_sched.c	7 Apr 2005 21:15:22 -0000	1.5.4.21
--- m_sched.c	9 Apr 2005 06:51:13 -0000	1.5.4.22
***************
*** 17,21 ****
  #define THREAD_LOCKING  
  #include "pthread.h"
! 
  
  static int sys_quit;
--- 17,21 ----
  #define THREAD_LOCKING  
  #include "pthread.h"
! #include "time.h"
  
  static int sys_quit;
***************
*** 580,583 ****
--- 580,594 ----
  }
  
+ /* tb { */
+ int sys_timedlock(int microsec)
+ {
+ 	struct timespec timeout;
+ 	timeout.tv_sec = 0;
+ 	timeout.tv_nsec = 1000 * microsec;
+ 
+     return pthread_mutex_timedlock(&sys_mutex, &timeout);
+ }
+ /* tb } */
+ 
  #else
  
***************
*** 585,588 ****
--- 596,600 ----
  void sys_unlock(void) {}
  int sys_trylock(void) {}
+ int sys_timedlock(int microsec) {}
  
  #endif





More information about the Pd-cvs mailing list