The things you are using are thread safe, so they lock their
inner state against concurrent access. You might want to add
a wrapper around mutex_unlock in the following way:

#define mutex_unlock(mtx)
mutex_unlock_inline(mtx,__FILE__,__LINE__,__PRETTY_FUNCTION__)
static inline mutex_unlock_inline(Mutex mtx, const char *file, int line,
const char *func) {
  debug("mutex", 0, "mutex_unlock called from %s: %d in function %s", file,
line, func);
  mutex_unlock_real(mtx);
}

and rename the real mutex_unlock call to mutex_unlock_real.
This should give you an idea what mutex calls misbehave.

BTW.: Did you test the EMI2 code from todays CVS? I think your problems
should be fixed now.

Regards
  Jörg

-----Original Message-----
From: Andreas Fink
To: [EMAIL PROTECTED]
Sent: 12/13/01 4:29 PM
Subject: mutex failure?

Can someone tell me what this message is exactly all about?

2001-12-13 15:13:38 [16] PANIC: mutex_unlock: Mutex failure!
2001-12-13 15:13:38 [16] PANIC: System error 22: Invalid argument

I get it in my app while using gwlib. I'm not using any mutexes. I'm 
using octstr stuff, http stuff, lists, config and thats about it. the 
odd thing is that this only happens if running memory=native but not 
with memory=checked.

I dont have an idea why any of those areas would need to unlock a mutex.
-- 

Andreas Fink
Fink-Consulting

------------------------------------------------------------------
Tel: +41-61-6932730 Fax: +41-61-6932729  Mobile: +41-79-2457333
Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland
E-Mail:  [EMAIL PROTECTED]  Homepage: http://www.finkconsulting.com
------------------------------------------------------------------
Something urgent? Try http://www.smsrelay.com/  Nickname afink

Reply via email to