summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/thread.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-10 11:13:18 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-12 09:08:41 +0100
commitd252e20ab5717afea2ac89543ab4e0d379434bb0 (patch)
tree3842cffab1df421f283ebd5c6c90577e8469efc1 /cpukit/include/rtems/score/thread.h
parentscore: Add _Objects_Allocate_with_extend() (diff)
downloadrtems-d252e20ab5717afea2ac89543ab4e0d379434bb0.tar.bz2
score: Simplify _Thread_Initialize()
Allocate new thread queue heads during objects information extend. This removes an error case and the last dependency on the workspace in _Thread_Initialize(). Update #3835.
Diffstat (limited to 'cpukit/include/rtems/score/thread.h')
-rw-r--r--cpukit/include/rtems/score/thread.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/cpukit/include/rtems/score/thread.h b/cpukit/include/rtems/score/thread.h
index d666944dcf..3e2e0638f8 100644
--- a/cpukit/include/rtems/score/thread.h
+++ b/cpukit/include/rtems/score/thread.h
@@ -1039,6 +1039,14 @@ Thread_Information name##_Information = { \
} \
}
+/**
+ * @brief Return an inactive thread object or NULL.
+ *
+ * @retval NULL No inactive object is available.
+ * @retval object An inactive object.
+ */
+Objects_Control *_Thread_Allocate_unlimited( Objects_Information *information );
+
#define THREAD_INFORMATION_DEFINE( name, api, cls, max ) \
static Objects_Control * \
name##_Local_table[ _Objects_Maximum_per_allocation( max ) ]; \
@@ -1051,7 +1059,7 @@ Thread_Information name##_Information = { \
_Objects_Build_id( api, cls, 1, _Objects_Maximum_per_allocation( max ) ), \
name##_Local_table, \
_Objects_Is_unlimited( max ) ? \
- _Objects_Allocate_unlimited : _Objects_Allocate_static, \
+ _Thread_Allocate_unlimited : _Objects_Allocate_static, \
_Objects_Is_unlimited( max ) ? \
_Objects_Free_unlimited : _Objects_Free_static, \
0, \