Annotation of Gnu-Mach/linux/dev/include/asm-i386/page.h, revision 1.1.1.2

1.1       root        1: #ifndef _I386_PAGE_H
                      2: #define _I386_PAGE_H
                      3: 
1.1.1.2 ! root        4: #include <mach/vm_param.h>
1.1       root        5: 
                      6: #ifdef __KERNEL__
                      7: 
                      8: #define STRICT_MM_TYPECHECKS
                      9: 
                     10: #ifdef STRICT_MM_TYPECHECKS
                     11: /*
                     12:  * These are used to make use of C type-checking..
                     13:  */
                     14: typedef struct { unsigned long pte; } pte_t;
                     15: typedef struct { unsigned long pmd; } pmd_t;
                     16: typedef struct { unsigned long pgd; } pgd_t;
                     17: typedef struct { unsigned long pgprot; } pgprot_t;
                     18: 
                     19: #define pte_val(x)     ((x).pte)
                     20: #define pmd_val(x)     ((x).pmd)
                     21: #define pgd_val(x)     ((x).pgd)
                     22: #define pgprot_val(x)  ((x).pgprot)
                     23: 
                     24: #define __pte(x)       ((pte_t) { (x) } )
                     25: #define __pmd(x)       ((pmd_t) { (x) } )
                     26: #define __pgd(x)       ((pgd_t) { (x) } )
                     27: #define __pgprot(x)    ((pgprot_t) { (x) } )
                     28: 
                     29: #else
                     30: /*
                     31:  * .. while these make it easier on the compiler
                     32:  */
                     33: typedef unsigned long pte_t;
                     34: typedef unsigned long pmd_t;
                     35: typedef unsigned long pgd_t;
                     36: typedef unsigned long pgprot_t;
                     37: 
                     38: #define pte_val(x)     (x)
                     39: #define pmd_val(x)     (x)
                     40: #define pgd_val(x)     (x)
                     41: #define pgprot_val(x)  (x)
                     42: 
                     43: #define __pte(x)       (x)
                     44: #define __pmd(x)       (x)
                     45: #define __pgd(x)       (x)
                     46: #define __pgprot(x)    (x)
                     47: 
                     48: #endif
                     49: 
                     50: /* to align the pointer to the (next) page boundary */
                     51: #define PAGE_ALIGN(addr)       (((addr)+PAGE_SIZE-1)&PAGE_MASK)
                     52: 
                     53: /* This handles the memory map.. */
                     54: #define PAGE_OFFSET            0
                     55: #define MAP_NR(addr)           (((unsigned long)(addr)) >> PAGE_SHIFT)
                     56: 
                     57: #endif /* __KERNEL__ */
                     58: 
                     59: #endif /* _I386_PAGE_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.