Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - pthread_mutex_init: (5 Items)
   
pthread_mutex_init  
How can pthread_mutex_init return with an error and set errno to NOENT.

I look in the source, but got nowhere.  I couldn't find SyncTypeCreate().  

- Mario
Re: pthread_mutex_init  
> 
> How can pthread_mutex_init return with an error and set errno to NOENT.
> 

Donno.

> I look in the source, but got nowhere.  I couldn't find SyncTypeCreate().  
> 
> - Mario

#mkdir -p /tmp/myCPUkercalls

#cd trunk/lib/c/kercalls

#./mkkercalls /usr/include/sys/kercalls.h x86 /tmp/myCPUkercalls/

# ls -l  /tmp/myCPUkercalls/
...  SyncTypeCreate.S ....

Jeevan

Re: pthread_mutex_init  
What was that you said about RTFM? ;-)

Pthread mutex doesn't set errno - the return value __is__ the errno...

Returns:

EOK
     Success.
EAGAIN
     All kernel synchronization objects are in use.
EBUSY
     The given mutex was previously initialized and hasn't been destroyed.
EFAULT
     A fault occurred when the kernel tried to access mutex or attr.
EINVAL
     The value specified by attr is invalid.

Mario Charest wrote:
> 
> How can pthread_mutex_init return with an error and set errno to NOENT.
> 
> I look in the source, but got nowhere.  I couldn't find SyncTypeCreate(). 
> 
> - Mario
> 
> _______________________________________________
> OSTech
> http://community.qnx.com/sf/go/post4666
> 

-- 
cburgess@qnx.com
Re: pthread_mutex_init  
> What was that you said about RTFM? ;-)
> 
> Pthread mutex doesn't set errno - the return value __is__ the errno...

*sound of balloon flying off and deflating*

Thanks Colin.
Re: pthread_mutex_init  
lol :-)

I'll admit though Mario that I searched through the source of ker_sync_create et al for a while
and was mystified, until I finally looked again at the source of pthread_mutex_init

Colin

Mario Charest wrote:
>  > What was that you said about RTFM? ;-)
>  >
>  > Pthread mutex doesn't set errno - the return value __is__ the errno...
> 
> *sound of balloon flying off and deflating*
> 
> Thanks Colin.
> 
> _______________________________________________
> OSTech
> http://community.qnx.com/sf/go/post4812
> 

-- 
cburgess@qnx.com