From: Kurt Zeilenga Date: Sun, 15 Nov 1998 22:05:28 +0000 (+0000) Subject: Remove #ifdef sunos in lthread HAVE_LWP code. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~1115 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1c91859e9b02dba8724572dbaebb3533bc64d2c1;p=openldap Remove #ifdef sunos in lthread HAVE_LWP code. --- diff --git a/include/lthread.h b/include/lthread.h index 52af54ccbf..2a23c7791f 100644 --- a/include/lthread.h +++ b/include/lthread.h @@ -148,6 +148,9 @@ LDAP_END_DECL LDAP_BEGIN_DECL +stkalign_t *get_stack( int *stacknop ); +void free_stack( int *stackno ); + typedef void *(*VFP)(); /* thread attributes and thread type */ diff --git a/libraries/liblthread/stack.c b/libraries/liblthread/stack.c index ad16bfd945..c90eead743 100644 --- a/libraries/liblthread/stack.c +++ b/libraries/liblthread/stack.c @@ -2,6 +2,8 @@ #include "portable.h" +#if defined( HAVE_LWP ) + #include #include @@ -10,8 +12,6 @@ #include "lber.h" #include "ldap.h" -#if defined( sunos4 ) - #include #include diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index 68baf5f30f..8604b37f49 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -317,9 +317,6 @@ pthread_cond_broadcast( pthread_cond_t *cv ) * * *************/ -extern stkalign_t *get_stack(); -static void lwp_create_stack(); - int pthread_attr_init( pthread_attr_t *attr ) { @@ -347,6 +344,14 @@ pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate ) return( 0 ); } +static void +lwp_create_stack( VFP func, void *arg, int stackno ) +{ + (*func)( arg ); + + free_stack( stackno ); +} + /* ARGSUSED */ int pthread_create( @@ -366,14 +371,6 @@ pthread_create( arg, stackno ) ); } -static void -lwp_create_stack( VFP func, void *arg, int stackno ) -{ - (*func)( arg ); - - free_stack( stackno ); -} - void pthread_yield() { diff --git a/servers/slurpd/tsleep.c b/servers/slurpd/tsleep.c index bfbdffbfa2..548a71544d 100644 --- a/servers/slurpd/tsleep.c +++ b/servers/slurpd/tsleep.c @@ -34,9 +34,6 @@ #if defined( HAVE_LWP ) -extern stkalign_t *get_stack( int * ); -extern void free_stack( int ); - int tsleep( int interval