1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/core/msg_queue_print/main.c
Frederik Haxel 7a1c099e7b tests: 64 bit compatibility
Fixed compilation errors. Mostly DEBUG/printf formatting and void pointer casting.

Other changes are:
* net/gnrc_sixlowpan_frag_*: Generalized packet size calculation
* cpu/native_backtrace: Reduced required backtrace size to 3 for 64-bit
* periph/flashpage: Simplified test
* unittests/tests-pktbuf: Generalized alignment
* sys/architecture: Extended test for 64-bit
2024-01-30 09:31:00 +01:00

48 lines
875 B
C

/*
* Copyright (C) 2021 Freie Universität Berlin,
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief testing msg_queue_print
*
*
* @author Julian Holzwarth <julian.holzwarth@fu-berlin.de>
*
*/
#include <stdio.h>
#include <inttypes.h>
#include "msg.h"
#define QUEUE_SIZE 8
msg_t msg_queue[QUEUE_SIZE];
int main(void)
{
msg_t messages[QUEUE_SIZE];
msg_queue_print();
msg_init_queue(msg_queue, QUEUE_SIZE);
msg_queue_print();
for (uintptr_t i = 0; i < QUEUE_SIZE; i++) {
messages[i].type = i;
messages[i].content.ptr = (void *) i;
msg_send_to_self(&messages[i]);
}
msg_queue_print();
puts("DONE");
return 0;
}