1 #include "ace/config-all.h"
2 #include "ace/Guard_T.h"
3 #include "ace/Synch_Traits.h"
4 #include "ace/Thread_Mutex.h"
10 #include "jaws3/FILE.h"
13 JAWS_FILE::JAWS_FILE ()
19 JAWS_FILE::~JAWS_FILE ()
26 JAWS_FILE::mem_map (int length
,
31 LPSECURITY_ATTRIBUTES sa
) const
33 if (this->can_map_
== 0)
36 JAWS_FILE
*mutable_this
= (JAWS_FILE
*) this;
37 return mutable_this
->mem_map (length
, prot
, share
, addr
, offset
, sa
);
41 JAWS_FILE::mem_map (int length
,
46 LPSECURITY_ATTRIBUTES sa
)
48 if (this->can_map_
== 0)
53 ACE_GUARD_RETURN (ACE_SYNCH_MUTEX
, g
, this->lock_
, 0);
57 this->map_
= new ACE_Mem_Map
;
60 int r
= this->map_
->map (this->get_handle (),
61 static_cast<size_t> (length
),
81 JAWS_FILE::map () const
87 JAWS_FILE::can_map (int flag
)
89 this->can_map_
= (flag
!= 0);