mutex_init .


1. mutex_init

Initialize the mutex to unlocked state.

2. Classroom

The point of a mutex  is to synchronize two threads. When
you  have  two  threads  attempting to  access  a  single
resource, the general pattern  is to have the first block
of  code  attempting  access  to  set  the  mutex  before
entering the  code. When  the second code  block attempts
access,  it sees  the mutex  is set  and waits  until the
first block of code  is complete (and un-sets the mutex),
then continues.

source : http://stackoverflow.com/questions/34524/what-is-a-mutex


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: