diff --git a/kernel/atom.h b/kernel/atom.h index b99512d..d71acc6 100755 --- a/kernel/atom.h +++ b/kernel/atom.h @@ -116,7 +116,7 @@ extern ATOM_TCB *atomCurrentContext (void); extern uint8_t atomThreadCreate (ATOM_TCB *tcb_ptr, uint8_t priority, void (*entry_point)(uint32_t), uint32_t entry_param, void *stack_bottom, uint32_t stack_size, uint8_t stack_check); extern uint8_t atomThreadStackCheck (ATOM_TCB *tcb_ptr, uint32_t *used_bytes, uint32_t *free_bytes); -extern ATOM_TCB *archContextSwitch (ATOM_TCB *old_tcb_ptr, ATOM_TCB *new_tcb_ptr); +extern void archContextSwitch (ATOM_TCB *old_tcb_ptr, ATOM_TCB *new_tcb_ptr); extern void archThreadContextInit (ATOM_TCB *tcb_ptr, void *stack_top, void (*entry_point)(uint32_t), uint32_t entry_param); extern void archFirstThreadRestore(ATOM_TCB *new_tcb_ptr); diff --git a/kernel/atomkernel.c b/kernel/atomkernel.c index 91d0a58..7521c70 100755 --- a/kernel/atomkernel.c +++ b/kernel/atomkernel.c @@ -343,7 +343,7 @@ static void atomThreadSwitch(ATOM_TCB *old_tcb, ATOM_TCB *new_tcb) curr_tcb = new_tcb; /* Call the architecture-specific context switch */ - old_tcb = archContextSwitch (old_tcb, new_tcb); + archContextSwitch (old_tcb, new_tcb); } /** diff --git a/kernel/atomport-template.h b/kernel/atomport-template.h index ecb07ea..9f17635 100755 --- a/kernel/atomport-template.h +++ b/kernel/atomport-template.h @@ -30,6 +30,7 @@ #ifndef __ATOM_PORT_H #define __ATOM_PORT_H + /* Required number of system ticks per second (normally 100 for 10ms tick) */ #define SYSTEM_TICKS_PER_SEC 100 diff --git a/tests/kern2.c b/tests/kern2.c index d1d1254..7387c89 100644 --- a/tests/kern2.c +++ b/tests/kern2.c @@ -31,9 +31,6 @@ #include "atom.h" #include "atomtests.h" -#ifdef STAND_ALONE -#include -#endif /** * \b test_start diff --git a/tests/kern3.c b/tests/kern3.c index 4ff1caa..a149d72 100644 --- a/tests/kern3.c +++ b/tests/kern3.c @@ -31,9 +31,6 @@ #include "atom.h" #include "atomtests.h" -#ifdef STAND_ALONE -#include -#endif /* Number of test threads */ #define NUM_TEST_THREADS 2 diff --git a/tests/kern4.c b/tests/kern4.c index 2a06e95..23ed33b 100644 --- a/tests/kern4.c +++ b/tests/kern4.c @@ -31,9 +31,6 @@ #include "atom.h" #include "atomtests.h" -#ifdef STAND_ALONE -#include -#endif /* Number of test threads */ #define NUM_TEST_THREADS 4 diff --git a/tests/mutex1.c b/tests/mutex1.c index 976a8ef..40f1a9d 100644 --- a/tests/mutex1.c +++ b/tests/mutex1.c @@ -31,6 +31,7 @@ #include "atommutex.h" #include "atomtests.h" + /* Number of test threads */ #define NUM_TEST_THREADS 2 diff --git a/tests/mutex3.c b/tests/mutex3.c index b5e83a4..958a657 100644 --- a/tests/mutex3.c +++ b/tests/mutex3.c @@ -32,9 +32,6 @@ #include "atomtests.h" #include "atommutex.h" -#ifdef STAND_ALONE -#include -#endif /* Number of test threads */ #define NUM_TEST_THREADS 4 diff --git a/tests/mutex4.c b/tests/mutex4.c index 5ecc316..6bf1281 100644 --- a/tests/mutex4.c +++ b/tests/mutex4.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atommutex.h" diff --git a/tests/mutex5.c b/tests/mutex5.c index 5125d96..dc31558 100644 --- a/tests/mutex5.c +++ b/tests/mutex5.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atommutex.h" diff --git a/tests/mutex6.c b/tests/mutex6.c index b47b7aa..6e2890e 100644 --- a/tests/mutex6.c +++ b/tests/mutex6.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atommutex.h" diff --git a/tests/mutex8.c b/tests/mutex8.c index 9b2af5c..4892bb0 100644 --- a/tests/mutex8.c +++ b/tests/mutex8.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atommutex.h" #include "atomtests.h" diff --git a/tests/mutex9.c b/tests/mutex9.c index 36cf965..a690836 100644 --- a/tests/mutex9.c +++ b/tests/mutex9.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atommutex.h" diff --git a/tests/queue10.c b/tests/queue10.c index 0a0ff0e..ca6b6be 100644 --- a/tests/queue10.c +++ b/tests/queue10.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomqueue.h" #include "atomtests.h" diff --git a/tests/queue2.c b/tests/queue2.c index e2ccff6..3b5f9f5 100644 --- a/tests/queue2.c +++ b/tests/queue2.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomqueue.h" #include "atomtests.h" diff --git a/tests/queue3.c b/tests/queue3.c index dd7eb1a..8b4427e 100644 --- a/tests/queue3.c +++ b/tests/queue3.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomqueue.h" #include "atomtests.h" diff --git a/tests/queue5.c b/tests/queue5.c index a3c15d9..4cf5dbd 100644 --- a/tests/queue5.c +++ b/tests/queue5.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atomqueue.h" diff --git a/tests/queue6.c b/tests/queue6.c index 68e43a2..1849b3b 100644 --- a/tests/queue6.c +++ b/tests/queue6.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomqueue.h" #include "atomtests.h" diff --git a/tests/queue7.c b/tests/queue7.c index 061bc20..83eefa7 100644 --- a/tests/queue7.c +++ b/tests/queue7.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomqueue.h" #include "atomtests.h" diff --git a/tests/queue8.c b/tests/queue8.c index 5cfef6d..9064e47 100644 --- a/tests/queue8.c +++ b/tests/queue8.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atomqueue.h" diff --git a/tests/queue9.c b/tests/queue9.c index 0907928..d914ee9 100644 --- a/tests/queue9.c +++ b/tests/queue9.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atomqueue.h" diff --git a/tests/sem3.c b/tests/sem3.c index 33e06ad..19ece62 100644 --- a/tests/sem3.c +++ b/tests/sem3.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atomsem.h" diff --git a/tests/sem4.c b/tests/sem4.c index 193b1e2..128276f 100644 --- a/tests/sem4.c +++ b/tests/sem4.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atomsem.h" diff --git a/tests/sem5.c b/tests/sem5.c index 6a00750..4603071 100644 --- a/tests/sem5.c +++ b/tests/sem5.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atomsem.h" diff --git a/tests/sem6.c b/tests/sem6.c index 7aebda1..532ec29 100644 --- a/tests/sem6.c +++ b/tests/sem6.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atomsem.h" diff --git a/tests/sem7.c b/tests/sem7.c index 337a7b5..3835103 100644 --- a/tests/sem7.c +++ b/tests/sem7.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atomsem.h" diff --git a/tests/sem8.c b/tests/sem8.c index 5f2ecea..ec27ba3 100644 --- a/tests/sem8.c +++ b/tests/sem8.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h" #include "atomsem.h" diff --git a/tests/sem9.c b/tests/sem9.c index f2f6c55..fe660ba 100644 --- a/tests/sem9.c +++ b/tests/sem9.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomsem.h" #include "atomtests.h" diff --git a/tests/test-template.c b/tests/test-template.c index 449af59..c306c1c 100644 --- a/tests/test-template.c +++ b/tests/test-template.c @@ -31,6 +31,7 @@ #include "atom.h" #include "atomtests.h" + /** * \b test_start * @@ -52,4 +53,4 @@ uint32_t test_start (void) /* Quit */ return failures; -} +} \ No newline at end of file diff --git a/tests/timer2.c b/tests/timer2.c index e75defc..b9cbc55 100644 --- a/tests/timer2.c +++ b/tests/timer2.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtimer.h" #include "atomtests.h" diff --git a/tests/timer4.c b/tests/timer4.c index c5c98e6..1e74e88 100644 --- a/tests/timer4.c +++ b/tests/timer4.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtimer.h" #include "atomtests.h" @@ -189,4 +190,4 @@ static void testCallback (POINTER cb_data) /* Not called at expected time, don't clear the location */ } -} +} \ No newline at end of file diff --git a/tests/timer5.c b/tests/timer5.c index 0082a47..080a5b8 100644 --- a/tests/timer5.c +++ b/tests/timer5.c @@ -27,11 +27,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomsem.h" #include "atomtimer.h" #include "atomtests.h" + /* Global test data */ static volatile int callback_ran_flag; diff --git a/tests/timer6.c b/tests/timer6.c index 23fa557..da7f0da 100644 --- a/tests/timer6.c +++ b/tests/timer6.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtimer.h" #include "atomtests.h" @@ -151,4 +152,4 @@ static void testCallback (POINTER cb_data) { /* Callback was called */ *(int *)cb_data = TRUE; -} +} \ No newline at end of file diff --git a/tests/timer7.c b/tests/timer7.c index 7da3b85..d2a7e54 100644 --- a/tests/timer7.c +++ b/tests/timer7.c @@ -27,6 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ + #include "atom.h" #include "atomtests.h"