1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20257 from fzi-haxel/native64-part1

core, sys, drivers: 64-bit support preparations
This commit is contained in:
Marian Buschsieweke 2024-01-17 15:40:34 +00:00 committed by GitHub
commit 0cffb7f365
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 167 additions and 106 deletions

View File

@ -32,7 +32,7 @@ extern "C" {
typedef struct priority_queue_node {
struct priority_queue_node *next; /**< next queue node */
uint32_t priority; /**< queue node priority */
unsigned int data; /**< queue node data */
uintptr_t data; /**< queue node data */
} priority_queue_node_t;
/**
@ -47,6 +47,11 @@ typedef struct {
*/
#define PRIORITY_QUEUE_NODE_INIT { NULL, 0, 0 }
/**
* @brief Constant for signaling in the priority queue data member.
*/
#define PRIORITY_QUEUE_DATA_SIGNALING (UINTPTR_MAX)
/**
* @brief Initialize a priority queue node object.
* @details For initialization of variables use PRIORITY_QUEUE_NODE_INIT

View File

@ -78,14 +78,14 @@ void priority_queue_print(priority_queue_t *root)
printf("queue:\n");
for (priority_queue_node_t *node = root->first; node; node = node->next) {
printf("Data: %u Priority: %lu\n", node->data,
(unsigned long)node->priority);
printf("Data: %" PRIuPTR " Priority: %" PRIu32 "\n", node->data,
node->priority);
}
}
void priority_queue_print_node(priority_queue_node_t *node)
{
printf("Data: %u Priority: %lu Next: %u\n", (unsigned int)node->data,
(unsigned long)node->priority, (unsigned int)node->next);
printf("Data: %" PRIuPTR " Priority: %" PRIu32 " Next: %p\n", node->data,
node->priority, (void *)node->next);
}
#endif

View File

@ -64,8 +64,8 @@ int _mbox_put(mbox_t *mbox, msg_t *msg, int blocking)
list_node_t *next = list_remove_head(&mbox->readers);
if (next) {
DEBUG("mbox: Thread %" PRIkernel_pid " mbox 0x%08x: _tryput(): "
"there's a waiter.\n", thread_getpid(), (unsigned)mbox);
DEBUG("mbox: Thread %" PRIkernel_pid " mbox 0x%08" PRIxPTR ": _tryput(): "
"there's a waiter.\n", thread_getpid(), (uintptr_t)mbox);
thread_t *thread =
container_of((clist_node_t *)next, thread_t, rq_entry);
*(msg_t *)thread->wait_data = *msg;
@ -84,8 +84,8 @@ int _mbox_put(mbox_t *mbox, msg_t *msg, int blocking)
}
}
DEBUG("mbox: Thread %" PRIkernel_pid " mbox 0x%08x: _tryput(): "
"queued message.\n", thread_getpid(), (unsigned)mbox);
DEBUG("mbox: Thread %" PRIkernel_pid " mbox 0x%08" PRIxPTR ": _tryput(): "
"queued message.\n", thread_getpid(), (uintptr_t)mbox);
msg->sender_pid = thread_getpid();
/* copy msg into queue */
mbox->msg_array[cib_put_unsafe(&mbox->cib)] = *msg;
@ -99,8 +99,8 @@ int _mbox_get(mbox_t *mbox, msg_t *msg, int blocking)
unsigned irqstate = irq_disable();
if (cib_avail(&mbox->cib)) {
DEBUG("mbox: Thread %" PRIkernel_pid " mbox 0x%08x: _tryget(): "
"got queued message.\n", thread_getpid(), (unsigned)mbox);
DEBUG("mbox: Thread %" PRIkernel_pid " mbox 0x%08" PRIxPTR ": _tryget(): "
"got queued message.\n", thread_getpid(), (uintptr_t)mbox);
/* copy msg from queue */
*msg = mbox->msg_array[cib_get_unsafe(&mbox->cib)];
list_node_t *next = list_remove_head(&mbox->writers);

View File

@ -29,7 +29,7 @@ static inline int __attribute__((always_inline)) _thread_flags_wake(
thread_t *thread)
{
unsigned wakeup;
thread_flags_t mask = (uint16_t)(unsigned)thread->wait_data;
thread_flags_t mask = (uint16_t)(uintptr_t)thread->wait_data;
switch (thread->status) {
case STATUS_FLAG_BLOCKED_ANY:
@ -76,7 +76,7 @@ static void _thread_flags_wait(thread_flags_t mask, thread_t *thread,
"_thread_flags_wait: me->flags=0x%08x me->mask=0x%08x. going blocked.\n",
(unsigned)thread->flags, (unsigned)mask);
thread->wait_data = (void *)(unsigned)mask;
thread->wait_data = (void *)(uintptr_t)mask;
sched_set_status(thread, threadstate);
irq_restore(irqstate);
thread_yield_higher();

View File

@ -35,7 +35,7 @@
#define ENABLE_DEBUG 0
#include "debug.h"
#define MTD_FLASHPAGE_END_ADDR ((uint32_t) CPU_FLASH_BASE + (FLASHPAGE_NUMOF * FLASHPAGE_SIZE))
#define MTD_FLASHPAGE_END_ADDR ((uintptr_t) CPU_FLASH_BASE + (FLASHPAGE_NUMOF * FLASHPAGE_SIZE))
static int _init(mtd_dev_t *dev)
{
@ -44,11 +44,14 @@ static int _init(mtd_dev_t *dev)
assert(dev->pages_per_sector * dev->page_size == FLASHPAGE_SIZE);
assert(!(super->offset % dev->pages_per_sector));
assert((int)flashpage_addr(super->offset / dev->pages_per_sector) >= (int)CPU_FLASH_BASE);
/* Use separate variable to avoid '>= 0 is always true' warning */
static const uintptr_t cpu_flash_base = CPU_FLASH_BASE;
assert((uintptr_t)flashpage_addr(super->offset / dev->pages_per_sector) >= cpu_flash_base);
assert((uintptr_t)flashpage_addr(super->offset / dev->pages_per_sector)
+ dev->pages_per_sector * dev->page_size * dev->sector_count <= MTD_FLASHPAGE_END_ADDR);
assert((uintptr_t)flashpage_addr(super->offset / dev->pages_per_sector)
+ dev->pages_per_sector * dev->page_size * dev->sector_count > CPU_FLASH_BASE);
+ dev->pages_per_sector * dev->page_size * dev->sector_count > cpu_flash_base);
return 0;
}

View File

@ -65,7 +65,7 @@ struct uart_ctx {
static void _tx_timer_cb(void *arg, int chan)
{
soft_uart_t uart = (soft_uart_t)arg;
soft_uart_t uart = (soft_uart_t)(uintptr_t)arg;
const soft_uart_conf_t *cfg = &soft_uart_config[uart];
struct uart_ctx *ctx = &soft_uart_ctx[uart];
@ -81,7 +81,7 @@ static void _tx_timer_cb(void *arg, int chan)
static void _rx_timer_cb(void *arg, int chan)
{
soft_uart_t uart = (soft_uart_t)arg;
soft_uart_t uart = (soft_uart_t)(uintptr_t)arg;
const soft_uart_conf_t *cfg = &soft_uart_config[uart];
struct uart_ctx *ctx = &soft_uart_ctx[uart];
@ -101,7 +101,7 @@ static void _rx_timer_cb(void *arg, int chan)
static void _rx_gpio_cb(void *arg)
{
soft_uart_t uart = (soft_uart_t)arg;
soft_uart_t uart = (soft_uart_t)(uintptr_t)arg;
const soft_uart_conf_t *cfg = &soft_uart_config[uart];
struct uart_ctx *ctx = &soft_uart_ctx[uart];
@ -166,18 +166,18 @@ int soft_uart_init(soft_uart_t uart, uint32_t baudrate, uart_rx_cb_t rx_cb, void
ctx->state_rx = STATE_RX_IDLE;
if (gpio_is_valid(cfg->tx_pin)) {
timer_init(cfg->tx_timer, cfg->timer_freq, _tx_timer_cb, (void *)uart);
timer_init(cfg->tx_timer, cfg->timer_freq, _tx_timer_cb, (void *)(uintptr_t)uart);
gpio_write(cfg->tx_pin, !(cfg->flags & SOFT_UART_FLAG_INVERT_TX));
gpio_init(cfg->tx_pin, GPIO_OUT);
}
if (rx_cb) {
timer_init(cfg->rx_timer, cfg->timer_freq, _rx_timer_cb, (void *)uart);
timer_init(cfg->rx_timer, cfg->timer_freq, _rx_timer_cb, (void *)(uintptr_t)uart);
timer_stop(cfg->rx_timer);
/* timer should fire at the end of the byte */
timer_set_periodic(cfg->rx_timer, 0, ctx->bit_time * (BITS_DATA(ctx) + BITS_PARITY(ctx) + 1),
TIM_FLAG_RESET_ON_MATCH | TIM_FLAG_RESET_ON_SET);
gpio_init_int(cfg->rx_pin, GPIO_IN, GPIO_BOTH, _rx_gpio_cb, (void*) uart);
gpio_init_int(cfg->rx_pin, GPIO_IN, GPIO_BOTH, _rx_gpio_cb, (void*)(uintptr_t)uart);
}
return 0;

View File

@ -46,7 +46,7 @@ void condition_variable::notify_one() noexcept {
other_prio = other_thread->priority;
sched_set_status(other_thread, STATUS_PENDING);
}
head->data = -1u;
head->data = PRIORITY_QUEUE_DATA_SIGNALING;
}
irq_restore(old_state);
if (other_prio >= 0) {
@ -69,7 +69,7 @@ void condition_variable::notify_all() noexcept {
other_prio = max_prio(other_prio, other_thread->priority);
sched_set_status(other_thread, STATUS_PENDING);
}
head->data = -1u;
head->data = PRIORITY_QUEUE_DATA_SIGNALING;
}
irq_restore(old_state);
if (other_prio >= 0) {
@ -87,8 +87,8 @@ void condition_variable::wait(unique_lock<mutex>& lock) noexcept {
priority_queue_add(&m_queue, &n);
irq_restore(old_state);
mutex_unlock_and_sleep(lock.mutex()->native_handle());
if (n.data != -1u) {
// on signaling n.data is set to -1u
if (n.data != PRIORITY_QUEUE_DATA_SIGNALING) {
// on signaling n.data is set to PRIORITY_QUEUE_DATA_SIGNALING
// if it isn't set, then the wakeup is either spurious or a timer wakeup
old_state = irq_disable();
priority_queue_remove(&m_queue, &n);

View File

@ -52,48 +52,83 @@ extern "C" {
/**
* @brief Size of a word in bits
*
* @details Depending on architecture, this can have a value of 8, 16, or 32
* @details Depending on architecture, this can have a value of 8, 16, 32, or 64
*/
#define ARCHITECTURE_WORD_BITS <NUM>
/**
* @brief Size of a word in bytes
*
* @details Depending on architecture, this can have a value or 1, 2, or 4.
* @details Depending on architecture, this can have a value or 1, 2, 4, or 8.
*/
#define ARCHITECTURE_WORD_BYTES <NUM>
#define ARCHITECTURE_WORD_BYTES <ARCHITECTURE_WORD_BITS / 8>
/**
* @brief Word sized unsigned integer
*
* @details Synonym to `uint8_t`, `uint16_t` or `uint32_t` depending on
* architecture
* @details Synonym to `uint8_t`, `uint16_t`, `uint32_t`, or `uint64_t`
* depending on architecture
*/
typedef uint<num>_t uword_t;
typedef uint<NUM>_t uword_t;
/**
* @brief Word sized signed integer
*
* @details Synonym to `int8_t`, `int16_t` or `int32_t` depending on
* @details Synonym to `int8_t`, `int16_t`, `int32_t`, or `int64_t` depending on
* architecture
*
* @note This type is pronounce es-word-tea. When slaying dragons, this is
* not the tool you're looking for.
*/
typedef int<num>_t sword_t;
typedef int<NUM>_t sword_t;
/**
* @brief Highest number an sword_t can hold
*/
#define SWORD_MAX <2^(ARCHITECTURE_WORD_BITS - 1) - 1>
/**
* @brief Smallest number an sword_t can hold
*/
#define SWORD_MIN <-2^(ARCHITECTURE_WORD_BITS - 1)>
/**
* @brief Highest number an uword_t can hold
*/
#define UWORD_MAX <2^ARCHITECTURE_WORD_BITS - 1>
/* end of ifdef DOXYGEN */
#elif (ARCHITECTURE_WORD_BITS == 8)
#define ARCHITECTURE_WORD_BYTES (1U)
typedef uint8_t uword_t;
typedef int8_t sword_t;
#define SWORD_MAX (INT8_MAX)
#define SWORD_MIN (INT8_MIN)
#define UWORD_MAX (UINT8_MAX)
#elif (ARCHITECTURE_WORD_BITS == 16)
#define ARCHITECTURE_WORD_BYTES (2U)
typedef uint16_t uword_t;
typedef int16_t sword_t;
#define SWORD_MAX (INT16_MAX)
#define SWORD_MIN (INT16_MIN)
#define UWORD_MAX (UINT16_MAX)
#elif (ARCHITECTURE_WORD_BITS == 32)
#define ARCHITECTURE_WORD_BYTES (4U)
typedef uint32_t uword_t;
typedef int32_t sword_t;
#define SWORD_MAX (INT32_MAX)
#define SWORD_MIN (INT32_MIN)
#define UWORD_MAX (UINT32_MAX)
#elif (ARCHITECTURE_WORD_BITS == 64)
#define ARCHITECTURE_WORD_BYTES (8U)
typedef uint64_t uword_t;
typedef int64_t sword_t;
#define SWORD_MAX (INT64_MAX)
#define SWORD_MIN (INT64_MIN)
#define UWORD_MAX (UINT64_MAX)
#else
#error "Unsupported word size (check ARCHITECTURE_WORD_BITS in architecture_arch.h)"
#endif
/**
* @brief Smallest number an uword_t can hold
*/
#define UWORD_MIN (0U)
#if !defined(ARCHITECTURE_LARGE_TXT_PTR) || DOXYGEN
/**
* @brief Pointer type to point anywhere in the .text section
@ -135,7 +170,6 @@ typedef uintptr_t uinttxtptr_t;
/**
* @brief Macro holding the format specifier to print an `ssize_t` variable
* in octal representation.
* `0x` or `0`, respectively.
*/
#define PRIoSIZE PRI_SIZE_T_MODIFIER "o"
/**
@ -145,12 +179,18 @@ typedef uintptr_t uinttxtptr_t;
#define PRIuSIZE PRI_SIZE_T_MODIFIER "u"
/**
* @brief Macro holding the format specifier to print an `size_t` variable
* in hexadecimal representation (e.g. `2a` for 42).
* in hexadecimal representation.
*
* @details Same as @ref PRIXSIZE for input, but uses lowercase letters for
* output (e.g. `2a` for 42).
*/
#define PRIxSIZE PRI_SIZE_T_MODIFIER "x"
/**
* @brief Macro holding the format specifier to print an `size_t` variable
* in hexadecimal representation (e.g. `2A` for 42).
* in hexadecimal representation.
*
* @details Same as @ref PRIxSIZE for input, but uses uppercase letters for
* output (e.g. `2A` for 42).
*/
#define PRIXSIZE PRI_SIZE_T_MODIFIER "X"
@ -185,26 +225,6 @@ typedef uintptr_t uinttxtptr_t;
*/
#define IS_WORD_ALIGNED(addr) HAS_ALIGNMENT_OF(addr, ARCHITECTURE_WORD_BYTES)
/**
* @brief Smallest number an uword_t can hold
*/
#define UWORD_MIN 0
/**
* @brief Highest number an uword_t can hold
*/
#define UWORD_MAX ((1ULL << ARCHITECTURE_WORD_BITS) - 1)
/**
* @brief Smallest number an sword_t can hold
*/
#define SWORD_MIN (-(1LL << (ARCHITECTURE_WORD_BITS - 1)))
/**
* @brief Highest number an sword_t can hold
*/
#define SWORD_MAX ((1LL << (ARCHITECTURE_WORD_BITS - 1)) - 1)
#ifdef __cplusplus
}
#endif

View File

@ -134,7 +134,7 @@ extern "C" {
/**
* @brief hash function to use in thee filter
*/
typedef uint32_t (*hashfp_t)(const uint8_t *, int len);
typedef uint32_t (*hashfp_t)(const uint8_t *, size_t len);
/**
* @brief bloom_t bloom filter object

View File

@ -89,6 +89,7 @@ extern "C" {
#ifndef _MAX
#define _MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef MAX5
/**
* @brief MAX5 Function to get the largest of 5 values
@ -104,37 +105,52 @@ extern "C" {
#ifdef MODULE_FATFS_VFS
#include "ffconf.h"
#if FF_FS_TINY
#define _FATFS_FILE_CACHE (0)
#else
#define _FATFS_FILE_CACHE FF_MAX_SS
#endif
# if FF_FS_TINY
# define _FATFS_FILE_CACHE (0)
# else
# define _FATFS_FILE_CACHE FF_MAX_SS
# endif
#if FF_USE_FASTSEEK
#define _FATFS_FILE_SEEK_PTR (4)
#else
#define _FATFS_FILE_SEEK_PTR (0)
#endif
# if FF_USE_FASTSEEK
# if (__SIZEOF_POINTER__ == 8)
# define _FATFS_FILE_SEEK_PTR (8)
# else
# define _FATFS_FILE_SEEK_PTR (4)
# endif
# else
# define _FATFS_FILE_SEEK_PTR (0)
# endif
#if FF_FS_EXFAT
#define _FATFS_FILE_EXFAT (44)
#define _FATFS_DIR_EXFAT (32)
#else
#define _FATFS_FILE_EXFAT (0)
#define _FATFS_DIR_EXFAT (0)
#endif
# if FF_FS_EXFAT
# define _FATFS_FILE_EXFAT (44)
# define _FATFS_DIR_EXFAT (32)
# else
# define _FATFS_FILE_EXFAT (0)
# define _FATFS_DIR_EXFAT (0)
# endif
#if FF_USE_LFN
#define _FATFS_DIR_LFN (4)
#else
#define _FATFS_DIR_LFN (0)
#endif
# if FF_USE_LFN
# if (__SIZEOF_POINTER__ == 8)
# define _FATFS_DIR_LFN (8)
# else
# define _FATFS_DIR_LFN (4)
# endif
# else
# define _FATFS_DIR_LFN (0)
# endif
#define FATFS_VFS_DIR_BUFFER_SIZE (44 + _FATFS_DIR_LFN + _FATFS_DIR_EXFAT)
#define FATFS_VFS_FILE_BUFFER_SIZE (41 + VFS_NAME_MAX + _FATFS_FILE_CACHE + _FATFS_FILE_SEEK_PTR + _FATFS_FILE_EXFAT)
# if (__SIZEOF_POINTER__ == 8)
# define FATFS_VFS_DIR_BUFFER_SIZE (64 + _FATFS_DIR_LFN + _FATFS_DIR_EXFAT)
# define FATFS_VFS_FILE_BUFFER_SIZE (57 + VFS_NAME_MAX + _FATFS_FILE_CACHE + \
_FATFS_FILE_SEEK_PTR + _FATFS_FILE_EXFAT)
# else
# define FATFS_VFS_DIR_BUFFER_SIZE (44 + _FATFS_DIR_LFN + _FATFS_DIR_EXFAT)
# define FATFS_VFS_FILE_BUFFER_SIZE (41 + VFS_NAME_MAX + _FATFS_FILE_CACHE + \
_FATFS_FILE_SEEK_PTR + _FATFS_FILE_EXFAT)
# endif
#else
#define FATFS_VFS_DIR_BUFFER_SIZE (1)
#define FATFS_VFS_FILE_BUFFER_SIZE (1)
# define FATFS_VFS_DIR_BUFFER_SIZE (1)
# define FATFS_VFS_FILE_BUFFER_SIZE (1)
#endif
/** @} */
@ -143,11 +159,16 @@ extern "C" {
* @{
*/
#ifdef MODULE_LITTLEFS
#define LITTLEFS_VFS_DIR_BUFFER_SIZE (44)
#define LITTLEFS_VFS_FILE_BUFFER_SIZE (56)
# if (__SIZEOF_POINTER__ == 8)
# define LITTLEFS_VFS_DIR_BUFFER_SIZE (48)
# define LITTLEFS_VFS_FILE_BUFFER_SIZE (72)
# else
# define LITTLEFS_VFS_DIR_BUFFER_SIZE (44)
# define LITTLEFS_VFS_FILE_BUFFER_SIZE (56)
# endif
#else
#define LITTLEFS_VFS_DIR_BUFFER_SIZE (1)
#define LITTLEFS_VFS_FILE_BUFFER_SIZE (1)
# define LITTLEFS_VFS_DIR_BUFFER_SIZE (1)
# define LITTLEFS_VFS_FILE_BUFFER_SIZE (1)
#endif
/** @} */
@ -156,11 +177,16 @@ extern "C" {
* @{
*/
#ifdef MODULE_LITTLEFS2
#define LITTLEFS2_VFS_DIR_BUFFER_SIZE (52)
#define LITTLEFS2_VFS_FILE_BUFFER_SIZE (84)
# if (__SIZEOF_POINTER__ == 8)
# define LITTLEFS2_VFS_DIR_BUFFER_SIZE (56)
# define LITTLEFS2_VFS_FILE_BUFFER_SIZE (104)
# else
# define LITTLEFS2_VFS_DIR_BUFFER_SIZE (52)
# define LITTLEFS2_VFS_FILE_BUFFER_SIZE (84)
# endif
#else
#define LITTLEFS2_VFS_DIR_BUFFER_SIZE (1)
#define LITTLEFS2_VFS_FILE_BUFFER_SIZE (1)
# define LITTLEFS2_VFS_DIR_BUFFER_SIZE (1)
# define LITTLEFS2_VFS_FILE_BUFFER_SIZE (1)
#endif
/** @} */
@ -169,11 +195,11 @@ extern "C" {
* @{
*/
#ifdef MODULE_SPIFFS
#define SPIFFS_VFS_DIR_BUFFER_SIZE (12)
#define SPIFFS_VFS_FILE_BUFFER_SIZE (1)
# define SPIFFS_VFS_DIR_BUFFER_SIZE (12)
# define SPIFFS_VFS_FILE_BUFFER_SIZE (1)
#else
#define SPIFFS_VFS_DIR_BUFFER_SIZE (1)
#define SPIFFS_VFS_FILE_BUFFER_SIZE (1)
# define SPIFFS_VFS_DIR_BUFFER_SIZE (1)
# define SPIFFS_VFS_FILE_BUFFER_SIZE (1)
#endif
/** @} */
@ -182,11 +208,11 @@ extern "C" {
* @{
*/
#if defined(MODULE_LWEXT4) || DOXYGEN
#define LWEXT4_VFS_DIR_BUFFER_SIZE (308) /**< sizeof(ext4_dir) */
#define LWEXT4_VFS_FILE_BUFFER_SIZE (32) /**< sizeof(ext4_file) */
# define LWEXT4_VFS_DIR_BUFFER_SIZE (308) /**< sizeof(ext4_dir) */
# define LWEXT4_VFS_FILE_BUFFER_SIZE (32) /**< sizeof(ext4_file) */
#else
#define LWEXT4_VFS_DIR_BUFFER_SIZE (1)
#define LWEXT4_VFS_FILE_BUFFER_SIZE (1)
# define LWEXT4_VFS_DIR_BUFFER_SIZE (1)
# define LWEXT4_VFS_FILE_BUFFER_SIZE (1)
#endif
/** @} */

View File

@ -28,7 +28,14 @@
extern "C" {
#endif
#ifndef __socklen_t_defined
#if SIZE_MAX < UINT32_MAX
typedef size_t socklen_t; /**< socket address length */
#else
// Specification calls for at least 32 bits
typedef uint32_t socklen_t; /**< socket address length */
#endif
#endif
#ifdef __cplusplus
}

View File

@ -141,8 +141,8 @@ int pthread_cond_timedwait(pthread_cond_t *cond, mutex_t *mutex, const struct ti
mutex_unlock_and_sleep(mutex);
if (n.data != -1u) {
/* on signaling n.data is set to -1u */
if (n.data != PRIORITY_QUEUE_DATA_SIGNALING) {
/* on signaling n.data is set to PRIORITY_QUEUE_DATA_SIGNALING */
/* if it isn't set, then the wakeup is either spurious or a timer wakeup */
unsigned old_state = irq_disable();
priority_queue_remove(&(cond->queue), &n);
@ -171,7 +171,7 @@ int pthread_cond_signal(pthread_cond_t *cond)
other_prio = other_thread->priority;
sched_set_status(other_thread, STATUS_PENDING);
}
head->data = -1u;
head->data = PRIORITY_QUEUE_DATA_SIGNALING;
}
irq_restore(old_state);
@ -205,7 +205,7 @@ int pthread_cond_broadcast(pthread_cond_t *cond)
other_prio = max_prio(other_prio, other_thread->priority);
sched_set_status(other_thread, STATUS_PENDING);
}
head->data = -1u;
head->data = PRIORITY_QUEUE_DATA_SIGNALING;
}
irq_restore(old_state);

View File

@ -521,7 +521,7 @@ static void _ztimer_print(const ztimer_clock_t *clock)
uint32_t last_offset = 0;
do {
printf("0x%08x:%" PRIu32 "(%" PRIu32 ")%s", (unsigned)entry,
printf("0x%08" PRIxPTR ":%" PRIu32 "(%" PRIu32 ")%s", (uintptr_t)entry,
entry->offset, entry->offset +
last_offset,
entry->next ? "->" : (entry == clock->last ? "" : "!"));

View File

@ -302,7 +302,7 @@ void ztimer64_clock_print(const ztimer64_clock_t *clock)
const ztimer64_base_t *entry = clock->first;
while (entry) {
printf("0x%08x:%" PRIu64 "\n", (unsigned)entry, entry->target);
printf("0x%08" PRIxPTR ":%" PRIu64 "\n", (uintptr_t)entry, entry->target);
entry = entry->next;
}
puts("");