kernel: deprecate K_THREAD_STACK_MEMBER

The macro K_THREAD_STACK_MEMBER has actually been deprecated
since v2.4.0 in the macro doxygen description, but it was
never marked with __DEPRECATED_MACRO. Since this was being
used in various drivers, make it follow the deprecation
process.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2023-10-10 14:02:01 -07:00 committed by Fabio Baltieri
parent 5c6dca3c52
commit 04a0cf7d79
11 changed files with 13 additions and 14 deletions

View file

@ -6,8 +6,7 @@ MPU Stack Objects
Thread Stack Creation
*********************
Thread stacks are declared statically with :c:macro:`K_THREAD_STACK_DEFINE()`
or embedded within structures using :c:macro:`K_THREAD_STACK_MEMBER()`
Thread stacks are declared statically with :c:macro:`K_THREAD_STACK_DEFINE()`.
For architectures which utilize memory protection unit (MPU) hardware,
stacks are physically contiguous allocations. This contiguous allocation

View file

@ -140,7 +140,7 @@ struct ads1x1x_data {
struct k_thread thread;
bool differential;
K_THREAD_STACK_MEMBER(stack, CONFIG_ADC_ADS1X1X_ACQUISITION_THREAD_STACK_SIZE);
K_KERNEL_STACK_MEMBER(stack, CONFIG_ADC_ADS1X1X_ACQUISITION_THREAD_STACK_SIZE);
};
static int ads1x1x_read_reg(const struct device *dev, enum ads1x1x_reg reg_addr, uint16_t *buf)

View file

@ -35,7 +35,7 @@ struct b91_adc_data {
struct k_sem acq_sem;
struct k_thread thread;
K_THREAD_STACK_MEMBER(stack, CONFIG_ADC_B91_ACQUISITION_THREAD_STACK_SIZE);
K_KERNEL_STACK_MEMBER(stack, CONFIG_ADC_B91_ACQUISITION_THREAD_STACK_SIZE);
};
struct b91_adc_cfg {

View file

@ -226,7 +226,7 @@ struct max1125x_data {
struct k_thread thread;
bool differential;
K_THREAD_STACK_MEMBER(stack, CONFIG_ADC_MAX1125X_ACQUISITION_THREAD_STACK_SIZE);
K_KERNEL_STACK_MEMBER(stack, CONFIG_ADC_MAX1125X_ACQUISITION_THREAD_STACK_SIZE);
};
static void max1125x_data_ready_handler(const struct device *dev, struct gpio_callback *gpio_cb,

View file

@ -90,7 +90,7 @@ struct w5500_config {
struct w5500_runtime {
struct net_if *iface;
K_THREAD_STACK_MEMBER(thread_stack,
K_KERNEL_STACK_MEMBER(thread_stack,
CONFIG_ETH_W5500_RX_THREAD_STACK_SIZE);
struct k_thread thread;
uint8_t mac_addr[6];

View file

@ -159,7 +159,7 @@ struct fdc2x1x_data {
const struct device *dev;
#ifdef CONFIG_FDC2X1X_TRIGGER_OWN_THREAD
K_THREAD_STACK_MEMBER(thread_stack, CONFIG_FDC2X1X_THREAD_STACK_SIZE);
K_KERNEL_STACK_MEMBER(thread_stack, CONFIG_FDC2X1X_THREAD_STACK_SIZE);
struct k_sem gpio_sem;
struct k_thread thread;
#elif CONFIG_FDC2X1X_TRIGGER_GLOBAL_THREAD

View file

@ -30,7 +30,7 @@ struct sm351lt_data {
const struct sensor_trigger *changed_trigger;
#if defined(CONFIG_SM351LT_TRIGGER_OWN_THREAD)
K_THREAD_STACK_MEMBER(thread_stack, CONFIG_SM351LT_THREAD_STACK_SIZE);
K_KERNEL_STACK_MEMBER(thread_stack, CONFIG_SM351LT_THREAD_STACK_SIZE);
struct k_thread thread;
struct k_sem gpio_sem;
#elif defined(CONFIG_SM351LT_TRIGGER_GLOBAL_THREAD)

View file

@ -48,7 +48,7 @@ struct tmag5170_data {
struct k_sem sem;
struct k_thread thread;
K_THREAD_STACK_MEMBER(thread_stack,
K_KERNEL_STACK_MEMBER(thread_stack,
CONFIG_TMAG5170_THREAD_STACK_SIZE);
#elif defined(CONFIG_TMAG5170_TRIGGER_GLOBAL_THREAD)
struct k_work work;

View file

@ -91,7 +91,7 @@ struct tsl2540_data {
sensor_trigger_handler_t als_handler;
#endif
#ifdef CONFIG_TSL2540_TRIGGER_OWN_THREAD
K_THREAD_STACK_MEMBER(thread_stack, CONFIG_TSL2540_THREAD_STACK_SIZE);
K_KERNEL_STACK_MEMBER(thread_stack, CONFIG_TSL2540_THREAD_STACK_SIZE);
struct k_thread thread;
struct k_sem trig_sem;
#endif

View file

@ -118,7 +118,7 @@ struct vcnl4040_data {
const struct sensor_trigger *als_trigger;
#endif
#ifdef CONFIG_VCNL4040_TRIGGER_OWN_THREAD
K_THREAD_STACK_MEMBER(thread_stack, CONFIG_VCNL4040_THREAD_STACK_SIZE);
K_KERNEL_STACK_MEMBER(thread_stack, CONFIG_VCNL4040_THREAD_STACK_SIZE);
struct k_thread thread;
struct k_sem trig_sem;
#endif

View file

@ -625,13 +625,13 @@ static inline char *Z_KERNEL_STACK_BUFFER(k_thread_stack_t *sym)
* A user thread can only be started with a stack defined in this way if
* the thread starting it is in supervisor mode.
*
* This is now deprecated, as stacks defined in this way are not usable from
* user mode. Use K_KERNEL_STACK_MEMBER.
* @deprecated This is now deprecated, as stacks defined in this way are not
* usable from user mode. Use K_KERNEL_STACK_MEMBER.
*
* @param sym Thread stack symbol name
* @param size Size of the stack memory region
*/
#define K_THREAD_STACK_MEMBER(sym, size) \
#define K_THREAD_STACK_MEMBER(sym, size) __DEPRECATED_MACRO \
Z_THREAD_STACK_DEFINE_IN(sym, size,)
/** @} */