summaryrefslogtreecommitdiff
path: root/firmware/asm/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/asm/thread.h')
-rw-r--r--firmware/asm/thread.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/firmware/asm/thread.h b/firmware/asm/thread.h
new file mode 100644
index 0000000000..9bdff3881e
--- /dev/null
+++ b/firmware/asm/thread.h
@@ -0,0 +1,57 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Ulf Ralberg
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef __ASM_THREAD_H__
23#define __ASM_THREAD_H__
24#include "config.h"
25
26#if defined(CPU_ARM)
27 #include "arm/thread.h"
28#elif defined(CPU_COLDFIRE)
29 #include "m68k/thread.h"
30#elif CONFIG_CPU == SH7034
31 #include "sh/thread.h"
32#elif defined(CPU_MIPS)
33 #include "mips/thread.h"
34#else
35
36/* generic thread.h */
37
38struct regs
39{
40 void (*start)(void); /* thread's entry point, or NULL when started */
41 void* uc; /* host thread handle */
42 uintptr_t sp; /* Stack pointer, unused */
43 size_t stack_size; /* stack size, not always used */
44 uintptr_t stack; /* pointer to start of the stack buffer */
45};
46
47#ifdef HAVE_SIGALTSTACK_THREADS
48 #include <signal.h>
49 /* MINSIGSTKSZ for the OS to deliver the signal + 0x3000 for us */
50 #define DEFAULT_STACK_SIZE (MINSIGSTKSZ+0x3000) /* Bytes */
51#elif defined(HAVE_WIN32_FIBER_THREADS)
52 #define DEFAULT_STACK_SIZE 0x1000 /* Bytes */
53#endif
54
55#endif /* __ASM_THREAD_H__ */
56
57#endif