aboutsummaryrefslogtreecommitdiffstats
path: root/src/gos
diff options
context:
space:
mode:
authorinmarket <inmarket@ugfx.org>2016-12-12 19:59:47 +1000
committerinmarket <inmarket@ugfx.org>2016-12-12 19:59:47 +1000
commitbc7a2b05c1e3e69c93a1381a343d32e18907c782 (patch)
tree52627ef7d6420dfbe3e9dfefea722827429156a8 /src/gos
parent60b3fc076925c5cdbba041b122d3d1f44bcf7729 (diff)
downloaduGFX-bc7a2b05c1e3e69c93a1381a343d32e18907c782.tar.gz
uGFX-bc7a2b05c1e3e69c93a1381a343d32e18907c782.tar.bz2
uGFX-bc7a2b05c1e3e69c93a1381a343d32e18907c782.zip
Update Raw32 threads CLIB support to work with modern versions of the MINGW compiler
Diffstat (limited to 'src/gos')
-rw-r--r--src/gos/gos_x_threads.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gos/gos_x_threads.c b/src/gos/gos_x_threads.c
index 7afd224a..520a8a64 100644
--- a/src/gos/gos_x_threads.c
+++ b/src/gos/gos_x_threads.c
@@ -212,12 +212,12 @@ static thread mainthread; // The main thread context
* If they don't exist compile them to be the standard setjmp() function.
* Similarly for longjmp().
*/
- #if (!defined(setjmp) && !defined(_setjmp)) || GFX_COMPILER == GFX_COMPILER_KEIL
+ #if (!defined(setjmp) && !defined(_setjmp)) || GFX_COMPILER == GFX_COMPILER_KEIL || GFX_COMPILER == GFX_COMPILER_MINGW32 || GFX_COMPILER == GFX_COMPILER_MINGW64
#define CXT_SAVE setjmp
#else
#define CXT_SAVE _setjmp
#endif
- #if (!defined(longjmp) && !defined(_longjmp)) || GFX_COMPILER == GFX_COMPILER_KEIL
+ #if (!defined(longjmp) && !defined(_longjmp)) || GFX_COMPILER == GFX_COMPILER_KEIL || GFX_COMPILER == GFX_COMPILER_MINGW32 || GFX_COMPILER == GFX_COMPILER_MINGW64
#define CXT_RESTORE longjmp
#else
#define CXT_RESTORE _longjmp
@@ -346,6 +346,7 @@ static thread mainthread; // The main thread context
uint32_t i;
// Copy the stack frame
+ s = 0;
#if AUTO_DETECT_STACKFRAME
if (STACK_DIR_UP) { // Stack grows up
nf = (char *)(t) + sizeof(thread) + sizeof(jmp_buf) + STACK_BASE;