2014-02-03 23:03:13 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 INRIA
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
|
|
|
* Public License. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @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>
|
|
|
|
#include <thread.h>
|
|
|
|
#include <flags.h>
|
|
|
|
#include <kernel.h>
|
|
|
|
|
2014-07-04 15:39:43 +02:00
|
|
|
#define STACK_SIZE (KERNEL_CONF_STACKSIZE_DEFAULT + KERNEL_CONF_STACKSIZE_MAIN)
|
2014-01-10 16:21:35 +01:00
|
|
|
|
|
|
|
char t2_stack[STACK_SIZE];
|
|
|
|
|
2014-01-25 11:29:35 +01:00
|
|
|
void second_thread(void)
|
|
|
|
{
|
2014-01-10 16:21:35 +01:00
|
|
|
puts("second thread\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2014-01-25 11:29:35 +01:00
|
|
|
(void) thread_create(t2_stack, STACK_SIZE, PRIORITY_MAIN - 1, CREATE_WOUT_YIELD | CREATE_STACKTEST, second_thread, "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
|
|
|
}
|