source: rtems/cpukit/include/rtems/rtems/dpmemimpl.h @ 493c1e8

5
Last change on this file since 493c1e8 was b07c721, checked in by Andreas Dachsberger <andreas.dachsberger@…>, on 03/28/19 at 12:27:05

doxygen: Restructured cpukit/include/rtems/rtems

Update #3706.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicDPMEMImpl
5 *
6 * @brief Dual Ported Memory Manager Implementation
7 */
8
9/*  COPYRIGHT (c) 1989-2008.
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.org/license/LICENSE.
15 */
16
17#ifndef _RTEMS_RTEMS_DPMEM_INL
18#define _RTEMS_RTEMS_DPMEM_INL
19
20#include <rtems/rtems/dpmemdata.h>
21#include <rtems/score/objectimpl.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/**
28 * @defgroup ClassicDPMEMImpl Dual Ported Memory Manager Implementation
29 *
30 * @ingroup RTEMSInternalClassic
31 *
32 * @{
33 */
34
35/**
36 *  @brief Allocates a port control block from the inactive chain
37 *  of free port control blocks.
38 *
39 *  This routine allocates a port control block from the inactive chain
40 *  of free port control blocks.
41 */
42RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
43   *_Dual_ported_memory_Allocate ( void )
44{
45  return (Dual_ported_memory_Control *)
46     _Objects_Allocate( &_Dual_ported_memory_Information );
47}
48
49/**
50 *  @brief Frees a port control block to the inactive chain
51 *  of free port control blocks.
52 *
53 *  This routine frees a port control block to the inactive chain
54 *  of free port control blocks.
55 */
56RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free (
57   Dual_ported_memory_Control *the_port
58)
59{
60  _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object );
61}
62
63RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get(
64  Objects_Id        id,
65  ISR_lock_Context *lock_context
66)
67{
68  return (Dual_ported_memory_Control *)
69    _Objects_Get( id, lock_context, &_Dual_ported_memory_Information );
70}
71
72/**@}*/
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif /* _RTEMS_RTEMS_DPMEM_INL */
79/* end of include file */
Note: See TracBrowser for help on using the repository browser.