C + + Error

Source: Internet
Author: User

0x01 asm/page.h:no such file or directory

Create a page.h under/usr/include/asm/

#ifndef _i386_page_h#define_i386_page_h/*Page_shift determines the PAGE size*/#definePage_shift 12#definePage_size (1UL << page_shift)#definePage_mask (~ (page_size-1))#defineLarge_page_mask (~ (large_page_size-1))#defineLarge_page_size (1UL << pmd_shift)#ifdef __kernel__#ifndef __assembly__#include<linux/config.h>#ifdef config_x86_use_3dnow#include<asm/mmx.h>#defineClear_page (page) mmx_clear_page ((void *) (page))#defineCopy_page (To,from) mmx_copy_page (To,from)#else/** On older X86 processors it's not a win-to-use MMX here it seems.* maybe the k6-iii?*/#defineClear_page (page) memset ((void *) (page), 0, Page_size)#defineCopy_page (To,from) memcpy ((void *) (to), (void *) (from), page_size)#endif#defineClear_user_page (page, Vaddr, PG) Clear_page (page)#defineCopy_user_page (To, from, Vaddr, PG) Copy_page (to, from)/** These is used to make use of C type-checking.*/#ifdef config_x86_paetypedefstruct{unsignedLongPte_low, Pte_high;} Pte_t;typedefstruct{unsignedLong LongPMD;} Pmd_t;typedefstruct{unsignedLong LongPGD;} pgd_t;#definePte_val (x) ((x). Pte_low | ((unsigned long Long) (x). Pte_high << 32))#defineHpage_shift 21#elsetypedefstruct{unsignedLongPte_low;} Pte_t;typedefstruct{unsignedLongPMD;} Pmd_t;typedefstruct{unsignedLongPGD;} pgd_t;#defineboot_pte_t pte_t/* or would you rather has a typedef */#definePte_val (x) ((x). Pte_low)#defineHpage_shift 22#endif#definePte_mask Page_mask#ifdef config_hugetlb_page#defineHpage_size ((1UL) << hpage_shift)#defineHpage_mask (~ (hpage_size-1))#defineHugetlb_page_order (Hpage_shift-page_shift)#endiftypedefstruct{unsignedLongPgprot;} pgprot_t;#definePmd_val (x) ((x). PMD)#definePgd_val (x) ((x). PGD)#definePgprot_val (x) ((x). Pgprot)#define__pte (x) ((pte_t) {(x)})#define__PMD (x) ((pmd_t) {(x)})#define__PGD (x) ((pgd_t) {(x)})#define__pgprot (x) ((pgprot_t) {(x)})#endif/*!__assembly__ *//*To align the pointer to the (next) page boundary*/#definePage_align (addr) (((addr) +page_size-1) &page_mask)/** This handles the memory map. We could make this a config* option, but too many people screw it up, and too few need* it.** a __page_offset of 0xC000000 0 means that the kernel has* a virtual address space of one gigabyte, which limits the* amount of physical memory can Use of about 950MB. * * If you want more physical memory than the config_highmem4g* and CONFIG_HIGHMEM64G options in the kernel C Onfiguration.*//** This much address space was reserved for Vmalloc () and Iomap () * As well as fixmap mappings.*/#define__vmalloc_reserve (<< 20)#ifndef __assembly__/*Pure 2^n version of Get_order*/Static__inline__intGet_order (unsignedLongsize) {intorder;size= (size-1) >> (page_shift-1); Order= -1; Do{size>>=1; Order++;}  while(size);returnOrder;}#endif/* __assembly__ */#ifdef __assembly__#define__page_offset (0xC0000000)#else#define__page_offset (0xc0000000ul)#endif#definePage_offset ((unsigned long) __page_offset)#defineVmalloc_reserve ((unsigned long) __vmalloc_reserve)#defineMAXMEM (-__page_offset-__vmalloc_reserve)#define__PA (x) ((unsigned long) (x)-page_offset)#define__va (x) ((void *) ((unsigned long) (x) +page_offset)#definePFN_TO_KADDR (PFN) __va ((PFN) << page_shift)#ifndef Config_discontigmem#definePfn_to_page (PFN) (Mem_map + (PFN))#definePAGE_TO_PFN (page) ((unsigned long) ((page)-Mem_map))#definePfn_valid (PFN) ((PFN) < MAX_MAPNR)#endif/* ! CONFIG_DISCONTIGMEM * *#defineVirt_to_page (KADDR) pfn_to_page (__pa (kaddr) >> page_shift)#defineVirt_addr_valid (KADDR) pfn_valid (__pa (kaddr) >> page_shift)#defineVm_data_default_flags (Vm_read | Vm_write | vm_exec | \Vm_mayread| Vm_maywrite |vm_mayexec)#endif/* __kernel__ */#endif/* _i386_page_h */

0x02

C + + Error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.