Hi, nice to ask you guys again!!
Well, i've never used multithreading from labwindows before, and I started already, but I need to share data structures between threads and use a lock for that data to keep his integrity, but the problem is that the definition of a CVICALLBACK function for a thread pool has a pointer to void as a parameter data, and then in the definition I have to cast that void data to a specific data type, I tried to pass structures to a thread function to work with it, but i can't cast form void to the kind of my data structure.
?How i can pass small, medium and large data structures as a data parameter to a thread callback function and use in a threadpool?
I defined a structure like this:
typedef struct
{
int datatype1;
char *string;
float floatnumber;
}Typ_dataStructure;
I defined the thread function callback
int CVICALLBACK threadFunction(void *datafunction);
and in another part of the programm y scheduled the thread with the function defined:
Typ_dataStructure datastruct;
CmtScheduleThreadPoolFunction(????,threadFunction,(Typ_dataStructure*)datastruct,???)
But it doesnt work, i can use the data struct in the secondary thread at the same time i use it in the current thread
?What i can do?