diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-01-31 09:27:49 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-01-31 09:27:49 +0000 |
commit | 7f8dfe2fd3e770c2e0435e9c56f5db5fd11ed6f7 (patch) | |
tree | 7335786169736fb133adfdffbc4c60f2050dac0d /os/kernel/include/inline.h | |
parent | c73b66a3cc8d7808b9c06e031c782345d358b3e9 (diff) | |
download | ChibiOS-7f8dfe2fd3e770c2e0435e9c56f5db5fd11ed6f7.tar.gz ChibiOS-7f8dfe2fd3e770c2e0435e9c56f5db5fd11ed6f7.tar.bz2 ChibiOS-7f8dfe2fd3e770c2e0435e9c56f5db5fd11ed6f7.zip |
Implemented thread reference counters and related APIs.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1556 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/include/inline.h')
-rw-r--r-- | os/kernel/include/inline.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/os/kernel/include/inline.h b/os/kernel/include/inline.h index dbac5d553..6f6734893 100644 --- a/os/kernel/include/inline.h +++ b/os/kernel/include/inline.h @@ -67,6 +67,19 @@ static INLINE Thread *dequeue(Thread *tp) { tp->p_next->p_prev = tp->p_prev;
return tp;
}
+
+static INLINE void list_insert(Thread *tp, ThreadsList *tlp) {
+
+ tp->p_next = tlp->p_next;
+ tlp->p_next = tp;
+}
+
+static INLINE Thread *list_remove(ThreadsList *tlp) {
+
+ Thread *tp = tlp->p_next;
+ tlp->p_next = tp->p_next;
+ return tp;
+}
#endif /* CH_OPTIMIZE_SPEED */
#endif /* _INLINE_H_ */
|