Hey, kinda feels like I'm in over my head here, but trying to learn how to use pthread_create and am having problems with passing in arguments. Right now, I have
a = pthread_create(&thread1, NULL, MatrixTimes, (Matrixa, 0, i, MAX, Matrixb));
in my code calling pthread create, and
void MatrixTimes(int Matrixa[5][5], int start, int end, int max, int Matrixb[5][5])
as my function prototype. What I can gather from reading and the internet is that I need to create a void pointer and pass my arguements in that way... and that's where I go over my head. I see how it works with one item passed in, but looking to pass in several, 5 to be exact. Any help, or directions to a good pthread tutorial, would be much appreciated. Thanks.
a = pthread_create(&thread1, NULL, MatrixTimes, (Matrixa, 0, i, MAX, Matrixb));
in my code calling pthread create, and
void MatrixTimes(int Matrixa[5][5], int start, int end, int max, int Matrixb[5][5])
as my function prototype. What I can gather from reading and the internet is that I need to create a void pointer and pass my arguements in that way... and that's where I go over my head. I see how it works with one item passed in, but looking to pass in several, 5 to be exact. Any help, or directions to a good pthread tutorial, would be much appreciated. Thanks.