In linux, we can write the code like this:
void *pthread(void *args)
{
int i = *((int*)args);
printf("%d\n", i);
}
int main(int argc, char *argv[])
{
....
int num = 3;
pthread_t id;
ret = pthread_create(&id, NULL, pthread, (void*)&num);
}
So we can transmit the parameter num to the thread function.
However, I have no idea how to transmit the parameter to SystemThread. I hope that someone can give me a solution. Thanks!
Tim Lee
Feb. 26th, 2017