diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-10-17 18:33:35 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-10-17 18:33:35 +0000 |
commit | 1d23eb296156769cff3e41bd7026db1cd2538664 (patch) | |
tree | 512bbaa17560196c09dcce171bcb28a367838542 /src/templates | |
parent | 3d3e5728aa1d14444b99732426d36f6375013727 (diff) | |
download | ChibiOS-1d23eb296156769cff3e41bd7026db1cd2538664.tar.gz ChibiOS-1d23eb296156769cff3e41bd7026db1cd2538664.tar.bz2 ChibiOS-1d23eb296156769cff3e41bd7026db1cd2538664.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@474 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/templates')
-rw-r--r-- | src/templates/chcore.c | 24 | ||||
-rw-r--r-- | src/templates/chcore.h | 24 | ||||
-rw-r--r-- | src/templates/chtypes.h | 39 |
3 files changed, 55 insertions, 32 deletions
diff --git a/src/templates/chcore.c b/src/templates/chcore.c index 2aaa0b06a..95427c161 100644 --- a/src/templates/chcore.c +++ b/src/templates/chcore.c @@ -55,6 +55,30 @@ void chSysHalt(void) { }
/**
+ * Enters the ChibiOS/RT system mutual exclusion zone. The implementation is
+ * architecture dependent, on single core systems usually this function usually
+ * just disables the interrupts.
+ * @note The code in the system mutual exclusion zone must be as light and
+ * fast as possible, the system performance is affected by this.
+ * @note The use of system mutual exclusion zones are not recommended in
+ * the user code, it is a better idea to use the Semaphores instead.
+ */
+void chSysLock(void) {
+}
+
+/**
+ * Leaves the ChibiOS/RT system mutual exclusion zone. The implementation is
+ * architecture dependent, on single core systems usually this function usually
+ * just enables the interrupts.
+ * @note The code in the system mutual exclusion zone must be as light and
+ * fast as possible, the system performance is affected by this.
+ * @note The use of system mutual exclusion zones are not recommended in
+ * the user code, it is a better idea to use the Semaphores instead.
+ */
+void chSysUnlock(void) {
+}
+
+/**
* Context switch.
*/
void chSysSwitchI(Thread *otp, Thread *ntp) {}
diff --git a/src/templates/chcore.h b/src/templates/chcore.h index c84a237f8..1be2d7145 100644 --- a/src/templates/chcore.h +++ b/src/templates/chcore.h @@ -84,28 +84,6 @@ typedef struct { #define WorkingArea(s, n) uint8_t s[UserStackSize(n)];
/**
- * Enters the ChibiOS/RT system mutual exclusion zone, the implementation is
- * architecture dependent, on single core systems usually this function
- * just disables the interrupts.
- * @note The code in the system mutual exclusion zone must be as light and
- * fast as possible, the system performance is affected by this.
- * @note The use of system mutual exclusion zones are not recommended in
- * the user code, it is a better idea to use the Semaphores instead.
- */
-#define chSysLock()
-
-/**
- * Leaves the ChibiOS/RT system mutual exclusion zone, the implementation is
- * architecture dependent, on single core systems usually this function
- * just enables the interrupts.
- * @note The code in the system mutual exclusion zone must be as light and
- * fast as possible, the system performance is affected by this.
- * @note The use of system mutual exclusion zones are not recommended in
- * the user code, it is a better idea to use the Semaphores instead.
- */
-#define chSysUnlock()
-
-/**
* Enables the interrupts, it is only invoked once into \p chSysInit().
*/
#define chSysEnable()
@@ -130,6 +108,8 @@ extern "C" { #endif
void _IdleThread(void *p);
void chSysHalt(void);
+ void chSysLock(void);
+ void chSysUnlock(void);
void chSysSwitchI(Thread *otp, Thread *ntp);
void chSysPuts(char *msg);
#ifdef __cplusplus
diff --git a/src/templates/chtypes.h b/src/templates/chtypes.h index 6c51687ad..92b5dc443 100644 --- a/src/templates/chtypes.h +++ b/src/templates/chtypes.h @@ -33,16 +33,35 @@ #include <stdint.h>
#endif
-typedef int32_t bool_t; /* Signed boolean. */
-typedef uint8_t tmode_t; /* Thread mode flags, uint8_t is ok. */
-typedef uint8_t tstate_t; /* Thread state, uint8_t is ok. */
-typedef uint16_t tid_t; /* Thread id. */
-typedef uint32_t tprio_t; /* Priority, use the fastest unsigned type. */
-typedef int32_t msg_t; /* Message, use signed pointer equivalent.*/
-typedef int32_t eventid_t; /* Event Id, use fastest signed.*/
-typedef uint32_t eventmask_t;/* Event Mask, recommended fastest unsigned.*/
-typedef uint32_t systime_t; /* System Time, recommended fastest unsigned.*/
-typedef int32_t cnt_t; /* Counter, recommended fastest signed.*/
+/** Signed boolean. */
+typedef int32_t bool_t;
+
+/** Thread mode flags, uint8_t is ok. */
+typedef uint8_t tmode_t;
+
+/** Thread state, uint8_t is ok. */
+typedef uint8_t tstate_t;
+
+/** Thread id. */
+typedef uint16_t tid_t;
+
+/** Priority, use the fastest unsigned type. */
+typedef uint32_t tprio_t;
+
+/** Message, use signed pointer equivalent.*/
+typedef int32_t msg_t;
+
+/** Event Id, use fastest signed.*/
+typedef int32_t eventid_t;
+
+/** Event Mask, recommended fastest unsigned.*/
+typedef uint32_t eventmask_t;
+
+/** System Time, recommended fastest unsigned.*/
+typedef uint32_t systime_t;
+
+/** Counter, recommended fastest signed.*/
+typedef int32_t cnt_t;
#define INLINE inline
#define PACK_STRUCT_STRUCT __attribute__((packed))
|