VirtualBox

Ignore:
Timestamp:
Aug 11, 2020 5:05:29 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139838
Message:

IPRT,lnx-kmods: Use new linux kernel version checking macros. Moved them to separate wrapper header.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c

    r85505 r85698  
    3939
    4040#if (defined(RT_ARCH_AMD64) || defined(DOXYGEN_RUNNING)) && !defined(RTMEMALLOC_EXEC_HEAP)
    41 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
     41# if RTLNX_VER_MIN(2,6,23) && RTLNX_VER_MAX(5,8,0)
    4242/**
    4343 * Starting with 2.6.23 we can use __get_vm_area and map_vm_area to allocate
     
    197197         * in the free function, if nothing else...
    198198         */
    199 # if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
     199# if RTLNX_VER_MAX(3,17,0)
    200200        struct page **papPagesIterator = papPages;
    201201# endif
     
    203203        pVmArea->pages    = papPages;
    204204        if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC,
    205 # if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
     205# if RTLNX_VER_MAX(3,17,0)
    206206                         &papPagesIterator
    207207# else
     
    216216        }
    217217        /* bail out */
    218 # if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
     218# if RTLNX_VER_MAX(3,17,0)
    219219        pVmArea->nr_pages = papPagesIterator - papPages;
    220220# endif
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette