mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
prefer _SC_PAGESIZE over _SC_PAGE_SIZE
The POSIX spec says that_SC_PAGE_SIZE is a synonym for _SC_PAGESIZE, and both will have the same value. Let's be consistent in which one we use, and let's use the one that points directly to the authoritative documentation. Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621>
This commit is contained in:
parent
590ad7fd42
commit
e636991c78
2 changed files with 3 additions and 3 deletions
|
|
@ -103,7 +103,7 @@ drm_shim_device_init(void)
|
|||
* with EINVAL.
|
||||
*/
|
||||
|
||||
shim_page_size = sysconf(_SC_PAGE_SIZE);
|
||||
shim_page_size = sysconf(_SC_PAGESIZE);
|
||||
|
||||
util_vma_heap_init(&shim_device.mem_heap, shim_page_size,
|
||||
SHIM_MEM_SIZE - shim_page_size);
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ os_get_total_physical_memory(uint64_t *size)
|
|||
{
|
||||
#if DETECT_OS_LINUX || DETECT_OS_CYGWIN || DETECT_OS_SOLARIS || DETECT_OS_HURD || DETECT_OS_MANAGARM
|
||||
const long phys_pages = sysconf(_SC_PHYS_PAGES);
|
||||
const long page_size = sysconf(_SC_PAGE_SIZE);
|
||||
const long page_size = sysconf(_SC_PAGESIZE);
|
||||
|
||||
if (phys_pages <= 0 || page_size <= 0)
|
||||
return false;
|
||||
|
|
@ -413,7 +413,7 @@ bool
|
|||
os_get_page_size(uint64_t *size)
|
||||
{
|
||||
#if DETECT_OS_POSIX_LITE && !DETECT_OS_APPLE && !DETECT_OS_HAIKU
|
||||
const long page_size = sysconf(_SC_PAGE_SIZE);
|
||||
const long page_size = sysconf(_SC_PAGESIZE);
|
||||
|
||||
if (page_size <= 0)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue