OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [sysdeps/] [select.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
#include <errno.h>
2
#include <syscall.h>
3
#include <sys/time.h>
4
 
5
#define __NR__select SYS_select
6
 
7
static inline
8
_syscall5(int, _select,
9
        int, __width,
10
        fd_set *, __readfds,
11
        fd_set *, __writefds,
12
        fd_set *, __exceptfds,
13
        struct timeval *, __timeout);
14
 
15
int
16
select(int nd, fd_set * in, fd_set * out, fd_set * ex,
17
        struct timeval * tv)
18
{
19
        long __res;
20
/*      register long d0 asm ("%d0");
21
 
22
        __asm__ volatile ("movel %2,%/d1\n\t"
23
                          "trap  #0\n\t"
24
                : "=g" (d0)
25
                : "0" (SYS_select),"g" ((long) &nd) : "%d0", "%d1");
26
        __res = d0;
27
*/
28
        __res = _select(nd, in, out, ex, tv);
29
        if (__res >= 0)
30
                return (int) __res;
31
        errno = -__res;
32
        return -1;
33
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.