source: rtems/cpukit/include/rtems/score/wkspace.h @ 78211376

5
Last change on this file since 78211376 was 78211376, checked in by Sebastian Huber <sebastian.huber@…>, on 12/12/19 at 07:53:32

score: Remove _Workspace_Allocate_or_fatal_error()

This function is unused.

Update #3735.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSScoreWorkspace
5 *
6 * @brief Information Related to the RAM Workspace
7 *
8 * This include file contains information related to the
9 * RAM Workspace.  This Handler provides mechanisms which can be used to
10 * define, initialize and manipulate the workspace.
11 */
12
13/*
14 *  COPYRIGHT (c) 1989-2009.
15 *  On-Line Applications Research Corporation (OAR).
16 *
17 *  The license and distribution terms for this file may be
18 *  found in the file LICENSE in this distribution or at
19 *  http://www.rtems.org/license/LICENSE.
20 */
21
22#ifndef _RTEMS_SCORE_WKSPACE_H
23#define _RTEMS_SCORE_WKSPACE_H
24
25#include <rtems/score/heap.h>
26#include <rtems/score/interr.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/**
33 * @defgroup RTEMSScoreWorkspace Workspace Handler
34 *
35 * @ingroup RTEMSScore
36 *
37 * This handler encapsulates functionality related to the management of
38 * the RTEMS Executive Workspace.
39 *
40 * @{
41 */
42
43/**
44 *  @brief Executive workspace control.
45 *
46 *  This is the heap control structure used to manage the RTEMS Executive
47 *  Workspace.
48 */
49extern Heap_Control _Workspace_Area;
50
51/**
52 * @brief Initilizes the workspace handler.
53 *
54 * This routine performs the initialization necessary for this handler.
55 *
56 * @param areas The heap area for the new workspace.
57 * @param area_count The number of areas for the allocation.
58 * @param extend The extension handler for the new workspace.
59 */
60void _Workspace_Handler_initialization(
61  Heap_Area *areas,
62  size_t area_count,
63  Heap_Initialization_or_extend_handler extend
64);
65
66/**
67 * @brief Allocates a memory block of the specified size from the workspace.
68 *
69 * @param size The size of the memory block.
70 *
71 * @retval pointer The pointer to the memory block.  The pointer is at least
72 *   aligned by CPU_HEAP_ALIGNMENT.
73 * @retval NULL No memory block with the requested size is available in the
74 *   workspace.
75 */
76void *_Workspace_Allocate( size_t size );
77
78/**
79 * @brief Allocates aligned memory from workspace.
80 *
81 * @param size The size of the requested memory.
82 * @param alignment The alignment of the requested memory.
83 *
84 * @retval other The memory area begin.
85 * @retval NULL Not enough resources.
86 */
87void *_Workspace_Allocate_aligned( size_t size, size_t alignment );
88
89/**
90 * @brief Frees memory to the workspace.
91 *
92 * This function frees the specified block of memory.
93 *
94 * @param block The memory to free.
95 *
96 * @note If @a block is equal to NULL, then the request is ignored.
97 *        This allows the caller to not worry about whether or not
98 *        a pointer is NULL.
99 */
100void _Workspace_Free(
101  void *block
102);
103
104/**
105 * @brief Duplicates string with memory from the workspace.
106 *
107 * @param string The pointer to a zero terminated string.
108 * @param len The length of the string (equal to strlen(string)).
109 *
110 * @retval other Duplicated string.
111 * @retval NULL Not enough memory.
112 */
113char *_Workspace_String_duplicate(
114  const char *string,
115  size_t len
116);
117
118/** @} */
119
120#ifdef __cplusplus
121}
122#endif
123
124#endif
125/* end of include file */
Note: See TracBrowser for help on using the repository browser.