]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8772 Remove cthread support
authorOndřej Kuzník <ondra@openldap.org>
Fri, 22 Jun 2018 12:10:13 +0000 (13:10 +0100)
committerOndřej Kuzník <ondra@openldap.org>
Fri, 19 Oct 2018 12:08:10 +0000 (13:08 +0100)
configure.in
doc/guide/admin/appendix-recommended-versions.sdf
doc/guide/admin/aspell.en.pws
doc/guide/admin/install.sdf
include/ldap_int_thread.h
include/portable.hin
libraries/libldap_r/Makefile.in
libraries/libldap_r/thr_cthreads.c [deleted file]

index 60c446096383f3cc7459a1e861ae9397a2d3fecf..d8719c6137ad82c9a86d6b175a3ff34781f8b086 100644 (file)
@@ -1648,71 +1648,6 @@ int main(argc, argv)
        ;;
 esac
 
-case $ol_with_threads in auto | yes | mach)
-
-       dnl check for Mach CThreads
-       AC_CHECK_HEADERS(mach/cthreads.h cthreads.h)
-       if test $ac_cv_header_mach_cthreads_h = yes ; then
-               ol_with_threads=found
-
-               dnl check for cthreads support in current $LIBS
-               AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
-
-               if test $ol_link_threads = no ; then
-                       dnl try -all_load
-                       dnl this test needs work
-                       AC_CACHE_CHECK([for cthread_fork with -all_load],
-                               [ol_cv_cthread_all_load], [
-                               dnl save the flags
-                               save_LIBS="$LIBS"
-                               LIBS="-all_load $LIBS"
-                               AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mach/cthreads.h>]], [[
-                                       cthread_fork((void *)0, (void *)0);
-                                       ]])],[ol_cv_cthread_all_load=yes],[ol_cv_cthread_all_load=no])
-                               dnl restore the LIBS
-                               LIBS="$save_LIBS"
-                       ])
-
-                       if test $ol_cv_cthread_all_load = yes ; then
-                               LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
-                               ol_link_threads=mach
-                               ol_with_threads=found
-                       fi
-               fi
-
-       elif test $ac_cv_header_cthreads_h = yes ; then
-               dnl Hurd variant of Mach Cthreads
-               dnl uses <cthreads.h> and -lthreads
-
-               ol_with_threads=found
-               dnl save the flags
-               save_LIBS="$LIBS"
-               LIBS="$LIBS -lthreads"
-               AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
-               LIBS="$save_LIBS"
-
-               if test $ol_link_threads = yes ; then
-                       LTHREAD_LIBS="-lthreads"
-                       ol_link_threads=mach
-                       ol_with_threads=found
-               else
-                       AC_MSG_ERROR([could not link with Mach CThreads])
-               fi
-
-       elif test $ol_with_threads = mach ; then
-               AC_MSG_ERROR([could not locate Mach CThreads])
-       fi
-
-       if test $ol_link_threads = mach ; then
-               AC_DEFINE(HAVE_MACH_CTHREADS,1,
-                       [define if you have Mach Cthreads])
-       elif test $ol_with_threads = found ; then
-               AC_MSG_ERROR([could not link with Mach CThreads])
-       fi
-       ;;
-esac
-
 case $ol_with_threads in auto | yes | pth)
 
        AC_CHECK_HEADERS(pth.h)
@@ -1777,7 +1712,6 @@ if test $ol_with_threads = manual ; then
        AC_CHECK_FUNCS(sched_yield pthread_yield)
        OL_HEADER_LINUX_THREADS
 
-       AC_CHECK_HEADERS(mach/cthreads.h)
        AC_CHECK_HEADERS(thread.h synch.h)
 fi
 
index 52d9bdbf4a92f75c537f8f96ec077a725b859444..ac47b56a814ad970e9e3e64d52c3caf9036a5011 100644 (file)
@@ -24,7 +24,6 @@ Feature|Software|Version
 |{{PRD:MIT Kerberos}}|Version
 Threads:
 |POSIX {{pthreads}}|Version
-|Mach {{CThreads}}|Version
 TCP Wrappers|Name|Version
 !endblock
 
index f486703761fec73ea373d5f822b8fdc1b2888d4d..33934ff5d438dae8a8276b4789a60bcdc329a7fd 100644 (file)
@@ -858,7 +858,6 @@ datadir
 slapadd
 reqFilter
 matcheddomain
-CThreads
 slapacl
 requestName
 randkey
index fa3847824d2e758d3695fa941433474309fc92b2..35f9785223844f4b8862e8dcaffd3e9889db536f 100644 (file)
@@ -140,7 +140,7 @@ more information.
 H3: Threads
 
 OpenLDAP is designed to take advantage of threads.  OpenLDAP
-supports POSIX {{pthreads}}, Mach {{CThreads}}, and a number of
+supports POSIX {{pthreads}}, NT threads and a number of
 other varieties.  {{EX:configure}} will complain if it cannot
 find a suitable thread subsystem.   If this occurs, please
 consult the {{F:Software|Installation|Platform Hints}} section
