problem with pthread_mutex_timedlock
- From: Hans Juergen Gamauf <gamauf@xxxxxxxxxxxxxx>
- Date: Thu, 23 Nov 2006 01:35:07 +0100
Hello,
I want to use this function to lock a resource, but with a timeout
and that is the problem, the function returns immediately after calling, and if the lock was not free, it returns the error code 110, but I have no idea what this error code means, I've found nothing in the man-pages or anywhere else
Can anyone help me?
I'm using 2.6.15 under a special glibc/busybox distribution for an arm9-core, but I have the same effect under Kubuntu 6.06
here is my code:
-------------------------------------
struct timespec deltatime;
deltatime.tv_sec = 3;
deltatime.tv_nsec = 0;
int err_code = pthread_mutex_timedlock( &_mutexLogfile, &deltatime );
if (err_code != 0)
{
cout << "Locking returns " << err_code << endl;
THROW_EX("Logfile Mutex locked!");
}
---------------------------------------
Thank you in advance!
Hans
.
- Follow-Ups:
- Re: problem with pthread_mutex_timedlock
- From: loic-dev
- Re: problem with pthread_mutex_timedlock
- From: Larry Smith
- Re: problem with pthread_mutex_timedlock
- Prev by Date: Re: fork to create ppp link !!!
- Next by Date: Re: problem with pthread_mutex_timedlock
- Previous by thread: Re: Important Information
- Next by thread: Re: problem with pthread_mutex_timedlock
- Index(es):
Relevant Pages
|