summaryrefslogtreecommitdiff
path: root/ace/Shared_Memory_SV.i
blob: 400d9e632012fd7d830bf930170cfb8ad151f4f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* -*- C++ -*- */
// $Id$

// Shared_Memory_SV.i

ACE_INLINE int 	       
ACE_Shared_Memory_SV::open (key_t id, 
			    int length, 
			    int create, 
			    int perms, 
			    void *addr, 
			    int flags)
{
  ACE_TRACE ("ACE_Shared_Memory_SV::open");
  return shared_memory_.open_and_attach (id, length, create, 
					 perms, addr, flags);
}

// The overall size of the segment. 

ACE_INLINE int
ACE_Shared_Memory_SV::get_segment_size (void) const
{
  ACE_TRACE ("ACE_Shared_Memory_SV::get_segment_size");
  return this->shared_memory_.get_segment_size ();
}

// Removes the shared memory segment.

ACE_INLINE int
ACE_Shared_Memory_SV::remove (void)
{
  ACE_TRACE ("ACE_Shared_Memory_SV::remove");
  return shared_memory_.remove ();
}

// Closes (detaches) the shared memory segment. 

ACE_INLINE int
ACE_Shared_Memory_SV::close (void)
{
  ACE_TRACE ("ACE_Shared_Memory_SV::close");
  return shared_memory_.detach ();
}

ACE_INLINE void *
ACE_Shared_Memory_SV::malloc (size_t)
{
  ACE_TRACE ("ACE_Shared_Memory_SV::malloc");
  return this->shared_memory_.get_segment_ptr ();
}

ACE_INLINE ACE_HANDLE
ACE_Shared_Memory_SV::get_id (void) const
{
  ACE_TRACE ("ACE_Shared_Memory_SV::get_id");
  return this->shared_memory_.get_id ();
}

// The "do-nothing" constructor.

ACE_INLINE
ACE_Shared_Memory_SV::ACE_Shared_Memory_SV (void)
{
  ACE_TRACE ("ACE_Shared_Memory_SV::ACE_Shared_Memory_SV");
}

ACE_INLINE int  
ACE_Shared_Memory_SV::free (void *p)
{
  ACE_TRACE ("ACE_Shared_Memory_SV::free");
  return p != 0;
}