this might a simple query.
when we are creating a thread we are passing the (void *)t as an argument to a function PrintHello.we are copying the value in the pointer threadid(typacasting it to long) in tid which is a long variable again.i am confused with the parameter passing.
is this a pass by reference or pass by value.over all is this correct?
(value *)t
. what value does it pass exactly?
long t;
rc = pthread_create(&threads[t], NULL, PrintHello, (void *)t);
void *PrintHello(void *threadid)
{
long tid;
tid = (long)threadid;
please help me to avoid my confusion:(