select.c 847 B

1234567891011121314151617181920212223242526272829
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * select() for uClibc
  4. *
  5. * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
  6. *
  7. * GNU Library General Public License (LGPL) version 2 or later.
  8. */
  9. #include "syscalls.h"
  10. #include <unistd.h>
  11. #ifdef __NR__newselect
  12. extern int _newselect(int n, fd_set * readfds, fd_set * writefds,
  13. fd_set * exceptfds, struct timeval *timeout);
  14. _syscall5(int, _newselect, int, n, fd_set *, readfds, fd_set *, writefds,
  15. fd_set *, exceptfds, struct timeval *, timeout);
  16. weak_alias(_newselect, select);
  17. #else
  18. //Used as a fallback if _newselect isn't available...
  19. extern int select(int n, fd_set * readfds, fd_set * writefds,
  20. fd_set * exceptfds, struct timeval *timeout);
  21. _syscall5(int, select, int, n, fd_set *, readfds, fd_set *, writefds,
  22. fd_set *, exceptfds, struct timeval *, timeout);
  23. #endif