hi all,
i have a problem with pthread programming.
function_1(){
.
.
rc = pthread_create(&thread, &attr, my_function, (void *)&my_data);
.
rc = pthread_create(&thread, &attr, my_function, (void *)&my_data);
.
}
As the above “function_1
” do, the “my_function
” can be executed any number of time according to our need, but the problem is I have to create threads again and again. I think this is useless, because the input parameters are same at always (do not have to change).
So i want to do this(execute “my_function” regularly) with a one thread which is created at very first. Is this possible..?
please anyone can help me..