Hi all!
Is there a function in c++ to create new threads.I have writen a class "Thread"
in which I will be calling this thread function to creat threads.
Also is there a function to synchronize threads .I know that we can create objects like semaphores and critical sections to synchronize in windows apps.But is there a similar function or object which can be used on solaris systems.Thanks for ur help.
Vij.
use man pages.. you can use the lpthread library direct in your C++ code. if you read the man pages there are samples on how to use the function and other functions related to threads.
USER > uname -a
SunOS 5.8 Generic_117350-25 sun4u sparc
USER > man pthread_create
Threads Library Functions pthread_create(3THR)
NAME
pthread_create - create a thread
SYNOPSIS
cc -mt [ flag... ] file...- lpthread [ library... ]
#include <pthread.h>
int pthread_create(pthread_t *thread, const pthread_attr_t
*attr, void *(*start_routine, void*),void *arg);
Thanks a lot!
I will look into it .