hi all
i am facing the problem in the Queue implementaion in the linked list
The mutex is used there to either add the data to Q or to delete it
but the Q can be accessed by many threads .
Suppose thread T1 stars acessing the Q and opens it for adding
by that time another thread t2 is trying to acess it but is unable to do it
as Q is locked by T1 and the result is the segmentation fault

Can anyone suggest the methods to implement the Queue as linked list in the multithreaded environment .