
17 Feb
2006
17 Feb
'06
6:47 a.m.
Dhanvi Kapila wrote:
Hi : I have this piece of code for mutex operations. is this code thread-safe ? I plan to use this code in threads...
If you stop and think about it for a second, the principal reason mutexes, condvars etc were invented was to synchronise the operation of separate threads competing for access to a common memory space. So, it would be pointless having a mutex that was not thread safe. In the Unix world at least these synchronisation primitives are all defined in the _pthread_ library. Jim