Skip to content

Commit

Permalink
cleanup: include/: move atomic.h to sys/atomic.h
Browse files Browse the repository at this point in the history
move atomic.h to sys/atomic.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 #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information
nashif committed Jun 28, 2019
1 parent 52e0efa commit e1e05a2
Show file tree
Hide file tree
Showing 59 changed files with 531 additions and 516 deletions.
2 changes: 1 addition & 1 deletion arch/arm/include/kernel_arch_data.h
Expand Up @@ -34,7 +34,7 @@ extern "C" {
#include <kernel_internal.h>
#include <zephyr/types.h>
#include <misc/dlist.h>
#include <atomic.h>
#include <sys/atomic.h>
#endif

#ifndef _ASMLANGUAGE
Expand Down
2 changes: 1 addition & 1 deletion drivers/adc/adc_context.h
Expand Up @@ -9,7 +9,7 @@
#define ZEPHYR_DRIVERS_ADC_ADC_CONTEXT_H_

#include <adc.h>
#include <atomic.h>
#include <sys/atomic.h>

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion drivers/can/can_mcux_flexcan.c
Expand Up @@ -5,7 +5,7 @@
*/

#include <zephyr.h>
#include <atomic.h>
#include <sys/atomic.h>
#include <can.h>
#include <clock_control.h>
#include <device.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/nrf_power_clock.c
Expand Up @@ -7,7 +7,7 @@

#include <soc.h>
#include <errno.h>
#include <atomic.h>
#include <sys/atomic.h>
#include <device.h>
#include <clock_control.h>
#include <misc/__assert.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/console/uart_console.c
Expand Up @@ -28,7 +28,7 @@
#include <drivers/console/uart_console.h>
#include <toolchain.h>
#include <linker/sections.h>
#include <atomic.h>
#include <sys/atomic.h>
#include <misc/printk.h>
#ifdef CONFIG_UART_CONSOLE_MCUMGR
#include "mgmt/serial.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/entropy/entropy_nrf5.c
Expand Up @@ -6,7 +6,7 @@
*/

#include <entropy.h>
#include <atomic.h>
#include <sys/atomic.h>
#include <soc.h>
#include "nrf_rng.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/ieee802154/ieee802154_cc1200.h
Expand Up @@ -10,7 +10,7 @@
#define ZEPHYR_DRIVERS_IEEE802154_IEEE802154_CC1200_H_

#include <linker/sections.h>
#include <atomic.h>
#include <sys/atomic.h>
#include <spi.h>

#include <ieee802154/cc1200.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/ieee802154/ieee802154_cc2520.h
Expand Up @@ -10,7 +10,7 @@
#define ZEPHYR_DRIVERS_IEEE802154_IEEE802154_CC2520_H_

#include <linker/sections.h>
#include <atomic.h>
#include <sys/atomic.h>
#include <spi.h>

#include <ieee802154/cc2520.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/ieee802154/ieee802154_mcr20a.h
Expand Up @@ -11,7 +11,7 @@
#define ZEPHYR_DRIVERS_IEEE802154_IEEE802154_MCR20A_H_

#include <linker/sections.h>
#include <atomic.h>
#include <sys/atomic.h>
#include <spi.h>

/* Runtime context structure
Expand Down
2 changes: 1 addition & 1 deletion ext/hal/nordic/nrfx_glue.h
Expand Up @@ -151,7 +151,7 @@ extern "C" {

//------------------------------------------------------------------------------

#include <atomic.h>
#include <sys/atomic.h>

/** @brief Atomic 32-bit unsigned type. */
#define nrfx_atomic_t atomic_t
Expand Down

0 comments on commit e1e05a2

Please sign in to comment.