source: rtems/testsuites/psxtests/psxfatal02/init.c @ 1a48cbf

5
Last change on this file since 1a48cbf was 1a48cbf, checked in by Sebastian Huber <sebastian.huber@…>, on 11/11/19 at 19:08:46

sptests: Avoid include path magic

Update #3818.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#endif
4
5#include "../psxfatal_support/psxfatal.h"
6
7/*
8 * Classic API Init task create failure
9 */
10
11#include <errno.h>
12#include <limits.h>
13
14#include <rtems/posix/posixapi.h>
15
16/*
17 *  Way too much stack space.  Should generate a fatal error
18 *  on the init task create.
19 */
20#define CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
21#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0
22posix_initialization_threads_table POSIX_Initialization_threads[] = {
23  { POSIX_Init,
24#if INT_MAX < (12 * 1024 * 1024)
25    INT_MAX
26#else
27    12 * 1024 * 1024 /* too much stack */
28#endif
29  }
30};
31
32#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads
33
34#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \
35  sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \
36      sizeof(posix_initialization_threads_table)
37
38#define FATAL_ERROR_TEST_NAME            "2"
39#define FATAL_ERROR_DESCRIPTION \
40        "POSIX API Init thread create failure -- no memory for stack"
41#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_CORE
42#define FATAL_ERROR_EXPECTED_ERROR       INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED
43
44static void force_error(void)
45{
46  /* we will not run this far */
47}
48
49#include "../psxfatal_support/psxfatalimpl.h"
Note: See TracBrowser for help on using the repository browser.