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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [linux/] [posix_types.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _LINUX_POSIX_TYPES_H
2
#define _LINUX_POSIX_TYPES_H
3
 
4
/*
5
 * This file is generally used by user-level software, so you need to
6
 * be a little careful about namespace pollution etc.  Also, we cannot
7
 * assume GCC is being used.
8
 */
9
 
10
#ifndef NULL
11
# define NULL           ((void *) 0)
12
#endif
13
 
14
/*
15
 * This allows for 1024 file descriptors: if NR_OPEN is ever grown
16
 * beyond that you'll have to change this too. But 1024 fd's seem to be
17
 * enough even for such "real" unices like OSF/1, so hopefully this is
18
 * one limit that doesn't have to be changed [again].
19
 *
20
 * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
21
 * <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
22
 * place for them. Solved by having dummy defines in <sys/time.h>.
23
 */
24
 
25
/*
26
 * Those macros may have been defined in <gnu/types.h>. But we always
27
 * use the ones here.
28
 */
29
#undef __NFDBITS
30
#define __NFDBITS       (8 * sizeof(unsigned long))
31
 
32
#undef __FD_SETSIZE
33
#define __FD_SETSIZE    1024
34
 
35
#ifdef CONFIG_REDUCED_MEMORY
36
 /* Ideally __FD_SETSIZE should be reduced to match to match
37
    NR_OPEN & NR_FILES, but this caused problems */
38
#endif
39
 
40
#undef __FDSET_LONGS
41
#define __FDSET_LONGS   (__FD_SETSIZE/__NFDBITS)
42
 
43
#undef __FDELT
44
#define __FDELT(d)      ((d) / __NFDBITS)
45
 
46
#undef __FDMASK
47
#define __FDMASK(d)     (1UL << ((d) % __NFDBITS))
48
 
49
typedef struct {
50
        unsigned long fds_bits [__FDSET_LONGS];
51
} __kernel_fd_set;
52
 
53
#include <asm/posix_types.h>
54
 
55
#endif /* _LINUX_POSIX_TYPES_H */

powered by: WebSVN 2.1.0

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