EINVAL with errorchecked mutex ?

Jul 13, 2012 at 6:32am

EINVAL with errorchecked mutex ?

Hello,

to measure thread contention in my external, i try to go with a SYSTHREAD_MUTEX_ERRORCHECK mutex ; i expected to get MAX_ERR_NONE or EDEADLK values as return but it seems i always get EINVAL ; what i’m doing wrong ?

post-scriptum : i got the same EINVAL value with SYSTHREAD_MUTEX_NORMAL mutex too ;-)

#35932
Jul 21, 2012 at 11:25am

Hello,

to illustrate the problem… i’m SDK 5.1.7 ; is it still the same behavior with SDK 6.0.4 ?

Attachments:
  1. flop.c
#123089
Jul 21, 2012 at 2:12pm

Hello,

Solved. Sorry, very stupid mistake :-(

Attachments:
  1. flop.c
#123090
Jul 21, 2012 at 3:14pm

Hello,

Is it possible to get an EBUSY error with an ERRORCHECKed “systhread_mutex_lock” ?

I try with a time consuming task called concurrently by main and timer thread and it never happened (whereas i can get this error with “systhread_mutex_trylock”).

#123091
Jul 21, 2012 at 3:48pm

Hello,

… i should have read with more attention the “pthread” man pages ; response is NO.

Sorry, again for all that noise in the forum ;-)

#123092

You must be logged in to reply to this topic.