Files
bind9/lib/isc/include/isc/os.h
Ondřej Surý 06f9163d51 Remove C++ support from the public header
Since BIND 9 headers are not longer public, there's no reason to keep
the ISC_LANG_BEGINDECL and ISC_LANG_ENDDECL macros to support including
them from C++ projects.
2024-12-18 13:10:39 +01:00

48 lines
1.2 KiB
C

/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#pragma once
/*! \file isc/os.h */
#include <sys/stat.h>
#include <isc/types.h>
/*%<
* Hardcode the L1 cacheline size of the CPU to 64, this is checked in
* the os.c library constructor if operating system provide means to
* get the L1 cacheline size using sysconf().
*/
#define ISC_OS_CACHELINE_SIZE 64
unsigned int
isc_os_ncpus(void);
/*%<
* Return the number of CPUs available on the system, or 1 if this cannot
* be determined.
*/
unsigned long
isc_os_cacheline(void);
/*%<
* Return L1 cacheline size of the CPU.
* If L1 cache is greater than ISC_OS_CACHELINE_SIZE, ensure it is used
* instead of constant. Is common on ppc64le architecture.
*/
mode_t
isc_os_umask(void);
/*%<
* Return umask of the current process as initialized at the program start
*/