What is the right way to declare it?

I think it was something like SendFile( void** pVal ), then pass SendFile by reference.

With regards to the mutex... is is created/initalized with

Code:
pthread_mutex_t hMutex = PTHREAD_MUTEX_INITIALIZER;
I would think that would take care of it.. but if not, I acually do use joins before i destroy the threads, just forgot to put them in here.

Thanks.