rtems: Move internal structures to tasksdata.h

Update #3598.
This commit is contained in:
Sebastian Huber
2018-11-08 10:57:21 +01:00
parent 739df1f583
commit b7af3e449a
13 changed files with 90 additions and 67 deletions

View File

@@ -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

View File

@@ -39,6 +39,7 @@
#include <rtems/rtems/ratemondata.h>
#include <rtems/rtems/regiondata.h>
#include <rtems/rtems/semdata.h>
#include <rtems/rtems/tasksdata.h>
#include <rtems/posix/key.h>
#include <rtems/posix/mqueue.h>
#include <rtems/posix/pthread.h>

View File

@@ -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 <rtems/score/object.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/thread.h>
#include <rtems/rtems/asrdata.h>
#include <rtems/rtems/attr.h>
#include <rtems/rtems/eventdata.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/types.h>
@@ -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

View File

@@ -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 <rtems/rtems/tasks.h>
#include <rtems/rtems/asrdata.h>
#include <rtems/rtems/eventdata.h>
#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 */

View File

@@ -17,7 +17,7 @@
#ifndef _RTEMS_RTEMS_TASKSIMPL_H
#define _RTEMS_RTEMS_TASKSIMPL_H
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/tasksdata.h>
#include <rtems/score/objectimpl.h>
#include <rtems/score/schedulerimpl.h>
#include <rtems/score/threadimpl.h>

View File

@@ -8,6 +8,7 @@
#include <rtems.h>
#include <rtems/monitor.h>
#include <rtems/rtems/tasksdata.h>
#include <rtems/score/schedulerimpl.h>
#include <rtems/score/threadimpl.h>
#include <rtems/score/threadqimpl.h>

View File

@@ -19,7 +19,7 @@
#endif
#include <rtems/rtems/eventimpl.h>
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/tasksdata.h>
#include <rtems/score/statesimpl.h>
#include <rtems/score/threadimpl.h>

View File

@@ -19,7 +19,7 @@
#endif
#include <rtems/rtems/eventimpl.h>
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/tasksdata.h>
#include <rtems/score/threadimpl.h>
rtems_status_code rtems_event_send(

View File

@@ -21,7 +21,7 @@
#include <rtems/sysinit.h>
#include <rtems/rtems/signalimpl.h>
#include <rtems/rtems/asrimpl.h>
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/tasksdata.h>
#include <rtems/score/assert.h>
#include <rtems/score/threadimpl.h>

View File

@@ -20,7 +20,7 @@
#include <rtems/rtems/signalimpl.h>
#include <rtems/rtems/asrimpl.h>
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/tasksdata.h>
#include <rtems/score/threaddispatch.h>
#include <rtems/score/threadimpl.h>

View File

@@ -25,7 +25,7 @@
#endif
#include <rtems/rtems/eventimpl.h>
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/tasksdata.h>
#include <rtems/score/statesimpl.h>
#include <rtems/score/threadimpl.h>

View File

@@ -25,7 +25,7 @@
#endif
#include <rtems/rtems/eventimpl.h>
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/tasksdata.h>
#include <rtems/score/threadimpl.h>
rtems_status_code rtems_event_system_send(

View File

@@ -18,7 +18,7 @@
#include "config.h"
#endif
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/tasksdata.h>
#include <rtems/rtems/asrimpl.h>
#include <rtems/rtems/modesimpl.h>
#include <rtems/rtems/signalimpl.h>