source: rtems/cpukit/rtems/include/rtems/rtems/taskmp.h @ d5154d0f

5
Last change on this file since d5154d0f was d5154d0f, checked in by Aun-Ali Zaidi <admin@…>, on 12/23/15 at 20:44:02

api: Remove deprecated Notepads

Notepads where a feature of RTEMS' tasks that simply functioned in
the same way as POSIX keys or threaded local storage (TLS). They were
introduced well before per task variables, which are also deprecated,
and were barely used in favor of their POSIX alternatives.

In addition to their scarce usage, Notepads took up unnecessary memory.
For each task:

  • 16 32-bit integers were allocated.
  • A total of 64 bytes per task per thread.

This is especially critical in low memory and safety-critical applications.

They are also defined as uint32_t, and therefore are not guaranteed to
hold a pointer.

Lastly, they are not portable solutions for SMP and uniprocessor systems,
like POSIX keys and TLS.

updates #2493.

  • Property mode set to 100644
File size: 4.0 KB
Line 
1/**
2 * @file rtems/rtems/taskmp.h
3 *
4 * @defgroup ClassicTaskMP Task MP Support
5 *
6 * @ingroup ClassicRTEMS
7 * @brief Task Manager MP Support
8 *
9 * This include file contains all the constants and structures associated
10 * with the multiprocessing support in the task manager.
11 */
12
13/* COPYRIGHT (c) 1989-2013.
14 * On-Line Applications Research Corporation (OAR).
15 *
16 * The license and distribution terms for this file may be
17 * found in the file LICENSE in this distribution or at
18 * http://www.rtems.org/license/LICENSE.
19 */
20
21#ifndef _RTEMS_RTEMS_TASKMP_H
22#define _RTEMS_RTEMS_TASKMP_H
23
24#ifndef _RTEMS_RTEMS_TASKSIMPL_H
25# error "Never use <rtems/rtems/taskmp.h> directly; include <rtems/rtems/tasksimpl.h> instead."
26#endif
27
28#include <rtems/score/mpciimpl.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34/**
35 *  @defgroup ClassicTaskMP Task MP Support
36 *
37 *  @ingroup ClassicMP
38 *
39 *  This encapsulates functionality related to the transparent multiprocessing
40 *  support within the Classic API Task Manager.
41 */
42/**@{*/
43
44/**
45 *  The following enumerated type defines the list of
46 *  remote task operations.
47 */
48typedef enum {
49  RTEMS_TASKS_MP_ANNOUNCE_CREATE       =  0,
50  RTEMS_TASKS_MP_ANNOUNCE_DELETE       =  1,
51  RTEMS_TASKS_MP_SUSPEND_REQUEST       =  2,
52  RTEMS_TASKS_MP_SUSPEND_RESPONSE      =  3,
53  RTEMS_TASKS_MP_RESUME_REQUEST        =  4,
54  RTEMS_TASKS_MP_RESUME_RESPONSE       =  5,
55  RTEMS_TASKS_MP_SET_PRIORITY_REQUEST  =  6,
56  RTEMS_TASKS_MP_SET_PRIORITY_RESPONSE =  7,
57}   RTEMS_tasks_MP_Remote_operations;
58
59/**
60 *  The following data structure defines the packet used to perform
61 *  remote task operations.
62 */
63typedef struct {
64  rtems_packet_prefix               Prefix;
65  RTEMS_tasks_MP_Remote_operations  operation;
66  rtems_name                        name;
67  rtems_task_priority               the_priority;
68}   RTEMS_tasks_MP_Packet;
69
70/**
71 *  @brief RTEMS Tasks MP Send Process Packet
72 *
73 *  Multiprocessing Support for the RTEMS Task Manager
74 *
75 *  This routine performs a remote procedure call so that a
76 *  process operation can be performed on another node.
77 */
78void _RTEMS_tasks_MP_Send_process_packet (
79  RTEMS_tasks_MP_Remote_operations operation,
80  Objects_Id                       task_id,
81  rtems_name                       name
82);
83
84/**
85 *  @brief _RTEMS_tasks_MP_Send_request_packet
86 *
87 *  This routine performs a remote procedure call so that a
88 *  directive operation can be initiated on another node.
89 */
90rtems_status_code _RTEMS_tasks_MP_Send_request_packet (
91  RTEMS_tasks_MP_Remote_operations operation,
92  Objects_Id                       task_id,
93  rtems_task_priority              the_priority
94);
95
96/**
97 *  @brief _RTEMS_tasks_MP_Send_response_packet
98 *
99 *  This routine performs a remote procedure call so that a
100 *  directive can be performed on another node.
101 */
102void _RTEMS_tasks_MP_Send_response_packet (
103  RTEMS_tasks_MP_Remote_operations  operation,
104  Thread_Control                   *the_thread
105);
106
107/**
108 *  @brief _RTEMS_tasks_MP_Process_packet
109 *
110 *  This routine performs the actions specific to this package for
111 *  the request from another node.
112 */
113void _RTEMS_tasks_MP_Process_packet (
114  rtems_packet_prefix *the_packet_prefix
115);
116
117/**
118 *  @brief _RTEMS_tasks_MP_Send_object_was_deleted
119 *
120 *  This routine is invoked indirectly by the thread queue
121 *  when a proxy has been removed from the thread queue and
122 *  the remote node must be informed of this.
123 *
124 *  This routine is not needed by RTEMS_tasks since a task
125 *  cannot be deleted when segments are in use.
126 */
127
128/*
129 *  _RTEMS_tasks_MP_Send_extract_proxy
130 *
131 *  This routine is invoked when a task is deleted and it
132 *  has a proxy which must be removed from a thread queue and
133 *  the remote node must be informed of this.
134 *
135 *  This routine is not needed since there are no objects
136 *  deleted by this manager.
137 *
138 */
139
140/**
141 *  @brief _RTEMS_tasks_MP_Get_packet
142 *
143 *  This function is used to obtain a task mp packet.
144 */
145RTEMS_tasks_MP_Packet *_RTEMS_tasks_MP_Get_packet ( void );
146
147#ifdef __cplusplus
148}
149#endif
150
151/**@}*/
152
153#endif
154/* end of file */
Note: See TracBrowser for help on using the repository browser.