diff options
-rw-r--r-- | demos/Win32-MSVS/ch.vcproj | 13 | ||||
-rw-r--r-- | demos/Win32-MSVS/demo.c | 9 | ||||
-rw-r--r-- | readme.txt | 5 | ||||
-rw-r--r-- | src/chmtx.c | 9 |
4 files changed, 16 insertions, 20 deletions
diff --git a/demos/Win32-MSVS/ch.vcproj b/demos/Win32-MSVS/ch.vcproj index 3490c810b..0b27e2ffb 100644 --- a/demos/Win32-MSVS/ch.vcproj +++ b/demos/Win32-MSVS/ch.vcproj @@ -160,6 +160,9 @@ RelativePath="..\..\src\chmsg.c">
</File>
<File
+ RelativePath="..\..\src\chmtx.c">
+ </File>
+ <File
RelativePath="..\..\src\chqueues.c">
</File>
<File
@@ -185,13 +188,6 @@ RelativePath="..\..\ports\Win32\simcom.c">
</File>
</Filter>
- <Filter
- Name="test"
- Filter="">
- <File
- RelativePath="..\..\test\test.c">
- </File>
- </Filter>
</Filter>
<Filter
Name="Header Files"
@@ -231,6 +227,9 @@ RelativePath="..\..\src\include\messages.h">
</File>
<File
+ RelativePath="..\..\src\include\mutexes.h">
+ </File>
+ <File
RelativePath="..\..\src\include\queues.h">
</File>
<File
diff --git a/demos/Win32-MSVS/demo.c b/demos/Win32-MSVS/demo.c index 7f8bd6903..5a3bf167c 100644 --- a/demos/Win32-MSVS/demo.c +++ b/demos/Win32-MSVS/demo.c @@ -182,7 +182,6 @@ static t_msg ShellThread(void *arg) { PrintLineFDD(sd, " exit - Logout from ChibiOS/RT\r\n");
PrintLineFDD(sd, " time - Prints the system timer value\r\n");
PrintLineFDD(sd, " hello - Runs the Hello World demo thread\r\n");
- PrintLineFDD(sd, " test - Runs the System Test thread\r\n");
}
else if (stricmp(lp, "exit") == 0) {
if (checkend(sd))
@@ -204,14 +203,6 @@ static t_msg ShellThread(void *arg) { if (chThdWait(tp))
break; // Lost connection while executing the hello thread.
}
- else if (stricmp(lp, "test") == 0) {
- if (checkend(sd))
- continue;
- tp = chThdCreate(NORMALPRIO, 0, tarea, sizeof(tarea),
- TestThread, arg);
- if (chThdWait(tp))
- break; // Lost connection while executing the hello thread.
- }
else {
PrintLineFDD(sd, lp);
PrintLineFDD(sd, " ?\r\n");
diff --git a/readme.txt b/readme.txt index 0f872fe00..b00db6498 100644 --- a/readme.txt +++ b/readme.txt @@ -43,7 +43,10 @@ AVR-AT90CANx-GCC - Port on AVR AT90CAN128, not complete yet. - Added to the ARM demos load scripts the capability to load code in RAM
instead flash, the function must be marked as:
__attribute__((section(".ramtext")))
- The option -mlong-calls should be specified in the makefile too.
+ The option -mlong-calls should be specified in the makefile too or the
+ function declared with the "long-call" attribute.
+- Fixed the MSVC demo project files.
+- Fixed some syntax incompatibilites between GCC and MSVC into chmtx.c.
*** 0.5.0 ***
- NEW: Mutexes, the new mechanism provides a complete implementation of the
diff --git a/src/chmtx.c b/src/chmtx.c index af2ac0262..25f3ce664 100644 --- a/src/chmtx.c +++ b/src/chmtx.c @@ -99,10 +99,11 @@ void chMtxLockS(Mutex *mp) { * @return \p TRUE if the mutex was successfully acquired else \p FALSE
*/
BOOL chMtxTryLock(Mutex *mp) {
+ BOOL b;
chSysLock();
- BOOL b = chMtxTryLockS(mp);
+ b = chMtxTryLockS(mp);
chSysUnlock();
return b;
@@ -131,6 +132,7 @@ BOOL chMtxTryLockS(Mutex *mp) { * Unlocks the next owned mutex in reverse lock order.
*/
void chMtxUnlock(void) {
+ Mutex *mp;
chSysLock();
@@ -140,7 +142,7 @@ void chMtxUnlock(void) { /*
* Removes the top Mutex from the owned mutexes list and marks it as not owned.
*/
- Mutex *mp = currp->p_mtxlist;
+ mp = currp->p_mtxlist;
currp->p_mtxlist = mp->m_next;
mp->m_owner = NULL;
/*
@@ -172,6 +174,7 @@ void chMtxUnlock(void) { * @note This function does not reschedule internally.
*/
void chMtxUnlockS(void) {
+ Mutex *mp;
chDbgAssert((currp->p_mtxlist != NULL) && (currp->p_mtxlist->m_owner == currp),
"chmtx.c, chMtxUnlockS()");
@@ -179,7 +182,7 @@ void chMtxUnlockS(void) { /*
* Removes the top Mutex from the owned mutexes list and marks it as not owned.
*/
- Mutex *mp = currp->p_mtxlist;
+ mp = currp->p_mtxlist;
currp->p_mtxlist = mp->m_next;
mp->m_owner = NULL;
/*
|