From 461b44091f45dd6fded72222f08ba2fd652cffd3 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 23 Jan 2010 11:45:27 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1541 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/ARMCM3/chcore.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/os/ports/GCC/ARMCM3/chcore.c b/os/ports/GCC/ARMCM3/chcore.c index e7f6b82c3..80354f863 100644 --- a/os/ports/GCC/ARMCM3/chcore.c +++ b/os/ports/GCC/ARMCM3/chcore.c @@ -70,24 +70,17 @@ void SysTickVector(void) { /** * @brief SVC vector. - * @details The SVC vector is used for commanded context switch. + * @details The SVC vector is used for commanded context switch. Structures + * @p intctx are saved and restored from the process stacks of the + * switched threads. * * @param otp the thread to be switched out * @param ntp the thread to be switched it */ -/** @cond never */ +#if !defined(__DOXYGEN__) __attribute__((naked)) -/** @endcond */ +#endif void SVCallVector(Thread *otp, Thread *ntp) { - /* { r0 = otp, r1 = ntp } */ - /* get the BASEPRI in r3 */ - /* get the PSP in r12 */ - /* push the registers on the PSP stack */ - /* stores the modified PSP into the thread context */ - /* fetches the PSP position from the new thread context */ - /* pop the registers from the PSP stack */ - /* set the PSP from r12 */ - /* set the BASEPRI from R3 */ (void)otp; (void)ntp; #ifdef CH_CURRP_REGISTER_CACHE @@ -146,9 +139,9 @@ void SVCallVector(Thread *otp, Thread *ntp) { /** * @brief Preemption code. */ -/** @cond never */ +#ifndef __DOXYGEN__ __attribute__((naked)) -/** @endcond */ +#endif void PendSVVector(void) { Thread *otp; register struct intctx *sp_thd asm("r12"); @@ -161,7 +154,7 @@ void PendSVVector(void) { (currp = fifo_remove(&rlist.r_queue))->p_state = THD_STATE_CURRENT; chSchReadyI(otp); #if CH_TIME_QUANTUM > 0 - /* set the round-robin time quantum */ + /* Set the round-robin time quantum.*/ rlist.r_preempt = CH_TIME_QUANTUM; #endif chDbgTrace(otp, currp); -- cgit v1.2.3