index 33c09f22005a7ea963f50658e0718dc6bbf695f4..f3fb39fb16eac9ace4364b6a475fc407b7c615ed 100644 (file)
@@ -81,34 +81,6 @@ typedef pthread_rwlock_t ldap_int_thread_rdwr_t;
 
 LDAP_END_DECL
 
-#elif defined ( HAVE_MACH_CTHREADS )
-/**********************************
- *                                *
- * definitions for Mach CThreads  *
- *                                *
- **********************************/
-
-#if defined( HAVE_MACH_CTHREADS_H )
-#      include <mach/cthreads.h>
-#elif defined( HAVE_CTHREADS_H )
-#      include <cthreads.h>
-#endif
-
-LDAP_BEGIN_DECL
-
-typedef cthread_t              ldap_int_thread_t;
-typedef ldap_int_thread_rmutex_t               ldap_int_thread_mutex_recursive_t;
-typedef struct mutex           ldap_int_thread_mutex_t;
-typedef struct condition       ldap_int_thread_cond_t;
-typedef cthread_key_t          ldap_int_thread_key_t;
-
-#ifndef LDAP_INT_MUTEX_NULL
-#define LDAP_INT_MUTEX_NULL    MUTEX_INITIALIZER
-#define LDAP_INT_MUTEX_FIRSTCREATE(m)  ((void) 0)
-#endif
-
-LDAP_END_DECL
-
 #elif defined( HAVE_GNU_PTH )
 /***********************************
  *                                 *
index ca773653c725de09553a8ddfebd47285695fcec0..ccbf9ad0577637154aef9235a7d0a87cbca15e70 100644 (file)
 /* Define to 1 if you have the <crypt.h> header file. */
 #undef HAVE_CRYPT_H
 
-/* Define to 1 if you have the <cthreads.h> header file. */
-#undef HAVE_CTHREADS_H
-
 /* Define to 1 if you have the `ctime_r' function. */
 #undef HAVE_CTIME_R
 
 /* Define to 1 if you have the <ltdl.h> header file. */
 #undef HAVE_LTDL_H
 
-/* define if you have Mach Cthreads */
-#undef HAVE_MACH_CTHREADS
-
-/* Define to 1 if you have the <mach/cthreads.h> header file. */
-#undef HAVE_MACH_CTHREADS_H
-
 /* Define to 1 if you have the <malloc.h> header file. */
 #undef HAVE_MALLOC_H
 
index 589cf4f60d40e4ea3d203a3efd6c4ab56d55f550..824bc0c69c059734485251f13609881c80a30aaf 100644 (file)
@@ -32,10 +32,10 @@ XXSRCS    = apitest.c test.c \
        turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
        assertion.c deref.c ldifutil.c ldif.c fetch.c lbase64.c
 SRCS   = threads.c rdwr.c rmutex.c tpool.c rq.c \
-       thr_posix.c thr_cthreads.c thr_thr.c thr_nt.c \
+       thr_posix.c thr_thr.c thr_nt.c \
        thr_pth.c thr_stub.c thr_debug.c
 OBJS   = threads.lo rdwr.lo rmutex.lo tpool.lo  rq.lo \
-       thr_posix.lo thr_cthreads.lo thr_thr.lo thr_nt.lo \
+       thr_posix.lo thr_thr.lo thr_nt.lo \
        thr_pth.lo thr_stub.lo thr_debug.lo \
        bind.lo open.lo result.lo error.lo compare.lo search.lo \
        controls.lo messages.lo references.lo extended.lo cyrus.lo \
