From b7af3e449a513c6f4b5623ddeb35b8d61399f8f5 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 8 Nov 2018 10:57:21 +0100 Subject: rtems: Move internal structures to tasksdata.h Update #3598. --- cpukit/headers.am | 1 + cpukit/include/rtems/confdefs.h | 1 + cpukit/include/rtems/rtems/tasks.h | 62 ++------------------------- cpukit/include/rtems/rtems/tasksdata.h | 76 ++++++++++++++++++++++++++++++++++ cpukit/include/rtems/rtems/tasksimpl.h | 2 +- cpukit/libmisc/monitor/mon-task.c | 1 + cpukit/rtems/src/eventreceive.c | 2 +- cpukit/rtems/src/eventsend.c | 2 +- cpukit/rtems/src/signalcatch.c | 2 +- cpukit/rtems/src/signalsend.c | 2 +- cpukit/rtems/src/systemeventreceive.c | 2 +- cpukit/rtems/src/systemeventsend.c | 2 +- cpukit/rtems/src/taskmode.c | 2 +- 13 files changed, 90 insertions(+), 67 deletions(-) create mode 100644 cpukit/include/rtems/rtems/tasksdata.h diff --git a/cpukit/headers.am b/cpukit/headers.am index 02f45542d7..458c0ae75d 100644 --- a/cpukit/headers.am +++ b/cpukit/headers.am @@ -275,6 +275,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/statusimpl.h include_rtems_rtems_HEADERS += include/rtems/rtems/support.h include_rtems_rtems_HEADERS += include/rtems/rtems/taskmp.h include_rtems_rtems_HEADERS += include/rtems/rtems/tasks.h +include_rtems_rtems_HEADERS += include/rtems/rtems/tasksdata.h include_rtems_rtems_HEADERS += include/rtems/rtems/tasksimpl.h include_rtems_rtems_HEADERS += include/rtems/rtems/timer.h include_rtems_rtems_HEADERS += include/rtems/rtems/timerimpl.h diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h index 0062d3934f..5ba3caebca 100644 --- a/cpukit/include/rtems/confdefs.h +++ b/cpukit/include/rtems/confdefs.h @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/cpukit/include/rtems/rtems/tasks.h b/cpukit/include/rtems/rtems/tasks.h index 10f8936a0f..e0272e06f9 100644 --- a/cpukit/include/rtems/rtems/tasks.h +++ b/cpukit/include/rtems/rtems/tasks.h @@ -1,28 +1,9 @@ /** - * @file rtems/rtems/tasks.h + * @file * - * @defgroup ClassicTasks Tasks + * @ingroup ClassicTasks * - * @ingroup ClassicRTEMS - * @brief RTEMS Tasks - * - * This include file contains all constants and structures associated - * with RTEMS tasks. This manager provides a comprehensive set of directives - * to create, delete, and administer tasks. - * - * Directives provided are: - * - * - create a task - * - get an ID of a task - * - start a task - * - restart a task - * - delete a task - * - suspend a task - * - resume a task - * - set a task's priority - * - change the current task's mode - * - wake up after interval - * - wake up when specified + * @brief Classic Task Manager API */ /* @@ -37,12 +18,9 @@ #ifndef _RTEMS_RTEMS_TASKS_H #define _RTEMS_RTEMS_TASKS_H -#include #include #include -#include #include -#include #include #include @@ -676,40 +654,6 @@ rtems_status_code rtems_scheduler_remove_processor( /**@}*/ -/** - * This is the API specific information required by each thread for - * the RTEMS API to function correctly. - * - */ -typedef struct { - /** This field contains the event control for this task. */ - Event_Control Event; - /** This field contains the system event control for this task. */ - Event_Control System_event; - /** This field contains the Classic API Signal information for this task. */ - ASR_Information Signal; - - /** - * @brief Signal post-switch action in case signals are pending. - */ - Thread_Action Signal_action; -} RTEMS_API_Control; - -/** - * @brief _RTEMS_tasks_Initialize_user_tasks_body - * - * This routine creates and starts all configured user - * initialization threads. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * RTEMS Task Manager - */ - -extern void _RTEMS_tasks_Initialize_user_tasks_body( void ); - #ifdef __cplusplus } #endif diff --git a/cpukit/include/rtems/rtems/tasksdata.h b/cpukit/include/rtems/rtems/tasksdata.h new file mode 100644 index 0000000000..22e524d027 --- /dev/null +++ b/cpukit/include/rtems/rtems/tasksdata.h @@ -0,0 +1,76 @@ +/** + * @file + * + * @ingroup ClassicTasksImpl + * + * @brief Classic Tasks Manager Data Structures + */ + +/* + * COPYRIGHT (c) 1989-2014. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef _RTEMS_RTEMS_TASKSDATA_H +#define _RTEMS_RTEMS_TASKSDATA_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup ClassicTasksImpl + * + * @{ + */ + +/** + * This is the API specific information required by each thread for + * the RTEMS API to function correctly. + * + */ +typedef struct { + /** This field contains the event control for this task. */ + Event_Control Event; + /** This field contains the system event control for this task. */ + Event_Control System_event; + /** This field contains the Classic API Signal information for this task. */ + ASR_Information Signal; + + /** + * @brief Signal post-switch action in case signals are pending. + */ + Thread_Action Signal_action; +} RTEMS_API_Control; + +/** + * @brief _RTEMS_tasks_Initialize_user_tasks_body + * + * This routine creates and starts all configured user + * initialization threads. + * + * Input parameters: NONE + * + * Output parameters: NONE + * + * RTEMS Task Manager + */ + +extern void _RTEMS_tasks_Initialize_user_tasks_body( void ); + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ diff --git a/cpukit/include/rtems/rtems/tasksimpl.h b/cpukit/include/rtems/rtems/tasksimpl.h index b0432351f3..b6694cc416 100644 --- a/cpukit/include/rtems/rtems/tasksimpl.h +++ b/cpukit/include/rtems/rtems/tasksimpl.h @@ -17,7 +17,7 @@ #ifndef _RTEMS_RTEMS_TASKSIMPL_H #define _RTEMS_RTEMS_TASKSIMPL_H -#include +#include #include #include #include diff --git a/cpukit/libmisc/monitor/mon-task.c b/cpukit/libmisc/monitor/mon-task.c index 26528d7292..e1126b6457 100644 --- a/cpukit/libmisc/monitor/mon-task.c +++ b/cpukit/libmisc/monitor/mon-task.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/cpukit/rtems/src/eventreceive.c b/cpukit/rtems/src/eventreceive.c index 193960b7b2..75a5293787 100644 --- a/cpukit/rtems/src/eventreceive.c +++ b/cpukit/rtems/src/eventreceive.c @@ -19,7 +19,7 @@ #endif #include -#include +#include #include #include diff --git a/cpukit/rtems/src/eventsend.c b/cpukit/rtems/src/eventsend.c index 8a159fc7f3..6a383d8892 100644 --- a/cpukit/rtems/src/eventsend.c +++ b/cpukit/rtems/src/eventsend.c @@ -19,7 +19,7 @@ #endif #include -#include +#include #include rtems_status_code rtems_event_send( diff --git a/cpukit/rtems/src/signalcatch.c b/cpukit/rtems/src/signalcatch.c index 435ea2fa54..03c2b976d3 100644 --- a/cpukit/rtems/src/signalcatch.c +++ b/cpukit/rtems/src/signalcatch.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpukit/rtems/src/signalsend.c b/cpukit/rtems/src/signalsend.c index 777e306afc..b2931916d9 100644 --- a/cpukit/rtems/src/signalsend.c +++ b/cpukit/rtems/src/signalsend.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/cpukit/rtems/src/systemeventreceive.c b/cpukit/rtems/src/systemeventreceive.c index 93a5694eec..64093c27a5 100644 --- a/cpukit/rtems/src/systemeventreceive.c +++ b/cpukit/rtems/src/systemeventreceive.c @@ -25,7 +25,7 @@ #endif #include -#include +#include #include #include diff --git a/cpukit/rtems/src/systemeventsend.c b/cpukit/rtems/src/systemeventsend.c index 978c49b7ac..53d9b6f1eb 100644 --- a/cpukit/rtems/src/systemeventsend.c +++ b/cpukit/rtems/src/systemeventsend.c @@ -25,7 +25,7 @@ #endif #include -#include +#include #include rtems_status_code rtems_event_system_send( diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c index e16faa53fb..7f26bff14e 100644 --- a/cpukit/rtems/src/taskmode.c +++ b/cpukit/rtems/src/taskmode.c @@ -18,7 +18,7 @@ #include "config.h" #endif -#include +#include #include #include #include -- cgit v1.2.3