Update Raw32 threads CLIB support to work with modern versions of the MINGW compiler
This commit is contained in:
parent
60b3fc0769
commit
bc7a2b05c1
1 changed files with 3 additions and 2 deletions
|
@ -212,12 +212,12 @@ static thread mainthread; // The main thread context
|
||||||
* If they don't exist compile them to be the standard setjmp() function.
|
* If they don't exist compile them to be the standard setjmp() function.
|
||||||
* Similarly for longjmp().
|
* 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
|
#define CXT_SAVE setjmp
|
||||||
#else
|
#else
|
||||||
#define CXT_SAVE _setjmp
|
#define CXT_SAVE _setjmp
|
||||||
#endif
|
#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
|
#define CXT_RESTORE longjmp
|
||||||
#else
|
#else
|
||||||
#define CXT_RESTORE _longjmp
|
#define CXT_RESTORE _longjmp
|
||||||
|
@ -346,6 +346,7 @@ static thread mainthread; // The main thread context
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
// Copy the stack frame
|
// Copy the stack frame
|
||||||
|
s = 0;
|
||||||
#if AUTO_DETECT_STACKFRAME
|
#if AUTO_DETECT_STACKFRAME
|
||||||
if (STACK_DIR_UP) { // Stack grows up
|
if (STACK_DIR_UP) { // Stack grows up
|
||||||
nf = (char *)(t) + sizeof(thread) + sizeof(jmp_buf) + STACK_BASE;
|
nf = (char *)(t) + sizeof(thread) + sizeof(jmp_buf) + STACK_BASE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue