[PD-cvs] pd/src g_array.c,1.1.1.3.2.7,1.1.1.3.2.8

Tim Blechmann timblech at users.sourceforge.net
Tue Jun 1 12:48:25 CEST 2004


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

Modified Files:
      Tag: devel_0_37
	g_array.c 
Log Message:
removed some array locks and minor cleanups

Index: g_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_array.c,v
retrieving revision 1.1.1.3.2.7
retrieving revision 1.1.1.3.2.8
diff -C2 -d -r1.1.1.3.2.7 -r1.1.1.3.2.8
*** g_array.c	27 May 2004 20:40:55 -0000	1.1.1.3.2.7
--- g_array.c	1 Jun 2004 10:48:22 -0000	1.1.1.3.2.8
***************
*** 11,15 ****
  
  /* Tim Blechmann: garray thread locks: */
- //#define GARRAY_THREAD_LOCK
  #ifdef GARRAY_THREAD_LOCK
  #include <pthread.h>
--- 11,14 ----
***************
*** 827,832 ****
      garray_lock(x); 
  #endif
-     
-     //sys_lock();
  
      if (glist_isvisible(x->x_glist))
--- 826,829 ----
***************
*** 839,844 ****
      garray_update(x);
  
-     //sys_unlock();
- 
  #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
      garray_unlock(x); 
--- 836,839 ----
***************
*** 849,862 ****
  double garray_updatetime(t_garray *x)
  {
- #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
-     garray_lock(x); 
- #endif
      return x->x_lastupdate;
- #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
-     garray_unlock(x); 
- #endif
  }
  
- 
     /* This functiopn gets the template of an array; if we can't figure
     out what template an array's elements belong to we're in grave trouble
--- 844,850 ----
***************
*** 878,888 ****
  int garray_npoints(t_garray *x)	/* get the length */
  {
- #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
-     garray_lock(x); 
- #endif
      int ret = (x->x_n);
- #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
-     garray_unlock(x); 
- #endif
      return ret;
  }
--- 866,870 ----
***************
*** 890,900 ****
  char *garray_vec(t_garray *x) /* get the contents */
  {
- #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
-     garray_lock(x); 
- #endif
      char * ret =((char *)(x->x_vec));
- #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
-     garray_unlock(x); 
- #endif
      return ret;
  }
--- 872,876 ----
***************
*** 951,955 ****
      else if (indx >= x->x_n) indx = x->x_n - 1;
      float ret = (*(float *)((x->x_vec + sizeof(t_word) * indx) + yonset));
- 
  #ifdef GARRAY_THREAD_LOCK /* TB: array lock */
      garray_unlock(x); 
--- 927,930 ----





More information about the Pd-cvs mailing list