tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Semantics of copying mutex/rwlock



On Wed, 16 Jun 2010 19:38:25 +0400
Denis Lagno <dlagno%rambler.ru@localhost> wrote:

> > > memcpy(&new_mutex, &old_mutex, sizeof(pthread_mutex_t))
> 
> > Maybe - but maybe not.
> 
> At least it should be safe to copy PTHREAD_MUTEX_INITIALIZER, I guess?

I think the macro only works with statically allocated objects.


Home | Main Index | Thread Index | Old Index