X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_common.h;h=05a3a64016d4b334b38c22dac28ba27dc06bab85;hb=d39d8c4bb66c68a6aa13fd363502e4d4986018f7;hp=bcf8afd39a21c11105e4f93028c5a32aeb68b4da;hpb=f56e551485d5461e5dab76b2c47164bbf646a445;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h index bcf8afd39a..05a3a64016 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2010-2014 Intel Corporation + * Copyright(c) 2010-2019 Intel Corporation */ #ifndef _RTE_COMMON_H_ @@ -24,6 +24,9 @@ extern "C" { #include +/* OS specific include */ +#include + #ifndef typeof #define typeof __typeof__ #endif @@ -103,8 +106,10 @@ typedef uint16_t unaligned_uint16_t; * Priority number must be above 100. * Lowest number is the first to run. */ +#ifndef RTE_INIT_PRIO /* Allow to override from EAL */ #define RTE_INIT_PRIO(func, prio) \ static void __attribute__((constructor(RTE_PRIO(prio)), used)) func(void) +#endif /** * Run function before main() with low priority. @@ -126,8 +131,10 @@ static void __attribute__((constructor(RTE_PRIO(prio)), used)) func(void) * Priority number must be above 100. * Lowest number is the last to run. */ +#ifndef RTE_FINI_PRIO /* Allow to override from EAL */ #define RTE_FINI_PRIO(func, prio) \ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) +#endif /** * Run after main() with high priority. @@ -352,7 +359,7 @@ rte_is_power_of_2(uint32_t n) * Aligns input parameter to the next power of 2 * * @param x - * The integer value to algin + * The integer value to align * * @return * Input parameter aligned to the next power of 2 @@ -370,7 +377,7 @@ rte_align32pow2(uint32_t x) * Aligns input parameter to the previous power of 2 * * @param x - * The integer value to algin + * The integer value to align * * @return * Input parameter aligned to the previous power of 2