summaryrefslogtreecommitdiff
path: root/ACE/ace/Select_Reactor_Base.h
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2019-06-06 09:15:02 -0500
committerChad Elliott <elliottc@objectcomputing.com>2019-06-06 09:15:02 -0500
commit4c69b74225cf6d9479caa7a31ab38fa6d70ad669 (patch)
treed2d2f9fb0d357c58063bc310c2c82d4f200b9321 /ACE/ace/Select_Reactor_Base.h
parenta580273d5fc7a820ab23b1aa40faf23e97063000 (diff)
downloadATCD-4c69b74225cf6d9479caa7a31ab38fa6d70ad669.tar.gz
- Use ACE_OS::send and ACE_OS::recv on MQX, instead of write and read.
- Added static casts where pid_t is assumed to be an int. - Use configurable macro for the "use_select" parameter. - MQX does not follow conventional standards when it comes to HTONS and NTOHS and must be configured accordingly. - Modified ACE_Handle_Set so that the use of fd_array is not conditional upon ACE_WIN32. It is now enabled through ACE_HANDLE_SET_USES_FD_ARRAY. - Implement UNIX File IO Functions for MQX in MQX_Filesystem.* - Use the existing implementation to simulate condition variables. - Use emulation for diropen on MQX as is done for Windows. - Convert from MQX error to standard error number. - Use _mqx_exit in ACE_OS::_exit for MQX. - Added a nop in ACE_OS::ioctl for MQX. - Added a definition of ACE_TMAIN for MQX so that MQX is initialized and RTCS and the MQX Filesystem code is initialized before calling ace_main_i(). - Fixed a compile error in SOCK_Dgram.cpp introduced months ago. - Use struct initialization to avoid using the l_linger member directly. - Modified ACE_Select_Reactor_Base to use a hash map for handle storage based on ACE_SELECT_REACTOR_BASE_USES_HASH_MAP instead of ACE_WIN32. - Added the IAR compiler to define ACE_NOTREACHED(a) as empty. - Made ACE_IPPROTO_TCP conditionally defined. - Added error values required for ACE. - Skip the wide-character strtok test if ACE_LACKS_WCSTOK is defined in ACE/tests/OS_Test.cpp. - Added the ability to compile tests so that they output to stderr instead of a file.
Diffstat (limited to 'ACE/ace/Select_Reactor_Base.h')
-rw-r--r--ACE/ace/Select_Reactor_Base.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/ACE/ace/Select_Reactor_Base.h b/ACE/ace/Select_Reactor_Base.h
index 54f3f45f21d..8a686341cd5 100644
--- a/ACE/ace/Select_Reactor_Base.h
+++ b/ACE/ace/Select_Reactor_Base.h
@@ -28,14 +28,18 @@
# include "ace/Notification_Queue.h"
#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */
-#ifdef ACE_WIN32
+#if defined (ACE_WIN32) || defined (ACE_MQX)
+# define ACE_SELECT_REACTOR_BASE_USES_HASH_MAP
+#endif
+
+#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP
# include "ace/Null_Mutex.h"
# include "ace/Hash_Map_Manager_T.h"
# include "ace/Functor.h" /* For ACE_Hash<void *> */
# include <functional> /* For std::equal_to<> */
#else
# include "ace/Array_Base.h"
-#endif /* ACE_WIN32 */
+#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */
#if !defined (ACE_DISABLE_NOTIFY_PIPE_DEFAULT)
# define ACE_DISABLE_NOTIFY_PIPE_DEFAULT 0
@@ -289,7 +293,7 @@ public:
typedef ACE_Event_Handler * value_type;
// = The mapping from <HANDLES> to <Event_Handlers>.
-#ifdef ACE_WIN32
+#ifdef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP
/**
* The NT version implements this via a hash map
* @c ACE_Event_Handler*. Since NT implements @c ACE_HANDLE
@@ -311,7 +315,7 @@ public:
*/
typedef ACE_Array_Base<value_type> map_type;
typedef ACE_HANDLE max_handlep1_type;
-#endif /* ACE_WIN32 */
+#endif /* ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */
typedef map_type::size_type size_type;
@@ -395,11 +399,11 @@ private:
/// Reference to our @c Select_Reactor.
ACE_Select_Reactor_Impl &select_reactor_;
-#ifndef ACE_WIN32
+#ifndef ACE_SELECT_REACTOR_BASE_USES_HASH_MAP
/// The highest currently active handle, plus 1 (ranges between 0 and
/// @c max_size_.
max_handlep1_type max_handlep1_;
-#endif /* !ACE_WIN32 */
+#endif /* !ACE_SELECT_REACTOR_BASE_USES_HASH_MAP */
/// Underlying table of event handlers.
map_type event_handlers_;