mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
Remove #ifdef sunos in lthread HAVE_LWP code.
This commit is contained in:
parent
63a818078c
commit
1c91859e9b
@ -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 */
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include "portable.h"
|
||||
|
||||
#if defined( HAVE_LWP )
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <ac/time.h>
|
||||
@ -10,8 +12,6 @@
|
||||
#include "lber.h"
|
||||
#include "ldap.h"
|
||||
|
||||
#if defined( sunos4 )
|
||||
|
||||
#include <lwp/lwp.h>
|
||||
#include <lwp/stackdep.h>
|
||||
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -34,9 +34,6 @@
|
||||
|
||||
#if defined( HAVE_LWP )
|
||||
|
||||
extern stkalign_t *get_stack( int * );
|
||||
extern void free_stack( int );
|
||||
|
||||
int
|
||||
tsleep(
|
||||
int interval
|
||||
|
Loading…
Reference in New Issue
Block a user