diff --git a/libraries/libldap_r/thr_cthreads.c b/libraries/libldap_r/thr_cthreads.c
deleted file mode 100644 (file)
index 8dd8ce9..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-/* thr_cthreads.c - wrapper for mach cthreads */
-/* $OpenLDAP$ */
-/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
- *
- * Copyright 1998-2018 The OpenLDAP Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted only as authorized by the OpenLDAP
- * Public License.
- *
- * A copy of this license is available in file LICENSE in the
- * top-level directory of the distribution or, alternatively, at
- * <http://www.OpenLDAP.org/license.html>.
- */
-/* This work was initially developed by Luke Howard for inclusion
- * in U-MICH LDAP 3.3.
- */
-
-#include "portable.h"
-
-#if defined( HAVE_MACH_CTHREADS )
-#include "ldap_pvt_thread.h" /* Get the thread interface */
-#define LDAP_THREAD_IMPLEMENTATION
-#include "ldap_thr_debug.h"  /* May rename the symbols defined below */
-
-int
-ldap_int_thread_initialize( void )
-{
-       return 0;
-}
-
-int
-ldap_int_thread_destroy( void )
-{
-       return 0;
-}
-
-int 
-ldap_pvt_thread_create( ldap_pvt_thread_t * thread, 
-       int detach,
-       void *(*start_routine)( void *), void *arg)
-{
-       *thread = cthread_fork( (cthread_fn_t) start_routine, arg);
-       return ( *thread == NULL ? -1 : 0 );    
-}
-
-void 
-ldap_pvt_thread_exit( void *retval )
-{
-       cthread_exit( (any_t) retval );
-}
-
-int 
-ldap_pvt_thread_join( ldap_pvt_thread_t thread, void **thread_return )
-{
-       void *status;
-       status = (void *) cthread_join ( thread );
-       if (thread_return != NULL)
-               {
-               *thread_return = status;
-               }
-       return 0;
-}
-
-int 
-ldap_pvt_thread_kill( ldap_pvt_thread_t thread, int signo )
-{
-       return 0;
-}
-
-int 
-ldap_pvt_thread_yield( void )
-{
-       cthread_yield();
-       return 0;
-}
-
-int 
-ldap_pvt_thread_cond_init( ldap_pvt_thread_cond_t *cond )
-{
-       condition_init( cond );
-       return( 0 );
-}
-
-int 
-ldap_pvt_thread_cond_destroy( ldap_pvt_thread_cond_t *cond )
-{
-       condition_clear( cond );
-       return( 0 );
-}
-
-int 
-ldap_pvt_thread_cond_signal( ldap_pvt_thread_cond_t *cond )
-{
-       condition_signal( cond );
-       return( 0 );
-}
-
-int
-ldap_pvt_thread_cond_broadcast( ldap_pvt_thread_cond_t *cond )
-{
-       condition_broadcast( cond );
-       return( 0 );
-}
-
-int 
-ldap_pvt_thread_cond_wait( ldap_pvt_thread_cond_t *cond, 
-                         ldap_pvt_thread_mutex_t *mutex )
-{
-       condition_wait( cond, mutex );
-       return( 0 );    
-}
-
-int 
-ldap_pvt_thread_mutex_init( ldap_pvt_thread_mutex_t *mutex )
-{
-       mutex_init( mutex );
-       mutex->name = NULL;
-       return ( 0 );
-}
-
-int 
-ldap_pvt_thread_mutex_destroy( ldap_pvt_thread_mutex_t *mutex )
-{
-       mutex_clear( mutex );
-       return ( 0 );   
-}
-       
-int 
-ldap_pvt_thread_mutex_lock( ldap_pvt_thread_mutex_t *mutex )
-{
-       mutex_lock( mutex );
-       return ( 0 );
-}
-
-int 
-ldap_pvt_thread_mutex_unlock( ldap_pvt_thread_mutex_t *mutex )
-{
-       mutex_unlock( mutex );
-       return ( 0 );
-}
-
-int
-ldap_pvt_thread_mutex_trylock( ldap_pvt_thread_mutex_t *mutex )
-{
-       return mutex_try_lock( mutex );
-}
-
-int ldap_pvt_thread_mutex_recursive_init( ldap_pvt_thread_mutex_recursive_t *mutex )
-{
-       return ldap_pvt_thread_rmutex_init( mutex );
-}
-
-int ldap_pvt_thread_mutex_recursive_destroy( ldap_pvt_thread_mutex_recursive_t *mutex )
-{
-       return ldap_pvt_thread_rmutex_destroy( mutex );
-}
-
-int
-ldap_pvt_thread_mutex_recursive_lock( ldap_pvt_thread_mutex_recursive_t *mutex )
-{
-       return ldap_pvt_thread_rmutex_lock( mutex, ldap_pvt_thread_self() );
-}
-
-int
-ldap_pvt_thread_mutex_recursive_unlock( ldap_pvt_thread_mutex_recursive_t *mutex )
-{
-       return ldap_pvt_thread_rmutex_unlock( mutex, ldap_pvt_thread_self() );
-}
-
-int
-ldap_pvt_thread_mutex_recursive_trylock( ldap_pvt_thread_mutex_recursive_t *mp )
-{
-       return ldap_pvt_thread_rmutex_trylock( mp, ldap_pvt_thread_self() );
-}
-
-ldap_pvt_thread_t
-ldap_pvt_thread_self( void )
-{
-       return cthread_self();
-}
-
-int
-ldap_pvt_thread_key_create( ldap_pvt_thread_key_t *key )
-{
-       return cthread_keycreate( key );
-}
-
-int
-ldap_pvt_thread_key_destroy( ldap_pvt_thread_key_t key )
-{
-       return( 0 );
-}
-
-int
-ldap_pvt_thread_key_setdata( ldap_pvt_thread_key_t key, void *data )
-{
-       return cthread_setspecific( key, data );
-}
-
-int
-ldap_pvt_thread_key_getdata( ldap_pvt_thread_key_t key, void **data )
-{
-       return cthread_getspecific( key, data );
-}
-
-#endif /* HAVE_MACH_CTHREADS */