Skip to content
Snippets Groups Projects
Commit f5c8cff5 authored by Niclas Finne's avatar Niclas Finne
Browse files

Made MT stack size configurable

parent e25226f0
Branches
No related tags found
No related merge requests found
......@@ -27,13 +27,15 @@
* SUCH DAMAGE.
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: mtarch.h,v 1.3 2008/11/21 10:28:32 fros4943 Exp $
*/
#ifndef __MTARCH_H__
#define __MTARCH_H__
#include "contiki.h"
#ifndef MTARCH_STACKSIZE
#define MTARCH_STACKSIZE 128
#endif /* MTARCH_STACKSIZE */
struct mtarch_thread {
unsigned short stack[MTARCH_STACKSIZE];
......@@ -46,6 +48,4 @@ struct mt_thread;
int mtarch_stack_usage(struct mt_thread *t);
#endif /* __MTARCH_H__ */
......@@ -33,6 +33,12 @@
* $Id: mtarch.c,v 1.2 2007/04/03 18:37:15 oliverschmidt Exp $
*/
#include "sys/mt.h"
#ifndef MTARCH_STACKSIZE
#define MTARCH_STACKSIZE 4096
#endif /* MTARCH_STACKSIZE */
#if defined(_WIN32) || defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN
......@@ -52,7 +58,7 @@ static void *main_fiber;
#include <ucontext.h>
struct mtarch_t {
char stack[4096];
char stack[MTARCH_STACKSIZE];
ucontext_t context;
};
......@@ -61,8 +67,6 @@ static ucontext_t *running_context;
#endif /* _WIN32 || __CYGWIN__ || __linux */
#include "mtarch.h"
/*--------------------------------------------------------------------------*/
void
mtarch_init(void)
......
......@@ -48,6 +48,7 @@
#include "contiki.h"
#include "sys/mt.h"
#include <stdio.h>
static char *ptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment