From 3b4795b46fa190ea29007a6b9766689cacffe3d2 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 14 Feb 2020 11:20:42 +0100 Subject: config: Remove CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE The CONFIGURE_HAS_OWN_INIT_TASK_TABLE and CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE are the last *_HAS_OWN_* configuration options. These two options are probably unused, see also: * https://lists.rtems.org/pipermail/users/2019-April/033129.html * https://lists.rtems.org/pipermail/users/2019-April/033130.html Removing them simplifies the configuration. If there is a real user need which shows up after the removal, we can resurrect them on demand. Using CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE would have required the use of the undocumented CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME and CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE configuration options. Update #3874. --- testsuites/psxtests/psxfatal01/init.c | 22 +------------------ testsuites/psxtests/psxfatal02/init.c | 40 ++++++++++++----------------------- 2 files changed, 14 insertions(+), 48 deletions(-) (limited to 'testsuites/psxtests') diff --git a/testsuites/psxtests/psxfatal01/init.c b/testsuites/psxtests/psxfatal01/init.c index fb0e2b24ed..ffc5b35b12 100644 --- a/testsuites/psxtests/psxfatal01/init.c +++ b/testsuites/psxtests/psxfatal01/init.c @@ -8,27 +8,7 @@ * Classic API Init task create failure */ -#include - -#include - -/* - * Way too much stack space. Should generate a fatal error - * on the init task create. - */ -#define CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE -#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0 -posix_initialization_threads_table POSIX_Initialization_threads[] = { - { NULL, /* bad thread entry */ - 0 - } -}; - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ - sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ - sizeof(posix_initialization_threads_table) +#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT NULL #define FATAL_ERROR_TEST_NAME "1" #define FATAL_ERROR_DESCRIPTION \ diff --git a/testsuites/psxtests/psxfatal02/init.c b/testsuites/psxtests/psxfatal02/init.c index 260c0aea0d..eaf933092d 100644 --- a/testsuites/psxtests/psxfatal02/init.c +++ b/testsuites/psxtests/psxfatal02/init.c @@ -8,39 +8,25 @@ * Classic API Init task create failure */ -#include -#include - -#include - -/* - * Way too much stack space. Should generate a fatal error - * on the init task create. - */ -#define CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE -#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0 -posix_initialization_threads_table POSIX_Initialization_threads[] = { - { POSIX_Init, -#if INT_MAX < (12 * 1024 * 1024) - INT_MAX -#else - 12 * 1024 * 1024 /* too much stack */ -#endif - } -}; - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ - sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ - sizeof(posix_initialization_threads_table) - #define FATAL_ERROR_TEST_NAME "2" #define FATAL_ERROR_DESCRIPTION \ "POSIX API Init thread create failure -- no memory for stack" #define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE #define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED +static void *stack_allocator(size_t unused) +{ + return NULL; +} + +static void stack_deallocator(void *unused) +{ +} + +#define CONFIGURE_TASK_STACK_ALLOCATOR stack_allocator + +#define CONFIGURE_TASK_STACK_DEALLOCATOR stack_deallocator + static void force_error(void) { /* we will not run this far */ -- cgit v1.2.3