[ECOS] how to get mutex owner?
Boris V. Guzhov
borg@int.spb.ru
Thu Aug 3 00:09:00 GMT 2000
> Hi,
>
> I'm trying to access the owner of a mutex. I'm working in C only.
>
> The mutex struct is not documented but I saw in source code that there was
a
> owner field. Unfortunately the type of this field is "cyg_thread" and I
> didn't find any docuementation for this thread structure. And I can't find
> it in the source neither.
Hi,
I think that following code is true.
cyg_mutex_t mutex;
...
if ( mutex.owner == (cyg_thread *)cyg_thread_self() )
{
// This thread is the mutex owner
}
Boris Guzhov,
St.Petersburg, Russia
More information about the Ecos-discuss
mailing list