Re: correct pthread call

Rusty Lusk (lusk@mcs.anl.gov)
Mon, 23 Jun 1997 12:31:47 -0500

| On 174:29, the sample code has the call:
|
| pthreadinit(reduce_thread, (void*)&args);
|
| The correct syntax may be:
|
| pthread_t thread;
| ...
| pthread_create(&thread, NULL, reduce_thread, args);
|
| but we are not positive. If anyone knows for sure, please let us
| know.

Using man pthread_create:

______________________________________________________________________

On a Sun:

pthread_create(3T) Threads Library pthread_create(3T)

NAME
pthread_create - thread creation

SYNOPSIS
POSIX

#include <pthread.h>
int pthread_create(pthread_t *new_thread_ID,
const pthread_attr_t *attr,
void * (*start_func)(void *), void *arg);

______________________________________________________________________

On an RS6000:

Threads Library (libpthreads.a)
Syntax

#include <pthread.h>

int pthread_create (thread, attr, start_routine, arg)
pthread_t *thread;
const pthread_attr_t *attr;
void *(*start_routine) (void *);
void *arg;