1 | /* inline/dpmem.inl |
---|
2 | * |
---|
3 | * This include file contains the inline routine used in conjunction |
---|
4 | * with the Dual Ported Memory Manager |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * All rights assigned to U.S. Government, 1994. |
---|
9 | * |
---|
10 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
11 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
12 | * notice must appear in all copies of this file and its derivatives. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __INLINE_DPMEM_inl |
---|
18 | #define __INLINE_DPMEM_inl |
---|
19 | |
---|
20 | |
---|
21 | /*PAGE |
---|
22 | * |
---|
23 | * _Dual_ported_memory_Allocate |
---|
24 | * |
---|
25 | */ |
---|
26 | |
---|
27 | STATIC INLINE Dual_ported_memory_Control |
---|
28 | *_Dual_ported_memory_Allocate ( void ) |
---|
29 | { |
---|
30 | return (Dual_ported_memory_Control *) |
---|
31 | _Objects_Allocate( &_Dual_ported_memory_Information ); |
---|
32 | } |
---|
33 | |
---|
34 | /*PAGE |
---|
35 | * |
---|
36 | * _Dual_ported_memory_Free |
---|
37 | * |
---|
38 | */ |
---|
39 | |
---|
40 | STATIC INLINE void _Dual_ported_memory_Free ( |
---|
41 | Dual_ported_memory_Control *the_port |
---|
42 | ) |
---|
43 | { |
---|
44 | _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); |
---|
45 | } |
---|
46 | |
---|
47 | /*PAGE |
---|
48 | * |
---|
49 | * _Dual_ported_memory_Get |
---|
50 | * |
---|
51 | */ |
---|
52 | |
---|
53 | STATIC INLINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( |
---|
54 | Objects_Id id, |
---|
55 | Objects_Locations *location |
---|
56 | ) |
---|
57 | { |
---|
58 | return (Dual_ported_memory_Control *) |
---|
59 | _Objects_Get( &_Dual_ported_memory_Information, id, location ); |
---|
60 | } |
---|
61 | |
---|
62 | /*PAGE |
---|
63 | * |
---|
64 | * _Dual_ported_memory_Is_null |
---|
65 | */ |
---|
66 | |
---|
67 | STATIC INLINE boolean _Dual_ported_memory_Is_null( |
---|
68 | Dual_ported_memory_Control *the_port |
---|
69 | ) |
---|
70 | { |
---|
71 | return ( the_port == NULL ); |
---|
72 | } |
---|
73 | |
---|
74 | #endif |
---|
75 | /* end of include file */ |
---|