Skip to content

Commit

Permalink
cleanup: include/: move misc/util.h to sys/util.h
Browse files Browse the repository at this point in the history
move misc/util.h to sys/util.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to zephyrproject-rtos#16539

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Jun 28, 2019
1 parent d222553 commit a2fd7d7
Show file tree
Hide file tree
Showing 295 changed files with 1,103 additions and 1,088 deletions.
2 changes: 1 addition & 1 deletion arch/arc/core/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <kernel.h>
#include <arch/cpu.h>
#include <misc/util.h>
#include <sys/util.h>
#include <toolchain.h>
#include <cache.h>
#include <linker/linker-defs.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/include/kernel_arch_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {
#include <kernel.h>
#include <kernel_internal.h>
#include <zephyr/types.h>
#include <misc/util.h>
#include <sys/util.h>
#include <sys/dlist.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/core/cortex_m/scb.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <kernel.h>
#include <arch/cpu.h>
#include <misc/util.h>
#include <sys/util.h>
#include <arch/arm/cortex_m/cmsis.h>

/**
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/core/cortex_m/vector_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extern "C" {

#include <toolchain.h>
#include <linker/sections.h>
#include <misc/util.h>
#include <sys/util.h>

GTEXT(__start)
GTEXT(_vector_table)
Expand Down
2 changes: 1 addition & 1 deletion arch/nios2/include/kernel_arch_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {
#include <kernel.h>
#include <kernel_internal.h>
#include <zephyr/types.h>
#include <misc/util.h>
#include <sys/util.h>
#include <sys/dlist.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion arch/riscv32/include/kernel_arch_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C" {
#ifndef _ASMLANGUAGE
#include <kernel.h>
#include <zephyr/types.h>
#include <misc/util.h>
#include <sys/util.h>
#include <sys/dlist.h>
#include <kernel_internal.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/core/ia32/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <kernel.h>
#include <arch/cpu.h>
#include <misc/util.h>
#include <sys/util.h>
#include <toolchain.h>
#include <cache.h>
#include <cache_private.h>
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/include/kernel_arch_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <asm_inline.h>
#include <exception.h>
#include <kernel_arch_thread.h>
#include <misc/util.h>
#include <sys/util.h>

#ifndef _ASMLANGUAGE
#include <kernel.h>
Expand Down Expand Up @@ -110,7 +110,7 @@

#ifndef _ASMLANGUAGE

#include <misc/util.h>
#include <sys/util.h>

#ifdef _THREAD_WRAPPER_REQUIRED
extern void z_x86_thread_entry_wrapper(k_thread_entry_t entry,
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/core/xtensa_intgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def emit_int_handler(ints):

# Re-include the core-isa header and be sure our definitions match, for sanity
cprint("#include <xtensa/config/core-isa.h>")
cprint("#include <misc/util.h>")
cprint("#include <sys/util.h>")
cprint("#include <sw_isr_table.h>")
cprint("")
for l in ints_by_lvl:
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/kernel_arch_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {
#include <kernel_internal.h>
#include <zephyr/types.h>
#include <sys/dlist.h>
#include <misc/util.h>
#include <sys/util.h>

/* Bitmask definitions for the struct k_thread->flags bit field */

Expand Down
2 changes: 1 addition & 1 deletion boards/posix/native_posix/hw_models_top.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "posix_soc_if.h"
#include "posix_arch_internal.h"
#include "sdl_events.h"
#include <misc/util.h>
#include <sys/util.h>


static u64_t simu_time; /* The actual time as known by the HW models */
Expand Down
2 changes: 1 addition & 1 deletion boards/posix/native_posix/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <soc.h>
#include "hw_models_top.h"
#include <stdlib.h>
#include "misc/util.h"
#include <sys/util.h>
#include "cmdline.h"

void posix_exit(int exit_code)
Expand Down
2 changes: 1 addition & 1 deletion boards/posix/native_posix/timer_model.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "board_soc.h"
#include "zephyr/types.h"
#include "posix_trace.h"
#include "misc/util.h"
#include <sys/util.h>
#include "cmdline.h"
#include "soc.h"

Expand Down
2 changes: 1 addition & 1 deletion boards/posix/nrf52_bsim/board_soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define _POSIX_NRF52_BOARD_SOC_H

#include <toolchain.h>
#include <misc/util.h>
#include <sys/util.h>

#include <stdint.h>
#include <stdbool.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/adc/adc_intel_quark_se_c1000_ss.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <soc.h>
#include <drivers/adc.h>
#include <arch/cpu.h>
#include <misc/util.h>
#include <sys/util.h>

#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/adc/adc_sam_afec.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <errno.h>
#include <sys/__assert.h>
#include <misc/util.h>
#include <sys/util.h>
#include <device.h>
#include <init.h>
#include <soc.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/audio/tlv320dac310x.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <errno.h>

