I have N threads and they have to do job on shared data.
I am using following structure:
int main(){
pthread_create(..., func, ...);
}
void *func(void *id){
lock;
do_job;
unlock;
}
My problem is that threads seem to work sequentially. How to actually make them parallel?