poll() implementation

Erik Andersen andersen at codepoet.org
Fri Jul 28 19:30:56 UTC 2006


On Fri Jul 28, 2006 at 07:26:35PM +0200, Richard Braun wrote:
> Hello,
> 
> I have an application using poll() (latest uClibc snapshot). The system
> is i486-linux-uclibc. Considering the source code, poll() is implemented
> this way :
> 
> _syscall3(int, poll, struct pollfd *, fds,
>         unsigned long int, nfds, int, timeout);
> 
> Does such a declaration prevent poll() from setting errno ?

See uClibc/libc/sysdeps/linux/i386/bits/syscalls.h where
_syscall3 is defined (for x86).  If the actual syscall return is
negative, the _syscallX ensures errno is set accordingly.  So no,
this does not prevent poll from setting errno on failure.

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20060728/b38697ad/attachment-0002.pgp 


More information about the uClibc mailing list