1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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__
26 /* generic thread.h */
28 #if defined(HAVE_WIN32_FIBER_THREADS) || defined(HAVE_SIGALTSTACK_THREADS)
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
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 */
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"