Remove #ifdef sunos in lthread HAVE_LWP code.

This commit is contained in:
Kurt Zeilenga 1998-11-15 22:05:28 +00:00
parent 63a818078c
commit 1c91859e9b
4 changed files with 13 additions and 16 deletions

View File

@ -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 */

View File

@ -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>

View File

@ -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()
{

View File

@ -34,9 +34,6 @@
#if defined( HAVE_LWP )
extern stkalign_t *get_stack( int * );
extern void free_stack( int );
int
tsleep(
int interval