cvsuser     03/07/13 12:46:46

  Modified:    config/gen/platform generic.c generic.h
  Log:
  move pthread macros to header file
  
  Revision  Changes    Path
  1.15      +0 -19     parrot/config/gen/platform/generic.c
  
  Index: generic.c
  ===================================================================
  RCS file: /cvs/public/parrot/config/gen/platform/generic.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -w -r1.14 -r1.15
  --- generic.c 13 Jul 2003 18:52:41 -0000      1.14
  +++ generic.c 13 Jul 2003 19:46:46 -0000      1.15
  @@ -13,25 +13,6 @@
   
   #define PARROT_DLOPEN_FLAGS RTLD_LAZY
   
  -#ifdef HAS_HEADER_PTHREAD
  -#  include <pthread.h>
  -#  define PARROT_SYNC_PRIMITIVES_DEFINED
  -#  undef LOCK
  -#  define LOCK(x) pthread_mutex_lock(x)
  -#  undef UNLOCK
  -#  define UNLOCK(x) pthread_mutex_unlock(x)
  -#  undef COND_WAIT
  -#  define COND_WAIT(x,y) pthread_cond_wait(x, y)
  -#  undef COND_SIGNAL
  -#  define COND_SIGNAL(x,y) pthread_cond_signal(x, y)
  -#  undef COND_BROADCAST
  -#  define COND_BROADCAST(x,y) pthread_cond_broadcast(x, y)
  -#  undef Parrot_mutex
  -   typedef pthread_mutex_t Parrot_mutex;
  -#  undef Parrot_cond
  -   typedef pthread_cond_t Parrot_cond;
  -#endif
  -
   /*
   ** Parrot_intval_time()
   */
  
  
  
  1.8       +18 -0     parrot/config/gen/platform/generic.h
  
  Index: generic.h
  ===================================================================
  RCS file: /cvs/public/parrot/config/gen/platform/generic.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -r1.7 -r1.8
  --- generic.h 13 Jul 2003 18:52:41 -0000      1.7
  +++ generic.h 13 Jul 2003 19:46:46 -0000      1.8
  @@ -1,3 +1,6 @@
  +#if !defined(PARROT_PLATFORM_H_GUARD)
  +#define PARROT_PLATFORM_H_GUARD
  +
   /*
   ** platform.h [generic version]
   */
  @@ -43,6 +46,21 @@
   
       Parrot_sighandler_t Parrot_set_sighandler(int s, Parrot_sighandler_t f);
   #endif
  +
  +#ifdef HAS_HEADER_PTHREAD
  +#  include <pthread.h>
  +#  define PARROT_SYNC_PRIMITIVES_DEFINED
  +#  define LOCK(x) pthread_mutex_lock(&x)
  +#  define UNLOCK(x) pthread_mutex_unlock(&x)
  +#  define COND_WAIT(x,y) pthread_cond_wait(&x, &y)
  +#  define COND_SIGNAL(x,y) pthread_cond_signal(&x, &y)
  +#  define COND_BROADCAST(x,y) pthread_cond_broadcast(&x)
  +   typedef pthread_mutex_t Parrot_mutex;
  +   typedef pthread_cond_t Parrot_cond;
  +#endif
  +
  +#endif
  +
   /*
    * Local variables:
    * c-indentation-style: bsd
  
  
  

Reply via email to