source: rtems/cpukit/score/inline/rtems/score/wkspace.inl @ 61d330f5

4.104.114.84.95
Last change on this file since 61d330f5 was 61d330f5, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/21/05 at 07:53:52

New header guards.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/**
2 *  @file  rtems/score/wkspace.inl
3 *
4 *  This include file contains the bodies of the routines which contains
5 *  information related to the RAM Workspace.
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2004.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef _RTEMS_SCORE_WKSPACE_INL
20#define _RTEMS_SCORE_WKSPACE_INL
21
22/**
23 *  @addtogroup ScoreWorkspace
24 *  @{
25 */
26
27/**
28 *  This routine returns the address of a block of memory of size
29 *  bytes.  If a block of the appropriate size cannot be allocated
30 *  from the workspace, then NULL is returned.
31 */
32
33RTEMS_INLINE_ROUTINE void *_Workspace_Allocate(
34  uint32_t   size
35)
36{
37   return _Heap_Allocate( &_Workspace_Area, size );
38}
39
40/**
41 *  This function frees the specified block of memory.  If the block
42 *  belongs to the Workspace and can be successfully freed, then
43 *  TRUE is returned.  Otherwise FALSE is returned.
44 */
45
46RTEMS_INLINE_ROUTINE boolean _Workspace_Free(
47  void *block
48)
49{
50   return _Heap_Free( &_Workspace_Area, block );
51}
52
53/**@}*/
54
55#endif
56/* end of include file */
Note: See TracBrowser for help on using the repository browser.