diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-09 10:48:30 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-01-09 10:48:30 +0000 |
commit | a07bd21d4427c9f254aae8f6da10dabdaedea43e (patch) | |
tree | c0b4509c8b96daa8eb1dc6bf6c58abf133d0e21d /src | |
parent | 58d7edb48610cd855c3638cfceabd564471bc316 (diff) | |
download | ChibiOS-a07bd21d4427c9f254aae8f6da10dabdaedea43e.tar.gz ChibiOS-a07bd21d4427c9f254aae8f6da10dabdaedea43e.tar.bz2 ChibiOS-a07bd21d4427c9f254aae8f6da10dabdaedea43e.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@594 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src')
-rw-r--r-- | src/templates/chcore.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/src/templates/chcore.c b/src/templates/chcore.c index 06e584089..65d8e155d 100644 --- a/src/templates/chcore.c +++ b/src/templates/chcore.c @@ -31,30 +31,67 @@ * because performance concerns.
*/
+/**
+ * Prints a message on the system console. + * @param msg pointer to the message + */
void sys_puts(char *msg) {
}
+/**
+ * Performs a context switch between two threads.
+ * @param otp the thread to be switched out
+ * @param ntp the thread to be switched in + */
void sys_switch(Thread *otp, Thread *ntp) {
}
+/**
+ * Kernel-unlock action. Usually this function just enables interrupts. + */
void sys_enable(void) {
}
+/**
+ * Kernel-lock action. Usually this function just disables interrupts.
+ */
void sys_disable(void) {
}
+/**
+ * Kernel-lock action from an interrupt handler. This function is invoked
+ * before invoking I-class APIs from interrupt handlers. The implementation
+ * is architecture dependent, in its simplest form it is void. + */
void sys_disable_from_isr(void) {
}
+/**
+ * Kernel-unlock action from an interrupt handler. This function is invoked
+ * after invoking I-class APIs from interrupt handlers. The implementation
+ * is architecture dependent, in its simplest form it is void.
+ */
void sys_enable_from_isr(void) {
}
+/**
+ * Enters an architecture-dependent halt mode. The function is meant to return
+ * when an interrupt becomes pending. The simplest implementation is an empty
+ * function but this will not take advantage of architecture-specific power
+ * saving modes. + */
void sys_wait_for_interrupt(void) {
}
+/**
+ * Halts the system. This function is invoked by the operating system when an
+ * unrecoverable error is detected (as example because a programming error in
+ * the application code that triggers an assertion while in debug mode). + */
void sys_halt(void) {
- while(TRUE) {
+ sys_disable();
+ while (TRUE) {
}
}
|