Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.development.apps > #561
| From | Sergei Organov <osv@javad.com> |
|---|---|
| Newsgroups | comp.os.linux.development.apps |
| Subject | Re: pthred_con_timewait problem |
| Date | 2013-01-29 19:58 +0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ke8ri9$9g0$1@speranza.aioe.org> (permalink) |
| References | <InRNs.867$OE1.126@newsfe26.iad> <87pq0o10fw.fsf@sapphire.mobileactivedefense.com> <TURNs.86317$LS5.79873@newsfe10.iad> |
ephlodur <ephlodur@linuxmail.org> writes: > On Tue, 29 Jan 2013 15:19:31 +0000, Rainer Weikusat wrote: > >> ephlodur <ephlodur@linuxmail.org> writes: >> >> [...] >> >>> _ret = pthread_cond_timedwait(&_event_id, &_m_mutex, &ts); >>> unlock(); >>> >>> but when ever I make that call it always return with EPERM >> >> According to the UNIX(*) standard, >> >> [EPERM] >> The mutex type is PTHREAD_MUTEX_ERRORCHECK or the mutex > is a robust >> mutex, and the current thread does not own the mutex. >> >> This would mean that the thread invoking pthread_cond_timedwait didn't >> lock the _m_mutex mutex. > > As show in my code snippet below from my class CEvent the thread is locl > before the call... > lock();//lock in this case is define as a base > _ret = pthread_cond_timedwait(&_event_id, &_m_mutex, &ts); > unlock(); When you ask for help, it's a good idea to provide minimal example that anyone here can compile and run to reproduce the problem. When you prepare one, you will probably see what's wrong yourself and won't need to ask anybody ;-) -- Sergei.
Back to comp.os.linux.development.apps | Previous | Next — Previous in thread | Next in thread | Find similar
pthred_con_timewait problem ephlodur <ephlodur@linuxmail.org> - 2013-01-29 14:53 +0000
Re: pthred_con_timewait problem Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-01-29 15:19 +0000
Re: pthred_con_timewait problem ephlodur <ephlodur@linuxmail.org> - 2013-01-29 15:28 +0000
Re: pthred_con_timewait problem Sergei Organov <osv@javad.com> - 2013-01-29 19:58 +0400
Re: pthred_con_timewait problem ephlodur <ephlodur@linuxmail.org> - 2013-01-29 17:30 +0000
Re: pthred_con_timewait problem Sergei Organov <osv@javad.com> - 2013-01-29 22:44 +0400
Re: pthred_con_timewait problem ephlodur <ephlodur@linuxmail.org> - 2013-01-30 11:28 +0000
Re: pthred_con_timewait problem Richard Kettlewell <rjk@greenend.org.uk> - 2013-01-29 16:32 +0000
csiph-web