diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-30 02:33:23 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-30 02:33:23 +0000 |
commit | c69a1972ec59bb75ff912f906532cab5e4dcee87 (patch) | |
tree | 769109d504e20ab1b780022efb600d075499a831 /ace | |
parent | 8162792edd74cbbde7bccd030edf2bdc54cbdebb (diff) | |
download | ATCD-c69a1972ec59bb75ff912f906532cab5e4dcee87.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r-- | ace/OS.i | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -7801,6 +7801,7 @@ ACE_OS::open (const char *filename, return 0; #elif defined (ACE_WIN32) ACE_UNUSED_ARG (perms); + ACE_MT (ACE_Thread_Mutex *ace_os_monitor_lock = 0); DWORD access = GENERIC_READ; if (ACE_BIT_ENABLED (mode, O_WRONLY)) @@ -7841,6 +7842,11 @@ ACE_OS::open (const char *filename, if (ACE_BIT_ENABLED (mode, FILE_FLAG_POSIX_SEMANTICS)) flags |= FILE_FLAG_POSIX_SEMANTICS; + ACE_MT (if (ACE_BIT_ENABLED (mode, _O_APPEND)) { ace_os_monitor_lock = + ACE_Managed_Object<ACE_Thread_Mutex>::get_preallocated_object + (ACE_Object_Manager::ACE_OS_MONITOR_LOCK); + ace_os_monitor_lock->acquire (); }) + ACE_HANDLE h = ::CreateFileA (filename, access, FILE_SHARE_READ | FILE_SHARE_WRITE, ACE_OS::default_win32_security_attributes (sa), @@ -7851,8 +7857,9 @@ ACE_OS::open (const char *filename, if (h == ACE_INVALID_HANDLE) ACE_FAIL_RETURN (h); - if (ACE_BIT_ENABLED (mode, _O_APPEND)) + ACE_MT (if (ace_os_monitor_lock != 0)) ::SetFilePointer (h, 0, 0, FILE_END); + ACE_MT (ace_os_monitor_lock->release ()); return h; #else |