git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1459 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
103a27ca8a
commit
0750743bb4
|
@ -22,6 +22,8 @@
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
|
|
||||||
|
@ -33,9 +35,14 @@
|
||||||
__attribute__((used))
|
__attribute__((used))
|
||||||
static void __dummy(Thread *otp, Thread *ntp) {
|
static void __dummy(Thread *otp, Thread *ntp) {
|
||||||
(void)otp; (void)ntp;
|
(void)otp; (void)ntp;
|
||||||
|
#if defined(WIN32)
|
||||||
asm volatile (".globl @port_switch@8 \n\t" \
|
asm volatile (".globl @port_switch@8 \n\t" \
|
||||||
"@port_switch@8: \n\t" \
|
"@port_switch@8:");
|
||||||
"push %ebp \n\t" \
|
#else
|
||||||
|
asm volatile (".globl port_switch \n\t" \
|
||||||
|
"port_switch:");
|
||||||
|
#endif
|
||||||
|
asm volatile ("push %ebp \n\t" \
|
||||||
"push %esi \n\t" \
|
"push %esi \n\t" \
|
||||||
"push %edi \n\t" \
|
"push %edi \n\t" \
|
||||||
"push %ebx \n\t" \
|
"push %ebx \n\t" \
|
||||||
|
@ -62,8 +69,13 @@ void port_halt(void) {
|
||||||
*/
|
*/
|
||||||
void threadexit(void) {
|
void threadexit(void) {
|
||||||
|
|
||||||
|
#if defined(WIN32)
|
||||||
asm volatile ("push %eax \n\t" \
|
asm volatile ("push %eax \n\t" \
|
||||||
"call _chThdExit");
|
"call _chThdExit");
|
||||||
|
#else
|
||||||
|
asm volatile ("push %eax \n\t" \
|
||||||
|
"call chThdExit");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
Loading…
Reference in New Issue