From 4cb19041d7d78d9ae29f878871e4d2b89b9abc22 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 16 Jun 2008 15:54:21 +0000 Subject: 2008-06-16 Joel Sherrill * rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/tasks.h, rtems/src/taskgetnote.c, rtems/src/tasks.c, rtems/src/tasksetnote.c, sapi/include/confdefs.h: Add CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS. --- cpukit/rtems/include/rtems/rtems/config.h | 13 +++++++++++++ cpukit/rtems/include/rtems/rtems/tasks.h | 12 ++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) (limited to 'cpukit/rtems/include') diff --git a/cpukit/rtems/include/rtems/rtems/config.h b/cpukit/rtems/include/rtems/rtems/config.h index 5afc3063d4..4298e6a215 100644 --- a/cpukit/rtems/include/rtems/rtems/config.h +++ b/cpukit/rtems/include/rtems/rtems/config.h @@ -47,6 +47,12 @@ typedef struct { */ uint32_t maximum_tasks; + /** + * This field indicates whether Classic API notepads are + * enabled or disabled. + */ + boolean notepads_enabled; + /** * This field contains the maximum number of Classic API * Timers which are configured for this application. @@ -110,6 +116,13 @@ typedef struct { rtems_initialization_tasks_table *User_initialization_tasks_table; } rtems_api_configuration_table; +/** + * This macro returns the value of the notepads enabled field + * in the Classic API configuration table. + */ +#define rtems_configuration_get_notepads_enabled() \ + rtems_configuration_get_rtems_api_configuration()->notepads_enabled + #ifdef __cplusplus } #endif diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h index f09b0eb329..fe9f20ef45 100644 --- a/cpukit/rtems/include/rtems/rtems/tasks.h +++ b/cpukit/rtems/include/rtems/rtems/tasks.h @@ -201,16 +201,24 @@ typedef struct { /** * This is the API specific information required by each thread for * the RTEMS API to function correctly. + * + * @note Notepads must be the last entry in the structure and memory + * will be taken away from this structure when allocated if + * notespads are disabled by the application configuration. */ typedef struct { - /** This field contains the notepads for this task. */ - uint32_t Notepads[ RTEMS_NUMBER_NOTEPADS ]; /** This field contains the pending events for this task. */ rtems_event_set pending_events; /** This field contains the event wait condition for this task. */ rtems_event_set event_condition; /** This field contains the Classic API Signal information for this task. */ ASR_Information Signal; + /** + * This field contains the notepads for this task. + * + * @note MUST BE LAST ENTRY. + */ + uint32_t Notepads[ RTEMS_NUMBER_NOTEPADS ]; } RTEMS_API_Control; /** -- cgit v1.2.3