Hey there,
I've been working on this project for a long time now and can't seem to find how this is done.
c++ language under windows.
I created 4 threads. Inside one of the threads I want to call another thread funtion. How is this done?? Cause it does not seem to work like other threads.
Thanks so much in advance.
Code:
DWORD WINAPI R1 (LPVOID)
{
while(TestAndSet(&lock))
while(lock==true);
readcount++;
cout << "R1 in CS." << endl;
cout << readcount << "Readers in CS." << endl;
cout << writecount << "Wrtiers in CS." << endl;
//want to call a thread here. example R#2.
readcount--;
lock=false;
return (DWORD) 0;
}