RTEMS 6.1-rc5
Loading...
Searching...
No Matches
initthread.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
15/*
16 * Copyright (C) 2020 embedded brains GmbH & Co. KG
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 * POSSIBILITY OF SUCH DAMAGE.
38 */
39
40#ifndef _RTEMS_CONFDEFS_INITTHREAD_H
41#define _RTEMS_CONFDEFS_INITTHREAD_H
42
43#ifndef __CONFIGURATION_TEMPLATE_h
44#error "Do not include this file directly, use <rtems/confdefs.h> instead"
45#endif
46
47#ifdef CONFIGURE_INIT
48
49#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
50
52#include <rtems/posix/pthread.h>
53#include <rtems/sysinit.h>
54
55#ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
56 #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init
57#endif
58
59#ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
60 #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
61 CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE
62#endif
63
64#if CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
65 > CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE
66 #define _CONFIGURE_POSIX_INIT_THREAD_STACK_EXTRA \
67 ( CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - \
68 CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE )
69#endif
70
71#ifdef __cplusplus
72extern "C" {
73#endif
74
78};
79
82 RTEMS_SYSINIT_POSIX_USER_THREADS,
83 RTEMS_SYSINIT_ORDER_MIDDLE
84);
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif /* CONFIGURE_POSIX_INIT_THREAD_TABLE */
91
92#ifndef _CONFIGURE_POSIX_INIT_THREAD_STACK_EXTRA
93 #define _CONFIGURE_POSIX_INIT_THREAD_STACK_EXTRA 0
94#endif
95
96#endif /* CONFIGURE_INIT */
97
98#endif /* _RTEMS_CONFDEFS_INITTHREAD_H */
This header file evaluates configuration options related to the per-CPU configuration.
const posix_initialization_threads_table _POSIX_Threads_User_thread_table
Initialization table for the first user POSIX thread.
void _POSIX_Threads_Initialize_user_thread(void)
System initialization handler to create the first user POSIX thread.
Definition: pthreadinitthreads.c:49
#define RTEMS_SYSINIT_ITEM(handler, module, order)
Creates the system initialization item associated with the handler, module, and order.
Definition: sysinit.h:204
#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE
This configuration option is an integer define.
Definition: appl-config.h:4396
#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
This configuration option is an initializer define.
Definition: appl-config.h:4368
POSIX Threads Private Support.
Definition: pthread.h:62
This header file provides the API of the System Initialization Support.