The program I'm writing is pulling packets from a network connection. Then i'm using a simple ring buffer and threads to pass the info to a buffer and pull them off and do work. The ring class (which is templated) has a member mutex. When get get function (which is taking from the ring and is called when i spawn the thread) attempts to lock the mutex i'm getting this error:
error C2664: 'pthread_mutex_lock' : cannot convert parameter 1 from 'struct pthread_mutex_t_ *ringbuffer_T<unsigned char>::* ' to 'struct pthread_mutex_t_ ** '
There is no context in which this conversion is possible
When the put function was only running, the mutex lock was working fine. But now that I spawn a thread w/ pthread_create and and the starting function (the get function) is called is when i'm getting the error.
Any possible suggestions or help would be greatly appreciated, if i'm not clear about anything or you need more information just let me know. Thanks a lot.
error C2664: 'pthread_mutex_lock' : cannot convert parameter 1 from 'struct pthread_mutex_t_ *ringbuffer_T<unsigned char>::* ' to 'struct pthread_mutex_t_ ** '
There is no context in which this conversion is possible
When the put function was only running, the mutex lock was working fine. But now that I spawn a thread w/ pthread_create and and the starting function (the get function) is called is when i'm getting the error.
Any possible suggestions or help would be greatly appreciated, if i'm not clear about anything or you need more information just let me know. Thanks a lot.