diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-22 19:14:51 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-14 07:03:29 +0100 |
commit | 21275b58a5a69c3c838082ffc8a7a3641f32ea9a (patch) | |
tree | d331e17c15d71f107d0f14581a93ddf768b05813 /testsuites/sptests/spfreechain01 | |
parent | rtems: Use object information to get config max (diff) | |
download | rtems-21275b58a5a69c3c838082ffc8a7a3641f32ea9a.tar.bz2 |
score: Static Objects_Information initialization
Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>. Provide default object
informations with zero objects via librtemscpu.a. This greatly
simplifies the workspace size estimate. RTEMS applications which do not
use the unlimited objects option are easier to debug since all objects
reside now in statically allocated objects of the right types.
Close #3621.
Diffstat (limited to 'testsuites/sptests/spfreechain01')
-rw-r--r-- | testsuites/sptests/spfreechain01/init.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/testsuites/sptests/spfreechain01/init.c b/testsuites/sptests/spfreechain01/init.c index 60388101ea..22730793a4 100644 --- a/testsuites/sptests/spfreechain01/init.c +++ b/testsuites/sptests/spfreechain01/init.c @@ -25,13 +25,16 @@ static rtems_task Init(rtems_task_argument ignored) { Freechain_Control fc; test_node *node; + test_node node2; TEST_BEGIN(); - _Freechain_Initialize(&fc, NULL, 0, sizeof(test_node)); - rtems_test_assert(_Chain_Is_empty(&fc.Free)); + _Freechain_Initialize(&fc, &node2, 1, sizeof(node2)); + rtems_test_assert(_Chain_Node_count_unprotected(&fc.Free) == 1); + rtems_test_assert(_Chain_First(&fc.Free) == &node2.Node); + rtems_test_assert(_Chain_Last(&fc.Free) == &node2.Node); - _Freechain_Initialize(&fc, malloc, 1, SIZE_MAX); + _Freechain_Initialize(&fc, NULL, 0, sizeof(test_node)); rtems_test_assert(_Chain_Is_empty(&fc.Free)); rtems_test_assert(_Freechain_Get(&fc, NULL, 0, sizeof(test_node)) == NULL); |