diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-01-29 02:38:49 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-01-29 02:38:49 +0000 |
commit | 08323935b1f1736193729dc894064200dad6b7e4 (patch) | |
tree | f27c16bdb12793db00cb39ef36940c476484701f /ace | |
parent | 47e0dd371c9315dc00fc33292016b39c7cf3262c (diff) | |
download | ATCD-08323935b1f1736193729dc894064200dad6b7e4.tar.gz |
foo
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Addr.h | 1 | ||||
-rw-r--r-- | ace/Memory_Pool.cpp | 13 | ||||
-rw-r--r-- | ace/Memory_Pool.h | 9 | ||||
-rw-r--r-- | ace/OS.cpp | 5 | ||||
-rw-r--r-- | ace/OS.i | 10 | ||||
-rw-r--r-- | ace/README | 2 | ||||
-rw-r--r-- | ace/config-linux.h | 4 | ||||
-rw-r--r-- | ace/config-win32-msvc4.x.h | 1 | ||||
-rw-r--r-- | ace/config-winnt-4.0-msvc4.x.h | 1 |
9 files changed, 31 insertions, 15 deletions
diff --git a/ace/Addr.h b/ace/Addr.h index 7b76d325b28..b7c4d5b3c5a 100644 --- a/ace/Addr.h +++ b/ace/Addr.h @@ -1,7 +1,6 @@ /* -*- C++ -*- */ // $Id$ - // ============================================================================ // // = LIBRARY diff --git a/ace/Memory_Pool.cpp b/ace/Memory_Pool.cpp index a329fc8acac..19fe4e41bd1 100644 --- a/ace/Memory_Pool.cpp +++ b/ace/Memory_Pool.cpp @@ -105,7 +105,8 @@ ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (LPCTSTR backing_store_name, const OPTIONS *options) : base_addr_ (0), flags_ (MAP_SHARED), - write_each_page_ (0) + write_each_page_ (0), + minimum_bytes_ (0) { ACE_TRACE ("ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool"); @@ -118,6 +119,7 @@ ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (LPCTSTR backing_store_name, ACE_SET_BITS (flags_, MAP_FIXED); } this->write_each_page_ = options->write_each_page_; + this->minimum_bytes_ = options->minimum_bytes_; } if (backing_store_name == 0) @@ -235,6 +237,9 @@ ACE_MMAP_Memory_Pool::init_acquire (size_t nbytes, first_time = 0; + if (nbytes < this->minimum_bytes_) + nbytes = this->minimum_bytes_; + if (this->mmap_.open (this->backing_store_name_, O_RDWR | O_CREAT | O_TRUNC | O_EXCL, ACE_DEFAULT_FILE_PERMS) != -1) @@ -281,10 +286,12 @@ ACE_MMAP_Memory_Pool::remap (void *addr) ACE_MMAP_Memory_Pool_Options::ACE_MMAP_Memory_Pool_Options (void *base_addr, int use_fixed_addr, - int write_each_page) + int write_each_page, + int minimum_bytes) : base_addr_ (base_addr), use_fixed_addr_ (use_fixed_addr), - write_each_page_ (write_each_page) + write_each_page_ (write_each_page), + minimum_bytes_ (minimum_bytes) { ACE_TRACE ("ACE_MMAP_Memory_Pool_Options::ACE_MMAP_Memory_Pool_Options"); } diff --git a/ace/Memory_Pool.h b/ace/Memory_Pool.h index f76a0fa7459..fa17480a3e2 100644 --- a/ace/Memory_Pool.h +++ b/ace/Memory_Pool.h @@ -297,7 +297,8 @@ public: // = Initialization method. ACE_MMAP_Memory_Pool_Options (void *base_addr = ACE_DEFAULT_BASE_ADDR, int use_fixed_addr = 1, - int write_each_page = 1); + int write_each_page = 1, + int minimum_bytes = 0); void *base_addr_; // Base address of the memory-mapped backing store. @@ -308,6 +309,9 @@ public: int write_each_page_; // Should each page be written eagerly to avoid surprises later // on? + + int minimum_bytes_; + // What the minimim bytes of the initial segment should be. }; class ACE_Export ACE_MMAP_Memory_Pool : public ACE_Event_Handler @@ -406,6 +410,9 @@ protected: // Should we write a byte to each page to forceably allocate memory // for this backing store? + int minimum_bytes_; + // What the minimim bytes of the initial segment should be. + TCHAR backing_store_name_[MAXPATHLEN]; // Name of the backing store where the shared memory pool is kept. }; diff --git a/ace/OS.cpp b/ace/OS.cpp index d60624f2b34..0f378aaed9a 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -1340,8 +1340,9 @@ ACE_OS::thr_create (ACE_THR_FUNC func, if (ACE_BIT_ENABLED (flags, THR_USE_AFX)) { CWinThread *cwin_thread = - ::AfxBeginThread ((AFX_THREADPROC) &ace_thread_adapter), - thread_args, priority, 0, flags | THR_SUSPENDED); + ::AfxBeginThread ((AFX_THREADPROC) &ace_thread_adapter, + thread_args, priority, 0, + flags | THR_SUSPENDED); // Have to duplicate the handle because // CWinThread::~CWinThread() closes the original handle. (void) ::DuplicateHandle (::GetCurrentProcess (), @@ -15,12 +15,12 @@ extern char *sys_errlist[]; #endif /* ACE_HAS_SYS_ERRLIST */ #endif /* !ACE_HAS_STERROR */ -#if !defined (ACE_HAS_SYS_SIGLIST) -#if !defined (_sys_siglist) -#define _sys_siglist sis_siglist +#if defined (ACE_HAS_SYS_SIGLIST) +#if !defined (_sys_siglist) +#define _sys_siglist sys_siglist #endif /* !defined (sys_siglist) */ -extern char **_sys_siglist; -#endif /* !ACE_HAS_SYS_SIGLIST */ +//extern char **_sys_siglist; +#endif /* ACE_HAS_SYS_SIGLIST */ #if defined (ACE_HAS_SIZET_SOCKET_LEN) typedef size_t ACE_SOCKET_LEN; diff --git a/ace/README b/ace/README index 4811c11eded..2912986efaa 100644 --- a/ace/README +++ b/ace/README @@ -108,7 +108,7 @@ ACE_HAS_SYSV_IPC Platform supports System V IPC (most versions of UNIX, but no ACE_HAS_SYSV_SPRINTF Platform/compiler support the System V sprintf(). ACE_HAS_SYS_ERRLIST Platform/compiler supports _sys_errlist symbol ACE_HAS_SYS_FILIO_H Platform provides <sys/filio.h> header -ACE_HAS_SYS_SIGLIST Compiler/platform supports sys_siglist array +ACE_HAS_SYS_SIGLIST Compiler/platform supports _sys_siglist array ACE_HAS_TEMPLATE_TYPEDEFS Compiler implements templates that support typedefs inside of classes used as formal arguments to a template class. ACE_HAS_TERM_IOCTLS Platform has terminal ioctl flags like TCGETS and TCSETS. ACE_HAS_THREADS Platform supports threads diff --git a/ace/config-linux.h b/ace/config-linux.h index fb4d787fc47..b3046e0b160 100644 --- a/ace/config-linux.h +++ b/ace/config-linux.h @@ -14,12 +14,12 @@ #ifndef msg_accrights #undef msg_control #define msg_accrights msg_control -#endif +#endif /* msg_accrights */ #ifndef msg_accrightslen #undef msg_controllen #define msg_accrightslen msg_controllen -#endif +#endif /* msg_accrightslen */ // You may need to undefine these for older versions of Linux. //#define ACE_LACKS_SENDMSG diff --git a/ace/config-win32-msvc4.x.h b/ace/config-win32-msvc4.x.h index 9656abb9c53..961d263dfdd 100644 --- a/ace/config-win32-msvc4.x.h +++ b/ace/config-win32-msvc4.x.h @@ -9,6 +9,7 @@ #define ACE_CONFIG_H #define ACE_HAS_EXCEPTIONS +#define ACE_HAS_MFC // We are using STL's min and max (in algobase.h). Therefore the // macros in window.h are extra diff --git a/ace/config-winnt-4.0-msvc4.x.h b/ace/config-winnt-4.0-msvc4.x.h index 02e94e15872..84475e10593 100644 --- a/ace/config-winnt-4.0-msvc4.x.h +++ b/ace/config-winnt-4.0-msvc4.x.h @@ -8,6 +8,7 @@ #define ACE_CONFIG_H #define ACE_HAS_EXCEPTIONS +#define ACE_HAS_MFC // We are using STL's min and max (in algobase.h). Therefore the // macros in window.h are extra |