Thanks. I checked the syscalls.h and it is setup correctly. I did extra testing 
and debugging and found out that the failure happens only in a particular case 
in my application. A test app doesn't fail, and moving the call to open() to a 
different location in my app behaves correctly too. It seems to be a threading 
related issue.

One thing. I was expecting a call to open() to use open64(), but isn't 
(breakpoint triggers normal open()). Open64() has some thread related 
checking/tidying while open() hasn't. I wonder if this is causing the problem? 
How can I make sure that open64() is used?

Thanks,
Qais

> -----Original Message-----
> From: liaoxingl...@icubecorp.com [mailto:liaoxingl...@icubecorp.com]
> Sent: 12 July 2012 10:29
> To: Qais Yousef
> Subject: Re: open() return value
> 
> open() as a system call, it will call _syscall3, and _syscall3 implement as a
> macro in libc/sysdeps/linux/common/bits/syscalls-common.h. at the end, in
> macro INLINE_SYSCALL_NCS, you can see __res = -1L; but this file may be not
> really use, you can see syscalls.h depend on your arch. as example, you can
> find libc/sysdeps/linux/mips/bits/syscalls.h in MIPS arch.
> hope this can help you.
> 
> 
> xinglong
> 
> 
> >  -------Original Message-------
> >  From: Qais Yousef <qais.you...@imgtec.com>
> >  To: uClibc@uclibc.org <uClibc@uclibc.org>
> >  Subject: open() return value
> >  Sent: Jul 12 '12 17:06
> >
> >  Hi,
> >
> >  I'm not well versed with what the standard says, but looking at the man
> page of open() function it states that it returns -1 and sets errno, but 
> uClibc
> implementation returns errno directly.
> >
> >  Not a problem for me to be honest, but I just thought I'd point it
> > out :)
> >
> >  Thanks,
> >  Qais
> >
> >  _______________________________________________
> >  uClibc mailing list
> >  uClibc@uclibc.org
> >  http://lists.busybox.net/mailman/listinfo/uclibc
> >
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to