Newsgroups: comp.programming.threads
From: "Chris Thomasson" <_no_damn_spam_cristom@_no_damn_comcast.net_spam>
Date: Tue, 12 Jul 2005 22:47:59 -0700
Local: Wed, Jul 13 2005 1:47 am
Subject: Re: condvar wait / signal on arbitrary object
> Or (I'm not certain that this actually makes sense but ...) each condvar You can get into potential deadlock situations here, if your not careful... > could have its own mutex. > struct ctx { static ctx locks; static obj a, b, c; Thread A 1: ctx_pthread_mutex_lock( &locks, &a ); Thread B 1: ctx_pthread_mutex_lock( &locks, &b ); Lets say that the objects map to the following mutexs: &a = mutex1 and the execution sequence happens to go like this: A1 ? ;) You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||