synchronizing multiple threads in unix

hi all!

I wanted to know how to synchronize multiple threads in unix

It would be better if someone give some code samples

Thanx

Can you please explain your question in more detail.
normally you can achieve mutex or locking using semaphores, an IPC technique. check man page for semctl, semget for details.

so essentially for synchronization of threads, you may use semaphores in your threads.