aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-01-17 09:44:36 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-01-17 09:44:36 +0000
commit8fb01ac78308d1fdb0efad351a5ffd5f48981a2f (patch)
tree3670a4bdec6ecb26c28774c1c46c6dd0c13965e2 /demos
parent3e62617990c8fcea0649eacd6f769f4e544b920d (diff)
downloadChibiOS-8fb01ac78308d1fdb0efad351a5ffd5f48981a2f.tar.gz
ChibiOS-8fb01ac78308d1fdb0efad351a5ffd5f48981a2f.tar.bz2
ChibiOS-8fb01ac78308d1fdb0efad351a5ffd5f48981a2f.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@179 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r--demos/Win32-MSVS/chcore.c6
-rw-r--r--demos/Win32-MSVS/chcore.h2
-rw-r--r--demos/Win32-MinGW/chcore.h2
-rw-r--r--demos/Win32-MinGW/chcore2.s4
4 files changed, 7 insertions, 7 deletions
diff --git a/demos/Win32-MSVS/chcore.c b/demos/Win32-MSVS/chcore.c
index 99876b8d6..facdea31c 100644
--- a/demos/Win32-MSVS/chcore.c
+++ b/demos/Win32-MSVS/chcore.c
@@ -84,7 +84,7 @@ __declspec(naked) void __fastcall chSysHalt(void) {
exit(2);
}
-__declspec(naked) void __fastcall chSysSwitchI(Context *oldp, Context *newp) {
+__declspec(naked) void __fastcall chSysSwitchI(Thread *otp, Thread *ntp) {
__asm {
// Switch out code
@@ -92,9 +92,9 @@ __declspec(naked) void __fastcall chSysSwitchI(Context *oldp, Context *newp) {
push esi
push edi
push ebx
- mov dword ptr [ecx],esp
+ mov dword ptr 16[ecx],esp
// Switch in code
- mov esp,[edx]
+ mov esp,16[edx]
pop ebx
pop edi
pop esi
diff --git a/demos/Win32-MSVS/chcore.h b/demos/Win32-MSVS/chcore.h
index b9fbb0147..18e96dc13 100644
--- a/demos/Win32-MSVS/chcore.h
+++ b/demos/Win32-MSVS/chcore.h
@@ -76,7 +76,7 @@ typedef struct {
t_msg _IdleThread(void *p);
void __fastcall chSysHalt(void);
-void __fastcall chSysSwitchI(Context *oldp, Context *newp);
+void __fastcall chSysSwitchI(Thread *otp, Thread *ntp);
void __fastcall threadexit(void);
#endif /* _CHCORE_H_ */
diff --git a/demos/Win32-MinGW/chcore.h b/demos/Win32-MinGW/chcore.h
index 43265326b..6bb2664f5 100644
--- a/demos/Win32-MinGW/chcore.h
+++ b/demos/Win32-MinGW/chcore.h
@@ -76,7 +76,7 @@ typedef struct {
t_msg _IdleThread(void *p);
__attribute__((fastcall)) void chSysHalt(void);
-__attribute__((fastcall)) void chSysSwitchI(Context *oldp, Context *newp);
+__attribute__((fastcall)) void chSysSwitchI(Thread *otp, Thread *ntp);
__attribute__((fastcall)) void threadstart(void);
#endif /* _CHCORE_H_ */
diff --git a/demos/Win32-MinGW/chcore2.s b/demos/Win32-MinGW/chcore2.s
index c8260e3e6..9334fbfdc 100644
--- a/demos/Win32-MinGW/chcore2.s
+++ b/demos/Win32-MinGW/chcore2.s
@@ -27,9 +27,9 @@
push %esi
push %edi
push %ebx
- movl %esp,(%ecx)
+ movl %esp,16(%ecx)
# Switch in
- movl (%edx),%esp
+ movl 16(%edx),%esp
pop %ebx
pop %edi
pop %esi