[Date Prev][Date Next] [Chronological] [Thread] [Top]

threading troubles on OSF Alpha v3.2 (ITS#89)



I reported this before, but I don't remember what happened:

The 2nd argument to

   pthread_create, pthread_cond_init, and pthread_mutex_init

is a struct, not a pointer to a struct, on DEC OSF Alpha v3.2, and I
think some HP versons.  So they can't be given a NULL argument to get
the default attributes, instead they should use

  pthread_attr_default, pthread_condattr_default, and
  pthread_mutexattr_default

respectively.  It worked in OPENLDAP_REL_ENG_1_0; lthread.h #defined the
symbols above as NULL if necessary.  Can we put it back, this time in
libldap_r/thr_posix.c?  If the reason it was remove was that #defining
them caused trouble, we can put something like this in thr_posix.c
instead:

  #if PTHREAD_STRUCT_ARGUMENTS /* detected by configure */
  #  define LDAP_PVT_THREAD_ATTR_DEFAULT	pthread_attr_default
  #  define LDAP_PVT_THREAD_CONDATTR_DEFAULT	pthread_condattr_default
  #  define LDAP_PVT_THREAD_MUTEXATTR_DEFAULT	pthread_condattr_default
  #else
  #  define LDAP_PVT_THREAD_ATTR_DEFAULT	NULL
  #  define LDAP_PVT_THREAD_CONDATTR_DEFAULT	NULL
  #  define LDAP_PVT_THREAD_MUTEXATTR_DEFAULT	NULL
  #endif

-- 
Hallvard