[PD-cvs] pd/src g_array.c,1.1.1.3.2.5,1.1.1.3.2.6

Tim Blechmann timblech at users.sourceforge.net
Thu May 27 18:49:03 CEST 2004


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

Modified Files:
      Tag: devel_0_37
	g_array.c 
Log Message:
cleanup

Index: g_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_array.c,v
retrieving revision 1.1.1.3.2.5
retrieving revision 1.1.1.3.2.6
diff -C2 -d -r1.1.1.3.2.5 -r1.1.1.3.2.6
*** g_array.c	23 May 2004 19:15:53 -0000	1.1.1.3.2.5
--- g_array.c	27 May 2004 16:49:00 -0000	1.1.1.3.2.6
***************
*** 171,175 ****
--- 171,181 ----
  static void garray_update(t_garray *x)
  {
+ #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
+     garray_lock(x); 
+ #endif
      x->x_lastupdate = clock_getlogicaltime();
+ #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
+     garray_unlock(x); 
+ #endif
  }
  
***************
*** 234,245 ****
  #ifdef GARRAY_THREAD_LOCK    /* TB: array lock */
      x->x_mutex=getbytes(sizeof(pthread_mutex_t));
- #ifdef __linux__
-     *(x->x_mutex)=(pthread_mutex_t) PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
- #else
      pthread_mutexattr_t mutex_attr; 
      pthread_mutexattr_init (&mutex_attr);
      pthread_mutexattr_settype(&mutex_attr,PTHREAD_MUTEX_RECURSIVE); 
      pthread_mutex_init(x->x_mutex, &mutex_attr); 
- #endif
  #endif /* GARRAY_THREAD_LOCK */
  
--- 240,247 ----
***************
*** 699,702 ****
--- 701,707 ----
  {
      t_garray *x = (t_garray *)z;
+ #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
+     garray_lock(x); 
+ #endif
      if (vis)
      {
***************
*** 763,766 ****
--- 768,775 ----
      	    glist_getcanvas(glist), glist_getcanvas(glist), x);
      }
+ 
+ #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
+     garray_unlock(x); 
+ #endif
  }
  
***************
*** 833,836 ****
--- 842,847 ----
      garray_lock(x); 
  #endif
+     
+     //sys_lock();
  
      if (glist_isvisible(x->x_glist))
***************
*** 843,846 ****
--- 854,859 ----
      garray_update(x);
  
+     //sys_unlock();
+ 
  #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
      garray_unlock(x); 





More information about the Pd-cvs mailing list