#include <misc/util.h>
#include <sys/util.h>

#include <device.h>
#include <drivers/i2c.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <init.h>
#include <drivers/uart.h>
#include <misc/util.h>
#include <sys/util.h>
#include <sys/byteorder.h>
#include <string.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/h5.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <init.h>
#include <drivers/uart.h>
#include <misc/util.h>
#include <sys/util.h>
#include <sys/byteorder.h>
#include <misc/stack.h>
#include <sys/printk.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/ipm_stm32wb.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


#include <init.h>
#include <misc/util.h>
#include <sys/util.h>

#include <bluetooth/hci.h>
#include <bluetooth/hci_driver.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <init.h>
#include <drivers/spi.h>
#include <sys/byteorder.h>
#include <misc/util.h>
#include <sys/util.h>

#include <bluetooth/hci.h>
#include <bluetooth/hci_driver.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/userchan.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <zephyr.h>
#include <device.h>
#include <init.h>
#include <misc/util.h>
#include <sys/util.h>
#include <sys/byteorder.h>

#include <errno.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/can/can_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <clock_control/stm32_clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <sys/util.h>
#include <string.h>
#include <kernel.h>
#include <soc.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/beetle_clock_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <soc.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <sys/util.h>
#include <clock_control/arm_clock_control.h>

#define MAINCLK_BASE_FREQ 24000000
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32_ll_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <soc.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <sys/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32_ll_mp1.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <soc.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <sys/util.h>
#include <clock_control/stm32_clock_control.h>

/**
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32f0_f3.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <soc.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <sys/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32f1.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <soc.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <sys/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32f2_f4_f7.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <soc.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <sys/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32l0_l1.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <soc.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <sys/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32l4_wb.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <soc.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <sys/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/counter/counter_ll_stm32_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <clock_control/stm32_clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <sys/util.h>
#include <kernel.h>
#include <soc.h>
#include <drivers/counter.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/counter/counter_qmsi_aonpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <drivers/counter.h>
#include <power/power.h>
#include <soc.h>
#include <misc/util.h>
#include <sys/util.h>

#include "qm_aon_counters.h"
#include "qm_isr.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/counter/counter_rtc_qmsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <kernel.h>
#include <power/power.h>
#include <soc.h>
#include <misc/util.h>
#include <sys/util.h>

#include "qm_isr.h"
#include "qm_rtc.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/crypto/crypto_ataes132a_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <drivers/i2c.h>
#include <kernel.h>
#include <misc/util.h>
#include <sys/util.h>

/* Configuration Read Only Registers */
#define ATAES_SERIALNUM_REG 0xF000
Expand Down
2 changes: 1 addition & 1 deletion drivers/display/grove_lcd_rgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <drivers/i2c.h>
#include <display/grove_lcd.h>
#include <misc/util.h>
#include <sys/util.h>

#define LOG_LEVEL CONFIG_DISPLAY_LOG_LEVEL
#include <logging/log.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma/dma_stm32f4x.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <stdio.h>
#include <soc.h>
#include <string.h>
#include <misc/util.h>
#include <sys/util.h>

#define LOG_LEVEL CONFIG_DMA_LOG_LEVEL
#include <logging/log.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/entropy/entropy_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <random/rand32.h>
#include <init.h>
#include <sys/__assert.h>
#include <misc/util.h>
#include <sys/util.h>
#include <errno.h>
#include <soc.h>
#include <sys/printk.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/entropy/fake_entropy_native_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "device.h"
#include <drivers/entropy.h>
#include "init.h"
#include "misc/util.h"
#include <sys/util.h>
#include <stdlib.h>
#include <string.h>
#include "posix_trace.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/ethernet/eth_dw_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <pci/pci_mgr.h>
#endif /* CONFIG_PCI */

#include <misc/util.h>
#include <sys/util.h>

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion drivers/ethernet/eth_mcux.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
LOG_MODULE_REGISTER(LOG_MODULE_NAME);

#include <device.h>
#include <misc/util.h>
#include <sys/util.h>
#include <kernel.h>
#include <net/net_pkt.h>
#include <net/net_if.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/ethernet/eth_sam_gmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <kernel.h>
#include <device.h>
#include <sys/__assert.h>
#include <misc/util.h>
#include <sys/util.h>
#include <errno.h>
#include <stdbool.h>
#include <net/net_pkt.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/ethernet/eth_stm32_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <kernel.h>
#include <device.h>
#include <sys/__assert.h>
#include <misc/util.h>
#include <sys/util.h>
#include <errno.h>
#include <stdbool.h>
#include <net/net_pkt.h>
Expand Down
Loading

0 comments on commit a2fd7d7

Please sign in to comment.