17 lines
333 B
C
17 lines
333 B
C
|
|
#ifdef __alpha
|
|
#include <pthread.h>
|
|
extern pthread_mutex_t *my_mutex;
|
|
#define lock pthread_mutex_lock (my_mutex)
|
|
#define unlock pthread_mutex_unlock (my_mutex)
|
|
#else
|
|
#define lock
|
|
#define unlock
|
|
#endif
|
|
|
|
extern int numthreads;
|
|
|
|
typedef void (threadfunc_t) (void *);
|
|
|
|
void initthreads (void);
|
|
void runthreadson ( threadfunc_t func );
|