mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
treewide: remove THREAD_CREATE_STACKTEST from thread creation
This commit is contained in:
parent
b1d3825c27
commit
312a550f1a
@ -115,13 +115,13 @@ void kernel_init(void)
|
|||||||
if (IS_USED(MODULE_CORE_IDLE_THREAD)) {
|
if (IS_USED(MODULE_CORE_IDLE_THREAD)) {
|
||||||
thread_create(idle_stack, sizeof(idle_stack),
|
thread_create(idle_stack, sizeof(idle_stack),
|
||||||
THREAD_PRIORITY_IDLE,
|
THREAD_PRIORITY_IDLE,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
idle_thread, NULL, "idle");
|
idle_thread, NULL, "idle");
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_create(main_stack, sizeof(main_stack),
|
thread_create(main_stack, sizeof(main_stack),
|
||||||
THREAD_PRIORITY_MAIN,
|
THREAD_PRIORITY_MAIN,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
main_trampoline, NULL, "main");
|
main_trampoline, NULL, "main");
|
||||||
|
|
||||||
cpu_switch_context_exit();
|
cpu_switch_context_exit();
|
||||||
|
@ -82,7 +82,7 @@ BaseType_t xTaskCreatePinnedToCore(TaskFunction_t pvTaskCode,
|
|||||||
usStackDepth + sizeof(thread_t),
|
usStackDepth + sizeof(thread_t),
|
||||||
uxPriority,
|
uxPriority,
|
||||||
THREAD_CREATE_WOUT_YIELD |
|
THREAD_CREATE_WOUT_YIELD |
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
(void *)pvTaskCode,
|
(void *)pvTaskCode,
|
||||||
pvParameters, pcName);
|
pvParameters, pcName);
|
||||||
DEBUG("pid=%d\n", pid);
|
DEBUG("pid=%d\n", pid);
|
||||||
|
@ -379,7 +379,7 @@ static void start_server(void)
|
|||||||
_dtls_server_pid = thread_create(_dtls_server_stack,
|
_dtls_server_pid = thread_create(_dtls_server_stack,
|
||||||
sizeof(_dtls_server_stack),
|
sizeof(_dtls_server_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_dtls_server_wrapper, NULL, "DTLS_Server");
|
_dtls_server_wrapper, NULL, "DTLS_Server");
|
||||||
|
|
||||||
/* Uncommon but better be sure */
|
/* Uncommon but better be sure */
|
||||||
|
@ -242,7 +242,7 @@ static void start_server(void)
|
|||||||
_dtls_server_pid = thread_create(_dtls_server_stack,
|
_dtls_server_pid = thread_create(_dtls_server_stack,
|
||||||
sizeof(_dtls_server_stack),
|
sizeof(_dtls_server_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
dtls_server_wrapper, NULL, "dtls_server");
|
dtls_server_wrapper, NULL, "dtls_server");
|
||||||
|
|
||||||
/* Uncommon but better be sure */
|
/* Uncommon but better be sure */
|
||||||
|
@ -51,7 +51,7 @@ int main(void)
|
|||||||
msg_t m;
|
msg_t m;
|
||||||
|
|
||||||
kernel_pid_t pid = thread_create(second_thread_stack, sizeof(second_thread_stack),
|
kernel_pid_t pid = thread_create(second_thread_stack, sizeof(second_thread_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
second_thread, NULL, "pong");
|
second_thread, NULL, "pong");
|
||||||
|
|
||||||
m.content.value = 1;
|
m.content.value = 1;
|
||||||
|
@ -154,7 +154,7 @@ static int udp_start_server(char *port_str)
|
|||||||
}
|
}
|
||||||
/* start server (which means registering pktdump for the chosen port) */
|
/* start server (which means registering pktdump for the chosen port) */
|
||||||
if (thread_create(server_stack, sizeof(server_stack), THREAD_PRIORITY_MAIN - 1,
|
if (thread_create(server_stack, sizeof(server_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_server_thread, port_str, "UDP server") <= KERNEL_PID_UNDEF) {
|
_server_thread, port_str, "UDP server") <= KERNEL_PID_UNDEF) {
|
||||||
server_socket = -1;
|
server_socket = -1;
|
||||||
puts("error initializing thread");
|
puts("error initializing thread");
|
||||||
|
@ -124,7 +124,7 @@ int main(void)
|
|||||||
/* start and register rawdump thread */
|
/* start and register rawdump thread */
|
||||||
puts("Run the rawdump thread and register it");
|
puts("Run the rawdump thread and register it");
|
||||||
dump.target.pid = thread_create(rawdmp_stack, sizeof(rawdmp_stack), RAWDUMP_PRIO,
|
dump.target.pid = thread_create(rawdmp_stack, sizeof(rawdmp_stack), RAWDUMP_PRIO,
|
||||||
THREAD_CREATE_STACKTEST, rawdump, NULL, "rawdump");
|
0, rawdump, NULL, "rawdump");
|
||||||
dump.demux_ctx = GNRC_NETREG_DEMUX_CTX_ALL;
|
dump.demux_ctx = GNRC_NETREG_DEMUX_CTX_ALL;
|
||||||
gnrc_netreg_register(GNRC_NETTYPE_UNDEF, &dump);
|
gnrc_netreg_register(GNRC_NETTYPE_UNDEF, &dump);
|
||||||
|
|
||||||
|
@ -135,19 +135,19 @@ int main(void)
|
|||||||
{
|
{
|
||||||
static char stack[WORKER_STACKSIZE];
|
static char stack[WORKER_STACKSIZE];
|
||||||
static struct worker_config wc = THREAD_1; /* 0-10 workness */
|
static struct worker_config wc = THREAD_1; /* 0-10 workness */
|
||||||
thread_create(stack, sizeof(stack), 7, THREAD_CREATE_STACKTEST,
|
thread_create(stack, sizeof(stack), 7, 0,
|
||||||
thread_worker, &wc, "T1");
|
thread_worker, &wc, "T1");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
static char stack[WORKER_STACKSIZE];
|
static char stack[WORKER_STACKSIZE];
|
||||||
static struct worker_config wc = THREAD_2; /* 0-10 workness */
|
static struct worker_config wc = THREAD_2; /* 0-10 workness */
|
||||||
thread_create(stack, sizeof(stack), 7, THREAD_CREATE_STACKTEST,
|
thread_create(stack, sizeof(stack), 7, 0,
|
||||||
thread_worker, &wc, "T2");
|
thread_worker, &wc, "T2");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
static char stack[WORKER_STACKSIZE];
|
static char stack[WORKER_STACKSIZE];
|
||||||
static struct worker_config wc = THREAD_3; /* 0-10 workness */
|
static struct worker_config wc = THREAD_3; /* 0-10 workness */
|
||||||
thread_create(stack, sizeof(stack), 7, THREAD_CREATE_STACKTEST,
|
thread_create(stack, sizeof(stack), 7, 0,
|
||||||
thread_worker, &wc, "T3");
|
thread_worker, &wc, "T3");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ err_t lwip_netdev_init(struct netif *netif)
|
|||||||
/* start multiplexing thread (only one needed) */
|
/* start multiplexing thread (only one needed) */
|
||||||
if (_pid <= KERNEL_PID_UNDEF) {
|
if (_pid <= KERNEL_PID_UNDEF) {
|
||||||
_pid = thread_create(_stack, LWIP_NETDEV_STACKSIZE, LWIP_NETDEV_PRIO,
|
_pid = thread_create(_stack, LWIP_NETDEV_STACKSIZE, LWIP_NETDEV_PRIO,
|
||||||
THREAD_CREATE_STACKTEST, _event_loop, netif,
|
0, _event_loop, netif,
|
||||||
LWIP_NETDEV_NAME);
|
LWIP_NETDEV_NAME);
|
||||||
if (_pid <= 0) {
|
if (_pid <= 0) {
|
||||||
return ERR_IF;
|
return ERR_IF;
|
||||||
|
@ -213,7 +213,7 @@ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg,
|
|||||||
if (stack == NULL) {
|
if (stack == NULL) {
|
||||||
return ERR_MEM;
|
return ERR_MEM;
|
||||||
}
|
}
|
||||||
if ((res = thread_create(stack, stacksize, prio, THREAD_CREATE_STACKTEST,
|
if ((res = thread_create(stack, stacksize, prio, 0,
|
||||||
_lwip_thread_wrapper, ¶ms,
|
_lwip_thread_wrapper, ¶ms,
|
||||||
name)) <= KERNEL_PID_UNDEF) {
|
name)) <= KERNEL_PID_UNDEF) {
|
||||||
abort();
|
abort();
|
||||||
|
@ -36,7 +36,7 @@ int os_task_init(struct os_task *t, const char *name, os_task_func_t func,
|
|||||||
LOG_DEBUG("[mynewt-core]: starting thread %s\n", name);
|
LOG_DEBUG("[mynewt-core]: starting thread %s\n", name);
|
||||||
|
|
||||||
kernel_pid_t pid = thread_create(stack_bottom, (int) stack_size,
|
kernel_pid_t pid = thread_create(stack_bottom, (int) stack_size,
|
||||||
prio, THREAD_CREATE_STACKTEST,
|
prio, 0,
|
||||||
func, arg, name);
|
func, arg, name);
|
||||||
|
|
||||||
t->pid = pid;
|
t->pid = pid;
|
||||||
|
@ -89,7 +89,7 @@ static void *_host_thread(void *arg)
|
|||||||
*/
|
*/
|
||||||
thread_create(_stack_controller, sizeof(_stack_controller),
|
thread_create(_stack_controller, sizeof(_stack_controller),
|
||||||
NIMBLE_CONTROLLER_PRIO,
|
NIMBLE_CONTROLLER_PRIO,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
(thread_task_func_t)nimble_port_ll_task_func, NULL,
|
(thread_task_func_t)nimble_port_ll_task_func, NULL,
|
||||||
"nimble_ctrl");
|
"nimble_ctrl");
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ void nimble_riot_init(void)
|
|||||||
/* and finally initialize and run the host */
|
/* and finally initialize and run the host */
|
||||||
thread_create(_stack_host, sizeof(_stack_host),
|
thread_create(_stack_host, sizeof(_stack_host),
|
||||||
NIMBLE_HOST_PRIO,
|
NIMBLE_HOST_PRIO,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_host_thread, NULL,
|
_host_thread, NULL,
|
||||||
"nimble_host");
|
"nimble_host");
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ static void *_openthread_event_loop(void *arg)
|
|||||||
int openthread_netdev_init(char *stack, int stacksize, char priority,
|
int openthread_netdev_init(char *stack, int stacksize, char priority,
|
||||||
const char *name, netdev_t *netdev) {
|
const char *name, netdev_t *netdev) {
|
||||||
if (thread_create(stack, stacksize,
|
if (thread_create(stack, stacksize,
|
||||||
priority, THREAD_CREATE_STACKTEST,
|
priority, 0,
|
||||||
_openthread_event_loop, netdev, name) < 0) {
|
_openthread_event_loop, netdev, name) < 0) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ int openwsn_bootstrap(void)
|
|||||||
|
|
||||||
LOG_DEBUG("[openwsn]: network thread\n");
|
LOG_DEBUG("[openwsn]: network thread\n");
|
||||||
_pid = thread_create(_stack, OPENWSN_SCHED_STACKSIZE, OPENWSN_SCHED_PRIO,
|
_pid = thread_create(_stack, OPENWSN_SCHED_STACKSIZE, OPENWSN_SCHED_PRIO,
|
||||||
THREAD_CREATE_STACKTEST, _event_loop, NULL,
|
0, _event_loop, NULL,
|
||||||
OPENWSN_SCHED_NAME);
|
OPENWSN_SCHED_NAME);
|
||||||
if (_pid <= 0) {
|
if (_pid <= 0) {
|
||||||
LOG_ERROR("[openwsn]: couldn't create thread\n");
|
LOG_ERROR("[openwsn]: couldn't create thread\n");
|
||||||
|
@ -225,7 +225,7 @@ int ThreadStart(Thread *thread, void (*fn)(void *), void *arg)
|
|||||||
(void) fn;
|
(void) fn;
|
||||||
thread->pid = thread_create(thread->stack, sizeof(thread->stack),
|
thread->pid = thread_create(thread->stack, sizeof(thread->stack),
|
||||||
MQTT_THREAD_PRIORITY,
|
MQTT_THREAD_PRIORITY,
|
||||||
THREAD_CREATE_STACKTEST, mqtt_riot_run, arg,
|
0, mqtt_riot_run, arg,
|
||||||
"paho_mqtt_riot");
|
"paho_mqtt_riot");
|
||||||
return thread->pid;
|
return thread->pid;
|
||||||
}
|
}
|
||||||
|
@ -834,7 +834,7 @@ int semtech_loramac_init(semtech_loramac_t *mac)
|
|||||||
semtech_loramac_pid = thread_create(_semtech_loramac_stack,
|
semtech_loramac_pid = thread_create(_semtech_loramac_stack,
|
||||||
sizeof(_semtech_loramac_stack),
|
sizeof(_semtech_loramac_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_semtech_loramac_event_loop, mac,
|
_semtech_loramac_event_loop, mac,
|
||||||
"recv_thread");
|
"recv_thread");
|
||||||
|
|
||||||
|
@ -77,9 +77,9 @@ int tinyusb_setup(void)
|
|||||||
sizeof(_tinyusb_thread_stack),
|
sizeof(_tinyusb_thread_stack),
|
||||||
TINYUSB_PRIORITY,
|
TINYUSB_PRIORITY,
|
||||||
#if MODULE_RIOTBOOT_TINYUSB_DFU
|
#if MODULE_RIOTBOOT_TINYUSB_DFU
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
#else
|
#else
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
#endif
|
#endif
|
||||||
_tinyusb_thread_impl, NULL, "tinyusb")) < 0) {
|
_tinyusb_thread_impl, NULL, "tinyusb")) < 0) {
|
||||||
LOG_ERROR("tinyUSB thread couldn't be created, reason %d\n", res);
|
LOG_ERROR("tinyUSB thread couldn't be created, reason %d\n", res);
|
||||||
|
@ -48,7 +48,7 @@ void uwb_core_riot_init(void)
|
|||||||
#if !IS_USED(MODULE_UWB_CORE_EVENT_THREAD)
|
#if !IS_USED(MODULE_UWB_CORE_EVENT_THREAD)
|
||||||
thread_create(_stack_uwb_core, sizeof(_stack_uwb_core),
|
thread_create(_stack_uwb_core, sizeof(_stack_uwb_core),
|
||||||
UWB_CORE_PRIO,
|
UWB_CORE_PRIO,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_uwb_core_thread, NULL,
|
_uwb_core_thread, NULL,
|
||||||
"uwb_core_event");
|
"uwb_core_event");
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,7 +52,7 @@ static void *_wdt_thread(void *ctx)
|
|||||||
static void auto_init_wdt_thread(void)
|
static void auto_init_wdt_thread(void)
|
||||||
{
|
{
|
||||||
thread_create(wdt_stack, sizeof(wdt_stack), THREAD_PRIORITY_MIN,
|
thread_create(wdt_stack, sizeof(wdt_stack), THREAD_PRIORITY_MIN,
|
||||||
THREAD_CREATE_STACKTEST, _wdt_thread, NULL, "watchdog");
|
0, _wdt_thread, NULL, "watchdog");
|
||||||
}
|
}
|
||||||
|
|
||||||
AUTO_INIT(auto_init_wdt_thread, AUTO_INIT_PRIO_WDT_THREAD);
|
AUTO_INIT(auto_init_wdt_thread, AUTO_INIT_PRIO_WDT_THREAD);
|
||||||
|
@ -364,7 +364,7 @@ kernel_pid_t can_device_init(char *stack, int stacksize, char priority,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* create new can device thread */
|
/* create new can device thread */
|
||||||
res = thread_create(stack, stacksize, priority, THREAD_CREATE_STACKTEST,
|
res = thread_create(stack, stacksize, priority, 0,
|
||||||
_can_device_thread, (void *)params, name);
|
_can_device_thread, (void *)params, name);
|
||||||
if (res <= 0) {
|
if (res <= 0) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -732,7 +732,7 @@ kernel_pid_t isotp_init(char *stack, int stacksize, char priority, const char *n
|
|||||||
DEBUG("isotp_init\n");
|
DEBUG("isotp_init\n");
|
||||||
|
|
||||||
/* create new can device thread */
|
/* create new can device thread */
|
||||||
res = thread_create(stack, stacksize, priority, THREAD_CREATE_STACKTEST,
|
res = thread_create(stack, stacksize, priority, 0,
|
||||||
_isotp_thread, NULL, name);
|
_isotp_thread, NULL, name);
|
||||||
if (res <= 0) {
|
if (res <= 0) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -57,7 +57,7 @@ void event_thread_init_multi(event_queue_t *queues, size_t queues_numof,
|
|||||||
|
|
||||||
void *tagged_ptr = ptrtag(queues, queues_numof - 1);
|
void *tagged_ptr = ptrtag(queues, queues_numof - 1);
|
||||||
|
|
||||||
thread_create(stack, stack_size, priority, THREAD_CREATE_STACKTEST,
|
thread_create(stack, stack_size, priority, 0,
|
||||||
_handler_thread, tagged_ptr, "event");
|
_handler_thread, tagged_ptr, "event");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ void fido2_ctap_transport_init(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ret = thread_create(_ctap_stack, sizeof(_ctap_stack), CTAP_TRANSPORT_PRIO,
|
int ret = thread_create(_ctap_stack, sizeof(_ctap_stack), CTAP_TRANSPORT_PRIO,
|
||||||
THREAD_CREATE_STACKTEST, _event_loop, NULL,
|
0, _event_loop, NULL,
|
||||||
"fido2_ctap_transport_loop");
|
"fido2_ctap_transport_loop");
|
||||||
|
|
||||||
(void)ret;
|
(void)ret;
|
||||||
|
@ -648,7 +648,7 @@ void _on_pkt(sock_udp_t *sock, sock_async_flags_t type, void *arg)
|
|||||||
void asymcute_handler_run(void)
|
void asymcute_handler_run(void)
|
||||||
{
|
{
|
||||||
thread_create(_stack, sizeof(_stack), ASYMCUTE_HANDLER_PRIO,
|
thread_create(_stack, sizeof(_stack), ASYMCUTE_HANDLER_PRIO,
|
||||||
THREAD_CREATE_STACKTEST, _eventloop, NULL, "asymcute_main");
|
0, _eventloop, NULL, "asymcute_main");
|
||||||
}
|
}
|
||||||
|
|
||||||
int asymcute_topic_init(asymcute_topic_t *topic, const char *topic_name,
|
int asymcute_topic_init(asymcute_topic_t *topic, const char *topic_name,
|
||||||
|
@ -87,7 +87,7 @@ static void *_reg_runner(void *arg)
|
|||||||
|
|
||||||
void cord_ep_standalone_run(void)
|
void cord_ep_standalone_run(void)
|
||||||
{
|
{
|
||||||
thread_create(_stack, sizeof(_stack), PRIO, THREAD_CREATE_STACKTEST,
|
thread_create(_stack, sizeof(_stack), PRIO, 0,
|
||||||
_reg_runner, NULL, TNAME);
|
_reg_runner, NULL, TNAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ void dhcpv6_client_auto_init(void)
|
|||||||
if (_thread_pid <= 0) {
|
if (_thread_pid <= 0) {
|
||||||
_thread_pid = thread_create(_thread_stack, DHCPV6_CLIENT_STACK_SIZE,
|
_thread_pid = thread_create(_thread_stack, DHCPV6_CLIENT_STACK_SIZE,
|
||||||
DHCPV6_CLIENT_PRIORITY,
|
DHCPV6_CLIENT_PRIORITY,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_thread, NULL, "dhcpv6-client");
|
_thread, NULL, "dhcpv6-client");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ void dhcpv6_relay_auto_init(void)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
thread_create(_auto_init_stack, ARRAY_SIZE(_auto_init_stack),
|
thread_create(_auto_init_stack, ARRAY_SIZE(_auto_init_stack),
|
||||||
AUTO_INIT_PRIO, THREAD_CREATE_STACKTEST,
|
AUTO_INIT_PRIO, 0,
|
||||||
_dhcpv6_relay_auto_init_thread,
|
_dhcpv6_relay_auto_init_thread,
|
||||||
(void *)(intptr_t)netif, "dhcpv6_relay");
|
(void *)(intptr_t)netif, "dhcpv6_relay");
|
||||||
}
|
}
|
||||||
|
@ -1497,7 +1497,7 @@ kernel_pid_t gcoap_init(void)
|
|||||||
return -EEXIST;
|
return -EEXIST;
|
||||||
}
|
}
|
||||||
_pid = thread_create(_msg_stack, sizeof(_msg_stack), THREAD_PRIORITY_MAIN - 1,
|
_pid = thread_create(_msg_stack, sizeof(_msg_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, _event_loop, NULL, "coap");
|
0, _event_loop, NULL, "coap");
|
||||||
|
|
||||||
mutex_init(&_coap_state.lock);
|
mutex_init(&_coap_state.lock);
|
||||||
/* Blank lists so we know if an entry is available. */
|
/* Blank lists so we know if an entry is available. */
|
||||||
|
@ -1024,7 +1024,7 @@ kernel_pid_t nanocoap_server_start(const sock_udp_ep_t *local)
|
|||||||
return _coap_server_pid;
|
return _coap_server_pid;
|
||||||
}
|
}
|
||||||
_coap_server_pid = thread_create(stack, sizeof(stack), THREAD_PRIORITY_MAIN - 1,
|
_coap_server_pid = thread_create(stack, sizeof(stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, _nanocoap_server_thread,
|
0, _nanocoap_server_thread,
|
||||||
(void *)local, "nanoCoAP server");
|
(void *)local, "nanoCoAP server");
|
||||||
return _coap_server_pid;
|
return _coap_server_pid;
|
||||||
}
|
}
|
||||||
|
@ -340,7 +340,7 @@ int telnet_server_start(void)
|
|||||||
|
|
||||||
/* initiate telnet server */
|
/* initiate telnet server */
|
||||||
thread_create(telnet_stack, sizeof(telnet_stack),
|
thread_create(telnet_stack, sizeof(telnet_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
telnet_thread, NULL, "telnet");
|
telnet_thread, NULL, "telnet");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -154,7 +154,7 @@ void gnrc_dhcpv6_client_simple_pd_init(void)
|
|||||||
/* start DHCPv6 client thread to request prefix for WPAN */
|
/* start DHCPv6 client thread to request prefix for WPAN */
|
||||||
thread_create(_stack, DHCPV6_CLIENT_STACK_SIZE,
|
thread_create(_stack, DHCPV6_CLIENT_STACK_SIZE,
|
||||||
DHCPV6_CLIENT_PRIORITY,
|
DHCPV6_CLIENT_PRIORITY,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_dhcpv6_cl_simple_pd_thread, NULL, "dhcpv6-client");
|
_dhcpv6_cl_simple_pd_thread, NULL, "dhcpv6-client");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,6 +111,6 @@ void auto_init_gnrc_uhcpc(void)
|
|||||||
|
|
||||||
/* initiate uhcp client */
|
/* initiate uhcp client */
|
||||||
thread_create(_uhcp_client_stack, sizeof(_uhcp_client_stack),
|
thread_create(_uhcp_client_stack, sizeof(_uhcp_client_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
uhcp_client_thread, NULL, "uhcp");
|
uhcp_client_thread, NULL, "uhcp");
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ int gnrc_netif_create(gnrc_netif_t *netif, char *stack, int stacksize,
|
|||||||
mutex_init(&ctx.init_done);
|
mutex_init(&ctx.init_done);
|
||||||
mutex_lock(&ctx.init_done);
|
mutex_lock(&ctx.init_done);
|
||||||
|
|
||||||
res = thread_create(stack, stacksize, priority, THREAD_CREATE_STACKTEST,
|
res = thread_create(stack, stacksize, priority, 0,
|
||||||
_gnrc_netif_thread, &ctx, name);
|
_gnrc_netif_thread, &ctx, name);
|
||||||
assert(res > 0);
|
assert(res > 0);
|
||||||
(void)res;
|
(void)res;
|
||||||
|
@ -85,7 +85,7 @@ kernel_pid_t gnrc_ipv6_init(void)
|
|||||||
{
|
{
|
||||||
if (gnrc_ipv6_pid == KERNEL_PID_UNDEF) {
|
if (gnrc_ipv6_pid == KERNEL_PID_UNDEF) {
|
||||||
gnrc_ipv6_pid = thread_create(_stack, sizeof(_stack), GNRC_IPV6_PRIO,
|
gnrc_ipv6_pid = thread_create(_stack, sizeof(_stack), GNRC_IPV6_PRIO,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_event_loop, NULL, "ipv6");
|
_event_loop, NULL, "ipv6");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ kernel_pid_t gnrc_sixlowpan_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_pid = thread_create(_stack, sizeof(_stack), GNRC_SIXLOWPAN_PRIO,
|
_pid = thread_create(_stack, sizeof(_stack), GNRC_SIXLOWPAN_PRIO,
|
||||||
THREAD_CREATE_STACKTEST, _event_loop, NULL, "6lo");
|
0, _event_loop, NULL, "6lo");
|
||||||
|
|
||||||
return _pid;
|
return _pid;
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ kernel_pid_t gnrc_pktdump_init(void)
|
|||||||
{
|
{
|
||||||
if (gnrc_pktdump_pid == KERNEL_PID_UNDEF) {
|
if (gnrc_pktdump_pid == KERNEL_PID_UNDEF) {
|
||||||
gnrc_pktdump_pid = thread_create(_stack, sizeof(_stack), GNRC_PKTDUMP_PRIO,
|
gnrc_pktdump_pid = thread_create(_stack, sizeof(_stack), GNRC_PKTDUMP_PRIO,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_eventloop, NULL, "pktdump");
|
_eventloop, NULL, "pktdump");
|
||||||
}
|
}
|
||||||
return gnrc_pktdump_pid;
|
return gnrc_pktdump_pid;
|
||||||
|
@ -714,7 +714,7 @@ void gnrc_ipv6_auto_subnets_init(void)
|
|||||||
{
|
{
|
||||||
/* initiate auto_subnets thread */
|
/* initiate auto_subnets thread */
|
||||||
_server_pid = thread_create(auto_subnets_stack, sizeof(auto_subnets_stack),
|
_server_pid = thread_create(auto_subnets_stack, sizeof(auto_subnets_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
_eventloop, NULL, "auto_subnets");
|
_eventloop, NULL, "auto_subnets");
|
||||||
}
|
}
|
||||||
#endif /* !IS_USED(MODULE_GNRC_IPV6_AUTO_SUBNETS_SIMPLE) */
|
#endif /* !IS_USED(MODULE_GNRC_IPV6_AUTO_SUBNETS_SIMPLE) */
|
||||||
|
@ -87,7 +87,7 @@ kernel_pid_t gnrc_rpl_init(kernel_pid_t if_pid)
|
|||||||
_instance_id = 0;
|
_instance_id = 0;
|
||||||
/* start the event loop */
|
/* start the event loop */
|
||||||
gnrc_rpl_pid = thread_create(_stack, sizeof(_stack), GNRC_RPL_PRIO,
|
gnrc_rpl_pid = thread_create(_stack, sizeof(_stack), GNRC_RPL_PRIO,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_event_loop, (void*)&eventloop_startup,
|
_event_loop, (void*)&eventloop_startup,
|
||||||
"RPL");
|
"RPL");
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ int _gnrc_tcp_eventloop_init(void)
|
|||||||
evtimer_init_msg(&_tcp_msg_timer);
|
evtimer_init_msg(&_tcp_msg_timer);
|
||||||
|
|
||||||
kernel_pid_t pid = thread_create(_stack, sizeof(_stack), TCP_EVENTLOOP_PRIO,
|
kernel_pid_t pid = thread_create(_stack, sizeof(_stack), TCP_EVENTLOOP_PRIO,
|
||||||
THREAD_CREATE_STACKTEST, _eventloop, NULL,
|
0, _eventloop, NULL,
|
||||||
"gnrc_tcp");
|
"gnrc_tcp");
|
||||||
TCP_DEBUG_LEAVE;
|
TCP_DEBUG_LEAVE;
|
||||||
return pid;
|
return pid;
|
||||||
|
@ -303,7 +303,7 @@ int gnrc_udp_init(void)
|
|||||||
if (_pid == KERNEL_PID_UNDEF) {
|
if (_pid == KERNEL_PID_UNDEF) {
|
||||||
/* start UDP thread */
|
/* start UDP thread */
|
||||||
_pid = thread_create(_stack, sizeof(_stack), GNRC_UDP_PRIO,
|
_pid = thread_create(_stack, sizeof(_stack), GNRC_UDP_PRIO,
|
||||||
THREAD_CREATE_STACKTEST, _event_loop, NULL, "udp");
|
0, _event_loop, NULL, "udp");
|
||||||
}
|
}
|
||||||
return _pid;
|
return _pid;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ int pthread_create(pthread_t *newthread, const pthread_attr_t *attr, void *(*sta
|
|||||||
volatile kernel_pid_t pid = thread_create(pthread_reaper_stack,
|
volatile kernel_pid_t pid = thread_create(pthread_reaper_stack,
|
||||||
PTHREAD_REAPER_STACKSIZE,
|
PTHREAD_REAPER_STACKSIZE,
|
||||||
0,
|
0,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
pthread_reaper,
|
pthread_reaper,
|
||||||
NULL,
|
NULL,
|
||||||
"pthread-reaper");
|
"pthread-reaper");
|
||||||
@ -176,7 +176,7 @@ int pthread_create(pthread_t *newthread, const pthread_attr_t *attr, void *(*sta
|
|||||||
stack_size,
|
stack_size,
|
||||||
THREAD_PRIORITY_MAIN,
|
THREAD_PRIORITY_MAIN,
|
||||||
THREAD_CREATE_SLEEPING |
|
THREAD_CREATE_SLEEPING |
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
pthread_start_routine,
|
pthread_start_routine,
|
||||||
pt,
|
pt,
|
||||||
"pthread");
|
"pthread");
|
||||||
|
@ -220,7 +220,7 @@ void suit_worker_trigger(const char *url, size_t len)
|
|||||||
_url[len] = '\0';
|
_url[len] = '\0';
|
||||||
|
|
||||||
_worker_pid = thread_create(_stack, SUIT_WORKER_STACKSIZE, SUIT_COAP_WORKER_PRIO,
|
_worker_pid = thread_create(_stack, SUIT_WORKER_STACKSIZE, SUIT_COAP_WORKER_PRIO,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_suit_worker_thread, NULL, "suit worker");
|
_suit_worker_thread, NULL, "suit worker");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ void suit_worker_trigger_prepared(const uint8_t *buffer, size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_worker_pid = thread_create(_stack, SUIT_WORKER_STACKSIZE, SUIT_COAP_WORKER_PRIO,
|
_worker_pid = thread_create(_stack, SUIT_WORKER_STACKSIZE, SUIT_COAP_WORKER_PRIO,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_suit_worker_thread, NULL, "suit worker");
|
_suit_worker_thread, NULL, "suit worker");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,10 +171,10 @@ int benchmark_udp_start(const char *server, uint16_t port)
|
|||||||
|
|
||||||
running = true;
|
running = true;
|
||||||
thread_create(listen_thread_stack, sizeof(listen_thread_stack),
|
thread_create(listen_thread_stack, sizeof(listen_thread_stack),
|
||||||
THREAD_PRIORITY_MAIN - 2, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 2, 0,
|
||||||
_listen_thread, NULL, "UDP receiver");
|
_listen_thread, NULL, "UDP receiver");
|
||||||
thread_create(send_thread_stack, sizeof(send_thread_stack),
|
thread_create(send_thread_stack, sizeof(send_thread_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
_send_thread, &remote, "UDP sender");
|
_send_thread, &remote, "UDP sender");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -50,8 +50,6 @@ void dummy_thread_create(void)
|
|||||||
{
|
{
|
||||||
thread_create(_dummy_stack, sizeof(_dummy_stack),
|
thread_create(_dummy_stack, sizeof(_dummy_stack),
|
||||||
THREAD_PRIORITY_IDLE,
|
THREAD_PRIORITY_IDLE,
|
||||||
THREAD_CREATE_WOUT_YIELD \
|
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_SLEEPING,
|
||||||
| THREAD_CREATE_STACKTEST \
|
|
||||||
| THREAD_CREATE_SLEEPING,
|
|
||||||
_dummy_thread, NULL, "dummy");
|
_dummy_thread, NULL, "dummy");
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ void usbus_init(usbus_t *usbus, usbdev_t *usbdev)
|
|||||||
void usbus_create(char *stack, int stacksize, char priority,
|
void usbus_create(char *stack, int stacksize, char priority,
|
||||||
const char *name, usbus_t *usbus)
|
const char *name, usbus_t *usbus)
|
||||||
{
|
{
|
||||||
int res = thread_create(stack, stacksize, priority, THREAD_CREATE_STACKTEST,
|
int res = thread_create(stack, stacksize, priority, 0,
|
||||||
_usbus_thread, (void *)usbus, name);
|
_usbus_thread, (void *)usbus, name);
|
||||||
|
|
||||||
(void)res;
|
(void)res;
|
||||||
|
@ -59,7 +59,7 @@ int main(void)
|
|||||||
kernel_pid_t other = thread_create(_stack,
|
kernel_pid_t other = thread_create(_stack,
|
||||||
sizeof(_stack),
|
sizeof(_stack),
|
||||||
(THREAD_PRIORITY_MAIN - 1),
|
(THREAD_PRIORITY_MAIN - 1),
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_second_thread,
|
_second_thread,
|
||||||
NULL,
|
NULL,
|
||||||
"second_thread");
|
"second_thread");
|
||||||
|
@ -59,7 +59,7 @@ int main(void)
|
|||||||
thread_create(_stack,
|
thread_create(_stack,
|
||||||
sizeof(_stack),
|
sizeof(_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
_second_thread,
|
_second_thread,
|
||||||
NULL,
|
NULL,
|
||||||
"second_thread");
|
"second_thread");
|
||||||
|
@ -58,7 +58,7 @@ int main(void)
|
|||||||
kernel_pid_t other = thread_create(_stack,
|
kernel_pid_t other = thread_create(_stack,
|
||||||
sizeof(_stack),
|
sizeof(_stack),
|
||||||
(THREAD_PRIORITY_MAIN - 1),
|
(THREAD_PRIORITY_MAIN - 1),
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_second_thread,
|
_second_thread,
|
||||||
NULL,
|
NULL,
|
||||||
"second_thread");
|
"second_thread");
|
||||||
|
@ -57,7 +57,7 @@ int main(void)
|
|||||||
thread_create(_stack,
|
thread_create(_stack,
|
||||||
sizeof(_stack),
|
sizeof(_stack),
|
||||||
THREAD_PRIORITY_MAIN,
|
THREAD_PRIORITY_MAIN,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_second_thread,
|
_second_thread,
|
||||||
NULL,
|
NULL,
|
||||||
"second_thread");
|
"second_thread");
|
||||||
|
@ -160,7 +160,7 @@ int main(void)
|
|||||||
/* create and trigger first background thread */
|
/* create and trigger first background thread */
|
||||||
kernel_pid_t pid1 = thread_create(slacker_stack1, sizeof(slacker_stack1),
|
kernel_pid_t pid1 = thread_create(slacker_stack1, sizeof(slacker_stack1),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
slacker_thread, NULL, "slacker1");
|
slacker_thread, NULL, "slacker1");
|
||||||
|
|
||||||
LOG_DEBUG("+ msg 1");
|
LOG_DEBUG("+ msg 1");
|
||||||
@ -174,7 +174,7 @@ int main(void)
|
|||||||
/* create and trigger second background thread */
|
/* create and trigger second background thread */
|
||||||
kernel_pid_t pid2 = thread_create(slacker_stack2, sizeof(slacker_stack2),
|
kernel_pid_t pid2 = thread_create(slacker_stack2, sizeof(slacker_stack2),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
slacker_thread, NULL, "slacker2");
|
slacker_thread, NULL, "slacker2");
|
||||||
|
|
||||||
LOG_DEBUG("+ msg 3");
|
LOG_DEBUG("+ msg 3");
|
||||||
@ -188,7 +188,7 @@ int main(void)
|
|||||||
/* create and trigger worker thread */
|
/* create and trigger worker thread */
|
||||||
kernel_pid_t pid3 = thread_create(worker_stack, sizeof(worker_stack),
|
kernel_pid_t pid3 = thread_create(worker_stack, sizeof(worker_stack),
|
||||||
THREAD_PRIORITY_MAIN - 2,
|
THREAD_PRIORITY_MAIN - 2,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
worker_thread, NULL, "worker");
|
worker_thread, NULL, "worker");
|
||||||
|
|
||||||
printf("TEST_HZ=%lu\n", TEST_HZ);
|
printf("TEST_HZ=%lu\n", TEST_HZ);
|
||||||
|
@ -37,7 +37,7 @@ int main(void)
|
|||||||
thread_create(
|
thread_create(
|
||||||
t2_stack, sizeof(t2_stack),
|
t2_stack, sizeof(t2_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
second_thread, NULL, "nr2");
|
second_thread, NULL, "nr2");
|
||||||
|
|
||||||
irq_disable();
|
irq_disable();
|
||||||
|
@ -61,7 +61,7 @@ int main(void)
|
|||||||
(void)thread_create(
|
(void)thread_create(
|
||||||
t2_stack, sizeof(t2_stack),
|
t2_stack, sizeof(t2_stack),
|
||||||
THREAD_PRIORITY_MAIN,
|
THREAD_PRIORITY_MAIN,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
second_thread, NULL, "nr2");
|
second_thread, NULL, "nr2");
|
||||||
|
|
||||||
while (xtimer_now_usec() < (TEST_TIME + start_time)) {}
|
while (xtimer_now_usec() < (TEST_TIME + start_time)) {}
|
||||||
|
@ -56,7 +56,7 @@ int main(void)
|
|||||||
kernel_pid_t second_pid = thread_create(stack,
|
kernel_pid_t second_pid = thread_create(stack,
|
||||||
sizeof(stack),
|
sizeof(stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
second_thread,
|
second_thread,
|
||||||
NULL,
|
NULL,
|
||||||
"second_thread");
|
"second_thread");
|
||||||
|
@ -86,10 +86,10 @@ static void *t3_func(void *unused)
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
|
thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_STACKTEST, t2_func, NULL, "t2");
|
0, t2_func, NULL, "t2");
|
||||||
|
|
||||||
t3_pid = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN - 1,
|
t3_pid = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, t3_func, NULL, "t3");
|
0, t3_func, NULL, "t3");
|
||||||
|
|
||||||
puts("[main] Use shell command \"nice\" to increase prio of t3.\n"
|
puts("[main] Use shell command \"nice\" to increase prio of t3.\n"
|
||||||
"[main] If it works, it will run again. The \"hint\" cmd can be useful.");
|
"[main] If it works, it will run again. The \"hint\" cmd can be useful.");
|
||||||
|
@ -35,7 +35,7 @@ int main(void)
|
|||||||
(void) thread_create(
|
(void) thread_create(
|
||||||
t2_stack, sizeof(t2_stack),
|
t2_stack, sizeof(t2_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
second_thread, NULL, "nr2");
|
second_thread, NULL, "nr2");
|
||||||
puts("first thread\n");
|
puts("first thread\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -78,7 +78,7 @@ int main(void)
|
|||||||
printf("MAIN: create thread, arg: %d\n", arg);
|
printf("MAIN: create thread, arg: %d\n", arg);
|
||||||
ths = thread_create(stacks[i], sizeof(stacks[i]),
|
ths = thread_create(stacks[i], sizeof(stacks[i]),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
run, NULL, "thread");
|
run, NULL, "thread");
|
||||||
|
|
||||||
if (ths < 0) {
|
if (ths < 0) {
|
||||||
|
@ -50,7 +50,7 @@ void *second_thread(void *arg)
|
|||||||
third_thread_stack,
|
third_thread_stack,
|
||||||
sizeof(third_thread_stack),
|
sizeof(third_thread_stack),
|
||||||
THREAD_PRIORITY_MAIN - 2,
|
THREAD_PRIORITY_MAIN - 2,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
third_thread,
|
third_thread,
|
||||||
NULL,
|
NULL,
|
||||||
"nr3")
|
"nr3")
|
||||||
@ -64,7 +64,7 @@ void *second_thread(void *arg)
|
|||||||
third_thread_stack,
|
third_thread_stack,
|
||||||
sizeof(third_thread_stack),
|
sizeof(third_thread_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
fourth_thread,
|
fourth_thread,
|
||||||
NULL,
|
NULL,
|
||||||
"nr4")
|
"nr4")
|
||||||
@ -84,7 +84,7 @@ int main(void)
|
|||||||
second_thread_stack,
|
second_thread_stack,
|
||||||
sizeof(second_thread_stack),
|
sizeof(second_thread_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
second_thread,
|
second_thread,
|
||||||
NULL,
|
NULL,
|
||||||
"nr2")
|
"nr2")
|
||||||
|
@ -74,7 +74,7 @@ int main(void)
|
|||||||
kernel_pid_t pid = thread_create(stack,
|
kernel_pid_t pid = thread_create(stack,
|
||||||
sizeof(stack),
|
sizeof(stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_thread,
|
_thread,
|
||||||
NULL,
|
NULL,
|
||||||
"second_thread");
|
"second_thread");
|
||||||
|
@ -94,13 +94,13 @@ int main(void)
|
|||||||
timeout = 50000000000U / coreclk();
|
timeout = 50000000000U / coreclk();
|
||||||
|
|
||||||
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN + 1,
|
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
thread_1_2_3, (void *)t1_name, t1_name);
|
thread_1_2_3, (void *)t1_name, t1_name);
|
||||||
p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
|
p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
thread_1_2_3, (void *)t2_name, t2_name);
|
thread_1_2_3, (void *)t2_name, t2_name);
|
||||||
p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN + 1,
|
p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
thread_1_2_3, (void *)t3_name, t3_name);
|
thread_1_2_3, (void *)t3_name, t3_name);
|
||||||
puts("THREADS CREATED\n");
|
puts("THREADS CREATED\n");
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ int main(void)
|
|||||||
thr_id = thread_create(
|
thr_id = thread_create(
|
||||||
dummy_stack, sizeof(dummy_stack),
|
dummy_stack, sizeof(dummy_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_SLEEPING | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_SLEEPING,
|
||||||
thread_func, NULL, "dummy");
|
thread_func, NULL, "dummy");
|
||||||
++thr_cnt;
|
++thr_cnt;
|
||||||
printf(".");
|
printf(".");
|
||||||
|
@ -87,13 +87,13 @@ int main(void)
|
|||||||
{
|
{
|
||||||
p_main = thread_getpid();
|
p_main = thread_getpid();
|
||||||
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
thread1, NULL, "nr1");
|
thread1, NULL, "nr1");
|
||||||
p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN - 1,
|
p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
thread2, NULL, "nr2");
|
thread2, NULL, "nr2");
|
||||||
p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN - 1,
|
p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
thread3, NULL, "nr3");
|
thread3, NULL, "nr3");
|
||||||
puts("THREADS CREATED\n");
|
puts("THREADS CREATED\n");
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ int main(void)
|
|||||||
"sched_run() which was the cause of the bug tested here");
|
"sched_run() which was the cause of the bug tested here");
|
||||||
_sched_next();
|
_sched_next();
|
||||||
pid = thread_create(_stack, sizeof(_stack), THREAD_PRIORITY_MAIN + 1,
|
pid = thread_create(_stack, sizeof(_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
_thread, NULL, "nr2");
|
_thread, NULL, "nr2");
|
||||||
expect(pid != KERNEL_PID_UNDEF);
|
expect(pid != KERNEL_PID_UNDEF);
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ int main(void)
|
|||||||
msg_init_queue(_msg_q, 1);
|
msg_init_queue(_msg_q, 1);
|
||||||
|
|
||||||
p_send = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
p_send = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
sender_thread, NULL, "nr1");
|
sender_thread, NULL, "nr1");
|
||||||
|
|
||||||
/* step 3: receive first msg from sender_thread*/
|
/* step 3: receive first msg from sender_thread*/
|
||||||
|
@ -58,7 +58,7 @@ int main(void)
|
|||||||
p_recv = thread_getpid();
|
p_recv = thread_getpid();
|
||||||
|
|
||||||
p_send = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
p_send = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
thread1, NULL, "nr1");
|
thread1, NULL, "nr1");
|
||||||
|
|
||||||
/* step 3: receive first msg from sender_thread*/
|
/* step 3: receive first msg from sender_thread*/
|
||||||
|
@ -108,11 +108,11 @@ int main(void)
|
|||||||
|
|
||||||
p_main = thread_getpid();
|
p_main = thread_getpid();
|
||||||
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 3,
|
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 3,
|
||||||
THREAD_CREATE_STACKTEST, thread1, &my_bus, "nr1");
|
0, thread1, &my_bus, "nr1");
|
||||||
p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN - 2,
|
p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN - 2,
|
||||||
THREAD_CREATE_STACKTEST, thread2, &my_bus, "nr2");
|
0, thread2, &my_bus, "nr2");
|
||||||
p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN - 1,
|
p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, thread3, &my_bus, "nr3");
|
0, thread3, &my_bus, "nr3");
|
||||||
puts("THREADS CREATED");
|
puts("THREADS CREATED");
|
||||||
|
|
||||||
const char hello[] = "Hello Threads!";
|
const char hello[] = "Hello Threads!";
|
||||||
|
@ -56,13 +56,13 @@ int main(void)
|
|||||||
p_main = thread_getpid();
|
p_main = thread_getpid();
|
||||||
|
|
||||||
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, sub_thread, "nr1", "nr1");
|
0, sub_thread, "nr1", "nr1");
|
||||||
|
|
||||||
p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN - 1,
|
p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, sub_thread, "nr2", "nr2");
|
0, sub_thread, "nr2", "nr2");
|
||||||
|
|
||||||
p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN - 1,
|
p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, sub_thread, "nr3", "nr3");
|
0, sub_thread, "nr3", "nr3");
|
||||||
puts("THREADS CREATED\n");
|
puts("THREADS CREATED\n");
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
|
@ -150,15 +150,15 @@ static void *high_handler(void *arg)
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
thread_create(stack_low, sizeof(stack_low),
|
thread_create(stack_low, sizeof(stack_low),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
low_handler, NULL, "low");
|
low_handler, NULL, "low");
|
||||||
|
|
||||||
thread_create(stack_mid, sizeof(stack_mid),
|
thread_create(stack_mid, sizeof(stack_mid),
|
||||||
THREAD_PRIORITY_MAIN - 2, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 2, 0,
|
||||||
mid_handler, NULL, "mid");
|
mid_handler, NULL, "mid");
|
||||||
|
|
||||||
thread_create(stack_high, sizeof(stack_high),
|
thread_create(stack_high, sizeof(stack_high),
|
||||||
THREAD_PRIORITY_MAIN - 3, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 3, 0,
|
||||||
high_handler, NULL, "high");
|
high_handler, NULL, "high");
|
||||||
|
|
||||||
/* Start low priority thread first, which will start high and mid priority ones after the
|
/* Start low priority thread first, which will start high and mid priority ones after the
|
||||||
|
@ -83,7 +83,7 @@ int main(void)
|
|||||||
printf("Testing for alignment %" PRIuSIZE ": ", i);
|
printf("Testing for alignment %" PRIuSIZE ": ", i);
|
||||||
kernel_pid_t p;
|
kernel_pid_t p;
|
||||||
p = thread_create(stack + i, STACKSIZE, THREAD_PRIORITY_MAIN - 1,
|
p = thread_create(stack + i, STACKSIZE, THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
thread_func, NULL, "test");
|
thread_func, NULL, "test");
|
||||||
/* we expect that the new thread is scheduled to directly after it is
|
/* we expect that the new thread is scheduled to directly after it is
|
||||||
* created and this will only continue one the thread has terminated.
|
* created and this will only continue one the thread has terminated.
|
||||||
|
@ -55,7 +55,7 @@ int main(void)
|
|||||||
kernel_pid_t first_pid = thread_create(
|
kernel_pid_t first_pid = thread_create(
|
||||||
t2_stack, sizeof(t2_stack),
|
t2_stack, sizeof(t2_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_SLEEPING | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_SLEEPING,
|
||||||
second_thread, (void *)1, "nr1");
|
second_thread, (void *)1, "nr1");
|
||||||
|
|
||||||
#ifdef MODULE_PS
|
#ifdef MODULE_PS
|
||||||
@ -67,7 +67,7 @@ int main(void)
|
|||||||
kernel_pid_t second_pid = thread_create(
|
kernel_pid_t second_pid = thread_create(
|
||||||
t3_stack, sizeof(t3_stack),
|
t3_stack, sizeof(t3_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_SLEEPING | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_SLEEPING,
|
||||||
second_thread, (void *)2, "nr2");
|
second_thread, (void *)2, "nr2");
|
||||||
#ifdef MODULE_PS
|
#ifdef MODULE_PS
|
||||||
ps();
|
ps();
|
||||||
@ -78,7 +78,7 @@ int main(void)
|
|||||||
kernel_pid_t third_pid = thread_create(
|
kernel_pid_t third_pid = thread_create(
|
||||||
t4_stack, sizeof(t4_stack),
|
t4_stack, sizeof(t4_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_SLEEPING | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_SLEEPING,
|
||||||
second_thread, (void *)3, "nr3");
|
second_thread, (void *)3, "nr3");
|
||||||
#ifdef MODULE_PS
|
#ifdef MODULE_PS
|
||||||
ps();
|
ps();
|
||||||
@ -217,7 +217,7 @@ int main(void)
|
|||||||
kernel_pid_t last_pid = thread_create(
|
kernel_pid_t last_pid = thread_create(
|
||||||
t2_stack, sizeof(t2_stack),
|
t2_stack, sizeof(t2_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_SLEEPING | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_SLEEPING,
|
||||||
second_thread, (void *)4, "nr4");
|
second_thread, (void *)4, "nr4");
|
||||||
|
|
||||||
#ifdef MODULE_PS
|
#ifdef MODULE_PS
|
||||||
|
@ -169,7 +169,7 @@ int test_init(void)
|
|||||||
{
|
{
|
||||||
/* create battery monitor thread */
|
/* create battery monitor thread */
|
||||||
thread_create(batmon_stack, sizeof(batmon_stack), THREAD_PRIORITY_MAIN - 1,
|
thread_create(batmon_stack, sizeof(batmon_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, batmon_thread, NULL, "batmon");
|
0, batmon_thread, NULL, "batmon");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ int main(void)
|
|||||||
|
|
||||||
/* create battery monitor thread */
|
/* create battery monitor thread */
|
||||||
thread_create(batmon_stack, sizeof(batmon_stack), THREAD_PRIORITY_MAIN - 1,
|
thread_create(batmon_stack, sizeof(batmon_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, batmon_thread, NULL, "batmon");
|
0, batmon_thread, NULL, "batmon");
|
||||||
|
|
||||||
/* start the shell */
|
/* start the shell */
|
||||||
puts("Initialization successful - starting the shell now");
|
puts("Initialization successful - starting the shell now");
|
||||||
|
@ -367,7 +367,7 @@ int main(void)
|
|||||||
|
|
||||||
/* processing lis2dh12 acceleration data */
|
/* processing lis2dh12 acceleration data */
|
||||||
thread_create(lis2dh12_process_stack, sizeof(lis2dh12_process_stack),
|
thread_create(lis2dh12_process_stack, sizeof(lis2dh12_process_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
lis2dh12_test_process, NULL, "lis2dh12_process");
|
lis2dh12_test_process, NULL, "lis2dh12_process");
|
||||||
#endif /* MODULE_LIS2DH12_INT */
|
#endif /* MODULE_LIS2DH12_INT */
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ int main(void)
|
|||||||
|
|
||||||
/* Start the thread that will keep the MCU busy */
|
/* Start the thread that will keep the MCU busy */
|
||||||
thread_create(busy_thread_stack, sizeof(busy_thread_stack),
|
thread_create(busy_thread_stack, sizeof(busy_thread_stack),
|
||||||
THREAD_PRIORITY_MAIN + 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN + 1, 0,
|
||||||
busy_thread, NULL, "busy_thread");
|
busy_thread, NULL, "busy_thread");
|
||||||
|
|
||||||
print_str("This test will put three levels of load on the MCU:\n"
|
print_str("This test will put three levels of load on the MCU:\n"
|
||||||
|
@ -82,7 +82,7 @@ int main(void)
|
|||||||
#else
|
#else
|
||||||
thread_create(
|
thread_create(
|
||||||
pir_handler_stack, sizeof(pir_handler_stack), THREAD_PRIORITY_MAIN - 1,
|
pir_handler_stack, sizeof(pir_handler_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
pir_handler, NULL, "pir_handler");
|
pir_handler, NULL, "pir_handler");
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -334,7 +334,7 @@ int main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_recv_pid = thread_create(stack, sizeof(stack), THREAD_PRIORITY_MAIN - 1,
|
_recv_pid = thread_create(stack, sizeof(stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, _recv_thread, netdev,
|
0, _recv_thread, netdev,
|
||||||
"recv_thread");
|
"recv_thread");
|
||||||
|
|
||||||
if (_recv_pid <= KERNEL_PID_UNDEF) {
|
if (_recv_pid <= KERNEL_PID_UNDEF) {
|
||||||
|
@ -553,7 +553,7 @@ int main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_recv_pid = thread_create(stack, sizeof(stack), THREAD_PRIORITY_MAIN - 1,
|
_recv_pid = thread_create(stack, sizeof(stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, _recv_thread, NULL,
|
0, _recv_thread, NULL,
|
||||||
"recv_thread");
|
"recv_thread");
|
||||||
|
|
||||||
if (_recv_pid <= KERNEL_PID_UNDEF) {
|
if (_recv_pid <= KERNEL_PID_UNDEF) {
|
||||||
|
@ -364,7 +364,7 @@ int main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_recv_pid = thread_create(stack, sizeof(stack), THREAD_PRIORITY_MAIN - 1,
|
_recv_pid = thread_create(stack, sizeof(stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, _recv_thread, netdev,
|
0, _recv_thread, netdev,
|
||||||
"recv_thread");
|
"recv_thread");
|
||||||
|
|
||||||
if (_recv_pid <= KERNEL_PID_UNDEF) {
|
if (_recv_pid <= KERNEL_PID_UNDEF) {
|
||||||
|
@ -59,7 +59,7 @@ int main(void)
|
|||||||
|
|
||||||
_gnrc_netif_config(0, NULL);
|
_gnrc_netif_config(0, NULL);
|
||||||
thread_create(_dhcpv6_client_stack, DHCPV6_CLIENT_STACK_SIZE,
|
thread_create(_dhcpv6_client_stack, DHCPV6_CLIENT_STACK_SIZE,
|
||||||
DHCPV6_CLIENT_PRIORITY, THREAD_CREATE_STACKTEST,
|
DHCPV6_CLIENT_PRIORITY, 0,
|
||||||
_dhcpv6_client_thread, NULL, "dhcpv6-client");
|
_dhcpv6_client_thread, NULL, "dhcpv6-client");
|
||||||
xtimer_sleep(5);
|
xtimer_sleep(5);
|
||||||
/* global address should now be configured */
|
/* global address should now be configured */
|
||||||
|
@ -95,7 +95,7 @@ int main(void)
|
|||||||
/* create worker thread */
|
/* create worker thread */
|
||||||
kernel_pid_t pid = thread_create(worker_stack, sizeof(worker_stack),
|
kernel_pid_t pid = thread_create(worker_stack, sizeof(worker_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
worker_thread, NULL, "worker");
|
worker_thread, NULL, "worker");
|
||||||
|
|
||||||
timeout_1 = -1;
|
timeout_1 = -1;
|
||||||
|
@ -66,7 +66,7 @@ static void _add_delayed_addr(gnrc_netif_t *netif)
|
|||||||
memset(adder_stack, 0, sizeof(adder_stack));
|
memset(adder_stack, 0, sizeof(adder_stack));
|
||||||
thread_create(adder_stack, sizeof(adder_stack),
|
thread_create(adder_stack, sizeof(adder_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_adder_thread, netif, "add_addr");
|
_adder_thread, netif, "add_addr");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ static void start_server(char *port_str)
|
|||||||
if (server_pid <= KERNEL_PID_UNDEF) {
|
if (server_pid <= KERNEL_PID_UNDEF) {
|
||||||
/* start server */
|
/* start server */
|
||||||
server_pid = thread_create(server_stack, sizeof(server_stack), SERVER_PRIO,
|
server_pid = thread_create(server_stack, sizeof(server_stack), SERVER_PRIO,
|
||||||
THREAD_CREATE_STACKTEST, _eventloop, NULL, "UDP server");
|
0, _eventloop, NULL, "UDP server");
|
||||||
if (server_pid <= KERNEL_PID_UNDEF) {
|
if (server_pid <= KERNEL_PID_UNDEF) {
|
||||||
puts("Error: can not start server thread");
|
puts("Error: can not start server thread");
|
||||||
return;
|
return;
|
||||||
|
@ -115,7 +115,7 @@ int main(void)
|
|||||||
msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE);
|
msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE);
|
||||||
|
|
||||||
thread_create(server_thread_stack, sizeof(server_thread_stack),
|
thread_create(server_thread_stack, sizeof(server_thread_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
server_thread, NULL, "UDP echo server");
|
server_thread, NULL, "UDP echo server");
|
||||||
|
|
||||||
char line_buf[SHELL_DEFAULT_BUFSIZE];
|
char line_buf[SHELL_DEFAULT_BUFSIZE];
|
||||||
|
@ -167,7 +167,7 @@ static int ip_send(char *addr_str, char *port_str, char *data, unsigned int num,
|
|||||||
static int ip_start_server(char *port_str)
|
static int ip_start_server(char *port_str)
|
||||||
{
|
{
|
||||||
if (thread_create(server_stack, sizeof(server_stack), THREAD_PRIORITY_MAIN - 1,
|
if (thread_create(server_stack, sizeof(server_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, _server_thread, port_str,
|
0, _server_thread, port_str,
|
||||||
"IP server") <= KERNEL_PID_UNDEF) {
|
"IP server") <= KERNEL_PID_UNDEF) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ static int tcp_send(char *data, unsigned int num, unsigned int delay)
|
|||||||
static int tcp_start_server(char *port_str)
|
static int tcp_start_server(char *port_str)
|
||||||
{
|
{
|
||||||
if (thread_create(server_stack, sizeof(server_stack), THREAD_PRIORITY_MAIN - 1,
|
if (thread_create(server_stack, sizeof(server_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, _server_thread, port_str,
|
0, _server_thread, port_str,
|
||||||
"TCP server") <= KERNEL_PID_UNDEF) {
|
"TCP server") <= KERNEL_PID_UNDEF) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ static int udp_send(char *addr_str, char *data, unsigned int num,
|
|||||||
static int udp_start_server(char *port_str)
|
static int udp_start_server(char *port_str)
|
||||||
{
|
{
|
||||||
if (thread_create(server_stack, sizeof(server_stack), THREAD_PRIORITY_MAIN - 1,
|
if (thread_create(server_stack, sizeof(server_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, _server_thread, port_str,
|
0, _server_thread, port_str,
|
||||||
"UDP server") <= KERNEL_PID_UNDEF) {
|
"UDP server") <= KERNEL_PID_UNDEF) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -968,10 +968,10 @@ int main(void)
|
|||||||
printf("code 0x%02x\n", code);
|
printf("code 0x%02x\n", code);
|
||||||
_net_init();
|
_net_init();
|
||||||
expect(0 < thread_create(_client_stack, sizeof(_client_stack),
|
expect(0 < thread_create(_client_stack, sizeof(_client_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
_client_func, NULL, "tcp_client"));
|
_client_func, NULL, "tcp_client"));
|
||||||
expect(0 < thread_create(_server_stack, sizeof(_server_stack),
|
expect(0 < thread_create(_server_stack, sizeof(_server_stack),
|
||||||
THREAD_PRIORITY_MAIN - 2, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 2, 0,
|
||||||
_server_func, NULL, "tcp_server"));
|
_server_func, NULL, "tcp_server"));
|
||||||
tear_down();
|
tear_down();
|
||||||
#ifdef MODULE_LWIP_IPV4
|
#ifdef MODULE_LWIP_IPV4
|
||||||
|
@ -85,7 +85,7 @@ int main(void)
|
|||||||
|
|
||||||
thread_create(led_thread_stack, sizeof(led_thread_stack),
|
thread_create(led_thread_stack, sizeof(led_thread_stack),
|
||||||
THREAD_PRIORITY_MAIN + 1,
|
THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
led_thread_impl, NULL, "led");
|
led_thread_impl, NULL, "led");
|
||||||
|
|
||||||
if (!IS_USED(MODULE_AUTO_INIT)) {
|
if (!IS_USED(MODULE_AUTO_INIT)) {
|
||||||
|
@ -1322,13 +1322,13 @@ static int sc_list(int argc, char **argv)
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
thread_create(thread_worker_stack, sizeof(thread_worker_stack),
|
thread_create(thread_worker_stack, sizeof(thread_worker_stack),
|
||||||
THREAD_PRIORITY_MAIN + 2, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN + 2, 0,
|
||||||
thread_worker_func, NULL, "worker");
|
thread_worker_func, NULL, "worker");
|
||||||
thread_create(thread_checker_stack, sizeof(thread_checker_stack),
|
thread_create(thread_checker_stack, sizeof(thread_checker_stack),
|
||||||
THREAD_PRIORITY_MAIN + 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN + 1, 0,
|
||||||
thread_checker_func, NULL, "checker");
|
thread_checker_func, NULL, "checker");
|
||||||
thread_create(thread_timeout_stack, sizeof(thread_timeout_stack),
|
thread_create(thread_timeout_stack, sizeof(thread_timeout_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
thread_timeout_func, NULL, "timeout");
|
thread_timeout_func, NULL, "timeout");
|
||||||
|
|
||||||
print_str(
|
print_str(
|
||||||
|
@ -732,7 +732,7 @@ int main(void)
|
|||||||
for (intptr_t i = 0; i < RCV_THREAD_NUMOF; i++) {
|
for (intptr_t i = 0; i < RCV_THREAD_NUMOF; i++) {
|
||||||
receive_pid[i] = thread_create(thread_stack[i], THREAD_STACKSIZE,
|
receive_pid[i] = thread_create(thread_stack[i], THREAD_STACKSIZE,
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, _receive_thread,
|
0, _receive_thread,
|
||||||
(void*)i, "receive_thread");
|
(void*)i, "receive_thread");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ int main(void)
|
|||||||
/* create worker thread */
|
/* create worker thread */
|
||||||
kernel_pid_t pid = thread_create(worker_stack, sizeof(worker_stack),
|
kernel_pid_t pid = thread_create(worker_stack, sizeof(worker_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
worker_thread, NULL, "worker");
|
worker_thread, NULL, "worker");
|
||||||
|
|
||||||
printf("Testing generic evtimer\n");
|
printf("Testing generic evtimer\n");
|
||||||
|
@ -71,7 +71,7 @@ int main(void)
|
|||||||
/* create worker thread */
|
/* create worker thread */
|
||||||
kernel_pid_t pid = thread_create(worker_stack, sizeof(worker_stack),
|
kernel_pid_t pid = thread_create(worker_stack, sizeof(worker_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
worker_thread, NULL, "worker");
|
worker_thread, NULL, "worker");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -112,9 +112,9 @@ int main(void)
|
|||||||
for (size_t i = 0; i < ARRAY_SIZE(funcs); i++) {
|
for (size_t i = 0; i < ARRAY_SIZE(funcs); i++) {
|
||||||
printf("Testing: %s\n", tests[i]);
|
printf("Testing: %s\n", tests[i]);
|
||||||
t1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN + 1,
|
t1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_STACKTEST, funcs[i], NULL, "t1");
|
0, funcs[i], NULL, "t1");
|
||||||
t2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
|
t2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_STACKTEST, funcs[i], NULL, "t2");
|
0, funcs[i], NULL, "t2");
|
||||||
expect((t1 != KERNEL_PID_UNDEF) && (t2 != KERNEL_PID_UNDEF));
|
expect((t1 != KERNEL_PID_UNDEF) && (t2 != KERNEL_PID_UNDEF));
|
||||||
|
|
||||||
for (uint16_t i = 0; i < 2 * MS_PER_SEC; i++) {
|
for (uint16_t i = 0; i < 2 * MS_PER_SEC; i++) {
|
||||||
|
@ -101,11 +101,11 @@ int main(void)
|
|||||||
|
|
||||||
thread_create(stacks[0], sizeof (stacks[0]),
|
thread_create(stacks[0], sizeof (stacks[0]),
|
||||||
THREAD_PRIORITY_MAIN,
|
THREAD_PRIORITY_MAIN,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
run_middle, NULL, "middle");
|
run_middle, NULL, "middle");
|
||||||
thread_create(stacks[1], sizeof (stacks[1]),
|
thread_create(stacks[1], sizeof (stacks[1]),
|
||||||
THREAD_PRIORITY_MAIN,
|
THREAD_PRIORITY_MAIN,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
run_end, NULL, "end");
|
run_end, NULL, "end");
|
||||||
|
|
||||||
unsigned total = 0;
|
unsigned total = 0;
|
||||||
|
@ -78,7 +78,7 @@ static void test1(void)
|
|||||||
kernel_pid_t pid = thread_create(test1_thread_stack,
|
kernel_pid_t pid = thread_create(test1_thread_stack,
|
||||||
sizeof(test1_thread_stack),
|
sizeof(test1_thread_stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
test1_second_thread,
|
test1_second_thread,
|
||||||
NULL,
|
NULL,
|
||||||
"second");
|
"second");
|
||||||
@ -156,7 +156,7 @@ void test2(void)
|
|||||||
kernel_pid_t pid = thread_create(test2_thread_stack[i],
|
kernel_pid_t pid = thread_create(test2_thread_stack[i],
|
||||||
sizeof(test2_thread_stack[i]),
|
sizeof(test2_thread_stack[i]),
|
||||||
priority,
|
priority,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
priority_sema_thread,
|
priority_sema_thread,
|
||||||
names[i],
|
names[i],
|
||||||
names[i]);
|
names[i]);
|
||||||
@ -215,14 +215,14 @@ void test3(void)
|
|||||||
}
|
}
|
||||||
puts("first: create thread 1");
|
puts("first: create thread 1");
|
||||||
if (thread_create(test2_thread_stack[0], sizeof(test2_thread_stack[0]),
|
if (thread_create(test2_thread_stack[0], sizeof(test2_thread_stack[0]),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
test3_one_two_thread, NULL, "thread 1") < 0) {
|
test3_one_two_thread, NULL, "thread 1") < 0) {
|
||||||
puts("first: thread create FAILED");
|
puts("first: thread create FAILED");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
puts("first: create thread 2");
|
puts("first: create thread 2");
|
||||||
if (thread_create(test2_thread_stack[1], sizeof(test2_thread_stack[1]),
|
if (thread_create(test2_thread_stack[1], sizeof(test2_thread_stack[1]),
|
||||||
THREAD_PRIORITY_MAIN - 1, THREAD_CREATE_STACKTEST,
|
THREAD_PRIORITY_MAIN - 1, 0,
|
||||||
test3_two_one_thread, NULL, "thread 2") < 0) {
|
test3_two_one_thread, NULL, "thread 2") < 0) {
|
||||||
puts("first: thread create FAILED");
|
puts("first: thread create FAILED");
|
||||||
return;
|
return;
|
||||||
|
@ -62,7 +62,7 @@ int main(void)
|
|||||||
for (uintptr_t i = 0; i < NB_THREADS; ++i) {
|
for (uintptr_t i = 0; i < NB_THREADS; ++i) {
|
||||||
pids[i] = thread_create(stacks[i], sizeof(stacks[i]),
|
pids[i] = thread_create(stacks[i], sizeof(stacks[i]),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
_thread_fn, (void *)i, "thread");
|
_thread_fn, (void *)i, "thread");
|
||||||
}
|
}
|
||||||
/* sleep for a second, so that `ps` shows some % on idle at the beginning */
|
/* sleep for a second, so that `ps` shows some % on idle at the beginning */
|
||||||
|
@ -63,7 +63,7 @@ int main(void)
|
|||||||
pthread_cond_init(&cv, NULL);
|
pthread_cond_init(&cv, NULL);
|
||||||
|
|
||||||
kernel_pid_t pid = thread_create(stack,sizeof(stack), THREAD_PRIORITY_MAIN - 1,
|
kernel_pid_t pid = thread_create(stack,sizeof(stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
second_thread, NULL, "second_thread");
|
second_thread, NULL, "second_thread");
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -159,7 +159,7 @@ int main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
thread_create(stacks[i], sizeof(stacks[i]),
|
thread_create(stacks[i], sizeof(stacks[i]),
|
||||||
prio, THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
prio, THREAD_CREATE_WOUT_YIELD,
|
||||||
fun, NULL, name);
|
fun, NULL, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,9 +53,9 @@ int main(void)
|
|||||||
{
|
{
|
||||||
puts("starting threads");
|
puts("starting threads");
|
||||||
main_pid = thread_getpid();
|
main_pid = thread_getpid();
|
||||||
thread_create(stack[0], sizeof(stack[0]), shared_prio, THREAD_CREATE_STACKTEST,
|
thread_create(stack[0], sizeof(stack[0]), shared_prio, 0,
|
||||||
thread_wakeup_main, NULL, "TWakeup");
|
thread_wakeup_main, NULL, "TWakeup");
|
||||||
thread_create(stack[1], sizeof(stack[1]), shared_prio, THREAD_CREATE_STACKTEST,
|
thread_create(stack[1], sizeof(stack[1]), shared_prio, 0,
|
||||||
thread_bad, NULL, "TBad");
|
thread_bad, NULL, "TBad");
|
||||||
puts("main is going to sleep");
|
puts("main is going to sleep");
|
||||||
thread_sleep();
|
thread_sleep();
|
||||||
|
@ -86,7 +86,7 @@ int main(void)
|
|||||||
thread_create(stack,
|
thread_create(stack,
|
||||||
sizeof(stack),
|
sizeof(stack),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
THREAD_CREATE_WOUT_YIELD,
|
||||||
second_thread,
|
second_thread,
|
||||||
&thread_success,
|
&thread_success,
|
||||||
"second_thread");
|
"second_thread");
|
||||||
|
@ -76,11 +76,11 @@ static void test_counter_mode(void)
|
|||||||
sema_inv_init(&sync, 3);
|
sema_inv_init(&sync, 3);
|
||||||
|
|
||||||
thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, thread_count, &ctx[0], "nr1");
|
0, thread_count, &ctx[0], "nr1");
|
||||||
thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
|
thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_STACKTEST, thread_count, &ctx[1], "nr2");
|
0, thread_count, &ctx[1], "nr2");
|
||||||
thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN + 1,
|
thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_STACKTEST, thread_count, &ctx[2], "nr3");
|
0, thread_count, &ctx[2], "nr3");
|
||||||
|
|
||||||
sema_inv_wait(&sync);
|
sema_inv_wait(&sync);
|
||||||
puts("thread synced");
|
puts("thread synced");
|
||||||
@ -103,11 +103,11 @@ static void test_mask_mode(void)
|
|||||||
sema_inv_init(&sync, 0xE);
|
sema_inv_init(&sync, 0xE);
|
||||||
|
|
||||||
thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST, thread_bit, &ctx[0], "nr1");
|
0, thread_bit, &ctx[0], "nr1");
|
||||||
thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
|
thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_STACKTEST, thread_bit, &ctx[1], "nr2");
|
0, thread_bit, &ctx[1], "nr2");
|
||||||
thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN + 1,
|
thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN + 1,
|
||||||
THREAD_CREATE_STACKTEST, thread_bit, &ctx[2], "nr3");
|
0, thread_bit, &ctx[2], "nr3");
|
||||||
|
|
||||||
sema_inv_wait(&sync);
|
sema_inv_wait(&sync);
|
||||||
puts("thread synced");
|
puts("thread synced");
|
||||||
|
@ -138,7 +138,7 @@ int main(void)
|
|||||||
/* create and trigger first background thread */
|
/* create and trigger first background thread */
|
||||||
kernel_pid_t pid1 = thread_create(slacker_stack1, sizeof(slacker_stack1),
|
kernel_pid_t pid1 = thread_create(slacker_stack1, sizeof(slacker_stack1),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
slacker_thread, NULL, "slacker1");
|
slacker_thread, NULL, "slacker1");
|
||||||
|
|
||||||
LOG_DEBUG("+ msg 1");
|
LOG_DEBUG("+ msg 1");
|
||||||
@ -152,7 +152,7 @@ int main(void)
|
|||||||
/* create and trigger second background thread */
|
/* create and trigger second background thread */
|
||||||
kernel_pid_t pid2 = thread_create(slacker_stack2, sizeof(slacker_stack2),
|
kernel_pid_t pid2 = thread_create(slacker_stack2, sizeof(slacker_stack2),
|
||||||
THREAD_PRIORITY_MAIN - 1,
|
THREAD_PRIORITY_MAIN - 1,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
slacker_thread, NULL, "slacker2");
|
slacker_thread, NULL, "slacker2");
|
||||||
|
|
||||||
LOG_DEBUG("+ msg 3");
|
LOG_DEBUG("+ msg 3");
|
||||||
@ -166,7 +166,7 @@ int main(void)
|
|||||||
/* create and trigger worker thread */
|
/* create and trigger worker thread */
|
||||||
kernel_pid_t pid3 = thread_create(worker_stack, sizeof(worker_stack),
|
kernel_pid_t pid3 = thread_create(worker_stack, sizeof(worker_stack),
|
||||||
THREAD_PRIORITY_MAIN - 2,
|
THREAD_PRIORITY_MAIN - 2,
|
||||||
THREAD_CREATE_STACKTEST,
|
0,
|
||||||
worker_thread, NULL, "worker");
|
worker_thread, NULL, "worker");
|
||||||
|
|
||||||
puts("[START]\n");
|
puts("[START]\n");
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user