2014-02-03 23:03:13 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 INRIA
|
|
|
|
*
|
2014-07-31 19:45:27 +02:00
|
|
|
* 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.
|
2014-02-03 23:03:13 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup tests
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Thread test application
|
|
|
|
*
|
|
|
|
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
|
|
|
*
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2014-01-10 16:21:35 +01:00
|
|
|
#include <stdio.h>
|
2014-07-15 18:47:39 +02:00
|
|
|
#include "thread.h"
|
2014-01-10 16:21:35 +01:00
|
|
|
|
2015-04-28 20:02:05 +02:00
|
|
|
char t2_stack[THREAD_STACKSIZE_MAIN];
|
2014-01-10 16:21:35 +01:00
|
|
|
|
2014-03-04 20:20:01 +01:00
|
|
|
void *second_thread(void *arg)
|
2014-01-25 11:29:35 +01:00
|
|
|
{
|
2014-03-04 20:20:01 +01:00
|
|
|
(void) arg;
|
2014-01-10 16:21:35 +01:00
|
|
|
puts("second thread\n");
|
2014-03-04 20:20:01 +01:00
|
|
|
return NULL;
|
2014-01-10 16:21:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2014-07-09 07:13:56 +02:00
|
|
|
(void) thread_create(
|
|
|
|
t2_stack, sizeof(t2_stack),
|
2015-12-02 12:00:37 +01:00
|
|
|
THREAD_PRIORITY_MAIN - 1,
|
|
|
|
THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST,
|
2014-03-04 20:20:01 +01:00
|
|
|
second_thread, NULL, "nr2");
|
2014-01-10 16:21:35 +01:00
|
|
|
puts("first thread\n");
|
2014-06-20 20:00:20 +02:00
|
|
|
return 0;
|
2014-01-10 16:21:35 +01:00
|
|
|
}
|