for(t=0;t<numThread;t++)
{
MESSAGE("Creating thread " << t);
- rc = pthread_create(&threads[t], NULL, PrintHello, (void *)t) ;
+ rc = pthread_create(&threads[t], NULL, PrintHello, &t) ;
CPPUNIT_ASSERT( !rc);
}
for(t=0;t<NUM_THREADS;t++)
{
MESSAGE("Creating thread " << t);
- rc = pthread_create(&threads[t], NULL, PrintHello, (void *)t) ;
+ rc = pthread_create(&threads[t], NULL, PrintHello, &t) ;
CPPUNIT_ASSERT( !rc);
}
for(t=0;t<NUM_THREADS;t++)
{
MESSAGE("Creating thread " << t);
- rc = pthread_create(&threads[t], NULL, PrintHello, (void *)t) ;
+ rc = pthread_create(&threads[t], NULL, PrintHello, &t) ;
CPPUNIT_ASSERT( !rc);
}