Named Mutex in pthreads
I'm currently utilizing pthreads, and I really need to use named mutices. I know you can use a namedmutex in pthreads by:
pthread_mutexattr_init();
pthread_mutexattr_settype();
pthread_mutex_init();
I've read that there is a pthread_mutexattr_setname_np() in some implementations. Is there any funcationlity like this with Mac OS X 10.2.8+?
pthread_mutexattr_init();
pthread_mutexattr_settype();
pthread_mutex_init();
I've read that there is a pthread_mutexattr_setname_np() in some implementations. Is there any funcationlity like this with Mac OS X 10.2.8+?
read /usr/include/pthread.h
I can read that. Obviously I have read the header file, and my REAL question was if there are any work arounds to utilize functionality like this. I thought (in my mind at least) that I implied there IS a pthread_mutexattr_setname_np() function, but not in the Mac OS X 10.2.x version of pthread.h. However, I found this function on the internet, and it is safe to assume that SOME implementations of pthread include this function.
I am asking of a work around for this.
I am asking of a work around for this.
perhaps if you explained why you want to give your mutexes a name, we might be of more help...
It might be mutices, it's definitely not muticies, but I like mutexes best.
You still haven't explained how giving a mutex a name is any use to anyone...
You still haven't explained how giving a mutex a name is any use to anyone...
maaaaark Wrote:This sounds really lame, but if I said how I was using it, it would kinda of defeat the purpose of using it. I hope that makes sense. Either way I found a different way to achieve the same result.It does sound really lame. And it doesn't make sense either. If my mutex was named maaaark, it seems like it would block a lot
Right when I got to the punchline of that, I looked at you icon and he was laughing at me ;'(
maaaaark Wrote:Right when I got to the punchline of that, I looked at you icon and he was laughing at me ;'(Don't worry about the horned skull, it's crazy

It gathers its energy by scaring fluffy animals and little children
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| pthreads vs carbon threads | tachyon | 4 | 2,816 |
Jul 18, 2005 08:22 PM Last Post: tachyon |
|

