Bump version to 3.12
[maemo-rb.git] / firmware / asm / thread.h
blob3fa8f5625dc3a7cae84cd0802de06a5e13df2203
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Ulf Ralberg
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef __ASM_THREAD_H__
23 #define __ASM_THREAD_H__
24 #include "config.h"
26 /* generic thread.h */
28 #if defined(HAVE_WIN32_FIBER_THREADS) || defined(HAVE_SIGALTSTACK_THREADS)
30 struct regs
32 void (*start)(void); /* thread's entry point, or NULL when started */
33 void* uc; /* host thread handle */
34 uintptr_t sp; /* Stack pointer, unused */
35 size_t stack_size; /* stack size, not always used */
36 uintptr_t stack; /* pointer to start of the stack buffer */
39 #ifdef HAVE_SIGALTSTACK_THREADS
40 #include <signal.h>
41 /* MINSIGSTKSZ for the OS to deliver the signal + 0x3000 for us */
42 #define DEFAULT_STACK_SIZE (MINSIGSTKSZ+0x3000) /* Bytes */
43 #elif defined(HAVE_WIN32_FIBER_THREADS)
44 #define DEFAULT_STACK_SIZE 0x1000 /* Bytes */
45 #endif
46 #elif defined(CPU_ARM)
47 #include "arm/thread.h"
48 #elif defined(CPU_COLDFIRE)
49 #include "m68k/thread.h"
50 #elif CONFIG_CPU == SH7034
51 #include "sh/thread.h"
52 #elif defined(CPU_MIPS)
53 #include "mips/thread.h"
54 #endif
56 #endif