aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/src/chregistry.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-02-16 10:07:00 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-02-16 10:07:00 +0000
commitcf204e72ea5fd6e4be8b3295cb148fde5fdd47d2 (patch)
tree5aae4b9a6c78c8f14c2a6ca8cd6446f42b3b29bd /os/rt/src/chregistry.c
parent641f2c372605cf405f0dda8536b45a78e0e5e2e2 (diff)
downloadChibiOS-cf204e72ea5fd6e4be8b3295cb148fde5fdd47d2.tar.gz
ChibiOS-cf204e72ea5fd6e4be8b3295cb148fde5fdd47d2.tar.bz2
ChibiOS-cf204e72ea5fd6e4be8b3295cb148fde5fdd47d2.zip
Tree reorganization.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8900 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/src/chregistry.c')
-rw-r--r--os/rt/src/chregistry.c42
1 files changed, 13 insertions, 29 deletions
diff --git a/os/rt/src/chregistry.c b/os/rt/src/chregistry.c
index aacadf22c..07185d331 100644
--- a/os/rt/src/chregistry.c
+++ b/os/rt/src/chregistry.c
@@ -87,30 +87,26 @@ ROMCONST chdebug_t ch_debug = {
(uint8_t)sizeof (void *),
(uint8_t)sizeof (systime_t),
(uint8_t)sizeof (thread_t),
- (uint8_t)_offsetof(thread_t, p_prio),
- (uint8_t)_offsetof(thread_t, p_ctx),
- (uint8_t)_offsetof(thread_t, p_newer),
- (uint8_t)_offsetof(thread_t, p_older),
- (uint8_t)_offsetof(thread_t, p_name),
+ (uint8_t)_offsetof(thread_t, prio),
+ (uint8_t)_offsetof(thread_t, ctx),
+ (uint8_t)_offsetof(thread_t, newer),
+ (uint8_t)_offsetof(thread_t, older),
+ (uint8_t)_offsetof(thread_t, name),
#if CH_DBG_ENABLE_STACK_CHECK == TRUE
- (uint8_t)_offsetof(thread_t, p_stklimit),
-#else
- (uint8_t)0,
-#endif
- (uint8_t)_offsetof(thread_t, p_state),
- (uint8_t)_offsetof(thread_t, p_flags),
-#if CH_CFG_USE_DYNAMIC == TRUE
- (uint8_t)_offsetof(thread_t, p_refs),
+ (uint8_t)_offsetof(thread_t, stklimit),
#else
(uint8_t)0,
#endif
+ (uint8_t)_offsetof(thread_t, state),
+ (uint8_t)0, /* Flags no more part of the structure. */
+ (uint8_t)0, /* Refs no more part of the structure. */
#if CH_CFG_TIME_QUANTUM > 0
- (uint8_t)_offsetof(thread_t, p_preempt),
+ (uint8_t)_offsetof(thread_t, preempt),
#else
(uint8_t)0,
#endif
#if CH_DBG_THREADS_PROFILING == TRUE
- (uint8_t)_offsetof(thread_t, p_time)
+ (uint8_t)_offsetof(thread_t, time)
#else
(uint8_t)0
#endif
@@ -132,10 +128,7 @@ thread_t *chRegFirstThread(void) {
thread_t *tp;
chSysLock();
- tp = ch.rlist.r_newer;
-#if CH_CFG_USE_DYNAMIC == TRUE
- tp->p_refs++;
-#endif
+ tp = ch.rlist.newer;
chSysUnlock();
return tp;
@@ -156,22 +149,13 @@ thread_t *chRegNextThread(thread_t *tp) {
thread_t *ntp;
chSysLock();
- ntp = tp->p_newer;
+ ntp = tp->newer;
/*lint -save -e9087 -e740 [11.3, 1.3] Cast required by list handling.*/
if (ntp == (thread_t *)&ch.rlist) {
/*lint -restore*/
ntp = NULL;
}
-#if CH_CFG_USE_DYNAMIC == TRUE
- else {
- chDbgAssert(ntp->p_refs < (trefs_t)255, "too many references");
- ntp->p_refs++;
- }
-#endif
chSysUnlock();
-#if CH_CFG_USE_DYNAMIC == TRUE
- chThdRelease(tp);
-#endif
return ntp;
}