summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
Diffstat (limited to 'ace')
-rw-r--r--ace/ACE.cpp4463
-rw-r--r--ace/ACE.h791
-rw-r--r--ace/ACE.i352
-rw-r--r--ace/ACE_export.h36
-rw-r--r--ace/ARGV.cpp334
-rw-r--r--ace/ARGV.h156
-rw-r--r--ace/ARGV.i68
-rw-r--r--ace/ATM_Acceptor.cpp217
-rw-r--r--ace/ATM_Acceptor.h107
-rw-r--r--ace/ATM_Acceptor.i27
-rw-r--r--ace/ATM_Addr.cpp589
-rw-r--r--ace/ATM_Addr.h159
-rw-r--r--ace/ATM_Addr.i45
-rw-r--r--ace/ATM_Connector.cpp93
-rw-r--r--ace/ATM_Connector.h144
-rw-r--r--ace/ATM_Connector.i111
-rw-r--r--ace/ATM_Params.cpp22
-rw-r--r--ace/ATM_Params.h171
-rw-r--r--ace/ATM_Params.i224
-rw-r--r--ace/ATM_QoS.cpp565
-rw-r--r--ace/ATM_QoS.h98
-rw-r--r--ace/ATM_QoS.i23
-rw-r--r--ace/ATM_Stream.cpp231
-rw-r--r--ace/ATM_Stream.h97
-rw-r--r--ace/ATM_Stream.i124
-rw-r--r--ace/Acceptor.cpp1172
-rw-r--r--ace/Acceptor.h530
-rw-r--r--ace/Activation_Queue.cpp85
-rw-r--r--ace/Activation_Queue.h98
-rw-r--r--ace/Activation_Queue.i22
-rw-r--r--ace/Active_Map_Manager.cpp10
-rw-r--r--ace/Active_Map_Manager.h105
-rw-r--r--ace/Active_Map_Manager.i87
-rw-r--r--ace/Active_Map_Manager_T.cpp20
-rw-r--r--ace/Active_Map_Manager_T.h196
-rw-r--r--ace/Active_Map_Manager_T.i302
-rw-r--r--ace/Addr.cpp64
-rw-r--r--ace/Addr.h109
-rw-r--r--ace/Addr.i69
-rw-r--r--ace/Arg_Shifter.cpp183
-rw-r--r--ace/Arg_Shifter.h167
-rw-r--r--ace/Array.h32
-rw-r--r--ace/Asynch_Acceptor.cpp476
-rw-r--r--ace/Asynch_Acceptor.h183
-rw-r--r--ace/Asynch_IO.cpp1024
-rw-r--r--ace/Asynch_IO.h1108
-rw-r--r--ace/Asynch_IO_Impl.cpp69
-rw-r--r--ace/Asynch_IO_Impl.h505
-rw-r--r--ace/Asynch_IO_Impl.i87
-rw-r--r--ace/Atomic_Op.i200
-rw-r--r--ace/Auto_IncDec_T.cpp30
-rw-r--r--ace/Auto_IncDec_T.h85
-rw-r--r--ace/Auto_IncDec_T.i21
-rw-r--r--ace/Auto_Ptr.cpp31
-rw-r--r--ace/Auto_Ptr.h161
-rw-r--r--ace/Auto_Ptr.i171
-rw-r--r--ace/Based_Pointer_Repository.cpp123
-rw-r--r--ace/Based_Pointer_Repository.h68
-rw-r--r--ace/Based_Pointer_T.cpp113
-rw-r--r--ace/Based_Pointer_T.h189
-rw-r--r--ace/Based_Pointer_T.i136
-rw-r--r--ace/Basic_Types.cpp24
-rw-r--r--ace/Basic_Types.h545
-rw-r--r--ace/Basic_Types.i476
-rw-r--r--ace/CDR_Stream.cpp1483
-rw-r--r--ace/CDR_Stream.h1162
-rw-r--r--ace/CDR_Stream.i1625
-rw-r--r--ace/CLASSIX/CLASSIX_Addr.cpp13
-rw-r--r--ace/CLASSIX/CLASSIX_Addr.h99
-rw-r--r--ace/CLASSIX/CLASSIX_Addr.i56
-rw-r--r--ace/CLASSIX/CLASSIX_CLD_Connector.cpp116
-rw-r--r--ace/CLASSIX/CLASSIX_CLD_Connector.h134
-rw-r--r--ace/CLASSIX/CLASSIX_CLD_Connector.i24
-rw-r--r--ace/CLASSIX/CLASSIX_CO_Acceptor.cpp199
-rw-r--r--ace/CLASSIX/CLASSIX_CO_Acceptor.h146
-rw-r--r--ace/CLASSIX/CLASSIX_CO_Acceptor.i31
-rw-r--r--ace/CLASSIX/CLASSIX_CO_Connector.cpp118
-rw-r--r--ace/CLASSIX/CLASSIX_CO_Connector.h118
-rw-r--r--ace/CLASSIX/CLASSIX_CO_Connector.i36
-rw-r--r--ace/CLASSIX/CLASSIX_Dgram_Mcast.cpp83
-rw-r--r--ace/CLASSIX/CLASSIX_Dgram_Mcast.h94
-rw-r--r--ace/CLASSIX/CLASSIX_Dgram_Mcast.i21
-rw-r--r--ace/CLASSIX/CLASSIX_Group.cpp89
-rw-r--r--ace/CLASSIX/CLASSIX_Group.h118
-rw-r--r--ace/CLASSIX/CLASSIX_Group.i89
-rw-r--r--ace/CLASSIX/CLASSIX_Group_Dynamic.cpp22
-rw-r--r--ace/CLASSIX/CLASSIX_Group_Dynamic.h63
-rw-r--r--ace/CLASSIX/CLASSIX_Group_Dynamic.i16
-rw-r--r--ace/CLASSIX/CLASSIX_Group_Stamp.cpp52
-rw-r--r--ace/CLASSIX/CLASSIX_Group_Stamp.h90
-rw-r--r--ace/CLASSIX/CLASSIX_Group_Stamp.i32
-rw-r--r--ace/CLASSIX/CLASSIX_OS.cpp117
-rw-r--r--ace/CLASSIX/CLASSIX_OS.h134
-rw-r--r--ace/CLASSIX/CLASSIX_OS.i56
-rw-r--r--ace/CLASSIX/CLASSIX_Peer_SAP.cpp77
-rw-r--r--ace/CLASSIX/CLASSIX_Peer_SAP.h108
-rw-r--r--ace/CLASSIX/CLASSIX_Peer_SAP.i99
-rw-r--r--ace/CLASSIX/CLASSIX_Port.cpp129
-rw-r--r--ace/CLASSIX/CLASSIX_Port.h162
-rw-r--r--ace/CLASSIX/CLASSIX_Port.i112
-rw-r--r--ace/CLASSIX/CLASSIX_Port_Core.cpp70
-rw-r--r--ace/CLASSIX/CLASSIX_Port_Core.h103
-rw-r--r--ace/CLASSIX/CLASSIX_Port_Core.i38
-rw-r--r--ace/CLASSIX/CLASSIX_Port_Default.cpp26
-rw-r--r--ace/CLASSIX/CLASSIX_Port_Default.h80
-rw-r--r--ace/CLASSIX/CLASSIX_Port_Default.i28
-rw-r--r--ace/CLASSIX/CLASSIX_SAP.cpp153
-rw-r--r--ace/CLASSIX/CLASSIX_SAP.h145
-rw-r--r--ace/CLASSIX/CLASSIX_SAP.i58
-rw-r--r--ace/CLASSIX/CLASSIX_Select_Reactor.cpp337
-rw-r--r--ace/CLASSIX/CLASSIX_Select_Reactor.h209
-rw-r--r--ace/CLASSIX/CLASSIX_Select_Reactor.i63
-rw-r--r--ace/CLASSIX/CLASSIX_Stream.cpp362
-rw-r--r--ace/CLASSIX/CLASSIX_Stream.h272
-rw-r--r--ace/CLASSIX/CLASSIX_Stream.i182
-rw-r--r--ace/CLASSIX/Makefile544
-rw-r--r--ace/CORBA_Handler.cpp593
-rw-r--r--ace/CORBA_Handler.h256
-rw-r--r--ace/CORBA_Handler.i40
-rw-r--r--ace/CORBA_Ref.cpp84
-rw-r--r--ace/CORBA_Ref.h83
-rw-r--r--ace/CORBA_macros.h413
-rw-r--r--ace/Cache_Map_Manager_T.cpp420
-rw-r--r--ace/Cache_Map_Manager_T.h399
-rw-r--r--ace/Cache_Map_Manager_T.i273
-rw-r--r--ace/Cached_Connect_Strategy_T.cpp546
-rw-r--r--ace/Cached_Connect_Strategy_T.h190
-rw-r--r--ace/Caching_Strategies_T.cpp56
-rw-r--r--ace/Caching_Strategies_T.h529
-rw-r--r--ace/Caching_Strategies_T.i448
-rw-r--r--ace/Caching_Utility_T.cpp483
-rw-r--r--ace/Caching_Utility_T.h307
-rw-r--r--ace/Capabilities.cpp365
-rw-r--r--ace/Capabilities.h172
-rw-r--r--ace/Capabilities.i47
-rw-r--r--ace/Cleanup_Strategies_T.cpp93
-rw-r--r--ace/Cleanup_Strategies_T.h141
-rw-r--r--ace/Codeset_IBM1047.cpp284
-rw-r--r--ace/Codeset_IBM1047.h115
-rw-r--r--ace/Configuration.cpp2035
-rw-r--r--ace/Configuration.h690
-rw-r--r--ace/Connector.cpp934
-rw-r--r--ace/Connector.h488
-rw-r--r--ace/Containers.cpp23
-rw-r--r--ace/Containers.h73
-rw-r--r--ace/Containers.i25
-rw-r--r--ace/Containers_T.cpp2685
-rw-r--r--ace/Containers_T.h1845
-rw-r--r--ace/Containers_T.i585
-rw-r--r--ace/DEV.cpp37
-rw-r--r--ace/DEV.h72
-rw-r--r--ace/DEV.i15
-rw-r--r--ace/DEV_Addr.cpp80
-rw-r--r--ace/DEV_Addr.h84
-rw-r--r--ace/DEV_Addr.i64
-rw-r--r--ace/DEV_Connector.cpp43
-rw-r--r--ace/DEV_Connector.h100
-rw-r--r--ace/DEV_Connector.i32
-rw-r--r--ace/DEV_IO.cpp125
-rw-r--r--ace/DEV_IO.h129
-rw-r--r--ace/DEV_IO.i101
-rw-r--r--ace/DLL.cpp163
-rw-r--r--ace/DLL.h108
-rw-r--r--ace/Date_Time.cpp10
-rw-r--r--ace/Date_Time.h99
-rw-r--r--ace/Date_Time.i140
-rw-r--r--ace/Dirent.cpp11
-rw-r--r--ace/Dirent.h109
-rw-r--r--ace/Dirent.i95
-rw-r--r--ace/Dump.cpp135
-rw-r--r--ace/Dump.h158
-rw-r--r--ace/Dump_T.cpp41
-rw-r--r--ace/Dump_T.h79
-rw-r--r--ace/Dynamic.cpp30
-rw-r--r--ace/Dynamic.h71
-rw-r--r--ace/Dynamic.i32
-rw-r--r--ace/Dynamic_Service.cpp51
-rw-r--r--ace/Dynamic_Service.h50
-rw-r--r--ace/Dynamic_Service.i4
-rw-r--r--ace/Env_Value_T.cpp14
-rw-r--r--ace/Env_Value_T.h158
-rw-r--r--ace/Env_Value_T.i51
-rw-r--r--ace/Event_Handler.cpp237
-rw-r--r--ace/Event_Handler.h198
-rw-r--r--ace/Event_Handler.i10
-rw-r--r--ace/Event_Handler_T.cpp63
-rw-r--r--ace/Event_Handler_T.h191
-rw-r--r--ace/Event_Handler_T.i185
-rw-r--r--ace/FIFO.cpp75
-rw-r--r--ace/FIFO.h79
-rw-r--r--ace/FIFO.i20
-rw-r--r--ace/FIFO_Recv.cpp83
-rw-r--r--ace/FIFO_Recv.h76
-rw-r--r--ace/FIFO_Recv.i18
-rw-r--r--ace/FIFO_Recv_Msg.cpp62
-rw-r--r--ace/FIFO_Recv_Msg.h81
-rw-r--r--ace/FIFO_Recv_Msg.i67
-rw-r--r--ace/FIFO_Send.cpp54
-rw-r--r--ace/FIFO_Send.h66
-rw-r--r--ace/FIFO_Send.i18
-rw-r--r--ace/FIFO_Send_Msg.cpp68
-rw-r--r--ace/FIFO_Send_Msg.h80
-rw-r--r--ace/FIFO_Send_Msg.i41
-rw-r--r--ace/FILE.cpp151
-rw-r--r--ace/FILE.h134
-rw-r--r--ace/FILE.i16
-rw-r--r--ace/FILE_Addr.cpp108
-rw-r--r--ace/FILE_Addr.h85
-rw-r--r--ace/FILE_Addr.i43
-rw-r--r--ace/FILE_Connector.cpp58
-rw-r--r--ace/FILE_Connector.h99
-rw-r--r--ace/FILE_Connector.i33
-rw-r--r--ace/FILE_IO.cpp132
-rw-r--r--ace/FILE_IO.h142
-rw-r--r--ace/FILE_IO.i133
-rw-r--r--ace/Filecache.cpp773
-rw-r--r--ace/Filecache.h353
-rw-r--r--ace/FlReactor.cpp331
-rw-r--r--ace/FlReactor.h115
-rw-r--r--ace/FlReactor.i2
-rw-r--r--ace/Free_List.cpp90
-rw-r--r--ace/Free_List.h147
-rw-r--r--ace/Free_List.i76
-rw-r--r--ace/Functor.cpp48
-rw-r--r--ace/Functor.h248
-rw-r--r--ace/Functor.i152
-rw-r--r--ace/Functor_T.cpp49
-rw-r--r--ace/Functor_T.h145
-rw-r--r--ace/Functor_T.i28
-rw-r--r--ace/Future.cpp425
-rw-r--r--ace/Future.h328
-rw-r--r--ace/Future_Set.cpp137
-rw-r--r--ace/Future_Set.h120
-rw-r--r--ace/Get_Opt.cpp162
-rw-r--r--ace/Get_Opt.h137
-rw-r--r--ace/Get_Opt.i9
-rw-r--r--ace/Handle_Gobbler.h65
-rw-r--r--ace/Handle_Gobbler.i81
-rw-r--r--ace/Handle_Set.cpp460
-rw-r--r--ace/Handle_Set.h216
-rw-r--r--ace/Handle_Set.i174
-rw-r--r--ace/Hash_Cache_Map_Manager_T.cpp230
-rw-r--r--ace/Hash_Cache_Map_Manager_T.h199
-rw-r--r--ace/Hash_Cache_Map_Manager_T.i68
-rw-r--r--ace/Hash_Map_Manager.cpp19
-rw-r--r--ace/Hash_Map_Manager.h32
-rw-r--r--ace/Hash_Map_Manager_T.cpp446
-rw-r--r--ace/Hash_Map_Manager_T.h721
-rw-r--r--ace/Hash_Map_Manager_T.i777
-rw-r--r--ace/Hash_Map_With_Allocator_T.cpp32
-rw-r--r--ace/Hash_Map_With_Allocator_T.h105
-rw-r--r--ace/Hash_Map_With_Allocator_T.i73
-rw-r--r--ace/High_Res_Timer.cpp478
-rw-r--r--ace/High_Res_Timer.h231
-rw-r--r--ace/High_Res_Timer.i111
-rw-r--r--ace/INET_Addr.cpp528
-rw-r--r--ace/INET_Addr.h206
-rw-r--r--ace/INET_Addr.i53
-rw-r--r--ace/IOStream.cpp658
-rw-r--r--ace/IOStream.h499
-rw-r--r--ace/IOStream_T.cpp210
-rw-r--r--ace/IOStream_T.h281
-rw-r--r--ace/IOStream_T.i160
-rw-r--r--ace/IO_Cntl_Msg.cpp38
-rw-r--r--ace/IO_Cntl_Msg.h87
-rw-r--r--ace/IO_SAP.cpp141
-rw-r--r--ace/IO_SAP.h85
-rw-r--r--ace/IO_SAP.i39
-rw-r--r--ace/IPC_SAP.cpp181
-rw-r--r--ace/IPC_SAP.h81
-rw-r--r--ace/IPC_SAP.i37
-rw-r--r--ace/LOCK_SOCK_Acceptor.cpp33
-rw-r--r--ace/LOCK_SOCK_Acceptor.h63
-rw-r--r--ace/LSOCK.cpp168
-rw-r--r--ace/LSOCK.h77
-rw-r--r--ace/LSOCK.i40
-rw-r--r--ace/LSOCK_Acceptor.cpp134
-rw-r--r--ace/LSOCK_Acceptor.h90
-rw-r--r--ace/LSOCK_CODgram.cpp55
-rw-r--r--ace/LSOCK_CODgram.h73
-rw-r--r--ace/LSOCK_CODgram.i27
-rw-r--r--ace/LSOCK_Connector.cpp57
-rw-r--r--ace/LSOCK_Connector.h105
-rw-r--r--ace/LSOCK_Connector.i29
-rw-r--r--ace/LSOCK_Dgram.cpp64
-rw-r--r--ace/LSOCK_Dgram.h70
-rw-r--r--ace/LSOCK_Dgram.i20
-rw-r--r--ace/LSOCK_Stream.cpp131
-rw-r--r--ace/LSOCK_Stream.h77
-rw-r--r--ace/LSOCK_Stream.i25
-rw-r--r--ace/Local_Name_Space.cpp215
-rw-r--r--ace/Local_Name_Space.h122
-rw-r--r--ace/Local_Name_Space_T.cpp917
-rw-r--r--ace/Local_Name_Space_T.h254
-rw-r--r--ace/Local_Tokens.cpp1439
-rw-r--r--ace/Local_Tokens.h1041
-rw-r--r--ace/Local_Tokens.i433
-rw-r--r--ace/Log_Msg.cpp1768
-rw-r--r--ace/Log_Msg.h565
-rw-r--r--ace/Log_Priority.h79
-rw-r--r--ace/Log_Record.cpp259
-rw-r--r--ace/Log_Record.h194
-rw-r--r--ace/Log_Record.i96
-rw-r--r--ace/MEM_Acceptor.cpp203
-rw-r--r--ace/MEM_Acceptor.h158
-rw-r--r--ace/MEM_Acceptor.i70
-rw-r--r--ace/MEM_Addr.cpp142
-rw-r--r--ace/MEM_Addr.h145
-rw-r--r--ace/MEM_Addr.i117
-rw-r--r--ace/MEM_Connector.cpp104
-rw-r--r--ace/MEM_Connector.h111
-rw-r--r--ace/MEM_Connector.i12
-rw-r--r--ace/MEM_IO.cpp202
-rw-r--r--ace/MEM_IO.h163
-rw-r--r--ace/MEM_IO.i168
-rw-r--r--ace/MEM_SAP.cpp79
-rw-r--r--ace/MEM_SAP.h101
-rw-r--r--ace/MEM_SAP.i91
-rw-r--r--ace/MEM_Stream.cpp34
-rw-r--r--ace/MEM_Stream.h128
-rw-r--r--ace/MEM_Stream.i176
-rw-r--r--ace/Makefile10495
-rw-r--r--ace/Makefile.am907
-rw-r--r--ace/Makefile.bor196
-rw-r--r--ace/Malloc.cpp458
-rw-r--r--ace/Malloc.h668
-rw-r--r--ace/Malloc.i268
-rw-r--r--ace/Malloc_Base.h136
-rw-r--r--ace/Malloc_T.cpp915
-rw-r--r--ace/Malloc_T.h618
-rw-r--r--ace/Malloc_T.i238
-rw-r--r--ace/Managed_Object.cpp23
-rw-r--r--ace/Managed_Object.h160
-rw-r--r--ace/Managed_Object.i18
-rw-r--r--ace/Map.cpp19
-rw-r--r--ace/Map.h31
-rw-r--r--ace/Map_Manager.cpp614
-rw-r--r--ace/Map_Manager.h553
-rw-r--r--ace/Map_Manager.i532
-rw-r--r--ace/Map_T.cpp18
-rw-r--r--ace/Map_T.h1439
-rw-r--r--ace/Map_T.i1601
-rw-r--r--ace/Mem_Map.cpp322
-rw-r--r--ace/Mem_Map.h209
-rw-r--r--ace/Mem_Map.i251
-rw-r--r--ace/Memory_Pool.cpp1325
-rw-r--r--ace/Memory_Pool.h680
-rw-r--r--ace/Memory_Pool.i242
-rw-r--r--ace/Message_Block.cpp1183
-rw-r--r--ace/Message_Block.h843
-rw-r--r--ace/Message_Block.i607
-rw-r--r--ace/Message_Block_T.cpp47
-rw-r--r--ace/Message_Block_T.h83
-rw-r--r--ace/Message_Block_T.i29
-rw-r--r--ace/Message_Queue.cpp442
-rw-r--r--ace/Message_Queue.h476
-rw-r--r--ace/Message_Queue.i204
-rw-r--r--ace/Message_Queue_T.cpp1663
-rw-r--r--ace/Message_Queue_T.h709
-rw-r--r--ace/Message_Queue_T.i163
-rw-r--r--ace/Method_Object.h37
-rw-r--r--ace/Method_Request.cpp27
-rw-r--r--ace/Method_Request.h63
-rw-r--r--ace/Min_Max.h77
-rw-r--r--ace/Module.cpp266
-rw-r--r--ace/Module.h195
-rw-r--r--ace/Module.i62
-rw-r--r--ace/Msg_WFMO_Reactor.cpp90
-rw-r--r--ace/Msg_WFMO_Reactor.h109
-rw-r--r--ace/Msg_WFMO_Reactor.i30
-rw-r--r--ace/Multiplexor.cpp14
-rw-r--r--ace/Multiplexor.h83
-rw-r--r--ace/Multiplexor.i88
-rw-r--r--ace/NT_Service.cpp502
-rw-r--r--ace/NT_Service.h377
-rw-r--r--ace/NT_Service.i79
-rw-r--r--ace/Name_Proxy.cpp200
-rw-r--r--ace/Name_Proxy.h90
-rw-r--r--ace/Name_Request_Reply.cpp555
-rw-r--r--ace/Name_Request_Reply.h255
-rw-r--r--ace/Name_Space.cpp62
-rw-r--r--ace/Name_Space.h151
-rw-r--r--ace/Naming_Context.cpp685
-rw-r--r--ace/Naming_Context.h335
-rw-r--r--ace/OS.cpp7137
-rw-r--r--ace/OS.h7842
-rw-r--r--ace/OS.i12295
-rw-r--r--ace/OS_Dirent.cpp60
-rw-r--r--ace/OS_Dirent.h104
-rw-r--r--ace/OS_Dirent.inl195
-rw-r--r--ace/Object_Manager.cpp870
-rw-r--r--ace/Object_Manager.h436
-rw-r--r--ace/Object_Manager.i35
-rw-r--r--ace/Obstack.cpp136
-rw-r--r--ace/Obstack.h112
-rw-r--r--ace/Obstack.i9
-rw-r--r--ace/POSIX_Asynch_IO.cpp3381
-rw-r--r--ace/POSIX_Asynch_IO.h1655
-rw-r--r--ace/POSIX_Asynch_IO.i2
-rw-r--r--ace/POSIX_Proactor.cpp1264
-rw-r--r--ace/POSIX_Proactor.h433
-rw-r--r--ace/POSIX_Proactor.i2
-rw-r--r--ace/Pair.cpp19
-rw-r--r--ace/Pair.h31
-rw-r--r--ace/Pair_T.cpp18
-rw-r--r--ace/Pair_T.h110
-rw-r--r--ace/Pair_T.i72
-rw-r--r--ace/Parse_Node.cpp710
-rw-r--r--ace/Parse_Node.h301
-rw-r--r--ace/Parse_Node.i19
-rw-r--r--ace/Pipe.cpp230
-rw-r--r--ace/Pipe.h83
-rw-r--r--ace/Pipe.i25
-rw-r--r--ace/Priority_Reactor.cpp171
-rw-r--r--ace/Priority_Reactor.h91
-rw-r--r--ace/Proactor.cpp1037
-rw-r--r--ace/Proactor.h471
-rw-r--r--ace/Proactor.i2
-rw-r--r--ace/Proactor_Impl.h200
-rw-r--r--ace/Process.cpp710
-rw-r--r--ace/Process.h440
-rw-r--r--ace/Process.i359
-rw-r--r--ace/Process_Manager.cpp955
-rw-r--r--ace/Process_Manager.h390
-rw-r--r--ace/Process_Manager.i8
-rw-r--r--ace/Profile_Timer.cpp409
-rw-r--r--ace/Profile_Timer.h132
-rw-r--r--ace/Profile_Timer.i104
-rw-r--r--ace/QoS_Manager.cpp46
-rw-r--r--ace/QoS_Manager.h70
-rw-r--r--ace/QoS_Session.h135
-rw-r--r--ace/QoS_Session_Factory.cpp96
-rw-r--r--ace/QoS_Session_Factory.h90
-rw-r--r--ace/QoS_Session_Impl.cpp543
-rw-r--r--ace/QoS_Session_Impl.h206
-rw-r--r--ace/QoS_Session_Impl.i149
-rw-r--r--ace/QtReactor.cpp430
-rw-r--r--ace/QtReactor.h152
-rw-r--r--ace/RB_Tree.cpp932
-rw-r--r--ace/RB_Tree.h710
-rw-r--r--ace/RB_Tree.i1153
-rw-r--r--ace/README1510
-rw-r--r--ace/Reactor.cpp258
-rw-r--r--ace/Reactor.h563
-rw-r--r--ace/Reactor.i634
-rw-r--r--ace/Reactor_Impl.h465
-rw-r--r--ace/Read_Buffer.cpp163
-rw-r--r--ace/Read_Buffer.h113
-rw-r--r--ace/Read_Buffer.i28
-rw-r--r--ace/Registry.cpp1126
-rw-r--r--ace/Registry.h524
-rw-r--r--ace/Registry_Name_Space.cpp254
-rw-r--r--ace/Registry_Name_Space.h127
-rw-r--r--ace/Remote_Name_Space.cpp351
-rw-r--r--ace/Remote_Name_Space.h130
-rw-r--r--ace/Remote_Tokens.cpp435
-rw-r--r--ace/Remote_Tokens.h293
-rw-r--r--ace/Remote_Tokens.i96
-rw-r--r--ace/SOCK.cpp179
-rw-r--r--ace/SOCK.h125
-rw-r--r--ace/SOCK.i34
-rw-r--r--ace/SOCK_Acceptor.cpp343
-rw-r--r--ace/SOCK_Acceptor.h160
-rw-r--r--ace/SOCK_Acceptor.i12
-rw-r--r--ace/SOCK_CODgram.cpp105
-rw-r--r--ace/SOCK_CODgram.h69
-rw-r--r--ace/SOCK_CODgram.i18
-rw-r--r--ace/SOCK_Connector.cpp315
-rw-r--r--ace/SOCK_Connector.h210
-rw-r--r--ace/SOCK_Connector.i36
-rw-r--r--ace/SOCK_Dgram.cpp450
-rw-r--r--ace/SOCK_Dgram.h201
-rw-r--r--ace/SOCK_Dgram.i158
-rw-r--r--ace/SOCK_Dgram_Bcast.cpp323
-rw-r--r--ace/SOCK_Dgram_Bcast.h127
-rw-r--r--ace/SOCK_Dgram_Bcast.i34
-rw-r--r--ace/SOCK_Dgram_Mcast.cpp400
-rw-r--r--ace/SOCK_Dgram_Mcast.h186
-rw-r--r--ace/SOCK_Dgram_Mcast.i78
-rw-r--r--ace/SOCK_Dgram_Mcast_QoS.cpp280
-rw-r--r--ace/SOCK_Dgram_Mcast_QoS.h131
-rw-r--r--ace/SOCK_Dgram_Mcast_QoS.i47
-rw-r--r--ace/SOCK_IO.cpp157
-rw-r--r--ace/SOCK_IO.h147
-rw-r--r--ace/SOCK_IO.i149
-rw-r--r--ace/SOCK_Stream.cpp35
-rw-r--r--ace/SOCK_Stream.h142
-rw-r--r--ace/SOCK_Stream.i159
-rw-r--r--ace/SPIPE.cpp63
-rw-r--r--ace/SPIPE.h69
-rw-r--r--ace/SPIPE.i16
-rw-r--r--ace/SPIPE_Acceptor.cpp261
-rw-r--r--ace/SPIPE_Acceptor.h90
-rw-r--r--ace/SPIPE_Addr.cpp142
-rw-r--r--ace/SPIPE_Addr.h115
-rw-r--r--ace/SPIPE_Addr.i74
-rw-r--r--ace/SPIPE_Connector.cpp75
-rw-r--r--ace/SPIPE_Connector.h102
-rw-r--r--ace/SPIPE_Connector.i13
-rw-r--r--ace/SPIPE_Stream.cpp98
-rw-r--r--ace/SPIPE_Stream.h143
-rw-r--r--ace/SPIPE_Stream.i198
-rw-r--r--ace/SSL/ACE_SSL.dsp166
-rw-r--r--ace/SSL/SSL_Context.cpp407
-rw-r--r--ace/SSL/SSL_Context.h242
-rw-r--r--ace/SSL/SSL_Context.i87
-rw-r--r--ace/SSL/SSL_Context.inl87
-rw-r--r--ace/SSL/SSL_Export.h40
-rw-r--r--ace/SSL/SSL_SOCK.cpp72
-rw-r--r--ace/SSL/SSL_SOCK.h93
-rw-r--r--ace/SSL/SSL_SOCK.i64
-rw-r--r--ace/SSL/SSL_SOCK_Acceptor.cpp226
-rw-r--r--ace/SSL/SSL_SOCK_Acceptor.h141
-rw-r--r--ace/SSL/SSL_SOCK_Acceptor.i82
-rw-r--r--ace/SSL/SSL_SOCK_Connector.cpp306
-rw-r--r--ace/SSL/SSL_SOCK_Connector.h207
-rw-r--r--ace/SSL/SSL_SOCK_Connector.i34
-rw-r--r--ace/SSL/SSL_SOCK_Stream.cpp482
-rw-r--r--ace/SSL/SSL_SOCK_Stream.h252
-rw-r--r--ace/SSL/SSL_SOCK_Stream.i302
-rw-r--r--ace/SSL/sslconf.h49
-rw-r--r--ace/SString.cpp1042
-rw-r--r--ace/SString.h672
-rw-r--r--ace/SString.i757
-rw-r--r--ace/SV_Message.cpp19
-rw-r--r--ace/SV_Message.h56
-rw-r--r--ace/SV_Message.i31
-rw-r--r--ace/SV_Message_Queue.cpp38
-rw-r--r--ace/SV_Message_Queue.h96
-rw-r--r--ace/SV_Message_Queue.i78
-rw-r--r--ace/SV_Semaphore_Complex.cpp253
-rw-r--r--ace/SV_Semaphore_Complex.h157
-rw-r--r--ace/SV_Semaphore_Complex.i83
-rw-r--r--ace/SV_Semaphore_Simple.cpp203
-rw-r--r--ace/SV_Semaphore_Simple.h153
-rw-r--r--ace/SV_Semaphore_Simple.i106
-rw-r--r--ace/SV_Shared_Memory.cpp82
-rw-r--r--ace/SV_Shared_Memory.h113
-rw-r--r--ace/SV_Shared_Memory.i114
-rw-r--r--ace/Sched_Params.cpp277
-rw-r--r--ace/Sched_Params.h220
-rw-r--r--ace/Sched_Params.i136
-rw-r--r--ace/Select_Reactor.cpp44
-rw-r--r--ace/Select_Reactor.h69
-rw-r--r--ace/Select_Reactor_Base.cpp944
-rw-r--r--ace/Select_Reactor_Base.h444
-rw-r--r--ace/Select_Reactor_Base.i83
-rw-r--r--ace/Select_Reactor_T.cpp1365
-rw-r--r--ace/Select_Reactor_T.h671
-rw-r--r--ace/Select_Reactor_T.i239
-rw-r--r--ace/Service_Config.cpp894
-rw-r--r--ace/Service_Config.h452
-rw-r--r--ace/Service_Config.i93
-rw-r--r--ace/Service_Manager.cpp315
-rw-r--r--ace/Service_Manager.h108
-rw-r--r--ace/Service_Manager.i10
-rw-r--r--ace/Service_Object.cpp98
-rw-r--r--ace/Service_Object.h161
-rw-r--r--ace/Service_Object.i87
-rw-r--r--ace/Service_Repository.cpp413
-rw-r--r--ace/Service_Repository.h199
-rw-r--r--ace/Service_Repository.i31
-rw-r--r--ace/Service_Types.cpp453
-rw-r--r--ace/Service_Types.h189
-rw-r--r--ace/Service_Types.i64
-rw-r--r--ace/Shared_Memory.cpp9
-rw-r--r--ace/Shared_Memory.h51
-rw-r--r--ace/Shared_Memory_MM.cpp52
-rw-r--r--ace/Shared_Memory_MM.h117
-rw-r--r--ace/Shared_Memory_MM.i89
-rw-r--r--ace/Shared_Memory_SV.cpp30
-rw-r--r--ace/Shared_Memory_SV.h98
-rw-r--r--ace/Shared_Memory_SV.i73
-rw-r--r--ace/Shared_Object.cpp46
-rw-r--r--ace/Shared_Object.h53
-rw-r--r--ace/Shared_Object.i9
-rw-r--r--ace/Signal.cpp862
-rw-r--r--ace/Signal.h458
-rw-r--r--ace/Signal.i302
-rw-r--r--ace/Singleton.cpp384
-rw-r--r--ace/Singleton.h248
-rw-r--r--ace/Singleton.i27
-rw-r--r--ace/Stats.cpp660
-rw-r--r--ace/Stats.h246
-rw-r--r--ace/Stats.i95
-rw-r--r--ace/Strategies.cpp88
-rw-r--r--ace/Strategies.h195
-rw-r--r--ace/Strategies.i95
-rw-r--r--ace/Strategies_T.cpp1206
-rw-r--r--ace/Strategies_T.h914
-rw-r--r--ace/Strategies_T.i447
-rw-r--r--ace/Stream.cpp512
-rw-r--r--ace/Stream.h213
-rw-r--r--ace/Stream.i49
-rw-r--r--ace/Stream_Modules.cpp369
-rw-r--r--ace/Stream_Modules.h138
-rw-r--r--ace/Svc_Conf.h112
-rw-r--r--ace/Svc_Conf.l114
-rw-r--r--ace/Svc_Conf.y458
-rw-r--r--ace/Svc_Conf_Tokens.h29
-rw-r--r--ace/Svc_Conf_l.cpp1839
-rw-r--r--ace/Svc_Conf_y.cpp1041
-rw-r--r--ace/Svc_Handler.cpp529
-rw-r--r--ace/Svc_Handler.h281
-rw-r--r--ace/Synch.cpp1049
-rw-r--r--ace/Synch.h1703
-rw-r--r--ace/Synch.i1109
-rw-r--r--ace/Synch_Options.cpp105
-rw-r--r--ace/Synch_Options.h149
-rw-r--r--ace/Synch_Options.i9
-rw-r--r--ace/Synch_T.cpp960
-rw-r--r--ace/Synch_T.h968
-rw-r--r--ace/Synch_T.i414
-rw-r--r--ace/System_Time.cpp141
-rw-r--r--ace/System_Time.h84
-rw-r--r--ace/TLI.cpp189
-rw-r--r--ace/TLI.h105
-rw-r--r--ace/TLI.i41
-rw-r--r--ace/TLI_Acceptor.cpp522
-rw-r--r--ace/TLI_Acceptor.h117
-rw-r--r--ace/TLI_Connector.cpp232
-rw-r--r--ace/TLI_Connector.h117
-rw-r--r--ace/TLI_Connector.i44
-rw-r--r--ace/TLI_Stream.cpp100
-rw-r--r--ace/TLI_Stream.h127
-rw-r--r--ace/TLI_Stream.i139
-rw-r--r--ace/TP_Reactor.cpp278
-rw-r--r--ace/TP_Reactor.h206
-rw-r--r--ace/TP_Reactor.i39
-rw-r--r--ace/TTY_IO.cpp286
-rw-r--r--ace/TTY_IO.h75
-rw-r--r--ace/Task.cpp227
-rw-r--r--ace/Task.h246
-rw-r--r--ace/Task.i114
-rw-r--r--ace/Task_T.cpp105
-rw-r--r--ace/Task_T.h167
-rw-r--r--ace/Task_T.i103
-rw-r--r--ace/Template_Instantiations.cpp365
-rw-r--r--ace/Thread.cpp90
-rw-r--r--ace/Thread.h228
-rw-r--r--ace/Thread.i272
-rw-r--r--ace/Thread_Manager.cpp2415
-rw-r--r--ace/Thread_Manager.h911
-rw-r--r--ace/Thread_Manager.i372
-rw-r--r--ace/Time_Request_Reply.cpp187
-rw-r--r--ace/Time_Request_Reply.h125
-rw-r--r--ace/Time_Value.h31
-rw-r--r--ace/Timeprobe.cpp44
-rw-r--r--ace/Timeprobe.h182
-rw-r--r--ace/Timeprobe.i8
-rw-r--r--ace/Timeprobe_T.cpp300
-rw-r--r--ace/Timeprobe_T.h175
-rw-r--r--ace/Timer_Hash.cpp123
-rw-r--r--ace/Timer_Hash.h74
-rw-r--r--ace/Timer_Hash_T.cpp609
-rw-r--r--ace/Timer_Hash_T.h264
-rw-r--r--ace/Timer_Heap.cpp43
-rw-r--r--ace/Timer_Heap.h41
-rw-r--r--ace/Timer_Heap_T.cpp732
-rw-r--r--ace/Timer_Heap_T.h285
-rw-r--r--ace/Timer_List.cpp44
-rw-r--r--ace/Timer_List.h41
-rw-r--r--ace/Timer_List_T.cpp341
-rw-r--r--ace/Timer_List_T.h205
-rw-r--r--ace/Timer_Queue.cpp58
-rw-r--r--ace/Timer_Queue.h46
-rw-r--r--ace/Timer_Queue.i22
-rw-r--r--ace/Timer_Queue_Adapters.cpp309
-rw-r--r--ace/Timer_Queue_Adapters.h217
-rw-r--r--ace/Timer_Queue_Adapters.i37
-rw-r--r--ace/Timer_Queue_T.cpp320
-rw-r--r--ace/Timer_Queue_T.h393
-rw-r--r--ace/Timer_Queue_T.i171
-rw-r--r--ace/Timer_Wheel.cpp23
-rw-r--r--ace/Timer_Wheel.h42
-rw-r--r--ace/Timer_Wheel_T.cpp668
-rw-r--r--ace/Timer_Wheel_T.h229
-rw-r--r--ace/TkReactor.cpp435
-rw-r--r--ace/TkReactor.h127
-rw-r--r--ace/Token.cpp571
-rw-r--r--ace/Token.h293
-rw-r--r--ace/Token.i116
-rw-r--r--ace/Token_Collection.cpp302
-rw-r--r--ace/Token_Collection.h220
-rw-r--r--ace/Token_Collection.i10
-rw-r--r--ace/Token_Invariants.cpp365
-rw-r--r--ace/Token_Invariants.h221
-rw-r--r--ace/Token_Manager.cpp277
-rw-r--r--ace/Token_Manager.h127
-rw-r--r--ace/Token_Manager.i19
-rw-r--r--ace/Token_Request_Reply.cpp175
-rw-r--r--ace/Token_Request_Reply.h235
-rw-r--r--ace/Token_Request_Reply.i195
-rw-r--r--ace/Trace.cpp117
-rw-r--r--ace/Trace.h86
-rw-r--r--ace/Typed_SV_Message.cpp26
-rw-r--r--ace/Typed_SV_Message.h94
-rw-r--r--ace/Typed_SV_Message.i91
-rw-r--r--ace/Typed_SV_Message_Queue.cpp52
-rw-r--r--ace/Typed_SV_Message_Queue.h85
-rw-r--r--ace/Typed_SV_Message_Queue.i71
-rw-r--r--ace/UNIX_Addr.cpp114
-rw-r--r--ace/UNIX_Addr.h97
-rw-r--r--ace/UNIX_Addr.i67
-rw-r--r--ace/UPIPE_Acceptor.cpp122
-rw-r--r--ace/UPIPE_Acceptor.h91
-rw-r--r--ace/UPIPE_Acceptor.i11
-rw-r--r--ace/UPIPE_Addr.h46
-rw-r--r--ace/UPIPE_Connector.cpp91
-rw-r--r--ace/UPIPE_Connector.h108
-rw-r--r--ace/UPIPE_Connector.i33
-rw-r--r--ace/UPIPE_Stream.cpp227
-rw-r--r--ace/UPIPE_Stream.h136
-rw-r--r--ace/UPIPE_Stream.i12
-rw-r--r--ace/Version.h7
-rw-r--r--ace/WFMO_Reactor.cpp2334
-rw-r--r--ace/WFMO_Reactor.h1168
-rw-r--r--ace/WFMO_Reactor.i1126
-rw-r--r--ace/WIN32_Asynch_IO.cpp1695
-rw-r--r--ace/WIN32_Asynch_IO.h1210
-rw-r--r--ace/WIN32_Proactor.cpp603
-rw-r--r--ace/WIN32_Proactor.h264
-rw-r--r--ace/XTI_ATM_Mcast.cpp66
-rw-r--r--ace/XTI_ATM_Mcast.h123
-rw-r--r--ace/XTI_ATM_Mcast.i62
-rw-r--r--ace/XtReactor.cpp450
-rw-r--r--ace/XtReactor.h133
-rw-r--r--ace/ace-dll.icc468
-rw-r--r--ace/ace-lib.icc273
-rw-r--r--ace/ace.dsw41
-rwxr-xr-xace/ace.icc184
-rw-r--r--ace/ace.rc30
-rw-r--r--ace/ace_ce.dsw29
-rw-r--r--ace/ace_ce_dll.cfg1
-rw-r--r--ace/ace_dll.dsp5616
-rw-r--r--ace/ace_dll_ce.dsp697
-rw-r--r--ace/ace_lib.dsp5591
-rw-r--r--ace/ace_wchar.h273
-rw-r--r--ace/config-WinCE.h201
-rw-r--r--ace/config-aix-3.2.5.h48
-rw-r--r--ace/config-aix-4.1.x.h11
-rw-r--r--ace/config-aix-4.2.x.h11
-rw-r--r--ace/config-aix-4.3.x.h11
-rw-r--r--ace/config-aix-4.x.h271
-rw-r--r--ace/config-all.h497
-rw-r--r--ace/config-chorus.h146
-rw-r--r--ace/config-cray.h242
-rw-r--r--ace/config-cxx-common.h82
-rw-r--r--ace/config-cygwin32-common.h175
-rw-r--r--ace/config-cygwin32.h16
-rw-r--r--ace/config-dgux-4.11-epc.h195
-rw-r--r--ace/config-dgux-4.x-ghs.h214
-rw-r--r--ace/config-freebsd-pthread.h207
-rw-r--r--ace/config-freebsd.h197
-rw-r--r--ace/config-fsu-pthread.h59
-rw-r--r--ace/config-g++-common.h100
-rw-r--r--ace/config-ghs-common.h44
-rw-r--r--ace/config-hpux-10.x-g++.h28
-rw-r--r--ace/config-hpux-10.x-hpc++.h124
-rw-r--r--ace/config-hpux-10.x.h252
-rw-r--r--ace/config-hpux-11.00.h399
-rw-r--r--ace/config-hpux-11.x-hpc++.h7
-rw-r--r--ace/config-hpux-9.x-orbix.h106
-rw-r--r--ace/config-hpux-9.x.h105
-rw-r--r--ace/config-hpux11.h257
-rw-r--r--ace/config-irix5.2.h69
-rw-r--r--ace/config-irix5.3-g++.h120
-rw-r--r--ace/config-irix5.3-sgic++.h123
-rw-r--r--ace/config-irix6.x-common.h168
-rw-r--r--ace/config-irix6.x-g++.h54
-rw-r--r--ace/config-irix6.x-kcc.h59
-rw-r--r--ace/config-irix6.x-sgic++-nothreads.h96
-rw-r--r--ace/config-irix6.x-sgic++.h54
-rw-r--r--ace/config-kcc-common.h76
-rw-r--r--ace/config-linux-common.h239
-rw-r--r--ace/config-linux-lxpthreads.h74
-rw-r--r--ace/config-linux-pthread.h33
-rw-r--r--ace/config-linux.h17
-rw-r--r--ace/config-lynxos.h174
-rw-r--r--ace/config-m88k.h227
-rw-r--r--ace/config-minimal.h39
-rw-r--r--ace/config-mit-pthread.h53
-rw-r--r--ace/config-mklinux.h20
-rw-r--r--ace/config-mvs.h118
-rw-r--r--ace/config-netbsd.h179
-rw-r--r--ace/config-osf1-3.2.h188
-rw-r--r--ace/config-osf1-4.0.h184
-rw-r--r--ace/config-pharlap.h63
-rw-r--r--ace/config-psos-diab-mips.h246
-rw-r--r--ace/config-psos-diab-ppc.h277
-rw-r--r--ace/config-psos-diab.h237
-rw-r--r--ace/config-psos-tm.h210
-rw-r--r--ace/config-psosim-g++.h246
-rw-r--r--ace/config-qnx-neutrino.h146
-rw-r--r--ace/config-sco-4.2-nothread.h116
-rw-r--r--ace/config-sco-5.0.0-fsu-pthread.h15
-rw-r--r--ace/config-sco-5.0.0-mit-pthread.h178
-rw-r--r--ace/config-sco-5.0.0-nothread.h14
-rw-r--r--ace/config-sco-5.0.0.h110
-rw-r--r--ace/config-sunos4-g++.h115
-rw-r--r--ace/config-sunos4-lucid3.2.h105
-rw-r--r--ace/config-sunos4-sun3.x.h97
-rw-r--r--ace/config-sunos4-sun4.1.4.h109
-rw-r--r--ace/config-sunos4-sun4.x-orbix.h108
-rw-r--r--ace/config-sunos4-sun4.x.h106
-rw-r--r--ace/config-sunos5.4-centerline-2.x.h175
-rw-r--r--ace/config-sunos5.4-g++.h191
-rw-r--r--ace/config-sunos5.4-sunc++-4.x-orbix.h199
-rw-r--r--ace/config-sunos5.4-sunc++-4.x.h204
-rw-r--r--ace/config-sunos5.5.h363
-rw-r--r--ace/config-sunos5.6.h38
-rw-r--r--ace/config-sunos5.7.h78
-rw-r--r--ace/config-sunos5.x-sunc++-4.x-orbix.h32
-rw-r--r--ace/config-tandem.h453
-rw-r--r--ace/config-tru64.h25
-rw-r--r--ace/config-unixware-2.01-g++.h113
-rw-r--r--ace/config-unixware-2.1.2-g++.h102
-rw-r--r--ace/config-visualage.h20
-rw-r--r--ace/config-vxworks5.x.h184
-rw-r--r--ace/config-win32-borland.h78
-rw-r--r--ace/config-win32-common.h475
-rw-r--r--ace/config-win32-msvc.h208
-rw-r--r--ace/config-win32-visualage.h82
-rw-r--r--ace/config-win32.h27
-rw-r--r--ace/gethrtime.cpp58
-rw-r--r--ace/iosfwd.h78
-rw-r--r--ace/makefile-light883
-rw-r--r--ace/post.h27
-rw-r--r--ace/pre.h29
-rw-r--r--ace/streams.h151
-rw-r--r--ace/svc_export.h40
-rw-r--r--ace/ws2tcpip.h90
832 files changed, 0 insertions, 257247 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
deleted file mode 100644
index 8fe5573f325..00000000000
--- a/ace/ACE.cpp
+++ /dev/null
@@ -1,4463 +0,0 @@
-// $Id$
-
-#include "ace/ACE.h"
-#include "ace/Handle_Set.h"
-#include "ace/Auto_Ptr.h"
-#include "ace/INET_Addr.h"
-#include "ace/Object_Manager.h"
-#include "ace/SString.h"
-#include "ace/Version.h"
-#include "ace/Message_Block.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/ACE.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-ACE_RCSID(ace, ACE, "$Id$")
-
- // Static data members.
- u_int ACE::init_fini_count_ = 0;
-
-// Keeps track of whether we're in some global debug mode.
-char ACE::debug_ = 0;
-
-// Hex characters.
-const ACE_TCHAR ACE::hex_chars_[] = ACE_TEXT ("0123456789abcdef");
-
-// Size of a VM page.
-size_t ACE::pagesize_ = 0;
-
-// Size of allocation granularity.
-size_t ACE::allocation_granularity_ = 0;
-
-int
-ACE::out_of_handles (int error)
-{
- // EMFILE is common to all platforms.
- if (error == EMFILE ||
-#if defined (ACE_WIN32)
- // On Win32, we need to check for ENOBUFS also.
- error == ENOBUFS ||
-#elif defined (HPUX)
- // On HPUX, we need to check for EADDRNOTAVAIL also.
- error == EADDRNOTAVAIL ||
-#elif defined (linux)
- // On linux, we need to check for ENOENT also.
- error == ENOENT ||
- // For RedHat5.2, need to check for EINVAL too.
- error == EINVAL ||
- // Without threads check for EOPNOTSUPP
- error == EOPNOTSUPP ||
-#elif defined (sun)
- // On sun, we need to check for ENOSR also.
- error == ENOSR ||
- // Without threads check for ENOTSUP
- error == ENOTSUP ||
-#elif defined (__FreeBSD__)
- // On FreeBSD we need to check for EOPNOTSUPP (LinuxThreads) or
- // ENOSYS (libc_r threads) also.
- error == EOPNOTSUPP ||
- error == ENOSYS ||
-#endif /* ACE_WIN32 */
- error == ENFILE)
- return 1;
- else
- return 0;
-}
-
-int
-ACE::init (void)
-{
- // Don't use ACE_TRACE, because Object_Manager might not have been
- // instantiated yet.
- // ACE_TRACE ("ACE::init");
-
- ++init_fini_count_;
-
- return ACE_Object_Manager::instance ()->init ();
-}
-
-int
-ACE::fini (void)
-{
- ACE_TRACE ("ACE::fini");
-
- if (init_fini_count_ > 0)
- {
- if (--init_fini_count_ == 0)
- return ACE_Object_Manager::instance ()->fini ();
- else
- // Wait for remaining fini () calls.
- return 1;
- }
- else
- // More ACE::fini () calls than ACE::init () calls. Bad
- // application!
- return -1;
-}
-
-u_int
-ACE::major_version (void)
-{
- return ACE_MAJOR_VERSION;
-}
-
-u_int
-ACE::minor_version (void)
-{
- return ACE_MINOR_VERSION;
-}
-
-u_int
-ACE::beta_version (void)
-{
- return ACE_BETA_VERSION;
-}
-
-const ACE_TCHAR *
-ACE::compiler_name (void)
-{
-#ifdef ACE_CC_NAME
- return ACE_CC_NAME;
-#else
- return "";
-#endif
-}
-
-u_int
-ACE::compiler_major_version (void)
-{
-#ifdef ACE_CC_MAJOR_VERSION
- return ACE_CC_MAJOR_VERSION;
-#else
- return 0;
-#endif
-}
-
-u_int
-ACE::compiler_minor_version (void)
-{
-#ifdef ACE_CC_MINOR_VERSION
- return ACE_CC_MINOR_VERSION;
-#else
- return 0;
-#endif
-}
-
-u_int
-ACE::compiler_beta_version (void)
-{
-#ifdef ACE_CC_BETA_VERSION
- return ACE_CC_BETA_VERSION;
-#else
- return 0;
-#endif
-}
-
-int
-ACE::terminate_process (pid_t pid)
-{
-#if defined (ACE_HAS_PHARLAP)
- ACE_UNUSED_ARG (pid);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_WIN32)
- // Create a handle for the given process id.
- ACE_HANDLE process_handle =
- ::OpenProcess (PROCESS_TERMINATE,
- FALSE, // New handle is not inheritable.
- pid);
-
- if (process_handle == ACE_INVALID_HANDLE
- || process_handle == 0)
- return -1;
- else
- {
- // Kill the process associated with process_handle.
- BOOL terminate_result =
- ::TerminateProcess (process_handle, 0);
- // Free up the kernel resources.
- ACE_OS::close (process_handle);
- return terminate_result;
- }
-#elif defined (CHORUS)
- KnCap cap_;
-
- // Use the pid to find out the actor's capability, then kill it.
-# if defined(CHORUS_4)
- if (::acap (pid, &cap_) == 0)
-# else
- if (::acap (AM_MYSITE, pid, &cap_) == 0)
-# endif
- return ::akill (&cap_);
- else
- return -1;
-#else
- return ACE_OS::kill (pid, 9);
-#endif /* ACE_WIN32 */
-}
-
-int
-ACE::process_active (pid_t pid)
-{
-#if !defined(ACE_WIN32)
- int retval = ACE_OS::kill (pid, 0);
-
- if (retval == 0)
- return 1;
- else if (errno == ESRCH)
- return 0;
- else
- return -1;
-#else
- // Create a handle for the given process id.
- ACE_HANDLE process_handle =
- ::OpenProcess (PROCESS_QUERY_INFORMATION, FALSE, pid);
- if (process_handle == ACE_INVALID_HANDLE
- || process_handle == 0)
- return 0;
- else
- {
- DWORD status;
- if (::GetExitCodeProcess (process_handle,
- &status) == 0
- || status != STILL_ACTIVE)
- return 0;
- else
- return 1;
- }
-#endif /* ACE_WIN32 */
-}
-
-// Split a string up into 'token'-delimited pieces, ala Perl's
-// "split".
-
-char *
-ACE::strsplit_r (char *str,
- const char *token,
- char *&next_start)
-{
- char *result = 0;
-
- if (str != 0)
- next_start = str;
-
- if (next_start != 0)
- {
- char *tok_loc = ACE_OS::strstr (next_start, token);
-
- if (tok_loc != 0)
- {
- // Return the beginning of the string.
- result = next_start;
-
- // Insure it's terminated.
- *tok_loc = '\0';
- next_start = tok_loc + ACE_OS::strlen (token);
- }
- else
- {
- result = next_start;
- next_start = (char *) 0;
- }
- }
-
- return result;
-}
-
-#if defined (ACE_HAS_WCHAR)
-wchar_t *
-ACE::strsplit_r (wchar_t *str,
- const wchar_t *token,
- wchar_t *&next_start)
-{
- wchar_t *result = 0;
-
- if (str != 0)
- next_start = str;
-
- if (next_start != 0)
- {
- wchar_t *tok_loc = ACE_OS::strstr (next_start, token);
-
- if (tok_loc != 0)
- {
- // Return the beginning of the string.
- result = next_start;
-
- // Insure it's terminated.
- *tok_loc = '\0';
- next_start = tok_loc + ACE_OS::strlen (token);
- }
- else
- {
- result = next_start;
- next_start = (wchar_t *) 0;
- }
- }
-
- return result;
-}
-#endif
-
-const ACE_TCHAR *
-ACE::execname (const ACE_TCHAR *old_name)
-{
-#if defined (ACE_WIN32)
- if (ACE_OS::strstr (old_name, ACE_TEXT (".exe")) == 0)
- {
- ACE_TCHAR *new_name;
-
- size_t size =
- ACE_OS::strlen (old_name)
- + ACE_OS::strlen (ACE_TEXT (".exe"))
- + 1;
-
- ACE_NEW_RETURN (new_name,
- ACE_TCHAR[size],
- 0);
- ACE_TCHAR *end = new_name;
-
- end = ACE_OS::strecpy (new_name, old_name);
-
- // Concatenate the .exe suffix onto the end of the executable.
- ACE_OS::strcpy (end, ACE_TEXT (".exe"));
-
- return new_name;
- }
-#endif /* ACE_WIN32 */
- return old_name;
-}
-
-u_long
-ACE::hash_pjw (const char *str, size_t len)
-{
- u_long hash = 0;
-
- for (size_t i = 0; i < len; i++)
- {
- const char temp = str[i];
- hash = (hash << 4) + (temp * 13);
-
- u_long g = hash & 0xf0000000;
-
- if (g)
- {
- hash ^= (g >> 24);
- hash ^= g;
- }
- }
-
- return hash;
-}
-
-u_long
-ACE::hash_pjw (const char *str)
-{
- return ACE::hash_pjw (str, ACE_OS::strlen (str));
-}
-
-#if defined (ACE_HAS_WCHAR)
-u_long
-ACE::hash_pjw (const wchar_t *str, size_t len)
-{
- u_long hash = 0;
-
- for (size_t i = 0; i < len; i++)
- {
- // @@ UNICODE: Does this function do the correct thing with wchar's?
-
- const wchar_t temp = str[i];
- hash = (hash << 4) + (temp * 13);
-
- u_long g = hash & 0xf0000000;
-
- if (g)
- {
- hash ^= (g >> 24);
- hash ^= g;
- }
- }
-
- return hash;
-}
-
-u_long
-ACE::hash_pjw (const wchar_t *str)
-{
- return ACE::hash_pjw (str, ACE_OS::strlen (str));
-}
-#endif /* ACE_HAS_WCHAR */
-
-// The CRC routine was taken from the FreeBSD implementation of cksum,
-// that falls under the following license:
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * James W. Williams of NASA Goddard Space Flight Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-u_long ACE::crc_table_[] =
-{
- 0x0,
- 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
- 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
- 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
- 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac,
- 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f,
- 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a,
- 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
- 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58,
- 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033,
- 0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe,
- 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95,
- 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4,
- 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0,
- 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5,
- 0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16,
- 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07,
- 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c,
- 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1,
- 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
- 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b,
- 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698,
- 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d,
- 0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e,
- 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f,
- 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34,
- 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80,
- 0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb,
- 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a,
- 0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629,
- 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c,
- 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
- 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e,
- 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65,
- 0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8,
- 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3,
- 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2,
- 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71,
- 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74,
- 0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640,
- 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21,
- 0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a,
- 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087,
- 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
- 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d,
- 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce,
- 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb,
- 0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18,
- 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09,
- 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662,
- 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf,
- 0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
-};
-
-// Compute a POSIX 1003.2 checksum. The routine takes an string and
-// computes the CRC for it (it stops on the first '\0' character).
-
-// UNICOS UINT32's are 64-bit on the Cray PVP architecture
-#if !defined(_UNICOS)
-# define COMPUTE(var, ch) (var) = ((var) << 8) ^ ACE::crc_table_[(((var) >> 24) ^ (ch))&0xff]
-#else /* ! _UNICOS */
-# define COMPUTE(var, ch) (var) = ( 0x00000000ffffffff & ((var) << 8)) ^ ACE::crc_table_[(((var) >> 24) ^ (ch))&0xff]
-#endif /* ! _UNICOS */
-
-u_long
-ACE::crc32 (const char *string)
-{
- register ACE_UINT32 crc = 0;
-
- u_long len = 0;
-
- for (const char *p = string;
- *p != 0;
- ++p)
- {
- COMPUTE (crc, *p);
- ++len;
- }
-
- // Include the length of the string.
-
- for (; len != 0; len >>= 8)
- COMPUTE (crc, len & 0xff);
-
- return ~crc;
-}
-
-u_long
-ACE::crc32 (const char *buffer, ACE_UINT32 len)
-{
- register ACE_UINT32 crc = 0;
-
- for (const char *p = buffer;
- p != buffer + len;
- ++p)
- {
- COMPUTE (crc, *p);
- }
-
- // Include the length of the string.
-
- for (; len != 0; len >>= 8)
- COMPUTE (crc, len & 0xff);
-
- return ~crc;
-}
-
-#undef COMPUTE
-
-size_t
-ACE::strrepl (char *s, char search, char replace)
-{
- ACE_TRACE ("ACE::strrepl");
-
- size_t replaced = 0;
-
- for (size_t i = 0; s[i] != '\0'; i++)
- if (s[i] == search)
- {
- s[i] = replace;
- replaced++;
- }
-
- return replaced;
-}
-
-#if defined (ACE_HAS_WCHAR)
-size_t
-ACE::strrepl (wchar_t *s, wchar_t search, wchar_t replace)
-{
- ACE_TRACE ("ACE::strrepl");
-
- size_t replaced = 0;
-
- for (size_t i = 0; s[i] != '\0'; i++)
- if (s[i] == search)
- {
- s[i] = replace;
- replaced++;
- }
-
- return replaced;
-}
-#endif /* ACE_HAS_WCHAR */
-
-#if !defined (ACE_HAS_WINCE)
-ACE_TCHAR *
-ACE::strenvdup (const ACE_TCHAR *str)
-{
- ACE_TRACE ("ACE::strenvdup");
-
- return ACE_OS::strenvdup (str);
-}
-#endif /* ACE_HAS_WINCE */
-
-/*
-
-Examples:
-
-Source NT UNIX
-==================================================================
-netsvc netsvc.dll libnetsvc.so
- (PATH will be (LD_LIBRARY_PATH
- evaluated) evaluated)
-
-libnetsvc.dll libnetsvc.dll libnetsvc.dll + warning
-netsvc.so netsvc.so + warning libnetsvc.so
-
-..\../libs/netsvc ..\..\libs\netsvc.dll ../../libs/netsvc.so
- (absolute path used) (absolute path used)
-
-*/
-
-#if ! defined (ACE_PSOS_DIAB_MIPS)
-int
-ACE::ldfind (const ACE_TCHAR filename[],
- ACE_TCHAR pathname[],
- size_t maxpathnamelen)
-{
- ACE_TRACE ("ACE::ldfind");
-
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && \
- !defined (ACE_HAS_PHARLAP)
- ACE_TCHAR expanded_filename[MAXPATHLEN];
- if (ACE_TEXT_ExpandEnvironmentStrings (filename,
- expanded_filename,
- sizeof expanded_filename
- / sizeof (ACE_TCHAR)))
- filename = expanded_filename;
-#endif /* ACE_WIN32 && !ACE_HAS_WINCE && !ACE_HAS_PHARLAP */
-
- ACE_TCHAR tempcopy[MAXPATHLEN + 1];
- ACE_TCHAR searchpathname[MAXPATHLEN + 1];
- ACE_TCHAR searchfilename[MAXPATHLEN + 2];
-
- // Create a copy of filename to work with.
- if (ACE_OS::strlen (filename) + 1
- > (sizeof tempcopy / sizeof (ACE_TCHAR)))
- {
- errno = ENOMEM;
- return -1;
- }
- else
- ACE_OS::strcpy (tempcopy, filename);
-
- // Insert canonical directory separators.
- ACE_TCHAR *separator_ptr;
-
-#if (ACE_DIRECTORY_SEPARATOR_CHAR != '/')
- // Make all the directory separators "canonical" to simplify
- // subsequent code.
- ACE::strrepl (tempcopy, ACE_DIRECTORY_SEPARATOR_CHAR, '/');
-#endif /* ACE_DIRECTORY_SEPARATOR_CHAR */
-
- // Separate filename from pathname.
- separator_ptr = ACE_OS::strrchr (tempcopy, '/');
-
- // This is a relative path.
- if (separator_ptr == 0)
- {
- searchpathname[0] = '\0';
- ACE_OS::strcpy (searchfilename, tempcopy);
- }
- else // This is an absolute path.
- {
- ACE_OS::strcpy (searchfilename, separator_ptr + 1);
- separator_ptr[1] = '\0';
- ACE_OS::strcpy (searchpathname, tempcopy);
- }
-
- int got_suffix = 0;
-
- // Check to see if this has an appropriate DLL suffix for the OS
- // platform.
- ACE_TCHAR *s = ACE_OS::strrchr (searchfilename, '.');
-
- const ACE_TCHAR *dll_suffix = ACE_DLL_SUFFIX;
-
- if (s != 0)
- {
- // If we have a dot, we have a suffix
- got_suffix = 1;
-
- // Check whether this matches the appropriate platform-specific
- // suffix.
- if (ACE_OS::strcmp (s, dll_suffix) != 0)
- {
- ACE_ERROR ((LM_WARNING,
- ACE_TEXT ("Warning: improper suffix for a ")
- ACE_TEXT ("shared library on this platform: %s\n"),
- s));
- }
- }
-
- // Make sure we've got enough space in searchfilename.
- if (ACE_OS::strlen (searchfilename)
- + ACE_OS::strlen (ACE_DLL_PREFIX)
- + got_suffix ? 0 : ACE_OS::strlen (dll_suffix) >= (sizeof searchfilename /
- sizeof (ACE_TCHAR)))
- {
- errno = ENOMEM;
- return -1;
- }
-
-#if defined (ACE_WIN32) && defined (_DEBUG) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK)
- size_t len_searchfilename = ACE_OS::strlen (searchfilename);
- if (! got_suffix)
- {
- searchfilename [len_searchfilename] = 'd';
- searchfilename [len_searchfilename+1] = 0;
- }
-
- for (int tag = 1; tag >= 0; tag --)
- {
- if (tag == 0)
- searchfilename [len_searchfilename] = 0;
-
-#endif /* ACE_WIN32 && _DEBUG && !ACE_DISABLE_DEBUG_DLL_CHECK */
- // Use absolute pathname if there is one.
- if (ACE_OS::strlen (searchpathname) > 0)
- {
- if (ACE_OS::strlen (searchfilename)
- + ACE_OS::strlen (searchpathname) >= maxpathnamelen)
- {
- errno = ENOMEM;
- return -1;
- }
- else
- {
-#if (ACE_DIRECTORY_SEPARATOR_CHAR != '/')
- // Revert to native path name separators.
- ACE::strrepl (searchpathname,
- '/',
- ACE_DIRECTORY_SEPARATOR_CHAR);
-#endif /* ACE_DIRECTORY_SEPARATOR_CHAR */
- // First, try matching the filename *without* adding a
- // prefix.
-#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- ACE_OS::sprintf (pathname,
- ACE_TEXT ("%s%s%s"),
- searchpathname,
- searchfilename,
- got_suffix ? ACE_static_cast (ACE_TCHAR *,
- ACE_TEXT (""))
- : ACE_static_cast (ACE_TCHAR *,
- dll_suffix));
-#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_OS::sprintf (pathname,
- ACE_TEXT ("%s%s%s"),
- searchpathname,
- searchfilename,
- got_suffix ? ACE_TEXT ("") : dll_suffix);
-#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- if (ACE_OS::access (pathname, F_OK) == 0)
- return 0;
-
- // Second, try matching the filename *with* adding a prefix.
-#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- ACE_OS::sprintf (pathname,
- ACE_TEXT ("%s%s%s%s"),
- searchpathname,
- ACE_DLL_PREFIX,
- searchfilename,
- got_suffix ? ACE_static_cast (ACE_TCHAR *,
- ACE_TEXT (""))
- : ACE_static_cast (ACE_TCHAR *,
- dll_suffix));
-#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_OS::sprintf (pathname,
- ACE_TEXT ("%s%s%s%s"),
- searchpathname,
- ACE_DLL_PREFIX,
- searchfilename,
- got_suffix ? ACE_TEXT ("") : dll_suffix);
-#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- if (ACE_OS::access (pathname, F_OK) == 0)
- return 0;
- }
- }
-
- // Use relative filenames via LD_LIBRARY_PATH or PATH (depending on
- // OS platform).
- else
- {
- ACE_TCHAR *ld_path =
-#if defined ACE_DEFAULT_LD_SEARCH_PATH
- ACE_DEFAULT_LD_SEARCH_PATH;
-#else
- ACE_OS::getenv (ACE_LD_SEARCH_PATH);
-#endif /* ACE_DEFAULT_LD_SEARCH_PATH */
-
-#if defined (ACE_WIN32)
- ACE_TCHAR *ld_path_temp = 0;
- if (ld_path != 0)
- {
- ld_path_temp = (ACE_TCHAR *) ACE_OS::malloc ((ACE_OS::strlen (ld_path) + 2)
- * sizeof (ACE_TCHAR));
- if (ld_path_temp != 0)
- {
- ACE_OS::strcpy (ld_path_temp, ACE_LD_SEARCH_PATH_SEPARATOR_STR);
- ACE_OS::strcat (ld_path_temp, ld_path);
- ld_path = ld_path_temp;
- }
- else
- {
- ACE_OS::free ((void *) ld_path_temp);
- ld_path = ld_path_temp = 0;
- }
- }
-#endif /* ACE_WIN32 */
-
- if (ld_path != 0
- && (ld_path = ACE_OS::strdup (ld_path)) != 0)
- {
- // strtok has the strange behavior of not separating the
- // string ":/foo:/bar" into THREE tokens. One would expect
- // that the first iteration the token would be an empty
- // string, the second iteration would be "/foo", and the
- // third iteration would be "/bar". However, this is not
- // the case; one only gets two iterations: "/foo" followed
- // by "/bar".
-
- // This is especially a problem in parsing Unix paths
- // because it is permissible to specify 'the current
- // directory' as an empty entry. So, we introduce the
- // following special code to cope with this:
-
- // Look at each dynamic lib directory in the search path.
-
- ACE_TCHAR *nextholder = 0;
- const ACE_TCHAR *path_entry =
- ACE::strsplit_r (ld_path,
- ACE_LD_SEARCH_PATH_SEPARATOR_STR,
- nextholder);
- int result = 0;
-
- for (;;)
- {
- // Check if at end of search path.
- if (path_entry == 0)
- {
- errno = ENOENT;
- result = -1;
- break;
- }
- else if (ACE_OS::strlen (path_entry)
- + 1
- + ACE_OS::strlen (searchfilename)
- >= maxpathnamelen)
- {
- errno = ENOMEM;
- result = -1;
- break;
- }
- // This works around the issue where a path might have
- // an empty component indicating 'current directory'.
- // We need to do it here rather than anywhere else so
- // that the loop condition will still work.
- else if (path_entry[0] == '\0')
- path_entry = ACE_TEXT (".");
-
- // First, try matching the filename *without* adding a
- // prefix.
-#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- ACE_OS::sprintf (pathname,
- ACE_TEXT ("%s%c%s%s"),
- path_entry,
- ACE_DIRECTORY_SEPARATOR_CHAR,
- searchfilename,
- got_suffix ? ACE_static_cast (ACE_TCHAR *,
- ACE_TEXT (""))
- : ACE_static_cast (ACE_TCHAR *,
- dll_suffix));
-#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_OS::sprintf (pathname,
- ACE_TEXT ("%s%c%s%s"),
- path_entry,
- ACE_DIRECTORY_SEPARATOR_CHAR,
- searchfilename,
- got_suffix ? ACE_TEXT ("") : dll_suffix);
-#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- if (ACE_OS::access (pathname, F_OK) == 0)
- break;
-
- // Second, try matching the filename *with* adding a
- // prefix.
-#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- ACE_OS::sprintf (pathname,
- ACE_TEXT ("%s%c%s%s%s"),
- path_entry,
- ACE_DIRECTORY_SEPARATOR_CHAR,
- ACE_DLL_PREFIX,
- searchfilename,
- got_suffix ? ACE_static_cast (ACE_TCHAR *,
- ACE_TEXT (""))
- : ACE_static_cast (ACE_TCHAR *,
- dll_suffix));
-#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_OS::sprintf (pathname,
- ACE_TEXT ("%s%c%s%s%s"),
- path_entry,
- ACE_DIRECTORY_SEPARATOR_CHAR,
- ACE_DLL_PREFIX,
- searchfilename,
- got_suffix ? ACE_TEXT ("") : dll_suffix);
-#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- if (ACE_OS::access (pathname, F_OK) == 0)
- break;
-
- // Fetch the next item in the path
- path_entry = ACE::strsplit_r (0,
- ACE_LD_SEARCH_PATH_SEPARATOR_STR,
- nextholder);
- }
-
-#if defined (ACE_WIN32)
- if (ld_path_temp != 0)
- ACE_OS::free (ld_path_temp);
-#endif /* ACE_WIN32 */
- ACE_OS::free ((void *) ld_path);
-#if defined (ACE_WIN32) && defined (_DEBUG) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK)
- if (result == 0 || tag == 0)
-#endif /* ACE_WIN32 && _DEBUG && !ACE_DISABLE_DEBUG_DLL_CHECK */
- return result;
- }
- }
-#if defined (ACE_WIN32) && defined (_DEBUG) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK)
- }
-#endif /* ACE_WIN32 && _DEBUG && !ACE_DISABLE_DEBUG_DLL_CHECK */
-
- errno = ENOENT;
- return -1;
-}
-
-FILE *
-ACE::ldopen (const ACE_TCHAR *filename,
- const ACE_TCHAR *type)
-{
- ACE_TRACE ("ACE::ldopen");
-
- ACE_TCHAR buf[MAXPATHLEN + 1];
- if (ACE::ldfind (filename,
- buf,
- sizeof (buf) /sizeof (ACE_TCHAR)) == -1)
- return 0;
- else
- return ACE_OS::fopen (buf, type);
-}
-
-int
-ACE::get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len)
-{
- int result;
-#if defined (ACE_WIN32)
- result = ACE_TEXT_GetTempPath (buffer_len, buffer);
-
- // Make sure to return -1 if there is an error
- if (result == 0 && ::GetLastError () != ERROR_SUCCESS
- || result > ACE_static_cast (int, buffer_len))
- result = -1;
-
-#else /* ACE_WIN32 */
-
- // On non-win32 platforms, check to see what the TMPDIR environment
- // variable is defined to be. If it doesn't exist, just use /tmp
- const ACE_TCHAR *tmpdir = ACE_OS::getenv (ACE_TEXT ("TMPDIR"));
-
- if (tmpdir == NULL)
- tmpdir = ACE_TEXT ("/tmp");
-
- size_t len = ACE_OS::strlen (tmpdir);
-
- // Check to see if the buffer is large enough for the string,
- // another /, and its null character (hence the + 2)
- if ((len + 2) > buffer_len)
- {
- result = -1;
- }
- else
- {
- ACE_OS::strcpy (buffer, tmpdir);
-
- // Add a trailing slash because we cannot assume there is already one
- // at the end. And having an extra one should not cause problems.
- buffer[len] = '/';
- buffer[len + 1] = 0;
- result = 0;
- }
-#endif /* ACE_WIN32 */
- return result;
-}
-
-ACE_HANDLE
-ACE::open_temp_file (const ACE_TCHAR *name, int mode, int perm)
-{
-#if defined (ACE_WIN32)
- return ACE_OS::open (name,
- mode | _O_TEMPORARY);
-#else
- // Open it.
- ACE_HANDLE handle = ACE_OS::open (name, mode, perm);
-
- if (handle == ACE_INVALID_HANDLE)
- return ACE_INVALID_HANDLE;
-
- // Unlink it so that the file will be removed automatically when the
- // process goes away.
- if (ACE_OS::unlink (name) == -1)
- return -1;
- else
- // Return the handle.
- return handle;
-#endif /* ACE_WIN32 */
-}
-#endif /* ! ACE_PSOS_DIAB_MIPS */
-
-const ACE_TCHAR *
-ACE::basename (const ACE_TCHAR *pathname, ACE_TCHAR delim)
-{
- ACE_TRACE ("ACE::basename");
- const ACE_TCHAR *temp = ACE_OS::strrchr (pathname, delim);
-
- if (temp == 0)
- return pathname;
- else
- return temp + 1;
-}
-
-const ACE_TCHAR *
-ACE::dirname (const ACE_TCHAR *pathname, ACE_TCHAR delim)
-{
- ACE_TRACE ("ACE::basename");
- static ACE_TCHAR return_dirname[MAXPATHLEN + 1];
-
- const ACE_TCHAR *temp = ACE_OS::strrchr (pathname, delim);
-
- if (temp == 0)
- {
- return_dirname[0] = '.';
- return_dirname[1] = '\0';
-
- return return_dirname;
- }
- else
- {
- ACE_OS::strncpy (return_dirname,
- pathname,
- MAXPATHLEN);
- return_dirname[temp - pathname] = '\0';
- return return_dirname;
- }
-}
-
-ssize_t
-ACE::recv (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE_OS::recv (handle, (char *) buf, len, flags);
- else
- {
-#if defined (ACE_HAS_RECV_TIMEDWAIT)
- ACE_Time_Value copy = *timeout;
- copy += ACE_OS::gettimeofday ();
- timespec_t ts = copy;
- return ::recv_timedwait (handle, buf, len, flags, &ts);
-#else
- int val = 0;
- if (ACE::enter_recv_timedwait (handle, timeout, val) ==-1)
- return -1;
- else
- {
- ssize_t bytes_transferred = ACE_OS::recv (handle, (char *) buf, len, flags);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
-#endif /* ACE_HAS_RECV_TIMEDWAIT */
- }
-}
-
-#if defined (ACE_HAS_TLI)
-
-ssize_t
-ACE::t_rcv (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int *flags,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE_OS::t_rcv (handle, (char *) buf, len, flags);
- else
- {
- int val = 0;
- if (ACE::enter_recv_timedwait (handle, timeout, val) ==-1)
- return -1;
- else
- {
- ssize_t bytes_transferred = ACE_OS::t_rcv (handle, (char *) buf, len, flags);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
- }
-}
-
-#endif /* ACE_HAS_TLI */
-
-ssize_t
-ACE::recv (ACE_HANDLE handle,
- void *buf,
- size_t n,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE::recv_i (handle, buf, n);
- else
- {
-#if defined (ACE_HAS_READ_TIMEDWAIT)
- ACE_Time_Value copy = *timeout;
- copy += ACE_OS::gettimeofday ();
- timespec_t ts = copy;
- return ::read_timedwait (handle, buf, n, &ts);
-#else
- int val = 0;
- if (ACE::enter_recv_timedwait (handle, timeout, val) == -1)
- return -1;
- else
- {
- ssize_t bytes_transferred = ACE::recv_i (handle, buf, n);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
-#endif /* ACE_HAS_READ_TIMEDWAIT */
- }
-}
-
-ssize_t
-ACE::recvmsg (ACE_HANDLE handle,
- struct msghdr *msg,
- int flags,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE_OS::recvmsg (handle, msg, flags);
- else
- {
-#if defined (ACE_HAS_RECVMSG_TIMEDWAIT)
- ACE_Time_Value copy = *timeout;
- copy += ACE_OS::gettimeofday ();
- timespec_t ts = copy;
- return ::recvmsg_timedwait (handle, msg, flags, &ts);
-#else
- int val = 0;
- if (ACE::enter_recv_timedwait (handle, timeout, val) == -1)
- return -1;
- else
- {
- int bytes_transferred = ACE_OS::recvmsg (handle, msg, flags);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
-#endif /* ACE_HAS_RECVMSG_TIMEDWAIT */
- }
-}
-
-ssize_t
-ACE::recvfrom (ACE_HANDLE handle,
- char *buf,
- int len,
- int flags,
- struct sockaddr *addr,
- int *addrlen,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE_OS::recvfrom (handle, buf, len, flags, addr, addrlen);
- else
- {
-#if defined (ACE_HAS_RECVFROM_TIMEDWAIT)
- ACE_Time_Value copy = *timeout;
- copy += ACE_OS::gettimeofday ();
- timespec_t ts = copy;
- return ::recvfrom_timedwait (handle, buf, len, flags, addr, addrlen, &ts);
-#else
- int val = 0;
- if (ACE::enter_recv_timedwait (handle, timeout, val) == -1)
- return -1;
- else
- {
- int bytes_transferred = ACE_OS::recvfrom (handle, buf, len, flags, addr, addrlen);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
-#endif /* ACE_HAS_RECVFROM_TIMEDWAIT */
- }
-}
-
-ssize_t
-ACE::recv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int flags,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = ACE_OS::recv (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred,
- flags);
- // Check EOF.
- if (n == 0)
- return 0;
-
- // Check for other errors.
- if (n == -1)
- {
- // If blocked, try again.
- if (errno == EWOULDBLOCK)
- {
- // Make sure we can make progress before continuing,
- // otherwise we'll just keep spinning.
- int result = ACE::handle_read_ready (handle, 0);
- if (result == -1)
- return -1;
-
- n = 0;
- continue;
- }
-
- // No timeouts in this version.
-
- // Other errors.
- return -1;
- }
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE::recv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
- ssize_t result = 0;
- int error = 0;
-
- int val = 0;
- ACE::record_and_set_non_blocking_mode (handle, val);
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- int rtn = ACE::handle_read_ready (handle,
- timeout);
-
- if (rtn == -1)
- {
- error = 1;
- result = -1;
- break;
- }
-
- n = ACE_OS::recv (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred,
- flags);
-
- // Errors (note that errno cannot be EWOULDBLOCK since select()
- // just told us that data is available to read).
- if (n == -1 || n == 0)
- {
- error = 1;
- result = n;
- break;
- }
- }
-
- ACE::restore_non_blocking_mode (handle, val);
-
- if (error)
- return result;
- else
- return bytes_transferred;
-}
-
-#if defined (ACE_HAS_TLI)
-
-ssize_t
-ACE::t_rcv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int *flags,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = ACE_OS::t_rcv (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred,
- flags);
- // Check EOF.
- if (n == 0)
- return 0;
-
- // Check for other errors.
- if (n == -1)
- {
- // If blocked, try again.
- if (errno == EWOULDBLOCK)
- {
- // Make sure we can make progress before continuing,
- // otherwise we'll just keep spinning.
- int result = ACE::handle_read_ready (handle, 0);
- if (result == -1)
- return -1;
-
- n = 0;
- continue;
- }
-
- // No timeouts in this version.
-
- // Other errors.
- return -1;
- }
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE::t_rcv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int *flags,
- const ACE_Time_Value *timeout,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
- ssize_t result = 0;
- int error = 0;
-
- int val = 0;
- ACE::record_and_set_non_blocking_mode (handle, val);
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- int rtn = ACE::handle_read_ready (handle,
- timeout);
-
- if (rtn == -1)
- {
- error = 1;
- result = -1;
- break;
- }
-
- n = ACE_OS::t_rcv (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred,
- flags);
-
- // Errors (note that errno cannot be EWOULDBLOCK since select()
- // just told us that data is available to read).
- if (n == -1 || n == 0)
- {
- error = 1;
- result = n;
- break;
- }
- }
-
- ACE::restore_non_blocking_mode (handle, val);
-
- if (error)
- return result;
- else
- return bytes_transferred;
-}
-
-#endif /* ACE_HAS_TLI */
-
-ssize_t
-ACE::recv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = ACE::recv_i (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred);
- // Check EOF.
- if (n == 0)
- return 0;
-
- // Check for other errors.
- if (n == -1)
- {
- // If blocked, try again.
- if (errno == EWOULDBLOCK)
- {
- // Make sure we can make progress before continuing,
- // otherwise we'll just keep spinning.
- int result = ACE::handle_read_ready (handle, 0);
- if (result == -1)
- return -1;
-
- n = 0;
- continue;
- }
-
- // No timeouts in this version.
-
- // Other errors.
- return -1;
- }
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE::recv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- const ACE_Time_Value *timeout,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
- ssize_t result = 0;
- int error = 0;
-
- int val = 0;
- ACE::record_and_set_non_blocking_mode (handle, val);
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- int rtn = ACE::handle_read_ready (handle,
- timeout);
-
- if (rtn == -1)
- {
- error = 1;
- result = -1;
- break;
- }
-
- n = ACE::recv_i (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred);
-
- // Errors (note that errno cannot be EWOULDBLOCK since select()
- // just told us that data is available to read).
- if (n == -1 || n == 0)
- {
- error = 1;
- result = n;
- break;
- }
- }
-
- ACE::restore_non_blocking_mode (handle, val);
-
- if (error)
- return result;
- else
- return bytes_transferred;
-}
-
-// This is basically an interface to ACE_OS::readv, that doesn't use
-// the struct iovec explicitly. The ... can be passed as an arbitrary
-// number of (char *ptr, int len) tuples. However, the count N is the
-// *total* number of trailing arguments, *not* a couple of the number
-// of tuple pairs!
-
-ssize_t
-ACE::recv (ACE_HANDLE handle, size_t n, ...)
-{
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, ssize_t);
- }
-
- ssize_t result = ACE_OS::recvv (handle, iovp, total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-
-ssize_t
-ACE::recvv (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE_OS::recvv (handle, iov, iovcnt);
- else
- {
-#if defined (ACE_HAS_READV_TIMEDWAIT)
- ACE_Time_Value copy = *timeout;
- copy += ACE_OS::gettimeofday ();
- timespec_t ts = copy;
- return ::readv_timedwait (handle, iov, iovcnt, &ts);
-#else
- int val = 0;
- if (ACE::enter_recv_timedwait (handle, timeout, val) == -1)
- return -1;
- else
- {
- ssize_t bytes_transferred = ACE_OS::recvv (handle, iov, iovcnt);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
-#endif /* ACE_HAS_READV_TIMEDWAIT */
- }
-}
-
-ssize_t
-ACE::recvv_n_i (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- bytes_transferred = 0;
-
- for (int s = 0;
- s < iovcnt;
- )
- {
- ssize_t n = ACE_OS::recvv (handle,
- iov + s,
- iovcnt - s);
- // Check EOF.
- if (n == 0)
- return 0;
-
- // Check for other errors.
- if (n == -1)
- {
- // If blocked, try again.
- if (errno == EWOULDBLOCK)
- {
- // Make sure we can make progress before continuing,
- // otherwise we'll just keep spinning.
- int result = ACE::handle_read_ready (handle, 0);
- if (result == -1)
- return -1;
-
- n = 0;
- continue;
- }
-
- // No timeouts in this version.
-
- // Other errors.
- return -1;
- }
-
- for (bytes_transferred += n;
- s < iovcnt
- && n >= ACE_static_cast (ssize_t,
- iov[s].iov_len);
- s++)
- n -= iov[s].iov_len;
-
- if (n != 0)
- {
- char *base = ACE_reinterpret_cast (char *,
- iov[s].iov_base);
- iov[s].iov_base = base + n;
- iov[s].iov_len = iov[s].iov_len - n;
- }
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE::recvv_n_i (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- bytes_transferred = 0;
- ssize_t result = 0;
- int error = 0;
-
- int val = 0;
- ACE::record_and_set_non_blocking_mode (handle, val);
-
- for (int s = 0;
- s < iovcnt;
- )
- {
- int rtn = ACE::handle_read_ready (handle,
- timeout);
-
- if (rtn == -1)
- {
- error = 1;
- result = -1;
- break;
- }
-
- ssize_t n = ACE_OS::recvv (handle,
- iov + s,
- iovcnt - s);
-
- // Errors (note that errno cannot be EWOULDBLOCK since select()
- // just told us that data is available to read).
- if (n == -1 || n == 0)
- {
- error = 1;
- result = n;
- break;
- }
-
- for (bytes_transferred += n;
- s < iovcnt
- && n >= ACE_static_cast (ssize_t,
- iov[s].iov_len);
- s++)
- n -= iov[s].iov_len;
-
- if (n != 0)
- {
- char *base = ACE_reinterpret_cast (char *,
- iov[s].iov_base);
- iov[s].iov_base = base + n;
- iov[s].iov_len = iov[s].iov_len - n;
- }
- }
-
- ACE::restore_non_blocking_mode (handle, val);
-
- if (error)
- return result;
- else
- return bytes_transferred;
-}
-
-ssize_t
-ACE::recv_n (ACE_HANDLE handle,
- ACE_Message_Block *message_block,
- const ACE_Time_Value *timeout,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- bytes_transferred = 0;
-
- iovec iov[IOV_MAX];
- int iovcnt = 0;
-
- while (message_block != 0)
- {
- // Our current message block chain.
- const ACE_Message_Block *current_message_block = message_block;
-
- while (current_message_block != 0)
- {
- size_t current_message_block_length =
- current_message_block->length ();
-
- // Check if this block has any space for incoming data.
- if (current_message_block_length > 0)
- {
- // Collect the data in the iovec.
- iov[iovcnt].iov_base = current_message_block->rd_ptr ();
- iov[iovcnt].iov_len = current_message_block_length;
-
- // Increment iovec counter.
- iovcnt++;
-
- // The buffer is full make a OS call. @@ TODO find a way to
- // find IOV_MAX for platforms that do not define it rather
- // than simply setting IOV_MAX to some arbitrary value such
- // as 16.
- if (iovcnt == IOV_MAX)
- {
- size_t current_transfer = 0;
-
- ssize_t result = ACE::recvv_n (handle,
- iov,
- iovcnt,
- timeout,
- &current_transfer);
-
- // Add to total bytes transferred.
- bytes_transferred += current_transfer;
-
- // Errors.
- if (result == -1 || result == 0)
- return result;
-
- // Reset iovec counter.
- iovcnt = 0;
- }
- }
-
- // Select the next message block in the chain.
- current_message_block = current_message_block->cont ();
- }
-
- // Selection of the next message block chain.
- message_block = message_block->next ();
- }
-
- // Check for remaining buffers to be sent. This will happen when
- // IOV_MAX is not a multiple of the number of message blocks.
- if (iovcnt != 0)
- {
- size_t current_transfer = 0;
-
- ssize_t result = ACE::recvv_n (handle,
- iov,
- iovcnt,
- timeout,
- &current_transfer);
-
- // Add to total bytes transferred.
- bytes_transferred += current_transfer;
-
- // Errors.
- if (result == -1 || result == 0)
- return result;
- }
-
- // Return total bytes transferred.
- return bytes_transferred;
-}
-
-ssize_t
-ACE::send (ACE_HANDLE handle,
- const void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE_OS::send (handle, (const char *) buf, n, flags);
- else
- {
-#if defined (ACE_HAS_SEND_TIMEDWAIT)
- ACE_Time_Value copy = *timeout;
- copy += ACE_OS::gettimeofday();
- timespec_t ts = copy;
- return ::send_timedwait (handle, buf, n, flags, &ts);
-#else
- int val = 0;
- if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
- return -1;
- else
- {
- ssize_t bytes_transferred = ACE_OS::send (handle, (const char *) buf, n, flags);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
-#endif /* ACE_HAS_SEND_TIMEDWAIT */
- }
-}
-
-#if defined (ACE_HAS_TLI)
-
-ssize_t
-ACE::t_snd (ACE_HANDLE handle,
- const void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE_OS::t_snd (handle, (const char *) buf, n, flags);
- else
- {
- int val = 0;
- if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
- return -1;
- else
- {
- ssize_t bytes_transferred = ACE_OS::t_snd (handle, (const char *) buf, n, flags);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
- }
-}
-
-#endif /* ACE_HAS_TLI */
-
-ssize_t
-ACE::send (ACE_HANDLE handle,
- const void *buf,
- size_t n,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE::send_i (handle, buf, n);
- else
- {
-#if defined (ACE_HAS_WRITE_TIMEDWAIT)
- ACE_Time_Value copy = *timeout;
- copy += ACE_OS::gettimeofday ();
- timespec_t ts = copy;
- return ::write_timedwait (handle, buf, n, &ts);
-#else
- int val = 0;
- if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
- return -1;
- else
- {
- ssize_t bytes_transferred = ACE::send_i (handle, buf, n);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
-#endif /* ACE_HAS_WRITE_TIMEDWAIT */
- }
-}
-
-ssize_t
-ACE::sendmsg (ACE_HANDLE handle,
- const struct msghdr *msg,
- int flags,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE_OS::sendmsg (handle, msg, flags);
- else
- {
-#if defined (ACE_HAS_SENDMSG_TIMEDWAIT)
- ACE_Time_Value copy = *timeout;
- copy += ACE_OS::gettimeofday ();
- timespec_t ts = copy;
- return ::sendmsg_timedwait (handle, msg, flags, &ts);
-#else
- int val = 0;
- if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
- return -1;
- else
- {
- int bytes_transferred = ACE_OS::sendmsg (handle, msg, flags);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
-#endif /* ACE_HAS_SENDMSG_TIMEDWAIT */
- }
-}
-
-ssize_t
-ACE::sendto (ACE_HANDLE handle,
- const char *buf,
- int len,
- int flags,
- const struct sockaddr *addr,
- int addrlen,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE_OS::sendto (handle, buf, len, flags, addr, addrlen);
- else
- {
-#if defined (ACE_HAS_SENDTO_TIMEDWAIT)
- ACE_Time_Value copy = *timeout;
- copy += ACE_OS::gettimeofday ();
- timespec_t ts = copy;
- return ::sendto_timedwait (handle, buf, len, flags, addr, addrlen, ts);
-#else
- int val = 0;
- if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
- return -1;
- else
- {
- int bytes_transferred = ACE_OS::sendto (handle, buf, len, flags, addr, addrlen);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
-#endif /* ACE_HAS_SENDTO_TIMEDWAIT */
- }
-}
-
-ssize_t
-ACE::send_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = ACE_OS::send (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred,
- flags);
- // Check EOF.
- if (n == 0)
- return 0;
-
- // Check for other errors.
- if (n == -1)
- {
- // If blocked, try again.
- if (errno == EWOULDBLOCK)
- {
- // Make sure we can make progress before continuing,
- // otherwise we'll just keep spinning.
- int result = ACE::handle_write_ready (handle, 0);
- if (result == -1)
- return -1;
-
- n = 0;
- continue;
- }
-
- // No timeouts in this version.
-
- // Other errors.
- return -1;
- }
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE::send_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
- ssize_t result = 0;
- int error = 0;
-
- int val = 0;
- ACE::record_and_set_non_blocking_mode (handle, val);
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- int rtn = ACE::handle_write_ready (handle,
- timeout);
-
- if (rtn == -1)
- {
- error = 1;
- result = -1;
- break;
- }
-
- n = ACE_OS::send (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred,
- flags);
-
- // Errors (note that errno cannot be EWOULDBLOCK since select()
- // just told us that data can be written).
- if (n == -1 || n == 0)
- {
- error = 1;
- result = n;
- break;
- }
- }
-
- ACE::restore_non_blocking_mode (handle, val);
-
- if (error)
- return result;
- else
- return bytes_transferred;
-}
-
-#if defined (ACE_HAS_TLI)
-
-ssize_t
-ACE::t_snd_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = ACE_OS::t_snd (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred,
- flags);
- // Check EOF.
- if (n == 0)
- return 0;
-
- // Check for other errors.
- if (n == -1)
- {
- // If blocked, try again.
- if (errno == EWOULDBLOCK)
- {
- // Make sure we can make progress before continuing,
- // otherwise we'll just keep spinning.
- int result = ACE::handle_write_ready (handle, 0);
- if (result == -1)
- return -1;
-
- n = 0;
- continue;
- }
-
- // No timeouts in this version.
-
- // Other errors.
- return -1;
- }
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE::t_snd_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
- ssize_t result = 0;
- int error = 0;
-
- int val = 0;
- ACE::record_and_set_non_blocking_mode (handle, val);
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- int rtn = ACE::handle_write_ready (handle,
- timeout);
-
- if (rtn == -1)
- {
- error = 1;
- result = -1;
- break;
- }
-
- n = ACE_OS::t_snd (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred,
- flags);
-
- // Errors (note that errno cannot be EWOULDBLOCK since select()
- // just told us that data can be written).
- if (n == -1 || n == 0)
- {
- error = 1;
- result = n;
- break;
- }
- }
-
- ACE::restore_non_blocking_mode (handle, val);
-
- if (error)
- return result;
- else
- return bytes_transferred;
-}
-
-#endif /* ACE_HAS_TLI */
-
-ssize_t
-ACE::send_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = ACE::send_i (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred);
- // Check EOF.
- if (n == 0)
- return 0;
-
- // Check for other errors.
- if (n == -1)
- {
- // If blocked, try again.
- if (errno == EWOULDBLOCK)
- {
- // Make sure we can make progress before continuing,
- // otherwise we'll just keep spinning.
- int result = ACE::handle_write_ready (handle, 0);
- if (result == -1)
- return -1;
-
- n = 0;
- continue;
- }
-
- // No timeouts in this version.
-
- // Other errors.
- return -1;
- }
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE::send_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- const ACE_Time_Value *timeout,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
- ssize_t result = 0;
- int error = 0;
-
- int val = 0;
- ACE::record_and_set_non_blocking_mode (handle, val);
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- int rtn = ACE::handle_write_ready (handle,
- timeout);
-
- if (rtn == -1)
- {
- error = 1;
- result = -1;
- break;
- }
-
- n = ACE::send_i (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred);
-
- // Errors (note that errno cannot be EWOULDBLOCK since select()
- // just told us that data can be written).
- if (n == -1 || n == 0)
- {
- error = 1;
- result = n;
- break;
- }
- }
-
- ACE::restore_non_blocking_mode (handle, val);
-
- if (error)
- return result;
- else
- return bytes_transferred;
-}
-
-// Send N char *ptrs and int lengths. Note that the char *'s precede
-// the ints (basically, an varargs version of writev). The count N is
-// the *total* number of trailing arguments, *not* a couple of the
-// number of tuple pairs!
-
-ssize_t
-ACE::send (ACE_HANDLE handle, size_t n, ...)
-{
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, ssize_t);
- }
-
- ssize_t result = ACE_OS::sendv (handle, iovp, total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-
-ssize_t
-ACE::sendv (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE_OS::sendv (handle, iov, iovcnt);
- else
- {
-#if defined (ACE_HAS_WRITEV_TIMEDWAIT)
- ACE_Time_Value copy = *timeout;
- copy += ACE_OS::gettimeofday ();
- timespec_t ts = copy;
- return ::sendv_timedwait (handle, iov, iovcnt, &ts);
-#else
- int val = 0;
- if (ACE::enter_send_timedwait (handle, timeout, val) == -1)
- return -1;
- else
- {
- ssize_t bytes_transferred = ACE_OS::sendv (handle, iov, iovcnt);
- ACE::restore_non_blocking_mode (handle, val);
- return bytes_transferred;
- }
-#endif /* ACE_HAS_WRITEV_TIMEDWAIT */
- }
-}
-
-ssize_t
-ACE::sendv_n_i (ACE_HANDLE handle,
- const iovec *i,
- int iovcnt,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- bytes_transferred = 0;
-
- iovec *iov = ACE_const_cast (iovec *, i);
-
- for (int s = 0;
- s < iovcnt;
- )
- {
- ssize_t n = ACE_OS::sendv (handle,
- iov + s,
- iovcnt - s);
- // Check EOF.
- if (n == 0)
- return 0;
-
- // Check for other errors.
- if (n == -1)
- {
- // If blocked, try again.
- if (errno == EWOULDBLOCK)
- {
- // Make sure we can make progress before continuing,
- // otherwise we'll just keep spinning.
- int result = ACE::handle_write_ready (handle, 0);
- if (result == -1)
- return -1;
-
- n = 0;
- continue;
- }
-
- // No timeouts in this version.
-
- // Other errors.
- return -1;
- }
-
- for (bytes_transferred += n;
- s < iovcnt
- && n >= ACE_static_cast (ssize_t,
- iov[s].iov_len);
- s++)
- n -= iov[s].iov_len;
-
- if (n != 0)
- {
- char *base = ACE_reinterpret_cast (char *,
- iov[s].iov_base);
- iov[s].iov_base = base + n;
- iov[s].iov_len = iov[s].iov_len - n;
- }
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE::sendv_n_i (ACE_HANDLE handle,
- const iovec *i,
- int iovcnt,
- const ACE_Time_Value *timeout,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- bytes_transferred = 0;
- ssize_t result = 0;
- int error = 0;
-
- int val = 0;
- ACE::record_and_set_non_blocking_mode (handle, val);
-
- iovec *iov = ACE_const_cast (iovec *, i);
-
- for (int s = 0;
- s < iovcnt;
- )
- {
- int rtn = ACE::handle_write_ready (handle,
- timeout);
-
- if (rtn == -1)
- {
- error = 1;
- result = -1;
- break;
- }
-
- ssize_t n = ACE_OS::sendv (handle,
- iov + s,
- iovcnt - s);
-
- // Errors (note that errno cannot be EWOULDBLOCK since select()
- // just told us that data can be written).
- if (n == -1 || n == 0)
- {
- error = 1;
- result = n;
- break;
- }
-
- for (bytes_transferred += n;
- s < iovcnt
- && n >= ACE_static_cast (ssize_t,
- iov[s].iov_len);
- s++)
- n -= iov[s].iov_len;
-
- if (n != 0)
- {
- char *base = ACE_reinterpret_cast (char *,
- iov[s].iov_base);
- iov[s].iov_base = base + n;
- iov[s].iov_len = iov[s].iov_len - n;
- }
- }
-
- ACE::restore_non_blocking_mode (handle, val);
-
- if (error)
- return result;
- else
- return bytes_transferred;
-}
-
-ssize_t
-ACE::send_n (ACE_HANDLE handle,
- const ACE_Message_Block *message_block,
- const ACE_Time_Value *timeout,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- bytes_transferred = 0;
-
- iovec iov[IOV_MAX];
- int iovcnt = 0;
-
- while (message_block != 0)
- {
- // Our current message block chain.
- const ACE_Message_Block *current_message_block = message_block;
-
- while (current_message_block != 0)
- {
- size_t current_message_block_length =
- current_message_block->length ();
-
- // Check if this block has any data to be sent.
- if (current_message_block_length > 0)
- {
- // Collect the data in the iovec.
- iov[iovcnt].iov_base = current_message_block->rd_ptr ();
- iov[iovcnt].iov_len = current_message_block_length;
-
- // Increment iovec counter.
- iovcnt++;
-
- // The buffer is full make a OS call. @@ TODO find a way to
- // find IOV_MAX for platforms that do not define it rather
- // than simply setting IOV_MAX to some arbitrary value such
- // as 16.
- if (iovcnt == IOV_MAX)
- {
- size_t current_transfer = 0;
-
- ssize_t result = ACE::sendv_n (handle,
- iov,
- iovcnt,
- timeout,
- &current_transfer);
-
- // Add to total bytes transferred.
- bytes_transferred += current_transfer;
-
- // Errors.
- if (result == -1 || result == 0)
- return result;
-
- // Reset iovec counter.
- iovcnt = 0;
- }
- }
-
- // Select the next message block in the chain.
- current_message_block = current_message_block->cont ();
- }
-
- // Selection of the next message block chain.
- message_block = message_block->next ();
- }
-
- // Check for remaining buffers to be sent. This will happen when
- // IOV_MAX is not a multiple of the number of message blocks.
- if (iovcnt != 0)
- {
- size_t current_transfer = 0;
-
- ssize_t result = ACE::sendv_n (handle,
- iov,
- iovcnt,
- timeout,
- &current_transfer);
-
- // Add to total bytes transferred.
- bytes_transferred += current_transfer;
-
- // Errors.
- if (result == -1 || result == 0)
- return result;
- }
-
- // Return total bytes transferred.
- return bytes_transferred;
-}
-
-ssize_t
-ACE::readv_n (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- bytes_transferred = 0;
-
- for (int s = 0;
- s < iovcnt;
- )
- {
- ssize_t n = ACE_OS::readv (handle,
- iov + s,
- iovcnt - s);
-
- if (n == -1 || n == 0)
- return n;
-
- for (bytes_transferred += n;
- s < iovcnt
- && n >= ACE_static_cast (ssize_t,
- iov[s].iov_len);
- s++)
- n -= iov[s].iov_len;
-
- if (n != 0)
- {
- char *base = ACE_reinterpret_cast (char *,
- iov[s].iov_base);
- iov[s].iov_base = base + n;
- iov[s].iov_len = iov[s].iov_len - n;
- }
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE::writev_n (ACE_HANDLE handle,
- const iovec *i,
- int iovcnt,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- bytes_transferred = 0;
-
- iovec *iov = ACE_const_cast (iovec *, i);
-
- for (int s = 0;
- s < iovcnt;
- )
- {
- ssize_t n = ACE_OS::writev (handle,
- iov + s,
- iovcnt - s);
- if (n == -1 || n == 0)
- return n;
-
- for (bytes_transferred += n;
- s < iovcnt
- && n >= ACE_static_cast (ssize_t,
- iov[s].iov_len);
- s++)
- n -= iov[s].iov_len;
-
- if (n != 0)
- {
- char *base = ACE_reinterpret_cast (char *,
- iov[s].iov_base);
- iov[s].iov_base = base + n;
- iov[s].iov_len = iov[s].iov_len - n;
- }
- }
-
- return bytes_transferred;
-}
-
-int
-ACE::handle_ready (ACE_HANDLE handle,
- const ACE_Time_Value *timeout,
- int read_ready,
- int write_ready,
- int exception_ready)
-{
-#if defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT)
-
- struct pollfd fds;
-
- fds.fd = handle;
- fds.events = read_ready ? POLLIN : POLLOUT;
- fds.revents = 0;
-
- int result = ACE_OS::poll (&fds, 1, *timeout);
-
-#else
-
- ACE_Handle_Set handle_set;
- handle_set.set_bit (handle);
-
- // Wait for data or for the timeout to elapse.
- int result = ACE_OS::select (int (handle) + 1,
- read_ready ? handle_set.fdset () : 0, // read_fds.
- write_ready ? handle_set.fdset () : 0, // write_fds.
- exception_ready ? handle_set.fdset () : 0, // exception_fds.
- timeout);
-
-#endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
-
- switch (result)
- {
- case 0: // Timer expired.
- errno = ETIME;
- /* FALLTHRU */
- case -1: // we got here directly - select() returned -1.
- return -1;
- case 1: // Handle has data.
- /* FALLTHRU */
- default: // default is case result > 0; return a
- // ACE_ASSERT (result == 1);
- return result;
- }
-}
-
-int
-ACE::enter_recv_timedwait (ACE_HANDLE handle,
- const ACE_Time_Value *timeout,
- int &val)
-{
- int result = ACE::handle_read_ready (handle,
- timeout);
-
- if (result == -1)
- return -1;
-
- ACE::record_and_set_non_blocking_mode (handle,
- val);
-
- return result;
-}
-
-int
-ACE::enter_send_timedwait (ACE_HANDLE handle,
- const ACE_Time_Value *timeout,
- int &val)
-{
- int result = ACE::handle_write_ready (handle,
- timeout);
-
- if (result == -1)
- return -1;
-
- ACE::record_and_set_non_blocking_mode (handle,
- val);
-
- return result;
-}
-
-void
-ACE::record_and_set_non_blocking_mode (ACE_HANDLE handle,
- int &val)
-{
- // We need to record whether we are already *in* nonblocking mode,
- // so that we can correctly reset the state when we're done.
- val = ACE::get_flags (handle);
-
- if (ACE_BIT_DISABLED (val, ACE_NONBLOCK))
- // Set the handle into non-blocking mode if it's not already in
- // it.
- ACE::set_flags (handle, ACE_NONBLOCK);
-}
-
-void
-ACE::restore_non_blocking_mode (ACE_HANDLE handle,
- int val)
-{
- if (ACE_BIT_DISABLED (val,
- ACE_NONBLOCK))
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- // Only disable ACE_NONBLOCK if we weren't in non-blocking mode
- // originally.
- ACE::clr_flags (handle, ACE_NONBLOCK);
- }
-}
-
-
-// Format buffer into printable format. This is useful for debugging.
-// Portions taken from mdump by J.P. Knight (J.P.Knight@lut.ac.uk)
-// Modifications by Todd Montgomery.
-
-int
-ACE::format_hexdump (const char *buffer,
- int size,
- ACE_TCHAR *obuf,
- int obuf_sz)
-{
- ACE_TRACE ("ACE::format_hexdump");
-
- u_char c;
- ACE_TCHAR textver[16 + 1];
-
- int maxlen = (obuf_sz / 68) * 16;
-
- if (size > maxlen)
- size = maxlen;
-
- int i;
-
- for (i = 0; i < (size >> 4); i++)
- {
- int j;
-
- for (j = 0 ; j < 16; j++)
- {
- c = (u_char) buffer[(i << 4) + j];
- ACE_OS::sprintf (obuf,
- ACE_TEXT ("%02x "),
- c);
- obuf += 3;
- if (j == 7)
- {
- ACE_OS::sprintf (obuf,
- ACE_TEXT (" "));
- obuf++;
- }
- textver[j] = ACE_OS::ace_isprint (c) ? c : '.';
- }
-
- textver[j] = 0;
-
- ACE_OS::sprintf (obuf,
- ACE_TEXT (" %s\n"),
- textver);
-
- while (*obuf != '\0')
- obuf++;
- }
-
- if (size % 16)
- {
- for (i = 0 ; i < size % 16; i++)
- {
- c = (u_char) buffer[size - size % 16 + i];
- ACE_OS::sprintf (obuf,
- ACE_TEXT ("%02x "),
- c);
- obuf += 3;
- if (i == 7)
- {
- ACE_OS::sprintf (obuf,
- ACE_TEXT (" "));
- obuf++;
- }
- textver[i] = ACE_OS::ace_isprint (c) ? c : '.';
- }
-
- for (i = size % 16; i < 16; i++)
- {
- ACE_OS::sprintf (obuf,
- ACE_TEXT (" "));
- obuf += 3;
- textver[i] = ' ';
- }
-
- textver[i] = 0;
- ACE_OS::sprintf (obuf,
- ACE_TEXT (" %s\n"),
- textver);
- }
- return size;
-}
-
-// Returns the current timestamp in the form
-// "hour:minute:second:microsecond." The month, day, and year are
-// also stored in the beginning of the date_and_time array. Returns 0
-// if unsuccessful, else returns pointer to beginning of the "time"
-// portion of <day_and_time>.
-
-ACE_TCHAR *
-ACE::timestamp (ACE_TCHAR date_and_time[],
- int date_and_timelen)
-{
- //ACE_TRACE ("ACE::timestamp");
-
- if (date_and_timelen < 35)
- {
- errno = EINVAL;
- return 0;
- }
-
-#if defined (WIN32)
- // @@ Jesper, I think Win32 supports all the UNIX versions below.
- // Therefore, we can probably remove this WIN32 ifdef altogether.
- SYSTEMTIME local;
- ::GetLocalTime (&local);
-
- ACE_OS::sprintf (date_and_time,
- ACE_TEXT ("%02d/%02d/%04d %02d.%02d.%02d.%06d"),
- (int) local.wMonth, // new, also the %02d in sprintf
- (int) local.wDay, // new, also the %02d in sprintf
- (int) local.wYear, // new, also the %02d in sprintf
- (int) local.wHour,
- (int) local.wMinute,
- (int) local.wSecond,
- (int) local.wMilliseconds * 1000);
-#else /* UNIX */
- ACE_TCHAR timebuf[26]; // This magic number is based on the ctime(3c) man page.
- ACE_Time_Value cur_time = ACE_OS::gettimeofday ();
- time_t secs = cur_time.sec ();
- ACE_OS::ctime_r (&secs,
- timebuf,
- sizeof timebuf);
- ACE_OS::strncpy (date_and_time,
- timebuf,
- date_and_timelen);
- ACE_OS::sprintf (&date_and_time[19],
- ".%06ld",
- cur_time.usec ());
-#endif /* WIN32 */
- date_and_time[26] = '\0';
- return &date_and_time[11];
-}
-
-// This function rounds the request to a multiple of the page size.
-
-size_t
-ACE::round_to_pagesize (off_t len)
-{
- ACE_TRACE ("ACE::round_to_pagesize");
-
- if (ACE::pagesize_ == 0)
- ACE::pagesize_ = ACE_OS::getpagesize ();
-
- return (len + (ACE::pagesize_ - 1)) & ~(ACE::pagesize_ - 1);
-}
-
-size_t
-ACE::round_to_allocation_granularity (off_t len)
-{
- ACE_TRACE ("ACE::round_to_allocation_granularity");
-
- if (ACE::allocation_granularity_ == 0)
- ACE::allocation_granularity_ = ACE_OS::allocation_granularity ();
-
- return (len + (ACE::allocation_granularity_ - 1)) & ~(ACE::allocation_granularity_ - 1);
-}
-
-ACE_HANDLE
-ACE::handle_timed_complete (ACE_HANDLE h,
- ACE_Time_Value *timeout,
- int is_tli)
-{
- ACE_TRACE ("ACE::handle_timed_complete");
-
-#if !defined (ACE_WIN32) && defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT)
-
- struct pollfd fds;
-
- fds.fd = h;
- fds.events = POLLIN | POLLOUT;
- fds.revents = 0;
-
-#else
- ACE_Handle_Set rd_handles;
- ACE_Handle_Set wr_handles;
-
- rd_handles.set_bit (h);
- wr_handles.set_bit (h);
-#endif /* !ACE_WIN32 && ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
-
-#if defined (ACE_WIN32)
- ACE_Handle_Set ex_handles;
- ex_handles.set_bit (h);
-#endif /* ACE_WIN32 */
-
- int need_to_check;
-
-#if defined (ACE_WIN32)
- int n = ACE_OS::select (int (h) + 1,
- rd_handles,
- wr_handles,
- ex_handles,
- timeout);
-#else
-# if defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT)
-
- int n = ACE_OS::poll (&fds, 1, timeout);
-
-# else
- int n = ACE_OS::select (int (h) + 1,
- rd_handles,
- wr_handles,
- 0,
- timeout);
-# endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
-#endif /* ACE_WIN32 */
-
- // If we failed to connect within the time period allocated by the
- // caller, then we fail (e.g., the remote host might have been too
- // busy to accept our call).
- if (n <= 0)
- {
- if (n == 0 && timeout != 0)
- errno = ETIMEDOUT;
- return ACE_INVALID_HANDLE;
- }
-
- // Check if the handle is ready for reading and the handle is *not*
- // ready for writing, which may indicate a problem. But we need to
- // make sure...
-#if defined (ACE_WIN32)
- need_to_check = rd_handles.is_set (h) || ex_handles.is_set (h);
-#elif defined (VXWORKS)
- ACE_UNUSED_ARG (is_tli);
-
- // Force the check on VxWorks. The read handle for "h" is not set,
- // so "need_to_check" is false at this point. The write handle is
- // set, for what it's worth.
- need_to_check = 1;
-#else
- if (is_tli)
-
-# if defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT)
- need_to_check = (fds.revents & POLLIN) && !(fds.revents & POLLOUT);
-# else
- need_to_check = rd_handles.is_set (h) && !wr_handles.is_set (h);
-# endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
-
- else
-#if defined(AIX)
- // AIX is broken... both success and failed connect will set the
- // write handle only, so always check.
- need_to_check = 1;
-#else
-# if defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT)
- need_to_check = (fds.revents & POLLIN);
-# else
- need_to_check = rd_handles.is_set (h);
-# endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
-#endif /* AIX */
-#endif /* ACE_WIN32 */
-
- if (need_to_check)
- {
- char dummy;
-
- // The following recv() won't block provided that the
- // ACE_NONBLOCK flag has not been turned off .
- n = ACE::recv (h, &dummy, 1, MSG_PEEK);
-
- // If no data was read/peeked at, check to see if it's because
- // of a non-connected socket (and therefore an error) or there's
- // just no data yet.
- if (n <= 0)
- {
- if (n == 0)
- {
- errno = ECONNREFUSED;
- h = ACE_INVALID_HANDLE;
- }
- else if (errno != EWOULDBLOCK && errno != EAGAIN)
- h = ACE_INVALID_HANDLE;
- }
- }
-
- // 1. The HANDLE is ready for writing and doesn't need to be checked or
- // 2. recv() returned an indication of the state of the socket - if there is
- // either data present, or a recv is legit but there's no data yet,
- // the connection was successfully established.
- return h;
-}
-
-ACE_HANDLE
-ACE::handle_timed_open (ACE_Time_Value *timeout,
- const ACE_TCHAR *name,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE::handle_timed_open");
-
- if (timeout != 0)
- {
- // Open the named pipe or file using non-blocking mode...
- ACE_HANDLE handle = ACE_OS::open (name,
- flags | ACE_NONBLOCK,
- perms);
- if (handle == ACE_INVALID_HANDLE
- && (errno == EWOULDBLOCK
- && (timeout->sec () > 0 || timeout->usec () > 0)))
- // This expression checks if we were polling.
- errno = ETIMEDOUT;
-
- return handle;
- }
- else
- return ACE_OS::open (name, flags, perms);
-}
-
-// Wait up to <timeout> amount of time to accept a connection.
-
-int
-ACE::handle_timed_accept (ACE_HANDLE listener,
- ACE_Time_Value *timeout,
- int restart)
-{
- ACE_TRACE ("ACE::handle_timed_accept");
- // Make sure we don't bomb out on erroneous values.
- if (listener == ACE_INVALID_HANDLE)
- return -1;
-
-#if defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT)
-
- struct pollfd fds;
-
- fds.fd = listener;
- fds.events = POLLIN;
- fds.revents = 0;
-
-#else
- // Use the select() implementation rather than poll().
- ACE_Handle_Set rd_handle;
- rd_handle.set_bit (listener);
-#endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
-
- // We need a loop here if <restart> is enabled.
-
- for (;;)
- {
-#if defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT)
-
- int n = ACE_OS::poll (&fds, 1, timeout);
-
-#else
- int n = ACE_OS::select (int (listener) + 1,
- rd_handle, 0, 0,
- timeout);
-#endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
-
- switch (n)
- {
- case -1:
- if (errno == EINTR && restart)
- continue;
- else
- return -1;
- /* NOTREACHED */
- case 0:
- if (timeout != 0
- && timeout->sec () == 0
- && timeout->usec () == 0)
- errno = EWOULDBLOCK;
- else
- errno = ETIMEDOUT;
- return -1;
- /* NOTREACHED */
- case 1:
- return 0;
- /* NOTREACHED */
- default:
- errno = EINVAL;
- return -1;
- /* NOTREACHED */
- }
- }
- ACE_NOTREACHED (return 0);
-}
-
-// Bind socket to an unused port.
-
-int
-ACE::bind_port (ACE_HANDLE handle,
- ACE_UINT32 ip_addr)
-{
- ACE_TRACE ("ACE::bind_port");
-
- sockaddr_in sock_addr;
-
- ACE_OS::memset ((void *) &sock_addr, 0, sizeof sock_addr);
- sock_addr.sin_family = AF_INET;
-#if defined (ACE_HAS_SIN_LEN)
- sock_addr.sin_len = sizeof sock_addr;
-#endif /* ACE_HAS_SIN_LEN */
- sock_addr.sin_addr.s_addr = ip_addr;
-
-#if !defined (ACE_LACKS_WILDCARD_BIND)
- // The OS kernel should select a free port for us.
- sock_addr.sin_port = 0;
- return ACE_OS::bind (handle,
- ACE_reinterpret_cast(sockaddr *, &sock_addr),
- sizeof sock_addr);
-#else
- static u_short upper_limit = ACE_MAX_DEFAULT_PORT;
- int round_trip = upper_limit;
- int lower_limit = IPPORT_RESERVED;
-
- // We have to select the port explicitly.
-
- for (;;)
- {
- sock_addr.sin_port = htons (upper_limit);
-
- if (ACE_OS::bind (handle,
- ACE_reinterpret_cast(sockaddr *, &sock_addr),
- sizeof sock_addr) >= 0)
- {
-#if defined (ACE_WIN32)
- upper_limit--;
-#endif /* ACE_WIN32 */
- return 0;
- }
- else if (errno != EADDRINUSE)
- return -1;
- else
- {
- upper_limit--;
-
- // Wrap back around when we reach the bottom.
- if (upper_limit <= lower_limit)
- upper_limit = ACE_MAX_DEFAULT_PORT;
-
- // See if we have already gone around once!
- if (upper_limit == round_trip)
- {
- errno = EAGAIN;
- return -1;
- }
- }
- }
-#endif /* ACE_HAS_WILDCARD_BIND */
-}
-
-// Make the current process a UNIX daemon. This is based on Stevens
-// code from APUE.
-
-int
-ACE::daemonize (const ACE_TCHAR pathname[],
- int close_all_handles,
- const ACE_TCHAR program_name[])
-{
- ACE_TRACE ("ACE::daemonize");
-#if !defined (ACE_LACKS_FORK)
- pid_t pid = ACE_OS::fork ();
-
- if (pid == -1)
- return -1;
- else if (pid != 0)
- ACE_OS::exit (0); // Parent exits.
-
- // 1st child continues.
- ACE_OS::setsid (); // Become session leader.
-
- ACE_OS::signal (SIGHUP, SIG_IGN);
-
- pid = ACE_OS::fork (program_name);
-
- if (pid != 0)
- ACE_OS::exit (0); // First child terminates.
-
- // Second child continues.
-
- if (pathname != 0)
- // change working directory.
- ACE_OS::chdir (pathname);
-
- ACE_OS::umask (0); // clear our file mode creation mask.
-
- // Close down the files.
- if (close_all_handles)
- for (int i = ACE::max_handles () - 1; i >= 0; i--)
- ACE_OS::close (i);
-
- return 0;
-#else
- ACE_UNUSED_ARG (pathname);
- ACE_UNUSED_ARG (close_all_handles);
- ACE_UNUSED_ARG (program_name);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_LACKS_FORK */
-}
-
-pid_t
-ACE::fork (const ACE_TCHAR *program_name,
- int avoid_zombies)
-{
- if (avoid_zombies == 0)
- return ACE_OS::fork (program_name);
- else
- {
- // This algorithm is adapted from an example in the Stevens book
- // "Advanced Programming in the Unix Environment" and an item in
- // Andrew Gierth's Unix Programming FAQ. It creates an orphan
- // process that's inherited by the init process; init cleans up
- // when the orphan process terminates.
- //
- // Another way to avoid zombies is to ignore or catch the
- // SIGCHLD signal; we don't use that approach here.
-
- pid_t pid = ACE_OS::fork ();
- if (pid == 0)
- {
- // The child process forks again to create a grandchild.
- switch (ACE_OS::fork (program_name))
- {
- case 0: // grandchild returns 0.
- return 0;
- case -1: // assumes all errnos are < 256
- ACE_OS::_exit (errno);
- default: // child terminates, orphaning grandchild
- ACE_OS::_exit (0);
- }
- }
-
- // Parent process waits for child to terminate.
-#if defined (ACE_HAS_UNION_WAIT)
- union wait status;
- if (pid < 0 || ACE_OS::waitpid (pid, &(status.w_status), 0) < 0)
-#else
- ACE_exitcode status;
- if (pid < 0 || ACE_OS::waitpid (pid, &status, 0) < 0)
-#endif /* ACE_HAS_UNION_WAIT */
- return -1;
-
- // child terminated by calling exit()?
- if (WIFEXITED ((status)))
- {
- // child terminated normally?
- if (WEXITSTATUS ((status)) == 0)
- return 1;
- else
- errno = WEXITSTATUS ((status));
- }
- else
- // child didn't call exit(); perhaps it received a signal?
- errno = EINTR;
-
- return -1;
- }
-}
-
-int
-ACE::max_handles (void)
-{
- ACE_TRACE ("ACE::max_handles");
-#if defined (RLIMIT_NOFILE) && !defined (ACE_LACKS_RLIMIT)
- rlimit rl;
- ACE_OS::getrlimit (RLIMIT_NOFILE, &rl);
-# if defined (RLIM_INFINITY)
- if (rl.rlim_cur != RLIM_INFINITY)
- return rl.rlim_cur;
-#else
- return rl.rlim_cur;
-# endif /* RLIM_INFINITY */
-# if defined (_SC_OPEN_MAX)
- return ACE_OS::sysconf (_SC_OPEN_MAX);
-# elif defined (FD_SETSIZE)
- return FD_SETSIZE;
-# else
- ACE_NOTSUP_RETURN (-1);
-# endif /* _SC_OPEN_MAX */
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* defined (RLIMIT_NOFILE) && !defined (ACE_LACKS_RLIMIT) */
-}
-
-// Set the number of currently open handles in the process.
-//
-// If NEW_LIMIT == -1 set the limit to the maximum allowable.
-// Otherwise, set it to be the value of NEW_LIMIT.
-
-int
-ACE::set_handle_limit (int new_limit)
-{
- ACE_TRACE ("ACE::set_handle_limit");
- int cur_limit = ACE::max_handles ();
- int max_limit = cur_limit;
-
- if (cur_limit == -1)
- return -1;
-
-#if !defined (ACE_LACKS_RLIMIT) && defined (RLIMIT_NOFILE)
- struct rlimit rl;
-
- ACE_OS::memset ((void *) &rl, 0, sizeof rl);
- ACE_OS::getrlimit (RLIMIT_NOFILE, &rl);
- max_limit = rl.rlim_max;
-#endif /* ACE_LACKS_RLIMIT */
-
- if (new_limit == -1)
- new_limit = max_limit;
-
- if (new_limit < 0)
- {
- errno = EINVAL;
- return -1;
- }
- else if (new_limit > cur_limit)
- {
-#if !defined (ACE_LACKS_RLIMIT) && defined (RLIMIT_NOFILE)
- rl.rlim_cur = new_limit;
- return ACE_OS::setrlimit (RLIMIT_NOFILE, &rl);
-#else
- // Must return EINVAL errno.
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_LACKS_RLIMIT */
- }
- else
- {
-#if !defined (ACE_LACKS_RLIMIT) && defined (RLIMIT_NOFILE)
- rl.rlim_cur = new_limit;
- return ACE_OS::setrlimit (RLIMIT_NOFILE, &rl);
-#else
- // We give a chance to platforms without RLIMIT to work.
- // Instead of ACE_NOTSUP_RETURN (0), just return 0 because
- // new_limit is <= cur_limit, so it's a no-op.
- return 0;
-#endif /* ACE_LACKS_RLIMIT */
- }
-
- // Irix complains without this return statement. DEC cxx
- // (correctly) says that it's not reachable. ACE_NOTREACHED won't
- // work here, because it handles both platforms the same.
- // IRIX does not complain anymore [7.2]
- ACE_NOTREACHED (return 0);
-}
-
-// Flags are file status flags to turn on.
-
-int
-ACE::set_flags (ACE_HANDLE handle, int flags)
-{
- ACE_TRACE ("ACE::set_flags");
-#if defined (ACE_WIN32) || defined (VXWORKS) || defined (ACE_LACKS_FCNTL)
- switch (flags)
- {
- case ACE_NONBLOCK:
- // nonblocking argument (1)
- // blocking: (0)
- {
- u_long nonblock = 1;
- return ACE_OS::ioctl (handle, FIONBIO, &nonblock);
- }
- default:
- ACE_NOTSUP_RETURN (-1);
- }
-#else
- int val = ACE_OS::fcntl (handle, F_GETFL, 0);
-
- if (val == -1)
- return -1;
-
- // Turn on flags.
- ACE_SET_BITS (val, flags);
-
- if (ACE_OS::fcntl (handle, F_SETFL, val) == -1)
- return -1;
- else
- return 0;
-#endif /* ACE_WIN32 || ACE_LACKS_FCNTL */
-}
-
-// Flags are the file status flags to turn off.
-
-int
-ACE::clr_flags (ACE_HANDLE handle, int flags)
-{
- ACE_TRACE ("ACE::clr_flags");
-
-#if defined (ACE_WIN32) || defined (VXWORKS) || defined (ACE_LACKS_FCNTL)
- switch (flags)
- {
- case ACE_NONBLOCK:
- // nonblocking argument (1)
- // blocking: (0)
- {
- u_long nonblock = 0;
- return ACE_OS::ioctl (handle, FIONBIO, &nonblock);
- }
- default:
- ACE_NOTSUP_RETURN (-1);
- }
-#else
- int val = ACE_OS::fcntl (handle, F_GETFL, 0);
-
- if (val == -1)
- return -1;
-
- // Turn flags off.
- ACE_CLR_BITS (val, flags);
-
- if (ACE_OS::fcntl (handle, F_SETFL, val) == -1)
- return -1;
- else
- return 0;
-#endif /* ACE_WIN32 || ACE_LACKS_FCNTL */
-}
-
-int
-ACE::map_errno (int error)
-{
- switch (error)
- {
-#if defined (ACE_WIN32)
- case WSAEWOULDBLOCK:
- return EAGAIN; // Same as UNIX errno EWOULDBLOCK.
-#endif /* ACE_WIN32 */
- }
-
- return error;
-}
-
-// Euclid's greatest common divisor algorithm.
-u_long
-ACE::gcd (u_long x, u_long y)
-{
- if (y == 0)
- {
- return x;
- }
- else
- {
- return ACE::gcd (y, x % y);
- }
-}
-
-
-// Calculates the minimum enclosing frame size for the given values.
-u_long
-ACE::minimum_frame_size (u_long period1, u_long period2)
-{
- // if one of the periods is zero, treat it as though it as
- // uninitialized and return the other period as the frame size
- if (0 == period1)
- {
- return period2;
- }
- if (0 == period2)
- {
- return period1;
- }
-
- // if neither is zero, find the greatest common divisor of the two periods
- u_long greatest_common_divisor = ACE::gcd (period1, period2);
-
- // explicitly consider cases to reduce risk of possible overflow errors
- if (greatest_common_divisor == 1)
- {
- // periods are relative primes: just multiply them together
- return period1 * period2;
- }
- else if (greatest_common_divisor == period1)
- {
- // the first period divides the second: return the second
- return period2;
- }
- else if (greatest_common_divisor == period2)
- {
- // the second period divides the first: return the first
- return period1;
- }
- else
- {
- // the current frame size and the entry's effective period
- // have a non-trivial greatest common divisor: return the
- // product of factors divided by those in their gcd.
- return (period1 * period2) / greatest_common_divisor;
- }
-}
-
-
-u_long
-ACE::is_prime (const u_long n,
- const u_long min_factor,
- const u_long max_factor)
-{
- if (n > 3)
- for (u_long factor = min_factor;
- factor <= max_factor;
- ++factor)
- if (n / factor * factor == n)
- return factor;
-
- return 0;
-}
-
-const ACE_TCHAR *
-ACE::sock_error (int error)
-{
-#if defined (ACE_WIN32)
- static ACE_TCHAR unknown_msg[64];
-
- switch (error)
- {
- case WSAVERNOTSUPPORTED:
- return ACE_TEXT ("version of WinSock not supported");
- /* NOTREACHED */
- case WSASYSNOTREADY:
- return ACE_TEXT ("WinSock not present or not responding");
- /* NOTREACHED */
- case WSAEINVAL:
- return ACE_TEXT ("app version not supported by DLL");
- /* NOTREACHED */
- case WSAHOST_NOT_FOUND:
- return ACE_TEXT ("Authoritive: Host not found");
- /* NOTREACHED */
- case WSATRY_AGAIN:
- return ACE_TEXT ("Non-authoritive: host not found or server failure");
- /* NOTREACHED */
- case WSANO_RECOVERY:
- return ACE_TEXT ("Non-recoverable: refused or not implemented");
- /* NOTREACHED */
- case WSANO_DATA:
- return ACE_TEXT ("Valid name, no data record for type");
- /* NOTREACHED */
- /*
- case WSANO_ADDRESS:
- return "Valid name, no MX record";
- */
- case WSANOTINITIALISED:
- return ACE_TEXT ("WSA Startup not initialized");
- /* NOTREACHED */
- case WSAENETDOWN:
- return ACE_TEXT ("Network subsystem failed");
- /* NOTREACHED */
- case WSAEINPROGRESS:
- return ACE_TEXT ("Blocking operation in progress");
- /* NOTREACHED */
- case WSAEINTR:
- return ACE_TEXT ("Blocking call cancelled");
- /* NOTREACHED */
- case WSAEAFNOSUPPORT:
- return ACE_TEXT ("address family not supported");
- /* NOTREACHED */
- case WSAEMFILE:
- return ACE_TEXT ("no file handles available");
- /* NOTREACHED */
- case WSAENOBUFS:
- return ACE_TEXT ("no buffer space available");
- /* NOTREACHED */
- case WSAEPROTONOSUPPORT:
- return ACE_TEXT ("specified protocol not supported");
- /* NOTREACHED */
- case WSAEPROTOTYPE:
- return ACE_TEXT ("protocol wrong type for this socket");
- /* NOTREACHED */
- case WSAESOCKTNOSUPPORT:
- return ACE_TEXT ("socket type not supported for address family");
- /* NOTREACHED */
- case WSAENOTSOCK:
- return ACE_TEXT ("handle is not a socket");
- /* NOTREACHED */
- case WSAEWOULDBLOCK:
- return ACE_TEXT ("socket marked as non-blocking and SO_LINGER set not 0");
- /* NOTREACHED */
- case WSAEADDRINUSE:
- return ACE_TEXT ("address already in use");
- /* NOTREACHED */
- case WSAECONNABORTED:
- return ACE_TEXT ("connection aborted");
- /* NOTREACHED */
- case WSAECONNRESET:
- return ACE_TEXT ("connection reset");
- /* NOTREACHED */
- case WSAENOTCONN:
- return ACE_TEXT ("not connected");
- /* NOTREACHED */
- case WSAETIMEDOUT:
- return ACE_TEXT ("connection timed out");
- /* NOTREACHED */
- case WSAECONNREFUSED:
- return ACE_TEXT ("connection refused");
- /* NOTREACHED */
- case WSAEHOSTDOWN:
- return ACE_TEXT ("host down");
- /* NOTREACHED */
- case WSAEHOSTUNREACH:
- return ACE_TEXT ("host unreachable");
- /* NOTREACHED */
- case WSAEADDRNOTAVAIL:
- return ACE_TEXT ("address not available");
- /* NOTREACHED */
- default:
- ACE_OS::sprintf (unknown_msg, ACE_TEXT ("unknown error: %d"), error);
- return unknown_msg;
- /* NOTREACHED */
- }
-#else
- ACE_UNUSED_ARG (error);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_WIN32 */
-}
-
-int
-ACE::get_bcast_addr (ACE_UINT32 &bcast_addr,
- const ACE_TCHAR *host_name,
- ACE_UINT32 host_addr,
- ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE::get_bcast_addr");
-
-#if !defined(ACE_WIN32)
- ACE_HANDLE s = handle;
-
- if (s == ACE_INVALID_HANDLE)
- s = ACE_OS::socket (AF_INET, SOCK_STREAM, 0);
-
- if (s == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_OS::socket")),
- -1);
-
- struct ifconf ifc;
- char buf[BUFSIZ];
-
- ifc.ifc_len = sizeof buf;
- ifc.ifc_buf = buf;
-
- // Get interface structure and initialize the addresses using UNIX
- // techniques
-#if defined (AIX)
- int cmd = CSIOCGIFCONF;
-#else
- int cmd = SIOCGIFCONF;
-#endif /* AIX */
- if (ACE_OS::ioctl (s, cmd, (char *) &ifc) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE::get_bcast_addr:")
- ACE_TEXT ("ioctl (get interface configuration)")),
- -1);
-
- struct ifreq *ifr = ifc.ifc_req;
-
- struct sockaddr_in ip_addr;
-
- // Get host ip address if necessary.
- if (host_name)
- {
- hostent *hp = ACE_OS::gethostbyname (host_name);
-
- if (hp == 0)
- return -1;
- else
-#if !defined(_UNICOS)
- ACE_OS::memcpy ((char *) &ip_addr.sin_addr.s_addr,
- (char *) hp->h_addr,
- hp->h_length);
-#else /* _UNICOS */
- {
- ACE_UINT64 haddr; // a place to put the address
- char * haddrp = (char *) &haddr; // convert to char pointer
- ACE_OS::memcpy(haddrp,(char *) hp->h_addr,hp->h_length);
- ip_addr.sin_addr.s_addr = haddr;
- }
-#endif /* ! _UNICOS */
- }
- else
- {
- ACE_OS::memset ((void *) &ip_addr, 0, sizeof ip_addr);
-#if !defined(_UNICOS)
- ACE_OS::memcpy ((void *) &ip_addr.sin_addr,
- (void*) &host_addr,
- sizeof ip_addr.sin_addr);
-#else /* _UNICOS */
- ip_addr.sin_addr.s_addr = host_addr; // just copy to the bitfield
-#endif /* ! _UNICOS */
- }
-
- for (int n = ifc.ifc_len / sizeof (struct ifreq);
- n > 0;
- n--, ifr++)
- {
- struct sockaddr_in if_addr;
-
- // Compare host ip address with interface ip address.
- ACE_OS::memcpy (&if_addr,
- &ifr->ifr_addr,
- sizeof if_addr);
-
- if (ip_addr.sin_addr.s_addr != if_addr.sin_addr.s_addr)
- continue;
-
- if (ifr->ifr_addr.sa_family != AF_INET)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE::get_bcast_addr:")
- ACE_TEXT ("Not AF_INET")));
- continue;
- }
-
- struct ifreq flags = *ifr;
- struct ifreq if_req = *ifr;
-
- if (ACE_OS::ioctl (s, SIOCGIFFLAGS, (char *) &flags) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE::get_bcast_addr:")
- ACE_TEXT (" ioctl (get interface flags)")));
- continue;
- }
-
- if (ACE_BIT_DISABLED (flags.ifr_flags, IFF_UP))
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE::get_bcast_addr:")
- ACE_TEXT ("Network interface is not up")));
- continue;
- }
-
- if (ACE_BIT_ENABLED (flags.ifr_flags, IFF_LOOPBACK))
- continue;
-
- if (ACE_BIT_ENABLED (flags.ifr_flags, IFF_BROADCAST))
- {
- if (ACE_OS::ioctl (s,
- SIOCGIFBRDADDR,
- (char *) &if_req) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE::get_bcast_addr:")
- ACE_TEXT ("ioctl (get broadaddr)")));
- else
- {
- ACE_OS::memcpy (ACE_reinterpret_cast(sockaddr_in *, &ip_addr),
- ACE_reinterpret_cast(sockaddr_in *, &if_req.ifr_broadaddr),
- sizeof if_req.ifr_broadaddr);
-
- ACE_OS::memcpy ((void *) &host_addr,
- (void *) &ip_addr.sin_addr,
- sizeof host_addr);
-
- if (handle == ACE_INVALID_HANDLE)
- ACE_OS::close (s);
-
- bcast_addr = host_addr;
- return 0;
- }
- }
- else
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE::get_bcast_addr:")
- ACE_TEXT ("Broadcast is not enable for this interface.")));
-
- if (handle == ACE_INVALID_HANDLE)
- ACE_OS::close (s);
-
- bcast_addr = host_addr;
- return 0;
- }
-
- return 0;
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (host_addr);
- ACE_UNUSED_ARG (host_name);
- bcast_addr = (ACE_UINT32 (INADDR_BROADCAST));
- return 0;
-#endif /* !ACE_WIN32 */
-}
-
-// Helper routine for get_ip_interfaces, differs by UNIX platform so
-// put into own subroutine. perform some ioctls to retrieve ifconf
-// list of ifreq structs.
-
-int
-ACE::count_interfaces (ACE_HANDLE handle,
- size_t &how_many)
-{
-#if defined (sparc) && defined (SIOCGIFNUM)
- int tmp_how_many; // For 64 bit Solaris
- if (ACE_OS::ioctl (handle,
- SIOCGIFNUM,
- (caddr_t) &tmp_how_many) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("ACE::get_ip_interfaces:")
- ACE_TEXT ("ioctl - SIOCGIFNUM failed")),
- -1);
- how_many = (size_t) tmp_how_many;
- return 0;
-#elif defined (__unix) || defined (__Lynx__) || defined (_AIX)
- // Note: DEC CXX doesn't define "unix". BSD compatible OS: HP UX,
- // AIX, SunOS 4.x perform some ioctls to retrieve ifconf list of
- // ifreq structs no SIOCGIFNUM on SunOS 4.x, so use guess and scan
- // algorithm
-
- // Probably hard to put this many ifs in a unix box..
- const int MAX_IF = 50;
-
- // HACK - set to an unreasonable number
- int num_ifs = MAX_IF;
-
- struct ifconf ifcfg;
- size_t ifreq_size = num_ifs * sizeof (struct ifreq);
- struct ifreq *p_ifs =
- (struct ifreq *) ACE_OS::malloc (ifreq_size);
-
- if (!p_ifs)
- {
- errno = ENOMEM;
- return -1;
- }
-
- ACE_OS::memset (p_ifs, 0, ifreq_size);
- ACE_OS::memset (&ifcfg, 0, sizeof (struct ifconf));
-
- ifcfg.ifc_req = p_ifs;
- ifcfg.ifc_len = ifreq_size;
-
-#if defined (AIX)
- int cmd = CSIOCGIFCONF;
-#else
- int cmd = SIOCGIFCONF;
-#endif /* AIX */
- if (ACE_OS::ioctl (handle,
- cmd,
- (caddr_t) &ifcfg) == -1)
- {
- ACE_OS::free (ifcfg.ifc_req);
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("count_interfaces:ioctl:")
- ACE_TEXT ("SIOCGIFCONF failed")),
- -1);
- }
-
- int if_count = 0, i;
-
- // get if address out of ifreq buffers. ioctl puts a blank-named
- // interface to mark the end of the returned interfaces.
- for (i = 0;
- i < num_ifs;
- i++)
- {
- if (p_ifs->ifr_name[0] == '\0')
- break;
-
- if_count++;
- p_ifs++;
- }
-
- ACE_OS::free (ifcfg.ifc_req);
- how_many = if_count;
- return 0;
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (how_many);
- ACE_NOTSUP_RETURN (-1);; // no implmentation
-#endif /* sparc && SIOCGIFNUM */
-}
-
-// Routine to return a handle from which ioctl() requests can be made.
-
-ACE_HANDLE
-ACE::get_handle (void)
-{
- // Solaris 2.x
- ACE_HANDLE handle = ACE_INVALID_HANDLE;
-#if defined (sparc) && ! defined (CHORUS)
- handle = ACE_OS::open ("/dev/udp", O_RDONLY);
-#elif defined (__unix) || defined (__Lynx__) || defined (_AIX)
- // Note: DEC CXX doesn't define "unix" BSD compatible OS: HP UX,
- // AIX, SunOS 4.x
-
- handle = ACE_OS::socket (PF_INET, SOCK_DGRAM, 0);
-#endif /* sparc */
- return handle;
-}
-
-#if defined (ACE_WIN32)
-// Return value in buffer for a key/name pair from the Windows
-// Registry up to buf_len size.
-
-static int
-get_reg_value (const ACE_TCHAR *key,
- const ACE_TCHAR *name,
- ACE_TCHAR *buffer,
- DWORD &buf_len)
-{
- HKEY hk;
- DWORD buf_type;
- LONG rc = ACE_TEXT_RegOpenKeyEx (HKEY_LOCAL_MACHINE,
- key,
- 0,
- KEY_READ,
- &hk);
- // 1. open key that defines the interfaces used for TCP/IP?
- if (rc != ERROR_SUCCESS)
- // print_error_string(TEXT("RegOpenKeyEx"), rc);
- return -1;
-
- rc = ACE_TEXT_RegQueryValueEx (hk,
- name,
- 0,
- &buf_type,
- (u_char *) buffer,
- &buf_len);
- if (rc != ERROR_SUCCESS)
- {
- // print_error_string(TEXT("RegEnumKeyEx"), rc);
- RegCloseKey (hk);
- return -2;
- }
-
- ::RegCloseKey (hk);
- return 0;
-}
-#endif /* ACE_WIN32 */
-
-// return an array of all configured IP interfaces on this host, count
-// rc = 0 on success (count == number of interfaces else -1 caller is
-// responsible for calling delete [] on parray
-
-int
-ACE::get_ip_interfaces (size_t &count,
- ACE_INET_Addr *&addrs)
-{
- ACE_TRACE ("ACE::get_ip_interfaces");
-
- count = 0;
- addrs = 0;
-
-#if defined (ACE_WIN32)
- // Win32 can do this by a simple API call if MSVC 5 or later is the compiler.
- // Not sure if Borland supplies the needed header/lib, but it might.
-# if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-#if 0
- // If this also needs to be predicated on MSVC 5 or later, add the
- // following condition to the #if above. It tests ok at Riverace w/ 4.2,
- // but this isn't a virgin install of 4.2 so there's a minimal risk that
- // it may need work later.
- defined (_MSC_VER) && (_MSC_VER >= 1100)
-#endif /* 0 */
-
- int i, n_interfaces, status;
- INTERFACE_INFO info[64];
- LPINTERFACE_INFO lpii;
- SOCKET sock;
-
- // Get an (overlapped) DGRAM socket to test with
- sock = socket (AF_INET, SOCK_DGRAM, 0);
- if (sock == INVALID_SOCKET)
- return -1;
-
- DWORD bytes;
- status = WSAIoctl(sock,
- SIO_GET_INTERFACE_LIST,
- 0, 0,
- info, sizeof(info),
- &bytes,
- 0,
- 0);
- closesocket (sock);
- if (status == SOCKET_ERROR)
- return -1;
-
- n_interfaces = bytes / sizeof(INTERFACE_INFO);
- if (n_interfaces == 0)
- return 0;
-
- ACE_NEW_RETURN (addrs,
- ACE_INET_Addr[n_interfaces],
- -1);
-
- // Now go through the list and transfer the good ones to the list of
- // because they're down or don't have an IP address.
- for (count = 0, i = 0; i < n_interfaces; i++)
- {
- struct sockaddr_in *addrp;
-
- lpii = &info[i];
- if (!(lpii->iiFlags & IFF_UP))
- continue;
-
- // We assume IPv4 addresses here
- addrp = ACE_reinterpret_cast(struct sockaddr_in *, &(lpii->iiAddress));
- if (addrp->sin_addr.s_addr == INADDR_ANY)
- continue;
-
- // Set the address for the caller.
- addrs[count].set(addrp, sizeof(lpii->iiAddress));
- ++count;
- }
-
- if (count == 0)
- {
- delete [] addrs;
- addrs = 0;
- }
-
- return 0;
-
-#else /* Winsock 2 && MSVC 5 or later */
-
- // PharLap ETS has kernel routines to rummage through the device
- // configs and extract the interface info. Sort of a pain in the
- // butt, but better than trying to figure out where it moved to in
- // the registry... :-|
-# if defined (ACE_HAS_PHARLAP)
-# if !defined (ACE_HAS_PHARLAP_RT)
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_PHARLAP_RT */
-
- // Locate all of the IP devices in the system, saving a DEVHANDLE
- // for each. Then allocate the ACE_INET_Addrs needed and fetch all
- // the IP addresses. To locate the devices, try the available
- // device name roots and increment the device number until the
- // kernel says there are no more of that type.
- const size_t ACE_MAX_ETS_DEVICES = 64; // Arbitrary, but should be enough.
- DEVHANDLE ip_dev[ACE_MAX_ETS_DEVICES];
- EK_TCPIPCFG *devp;
- size_t i, j;
- ACE_TCHAR dev_name[16];
-
- count = 0;
- for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count)
- {
- // Ethernet.
- ACE_OS::sprintf (dev_name,
- "ether%d",
- i);
- ip_dev[count] = EtsTCPGetDeviceHandle (dev_name);
- if (ip_dev[count] == 0)
- break;
- }
- for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count)
- {
- // SLIP.
- ACE_OS::sprintf (dev_name,
- "sl%d",
- i);
- ip_dev[count] = EtsTCPGetDeviceHandle (dev_name);
- if (ip_dev[count] == 0)
- break;
- }
- for (i = 0; count < ACE_MAX_ETS_DEVICES; i++, ++count)
- {
- // PPP.
- ACE_OS::sprintf (dev_name,
- "ppp%d",
- i);
- ip_dev[count] = EtsTCPGetDeviceHandle (dev_name);
- if (ip_dev[count] == 0)
- break;
- }
-
- if (count > 0)
- ACE_NEW_RETURN (addrs,
- ACE_INET_Addr[count],
- -1);
- else
- addrs = 0;
-
- for (i = 0, j = 0; i < count; i++)
- {
- devp = EtsTCPGetDeviceCfg (ip_dev[i]);
- if (devp != 0)
- {
- addrs[j].set (0,
- devp->nwIPAddress,
- 0); // Already in net order.
- j++;
- }
- // There's no call to close the DEVHANDLE.
- }
-
- count = j;
- if (count == 0 && addrs != 0)
- {
- delete [] addrs;
- addrs = 0;
- }
-
- return 0;
-
-# else /* ACE_HAS_PHARLAP */
-
- const ACE_TCHAR *SVCS_KEY1 =
- ACE_TEXT ("SYSTEM\\CurrentControlSet\\Services\\");
- const ACE_TCHAR *LINKAGE_KEY1 =
- ACE_TEXT ("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Linkage");
- const ACE_TCHAR *TCP_PARAM_SUBKEY = ACE_TEXT ("\\Parameters\\Tcpip");
- const ACE_TCHAR *BIND_NAME_ID = ACE_TEXT ("Bind");
- const ACE_TCHAR *IPADDR_NAME_ID = ACE_TEXT ("IPAddress");
- const ACE_TCHAR *INVALID_TCPIP_DEVICE_ADDR = ACE_TEXT ("0.0.0.0");
-
- ACE_TCHAR raw_buffer[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1];
- DWORD raw_buflen = ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1;
- ACE_TCHAR buffer[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1];
- DWORD buf_len = ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 1;
-
- if (::get_reg_value (LINKAGE_KEY1,
- BIND_NAME_ID,
- raw_buffer,
- raw_buflen))
- return -1;
- // return buffer contains 0 delimited strings
-
- ACE_Tokenizer dev_names (raw_buffer);
- dev_names.delimiter (ACE_TEXT('\0'));
- int n_interfaces = 0;
-
- // Count the number of interfaces
- while (dev_names.next () != 0)
- n_interfaces ++;
-
- // case 1. no interfaces present, empty string? OS version change?
- if (n_interfaces == 0)
- return 0;
-
- ACE_NEW_RETURN (addrs,
- ACE_INET_Addr[n_interfaces],
- -2);
- count = 0;
- for (int i = 0; i < n_interfaces; i++)
- {
- // a. construct name to access IPAddress for this interface
- ACE_TString ifdevkey (SVCS_KEY1);
- ACE_TString the_dev = dev_names.next ();
-
- // chop off the "\Device" and keep last name.
- if (the_dev.length() < 8)
- return -3; // Something's wrong
- else
- {
- // rest of string from offset 8
- the_dev = the_dev.substring (8);
- ifdevkey += the_dev;
- ifdevkey += TCP_PARAM_SUBKEY;
-
- // b. extract value
- // Gets overwritten on each call
- buf_len = sizeof(buffer);
- if (get_reg_value (ifdevkey.fast_rep (),
- IPADDR_NAME_ID,
- buffer,
- buf_len))
- return -4;
-
- if (ACE_OS::strcmp (buffer,
- INVALID_TCPIP_DEVICE_ADDR) == 0)
- continue; // Don't count this device
-
- // c. store in hostinfo object array and up the counter
- addrs[count++] =
- ACE_INET_Addr ((u_short) 0, buffer);
- }
- }
- return 0;
-# endif /* ACE_HAS_PHARLAP */
-# endif /* Winsock 2 && MSVC 5 or later */
-
-#elif defined (__unix) || defined (__Lynx__) || defined (_AIX)
- // COMMON (SVR4 and BSD) UNIX CODE
-
- size_t num_ifs;
-
- // Call specific routine as necessary.
- ACE_HANDLE handle = get_handle();
-
- if (handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE::get_ip_interfaces:open")),
- -1);
- if (ACE::count_interfaces (handle, num_ifs))
- {
- ACE_OS::close (handle);
- return -1;
- }
-
- // ioctl likes to have an extra ifreq structure to mark the end of
- // what it returned, so increase the num_ifs by one.
- ++num_ifs;
-
- struct ifreq *ifs = 0;
- ACE_NEW_RETURN (ifs,
- struct ifreq[num_ifs],
- -1);
- ACE_OS::memset (ifs, 0, num_ifs * sizeof (struct ifreq));
-
- ACE_Auto_Array_Ptr<struct ifreq> p_ifs (ifs);
-
- if (p_ifs.get() == 0)
- {
- ACE_OS::close (handle);
- errno = ENOMEM;
- return -1;
- }
-
- struct ifconf ifcfg;
- ACE_OS::memset (&ifcfg, 0, sizeof (struct ifconf));
- ifcfg.ifc_req = p_ifs.get ();
- ifcfg.ifc_len = num_ifs * sizeof (struct ifreq);
-
-#if defined (AIX)
- int cmd = CSIOCGIFCONF;
-#else
- int cmd = SIOCGIFCONF;
-#endif /* AIX */
- if (ACE_OS::ioctl (handle,
- cmd,
- (caddr_t) &ifcfg) == -1)
- {
- ACE_OS::close (handle);
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("is_address_local:")
- ACE_TEXT ("ioctl - SIOCGIFCONF failed")),
- -1);
- }
-
- ACE_OS::close (handle);
-
- // Now create and initialize output array.
-
- ACE_NEW_RETURN (addrs,
- ACE_INET_Addr[num_ifs],
- -1); // caller must free
-
- struct ifreq *pcur = p_ifs.get ();
- // Pull the address out of each INET interface. Not every interface
- // is for IP, so be careful to count properly. When setting the
- // INET_Addr, note that the 3rd arg (0) says to leave the byte order
- // (already in net byte order from the interface structure) as is.
- count = 0;
-
- for (size_t i = 0;
- i < num_ifs;
- i++)
- {
- if (pcur->ifr_addr.sa_family == AF_INET)
- {
-#if !defined(_UNICOS)
- struct sockaddr_in *addr =
- ACE_reinterpret_cast(sockaddr_in *, &pcur->ifr_addr);
-
- // Sometimes the kernel returns 0.0.0.0 as the interface
- // address, skip those...
- if (addr->sin_addr.s_addr != 0)
- {
- addrs[count].set ((u_short) 0,
- addr->sin_addr.s_addr,
- 0);
- count++;
- }
-#else /* ! _UNICOS */
- // need to explicitly copy on the Cray, since the bitfields kinda
- // screw things up here
- struct sockaddr_in inAddr;
-
- inAddr.sin_len = pcur->ifr_addr.sa_len;
- inAddr.sin_family = pcur->ifr_addr.sa_family;
- memcpy((void *)&(inAddr.sin_addr),
- (const void *)&(pcur->ifr_addr.sa_data[8]),
- sizeof(struct in_addr));
-
- if (inAddr.sin_addr.s_addr != 0)
- {
- addrs[count].set(&inAddr, sizeof(struct sockaddr_in));
- count++;
- }
-#endif /* ! _UNICOS */
- }
-
- pcur++;
- }
- return 0;
-#else
- ACE_UNUSED_ARG (count);
- ACE_UNUSED_ARG (addrs);
- ACE_NOTSUP_RETURN (-1);; // no implementation
-#endif /* ACE_WIN32 */
-}
-
-char *
-ACE::strndup (const char *str, size_t n)
-{
- const char *t = str;
- size_t len;
-
- // Figure out how long this string is (remember, it might not be
- // NUL-terminated).
-
- for (len = 0;
- len < n && *t++ != '\0';
- len++)
- continue;
-
- char *s;
- ACE_ALLOCATOR_RETURN (s,
- (char *) ACE_OS::malloc (len + 1),
- 0);
- s[len] = '\0';
- return ACE_OS::strncpy (s, str, len);
-}
-
-#if defined (ACE_HAS_WCHAR)
-wchar_t *
-ACE::strndup (const wchar_t *str, size_t n)
-{
- const wchar_t *t = str;
- size_t len;
-
- // Figure out how long this string is (remember, it might not be
- // NUL-terminated).
-
- for (len = 0;
- len < n && *t++ != '\0';
- len++)
- continue;
-
- wchar_t *s;
- ACE_ALLOCATOR_RETURN (s,
- ACE_static_cast (wchar_t *,
- ACE_OS::malloc ((len + 1)
- * sizeof (wchar_t))),
- 0);
- s[len] = L'\0';
- return ACE_OS::strncpy (s, str, len);
-}
-#endif /* ACE_HAS_WCHAR */
-
-char *
-ACE::strnnew (const char *str, size_t n)
-{
- const char *t = str;
- size_t len;
-
- // Figure out how long this string is (remember, it might not be
- // NUL-terminated).
-
- for (len = 0;
- len < n && *t++ != L'\0';
- len++)
- continue;
-
- char *s;
- ACE_NEW_RETURN (s,
- char[len + 1],
- 0);
- s[len] = '\0';
- return ACE_OS::strncpy (s, str, len);
-}
-
-#if defined (ACE_HAS_WCHAR)
-wchar_t *
-ACE::strnnew (const wchar_t *str, size_t n)
-{
- const wchar_t *t = str;
- size_t len;
-
- // Figure out how long this string is (remember, it might not be
- // NUL-terminated).
-
- for (len = 0;
- len < n && *t++ != L'\0';
- len++)
- continue;
-
- wchar_t *s;
- ACE_NEW_RETURN (s,
- wchar_t[len + 1],
- 0);
- s[len] = L'\0';
- return ACE_OS::strncpy (s, str, len);
-}
-#endif /* ACE_HAS_WCHAR */
-
-const char *
-ACE::strend (const char *s)
-{
- while (*s++ != '\0')
- continue;
-
- return s;
-}
-
-#if defined ACE_HAS_WCHAR
-const wchar_t *
-ACE::strend (const wchar_t *s)
-{
- while (*s++ != L'\0')
- continue;
-
- return s;
-}
-#endif
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-template class ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX>;
-template class ACE_Malloc_T<ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX, ACE_Control_Block>;
-template class ACE_Allocator_Adapter<ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX> >;
-
-// Explicitly instantiate these templates in the multithreaded case
-// since some classes need them.
-# if defined (ACE_HAS_THREADS)
-template class ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex>;
-template class ACE_Malloc_T<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex, ACE_Control_Block>;
-template class ACE_Allocator_Adapter<ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> >;
-# endif /* ACE_HAS_THREADS */
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Malloc_T<ACE_LOCAL_MEMORY_POOL, ACE_SYNCH_MUTEX, ACE_Control_Block>
-#pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_LOCAL_MEMORY_POOL,ACE_SYNCH_MUTEX> >
-
-// Explicitly instantiate these templates in the multithreaded case
-// since some classes need them.
-# if defined (ACE_HAS_THREADS)
-# pragma instantiate ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex>
-# pragma instantiate ACE_Malloc_T<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex, ACE_Control_Block>
-# pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> >
-# endif /* ACE_HAS_THREADS */
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) && (defined (__unix) || defined (__Lynx__) || defined (_AIX))
-template class ACE_Auto_Array_Ptr<struct ifreq>;
-template class ACE_Auto_Basic_Array_Ptr<struct ifreq>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Auto_Array_Ptr<struct ifreq>
-#pragma instantiate ACE_Auto_Basic_Array_Ptr<struct ifreq>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION && (__unix || __Lynx_) */
diff --git a/ace/ACE.h b/ace/ACE.h
deleted file mode 100644
index 014b37ee7f4..00000000000
--- a/ace/ACE.h
+++ /dev/null
@@ -1,791 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ACE.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_ACE_H
-#define ACE_ACE_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Forward declarations.
-class ACE_Time_Value;
-class ACE_INET_Addr;
-class ACE_Message_Block;
-
-class ACE_Export ACE
-{
- // = TITLE
- // Contains value added ACE methods that extend the behavior
- // of the UNIX and Win32 OS calls.
- //
- // = DESCRIPTION
- // This class consolidates all these ACE static methods in a
- // single place in order to manage the namespace better. These
- // methods are put here rather than in ACE_OS in order to
- // separate concerns.
-
- ACE_CLASS_IS_NAMESPACE (ACE);
-public:
- // Initialize ACE library services. Can be called only once per
- // program invocation.
- static int init (void);
- // Returns 0 on success, -1 on failure, and 1 if it had already been called.
-
- // Shut down ACE library services. Can be called only once per
- // program invocation.
- static int fini (void);
- // Returns 0 on success, -1 on failure, and 1 if it had already been called.
-
- // = ACE version information.
- static u_int major_version (void);
- // E.g., the "4" in ACE 4.3.19.
-
- static u_int minor_version (void);
- // E.g., the "3" in ACE 4.3.19.
-
- static u_int beta_version (void);
- // E.g., the "19" in ACE 4.3.19. Returns 0 for "stable" (non-beta) releases.
-
- // = C++ compiler version information.
- static const ACE_TCHAR * compiler_name (void);
- // E.g., the "SunPro C++" in SunPro C++ 4.32.0
-
- static u_int compiler_major_version (void);
- // E.g., the "4" in SunPro C++ 4.32.0
-
- static u_int compiler_minor_version (void);
- // E.g., the "32" in SunPro C++ 4.32.0
-
- static u_int compiler_beta_version (void);
- // E.g., the "0" in SunPro C++ 4.32.0
-
- static int out_of_handles (int error);
- // Check if error indicates the process being out of handles (file
- // descriptors).
-
- // = I/O operations.
-
- // = Notes on common parameters:
- //
- // <handle> is the connected endpoint that will be used for I/O.
- //
- // <buf> is the buffer to write from or receive into.
- //
- // <len> is the number of bytes to transfer.
- //
- // The <timeout> parameter in the following methods indicates how
- // long to blocking trying to transfer data. If <timeout> == 0,
- // then the call behaves as a normal send/recv call, i.e., for
- // blocking sockets, the call will block until action is possible;
- // for non-blocking sockets, EWOULDBLOCK will be returned if no
- // action is immediately possible.
- //
- // If <timeout> != 0, the call will wait until the relative time
- // specified in *<timeout> elapses.
- //
- // The "_n" I/O methods keep looping until all the data has been
- // transferred. These methods also work for sockets in non-blocking
- // mode i.e., they keep looping on EWOULDBLOCK. <timeout> is used
- // to make sure we keep making progress, i.e., the same timeout
- // value is used for every I/O operation in the loop and the timeout
- // is not counted down.
- //
- // Errors are reported by -1 and EOF are reported by 0 return
- // values. If the operation times out, -1 is returned with <errno
- // == ETIME>. If it succeeds the number of bytes transferred is
- // returned.
- //
- // Return values of the "_n" I/O methods are the same as the regular
- // methods. <bytes_transferred> contain the actual number of bytes
- // transferred.
- //
- // Methods with <iovec> parameter are I/O vector variants of the I/O
- // operations.
-
- static ssize_t recv (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout = 0);
-
-#if defined (ACE_HAS_TLI)
-
- static ssize_t t_rcv (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int *flags,
- const ACE_Time_Value *timeout = 0);
-
-#endif /* ACE_HAS_TLI */
-
- static ssize_t recv (ACE_HANDLE handle,
- void *buf,
- size_t len,
- const ACE_Time_Value *timeout = 0);
-
- static ssize_t recvmsg (ACE_HANDLE handle,
- struct msghdr *msg,
- int flags,
- const ACE_Time_Value *timeout = 0);
-
- static ssize_t recvfrom (ACE_HANDLE handle,
- char *buf,
- int len,
- int flags,
- struct sockaddr *addr,
- int *addrlen,
- const ACE_Time_Value *timeout = 0);
-
- static ssize_t recv_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0);
-
-#if defined (ACE_HAS_TLI)
-
- static ssize_t t_rcv_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int *flags,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0);
-
-#endif /* ACE_HAS_TLI */
-
- static ssize_t recv_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0);
-
- static ssize_t recv (ACE_HANDLE handle, size_t n, ...);
- // Varargs variant.
-
- static ssize_t recvv (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout = 0);
-
- static ssize_t recvv_n (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0);
-
- static ssize_t recv_n (ACE_HANDLE handle,
- ACE_Message_Block *message_block,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0);
-
- static ssize_t send (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout = 0);
-
-#if defined (ACE_HAS_TLI)
-
- static ssize_t t_snd (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout = 0);
-
-#endif /* ACE_HAS_TLI */
-
- static ssize_t send (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- const ACE_Time_Value *timeout = 0);
-
- static ssize_t sendmsg (ACE_HANDLE handle,
- const struct msghdr *msg,
- int flags,
- const ACE_Time_Value *timeout = 0);
-
- static ssize_t sendto (ACE_HANDLE handle,
- const char *buf,
- int len,
- int flags,
- const struct sockaddr *addr,
- int addrlen,
- const ACE_Time_Value *timeout = 0);
-
- static ssize_t send_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0);
-
-#if defined (ACE_HAS_TLI)
-
- static ssize_t t_snd_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0);
-
-#endif /* ACE_HAS_TLI */
-
- static ssize_t send_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0);
-
- static ssize_t send (ACE_HANDLE handle, size_t n, ...);
- // Varargs variant.
-
- static ssize_t sendv (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout = 0);
-
- static ssize_t sendv_n (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0);
-
- static ssize_t send_n (ACE_HANDLE handle,
- const ACE_Message_Block *message_block,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0);
-
- // = File system I/O functions (these don't support timeouts).
-
- static ssize_t read_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- size_t *bytes_transferred = 0);
-
- static ssize_t write_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- size_t *bytes_transferred = 0);
-
- static ssize_t readv_n (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- size_t *bytes_transferred = 0);
-
- static ssize_t writev_n (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt,
- size_t *bytes_transferred = 0);
-
- // = Socket connection establishment calls.
-
- static int bind_port (ACE_HANDLE handle,
- ACE_UINT32 ip_addr = INADDR_ANY);
- // Bind a new unused port to <handle>.
-
- static int get_bcast_addr (ACE_UINT32 &bcast_addr,
- const ACE_TCHAR *hostname = 0,
- ACE_UINT32 host_addr = 0,
- ACE_HANDLE handle = ACE_INVALID_HANDLE);
- // Get our broadcast address based on our <host_addr>. If
- // <hostname> is non-0 we'll use it to determine our IP address. If
- // <handle> is not <ACE_INVALID_HANDLE> then we'll use this to
- // determine our broadcast address, otherwise we'll have to create a
- // socket internally (and free it). Returns -1 on failure and 0 on
- // success.
-
- static int get_ip_interfaces (size_t &count,
- ACE_INET_Addr *&addr_array);
- // Return count and array of all configured IP interfaces on this
- // host, rc = 0 on success (count == number of interfaces else -1).
- // Caller is responsible for calling delete [] on <addr_array>.
-
- static int count_interfaces (ACE_HANDLE handle,
- size_t &how_many);
- // Helper routine for get_ip_interfaces, differs by UNIX platform so
- // put into own subroutine. perform some ioctls to retrieve ifconf
- // list of ifreq structs.
-
- static ACE_HANDLE get_handle (void);
- // Routine to return a handle from which <ioctl> requests can be
- // made. Caller must <close> the handle.
-
- static int handle_timed_accept (ACE_HANDLE listener,
- ACE_Time_Value *timeout,
- int restart);
- // Wait up to <timeout> amount of time to passively establish a
- // connection. This method doesn't perform the <accept>, it just
- // does the timed wait...
-
- static ACE_HANDLE handle_timed_complete (ACE_HANDLE listener,
- ACE_Time_Value *timeout,
- int is_tli = 0);
- // Wait up to <timeout> amount of time to complete an actively
- // established non-blocking connection. If <is_tli> is non-0 then
- // we are being called by a TLI wrapper (which behaves slightly
- // differently from a socket wrapper).
-
- // = Operations on HANDLEs.
-
- static ACE_HANDLE handle_timed_open (ACE_Time_Value *timeout,
- const ACE_TCHAR *name,
- int flags,
- int perms);
- // Wait up to <timeout> amount of time to actively open a device.
- // This method doesn't perform the <connect>, it just does the timed
- // wait...
-
- // = Set/get/clear various flags related to I/O HANDLE.
- static int set_flags (ACE_HANDLE handle,
- int flags);
- // Set flags associated with <handle>.
-
- static int clr_flags (ACE_HANDLE handle,
- int flags);
- // Clear flags associated with <handle>.
-
- static int get_flags (ACE_HANDLE handle);
- // Return the current setting of flags associated with <handle>.
-
- static int set_handle_limit (int new_limit = -1);
- // Reset the limit on the number of open handles. If <new_limit> ==
- // -1 set the limit to the maximum allowable. Otherwise, set it to
- // be the value of <new_limit>.
-
- static int max_handles (void);
- // Returns the maximum number of open handles currently permitted in
- // this process. This maximum may be extended using
- // <ACE::set_handle_limit>.
-
- // = String functions
-#if !defined (ACE_HAS_WINCE)
- static ACE_TCHAR *strenvdup (const ACE_TCHAR *str);
- // Return a dynamically allocated duplicate of <str>, substituting
- // the environment variable if <str[0] == '$'>. Note that the
- // pointer is allocated with <ACE_OS::malloc> and must be freed by
- // <ACE_OS::free>.
-#endif /* ACE_HAS_WINCE */
-
- static const char *strend (const char *s);
- // Returns a pointer to the "end" of the string, i.e., the character
- // past the '\0'.
-
- static char *strnew (const char *s);
- // This method is just like <strdup>, except that it uses <operator
- // new> rather than <malloc>.
-
- static char *strndup (const char *str, size_t n);
- // Create a fresh new copy of <str>, up to <n> chars long. Uses
- // <ACE_OS::malloc> to allocate the new string.
-
- static char *strnnew (const char *str, size_t n);
- // Create a fresh new copy of <str>, up to <n> chars long. Uses
- // <ACE_OS::malloc> to allocate the new string.
-
- static char *strsplit_r (char *s, const char *token, char *&next_start);
- // Splits string <s> into pieces separated by the string <token>.
- // <next_start> is an opaque cookie handed back by the call to store
- // its state for the next invocation, thus making it re-entrant.
- // This operates very similar to Perl's <split> function except that
- // it returns pieces one at a time instead of into an array.
-
- static size_t strrepl (char *s, char search, char replace);
- // Replace all instances of <search> in <s> with <replace>. Returns
- // the number of replacements made.
-
-#if defined (ACE_HAS_WCHAR)
- static const wchar_t *strend (const wchar_t *s);
-
- static wchar_t *strnew (const wchar_t *s);
-
- static wchar_t *strndup (const wchar_t *str, size_t n);
-
- static wchar_t *strnnew (const wchar_t *str, size_t n);
-
- static wchar_t *strsplit_r (wchar_t *s,
- const wchar_t *token,
- wchar_t *&next_start);
-
- static size_t strrepl (wchar_t *s, wchar_t search, wchar_t replace);
-
-#endif /* ACE_HAS_WCHAR */
-
- static const ACE_TCHAR *execname (const ACE_TCHAR *pathname);
- // On Win32 returns <pathname> if it already ends in ".exe,"
- // otherwise returns a dynamically allocated buffer containing
- // "<pathname>.exe". Always returns <pathname> on UNIX.
-
- static const ACE_TCHAR *basename (const ACE_TCHAR *pathname,
- ACE_TCHAR delim =
- ACE_DIRECTORY_SEPARATOR_CHAR);
- // Returns the "basename" of a <pathname> separated by <delim>. For
- // instance, the basename of "/tmp/foo.cpp" is "foo.cpp" when
- // <delim> is '/'.
-
- static const ACE_TCHAR *dirname (const ACE_TCHAR *pathname,
- ACE_TCHAR delim =
- ACE_DIRECTORY_SEPARATOR_CHAR);
- // Returns the "dirname" of a <pathname>. For instance, the dirname
- // of "/tmp/foo.cpp" is "/tmp" when <delim> is '/'. If <pathname>
- // has no <delim> ".\0" is returned. This method does not modify
- // <pathname> and is not reentrant.
-
-
-
- static ACE_TCHAR *timestamp (ACE_TCHAR date_and_time[],
- int time_len);
- // Returns the current timestamp in the form
- // "hour:minute:second:microsecond." The month, day, and year are
- // also stored in the beginning of the date_and_time array. Returns
- // 0 if unsuccessful, else returns pointer to beginning of the
- // "time" portion of <day_and_time>.
-
- static pid_t fork (const ACE_TCHAR *program_name = ACE_TEXT ("<unknown>"),
- int avoid_zombies = 0);
- // if <avoid_zombies> == 0 call <ACE_OS::fork> directly, else create
- // an orphan process that's inherited by the init process; init
- // cleans up when the orphan process terminates so we don't create
- // zombies.
-
- static int daemonize (const ACE_TCHAR pathname[] = ACE_TEXT ("/"),
- int close_all_handles = ACE_DEFAULT_CLOSE_ALL_HANDLES,
- const ACE_TCHAR program_name[] = ACE_TEXT ("<unknown>"));
- // Become a daemon process using the algorithm in Richard Stevens
- // "Advanced Programming in the UNIX Environment." If
- // <close_all_handles> is non-zero then all open file handles are
- // closed.
-
- // = Methods for searching and opening shared libraries.
-
- static int ldfind (const ACE_TCHAR *filename,
- ACE_TCHAR *pathname,
- size_t maxlen);
- // Finds the file <filename> either using an absolute path or using
- // a relative path in conjunction with ACE_LD_SEARCH_PATH (e.g.,
- // $LD_LIBRARY_PATH on UNIX or $PATH on Win32). This function will
- // add appropriate suffix (e.g., .dll on Win32 or .so on UNIX)
- // according to the OS platform. In addition, this function will
- // apply the appropriate prefix (e.g., "lib" on UNIX and "" on
- // Win32) if the <filename> doesn't match directly.
-
- static FILE *ldopen (const ACE_TCHAR *filename,
- const ACE_TCHAR *type);
- // Uses <ldopen> to locate and open the appropriate <filename> and
- // returns a pointer to the file, else it returns a NULL
- // pointer. <type> specifies how the file should be open.
-
- static int get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len);
- // Returns the temporary directory including the trailing slash in
- // <buffer>. Returns -1 for an error or if the buffer_len is not
- // long enough.
-
- static ACE_HANDLE open_temp_file (const ACE_TCHAR *name,
- int mode,
- int perm = 0);
- // Opening the temp file. File is automagically unlinked when it is
- // closed. This is useful for have temp files.
-
- // = Shield us from Win32's inability to select on STDIN.
-
- // = Miscelleous functions.
- static size_t round_to_pagesize (off_t length);
- // Rounds the request to a multiple of the page size.
-
- static size_t round_to_allocation_granularity (off_t len);
- // Rounds the request to a multiple of the allocation granularity.
-
- // @@ UNICODE what about buffer?
- static int format_hexdump (const char *buffer, int size,
- ACE_TCHAR *obuf, int obuf_sz);
- // Format buffer into printable format. This is useful for
- // debugging.
-
- static u_long hash_pjw (const char *str);
- // Computes the hash value of <str> using the "Hash PJW" routine.
-
- static u_long hash_pjw (const char *str, size_t len);
- // Computes the hash value of <str> using the "Hash PJW" routine.
-
-#if defined (ACE_HAS_WCHAR)
- static u_long hash_pjw (const wchar_t *str);
- // Computes the hash value of <str> using the "Hash PJW" routine.
-
- static u_long hash_pjw (const wchar_t *str, size_t len);
- // Computes the hash value of <str> using the "Hash PJW" routine.
-#endif /* ACE_HAS_WCHAR */
-
- static u_long crc32 (const char *str);
- // Computes the ISO 8802-3 standard 32 bits CRC for the string
- // (not for a file).
-
- static u_long crc32 (const char *buf, ACE_UINT32 len);
- // Computes the ISO 8802-3 standard 32 bits CRC for the given
- // buffer (the length is included in the CRC).
-
- static u_long gcd (u_long x, u_long y);
- // Euclid's greatest common divisor algorithm.
-
- static u_long minimum_frame_size (u_long period1, u_long period2);
- // Calculates the minimum enclosing frame size for the given values.
-
- static u_long is_prime (const u_long n,
- const u_long min_factor,
- const u_long max_factor);
- // Function that can burn up noticeable CPU time: brute-force
- // determination of whether number "n" is prime. Returns 0 if
- // it is prime, or the smallest factor if it is not prime. min_factor
- // and max_factor can be used to partition the work among threads.
- // For just one thread, typical values are 2 and n/2.
-
- static int map_errno (int error);
- // Map troublesome win32 errno values to values that standard C
- // strerr function understands. Thank you Microsoft.
-
- static const ACE_TCHAR *sock_error (int error);
- // Returns a string containing the error message corresponding to a
- // WinSock error. This works around an omission in the Win32 API...
-
- static int process_active (pid_t pid);
- // Checks if process with <pid> is still alive. Returns 1 if it is
- // still alive, 0 if it isn't alive, and -1 if something weird
- // happened.
-
- static int terminate_process (pid_t pid);
- // Terminate the process abruptly with id <pid>. On Win32 platforms
- // this uses <TerminateProcess> and on POSIX platforms is uses
- // <kill> with the -9 (SIGKILL) signal, which cannot be caught or
- // ignored. Note that this call is potentially dangerous to use
- // since the process being terminated may not have a chance to
- // cleanup before it shuts down.
-
- static void unique_name (const void *object,
- ACE_TCHAR *name,
- size_t length);
- // This method uses process id and object pointer to come up with a
- // machine wide unique name. The process ID will provide uniqueness
- // between processes on the same machine. The "this" pointer of the
- // <object> will provide uniqueness between other "live" objects in
- // the same process. The uniqueness of this name is therefore only
- // valid for the life of <object>.
-
- static u_long log2 (u_long num);
- // Computes the base 2 logarithm of <num>.
-
- static ACE_TCHAR nibble2hex (u_int n);
- // Hex conversion utility.
-
- static u_char hex2byte (ACE_TCHAR c);
- // Convert a hex character to its byte representation.
-
- // = Set/get the debug level.
- static char debug (void);
- static void debug (char d);
-
- static int handle_read_ready (ACE_HANDLE handle,
- const ACE_Time_Value *timeout);
- // Timed wait for handle to get read ready.
-
- static int handle_write_ready (ACE_HANDLE handle,
- const ACE_Time_Value *timeout);
- // Timed wait for handle to get write ready.
-
- static int handle_exception_ready (ACE_HANDLE handle,
- const ACE_Time_Value *timeout);
- // Timed wait for handle to get exception ready.
-
- static int handle_ready (ACE_HANDLE handle,
- const ACE_Time_Value *timeout,
- int read_ready,
- int write_ready,
- int exception_ready);
- // Timed wait for handle to get read, write, or exception ready.
-
- static int enter_recv_timedwait (ACE_HANDLE handle,
- const ACE_Time_Value *timeout,
- int &val);
- // Wait for <timeout> before proceeding to a <recv> operation.
- // <val> keeps track of whether we're in non-blocking mode or not.
-
- static int enter_send_timedwait (ACE_HANDLE handle,
- const ACE_Time_Value* timeout,
- int &val);
- // Wait for <timeout> before proceeding to a <send> operation.
- // <val> keeps track of whether we're in non-blocking mode or not.
-
- static void record_and_set_non_blocking_mode (ACE_HANDLE handle,
- int &val);
- // This makes sure that <handle> is set into non-blocking mode.
- // <val> keeps track of whether were in non-blocking mode or not.
-
- static void restore_non_blocking_mode (ACE_HANDLE handle,
- int val);
- // Cleanup after a timed operation, restore the appropriate
- // non-blocking status of <handle>.
-
-private:
-
- //
- // = Recv_n helpers
- //
-
- static ssize_t recv_i (ACE_HANDLE handle,
- void *buf,
- size_t len);
-
- static ssize_t recv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int flags,
- size_t *bytes_transferred);
-
- static ssize_t recv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred);
-
-#if defined (ACE_HAS_TLI)
-
- static ssize_t t_rcv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int *flags,
- size_t *bytes_transferred);
-
- static ssize_t t_rcv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int *flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred);
-
-#endif /* ACE_HAS_TLI */
-
- static ssize_t recv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- size_t *bytes_transferred);
-
- static ssize_t recv_n_i (ACE_HANDLE handle,
- void *buf,
- size_t len,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred);
-
- static ssize_t recvv_n_i (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- size_t *bytes_transferred);
-
- static ssize_t recvv_n_i (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred);
-
- //
- // = Send_n helpers
- //
-
- static ssize_t send_i (ACE_HANDLE handle,
- const void *buf,
- size_t len);
-
- static ssize_t send_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- size_t *bytes_transferred);
-
- static ssize_t send_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred);
-
-#if defined (ACE_HAS_TLI)
-
- static ssize_t t_snd_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- size_t *bytes_transferred);
-
- static ssize_t t_snd_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred);
-
-#endif /* ACE_HAS_TLI */
-
- static ssize_t send_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- size_t *bytes_transferred);
-
- static ssize_t send_n_i (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred);
-
- static ssize_t sendv_n_i (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt,
- size_t *bytes_transferred);
-
- static ssize_t sendv_n_i (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred);
-
- static u_int init_fini_count_;
- // Counter to match <init>/<fini> calls. <init> must increment it;
- // <fini> must decrement it. <fini> then does nothing until it
- // reaches 0.
-
- static size_t pagesize_;
- // Size of a VM page.
-
- static size_t allocation_granularity_;
- // Size of allocation granularity.
-
- static u_long crc_table_[];
- // CRC table.
-
- static const ACE_TCHAR hex_chars_[];
- // Hex characters.
-
- static char debug_;
- // Are we debugging ACE?
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/ACE.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_ACE_H */
diff --git a/ace/ACE.i b/ace/ACE.i
deleted file mode 100644
index 59105519047..00000000000
--- a/ace/ACE.i
+++ /dev/null
@@ -1,352 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Wrappers for methods that have been moved to ACE_OS.
-
-ASYS_INLINE ssize_t
-ACE::read_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- size_t *bytes_transferred)
-{
- return ACE_OS::read_n (handle,
- buf,
- len,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE::write_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- size_t *bytes_transferred)
-{
- return ACE_OS::write_n (handle,
- buf,
- len,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE::recv_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred)
-{
- if (timeout == 0)
- return ACE::recv_n_i (handle,
- buf,
- len,
- flags,
- bytes_transferred);
- else
- return ACE::recv_n_i (handle,
- buf,
- len,
- flags,
- timeout,
- bytes_transferred);
-}
-
-#if defined (ACE_HAS_TLI)
-
-ASYS_INLINE ssize_t
-ACE::t_rcv_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int *flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred)
-{
- if (timeout == 0)
- return ACE::t_rcv_n_i (handle,
- buf,
- len,
- flags,
- bytes_transferred);
- else
- return ACE::t_rcv_n_i (handle,
- buf,
- len,
- flags,
- timeout,
- bytes_transferred);
-}
-
-#endif /* ACE_HAS_TLI */
-
-ASYS_INLINE ssize_t
-ACE::recv_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred)
-{
- if (timeout == 0)
- return ACE::recv_n_i (handle,
- buf,
- len,
- bytes_transferred);
- else
- return ACE::recv_n_i (handle,
- buf,
- len,
- timeout,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE::recvv_n (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred)
-{
- if (timeout == 0)
- return ACE::recvv_n_i (handle,
- iov,
- iovcnt,
- bytes_transferred);
- else
- return ACE::recvv_n_i (handle,
- iov,
- iovcnt,
- timeout,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE::send_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred)
-{
- if (timeout == 0)
- return ACE::send_n_i (handle,
- buf,
- len,
- flags,
- bytes_transferred);
- else
- return ACE::send_n_i (handle,
- buf,
- len,
- flags,
- timeout,
- bytes_transferred);
-}
-
-#if defined (ACE_HAS_TLI)
-
-ASYS_INLINE ssize_t
-ACE::t_snd_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred)
-{
- if (timeout == 0)
- return ACE::t_snd_n_i (handle,
- buf,
- len,
- flags,
- bytes_transferred);
- else
- return ACE::t_snd_n_i (handle,
- buf,
- len,
- flags,
- timeout,
- bytes_transferred);
-}
-
-#endif /* ACE_HAS_TLI */
-
-ASYS_INLINE ssize_t
-ACE::send_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred)
-{
- if (timeout == 0)
- return ACE::send_n_i (handle,
- buf,
- len,
- bytes_transferred);
- else
- return ACE::send_n_i (handle,
- buf,
- len,
- timeout,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE::sendv_n (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred)
-{
- if (timeout == 0)
- return ACE::sendv_n_i (handle,
- iov,
- iovcnt,
- bytes_transferred);
- else
- return ACE::sendv_n_i (handle,
- iov,
- iovcnt,
- timeout,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len)
-{
-#if defined (ACE_WIN32) || defined (ACE_PSOS)
- return ACE_OS::send (handle, (const char *) buf, len);
-#else
- return ACE_OS::write (handle, (const char *) buf, len);
-#endif /* ACE_WIN32 */
-}
-
-ASYS_INLINE ssize_t
-ACE::recv_i (ACE_HANDLE handle, void *buf, size_t len)
-{
-#if defined (ACE_WIN32) || defined (ACE_PSOS)
- return ACE_OS::recv (handle, (char *) buf, len);
-#else
- return ACE_OS::read (handle, (char *) buf, len);
-#endif /* ACE_WIN32 */
-}
-
-ASYS_INLINE int
-ACE::handle_read_ready (ACE_HANDLE handle,
- const ACE_Time_Value *timeout)
-{
- return ACE::handle_ready (handle,
- timeout,
- 1,
- 0,
- 0);
-}
-
-ASYS_INLINE int
-ACE::handle_write_ready (ACE_HANDLE handle,
- const ACE_Time_Value *timeout)
-{
- return ACE::handle_ready (handle,
- timeout,
- 0,
- 1,
- 0);
-}
-
-ASYS_INLINE int
-ACE::handle_exception_ready (ACE_HANDLE handle,
- const ACE_Time_Value *timeout)
-{
- return ACE::handle_ready (handle,
- timeout,
- 0,
- 0,
- 1);
-}
-
-ASYS_INLINE void
-ACE::unique_name (const void *object,
- ACE_TCHAR *name,
- size_t length)
-{
- ACE_OS::unique_name (object, name, length);
-}
-
-// Return flags currently associated with handle.
-
-ASYS_INLINE int
-ACE::get_flags (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE::get_flags");
-
-#if defined (ACE_LACKS_FCNTL)
- // ACE_OS::fcntl is not supported, e.g., on VxWorks. It
- // would be better to store ACE's notion of the flags
- // associated with the handle, but this works for now.
- ACE_UNUSED_ARG (handle);
- return 0;
-#else
- return ACE_OS::fcntl (handle, F_GETFL, 0);
-#endif /* ACE_LACKS_FCNTL */
-}
-
-ASYS_INLINE u_long
-ACE::log2 (u_long num)
-{
- u_long log = 0;
-
- for (;
- num > 0;
- log++)
- num >>= 1;
-
- return log;
-}
-
-ASYS_INLINE ACE_TCHAR
-ACE::nibble2hex (u_int n)
-{
- // @@ UNICODE does this work?
- return ACE::hex_chars_[n & 0x0f];
-}
-
-ASYS_INLINE u_char
-ACE::hex2byte (ACE_TCHAR c)
-{
- if (isdigit (c))
- return (u_char) (c - ACE_TEXT ('0'));
- else if (islower (c))
- return (u_char) (10 + c - ACE_TEXT ('a'));
- else
- return (u_char) (10 + c - ACE_TEXT ('A'));
-}
-
-ASYS_INLINE char
-ACE::debug (void)
-{
- return ACE::debug_;
-}
-
-ASYS_INLINE void
-ACE::debug (char c)
-{
- ACE::debug_ = c;
-}
-
-ASYS_INLINE char *
-ACE::strnew (const char *s)
-{
- char *t = new char [::strlen(s) + 1];
- if (t == 0)
- return 0;
- else
- return ACE_OS::strcpy (t, s);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ASYS_INLINE wchar_t *
-ACE::strnew (const wchar_t *s)
-{
- wchar_t *t = new wchar_t[::wcslen (s) + 1];
- if (t == 0)
- return 0;
- else
- return ACE_OS::strcpy (t, s);
-}
-#endif /* ACE_HAS_WCHAR */
diff --git a/ace/ACE_export.h b/ace/ACE_export.h
deleted file mode 100644
index 8a6bf6b8877..00000000000
--- a/ace/ACE_export.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by
-// generate_export_file.pl
-// ------------------------------
-#if !defined (ACE_EXPORT_H)
-#define ACE_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_HAS_DLL)
-#define ACE_HAS_DLL 1
-#endif /* ! ACE_HAS_DLL */
-
-#if defined (ACE_HAS_DLL)
-# if (ACE_HAS_DLL == 1)
-# if defined (ACE_BUILD_DLL)
-# define ACE_Export ACE_Proper_Export_Flag
-# define ACE_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# else
-# define ACE_Export ACE_Proper_Import_Flag
-# define ACE_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# endif /* ACE_BUILD_DLL */
-# else
-# define ACE_Export
-# define ACE_SINGLETON_DECLARATION(T)
-# endif /* ! ACE_HAS_DLL == 1 */
-#else
-# define ACE_Export
-# define ACE_SINGLETON_DECLARATION(T)
-#endif /* ACE_HAS_DLL */
-
-#endif /* ACE_EXPORT_H */
-
-// End of auto generated file.
diff --git a/ace/ARGV.cpp b/ace/ARGV.cpp
deleted file mode 100644
index bb3f4670ef2..00000000000
--- a/ace/ARGV.cpp
+++ /dev/null
@@ -1,334 +0,0 @@
-// ARGV.cpp
-// $Id$
-
-// Transforms a string BUF into an ARGV-style vector of strings.
-
-#include "ace/ARGV.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/ARGV.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, ARGV, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE (ACE_ARGV)
-
-void
-ACE_ARGV::dump (void) const
-{
- ACE_TRACE ("ACE_ARGV::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("argc_ = %d"), this->argc_));
-
- for (size_t i = 0; i < this->argc_; i++)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nargv_[%i] = %s"), i, this->argv_[i]));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nbuf = %s\n"), this->buf_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Creates this->argv_ out of this->buf_. New memory is allocated for
-// each element of the array. This is used by the array-to-string
-// style constructor and for creating this->argv_ when in iterative
-// mode.
-
-int
-ACE_ARGV::string_to_argv (void)
-{
- ACE_TRACE ("ACE_ARGV::string_to_argv");
-
- return ACE_OS::string_to_argv (this->buf_,
- this->argc_,
- this->argv_,
- this->substitute_env_args_);
-}
-
-int
-ACE_ARGV::argv_to_string (ACE_TCHAR **argv, ACE_TCHAR *&buf)
-{
- return ACE_OS::argv_to_string (argv, buf);
-}
-
-ACE_ARGV::ACE_ARGV (const ACE_TCHAR buf[],
- int substitute_env_args)
- : substitute_env_args_ (substitute_env_args),
- state_ (TO_PTR_ARRAY),
- argc_ (0),
- argv_ (0),
- buf_ (0),
- length_ (0),
- queue_ ()
-{
- ACE_TRACE ("ACE_ARGV::ACE_ARGV ACE_TCHAR[] to ACE_TCHAR *[]");
-
- if (buf == 0 || buf[0] == 0)
- return;
-
- // Make an internal copy of the string.
- ACE_NEW (this->buf_,
- ACE_TCHAR[ACE_OS::strlen (buf) + 1]);
- ACE_OS::strcpy (this->buf_, buf);
-
- // Create this->argv_.
- if (this->string_to_argv () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("string_to_argv")));
-}
-
-ACE_ARGV::ACE_ARGV (ACE_TCHAR *argv[],
- int substitute_env_args)
- : substitute_env_args_ (substitute_env_args),
- state_ (TO_STRING),
- argc_ (0),
- argv_ (0),
- buf_ (0),
- length_ (0),
- queue_ ()
-{
- ACE_TRACE ("ACE_ARGV::ACE_ARGV ACE_TCHAR*[] to ACE_TCHAR[]");
-
- if (argv == 0 || argv[0] == 0)
- return;
-
- int buf_len = 0;
-
- // Determine the length of the buffer.
-
- for (int i = 0; argv[i] != 0; i++)
- {
- ACE_TCHAR *temp;
-
- // Account for environment variables.
- if (this->substitute_env_args_
- && (argv[i][0] == '$'
- && (temp = ACE_OS::getenv (&argv[i][1])) != 0))
- buf_len += ACE_OS::strlen (temp);
- else
- buf_len += ACE_OS::strlen (argv[i]);
-
- // Add one for the extra space between each string.
- buf_len++;
- }
-
- // Step through all argv params and copy each one into buf; separate
- // each param with white space.
-
- ACE_NEW (this->buf_,
- ACE_TCHAR[buf_len + 1]);
-
- ACE_TCHAR *end = this->buf_;
- int j;
-
- for (j = 0; argv[j] != 0; j++)
- {
- ACE_TCHAR *temp;
-
- // Account for environment variables.
- if (this->substitute_env_args_
- && (argv[j][0] == '$'
- && (temp = ACE_OS::getenv (&argv[j][1])) != 0))
- end = ACE_OS::strecpy (end, temp);
- else
- end = ACE_OS::strecpy (end, argv[j]);
-
- // Replace the null char that strecpy copies with white space as
- // a separator.
- *(end-1) = ACE_TEXT (' ');
- }
-
- // Remember how many arguments there are
- this->argc_ = j;
-
- // Null terminate the string.
- *end = '\0';
-}
-
-ACE_ARGV::ACE_ARGV (ACE_TCHAR *first_argv[],
- ACE_TCHAR *second_argv[],
- int substitute_env_args)
- : substitute_env_args_ (substitute_env_args),
- state_ (TO_STRING),
- argc_ (0),
- argv_ (0),
- buf_ (0),
- length_ (0),
- queue_ ()
-{
- ACE_TRACE ("ACE_ARGV::ACE_ARGV ACE_TCHAR*[] + ACE_TCHAR *[] to ACE_TCHAR[]");
-
- int first_argc;
- int second_argc;
-
- ACE_TCHAR *first_buf;
- ACE_TCHAR *second_buf;
-
- // convert the first argv to a string
- first_argc = this->argv_to_string (first_argv,first_buf);
-
- // convert the second argv to a string
- second_argc = this->argv_to_string (second_argv,second_buf);
-
- // Add the number of arguments in both the argvs.
- this->argc_ = first_argc + second_argc;
-
- int buf_len = ACE_OS::strlen (first_buf) + ACE_OS::strlen (second_buf) + 1;
-
- // Allocate memory to the lenght of the combined argv string.
- ACE_NEW (this->buf_,
- ACE_TCHAR[buf_len + 1]);
-
- // copy the first argv string to the buffer
- ACE_OS::strcpy (this->buf_,first_buf);
-
- // concatenate the second argv string to the buffer
- ACE_OS::strcat (this->buf_,second_buf);
-
- // Delete the first and second buffers
-
- delete [] first_buf;
-
- delete [] second_buf;
-}
-
-
-ACE_ARGV::ACE_ARGV (int substitute_env_args)
- : substitute_env_args_ (substitute_env_args),
- state_ (ITERATIVE),
- argc_ (0),
- argv_ (0),
- buf_ (0),
- length_ (0),
- queue_ ()
-{
- ACE_TRACE ("ACE_ARGV::ACE_ARGV Iterative");
-
- // Nothing to do yet -- the user puts in arguments via add ()
-}
-
-int
-ACE_ARGV::add (const ACE_TCHAR *next_arg)
-{
- // Only allow this to work in the "iterative" verion -- the
- // ACE_ARGVs created with the one argument constructor.
- if (this->state_ != ITERATIVE)
- {
- errno = EINVAL;
- return -1;
- }
-
- // Put the new argument at the end of the queue.
- if (this->queue_.enqueue_tail ((ACE_TCHAR *) next_arg) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Can't add more to ARGV queue")),
- -1);
-
- this->length_ += ACE_OS::strlen (next_arg);
-
- this->argc_++;
-
- // Wipe argv_ and buf_ away so that they will be recreated if the
- // user calls argv () or buf ().
- if (this->argv_ != 0)
- {
- for (int i = 0; this->argv_[i] != 0; i++)
- ACE_OS::free ((void *) this->argv_[i]);
-
- delete [] this->argv_;
- this->argv_ = 0;
- }
-
- delete [] this->buf_;
- this->buf_ = 0;
-
- return 0;
-}
-
-int
-ACE_ARGV::add (ACE_TCHAR *argv[])
-{
- for (int i = 0; argv[i] != 0; i++)
- if (this->add (argv[i]) == -1)
- return -1;
-
- return 0;
-}
-
-// Free up argv_ and buf_
-
-ACE_ARGV::~ACE_ARGV (void)
-{
- ACE_TRACE ("ACE_ARGV::~ACE_ARGV");
-
- if (this->argv_ != 0)
- for (int i = 0; this->argv_[i] != 0; i++)
- ACE_OS::free ((void *) this->argv_[i]);
-
- delete [] this->argv_;
- delete [] this->buf_;
-}
-
-// Create buf_ out of the queue_. This is only used in the
-// "iterative" mode.
-
-int
-ACE_ARGV::create_buf_from_queue (void)
-{
- ACE_TRACE ("ACE_ARGV::create_buf_from_queue");
-
- // If the are no arguments, don't do anything
- if (this->argc_ <= 0)
- return -1;
-
- delete [] this->buf_;
-
- ACE_NEW_RETURN (this->buf_,
- ACE_TCHAR[this->length_ + this->argc_],
- -1);
-
- // Get an iterator over the queue
- ACE_Unbounded_Queue_Iterator<ACE_TCHAR *> iter (this->queue_);
-
- ACE_TCHAR **arg;
- ACE_TCHAR *ptr = this->buf_;
- size_t len;
- int more = 0;
-
- while (!iter.done ())
- {
- // Get next argument from the queue.
- iter.next (arg);
-
- more = iter.advance ();
-
- len = ACE_OS::strlen (*arg);
-
- // Copy the argument into buf_
- ACE_OS::memcpy ((void *) ptr,
- (const void *) (*arg),
- len * sizeof (ACE_TCHAR));
- // Move the pointer down.
- ptr += len;
-
- // Put in an argument separating space.
- if (more != 0)
- *ptr++ = ' ';
- }
-
- // Put in the NUL terminator
- *ptr = '\0';
-
- return 0;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Unbounded_Queue<ACE_TCHAR *>;
-template class ACE_Unbounded_Queue_Iterator<ACE_TCHAR *>;
-template class ACE_Node<ACE_TCHAR *>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Unbounded_Queue<ACE_TCHAR *>
-#pragma instantiate ACE_Unbounded_Queue_Iterator<ACE_TCHAR *>
-#pragma instantiate ACE_Node<ACE_TCHAR *>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/ARGV.h b/ace/ARGV.h
deleted file mode 100644
index 233c818c3b5..00000000000
--- a/ace/ARGV.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ARGV.h
-//
-// = AUTHOR
-// Doug Schmidt, Everett Anderson
-//
-// ============================================================================
-
-#ifndef ACE_ARGUMENT_VECTOR_H
-#define ACE_ARGUMENT_VECTOR_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Containers.h"
-
-class ACE_Export ACE_ARGV
-{
- // = TITLE
- // Transforms a string <buf> into an <argv> style vector of
- // strings or an <argv> style vector of string <buf>, performing
- // environment variable substitutions if necessary.
-public:
- // = Initialization and termination.
- ACE_ARGV (const ACE_TCHAR buf[],
- int substitute_env_args = 1);
- // Converts <buf> into an <argv>-style vector of strings. If
- // <substitute_env_args> is enabled then we'll substitute the
- // environment variables for each $ENV encountered in the string.
- // The subscript and <argv> operations are not allowed on an
- // ACE_ARGV created this way.
-
- ACE_ARGV (ACE_TCHAR *argv[],
- int substitute_env_args = 1);
- // Converts <argv> into a linear string. If <substitute_env_args>
- // is enabled then we'll substitute the environment variables for
- // each $ENV encountered in the string. The <buf> operation is not
- // allowed on an ACE_ARGV created this way.
-
- ACE_ARGV (ACE_TCHAR *first_argv[],
- ACE_TCHAR *second_argv[],
- int substitute_env_args =1);
- // Creates an ACE_ARGV which is the concatenation of the first_argv
- // and the second argv. The argv arguments should be null pointer
- // terminated.
-
- ACE_ARGV (int substitute_env_args = 1);
- // Entry point for creating an ACE_TCHAR *[] command line
- // iteratively via the <add> method. When this constructor is used,
- // the <ITERATIVE> state is enabled. The <argv> and <buf> methods
- // are allowed, and the result is recreated when called multiple
- // times. The subscript operator is not allowed.
-
- ~ACE_ARGV (void);
- // Destructor.
-
- // = Accessor arguments.
- const ACE_TCHAR *operator[] (size_t index);
- // Returns the <index>th string in the ARGV array.
-
- ACE_TCHAR **argv (void);
- // Returns the <argv> array. Caller should not delete this memory
- // since the <ARGV> destructor will delete it. If the caller
- // modifies the array in the iterative mode, the changes are not
- // saved to the queue.
-
- size_t argc (void) const;
- // Returns <argc>.
-
- const ACE_TCHAR *buf (void);
- // Returns the <buf>. Caller should not delete this memory since
- // the <ARGV> destructor will delete it.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- int add (const ACE_TCHAR *next_arg);
- // Add another argument. This only works in the <ITERATIVE> state.
- // Returns -1 on failure and 0 on success.
-
- int add (ACE_TCHAR *argv[]);
- // Add another <argv> array. The <argv> parameter must be NULL
- // terminated. This only works in the <ITERATIVE> state. Returns
- // -1 on failure and 0 on success.
-
- int state (void) const;
- // What state is this ACE_ARGV in?
-
- // These are the states possible via the different constructors.
- enum States
- {
- TO_STRING = 1,
- // ACE_ARGV converts buf[] to ACE_TCHAR *argv[]
- TO_PTR_ARRAY = 2,
- // ACE_ARGV converts ACE_TCHAR *argv[] to buf[]
- ITERATIVE = 3
- // Builds buf[] or ACE_TCHAR *argv[] iteratively with <add>.
- };
-
-private:
-
- int create_buf_from_queue (void);
- // Creates buf_ from the queue, deletes previous buf_.
-
- int string_to_argv (void);
- // Converts buf_ into the ACE_TCHAR *argv[] format.
-
- int argv_to_string (ACE_TCHAR **argv, ACE_TCHAR *&buf);
- // Returns the string created from argv in buf and
- // returns the number of arguments.
-
- int substitute_env_args_;
- // Replace args with environment variable values?
-
- int state_;
- // Current state marker.
-
- size_t argc_;
- // Number of arguments in the ARGV array.
-
- ACE_TCHAR **argv_;
- // The array of string arguments.
-
- ACE_TCHAR *buf_;
- // Buffer containing the <argv> contents.
-
- size_t length_;
- // Total length of the arguments in the queue, not counting
- // separating spaces
-
- ACE_Unbounded_Queue<ACE_TCHAR *> queue_;
- // Queue which keeps user supplied arguments. This is only
- // active in the "iterative" mode.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/ARGV.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_ARGUMENT_VECTOR_H */
diff --git a/ace/ARGV.i b/ace/ARGV.i
deleted file mode 100644
index f45bdf4b125..00000000000
--- a/ace/ARGV.i
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Return the number of args
-ACE_INLINE size_t
-ACE_ARGV::argc (void) const
-{
- ACE_TRACE ("ACE_ARGV::argc");
- return this->argc_;
-}
-
-// Return the state of this ACE_ARGV
-ACE_INLINE int
-ACE_ARGV::state(void) const
-{
- ACE_TRACE ("ACE_ARGV::state");
- return this->state_;
-}
-
-// Return the arguments in a space-separated string
-ACE_INLINE const ACE_TCHAR *
-ACE_ARGV::buf (void)
-{
- ACE_TRACE ("ACE_ARGV::buf");
-
- if (this->buf_ == 0 && this->state_ == ITERATIVE)
- this->create_buf_from_queue ();
-
- return (const ACE_TCHAR *) this->buf_;
-}
-
-// Return the arguments in an entry-per-argument array
-
-ACE_INLINE ACE_TCHAR **
-ACE_ARGV::argv (void)
-{
- ACE_TRACE ("ACE_ARGV::argv");
-
- // Try to create the argv_ if it isn't there
- if (this->argv_ == 0)
- {
- if (this->state_ == ITERATIVE && this->buf_ == 0)
- this->create_buf_from_queue ();
-
- // Convert buf_ to argv_
- if (this->string_to_argv () == -1)
- return (ACE_TCHAR **) 0;
- }
-
- return (ACE_TCHAR **) this->argv_;
-}
-
-// Subscript operator.
-
-ACE_INLINE const ACE_TCHAR *
-ACE_ARGV::operator[] (size_t i)
-{
- ACE_TRACE ("ACE_ARGV::operator[]");
-
- // Don't go out of bounds.
- if (i >= this->argc_)
- return 0;
-
- return (const ACE_TCHAR *) this->argv ()[i];
-}
-
-
-
diff --git a/ace/ATM_Acceptor.cpp b/ace/ATM_Acceptor.cpp
deleted file mode 100644
index 3cf879f257b..00000000000
--- a/ace/ATM_Acceptor.cpp
+++ /dev/null
@@ -1,217 +0,0 @@
-// $Id$
-
-#include "ace/ATM_Acceptor.h"
-
-ACE_RCSID(ace, ATM_Acceptor, "$Id$")
-
-#if defined (ACE_HAS_ATM)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/ATM_Acceptor.i"
-#endif /* __ACE_INLINE__ */
-
-// Put the actual definitions of the ACE_ATM_Request and
-// ACE_ATM_Request_Queue classes here to hide them from clients...
-
-ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Acceptor)
-
-void
-ACE_ATM_Acceptor::dump (void) const
-{
- ACE_TRACE ("ACE_ATM_Acceptor::dump");
-}
-
-ACE_ATM_Acceptor::ACE_ATM_Acceptor (void)
-{
- ACE_TRACE ("ACE_ATM_Acceptor::ACE_ATM_Acceptor");
-}
-
-ACE_ATM_Acceptor::~ACE_ATM_Acceptor (void)
-{
- ACE_TRACE ("ACE_ATM_Acceptor::~ACE_ATM_Acceptor");
-}
-
-int
-ACE_ATM_Acceptor::get_local_addr( ACE_ATM_Addr &local_addr )
-{
- ACE_TRACE( "ACE_ATM_Acceptor::get_local_addr" );
-
-#if defined (ACE_HAS_FORE_ATM_WS2)
- unsigned long ret = 0;
- DWORD deviceID = 0;
- ATM_ADDRESS addr;
- struct sockaddr_atm *laddr;
-
- if ( ::WSAIoctl(( int )(( ACE_SOCK_Acceptor *)this ) -> get_handle(),
- SIO_GET_ATM_ADDRESS,
- (LPVOID) &deviceID,
- sizeof(DWORD),
- ( LPVOID )&addr,
- sizeof( ATM_ADDRESS ),
- &ret,
- NULL,
- NULL ) == SOCKET_ERROR ) {
- ACE_OS::printf( "ATM_Acceptor(get_local_addr): WSIoctl: %d\n",
- ::WSAGetLastError());
- return -1;
- }
-
- laddr = ( struct sockaddr_atm *)local_addr.get_addr();
- ACE_OS::memcpy(( void *)&( laddr -> satm_number ),
- ( void *)&addr,
- ATM_ADDR_SIZE - 1 );
-
- return 0;
-#elif defined (ACE_HAS_FORE_ATM_XTI)
- ACE_UNUSED_ARG( local_addr );
-
- return 0;
-#else
- ACE_UNUSED_ARG( local_addr );
-
- return 0;
-#endif /* ACE_HAS_FORE_ATM_WS2 && ACE_HAS_FORE_ATM_XTI */
-}
-
-ACE_HANDLE
-ACE_ATM_Acceptor::open (const ACE_Addr &remote_sap,
- int backlog,
- ACE_ATM_Params params)
-{
- ACE_TRACE ("ACE_ATM_Acceptor::open");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- ACE_HANDLE handle = acceptor_.open (remote_sap,
- params.get_reuse_addr(),
- params.get_oflag(),
- params.get_info(),
- backlog,
- params.get_device());
- return (handle == ACE_INVALID_HANDLE ? -1 : 0);
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- //Unable to use ACE_SOCK_Acceptor.open
- //because of its assumption of using SOCK_STREAM
- //return (ACE_HANDLE)(acceptor_.open (remote_sap, //ACE_Addr
- // protocol_info, //ACE_Protocol_Info
- // 0, //ACE_SOCK_Group
- // 0, //u_long flags
- // params.get_reuse_addr(),
- // params.get_protocol_family(),
- // backlog,
- // params.get_protocol()));
-
- struct sockaddr_atm local_atm_addr;
- ACE_HANDLE ret;
- DWORD flags = 0;
-
- /* Create a local endpoint of communication */
-
- // Only leaves can listen.
- flags = ACE_FLAG_MULTIPOINT_C_LEAF | ACE_FLAG_MULTIPOINT_D_LEAF;
-
-
- if ((ret = ACE_OS::socket (AF_ATM,
- SOCK_RAW,
- ATMPROTO_AAL5,
- NULL,
- 0,
- flags ))
- == ACE_INVALID_HANDLE) {
- ACE_OS::printf( "Acceptor(open): socket %d\n", ::WSAGetLastError()),
- ACE_OS::exit (1);
- }
-
- ((ACE_SOCK_Acceptor *)this) -> set_handle( ret );
-
- /* Set up the address information to become a server */
- ACE_OS::memset ((void *) &local_atm_addr, 0, sizeof local_atm_addr);
- local_atm_addr.satm_family = AF_ATM;
- local_atm_addr.satm_number.AddressType = SAP_FIELD_ANY_AESA_REST;
- local_atm_addr.satm_number.Addr[ ATM_ADDR_SIZE - 1 ]
- = (( ACE_ATM_Addr *)&remote_sap ) -> get_selector();
- local_atm_addr.satm_blli.Layer2Protocol = SAP_FIELD_ANY;
- local_atm_addr.satm_blli.Layer3Protocol = SAP_FIELD_ABSENT;
- local_atm_addr.satm_bhli.HighLayerInfoType = SAP_FIELD_ABSENT;
-
- /* Associate address with endpoint */
- if (ACE_OS::bind ((( ACE_SOCK_Acceptor *)this ) -> get_handle(),
- ACE_reinterpret_cast(struct sockaddr *, &local_atm_addr),
- sizeof local_atm_addr) == -1) {
- ACE_OS::printf( "Acceptor(open): bind %d\n", ::WSAGetLastError());
- ACE_OS::exit (1);
- }
-
- /* Make endpoint listen for service requests */
- if (ACE_OS::listen ((( ACE_SOCK_Acceptor *)this ) -> get_handle(),
- backlog)
- == -1) {
- ACE_OS::printf( "Acceptor(open): listen %d\n", ::WSAGetLastError());
- ACE_OS::exit (1);
- }
-
- return 0;
-#else
- ACE_UNUSED_ARG (remote_sap);
- ACE_UNUSED_ARG (backlog);
- ACE_UNUSED_ARG (params);
-#endif /* ACE_HAS_FORE_ATM_XTI/ACE_HAS_FORE_ATM_WS2 */
-}
-
-int
-ACE_ATM_Acceptor::accept (ACE_ATM_Stream &new_sap,
- ACE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle,
- ACE_ATM_Params params,
- ACE_ATM_QoS qos)
-{
- ACE_TRACE ("ACE_ATM_Acceptor::accept");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- ATM_QoS optbuf = qos.get_qos();
-
- return (acceptor_.accept(new_sap.get_stream(),
- remote_addr,
- timeout,
- restart,
- reset_new_handle,
- params.get_rw_flag(),
- params.get_user_data(),
- &optbuf));
-#elif defined (ACE_HAS_FORE_ATM_WS2)
-// return (acceptor_.accept(new_sap.get_stream(),
-// remote_addr,
-// timeout,
-// restart,
-// reset_new_handle));
- ACE_HANDLE n_handle;
- ACE_HANDLE s_handle = (( ACE_SOCK_Acceptor *) this ) -> get_handle();
- struct sockaddr_atm *cli_addr
- = ( struct sockaddr_atm *)remote_addr -> get_addr();
- int caddr_len = sizeof( struct sockaddr_atm );
-
- do {
- n_handle = ACE_OS::accept( s_handle,
- ACE_reinterpret_cast( struct sockaddr *,
- cli_addr ),
- &caddr_len );
- } while ( n_handle == ACE_INVALID_HANDLE && errno == EINTR );
-
- (( ACE_ATM_Addr *)remote_addr ) -> set( cli_addr,
- (( ACE_ATM_Addr *)remote_addr ) -> get_selector());
- (( ACE_IPC_SAP *)&new_sap ) -> set_handle( n_handle );
-
- return 0;
-#else
- ACE_UNUSED_ARG(new_sap);
- ACE_UNUSED_ARG(remote_addr);
- ACE_UNUSED_ARG(timeout);
- ACE_UNUSED_ARG(restart);
- ACE_UNUSED_ARG(reset_new_handle);
- ACE_UNUSED_ARG(params);
- ACE_UNUSED_ARG(qos);
- return (0);
-#endif /* ACE_HAS_FORE_ATM_XTI */
-}
-
-#endif /* ACE_HAS_ATM */
-
diff --git a/ace/ATM_Acceptor.h b/ace/ATM_Acceptor.h
deleted file mode 100644
index 86206c6b3ef..00000000000
--- a/ace/ATM_Acceptor.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ATM_Acceptor.h
-//
-// = AUTHOR
-// Joe Hoffert
-//
-// ============================================================================
-
-#ifndef ACE_ATM_ACCEPTOR_H
-#define ACE_ATM_ACCEPTOR_H
-#include "ace/pre.h"
-
-#include "ace/Time_Value.h"
-#include "ace/ATM_Stream.h"
-#include "ace/ATM_Params.h"
-#include "ace/ATM_QoS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_ATM)
-
-#if defined (ACE_HAS_FORE_ATM_WS2)
-#include "SOCK_Acceptor.h"
-typedef ACE_SOCK_Acceptor ATM_Acceptor;
-#elif defined (ACE_HAS_FORE_ATM_XTI)
-#include "TLI_Acceptor.h"
-typedef ACE_TLI_Acceptor ATM_Acceptor;
-#endif
-
-class ACE_Export ACE_ATM_Acceptor
-{
- // = TITLE
- // Defines the member functions for ACE_ATM_Acceptor abstraction.
- //
- // = DESCRIPTION
- // This class wraps up the ACE_SOCK_Acceptor and ACE_TLI_Acceptor
- // to make the mechanism for the ATM protocol transparent.
-
-public:
- // = Initialization and termination methods.
- ACE_ATM_Acceptor (void);
- // Default constructor.
-
- ~ACE_ATM_Acceptor ();
-
- ACE_ATM_Acceptor (const ACE_Addr &remote_sap,
- int backlog = ACE_DEFAULT_BACKLOG,
- ACE_ATM_Params params = ACE_ATM_Params());
- // Initiate a passive mode connection.
-
- ACE_HANDLE open (const ACE_Addr &remote_sap,
- int backlog = ACE_DEFAULT_BACKLOG,
- ACE_ATM_Params params = ACE_ATM_Params());
- // Initiate a passive mode socket.
-
- int close (void);
- // Close down the acceptor and release resources.
-
- // = Passive connection acceptance method.
-
- int accept (ACE_ATM_Stream &new_sap,
- ACE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0,
- ACE_ATM_Params params = ACE_ATM_Params(),
- ACE_ATM_QoS qos = ACE_ATM_QoS());
-
- // Accept a new data transfer connection. A <timeout> of 0 means
- // block forever, a <timeout> of {0, 0} means poll. <restart> == 1
- // means "restart if interrupted."
-
- int get_local_addr( ACE_ATM_Addr &local_addr );
- // Get the local address currently listening on
-
- // = Meta-type info
- typedef ACE_ATM_Addr PEER_ADDR;
- typedef ACE_ATM_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ATM_Acceptor acceptor_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/ATM_Acceptor.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_ATM */
-#include "ace/post.h"
-#endif /* ACE_ATM_ACCEPTOR_H */
-
diff --git a/ace/ATM_Acceptor.i b/ace/ATM_Acceptor.i
deleted file mode 100644
index 55aa1568d05..00000000000
--- a/ace/ATM_Acceptor.i
+++ /dev/null
@@ -1,27 +0,0 @@
-// $Id$
-
-// ATM_Acceptor.i
-
-ACE_INLINE
-ACE_ATM_Acceptor::ACE_ATM_Acceptor (const ACE_Addr &remote_sap,
- int backlog,
- ACE_ATM_Params params)
-{
- ACE_TRACE ("ACE_ATM_Acceptor::ACE_ATM_Acceptor");
- open (remote_sap,
- backlog,
- params);
-}
-
-ACE_INLINE
-int
-ACE_ATM_Acceptor::close (void)
-{
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- return (acceptor_.close());
-#else
- return 0;
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
-}
-
-
diff --git a/ace/ATM_Addr.cpp b/ace/ATM_Addr.cpp
deleted file mode 100644
index 6f921ace15e..00000000000
--- a/ace/ATM_Addr.cpp
+++ /dev/null
@@ -1,589 +0,0 @@
-// $Id$
-
-// Defines the Internet domain address family address format.
-
-#include "ace/ATM_Addr.h"
-
-#if defined (ACE_HAS_FORE_ATM_WS2)
-#include "forews2.h"
-#endif /* ACE_HAS_FORE_ATM_WS2 */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/ATM_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, ATM_Addr, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Addr)
-
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
-#define BHLI_MAGIC "FORE_ATM"
-// This is line rate in cells/s for an OC-3 MM interface.
-const long ACE_ATM_Addr::LINE_RATE = 353207;
-const int ACE_ATM_Addr::OPT_FLAGS_CPID = 0x1;
-const int ACE_ATM_Addr::OPT_FLAGS_PMP = 0x2;
-const int ACE_ATM_Addr::DEFAULT_SELECTOR = 0x99;
-#else
-const long ACE_ATM_Addr::LINE_RATE = 0L;
-const int ACE_ATM_Addr::OPT_FLAGS_CPID = 0;
-const int ACE_ATM_Addr::OPT_FLAGS_PMP = 0;
-const int ACE_ATM_Addr::DEFAULT_SELECTOR = 0x0;
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
-
-// Default constructor
-
-ACE_ATM_Addr::ACE_ATM_Addr (unsigned char selector)
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- : ACE_Addr (AF_ATM,
-#else
- : ACE_Addr (AF_UNSPEC,
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
- sizeof this->atm_addr_)
-{
- // ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr");
- (void) ACE_OS::memset ((void *) &this->atm_addr_,
- 0,
- sizeof this->atm_addr_);
- this->init (selector);
-}
-
-// Copy constructor.
-
-ACE_ATM_Addr::ACE_ATM_Addr (const ACE_ATM_Addr &sap,
- unsigned char selector)
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- : ACE_Addr (AF_ATM,
-#else
- : ACE_Addr (AF_UNSPEC,
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
- sizeof this->atm_addr_)
-{
- ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr");
- this->set (sap, selector);
-}
-
-ACE_ATM_Addr::ACE_ATM_Addr (const ATM_Addr *sap,
- unsigned char selector)
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- : ACE_Addr (AF_ATM,
-#else
- : ACE_Addr (AF_UNSPEC,
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
- sizeof this->atm_addr_)
-{
- ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr");
- this->set (sap, selector);
-}
-
-
-ACE_ATM_Addr::ACE_ATM_Addr (const ACE_TCHAR sap[],
- unsigned char selector)
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- : ACE_Addr (AF_ATM,
-#else
- : ACE_Addr (AF_UNSPEC,
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
- sizeof this->atm_addr_)
-{
- ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr");
- this->set (sap, selector);
-}
-
-void
-ACE_ATM_Addr::init (unsigned char selector)
-{
-#if defined (ACE_HAS_FORE_ATM_XTI)
- // Note: this approach may be FORE implementation-specific. When we
- // bind with tag_addr ABSENT and tag_selector PRESENT, only the
- // selector (i.e. address[19]) is used by the TP. The rest of the
- // local address is filled in by the TP and can be obtained via the
- // 'ret' parameter or with t_getname()/t_getprotaddr().
-
- atm_addr_.addressType = (u_int16_t) AF_ATM;
-
- atm_addr_.sap.t_atm_sap_addr.SVE_tag_addr = (int8_t) T_ATM_ABSENT;
- atm_addr_.sap.t_atm_sap_addr.SVE_tag_selector = (int8_t) T_ATM_PRESENT;
-
- atm_addr_.sap.t_atm_sap_addr.address_format = (u_int8_t) T_ATM_ENDSYS_ADDR;
- atm_addr_.sap.t_atm_sap_addr.address_length = ATMNSAP_ADDR_LEN;
- atm_addr_.sap.t_atm_sap_addr.address[ATMNSAP_ADDR_LEN - 1] = selector;
-
- atm_addr_.sap.t_atm_sap_layer2.SVE_tag = (int8_t) T_ATM_ABSENT;
- atm_addr_.sap.t_atm_sap_layer3.SVE_tag = (int8_t) T_ATM_ABSENT;
-
- atm_addr_.sap.t_atm_sap_appl.SVE_tag = (int8_t) T_ATM_PRESENT;
- atm_addr_.sap.t_atm_sap_appl.ID_type = (u_int8_t) T_ATM_USER_APP_ID;
-
- ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_appl.ID.user_defined_ID,
- BHLI_MAGIC,
- sizeof atm_addr_.sap.t_atm_sap_appl.ID);
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- ACE_OS::memset(( void *)&atm_addr_, 0, sizeof atm_addr_ );
- atm_addr_.satm_number.Addr[ ATM_ADDR_SIZE - 1 ] = ( char )selector;
- atm_addr_.satm_family = AF_ATM;
- atm_addr_.satm_number.AddressType = ATM_NSAP;
- atm_addr_.satm_number.NumofDigits = ATM_ADDR_SIZE;
- atm_addr_.satm_blli.Layer2Protocol = SAP_FIELD_ABSENT;
- atm_addr_.satm_blli.Layer3Protocol = SAP_FIELD_ABSENT;
- atm_addr_.satm_bhli.HighLayerInfoType = SAP_FIELD_ABSENT;
-
- // Need to know the correspondence.
- //atm_addr_.sap.t_atm_sap_appl.SVE_tag = (int8_t) T_ATM_PRESENT;
- //atm_addr_.sap.t_atm_sap_appl.ID_type = (u_int8_t) T_ATM_USER_APP_ID;
- //ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_appl.ID.user_defined_ID,
- // BHLI_MAGIC,
- // sizeof atm_addr_.sap.t_atm_sap_appl.ID);
-#else
- ACE_UNUSED_ARG (selector);
-#endif /* ACE_HAS_FORE_ATM_XTI && ACE_HAS_FORE_ATM_WS2 */
-}
-
-int
-ACE_ATM_Addr::set (const ACE_ATM_Addr &sap,
- unsigned char selector)
-{
- ACE_TRACE ("ACE_ATM_Addr::set");
-
- this->init (selector);
-
- this->ACE_Addr::base_set (sap.get_type (),
- sap.get_size ());
-
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- ACE_ASSERT (sap.get_type () == AF_ATM);
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
-
- (void) ACE_OS::memcpy ((void *) &this->atm_addr_,
- (void *) &sap.atm_addr_,
- sizeof this->atm_addr_);
- return 0;
-}
-
-int
-ACE_ATM_Addr::set (const ATM_Addr *sap,
- unsigned char selector)
-{
- ACE_TRACE ("ACE_ATM_Addr::set");
-
- this->init (selector);
-
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- this->ACE_Addr::base_set (AF_ATM,
-#else
- this->ACE_Addr::base_set (AF_UNSPEC,
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
- sizeof (*sap));
-
- (void) ACE_OS::memcpy ((void *) &this->atm_addr_,
- (void *) sap,
- sizeof this->atm_addr_);
- return 0;
-}
-
-int
-ACE_ATM_Addr::set (const ACE_TCHAR address[],
- unsigned char selector)
-{
- ACE_TRACE ("ACE_ATM_Addr::set");
- int ret;
-
- this->init (selector);
-
-#if defined (ACE_HAS_FORE_ATM_XTI)
- atm_addr_.sap.t_atm_sap_addr.SVE_tag_addr =
- (int8_t) T_ATM_PRESENT;
-#endif /* ACE_HAS_FORE_ATM_XTI */
-
- ret = this -> string_to_addr( address );
- this -> set_selector( selector );
- return ret;
-}
-
-// Transform the string into the current addressing format.
-
-int
-ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[])
-{
- ACE_TRACE ("ACE_ATM_Addr::string_to_addr");
-
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- this->ACE_Addr::base_set (AF_ATM,
-#else
- this->ACE_Addr::base_set (AF_UNSPEC,
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
- sizeof this->atm_addr_);
-#if defined (ACE_HAS_FORE_ATM_XTI)
- struct hostent *entry;
- struct atmnsap_addr *nsap;
-
- // Yow, someone gave us a NULL ATM address!
- if (sap == 0)
- {
- errno = EINVAL;
- return -1;
- }
- else if ((entry = gethostbyname_atmnsap((ACE_TCHAR *)sap)) != 0)
- {
- ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_addr.address,
- entry->h_addr_list[0],
- ATMNSAP_ADDR_LEN - 1);
- }
- else if ((nsap = atmnsap_addr (sap)) != 0)
- {
- ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_addr.address,
- nsap->atmnsap,
- ATMNSAP_ADDR_LEN);
- }
- else {
- errno = EINVAL;
- return -1;
- }
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- DWORD dwValue;
- HANDLE hLookup;
- WSAQUERYSETW qsRestrictions;
- CSADDR_INFO csaBuffer;
- WCHAR tmpWStr[100];
-
- MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, sap, -1, tmpWStr, 100);
-
- csaBuffer.LocalAddr.iSockaddrLength = sizeof (struct sockaddr_atm);
- csaBuffer.LocalAddr.lpSockaddr = (struct sockaddr *)&atm_addr_;
- csaBuffer.RemoteAddr.iSockaddrLength = sizeof (struct sockaddr_atm);
- csaBuffer.RemoteAddr.lpSockaddr = (struct sockaddr *)&atm_addr_;
-
- qsRestrictions.dwSize = sizeof (WSAQUERYSETW);
- qsRestrictions.lpszServiceInstanceName = NULL;
- qsRestrictions.lpServiceClassId = &FORE_NAME_CLASS;
- qsRestrictions.lpVersion = NULL;
- qsRestrictions.lpszComment = NULL;
- qsRestrictions.dwNameSpace = FORE_NAME_SPACE;
- qsRestrictions.lpNSProviderId = NULL;
- qsRestrictions.lpszContext = L"";
- qsRestrictions.dwNumberOfProtocols = 0;
- qsRestrictions.lpafpProtocols = NULL;
- qsRestrictions.lpszQueryString = tmpWStr;
- qsRestrictions.dwNumberOfCsAddrs = 1;
- qsRestrictions.lpcsaBuffer = &csaBuffer;
- qsRestrictions.lpBlob = NULL; //&blob;
-
- if ( ::WSALookupServiceBeginW(&qsRestrictions, LUP_RETURN_ALL, &hLookup)
- == SOCKET_ERROR) {
- ACE_OS::printf( "Error: WSALookupServiceBeginW failed! %d\n",
- ::WSAGetLastError());
- return -1;
- }
-
- dwValue = sizeof (WSAQUERYSETW);
-
- if ( ::WSALookupServiceNextW( hLookup, 0, &dwValue, &qsRestrictions)
- == SOCKET_ERROR) {
- if ( WSAGetLastError() != WSA_E_NO_MORE ) {
- ACE_OS::printf( "Error: WSALookupServiceNextW failed! %d\n",
- ::WSAGetLastError());
- return -1;
- }
- }
-
- if (WSALookupServiceEnd (hLookup) == SOCKET_ERROR) {
- ACE_OS::printf( "Error : WSALookupServiceEnd failed! %d \n",
- ::WSAGetLastError());
- errno = EINVAL;
- return -1;
- }
-#else
- ACE_UNUSED_ARG (sap);
-
- return 0;
-#endif /* ACE_HAS_FORE_ATM_XTI && ACE_HAS_FORE_ATM_WS2 */
-
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- return 0;
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
-}
-
-// Transform the current address into string format.
-
-int
-ACE_ATM_Addr::addr_to_string (ACE_TCHAR addr[],
- size_t addrlen) const
-{
- ACE_TRACE ("ACE_ATM_Addr::addr_to_string");
-
-#if defined (ACE_HAS_FORE_ATM_XTI)
- ACE_TCHAR buffer[MAXNAMELEN + 1];
- struct atmnsap_addr nsap;
- ACE_OS::memcpy (nsap.atmnsap,
- atm_addr_.sap.t_atm_sap_addr.address,
- ATMNSAP_ADDR_LEN);
- ACE_OS::sprintf (buffer,
- ACE_TEXT ("%s"),
- atmnsap_ntoa (nsap));
-
- size_t total_len = ACE_OS::strlen (buffer)
- + sizeof ('\0'); // For trailing '\0'.
-
- if (addrlen < total_len)
- return -1;
- else
- ACE_OS::strcpy(addr, buffer);
-
- return 0;
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- ACE_TCHAR buffer[MAXNAMELEN + 1];
- int i;
-
- if ( addrlen < ATM_ADDR_SIZE + 1 )
- return -1;
-
- for ( i = 0; i < ATM_ADDR_SIZE; i++ ) {
- buffer[ i * 3 ] = '\0';
- ACE_OS::sprintf( buffer, ACE_TEXT( "%s%02x." ),
- buffer,
- atm_addr_.satm_number.Addr[ i ]);
- }
-
- buffer[ ATM_ADDR_SIZE * 3 - 1 ] = '\0';
- ACE_OS::strcpy( addr, buffer );
-
- return 0;
-#else
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (addrlen);
- return -1;
-#endif /* ACE_HAS_FORE_ATM_XTI && ACE_HAS_FORE_ATM_WS2 */
-}
-
-const ACE_TCHAR *
-ACE_ATM_Addr::addr_to_string (void) const
-{
- ACE_TRACE ("ACE_ATM_Addr::addr_to_string");
-
- static ACE_TCHAR addr[MAXHOSTNAMELEN + 1];
- this->addr_to_string (addr,
- MAXHOSTNAMELEN + 1);
- return addr;
-}
-
-// Set a pointer to the address.
-void
-ACE_ATM_Addr::set_addr (void *addr, int len)
-{
- ACE_TRACE ("ACE_ATM_Addr::set_addr");
-
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- this->ACE_Addr::base_set (AF_ATM,
-#else
- this->ACE_Addr::base_set (AF_UNSPEC,
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_WS2 */
- len);
- ACE_OS::memcpy ((void *) &this->atm_addr_,
- (void *) addr, len);
-}
-
-// Compare two addresses for inequality.
-
-int
-ACE_ATM_Addr::operator != (const ACE_ATM_Addr &sap) const
-{
- ACE_TRACE ("ACE_ATM_Addr::operator !=");
- return !((*this) == sap);
-}
-
-// Compare two addresses for equality.
-
-int
-ACE_ATM_Addr::operator == (const ACE_ATM_Addr &sap) const
-{
- ACE_TRACE ("ACE_ATM_Addr::operator ==");
-
- return ACE_OS::memcmp (&atm_addr_,
- &sap.atm_addr_,
- sizeof (ATM_Addr)) == 0;
-}
-
-void
-ACE_ATM_Addr::dump (void) const
-{
- ACE_TRACE ("ACE_ATM_Addr::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_TCHAR s[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16];
- ACE_OS::sprintf (s,
- ACE_TEXT ("%s"),
- this->addr_to_string ());
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%s"), s));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// char *
-// ACE_ATM_Addr::construct_options(ACE_HANDLE fd,
-// int qos_kb,
-// int flags,
-// long *optsize)
-// {
-// #if defined (ACE_HAS_FORE_ATM_XTI)
-// struct t_opthdr *popt;
-// char *buf;
-// int qos_cells;
-// struct t_info info;
-
-// if (ACE_OS::t_getinfo (fd, &info) == -1)
-// {
-// ACE_OS::t_error ("t_getinfo");
-// return 0;
-// }
-
-// buf = (char *) ACE_OS::malloc (info.options);
-
-// if (buf == 0)
-// ACE_ERROR_RETURN ((LM_ERROR,
-// ACE_TEXT ("Unable to allocate %d bytes for options\n"),
-// info.options),
-// 0);
-
-// popt = (struct t_opthdr *) buf;
-
-// if (flags & OPT_FLAGS_CPID)
-// {
-// // This constructs the T_ATM_ORIG_ADDR option, which is used to
-// // signal the UNI 3.1 Calling Party ID Information Element.
-// t_atm_addr *source_addr;
-
-// popt->len = sizeof (struct t_opthdr) + sizeof (t_atm_addr);
-// popt->level = T_ATM_SIGNALING;
-// popt->name = T_ATM_ORIG_ADDR;
-// popt->status = 0;
-
-// source_addr =
-// (t_atm_addr *)((char *) popt + sizeof (struct t_opthdr));
-
-// source_addr->address_format = T_ATM_ENDSYS_ADDR;
-// source_addr->address_length = ATMNSAP_ADDR_LEN;
-
-// ACE_OS::memcpy(source_addr->address,
-// atm_addr_.sap.t_atm_sap_addr.address,
-// 20);
-// //if (get_local_address (fd, source_addr->address))
-// // {
-// // ACE_ERROR ((LM_ERROR,
-// // ACE_TEXT ("Can't get local address!\n")));
-// // ACE_OS::free (buf);
-// // return 0;
-// // }
-
-// popt = T_OPT_NEXTHDR (buf, info.options , popt);
-// }
-
-// // This constructs all options necessary (bearer cap., QoS, and
-// // Traffic Descriptor) to signal for a CBR connection with the
-// // specified QoS in kbit/sec., and/or specify a PMP connection.
-
-// // For FORE 200e cards, the adapter shapes traffic to CBR with rate
-// // equal to PCR CLP=0+1 (traffic.forward.PCR_all_traffic)
-
-// qos_cells = (qos_kb * 1000) / (48*8);
-
-// if ((qos_cells > 0 && qos_cells < LINE_RATE)
-// || (ACE_BIT_ENABLED (flags, OPT_FLAGS_PMP)))
-// {
-// struct t_atm_bearer *bearer;
-// struct t_atm_traffic *traffic;
-
-// // T_ATM_BEARER_CAP: Broadband bearer capability
-// popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_bearer);
-// popt->level = T_ATM_SIGNALING;
-// popt->name = T_ATM_BEARER_CAP;
-// popt->status = 0;
-
-// bearer = (struct t_atm_bearer *)((char *) popt + sizeof (struct t_opthdr));
-// bearer->bearer_class = T_ATM_CLASS_X;
-
-// if (qos_cells)
-// {
-// bearer->traffic_type = T_ATM_CBR;
-// bearer->timing_requirements = T_ATM_END_TO_END;
-// }
-// else
-// {
-// bearer->traffic_type = 0; // UBR
-// bearer->timing_requirements = 0;
-// }
-// bearer->clipping_susceptibility = T_ATM_NULL;
-
-// if (ACE_BIT_ENABLED (flags, OPT_FLAGS_PMP))
-// bearer->connection_configuration = T_ATM_1_TO_MANY;
-// else
-// bearer->connection_configuration = T_ATM_1_TO_1;
-
-// popt = T_OPT_NEXTHDR (buf, info.options, popt);
-
-// // T_ATM_TRAFFIC: traffic descriptor
-// popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_traffic);
-// popt->level = T_ATM_SIGNALING;
-// popt->name = T_ATM_TRAFFIC;
-// popt->status = 0;
-
-// traffic = (struct t_atm_traffic *)((char *) popt + sizeof (struct t_opthdr));
-
-// traffic->forward.PCR_high_priority = T_ATM_ABSENT;
-// traffic->forward.PCR_all_traffic = qos_cells ? qos_cells : LINE_RATE;
-// traffic->forward.SCR_high_priority = T_ATM_ABSENT;
-// traffic->forward.SCR_all_traffic = T_ATM_ABSENT;
-// traffic->forward.MBS_high_priority = T_ATM_ABSENT;
-// traffic->forward.MBS_all_traffic = T_ATM_ABSENT;
-// traffic->forward.tagging = T_NO;
-
-// traffic->backward.PCR_high_priority = T_ATM_ABSENT;
-// traffic->backward.PCR_all_traffic =
-// (ACE_BIT_ENABLED (flags, OPT_FLAGS_PMP))
-// ? 0 : qos_cells ? qos_cells : LINE_RATE;
-// traffic->backward.SCR_high_priority = T_ATM_ABSENT;
-// traffic->backward.SCR_all_traffic = T_ATM_ABSENT;
-// traffic->backward.MBS_high_priority = T_ATM_ABSENT;
-// traffic->backward.MBS_all_traffic = T_ATM_ABSENT;
-// traffic->backward.tagging = T_NO;
-
-// traffic->best_effort = qos_cells ? T_NO : T_YES;
-
-// popt = T_OPT_NEXTHDR (buf,
-// info.options,
-// popt);
-// }
-
-// if (qos_cells > 0 && qos_cells < LINE_RATE)
-// {
-// struct t_atm_qos *qos;
-
-// // T_ATM_QOS: Quality of Service
-// popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_qos);
-// popt->level = T_ATM_SIGNALING;
-// popt->name = T_ATM_QOS;
-// popt->status = 0;
-
-// qos = (struct t_atm_qos *)((char *) popt + sizeof (struct t_opthdr));
-// qos->coding_standard = T_ATM_ITU_CODING;
-// qos->forward.qos_class = T_ATM_QOS_CLASS_1;
-// qos->backward.qos_class = T_ATM_QOS_CLASS_1;
-
-// popt = T_OPT_NEXTHDR (buf, info.options, popt);
-// }
-
-// // return actual size of options and option buffer to user
-// *optsize = (char *) popt - buf;
-
-// return buf;
-// #elif defined (ACE_HAS_FORE_ATM_WS2)
-// // WinSock Part
-// // Unlike XTI, WinSock does QoS with a QoS class passed into
-// // connect call, so it may be better to do this in XXX_Connector
-// #else
-// ACE_UNUSED_ARG (fd);
-// ACE_UNUSED_ARG (qos_kb);
-// ACE_UNUSED_ARG (flags);
-// ACE_UNUSED_ARG (optsize);
-// return 0;
-// #endif /* ACE_HAS_FORE_ATM_XTI && ACE_HAS_FORE_ATM_WS2 */
-// }
-
diff --git a/ace/ATM_Addr.h b/ace/ATM_Addr.h
deleted file mode 100644
index 1c24b1088f2..00000000000
--- a/ace/ATM_Addr.h
+++ /dev/null
@@ -1,159 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ATM_Addr.h
-//
-// = AUTHOR
-// Joe Hoffert <joeh@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_ATM_ADDR_H
-#define ACE_ATM_ADDR_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-#include "ace/Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_FORE_ATM_XTI)
-typedef ATMSAPAddress ATM_Addr;
-#elif defined (ACE_HAS_FORE_ATM_WS2)
-#define FORE_NAME_SPACE NS_ALL
-typedef struct sockaddr_atm ATM_Addr;
-#else
-typedef int ATM_Addr;
-#endif /* ACE_HAS_FORE_ATM_XTI/ACE_HAS_FORE_ATM_WS2 */
-
-class ACE_Export ACE_ATM_Addr : public ACE_Addr
-{
- // = TITLE
- // Defines the ATM domain address family address format.
-public:
- // Constants used for ATM options
- static const long LINE_RATE;
- static const int OPT_FLAGS_CPID;
- static const int OPT_FLAGS_PMP;
- static const int DEFAULT_SELECTOR;
-
- // = Initialization methods.
- ACE_ATM_Addr (unsigned char selector = DEFAULT_SELECTOR);
- // Default constructor.
-
- ACE_ATM_Addr (const ACE_ATM_Addr &,
- unsigned char selector = DEFAULT_SELECTOR);
- // Copy constructor.
-
- ACE_ATM_Addr (const ATM_Addr *,
- unsigned char selector = DEFAULT_SELECTOR);
- // Creates an <ACE_ATM_Addr> from an ATMSAPAddress structure. This
- // is vendor specific (FORE systems). May need to change when other
- // vendors are supported.
-
- ACE_ATM_Addr (const ACE_TCHAR sap[],
- unsigned char selector = DEFAULT_SELECTOR);
- // Initializes an <ACE_ATM_Addr> from the <sap> which can be
- // "atm-address" (e.g.,
- // "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname"
- // (e.g., "frisbee.cs.wustl.edu").
-
- ~ACE_ATM_Addr (void);
- // Default dtor.
-
- // = Initialization methods (useful after object construction).
- void init (unsigned char selector = DEFAULT_SELECTOR);
- // Default initialization for non-address values (e.g.,
- // t_atm_sap_addr.SVE_tag_addr, t_atm_sap_addr.SVE_tag_selector)
-
- int set (const ACE_ATM_Addr &,
- unsigned char selector = DEFAULT_SELECTOR);
- // Initializes from another <ACE_ATM_Addr>.
-
- int set (const ATM_Addr *,
- unsigned char selector = DEFAULT_SELECTOR);
- // Initializes an <ACE_ATM_Addr> from an ATMSAPAddress/sockaddr_atm
- // structure. This is vendor specific (FORE systems). May need to
- // change when other vendors are supported.
-
- int set (const ACE_TCHAR sap[],
- unsigned char selector = DEFAULT_SELECTOR);
- // Initializes an <ACE_ATM_Addr> from the <sap> which can be
- // "atm-address" (e.g.,
- // "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname"
- // (e.g., "frisbee.cs.wustl.edu").
-
- virtual int string_to_addr (const ACE_TCHAR sap[]);
- // Initializes an <ACE_ATM_Addr> from the <sap> which can be
- // "atm-address" (e.g.,
- // "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname"
- // (e.g., "frisbee.cs.wustl.edu").
-
- virtual int addr_to_string (ACE_TCHAR addr[],
- size_t addrlen) const;
- // Return the character representation of the ATM address (e.g.,
- // "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") storing it in
- // the <addr> (which is assumed to be <addrlen> bytes long). This
- // version is reentrant. Returns -1 if the <addrlen> of the <addr>
- // is too small, else 0.
-
- const ACE_TCHAR *addr_to_string (void) const;
- // Return the character representation of the ATM address (e.g.,
- // "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00"). Returns -1
- // if the <size> of the <buffer> is too small, else 0.(This version
- // is non-reentrant since it returns a pointer to a static data
- // area.)
-
- virtual void *get_addr (void) const;
- // Return a pointer to the underlying network address.
-
- virtual void set_addr (void *, int);
- // Set a pointer to the address.
-
- unsigned char get_selector (void) const;
- // Return the selector for network address.
-
- void set_selector (unsigned char);
- // Set the selector for the network address.
-
- int operator == (const ACE_ATM_Addr &SAP) const;
- // Compare two addresses for equality. The addresses are considered
- // equal if they contain the same ATM address. Q: Is there any
- // other check for equality needed for ATM?
-
- int operator != (const ACE_ATM_Addr &SAP) const;
- // Compare two addresses for inequality.
-
- void dump (void) const;
- // Dump the state of an object.
-
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-// char *construct_options (ACE_HANDLE fd,
-// int qos_kb,
-// int flags,
-// long *optsize);
-// // Construct options for ATM connections
-
-protected:
-
-private:
- ATM_Addr atm_addr_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/ATM_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_ATM_ADDR_H */
-
diff --git a/ace/ATM_Addr.i b/ace/ATM_Addr.i
deleted file mode 100644
index 3b133b1a5aa..00000000000
--- a/ace/ATM_Addr.i
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id$
-
-// ATM_Addr.i
-
-// Default dtor.
-ACE_INLINE
-ACE_ATM_Addr::~ACE_ATM_Addr (void)
-{
-}
-
-// Return the address.
-
-ACE_INLINE void *
-ACE_ATM_Addr::get_addr (void) const
-{
- ACE_TRACE ("ACE_ATM_Addr::get_addr");
- return (void *) &this->atm_addr_;
-}
-
-ACE_INLINE unsigned char
-ACE_ATM_Addr::get_selector (void) const
-{
- ACE_TRACE ("ACE_ATM_Addr::get_selector");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- return atm_addr_.sap.t_atm_sap_addr.address[ATMNSAP_ADDR_LEN - 1];
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- return atm_addr_.satm_number.Addr[ ATM_ADDR_SIZE - 1 ];
-#else
- return 0;
-#endif /* ACE_HAS_FORE_ATM_XTI && ACE_HAS_FORE_ATM_WS2 */
-}
-
-ACE_INLINE void
-ACE_ATM_Addr::set_selector (unsigned char selector)
-{
- ACE_TRACE ("ACE_ATM_Addr::set_selector");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- atm_addr_.sap.t_atm_sap_addr.address[ATMNSAP_ADDR_LEN - 1] = selector;
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- atm_addr_.satm_number.Addr[ ATM_ADDR_SIZE - 1 ] = selector;
-#else
- ACE_UNUSED_ARG (selector);
-#endif /* ACE_HAS_FORE_ATM_XTI && ACE_HAS_FORE_ATM_WS2 */
-}
-
diff --git a/ace/ATM_Connector.cpp b/ace/ATM_Connector.cpp
deleted file mode 100644
index 07a5b77b085..00000000000
--- a/ace/ATM_Connector.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-// ATM_Connector.cpp
-// $Id$
-
-#include "ace/Handle_Set.h"
-#include "ace/ATM_Connector.h"
-
-ACE_RCSID(ace, ATM_Connector, "$Id$")
-
-#if defined (ACE_HAS_ATM)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/ATM_Connector.i"
-#endif /* __ACE_INLINE__ */
-
- ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Connector)
-
- void
-ACE_ATM_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_ATM_Connector::dump");
-}
-
-ACE_ATM_Connector::ACE_ATM_Connector (void)
-{
- ACE_TRACE ("ACE_ATM_Connector::ACE_ATM_Connector");
-}
-
-// Actively connect and produce a new ACE_ATM_Stream if things go well...
-// Connect the <new_stream> to the <remote_sap>, waiting up to
-// <timeout> amount of time if necessary.
-
-int
-ACE_ATM_Connector::connect (ACE_ATM_Stream &new_stream,
- const ACE_ATM_Addr &remote_sap,
- ACE_ATM_Params params,
- ACE_ATM_QoS options,
- ACE_Time_Value *timeout,
- const ACE_ATM_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_ATM_Connector::connect");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- return connector_.connect(new_stream.get_stream(),
- remote_sap,
- timeout,
- local_sap,
- reuse_addr,
- flags,
- perms,
- params.get_device(),
- params.get_info(),
- params.get_rw_flag(),
- params.get_user_data(),
- &options.get_qos());
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- ACE_OS::printf( "ATM_Connector(connect): set QoS parameters\n" );
-
- ACE_HANDLE s = new_stream.get_handle();
- struct sockaddr_atm *saddr = ( struct sockaddr_atm *)remote_sap.get_addr();
- ACE_QoS cqos = options.get_qos();
-
- ACE_QoS_Params qos_params = ACE_QoS_Params( 0, 0, &cqos, 0, 0 );
-
- ACE_OS::printf( "ATM_Connector(connect): connecting...\n" );
-
- int result = ACE_OS::connect( s,
- ( struct sockaddr *)saddr,
- sizeof( struct sockaddr_atm ),
- qos_params );
-
- if ( result != 0 )
- ACE_OS::printf( "ATM_Connector(connect): connection failed, %d\n",
- ::WSAGetLastError());
-
- return result;
-#else
- ACE_UNUSED_ARG (new_stream);
- ACE_UNUSED_ARG (remote_sap);
- ACE_UNUSED_ARG (params);
- ACE_UNUSED_ARG (options);
- ACE_UNUSED_ARG (timeout);
- ACE_UNUSED_ARG (local_sap);
- ACE_UNUSED_ARG (reuse_addr);
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (perms);
- return 0;
-#endif /* ACE_HAS_FORE_ATM_XTI/ACE_HAS_FORE_ATM_WS2 */
-}
-
-#endif /* ACE_HAS_ATM */
-
diff --git a/ace/ATM_Connector.h b/ace/ATM_Connector.h
deleted file mode 100644
index 7f42588a7ed..00000000000
--- a/ace/ATM_Connector.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ATM_Connector.h
-//
-// = AUTHOR
-// Joe Hoffert
-//
-// ============================================================================
-
-#ifndef ACE_ATM_CONNECTOR_H
-#define ACE_ATM_CONNECTOR_H
-#include "ace/pre.h"
-
-#include "ace/ATM_Stream.h"
-#include "ace/ATM_Params.h"
-#include "ace/ATM_QoS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_ATM)
-
-#if defined (ACE_WIN32)
-#include "SOCK_Connector.h"
-typedef ACE_SOCK_Connector ATM_Connector;
-#else
-#include "XTI_ATM_Mcast.h"
-typedef ACE_XTI_ATM_Mcast ATM_Connector;
-#endif
-
-class ACE_Export ACE_ATM_Connector
-{
- // = TITLE
- // Defines an active connection factory for the ACE_ATM C++
- // wrappers.
-public:
- // = Initialization methods.
- ACE_ATM_Connector (void);
- // Default constructor.
-
- ACE_ATM_Connector (ACE_ATM_Stream &new_stream,
- const ACE_ATM_Addr &remote_sap,
- ACE_ATM_Params params = ACE_ATM_Params(),
- ACE_ATM_QoS options = ACE_ATM_QoS(),
- ACE_Time_Value *timeout = 0,
- const ACE_ATM_Addr &local_sap = ACE_ATM_Addr( "", 0 ),
- int reuse_addr = 0,
-#if defined (ACE_WIN32)
- int flags = 0,
-#else
- int flags = O_RDWR,
-#endif /* ACE_WIN32 */
- int perms = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <params> are the parameters needed for either socket
- // or XTI/ATM connections. The <timeout> is the amount of time to
- // wait to connect. If it's 0 then we block indefinitely. If
- // *timeout == {0, 0} then the connection is done using non-blocking
- // mode. In this case, if the connection can't be made immediately
- // the value of -1 is returned with <errno == EWOULDBLOCK>. If
- // *timeout > {0, 0} then this is the amount of time to wait before
- // timing out. If the time expires before the connection is made
- // <errno == ETIME>. The <local_sap> is the value of local address
- // to bind to. If it's the default value of <ACE_ATM_Addr::sap_any> then
- // the user is letting the OS do the binding. If <reuse_addr> == 1
- // then the <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- connect (ACE_ATM_Stream &new_stream,
- const ACE_ATM_Addr &remote_sap,
- ACE_ATM_Params params = ACE_ATM_Params(),
- ACE_ATM_QoS options = ACE_ATM_QoS(),
- ACE_Time_Value *timeout = 0,
- const ACE_ATM_Addr &local_sap = ACE_ATM_Addr( "", 0 ),
- int reuse_addr = 0,
-#if defined (ACE_WIN32)
- int flags = 0,
-#else
- int flags = O_RDWR,
-#endif /* ACE_WIN32 */
- int perms = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <params> are the parameters needed for either socket
- // or XTI/ATM connections. The <timeout> is the amount of time to
- // wait to connect. If it's 0 then we block indefinitely. If
- // *timeout == {0, 0} then the connection is done using non-blocking
- // mode. In this case, if the connection can't be made immediately
- // the value of -1 is returned with <errno == EWOULDBLOCK>. If
- // *timeout > {0, 0} then this is the amount of time to wait before
- // timing out. If the time expires before the connection is made
- // <errno == ETIME>. The <local_sap> is the value of local address
- // to bind to. If it's the default value of <ACE_ATM_Addr::sap_any> then
- // the user is letting the OS do the binding. If <reuse_addr> == 1
- // then the <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- int complete (ACE_ATM_Stream &new_stream,
- ACE_ATM_Addr *remote_sap,
- ACE_Time_Value *tv);
- // Try to complete a non-blocking connection.
- // If connection completion is successful then <new_stream> contains
- // the connected ACE_SOCK_Stream. If <remote_sap> is non-NULL then it
- // will contain the address of the connected peer.
-
- //int add_leaf (ACE_ATM_Stream &current_stream,
- // const ACE_Addr &remote_sap,
- // ACE_INT32 leaf_id,
- // ACE_Time_Value *timeout = 0);
- int add_leaf (ACE_ATM_Stream &current_stream,
- const ACE_Addr &remote_sap,
- ACE_ATM_QoS &qos);
- // Actively add a leaf to the root (i.e., point-to-multipoint). The
- // <remote_sap> is the address of the leaf that we
- // are trying to add.
-
- int reset_new_handle (ACE_HANDLE handle);
- // Resets any event associations on this handle
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ATM_Connector connector_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/ATM_Connector.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_ATM */
-#include "ace/post.h"
-#endif /* ACE_ATM_CONNECTOR_H */
-
diff --git a/ace/ATM_Connector.i b/ace/ATM_Connector.i
deleted file mode 100644
index c4dafa39496..00000000000
--- a/ace/ATM_Connector.i
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ATM_Connector.i
-
-ACE_INLINE
-ACE_ATM_Connector::ACE_ATM_Connector (ACE_ATM_Stream &new_stream,
- const ACE_ATM_Addr &remote_sap,
- ACE_ATM_Params params,
- ACE_ATM_QoS options,
- ACE_Time_Value *timeout,
- const ACE_ATM_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_ATM_Connector::ACE_ATM_Connector");
- if ((ACE_HANDLE)this->connect (new_stream,
- remote_sap,
- params,
- options,
- timeout,
- local_sap,
- reuse_addr,
- flags,
- perms) == ACE_INVALID_HANDLE
- && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_ATM_Stream::ACE_ATM_Stream")));
-}
-
-// Try to complete a non-blocking connection.
-
-ACE_INLINE
-int
-ACE_ATM_Connector::complete (ACE_ATM_Stream &new_stream,
- ACE_ATM_Addr *remote_sap,
- ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_ATM_Connector::complete");
-#if defined (ACE_HAS_ATM)
- return connector_.complete(new_stream.get_stream(),
- remote_sap,
- tv);
-#else
- ACE_UNUSED_ARG(new_stream);
- ACE_UNUSED_ARG(remote_sap);
- ACE_UNUSED_ARG(tv);
- return 0;
-#endif
-}
-
-ACE_INLINE
-int
-ACE_ATM_Connector::add_leaf (ACE_ATM_Stream &current_stream,
- const ACE_Addr &remote_sap,
- ACE_ATM_QoS &qos)
-{
- ACE_TRACE ("ACE_ATM_Connector::add_leaf");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- return connector_.add_leaf(current_stream.get_stream(),
- remote_sap,
- leaf_id,
- timeout);
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- struct sockaddr_atm *saddr = (struct sockaddr_atm *)remote_sap.get_addr();
- ACE_QoS cqos = qos.get_qos();
- int addr_len = sizeof( struct sockaddr_atm );
-
- ACE_QoS_Params qos_params(0,
- 0,
- &cqos,
- 0,
- (JL_SENDER_ONLY));
-
- ACE_OS::printf( "ATM_Connector::add_leaf: connecting...\n" );
-
- ACE_HANDLE result = ACE_OS::join_leaf(current_stream.get_handle(),
- (struct sockaddr *)saddr,
- addr_len,
- qos_params);
-
- if ( result == ACE_INVALID_HANDLE )
- ACE_OS::printf( "ATM_Connector(add_leaf): connection failed, %d\n",
- ::WSAGetLastError());
-
- return (result != ACE_INVALID_HANDLE);
-#else
- ACE_UNUSED_ARG(current_stream);
- ACE_UNUSED_ARG(remote_sap);
- ACE_UNUSED_ARG(leaf_id);
- ACE_UNUSED_ARG(timeout);
- return 0;
-#endif
-}
-
-ACE_INLINE
-int
-ACE_ATM_Connector::reset_new_handle (ACE_HANDLE handle)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- // Reset the event association
- return ::WSAEventSelect ((SOCKET) handle,
- NULL,
- 0);
-#else /* !defined ACE_HAS_WINSOCK2 */
- ACE_UNUSED_ARG (handle);
- return 0;
-#endif /* ACE_WIN32 */
-}
-
diff --git a/ace/ATM_Params.cpp b/ace/ATM_Params.cpp
deleted file mode 100644
index dba4af08daf..00000000000
--- a/ace/ATM_Params.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// $Id$
-
-#include "ace/ATM_Params.h"
-
-ACE_RCSID(ace, ATM_Params, "$Id$")
-
-#if defined (ACE_HAS_ATM)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/ATM_Params.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Params)
-
-void
-ACE_ATM_Params::dump (void) const
-{
- ACE_TRACE ("ACE_ATM_Params::dump");
-}
-
-#endif /* ACE_HAS_ATM */
-
diff --git a/ace/ATM_Params.h b/ace/ATM_Params.h
deleted file mode 100644
index 3f73dd819f7..00000000000
--- a/ace/ATM_Params.h
+++ /dev/null
@@ -1,171 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ATM_Params.h
-//
-// = AUTHOR
-// Joe Hoffert <joeh@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_ATM_PARAMS_H
-#define ACE_ATM_PARAMS_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_ATM)
-
-#if defined (ACE_HAS_FORE_ATM_XTI)
-#include "ace/TLI.h"
-#define ATM_PROTOCOL_DEFAULT 0
-typedef struct t_info Param_Info;
-typedef struct netbuf Param_Udata;
-#elif defined (ACE_HAS_FORE_ATM_WS2)
-#include "ace/SOCK.h"
-#define ATM_PROTOCOL_DEFAULT ATMPROTO_AAL5
-#define ACE_XTI_ATM_DEVICE ""
-typedef int Param_Info;
-typedef int Param_Udata;
-#else
-#define ACE_XTI_ATM_DEVICE ""
-typedef int Param_Info;
-typedef int Param_Udata;
-#endif /* ACE_HAS_FORE_ATM_XTI && ACE_HAS_FORE_ATM_WS2 */
-
-class ACE_Export ACE_ATM_Params
-{
- // = TITLE
- // Wrapper class that simplifies the information passed to the ATM
- // enabled <ACE_ATM_Connector> class.
-public:
- ACE_ATM_Params (int rw_flag = 1,
- const char device[] = ACE_XTI_ATM_DEVICE,
- Param_Info *info = 0,
- Param_Udata *udata = 0,
- int oflag = O_RDWR,
- int protocol_family = AF_ATM,
- int protocol = ATM_PROTOCOL_DEFAULT,
- int type = SOCK_RAW,
- ACE_Protocol_Info *protocol_info = 0,
- ACE_SOCK_GROUP g = 0,
- u_long flags
- = ACE_FLAG_MULTIPOINT_C_ROOT
- | ACE_FLAG_MULTIPOINT_D_ROOT, // connector by default
- int reuse_addr = 0);
- // Initialize the data members. This class combines options from
- // ACE_SOCK_Connector (<protocol_family>, <protocol>, <type>,
- // <protocol_info>, <group>, and <flags>) and
- // ACE_TLI_Connector (<device>, <info>, <rw_flag>, <oflag>, and <udata>)
- // so that either mechanism can be used transparently for ATM.
-
- ~ACE_ATM_Params ();
-
- int get_protocol_family (void) const;
- void set_protocol_family (int);
- // Get/set protocol family.
-
- int get_protocol (void) const;
- void set_protocol (int);
- // Get/set protocol.
-
- int get_type (void) const;
- void set_type (int);
- // Get/set type.
-
- ACE_Protocol_Info *get_protocol_info( void );
- void set_protocol_info( ACE_Protocol_Info *);
- // Get/set protocol info.
-
- ACE_SOCK_GROUP get_sock_group( void );
- void set_sock_group( ACE_SOCK_GROUP );
- // Get/set socket group.
-
- u_long get_flags( void );
- void set_flags( u_long );
- // Get/set socket flags.
-
- int get_reuse_addr (void) const;
- void set_reuse_addr (int);
- // Get/set reuse_addr flag.
-
- const char* get_device (void) const;
- // Get device.
-
- Param_Info* get_info (void) const;
- void set_info (Param_Info *);
- // Get/set info.
-
- int get_rw_flag (void) const;
- void set_rw_flag (int);
- // Get/set r/w flag.
-
- Param_Udata* get_user_data (void) const;
- void set_user_data (Param_Udata*);
- // Get/set user data.
-
- int get_oflag (void) const;
- void set_oflag (int);
- // /set open flag.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int protocol_family_;
- // Protocol family for sockets connections.
-
- int protocol_;
- // Protocol for sockets connections.
-
- int type_;
- // Type for opening sockets.
-
- ACE_Protocol_Info *protocol_info_;
- // Information about the protocol.
-
- ACE_SOCK_GROUP group_;
- // Socket group used (for sockets only).
-
- u_long flags_;
- // Flags for sockets (for sockets only).
-
- int reuse_addr_;
- // Flag for reusing address for opening sockets.
-
- const char *device_;
- // Device name for XTI/ATM connections.
-
- Param_Info *info_;
- // Info for XTI/ATM connections.
-
- int rw_flag_;
- // R/W flag for XTI/ATM connections.
-
- Param_Udata *udata_;
- // User data for XTI/ATM connections.
-
- int oflag_;
- // Open flag for XTI/ATM connections.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/ATM_Params.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_ATM */
-#include "ace/post.h"
-#endif /* ACE_ATM_PARAMS_H */
-
diff --git a/ace/ATM_Params.i b/ace/ATM_Params.i
deleted file mode 100644
index 43bce9f0a42..00000000000
--- a/ace/ATM_Params.i
+++ /dev/null
@@ -1,224 +0,0 @@
-// $Id$
-
-// ATM_Params.i
-
-ACE_INLINE
-ACE_ATM_Params::ACE_ATM_Params (int rw_flag,
- const char device[],
- Param_Info *info,
- Param_Udata *udata,
- int oflag,
- int protocol_family,
- int protocol,
- int type,
- ACE_Protocol_Info *protocol_info,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr)
- : protocol_family_(protocol_family),
- protocol_(protocol),
- type_(type),
- protocol_info_(protocol_info),
- group_(g),
- flags_(flags),
- reuse_addr_(reuse_addr),
- device_(device),
- info_(info),
- rw_flag_(rw_flag),
- udata_(udata),
- oflag_(oflag)
-{
- ACE_TRACE ("ACE_ATM_Params::ACE_ATM_Params");
-}
-
-// Default dtor.
-ACE_INLINE
-ACE_ATM_Params::~ACE_ATM_Params (void)
-{
- ACE_TRACE ("ACE_ATM_Params::~ACE_ATM_Params");
-}
-
-ACE_INLINE
-int
-ACE_ATM_Params::get_protocol_family (void) const
-{
- ACE_TRACE ("ACE_ATM_Params::get_protocol_family");
- return protocol_family_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_protocol_family (int family)
-{
- ACE_TRACE ("ACE_ATM_Params::set_protocol_family");
- protocol_family_ = family;
-}
-
-ACE_INLINE
-int
-ACE_ATM_Params::get_protocol (void) const
-{
- ACE_TRACE ("ACE_ATM_Params::get_protocol");
- return protocol_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_protocol (int protocol)
-{
- ACE_TRACE ("ACE_ATM_Params::set_protocol");
- protocol_ = protocol;
-}
-
-ACE_INLINE
-int
-ACE_ATM_Params::get_type (void) const
-{
- ACE_TRACE ("ACE_ATM_Params::get_type");
- return type_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_type (int type)
-{
- ACE_TRACE ("ACE_ATM_Params::set_type");
- type_ = type;
-}
-
-ACE_INLINE
-ACE_Protocol_Info*
-ACE_ATM_Params::get_protocol_info( void )
-{
- ACE_TRACE ("ACE_ATM_Params::get_protocol_info");
- return protocol_info_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_protocol_info( ACE_Protocol_Info *protocol_info )
-{
- ACE_TRACE ("ACE_ATM_Params::set_protocol_info");
- protocol_info_ = protocol_info;
-}
-
-ACE_INLINE
-ACE_SOCK_GROUP
-ACE_ATM_Params::get_sock_group( void )
-{
- ACE_TRACE ("ACE_ATM_Params::get_sock_group");
- return group_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_sock_group( ACE_SOCK_GROUP g )
-{
- ACE_TRACE ("ACE_ATM_Params::set_sock_group");
- group_ = g;
-}
-
-ACE_INLINE
-u_long
-ACE_ATM_Params::get_flags( void )
-{
- ACE_TRACE ("ACE_ATM_Params::get_flags");
- return flags_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_flags( u_long flags)
-{
- ACE_TRACE ("ACE_ATM_Params::set_flags");
- flags_ = flags;
-}
-
-ACE_INLINE
-int
-ACE_ATM_Params::get_reuse_addr (void) const
-{
- ACE_TRACE ("ACE_ATM_Params::get_reuse_addr");
- return reuse_addr_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_reuse_addr (int reuse_addr)
-{
- ACE_TRACE ("ACE_ATM_Params::set_reuse_addr");
- reuse_addr_ = reuse_addr;
-}
-
-ACE_INLINE
-const char*
-ACE_ATM_Params::get_device (void) const
-{
- ACE_TRACE ("ACE_ATM_Params::get_device");
- return device_;
-}
-
-ACE_INLINE
-Param_Info*
-ACE_ATM_Params::get_info (void) const
-{
- ACE_TRACE ("ACE_ATM_Params::get_info");
- return info_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_info (Param_Info* info)
-{
- ACE_TRACE ("ACE_ATM_Params::set_info");
- info_ = info;
-}
-
-ACE_INLINE
-int
-ACE_ATM_Params::get_rw_flag (void) const
-{
- ACE_TRACE ("ACE_ATM_Params::get_rw_flag");
- return rw_flag_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_rw_flag (int rw_flag)
-{
- ACE_TRACE ("ACE_ATM_Params::set_rw_flag");
- rw_flag_ = rw_flag;
-}
-
-ACE_INLINE
-Param_Udata*
-ACE_ATM_Params::get_user_data (void) const
-{
- ACE_TRACE ("ACE_ATM_Params::get_user_data");
- return udata_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_user_data (Param_Udata *udata)
-{
- ACE_TRACE ("ACE_ATM_Params::set_user_data");
- udata_ = udata;
-}
-
-ACE_INLINE
-int
-ACE_ATM_Params::get_oflag (void) const
-{
- ACE_TRACE ("ACE_ATM_Params::get_oflag");
- return oflag_;
-}
-
-ACE_INLINE
-void
-ACE_ATM_Params::set_oflag (int oflag)
-{
- ACE_TRACE ("ACE_ATM_Params::set_oflag");
- oflag_ = oflag;
-}
-
diff --git a/ace/ATM_QoS.cpp b/ace/ATM_QoS.cpp
deleted file mode 100644
index b28e5b7e1d7..00000000000
--- a/ace/ATM_QoS.cpp
+++ /dev/null
@@ -1,565 +0,0 @@
-// $Id$
-
-#include "ace/ATM_QoS.h"
-
-ACE_RCSID(ace, ATM_QoS, "$Id$")
-
-#if defined (ACE_HAS_ATM)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/ATM_QoS.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
-#define BHLI_MAGIC "FORE_ATM"
- // This is line rate in cells/s for an OC-3 MM interface.
- const long ACE_ATM_QoS::LINE_RATE = 353207;
-const int ACE_ATM_QoS::OPT_FLAGS_CPID = 0x1;
-const int ACE_ATM_QoS::OPT_FLAGS_PMP = 0x2;
-const int ACE_ATM_QoS::DEFAULT_SELECTOR = 0x99;
-#else
-const long ACE_ATM_QoS::LINE_RATE = 0L;
-const int ACE_ATM_QoS::OPT_FLAGS_CPID = 0;
-const int ACE_ATM_QoS::OPT_FLAGS_PMP = 0;
-const int ACE_ATM_QoS::DEFAULT_SELECTOR = 0x0;
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_ATM_QoS)
-
- ACE_ATM_QoS::ACE_ATM_QoS( int rate )
-{
- ACE_TRACE( "ACE_ATM_QoS::ACE_ATM_QoS" );
-#if defined (ACE_HAS_FORE_ATM_WS2)
- AAL_PARAMETERS_IE ie_aalparams;
- ATM_TRAFFIC_DESCRIPTOR_IE ie_td;
- ATM_BROADBAND_BEARER_CAPABILITY_IE ie_bbc;
- ATM_QOS_CLASS_IE ie_qos;
- Q2931_IE *ie_ptr;
- int size;
-
- // Setting up cbr parameters ...
- ie_aalparams.AALType = AALTYPE_5;
- ie_aalparams.AALSpecificParameters.AAL5Parameters.ForwardMaxCPCSSDUSize
- = 1516; //8096;
- ie_aalparams.AALSpecificParameters.AAL5Parameters.BackwardMaxCPCSSDUSize
- = 1516; //8096;
- ie_aalparams.AALSpecificParameters.AAL5Parameters.Mode = AAL5_MODE_MESSAGE;
- ie_aalparams.AALSpecificParameters.AAL5Parameters.SSCSType = AAL5_SSCS_NULL;
-
- size = sizeof(Q2931_IE_TYPE) + sizeof(ULONG) + sizeof(AAL_PARAMETERS_IE);
-
- ie_td.Forward.PeakCellRate_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Forward.PeakCellRate_CLP01 = rate;
- ie_td.Forward.SustainableCellRate_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Forward.SustainableCellRate_CLP01 = SAP_FIELD_ABSENT;
- ie_td.Forward.MaxBurstSize_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Forward.MaxBurstSize_CLP01 = SAP_FIELD_ABSENT;
- ie_td.Forward.Tagging = SAP_FIELD_ABSENT;
-
- ie_td.Backward.PeakCellRate_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Backward.PeakCellRate_CLP01 = rate;
- ie_td.Backward.SustainableCellRate_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Backward.SustainableCellRate_CLP01 = SAP_FIELD_ABSENT;
- ie_td.Backward.MaxBurstSize_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Backward.MaxBurstSize_CLP01 = SAP_FIELD_ABSENT;
- ie_td.Backward.Tagging = SAP_FIELD_ABSENT;
-
- ie_td.BestEffort = 0; // Note: this must be set to zero for CBR.
-
- size += sizeof( Q2931_IE_TYPE )
- + sizeof( ULONG )
- + sizeof( ATM_TRAFFIC_DESCRIPTOR_IE );
-
- ie_bbc.BearerClass = BCOB_X;
- ie_bbc.TrafficType = TT_CBR;
- ie_bbc.TimingRequirements = TR_END_TO_END;
- ie_bbc.ClippingSusceptability = CLIP_NOT;
- ie_bbc.UserPlaneConnectionConfig = UP_P2P;
-
- size += sizeof( Q2931_IE_TYPE )
- + sizeof( ULONG )
- + sizeof( ATM_BROADBAND_BEARER_CAPABILITY_IE );
-
- ie_qos.QOSClassForward = QOS_CLASS1;
- ie_qos.QOSClassBackward = QOS_CLASS1; // This may not be really used
- // since we do only simplex data xfer.
-
- size += sizeof(Q2931_IE_TYPE) + sizeof(ULONG) + sizeof(ATM_QOS_CLASS_IE);
-
- qos_.ProviderSpecific.buf = (char *) ACE_OS::malloc(size);
- qos_.ProviderSpecific.len = size;
- ACE_OS::memset(qos_.ProviderSpecific.buf, 0, size);
-
- ie_ptr = (Q2931_IE *) qos_.ProviderSpecific.buf;
- ie_ptr->IEType = IE_AALParameters;
- ie_ptr->IELength = sizeof( Q2931_IE_TYPE )
- + sizeof( ULONG )
- + sizeof( AAL_PARAMETERS_IE );
- ACE_OS::memcpy(ie_ptr->IE, &ie_aalparams, sizeof(AAL_PARAMETERS_IE));
-
- ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength);
- ie_ptr->IEType = IE_TrafficDescriptor;
- ie_ptr->IELength = sizeof( Q2931_IE_TYPE )
- + sizeof( ULONG )
- + sizeof( ATM_TRAFFIC_DESCRIPTOR_IE );
- ACE_OS::memcpy(ie_ptr->IE, &ie_td, sizeof(ATM_TRAFFIC_DESCRIPTOR_IE));
-
- ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength);
- ie_ptr->IEType = IE_BroadbandBearerCapability;
- ie_ptr->IELength = sizeof( Q2931_IE_TYPE )
- + sizeof( ULONG )
- + sizeof( ATM_BROADBAND_BEARER_CAPABILITY_IE );
- ACE_OS::memcpy(ie_ptr->IE,
- &ie_bbc,
- sizeof(ATM_BROADBAND_BEARER_CAPABILITY_IE));
-
- ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength);
- ie_ptr->IEType = IE_QOSClass;
- ie_ptr->IELength = sizeof( Q2931_IE_TYPE )
- + sizeof( ULONG )
- + sizeof( ATM_QOS_CLASS_IE );
- ACE_OS::memcpy(ie_ptr->IE, &ie_qos, sizeof(ATM_QOS_CLASS_IE));
-
- // qos_.SendingFlowspec.TokenRate = 0xffffffff;
- // qos_.SendingFlowspec.TokenBucketSize = 0xffffffff;
- // qos_.SendingFlowspec.PeakBandwidth = 0xffffffff;
- // qos_.SendingFlowspec.Latency = 0xffffffff;
- // qos_.SendingFlowspec.DelayVariation = 0xffffffff;
- // qos_.SendingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT;
- // This will most probably be ignored by the service provider.
- // qos_.SendingFlowspec.MaxSduSize = 0xffffffff;
- // qos_.SendingFlowspec.MinimumPolicedSize = 0xffffffff;
-
- // qos_.ReceivingFlowspec.TokenRate = 0xffffffff;
- // qos_.ReceivingFlowspec.TokenBucketSize = 0xffffffff;
- // qos_.ReceivingFlowspec.PeakBandwidth = 0xffffffff;
- // qos_.ReceivingFlowspec.Latency = 0xffffffff;
- // qos_.ReceivingFlowspec.DelayVariation = 0xffffffff;
- // qos_.ReceivingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT;
- // This will most probably be ignored by the service provider.
- // qos_.ReceivingFlowspec.MaxSduSize = 0xffffffff;
- // qos_.ReceivingFlowspec.MinimumPolicedSize = 0;
-
- ACE_Flow_Spec send_fspec( 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- SERVICETYPE_BESTEFFORT,
- // This will most probably ignored by SP.
- 0xffffffff,
- 0xffffffff,
- 15,
- ACE_DEFAULT_THREAD_PRIORITY ),
- recv_fspec( 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- SERVICETYPE_BESTEFFORT,
- // This will most probably ignored by SP.
- 0xffffffff,
- 0,
- 15,
- ACE_DEFAULT_THREAD_PRIORITY );
-
- qos_.sending_flowspec( send_fspec );
- qos_.receiving_flowspec( recv_fspec );
-#elif defined (ACE_HAS_FORE_ATM_XTI)
- ACE_UNUSED_ARG (rate);
-#else
- ACE_UNUSED_ARG (rate);
-#endif /* ACE_HAS_FORE_ATM_WS2 */
-}
-
-void
-ACE_ATM_QoS::set_cbr_rate (int rate)
-{
- ACE_TRACE ("ACE_ATM_QoS::set_cbr_rate");
-#if defined (ACE_HAS_FORE_ATM_WS2)
- /*
- AAL_PARAMETERS_IE ie_aalparams;
- ATM_TRAFFIC_DESCRIPTOR_IE ie_td;
- ATM_BROADBAND_BEARER_CAPABILITY_IE ie_bbc;
- ATM_QOS_CLASS_IE ie_qos;
- Q2931_IE *ie_ptr;
- int size;
- */
-
- ACE_OS::printf( "ATM_QoS(set_cbr_rate): set rate to %d c/s\n", rate );
-
- // Setting up cbr parameters ...
- /*
- FORE has changed this - we no longer specify QoS this way
- ie_aalparams.AALType = AALTYPE_5;
- ie_aalparams.AALSpecificParameters.AAL5Parameters.ForwardMaxCPCSSDUSize
- = 1516; //8096;
- ie_aalparams.AALSpecificParameters.AAL5Parameters.BackwardMaxCPCSSDUSize
- = 1516; //8096;
- ie_aalparams.AALSpecificParameters.AAL5Parameters.Mode = AAL5_MODE_MESSAGE;
- ie_aalparams.AALSpecificParameters.AAL5Parameters.SSCSType = AAL5_SSCS_NULL;
-
- size = sizeof(Q2931_IE_TYPE) + sizeof(ULONG) + sizeof(AAL_PARAMETERS_IE);
-
- ie_td.Forward.PeakCellRate_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Forward.PeakCellRate_CLP01 = rate;
- ie_td.Forward.SustainableCellRate_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Forward.SustainableCellRate_CLP01 = SAP_FIELD_ABSENT;
- ie_td.Forward.MaxBurstSize_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Forward.MaxBurstSize_CLP01 = SAP_FIELD_ABSENT;
- ie_td.Forward.Tagging = SAP_FIELD_ABSENT;
-
- ie_td.Backward.PeakCellRate_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Backward.PeakCellRate_CLP01 = rate;
- ie_td.Backward.SustainableCellRate_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Backward.SustainableCellRate_CLP01 = SAP_FIELD_ABSENT;
- ie_td.Backward.MaxBurstSize_CLP0 = SAP_FIELD_ABSENT;
- ie_td.Backward.MaxBurstSize_CLP01 = SAP_FIELD_ABSENT;
- ie_td.Backward.Tagging = SAP_FIELD_ABSENT;
-
- ie_td.BestEffort = 0; // Note: this must be set to zero for CBR.
-
- size += sizeof( Q2931_IE_TYPE ) +
- sizeof( ULONG ) +
- sizeof( ATM_TRAFFIC_DESCRIPTOR_IE );
-
- ie_bbc.BearerClass = BCOB_X;
- ie_bbc.TrafficType = TT_CBR;
- ie_bbc.TimingRequirements = TR_END_TO_END;
- ie_bbc.ClippingSusceptability = CLIP_NOT;
- ie_bbc.UserPlaneConnectionConfig = UP_P2P;
-
- size += sizeof(Q2931_IE_TYPE) +
- sizeof(ULONG) +
- sizeof(ATM_BROADBAND_BEARER_CAPABILITY_IE);
-
- ie_qos.QOSClassForward = QOS_CLASS1;
- ie_qos.QOSClassBackward = QOS_CLASS1; // This may not be really used
- // since we only simplex data xfer.
-
- size += sizeof(Q2931_IE_TYPE) + sizeof(ULONG) + sizeof(ATM_QOS_CLASS_IE);
-
- qos_.ProviderSpecific.buf = (char *) ACE_OS::malloc(size);
- qos_.ProviderSpecific.len = size;
- ACE_OS::memset(qos_.ProviderSpecific.buf, 0, size);
-
- ie_ptr = (Q2931_IE *) qos_.ProviderSpecific.buf;
- ie_ptr->IEType = IE_AALParameters;
- ie_ptr->IELength = sizeof( Q2931_IE_TYPE ) +
- sizeof( ULONG ) +
- sizeof( AAL_PARAMETERS_IE );
- ACE_OS::memcpy(ie_ptr->IE, &ie_aalparams, sizeof(AAL_PARAMETERS_IE));
-
- ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength);
- ie_ptr->IEType = IE_TrafficDescriptor;
- ie_ptr->IELength = sizeof( Q2931_IE_TYPE ) +
- sizeof( ULONG ) +
- sizeof( ATM_TRAFFIC_DESCRIPTOR_IE );
- ACE_OS::memcpy(ie_ptr->IE, &ie_td, sizeof(ATM_TRAFFIC_DESCRIPTOR_IE));
-
- ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength);
- ie_ptr->IEType = IE_BroadbandBearerCapability;
- ie_ptr->IELength = sizeof( Q2931_IE_TYPE ) +
- sizeof( ULONG ) +
- sizeof( ATM_BROADBAND_BEARER_CAPABILITY_IE );
- ACE_OS::memcpy( ie_ptr->IE,
- &ie_bbc,
- sizeof( ATM_BROADBAND_BEARER_CAPABILITY_IE ));
-
- ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength);
- ie_ptr->IEType = IE_QOSClass;
- ie_ptr->IELength = sizeof(Q2931_IE_TYPE) + sizeof(ULONG) +
- sizeof(ATM_QOS_CLASS_IE);
- ACE_OS::memcpy(ie_ptr->IE, &ie_qos, sizeof(ATM_QOS_CLASS_IE));
- */
-
- const int BYTES_PER_ATM_CELL = 53;
- ACE_OS::memset(&qos_, 0, sizeof(ATM_QoS));
- // Setting the token rate sets the minimum rate. 3 Mbits/sec seems too high.
- // Certainly for Vaudeville audio, we only need about 1000 c/s which is
- // 424000 bits/sec which is 53000 bytes/sec.
- //qos_.SendingFlowspec.TokenRate = 3*(1024*128); // 3Mbits/sec
- qos_.SendingFlowspec.TokenRate = 53000; // 1000 cells/sec
- qos_.SendingFlowspec.TokenBucketSize = 32*1024; // our block size
- //ourQos.SendingFlowspec.PeakBandwidth = ourQos.SendingFlowspec.TokenRate;
- qos_.SendingFlowspec.ServiceType = SERVICETYPE_GUARANTEED;
- // Peak bandwidth is in bytes/sec. The rate is specified in cells/sec so
- // we need to convert from cells/sec to bytes/sec (i.e., multiply by 53).
- qos_.SendingFlowspec.PeakBandwidth = rate * BYTES_PER_ATM_CELL;
- qos_.SendingFlowspec.Latency = -1; // we don't care too much
- qos_.SendingFlowspec.DelayVariation = -1; // we don't care too much
- // no provider-specific data allowed on ATM
- qos_.ProviderSpecific.buf=NULL;
- qos_.ProviderSpecific.len=0;
- // unidirectional P2MP; we don't need to setup the Receiving flowspec
-
- //qos_.SendingFlowspec.TokenRate = 0xffffffff;
- //qos_.SendingFlowspec.TokenBucketSize = 0xffffffff;
- //qos_.SendingFlowspec.PeakBandwidth = 0xffffffff;
- //qos_.SendingFlowspec.Latency = 0xffffffff;
- //qos_.SendingFlowspec.DelayVariation = 0xffffffff;
- //qos_.SendingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT;
- // This will most probably be ignored by the service provider.
- //qos_.SendingFlowspec.MaxSduSize = 0xffffffff;
- //qos_.SendingFlowspec.MinimumPolicedSize = 0xffffffff;
-
- //qos_.ReceivingFlowspec.TokenRate = 0xffffffff;
- //qos_.ReceivingFlowspec.TokenBucketSize = 0xffffffff;
- //qos_.ReceivingFlowspec.PeakBandwidth = 0xffffffff;
- //qos_.ReceivingFlowspec.Latency = 0xffffffff;
- //qos_.ReceivingFlowspec.DelayVariation = 0xffffffff;
- //qos_.ReceivingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT;
- // This will most probably be ignored by the service provider.
- //qos_.ReceivingFlowspec.MaxSduSize = 0xffffffff;
- //qos_.ReceivingFlowspec.MinimumPolicedSize = 0;
-
- /*
- ACE_Flow_Spec send_fspec( 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- SERVICETYPE_BESTEFFORT,
- // This will most probably ignored by SP.
- 0xffffffff,
- 0xffffffff,
- 15,
- ACE_DEFAULT_THREAD_PRIORITY ),
- recv_fspec( 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- 0xffffffff,
- SERVICETYPE_BESTEFFORT,
- // This will most probably ignored by SP.
- 0xffffffff,
- 0,
- 15,
- ACE_DEFAULT_THREAD_PRIORITY );
-
- qos_.sending_flowspec( send_fspec );
- qos_.receiving_flowspec( recv_fspec );
- */
-#elif defined (ACE_HAS_FORE_ATM_XTI)
- ACE_UNUSED_ARG (rate);
-#else
- ACE_UNUSED_ARG (rate);
-#endif /* ACE_HAS_FORE_ATM_WS2 */
-}
-
-void
-ACE_ATM_QoS::dump (void) const
-{
- ACE_TRACE ("ACE_ATM_QoS::dump");
-}
-
-void
-ACE_ATM_QoS::set_rate (ACE_HANDLE fd,
- int rate,
- int flags)
-{
- ACE_TRACE ("ACE_ATM_QoS::set_rate");
-#if defined (ACE_HAS_FORE_ATM_WS2)
- set_cbr_rate( rate );
-
- ACE_UNUSED_ARG( fd );
- ACE_UNUSED_ARG( flags );
-#elif defined (ACE_HAS_FORE_ATM_XTI)
- long optlen = 0;
- qos_.buf = construct_options(fd,
- rate,
- flags,
- &optlen);
- qos_.len = optlen;
-#else
- ACE_UNUSED_ARG (rate);
-#endif /* ACE_HAS_FORE_ATM_WS2 */
-}
-
-char*
-ACE_ATM_QoS::construct_options (ACE_HANDLE fd,
- int rate,
- int flags,
- long *len)
-{
-#if defined (ACE_HAS_FORE_ATM_WS2)
- ACE_UNUSED_ARG (fd);
- ACE_UNUSED_ARG (rate);
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (len);
- return (0);
-#elif defined (ACE_HAS_FORE_ATM_XTI)
- struct t_opthdr *popt;
- char *buf;
- int qos_cells;
- struct t_info info;
-
- if (ACE_OS::t_getinfo (fd, &info) == -1)
- {
- ACE_OS::t_error ("t_getinfo");
- return 0;
- }
-
- buf = (char *) ACE_OS::malloc (info.options);
-
- if (buf == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unable to allocate %d bytes for options\n"),
- info.options),
- 0);
-
- popt = (struct t_opthdr *) buf;
-
- if (flags & OPT_FLAGS_CPID)
- {
- // This constructs the T_ATM_ORIG_ADDR option, which is used to
- // signal the UNI 3.1 Calling Party ID Information Element.
- t_atm_addr *source_addr;
-
- popt->len = sizeof (struct t_opthdr) + sizeof (t_atm_addr);
- popt->level = T_ATM_SIGNALING;
- popt->name = T_ATM_ORIG_ADDR;
- popt->status = 0;
-
- source_addr =
- (t_atm_addr *)((char *) popt + sizeof (struct t_opthdr));
-
- source_addr->address_format = T_ATM_ENDSYS_ADDR;
- source_addr->address_length = ATMNSAP_ADDR_LEN;
-
- ATMSAPAddress local_addr;
- struct t_bind boundaddr;
-
- boundaddr.addr.maxlen = sizeof(local_addr);
- boundaddr.addr.buf = (char *) &local_addr;
-
- //if (ACE_OS::t_getprotaddr(fd, &boundaddr, NULL) < 0) {
- if (ACE_OS::t_getname(fd,
- &boundaddr.addr,
- LOCALNAME) < 0)
- {
- ACE_OS::t_error("t_getname (local_address)");
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Can't get local address!\n")));
- ACE_OS::free (buf);
- return 0;
- }
-
- ACE_OS::memcpy(source_addr->address,
- local_addr.sap.t_atm_sap_addr.address,
- ATMNSAP_ADDR_LEN);
-
- popt = T_OPT_NEXTHDR (buf, info.options , popt);
- }
-
- // This constructs all options necessary (bearer cap., QoS, and
- // Traffic Descriptor) to signal for a CBR connection with the
- // specified QoS in kbit/sec., and/or specify a PMP connection.
-
- // For FORE 200e cards, the adapter shapes traffic to CBR with rate
- // equal to PCR CLP=0+1 (traffic.forward.PCR_all_traffic)
-
- qos_cells = (rate * 1000) / (48*8);
-
- if ((qos_cells > 0 && qos_cells < LINE_RATE)
- || (ACE_BIT_ENABLED (flags, OPT_FLAGS_PMP)))
- {
- struct t_atm_bearer *bearer;
- struct t_atm_traffic *traffic;
-
- // T_ATM_BEARER_CAP: Broadband bearer capability
- popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_bearer);
- popt->level = T_ATM_SIGNALING;
- popt->name = T_ATM_BEARER_CAP;
- popt->status = 0;
-
- bearer = (struct t_atm_bearer *)((char *) popt +
- sizeof (struct t_opthdr));
- bearer->bearer_class = T_ATM_CLASS_X;
-
- if (qos_cells)
- {
- bearer->traffic_type = T_ATM_CBR;
- bearer->timing_requirements = T_ATM_END_TO_END;
- }
- else
- {
- bearer->traffic_type = 0; // UBR
- bearer->timing_requirements = 0;
- }
- bearer->clipping_susceptibility = T_ATM_NULL;
-
- if (ACE_BIT_ENABLED (flags, OPT_FLAGS_PMP))
- bearer->connection_configuration = T_ATM_1_TO_MANY;
- else
- bearer->connection_configuration = T_ATM_1_TO_1;
-
- popt = T_OPT_NEXTHDR (buf, info.options, popt);
-
- // T_ATM_TRAFFIC: traffic descriptor
- popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_traffic);
- popt->level = T_ATM_SIGNALING;
- popt->name = T_ATM_TRAFFIC;
- popt->status = 0;
-
- traffic = (struct t_atm_traffic *)((char *) popt +
- sizeof (struct t_opthdr));
-
- traffic->forward.PCR_high_priority = T_ATM_ABSENT;
- traffic->forward.PCR_all_traffic = qos_cells ? qos_cells : LINE_RATE;
- traffic->forward.SCR_high_priority = T_ATM_ABSENT;
- traffic->forward.SCR_all_traffic = T_ATM_ABSENT;
- traffic->forward.MBS_high_priority = T_ATM_ABSENT;
- traffic->forward.MBS_all_traffic = T_ATM_ABSENT;
- traffic->forward.tagging = T_NO;
-
- traffic->backward.PCR_high_priority = T_ATM_ABSENT;
- traffic->backward.PCR_all_traffic =
- (ACE_BIT_ENABLED (flags, OPT_FLAGS_PMP))
- ? 0 : qos_cells ? qos_cells : LINE_RATE;
- traffic->backward.SCR_high_priority = T_ATM_ABSENT;
- traffic->backward.SCR_all_traffic = T_ATM_ABSENT;
- traffic->backward.MBS_high_priority = T_ATM_ABSENT;
- traffic->backward.MBS_all_traffic = T_ATM_ABSENT;
- traffic->backward.tagging = T_NO;
-
- traffic->best_effort = qos_cells ? T_NO : T_YES;
-
- popt = T_OPT_NEXTHDR (buf,
- info.options,
- popt);
- }
-
- if (qos_cells > 0 && qos_cells < LINE_RATE)
- {
- struct t_atm_qos *qos;
-
- // T_ATM_QOS: Quality of Service
- popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_qos);
- popt->level = T_ATM_SIGNALING;
- popt->name = T_ATM_QOS;
- popt->status = 0;
-
- qos = (struct t_atm_qos *)((char *) popt + sizeof (struct t_opthdr));
- qos->coding_standard = T_ATM_ITU_CODING;
- qos->forward.qos_class = T_ATM_QOS_CLASS_1;
- qos->backward.qos_class = T_ATM_QOS_CLASS_1;
-
- popt = T_OPT_NEXTHDR (buf, info.options, popt);
- }
-
- // Return actual size of options and option buffer to user.
- *len = (char *) popt - buf;
-
- return buf;
-#else
- ACE_UNUSED_ARG (fd);
- ACE_UNUSED_ARG (rate);
- ACE_UNUSED_ARG (flag);
- ACE_UNUSED_ARG (len);
- return (0);
-#endif /* ACE_HAS_FORE_ATM_WS2 */
-}
-
-#endif /* ACE_HAS_ATM */
-
diff --git a/ace/ATM_QoS.h b/ace/ATM_QoS.h
deleted file mode 100644
index ed3a1eceb1f..00000000000
--- a/ace/ATM_QoS.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ATM_QoS.h
-//
-// = AUTHOR
-// Joe Hoffert
-//
-// ============================================================================
-
-#ifndef ACE_ATM_QoS_H
-#define ACE_ATM_QoS_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined(ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_ATM)
-
-#if defined (ACE_HAS_FORE_ATM_WS2)
-// just map to WS2 GQOS struct
-typedef ACE_QoS ATM_QoS;
-#elif defined (ACE_HAS_FORE_ATM_XTI)
-typedef struct netbuf ATM_QoS;
-#else
-typedef int ATM_QoS;
-#endif /* ACE_HAS_FORE_ATM_WS2 */
-
-class ACE_Export ACE_ATM_QoS
-{
- // = TITLE
- // Define the QoS parameters for ATM
- //
- // = DESCRIPTION
- // This class wraps up QoS parameters for both ATM/XTI and
- // ATM/WinSock2 to make the mechanism for the ATM protocol
- // transparent.
-public:
- // Constants used for ATM options
- static const long LINE_RATE;
- static const int OPT_FLAGS_CPID;
- static const int OPT_FLAGS_PMP;
- static const int DEFAULT_SELECTOR;
-
- // = Initializattion and termination methods.
- ACE_ATM_QoS ();
- // Default constructor.
-
- ACE_ATM_QoS( int );
- // Constructor with a CBR rate.
-
- ~ACE_ATM_QoS ();
-
- void set_rate (ACE_HANDLE,
- int,
- int);
- // Set the rate.
-
- void set_cbr_rate (int);
- // Set CBR rate in cells per second.
-
- ATM_QoS get_qos (void);
- // Get ATM_QoS struct.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- char* construct_options(ACE_HANDLE,
- int,
- int,
- long*);
- // Construct QoS options.
-
-private:
- ATM_QoS qos_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/ATM_QoS.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_ATM */
-#include "ace/post.h"
-#endif /* ACE_ATM_QoS_H */
-
diff --git a/ace/ATM_QoS.i b/ace/ATM_QoS.i
deleted file mode 100644
index ae38282fa44..00000000000
--- a/ace/ATM_QoS.i
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id$
-
-// ATM_QoS.i
-
-ACE_INLINE
-ACE_ATM_QoS::ACE_ATM_QoS ()
-{
- ACE_TRACE ("ACE_ATM_QoS::ACE_ATM_QoS");
-}
-
-ACE_INLINE
-ACE_ATM_QoS::~ACE_ATM_QoS ()
-{
- ACE_TRACE ("ACE_ATM_QoS::~ACE_ATM_QoS");
-}
-
-ACE_INLINE
-ATM_QoS
-ACE_ATM_QoS::get_qos (void)
-{
- ACE_TRACE ("ACE_ATM_QoS::get_qos");
- return qos_;
-}
diff --git a/ace/ATM_Stream.cpp b/ace/ATM_Stream.cpp
deleted file mode 100644
index 07f0eaadf8e..00000000000
--- a/ace/ATM_Stream.cpp
+++ /dev/null
@@ -1,231 +0,0 @@
-// $Id$
-
-/* Defines the member functions for the base class of the ACE_ATM_Stream
- abstraction. */
-
-#include "ace/ATM_Stream.h"
-
-ACE_RCSID(ace, ATM_Stream, "$Id$")
-
-#if defined (ACE_HAS_ATM)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/ATM_Stream.i"
-#endif /* __ACE_INLINE__ */
-
- ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Stream)
-
- void
-ACE_ATM_Stream::dump (void) const
-{
- ACE_TRACE ("ACE_ATM_Stream::dump");
-}
-
-char*
-ACE_ATM_Stream::get_peer_name (void) const
-{
- ACE_TRACE ("ACE_ATM_Stream::get_peer_name");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- // // Use t_getprotaddr for XTI/ATM
- // struct t_bind *localaddr
- // = (struct t_bind *) ACE_OS::t_alloc (get_handle (),
- // T_BIND,
- // T_ADDR);
- // struct t_bind *peeraddr
- // = (struct t_bind *) ACE_OS::t_alloc (get_handle (),
- // T_BIND,
- // T_ADDR);
- // ::t_getprotaddr(get_handle (),
- // localaddr,
- // peeraddr);
-
- // char* connected_name = (char*) ACE_OS::malloc(peeraddr->addr.len + 1);
- // ACE_OS::strcpy(connected_name,
- // peeraddr->addr.buf);
- // ACE_OS::t_free ((char *) localaddr,
- // T_BIND);
- // ACE_OS::t_free ((char *) peeraddr,
- // T_BIND);
- // return (connected_name);
-
-#error "This doesn't seem to work. May need to jimmy-rig something with the"
-#error "/etc/xti_hosts file - Ugh!"
-
- ACE_ATM_Addr sa;
- struct netbuf name;
- name.maxlen = sa.get_size ();
- name.buf = (char *) sa.get_addr ();
- ACE_OS::t_getname (this->get_handle (), &name, REMOTENAME);
- // ACE_OS::ioctl (this->get_handle (),
- // TI_GETPEERNAME,
- // &name);
- return (name.buf);
-
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- // Use getpeername for WinSock2.
- struct sockaddr_atm name;
- ACE_OS::memset(&name, 0, sizeof(name));
- int nameSize = sizeof(name);
-
- if (ACE_OS::getpeername(this->get_handle (),
- (struct sockaddr *) &name,
- &nameSize) != 0)
- {
- return 0;
- }
-
- char buffer[256];
- for (unsigned int index = 0; index < ATM_ADDR_SIZE - 1; index++ ) {
- buffer[ index * 3 ] = '\0';
- sprintf(buffer, "%s%02x.", buffer, name.satm_number.Addr[ index ]);
- }
- buffer[ (ATM_ADDR_SIZE - 1) * 3 ] = '\0';
- sprintf(buffer, "%s%02x.", buffer, 0);
- buffer[ ATM_ADDR_SIZE * 3 - 1 ] = '\0';
- for (index = 0; index < ACE_OS::strlen(buffer); ++index)
- buffer[index] = tolower(buffer[index]);
-
- ifstream atm_hosts("C:/WINNT/atmhosts");
- assert(atm_hosts.is_open());
-
- // Find the host address in the ATM hosts file and return the
- // host name
- char line[256];
- char *host_ptr, *host_name = new char[256];
- while (!atm_hosts.eof()) {
- atm_hosts.getline(line, 256);
- // Convert the line to lower case to ease comparison
- for (index = 0; index < ACE_OS::strlen(line); ++index)
- line[index] = tolower(line[index]);
- if (strstr(line, buffer) != 0)
- {
- // Grab the second token which is the host name
- strtok(line, " \t");
- host_ptr = strtok(0, " \t");
- strcpy(host_name, host_ptr);
- break;
- }
- }
-
- return host_name;
-#else
- return 0;
-#endif /* ACE_HAS_FORE_ATM_XTI */
-}
-
-ACE_HANDLE
-ACE_ATM_Stream::get_handle (void) const
-{
- ACE_TRACE ("ACE_ATM_Stream::get_handle");
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- return stream_.get_handle ();
-#else
- return 0;
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
-}
-
-int
-ACE_ATM_Stream::get_vpi_vci (ACE_UINT16 &vpi,
- ACE_UINT16 &vci) const
-{
- ACE_TRACE ("ACE_ATM_Stream::get_vpi_vci");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- struct t_atm_conn_prop conn_prop;
- char* connect_opts = (char *)&conn_prop;
- int opt_size = sizeof(t_atm_conn_prop);
- struct t_info info;
- struct t_optmgmt opt_req, opt_ret;
-
- if (ACE_OS::t_getinfo(stream_.get_handle(),
- &info) < 0)
- {
- ACE_OS::t_error("t_getinfo");
- return -1;
- }
-
- char *buf_req = (char *) ACE_OS::malloc(info.options);
- if (buf_req == (char *) NULL)
- {
- ACE_OS::fprintf(stderr,
- "Unable to allocate %ld bytes for options\n",
- info.options);
- return -1;
- }
-
- char *buf_ret = (char *) ACE_OS::malloc(info.options);
- if (buf_ret == (char *) NULL)
- {
- ACE_OS::fprintf(stderr,
- "Unable to allocate %ld bytes for options\n",
- info.options);
- return -1;
- }
-
- ACE_OS::memset(&opt_req, 0, sizeof(opt_req));
- ACE_OS::memset(&opt_ret, 0, sizeof(opt_ret));
-
- struct t_opthdr *popt = (struct t_opthdr *) buf_req;
- struct t_opthdr *popt_ret = (struct t_opthdr *) buf_ret;
-
- popt->len= sizeof(struct t_opthdr) + opt_size;
-
- // We are only concerned with SVCs so no other check or values are needed
- // here.
- popt->level = T_ATM_SIGNALING;
- popt->name = T_ATM_CONN_PROP;
- popt->status = 0;
-
- opt_req.opt.len = popt->len;
- opt_req.opt.buf = (char *)popt;
- opt_req.flags = T_CURRENT;
-
- popt = T_OPT_NEXTHDR(buf_req,
- info.options,
- popt);
- opt_ret.opt.maxlen = info.options;
- opt_ret.opt.buf = (char *)popt_ret;
-
- if (ACE_OS::t_optmgmt(stream_.get_handle(),
- &opt_req,
- &opt_ret) < 0) {
- ACE_OS::t_error("t_optmgmt");
- return -1;
- }
-
- ACE_OS::memcpy(connect_opts,
- (char *)popt_ret + sizeof(struct t_opthdr),
- opt_size);
-
- ACE_OS::free(buf_ret);
- ACE_OS::free(buf_req);
-
- vpi = conn_prop.vpi;
- vci = conn_prop.vci;
- return (0);
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- ATM_CONNECTION_ID connID;
- DWORD bytes = 0;
-
- if ( ::WSAIoctl(( int )this -> get_handle(),
- SIO_GET_ATM_CONNECTION_ID,
- NULL,
- 0,
- (LPVOID) &connID,
- sizeof(ATM_CONNECTION_ID),
- &bytes,
- NULL,
- NULL)
- == SOCKET_ERROR) {
- ACE_OS::printf("Error: WSAIoctl %d\n", WSAGetLastError());
- }
-
- vpi = ( ACE_UINT16 )connID.VPI;
- vci = ( ACE_UINT16 )connID.VCI;
-
- return 0;
-#else
- return (-1);
-#endif /* ACE_HAS_FORE_ATM_XTI */
-}
-
-#endif /* ACE_HAS_ATM */
diff --git a/ace/ATM_Stream.h b/ace/ATM_Stream.h
deleted file mode 100644
index 85efd040c86..00000000000
--- a/ace/ATM_Stream.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ATM_Stream.h
-//
-// = AUTHOR
-// Joe Hoffert
-//
-// ============================================================================
-
-#ifndef ACE_ATM_STREAM_H
-#define ACE_ATM_STREAM_H
-#include "ace/pre.h"
-
-#include "ace/ATM_Addr.h"
-#include "ace/ATM_Params.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_ATM)
-
-#if defined (ACE_WIN32)
-#include "SOCK_Stream.h"
-typedef ACE_SOCK_Stream ATM_Stream;
-#else
-#include "TLI_Stream.h"
-typedef ACE_TLI_Stream ATM_Stream;
-#endif
-
-class ACE_Export ACE_ATM_Stream
-{
- // = TITLE
- // Defines the member functions for ACE_ATM_Stream abstraction.
-public:
- // = Initialization and termination methods.
- ACE_ATM_Stream (void);
- // Default constructor.
-
- // = ATM-specific open and shutdown operations.
- int open (ACE_ATM_Params params = ACE_ATM_Params());
- // open the stream.
- int close (void);
- // Close down and release resources.
-
- ACE_HANDLE get_handle (void) const;
- // Get the underlying handle.
-
- ATM_Stream& get_stream (void);
- // Get the underlying stream.
-
- char* get_peer_name (void) const;
- // Get the name of the connected host.
-
- int get_vpi_vci (ACE_UINT16 &vpi,
- ACE_UINT16 &vci) const;
- // Get the VPI and VCI of the stream.
-
- ssize_t recv (void *buf,
- size_t n,
- int *flags = 0) const;
- // Recv an n byte buffer from the connected transport mechanism.
-
- ssize_t send_n (const void *buf,
- size_t n,
- int flags) const;
- // Send exactly n bytes to the connected transport mechanism.
-
- // = Meta-type info
- typedef ACE_ATM_Addr PEER_ADDR;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ATM_Stream stream_;
- // Typedef'd to the appropriate stream mechanism above.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/ATM_Stream.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_ATM */
-#include "ace/post.h"
-#endif /* ACE_ATM_STREAM_H */
-
diff --git a/ace/ATM_Stream.i b/ace/ATM_Stream.i
deleted file mode 100644
index 904934e75a5..00000000000
--- a/ace/ATM_Stream.i
+++ /dev/null
@@ -1,124 +0,0 @@
-// $Id$
-
-// ATM_Stream.i
-
-#include "ace/ATM_Stream.h"
-
-ACE_INLINE
-ACE_ATM_Stream::ACE_ATM_Stream (void)
-{
- ACE_TRACE ("ACE_ATM_Stream::ACE_ATM_Stream");
-}
-
-ACE_INLINE
-int
-ACE_ATM_Stream::open (ACE_ATM_Params params)
-{
- ACE_TRACE ("ACE_ATM_Stream::open");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- ACE_HANDLE handle = stream_.open (params.get_device(),
- params.get_oflag(),
- params.get_info());
- return (handle == ACE_INVALID_HANDLE ? -1 : 0);
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- params.set_flags( ACE_FLAG_MULTIPOINT_C_ROOT | ACE_FLAG_MULTIPOINT_D_ROOT );
-
- int retval = stream_.open (params.get_type(),
- params.get_protocol_family(),
- params.get_protocol(),
- params.get_protocol_info(),
- params.get_sock_group(),
- params.get_flags(),
- params.get_reuse_addr());
- if (retval == -1)
- return -1;
-
- struct sockaddr_atm sock_addr;
-
- ACE_OS::memset(&sock_addr, 0, sizeof(struct sockaddr_atm));
- sock_addr.satm_family = AF_ATM;
- sock_addr.satm_number.AddressType=ADDR_ANY;
- sock_addr.satm_number.NumofDigits = ATM_ADDR_SIZE;
- sock_addr.satm_blli.Layer2Protocol = SAP_FIELD_ABSENT;
- sock_addr.satm_blli.Layer3Protocol = SAP_FIELD_ABSENT;
- sock_addr.satm_bhli.HighLayerInfoType = SAP_FIELD_ABSENT;
- if (ACE_OS::bind(get_handle(),
- (struct sockaddr FAR *)&sock_addr,
- sizeof(struct sockaddr_atm)) < 0)
- {
- ACE_OS::printf("Error binding local address: %d",WSAGetLastError());
- return -1;
- }
-
- return 0;
-#else
- ACE_UNUSED_ARG(params);
- return 0;
-#endif /* ACE_HAS_FORE_ATM_XTI */
-}
-
-ACE_INLINE
-int
-ACE_ATM_Stream::close (void)
-{
- ACE_TRACE ("ACE_ATM_Stream::close");
-#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2)
- return stream_.close ();
-#else
- return 0;
-#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */
-}
-
-ACE_INLINE
-ATM_Stream&
-ACE_ATM_Stream::get_stream (void)
-{
- ACE_TRACE ("ACE_ATM_Stream::get_stream");
- return stream_;
-}
-
-ACE_INLINE
-ssize_t
-ACE_ATM_Stream::recv (void *buf,
- size_t n,
- int *flags) const
-{
- ACE_TRACE ("ACE_ATM_Stream::recv");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- return stream_.recv (buf,
- n,
- flags);
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- return stream_.recv (buf,
- n);
-#else
- ACE_UNUSED_ARG(buf);
- ACE_UNUSED_ARG(n);
- ACE_UNUSED_ARG(flags);
- return (0);
-#endif /* ACE_HAS_FORE_ATM_XTI */
-}
-
-ACE_INLINE
-ssize_t
-ACE_ATM_Stream::send_n (const void *buf,
- size_t n,
- int flags) const
-{
- ACE_TRACE ("ACE_ATM_Stream::send_n");
-#if defined (ACE_HAS_FORE_ATM_XTI)
- return stream_.send_n (buf,
- n,
- flags);
-#elif defined (ACE_HAS_FORE_ATM_WS2)
- return stream_.send_n (buf,
- n,
- flags);
-#else
- ACE_UNUSED_ARG(buf);
- ACE_UNUSED_ARG(n);
- ACE_UNUSED_ARG(flags);
- return (0);
-#endif /* ACE_HAS_FORE_ATM_XTI */
-}
-
diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp
deleted file mode 100644
index 824c5892191..00000000000
--- a/ace/Acceptor.cpp
+++ /dev/null
@@ -1,1172 +0,0 @@
-// Acceptor.cpp
-// $Id$
-
-#ifndef ACE_ACCEPTOR_C
-#define ACE_ACCEPTOR_C
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Acceptor.h"
-#include "ace/Handle_Set.h"
-#include "ace/WFMO_Reactor.h"
-
-ACE_RCSID(ace, Acceptor, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Acceptor)
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump (void) const
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->peer_acceptor_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR & () const
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR &");
- return (ACE_PEER_ACCEPTOR &) this->peer_acceptor_;
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_PEER_ACCEPTOR &
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor (void) const
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor");
- return (ACE_PEER_ACCEPTOR &) this->peer_acceptor_;
-}
-
-// Returns ACE_HANDLE of the underlying Acceptor_Strategy.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_HANDLE
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle (void) const
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle");
- return this->peer_acceptor_.get_handle ();
-}
-
-// Initialize the appropriate strategies for creation, passive
-// connection acceptance, and concurrency, and then register <this>
-// with the Reactor and listen for connection requests at the
-// designated <local_addr>.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
- (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
- ACE_Reactor *reactor,
- int flags,
- int use_select,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open");
- this->flags_ = flags;
- this->use_select_ = use_select;
-
- // Must supply a valid Reactor to Acceptor::open()...
-
- if (reactor == 0)
- {
- errno = EINVAL;
- return -1;
- }
-
- if (this->peer_acceptor_.open (local_addr,
- reuse_addr) == -1)
- return -1;
-
- // Set the peer acceptor's handle into non-blocking mode. This is a
- // safe-guard against the race condition that can otherwise occur
- // between the time when <select> indicates that a passive-mode
- // socket handle is "ready" and when we call <accept>. During this
- // interval, the client can shutdown the connection, in which case,
- // the <accept> call can hang!
- this->peer_acceptor_.enable (ACE_NONBLOCK);
-
- int result = reactor->register_handler
- (this,
- ACE_Event_Handler::ACCEPT_MASK);
- if (result != -1)
- this->reactor (reactor);
-
- return result;
-}
-
-// Simple constructor.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Acceptor (ACE_Reactor *reactor,
- int use_select)
- : use_select_ (use_select)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Acceptor");
-
- this->reactor (reactor);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Acceptor
- (const ACE_PEER_ACCEPTOR_ADDR &addr,
- ACE_Reactor *reactor,
- int flags,
- int use_select,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Acceptor");
-
- if (this->open (addr,
- reactor,
- flags,
- use_select,
- reuse_addr) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Acceptor::ACE_Acceptor")));
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Acceptor (void)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Acceptor");
- this->handle_close ();
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini (void)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini");
- return ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close ();
-}
-
-// Hook called by the explicit dynamic linking facility.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, ACE_TCHAR *[])
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init");
- return -1;
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ACE_TCHAR **strp,
- size_t length) const
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info");
- ACE_TCHAR buf[BUFSIZ];
- ACE_TCHAR addr_str[BUFSIZ];
- ACE_PEER_ACCEPTOR_ADDR addr;
-
- if (this->acceptor ().get_local_addr (addr) == -1)
- return -1;
- else if (addr.addr_to_string (addr_str, sizeof addr_str) == -1)
- return -1;
-
- ACE_OS::sprintf (buf,
- ACE_TEXT ("%s\t %s %s"),
- ACE_TEXT ("ACE_Acceptor"),
- addr_str,
- ACE_TEXT ("# acceptor factory\n"));
-
- if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*strp, buf, length);
- return ACE_OS::strlen (buf);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend (void)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend");
- return this->reactor ()->suspend_handler (this);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume (void)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume");
- return this->reactor ()->resume_handler (this);
-}
-
-// Perform termination activities when <this> is removed from the
-// <reactor>.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::close (void)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::close");
- return this->handle_close ();
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE,
- ACE_Reactor_Mask)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close");
- // Guard against multiple closes.
- if (this->reactor () != 0)
- {
- ACE_HANDLE handle = this->get_handle ();
-
- this->reactor ()->remove_handler
- (handle,
- // We must pass the DONT_CALL flag here to avoid infinite
- // recursion.
- ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
-
- // Shut down the listen socket to recycle the handles.
- if (this->peer_acceptor_.close () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("close\n")));
- // Set the Reactor to 0 so that we don't try to close down
- // again.
- this->reactor (0);
- }
- return 0;
-}
-
-// Bridge method for creating a SVC_HANDLER. The strategy for
-// creating a SVC_HANDLER are configured into the Acceptor via it's
-// <creation_strategy_>. The default is to create a new SVC_HANDLER.
-// However, subclasses can override this strategy to perform
-// SVC_HANDLER creation in any way that they like (such as creating
-// subclass instances of SVC_HANDLER, using a singleton, dynamically
-// linking the handler, etc.).
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::make_svc_handler (SVC_HANDLER *&sh)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::make_svc_handler");
-
- if (sh == 0)
- ACE_NEW_RETURN (sh,
- SVC_HANDLER,
- -1);
-
- // Set the reactor of the newly created <SVC_HANDLER> to the same
- // reactor that this <Acceptor> is using.
- if (this->reactor ())
- sh->reactor (this->reactor ());
-
- return 0;
-}
-
-// Bridge method for accepting the new connection into the
-// <svc_handler>. The default behavior delegates to the
-// <PEER_ACCEPTOR::accept> in the Acceptor_Strategy.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler
- (SVC_HANDLER *svc_handler)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler");
-
- // Try to find out if the implementation of the reactor that we are
- // using requires us to reset the event association for the newly
- // created handle. This is because the newly created handle will
- // inherit the properties of the listen handle, including its event
- // associations.
- int reset_new_handle = this->reactor ()->uses_event_associations ();
-
- // Note that it's not really an error if <accept> returns -1 and
- // <errno> == EWOULDBLOCK because we have set the peer acceptor's
- // handle into non-blocking mode to prevent the <accept> call from
- // "hanging" if the connection has been shutdown.
- if (this->peer_acceptor_.accept (svc_handler->peer (), // stream
- 0, // remote address
- 0, // timeout
- 1, // restart
- reset_new_handle // reset new handler
- ) == -1 && errno != EWOULDBLOCK)
- {
- // Close down handler to avoid memory leaks.
- svc_handler->close (0);
- return -1;
- }
- else
- return 0;
-}
-
-// Bridge method for activating a <svc_handler> with the appropriate
-// concurrency strategy. The default behavior of this method is to
-// activate the SVC_HANDLER by calling its open() method (which allows
-// the SVC_HANDLER to define its own concurrency strategy). However,
-// subclasses can override this strategy to do more sophisticated
-// concurrency activations (such as creating the SVC_HANDLER as an
-// "active object" via multi-threading or multi-processing).
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler
- (SVC_HANDLER *svc_handler)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler");
-
- int result = 0;
-
- // See if we should enable non-blocking I/O on the <svc_handler>'s
- // peer.
- if (ACE_BIT_ENABLED (this->flags_,
- ACE_NONBLOCK))
- {
- if (svc_handler->peer ().enable (ACE_NONBLOCK) == -1)
- result = -1;
- }
- // Otherwise, make sure it's disabled by default.
- else if (svc_handler->peer ().disable (ACE_NONBLOCK) == -1)
- result = -1;
-
- if (result == 0 && svc_handler->open ((void *) this) == -1)
- result = -1;
-
- if (result == -1)
- svc_handler->close (0);
-
- return result;
-}
-
-// Template Method that makes a SVC_HANDLER (using the appropriate
-// creation strategy), accept the connection into the SVC_HANDLER, and
-// then activate the SVC_HANDLER.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE listener)
-{
- ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input");
- ACE_Handle_Set conn_handle;
-
- // Default is "timeout (0, 0)," which means "poll."
- ACE_Time_Value timeout;
-
- // Accept connections from clients. Note that a loop is used for two
- // reasons:
- //
- // 1. It allows us to accept all pending connections without an
- // extra trip through the ACE_Reactor and without having to use
- // non-blocking I/O...
- //
- // 2. It allows the TLI_SAP::ACE_Acceptor class to work correctly (don't
- // ask -- TLI is *horrible*...).
-
- // @@ What should we do if any of the substrategies fail? Right
- // now, we just print out a diagnostic message if <ACE::debug>
- // returns > 0 and return 0 (which means that the Acceptor remains
- // registered with the Reactor)...
- do
- {
- // Create a service handler, using the appropriate creation
- // strategy.
-
- SVC_HANDLER *svc_handler = 0;
-
- if (this->make_svc_handler (svc_handler) == -1)
- {
- if (ACE::debug () > 0)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("make_svc_handler")));
- return 0;
- }
- // Accept connection into the Svc_Handler.
-
- else if (this->accept_svc_handler (svc_handler) == -1)
- {
- if (ACE::debug () > 0)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("accept_svc_handler")));
- return 0;
- }
-
- // Activate the <svc_handler> using the designated concurrency
- // strategy (note that this method becomes responsible for
- // handling errors and freeing up the memory if things go
- // awry...).
- else if (this->activate_svc_handler (svc_handler) == -1)
- {
- if (ACE::debug () > 0)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("activate_svc_handler")));
- return 0;
- }
-
- conn_handle.set_bit (listener);
- }
-
- // Now, check to see if there is another connection pending and
- // break out of the loop if there is none.
- while (this->use_select_
- && ACE_OS::select (int (listener) + 1,
- conn_handle,
- 0,
- 0,
- &timeout) == 1);
- return 0;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Strategy_Acceptor)
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend (void)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend");
-
- // First suspend the SVC_HANDLER's we've created.
- if (this->scheduling_strategy_->suspend () == -1)
- return -1;
- else // Then suspend ourselves.
- return ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend ();
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume (void)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume");
-
- // First resume ourselves.
- if (ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume () == -1)
- return -1;
- else // Then resume the SVC_HANDLER's we've created.
- return this->scheduling_strategy_->resume ();
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump (void) const
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump ();
- this->creation_strategy_->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_creation_strategy_ = %d"), delete_creation_strategy_));
- this->accept_strategy_->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_accept_strategy_ = %d"), delete_accept_strategy_));
- this->concurrency_strategy_->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_concurrency_strategy_ = %d"), delete_concurrency_strategy_));
- this->scheduling_strategy_->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_scheduling_strategy_ = %d"), delete_scheduling_strategy_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nservice_name_ = %s"),
- this->service_name_ == 0 ? ACE_TEXT ("<unknown>") : this->service_name_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nservice_description_ = %s"),
- this->service_description_ == 0 ? ACE_TEXT ("<unknown>") : this->service_description_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nservice_port_ = %d"), this->service_port_));
- this->service_addr_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_PEER_ACCEPTOR &
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor (void) const
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor");
- return this->accept_strategy_->acceptor ();
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR & () const
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR &");
- return this->accept_strategy_->acceptor ();
-}
-
-// Returns ACE_HANDLE of the underlying Acceptor_Strategy.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_HANDLE
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle (void) const
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle");
- return this->accept_strategy_->get_handle ();
-}
-
-// Initialize the appropriate strategies for creation, passive
-// connection acceptance, and concurrency, and then register <this>
-// with the Reactor and listen for connection requests at the
-// designated <local_addr>.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
- (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
- ACE_Reactor *reactor,
- ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
- ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> *acc_s,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
- ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s,
- const ACE_TCHAR *service_name,
- const ACE_TCHAR *service_description,
- int use_select)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open");
-
- if (this->service_name_ == 0 && service_name != 0)
- ACE_ALLOCATOR_RETURN (this->service_name_,
- ACE_OS::strdup (service_name),
- -1);
- if (this->service_description_ == 0 && service_description != 0)
- ACE_ALLOCATOR_RETURN (this->service_description_,
- ACE_OS::strdup (service_description),
- -1);
- this->reactor (reactor);
-
- // Must supply a valid Reactor to Acceptor::open()...
- if (reactor == 0)
- {
- errno = EINVAL;
- return -1;
- }
-
- // Initialize the creation strategy.
-
- if (cre_s == 0)
- {
- ACE_NEW_RETURN (cre_s,
- CREATION_STRATEGY,
- -1);
- this->delete_creation_strategy_ = 1;
- }
- this->creation_strategy_ = cre_s;
-
- // Initialize the accept strategy.
-
- if (acc_s == 0)
- {
- ACE_NEW_RETURN (acc_s,
- ACCEPT_STRATEGY (this->reactor ()),
- -1);
- this->delete_accept_strategy_ = 1;
- }
- this->accept_strategy_ = acc_s;
-
- if (this->accept_strategy_->open (local_addr, 1) == -1)
- return -1;
-
- // Initialize the concurrency strategy.
-
- if (con_s == 0)
- {
- ACE_NEW_RETURN (con_s,
- CONCURRENCY_STRATEGY,
- -1);
- this->delete_concurrency_strategy_ = 1;
- }
- this->concurrency_strategy_ = con_s;
-
- // Initialize the scheduling strategy.
-
- if (sch_s == 0)
- {
- ACE_NEW_RETURN (sch_s,
- SCHEDULING_STRATEGY,
- -1);
- this->delete_scheduling_strategy_ = 1;
- }
- this->scheduling_strategy_ = sch_s;
-
- this->use_select_ = use_select;
-
- return this->reactor ()->register_handler
- (this,
- ACE_Event_Handler::ACCEPT_MASK);
-}
-
-// Simple constructor.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor
- (const ACE_TCHAR service_name[],
- const ACE_TCHAR service_description[],
- int use_select)
- : creation_strategy_ (0),
- delete_creation_strategy_ (0),
- accept_strategy_ (0),
- delete_accept_strategy_ (0),
- concurrency_strategy_ (0),
- delete_concurrency_strategy_ (0),
- scheduling_strategy_ (0),
- delete_scheduling_strategy_ (0),
- service_name_ (0),
- service_description_ (0),
- service_port_ (0)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor");
-
- if (service_name != 0)
- ACE_ALLOCATOR (this->service_name_,
- ACE_OS::strdup (service_name));
- if (service_description != 0)
- ACE_ALLOCATOR (this->service_description_,
- ACE_OS::strdup (service_description));
- this->use_select_ = use_select;
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor
- (const ACE_PEER_ACCEPTOR_ADDR &addr,
- ACE_Reactor *reactor,
- ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
- ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> *acc_s,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
- ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s,
- const ACE_TCHAR service_name[],
- const ACE_TCHAR service_description[],
- int use_select)
- : creation_strategy_ (0),
- delete_creation_strategy_ (0),
- accept_strategy_ (0),
- delete_accept_strategy_ (0),
- concurrency_strategy_ (0),
- delete_concurrency_strategy_ (0),
- scheduling_strategy_ (0),
- delete_scheduling_strategy_ (0),
- service_name_ (0),
- service_description_ (0),
- service_port_ (0)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor");
-
- if (this->open (addr,
- reactor,
- cre_s,
- acc_s,
- con_s,
- sch_s,
- service_name,
- service_description,
- use_select) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Strategy_Acceptor::ACE_Strategy_Acceptor")));
-}
-
-// Perform termination activities when <this> is removed from the
-// <ACE_Reactor>.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE,
- ACE_Reactor_Mask)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close");
- // Guard against multiple closes.
- if (this->reactor () != 0)
- {
- ACE_HANDLE handle = this->get_handle ();
-
- if (this->delete_creation_strategy_)
- delete this->creation_strategy_;
- this->delete_creation_strategy_ = 0;
- this->creation_strategy_ = 0;
-
- if (this->delete_accept_strategy_)
- delete this->accept_strategy_;
- this->delete_accept_strategy_ = 0;
- this->accept_strategy_ = 0;
-
- if (this->delete_concurrency_strategy_)
- delete this->concurrency_strategy_;
- this->delete_concurrency_strategy_ = 0;
- this->concurrency_strategy_ = 0;
-
- if (this->delete_scheduling_strategy_)
- delete this->scheduling_strategy_;
- this->delete_scheduling_strategy_ = 0;
- this->scheduling_strategy_ = 0;
-
- // We must use the <handle> obtained *before* we deleted the
- // accept_strategy_...
-
- this->reactor ()->remove_handler
- (handle,
- ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
-
- // Set the Reactor to 0 so that we don't try to close down
- // again.
- this->reactor (0);
- }
- return 0;
-}
-
-// Bridge method for creating a <SVC_HANDLER>. The strategy for
-// creating a <SVC_HANDLER> are configured into the Acceptor via it's
-// <creation_strategy_>. The default is to create a new
-// <SVC_HANDLER>. However, subclasses can override this strategy to
-// perform <SVC_HANDLER> creation in any way that they like (such as
-// creating subclass instances of <SVC_HANDLER>, using a singleton,
-// dynamically linking the handler, etc.).
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::make_svc_handler (SVC_HANDLER *&sh)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::make_svc_handler");
- return this->creation_strategy_->make_svc_handler (sh);
-}
-
-// Bridge method for accepting the new connection into the
-// <svc_handler>. The default behavior delegates to the
-// <Strategy_Acceptor::accept> in the Acceptor_Strategy.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler
- (SVC_HANDLER *svc_handler)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler");
- return this->accept_strategy_->accept_svc_handler (svc_handler);
-}
-
-// Bridge method for activating a <svc_handler> with the appropriate
-// concurrency strategy. The default behavior of this method is to
-// activate the SVC_HANDLER by calling its open() method (which allows
-// the SVC_HANDLER to define its own concurrency strategy). However,
-// subclasses can override this strategy to do more sophisticated
-// concurrency activations (such as creating the SVC_HANDLER as an
-// "active object" via multi-threading or multi-processing).
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler
- (SVC_HANDLER *svc_handler)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler");
- return this->concurrency_strategy_->activate_svc_handler
- (svc_handler,
- (void *) this);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Strategy_Acceptor (void)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Strategy_Acceptor");
- ACE_OS::free ((void *) this->service_name_);
- ACE_OS::free ((void *) this->service_description_);
- this->handle_close ();
-}
-
-// Signal the server to shutdown gracefully.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_signal (int, siginfo_t *, ucontext_t *)
-{
- ACE_Reactor::end_event_loop ();
- return 0;
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ACE_TCHAR **strp,
- size_t length) const
-{
- ACE_TRACE ("ACE_Strategy_Acceptor::info");
-
- ACE_TCHAR buf[BUFSIZ];
- ACE_TCHAR service_addr_str[BUFSIZ];
- ACE_PEER_ACCEPTOR_ADDR addr;
-
- if (this->acceptor ().get_local_addr (addr) == -1)
- return -1;
- else if (addr.addr_to_string (service_addr_str,
- sizeof service_addr_str) == -1)
- return -1;
-
- // @@ Should add the protocol in...
- ACE_OS::sprintf (buf,
- ACE_TEXT ("%s\t %s #%s\n"),
- this->service_name_ == 0
- ? ACE_TEXT ("<unknown>")
- : this->service_name_,
- service_addr_str,
- this->service_description_ == 0
- ? ACE_TEXT ("<unknown>")
- : this->service_description_);
-
- if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*strp, buf, length);
- return ACE_OS::strlen (buf);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini (void)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini");
- return this->ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close ();
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Oneshot_Acceptor)
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump (void) const
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsvc_handler_ = %x"), this->svc_handler_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nrestart_ = %d"), this->restart_));
- this->peer_acceptor_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_concurrency_strategy_ = %d"),
- delete_concurrency_strategy_));
- this->concurrency_strategy_->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
- (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
- ACE_Reactor *reactor,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open");
- this->reactor (reactor);
-
- // Initialize the concurrency strategy.
-
- if (con_s == 0)
- {
- ACE_NEW_RETURN (con_s,
- ACE_Concurrency_Strategy<SVC_HANDLER>,
- -1);
- this->delete_concurrency_strategy_ = 1;
- }
- this->concurrency_strategy_ = con_s;
-
- // Reuse the addr, even if it is already in use...!
- return this->peer_acceptor_.open (local_addr, 1);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor (void)
- : delete_concurrency_strategy_ (0)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor");
- this->reactor (0);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor
- (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
- ACE_Reactor *reactor,
- ACE_Concurrency_Strategy<SVC_HANDLER> *cs)
- : delete_concurrency_strategy_ (0)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor");
- if (this->open (local_addr, reactor, cs) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor")));
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Oneshot_Acceptor (void)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Oneshot_Acceptor");
- this->handle_close ();
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::close (void)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::close");
- return this->handle_close ();
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE,
- ACE_Reactor_Mask)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close");
-
- // Guard against multiple closes.
- if (this->delete_concurrency_strategy_)
- {
- delete this->concurrency_strategy_;
- this->delete_concurrency_strategy_ = 0;
- this->concurrency_strategy_ = 0;
-
- // Note that if we aren't actually registered with the
- // ACE_Reactor then it's ok for this call to fail...
-
- if (this->reactor ())
- this->reactor ()->remove_handler
- (this,
- ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
-
- if (this->peer_acceptor_.close () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("close\n")));
- }
- return 0;
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_timeout
- (const ACE_Time_Value &tv,
- const void *arg)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_timeout");
- errno = ETIME;
-
- if (this->svc_handler_->handle_timeout (tv, arg) == -1)
- this->svc_handler_->handle_close (this->svc_handler_->get_handle (),
- ACE_Event_Handler::TIMER_MASK);
-
- // Since we aren't necessarily registered with the Reactor, don't
- // bother to check the return value here...
- if (this->reactor ())
- this->reactor ()->remove_handler (this,
- ACE_Event_Handler::ACCEPT_MASK);
- return 0;
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::cancel (void)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::cancel");
- return this->reactor () && this->reactor ()->cancel_timer (this);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::register_handler
- (SVC_HANDLER *svc_handler,
- const ACE_Synch_Options &synch_options,
- int restart)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::register_handler");
- // Can't do this if we don't have a Reactor.
- if (this->reactor () == 0)
- {
- errno = EINVAL;
- return -1;
- }
- else
- {
- this->svc_handler_ = svc_handler;
- this->restart_ = restart;
- ACE_Time_Value *tv = (ACE_Time_Value *) synch_options.time_value ();
-
- if (tv != 0
- && this->reactor ()->schedule_timer (this,
- synch_options.arg (),
- *tv) == 0)
- return -1;
- else
- return this->reactor ()->register_handler
- (this,
- ACE_Event_Handler::ACCEPT_MASK);
- }
-}
-
-// Bridge method for activating a <svc_handler> with the appropriate
-// concurrency strategy. The default behavior of this method is to
-// activate the SVC_HANDLER by calling its open() method (which allows
-// the SVC_HANDLER to define its own concurrency strategy). However,
-// subclasses can override this strategy to do more sophisticated
-// concurrency activations (such as creating the SVC_HANDLER as an
-// "active object" via multi-threading or multi-processing).
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler
- (SVC_HANDLER *svc_handler)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler");
- return this->concurrency_strategy_->activate_svc_handler
- (svc_handler,
- (void *) this);
-}
-
-// Factors out the code shared between the <accept> and <handle_input>
-// methods.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::shared_accept
- (SVC_HANDLER *svc_handler,
- ACE_PEER_ACCEPTOR_ADDR *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::shared_accept");
- if (svc_handler == 0)
- return -1;
-
- // Accept connection into the Svc_Handler.
- else if (this->peer_acceptor_.accept (svc_handler->peer (), // stream
- remote_addr, // remote address
- timeout, // timeout
- restart, // restart
- reset_new_handle // reset new handle
- ) == -1)
- {
- // Check whether we just timed out or whether we failed...
- if (!(errno == EWOULDBLOCK || errno == ETIME))
- // Close down handler to avoid memory leaks.
- svc_handler->close (0);
- return -1;
- }
- // Activate the <svc_handler> using the designated concurrency
- // strategy (note that this method becomes responsible for handling
- // errors and freeing up the memory if things go awry...)
- else
- return this->activate_svc_handler (svc_handler);
-}
-
-// Make a SVC_HANDLER, accept the connection into the SVC_HANDLER, and
-// then activate the SVC_HANDLER. Note that SVC_HANDLER::open()
-// decides what type of concurrency strategy to use.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept
- (SVC_HANDLER *svc_handler,
- ACE_PEER_ACCEPTOR_ADDR *remote_addr,
- const ACE_Synch_Options &synch_options,
- int restart,
- int reset_new_handle)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept");
- // Note that if timeout == ACE_Time_Value (x, y) where (x > 0 || y >
- // 0) then this->connector_.connect() will block synchronously. If
- // <use_reactor> is set then we don't want this to happen (since we
- // want the ACE_Reactor to do the timeout asynchronously).
- // Therefore, we'll force this->connector_ to use ACE_Time_Value (0,
- // 0) in this case...
-
- ACE_Time_Value *timeout;
- int use_reactor = synch_options[ACE_Synch_Options::USE_REACTOR];
-
- if (use_reactor)
- timeout = (ACE_Time_Value *) &ACE_Time_Value::zero;
- else
- timeout = (ACE_Time_Value *) synch_options.time_value ();
-
- if (this->shared_accept (svc_handler, // stream
- remote_addr, // remote address
- timeout, // timeout
- restart, // restart
- reset_new_handle // reset new handler
- ) == -1)
- {
- if (use_reactor && errno == EWOULDBLOCK)
- // We couldn't accept right away, so let's wait in the
- // <ACE_Reactor>.
- this->register_handler (svc_handler,
- synch_options,
- restart);
- return -1;
- }
- return 0;
-}
-
-// Accepts one pending connection from a client (since we're the
-// "oneshot" Acceptor).
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input");
- int result = 0;
-
- // Cancel any timer that might be pending.
- this->cancel ();
-
- // Try to find out if the implementation of the reactor that we are
- // using requires us to reset the event association for the newly
- // created handle. This is because the newly created handle will
- // inherit the properties of the listen handle, including its event
- // associations.
- int reset_new_handle = this->reactor ()->uses_event_associations ();
-
- if (this->shared_accept (this->svc_handler_, // stream
- 0, // remote address
- 0, // timeout
- this->restart_, // restart
- reset_new_handle // reset new handle
- ) == -1)
- result = -1;
- if (this->reactor ()
- && this->reactor ()->remove_handler
- (this,
- ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL) == -1)
- result = -1;
- return result;
-}
-
-// Hook called by the explicit dynamic linking facility.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, ACE_TCHAR *[])
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init");
- return -1;
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini (void)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini");
- return this->handle_close ();
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (ACE_TCHAR **strp,
- size_t length) const
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info");
- ACE_TCHAR buf[BUFSIZ];
- ACE_TCHAR addr_str[BUFSIZ];
- ACE_PEER_ACCEPTOR_ADDR addr;
-
- if (this->peer_acceptor_.get_local_addr (addr) == -1)
- return -1;
- else if (addr.addr_to_string (addr_str, sizeof addr_str) == -1)
- return -1;
-
- ACE_OS::sprintf (buf,
- ACE_TEXT ("%s\t %s %s"),
- ACE_TEXT ("ACE_Oneshot_Acceptor"),
- addr_str,
- ACE_TEXT ("#oneshot acceptor factory\n"));
-
- if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*strp, buf, length);
- return ACE_OS::strlen (buf);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend (void)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend");
- return this->reactor () && this->reactor ()->suspend_handler (this);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume (void)
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume");
- return this->reactor () && this->reactor ()->resume_handler (this);
-}
-
-// Returns ACE_HANDLE of the underlying peer_acceptor.
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_HANDLE
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle (void) const
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle");
- return this->peer_acceptor_.get_handle ();
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_PEER_ACCEPTOR &
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor (void) const
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor");
- return (ACE_PEER_ACCEPTOR &) this->peer_acceptor_;
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR & () const
-{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR &");
- return (ACE_PEER_ACCEPTOR &) this->peer_acceptor_;
-}
-
-#endif /* ACE_ACCEPTOR_C */
diff --git a/ace/Acceptor.h b/ace/Acceptor.h
deleted file mode 100644
index 96f51647dd7..00000000000
--- a/ace/Acceptor.h
+++ /dev/null
@@ -1,530 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Acceptor.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_ACCEPTOR_H
-#define ACE_ACCEPTOR_H
-#include "ace/pre.h"
-
-#include "ace/Service_Config.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Service_Object.h"
-#include "ace/Svc_Handler.h"
-#include "ace/Strategies.h"
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-class ACE_Acceptor : public ACE_Service_Object
-{
- // = TITLE
- // Abstract factory for creating a service handler
- // (SVC_HANDLER), accepting into the SVC_HANDLER, and
- // activating the SVC_HANDLER.
- //
- // = DESCRIPTION
- // Implements the basic strategy for passively establishing
- // connections with clients. An ACE_Acceptor is parameterized
- // by concrete types that conform to the interfaces of
- // PEER_ACCEPTOR and SVC_HANDLER. The PEER_ACCEPTOR is
- // instantiated with a transport mechanism that passively
- // establishes connections. The SVC_HANDLER is instantiated
- // with a concrete type that performs the application-specific
- // service. An ACE_Acceptor inherits from ACE_Service_Object,
- // which in turn inherits from ACE_Event_Handler. This enables
- // the ACE_Reactor to dispatch the ACE_Acceptor's handle_input
- // method when connection events occur. The handle_input method
- // performs the ACE_Acceptor's default creation, connection
- // establishment, and service activation strategies. These
- // strategies can be overridden by subclasses individually or as
- // a group.
-public:
- // = Initialization and termination methods.
- ACE_Acceptor (ACE_Reactor * = 0,
- int use_select = 1);
- // "Do-nothing" constructor.
-
- ACE_Acceptor (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
- ACE_Reactor * = ACE_Reactor::instance (),
- int flags = 0,
- int use_select = 1,
- int reuse_addr = 1);
- // Initialize and register <this> with the Reactor and listen for
- // connection requests at the designated <local_addr>. <flags>
- // indicates how <SVC_HANDLER>'s should be initialized prior to
- // being activated. Right now, the only flag that is processed is
- // <ACE_NONBLOCK>, which enabled non-blocking I/O on the
- // <SVC_HANDLER> when it is opened. If <use_select> is non-zero
- // then <select> is used to determine when to break out of the
- // <accept> loop. <reuse_addr> is passed down to the
- // <PEER_ACCEPTOR>. If it is non-zero this will allow the OS to
- // reuse this listen port.
-
- int open (const ACE_PEER_ACCEPTOR_ADDR &,
- ACE_Reactor * = ACE_Reactor::instance (),
- int flags = 0,
- int use_select = 1,
- int reuse_addr = 1);
- // Initialize and register <this> with the Reactor and listen for
- // connection requests at the designated <local_addr>. <flags>
- // indicates how <SVC_HANDLER>'s should be initialized prior to
- // being activated. Right now, the only flag that is processed is
- // <ACE_NONBLOCK>, which enabled non-blocking I/O on the
- // <SVC_HANDLER> when it is opened. If <use_select> is non-zero
- // then <select> is used to determine when to break out of the
- // <accept> loop. <reuse_addr> is passed down to the
- // <PEER_ACCEPTOR>. If it is non-zero this will allow the OS to
- // reuse this listen port.
-
- virtual ~ACE_Acceptor (void);
- // Close down the Acceptor's resources.
-
- virtual operator ACE_PEER_ACCEPTOR &() const;
- // Return the underlying PEER_ACCEPTOR object.
-
- virtual ACE_PEER_ACCEPTOR &acceptor (void) const;
- // Return the underlying PEER_ACCEPTOR object.
-
- virtual ACE_HANDLE get_handle (void) const;
- // Returns the listening acceptor's <ACE_HANDLE>.
-
- virtual int close (void);
- // Close down the Acceptor
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = The following three methods define the Acceptor's strategies
- // for creating, accepting, and activating SVC_HANDLER's,
- // respectively.
-
- virtual int make_svc_handler (SVC_HANDLER *&sh);
- // Bridge method for creating a SVC_HANDLER. The default is to
- // create a new <SVC_HANDLER> if <sh> == 0, else <sh> is unchanged.
- // However, subclasses can override this policy to perform
- // SVC_HANDLER creation in any way that they like (such as creating
- // subclass instances of SVC_HANDLER, using a singleton, dynamically
- // linking the handler, etc.). Returns -1 on failure, else 0.
-
- virtual int accept_svc_handler (SVC_HANDLER *svc_handler);
- // Bridge method for accepting the new connection into the
- // <svc_handler>. The default behavior delegates to the
- // PEER_ACCEPTOR::accept.
-
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler);
- // Bridge method for activating a <svc_handler> with the appropriate
- // concurrency strategy. The default behavior of this method is to
- // activate the SVC_HANDLER by calling its <open> method (which
- // allows the SVC_HANDLER to define its own concurrency strategy).
- // However, subclasses can override this strategy to do more
- // sophisticated concurrency activations (such as making the
- // SVC_HANDLER as an "active object" via multi-threading or
- // multi-processing).
-
- // = Demultiplexing hooks.
- virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK);
- // Perform termination activities when <this> is removed from the
- // <reactor>.
-
- virtual int handle_input (ACE_HANDLE);
- // Accepts all pending connections from clients, and creates and
- // activates SVC_HANDLERs.
-
- // = Dynamic linking hooks.
- virtual int init (int argc, ACE_TCHAR *argv[]);
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
- virtual int fini (void);
- // Calls <handle_close>.
-
- virtual int info (ACE_TCHAR **buf, size_t) const;
- // Default version returns address info in <buf>.
-
- // = Service management hooks.
- virtual int suspend (void);
- // This method calls <Reactor::suspend>.
-
- virtual int resume (void);
- // This method calls <Reactor::resume>.
-
-protected:
- ACE_PEER_ACCEPTOR peer_acceptor_;
- // Concrete factory for accepting connections from clients...
-
- int flags_;
- // Flags that indicate how <SVC_HANDLER>'s should be initialized
- // prior to being activated. Right now, the only flag that is
- // processed is <ACE_NONBLOCK>, which enabled non-blocking I/O on
- // the <SVC_HANDLER> when it is opened.
-
- int use_select_;
- // Flag that indicates whether it shall use <select> in the
- // <accept>-loop.
-};
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-class ACE_Strategy_Acceptor : public ACE_Acceptor <SVC_HANDLER, ACE_PEER_ACCEPTOR_2>
-{
- // = TITLE
- // Abstract factory for creating a service handler
- // (SVC_HANDLER), accepting into the SVC_HANDLER, and activating
- // the SVC_HANDLER.
- //
- // = DESCRIPTION
- // Implements a flexible and extensible set of strategies for
- // passively establishing connections with clients. There are
- // three main strategies: (1) creating a SVC_HANDLER, (2)
- // passively accepting a new connection from a client into the
- // SVC_HANDLER, and (3) activating the SVC_HANDLER with a
- // particular concurrency mechanism.
-public:
- // = Initialization and termination methods.
- ACE_Strategy_Acceptor (const ACE_TCHAR service_name[] = 0,
- const ACE_TCHAR service_description[] = 0,
- int use_select = 1);
- // Default constructor.
-
- ACE_Strategy_Acceptor (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
- ACE_Reactor * = ACE_Reactor::instance (),
- ACE_Creation_Strategy<SVC_HANDLER> * = 0,
- ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> * = 0,
- ACE_Concurrency_Strategy<SVC_HANDLER> * = 0,
- ACE_Scheduling_Strategy<SVC_HANDLER> * = 0,
- const ACE_TCHAR service_name[] = 0,
- const ACE_TCHAR service_description[] = 0,
- int use_select = 1);
- // Initialize the appropriate strategies for creation, passive
- // connection acceptance, and concurrency, and then register <this>
- // with the Reactor and listen for connection requests at the
- // designated <local_addr>.
-
- int open (const ACE_PEER_ACCEPTOR_ADDR &,
- ACE_Reactor * = ACE_Reactor::instance (),
- ACE_Creation_Strategy<SVC_HANDLER> * = 0,
- ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> * = 0,
- ACE_Concurrency_Strategy<SVC_HANDLER> * = 0,
- ACE_Scheduling_Strategy<SVC_HANDLER> * = 0,
- const ACE_TCHAR *service_name = 0,
- const ACE_TCHAR *service_description = 0,
- int use_select = 1);
- // Initialize the appropriate strategies for creation, passive
- // connection acceptance, and concurrency, and then register <this>
- // with the Reactor and listen for connection requests at the
- // designated <local_addr>.
-
- virtual ~ACE_Strategy_Acceptor (void);
- // Close down the Strategy_Acceptor's resources.
-
- virtual operator ACE_PEER_ACCEPTOR &() const;
- // Return the underlying PEER_ACCEPTOR object.
-
- virtual ACE_PEER_ACCEPTOR &acceptor (void) const;
- // Return the underlying PEER_ACCEPTOR object.
-
- virtual ACE_HANDLE get_handle (void) const;
- // Returns the listening acceptor's <ACE_HANDLE>.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Service management hooks.
-
- virtual int suspend (void);
- // This method delegates to the <Scheduling_Strategy>'s <suspend>
- // method.
-
- virtual int resume (void);
- // This method delegates to the <Scheduling_Strategy>'s <resume>
- // method.
-
- virtual int fini (void);
- // Calls <handle_close> when dynamically unlinked.
-
- virtual int info (ACE_TCHAR **buf, size_t) const;
- // Default version returns address info in <buf>.
-
- // = The following three methods define the <Acceptor>'s strategies
- // for creating, accepting, and activating <SVC_HANDLER>'s,
- // respectively.
-
- virtual int make_svc_handler (SVC_HANDLER *&);
- // Bridge method for creating a <SVC_HANDLER>. The strategy for
- // creating a <SVC_HANDLER> are configured into the Acceptor via
- // it's <creation_strategy_>. The default is to create a new
- // <SVC_HANDLER> if <sh> == 0, else <sh> is unchanged. However,
- // subclasses can override this policy to perform <SVC_HANDLER>
- // creation in any way that they like (such as creating subclass
- // instances of <SVC_HANDLER>, using a singleton, dynamically
- // linking the handler, etc.). Returns -1 on failure, else 0.
-
- virtual int accept_svc_handler (SVC_HANDLER *svc_handler);
- // Bridge method for accepting the new connection into the
- // <SVC_HANDLER>. The default behavior delegates to the
- // <PEER_ACCEPTOR::accept> in the <Acceptor_Strategy>.
-
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler);
- // Bridge method for activating a <SVC_HANDLER> with the appropriate
- // concurrency strategy. The default behavior of this method is to
- // activate the <SVC_HANDLER> by calling its <open> method (which
- // allows the <SVC_HANDLER> to define its own concurrency strategy).
- // However, subclasses can override this strategy to do more
- // sophisticated concurrency activations (such as creating the
- // <SVC_HANDLER> as an "active object" via multi-threading or
- // multi-processing).
-
- // = Demultiplexing hooks.
- virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK);
- // Perform termination activities when <this> is removed from the
- // <Reactor>.
-
- virtual int handle_signal (int signum, siginfo_t *, ucontext_t *);
- // Handle SIGINT.
-
- // = These data members are "logically private" but are put in the
- // protected part in case subclasses want to access them.
-
- // = Define some useful typedefs.
- typedef ACE_Creation_Strategy<SVC_HANDLER> CREATION_STRATEGY;
- typedef ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> ACCEPT_STRATEGY;
- typedef ACE_Concurrency_Strategy<SVC_HANDLER> CONCURRENCY_STRATEGY;
- typedef ACE_Scheduling_Strategy<SVC_HANDLER> SCHEDULING_STRATEGY;
-
- // = Strategy objects.
-
- CREATION_STRATEGY *creation_strategy_;
- // Creation strategy for an Acceptor.
-
- int delete_creation_strategy_;
- // 1 if <Acceptor> created the creation strategy and thus should
- // delete it, else 0.
-
- ACCEPT_STRATEGY *accept_strategy_;
- // Accept strategy for an <Acceptor>.
-
- int delete_accept_strategy_;
- // 1 if <Acceptor> created the accept strategy and thus should delete
- // it, else 0.
-
- CONCURRENCY_STRATEGY *concurrency_strategy_;
- // Concurrency strategy for an <Acceptor>.
-
- int delete_concurrency_strategy_;
- // 1 if <Acceptor> created the concurrency strategy and thus should
- // delete it, else 0.
-
- SCHEDULING_STRATEGY *scheduling_strategy_;
- // Scheduling strategy for an <Acceptor>.
-
- int delete_scheduling_strategy_;
- // 1 if <Acceptor> created the scheduling strategy and thus should
- // delete it, else 0.
-
- // = Service information objects.
-
- ACE_TCHAR *service_name_;
- // Name of the service.
-
- ACE_TCHAR *service_description_;
- // Description of the service.
-
- u_short service_port_;
- // Port number for the server.
-
- ACE_PEER_ACCEPTOR_ADDR service_addr_;
- // Address that the <Strategy_Acceptor> uses to listen for
- // connections.
-};
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-class ACE_Oneshot_Acceptor : public ACE_Service_Object
-{
- // = TITLE
- // Generic factory for passively connecting clients and creating
- // exactly one service handler (SVC_HANDLER).
- //
- // = DESCRIPTION
- // This class works similarly to the regular <ACE_Acceptor>,
- // with the following differences:
- //
- // 1. This class doesn't automagically register <this> with the
- // <ACE_Reactor> since it expects to have its <accept> method
- // called directly. However, it stashes the <ACE_Reactor>
- // pointer away in case it's needed later to finish accepting
- // a connection asynchronously.
- //
- // 2. The class doesn't need an <ACE_Creation_Strategy> (since
- // the user supplies the SVC_HANDLER) or an
- // <ACE_Accept_Strategy> (since this class only accepts one
- // connection and then removes all traces of itself from the
- // <ACE_Reactor> if it was registered for asynchronous
- // accepts).
-public:
- // = Initialization and termination methods.
- ACE_Oneshot_Acceptor (void);
- // Constructor.
-
- ACE_Oneshot_Acceptor (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
- ACE_Reactor *reactor = ACE_Reactor::instance (),
- ACE_Concurrency_Strategy<SVC_HANDLER> * = 0);
- // Initialize the appropriate strategies for concurrency and then
- // open the <peer_acceptor> at the designated <local_addr>. Note
- // that unlike the <ACE_Acceptor> and <ACE_Strategy_Acceptor>, this
- // method does NOT register <this> acceptor with the <reactor> at
- // this point -- it just stashes the <reactor> away in case it's
- // needed later.
-
- int open (const ACE_PEER_ACCEPTOR_ADDR &,
- ACE_Reactor *reactor = ACE_Reactor::instance (),
- ACE_Concurrency_Strategy<SVC_HANDLER> * = 0);
- // Initialize the appropriate strategies for concurrency and then
- // open the <peer_acceptor> at the designated <local_addr>. Note
- // that unlike the <ACE_Acceptor> and <ACE_Strategy_Acceptor>, this
- // method does NOT register <this> acceptor with the <reactor> at
- // this point -- it just stashes the <reactor> away in case it's
- // needed later.
-
- virtual ~ACE_Oneshot_Acceptor (void);
- // Close down the <Oneshot_Acceptor>.
-
- // = Explicit factory operation.
- virtual int accept (SVC_HANDLER * = 0,
- ACE_PEER_ACCEPTOR_ADDR *remote_addr = 0,
- const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults,
- int restart = 1,
- int reset_new_handle = 0);
- // Create a <SVC_HANDLER>, accept the connection into the
- // <SVC_HANDLER>, and activate the <SVC_HANDLER>.
-
- virtual int cancel (void);
- // Cancel a oneshot acceptor that was started asynchronously.
-
- virtual operator ACE_PEER_ACCEPTOR &() const;
- // Return the underlying <PEER_ACCEPTOR> object.
-
- virtual ACE_PEER_ACCEPTOR &acceptor (void) const;
- // Return the underlying <PEER_ACCEPTOR> object.
-
- virtual int close (void);
- // Close down the <Oneshot_Acceptor>.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler);
- // Bridge method for activating a <svc_handler> with the appropriate
- // concurrency strategy. Default behavior is to activate the
- // <SVC_HANDLER> as a "passive object." However, subclasses can
- // override this strategy to do more sophisticated concurrency
- // activations (such as creating the <SVC_HANDLER> as an "active
- // object" via multi-threading or multi-processing).
-
- int shared_accept (SVC_HANDLER *svc_handler,
- ACE_PEER_ACCEPTOR_ADDR *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle);
- // Factors out the code shared between the <accept> and
- // <handle_input> methods.
-
- // = Demultiplexing hooks.
- virtual ACE_HANDLE get_handle (void) const;
- // Returns the listening acceptor's <ACE_HANDLE>.
-
- virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK);
- // Perform termination activities when <this> is removed from the
- // <reactor>.
-
- virtual int handle_input (ACE_HANDLE);
- // Accept one connection from a client and activates the
- // SVC_HANDLER.
-
- virtual int handle_timeout (const ACE_Time_Value &tv,
- const void *arg);
- // Called when an acceptor times out...
-
- // = Dynamic linking hooks.
- virtual int init (int argc, ACE_TCHAR *argv[]);
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
- virtual int fini (void);
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
- virtual int info (ACE_TCHAR **, size_t) const;
- // Default version returns address info in <buf>.
-
- // = Service management hooks.
- virtual int suspend (void);
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
- virtual int resume (void);
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
-private:
- int register_handler (SVC_HANDLER *svc_handler,
- const ACE_Synch_Options &options,
- int restart);
- // Insert ourselves into the <ACE_Reactor> so that we can continue
- // accepting this connection asynchronously. This method should NOT
- // be called by developers directly.
-
- SVC_HANDLER *svc_handler_;
- // Hold the svc_handler_ across asynchrony boundaries.
-
- int restart_;
- // Hold the restart flag across asynchrony boundaries.
-
- ACE_PEER_ACCEPTOR peer_acceptor_;
- // Factory that establishes connections passively.
-
- ACE_Concurrency_Strategy<SVC_HANDLER> *concurrency_strategy_;
- // Concurrency strategy for an Acceptor.
-
- int delete_concurrency_strategy_;
- // 1 if Acceptor created the concurrency strategy and thus should
- // delete it, else 0.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Acceptor.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Acceptor.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_ACCEPTOR_H */
diff --git a/ace/Activation_Queue.cpp b/ace/Activation_Queue.cpp
deleted file mode 100644
index 0072667f561..00000000000
--- a/ace/Activation_Queue.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// Activation_Queue.cpp
-// $Id$
-
-
-#include "ace/Activation_Queue.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Activation_Queue.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Activation_Queue, "$Id$")
-
-// Dump the state of an object.
-
-void
-ACE_Activation_Queue::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("delete_queue_ = %d\n"),
- this->delete_queue_));
- ACE_DEBUG ((LM_INFO, ACE_TEXT ("queue_: \n")));
- if (this->queue_)
- this->queue_->dump();
- else
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(NULL)\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Activation_Queue::ACE_Activation_Queue (ACE_Message_Queue<ACE_SYNCH> *new_queue)
- : delete_queue_ (0)
-{
- if (new_queue)
- this->queue_ = new_queue;
- else
- {
- ACE_NEW (this->queue_,
- ACE_Message_Queue<ACE_SYNCH>);
- this->delete_queue_ = 1;
- }
-}
-
-ACE_Activation_Queue::~ACE_Activation_Queue (void)
-{
- if (this->delete_queue_ != 0)
- delete this->queue_;
-}
-
-ACE_Method_Request *
-ACE_Activation_Queue::dequeue (ACE_Time_Value *tv)
-{
- ACE_Message_Block *mb;
-
- // Dequeue the message.
- if (this->queue_->dequeue_head (mb, tv) != -1)
- {
- // Get the next <Method_Request>.
- ACE_Method_Request *mo =
- ACE_reinterpret_cast (ACE_Method_Request *,
- mb->base ());
-
- // Delete the message block.
- mb->release ();
- return mo;
- }
- else
- return 0;
-}
-
-int
-ACE_Activation_Queue::enqueue (ACE_Method_Request *mo,
- ACE_Time_Value *tv)
-{
- ACE_Message_Block *mb;
-
- ACE_NEW_RETURN (mb,
- ACE_Message_Block ((char *) mo,
- sizeof (*mo),
- mo->priority ()),
- -1);
-
- // Enqueue in priority order.
- return this->queue_->enqueue_prio (mb, tv);
-}
-
diff --git a/ace/Activation_Queue.h b/ace/Activation_Queue.h
deleted file mode 100644
index 3ad3ac04b0d..00000000000
--- a/ace/Activation_Queue.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Activation_Queue.h
-//
-// = AUTHOR
-// Andres Kruse <Andres.Kruse@cern.ch> and Douglas C. Schmidt
-// <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_ACTIVATION_QUEUE_H
-#define ACE_ACTIVATION_QUEUE_H
-#include "ace/pre.h"
-
-#include "ace/Synch_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Message_Queue.h"
-#include "ace/Method_Request.h"
-
-// Be compatible with the terminology in the POSA2 book!
-#define ACE_Activation_List ACE_Activation_Queue
-
-class ACE_Export ACE_Activation_Queue
-{
- // = TITLE
- // Reifies a method into a request. Subclasses typically
- // represent necessary state and behavior.
- //
- // = DESCRIPTION
- // A <Method_Request> is inserted in the <Activation_Queue>,
- // where it is subsequently removed by the <Scheduler>, which
- // invokes its <call> method..
-public:
- // = Initialization and termination methods.
- ACE_Activation_Queue (ACE_Message_Queue<ACE_SYNCH> *new_queue = 0);
- // Constructor.
-
- virtual ~ACE_Activation_Queue (void);
- // Destructor.
-
- // = Activate Queue operations.
-
- // For the following two methods if <timeout> == 0, the caller will
- // block until action is possible, else will wait until the absolute
- // time specified in *<timeout> elapses. These calls will return,
- // however, when queue is closed, deactivated, when a signal occurs,
- // or if the time specified in timeout elapses, (in which case errno
- // = EWOULDBLOCK).
-
- ACE_Method_Request *dequeue (ACE_Time_Value *tv = 0);
- // Dequeue the next available <Method_Request>.
-
- int enqueue (ACE_Method_Request *new_method_request,
- ACE_Time_Value *tv = 0);
- // Enqueue the <Method_Request> in priority order. The priority is
- // determined by the <priority> method of the <new_message_request>.
-
- int method_count (void) const;
- // Get the current number of method objects in the queue.
-
- int is_empty (void) const;
- // Returns 1 if the queue is empty, 0 otherwise.
-
- int is_full (void) const;
- // Returns 1 if the queue is full, 0 otherwise.
-
- void dump (void) const;
- // Dump the state of an request.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_Message_Queue<ACE_SYNCH> *queue_;
- // Stores the <Method_Requests>.
-
- int delete_queue_;
- // Keeps track of whether we need to delete the queue.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Activation_Queue.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_ACTIVATION_QUEUE_H */
-
diff --git a/ace/Activation_Queue.i b/ace/Activation_Queue.i
deleted file mode 100644
index 0a70b9f6c49..00000000000
--- a/ace/Activation_Queue.i
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Activation_Queue.i
-
-ACE_INLINE int
-ACE_Activation_Queue::method_count (void) const
-{
- return queue_->message_count ();
-}
-
-ACE_INLINE int
-ACE_Activation_Queue::is_full (void) const
-{
- return queue_->is_full ();
-}
-
-ACE_INLINE int
-ACE_Activation_Queue::is_empty (void) const
-{
- return queue_->is_empty ();
-}
diff --git a/ace/Active_Map_Manager.cpp b/ace/Active_Map_Manager.cpp
deleted file mode 100644
index a01fb45d9b0..00000000000
--- a/ace/Active_Map_Manager.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id$
-
-#include "ace/Active_Map_Manager.h"
-
-ACE_RCSID(ace, Active_Map_Manager, "$Id$")
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Active_Map_Manager.i"
-#endif /* __ACE_INLINE__ */
-
diff --git a/ace/Active_Map_Manager.h b/ace/Active_Map_Manager.h
deleted file mode 100644
index 7395cf68f9d..00000000000
--- a/ace/Active_Map_Manager.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Active_Map_Manager.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_ACTIVE_MAP_MANAGER_H
-#define ACE_ACTIVE_MAP_MANAGER_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Active_Map_Manager_Key
-{
- // = TITLE
- // Key used in the Active Object Map.
- //
- // = DESCRIPTION
- // This key keeps information of the index and the generation
- // count of the slot it represents. Since the index information
- // is part of the key, lookups are super fast and predictable,
-public:
- ACE_Active_Map_Manager_Key (void);
- // Default constructor.
-
- ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index,
- ACE_UINT32 slot_generation);
- // Constructor given the <slot_index> and <slot_generation> number.
- // This is useful once the user has somehow recovered the
- // <slot_index> and <slot_generation> number from the client.
-
- ACE_UINT32 slot_index (void) const;
- void slot_index (ACE_UINT32 i);
- // Get/Set the <slot_index>.
-
- ACE_UINT32 slot_generation (void) const;
- void slot_generation (ACE_UINT32 g);
- // Get/Set the <slot_generation> number.
-
- static size_t size (void);
- // Size required to store information about active key.
-
- void decode (const void *data);
- // Recover state of active key from <data>. User must make sure
- // that <data> encoded using the <encode> method.
-
- void encode (void *data) const;
- // Encode state of the active key into <data>. <data> must be as
- // big as the value returned from <size>.
-
- int operator== (const ACE_Active_Map_Manager_Key &rhs) const;
- int operator!= (const ACE_Active_Map_Manager_Key &rhs) const;
- // Compare keys.
-
- // = This really should be protected but because of template
- // friends, they are not.
-
- void increment_slot_generation_count (void);
- // Increment the <slot_generation> number.
-
-private:
-
- struct key_data
- {
- // = TITLE
- // Data for the Active Object Map Key.
- //
- // = DESCRIPTION
- // This separate structure makes it easier to manage copying
- // the index and the generation to and from the user buffer.
-
- ACE_UINT32 slot_index_;
- // Slot index in the active map.
-
- ACE_UINT32 slot_generation_;
- // Slot generation number of <slot_index_> slot in the active map.
- };
-
- key_data key_data_;
- // Data for the Active Object Map Key.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Active_Map_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-// Include the templates here.
-#include "ace/Active_Map_Manager_T.h"
-
-#include "ace/post.h"
-#endif /* ACE_ACTIVE_MAP_MANAGER_H */
diff --git a/ace/Active_Map_Manager.i b/ace/Active_Map_Manager.i
deleted file mode 100644
index 486a595b2be..00000000000
--- a/ace/Active_Map_Manager.i
+++ /dev/null
@@ -1,87 +0,0 @@
-// $Id$
-
-ACE_INLINE
-ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (void)
-{
- // If you change ~0, please change ACE_Map_Manager::free_list_id()
- // accordingly.
- this->key_data_.slot_index_ = ~0;
- this->key_data_.slot_generation_ = 0;
-}
-
-ACE_INLINE
-ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index,
- ACE_UINT32 slot_generation)
-{
- this->key_data_.slot_index_ = slot_index;
- this->key_data_.slot_generation_ = slot_generation;
-}
-
-ACE_INLINE ACE_UINT32
-ACE_Active_Map_Manager_Key::slot_index (void) const
-{
- return this->key_data_.slot_index_;
-}
-
-ACE_INLINE ACE_UINT32
-ACE_Active_Map_Manager_Key::slot_generation (void) const
-{
- return this->key_data_.slot_generation_;
-}
-
-ACE_INLINE int
-ACE_Active_Map_Manager_Key::operator== (const ACE_Active_Map_Manager_Key &rhs) const
-{
- return
- this->key_data_.slot_index_ == rhs.key_data_.slot_index_ &&
- this->key_data_.slot_generation_ == rhs.key_data_.slot_generation_;
-}
-
-ACE_INLINE int
-ACE_Active_Map_Manager_Key::operator!= (const ACE_Active_Map_Manager_Key &rhs) const
-{
- return !this->operator== (rhs);
-}
-
-ACE_INLINE void
-ACE_Active_Map_Manager_Key::slot_index (ACE_UINT32 i)
-{
- this->key_data_.slot_index_ = i;
-}
-
-ACE_INLINE void
-ACE_Active_Map_Manager_Key::slot_generation (ACE_UINT32 g)
-{
- this->key_data_.slot_generation_ = g;
-}
-
-ACE_INLINE void
-ACE_Active_Map_Manager_Key::increment_slot_generation_count (void)
-{
- ++this->key_data_.slot_generation_;
-}
-
-/* static */
-ACE_INLINE size_t
-ACE_Active_Map_Manager_Key::size (void)
-{
- return sizeof (ACE_UINT32) + sizeof (ACE_UINT32);
-}
-
-ACE_INLINE void
-ACE_Active_Map_Manager_Key::decode (const void *data)
-{
- // Copy the information from the user buffer into the key.
- ACE_OS::memcpy (&this->key_data_,
- data,
- sizeof this->key_data_);
-}
-
-ACE_INLINE void
-ACE_Active_Map_Manager_Key::encode (void *data) const
-{
- // Copy the key data to the user buffer.
- ACE_OS::memcpy (data,
- &this->key_data_,
- sizeof this->key_data_);
-}
diff --git a/ace/Active_Map_Manager_T.cpp b/ace/Active_Map_Manager_T.cpp
deleted file mode 100644
index a544bc28fda..00000000000
--- a/ace/Active_Map_Manager_T.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// $Id$
-
-#ifndef ACE_ACTIVE_MAP_MANAGER_T_C
-#define ACE_ACTIVE_MAP_MANAGER_T_C
-
-#include "ace/Active_Map_Manager_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Active_Map_Manager_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Active_Map_Manager_T, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Active_Map_Manager)
-
-#endif /* ACE_ACTIVE_MAP_MANAGER_T_C */
diff --git a/ace/Active_Map_Manager_T.h b/ace/Active_Map_Manager_T.h
deleted file mode 100644
index 860f1168f3a..00000000000
--- a/ace/Active_Map_Manager_T.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Active_Map_Manager_T.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_ACTIVE_MAP_MANAGER_T_H
-#define ACE_ACTIVE_MAP_MANAGER_T_H
-#include "ace/pre.h"
-
-#include "ace/Map_Manager.h"
-#include "ace/Active_Map_Manager.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class T>
-class ACE_Active_Map_Manager : public ACE_Map_Manager<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex>
-{
- // = TITLE
- // Define a map abstraction that associates system generated
- // keys with user specified values.
- //
- // = DESCRIPTION
- // Since the key is system generated, searches are very fast and
- // take a constant amount of time.
-public:
-
- // = Traits.
- typedef ACE_Active_Map_Manager_Key key_type;
- typedef T mapped_type;
-
- typedef ACE_Map_Entry<ACE_Active_Map_Manager_Key, T> ENTRY;
- typedef ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> ITERATOR;
- typedef ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> REVERSE_ITERATOR;
-
- typedef ENTRY entry;
- typedef ITERATOR iterator;
- typedef REVERSE_ITERATOR reverse_iterator;
-
- // = Initialization and termination methods.
- ACE_Active_Map_Manager (ACE_Allocator *alloc = 0);
- // Initialize a <Active_Map_Manager> with the <ACE_DEFAULT_MAP_SIZE>.
-
- ACE_Active_Map_Manager (size_t size,
- ACE_Allocator *alloc = 0);
- // Initialize a <Active_Map_Manager> with <size> entries.
-
- ~ACE_Active_Map_Manager (void);
- // Close down a <Active_Map_Manager> and release dynamically
- // allocated resources.
-
- int open (size_t length = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0);
- // Initialize a <Active_Map_Manager> with size <length>.
-
- int close (void);
- // Close down a <Active_Map_Manager> and release dynamically
- // allocated resources.
-
- int bind (const T &value,
- ACE_Active_Map_Manager_Key &key);
- // Add <value> to the map, and the corresponding key produced by the
- // Active_Map_Manager is returned through <key>.
-
- int bind (const T &value);
- // Add <value> to the map. The user does not care about the
- // corresponding key produced by the Active_Map_Manager.
-
- int bind (ACE_Active_Map_Manager_Key &key,
- T *&internal_value);
- // Reserves a slot in the internal structure and returns the key and
- // a pointer to the value. User should place their <value> into
- // <*internal_value>. This method is useful in reducing the number
- // of copies required in some cases. Note that <internal_value> is
- // only a temporary pointer and will change when the map resizes.
- // Therefore, the user should use the pointer immediately and not
- // hold on to it.
-
- int rebind (const ACE_Active_Map_Manager_Key &key,
- const T &value);
- // Reassociate <key> with <value>. The function fails if <key> is
- // not in the map.
-
- int rebind (const ACE_Active_Map_Manager_Key &key,
- const T &value,
- T &old_value);
- // Reassociate <key> with <value>, storing the old value into the
- // "out" parameter <old_value>. The function fails if <key> is not
- // in the map.
-
- int rebind (const ACE_Active_Map_Manager_Key &key,
- const T &value,
- ACE_Active_Map_Manager_Key &old_key,
- T &old_value);
- // Reassociate <key> with <value>, storing the old key and value
- // into the "out" parameter <old_key> and <old_value>. The function
- // fails if <key> is not in the map.
-
- int find (const ACE_Active_Map_Manager_Key &key,
- T &value) const;
- // Locate <value> associated with <key>.
-
- int find (const ACE_Active_Map_Manager_Key &key) const;
- // Is <key> in the map?
-
- int find (const ACE_Active_Map_Manager_Key &key,
- T *&internal_value) const;
- // Locate <value> associated with <key>. The value is returned via
- // <internal_value> and hence a copy is saved. Note that
- // <internal_value> is only a temporary pointer and will change when
- // the map resizes. Therefore, the user should use the pointer
- // immediately and not hold on to it.
-
- // Creates a key. User should place their <value> into
- // <*internal_value>. This method is useful in reducing the number
- // of copies required in some cases.
-
- int unbind (const ACE_Active_Map_Manager_Key &key);
- // Remove <key> from the map.
-
- int unbind (const ACE_Active_Map_Manager_Key &key,
- T &value);
- // Remove <key> from the map, and return the <value> associated with
- // <key>.
-
- int unbind (const ACE_Active_Map_Manager_Key &key,
- T *&internal_value);
- // Locate <value> associated with <key>. The value is returned via
- // <internal_value> and hence a copy is saved. Note that
- // <internal_value> is only a temporary pointer and will change when
- // the map resizes or when this slot is reused. Therefore, the user
- // should use the pointer immediately and not hold on to it.
-
- size_t current_size (void) const;
- // Return the current size of the map.
-
- size_t total_size (void) const;
- // Return the total size of the map.
-
- static const ACE_Active_Map_Manager_Key npos (void);
- // Returns a key that cannot be found in the map.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL styled iterator factory functions.
-
- ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> begin (void);
- ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> end (void);
- // Return forward iterator.
-
- ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> rbegin (void);
- ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> rend (void);
- // Return reverse iterator.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
-
- typedef ACE_Map_Manager<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> ACE_AMM_BASE;
- // Private base class
-
-private:
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Active_Map_Manager<T> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Active_Map_Manager (const ACE_Active_Map_Manager<T> &))
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Active_Map_Manager_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Active_Map_Manager_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Active_Map_Manager_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_ACTIVE_MAP_MANAGER_T_H */
diff --git a/ace/Active_Map_Manager_T.i b/ace/Active_Map_Manager_T.i
deleted file mode 100644
index c98a302df2f..00000000000
--- a/ace/Active_Map_Manager_T.i
+++ /dev/null
@@ -1,302 +0,0 @@
-// $Id$
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::bind (ACE_Active_Map_Manager_Key &key,
- T *&internal_value)
-{
- size_t slot_index;
- int result = this->next_free (slot_index);
-
- if (result == 0)
- {
- // Move from free list to occupied list
- this->move_from_free_list_to_occupied_list (slot_index);
-
- // Reset the key.
- this->search_structure_[slot_index].ext_id_.increment_slot_generation_count ();
- this->search_structure_[slot_index].ext_id_.slot_index (slot_index);
-
- // Copy the key for the user.
- key = this->search_structure_[slot_index].ext_id_;
-
- // This is where the user should place the value.
- internal_value = &this->search_structure_[slot_index].int_id_;
-
- // Update the current size.
- ++this->cur_size_;
- }
-
- return result;
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::bind (const T &value,
- ACE_Active_Map_Manager_Key &key)
-{
- T *internal_value = 0;
- int result = this->bind (key,
- internal_value);
-
- if (result == 0)
- {
- // Store new value.
- *internal_value = value;
- }
-
- return result;
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::bind (const T &value)
-{
- ACE_Active_Map_Manager_Key key;
- return this->bind (value, key);
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::find (const ACE_Active_Map_Manager_Key &key,
- T *&internal_value) const
-{
- size_t slot_index = key.slot_index ();
- size_t slot_generation = key.slot_generation ();
-
- if (slot_index > this->total_size_ ||
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
- this->search_structure_[slot_index].free_ ||
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
- this->search_structure_[slot_index].ext_id_.slot_generation () != slot_generation ||
- this->search_structure_[slot_index].ext_id_.slot_index () == this->free_list_id ())
- {
- return -1;
- }
- else
- {
- // This is where the user value is.
- internal_value = &this->search_structure_[slot_index].int_id_;
- }
-
- return 0;
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::find (const ACE_Active_Map_Manager_Key &key) const
-{
- T *internal_value = 0;
- return this->find (key,
- internal_value);
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::find (const ACE_Active_Map_Manager_Key &key,
- T &value) const
-{
- T *internal_value = 0;
- int result = this->find (key,
- internal_value);
-
- if (result == 0)
- value = *internal_value;
-
- return result;
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::rebind (const ACE_Active_Map_Manager_Key &key,
- const T &value)
-{
- int result = this->find (key);
-
- if (result == 0)
- {
- // Store new value.
- this->search_structure_[key.slot_index ()].int_id_ = value;
- }
-
- return result;
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::rebind (const ACE_Active_Map_Manager_Key &key,
- const T &value,
- T &old_value)
-{
- int result = this->find (key);
-
- if (result == 0)
- {
- // Copy old value.
- old_value = this->search_structure_[key.slot_index ()].int_id_;
-
- // Store new value.
- this->search_structure_[key.slot_index ()].int_id_ = value;
- }
-
- return result;
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::rebind (const ACE_Active_Map_Manager_Key &key,
- const T &value,
- ACE_Active_Map_Manager_Key &old_key,
- T &old_value)
-{
- int result = this->find (key);
-
- if (result == 0)
- {
- // Copy old key.
- old_key = this->search_structure_[key.slot_index ()].ext_id_;
-
- // Copy old value.
- old_value = this->search_structure_[key.slot_index ()].int_id_;
-
- // Store new value.
- this->search_structure_[key.slot_index ()].int_id_ = value;
- }
-
- return result;
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::unbind (const ACE_Active_Map_Manager_Key &key,
- T *&internal_value)
-{
- int result = this->find (key,
- internal_value);
-
- if (result == 0)
- {
- size_t slot_index = key.slot_index ();
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- //
- // In the case of lazy map managers, the movement of free slots
- // from the occupied list to the free list is delayed until we
- // run out of free slots in the free list.
- //
-
- this->search_structure_[slot_index].free_ = 1;
-
-#else
-
- // Move from occupied list to free list.
- this->move_from_occupied_list_to_free_list (slot_index);
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
- // Reset the slot_index. This will tell us that this entry is free.
- this->search_structure_[slot_index].ext_id_.slot_index (this->free_list_id ());
-
- // Update the current size.
- --this->cur_size_;
- }
-
- return result;
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::unbind (const ACE_Active_Map_Manager_Key &key,
- T &value)
-{
- T *internal_value;
- int result = this->unbind (key,
- internal_value);
-
- if (result == 0)
- {
- // Copy old value.
- value = *internal_value;
- }
-
- return result;
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::unbind (const ACE_Active_Map_Manager_Key &key)
-{
- T *internal_value;
- return this->unbind (key,
- internal_value);
-}
-
-template <class T> ACE_INLINE
-ACE_Active_Map_Manager<T>::ACE_Active_Map_Manager (ACE_Allocator *alloc)
- : ACE_AMM_BASE (alloc)
-{
-}
-
-template <class T> ACE_INLINE
-ACE_Active_Map_Manager<T>::ACE_Active_Map_Manager (size_t size,
- ACE_Allocator *alloc)
- : ACE_AMM_BASE (size,
- alloc)
-{
-}
-
-template <class T> ACE_INLINE
-ACE_Active_Map_Manager<T>::~ACE_Active_Map_Manager (void)
-{
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::open (size_t length,
- ACE_Allocator *alloc)
-{
- return ACE_AMM_BASE::open (length, alloc);
-}
-
-template <class T> ACE_INLINE int
-ACE_Active_Map_Manager<T>::close (void)
-{
- return ACE_AMM_BASE::close ();
-}
-
-template <class T> ACE_INLINE size_t
-ACE_Active_Map_Manager<T>::current_size (void) const
-{
- return ACE_AMM_BASE::current_size ();
-}
-
-template <class T> ACE_INLINE size_t
-ACE_Active_Map_Manager<T>::total_size (void) const
-{
- return ACE_AMM_BASE::total_size ();
-}
-
-/* static */
-template <class T> ACE_INLINE const ACE_Active_Map_Manager_Key
-ACE_Active_Map_Manager<T>::npos (void)
-{
- return ACE_Active_Map_Manager_Key (~0, ~0);
-}
-
-template <class T> ACE_INLINE void
-ACE_Active_Map_Manager<T>::dump (void) const
-{
- ACE_AMM_BASE::dump ();
-}
-
-template <class T> ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex>
-ACE_Active_Map_Manager<T>::begin (void)
-{
- return ACE_AMM_BASE::begin ();
-}
-
-template <class T> ACE_INLINE ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex>
-ACE_Active_Map_Manager<T>::end (void)
-{
- return ACE_AMM_BASE::end ();
-}
-
-template <class T> ACE_INLINE ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex>
-ACE_Active_Map_Manager<T>::rbegin (void)
-{
- return ACE_AMM_BASE::rbegin ();
-}
-
-template <class T> ACE_INLINE ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex>
-ACE_Active_Map_Manager<T>::rend (void)
-{
- return ACE_AMM_BASE::rend ();
-}
diff --git a/ace/Addr.cpp b/ace/Addr.cpp
deleted file mode 100644
index 460ccc48cb8..00000000000
--- a/ace/Addr.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// Addr.cpp
-// $Id$
-
-#include "ace/Addr.h"
-
-ACE_RCSID(ace, Addr, "$Id$")
-
-#if defined (ACE_HAS_BROKEN_SAP_ANY)
-#if defined (sap_any)
-#undef sap_any
-// Note: this object requires static construction and destruction.
-/* static */
-const ACE_Addr ace_sap_any (AF_ANY, -1);
-
-const ACE_Addr &
-ACE_Addr::sap_any (void)
-{
- return ace_sap_any;
-}
-#define sap_any sap_any()
-#endif /* sap_any */
-#else
-// Note: this object requires static construction and destruction.
-/* static */
-const ACE_Addr ACE_Addr::sap_any (AF_ANY, -1);
-#endif /* ACE_HAS_BROKEN_SAP_ANY */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Addr.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Addr)
-
-void
-ACE_Addr::dump (void) const
-{
- ACE_TRACE ("ACE_Addr::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("addr_type_ = %d"), this->addr_type_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\naddr_size_ = %d"), this->addr_size_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Initializes instance variables.
-
-void
-ACE_Addr::base_set (int type, int size)
-{
- this->addr_type_ = type;
- this->addr_size_ = size;
-}
-
-// Initializes instance variables. Note that 0 is an unspecified
-// protocol family type...
-
-ACE_Addr::ACE_Addr (int type, int size)
-{
- this->base_set (type, size);
-}
-
-ACE_Addr::~ACE_Addr (void)
-{
-}
diff --git a/ace/Addr.h b/ace/Addr.h
deleted file mode 100644
index 2420d3d891d..00000000000
--- a/ace/Addr.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Addr.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_ADDR_H
-#define ACE_ADDR_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Addr
-{
- // = TITLE
- // Defines the base class for the "address family independent"
- // address format.
-public:
- // = Initialization and termination methods.
- ACE_Addr (int type = -1,
- int size = -1);
- // Initializes instance variables.
-
- virtual ~ACE_Addr (void);
- // Destructor.
-
- // = Get/set the size of the address.
-
- int get_size (void) const;
- // Return the size of the address.
-
- void set_size (int size);
- // Sets the size of the address.
-
- // = Get/set the type of the address.
-
- int get_type (void) const;
- // Get the type of the address.
-
- void set_type (int type);
- // Set the type of the address.
-
- virtual void *get_addr (void) const;
- // Return a pointer to the address.
-
- virtual void set_addr (void *,
- int len);
- // Set a pointer to the address.
-
- // = Equality/inequality tests
- int operator == (const ACE_Addr &sap) const;
- // Check for address equality.
-
- int operator != (const ACE_Addr &sap) const;
- // Check for address inequality.
-
- void base_set (int type,
- int size);
- // Initializes instance variables.
-
-#if defined (ACE_HAS_BROKEN_SAP_ANY)
- static const ACE_Addr &sap_any (void);
- // Wild-card address.
-
- // This #define works around broken C++ compilers...
-#define sap_any sap_any()
-#else
- static const ACE_Addr sap_any;
- // Wild-card address.
-#endif /* ACE_HAS_BROKEN_SAP_ANY */
-
- virtual u_long hash (void) const;
- // Returns a hash value. This should be overwritten by a subclass
- // which can produce a better hash value.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- int addr_type_;
- // e.g., AF_UNIX, AF_INET, AF_SPIPE, etc.
-
- int addr_size_;
- // Number of bytes in the address.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Addr.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_ADDR_H */
diff --git a/ace/Addr.i b/ace/Addr.i
deleted file mode 100644
index db4f4e605c8..00000000000
--- a/ace/Addr.i
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Addr.i
-
-// Return the address of the address.
-
-ACE_INLINE void *
-ACE_Addr::get_addr (void) const
-{
- return 0;
-}
-
-ACE_INLINE void
-ACE_Addr::set_addr (void *, int)
-{
-}
-
-ACE_INLINE int
-ACE_Addr::operator == (const ACE_Addr &sap) const
-{
- return (sap.addr_type_ == this->addr_type_ &&
- sap.addr_size_ == this->addr_size_ );
-}
-
-ACE_INLINE int
-ACE_Addr::operator != (const ACE_Addr &sap) const
-{
- return (sap.addr_type_ != this->addr_type_ ||
- sap.addr_size_ != this->addr_size_ );
-}
-
-// Return the size of the address.
-
-ACE_INLINE int
-ACE_Addr::get_size (void) const
-{
- return this->addr_size_;
-}
-
-// Sets the size of the address.
-
-ACE_INLINE void
-ACE_Addr::set_size (int size)
-{
- this->addr_size_ = size;
-}
-
-// Return the type of the address.
-
-ACE_INLINE int
-ACE_Addr::get_type (void) const
-{
- return this->addr_type_;
-}
-
-// Set the type of the address.
-
-ACE_INLINE void
-ACE_Addr::set_type (int type)
-{
- this->addr_type_ = type;
-}
-
-ACE_INLINE u_long
-ACE_Addr::hash (void) const
-{
- return 0;
-}
diff --git a/ace/Arg_Shifter.cpp b/ace/Arg_Shifter.cpp
deleted file mode 100644
index ec7e8127b8c..00000000000
--- a/ace/Arg_Shifter.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-// $Id$
-
-// #include "ace/OS.h"
-#include "ace/Arg_Shifter.h"
-
-ACE_RCSID(ace, Arg_Shifter, "$Id$")
-
-ACE_Arg_Shifter::ACE_Arg_Shifter (int& argc,
- ACE_TCHAR** argv,
- ACE_TCHAR** temp)
- : argc_ (argc),
- total_size_ (argc),
- temp_ (temp),
- argv_ (argv),
- current_index_ (0),
- back_ (argc - 1),
- front_ (0)
-{
- // If not provided with one, allocate a temporary array.
- if (this->temp_ == 0)
- ACE_NEW (this->temp_,
- ACE_TCHAR*[this->total_size_]);
-
- if (this->temp_ != 0)
- {
- // Fill the temporary array.
- this->argc_ = 0;
- for (int i = 0; i < this->total_size_; i++)
- {
- this->temp_[i] = this->argv_[i];
- this->argv_[i] = 0;
- }
- }
- else
- {
- // Allocation failed, prohibit iteration.
- this->current_index_ = this->argc_;
- this->front_ = this->argc_;
- }
-}
-
-ACE_Arg_Shifter::~ACE_Arg_Shifter (void)
-{
- // Delete the temporary vector.
- delete [] temp_;
-}
-
-ACE_TCHAR*
-ACE_Arg_Shifter::get_current (void) const
-{
- ACE_TCHAR* retval = 0;
-
- if (this->is_anything_left ())
- retval = this->temp_[current_index_];
-
- return retval;
-}
-
-ACE_TCHAR*
-ACE_Arg_Shifter::get_the_parameter (const ACE_TCHAR *flag)
-{
- // the return 0's abound because this method
- // would otherwise be a deep if { } else { }
-
- // check to see if any arguments still exist
- if (!this->is_anything_left())
- return 0;
-
- // check to see if the flag is the argument
- int offset = this->cur_arg_strncasecmp (flag);
- if (offset == -1)
- return 0;
-
- if (offset == 0)
- {
- this->consume_arg ();
-
- if (!this->is_parameter_next())
- {
- return 0;
- }
- }
- // the paramter is in the middle somewhere...
- return this->temp_[current_index_] + offset;
-}
-
-int
-ACE_Arg_Shifter::cur_arg_strncasecmp (const ACE_TCHAR *flag)
-{
- // Check for a current argument
- if (this->is_anything_left())
- {
- unsigned int flag_length = ACE_OS::strlen(flag);
-
- // Check for presence of the flag
- if (ACE_OS::strncasecmp(this->temp_[current_index_],
- flag,
- flag_length) == 0)
- {
- if (ACE_OS::strlen(temp_[current_index_]) ==
- flag_length)
- {
- // match and lengths are equal
- return 0;
- }
- else
- {
- // matches, with more info to boot!
- return ACE_OS::strspn
- (this->temp_[current_index_] + flag_length,
- ACE_TEXT (" ")) + flag_length;
- }
- }
- }
- // failure
- return -1;
-}
-
-int
-ACE_Arg_Shifter::consume_arg (int number)
-{
- int retval = 0;
-
- // Stick knowns at the end of the vector (consumed).
- if (this->is_anything_left() >= number)
- {
- for (int i = 0, j = this->back_ - (number - 1);
- i < number;
- ++i, ++j, ++this->current_index_)
- this->argv_[j] = this->temp_[this->current_index_];
-
- this->back_ -= number;
- retval = 1;
- }
-
- return retval;
-}
-
-int
-ACE_Arg_Shifter::ignore_arg (int number)
-{
- int retval = 0;
-
- // Keep unknowns at the head of the vector.
- if (this->is_anything_left () >= number)
- {
- for (int i = 0;
- i < number;
- i++, this->current_index_++, this->front_++)
- this->argv_[this->front_] = this->temp_[this->current_index_];
-
- retval = 1;
- this->argc_ += number;
- }
-
- return retval;
-}
-
-int
-ACE_Arg_Shifter::is_anything_left (void) const
-{
- return this->total_size_ - this->current_index_;
-}
-
-int
-ACE_Arg_Shifter::is_option_next (void) const
-{
- return this->is_anything_left () &&
- this->temp_[this->current_index_][0] == '-';
-}
-
-int
-ACE_Arg_Shifter::is_parameter_next (void) const
-{
- return this->is_anything_left ()
- && this->temp_[this->current_index_][0] != '-';
-}
-
-int
-ACE_Arg_Shifter::num_ignored_args (void) const
-{
- return this->front_;
-}
diff --git a/ace/Arg_Shifter.h b/ace/Arg_Shifter.h
deleted file mode 100644
index 4ae9b7a1262..00000000000
--- a/ace/Arg_Shifter.h
+++ /dev/null
@@ -1,167 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// $Id$
-
-// ========================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Arg_Shifter.h
-//
-// = AUTHOR
-// Seth Widoff
-//
-// ========================================================================
-
-#ifndef ACE_ARG_SHIFTER_H
-#define ACE_ARG_SHIFTER_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-
-class ACE_Export ACE_Arg_Shifter
-{
- // = TITLE
- // This ADT shifts known args to the back of the argv vector, so
- // deeper levels of argument parsing can locate the yet
- // unprocessed arguments at the beginning of the vector.
- //
- // = DESCRIPTION
- // The <ACE_Arg_Shifter> copies the pointers of the argv vector
- // into a temporary array. As the <ACE_Arg_Shifter> iterates over
- // the temp, is places known arguments in the rear of the argv
- // and unknown ones in the beginning. So, after having visited
- // all the arguments in the temp vector, <ACE_Arg_Shifter> has
- // placed all the unknown arguments in their original order at
- // the front of argv.
-public:
- // = Initialization and termination methods.
- ACE_Arg_Shifter (int& argc,
- ACE_TCHAR **argv,
- ACE_TCHAR **temp = 0);
- // Initialize the <ACE_Arg_Shifter> to the vector over which to
- // iterate, also providing the temporary array if the client doesn't
- // want the arg_shifter to dynamically allocate its own. If internal
- // dynamic allocation fails, the <ACE_Arg_Shifter> will set all the
- // indices to the end of the vector, forbidding iteration. Following
- // iteration over argv, the argc value will contain the number of
- // unconsumed arguments.
-
- ~ACE_Arg_Shifter (void);
- // Destructor.
-
- ACE_TCHAR *get_current (void) const;
- // Get the current head of the vector.
-
- ACE_TCHAR *get_the_parameter (const ACE_TCHAR* flag);
- // If the <flag> matches the current_arg of arg shifter
- // this method will attempt to return the associated
- // parameter value
- //
- // Safe to call without checking that a current arg exists
- //
- // In the following examples, a pointer to the char* "value" is ret
- //
- // eg: main -foobar value, main -FooBar value
- // main -FOOBARvalue
- //
- // all of the above will all match the <flag> == -FooBar
- // and will return a char* to "value"
- //
- // main -foobar 4 would succeed and return a char* to "4"
- // main -foobar -4 does not succeed (-4 is not a parameter)
- // but instead, would return 0
- //
- // 0 is returned:
- // If the current argument does not match flag
- // If there is no parameter found after a 'matched' flag
- //
- // If the flag is matched and the flag and paramter DO NOT RUN
- // together, the flag is consumed, the parameter is returned,
- // and the new current argument is the parameter value.
- // ie '-foobarflag VALUE' leaves the new cur arg == "VALUE"
- //
- // If the flag is matched and the flag and parameter RUN
- // together '-foobarflagVALUE', the flag is NOT consumed
- // and the cur arg is left pointing to the entire flag/value pair
-
- int cur_arg_strncasecmp (const ACE_TCHAR *flag);
- // Check if the current argument matches (case insensitive) <flag>
- //
- // ------------------------------------------------------------
- //
- // Case A: Perfect Match (case insensitive)
- // 0 is returned.
- //
- // ie: when current_arg = "-foobar" or "-FOOBAR" or "-fooBAR"
- // this->cur_arg_strncasecmp ("-FooBar);
- // will return 0
- //
- // ------------------------------------------------------------
- //
- // Case B: Perfect Match (case insensitive) but the current_arg
- // is longer than the flag. Returns a number equal to the index
- // in the char* indicating the start of the extra characters
- //
- // ie: when current_arg = "-foobar98023"
- // this->cur_arg_strncasecmp ("-FooBar);
- // will return 7
- //
- // Notice: this number will always be > 0
- //
- // ------------------------------------------------------------
- //
- // Case C: If neither of Case A or B is met (no match)
- // then -1 is returned
-
- int consume_arg (int number = 1);
- // Consume <number> argument(s) by sticking them/it on the end of
- // the vector.
-
- int ignore_arg (int number = 1);
- // Place <number> arguments in the same relative order ahead of the
- // known arguemnts in the vector.
-
- int is_anything_left (void) const;
- // Returns the number of args left to see in the vector.
-
- int is_option_next (void) const;
- // Returns 1 if there's a next item in the vector and it begins with
- // '-'.
-
- int is_parameter_next (void) const;
- // Returns 1 if there's a next item in the vector and it doesn't
- // begin with '-'.
-
- int num_ignored_args (void) const;
- // Returns the number of irrelevant args seen.
-
-private:
- int& argc_;
- // The size of the argument vector.
-
- int total_size_;
- // The size of argv_.
-
- ACE_TCHAR **temp_;
- // The temporary array over which we traverse.
-
- ACE_TCHAR **argv_;
- // The array in which the arguments are reordered.
-
- int current_index_;
- // The element in <temp_> we're currently examining.
-
- int back_;
- // The index of <argv_> in which we'll stick the next unknown
- // argument.
-
- int front_;
- // The index of <argv_> in which we'll stick the next known
- // argument.
-};
-
-#include "ace/post.h"
-#endif /* ACE_ARG_SHIFTER_H */
diff --git a/ace/Array.h b/ace/Array.h
deleted file mode 100644
index b095ba726d0..00000000000
--- a/ace/Array.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Array.h
-//
-// = DESCRIPTION
-// NOTE: this file has been deprecated and will soon go away. You
-// should directly include "Containers_T.h" instead.
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_ARRAY_H
-#define ACE_ARRAY_H
-#include "ace/pre.h"
-
-#include "ace/Containers_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/post.h"
-#endif /* ACE_ARRAY_H */
diff --git a/ace/Asynch_Acceptor.cpp b/ace/Asynch_Acceptor.cpp
deleted file mode 100644
index 686ccff660d..00000000000
--- a/ace/Asynch_Acceptor.cpp
+++ /dev/null
@@ -1,476 +0,0 @@
-// $Id$
-
-#ifndef ACE_ASYNCH_ACCEPTOR_C
-#define ACE_ASYNCH_ACCEPTOR_C
-
-#include "ace/Asynch_Acceptor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID(ace, Asynch_Acceptor, "$Id$")
-
-#if defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)
-// This only works on platforms that support async i/o.
-
-#include "ace/Message_Block.h"
-#include "ace/INET_Addr.h"
-
-template <class HANDLER>
-ACE_Asynch_Acceptor<HANDLER>::ACE_Asynch_Acceptor (void)
- : listen_handle_ (ACE_INVALID_HANDLE),
- pass_addresses_ (0),
- validate_new_connection_ (0),
- reissue_accept_ (1),
- bytes_to_read_ (0)
-{
-}
-
-template <class HANDLER>
-ACE_Asynch_Acceptor<HANDLER>::~ACE_Asynch_Acceptor (void)
-{
- // Close down the listen socket
- if (this->listen_handle_ != ACE_INVALID_HANDLE)
- ACE_OS::closesocket (this->listen_handle_);
-}
-
-template <class HANDLER> int
-ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
- size_t bytes_to_read,
- int pass_addresses,
- int backlog,
- int reuse_addr,
- ACE_Proactor *proactor,
- int validate_new_connection,
- int reissue_accept,
- int number_of_initial_accepts)
-{
- this->proactor (proactor);
- this->pass_addresses_ = pass_addresses;
- this->bytes_to_read_ = bytes_to_read;
- this->validate_new_connection_ = validate_new_connection;
- this->reissue_accept_ = reissue_accept;
-
- // Create the listener socket
- this->listen_handle_ = ACE_OS::socket (PF_INET, SOCK_STREAM, 0);
- if (this->listen_handle_ == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_OS::socket")),
- -1);
- // Initialize the ACE_Asynch_Accept
- if (this->asynch_accept_.open (*this,
- this->listen_handle_,
- 0,
- this->proactor ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Asynch_Accept::open")),
- -1);
- if (reuse_addr)
- {
- // Reuse the address
- int one = 1;
- if (ACE_OS::setsockopt (this->listen_handle_,
- SOL_SOCKET,
- SO_REUSEADDR,
- (const char*) &one,
- sizeof one) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_OS::setsockopt")),
- -1);
- }
-
- // If port is not specified, bind to any port.
- static ACE_INET_Addr sa (ACE_sap_any_cast (const ACE_INET_Addr &));
-
- if (address == sa && ACE::bind_port (this->listen_handle_) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE::bind_port")),
- -1);
-
- // Bind to the specified port.
- if (ACE_OS::bind (this->listen_handle_,
- ACE_reinterpret_cast (sockaddr *,
- address.get_addr ()),
- address.get_size ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ACE_OS::bind"),
- -1);
-
- // Start listening.
- if (ACE_OS::listen (this->listen_handle_, backlog) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ACE_OS::listen"),
- -1);
-
- // For the number of <intial_accepts>.
- if (number_of_initial_accepts == -1)
- number_of_initial_accepts = backlog;
-
- for (int i = 0; i < number_of_initial_accepts; i++)
- // Initiate accepts.
- if (this->accept (bytes_to_read) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "ACE_Asynch_Acceptor::accept"),
- -1);
- return 0;
-}
-
-template <class HANDLER> void
-ACE_Asynch_Acceptor<HANDLER>::set_handle (ACE_HANDLE listen_handle)
-{
- // Take ownership of the <listen_handle>
- this->listen_handle_ = listen_handle;
-
- // Reinitialize the ACE_Asynch_Accept
- if (this->asynch_accept_.open (*this,
- this->listen_handle_,
- 0,
- this->proactor ()) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Asynch_Accept::open")));
-}
-
-template <class HANDLER> ACE_HANDLE
-ACE_Asynch_Acceptor<HANDLER>::get_handle (void) const
-{
- return this->listen_handle_;
-}
-
-template <class HANDLER> int
-ACE_Asynch_Acceptor<HANDLER>::accept (size_t bytes_to_read, const void *act)
-{
- ACE_Message_Block *message_block = 0;
- size_t space_needed = bytes_to_read + 2 * this->address_size ();
-
- // Create a new message block big enough for the addresses and data
- ACE_NEW_RETURN (message_block,
- ACE_Message_Block (space_needed),
- -1);
-
- // Initiate asynchronous accepts
- if (this->asynch_accept_.accept (*message_block,
- bytes_to_read,
- ACE_INVALID_HANDLE,
- act) == -1)
- {
- // Cleanup on error
- message_block->release ();
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Asynch_Accept::accept")),
- -1);
- }
- return 0;
-}
-
-template <class HANDLER> void
-ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &result)
-{
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) || defined (ACE_HAS_AIO_CALLS)
- // @@ Just debugging.
- ACE_DEBUG ((LM_DEBUG, "%N:%l:handle_accept\n"));
-
- // Variable for error tracking
- int error = 0;
-
- // If the asynchronous accept fails.
- if (!error &&
- !result.success ())
- {
- error = 1;
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("AcceptEx")));
- }
-
-#if !defined (ACE_HAS_AIO_CALLS)
- // In order to use accept handle with other Window Sockets 1.1
- // functions, we call the setsockopt function with the
- // SO_UPDATE_ACCEPT_CONTEXT option. This option initializes the
- // socket so that other Windows Sockets routines to access the
- // socket correctly.
- if (!error &&
- ACE_OS::setsockopt (result.accept_handle (),
- SOL_SOCKET,
- SO_UPDATE_ACCEPT_CONTEXT,
- (char *) &this->listen_handle_,
- sizeof (this->listen_handle_)) == -1)
- {
- error = 1;
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p"),
- ACE_TEXT ("ACE_OS::setsockopt")));
- }
-#endif /* ACE_HAS_AIO_CALLS */
-
- // Parse address.
- ACE_INET_Addr local_address;
- ACE_INET_Addr remote_address;
- if (!error &&
- (this->validate_new_connection_ || this->pass_addresses_))
- // Parse the addresses.
- this->parse_address (result,
- remote_address,
- local_address);
-
- // Validate remote address
- if (!error &&
- this->validate_new_connection_ &&
- this->validate_new_connection (remote_address) == -1)
- {
- error = 1;
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("Address validation failed")));
- }
-
- HANDLER *new_handler = 0;
- if (!error)
- {
- // The Template method
- new_handler = this->make_handler ();
- if (new_handler == 0)
- {
- error = 1;
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("Making of new handler failed")));
- }
- }
-
- // If no errors
- if (!error)
- {
- // Update the Proactor.
- new_handler->proactor (this->proactor ());
-
- // Pass the addresses
- if (this->pass_addresses_)
- new_handler->addresses (remote_address,
- local_address);
-
- // Pass the ACT
- if (result.act () != 0)
- new_handler->act (result.act ());
-
- // Initiate the handler
- new_handler->open (result.accept_handle (),
- result.message_block ());
- }
-
- // On failure, no choice but to close the socket
- if (error)
- ACE_OS::closesocket (result.accept_handle ());
-
- // Delete the dynamically allocated message_block
- result.message_block ().release ();
-
- // Start off another asynchronous accept to keep the backlog going
- if (this->should_reissue_accept ())
- this->accept (this->bytes_to_read_);
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) || defined (ACE_HAS_AIO_CALLS */
-}
-
-template <class HANDLER> int
-ACE_Asynch_Acceptor<HANDLER>::validate_new_connection (const ACE_INET_Addr &remote_address)
-{
- ACE_UNUSED_ARG (remote_address);
-
- // Default implemenation always validates the remote address.
- return 0;
-}
-
-template <class HANDLER> int
-ACE_Asynch_Acceptor<HANDLER>::cancel (void)
-{
- // All I/O operations that are canceled will complete with the error
- // ERROR_OPERATION_ABORTED. All completion notifications for the I/O
- // operations will occur normally.
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) \
- && ( (defined (_MSC_VER) && (_MSC_VER > 1020)) \
- || (defined (__BORLANDC__) && (__BORLANDC__ >= 0x530)))
- return (int) ::CancelIo (this->listen_handle_);
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && ((defined (_MSC_VER) && (_MSC_VER > 1020)) || (defined (__BORLANDC__) && (__BORLANDC__ >= 0x530))) */
-}
-
-template <class HANDLER> void
-ACE_Asynch_Acceptor<HANDLER>::parse_address (const
- ACE_Asynch_Accept::Result &result,
- ACE_INET_Addr &remote_address,
- ACE_INET_Addr &local_address)
-{
-#if defined (ACE_HAS_AIO_CALLS)
- // Getting the addresses.
- sockaddr_in local_addr;
- sockaddr_in remote_addr;
-
- // Get the length.
- int local_size = sizeof (local_addr);
- int remote_size = sizeof (remote_addr);
-
- // Get the local address.
- if (ACE_OS::getsockname (result.accept_handle (),
- ACE_reinterpret_cast (sockaddr *,
- &local_addr),
- &local_size) < 0)
- ACE_ERROR ((LM_ERROR,
- "%p\n",
- "ACE_Asynch_Acceptor::<getsockname> failed"));
-
- // Get the remote address.
- if (ACE_OS::getpeername (result.accept_handle (),
- ACE_reinterpret_cast (sockaddr *,
- &remote_addr),
- &remote_size) < 0)
- ACE_ERROR ((LM_ERROR,
- "%p\n",
- "ACE_Asynch_Acceptor::<getpeername> failed"));
-
- // Set the addresses.
- local_address.set_addr (&local_addr, local_size);
- remote_address.set_addr (&remote_addr, remote_size);
-
- // @@ Just debugging.
- char local_address_buf [BUFSIZ];
- char remote_address_buf [BUFSIZ];
- if (local_address.addr_to_string (local_address_buf,
- sizeof local_address_buf) == -1)
- ACE_ERROR ((LM_ERROR,
- "Error:%p:can't obtain local_address's address string"));
-
- ACE_DEBUG ((LM_DEBUG,
- "ACE_Asynch_Acceptor<HANDLER>::parse_address : "\
- "Local address %s\n",
- local_address_buf));
-
- if (remote_address.addr_to_string (remote_address_buf,
- sizeof remote_address_buf) == -1)
- ACE_ERROR ((LM_ERROR,
- "Error:%p:can't obtain remote_address's address string"));
-
- ACE_DEBUG ((LM_DEBUG,
- "ACE_Asynch_Acceptor<HANDLER>::parse_address : "\
- "Remote address %s\n",
- remote_address_buf));
-
-#elif (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
-
- ACE_Message_Block &message_block = result.message_block ();
-
- sockaddr *local_addr = 0;
- sockaddr *remote_addr = 0;
- int local_size = 0;
- int remote_size = 0;
-
- ::GetAcceptExSockaddrs (message_block.rd_ptr (),
- message_block.size () - 2 * this->address_size (),
- this->address_size (),
- this->address_size (),
- &local_addr,
- &local_size,
- &remote_addr,
- &remote_size);
-
- local_address.set_addr (ACE_reinterpret_cast (sockaddr_in *,
- local_addr),
- local_size);
- remote_address.set_addr (ACE_reinterpret_cast (sockaddr_in *,
- remote_addr),
- remote_size);
-#else
- // just in case
- errno = ENOTSUP;
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) */
-}
-
-template <class HANDLER> ACE_HANDLE
-ACE_Asynch_Acceptor<HANDLER>::handle (void) const
-{
- return this->listen_handle_;
-}
-
-template <class HANDLER> HANDLER *
-ACE_Asynch_Acceptor<HANDLER>::make_handler (void)
-{
- // Default behavior
- HANDLER *handler = 0;
- ACE_NEW_RETURN (handler,
- HANDLER,
- 0);
- return handler;
-}
-
-/* static */
-template <class HANDLER> size_t
-ACE_Asynch_Acceptor<HANDLER>::address_size (void)
-{
- return sizeof (sockaddr) + sizeof (sockaddr_in);
-}
-
-template <class HANDLER> int
-ACE_Asynch_Acceptor<HANDLER>::pass_addresses (void) const
-{
- return this->pass_addresses_;
-}
-
-template <class HANDLER> void
-ACE_Asynch_Acceptor<HANDLER>::pass_addresses (int new_value)
-{
- this->pass_addresses_ = new_value;
-}
-
-template <class HANDLER> int
-ACE_Asynch_Acceptor<HANDLER>::validate_new_connection (void) const
-{
- return this->validate_new_connection_;
-}
-
-template <class HANDLER> void
-ACE_Asynch_Acceptor<HANDLER>::validate_new_connection (int new_value)
-{
- this->validate_new_connection_ = new_value;
-}
-
-template <class HANDLER> int
-ACE_Asynch_Acceptor<HANDLER>::reissue_accept (void) const
-{
- return this->reissue_accept_;
-}
-
-template <class HANDLER> void
-ACE_Asynch_Acceptor<HANDLER>::reissue_accept (int new_value)
-{
- this->reissue_accept_ = new_value;
-}
-
-template <class HANDLER> int
-ACE_Asynch_Acceptor<HANDLER>::bytes_to_read (void) const
-{
- return this->bytes_to_read_;
-}
-
-template <class HANDLER> void
-ACE_Asynch_Acceptor<HANDLER>::bytes_to_read (int new_value)
-{
- this->bytes_to_read_ = new_value;
-}
-
-template <class HANDLER> int
-ACE_Asynch_Acceptor<HANDLER>::should_reissue_accept (void)
-{
- return this->reissue_accept_;
-}
-
-#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */
-#endif /* ACE_ASYNCH_ACCEPTOR_C */
diff --git a/ace/Asynch_Acceptor.h b/ace/Asynch_Acceptor.h
deleted file mode 100644
index 28bdff62967..00000000000
--- a/ace/Asynch_Acceptor.h
+++ /dev/null
@@ -1,183 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Asynch_Acceptor.h
-//
-// = AUTHOR
-// Irfan Pyarali (irfan@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_ASYNCH_ACCEPTOR_H
-#define ACE_ASYNCH_ACCEPTOR_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)
-// This only works on platforms that support async i/o.
-
-#include "ace/Asynch_IO.h"
-
-// Forward declarations
-class ACE_Message_Block;
-class ACE_INET_Addr;
-
-template <class HANDLER>
-class ACE_Asynch_Acceptor : public ACE_Handler
-{
- // = TITLE
- // This class is an example of the Acceptor Pattern. This class
- // will accept new connections and create new HANDLER to handle
- // the new connections.
- //
- // = DESCRIPTION
- // Unlike the <ACE_Acceptor>, however, this class is designed to
- // be used asynchronously.
-public:
- ACE_Asynch_Acceptor (void);
- // A do nothing constructor.
-
- virtual ~ACE_Asynch_Acceptor (void);
- // Virtual destruction
-
- virtual int open (const ACE_INET_Addr &address,
- size_t bytes_to_read = 0,
- int pass_addresses = 0,
- int backlog = ACE_DEFAULT_BACKLOG,
- int reuse_addr = 1,
- ACE_Proactor *proactor = 0,
- int validate_new_connection = 0,
- int reissue_accept = 1,
- int number_of_initial_accepts = -1);
- // This starts the listening process at the port specified by
- // <address>. ACE_Asynch_Acceptor initiates the AcceptEx calls with
- // <bytes_to_read>. The buffer for the initial data will be created
- // by ACE_Asynch_Acceptor. This buffer will be passed to the
- // handler in the <ACE_Service_Handler::open> callback. If this
- // buffer is required past the <open> callback, the
- // ACE_Service_Handler must copy the data. If the <pass_addresses>
- // flag is set, ACE_Asynch_Acceptor will call
- // <ACE_Service_Handler::addresses> before calling
- // <ACE_Service_Handler::open>. The <backlog> parameter specifies
- // the listen backlog and the outstanding AcceptEx calls.
- // <number_of_initial_accepts> is the number of asynchronous accepts
- // that are started at the end of <open>. If
- // <number_of_initial_accepts> is -1, then
- // <number_of_initial_accepts> is set to <backlog> and hence
- // <backlog> number of asynchronous accepts are started.
-
- virtual ACE_HANDLE get_handle (void) const;
- // Get the underlying handle.
-
- virtual void set_handle (ACE_HANDLE handle);
- // Set the underlying listen handle. It is the user's responsibility
- // to make sure that the old listen handle has been appropriately
- // closed and the all outstanding asynchronous operations have
- // either completed or have been canceled on the old listen handle.
-
- virtual int accept (size_t bytes_to_read = 0, const void *act = 0);
- // This initiates a new asynchronous accept through the <AcceptEx>
- // call.
-
- virtual int cancel (void);
- // This cancels all pending accepts operations that were issued by
- // the calling thread. The function does not cancel accept
- // operations issued by other threads.
-
- virtual int validate_new_connection (const ACE_INET_Addr &remote_address);
- // Template method for address validation.
- //
- // Default implemenation always validates the remote address.
-
- virtual int should_reissue_accept (void);
- // Template method for deciding whether to reissue accept.
- //
- // Default implemenation always returns this->reissue_accept_.
-
- //
- // These are low level tweaking methods
- //
-
- virtual int pass_addresses (void) const;
- virtual void pass_addresses (int new_value);
- // Set and get flag that indicates if parsing and passing of
- // addresses to the service_handler is necessary.
-
- virtual int validate_new_connection (void) const;
- virtual void validate_new_connection (int new_value);
- // Set and get flag that indicates if address validation is
- // required.
-
- virtual int reissue_accept (void) const;
- virtual void reissue_accept (int new_value);
- // Set and get flag that indicates if a new accept should be
- // reissued when a accept completes.
-
- virtual int bytes_to_read (void) const;
- virtual void bytes_to_read (int new_value);
- // Set and get bytes to be read with the <accept> call.
-
- static size_t address_size (void);
- // This is required by the AcceptEx call.
-
-protected:
-
- virtual void handle_accept (const ACE_Asynch_Accept::Result &result);
- // This is called when an outstanding accept completes.
-
- ACE_HANDLE handle (void) const;
- // Return the listen handle.
-
- void parse_address (const ACE_Asynch_Accept::Result &result,
- ACE_INET_Addr &remote_address,
- ACE_INET_Addr &local_address);
- // This parses the address from read buffer.
-
- virtual HANDLER *make_handler (void);
- // This is the template method used to create new handler.
- // Subclasses must overwrite this method if a new handler creation
- // strategy is required.
-
-private:
- ACE_HANDLE listen_handle_;
- // Handle used to listen for new connections.
-
- ACE_Asynch_Accept asynch_accept_;
- // <Asynch_Accept> used to make life easier :-)
-
- int pass_addresses_;
- // Flag that indicates if parsing of addresses is necessary.
-
- int validate_new_connection_;
- // Flag that indicates if address validation is required.
-
- int reissue_accept_;
- // Flag that indicates if a new accept should be reissued when a
- // accept completes.
-
- int bytes_to_read_;
- // Bytes to be read with the <accept> call.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Asynch_Acceptor.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Asynch_Acceptor.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */
-#include "ace/post.h"
-#endif /* ACE_ASYNCH_ACCEPTOR_H */
-
diff --git a/ace/Asynch_IO.cpp b/ace/Asynch_IO.cpp
deleted file mode 100644
index 2ac3e7c947f..00000000000
--- a/ace/Asynch_IO.cpp
+++ /dev/null
@@ -1,1024 +0,0 @@
-// $Id$
-
-#include "ace/Asynch_IO.h"
-
-ACE_RCSID(ace, Asynch_IO, "$Id$")
-
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
-// This only works on platforms with Asynchronous IO
-
-#include "ace/Proactor.h"
-#include "ace/Message_Block.h"
-#include "ace/INET_Addr.h"
-#include "ace/Asynch_IO_Impl.h"
-
-u_long
-ACE_Asynch_Result::bytes_transferred (void) const
-{
- return this->implementation ()->bytes_transferred ();
-}
-
-const void *
-ACE_Asynch_Result::act (void) const
-{
- return this->implementation ()->act ();
-}
-
-int
-ACE_Asynch_Result::success (void) const
-{
- return this->implementation ()->success ();
-}
-
-const void *
-ACE_Asynch_Result::completion_key (void) const
-{
- return this->implementation ()->completion_key ();
-}
-
-u_long
-ACE_Asynch_Result::error (void) const
-{
- return this->implementation ()->error ();
-}
-
-ACE_HANDLE
-ACE_Asynch_Result::event (void) const
-{
- return this->implementation ()->event ();
-}
-
-u_long
-ACE_Asynch_Result::offset (void) const
-{
- return this->implementation ()->offset ();
-}
-
-u_long
-ACE_Asynch_Result::offset_high (void) const
-{
- return this->implementation ()->offset_high ();
-}
-
-int
-ACE_Asynch_Result::priority (void) const
-{
- return this->implementation ()->priority ();
-}
-
-int
-ACE_Asynch_Result::signal_number (void) const
-{
- return this->implementation ()->signal_number ();
-}
-
-ACE_Asynch_Result::ACE_Asynch_Result (ACE_Asynch_Result_Impl *implementation)
- : implementation_ (implementation)
-{
-}
-
-ACE_Asynch_Result::~ACE_Asynch_Result (void)
-{
- // Proactor deletes the implementation when the <complete> finishes.
-}
-
-ACE_Asynch_Result_Impl *
-ACE_Asynch_Result::implementation (void) const
-{
- return this->implementation_;
-}
-
-// *********************************************************************
-
-int
-ACE_Asynch_Operation::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return this->implementation ()->open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_Asynch_Operation::cancel (void)
-{
- return this->implementation ()->cancel ();
-}
-
-ACE_Proactor *
-ACE_Asynch_Operation::proactor (void) const
-{
- return this->implementation ()->proactor ();
-}
-
-ACE_Asynch_Operation_Impl *
-ACE_Asynch_Operation::implementation (void) const
-{
- return this->implementation_;
-}
-
-ACE_Asynch_Operation::ACE_Asynch_Operation (void)
- : implementation_ (0)
-{
-}
-
-ACE_Asynch_Operation::~ACE_Asynch_Operation (void)
-{
- delete this->implementation_;
- this->implementation_ = 0;
-}
-
-void
-ACE_Asynch_Operation::implementation (ACE_Asynch_Operation_Impl *implementation)
-{
- this->implementation_ = implementation;
-}
-
-ACE_Proactor *
-ACE_Asynch_Operation::get_proactor (ACE_Proactor *user_proactor,
- ACE_Handler &handler) const
-{
- if (user_proactor == 0)
- {
- // Grab the singleton proactor if <handler->proactor> is zero
- user_proactor = handler.proactor ();
- if (user_proactor == 0)
- user_proactor = ACE_Proactor::instance ();
- }
-
- return user_proactor;
-}
-
-// ************************************************************
-
-ACE_Asynch_Read_Stream::ACE_Asynch_Read_Stream (void)
- : implementation_ (0)
-{
-}
-
-ACE_Asynch_Read_Stream::~ACE_Asynch_Read_Stream (void)
-{
-}
-
-int
-ACE_Asynch_Read_Stream::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- // Get a proactor for/from the user.
- proactor = this->get_proactor (proactor, handler);
-
- // Delete the old implementation.
- delete this->implementation_;
- this->implementation_ = 0;
-
- // Now let us get the implementation initialized.
- ACE_Asynch_Read_Stream_Impl *implementation = proactor->create_asynch_read_stream ();
- if (implementation == 0)
- return -1;
-
- // Set the implementation class
- this->implementation (implementation);
-
- // Call the <open> method of the base class.
- return ACE_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number)
-{
- return this->implementation ()->read (message_block,
- bytes_to_read,
- act,
- priority,
- signal_number);
-}
-
-ACE_Asynch_Read_Stream_Impl *
-ACE_Asynch_Read_Stream::implementation (void) const
-{
- return implementation_;
-}
-
-void
-ACE_Asynch_Read_Stream::implementation (ACE_Asynch_Read_Stream_Impl *implementation)
-{
- this->implementation_ = implementation;
-
- // Init the base class' implementation also.
- ACE_Asynch_Operation::implementation (this->implementation_);
-}
-
-// ************************************************************
-
-u_long
-ACE_Asynch_Read_Stream::Result::bytes_to_read (void) const
-{
- return this->implementation ()->bytes_to_read ();
-}
-
-ACE_Message_Block &
-ACE_Asynch_Read_Stream::Result::message_block (void) const
-{
- return this->implementation ()->message_block ();
-}
-
-ACE_HANDLE
-ACE_Asynch_Read_Stream::Result::handle (void) const
-{
- return this->implementation ()->handle ();
-}
-
-ACE_Asynch_Read_Stream::Result::Result (ACE_Asynch_Read_Stream_Result_Impl *implementation)
- : ACE_Asynch_Result (implementation),
- implementation_ (implementation)
-{
-}
-
-ACE_Asynch_Read_Stream::Result::~Result (void)
-{
- // Proactor will delete the implementation after <complete> is
- // finished.
-}
-
-ACE_Asynch_Read_Stream_Result_Impl *
-ACE_Asynch_Read_Stream::Result::implementation (void) const
-{
- return this->implementation_;
-}
-
-// ***************************************************
-
-ACE_Asynch_Write_Stream::ACE_Asynch_Write_Stream (void)
- : implementation_ (0)
-{
-}
-
-ACE_Asynch_Write_Stream::~ACE_Asynch_Write_Stream (void)
-{
-}
-
-int
-ACE_Asynch_Write_Stream::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- // Get a proactor for/from the user.
- proactor = this->get_proactor (proactor, handler);
-
- // Delete the old implementation.
- delete this->implementation_;
- this->implementation_ = 0;
-
- // Now let us get the implementation initialized.
- ACE_Asynch_Write_Stream_Impl *implementation = proactor->create_asynch_write_stream ();
- if (implementation == 0)
- return -1;
-
- // Set the implementation class
- this->implementation (implementation);
-
- // Call the <open> method of the base class.
- return ACE_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number)
-{
- return this->implementation ()->write (message_block,
- bytes_to_write,
- act,
- priority,
- signal_number);
-}
-
-ACE_Asynch_Write_Stream_Impl *
-ACE_Asynch_Write_Stream::implementation (void) const
-{
- return this->implementation_;
-}
-
-void
-ACE_Asynch_Write_Stream::implementation (ACE_Asynch_Write_Stream_Impl *implementation)
-{
- this->implementation_ = implementation;
-
- // Init the base class' implementation also.
- ACE_Asynch_Operation::implementation (this->implementation_);
-}
-
-// ************************************************************
-
-u_long
-ACE_Asynch_Write_Stream::Result::bytes_to_write (void) const
-{
- return this->implementation ()->bytes_to_write ();
-}
-
-ACE_Message_Block &
-ACE_Asynch_Write_Stream::Result::message_block (void) const
-{
- return this->implementation ()->message_block ();
-}
-
-ACE_HANDLE
-ACE_Asynch_Write_Stream::Result::handle (void) const
-{
- return this->implementation ()->handle ();
-}
-
-ACE_Asynch_Write_Stream::Result::Result (ACE_Asynch_Write_Stream_Result_Impl *implementation)
- : ACE_Asynch_Result (implementation),
- implementation_ (implementation)
-{
-}
-
-ACE_Asynch_Write_Stream::Result::~Result (void)
-{
- // Proactor will delte the implementation when the <complete> call
- // finishes.
-}
-
-ACE_Asynch_Write_Stream_Result_Impl *
-ACE_Asynch_Write_Stream::Result::implementation (void) const
-{
- return this->implementation_;
-}
-
-// ************************************************************
-
-ACE_Asynch_Read_File::ACE_Asynch_Read_File (void)
- : implementation_ (0)
-{
-}
-
-ACE_Asynch_Read_File::~ACE_Asynch_Read_File (void)
-{
-}
-
-int
-ACE_Asynch_Read_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- // Get a proactor for/from the user.
- proactor = this->get_proactor (proactor, handler);
-
- // Delete the old implementation.
- delete this->implementation_;
- this->implementation_ = 0;
-
- // Now let us get the implementation initialized.
- ACE_Asynch_Read_File_Impl *implementation = proactor->create_asynch_read_file ();
- if (implementation == 0)
- return -1;
-
- // Set the implementation class
- this->implementation (implementation);
-
- // Call the <open> method of the base class.
- return ACE_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number)
-{
- return this->implementation ()->read (message_block,
- bytes_to_read,
- offset,
- offset_high,
- act,
- priority,
- signal_number);
-}
-
-ACE_Asynch_Read_File_Impl *
-ACE_Asynch_Read_File::implementation (void) const
-{
- return this->implementation_;
-}
-
-void
-ACE_Asynch_Read_File::implementation (ACE_Asynch_Read_File_Impl *implementation)
-{
- this->implementation_ = implementation;
-
- // Set also the base class' implementation.
- ACE_Asynch_Read_Stream::implementation (implementation);
-}
-
-// ************************************************************
-
-ACE_Asynch_Read_File::Result::Result (ACE_Asynch_Read_File_Result_Impl *implementation)
- : ACE_Asynch_Read_Stream::Result (implementation),
- implementation_ (implementation)
-{
-}
-
-ACE_Asynch_Read_File::Result::~Result (void)
-{
- // Proactor will delete the implementation when <complete> call
- // completes.
-}
-
-ACE_Asynch_Read_File_Result_Impl *
-ACE_Asynch_Read_File::Result::implementation (void) const
-{
- return this->implementation_;
-}
-
-// ************************************************************
-
-ACE_Asynch_Write_File::ACE_Asynch_Write_File (void)
- : implementation_ (0)
-{
-}
-
-ACE_Asynch_Write_File::~ACE_Asynch_Write_File (void)
-{
-}
-
-int
-ACE_Asynch_Write_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- // Get a proactor for/from the user.
- proactor = this->get_proactor (proactor, handler);
-
- // Delete the old implementation.
- delete this->implementation_;
- this->implementation_ = 0;
-
- // Now let us get the implementation initialized.
- ACE_Asynch_Write_File_Impl *implementation = proactor->create_asynch_write_file ();
- if (implementation == 0)
- return -1;
-
- // Set the implementation class
- this->implementation (implementation);
-
- // Call the <open> method of the base class.
- return ACE_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number)
-{
- return this->implementation ()->write (message_block,
- bytes_to_write,
- offset,
- offset_high,
- act,
- priority,
- signal_number);
-}
-
-ACE_Asynch_Write_File_Impl *
-ACE_Asynch_Write_File::implementation (void) const
-{
- return this->implementation_;
-}
-
-void
-ACE_Asynch_Write_File::implementation (ACE_Asynch_Write_File_Impl *implementation)
-{
- this->implementation_ = implementation;
-
- // Init the base class' implementation also.
- ACE_Asynch_Write_Stream::implementation (implementation);
-}
-
-// ************************************************************
-
-ACE_Asynch_Write_File::Result::Result (ACE_Asynch_Write_File_Result_Impl *implementation)
- : ACE_Asynch_Write_Stream::Result (implementation),
- implementation_ (implementation)
-{
-}
-
-ACE_Asynch_Write_File::Result::~Result (void)
-{
- // Proactor will delete the implementation when the <complete> call
- // completes.
-}
-
-ACE_Asynch_Write_File_Result_Impl *
-ACE_Asynch_Write_File::Result::implementation (void) const
-{
- return this->implementation_;
-}
-
-// *********************************************************************
-
-ACE_Asynch_Accept::ACE_Asynch_Accept (void)
- : implementation_ (0)
-{
-}
-
-ACE_Asynch_Accept::~ACE_Asynch_Accept (void)
-{
-}
-
-int
-ACE_Asynch_Accept::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- // Get a proactor for/from the user.
- proactor = this->get_proactor (proactor, handler);
-
- // Delete the old implementation.
- delete this->implementation_;
- this->implementation_ = 0;
-
- // Now let us get the implementation initialized.
- ACE_Asynch_Accept_Impl *implementation = proactor->create_asynch_accept ();
- if (implementation == 0)
- return -1;
-
- // Set the implementation class
- this->implementation (implementation);
-
- // Call the <open> method of the base class.
- return ACE_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_Asynch_Accept::accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle,
- const void *act,
- int priority,
- int signal_number)
-{
- return this->implementation ()->accept (message_block,
- bytes_to_read,
- accept_handle,
- act,
- priority,
- signal_number);
-}
-
-ACE_Asynch_Accept_Impl *
-ACE_Asynch_Accept::implementation (void) const
-{
- return this->implementation_;
-}
-
-void
-ACE_Asynch_Accept::implementation (ACE_Asynch_Accept_Impl *implementation)
-{
- this->implementation_ = implementation;
- // Set the implementation in the base class.
- ACE_Asynch_Operation::implementation (implementation);
-}
-
-// ************************************************************
-
-u_long
-ACE_Asynch_Accept::Result::bytes_to_read (void) const
-{
- return this->implementation ()->bytes_to_read ();
-}
-
-ACE_Message_Block &
-ACE_Asynch_Accept::Result::message_block (void) const
-{
- return this->implementation ()->message_block ();
-}
-
-ACE_HANDLE
-ACE_Asynch_Accept::Result::listen_handle (void) const
-{
- return this->implementation ()->listen_handle ();
-}
-
-ACE_HANDLE
-ACE_Asynch_Accept::Result::accept_handle (void) const
-{
- return this->implementation ()->accept_handle ();
-}
-
-ACE_Asynch_Accept::Result::Result (ACE_Asynch_Accept_Result_Impl *implementation)
- : ACE_Asynch_Result (implementation),
- implementation_ (implementation)
-{
-}
-
-ACE_Asynch_Accept::Result::~Result (void)
-{
- // Proactor will delete the implementation when the <complete> call
- // completes.
-}
-
-ACE_Asynch_Accept_Result_Impl *
-ACE_Asynch_Accept::Result::implementation (void) const
-{
- return this->implementation_;
-}
-
-// ************************************************************
-
-ACE_Asynch_Transmit_File::ACE_Asynch_Transmit_File (void)
- : implementation_ (0)
-{
-}
-
-ACE_Asynch_Transmit_File::~ACE_Asynch_Transmit_File (void)
-{
-}
-
-int
-ACE_Asynch_Transmit_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- // Get a proactor for/from the user.
- proactor = this->get_proactor (proactor, handler);
-
- // Delete the old implementation.
- delete this->implementation_;
- this->implementation_ = 0;
-
- // Now let us get the implementation initialized.
- ACE_Asynch_Transmit_File_Impl *implementation = proactor->create_asynch_transmit_file ();
- if (implementation == 0)
- return -1;
-
- // Set the implementation class
- this->implementation (implementation);
-
- // Call the <open> method of the base class.
- return ACE_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
- Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- int priority,
- int signal_number)
-{
- return this->implementation ()->transmit_file (file,
- header_and_trailer,
- bytes_to_write,
- offset,
- offset_high,
- bytes_per_send,
- flags,
- act,
- priority,
- signal_number);
-}
-
-ACE_Asynch_Transmit_File_Impl *
-ACE_Asynch_Transmit_File::implementation (void) const
-{
- return this->implementation_;
-}
-
-void
-ACE_Asynch_Transmit_File::implementation (ACE_Asynch_Transmit_File_Impl *implementation)
-{
- this->implementation_ = implementation;
- // Set the base class' implementation also.
- ACE_Asynch_Operation::implementation (this->implementation_);
-}
-
-// ***********************************************************************************
-
-ACE_HANDLE
-ACE_Asynch_Transmit_File::Result::socket (void) const
-{
- return this->implementation ()->socket ();
-}
-
-ACE_HANDLE
-ACE_Asynch_Transmit_File::Result::file (void) const
-{
- return this->implementation ()->file ();
-}
-
-ACE_Asynch_Transmit_File::Header_And_Trailer *
-ACE_Asynch_Transmit_File::Result::header_and_trailer (void) const
-{
- return this->implementation ()->header_and_trailer ();
-}
-
-u_long
-ACE_Asynch_Transmit_File::Result::bytes_to_write (void) const
-{
- return this->implementation ()->bytes_to_write ();
-}
-
-u_long
-ACE_Asynch_Transmit_File::Result::bytes_per_send (void) const
-{
- return this->implementation ()->bytes_per_send ();
-}
-
-u_long
-ACE_Asynch_Transmit_File::Result::flags (void) const
-{
- return this->implementation ()->flags ();
-}
-
-ACE_Asynch_Transmit_File::Result::Result (ACE_Asynch_Transmit_File_Result_Impl *implementation)
- : ACE_Asynch_Result (implementation),
- implementation_ (implementation)
-{
-}
-
-ACE_Asynch_Transmit_File::Result::~Result (void)
-{
-}
-
-ACE_Asynch_Transmit_File_Result_Impl *
-ACE_Asynch_Transmit_File::Result::implementation (void) const
-{
- return this->implementation_;
-}
-
-// ************************************************************
-
-ACE_Asynch_Transmit_File::Header_And_Trailer::Header_And_Trailer (ACE_Message_Block *header,
- u_long header_bytes,
- ACE_Message_Block *trailer,
- u_long trailer_bytes)
- : header_ (header),
- header_bytes_ (header_bytes),
- trailer_ (trailer),
- trailer_bytes_ (trailer_bytes)
-{
-}
-
-ACE_Asynch_Transmit_File::Header_And_Trailer::~Header_And_Trailer (void)
-{
-}
-
-void
-ACE_Asynch_Transmit_File::Header_And_Trailer::header_and_trailer (ACE_Message_Block *header,
- u_long header_bytes,
- ACE_Message_Block *trailer,
- u_long trailer_bytes)
-{
- this->header (header);
- this->header_bytes (header_bytes);
- this->trailer (trailer);
- this->trailer_bytes (trailer_bytes);
-}
-
-ACE_Message_Block *
-ACE_Asynch_Transmit_File::Header_And_Trailer::header (void) const
-{
- return this->header_;
-}
-
-void
-ACE_Asynch_Transmit_File::Header_And_Trailer::header (ACE_Message_Block *message_block)
-{
- this->header_ = message_block;
-}
-
-u_long
-ACE_Asynch_Transmit_File::Header_And_Trailer::header_bytes (void) const
-{
- return this->header_bytes_;
-}
-
-void
-ACE_Asynch_Transmit_File::Header_And_Trailer::header_bytes (u_long bytes)
-{
- this->header_bytes_ = bytes;
-}
-
-ACE_Message_Block *
-ACE_Asynch_Transmit_File::Header_And_Trailer::trailer (void) const
-{
- return this->trailer_;
-}
-
-void
-ACE_Asynch_Transmit_File::Header_And_Trailer::trailer (ACE_Message_Block *message_block)
-{
- this->trailer_ = message_block;
-}
-
-u_long
-ACE_Asynch_Transmit_File::Header_And_Trailer::trailer_bytes (void) const
-{
- return this->trailer_bytes_;
-}
-
-void
-ACE_Asynch_Transmit_File::Header_And_Trailer::trailer_bytes (u_long bytes)
-{
- this->trailer_bytes_ = bytes;
-}
-
-ACE_LPTRANSMIT_FILE_BUFFERS
-ACE_Asynch_Transmit_File::Header_And_Trailer::transmit_buffers (void)
-{
- // If both are zero, return zero
- if (this->header_ == 0 && this->trailer_ == 0)
- return 0;
- else
- {
- // Something is valid
-
- // If header is valid, set the fields
- if (this->header_ != 0)
- {
- this->transmit_buffers_.Head = this->header_->rd_ptr ();
- this->transmit_buffers_.HeadLength = this->header_bytes_;
- }
- else
- {
- this->transmit_buffers_.Head = 0;
- this->transmit_buffers_.HeadLength = 0;
- }
-
- // If trailer is valid, set the fields
- if (this->trailer_ != 0)
- {
- this->transmit_buffers_.Tail = this->trailer_->rd_ptr ();
- this->transmit_buffers_.TailLength = this->trailer_bytes_;
- }
- else
- {
- this->transmit_buffers_.Tail = 0;
- this->transmit_buffers_.TailLength = 0;
- }
-
- // Return the transmit buffers
- return &this->transmit_buffers_;
- }
-}
-
-// *********************************************************************
-
-ACE_Handler::ACE_Handler (void)
- : proactor_ (0)
-{
-}
-
-ACE_Handler::ACE_Handler (ACE_Proactor *d)
- : proactor_ (d)
-{
-}
-
-ACE_Handler::~ACE_Handler (void)
-{
-}
-
-void
-ACE_Handler::handle_read_stream (const ACE_Asynch_Read_Stream::Result & /* result */)
-{
-}
-
-void
-ACE_Handler::handle_write_stream (const ACE_Asynch_Write_Stream::Result & /* result */)
-{
-}
-
-void
-ACE_Handler::handle_accept (const ACE_Asynch_Accept::Result & /* result */)
-{
-}
-
-void
-ACE_Handler::handle_transmit_file (const ACE_Asynch_Transmit_File::Result & /* result */)
-{
-}
-
-void
-ACE_Handler::handle_read_file (const ACE_Asynch_Read_File::Result & /* result */)
-{
-}
-
-void
-ACE_Handler::handle_write_file (const ACE_Asynch_Write_File::Result & /* result */)
-{
-}
-
-void
-ACE_Handler::handle_time_out (const ACE_Time_Value & /* tv */,
- const void * /* act */)
-{
-}
-
-void
-ACE_Handler::handle_wakeup (void)
-{
-}
-
-ACE_Proactor *
-ACE_Handler::proactor (void)
-{
- return this->proactor_;
-}
-
-void
-ACE_Handler::proactor (ACE_Proactor *p)
-{
- this->proactor_ = p;
-}
-
-ACE_HANDLE
-ACE_Handler::handle (void) const
-{
- return ACE_INVALID_HANDLE;
-}
-
-// ************************************************************
-
-ACE_Service_Handler::ACE_Service_Handler (void)
-{
-}
-
-ACE_Service_Handler::~ACE_Service_Handler (void)
-{
-}
-
-void
-ACE_Service_Handler::addresses (const ACE_INET_Addr &remote_address,
- const ACE_INET_Addr &local_address)
-{
- // Default behavior is to print out the addresses.
- ACE_TCHAR local_address_buf[BUFSIZ], remote_address_buf[BUFSIZ];
- if (local_address.addr_to_string (local_address_buf, sizeof local_address_buf) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("can't obtain local_address's address string")));
-
- if (remote_address.addr_to_string (remote_address_buf, sizeof remote_address_buf) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("can't obtain remote_address's address string")));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("On fd %d\n"), this->handle ()));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("local address %s\n"), local_address_buf));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("remote address %s\n"), remote_address_buf));
-}
-
-void
-ACE_Service_Handler::act (const void *)
-{
-}
-
-void
-ACE_Service_Handler::open (ACE_HANDLE,
- ACE_Message_Block &)
-{
-}
-
-#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */
diff --git a/ace/Asynch_IO.h b/ace/Asynch_IO.h
deleted file mode 100644
index 344563e6aa0..00000000000
--- a/ace/Asynch_IO.h
+++ /dev/null
@@ -1,1108 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-// = FILENAME
-// Asynch_IO.h
-//
-// = DESCRIPTION
-// This works on Win32 (#if defined (ACE_WIN32) && !defined
-// (ACE_HAS_WINCE)) platforms and on POSIX4 platforms with <aio_*>
-// routines (#if defined (ACE_HAS_AIO_CALLS))
-//
-// On Win32 platforms, the implementation of
-// <ACE_Asynch_Transmit_File> and <ACE_Asynch_Accept> are only
-// supported if ACE_HAS_WINSOCK2 is defined or you are on WinNT 4.0
-// or higher.
-//
-// = AUTHOR
-// Irfan Pyarali <irfan@cs.wustl.edu>,
-// Tim Harrison <harrison@cs.wustl.edu> and
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_ASYNCH_IO_H
-#define ACE_ASYNCH_IO_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
-
-// Forward declarations
-class ACE_Proactor;
-class ACE_Handler;
-class ACE_Message_Block;
-class ACE_INET_Addr;
-
-// Forward declarations
-class ACE_Asynch_Result_Impl;
-
-class ACE_Export ACE_Asynch_Result
-{
- // = TITLE
- //
- // An interface base class which allows users access to common
- // information related to an asynchronous operation.
- //
- // = DESCRIPTION
- //
- // An interface base class from which you can obtain some basic
- // information like the number of bytes transferred, the ACT
- // associated with the asynchronous operation, indication of
- // success or failure, etc. Subclasses may want to store more
- // information that is particular to the asynchronous operation
- // it represents.
-
-public:
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This is the ACT associated with the handle on which the
- // Asynch_Operation takes place.
- //
- // On WIN32, this returns the ACT associated with the handle when it
- // was registered with the I/O completion port.
- //
- // @@ This is not implemented for POSIX4 platforms. Returns 0.
-
- u_long error (void) const;
- // Error value if the operation fails.
-
- ACE_HANDLE event (void) const;
- // On WIN32, this returns the event associated with the OVERLAPPED
- // structure.
- //
- // This returns ACE_INVALID_HANDLE on POSIX4-Unix platforms.
-
- u_long offset (void) const;
- u_long offset_high (void) const;
- // This really makes sense only when doing file I/O.
- //
- // On WIN32, these are represented in the OVERLAPPED datastructure.
- //
- // @@ On POSIX4-Unix, offset_high should be supported using
- // aiocb64.
-
- int priority (void) const;
- // Priority of the operation.
- //
- // On POSIX4-Unix, this is supported. Priority works like <nice> in
- // Unix. Negative values are not allowed. 0 means priority of the
- // operation same as the process priority. 1 means priority of the
- // operation is one less than process. And so forth.
- //
- // On Win32, this is a no-op.
-
- int signal_number (void) const;
- // POSIX4 real-time signal number to be used for the
- // operation. <signal_number> ranges from ACE_SIGRTMIN to ACE_SIGRTMAX. By
- // default, ACE_SIGRTMIN is used to issue <aio_> calls. This is a no-op
- // on non-POSIX4 systems and returns 0.
-
-
- virtual ~ACE_Asynch_Result (void);
- // Destructor.
-
-protected:
- ACE_Asynch_Result (ACE_Asynch_Result_Impl *implementation);
- // Constructor. This implementation will not be deleted. The
- // implementation will be deleted by the Proactor.
-
- ACE_Asynch_Result_Impl *implementation (void) const;
- // Get the implementation class.
-
- ACE_Asynch_Result_Impl *implementation_;
- // Implementation class.
-};
-
-// Forward declarations
-class ACE_Asynch_Operation_Impl;
-
-class ACE_Export ACE_Asynch_Operation
-{
- // = TITLE
- //
- // This is an interface base class for all asynch
- // operations. The resposiblility of this class is to forward
- // all methods to its delegation/implementation class, e.g.,
- // <ACE_WIN32_Asynch_Operation> or <ACE_POSIX_Asynch_Operation>.
- //
- // = DESCRIPTION
- //
- // There are some attributes and functionality which is common
- // to all asychronous operations. The delegation classes of this
- // class will factor out this code.
-
-public:
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- // (Attempts to) cancel the asynchronous operation pending against
- // the <handle> registered with this Operation.
- //
- // All completion notifications for the I/O operations will occur
- // normally.
- //
- // = Return Values:
- //
- // -1 : Operation failed. (can get only in POSIX).
- // 0 : All the operations were cancelled.
- // 1 : All the operations were already finished in this
- // handle. Unable to cancel them.
- // 2 : Atleast one of the requested operations cannot be
- // cancelled.
- //
- // There is slight difference in the semantics between NT and POSIX
- // platforms which is given below.
- //
- // = Win32 :
- //
- // cancels all pending accepts operations that were issued by the
- // calling thread. The function does not cancel asynchronous
- // operations issued by other threads.
- // All I/O operations that are canceled will complete with the
- // error ERROR_OPERATION_ABORTED.
- //
- // = POSIX:
- //
- // Attempts to cancel one or more asynchronous I/O requests
- // currently outstanding against the <handle> registered in this
- // operation.
- // For requested operations that are successfully canceled, the
- // associated error status is set to ECANCELED.
-
-
- // = Access methods.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
- virtual ~ACE_Asynch_Operation (void);
- // Destructor.
-
-protected:
- ACE_Asynch_Operation (void);
- // Constructor.
-
- ACE_Asynch_Operation_Impl *implementation (void) const;
- // Return the underlying implementation class.
-
- void implementation (ACE_Asynch_Operation_Impl *implementation);
- // Set the implementation class.
-
- ACE_Proactor *get_proactor (ACE_Proactor *user_proactor,
- ACE_Handler &handler) const;
- // Get a proactor for/from the user
-
- ACE_Asynch_Operation_Impl *implementation_;
- // Implementation class.
-};
-
-// Forward declarations
-class ACE_Asynch_Read_Stream_Result_Impl;
-class ACE_Asynch_Read_Stream_Impl;
-
-class ACE_Export ACE_Asynch_Read_Stream : public ACE_Asynch_Operation
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous reads
- // on a stream. This class forwards all methods to its
- // implementation class.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <read>s can
- // started using this class. An ACE_Asynch_Read_Stream::Result
- // will be passed back to the <handler> when the asynchronous
- // reads completes through the <ACE_Handler::handle_read_stream>
- // callback.
-
-public:
- ACE_Asynch_Read_Stream (void);
- // A do nothing constructor.
-
- virtual ~ACE_Asynch_Read_Stream (void);
- // Destructor
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle = ACE_INVALID_HANDLE,
- const void *completion_key = 0,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act = 0,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>. <message_block>'s
- // <wr_ptr> will be updated to reflect the added bytes if the read
- // operation is successful completed. Priority of the
- // operation is specified by <priority>. On POSIX4-Unix, this is
- // supported. Works like <nice> in Unix. Negative values are not
- // allowed. 0 means priority of the operation same as the process
- // priority. 1 means priority of the operation is one less than
- // process. And so forth. On Win32, <priority> is a no-op.
- // <signal_number> is the POSIX4 real-time signal number to be used
- // for the operation. <signal_number> ranges from ACE_SIGRTMIN to
- // ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
-
- ACE_Asynch_Read_Stream_Impl *implementation (void) const;
- // Return the underlying implementation class.
-
-protected:
- void implementation (ACE_Asynch_Read_Stream_Impl *implementation);
- // Set the implementation class.
-
- ACE_Asynch_Read_Stream_Impl *implementation_;
- // Implementation class that all methods will be forwarded to.
-
-public:
- class ACE_Export Result : public ACE_Asynch_Result
- {
- // = TITLE
- //
- // This is the class which will be passed back to the
- // <handler> when the asynchronous read completes. This class
- // forwards all the methods to the implementation classes.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous read.
-
- friend class ACE_POSIX_Asynch_Read_Stream_Result;
- friend class ACE_WIN32_Asynch_Read_Stream_Result;
- // The concrete implementation result classes only construct this
- // class.
-
- public:
- u_long bytes_to_read (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous read.
-
- ACE_Message_Block &message_block (void) const;
- // Message block which contains the read data.
-
- ACE_HANDLE handle (void) const;
- // I/O handle used for reading.
-
- ACE_Asynch_Read_Stream_Result_Impl *implementation (void) const;
- // Get the implementation class.
-
- protected:
- Result (ACE_Asynch_Read_Stream_Result_Impl *implementation);
- // Constructor.
-
- virtual ~Result (void);
- // Destructor.
-
- ACE_Asynch_Read_Stream_Result_Impl *implementation_;
- // The implementation class.
- };
-};
-
-// Forward declarations
-class ACE_Asynch_Write_Stream_Impl;
-class ACE_Asynch_Write_Stream_Result_Impl;
-
-class ACE_Export ACE_Asynch_Write_Stream : public ACE_Asynch_Operation
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous writes
- // on a stream. This class forwards all methods to its
- // implementation class.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <writes>s can
- // started using this class. An ACE_Asynch_Write_Stream::Result
- // will be passed back to the <handler> when the asynchronous
- // write completes through the
- // <ACE_Handler::handle_write_stream> callback.
-
-public:
- ACE_Asynch_Write_Stream (void);
- // A do nothing constructor.
-
- virtual ~ACE_Asynch_Write_Stream (void);
- // Destructor.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle = ACE_INVALID_HANDLE,
- const void *completion_key = 0,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act = 0,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be written from the <message_block>. Upon successful completion
- // of the write operation, <message_block>'s <rd_ptr> is updated to
- // reflect the data that was written. Priority of the
- // operation is specified by <priority>. On POSIX4-Unix, this is
- // supported. Works like <nice> in Unix. Negative values are not
- // allowed. 0 means priority of the operation same as the process
- // priority. 1 means priority of the operation is one less than
- // process. And so forth. On Win32, this argument is a no-op.
- // <signal_number> is the POSIX4 real-time signal number to be used
- // for the operation. <signal_number> ranges from ACE_SIGRTMIN to
- // ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
-
- ACE_Asynch_Write_Stream_Impl *implementation (void) const;
- // Return the underlying implementation class.
-
-protected:
- void implementation (ACE_Asynch_Write_Stream_Impl *implementation);
- // Set the implementation class.
-
- ACE_Asynch_Write_Stream_Impl *implementation_;
- // Implementation class that all methods will be forwarded to.
-
-public:
- class ACE_Export Result : public ACE_Asynch_Result
- {
- // = TITLE
- //
- // This is that class which will be passed back to the
- // <handler> when the asynchronous write completes. This class
- // forwards all the methods to the implementation class.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous write.
-
- friend class ACE_POSIX_Asynch_Write_Stream_Result;
- friend class ACE_WIN32_Asynch_Write_Stream_Result;
- // The concrete implementation result classes only construct this
- // class.
-
- public:
- u_long bytes_to_write (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous write.
-
- ACE_Message_Block &message_block (void) const;
- // Message block that contains the data to be written.
-
- ACE_HANDLE handle (void) const;
- // I/O handle used for writing.
-
- ACE_Asynch_Write_Stream_Result_Impl *implementation (void) const;
- // Get the implementation class.
-
- protected:
- Result (ACE_Asynch_Write_Stream_Result_Impl *implementation);
- // Constrcutor.
-
- virtual ~Result (void);
- // Destructor.
-
- ACE_Asynch_Write_Stream_Result_Impl *implementation_;
- // Implementation class.
- };
-};
-
-// Forward declarations
-class ACE_Asynch_Read_File_Impl;
-class ACE_Asynch_Read_File_Result_Impl;
-
-class ACE_Export ACE_Asynch_Read_File : public ACE_Asynch_Read_Stream
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous reads
- // on a file. This class forwards all methods to its
- // implementation class.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <read>s can
- // started using this class. An ACE_Asynch_Read_File::Result
- // will be passed back to the <handler> when the asynchronous
- // reads completes through the <ACE_Handler::handle_read_file>
- // callback.
- //
- // This class differs slightly from ACE_Asynch_Read_Stream as it
- // allows the user to specify an offset for the read.
-
-public:
- ACE_Asynch_Read_File (void);
- // A do nothing constructor.
-
- virtual ~ACE_Asynch_Read_File (void);
- // Destructor.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle = ACE_INVALID_HANDLE,
- const void *completion_key = 0,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset = 0,
- u_long offset_high = 0,
- const void *act = 0,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>. The read will start
- // at <offset> from the beginning of the file. Priority of the
- // operation is specified by <priority>. On POSIX4-Unix, this is
- // supported. Works like <nice> in Unix. Negative values are not
- // allowed. 0 means priority of the operation same as the process
- // priority. 1 means priority of the operation is one less than
- // process. And so forth. On Win32, this argument is a no-op.
- // <signal_number> is the POSIX4 real-time signal number to be used
- // for the operation. <signal_number> ranges from ACE_SIGRTMIN to
- // ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
-
- ACE_Asynch_Read_File_Impl *implementation (void) const;
- // Return the underlying implementation class.
-
-protected:
- void implementation (ACE_Asynch_Read_File_Impl *implementation);
- // Set the implementation class.
-
- ACE_Asynch_Read_File_Impl *implementation_;
- // Delegation/implementation class that all methods will be
- // forwarded to.
-
-public:
- class ACE_Export Result : public ACE_Asynch_Read_Stream::Result
- {
- // = TITLE
- //
- // This is that class which will be passed back to the
- // <handler> when the asynchronous read completes. This class
- // forwards all the methods to the implementation class.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous read.
- //
- // This class differs slightly from
- // ACE_Asynch_Read_Stream::Result as it calls back
- // <ACE_Handler::handle_read_file> on the <handler> instead of
- // <ACE_Handler::handle_read_stream>. No additional state is
- // required by this class as ACE_Asynch_Result can store the
- // <offset>.
-
- friend class ACE_POSIX_Asynch_Read_File_Result;
- friend class ACE_WIN32_Asynch_Read_File_Result;
- // The concrete implementation result classes only construct this
- // class.
-
- public:
- ACE_Asynch_Read_File_Result_Impl *implementation (void) const;
- // Get the implementation class.
-
- protected:
- Result (ACE_Asynch_Read_File_Result_Impl *implementation);
- // Constructor. This implementation will not be deleted.
-
- virtual ~Result (void);
- // Destructor.
-
- ACE_Asynch_Read_File_Result_Impl *implementation_;
- // The implementation class.
- };
-};
-
-// Forward declarations
-class ACE_Asynch_Write_File_Impl;
-class ACE_Asynch_Write_File_Result_Impl;
-
-class ACE_Export ACE_Asynch_Write_File : public ACE_Asynch_Write_Stream
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous writes
- // on a file. This class forwards all methods to its
- // implementation class.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <write>s can be
- // started using this class. A ACE_Asynch_Write_File::Result
- // will be passed back to the <handler> when the asynchronous
- // writes completes through the <ACE_Handler::handle_write_file>
- // callback.
- //
- // This class differs slightly from ACE_Asynch_Write_Stream as
- // it allows the user to specify an offset for the write.
-
-public:
- ACE_Asynch_Write_File (void);
- // A do nothing constructor.
-
- virtual ~ACE_Asynch_Write_File (void);
- // Destructor.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle = ACE_INVALID_HANDLE,
- const void *completion_key = 0,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset = 0,
- u_long offset_high = 0,
- const void *act = 0,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be write and stored in the <message_block>. The write will
- // start at <offset> from the beginning of the file. Priority of the
- // operation is specified by <priority>. On POSIX4-Unix, this is
- // supported. Works like <nice> in Unix. Negative values are not
- // allowed. 0 means priority of the operation same as the process
- // priority. 1 means priority of the operation is one less than
- // process. And so forth. On Win32, this is a no-op.
- // <signal_number> is the POSIX4 real-time signal number to be used
- // for the operation. <signal_number> ranges from ACE_SIGRTMIN to
- // ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
-
- ACE_Asynch_Write_File_Impl *implementation (void) const;
- // Return the underlying implementation class.
-
-protected:
- void implementation (ACE_Asynch_Write_File_Impl *implementation);
- // Set the implementation.
-
- ACE_Asynch_Write_File_Impl *implementation_;
- // Implementation object.
-
-public:
- class ACE_Export Result : public ACE_Asynch_Write_Stream::Result
- {
- // = TITLE
- //
- // This is that class which will be passed back to the
- // <handler> when the asynchronous write completes. This class
- // forwards all the methods to the implementation class.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous write.
- //
- // This class differs slightly from
- // ACE_Asynch_Write_Stream::Result as it calls back
- // <ACE_Handler::handle_write_file> on the <handler> instead
- // of <ACE_Handler::handle_write_stream>. No additional state
- // is required by this class as ACE_Asynch_Result can store
- // the <offset>.
-
- friend class ACE_POSIX_Asynch_Write_File_Result;
- friend class ACE_WIN32_Asynch_Write_File_Result;
- // The concrete implementation result classes only construct this
- // class.
-
- public:
- ACE_Asynch_Write_File_Result_Impl *implementation (void) const;
- // Get the implementation class.
-
- protected:
- Result (ACE_Asynch_Write_File_Result_Impl *implementation);
- // Constructor. This implementation will not be deleted.
-
- virtual ~Result (void);
- // Destructor.
-
- ACE_Asynch_Write_File_Result_Impl *implementation_;
- // The implementation class.
- };
-};
-
-// Forward declarations
-class ACE_Asynch_Accept_Result_Impl;
-class ACE_Asynch_Accept_Impl;
-
-class ACE_Export ACE_Asynch_Accept : public ACE_Asynch_Operation
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous accepts
- // on a listen handle. This class forwards all methods to its
- // implementation class.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <accept>s can
- // started using this class. A ACE_Asynch_Accept::Result will
- // be passed back to the <handler> when the asynchronous accept
- // completes through the <ACE_Handler::handle_accept>
- // callback.
-
-public:
- ACE_Asynch_Accept (void);
- // A do nothing constructor.
-
- virtual ~ACE_Asynch_Accept (void);
- // Destructor.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle = ACE_INVALID_HANDLE,
- const void *completion_key = 0,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle = ACE_INVALID_HANDLE,
- const void *act = 0,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // This starts off an asynchronous accept. The asynchronous accept
- // call also allows any initial data to be returned to the
- // <handler>. Upto <bytes_to_read> will be read and stored in the
- // <message_block>. The <accept_handle> will be used for the
- // <accept> call. If (<accept_handle> == INVALID_HANDLE), a new
- // handle will be created. Priority of the
- // operation is specified by <priority>. On POSIX4-Unix, this is
- // supported. Works like <nice> in Unix. Negative values are not
- // allowed. 0 means priority of the operation same as the process
- // priority. 1 means priority of the operation is one less than
- // process. And so forth. On Win32, this is a no-op.
- //
- // <message_block> must be specified. This is because the address of
- // the new connection is placed at the end of this buffer.
- // <signal_number> is the POSIX4 real-time signal number to be used
- // for the operation. <signal_number> ranges from ACE_SIGRTMIN to
- // ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
-
- ACE_Asynch_Accept_Impl *implementation (void) const;
- // Return the underlying implementation class.
-
-protected:
- void implementation (ACE_Asynch_Accept_Impl *implementation);
- // Set the implementation class.
-
- ACE_Asynch_Accept_Impl *implementation_;
- // Delegation/implementation class that all methods will be
- // forwarded to.
-
-public:
- class ACE_Export Result : public ACE_Asynch_Result
- {
- // = TITLE
- //
- // This is that class which will be passed back to the
- // <handler> when the asynchronous accept completes.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous accept.
-
- friend class ACE_POSIX_Asynch_Accept_Result;
- friend class ACE_WIN32_Asynch_Accept_Result;
- // The concrete implementation result classes only construct this
- // class.
-
- public:
- u_long bytes_to_read (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous accept.
-
- ACE_Message_Block &message_block (void) const;
- // Message block which contains the read data.
-
- ACE_HANDLE listen_handle (void) const;
- // I/O handle used for accepting new connections.
-
- ACE_HANDLE accept_handle (void) const;
- // I/O handle for the new connection.
-
- ACE_Asynch_Accept_Result_Impl *implementation (void) const;
- // Get the implementation.
-
- protected:
- Result (ACE_Asynch_Accept_Result_Impl *implementation);
- // Contructor. Implementation will not be deleted.
-
- virtual ~Result (void);
- // Destructor.
-
- ACE_Asynch_Accept_Result_Impl *implementation_;
- // Impelmentation class.
- };
-};
-
-// Forward declarations
-class ACE_Asynch_Transmit_File_Result_Impl;
-class ACE_Asynch_Transmit_File_Impl;
-
-class ACE_Export ACE_Asynch_Transmit_File : public ACE_Asynch_Operation
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous
- // transmit files on a stream.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <transmit_file>s
- // can started using this class. A
- // ACE_Asynch_Transmit_File::Result will be passed back to the
- // <handler> when the asynchronous transmit file completes
- // through the <ACE_Handler::handle_transmit_file> callback.
- //
- // The transmit_file function transmits file data over a
- // connected network connection. The function uses the operating
- // system's cache manager to retrieve the file data. This
- // function provides high-performance file data transfer over
- // network connections. This function would be of great use in
- // a Web Server, Image Server, etc.
-
-public:
- // Forward declarations
- class Header_And_Trailer;
-
- ACE_Asynch_Transmit_File (void);
- // A do nothing constructor.
-
- virtual ~ACE_Asynch_Transmit_File (void);
- // Destructor.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle = ACE_INVALID_HANDLE,
- const void *completion_key = 0,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int transmit_file (ACE_HANDLE file,
- Header_And_Trailer *header_and_trailer = 0,
- u_long bytes_to_write = 0,
- u_long offset = 0,
- u_long offset_high = 0,
- u_long bytes_per_send = 0,
- u_long flags = 0,
- const void *act = 0,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // This starts off an asynchronous transmit file. The <file> is a
- // handle to an open file. <header_and_trailer> is a pointer to a
- // data structure that contains pointers to data to send before and
- // after the file data is sent. Set this parameter to 0 if you only
- // want to transmit the file data. Upto <bytes_to_write> will be
- // written to the <socket>. If you want to send the entire file,
- // let <bytes_to_write> = 0. <bytes_per_send> is the size of each
- // block of data sent per send operation. Please read the Win32
- // documentation on what the flags should be. Priority of the
- // operation is specified by <priority>. On POSIX4-Unix, this is
- // supported. Works like <nice> in Unix. Negative values are not
- // allowed. 0 means priority of the operation same as the process
- // priority. 1 means priority of the operation is one less than
- // process. And so forth. On Win32, this is a no-op.
- // <signal_number> is the POSIX4 real-time signal number to be used
- // for the operation. <signal_number> ranges from ACE_SIGRTMIN to
- // ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems.
-
- ACE_Asynch_Transmit_File_Impl *implementation (void) const;
- // Return the underlying implementation class.
-
-protected:
- void implementation (ACE_Asynch_Transmit_File_Impl *);
- // Set the implementation.
-
- ACE_Asynch_Transmit_File_Impl *implementation_;
- // The implementation class.
-
-public:
- class ACE_Export Result : public ACE_Asynch_Result
- {
- // = TITLE
- //
- // This is that class which will be passed back to the
- // <handler> when the asynchronous transmit file completes.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous transmit file.
-
- friend class ACE_POSIX_Asynch_Transmit_File_Result;
- friend class ACE_WIN32_Asynch_Transmit_File_Result;
- // The concrete implementation result classes only construct this
- // class.
-
- public:
- ACE_HANDLE socket (void) const;
- // Socket used for transmitting the file.
-
- ACE_HANDLE file (void) const;
- // File from which the data is read.
-
- Header_And_Trailer *header_and_trailer (void) const;
- // Header and trailer data associated with this transmit file.
-
- u_long bytes_to_write (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous transmit file.
-
- u_long bytes_per_send (void) const;
- // Number of bytes per send requested at the start of the transmit
- // file.
-
- u_long flags (void) const;
- // Flags which were passed into transmit file.
-
- ACE_Asynch_Transmit_File_Result_Impl *implementation (void) const;
- // Get the implementation class.
-
- protected:
- Result (ACE_Asynch_Transmit_File_Result_Impl *implementation);
- // Constructor.
-
- virtual ~Result (void);
- // Destructor.
-
- ACE_Asynch_Transmit_File_Result_Impl *implementation_;
- // The implementation class.
- };
-
- class ACE_Export Header_And_Trailer
- {
- // = TITLE
- //
- // The class defines a data structure that contains pointers
- // to data to send before and after the file data is sent.
- //
- // = DESCRIPTION
- //
- // This class provides a wrapper over TRANSMIT_FILE_BUFFERS
- // and provided a consistent use of ACE_Message_Blocks.
-
- public:
- Header_And_Trailer (ACE_Message_Block *header = 0,
- u_long header_bytes = 0,
- ACE_Message_Block *trailer = 0,
- u_long trailer_bytes = 0);
- // Constructor.
-
- virtual ~Header_And_Trailer (void);
- // Destructor
-
- void header_and_trailer (ACE_Message_Block *header = 0,
- u_long header_bytes = 0,
- ACE_Message_Block *trailer = 0,
- u_long trailer_bytes = 0);
- // This method allows all the member to be set in one fell swoop.
-
- ACE_Message_Block *header (void) const;
- void header (ACE_Message_Block *message_block);
- // Header which goes before the file data.
-
- u_long header_bytes (void) const;
- void header_bytes (u_long bytes);
- // Size of the header data.
-
- ACE_Message_Block *trailer (void) const;
- void trailer (ACE_Message_Block *message_block);
- // Trailer which goes after the file data.
-
- u_long trailer_bytes (void) const;
- void trailer_bytes (u_long bytes);
- // Size of the trailer data.
-
- ACE_LPTRANSMIT_FILE_BUFFERS transmit_buffers (void);
- // Conversion routine.
-
- protected:
- ACE_Message_Block *header_;
- // Header data.
-
- u_long header_bytes_;
- // Size of header data.
-
- ACE_Message_Block *trailer_;
- // Trailer data.
-
- u_long trailer_bytes_;
- // Size of trailer data.
-
- ACE_TRANSMIT_FILE_BUFFERS transmit_buffers_;
- // Target data structure.
- };
-};
-
-class ACE_Export ACE_Handler
-{
- // = TITLE
- // This base class defines the interface for receiving the
- // results of asynchronous operations.
- //
- // = DESCRIPTION
- // Subclasses of this class will fill in appropriate methods.
-public:
- ACE_Handler (void);
- // A do nothing constructor.
-
- ACE_Handler (ACE_Proactor *p);
- // A do nothing constructor which allows proactor to be set to <p>.
-
- virtual ~ACE_Handler (void);
- // Virtual destruction.
-
- virtual void handle_read_stream (const ACE_Asynch_Read_Stream::Result &result);
- // This method will be called when an asynchronous read completes on
- // a stream.
-
- virtual void handle_write_stream (const ACE_Asynch_Write_Stream::Result &result);
- // This method will be called when an asynchronous write completes
- // on a stream.
-
- virtual void handle_read_file (const ACE_Asynch_Read_File::Result &result);
- // This method will be called when an asynchronous read completes on
- // a file.
-
- virtual void handle_write_file (const ACE_Asynch_Write_File::Result &result);
- // This method will be called when an asynchronous write completes
- // on a file.
-
- virtual void handle_accept (const ACE_Asynch_Accept::Result &result);
- // This method will be called when an asynchronous accept completes.
-
- virtual void handle_transmit_file (const ACE_Asynch_Transmit_File::Result &result);
- // This method will be called when an asynchronous transmit file
- // completes.
-
- virtual void handle_time_out (const ACE_Time_Value &tv,
- const void *act = 0);
- // Called when timer expires. <tv> was the requested time value and
- // <act> is the ACT passed when scheduling the timer.
-
- virtual void handle_wakeup (void);
- // This is method works with the <run_event_loop> of the
- // ACE_Proactor. A special <Wake_Up_Completion> is used to wake up
- // all the threads that are blocking for completions.
-
- ACE_Proactor *proactor (void);
- // Get the proactor associated with this handler.
-
- void proactor (ACE_Proactor *p);
- // Set the proactor.
-
- virtual ACE_HANDLE handle (void) const;
- // Get the I/O handle used by this <handler>. This method will be
- // called by the ACE_Asynch_* classes when an ACE_INVALID_HANDLE is
- // passed to <open>.
-
-protected:
- ACE_Proactor *proactor_;
- // The proactor associated with this handler.
-};
-
-// Forward declarations
-class ACE_INET_Addr;
-
-// Forward declarations
-template <class HANDLER>
-class ACE_Asynch_Acceptor;
-
-class ACE_Export ACE_Service_Handler : public ACE_Handler
-{
- // = TITLE
- //
- // This base class defines the interface for the
- // ACE_Asynch_Acceptor to call into when new connection are
- // accepted.
- //
- // = DESCRIPTION
- //
- // Subclasses of this class will fill in appropriate methods to
- // define application specific behavior.
-
- friend class ACE_Asynch_Acceptor<ACE_Service_Handler>;
- // The Acceptor is the factory and therefore should have special
- // privileges.
-
-public:
- ACE_Service_Handler (void);
- // A do nothing constructor.
-
- virtual ~ACE_Service_Handler (void);
- // Virtual destruction.
-
- virtual void open (ACE_HANDLE new_handle,
- ACE_Message_Block &message_block);
- // <open> is called by ACE_Asynch_Acceptor to initialize a new
- // instance of ACE_Service_Handler that has been created after the a
- // new connection is accepted. The handle for the new connection is
- // passed along with an initial data that may have shown up.
-
- // protected:
- // This should be corrected after the correct semantics of the
- // friend has been figured out.
-
- virtual void addresses (const ACE_INET_Addr &remote_address,
- const ACE_INET_Addr &local_address);
- // Called by ACE_Asynch_Acceptor to pass the addresses of the new
- // connections.
-
- virtual void act (const void *);
- // Called by ACE_Asynch_Acceptor to pass the act.
-};
-
-#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS*/
-#include "ace/post.h"
-#endif /* ACE_ASYNCH_IO_H */
diff --git a/ace/Asynch_IO_Impl.cpp b/ace/Asynch_IO_Impl.cpp
deleted file mode 100644
index 2260670fde9..00000000000
--- a/ace/Asynch_IO_Impl.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// $Id$
-#include "ace/OS.h"
-#include "ace/Asynch_IO_Impl.h"
-
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
-// This only works on Win32 platforms and on Unix platforms supporting
-// aio calls.
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Asynch_IO_Impl.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_Asynch_Result_Impl::~ACE_Asynch_Result_Impl (void)
-{
-}
-
-ACE_Asynch_Operation_Impl::~ACE_Asynch_Operation_Impl (void)
-{
-}
-
-ACE_Asynch_Read_Stream_Impl::~ACE_Asynch_Read_Stream_Impl (void)
-{
-}
-
-ACE_Asynch_Read_Stream_Result_Impl::~ACE_Asynch_Read_Stream_Result_Impl (void)
-{
-}
-
-ACE_Asynch_Write_Stream_Impl::~ACE_Asynch_Write_Stream_Impl (void)
-{
-}
-
-ACE_Asynch_Write_Stream_Result_Impl::~ACE_Asynch_Write_Stream_Result_Impl (void)
-{
-}
-
-ACE_Asynch_Read_File_Impl::~ACE_Asynch_Read_File_Impl (void)
-{
-}
-
-ACE_Asynch_Write_File_Impl::~ACE_Asynch_Write_File_Impl (void)
-{
-}
-
-ACE_Asynch_Read_File_Result_Impl::~ACE_Asynch_Read_File_Result_Impl (void)
-{
-}
-
-ACE_Asynch_Write_File_Result_Impl::~ACE_Asynch_Write_File_Result_Impl (void)
-{
-}
-
-ACE_Asynch_Accept_Result_Impl::~ACE_Asynch_Accept_Result_Impl (void)
-{
-}
-
-ACE_Asynch_Accept_Impl::~ACE_Asynch_Accept_Impl (void)
-{
-}
-
-ACE_Asynch_Transmit_File_Impl::~ACE_Asynch_Transmit_File_Impl (void)
-{
-}
-
-ACE_Asynch_Transmit_File_Result_Impl::~ACE_Asynch_Transmit_File_Result_Impl (void)
-{
-}
-
-#endif /* ACE_WIN32 || ACE_HAS_WINCE */
diff --git a/ace/Asynch_IO_Impl.h b/ace/Asynch_IO_Impl.h
deleted file mode 100644
index db2a6bc475d..00000000000
--- a/ace/Asynch_IO_Impl.h
+++ /dev/null
@@ -1,505 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-//
-// ace
-//
-// = FILENAME
-//
-// Asynch_IO_Impl.h
-//
-// = DESCRIPTION
-//
-// This class contains asbtract base classes for all the concrete
-// implementation classes for the various asynchronous operations
-// that are used with the Praoctor.
-//
-// = AUTHOR
-//
-// Irfan Pyarali (irfan@cs.wustl.edu),
-// Tim Harrison (harrison@cs.wustl.edu) and
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_ASYNCH_IO_IMPL_H
-#define ACE_ASYNCH_IO_IMPL_H
-#include "ace/pre.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS))
-// This only works on Win32 platforms and on Unix platforms supporting
-// aio calls.
-
-#include "ace/Asynch_IO.h"
-
-// Forward declaration.
-class ACE_Proactor_Impl;
-
-class ACE_Export ACE_Asynch_Result_Impl
-{
- // = TITLE
- //
- // Abstract base class for the all the classes that provide
- // concrete implementations for ACE_Asynch_Result.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Result_Impl (void);
-
- virtual u_long bytes_transferred (void) const = 0;
- // Number of bytes transferred by the operation.
-
- virtual const void *act (void) const = 0;
- // ACT associated with the operation.
-
- virtual int success (void) const = 0;
- // Did the operation succeed?
-
- virtual const void *completion_key (void) const = 0;
- // This ACT is not the same as the ACT associated with the
- // asynchronous operation.
-
- virtual u_long error (void) const = 0;
- // Error value if the operation fail.
-
- virtual ACE_HANDLE event (void) const = 0;
- // Event associated with the OVERLAPPED structure.
-
- virtual u_long offset (void) const = 0;
- virtual u_long offset_high (void) const = 0;
- // This really make sense only when doing file I/O.
-
- virtual int priority (void) const = 0;
- // Priority of the operation.
-
- virtual int signal_number (void) const = 0;
- // POSIX4 real-time signal number to be used for the
- // operation. <signal_number> ranges from SIGRTMIN to SIGRTMAX. By
- // default, SIGRTMIN is used to issue <aio_> calls. This is a no-op
- // on non-POSIX4 systems and returns 0.
-
- // protected:
- //
- // These two should really be protected. But sometimes it
- // simplifies code to be able to "fake" a result. Use carefully.
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error = 0) = 0;
- // This is called when the asynchronous operation completes.
-
- virtual int post_completion (ACE_Proactor_Impl *proactor) = 0;
- // Post <this> to the Proactor's completion port.
-
-protected:
- ACE_Asynch_Result_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Operation_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Operation.
-public:
- virtual ~ACE_Asynch_Operation_Impl (void);
-
- virtual int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor) = 0;
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- virtual int cancel (void) = 0;
- // This cancels all pending accepts operations that were issued by
- // the calling thread. The function does not cancel asynchronous
- // operations issued by other threads.
-
- // = Access methods.
-
- virtual ACE_Proactor* proactor (void) const = 0;
- // Return the underlying proactor.
-
-protected:
- ACE_Asynch_Operation_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Read_Stream_Impl : public virtual ACE_Asynch_Operation_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Read_Stream
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Read_Stream_Impl (void);
-
- virtual int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number) = 0;
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>.
-
-protected:
- ACE_Asynch_Read_Stream_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Read_Stream_Result_Impl : public virtual ACE_Asynch_Result_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Read_Stream::Result class.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Read_Stream_Result_Impl (void);
-
- virtual u_long bytes_to_read (void) const = 0;
- // The number of bytes which were requested at the start of the
- // asynchronous read.
-
- virtual ACE_Message_Block &message_block (void) const = 0;
- // Message block which contains the read data.
-
- virtual ACE_HANDLE handle (void) const = 0;
- // I/O handle used for reading.
-
-protected:
- ACE_Asynch_Read_Stream_Result_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Write_Stream_Impl : public virtual ACE_Asynch_Operation_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Write_Stream class.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Write_Stream_Impl (void);
-
- virtual int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number) = 0;
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be written from the <message_block>.
-
-protected:
- ACE_Asynch_Write_Stream_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Write_Stream_Result_Impl : public virtual ACE_Asynch_Result_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Write_Stream::Result.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Write_Stream_Result_Impl (void);
-
- virtual u_long bytes_to_write (void) const = 0;
- // The number of bytes which were requested at the start of the
- // asynchronous write.
-
- virtual ACE_Message_Block &message_block (void) const = 0;
- // Message block that contains the data to be written.
-
- virtual ACE_HANDLE handle (void) const = 0;
- // I/O handle used for writing.
-
-protected:
- ACE_Asynch_Write_Stream_Result_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Read_File_Impl : public virtual ACE_Asynch_Read_Stream_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Read_File::Result.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Read_File_Impl (void);
-
- virtual int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number) = 0;
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>. The read will start
- // at <offset> from the beginning of the file.
-
- // We don;t need to redefine the following function again because it
- // has already been defined in ACE_Asynch_Read_Stream_Impl. But we
- // still need it here to supress a overwriting pure virtual function
- // warning in KAI compiler.
- virtual int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number) = 0;
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>.
-
-protected:
- ACE_Asynch_Read_File_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Read_File_Result_Impl : public virtual ACE_Asynch_Read_Stream_Result_Impl
-{
- // = TITLE
- // This is the abstract base class for all the concrete
- // implementation classes for ACE_Asynch_Read_File::Result.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Read_File_Result_Impl (void);
- // Destructor.
-
-protected:
- ACE_Asynch_Read_File_Result_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Write_File_Impl : public virtual ACE_Asynch_Write_Stream_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Write_File.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Write_File_Impl (void);
-
- virtual int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number) = 0;
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be write and stored in the <message_block>. The write will
- // start at <offset> from the beginning of the file.
-
- // We don;t need to redefine the following function again because it
- // has already been defined in ACE_Asynch_Write_Stream_Impl. But we
- // still need it here to supress a overwriting pure virtual function
- // warning in KAI compiler.
- virtual int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number) = 0;
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be written from the <message_block>.
-
-protected:
- ACE_Asynch_Write_File_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Write_File_Result_Impl : public virtual ACE_Asynch_Write_Stream_Result_Impl
-{
- // = TITLE
- //
- // This is the abstract base class for all the concrete
- // implementation classes that provide different implementations
- // for the ACE_Asynch_Write_File::Result.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Write_File_Result_Impl (void);
-
-protected:
- ACE_Asynch_Write_File_Result_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Accept_Impl : public virtual ACE_Asynch_Operation_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Accept.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Accept_Impl (void);
-
- virtual int accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle,
- const void *act,
- int priority,
- int signal_number) = 0;
- // This starts off an asynchronous accept. The asynchronous accept
- // call also allows any initial data to be returned to the
- // <handler>. Upto <bytes_to_read> will be read and stored in the
- // <message_block>. The <accept_handle> will be used for the
- // <accept> call. If (<accept_handle> == INVALID_HANDLE), a new
- // handle will be created.
- //
- // <message_block> must be specified. This is because the address of
- // the new connection is placed at the end of this buffer.
-
-protected:
- ACE_Asynch_Accept_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Accept_Result_Impl : public virtual ACE_Asynch_Result_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Accept.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Accept_Result_Impl (void);
-
- virtual u_long bytes_to_read (void) const = 0;
- // The number of bytes which were requested at the start of the
- // asynchronous accept.
-
- virtual ACE_Message_Block &message_block (void) const = 0;
- // Message block which contains the read data.
-
- virtual ACE_HANDLE listen_handle (void) const = 0;
- // I/O handle used for accepting new connections.
-
- virtual ACE_HANDLE accept_handle (void) const = 0;
- // I/O handle for the new connection.
-
-protected:
- ACE_Asynch_Accept_Result_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Asynch_Transmit_File_Impl : public virtual ACE_Asynch_Operation_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Transmit_File.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Transmit_File_Impl (void);
-
- virtual int transmit_file (ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- int priority,
- int signal_number) = 0;
- // This starts off an asynchronous transmit file.
-
-protected:
- ACE_Asynch_Transmit_File_Impl (void);
- // Do-nothing constructor.
-};
-
-class ACE_Export ACE_Asynch_Transmit_File_Result_Impl : public virtual ACE_Asynch_Result_Impl
-{
- // = TITLE
- //
- // Abstract base class for all the concrete implementation
- // classes that provide different implementations for the
- // ACE_Asynch_Transmit_File::Result.
- //
- // = DESCRIPTION
- //
-public:
- virtual ~ACE_Asynch_Transmit_File_Result_Impl (void);
-
- virtual ACE_HANDLE socket (void) const = 0;
- // Socket used for transmitting the file.
-
- virtual ACE_HANDLE file (void) const = 0;
- // File from which the data is read.
-
- virtual ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer (void) const = 0;
- // Header and trailer data associated with this transmit file.
-
- virtual u_long bytes_to_write (void) const = 0;
- // The number of bytes which were requested at the start of the
- // asynchronous transmit file.
-
- virtual u_long bytes_per_send (void) const = 0;
- // Number of bytes per send requested at the start of the transmit
- // file.
-
- virtual u_long flags (void) const = 0;
- // Flags which were passed into transmit file.
-
-protected:
- ACE_Asynch_Transmit_File_Result_Impl (void);
- // Do-nothing constructor.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Asynch_IO_Impl.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_AIO_CALLS || !ACE_HAS_WINCE && ACE_WIN32 */
-#include "ace/post.h"
-#endif /* ACE_ASYNCH_IO_IMPL_H */
diff --git a/ace/Asynch_IO_Impl.i b/ace/Asynch_IO_Impl.i
deleted file mode 100644
index a6c36925943..00000000000
--- a/ace/Asynch_IO_Impl.i
+++ /dev/null
@@ -1,87 +0,0 @@
-// $Id$
-
-ACE_INLINE
-ACE_Asynch_Result_Impl::ACE_Asynch_Result_Impl (void)
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Operation_Impl::ACE_Asynch_Operation_Impl (void)
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Read_Stream_Impl::ACE_Asynch_Read_Stream_Impl (void)
- : ACE_Asynch_Operation_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Read_Stream_Result_Impl::ACE_Asynch_Read_Stream_Result_Impl (void)
- : ACE_Asynch_Result_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Write_Stream_Impl::ACE_Asynch_Write_Stream_Impl (void)
- : ACE_Asynch_Operation_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Write_Stream_Result_Impl::ACE_Asynch_Write_Stream_Result_Impl (void)
- : ACE_Asynch_Result_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Read_File_Impl::ACE_Asynch_Read_File_Impl (void)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Read_Stream_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Read_File_Result_Impl::ACE_Asynch_Read_File_Result_Impl (void)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Read_Stream_Result_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Write_File_Impl::ACE_Asynch_Write_File_Impl (void)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Write_Stream_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Write_File_Result_Impl::ACE_Asynch_Write_File_Result_Impl (void)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Write_Stream_Result_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Accept_Impl::ACE_Asynch_Accept_Impl (void)
- : ACE_Asynch_Operation_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Accept_Result_Impl::ACE_Asynch_Accept_Result_Impl (void)
- : ACE_Asynch_Result_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Transmit_File_Impl::ACE_Asynch_Transmit_File_Impl (void)
- : ACE_Asynch_Operation_Impl ()
-{
-}
-
-ACE_INLINE
-ACE_Asynch_Transmit_File_Result_Impl::ACE_Asynch_Transmit_File_Result_Impl (void)
- : ACE_Asynch_Result_Impl ()
-{
-}
diff --git a/ace/Atomic_Op.i b/ace/Atomic_Op.i
deleted file mode 100644
index 63992717db2..00000000000
--- a/ace/Atomic_Op.i
+++ /dev/null
@@ -1,200 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator++ (void)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator++");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_);
- return ++this->value_;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator+= (const TYPE &i)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator+=");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_);
- return this->value_ += i;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator-- (void)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator--");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_);
- return --this->value_;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator-= (const TYPE &i)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator-=");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_);
- return this->value_ -= i;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE
-ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op (const ACE_Atomic_Op<ACE_LOCK, TYPE> &rhs)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op");
- *this = rhs; // Invoke the assignment operator.
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator++ (int)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator++");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_);
- return this->value_++;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator-- (int)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator--");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_);
- return this->value_--;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator== (const TYPE &i) const
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator==");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, -1);
- return this->value_ == i;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator!= (const TYPE &i) const
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator!=");
- return !(*this == i);
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator>= (const TYPE &i) const
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator>=");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, -1);
- return this->value_ >= i;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator> (const TYPE &rhs) const
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator>");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, -1);
- return this->value_ > rhs;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator<= (const TYPE &rhs) const
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator<=");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, -1);
- return this->value_ <= rhs;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE int
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator< (const TYPE &rhs) const
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator<");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, -1);
- return this->value_ < rhs;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE void
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator= (const ACE_Atomic_Op<ACE_LOCK, TYPE> &rhs)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator=");
- if (&rhs == this)
- return; // Avoid deadlock...
- ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_);
- // This will call ACE_Atomic_Op::TYPE(), which will ensure the value
- // of <rhs> is acquired atomically.
-
- this->value_ = rhs.value ();
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE
-ACE_Atomic_Op<ACE_LOCK, TYPE>::value (void) const
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::value");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->mutex_, this->value_);
- return this->value_;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE &
-ACE_Atomic_Op<ACE_LOCK, TYPE>::value_i (void)
-{
- // Explicitly return <value_> (by reference). This gives the user
- // full, unrestricted access to the underlying value. This method
- // will usually be used in conjunction with explicit access to the
- // lock. Use with care ;-)
- return this->value_;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_INLINE void
-ACE_Atomic_Op<ACE_LOCK, TYPE>::operator= (const TYPE &i)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::operator=");
- ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_);
- this->value_ = i;
-}
-
-// These specializations have been added to ACE_Atomic_Op to make the
-// implementation faster on Win32 that has OS support for doing this
-// quickly through methods like InterlockedIncrement and
-// InterlockedDecrement
-
-#if defined (ACE_WIN32)
-
-ACE_TEMPLATE_SPECIALIZATION
-inline long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator++ (void)
-{
- return ::InterlockedIncrement (&this->value_);
-}
-
-ACE_TEMPLATE_SPECIALIZATION
-inline long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-- (void)
-{
- return ::InterlockedDecrement (&this->value_);
-}
-
-ACE_TEMPLATE_SPECIALIZATION
-inline void
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= (const long &i)
-{
- ::InterlockedExchange (&this->value_,
- i);
-}
-
-ACE_TEMPLATE_SPECIALIZATION
-inline void
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= (const ACE_Atomic_Op<ACE_Thread_Mutex, long> &rhs)
-{
- ::InterlockedExchange (&this->value_,
- rhs.value ());
-}
-
-#if defined (ACE_HAS_INTERLOCKED_EXCHANGEADD)
-
-ACE_TEMPLATE_SPECIALIZATION
-inline long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator+= (const long &i)
-{
- return ::InterlockedExchangeAdd (&this->value_, i);
-}
-
-ACE_TEMPLATE_SPECIALIZATION
-inline long
-ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-= (const long &i)
-{
- return ::InterlockedExchangeAdd (&this->value_, -i);
-}
-
-#endif /* ACE_HAS_INTERLOCKED_EXCHANGEADD */
-
-#endif /* ACE_WIN32 */
diff --git a/ace/Auto_IncDec_T.cpp b/ace/Auto_IncDec_T.cpp
deleted file mode 100644
index 2ca06874a2e..00000000000
--- a/ace/Auto_IncDec_T.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// $Id$
-
-#ifndef ACE_AUTO_INCDEC_T_C
-#define ACE_AUTO_INCDEC_T_C
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Auto_IncDec_T.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID(ace, Auto_IncDec_T, "Auto_IncDec_T.cpp, by Edan Ayal")
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Auto_IncDec_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Auto_IncDec)
-
-template <class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> void
-ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>::dump (void) const
-{
-// ACE_TRACE ("ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#endif /* ACE_AUTO_INCDEC_T_C */
diff --git a/ace/Auto_IncDec_T.h b/ace/Auto_IncDec_T.h
deleted file mode 100644
index 39a8818ae81..00000000000
--- a/ace/Auto_IncDec_T.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-//============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Auto_IncDec_T.h
-//
-// = AUTHOR
-// Edan Ayal <EdanA@cti2.com>
-//
-//============================================================================
-
-#ifndef ACE_AUTO_INCDEC_T_H
-#define ACE_AUTO_INCDEC_T_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>
-class ACE_Auto_IncDec
-{
- // = TITLE
- // This class automatically increments and decrements a
- // parameterized counter.
- //
- // = DESCRIPTION
- // This data structure is meant to be used within a method,
- // function, or scope. The actual parameter given for the
- // <ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> template parameter
- // must provide at least opertaors ++ and --.
-public:
- // = Initialization and termination methods.
- ACE_Auto_IncDec (ACE_SAFELY_INCREMENTABLE_DECREMENTABLE &counter);
- // Implicitly increment the counter.
-
- ~ACE_Auto_IncDec (void);
- // Implicitly decrement the counter.
-
- void dump (void) const;
- // Dump the state of an object.
-
-protected:
- ACE_SAFELY_INCREMENTABLE_DECREMENTABLE &counter_;
- // Reference to the <ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> counter
- // we're incrementing/decrementing.
-
-private:
- // = Prevent assignment and initialization.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const
- ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Auto_IncDec (const
- ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> &))
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Auto_IncDec_T.i"
-// On non-Win32 platforms, this code will be inlined
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Auto_IncDec_T.cpp"
-// On Win32 platforms, this code will be included as template source
-// code and will not be inlined. Therefore, we first turn off
-// ACE_INLINE, set it to be nothing, include the code, and then turn
-// ACE_INLINE back to its original setting. All this nonsense is
-// necessary, since the generic template code that needs to be
-// specialized cannot be inlined, else the compiler will ignore the
-// specialization code. Also, the specialization code *must* be
-// inlined or the compiler will ignore the specializations.
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Auto_IncDec_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_AUTO_INCDEC_T_H */
diff --git a/ace/Auto_IncDec_T.i b/ace/Auto_IncDec_T.i
deleted file mode 100644
index 96658ed76c5..00000000000
--- a/ace/Auto_IncDec_T.i
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Implicitly and automatically increment the counter.
-
-template <class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> ACE_INLINE
-ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>::ACE_Auto_IncDec
- (ACE_SAFELY_INCREMENTABLE_DECREMENTABLE &counter)
- : counter_ (counter)
-{
- ++this->counter_;
-}
-
-// Implicitly and automatically decrement the counter.
-
-template <class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> ACE_INLINE
-ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>::~ACE_Auto_IncDec (void)
-{
- --this->counter_;
-}
-
diff --git a/ace/Auto_Ptr.cpp b/ace/Auto_Ptr.cpp
deleted file mode 100644
index 831184bcb89..00000000000
--- a/ace/Auto_Ptr.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// Auto_Ptr.cpp
-// $Id$
-
-#if !defined (ACE_AUTO_PTR_C)
-#define ACE_AUTO_PTR_C
-
-#include "ace/Auto_Ptr.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Auto_Ptr.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Auto_Ptr, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Auto_Basic_Ptr)
-
-template<class X> void
-ACE_Auto_Basic_Ptr<X>::dump (void) const
-{
- ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::dump");
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Auto_Basic_Array_Ptr)
-
-template<class X> void
-ACE_Auto_Basic_Array_Ptr<X>::dump (void) const
-{
- ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::dump");
-}
-
-#endif /* ACE_AUTO_PTR_C */
diff --git a/ace/Auto_Ptr.h b/ace/Auto_Ptr.h
deleted file mode 100644
index 263e37d903f..00000000000
--- a/ace/Auto_Ptr.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Auto_Ptr.h
-//
-// = AUTHOR
-// Doug Schmidt and Irfan Pyarali, based on code from Jack Reeves
-// (jack@fx.com) and Dr. Harald M. Mueller
-// (mueller@garwein.hai.siemens.co.at)
-//
-// ============================================================================
-
-#ifndef ACE_AUTO_PTR_H
-#define ACE_AUTO_PTR_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class X>
-class ACE_Auto_Basic_Ptr
-{
- // = TITLE
- // Implements the draft C++ standard auto_ptr abstraction.
- // This class allows one to work on non-object (basic) types
-public:
- // = Initialization and termination methods
- ACE_EXPLICIT ACE_Auto_Basic_Ptr (X *p = 0);
- ACE_Auto_Basic_Ptr (ACE_Auto_Basic_Ptr<X> &ap);
- ACE_Auto_Basic_Ptr<X> &operator= (ACE_Auto_Basic_Ptr<X> &rhs);
- ~ACE_Auto_Basic_Ptr (void);
-
- // = Accessor methods.
- X &operator *() const;
- X *get (void) const;
- X *release (void);
- void reset (X *p = 0);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- X *p_;
-};
-
-#if !defined (ACE_LACKS_AUTO_PTR) && \
- defined (ACE_HAS_STANDARD_CPP_LIBRARY) && \
- (ACE_HAS_STANDARD_CPP_LIBRARY != 0)
-#include <memory>
-#if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \
- (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0)
-using std::auto_ptr;
-#endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
-#else /* ACE_HAS_STANDARD_CPP_LIBRARY */
-
-template <class X>
-class auto_ptr : public ACE_Auto_Basic_Ptr <X>
-{
- // = TITLE
- // Implements the draft C++ standard auto_ptr abstraction.
-public:
- // = Initialization and termination methods
- ACE_EXPLICIT auto_ptr (X *p = 0);
-
- X *operator-> () const;
-};
-
-#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
-
-template<class X>
-class ACE_Auto_Basic_Array_Ptr
-{
- // = TITLE
- // Implements an extension to the draft C++ standard auto_ptr
- // abstraction. This class allows one to work on non-object
- // (basic) types that must be treated as an array, e.g.,
- // deallocated via "delete [] foo".
-public:
- // = Initialization and termination methods.
- ACE_EXPLICIT ACE_Auto_Basic_Array_Ptr (X *p = 0);
- ACE_Auto_Basic_Array_Ptr (ACE_Auto_Basic_Array_Ptr<X> &ap);
- ACE_Auto_Basic_Array_Ptr<X> &operator= (ACE_Auto_Basic_Array_Ptr<X> &rhs);
- ~ACE_Auto_Basic_Array_Ptr (void);
-
- // = Accessor methods.
- X &operator* () const;
- X &operator[] (int i) const;
- X *get (void) const;
- X *release (void);
- void reset (X *p = 0);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- X *p_;
-};
-
-template<class X>
-class ACE_Auto_Array_Ptr : public ACE_Auto_Basic_Array_Ptr<X>
-{
- // = TITLE
- // Implements an extension to the draft C++ standard auto_ptr
- // abstraction.
-public:
- // = Initialization and termination methods.
- ACE_EXPLICIT ACE_Auto_Array_Ptr (X *p = 0);
-
- X *operator-> () const;
-};
-
-// Some platforms have an older version of auto_ptr
-// support, which lacks reset, and cannot be disabled
-// easily. Portability to these platforms requires
-// use of the following ACE_AUTO_PTR_RESET macro.
-# if defined (ACE_AUTO_PTR_LACKS_RESET)
-# define ACE_AUTO_PTR_RESET(X,Y,Z) \
- do { \
- if (Y != X.get ()) \
- { \
- X.release (); \
- X = auto_ptr<Z> (Y); \
- } \
- } while (0)
-# else /* ! ACE_AUTO_PTR_LACKS_RESET */
-# define ACE_AUTO_PTR_RESET(X,Y,Z) \
- do { \
- X.reset (Y); \
- } while (0)
-# endif /* ACE_AUTO_PTR_LACKS_RESET */
-
-
-#if defined (__ACE_INLINE__)
-#include "ace/Auto_Ptr.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Auto_Ptr.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Auto_Ptr.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_AUTO_PTR_H */
diff --git a/ace/Auto_Ptr.i b/ace/Auto_Ptr.i
deleted file mode 100644
index dae25bdf271..00000000000
--- a/ace/Auto_Ptr.i
+++ /dev/null
@@ -1,171 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Auto_Ptr.i
-
-template<class X> ACE_INLINE
-ACE_Auto_Basic_Ptr<X>::ACE_Auto_Basic_Ptr (X *p)
- : p_ (p)
-{
- ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::ACE_Auto_Basic_Ptr");
-}
-
-template<class X> ACE_INLINE
-ACE_Auto_Basic_Ptr<X>::ACE_Auto_Basic_Ptr (ACE_Auto_Basic_Ptr<X> &rhs)
- : p_ (rhs.release ())
-{
- ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::ACE_Auto_Basic_Ptr");
-}
-
-template<class X> ACE_INLINE X *
-ACE_Auto_Basic_Ptr<X>::get (void) const
-{
- ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::get");
- return this->p_;
-}
-
-template<class X> ACE_INLINE X *
-ACE_Auto_Basic_Ptr<X>::release (void)
-{
- ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::release");
- X *old = this->p_;
- this->p_ = 0;
- return old;
-}
-
-template<class X> ACE_INLINE void
-ACE_Auto_Basic_Ptr<X>::reset (X *p)
-{
- ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::reset");
- if (this->get () != p)
- delete this->get ();
- this->p_ = p;
-}
-
-template<class X> ACE_INLINE ACE_Auto_Basic_Ptr<X> &
-ACE_Auto_Basic_Ptr<X>::operator= (ACE_Auto_Basic_Ptr<X> &rhs)
-{
- ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::operator=");
- if (this != &rhs)
- {
- this->reset (rhs.release ());
- }
- return *this;
-}
-
-template<class X> ACE_INLINE
-ACE_Auto_Basic_Ptr<X>::~ACE_Auto_Basic_Ptr (void)
-{
- ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::~ACE_Auto_Basic_Ptr");
- delete this->get ();
-}
-
-template<class X> ACE_INLINE X &
-ACE_Auto_Basic_Ptr<X>::operator *() const
-{
- ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::operator *()");
- return *this->get ();
-}
-
-#if defined (ACE_LACKS_AUTO_PTR) || \
- !defined (ACE_HAS_STANDARD_CPP_LIBRARY) || \
- (ACE_HAS_STANDARD_CPP_LIBRARY == 0)
-
-template<class X> ACE_INLINE
-auto_ptr<X>::auto_ptr (X *p)
- : ACE_Auto_Basic_Ptr<X> (p)
-{
- ACE_TRACE ("auto_ptr<X>::auto_ptr");
-}
-
-template<class X> ACE_INLINE X *
-auto_ptr<X>::operator-> () const
-{
- ACE_TRACE ("auto_ptr<X>::operator->");
- return this->get ();
-}
-
-#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
-
-template<class X> ACE_INLINE
-ACE_Auto_Basic_Array_Ptr<X>::ACE_Auto_Basic_Array_Ptr (X *p)
- : p_ (p)
-{
- ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::ACE_Auto_Basic_Array_Ptr");
-}
-
-template<class X> ACE_INLINE X *
-ACE_Auto_Basic_Array_Ptr<X>::get (void) const
-{
- ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::get");
- return this->p_;
-}
-
-template<class X> ACE_INLINE X *
-ACE_Auto_Basic_Array_Ptr<X>::release (void)
-{
- ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::release");
- X *old = this->p_;
- this->p_ = 0;
- return old;
-}
-
-template<class X> ACE_INLINE void
-ACE_Auto_Basic_Array_Ptr<X>::reset (X *p)
-{
- ACE_TRACE ("ACE_Auto_Basic_Ptr<X>::reset");
- if (this->get () != p)
- delete [] this->get ();
- this->p_ = p;
-}
-
-template<class X> ACE_INLINE
-ACE_Auto_Basic_Array_Ptr<X>::ACE_Auto_Basic_Array_Ptr (ACE_Auto_Basic_Array_Ptr<X> &rhs)
- : p_ (rhs.release ())
-{
- ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::ACE_Auto_Basic_Array_Ptr");
-}
-
-template<class X> ACE_INLINE ACE_Auto_Basic_Array_Ptr<X> &
-ACE_Auto_Basic_Array_Ptr<X>::operator= (ACE_Auto_Basic_Array_Ptr<X> &rhs)
-{
- ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::operator=");
- if (this != &rhs)
- {
- this->reset (rhs.release ());
- }
- return *this;
-}
-
-template<class X> ACE_INLINE
-ACE_Auto_Basic_Array_Ptr<X>::~ACE_Auto_Basic_Array_Ptr (void)
-{
- ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::~ACE_Auto_Basic_Array_Ptr");
- delete [] this->get ();
-}
-
-template<class X> ACE_INLINE X &
-ACE_Auto_Basic_Array_Ptr<X>::operator *() const
-{
- return *this->get ();
-}
-
-template<class X> ACE_INLINE X &
-ACE_Auto_Basic_Array_Ptr<X>::operator[](int i) const
-{
- X *array = this->get ();
- return array[i];
-}
-
-template<class X> ACE_INLINE
-ACE_Auto_Array_Ptr<X>::ACE_Auto_Array_Ptr (X *p)
- : ACE_Auto_Basic_Array_Ptr<X> (p)
-{
- ACE_TRACE ("ACE_Auto_Basic_Array_Ptr<X>::ACE_Auto_Basic_Array_Ptr");
-}
-
-template<class X> ACE_INLINE X *
-ACE_Auto_Array_Ptr<X>::operator->() const
-{
- return this->get ();
-}
diff --git a/ace/Based_Pointer_Repository.cpp b/ace/Based_Pointer_Repository.cpp
deleted file mode 100644
index ba1283fb41a..00000000000
--- a/ace/Based_Pointer_Repository.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-// $Id$
-
-#include "ace/Map_Manager.h"
-#include "ace/Based_Pointer_Repository.h"
-
-class ACE_Based_Pointer_Repository_Rep
-{
- // = TITLE
- // Implementation for the <ACE_Based_Pointer_Repository>.
- //
- // = DESCRIPTION
- // Every memory pool in ACE binds it's mapping base address and
- // the mapped size to this repository every time it maps/remaps a
- // new chunk of memory successfully.
-
-public:
- // Useful typedefs.
- typedef ACE_Map_Manager <void *, size_t, ACE_Null_Mutex> MAP_MANAGER;
- typedef ACE_Map_Iterator < void *, size_t, ACE_Null_Mutex> MAP_ITERATOR;
- typedef ACE_Map_Entry <void *, size_t> MAP_ENTRY;
-
- MAP_MANAGER addr_map_;
- // Keeps track of the mapping between addresses and their associated
- // values.
-
- ACE_SYNCH_MUTEX lock_;
- // Synchronize concurrent access to the map.
-};
-
-ACE_Based_Pointer_Repository::ACE_Based_Pointer_Repository (void)
-{
- ACE_TRACE ("ACE_Based_Pointer_Repository::ACE_Based_Pointer_Repository");
- ACE_NEW (this->rep_,
- ACE_Based_Pointer_Repository_Rep);
-}
-
-ACE_Based_Pointer_Repository::~ACE_Based_Pointer_Repository (void)
-{
- ACE_TRACE ("ACE_Based_Pointer_Repository::~ACE_Based_Pointer_Repository");
- delete this->rep_;
-}
-
-// Search for appropriate base address in repository
-
-int
-ACE_Based_Pointer_Repository::find (void *addr,
- void *&base_addr)
-{
- ACE_TRACE ("ACE_Based_Pointer_Repository::find");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->rep_->lock_, -1);
- ACE_Based_Pointer_Repository_Rep::MAP_ENTRY *ce = 0;
-
- for (ACE_Based_Pointer_Repository_Rep::MAP_ITERATOR iter (this->rep_->addr_map_);
- iter.next (ce) != 0;
- iter.advance ())
- // Check to see if <addr> is within any of the regions.
- if (addr >= ce->ext_id_
- && addr < ((char *) ce->ext_id_ + ce->int_id_))
- {
- // Assign the base address.
- base_addr = ce->ext_id_;
- return 1;
- }
-
- // Assume base address 0 (e.g., if new'ed).
- base_addr = 0;
- return 0;
-}
-
-// Bind a new entry to the repository or update the size of an
-// existing entry.
-
-int
-ACE_Based_Pointer_Repository::bind (void *addr,
- size_t size)
-{
- ACE_TRACE ("ACE_Based_Pointer_Repository::bind");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->rep_->lock_, -1);
-
- return this->rep_->addr_map_.rebind (addr, size);
-}
-
-// Unbind a base from the repository.
-
-int
-ACE_Based_Pointer_Repository::unbind (void *addr)
-{
- ACE_TRACE ("ACE_Based_Pointer_Repository::unbind");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->rep_->lock_, -1);
- ACE_Based_Pointer_Repository_Rep::MAP_ENTRY *ce = 0;
-
- // Search for service handlers that requested notification.
-
- for (ACE_Based_Pointer_Repository_Rep::MAP_ITERATOR iter (this->rep_->addr_map_);
- iter.next (ce) != 0;
- iter.advance ())
- {
- // Check to see if <addr> is within any of the regions and if
- // so, unbind the key from the map.
- if (addr >= ce->ext_id_
- && addr < ((char *) ce->ext_id_ + ce->int_id_))
- // Unbind base address.
- return this->rep_->addr_map_.unbind (ce->ext_id_);
- }
-
- return 0;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Singleton <ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX>;
-template class ACE_Map_Entry<void *, size_t>;
-template class ACE_Map_Manager<void *, size_t, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<void *, size_t, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<void *, size_t, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<void *, size_t, ACE_Null_Mutex>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Singleton <ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Map_Entry<void *, size_t>
-#pragma instantiate ACE_Map_Manager<void *, size_t, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator<void *, size_t, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Reverse_Iterator<void *, size_t, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator_Base<void *, size_t, ACE_Null_Mutex>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Based_Pointer_Repository.h b/ace/Based_Pointer_Repository.h
deleted file mode 100644
index 7873daaacd7..00000000000
--- a/ace/Based_Pointer_Repository.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Based_Pointer_Repository.h
-//
-// = AUTHOR
-// Dietrich Quehl <Dietrich.Quehl@med.siemens.de> and
-// Douglas C. Schmidt <schmidt@.cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_BASED_POINTER_REPOSITORY_H
-#define ACE_BASED_POINTER_REPOSITORY_H
-#include "ace/pre.h"
-
-#include "ace/OS.h" // Need ACE_Export
-
-// Forward decl., using the "Cheshire Cat" technique.
-class ACE_Based_Pointer_Repository_Rep;
-
-class ACE_Export ACE_Based_Pointer_Repository
-{
- // = TITLE
- // Maps pointers to the base address of the region to which each
- // pointer belongs.
-public:
- // = Use <ACE_Null_Mutex> to allow locking while iterating.
-
- // = Initialization and termination methods.
- ACE_Based_Pointer_Repository (void);
- ~ACE_Based_Pointer_Repository (void);
-
- // = Search structure methods.
- int find (void *addr,
- void *&base_addr);
- // Return the appropriate <base_addr> region that contains <addr>.
- // Returns 1 on success and 0 if the <addr> isn't contained in any
- // <base_addr> region.
-
- int bind (void *addr,
- size_t size);
- // Bind a new entry to the repository or update the size of an
- // existing entry. Returns 0 on success and -1 on failure.
-
- int unbind (void *addr);
- // Unbind from the repository the <base_addr> that <addr> is
- // contained within.
-
-private:
- ACE_Based_Pointer_Repository_Rep *rep_;
- // Use the "Cheshire-Cat" technique to hide the implementation in
- // order to avoid circular #include dependencies.
-};
-
-#include "ace/Singleton.h"
-
-// Provide a Singleton access point to the based pointer repository.
-typedef ACE_Singleton<ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX>
- ACE_BASED_POINTER_REPOSITORY;
-
-#include "ace/post.h"
-#endif /* ACE_BASED_POINTER_REPOSITORY_H */
diff --git a/ace/Based_Pointer_T.cpp b/ace/Based_Pointer_T.cpp
deleted file mode 100644
index e4452fc90a1..00000000000
--- a/ace/Based_Pointer_T.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// $Id$
-
-#ifndef ACE_BASED_POINTER_T_CPP
-#define ACE_BASED_POINTER_T_CPP
-
-#include "ace/Based_Pointer_T.h"
-#include "ace/Based_Pointer_Repository.h"
-
-# define ACE_TRACEX(X) ACE_Trace ____ (ACE_TEXT (X), __LINE__, ACE_TEXT (__FILE__))
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Based_Pointer_T.i"
-#endif /* __ACE_INLINE__ */
-
-template <class CONCRETE>
-ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (void)
-{
- ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer");
-}
-
-template <class CONCRETE> void
-ACE_Based_Pointer_Basic<CONCRETE>::dump (void) const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntarget_ = %d\n"), this->target_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base_offset_ = %d\n"), this->base_offset_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("computed pointer = %x\n"), (CONCRETE *)(ACE_COMPUTE_BASED_POINTER (this))));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class CONCRETE>
-ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (CONCRETE *initial)
- : ACE_Based_Pointer_Basic<CONCRETE> (initial)
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic");
-}
-
-template <class CONCRETE>
-ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (const void* base_addr, int)
- : ACE_Based_Pointer_Basic<CONCRETE> (base_addr, 0)
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic");
-}
-
-template <class CONCRETE>
-ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (void)
- : target_ (0),
- base_offset_ (0)
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic");
- void *base_addr = 0;
-
- // Find the base address associated with our <this> pointer. Note
- // that it's ok for <find> to return 0, which simply indicates that
- // the address is not in memory-mapped virtual address space.
- ACE_BASED_POINTER_REPOSITORY::instance ()->find (this,
- base_addr);
- this->base_offset_ = (char *) this - (char *) base_addr;
-}
-
-template <class CONCRETE>
-ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (const void *base_addr, int)
- : target_ (0),
- base_offset_ (0)
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic");
- this->base_offset_ = (char *) this - (char *) base_addr;
-}
-
-template <class CONCRETE>
-ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (CONCRETE *rhs)
- : target_ (0),
- base_offset_ (0)
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic");
-
- if (rhs == 0)
- // Store a value of <target_> that indicate "NULL" pointer.
- this->target_ = -1;
- else
- {
- void *base_addr = 0;
-
- // Find the base address associated with the <addr> pointer.
- // Note that it's ok for <find> to return 0, which simply
- // indicates that the address is not in memory-mapped virtual
- // address space.
- ACE_BASED_POINTER_REPOSITORY::instance ()->find (this,
- base_addr);
- this->base_offset_ = (char *) this - (char *) base_addr;
- this->target_ = ((char *) rhs - (char *) base_addr);
- }
-}
-
-template <class CONCRETE>
-ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic<CONCRETE> &)
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic");
-
- ACE_ASSERT (0); // not implemented.
-}
-
-template <class CONCRETE>
-ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer (const ACE_Based_Pointer<CONCRETE> &rhs)
- : ACE_Based_Pointer_Basic<CONCRETE> (rhs)
-{
- ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::ACE_Based_Pointer");
- ACE_ASSERT (0); // not implemented.
-}
-
-#endif /* ACE_BASED_POINTER_T_CPP */
diff --git a/ace/Based_Pointer_T.h b/ace/Based_Pointer_T.h
deleted file mode 100644
index 3ae2f0cc833..00000000000
--- a/ace/Based_Pointer_T.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Based_Pointer_T.h
-//
-// = AUTHOR
-// Dietrich Quehl <Dietrich.Quehl@med.siemens.de> and
-// Douglas C. Schmidt <schmidt@.cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_BASED_POINTER_T_H
-#define ACE_BASED_POINTER_T_H
-#include "ace/pre.h"
-
-#include "ace/OS.h" // Need ACE_Export
-
-#if defined (_MSC_VER)
-// Suppress warning e.g. "return type for
-// 'ACE_Based_Pointer<long>::operator ->' is 'long *' (i.e., not a UDT
-// or reference to a UDT. Will produce errors if applied using infix
-// notation)"
-#pragma warning(disable: 4284)
-#endif /* _MSC_VER */
-
-template <class CONCRETE>
-class ACE_Based_Pointer_Basic
-{
- // = TITLE
- // A proxy that keeps track of the relative offset of a "pointer"
- // from its base address.
- //
- // This class makes it possible to transparently use "pointers" in
- // shared memory as easily as programming with pointers to local
- // memory. In particular, we don't need to ensure that the base
- // addresses of all the pointers are mapped into separate
- // processes at the same absolute memory base address.
-public:
- ACE_Based_Pointer_Basic (void);
- // This constructor initializes the <base_offset_> by asking the
- // <ACE_BASED_POINTER_REPOSITORY> Singleton for the base address of
- // the memory region within which it is instantiated. Two results
- // are possible:
- //
- // 1. An <ACE_*_Memory_Pool> has stored a base address/size pair and the
- // new based-pointer instance is located between the base address and
- // the base address + size - 1. In this case, the repository
- // returns the base address.
- //
- // 2. No suitable address/size pair was found. The repository
- // assumes an address in the regular (not mapped) virtual address
- // space of the process and returns 0. In this case, the
- // based-pointer uses its address as an offset to it's base
- // address 0.
-
- ACE_Based_Pointer_Basic (CONCRETE *initial);
- // Initialize this object using the <initial> pointer. This
- // constructor initializes the <base_offset_> by asking the
- // <ACE_BASED_POINTER_REPOSITORY> Singleton for the base address of
- // the memory region within which it is instantiated. Two results
- // are possible:
- //
- // 1. An <ACE_*_Memory_Pool> has stored a base address/size pair and the
- // new based-pointer instance is located between the base address and
- // the base address + size - 1. In this case, the repository
- // returns the base address.
- //
- // 2. No suitable address/size pair was found. The repository
- // assumes an address in the regular (not mapped) virtual address
- // space of the process and returns 0. In this case, the
- // based-pointer uses its address as an offset to it's base
- // address 0.
-
- ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic<CONCRETE> &);
- // Copy constructor.
-
- ACE_Based_Pointer_Basic (const void *base_addr, int o);
- // Constructor for know base address. <o> is only used to
- // resolve overload ambiguity.
-
- void operator = (CONCRETE *from);
- // Pseudo-assignment operator.
-
- void operator = (const ACE_Based_Pointer_Basic<CONCRETE> &);
- // Pseudo-assignment operator.
-
- CONCRETE operator * (void) const;
- // Dereference operator.
-
- int operator < (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
- // Less than operator.
-
- int operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
- // Less than or equal operator.
-
- int operator > (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
- // Greater than operator.
-
- int operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
- // Greater than or equal operator.
-
- int operator == (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
- // Equality operator.
-
- int operator != (const ACE_Based_Pointer_Basic<CONCRETE> &) const;
- // Inequality operator.
-
- CONCRETE operator [](int index) const;
- // Subscript operator.
-
- void operator+= (int index);
- // Increment operator.
-
- operator CONCRETE *() const;
- // Returns the underlying memory address of the smart pointer.
-
- CONCRETE *addr (void) const;
- // Returns the underlying memory address of the smart pointer.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- void dump (void) const;
- // Dump the state of the object.
-
-protected:
- long target_;
-
- long base_offset_;
- // Keep track of our offset from the base pointer.
-};
-
-template <class CONCRETE>
-class ACE_Based_Pointer : public ACE_Based_Pointer_Basic<CONCRETE>
-{
- // = TITLE
- // A smart proxy that keeps track of the relative offset of a
- // "pointer" from its base address.
- //
- // = DESCRIPTION
- // This class makes it possible to transparently use "pointers" in
- // shared memory as easily as programming with pointers to local
- // memory by overloading the C++ delegation operator ->().
-public:
- // = Initialization method.
- ACE_Based_Pointer (void);
- // Constructor. See constructor for <ACE_Based_Pointer_Basic> for
- // details.
-
- ACE_Based_Pointer (CONCRETE *initial);
- // Initialize this object using the <initial> pointer.
-
- ACE_Based_Pointer (const void *base_addr, int o);
- // Initialize this object with known <base_addr>. <o> is
- // only used to resolve overload ambiguity.
-
- ACE_Based_Pointer (const ACE_Based_Pointer<CONCRETE> &);
- // Copy constructor (not implemented yet).
-
- void operator = (const ACE_Based_Pointer<CONCRETE> &);
- // Assignment operator.
-
- void operator = (CONCRETE *from);
- // Pseudo-assignment operator.
-
- CONCRETE *operator-> (void);
- // The C++ "delegation operator".
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Based_Pointer_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Based_Pointer_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Based_Pointer_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_BASED_POINTER_T_H */
diff --git a/ace/Based_Pointer_T.i b/ace/Based_Pointer_T.i
deleted file mode 100644
index a557c558081..00000000000
--- a/ace/Based_Pointer_T.i
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#define ACE_COMPUTE_BASED_POINTER(P) (((char *) (P) - (P)->base_offset_) + (P)->target_)
-
-template <class CONCRETE> ACE_INLINE CONCRETE *
-ACE_Based_Pointer<CONCRETE>::operator->(void)
-{
- ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator->");
- return (CONCRETE *)(ACE_COMPUTE_BASED_POINTER (this));
-}
-
-template <class CONCRETE> ACE_INLINE void
-ACE_Based_Pointer_Basic<CONCRETE>::operator = (CONCRETE *rhs)
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator=");
- if (rhs == 0)
- // Store a value of <target_> that indicate "NULL" pointer.
- this->target_ = -1;
- else
- this->target_ = ((char *) rhs
- - ((char *) this - this->base_offset_));
-}
-
-template <class CONCRETE> ACE_INLINE void
-ACE_Based_Pointer<CONCRETE>::operator = (CONCRETE *rhs)
-{
- ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator=");
- if (rhs == 0)
- // Store a value of <target_> that indicate "NULL" pointer.
- this->target_ = -1;
- else
- this->target_ = ((char *) rhs
- - ((char *) this - this->base_offset_));
-}
-
-template <class CONCRETE> ACE_INLINE CONCRETE
-ACE_Based_Pointer_Basic<CONCRETE>::operator *(void) const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator *");
- return *ACE_reinterpret_cast (CONCRETE *,
- ACE_COMPUTE_BASED_POINTER (this));
-}
-
-template <class CONCRETE> ACE_INLINE CONCRETE *
-ACE_Based_Pointer_Basic<CONCRETE>::addr (void) const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator CONCRETE *()");
-
- if (this->target_ == -1)
- return 0;
- else
- return ACE_reinterpret_cast (CONCRETE *,
- ACE_COMPUTE_BASED_POINTER (this));
-}
-
-template <class CONCRETE> ACE_INLINE
-ACE_Based_Pointer_Basic<CONCRETE>::operator CONCRETE *() const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator CONCRETE *()");
-
- return this->addr ();
-}
-
-template <class CONCRETE> ACE_INLINE CONCRETE
-ACE_Based_Pointer_Basic<CONCRETE>::operator [] (int index) const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator[]");
- CONCRETE *c = ACE_reinterpret_cast (CONCRETE *,
- ACE_COMPUTE_BASED_POINTER (this));
- return c[index];
-}
-
-template <class CONCRETE> ACE_INLINE void
-ACE_Based_Pointer_Basic<CONCRETE>::operator += (int index)
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator+=");
- this->base_offset_ += (index * sizeof (CONCRETE));
-}
-
-template <class CONCRETE> ACE_INLINE int
-ACE_Based_Pointer_Basic<CONCRETE>::operator == (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator==");
- return ACE_COMPUTE_BASED_POINTER (this) == ACE_COMPUTE_BASED_POINTER (&rhs);
-}
-
-template <class CONCRETE> ACE_INLINE int
-ACE_Based_Pointer_Basic<CONCRETE>::operator != (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator!=");
- return !(*this == rhs);
-}
-
-template <class CONCRETE> ACE_INLINE int
-ACE_Based_Pointer_Basic<CONCRETE>::operator < (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator<");
- return ACE_COMPUTE_BASED_POINTER (this) < ACE_COMPUTE_BASED_POINTER (&rhs);
-}
-
-template <class CONCRETE> ACE_INLINE int
-ACE_Based_Pointer_Basic<CONCRETE>::operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator<=");
- return ACE_COMPUTE_BASED_POINTER (this) <= ACE_COMPUTE_BASED_POINTER (&rhs);
-}
-
-template <class CONCRETE> ACE_INLINE int
-ACE_Based_Pointer_Basic<CONCRETE>::operator > (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator>");
- return ACE_COMPUTE_BASED_POINTER (this) > ACE_COMPUTE_BASED_POINTER (&rhs);
-}
-
-template <class CONCRETE> ACE_INLINE int
-ACE_Based_Pointer_Basic<CONCRETE>::operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs) const
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator>=");
- return ACE_COMPUTE_BASED_POINTER (this) >= ACE_COMPUTE_BASED_POINTER (&rhs);
-}
-
-template <class CONCRETE> ACE_INLINE void
-ACE_Based_Pointer_Basic<CONCRETE>::operator= (const ACE_Based_Pointer_Basic<CONCRETE> &rhs)
-{
- ACE_TRACE ("ACE_Based_Pointer_Basic<CONCRETE>::operator=");
- *this = rhs.addr ();
-}
-
-template <class CONCRETE> ACE_INLINE void
-ACE_Based_Pointer<CONCRETE>::operator= (const ACE_Based_Pointer<CONCRETE> &rhs)
-{
- ACE_TRACE ("ACE_Based_Pointer<CONCRETE>::operator=");
- *this = rhs.addr ();
-}
-
diff --git a/ace/Basic_Types.cpp b/ace/Basic_Types.cpp
deleted file mode 100644
index 385f7fb9428..00000000000
--- a/ace/Basic_Types.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id$
-
-#include "ace/OS.h"
-#if !defined (__ACE_INLINE__)
-# include "ace/Basic_Types.i"
-#endif /* ! __ACE_INLINE__ */
-
-ACE_RCSID(ace, Basic_Types, "$Id$")
-
-#if defined (ACE_LACKS_LONGLONG_T)
-
-void
-ACE_U_LongLong::output (FILE *file) const
-{
- if (h_ () > 0)
- ACE_OS::fprintf (file, "0x%lx%0*lx", h_ (), 2 * sizeof l_ (), l_ ());
- else
- ACE_OS::fprintf (file, "0x%lx", l_ ());
-}
-
-#endif /* ACE_LACKS_LONGLONG_T */
-
-// Explicit template instantiation file
-#include "ace/Template_Instantiations.cpp"
diff --git a/ace/Basic_Types.h b/ace/Basic_Types.h
deleted file mode 100644
index 4452a433cf2..00000000000
--- a/ace/Basic_Types.h
+++ /dev/null
@@ -1,545 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Basic_Types.h
-//
-// = AUTHORS
-// David L. Levine
-//
-// = DESCRIPTION
-// #defines the list of preprocessor macros below. The config.h file can
-// pre-define any of these to short-cut the definitions. This is usually
-// only necessary if the preprocessor does all of its math using integers.
-//
-// Sizes of built-in types:
-// ACE_SIZEOF_CHAR
-// ACE_SIZEOF_WCHAR
-// ACE_SIZEOF_SHORT
-// ACE_SIZEOF_INT
-// ACE_SIZEOF_LONG
-// ACE_SIZEOF_LONG_LONG
-// ACE_SIZEOF_VOID_P
-// ACE_SIZEOF_FLOAT
-// ACE_SIZEOF_DOUBLE
-// ACE_SIZEOF_LONG_DOUBLE
-//
-// Wrappers for built-in types of specific sizes:
-// ACE_USHORT16 /* For backward compatibility. Use ACE_UINT16 instead. */
-// ACE_INT16
-// ACE_UINT16
-// ACE_INT32
-// ACE_UINT32
-// ACE_UINT64
-// (Note: ACE_INT64 is not defined, because there is no ACE_LongLong for
-// platforms that don't have a native 8-byte integer type.)
-//
-// Byte-order (endian-ness) determination:
-// ACE_BYTE_ORDER, to either ACE_BIG_ENDIAN or ACE_LITTLE_ENDIAN
-//
-// ============================================================================
-
-#ifndef ACE_BASIC_TYPES_H
-# define ACE_BASIC_TYPES_H
-# include "ace/pre.h"
-
-# if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-# endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// A char always has 1 byte, by definition.
-# define ACE_SIZEOF_CHAR 1
-
-// Unfortunately, there isn't a portable way to determine the size of a wchar.
-// So we just define them on a platform basis.
-# if defined (ACE_HAS_WCHAR)
-# if defined (ACE_WIN32)
-# define ACE_SIZEOF_WCHAR 2
-# else /* ACE_WIN32 */
-// 0 so the Basic_Types test will catch this.
-# define ACE_SIZEOF_WCHAR 0
-# endif /* ACE_WIN32 */
-# endif /* ACE_HAS_WCHAR */
-
-// The number of bytes in a short.
-# if !defined (ACE_SIZEOF_SHORT)
-# if (USHRT_MAX) == 255U
-# define ACE_SIZEOF_SHORT 1
-# elif (USHRT_MAX) == 65535U
-# define ACE_SIZEOF_SHORT 2
-# elif (USHRT_MAX) == 4294967295U
-# define ACE_SIZEOF_SHORT 4
-# elif (USHRT_MAX) == 18446744073709551615U
-# define ACE_SIZEOF_SHORT 8
-# else
-# error: unsupported short size, must be updated for this platform!
-# endif /* USHRT_MAX */
-# endif /* !defined (ACE_SIZEOF_SHORT) */
-
-// The number of bytes in an int.
-# if !defined (ACE_SIZEOF_INT)
-# if (UINT_MAX) == 65535U
-# define ACE_SIZEOF_INT 2
-# elif (UINT_MAX) == 4294967295U
-# define ACE_SIZEOF_INT 4
-# elif (UINT_MAX) == 18446744073709551615U
-# define ACE_SIZEOF_INT 8
-# else
-# error: unsupported int size, must be updated for this platform!
-# endif /* UINT_MAX */
-# endif /* !defined (ACE_SIZEOF_INT) */
-
-// The number of bytes in a long.
-// NOTE - since preprocessors only need to do integer math, this is a likely
-// place for a preprocessor to not properly support being able to figure out
-// the proper size. HP aC++ and GNU gcc have this difficulty so watch out.
-# if !defined (ACE_SIZEOF_LONG)
-# if (ULONG_MAX) == 65535UL
-# define ACE_SIZEOF_LONG 2
-# elif ((ULONG_MAX) == 4294967295UL)
-# define ACE_SIZEOF_LONG 4
-# elif ((ULONG_MAX) == 18446744073709551615UL)
-# define ACE_SIZEOF_LONG 8
-# else
-# error: unsupported long size, must be updated for this platform!
-# endif /* ULONG_MAX */
-# endif /* !defined (ACE_SIZEOF_LONG) */
-
-// The number of bytes in a long long.
-# if !defined (ACE_SIZEOF_LONG_LONG)
-# if defined (ACE_LACKS_LONGLONG_T)
-# define ACE_SIZEOF_LONG_LONG 8
-# else /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */
-# if ACE_SIZEOF_LONG == 8
-# define ACE_SIZEOF_LONG_LONG 8
- typedef unsigned long ACE_UINT64;
-# elif defined (ULLONG_MAX) && !defined (__GNUG__)
- // Some compilers use ULLONG_MAX and others, e.g. Irix, use
- // ULONGLONG_MAX.
-# if (ULLONG_MAX) == 18446744073709551615ULL
-# define ACE_SIZEOF_LONG_LONG 8
-# elif (ULLONG_MAX) == 4294967295ULL
-# define ACE_SIZEOF_LONG_LONG 4
-# else
-# error Unsupported long long size needs to be updated for this platform
-# endif
- typedef unsigned long long ACE_UINT64;
-# elif defined (ULONGLONG_MAX) && !defined (__GNUG__)
- // Irix 6.x, for example.
-# if (ULONGLONG_MAX) == 18446744073709551615ULL
-# define ACE_SIZEOF_LONG_LONG 8
-# elif (ULONGLONG_MAX) == 4294967295ULL
-# define ACE_SIZEOF_LONG_LONG 4
-# else
-# error Unsupported long long size needs to be updated for this platform
-# endif
- typedef unsigned long long ACE_UINT64;
-# else
- // ACE_SIZEOF_LONG_LONG is not yet known, but the platform doesn't
- // claim ACE_LACKS_LONGLONG_T, so assume it has 8-byte long longs.
-# define ACE_SIZEOF_LONG_LONG 8
-# if defined (sun) && !defined (ACE_LACKS_U_LONGLONG_T)
- // sun #defines u_longlong_t, maybe other platforms do also.
- // Use it, at least with g++, so that its -pedantic doesn't
- // complain about no ANSI C++ long long.
- typedef u_longlong_t ACE_UINT64;
-# else
- // LynxOS 2.5.0 and Linux don't have u_longlong_t.
- typedef unsigned long long ACE_UINT64;
-# endif /* sun */
-# endif /* ULLONG_MAX && !__GNUG__ */
-# endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */
-# endif /* !defined (ACE_SIZEOF_LONG_LONG) */
-
-
-// The sizes of the commonly implemented types are now known. Set up
-// typedefs for whatever we can. Some of these are needed for certain cases
-// of ACE_UINT64, so do them before the 64-bit stuff.
-
-# if ACE_SIZEOF_SHORT == 2
- typedef short ACE_INT16;
- typedef unsigned short ACE_UINT16;
-# elif ACE_SIZEOF_INT == 2
- typedef int ACE_INT16;
- typedef unsigned int ACE_UINT16;
-# elif (ACE_SIZEOF_SHORT) == 4 && defined(_CRAYMPP)
- // mpp cray - uses Alpha processors
- // Use the real 32-bit quantity for ACE_INT32's, and use a "long"
- // for ACE_INT16's. This gets around conflicts with size_t in some ACE
- // method signatures, among other things.
- typedef long ACE_INT16;
- typedef unsigned long ACE_UINT16;
- typedef short ACE_INT32;
- typedef unsigned short ACE_UINT32;
-# elif (ACE_SIZEOF_SHORT) == 8 && defined(_UNICOS)
- // vector cray - hard 64-bit, all 64 bit types
- typedef short ACE_INT16;
- typedef unsigned short ACE_UINT16;
-# else
-# error Have to add to the ACE_UINT16 type setting
-# endif
-
-typedef ACE_UINT16 ACE_USHORT16;
-
-# if ACE_SIZEOF_INT == 4
- typedef int ACE_INT32;
- typedef unsigned int ACE_UINT32;
-# if defined (__KCC) && !defined (ACE_LACKS_LONGLONG_T)
- typedef unsigned long long ACE_UINT64;
-# endif /* __KCC */
-# elif ACE_SIZEOF_LONG == 4
- typedef long ACE_INT32;
- typedef unsigned long ACE_UINT32;
-# elif (ACE_SIZEOF_INT) == 8 && defined(_UNICOS)
- // vector cray - hard 64-bit, all 64 bit types
-# if !defined(_CRAYMPP)
- typedef int ACE_INT32;
- typedef unsigned int ACE_UINT32;
-# endif
- typedef unsigned long long ACE_UINT64;
-# else
-# error Have to add to the ACE_UINT32 type setting
-# endif
-
-// The number of bytes in a void *.
-# ifndef ACE_SIZEOF_VOID_P
-# define ACE_SIZEOF_VOID_P ACE_SIZEOF_LONG
-# endif /* ACE_SIZEOF_VOID_P */
-
-// Type for doing arithmetic on pointers ... as elsewhere, we assume
-// that unsigned versions of a type are the same size as the signed
-// version of the same type.
-#if ACE_SIZEOF_VOID_P == ACE_SIZEOF_INT
-# if defined (__SUNPRO_CC)
- // For unknown reasons, Sun CC 5.0 won't allow a reintepret cast
- // of a 64-bit pointer to a 64-bit int.
- typedef u_long ptr_arith_t;
-# else /* ! __SUNPRO_CC */
- typedef u_int ptr_arith_t;
-# endif /* ! __SUNPRO_CC */
-#elif ACE_SIZEOF_VOID_P == ACE_SIZEOF_LONG
- typedef u_long ptr_arith_t;
-#elif ACE_SIZEOF_VOID_P == ACE_SIZEOF_LONG_LONG
- typedef u_long long ptr_arith_t;
-#else
-# error "Can't find a suitable type for doing pointer arithmetic."
-#endif /* ACE_SIZEOF_VOID_P */
-
-#if defined (ACE_LACKS_LONGLONG_T)
- // This throws away the high 32 bits. It's very unlikely that a
- // pointer will be more than 32 bits wide if the platform does not
- // support 64-bit integers.
-# define ACE_LONGLONG_TO_PTR(PTR_TYPE, L) \
- ACE_reinterpret_cast (PTR_TYPE, L.lo ())
-#else /* ! ACE_LACKS_LONGLONG_T */
-# define ACE_LONGLONG_TO_PTR(PTR_TYPE, L) \
- ACE_reinterpret_cast (PTR_TYPE, ACE_static_cast (ptr_arith_t, L))
-#endif /* ! ACE_LACKS_LONGLONG_T */
-
-// If the platform lacks a long long, define one.
-# if defined (ACE_LACKS_LONGLONG_T)
- class ACE_Export ACE_U_LongLong
- // = TITLE
- // Unsigned long long for platforms that don't have one.
- //
- // = DESCRIPTION
- // Provide our own unsigned long long. This is intended to be
- // use with ACE_High_Res_Timer, so the division operator assumes
- // that the quotient fits into a u_long.
- // Please note that the constructor takes (optionally) two values.
- // The high one contributes 0x100000000 times its value. So,
- // for example, (0, 2) is _not_ 20000000000, but instead
- // 0x200000000. To emphasize this, the default values are expressed
- // in hex, and output () dumps the value in hex.
- {
- public:
- // = Initialization and termination methods.
- ACE_U_LongLong (const ACE_UINT32 lo = 0x0, const ACE_UINT32 hi = 0x0);
- ACE_U_LongLong (const ACE_U_LongLong &);
- ACE_U_LongLong &operator= (const ACE_U_LongLong &);
- ~ACE_U_LongLong (void);
-
- // = Overloaded relation operators.
- int operator== (const ACE_U_LongLong &) const;
- int operator== (const ACE_UINT32) const;
- int operator!= (const ACE_U_LongLong &) const;
- int operator!= (const ACE_UINT32) const;
- int operator< (const ACE_U_LongLong &) const;
- int operator< (const ACE_UINT32) const;
- int operator<= (const ACE_U_LongLong &) const;
- int operator<= (const ACE_UINT32) const;
- int operator> (const ACE_U_LongLong &) const;
- int operator> (const ACE_UINT32) const;
- int operator>= (const ACE_U_LongLong &) const;
- int operator>= (const ACE_UINT32) const;
-
- ACE_U_LongLong operator+ (const ACE_U_LongLong &) const;
- ACE_U_LongLong operator+ (const ACE_UINT32) const;
- ACE_U_LongLong operator- (const ACE_U_LongLong &) const;
- ACE_U_LongLong operator- (const ACE_UINT32) const;
- ACE_U_LongLong operator* (const ACE_UINT32);
- ACE_U_LongLong &operator*= (const ACE_UINT32);
-
- ACE_U_LongLong operator<< (const u_int) const;
- ACE_U_LongLong &operator<<= (const u_int);
- ACE_U_LongLong operator>> (const u_int) const;
- ACE_U_LongLong &operator>>= (const u_int);
-
- double operator/ (const double) const;
-
- ACE_U_LongLong &operator+= (const ACE_U_LongLong &);
- ACE_U_LongLong &operator+= (const ACE_UINT32);
- ACE_U_LongLong &operator-= (const ACE_U_LongLong &);
- ACE_U_LongLong &operator-= (const ACE_UINT32);
- ACE_U_LongLong &operator++ ();
- ACE_U_LongLong &operator-- ();
- ACE_U_LongLong &operator|= (const ACE_U_LongLong);
- ACE_U_LongLong &operator|= (const ACE_UINT32);
- ACE_U_LongLong &operator&= (const ACE_U_LongLong);
- ACE_U_LongLong &operator&= (const ACE_UINT32);
-
- // Note that the following take ACE_UINT32 arguments. These are
- // typical use cases, and easy to implement. But, they limit the
- // return values to 32 bits as well. There are no checks for
- // overflow.
- ACE_UINT32 operator/ (const ACE_UINT32) const;
- ACE_UINT32 operator% (const ACE_UINT32) const;
-
- // The following only operate on the lower 32 bits (they take only
- // 32 bit arguments).
- ACE_UINT32 operator| (const ACE_INT32) const;
- ACE_UINT32 operator& (const ACE_INT32) const;
-
- // The following operators convert their arguments to
- // ACE_UINT32. So, there may be information loss if they are
- // used.
- ACE_U_LongLong operator* (const ACE_INT32);
- ACE_U_LongLong &operator*= (const ACE_INT32);
- ACE_UINT32 operator/ (const ACE_INT32) const;
-# if ACE_SIZEOF_INT == 4
- ACE_UINT32 operator/ (const u_long) const;
- ACE_UINT32 operator/ (const long) const;
-# else /* ACE_SIZEOF_INT != 4 */
- ACE_UINT32 operator/ (const u_int) const;
- ACE_UINT32 operator/ (const int) const;
-# endif /* ACE_SIZEOF_INT != 4 */
-
- // = Helper methods.
- void output (FILE * = stdout) const;
- // Outputs the value to the FILE, in hex.
-
- ACE_UINT32 hi (void) const;
- ACE_UINT32 lo (void) const;
-
- void hi (const ACE_UINT32 hi);
- void lo (const ACE_UINT32 lo);
-
- ACE_ALLOC_HOOK_DECLARE;
-
- private:
- union
- {
- struct
- {
- ACE_UINT32 hi_;
- // High 32 bits.
-
- ACE_UINT32 lo_;
- // Low 32 bits.
- } data_;
- // To ensure alignment on 8-byte boundary.
-
- // double isn't usually usable with ACE_LACKS_FLOATING_POINT,
- // but this seems OK.
- double for_alignment_;
- // To ensure alignment on 8-byte boundary.
- };
-
- // NOTE: the following four accessors are inlined here in
- // order to minimize the extent of the data_ struct. It's
- // only used here; the .i and .cpp files use the accessors.
-
- const ACE_UINT32 &h_ () const { return data_.hi_; }
- // Internal utility function to hide access through struct.
-
- ACE_UINT32 &h_ () { return data_.hi_; }
- // Internal utility function to hide access through struct.
-
- const ACE_UINT32 &l_ () const { return data_.lo_; }
- // Internal utility function to hide access through struct.
-
- ACE_UINT32 &l_ () { return data_.lo_; }
- // Internal utility function to hide access through struct.
-
- // NOTE: the above four accessors are inlined here in
- // order to minimize the extent of the data_ struct. It's
- // only used here; the .i and .cpp files use the accessors.
-
- ACE_UINT32 ul_shift (ACE_UINT32 a, ACE_UINT32 c_in, ACE_UINT32 *c_out);
- ACE_U_LongLong ull_shift (ACE_U_LongLong a, ACE_UINT32 c_in,
- ACE_UINT32 *c_out);
- ACE_U_LongLong ull_add (ACE_U_LongLong a, ACE_U_LongLong b,
- ACE_UINT32 *carry);
- ACE_U_LongLong ull_mult (ACE_U_LongLong a, ACE_UINT32 b,
- ACE_UINT32 *carry);
- // These functions are used to implement multiplication.
- };
-
- typedef ACE_U_LongLong ACE_UINT64;
-
-# endif /* ACE_LACKS_LONGLONG_T */
-
-// Conversions from ACE_UINT64 to ACE_UINT32. ACE_CU64_TO_CU32 should
-// be used on const ACE_UINT64's.
-# if defined (ACE_LACKS_LONGLONG_T)
-# define ACE_U64_TO_U32(n) ((n).lo ())
-# define ACE_CU64_TO_CU32(n) ((n).lo ())
-# else /* ! ACE_LACKS_LONGLONG_T */
-# define ACE_U64_TO_U32(n) (ACE_static_cast (ACE_UINT32, (n)))
-# define ACE_CU64_TO_CU32(n) \
- (ACE_static_cast (ACE_CAST_CONST ACE_UINT32, (n)))
-# endif /* ! ACE_LACKS_LONGLONG_T */
-
-// 64-bit literals require special marking on some platforms.
-# if defined (ACE_WIN32)
-# if defined (__IBMCPP__) && (__IBMCPP__ >= 400)
-# define ACE_UINT64_LITERAL(n) n ## LL
-# define ACE_INT64_LITERAL(n) n ## LL
-#else
-# define ACE_UINT64_LITERAL(n) n ## ui64
-# define ACE_INT64_LITERAL(n) n ## i64
-#endif /* defined (__IBMCPP__) && (__IBMCPP__ >= 400) */
-# elif defined (ACE_LACKS_LONGLONG_T)
- // Can only specify 32-bit arguments.
-# define ACE_UINT64_LITERAL(n) (ACE_U_LongLong (n))
- // This one won't really work, but it'll keep
- // some compilers happy until we have better support
-# define ACE_INT64_LITERAL(n) (ACE_U_LongLong (n))
-# else /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */
-# define ACE_UINT64_LITERAL(n) n ## ull
-# define ACE_INT64_LITERAL(n) n ## ll
-# endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */
-
-#if !defined (ACE_UINT64_FORMAT_SPECIFIER)
-# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%llu")
-#endif /* ACE_UINT64_FORMAT_SPECIFIER */
-
-#if !defined (ACE_INT64_FORMAT_SPECIFIER)
-# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT ("%lld")
-#endif /* ACE_INT64_FORMAT_SPECIFIER */
-
-// Cast from UINT64 to a double requires an intermediate cast to INT64
-// on some platforms.
-# if defined (ACE_WIN32)
-# define ACE_UINT64_DBLCAST_ADAPTER(n) ACE_static_cast (__int64, n)
-# elif defined (ACE_LACKS_LONGLONG_T)
- // Only use the low 32 bits.
-# define ACE_UINT64_DBLCAST_ADAPTER(n) ACE_U64_TO_U32 (n)
-# else /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */
-# define ACE_UINT64_DBLCAST_ADAPTER(n) (n)
-# endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */
-
-
-// The number of bytes in a float.
-# ifndef ACE_SIZEOF_FLOAT
-# if FLT_MAX_EXP == 128
-# define ACE_SIZEOF_FLOAT 4
-# elif FLT_MAX_EXP == 1024
-# define ACE_SIZEOF_FLOAT 8
-# else
-# error: unsupported float size, must be updated for this platform!
-# endif /* FLT_MAX_EXP */
-# endif /* ACE_SIZEOF_FLOAT */
-
-// The number of bytes in a double.
-# ifndef ACE_SIZEOF_DOUBLE
-# if DBL_MAX_EXP == 128
-# define ACE_SIZEOF_DOUBLE 4
-# elif DBL_MAX_EXP == 1024
-# define ACE_SIZEOF_DOUBLE 8
-# else
-# error: unsupported double size, must be updated for this platform!
-# endif /* DBL_MAX_EXP */
-# endif /* ACE_SIZEOF_DOUBLE */
-
-// The number of bytes in a long double.
-# ifndef ACE_SIZEOF_LONG_DOUBLE
-# if LDBL_MAX_EXP == 128
-# define ACE_SIZEOF_LONG_DOUBLE 4
-# elif LDBL_MAX_EXP == 1024
-# define ACE_SIZEOF_LONG_DOUBLE 8
-# elif LDBL_MAX_EXP == 16384
-# if defined (LDBL_DIG) && LDBL_DIG == 18
-# define ACE_SIZEOF_LONG_DOUBLE 12
-# else /* ! LDBL_DIG || LDBL_DIG != 18 */
-# define ACE_SIZEOF_LONG_DOUBLE 16
-# endif /* ! LDBL_DIG || LDBL_DIG != 18 */
-# else
-# error: unsupported double size, must be updated for this platform!
-# endif /* LDBL_MAX_EXP */
-# endif /* ACE_SIZEOF_LONG_DOUBLE */
-
-// Max and min sizes for the ACE integer types.
-#define ACE_CHAR_MAX 0x7F
-#define ACE_CHAR_MIN -(ACE_CHAR_MAX)-1
-#define ACE_OCTET_MAX 0xFF
-#define ACE_INT16_MAX 0x7FFF
-#define ACE_INT16_MIN -(ACE_INT16_MAX)-1
-#define ACE_UINT16_MAX 0xFFFF
-#define ACE_WCHAR_MAX ACE_UINT16_MAX
-#define ACE_INT32_MAX 0x7FFFFFFF
-#define ACE_INT32_MIN -(ACE_INT32_MAX)-1
-#define ACE_UINT32_MAX 0xFFFFFFFF
-#define ACE_INT64_MAX ACE_INT64_LITERAL(0x7FFFFFFFFFFFFFFF)
-#define ACE_INT64_MIN -(ACE_INT64_MAX)-1
-#define ACE_UINT64_MAX ACE_UINT64_LITERAL(0xFFFFFFFFFFFFFFFF)
-// These use ANSI/IEEE format.
-#define ACE_FLT_MAX 3.402823466e+38F
-#define ACE_DBL_MAX 1.7976931348623158e+308
-
-// Byte-order (endian-ness) determination.
-# if defined (BYTE_ORDER)
-# if (BYTE_ORDER == LITTLE_ENDIAN)
-# define ACE_LITTLE_ENDIAN 0123X
-# define ACE_BYTE_ORDER ACE_LITTLE_ENDIAN
-# elif (BYTE_ORDER == BIG_ENDIAN)
-# define ACE_BIG_ENDIAN 3210X
-# define ACE_BYTE_ORDER ACE_BIG_ENDIAN
-# else
-# error: unknown BYTE_ORDER!
-# endif /* BYTE_ORDER */
-# elif defined (__BYTE_ORDER)
-# if (__BYTE_ORDER == __LITTLE_ENDIAN)
-# define ACE_LITTLE_ENDIAN 0123X
-# define ACE_BYTE_ORDER ACE_LITTLE_ENDIAN
-# elif (__BYTE_ORDER == __BIG_ENDIAN)
-# define ACE_BIG_ENDIAN 3210X
-# define ACE_BYTE_ORDER ACE_BIG_ENDIAN
-# else
-# error: unknown __BYTE_ORDER!
-# endif /* __BYTE_ORDER */
-# else /* ! BYTE_ORDER && ! __BYTE_ORDER */
- // We weren't explicitly told, so we have to figure it out . . .
-# if defined (i386) || defined (__i386__) || defined (_M_IX86) || \
- defined (vax) || defined (__alpha)
- // We know these are little endian.
-# define ACE_LITTLE_ENDIAN 0123X
-# define ACE_BYTE_ORDER ACE_LITTLE_ENDIAN
-# else
- // Otherwise, we assume big endian.
-# define ACE_BIG_ENDIAN 3210X
-# define ACE_BYTE_ORDER ACE_BIG_ENDIAN
-# endif
-# endif /* ! BYTE_ORDER && ! __BYTE_ORDER */
-
-# if defined (__ACE_INLINE__)
-# include "ace/Basic_Types.i"
-# endif /* __ACE_INLINE__ */
-
-# include "ace/post.h"
-#endif /* ACE_BASIC_TYPES_H */
diff --git a/ace/Basic_Types.i b/ace/Basic_Types.i
deleted file mode 100644
index 12a62950e7f..00000000000
--- a/ace/Basic_Types.i
+++ /dev/null
@@ -1,476 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#if defined (ACE_LACKS_LONGLONG_T)
-
-ACE_INLINE
-ACE_U_LongLong::ACE_U_LongLong (const ACE_UINT32 lo, const ACE_UINT32 hi)
-{
- h_ () = hi;
- l_ () = lo;
-}
-
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::hi (void) const
-{
- return h_ ();
-}
-
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::lo (void) const
-{
- return l_ ();
-}
-
-ACE_INLINE void
-ACE_U_LongLong::hi (const ACE_UINT32 hi)
-{
- h_ () = hi;
-}
-
-ACE_INLINE void
-ACE_U_LongLong::lo (const ACE_UINT32 lo)
-{
- l_ () = lo;
-}
-
-ACE_INLINE
-ACE_U_LongLong::~ACE_U_LongLong (void)
-{
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator== (const ACE_U_LongLong &n) const
-{
- return h_ () == n.h_ () && l_ () == n.l_ ();
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator== (const ACE_UINT32 n) const
-{
- return h_ () == 0 && l_ () == n;
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator!= (const ACE_U_LongLong &n) const
-{
- return ! (*this == n);
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator!= (const ACE_UINT32 n) const
-{
- return ! (*this == n);
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator< (const ACE_U_LongLong &n) const
-{
- return h_ () < n.h_ () ? 1
- : h_ () > n.h_ () ? 0
- : l_ () < n.l_ ();
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator< (const ACE_UINT32 n) const
-{
- return operator< (ACE_static_cast (const ACE_U_LongLong, n));
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator<= (const ACE_U_LongLong &n) const
-{
- return h_ () < n.h_ () ? 1
- : h_ () > n.h_ () ? 0
- : l_ () <= n.l_ ();
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator<= (const ACE_UINT32 n) const
-{
- return operator<= (ACE_static_cast (const ACE_U_LongLong, n));
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator> (const ACE_U_LongLong &n) const
-{
- return h_ () > n.h_ () ? 1
- : h_ () < n.h_ () ? 0
- : l_ () > n.l_ ();
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator> (const ACE_UINT32 n) const
-{
- return operator> (ACE_static_cast (const ACE_U_LongLong, n));
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator>= (const ACE_U_LongLong &n) const
-{
- return h_ () > n.h_ () ? 1
- : h_ () < n.h_ () ? 0
- : l_ () >= n.l_ ();
-}
-
-ACE_INLINE int
-ACE_U_LongLong::operator>= (const ACE_UINT32 n) const
-{
- return operator>= (ACE_static_cast (const ACE_U_LongLong, n));
-}
-
-ACE_INLINE
-ACE_U_LongLong::ACE_U_LongLong (const ACE_U_LongLong &n)
-{
- h_ () = n.h_ ();
- l_ () = n.l_ ();
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator= (const ACE_U_LongLong &n)
-{
- h_ () = n.h_ ();
- l_ () = n.l_ ();
-
- return *this;
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::operator+ (const ACE_U_LongLong &n) const
-{
- ACE_U_LongLong ret (l_ () + n.l_ (), h_ () + n.h_ ());
- if (ret.l_ () < n.l_ ()) /* carry */ ++ret.h_ ();
-
- return ret;
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::operator+ (const ACE_UINT32 n) const
-{
- return operator+ (ACE_static_cast (const ACE_U_LongLong, n));
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::operator- (const ACE_U_LongLong &n) const
-{
- ACE_U_LongLong ret (l_ () - n.l_ (), h_ () - n.h_ ());
- if (l_ () < n.l_ ()) /* borrow */ --ret.h_ ();
-
- return ret;
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::operator- (const ACE_UINT32 n) const
-{
- return operator- (ACE_static_cast (const ACE_U_LongLong, n));
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::operator<< (const u_int n) const
-{
- const ACE_UINT32 carry_mask = l_ () >> (32 - n);
- ACE_U_LongLong ret (n < 32 ? l_ () << n : 0,
- n < 32 ? (h_ () << n) | carry_mask : carry_mask);
-
- return ret;
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator<<= (const u_int n)
-{
- const ACE_UINT32 carry_mask = l_ () >> (32 - n);
- h_ () = n < 32 ? (h_ () << n) | carry_mask : carry_mask;
-
- // g++ 2.7.2.3/Solaris 2.5.1 doesn't modify l_ () if shifted by 32.
- l_ () = n < 32 ? l_ () << n : 0;
-
- return *this;
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::operator>> (const u_int n) const
-{
- const ACE_UINT32 carry_mask = h_ () << (32 - n);
- ACE_U_LongLong ret (n < 32 ? (l_ () >> n) | carry_mask : 0,
- n < 32 ? h_ () >> n : 0);
-
- return ret;
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator>>= (const u_int n)
-{
- const ACE_UINT32 carry_mask = h_ () << (32 - n);
- l_ () = n < 32 ? (l_ () >> n) | carry_mask : carry_mask;
- h_ () = n < 32 ? h_ () >> n : 0;
-
- return *this;
-}
-
-ACE_INLINE double
-ACE_U_LongLong::operator/ (const double n) const
-{
- // See the derivation above in operator/ (const ACE_UINT32).
-
- return ((double) 0xffffffffu - n + 1.0) / n * h_ () +
- (double) h_ () + (double) l_ () / n;
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator+= (const ACE_U_LongLong &n)
-{
- h_ () += n.h_ ();
- l_ () += n.l_ ();
- if (l_ () < n.l_ ()) /* carry */ ++h_ ();
-
- return *this;
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator+= (const ACE_UINT32 n)
-{
- return operator+= (ACE_static_cast (const ACE_U_LongLong, n));
-}
-
-#define ACE_HIGHBIT (~(~0UL >> 1))
-
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::ul_shift (ACE_UINT32 a, ACE_UINT32 c_in, ACE_UINT32 *c_out)
-{
- const ACE_UINT32 b = (a << 1) | c_in;
- *c_out = (*c_out << 1) + ((a & ACE_HIGHBIT) > 0);
-
- return b;
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::ull_shift (ACE_U_LongLong a, ACE_UINT32 c_in,
- ACE_UINT32 *c_out)
-{
- ACE_U_LongLong b;
-
- b.l_ () = (a.l_ () << 1) | c_in;
- c_in = ((a.l_ () & ACE_HIGHBIT) > 0);
- b.h_ () = (a.h_ () << 1) | c_in;
- *c_out = (*c_out << 1) + ((a.h_ () & ACE_HIGHBIT) > 0);
-
- return b;
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::ull_add (ACE_U_LongLong a, ACE_U_LongLong b, ACE_UINT32 *carry)
-{
- ACE_U_LongLong r (0, 0);
- ACE_UINT32 c1, c2, c3, c4;
-
- c1 = a.l_ () % 2;
- c2 = b.l_ () % 2;
- c3 = 0;
-
- r.l_ () = a.l_ ()/2 + b.l_ ()/2 + (c1+c2)/2;
- r.l_ () = ul_shift (r.l_ (), (c1+c2)%2, &c3);
-
- c1 = a.h_ () % 2;
- c2 = b.h_ () % 2;
- c4 = 0;
-
- r.h_ () = a.h_ ()/2 + b.h_ ()/2 + (c1+c2+c3)/2;
- r.h_ () = ul_shift (r.h_ (), (c1+c2+c3)%2, &c4);
-
- *carry = c4;
-
- return r;
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::ull_mult (ACE_U_LongLong a, ACE_UINT32 b, ACE_UINT32 *carry)
-{
- register ACE_UINT32 mask = ACE_HIGHBIT;
- const ACE_U_LongLong zero (0, 0);
- ACE_U_LongLong accum (0, 0);
- ACE_UINT32 c;
-
- *carry = 0;
- if (b > 0)
- do
- {
- accum = ull_shift (accum, 0U, carry);
- if (b & mask)
- accum = ull_add (accum, a, &c);
- else
- accum = ull_add (accum, zero, &c);
- *carry += c;
- mask >>= 1;
- }
- while (mask > 0);
-
- return accum;
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::operator* (const ACE_UINT32 n)
-{
- ACE_UINT32 carry; // will throw the carry away
-
- return ull_mult (*this, n, &carry);
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator*= (const ACE_UINT32 n)
-{
- ACE_UINT32 carry; // will throw the carry away
-
- return *this = ull_mult (*this, n, &carry);
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator-= (const ACE_U_LongLong &n)
-{
- h_ () -= n.h_ ();
- if (l_ () < n.l_ ()) /* borrow */ --h_ ();
- l_ () -= n.l_ ();
-
- return *this;
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator-= (const ACE_UINT32 n)
-{
- return operator-= (ACE_static_cast (const ACE_U_LongLong, n));
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator++ ()
-{
- ++l_ ();
- if (l_ () == 0) /* carry */ ++h_ ();
-
- return *this;
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator-- ()
-{
- if (l_ () == 0) /* borrow */ --h_ ();
- --l_ ();
-
- return *this;
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator|= (const ACE_U_LongLong n)
-{
- l_ () |= n.l_ ();
- h_ () |= n.h_ ();
-
- return *this;
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator|= (const ACE_UINT32 n)
-{
- return operator|= (ACE_static_cast (const ACE_U_LongLong, n));
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator&= (const ACE_U_LongLong n)
-{
- l_ () &= n.l_ ();
- h_ () &= n.h_ ();
-
- return *this;
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator&= (const ACE_UINT32 n)
-{
- return operator&= (ACE_static_cast (const ACE_U_LongLong, n));
-}
-
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::operator/ (const ACE_UINT32 n) const
-{
- // This takes advantage of the fact that the return type has only 32
- // bits. Replace 0x100000000 with 0xffffffff + 1 because the former
- // has 33 bits.
- // Quotient = (0x100000000u * hi_ + lo_) / n
- // = ((0x100000000u - n + n) * hi_ + lo_) / n
- // = ((0x100000000u - n) / n * hi_ + hi_ * n / n + lo_ / n
- // = (0x100000000u - n) / n * hi_ + hi_ + lo_ / n
- // = (0xffffffffu - n + 1) / n * hi_ + hi_ + lo_ / n
-
- return (0xffffffffu - n + 1) / n * h_ () + h_ () + l_ () / n;
-}
-
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::operator% (const ACE_UINT32 n) const
-{
- // Because the argument is an ACE_UINT32, the result can never be
- // bigger than 32 bits. Replace 0x100000000 with 0xffffffff + 1
- // because the former has 33 bits.
- // Mod = (0x100000000u * hi_ + lo_) % n
- // = (0x100000000u % n * hi_ + lo_ % n) % n
- // = ((0x100000000u - n) % n * hi_ + lo_ % n) % n
- // = ((0xffffffffu - n + 1) % n * hi_ + lo_ % n) % n
-
- return ((0xffffffff - n + 1) % n * h_ () + l_ () % n) % n;
-}
-
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::operator| (const ACE_INT32 n) const
-{
- return l_ () | n;
-}
-
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::operator& (const ACE_INT32 n) const
-{
- return l_ () & n;
-}
-
-ACE_INLINE ACE_U_LongLong
-ACE_U_LongLong::operator* (const ACE_INT32 n)
-{
- return operator* ((ACE_UINT32) n);
-}
-
-ACE_INLINE ACE_U_LongLong &
-ACE_U_LongLong::operator*= (const ACE_INT32 n)
-{
- return operator*= ((ACE_UINT32) n);
-}
-
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::operator/ (const ACE_INT32 n) const
-{
- return operator/ ((ACE_UINT32) n);
-}
-
-#if ACE_SIZEOF_INT == 4
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::operator/ (const u_long n) const
-{
- return operator/ ((ACE_UINT32) n);
-}
-
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::operator/ (const long n) const
-{
- return operator/ ((ACE_UINT32) n);
-}
-
-#else /* ACE_SIZEOF_INT != 4 */
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::operator/ (const u_int n) const
-{
- return operator/ ((ACE_UINT32) n);
-}
-
-ACE_INLINE ACE_UINT32
-ACE_U_LongLong::operator/ (const int n) const
-{
- return operator/ ((ACE_UINT32) n);
-}
-#endif /* ACE_SIZEOF_INT != 4 */
-
-#endif /* ACE_LACKS_LONGLONG_T */
diff --git a/ace/CDR_Stream.cpp b/ace/CDR_Stream.cpp
deleted file mode 100644
index bd8f2d8fd0f..00000000000
--- a/ace/CDR_Stream.cpp
+++ /dev/null
@@ -1,1483 +0,0 @@
-// $Id$
-
-#include "ace/CDR_Stream.h"
-
-#if !defined (__ACE_INLINE__)
-# include "ace/CDR_Stream.i"
-#endif /* ! __ACE_INLINE__ */
-
-ACE_RCSID(ace, CDR_Stream, "$Id$")
-
-//
-// See comments in CDR_Stream.i about optimization cases for swap_XX_array.
-//
-
-void
-ACE_CDR::swap_2_array (const char* orig, char* target, size_t n)
-{
- // ACE_ASSERT(n > 0); The caller checks that n > 0
-
- // Later, we try to read in 32 or 64 bit chunks,
- // so make sure we don't do that for unaligned addresses.
-#if ACE_SIZEOF_LONG == 8
- const char* const o8 = ACE_ptr_align_binary(orig, 8);
- while (orig < o8 && n > 0)
- {
- ACE_CDR::swap_2 (orig, target);
- orig += 2;
- target += 2;
- --n;
- }
-#else
- const char* const o4 = ACE_ptr_align_binary(orig, 4);
- // this is an _if_, not a _while_. The mistmatch can only be by 2.
- if (orig != o4)
- {
- ACE_CDR::swap_2 (orig, target);
- orig += 2;
- target += 2;
- --n;
- }
-#endif
- if (n == 0)
- return;
-
- //
- // Loop unrolling. Here be dragons.
- //
-
- // (n & (~3)) is the greatest multiple of 4 not bigger than n.
- // In the while loop ahead, orig will move over the array by 8 byte
- // increments (4 elements of 2 bytes).
- // end marks our barrier for not falling outside.
- const char* const end = orig + 2*(n & (~3));
-
- // See if we're aligned for writting in 64 or 32 bit chunks...
-#if ACE_SIZEOF_LONG == 8
- if (target == ACE_ptr_align_binary(target, 8))
-#else
- if (target == ACE_ptr_align_binary(target, 4))
-#endif
- {
- while (orig < end)
- {
-#if defined(ACE_HAS_PENTIUM) && defined(__GNUG__)
- unsigned int a =
- * ACE_reinterpret_cast(const unsigned int*, orig);
- unsigned int b =
- * ACE_reinterpret_cast(const unsigned int*, orig + 4);
- asm( "bswap %1" : "=r" (a) : "0" (a) );
- asm( "bswap %1" : "=r" (b) : "0" (b) );
- asm( "rol $16, %1" : "=r" (a) : "0" (a) );
- asm( "rol $16, %1" : "=r" (b) : "0" (b) );
- * ACE_reinterpret_cast(unsigned int*, target) = a;
- * ACE_reinterpret_cast(unsigned int*, target + 4) = b;
-#elif defined(ACE_HAS_PENTIUM) \
- && (defined(_MSC_VER) || defined(__BORLANDC__)) \
- && !defined(ACE_LACKS_INLINE_ASSEMBLY)
- __asm mov ecx, orig;
- __asm mov edx, target;
- __asm mov eax, [ecx];
- __asm mov ebx, 4[ecx];
- __asm bswap eax;
- __asm bswap ebx;
- __asm rol eax, 16;
- __asm rol ebx, 16;
- __asm mov [edx], eax;
- __asm mov 4[edx], ebx;
-#elif ACE_SIZEOF_LONG == 8
- // 64 bit architecture.
- register unsigned long a =
- * ACE_reinterpret_cast(const unsigned long*, orig);
-
- register unsigned long a1 = (a & 0x00ff00ff00ff00ffUL) << 8;
- register unsigned long a2 = (a & 0xff00ff00ff00ff00UL) >> 8;
-
- a = (a1 | a2);
-
- * ACE_reinterpret_cast(unsigned long*, target) = a;
-#else
- register ACE_UINT32 a =
- * ACE_reinterpret_cast(const ACE_UINT32*, orig);
- register ACE_UINT32 b =
- * ACE_reinterpret_cast(const ACE_UINT32*, orig + 4);
-
- register ACE_UINT32 a1 = (a & 0x00ff00ffU) << 8;
- register ACE_UINT32 b1 = (b & 0x00ff00ffU) << 8;
- register ACE_UINT32 a2 = (a & 0xff00ff00U) >> 8;
- register ACE_UINT32 b2 = (b & 0xff00ff00U) >> 8;
-
- a = (a1 | a2);
- b = (b1 | b2);
-
- * ACE_reinterpret_cast(ACE_UINT32*, target) = a;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 4) = b;
-#endif
- orig += 8;
- target += 8;
- }
- }
- else
- {
- // We're out of luck. We have to write in 2 byte chunks.
- while (orig < end)
- {
-#if defined(ACE_HAS_PENTIUM) && defined(__GNUG__)
- unsigned int a =
- * ACE_reinterpret_cast(const unsigned int*, orig);
- unsigned int b =
- * ACE_reinterpret_cast(const unsigned int*, orig + 4);
- asm( "bswap %1" : "=r" (a) : "0" (a) );
- asm( "bswap %1" : "=r" (b) : "0" (b) );
- // We're little endian.
- * ACE_reinterpret_cast(unsigned short*, target + 2)
- = (unsigned short) (a & 0xffff);
- * ACE_reinterpret_cast(unsigned short*, target + 6)
- = (unsigned short) (b & 0xffff);
- asm( "shrl $16, %1" : "=r" (a) : "0" (a) );
- asm( "shrl $16, %1" : "=r" (b) : "0" (b) );
- * ACE_reinterpret_cast(unsigned short*, target + 0)
- = (unsigned short) (a & 0xffff);
- * ACE_reinterpret_cast(unsigned short*, target + 4)
- = (unsigned short) (b & 0xffff);
-#elif defined(ACE_HAS_PENTIUM) \
- && (defined(_MSC_VER) || defined(__BORLANDC__)) \
- && !defined(ACE_LACKS_INLINE_ASSEMBLY)
- __asm mov ecx, orig;
- __asm mov edx, target;
- __asm mov eax, [ecx];
- __asm mov ebx, 4[ecx];
- __asm bswap eax;
- __asm bswap ebx;
- // We're little endian.
- __asm mov 2[edx], ax;
- __asm mov 6[edx], bx;
- __asm shr eax, 16;
- __asm shr ebx, 16;
- __asm mov 0[edx], ax;
- __asm mov 4[edx], bx;
-#elif ACE_SIZEOF_LONG == 8
- // 64 bit architecture.
- register unsigned long a =
- * ACE_reinterpret_cast(const unsigned long*, orig);
-
- register unsigned long a1 = (a & 0x00ff00ff00ff00ffUL) << 8;
- register unsigned long a2 = (a & 0xff00ff00ff00ff00UL) >> 8;
-
- a = (a1 | a2);
-
- ACE_UINT16 b1 = ACE_static_cast(ACE_UINT16, (a >> 48));
- ACE_UINT16 b2 = ACE_static_cast(ACE_UINT16, ((a >> 32) & 0xffff));
- ACE_UINT16 b3 = ACE_static_cast(ACE_UINT16, ((a >> 16) & 0xffff));
- ACE_UINT16 b4 = ACE_static_cast(ACE_UINT16, (a & 0xffff));
-
-#if defined(ACE_LITTLE_ENDIAN)
- * ACE_reinterpret_cast(ACE_UINT16*, target) = b4;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 2) = b3;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 4) = b2;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 6) = b1;
-#else
- * ACE_reinterpret_cast(ACE_UINT16*, target) = b1;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 2) = b2;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 4) = b3;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 6) = b4;
-#endif
-#else
- register ACE_UINT32 a =
- * ACE_reinterpret_cast(const ACE_UINT32*, orig);
- register ACE_UINT32 b =
- * ACE_reinterpret_cast(const ACE_UINT32*, orig + 4);
-
- register ACE_UINT32 a1 = (a & 0x00ff00ff) << 8;
- register ACE_UINT32 b1 = (b & 0x00ff00ff) << 8;
- register ACE_UINT32 a2 = (a & 0xff00ff00) >> 8;
- register ACE_UINT32 b2 = (b & 0xff00ff00) >> 8;
-
- a = (a1 | a2);
- b = (b1 | b2);
-
- ACE_UINT32 c1 = ACE_static_cast(ACE_UINT16, (a >> 16));
- ACE_UINT32 c2 = ACE_static_cast(ACE_UINT16, (a & 0xffff));
- ACE_UINT32 c3 = ACE_static_cast(ACE_UINT16, (b >> 16));
- ACE_UINT32 c4 = ACE_static_cast(ACE_UINT16, (b & 0xffff));
-
-#if defined(ACE_LITTLE_ENDIAN)
- * ACE_reinterpret_cast(ACE_UINT16*, target) = c2;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 2) = c1;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 4) = c4;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 6) = c3;
-#else
- * ACE_reinterpret_cast(ACE_UINT16*, target) = c1;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 2) = c2;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 4) = c3;
- * ACE_reinterpret_cast(ACE_UINT16*, target + 6) = c4;
-#endif
-#endif
-
- orig += 8;
- target += 8;
- }
- }
-
- // (n & 3) == (n % 4).
- switch (n&3) {
- case 3:
- ACE_CDR::swap_2 (orig, target);
- orig += 2;
- target += 2;
- case 2:
- ACE_CDR::swap_2 (orig, target);
- orig += 2;
- target += 2;
- case 1:
- ACE_CDR::swap_2 (orig, target);
- }
-}
-
-void
-ACE_CDR::swap_4_array (const char* orig, char* target, size_t n)
-{
- // ACE_ASSERT(n > 0); The caller checks that n > 0
-
-#if ACE_LONG_SIZE == 8
- // Later, we read from *orig in 64 bit chunks,
- // so make sure we don't generate unaligned readings.
- const char* const o8 = ACE_ptr_align_binary(orig, 8);
- // The mistmatch can only be by 4.
- if (orig != o8)
- {
- ACE_CDR::swap_4 (orig, target);
- orig += 4;
- target += 4;
- --n;
- }
-#endif
- if (n == 0)
- return;
-
- //
- // Loop unrolling. Here be dragons.
- //
-
- // (n & (~3)) is the greatest multiple of 4 not bigger than n.
- // In the while loop, orig will move over the array by 16 byte
- // increments (4 elements of 4 bytes).
- // ends marks our barrier for not falling outside.
- const char* const end = orig + 4*(n & (~3));
-
-#if ACE_LONG_SIZE == 8
- // 64 bits architecture.
- // See if we can write in 8 byte chunks.
- if (target == ACE_ptr_align_binary(target, 8))
- {
- while (orig < end)
- {
- register unsigned long a =
- * ACE_reinterpret_cast(const long*, orig);
- register unsigned long b =
- * ACE_reinterpret_cast(const long*, orig + 8);
-
- register unsigned long a84 = (a & 0x000000ff000000ffL) << 24;
- register unsigned long b84 = (b & 0x000000ff000000ffL) << 24;
- register unsigned long a73 = (a & 0x0000ff000000ff00L) << 8;
- register unsigned long b73 = (b & 0x0000ff000000ff00L) << 8;
- register unsigned long a62 = (a & 0x00ff000000ff0000L) >> 8;
- register unsigned long b62 = (b & 0x00ff000000ff0000L) >> 8;
- register unsigned long a51 = (a & 0xff000000ff000000L) >> 24;
- register unsigned long b51 = (b & 0xff000000ff000000L) >> 24;
-
- a = (a84 | a73 | a62 | a51);
- b = (b84 | b73 | b62 | b51);
-
- * ACE_reinterpret_cast(long*, target) = a;
- * ACE_reinterpret_cast(long*, target + 8) = b;
-
- orig += 16;
- target += 16;
- }
- }
- else
- {
- // We are out of luck, we have to write in 4 byte chunks.
- while (orig < end)
- {
- register unsigned long a =
- * ACE_reinterpret_cast(const long*, orig);
- register unsigned long b =
- * ACE_reinterpret_cast(const long*, orig + 8);
-
- register unsigned long a84 = (a & 0x000000ff000000ffL) << 24;
- register unsigned long b84 = (b & 0x000000ff000000ffL) << 24;
- register unsigned long a73 = (a & 0x0000ff000000ff00L) << 8;
- register unsigned long b73 = (b & 0x0000ff000000ff00L) << 8;
- register unsigned long a62 = (a & 0x00ff000000ff0000L) >> 8;
- register unsigned long b62 = (b & 0x00ff000000ff0000L) >> 8;
- register unsigned long a51 = (a & 0xff000000ff000000L) >> 24;
- register unsigned long b51 = (b & 0xff000000ff000000L) >> 24;
-
- a = (a84 | a73 | a62 | a51);
- b = (b84 | b73 | b62 | b51);
-
- ACE_UINT32 c1 = ACE_static_cast(ACE_UINT32, (a >> 32));
- ACE_UINT32 c2 = ACE_static_cast(ACE_UINT32, (a & 0xffffffff));
- ACE_UINT32 c3 = ACE_static_cast(ACE_UINT32, (b >> 32));
- ACE_UINT32 c4 = ACE_static_cast(ACE_UINT32, (b & 0xffffffff));
-
-#if defined(ACE_LITTLE_ENDIAN)
- * ACE_reinterpret_cast(ACE_UINT32*, target + 0) = c2;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 4) = c1;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 8) = c4;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 12) = c3;
-#else
- * ACE_reinterpret_cast(ACE_UINT32*, target + 0) = c1;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 4) = c2;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 8) = c3;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 12) = c4;
-#endif
- orig += 16;
- target += 16;
- }
- }
-
-#else /* ACE_LONG_SIZE != 8 */
-
- while (orig < end)
- {
-#if defined(ACE_HAS_PENTIUM) && defined(__GNUG__)
- register unsigned int a =
- *ACE_reinterpret_cast(const unsigned int*, orig);
- register unsigned int b =
- *ACE_reinterpret_cast(const unsigned int*, orig + 4);
- register unsigned int c =
- *ACE_reinterpret_cast(const unsigned int*, orig + 8);
- register unsigned int d =
- *ACE_reinterpret_cast(const unsigned int*, orig + 12);
-
- asm ("bswap %1" : "=r" (a) : "0" (a));
- asm ("bswap %1" : "=r" (b) : "0" (b));
- asm ("bswap %1" : "=r" (c) : "0" (c));
- asm ("bswap %1" : "=r" (d) : "0" (d));
-
- *ACE_reinterpret_cast(unsigned int*, target) = a;
- *ACE_reinterpret_cast(unsigned int*, target + 4) = b;
- *ACE_reinterpret_cast(unsigned int*, target + 8) = c;
- *ACE_reinterpret_cast(unsigned int*, target + 12) = d;
-#elif defined(ACE_HAS_PENTIUM) \
- && (defined(_MSC_VER) || defined(__BORLANDC__)) \
- && !defined(ACE_LACKS_INLINE_ASSEMBLY)
- __asm mov eax, orig
- __asm mov esi, target
- __asm mov edx, [eax]
- __asm mov ecx, 4[eax]
- __asm mov ebx, 8[eax]
- __asm mov eax, 12[eax]
- __asm bswap edx
- __asm bswap ecx
- __asm bswap ebx
- __asm bswap eax
- __asm mov [esi], edx
- __asm mov 4[esi], ecx
- __asm mov 8[esi], ebx
- __asm mov 12[esi], eax
-#else
- register ACE_UINT32 a =
- * ACE_reinterpret_cast(const ACE_UINT32*, orig);
- register ACE_UINT32 b =
- * ACE_reinterpret_cast(const ACE_UINT32*, orig + 4);
- register ACE_UINT32 c =
- * ACE_reinterpret_cast(const ACE_UINT32*, orig + 8);
- register ACE_UINT32 d =
- * ACE_reinterpret_cast(const ACE_UINT32*, orig + 12);
-
- // Expect the optimizer reordering this A LOT.
- // We leave it this way for clarity.
- a = (a << 24) | ((a & 0xff00) << 8) | ((a & 0xff0000) >> 8) | (a >> 24);
- b = (b << 24) | ((b & 0xff00) << 8) | ((b & 0xff0000) >> 8) | (b >> 24);
- c = (c << 24) | ((c & 0xff00) << 8) | ((c & 0xff0000) >> 8) | (c >> 24);
- d = (d << 24) | ((d & 0xff00) << 8) | ((d & 0xff0000) >> 8) | (d >> 24);
-
- * ACE_reinterpret_cast(ACE_UINT32*, target) = a;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 4) = b;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 8) = c;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 12) = d;
-#endif
-
- orig += 16;
- target += 16;
- }
-
-#endif /* ACE_LONG_SIZE == 8 */
-
- // (n & 3) == (n % 4).
- switch (n&3) {
- case 3:
- ACE_CDR::swap_4 (orig, target);
- orig += 4;
- target += 4;
- case 2:
- ACE_CDR::swap_4 (orig, target);
- orig += 4;
- target += 4;
- case 1:
- ACE_CDR::swap_4 (orig, target);
- }
-}
-
-//
-// We don't benefit from unrolling in swap_8_array and swap_16_array
-// (swap_8 and swap_16 are big enough).
-//
-void
-ACE_CDR::swap_8_array (const char* orig, char* target, size_t n)
-{
- // ACE_ASSERT(n > 0); The caller checks that n > 0
-
- const char* const end = orig + 8*n;
- while (orig < end)
- {
- swap_8(orig, target);
- orig += 8;
- target += 8;
- }
-}
-
-void
-ACE_CDR::swap_16_array (const char* orig, char* target, size_t n)
-{
- // ACE_ASSERT(n > 0); The caller checks that n > 0
-
- const char* const end = orig + 16*n;
- while (orig < end)
- {
- swap_16(orig, target);
- orig += 16;
- target += 16;
- }
-}
-
-int
-ACE_CDR::grow (ACE_Message_Block *mb, size_t minsize)
-{
- size_t newsize =
- ACE_CDR::first_size (minsize + ACE_CDR::MAX_ALIGNMENT);
-
- if (newsize <= mb->size ())
- return 0;
-
- ACE_Data_Block *db =
- mb->data_block ()->clone_nocopy ();
- db->size (newsize);
-
- ACE_Message_Block tmp (db);
- ACE_CDR::mb_align (&tmp);
-
- tmp.copy (mb->rd_ptr (), mb->length());
- mb->data_block (tmp.data_block ()->duplicate ());
- mb->rd_ptr (tmp.rd_ptr ());
- mb->wr_ptr (tmp.wr_ptr ());
-
- return 0;
-}
-
-size_t
-ACE_CDR::total_length (const ACE_Message_Block* begin,
- const ACE_Message_Block* end)
-{
- size_t l = 0;
- // Compute the total size.
- for (const ACE_Message_Block *i = begin;
- i != end;
- i = i->cont ())
- l += i->length ();
- return l;
-}
-
-void
-ACE_CDR::consolidate (ACE_Message_Block *dst,
- const ACE_Message_Block *src)
-{
- if (src == 0)
- return;
-
- size_t newsize =
- ACE_CDR::first_size (ACE_CDR::total_length (src, 0)
- + ACE_CDR::MAX_ALIGNMENT);
- dst->size (newsize);
-
- // We must copy the contents of <src> into the new buffer, but
- // respecting the alignment.
- ptr_arith_t srcalign =
- ptr_arith_t(src->rd_ptr ()) % ACE_CDR::MAX_ALIGNMENT;
- ptr_arith_t dstalign =
- ptr_arith_t(dst->rd_ptr ()) % ACE_CDR::MAX_ALIGNMENT;
- int offset = srcalign - dstalign;
- if (offset < 0)
- offset += ACE_CDR::MAX_ALIGNMENT;
- dst->rd_ptr (offset);
- dst->wr_ptr (dst->rd_ptr ());
-
- for (const ACE_Message_Block* i = src;
- i != 0;
- i = i->cont ())
- {
- dst->copy (i->rd_ptr (), i->length ());
- }
-}
-
-#if defined (NONNATIVE_LONGDOUBLE)
-int
-ACE_CDR::LongDouble::operator== (const ACE_CDR::LongDouble &rhs) const
-{
- return ACE_OS::memcmp (this->ld, rhs.ld, 16) == 0;
-}
-
-int
-ACE_CDR::LongDouble::operator!= (const ACE_CDR::LongDouble &rhs) const
-{
- return ACE_OS::memcmp (this->ld, rhs.ld, 16) != 0;
-}
-#endif /* NONNATIVE_LONGDOUBLE */
-
-#if defined(_UNICOS) && !defined(_CRAYMPP)
-// placeholders to get things compiling
-ACE_CDR::Float::Float()
-{
-}
-
-ACE_CDR::Float::Float(const float & init)
-{
-}
-
-ACE_CDR::Float &
-ACE_CDR::Float::operator= (const float &rhs)
-{
- return *this;
-}
-
-int
-ACE_CDR::Float::operator!= (const ACE_CDR::Float &rhs) const
-{
- return 0;
-}
-#endif /* _UNICOS */
-
-// ****************************************************************
-
-ACE_OutputCDR::ACE_OutputCDR (size_t size,
- int byte_order,
- ACE_Allocator *buffer_allocator,
- ACE_Allocator *data_block_allocator,
- size_t memcpy_tradeoff)
- : start_ (size ? size : ACE_CDR::DEFAULT_BUFSIZE + ACE_CDR::MAX_ALIGNMENT,
- ACE_Message_Block::MB_DATA,
- 0,
- 0,
- buffer_allocator,
- 0,
- 0,
- ACE_Time_Value::zero,
- ACE_Time_Value::max_time,
- data_block_allocator),
- current_is_writable_ (1),
- current_alignment_ (0),
- do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER),
- good_bit_ (1),
- memcpy_tradeoff_ (memcpy_tradeoff),
- char_translator_ (0),
- wchar_translator_ (0)
-{
- ACE_CDR::mb_align (&this->start_);
- this->current_ = &this->start_;
-}
-
-ACE_OutputCDR::ACE_OutputCDR (char *data, size_t size,
- int byte_order,
- ACE_Allocator *buffer_allocator,
- ACE_Allocator *data_block_allocator,
- size_t memcpy_tradeoff)
- : start_ (size,
- ACE_Message_Block::MB_DATA,
- 0,
- data,
- buffer_allocator,
- 0,
- 0,
- ACE_Time_Value::zero,
- ACE_Time_Value::max_time,
- data_block_allocator),
- current_is_writable_ (1),
- current_alignment_ (0),
- do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER),
- good_bit_ (1),
- memcpy_tradeoff_ (memcpy_tradeoff),
- char_translator_ (0),
- wchar_translator_ (0)
-{
- // We cannot trust the buffer to be properly aligned
- ACE_CDR::mb_align (&this->start_);
- this->current_ = &this->start_;
-}
-
-ACE_OutputCDR::ACE_OutputCDR (ACE_Message_Block *data,
- int byte_order,
- size_t memcpy_tradeoff)
- : start_ (data->data_block ()->duplicate ()),
- current_is_writable_ (1),
- current_alignment_ (0),
- do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER),
- good_bit_ (1),
- memcpy_tradeoff_ (memcpy_tradeoff),
- char_translator_ (0),
- wchar_translator_ (0)
-{
- // We cannot trust the buffer to be properly aligned
- ACE_CDR::mb_align (&this->start_);
- this->current_ = &this->start_;
-}
-
-int
-ACE_OutputCDR::grow_and_adjust (size_t size,
- size_t align,
- char*& buf)
-{
- if (!this->current_is_writable_
- || this->current_->cont () == 0
- || this->current_->cont ()->size () < size + ACE_CDR::MAX_ALIGNMENT)
- {
- // Calculate the new buffer's length; if growing for encode, we
- // don't grow in "small" chunks because of the cost.
- size_t cursize = this->current_->size ();
- if (this->current_->cont () != 0)
- cursize = this->current_->cont ()->size ();
-
- size_t minsize = size + ACE_CDR::MAX_ALIGNMENT;
- // Make sure that there is enough room for <minsize> bytes, but
- // also make it bigger than whatever our current size is.
- if (minsize < cursize)
- {
- minsize = cursize;
- }
-
- size_t newsize =
- ACE_CDR::next_size (minsize);
-
- this->good_bit_ = 0;
- ACE_Message_Block* tmp;
- ACE_NEW_RETURN (tmp,
- ACE_Message_Block (newsize,
- ACE_Message_Block::MB_DATA,
- 0,
- 0,
- this->current_->data_block ()->allocator_strategy (),
- 0,
- 0,
- ACE_Time_Value::zero,
- ACE_Time_Value::max_time,
- this->current_->data_block ()->data_block_allocator ()),
- -1);
- this->good_bit_ = 1;
-
- // The new block must start with the same alignment as the
- // previous block finished.
- ptr_arith_t tmpalign =
- ptr_arith_t(tmp->rd_ptr ()) % ACE_CDR::MAX_ALIGNMENT;
- ptr_arith_t curalign =
- ptr_arith_t(this->current_alignment_) % ACE_CDR::MAX_ALIGNMENT;
- int offset = curalign - tmpalign;
- if (offset < 0)
- offset += ACE_CDR::MAX_ALIGNMENT;
- tmp->rd_ptr (offset);
- tmp->wr_ptr (tmp->rd_ptr ());
-
- // grow the chain and set the current block.
- tmp->cont (this->current_->cont ());
- this->current_->cont (tmp);
- }
- this->current_ = this->current_->cont ();
- this->current_is_writable_ = 1;
-
- return this->adjust (size, align, buf);
-}
-
-ACE_CDR::Boolean
-ACE_OutputCDR::write_string (ACE_CDR::ULong len,
- const char *x)
-{
- // @@ This is a slight violation of "Optimize for the common case",
- // i.e. normally the translator will be 0, but OTOH the code is
- // smaller and should be better for the cache ;-) ;-)
- if (this->char_translator_ != 0)
- return this->char_translator_->write_string (*this, len, x);
-
- if (len != 0)
- {
- if (this->write_ulong (len + 1))
- {
- return this->write_char_array (x, len + 1);
- }
- }
- else
- {
- // Be nice to programmers: treat nulls as empty strings not
- // errors. (OMG-IDL supports languages that don't use the C/C++
- // notion of null v. empty strings; nulls aren't part of the OMG-IDL
- // string model.)
- if (this->write_ulong (1))
- {
- return this->write_char (0);
- }
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_OutputCDR::write_wstring (ACE_CDR::ULong len,
- const ACE_CDR::WChar *x)
-{
- // @@ This is a slight violation of "Optimize for the common case",
- // i.e. normally the translator will be 0, but OTOH the code is
- // smaller and should be better for the cache ;-) ;-)
- if (this->wchar_translator_ != 0)
- return this->wchar_translator_->write_wstring (*this, len, x);
-
- if (x != 0)
- {
- if (this->write_ulong (len + 1))
- {
- return this->write_wchar_array (x, len + 1);
- }
- }
- else
- {
- if (this->write_ulong (1))
- {
- return this->write_wchar (0);
- }
- }
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_OutputCDR::write_octet_array_mb (const ACE_Message_Block* mb)
-{
- // If the buffer is small and it fits in the current message
- // block it is be cheaper just to copy the buffer.
- for (const ACE_Message_Block* i = mb;
- i != 0;
- i = i->cont ())
- {
- size_t length = i->length ();
-
- // If the mb does not own its data we are forced to make a copy.
- if (ACE_BIT_ENABLED (i->flags (),
- ACE_Message_Block::DONT_DELETE))
- {
- if (! this->write_array (i->rd_ptr (),
- ACE_CDR::OCTET_SIZE,
- ACE_CDR::OCTET_ALIGN,
- length))
- {
- return 0;
- }
- continue;
- }
-
- if (length < this->memcpy_tradeoff_
- && this->current_->wr_ptr () + length < this->current_->end ())
- {
- if (! this->write_array (i->rd_ptr (),
- ACE_CDR::OCTET_SIZE,
- ACE_CDR::OCTET_ALIGN,
- length))
- {
- return 0;
- }
- continue;
- }
-
- ACE_Message_Block* cont;
- this->good_bit_ = 0;
- ACE_NEW_RETURN (cont,
- ACE_Message_Block (i->data_block ()->duplicate ()),
- 0);
- this->good_bit_ = 1;
-
- if (cont != 0)
- {
- if (this->current_->cont () != 0)
- ACE_Message_Block::release (this->current_->cont ());
- cont->rd_ptr (i->rd_ptr ());
- cont->wr_ptr (i->wr_ptr ());
-
- this->current_->cont (cont);
- this->current_ = cont;
- this->current_is_writable_ = 0;
- this->current_alignment_ =
- (this->current_alignment_ + cont->length ()) % ACE_CDR::MAX_ALIGNMENT;
- }
- else
- {
- this->good_bit_ = 0;
- return 0;
- }
- }
- return 1;
-}
-
-ACE_CDR::Boolean
-ACE_OutputCDR::write_1 (const ACE_CDR::Octet *x)
-{
- char *buf;
- if (this->adjust (1, buf) == 0)
- {
- *ACE_reinterpret_cast(ACE_CDR::Octet*, buf) = *x;
- return 1;
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_OutputCDR::write_2 (const ACE_CDR::UShort *x)
-{
- char *buf;
- if (this->adjust (ACE_CDR::SHORT_SIZE, buf) == 0)
- {
-#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
- *ACE_reinterpret_cast(ACE_CDR::UShort*,buf) = *x;
- return 1;
-#else
- if (!this->do_byte_swap_)
- {
- *ACE_reinterpret_cast (ACE_CDR::UShort *, buf) = *x;
- return 1;
- }
- else
- {
- ACE_CDR::swap_2 (ACE_reinterpret_cast (const char*, x), buf);
- return 1;
- }
-#endif /* ACE_ENABLE_SWAP_ON_WRITE */
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_OutputCDR::write_4 (const ACE_CDR::ULong *x)
-{
- char *buf;
- if (this->adjust (ACE_CDR::LONG_SIZE, buf) == 0)
- {
-#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
- *ACE_reinterpret_cast(ACE_CDR::ULong*,buf) = *x;
- return 1;
-#else
- if (!this->do_byte_swap_)
- {
- *ACE_reinterpret_cast (ACE_CDR::ULong *, buf) = *x;
- return 1;
- }
- else
- {
- ACE_CDR::swap_4 (ACE_reinterpret_cast (const char*, x), buf);
- return 1;
- }
-#endif /* ACE_ENABLE_SWAP_ON_WRITE */
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_OutputCDR::write_8 (const ACE_CDR::ULongLong *x)
-{
- char *buf;
- if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0)
- {
-#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
- *ACE_reinterpret_cast(ACE_CDR::ULongLong*,buf) = *x;
- return 1;
-#else
- if (!this->do_byte_swap_)
- {
- *ACE_reinterpret_cast (ACE_CDR::ULongLong *, buf) = *x;
- return 1;
- }
- else
- {
- ACE_CDR::swap_8 (ACE_reinterpret_cast (const char*, x), buf);
- return 1;
- }
-#endif /* ACE_ENABLE_SWAP_ON_WRITE */
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_OutputCDR::write_16 (const ACE_CDR::LongDouble *x)
-{
- char* buf;
- if (this->adjust (ACE_CDR::LONGDOUBLE_SIZE,
- ACE_CDR::LONGDOUBLE_ALIGN,
- buf) == 0)
- {
-#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
- *ACE_reinterpret_cast(ACE_CDR::LongDouble*,buf) = *x;
- return 1;
-#else
- if (!this->do_byte_swap_)
- {
- *ACE_reinterpret_cast (ACE_CDR::LongDouble *, buf) = *x;
- return 1;
- }
- else
- {
- ACE_CDR::swap_16 (ACE_reinterpret_cast (const char*, x), buf);
- return 1;
- }
-#endif /* ACE_ENABLE_SWAP_ON_WRITE */
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_OutputCDR::write_array (const void *x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length)
-{
- if (length == 0)
- return 1;
- char *buf;
- if (this->adjust (size * length, align, buf) == 0)
- {
-#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
- ACE_OS::memcpy (buf, x, size*length);
- return 1;
-#else
- if (!this->do_byte_swap_ || size == 1)
- {
- ACE_OS::memcpy (buf, x, size*length);
- return 1;
- }
- else
- {
- const char *source = ACE_reinterpret_cast (const char *, x);
- switch (size)
- {
- case 2:
- ACE_CDR::swap_2_array (source, buf, length);
- return 1;
- case 4:
- ACE_CDR::swap_4_array (source, buf, length);
- return 1;
- case 8:
- ACE_CDR::swap_8_array (source, buf, length);
- return 1;
- case 16:
- ACE_CDR::swap_16_array (source, buf, length);
- return 1;
- default:
- // TODO: print something?
- this->good_bit_ = 0;
- return 0;
- }
- }
-#endif /* ACE_ENABLE_SWAP_ON_WRITE */
- }
- this->good_bit_ = 0;
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_OutputCDR::write_boolean_array (const ACE_CDR::Boolean* x,
- ACE_CDR::ULong length)
-{
- // It is hard to optimize this, the spec requires that on the wire
- // booleans be represented as a byte with value 0 or 1, but in
- // memoery it is possible (though very unlikely) that a boolean has
- // a non-zero value (different from 1).
- // We resort to a simple loop.
- const ACE_CDR::Boolean* end = x + length;
- for (const ACE_CDR::Boolean* i = x; i != end && this->good_bit (); ++i)
- {
- this->write_boolean (*i);
- }
- return this->good_bit ();
-}
-
-// ****************************************************************
-
-ACE_InputCDR::ACE_InputCDR (const char *buf,
- size_t bufsiz,
- int byte_order)
- : start_ (buf, bufsiz),
- do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER),
- good_bit_ (1),
- char_translator_ (0),
- wchar_translator_ (0)
-{
- this->start_.wr_ptr (bufsiz);
-}
-
-ACE_InputCDR::ACE_InputCDR (size_t bufsiz,
- int byte_order)
- : start_ (bufsiz),
- do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER),
- good_bit_ (1),
- char_translator_ (0),
- wchar_translator_ (0)
-{
-}
-
-ACE_InputCDR::ACE_InputCDR (const ACE_Message_Block *data,
- int byte_order)
- : start_ (),
- good_bit_ (1),
- char_translator_ (0),
- wchar_translator_ (0)
-{
- this->reset (data, byte_order);
-}
-
-ACE_InputCDR::ACE_InputCDR (ACE_Data_Block *data,
- int byte_order)
- : start_ (data),
- do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER),
- good_bit_ (1),
- char_translator_ (0),
- wchar_translator_ (0)
-{
-}
-
-ACE_InputCDR::ACE_InputCDR (const ACE_InputCDR& rhs,
- size_t size,
- ACE_CDR::Long offset)
- : start_ (rhs.start_.data_block ()->duplicate ()),
- do_byte_swap_ (rhs.do_byte_swap_),
- good_bit_ (1),
- char_translator_ (0),
- wchar_translator_ (0)
-{
- char* newpos = rhs.start_.rd_ptr() + offset;
- if (this->start_.base () <= newpos
- && newpos <= this->start_.end ()
- && newpos + size <= this->start_.end ())
- {
- this->start_.rd_ptr (newpos);
- this->start_.wr_ptr (newpos + size);
- }
- else
- {
- this->good_bit_ = 0;
- }
-}
-
-ACE_InputCDR::ACE_InputCDR (const ACE_InputCDR& rhs,
- size_t size)
- : start_ (rhs.start_.data_block ()->duplicate ()),
- do_byte_swap_ (rhs.do_byte_swap_),
- good_bit_ (1),
- char_translator_ (0),
- wchar_translator_ (0)
-{
- char* newpos = rhs.start_.rd_ptr();
- if (this->start_.base () <= newpos
- && newpos <= this->start_.end ()
- && newpos + size <= this->start_.end ())
- {
- // Notice that ACE_Message_Block::duplicate may leave the
- // wr_ptr() with a higher value that what we actually want.
- this->start_.rd_ptr (newpos);
- this->start_.wr_ptr (newpos + size);
-
- ACE_CDR::Octet byte_order;
- this->read_octet (byte_order);
- this->do_byte_swap_ = (byte_order != ACE_CDR_BYTE_ORDER);
- }
- else
- {
- this->good_bit_ = 0;
- }
-}
-
-ACE_InputCDR::ACE_InputCDR (const ACE_InputCDR& rhs)
- : start_ (rhs.start_.data_block ()->duplicate ()),
- do_byte_swap_ (rhs.do_byte_swap_),
- good_bit_ (1),
- char_translator_ (rhs.char_translator_),
- wchar_translator_ (rhs.wchar_translator_)
-{
- this->start_.rd_ptr (rhs.start_.rd_ptr ());
- this->start_.wr_ptr (rhs.start_.wr_ptr ());
-}
-
-ACE_InputCDR::ACE_InputCDR (ACE_InputCDR::Transfer_Contents x)
- : start_ (x.rhs_.start_.data_block ()),
- do_byte_swap_ (x.rhs_.do_byte_swap_),
- good_bit_ (1),
- char_translator_ (x.rhs_.char_translator_),
- wchar_translator_ (x.rhs_.wchar_translator_)
-{
- this->start_.rd_ptr (x.rhs_.start_.rd_ptr ());
- this->start_.wr_ptr (x.rhs_.start_.wr_ptr ());
-
- ACE_Data_Block* db = this->start_.data_block ()->clone_nocopy ();
- (void) x.rhs_.start_.replace_data_block (db);
-}
-
-ACE_InputCDR&
-ACE_InputCDR::operator= (const ACE_InputCDR& rhs)
-{
- if (this != &rhs)
- {
- this->start_.data_block (rhs.start_.data_block ()->duplicate ());
- this->start_.rd_ptr (rhs.start_.rd_ptr ());
- this->start_.wr_ptr (rhs.start_.wr_ptr ());
- this->do_byte_swap_ = rhs.do_byte_swap_;
- this->good_bit_ = 1;
- }
- return *this;
-}
-
-ACE_InputCDR::ACE_InputCDR (const ACE_OutputCDR& rhs,
- ACE_Allocator* buffer_allocator,
- ACE_Allocator* data_block_allocator)
- : start_ (rhs.total_length () + ACE_CDR::MAX_ALIGNMENT,
- ACE_Message_Block::MB_DATA,
- 0,
- 0,
- buffer_allocator,
- 0,
- 0,
- ACE_Time_Value::zero,
- ACE_Time_Value::max_time,
- data_block_allocator),
- do_byte_swap_ (rhs.do_byte_swap_),
- good_bit_ (1),
- char_translator_ (0),
- wchar_translator_ (0)
-{
- ACE_CDR::mb_align (&this->start_);
- for (const ACE_Message_Block *i = rhs.begin ();
- i != rhs.end ();
- i = i->cont ())
- this->start_.copy (i->rd_ptr (), i->length ());
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::read_string (char *&x)
-{
- // @@ This is a slight violation of "Optimize for the common case",
- // i.e. normally the translator will be 0, but OTOH the code is
- // smaller and should be better for the cache ;-) ;-)
- if (this->char_translator_ != 0)
- return this->char_translator_->read_string (*this, x);
-
- ACE_CDR::ULong len;
-
- this->read_ulong (len);
- if (len > 0)
- {
- ACE_NEW_RETURN (x,
- ACE_CDR::Char[len],
- 0);
- if (this->read_char_array (x, len))
- return 1;
- delete [] x;
- }
-
- x = 0;
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::read_string (ACE_CString &x)
-{
- ACE_CDR::Char *data;
- if (this->read_string (data))
- {
- x = data;
- delete [] data;
- return 1;
- }
-
- x = "";
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::read_wstring (ACE_CDR::WChar*& x)
-{
- // @@ This is a slight violation of "Optimize for the common case",
- // i.e. normally the translator will be 0, but OTOH the code is
- // smaller and should be better for the cache ;-) ;-)
- if (this->wchar_translator_ != 0)
- return this->wchar_translator_->read_wstring (*this, x);
-
- ACE_CDR::ULong len;
- this->read_ulong (len);
- if (this->good_bit())
- {
- ACE_NEW_RETURN (x,
- ACE_CDR::WChar[len],
- 0);
- if (this->read_wchar_array (x, len))
- return 1;
-
- delete [] x;
- }
- x = 0;
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::read_array (void* x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length)
-{
- if (length == 0)
- return 1;
- char* buf;
- if (this->adjust (size * length, align, buf) == 0)
- {
-#if defined (ACE_DISABLE_SWAP_ON_READ)
- ACE_OS::memcpy (x, buf, size*length);
-#else
- if (!this->do_byte_swap_ || size == 1)
- {
- ACE_OS::memcpy (x, buf, size*length);
- }
- else
- {
- char *target = ACE_reinterpret_cast (char*, x);
- switch (size)
- {
- case 2:
- ACE_CDR::swap_2_array (buf, target, length);
- break;
- case 4:
- ACE_CDR::swap_4_array (buf, target, length);
- break;
- case 8:
- ACE_CDR::swap_8_array (buf, target, length);
- break;
- case 16:
- ACE_CDR::swap_16_array (buf, target, length);
- break;
- default:
- // TODO: print something?
- this->good_bit_ = 0;
- return 0;
- }
- }
-#endif /* ACE_DISABLE_SWAP_ON_READ */
- return this->good_bit_;
- }
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::read_boolean_array (ACE_CDR::Boolean *x,
- ACE_CDR::ULong length)
-{
- // It is hard to optimize this, the spec requires that on the wire
- // booleans be represented as a byte with value 0 or 1, but in
- // memoery it is possible (though very unlikely) that a boolean has
- // a non-zero value (different from 1).
- // We resort to a simple loop.
- for (ACE_CDR::ULong i = 0; i != length && this->good_bit_; ++i)
- {
- this->read_boolean (x[i]);
- }
- return this->good_bit_;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::read_1 (ACE_CDR::Octet *x)
-{
- if (this->rd_ptr () < this->end ())
- {
- *x = *ACE_reinterpret_cast (ACE_CDR::Octet*,this->rd_ptr());
- this->start_.rd_ptr (1);
- return 1;
- }
-
- this->good_bit_ = 0;
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::read_2 (ACE_CDR::UShort *x)
-{
- char *buf;
- if (this->adjust (ACE_CDR::SHORT_SIZE, buf) == 0)
- {
-#if !defined (ACE_DISABLE_SWAP_ON_READ)
- if (!this->do_byte_swap_)
- {
- *x = *ACE_reinterpret_cast (ACE_CDR::UShort*, buf);
- }
- else
- {
- ACE_CDR::swap_2 (buf, ACE_reinterpret_cast (char*, x));
- }
-#else
- *x = *ACE_reinterpret_cast(ACE_CDR::UShort*,buf);
-#endif /* ACE_DISABLE_SWAP_ON_READ */
- return 1;
- }
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::read_4 (ACE_CDR::ULong *x)
-{
- char *buf;
- if (this->adjust (ACE_CDR::LONG_SIZE, buf) == 0)
- {
-#if !defined (ACE_DISABLE_SWAP_ON_READ)
- if (!this->do_byte_swap_)
- {
- *x = *ACE_reinterpret_cast (ACE_CDR::ULong*, buf);
- }
- else
- {
- ACE_CDR::swap_4 (buf, ACE_reinterpret_cast (char*, x));
- }
-#else
- *x = *ACE_reinterpret_cast(ACE_CDR::ULong*,buf);
-#endif /* ACE_DISABLE_SWAP_ON_READ */
- return 1;
- }
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::read_8 (ACE_CDR::ULongLong *x)
-{
- char *buf;
- if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0)
- {
-#if !defined (ACE_DISABLE_SWAP_ON_READ)
- if (!this->do_byte_swap_)
- {
- *x = *ACE_reinterpret_cast (ACE_CDR::ULongLong *, buf);
- }
- else
- {
- ACE_CDR::swap_8 (buf, ACE_reinterpret_cast (char*, x));
- }
-#else
- *x = *ACE_reinterpret_cast(ACE_CDR::ULongLong*,buf);
-#endif /* ACE_DISABLE_SWAP_ON_READ */
- return 1;
- }
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::read_16 (ACE_CDR::LongDouble *x)
-{
- char *buf;
- if (this->adjust (ACE_CDR::LONGLONG_SIZE,
- ACE_CDR::LONGLONG_ALIGN,
- buf) == 0)
- {
-#if !defined (ACE_DISABLE_SWAP_ON_READ)
- if (!this->do_byte_swap_)
- {
- *x = *ACE_reinterpret_cast (ACE_CDR::LongDouble *, buf);
- }
- else
- {
- ACE_CDR::swap_16 (buf, ACE_reinterpret_cast (char*, x));
- }
-#else
- *x = *ACE_reinterpret_cast(ACE_CDR::LongDouble*,buf);
-#endif /* ACE_DISABLE_SWAP_ON_READ */
- return 1;
- }
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::skip_string (void)
-{
- ACE_CDR::ULong len;
- if (this->read_ulong (len))
- {
- if (this->rd_ptr () + len <= this->end ())
- {
- this->rd_ptr (len);
- return 1;
- }
- this->good_bit_ = 0;
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_InputCDR::skip_bytes (size_t len)
-{
- if (this->rd_ptr () + len <= this->end ())
- {
- this->rd_ptr (len);
- return 1;
- }
- this->good_bit_ = 0;
- return 0;
-}
-
-int
-ACE_InputCDR::grow (size_t newsize)
-{
- if (ACE_CDR::grow (&this->start_, newsize) == -1)
- return -1;
-
- ACE_CDR::mb_align (&this->start_);
- this->start_.wr_ptr (newsize);
- return 0;
-}
-
-void
-ACE_InputCDR::reset (const ACE_Message_Block* data,
- int byte_order)
-{
- this->reset_byte_order (byte_order);
- ACE_CDR::consolidate (&this->start_, data);
-}
-
-void
-ACE_InputCDR::steal_from (ACE_InputCDR &cdr)
-{
- this->do_byte_swap_ = cdr.do_byte_swap_;
- this->start_.data_block (cdr.start_.data_block ()->duplicate ());
- this->start_.rd_ptr (cdr.start_.rd_ptr ());
- this->start_.wr_ptr (cdr.start_.wr_ptr ());
-
- cdr.reset_contents ();
-}
-
-ACE_Message_Block*
-ACE_InputCDR::steal_contents (void)
-{
- ACE_Message_Block* block =
- this->start_.clone ();
- this->start_.data_block (block->data_block ()->clone ());
- ACE_CDR::mb_align (&this->start_);
-
- return block;
-}
-
-void
-ACE_InputCDR::reset_contents (void)
-{
- this->start_.data_block (this->start_.data_block ()->clone_nocopy ());
-}
diff --git a/ace/CDR_Stream.h b/ace/CDR_Stream.h
deleted file mode 100644
index 7adf7e9a383..00000000000
--- a/ace/CDR_Stream.h
+++ /dev/null
@@ -1,1162 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CDR_Stream.h
-//
-// = DESCRIPTION
-// ACE Common Data Representation (CDR) marshaling and demarshaling
-// classes.
-//
-// This implementation was inspired in the CDR class in SunSoft's
-// IIOP engine, but has a completely different implementation and a
-// different interface too.
-//
-// The current implementation assumes that the host has 1-byte,
-// 2-byte and 4-byte integral types, and that it has single
-// precision and double precision IEEE floats.
-// Those assumptions are pretty good these days, with Crays beign
-// the only known exception.
-//
-// = AUTHORS
-// Aniruddha Gokhale <gokhale@cs.wustl.edu> and Carlos O'Ryan
-// <coryan@cs.wustl.edu> for the original implementation in TAO.
-// ACE version by Jeff Parsons <parsons@cs.wustl.edu>
-// and Istvan Buki <istvan.buki@euronet.be>.
-// Codeset translation by Jim Rogers (jrogers@viasoft.com) and
-// Carlos O'Ryan <coryan@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_CDR_H
-#define ACE_CDR_H
-#include "ace/pre.h"
-
-#include "ace/Message_Block.h"
-#include "ace/SString.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Char_Codeset_Translator;
-class ACE_WChar_Codeset_Translator;
-
-class ACE_Export ACE_CDR
-{
- // = TITLE
- // Keep constants and some routines common to both Output and
- // Input CDR streams.
- //
-public:
- // = Constants defined by the CDR protocol.
- // By defining as many of these constants as possible as enums we
- // ensure they get inlined and avoid pointless static memory
- // allocations.
-
- enum
- {
- // Note that some of these get reused as part of the standard
- // binary format: unsigned is the same size as its signed cousin,
- // float is LONG_SIZE, and double is LONGLONG_SIZE.
-
- OCTET_SIZE = 1,
- SHORT_SIZE = 2,
- LONG_SIZE = 4,
- LONGLONG_SIZE = 8,
- LONGDOUBLE_SIZE = 16,
-
- OCTET_ALIGN = 1,
- SHORT_ALIGN = 2,
- LONG_ALIGN = 4,
- LONGLONG_ALIGN = 8,
- LONGDOUBLE_ALIGN = 8,
- // Note how the CORBA LongDouble alignment requirements do not
- // match its size...
-
- MAX_ALIGNMENT = 8,
- // Maximal CDR 1.1 alignment: "quad precision" FP (i.e. "CDR::Long
- // double", size as above).
-
- DEFAULT_BUFSIZE = ACE_DEFAULT_CDR_BUFSIZE,
- // The default buffer size.
- // @@ TODO We want to add options to control this
- // default value, so this constant should be read as the default
- // default value ;-)
-
- EXP_GROWTH_MAX = ACE_DEFAULT_CDR_EXP_GROWTH_MAX,
- // The buffer size grows exponentially until it reaches this size;
- // afterwards it grows linearly using the next constant
-
- LINEAR_GROWTH_CHUNK = ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK
- // Once exponential growth is ruled out the buffer size increases
- // in chunks of this size, note that this constants have the same
- // value right now, but it does not need to be so.
- };
-
- static void swap_2 (const char *orig, char *target);
- static void swap_4 (const char *orig, char *target);
- static void swap_8 (const char *orig, char *target);
- static void swap_16 (const char *orig, char *target);
- static void swap_2_array (const char *orig,
- char *target,
- size_t length);
- static void swap_4_array (const char *orig,
- char *target,
- size_t length);
- static void swap_8_array (const char *orig,
- char *target,
- size_t length);
- static void swap_16_array (const char *orig,
- char *target,
- size_t length);
- // Do byte swapping for each basic IDL type size. There exist only
- // routines to put byte, halfword (2 bytes), word (4 bytes),
- // doubleword (8 bytes) and quadword (16 byte); because those are
- // the IDL basic type sizes.
-
- static void mb_align (ACE_Message_Block *mb);
- // Align the message block to ACE_CDR::MAX_ALIGNMENT,
- // set by the CORBA spec at 8 bytes.
-
- static size_t first_size (size_t minsize);
- // Compute the size of the smallest buffer that can contain at least
- // <minsize> bytes.
- // To understand how a "best fit" is computed look at the
- // algorithm in the code.
- // Basically the buffers grow exponentially, up to a certain point,
- // then the buffer size grows linearly.
- // The advantage of this algorithm is that is rapidly grows to a
- // large value, but does not explode at the end.
-
- static size_t next_size (size_t minsize);
- // Compute not the smallest, but the second smallest buffer that
- // will fir <minsize> bytes.
-
- static int grow (ACE_Message_Block *mb, size_t minsize);
- // Increase the capacity of mb to contain at least <minsize> bytes.
- // If <minsize> is zero the size is increased by an amount at least
- // large enough to contain any of the basic IDL types. Return -1 on
- // failure, 0 on success.
-
- static void consolidate (ACE_Message_Block *dst,
- const ACE_Message_Block *src);
- // Copy a message block chain into a single message block,
- // preserving the alignment of the original stream.
-
- static size_t total_length (const ACE_Message_Block *begin,
- const ACE_Message_Block *end);
-
- // Definitions of the IDL basic types, for use in the CDR
- // classes. The cleanest way to avoid complaints from all compilers
- // is to define them all.
- #if defined (CHORUS) && defined (ghs) && !defined (__STANDARD_CXX)
- // This is non-compliant, but a nasty bout with
- // Green Hills C++68000 1.8.8 forces us into it.
- typedef unsigned long Boolean;
- #else /* ! (CHORUS && ghs 1.8.8) */
- typedef u_char Boolean;
- #endif /* ! (CHORUS && ghs 1.8.8) */
-
- typedef u_char Octet;
- typedef char Char;
- typedef ACE_OS::WChar WChar;
- typedef ACE_INT16 Short;
- typedef ACE_UINT16 UShort;
- typedef ACE_INT32 Long;
- typedef ACE_UINT32 ULong;
- typedef ACE_UINT64 ULongLong;
-
- # if (defined (_MSC_VER) && (_MSC_VER >= 900)) \
- || (defined (__BORLANDC__) && (__BORLANDC__ >= 0x530))
- typedef __int64 LongLong;
- # elif ACE_SIZEOF_LONG == 8 && !defined(_CRAYMPP)
- typedef long LongLong;
- # elif ACE_SIZEOF_LONG_LONG == 8 && !defined (ACE_LACKS_LONGLONG_T)
- # if defined (sun) && !defined (ACE_LACKS_U_LONGLONG_T) && !defined (__KCC)
- // sun #defines u_longlong_t, maybe other platforms do also.
- // Use it, at least with g++, so that its -pedantic doesn't
- // complain about no ANSI C++ long long.
- typedef longlong_t LongLong;
- # else
- // LynxOS 2.5.0 and Linux don't have u_longlong_t.
- typedef long long LongLong;
- # endif /* sun */
- # else /* no native 64 bit integer type */
-
- // If "long long" isn't native, programs can't use these data
- // types in normal arithmetic expressions. If any particular
- // application can cope with the loss of range, it can define
- // conversion operators itself.
- # if defined (ACE_BIG_ENDIAN)
- struct LongLong { ACE_CDR::Long h, l; };
- # else
- struct LongLong { ACE_CDR::Long l, h; };
- # endif /* ! ACE_BIG_ENDIAN */
- # endif /* no native 64 bit integer type */
-
- # if ACE_SIZEOF_FLOAT == 4
- typedef float Float;
- # else /* ACE_SIZEOF_FLOAT != 4 */
- struct Float
- {
- # if ACE_SIZEOF_INT == 4
- // Use u_int to get word alignment.
- u_int f;
- # else /* ACE_SIZEOF_INT != 4 */
- // Applications will probably have trouble with this.
- char f[4];
- # if defined(_UNICOS) && !defined(_CRAYMPP)
- Float (void);
- Float (const float &init);
- Float & operator= (const float &rhs);
- int operator!= (const Float &rhs) const;
- # endif /* _UNICOS */
- # endif /* ACE_SIZEOF_INT != 4 */
- };
- # endif /* ACE_SIZEOF_FLOAT != 4 */
-
- # if ACE_SIZEOF_DOUBLE == 8
- typedef double Double;
- # else /* ACE_SIZEOF_DOUBLE != 8 */
- struct Double
- {
- # if ACE_SIZEOF_LONG == 8
- // Use u_long to get word alignment.
- u_long f;
- # else /* ACE_SIZEOF_INT != 8 */
- // Applications will probably have trouble with this.
- char f[8];
- # endif /* ACE_SIZEOF_INT != 8 */
- };
- # endif /* ACE_SIZEOF_DOUBLE != 8 */
-
- // 94-9-32 Appendix A defines a 128 bit floating point "long
- // double" data type, with greatly extended precision and four
- // more bits of exponent (compared to "double"). This is an IDL
- // extension, not yet standard.
-
- # if ACE_SIZEOF_LONG_DOUBLE == 16
- typedef long double LongDouble;
- # else
- # define NONNATIVE_LONGDOUBLE
- struct ACE_Export LongDouble
- {
- char ld[16];
- int operator== (const LongDouble &rhs) const;
- int operator!= (const LongDouble &rhs) const;
- // @@ also need other comparison operators.
- };
- # endif /* ACE_SIZEOF_LONG_DOUBLE != 16 */
-
-};
-
-class ACE_Export ACE_OutputCDR
-{
- // = TITLE
- // A CDR stream for writing, i.e. for marshalling.
- //
- // = DESCRIPTION
- // This class is based on the the CORBA spec for Java (98-02-29),
- // java class omg.org.CORBA.portable.OutputStream. It diverts in
- // a few ways:
- // + Operations taking arrays don't have offsets, because in C++
- // it is easier to describe an array starting from x+offset.
- // + Operations return an error status, because exceptions are
- // not widely available in C++ (yet).
- //
-public:
- friend class ACE_Char_Codeset_Translator;
- friend class ACE_WChar_Codeset_Translator;
- // The Codeset translators need access to some private members to
- // efficiently marshal arrays
- friend class ACE_InputCDR;
- // For reading from an output CDR stream.
-
- ACE_OutputCDR (size_t size = 0,
- int byte_order = ACE_CDR_BYTE_ORDER,
- ACE_Allocator* buffer_allocator = 0,
- ACE_Allocator* data_block_allocator = 0,
- size_t memcpy_tradeoff =
- ACE_DEFAULT_CDR_MEMCPY_TRADEOFF);
- // Default constructor, allocates <size> bytes in the internal
- // buffer, if <size> == 0 it allocates the default size.
-
- ACE_OutputCDR (char *data,
- size_t size,
- int byte_order = ACE_CDR_BYTE_ORDER,
- ACE_Allocator* buffer_allocator = 0,
- ACE_Allocator* data_block_allocator = 0,
- size_t memcpy_tradeoff=
- ACE_DEFAULT_CDR_MEMCPY_TRADEOFF);
- // Build a CDR stream with an initial buffer, it will *not* remove
- // <data>, since it did not allocated it.
-
- ACE_OutputCDR (ACE_Message_Block *data,
- int byte_order = ACE_CDR_BYTE_ORDER,
- size_t memcpy_tradeoff=
- ACE_DEFAULT_CDR_MEMCPY_TRADEOFF);
- // Build a CDR stream with an initial Message_Block chain, it will
- // *not* remove <data>, since it did not allocate it.
-
- ~ACE_OutputCDR (void);
- // destructor
-
- // = Special types.
- // These are needed for insertion and extraction of booleans,
- // octets, chars, and bounded strings.
-
- struct ACE_Export from_boolean
- {
- from_boolean (ACE_CDR::Boolean b);
- ACE_CDR::Boolean val_;
- };
-
- struct ACE_Export from_octet
- {
- from_octet (ACE_CDR::Octet o);
- ACE_CDR::Octet val_;
- };
-
- struct ACE_Export from_char
- {
- from_char (ACE_CDR::Char c);
- ACE_CDR::Char val_;
- };
-
- struct ACE_Export from_wchar
- {
- from_wchar (ACE_CDR::WChar wc);
- ACE_CDR::WChar val_;
- };
-
- struct ACE_Export from_string
- {
- from_string (ACE_CDR::Char* s,
- ACE_CDR::ULong b,
- ACE_CDR::Boolean nocopy = 0);
- ACE_CDR::Char *val_;
- ACE_CDR::ULong bound_;
- ACE_CDR::Boolean nocopy_;
- };
-
- struct ACE_Export from_wstring
- {
- from_wstring (ACE_CDR::WChar* ws,
- ACE_CDR::ULong b,
- ACE_CDR::Boolean nocopy = 0);
- ACE_CDR::WChar *val_;
- ACE_CDR::ULong bound_;
- ACE_CDR::Boolean nocopy_;
- };
-
- // = We have one method per basic IDL type....
- // They return 0 on failure and 1 on success.
- ACE_CDR::Boolean write_boolean (ACE_CDR::Boolean x);
- ACE_CDR::Boolean write_char (ACE_CDR::Char x);
- ACE_CDR::Boolean write_wchar (ACE_CDR::WChar x);
- ACE_CDR::Boolean write_octet (ACE_CDR::Octet x);
- ACE_CDR::Boolean write_short (ACE_CDR::Short x);
- ACE_CDR::Boolean write_ushort (ACE_CDR::UShort x);
- ACE_CDR::Boolean write_long (ACE_CDR::Long x);
- ACE_CDR::Boolean write_ulong (ACE_CDR::ULong x);
- ACE_CDR::Boolean write_longlong (const ACE_CDR::LongLong &x);
- ACE_CDR::Boolean write_ulonglong (const ACE_CDR::ULongLong &x);
- ACE_CDR::Boolean write_float (ACE_CDR::Float x);
- ACE_CDR::Boolean write_double (const ACE_CDR::Double &x);
- ACE_CDR::Boolean write_longdouble (const ACE_CDR::LongDouble &x);
-
- // = For string we offer methods that accept a precomputed length.
- ACE_CDR::Boolean write_string (const ACE_CDR::Char *x);
- ACE_CDR::Boolean write_string (ACE_CDR::ULong len,
- const ACE_CDR::Char *x);
- ACE_CDR::Boolean write_string (const ACE_CString &x);
- ACE_CDR::Boolean write_wstring (const ACE_CDR::WChar *x);
- ACE_CDR::Boolean write_wstring (ACE_CDR::ULong length,
- const ACE_CDR::WChar *x);
-
- // = We add one method to write arrays of basic IDL types.
- // Note: the portion written starts at <x> and ends at <x + length>.
- // The length is *NOT* stored into the CDR stream.
- ACE_CDR::Boolean write_boolean_array (const ACE_CDR::Boolean *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_char_array (const ACE_CDR::Char *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_wchar_array (const ACE_CDR::WChar* x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_octet_array (const ACE_CDR::Octet* x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_short_array (const ACE_CDR::Short *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_ushort_array (const ACE_CDR::UShort *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_long_array (const ACE_CDR::Long *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_ulong_array (const ACE_CDR::ULong *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_longlong_array (const ACE_CDR::LongLong* x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_ulonglong_array (const ACE_CDR::ULongLong *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_float_array (const ACE_CDR::Float *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_double_array (const ACE_CDR::Double *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean write_longdouble_array (const ACE_CDR::LongDouble* x,
- ACE_CDR::ULong length);
-
- ACE_CDR::Boolean write_octet_array_mb (const ACE_Message_Block* mb);
- // Write an octet array contained inside a MB, this can be optimized
- // to minimize copies.
-
- // = We have one method per basic IDL type....
- // They return 0 on failure and 1 on success.
- ACE_CDR::Boolean append_boolean (ACE_InputCDR &);
- ACE_CDR::Boolean append_char (ACE_InputCDR &);
- ACE_CDR::Boolean append_wchar (ACE_InputCDR &);
- ACE_CDR::Boolean append_octet (ACE_InputCDR &);
- ACE_CDR::Boolean append_short (ACE_InputCDR &);
- ACE_CDR::Boolean append_ushort (ACE_InputCDR &);
- ACE_CDR::Boolean append_long (ACE_InputCDR &);
- ACE_CDR::Boolean append_ulong (ACE_InputCDR &);
- ACE_CDR::Boolean append_longlong (ACE_InputCDR &);
- ACE_CDR::Boolean append_ulonglong (ACE_InputCDR &);
- ACE_CDR::Boolean append_float (ACE_InputCDR &);
- ACE_CDR::Boolean append_double (ACE_InputCDR &);
- ACE_CDR::Boolean append_longdouble (ACE_InputCDR &);
-
- ACE_CDR::Boolean append_wstring (ACE_InputCDR &);
- ACE_CDR::Boolean append_string (ACE_InputCDR &);
-
- int good_bit (void) const;
- // Returns 0 if an error has ocurred, the only expected error is to
- // run out of memory.
-
- void reset (void);
- // Reuse the CDR stream to write on the old buffer.
-
- size_t total_length (void) const;
- // Add the length of each message block in the chain.
-
- const ACE_Message_Block *begin (void) const;
- // Return the start of the message block chain for this CDR stream.
- // NOTE: The complete CDR stream is represented by a chain of
- // message blocks.
-
- const ACE_Message_Block *end (void) const;
- // Return the last message in the chain that is is use.
-
- const ACE_Message_Block *current (void) const;
- // Return the <current_> message block in chain.
-
- const char *buffer (void) const;
- // Access the underlying buffer (read only).
-
- size_t length (void) const;
- // Return the start and size of the internal buffer. NOTE: This
- // methods only return information about the first block in the
- // chain.
-
- int align_write_ptr (size_t alignment);
- // Utility function to allow the user more flexibility.
- // Pads the stream up to the nearest <alignment>-byte boundary.
- // Argument MUST be a power of 2.
- // Returns 0 on success and -1 on failure.
-
- ACE_Char_Codeset_Translator *char_translator (void) const;
- ACE_WChar_Codeset_Translator *wchar_translator (void) const;
- // Access the codeset translators. They can be nil!
-
- size_t current_alignment (void) const;
- // Return alignment of the wr_ptr(), with respect to the start of
- // the CDR stream. This is not the same as the alignment of
- // current->wr_ptr()!
-
-private:
- ACE_OutputCDR (const ACE_OutputCDR& rhs);
- ACE_OutputCDR& operator= (const ACE_OutputCDR& rhs);
- // disallow copying...
-
- ACE_CDR::Boolean write_1 (const ACE_CDR::Octet *x);
- ACE_CDR::Boolean write_2 (const ACE_CDR::UShort *x);
- ACE_CDR::Boolean write_4 (const ACE_CDR::ULong *x);
- ACE_CDR::Boolean write_8 (const ACE_CDR::ULongLong *x);
- ACE_CDR::Boolean write_16 (const ACE_CDR::LongDouble *x);
-
- ACE_CDR::Boolean write_array (const void *x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length);
- // write an array of <length> elements, each of <size> bytes and the
- // start aligned at a multiple of <align>. The elements are assumed
- // to be packed with the right alignment restrictions. It is mostly
- // designed for buffers of the basic types.
- //
- // This operation uses <memcpy>; as explained above it is expected
- // that using assignment is faster that <memcpy> for one element,
- // but for several elements <memcpy> should be more efficient, it
- // could be interesting to find the break even point and optimize
- // for that case, but that would be too platform dependent.
-
- int adjust (size_t size,
- char *&buf);
- // Returns (in <buf>) the next position in the buffer aligned to
- // <size>, it advances the Message_Block wr_ptr past the data
- // (i.e. <buf> + <size>). If necessary it grows the Message_Block
- // buffer. Sets the good_bit to 0 and returns a -1 on failure.
-
- int adjust (size_t size,
- size_t align,
- char *&buf);
- // As above, but now the size and alignment requirements may be
- // different.
-
- int grow_and_adjust (size_t size,
- size_t align,
- char *&buf);
- // Grow the CDR stream. When it returns <buf> contains a pointer to
- // memory in the CDR stream, with at least <size> bytes ahead of it
- // and aligned to an <align> boundary. It moved the <wr_ptr> to <buf
- // + size>.
-
- int do_byte_swap (void) const;
- // If non-zero then this stream is writing in non-native byte order,
- // this is only meaningful if ACE_ENABLE_SWAP_ON_WRITE is defined.
-
-private:
- ACE_Message_Block start_;
- // The start of the chain of message blocks.
-
- ACE_Message_Block *current_;
- // The current block in the chain were we are writing.
-
- int current_is_writable_;
- // Is the current block writable. When we steal a buffer from the
- // user and just chain it into the message block we are not supposed
- // to write on it, even if it is past the start and end of the
- // buffer.
-
- size_t current_alignment_;
- // The current alignment as measured from the start of the buffer.
- // Usually this coincides with the alignment of the buffer in
- // memory, but, when we chain another buffer this "quasi invariant"
- // is broken.
- // The current_alignment is used to readjust the buffer following
- // the stolen message block.
-
- int do_byte_swap_;
- // If not zero swap bytes at writing so the created CDR stream byte
- // order does *not* match the machine byte order. The motivation
- // for such a beast is that in some setting a few (fast) machines
- // can be serving hundreds of slow machines with the opposite byte
- // order, so it makes sense (as a load balancing device) to put the
- // responsability in the writers. THIS IS NOT A STANDARD IN CORBA,
- // USE AT YOUR OWN RISK
-
- int good_bit_;
- // Set to 0 when an error ocurrs.
-
- size_t memcpy_tradeoff_;
- // Break-even point for copying.
-
-protected:
- ACE_Char_Codeset_Translator *char_translator_;
- ACE_WChar_Codeset_Translator *wchar_translator_;
- // If not nil, invoke for translation of character and string data.
-};
-
-// ****************************************************************
-
-class ACE_Export ACE_InputCDR
-{
- // = TITLE
- // A CDR stream for reading, i.e. for demarshalling.
- //
- // = DESCRIPTION
- // This class is based on the the CORBA spec for Java (98-02-29),
- // java class omg.org.CORBA.portable.InputStream. It diverts in a
- // few ways:
- // + Operations to retrieve basic types take parameters by
- // reference.
- // + Operations taking arrays don't have offsets, because in C++
- // it is easier to describe an array starting from x+offset.
- // + Operations return an error status, because exceptions are
- // not widely available in C++ (yet).
- //
-public:
- friend class ACE_Char_Codeset_Translator;
- friend class ACE_WChar_Codeset_Translator;
- // The translator need privileged access to efficiently demarshal
- // arrays and the such
-
- ACE_InputCDR (const char *buf,
- size_t bufsiz,
- int byte_order = ACE_CDR_BYTE_ORDER);
- // Create an input stream from an arbitrary buffer, care must be
- // exercised wrt alignment, because this contructor will *not* work
- // if the buffer is unproperly aligned.
-
- ACE_InputCDR (size_t bufsiz,
- int byte_order = ACE_CDR_BYTE_ORDER);
- // Create an empty input stream. The caller is responsible for
- // putting the right data and providing the right alignment.
-
- ACE_InputCDR (const ACE_Message_Block *data,
- int byte_order = ACE_CDR_BYTE_ORDER);
- // Create an input stream from an ACE_Message_Block
-
- ACE_InputCDR (ACE_Data_Block *data,
- int byte_order = ACE_CDR_BYTE_ORDER);
- // Create an input stream from an ACE_Data_Block
-
- ACE_InputCDR (const ACE_InputCDR& rhs);
- ACE_InputCDR& operator= (const ACE_InputCDR& rhs);
- // These make a copy of the current stream state, but do not copy
- // the internal buffer, so the same stream can be read multiple
- // times efficiently.
-
- ACE_InputCDR (const ACE_InputCDR& rhs,
- size_t size,
- ACE_CDR::Long offset);
- // When interpreting indirected TypeCodes it is useful to make a
- // "copy" of the stream starting in the new position.
-
- ACE_InputCDR (const ACE_InputCDR& rhs,
- size_t size);
- // This creates an encapsulated stream, the first byte must be (per
- // the spec) the byte order of the encapsulation.
-
- ACE_InputCDR (const ACE_OutputCDR& rhs,
- ACE_Allocator* buffer_allocator = 0,
- ACE_Allocator* data_block_allocator = 0);
- // Create an input CDR from an output CDR.
-
- struct ACE_Export Transfer_Contents
- {
- // Helper class to transfer the contents from one input CDR to
- // another without requiring any extra memory allocations, data
- // copies or too many temporaries.
- Transfer_Contents (ACE_InputCDR &rhs);
-
- ACE_InputCDR &rhs_;
- };
- ACE_InputCDR (Transfer_Contents rhs);
- // Transfer the contents from <rhs> to a new CDR
-
- ~ACE_InputCDR (void);
- // Destructor
-
- // = Special types.
- // These extract octets, chars, booleans, and bounded strings
-
- struct ACE_Export to_boolean
- {
- to_boolean (ACE_CDR::Boolean &b);
- ACE_CDR::Boolean &ref_;
- };
-
- struct ACE_Export to_char
- {
- to_char (ACE_CDR::Char &c);
- ACE_CDR::Char &ref_;
- };
-
- struct ACE_Export to_wchar
- {
- to_wchar (ACE_CDR::WChar &wc);
- ACE_CDR::WChar &ref_;
- };
-
- struct ACE_Export to_octet
- {
- to_octet (ACE_CDR::Octet &o);
- ACE_CDR::Octet &ref_;
- };
-
- struct ACE_Export to_string
- {
- to_string (ACE_CDR::Char *&s,
- ACE_CDR::ULong b);
- ACE_CDR::Char *&val_;
- ACE_CDR::ULong bound_;
- };
-
- struct ACE_Export to_wstring
- {
- to_wstring (ACE_CDR::WChar *&ws,
- ACE_CDR::ULong b);
- ACE_CDR::WChar *&val_;
- ACE_CDR::ULong bound_;
- };
-
- // = We have one method per basic IDL type....
- // They return 0 on failure and 1 on success.
- ACE_CDR::Boolean read_boolean (ACE_CDR::Boolean& x);
- ACE_CDR::Boolean read_char (ACE_CDR::Char &x);
- ACE_CDR::Boolean read_wchar (ACE_CDR::WChar& x);
- ACE_CDR::Boolean read_octet (ACE_CDR::Octet& x);
- ACE_CDR::Boolean read_short (ACE_CDR::Short &x);
- ACE_CDR::Boolean read_ushort (ACE_CDR::UShort &x);
- ACE_CDR::Boolean read_long (ACE_CDR::Long &x);
- ACE_CDR::Boolean read_ulong (ACE_CDR::ULong &x);
- ACE_CDR::Boolean read_longlong (ACE_CDR::LongLong& x);
- ACE_CDR::Boolean read_ulonglong (ACE_CDR::ULongLong& x);
- ACE_CDR::Boolean read_float (ACE_CDR::Float &x);
- ACE_CDR::Boolean read_double (ACE_CDR::Double &x);
- ACE_CDR::Boolean read_longdouble (ACE_CDR::LongDouble &x);
-
- ACE_CDR::Boolean read_string (ACE_CDR::Char *&x);
- ACE_CDR::Boolean read_string (ACE_CString &x);
- ACE_CDR::Boolean read_wstring (ACE_CDR::WChar*& x);
-
- // = One method for each basic type...
- // The buffer <x> must be large enough to contain <length>
- // elements.
- // They return -1 on failure and 0 on success.
- ACE_CDR::Boolean read_boolean_array (ACE_CDR::Boolean* x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_char_array (ACE_CDR::Char *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_wchar_array (ACE_CDR::WChar* x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_octet_array (ACE_CDR::Octet* x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_short_array (ACE_CDR::Short *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_ushort_array (ACE_CDR::UShort *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_long_array (ACE_CDR::Long *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_ulong_array (ACE_CDR::ULong *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_longlong_array (ACE_CDR::LongLong* x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_ulonglong_array (ACE_CDR::ULongLong* x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_float_array (ACE_CDR::Float *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_double_array (ACE_CDR::Double *x,
- ACE_CDR::ULong length);
- ACE_CDR::Boolean read_longdouble_array (ACE_CDR::LongDouble* x,
- ACE_CDR::ULong length);
-
- // = We have one method per basic IDL type....
- // They return 0 on failure and 1 on success.
- ACE_CDR::Boolean skip_boolean (void);
- ACE_CDR::Boolean skip_char (void);
- ACE_CDR::Boolean skip_wchar (void);
- ACE_CDR::Boolean skip_octet (void);
- ACE_CDR::Boolean skip_short (void);
- ACE_CDR::Boolean skip_ushort (void);
- ACE_CDR::Boolean skip_long (void);
- ACE_CDR::Boolean skip_ulong (void);
- ACE_CDR::Boolean skip_longlong (void);
- ACE_CDR::Boolean skip_ulonglong (void);
- ACE_CDR::Boolean skip_float (void);
- ACE_CDR::Boolean skip_double (void);
- ACE_CDR::Boolean skip_longdouble (void);
-
- ACE_CDR::Boolean skip_wstring (void);
- ACE_CDR::Boolean skip_string (void);
- // The next field must be a string, this method skips it. It is
- // useful in parsing a TypeCode.
- // Return 0 on failure and 1 on success.
-
- ACE_CDR::Boolean skip_bytes (size_t n);
- // Skip <n> bytes in the CDR stream.
- // Return 0 on failure and 1 on success.
-
- int good_bit (void) const;
- // returns zero if a problem has been detected.
-
- const ACE_Message_Block* start (void) const;
- // Return the start of the message block chain for this CDR stream.
- // NOTE: In the current implementation the chain has length 1, but
- // we are planning to change that.
-
- // = The following functions are useful to read the contents of the
- // CDR stream from a socket or file.
-
- int grow (size_t newsize);
- // Grow the internal buffer, reset <rd_ptr> to the first byte in the
- // new buffer that is properly aligned, and set <wr_ptr> to <rd_ptr>
- // + newsize
-
- void reset_byte_order (int byte_order);
- // After reading and partially parsing the contents the user can
- // detect a change in the byte order, this method will let him
- // change it.
-
- void reset (const ACE_Message_Block *data,
- int byte_order);
- // Re-initialize the CDR stream, copying the contents of the chain
- // of message_blocks starting from <data>.
-
- ACE_Message_Block *steal_contents (void);
- // Steal the contents from the currect CDR.
-
- void steal_from (ACE_InputCDR &cdr);
- // Steal the contents of <cdr> and make a shallow copy into this
- // stream.
-
- void reset_contents (void);
- // Re-initialize the CDR stream, forgetting about the old contents
- // of the stream and allocating a new buffer (from the allocators).
-
- char* rd_ptr (void);
- // Returns the current position for the rd_ptr....
-
- size_t length (void) const;
- // Return how many bytes are left in the stream.
-
- int align_read_ptr (size_t alignment);
- // Utility function to allow the user more flexibility.
- // Skips up to the nearest <alignment>-byte boundary.
- // Argument MUST be a power of 2.
- // Returns 0 on success and -1 on failure.
-
- int do_byte_swap (void) const;
- // If non-zero then this stream is writing in non-native byte order,
- // this is only meaningful if ACE_ENABLE_SWAP_ON_WRITE is defined.
-
- int byte_order (void) const;
- // If <do_byte_swap> returns 1, this returns ACE_CDR_BYTE_ORDER else
- // it returns ~ACE_CDR_BYTE_ORDER.
-
- ACE_Char_Codeset_Translator *char_translator (void) const;
- ACE_WChar_Codeset_Translator *wchar_translator (void) const;
- // Access the codeset translators. They can be nil!
-
-protected:
- ACE_Message_Block start_;
- // The start of the chain of message blocks, even though in the
- // current version the chain always has length 1.
-
- int do_byte_swap_;
- // The CDR stream byte order does not match the one on the machine,
- // swapping is needed while reading.
-
- int good_bit_;
- // set to 0 when an error occurs.
-
- ACE_Char_Codeset_Translator *char_translator_;
- ACE_WChar_Codeset_Translator *wchar_translator_;
- // If not nil, invoke for translation of character and string data.
-
-private:
- ACE_CDR::Boolean read_1 (ACE_CDR::Octet *x);
- ACE_CDR::Boolean read_2 (ACE_CDR::UShort *x);
- ACE_CDR::Boolean read_4 (ACE_CDR::ULong *x);
- ACE_CDR::Boolean read_8 (ACE_CDR::ULongLong *x);
- ACE_CDR::Boolean read_16 (ACE_CDR::LongDouble *x);
-
- // Several types can be read using the same routines, since TAO
- // tries to use native types with known size for each CORBA type.
- // We could use void* or char* to make the interface more
- // consistent, but using native types let us exploit the strict
- // alignment requirements of CDR streams and implement the
- // operations using asignment.
-
- ACE_CDR::Boolean read_array (void* x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length);
- // Read an array of <length> elements, each of <size> bytes and the
- // start aligned at a multiple of <align>. The elements are assumed
- // to be packed with the right alignment restrictions. It is mostly
- // designed for buffers of the basic types.
- //
- // This operation uses <memcpy>; as explained above it is expected
- // that using assignment is faster that <memcpy> for one element,
- // but for several elements <memcpy> should be more efficient, it
- // could be interesting to find the break even point and optimize
- // for that case, but that would be too platform dependent.
-
- void rd_ptr (size_t offset);
- // Move the rd_ptr ahead by <offset> bytes.
-
- char* end (void);
- // Points to the continuation field of the current message block.
-
- int adjust (size_t size,
- char *&buf);
- // Returns (in <buf>) the next position in the buffer aligned to
- // <size>, it advances the Message_Block rd_ptr past the data
- // (i.e. <buf> + <size>). Sets the good_bit to 0 and returns a -1
- // on failure.
-
- int adjust (size_t size,
- size_t align,
- char *&buf);
- // As above, but now the size and alignment requirements may be
- // different.
-};
-
-// ****************************************************************
-
-class ACE_Export ACE_Char_Codeset_Translator
-{
- // = TITLE
- // Codeset translation routines common to both Output and Input
- // CDR streams.
- //
- // = DESCRIPTION
- // This class is a base class for defining codeset translation
- // routines to handle the character set translations required by
- // both CDR Input streams and CDR Output streams.
- //
-public:
- virtual ACE_CDR::Boolean read_char (ACE_InputCDR&,
- ACE_CDR::Char&) = 0;
- // Read a single character from the stream, converting from the
- // stream codeset to the native codeset
-
- virtual ACE_CDR::Boolean read_string (ACE_InputCDR&,
- ACE_CDR::Char *&) = 0;
- // Read a string from the stream, including the length, converting
- // the characters from the stream codeset to the native codeset
-
- virtual ACE_CDR::Boolean read_char_array (ACE_InputCDR&,
- ACE_CDR::Char*,
- ACE_CDR::ULong) = 0;
- // Read an array of characters from the stream, converting the
- // characters from the stream codeset to the native codeset.
-
- virtual ACE_CDR::Boolean write_char (ACE_OutputCDR&,
- ACE_CDR::Char) = 0;
- // Write a single character to the stream, converting from the
- // native codeset to the stream codeset
-
- virtual ACE_CDR::Boolean write_string (ACE_OutputCDR&,
- ACE_CDR::ULong,
- const ACE_CDR::Char*) = 0;
- // Write a string to the stream, including the length, converting
- // from the native codeset to the stream codeset
-
- virtual ACE_CDR::Boolean write_char_array (ACE_OutputCDR&,
- const ACE_CDR::Char*,
- ACE_CDR::ULong) = 0;
- // Write an array of characters to the stream, converting from the
- // native codeset to the stream codeset
-
-protected:
- ACE_CDR::Boolean read_1 (ACE_InputCDR& input,
- ACE_CDR::Octet *x);
- ACE_CDR::Boolean write_1 (ACE_OutputCDR& output,
- const ACE_CDR::Octet *x);
- // Children have access to low-level routines because they cannot
- // use read_char or something similar (it would recurse).
-
- ACE_CDR::Boolean read_array (ACE_InputCDR& input,
- void* x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length);
- // Efficiently read <length> elements of size <size> each from
- // <input> into <x>; the data must be aligned to <align>.
-
- ACE_CDR::Boolean write_array (ACE_OutputCDR& output,
- const void *x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length);
- // Efficiently write <length> elements of size <size> from <x> into
- // <output>. Before inserting the elements enough padding is added
- // to ensure that the elements will be aligned to <align> in the
- // stream.
-
- int adjust (ACE_OutputCDR& out,
- size_t size,
- size_t align,
- char *&buf);
- // Exposes the stream implementation of <adjust>, this is useful in
- // many cases to minimize memory allocations during marshaling.
- // On success <buf> will contain a contiguous area in the CDR stream
- // that can hold <size> bytes aligned to <align>.
- // Results
-
- void good_bit (ACE_OutputCDR& out, int bit);
- // Used by derived classes to set errors in the CDR stream.
-};
-
-// ****************************************************************
-
-class ACE_Export ACE_WChar_Codeset_Translator
-{
- // = TITLE
- // Codeset translation routines common to both Output and Input
- // CDR streams.
- //
- // = DESCRIPTION
- // This class is a base class for defining codeset translation
- // routines to handle the character set translations required by
- // both CDR Input streams and CDR Output streams.
- //
-public:
- virtual ACE_CDR::Boolean read_wchar (ACE_InputCDR&,
- ACE_CDR::WChar&) = 0;
- virtual ACE_CDR::Boolean read_wstring (ACE_InputCDR&,
- ACE_CDR::WChar *&) = 0;
- virtual ACE_CDR::Boolean read_wchar_array (ACE_InputCDR&,
- ACE_CDR::WChar*,
- ACE_CDR::ULong) = 0;
- virtual ACE_CDR::Boolean write_wchar (ACE_OutputCDR&,
- ACE_CDR::WChar) = 0;
- virtual ACE_CDR::Boolean write_wstring (ACE_OutputCDR&,
- ACE_CDR::ULong,
- const ACE_CDR::WChar*) = 0;
- virtual ACE_CDR::Boolean write_wchar_array (ACE_OutputCDR&,
- const ACE_CDR::WChar*,
- ACE_CDR::ULong) = 0;
-
-protected:
- ACE_CDR::Boolean read_1 (ACE_InputCDR& input,
- ACE_CDR::Octet *x);
- ACE_CDR::Boolean read_2 (ACE_InputCDR& input,
- ACE_CDR::UShort *x);
- ACE_CDR::Boolean read_4 (ACE_InputCDR& input,
- ACE_CDR::ULong *x);
- ACE_CDR::Boolean write_1 (ACE_OutputCDR& output,
- const ACE_CDR::Octet *x);
- ACE_CDR::Boolean write_2 (ACE_OutputCDR& output,
- const ACE_CDR::UShort *x);
- ACE_CDR::Boolean write_4 (ACE_OutputCDR& output,
- const ACE_CDR::ULong *x);
- // Children have access to low-level routines because they cannot
- // use read_char or something similar (it would recurse).
-
- ACE_CDR::Boolean read_array (ACE_InputCDR& input,
- void* x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length);
- // Efficiently read <length> elements of size <size> each from
- // <input> into <x>; the data must be aligned to <align>.
-
- ACE_CDR::Boolean write_array (ACE_OutputCDR& output,
- const void *x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length);
- // Efficiently write <length> elements of size <size> from <x> into
- // <output>. Before inserting the elements enough padding is added
- // to ensure that the elements will be aligned to <align> in the
- // stream.
-
- int adjust (ACE_OutputCDR& out,
- size_t size,
- size_t align,
- char *&buf);
- // Exposes the stream implementation of <adjust>, this is useful in
- // many cases to minimize memory allocations during marshaling.
- // On success <buf> will contain a contiguous area in the CDR stream
- // that can hold <size> bytes aligned to <align>.
- // Results
-
- void good_bit (ACE_OutputCDR& out, int bit);
- // Used by derived classes to set errors in the CDR stream.
-};
-
-#if defined (__ACE_INLINE__)
-# include "ace/CDR_Stream.i"
-#else /* __ACE_INLINE__ */
-
-// Not used by CORBA or TAO
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_CDR::Char x);
-// CDR output operators for primitive types
-
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_CDR::Short x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_CDR::UShort x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_CDR::Long x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_CDR::ULong x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_CDR::LongLong x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_CDR::ULongLong x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR& os,
- ACE_CDR::LongDouble x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_CDR::Float x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_CDR::Double x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- const ACE_CString &x);
-
-// CDR output operator from helper classes
-
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_boolean x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_char x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_wchar x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_octet x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_string x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- ACE_OutputCDR::from_wstring x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- const ACE_CDR::Char* x);
-extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os,
- const ACE_CDR::WChar* x);
-
-// Not used by CORBA or TAO
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::Char &x);
-// CDR input operators for primitive types
-
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::Short &x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::UShort &x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::Long &x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::ULong &x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::LongLong &x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::ULongLong &x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::LongDouble &x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::Float &x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::Double &x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CString &x);
-
-// CDR input operator from helper classes
-
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_boolean x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_char x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_wchar x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_octet x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_string x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_InputCDR::to_wstring x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::Char*& x);
-extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is,
- ACE_CDR::WChar*& x);
-
-#endif /* __ACE_INLINE */
-
-#include "ace/post.h"
-#endif /* ACE_CDR_H */
diff --git a/ace/CDR_Stream.i b/ace/CDR_Stream.i
deleted file mode 100644
index 99caa6651f3..00000000000
--- a/ace/CDR_Stream.i
+++ /dev/null
@@ -1,1625 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ****************************************************************
-
-//
-// The ACE_CDR::swap_X and ACE_CDR::swap_X_array routines are broken
-// in 4 cases for optimization:
-//
-// * x86 Pentium CPU + gnu g++
-// (ACE_HAS_PENTIUM && __GNUG__)
-// => gcc x86 inline assembly.
-//
-// * x86 Pentium CPU and (_MSC_VER) or BORLAND C++)
-// (ACE_HAS_PENTIUM && ( _MSC_VER || __BORLANDC__ )
-// => MSC x86 inline assembly.
-//
-// * 64 bit architecture
-// (ACE_SIZEOF_LONG == 8)
-// => shift/masks using 64bit words.
-//
-// * default
-// (none of the above)
-// => shift/masks using 32bit words.
-//
-//
-// Some things you could find useful to know if you intend to mess
-// with this optimizations for swaps:
-//
-// * MSVC++ don't assume register values are conserved between
-// statements. So you can clobber any register you want,
-// whenever you want (well not *anyone* really, see manual).
-// The MSVC++ optimizer will try to pick different registers
-// for the C++ statements sorrounding your asm block, and if
-// it's not possible will use the stack.
-//
-// * If you clobber registers with asm statements in gcc, you
-// better do it in an asm-only function, or save/restore them
-// before/after in the stack. If not, sorrounding C statements
-// could end using the same registers and big-badda-bum (been
-// there, done that...). The big-badda-bum could happen *even
-// if you specify the clobbered register in your asm's*.
-// Even better, use gcc asm syntax for detecting the register
-// asigned to a certain variable so you don't have to clobber any
-// register directly.
-//
-
-ACE_INLINE void
-ACE_CDR::swap_2 (const char *orig, char* target)
-{
-#if defined(ACE_HAS_PENTIUM)
-# if defined(__GNUG__)
- unsigned short a =
- *ACE_reinterpret_cast(const unsigned short*, orig);
- asm( "rolw $8, %0" : "=r" (a) : "0" (a) );
- *ACE_reinterpret_cast(unsigned short*, target) = a;
-# elif (defined(_MSC_VER) || defined(__BORLANDC__)) \
- && !defined(ACE_LACKS_INLINE_ASSEMBLY)
- __asm mov ebx, orig;
- __asm mov ecx, target;
- __asm mov ax, [ebx];
- __asm rol ax, 8;
- __asm mov [ecx], ax;
-# else
- // For CISC Platforms this is faster than shift/masks.
- target[1] = orig[0];
- target[0] = orig[1];
-# endif
-#else
- register ACE_UINT16 usrc = * ACE_reinterpret_cast(const ACE_UINT16*, orig);
- register ACE_UINT16* udst = ACE_reinterpret_cast(ACE_UINT16*, target);
- *udst = (usrc << 8) | (usrc >> 8);
-#endif /* ACE_HAS_PENTIUM */
-}
-
-ACE_INLINE void
-ACE_CDR::swap_4 (const char* orig, char* target)
-{
-#if defined(ACE_HAS_PENTIUM) && defined(__GNUG__)
- // We have ACE_HAS_PENTIUM, so we know the sizeof's.
- register unsigned int j =
- *ACE_reinterpret_cast(const unsigned int*, orig);
- asm ("bswap %1" : "=r" (j) : "0" (j));
- *ACE_reinterpret_cast(unsigned int*, target) = j;
-#elif defined(ACE_HAS_PENTIUM) \
- && (defined(_MSC_VER) || defined(__BORLANDC__)) \
- && !defined(ACE_LACKS_INLINE_ASSEMBLY)
- __asm mov ebx, orig;
- __asm mov ecx, target;
- __asm mov eax, [ebx];
- __asm bswap eax;
- __asm mov [ecx], eax;
-#else
- register ACE_UINT32 x = * ACE_reinterpret_cast(const ACE_UINT32*, orig);
- x = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24);
- * ACE_reinterpret_cast(ACE_UINT32*, target) = x;
-#endif
-}
-
-ACE_INLINE void
-ACE_CDR::swap_8 (const char* orig, char* target)
-{
-#if defined(ACE_HAS_PENTIUM) && defined(__GNUG__)
- register unsigned int i =
- *ACE_reinterpret_cast(const unsigned int*, orig);
- register unsigned int j =
- *ACE_reinterpret_cast(const unsigned int*, orig + 4);
- asm ("bswap %1" : "=r" (i) : "0" (i));
- asm ("bswap %1" : "=r" (j) : "0" (j));
- *ACE_reinterpret_cast(unsigned int*, target + 4) = i;
- *ACE_reinterpret_cast(unsigned int*, target) = j;
-#elif defined(ACE_HAS_PENTIUM) \
- && (defined(_MSC_VER) || defined(__BORLANDC__)) \
- && !defined(ACE_LACKS_INLINE_ASSEMBLY)
- __asm mov ecx, orig;
- __asm mov edx, target;
- __asm mov eax, [ecx];
- __asm mov ebx, 4[ecx];
- __asm bswap eax;
- __asm bswap ebx;
- __asm mov 4[edx], eax;
- __asm mov [edx], ebx;
-#elif ACE_SIZEOF_LONG == 8
- // 64 bit architecture.
- register unsigned long x =
- * ACE_reinterpret_cast(const unsigned long*, orig);
- register unsigned long x84 = (x & 0x000000ff000000ffUL) << 24;
- register unsigned long x73 = (x & 0x0000ff000000ff00UL) << 8;
- register unsigned long x62 = (x & 0x00ff000000ff0000UL) >> 8;
- register unsigned long x51 = (x & 0xff000000ff000000UL) >> 24;
- x = (x84 | x73 | x62 | x51);
- x = (x << 32) | (x >> 32);
- *ACE_reinterpret_cast(unsigned long*, target) = x;
-#else
- register ACE_UINT32 x =
- * ACE_reinterpret_cast(const ACE_UINT32*, orig);
- register ACE_UINT32 y =
- * ACE_reinterpret_cast(const ACE_UINT32*, orig + 4);
- x = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24);
- y = (y << 24) | ((y & 0xff00) << 8) | ((y & 0xff0000) >> 8) | (y >> 24);
- * ACE_reinterpret_cast(ACE_UINT32*, target) = y;
- * ACE_reinterpret_cast(ACE_UINT32*, target + 4) = x;
-#endif
-}
-
-ACE_INLINE void
-ACE_CDR::swap_16 (const char* orig, char* target)
-{
- swap_8 (orig + 8, target);
- swap_8 (orig, target + 8);
-}
-
-ACE_INLINE void
-ACE_CDR::mb_align (ACE_Message_Block *mb)
-{
- char *start = ACE_ptr_align_binary (mb->base (),
- ACE_CDR::MAX_ALIGNMENT);
- mb->rd_ptr (start);
- mb->wr_ptr (start);
-
-#if defined (ACE_HAS_PURIFY)
- // This is a good place to zero the buffer; this is not needed
- // by IIOP, but makes Purify happy.
- if (mb->base () != 0)
- {
- (void) ACE_OS::memset (mb->base (), 0, mb->size ());
- }
-#endif /* ACE_HAS_PURIFY */
-}
-
-ACE_INLINE size_t
-ACE_CDR::first_size (size_t minsize)
-{
- if (minsize == 0)
- return ACE_CDR::DEFAULT_BUFSIZE;
-
- size_t newsize = ACE_CDR::DEFAULT_BUFSIZE;
- while (newsize < minsize)
- {
- if (newsize < ACE_CDR::EXP_GROWTH_MAX)
- {
- // We grow exponentially at the beginning, this is fast and
- // reduces the number of allocations.
- newsize *= 2;
- }
- else
- {
- // but continuing with exponential growth can result in over
- // allocations and easily yield an allocation failure.
- // So we grow linearly when the buffer is too big.
- newsize += ACE_CDR::LINEAR_GROWTH_CHUNK;
- }
- }
- return newsize;
-}
-
-ACE_INLINE size_t
-ACE_CDR::next_size (size_t minsize)
-{
- size_t newsize =
- ACE_CDR::first_size (minsize);
-
- if (newsize == minsize)
- {
- // If necessary increment the size
- if (newsize < ACE_CDR::EXP_GROWTH_MAX)
- newsize *= 2;
- else
- newsize += ACE_CDR::LINEAR_GROWTH_CHUNK;
- }
-
- return newsize;
-}
-
-// ****************************************************************
-
-// implementing the special types
-ACE_INLINE
-ACE_OutputCDR::from_boolean::from_boolean (ACE_CDR::Boolean b)
- : val_ (b)
-{
-}
-
-ACE_INLINE
-ACE_InputCDR::to_boolean::to_boolean (ACE_CDR::Boolean &b)
- : ref_ (b)
-{
-}
-
-ACE_INLINE
-ACE_OutputCDR::from_octet::from_octet (ACE_CDR::Octet o)
- : val_ (o)
-{
-}
-
-ACE_INLINE
-ACE_InputCDR::to_octet::to_octet (ACE_CDR::Octet &o)
- : ref_ (o)
-{
-}
-
-ACE_INLINE
-ACE_OutputCDR::from_char::from_char (ACE_CDR::Char c)
- : val_ (c)
-{
-}
-
-ACE_INLINE
-ACE_InputCDR::to_char::to_char (ACE_CDR::Char &c)
- : ref_ (c)
-{
-}
-
-ACE_INLINE
-ACE_OutputCDR::from_wchar::from_wchar (ACE_CDR::WChar wc)
- : val_ (wc)
-{
-}
-
-ACE_INLINE
-ACE_InputCDR::to_wchar::to_wchar (ACE_CDR::WChar &wc)
- : ref_ (wc)
-{
-}
-
-ACE_INLINE
-ACE_OutputCDR::from_string::from_string (ACE_CDR::Char *s,
- ACE_CDR::ULong b,
- ACE_CDR::Boolean nocopy)
- : val_ (s),
- bound_ (b),
- nocopy_ (nocopy)
-{
-}
-
-ACE_INLINE
-ACE_InputCDR::to_string::to_string (ACE_CDR::Char *&s,
- ACE_CDR::ULong b)
- : val_ (s),
- bound_ (b)
-{
-}
-
-ACE_INLINE
-ACE_OutputCDR::from_wstring::from_wstring (ACE_CDR::WChar *ws,
- ACE_CDR::ULong b,
- ACE_CDR::Boolean nocopy)
- : val_ (ws),
- bound_ (b),
- nocopy_ (nocopy)
-{
-}
-
-ACE_INLINE
-ACE_InputCDR::to_wstring::to_wstring (ACE_CDR::WChar *&ws,
- ACE_CDR::ULong b)
- : val_ (ws),
- bound_ (b)
-{
-}
-
-ACE_INLINE
-ACE_InputCDR::Transfer_Contents::Transfer_Contents (ACE_InputCDR &rhs)
- : rhs_ (rhs)
-{
-}
-
-// ****************************************************************
-
-ACE_INLINE
-ACE_OutputCDR::~ACE_OutputCDR (void)
-{
- if (this->start_.cont () != 0)
- {
- ACE_Message_Block::release (this->start_.cont ());
- this->start_.cont (0);
- }
- this->current_ = 0;
-}
-
-ACE_INLINE void
-ACE_OutputCDR::reset (void)
-{
- this->current_ = &this->start_;
- this->current_is_writable_ = 1;
- ACE_CDR::mb_align (&this->start_);
- this->current_alignment_ = 0;
-
- // It is tempting not to remove the memory, but we need to do so to
- // release any potential user buffers chained in the continuation
- // field.
- ACE_Message_Block *cont = this->start_.cont ();
- if (cont != 0)
- {
- ACE_Message_Block::release (cont);
- this->start_.cont (0);
- }
-
-}
-
-// Decode the CDR stream.
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_octet (ACE_CDR::Octet x)
-{
- return this->write_1 (ACE_reinterpret_cast (const ACE_CDR::Octet*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_boolean (ACE_CDR::Boolean x)
-{
- return (ACE_CDR::Boolean) this->write_octet (x ? 1 : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_char (ACE_CDR::Char x)
-{
- if (this->char_translator_ == 0)
- return this->write_1 (ACE_reinterpret_cast (const ACE_CDR::Octet*, &x));
- return this->char_translator_->write_char (*this, x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_wchar (ACE_CDR::WChar x)
-{
- if (this->wchar_translator_ == 0)
- return this->write_2 (ACE_reinterpret_cast (const ACE_CDR::UShort*, &x));
- return this->wchar_translator_->write_wchar (*this, x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_short (ACE_CDR::Short x)
-{
- return this->write_2 (ACE_reinterpret_cast (const ACE_CDR::UShort*, &x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_ushort (ACE_CDR::UShort x)
-{
- return this->write_2 (ACE_reinterpret_cast (const ACE_CDR::UShort*, &x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_long (ACE_CDR::Long x)
-{
- return this->write_4 (ACE_reinterpret_cast (const ACE_CDR::ULong*, &x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_ulong (ACE_CDR::ULong x)
-{
- return this->write_4 (ACE_reinterpret_cast (const ACE_CDR::ULong*, &x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_longlong (const ACE_CDR::LongLong &x)
-{
- return this->write_8 (ACE_reinterpret_cast (const ACE_CDR::ULongLong*, &x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_ulonglong (const ACE_CDR::ULongLong &x)
-{
- return this->write_8 (ACE_reinterpret_cast (const ACE_CDR::ULongLong*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_float (ACE_CDR::Float x)
-{
- return this->write_4 (ACE_reinterpret_cast (const ACE_CDR::ULong*, &x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_double (const ACE_CDR::Double &x)
-{
- return this->write_8 (ACE_reinterpret_cast (const ACE_CDR::ULongLong*, &x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_longdouble (const ACE_CDR::LongDouble &x)
-{
- return this->write_16 (ACE_reinterpret_cast (const ACE_CDR::LongDouble*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_string (const ACE_CDR::Char *x)
-{
- if (x != 0)
- return this->write_string (ACE_OS::strlen(x), x);
- return this->write_string (0, 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_string (const ACE_CString &x)
-{
- return this->write_string (x.length(), x.c_str());
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_wstring (const ACE_CDR::WChar *x)
-{
- if (x != 0)
- return this->write_wstring (ACE_OS::wslen (x), x);
- return this->write_wstring (0, 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_char_array (const ACE_CDR::Char *x,
- ACE_CDR::ULong length)
-{
- if (this->char_translator_ == 0)
- return this->write_array (x,
- ACE_CDR::OCTET_SIZE,
- ACE_CDR::OCTET_ALIGN,
- length);
- return this->char_translator_->write_char_array (*this, x, length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_wchar_array (const ACE_CDR::WChar* x,
- ACE_CDR::ULong length)
-{
- if (this->wchar_translator_ == 0)
- return this->write_array (x,
- ACE_CDR::SHORT_SIZE,
- ACE_CDR::SHORT_ALIGN,
- length);
- return this->wchar_translator_->write_wchar_array (*this, x, length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_octet_array (const ACE_CDR::Octet* x,
- ACE_CDR::ULong length)
-{
- return this->write_array (x,
- ACE_CDR::OCTET_SIZE,
- ACE_CDR::OCTET_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_short_array (const ACE_CDR::Short *x,
- ACE_CDR::ULong length)
-{
- return this->write_array (x,
- ACE_CDR::SHORT_SIZE,
- ACE_CDR::SHORT_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_ushort_array (const ACE_CDR::UShort *x,
- ACE_CDR::ULong length)
-{
- return this->write_array (x,
- ACE_CDR::SHORT_SIZE,
- ACE_CDR::SHORT_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_long_array (const ACE_CDR::Long *x,
- ACE_CDR::ULong length)
-{
- return this->write_array (x,
- ACE_CDR::LONG_SIZE,
- ACE_CDR::LONG_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_ulong_array (const ACE_CDR::ULong *x,
- ACE_CDR::ULong length)
-{
- return this->write_array (x,
- ACE_CDR::LONG_SIZE,
- ACE_CDR::LONG_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_longlong_array (const ACE_CDR::LongLong *x,
- ACE_CDR::ULong length)
-{
- return this->write_array (x,
- ACE_CDR::LONGLONG_SIZE,
- ACE_CDR::LONGLONG_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_ulonglong_array (const ACE_CDR::ULongLong *x,
- ACE_CDR::ULong length)
-{
- return this->write_array (x,
- ACE_CDR::LONGLONG_SIZE,
- ACE_CDR::LONGLONG_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_float_array (const ACE_CDR::Float *x,
- ACE_CDR::ULong length)
-{
- return this->write_array (x,
- ACE_CDR::LONG_SIZE,
- ACE_CDR::LONG_ALIGN,
- length);
-}
-
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_double_array (const ACE_CDR::Double *x,
- ACE_CDR::ULong length)
-{
- return this->write_array (x,
- ACE_CDR::LONGLONG_SIZE,
- ACE_CDR::LONGLONG_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::write_longdouble_array (const ACE_CDR::LongDouble* x,
- ACE_CDR::ULong length)
-{
- return this->write_array (x,
- ACE_CDR::LONGDOUBLE_SIZE,
- ACE_CDR::LONGDOUBLE_ALIGN,
- length);
-}
-
-ACE_INLINE int
-ACE_OutputCDR::good_bit (void) const
-{
- return this->good_bit_;
-}
-
-ACE_INLINE int
-ACE_OutputCDR::adjust (size_t size,
- size_t align,
- char*& buf)
-{
- if (!this->current_is_writable_)
- return this->grow_and_adjust (size, align, buf);
-
- size_t offset =
- ACE_align_binary (this->current_alignment_, align)
- - this->current_alignment_;
-
- buf = this->current_->wr_ptr () + offset;
- char *end = buf + size;
-
- if (end <= this->current_->end ())
- {
- this->current_alignment_ += offset + size;
- this->current_->wr_ptr (end);
- return 0;
- }
-
- return this->grow_and_adjust (size, align, buf);
-}
-
-ACE_INLINE int
-ACE_OutputCDR::adjust (size_t size, char*& buf)
-{
- return this->adjust (size, size, buf);
-}
-
-ACE_INLINE const ACE_Message_Block*
-ACE_OutputCDR::begin (void) const
-{
- return &this->start_;
-}
-
-ACE_INLINE const ACE_Message_Block*
-ACE_OutputCDR::end (void) const
-{
- return this->current_->cont ();
-}
-
-ACE_INLINE const ACE_Message_Block*
-ACE_OutputCDR::current (void) const
-{
- return this->current_;
-}
-
-ACE_INLINE size_t
-ACE_OutputCDR::total_length (void) const
-{
- return ACE_CDR::total_length (this->begin (), this->end ());
-}
-
-ACE_INLINE const char*
-ACE_OutputCDR::buffer (void) const
-{
- return this->start_.rd_ptr ();
-}
-
-ACE_INLINE size_t
-ACE_OutputCDR::length (void) const
-{
- return this->start_.length ();
-}
-
-ACE_INLINE int
-ACE_OutputCDR::do_byte_swap (void) const
-{
- return this->do_byte_swap_;
-}
-
-ACE_INLINE size_t
-ACE_OutputCDR::current_alignment (void) const
-{
- return this->current_alignment_;
-}
-
-ACE_INLINE int
-ACE_OutputCDR::align_write_ptr (size_t alignment)
-{
- char *dummy;
- return this->grow_and_adjust (0, alignment, dummy);
-}
-
-ACE_INLINE ACE_Char_Codeset_Translator *
-ACE_OutputCDR::char_translator (void) const
-{
- return this->char_translator_;
-}
-
-ACE_INLINE ACE_WChar_Codeset_Translator *
-ACE_OutputCDR::wchar_translator (void) const
-{
- return this->wchar_translator_;
-}
-
-// ****************************************************************
-
-ACE_INLINE
-ACE_InputCDR::~ACE_InputCDR (void)
-{
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_octet (ACE_CDR::Octet& x)
-{
- return this->read_1 (&x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_boolean (ACE_CDR::Boolean& x)
-{
- ACE_CDR::Octet tmp;
- this->read_octet (tmp);
- x = tmp ? 1 : 0;
- return (ACE_CDR::Boolean) this->good_bit_;
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_char (ACE_CDR::Char &x)
-{
- if (this->char_translator_ == 0)
- return this->read_1 (ACE_reinterpret_cast (ACE_CDR::Octet*, &x));
- return this->char_translator_->read_char (*this, x);
-}
-
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_wchar (ACE_CDR::WChar& x)
-{
- if (this->wchar_translator_ == 0)
- return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*,&x));
- return this->wchar_translator_->read_wchar (*this, x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_short (ACE_CDR::Short &x)
-{
- return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*, &x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_ushort (ACE_CDR::UShort &x)
-{
- return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*, &x));
-}
-
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_long (ACE_CDR::Long &x)
-{
- return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*, &x));
-}
-
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_ulong (ACE_CDR::ULong &x)
-{
- return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*, &x));
-}
-
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_longlong (ACE_CDR::LongLong &x)
-{
- return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*, &x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_ulonglong (ACE_CDR::ULongLong &x)
-{
- return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_float (ACE_CDR::Float &x)
-{
- return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*, &x));
-}
-
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_double (ACE_CDR::Double &x)
-{
- return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*, &x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_longdouble (ACE_CDR::LongDouble &x)
-{
- return this->read_16 (ACE_reinterpret_cast (ACE_CDR::LongDouble*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_char_array (ACE_CDR::Char* x,
- ACE_CDR::ULong length)
-{
- if (this->char_translator_ == 0)
- return this->read_array (x,
- ACE_CDR::OCTET_SIZE,
- ACE_CDR::OCTET_ALIGN,
- length);
- return this->char_translator_->read_char_array (*this, x, length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_wchar_array (ACE_CDR::WChar* x,
- ACE_CDR::ULong length)
-{
- if (this->wchar_translator_ == 0)
- return this->read_array (x,
- ACE_CDR::SHORT_SIZE,
- ACE_CDR::SHORT_ALIGN,
- length);
- return this->wchar_translator_->read_wchar_array (*this, x, length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_octet_array (ACE_CDR::Octet* x,
- ACE_CDR::ULong length)
-{
- return this->read_array (x,
- ACE_CDR::OCTET_SIZE,
- ACE_CDR::OCTET_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_short_array (ACE_CDR::Short *x,
- ACE_CDR::ULong length)
-{
- return this->read_array (x,
- ACE_CDR::SHORT_SIZE,
- ACE_CDR::SHORT_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_ushort_array (ACE_CDR::UShort *x,
- ACE_CDR::ULong length)
-{
- return this->read_array (x,
- ACE_CDR::SHORT_SIZE,
- ACE_CDR::SHORT_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_long_array (ACE_CDR::Long *x,
- ACE_CDR::ULong length)
-{
- return this->read_array (x,
- ACE_CDR::LONG_SIZE,
- ACE_CDR::LONG_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_ulong_array (ACE_CDR::ULong *x,
- ACE_CDR::ULong length)
-{
- return this->read_array (x,
- ACE_CDR::LONG_SIZE,
- ACE_CDR::LONG_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_longlong_array (ACE_CDR::LongLong *x,
- ACE_CDR::ULong length)
-{
- return this->read_array (x,
- ACE_CDR::LONGLONG_SIZE,
- ACE_CDR::LONGLONG_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_ulonglong_array (ACE_CDR::ULongLong *x,
- ACE_CDR::ULong length)
-{
- return this->read_array (x,
- ACE_CDR::LONGLONG_SIZE,
- ACE_CDR::LONGLONG_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_float_array (ACE_CDR::Float *x,
- ACE_CDR::ULong length)
-{
- return this->read_array (x,
- ACE_CDR::LONG_SIZE,
- ACE_CDR::LONG_ALIGN,
- length);
-}
-
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_double_array (ACE_CDR::Double *x,
- ACE_CDR::ULong length)
-{
- return this->read_array (x,
- ACE_CDR::LONGLONG_SIZE,
- ACE_CDR::LONGLONG_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::read_longdouble_array (ACE_CDR::LongDouble* x,
- ACE_CDR::ULong length)
-{
- return this->read_array (x,
- ACE_CDR::LONGDOUBLE_SIZE,
- ACE_CDR::LONGDOUBLE_ALIGN,
- length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_char (void)
-{
- ACE_CDR::Char x;
- return this->read_1 (ACE_reinterpret_cast (ACE_CDR::Octet*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_wchar (void)
-{
- ACE_CDR::WChar x;
- return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_octet (void)
-{
- ACE_CDR::Octet x;
- return this->read_1 (&x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_boolean (void)
-{
- ACE_CDR::Octet tmp;
- this->read_octet (tmp);
- return this->good_bit_;
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_short (void)
-{
- ACE_CDR::Short x;
- return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_ushort (void)
-{
- ACE_CDR::UShort x;
- return this->read_2 (ACE_reinterpret_cast (ACE_CDR::UShort*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_long (void)
-{
- ACE_CDR::Long x;
- return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_ulong (void)
-{
- ACE_CDR::ULong x;
- return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_longlong (void)
-{
- ACE_CDR::LongLong x;
- return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_ulonglong (void)
-{
- ACE_CDR::ULongLong x;
- return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_float (void)
-{
- float x;
- return this->read_4 (ACE_reinterpret_cast (ACE_CDR::ULong*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_double (void)
-{
- double x;
- return this->read_8 (ACE_reinterpret_cast (ACE_CDR::ULongLong*,&x));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_InputCDR::skip_longdouble (void)
-{
- ACE_CDR::LongDouble x;
- return this->read_16 (ACE_reinterpret_cast (ACE_CDR::LongDouble*,&x));
-}
-
-ACE_INLINE char*
-ACE_InputCDR::end (void)
-{
- return this->start_.end ();
-}
-
-ACE_INLINE void
-ACE_InputCDR::rd_ptr (size_t offset)
-{
- this->start_.rd_ptr (offset);
-}
-
-ACE_INLINE char*
-ACE_InputCDR::rd_ptr (void)
-{
- return this->start_.rd_ptr ();
-}
-
-ACE_INLINE int
-ACE_InputCDR::adjust (size_t size,
- size_t align,
- char*& buf)
-{
- buf = ACE_ptr_align_binary (this->rd_ptr (), align);
- char *end = buf + size;
- if (end <= this->end ())
- {
- this->start_.rd_ptr (end);
- return 0;
- }
-
- this->good_bit_ = 0;
- return -1;
-}
-
-ACE_INLINE int
-ACE_InputCDR::adjust (size_t size,
- char*& buf)
-{
- return this->adjust (size, size, buf);
-}
-
-ACE_INLINE size_t
-ACE_InputCDR::length (void) const
-{
- return this->start_.length ();
-}
-
-ACE_INLINE const ACE_Message_Block*
-ACE_InputCDR::start (void) const
-{
- return &this->start_;
-}
-
-ACE_INLINE int
-ACE_InputCDR::good_bit (void) const
-{
- return this->good_bit_;
-}
-
-// ****************************************************************
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_CDR::Char x)
-{
- os.write_char (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_CDR::Short x)
-{
- os.write_short (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_CDR::UShort x)
-{
- os.write_ushort (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_CDR::Long x)
-{
- os.write_long (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_CDR::ULong x)
-{
- os.write_ulong (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_CDR::LongLong x)
-{
- os.write_longlong (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_CDR::ULongLong x)
-{
- os.write_ulonglong (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_CDR::LongDouble x)
-{
- os.write_longdouble (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_CDR::Float x)
-{
- os.write_float (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_CDR::Double x)
-{
- os.write_double (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, const ACE_CDR::Char *x)
-{
- os.write_string (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, const ACE_CDR::WChar *x)
-{
- os.write_wstring (x);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, const ACE_CString &x)
-{
- os.write_string (x);
- return os.good_bit ();
-}
-
-// The following use the helper classes
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_boolean x)
-{
- os.write_boolean (x.val_);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_char x)
-{
- os.write_char (x.val_);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_wchar x)
-{
- os.write_wchar (x.val_);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_octet x)
-{
- os.write_octet (x.val_);
- return os.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_string x)
-{
- ACE_CDR::ULong len = 0;
- if (x.val_ != 0)
- len = ACE_OS::strlen (x.val_);
- os.write_string (len, x.val_);
- return os.good_bit () && (len <= x.bound_);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_wstring x)
-{
- ACE_CDR::ULong len = 0;;
- if (x.val_ != 0)
- len = ACE_OS::wslen (x.val_);
- os.write_wstring (len, x.val_);
- return os.good_bit () && (len <= x.bound_);
-}
-
-// ****************************************************************
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_CDR::Char &x)
-{
- is.read_char (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_CDR::Short &x)
-{
- is.read_short (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_CDR::UShort &x)
-{
- is.read_ushort (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>>(ACE_InputCDR &is, ACE_CDR::Long &x)
-{
- is.read_long (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_CDR::ULong &x)
-{
- is.read_ulong (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR& is, ACE_CDR::LongLong &x)
-{
- is.read_longlong (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR& is, ACE_CDR::ULongLong &x)
-{
- is.read_ulonglong (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR& is, ACE_CDR::LongDouble &x)
-{
- is.read_longdouble (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_CDR::Float &x)
-{
- is.read_float (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_CDR::Double &x)
-{
- is.read_double (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_CDR::Char *&x)
-{
- is.read_string (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_CDR::WChar *&x)
-{
- is.read_wstring (x);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_CString &x)
-{
- is.read_string (x);
- return is.good_bit ();
-}
-
-// The following use the helper classes
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_InputCDR::to_boolean x)
-{
- is.read_boolean (x.ref_);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_InputCDR::to_char x)
-{
- is.read_char (x.ref_);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_InputCDR::to_wchar x)
-{
- is.read_wchar (x.ref_);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_InputCDR::to_octet x)
-{
- is.read_octet (x.ref_);
- return is.good_bit ();
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_InputCDR::to_string x)
-{
- is.read_string (x.val_);
- // check if the bounds are satisfied
- return (is.good_bit () &&
- (ACE_OS::strlen (x.val_) <= x.bound_));
-}
-
-ACE_INLINE ACE_CDR::Boolean
-operator>> (ACE_InputCDR &is, ACE_InputCDR::to_wstring x)
-{
- is.read_wstring (x.val_);
- // check if the bounds are satisfied
- return (is.good_bit () &&
- (ACE_OS::wslen (x.val_) <= x.bound_));
-}
-
-// ***************************************************************************
-// We must define these methods here because they use the "read_*" inlined
-// methods of the ACE_InputCDR class
-// ***************************************************************************
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_boolean (ACE_InputCDR &stream)
-{
- ACE_CDR::Boolean x;
- return (stream.read_boolean (x) ? this->write_boolean (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_char (ACE_InputCDR &stream)
-{
- ACE_CDR::Char x;
- return (stream.read_char (x) ? this->write_char (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_wchar (ACE_InputCDR &stream)
-{
- ACE_CDR::WChar x;
- return (stream.read_wchar (x) ? this->write_wchar (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_octet (ACE_InputCDR &stream)
-{
- ACE_CDR::Octet x;
- return (stream.read_octet (x) ? this->write_octet (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_short (ACE_InputCDR &stream)
-{
- ACE_CDR::Short x;
- return (stream.read_short (x) ? this->write_short (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_ushort (ACE_InputCDR &stream)
-{
- ACE_CDR::UShort x;
- return (stream.read_ushort (x) ? this->write_ushort (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_long (ACE_InputCDR &stream)
-{
- ACE_CDR::Long x;
- return (stream.read_long (x) ? this->write_long (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_ulong (ACE_InputCDR &stream)
-{
- ACE_CDR::ULong x;
- return (stream.read_ulong (x) ? this->write_ulong (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_longlong (ACE_InputCDR &stream)
-{
- ACE_CDR::LongLong x;
- return (stream.read_longlong (x) ? this->write_longlong (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_ulonglong (ACE_InputCDR &stream)
-{
- ACE_CDR::ULongLong x;
- return (stream.read_ulonglong (x) ? this->write_ulonglong (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_float (ACE_InputCDR &stream)
-{
- ACE_CDR::Float x;
- return (stream.read_float (x) ? this->write_float (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_double (ACE_InputCDR &stream)
-{
- ACE_CDR::Double x;
- return (stream.read_double (x) ? this->write_double (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_longdouble (ACE_InputCDR &stream)
-{
- ACE_CDR::LongDouble x;
- return (stream.read_longdouble (x) ? this->write_longdouble (x) : 0);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_string (ACE_InputCDR &stream)
-{
- ACE_CDR::Char *x;
- ACE_CDR::Boolean flag =
- (stream.read_string (x) ? this->write_string (x) : 0);
- delete [] x;
- return flag;
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_OutputCDR::append_wstring (ACE_InputCDR &stream)
-{
- ACE_CDR::WChar *x;
- ACE_CDR::Boolean flag =
- (stream.read_wstring (x) ? this->write_wstring (x) : 0);
- delete [] x;
- return flag;
-}
-
-ACE_INLINE void
-ACE_InputCDR::reset_byte_order (int byte_order)
-{
- this->do_byte_swap_ = (byte_order != ACE_CDR_BYTE_ORDER);
-}
-
-ACE_INLINE int
-ACE_InputCDR::do_byte_swap (void) const
-{
- return this->do_byte_swap_;
-}
-
-ACE_INLINE int
-ACE_InputCDR::byte_order (void) const
-{
- if (this->do_byte_swap ())
- return !ACE_CDR_BYTE_ORDER;
- else
- return ACE_CDR_BYTE_ORDER;
-}
-
-ACE_INLINE int
-ACE_InputCDR::align_read_ptr (size_t alignment)
-{
- char *buf = ACE_ptr_align_binary (this->rd_ptr (),
- alignment);
-
- if (buf <= this->end ())
- {
- this->start_.rd_ptr (buf);
- return 0;
- }
-
- this->good_bit_ = 0;
- return -1;
-}
-
-ACE_INLINE ACE_Char_Codeset_Translator *
-ACE_InputCDR::char_translator (void) const
-{
- return this->char_translator_;
-}
-
-ACE_INLINE ACE_WChar_Codeset_Translator *
-ACE_InputCDR::wchar_translator (void) const
-{
- return this->wchar_translator_;
-}
-
-// ****************************************************************
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_Char_Codeset_Translator::read_1 (ACE_InputCDR& input,
- ACE_CDR::Octet *x)
-{
- return input.read_1 (x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_Char_Codeset_Translator::write_1 (ACE_OutputCDR& output,
- const ACE_CDR::Octet *x)
-{
- return output.write_1 (x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_Char_Codeset_Translator::read_array (ACE_InputCDR& in,
- void* x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length)
-{
- return in.read_array (x, size, align, length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_Char_Codeset_Translator::write_array (ACE_OutputCDR& out,
- const void *x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length)
-{
- return out.write_array(x, size, align, length);
-}
-
-ACE_INLINE int
-ACE_Char_Codeset_Translator::adjust (ACE_OutputCDR& out,
- size_t size,
- size_t align,
- char *&buf)
-{
- return out.adjust(size, align, buf);
-}
-
-ACE_INLINE void
-ACE_Char_Codeset_Translator::good_bit (ACE_OutputCDR& out, int bit)
-{
- out.good_bit_ = bit;
-}
-
-// ****************************************************************
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_WChar_Codeset_Translator::read_1 (ACE_InputCDR& input,
- ACE_CDR::Octet *x)
-{
- return input.read_1 (x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_WChar_Codeset_Translator::read_2 (ACE_InputCDR& input,
- ACE_CDR::UShort *x)
-{
- return input.read_2 (x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_WChar_Codeset_Translator::read_4 (ACE_InputCDR& input,
- ACE_CDR::ULong *x)
-{
- return input.read_4 (x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_WChar_Codeset_Translator::write_1 (ACE_OutputCDR& output,
- const ACE_CDR::Octet *x)
-{
- return output.write_1 (x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_WChar_Codeset_Translator::write_2 (ACE_OutputCDR& output,
- const ACE_CDR::UShort *x)
-{
- return output.write_2 (x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_WChar_Codeset_Translator::write_4 (ACE_OutputCDR& output,
- const ACE_CDR::ULong *x)
-{
- return output.write_4 (x);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_WChar_Codeset_Translator::read_array (ACE_InputCDR& in,
- void* x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length)
-{
- return in.read_array (x, size, align, length);
-}
-
-ACE_INLINE ACE_CDR::Boolean
-ACE_WChar_Codeset_Translator::write_array (ACE_OutputCDR& out,
- const void *x,
- size_t size,
- size_t align,
- ACE_CDR::ULong length)
-{
- return out.write_array(x, size, align, length);
-}
-
-ACE_INLINE int
-ACE_WChar_Codeset_Translator::adjust (ACE_OutputCDR& out,
- size_t size,
- size_t align,
- char *&buf)
-{
- return out.adjust(size, align, buf);
-}
-
-ACE_INLINE void
-ACE_WChar_Codeset_Translator::good_bit (ACE_OutputCDR& out, int bit)
-{
- out.good_bit_ = bit;
-}
diff --git a/ace/CLASSIX/CLASSIX_Addr.cpp b/ace/CLASSIX/CLASSIX_Addr.cpp
deleted file mode 100644
index faafc29109d..00000000000
--- a/ace/CLASSIX/CLASSIX_Addr.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Defines the ClassiX IPC address family address format.
-
-#define ACE_BUILD_DLL
-#include "ace/CLASSIX/CLASSIX_Addr.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_CLASSIX_Addr)
diff --git a/ace/CLASSIX/CLASSIX_Addr.h b/ace/CLASSIX/CLASSIX_Addr.h
deleted file mode 100644
index 21089659649..00000000000
--- a/ace/CLASSIX/CLASSIX_Addr.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// CLASSIX_Addr.h
-//
-// = AUTHOR
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_ADDR_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_ADDR_H
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Addr.h"
-
-#include <ipc/chIpc.h>
-#include <ace/CLASSIX/CLASSIX_OS.h>
-
-class ACE_Export ACE_CLASSIX_Addr : public ACE_Addr
-{
- // = TITLE
- // Defines the ClassiX IPC address format.
- //
- // = DESCRIPTION
- // This class defines basic interfaces for "ACE-like" address for
- // Chorus port.
-public:
- enum
- {
- ACE_CLASSIX_ADDR_UNKNOWN = ACE_INVALID_HANDLE, /* K_NONEPORT */
- ACE_CLASSIX_ADDR_DEFAULT = K_DEFAULTPORT,
- AF_CLASSIX = AF_MAX + 1
- };
-
- enum Addr_Type
- {
- PORT, // use Peer_Port
- GROUP, // use Peer_Group
- STAMP, // use peer_Stamp
- DYNAMIC, // use Peer_Group
- UNDEFINED
- };
-
-
- /* -----------------------------------------------------*/
- // = INITIALIZATION
- ACE_CLASSIX_Addr(int /* size of the underlying address structure*/);
- virtual ~ACE_CLASSIX_Addr (void);
-
-
- /* -----------------------------------------------------*/
- // = Direct initialization methods (useful after the object has been
- // constructed).
- // Returns 0 on success, -1 otherwise.
- //
-
- /* -----------------------------------------------------*/
- // = ACCESS
- //
- virtual const KnUniqueId& get_id (void) const;
- // Returns a reference to the unique identifier
-
- virtual ACE_HANDLE get_port_number(void) const;
- virtual ACE_HANDLE get_handle(void) const;
- // Returns the local port no( can be used as an ACE_HANDLE)
-
- virtual int is_configured(void) const;
- // Returns 1, if address information is proper; Returns 0 otherwise
- virtual ACE_CLASSIX_Addr::Addr_Type is_type(void) const;
- // returns the type of the address
-
- // = HELPER
- virtual void dump(void) const;
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declares the dynamic allocation hooks.
-
-private:
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_ADDR_H */
diff --git a/ace/CLASSIX/CLASSIX_Addr.i b/ace/CLASSIX/CLASSIX_Addr.i
deleted file mode 100644
index 13cc5fd48e3..00000000000
--- a/ace/CLASSIX/CLASSIX_Addr.i
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// CLASSIX_Addr.i
-
-ACE_INLINE
-ACE_CLASSIX_Addr::ACE_CLASSIX_Addr(int theSize)
- : ACE_Addr (AF_CLASSIX, theSize)
-{
-}
-
-ACE_INLINE
-ACE_CLASSIX_Addr::~ACE_CLASSIX_Addr(void)
-{
-}
-
-ACE_INLINE
-const KnUniqueId&
-ACE_CLASSIX_Addr::get_id(void) const
-{
- return ACE_CLASSIX_OS::null_KnUniqueId();
-}
-
-ACE_INLINE
-ACE_HANDLE
-ACE_CLASSIX_Addr::get_handle(void) const
-{
- return ACE_INVALID_HANDLE;
-}
-
-ACE_INLINE
-ACE_HANDLE
-ACE_CLASSIX_Addr::get_port_number(void) const
-{
- return get_handle();
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Addr::is_configured(void) const
-{
- return 0;
-}
-
-ACE_INLINE
-ACE_CLASSIX_Addr::Addr_Type
-ACE_CLASSIX_Addr::is_type(void) const
-{
- return ACE_CLASSIX_Addr::UNDEFINED;
-}
-
-ACE_INLINE
-void
-ACE_CLASSIX_Addr::dump(void) const
-{
-}
diff --git a/ace/CLASSIX/CLASSIX_CLD_Connector.cpp b/ace/CLASSIX/CLASSIX_CLD_Connector.cpp
deleted file mode 100644
index 1baf897b75b..00000000000
--- a/ace/CLASSIX/CLASSIX_CLD_Connector.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-// $Id$
-/*
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_CLD_Connector.cpp
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-//
-// ============================================================================
-*/
-#define ACE_BUILD_DLL
-#include "ace/CLASSIX/CLASSIX_CLD_Connector.h"
-#include "ace/CLASSIX/CLASSIX_Addr.h"
-
-ACE_ALLOC_HOOK_DEFINE(ACE_CLASSIX_CLD_Connector)
-
-#if !defined (__ACE_INLINE__)
-#include "CLASSIX_CLD_Connector.i"
-#endif /* __ACE_INLINE__ */
-/* ------------------------------------------------------------------------- */
-
-ACE_CLASSIX_CLD_Connector::ACE_CLASSIX_CLD_Connector (
- ACE_CLASSIX_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_CLASSIX_CLD_Connector::ACE_CLASSIX_CLD_Connector");
- if (this->connect (new_stream, remote_sap, timeout, local_sap,
- reuse_addr, flags, perms,
- protocol_family, protocol) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"), ACE_TEXT
- ("ACE_CLASSIX_CLD_Connector::ACE_CLASSIX_CLD_Connector")));
-}
-
-// Set up remote port information
-int
-ACE_CLASSIX_CLD_Connector::connect (ACE_CLASSIX_Stream &new_stream,
- const ACE_Addr & theRemote,/* remote_sap */
- ACE_Time_Value *, /* timeout */
- const ACE_Addr & theLocal,
- int, /* reuse_addr */
- int theFlag, /* flags */
- int, /* perms */
- int theProtocolFamily,
- int /* protocol */)
-
-{
- ACE_TRACE ("ACE_CLASSIX_CLD_Connector::connect");
- //
- // Set up peer SAP
- //
- if (theRemote == ACE_Addr::sap_any ||
- new_stream.set_peer_sap(theRemote) != 0)
- ACE_ERROR_RETURN((LM_ERROR, "ACE_CLASSIX_CLD_Connector::connect()::"
- "Invalid Connector SAP\n"), -1);
-
- //
- // Set up local SAP
- //
- if (theLocal == ACE_Addr::sap_any)
- {
- // if local sap has not been configured
- // create a port and use it as the local SAP
- new_stream.open();
- }
- else
- {
- // replace the local SAP information
- new_stream.close();
- new_stream.open(theLocal);
- }
-
- //
- // Make the local SAP "selectable", if requested via the flag
- //
- if (new_stream.local_sap().is_configured() &&
- new_stream.peer_sap().is_configured() && /* remote sap info exist */
- theProtocolFamily == ACE_CLASSIX_Addr::AF_CLASSIX)
- {
- new_stream.control();
- // setup the default delivery mode, if applicable
- if (theFlag & ACE_CLASSIX_CLD_Connector::ENABLE)
- {
- if (new_stream.selectable() == 0)
- return 0;
- else
- return -1;
- }
- return 0;
- }
- else
- {
- return -1;
- }
-}
-
-void
-ACE_CLASSIX_CLD_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_CLASSIX_CLD_Connector::dump");
-}
-
-/* ------------------------------------------------------------------------- */
diff --git a/ace/CLASSIX/CLASSIX_CLD_Connector.h b/ace/CLASSIX/CLASSIX_CLD_Connector.h
deleted file mode 100644
index 324d484e65e..00000000000
--- a/ace/CLASSIX/CLASSIX_CLD_Connector.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-/*
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_CLD_Connector.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-*/
-
-#ifndef ACE_CLASSIX_CLD_CONNECTOR_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_CLD_CONNECTOR_H
-
-#include "ace/CLASSIX/CLASSIX_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/* ------------------------------------------------------------------------- */
-
-class ACE_CLASSIX_CLD_Connector
- // = TITLE
- // Defines an CLASSIX IPC connectionless connection factory for the
- // template methods in <ACE_Connector>.
- //
- // = DESCRIPTION
- // This is used when a client needs to communicate with a server
- // whose SAP address is known beforehand.
- //
- // Although there is a connection
- // procedure, no connection is actually taken place
- // between the client and server, since Chorus IPC does not have
- // connection semantics.
- // The connect procedure is necessary for
- // compatibility with <ACE_SOCK_Connector> class.
- //
- // This class will simplify the client's
- // program, since it provides connection-like communication
- // mechanism.
- //
- // = NOTES
- // The server in this case trusts everyone who lands on the
- // server's SAP.
- //
- // = SEE ALSO
- // ACE_CLASSIX_COD_Connector
-{
- public:
- // = Connect options
- enum OPTIONS
- {
- // Do not enable the local SAP
- // (so that the Reactor will not monitor the port)
- ENABLE = 0x1
- };
-
- // = Initialization routines.
- ACE_CLASSIX_CLD_Connector (void);
- // Default constructor.
-
- ACE_CLASSIX_CLD_Connector (ACE_CLASSIX_Stream &new_stream,
- const ACE_Addr &remote_sap
- = ACE_Addr::sap_any,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol_family
- = ACE_CLASSIX_Addr::AF_CLASSIX,
- int protocol = 0);
- // Emulates connection semantics so that it can be plugged into
- // <ACE_Connector>
- // Actively connect local SAP and remote SAP togeter.
- // Produce a <new_stream> if things go well.
- //
- // <remote_sap> is the peer's address. In ACE_SOCK_Connector it refers to
- // the acceptor's address. In connectionless mode, we do not have
- // an acceptor. The <remote_sap> address will be copied to the new stream
- // if things goes well.
- //
- // If <local_sap> refers to any address, a port will be
- // allocated and will be used as a local SAP.
- //
- // The rest parameters are there so that this class can be plugged into
- // <ACE_Connector>.
-
- virtual int connect (ACE_CLASSIX_Stream &new_stream,
- const ACE_Addr &remote_sap = ACE_Addr::sap_any,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol_family = ACE_CLASSIX_Addr::AF_CLASSIX,
- int protocol = 0);
-
- // Factory method used in <ACE_Connector>::connect_svc_handler()
-
- // Initialization method when default constructor is used.
- // See the comments for the corresponding constructor
-
- virtual int reset_new_handle (ACE_HANDLE handle);
- // Factory method used in ACE_Connector::handle_output().
- // Meant for resetting any event associations on this handle
- // Does nothig.
-
- // = HELPER
- void dump(void) const;
-
- private:
-
- ACE_CLASSIX_CLD_Connector(ACE_CLASSIX_CLD_Connector const&);
- ACE_CLASSIX_CLD_Connector const& operator=(ACE_CLASSIX_CLD_Connector const&);
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_CLD_Connector.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_CLD_CONNECTOR_H */
diff --git a/ace/CLASSIX/CLASSIX_CLD_Connector.i b/ace/CLASSIX/CLASSIX_CLD_Connector.i
deleted file mode 100644
index 8592b7825d2..00000000000
--- a/ace/CLASSIX/CLASSIX_CLD_Connector.i
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// CLASSIX/CLD_Connector.i
-/* ------------------------------------------------------------------------- */
-
-// Do-nothing constructor...
-
-ACE_INLINE
-ACE_CLASSIX_CLD_Connector::ACE_CLASSIX_CLD_Connector (void)
-{
- ACE_TRACE ("ACE_CLASSIX_CLD_Connector::ACE_CLASSIX_CLD_Connector");
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_CLD_Connector::reset_new_handle (ACE_HANDLE /* handle */)
-{
- return 0;
-}
-
-/* ------------------------------------------------------------------------- */
-
-
diff --git a/ace/CLASSIX/CLASSIX_CO_Acceptor.cpp b/ace/CLASSIX/CLASSIX_CO_Acceptor.cpp
deleted file mode 100644
index b46d594c262..00000000000
--- a/ace/CLASSIX/CLASSIX_CO_Acceptor.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "CLASSIX_CO_Acceptor.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "CLASSIX_CO_Acceptor.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/Synch.h"
-
-ACE_ALLOC_HOOK_DEFINE (ACE_CLASSIX_CO_Acceptor)
-
-// General purpose routine for performing server creation.
-
-ACE_CLASSIX_CO_Acceptor::ACE_CLASSIX_CO_Acceptor (const ACE_Addr &local_sap,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol,
- ACE_Reactor* theReactor)
- : port_ (0),
- reactor_ (theReactor)
-{
- ACE_TRACE ("ACE_CLASSIX_CO_Acceptor::ACE_CLASSIX_CO_Acceptor");
- if (this->open (local_sap, reuse_addr, protocol_family,
- backlog, protocol, theReactor) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_CLASSIX_CO_Acceptor")));
-}
-
-// General purpose routine for performing server creation.
-
-int
-ACE_CLASSIX_CO_Acceptor::open (const ACE_Addr & theLocalSap,
- int /* reuse_addr */,
- int theProtocolFamily,
- int /* backlog */,
- int /* protocol */,
- ACE_Reactor* theReactor)
-{
- // make sure that the client requests for a "CLASSIX" family.
-
- if (theProtocolFamily != ACE_CLASSIX_Addr::AF_CLASSIX)
- return -1;
-
- // Setup local address
-
- int error = 0;
- if (theLocalSap == ACE_Addr::sap_any)
- {
- this->port_ = new ACE_CLASSIX_Port_Core ();
- ACE_ASSERT (this->port_);
- error = this->addr_.set (*this->port_);
- }
- else
- error = this->addr_.set (theLocalSap);
-
- if (error != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_CLASSIX_CO_Acceptor::open ()::"
- "Cannot setup address\n"), -1);
-
- // Make the port "selectable"
-
- if (this->addr_.selectable () != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_CLASSIX_CO_Acceptor::open ()::"
- "Cannot enable port\n"), -1);
-
- this->reactor_ = theReactor;
- return 0;
-}
-
-// General purpose routine for accepting new connections.
-
-int
-ACE_CLASSIX_CO_Acceptor::accept (ACE_CLASSIX_Stream &new_stream,
- ACE_Addr *remote_addr,
- ACE_Time_Value* /* timeout */,
- int /* restart */,
- int /* reset_new_handle */) const
-{
- ACE_TRACE ("ACE_CLASSIX_CO_Acceptor::accept");
-
- // Get peer's address info
-
- size_t size = 0;
- if (this->reactor_->current_info (this->get_handle (), size)
- == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_CLASSIX_CO_Acceptor:.accept ()::"
- "Cannot get peer addr\n"), -1);
-
- ACE_CLASSIX_CO_Acceptor::Peer_Union data;
- ACE_CLASSIX_Msg rmsg (&data, sizeof (ACE_CLASSIX_CO_Acceptor::Peer_Union));
- if (size != sizeof (ACE_CLASSIX_CO_Acceptor::Peer_Union)
- || ::ipcGetData (rmsg.get ()) != size)
- ACE_ERROR_RETURN ((LM_ERROR, "%t"
- "ACE_CLASSIX_CO_Acceptor::accept::ipcGetData (%d)\n",
- size),
- -1);
-
- // Set up Peer SAP
-
- int error = 0;
- switch (data.type)
- {
- case ACE_CLASSIX_Addr::PORT:
- error = new_stream.set_peer_sap (data.choose.port.peer);
- break;
-
- case ACE_CLASSIX_Addr::GROUP:
- error = new_stream.set_peer_sap (data.choose.group.peer);
- break;
-
- case ACE_CLASSIX_Addr::STAMP:
- error = new_stream.set_peer_sap (data.choose.stamp.peer);
- break;
-
- case ACE_CLASSIX_Addr::DYNAMIC:
- error = new_stream.set_peer_sap (data.choose.group.peer);
- break;
-
- default:
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_CLASSIX_CO_Accept::accept ()::"
- "Invalid peer address\n"), -1);
- }
-
- if (error != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_CLASSIX_CO_Accept::accept ()::"
- "cannot set peer address\n"), -1);
-
- // Set up local SAP & tell the peer
-
- data.type = ACE_CLASSIX_Addr::UNDEFINED;
-
- if (remote_addr != 0)
- {
- if (remote_addr->get_type () == ACE_CLASSIX_Addr::AF_CLASSIX &&
- ((ACE_CLASSIX_Addr*) remote_addr)->is_type ==
- ACE_CLASSIX_Addr::PORT)
- {
- new_stream.get_local_sap ().set (*remote_addr);
- data.type = ACE_CLASSIX_Addr::PORT;
- }
- }
- else
- {
- ACE_CLASSIX_Port_Core *port = new ACE_CLASSIX_Port_Core ();
- if (new_stream.set_local_port (port) == 0)
- data.type = ACE_CLASSIX_Addr::PORT;;
- }
-
- data.choose.port.peer =
- new_stream.get_local_sap ().get_addr ().get_id ();
-
- ACE_CLASSIX_Msg smsg (&data, sizeof (ACE_CLASSIX_CO_Acceptor::Peer_Union));
-
- if (::ipcReply (smsg.get ()) != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "ACE_CLASSIX_CO_Accept::accept ()::"
- "cannot deliver server address to peer\n"), -1);
-
- // Make new_stream's local SAP selectable.
- if (new_stream.selectable () != 0)
- return -1;
-
- return 0;
-}
-
-int
-ACE_CLASSIX_CO_Acceptor::close (void)
-{
- ACE_TRACE ("ACE_CLASSIX_CO_Acceptor::close");
- int result = 0;
-
- if (this->get_handle () != ACE_INVALID_HANDLE)
- {
- delete this->port_;
- this->port_ = 0;
- ((ACE_CLASSIX_Port) this->addr_.get_addr ()).clear ();
- }
- return 0;
-}
-
-
-int
-ACE_CLASSIX_CO_Acceptor::get_local_addr (ACE_Addr &theAddr) const
-{
- int size = theAddr.get_size ();
- if (size < this->addr_.get_addr ().get_size ())
- return -1;
-
- return this->addr_.get_addr (theAddr);
-}
-
-void
-ACE_CLASSIX_CO_Acceptor::dump (void) const
-{
- ACE_TRACE ("ACE_CLASSIX_CO_Acceptor::dump");
-}
diff --git a/ace/CLASSIX/CLASSIX_CO_Acceptor.h b/ace/CLASSIX/CLASSIX_CO_Acceptor.h
deleted file mode 100644
index b095b394ba7..00000000000
--- a/ace/CLASSIX/CLASSIX_CO_Acceptor.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// CLASSIX_CO_Acceptor.h
-//
-// = AUTHOR
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_CO_ACCEPTOR_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_CO_ACCEPTOR_H
-
-#include "ace/CLASSIX/CLASSIX_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Time_Value.h"
-
-class ACE_Export ACE_CLASSIX_CO_Acceptor
-{
- // = TITLE
- // Defines the format and interface for a connection
- // oriented <ACE_CLASSIX_Stream> acceptor.
- //
- // = DESCRIPTION
- // This class is the counter part of the <ACE_CLASSIX_Connector>
- // class. It exchanges SAP information to set up a logical
- // connection.
- //
- // Data format passed between a connector and this class uses
- // Peer_Union structure.
- //
- // = SEE ALSO
- // ACE_CLASSIX_Connector
- //
-public:
- struct Peer_Port
- {
- KnUniqueId peer;
- };
-
- struct Peer_Group
- {
- KnCap peer;
- };
-
- struct Peer_Stamp
- {
- int peer;
- };
-
- struct Peer_Union
- {
- int type;
- union
- {
- Peer_Port port;
- Peer_Group group;
- Peer_Stamp stamp;
- }choose;
- };
-
- // = Initialization methods.
- ACE_CLASSIX_CO_Acceptor (ACE_Reactor* = ACE_Reactor::instance());
- // Default constructor.
-
- ACE_CLASSIX_CO_Acceptor (const ACE_Addr &local_sap,
- int reuse_addr = 0,
- int protocol_family = ACE_CLASSIX_Addr::AF_CLASSIX,
- int backlog = 0,
- int protocol = 0,
- ACE_Reactor* = ACE_Reactor::instance());
- // Initiate a passive mode socket.
-
- virtual ~ACE_CLASSIX_CO_Acceptor (void);
- // Default dtor.
-
- int open (const ACE_Addr &local_sap,
- int reuse_addr = 0,
- int protocol_family = ACE_CLASSIX_Addr::AF_CLASSIX,
- int backlog = 5,
- int protocol = 0,
- ACE_Reactor* = ACE_Reactor::instance());
- // Initiate a passive mode socket.
- int close (void);
- // Closes down the listening port.
-
- // = Passive connection acceptance method.
- int accept (ACE_CLASSIX_Stream &new_stream,
- ACE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0) const;
- // Accept a new data transfer connection. A <timeout> of 0 means
- // block forever, a <timeout> of {0, 0} means poll. <restart> == 1
- // means "restart if interrupted."
-
- // = ACCESS
- ACE_HANDLE get_handle (void) const;
- // Get the underlying descriptor.
- int get_local_addr (ACE_Addr &) const;
- // Return the local endpoint address in the referenced ACE_Addr.
- // Returns 0 if successful, else -1.
-
- void reactor(ACE_Reactor*);
- // reset the reactor
-
- // = META-TYPE info
- typedef ACE_CLASSIX_Addr PEER_ADDR;
- typedef ACE_CLASSIX_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
-
-private:
-
- ACE_CLASSIX_Port_Core *port_;
- // optional port.
- // If 0, default port is used.
- ACE_CLASSIX_SAP addr_;
-
- ACE_Reactor *reactor_;
- // for reference only. Does not own it
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/CLASSIX/CLASSIX_CO_Acceptor.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_CO_ACCEPTOR_H */
diff --git a/ace/CLASSIX/CLASSIX_CO_Acceptor.i b/ace/CLASSIX/CLASSIX_CO_Acceptor.i
deleted file mode 100644
index dcb6a0d2862..00000000000
--- a/ace/CLASSIX/CLASSIX_CO_Acceptor.i
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Do nothing routine for constructor.
-ACE_INLINE
-ACE_CLASSIX_CO_Acceptor::ACE_CLASSIX_CO_Acceptor (ACE_Reactor* theReactor)
- : port_ (0),
- reactor_ (theReactor)
-{
- ACE_TRACE ("ACE_CLASSIX_Acceptor::ACE_CLASSIX_Acceptor");
-}
-
-ACE_INLINE
-ACE_CLASSIX_CO_Acceptor::~ACE_CLASSIX_CO_Acceptor(void)
-{
- delete this->port_;
-}
-
-ACE_INLINE
-void
-ACE_CLASSIX_CO_Acceptor::reactor(ACE_Reactor* theReactor)
-{
- this->reactor_ = theReactor;
-}
-
-ACE_INLINE
-ACE_HANDLE
-ACE_CLASSIX_CO_Acceptor::get_handle(void) const
-{
- return this->addr_.get_handle();
-}
diff --git a/ace/CLASSIX/CLASSIX_CO_Connector.cpp b/ace/CLASSIX/CLASSIX_CO_Connector.cpp
deleted file mode 100644
index 12280142b2b..00000000000
--- a/ace/CLASSIX/CLASSIX_CO_Connector.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-// $Id$
-/*
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_CO_Connector.cpp
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-*/
-#define ACE_BUILD_DLL
-#include "ace/CLASSIX/CLASSIX_CO_Connector.h"
-#include "ace/CLASSIX/CLASSIX_CO_Acceptor.h"
-
-ACE_ALLOC_HOOK_DEFINE(ACE_CLASSIX_CO_Connector)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_CO_Connector.i"
-#endif /* __ACE_INLINE__ */
-/* ------------------------------------------------------------------------- */
-
-// Set up remote port information
-
-int
-ACE_CLASSIX_CO_Connector::connect (ACE_CLASSIX_Stream &new_stream,
- const ACE_Addr & theAcceptor,/* acceptor */
- ACE_Time_Value * theTimeout, /* timeout */
- const ACE_Addr & theLocal,
- int theReuse,
- int theFlag,
- int thePerm,
- int theProtocolFamily,
- int theProtocol)
-
-{
- //
- // set up local SAP and connector info in <new_stream>
- //
- if (this->ACE_CLASSIX_CLD_Connector::
- connect(new_stream,
- theAcceptor,
- theTimeout,
- theLocal,
- theReuse,
- theFlag & (~ACE_CLASSIX_CLD_Connector::ENABLE),
- thePerm,
- theProtocolFamily,
- theProtocol) != 0)
- return -1;
-
- //
- // make a connection
- //
- // Tell the connector my own SAP
- ACE_CLASSIX_CO_Acceptor::Peer_Union peer;
- size_t size = sizeof (ACE_CLASSIX_CO_Acceptor::Peer_Union);
- peer.type = ACE_CLASSIX_Addr::PORT;
- peer.choose.port.peer = new_stream.local_sap().get_addr().get_id();
-
- if (new_stream.send((void*) &peer, size) != size)
- ACE_ERROR_RETURN((LM_ERROR, "%t|%P|%p\n",
- "ACE_CLASSIX_Connector::connect()::send:"), -1);
- // Wait for peer SAP information from the acceptor
- if (new_stream.ipcRecv((void*) &peer, size, 0, theTimeout) != size)
- ACE_ERROR_RETURN((LM_ERROR, "ACE_CLASSIX_Connector::connect()::"
- "unable to receive connect response\n"), -1);
-
- int error = 0;
- switch (peer.type)
- {
- case ACE_CLASSIX_Addr::PORT:
- error = new_stream.set_peer_sap(peer.choose.port.peer);
- break;
-
- case ACE_CLASSIX_Addr::GROUP:
- error = new_stream.set_peer_sap(peer.choose.group.peer);
- break;
-
- case ACE_CLASSIX_Addr::STAMP:
- error = new_stream.set_peer_sap(peer.choose.stamp.peer);
- break;
-
- case ACE_CLASSIX_Addr::DYNAMIC:
- error = new_stream.set_peer_sap(peer.choose.group.peer);
- break;
-
- default:
- ACE_ERROR_RETURN((LM_ERROR, "ACE_CLASSIX_Connect::connect()::"
- "Invalid peer address\n"), -1);
- }
-
- if (error != 0)
- ACE_ERROR_RETURN((LM_ERROR, "ACE_CLASSIX_Connector::connect()::"
- "unable to receive connect response\n"), -1);
-
-
- //
- // Make the local SAP "selectable"
- //
- if (theFlag & ACE_CLASSIX_CO_Connector::ENABLE &&
- new_stream.selectable() != 0)
- return -1;
-
- return 0;
-}
-
-void
-ACE_CLASSIX_CO_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_CLASSIX_CO_Connector::dump");
-}
-
-/* ------------------------------------------------------------------------- */
diff --git a/ace/CLASSIX/CLASSIX_CO_Connector.h b/ace/CLASSIX/CLASSIX_CO_Connector.h
deleted file mode 100644
index b59e04a72e2..00000000000
--- a/ace/CLASSIX/CLASSIX_CO_Connector.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-/*
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_CO_Connector.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-*/
-
-#ifndef ACE_CLASSIX_CO_CONNECTOR_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_CO_CONNECTOR_H
-
-#include "ace/CLASSIX/CLASSIX_CLD_Connector.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-/* ------------------------------------------------------------------------- */
-
-class ACE_CLASSIX_CO_Connector : public ACE_CLASSIX_CLD_Connector
- // = TITLE
- // Defines an CLASSIX IPC connection factory for the
- // template methods in <ACE_Connector>.
- //
- // = DESCRIPTION
- // This is used when a client needs to communicate with a server
- // whose SAP address is unknown.
- //
- // <ACE_CLASSIX_Connect> and <ACE_CLASSIX_Acceptor> exchanges
- // address(SAP) information to establish a logical link.
- //
- // = NOTES
- // There is no other identifier and sequence information
- // passed between the acceptor and the connector.
- // Some applications may need to have a
- // reliable protocol for the connection setup procedure.
- //
- // = SEE ALSO
- // ACE_CLASSIX_CLD_Connector
- // ACE_CLASSIX_Acceptor
- //
-{
- public:
- // = Initialization routines.
- ACE_CLASSIX_CO_Connector (void);
- // Default constructor.
-
- ACE_CLASSIX_CO_Connector (ACE_CLASSIX_Stream &new_stream,
- const ACE_Addr &remote_sap
- = ACE_Addr::sap_any,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol_family
- = ACE_CLASSIX_Addr::AF_CLASSIX,
- int protocol = 0);
- // Emulates connection semantics so that it can be plugged into
- // <ACE_Connector>
- // Actively connect local SAP and remote SAP togeter.
- // Produce a <new_stream> if things go well.
- //
- // <remote_sap> is the peer's address. In ACE_SOCK_Connector it refers to
- // the acceptor's address. In connectionless mode, we do not have
- // an acceptor. The <remote_sap> address will be copied to the new stream
- // if things goes well.
- //
- // If <local_sap> refers to any address, a port will be
- // allocated and will be used as a local SAP.
- //
- // The rest parameters are there so that this class can be plugged into
- // <ACE_Connector>.
-
- int connect (ACE_CLASSIX_Stream &new_stream,
- const ACE_Addr &remote_sap = ACE_Addr::sap_any,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol_family = ACE_CLASSIX_Addr::AF_CLASSIX,
- int protocol = 0);
-
- // Factory method used in <ACE_Connector>::connect_svc_handler()
-
- // Initialization method when default constructor is used.
- // See the comments for the corresponding constructor
-
- // = HELPER
- void dump(void) const;
-
-
- private:
-
- ACE_CLASSIX_CO_Connector(ACE_CLASSIX_CO_Connector const&);
- ACE_CLASSIX_CO_Connector const& operator=(ACE_CLASSIX_CO_Connector const&);
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_CO_Connector.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_CO_CONNECTOR_H */
diff --git a/ace/CLASSIX/CLASSIX_CO_Connector.i b/ace/CLASSIX/CLASSIX_CO_Connector.i
deleted file mode 100644
index 7f28a66719f..00000000000
--- a/ace/CLASSIX/CLASSIX_CO_Connector.i
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// CLASSIX_CO_Connector.i
-/* ------------------------------------------------------------------------- */
-
-ACE_INLINE
-ACE_CLASSIX_CO_Connector::ACE_CLASSIX_CO_Connector (
- ACE_CLASSIX_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- int protocol_family,
- int protocol)
- : ACE_CLASSIX_CLD_Connector(new_stream, remote_sap, timeout, local_sap,
- reuse_addr, flags, perms,
- protocol_family, protocol)
-{
- ACE_TRACE ("ACE_CLASSIX_CO_Connector::ACE_CLASSIX_CO_Connector");
-}
-
-// Do-nothing constructor...
-
-ACE_INLINE
-ACE_CLASSIX_CO_Connector::ACE_CLASSIX_CO_Connector (void)
- : ACE_CLASSIX_CLD_Connector()
-{
- ACE_TRACE ("ACE_CLASSIX_CO_Connector::ACE_CLASSIX_CO_Connector");
-}
-
-/* ------------------------------------------------------------------------- */
-
-
diff --git a/ace/CLASSIX/CLASSIX_Dgram_Mcast.cpp b/ace/CLASSIX/CLASSIX_Dgram_Mcast.cpp
deleted file mode 100644
index 112d25956b7..00000000000
--- a/ace/CLASSIX/CLASSIX_Dgram_Mcast.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// IPP
-//
-// = FILENAME
-// CLASSIX/Dgram_Mcast.cpp
-//
-// = AUTHOR(S)
-// Wei Chiang
-//
-// = COPYRIGHT
-// Copyright 1998 Nokia Telecommunications
-//
-// ============================================================================
-
-#include "ace/CLASSIX/CLASSIX_Dgram_Mcast.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Dgram_Mcast.i"
-#endif /* __ACE_INLINE__ */
-/* ------------------------------------------------------------------------- */
-int
-ACE_CLASSIX_Dgram_Mcast::set_saps(int theStamp,
- const ACE_CLASSIX_Port& thePort)
-{
- this->local_sap_.set_addr(thePort);
- if (this->peer_sap_.set(theStamp) != 0)
- {
- errno = EADDRNOTAVAIL;
- ACE_ERROR_RETURN((LM_ERROR, "ACE_CLASSIX_Dgram_Mcast- "
- "failed to set up peer sap address \n"), -1);
- }
- else
- {
- this->dest_.target = this->peer_sap_.get_addr()->get_id();
- return 0;
- }
-}
-
-
-int
-ACE_CLASSIX_Dgram_Mcast::set_mode_(u_int theMode, int theSite)
-{
- int result = K_EFAULT;
- if (theMode <= K_FUNCXMODE &&
- (result =::uiSite(&this->dest_.coTarget, theSite)) == 0)
- result = ::ipcTarget(&this->dest_.target, theMode);
-
- if (result != 0)
- {
- errno = ACE_CLASSIX_OS::convert_io_error(result);
- result = -1;
- }
- return result;
-}
-
-int
-ACE_CLASSIX_Dgram_Mcast::set_mode_(u_int theMode)
-{
- int result = K_EFAULT;
- if (theMode <= K_FUNCXMODE )
- result = ::ipcTarget(&this->dest_.target, theMode);
-
- if (result < 0)
- {
- errno = ACE_CLASSIX_OS::convert_io_error(result);
- result = -1;
- }
- return result;
-}
-
-
-void
-ACE_CLASSIX_Dgram_Mcast::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, "ACE_CLASSIX_Dgram_Mcast...\n"));
- this->ACE_CLASSIX_Stream::dump();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
diff --git a/ace/CLASSIX/CLASSIX_Dgram_Mcast.h b/ace/CLASSIX/CLASSIX_Dgram_Mcast.h
deleted file mode 100644
index 35166b99ca0..00000000000
--- a/ace/CLASSIX/CLASSIX_Dgram_Mcast.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Dgram_Mcast.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_DGRAM_MCAST_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_DGRAM_MCAST_H
-
-/* ------------------------------------------------------------------------- */
-#include <ace/CLASSIX/CLASSIX_Stream.h>
-
-class ACE_CLASSIX_Dgram_Mcast : public ACE_CLASSIX_Stream
- // = TITLE
- // Provides Dgram_Mcast interfaces for CLASSIX IPC communications.
- //
- // = DESCRIPTION
- // This class represents multiple end-points for message delivery.
- // All the remote ports are belong to the same group identified by
- // a stamp.
- // It uses the broadcast mode provided by ipcSend() to deliver
- // messages.
- //
- // This class is most likely used in the server.
- //
-{
- public:
- // = INITIALIZATION
- ACE_CLASSIX_Dgram_Mcast(void);
- // Default constructor, does not setup anything
-
- ACE_CLASSIX_Dgram_Mcast(int /* stamp */,
- const ACE_CLASSIX_Port& =
- *ACE_CLASSIX_DEFAULT_PORT::instance());
- // remote SAP = port group, local SAP = default port
-
- int set_saps(int /* stamp */,
- const ACE_CLASSIX_Port& =
- *ACE_CLASSIX_DEFAULT_PORT::instance());
- // remote SAP = port group, local SAP = default port
-
- //virtual ssize_t send (const void *, /* buf */
- // size_t /* n */) const;
-
-
- // = HELPER
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- protected:
-
- virtual int set_mode_(u_int = K_BROADMODE); /* theMode */
- // Sets the addressing mode with the current setting of coTarget
- virtual int set_mode_(u_int, /* mode */ int /* site */);
- // Sets the addressing mode as well as the coTarget
-
- // Site information for delivery mode, see <ACE_CLASSIX_Stream::dest_ >
- // Can be changed by control()/set_mode_()
- int dest_site_;
-
-
- private:
- // Disable copy constructor
- ACE_CLASSIX_Dgram_Mcast(ACE_CLASSIX_Dgram_Mcast const&);
- ACE_CLASSIX_Dgram_Mcast const& operator=(ACE_CLASSIX_Dgram_Mcast const&);
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Dgram_Mcast.i"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_DGRAM_MCAST_H */
diff --git a/ace/CLASSIX/CLASSIX_Dgram_Mcast.i b/ace/CLASSIX/CLASSIX_Dgram_Mcast.i
deleted file mode 100644
index 5d9fd3df0d3..00000000000
--- a/ace/CLASSIX/CLASSIX_Dgram_Mcast.i
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// ace/CLASSIX_Dgram_Mcast.i
-/* ------------------------------------------------------------------------- */
-ACE_INLINE
-ACE_CLASSIX_Dgram_Mcast::ACE_CLASSIX_Dgram_Mcast(void)
- : ACE_CLASSIX_Stream()
-{
-}
-
-ACE_INLINE
-ACE_CLASSIX_Dgram_Mcast::ACE_CLASSIX_Dgram_Mcast (int theStamp,
- const ACE_CLASSIX_Port& thePort)
- : ACE_CLASSIX_Stream()
-{
- this->set_saps(theStamp, thePort);
-}
-
-
-/* ------------------------------------------------------------------------- */
diff --git a/ace/CLASSIX/CLASSIX_Group.cpp b/ace/CLASSIX/CLASSIX_Group.cpp
deleted file mode 100644
index cb0064d3298..00000000000
--- a/ace/CLASSIX/CLASSIX_Group.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Group.cpp
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#include "ace/CLASSIX/CLASSIX_Group.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Group.i"
-#endif /* __ACE_INLINE__ */
-/* ------------------------------------------------------------------------- */
-
-void
-ACE_CLASSIX_Group::init_(void)
-{
- this->clear_config_();
- this->addr_.group_.ui.uiHead = this->addr_.group_.ui.uiTail = 0;
- this->addr_.group_.key.keyHead = this->addr_.group_.key.keyTail = 0;
-}
-
-void
-ACE_CLASSIX_Group::set_addr(void* theSrc, int theLen)
-{
- if (theLen > this->get_size())
- return;
-
- ACE_OS::memcpy ((void *) &this->addr_,
- (void *) theSrc, theLen);
-}
-
-void
-ACE_CLASSIX_Group::set_addr(const KnCap& thePeer)
-{
- this->addr_.group_ = thePeer;
- this->set_config_();
-}
-
-
-int
-ACE_CLASSIX_Group::insert(const ACE_CLASSIX_Port* thePort)
-{
- if (this->is_configured())
- return ::grpPortInsert((KnCap*) &this->get_cap(),
- (KnUniqueId*) &thePort->get_id());
- else
- return K_EINVAL;
-}
-
-int
-ACE_CLASSIX_Group::remove(const ACE_CLASSIX_Port* thePort)
-{
- if (this->is_configured())
- return ::grpPortRemove((KnCap*) &this->get_cap(),
- (KnUniqueId*) &thePort->get_id());
- else
- return K_EINVAL;
-}
-
-void
-ACE_CLASSIX_Group::dump(void) const
-{
- ACE_DEBUG ((LM_DEBUG, "ACE_CLASSIX_Group...\n"));
- char s[200];
- if (!this->is_configured())
- ACE_OS::sprintf(s, "Group has not been setup\n");
- else
- {
- const KnCap &group = this->get_cap();
- ACE_OS::sprintf (s, "id head = %d(%x), id tail = %d(%x)\n"
- "key head = %d(%x) key tail = %d(%x)\n",
- group.ui.uiHead, group.ui.uiHead,
- group.ui.uiTail, group.ui.uiTail,
- group.key.keyHead, group.key.keyHead,
- group.key.keyTail, group.key.keyTail);
- }
- ACE_DEBUG ((LM_DEBUG, "\n%s", s));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
diff --git a/ace/CLASSIX/CLASSIX_Group.h b/ace/CLASSIX/CLASSIX_Group.h
deleted file mode 100644
index 5c4c6dfabc5..00000000000
--- a/ace/CLASSIX/CLASSIX_Group.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX/Group.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_GROUP_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_GROUP_H
-
-/* ------------------------------------------------------------------------- */
-#include "ace/CLASSIX/CLASSIX_Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/CLASSIX/CLASSIX_Port.h"
-
-class ACE_CLASSIX_Group : public ACE_CLASSIX_Addr
- // = TITLE
- // Wrapper over Chorus's Group concept.
- //
- // = DESCRIPTION
- // Provides interface to insert and remove ports in the group which is
- // created based on a given KnCap. This"<KnCap> is the unique
- // identifier of the group.
- //
- // = NOTE
- // Chorus does not provide facility to remove a group from the system,
- // nor explicitly create a group.
- // As such, the wrapper allows users to freely change from one group
- // to the other within the same <ACE_CLASSIX_Group> instance.
- //
- // = SEE ALSO
- // <ACE_CLASSIX_Group_Stamp>, <ACE_CLASSIX_Group_Dynamic>
- //
-{
- public:
- // = INITIALIZATION
- ACE_CLASSIX_Group(void*, /* group id */ int /* len */);
- // Sets up the group wrapper using the supplied group id.
- ACE_CLASSIX_Group(const KnCap&);
- // Sets up the group wrapper using the supplied KnCap
-
- // = ACCESS
- int is_configured(void) const;
- // Returns 1, if it contains valid group id; 0, otherwise.
- virtual ACE_CLASSIX_Addr::Addr_Type is_type(void) const;
- // returns GROUP type
- void* get_addr(void) const;
- // Returns the group id
- virtual const KnUniqueId& get_id (void) const;
- // Returns a reference to the unique identifier
- virtual void set_addr(void* /* source */, int /* len */);
- // Sets the group information according to the supplied data
- // in raw format.
- virtual void set_addr(const KnCap&);
- // Sets the group information according to the supplied KnCap.
- const KnCap& get_cap(void) const;
- // Returns the capability to the supplied location
- // If the address is not configured, the return value is unpredictable.
- int insert(const ACE_CLASSIX_Port*);
- int remove (const ACE_CLASSIX_Port*);
- // Inserts/removes the specified port in to the group
- // Returns 0, if successful; returns a negative value otherwise
-
- int operator == (const ACE_CLASSIX_Group &) const;
- int operator != (const ACE_CLASSIX_Group &) const;
-
- // = HELPER
- void dump(void) const;
-
- protected:
- // = INITIALIZATION
- ACE_CLASSIX_Group();
- // default constructor, does nothing but init.
-
- void init_(void);
- // Initializes the structure.
-
- void set_config_();
- // Sets the group configured.
- void clear_config_();
- // Sets the group not-configured.
-
- struct group_addr
- {
- int config_; // 1, if the following fields are valid
- KnCap group_;
- };
- group_addr addr_;
-
- private:
-
- // disable copy/assignment constructor
- ACE_CLASSIX_Group(ACE_CLASSIX_Group const&);
- ACE_CLASSIX_Group const& operator=(ACE_CLASSIX_Group const&);
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Group.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_GROUP_H */
diff --git a/ace/CLASSIX/CLASSIX_Group.i b/ace/CLASSIX/CLASSIX_Group.i
deleted file mode 100644
index e3650502a10..00000000000
--- a/ace/CLASSIX/CLASSIX_Group.i
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_CLASSIX_Group::ACE_CLASSIX_Group()
- : ACE_CLASSIX_Addr (sizeof (ACE_CLASSIX_Group::group_addr))
-{
- this->init_();
-}
-
-ACE_INLINE
-ACE_CLASSIX_Group::ACE_CLASSIX_Group(void* theSrc, int theLen)
- : ACE_CLASSIX_Addr (sizeof (ACE_CLASSIX_Group::group_addr))
-{
- this->set_addr(theSrc, theLen);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Group::ACE_CLASSIX_Group(const KnCap& thePeer)
- : ACE_CLASSIX_Addr (sizeof (ACE_CLASSIX_Group::group_addr))
-{
- this->set_addr(thePeer);
-}
-
-ACE_INLINE
-void *
-ACE_CLASSIX_Group::get_addr(void) const
-{
- return (void*) &this->addr_;
-}
-
-ACE_INLINE
-const KnUniqueId&
-ACE_CLASSIX_Group::get_id(void) const
-{
- return this->addr_.group_.ui;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Group::is_configured(void) const
-{
- return this->addr_.config_ == 1;
-}
-
-ACE_INLINE
-ACE_CLASSIX_Addr::Addr_Type
-ACE_CLASSIX_Group::is_type(void) const
-{
- return ACE_CLASSIX_Addr::GROUP;
-}
-
-ACE_INLINE
-void
-ACE_CLASSIX_Group::set_config_(void)
-{
- this->addr_.config_ = 1;
-}
-
-ACE_INLINE
-void
-ACE_CLASSIX_Group::clear_config_(void)
-{
- this->addr_.config_ = 0;
-}
-
-ACE_INLINE
-const KnCap&
-ACE_CLASSIX_Group::get_cap(void) const
-{
- return this->addr_.group_;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Group::operator ==(const ACE_CLASSIX_Group & theRhs) const
-{
- return
- this->is_configured() &&
- theRhs.is_configured() &&
- ((KnCap) (this->get_cap()) == (KnCap) (theRhs.get_cap()));
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Group::operator !=(const ACE_CLASSIX_Group & theRhs) const
-{
- return !(*this == theRhs);
-}
diff --git a/ace/CLASSIX/CLASSIX_Group_Dynamic.cpp b/ace/CLASSIX/CLASSIX_Group_Dynamic.cpp
deleted file mode 100644
index a0ecbe357e6..00000000000
--- a/ace/CLASSIX/CLASSIX_Group_Dynamic.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Group_Creator.cpp.1
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-//
-// ============================================================================
-
-#include "ace/CLASSIX/CLASSIX_Group_Dynamic.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Group_Dynamic.i"
-#endif /* __ACE_INLINE__ */
diff --git a/ace/CLASSIX/CLASSIX_Group_Dynamic.h b/ace/CLASSIX/CLASSIX_Group_Dynamic.h
deleted file mode 100644
index eb469fcf81a..00000000000
--- a/ace/CLASSIX/CLASSIX_Group_Dynamic.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Group_Dynamic.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_GROUP_DYNAMIC_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_GROUP_DYNAMIC_H
-
-/* ------------------------------------------------------------------------- */
-#include "ace/CLASSIX/CLASSIX_Group.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_CLASSIX_Group_Dynamic : public ACE_CLASSIX_Group
- // = TITLE
- // Wrapper over Chorus's Group which is created dynamically and not named
- // by a <Stamp>.
- //
- // = DESCRIPTION
- // This is a subclass of <ACE_CLASSIX_Group>.
- //
- // Its encapsulated group is created dynamically and the
- // <KnCap> is the name as well as the unique identifier.
- //
- // = SEE ALSO
- // <ACE_CLASSIX_Group>, <ACE_CLASSIX_Group_Stamp>
-{
- public:
-
- ACE_CLASSIX_Group_Dynamic(void);
- // default constructor... create a group use Chorus IPC's K_DYNAMIC option
-
- virtual ACE_CLASSIX_Addr::Addr_Type is_type(void) const;
- // returns Dynamic type
-
- private:
-
- ACE_CLASSIX_Group_Dynamic(ACE_CLASSIX_Group_Dynamic const&);
- ACE_CLASSIX_Group_Dynamic const& operator=(ACE_CLASSIX_Group_Dynamic const&);
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Group_Dynamic.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_GROUP_DYNAMIC_H */
diff --git a/ace/CLASSIX/CLASSIX_Group_Dynamic.i b/ace/CLASSIX/CLASSIX_Group_Dynamic.i
deleted file mode 100644
index a7974ce45c1..00000000000
--- a/ace/CLASSIX/CLASSIX_Group_Dynamic.i
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_CLASSIX_Group_Dynamic::ACE_CLASSIX_Group_Dynamic(void)
-{
- if (::grpAllocate( K_DYNAMIC, &this->addr_.group_, 0) == 0)
- this->set_config_();
-}
-
-ACE_INLINE
-ACE_CLASSIX_Addr::Addr_Type
-ACE_CLASSIX_Group_Dynamic::is_type(void) const
-{
- return ACE_CLASSIX_Addr::DYNAMIC;
-}
diff --git a/ace/CLASSIX/CLASSIX_Group_Stamp.cpp b/ace/CLASSIX/CLASSIX_Group_Stamp.cpp
deleted file mode 100644
index b1205ca66ec..00000000000
--- a/ace/CLASSIX/CLASSIX_Group_Stamp.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ace/CLASSIX_Group_Stamp.cpp
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#include "ace/CLASSIX/CLASSIX_Group_Stamp.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Group_Stamp.i"
-#endif /* __ACE_INLINE__ */
-/* ------------------------------------------------------------------------- */
-void
-ACE_CLASSIX_Group_Stamp::set_addr(void* theStamp, int)
-{
- // Get the group capability
- this->stamp_ = *((u_int*)theStamp);
- KnActorPrivilege actor;
- actorPrivilege(K_MYACTOR, &actor, NULL);
- if (::grpAllocate((actor == K_SUPACTOR) ? K_STATSYS : K_STATUSER,
- &this->addr_.group_,
- this->stamp_) < 0 )
- {
- ACE_DEBUG((LM_DEBUG, "ACE_CLASSIX_Group_Stamp()::"
- "group allocation failed\n"));
- this->init_();
- this->stamp_ = ACE_CLASSIX_Group_Stamp::ILLEGAL_STAMP;
- }
- else
- {
- this->set_config_();
- }
-}
-
-void
-ACE_CLASSIX_Group_Stamp::dump(void) const
-{
- ACE_DEBUG ((LM_DEBUG, "ACE_CLASSIX_Group_Stamp...\n"));
- ACE_DEBUG ((LM_DEBUG, "\nStamp = %d\n", this->get_stamp()));
- this->ACE_CLASSIX_Group::dump();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
diff --git a/ace/CLASSIX/CLASSIX_Group_Stamp.h b/ace/CLASSIX/CLASSIX_Group_Stamp.h
deleted file mode 100644
index f71149616d3..00000000000
--- a/ace/CLASSIX/CLASSIX_Group_Stamp.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Group_Stamp.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_GROUP_STAMP_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_GROUP_STAMP_H
-
-/* ------------------------------------------------------------------------- */
-#include "ace/CLASSIX/CLASSIX_Group.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_CLASSIX_Group_Stamp : public ACE_CLASSIX_Group
- // = TITLE
- // Wrapper over Chorus's Group using <Stamp> for naming the group.
- //
- // = DESCRIPTION
- // This is a subclass of <ACE_CLASSIX_Group>.
- //
- // Its encapsulated group is named by a <stamp>. However,
- // <KnCap> is still the unique identifier of the group.
- //
- // = NOTE
- // As at the time of writing, The stamp is contained in the ui.uiTail
- // field of <KnCap>.
- //
- // = SEE ALSO
- // <ACE_CLASSIX_Group>, <ACE_CLASSIX_Group_Dynamic>
- //
-{
- public:
- enum
- {
- ILLEGAL_STAMP = 0
- /* Have we defined the range of valid stamps? */
- };
-
- // = INITIALIZATION
- ACE_CLASSIX_Group_Stamp();
- // default constructor. Does not contain group information..
- ACE_CLASSIX_Group_Stamp(int /* stamp */);
- // creates a group use the specfied stamp
- virtual void set_addr(void*, /* pointer to the stamp */
- int = 0 /* not used */);
- // Replaces the existing group according to the supplied stamp
-
- // = ACCESS
- virtual ACE_CLASSIX_Addr::Addr_Type is_type(void) const;
- // returns STAMP type
-
- int get_stamp() const;
- // Returns the stamp
- // If the address is not configured, the return value is unpredictable.
-
- // = HELPER
- void dump(void) const;
-
-
-
- private:
- u_int stamp_;
-
- // disable copy/assignment constructor
- ACE_CLASSIX_Group_Stamp(ACE_CLASSIX_Group_Stamp const&);
- ACE_CLASSIX_Group_Stamp const& operator=(ACE_CLASSIX_Group_Stamp const&);
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Group_Stamp.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_GROUP_STAMP_H */
diff --git a/ace/CLASSIX/CLASSIX_Group_Stamp.i b/ace/CLASSIX/CLASSIX_Group_Stamp.i
deleted file mode 100644
index 0c03d8ab17a..00000000000
--- a/ace/CLASSIX/CLASSIX_Group_Stamp.i
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_CLASSIX_Group_Stamp::ACE_CLASSIX_Group_Stamp()
- : ACE_CLASSIX_Group (),
- stamp_ (0)
-{
-}
-
-ACE_INLINE
-ACE_CLASSIX_Group_Stamp::ACE_CLASSIX_Group_Stamp(int theStamp)
- : ACE_CLASSIX_Group ()
-{
- this->set_addr(&theStamp);
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Group_Stamp::get_stamp() const
-{
- return this->stamp_;
-
-// return this->addr_.group_.ui.uiTail;
-}
-
-ACE_INLINE
-ACE_CLASSIX_Addr::Addr_Type
-ACE_CLASSIX_Group_Stamp::is_type(void) const
-{
- return ACE_CLASSIX_Addr::STAMP;
-}
diff --git a/ace/CLASSIX/CLASSIX_OS.cpp b/ace/CLASSIX/CLASSIX_OS.cpp
deleted file mode 100644
index 2ec4b6af6d8..00000000000
--- a/ace/CLASSIX/CLASSIX_OS.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_OS.cpp
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#include "ace/CLASSIX/CLASSIX_OS.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_OS.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/CLASSIX/CLASSIX_Select_Reactor.h"
-
-/* ------------------------------------------------------------------------- */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_CLASSIX_OS)
-ACE_ALLOC_HOOK_DEFINE(ACE_CLASSIX_Msg)
-
-#if 0
-ACE_ALLOC_HOOK_DEFINE(ACE_CLASSIX_Mgr)
-ACE_CLASSIX_Mgr::ACE_CLASSIX_Mgr(void)
-{
-}
-
-ACE_CLASSIX_Mgr::~ACE_CLASSIX_Mgr(void)
-{
-}
-
-ACE_SYNCH_RECURSIVE_MUTEXT&
-ACE_CLASSIX_Mgr::ref_lock(void) const;
-{
- return port_lock_;
-}
-#endif
-/* ------------------------------------------------------------------------- */
-KnUniqueId ACE_CLASSIX_OS::null_KnUniqueId_;
-ACE_Recursive_Thread_Mutex ACE_CLASSIX_OS::lock_;
-
-ACE_CLASSIX_OS::ACE_CLASSIX_OS(void)
-{
- // Create a actor-wide CLASSIX reactor
- ACE_Reactor *r =
- ACE_Reactor::instance
- (new ACE_Reactor(new ACE_CLASSIX_Select_Reactor(), 1), 1);
- delete r;
-
- // Fills in a null KnUniqueId so that it can be referenced when required
- this->null_KnUniqueId_.uiHead = this->null_KnUniqueId_.uiTail = 0;
-}
-
-ssize_t
-ACE_CLASSIX_OS::convert_io_error(ssize_t theOriginal)
-{
- switch (theOriginal)
- {
- case K_EFULL:
- return ENOBUFS;
-
- case K_EINVAL:
- return EFTYPE;
-
- case K_EFAULT:
- return EFAULT;
-
- case K_ETOOMUCH:
- return EMSGSIZE;
-
- case K_EUNKNOWN:
- return EBADF;
-
- case K_ENOPORT:
- return EBADF;
-
- case K_ETIMEOUT:
- return ETIMEOUT;
-
- case K_EABORT:
- return EINTR;
-
- default:
- ACE_DEBUG((LM_DEBUG, "unknonw error: %d\n", theOriginal));
- return EFAULT;
- }
-}
-
-
-
-/* ------------------------------------------------------------------------- */
-
-void
-ACE_CLASSIX_Msg::dump(void) const
-{
- ACE_DEBUG ((LM_INFO, ACE_BEGIN_DUMP, this));
-
- char s[100];
- ACE_OS::sprintf (s, "flag = %x\n"
- "body size = %d\t addr = %x\n"
- "annex addr = %x\n"
- "seq no = %d\n",
- this->msg_.flags,
- this->msg_.bodySize, this->msg_.bodyAddr,
- this->msg_.annexAddr,
- this->msg_.seqNum);
- ACE_DEBUG ((LM_INFO, "%s", s));
- ACE_DEBUG ((LM_INFO, ACE_END_DUMP));
-}
diff --git a/ace/CLASSIX/CLASSIX_OS.h b/ace/CLASSIX/CLASSIX_OS.h
deleted file mode 100644
index 7f2118d5089..00000000000
--- a/ace/CLASSIX/CLASSIX_OS.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_OS.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_OS_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_OS_H
-
-/* ------------------------------------------------------------------------- */
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Select_Reactor.h"
-#include "ace/Singleton.h"
-#include "ace/CLASSIX/CLASSIX_Port_Core.h"
-
-#include <ipc/chIpc.h>
-
-
-#if 0
-class ACE_Export ACE_CLASSIX_Mgr
- // = TITLE
- // Class to manage resouces, especially static resources
- //
- // = DESCRIPTION
- // It is intended that one <ACE_CLASSIX_Mgr> per actor
- //
-{
- public:
- friend ACE_Singleton<ACE_CLASSIX_Mgr, ACE_SYNCH_NULL_MUTEX>;
-
- ACE_SYNCH_RECURSIVE_MUTEXT& ref_lock(const) const;
-
- protected:
- // = Initialization
- ACE_CLASSIX_Mgr(void);
- // Only allow its fried to instantiate, since it is meant as a
- // singleton class.
- // This class shall be instanti
-
-private:
- ACE_SYNCH_RECURSIVE_MUTEX *port_lock_;
-};
-#endif
-
-class ACE_Export ACE_CLASSIX_OS
-{
-public:
-
- ACE_CLASSIX_OS();
-
- static const KnUniqueId& null_KnUniqueId();
- static ssize_t convert_io_error (ssize_t /* CLASSIX' error no */);
- // conver CLASSIX's errno no to Posix no.
-
-protected:
-
-private:
- friend class ACE_CLASSIX_Port_Core;
- friend class ACE_CLASSIX_Port;
- static ACE_Recursive_Thread_Mutex& get_lock_(void);
- // Returns CLASSIX environment-wide lock
-
- static KnUniqueId null_KnUniqueId_;
- // Null-filled KnUniqueId
-
- static ACE_Recursive_Thread_Mutex lock_;
-};
-
-/* ------------------------------------------------------------------------- */
-
-
-class ACE_CLASSIX_Msg
- // = TITLE
- // Class wrapper over Chorus's KnMsgDesc structure
- //
- // = DESCRIPTION
- // Provides initialization and reset methods to construct a KnMsgDesc.
- //
- // The flags in the <flags> field of the KnMsgDesc structure is always
- // set to 0. Therefore, the message body will always be copied and
- // the message is assumed to be part of the user(kernel) address
- // space when the caller is a USER(SUPERVISOR) thread.
- // (Chorus may not support the options defined in the flag, so we
- // choose not to use the flag, i.e. set it to null).
- //
- // The message annex is not used.
-
- // = SEE ALSO
- // ipcSend(2)
-{
- public:
- // = initialization
- ACE_CLASSIX_Msg();
- // default constructor
- ACE_CLASSIX_Msg(const void * /* body address */, int /* msg length */);
-
- KnMsgDesc* get(void);
- // get CLASSIX' message structure
- void set (const void* /* body address */, int /* msg length*/);
- // Reset the message. The original message will be overwritten.
-
- void dump(void) const;
-
- ACE_ALLOC_HOOK_DECLARE;
- // declare the dynamic allocation hooks
-
- private:
- KnMsgDesc msg_;
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_OS.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_OS_H */
diff --git a/ace/CLASSIX/CLASSIX_OS.i b/ace/CLASSIX/CLASSIX_OS.i
deleted file mode 100644
index d5ded0cc75a..00000000000
--- a/ace/CLASSIX/CLASSIX_OS.i
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-/* ------------------------------------------------------------------------- */
-ACE_INLINE
-const KnUniqueId&
-ACE_CLASSIX_OS::null_KnUniqueId(void)
-{
- return null_KnUniqueId_;
-}
-
-
-ACE_INLINE
-ACE_Recursive_Thread_Mutex&
-ACE_CLASSIX_OS::get_lock_(void)
-{
- return lock_;
-}
-
-/* ------------------------------------------------------------------------- */
-ACE_INLINE
-ACE_CLASSIX_Msg::ACE_CLASSIX_Msg(void)
-{
- // Make a null-filled message
- this->msg_.flags = 0;
- this->msg_.bodySize = 0;
- this->msg_.bodyAddr = 0;
- this->msg_.annexAddr = 0;
- this->msg_.seqNum = 0;
-}
-
-ACE_INLINE
-ACE_CLASSIX_Msg::ACE_CLASSIX_Msg(const void* theBuf, int theLen)
-{
- this->msg_.flags = 0;
- this->msg_.annexAddr = 0;
- this->msg_.seqNum = 0;
-
- this->msg_.bodySize = theLen;
- this->msg_.bodyAddr = (VmAddr) theBuf;
-}
-
-ACE_INLINE
-void
-ACE_CLASSIX_Msg::set(const void* theBuf, int theLen)
-{
- this->msg_.bodySize = theLen;
- this->msg_.bodyAddr = (VmAddr) theBuf;
-}
-
-ACE_INLINE
-KnMsgDesc*
-ACE_CLASSIX_Msg::get(void)
-{
- return &this->msg_;
-}
diff --git a/ace/CLASSIX/CLASSIX_Peer_SAP.cpp b/ace/CLASSIX/CLASSIX_Peer_SAP.cpp
deleted file mode 100644
index 9dbddf9c0b1..00000000000
--- a/ace/CLASSIX/CLASSIX_Peer_SAP.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Peer_SAP.cpp
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#include "ace/CLASSIX/CLASSIX_Peer_SAP.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Peer_SAP.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/CLASSIX/CLASSIX_Group_Stamp.h"
-/* ------------------------------------------------------------------------- */
-int
-ACE_CLASSIX_Peer_SAP::set(const ACE_CLASSIX_Port_Core& thePeer)
-{
- delete this->peer_addr_;
- this->peer_addr_ = new ACE_CLASSIX_Port (thePeer);
- ACE_ASSERT(this->peer_addr_);
- return 0;
-}
-
-int
-ACE_CLASSIX_Peer_SAP::set(const ACE_Addr& thePeer)
-{
- delete this->peer_addr_;
- this->peer_addr_ = new ACE_CLASSIX_Port (thePeer);
- ACE_ASSERT(this->peer_addr_);
- return 0;
-}
-
-int
-ACE_CLASSIX_Peer_SAP::set(const KnUniqueId& thePeer)
-{
- delete this->peer_addr_;
- this->peer_addr_ = new ACE_CLASSIX_Port (thePeer);
- ACE_ASSERT(this->peer_addr_);
- return 0;
-}
-
-int
-ACE_CLASSIX_Peer_SAP::set(const KnCap& thePeer)
-{
- delete this->peer_addr_;
- this->peer_addr_ = new ACE_CLASSIX_Group (thePeer);
- ACE_ASSERT(this->peer_addr_);
- return 0;
-}
-
-int
-ACE_CLASSIX_Peer_SAP::set(int theStamp)
-{
- delete this->peer_addr_;
- this->peer_addr_ = new ACE_CLASSIX_Group_Stamp (theStamp);
- ACE_ASSERT(this->peer_addr_);
- return 0;
-}
-
-void
-ACE_CLASSIX_Peer_SAP::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, "ACE_CLASSIX_Peer_SAP...\n"));
- if (this->peer_addr_)
- this->peer_addr_->dump();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
diff --git a/ace/CLASSIX/CLASSIX_Peer_SAP.h b/ace/CLASSIX/CLASSIX_Peer_SAP.h
deleted file mode 100644
index 93e65996763..00000000000
--- a/ace/CLASSIX/CLASSIX_Peer_SAP.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Peer_SAP.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_PEER_SAP_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_PEER_SAP_H
-
-/* ------------------------------------------------------------------------- */
-#include <ace/CLASSIX/CLASSIX_SAP.h>
-#include <ace/CLASSIX/CLASSIX_Port_Default.h>
-
-class ACE_CLASSIX_Peer_SAP
- // = TITLE
- // Class implementing the peer SAP.
- //
- // = DESCRIPTION
- //
- // In CLASSIX, a local SAP is always a port, a peer SAP can be
- // a port or a group of port. This class is for peer SAP and
- // <ACE_SAP> is for local SAP.
- //
- // = SEE ALSO
- // <ACE_SAP>
-{
- public:
- // = INITIALIZATION
- ACE_CLASSIX_Peer_SAP(void);
- // Default constructor.
- // Needs to be initialized by a set() operation.
- ACE_CLASSIX_Peer_SAP(const ACE_CLASSIX_Port_Core&);/* peer port */
-
- ACE_CLASSIX_Peer_SAP(const ACE_CLASSIX_Port&);/* peer port address */
- ACE_CLASSIX_Peer_SAP(const ACE_Addr&); /* peer port address */
-
- ACE_CLASSIX_Peer_SAP(const KnUniqueId&); /* peer port address */
- ACE_CLASSIX_Peer_SAP(const KnCap&); /* peer group address */
- ACE_CLASSIX_Peer_SAP(int /* stamp */); /* stamp for peer group */
-
- ~ACE_CLASSIX_Peer_SAP(void);
-
- int set(const ACE_CLASSIX_Port_Core&); /* peer port */
-
- int set(const ACE_Addr&); /* peer port address */
-
- int set(const KnUniqueId&); /* peer port address */
- int set(const KnCap&); /* peer group address */
- int set(int /* stamp */); /* stamp for the peer group */
-
- // = ACCESS
- const ACE_CLASSIX_Addr* get_addr(void) const;
- // Returns peer's address, either a port or a group of ports
- int is_configured(void) const;
- // Returns 1, if address information is proper; Returns 0 otherwise
-
- // = CONTROL
-#if 0
- int control(u_int = K_BROADMODE);
- int control(u_int, /* mode */ int /* site */ );
- // Interface for CLASSIX' send mode
-#endif
- // = HELPER
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- protected:
-#if 0
- virtual set_mode_(u_int = K_BROADMODE); /* theMode */
- // Sets the addressing mode with the current setting of coTarget
- virtual set_mode_(u_int, /* mode */ int /* site */);
- // Sets the addressing mode as well as the coTarget
-#endif
- ACE_CLASSIX_Addr *peer_addr_;
-
- private:
- // Disable copy constructor
- ACE_CLASSIX_Peer_SAP(ACE_CLASSIX_Peer_SAP const&);
- ACE_CLASSIX_Peer_SAP const& operator=(ACE_CLASSIX_Peer_SAP const&);
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Peer_SAP.i"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_PEER_SAP_H */
diff --git a/ace/CLASSIX/CLASSIX_Peer_SAP.i b/ace/CLASSIX/CLASSIX_Peer_SAP.i
deleted file mode 100644
index a10bcfd12b5..00000000000
--- a/ace/CLASSIX/CLASSIX_Peer_SAP.i
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_CLASSIX_Peer_SAP::ACE_CLASSIX_Peer_SAP(void)
- : peer_addr_ (0)
-{
-}
-
-ACE_INLINE
-ACE_CLASSIX_Peer_SAP::ACE_CLASSIX_Peer_SAP(const ACE_CLASSIX_Port_Core&
- thePeer)
- : peer_addr_ (0)
-{
- this->set(thePeer);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Peer_SAP::ACE_CLASSIX_Peer_SAP(const ACE_CLASSIX_Port& thePeer)
- : peer_addr_ (0)
-{
- this->set(thePeer);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Peer_SAP::ACE_CLASSIX_Peer_SAP(const ACE_Addr& thePeer)
- : peer_addr_ (0)
-{
- this->set(thePeer);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Peer_SAP::ACE_CLASSIX_Peer_SAP(const KnUniqueId& thePeer)
- : peer_addr_ (0)
-{
- this->set(thePeer);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Peer_SAP::ACE_CLASSIX_Peer_SAP(int theStamp)
- : peer_addr_ (0)
-{
- this->set(theStamp);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Peer_SAP::~ACE_CLASSIX_Peer_SAP(void)
-{
- delete this->peer_addr_;
-}
-
-
-ACE_INLINE
-const ACE_CLASSIX_Addr*
-ACE_CLASSIX_Peer_SAP::get_addr(void) const
-{
- return this->peer_addr_;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Peer_SAP::is_configured(void) const
-{
- if (this->peer_addr_)
- return this->peer_addr_->is_configured();
- else
- return 0;
-}
-
-#if 0
-ACE_INLINE
-int
-ACE_CLASSIX_Peer_SAP::control(u_int theMode)
-{
- return this->peer_addr_->set_mode_(theMode);
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Peer_SAP::control(u_int theMode, int theSite)
-{
- return this->set_mode_(theMode, theSite);
-}
-
-
-ACE_INLINE
-int
-ACE_CLASSIX_Peer_SAP::set_mode_(u_int)
-{
- return K_EFAULT;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Peer_SAP::set_mode_(u_int, int)
-{
- return K_EFAULT;
-}
-#endif
diff --git a/ace/CLASSIX/CLASSIX_Port.cpp b/ace/CLASSIX/CLASSIX_Port.cpp
deleted file mode 100644
index e819e1abcfd..00000000000
--- a/ace/CLASSIX/CLASSIX_Port.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Defines the ClassiX IPC address family address format.
-
-#define ACE_BUILD_DLL
-#include "ace/CLASSIX/CLASSIX_Port.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Port.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_CLASSIX_Port)
-
-
-ACE_CLASSIX_Port::ACE_CLASSIX_Port(void* thePort, int theLen)
- : ACE_CLASSIX_Addr (sizeof (ACE_CLASSIX_Port_Core::Addr))
-{
- if (thePort && theLen == this->get_size())
- {
- ACE_CLASSIX_Port_Core::Addr *port =
- (ACE_CLASSIX_Port_Core::Addr*) thePort;
- this->addr_.handle = port->handle;
- this->addr_.id = port->id;
- }
- else
- {
- this->clear();
- }
-}
-
-ACE_CLASSIX_Port::ACE_CLASSIX_Port(ACE_Addr const& theAddr)
- : ACE_CLASSIX_Addr (sizeof (ACE_CLASSIX_Port_Core::Addr))
-{
- if (theAddr.get_size() == this->get_size() &&
- theAddr.get_type() == this->get_type())
- this->set_(theAddr);
- else
- this->clear();
-}
-
-void
-ACE_CLASSIX_Port::clear(void)
-{
- this->addr_.handle = ACE_CLASSIX_ADDR_UNKNOWN;
- this->addr_.id.uiHead = this->addr_.id.uiTail = 0;
-}
-
-int
-ACE_CLASSIX_Port::set_(const ACE_Addr& theAddr)
-{
- ACE_CLASSIX_Port_Core::Addr *src =
- ((ACE_CLASSIX_Port_Core::Addr*) theAddr.get_addr());
- this->addr_.id = src->id;
- this->addr_.handle = src->handle;
-
- return 0;
-}
-
-int
-ACE_CLASSIX_Port::set(const KnUniqueId& thePort)
-{
- int no = ::portLi((KnUniqueId*) &thePort);
-
- // update the port no only if the no is valid
- if (no < 0)
- // Assume this is a remote port
- no = ACE_INVALID_HANDLE;
-
- this->addr_.handle = no;
- this->addr_.id = thePort;
- return 0;
-}
-
-int
-ACE_CLASSIX_Port::set_handle(ACE_HANDLE thePort)
-{
- if (thePort == ACE_INVALID_HANDLE &&
- ::portUi(&this->addr_.id, thePort) < 0)
- return -1;
-
- this->addr_.handle = thePort;
- return 0;
-}
-
-void
-ACE_CLASSIX_Port::set_addr(void* theSrc, int theLen)
-{
- // Remove self owned first and Make sure no memory overflow
- if (theSrc && theLen > this->get_size())
- return;
-
- ACE_OS::memcpy ((void *) &this->addr_,
- (void *) theSrc, theLen);
-
-}
-
-ACE_CLASSIX_Port const&
-ACE_CLASSIX_Port::operator =(ACE_Addr const& theAddr)
-{
- if (theAddr.get_size() == this->get_size() &&
- theAddr.get_type() == this->get_type())
- {
-
- this->set_(theAddr);
- }
- return *this;
-}
-
-int
-ACE_CLASSIX_Port::addr_to_string (ACE_TCHAR s[], size_t) const
-{
- ACE_OS::sprintf (s, ACE_TEXT ("%d:%d"),
- ACE_TEXT_CHAR_TO_TCHAR (::agetId()),
- this->get_port_number ());
-}
-
-void
-ACE_CLASSIX_Port::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, "ACE_CLASSIX_Port...\n"));
- ACE_Addr::dump();
- char s[100];
- ACE_OS::sprintf (s, "handle = %d;\tid head = %x, id tail = %x\n",
- this->get_handle(),
- this->get_id().uiHead, this->get_id().uiTail);
- ACE_DEBUG ((LM_DEBUG, "%s", s));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
diff --git a/ace/CLASSIX/CLASSIX_Port.h b/ace/CLASSIX/CLASSIX_Port.h
deleted file mode 100644
index 94402bf16ca..00000000000
--- a/ace/CLASSIX/CLASSIX_Port.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Port.h
-//
-// = AUTHOR
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_PORT_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_PORT_H
-
-#include "ace/Singleton.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/CLASSIX/CLASSIX_OS.h"
-#include "ace/CLASSIX/CLASSIX_Addr.h"
-
-
-class ACE_Export ACE_CLASSIX_Port : public ACE_CLASSIX_Addr
-{
- // = TITLE
- // Defines the ClassiX IPC Port address format for "ACE Socket" like
- // interfaces
- //
- // = DESCRIPTION
- // The port address contains two fields:
- // a global unique identifier and a local identifier.
- // The global unique identifier is also referred to as the port address
- // and the local identifier as the port no.
- //
- // = NOTE
- // In Chorus, one can always convert from a port unique identifier to
- // a port no and vice versa. This class is implemented based on this
- // premise.
- //
- // = SEE ALSO
- // <ACE_CLASSIX_PORT_Default>, <ACE_CLASSIX_Port_Core>
- //
-public:
- /* -----------------------------------------------------*/
- // = Initialization methods.
- ACE_CLASSIX_Port ();
- // Default constructor.
- // The address corresponds to the default port of the actor.
-
- ACE_CLASSIX_Port (const ACE_CLASSIX_Port &);
- // Copy constructor.
- ACE_CLASSIX_Port (const ACE_Addr &);
- // Copy constructor.
-
- ACE_CLASSIX_Port (const ACE_CLASSIX_Port_Core&);
- // Creates an <ACE_CLASSIX_Port> from <ACE_CLASSIX_Port_Core>
-
- ACE_CLASSIX_Port (const KnUniqueId& /* port_id */);
- // Creates an <ACE_CLASSIX_Port> from the given <port_id>
-
- ACE_CLASSIX_Port (ACE_HANDLE /* port_no */);
- // Creates an <ACE_CLASSIX_Port> from the given <port_no>
-
- ACE_CLASSIX_Port (void* /* location */, int /* length */);
- // Create an <ACE_CLASSIX_Port> from the address in raw format.
-
- ACE_CLASSIX_Port const& operator =(ACE_Addr const&);
-
-
- /* -----------------------------------------------------*/
- // = ACCESS
-
- virtual int addr_to_string (ACE_TCHAR addr[], size_t) const;
- // Transform the current <ACE_CLASSIX_Port> address into string format,
- // which is in the form "actor-id:port-number"
-
- int set (const KnUniqueId& /* port_id */);
- // Sets the <ACE_CLASSIX_Port_Basic> from a <port_id>
-
- virtual void set_addr (void * /* addr location */,
- int /* len */);
- // Set the address as the one pointed to by the location pointer.
- // The address contains <len> bytes.
- // Would prefer to return the status, but the base class uses void.
- int set_handle (ACE_HANDLE /* port_no */);
- // Sets the <addr_> field from a <port_no>
-
- virtual void *get_addr (void) const;
- // Returns a pointer to the address:,
- // <ACE_CLASSIX_Port_Core::ipp_port_addr>
- virtual const KnUniqueId& get_id (void) const;
- // Returns a reference to the port id.
- virtual ACE_HANDLE get_handle (void) const;
- // Returns the port no.
- int is_configured(void) const;
- // Returns 1, if address information is proper; Returns 0 otherwise
- virtual ACE_CLASSIX_Addr::Addr_Type is_type(void) const;
- // returns PORT type
-
- /* -----------------------------------------------------*/
- // = Control
- //
- virtual int enable(int /* receive priority */) const;
- // Puts the port into the set of monitored ports.
- virtual int disable(void) const;
- // Removes the port from the set of monitored ports.
- virtual void clear(void);
- // Remove port information
-
- /* -----------------------------------------------------*/
- // = Comparison
- //
- int operator == (const ACE_CLASSIX_Port &) const;
- // Compare two addresses for equality. The addresses are considered
- // equal if they have the same content in the KnUniqueId address structure.
-
- int operator != (const ACE_CLASSIX_Port &) const;
- // Compare two addresses for inequality.
-
- /* -----------------------------------------------------*/
- // = Helper
- //
- void dump (void) const;
- // Dump the state of an object.
-
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- /* -----------------------------------------------------*/
- // = Direct initialization methods (useful after the object has been
- // constructed).
- // Will create/reset the port only if the port no was <ACE_CLASSIX_ANY>
- // Returns 0 on success, -1 otherwise.
- //
-
- int set_ (const ACE_Addr &);
- // Sets the <ACE_CLASSIX_Port_Basic> from another <ACE_CLASSIX_Port_Basic>.
-
-
-
-private:
- ACE_CLASSIX_Port_Core::Addr addr_;
-};
-
-/* ------------------------------------------------------------------------- */
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Port.i"
-#endif /* __ACE_INLINE__ */
-
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_PORT_H */
diff --git a/ace/CLASSIX/CLASSIX_Port.i b/ace/CLASSIX/CLASSIX_Port.i
deleted file mode 100644
index 762f6ec5794..00000000000
--- a/ace/CLASSIX/CLASSIX_Port.i
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_CLASSIX_Port::ACE_CLASSIX_Port(void)
- : ACE_CLASSIX_Addr (sizeof (ACE_CLASSIX_Port_Core::Addr))
-{
- this->set_handle(K_DEFAULTPORT);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Port::ACE_CLASSIX_Port(const ACE_CLASSIX_Port& theSrc)
- : ACE_CLASSIX_Addr (sizeof (ACE_CLASSIX_Port_Core::Addr))
-{
- this->set_(theSrc);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Port::ACE_CLASSIX_Port(const KnUniqueId& thePort)
- : ACE_CLASSIX_Addr (sizeof (ACE_CLASSIX_Port_Core::Addr))
-{
- this->set(thePort);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Port::ACE_CLASSIX_Port(ACE_HANDLE thePort)
- : ACE_CLASSIX_Addr (sizeof (ACE_CLASSIX_Port_Core::Addr))
-{
- this->set_handle(thePort);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Port::ACE_CLASSIX_Port(const ACE_CLASSIX_Port_Core& thePort)
- : ACE_CLASSIX_Addr (sizeof (ACE_CLASSIX_Port_Core::Addr))
-{
- this->addr_.handle = thePort.get_handle();
- this->addr_.id = thePort.get_id();
-}
-
-ACE_INLINE
-ACE_HANDLE
-ACE_CLASSIX_Port::get_handle(void) const
-{
- return this->addr_.handle;
-}
-
-ACE_INLINE
-const KnUniqueId&
-ACE_CLASSIX_Port::get_id(void) const
-{
- return this->addr_.id;
-}
-
-ACE_INLINE
-void *
-ACE_CLASSIX_Port::get_addr(void) const
-{
- return (void*) &this->addr_;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Port::is_configured(void) const
-{
- return (this->addr_.handle != ACE_CLASSIX_ADDR_UNKNOWN);
-}
-
-ACE_INLINE
-ACE_CLASSIX_Addr::Addr_Type
-ACE_CLASSIX_Port::is_type(void) const
-{
- return ACE_CLASSIX_Addr::PORT;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Port::enable(int thePriority) const
-{
- if (ACE_Reactor::instance()->notify() == 0)
- return ::portEnable(K_MYACTOR, this->get_handle(), thePriority);
- else
- return -1;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Port::disable(void) const
-{
- if (ACE_Reactor::instance()->notify() == 0)
- return ::portDisable(K_MYACTOR, this->get_handle());
- else
- return -1;
-}
-
-// Compare two addresses for equality.
-ACE_INLINE
-int
-ACE_CLASSIX_Port::operator==(const ACE_CLASSIX_Port &theSrc) const
-{
- return
- this->ACE_Addr::operator == (theSrc) &&
- this->addr_.id.uiHead == theSrc.addr_.id.uiHead &&
- this->addr_.id.uiTail == theSrc.addr_.id.uiTail &&
- this->addr_.handle == theSrc.addr_.handle;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Port::operator != (const ACE_CLASSIX_Port &sap) const
-{
- return !((*this) == sap);
-}
diff --git a/ace/CLASSIX/CLASSIX_Port_Core.cpp b/ace/CLASSIX/CLASSIX_Port_Core.cpp
deleted file mode 100644
index 4d1903939b9..00000000000
--- a/ace/CLASSIX/CLASSIX_Port_Core.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Port_Core.cpp
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#include "ace/CLASSIX/CLASSIX_Port_Core.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Port_Core.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Synch_T.h"
-#include "ace/CLASSIX/CLASSIX_OS.h"
-/* ------------------------------------------------------------------------- */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_CLASSIX_Port_Core)
-
-ACE_CLASSIX_Port_Core::ACE_CLASSIX_Port_Core(void)
-{
- if ((this->addr_.handle = ::portCreate(K_MYACTOR, &this->addr_.id)) < 0)
- this->clear_config_();
- else
- {
- this->set_config_();
- }
-}
-
-ACE_CLASSIX_Port_Core::~ACE_CLASSIX_Port_Core(void)
-{
- if (this->is_configured())
- if (int result = ::portDelete(K_MYACTOR, this->get_handle()) < 0)
- ACE_ERROR((LM_DEBUG,
- "ACE_CLASSIX_Port_Core::~ACE_CLASSIX_PORT_CORE()- "
- "failed to delete port, error = %d", result));
-}
-
-void
-ACE_CLASSIX_Port_Core::clear_config_(void)
-{
- this->config_ = 0;
- this->addr_.id.uiHead = this->addr_.id.uiTail = 0;
- this->addr_.handle = ACE_INVALID_HANDLE;
-}
-
-
-void
-ACE_CLASSIX_Port_Core::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, "ACE_CLASSIX_Port_Core...\n"));
- char s[100];
- if (!this->is_configured())
- ACE_OS::sprintf(s, "Port has not been allocated\n");
- else
- ACE_OS::sprintf (s, "handle = %d;\tid head = %x, id tail = %x\n",
- this->get_handle(),
- this->get_id().uiHead, this->get_id().uiTail);
- ACE_DEBUG ((LM_DEBUG, "%s", s));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
diff --git a/ace/CLASSIX/CLASSIX_Port_Core.h b/ace/CLASSIX/CLASSIX_Port_Core.h
deleted file mode 100644
index beef0356c63..00000000000
--- a/ace/CLASSIX/CLASSIX_Port_Core.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Port_Core.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_PORT_CORE_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_PORT_CORE_H
-
-/* ------------------------------------------------------------------------- */
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include <ipc/chIpc.h>
-
-
-/* ------------------------------------------------------------------------- */
-class ACE_Export ACE_CLASSIX_Port_Core
-{
- // = TITLE
- // Defines interfaces for allocation/deallocation of a Chorus
- // IPC port
- //
- // = DESCRIPTION
- // This class allocates a port in the constructor and deallocates it in
- // the destructor.
-
-public:
- /* -----------------------------------------------------*/
- // = Initialization methods.
- ACE_CLASSIX_Port_Core (void);
- // Allocates a port from the OS
- //
- virtual ~ACE_CLASSIX_Port_Core (void);
- // Deallocates the port from the OS.
-
- virtual const KnUniqueId& get_id (void) const;
- // Returns a reference to the port id.
- virtual ACE_HANDLE get_handle (void) const;
- // Returns the port no(used as an ACE_HANDLE)
- virtual void* get_addr(void) const;
- // Returns a pointer to the location containing the raw
- // address of the port.
- int is_configured(void) const;
- // Returns 1, if the port has been successfully created.
-
-#if 0
- int enable(int /* priority */) const;
- int disable (int) const;
- // Puts/Removes the port into/from the set of monitored ports.
-#endif
- /* -----------------------------------------------------*/
- // = Helper
- //
- void dump (void) const;
- // Dump the state of an object.
-
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- struct Addr
- {
- KnUniqueId id; // port address: unique identifier
- ACE_HANDLE handle;// port no: local identifier.
-
- };
-
-protected:
- void clear_config_();
- // Indicates that port has been allocated.
- void set_config_();
-
- ACE_CLASSIX_Port_Core::Addr addr_;
- int config_; // Sets to 1, if configured;
- // 0 otherwise
-private:
- // Disallow copy constructor/assignment
- ACE_CLASSIX_Port_Core(ACE_CLASSIX_Port_Core const&);
- ACE_CLASSIX_Port_Core const& operator =(ACE_CLASSIX_Port_Core const&);
-};
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Port_Core.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_PORT_CORE_H */
diff --git a/ace/CLASSIX/CLASSIX_Port_Core.i b/ace/CLASSIX/CLASSIX_Port_Core.i
deleted file mode 100644
index 7fd3694d8de..00000000000
--- a/ace/CLASSIX/CLASSIX_Port_Core.i
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-void
-ACE_CLASSIX_Port_Core::set_config_(void)
-{
- this->config_ = 1;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Port_Core::is_configured(void) const
-{
- return this->config_ == 1;
-}
-
-
-ACE_INLINE
-ACE_HANDLE
-ACE_CLASSIX_Port_Core::get_handle(void) const
-{
- return this->addr_.handle;
-}
-
-ACE_INLINE
-const KnUniqueId&
-ACE_CLASSIX_Port_Core::get_id(void) const
-{
- return this->addr_.id;
-}
-
-ACE_INLINE
-void*
-ACE_CLASSIX_Port_Core::get_addr(void) const
-{
- return (void*) (&this->addr_);
-}
diff --git a/ace/CLASSIX/CLASSIX_Port_Default.cpp b/ace/CLASSIX/CLASSIX_Port_Default.cpp
deleted file mode 100644
index e18d55971e2..00000000000
--- a/ace/CLASSIX/CLASSIX_Port_Default.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Defines the ClassiX IPC address family address format.
-
-#define ACE_BUILD_DLL
-#include "ace/CLASSIX/CLASSIX_Port_Default.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Port_Default.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_CLASSIX_Port_Default)
-
-/* ------------------------------------------------------------------------- */
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-template class ACE_Singleton<ACE_CLASSIX_Port_Default,
- ACE_SYNCH_NULL_MUTEX>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiation ACE_Singleton<ACE_CLASSIX_Port_Default,
- ACE_SYNCH_NULL_MUTEX>
-
-#endif
diff --git a/ace/CLASSIX/CLASSIX_Port_Default.h b/ace/CLASSIX/CLASSIX_Port_Default.h
deleted file mode 100644
index ce237daceb3..00000000000
--- a/ace/CLASSIX/CLASSIX_Port_Default.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Port_Default.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_PORT_DEFAULT_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_PORT_DEFAULT_H
-
-#include "ace/Singleton.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/CLASSIX/CLASSIX_Port.h"
-
-class ACE_CLASSIX_Port_Default : public ACE_CLASSIX_Port
-{
- // = TITLE
- // Implements the address wrapper of an actor's default port.
- //
- // = DESCRIPTION
- // This corresponds to the address of an actor's default port
- // which does not change
- // in the life time of the actor. Therefore the address information
- // in this class can not be modified once it is created.
- //
- // Each actor has one and only one default port. Therefore an instance
- // of this class is a singleton. The protected constructor and the
- // friendship with the ACE_Singleton preventys this class from being
- // instantiated by other classes.
- //
- // = NOTE
- //
- // = SEE ALSO
- // <ACE_CLASSIX_PORT>
- //
- friend class ACE_Singleton<ACE_CLASSIX_Port_Default, ACE_SYNCH_NULL_MUTEX>;
-
- /* -----------------------------------------------------*/
- // = Access
- virtual void set_addr(void*, int);
- ACE_CLASSIX_Port const& operator =(ACE_CLASSIX_Port const&);
- ACE_CLASSIX_Port const& operator =(ACE_Addr const&);
- // Does nothing...The default port's address cannot be changed
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- /* -----------------------------------------------------*/
- // = Initialization methods.
- ACE_CLASSIX_Port_Default ();
- // Wrapper for the Actor's default port
-};
-
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Port_Default.i"
-#endif /* __ACE_INLINE__ */
-
-/* ------------------------------------------------------------------------- */
-typedef ACE_Singleton<ACE_CLASSIX_Port_Default, ACE_SYNCH_NULL_MUTEX>
- ACE_CLASSIX_DEFAULT_PORT;
-/* ------------------------------------------------------------------------- */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_PORT_DEFAULT_H */
diff --git a/ace/CLASSIX/CLASSIX_Port_Default.i b/ace/CLASSIX/CLASSIX_Port_Default.i
deleted file mode 100644
index fac497bace0..00000000000
--- a/ace/CLASSIX/CLASSIX_Port_Default.i
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_CLASSIX_Port_Default::ACE_CLASSIX_Port_Default(void)
- : ACE_CLASSIX_Port()
-{
-}
-
-ACE_INLINE
-void
-ACE_CLASSIX_Port_Default::set_addr(void*, int)
-{
-}
-
-ACE_INLINE
-ACE_CLASSIX_Port const&
-ACE_CLASSIX_Port_Default::operator =(ACE_CLASSIX_Port const&)
-{
- return *this;
-}
-
-ACE_INLINE
-ACE_CLASSIX_Port const&
-ACE_CLASSIX_Port_Default::operator =(ACE_Addr const&)
-{
- return *this;
-}
diff --git a/ace/CLASSIX/CLASSIX_SAP.cpp b/ace/CLASSIX/CLASSIX_SAP.cpp
deleted file mode 100644
index 55a9c8183a0..00000000000
--- a/ace/CLASSIX/CLASSIX_SAP.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_SAP.cpp
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#include "ace/CLASSIX/CLASSIX_SAP.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_SAP.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_CLASSIX_SAP)
-/* ------------------------------------------------------------------------- */
-int
-ACE_CLASSIX_SAP::get_addr(ACE_Addr& theAddr) const
-{
- if (theAddr.get_size() < this->local_addr_.get_size() ||
- theAddr.get_type() != this->local_addr_.get_type())
- {
- return -1;
- }
- else
- {
- theAddr.set_addr(this->local_addr_.get_addr(),
- this->local_addr_.get_size());
- return 0;
- }
-}
-
-void
-ACE_CLASSIX_SAP::set_addr(const ACE_Addr& theAddr)
-{
- this->local_addr_.set_addr(theAddr.get_addr(), theAddr.get_size());
-}
-
-
-void
-ACE_CLASSIX_SAP::set_addr(const ACE_CLASSIX_Port_Core& thePort)
-{
- this->local_addr_.set_addr(thePort.get_addr(),
- sizeof (ACE_CLASSIX_Port_Core::Addr));
-}
-
-int
-ACE_CLASSIX_SAP::set(const KnUniqueId& theId)
-{
- return this->local_addr_.set(theId);
-}
-
-void
-ACE_CLASSIX_SAP::set_handle(ACE_HANDLE theHandle)
-{
- if (this->local_addr_.set_handle(theHandle) == -1)
- ACE_DEBUG((LM_DEBUG, "ACE_CLASSIX_SAP::set_handle()::"
- "Handle invalid\n"));
-}
-
-int
-ACE_CLASSIX_SAP::set(const ACE_Addr& theAddr)
-{
- this->set_addr(theAddr);
- return 0;
-}
-
-int
-ACE_CLASSIX_SAP::open(const ACE_Addr& theAddr)
-{
- this->set_addr(theAddr);
- return 0;
-}
-
-
-int
-ACE_CLASSIX_SAP::set(const ACE_CLASSIX_Port_Core& thePort)
-{
- this->set_addr(thePort);
- return 0;
-}
-
-
-int
-ACE_CLASSIX_SAP::open(const ACE_CLASSIX_Port_Core* thePort)
-{
- if (thePort)
- {
- this->set_addr(ACE_CLASSIX_Port(*thePort));
- return 0;
- }
- else
- return -1;
-}
-
-int
-ACE_CLASSIX_SAP::close(void)
-{
- // Disable receiving
- this->unselectable();
- //*** Do something to flush out potential messages on the local port
- // e.g. have a separte thread call ipcReceive on each disabled SAP.
-
- this->local_addr_.clear();
- return 0;
-}
-
-int
-ACE_CLASSIX_SAP::selectable(int thePriority)
-{
- if (!this->enabled_)
- {
- int result = this->local_addr_.enable(thePriority);
- if (result == 0)
- this->enabled_ = 1;
- return result;
- }
- else
- return 0;
-}
-
-int
-ACE_CLASSIX_SAP::unselectable(int)
-{
- if (this->enabled_)
- {
- int result = this->local_addr_.disable();
- if (result == 0)
- this->enabled_ = 0;
- return result;
- }
- else
- return 0;
-}
-
-
-void
-ACE_CLASSIX_SAP::dump(void) const
-{
- ACE_DEBUG ((LM_INFO, "ACE_CLASSIX_SAP...\n"));
-
- this->local_addr_.dump();
-
- ACE_DEBUG ((LM_INFO, ACE_END_DUMP));
-}
diff --git a/ace/CLASSIX/CLASSIX_SAP.h b/ace/CLASSIX/CLASSIX_SAP.h
deleted file mode 100644
index c8c5df0e18e..00000000000
--- a/ace/CLASSIX/CLASSIX_SAP.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_SAP.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_SAP_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_SAP_H
-
-/* ------------------------------------------------------------------------- */
-#include "ace/CLASSIX/CLASSIX_Port.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_CLASSIX_SAP
- // = TITLE
- // Class implementing the SAP over a Chorus port.
- //
- // = DESCRIPTION
- // A SAP has a port which is referred to as the local port.
- // This class provides methods to manipulate this port.
- //
- // The SAP will always put the port in DISABLED state on exit.
- //
- // In CLASSIX, a local SAP is always a port, a peer SAP can be
- // a port or a group of port. This class is for local SAP and
- // <ACE_Peer_SAP> is for peer SAP.
- //
- // = SEE ALSO
- // <ACE_Peer_SAP>
- //
-{
- public:
- enum
- {
- DEFAULT_PRIORITY = 10
- };
-
- // = INITIALIZATION
- ACE_CLASSIX_SAP(void);
- // Creates a SAP, using the address of the actor's default port.
- ACE_CLASSIX_SAP(const ACE_Addr&);
- // Creates a SAP, using the specified address as the local address.
- virtual ~ACE_CLASSIX_SAP(void);
-
- // = ACCESS
- void set_addr(const ACE_Addr&);
- void set_addr(const ACE_CLASSIX_Port_Core&);
- // Sets the <local_addr_> based on the given address information.
- // The caller should make sure that the original address can be removed!
- int set(const ACE_Addr&);
- // Returns 0, if successful; returns -1, otherwise
- // same as set_addr(const ACE_Addr&);
- int set(const ACE_CLASSIX_Port_Core&);
- // Returns 0, if successful; returns -1, otherwise
- // same as void set_addr(const ACE_CLASSIX_Port_Core&);
- int set (const KnUniqueId&);
- // Returns 0, if successful; returns -1, otherwise
-
- void set_handle (ACE_HANDLE /* port_no */);
- // Sets the port address according to <port_no>
-
- int get_addr(ACE_Addr& /* return_addr */) const;
- // Returns address information to the supplied location.
- // if successful, return 0 and the return_addr parameter contains the
- // address info.
- // Otherwise, return -1
- const ACE_CLASSIX_Port& get_addr(void) const;
- // Returns a reference to the address information
- ACE_HANDLE get_handle(void) const;
- // Get handles that the Reactor uses
- virtual int is_configured(void) const;
- // Returns 1, if address information is proper; Returns 0 otherwise
- int is_selectable(void) const;
- // Retruns 1, if the local SAP is enabled.
-
- // = CONTROL
- int selectable(int = ACE_CLASSIX_SAP::DEFAULT_PRIORITY /* priority */);
- // Puts the SAP in the ENABLED state so that data the port associated
- // with its local addess can be monitored by the CLASSIX's Reactor.
-
- int unselectable(int = 0 /* not used */);
- // Makes the SAP DISABLED and therefore the SAP can not be monitored
- // by the CLASSIX's Reactor..
- int open(const ACE_Addr&);
- int open(const ACE_CLASSIX_Port_Core*);
- // Sets the address information according to the supplied port
- // Returns 0 on success; returns -1 otherwise
- int close(void);
- // removes the port information
- // Returns 0 on success (always); returns -1 otherwise
-
- void clear(void);
- // erase local port info
-
-#if 0
- int control(u_int = K_BROADMODE);
- int control(u_int, /* mode */ int /* site */ );
- // Interface for CLASSIX' send mode
-#endif
-
-
- // = HELPER
- void dump(void) const;
- // dump the state of an object
-
- ACE_ALLOC_HOOK_DECLARE;
- // declare the dynamic allocation hooks
-
- protected:
-#if 0
- virtual set_mode_(u_int = K_BROADMODE); /* theMode */
- // Sets the addressing mode with the current setting of coTarget
- virtual set_mode_(u_int, /* mode */ int /* site */);
- // Sets the addressing mode as well as the coTarget
-#endif
- // Disable copy constructor/assignment
- ACE_CLASSIX_SAP(ACE_CLASSIX_SAP const&);
- ACE_CLASSIX_SAP const& operator=(ACE_CLASSIX_SAP const&);
-
- ACE_CLASSIX_Port local_addr_;
- int enabled_; // 1 if enabled, 0 if disabled (Default)
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_SAP.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_SAP_H */
diff --git a/ace/CLASSIX/CLASSIX_SAP.i b/ace/CLASSIX/CLASSIX_SAP.i
deleted file mode 100644
index 105570b363b..00000000000
--- a/ace/CLASSIX/CLASSIX_SAP.i
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_CLASSIX_SAP::ACE_CLASSIX_SAP(void)
- :local_addr_ (),
- enabled_ (0)
-{
-}
-
-ACE_INLINE
-ACE_CLASSIX_SAP::ACE_CLASSIX_SAP(const ACE_Addr& theAddr)
- :local_addr_ (theAddr.get_addr(), theAddr.get_size()),
- enabled_ (0)
-{
-}
-
-ACE_INLINE
-ACE_CLASSIX_SAP::~ACE_CLASSIX_SAP(void)
-{
- this->unselectable();
-}
-
-ACE_INLINE
-const ACE_CLASSIX_Port&
-ACE_CLASSIX_SAP::get_addr(void) const
-{
- return this->local_addr_;
-}
-
-
-ACE_INLINE
-ACE_HANDLE
-ACE_CLASSIX_SAP::get_handle(void) const
-{
- return this->local_addr_.get_handle();
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_SAP::is_configured(void) const
-{
- return this->local_addr_.is_configured();
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_SAP::is_selectable(void) const
-{
- return this->enabled_ == 1;
-}
-
-ACE_INLINE
-void
-ACE_CLASSIX_SAP::clear(void)
-{
- this->local_addr_.clear();
-}
diff --git a/ace/CLASSIX/CLASSIX_Select_Reactor.cpp b/ace/CLASSIX/CLASSIX_Select_Reactor.cpp
deleted file mode 100644
index 13716a5d351..00000000000
--- a/ace/CLASSIX/CLASSIX_Select_Reactor.cpp
+++ /dev/null
@@ -1,337 +0,0 @@
-// $Id$
-/*
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// CLASSIX_Reactor.cpp
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-*/
-#include "ace/CLASSIX/CLASSIX_Select_Reactor.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Select_Reactor.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/CLASSIX/CLASSIX_OS.h"
-/* ------------------------------------------------------------------------- */
-int
-ACE_CLASSIX_Select_Reactor::wait_for_multiple_events
-(ACE_Select_Reactor_Handle_Set &theDispatchSet,
- ACE_Time_Value *max_wait_time)
-{
-
- ACE_Time_Value timer_buf (0);
- ACE_Time_Value *this_timeout = &timer_buf;
-
- int number_of_active_handles = this->any_ready (theDispatchSet);
-
- // If there are any bits enabled in the <ready_set_> then we'll
- // handle those first, otherwise we'll block in select().
-
- if (number_of_active_handles == 0)
- {
- int port = K_ANYENABLED;
- do
- {
- // Monitor all enabled ports
- // CLASSIX uses -1 rathre than 0 for blocked receive
- int msec = -1;
- if (this->timer_queue_->calculate_timeout (max_wait_time,
- this_timeout) != 0)
- {
- if ((msec = this_timeout->msec()) == 0)
- {
- msec = -1;
- this_timeout = 0;
- }
- }
- else
- this_timeout = 0;
-
- ACE_CLASSIX_Msg rmsg(0, 0);
- port = K_ANYENABLED;
- ssize_t size = ::ipcReceive(rmsg.get(), &port, msec);
-#if 0
- ACE_DEBUG((LM_DEBUG,
- "(%t)ACE_CLASSIX_Select_Reactor::"
- "return from ipcReceive():ret = %d"
- ", port = %d, timeout = %d\n",
- size, port, msec));
-#endif
- if (size >= 0)
- {
- // Is 0 valid ???
- // Keep info about which handler this message is for and
- // its size.
- if (this->set_current_info_(port, size) == 0)
- {
- theDispatchSet.rd_mask_.set_bit(port);
- number_of_active_handles = 1;
- }
- else
- {
- ACE_DEBUG((LM_DEBUG,
- "Synchronization problem in Reactor???\n"));
- number_of_active_handles = -1;
- errno = K_EFAULT;
- }
- }
- else
- {
- // make the current message information invalid
- this->set_current_info_(ACE_INVALID_HANDLE, 0);
- if ((errno = size) == K_ETIMEOUT)
- number_of_active_handles = 0;
- else
- number_of_active_handles = -1;
- }
- }
- while (number_of_active_handles == -1 &&
- this->handle_error_ (port) > 0);
- }
- // Return the number of events to dispatch.
- return number_of_active_handles;
-}
-
-int
-ACE_CLASSIX_Select_Reactor::set_current_info_(ACE_HANDLE thePort,
- size_t theSize)
-{
- ACE_MT(ACE_GUARD_RETURN (ACE_SELECT_REACTOR_MUTEX, ace_mon,
- this->token_, -1));
-
- this->current_handle_ = thePort;
- this->current_msg_size_ = theSize;
- return 0;
-}
-
-int
-ACE_CLASSIX_Select_Reactor::current_info(ACE_HANDLE thePort,
- size_t& theSize)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_MUTEX,
- ace_mon, this->token_, -1));
-
- if (this->current_handle_ == thePort)
- {
- theSize = this->current_msg_size_;
- this->current_msg_size_ = 0;
- this->current_handle_ = ACE_INVALID_HANDLE;
- return 0;
- }
- else
- {
- theSize = 0;
- return -1;
- }
-}
-
-int
-ACE_CLASSIX_Select_Reactor::handle_error_ (int thePort)
-{
-
- // The thread has been aborted
- if (errno == K_EABORT)
- return this->restart_;
- // No port or a (Chorus) handler is attached to the port
- else if (errno == K_ENOPORT || errno == K_EINVAL)
- return this->check_handles_ (thePort);
- else
- return -1;
-}
-
-int
-ACE_CLASSIX_Select_Reactor::check_handles_ (int thePort)
-{
- ACE_TRACE ("ACE_Select_Reactor::check_handles");
- if (thePort == K_ANYENABLED)
- return -1;
- else
- // Don't know how to check if a Chorus port has been disabled or deleted.
- return 0;
-}
-
-/* ------------------------------------------------------------------------- */
-void
-ACE_CLASSIX_Select_Reactor_Notify::dump (void) const
-{
- ACE_TRACE ("ACE_CLASSIX_Select_Reactor_Notify::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_CLASSIX_select_reactor_ = %x"),
- this->select_reactor_));
- this->notification_sap_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-int
-ACE_CLASSIX_Select_Reactor_Notify::open (ACE_Reactor_Impl *theReactor,
- ACE_Timer_Queue*,
- int the_disable_notify_pipe)
-{
- if (the_disable_notify_pipe == 0)
- {
- this->select_reactor_ = ACE_dynamic_cast
- (ACE_CLASSIX_Select_Reactor *, theReactor);
-
- if (this->notification_sap_.open (&this->notification_port_) != 0 ||
- this->notification_sap_.selectable() != 0)
- return -1;
-
- return this->select_reactor_->register_handler
- (this->notification_sap_.get_handle (),
- this,
- ACE_Event_Handler::READ_MASK);
- }
- else
- {
- this->select_reactor_ = 0;
- }
-}
-
-ssize_t
-ACE_CLASSIX_Select_Reactor_Notify::notify (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask,
- ACE_Time_Value *timeout)
-{
- ACE_Notification_Buffer buffer (eh, mask);
- ACE_CLASSIX_Msg msg(&buffer, sizeof (buffer));
- KnIpcDest dest;
- dest.target = this->notification_sap_.get_addr().get_id();
-
- ssize_t n = ipcSend (msg.get(), K_DEFAULTPORT, &dest);
- if (n < 0)
- ACE_DEBUG((LM_DEBUG, "ipcSend() error = %d\n", n));
- return n == 0 ? 0 : -1;
-}
-
-// Handles pending threads (if any) that are waiting to unblock the
-// Select_Reactor.
-
-int
-ACE_CLASSIX_Select_Reactor_Notify::dispatch_notifications (
- int & number_of_active_handles,
- const ACE_Handle_Set &rd_mask)
-{
- ACE_TRACE ("(%t) ACE_Select_Reactor_Notify::handle_notification");
-
- ACE_HANDLE read_handle =
- this->notification_sap_.get_handle ();
-
- if (rd_mask.is_set (read_handle))
- {
- number_of_active_handles--;
- return this->handle_input (read_handle);
- }
- else
- return 0;
-}
-
-// Special trick to unblock select() when updates occur in somewhere
-// other than the main ACE_Select_Reactor thread. All we do is write data to
-// a pipe that the ACE_Select_Reactor is listening on. Thanks to Paul
-// Stephenson for suggesting this approach.
-
-int
-ACE_CLASSIX_Select_Reactor_Notify::handle_input (ACE_HANDLE handle)
-{
- // Precondition: this->select_reactor_.token_.current_owner () ==
- // ACE_Thread::self ();
-
- if (handle != this->notification_sap_.get_handle())
- {
- ACE_DEBUG((LM_DEBUG, "ACE_CLASSIX_Select_Reator_Notify::"
- "handle_input() Not my handle\n"));
- return 0;
- }
-
- ssize_t n = 0;
- size_t n1= 0;
-
- int number_dispatched = 0;
-
- ACE_Notification_Buffer buffer;
- ACE_CLASSIX_Msg rmsg(&buffer, sizeof (buffer));
-
- if (this->select_reactor_->current_info(handle, n1) == -1 ||
- n1 != sizeof buffer)
- {
- // I'm not quite sure what to do at this point. It's
- // probably best just to return -1.
- ACE_DEBUG((LM_DEBUG,
- "ACE_CLASSIX_Select_Reactor_Notify:: "
- "read not expected by the reactor\n", n1));
- return -1;
- }
-
- while ((n = ::ipcGetData(rmsg.get())) > 0)
- {
- if (n != sizeof buffer)
- {
- // I'm not sure quite what to do at this point. It's
- // probably best just to return -1.
- ACE_DEBUG((LM_DEBUG,
- "ACE_CLASSIX_Select_Reactor_Notify::ipcGetDAta() "
- "incorrect read(%d)\n", n));
- return -1;
- }
-
- // If eh == 0 then another thread is unblocking the ACE_Select_Reactor
- // to update the ACE_Select_Reactor's internal structures. Otherwise,
- // we need to dispatch the appropriate handle_* method on the
- // ACE_Event_Handler pointer we've been passed.
- if (buffer.eh_ != 0)
- {
- int result = 0;
-
- switch (buffer.mask_)
- {
- case ACE_Event_Handler::READ_MASK:
- case ACE_Event_Handler::ACCEPT_MASK:
- result = buffer.eh_->handle_input (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::WRITE_MASK:
- result = buffer.eh_->handle_output (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::EXCEPT_MASK:
- result = buffer.eh_->handle_exception (ACE_INVALID_HANDLE);
- break;
- default:
- // Should we bail out if we get an invalid mask?
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("invalid mask = %d\n"), buffer.mask_));
- }
- if (result == -1)
- buffer.eh_->handle_close (ACE_INVALID_HANDLE,
- ACE_Event_Handler::EXCEPT_MASK);
- }
-
- number_dispatched++;
-
- // Bail out if we've reached the <notify_threshold_>. Note that
- // by default <notify_threshold_> is -1, so we'll loop until all
- // the notifications in the pipe have been dispatched.
- if (number_dispatched == this->select_reactor_->max_notify_iterations())
- break;
- }
-
- // Reassign number_dispatched to -1 if things have gone seriously
- // wrong.
- if (n < 0)
- number_dispatched = -1;
-
-
- // Enqueue ourselves into the list of waiting threads. When we
- // reacquire the token we'll be off and running again with ownership
- // of the token. The postcondition of this call is that
- // this->select_reactor_.token_.current_owner () == ACE_Thread::self ();
- this->select_reactor_->renew();
- return number_dispatched;
-}
-/* ------------------------------------------------------------------------- */
diff --git a/ace/CLASSIX/CLASSIX_Select_Reactor.h b/ace/CLASSIX/CLASSIX_Select_Reactor.h
deleted file mode 100644
index 98063a60c1f..00000000000
--- a/ace/CLASSIX/CLASSIX_Select_Reactor.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-/*
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// CLASSIX_Reactor.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-*/
-
-#ifndef ACE_CLASSIX_REACTOR_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_REACTOR_H
-
-/* ------------------------------------------------------------------------- */
-#include "ace/Timer_Queue.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Select_Reactor.h"
-#include "ace/Message_Block.h"
-#include "ace/CLASSIX/CLASSIX_SAP.h"
-
-class ACE_CLASSIX_Select_Reactor;
-
-class ACE_Export ACE_CLASSIX_Select_Reactor_Notify :
- public ACE_Reactor_Notify
-{
- // = TITLE
- // Unblock the <ACE_CLASSIX_Select_Reactor> from its event loop.
- //
- // = DESCRIPTION
- // This replaces <ACE_Select_Reactor_Notify> class.
- // Instead of using pipe, this class uses an Chorus IPC port to
- // trigger the unblock event.
- //
-public:
- // = Initialization and termination methods.
- ACE_CLASSIX_Select_Reactor_Notify(void);
- ~ACE_CLASSIX_Select_Reactor_Notify(void);
-
- virtual int open (ACE_Reactor_Impl *,
- ACE_Timer_Queue * = 0,
- int = 0 /* dusable_notify_pip */);
- // Enables the notification port and register it with the reactor
- virtual int close (void);
- // Disables the notification port
-
- int dispatch_notifications (int &number_of_active_handles,
- const ACE_Handle_Set &rd_mask);
- // Handles pending threads (if any) that are waiting to unblock the
- // Select_Reactor.
-
- ssize_t notify (ACE_Event_Handler * = 0,
- ACE_Reactor_Mask = ACE_Event_Handler::EXCEPT_MASK,
- ACE_Time_Value * = 0);
- // Called by a thread when it wants to unblock the Select_Reactor.
- // This wakeups the <ACE_Select_Reactor> if currently blocked in
- // select()/poll(). Pass over both the <Event_Handler> *and* the
- // <mask> to allow the caller to dictate which <Event_Handler>
- // method the <Select_Reactor> will invoke. The <ACE_Time_Value>
- // indicates how long to blocking trying to notify the
- // <Select_Reactor>. If <timeout> == 0, the caller will block until
- // action is possible, else will wait until the relative time
- // specified in *<timeout> elapses).
-
- virtual int handle_input (ACE_HANDLE handle);
- // Called back by the Select_Reactor when a thread wants to unblock us.
-
- virtual void max_notify_iterations (int);
- // Set the maximum number of times that the
- // <ACE_CLASSIX_Reactor_Notify::handle_input> method will iterate
- // Always 1.
-
- virtual int max_notify_iterations (void);
- // Get the maximum number of times that the
- // <ACE_Select_Reactor_Notify::handle_input> method will iterate.
- // Always 1
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_CLASSIX_Select_Reactor *select_reactor_;
- // Keep a back pointer to the <ACE_Select_Reactor>. If this value
- // if NULL then the <ACE_Select_Reactor> has been initialized with
- // <disable_notify_pipe>.
- ACE_CLASSIX_Port_Core notification_port_; // CLASSIX' IPC port
- ACE_CLASSIX_SAP notification_sap_;
- // The HANDLE that the Select_Reactor is listening on and
- // the HANDLE that threads wanting the attention of the
- // Select_Reactor will write t are the same.
- // It can be seen that the notification port is implicitly connected to the
- // port from where the notification is written. In many cases, it will be
- // the actor's default port.
-};
-
-class ACE_CLASSIX_Select_Reactor : public ACE_Select_Reactor
- // = TITLE
- // Implementing a Reactor for monitoring incoming data
- //
- // = DESCRIPTION
- // This class redefines the wait_for_events() method of
- // <ACE_Select_Reactor> class.
- //
- // The wait_for_events() method uses ipcReceive() to monitor
- // all ENABLED ports for incoming messages. The ipcReceive() is
- // set up such that it will find out the size of the message but will
- // not read the message. The Chorus OS provides an ipcGetData()
- // to read the message that has just been detected on the same
- // thread.
- // Once a message is detected on a particular
- // port, the reactor will invoke the port handler's
- // handle_input() method on the same thread. It is important that
- // handle_input() shall immediately retrieve(use ipcGetData())
- // the message on the same
- // thread and it shall not hold up this thread in the handle_input()
- // routine for too long. This will allow the Reactor to respond to
- // events more quickly.
- //
- // = NOTE
- // Since chorus does not allow ipcReceive to monitor a subset of
- // ENABLED ports. One cannot have two ACE_CLASSIX_Select_Reactors
- // in one actor.
- //
-{
- public:
-
-
- // = CURRENT MESSAGE
- // The following message should be called in the handler's
- // handle_input() routine.
- // The handle_input() routine should not hold the reactor for too long.
- virtual int current_info(ACE_HANDLE /* port */,
- size_t& /* msg size */);
- // Retruns the current messageage to the caleer if the supplied
- // handle id is the same as the <current_handle_>
- // Returns 0, if <msg size> constains the size of the message
- // that the handler shall read.
- // Returns -1, if the caller is not the expected handler.
-
- protected:
- // = INITIALIZATION
- ACE_CLASSIX_Select_Reactor (ACE_Timer_Queue * = 0);
- // Initializes <ACE_CLASSIX_Select__Reactor> with the handler
- // repository of the default size.
-
- ACE_CLASSIX_Select_Reactor (size_t size,
- int restart = 0,
- ACE_Timer_Queue * = 0);
- // Initializes <ACE_CLASSIX_Select_Reactor> with the handler repository of
- // size <size>.
-
- // multiplexer
- virtual int wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &,
- ACE_Time_Value *);
- // Wait for events to occur.
-
- virtual int set_current_info_(ACE_HANDLE /* handle */,
- size_t /* size of data */);
- // record the handler and the size of the message that the handler shall
- // read next.
-
-
- // ACE_Recursive_Thread_Mutex lock_current_;
- // lock for data relating to the current message.
- // use token lock
-
- size_t current_msg_size_;
- // size of the message that has just been detected.
-
- ACE_HANDLE current_handle_;
- // handler id of the current address.
-
- friend class ACE_CLASSIX_Select_Reactor_Notify;
- friend class ACE_CLASSIX_OS;
- // for constructors
-
- private:
- int handle_error_(int /* port handle */);
- // Takes corrective action when errors occur.
- int check_handles_(int /* port handle */);
- // Makes sure the handler is valid.
-
- ACE_CLASSIX_Select_Reactor(ACE_CLASSIX_Select_Reactor const&);
- ACE_CLASSIX_Select_Reactor const& operator=(ACE_CLASSIX_Select_Reactor const&);
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Select_Reactor.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_REACTOR_H */
diff --git a/ace/CLASSIX/CLASSIX_Select_Reactor.i b/ace/CLASSIX/CLASSIX_Select_Reactor.i
deleted file mode 100644
index af4e995cb87..00000000000
--- a/ace/CLASSIX/CLASSIX_Select_Reactor.i
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-//
-// CLASSIX/Reactor.i
-/* ------------------------------------------------------------------------- */
-
-/* ------------------------------------------------------------------------- */
-ACE_INLINE
-ACE_CLASSIX_Select_Reactor_Notify::ACE_CLASSIX_Select_Reactor_Notify(void)
- : ACE_Reactor_Notify()
-{
-}
-
-ACE_INLINE
-ACE_CLASSIX_Select_Reactor_Notify::~ACE_CLASSIX_Select_Reactor_Notify(void)
-{
-}
-
-ACE_INLINE
-ACE_CLASSIX_Select_Reactor::ACE_CLASSIX_Select_Reactor(
- ACE_Timer_Queue *theTimeQ)
- : ACE_Select_Reactor(0, theTimeQ, 0,
- new ACE_CLASSIX_Select_Reactor_Notify()),
- current_msg_size_ (0),
- current_handle_ (ACE_INVALID_HANDLE)
-{
-}
-
-ACE_INLINE
-ACE_CLASSIX_Select_Reactor::ACE_CLASSIX_Select_Reactor (
- size_t theSize,
- int theRs,
- ACE_Timer_Queue *theTimeQ)
- : ACE_Select_Reactor (theSize, theRs, 0, theTimeQ, 0,
- new ACE_CLASSIX_Select_Reactor_Notify() ),
- current_msg_size_ (0),
- current_handle_ (ACE_INVALID_HANDLE)
-{
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Select_Reactor_Notify::close (void)
-{
- // deregister handle ???
- return this->notification_sap_.close ();
-}
-
-ACE_INLINE
-void
-ACE_CLASSIX_Select_Reactor_Notify::max_notify_iterations (int iterations)
-{
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Select_Reactor_Notify::max_notify_iterations (void)
-{
- return 1;
-}
-
-
-/* ------------------------------------------------------------------------- */
diff --git a/ace/CLASSIX/CLASSIX_Stream.cpp b/ace/CLASSIX/CLASSIX_Stream.cpp
deleted file mode 100644
index 5d1ba095853..00000000000
--- a/ace/CLASSIX/CLASSIX_Stream.cpp
+++ /dev/null
@@ -1,362 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Stream.cpp
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#include "ace/CLASSIX/CLASSIX_Stream.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Stream.i"
-#endif /* __ACE_INLINE__ */
-/* ------------------------------------------------------------------------- */
-ACE_CLASSIX_Stream::ACE_CLASSIX_Stream(void)
- : local_sap_ (),
- local_sap_closed_ (0),
- local_port_ (0),
- peer_sap_ (),
- peer_sap_closed_ (1)
-// dest_site_ (-1)
-{
-}
-
-ACE_CLASSIX_Stream::ACE_CLASSIX_Stream
- (const ACE_CLASSIX_Port_Core& thePeer,
- const ACE_CLASSIX_Port& theLocal)
- : local_sap_ (theLocal),
- local_sap_closed_ (0),
- local_port_ (0),
- peer_sap_ (thePeer),
- peer_sap_closed_ (1)
-// dest_site_ (-1)
-{
- this->dest_.target = this->peer_sap_.get_addr()->get_id();
-}
-
-ACE_CLASSIX_Stream::ACE_CLASSIX_Stream(const ACE_CLASSIX_Port& thePeer,
- const ACE_CLASSIX_Port& theLocal)
- : local_sap_ (theLocal),
- local_sap_closed_(0),
- local_port_ (0),
- peer_sap_ (thePeer),
- peer_sap_closed_ (1)
-// dest_site_ (-1)
-{
- this->dest_.target = this->peer_sap_.get_addr()->get_id();
-}
-
-
-ACE_CLASSIX_Stream::ACE_CLASSIX_Stream(const KnUniqueId& thePeer,
- const ACE_CLASSIX_Port& theLocal)
- : local_sap_ (theLocal),
- local_sap_closed_(0),
- local_port_ (0),
- peer_sap_ (thePeer),
- peer_sap_closed_ (1)
-// dest_site_ (-1)
-{
- this->dest_.target = this->peer_sap_.get_addr()->get_id();
-}
-
-int
-ACE_CLASSIX_Stream::set_local_port(ACE_CLASSIX_Port_Core* thePort)
-{
- delete this->local_port_;
- if (this->local_sap_.open(thePort) == 0)
- {
- this->local_port_ = thePort;
- return 0;
- }
- else
- {
- this->local_port_ = 0;
- this->local_sap_.clear();
- return -1;
- }
-}
-
-int
-ACE_CLASSIX_Stream::open(void)
-{
- this->dest_.target = this->peer_sap_.get_addr()->get_id();
- this->open_writer();
-
- if (!this->local_sap().is_configured() ||
- this->local_sap().get_handle() ==
- ACE_CLASSIX_DEFAULT_PORT::instance()->get_handle())
- {
- delete this->local_port_;
- ACE_NEW_RETURN(this->local_port_, ACE_CLASSIX_Port_Core(), -1);
- return this->local_sap_.open(this->local_port_);
- }
-
- return 0;
-}
-
-int
-ACE_CLASSIX_Stream::open(const ACE_Addr& theAddr)
-{
- this->dest_.target = this->peer_sap_.get_addr()->get_id();
- this->open_writer();
-
- if (!this->local_sap().is_configured() ||
- this->local_sap().get_handle() ==
- ACE_CLASSIX_DEFAULT_PORT::instance()->get_handle())
- {
- delete this->local_port_;
- if (theAddr.get_size() != this->local_sap().get_addr().get_size())
- return -1;
- return this->local_sap_.open(theAddr);
- }
- return 0;
-}
-
-int
-ACE_CLASSIX_Stream::close_writer(void)
-{
- if (this->peer_sap_closed_ == 0)
- {
- if (this->send_n(0, 0) < 0)
- ACE_DEBUG((LM_DEBUG, "failed to send a zero byte msg\n"));
- this->peer_sap_closed_ = 1;
- }
- return 0;
-}
-
-void
-ACE_CLASSIX_Stream::open_writer(void)
-{
- this->peer_sap_closed_ = 0;
-}
-
-int
-ACE_CLASSIX_Stream::close(void)
-{
- this->close_writer();
-
- this->local_sap_.close();
- if (this->local_port_)
- {
- delete this->local_port_;
- this->local_port_ = 0;
- }
- this->dest_.target = ACE_CLASSIX_OS::null_KnUniqueId();
- return 0;
-}
-
-void
-ACE_CLASSIX_Stream::set_target_()
-{
- this->dest_.target = this->peer_sap_.get_addr()->get_id();
-}
-
-int
-ACE_CLASSIX_Stream::set_peer_sap(const ACE_Addr& theAddr)
-{
- if (this->peer_sap_.set(theAddr) == 0)
- {
- this->set_target_();
- return 0;
- }
- return -1;
-}
-
-int
-ACE_CLASSIX_Stream::set_peer_sap(const ACE_CLASSIX_Port_Core& theAddr)
-{
- if (this->peer_sap_.set(theAddr) == 0)
- {
- this->set_target_();
- return 0;
- }
- return -1;
-}
-
-int
-ACE_CLASSIX_Stream::set_peer_sap(const KnUniqueId& theAddr)
-{
- if (this->peer_sap_.set(theAddr) == 0)
- {
- this->set_target_();
- return 0;
- }
- return -1;
-}
-
-int
-ACE_CLASSIX_Stream::set_peer_sap(const KnCap& theAddr)
-{
- if (this->peer_sap_.set(theAddr) == 0)
- {
- this->set_target_();
- return 0;
- }
- return -1;
-}
-
-ssize_t
-ACE_CLASSIX_Stream::send_n(const void* theBuf, size_t theLen, int theFlags)
-{
- if (!this->is_writer_closed())
- {
- this->set_mode_(theFlags);
- return this->send_n(theBuf, theLen);
- }
- else
- return 0;
-}
-
-ssize_t
-ACE_CLASSIX_Stream::send_n(const void* theBuf, size_t theLen) const
-{
- if (!this->is_writer_closed())
- {
- ACE_CLASSIX_Msg msg(theBuf, theLen);
- int result = 0;
- if ((result = ::ipcSend((KnMsgDesc*) msg.get(),
- this->local_sap().get_handle(),
- (KnIpcDest*) &this->dest_)) == 0)
- return theLen;
- else
- {
- errno = ACE_CLASSIX_OS::convert_io_error(result);
- return -1;
- }
- }
- else
- {
- return 0;
- }
-}
-
-ssize_t
-ACE_CLASSIX_Stream::reply(const void* theBuf, size_t theLen) const
-{
- if (!this->is_writer_closed())
- {
- ACE_CLASSIX_Msg msg(theBuf, theLen);
- if (int result = ::ipcReply((KnMsgDesc*) msg.get()) == 0)
- return theLen;
- else
- {
- errno = ACE_CLASSIX_OS::convert_io_error(result);
- return -1;
- }
- }
- else
- return 0;
-}
-
-ssize_t
-ACE_CLASSIX_Stream::ipcRecv(void* theBuf, size_t theLen,
- int theFlag, ACE_Time_Value* theTimeout) const
-{
- if (!this->is_reader_closed())
- {
- // In chorus environment, a negative value means block
- // until recv is possible
- int timeout = theTimeout == 0 ? -1 : theTimeout->msec();
- if (timeout == 0)
- timeout = -1;
-
- if (theFlag & MSG_PEEK)
- {
- theBuf = 0;
- theLen = 0;
- }
-
- ACE_CLASSIX_Msg rmsg(theBuf, theLen);
- int handle = this->local_sap().get_handle();
- int result = ::ipcReceive((KnMsgDesc*) rmsg.get(), &handle,
- timeout);
- if (result < 0)
- {
- errno = ACE_CLASSIX_OS::convert_io_error(result);
- return -1;
- }
- else
- return result;
- }
- else
- {
- errno = ENOTCONN;
- return -1;
- }
-}
-
-ssize_t
-ACE_CLASSIX_Stream::ipcRecv_n(void* theBuf, size_t theLen,
- int theFlag, ACE_Time_Value* theTimeout) const
-{
- // Timeout value applies to each around of receive.
- // ....Should be adjusted after each round!
- int len = 0;
- void *next = theBuf;
- size_t more = theLen;
- for (int n = 0;
- more > 0;
- len += n, next += n, more -=n)
- {
- if ((n = this->ipcRecv(next, more, theFlag, theTimeout)) == -1)
- break;
- }
- return len;
-}
-
-ssize_t
-ACE_CLASSIX_Stream::recv(void* theBuf, int theLen) const
-{
- if (!this->is_reader_closed())
- {
- ACE_CLASSIX_Msg rmsg(theBuf, theLen);
- int result = ::ipcGetData(rmsg.get());
- if (result >= 0)
- return result;
- else if (result == K_EINVAL)
- errno = EWOULDBLOCK;
- else
- errno = EFAULT;
-
- return -1;
- }
- else
- return 0;
-}
-
-
-
-void
-ACE_CLASSIX_Stream::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, "ACE_CLASSIX_Stream...\n"));
- ACE_DEBUG ((LM_DEBUG, "...local sap(%s)\n",
- this->is_writer_closed() == 1 ? "closed" : "opened"));
- if (this->local_port_)
- ACE_DEBUG ((LM_DEBUG, "\towns the local port(%x)\n",
- this->local_port_));
- this->local_sap().dump();
-
- ACE_DEBUG ((LM_DEBUG, "...Peer sap(%s & %s)\n",
- this->is_reader_closed() == 1 ? "closed" : "opened",
- this->is_selectable() ? "enabled" : "disabled"));
- this->peer_sap().dump();
- ACE_DEBUG((LM_DEBUG, "Dest- Target\n head = %x tail = %x\n",
- this->dest_.target.uiHead,
- this->dest_.target.uiTail
- /* this->dest_site_ */));
- ACE_DEBUG((LM_DEBUG, "Dest- coTarget\n head = %x tail = %x\n",
- this->dest_.coTarget.uiHead,
- this->dest_.coTarget.uiTail
- /* this->dest_site_ */));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
diff --git a/ace/CLASSIX/CLASSIX_Stream.h b/ace/CLASSIX/CLASSIX_Stream.h
deleted file mode 100644
index 0ebced26877..00000000000
--- a/ace/CLASSIX/CLASSIX_Stream.h
+++ /dev/null
@@ -1,272 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CLASSIX_Stream.h
-//
-// = AUTHOR(S)
-// Nokia Telecommunications
-//
-// ============================================================================
-
-#ifndef ACE_CLASSIX_STREAM_H
-#include "ace/pre.h"
-#define ACE_CLASSIX_STREAM_H
-
-/* ------------------------------------------------------------------------- */
-#include "ace/CLASSIX/CLASSIX_SAP.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/CLASSIX/CLASSIX_Peer_SAP.h"
-#include "ace/CLASSIX/CLASSIX_Port_Default.h"
-
-class ACE_CLASSIX_Stream
- // = TITLE
- // Provides the stream interface for CLASSIX IPC communications.
- //
- // = DESCRIPTION
- // This classes provides a stream wrapper over CLASSIX'
- // IPC. It is designed to be an alternative to Stream type of
- // communication in the UNIX AF_INET environment.
- //
- // To the user, the stream is connection-oriented. The stream
- // is implemented on top of IPC, it is connectionless and its
- // reliability is as good as what the raw IPC can offer.
- //
- // Since CLASSIX IPC is not intended to go across wide area network,
- // it can be seen as an
- // alternative to AF_INET's connection oriented stream, even though
- // the CLASSIX IPC is connectionless.
- //
- // This class contains a local sap, peer sap and data holding
- // delivery mode information.
- //
- // When a stream is created, the peer SAP information must be provided.
- // The local SAP information may be provided in the constructor or
- // open(). The local SAP information given in open() overrides the
- // existing one. If the local SAP address is not given at all, it will
- // allocate a port and use it as the local SAP.
- //
-{
- public:
- ACE_CLASSIX_Stream(void);
- // Default constructor, does not setup anything
- ACE_CLASSIX_Stream(const ACE_CLASSIX_Port_Core&, /* remote port */
- const ACE_CLASSIX_Port& =
- *ACE_CLASSIX_DEFAULT_PORT::instance()); /* local address */
-
- ACE_CLASSIX_Stream(const ACE_CLASSIX_Port&, /* remote port address */
- const ACE_CLASSIX_Port& =
- *ACE_CLASSIX_DEFAULT_PORT::instance());/* local address */
-
- ACE_CLASSIX_Stream(const KnUniqueId&, /* remote port address */
- const ACE_CLASSIX_Port& =
- *ACE_CLASSIX_DEFAULT_PORT::instance());/* local address */
-
- // = IO
- // Returns -1, if fault has occured during receive. errno contains
- // the error condition.
- // Returns no of bytes received/sent, otherwise.
- //
- virtual ssize_t send_n (const void *, /* buf */
- size_t, /* n */
- int /* flags */);
- // Sends exactly n bytes (keep trying until n bytes are sent)
- virtual ssize_t send_n (const void *, /* buf */ size_t /* n */) const;
- // Sends n bytes(keep trying until n bytes are sent)
- // Uses the current addressing mode
- virtual ssize_t send (const void *, /* buf */
- size_t, /* n */
- int /* flags */);
- // Sends n bytes. Same as send_n(buf, n, flag)
- virtual ssize_t send (const void *, /* buf */
- size_t /* n */) const;
- // Sends n bytes. same as send_n(buf, n).
- virtual ssize_t reply (const void *, /* buf */
- size_t /* n */) const;
- // Sends n bytes to the sender of the cureent thread's current message.
-
- ssize_t ipcRecv (void *, /* buffer */
- size_t, /* length */
- int = 0, /* flag: 0 or MSG_PEEK */
- ACE_Time_Value* = 0) const; /* timeout */
- // Recv an <n> byte buffer
- // Wait up to <timeout> amount of time to receive up to <n> bytes
- // into <buf> from <handle> (uses the <recv> call). If <recv> times
- // out a -1 is returned with <errno == ETIMEOUT>. If it succeeds the
- // number of bytes received is returned.
- // If <timeout> == 0, the caller
- // will block until action is possible, else will wait until the
- // relative time specified in *<timeout> elapses).
- ssize_t ipcRecv_n (void *, /* buffer */
- size_t, /* length */
- int = 0, /* flag: 0 or MSG_PEEK */
- ACE_Time_Value* = 0) const; /* timeout */
- // Continue until receives n bytes of data or an error has occurred.
- // Retruns the no of bytes actually received.
- // If it is less than expected, errno contains error info.
-
- ssize_t peek(ACE_Time_Value* = 0 /* timeout */) const;
- // It is the same as recv(0, 0, MSG_PEEK, timeout)
- // This must be followd by get_data() in order to read the peeked message
- ssize_t recv(void* /*buf */, int /* len */) const;
- // Gets data which have been peeked
- ssize_t recv_n(void* /*buf */, int /* len */) const;
- // Gets data which have been peeked
-
- // = ACCESS
- virtual ACE_HANDLE get_handle (void) const;
- // virtual void set_handle (ACE_HANDLE);
- virtual void set_handle(ACE_HANDLE);
- // set the local port's address according to the supplied handle
-
- const ACE_CLASSIX_SAP& local_sap(void) const;
- // Returns read-only local sap
- const ACE_CLASSIX_Peer_SAP& peer_sap(void) const;
- // Returns read-only peer sap
- int get_remote_addr (ACE_Addr & /* dest */) const;
- // Returns 0, if the remote address has been setup, else -1.
- // The <dest> parameter is not changed.
- // This method is here for compatability with SOCK_Stream.
- // Since the remote addr may be a port or a group and since the
- // address formats are different between a port and a group, the caller
- // cannot provide an appropriate buffer for recording the address. The
- // <dest> parameter is therefore not used.
-
-
- const ACE_CLASSIX_Port& local_addr(void) const;
- // Returns local address in <ACE_CLASSIX_Port> format
-
- int is_selectable(void) const;
- // Retruns 1, if the local SAP is enabled.
- int is_writer_closed(void) const;
- // Retruns 1, if writer side is closed.
- int is_reader_closed(void) const;
- // Retruns 1, if reader side is closed.
-
-
- // = CONTROL
- int set_peer_sap(const ACE_Addr&);
- // Returns 0, if successful; returns -1, otherwise
- // same as set_addr(const ACE_Addr&);
- int set_peer_sap(const ACE_CLASSIX_Port_Core&);
- // Returns 0, if successful; returns -1, otherwise
- // same as void set_addr(const ACE_CLASSIX_Port_Core&);
- int set_peer_sap (const KnUniqueId&);
- // Returns 0, if successful; returns -1, otherwise
- int set_peer_sap (const KnCap&);
- // Returns 0, if successful; returns -1, otherwise
-
- virtual int enable(int) const;
- virtual int disable(int) const;
- // These two methods do nothing. They are here to maintain the same
- // interface as other type of Stream class, e.g. ACE_SOCK_Stream
-
- int selectable(int = ACE_CLASSIX_SAP::DEFAULT_PRIORITY);
- int unselectable(void);
- // Enables/Disables the local port to be monitored (by a CLASSIX reactor)
- // Default = DISABLED
- virtual void open_writer(void);
- virtual int close_writer(void);
- // Closes down the writer
- // Returns -1, if it fails; returns 0, otherwise
- // Subclass can overwrite this with sophisticated mechanism, such as
- // exchange protocol information with the peer.
- virtual int close_reader(void);
- // Closes down the writer
- // Returns -1, if it fails; returns 0, otherwise
- // Subclass can overwrite this with sophisticated mechanism, such as
- // exchange protocol information with the peer.
-
- virtual int open(void);
- // for local SAP...
- // Creates a port and uses it as a SAP.
- // A port can be created if the local_sap is not configured or
- // it is configured and the local_sap uses the actor's default port.
- // Returns -1, if it fails; returns 0, otherwise
- virtual int open(const ACE_Addr&);
- // for local SAP...
- // Uses the supplied port information for the local SAP.
- virtual int close(void);
- // for local SAP...
- // Deletes the optional local port and clears the local SAP infomration.
-
- // = OPTIONS
- int control(u_int = K_BROADMODE);
- int control(u_int, /* mode */ int /* site */ );
- // Interface for CLASSIX' send mode
-
- // = HELPER
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- protected:
- friend class ACE_CLASSIX_CLD_Connector;
- friend class ACE_CLASSIX_CO_Connector;
- friend class ACE_CLASSIX_CO_Acceptor;
- ACE_CLASSIX_SAP& get_local_sap(void);
- // Returns local sap
- ACE_CLASSIX_Peer_SAP& get_peer_sap(void);
- // Returns peer sap
- int set_local_port(ACE_CLASSIX_Port_Core*);
- // Uses the supplied port as the local port and assumes the ownership
- // of the port. The existing local port, if any, will be deleted.
- // Returns 0, if it is successful.
- // Returns -1, otherwise. The setting of the original local port
- // will be erased.
-
- void set_target_(void);
- // set the delivery target structure using the existing peer information
-
- virtual int set_mode_(u_int = K_BROADMODE); /* theMode */
- // Sets the addressing mode with the current setting of coTarget
- virtual int set_mode_(u_int, /* mode */ int /* site */);
- // Sets the addressing mode as well as the coTarget
-
- ACE_CLASSIX_SAP local_sap_;
- int local_sap_closed_;
- // 0 if it's not closed(default),
- // 1 if it's closed.
- ACE_CLASSIX_Port_Core *local_port_;
- // if non-zero, it will be
- // deleted on exit.
-
- ACE_CLASSIX_Peer_SAP peer_sap_;
- int peer_sap_closed_;
- // 0 if it's not closed(default),
- // 1 if it's closed.
-
- // Mode applied destination address
- // Can be changed by control()/set_mode_()
- // Mode is applicable in IPC classes other than the Stream class.
- // It is here since it is the destination format used by ipcSend.
-
- // with/without additional site information
- // int dest_site_;
- KnIpcDest dest_;
-
- private:
- // Disable copy constructor
- ACE_CLASSIX_Stream(ACE_CLASSIX_Stream const&);
- ACE_CLASSIX_Stream const& operator=(ACE_CLASSIX_Stream const&);
-};
-
-/* ------------------------------------------------------------------------- */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CLASSIX/CLASSIX_Stream.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_CLASSIX_Stream_H */
diff --git a/ace/CLASSIX/CLASSIX_Stream.i b/ace/CLASSIX/CLASSIX_Stream.i
deleted file mode 100644
index a876a3d78c9..00000000000
--- a/ace/CLASSIX/CLASSIX_Stream.i
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_CLASSIX_Stream::~ACE_CLASSIX_Stream(void)
-{
- this->close();
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::control(u_int theMode)
-{
- return this->set_mode_(theMode);
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::control(u_int theMode, int theSite)
-{
- return this->set_mode_(theMode, theSite);
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::set_mode_(u_int theMode)
-{
- return 0;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::set_mode_(u_int theMode, int theSite)
-{
- return 0;
-}
-
-ACE_INLINE
-ssize_t
-ACE_CLASSIX_Stream::peek(ACE_Time_Value* theTimeout) const
-{
- return this->ipcRecv(0, 0, MSG_PEEK, theTimeout);
-}
-
-ACE_INLINE
-ssize_t
-ACE_CLASSIX_Stream::send(const void *theBuf, size_t theLen) const
-{
- return this->send_n(theBuf, theLen);
-}
-
-ACE_INLINE
-ssize_t
-ACE_CLASSIX_Stream::send(const void *theBuf,size_t theLen, int theFlag)
-{
- return this->send_n(theBuf, theLen, theFlag);
-}
-
-ACE_INLINE
-ssize_t
-ACE_CLASSIX_Stream::recv_n(void* theBuf, int theLen) const
-{
- return this->recv_n(theBuf, theLen);
-}
-
-ACE_INLINE
-ACE_HANDLE
-ACE_CLASSIX_Stream::get_handle(void) const
-{
- return this->local_sap_.get_handle();
-}
-
-ACE_INLINE
-void
-ACE_CLASSIX_Stream::set_handle(ACE_HANDLE theHandle)
-{
- this->local_sap_.set_handle(theHandle);
-}
-
-ACE_INLINE
-const ACE_CLASSIX_SAP&
-ACE_CLASSIX_Stream::local_sap(void) const
-{
- return this->local_sap_;
-}
-
-ACE_INLINE
-const ACE_CLASSIX_Peer_SAP&
-ACE_CLASSIX_Stream::peer_sap(void) const
-{
- return this->peer_sap_;
-}
-
-ACE_INLINE
-ACE_CLASSIX_SAP&
-ACE_CLASSIX_Stream::get_local_sap(void)
-{
- return this->local_sap_;
-}
-
-ACE_INLINE
-ACE_CLASSIX_Peer_SAP&
-ACE_CLASSIX_Stream::get_peer_sap(void)
-{
- return this->peer_sap_;
-}
-
-ACE_INLINE
-const ACE_CLASSIX_Port&
-ACE_CLASSIX_Stream::local_addr(void) const
-{
- return this->local_sap_.get_addr();
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::selectable(int thePriority)
-{
- return this->local_sap_.selectable(thePriority);
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::unselectable(void)
-{
- return this->local_sap_.unselectable();
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::is_selectable(void) const
-{
- return this->local_sap_.is_selectable();
-}
-
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::is_writer_closed(void) const
-{
-
- return (this->peer_sap_closed_ == 1);
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::close_reader(void)
-{
- this->local_sap_closed_ = 1;
- return 0;
-}
-
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::is_reader_closed(void) const
-{
-
- return this->local_sap_closed_ == 1;
-}
-
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::enable(int) const
-{
- return 0;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::disable(int) const
-{
- return 0;
-}
-
-ACE_INLINE
-int
-ACE_CLASSIX_Stream::get_remote_addr(ACE_Addr&) const
-{
- return this->peer_sap_closed_ == 0;
-}
diff --git a/ace/CLASSIX/Makefile b/ace/CLASSIX/Makefile
deleted file mode 100644
index a207ce3da0e..00000000000
--- a/ace/CLASSIX/Makefile
+++ /dev/null
@@ -1,544 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Makefile for the entire ACE release
-#----------------------------------------------------------------------------
-
-MAKEFILE = Makefile
-LIB = libCLASSIX.a
-
-FILES = \
- CLASSIX_OS \
- CLASSIX_Select_Reactor \
- CLASSIX_Addr \
- CLASSIX_Port_Core \
- CLASSIX_Port \
- CLASSIX_Port_Default \
- CLASSIX_Group \
- CLASSIX_Group_Stamp \
- CLASSIX_Group_Dynamic \
- CLASSIX_SAP \
- CLASSIX_Peer_SAP \
- CLASSIX_Stream \
- CLASSIX_Dgram_Mcast \
- CLASSIX_CO_Acceptor \
- CLASSIX_CO_Connector \
- CLASSIX_CLD_Connector
-
-DEFS = $(addsuffix .h,$(FILES)) Svc_Conf_Tokens.h
-DEFS += $(addsuffix .i,$(FILES))
-LSRC = $(addsuffix .cpp,$(FILES))
-
-BUILD = $(VLIB)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-#### Disable installs in this ($(ACE_ROOT)/ace) directory, because this
-#### is the (default) destination of installs anyways. And this will prevent
-#### creation of a link from the ACE library to itself when the build of
-#### the ACE library fails.
-INSTALL =
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets
-#----------------------------------------------------------------------------
-
-#### Setting ACELIB to null allows it to be used for building shared libraries,
-#### including libACE.$(SOEXT,) on certain platforms.
-ACELIB =
-
-
-ifeq ($(SUPPRESS_DASH_G),1)
-#### Build this target without -g on some platforms.
- $(COMPILE-NO_DASH_G.cc) -o $@ $<
-endif # SUPPRESS_DASH_G
-
-ifeq ($(CHORUS),1)
- ifeq ($(CC),$(GHS_DIR)/build -driver ch68)
- #### Build this target without -g, because it causes ghs 1.8.8 to core
- #### dump.
- $(VDIR)Select_Reactor.o .obj/Select_Reactor.so .shobj/Select_Reactor.o .shobj/Select_Reactor.so:
- $(COMPILE-NO_DASH_G.cc) -o $@ $<
- endif # CC
-endif # CHORUS
-
-ifneq ($(GHS),)
- ifeq ($(CPU),86)
- $(VDIR)gethrtime.$(OBJEXT):
- make $@ ghs=0
- endif # 86
-endif # GHS
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/CLASSIX_OS.o .obj/CLASSIX_OS.so .shobj/CLASSIX_OS.o .shobj/CLASSIX_OS.so: CLASSIX_OS.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_OS.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/config-g++-common.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Core.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Core.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_OS.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Select_Reactor.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_SAP.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_SAP.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Select_Reactor.i
-.obj/CLASSIX_Select_Reactor.o .obj/CLASSIX_Select_Reactor.so .shobj/CLASSIX_Select_Reactor.o .shobj/CLASSIX_Select_Reactor.so: CLASSIX_Select_Reactor.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Select_Reactor.h \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/config-g++-common.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_SAP.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_OS.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Core.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Core.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_OS.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_SAP.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Select_Reactor.i
-.obj/CLASSIX_Addr.o .obj/CLASSIX_Addr.so .shobj/CLASSIX_Addr.o .shobj/CLASSIX_Addr.so: CLASSIX_Addr.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/config-g++-common.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.i
-.obj/CLASSIX_Port_Core.o .obj/CLASSIX_Port_Core.so .shobj/CLASSIX_Port_Core.o .shobj/CLASSIX_Port_Core.so: CLASSIX_Port_Core.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Core.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/config-g++-common.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Core.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_OS.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_OS.i
-.obj/CLASSIX_Port.o .obj/CLASSIX_Port.so .shobj/CLASSIX_Port.o .shobj/CLASSIX_Port.so: CLASSIX_Port.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/config-g++-common.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_OS.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Core.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Core.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_OS.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port.i
-.obj/CLASSIX_Port_Default.o .obj/CLASSIX_Port_Default.so .shobj/CLASSIX_Port_Default.o .shobj/CLASSIX_Port_Default.so: CLASSIX_Port_Default.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Default.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/config-g++-common.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_OS.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Core.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Core.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_OS.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port_Default.i
-.obj/CLASSIX_Group.o .obj/CLASSIX_Group.so .shobj/CLASSIX_Group.o .shobj/CLASSIX_Group.so: CLASSIX_Group.cpp \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Group.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/config.h \
- $(ACE_ROOT)/ace/config-g++-common.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Addr.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port.h \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Port.i \
- $(ACE_ROOT)/ace/CLASSIX/CLASSIX_Group.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/ace/CORBA_Handler.cpp b/ace/CORBA_Handler.cpp
deleted file mode 100644
index a4d20ae153b..00000000000
--- a/ace/CORBA_Handler.cpp
+++ /dev/null
@@ -1,593 +0,0 @@
-// CORBA_Handler.cpp
-// $Id$
-
-#include "ace/CORBA_Handler.h"
-
-#include "ace/Object_Manager.h"
-#include "ace/Thread_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/CORBA_Handler.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, CORBA_Handler, "$Id$")
-
-#if defined (ACE_HAS_ORBIX) && (ACE_HAS_ORBIX != 0)
-ACE_ALLOC_HOOK_DEFINE(ACE_ST_CORBA_Handler)
-ACE_ALLOC_HOOK_DEFINE(ACE_CORBA_Handler)
-
-void
-ACE_CORBA_Handler::dump (void) const
-{
- ACE_TRACE ("ACE_CORBA_Handler::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nreference_count_ = %d"), this->reference_count_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_CORBA_Handler::ACE_CORBA_Handler (const ACE_CORBA_Handler &rhs)
-{
- ACE_TRACE ("ACE_CORBA_Handler::ACE_CORBA_Handler");
-}
-
-const ACE_CORBA_Handler &
-ACE_CORBA_Handler::operator= (const ACE_CORBA_Handler &rhs)
-{
- ACE_TRACE ("ACE_CORBA_Handler::operator=");
- return *this;
-}
-
-void
-ACE_ST_CORBA_Handler::dump (void) const
-{
- ACE_TRACE ("ACE_ST_CORBA_Handler::dump");
-
- ACE_CORBA_Handler::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), this->instance_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\niteration_ = %d"), this->iterations_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_CORBA_Handler::~ACE_CORBA_Handler (void)
-{
- ACE_TRACE ("ACE_CORBA_Handler::~ACE_CORBA_Handler");
-}
-
-ACE_CORBA_Handler::ACE_CORBA_Handler (void)
- : reference_count_ (0)
-{
- ACE_TRACE ("ACE_CORBA_Handler::ACE_CORBA_Handler");
- reactor (ACE_Reactor::instance ());
-}
-
-// Only one ST CORBA Handler per-process...
-/* static */
-ACE_ST_CORBA_Handler *ACE_ST_CORBA_Handler::instance_ = 0;
-
-#if defined (ACE_TAKEOVER_ORBIX_CALLBACKS)
-// Define the class statics
-int ACE_ST_CORBA_Handler::set_callbacks_ = 0;
-OrbixIOCallback ACE_ST_CORBA_Handler::previous_orbix_open_callback_ = 0;
-OrbixIOCallback ACE_ST_CORBA_Handler::previous_orbix_close_callback_ = 0;
-#endif /* ACE_TAKEOVER_ORBIX_CALLBACKS */
-
-
-// Insert a descriptor into the ACE_Reactor that Orbix has just added.
-
-/* static */
-void
-ACE_ST_CORBA_Handler::insert_handle (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_ST_CORBA_Handler::insert_handle");
-// ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("+++ inserting %d\n"), handle));
-
-#if defined (ACE_TAKEOVER_ORBIX_CALLBACKS)
- if (ACE_ST_CORBA_Handler::previous_orbix_open_callback_ != 0)
- ACE_ST_CORBA_Handler::previous_orbix_open_callback_ (handle);
-#endif /* ACE_TAKEOVER_ORBIX_CALLBACKS */
-
- if (ACE_ST_CORBA_Handler::instance_ == 0)
- return;
-
- if (ACE_ST_CORBA_Handler::instance_->reactor() != 0)
- ACE_ST_CORBA_Handler::instance_->reactor()->register_handler
- (handle, ACE_ST_CORBA_Handler::instance_, ACE_Event_Handler::READ_MASK);
- else
- ;
-// ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("insert_handle: reactor NULL\n")));
-}
-
-// Remove a descriptor from the ACE_Reactor that Orbix has just deleted.
-
-/* static */
-void
-ACE_ST_CORBA_Handler::remove_handle (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_ST_CORBA_Handler::remove_handle");
-// ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("--- removing %d\n"), handle));
-
-#if defined (ACE_TAKEOVER_ORBIX_CALLBACKS)
- if (ACE_ST_CORBA_Handler::previous_orbix_close_callback_ != 0)
- ACE_ST_CORBA_Handler::previous_orbix_close_callback_ (handle);
-#endif /* ACE_TAKEOVER_ORBIX_CALLBACKS */
-
- if (ACE_ST_CORBA_Handler::instance_ == 0)
- return;
-
- if (ACE_ST_CORBA_Handler::instance_->reactor () != 0)
- ACE_ST_CORBA_Handler::instance_->reactor ()->remove_handler
- (handle, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL);
- else
- ;
-// ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("remove_handle: reactor NULL\n")));
-}
-
-/* static */
-void ACE_ST_CORBA_Handler::instance_cleaner (void *object, void *param)
-{
- ACE_UNUSED_ARG (param);
- delete ACE_reinterpret_cast (ACE_ST_CORBA_Handler *, object);
- return;
-}
-
-
-// Process the next Orbix event.
-
-int
-ACE_ST_CORBA_Handler::handle_input (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_ST_CORBA_Handler::handle_input");
- // ACE_DEBUG ((LM_DEBUG, "dispatching Orbix handle = %d in process
- // = %P\n", handle));
-
- TRY {
- // Loop up to <ACE_ST_CORBA_Handler::iterations_> dispatching the
- // next event. Note the trade off between efficiency and
- // fairness...
-
- for (size_t i = 0; i < this->iterations_; i++)
- if (ACE_CORBA_1 (Orbix.isEventPending) (IT_X))
- // Process the next Orbix event (don't block).
- ACE_CORBA_1 (Orbix.processNextEvent) (0, IT_X);
- else
- break;
- }
- CATCHANY {
- // an error occured calling processNextEvent () - output the
- // error.
- cerr << IT_X << endl;
- } ENDTRY;
- return 0;
-}
-
-int
-ACE_ST_CORBA_Handler::suspend (void)
-{
- // Create an iterator.
- ACE_Handle_Set set (ACE_CORBA_1 (Orbix.getFileDescriptors) ());
- ACE_Handle_Set_Iterator orbix_descriptors (set);
-
- // Suspend all the HANDLEs registered by Orbix.
- for (ACE_HANDLE h;
- (h = orbix_descriptors ()) != ACE_INVALID_HANDLE;
- ++orbix_descriptors)
- this->reactor ()->suspend_handler (h);
-
- return 0;
-}
-
-int
-ACE_ST_CORBA_Handler::resume (void)
-{
- // Create an iterator.
- ACE_Handle_Set set (ACE_CORBA_1 (Orbix.getFileDescriptors) ());
- ACE_Handle_Set_Iterator orbix_descriptors (set);
-
- // Resume all the HANDLEs registered by Orbix.
- for (ACE_HANDLE h;
- (h = orbix_descriptors ()) != ACE_INVALID_HANDLE;
- ++orbix_descriptors)
- this->reactor ()->resume_handler (h);
-
- return 0;
-}
-
-// Dummy constructor.
-ACE_ST_CORBA_Handler::ACE_ST_CORBA_Handler (void)
-{
- ACE_TRACE ("ACE_ST_CORBA_Handler::ACE_ST_CORBA_Handler");
-
- // This is set by default for backward compatibility. The user can
- // use the set/get operations to change the iterations
- this->iterations_ = 5;
-
- // Set up the callbacks so that we get informed when Orbix changes
- // its descriptors.
- OrbixIOCallback old_open, old_close;
-
- old_open = ACE_CORBA_1 (Orbix.registerIOCallback) ((OrbixIOCallback) &ACE_ST_CORBA_Handler::insert_handle,
- FD_OPEN_CALLBACK);
- old_close = ACE_CORBA_1 (Orbix.registerIOCallback) ((OrbixIOCallback) &ACE_ST_CORBA_Handler::remove_handle,
- FD_CLOSE_CALLBACK);
-#if defined (ACE_TAKEOVER_ORBIX_CALLBACKS)
- if (ACE_ST_CORBA_Handler::set_callbacks_ == 0)
- {
- ACE_ST_CORBA_Handler::previous_orbix_open_callback = old_open;
- ACE_ST_CORBA_Handler::previous_orbix_close_callback = old_close;
- ACE_ST_CORBA_Handler::set_callbacks_ = 1;
- }
-#endif
-}
-
-void
-ACE_ST_CORBA_Handler::get_orbix_descriptors (void)
-{
- // Create an iterator.
- ACE_Handle_Set set (ACE_CORBA_1 (Orbix.getFileDescriptors) ());
- ACE_Handle_Set_Iterator orbix_descriptors (set);
-
- // Preinitialize anything that's already registered.
- for (ACE_HANDLE h;
- (h = orbix_descriptors ()) != ACE_INVALID_HANDLE;
- ++orbix_descriptors)
- ACE_ST_CORBA_Handler::insert_handle (h);
-}
-
-// Register <service_name> by doing a "putit" to register the
-// <service_name> using the <marker_name> at <service_location> with
-// orbixd.
-
-/* static */
-int
-ACE_CORBA_Handler::register_service (const char *service_name,
- const char *marker_name,
- const char *service_location)
-{
- ACE_TRACE ("ACE_CORBA_Handler::register_service");
- char buf[BUFSIZ * 2]; // I hope this is enough space...
-
- // Be defensive here...
- if (service_name == 0 || service_location == 0)
- {
- errno = EINVAL;
- return -1;
- }
- else if (marker_name == 0)
- ACE_OS::sprintf (buf, "putit %s %s", service_name, service_location);
- else
- ACE_OS::sprintf (buf, "putit -marker %s %s %s",
- marker_name, service_name, service_location);
-
- return ACE_OS::system (buf); // Use system(3S) to execute Orbix putit.
-}
-
-// Register <service_name> by doing a "putit" to register
-// <service_name> using the <marker_name> with orbixd.
-
-/* static */
-int
-ACE_CORBA_Handler::remove_service (const char *service_name,
- const char *marker_name)
-{
- ACE_TRACE ("ACE_CORBA_Handler::remove_service");
- char buf[BUFSIZ * 2]; // I hope this is enough space!
- if (service_name == 0)
- {
- errno = EINVAL;
- return -1;
- }
- else if (marker_name == 0)
- ACE_OS::sprintf (buf, "rmit %s\n", service_name);
- else
- ACE_OS::sprintf (buf, "rmit -marker %s %s\n", marker_name, service_name);
- return ACE_OS::system (buf); // Use system(3S) to execute Orbix rmit.
-}
-
-ACE_ST_CORBA_Handler::~ACE_ST_CORBA_Handler (void)
-{
- ACE_TRACE ("ACE_ST_CORBA_Handler::~ACE_ST_CORBA_Handler");
- // Create an iterator.
- ACE_Handle_Set set (ACE_CORBA_1 (Orbix.getFileDescriptors) ());
- ACE_Handle_Set_Iterator orbix_descriptors (set);
-
- // Remove everything!
-
- for (ACE_HANDLE h;
- (h = orbix_descriptors ()) != ACE_INVALID_HANDLE;
- ++orbix_descriptors)
- ACE_ST_CORBA_Handler::remove_handle (h);
-
- // Keep Orbix from calling us back and crashing the system!
- ACE_CORBA_1 (Orbix.registerIOCallback) (0, FD_OPEN_CALLBACK);
- ACE_CORBA_1 (Orbix.registerIOCallback) (0, FD_CLOSE_CALLBACK);
- ACE_ST_CORBA_Handler::instance_ = 0;
-}
-
-// Decrement the reference count and free up all the resources if this
-// is the last service to be using the ACE_ST_CORBA_Handler...
-
-/* static */
-int
-ACE_CORBA_Handler::deactivate_service (const char *service_name,
- const char *marker_name)
-{
- ACE_TRACE ("ACE_CORBA_Handler::deactivate_service");
- if (service_name != 0
- && this->remove_service (service_name, marker_name) == -1)
- return -1;
-
- int ref_count = this->reference_count_;
-
- this->reference_count_--;
-
- // Close everything down if the count drops to 0.
- if (this->reference_count_ == 0)
- // Commit suicide!
- delete this;
-
- if (ref_count < 0)
- ;
-// ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("warning, reference count == %d\n"),
-// ref_count));
- return 0;
-}
-
-/* static */
-ACE_CORBA_Handler *
-ACE_ST_CORBA_Handler::instance (void)
-{
- ACE_TRACE ("ACE_ST_CORBA_Handler::instance");
-
- // Note that this does not need a double-check since it should be
- // called from a single-threaded environment.
-
- if (ACE_ST_CORBA_Handler::instance_ == 0)
- {
- ACE_NEW_RETURN (ACE_ST_CORBA_Handler::instance_,
- ACE_ST_CORBA_Handler,
- 0);
- // Set up so that instance_cleaner() is called to destroy the instance
- // at program shutdown when the static objects are destroyed.
- // This should be _before_ the singleton reactor is destroyed since
- // cleanup objects are destroyed in LIFO order, and if the reactor
- // is not yet created, it will be by ACE_CORBA_Handler's constructor,
- // executed during ACE_NEW_RETURN, above.
- ACE_Object_Manager::at_exit (ACE_ST_CORBA_Handler::instance_,
- &ACE_ST_CORBA_Handler::instance_cleaner,
- 0);
-
- ACE_ST_CORBA_Handler::instance_->get_orbix_descriptors ();
- }
-
- return ACE_ST_CORBA_Handler::instance_;
-}
-
-// Activate and register <service_name> with the Orbix daemon. If
-// <marker_name> and <service_location> are != 0 then do a "putit" to
-// register this service with orbixd. This method also increments the
-// reference count of active services using the ACE_ST_CORBA_Handler.
-
-int
-ACE_CORBA_Handler::activate_service (const char *service_name,
- const char *marker_name,
- const char *service_location)
-{
- ACE_TRACE ("ACE_CORBA_Handler::activate_service");
- // Since the ACE_CORBA_Handler is a singleton, make sure not to
- // allocate and initialize more than one copy. By incrementing the
- // reference count we ensure this.
-
- this->reference_count_++;
-
- if (service_name != 0 && service_location != 0
- && this->register_service (service_name, marker_name,
- service_location) == -1)
- return -1;
-
- // Tell Orbix that we have completed the server's initialization.
- // Note that we don't block by giving a timeout of 0...
-
- TRY {
- ACE_CORBA_1 (Orbix.impl_is_ready) ((char *) service_name, 0, IT_X);
- } CATCHANY {
- return -1;
- } ENDTRY
-
- return 0;
-}
-
-#if defined (ACE_HAS_MT_ORBIX) && (ACE_HAS_MT_ORBIX != 0)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_MT_CORBA_Handler)
-
-void
-ACE_MT_CORBA_Handler::dump (void) const
-{
- ACE_TRACE ("ACE_MT_CORBA_Handler::dump");
- ACE_CORBA_Handler::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), this->instance_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_mgr_ = %x"), this->thr_mgr_));
- this->pipe_.dump ();
- ACE_MT (ACE_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_MT_CORBA_HANDLER_LOCK);
- if (lock != 0) lock->dump ());
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Only one MT CORBA Handler per-process...
-/* static */
-ACE_MT_CORBA_Handler *ACE_MT_CORBA_Handler::instance_ = 0;
-
-/* static */
-ACE_CORBA_Handler *
-ACE_MT_CORBA_Handler::instance (void)
-{
- ACE_TRACE ("ACE_MT_CORBA_Handler::instance");
-
- if (ACE_MT_CORBA_Handler::instance_ == 0)
- {
- ACE_MT (ACE_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_MT_CORBA_HANDLER_LOCK);
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *lock, 0));
-
- if (ACE_MT_CORBA_Handler::instance_ == 0)
- ACE_NEW_RETURN (ACE_MT_CORBA_Handler::instance_,
- ACE_MT_CORBA_Handler, 0);
- }
-
- return ACE_MT_CORBA_Handler::instance_;
-}
-
-int
-ACE_MT_CORBA_Handler::suspend (void)
-{
- // Suspend the event handler listening for new CORBA requests to
- // dispatch.
- this->reactor ()->suspend_handler (this->pipe_.read_handle ());
-
- // Suspend the daemon thread.
- this->thr_mgr ()->suspend_all ();
- return 0;
-}
-
-int
-ACE_MT_CORBA_Handler::resume (void)
-{
- // Resume the event handler listening for new CORBA requests to
- // dispatch.
- this->reactor ()->resume_handler (this->pipe_.read_handle ());
-
- // Resume the daemon thread.
- this->thr_mgr ()->resume_all ();
- return 0;
-}
-
-ACE_MT_CORBA_Handler::ACE_MT_CORBA_Handler (void)
-{
- ACE_TRACE ("ACE_MT_CORBA_Handler::ACE_MT_CORBA_Handler");
- this->thr_mgr (ACE_Thread_Manager::instance ());
-
- int result = 0;
-
- if (this->pipe_.open () == -1)
- result = -1;
- // Register one end of the pipe with the reactor with a READ mask.
- else if (this->reactor ()->register_handler
- (this->pipe_.read_handle (), this, ACE_Event_Handler::READ_MASK) == -1)
- result = -1;
- // Create a new thread that processes events for the Orbix event
- // queue.
- else if (this->thr_mgr ()->spawn (ACE_THR_FUNC (ACE_MT_CORBA_Handler::process_events),
- 0, THR_DETACHED | THR_NEW_LWP) == -1)
- result = -1;
-
- if (result == -1)
- {
- delete ACE_MT_CORBA_Handler::instance_;
- ACE_MT_CORBA_Handler::instance_ = 0;
- }
-}
-
-void *
-ACE_MT_CORBA_Handler::process_events (void *)
-{
- ACE_TRACE ("ACE_MT_CORBA_Handler::process_events");
-
- // Special knowlege, we "know" that we are dealing with a singleton
- // and that we are invoked in a context where the mutex controlling
- // instance creation is held, so by the time we get the mutex
- // the instance must exist.
- if (ACE_MT_CORBA_Handler::instance_ == 0)
- {
- ACE_MT (ACE_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_MT_CORBA_HANDLER_LOCK);
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *lock, 0));
-
- ACE_ASSERT (ACE_MT_CORBA_Handler::instance_ != 0);
- }
-
- ACE_Thread_Control t (ACE_MT_CORBA_Handler::instance_->thr_mgr ());
-
- // This thread only processes events.
- TRY {
- // it is OK to block
- ACE_CORBA_1 (Orbix.processEvents) (ACE_CORBA_1 (Orbix.INFINITE_TIMEOUT), IT_X);
- } CATCHANY {
- // An error occured calling processEvents () - output the error.
- cerr << IT_X << endl;
- } ENDTRY;
-
- // Thread dies if we reach here : error occured in processEvents.
- return 0;
-}
-
-int
-ACE_MT_CORBA_Handler::inRequestPreMarshal (ACE_CORBA_1 (Request) &req,
- ACE_CORBA_1 (Environment) &IT_env)
-{
- ACE_TRACE ("ACE_MT_CORBA_Handler::inRequestPreMarshal");
-
- // Pump the request through the pipe.
- u_long request_addr = (u_long) &req;
-
- ssize_t result = ACE::send (this->pipe_.write_handle (),
- (const char *) &request_addr,
- sizeof request_addr);
-
- if (result != sizeof request_addr)
- {
- // Don't continue with request
- return 0;
- }
-
- // Everything is fine: we have delegated the work to a different
- // thread Tell Orbix we will dispatch the request later...
- return -1;
-}
-
-int
-ACE_MT_CORBA_Handler::handle_input (ACE_HANDLE)
-{
- ACE_TRACE ("ACE_MT_CORBA_Handler::handle_input");
- ACE_CORBA_1 (Request) *req = 0;
-
- u_long request_addr;
-
- // Read the request from the pipe.
- ssize_t result = ACE::recv (this->pipe_.read_handle (),
- (char *) &request_addr,
- sizeof request_addr);
-
- if (result != sizeof request_addr)
- // We are in trouble: bail out.
- return -1;
-
- req = (ACE_CORBA_1 (Request) *) request_addr;
-
- // Tell Orbix to dispatch the request.
- ACE_CORBA_1 (Orbix.continueThreadDispatch) (*req);
- return 0;
-}
-
-ACE_MT_CORBA_Handler::~ACE_MT_CORBA_Handler (void)
-{
- ACE_TRACE ("ACE_MT_CORBA_Handler::~ACE_MT_CORBA_Handler");
-
- // Unregister one end of the pipe with the reactor
- this->reactor ()->remove_handler
- (this->pipe_.read_handle (),
- ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL);
-
- this->pipe_.close ();
-
- ACE_MT_CORBA_Handler::instance_ = 0;
-}
-#endif /* ACE_HAS_MT_ORBIX */
-#endif /* ACE_HAS_ORBIX */
diff --git a/ace/CORBA_Handler.h b/ace/CORBA_Handler.h
deleted file mode 100644
index 5efe99f729e..00000000000
--- a/ace/CORBA_Handler.h
+++ /dev/null
@@ -1,256 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CORBA_Handler.h
-//
-// = AUTHOR
-// Douglas C. Schmidt (schmidt@cs.wustl.edu) and
-// Irfan Pyarali (irfan@wuerl.wustl.edu).
-//
-// ============================================================================
-
-#ifndef ACE_CORBA_HANDLER_H
-#define ACE_CORBA_HANDLER_H
-#include "ace/pre.h"
-
-#include "ace/Service_Config.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Pipe.h"
-
-#if (defined (ACE_HAS_ORBIX) && (ACE_HAS_ORBIX != 0)) || (defined (ACE_HAS_MT_ORBIX) && (ACE_HAS_MT_ORBIX != 0))
-#define EXCEPTIONS
-#define WANT_ORBIX_FDS
-#include /**/ <CORBA.h>
-// #include /**/ <daemon.hh>
-#undef EXCEPTIONS
-#undef WANT_ORBIX_FDS
-
-class ACE_Export ACE_CORBA_Handler : public ACE_Service_Object
-{
- // = TITLE
- // Handle Orbix requests in conjunction with ACE.
- //
- // = DESCRIPTION
- // Note, do *NOT* inherit from this class! Instead, use the
- // <ACE_MT_CORBA_HAndler> and <ACE_ST_CORBA_Handler> as
- // Singletons.
-public:
- // = Activation and deactivation methods.
-
- virtual int activate_service (const char *service_name,
- const char *marker_name = 0,
- const char *service_location = 0);
- // Activate and register <service_name> with the Orbix daemon. If
- // <marker_name> and <service_location> are != 0 then do a "putit"
- // to register this service with orbixd. This method also
- // increments the reference count of active services using the
- // ACE_ST_CORBA_Handler.
-
- virtual int deactivate_service (const char *service_name = 0,
- const char *marker_name = 0);
- // Decrement the reference count and free up all the
- // resources if this is the last service to be using
- // the ACE_ST_CORBA_Handler...
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_CORBA_Handler (void);
- // Make this into an "abstract" class...
-
- virtual ~ACE_CORBA_Handler (void);
- // Note virtual destructor...
-
- virtual int register_service (const char *service_name,
- const char *marker_name,
- const char *service_location);
- // Register <service_name> by doing a "putit" to register the
- // <service_name> using the <marker_name> at <service_location> with
- // orbixd.
-
- virtual int remove_service (const char *service_name,
- const char *marker_name = 0);
- // Register <service_name> by doing a "putit" to register
- // <service_name> using the <marker_name> with orbixd.
-
- ssize_t reference_count_;
- // Keep track of the number of active CORBA_Handlers.
-
-private:
- // = Disallow assignment and initialization.
- ACE_CORBA_Handler (const ACE_CORBA_Handler &rhs);
- const ACE_CORBA_Handler &operator= (const ACE_CORBA_Handler &rhs);
-};
-
-class ACE_Export ACE_ST_CORBA_Handler : public ACE_CORBA_Handler
-{
- // = TITLE
- // Handle single-threaded Orbix requests in conjunction with the
- // <ACE_Reactor>.
- //
- // = DESCRIPTION
- // You should NOT use this class unless you've got a VERY old
- // version of Orbix that only supports single-threading. If
- // you're using a more recent version of Orbix use the
- // <ACE_MT_CORBA_Handler>.
-public:
- // = Singleton access point.
- static ACE_CORBA_Handler *instance (void);
- // Returns a Singleton.
-
- // = Demuxing hook.
- virtual int handle_input (ACE_HANDLE);
- // Process the next Orbix event.
-
- // = Dynamic linking hooks.
- virtual int suspend (void);
- // Atomically suspend all the threads associated with the <thr_mgr>.
-
- virtual int resume (void);
- // Atomically resume all the threads associated with the <thr_mgr>.
-
- // = Iterations dictate # of <processNextEvent> calls per-callback.
- size_t iterations (void);
- // Get the current iteration.
-
- void iterations (size_t);
- // Set the current iteration.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- void get_orbix_descriptors (void);
- // Preinitialize any descriptors that Orbix is using. This is
- // called in <instance>.
-
- ACE_ST_CORBA_Handler (void);
- // Constructors (ensure Singleton...).
-
- virtual ~ACE_ST_CORBA_Handler (void);
- // Destructor cleans up resources.
-
- static void insert_handle (ACE_HANDLE);
- // Insert a descriptor into the ACE_Reactor that Orbix has just added.
-
- static void remove_handle (ACE_HANDLE);
- // Remove a descriptor from the ACE_Reactor that Orbix has just deleted.
-
- static void instance_cleaner (void *object, void *param);
- // Clean up the singleton at program rundown.
-
- static ACE_ST_CORBA_Handler *instance_;
- // ACE_ST_CORBA_Handler is a singleton object.
-
- size_t iterations_;
- // Number of iterations to process per <processNextEvent> call.
-
- // If the user has complete control of all Orbix callback processing and
- // really, really knows how to handle all of the involved interworkings,
- // they can set up to daisy-chain Orbix callbacks from this class to
- // other handlers established outside the control of this class. This is
- // an intrinsically dangerous thing to do, and is most often the wrong
- // thing to do. But if you must, set ACE_TAKEOVER_ORBIX_CALLBACKS in the
- // config.h file before including the platform's config file.
-# if defined (ACE_TAKEOVER_ORBIX_CALLBACKS)
- static int set_callbacks_;
- static OrbixIOCallback previous_orbix_open_callback_;
- static OrbixIOCallback previous_orbix_close_callback_;
-# endif /* ACE_TAKEOVER_ORBIX_CALLBACKS */
-};
-
-#if defined (ACE_HAS_MT_ORBIX) && (ACE_HAS_MT_ORBIX != 0)
-
-class ACE_Export ACE_MT_CORBA_Handler : public ACE_CORBA_Handler, public ACE_CORBA_1 (ThreadFilter)
-{
- // = TITLE
- // Handle multi-threaded Orbix requests in conjunction with the
- // <ACE_Reactor>.
- //
- // = DESCRIPTION
- // If you are using MT-Orbix (which has been the default Orbix
- // for years) you should use this class rather than
- // <ACE_ST_CORBA_Handler>. See
- //
- // www.cs.wustl.edu/~schmidt/COOTS-96.ps.gz
- //
- // for an explanation of what this class does for Orbix.
-public:
- // = Singleton access point.
- static ACE_CORBA_Handler *instance (void);
- // Returns a Singleton.
-
- // = Demuxing hook.
- virtual int handle_input (ACE_HANDLE);
- // Process the next Orbix event.
-
- // = Threading hook.
- void thr_mgr (ACE_Thread_Manager *tm);
- // Set the Thread_Manager used by ACE_MT_CORBA_Handler
-
- ACE_Thread_Manager *thr_mgr (void) const;
- // Get the Thread_Manager used by ACE_MT_CORBA_Handler
-
- // = Dynamic linking hooks.
- virtual int suspend (void);
- // Atomically suspend all the threads associated with the <thr_mgr>.
-
- virtual int resume (void);
- // Atomically resume all the threads associated with the <thr_mgr>.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- static void *process_events (void *);
- // function executed by new thread
-
- ACE_MT_CORBA_Handler (void);
- // Constructors (ensure Singleton...).
-
- virtual ~ACE_MT_CORBA_Handler (void);
- // Destructor cleans up resources.
-
- virtual int inRequestPreMarshal (ACE_CORBA_1 (Request) &r,
- ACE_CORBA_1 (Environment) &IT_env = ACE_CORBA_1 (default_environment));
- // Take the incoming request and pass it to <handle_input> through
- // the Reactor.
-
- static ACE_MT_CORBA_Handler *instance_;
- // ACE_MT_CORBA_Handler is a singleton object.
-
- ACE_Thread_Manager *thr_mgr_;
- // Event demultiplexor used by ACE_ST_CORBA_Handler.
-
- ACE_Pipe pipe_;
- // Used to send CORBA::Requests through the server
-};
-#endif /* ACE_HAS_MT_ORBIX */
-
-#if defined (__ACE_INLINE__)
-#include "ace/CORBA_Handler.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_ORBIX */
-#include "ace/post.h"
-#endif /* ACE_CORBA_HANDLER_H */
diff --git a/ace/CORBA_Handler.i b/ace/CORBA_Handler.i
deleted file mode 100644
index a1f3bfbd774..00000000000
--- a/ace/CORBA_Handler.i
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// CORBA_Handler.i
-
-#if defined (ACE_HAS_ORBIX) && (ACE_HAS_ORBIX != 0)
-// = Set/get the number of iterations per processNextEvent() call.
-
-/* static */
-ACE_INLINE size_t
-ACE_ST_CORBA_Handler::iterations (void)
-{
- ACE_TRACE ("ACE_ST_CORBA_Handler::iterations");
- return this->iterations_;
-}
-
-/* static */
-ACE_INLINE void
-ACE_ST_CORBA_Handler::iterations (size_t i)
-{
- ACE_TRACE ("ACE_ST_CORBA_Handler::iterations");
- this->iterations_ = i;
-}
-
-#if defined (ACE_HAS_MT_ORBIX) && (ACE_HAS_MT_ORBIX != 0)
-ACE_INLINE void
-ACE_MT_CORBA_Handler::thr_mgr (ACE_Thread_Manager *tm)
-{
- ACE_TRACE ("ACE_MT_CORBA_Handler::thr_mgr");
- this->thr_mgr_ = tm;
-}
-
-ACE_INLINE ACE_Thread_Manager *
-ACE_MT_CORBA_Handler::thr_mgr (void) const
-{
- ACE_TRACE ("ACE_MT_CORBA_Handler::thr_mgr");
- return this->thr_mgr_;
-}
-#endif /* ACE_HAS_MT_ORBIX */
-#endif /* ACE_HAS_ORBIX */
diff --git a/ace/CORBA_Ref.cpp b/ace/CORBA_Ref.cpp
deleted file mode 100644
index cc3b23e0f06..00000000000
--- a/ace/CORBA_Ref.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// CORBA_Ref.cpp
-// $Id$
-
-#if !defined (ACE_CORBA_REF_C)
-#define ACE_CORBA_REF_C
-
-#include "ace/CORBA_Ref.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID(ace, CORBA_Ref, "$Id$")
-
-template<class CORBA_REF>
-ACE_CORBA_Ref<CORBA_REF>::ACE_CORBA_Ref (void)
- : ref_ (0)
-{
- ACE_TRACE ("ACE_CORBA_Ref<CORBA_REF>::ACE_CORBA_Ref");
-}
-
-template<class CORBA_REF>
-ACE_CORBA_Ref<CORBA_REF>::ACE_CORBA_Ref (CORBA_REF *ref)
-{
- ACE_TRACE ("ACE_CORBA_Ref<CORBA_REF>::ACE_CORBA_Ref");
- if (ref != 0)
- ref_ = ref->_duplicate ();
- else
- ref_ = 0;
-}
-
-template<class CORBA_REF> CORBA_REF *
-ACE_CORBA_Ref<CORBA_REF>::operator= (CORBA_REF *ref)
-{
- ACE_TRACE ("ACE_CORBA_Ref<CORBA_REF>::operator=");
- if (ref_ != 0)
- ref_->_release ();
- if (ref == 0)
- {
- ref_ = 0;
- return 0;
- }
- else
- return ref_ = ref->_duplicate ();
-}
-
-template<class CORBA_REF>
-ACE_CORBA_Ref<CORBA_REF>::operator CORBA_REF * (void) const
-{
- ACE_TRACE ("ACE_CORBA_Ref<CORBA_REF>::operator CORBA_REF *");
- ACE_ASSERT (ref_ != 0);
- return ref_;
-}
-
-template<class CORBA_REF> CORBA_REF *
-ACE_CORBA_Ref<CORBA_REF>::operator-> (void) const
-{
- ACE_TRACE ("ACE_CORBA_Ref<CORBA_REF>::operator->");
- ACE_ASSERT (ref_ != 0);
- return ref_;
-}
-
-template<class CORBA_REF> int
-ACE_CORBA_Ref<CORBA_REF>::operator== (CORBA_REF *rhs) const
-{
- ACE_TRACE ("ACE_CORBA_Ref<CORBA_REF>::operator==");
- // pointer comparison.
- return ref_ == rhs;
-}
-
-template<class CORBA_REF> int
-ACE_CORBA_Ref<CORBA_REF>::operator!= (CORBA_REF *rhs) const
-{
- ACE_TRACE ("ACE_CORBA_Ref<CORBA_REF>::operator!=");
- // pointer comparison.
- return ref_ != rhs;
-}
-
-template<class CORBA_REF>
-ACE_CORBA_Ref<CORBA_REF>::~ACE_CORBA_Ref ()
-{
- ACE_TRACE ("ACE_CORBA_Ref<CORBA_REF>::~ACE_CORBA_Ref");
- if (ref_ != 0)
- ref_->_release ();
-}
-
-#endif /* ACE_CORBA_REF_C */
diff --git a/ace/CORBA_Ref.h b/ace/CORBA_Ref.h
deleted file mode 100644
index e469dabb718..00000000000
--- a/ace/CORBA_Ref.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CORBA_Ref.h
-//
-// = AUTHOR
-// Irfan Pyarali (irfan@wuerl.wustl.edu).
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// = DESCRIPTION
-// A wrapper for helping with Orbix object references.
-//
-// ============================================================================
-
-#ifndef ACE_CORBA_REF_H
-#define ACE_CORBA_REF_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class CORBA_REF>
-class ACE_CORBA_Ref
-{
- // = TITLE
- // A wrapper for helping with Orbix object references.
- //
- // = DESCRIPTION
- // <ACE_CORBA_Ref> is parameterized by the type of orbix object
- // reference to be used. The construtor, operator=, and the
- // destructor of <ACE_CORBA_Ref> perform implicit duplicates and
- // releases in order to help make the use of Orbix object
- // references transparent.
-public:
- ACE_CORBA_Ref (void);
- // Null construction.
-
- ACE_CORBA_Ref (CORBA_REF *ref);
- // Contruction with an orbix ref.
- // performs a <CORBA_REF::_duplicate>.
-
- CORBA_REF *operator= (CORBA_REF *ref);
- // Assignment performs a <CORBA_REF::_duplicate>.
-
- operator CORBA_REF *(void) const;
- // Type operator
-
- CORBA_REF *operator-> (void) const;
- // Smart pointer to forward all CORBA_REF calls to the underlying
- // Orbix reference.
-
- int operator== (CORBA_REF *) const;
- // Pointer comparison.
-
- int operator!= (CORBA_REF *) const;
- // Pointer comparison.
-
- ~ACE_CORBA_Ref (void);
- // Destruction: calls <CORBA_REF::_release>.
-
-private:
- CORBA_REF *ref_;
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/CORBA_Ref.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("CORBA_Ref.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* CORBA_REF_H */
diff --git a/ace/CORBA_macros.h b/ace/CORBA_macros.h
deleted file mode 100644
index 67e037e9891..00000000000
--- a/ace/CORBA_macros.h
+++ /dev/null
@@ -1,413 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// CORBA_macros.h
-//
-// = DESCRIPTION
-// Writing code that is portable between platforms with or without
-// native C++ exceptions is hard. The following macros offer some
-// help on this task, mostly oriented to making the ORB code and the
-// IDL generated code portable.
-//
-// = AUTHOR
-// Nanbor Wang <nanbor@cs.wustl.edu>
-// Based on the original <tao/try_macros.h> implementation by
-// Aniruddha Gokhale <gokhale@sahyadri.research.bell-labs.com>
-// Carlos O'Ryan <coryan@cs.wustl.edu>, et al.
-// ============================================================================
-
-// Macros for handling CORBA exceptions.
-
-#ifndef ACE_CORBA_MACROS_H
-#define ACE_CORBA_MACROS_H
-#include "ace/pre.h"
-
-# if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-# endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/OS.h"
-
-// All these macros assume the CORBA::Environment variable used to pass
-// in/out the exception is call ACE_TRY_ENV. Below is the name we use
-// in TAO (The ACE ORB.) Most other ORB's have their own naming
-// convention. You can redefine ACE_TRY_ENV to change the default name
-// ACE_ADOPT_CORBA_ENV allows the use of non-standard name within a
-// scope.
-#if !defined (ACE_TRY_ENV)
-# define ACE_TRY_ENV _ACE_CORBA_Environment_variable
-#endif /* ACE_TRY_ENV */
-
-// This is the exception caught by ACE_CATCHANY.
-#if !defined (ACE_ANY_EXCEPTION)
-# define ACE_ANY_EXCEPTION ex
-#endif /* ACE_ANY_EXCEPTION */
-
-// By default, if the compiler support native exception handling, assume
-// CORBA also support native exception handling. But it can be disabled
-// by defining ACE_CORBA_HAS_EXCEPTIONS=0.
-// If the compiler does not support exceptions handling, make sure native
-// exception handling is disabled.
-#if defined (ACE_HAS_EXCEPTIONS)
-# if defined (ACE_CORBA_HAS_EXCEPTIONS)
-# if (ACE_CORBA_HAS_EXCEPTIONS == 0)
-# undef ACE_CORBA_HAS_EXCEPTIONS
-# endif /* ACE_CORBA_HAS_EXCEPTIONS == 0 */
-# else /* !ACE_CORBA_HAS_EXCEPTIONS */
-# define ACE_CORBA_HAS_EXCEPTIONS
-# endif /* ACE_CORBA_HAS_EXCEPTIONS */
-#else
-# if defined (ACE_CORBA_HAS_EXCEPTIONS)
-# undef ACE_CORBA_HAS_EXCEPTIONS
-# endif /* ACE_CORBA_HAS_EXCEPTIONS */
-#endif /* ACE_HAS_EXCEPTIONS */
-
-#define ACE_DECLARE_NEW_CORBA_ENV \
- CORBA::Environment ACE_TRY_ENV
-
-#if defined (ACE_CORBA_HAS_EXCEPTIONS)
-// -----------------------------------------------------------------
-# define ACE_ADOPT_CORBA_ENV(ENV) ACE_UNUSED_ARG(ENV)
-
-// No need to check. Native exceptions handle the control
-// flow automatically when an exception occurs.
-# define ACE_CHECK
-// Used then the function requires a return value.
-# define ACE_CHECK_RETURN(RETV)
-
-// ACE_THROW_INT should not be used by the user.
-# define ACE_THROW_INT(EXCEPTION) \
- do { \
- ACE_UNUSED_ARG(ACE_TRY_ENV); \
- throw EXCEPTION; \
- } while (0)
-
-// Throwing an exception is easy. These two macros should _NOT_ be
-// used within try blocks.
-# define ACE_THROW(EXCEPTION) \
- do { \
- ACE_UNUSED_ARG(ACE_TRY_ENV); \
- throw EXCEPTION; \
- } while (0)
-
-// Throwing an exception when the function reqires a return value.
-# if defined (WIN32) || defined (__HP_aCC)
-# define ACE_THROW_RETURN(EXCEPTION, RETV) \
- do \
- { \
- ACE_UNUSED_ARG(ACE_TRY_ENV); \
- throw EXCEPTION; \
- return RETV; \
- } while (0)
-# else /* WIN32 */
-# define ACE_THROW_RETURN(EXCEPTION,RETV) \
- do { \
- ACE_UNUSED_ARG(ACE_TRY_ENV); \
- throw EXCEPTION; \
- } while (0)
-# endif /* WIN32 */
-
-// For compilers with native exceptions, we can simply use
-// try to try. ;-) do {} while (0) is required to avoid
-// compilation warnings.
-# define ACE_TRY \
- do \
- { \
- try \
- {
-# define ACE_TRY_NEW_ENV \
- do \
- { \
- CORBA::Environment ACE_TRY_ENV; \
- try \
- {
-# define ACE_TRY_EX(LABEL) \
- do \
- { \
- try \
- {
-
-// No need to check for exceptions within try block for compilers with
-// native exceptions.
-# define ACE_TRY_CHECK
-# define ACE_TRY_CHECK_EX(LABEL)
-
-// Likewise, throwing exceptions within try blocks is easy.
-# define ACE_TRY_THROW(EXCEPTION) throw EXCEPTION
-# define ACE_TRY_THROW_EX(EXCEPTION,LABEL) throw EXCEPTION
-
-// Same thing for catch.
-# define ACE_CATCH(EXCEPTION,VAR) \
- } \
- catch (EXCEPTION & VAR) \
- { \
- ACE_UNUSED_ARG (VAR);
-# define ACE_CATCHANY \
- ACE_CATCH(CORBA::Exception, ACE_ANY_EXCEPTION)
-# define ACE_CATCHALL \
- } \
- catch (...) \
- {
-
-// Rethrowing the exception from catch blocks.
-# define ACE_RETHROW throw
-
-// Close the catch block.
-# define ACE_ENDTRY \
- } \
- } while (0)
-
-#else /* ! ACE_CORBA_HAS_EXCEPTIONS */
-// -----------------------------------------------------------------
-// To handle compilers without native exceptions, things get a bit
-// hairy. Exceptions are simulated using CORBA::Environment.
-// The trick here is to make sure the flow-of-control can simulate
-// the case when native exceptions occur...
-
-# define ACE_ADOPT_CORBA_ENV(ENV) CORBA::Environment &ACE_TRY_ENV = ENV
-
-// Follow every statement that could throw exceptions with ACE_CHECK
-// or ACE_CHECK_ENV. These two macros should _NOT_ be used within
-// try blocks. Use ACE_TRY_CHECK or ACE_TRY_CHECK_EX instead.
-# define ACE_CHECK \
- if (ACE_TRY_ENV . exception () != 0) \
- return
-// When function requires a return value
-# define ACE_CHECK_RETURN(RETV) \
- if (ACE_TRY_ENV . exception () != 0) \
- return RETV
-
-// ACE_THROW_INT should not be used by the user.
-# define ACE_THROW_INT(EXCEPTION) ACE_TRY_ENV.exception (new EXCEPTION)
-
-// Throwing exceptions will inevitably cause an return from the current
-// function. These two macros should _NOT_ be used within try blocks.
-// Use ACE_TRY_THROW or ACE_TRY_THROW_EX instead.
-# define ACE_THROW(EXCEPTION) \
- do \
- { \
- ACE_TRY_ENV.exception (new EXCEPTION); \
- return; \
- } while (0)
-
-# define ACE_THROW_RETURN(EXCEPTION,RETV) \
- do \
- { \
- ACE_TRY_ENV.exception (new EXCEPTION); \
- return RETV; \
- } while (0)
-
-// ACE_TRY sets up flags to control program flow. ACE_TRY_FLAG acts
-// like a one-shot flip-flop. When an exception occured (detect it
-// using ACE_TRY_CHECK,) ACE_TRY_FLAG will be reset and the control
-// goes back into ACE_TRY_LABEL. Since ACE_TRY_FLAG is reset, the try
-// block won't get executed again and the control proceeds to the following
-// catch blocks. ACE_EXECTION_NOT_CAUGHT flag is used to prevent
-// catching an exception twice. This macro assumes there's already an
-// CORBA:;Environment variable ACE_TRY_ENV defined (which, should be
-// the most usual case.)
-# define ACE_TRY \
- do { \
- int ACE_TRY_FLAG = 1; \
- int ACE_EXCEPTION_NOT_CAUGHT = 1; \
- ACE_TRY_LABEL: \
- if (ACE_TRY_FLAG) \
- do {
-
-// ACE_TRY_NEW_ENV functions like the macro ACE_TRY but defines a
-// new CORBA::Environment variable ACE_TRY_ENV. It is most often
-// used in the outer most function where no ACE_TRY_ENV is available.
-# define ACE_TRY_NEW_ENV \
- do { \
- CORBA::Environment ACE_TRY_ENV;\
- int ACE_TRY_FLAG = 1; \
- int ACE_EXCEPTION_NOT_CAUGHT = 1; \
- ACE_TRY_LABEL: \
- if (ACE_TRY_FLAG) \
- do {
-
-// ACE_TRY_EX works exactly like ACE_TRY macro except the lable used
-// in the try block is customizable to avoid name clashing. It should
-// be used when, nested try blocks or, multiple try blocks are required
-// in the same function.
-# define ACE_TRY_EX(LABEL) \
- do { \
- int ACE_TRY_FLAG = 1; \
- int ACE_EXCEPTION_NOT_CAUGHT = 1; \
- ACE_TRY_LABEL ## LABEL: \
- if (ACE_TRY_FLAG) \
- do {
-
-// Check for exceptions within try blocks.
-# define ACE_TRY_CHECK \
- { \
- if (ACE_TRY_ENV.exception () != 0) \
- { \
- ACE_TRY_FLAG = 0; \
- goto ACE_TRY_LABEL; \
- } \
- }
-
-// Checking exception within EX try blocks.
-# define ACE_TRY_CHECK_EX(LABEL) \
- { \
- if (ACE_TRY_ENV.exception () != 0) \
- { \
- ACE_TRY_FLAG = 0; \
- goto ACE_TRY_LABEL ## LABEL; \
- } \
- }
-
-// Throwing exception within TRY blocks.
-# define ACE_TRY_THROW(EXCEPTION) \
- { \
- ACE_TRY_ENV.exception (new EXCEPTION); \
- ACE_TRY_FLAG = 0; \
- goto ACE_TRY_LABEL; \
- }
-
-# define ACE_TRY_THROW_EX(EXCEPTION,LABEL) \
- { \
- ACE_TRY_ENV.exception (new EXCEPTION); \
- ACE_TRY_FLAG = 0; \
- goto ACE_TRY_LABEL ## LABEL; \
- }
-
-// When exceptions occur or try block finishes execution without
-// exception, control will continue in the catch block. This macro
-// first check if there's non-caught exception we are waiting for
-// left. It all the conditions met, we have caught an exception.
-// It then reset the ACE_EXCEPTION_NOT_CAUGHT to prevent subsequent
-// catch blocks catch the same exception again and extract out the
-// underlying exception in the ACE_TRY_ENV. We also make a copy
-// of ACE_TRY_ENV in ACE_CAUGHT_ENV in case we want to rethrow the
-// exception. ACE_TRY_ENV is cleared out after the exception is
-// caught so you should not use ACE_TRY_ENV within the catch block.
-// (In fact, you should use the exception directly.)
-# define ACE_CATCH(TYPE,VAR) \
- } while (0); \
- do \
- if (ACE_TRY_ENV.exception () != 0 && ACE_EXCEPTION_NOT_CAUGHT && \
- TYPE::_downcast(ACE_TRY_ENV.exception ()) != 0) \
- { \
- CORBA::Environment ACE_CAUGHT_ENV = ACE_TRY_ENV;\
- ACE_EXCEPTION_NOT_CAUGHT = 0; \
- TYPE &VAR = *TYPE::_downcast (ACE_CAUGHT_ENV.exception ()); \
- ACE_UNUSED_ARG (VAR); \
- ACE_TRY_ENV.clear ();
-
-// ACE_CATCHANY uses ACE_CATCH to catch all CORBA exceptions.
-# define ACE_CATCHANY ACE_CATCH (CORBA::Exception, ACE_ANY_EXCEPTION)
-
-// Since there's no other exception for compilers without exception
-// support, we simply catch all CORBA exceptions for ACE_CATCHALL.
-# define ACE_CATCHALL ACE_CATCHANY
-
-// Rethrowing exception within catch blocks. Notice that we depends
-// on the ACE_CHECK/ACE_CHECK_RETURN following the ACE_ENDTRY to
-// do the "Right Thing[TM]."
-# define ACE_RETHROW \
- do \
- ACE_TRY_ENV = ACE_CAUGHT_ENV; \
- while (0)
-
-// Close the try block. Notice that since exception may not get
-// caught, and exceptions can also be rethrown from the catch block,
-// it's always a good idea to follow ACE_ENDTRY with ACE_CHECK or
-// ACE_TRY_CHECK (depending on the context.)
-# define ACE_ENDTRY \
- } while (0); \
- } while (0)
-
-#endif /* ! ACE_CORBA_HAS_EXCEPTIONS */
-
-// ACE_HAS_EXCEPTIONS is not the same as ACE_NEW_THROWS_EXCEPTIONS.
-#if defined(ACE_NEW_THROWS_EXCEPTIONS)
-
-# define ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \
- do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { errno = ENOMEM; ACE_THROW_INT (EXCEPTION); } \
- } while (0)
-// The following ACE_NEW_THROW* macros are to be deprecated soon.
-// -------------------- Start Deprecated --------------------
-# define ACE_NEW_THROW(POINTER,CONSTRUCTOR,EXCEPTION) \
- do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { errno = ENOMEM; TAO_THROW (EXCEPTION); } \
- } while (0)
-# define ACE_NEW_THROW_RETURN(POINTER,CONSTRUCTOR,EXCEPTION,RET_VAL) \
- do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { errno = ENOMEM; TAO_THROW_RETURN (EXCEPTION,RET_VAL); } \
- } while (0)
-# define ACE_NEW_TRY_THROW(POINTER,CONSTRUCTOR,EXCEPTION) \
- do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { errno = ENOMEM; TAO_TRY_THROW (EXCEPTION); } \
- } while (0)
-// -------------------- End Deprecated --------------------
-
-#else
-
-# define ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \
- do { POINTER = new CONSTRUCTOR; \
- if (POINTER == 0) { errno = ENOMEM; ACE_THROW_INT (EXCEPTION); } \
- } while (0)
-// The following ACE_NEW_THROW* macros are to be deprecated soon.
-// -------------------- Start Deprecated --------------------
-# define ACE_NEW_THROW(POINTER,CONSTRUCTOR,EXCEPTION) \
- do { POINTER = new CONSTRUCTOR; \
- if (POINTER == 0) { errno = ENOMEM; TAO_THROW (EXCEPTION); } \
- } while (0)
-# define ACE_NEW_THROW_RETURN(POINTER,CONSTRUCTOR,EXCEPTION,RET_VAL) \
- do { POINTER = new CONSTRUCTOR; \
- if (POINTER == 0)\
- { errno = ENOMEM; TAO_THROW_RETURN (EXCEPTION,RET_VAL); } \
- } while (0)
-# define ACE_NEW_TRY_THROW(POINTER,CONSTRUCTOR,EXCEPTION) \
- do { POINTER = new CONSTRUCTOR; \
- if (POINTER == 0) { errno = ENOMEM; TAO_TRY_THROW (EXCEPTION); } \
- } while (0)
-// -------------------- End Deprecated --------------------
-
-#endif /* ACE_NEW_THROWS_EXCEPTIONS */
-
-# define ACE_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION) \
- ACE_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION);
-
-# define ACE_READ_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION) \
- ACE_Read_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION);
-
-# define ACE_WRITE_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION) \
- ACE_Write_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION);
-
-// The following ACE_GUARD_THROW* macros are to be deprecated soon.
-// -------------------- Start Deprecated --------------------
-# define ACE_GUARD_THROW(MUTEX,OBJ,LOCK,EXCEPTION) \
- ACE_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) TAO_THROW (EXCEPTION);
-# define ACE_GUARD_THROW_RETURN(MUTEX,OBJ,LOCK,EXCEPTION,RETURN) \
- ACE_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) TAO_THROW_RETURN (EXCEPTION, RETURN);
-// -------------------- End Deprecation --------------------
-
-// ============================================================
-
-// Print out a TAO exception. This is not CORBA compliant.
-# define ACE_PRINT_TAO_EXCEPTION(EX,INFO) \
- EX._tao_print_exception (INFO)
-
-// Print out a CORBA exception. There is not portable way to
-// dump a CORBA exception. If you are using other ORB implementation,
-// redefine the macro to get what you want.
-# if !defined ACE_PRINT_EXCEPTION
-# define ACE_PRINT_EXCEPTION(EX,INFO) ACE_PRINT_TAO_EXCEPTION(EX,INFO)
-# endif /* ACE_PRINT_EXCEPTION */
-
-#include "ace/post.h"
-#endif /* ACE_CORBA_MACROS_H */
diff --git a/ace/Cache_Map_Manager_T.cpp b/ace/Cache_Map_Manager_T.cpp
deleted file mode 100644
index b8779796b4e..00000000000
--- a/ace/Cache_Map_Manager_T.cpp
+++ /dev/null
@@ -1,420 +0,0 @@
-// $Id$
-
-#ifndef ACE_CACHE_MAP_MANAGER_T_C
-#define ACE_CACHE_MAP_MANAGER_T_C
-
-#include "ace/Cache_Map_Manager_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Malloc.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Cache_Map_Manager_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Cache_Map_Manager_T, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Manager)
-
-#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Iterator)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Reverse_Iterator)
-
-#define ACE_T1 class KEY, class VALUE, class MAP, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES
-#define ACE_T2 KEY, VALUE, MAP, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES
-
-#else
-
-#define ACE_T1 class KEY, class VALUE, class MAP, class CACHING_STRATEGY, class ATTRIBUTES
-#define ACE_T2 KEY, VALUE, MAP, CACHING_STRATEGY, ATTRIBUTES
-
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
-template <ACE_T1>
-ACE_Cache_Map_Manager<ACE_T2>::ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_s,
- size_t size,
- ACE_Allocator *alloc)
- : caching_strategy_ (caching_s)
-{
- if (this->open (size, alloc) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Cache_Map_Manager::ACE_Cache_Map_Manager")));
-
-}
-
-template <ACE_T1>
-ACE_Cache_Map_Manager<ACE_T2>::~ACE_Cache_Map_Manager (void)
-{
- this->close ();
-}
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::open (size_t length,
- ACE_Allocator *alloc)
-{
- return this->map_.open (length,
- alloc);
-}
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::close (void)
-{
- return this->map_.close ();
-}
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::bind (const KEY &key,
- const VALUE &value)
-{
- // Insert an entry which has the <key> and the <cache_value> which
- // is the combination of the <value> and the attributes of the
- // caching strategy.
- CACHE_VALUE cache_value (value,
- this->caching_strategy_.attributes ());
-
- int bind_result = this->map_.bind (key,
- cache_value);
-
- if (bind_result != -1)
- {
-
- int result = this->caching_strategy_.notify_bind (bind_result,
- cache_value.second ());
-
- if (result == -1)
- {
-
- this->map_.unbind (key);
-
- // Unless the notification goes thru the bind operation is
- // not complete.
- bind_result = -1;
-
- }
-
- }
-
- return bind_result;
-}
-
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key,
- const VALUE &value)
-{
- CACHE_VALUE cache_value (value,
- this->caching_strategy_.attributes ());
-
- int rebind_result = this->map_.rebind (key,
- cache_value);
-
- if (rebind_result != -1)
- {
-
- int result = this->caching_strategy_.notify_rebind (rebind_result,
- cache_value.second ());
-
- if (result == -1)
- {
-
- // Make sure the unbind operation is done only when the
- // notification fails after a bind which is denoted by
- // rebind_result = 0
- if (rebind_result == 0)
- this->map_.unbind (key);
-
- // Unless the notification goes thru the rebind operation is
- // not complete.
- rebind_result = -1;
-
- }
-
- }
-
- return rebind_result;
-}
-
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value)
-{
- CACHE_VALUE cache_value (value,
- this->caching_strategy_.attributes ());
-
- CACHE_VALUE old_cache_value (old_value,
- this->caching_strategy_.attributes ());
-
- int rebind_result = this->map_.rebind (key,
- cache_value,
- old_cache_value);
-
- if (rebind_result != -1)
- {
-
- int result = this->caching_strategy_.notify_rebind (rebind_result,
- cache_value.second ());
-
- if (result == -1)
- {
-
- // Make sure the unbind operation is done only when the
- // notification fails after a bind which is denoted by
- // rebind_result = 0
- if (rebind_result == 0)
- this->map_.unbind (key);
-
- // Unless the notification goes thru the rebind operation is
- // not complete.
- rebind_result = -1;
-
- }
- else
- {
-
- old_value = old_cache_value.first ();
-
- }
-
- }
-
- return rebind_result;
-}
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value)
-{
- CACHE_VALUE cache_value (value,
- this->caching_strategy_.attributes ());
-
- CACHE_VALUE old_cache_value (old_value,
- this->caching_strategy_.attributes ());
-
- int rebind_result = this->map_.rebind (key,
- cache_value,
- old_key,
- old_cache_value);
-
- if (rebind_result != -1)
- {
-
- int result = this->caching_strategy_.notify_rebind (rebind_result,
- cache_value.second ());
-
- if (result == -1)
- {
-
- // Make sure the unbind operation is done only when the
- // notification fails after a bind which is denoted by
- // rebind_result = 0
- if (rebind_result == 0)
- this->map_.unbind (key);
-
- // Unless the notification goes thru the rebind operation is
- // not complete.
- rebind_result = -1;
-
- }
- else
- {
-
- old_value = old_cache_value.first ();
-
- }
-
- }
-
- return rebind_result;
-}
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::trybind (const KEY &key,
- VALUE &value)
-{
- CACHE_VALUE cache_value (value,
- this->caching_strategy_.attributes ());
-
- int trybind_result = this->map_.trybind (key,
- cache_value);
-
- if (trybind_result != -1)
- {
-
- int result = this->caching_strategy_.notify_trybind (trybind_result,
- cache_value.second ());
-
- if (result == -1)
- {
-
- // If the entry has got inserted into the map, it is removed
- // due to failure.
- if (trybind_result == 0)
- this->map_.unbind (key);
-
- trybind_result = -1;
-
- }
- else
- {
-
- // If an attempt is made to bind an existing entry the value
- // is overwritten with the value from the map.
- if (trybind_result == 1)
- value = cache_value.first ();
-
- }
-
- }
-
- return trybind_result;
-}
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::find (const KEY &key,
- VALUE &value)
-{
- // Lookup the key and populate the <value>.
- CACHE_VALUE cache_value;
-
- int find_result = this->map_.find (key,
- cache_value);
-
- if (find_result != -1)
- {
-
- int result = this->caching_strategy_.notify_find (find_result,
- cache_value.second ());
-
- // Unless the find and notification operations go thru, this
- // method is not successful.
- if (result == -1)
- find_result = -1;
- else
- {
-
- // Since the <cache_value> has now changed after the
- // notification, we need to bind to the map again.
- int rebind_result = this->map_.rebind (key,
- cache_value);
- if (rebind_result == -1)
- find_result = -1;
- else
- value = cache_value.first ();
-
- }
-
- }
-
- return find_result;
-}
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::find (const KEY &key)
-{
- // Lookup the key and populate the <value>.
- CACHE_VALUE cache_value;
-
- int find_result = this->map_.find (key,
- cache_value);
-
- if (find_result != -1)
- {
-
- int result = this->caching_strategy_.notify_find (find_result,
- cache_value.second ());
-
- // Unless the find and notification operations go thru, this
- // method is not successful.
- if (result == -1)
- find_result = -1;
- else
- {
-
- // Since the <cache_value> has now changed after the
- // notification, we need to bind to the map again.
- int rebind_result = this->map_.rebind (key,
- cache_value);
-
- if (rebind_result == -1)
- find_result = -1;
-
- }
-
- }
-
- return find_result;
-}
-
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::unbind (const KEY &key)
-{
- // Remove the entry from the cache.
- CACHE_VALUE cache_value;
-
- int unbind_result = this->map_.unbind (key,
- cache_value);
-
- if (unbind_result != -1)
- {
-
- int result = this->caching_strategy_.notify_unbind (unbind_result,
- cache_value.second ());
-
- if (result == -1)
- unbind_result = -1;
-
- }
-
- return unbind_result;
-}
-
-template <ACE_T1> int
-ACE_Cache_Map_Manager<ACE_T2>::unbind (const KEY &key,
- VALUE &value)
-{
- // Remove the entry from the cache.
- CACHE_VALUE cache_value;
-
- int unbind_result = this->map_.unbind (key,
- cache_value);
-
- if (unbind_result != -1)
- {
-
- int result = this->caching_strategy_.notify_unbind (unbind_result,
- cache_value.second ());
-
- if (result == -1)
- unbind_result = -1;
- else
- value = cache_value.first ();
-
- }
-
- return unbind_result;
-}
-
-
-template <ACE_T1> void
-ACE_Cache_Map_Manager<ACE_T2>::dump (void) const
-{
- this->map_.dump ();
-
- this->caching_strategy_.dump ();
-}
-
-#undef ACE_T1
-#undef ACE_T2
-
-#endif /* ACE_CACHE_MAP_MANAGER_T_C */
diff --git a/ace/Cache_Map_Manager_T.h b/ace/Cache_Map_Manager_T.h
deleted file mode 100644
index 30d957b91ac..00000000000
--- a/ace/Cache_Map_Manager_T.h
+++ /dev/null
@@ -1,399 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Cache_Map_Manager.h
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef CACHE_MAP_MANAGER_T_H
-#define CACHE_MAP_MANAGER_T_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Pair_T.h"
-
-// Forward declaration.
-class ACE_Allocator;
-
-#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-
-#define ACE_Cache_Map_Iterator ACMI
-#define ACE_Cache_Map_Reverse_Iterator ACMRI
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class CACHING_STRATEGY, class ATTRIBUTES>
-class ACE_Cache_Map_Iterator;
-
-template <class KEY, class VALUE, class REVERSE_IMPLEMENTATION, class CACHING_STRATEGY, class ATTRIBUTES>
-class ACE_Cache_Map_Reverse_Iterator;
-
-#define ACE_T1 class KEY, class VALUE, class MAP, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES
-#define ACE_T2 KEY, VALUE, MAP, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES
-
-#else
-
-#define ACE_T1 class KEY, class VALUE, class MAP, class CACHING_STRATEGY, class ATTRIBUTES
-#define ACE_T2 KEY, VALUE, MAP, CACHING_STRATEGY, ATTRIBUTES
-
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
-// For linkers that cant grok long names.
-#define ACE_Cache_Map_Manager ACMM
-
-template <ACE_T1>
-class ACE_Cache_Map_Manager
-{
- // = TITLE
- // Defines a abstraction that will purge entries from a map.
- //
- // = DESCRIPTION
- // The <ACE_Cache_Map_Manager> will manage the map it contains
- // and provide purging on demand from the map. The strategy for
- // caching is decided by the user and provided to the Cache
- // Manager. The Cache Manager acts as a agent and communicates
- // between the Map and the Strategy for purging entries from the
- // map.
- //
- // No locking mechanism provided since locking at this level
- // isn't efficient. Locking has to be provided by the
- // application.
-public:
-
- // = Traits.
- typedef KEY key_type;
- typedef VALUE mapped_type;
- typedef MAP map_type;
- typedef CACHING_STRATEGY caching_strategy_type;
-
-#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-
- typedef ITERATOR_IMPL ITERATOR_IMPLEMENTATION;
- typedef REVERSE_ITERATOR_IMPL REVERSE_ITERATOR_IMPLEMENTATION;
-
- friend class ACE_Cache_Map_Iterator<KEY, VALUE, ITERATOR_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES>;
- friend class ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_ITERATOR_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES>;
-
- // = ACE-style iterator typedefs.
- typedef ACE_Cache_Map_Iterator<KEY, VALUE, ITERATOR_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES>
- ITERATOR;
- typedef ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_ITERATOR_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES>
- REVERSE_ITERATOR;
-
- // = STL-style iterator typedefs.
- typedef ITERATOR
- iterator;
- typedef REVERSE_ITERATOR
- reverse_iterator;
-
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
- typedef ACE_Pair<VALUE, ATTRIBUTES> CACHE_VALUE;
- // The actual value mapped to the key in the map. The <attributes>
- // are used by the strategy and is transparent to the user of this
- // class.
-
- // = Initialization and termination methods.
-
- ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_strategy,
- size_t size = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0);
- // Initialize a <Cache_Map_Manager> with <caching_strategy> and
- // <size> entries.
-
- virtual ~ACE_Cache_Map_Manager (void);
- // Close down a <Cache_Map_Manager> and release dynamically allocated
- // resources.
-
- int open (size_t length = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0);
- // Initialize a cache with size <length>.
-
- int close (void);
- // Close down a cache and release dynamically allocated resources.
-
- int bind (const KEY &key,
- const VALUE &value);
- // Associate <key> with <value>. If <key> is already in the MAP
- // then the ENTRY is not changed. Returns 0 if a new entry is bound
- // successfully, returns 1 if an attempt is made to bind an existing
- // entry, and returns -1 if failures occur.
-
- int find (const KEY &key,
- VALUE &value);
- // Loopkup entry<key,value> in the cache.
-
- int find (const KEY &key);
- // Is <key> in the cache?
-
- int rebind (const KEY &key,
- const VALUE &value);
- // Reassociate the <key> with <value>. If the <key> already exists
- // in the cache then returns 1, on a new bind returns 0 and returns
- // -1 in case of any failures.
-
- int rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old value into the
- // "out" parameter <old_value>. The function fails if <key> is not
- // in the cache for caches that do not allow user specified keys.
- // However, for caches that allow user specified keys, if the key is
- // not in the cache, a new <key>/<value> association is created.
-
- int rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old key and value
- // into the "out" parameters <old_key> and <old_value>. The
- // function fails if <key> is not in the cache for caches that do
- // not allow user specified keys. However, for caches that allow
- // user specified keys, if the key is not in the cache, a new
- // <key>/<value> association is created.
-
- int trybind (const KEY &key,
- VALUE &value);
- // Associate <key> with <value> if and only if <key> is not in the
- // cache. If <key> is already in the cache, then the <value>
- // parameter is overwritten with the existing value in the
- // cache. Returns 0 if a new <key>/<value> association is created.
- // Returns 1 if an attempt is made to bind an existing entry. This
- // function fails for maps that do not allow user specified keys.
-
- int unbind (const KEY &key);
- // Remove <key> from the cache.
-
- int unbind (const KEY &key,
- VALUE &value);
- // Remove <key> from the cache, and return the <value> associated with
- // <key>.
-
- int purge (void);
- // Remove entries from the cache depending upon the strategy.
-
- size_t current_size (void) const;
- // Return the current size of the cache.
-
- size_t total_size (void) const;
- // Return the total size of the cache.
-
- void dump (void) const;
- // Dumps the state of the object.
-
-#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-
- // = STL styled iterator factory functions.
-
- ITERATOR begin (void);
- ITERATOR end (void);
- // Return forward iterator.
-
- REVERSE_ITERATOR rbegin (void);
- REVERSE_ITERATOR rend (void);
- // Return reverse iterator.
-
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
- MAP &map (void);
- // The map managed by the Cache_Map_Manager.
-
- CACHING_STRATEGY &caching_strategy (void);
- // The caching strategy used on the cache.
-
-protected:
-
- MAP map_;
- // The underlying map which needs to be cached.
-
- CACHING_STRATEGY &caching_strategy_;
- // The strategy to be followed for caching entries in the map.
-
-private:
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Cache_Map_Manager<ACE_T2> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Cache_Map_Manager (const ACE_Cache_Map_Manager<ACE_T2> &))
-
-};
-
-#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class CACHING_STRATEGY, class ATTRIBUTES>
-class ACE_Cache_Map_Iterator
-{
- // = TITLE
- // Defines a iterator for the Cache_Map_Manager.
- //
- // = DESCRIPTION
- // Implementation to be provided by the iterator of the map
- // managed by the ACE_Cache_Map_Manager.
-
-public:
-
- // = Traits.
- typedef ACE_Reference_Pair<KEY, VALUE>
- value_type;
- typedef ACE_Pair <VALUE, ATTRIBUTES>
- CACHE_VALUE;
- // The actual value mapped to the key in the cache. The <attributes>
- // are used by the strategy and is transperant to the cache user.
-
- // = Initialisation and termination methods.
-
- ACE_Cache_Map_Iterator (const IMPLEMENTATION &iterator_impl);
-
- ACE_Cache_Map_Iterator (const ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs);
- // Copy constructor.
-
- virtual ~ACE_Cache_Map_Iterator (void);
-
- // = Iteration methods.
-
- ACE_Cache_Map_Iterator <KEY, VALUE, IMPLEMENTATION,
- CACHING_STRATEGY, ATTRIBUTES> &operator=
- (const ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION,
- CACHING_STRATEGY, ATTRIBUTES> &rhs);
- // assignment operator.
-
- int operator== (const ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
- int operator!= (const ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
- // Comparision operators.
-
- ACE_Reference_Pair<KEY, VALUE> operator* (void) const;
- // Returns a reference to the internal element <this> is pointing
- // to.
-
- // = STL styled iteration, compare, and reference functions.
-
- ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &operator++ (void);
- // Prefix advance
-
- ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> operator++ (int);
- // Postfix advance.
-
- ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &operator-- (void);
- // Prefix reverse.
-
- ACE_Cache_Map_Iterator<KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> operator-- (int);
- // Postfix reverse.
-
- IMPLEMENTATION &iterator_implementation (void);
- // Returns the iterator of the internal map in the custody of the
- // Cache_Map_Manager.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- IMPLEMENTATION iterator_implementation_;
- // The actual iterator which iterates internally on the map
- // belonging to the Cache_Map_Manager.
-};
-
-template <class KEY, class VALUE, class REVERSE_IMPLEMENTATION, class CACHING_STRATEGY, class ATTRIBUTES>
-class ACE_Cache_Map_Reverse_Iterator
-{
- // = TITLE
- // Defines a reverse iterator for the Cache_Map_Manager.
- //
- // = DESCRIPTION
- // Implementation to be provided by the reverse iterator of the map
- // managed by thr Cache_Map_manager.
-public:
-
- // = Traits.
- typedef ACE_Reference_Pair<KEY, VALUE> value_type;
- typedef ACE_Pair <VALUE, ATTRIBUTES> CACHE_VALUE;
- // The actual value mapped to the key in the cache. The <attributes>
- // are used by the strategy and is transperant to the cache user.
-
- // = Initialisation and termination methods.
-
- ACE_Cache_Map_Reverse_Iterator (const REVERSE_IMPLEMENTATION &iterator_impl);
-
- ACE_Cache_Map_Reverse_Iterator (const ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs);
- // Copy constructor.
-
- ~ACE_Cache_Map_Reverse_Iterator (void);
-
- // = Iteration methods.
-
- ACE_Cache_Map_Reverse_Iterator <KEY, VALUE, REVERSE_IMPLEMENTATION,
- CACHING_STRATEGY, ATTRIBUTES> &operator=
- (const ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION,
- CACHING_STRATEGY, ATTRIBUTES> &rhs);
- // Assignment operator.
-
- int operator== (const ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
- int operator!= (const ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &rhs) const;
- // Comparision operators.
-
- ACE_Reference_Pair<KEY, VALUE> operator* (void) const;
- // Returns a reference to the internal element <this> is pointing
- // to.
-
- // = STL styled iteration, compare, and reference functions.
-
- ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &operator++ (void);
- // Prefix advance
-
- ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> operator++ (int);
- // Postfix advance.
-
- ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> &operator-- (void);
- // Prefix reverse.
-
- ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> operator-- (int);
- // Postfix reverse.
-
- REVERSE_IMPLEMENTATION &iterator_implementation (void);
- // Returns the iterator of the internal map in the custody of the
- // Cache_Map_Manager.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- REVERSE_IMPLEMENTATION reverse_iterator_implementation_;
- // The actual iterator which iterates internally on the map
- // belonging to the Cache_Map_Manager.
-};
-
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
-#undef ACE_T1
-#undef ACE_T2
-
-#if defined (__ACE_INLINE__)
-#include "ace/Cache_Map_Manager_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Cache_Map_Manager_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Cache_Map_Manager_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* CACHE_MAP_MANAGER_T_H */
diff --git a/ace/Cache_Map_Manager_T.i b/ace/Cache_Map_Manager_T.i
deleted file mode 100644
index ab90786fe1b..00000000000
--- a/ace/Cache_Map_Manager_T.i
+++ /dev/null
@@ -1,273 +0,0 @@
-/* -*- C++ -*- */
-//$Id$
-
-#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-
-#define ACE_T1 class KEY, class VALUE, class MAP, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES
-#define ACE_T2 KEY, VALUE, MAP, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES
-
-#else
-
-#define ACE_T1 class KEY, class VALUE, class MAP, class CACHING_STRATEGY, class ATTRIBUTES
-#define ACE_T2 KEY, VALUE, MAP, CACHING_STRATEGY, ATTRIBUTES
-
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
-template <ACE_T1> ACE_INLINE int
-ACE_Cache_Map_Manager<ACE_T2>::purge (void)
-{
- return this->caching_strategy ().caching_utility ().clear_cache (this->map_,
- this->caching_strategy ().purge_percent ());
-}
-
-template <ACE_T1> ACE_INLINE size_t
-ACE_Cache_Map_Manager<ACE_T2>::current_size (void) const
-{
- return this->map_.current_size ();
-}
-
-template <ACE_T1> ACE_INLINE size_t
-ACE_Cache_Map_Manager<ACE_T2>::total_size (void) const
-{
- return this->map_.total_size ();
-}
-
-template <ACE_T1> ACE_INLINE MAP &
-ACE_Cache_Map_Manager<ACE_T2>::map (void)
-{
- return this->map_;
-}
-
-template <ACE_T1> ACE_INLINE CACHING_STRATEGY &
-ACE_Cache_Map_Manager<ACE_T2>::caching_strategy (void)
-{
- return this->caching_strategy_;
-}
-
-#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-
-template <ACE_T1> ACE_INLINE ACE_Cache_Map_Iterator<KEY, VALUE, ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>
-ACE_Cache_Map_Manager<ACE_T2>::begin (void)
-{
- return ITERATOR (this->map_.begin ());
-}
-
-template <ACE_T1> ACE_INLINE ACE_Cache_Map_Iterator<KEY, VALUE, ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>
-ACE_Cache_Map_Manager<ACE_T2>::end (void)
-{
- return ITERATOR (this->map_.end ());
-}
-
-template <ACE_T1> ACE_INLINE ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>
-ACE_Cache_Map_Manager<ACE_T2>::rbegin (void)
-{
- return REVERSE_ITERATOR (this->map_.rbegin ());
-}
-template <ACE_T1> ACE_INLINE ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES>
-ACE_Cache_Map_Manager<ACE_T2>::rend (void)
-{
- return REVERSE_ITERATOR (this->map_.rend ());
-}
-
-#undef ACE_T1
-#undef ACE_T2
-
-////////////////////////////////////////////////////////////////////////////////
-
-#define ACE_T1 class KEY, class VALUE, class IMPLEMENTATION, class CACHING_STRATEGY, class ATTRIBUTES
-#define ACE_T2 KEY, VALUE, IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Iterator<ACE_T2>::ACE_Cache_Map_Iterator (const ACE_Cache_Map_Iterator <ACE_T2> &rhs)
- : iterator_implementation_ (rhs.iterator_implementation_)
-{
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Iterator<ACE_T2>::~ACE_Cache_Map_Iterator (void)
-{
-}
-
-template <ACE_T1> ACE_INLINE ACE_Cache_Map_Iterator<ACE_T2> &
-ACE_Cache_Map_Iterator<ACE_T2>::operator= (const ACE_Cache_Map_Iterator<ACE_T2> &rhs)
-{
- this->iterator_implementation_ = rhs.iterator_implementation_;
- return *this;
-}
-
-template <ACE_T1> ACE_INLINE int
-ACE_Cache_Map_Iterator<ACE_T2>::operator== (const ACE_Cache_Map_Iterator<ACE_T2> &rhs) const
-{
- return this->iterator_implementation_ == rhs.iterator_implementation_;
-}
-
-template <ACE_T1> ACE_INLINE int
-ACE_Cache_Map_Iterator<ACE_T2>::operator!= (const ACE_Cache_Map_Iterator<ACE_T2> &rhs) const
-{
- return this->iterator_implementation_ != rhs.iterator_implementation_;
-}
-
-template <ACE_T1> ACE_INLINE ACE_Reference_Pair<KEY, VALUE>
-ACE_Cache_Map_Iterator<ACE_T2>::operator* (void) const
-{
- value_type retn ((*this->iterator_implementation_).ext_id_,
- (*this->iterator_implementation_).int_id_.first ());
- return retn;
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Iterator<ACE_T2> &
-ACE_Cache_Map_Iterator<ACE_T2>::operator++ (void)
-{
- ++this->iterator_implementation_;
- return *this;
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Iterator<ACE_T2>
-ACE_Cache_Map_Iterator<ACE_T2>::operator++ (int)
-{
- ACE_Cache_Map_Iterator<ACE_T2> retn = *this;
- ++this->iterator_implementation_;
- return retn;
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Iterator<ACE_T2> &
-ACE_Cache_Map_Iterator<ACE_T2>::operator-- (void)
-{
- --this->iterator_implementation_;
- return *this;
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Iterator<ACE_T2>
-ACE_Cache_Map_Iterator<ACE_T2>::operator-- (int)
-{
- ACE_Cache_Map_Iterator<ACE_T2> retn = *this;
- --this->iterator_implementation_;
- return retn;
-}
-
-
-template <ACE_T1> ACE_INLINE void
-ACE_Cache_Map_Iterator<ACE_T2>::dump (void) const
-{
- this->iterator_implementation_.dump ();
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Iterator<ACE_T2>::ACE_Cache_Map_Iterator (const IMPLEMENTATION &iterator_impl)
- : iterator_implementation_ (iterator_impl)
-{
-}
-
-template <ACE_T1> ACE_INLINE IMPLEMENTATION &
-ACE_Cache_Map_Iterator<ACE_T2>::iterator_implementation (void)
-{
- return this->iterator_implementation_;
-}
-
-#undef ACE_T1
-#undef ACE_T2
-
-////////////////////////////////////////////////////////////////////////////////
-
-#define ACE_T1 class KEY, class VALUE, class REVERSE_IMPLEMENTATION, class CACHING_STRATEGY, class ATTRIBUTES
-#define ACE_T2 KEY, VALUE, REVERSE_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::ACE_Cache_Map_Reverse_Iterator (const ACE_Cache_Map_Reverse_Iterator <ACE_T2> &rhs)
- : reverse_iterator_implementation_ (rhs.reverse_iterator_implementation_)
-{
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::~ACE_Cache_Map_Reverse_Iterator (void)
-{
-}
-
-template <ACE_T1> ACE_INLINE ACE_Cache_Map_Reverse_Iterator<ACE_T2> &
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator= (const ACE_Cache_Map_Reverse_Iterator<ACE_T2> &rhs)
-{
- this->reverse_iterator_implementation_ = rhs.reverse_iterator_implementation_;
- return *this;
-}
-
-template <ACE_T1> ACE_INLINE int
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator== (const ACE_Cache_Map_Reverse_Iterator<ACE_T2> &rhs) const
-{
- return this->reverse_iterator_implementation_ == rhs.reverse_iterator_implementation_;
-}
-
-template <ACE_T1> ACE_INLINE int
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator!= (const ACE_Cache_Map_Reverse_Iterator<ACE_T2> &rhs) const
-{
- return this->reverse_iterator_implementation_ != rhs.reverse_iterator_implementation_;
-}
-
-template <ACE_T1> ACE_INLINE ACE_Reference_Pair<KEY, VALUE>
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator* (void) const
-{
- value_type retv ((*this->reverse_iterator_implementation_).ext_id_,
- (*this->reverse_iterator_implementation_).int_id_.first ());
- return retv;
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Reverse_Iterator<ACE_T2> &
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator++ (void)
-{
- ++this->reverse_iterator_implementation_;
- return *this;
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator++ (int)
-{
- ACE_Cache_Map_Reverse_Iterator<ACE_T2> retn = *this;
- ++this->reverse_iterator_implementation_;
- return retn;
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Reverse_Iterator<ACE_T2> &
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator-- (void)
-{
- --this->reverse_iterator_implementation_;
- return *this;
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::operator-- (int)
-{
- ACE_Cache_Map_Reverse_Iterator<ACE_T2> retn = *this;
- --this->reverse_iterator_implementation_;
- return retn;
-}
-
-
-template <ACE_T1> ACE_INLINE void
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::dump (void) const
-{
- this->reverse_iterator_implementation_.dump ();
-}
-
-template <ACE_T1> ACE_INLINE
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::ACE_Cache_Map_Reverse_Iterator (const REVERSE_IMPLEMENTATION &iterator_impl)
- : reverse_iterator_implementation_(iterator_impl)
-{
-}
-
-template <ACE_T1> ACE_INLINE REVERSE_IMPLEMENTATION &
-ACE_Cache_Map_Reverse_Iterator<ACE_T2>::iterator_implementation (void)
-{
- return this->reverse_iterator_implementation_;
-}
-
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
-#undef ACE_T1
-#undef ACE_T2
diff --git a/ace/Cached_Connect_Strategy_T.cpp b/ace/Cached_Connect_Strategy_T.cpp
deleted file mode 100644
index ff660ff20ed..00000000000
--- a/ace/Cached_Connect_Strategy_T.cpp
+++ /dev/null
@@ -1,546 +0,0 @@
-//$Id$
-
-#ifndef CACHED_CONNECT_STRATEGY_T_C
-#define CACHED_CONNECT_STRATEGY_T_C
-
-#include "ace/Cached_Connect_Strategy_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/ACE.h"
-#include "ace/Service_Repository.h"
-#include "ace/Synch.h"
-#include "ace/Service_Types.h"
-#include "ace/Thread_Manager.h"
-#include "ace/WFMO_Reactor.h"
-#include "ace/Pair_T.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/Cached_Connect_Strategy_T.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-ACE_RCSID(ace, Cached_Connect_Strategy_T, "$Id$")
-
-#define ACE_T1 class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX
-#define ACE_T2 SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX
-
-template <ACE_T1>
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::ACE_Cached_Connect_Strategy_Ex
-(CACHING_STRATEGY &caching_s,
- ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
- ACE_Recycling_Strategy<SVC_HANDLER> *rec_s,
- MUTEX *lock,
- int delete_lock)
- : CCSBASE (cre_s, con_s, rec_s, lock, delete_lock),
- connection_cache_ (caching_s)
-{
- if (this->open (cre_s, con_s, rec_s) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Cached_Connect_Strategy_Ex<ACE_T2>\n")));
-}
-
-template <ACE_T1>
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::~ACE_Cached_Connect_Strategy_Ex (void)
-{
-#if defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
- cleanup ();
-#else
- // Close down all cached service handlers.
- for (ACE_TYPENAME CONNECTION_CACHE::ITERATOR iter = this->connection_cache_.begin ();
- iter != this->connection_cache_.end ();
- ++iter)
- {
- if ((*iter).second () != 0)
- {
- (*iter).second ()->recycler (0, 0);
- (*iter).second ()->close ();
- }
- }
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-}
-
-template <ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::check_hint_i
-(SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, ACE_Pair<SVC_HANDLER *, ATTRIBUTES> > *&entry,
- int &found)
-{
- ACE_UNUSED_ARG (remote_addr);
- ACE_UNUSED_ARG (timeout);
- ACE_UNUSED_ARG (local_addr);
- ACE_UNUSED_ARG (reuse_addr);
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (perms);
-
- found = 0;
-
- // Get the recycling act for the svc_handler
- CONNECTION_CACHE_ENTRY *possible_entry = (CONNECTION_CACHE_ENTRY *) sh->recycling_act ();
-
- // Check to see if the hint svc_handler has been closed down
- if (possible_entry->ext_id_.recycle_state () == ACE_RECYCLABLE_CLOSED)
- {
- // If close, decrement refcount
- if (possible_entry->ext_id_.decrement () == 0)
- {
- // If refcount goes to zero, close down the svc_handler
- possible_entry->int_id_.first ()->recycler (0, 0);
- possible_entry->int_id_.first ()->close ();
- this->purge_i (possible_entry);
- }
-
- // Hint not successful
- found = 0;
-
- // Reset hint
- sh = 0;
- }
-
- // If hint is not closed, see if it is connected to the correct
- // address and is recyclable
- else if ((possible_entry->ext_id_.recycle_state () == ACE_RECYCLABLE_IDLE_AND_PURGABLE ||
- possible_entry->ext_id_.recycle_state () == ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE) &&
- possible_entry->ext_id_.subject () == remote_addr)
- {
- // Hint successful
- found = 1;
-
- // Tell the <svc_handler> that it should prepare itself for
- // being recycled.
- this->prepare_for_recycling (sh);
-
- //
- // Update the caching attributes directly since we don't do a
- // find() on the cache map.
- //
-
- // Indicates successful find.
- int find_result = 0;
-
- int result = this->caching_strategy ().notify_find (find_result,
- possible_entry->int_id_.second ());
-
- if (result == -1)
- return result;
- }
- else
- {
- // This hint will not be used.
- possible_entry->ext_id_.decrement ();
-
- // Hint not successful
- found = 0;
-
- // If <sh> is not connected to the correct address or is busy,
- // we will not use it.
- sh = 0;
- }
-
- if (found)
- entry = possible_entry;
-
- return 0;
-}
-
-template <ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::find_or_create_svc_handler_i
-(SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, ACE_Pair<SVC_HANDLER *, ATTRIBUTES> > *&entry,
- int &found)
-{
- REFCOUNTED_HASH_RECYCLABLE_ADDRESS search_addr (remote_addr);
-
- // Try to find the address in the cache. Only if we don't find it
- // do we create a new <SVC_HANDLER> and connect it with the server.
- if (this->find (search_addr, entry) == -1)
- {
- // Set the flag
- found = 0;
-
- // We need to use a temporary variable here since we are not
- // allowed to change <sh> because other threads may use this
- // when we let go of the lock during the OS level connect.
- //
- // Note that making a new svc_handler, connecting remotely,
- // binding to the map, and assigning of the hint and recycler
- // should be atomic to the outside world.
- SVC_HANDLER *potential_handler = 0;
-
- // Create a new svc_handler
- if (this->make_svc_handler (potential_handler) == -1)
- return -1;
-
- // Connect using the svc_handler.
- if (this->cached_connect (potential_handler,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms) == -1)
- {
- // Close the svc handler.
- potential_handler->close (0);
-
- return -1;
- }
- else
- {
- // Insert the new SVC_HANDLER instance into the cache.
- if (this->connection_cache_.bind (search_addr,
- potential_handler,
- entry) == -1)
- {
- // Close the svc handler and reset <sh>.
- potential_handler->close (0);
-
- return -1;
- }
-
- // Everything succeeded as planned. Assign <sh> to <potential_handler>.
- sh = potential_handler;
-
- // Set the recycler and the recycling act
- this->assign_recycler (sh, this, entry);
- }
- }
- else // We found a cached svc_handler.
- {
- // Set the flag
- found = 1;
-
- // Get the cached <svc_handler>
- sh = entry->int_id_.first ();
-
- // Tell the <svc_handler> that it should prepare itself for
- // being recycled.
- this->prepare_for_recycling (sh);
- }
-
- return 0;
-
-}
-
-template <ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cached_connect (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- // Actively establish the connection. This is a timed blocking
- // connect.
- if (this->new_connection (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms) == -1)
- {
- // If connect() failed because of timeouts, we have to reject
- // the connection entirely. This is necessary since currently
- // there is no way for the non-blocking connects to complete and
- // for the <Connector> to notify the cache of the completion of
- // connect().
-
- if (errno == EWOULDBLOCK)
- errno = ENOTSUP;
- else if (ACE::out_of_handles (errno))
- {
- // If the connect failed due to the process running out of
- // file descriptors then, auto_purging of some connections
- // are done from the CONNECTION_CACHE. This frees the
- // descriptors which get used in the connect process and
- // hence the same method is called again!
- if (this->purge_connections () == -1)
- return -1;
-
- // Try connecting again.
- if (this->new_connection (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms) == -1)
- {
- if (errno == EWOULDBLOCK)
- errno = ENOTSUP;
- return -1;
- }
- }
- else
- {
- return -1;
- }
- }
-
- return 0;
-
-}
-
-
-template <ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::connect_svc_handler_i
-(SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- int& found)
-{
- CONNECTION_CACHE_ENTRY *entry = 0;
-
- // Check if the user passed a hint svc_handler
- if (sh != 0)
- {
-
- int result = this->check_hint_i (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms,
- entry,
- found);
- if (result != 0)
- return result;
- }
-
- // If not found
- if (!found)
- {
- int result = this->find_or_create_svc_handler_i (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms,
- entry,
- found);
-
- if (result != 0)
- return result;
-
- }
-
- // For all successful cases: mark the <svc_handler> in the cache
- // as being <in_use>. Therefore recyclable is BUSY.
- entry->ext_id_.recycle_state (ACE_RECYCLABLE_BUSY);
-
- // And increment the refcount
- entry->ext_id_.increment ();
-
- return 0;
-}
-
-
-template <ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cache_i (const void *recycling_act)
-{
- // The wonders and perils of ACT
- CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act;
-
- // Mark the <svc_handler> in the cache as not being <in_use>.
- // Therefore recyclable is IDLE.
- entry->ext_id_.recycle_state (ACE_RECYCLABLE_IDLE_AND_PURGABLE);
-
- return 0;
-}
-
-template<ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::recycle_state_i (const void *recycling_act,
- ACE_Recyclable_State new_state)
-{
- // The wonders and perils of ACT
- CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act;
-
- // Mark the <svc_handler> in the cache as not being <in_use>.
- // Therefore recyclable is IDLE.
- entry->ext_id_.recycle_state (new_state);
-
- return 0;
-}
-
-template<ACE_T1> ACE_Recyclable_State
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::recycle_state_i (const void *recycling_act) const
-{
- // The wonders and perils of ACT
- CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act;
-
- // Mark the <svc_handler> in the cache as not being <in_use>.
- // Therefore recyclable is IDLE.
- return entry->ext_id_.recycle_state ();
-}
-
-template <ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::purge_i (const void *recycling_act)
-{
- // The wonders and perils of ACT
- CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act;
-
- return this->connection_cache_.unbind (entry);
-}
-
-
-template <ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::mark_as_closed_i (const void *recycling_act)
-{
- // The wonders and perils of ACT
- CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act;
-
- // Mark the <svc_handler> in the cache as CLOSED.
- entry->ext_id_.recycle_state (ACE_RECYCLABLE_CLOSED);
-
- return 0;
-}
-
-template <ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cleanup_hint_i (const void *recycling_act,
- void **act_holder)
-{
- // Reset the <*act_holder> in the confines and protection of the
- // lock.
- if (act_holder)
- *act_holder = 0;
-
- // The wonders and perils of ACT
- CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act;
-
- // Decrement the refcount on the <svc_handler>.
- int refcount = entry->ext_id_.decrement ();
-
- // If the svc_handler state is closed and the refcount == 0, call
- // close() on svc_handler.
- if (entry->ext_id_.recycle_state () == ACE_RECYCLABLE_CLOSED &&
- refcount == 0)
- {
- entry->int_id_.first ()->recycler (0, 0);
- entry->int_id_.first ()->close ();
- this->purge_i (entry);
- }
-
- return 0;
-}
-
-template <ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::purge_connections (void)
-{
- return this->connection_cache_.purge ();
-}
-
-template <ACE_T1> CACHING_STRATEGY &
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::caching_strategy (void)
-{
- return this->connection_cache_.caching_strategy ();
-}
-
-template <ACE_T1> int
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::find (ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR> &search_addr,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, ACE_Pair<SVC_HANDLER *, ATTRIBUTES> > *&entry)
-{
- typedef ACE_Hash_Map_Bucket_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDRESS,
- ACE_Pair<SVC_HANDLER *, ATTRIBUTES>,
- ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>,
- ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>,
- ACE_Null_Mutex>
- CONNECTION_CACHE_BUCKET_ITERATOR;
-
- CONNECTION_CACHE_BUCKET_ITERATOR iterator (this->connection_cache_.map (),
- search_addr);
-
- CONNECTION_CACHE_BUCKET_ITERATOR end (this->connection_cache_.map (),
- search_addr,
- 1);
-
- for (;
- iterator != end;
- ++iterator)
- {
- REFCOUNTED_HASH_RECYCLABLE_ADDRESS &addr = (*iterator).ext_id_;
-
- if (addr.recycle_state () != ACE_RECYCLABLE_IDLE_AND_PURGABLE &&
- addr.recycle_state () != ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE)
- continue;
-
- if (addr.subject () != search_addr.subject ())
- continue;
-
- entry = &(*iterator);
-
- //
- // Update the caching attributes directly since we don't do a
- // find() on the cache map.
- //
-
- // Indicates successful find.
- int find_result = 0;
-
- int result = this->caching_strategy ().notify_find (find_result,
- entry->int_id_.second ());
-
- if (result == -1)
- return result;
-
- return 0;
- }
-
- return -1;
-}
-
-#if defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-template <ACE_T1> void
-ACE_Cached_Connect_Strategy_Ex<ACE_T2>::cleanup (void)
-{
- typedef ACE_Hash_Map_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDRESS,
- ACE_Pair<SVC_HANDLER *, ATTRIBUTES>,
- ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>,
- ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>,
- ACE_Null_Mutex>
- CONNECTION_MAP_ITERATOR;
-
- CONNECTION_MAP_ITERATOR end = this->connection_cache_.map ().end ();
- CONNECTION_MAP_ITERATOR iter = this->connection_cache_.map ().begin ();
-
- for (;
- iter != end;
- ++iter)
- {
- if ((*iter).int_id_.first () != 0)
- {
- (*iter).int_id_.first ()->recycler (0, 0);
- (*iter).int_id_.first ()->close ();
- }
- }
-}
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Cached_Connect_Strategy_Ex)
-
-#undef ACE_T1
-#undef ACE_T2
-
-#endif /* CACHED_CONNECT_STRATEGY_T_C */
diff --git a/ace/Cached_Connect_Strategy_T.h b/ace/Cached_Connect_Strategy_T.h
deleted file mode 100644
index 941a8799cbf..00000000000
--- a/ace/Cached_Connect_Strategy_T.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Cached_Connect_Strategy_T.h
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef CACHED_CONNECT_STRATEGY_T_H
-#define CACHED_CONNECT_STRATEGY_T_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Strategies_T.h"
-#include "ace/Hash_Cache_Map_Manager_T.h"
-#include "ace/Caching_Strategies_T.h"
-#include "ace/Functor_T.h"
-#include "ace/Pair_T.h"
-#include "ace/Synch.h"
-
-// For linkers which cant grok long names...
-#define ACE_Cached_Connect_Strategy_Ex ACCSE
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
-class ACE_Cached_Connect_Strategy_Ex : public ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>
-{
- // = TITLE
- // A connection strategy which caches connections to peers
- // (represented by <SVC_HANDLER> instances), thereby allowing
- // subsequent re-use of unused, but available, connections.
- //
- // = DESCRIPTION
- // <Cached_Connect_Strategy> is intended to be used as a
- // plug-in connection strategy for <ACE_Strategy_Connector>.
- // It's added value is re-use of established connections and
- // tweaking the role of the cache as per the caching strategy.
-
-public:
-
- ACE_Cached_Connect_Strategy_Ex (CACHING_STRATEGY &caching_s,
- ACE_Creation_Strategy<SVC_HANDLER> *cre_s = 0,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s = 0,
- ACE_Recycling_Strategy<SVC_HANDLER> *rec_s = 0,
- MUTEX *lock = 0,
- int delete_lock = 0);
- // Constructor
-
- virtual ~ACE_Cached_Connect_Strategy_Ex (void);
- // Destructor
-
- virtual int purge_connections (void);
- // Explicit purging of connection entries from the connection cache.
-
- virtual int mark_as_closed_i (const void *recycling_act);
- // Mark as closed (non-locking version). This is used during the cleanup of the
- // connections purged.
-
- // = Typedefs for managing the map
- typedef ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>
- REFCOUNTED_HASH_RECYCLABLE_ADDRESS;
- typedef ACE_Hash_Cache_Map_Manager<REFCOUNTED_HASH_RECYCLABLE_ADDRESS,
- SVC_HANDLER *,
- ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>,
- ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>,
- CACHING_STRATEGY,
- ATTRIBUTES>
- CONNECTION_CACHE;
- typedef ACE_TYPENAME CONNECTION_CACHE::CACHE_ENTRY
- CONNECTION_CACHE_ENTRY;
- typedef ACE_TYPENAME CONNECTION_CACHE::key_type
- KEY;
- typedef ACE_TYPENAME CONNECTION_CACHE::mapped_type
- VALUE;
-
- // = Cleanup of the svc_handler.
- typedef ACE_Recyclable_Handler_Cleanup_Strategy<REFCOUNTED_HASH_RECYCLABLE_ADDRESS,
- ACE_Pair<SVC_HANDLER *, ATTRIBUTES>,
- ACE_Hash_Map_Manager_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDRESS,
- ACE_Pair<SVC_HANDLER *, ATTRIBUTES>,
- ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>,
- ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>,
- MUTEX> >
- CLEANUP_STRATEGY;
-
- typedef ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>
- CCSBASE;
-
- // = Accessor.
- CACHING_STRATEGY &caching_strategy (void);
-
-protected:
-
- int find (ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR> &search_addr,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, ACE_Pair<SVC_HANDLER *, ATTRIBUTES> > *&entry);
- // Find an idle handle.
-
- virtual int purge_i (const void *recycling_act);
- // Remove from cache (non-locking version).
-
- virtual int cache_i (const void *recycling_act);
- // Add to cache (non-locking version).
-
- virtual int recycle_state_i (const void *recycling_act,
- ACE_Recyclable_State new_state);
- virtual ACE_Recyclable_State recycle_state_i (const void *recycling_act) const;
- // Get/Set <recycle_state> (non-locking version).
-
- virtual int cleanup_hint_i (const void *recycling_act,
- void **act_holder);
- // Cleanup hint and reset <*act_holder> to zero if <act_holder != 0>.
-
- // = Helpers
- int check_hint_i (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, ACE_Pair<SVC_HANDLER *, ATTRIBUTES> > *&entry,
- int &found);
-
- int find_or_create_svc_handler_i (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, ACE_Pair<SVC_HANDLER *, ATTRIBUTES> > *&entry,
- int &found);
-
- virtual int connect_svc_handler_i (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- int &found);
-
- virtual int cached_connect (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- // Connection of the svc_handler with the remote host. This method
- // also encapsulates the connection done with auto_purging under the
- // hood. If the connect failed due to the process running out of
- // file descriptors then, auto_purging of some connections are done
- // from the CONNECTION_CACHE. This frees the descriptors which get
- // used in the connect process and hence the connect operation can
- // succeed.
-
-#if defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
- void cleanup (void);
- // Since g++ version < 2.8 arent happy with templates, this special
- // method had to be devised to avoid memory leaks and perform
- // cleanup of the <connection_cache_>.
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
- CONNECTION_CACHE connection_cache_;
- // Table that maintains the cache of connected <SVC_HANDLER>s.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Cached_Connect_Strategy_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Cached_Connect_Strategy_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* CACHED_CONNECT_STRATEGY_T_H */
diff --git a/ace/Caching_Strategies_T.cpp b/ace/Caching_Strategies_T.cpp
deleted file mode 100644
index f36d593ad84..00000000000
--- a/ace/Caching_Strategies_T.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-//$Id$
-
-#ifndef CACHING_STRATEGIES_T_C
-#define CACHING_STRATEGIES_T_C
-
-#include "ace/Caching_Strategies_T.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Caching_Strategies_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID(ace, Caching_Strategies_T, "$Id$")
-
-template<class ATTRIBUTES, class CACHING_UTILITY>
-ACE_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::~ACE_Caching_Strategy (void)
-{
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-
-template<class ATTRIBUTES, class CACHING_UTILITY>
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::ACE_LRU_Caching_Strategy (void)
- : timer_ (0),
- purge_percent_ (10)
-{
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////
-
-template<class ATTRIBUTES, class CACHING_UTILITY>
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::ACE_LFU_Caching_Strategy (void)
- : purge_percent_ (10)
-{
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////
-
-template<class ATTRIBUTES, class CACHING_UTILITY>
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::ACE_FIFO_Caching_Strategy (void)
- : order_ (0),
- purge_percent_ (10)
-{
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////
-
-ACE_ALLOC_HOOK_DEFINE(ACE_LRU_Caching_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_LFU_Caching_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Caching_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_Null_Caching_Strategy)
-
-#endif /* CACHING_STRATEGIES_T_C */
diff --git a/ace/Caching_Strategies_T.h b/ace/Caching_Strategies_T.h
deleted file mode 100644
index 8fd8c86aa06..00000000000
--- a/ace/Caching_Strategies_T.h
+++ /dev/null
@@ -1,529 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Caching_Strategies_T.h
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef CACHING_STRATEGIES_H
-#define CACHING_STRATEGIES_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#include "ace/Caching_Utility_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(_MSC_VER)
-#pragma warning(disable:4503)
-#endif /* _MSC_VER */
-
-// For linkers that cant grok long names.
-#define ACE_Caching_Strategy ACS
-
-template <class ATTRIBUTES, class CACHING_UTILITY>
-class ACE_Caching_Strategy
-{
- // = TITLE
- // This class is an abstract base class for a caching strategy.
- //
- // = DESCRIPTION
- // This class consists of all the interfaces a caching strategy should have and
- // is used in association with the ACE_Caching_Strategy_Adaptor.
-
-public:
-
- virtual ~ACE_Caching_Strategy (void);
- // Destructor.
-
- virtual ATTRIBUTES attributes (void) = 0;
- // Accessor method for the timer attributes.
-
- // = Accessor methods for the percentage of entries to purge.
- virtual double purge_percent (void) = 0;
- virtual void purge_percent (double percentage) = 0;
-
- // = Strategy related Operations
-
- virtual int notify_bind (int result,
- const ATTRIBUTES &attr) = 0;
- // This method acts as a notification about the CONTAINERs bind
- // method call.
-
- virtual int notify_find (int result,
- ATTRIBUTES &attr) = 0;
- // This method acts as a notification about the CONTAINERs find
- // method call
-
- virtual int notify_unbind (int result,
- const ATTRIBUTES &attr) = 0;
- // This method acts as a notification about the CONTAINERs unbind
- // method call
-
- virtual int notify_trybind (int result,
- ATTRIBUTES &attr) = 0;
- // This method acts as a notification about the CONTAINERs trybind
- // method call
-
- virtual int notify_rebind (int result,
- const ATTRIBUTES &attr) = 0;
- // This method acts as a notification about the CONTAINERs rebind
- // method call
-
- virtual CACHING_UTILITY &caching_utility (void) = 0;
- // Purge the cache.
-
- virtual void dump (void) const = 0;
- // Dumps the state of the object.
-};
-
-//////////////////////////////////////////////////////////////////////////
-
-#define ACE_Caching_Strategy_Adapter ACSA
-
-template <class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION>
-class ACE_Caching_Strategy_Adapter : public ACE_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>
-{
- // = TITLE
- // This class follows the Adaptor pattern and is used to provide
- // External Polymorphism by deriving from ACE_Caching_Strategy.
- //
- // = DESCRIPTION
- // This class simply delegates all requests to the
- // IMPLEMNETATION object within. This class should be passed in
- // place of the the abstract base ACE_Caching_Strategy class as
- // part of the External Polymorphism pattern.
-
-public:
-
- ACE_Caching_Strategy_Adapter (IMPLEMENTATION *implementation = 0,
- int delete_implementation = 0);
- // Constructor.
-
- ~ACE_Caching_Strategy_Adapter (void);
- // Destructor.
-
- ATTRIBUTES attributes (void);
- // Accessor method for the timer attributes.
-
- // = Accessor methods for the percentage of entries to purge.
- double purge_percent (void);
- void purge_percent (double percentage);
-
- // = Strategy related Operations
-
- int notify_bind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs bind
- // method call.
-
- int notify_find (int result,
- ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs find
- // method call
-
- int notify_unbind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs unbind
- // method call
-
- int notify_trybind (int result,
- ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs trybind
- // method call
-
- int notify_rebind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs rebind
- // method call
-
- IMPLEMENTATION &implementation (void);
- // Accessor to the implementation.
-
- CACHING_UTILITY &caching_utility (void);
- // Purge the cache.
-
- void dump (void) const;
- // Dumps the state of the object.
-
-private:
-
- IMPLEMENTATION *implementation_;
- // Implementation class.
-
- int delete_implementation_;
- // Do we need to delete the implementation?
-};
-
-//////////////////////////////////////////////////////////////////////////
-#define ACE_LRU_Caching_Strategy ALRU
-
-template <class ATTRIBUTES, class CACHING_UTILITY>
-class ACE_LRU_Caching_Strategy
-{
- // = TITLE
- // Defines a Least Recently Used strategy which will decide on
- // the item to be removed from the cache.
- //
- // = DESCRIPTION
- // This is a strategy which makes use of a virtual timer which
- // is updated whenever an item is inserted or looked up in the
- // container. When the need of purging entries arises, the items
- // with the lowest timer values are removed.
- //
- // Explanation of the template parameter list:
- // CONTAINER is any map with entries of type <KEY, VALUE>.
- // The ATTRIBUTES are the deciding factor for purging of entries
- // and should logically be included with the VALUE. Some ways of
- // doing this are: As being a member of the VALUE or VALUE being
- // ACE_Pair<x, ATTRIBUTES>. The CACHING_UTILITY is the
- // class which can be plugged in and which decides the entries
- // to purge.
-
-public:
-
- // Traits.
- typedef ATTRIBUTES CACHING_ATTRIBUTES;
-
- // = Initialisation and termination.
-
- ACE_LRU_Caching_Strategy (void);
- // The <container> is the map in which the entries reside. The
- // timer attribute is initialed to zero in this constructor. And
- // the <purge_percent> field denotes the percentage of the entries
- // in the cache which can be purged automagically and by default is
- // set to 10%.
-
- // = Operations of the strategy.
-
- ATTRIBUTES attributes (void);
- // Accessor method for the timer attributes.
-
- // = Accessor methods for the percentage of entries to purge.
- double purge_percent (void);
-
- void purge_percent (double percentage);
-
- // = Strategy related Operations
-
- int notify_bind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs bind
- // method call.
-
- int notify_find (int result,
- ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs find
- // method call
-
- int notify_unbind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs unbind
- // method call
-
-
- int notify_trybind (int result,
- ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs trybind
- // method call
-
- int notify_rebind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs rebind
- // method call
-
- CACHING_UTILITY &caching_utility (void);
- // Purge the cache.
-
- void dump (void) const;
- // Dumps the state of the object.
-
-private:
-
- ATTRIBUTES timer_;
- // This element is the one which is the deciding factor for purging
- // of an ITEM.
-
- double purge_percent_;
- // The level about which the purging will happen automagically.
-
- CACHING_UTILITY caching_utility_;
- // This is the helper class which will decide and expunge entries
- // from the cache.
-};
-
-//////////////////////////////////////////////////////////////////////////
-#define ACE_LFU_Caching_Strategy ALFU
-
-template <class ATTRIBUTES, class CACHING_UTILITY>
-class ACE_LFU_Caching_Strategy
-{
- // = TITLE
- // Defines a Least Frequently Used strategy for which will decide on
- // the item to be removed from the cache.
- //
- // = DESCRIPTION
- // A attribute is tagged to each item which increments whenever
- // the item is bound or looked up in the cache. Thus it denotes
- // the frequency of use. According to the value of the attribute
- // the item is removed from the CONTAINER i.e cache.
- //
- // Explanation of the template parameter list:
- // CONTAINER is any map with entries of type <KEY, VALUE>.
- // The ATTRIBUTES are the deciding factor for purging of entries
- // and should logically be included with the VALUE. Some ways of
- // doing this are: As being a member of the VALUE or VALUE being
- // ACE_Pair<x, ATTRIBUTES>. The CACHING_UTILITY is the
- // class which can be plugged in and which decides the entries
- // to purge.
-
-public:
-
- // Traits.
- typedef ATTRIBUTES CACHING_ATTRIBUTES;
-
- // = Initialisation and termination methods.
-
- ACE_LFU_Caching_Strategy (void);
- // The <container> is the map in which the entries reside. The
- // timer attribute is initialed to zero in this constructor. And
- // the <purge_percent> field denotes the percentage of the entries
- // in the cache which can be purged automagically and by default is
- // set to 10%.
-
- // = Strategy methods.
-
- ATTRIBUTES attributes (void);
- // Access the attributes.
-
- // = Accessor methods for the percentage of entries to purge.
- double purge_percent (void);
-
- void purge_percent (double percentage);
-
- // = Strategy related Operations
-
- int notify_bind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs bind
- // method call.
-
- int notify_find (int result,
- ATTRIBUTES &attr);
- // Lookup notification.
-
- int notify_unbind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs unbind
- // method call
-
- int notify_trybind (int result,
- ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs trybind
- // method call
-
- int notify_rebind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs rebind
- // method call
-
- CACHING_UTILITY &caching_utility (void);
- // Purge the cache.
-
- void dump (void) const;
- // Dumps the state of the object.
-
-private:
-
- double purge_percent_;
- // The level about which the purging will happen automagically.
-
- CACHING_UTILITY caching_utility_;
- // This is the helper class which will decide and expunge entries
- // from the cache.
-};
-
-/////////////////////////////////////////////////////////////
-#define ACE_FIFO_Caching_Strategy AFIFO
-
-template<class ATTRIBUTES, class CACHING_UTILITY>
-class ACE_FIFO_Caching_Strategy
-{
- // = TITLE
- // The First In First Out strategy is implemented wherein each
- // item is ordered.
- //
- // = DESCRIPTION
- // The order tag of each item is used to decide the item to be
- // removed from the cache. The items with least order are removed.
- //
- // Explanation of the template parameter list:
- // CONTAINER is any map with entries of type <KEY, VALUE>.
- // The ATTRIBUTES are the deciding factor for purging of entries
- // and should logically be included with the VALUE. Some ways of
- // doing this are: As being a member of the VALUE or VALUE being
- // ACE_Pair<x, ATTRIBUTES>. The CACHING_UTILITY is the
- // class which can be plugged in and which decides the entries
- // to purge.
-
-public:
-
- typedef ATTRIBUTES CACHING_ATTRIBUTES;
-
- // = Initialisation and termination.
-
- ACE_FIFO_Caching_Strategy (void);
- // The <container> is the map in which the entries reside. The
- // timer attribute is initialed to zero in this constructor. And
- // the <purge_percent> field denotes the percentage of the entries
- // in the cache which can be purged automagically and by default is
- // set to 10%.
-
- // = Strategy methods.
-
- ATTRIBUTES attributes (void);
- // Accessor method.
-
- // = Accessor methods for the percentage of entries to purge.
- double purge_percent (void);
-
- void purge_percent (double percentage);
-
- // = Strategy related Operations
-
- int notify_bind (int result,
- const ATTRIBUTES &attr);
- // Notification for an item getting bound into the cache.
-
- int notify_find (int result,
- ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs find
- // method call
-
- int notify_unbind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs unbind
- // method call
-
- int notify_trybind (int result,
- ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs trybind
- // method call
-
- int notify_rebind (int result,
- const ATTRIBUTES &attr);
- // Notification for an item getting bound again into the cache.
-
- CACHING_UTILITY &caching_utility (void);
- // Purge the cache.
-
- void dump (void) const;
- // Dumps the state of the object.
-
-private:
-
- ATTRIBUTES order_;
- // The order is the deciding factor for the item to be removed from
- // the cache.
-
- double purge_percent_;
- // The level about which the purging will happen automagically.
-
- CACHING_UTILITY caching_utility_;
- // This is the helper class which will decide and expunge entries
- // from the cache.
-};
-
-//////////////////////////////////////////////////////////////////////
-#define ACE_Null_Caching_Strategy ANULL
-
-template<class ATTRIBUTES, class CACHING_UTILITY>
-class ACE_Null_Caching_Strategy
-{
- // = TITLE
- // The is a special caching strategy which doesnt have the purging
- // feature.
- //
- // = DESCRIPTION
- // No purging provided. To be used when purging might be too expensive
- // an operation.
-
-public:
-
- // = Traits.
- typedef ATTRIBUTES CACHING_ATTRIBUTES;
-
- // = Strategy methods. All are NO_OP methods!!!
-
- ATTRIBUTES attributes (void);
- // Accessor method.
-
- // = Accessor methods for the percentage of entries to purge.
- double purge_percent (void);
-
- void purge_percent (double percentage);
-
- // = Strategy related Operations
-
- int notify_bind (int result,
- const ATTRIBUTES &attr);
- // Notification for an item getting bound into the cache.
-
- int notify_find (int result,
- ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs find
- // method call
-
- int notify_unbind (int result,
- const ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs unbind
- // method call
-
- int notify_trybind (int result,
- ATTRIBUTES &attr);
- // This method acts as a notification about the CONTAINERs trybind
- // method call
-
- int notify_rebind (int result,
- const ATTRIBUTES &attr);
- // Notification for an item getting bound again into the cache.
-
- CACHING_UTILITY &caching_utility (void);
- // Purge the cache.
-
- void dump (void) const;
- // Dumps the state of the object.
-
-private:
-
- CACHING_UTILITY caching_utility_;
- // This is the helper class which will decide and expunge entries
- // from the cache.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Caching_Strategies_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Caching_Strategies_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Caching_Strategies_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* CACHING_STRATEGIES_H */
diff --git a/ace/Caching_Strategies_T.i b/ace/Caching_Strategies_T.i
deleted file mode 100644
index 30df91a76ed..00000000000
--- a/ace/Caching_Strategies_T.i
+++ /dev/null
@@ -1,448 +0,0 @@
-/* -*-C++-*- */
-//$Id$
-
-//////////////////////////////////////////////////////////////////////////////////
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::ACE_Caching_Strategy_Adapter (IMPLEMENTATION *implementation,
- int delete_implementation)
- : implementation_ (implementation),
- delete_implementation_ (delete_implementation)
-{
- if (this->implementation_ == 0)
- {
- ACE_NEW (this->implementation_,
- IMPLEMENTATION);
- this->delete_implementation_ = 1;
- }
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::~ACE_Caching_Strategy_Adapter (void)
-{
- if (this->delete_implementation_)
- {
- delete this->implementation_;
- this->delete_implementation_ = 0;
- this->implementation_ = 0;
- }
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE ATTRIBUTES
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::attributes (void)
-{
- return this->implementation_->attributes ();
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE double
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::purge_percent (void)
-{
- return this->implementation_->purge_percent ();
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE void
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::purge_percent (double percentage)
-{
- this->implementation_->purge_percent (percentage);
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE int
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::notify_bind (int result,
- const ATTRIBUTES &attr)
-{
- return this->implementation_->notify_bind (result,
- attr);
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE int
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::notify_find (int result,
- ATTRIBUTES &attr)
-{
- return this->implementation_->notify_find (result,
- attr);
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE int
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::notify_unbind (int result,
- const ATTRIBUTES &attr)
-{
- return this->implementation_->notify_unbind (result,
- attr);
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE int
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::notify_trybind (int result,
- ATTRIBUTES &attr)
-{
- return this->implementation_->notify_trybind (result,
- attr);
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE int
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::notify_rebind (int result,
- const ATTRIBUTES &attr)
-{
- return this->implementation_->notify_rebind (result,
- attr);
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE IMPLEMENTATION &
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::implementation (void)
-{
- return *this->implementation_;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE CACHING_UTILITY &
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::caching_utility (void)
-{
- return this->implementation_->caching_utility ();
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY, class IMPLEMENTATION> ACE_INLINE void
-ACE_Caching_Strategy_Adapter<ATTRIBUTES, CACHING_UTILITY, IMPLEMENTATION>::dump (void) const
-{
- ACE_TRACE ("ACE_Caching_Strategy_Adapter::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE ATTRIBUTES
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::attributes (void)
-{
- return this->timer_;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE double
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::purge_percent (void)
-{
- return this->purge_percent_;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE void
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::purge_percent (double percentage)
-{
- this->purge_percent_ = percentage;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_bind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- if (result == 0)
- ++this->timer_;
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_find (int result,
- ATTRIBUTES &attr)
-{
- if (result == 0)
- {
- attr = this->timer_;
- ++this->timer_;
- }
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_unbind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_trybind (int result,
- ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_rebind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- if (result == 0)
- ++this->timer_;
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE CACHING_UTILITY &
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::caching_utility (void)
-{
- return this->caching_utility_;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE void
-ACE_LRU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::dump (void) const
-{
- ACE_TRACE ("ACE_LRU_Caching_Strategy::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("timer_ = %d "), this->timer_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE ATTRIBUTES
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::attributes (void)
-{
- return 0;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE double
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::purge_percent (void)
-{
- return this->purge_percent_;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE void
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::purge_percent (double percentage)
-{
- this->purge_percent_ = percentage;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_bind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_find (int result,
- ATTRIBUTES &attr)
-{
- if (result == 0)
- ++attr;
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_trybind (int result,
- ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_rebind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_unbind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE CACHING_UTILITY &
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::caching_utility (void)
-{
- return this->caching_utility_;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE void
-ACE_LFU_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::dump (void) const
-{
- ACE_TRACE ("ACE_LFU_Caching_Strategy::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-//////////////////////////////////////////////////////////////////////////////////////
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE ATTRIBUTES
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::attributes (void)
-{
- return this->order_;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE double
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::purge_percent (void)
-{
- return this->purge_percent_;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE void
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::purge_percent (double percentage)
-{
- this->purge_percent_ = percentage;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_bind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- if (result == 0)
- ++this->order_;
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_find (int result,
- ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_unbind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_trybind (int result,
- ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_rebind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- if (result == 0)
- ++this->order_;
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE CACHING_UTILITY &
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::caching_utility (void)
-{
- return this->caching_utility_;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE void
-ACE_FIFO_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::dump (void) const
-{
- ACE_TRACE ("ACE_FIFO_Caching_Strategy::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("order_ = %d "), this->order_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-//////////////////////////////////////////////////////////////////////////////////
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE ATTRIBUTES
-ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::attributes (void)
-{
- return 0;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE double
-ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::purge_percent (void)
-{
- return 0;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE void
-ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::purge_percent (double percentage)
-{
- ACE_UNUSED_ARG (percentage);
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_bind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_find (int result,
- ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_unbind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_trybind (int result,
- ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE int
-ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::notify_rebind (int result,
- const ATTRIBUTES &attr)
-{
- ACE_UNUSED_ARG (attr);
-
- return result;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE CACHING_UTILITY &
-ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::caching_utility (void)
-{
- return this->caching_utility_;
-}
-
-template<class ATTRIBUTES, class CACHING_UTILITY> ACE_INLINE void
-ACE_Null_Caching_Strategy<ATTRIBUTES, CACHING_UTILITY>::dump (void) const
-{
- ACE_TRACE ("ACE_Null_Caching_Strategy::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-//////////////////////////////////////////////////////////////////////////////////
diff --git a/ace/Caching_Utility_T.cpp b/ace/Caching_Utility_T.cpp
deleted file mode 100644
index 4dcbbfef861..00000000000
--- a/ace/Caching_Utility_T.cpp
+++ /dev/null
@@ -1,483 +0,0 @@
-//$Id$
-
-#ifndef CACHING_UTILITY_T_C
-#define CACHING_UTILITY_T_C
-
-#include "ace/Caching_Utility_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Strategies.h"
-
-ACE_RCSID(ace, Caching_Utility_T, "$Id$")
-
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Pair_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy,
- int delete_cleanup_strategy)
- : cleanup_strategy_ (cleanup_strategy),
- delete_cleanup_strategy_ (delete_cleanup_strategy)
-{
- if (cleanup_strategy == 0)
- {
- ACE_NEW (this->cleanup_strategy_,
- CLEANUP_STRATEGY);
- this->delete_cleanup_strategy_ = 1;
- }
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::~ACE_Pair_Caching_Utility (void)
-{
- if (this->delete_cleanup_strategy_)
- delete this->cleanup_strategy_;
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> int
-ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::clear_cache (CONTAINER &container,
- double purge_percent)
-{
- // Check that the purge_percent is non-zero.
- if (purge_percent == 0)
- return 0;
-
- // Get the number of entries in the container.
- size_t current_map_size = container.current_size ();
-
- // Also whether the number of entries in the cache is just one!
- // Oops! then there is no way out but exiting. So return an error.
- if (current_map_size <= 1)
- return 0;
-
- // Calculate the no of entries to remove from the cache depending
- // upon the <purge_percent>.
- size_t entries_to_remove = size_t ((double (purge_percent) / 100 * current_map_size) + 0.5);
-
- KEY *key_to_remove = 0;
- VALUE *value_to_remove = 0;
-
- for (size_t i = 0; i < entries_to_remove ; ++i)
- {
- this->minimum (container,
- key_to_remove,
- value_to_remove);
-
- // Simply verifying that the key is non-zero.
- // This is important for strategies where the minimum
- // entry cant be found due to constraints on the type of entry
- // to remove.
- if (key_to_remove == 0)
- return 0;
-
- if (this->cleanup_strategy_->cleanup (container,
- key_to_remove,
- value_to_remove) == -1)
- return -1;
-
- }
-
- return 0;
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> void
-ACE_Pair_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::minimum (CONTAINER &container,
- KEY *&key_to_remove,
- VALUE *&value_to_remove)
-{
- // Starting values.
- ITERATOR iter = container.begin ();
- ITERATOR end = container.end ();
- ATTRIBUTES min = (*iter).int_id_.second ();
- key_to_remove = &(*iter).ext_id_;
- value_to_remove = &(*iter).int_id_;
-
- // The iterator moves thru the container searching for the entry
- // with the lowest ATTRIBUTES.
- for (++iter;
- iter != end;
- ++iter)
- {
- if (min > (*iter).int_id_.second ())
- {
- // Ah! an item with lower ATTTRIBUTES...
- min = (*iter).int_id_.second ();
- key_to_remove = &(*iter).ext_id_;
- value_to_remove = &(*iter).int_id_;
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Recyclable_Handler_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy,
- int delete_cleanup_strategy)
- : cleanup_strategy_ (cleanup_strategy),
- delete_cleanup_strategy_ (delete_cleanup_strategy)
-{
- if (cleanup_strategy == 0)
- {
- ACE_NEW (this->cleanup_strategy_,
- CLEANUP_STRATEGY);
- this->delete_cleanup_strategy_ = 1;
- }
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::~ACE_Recyclable_Handler_Caching_Utility (void)
-{
- if (this->delete_cleanup_strategy_)
- delete this->cleanup_strategy_;
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> int
-ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::clear_cache (CONTAINER &container,
- double purge_percent)
-{
- // Check that the purge_percent is non-zero.
- if (purge_percent == 0)
- return 0;
-
- // Get the number of entries in the container.
- size_t current_map_size = container.current_size ();
-
- // Also whether the number of entries in the cache is just one!
- // Oops! then there is no way out but exiting. So return an error.
- if (current_map_size <= 1)
- return 0;
-
- // Calculate the no of entries to remove from the cache depending
- // upon the <purge_percent>.
- size_t entries_to_remove = size_t ((double (purge_percent) / 100 * current_map_size) + 0.5);
-
- KEY *key_to_remove = 0;
- VALUE *value_to_remove = 0;
-
- for (size_t i = 0; i < entries_to_remove ; ++i)
- {
- this->minimum (container,
- key_to_remove,
- value_to_remove);
-
- // Simply verifying that the key is non-zero.
- // This is important for strategies where the minimum
- // entry cant be found due to constraints on the type of entry
- // to remove.
- if (key_to_remove == 0)
- return 0;
-
- if (this->cleanup_strategy_->cleanup (container,
- key_to_remove,
- value_to_remove) == -1)
- return -1;
- }
-
- return 0;
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> void
-ACE_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::minimum (CONTAINER &container,
- KEY *&key_to_remove,
- VALUE *&value_to_remove)
-{
- // Starting values.
- ITERATOR end = container.end ();
- ITERATOR iter = container.begin ();
- ATTRIBUTES min = (*iter).int_id_.second ();
- key_to_remove = 0;
- value_to_remove = 0;
- // Found the minimum entry to be purged?
- int found = 0;
-
- // The iterator moves thru the container searching for the entry
- // with the lowest ATTRIBUTES.
- for (;
- iter != end;
- ++iter)
- {
- // If the <min> entry isnt IDLE_AND_PURGABLE continue until you reach
- // the first entry which can be purged. This is the minimum with
- // which you will compare the rest of the purgable entries.
- if ((*iter).ext_id_.recycle_state () == ACE_RECYCLABLE_IDLE_AND_PURGABLE ||
- (*iter).ext_id_.recycle_state () == ACE_RECYCLABLE_PURGABLE_BUT_NOT_IDLE)
- {
- if (found == 0)
- {
- min = (*iter).int_id_.second ();
- key_to_remove = &(*iter).ext_id_;
- value_to_remove = &(*iter).int_id_;
- found = 1;
- }
- else
- {
- // Ah! an entry with lower ATTTRIBUTES...
- if (min > (*iter).int_id_.second ())
- {
- min = (*iter).int_id_.second ();
- key_to_remove = &(*iter).ext_id_;
- value_to_remove = &(*iter).int_id_;
- }
- }
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-ACE_Refcounted_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Refcounted_Recyclable_Handler_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy,
- int delete_cleanup_strategy)
- : cleanup_strategy_ (cleanup_strategy),
- delete_cleanup_strategy_ (delete_cleanup_strategy),
- marked_as_closed_entries_ (0)
-{
- if (cleanup_strategy == 0)
- {
- ACE_NEW (this->cleanup_strategy_,
- CLEANUP_STRATEGY);
- this->delete_cleanup_strategy_ = 1;
- }
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-ACE_Refcounted_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::~ACE_Refcounted_Recyclable_Handler_Caching_Utility (void)
-{
- if (this->delete_cleanup_strategy_)
- delete this->cleanup_strategy_;
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> int
-ACE_Refcounted_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::clear_cache (CONTAINER &container,
- double purge_percent)
-{
- // Check that the purge_percent is non-zero.
- if (purge_percent == 0)
- return 0;
-
- // Get the number of entries in the container which can be considered for purging.
- size_t available_entries = container.current_size () - this->marked_as_closed_entries_;
-
- // Also whether the number of entries in the cache zero.
- // Oops! then there is no way out but exiting.
- if (available_entries <= 0)
- return 0;
-
- // Calculate the no of entries to remove from the cache depending
- // upon the <purge_percent>.
- size_t entries_to_remove = size_t ((double (purge_percent) / 100 * available_entries) + 0.5);
-
- if (entries_to_remove >= available_entries ||
- entries_to_remove == 0)
- entries_to_remove = available_entries - 1;
-
- KEY *key_to_remove = 0;
- VALUE *value_to_remove = 0;
-
- for (size_t i = 0; i < entries_to_remove ; ++i)
- {
- this->minimum (container,
- key_to_remove,
- value_to_remove);
-
- // Simply verifying that the key is non-zero.
- // This is important for strategies where the minimum
- // entry cant be found due to constraints on the type of entry
- // to remove.
- if (key_to_remove == 0)
- return 0;
-
- if (this->cleanup_strategy_->cleanup (container,
- key_to_remove,
- value_to_remove) == -1)
- return -1;
-
- ++this->marked_as_closed_entries_;
- }
-
- return 0;
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> void
-ACE_Refcounted_Recyclable_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::minimum (CONTAINER &container,
- KEY *&key_to_remove,
- VALUE *&value_to_remove)
-{
- // Starting values.
- ITERATOR end = container.end ();
- ITERATOR iter = container.begin ();
- ATTRIBUTES min = (*iter).int_id_.second ();
- key_to_remove = 0;
- value_to_remove = 0;
- // Found the minimum entry to be purged?
- int found = 0;
-
- // The iterator moves thru the container searching for the entry
- // with the lowest ATTRIBUTES.
- for (;
- iter != end;
- ++iter)
- {
- // If the <min> entry isnt IDLE_AND_PURGABLE continue until you reach
- // the first entry which can be purged. This is the minimum with
- // which you will compare the rest of the purgable entries.
- if ((*iter).ext_id_.recycle_state () == ACE_RECYCLABLE_IDLE_AND_PURGABLE ||
- (*iter).ext_id_.recycle_state () == ACE_RECYCLABLE_PURGABLE_BUT_NOT_IDLE)
- {
- if (found == 0)
- {
- min = (*iter).int_id_.second ();
- key_to_remove = &(*iter).ext_id_;
- value_to_remove = &(*iter).int_id_;
- found = 1;
- }
- else
- {
- // Ah! an entry with lower ATTTRIBUTES...
- if (min > (*iter).int_id_.second ())
- {
- min = (*iter).int_id_.second ();
- key_to_remove = &(*iter).ext_id_;
- value_to_remove = &(*iter).int_id_;
- }
- }
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-ACE_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Handler_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy,
- int delete_cleanup_strategy)
- : cleanup_strategy_ (cleanup_strategy),
- delete_cleanup_strategy_ (delete_cleanup_strategy)
-{
- if (cleanup_strategy == 0)
- {
- ACE_NEW (this->cleanup_strategy_,
- CLEANUP_STRATEGY);
- this->delete_cleanup_strategy_ = 1;
- }
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-ACE_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::~ACE_Handler_Caching_Utility (void)
-{
- if (this->delete_cleanup_strategy_)
- delete this->cleanup_strategy_;
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> int
-ACE_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::clear_cache (CONTAINER &container,
- double purge_percent)
-{
- // Check that the purge_percent is non-zero.
- if (purge_percent == 0)
- return 0;
-
- // Get the number of entries in the container.
- size_t current_map_size = container.current_size ();
-
- // Also whether the number of entries in the cache is just one!
- // Oops! then there is no way out but exiting. So return an error.
- if (current_map_size <= 1)
- return 0;
-
- // Calculate the no of entries to remove from the cache depending
- // upon the <purge_percent>.
- size_t entries_to_remove = (purge_percent / 100 * current_map_size) + 0.5;
-
- KEY *key_to_remove = 0;
- VALUE *value_to_remove = 0;
-
- for (size_t i = 0; i < entries_to_remove ; ++i)
- {
- this->minimum (container,
- key_to_remove,
- value_to_remove);
-
- if (this->cleanup_strategy_->cleanup (container,
- key_to_remove,
- value_to_remove) == -1)
- return -1;
- }
-
- return 0;
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> void
-ACE_Handler_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::minimum (CONTAINER &container,
- KEY *&key_to_remove,
- VALUE *&value_to_remove)
-{
- // Starting values.
- ITERATOR iter = container.begin ();
- ITERATOR end = container.end ();
- ATTRIBUTES min = (*iter).int_id_->caching_attributes ();
- key_to_remove = &(*iter).ext_id_;
- value_to_remove = &(*iter).int_id_;
-
- // The iterator moves thru the container searching for the entry
- // with the lowest ATTRIBUTES.
- for (++iter;
- iter != end;
- ++iter)
- {
- if (min > (*iter).int_id_->caching_attributes () &&
- (*iter).int_id_->active () != 1)
- {
- // Ah! an item with lower ATTTRIBUTES...
- min = (*iter).int_id_->caching_attributes ();
- key_to_remove = &(*iter).ext_id_;
- value_to_remove = &(*iter).int_id_;
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-ACE_Null_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::ACE_Null_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy,
- int delete_cleanup_strategy)
- : cleanup_strategy_ (cleanup_strategy),
- delete_cleanup_strategy_ (delete_cleanup_strategy)
-{
- if (cleanup_strategy == 0)
- {
- ACE_NEW (this->cleanup_strategy_,
- CLEANUP_STRATEGY);
- this->delete_cleanup_strategy_ = 1;
- }
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-ACE_Null_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::~ACE_Null_Caching_Utility (void)
-{
- if (this->delete_cleanup_strategy_)
- delete this->cleanup_strategy_;
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> int
-ACE_Null_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::clear_cache (CONTAINER &container,
- double purge_percent)
-{
- ACE_UNUSED_ARG (container);
- ACE_UNUSED_ARG (purge_percent);
-
- return 0;
-}
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES> void
-ACE_Null_Caching_Utility<KEY, VALUE, CONTAINER, ITERATOR, ATTRIBUTES>::minimum (CONTAINER &container,
- KEY *&key_to_remove,
- VALUE *&value_to_remove)
-{
- ACE_UNUSED_ARG (container);
- ACE_UNUSED_ARG (key_to_remove);
- ACE_UNUSED_ARG (value_to_remove);
-}
-
-#endif /* CACHING_UTILITY_T_C */
diff --git a/ace/Caching_Utility_T.h b/ace/Caching_Utility_T.h
deleted file mode 100644
index 17db3a5b081..00000000000
--- a/ace/Caching_Utility_T.h
+++ /dev/null
@@ -1,307 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Caching_Utility_T.h
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef CACHING_UTILITY_H
-#define CACHING_UTILITY_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Cleanup_Strategies_T.h"
-
-// For linkers that cant grok long names.
-#define ACE_Pair_Caching_Utility APUTIL
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-class ACE_Pair_Caching_Utility
-{
- // = TITLE
- // Defines a helper class for the Caching Strategies.
- //
- // = DESCRIPTION
- // This class defines the methods commonly used by the different
- // caching strategies. For instance: <clear_cache> method which
- // decides and purges the entry from the container. Note: This
- // class helps in the caching_strategies using a container
- // containing entries of <KEY, ACE_Pair<VALUE, attributes>>
- // kind. The attributes helps in deciding the entries to be
- // purged. The Cleanup_Strategy is the callback class to which the
- // entries to be cleaned up will be delegated.
-public:
-
- typedef ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY;
-
- ACE_Pair_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy = 0,
- int delete_cleanup_strategy = 0);
-
- // Constructor.
-
- ~ACE_Pair_Caching_Utility (void);
- // Destructor.
-
- int clear_cache (CONTAINER &container,
- double purge_percent);
-
- // Purge entries from the <container>. The Cleanup_Strategy will do
- // the actual job of cleanup once the entries to be cleaned up are
- // decided.
-
-protected:
-
- void minimum (CONTAINER &container,
- KEY *&key_to_remove,
- VALUE *&value_to_remove);
- // Find the entry with minimum caching attributes.
-
- CLEANUP_STRATEGY *cleanup_strategy_;
- // The cleanup strategy which can be used to destroy the entries of
- // the container.
-
- int delete_cleanup_strategy_;
- // Whether the cleanup_strategy should be destroyed or not.
-};
-
-////////////////////////////////////////////////////////////////////////////////
-#define ACE_Recyclable_Handler_Caching_Utility ARHUTIL
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-class ACE_Recyclable_Handler_Caching_Utility
-{
- // = TITLE
- // Defines a helper class for the Caching Strategies.
- //
- // = DESCRIPTION
- // This class defines the methods commonly used by the different
- // caching strategies. For instance: <clear_cache> method which
- // decides and purges the entry from the container. Note: This
- // class helps in the caching_strategies using a container
- // containing entries of <KEY, Svc_Handler> kind. The attributes
- // helps in deciding the entries to be purged. The
- // Cleanup_Strategy is the callback class to which the entries to
- // be cleaned up will be delegated.
-
-public:
-
- typedef ACE_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY;
- typedef ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY_BASE;
-
- ACE_Recyclable_Handler_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy = 0,
- int delete_cleanup_strategy = 0);
-
- // Constructor.
-
- ~ACE_Recyclable_Handler_Caching_Utility (void);
- // Destructor.
-
- int clear_cache (CONTAINER &container,
- double purge_percent);
- // Purge entries from the <container>. The Cleanup_Strategy will do
- // the actual job of cleanup once the entries to be cleaned up are
- // decided.
-
-protected:
-
- void minimum (CONTAINER &container,
- KEY *&key_to_remove,
- VALUE *&value_to_remove);
- // Find the entry with minimum caching attributes.
-
- CLEANUP_STRATEGY_BASE *cleanup_strategy_;
- // This is the default Cleanup Strategy for this utility.
-
- int delete_cleanup_strategy_;
- // Whether the cleanup_strategy should be destroyed or not.
-
-};
-
-////////////////////////////////////////////////////////////////////////////////////////
-#define ACE_Refcounted_Recyclable_Handler_Caching_Utility ARRHUTIL
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-class ACE_Refcounted_Recyclable_Handler_Caching_Utility
-{
- // = TITLE
- // Defines a helper class for the Caching Strategies.
- //
- // = DESCRIPTION
- // This class defines the methods commonly used by the different
- // caching strategies. For instance: clear_cache () method which
- // decides and purges the entry from the container. Note: This
- // class helps in the caching_strategies using a container
- // containing entries of <Refcounted_KEY,
- // Recyclable_Connection_Handler> kind. The attributes helps in
- // deciding the entries to be purged. The Cleanup_Strategy is the
- // callback class to which the entries to be cleaned up will be
- // delegated.
-
-public:
-
- typedef ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY;
- typedef ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY_BASE;
-
- ACE_Refcounted_Recyclable_Handler_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy = 0,
- int delete_cleanup_strategy = 0);
-
- // Constructor.
-
- ~ACE_Refcounted_Recyclable_Handler_Caching_Utility (void);
- // Destructor.
-
- int clear_cache (CONTAINER &container,
- double purge_percent);
- // Purge entries from the <container>. The Cleanup_Strategy will do
- // the actual job of cleanup once the entries to be cleaned up are
- // decided.
-
-protected:
-
- void minimum (CONTAINER &container,
- KEY *&key_to_remove,
- VALUE *&value_to_remove);
- // Find the entry with minimum caching attributes.
-
- CLEANUP_STRATEGY_BASE *cleanup_strategy_;
- // This is the default Cleanup Strategy for this utility.
-
- int delete_cleanup_strategy_;
- // Whether the cleanup_strategy should be destroyed or not.
-
- size_t marked_as_closed_entries_;
- // This figure denotes the number of entries are there in the
- // container which have been marked as closed already but might
- // not have been unbound from the container.
-
-};
-
-////////////////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-class ACE_Handler_Caching_Utility
-{
- // = TITLE
- // Defines a helper class for the Caching Strategies.
- //
- // = DESCRIPTION
- // This class defines the methods commonly used by the different
- // caching strategies. For instance: <clear_cache> method which
- // decides and purges the entry from the container. Note: This
- // class helps in the caching_strategies using a container
- // containing entries of <KEY, HANDLER> kind where the HANDLER
- // contains the caching attributes which help in deciding the
- // entries to be purged. The Cleanup_Strategy is the callback
- // class to which the entries to be cleaned up will be delegated.
-public:
-
- typedef ACE_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY;
- typedef ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY_BASE;
-
- ACE_Handler_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy = 0,
- int delete_cleanup_strategy = 0);
- // Constructor.
-
- ~ACE_Handler_Caching_Utility (void);
- // Destructor.
-
- int clear_cache (CONTAINER &container,
- double purge_percent);
- // Purge entries from the <container>. The Cleanup_Strategy will do
- // the actual job of cleanup once the entries to be cleaned up are
- // decided.
-
-protected:
-
- void minimum (CONTAINER &container,
- KEY *&key_to_remove,
- VALUE *&value_to_remove);
- // Find the entry with minimum caching attributes. This is handler
- // specific since this utility is to be used very specifically for
- // handler who have caching_attributes for server side acched
- // connection management.
-
- CLEANUP_STRATEGY_BASE *cleanup_strategy_;
- // The cleanup strategy which can be used to destroy the entries of
- // the container.
-
- int delete_cleanup_strategy_;
- // Whether the cleanup_strategy should be destroyed or not.
-
-};
-
-///////////////////////////////////////////////////////////////////////////
-#define ACE_Null_Caching_Utility ANUTIL
-template <class KEY, class VALUE, class CONTAINER, class ITERATOR, class ATTRIBUTES>
-class ACE_Null_Caching_Utility
-{
- // = TITLE
- // Defines a dummy helper class for the Caching Strategies.
- //
- // = DESCRIPTION
- // This class defines the methods commonly used by the different
- // caching strategies. For instance: <clear_cache> method which
- // decides and purges the entry from the container. Note: This
- // class is be used with the Null_Caching_Strategy. The
- // Cleanup_Strategy is the callback class to which the entries to
- // be cleaned up will be delegated.
-public:
-
- typedef ACE_Null_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY;
- typedef ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> CLEANUP_STRATEGY_BASE;
-
- ACE_Null_Caching_Utility (ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER> *cleanup_strategy = 0,
- int delete_cleanup_strategy = 0);
- // Constructor.
-
- ~ACE_Null_Caching_Utility (void);
- // Destructor.
-
- int clear_cache (CONTAINER &container,
- double purge_percent);
- // Purge entries from the <container>. The Cleanup_Strategy will do
- // the actual job of cleanup once the entries to be cleaned up are
- // decided. NOte: Here it is a no-op.
-
-protected:
-
- void minimum (CONTAINER &container,
- KEY *&key_to_remove,
- VALUE *&value_to_remove);
- // Find the entry with minimum caching attributes. This is handler
- // specific since this utility is to be used very specifically for
- // handler who have caching_attributes for server side acched
- // connection management.Note: Here it is a no-op.
-
- CLEANUP_STRATEGY_BASE *cleanup_strategy_;
- // The cleanup strategy which can be used to destroy the entries of
- // the container.
-
- int delete_cleanup_strategy_;
- // Whether the cleanup_strategy should be destroyed or not.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Caching_Utility_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Caching_Utility_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* CACHING_UTILITY_H */
diff --git a/ace/Capabilities.cpp b/ace/Capabilities.cpp
deleted file mode 100644
index 4a056e07940..00000000000
--- a/ace/Capabilities.cpp
+++ /dev/null
@@ -1,365 +0,0 @@
-// $Id$
-
-#include "ace/Map_Manager.h"
-#include "ace/Capabilities.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Capabilities.i"
-#endif /* !__ACE_INLINE__ */
-
-#define ACE_ESC ((ACE_TCHAR)0x1b)
-
-ACE_CapEntry::~ACE_CapEntry (void)
-{
-}
-
-ACE_Capabilities::ACE_Capabilities (void)
-{
-}
-
-ACE_Capabilities::~ACE_Capabilities (void)
-{
- this->resetcaps ();
-}
-
-const ACE_TCHAR *
-ACE_Capabilities::parse (const ACE_TCHAR *buf, ACE_TString &cap)
-{
- while (*buf != ACE_TEXT ('\0') && *buf != ACE_TEXT (','))
- {
- if (*buf == ACE_TEXT ('\\'))
- {
- buf++;
- if (*buf == ACE_TEXT ('E') || *buf == ACE_TEXT ('e'))
- {
- cap += ACE_ESC;
- buf++;
- continue;
- }
- else if (*buf == ACE_TEXT ('r'))
- {
- cap += ACE_TEXT ('\r');
- buf++;
- continue;
- }
- else if (*buf == ACE_TEXT ('n'))
- {
- cap += ACE_TEXT ('\n');
- buf++;
- continue;
- }
- else if (*buf == ACE_TEXT ('t'))
- {
- cap += ACE_TEXT ('\t');
- buf++;
- continue;
- }
- else if (*buf == ACE_TEXT ('\\'))
- {
- cap += *buf++;
- continue;
- }
- if (isdigit(*buf))
- {
- // @@ UNICODE Does this work with unicode?
- int oc = 0;
- for (int i = 0;
- i < 3 && *buf && isdigit (*buf);
- i++)
- oc = oc * 8 + (*buf++ - ACE_TEXT ('0'));
-
- cap += (ACE_TCHAR) oc;
- continue;
- }
- }
- cap += *buf++;
- }
- return buf;
-}
-
-const ACE_TCHAR *
-ACE_Capabilities::parse (const ACE_TCHAR *buf, int &cap)
-{
- int n = 0;
-
- while (*buf && isdigit (*buf))
- n = n * 10 + (*buf++ - ACE_TEXT ('0'));
-
- cap = n;
-
- return buf;
-}
-
-void
-ACE_Capabilities::resetcaps (void)
-{
- for (ACE_Hash_Map_Iterator<ACE_TString, ACE_CapEntry *, ACE_Null_Mutex> iter (caps_);
- !iter.done ();
- iter.advance ())
- {
- ACE_Hash_Map_Entry<ACE_TString,ACE_CapEntry*> *entry;
- iter.next (entry);
- delete entry->int_id_;
- }
-
- caps_.close ();
- caps_.open ();
-}
-
-int
-ACE_Capabilities::fillent (const ACE_TCHAR *buf)
-{
- this->resetcaps ();
- while (*buf)
- {
- ACE_TString s;
- int n;
- ACE_TString name;
- ACE_CapEntry *ce;
-
- // Skip blanks
- while (*buf && isspace(*buf)) buf++;
- // If we get end of line return
-
- if (*buf == ACE_TEXT ('\0'))
- break;
-
- if (*buf == ACE_TEXT ('#'))
- {
- while (*buf && *buf != ACE_TEXT ('\n'))
- buf++;
- if (*buf == ACE_TEXT ('\n'))
- buf++;
- continue;
- }
- while(*buf && *buf != ACE_TEXT ('=')
- && *buf!= ACE_TEXT ('#')
- && *buf != ACE_TEXT (','))
- name += *buf++;
-
- // If name is null.
- switch (*buf)
- {
- case ACE_TEXT ('='):
- // String property
- buf = this->parse (buf + 1, s);
- ACE_NEW_RETURN (ce,
- ACE_StringCapEntry (s),
- -1);
- if (caps_.bind (name, ce) == -1)
- {
- delete ce;
- return -1;
- }
- break;
- case ACE_TEXT ('#'):
- // Integer property
- buf = this->parse (buf + 1, n);
- ACE_NEW_RETURN (ce,
- ACE_IntCapEntry (n),
- -1);
- if (caps_.bind (name, ce) == -1)
- {
- delete ce;
- return -1;
- }
- break;
- case ACE_TEXT (','):
- // Boolean
- ACE_NEW_RETURN (ce,
- ACE_BoolCapEntry (1),
- -1);
- if (caps_.bind (name, ce) == -1)
- {
- delete ce;
- return -1;
- }
- break;
- default:
- return 0;
- }
-
- if (*buf++ != ACE_TEXT (','))
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_Capabilities::is_entry (const ACE_TCHAR *name, const ACE_TCHAR *line)
-{
- for (;;)
- {
- // Skip blanks or irrelevant characters
- while (*line && isspace(*line))
- line++;
-
- // End of line reached
- if (*line == ACE_TEXT ('\0'))
- break;
-
- // Build the entry name
- ACE_TString nextname;
- while (*line && *line != ACE_TEXT ('|') && *line != ACE_TEXT (','))
- nextname += *line++;
-
- // We have found the required entry?
- if (ACE_OS::strcmp (nextname.c_str (), name) == 0)
- return 1;
-
- // Skip puntuaction char if neccesary.
- if (*line == ACE_TEXT ('|') || *line == ACE_TEXT (','))
- line++;
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Invalid entry\n")));
- break;
- }
- }
- return 0;
-}
-
-int
-ACE_Capabilities::getline (FILE *fp, ACE_TString &line)
-{
- int ch;
-
- line.set (0, 0);
-
- while ((ch = fgetc (fp)) != EOF && ch != ACE_TEXT ('\n'))
- line += (ACE_TCHAR) ch;
-
- if (ch == EOF && line.length () == 0)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_Capabilities::getval (const ACE_TCHAR *keyname, ACE_TString &val)
-{
- ACE_CapEntry* cap;
- if (caps_.find (keyname, cap) == -1)
- return -1;
-
- ACE_StringCapEntry *scap =
- ACE_dynamic_cast (ACE_StringCapEntry *, cap);
- if (scap == 0)
- return -1;
-
- val = scap->getval ();
- return 0;
-}
-
-int
-ACE_Capabilities::getval (const ACE_TCHAR *keyname, int &val)
-{
- ACE_CapEntry *cap;
- if (caps_.find (keyname, cap) == -1)
- return -1;
-
- ACE_IntCapEntry *icap =
- ACE_dynamic_cast (ACE_IntCapEntry *, cap);
- if (icap != 0)
- {
- val = icap->getval ();
- return 0;
- }
-
- ACE_BoolCapEntry *bcap =
- ACE_dynamic_cast (ACE_BoolCapEntry *, cap);
-
- if (bcap == 0)
- return -1;
-
- val = bcap->getval ();
- return 0;
-}
-
-static int
-is_empty (const ACE_TCHAR *line)
-{
- while (*line && isspace (*line))
- line++;
-
- return *line == ACE_TEXT ('\0') || *line == ACE_TEXT ('#');
-}
-
-static int
-is_line (const ACE_TCHAR *line)
-{
- while (*line && isspace (*line))
- line++;
-
- return *line != ACE_TEXT ('\0');
-}
-
-int
-ACE_Capabilities::getent (const ACE_TCHAR *fname, const ACE_TCHAR *name)
-{
- FILE *fp = ACE_OS::fopen (fname, ACE_TEXT ("r"));
-
- if (fp == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Can't open %s file\n"),
- fname),
- -1);
-
- int done;
- ACE_TString line;
-
- while (!(done = (this->getline (fp, line) == -1))
- && is_empty (line.c_str ()))
- continue;
-
- while (!done)
- {
- ACE_TString newline;
- ACE_TString description;
-
- while (!(done = (this->getline (fp, newline) == -1)))
- if (is_line (newline.c_str ()))
- description += newline;
- else
- break;
-
- if (this->is_entry (name, line.c_str()))
- {
- ACE_OS::fclose (fp);
- return this->fillent (description.c_str ());
- }
-
- line = newline;
- while (!done && is_empty (line.c_str ()))
- done = this->getline (fp, line) == -1;
- }
-
- ACE_OS::fclose (fp);
- return -1;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Hash_Map_Manager<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Entry<ACE_TString,ACE_CapEntry*>;
-template class ACE_Hash_Map_Manager_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>;
-template class ACE_Hash<ACE_TString>;
-template class ACE_Equal_To<ACE_TString>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Hash_Map_Manager<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_TString,ACE_CapEntry*,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Entry<ACE_TString,ACE_CapEntry*>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString,ACE_CapEntry*,ACE_Hash<ACE_TString>,ACE_Equal_To<ACE_TString>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash<ACE_TString>
-#pragma instantiate ACE_Equal_To<ACE_TString>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Capabilities.h b/ace/Capabilities.h
deleted file mode 100644
index 53393da6e19..00000000000
--- a/ace/Capabilities.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Capabilities.h
-//
-// = AUTHOR
-// Arturo Montes <mitosys@colomsat.net.co>
-//
-// ============================================================================
-
-#ifndef ACE_CAPABILITIES_H
-#define ACE_CAPABILITIES_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-#include "ace/Synch.h"
-#include "ace/Hash_Map_Manager.h"
-#include "ace/Containers.h"
-#include "ace/SString.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_CapEntry
-{
- // = TITLE
- // This class is the base class for all ACE Capabilities entry
- // subclasses.
- //
- // = DESCRIPTION
- // This class is not instantiable and does not provide accessors
- // or methods. If you want to add a new kind of attribute you
- // subclasses of this class and dynamic cast to proper subclass.
-public:
- virtual ~ACE_CapEntry (void);
-
-protected:
- enum
- {
- ACE_INTCAP = 0,
- ACE_STRINGCAP = 1,
- ACE_BOOLCAP = 2
- };
-
- ACE_CapEntry (int captype);
-
- int captype_;
-};
-
-class ACE_Export ACE_IntCapEntry : public ACE_CapEntry
-{
- // = TITLE
- // This class implement the ACE Integer Capability subclass.
- //
- // = DESCRIPTION
- // This is a container class for ACE Capabilities integer container
- // values.
-public:
- ACE_IntCapEntry (int val);
- int getval (void) const;
-
-protected:
- int val_;
-};
-
-class ACE_Export ACE_StringCapEntry : public ACE_CapEntry
-{
- // = TITLE
- // This class implement the ACE String Capability subclass.
- //
- // = DESCRIPTION
- // This is a container class for ACE Capabilities String container
- // values.
-public:
- ACE_StringCapEntry (const ACE_TString &val);
- ACE_TString getval (void) const;
-
-protected:
- ACE_TString val_;
-};
-
-class ACE_Export ACE_BoolCapEntry : public ACE_CapEntry
-{
- // = TITLE
- // This class implement the ACE Bool Capability subclass.
- //
- // = DESCRIPTION
- // This is a container class for ACE Capabilities bool container
- // values.
-public:
- ACE_BoolCapEntry (int val);
- int getval (void) const;
-
-protected:
- int val_;
-};
-
-class ACE_Export ACE_Capabilities
-{
- // = TITLE
- // This class implement the ACE Capabilities.
- //
- // = DESCRIPTION
- // This is a container class for ACE Capabilities
- // values. Currently exist three different capability values:
- // <ACE_IntCapEntry> (integer), <ACE_BoolCapEntry> (bool) and
- // <ACE_StringCapEntry> (String). An <ACE_Capabilities> is a
- // unordered set of pair = (<String>, <ACE_CapEntry> *). Where
- // the first component is the name of capability and the second
- // component is a pointer to the capability value container. A
- // <FILE> is a container for <ACE_Capabilities>, the
- // <ACE_Capabilities> has a name in the file, as a termcap file.
-public:
- ACE_Capabilities (void);
- // The Constructor
-
- ~ACE_Capabilities(void);
- // The Destructor
-
-public:
- int getval (const ACE_TCHAR *ent, ACE_TString &val);
- // Get a string entry.
-
- int getval (const ACE_TCHAR *ent, int &val);
- // Get an integer entry.
-
- int getent (const ACE_TCHAR *fname, const ACE_TCHAR *name);
- // Get the ACE_Capabilities name from FILE fname and load the
- // associated capabitily entries in map.
-
-protected:
- // Parse an integer property
- const ACE_TCHAR *parse (const ACE_TCHAR *buf, int &cap);
- // Parse a string property
-
- const ACE_TCHAR *parse (const ACE_TCHAR *buf, ACE_TString &cap);
- // Fill the ACE_Capabilities with description in ent.
-
- int fillent(const ACE_TCHAR *ent);
- // Parse a cap entry
-
- int parseent (const ACE_TCHAR *name, ACE_TCHAR *line);
- // Get a line from FILE input stream
-
- int getline (FILE* fp,
- ACE_TString &line);
- // Is a valid entry
-
- int is_entry (const ACE_TCHAR *name, const ACE_TCHAR *line);
- // Reset the set of capabilities
-
- void resetcaps (void);
- // Atributes.
-
-private:
- ACE_Hash_Map_Manager<ACE_TString, ACE_CapEntry *, ACE_Null_Mutex> caps_;
- // This is the set of ACE_CapEntry.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Capabilities.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* __ACE_CAPABILITIES_H__ */
diff --git a/ace/Capabilities.i b/ace/Capabilities.i
deleted file mode 100644
index d34d0e08862..00000000000
--- a/ace/Capabilities.i
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_CapEntry::ACE_CapEntry (int captype)
- : captype_ (captype)
-{
-}
-
-ACE_INLINE
-ACE_IntCapEntry::ACE_IntCapEntry (int val)
- : ACE_CapEntry (ACE_INTCAP),
- val_ (val)
-{
-}
-
-ACE_INLINE int
-ACE_IntCapEntry::getval (void) const
-{
- return val_;
-}
-
-ACE_INLINE
-ACE_StringCapEntry::ACE_StringCapEntry (const ACE_TString &val)
- : ACE_CapEntry (ACE_STRINGCAP),
- val_(val)
-{
-}
-
-ACE_INLINE ACE_TString
-ACE_StringCapEntry::getval (void) const
-{
- return val_;
-}
-
-ACE_INLINE
-ACE_BoolCapEntry::ACE_BoolCapEntry (int val)
- : ACE_CapEntry (ACE_BOOLCAP),
- val_(val)
-{
-}
-
-ACE_INLINE int
-ACE_BoolCapEntry::getval (void) const
-{
- return val_;
-}
diff --git a/ace/Cleanup_Strategies_T.cpp b/ace/Cleanup_Strategies_T.cpp
deleted file mode 100644
index 6158bdac2d9..00000000000
--- a/ace/Cleanup_Strategies_T.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-//$Id$
-
-#ifndef CLEANUP_STRATEGIES_T_C
-#define CLEANUP_STRATEGIES_T_C
-
-#include "ace/Cleanup_Strategies_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/Cleanup_Strategies_T.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-ACE_RCSID(ace, Cleanup_Strategies_T, "$Id$")
-
-////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER> int
-ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &container,
- KEY *key,
- VALUE *value)
-{
- ACE_UNUSED_ARG (value);
-
- return container.unbind (*key);
-}
-
-////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER> int
-ACE_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &container,
- KEY *key,
- VALUE *)
-{
- VALUE value;
-
- if (container.unbind (*key, value) == -1)
- return -1;
-
- value.first ()->recycler (0, 0);
-
- value.first ()->close ();
-
- return 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER> int
-ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &,
- KEY *,
- VALUE *value)
-{
- return value->first ()->handle_close_i ();
-}
-
-////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER> int
-ACE_Handler_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &container,
- KEY *key,
- VALUE *value)
-{
- // Remove the item from cache only if the handler isnt in use.
- if ((*value)->active () == 0)
- {
- (*value)->close ();
-
- if (container.unbind (*key) == -1)
- return -1;
-
- }
-
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER> int
-ACE_Null_Cleanup_Strategy<KEY, VALUE, CONTAINER>::cleanup (CONTAINER &container,
- KEY *key,
- VALUE *value)
-{
- ACE_UNUSED_ARG (container);
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (value);
-
- return 0;
-}
-
-#endif /* CLEANUP_STRATEGIES_T_C */
diff --git a/ace/Cleanup_Strategies_T.h b/ace/Cleanup_Strategies_T.h
deleted file mode 100644
index 1dd43239e27..00000000000
--- a/ace/Cleanup_Strategies_T.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Cleanup_Strategies_T.h
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef CLEANUP_STRATEGIES_H
-#define CLEANUP_STRATEGIES_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// For linkers that cant grok long names.
-#define ACE_Cleanup_Strategy ACLE
-
-template <class KEY, class VALUE, class CONTAINER>
-class ACE_Cleanup_Strategy
-{
- // = TITLE
- // Defines a default strategy to be followed for cleaning up
- // entries from a map which is the container.
- //
- // = DESCRIPTION
- // By default the entry to be cleaned up is removed from the
- // container.
-
-public:
-
- virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value);
- // The method which will do the cleanup of the entry in the container.
-};
-
-//////////////////////////////////////////////////////////////////////
-#define ACE_Recyclable_Handler_Cleanup_Strategy ARHCLE
-
-template <class KEY, class VALUE, class CONTAINER>
-class ACE_Recyclable_Handler_Cleanup_Strategy : public ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>
-{
- // = TITLE
- // Defines a strategy to be followed for cleaning up
- // entries which are svc_handlers from a container.
- //
- // = DESCRIPTION
- // The entry to be cleaned up is removed from the container.
- // Here, since we are dealing with svc_handlers specifically, we
- // perform a couple of extra operations. Note: To be used when
- // the handler is recyclable.
-
-public:
-
- virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value);
- // The method which will do the cleanup of the entry in the container.
-};
-
-//////////////////////////////////////////////////////////////////////
-#define ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy ARRHCLE
-
-template <class KEY, class VALUE, class CONTAINER>
-class ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy : public ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>
-{
- // = TITLE
- // Defines a strategy to be followed for cleaning up
- // entries which are svc_handlers from a container.
- //
- // = DESCRIPTION
- // The entry to be cleaned up is removed from the container.
- // Here, since we are dealing with recyclable svc_handlers with
- // addresses which are refcountable specifically, we perform a
- // couple of extra operations and do so without any locking.
-
-public:
-
- virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value);
- // The method which will do the cleanup of the entry in the container.
-};
-
-//////////////////////////////////////////////////////////////////////
-
-template <class KEY, class VALUE, class CONTAINER>
-class ACE_Handler_Cleanup_Strategy : public ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>
-{
- // = TITLE
- // Defines a strategy to be followed for cleaning up
- // entries which are svc_handlers from a container.
- //
- // = DESCRIPTION
- // The entry to be cleaned up is removed from the container.
- // Here, since we are dealing with svc_handlers specifically, we
- // perform a couple of extra operations. Note: This cleanup strategy
- // should be used in the case when the handler has the caching
- // attributes.
-
-public:
-
- virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value);
- // The method which will do the cleanup of the entry in the container.
-};
-
-//////////////////////////////////////////////////////////////////////
-#define ACE_Null_Cleanup_Strategy ANCLE
-
-template <class KEY, class VALUE, class CONTAINER>
-class ACE_Null_Cleanup_Strategy : public ACE_Cleanup_Strategy<KEY, VALUE, CONTAINER>
-{
- // = TITLE
- // Defines a do-nothing implementation of the cleanup strategy.
- //
- // = DESCRIPTION
- // This class simply does nothing at all! Can be used to nullify
- // the effect of the Cleanup Strategy.
-
-public:
-
- virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value);
- // The dummy cleanup method.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Cleanup_Strategies_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Cleanup_Strategies_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* CLEANUP_STRATEGIES_H */
diff --git a/ace/Codeset_IBM1047.cpp b/ace/Codeset_IBM1047.cpp
deleted file mode 100644
index 45ae7932665..00000000000
--- a/ace/Codeset_IBM1047.cpp
+++ /dev/null
@@ -1,284 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Codeset_IBM1047.cpp
-//
-// = DESCRIPTION
-// Defines the arrays required to convert between ISO8859 (aka
-// Latin/1) and IBM1047 (aka EBCDIC).
-//
-// = AUTHOR
-// Jim Rogers (jrogers@viasoft.com)
-//
-// ============================================================================
-
-#include "ace/Codeset_IBM1047.h"
-
-#if defined(ACE_MVS)
-
-ACE_RCSID(ace, Codeset_IBM1047, "$Id$")
-
-// ****************************************************************
-
-ACE_IBM1047_ISO8859::ACE_IBM1047_ISO8859 (void)
-{
-}
-
-ACE_IBM1047_ISO8859::~ACE_IBM1047_ISO8859 (void)
-{
-}
-
-ACE_CDR::Boolean
-ACE_IBM1047_ISO8859::read_char (ACE_InputCDR &in,
- ACE_CDR::Char &x)
-{
- if (this->read_1 (in, ACE_reinterpret_cast (ACE_CDR::Octet*, &x)))
- {
- x = ACE_to_IBM1047[x];
- return 1;
- }
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_IBM1047_ISO8859::read_string (ACE_InputCDR& in,
- ACE_CDR::Char *& x)
-{
- ACE_CDR::ULong len;
-
- in.read_ulong (len);
-
- if (len > 0)
- {
- ACE_NEW_RETURN (x,
- ACE_CDR::Char[len],
- 0);
-
- if (this->read_char_array (in, x, len))
- return 1;
-
- delete [] x;
- }
-
- x = 0;
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_IBM1047_ISO8859::read_char_array (ACE_InputCDR& in,
- ACE_CDR::Char* x,
- ACE_CDR::ULong len)
-{
- if (this->read_array (in,
- x,
- ACE_CDR::OCTET_SIZE,
- ACE_CDR::OCTET_ALIGN,
- len))
- {
- for (ACE_CDR::ULong i = 0; i != len; ++i)
- x[i] = ACE_to_IBM1047[x[i]];
-
- return 1;
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_IBM1047_ISO8859::write_char (ACE_OutputCDR& out,
- ACE_CDR::Char x)
-{
- return this->write_1 (out,
- ACE_reinterpret_cast (const ACE_CDR::Octet*,
- &ACE_from_IBM1047[x]));
-}
-
-ACE_CDR::Boolean
-ACE_IBM1047_ISO8859::write_string (ACE_OutputCDR& out,
- ACE_CDR::ULong len,
- const ACE_CDR::Char* x)
-{
- if (out.write_ulong (len + 1))
- return this->write_char_array (out, x, len + 1);
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_IBM1047_ISO8859::write_char_array (ACE_OutputCDR& out,
- const ACE_CDR::Char* x,
- ACE_CDR::ULong len)
-{
- char *buf;
- if (this->adjust (out, len, 1, buf) == 0)
- {
- ACE_OS::memcpy (buf, x, len);
-
- for (ACE_CDR::ULong i = 0; i != len; ++i)
- buf[i] = ACE_from_IBM1047[buf[i]];
-
- return 1;
- }
-
- this->good_bit(out, 0);
- return 0;
-}
-
-// ****************************************************************
-
-ACE_ISO8859_IBM1047::ACE_ISO8859_IBM1047 (void)
-{
-}
-
-ACE_ISO8859_IBM1047::~ACE_ISO8859_IBM1047 (void)
-{
-}
-
-ACE_CDR::Boolean
-ACE_ISO8859_IBM1047::read_char (ACE_InputCDR& in,
- ACE_CDR::Char& x)
-{
- if (this->read_1 (in, ACE_reinterpret_cast (ACE_CDR::Octet*, &x)))
- {
- x = ACE_from_IBM1047[x];
- return 1;
- }
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_ISO8859_IBM1047::read_string (ACE_InputCDR &in,
- ACE_CDR::Char *&x)
-{
- ACE_CDR::ULong len;
-
- in.read_ulong (len);
-
- if (len > 0)
- {
- ACE_NEW_RETURN (x,
- ACE_CDR::Char[len],
- 0);
-
- if (this->read_char_array (in, x, len))
- return 1;
-
- delete [] x;
- }
-
- x = 0;
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_ISO8859_IBM1047::read_char_array (ACE_InputCDR &in,
- ACE_CDR::Char *x,
- ACE_CDR::ULong len)
-{
- if (this->read_array (in,
- x,
- ACE_CDR::OCTET_SIZE,
- ACE_CDR::OCTET_ALIGN,
- len))
- {
- for (ACE_CDR::ULong i = 0; i != len; ++i)
- x[i] = ACE_from_IBM1047[x[i]];
-
- return 1;
- }
-
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_ISO8859_IBM1047::write_char (ACE_OutputCDR &out,
- ACE_CDR::Char x)
-{
- return this->write_1 (out,
- ACE_reinterpret_cast (const ACE_CDR::Octet *,
- &ACE_to_IBM1047[x]));
-}
-
-ACE_CDR::Boolean
-ACE_ISO8859_IBM1047::write_string (ACE_OutputCDR& out,
- ACE_CDR::ULong len,
- const ACE_CDR::Char* x)
-{
- if (out.write_ulong (len + 1))
- return this->write_char_array (out, x, len + 1);
- else
- return 0;
-}
-
-ACE_CDR::Boolean
-ACE_ISO8859_IBM1047::write_char_array (ACE_OutputCDR &out,
- const ACE_CDR::Char *x,
- ACE_CDR::ULong len)
-{
- char *buf;
-
- if (this->adjust (out, len, 1, buf) == 0)
- {
- ACE_OS::memcpy (buf, x, len);
-
- for (ACE_CDR::ULong i = 0; i != len; ++i)
- buf[i] = ACE_to_IBM1047[buf[i]];
-
- return 1;
- }
-
- this->good_bit (out, 0);
- return 0;
-}
-
-// ****************************************************************
-
-char ACE_to_IBM1047[257] =
-{
- "\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x25\x0B\x0C\x0D\x0E\x0F" // 00-0F
- "\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x3F\x27\x22\x1D\x35\x1F" // 10-1F
- "\x40\x5A\x7F\x7B\x5B\x6C\x50\x7D\x4D\x5D\x5C\x4E\x6B\x60\x4B\x61" // 20-2F
- "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\x7A\x5E\x4C\x7E\x6E\x6F" // 30-3F
- "\x7C\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xD1\xD2\xD3\xD4\xD5\xD6" // 40-4F
- "\xD7\xD8\xD9\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xAD\xE0\xBD\x5F\x6D" // 50-5F
- "\x79\x81\x82\x83\x84\x85\x86\x87\x88\x89\x91\x92\x93\x94\x95\x96" // 60-6F
- "\x97\x98\x99\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xC0\x4F\xD0\xA1\x07" // 70-7F
- "\x43\x20\x21\x1C\x23\xEB\x24\x9B\x71\x28\x38\x49\x90\xBA\xEC\xDF" // 80-8F
- "\x45\x29\x2A\x9D\x72\x2B\x8A\x9A\x67\x56\x64\x4A\x53\x68\x59\x46" // 90-9F
- "\xEA\xDA\x2C\xDE\x8B\x55\x41\xFE\x58\x51\x52\x48\x69\xDB\x8E\x8D" // A0-AF
- "\x73\x74\x75\xFA\x15\xB0\xB1\xB3\xB4\xB5\x6A\xB7\xB8\xB9\xCC\xBC" // B0-BF
- "\xAB\x3E\x3B\x0A\xBF\x8F\x3A\x14\xA0\x17\xCB\xCA\x1A\x1B\x9C\x04" // C0-CF
- "\x34\xEF\x1E\x06\x08\x09\x77\x70\xBE\xBB\xAC\x54\x63\x65\x66\x62" // D0-DF
- "\x30\x42\x47\x57\xEE\x33\xB6\xE1\xCD\xED\x36\x44\xCE\xCF\x31\xAA" // E0-EF
- "\xFC\x9E\xAE\x8C\xDD\xDC\x39\xFB\x80\xAF\xFD\x78\x76\xB2\x9F\xFF" // F0-FF
-};
-
-char ACE_from_IBM1047[257] =
-{
- "\x00\x01\x02\x03\xCF\x09\xD3\x7F\xD4\xD5\xC3\x0B\x0C\x0D\x0E\x0F" // 00-0F
- "\x10\x11\x12\x13\xC7\xB4\x08\xC9\x18\x19\xCC\xCD\x83\x1D\xD2\x1F" // 10-1F
- "\x81\x82\x1C\x84\x86\x0A\x17\x1B\x89\x91\x92\x95\xA2\x05\x06\x07" // 20-2F
- "\x20\xEE\x16\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\xC1\x1A" // 30-3F
- "\x20\xA6\xE1\x80\xEB\x90\x9F\xE2\xAB\x8B\x9B\x2E\x3C\x28\x2B\x7C" // 40-4F
- "\x26\xA9\xAA\x9C\xDB\xA5\x99\xE3\xA8\x9E\x21\x24\x2A\x29\x3B\x5E" // 50-5F
- "\x2D\x2F\xDF\xDC\x9A\xDD\xDE\x98\x9D\xAC\xBA\x2C\x25\x5F\x3E\x3F" // 60-6F
- "\xD7\x88\x94\xB0\xB1\xB2\xFC\xD6\xFB\x60\x3A\x23\x40\x27\x3D\x22" // 70-7F
- "\xF8\x61\x62\x63\x64\x65\x66\x67\x68\x69\x96\xA4\xF3\xAF\xAE\xC5" // 80-8F
- "\x8C\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x97\x87\xCE\x93\xF1\xFE" // 90-9F
- "\xC8\x7E\x73\x74\x75\x76\x77\x78\x79\x7A\xEF\xC0\xDA\x5B\xF2\xF9" // A0-AF
- "\xB5\xB6\xFD\xB7\xB8\xB9\xE6\xBB\xBC\xBD\x8D\xD9\xBF\x5D\xD8\xC4" // B0-BF
- "\x7B\x41\x42\x43\x44\x45\x46\x47\x48\x49\xCB\xCA\xBE\xE8\xEC\xED" // C0-CF
- "\x7D\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\xA1\xAD\xF5\xF4\xA3\x8F" // D0-DF
- "\x5C\xE7\x53\x54\x55\x56\x57\x58\x59\x5A\xA0\x85\x8E\xE9\xE4\xD1" // E0-EF
- "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\xB3\xF7\xF0\xFA\xA7\xFF" // F0-FF
-};
-
-#elif defined (__HP_aCC)
-// Make aC++ stop complaining about an empty translation unit
-static int shut_up_aCC = 0;
-#endif /* ACE_MVS */
diff --git a/ace/Codeset_IBM1047.h b/ace/Codeset_IBM1047.h
deleted file mode 100644
index abb40517eb1..00000000000
--- a/ace/Codeset_IBM1047.h
+++ /dev/null
@@ -1,115 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Codeset_IBM1047.cpp
-//
-// = DESCRIPTION
-// Declares the arrays required to convert between ISO8859 (aka
-// Latin/1) and IBM1047 (aka EBCDIC).
-//
-// = AUTHOR
-// Jim Rogers (jrogers@viasoft.com)
-//
-// ============================================================================
-
-#ifndef ACE_CODESET_IMB1047_H
-#define ACE_CODESET_IMB1047_H
-#include "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined(ACE_MVS)
-
-#include "ace/CDR_Stream.h"
-
-extern ACE_Export char ACE_to_IBM1047[257];
-extern ACE_Export char ACE_from_IBM1047[257];
-
-// ****************************************************************
-
-class ACE_Export ACE_IBM1047_ISO8859 : public ACE_Char_Codeset_Translator
-{
- // = TITLE
- // Codeset translation specialization.
- //
- // = DESCRIPTION
- // This class performs the codeset translation:
- //
- // Native: IBM_1047 (i.e. EBCDIC)
- // Stream: ISO-8859 (i.e. Latin/1)
- //
-public:
- ACE_IBM1047_ISO8859 (void);
- // A do nothing constructor.
-
- virtual ~ACE_IBM1047_ISO8859 (void);
- // Virtual destruction
-
- // = Documented in $ACE_ROOT/ace/CDR_Stream.h
- virtual ACE_CDR::Boolean read_char (ACE_InputCDR &,
- ACE_CDR::Char &);
- virtual ACE_CDR::Boolean read_string (ACE_InputCDR &,
- ACE_CDR::Char *&);
- virtual ACE_CDR::Boolean read_char_array (ACE_InputCDR &,
- ACE_CDR::Char *,
- ACE_CDR::ULong);
- virtual ACE_CDR::Boolean write_char (ACE_OutputCDR &,
- ACE_CDR::Char);
- virtual ACE_CDR::Boolean write_string (ACE_OutputCDR &,
- ACE_CDR::ULong,
- const ACE_CDR::Char *);
- virtual ACE_CDR::Boolean write_char_array (ACE_OutputCDR &,
- const ACE_CDR::Char *,
- ACE_CDR::ULong);
-};
-
-class ACE_Export ACE_ISO8859_IBM1047 : public ACE_Char_Codeset_Translator
-{
- // = TITLE
- // Codeset translation specialization.
- //
- // = DESCRIPTION
- // This class performs the codeset translation:
- //
- // Native: ISO-8859 (i.e. Latin/1)
- // Stream: IBM-1047 (i.e. EBCDIC)
- //
-public:
- ACE_ISO8859_IBM1047 (void);
- // A do nothing constructor.
-
- virtual ~ACE_ISO8859_IBM1047 (void);
- // Virtual destruction
-
- // = Documented in $ACE_ROOT/ace/CDR_Stream.h
- virtual ACE_CDR::Boolean read_char (ACE_InputCDR &,
- ACE_CDR::Char &);
- virtual ACE_CDR::Boolean read_string (ACE_InputCDR &,
- ACE_CDR::Char *&);
- virtual ACE_CDR::Boolean read_char_array (ACE_InputCDR &,
- ACE_CDR::Char *,
- ACE_CDR::ULong);
- virtual ACE_CDR::Boolean write_char (ACE_OutputCDR &,
- ACE_CDR::Char);
- virtual ACE_CDR::Boolean write_string (ACE_OutputCDR &,
- ACE_CDR::ULong,
- const ACE_CDR::Char *);
- virtual ACE_CDR::Boolean write_char_array (ACE_OutputCDR &,
- const ACE_CDR::Char *,
- ACE_CDR::ULong);
-};
-
-#endif /* ACE_MVS */
-
-#include "ace/post.h"
-#endif /* ACE_CODESET_IMB1047_H */
diff --git a/ace/Configuration.cpp b/ace/Configuration.cpp
deleted file mode 100644
index 4f30b459d31..00000000000
--- a/ace/Configuration.cpp
+++ /dev/null
@@ -1,2035 +0,0 @@
-// $Id$
-#include "ace/Configuration.h"
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-#if defined (ACE_HAS_THREADS)
-// ACE_SYNCH_MUTEX should not be used in the template instantiations
-// because the resulting template instantiation for the
-// single-threaded case already exists in ACE.
-template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> >;
-template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex>;
-template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex, ACE_Control_Block>;
-#endif /* ACE_HAS_THREADS */
-template class ACE_Hash_Map_Entry<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId>;
-template class ACE_Hash_Map_Entry<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId>;
-template class ACE_Hash_Map_Entry<ACE_Configuration_ExtId, int>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_Configuration_ExtId, int, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>;
-
-
-// Added to fix problems in SunOS CC5.0
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_Configuration_ExtId,ACE_Configuration_Value_IntId,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_Configuration_ExtId,ACE_Configuration_Value_IntId,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_Configuration_ExtId,int,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_Configuration_ExtId,ACE_Configuration_Section_IntId,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>;
-template class ACE_Equal_To<ACE_Configuration_ExtId>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_Configuration_ExtId,ACE_Configuration_Section_IntId,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_Configuration_ExtId,int,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>;
-template class ACE_Hash<ACE_Configuration_ExtId>;
-
-template class ACE_Hash_Map_Manager_Ex<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_Configuration_ExtId, int, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager<ACE_Configuration_ExtId, int, ACE_Null_Mutex>;
-template class ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId>;
-template class ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId>;
-template class ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId, int>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#if defined (ACE_HAS_THREADS)
-// ACE_SYNCH_MUTEX should not be used in the template instantiations
-// because the resulting template instantiation for the
-// single-threaded case already exists in ACE.
-#pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> >
-#pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex>
-#pragma instantiate ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex, ACE_Control_Block>
-#endif /* ACE_HAS_THREADS */
-#pragma instantiate ACE_Hash_Map_Entry<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId>
-#pragma instantiate ACE_Hash_Map_Entry<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId>
-#pragma instantiate ACE_Hash_Map_Entry<ACE_Configuration_ExtId, int>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_Configuration_ExtId, int, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>
-
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_Configuration_ExtId,ACE_Configuration_Value_IntId,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_Configuration_ExtId,ACE_Configuration_Value_IntId,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_Configuration_ExtId,int,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_Configuration_ExtId,ACE_Configuration_Section_IntId,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>
-#pragma instantiate ACE_Equal_To<ACE_Configuration_ExtId>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_Configuration_ExtId,ACE_Configuration_Section_IntId,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_Configuration_ExtId,int,ACE_Hash<ACE_Configuration_ExtId>,ACE_Equal_To<ACE_Configuration_ExtId>,ACE_Null_Mutex>
-#pragma instantiate ACE_Hash<ACE_Configuration_ExtId>
-
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_Configuration_ExtId, int, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager<ACE_Configuration_ExtId, int, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId, ACE_Configuration_Section_IntId>
-#pragma instantiate ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId>
-#pragma instantiate ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId, int>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-ACE_Section_Key_Internal::ACE_Section_Key_Internal (void)
- : ref_count_ (0)
-{
-}
-
-ACE_Section_Key_Internal::~ACE_Section_Key_Internal (void)
-{
-}
-
-int
-ACE_Section_Key_Internal::add_ref (void)
-{
- ++ref_count_;
- return 0;
-}
-
-int
-ACE_Section_Key_Internal::dec_ref (void)
-{
- if (!--ref_count_)
- delete this;
- return 0;
-}
-
-ACE_Configuration_Section_Key::ACE_Configuration_Section_Key (void)
- : key_ (0)
-{
-}
-
-ACE_Configuration_Section_Key::~ACE_Configuration_Section_Key (void)
-{
- if (key_)
- key_->dec_ref ();
-}
-
-ACE_Configuration_Section_Key::ACE_Configuration_Section_Key (ACE_Section_Key_Internal* key)
- : key_ (key)
-{
- if (key_)
- key_->add_ref ();
-}
-
-ACE_Configuration_Section_Key::ACE_Configuration_Section_Key (const ACE_Configuration_Section_Key& rhs)
- : key_ (rhs.key_)
-{
- if (key_)
- key_->add_ref ();
-}
-
-ACE_Configuration_Section_Key&
-ACE_Configuration_Section_Key::operator= (const ACE_Configuration_Section_Key& rhs)
-{
- if (this != &rhs)
- {
- if (key_)
- key_->dec_ref ();
-
- key_ = rhs.key_;
-
- if (key_)
- key_->add_ref ();
- }
- return *this;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-ACE_Configuration::ACE_Configuration (void)
- : root_ ()
-{
-}
-
-ACE_Configuration::~ACE_Configuration (void)
-{
-}
-
-ACE_Section_Key_Internal*
-ACE_Configuration::get_internal_key (const ACE_Configuration_Section_Key& key)
-{
- return key.key_;
-}
-
-int
-ACE_Configuration::expand_path (const ACE_Configuration_Section_Key& key,
- const ACE_TString& path_in,
- ACE_Configuration_Section_Key& key_out,
- int create)
-{
- const ACE_TCHAR* begin = path_in.fast_rep ();
- const ACE_TCHAR* end = 0;
-
- // Make a copy of key
- ACE_Configuration_Section_Key current_section = key;
-
- // recurse through the path
- while (1)
- {
- // Detmine the begin/ending of the key name
- end = ACE_OS::strchr (begin, ACE_TEXT ('\\'));
- size_t length = end ? (size_t)(end-begin) : ACE_OS::strlen (begin);
-
- // Make sure length is not 0
- if (!length)
- return -1;
-
- ACE_TString section (begin, length);
-
- // Open the section
- ACE_Configuration_Section_Key child_section;
- if (open_section (current_section,
- section.fast_rep (),
- create,
- child_section))
- return -1;
-
- current_section = child_section;
-
- // If end is NULL, we are done, return the result
- if (!end)
- {
- key_out = current_section;
- break;
- }
- begin = end + 1;
- }
-
- return 0;
-}
-
-int
-ACE_Configuration::validate_name (const ACE_TCHAR* name)
-{
- const ACE_TCHAR* pos = name;
- // make sure it doesn't contain any invalid characters
- while (*pos)
- {
- if (ACE_OS::strchr (ACE_TEXT ("\\]["), *pos))
- return -1;
-
- pos++;
- }
-
- // Make sure its not too long
- if (pos - name > 255)
- return -2;
-
- return 0;
-}
-
-int
-ACE_Configuration::export_section (const ACE_Configuration_Section_Key& section,
- const ACE_TString& path,
- FILE* out)
-{
- // don't export the root
- if (path.length ())
- {
- // Write out the section header
- ACE_TString header = ACE_TEXT ("[");
- header += path;
- header += ACE_TEXT ("]");
- header += ACE_TEXT (" \n");
- if (ACE_OS::fputs (header.fast_rep (), out) < 0)
- return -1;
-
- // Write out each value
- int index = 0;
- ACE_TString name;
- VALUETYPE type;
- ACE_TString line;
- ACE_TCHAR int_value[32];
- ACE_TCHAR bin_value[3];
- void* binary_data;
- u_int binary_length;
- ACE_TString string_value;
- while (!enumerate_values (section, index, name, type))
- {
- line = ACE_TEXT ("\"") + name + ACE_TEXT ("\"=");
- switch (type)
- {
- case INTEGER:
- {
- u_int value;
- if (get_integer_value (section, name.fast_rep (), value))
- return -2;
-
- ACE_OS::sprintf (int_value, ACE_TEXT ("%08x"), value);
- line += ACE_TEXT("dword:");
- line += int_value;
- break;
- }
- case STRING:
- {
- if (get_string_value (section,
- name.fast_rep (),
- string_value))
- return -2;
-
- line += ACE_TEXT ("\"");
- line += string_value + ACE_TEXT("\"");
- break;
- }
- case BINARY:
- {
- // not supported yet - maybe use BASE64 codeing?
- if(get_binary_value(section,
- name.fast_rep(),
- binary_data,
- binary_length))
- return -2;
-
- line += ACE_TEXT ("hex:");
-
- unsigned char* ptr = (unsigned char*)binary_data;
- while(binary_length)
- {
- if(ptr != binary_data)
- {
- line += ACE_TEXT (",");
- }
- ACE_OS::sprintf(bin_value, ACE_TEXT ("%02x"), *ptr);
- line += bin_value;
- --binary_length;
- ++ptr;
- }
- break;
- }
- default:
- return -3;
- }
-
- line += ACE_TEXT ("\n");
- if (ACE_OS::fputs (line.fast_rep (), out) < 0)
- return -4;
-
- index++;
- }
- }
-
- // Export all sub sections
- int index = 0;
- ACE_TString name;
- ACE_Configuration_Section_Key sub_key;
- ACE_TString sub_section;
-
- while (!enumerate_sections (section, index, name))
- {
- ACE_TString sub_section (path);
- if (path.length ())
- sub_section += ACE_TEXT ("\\");
-
- sub_section += name;
- if (open_section (section, name.fast_rep (), 0, sub_key))
- return -5;
-
- if (export_section (sub_key, sub_section.fast_rep (), out))
- return -6;
-
- index++;
- }
-
- return 0;
-}
-
-int
-ACE_Configuration::export_config (const ACE_TCHAR* filename)
-{
- FILE* out = ACE_OS::fopen (filename, ACE_TEXT ("w"));
- if (!out)
- return -1;
-
- int result = export_section (root_, ACE_TEXT (""), out);
- ACE_OS::fclose (out);
- return result;
-}
-
-int
-ACE_Configuration::import_config (const ACE_TCHAR* filename)
-{
- FILE* in = ACE_OS::fopen (filename, ACE_TEXT ("r"));
- if (!in)
- return -1;
-
- // @@ XXX - change this to a dynamic buffer
- ACE_TCHAR buffer[4096];
- ACE_Configuration_Section_Key section;
- while (ACE_OS::fgets (buffer, 4096, in))
- {
- // Check for a comment
- if (buffer[0] == ACE_TEXT (';') || buffer[0] == ACE_TEXT ('#'))
- continue;
-
- if (buffer[0] == ACE_TEXT ('['))
- {
- // We have a new section here, strip out the section name
- ACE_TCHAR* end = ACE_OS::strrchr(buffer, ACE_TEXT(']'));
- if(!end)
- {
- return -3;
- }
- *end = 0;
-
- if (expand_path (root_, buffer + 1, section, 1))
- return -3;
-
- continue;
- }
-
- if(buffer[0] == ACE_TEXT ('"'))
- {
- // we have a value
- ACE_TCHAR* end = ACE_OS::strchr (buffer+1, '"');
- if (!end) // no closing quote, not a value so just skip it
- continue;
-
- // null terminate the name
- *end = 0;
- ACE_TCHAR* name = buffer + 1;
- end+=2;
- // determine the type
- if (*end == '\"')
- {
- // string type
- // truncate trailing "
- ++end;
- ACE_TCHAR* trailing = ACE_OS::strrchr(end, '"');
- if(trailing)
- {
- *trailing = 0;
- }
- if (set_string_value (section, name, end))
- return -4;
- }
- else if (ACE_OS::strncmp(end, ACE_TEXT ("dword:"), 6) == 0)
- {
- // number type
- ACE_TCHAR* endptr = 0;
- u_int value = ACE_OS::strtoul(end + 6, &endptr, 16);
- if (set_integer_value (section, name, value))
- return -4;
- }
- else if(ACE_OS::strncmp(end, ACE_TEXT ("hex:"), 4) == 0)
- {
- // binary type
- u_int string_length = ACE_OS::strlen(end+4);
- // divide by 3 to get the actual buffer length
- u_int length = string_length / 3;
- u_int remaining = length;
- u_char* data = new u_char[length];
- u_char* out = data;
- ACE_TCHAR* in = end + 4;
- ACE_TCHAR* endptr = 0;
- while(remaining)
- {
- u_char charin = (u_char)ACE_OS::strtoul(in, &endptr, 16);
- *out = charin;
- ++out;
- --remaining;
- in += 3;
- }
- if(set_binary_value(section, name, data, length))
- return -4;
- }
- else
- {
- // invalid type, ignore
- continue;
- }
- }
- }
- /*
- // assume this is a value, read in the value name
- ACE_TCHAR* end = ACE_OS::strchr (buffer, ACE_TEXT ('='));
- if (!end) // no =, not a value so just skip it
- continue;
-
- // null terminate the name
- *end = 0;
- end++;
- // determine the type
- if (*end == ACE_TEXT ('\"'))
- {
- // string type
- if (set_string_value (section, buffer, end + 1))
- return -4;
- }
- else if (*end == ACE_TEXT ('#'))
- {
- // number type
- u_int value = ACE_OS::atoi (end + 1);
- if (set_integer_value (section, buffer, value))
- return -4;
- }
- else
- {
- // invalid type, ignore
- continue;
- }
- }
- */
-
- if (ferror (in))
- return -1;
-
- return 0;
-}
-
-const ACE_Configuration_Section_Key&
-ACE_Configuration::root_section (void)
-{
- return root_;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-#if defined (WIN32)
-
-static const int ACE_DEFAULT_BUFSIZE = 256;
-
-ACE_Section_Key_Win32::ACE_Section_Key_Win32 (HKEY hKey)
- : hKey_ (hKey)
-{
-}
-
-ACE_Section_Key_Win32::~ACE_Section_Key_Win32 (void)
-{
- ::RegCloseKey (hKey_);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-ACE_Configuration_Win32Registry::ACE_Configuration_Win32Registry (HKEY hKey)
-{
- ACE_Section_Key_Win32 *temp;
-
- ACE_NEW (temp, ACE_Section_Key_Win32 (hKey));
-
- root_ = ACE_Configuration_Section_Key (temp);
-}
-
-
-ACE_Configuration_Win32Registry::~ACE_Configuration_Win32Registry (void)
-{
-}
-
-int
-ACE_Configuration_Win32Registry::open_section (const ACE_Configuration_Section_Key& base,
- const ACE_TCHAR* sub_section,
- int create,
- ACE_Configuration_Section_Key& result)
-{
- if (validate_name (sub_section))
- return -1;
-
- HKEY base_key;
- if (load_key (base, base_key))
- return -1;
-
- HKEY result_key;
- if (ACE_TEXT_RegOpenKeyEx (base_key,
- sub_section,
- 0,
- KEY_ALL_ACCESS,
- &result_key) != ERROR_SUCCESS)
- {
- if (!create)
- return -2;
-
- if (ACE_TEXT_RegCreateKeyEx (base_key,
- sub_section,
- 0,
- NULL,
- REG_OPTION_NON_VOLATILE,
- KEY_ALL_ACCESS,
- NULL,
- &result_key,
- NULL) != ERROR_SUCCESS)
- return -3;
- }
-
- ACE_Section_Key_Win32 *temp;
-
- ACE_NEW_RETURN (temp, ACE_Section_Key_Win32 (result_key), -4);
- result = ACE_Configuration_Section_Key (temp);
- return 0;
-}
-
-int
-ACE_Configuration_Win32Registry::remove_section (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* sub_section,
- int recursive)
-{
- if (validate_name (sub_section))
- return -1;
-
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- if (recursive)
- {
- ACE_Configuration_Section_Key section;
- if (open_section (key, sub_section, 0, section))
- return -2;
-
- HKEY sub_key;
- if (load_key (section, sub_key))
- return -3;
-
- ACE_TCHAR name_buffer[ACE_DEFAULT_BUFSIZE];
- DWORD buffer_size = ACE_DEFAULT_BUFSIZE;
- // Note we don't increment the index because the
- // enumeration becomes invalid if we change the
- // subkey, which we do when we delete it. By leaving
- // it 0, we always delete the top entry
- while (ACE_TEXT_RegEnumKeyEx (sub_key,
- 0,
- name_buffer,
- &buffer_size,
- NULL,
- NULL,
- NULL,
- NULL) == ERROR_SUCCESS)
- {
- remove_section (section, name_buffer, 1);
- buffer_size = ACE_DEFAULT_BUFSIZE;
- }
- }
-
- if (ACE_TEXT_RegDeleteKey (base_key, sub_section) != ERROR_SUCCESS)
- return -2;
-
- return 0;
-}
-
-int
-ACE_Configuration_Win32Registry::enumerate_values (const ACE_Configuration_Section_Key& key,
- int Index,
- ACE_TString& name,
- VALUETYPE& type)
-{
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- ACE_TCHAR name_buffer[ACE_DEFAULT_BUFSIZE];
- DWORD buffer_size = ACE_DEFAULT_BUFSIZE;
- DWORD value_type;
- if (ACE_TEXT_RegEnumValue (base_key,
- Index,
- name_buffer,
- &buffer_size,
- NULL,
- &value_type,
- NULL,
- NULL) != ERROR_SUCCESS)
- return -2;
-
- name = name_buffer;
-
- switch (value_type)
- {
- case REG_BINARY:
- type = BINARY;
- break;
- case REG_SZ:
- type = STRING;
- break;
- case REG_DWORD:
- type = INTEGER;
- break;
- default:
- type = INVALID;
- }
-
- return 0;
-}
-
-int
-ACE_Configuration_Win32Registry::enumerate_sections (const ACE_Configuration_Section_Key& key,
- int Index,
- ACE_TString& name)
-{
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- ACE_TCHAR name_buffer[ACE_DEFAULT_BUFSIZE];
- DWORD buffer_size = ACE_DEFAULT_BUFSIZE;
- if (ACE_TEXT_RegEnumKeyEx (base_key,
- Index,
- name_buffer,
- &buffer_size,
- NULL,
- NULL,
- NULL,
- NULL) != ERROR_SUCCESS)
- return -2;
-
- name = name_buffer;
-
- return 0;
-}
-
-int
-ACE_Configuration_Win32Registry::set_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- const ACE_TString& value)
-{
- if (validate_name (name))
- return -1;
-
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- if (ACE_TEXT_RegSetValueEx (base_key,
- name,
- 0,
- REG_SZ,
- (BYTE *) value.fast_rep (),
- value.length () + 1) != ERROR_SUCCESS)
- return -2;
-
- return 0;
-}
-
-int
-ACE_Configuration_Win32Registry::set_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- u_int value)
-{
- if (validate_name (name))
- return -1;
-
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- if (ACE_TEXT_RegSetValueEx (base_key,
- name,
- 0,
- REG_DWORD,
- (BYTE *) &value,
- sizeof (value)) != ERROR_SUCCESS)
- return -2;
-
- return 0;
-}
-
-int
-ACE_Configuration_Win32Registry::set_binary_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- const void* data,
- u_int length)
-{
- if (validate_name (name))
- return -1;
-
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- if (ACE_TEXT_RegSetValueEx (base_key,
- name,
- 0,
- REG_BINARY,
- (BYTE*)data,
- length) != ERROR_SUCCESS)
- return -2;
-
- return 0;
-}
-
-int
-ACE_Configuration_Win32Registry::get_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- ACE_TString& value)
-{
- if (validate_name (name))
- return -1;
-
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- ACE_TCHAR buffer[ACE_DEFAULT_BUFSIZE];
- DWORD length = ACE_DEFAULT_BUFSIZE;
- DWORD type;
- if (ACE_TEXT_RegQueryValueEx (base_key,
- name,
- NULL,
- &type,
- (BYTE*)buffer,
- &length) != ERROR_SUCCESS)
- return -2;
-
- if (type != REG_SZ)
- return -3;
-
- value = buffer;
- return 0;
-}
-
-int
-ACE_Configuration_Win32Registry::get_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- u_int& value)
-{
- if (validate_name (name))
- return -1;
-
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- DWORD length = sizeof (value);
- DWORD type;
- if (ACE_TEXT_RegQueryValueEx (base_key,
- name,
- NULL,
- &type,
- (BYTE*)&value,
- &length) != ERROR_SUCCESS)
- return -2;
-
- if (type != REG_DWORD)
- return -3;
-
- return 0;
-}
-
-int
-ACE_Configuration_Win32Registry::get_binary_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- void*& data,
- u_int& length)
-{
- if (validate_name (name))
- return -1;
-
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- unsigned char buffer[ACE_DEFAULT_BUFSIZE];
- DWORD buffer_length = ACE_DEFAULT_BUFSIZE;
- DWORD type;
- if (ACE_TEXT_RegQueryValueEx (base_key,
- name,
- NULL,
- &type,
- (BYTE*)&buffer,
- &buffer_length) != ERROR_SUCCESS)
- return -2;
-
- if (type != REG_BINARY)
- return -3;
-
- length = buffer_length;
-
- char* new_data;
- ACE_NEW_RETURN (new_data, char[length], -4);
-
- ACE_OS::memcpy (new_data, buffer, length);
- data = new_data;
- return 0;
-}
-
-int ACE_Configuration_Win32Registry::find_value(const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- VALUETYPE& type_out)
-{
- if (validate_name (name))
- return -1;
-
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- unsigned char buffer[ACE_DEFAULT_BUFSIZE];
- DWORD buffer_length = ACE_DEFAULT_BUFSIZE;
- DWORD type;
- if (ACE_TEXT_RegQueryValueEx (base_key,
- name,
- NULL,
- &type,
- (BYTE*)&buffer,
- &buffer_length) != ERROR_SUCCESS)
- return -1;
-
- switch(type)
- {
- case REG_SZ:
- type_out = STRING;
- break;
- case REG_DWORD:
- type_out = INTEGER;
- break;
- case REG_BINARY:
- type_out = BINARY;
- break;
- default:
- return -1; // unknown type
- }
-
- return 0;
-}
-
-int
-ACE_Configuration_Win32Registry::remove_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name)
-{
- if (validate_name (name))
- return -1;
-
- HKEY base_key;
- if (load_key (key, base_key))
- return -1;
-
- if (ACE_TEXT_RegDeleteValue (base_key, name) != ERROR_SUCCESS)
- return -2;
-
- return 0;
-}
-
-
-int
-ACE_Configuration_Win32Registry::load_key (const ACE_Configuration_Section_Key& key,
- HKEY& hKey)
-{
- ACE_Section_Key_Win32* pKey = ACE_dynamic_cast (ACE_Section_Key_Win32*,
- get_internal_key (key));
- if (!pKey)
- return -1;
-
- hKey = pKey->hKey_;
- return 0;
-}
-
-HKEY
-ACE_Configuration_Win32Registry::resolve_key (HKEY hKey,
- const ACE_TCHAR* path,
- int create)
-{
- const ACE_TCHAR* begin = path;
- const ACE_TCHAR* end = 0;
- HKEY result = 0;
-
- // Make a copy of hKey
- if (::RegOpenKey (hKey, NULL, &result) != ERROR_SUCCESS)
- return 0;
-
- // recurse through the path
- while (1)
- {
- // Detmine the begin/ending of the key name
- end = ACE_OS::strchr (begin, ACE_TEXT ('\\'));
- size_t length = end ? (size_t)(end-begin) : ACE_OS::strlen (begin);
-
- // Make sure length is not 0
- if (!length)
- return 0;
-
- // Open the key
- ACE_TString key (begin, length);
- HKEY subkey;
- if (ACE_TEXT_RegOpenKey (result,
- key.fast_rep (),
- &subkey) != ERROR_SUCCESS)
- {
- // try creating it
- if (!create || ACE_TEXT_RegCreateKeyEx (result,
- key.fast_rep (),
- NULL,
- NULL,
- NULL,
- KEY_ALL_ACCESS,
- NULL,
- &subkey,
- NULL) != ERROR_SUCCESS)
- {
- // error
- ::RegCloseKey (result);
- return 0;
- }
- }
- // release our open key handle
- ::RegCloseKey (result);
- result = subkey;
-
- // If end is NULL, we are done, return the result
- if (!end)
- return result;
-
- begin = end + 1;
- }
-
- return 0;
-}
-
-
-
-#endif // WIN_32
-
-
-
-
-///////////////////////////////////////////////////////////////
-
-ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (void)
- : type_ (ACE_Configuration::INVALID),
- data_ (0),
- length_ (0)
-{
-}
-
-ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (ACE_TCHAR* string)
- : type_ (ACE_Configuration::STRING),
- data_ (string),
- length_ (0)
-{
-}
-
-ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (u_int integer)
- : type_ (ACE_Configuration::INTEGER),
- data_ ((void*) integer),
- length_ (0)
-{
-}
-
-ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (void* data, u_int length)
- : type_ (ACE_Configuration::BINARY),
- data_ (data),
- length_ (length)
-{
-}
-
-ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (const ACE_Configuration_Value_IntId& rhs)
- : type_ (rhs.type_),
- data_ (rhs.data_),
- length_ (rhs.length_)
-{
-}
-
-
-ACE_Configuration_Value_IntId::~ACE_Configuration_Value_IntId (void)
-{
-}
-
-ACE_Configuration_Value_IntId& ACE_Configuration_Value_IntId::operator= (const ACE_Configuration_Value_IntId& rhs)
-{
- if (this != &rhs)
- {
- type_ = rhs.type_;
- data_ = rhs.data_;
- length_ = rhs.length_;
- }
- return *this;
-}
-
-void
-ACE_Configuration_Value_IntId::free (ACE_Allocator* allocator)
-{
- switch (type_)
- {
- case ACE_Configuration::STRING:
- case ACE_Configuration::BINARY:
-
- allocator->free ((void *) (data_));
- break;
-
- case ACE_Configuration::INTEGER:
- case ACE_Configuration::INVALID:
- // Do nothing
- break;
- }
-}
-
-/////////////////////////////////////////////////////////////////////////////
-
-ACE_Configuration_ExtId::ACE_Configuration_ExtId (void)
- : name_ (0)
-{
-}
-
-ACE_Configuration_ExtId::ACE_Configuration_ExtId (const ACE_TCHAR* name)
- : name_ (name)
-{
-}
-
-ACE_Configuration_ExtId::ACE_Configuration_ExtId (const ACE_Configuration_ExtId& rhs)
- : name_ (rhs.name_)
-{
-}
-
-ACE_Configuration_ExtId::~ACE_Configuration_ExtId (void)
-{
-}
-
-ACE_Configuration_ExtId& ACE_Configuration_ExtId::operator= (const ACE_Configuration_ExtId& rhs)
-{
- if (this != &rhs)
- name_ = rhs.name_;
-
- return *this;
-}
-
-int
-ACE_Configuration_ExtId::operator == (const ACE_Configuration_ExtId& rhs) const
-{
- return (ACE_OS::strcmp (name_, rhs.name_) == 0);
-}
-
-int
-ACE_Configuration_ExtId::operator != (const ACE_Configuration_ExtId& rhs) const
-{
- return (ACE_OS::strcmp (name_, rhs.name_) != 0);
-}
-
-u_long
-ACE_Configuration_ExtId::hash (void) const
-{
- ACE_TString temp (name_);
- return temp.hash ();
-}
-
-const ACE_TCHAR*
-ACE_Configuration_ExtId::name (void)
-{
- return name_;
-}
-
-void
-ACE_Configuration_ExtId::free (ACE_Allocator* allocator)
-{
- allocator->free ((void *) (name_));
-}
-
-///////////////////////////////////////////////////////////////////////
-
-ACE_Configuration_Section_IntId::ACE_Configuration_Section_IntId (void)
- : value_hash_map_ (0),
- section_hash_map_ (0)
-{
-}
-
-ACE_Configuration_Section_IntId::ACE_Configuration_Section_IntId (VALUE_MAP* value_hash_map, SUBSECTION_MAP* section_hash_map)
- : value_hash_map_ (value_hash_map),
- section_hash_map_ (section_hash_map)
-{
-}
-
-ACE_Configuration_Section_IntId::ACE_Configuration_Section_IntId (const ACE_Configuration_Section_IntId& rhs)
- : value_hash_map_ (rhs.value_hash_map_),
- section_hash_map_ (rhs.section_hash_map_)
-{
-
-}
-
-ACE_Configuration_Section_IntId::~ACE_Configuration_Section_IntId ()
-{
-}
-
-ACE_Configuration_Section_IntId&
-ACE_Configuration_Section_IntId::operator= (const ACE_Configuration_Section_IntId& rhs)
-{
- if (this != &rhs)
- {
- value_hash_map_ = rhs.value_hash_map_;
- section_hash_map_ = rhs.section_hash_map_;
- }
- return *this;
-}
-
-void
-ACE_Configuration_Section_IntId::free (ACE_Allocator* allocator)
-{
- allocator->free ((void *)(value_hash_map_));
- allocator->free ((void *)(section_hash_map_));
-}
-
-ACE_Configuration_Section_Key_Heap::ACE_Configuration_Section_Key_Heap (const ACE_TCHAR* path)
- : path_ (0),
- value_iter_ (0),
- section_iter_ (0)
-{
- path_ = ACE_OS::strdup (path);
-}
-
-ACE_Configuration_Section_Key_Heap::~ACE_Configuration_Section_Key_Heap ()
-{
- delete value_iter_;
- delete section_iter_;
- ACE_OS::free (path_);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-ACE_Configuration_Heap::ACE_Configuration_Heap (void)
- : allocator_ (0),
- index_ (0),
- default_map_size_ (0)
-{
- ACE_Configuration_Section_Key_Heap *temp = 0;
-
- ACE_NEW (temp, ACE_Configuration_Section_Key_Heap (ACE_TEXT ("")));
- root_ = ACE_Configuration_Section_Key (temp);
-}
-
-ACE_Configuration_Heap::~ACE_Configuration_Heap (void)
-{
- if (allocator_)
- allocator_->sync ();
-
- delete allocator_;
-}
-
-int
-ACE_Configuration_Heap::open (int default_map_size)
-{
- default_map_size_ = default_map_size;
- // Create the allocator with the appropriate options.
- // The name used for the lock is the same as one used
- // for the file.
- ACE_NEW_RETURN (this->allocator_,
- HEAP_ALLOCATOR (),
- -1);
- return create_index ();
-}
-
-
-int
-ACE_Configuration_Heap::open (const ACE_TCHAR* file_name,
- void* base_address,
- int default_map_size)
-{
- default_map_size_ = default_map_size;
-
- // Make sure that the file name is of the legal length.
- if (ACE_OS::strlen (file_name) >= MAXNAMELEN + MAXPATHLEN)
- {
- errno = ENAMETOOLONG;
- return -1;
- }
-
-#if !defined (CHORUS)
- ACE_MMAP_Memory_Pool::OPTIONS options (base_address);
-#else
- // Use base address == 0, don't use a fixed address.
- ACE_MMAP_Memory_Pool::OPTIONS options (0,
- 0,
- 0,
- ACE_CHORUS_LOCAL_NAME_SPACE_T_SIZE);
-#endif /* CHORUS */
-
- // Create the allocator with the appropriate options. The name used
- // for the lock is the same as one used for the file.
- ACE_NEW_RETURN (this->allocator_,
- PERSISTENT_ALLOCATOR (file_name,
- file_name,
- &options),
- -1);
-
-#if !defined (ACE_LACKS_ACCESS)
- // Now check if the backing store has been created successfully.
- if (ACE_OS::access (file_name, F_OK) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("create_index\n")),
- -1);
-#endif /* ACE_LACKS_ACCESS */
-
- return create_index ();
-}
-
-int
-ACE_Configuration_Heap::create_index (void)
-{
- void *section_index = 0;
-
- // This is the easy case since if we find hash table in the
- // memory-mapped file we know it's already initialized.
- if (this->allocator_->find (ACE_CONFIG_SECTION_INDEX, section_index) == 0)
- this->index_ = (SECTION_MAP *) section_index;
-
- // Create a new <index_> (because we've just created a new
- // memory-mapped file).
- else
- {
- size_t index_size = sizeof (SECTION_MAP);
- section_index = this->allocator_->malloc (index_size);
-
- if (section_index == 0
- || create_index_helper (section_index) == -1
- || this->allocator_->bind (ACE_CONFIG_SECTION_INDEX,
- section_index) == -1)
- {
- // Attempt to clean up.
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT("create_index\n")));
- this->allocator_->remove ();
- return -1;
- }
- // Add the root section
- return new_section (ACE_TEXT (""), root_);
- }
- return 0;
-}
-
-int
-ACE_Configuration_Heap::create_index_helper (void *buffer)
-{
- ACE_NEW_RETURN (this->index_,
- (buffer) SECTION_MAP (this->allocator_),
- -1);
- return 0;
-}
-
-int
-ACE_Configuration_Heap::load_key (const ACE_Configuration_Section_Key& key,
- ACE_TString& name)
-{
- ACE_Configuration_Section_Key_Heap* pKey =
- ACE_dynamic_cast (ACE_Configuration_Section_Key_Heap*,
- get_internal_key (key));
- if (!pKey)
- return -1;
-
- name = pKey->path_;
- return 0;
-}
-
-
-int
-ACE_Configuration_Heap::add_section (const ACE_Configuration_Section_Key& base,
- const ACE_TCHAR* sub_section,
- ACE_Configuration_Section_Key& result)
-{
-
- ACE_TString section;
- if (load_key (base, section))
- return -1;
-
- // Find the base section
- ACE_Configuration_ExtId ExtId (section.fast_rep ());
- ACE_Configuration_Section_IntId IntId;
- if (index_->find (ExtId, IntId, allocator_))
- return -2;
-
- // See if this section already exists
- ACE_Configuration_ExtId SubSectionExtId (sub_section);
- int ignored = 0;
-
- if (!IntId.section_hash_map_->find (SubSectionExtId, ignored, allocator_))
- // already exists!
- return -3;
-
- // Create the new section name
- // only prepend a separater if were not at the root
- if (section.length ())
- section += ACE_TEXT ("\\");
-
- section += sub_section;
-
- // Add it to the base section
- ACE_TCHAR* pers_name = (ACE_TCHAR*)allocator_->malloc ((ACE_OS::strlen (sub_section) + 1) * sizeof (ACE_TCHAR));
- ACE_OS::strcpy (pers_name, sub_section);
- ACE_Configuration_ExtId SSExtId (pers_name);
- if (IntId.section_hash_map_->bind (SSExtId, ignored, allocator_))
- {
- allocator_->free (pers_name);
- return -4;
- }
- return (new_section (section, result));
-}
-
-int
-ACE_Configuration_Heap::new_section (const ACE_TString& section,
- ACE_Configuration_Section_Key& result)
-{
- // Create a new section and add it to the global list
-
- // Allocate memory for items to be stored in the table.
- size_t section_len = section.length () + 1;
- ACE_TCHAR *ptr = (ACE_TCHAR*) this->allocator_->malloc (section_len);
-
- int return_value = -1;
-
- if (ptr == 0)
- return -1;
- else
- {
- // Populate memory with data.
- ACE_OS::strcpy (ptr, section.fast_rep ());
-
- void *value_hash_map = 0;
- size_t map_size = sizeof (VALUE_MAP);
- value_hash_map = this->allocator_->malloc (map_size);
-
- // If allocation failed ...
- if (value_hash_map == 0)
- return -1;
-
- // Initialize allocated hash map through placement new.
- if (value_open_helper (default_map_size_, value_hash_map ) == -1)
- {
- this->allocator_->free (value_hash_map );
- return -2;
- }
-
- // create the section map
- void* section_hash_map = 0;
- map_size = sizeof (SUBSECTION_MAP);
- section_hash_map = this->allocator_->malloc (map_size);
-
- // If allocation failed
- if (section_hash_map == 0)
- return -1;
-
- // initialize allocated hash map through placement new
- if (section_open_helper (default_map_size_, section_hash_map) == -1)
- {
- this->allocator_->free (value_hash_map );
- this->allocator_->free (section_hash_map);
- return -2;
- }
-
- ACE_Configuration_ExtId name (ptr);
- ACE_Configuration_Section_IntId entry ((VALUE_MAP*)value_hash_map ,
- (SUBSECTION_MAP*)section_hash_map);
-
- // Do a normal bind. This will fail if there's already an
- // entry with the same name.
- return_value = this->index_->bind (name, entry, this->allocator_);
-
- if (return_value == 1)
- {
- // Entry already existed so bind failed. Free our dynamically
- // allocated memory.
- this->allocator_->free ((void *) ptr);
- return return_value;
- }
-
- if (return_value == -1)
- // Free our dynamically allocated memory.
- this->allocator_->free ((void *) ptr);
- else
- // If bind() succeed, it will automatically sync
- // up the map manager entry. However, we must sync up our
- // name/value memory.
- this->allocator_->sync (ptr, section_len);
-
- }
-
- // set the result
- ACE_Configuration_Section_Key_Heap *temp;
- ACE_NEW_RETURN (temp, ACE_Configuration_Section_Key_Heap (section.fast_rep ()), -2);
- result = ACE_Configuration_Section_Key (temp);
- return return_value;
-}
-
-int
-ACE_Configuration_Heap::value_open_helper (size_t hash_table_size,
- void *buffer)
-{
- ACE_NEW_RETURN (buffer,
- (buffer) VALUE_MAP (hash_table_size, this->allocator_),
- -1);
- return 0;
-}
-
-int
-ACE_Configuration_Heap::section_open_helper (size_t hash_table_size,
- void *buffer)
-{
- ACE_NEW_RETURN (buffer,
- (buffer) SUBSECTION_MAP (hash_table_size, this->allocator_),
- -1);
- return 0;
-}
-
-int
-ACE_Configuration_Heap::open_section (const ACE_Configuration_Section_Key& base,
- const ACE_TCHAR* sub_section,
- int create,
- ACE_Configuration_Section_Key& result)
-{
- if (validate_name (sub_section))
- return -1;
-
- ACE_TString section;
- if (load_key (base, section))
- return -1;
-
- // Only add the \\ if were not at the root
- if (section.length ())
- section += ACE_TEXT ("\\");
-
- section += sub_section;
-
- // resolve the section
- ACE_Configuration_ExtId ExtId (section.fast_rep ());
- ACE_Configuration_Section_IntId IntId;
- if (index_->find (ExtId, IntId, allocator_))
- {
- if (!create)
- return -2;
-
- return add_section (base, sub_section, result);
- }
-
- ACE_Configuration_Section_Key_Heap *temp;
-
- ACE_NEW_RETURN (temp, ACE_Configuration_Section_Key_Heap (section.fast_rep ()), -3);
- result = ACE_Configuration_Section_Key (temp);
-
- return 0;
-}
-
-int
-ACE_Configuration_Heap::remove_section (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* sub_section,
- int recursive)
-{
- if (validate_name (sub_section))
- return -1;
-
- ACE_TString section;
- if (load_key (key, section))
- return -1;
-
- // Find this key
- ACE_Configuration_ExtId ParentExtId (section.fast_rep ());
- ACE_Configuration_Section_IntId ParentIntId;
- if (index_->find (ParentExtId, ParentIntId, allocator_))
- return -2;// no parent key
-
- // Find this subkey
- if (section.length ())
- section += ACE_TEXT ("\\");
-
- section += sub_section;
- ACE_Configuration_ExtId SectionExtId (section.fast_rep ());
- SECTION_ENTRY* section_entry;
- SECTION_HASH* hashmap = index_;
- if (hashmap->find (SectionExtId, section_entry))
- return -2;
-
- if (recursive)
- {
- ACE_Configuration_Section_Key section;
- if (open_section (key, sub_section, 0, section))
- return -3;
-
- int index = 0;
- ACE_TString name;
- while (!enumerate_sections (section, index, name))
- {
- if (remove_section (section, name.fast_rep (), 1))
- return -4;
-
- index++;
- }
- }
-
- // Now make sure we dont have any subkeys
- if (section_entry->int_id_.section_hash_map_->current_size ())
- return -3;
-
- // Now remove subkey from parent key
- ACE_Configuration_ExtId SubSExtId (sub_section);
- SUBSECTION_ENTRY* subsection_entry;
- if (((SUBSECTION_HASH*)ParentIntId.section_hash_map_)->
- find (SubSExtId, subsection_entry))
- return -4;
-
- if (ParentIntId.section_hash_map_->unbind (SubSExtId, allocator_))
- return -5;
-
- subsection_entry->ext_id_.free (allocator_);
-
- // Remember the pointers so we can free them after we unbind
- ACE_Configuration_ExtId ExtIdToFree (section_entry->ext_id_);
- ACE_Configuration_Section_IntId IntIdToFree (section_entry->int_id_);
-
- // iterate over all values and free memory
- VALUE_HASH* value_hash_map = section_entry->int_id_.value_hash_map_;
- VALUE_HASH::ITERATOR value_iter = value_hash_map->begin ();
- while (!value_iter.done ())
- {
- VALUE_ENTRY* value_entry;
- if (!value_iter.next (value_entry))
- return 1;
-
- value_entry->ext_id_.free (allocator_);
- value_entry->int_id_.free (allocator_);
-
- value_iter.advance ();
- }
-
- // remove it
- if (index_->unbind (SectionExtId, allocator_))
- return -5;
-
- // Free the memory
- ExtIdToFree.free (allocator_);
- IntIdToFree.free (allocator_);
-
- return 0;
-}
-
-int
-ACE_Configuration_Heap::enumerate_values (const ACE_Configuration_Section_Key& key,
- int index,
- ACE_TString& name,
- VALUETYPE& type)
-{
- ACE_Configuration_Section_Key_Heap* pKey =
- ACE_dynamic_cast (ACE_Configuration_Section_Key_Heap*,
- get_internal_key (key));
- if (!pKey)
- return -1;
-
- name = pKey->path_;
-
- // resolve the section
- ACE_Configuration_ExtId ExtId (pKey->path_);
- ACE_Configuration_Section_IntId IntId;
- if (index_->find (ExtId, IntId, allocator_))
- return -2;
-
- // Handle iterator resets
- if (index == 0)
- {
- ACE_Hash_Map_Manager_Ex<ACE_Configuration_ExtId , ACE_Configuration_Value_IntId, ACE_Hash<ACE_Configuration_ExtId>, ACE_Equal_To<ACE_Configuration_ExtId>, ACE_Null_Mutex>* hash_map = IntId.value_hash_map_;
- // @@ This zero pointer check is redundant -Ossama
- // if (pKey->value_iter_)
- delete pKey->value_iter_;
-
- ACE_NEW_RETURN (pKey->value_iter_, VALUE_HASH::ITERATOR(hash_map->begin()), -3);
- }
-
- // Get the next entry
- ACE_Hash_Map_Entry<ACE_Configuration_ExtId, ACE_Configuration_Value_IntId>* entry;
- if (!pKey->value_iter_->next (entry))
- return 1;
-
- // Return the value of the iterator and advance it
- name = entry->ext_id_.name_;
- type = entry->int_id_.type_;
- pKey->value_iter_->advance ();
-
- return 0;
-}
-
-int
-ACE_Configuration_Heap::enumerate_sections (const ACE_Configuration_Section_Key& key,
- int index,
- ACE_TString& name)
-{
- // cast to a heap section key
- ACE_Configuration_Section_Key_Heap* pKey =
- ACE_dynamic_cast (ACE_Configuration_Section_Key_Heap*,
- get_internal_key (key));
- if (!pKey)
- return -1; // not a heap key!
-
- // resolve the section
- ACE_Configuration_ExtId ExtId (pKey->path_);
- ACE_Configuration_Section_IntId IntId;
- if (index_->find (ExtId, IntId, allocator_))
- return -2; // unknown section
-
- // Handle iterator resets
- if (index == 0)
- {
- if (pKey->section_iter_)
- delete pKey->section_iter_;
-
- ACE_NEW_RETURN (pKey->section_iter_, SUBSECTION_HASH::ITERATOR (IntId.section_hash_map_->begin ()), -3);
- }
-
- // Get the next entry
- ACE_Hash_Map_Entry<ACE_Configuration_ExtId, int>* entry;
- if (!pKey->section_iter_->next (entry))
- return 1;
-
- // Return the value of the iterator and advance it
- pKey->section_iter_->advance ();
- name = entry->ext_id_.name_;
-
- return 0;
-}
-
-int
-ACE_Configuration_Heap::set_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- const ACE_TString& value)
-{
- if (validate_name (name))
- return -1;
-
- ACE_TString section;
- if (load_key (key, section))
- return -1;
-
- ACE_Configuration_ExtId section_ext (section.fast_rep ());
- ACE_Configuration_Section_IntId section_int;
- if (index_->find (section_ext, section_int, allocator_))
- return -2;
-
- // Get the entry for this item (if it exists)
- VALUE_ENTRY* entry;
- ACE_Configuration_ExtId item_name(name);
- if(section_int.value_hash_map_->VALUE_HASH::find(item_name, entry) == 0)
- {
- // found item, replace it
- // Free the old value
- entry->int_id_.free(allocator_);
- // Allocate the new value in this heap
- ACE_TCHAR* pers_value = (ACE_TCHAR*)allocator_->malloc ((value.length () + 1) * sizeof (ACE_TCHAR));
- ACE_OS::strcpy (pers_value, value.fast_rep());
- ACE_Configuration_Value_IntId new_value_int(pers_value);
- entry->int_id_ = new_value_int;
- }
- else
- {
- // it doesn't exist, bind it
- ACE_TCHAR* pers_name = (ACE_TCHAR*)allocator_->malloc ((ACE_OS::strlen (name) + 1) * sizeof (ACE_TCHAR));
- ACE_OS::strcpy (pers_name, name);
- ACE_TCHAR* pers_value = (ACE_TCHAR*)allocator_->malloc ((value.length () + 1) * sizeof (ACE_TCHAR));
- ACE_OS::strcpy (pers_value, value.fast_rep ());
- ACE_Configuration_ExtId item_name(pers_name);
- ACE_Configuration_Value_IntId item_value(pers_value);
- if (section_int.value_hash_map_->bind (item_name, item_value, allocator_))
- {
- allocator_->free (pers_value);
- allocator_->free (pers_name);
- return -3;
- }
- return 0;
- }
-
- return 0;
-}
-
-int
-ACE_Configuration_Heap::set_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- u_int value)
-{
- if (validate_name (name))
- return -1;
-
- // Get the section name from the key
- ACE_TString section;
- if (load_key (key, section))
- return -1;
-
- // Find this section
- ACE_Configuration_ExtId section_ext(section.fast_rep ());
- ACE_Configuration_Section_IntId section_int;
- if (index_->find (section_ext, section_int, allocator_))
- return -2; // section does not exist
-
- // Get the entry for this item (if it exists)
- VALUE_ENTRY* entry;
- ACE_Configuration_ExtId item_name(name);
- if(section_int.value_hash_map_->VALUE_HASH::find(item_name, entry) == 0)
- {
- // found item, replace it
- ACE_Configuration_Value_IntId new_value_int(value);
- entry->int_id_ = new_value_int;
- }
- else
- {
- // it doesn't exist, bind it
- ACE_TCHAR* pers_name = (ACE_TCHAR*)allocator_->malloc ((ACE_OS::strlen (name) + 1) * sizeof (ACE_TCHAR));
- ACE_OS::strcpy (pers_name, name);
- ACE_Configuration_ExtId item_name(pers_name);
- ACE_Configuration_Value_IntId item_value(value);
- if (section_int.value_hash_map_->bind (item_name, item_value, allocator_))
- {
- allocator_->free (pers_name);
- return -3;
- }
- return 0;
- }
-
- return 0;
-}
-
-int
-ACE_Configuration_Heap::set_binary_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- const void* data,
- u_int length)
-{
- if (validate_name (name))
- return -1;
-
- // Get the section name from the key
- ACE_TString section;
- if (load_key (key, section))
- return -1;
-
- // Find this section
- ACE_Configuration_ExtId section_ext (section.fast_rep ());
- ACE_Configuration_Section_IntId section_int;
- if (index_->find (section_ext, section_int, allocator_))
- return -2; // section does not exist
-
- // Get the entry for this item (if it exists)
- VALUE_ENTRY* entry;
- ACE_Configuration_ExtId item_name(name);
- if(section_int.value_hash_map_->VALUE_HASH::find(item_name, entry) == 0)
- {
- // found item, replace it
- // Free the old value
- entry->int_id_.free(allocator_);
- // Allocate the new value in this heap
- ACE_TCHAR* pers_value = (ACE_TCHAR*)allocator_->malloc (length);
- ACE_OS::memcpy (pers_value, data, length);
- ACE_Configuration_Value_IntId new_value_int(pers_value, length);
- entry->int_id_ = new_value_int;
- }
- else
- {
- // it doesn't exist, bind it
- ACE_TCHAR* pers_name = (ACE_TCHAR*)allocator_->malloc ((ACE_OS::strlen (name) + 1) * sizeof (ACE_TCHAR));
- ACE_OS::strcpy (pers_name, name);
- ACE_TCHAR* pers_value = (ACE_TCHAR*)allocator_->malloc (length);
- ACE_OS::memcpy (pers_value, data, length);
- ACE_Configuration_ExtId item_name(pers_name);
- ACE_Configuration_Value_IntId item_value(pers_value, length);
- if (section_int.value_hash_map_->bind (item_name, item_value, allocator_))
- {
- allocator_->free (pers_value);
- allocator_->free (pers_name);
- return -3;
- }
- return 0;
- }
-
-/*
- // Find this section
- ACE_Configuration_ExtId ExtId (section.fast_rep ());
- ACE_Configuration_Section_IntId IntId;
- if (index_->find (ExtId, IntId, allocator_))
- return -2; // section does not exist
-
- // See if the value exists first
- ACE_Configuration_ExtId VExtIdFind (name);
- ACE_Configuration_Value_IntId VIntIdFind;
- if (IntId.value_hash_map_->find (VExtIdFind, VIntIdFind, allocator_))
- {
- // it doesn't exist, bind it
- ACE_TCHAR* pers_name = (ACE_TCHAR*)allocator_->malloc ((ACE_OS::strlen (name) + 1) * sizeof (ACE_TCHAR));
- ACE_OS::strcpy (pers_name, name);
- ACE_TCHAR* pers_value = (ACE_TCHAR*)allocator_->malloc (length);
- ACE_OS::memcpy (pers_value, data, length);
- ACE_Configuration_ExtId VExtId (pers_name);
- ACE_Configuration_Value_IntId VIntId (pers_value, length);
- if (IntId.value_hash_map_->bind (VExtId, VIntId, allocator_))
- {
- allocator_->free (pers_value);
- allocator_->free (pers_name);
- return -3;
- }
- return 0;
- }
- else
- {
- // it does exist, free the old value memory
- VIntIdFind.free (allocator_);
- // Assign a new value
- ACE_TCHAR* pers_value = (ACE_TCHAR*)allocator_->malloc (length);
- ACE_OS::memcpy (pers_value, data, length);
- VIntIdFind = ACE_Configuration_Value_IntId (pers_value, length);
- }
-*/
- return 0;
-}
-
-int
-ACE_Configuration_Heap::get_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- ACE_TString& value)
-{
- if (validate_name (name))
- return -1;
-
- // Get the section name from the key
- ACE_TString section;
- if (load_key (key, section))
- return -1;
-
- // Find this section
- ACE_Configuration_ExtId ExtId (section.fast_rep ());
- ACE_Configuration_Section_IntId IntId;
- if (index_->find (ExtId, IntId, allocator_))
- return -2; // section does not exist
-
- // See if it exists first
- ACE_Configuration_ExtId VExtId (name);
- ACE_Configuration_Value_IntId VIntId;
- if (IntId.value_hash_map_->find (VExtId, VIntId, allocator_))
- return -3; // unknown value
-
- // Check type
- if (VIntId.type_ != ACE_Configuration::STRING)
- return -4;
-
- // everythings ok, return the data
- value = (ACE_TCHAR*)VIntId.data_;
- return 0;
-}
-
-int
-ACE_Configuration_Heap::get_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- u_int& value)
-{
- if (validate_name (name))
- return -1;
-
- // Get the section name from the key
- ACE_TString section;
- if (load_key (key, section))
- return -1;
-
- // Find this section
- ACE_Configuration_ExtId ExtId (section.fast_rep ());
- ACE_Configuration_Section_IntId IntId;
- if (index_->find (ExtId, IntId, allocator_))
- return -2; // section does not exist
-
-
- // See if it exists first
- ACE_Configuration_ExtId VExtId (name);
- ACE_Configuration_Value_IntId VIntId;
- if (IntId.value_hash_map_->find (VExtId, VIntId, allocator_))
- return -3; // unknown value
-
- // Check type
- if (VIntId.type_ != ACE_Configuration::INTEGER)
- return -4;
-
- // Everythings ok, return the data
- value = (u_int)((long)VIntId.data_);
- return 0;
-}
-
-int
-ACE_Configuration_Heap::get_binary_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- void*& data,
- u_int& length)
-{
- if (validate_name (name))
- return -1;
-
- // Get the section name from the key
- ACE_TString section;
- if (load_key (key, section))
- return -1;
-
- // Find this section
- ACE_Configuration_ExtId ExtId (section.fast_rep ());
- ACE_Configuration_Section_IntId IntId;
- if (index_->find (ExtId, IntId, allocator_))
- return -2; // section does not exist
-
- ACE_Configuration_ExtId VExtId (name);
- ACE_Configuration_Value_IntId VIntId;
- // See if it exists first
- if (IntId.value_hash_map_->find (VExtId, VIntId, allocator_))
- return -3; // unknown value
-
- // Check type
- if (VIntId.type_ != ACE_Configuration::BINARY)
- return -4;
-
- // Make a copy
- ACE_NEW_RETURN (data, char[VIntId.length_], -5);
- ACE_OS::memcpy (data, VIntId.data_, VIntId.length_);
- length = VIntId.length_;
- return 0;
-}
-
-int
-ACE_Configuration_Heap::find_value(const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- VALUETYPE& type_out)
-{
- if (validate_name (name))
- return -1;
-
- // Get the section name from the key
- ACE_TString section;
- if (load_key (key, section))
- return -1;
-
- // Find this section
- ACE_Configuration_ExtId ExtId (section.fast_rep ());
- ACE_Configuration_Section_IntId IntId;
- if (index_->find (ExtId, IntId, allocator_))
- return -1; // section does not exist
-
- // Find it
- ACE_Configuration_ExtId ValueExtId (name);
- VALUE_ENTRY* value_entry;
- if (((VALUE_HASH*)IntId.value_hash_map_)->find (ValueExtId, value_entry))
- return -1; // value does not exist
-
- type_out = value_entry->int_id_.type_;
- return 0;
-}
-
-
-int
-ACE_Configuration_Heap::remove_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name)
-{
- if (validate_name (name))
- return -1;
-
- // Get the section name from the key
- ACE_TString section;
- if (load_key (key, section))
- return -1;
-
- // Find this section
- ACE_Configuration_ExtId ExtId (section.fast_rep ());
- ACE_Configuration_Section_IntId IntId;
- if (index_->find (ExtId, IntId, allocator_))
- return -2; // section does not exist
-
- // Find it
- ACE_Configuration_ExtId ValueExtId (name);
- VALUE_ENTRY* value_entry;
- if (((VALUE_HASH*)IntId.value_hash_map_)->find (ValueExtId, value_entry))
- return -4;
-
- // free it
- value_entry->ext_id_.free (allocator_);
- value_entry->int_id_.free (allocator_);
-
- // Unbind it
- if (IntId.value_hash_map_->unbind (ValueExtId, allocator_))
- return -3;
-
- return 0;
-}
-
-
diff --git a/ace/Configuration.h b/ace/Configuration.h
deleted file mode 100644
index a5151645e78..00000000000
--- a/ace/Configuration.h
+++ /dev/null
@@ -1,690 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Configuration.h
-//
-// = AUTHOR
-// Chris Hafey <chris@stentorsoft.com>
-//
-// = DESCRIPTION
-// The ACE configuration API provides a portable abstraction for
-// program configuration. The API supports a tree based hierarchy
-// of configuration sections. Each section contains other sections
-// or values. Values may contain string, unsigned integer and
-// binary data.
-//
-// = TODO
-// - Add locking for thread safety.
-// - Need to investigate what happens if memory mapped file gets mapped to
-// a location different than it was created with.
-// - Add dynamic buffer when importing. currently it will not allow
-// importing of values greater than a fixed ammount (4096 bytes)
-// - Replace unsigned int with a type that is fixed accross platforms.
-//
-// ============================================================================
-
-#ifndef ACE_CONFIGURATION_H
-#define ACE_CONFIGURATION_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-#include "ace/SString.h"
-#include "ace/Hash_Map_With_Allocator_T.h"
-#include "ace/Malloc.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// configurable parameters
-
-#if !defined (ACE_CONFIG_SECTION_INDEX)
-# define ACE_CONFIG_SECTION_INDEX "Config_Section_Index"
-#endif /* ! ACE_CONFIG_SECTION_INDEX */
-
-#if !defined (ACE_DEFAULT_CONFIG_SECTION_SIZE)
-#define ACE_DEFAULT_CONFIG_SECTION_SIZE 16
-#endif /* ACE_DEFAULT_CONFIG_SECTION_SIZE */
-
-class ACE_Export ACE_Section_Key_Internal
-{
- // = TITLE
- // A base class for internal handles to section keys for
- // configuration implementations
- //
- // = DESCRIPTION
- // Implementations subclass this base class to represent a
- // section key.
-public:
- virtual ~ACE_Section_Key_Internal (void);
- // Virtual destructor, make sure descendants are virtual!
-
- virtual int add_ref (void);
- // Increment reference count
-
- virtual int dec_ref (void);
- // Decrement reference count. Will delete this if count gets to 0
-protected:
- ACE_Section_Key_Internal (void);
- ACE_Section_Key_Internal (const ACE_Section_Key_Internal& rhs);
- ACE_Section_Key_Internal& operator= (ACE_Section_Key_Internal& rhs);
-
- u_int ref_count_;
-};
-
-class ACE_Export ACE_Configuration_Section_Key
-{
- // = TITLE
- // Referenced counted wrapper for <ACE_Section_Key_Internal>.
- //
- // = DESCRIPTION
- // Reference counted wrapper class for the abstract internal
- // section key. A user gets one of these to represent a section
- // in the configuration database.
- friend class ACE_Configuration;
-public:
- ACE_Configuration_Section_Key (void);
- // Default ctor
-
- ACE_EXPLICIT ACE_Configuration_Section_Key (ACE_Section_Key_Internal *key);
- // ctor based on a pointer to a concrete internal key, does an
- // add_ref on <key>.
-
- ACE_Configuration_Section_Key (const ACE_Configuration_Section_Key &rhs);
- // Copy ctor, does an add_ref on rhs.key_.
-
- ~ACE_Configuration_Section_Key (void);
- // destructor, does a <dec_ref> on <key_>.
-
- ACE_Configuration_Section_Key &
- operator= (const ACE_Configuration_Section_Key &rhs);
- // assignment operator, does a <dec_ref> on <key_> and <add_ref> to
- // <rhs.key_>
-private:
- ACE_Section_Key_Internal *key_;
-};
-
-class ACE_Export ACE_Configuration
-{
- // = TITLE
- // Base class for configuration databases
- //
- // = DESCRIPTION
- // This class provides an interface for configuration databases.
-public:
- enum VALUETYPE
- {
- STRING,
- INTEGER,
- BINARY,
- INVALID
- };
- // Enumeration for the various types of values we can store.
-
- virtual ~ACE_Configuration (void);
- // destructor
-
- virtual const ACE_Configuration_Section_Key& root_section (void);
- // Returns the root section of this configuration.
-
- virtual int open_section (const ACE_Configuration_Section_Key &base,
- const ACE_TCHAR *sub_section,
- int create,
- ACE_Configuration_Section_Key& result) = 0;
- // Finds a <sub_section> in <base> and places the resulting key in
- // <result>. If create is non zero, the sub_section will be created
- // if it doesn't exist
-
- virtual int remove_section (const ACE_Configuration_Section_Key &key,
- const ACE_TCHAR *sub_section,
- int recursive) = 0;
- // Removes the <sub_section> from <key>. If recursive is non zero,
- // any subkeys below <sub_section> are remove as well.
-
- virtual int enumerate_values (const ACE_Configuration_Section_Key& key,
- int index,
- ACE_TString& name,
- VALUETYPE& type) = 0;
- // method to enumerate through the <name> and <type> of values in a
- // <key>. To begin iteration, <index> must be zero. to continue
- // iteration, invoke enumerate_values again while incrementing
- // index. Each iteration will return the <name> of the value and
- // its <type>. This method returns 0 on success, <0 on error and 1
- // when there are no more values to iterate through. Note - you may
- // not delete or add values while enumerating. If you need to do
- // this, you start the enumeration over again.
-
- virtual int enumerate_sections (const ACE_Configuration_Section_Key& key,
- int index, ACE_TString& name) = 0;
- // method to enumerate through the <name> subsections in <key>. To
- // begin iteration, <index> must zero. to continue iteration, invoke
- // enumerate_sections again while incrementing index. Each
- // iteration will return the <name> of the sub section. This method
- // returns 0 on success, <0 on error and 1 when there are no more
- // subsections to iterate through. Note - you may not delete or add
- // values while enumerating. If you need to do this, you start the
- // enumeration over again.
-
- virtual int set_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- const ACE_TString& value) = 0;
- // sets the value in <key> with <name> to a string of <value>
-
- virtual int set_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- u_int value) = 0;
- // sets the value in <key> with <name> to an integer of <value>
-
- virtual int set_binary_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- const void* data,
- u_int length) = 0;
- // sets the value in <key> with <name> to binary data of <data> with
- // <length>.
-
- virtual int get_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- ACE_TString& value) = 0;
- // gets the string value of <name> from <key> and places it in
- // <value>. Returns non zero on error (if value is not a string).
-
- virtual int get_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- u_int& value) = 0;
- // gets the integer value of <name> from <key> and places it in
- // <value>. Returns non zero on error (if value is not an integer).
-
- virtual int get_binary_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- void*& data,
- u_int& length) = 0;
- // gets the binary value of <name> from <key> and places a copy in
- // <data> and sets <length> to the length of the data. caller is
- // responsible for freeing <data>. Returns non zero on error (if
- // value is not binary).
-
- virtual int find_value(const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- VALUETYPE& type) = 0;
- // checks to see if an entry of <name> is in <key> and places the
- // data type in <type>. Returns 0 on success (entry is found),
- // -1 on error
-
-
- virtual int remove_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name) = 0;
- // Removes the the value <name> from <key>. returns non zero on
- // error.
-
- int expand_path (const ACE_Configuration_Section_Key& key,
- const ACE_TString& path_in,
- ACE_Configuration_Section_Key& key_out,
- int create = 1);
- // Expands <path_in> to <key_out> from <key>. If create is true,
- // the subsections are created. Returns 0 on success, non zero on
- // error The path consists of sections separated by the backslash
- // '\'.
-
- virtual int export_config (const ACE_TCHAR* filename);
- // Exports the configuration database to filename. If <filename> is
- // alredy present, it is overwritten.
-
- virtual int import_config (const ACE_TCHAR* filename);
- // Imports the configuration database from filename. Any existing
- // data is not removed.
-
-protected:
- ACE_Configuration (void);
- // Default ctor
-
- ACE_Section_Key_Internal* get_internal_key
- (const ACE_Configuration_Section_Key& key);
- // resolves the internal key from a section key
-
- int validate_name (const ACE_TCHAR* name);
- // tests to see if <name> is valid. <name> must be < 255 characters
- // and not contain the path separator '\', brackets [] or = (maybe
- // just restrict to alphanumeric?) returns non zero if name is not
- // valid
-
- int export_section (const ACE_Configuration_Section_Key& section,
- const ACE_TString& path,
- FILE* out);
- // Used when exporting a configuration to a file
-
- // Not used
- ACE_Configuration (const ACE_Configuration& rhs);
- ACE_Configuration& operator= (const ACE_Configuration& rhs);
- ACE_Configuration_Section_Key root_;
-};
-
-#if defined (ACE_WIN32)
-
-class ACE_Export ACE_Section_Key_Win32 : public ACE_Section_Key_Internal
-{
- // = TITLE
- // The Win32 registry implementation of an internal section key.
- //
- // = DESCRIPTION
- // Holds the HKEY for a section (registry key).
-public:
- ACE_Section_Key_Win32 (HKEY hKey);
- // constructor based on an HKEY
-
- HKEY hKey_;
-
-protected:
- virtual ~ACE_Section_Key_Win32 (void);
- // destructor - invokes <RegCloseKey>
-
- // Not used
- ACE_Section_Key_Win32 (const ACE_Section_Key_Win32& rhs);
- ACE_Section_Key_Win32& operator= (const ACE_Section_Key_Win32& rhs);
-};
-
-class ACE_Export ACE_Configuration_Win32Registry : public ACE_Configuration
-{
- // = TITLE
- // The win32 registry implementation of a configuration database
- //
- // = DESCRIPTION
- // The win32 implementation basically makes calls through to the
- // registry functions. The API is very similar so very little
- // work must be done
-public:
-
- ACE_EXPLICIT ACE_Configuration_Win32Registry (HKEY hKey);
- // constructor for registry configuration database. hKey is the
- // base registry key to attach to. This class takes ownership of
- // hKey, it will invoke <RegCloseKey> on it upon destruction.
-
- virtual ~ACE_Configuration_Win32Registry (void);
- // destructor
-
- virtual int open_section (const ACE_Configuration_Section_Key& base,
- const ACE_TCHAR* sub_section,
- int create,
- ACE_Configuration_Section_Key& result);
-
- virtual int remove_section (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* sub_section,
- int recursive);
-
- virtual int enumerate_values (const ACE_Configuration_Section_Key& key,
- int Index,
- ACE_TString& name,
- VALUETYPE& type);
-
- virtual int enumerate_sections (const ACE_Configuration_Section_Key& key,
- int Index,
- ACE_TString& name);
-
- virtual int set_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- const ACE_TString& value);
-
- virtual int set_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- u_int value);
-
- virtual int set_binary_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- const void* data,
- u_int length);
-
- virtual int get_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- ACE_TString& value);
-
- virtual int get_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- u_int& value);
-
- virtual int get_binary_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- void*& data,
- u_int& length);
-
- virtual int find_value(const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- VALUETYPE& type);
-
- virtual int remove_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name);
- // Removes the the value <name> from <key>. returns non zero on error
-
- static HKEY resolve_key (HKEY hKey,
- const ACE_TCHAR* path,
- int create = 1);
- // This method traverses <path> through <hKey>. It is useful when
- // you want the HKEY for a specific registry key, especially when
- // initializing this implementation. Caller is responsible for
- // closeing this key when it is no longer used. If create is 1
- // (default) the keys are create if they don't already exist.
- // Returns 0 on error
-
-protected:
-
- int load_key (const ACE_Configuration_Section_Key& key, HKEY& hKey);
- // Gets the HKEY for a configuration section
-
- // Not used
- ACE_Configuration_Win32Registry (void);
- ACE_Configuration_Win32Registry (const ACE_Configuration_Win32Registry& rhs);
- ACE_Configuration_Win32Registry& operator= (const ACE_Configuration_Win32Registry& rhs);
-};
-#endif /* ACE_WIN32 */
-
-// ACE_Allocator version
-
-typedef ACE_Allocator_Adapter <ACE_Malloc <ACE_MMAP_MEMORY_POOL,
- ACE_SYNCH_MUTEX> >
- PERSISTENT_ALLOCATOR;
-typedef ACE_Allocator_Adapter <ACE_Malloc <ACE_LOCAL_MEMORY_POOL,
- ACE_SYNCH_MUTEX> >
- HEAP_ALLOCATOR;
-
-class ACE_Export ACE_Configuration_ExtId
-{
- // = TITLE
- // External ID for the section and value hash
- //
- // = DESCRIPTION
- // Contains a pointer to the section or value name.
-public:
- ACE_Configuration_ExtId (void);
- // defeault ctor
-
- ACE_EXPLICIT ACE_Configuration_ExtId (const ACE_TCHAR* name);
- // named constructor
-
- ACE_Configuration_ExtId (const ACE_Configuration_ExtId& rhs);
- // copy ctor
-
- ~ACE_Configuration_ExtId (void);
- // destructor
-
- ACE_Configuration_ExtId& operator= (const ACE_Configuration_ExtId& rhs);
- // assignment operator
-
- int operator== (const ACE_Configuration_ExtId &rhs) const;
- // Equality comparison operator (must match name_).
-
- int operator!= (const ACE_Configuration_ExtId &rhs) const;
- // Inequality comparison operator.
-
- void free (ACE_Allocator* allocator);
- // Frees the name of the value. needed since we don't know the
- // allocator name_ was created in
-
- u_long hash (void) const;
- // <hash> function is required in order for this class to be usable by
- // ACE_Hash_Map_Manager.
-
- // = Data members.
-
- const ACE_TCHAR * name_;
-
- // Accessors
- const ACE_TCHAR *name (void);
-};
-
-typedef ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId, int>
- SUBSECTION_MAP;
-typedef ACE_Hash_Map_Manager_Ex<ACE_Configuration_ExtId,
- int,
- ACE_Hash<ACE_Configuration_ExtId>,
- ACE_Equal_To<ACE_Configuration_ExtId>,
- ACE_Null_Mutex>
- SUBSECTION_HASH;
-typedef ACE_Hash_Map_Entry<ACE_Configuration_ExtId, int>
- SUBSECTION_ENTRY;
-
-class ACE_Export ACE_Configuration_Value_IntId
-{
- // = TITLE
- // The section hash table internal value class
- //
- // = DESCRIPTION
- // This class is present as the internal portion of a section's
- // value hash table It may store string, integer or binary data.
-public:
- ACE_Configuration_Value_IntId (void);
- // default constructor
-
- ACE_EXPLICIT ACE_Configuration_Value_IntId (ACE_TCHAR* string);
- // string constructor, takes ownership of string
-
- ACE_EXPLICIT ACE_Configuration_Value_IntId (u_int integer);
- // integer constructor
-
- ACE_Configuration_Value_IntId (void* data, u_int length);
- // binary constructor, takes ownership of data
-
- ACE_Configuration_Value_IntId (const ACE_Configuration_Value_IntId& rhs);
- // copy ctor
-
- ~ACE_Configuration_Value_IntId (void);
- // destructor
-
- ACE_Configuration_Value_IntId& operator= (
- const ACE_Configuration_Value_IntId& rhs);
- // Assignment operator
-
- void free (ACE_Allocator* allocator);
-
- // = Data members.
-
- ACE_Configuration::VALUETYPE type_;
- void* data_;
- // points to the string value or binary data or IS the integer
- // (XXX need to change this since sizeof (u_int) is
- // not the same accross different platforms)
- u_int length_;
- // Length is only used when type_ == BINARY
-};
-
-typedef ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId,
- ACE_Configuration_Value_IntId>
- VALUE_MAP;
-typedef ACE_Hash_Map_Manager_Ex<ACE_Configuration_ExtId,
- ACE_Configuration_Value_IntId,
- ACE_Hash<ACE_Configuration_ExtId>,
- ACE_Equal_To<ACE_Configuration_ExtId>,
- ACE_Null_Mutex>
- VALUE_HASH;
-typedef ACE_Hash_Map_Entry<ACE_Configuration_ExtId,
- ACE_Configuration_Value_IntId>
- VALUE_ENTRY;
-
-class ACE_Export ACE_Configuration_Section_IntId
-{
- // = TITLE
- // The internal ID for a section hash table
- //
- // = DESCRIPTION
- // Contains a hash table containing value name/values
-public:
- ACE_Configuration_Section_IntId (void);
- // default ctor
-
- ACE_EXPLICIT ACE_Configuration_Section_IntId (VALUE_MAP* value_hash_map,
- SUBSECTION_MAP* section_hash_map);
- // named ctor
-
- ACE_Configuration_Section_IntId (const ACE_Configuration_Section_IntId& rhs);
- // copy ctor
-
- ~ACE_Configuration_Section_IntId (void);
- // destructor
-
- ACE_Configuration_Section_IntId& operator= (
- const ACE_Configuration_Section_IntId& rhs);
- // asignment operator
-
- void free (ACE_Allocator* allocator);
- // frees the hash table and all its values
-
- // = Data Members.
- VALUE_MAP* value_hash_map_;
-
- SUBSECTION_MAP* section_hash_map_;
-};
-typedef ACE_Hash_Map_With_Allocator<ACE_Configuration_ExtId,
- ACE_Configuration_Section_IntId>
- SECTION_MAP;
-typedef ACE_Hash_Map_Manager_Ex<ACE_Configuration_ExtId,
- ACE_Configuration_Section_IntId,
- ACE_Hash<ACE_Configuration_ExtId>,
- ACE_Equal_To<ACE_Configuration_ExtId>,
- ACE_Null_Mutex>
- SECTION_HASH;
-typedef ACE_Hash_Map_Entry<ACE_Configuration_ExtId,
- ACE_Configuration_Section_IntId>
- SECTION_ENTRY;
-
-class ACE_Export ACE_Configuration_Section_Key_Heap
- : public ACE_Section_Key_Internal
-{
- // = TITLE
- // Internal section key class for heap based configuration
- // database.
- //
- // = DESCRIPTION
- // Contains a value iterator and full path name of section.
-public:
- ACE_Configuration_Section_Key_Heap (const ACE_TCHAR* path);
- // constructor based on the full path of the section
-
- ACE_TCHAR* path_;
- //the path itself
-
- VALUE_HASH::ITERATOR* value_iter_;
- // The value iterator
-
- SUBSECTION_HASH::ITERATOR* section_iter_;
- // The sub section iterator
-protected:
- virtual ~ACE_Configuration_Section_Key_Heap (void);
- // destructor - will delete the iterators
-
- // Not used
- ACE_Configuration_Section_Key_Heap (const ACE_Configuration_Section_Key_Heap& rhs);
- ACE_Configuration_Section_Key_Heap& operator= (const ACE_Configuration_Section_Key_Heap& rhs);
-};
-
-class ACE_Export ACE_Configuration_Heap : public ACE_Configuration
-{
- // = TITLE
- // The concrete implementation of a allocator based
- // configuration database
- //
- // = DESCRIPTION
- // This class uses ACE's Allocators to manage a memory
- // representation of a configuraiton database. A persistent heap
- // may be used to store configurations persistently
-public:
-
- ACE_Configuration_Heap (void);
- // Default ctor
-
- virtual ~ACE_Configuration_Heap (void);
- // destructor
-
- int open (const ACE_TCHAR* file_name,
- void* base_address = ACE_DEFAULT_BASE_ADDR,
- int default_map_size = ACE_DEFAULT_CONFIG_SECTION_SIZE);
- // opens a configuration based on a file name
-
- int open (int default_map_size = ACE_DEFAULT_CONFIG_SECTION_SIZE);
- // opens a heap based configuration
-
- virtual int open_section (const ACE_Configuration_Section_Key& base,
- const ACE_TCHAR* sub_section,
- int create, ACE_Configuration_Section_Key& result);
-
- virtual int remove_section (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* sub_section,
- int recursive);
-
- virtual int enumerate_values (const ACE_Configuration_Section_Key& key,
- int Index,
- ACE_TString& name,
- VALUETYPE& type);
-
- virtual int enumerate_sections (const ACE_Configuration_Section_Key& key,
- int Index,
- ACE_TString& name);
-
- virtual int set_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- const ACE_TString& value);
-
- virtual int set_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- u_int value);
-
- virtual int set_binary_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- const void* data,
- u_int length);
-
- virtual int get_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- ACE_TString& value);
-
- virtual int get_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- u_int& value);
-
- virtual int get_binary_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- void* &data,
- u_int &length);
-
- virtual int find_value(const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
- VALUETYPE& type);
-
- virtual int remove_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name);
- // Removes the the value <name> from <key>. returns non zero on error
-
-private:
- int add_section (const ACE_Configuration_Section_Key& base,
- const ACE_TCHAR* sub_section,
- ACE_Configuration_Section_Key& result);
- // adds a new section
-
- int create_index (void);
- // Helper for the <open> method.
-
- int create_index_helper (void *buffer);
- // Helper for <create_index> method: places hash table into an
- // allocated space.
-
- int value_open_helper (size_t hash_table_size, void *buffer);
-
- int section_open_helper (size_t hash_table_size, void *buffer);
-
- int load_key (const ACE_Configuration_Section_Key& key, ACE_TString& name);
-
- int new_section (const ACE_TString& section,
- ACE_Configuration_Section_Key& result);
-
- ACE_Configuration_Heap (const ACE_Configuration_Heap& rhs);
- ACE_Configuration_Heap& operator= (const ACE_Configuration_Heap& rhs);
-
- ACE_Allocator *allocator_;
- SECTION_MAP *index_;
- int default_map_size_;
-};
-
-#include "ace/post.h"
-#endif /* ACE_CONFIGURATION_H */
diff --git a/ace/Connector.cpp b/ace/Connector.cpp
deleted file mode 100644
index cd728d4a399..00000000000
--- a/ace/Connector.cpp
+++ /dev/null
@@ -1,934 +0,0 @@
-// Connector.cpp
-// $Id$
-
-#ifndef ACE_CONNECTOR_C
-#define ACE_CONNECTOR_C
-
-#include "ace/Connector.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID(ace, Connector, "$Id$")
-
-// Shorthand names.
-#define SH SVC_HANDLER
-#define PR_CO_1 ACE_PEER_CONNECTOR_1
-#define PR_CO_2 ACE_PEER_CONNECTOR_2
-#define PR_AD ACE_PEER_CONNECTOR_ADDR
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Connector)
-
-template <class SH, PR_CO_1> void
-ACE_Connector<SH, PR_CO_2>::dump (void) const
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nclosing_ = %d"), this->closing_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags_ = %d"), this->flags_));
- this->handler_map_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Bridge method for creating a SVC_HANDLER. The strategy for
-// creating a SVC_HANDLER are configured into the Acceptor via it's
-// <creation_strategy_>. The default is to create a new SVC_HANDLER.
-// However, subclasses can override this strategy to perform
-// SVC_HANDLER creation in any way that they like (such as creating
-// subclass instances of SVC_HANDLER, using a singleton, dynamically
-// linking the handler, etc.).
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::make_svc_handler (SVC_HANDLER *&sh)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::make_svc_handler");
-
- if (sh == 0)
- ACE_NEW_RETURN (sh,
- SH,
- -1);
-
- // Set the reactor of the newly created <SVC_HANDLER> to the same
- // reactor that this <Connector> is using.
- if (this->reactor ())
- sh->reactor (this->reactor ());
- return 0;
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::activate_svc_handler (SVC_HANDLER *svc_handler)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::activate_svc_handler");
- // No errors initially
- int error = 0;
-
- // See if we should enable non-blocking I/O on the <svc_handler>'s
- // peer.
- if (ACE_BIT_ENABLED (this->flags_, ACE_NONBLOCK) != 0)
- {
- if (svc_handler->peer ().enable (ACE_NONBLOCK) == -1)
- error = 1;
- }
- // Otherwise, make sure it's disabled by default.
- else if (svc_handler->peer ().disable (ACE_NONBLOCK) == -1)
- error = 1;
-
- // We are connected now, so try to open things up.
- if (error || svc_handler->open ((void *) this) == -1)
- {
- // Make sure to close down the <svc_handler> to avoid descriptor
- // leaks.
- svc_handler->close (0);
- return -1;
- }
- else
- return 0;
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::connect_svc_handler (SVC_HANDLER *&svc_handler,
- const PR_AD &remote_addr,
- ACE_Time_Value *timeout,
- const PR_AD &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::connect_svc_handler");
-
- return this->connector_.connect (svc_handler->peer (),
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms);
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::connect_svc_handler (SVC_HANDLER *&svc_handler,
- SVC_HANDLER *&sh_copy,
- const PR_AD &remote_addr,
- ACE_Time_Value *timeout,
- const PR_AD &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::connect_svc_handler");
-
- sh_copy = svc_handler;
- return this->connector_.connect (svc_handler->peer (),
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms);
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::open (ACE_Reactor *r, int flags)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::open");
- this->reactor (r);
- this->flags_ = flags;
- this->closing_ = 0;
- return 0;
-}
-
-template <class SH, PR_CO_1>
-ACE_Connector<SH, PR_CO_2>::ACE_Connector (ACE_Reactor *r, int flags)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::ACE_Connector");
- (void) this->open (r, flags);
-}
-
-template <class SH>
-ACE_Svc_Tuple<SH>::ACE_Svc_Tuple (SVC_HANDLER *sh,
- ACE_HANDLE handle,
- const void *arg,
- long id)
- : svc_handler_ (sh),
- handle_ (handle),
- arg_ (arg),
- cancellation_id_ (id)
-{
- ACE_TRACE ("ACE_Svc_Tuple<SH>::ACE_Svc_Tuple");
-}
-
-template <class SH> SVC_HANDLER *
-ACE_Svc_Tuple<SH>::svc_handler (void)
-{
- ACE_TRACE ("ACE_Svc_Tuple<SH>::svc_handler");
- return this->svc_handler_;
-}
-
-template <class SH> const void *
-ACE_Svc_Tuple<SH>::arg (void)
-{
- ACE_TRACE ("ACE_Svc_Tuple<SH>::arg");
- return this->arg_;
-}
-
-template <class SH> void
-ACE_Svc_Tuple<SH>::arg (const void *v)
-{
- ACE_TRACE ("ACE_Svc_Tuple<SH>::arg");
- this->arg_ = v;
-}
-
-template <class SH> ACE_HANDLE
-ACE_Svc_Tuple<SH>::handle (void)
-{
- ACE_TRACE ("ACE_Svc_Tuple<SH>::handle");
- return this->handle_;
-}
-
-template <class SH> void
-ACE_Svc_Tuple<SH>::handle (ACE_HANDLE h)
-{
- ACE_TRACE ("ACE_Svc_Tuple<SH>::handle");
- this->handle_ = h;
-}
-
-template <class SH> long
-ACE_Svc_Tuple<SH>::cancellation_id (void)
-{
- ACE_TRACE ("ACE_Svc_Tuple<SH>::cancellation_id");
- return this->cancellation_id_;
-}
-
-template <class SH> void
-ACE_Svc_Tuple<SH>::cancellation_id (long id)
-{
- ACE_TRACE ("ACE_Svc_Tuple<SH>::cancellation_id");
- this->cancellation_id_ = id;
-}
-
-template <class SH> void
-ACE_Svc_Tuple<SH>::dump (void) const
-{
- ACE_TRACE ("ACE_Svc_Tuple<SH>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("svc_handler_ = %x"), this->svc_handler_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\narg_ = %x"), this->arg_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncancellation_id_ = %d"), this->cancellation_id_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// This method is called if a connection times out before completing.
-// In this case, we call our cleanup_AST() method to cleanup the
-// descriptor from the ACE_Connector's table.
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::handle_timeout (const ACE_Time_Value &tv,
- const void *arg)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::handle_timeout");
- AST *ast = 0;
-
- if (this->cleanup_AST (((AST *) arg)->handle (),
- ast) == -1)
- return -1;
- else
- {
- ACE_ASSERT (((AST *) arg) == ast);
-
- // We may need this seemingly unnecessary assignment to work
- // around a bug with MSVC++?
- SH *sh = ast->svc_handler ();
-
- // Forward to the SVC_HANDLER the <arg> that was passed in as a
- // magic cookie during ACE_Connector::connect(). This gives the
- // SVC_HANDLER an opportunity to take corrective action (e.g.,
- // wait a few milliseconds and try to reconnect again.
- if (sh->handle_timeout (tv, ast->arg ()) == -1)
- sh->handle_close (sh->get_handle (), ACE_Event_Handler::TIMER_MASK);
-
- delete ast;
- return 0;
- }
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::cleanup_AST (ACE_HANDLE handle,
- ACE_Svc_Tuple<SH> *&ast)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::cleanup_AST");
-
- // Locate the ACE_Svc_Handler corresponding to the socket
- // descriptor.
- if (this->handler_map_.find (handle, ast) == -1)
- {
- // Error, entry not found in map.
- errno = ENOENT;
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p %d not found in map\n"),
- ACE_TEXT ("find"),
- handle),
- -1);
- }
-
- // Try to remove from ACE_Timer_Queue but if it's not there we
- // ignore the error.
- this->reactor ()->cancel_timer (ast->cancellation_id ());
-
- // Remove ACE_HANDLE from ACE_Reactor.
- this->reactor ()->remove_handler
- (handle, ACE_Event_Handler::ALL_EVENTS_MASK | ACE_Event_Handler::DONT_CALL);
-
- // Remove ACE_HANDLE from the map.
- this->handler_map_.unbind (handle);
- return 0;
-}
-
-// Called when a failure occurs during asynchronous connection
-// establishment. Simply delegate all work to this->handle_output().
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::handle_input (ACE_HANDLE h)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::handle_input");
- AST *ast = 0;
-
- if (this->cleanup_AST (h, ast) != -1)
- {
- ast->svc_handler ()->close (0);
- delete ast;
- }
- return 0; // Already removed from the ACE_Reactor.
-}
-
-// Finalize a connection established in non-blocking mode. When a
-// non-blocking connect *succeeds* the descriptor becomes enabled for
-// writing... Likewise, it is generally the case that when a
-// non-blocking connect *fails* the descriptor becomes enabled for
-// reading.
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::handle_output (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::handle_output");
- AST *ast = 0;
-
- if (this->cleanup_AST (handle, ast) == -1)
- return 0;
-
- ACE_ASSERT (ast != 0); // This shouldn't happen!
-
- // Try to find out if the reactor uses event associations for the
- // handles it waits on. If so we need to reset it.
- int reset_new_handle = this->reactor ()->uses_event_associations ();
-
- if (reset_new_handle)
- this->connector_.reset_new_handle (handle);
-
- // Transfer ownership of the ACE_HANDLE to the SVC_HANDLER.
- ast->svc_handler ()->set_handle (handle);
-
- PR_AD raddr;
-
-#if defined (ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS)
- // Win32 has a timing problem - if you check to see if the
- // connection has completed too fast, it will fail - so wait 35
- // millisecond to let it catch up.
- ACE_Time_Value tv (0, ACE_NON_BLOCKING_BUG_DELAY);
- ACE_OS::sleep (tv);
-#endif /* ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS */
-
- // Check to see if we're connected.
- if (ast->svc_handler ()->peer ().get_remote_addr (raddr) != -1)
- this->activate_svc_handler (ast->svc_handler ());
- else // Somethings gone wrong, so close down...
- ast->svc_handler ()->close (0);
-
- delete ast;
- return 0;
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::handle_exception (ACE_HANDLE h)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::handle_exception");
-
- return this->handle_output (h);
-}
-
-// Initiate connection to peer.
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::connect (SH *&sh,
- const PR_AD &remote_addr,
- const ACE_Synch_Options &synch_options,
- const PR_AD &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- return this->connect_i (sh,
- 0,
- remote_addr,
- synch_options,
- local_addr,
- reuse_addr,
- flags,
- perms);
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::connect (SH *&sh,
- SH *&sh_copy,
- const PR_AD &remote_addr,
- const ACE_Synch_Options &synch_options,
- const PR_AD &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- return this->connect_i (sh,
- &sh_copy,
- remote_addr,
- synch_options,
- local_addr,
- reuse_addr,
- flags,
- perms);
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::connect_i (SH *&sh,
- SH **sh_copy,
- const PR_AD &remote_addr,
- const ACE_Synch_Options &synch_options,
- const PR_AD &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::connect");
-
- // If the user hasn't supplied us with a <SVC_HANDLER> we'll use the
- // factory method to create one. Otherwise, things will remain as
- // they are...
- if (this->make_svc_handler (sh) == -1)
- return -1;
-
- ACE_Time_Value *timeout;
- int use_reactor = synch_options[ACE_Synch_Options::USE_REACTOR];
-
- if (use_reactor)
- timeout = (ACE_Time_Value *) &ACE_Time_Value::zero;
- else
- timeout = (ACE_Time_Value *) synch_options.time_value ();
-
- int result;
- if (sh_copy == 0)
- result = this->connect_svc_handler (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms);
- else
- result = this->connect_svc_handler (sh,
- *sh_copy,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms);
-
- // Delegate to connection strategy.
- if (result == -1)
- {
- if (use_reactor && errno == EWOULDBLOCK)
- {
- // If the connection hasn't completed and we are using
- // non-blocking semantics then register ourselves with the
- // ACE_Reactor so that it will call us back when the
- // connection is complete or we timeout, whichever comes
- // first... Note that we needn't check the return value
- // here because if something goes wrong that will reset
- // errno this will be detected by the caller (since -1 is
- // being returned...).
- if (sh_copy == 0)
- this->create_AST (sh,
- synch_options);
- else
- this->create_AST (*sh_copy,
- synch_options);
- }
- else
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- // Make sure to close down the Channel to avoid descriptor
- // leaks.
- if (sh_copy == 0)
- {
- if (sh)
- sh->close (0);
- }
- else
- {
- if (*sh_copy)
- (*sh_copy)->close (0);
- }
- }
- return -1;
- }
- else
- {
- // Activate immediately if we are connected.
- return this->activate_svc_handler (sh);
- }
-}
-
-// Initiate connection to peer.
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::connect_n (size_t n,
- SH *sh[],
- PR_AD remote_addrs[],
- ACE_TCHAR *failed_svc_handlers,
- const ACE_Synch_Options &synch_options)
-{
- int result = 0;
-
- for (size_t i = 0; i < n; i++)
- {
- if (this->connect (sh[i], remote_addrs[i], synch_options) == -1
- && !(synch_options[ACE_Synch_Options::USE_REACTOR]
- && errno == EWOULDBLOCK))
- {
- result = -1;
- if (failed_svc_handlers != 0)
- // Mark this entry as having failed.
- failed_svc_handlers[i] = 1;
- }
- else if (failed_svc_handlers != 0)
- // Mark this entry as having succeeded.
- failed_svc_handlers[i] = 0;
- }
-
- return result;
-}
-
-// Cancel a <svc_handler> that was started asynchronously.
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::cancel (SH *sh)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::cancel");
- MAP_ITERATOR mi (this->handler_map_);
-
- for (MAP_ENTRY *me = 0;
- mi.next (me) != 0;
- mi.advance ())
- if (me->int_id_->svc_handler () == sh)
- {
- AST *ast = 0;
- this->cleanup_AST (me->ext_id_, ast);
- ACE_ASSERT (ast == me->int_id_);
- delete ast;
- return 0;
- }
-
- return -1;
-}
-
-// Register the pending SVC_HANDLER with the map so that it can be
-// activated later on when the connection complets.
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::create_AST (SH *sh,
- const ACE_Synch_Options &synch_options)
-{
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::create_AST");
- AST *ast;
-
- ACE_NEW_RETURN (ast,
- AST (sh,
- sh->get_handle (),
- synch_options.arg (), -1),
- -1);
-
- // Register this with the reactor for connection events.
- ACE_Reactor_Mask mask = ACE_Event_Handler::CONNECT_MASK;
-
- // Bind ACE_Svc_Tuple with the ACE_HANDLE we're trying to connect.
- if (this->handler_map_.bind (sh->get_handle (), ast) == -1)
- goto fail1;
-
- else if (this->reactor ()->register_handler (sh->get_handle (), this, mask) == -1)
- goto fail2;
- // If we're starting connection under timer control then we need to
- // schedule a timeout with the ACE_Reactor.
- else
- {
- ACE_Time_Value *tv = (ACE_Time_Value *) synch_options.time_value ();
-
- if (tv != 0)
- {
- int cancellation_id =
- this->reactor ()->schedule_timer
- (this, (const void *) ast, *tv);
- if (cancellation_id == -1)
- goto fail3;
-
- ast->cancellation_id (cancellation_id);
- return 0;
- }
- else
- return 0; // Ok, everything worked just fine...
- }
-
- // Undo previous actions using the ol' "goto label and fallthru"
- // trick...
-fail3:
- this->reactor ()->remove_handler (this,
- mask | ACE_Event_Handler::DONT_CALL);
- /* FALLTHRU */
-fail2:
- this->handler_map_.unbind (sh->get_handle ());
- /* FALLTHRU */
-fail1:
-
- // Close the svc_handler
- sh->close (0);
-
- delete ast;
- return -1;
-}
-
-// Terminate the Client ACE_Connector by iterating over any
-// unconnected ACE_Svc_Handler's and removing them from the
-// ACE_Reactor. Note that we can't call handle_close() back at this
-// point since we own these things and we'll just get called
-// recursively!
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::close (void)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::close");
- return this->handle_close ();
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::handle_close");
-
- if (this->reactor () != 0 && this->closing_ == 0)
- {
- // We're closing down now, so make sure not to call ourselves
- // recursively via other calls to handle_close() (e.g., from the
- // Timer_Queue).
- this->closing_ = 1;
-
- MAP_ITERATOR mi (this->handler_map_);
-
- // Iterate through the map and shut down all the pending handlers.
-
- for (MAP_ENTRY *me = 0;
- mi.next (me) != 0;
- mi.advance ())
- {
- AST *ast = 0;
- this->cleanup_AST (me->ext_id_, ast);
-
- // Close the svc_handler
- ACE_ASSERT (ast == me->int_id_);
- me->int_id_->svc_handler ()->close (0);
-
- delete ast;
- }
- }
-
- return 0;
-}
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::fini (void)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::fini");
-
- // Make sure to call close here since our destructor might not be
- // called if we're being dynamically linked via the svc.conf.
- this->handler_map_.close ();
-
- // Make sure we call our handle_close(), not a subclass's!
- return ACE_Connector<SH, PR_CO_2>::handle_close ();
-}
-
-// Hook called by the explicit dynamic linking facility.
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::init (int, ACE_TCHAR *[])
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::init");
- return -1;
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::suspend (void)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::suspend");
- return -1;
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::resume (void)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::resume");
- return -1;
-}
-
-template <class SH, PR_CO_1> int
-ACE_Connector<SH, PR_CO_2>::info (ACE_TCHAR **strp, size_t length) const
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::info");
- ACE_TCHAR buf[BUFSIZ];
-
- ACE_OS::sprintf (buf,
- ACE_TEXT ("%s\t %s"),
- ACE_TEXT ("ACE_Connector"),
- ACE_TEXT ("# connector factory\n"));
-
- if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*strp, buf, length);
- return ACE_OS::strlen (buf);
-}
-
-template <class SH, PR_CO_1>
-ACE_Connector<SH, PR_CO_2>::~ACE_Connector (void)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::~ACE_Connector");
- // We will call our handle_close(), not a subclass's, due to the way
- // that C++ destructors work.
- this->handle_close ();
-}
-
-template <class SH, PR_CO_1> int
-ACE_Strategy_Connector<SH, PR_CO_2>::open (ACE_Reactor *r, int flags)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::open");
- return this->open (r, 0, 0, 0, flags);
-}
-
-template <class SH, PR_CO_1> int
-ACE_Strategy_Connector<SH, PR_CO_2>::open
- (ACE_Reactor *r,
- ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
- ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2> *conn_s,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
- int flags)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::open");
-
- this->reactor (r);
-
- // @@ Not implemented yet.
- // this->flags_ = flags;
- ACE_UNUSED_ARG (flags);
-
- // Initialize the creation strategy.
-
- // First we decide if we need to clean up.
- if (this->creation_strategy_ != 0 &&
- this->delete_creation_strategy_ != 0 &&
- cre_s != 0)
- {
- delete this->creation_strategy_;
- this->creation_strategy_ = 0;
- this->delete_creation_strategy_ = 0;
- }
-
- if (cre_s != 0)
- this->creation_strategy_ = cre_s;
- else if (this->creation_strategy_ == 0)
- {
- ACE_NEW_RETURN (this->creation_strategy_,
- CREATION_STRATEGY,
- -1);
- this->delete_creation_strategy_ = 1;
- }
-
-
- // Initialize the accept strategy.
-
- if (this->connect_strategy_ != 0 &&
- this->delete_connect_strategy_ != 0 &&
- conn_s != 0)
- {
- delete this->connect_strategy_;
- this->connect_strategy_ = 0;
- this->delete_connect_strategy_ = 0;
- }
-
- if (conn_s != 0)
- this->connect_strategy_ = conn_s;
- else if (this->connect_strategy_ == 0)
- {
- ACE_NEW_RETURN (this->connect_strategy_,
- CONNECT_STRATEGY,
- -1);
- this->delete_connect_strategy_ = 1;
- }
-
- // Initialize the concurrency strategy.
-
- if (this->concurrency_strategy_ != 0 &&
- this->delete_concurrency_strategy_ != 0 &&
- con_s != 0)
- {
- delete this->concurrency_strategy_;
- this->concurrency_strategy_ = 0;
- this->delete_concurrency_strategy_ = 0;
- }
-
- if (con_s != 0)
- this->concurrency_strategy_ = con_s;
- else if (this->concurrency_strategy_ == 0)
- {
- ACE_NEW_RETURN (this->concurrency_strategy_,
- CONCURRENCY_STRATEGY,
- -1);
- this->delete_concurrency_strategy_ = 1;
- }
-
- return 0;
-}
-
-template <class SH, PR_CO_1>
-ACE_Strategy_Connector<SH, PR_CO_2>::ACE_Strategy_Connector
- (ACE_Reactor *reactor,
- ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
- ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2> *conn_s,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
- int flags)
- : creation_strategy_ (0),
- delete_creation_strategy_ (0),
- connect_strategy_ (0),
- delete_connect_strategy_ (0),
- concurrency_strategy_ (0),
- delete_concurrency_strategy_ (0)
-{
- ACE_TRACE ("ACE_Connector<SH, PR_CO_2>::ACE_Connector");
-
- if (this->open (reactor, cre_s, conn_s, con_s, flags) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Strategy_Connector::ACE_Strategy_Connector")));
-}
-
-template <class SH, PR_CO_1>
-ACE_Strategy_Connector<SH, PR_CO_2>::~ACE_Strategy_Connector (void)
-{
- ACE_TRACE ("ACE_Strategy_Connector<SH, PR_CO_2>::~ACE_Strategy_Connector");
-
- // Close down
- this->close ();
-}
-
-template <class SH, PR_CO_1> int
-ACE_Strategy_Connector<SH, PR_CO_2>::close (void)
-{
- if (this->delete_creation_strategy_)
- delete this->creation_strategy_;
- this->delete_creation_strategy_ = 0;
- this->creation_strategy_ = 0;
-
- if (this->delete_connect_strategy_)
- delete this->connect_strategy_;
- this->delete_connect_strategy_ = 0;
- this->connect_strategy_ = 0;
-
- if (this->delete_concurrency_strategy_)
- delete this->concurrency_strategy_;
- this->delete_concurrency_strategy_ = 0;
- this->concurrency_strategy_ = 0;
-
- return SUPER::close ();
-}
-
-template <class SH, PR_CO_1> int
-ACE_Strategy_Connector<SH, PR_CO_2>::make_svc_handler (SVC_HANDLER *&sh)
-{
- return this->creation_strategy_->make_svc_handler (sh);
-}
-
-template <class SH, PR_CO_1> int
-ACE_Strategy_Connector<SH, PR_CO_2>::connect_svc_handler
- (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- return this->connect_strategy_->connect_svc_handler (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms);
-}
-
-template <class SH, PR_CO_1> int
-ACE_Strategy_Connector<SH, PR_CO_2>::connect_svc_handler
- (SVC_HANDLER *&sh,
- SVC_HANDLER *&sh_copy,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- return this->connect_strategy_->connect_svc_handler (sh,
- sh_copy,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms);
-}
-
-template <class SH, PR_CO_1> int
-ACE_Strategy_Connector<SH, PR_CO_2>::activate_svc_handler (SVC_HANDLER *svc_handler)
-{
- return this->concurrency_strategy_->activate_svc_handler (svc_handler, this);
-}
-
-template <class SH, PR_CO_1> ACE_Creation_Strategy<SVC_HANDLER> *
-ACE_Strategy_Connector<SH, PR_CO_2>::creation_strategy (void) const
-{
- return this->creation_strategy_;
-}
-
-template <class SH, PR_CO_1> ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2> *
-ACE_Strategy_Connector<SH, PR_CO_2>::connect_strategy (void) const
-{
- return this->connect_strategy_;
-}
-
-template <class SH, PR_CO_1> ACE_Concurrency_Strategy<SVC_HANDLER> *
-ACE_Strategy_Connector<SH, PR_CO_2>::concurrency_strategy (void) const
-{
- return this->concurrency_strategy_;
-}
-
-#undef SH
-#undef PR_CO_1
-#undef PR_CO_2
-#endif /* ACE_CONNECTOR_C */
diff --git a/ace/Connector.h b/ace/Connector.h
deleted file mode 100644
index e03b84a1225..00000000000
--- a/ace/Connector.h
+++ /dev/null
@@ -1,488 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Connector.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_CONNECTOR_H
-#define ACE_CONNECTOR_H
-#include "ace/pre.h"
-
-#include "ace/Service_Config.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Service_Object.h"
-#include "ace/Map_Manager.h"
-#include "ace/Svc_Handler.h"
-#include "ace/Strategies.h"
-
-template <class SVC_HANDLER>
-class ACE_Svc_Tuple
-{
- // = TITLE
- // Holds the ACE_Svc_Handler and its argument and
- // <ACE_Timer_Handle> until an asynchronous connection completes.
- //
- // = DESCRIPTION
- // This is a no-brainer...
-public:
- // = Initialization methods.
- ACE_Svc_Tuple (SVC_HANDLER *,
- ACE_HANDLE,
- const void * = 0,
- long timer_id = -1);
-
- // = Get SVC_HANDLER.
- SVC_HANDLER *svc_handler (void);
-
- // = Get/set handle.
- ACE_HANDLE handle (void);
- // Get handle.
- void handle (ACE_HANDLE);
- // Set handle.
-
- // = Get/set argument.
- const void *arg (void);
- // Get argument.
- void arg (const void *);
- // Set argument.
-
- // = Set/get timer cancellation handle.
- long cancellation_id (void);
- // Get cancellation id.
- void cancellation_id (long timer_id);
- // Set cancellation id.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- SVC_HANDLER *svc_handler_;
- // Associated SVC_HANDLER.
-
- ACE_HANDLE handle_;
- // IPC <HANDLE> that we are trying to connect.
-
- const void *arg_;
- // Associated argument.
-
- long cancellation_id_;
- // Associated cancellation id.
-};
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1>
-class ACE_Connector : public ACE_Service_Object
-{
- // = TITLE
- // Generic factory for actively connecting clients and creating
- // service handlers (SVC_HANDLERs).
- //
- // = DESCRIPTION
- // Implements the strategy for actively establishing connections
- // with clients. An ACE_Connector is parameterized by concrete
- // types that conform to the interfaces of PEER_CONNECTOR and
- // SVC_HANDLER. The PEER_CONNECTOR is instantiated with a
- // transport mechanism that passively establishes connections.
- // The SVC_HANDLER is instantiated with a concrete type that
- // performs the application-specific service. An ACE_Connector
- // inherits from ACE_Service_Object, which in turn inherits from
- // ACE_Event_Handler. This enables the ACE_Reactor to dispatch
- // the ACE_Connector's handle_output method when connections
- // complete asynchronously. The handle_output method performs
- // the connector's active connection establishment and service
- // activation strategy.
-public:
- // = Initialization and termination methods.
-
- // typedef ACE_TYPENAME ACE_PEER_CONNECTOR_ADDR PEER_ADDR;
-#if defined (ACE_HAS_TYPENAME_KEYWORD)
- typedef ACE_PEER_CONNECTOR_ADDR ACE_PEER_ADDR_TYPEDEF;
-#endif /* ACE_HAS_TYPENAME_KEYWORD */
-
- ACE_Connector (ACE_Reactor *r = ACE_Reactor::instance (),
- int flags = 0);
- // Initialize a connector. <flags> indicates how <SVC_HANDLER>'s
- // should be initialized prior to being activated. Right now, the
- // only flag that is processed is <ACE_NONBLOCK>, which enabled
- // non-blocking I/O on the <SVC_HANDLER> when it is opened.
-
-
- virtual int open (ACE_Reactor *r = ACE_Reactor::instance (),
- int flags = 0);
- // Initialize a connector. <flags> indicates how <SVC_HANDLER>'s
- // should be initialized prior to being activated. Right now, the
- // only flag that is processed is <ACE_NONBLOCK>, which enabled
- // non-blocking I/O on the <SVC_HANDLER> when it is opened.
-
- virtual ~ACE_Connector (void);
- // Shutdown a connector and release resources.
-
- // = Connection establishment methods.
-
- virtual int connect (SVC_HANDLER *&svc_handler,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults,
- const ACE_PEER_CONNECTOR_ADDR &local_addr
- = (ACE_PEER_CONNECTOR_ADDR &) ACE_PEER_CONNECTOR_ADDR_ANY,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0);
- // Initiate connection of <svc_handler> to peer at <remote_addr>
- // using <synch_options>. If the caller wants to designate the
- // selected <local_addr> they can (and can also insist that the
- // <local_addr> be reused by passing a value <reuse_addr> ==
- // 1). <flags> and <perms> can be used to pass any flags that are
- // needed to perform specific operations such as opening a file
- // within connect with certain permissions. If the connection fails
- // the <close> hook on the <svc_handler> will be called
- // automatically to prevent resource leaks.
-
- virtual int connect (SVC_HANDLER *&svc_handler_hint,
- SVC_HANDLER *&svc_handler,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults,
- const ACE_PEER_CONNECTOR_ADDR &local_addr
- = (ACE_PEER_CONNECTOR_ADDR &) ACE_PEER_CONNECTOR_ADDR_ANY,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0);
- // This is a variation on the previous <connect> method. On cached
- // connectors the <svc_handler_hint> variable can be used as a hint
- // for future lookups. Since this variable is modified in the
- // context of the internal cache its use is thread-safe. But the
- // actual svc_handler for the current connection is returned in the
- // second parameter <svc_handler>. If the connection fails the
- // <close> hook on the <svc_handler> will be called automatically to
- // prevent resource leaks.
-
- virtual int connect_n (size_t n,
- SVC_HANDLER *svc_handlers[],
- ACE_PEER_CONNECTOR_ADDR remote_addrs[],
- ACE_TCHAR *failed_svc_handlers = 0,
- const ACE_Synch_Options &synch_options =
- ACE_Synch_Options::defaults);
- // Initiate connection of <n> <svc_handlers> to peers at
- // <remote_addrs> using <synch_options>. Returns -1 if failure
- // occurs and 0 otherwise. If <failed_svc_handlers> is non-NULL, a
- // 1 is placed in the corresponding index of <failed_svc_handler>
- // for each <svc_handlers[i]> that failed to connect, else a 0 is
- // placed in that index.
-
- virtual int cancel (SVC_HANDLER *svc_handler);
- // Cancel a <svc_handler> that was started asynchronously. Note that
- // this is the only case when the Connector does not actively close
- // the <svc_handler>. It is left up to the caller of <cancel> to
- // decide the fate of the <svc_handler>.
-
- virtual int close (void);
- // Close down the Connector
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Helpful typedefs.
-
- typedef ACE_Svc_Tuple<SVC_HANDLER>
- AST;
-
- typedef ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<SVC_HANDLER> *, ACE_SYNCH_RW_MUTEX>
- MAP_MANAGER;
- typedef ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<SVC_HANDLER> *, ACE_SYNCH_RW_MUTEX>
- MAP_ITERATOR;
- typedef ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<SVC_HANDLER> *>
- MAP_ENTRY;
-
- // = The following two methods define the Connector's strategies for
- // creating, connecting, and activating SVC_HANDLER's, respectively.
-
- virtual int make_svc_handler (SVC_HANDLER *&sh);
- // Bridge method for creating a SVC_HANDLER. The default is to
- // create a new SVC_HANDLER only if <sh> == 0, else <sh> is
- // unchanged. However, subclasses can override this policy to
- // perform SVC_HANDLER creation in any way that they like (such as
- // creating subclass instances of SVC_HANDLER, using a singleton,
- // dynamically linking the handler, etc.). Returns -1 if failure,
- // else 0.
-
- virtual int connect_svc_handler (SVC_HANDLER *&svc_handler,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- virtual int connect_svc_handler (SVC_HANDLER *&svc_handler,
- SVC_HANDLER *&sh_copy,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- // Bridge method for connecting the <svc_handler> to the
- // <remote_addr>. The default behavior delegates to the
- // <PEER_CONNECTOR::connect>.
-
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler);
- // Bridge method for activating a <svc_handler> with the appropriate
- // concurrency strategy. The default behavior of this method is to
- // activate the SVC_HANDLER by calling its <open> method (which
- // allows the SVC_HANDLER to define its own concurrency strategy).
- // However, subclasses can override this strategy to do more
- // sophisticated concurrency activations (such as creating the
- // SVC_HANDLER as an "active object" via multi-threading or
- // multi-processing).
-
- virtual int handle_input (ACE_HANDLE);
- // Called by ACE_Reactor when asynchronous connections fail.
-
- virtual int handle_output (ACE_HANDLE);
- // Called by ACE_Reactor when asynchronous connections succeed.
-
- virtual int handle_exception (ACE_HANDLE fd = ACE_INVALID_HANDLE);
- // Called by ACE_Reactor when asynchronous connections complete (on
- // some platforms only).
-
- // = Dynamic linking hooks.
- virtual int init (int argc, ACE_TCHAR *argv[]);
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
- virtual int fini (void);
- // Calls <handle_close> to shutdown the Connector gracefully.
-
- virtual int info (ACE_TCHAR **, size_t) const;
- // Default version returns address info in <buf>.
-
- // = Demultiplexing hooks.
- virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK);
- // Terminate the Client ACE_Connector by iterating over any
- // unconnected ACE_Svc_Handler's and removing them from the
- // ACE_Reactor.
-
- virtual int handle_timeout (const ACE_Time_Value &tv,
- const void *arg);
- // This method is called if a connection times out before
- // completing.
-
- // = Service management hooks.
- virtual int suspend (void);
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
- virtual int resume (void);
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
- int create_AST (SVC_HANDLER *,
- const ACE_Synch_Options &);
- // Creates and inserts an ACE_Svc_Tuple into the <handler_map_>.
- // so that we can continue accepting this connection asynchronously.
-
- int cleanup_AST (ACE_HANDLE, AST *&);
- // Cleanup the <handler_map_> and returns the appropriate
- // ACE_Svc_Tuple (which is 0 if there is no associated tuple).
-
- virtual int connect_i (SVC_HANDLER *&svc_handler,
- SVC_HANDLER **sh_copy,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- const ACE_Synch_Options &synch_options,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- // Implementation the <connect> methods.
-
- MAP_MANAGER handler_map_;
- // Lookup table that maps an I/O handle to a SVC_HANDLER *.
-
-private:
- ACE_PEER_CONNECTOR connector_;
- // This is the concrete connector factory (it keeps no state so the
- // <ACE_Connector> is reentrant).
-
- char closing_;
- // Keeps track of whether we are in the process of closing (required
- // to avoid circular calls to <handle_close>).
-
- int flags_;
- // Flags that indicate how <SVC_HANDLER>'s should be initialized
- // prior to being activated. Right now, the only flag that is
- // processed is <ACE_NONBLOCK>, which enabled non-blocking I/O on
- // the <SVC_HANDLER> when it is opened.
-};
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1>
-class ACE_Strategy_Connector : public ACE_Connector <SVC_HANDLER, ACE_PEER_CONNECTOR_2>
-{
- // = TITLE
- // Abstract factory for creating a service handler
- // (SVC_HANDLER), connecting the SVC_HANDLER, and activating the
- // SVC_HANDLER.
- //
- // = DESCRIPTION
- // Implements a flexible and extensible set of strategies for
- // actively establishing connections with clients. There are
- // three main strategies: (1) creating a SVC_HANDLER, (2)
- // actively connecting a new connection from a client into the
- // SVC_HANDLER, and (3) activating the SVC_HANDLER with a
- // particular concurrency mechanism.
-public:
- ACE_Strategy_Connector (ACE_Reactor *r = ACE_Reactor::instance (),
- ACE_Creation_Strategy<SVC_HANDLER> * = 0,
- ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2> * = 0,
- ACE_Concurrency_Strategy<SVC_HANDLER> * = 0,
- int flags = 0);
- // Initialize a connector. <flags> indicates how <SVC_HANDLER>'s
- // should be initialized prior to being activated. Right now, the
- // only flag that is processed is <ACE_NONBLOCK>, which enabled
- // non-blocking I/O on the <SVC_HANDLER> when it is opened.
-
- virtual int open (ACE_Reactor *r,
- int flags);
- // Initialize a connector. <flags> indicates how <SVC_HANDLER>'s
- // should be initialized prior to being activated. Right now, the
- // only flag that is processed is <ACE_NONBLOCK>, which enabled
- // non-blocking I/O on the <SVC_HANDLER> when it is opened.
- // Default strategies would be created and used.
-
- virtual int open (ACE_Reactor *r = ACE_Reactor::instance (),
- ACE_Creation_Strategy<SVC_HANDLER> * = 0,
- ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2> * = 0,
- ACE_Concurrency_Strategy<SVC_HANDLER> * = 0,
- int flags = 0);
- // Initialize a connector. <flags> indicates how <SVC_HANDLER>'s
- // should be initialized prior to being activated. Right now, the
- // only flag that is processed is <ACE_NONBLOCK>, which enabled
- // non-blocking I/O on the <SVC_HANDLER> when it is opened.
-
- virtual ~ACE_Strategy_Connector (void);
- // Shutdown a connector and release resources.
-
- virtual int close (void);
- // Close down the Connector
-
- // = Define some useful typedefs traits.
- typedef ACE_Creation_Strategy<SVC_HANDLER>
- CREATION_STRATEGY;
- typedef ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
- CONNECT_STRATEGY;
- typedef ACE_Concurrency_Strategy<SVC_HANDLER>
- CONCURRENCY_STRATEGY;
- typedef ACE_Connector <SVC_HANDLER, ACE_PEER_CONNECTOR_2>
- SUPER;
-
- // = Strategies accessors
- virtual ACE_Creation_Strategy<SVC_HANDLER> *creation_strategy (void) const;
- virtual ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2> *connect_strategy (void) const;
- virtual ACE_Concurrency_Strategy<SVC_HANDLER> *concurrency_strategy (void) const;
-
-protected:
- // = The following three methods define the <Connector>'s strategies
- // for creating, connecting, and activating <SVC_HANDLER>'s,
- // respectively.
-
- virtual int make_svc_handler (SVC_HANDLER *&sh);
- // Bridge method for creating a <SVC_HANDLER>. The strategy for
- // creating a <SVC_HANDLER> are configured into the Connector via
- // it's <creation_strategy_>. The default is to create a new
- // <SVC_HANDLER> only if <sh> == 0, else <sh> is unchanged.
- // However, subclasses can override this policy to perform
- // <SVC_HANDLER> creation in any way that they like (such as
- // creating subclass instances of <SVC_HANDLER>, using a singleton,
- // dynamically linking the handler, etc.). Returns -1 if failure,
- // else 0.
-
- virtual int connect_svc_handler (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- // Bridge method for connecting the new connection into the
- // <SVC_HANDLER>. The default behavior delegates to the
- // <PEER_CONNECTOR::connect> in the <Connect_Strategy>.
-
- virtual int connect_svc_handler (SVC_HANDLER *&sh,
- SVC_HANDLER *&sh_copy,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- // Bridge method for connecting the new connection into the
- // <SVC_HANDLER>. The default behavior delegates to the
- // <PEER_CONNECTOR::connect> in the <Connect_Strategy>.
- // <sh_copy> is used to obtain a copy of the <sh> pointer, but that
- // can be kept in the stack; the motivation is a bit too long to
- // include here, but basically we want to modify <sh> safely, using
- // the internal locks in the Connect_Strategy, while saving a TSS
- // copy in <sh_copy>, usually located in the stack.
-
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler);
- // Bridge method for activating a <SVC_HANDLER> with the appropriate
- // concurrency strategy. The default behavior of this method is to
- // activate the <SVC_HANDLER> by calling its <open> method (which
- // allows the <SVC_HANDLER> to define its own concurrency strategy).
- // However, subclasses can override this strategy to do more
- // sophisticated concurrency activations (such as creating the
- // <SVC_HANDLER> as an "active object" via multi-threading or
- // multi-processing).
-
- // = Strategy objects.
-
- CREATION_STRATEGY *creation_strategy_;
- // Creation strategy for an <Connector>.
-
- int delete_creation_strategy_;
- // 1 if <Connector> created the creation strategy and thus should
- // delete it, else 0.
-
- CONNECT_STRATEGY *connect_strategy_;
- // Connect strategy for a <Connector>.
-
- int delete_connect_strategy_;
- // 1 if <Connector> created the connect strategy and thus should
- // delete it, else 0.
-
- CONCURRENCY_STRATEGY *concurrency_strategy_;
- // Concurrency strategy for an <Connector>.
-
- int delete_concurrency_strategy_;
- // 1 if <Connector> created the concurrency strategy and thus should
- // delete it, else 0.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Connector.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Connector.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_CONNECTOR_H */
diff --git a/ace/Containers.cpp b/ace/Containers.cpp
deleted file mode 100644
index 9fb16735ea4..00000000000
--- a/ace/Containers.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id$
-
-#include "ace/OS.h"
-#include "ace/Containers.h"
-
-ACE_RCSID(ace, Containers, "$Id$")
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Containers.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Double_Linked_List<ACE_DLList_Node>;
-template class ACE_Double_Linked_List_Iterator_Base<ACE_DLList_Node>;
-template class ACE_Double_Linked_List_Iterator<ACE_DLList_Node>;
-template class ACE_Double_Linked_List_Reverse_Iterator<ACE_DLList_Node>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Double_Linked_List<ACE_DLList_Node>
-#pragma instantiate ACE_Double_Linked_List_Iterator_Base<ACE_DLList_Node>
-#pragma instantiate ACE_Double_Linked_List_Iterator<ACE_DLList_Node>
-#pragma instantiate ACE_Double_Linked_List_Reverse_Iterator<ACE_DLList_Node>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
diff --git a/ace/Containers.h b/ace/Containers.h
deleted file mode 100644
index 46512fe9836..00000000000
--- a/ace/Containers.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Containers.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_CONTAINERS_H
-#define ACE_CONTAINERS_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-#include "ace/Malloc_Base.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class T>
-class ACE_Double_Linked_List;
-
-template <class T>
-class ACE_Double_Linked_List_Iterator_Base;
-template <class T>
-class ACE_Double_Linked_List_Iterator;
-template <class T>
-class ACE_Double_Linked_List_Reverse_Iterator;
-
-class ACE_Export ACE_DLList_Node
-{
- // = TITLE
- // Base implementation of element in a DL list. Needed for
- // ACE_Double_Linked_List.
-public:
- friend class ACE_Double_Linked_List<ACE_DLList_Node>;
- friend class ACE_Double_Linked_List_Iterator_Base<ACE_DLList_Node>;
- friend class ACE_Double_Linked_List_Iterator<ACE_DLList_Node>;
- friend class ACE_Double_Linked_List_Reverse_Iterator<ACE_DLList_Node>;
-
- ACE_DLList_Node (void *&i,
- ACE_DLList_Node *n = 0,
- ACE_DLList_Node *p = 0);
- ~ACE_DLList_Node (void);
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- void *item_;
-
- ACE_DLList_Node *next_;
- ACE_DLList_Node *prev_;
-
-protected:
- ACE_DLList_Node (void);
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Containers.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Containers_T.h"
-
-#include "ace/post.h"
-#endif /* ACE_CONTAINERS_H */
diff --git a/ace/Containers.i b/ace/Containers.i
deleted file mode 100644
index 1312f2a47a6..00000000000
--- a/ace/Containers.i
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_DLList_Node::ACE_DLList_Node (void)
- : item_ (0),
- next_ (0),
- prev_ (0)
-{
-}
-
-ACE_INLINE
-ACE_DLList_Node::ACE_DLList_Node (void *&i,
- ACE_DLList_Node *n,
- ACE_DLList_Node *p)
- : item_ (i),
- next_ (n),
- prev_ (p)
-{
-}
-
-ACE_INLINE
-ACE_DLList_Node::~ACE_DLList_Node (void)
-{
-}
diff --git a/ace/Containers_T.cpp b/ace/Containers_T.cpp
deleted file mode 100644
index 5cdc6364b86..00000000000
--- a/ace/Containers_T.cpp
+++ /dev/null
@@ -1,2685 +0,0 @@
-// $Id$
-
-#ifndef ACE_CONTAINERS_T_C
-#define ACE_CONTAINERS_T_C
-
-#include "ace/Malloc.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Containers.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Containers_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Containers_T, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Stack)
-
-template <class T> void
-ACE_Bounded_Stack<T>::dump (void) const
-{
- ACE_TRACE ("ACE_Bounded_Stack<T>::dump");
-}
-
-template<class T>
-ACE_Bounded_Stack<T>::ACE_Bounded_Stack (size_t size)
- : top_ (0),
- size_ (size)
-{
- ACE_NEW (this->stack_,
- T[size]);
- ACE_TRACE ("ACE_Bounded_Stack<T>::ACE_Bounded_Stack");
-}
-
-template<class T>
-ACE_Bounded_Stack<T>::ACE_Bounded_Stack (const ACE_Bounded_Stack<T> &s)
- : top_ (s.top_),
- size_ (s.size_)
-{
- ACE_NEW (this->stack_,
- T[s.size_]);
-
- ACE_TRACE ("ACE_Bounded_Stack<T>::ACE_Bounded_Stack");
-
- for (size_t i = 0; i < this->top_; i++)
- this->stack_[i] = s.stack_[i];
-}
-
-template<class T> void
-ACE_Bounded_Stack<T>::operator= (const ACE_Bounded_Stack<T> &s)
-{
- ACE_TRACE ("ACE_Bounded_Stack<T>::operator=");
-
- if (&s != this)
- {
- if (this->size_ < s.size_)
- {
- delete [] this->stack_;
- ACE_NEW (this->stack_,
- T[s.size_]);
- }
- this->top_ = s.top_;
-
- for (size_t i = 0; i < this->top_; i++)
- this->stack_[i] = s.stack_[i];
- }
-}
-
-template<class T>
-ACE_Bounded_Stack<T>::~ACE_Bounded_Stack (void)
-{
- ACE_TRACE ("ACE_Bounded_Stack<T>::~ACE_Bounded_Stack");
- delete [] this->stack_;
-}
-
-// ----------------------------------------
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Fixed_Stack)
-
-template <class T, size_t ACE_SIZE> void
-ACE_Fixed_Stack<T, ACE_SIZE>::dump (void) const
-{
- ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::dump");
-}
-
-template<class T, size_t ACE_SIZE>
-ACE_Fixed_Stack<T, ACE_SIZE>::ACE_Fixed_Stack (void)
- : top_ (0),
- size_ (ACE_SIZE)
-{
- ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::ACE_Fixed_Stack");
-}
-
-template<class T, size_t ACE_SIZE>
-ACE_Fixed_Stack<T, ACE_SIZE>::ACE_Fixed_Stack (const ACE_Fixed_Stack<T, ACE_SIZE> &s)
- : top_ (s.top_),
- size_ (s.size_)
-{
- ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::ACE_Fixed_Stack");
- for (size_t i = 0; i < this->top_; i++)
- this->stack_[i] = s.stack_[i];
-}
-
-template<class T, size_t ACE_SIZE> void
-ACE_Fixed_Stack<T, ACE_SIZE>::operator= (const ACE_Fixed_Stack<T, ACE_SIZE> &s)
-{
- ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::operator=");
-
- if (&s != this)
- {
- this->top_ = s.top_;
-
- for (size_t i = 0; i < this->top_; i++)
- this->stack_[i] = s.stack_[i];
- }
-}
-
-template<class T, size_t ACE_SIZE>
-ACE_Fixed_Stack<T, ACE_SIZE>::~ACE_Fixed_Stack (void)
-{
- ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::~ACE_Fixed_Stack");
-}
-
-//----------------------------------------
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Unbounded_Stack)
-
-template <class T> void
-ACE_Unbounded_Stack<T>::dump (void) const
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::dump");
-}
-
-template<class T>
-ACE_Unbounded_Stack<T>::ACE_Unbounded_Stack (ACE_Allocator *alloc)
- : head_ (0),
- cur_size_ (0),
- allocator_ (alloc)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::ACE_Unbounded_Stack");
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- ACE_NEW_MALLOC (this->head_,
- (ACE_Node<T> *) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T>);
- this->head_->next_ = this->head_;
-}
-
-template<class T> void
-ACE_Unbounded_Stack<T>::delete_all_nodes (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::delete_all_nodes");
-
- while (this->is_empty () == 0)
- {
- ACE_Node<T> *temp = this->head_->next_;
- this->head_->next_ = temp->next_;
- ACE_DES_FREE_TEMPLATE (temp, this->allocator_->free,
- ACE_Node, <T>);
- }
-
- this->cur_size_ = 0;
-
- ACE_ASSERT (this->head_ == this->head_->next_
- && this->is_empty ());
-}
-
-template<class T> void
-ACE_Unbounded_Stack<T>::copy_all_nodes (const ACE_Unbounded_Stack<T> &s)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::copy_all_nodes");
-
- ACE_ASSERT (this->head_ == this->head_->next_);
-
- ACE_Node<T> *temp = this->head_;
-
- for (ACE_Node<T> *s_temp = s.head_->next_;
- s_temp != s.head_;
- s_temp = s_temp->next_)
- {
- ACE_Node<T> *nptr = temp->next_;
- ACE_NEW_MALLOC (temp->next_,
- (ACE_Node<T> *) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T> (s_temp->item_, nptr));
- temp = temp->next_;
- }
- this->cur_size_ = s.cur_size_;
-}
-
-template<class T>
-ACE_Unbounded_Stack<T>::ACE_Unbounded_Stack (const ACE_Unbounded_Stack<T> &s)
- : head_ (0),
- cur_size_ (0),
- allocator_ (s.allocator_)
-{
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- ACE_NEW_MALLOC (this->head_,
- (ACE_Node<T> *) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T>);
- this->head_->next_ = this->head_;
-
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::ACE_Unbounded_Stack");
- this->copy_all_nodes (s);
-}
-
-template<class T> void
-ACE_Unbounded_Stack<T>::operator= (const ACE_Unbounded_Stack<T> &s)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::operator=");
-
- if (this != &s)
- {
- this->delete_all_nodes ();
- this->copy_all_nodes (s);
- }
-}
-
-template<class T>
-ACE_Unbounded_Stack<T>::~ACE_Unbounded_Stack (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::~ACE_Unbounded_Stack");
-
- this->delete_all_nodes ();
- ACE_DES_FREE_TEMPLATE (head_,
- this->allocator_->free,
- ACE_Node,
- <T>);
-}
-
-template<class T> int
-ACE_Unbounded_Stack<T>::push (const T &new_item)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::push");
-
- ACE_Node<T> *temp;
-
- ACE_NEW_MALLOC_RETURN (temp,
- (ACE_Node<T> *) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T> (new_item, this->head_->next_),
- -1);
- this->head_->next_ = temp;
- this->cur_size_++;
- return 0;
-}
-
-template<class T> int
-ACE_Unbounded_Stack<T>::pop (T &item)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::pop");
-
- if (this->is_empty ())
- return -1;
- else
- {
- ACE_Node<T> *temp = this->head_->next_;
- item = temp->item_;
- this->head_->next_ = temp->next_;
-
- ACE_DES_FREE_TEMPLATE (temp,
- this->allocator_->free,
- ACE_Node,
- <T>);
- this->cur_size_--;
- return 0;
- }
-}
-
-template <class T> int
-ACE_Unbounded_Stack<T>::find (const T &item) const
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::find");
- // Set <item> into the dummy node.
- this->head_->item_ = item;
-
- ACE_Node<T> *temp = this->head_->next_;
-
- // Keep looping until we find the item.
- while (!(temp->item_ == item))
- temp = temp->next_;
-
- // If we found the dummy node then it's not really there, otherwise,
- // it is there.
- return temp == this->head_ ? -1 : 0;
-}
-
-template <class T> int
-ACE_Unbounded_Stack<T>::insert (const T &item)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::insert");
-
- if (this->find (item) == 0)
- return 1;
- else
- return this->push (item);
-}
-
-template <class T> int
-ACE_Unbounded_Stack<T>::remove (const T &item)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::remove");
-
- // Insert the item to be founded into the dummy node.
- this->head_->item_ = item;
-
- ACE_Node<T> *curr = this->head_;
-
- while (!(curr->next_->item_ == item))
- curr = curr->next_;
-
- if (curr->next_ == this->head_)
- return -1; // Item was not found.
- else
- {
- ACE_Node<T> *temp = curr->next_;
- // Skip over the node that we're deleting.
- curr->next_ = temp->next_;
- this->cur_size_--;
- ACE_DES_FREE_TEMPLATE (temp,
- this->allocator_->free,
- ACE_Node,
- <T>);
- return 0;
- }
-}
-
-template <class T>
-ACE_Unbounded_Queue<T>::ACE_Unbounded_Queue (ACE_Allocator *alloc)
- : head_ (0),
- cur_size_ (0),
- allocator_ (alloc)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::ACE_Unbounded_Queue (void)");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- ACE_NEW_MALLOC (this->head_,
- (ACE_Node<T> *) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T>);
- // Make the list circular by pointing it back to itself.
- this->head_->next_ = this->head_;
-}
-
-template <class T>
-ACE_Unbounded_Queue<T>::ACE_Unbounded_Queue (const ACE_Unbounded_Queue<T> &us)
- : head_ (0),
- cur_size_ (0),
- allocator_ (us.allocator_)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::ACE_Unbounded_Queue");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- ACE_NEW_MALLOC (this->head_,
- (ACE_Node<T> *) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T>);
- this->head_->next_ = this->head_;
- this->copy_nodes (us);
-}
-
-template <class T> void
-ACE_Unbounded_Queue<T>::operator= (const ACE_Unbounded_Queue<T> &us)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::operator=");
-
- if (this != &us)
- {
- this->delete_nodes ();
- this->copy_nodes (us);
- }
-}
-
-template <class T> ACE_Unbounded_Queue_Iterator<T>
-ACE_Unbounded_Queue<T>::begin (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::begin");
- return ACE_Unbounded_Queue_Iterator<T> (*this);
-}
-
-template <class T> ACE_Unbounded_Queue_Iterator<T>
-ACE_Unbounded_Queue<T>::end (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::end");
- return ACE_Unbounded_Queue_Iterator<T> (*this, 1);
-}
-
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Unbounded_Queue)
-
-template <class T> void
-ACE_Unbounded_Queue<T>::dump (void) const
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_ = %u"), this->head_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_->next_ = %u"), this->head_->next_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d\n"), this->cur_size_));
-
- T *item = 0;
-#if !defined (ACE_NLOGGING)
- size_t count = 1;
-#endif /* ! ACE_NLOGGING */
-
- for (ACE_Unbounded_Queue_Iterator<T> iter (*(ACE_Unbounded_Queue<T> *) this);
- iter.next (item) != 0;
- iter.advance ())
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("count = %d\n"), count++));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class T> void
-ACE_Unbounded_Queue<T>::copy_nodes (const ACE_Unbounded_Queue<T> &us)
-{
- for (ACE_Node<T> *curr = us.head_->next_;
- curr != us.head_;
- curr = curr->next_)
- if (this->enqueue_tail (curr->item_) == -1)
- // @@ What's the right thing to do here?
- this->delete_nodes ();
-}
-
-template <class T> void
-ACE_Unbounded_Queue<T>::delete_nodes (void)
-{
- for (ACE_Node<T> *curr = this->head_->next_;
- // Keep looking until we've hit the dummy node.
- curr != this->head_;
- )
- {
- ACE_Node<T> *temp = curr;
- curr = curr->next_;
-
- ACE_DES_FREE_TEMPLATE (temp,
- this->allocator_->free,
- ACE_Node,
- <T>);
- this->cur_size_--;
- // @@ Doesnt make sense to have this check since
- // this will always be true.
- // ACE_ASSERT (this->cur_size_ >= 0);
- }
-
- // Reset the list to be a circular list with just a dummy node.
- this->head_->next_ = this->head_;
-}
-
-template <class T>
-ACE_Unbounded_Queue<T>::~ACE_Unbounded_Queue (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::~ACE_Unbounded_Queue (void)");
-
- this->delete_nodes ();
- ACE_DES_FREE_TEMPLATE (head_,
- this->allocator_->free,
- ACE_Node,
- <T>);
- this->head_ = 0;
-}
-
-template <class T> int
-ACE_Unbounded_Queue<T>::enqueue_head (const T &new_item)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::enqueue_tail");
-
- ACE_Node<T> *temp;
-
- // Create a new node that points to the original head.
- ACE_NEW_MALLOC_RETURN (temp,
- (ACE_Node<T> *) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T> (new_item, this->head_->next_),
- -1);
- // Link this pointer into the front of the list. Note that the
- // "real" head of the queue is <head_->next_>, whereas <head_> is
- // just a pointer to the dummy node.
- this->head_->next_ = temp;
-
- this->cur_size_++;
- return 0;
-}
-
-template <class T> int
-ACE_Unbounded_Queue<T>::enqueue_tail (const T &new_item)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::enqueue_head");
-
- ACE_Node<T> *temp;
-
- // Insert <item> into the old dummy node location. Note that this
- // isn't actually the "head" item in the queue, it's a dummy node at
- // the "tail" of the queue...
- this->head_->item_ = new_item;
-
- // Create a new dummy node.
- ACE_NEW_MALLOC_RETURN (temp,
- (ACE_Node<T> *) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T> (this->head_->next_), -1);
- // Link this dummy pointer into the list.
- this->head_->next_ = temp;
-
- // Point the head to the new dummy node.
- this->head_ = temp;
-
- this->cur_size_++;
- return 0;
-}
-
-template <class T> int
-ACE_Unbounded_Queue<T>::dequeue_head (T &item)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::dequeue_head");
-
- // Check for empty queue.
- if (this->is_empty ())
- return -1;
-
- ACE_Node<T> *temp = this->head_->next_;
-
- item = temp->item_;
- this->head_->next_ = temp->next_;
- ACE_DES_FREE_TEMPLATE (temp,
- this->allocator_->free,
- ACE_Node,
- <T>);
- --this->cur_size_;
- return 0;
-}
-
-template <class T> void
-ACE_Unbounded_Queue<T>::reset (void)
-{
- ACE_TRACE ("reset");
-
- this->delete_nodes ();
-}
-
-template <class T> int
-ACE_Unbounded_Queue<T>::get (T *&item, size_t slot) const
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::get");
-
- ACE_Node<T> *curr = this->head_->next_;
-
- size_t i;
-
- for (i = 0; i < this->cur_size_; i++)
- {
- if (i == slot)
- break;
-
- curr = curr->next_;
- }
-
- if (i < this->cur_size_)
- {
- item = &curr->item_;
- return 0;
- }
- else
- return -1;
-}
-
-template <class T> int
-ACE_Unbounded_Queue<T>::set (const T &item,
- size_t slot)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::set");
-
- ACE_Node<T> *curr = this->head_->next_;
-
- size_t i;
-
- for (i = 0;
- i < slot && i < this->cur_size_;
- i++)
- curr = curr->next_;
-
- if (i < this->cur_size_)
- {
- // We're in range, so everything's cool.
- curr->item_ = item;
- return 0;
- }
- else
- {
- // We need to expand the list.
-
- // A common case will be increasing the set size by 1.
- // Therefore, we'll optimize for this case.
- if (i == slot)
- {
- // Try to expand the size of the set by 1.
- if (this->enqueue_tail (item) == -1)
- return -1;
- else
- return 0;
- }
- else
- {
- T dummy;
-
- // We need to expand the list by multiple (dummy) items.
- for (; i < slot; i++)
- {
- // This head points to the existing dummy node, which is
- // about to be overwritten when we add the new dummy
- // node.
- curr = this->head_;
-
- // Try to expand the size of the set by 1, but don't
- // store anything in the dummy node (yet).
- if (this->enqueue_tail (dummy) == -1)
- return -1;
- }
-
- curr->item_ = item;
- return 0;
- }
- }
-}
-
-template <class T> void
-ACE_Unbounded_Queue_Iterator<T>::dump (void) const
-{
- // ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::dump");
-}
-
-template <class T>
-ACE_Unbounded_Queue_Iterator<T>::ACE_Unbounded_Queue_Iterator (ACE_Unbounded_Queue<T> &q, int end)
- : current_ (end == 0 ? q.head_->next_ : q.head_ ),
- queue_ (q)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::ACE_Unbounded_Queue_Iterator");
-}
-
-template <class T> int
-ACE_Unbounded_Queue_Iterator<T>::advance (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::advance");
- this->current_ = this->current_->next_;
- return this->current_ != this->queue_.head_;
-}
-
-template <class T> int
-ACE_Unbounded_Queue_Iterator<T>::first (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::first");
- this->current_ = this->queue_.head_->next_;
- return this->current_ != this->queue_.head_;
-}
-
-template <class T> int
-ACE_Unbounded_Queue_Iterator<T>::done (void) const
-{
- ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::done");
-
- return this->current_ == this->queue_.head_;
-}
-
-template <class T> int
-ACE_Unbounded_Queue_Iterator<T>::next (T *&item)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue_Iterator<T>::next");
- if (this->current_ == this->queue_.head_)
- return 0;
- else
- {
- item = &this->current_->item_;
- return 1;
- }
-}
-
-//--------------------------------------------------
-ACE_ALLOC_HOOK_DEFINE(ACE_Double_Linked_List_Iterator_Base)
-
-template <class T>
-ACE_Double_Linked_List_Iterator_Base<T>::ACE_Double_Linked_List_Iterator_Base (ACE_Double_Linked_List<T> &dll)
- : current_ (0), dllist_ (&dll)
-{
- // Do nothing
-}
-
-template <class T>
-ACE_Double_Linked_List_Iterator_Base<T>::ACE_Double_Linked_List_Iterator_Base (const ACE_Double_Linked_List_Iterator_Base<T> &iter)
- : current_ (iter.current_),
- dllist_ (iter.dllist_)
-{
- // Do nothing
-}
-
-
-template <class T> T *
-ACE_Double_Linked_List_Iterator_Base<T>::next (void) const
-{
- return this->not_done ();
-}
-
-template <class T> int
-ACE_Double_Linked_List_Iterator_Base<T>::next (T *&ptr) const
-{
- ptr = this->not_done ();
- return ptr ? 1 : 0;
-}
-
-
-template <class T> int
-ACE_Double_Linked_List_Iterator_Base<T>::done (void) const
-{
- return this->not_done () ? 0 : 1;
-}
-
-template <class T> T &
-ACE_Double_Linked_List_Iterator_Base<T>::operator* (void) const
-{
- return *(this->not_done ());
-}
-
-// @@ Is this a valid retasking? Make sure to check with Purify and
-// whatnot that we're not leaking memory or doing any other screwing things.
-template <class T> void
-ACE_Double_Linked_List_Iterator_Base<T>::reset (ACE_Double_Linked_List<T> &dll)
-{
- current_ = 0;
- dllist_ = &dll;
-}
-
- template <class T> int
-ACE_Double_Linked_List_Iterator_Base<T>::go_head (void)
-{
- this->current_ = ACE_static_cast (T*, dllist_->head_->next_);
- return this->current_ ? 1 : 0;
-}
-
-template <class T> int
-ACE_Double_Linked_List_Iterator_Base<T>::go_tail (void)
-{
- this->current_ = ACE_static_cast (T*, dllist_->head_->prev_);
- return this->current_ ? 1 : 0;
-}
-
-template <class T> T *
-ACE_Double_Linked_List_Iterator_Base<T>::not_done (void) const
-{
- if (this->current_ != this->dllist_->head_)
- return this->current_;
- else
- return 0;
-}
-
-template <class T> T *
-ACE_Double_Linked_List_Iterator_Base<T>::do_advance (void)
-{
- if (this->not_done ())
- {
- this->current_ = ACE_static_cast (T*, this->current_->next_);
- return this->not_done ();
- }
- else
- return 0;
-}
-
-template <class T> T *
-ACE_Double_Linked_List_Iterator_Base<T>::do_retreat (void)
-{
- if (this->not_done ())
- {
- this->current_ = ACE_static_cast (T*, this->current_->prev_);
- return this->not_done ();
- }
- else
- return 0;
-}
-
-template <class T> void
-ACE_Double_Linked_List_Iterator_Base<T>::dump_i (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("current_ = %x"), this->current_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-//--------------------------------------------------
-ACE_ALLOC_HOOK_DEFINE(ACE_Double_Linked_List_Iterator)
-
-template <class T>
-ACE_Double_Linked_List_Iterator<T>::ACE_Double_Linked_List_Iterator (ACE_Double_Linked_List<T> &dll)
- : ACE_Double_Linked_List_Iterator_Base <T> (dll)
-{
- this->current_ = ACE_static_cast (T*, dll.head_->next_);
- // Advance current_ out of the null area and onto the first item in
- // the list
-}
-
-template <class T> void
-ACE_Double_Linked_List_Iterator<T>::reset (ACE_Double_Linked_List<T> &dll)
-{
- this->ACE_Double_Linked_List_Iterator_Base <T>::reset (dll);
- this->current_ = ACE_static_cast (T*, dll.head_->next_);
- // Advance current_ out of the null area and onto the first item in
- // the list
-}
-
-template <class T> int
-ACE_Double_Linked_List_Iterator<T>::first (void)
-{
- return this->go_head ();
-}
-
-template <class T> int
-ACE_Double_Linked_List_Iterator<T>::advance (void)
-{
- return this->do_advance () ? 1 : 0;
-}
-
-template <class T> T*
-ACE_Double_Linked_List_Iterator<T>::advance_and_remove (int dont_remove)
-{
- T* item = 0;
- if (dont_remove)
- this->do_advance ();
- else
- {
- item = this->next ();
- this->do_advance ();
- this->dllist_->remove (item);
- }
- return item;
-}
-
-template <class T> void
-ACE_Double_Linked_List_Iterator<T>::dump (void) const
-{
- this->dump_i ();
-}
-
-// Prefix advance.
-
-template <class T>
-ACE_Double_Linked_List_Iterator<T> &
-ACE_Double_Linked_List_Iterator<T>::operator++ (void)
-{
- this->do_advance ();
- return *this;
-}
-
-
-// Postfix advance.
-
-template <class T>
-ACE_Double_Linked_List_Iterator<T>
-ACE_Double_Linked_List_Iterator<T>::operator++ (int)
-{
- ACE_Double_Linked_List_Iterator<T> retv (*this);
- this->do_advance ();
- return retv;
-}
-
-
-// Prefix reverse.
-
-template <class T>
-ACE_Double_Linked_List_Iterator<T> &
-ACE_Double_Linked_List_Iterator<T>::operator-- (void)
-{
- this->do_retreat ();
- return *this;
-}
-
-
-// Postfix reverse.
-
-template <class T>
-ACE_Double_Linked_List_Iterator<T>
-ACE_Double_Linked_List_Iterator<T>::operator-- (int)
-{
- ACE_Double_Linked_List_Iterator<T> retv (*this);
- this->do_retreat ();
- return retv;
-}
-
-
-//--------------------------------------------------
-ACE_ALLOC_HOOK_DEFINE(ACE_Double_Linked_List_Reverse_Iterator)
-
- template <class T>
-ACE_Double_Linked_List_Reverse_Iterator<T>::ACE_Double_Linked_List_Reverse_Iterator (ACE_Double_Linked_List<T> &dll)
- : ACE_Double_Linked_List_Iterator_Base <T> (dll)
-{
- this->current_ = ACE_static_cast (T*, dll.head_->prev_);
- // Advance current_ out of the null area and onto the last item in
- // the list
-}
-
-template <class T> void
-ACE_Double_Linked_List_Reverse_Iterator<T>::reset (ACE_Double_Linked_List<T> &dll)
-{
- this->ACE_Double_Linked_List_Iterator_Base <T>::reset (dll);
- this->current_ = ACE_static_cast (T*, dll.head_->prev_);
- // Advance current_ out of the null area and onto the last item in
- // the list
-}
-
-template <class T> int
-ACE_Double_Linked_List_Reverse_Iterator<T>::first (void)
-{
- return this->go_tail ();
-}
-
-template <class T> int
-ACE_Double_Linked_List_Reverse_Iterator<T>::advance (void)
-{
- return this->do_retreat () ? 1 : 0;
-}
-
-template <class T> T*
-ACE_Double_Linked_List_Reverse_Iterator<T>::advance_and_remove (int dont_remove)
-{
- T* item = 0;
- if (dont_remove)
- this->do_retreat ();
- else
- {
- item = this->next ();
- this->do_retreat ();
- this->dllist_->remove (item);
- }
- return item;
-}
-
-template <class T> void
-ACE_Double_Linked_List_Reverse_Iterator<T>::dump (void) const
-{
- this->dump_i ();
-}
-
-// Prefix advance.
-
-template <class T>
-ACE_Double_Linked_List_Reverse_Iterator<T> &
-ACE_Double_Linked_List_Reverse_Iterator<T>::operator++ (void)
-{
- this->do_retreat ();
- return *this;
-}
-
-
-// Postfix advance.
-
-template <class T>
-ACE_Double_Linked_List_Reverse_Iterator<T>
-ACE_Double_Linked_List_Reverse_Iterator<T>::operator++ (int)
-{
- ACE_Double_Linked_List_Reverse_Iterator<T> retv (*this);
- this->do_retreat ();
- return retv;
-}
-
-
-// Prefix reverse.
-
-template <class T>
-ACE_Double_Linked_List_Reverse_Iterator<T> &
-ACE_Double_Linked_List_Reverse_Iterator<T>::operator-- (void)
-{
- this->do_advance ();
- return *this;
-}
-
-
-// Postfix reverse.
-
-template <class T>
-ACE_Double_Linked_List_Reverse_Iterator<T>
-ACE_Double_Linked_List_Reverse_Iterator<T>::operator-- (int)
-{
- ACE_Double_Linked_List_Reverse_Iterator<T> retv (*this);
- this->do_advance ();
- return retv;
-}
-
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Double_Linked_List)
-
- template <class T>
-ACE_Double_Linked_List<T>:: ACE_Double_Linked_List (ACE_Allocator *alloc)
- : size_ (0), allocator_ (alloc)
-{
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- ACE_NEW_MALLOC (this->head_,
- (T *) this->allocator_->malloc (sizeof (T)),
- T);
- this->init_head ();
-}
-
-template <class T>
-ACE_Double_Linked_List<T>::ACE_Double_Linked_List (ACE_Double_Linked_List<T> &cx)
- : allocator_ (cx.allocator_)
-{
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- ACE_NEW_MALLOC (this->head_,
- (T *) this->allocator_->malloc (sizeof (T)),
- T);
- this->init_head ();
- this->copy_nodes (cx);
-}
-
-template <class T> void
-ACE_Double_Linked_List<T>::operator= (ACE_Double_Linked_List<T> &cx)
-{
- if (this != &cx)
- {
- this->delete_nodes ();
- this->copy_nodes (cx);
- }
-}
-
-template <class T>
-ACE_Double_Linked_List<T>::~ACE_Double_Linked_List (void)
-{
- this->delete_nodes ();
-
- ACE_DES_FREE (head_,
- this->allocator_->free,
- T);
-
- this->head_ = 0;
-}
-
-template <class T> int
-ACE_Double_Linked_List<T>::is_empty (void) const
-{
- return this->size () ? 0 : 1;
-}
-
-template <class T> int
-ACE_Double_Linked_List<T>::is_full (void) const
-{
- return 0; // We have no bound.
-}
-
-template <class T> T *
-ACE_Double_Linked_List<T>::insert_tail (T *new_item)
-{
- // Insert it before <head_>, i.e., at tail.
- this->insert_element (new_item, 1);
- return new_item;
-}
-
-template <class T> T *
-ACE_Double_Linked_List<T>::insert_head (T *new_item)
-{
- this->insert_element (new_item); // Insert it after <head_>, i.e., at head.
- return new_item;
-}
-
-template <class T> T *
-ACE_Double_Linked_List<T>::delete_head (void)
-{
- T *temp;
-
- if (this->is_empty ())
- return 0;
-
- temp = ACE_static_cast (T *,
- this->head_->next_);
- // Detach it from the list.
- this->remove_element (temp);
- return temp;
-}
-
-template <class T> T *
-ACE_Double_Linked_List<T>::delete_tail (void)
-{
- T *temp;
-
- if (this->is_empty ())
- return 0;
-
- temp = ACE_static_cast (T *,
- this->head_->prev_);
- // Detach it from the list.
- this->remove_element (temp);
- return temp;
-}
-
-template <class T> void
-ACE_Double_Linked_List<T>::reset (void)
-{
- this->delete_nodes ();
-}
-
-template <class T> int
-ACE_Double_Linked_List<T>::get (T *&item, size_t slot)
-{
- ACE_Double_Linked_List_Iterator<T> iter (*this);
-
- for (size_t i = 0;
- i < slot && !iter.done ();
- i++)
- iter.advance ();
-
- item = iter.next ();
- return item ? 0 : -1;
-}
-
-template <class T> size_t
-ACE_Double_Linked_List<T>::size (void) const
-{
- return this->size_;
-}
-
-template <class T> void
-ACE_Double_Linked_List<T>::dump (void) const
-{
- // Dump the state of an object.
-}
-
-#if 0
-template <class T> T *
-ACE_Double_Linked_List<T>::find (const T &item)
-{
- for (ACE_Double_Linked_List_Iterator<T> iter (*this);
- !iter.done ();
- iter.advance ())
- {
- T *temp = iter.next ();
-
- if (*temp == item)
- return temp;
- }
-
- return 0;
-}
-
-template <class T> int
-ACE_Double_Linked_List<T>::remove (const T &item)
-{
- T *temp = this->find (item);
-
- if (temp != 0)
- return this->remove (temp);
- else
- return -1;
-}
-#endif /* 0 */
-
-template <class T> int
-ACE_Double_Linked_List<T>::remove (T *n)
-{
- return this->remove_element (n);
-}
-
-template <class T> void
-ACE_Double_Linked_List<T>::delete_nodes (void)
-{
- while (! this->is_empty ())
- {
- T * temp = ACE_static_cast (T*, this->head_->next_);
- this->remove_element (temp);
- delete temp;
- }
-}
-
-template <class T> void
-ACE_Double_Linked_List<T>::copy_nodes (ACE_Double_Linked_List<T> &c)
-{
- for (ACE_Double_Linked_List_Iterator<T> iter (c);
- !iter.done ();
- iter.advance ())
- {
- T* temp = (T *) this->allocator_->malloc (sizeof (T));
- new (temp) T (*iter.next ());
- this->insert_tail (temp);
- }
-}
-
-template <class T> void
-ACE_Double_Linked_List<T>::init_head (void)
-{
- this->head_->next_ = this->head_->prev_ = this->head_;
-}
-
-template <class T> int
-ACE_Double_Linked_List<T>::insert_element (T *new_item,
- int before,
- T *old_item)
-{
- if (old_item == 0)
- old_item = this->head_;
-
- if (before)
- old_item = ACE_static_cast (T *,
- old_item->prev_);
-
- new_item->next_ = old_item->next_;
- new_item->next_->prev_ = new_item;
- new_item->prev_ = old_item;
- old_item->next_ = new_item;
- this->size_++;
- return 0; // Well, what will cause errors here?
-}
-
-template <class T> int
-ACE_Double_Linked_List<T>::remove_element (T *item)
-{
- // Notice that you have to ensure that item is an element of this
- // list. We can't do much checking here.
-
- if (item == this->head_ || item->next_ == 0
- || item->prev_ == 0 || this->size () == 0) // Can't remove head
- return -1;
-
- item->prev_->next_ = item->next_;
- item->next_->prev_ = item->prev_;
- item->next_ = item->prev_ = 0; // reset pointers to prevent double removal.
- this->size_--;
- return 0;
-}
-
-//--------------------------------------------------
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Fixed_Set)
-
- template <class T, size_t ACE_SIZE> size_t
-ACE_Fixed_Set<T, ACE_SIZE>::size (void) const
-{
- return this->cur_size_;
-}
-
-template <class T> size_t
-ACE_Bounded_Set<T>::size (void) const
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::size");
- return this->cur_size_;
-}
-
-template <class T, size_t ACE_SIZE> void
-ACE_Fixed_Set<T, ACE_SIZE>::dump (void) const
-{
- ACE_TRACE ("ACE_Fixed_Set<T, ACE_SIZE>::dump");
-}
-
-template <class T, size_t ACE_SIZE>
-ACE_Fixed_Set<T, ACE_SIZE>::~ACE_Fixed_Set (void)
-{
- ACE_TRACE ("ACE_Fixed_Set<T, ACE_SIZE>::~ACE_Fixed_Set");
- this->cur_size_ = 0;
-}
-
-template <class T, size_t ACE_SIZE>
-ACE_Fixed_Set<T, ACE_SIZE>::ACE_Fixed_Set (const ACE_Fixed_Set<T, ACE_SIZE> &fs)
- : cur_size_ (fs.cur_size_)
-{
- ACE_TRACE ("ACE_Fixed_Set<T>::ACE_Fixed_Set");
-
- for (size_t i = 0; i < this->cur_size_; i++)
- this->search_structure_[i] = fs.search_structure_[i];
-}
-
-template <class T, size_t ACE_SIZE> void
-ACE_Fixed_Set<T, ACE_SIZE>::operator= (const ACE_Fixed_Set<T, ACE_SIZE> &fs)
-{
- ACE_TRACE ("ACE_Fixed_Set<T>::operator=");
-
- if (this != &fs)
- {
- this->cur_size_ = fs.cur_size_;
-
- for (size_t i = 0; i < this->cur_size_; i++)
- this->search_structure_[i] = fs.search_structure_[i];
- }
-}
-
-template <class T, size_t ACE_SIZE>
-ACE_Fixed_Set<T, ACE_SIZE>::ACE_Fixed_Set (void)
- : cur_size_ (0),
- max_size_ (ACE_SIZE)
-{
- ACE_TRACE ("ACE_Fixed_Set<T, ACE_SIZE>::ACE_Fixed_Set");
- for (size_t i = 0; i < this->max_size_; i++)
- this->search_structure_[i].is_free_ = 1;
-}
-
-template <class T, size_t ACE_SIZE> int
-ACE_Fixed_Set<T, ACE_SIZE>::find (const T &item) const
-{
- ACE_TRACE ("ACE_Fixed_Set<T, ACE_SIZE>::find");
-
- for (size_t i = 0; i < this->cur_size_; i++)
- if (this->search_structure_[i].item_ == item
- && this->search_structure_[i].is_free_ == 0)
- return 0;
-
- return -1;
-}
-
-template <class T, size_t ACE_SIZE> int
-ACE_Fixed_Set<T, ACE_SIZE>::insert (const T &item)
-{
- ACE_TRACE ("ACE_Fixed_Set<T, ACE_SIZE>::insert");
- int first_free = -1; // Keep track of first free slot.
- size_t i;
-
- for (i = 0; i < this->cur_size_; i++)
- // First, make sure we don't allow duplicates.
-
- if (this->search_structure_[i].item_ == item
- && this->search_structure_[i].is_free_ == 0)
- return 1;
- else if (this->search_structure_[i].is_free_
- && first_free == -1)
- first_free = i;
-
- // If we found a free spot let's reuse it.
- if (first_free > -1)
- {
- this->search_structure_[first_free].item_ = item;
- this->search_structure_[first_free].is_free_ = 0;
- return 0;
- }
- // Insert at the end of the active portion.
- else if (i < this->max_size_)
- {
- this->search_structure_[i].item_ = item;
- this->search_structure_[i].is_free_ = 0;
- this->cur_size_++;
- return 0;
- }
- else /* No more room! */
- {
- errno = ENOMEM;
- return -1;
- }
-}
-
-template <class T, size_t ACE_SIZE> int
-ACE_Fixed_Set<T, ACE_SIZE>::remove (const T &item)
-{
- ACE_TRACE ("ACE_Fixed_Set<T, ACE_SIZE>::remove");
-
- for (size_t i = 0; i < this->cur_size_; i++)
- if (this->search_structure_[i].item_ == item)
- {
- // Mark this entry as being free.
- this->search_structure_[i].is_free_ = 1;
-
- // If we just unbound the highest entry, then we need to
- // figure out where the next highest active entry is.
- if (i + 1 == this->cur_size_)
- {
- while (i > 0
- && this->search_structure_[--i].is_free_)
- continue;
-
- if (i == 0
- && this->search_structure_[i].is_free_)
- this->cur_size_ = 0;
- else
- this->cur_size_ = i + 1;
- }
- return 0;
- }
-
- return -1;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Fixed_Set_Iterator)
-
- template <class T, size_t ACE_SIZE> void
-ACE_Fixed_Set_Iterator<T, ACE_SIZE>::dump (void) const
-{
- ACE_TRACE ("ACE_Fixed_Set_Iterator<T, ACE_SIZE>::dump");
-}
-
-template <class T, size_t ACE_SIZE>
-ACE_Fixed_Set_Iterator<T, ACE_SIZE>::ACE_Fixed_Set_Iterator (ACE_Fixed_Set<T, ACE_SIZE> &s)
- : s_ (s),
- next_ (-1)
-{
- ACE_TRACE ("ACE_Fixed_Set_Iterator<T, ACE_SIZE>::ACE_Fixed_Set_Iterator");
- this->advance ();
-}
-
-template <class T, size_t ACE_SIZE> int
-ACE_Fixed_Set_Iterator<T, ACE_SIZE>::advance (void)
-{
- ACE_TRACE ("ACE_Fixed_Set_Iterator<T, ACE_SIZE>::advance");
-
- for (++this->next_;
- ACE_static_cast(size_t, this->next_) < this->s_.cur_size_
- && this->s_.search_structure_[this->next_].is_free_;
- ++this->next_)
- continue;
-
- return ACE_static_cast(size_t, this->next_) < this->s_.cur_size_;
-}
-
-template <class T, size_t ACE_SIZE> int
-ACE_Fixed_Set_Iterator<T, ACE_SIZE>::first (void)
-{
- ACE_TRACE ("ACE_Fixed_Set_Iterator<T, ACE_SIZE>::first");
-
- next_ = -1;
- return this->advance ();
-}
-
-template <class T, size_t ACE_SIZE> int
-ACE_Fixed_Set_Iterator<T, ACE_SIZE>::done (void) const
-{
- ACE_TRACE ("ACE_Fixed_Set_Iterator<T, ACE_SIZE>::done");
-
- return ACE_static_cast (ACE_CAST_CONST size_t, this->next_) >=
- this->s_.cur_size_;
-}
-
-template <class T, size_t ACE_SIZE> int
-ACE_Fixed_Set_Iterator<T, ACE_SIZE>::next (T *&item)
-{
- ACE_TRACE ("ACE_Fixed_Set_Iterator<T, ACE_SIZE>::next");
- if (ACE_static_cast (size_t, this->next_) < this->s_.cur_size_)
- {
- item = &this->s_.search_structure_[this->next_].item_;
- return 1;
- }
- else
- return 0;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Set)
-
- template <class T> void
-ACE_Bounded_Set<T>::dump (void) const
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::dump");
-}
-
-template <class T>
-ACE_Bounded_Set<T>::~ACE_Bounded_Set (void)
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::~ACE_Bounded_Set");
- delete [] this->search_structure_;
-}
-
-template <class T>
-ACE_Bounded_Set<T>::ACE_Bounded_Set (void)
- : cur_size_ (0),
- max_size_ (ACE_static_cast(size_t, ACE_Bounded_Set<T>::DEFAULT_SIZE))
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::ACE_Bounded_Set");
-
- ACE_NEW (this->search_structure_,
- ACE_TYPENAME ACE_Bounded_Set<T>::Search_Structure[this->max_size_]);
-
- for (size_t i = 0; i < this->max_size_; i++)
- this->search_structure_[i].is_free_ = 1;
-}
-
-template <class T>
-ACE_Bounded_Set<T>::ACE_Bounded_Set (const ACE_Bounded_Set<T> &bs)
- : cur_size_ (bs.cur_size_),
- max_size_ (bs.max_size_)
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::ACE_Bounded_Set");
-
- ACE_NEW (this->search_structure_,
- ACE_TYPENAME ACE_Bounded_Set<T>::Search_Structure[this->max_size_]);
-
- for (size_t i = 0; i < this->cur_size_; i++)
- this->search_structure_[i] = bs.search_structure_[i];
-}
-
-template <class T> void
-ACE_Bounded_Set<T>::operator= (const ACE_Bounded_Set<T> &bs)
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::operator=");
-
- if (this != &bs)
- {
- if (this->max_size_ < bs.cur_size_)
- {
- delete [] this->search_structure_;
- ACE_NEW (this->search_structure_,
- ACE_TYPENAME ACE_Bounded_Set<T>::Search_Structure[bs.cur_size_]);
- this->max_size_ = bs.cur_size_;
- }
-
- this->cur_size_ = bs.cur_size_;
-
- for (size_t i = 0; i < this->cur_size_; i++)
- this->search_structure_[i] = bs.search_structure_[i];
- }
-}
-
-template <class T>
-ACE_Bounded_Set<T>::ACE_Bounded_Set (size_t size)
- : cur_size_ (0),
- max_size_ (size)
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::ACE_Bounded_Set");
- ACE_NEW (this->search_structure_,
- ACE_TYPENAME ACE_Bounded_Set<T>::Search_Structure[size]);
-
- for (size_t i = 0; i < this->max_size_; i++)
- this->search_structure_[i].is_free_ = 1;
-}
-
-template <class T> int
-ACE_Bounded_Set<T>::find (const T &item) const
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::find");
-
- for (size_t i = 0; i < this->cur_size_; i++)
- if (this->search_structure_[i].item_ == item
- && this->search_structure_[i].is_free_ == 0)
- return 0;
-
- return -1;
-}
-
-template <class T> int
-ACE_Bounded_Set<T>::insert (const T &item)
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::insert");
- int first_free = -1; // Keep track of first free slot.
- size_t i;
-
- for (i = 0; i < this->cur_size_; i++)
- // First, make sure we don't allow duplicates.
-
- if (this->search_structure_[i].item_ == item
- && this->search_structure_[i].is_free_ == 0)
- return 1;
- else if (this->search_structure_[i].is_free_ && first_free == -1)
- first_free = i;
-
- if (first_free > -1) // If we found a free spot let's reuse it.
- {
- this->search_structure_[first_free].item_ = item;
- this->search_structure_[first_free].is_free_ = 0;
- return 0;
- }
- else if (i < this->max_size_) // Insert at the end of the active portion.
- {
- this->search_structure_[i].item_ = item;
- this->search_structure_[i].is_free_ = 0;
- this->cur_size_++;
- return 0;
- }
- else /* No more room! */
- {
- errno = ENOMEM;
- return -1;
- }
-}
-
-template <class T> int
-ACE_Bounded_Set<T>::remove (const T &item)
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::remove");
- for (size_t i = 0; i < this->cur_size_; i++)
- if (this->search_structure_[i].item_ == item)
- {
- // Mark this entry as being free.
- this->search_structure_[i].is_free_ = 1;
-
- // If we just unbound the highest entry, then we need to
- // figure out where the next highest active entry is.
- if (i + 1 == this->cur_size_)
- {
- while (i > 0 && this->search_structure_[--i].is_free_)
- continue;
-
- if (i == 0 && this->search_structure_[i].is_free_)
- this->cur_size_ = 0;
- else
- this->cur_size_ = i + 1;
- }
- return 0;
- }
-
- return -1;
-}
-
-#if defined (__Lynx__)
-// LynxOS 3.0.0 native g++ compiler raises internal error with this inline.
-template <class T> int
-ACE_Bounded_Set<T>::is_full (void) const
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::is_full");
- return this->cur_size_ == this->max_size_;
-}
-#endif /* __Lynx__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Set_Iterator)
-
- template <class T> void
-ACE_Bounded_Set_Iterator<T>::dump (void) const
-{
- ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::dump");
-}
-
-template <class T>
-ACE_Bounded_Set_Iterator<T>::ACE_Bounded_Set_Iterator (ACE_Bounded_Set<T> &s)
- : s_ (s),
- next_ (-1)
-{
- ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::ACE_Bounded_Set_Iterator");
- this->advance ();
-}
-
-template <class T> int
-ACE_Bounded_Set_Iterator<T>::advance (void)
-{
- ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::advance");
-
- for (++this->next_;
- ACE_static_cast(size_t, this->next_) < this->s_.cur_size_
- && this->s_.search_structure_[this->next_].is_free_;
- ++this->next_)
- continue;
-
- return ACE_static_cast(size_t, this->next_) < this->s_.cur_size_;
-}
-
-template <class T> int
-ACE_Bounded_Set_Iterator<T>::first (void)
-{
- ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::first");
-
- next_ = -1;
- return this->advance ();
-}
-
-template <class T> int
-ACE_Bounded_Set_Iterator<T>::done (void) const
-{
- ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::done");
-
- return ACE_static_cast (ACE_CAST_CONST size_t, this->next_) >=
- this->s_.cur_size_;
-}
-
-template <class T> int
-ACE_Bounded_Set_Iterator<T>::next (T *&item)
-{
- ACE_TRACE ("ACE_Bounded_Set_Iterator<T>::next");
- if (ACE_static_cast(size_t, this->next_) < this->s_.cur_size_)
- {
- item = &this->s_.search_structure_[this->next_].item_;
- return 1;
- }
- else
- return 0;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Node)
-
-# if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
- template <class T>
-ACE_Node<T>::~ACE_Node (void)
-{
-}
-# endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
-
-template <class T>
-ACE_Node<T>::ACE_Node (const T &i, ACE_Node<T> *n)
- : next_ (n),
- item_ (i)
-{
- // ACE_TRACE ("ACE_Node<T>::ACE_Node");
-}
-
-template <class T>
-ACE_Node<T>::ACE_Node (ACE_Node<T> *n, int)
- : next_ (n)
-{
- // ACE_TRACE ("ACE_Node<T>::ACE_Node");
-}
-
-template <class T>
-ACE_Node<T>::ACE_Node (const ACE_Node<T> &s)
- : next_ (s.next_),
- item_ (s.item_)
-{
- // ACE_TRACE ("ACE_Node<T>::ACE_Node");
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_DNode)
-
- template <class T>
-ACE_DNode<T>::ACE_DNode (const T &i, ACE_DNode<T> *n, ACE_DNode<T> *p)
- : next_ (n), prev_ (p), item_ (i)
-{
-}
-
-# if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
-template <class T>
-ACE_DNode<T>::~ACE_DNode (void)
-{
-}
-# endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Unbounded_Set)
-
- template <class T> size_t
-ACE_Unbounded_Set<T>::size (void) const
-{
- // ACE_TRACE ("ACE_Unbounded_Set<T>::size");
- return this->cur_size_;
-}
-
-template <class T> int
-ACE_Unbounded_Set<T>::insert_tail (const T &item)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::insert_tail");
- ACE_Node<T> *temp;
-
- // Insert <item> into the old dummy node location.
- this->head_->item_ = item;
-
- // Create a new dummy node.
- ACE_NEW_MALLOC_RETURN (temp,
- (ACE_Node<T>*) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T> (this->head_->next_),
- -1);
- // Link this pointer into the list.
- this->head_->next_ = temp;
-
- // Point the head to the new dummy node.
- this->head_ = temp;
-
- this->cur_size_++;
- return 0;
-}
-
-template <class T> void
-ACE_Unbounded_Set<T>::reset (void)
-{
- ACE_TRACE ("reset");
-
- this->delete_nodes ();
-}
-
-template <class T> void
-ACE_Unbounded_Set<T>::dump (void) const
-{
- ACE_TRACE ("ACE_Unbounded_Set<T>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_ = %u"), this->head_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_->next_ = %u"), this->head_->next_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d\n"), this->cur_size_));
-
- T *item = 0;
-#if !defined (ACE_NLOGGING)
- size_t count = 1;
-#endif /* ! ACE_NLOGGING */
-
- for (ACE_Unbounded_Set_Iterator<T> iter (*(ACE_Unbounded_Set<T> *) this);
- iter.next (item) != 0;
- iter.advance ())
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("count = %d\n"), count++));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class T> void
-ACE_Unbounded_Set<T>::copy_nodes (const ACE_Unbounded_Set<T> &us)
-{
- for (ACE_Node<T> *curr = us.head_->next_;
- curr != us.head_;
- curr = curr->next_)
- this->insert_tail (curr->item_);
-}
-
-template <class T> void
-ACE_Unbounded_Set<T>::delete_nodes (void)
-{
- ACE_Node<T> *curr = this->head_->next_;
-
- // Keep looking until we've hit the dummy node.
-
- while (curr != this->head_)
- {
- ACE_Node<T> *temp = curr;
- curr = curr->next_;
- ACE_DES_FREE_TEMPLATE (temp,
- this->allocator_->free,
- ACE_Node,
- <T>);
- this->cur_size_--;
- }
-
- // Reset the list to be a circular list with just a dummy node.
- this->head_->next_ = this->head_;
-}
-
-template <class T>
-ACE_Unbounded_Set<T>::~ACE_Unbounded_Set (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Set<T>::~ACE_Unbounded_Set");
-
- this->delete_nodes ();
-
- // Delete the dummy node.
- ACE_DES_FREE_TEMPLATE (head_,
- this->allocator_->free,
- ACE_Node,
- <T>);
- this->head_ = 0;
-}
-
-template <class T>
-ACE_Unbounded_Set<T>::ACE_Unbounded_Set (ACE_Allocator *alloc)
- : head_ (0),
- cur_size_ (0),
- allocator_ (alloc)
-{
- // ACE_TRACE ("ACE_Unbounded_Set<T>::ACE_Unbounded_Set");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- ACE_NEW_MALLOC (this->head_,
- (ACE_Node<T>*) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T>);
- // Make the list circular by pointing it back to itself.
- this->head_->next_ = this->head_;
-}
-
-template <class T>
-ACE_Unbounded_Set<T>::ACE_Unbounded_Set (const ACE_Unbounded_Set<T> &us)
- : head_ (0),
- cur_size_ (0),
- allocator_ (us.allocator_)
-{
- ACE_TRACE ("ACE_Unbounded_Set<T>::ACE_Unbounded_Set");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- ACE_NEW_MALLOC (this->head_,
- (ACE_Node<T>*) this->allocator_->malloc (sizeof (ACE_Node<T>)),
- ACE_Node<T>);
- this->head_->next_ = this->head_;
- this->copy_nodes (us);
-}
-
-template <class T> void
-ACE_Unbounded_Set<T>::operator= (const ACE_Unbounded_Set<T> &us)
-{
- ACE_TRACE ("ACE_Unbounded_Set<T>::operator=");
-
- if (this != &us)
- {
- this->delete_nodes ();
- this->copy_nodes (us);
- }
-}
-
-template <class T> int
-ACE_Unbounded_Set<T>::find (const T &item) const
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::find");
- // Set <item> into the dummy node.
- this->head_->item_ = item;
-
- ACE_Node<T> *temp = this->head_->next_;
-
- // Keep looping until we find the item.
- while (!(temp->item_ == item))
- temp = temp->next_;
-
- // If we found the dummy node then it's not really there, otherwise,
- // it is there.
- return temp == this->head_ ? -1 : 0;
-}
-
-template <class T> int
-ACE_Unbounded_Set<T>::insert (const T &item)
-{
- // ACE_TRACE ("ACE_Unbounded_Set<T>::insert");
- if (this->find (item) == 0)
- return 1;
- else
- return this->insert_tail (item);
-}
-
-template <class T> int
-ACE_Unbounded_Set<T>::remove (const T &item)
-{
- // ACE_TRACE ("ACE_Unbounded_Set<T>::remove");
-
- // Insert the item to be founded into the dummy node.
- this->head_->item_ = item;
-
- ACE_Node<T> *curr = this->head_;
-
- while (!(curr->next_->item_ == item))
- curr = curr->next_;
-
- if (curr->next_ == this->head_)
- return -1; // Item was not found.
- else
- {
- ACE_Node<T> *temp = curr->next_;
- // Skip over the node that we're deleting.
- curr->next_ = temp->next_;
- this->cur_size_--;
- ACE_DES_FREE_TEMPLATE (temp,
- this->allocator_->free,
- ACE_Node,
- <T>);
- return 0;
- }
-}
-
-template <class T> ACE_Unbounded_Set_Iterator<T>
-ACE_Unbounded_Set<T>::begin (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Set<T>::begin");
- return ACE_Unbounded_Set_Iterator<T> (*this);
-}
-
-template <class T> ACE_Unbounded_Set_Iterator<T>
-ACE_Unbounded_Set<T>::end (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Set<T>::end");
- return ACE_Unbounded_Set_Iterator<T> (*this, 1);
-}
-
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Unbounded_Set_Iterator)
-
- template <class T> void
-ACE_Unbounded_Set_Iterator<T>::dump (void) const
-{
- // ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::dump");
-}
-
-template <class T>
-ACE_Unbounded_Set_Iterator<T>::ACE_Unbounded_Set_Iterator (ACE_Unbounded_Set<T> &s, int end)
- : current_ (end == 0 ? s.head_->next_ : s.head_ ),
- set_ (&s)
-{
- // ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::ACE_Unbounded_Set_Iterator");
-}
-
-template <class T> int
-ACE_Unbounded_Set_Iterator<T>::advance (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::advance");
- this->current_ = this->current_->next_;
- return this->current_ != this->set_->head_;
-}
-
-template <class T> int
-ACE_Unbounded_Set_Iterator<T>::first (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::first");
- this->current_ = this->set_->head_->next_;
- return this->current_ != this->set_->head_;
-}
-
-template <class T> int
-ACE_Unbounded_Set_Iterator<T>::done (void) const
-{
- ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::done");
-
- return this->current_ == this->set_->head_;
-}
-
-template <class T> int
-ACE_Unbounded_Set_Iterator<T>::next (T *&item)
-{
- // ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::next");
- if (this->current_ == this->set_->head_)
- return 0;
- else
- {
- item = &this->current_->item_;
- return 1;
- }
-}
-
-template <class T> ACE_Unbounded_Set_Iterator<T>
-ACE_Unbounded_Set_Iterator<T>::operator++ (int)
-{
- //ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator++ (int)");
- ACE_Unbounded_Set_Iterator<T> retv (*this);
-
- // postfix operator
-
- this->advance ();
- return retv;
-}
-
-template <class T> ACE_Unbounded_Set_Iterator<T>&
-ACE_Unbounded_Set_Iterator<T>::operator++ (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator++ (void)");
-
- // prefix operator
-
- this->advance ();
- return *this;
-}
-
-template <class T> T&
-ACE_Unbounded_Set_Iterator<T>::operator* (void)
-{
- //ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator*");
- T *retv = 0;
-
- int result = this->next (retv);
- ACE_ASSERT (result != 0);
- ACE_UNUSED_ARG (result);
-
- return *retv;
-}
-
-template <class T> int
-ACE_Unbounded_Set_Iterator<T>::operator== (const ACE_Unbounded_Set_Iterator<T> &rhs) const
-{
- //ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator==");
- return (this->set_ == rhs.set_ && this->current_ == rhs.current_);
-}
-
-template <class T> int
-ACE_Unbounded_Set_Iterator<T>::operator!= (const ACE_Unbounded_Set_Iterator<T> &rhs) const
-{
- //ACE_TRACE ("ACE_Unbounded_Set_Iterator<T>::operator!=");
- return (this->set_ != rhs.set_ || this->current_ != rhs.current_);
-}
-
-template <class T> void
-ACE_Unbounded_Stack_Iterator<T>::dump (void) const
-{
- // ACE_TRACE ("ACE_Unbounded_Stack_Iterator<T>::dump");
-}
-
-template <class T>
-ACE_Unbounded_Stack_Iterator<T>::ACE_Unbounded_Stack_Iterator (ACE_Unbounded_Stack<T> &q)
- : current_ (q.head_->next_),
- stack_ (q)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack_Iterator<T>::ACE_Unbounded_Stack_Iterator");
-}
-
-template <class T> int
-ACE_Unbounded_Stack_Iterator<T>::advance (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack_Iterator<T>::advance");
- this->current_ = this->current_->next_;
- return this->current_ != this->stack_.head_;
-}
-
-template <class T> int
-ACE_Unbounded_Stack_Iterator<T>::first (void)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack_Iterator<T>::first");
- this->current_ = this->stack_.head_->next_;
- return this->current_ != this->stack_.head_;
-}
-
-template <class T> int
-ACE_Unbounded_Stack_Iterator<T>::done (void) const
-{
- ACE_TRACE ("ACE_Unbounded_Stack_Iterator<T>::done");
-
- return this->current_ == this->stack_.head_;
-}
-
-template <class T> int
-ACE_Unbounded_Stack_Iterator<T>::next (T *&item)
-{
- // ACE_TRACE ("ACE_Unbounded_Stack_Iterator<T>::next");
- if (this->current_ == this->stack_.head_)
- return 0;
- else
- {
- item = &this->current_->item_;
- return 1;
- }
-}
-
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Ordered_MultiSet)
-
-
- template <class T>
-ACE_Ordered_MultiSet<T>::ACE_Ordered_MultiSet (ACE_Allocator *alloc)
- : head_ (0)
- , tail_ (0)
- , cur_size_ (0)
- , allocator_ (alloc)
-{
- // ACE_TRACE ("ACE_Ordered_MultiSet<T>::ACE_Ordered_MultiSet");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-}
-
-template <class T>
-ACE_Ordered_MultiSet<T>::ACE_Ordered_MultiSet (const ACE_Ordered_MultiSet<T> &us)
- : head_ (0)
- , tail_ (0)
- , cur_size_ (0)
- , allocator_ (us.allocator_)
-{
- ACE_TRACE ("ACE_Ordered_MultiSet<T>::ACE_Ordered_MultiSet");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- this->copy_nodes (us);
-}
-
-template <class T>
-ACE_Ordered_MultiSet<T>::~ACE_Ordered_MultiSet (void)
-{
- // ACE_TRACE ("ACE_Ordered_MultiSet<T>::~ACE_Ordered_MultiSet");
-
- this->delete_nodes ();
-}
-
-
-template <class T> void
-ACE_Ordered_MultiSet<T>::operator= (const ACE_Ordered_MultiSet<T> &us)
-{
- ACE_TRACE ("ACE_Ordered_MultiSet<T>::operator=");
-
- if (this != &us)
- {
- this->delete_nodes ();
- this->copy_nodes (us);
- }
-}
-
-
-template <class T> int
-ACE_Ordered_MultiSet<T>::insert (const T &item)
-{
- // ACE_TRACE ("ACE_Ordered_MultiSet<T>::insert");
-
- return this->insert_from (item, this->head_, 0);
-}
-
-template <class T> int
-ACE_Ordered_MultiSet<T>::insert (const T &item,
- ACE_Ordered_MultiSet_Iterator<T> &iter)
-{
- // ACE_TRACE ("ACE_Ordered_MultiSet<T>::insert using iterator");
-
- return this->insert_from (item, iter.current_, &iter.current_);
-}
-
-template <class T> int
-ACE_Ordered_MultiSet<T>::remove (const T &item)
-{
- // ACE_TRACE ("ACE_Ordered_MultiSet<T>::remove");
-
- ACE_DNode<T> *node = 0;
-
- int result = locate (item, 0, node);
-
- // if we found the node, remove from list and free it
- if (node && (result == 0))
- {
- if (node->prev_)
- {
- node->prev_->next_ = node->next_;
- }
- else
- {
- head_ = node->next_;
- }
-
- if (node->next_)
- {
- node->next_->prev_ = node->prev_;
- }
- else
- {
- tail_ = node->prev_;
- }
-
- this->cur_size_--;
-
- ACE_DES_FREE_TEMPLATE (node,
- this->allocator_->free,
- ACE_DNode,
- <T>);
- return 0;
- }
-
- return -1;
-}
-
-template <class T> int
-ACE_Ordered_MultiSet<T>::find (const T &item,
- ACE_Ordered_MultiSet_Iterator<T> &iter) const
-{
- // search an occurance of item, using iterator's current position as a hint
- ACE_DNode<T> *node = iter.current_;
- int result = locate (item, node, node);
-
- // if we found the node, update the iterator and indicate success
- if (node && (result == 0))
- {
- iter.current_ = node;
- return 0;
- }
-
- return -1;
-}
-
-
-
-template <class T> void
-ACE_Ordered_MultiSet<T>::reset (void)
-{
- ACE_TRACE ("reset");
-
- this->delete_nodes ();
-}
-
-template <class T> void
-ACE_Ordered_MultiSet<T>::dump (void) const
-{
- // ACE_TRACE ("ACE_Ordered_MultiSet<T>::dump");
- //
- // ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_ = %u"), this->head_));
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_->next_ = %u"), this->head_->next_));
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d\n"), this->cur_size_));
- //
- // T *item = 0;
- // size_t count = 1;
- //
- // for (ACE_Ordered_MultiSet_Iterator<T> iter (*(ACE_Ordered_MultiSet<T> *) this);
- // iter.next (item) != 0;
- // iter.advance ())
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("count = %d\n"), count++));
- //
- // ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class T> int
-ACE_Ordered_MultiSet<T>::insert_from (const T &item, ACE_DNode<T> *position,
- ACE_DNode<T> **new_position)
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::insert_tail");
-
- // create a new node
- ACE_DNode<T> *temp;
- ACE_NEW_MALLOC_RETURN (temp,
- (ACE_DNode<T>*) this->allocator_->malloc (sizeof (ACE_DNode<T>)),
- ACE_DNode<T> (item),
- -1);
- // obtain approximate location of the node
- int result = locate (item, position, position);
-
- // if there are nodes in the multiset
- if (position)
- {
- switch (result)
- {
- // insert after the approximate position
- case -1:
-
- // if there is a following node
- if (position->next_)
- {
- // link up with the following node
- position->next_->prev_ = temp;
- temp->next_ = position->next_;
- }
- else
- // appending to the end of the set
- tail_ = temp;
-
- // link up with the preceeding node
- temp->prev_ = position;
- position->next_ = temp;
-
- break;
-
- // insert before the position
- case 0:
- case 1:
-
- // if there is a preceeding node
- if (position->prev_)
- {
- // link up with the preceeding node
- position->prev_->next_ = temp;
- temp->prev_ = position->prev_;
- }
- else
- // prepending to the start of the set
- head_ = temp;
-
- // link up with the preceeding node
- temp->next_ = position;
- position->prev_ = temp;
-
- break;
-
- default:
- return -1;
- }
- }
- else
- {
- // point the head and tail to the new node.
- this->head_ = temp;
- this->tail_ = temp;
- }
-
- this->cur_size_++;
- if (new_position)
- *new_position = temp;
-
- return 0;
-}
-
-template <class T> int
-ACE_Ordered_MultiSet<T>::locate (const T &item, ACE_DNode<T> *start_position,
- ACE_DNode<T> *&new_position) const
-{
- if (! start_position)
- start_position = this->head_;
-
- // If starting before the item, move forward until at or just before
- // item.
- while (start_position && start_position->item_ < item &&
- start_position->next_)
- start_position = start_position->next_;
-
- // If starting after the item, move back until at or just after item
- while (start_position && item < start_position->item_ &&
- start_position->prev_)
- start_position = start_position->prev_;
-
- // Save the (approximate) location in the passed pointer.
- new_position = start_position;
-
- // Show the location is after (1), before (-1) , or at (0) the item
- if (!new_position)
- return 1;
- else if (item < new_position->item_)
- return 1;
- else if (new_position->item_ < item)
- return -1;
- else
- return 0;
-}
-
-// Looks for first occurance of <item> in the ordered set, using the
-// passed starting position as a hint: if there is such an instance,
-// it updates the new_position pointer to point to one such node and
-// returns 0; if there is no such node, then if there is a node before
-// where the item would have been, it updates the new_position pointer
-// to point to this node and returns -1; if there is no such node,
-// then if there is a node after where the item would have been, it
-// updates the new_position pointer to point to this node (or 0 if
-// there is no such node) and returns 1;
-
-template <class T> void
-ACE_Ordered_MultiSet<T>::copy_nodes (const ACE_Ordered_MultiSet<T> &us)
-{
- ACE_DNode<T> *insertion_point = this->head_;
-
- for (ACE_DNode<T> *curr = us.head_;
- curr != 0;
- curr = curr->next_)
- this->insert_from (curr->item_, insertion_point, &insertion_point);
-}
-
-template <class T> void
-ACE_Ordered_MultiSet<T>::delete_nodes (void)
-{
- // iterate through list, deleting nodes
- for (ACE_DNode<T> *curr = this->head_;
- curr != 0;
- )
- {
- ACE_DNode<T> *temp = curr;
- curr = curr->next_;
- ACE_DES_FREE_TEMPLATE (temp,
- this->allocator_->free,
- ACE_DNode,
- <T>);
- }
-
- this->head_ = 0;
- this->tail_ = 0;
- this->cur_size_ = 0;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Ordered_MultiSet_Iterator)
-
-template <class T>
-ACE_Ordered_MultiSet_Iterator<T>::ACE_Ordered_MultiSet_Iterator (ACE_Ordered_MultiSet<T> &s)
- : current_ (s.head_),
- set_ (s)
-{
- // ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::ACE_Ordered_MultiSet_Iterator");
-}
-
-template <class T> int
-ACE_Ordered_MultiSet_Iterator<T>::next (T *&item) const
-{
- // ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::next");
- if (this->current_)
- {
- item = &this->current_->item_;
- return 1;
- }
-
- return 0;
-}
-
-ACE_ALLOC_HOOK_DEFINE (ACE_DLList_Node)
-
-template <class T> T *
-ACE_DLList<T>::insert_tail (T *new_item)
-{
- ACE_DLList_Node *temp1, *temp2;
- ACE_NEW_MALLOC_RETURN (temp1,
- (ACE_DLList_Node *) this->allocator_->malloc (sizeof (ACE_DLList_Node)),
- ACE_DLList_Node ((void *&)new_item),
- 0);
- temp2 = ACE_DLList_Base::insert_tail (temp1);
- return (T *) (temp2 ? temp2->item_ : 0);
-}
-
-template <class T> T *
-ACE_DLList<T>::insert_head (T *new_item)
-{
- ACE_DLList_Node *temp1;
- ACE_NEW_MALLOC_RETURN (
- temp1,
- (ACE_DLList_Node *) this->allocator_->malloc (sizeof (ACE_DLList_Node)),
- ACE_DLList_Node ((void *&)new_item), 0);
- ACE_DLList_Node *temp2 =
- ACE_DLList_Base::insert_head (temp1);
- return (T *) (temp2 ? temp2->item_ : 0);
-}
-
-template <class T> T *
-ACE_DLList<T>::delete_head (void)
-{
- ACE_DLList_Node *temp1 = ACE_DLList_Base::delete_head ();
- T *temp2 = (T *) (temp1 ? temp1->item_ : 0);
- ACE_DES_FREE (temp1,
- this->allocator_->free,
- ACE_DLList_Node);
-
- return temp2;
-}
-
-template <class T> T *
-ACE_DLList<T>::delete_tail (void)
-{
- ACE_DLList_Node *temp1 = ACE_DLList_Base::delete_tail ();
- T *temp2 = (T *) (temp1 ? temp1->item_ : 0);
- ACE_DES_FREE (temp1,
- this->allocator_->free,
- ACE_DLList_Node);
- return temp2;
-}
-
-// Dynamically initialize an array.
-
-template <class T>
-ACE_Array_Base<T>::ACE_Array_Base (size_t size,
- ACE_Allocator *alloc)
- : max_size_ (size),
- cur_size_ (size),
- allocator_ (alloc)
-{
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- if (size != 0)
- {
- ACE_ALLOCATOR (this->array_,
- (T *) this->allocator_->malloc (size * sizeof (T)));
- for (size_t i = 0; i < size; ++i)
- new (&array_[i]) T;
- }
- else
- this->array_ = 0;
-}
-
-template <class T>
-ACE_Array_Base<T>::ACE_Array_Base (size_t size,
- const T &default_value,
- ACE_Allocator *alloc)
- : max_size_ (size),
- cur_size_ (size),
- allocator_ (alloc)
-{
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- if (size != 0)
- {
- ACE_ALLOCATOR (this->array_,
- (T *) this->allocator_->malloc (size * sizeof (T)));
- for (size_t i = 0; i < size; ++i)
- new (&array_[i]) T (default_value);
- }
- else
- this->array_ = 0;
-}
-
-// The copy constructor (performs initialization).
-
-template <class T>
-ACE_Array_Base<T>::ACE_Array_Base (const ACE_Array_Base<T> &s)
- : max_size_ (s.size ()),
- cur_size_ (s.size ()),
- allocator_ (s.allocator_)
-{
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- ACE_ALLOCATOR (this->array_,
- (T *) this->allocator_->malloc (s.size () * sizeof (T)));
- for (size_t i = 0; i < this->size (); i++)
- new (&this->array_[i]) T (s.array_[i]);
-}
-
-// Assignment operator (performs assignment).
-
-template <class T> void
-ACE_Array_Base<T>::operator= (const ACE_Array_Base<T> &s)
-{
- // Check for "self-assignment".
-
- if (this != &s)
- {
- if (this->max_size_ < s.size ())
- {
- ACE_DES_ARRAY_FREE (this->array_,
- this->max_size_,
- this->allocator_->free,
- T);
- ACE_ALLOCATOR (this->array_,
- (T *) this->allocator_->malloc (s.size () * sizeof (T)));
- this->max_size_ = s.size ();
- }
-
- this->cur_size_ = s.size ();
-
- for (size_t i = 0; i < this->size (); i++)
- new (&this->array_[i]) T (s.array_[i]);
- }
-}
-
-// Set an item in the array at location slot.
-
-template <class T> int
-ACE_Array_Base<T>::set (const T &new_item, size_t slot)
-{
- if (this->in_range (slot))
- {
- this->array_[slot] = new_item;
- return 0;
- }
- else
- return -1;
-}
-
-// Get an item in the array at location slot.
-
-template <class T> int
-ACE_Array_Base<T>::get (T &item, size_t slot) const
-{
- if (this->in_range (slot))
- {
- // Copies the item. If you don't want to copy, use operator []
- // instead (but then you'll be responsible for range checking).
- item = this->array_[slot];
- return 0;
- }
- else
- return -1;
-}
-
-template<class T> int
-ACE_Array_Base<T>::max_size (size_t new_size)
-{
- if (new_size > this->max_size_)
- {
- T *tmp;
-
- ACE_ALLOCATOR_RETURN (tmp,
- (T *) this->allocator_->malloc (new_size * sizeof (T)),
- -1);
- for (size_t i = 0; i < this->cur_size_; ++i)
- new (&tmp[i]) T (this->array_[i]);
-
- // Initialize the new portion of the array that exceeds the
- // previously allocated section.
- for (size_t j = this->cur_size_; j < new_size; j++)
- new (&tmp[j]) T;
-
- ACE_DES_ARRAY_FREE (this->array_,
- this->max_size_,
- this->allocator_->free,
- T);
- this->array_ = tmp;
- this->max_size_ = new_size;
- this->cur_size_ = new_size;
- }
-
- return 0;
-}
-
-template<class T> int
-ACE_Array_Base<T>::size (size_t new_size)
-{
- int r = this->max_size (new_size);
- if (r != 0)
- return r;
- this->cur_size_ = new_size;
- return 0;
-}
-
-// ****************************************************************
-
-// Compare this array with <s> for equality.
-
-template <class T> int
-ACE_Array<T>::operator== (const ACE_Array<T> &s) const
-{
- if (this == &s)
- return 1;
- else if (this->size () != s.size ())
- return 0;
-
- for (size_t slot = 0; slot < s.size (); slot++)
- if ((*this)[slot] != s[slot])
- return 0;
-
- return 1;
-}
-
-// ****************************************************************
-
-
-template <class T> int
-ACE_Array_Iterator<T>::next (T *&item)
-{
- // ACE_TRACE ("ACE_Array_Iterator<T>::next");
-
- if (this->done ())
- {
- item = 0;
- return 0;
- }
- else
- {
- item = &array_[current_];
- return 1;
- }
-}
-
-#endif /* ACE_CONTAINERS_T_C */
diff --git a/ace/Containers_T.h b/ace/Containers_T.h
deleted file mode 100644
index aac5f1115ac..00000000000
--- a/ace/Containers_T.h
+++ /dev/null
@@ -1,1845 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Containers_T.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_CONTAINERS_T_H
-#define ACE_CONTAINERS_T_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Need by ACE_DLList_Node.
-#include "ace/Containers.h"
-
-class ACE_Allocator;
-
-template <class T>
-class ACE_Bounded_Stack
-{
- // = TITLE
- // Implement a generic LIFO abstract data type.
- //
- // = DESCRIPTION
- // This implementation of a Stack uses a bounded array
- // that is allocated dynamically.
-public:
- // = Initialization, assignemnt, and termination methods.
-
- ACE_Bounded_Stack (size_t size);
- // Initialize a new stack so that it is empty.
- ACE_Bounded_Stack (const ACE_Bounded_Stack<T> &s);
- // The copy constructor (performs initialization).
-
- void operator= (const ACE_Bounded_Stack<T> &s);
- // Assignment operator (performs assignment).
-
- ~ACE_Bounded_Stack (void);
- // Perform actions needed when stack goes out of scope.
-
- // = Classic Stack operations.
-
- int push (const T &new_item);
- // Place a new item on top of the stack. Returns -1 if the stack
- // is already full, 0 if the stack is not already full, and -1 if
- // failure occurs.
-
- int pop (T &item);
- // Remove and return the top stack item. Returns -1 if the stack is
- // already empty, 0 if the stack is not already empty, and -1 if
- // failure occurs.
-
- int top (T &item) const;
- // Return top stack item without removing it. Returns -1 if the
- // stack is already empty, 0 if the stack is not already empty, and
- // -1 if failure occurs.
-
- // = Check boundary conditions.
-
- int is_empty (void) const;
- // Returns 1 if the container is empty, otherwise returns 0.
-
- int is_full (void) const;
- // Returns 1 if the container is full, otherwise returns 0.
-
- size_t size (void) const;
- // The number of items in the stack.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- size_t size_;
- // Size of the dynamically allocated data.
-
- size_t top_;
- // Keeps track of the current top of stack.
-
- T *stack_;
- // Holds the stack's contents.
-};
-
-//----------------------------------------
-
-template <class T, size_t ACE_SIZE>
-class ACE_Fixed_Stack
-{
- // = TITLE
- // Implement a generic LIFO abstract data type.
- //
- // = DESCRIPTION
- // This implementation of a Stack uses a fixed array
- // with the size fixed at instantiation time.
-public:
- // = Initialization, assignemnt, and termination methods.
- ACE_Fixed_Stack (void);
- // Initialize a new stack so that it is empty.
-
- ACE_Fixed_Stack (const ACE_Fixed_Stack<T, ACE_SIZE> &s);
- // The copy constructor (performs initialization).
-
- void operator= (const ACE_Fixed_Stack<T, ACE_SIZE> &s);
- // Assignment operator (performs assignment).
-
- ~ACE_Fixed_Stack (void);
- // Perform actions needed when stack goes out of scope.
-
- // = Classic Stack operations.
-
- int push (const T &new_item);
- // Place a new item on top of the stack. Returns -1 if the stack
- // is already full, 0 if the stack is not already full, and -1 if
- // failure occurs.
-
- int pop (T &item);
- // Remove and return the top stack item. Returns -1 if the stack is
- // already empty, 0 if the stack is not already empty, and -1 if
- // failure occurs.
-
- int top (T &item) const;
- // Return top stack item without removing it. Returns -1 if the
- // stack is already empty, 0 if the stack is not already empty, and
- // -1 if failure occurs.
-
- // = Check boundary conditions.
-
- int is_empty (void) const;
- // Returns 1 if the container is empty, otherwise returns 0.
-
- int is_full (void) const;
- // Returns 1 if the container is full, otherwise returns 0.
-
- size_t size (void) const;
- // The number of items in the stack.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- size_t size_;
- // Size of the allocated data.
-
- size_t top_;
- // Keeps track of the current top of stack.
-
- T stack_[ACE_SIZE];
- // Holds the stack's contents.
-};
-
-//----------------------------------------
-
-// Forward declarations.
-template <class T> class ACE_Unbounded_Set;
-template <class T> class ACE_Unbounded_Set_Iterator;
-template <class T> class ACE_Unbounded_Queue;
-template <class T> class ACE_Unbounded_Queue_Iterator;
-template <class T> class ACE_Unbounded_Stack;
-template <class T> class ACE_Unbounded_Stack_Iterator;
-template <class T> class ACE_Ordered_MultiSet;
-template <class T> class ACE_Ordered_MultiSet_Iterator;
-
-template<class T>
-class ACE_Node
-{
- // = TITLE
- // Implementation element in a Queue, Set, and Stack.
-public:
- friend class ACE_Unbounded_Queue<T>;
- friend class ACE_Unbounded_Queue_Iterator<T>;
- friend class ACE_Unbounded_Set<T>;
- friend class ACE_Unbounded_Set_Iterator<T>;
- friend class ACE_Unbounded_Stack<T>;
- friend class ACE_Unbounded_Stack_Iterator<T>;
-
-# if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
- ~ACE_Node (void);
- // This isn't necessary, but it keeps some compilers happy.
-# endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
-
-private:
- // = Initialization methods
- ACE_Node (const T &i, ACE_Node<T> *n);
- ACE_Node (ACE_Node<T> *n = 0, int = 0);
- ACE_Node (const ACE_Node<T> &n);
-
- ACE_Node<T> *next_;
- // Pointer to next element in the list of <ACE_Node>s.
-
- T item_;
- // Current value of the item in this node.
-};
-
-template<class T>
-class ACE_DNode
-{
- // = TITLE
- // Implementation element in a bilinked list.
- friend class ACE_Ordered_MultiSet<T>;
- friend class ACE_Ordered_MultiSet_Iterator<T>;
-
-public:
-
-# if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
- ~ACE_DNode (void);
- // This isn't necessary, but it keeps some compilers happy.
-# endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
-
-private:
-
- // = Initialization methods
- ACE_DNode (const T &i, ACE_DNode<T> *n = 0, ACE_DNode<T> *p = 0);
-
- ACE_DNode<T> *next_;
- // Pointer to next element in the list of <ACE_DNode>s.
-
- ACE_DNode<T> *prev_;
- // Pointer to previous element in the list of <ACE_DNode>s.
-
- T item_;
- // Current value of the item in this node.
-};
-
-
-template <class T>
-class ACE_Unbounded_Stack
-{
- // = TITLE
- // Implement a generic LIFO abstract data type.
- //
- // = DESCRIPTION
- // This implementation of an unbounded Stack uses a linked list.
- // If you use the <insert> or <remove> methods you should keep
- // in mind that duplicate entries aren't allowed. In general,
- // therefore, you should avoid the use of these methods since
- // they aren't really part of the ADT stack.
-public:
- friend class ACE_Unbounded_Stack_Iterator<T>;
-
- // Trait definition.
- typedef ACE_Unbounded_Stack_Iterator<T> ITERATOR;
-
- // = Initialization, assignemnt, and termination methods.
- ACE_Unbounded_Stack (ACE_Allocator *alloc = 0);
- // Initialize a new stack so that it is empty. Use user defined
- // allocation strategy if specified.
-
- ACE_Unbounded_Stack (const ACE_Unbounded_Stack<T> &s);
- // The copy constructor (performs initialization).
-
- void operator= (const ACE_Unbounded_Stack<T> &s);
- // Assignment operator (performs assignment).
-
- ~ACE_Unbounded_Stack (void);
- // Perform actions needed when stack goes out of scope.
-
- // = Classic Stack operations.
-
- int push (const T &new_item);
- // Place a new item on top of the stack. Returns -1 if the stack
- // is already full, 0 if the stack is not already full, and -1 if
- // failure occurs.
-
- int pop (T &item);
- // Remove and return the top stack item. Returns -1 if the stack is
- // already empty, 0 if the stack is not already empty, and -1 if
- // failure occurs.
-
- int top (T &item) const;
- // Return top stack item without removing it. Returns -1 if the
- // stack is already empty, 0 if the stack is not already empty, and
- // -1 if failure occurs.
-
- // = Check boundary conditions.
-
- int is_empty (void) const;
- // Returns 1 if the container is empty, otherwise returns 0.
-
- int is_full (void) const;
- // Returns 1 if the container is full, otherwise returns 0.
-
- // = Auxiliary methods (not strictly part of the Stack ADT).
-
- int insert (const T &new_item);
- // Insert <new_item> into the Stack at the head (but doesn't allow
- // duplicates). Returns -1 if failures occur, 1 if item is already
- // present (i.e., no duplicates are allowed), else 0.
-
- int remove (const T &item);
- // Remove <item> from the Stack. Returns 0 if it removes the item,
- // -1 if it can't find the item, and -1 if a failure occurs.
-
- int find (const T &item) const;
- // Finds if <item> occurs the set. Returns 0 if finds, else -1.
-
- size_t size (void) const;
- // The number of items in the stack.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- void delete_all_nodes (void);
- // Delete all the nodes in the stack.
-
- void copy_all_nodes (const ACE_Unbounded_Stack<T> &s);
- // Copy all nodes from <s> to <this>.
-
- ACE_Node<T> *head_;
- // Head of the linked list of Nodes.
-
- size_t cur_size_;
- // Current size of the stack.
-
- ACE_Allocator *allocator_;
- // Allocation strategy of the stack.
-};
-
-template <class T>
-class ACE_Unbounded_Stack_Iterator
-{
- // = TITLE
- // Implement an iterator over an unbounded Stack.
-public:
- // = Initialization method.
- ACE_Unbounded_Stack_Iterator (ACE_Unbounded_Stack<T> &stack);
- // Move to the first element in the <stack>.
-
- // = Iteration methods.
-
- int next (T *&next_item);
- // Pass back the <next_item> that hasn't been seen in the Stack.
- // Returns 0 when all items have been seen, else 1.
-
- int advance (void);
- // Move forward by one element in the Stack. Returns 0 when all the
- // items in the Stack have been seen, else 1.
-
- int first (void);
- // Move to the first element in the Stack. Returns 0 if the
- // Stack is empty, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Node<T> *current_;
- // Pointer to the current node in the iteration.
-
- ACE_Unbounded_Stack<T> &stack_;
- // Pointer to the Stack we're iterating over.
-};
-
-template <class T>
-class ACE_Unbounded_Queue;
-
-template <class T>
-class ACE_Unbounded_Queue_Iterator
-{
- // = TITLE
- // Implement an iterator over an unbounded queue.
-public:
- // = Initialization method.
- ACE_Unbounded_Queue_Iterator (ACE_Unbounded_Queue<T> &q, int end = 0);
-
- // = Iteration methods.
-
- int next (T *&next_item);
- // Pass back the <next_item> that hasn't been seen in the queue.
- // Returns 0 when all items have been seen, else 1.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the queue have been seen, else 1.
-
- int first (void);
- // Move to the first element in the queue. Returns 0 if the
- // queue is empty, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Node<T> *current_;
- // Pointer to the current node in the iteration.
-
- ACE_Unbounded_Queue<T> &queue_;
- // Pointer to the queue we're iterating over.
-};
-
-template <class T>
-class ACE_Unbounded_Queue
-{
- // = TITLE
- // A Queue of "infinite" length.
- //
- // = DESCRIPTION
- // This implementation of an unbounded queue uses a circular
- // linked list with a dummy node.
-public:
- friend class ACE_Unbounded_Queue_Iterator<T>;
-
- // Trait definition.
- typedef ACE_Unbounded_Queue_Iterator<T> ITERATOR;
-
- // = Initialization and termination methods.
- ACE_Unbounded_Queue (ACE_Allocator *alloc = 0);
- // construction. Use user specified allocation strategy
- // if specified.
-
- ACE_Unbounded_Queue (const ACE_Unbounded_Queue<T> &);
- // Copy constructor.
-
- void operator= (const ACE_Unbounded_Queue<T> &);
- // Assignment operator.
-
- ~ACE_Unbounded_Queue (void);
- // construction.
-
- // = Check boundary conditions.
-
- int is_empty (void) const;
- // Returns 1 if the container is empty, otherwise returns 0.
-
- int is_full (void) const;
- // Returns 1 if the container is full, otherwise returns 0.
-
- // = Classic queue operations.
-
- int enqueue_tail (const T &new_item);
- // Adds <new_item> to the tail of the queue. Returns 0 on success,
- // -1 on failure.
-
- int enqueue_head (const T &new_item);
- // Adds <new_item> to the head of the queue. Returns 0 on success,
- // -1 on failure.
-
- int dequeue_head (T &item);
- // Removes and returns the first <item> on the queue. Returns 0 on
- // success, -1 if the queue was empty.
-
- // = Additional utility methods.
-
- void reset (void);
- // Reset the <ACE_Unbounded_Queue> to be empty and release all its
- // dynamically allocated resources.
-
- int get (T *&item, size_t slot = 0) const;
- // Get the <slot>th element in the set. Returns -1 if the element
- // isn't in the range {0..<size> - 1}, else 0.
-
- int set (const T &item, size_t slot);
- // Set the <slot>th element in the set. Will pad out the set with
- // empty nodes if <slot> is beyond the range {0..<size> - 1}.
- // Returns -1 on failure, 0 if <slot> isn't initially in range, and
- // 0 otherwise.
-
- size_t size (void) const;
- // The number of items in the queue.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL-styled unidirectional iterator factory.
- ACE_Unbounded_Queue_Iterator<T> begin (void);
- ACE_Unbounded_Queue_Iterator<T> end (void);
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- void delete_nodes (void);
- // Delete all the nodes in the queue.
-
- void copy_nodes (const ACE_Unbounded_Queue<T> &);
- // Copy nodes into this queue.
-
- ACE_Node<T> *head_;
- // Pointer to the dummy node in the circular linked Queue.
-
- size_t cur_size_;
- // Current size of the queue.
-
- ACE_Allocator *allocator_;
- // Allocation Strategy of the queue.
-};
-
-template <class T>
-class ACE_Double_Linked_List;
-
-template <class T>
-class ACE_Double_Linked_List_Iterator_Base
-{
- // = TITLE
- // Implements a common base class for iterators for a double
- // linked list ADT
-public:
- // = Iteration methods.
-
- int next (T *&) const;
- // Passes back the <entry> under the iterator. Returns 0 if the
- // iteration has completed, otherwise 1
-
- T *next (void) const;
- // Return the address of next (current) unvisited item in the list.
- // 0 if there is no more element available.
- // DEPRECATED
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- T & operator* (void) const ;
- // STL-like iterator dereference operator: returns a reference
- // to the node underneath the iterator.
-
- void reset (ACE_Double_Linked_List<T> &);
- // Retasks the iterator to iterate over a new
- // Double_Linked_List. This allows clients to reuse an iterator
- // without incurring the constructor overhead. If you do use this,
- // be aware that if there are more than one reference to this
- // iterator, the other "clients" may be very bothered when their
- // iterator changes. @@ Here be dragons. Comments?
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Initialization methods.
-
- ACE_Double_Linked_List_Iterator_Base (ACE_Double_Linked_List<T> &);
- // Constructor
-
- ACE_Double_Linked_List_Iterator_Base (const
- ACE_Double_Linked_List_Iterator_Base<T>
- &iter);
- // Copy constructor.
-
- // = Iteration methods.
- int go_head (void);
- // Move to the first element of the list. Returns 0 if the list is
- // empty, else 1. Note: the head of the ACE_DLList is actually a
- // null entry, so the first element is actually the 2n'd entry
-
- int go_tail (void);
- // Move to the last element of the list. Returns 0 if the list is
- // empty, else 1.
-
- T *not_done (void) const ;
- // Check if we reach the end of the list. Can also be used to get
- // the *current* element in the list. Return the address of the
- // current item if there are still elements left , 0 if we run out
- // of element.
-
- T *do_advance (void);
- // Advance to the next element in the list. Return the address of the
- // next element if there are more, 0 otherwise.
-
- T *do_retreat (void);
- // Retreat to the previous element in the list. Return the address
- // of the previous element if there are more, 0 otherwise.
-
- void dump_i (void) const;
- // Dump the state of an object.
-
- T *current_;
- // Remember where we are.
-
- ACE_Double_Linked_List<T> *dllist_;
-};
-
-template <class T>
-class ACE_Double_Linked_List_Iterator : public ACE_Double_Linked_List_Iterator_Base <T>
-{
- // = TITLE
- // Implements an iterator for a double linked list ADT
- //
- // = DESCRIPTION
- // Iterate thru the double-linked list. This class provides
- // an interface that let users access the internal element
- // addresses directly. Notice <class T> must delcare
- // ACE_Double_Linked_List<T>,
- // ACE_Double_Linked_List_Iterator_Base <T> and
- // ACE_Double_Linked_List_Iterator as friend classes and class T
- // should also have data members T* next_ and T* prev_.
-public:
- // = Initialization method.
- ACE_Double_Linked_List_Iterator (ACE_Double_Linked_List<T> &);
-
- void reset (ACE_Double_Linked_List<T> &);
- // Retasks the iterator to iterate over a new
- // Double_Linked_List. This allows clients to reuse an iterator
- // without incurring the constructor overhead. If you do use this,
- // be aware that if there are more than one reference to this
- // iterator, the other "clients" may be very bothered when their
- // iterator changes.
- // @@ Here be dragons. Comments?
-
- int first (void);
- // Move to the first element in the list. Returns 0 if the
- // list is empty, else 1.
-
- int advance (void);
- // Move forward by one element in the list. Returns 0 when all the
- // items in the list have been seen, else 1.
-
- T* advance_and_remove (int dont_remove);
- // Advance the iterator while removing the original item from the
- // list. Return a pointer points to the original (removed) item.
- // If <dont_remove> equals 0, this function behaves like <advance>
- // but return 0 (NULL) instead.
-
- // = STL-style iteration methods
-
- ACE_Double_Linked_List_Iterator<T> & operator++ (void);
- // Prefix advance.
-
- ACE_Double_Linked_List_Iterator<T> operator++ (int);
- // Postfix advance.
-
- ACE_Double_Linked_List_Iterator<T> & operator-- (void);
- // Prefix reverse.
-
- ACE_Double_Linked_List_Iterator<T> operator-- (int);
- // Postfix reverse.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-template <class T>
-class ACE_Double_Linked_List_Reverse_Iterator : public ACE_Double_Linked_List_Iterator_Base <T>
-{
- // = TITLE
- // Implements a reverse iterator for a double linked list ADT
- //
- // = DESCRIPTION
- // Iterate backwards over the double-linked list. This class
- // provide an interface that let users access the internal
- // element addresses directly, which seems to break the
- // encapsulation. Notice <class T> must delcare
- // ACE_Double_Linked_List<T>,
- // ACE_Double_Linked_List_Iterator_Base <T> and
- // ACE_Double_Linked_List_Iterator as friend classes and class T
- // should also have data members T* next_ and T* prev_.
-public:
- // = Initialization method.
- ACE_Double_Linked_List_Reverse_Iterator (ACE_Double_Linked_List<T> &);
-
- void reset (ACE_Double_Linked_List<T> &);
- // Retasks the iterator to iterate over a new
- // Double_Linked_List. This allows clients to reuse an iterator
- // without incurring the constructor overhead. If you do use this,
- // be aware that if there are more than one reference to this
- // iterator, the other "clients" may be very bothered when their
- // iterator changes.
- // @@ Here be dragons. Comments?
-
- int first (void);
- // Move to the first element in the list. Returns 0 if the
- // list is empty, else 1.
-
- int advance (void);
- // Move forward by one element in the list. Returns 0 when all the
- // items in the list have been seen, else 1.
-
- T* advance_and_remove (int dont_remove);
- // Advance the iterator while removing the original item from the
- // list. Return a pointer points to the original (removed) item.
- // If <dont_remove> equals 0, this function behaves like <advance>
- // but return 0 (NULL) instead.
-
- // = STL-style iteration methods
-
- ACE_Double_Linked_List_Reverse_Iterator<T> & operator++ (void);
- // Prefix advance.
-
- ACE_Double_Linked_List_Reverse_Iterator<T> operator++ (int);
- // Postfix advance.
-
- ACE_Double_Linked_List_Reverse_Iterator<T> & operator-- (void);
- // Prefix reverse.
-
- ACE_Double_Linked_List_Reverse_Iterator<T> operator-- (int);
- // Postfix reverse.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-template <class T>
-class ACE_Double_Linked_List
-{
- // = TITLE
- // A double-linked list implementation.
- //
- // = DESCRIPTION
- // This implementation of an unbounded double-linked list uses a
- // circular linked list with a dummy node. It is pretty much
- // like the <ACE_Unbounded_Queue> except that it allows removing
- // of a specific element from a specific location.
- //
- // Notice that this class is an implementation of a very simply
- // data structure.is *NOT* a container class. You can use the
- // class to implement other contains classes but it is *NOT* a
- // general purpose container class.
- //
- // The parameter class *MUST* has members T* prev and T* next
- // and users of this class are responsible to follow the general
- // rules of using double-linked lists to maintaining the list
- // integrities.
- //
- // If you need a double linked container class, check out the
- // DLList class in this file.
-public:
- friend class ACE_Double_Linked_List_Iterator_Base<T>;
- friend class ACE_Double_Linked_List_Iterator<T>;
- friend class ACE_Double_Linked_List_Reverse_Iterator<T>;
-
- // Trait definition.
- typedef ACE_Double_Linked_List_Iterator<T> ITERATOR;
- typedef ACE_Double_Linked_List_Reverse_Iterator<T> REVERSE_ITERATOR;
-
- // = Initialization and termination methods.
- ACE_Double_Linked_List (ACE_Allocator *alloc = 0);
- // construction. Use user specified allocation strategy
- // if specified.
-
- ACE_Double_Linked_List (ACE_Double_Linked_List<T> &);
- // Copy constructor.
-
- void operator= (ACE_Double_Linked_List<T> &);
- // Assignment operator.
-
- ~ACE_Double_Linked_List (void);
- // Destructor.
-
- // = Check boundary conditions.
-
- int is_empty (void) const;
- // Returns 1 if the container is empty, otherwise returns 0.
-
- int is_full (void) const;
- // Returns 1 if the container is full, otherwise returns 0.
-
- // = Classic queue operations.
-
- T *insert_tail (T *new_item);
- // Adds <new_item> to the tail of the list. Returns the new item
- // that was inserted.
-
- T *insert_head (T *new_item);
- // Adds <new_item> to the head of the list.Returns the new item that
- // was inserted.
-
- T* delete_head (void);
- // Removes and returns the first <item> in the list. Returns
- // internal node's address on success, 0 if the queue was empty.
- // This method will *not* free the internal node.
-
- T *delete_tail (void);
- // Removes and returns the last <item> in the list. Returns
- // internal nodes's address on success, 0 if the queue was
- // empty. This method will *not* free the internal node.
-
- // = Additional utility methods.
-
- void reset (void);
- // Reset the <ACE_Double_Linked_List> to be empty.
- // Notice that since no one is interested in the items within,
- // This operation will delete all items.
-
- int get (T *&item, size_t slot = 0);
- // Get the <slot>th element in the set. Returns -1 if the element
- // isn't in the range {0..<size> - 1}, else 0.
-
- size_t size (void) const;
- // The number of items in the queue.
-
- void dump (void) const;
- // Dump the state of an object.
-
- int remove (T *n);
- // Use DNode address directly.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- void delete_nodes (void);
- // Delete all the nodes in the list.
-
- void copy_nodes (ACE_Double_Linked_List<T> &);
- // Copy nodes into this list.
-
- void init_head (void);
- // Setup header pointer. Called after we create the head node in ctor.
-
- int insert_element (T *new_item,
- int before = 0,
- T *old_item = 0);
- // Insert a <new_element> into the list. It will be added before
- // or after <old_item>. Default is to insert the new item *after*
- // <head_>. Return 0 if succeed, -1 if error occured.
-
- int remove_element (T *item);
- // Remove an <item> from the list. Return 0 if succeed, -1 otherwise.
- // Notice that this function checks if item is <head_> and either its
- // <next_> or <prev_> is NULL. The function resets item's <next_> and
- // <prev_> to 0 to prevent clobbering the double-linked list if a user
- // tries to remove the same node again.
-
- T *head_;
- // Head of the circular double-linked list.
-
- size_t size_;
- // Size of this list.
-
- ACE_Allocator *allocator_;
- // Allocation Strategy of the queue.
-};
-
-
-template <class T> class ACE_DLList;
-template <class T> class ACE_DLList_Iterator;
-template <class T> class ACE_DLList_Reverse_Iterator;
-
-typedef ACE_Double_Linked_List<ACE_DLList_Node> ACE_DLList_Base;
-
-//typedef ACE_Double_Linked_List_Iterator <ACE_DLList_Node>
-// ACE_DLList_Iterator_Base;
-//typedef ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>
-// ACE_DLList_Reverse_Iterator_Base;
-//@@ These two typedefs (inherited from James Hu's original design)
-// have been removed because Sun CC 4.2 had problems with it. I guess
-// having the DLList_Iterators inheriting from a class which is
-// actually a typedef leads to problems. #define'ing rather than
-// typedef'ing worked, but as per Carlos's reccomendation, I'm just
-// replacing all references to the base classes with their actual
-// type. Matt Braun (6/15/99)
-
-template <class T>
-class ACE_DLList : public ACE_DLList_Base
-{
- // = TITLE
- // A double-linked list container class.
- //
- // = DESCRIPTION
- // This implementation uses ACE_Double_Linked_List to perform
- // the logic behind this container class. It delegates all of its
- // calls to ACE_Double_Linked_List.
-
- friend class ACE_DLList_Node;
- friend class ACE_Double_Linked_List_Iterator<T>;
- friend class ACE_DLList_Iterator<T>;
- friend class ACE_DLList_Reverse_Iterator<T>;
-
-public:
-
- void operator= (ACE_DLList<T> &l);
- // Delegates to ACE_Double_Linked_List.
-
- // = Classic queue operations.
-
- T *insert_tail (T *new_item);
- // Delegates to ACE_Double_Linked_List.
-
- T *insert_head (T *new_item);
- // Delegates to ACE_Double_Linked_List.
-
- T *delete_head (void);
- // Delegates to ACE_Double_Linked_List.
-
- T *delete_tail (void);
- // Delegates to ACE_Double_Linked_List.
-
- // = Additional utility methods.
-
- int get (T *&item, size_t slot = 0);
- // Delegates to <ACE_Double_Linked_List>, but where
- // <ACE_Double_Linked_List> returns the node as the item, this get
- // returns the contents of the node in item.
-
- void dump (void) const;
- // Delegates to ACE_Double_Linked_List.
-
- int remove (ACE_DLList_Node *n);
- // Delegates to ACE_Double_Linked_List.
-
-
- // = Initialization and termination methods.
-
- ACE_DLList (ACE_Allocator *alloc = 0);
- // Delegates to ACE_Double_Linked_List.
-
- ACE_DLList (ACE_DLList<T> &l);
- // Delegates to ACE_Double_Linked_List.
-
- ~ACE_DLList (void);
- // Deletes the list starting from the head.
-};
-
-template <class T>
-class ACE_DLList_Iterator : public ACE_Double_Linked_List_Iterator <ACE_DLList_Node>
-{
- // = TITLE
- // A double-linked list container class iterator.
- //
- // = DESCRIPTION
- // This implementation uses ACE_Double_Linked_List_Iterator to
- // perform the logic behind this container class. It delegates
- // all of its calls to ACE_Double_Linked_List_Iterator.
-
- friend class ACE_DLList<T>;
- friend class ACE_DLList_Node;
-
-public:
-
- // = Initialization method.
- ACE_DLList_Iterator (ACE_DLList<T> &l);
-
- void reset (ACE_DLList<T> &l);
- // Retasks the iterator to iterate over a new
- // Double_Linked_List. This allows clients to reuse an iterator
- // without incurring the constructor overhead. If you do use this,
- // be aware that if there are more than one reference to this
- // iterator, the other "clients" may be very bothered when their
- // iterator changes.
- // @@ Here be dragons. Comments?
-
- // = Iteration methods.
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- int next (T *&);
- // Pass back the <next_item> that hasn't been seen in the Stack.
- // Returns 0 when all items have been seen, else 1.
-
- T *next (void) const;
- // Delegates to ACE_Double_Linked_List_Iterator, except that whereas
- // the Double_Linked_List version of next returns the node, this next
- // returns the contents of the node
- // DEPRECATED
-
- int remove (void);
- // Removes the current item (i.e., <next>) from the list.
-
- void dump (void) const;
- // Delegates to ACE_Double_Linked_List_Iterator.
-
-private:
- ACE_DLList<T> *list_;
-};
-
-template <class T>
-class ACE_DLList_Reverse_Iterator : public ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>
-{
- // = TITLE
- // A double-linked list container class iterator.
- //
- // = DESCRIPTION
- // This implementation uses ACE_Double_Linked_List_Iterator to
- // perform the logic behind this container class. It delegates
- // all of its calls to ACE_Double_Linked_List_Iterator.
-
- friend class ACE_DLList<T>;
- friend class ACE_DLList_Node;
-
-public:
-
- // = Initialization method.
- ACE_DLList_Reverse_Iterator (ACE_DLList<T> &l);
-
- void reset (ACE_DLList<T> &l);
- // Retasks the iterator to iterate over a new
- // Double_Linked_List. This allows clients to reuse an iterator
- // without incurring the constructor overhead. If you do use this,
- // be aware that if there are more than one reference to this
- // iterator, the other "clients" may be very bothered when their
- // iterator changes.
- // @@ Here be dragons. Comments?
-
- // = Iteration methods.
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- int next (T *&);
- // Pass back the <next_item> that hasn't been seen in the Stack.
- // Returns 0 when all items have been seen, else 1.
-
- T *next (void) const;
- // Delegates to ACE_Double_Linked_List_Iterator.
- // DEPRECATED
-
- int remove (void);
- // Removes the current item (i.e., <next>) from the list.
-
- void dump (void) const;
- // Delegates to ACE_Double_Linked_List_Iterator.
-
-private:
- ACE_DLList<T> *list_;
-};
-
-template <class T>
-class ACE_Unbounded_Set_Iterator
-{
- // = TITLE
- // Implement an iterator over an unbounded set.
-public:
- // = Initialization method.
- ACE_Unbounded_Set_Iterator (ACE_Unbounded_Set<T> &s, int end = 0);
-
- // = Iteration methods.
-
- int next (T *&next_item);
- // Pass back the <next_item> that hasn't been seen in the Set.
- // Returns 0 when all items have been seen, else 1.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- int first (void);
- // Move to the first element in the set. Returns 0 if the
- // set is empty, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL styled iteration, compare, and reference functions.
-
- ACE_Unbounded_Set_Iterator<T> operator++ (int);
- // Postfix advance.
-
- ACE_Unbounded_Set_Iterator<T>& operator++ (void);
- // Prefix advance.
-
- T& operator* (void);
- // Returns a reference to the interal element <this> is pointing to.
-
- int operator== (const ACE_Unbounded_Set_Iterator<T> &) const;
- int operator!= (const ACE_Unbounded_Set_Iterator<T> &) const;
- // Check if two iterators point to the same position
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
-
- ACE_Node<T> *current_;
- // Pointer to the current node in the iteration.
-
- ACE_Unbounded_Set<T> *set_;
- // Pointer to the set we're iterating over.
-};
-
-template <class T>
-class ACE_Unbounded_Set
-{
- // = TITLE
- // Implement a simple unordered set of <T> of unbounded size.
- //
- // = DESCRIPTION
- // This implementation of an unordered set uses a circular
- // linked list with a dummy node. This implementation does not
- // allow duplicates, but it maintains FIFO ordering of insertions.
-public:
- friend class ACE_Unbounded_Set_Iterator<T>;
-
- // Trait definition.
- typedef ACE_Unbounded_Set_Iterator<T> ITERATOR;
- typedef ACE_Unbounded_Set_Iterator<T> iterator;
-
- // = Initialization and termination methods.
- ACE_Unbounded_Set (ACE_Allocator *alloc = 0);
- // Constructor. Use user specified allocation strategy
- // if specified.
-
- ACE_Unbounded_Set (const ACE_Unbounded_Set<T> &);
- // Copy constructor.
-
- void operator= (const ACE_Unbounded_Set<T> &);
- // Assignment operator.
-
- ~ACE_Unbounded_Set (void);
- // Destructor.
-
- // = Check boundary conditions.
-
- int is_empty (void) const;
- // Returns 1 if the container is empty, otherwise returns 0.
-
- int is_full (void) const;
- // Returns 1 if the container is full, otherwise returns 0.
-
- // = Classic unordered set operations.
-
- int insert (const T &new_item);
- // Insert <new_item> into the set (doesn't allow duplicates).
- // Returns -1 if failures occur, 1 if item is already present, else
- // 0.
-
- int remove (const T &item);
- // Remove first occurrence of <item> from the set. Returns 0 if
- // it removes the item, -1 if it can't find the item, and -1 if a
- // failure occurs.
-
- int find (const T &item) const;
- // Finds if <item> occurs in the set. Returns 0 if find succeeds,
- // else -1.
-
- size_t size (void) const;
- // Size of the set.
-
- void dump (void) const;
- // Dump the state of an object.
-
- void reset (void);
- // Reset the <ACE_Unbounded_Set> to be empty.
-
- // = STL-styled unidirectional iterator factory.
- ACE_Unbounded_Set_Iterator<T> begin (void);
- ACE_Unbounded_Set_Iterator<T> end (void);
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int insert_tail (const T &item);
- // Insert <item> at the tail of the set (doesn't check for
- // duplicates).
-
- void delete_nodes (void);
- // Delete all the nodes in the Set.
-
- void copy_nodes (const ACE_Unbounded_Set<T> &);
- // Copy nodes into this set.
-
- ACE_Node<T> *head_;
- // Head of the linked list of Nodes.
-
- size_t cur_size_;
- // Current size of the set.
-
- ACE_Allocator *allocator_;
- // Allocation strategy of the set.
-};
-
-// Forward declaration.
-template <class T, size_t ACE_SIZE>
-class ACE_Fixed_Set;
-
-template <class T, size_t ACE_SIZE>
-class ACE_Fixed_Set_Iterator
-{
- // = TITLE
- // Interates through an unordered set.
- //
- // = DESCRIPTION
- // This implementation of an unordered set uses a fixed array.
- // Allows deletions while iteration is occurring.
-public:
- // = Initialization method.
- ACE_Fixed_Set_Iterator (ACE_Fixed_Set<T, ACE_SIZE> &s);
-
- // = Iteration methods.
-
- int next (T *&next_item);
- // Pass back the <next_item> that hasn't been seen in the Set.
- // Returns 0 when all items have been seen, else 1.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- int first (void);
- // Move to the first element in the set. Returns 0 if the
- // set is empty, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Fixed_Set<T, ACE_SIZE> &s_;
- // Set we are iterating over.
-
- ssize_t next_;
- // How far we've advanced over the set.
-};
-
-template <class T, size_t ACE_SIZE>
-class ACE_Fixed_Set
-{
- // = TITLE
- // Implement a simple unordered set of <T> with maximum <ACE_SIZE>.
- //
- // = DESCRIPTION
- // This implementation of an unordered set uses a fixed array.
- // This implementation does not allow duplicates...
-public:
- friend class ACE_Fixed_Set_Iterator<T, ACE_SIZE>;
-
- // Trait definition.
- typedef ACE_Fixed_Set_Iterator<T, ACE_SIZE> ITERATOR;
-
- // = Initialization and termination methods.
- ACE_Fixed_Set (void);
- // Constructor.
-
- ACE_Fixed_Set (const ACE_Fixed_Set<T, ACE_SIZE> &);
- // Copy constructor.
-
- void operator= (const ACE_Fixed_Set<T, ACE_SIZE> &);
- // Assignment operator.
-
- ~ACE_Fixed_Set (void);
- // Destructor.
-
- // = Check boundary conditions.
-
- int is_empty (void) const;
- // Returns 1 if the container is empty, otherwise returns 0.
-
- int is_full (void) const;
- // Returns 1 if the container is full, otherwise returns 0.
-
- // = Classic unordered set operations.
-
- int insert (const T &new_item);
- // Insert <new_item> into the set (doesn't allow duplicates).
- // Returns -1 if failures occur, 1 if item is already present, else
- // 0.
-
- int remove (const T &item);
- // Remove first occurrence of <item> from the set. Returns 0 if
- // it removes the item, -1 if it can't find the item, and -1 if a
- // failure occurs.
-
- int find (const T &item) const;
- // Finds if <item> occurs in the set. Returns 0 if finds, else -1.
-
- size_t size (void) const;
- // Size of the set.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- struct
- {
- T item_;
- // Item in the set.
-
- int is_free_;
- // Keeps track of whether this item is in use or not.
- } search_structure_[ACE_SIZE];
- // Holds the contents of the set.
-
- size_t cur_size_;
- // Current size of the set.
-
- size_t max_size_;
- // Maximum size of the set.
-};
-
-// Forward declaration.
-template <class T>
-class ACE_Bounded_Set;
-
-template <class T>
-class ACE_Bounded_Set_Iterator
-{
- // = TITLE
- // Interates through an unordered set.
- //
- // = DESCRIPTION
- // This implementation of an unordered set uses a Bounded array.
- // Allows deletions while iteration is occurring.
-public:
- // = Initialization method.
- ACE_Bounded_Set_Iterator (ACE_Bounded_Set<T> &s);
-
- // = Iteration methods.
-
- int next (T *&next_item);
- // Pass back the <next_item> that hasn't been seen in the Set.
- // Returns 0 when all items have been seen, else 1.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- int first (void);
- // Move to the first element in the set. Returns 0 if the
- // set is empty, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Bounded_Set<T> &s_;
- // Set we are iterating over.
-
- ssize_t next_;
- // How far we've advanced over the set.
-};
-
-template <class T>
-class ACE_Bounded_Set
-{
- // = TITLE
- // Implement a simple unordered set of <T> with maximum
- // set at creation time.
- //
- // = DESCRIPTION
- // This implementation of an unordered set uses a Bounded array.
- // This implementation does not allow duplicates...
-public:
- friend class ACE_Bounded_Set_Iterator<T>;
-
- // Trait definition.
- typedef ACE_Bounded_Set_Iterator<T> ITERATOR;
-
- enum
- {
- DEFAULT_SIZE = 10
- };
-
- // = Initialization and termination methods.
- ACE_Bounded_Set (void);
- // Constructor.
-
- ACE_Bounded_Set (size_t size);
- // Constructor.
-
- ACE_Bounded_Set (const ACE_Bounded_Set<T> &);
- // Copy constructor.
-
- void operator= (const ACE_Bounded_Set<T> &);
- // Assignment operator.
-
- ~ACE_Bounded_Set (void);
- // Destructor
-
- // = Check boundary conditions.
-
- int is_empty (void) const;
- // Returns 1 if the container is empty, otherwise returns 0.
-
- int is_full (void) const;
- // Returns 1 if the container is full, otherwise returns 0.
-
- // = Classic unordered set operations.
-
- int insert (const T &new_item);
- // Insert <new_item> into the set (doesn't allow duplicates).
- // Returns -1 if failures occur, 1 if item is already present, else
- // 0.
-
- int remove (const T &item);
- // Remove first occurrence of <item> from the set. Returns 0 if it
- // removes the item, -1 if it can't find the item, and -1 if a
- // failure occurs.
-
- int find (const T &item) const;
- // Finds if <item> occurs in the set. Returns 0 if finds, else -1.
-
- size_t size (void) const;
- // Size of the set.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- struct Search_Structure
- {
- T item_;
- // Item in the set.
-
- int is_free_;
- // Keeps track of whether this item is in use or not.
- };
-
- Search_Structure *search_structure_;
- // Holds the contents of the set.
-
- size_t cur_size_;
- // Current size of the set.
-
- size_t max_size_;
- // Maximum size of the set.
-};
-
-template <class T>
-class ACE_Ordered_MultiSet_Iterator
-{
- // = TITLE
- // Implement a bidirectional iterator over an ordered multiset.
- // This class template requires that < operator semantics be
- // defined for the parameterized type <T>, but does not impose
- // any restriction on how that ordering operator is implemented.
-public:
- friend class ACE_Ordered_MultiSet<T>;
-
- // = Initialization method.
- ACE_Ordered_MultiSet_Iterator (ACE_Ordered_MultiSet<T> &s);
-
- // = Iteration methods.
-
- int next (T *&next_item) const;
- // Pass back the <next_item> that hasn't been seen in the ordered multiset.
- // Returns 0 when all items have been seen, else 1.
-
- int first (void);
- // Repositions the iterator at the first item in the ordered multiset
- // Returns 0 if the list is empty else 1.
-
- int last (void);
- // Repositions the iterator at the last item in the ordered multiset
- // Returns 0 if the list is empty else 1.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- int retreat (void);
- // Move backward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
-
- ACE_DNode<T> *current_;
- // Pointer to the current node in the iteration.
-
- ACE_Ordered_MultiSet<T> &set_;
- // Pointer to the set we're iterating over.
-};
-
-template <class T>
-class ACE_Ordered_MultiSet
-{
- // = TITLE
- // Implement a simple ordered multiset of <T> of unbounded size.
- // This class template requires that < operator semantics be
- // defined for the parameterized type <T>, but does not impose
- // any restriction on how that ordering operator is implemented.
- //
- // = DESCRIPTION
- // This implementation of an unordered set uses a circular
- // linked list with a dummy node. This implementation does not
- // allow duplicates, but it maintains FIFO ordering of
- // insertions.
-public:
- friend class ACE_Ordered_MultiSet_Iterator<T>;
-
- // Trait definition.
- typedef ACE_Ordered_MultiSet_Iterator<T> ITERATOR;
-
- // = Initialization and termination methods.
- ACE_Ordered_MultiSet (ACE_Allocator *alloc = 0);
- // Constructor. Use user specified allocation strategy
- // if specified.
-
- ACE_Ordered_MultiSet (const ACE_Ordered_MultiSet<T> &);
- // Copy constructor.
-
- ~ACE_Ordered_MultiSet (void);
- // Destructor.
-
- void operator= (const ACE_Ordered_MultiSet<T> &);
- // Assignment operator.
-
- // = Check boundary conditions.
-
- int is_empty (void) const;
- // Returns 1 if the container is empty, otherwise returns 0.
-
- size_t size (void) const;
- // Size of the set.
-
- // = Classic unordered set operations.
-
- int insert (const T &new_item);
- // Insert <new_item> into the ordered multiset.
- // Returns -1 if failures occur, else 0.
-
- int insert (const T &new_item, ITERATOR &iter);
- // Insert <new_item> into the ordered multiset, starting its search at
- // the node pointed to by the iterator, and if insetion was successful,
- // updates the iterator to point to the newly inserted node.
- // Returns -1 if failures occur, else 0.
-
- int remove (const T &item);
- // Remove first occurrence of <item> from the set. Returns 0 if
- // it removes the item, -1 if it can't find the item.
-
- int find (const T &item, ITERATOR &iter) const;
- // Finds first occurrance of <item> in the multiset, using the iterator's
- // current position as a hint to improve performance. If find succeeds,
- // it positions the iterator at that node and returns 0, or if it cannot
- // locate the node, it leaves the iterator alone and just returns -1.
-
- void reset (void);
- // Reset the <ACE_Ordered_MultiSet> to be empty.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
-
- int insert_from (const T &item, ACE_DNode<T> *start_position,
- ACE_DNode<T> **new_position);
- // Insert <item>, starting its search at the position given,
- // and if successful updates the passed pointer to point to
- // the newly inserted item's node.
-
- int locate (const T &item, ACE_DNode<T> *start_position,
- ACE_DNode<T> *&new_position) const;
- // looks for first occurance of <item> in the ordered set, using the
- // passed starting position as a hint: if there is such an instance, it
- // updates the new_position pointer to point to this node and returns 0;
- // if there is no such node, then if there is a node before where the
- // item would have been, it updates the new_position pointer to point
- // to this node and returns -1; if there is no such node, then if there
- // is a node after where the item would have been, it updates the
- // new_position pointer to point to this node (or 0 if there is no such
- // node) and returns 1;
-
- void delete_nodes (void);
- // Delete all the nodes in the Set.
-
- void copy_nodes (const ACE_Ordered_MultiSet<T> &);
- // Copy nodes into this set.
-
- ACE_DNode<T> *head_;
- // Head of the bilinked list of Nodes.
-
- ACE_DNode<T> *tail_;
- // Head of the bilinked list of Nodes.
-
- size_t cur_size_;
- // Current size of the set.
-
- ACE_Allocator *allocator_;
- // Allocation strategy of the set.
-};
-
-// ****************************************************************
-
-// Forward declaration.
-template <class T> class ACE_Array_Iterator;
-
-template<class T>
-class ACE_Array_Base
-{
- // = TITLE
- // Implement a simple dynamic array
- //
- // = DESCRIPTION
- // This parametric class implements a simple dynamic array;
- // resizing must be controlled by the user. No comparison or find
- // operations are implemented.
- //
-public:
-
- // Define a "trait"
- typedef T TYPE;
- typedef ACE_Array_Iterator<T> ITERATOR;
-
- // = Initialization and termination methods.
-
- ACE_Array_Base (size_t size = 0,
- ACE_Allocator *alloc = 0);
- // Dynamically create an uninitialized array.
-
- ACE_Array_Base (size_t size,
- const T &default_value,
- ACE_Allocator *alloc = 0);
- // Dynamically initialize the entire array to the <default_value>.
-
- ACE_Array_Base (const ACE_Array_Base<T> &s);
- // The copy constructor performs initialization by making an exact
- // copy of the contents of parameter <s>, i.e., *this == s will
- // return true.
-
- void operator= (const ACE_Array_Base<T> &s);
- // Assignment operator performs an assignment by making an exact
- // copy of the contents of parameter <s>, i.e., *this == s will
- // return true. Note that if the <max_size_> of <array_> is >= than
- // <s.max_size_> we can copy it without reallocating. However, if
- // <max_size_> is < <s.max_size_> we must delete the <array_>,
- // reallocate a new <array_>, and then copy the contents of <s>.
-
- ~ACE_Array_Base (void);
- // Clean up the array (e.g., delete dynamically allocated memory).
-
- // = Set/get methods.
-
- T &operator [] (size_t slot);
- // Set item in the array at location <slot>. Doesn't
- // perform range checking.
-
- const T &operator [] (size_t slot) const;
- // Get item in the array at location <slot>. Doesn't
- // perform range checking.
-
- int set (const T &new_item, size_t slot);
- // Set an item in the array at location <slot>. Returns
- // -1 if <slot> is not in range, else returns 0.
-
- int get (T &item, size_t slot) const;
- // Get an item in the array at location <slot>. Returns -1 if
- // <slot> is not in range, else returns 0. Note that this function
- // copies the item. If you want to avoid the copy, you can use
- // the const operator [], but then you'll be responsible for range checking.
-
- size_t size (void) const;
- // Returns the <cur_size_> of the array.
-
- int size (size_t new_size);
- // Changes the size of the array to match <new_size>.
- // It copies the old contents into the new array.
- // Return -1 on failure.
-
- size_t max_size (void) const;
- // Returns the <max_size_> of the array.
-
- int max_size (size_t new_size);
- // Changes the size of the array to match <new_size>.
- // It copies the old contents into the new array.
- // Return -1 on failure.
- // It does not affect new_size
-
-private:
- int in_range (size_t slot) const;
- // Returns 1 if <slot> is within range, i.e., 0 >= <slot> <
- // <cur_size_>, else returns 0.
-
- size_t max_size_;
- // Maximum size of the array, i.e., the total number of <T> elements
- // in <array_>.
-
- size_t cur_size_;
- // Current size of the array. This starts out being == to
- // <max_size_>. However, if we are assigned a smaller array, then
- // <cur_size_> will become less than <max_size_>. The purpose of
- // keeping track of both sizes is to avoid reallocating memory if we
- // don't have to.
-
- T *array_;
- // Pointer to the array's storage buffer.
-
- ACE_Allocator *allocator_;
- // Allocation strategy of the ACE_Array_Base.
-
- friend class ACE_Array_Iterator<T>;
-};
-
-// ****************************************************************
-
-template <class T>
-class ACE_Array : public ACE_Array_Base<T>
-{
- // = TITLE
- // Implement a dynamic array class.
- //
- // = DESCRIPTION
- // This class extends ACE_Array_Base, it provides comparison
- // operators.
-public:
- // Define a "trait"
- typedef T TYPE;
-
- typedef ACE_Array_Iterator<T> ITERATOR;
-
- // = Exceptions.
-
- // = Initialization and termination methods.
-
- ACE_Array (size_t size = 0,
- ACE_Allocator* alloc = 0);
- // Dynamically create an uninitialized array.
-
- ACE_Array (size_t size,
- const T &default_value,
- ACE_Allocator* alloc = 0);
- // Dynamically initialize the entire array to the <default_value>.
-
- ACE_Array (const ACE_Array<T> &s);
- // The copy constructor performs initialization by making an exact
- // copy of the contents of parameter <s>, i.e., *this == s will
- // return true.
-
- void operator= (const ACE_Array<T> &s);
- // Assignment operator performs an assignment by making an exact
- // copy of the contents of parameter <s>, i.e., *this == s will
- // return true. Note that if the <max_size_> of <array_> is >= than
- // <s.max_size_> we can copy it without reallocating. However, if
- // <max_size_> is < <s.max_size_> we must delete the <array_>,
- // reallocate a new <array_>, and then copy the contents of <s>.
-
- // = Compare operators
-
- int operator== (const ACE_Array<T> &s) const;
- // Compare this array with <s> for equality. Two arrays are equal
- // if their <size>'s are equal and all the elements from 0 .. <size>
- // are equal.
-
- int operator!= (const ACE_Array<T> &s) const;
- // Compare this array with <s> for inequality such that <*this> !=
- // <s> is always the complement of the boolean return value of
- // <*this> == <s>.
-};
-
-template <class T>
-class ACE_Array_Iterator
-{
- // = TITLE
- // Implement an iterator over an ACE_Array.
- //
- // = DESCRIPTION
- // This iterator is safe in the face of array element deletions.
- // But it is NOT safe if the array is resized (via the ACE_Array
- // assignment operator) during iteration. That would be very
- // odd, and dangerous.
-public:
- // = Initialization method.
- ACE_Array_Iterator (ACE_Array_Base<T> &);
-
- // = Iteration methods.
-
- int next (T *&next_item);
- // Pass back the <next_item> that hasn't been seen in the Array.
- // Returns 0 when all items have been seen, else 1.
-
- int advance (void);
- // Move forward by one element in the Array. Returns 0 when all the
- // items in the Array have been seen, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- u_int current_;
- // Pointer to the current item in the iteration.
-
- ACE_Array_Base<T> &array_;
- // Pointer to the Array we're iterating over.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Containers_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Containers_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Containers_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_CONTAINERS_T_H */
diff --git a/ace/Containers_T.i b/ace/Containers_T.i
deleted file mode 100644
index f1835efacbe..00000000000
--- a/ace/Containers_T.i
+++ /dev/null
@@ -1,585 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Containers.i
-
-template <class T> ACE_INLINE int
-ACE_Bounded_Stack<T>::is_empty (void) const
-{
- ACE_TRACE ("ACE_Bounded_Stack<T>::is_empty");
- return this->top_ == 0;
-}
-
-template <class T> ACE_INLINE int
-ACE_Bounded_Stack<T>::is_full (void) const
-{
- ACE_TRACE ("ACE_Bounded_Stack<T>::is_full");
- return this->top_ >= this->size_;
-}
-
-template <class T> ACE_INLINE int
-ACE_Bounded_Stack<T>::push (const T &new_item)
-{
- ACE_TRACE ("ACE_Bounded_Stack<T>::push");
- if (this->is_full () == 0)
- {
- this->stack_[this->top_++] = new_item;
- return 0;
- }
- else
- return -1;
-}
-
-template <class T> ACE_INLINE int
-ACE_Bounded_Stack<T>::pop (T &item)
-{
- ACE_TRACE ("ACE_Bounded_Stack<T>::pop");
- if (this->is_empty () == 0)
- {
- item = this->stack_[--this->top_];
- return 0;
- }
- else
- return -1;
-}
-
-template <class T> ACE_INLINE int
-ACE_Bounded_Stack<T>::top (T &item) const
-{
- ACE_TRACE ("ACE_Bounded_Stack<T>::top");
- if (this->is_empty () == 0)
- {
- item = this->stack_[this->top_ - 1];
- return 0;
- }
- else
- return -1;
-}
-
-template <class T> ACE_INLINE size_t
-ACE_Bounded_Stack<T>::size (void) const
-{
- return this->size_;
-}
-
-//----------------------------------------
-
-template <class T, size_t ACE_SIZE> ACE_INLINE int
-ACE_Fixed_Stack<T, ACE_SIZE>::is_empty (void) const
-{
- ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::is_empty");
- return this->top_ == 0;
-}
-
-template <class T, size_t ACE_SIZE> ACE_INLINE int
-ACE_Fixed_Stack<T, ACE_SIZE>::is_full (void) const
-{
- ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::is_full");
- return this->top_ >= this->size_;
-}
-
-template <class T, size_t ACE_SIZE> ACE_INLINE int
-ACE_Fixed_Stack<T, ACE_SIZE>::push (const T &new_item)
-{
- ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::push");
- if (this->is_full () == 0)
- {
- this->stack_[this->top_++] = new_item;
- return 0;
- }
- else
- return -1;
-}
-
-template <class T, size_t ACE_SIZE> ACE_INLINE int
-ACE_Fixed_Stack<T, ACE_SIZE>::pop (T &item)
-{
- ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::pop");
- if (this->is_empty () == 0)
- {
- item = this->stack_[--this->top_];
- return 0;
- }
- else
- return -1;
-}
-
-template <class T, size_t ACE_SIZE> ACE_INLINE int
-ACE_Fixed_Stack<T, ACE_SIZE>::top (T &item) const
-{
- ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::top");
- if (this->is_empty () == 0)
- {
- item = this->stack_[this->top_ - 1];
- return 0;
- }
- else
- return -1;
-}
-
-template <class T, size_t ACE_SIZE> ACE_INLINE size_t
-ACE_Fixed_Stack<T, ACE_SIZE>::size (void) const
-{
- return this->size_;
-}
-
-template <class T> ACE_INLINE int
-ACE_Unbounded_Stack<T>::is_empty (void) const
-{
- // ACE_TRACE ("ACE_Unbounded_Stack<T>::is_empty");
- return this->head_ == this->head_->next_;
-}
-
-template <class T> ACE_INLINE int
-ACE_Unbounded_Stack<T>::top (T &item) const
-{
- ACE_TRACE ("ACE_Unbounded_Stack<T>::top");
- if (this->is_empty () == 0)
- {
- item = this->head_->next_->item_;
- return 0;
- }
- else
- return -1;
-}
-
-template <class T> ACE_INLINE int
-ACE_Unbounded_Stack<T>::is_full (void) const
-{
- ACE_TRACE ("ACE_Unbounded_Stack<T>::is_full");
- return 0; // ???
-}
-
-template <class T> ACE_INLINE size_t
-ACE_Unbounded_Stack<T>::size (void) const
-{
- return this->cur_size_;
-}
-
-// ---
-
-template <class T> ACE_INLINE size_t
-ACE_Unbounded_Queue<T>::size (void) const
-{
- return this->cur_size_;
-}
-
-template <class T> ACE_INLINE int
-ACE_Unbounded_Queue<T>::is_empty (void) const
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::is_empty");
- return this->head_ == this->head_->next_;
-}
-
-template <class T> ACE_INLINE int
-ACE_Unbounded_Queue<T>::is_full (void) const
-{
- // ACE_TRACE ("ACE_Unbounded_Queue<T>::is_full");
- return 0; // We should implement a "node of last resort for this..."
-}
-
-// ---
-
-template <class T> ACE_INLINE int
-ACE_Unbounded_Set<T>::is_empty (void) const
-{
- ACE_TRACE ("ACE_Unbounded_Set<T>::is_empty");
- return this->head_ == this->head_->next_;
-}
-
-template <class T> ACE_INLINE int
-ACE_Unbounded_Set<T>::is_full (void) const
-{
- ACE_TRACE ("ACE_Unbounded_Set<T>::is_full");
- return 0; // We should implement a "node of last resort for this..."
-}
-
-// ---
-
-template <class T, size_t ACE_SIZE> ACE_INLINE int
-ACE_Fixed_Set<T, ACE_SIZE>::is_empty (void) const
-{
- ACE_TRACE ("ACE_Fixed_Set<T>::is_empty");
- return this->cur_size_ == 0;
-}
-
-template <class T, size_t ACE_SIZE> ACE_INLINE int
-ACE_Fixed_Set<T, ACE_SIZE>::is_full (void) const
-{
- ACE_TRACE ("ACE_Fixed_Set<T, ACE_SIZE>::is_full");
- return this->cur_size_ == this->max_size_;
-}
-
-// ---
-
-template <class T> ACE_INLINE int
-ACE_Bounded_Set<T>::is_empty (void) const
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::is_empty");
- return this->cur_size_ == 0;
-}
-
-#if !defined (__Lynx__)
- // LynxOS 3.0.0 native g++ compiler raises internal error with this inline.
-template <class T> ACE_INLINE int
-ACE_Bounded_Set<T>::is_full (void) const
-{
- ACE_TRACE ("ACE_Bounded_Set<T>::is_full");
- return this->cur_size_ == this->max_size_;
-}
-#endif /* ! __Lynx__ */
-
-// --
-
-template <class T> ACE_INLINE int
-ACE_Ordered_MultiSet_Iterator<T>::first (void)
-{
- ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::first");
- current_ = set_.head_;
-
- return (current_ ? 1 : 0);
-}
-
-template <class T> ACE_INLINE int
-ACE_Ordered_MultiSet_Iterator<T>::last (void)
-{
- ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::last");
- current_ = set_.tail_;
-
- return (current_ ? 1 : 0);
-}
-
-template <class T> ACE_INLINE int
-ACE_Ordered_MultiSet_Iterator<T>::advance (void)
-{
- ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::advance");
-
- current_ = current_ ? current_->next_ : 0;
-
- return (current_ ? 1 : 0);
-}
-
-template <class T> ACE_INLINE int
-ACE_Ordered_MultiSet_Iterator<T>::retreat (void)
-{
- ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::retreat");
-
- current_ = current_ ? current_->prev_ : 0;
-
- return (current_ ? 1 : 0);
-}
-
-template <class T> ACE_INLINE int
-ACE_Ordered_MultiSet_Iterator<T>::done (void) const
-{
- ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::done");
-
- return (current_ ? 0 : 1);
-}
-
-template <class T> ACE_INLINE void
-ACE_Ordered_MultiSet_Iterator<T>::dump (void) const
-{
-// ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::dump");
-}
-
-
-
-// --
-
-template <class T> ACE_INLINE int
-ACE_Ordered_MultiSet<T>::is_empty (void) const
-{
- ACE_TRACE ("ACE_Ordered_MultiSet<T>::is_empty");
- return this->cur_size_ > 0 ? 0 : 1;
-}
-
-template <class T> ACE_INLINE size_t
-ACE_Ordered_MultiSet<T>::size (void) const
-{
-// ACE_TRACE ("ACE_Ordered_MultiSet<T>::size");
- return this->cur_size_;
-}
-
-// ****************************************************************
-
-// Clean up the array (e.g., delete dynamically allocated memory).
-
-template <class T> ACE_INLINE
-ACE_Array_Base<T>::~ACE_Array_Base (void)
-{
- ACE_DES_ARRAY_FREE (this->array_,
- this->max_size_,
- this->allocator_->free,
- T);
-}
-
-template <class T> ACE_INLINE size_t
-ACE_Array_Base<T>::size (void) const
-{
- return this->cur_size_;
-}
-
-template <class T> ACE_INLINE size_t
-ACE_Array_Base<T>::max_size (void) const
-{
- return this->max_size_;
-}
-
-template <class T> ACE_INLINE int
-ACE_Array_Base<T>::in_range (size_t index) const
-{
- return index < this->cur_size_;
-}
-
-template <class T> ACE_INLINE T &
-ACE_Array_Base<T>::operator[] (size_t index)
-{
- return this->array_[index];
-}
-
-template <class T> ACE_INLINE const T &
-ACE_Array_Base<T>::operator[] (size_t index) const
-{
- return this->array_[index];
-}
-
-// ****************************************************************
-
-template <class T> ACE_INLINE
-ACE_Array<T>::ACE_Array (size_t size,
- ACE_Allocator *alloc)
- : ACE_Array_Base<T> (size, alloc)
-{
-}
-
-template <class T> ACE_INLINE
-ACE_Array<T>::ACE_Array (size_t size,
- const T &default_value,
- ACE_Allocator *alloc)
- : ACE_Array_Base<T> (size, default_value, alloc)
-{
-}
-
-// The copy constructor (performs initialization).
-
-template <class T> ACE_INLINE
-ACE_Array<T>::ACE_Array (const ACE_Array<T> &s)
- : ACE_Array_Base<T> (s)
-{
-}
-
-// Assignment operator (performs assignment).
-
-template <class T> ACE_INLINE void
-ACE_Array<T>::operator= (const ACE_Array<T> &s)
-{
- // Check for "self-assignment".
-
- if (this != &s)
- this->ACE_Array_Base<T>::operator= (s);
-}
-
-// Compare this array with <s> for inequality.
-
-template <class T> ACE_INLINE int
-ACE_Array<T>::operator!= (const ACE_Array<T> &s) const
-{
- return !(*this == s);
-}
-
-// ****************************************************************
-
-template <class T> ACE_INLINE void
-ACE_Array_Iterator<T>::dump (void) const
-{
- // ACE_TRACE ("ACE_Array_Iterator<T>::dump");
-}
-
-template <class T> ACE_INLINE
-ACE_Array_Iterator<T>::ACE_Array_Iterator (ACE_Array_Base<T> &a)
- : current_ (0),
- array_ (a)
-{
- // ACE_TRACE ("ACE_Array_Iterator<T>::ACE_Array_Iterator");
-}
-
-template <class T> ACE_INLINE int
-ACE_Array_Iterator<T>::advance (void)
-{
- // ACE_TRACE ("ACE_Array_Iterator<T>::advance");
-
- if (this->current_ < array_.size ())
- {
- ++this->current_;
- return 1;
- }
- else
- {
- // Already finished iterating.
- return 0;
- }
-}
-
-template <class T> ACE_INLINE int
-ACE_Array_Iterator<T>::done (void) const
-{
- ACE_TRACE ("ACE_Array_Iterator<T>::done");
-
- return this->current_ >= array_.size ();
-}
-
-// ****************************************************************
-
-template <class T> ACE_INLINE void
-ACE_DLList<T>::operator= (ACE_DLList<T> &l)
-{
- *(ACE_DLList_Base *) this = l;
-}
-
-template <class T> ACE_INLINE int
-ACE_DLList<T>::get (T *&item, size_t index)
-{
- ACE_DLList_Node *node;
- int result = ACE_DLList_Base::get (node, index);
- if (result != -1)
- item = (T *) node->item_;
- return result;
-}
-
-template <class T> ACE_INLINE void
-ACE_DLList<T>::dump (void) const
-{
- ACE_DLList_Base::dump ();
-}
-
-template <class T> ACE_INLINE int
-ACE_DLList<T>::remove (ACE_DLList_Node *n)
-{
- int result = ACE_DLList_Base::remove (n);
- ACE_DES_FREE (n,
- this->allocator_->free,
- ACE_DLList_Node);
- return result;
-}
-
-template <class T> ACE_INLINE
-ACE_DLList<T>::ACE_DLList (ACE_Allocator *alloc )
- : ACE_DLList_Base (alloc)
-{
-}
-
-template <class T> ACE_INLINE
-ACE_DLList<T>::ACE_DLList (ACE_DLList<T> &l)
- : ACE_DLList_Base ((ACE_DLList<T> &) l)
-{
-}
-
-template <class T> ACE_INLINE
-ACE_DLList<T>::~ACE_DLList (void)
-{
- while (this->delete_head ()) ;
-}
-
-template <class T> ACE_INLINE int
-ACE_DLList_Iterator<T>::remove (void)
-{
- ACE_DLList_Node *temp = this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
- this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::advance ();
- return list_->remove (temp);
-}
-
-template <class T> ACE_INLINE
-ACE_DLList_Iterator<T>::ACE_DLList_Iterator (ACE_DLList<T> &l)
- : ACE_Double_Linked_List_Iterator <ACE_DLList_Node> ((ACE_DLList_Base &)l),
- list_ (&l)
-{
-}
-
-template <class T> ACE_INLINE void
-ACE_DLList_Iterator<T>::reset (ACE_DLList<T> &l)
-{
- list_ = &l;
- this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::reset ((ACE_DLList_Base &)l);
-}
-
-template <class T> ACE_INLINE int
-ACE_DLList_Iterator<T>::next (T *&ptr)
-{
- ACE_DLList_Node *temp =
- ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
- if (temp)
- ptr = (T *) temp->item_;
- return temp ? 1 : 0;
-}
-
-template <class T> ACE_INLINE T *
-ACE_DLList_Iterator<T>::next (void) const
-{
- ACE_DLList_Node *temp = ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
- return (T *) (temp ? temp->item_ : 0);
-}
-
-template <class T> ACE_INLINE int
-ACE_DLList_Iterator<T>::advance (void)
-{
- return this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::advance ();
-}
-
-template <class T> ACE_INLINE void
-ACE_DLList_Iterator<T>::dump (void) const
-{
- ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::dump ();
-}
-
-
-template <class T> ACE_INLINE int
-ACE_DLList_Reverse_Iterator<T>::remove (void)
-{
- ACE_DLList_Node *temp = ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::next ();
- this->ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::advance ();
- return list_->remove (temp);
-}
-
-template <class T> ACE_INLINE
-ACE_DLList_Reverse_Iterator<T>::ACE_DLList_Reverse_Iterator (ACE_DLList<T> &l)
- : ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node> ((ACE_DLList_Base &)l),
- list_ (&l)
-{
-}
-
-template <class T> ACE_INLINE void
-ACE_DLList_Reverse_Iterator<T>::reset (ACE_DLList<T> &l)
-{
- list_ = &l;
- this->ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::reset ((ACE_DLList_Base &)l);
-}
-
-template <class T> ACE_INLINE int
-ACE_DLList_Reverse_Iterator<T>::advance (void)
-{
- return ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::advance ();
-}
-
-template <class T> ACE_INLINE int
-ACE_DLList_Reverse_Iterator<T>::next (T *&ptr)
-{
- ACE_DLList_Node *temp =
- ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::next ();
- ptr = (T *) temp->item_;
- return ptr ? 1 : 0;
-}
-
-template <class T> ACE_INLINE T *
-ACE_DLList_Reverse_Iterator<T>::next (void) const
-{
- ACE_DLList_Node *temp = ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::next ();
- return (T *) (temp ? temp->item_ : 0);
-}
-
-
-template <class T> ACE_INLINE void
-ACE_DLList_Reverse_Iterator<T>::dump (void) const
-{
- ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::dump ();
-}
diff --git a/ace/DEV.cpp b/ace/DEV.cpp
deleted file mode 100644
index 0aa66003edb..00000000000
--- a/ace/DEV.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// DEV.cpp
-// $Id$
-
-
-#include "ace/DEV.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/DEV.i"
-#endif
-
-ACE_RCSID(ace, DEV, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_DEV)
-
-void
-ACE_DEV::dump (void) const
-{
- ACE_TRACE ("ACE_DEV::dump");
-}
-
-// This is the do-nothing constructor.
-
-ACE_DEV::ACE_DEV (void)
-{
- ACE_TRACE ("ACE_DEV::ACE_DEV");
-}
-
-// Close the device
-
-int
-ACE_DEV::close (void)
-{
- ACE_TRACE ("ACE_DEV::close");
- int result = ACE_OS::close (this->get_handle ());
- this->set_handle (ACE_INVALID_HANDLE);
- return result;
-}
diff --git a/ace/DEV.h b/ace/DEV.h
deleted file mode 100644
index 7dea7fed39f..00000000000
--- a/ace/DEV.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// DEV.h
-//
-// = AUTHOR
-// Gerhard Lenzer
-//
-// ============================================================================
-
-#ifndef ACE_DEV_H
-#define ACE_DEV_H
-#include "ace/pre.h"
-
-#include "ace/IO_SAP.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/DEV_Addr.h"
-
-// The following is necessary since many C++ compilers don't support
-// typedef'd types inside of classes used as formal template
-// arguments... ;-(. Luckily, using the C++ preprocessor I can hide
-// most of this nastiness!
-
-#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
-#define ACE_DEV_CONNECTOR ACE_DEV_Connector
-#define ACE_DEV_STREAM ACE_DEV_Stream
-#else /* TEMPLATES are broken (must be a cfront-based compiler...) */
-#define ACE_DEV_CONNECTOR ACE_DEV_Connector, ACE_DEV_Addr
-#define ACE_DEV_STREAM ACE_DEV_Stream, ACE_DEV_Addr
-#endif /* ACE_TEMPLATE_TYPEDEFS */
-
-class ACE_Export ACE_DEV : public ACE_IO_SAP
-{
- // = TITLE
- // Defines the member functions for the base class of the
- // ACE_DEV abstraction.
-public:
- int close (void);
- // Close down the DEVICE
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- int disable (int signum) const ;
- // Disable signal <signum>
- // This is here to prevent Win32 from
- // disabling SPIPE using socket calls
-
-protected:
- ACE_DEV (void);
- // Ensure that this class is an abstract base class
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/DEV.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_DEV_H */
diff --git a/ace/DEV.i b/ace/DEV.i
deleted file mode 100644
index 529824f129c..00000000000
--- a/ace/DEV.i
+++ /dev/null
@@ -1,15 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// DEV.i
-
-ASYS_INLINE int
-ACE_DEV::disable (int signum) const
-{
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG (signum) ;
- return 0 ;
-#else /* ACE_WIN32 */
- return ACE_IO_SAP::disable (signum) ;
-#endif /* ACE_WIN32 */
-}
diff --git a/ace/DEV_Addr.cpp b/ace/DEV_Addr.cpp
deleted file mode 100644
index f7a11c2f07c..00000000000
--- a/ace/DEV_Addr.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-// DEV_Addr.cpp
-// $Id$
-
-#include "ace/DEV_Addr.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/DEV_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, DEV_Addr, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Addr)
-
-void
-ACE_DEV_Addr::dump (void) const
-{
- ACE_TRACE ("ACE_DEV_Addr::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("devname_ = %s"), this->devname_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Do nothing constructor.
-
-ACE_DEV_Addr::ACE_DEV_Addr (void)
- : ACE_Addr (AF_DEV, sizeof this->devname_)
-{
- ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr");
-
- (void) ACE_OS::memset ((void *) &this->devname_,
- 0, sizeof this->devname_);
-}
-
-int
-ACE_DEV_Addr::set (const ACE_DEV_Addr &sa)
-{
- this->base_set (sa.get_type (), sa.get_size ());
-
- if (sa.get_type () == AF_ANY)
- (void) ACE_OS::memset ((void *) &this->devname_,
- 0,
- sizeof this->devname_);
- else
- (void) ACE_OS::memcpy ((void *) &this->devname_,
- (void *) &sa.devname_,
- sa.get_size ());
- return 0;
-}
-
-// Copy constructor.
-
-ACE_DEV_Addr::ACE_DEV_Addr (const ACE_DEV_Addr &sa)
- : ACE_Addr (AF_DEV, sizeof this->devname_)
-{
- ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr");
-
- this->set (sa);
-}
-
-ACE_DEV_Addr::ACE_DEV_Addr (const ACE_TCHAR *devname)
- : ACE_Addr (AF_DEV, sizeof this->devname_)
-{
- ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr");
-
- this->set (devname);
-}
-
-ACE_DEV_Addr &
-ACE_DEV_Addr::operator= (const ACE_DEV_Addr &sa)
-{
- ACE_TRACE ("ACE_DEV_Addr::operator=");
-
- if (this != &sa)
- (void) ACE_OS::memcpy ((void *) &this->devname_,
- (void *) &sa.devname_,
- sa.get_size ());
- return *this;
-}
-
diff --git a/ace/DEV_Addr.h b/ace/DEV_Addr.h
deleted file mode 100644
index 376587a0699..00000000000
--- a/ace/DEV_Addr.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// DEV_Addr.h
-//
-// = AUTHOR
-// Gerhard Lenzer and Douglas C. Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_DEV_ADDR_H
-#define ACE_DEV_ADDR_H
-#include "ace/pre.h"
-
-#include "ace/Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/ACE.h"
-
-class ACE_Export ACE_DEV_Addr : public ACE_Addr
-{
- // = TITLE
- // Defines device address family address format.
-public:
- // = Initialization methods.
- ACE_DEV_Addr (void);
- // Default constructor.
-
- ACE_DEV_Addr (const ACE_DEV_Addr &sa);
- // Copy constructor.
-
- int set (const ACE_DEV_Addr &sa);
- // Acts like a copy constructor.
-
- ACE_DEV_Addr (const ACE_TCHAR *devname);
- // Create a ACE_DEV_Addr from a device name.
-
- void set (const ACE_TCHAR *devname);
- // Create a ACE_Addr from a ACE_DEV pathname.
-
- ACE_DEV_Addr &operator= (const ACE_DEV_Addr &);
- // Assignment operator.
-
- virtual void *get_addr (void) const;
- // Return a pointer to the address.
-
- virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
- // Transform the current address into string format.
-
- int operator == (const ACE_DEV_Addr &SAP) const;
- // Compare two addresses for equality.
-
- int operator != (const ACE_DEV_Addr &SAP) const;
- // Compare two addresses for inequality.
-
- const ACE_TCHAR *get_path_name (void) const;
- // Return the path name used for the rendezvous point.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_TCHAR devname_[MAXNAMLEN + 1];
- // Name of the device.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/DEV_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_DEV_ADDR_H */
diff --git a/ace/DEV_Addr.i b/ace/DEV_Addr.i
deleted file mode 100644
index 7ada0c3dd18..00000000000
--- a/ace/DEV_Addr.i
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/SString.h"
-
-ACE_INLINE void
-ACE_DEV_Addr::set (const ACE_TCHAR *devname)
-{
- ACE_TRACE ("ACE_DEV_Addr::set");
-
- this->ACE_Addr::base_set (AF_DEV, ACE_OS::strlen (devname));
- ACE_OS::strncpy (this->devname_, devname, MAXNAMLEN);
-}
-
-// Transform the current address into string format.
-
-ACE_INLINE int
-ACE_DEV_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const
-{
- ACE_TRACE ("ACE_DEV_Addr::addr_to_string");
-
- ACE_OS::strncpy (s, this->devname_, len);
- return 0;
-}
-
-// Return a pointer to the address.
-
-ACE_INLINE void *
-ACE_DEV_Addr::get_addr (void) const
-{
- ACE_TRACE ("ACE_DEV_Addr::get_addr");
-
- return (void *) &this->devname_;
-}
-
-// Compare two addresses for equality.
-
-ACE_INLINE int
-ACE_DEV_Addr::operator == (const ACE_DEV_Addr &sap) const
-{
- ACE_TRACE ("ACE_DEV_Addr::operator=");
-
- return ACE_OS::strcmp (this->devname_, sap.devname_) == 0;
-}
-
-// Compare two addresses for inequality.
-
-ACE_INLINE int
-ACE_DEV_Addr::operator != (const ACE_DEV_Addr &sap) const
-{
- ACE_TRACE ("ACE_DEV_Addr::operator!=");
-
- return !((*this) == sap); // This is lazy, of course... ;-).
-}
-
-// Return the path name used for the rendezvous point.
-
-ACE_INLINE const ACE_TCHAR *
-ACE_DEV_Addr::get_path_name (void) const
-{
- ACE_TRACE ("ACE_DEV_Addr::get_path_name");
-
- return this->devname_;
-}
diff --git a/ace/DEV_Connector.cpp b/ace/DEV_Connector.cpp
deleted file mode 100644
index 70f605762a9..00000000000
--- a/ace/DEV_Connector.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// DEV_Connector.cpp
-// $Id$
-
-#include "ace/DEV_Connector.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/DEV_Connector.i"
-#endif
-
-ACE_RCSID(ace, DEV_Connector, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Connector)
-
-void
-ACE_DEV_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_DEV_Connector::dump");
-}
-
-ACE_DEV_Connector::ACE_DEV_Connector (void)
-{
- ACE_TRACE ("ACE_DEV_Connector::ACE_DEV_Connector");
-}
-
-int
-ACE_DEV_Connector::connect (ACE_DEV_IO &new_io,
- const ACE_DEV_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &,
- int,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_DEV_Connector::connect");
-
- ACE_HANDLE handle = ACE::handle_timed_open (timeout,
- remote_sap.get_path_name (),
- flags, perms);
- new_io.set_handle (handle);
- new_io.addr_ = remote_sap; // class copy.
- return handle == ACE_INVALID_HANDLE ? -1 : 0;
-}
-
diff --git a/ace/DEV_Connector.h b/ace/DEV_Connector.h
deleted file mode 100644
index cde72dc39ac..00000000000
--- a/ace/DEV_Connector.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// DEV_Connector.h
-//
-// = AUTHOR
-// Gerhard Lenzer and Douglas C. Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_DEV_CONNECTOR_H
-#define ACE_DEV_CONNECTOR_H
-#include "ace/pre.h"
-
-#include "ace/DEV_IO.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_DEV_Connector
-{
- // = TITLE
- // Defines an active connection factory for the ACE_DEV wrappers.
-public:
- ACE_DEV_Connector (void);
- // Default constructor.
-
- ACE_DEV_Connector (ACE_DEV_IO &new_io,
- const ACE_DEV_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
- // The <flags> and <perms> arguments are passed down to the <open>
- // method.
-
- int connect (ACE_DEV_IO &new_io,
- const ACE_DEV_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
- // The <flags> and <perms> arguments are passed down to the <open>
- // method.
-
- int reset_new_handle (ACE_HANDLE handle);
- // Resets any event associations on this handle
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- // = Meta-type info
- typedef ACE_DEV_Addr PEER_ADDR;
- typedef ACE_DEV_IO PEER_STREAM;
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/DEV_Connector.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_DEV_CONNECTOR_H */
diff --git a/ace/DEV_Connector.i b/ace/DEV_Connector.i
deleted file mode 100644
index 45ed1b0c82c..00000000000
--- a/ace/DEV_Connector.i
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// DEV_Connector.i
-
-// Creates a Local ACE_DEV.
-
-ASYS_INLINE
-ACE_DEV_Connector::ACE_DEV_Connector (ACE_DEV_IO &new_io,
- const ACE_DEV_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_DEV_Connector::ACE_DEV_Connector");
- if (this->connect (new_io, remote_sap, timeout, local_sap,
- reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE
- && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("address %s, %p\n"),
- remote_sap.get_path_name (), ACE_TEXT ("ACE_DEV_IO")));
-}
-
-ASYS_INLINE int
-ACE_DEV_Connector::reset_new_handle (ACE_HANDLE handle)
-{
- ACE_UNUSED_ARG (handle);
- // Nothing to do here since the handle is not a socket
- return 0;
-}
-
diff --git a/ace/DEV_IO.cpp b/ace/DEV_IO.cpp
deleted file mode 100644
index 2903697d854..00000000000
--- a/ace/DEV_IO.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-// DEV_IO.cpp
-// $Id$
-
-#include "ace/DEV_IO.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/DEV_IO.i"
-#endif
-
-ACE_RCSID(ace, DEV_IO, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_DEV_IO)
-
-// Return the local endpoint address.
-
-int
-ACE_DEV_IO::get_local_addr (ACE_DEV_Addr &addr) const
-{
- ACE_TRACE ("ACE_DEV_IO::get_local_addr");
-
- addr = this->addr_;
- return 0;
-}
-
-// Return the address of the remotely connected peer (if there is
-// one).
-
-int
-ACE_DEV_IO::get_remote_addr (ACE_DEV_Addr &addr) const
-{
- ACE_TRACE ("ACE_DEV_IO::get_remote_addr");
- addr = this->addr_;
- return 0;
-}
-
-void
-ACE_DEV_IO::dump (void) const
-{
- ACE_TRACE ("ACE_DEV_IO::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->addr_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Simple-minded do nothing constructor.
-
-ACE_DEV_IO::ACE_DEV_IO (void)
-{
- ACE_TRACE ("ACE_DEV_IO::ACE_DEV_IO");
-}
-
-// Send N char *ptrs and int lengths. Note that the char *'s precede
-// the ints (basically, an varargs version of writev). The count N is
-// the *total* number of trailing arguments, *not* a couple of the
-// number of tuple pairs!
-
-ssize_t
-ACE_DEV_IO::send (size_t n, ...) const
-{
- ACE_TRACE ("ACE_DEV_IO::send");
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, int);
- }
-
- ssize_t result = ACE_OS::writev (this->get_handle (), iovp, total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-
-// This is basically an interface to ACE_OS::readv, that doesn't use the
-// struct iovec explicitly. The ... can be passed as an arbitrary
-// number of (char *ptr, int len) tuples. However, the count N is the
-// *total* number of trailing arguments, *not* a couple of the number
-// of tuple pairs!
-
-ssize_t
-ACE_DEV_IO::recv (size_t n, ...) const
-{
- ACE_TRACE ("ACE_DEV_IO::recv");
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, int);
- }
-
- ssize_t result = ACE_OS::readv (this->get_handle (), iovp, total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-
diff --git a/ace/DEV_IO.h b/ace/DEV_IO.h
deleted file mode 100644
index 85410750b01..00000000000
--- a/ace/DEV_IO.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// DEV_IO.h
-//
-// = AUTHOR
-// Gerhard Lenzer and Douglas C. Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_DEV_IO_H
-#define ACE_DEV_IO_H
-#include "ace/pre.h"
-
-#include "ace/DEV.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/DEV_Addr.h"
-
-class ACE_Export ACE_DEV_IO : public ACE_DEV
-{
- // = TITLE
- // Read/Write operations on Devices.
-public:
- friend class ACE_DEV_Connector;
-
- ACE_DEV_IO (void);
- // Default constructor.
-
- // = Various send operations.
- ssize_t send (const void *buf, size_t n) const;
- // send upto <n> bytes in <buf>.
-
- ssize_t recv (void *buf, size_t n) const;
- // Recv upto <n> bytes in <buf>.
-
- ssize_t send_n (const void *buf, size_t n) const;
- // Send n bytes, keep trying until n are sent.
-
- ssize_t recv_n (void *buf, size_t n) const;
- // Recv n bytes, keep trying until n are received.
-
-#if defined (ACE_HAS_STREAM_PIPES)
- ssize_t recv (ACE_Str_Buf *cntl,
- ACE_Str_Buf *data,
- int *band,
- int *flags) const;
- // Recv bytes via STREAM pipes using "band" mode.
-
- ssize_t send (const ACE_Str_Buf *cntl,
- const ACE_Str_Buf *data,
- int band,
- int flags) const;
- // Send bytes via STREAM pipes using "band" mode.
-
- ssize_t recv (ACE_Str_Buf *cntl,
- ACE_Str_Buf *data,
- int *flags) const;
- // Recv <cntl> and <data> via STREAM pipes.
-
- ssize_t send (const ACE_Str_Buf *cntl,
- const ACE_Str_Buf *data,
- int flags = 0) const;
- // Send <cntl> and <data> via STREAM pipes.
-#endif /* ACE_HAS_STREAM_PIPES */
-
- ssize_t send (const iovec iov[], size_t n) const;
- // Send iovecs via <::writev>.
-
- ssize_t recv (iovec iov[], size_t n) const;
- // Recv iovecs via <::readv>.
-
- ssize_t send (size_t n, ...) const;
- // Send N char *ptrs and int lengths. Note that the char *'s
- // precede the ints (basically, an varargs version of writev). The
- // count N is the *total* number of trailing arguments, *not* a
- // couple of the number of tuple pairs!
-
- ssize_t recv (size_t n, ...) const;
- // This is an interface to ::readv, that doesn't use the struct
- // iovec explicitly. The ... can be passed as an arbitrary number
- // of (char *ptr, int len) tuples. However, the count N is the
- // *total* number of trailing arguments, *not* a couple of the
- // number of tuple pairs!
-
- ssize_t send (const void *buf, size_t n, ACE_OVERLAPPED *overlapped) const;
- // Send <n> bytes via Win32 WriteFile using overlapped I/O.
-
- ssize_t recv (void *buf, size_t n, ACE_OVERLAPPED *overlapped) const;
- // Recv <n> bytes via Win32 ReadFile using overlapped I/O.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = The following two methods are no-ops to keep the
- // <ACE_Connector> happy.
- int get_local_addr (ACE_DEV_Addr &) const;
- // Return the local endpoint address.
-
- int get_remote_addr (ACE_DEV_Addr &) const;
- // Return the address of the remotely connected peer (if there is
- // one).
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- // = Meta-type info
- typedef ACE_DEV_Addr PEER_ADDR;
-
-private:
- ACE_DEV_Addr addr_;
- // Address of device we are connected to.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/DEV_IO.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_DEV_IO_H */
diff --git a/ace/DEV_IO.i b/ace/DEV_IO.i
deleted file mode 100644
index 90c825ebf50..00000000000
--- a/ace/DEV_IO.i
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// DEV_IO.i
-
-// Send exactly N bytes from BUF to this device. Keeping trying until
-// this many bytes are sent.
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::send_n (const void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_DEV_IO::send_n");
- return ACE::write_n (this->get_handle (), buf, n);
-}
-
-// Receive exactly N bytes from this file into BUF. Keep trying until
-// this many bytes are received.
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::recv_n (void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_DEV_IO::recv_n");
- return ACE::read_n (this->get_handle (), buf, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::send (const void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_DEV_IO::send");
- return ACE_OS::write (this->get_handle (), (const char *) buf, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::recv (void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_DEV_IO::recv");
- return ACE_OS::read (this->get_handle (), (char *) buf, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::send (const iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_DEV_IO::send");
- return ACE_OS::writev (this->get_handle (), iov, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::recv (iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_DEV_IO::recv");
- return ACE_OS::readv (this->get_handle (), iov, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::send (const void *buf, size_t n,
- ACE_OVERLAPPED *overlapped) const
-{
- ACE_TRACE ("ACE_DEV_IO::send");
- return ACE_OS::write (this->get_handle (),
- (const char *) buf, n,
- overlapped);
-}
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::recv (void *buf, size_t n,
- ACE_OVERLAPPED *overlapped) const
-{
- ACE_TRACE ("ACE_DEV_IO::recv");
- return ACE_OS::read (this->get_handle (), (char *) buf, n,
- overlapped);
-}
-
-#if defined (ACE_HAS_STREAM_PIPES)
-ASYS_INLINE ssize_t
-ACE_DEV_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *band, int *flags) const
-{
- ACE_TRACE ("ACE_DEV_IO::recv");
- return ACE_OS::getpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int band, int flags) const
-{
- ACE_TRACE ("ACE_DEV_IO::send");
- return ACE_OS::putpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *flags) const
-{
- ACE_TRACE ("ACE_DEV_IO::recv");
- return ACE_OS::getmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_DEV_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int flags) const
-{
- ACE_TRACE ("ACE_DEV_IO::send");
- return ACE_OS::putmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags);
-}
-#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/ace/DLL.cpp b/ace/DLL.cpp
deleted file mode 100644
index f186308611d..00000000000
--- a/ace/DLL.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-// DLL.cpp
-// $Id$
-
-#include "ace/DLL.h"
-
-#include "ace/ACE.h"
-
-ACE_RCSID(ace, DLL, "$Id$")
-
-// Default constructor. Also, by default, the object will be closed
-// before it is destroyed.
-
-ACE_DLL::ACE_DLL (int close_on_destruction)
- : handle_ (ACE_SHLIB_INVALID_HANDLE),
- close_on_destruction_ (close_on_destruction)
-{
-}
-
-// If the library name and the opening mode are specified than on
-// object creation the library is implicitly opened.
-
-ACE_DLL::ACE_DLL (const ACE_TCHAR *dll_name,
- int open_mode,
- int close_on_destruction)
- : handle_ (ACE_OS::dlopen (dll_name,
- open_mode)),
- close_on_destruction_ (close_on_destruction)
-{
- if (this->handle_ == ACE_SHLIB_INVALID_HANDLE)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%s\n"),
- this->error ()));
-}
-
-// The library is closed before the class gets destroyed depending on
-// the close_on_destruction value specified which is stored in
-// close_on_destruction_.
-
-ACE_DLL::~ACE_DLL (void)
-{
- // CLose the library only if it hasn't been already.
- this->close ();
-}
-
-// This method opens the library based on the mode specified using the
-// ACE_SHLIB_HANDLE which is obtained on making the ACE_OS::dlopen call.
-// The default mode is:
-// RTLD_LAZY Only references to data symbols are relocate when the
-// object is first loaded.
-// The other modes include:
-// RTLD_NOW All necessary relocations are performed when the
-// object is first loaded.
-// RTLD_GLOBAL The object symbols are made available for the
-// relocation processing of any other object.
-
-int
-ACE_DLL::open (const ACE_TCHAR *dll_filename,
- int open_mode,
- int close_on_destruction)
-{
- // This check is necessary as the library could be opened more than
- // once without closing it which would cause handle memory leaks.
- this->close ();
-
- // Reset the flag
- this->close_on_destruction_ = close_on_destruction;
-
- // Find out where the library is
- ACE_TCHAR dll_pathname[MAXPATHLEN + 1];
-
- // Transform the pathname into the appropriate dynamic link library
- // by searching the ACE_LD_SEARCH_PATH.
- int result = ACE::ldfind (dll_filename,
- dll_pathname,
- (sizeof dll_pathname / sizeof (ACE_TCHAR)));
- // Check for errors
- if (result != 0)
- return result;
-
- // The ACE_SHLIB_HANDLE object is obtained.
- this->handle_ = ACE_OS::dlopen (dll_pathname,
- open_mode);
-
- if (this->handle_ == ACE_SHLIB_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%s\n"), this->error ()),
- -1);
- return 0;
-}
-
-// The symbol refernce of the name specified is obtained.
-
-void *
-ACE_DLL::symbol (const ACE_TCHAR *sym_name)
-{
- return ACE_OS::dlsym (this->handle_, sym_name);
-}
-
-// The library is closed using the ACE_SHLIB_HANDLE obejct. i.e. The
-// shared object is now disassociated form the current process.
-
-int
-ACE_DLL::close (void)
-{
- int retval = 0;
-
- // The handle is checked to see whether the library is closed
- // already and the <close_on_destruction_> flag is specified. If
- // not, it is closed and the handle is made invalid to indicate that
- // it's now closed.
- if (this->close_on_destruction_ != 0 &&
- this->handle_ != ACE_SHLIB_INVALID_HANDLE)
- {
- retval = ACE_OS::dlclose (this->handle_);
- }
-
- this->handle_ = ACE_SHLIB_INVALID_HANDLE;
- return retval;
-}
-
-// This method is used on error in an library operation.
-
-ACE_TCHAR *
-ACE_DLL::error (void)
-{
- return ACE_OS::dlerror ();
-}
-
-// Return the handle to the user either temporarily or forever, thus
-// orphaning it. If 0 means the user wants the handle forever and if 1
-// means the user temporarily wants to take the handle.
-
-ACE_SHLIB_HANDLE
-ACE_DLL::get_handle (int become_owner)
-{
- // Since the caller is becoming the owner of the handle we lose
- // rights to close it on destruction. The new controller has to do
- // it explicitly.
- if (become_owner)
- this->close_on_destruction_ = 0;
-
- // Return the handle requested by the user.
- return this->handle_;
-}
-
-// Set the handle for the DLL. By default, the object will be closed
-// before it is destroyed.
-
-int
-ACE_DLL::set_handle (ACE_SHLIB_HANDLE handle,
- int close_on_destruction)
-{
- // Close the handle in use before accepting the next one.
- if (this->close () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%s\n"), this->error ()),
- -1);
-
- this->handle_ = handle;
- this->close_on_destruction_ = close_on_destruction;
-
- return 0;
-}
diff --git a/ace/DLL.h b/ace/DLL.h
deleted file mode 100644
index e1cbe76f70d..00000000000
--- a/ace/DLL.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// DLL.h
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_DLL_H
-#define ACE_DLL_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_DLL
-{
- // = TITLE
- // Provides an abstract interface for handling various DLL
- // operations.
- //
- // = DESCRIPTION
- // This class is an wrapper over the various methods for utilizing
- // a dynamically linked library (DLL), which is called a shared
- // library on some platforms. Operations <open>, <close>, and
- // <symbol> have been implemented to help opening/closing and
- // extracting symbol information from a DLL, respectively.
-public:
- // = Initialization and termination methods.
-
- ACE_DLL (int close_on_destruction = 1);
- // Default constructor. By default, the <close> operation on the
- // object will be invoked before it is destroyed.
-
- ACE_DLL (const ACE_TCHAR *dll_name,
- int open_mode = ACE_DEFAULT_SHLIB_MODE,
- int close_on_destruction = 1);
- // This constructor opens and dynamically links <dll_name>. The
- // default mode is <RTLD_LAZY>, which loads identifier symbols but
- // not the symbols for functions, which are loaded dynamically
- // on-demand. Other supported modes include: <RTLD_NOW>, which
- // performs all necessary relocations when <dll_name> is first
- // loaded and <RTLD_GLOBAL>, which makes symbols available for
- // relocation processing of any other DLLs.
-
- int open (const ACE_TCHAR *dll_name,
- int open_mode = ACE_DEFAULT_SHLIB_MODE,
- int close_on_destruction = 1);
- // This method opens and dynamically links <dll_name>. The default
- // mode is <RTLD_LAZY>, which loads identifier symbols but not the
- // symbols for functions, which are loaded dynamically on-demand.
- // Other supported modes include: <RTLD_NOW>, which performs all
- // necessary relocations when <dll_name> is first loaded and
- // <RTLD_GLOBAL>, which makes symbols available for relocation
- // processing of any other DLLs. Returns -1 on failure and 0 on
- // success.
-
- int close (void);
- // Call to close the DLL object.
-
- ~ACE_DLL (void);
- // Called when the DLL object is destroyed -- invokes <close> if the
- // <close_on_destruction> flag is set in the constructor or <open>
- // method.
-
- void *symbol (const ACE_TCHAR *symbol_name);
- // If <symbol_name> is in the symbol table of the DLL a pointer to
- // the <symbol_name> is returned. Otherwise, returns 0.
-
- ACE_TCHAR *error (void);
- // Returns a pointer to a string explaining why <symbol> or <open>
- // failed.
-
- ACE_SHLIB_HANDLE get_handle (int become_owner = 0);
- // Return the handle to the caller. If <become_owner> is non-0 then
- // caller assumes ownership of the handle and the <ACE_DLL> object
- // won't call <close> when it goes out of scope, even if
- // <close_on_destruction> is set.
-
- int set_handle (ACE_SHLIB_HANDLE handle, int close_on_destruction = 1);
- // Set the handle for the DLL object. By default, the <close> operation on the
- // object will be invoked before it is destroyed.
-private:
- ACE_SHLIB_HANDLE handle_;
- // This is a handle to the DLL.
-
- int close_on_destruction_;
- // This flag keeps track of whether we should close the handle
- // automatically when the destructor runs.
-
- // = Disallow copying and assignment since we don't handle these.
- ACE_UNIMPLEMENTED_FUNC (ACE_DLL (const ACE_DLL &))
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_DLL &))
-};
-
-#include "ace/post.h"
-#endif /* ACE_DLL_H */
diff --git a/ace/Date_Time.cpp b/ace/Date_Time.cpp
deleted file mode 100644
index 7eaa91b3f15..00000000000
--- a/ace/Date_Time.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// Date_Time.cpp
-// $Id$
-
-#include "ace/Date_Time.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/Date_Time.i"
-#endif
-
-ACE_RCSID(ace, Date_Time, "$Id$")
diff --git a/ace/Date_Time.h b/ace/Date_Time.h
deleted file mode 100644
index bd16b791da6..00000000000
--- a/ace/Date_Time.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ACE_Date_Time.h
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu) (and he's darn proud of this ;-))
-//
-// ============================================================================
-
-#ifndef ACE_DATE_TIME_H
-#define ACE_DATE_TIME_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Date_Time
-{
- // = TITLE
- // System independent representation of date and time.
-public:
- // constructor with init values, no check for validy
- ACE_Date_Time (long day = 0,
- long month = 0,
- long year = 0,
- long hour = 0,
- long minute = 0,
- long second = 0,
- long microsec = 0);
- // Set/get portions of ACE_Date_Time, no check for validity.
-
- long day (void);
- // Get day.
-
- void day (long day);
- // Set day.
-
- long month (void);
- // Get month.
-
- void month (long month);
- // Set month.
-
- long year (void);
- // Get year.
-
- void year (long year);
- // Set year.
-
- long hour (void);
- // Get hour.
-
- void hour (long hour);
- // Set hour.
-
- long minute (void);
- // Get minute.
-
- void minute (long minute);
- // Set minute.
-
- long second (void);
- // Get second.
-
- void second (long second);
- // Set second.
-
- long microsec (void);
- // Get microsec.
-
- void microsec (long microsec);
- // Set microsec.
-
-private:
- long day_;
- long month_;
- long year_;
- long hour_;
- long minute_;
- long second_;
- long microsec_;
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/Date_Time.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_DATE_TIME_H */
diff --git a/ace/Date_Time.i b/ace/Date_Time.i
deleted file mode 100644
index bfae34af0a3..00000000000
--- a/ace/Date_Time.i
+++ /dev/null
@@ -1,140 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Date_Time.i
-
-// constructor with init values, no check for validy
-ASYS_INLINE
-ACE_Date_Time::ACE_Date_Time(long day,
- long month,
- long year,
- long hour,
- long minute,
- long second,
- long microsec)
-: day_ (day),
- month_ (month),
- year_ (year),
- hour_ (hour),
- minute_ (minute),
- second_ (second),
- microsec_ (microsec)
-{
- ACE_TRACE ("ACE_Date_Time::ACE_Date_Time");
-}
-
-// set/get portions of ACE_Date_Time, no check for validy
-
-// get day
-ASYS_INLINE long
-ACE_Date_Time::day (void)
-{
- ACE_TRACE ("ACE_Date_Time::day");
- return day_;
-}
-
-// set day
-ASYS_INLINE void
-ACE_Date_Time::day (long day)
-{
- ACE_TRACE ("ACE_Date_Time::day");
- day_ = day;
-}
-
-// get month
-ASYS_INLINE long
-ACE_Date_Time::month (void)
-{
- ACE_TRACE ("ACE_Date_Time::month");
- return month_;
-}
-
-// set month
-ASYS_INLINE void
-ACE_Date_Time::month (long month)
-{
- ACE_TRACE ("ACE_Date_Time::month");
- month_ = month;
-}
-
-// get year
-ASYS_INLINE long
-ACE_Date_Time::year (void)
-{
- ACE_TRACE ("ACE_Date_Time::year");
- return year_;
-}
-
-// set year
-ASYS_INLINE void
-ACE_Date_Time::year (long year)
-{
- ACE_TRACE ("ACE_Date_Time::year");
- year_ = year;
-}
-
-// get hour
-ASYS_INLINE long
-ACE_Date_Time::hour (void)
-{
- ACE_TRACE ("ACE_Date_Time::hour");
- return hour_;
-}
-
-// set hour
-ASYS_INLINE void
-ACE_Date_Time::hour (long hour)
-{
- ACE_TRACE ("ACE_Date_Time::hour");
- hour_ = hour;
-}
-
-// get minute
-ASYS_INLINE long
-ACE_Date_Time::minute (void)
-{
- ACE_TRACE ("ACE_Date_Time::minute");
- return minute_;
-}
-
-// set minute
-ASYS_INLINE void
-ACE_Date_Time::minute (long minute)
-{
- ACE_TRACE ("ACE_Date_Time::minute");
- minute_ = minute;
-}
-
-// get second
-ASYS_INLINE long
-ACE_Date_Time::second (void)
-{
- ACE_TRACE ("ACE_Date_Time::second");
- return second_;
-}
-
-// set second
-ASYS_INLINE void
-ACE_Date_Time::second (long second)
-{
- ACE_TRACE ("ACE_Date_Time::second");
- second_ = second;
-}
-
-// get microsec
-ASYS_INLINE long
-ACE_Date_Time::microsec (void)
-{
- ACE_TRACE ("ACE_Date_Time::microsec");
- return microsec_;
-}
-
-// set microsec
-ASYS_INLINE void
-ACE_Date_Time::microsec (long microsec)
-{
- ACE_TRACE ("ACE_Date_Time::microsec");
- microsec_ = microsec;
-}
-
-
diff --git a/ace/Dirent.cpp b/ace/Dirent.cpp
deleted file mode 100644
index d8a283a7368..00000000000
--- a/ace/Dirent.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-// $Id$
-
-#include "ace/Dirent.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Dirent.i"
-#else
-#if defined (__hpux) && !defined (__GNUG__)
-static int shut_up_aCC = 0;
-#endif /* HPUX && !g++ */
-#endif /* __ACE_INLINE__ */
diff --git a/ace/Dirent.h b/ace/Dirent.h
deleted file mode 100644
index d026c44e7db..00000000000
--- a/ace/Dirent.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Dirent.h
-//
-// = DESCRIPTION
-// Define a portable directory-entry manipulation interface.
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_DIRENT_H
-#define ACE_DIRENT_H
-#include "ace/pre.h"
-
-#include "ace/OS_Dirent.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Dirent
-{
- // = TITLE
- // Define a portable UNIX directory-entry iterator.
-public:
- // = Initialization and termination methods.
- ACE_Dirent (void);
- // Default constructor.
-
- ACE_Dirent (const ACE_TCHAR *dirname);
- // Constructor calls <opendir>
-
- int open (const ACE_TCHAR *filename);
- // Opens the directory named by filename and associates a directory
- // stream with it.
-
- ~ACE_Dirent (void);
- // Destructor calls <closedir>.
-
- void close (void);
- // Closes the directory stream and frees the DIR structure.
-
- // = Iterator methods.
- dirent *read (void);
- // Returns a pointer to a structure representing the directory entry
- // at the current position in the directory stream to which dirp
- // refers, and positions the directory stream at the next entry,
- // except on read-only filesystems. It returns a NULL pointer upon
- // reaching the end of the directory stream, or upon detecting an
- // invalid location in the directory. <readdir> shall not return
- // directory entries containing empty names. It is unspecified
- // whether entries are returned for dot or dot-dot. The pointer
- // returned by <readdir> points to data that may be overwritten by
- // another call to <readdir> on the same directory stream. This
- // data shall not be overwritten by another call to <readdir> on a
- // different directory stream. <readdir> may buffer several
- // directory entries per actual read operation; <readdir> marks for
- // update the st_atime field of the directory each time the
- // directory is actually read.
-
- int read (struct dirent *entry,
- struct dirent **result);
- // Has the equivalent functionality as <readdir> except that an
- // <entry> and <result> buffer must be supplied by the caller to
- // store the result.
-
- // = Manipulators.
- long tell (void);
- // Returns the current location associated with the directory
- // stream.
-
- void seek (long loc);
- // Sets the position of the next <readdir> operation on the
- // directory stream. The new position reverts to the position
- // associated with the directory stream at the time the <telldir>
- // operation that provides loc was performed. Values returned by
- // <telldir> are good only for the lifetime of the DIR pointer from
- // which they are derived. If the directory is closed and then
- // reopened, the <telldir> value may be invalidated due to
- // undetected directory compaction. It is safe to use a previous
- // <telldir> value immediately after a call to <opendir> and before
- // any calls to readdir.
-
- void rewind (void);
- // Resets the position of the directory stream to the beginning of
- // the directory. It also causes the directory stream to refer to
- // the current state of the corresponding directory, as a call to
- // <opendir> would.
-
-private:
- DIR *dirp_;
- // Pointer to the directory stream.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Dirent.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_DIRENT_H */
diff --git a/ace/Dirent.i b/ace/Dirent.i
deleted file mode 100644
index e4ae8960993..00000000000
--- a/ace/Dirent.i
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/Log_Msg.h"
-
-ACE_INLINE int
-ACE_Dirent::open (const ACE_TCHAR *dirname)
-{
- // If the directory stream is already open, close it to prevent
- // possible resource leaks.
-
- if (this->dirp_ != 0)
- {
- ACE_OS_Dirent::closedir (this->dirp_);
- this->dirp_ = 0;
- }
-
- this->dirp_ = ACE_OS_Dirent::opendir (dirname);
-
- if (this->dirp_ == 0)
- return -1;
- else
- return 0;
-}
-
-ACE_INLINE
-ACE_Dirent::ACE_Dirent (void)
- : dirp_ (0)
-{
-}
-
-ACE_INLINE
-ACE_Dirent::ACE_Dirent (const ACE_TCHAR *dirname)
- : dirp_ (0)
-{
- if (this->open (dirname) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("Dirent::Dirent")));
-}
-
-ACE_INLINE
-ACE_Dirent::~ACE_Dirent (void)
-{
- if (this->dirp_ != 0)
- ACE_OS_Dirent::closedir (this->dirp_);
-}
-
-ACE_INLINE dirent *
-ACE_Dirent::read (void)
-{
- return this->dirp_ ? ACE_OS_Dirent::readdir (this->dirp_) : 0;
-}
-
-ACE_INLINE int
-ACE_Dirent::read (struct dirent *entry,
- struct dirent **result)
-{
- return this->dirp_
- ? ACE_OS_Dirent::readdir_r (this->dirp_, entry, result)
- : 0;
-}
-
-ACE_INLINE void
-ACE_Dirent::close (void)
-{
- if (this->dirp_ != 0)
- {
- ACE_OS_Dirent::closedir (this->dirp_);
-
- // Prevent double closure
- this->dirp_ = 0;
- }
-}
-
-ACE_INLINE void
-ACE_Dirent::rewind (void)
-{
- if (this->dirp_)
- ACE_OS_Dirent::rewinddir (this->dirp_);
-}
-
-ACE_INLINE void
-ACE_Dirent::seek (long loc)
-{
- if (this->dirp_)
- ACE_OS_Dirent::seekdir (this->dirp_, loc);
-}
-
-ACE_INLINE long
-ACE_Dirent::tell (void)
-{
- return this->dirp_ ? ACE_OS_Dirent::telldir (this->dirp_) : 0;
-}
-
diff --git a/ace/Dump.cpp b/ace/Dump.cpp
deleted file mode 100644
index 6cbca54518c..00000000000
--- a/ace/Dump.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-// $Id$
-
-#include "ace/Synch_T.h"
-#include "ace/Dump.h"
-#include "ace/Object_Manager.h"
-
-ACE_RCSID(ace, Dump, "$Id$")
-
-// Implementations (very simple for now...)
-
-ACE_Dumpable::~ACE_Dumpable (void)
-{
- ACE_TRACE ("ACE_Dumpable::~ACE_Dumpable");
-}
-
-ACE_Dumpable::ACE_Dumpable (const void *this_ptr)
- : this_ (this_ptr)
-{
- ACE_TRACE ("ACE_Dumpable::ACE_Dumpable");
-}
-
-ACE_Dumpable_Ptr::ACE_Dumpable_Ptr (const ACE_Dumpable *dumper)
- : dumper_ (dumper)
-{
- ACE_TRACE ("ACE_Dumpable_Ptr::ACE_Dumpable_Ptr");
-}
-
-const ACE_Dumpable *
-ACE_Dumpable_Ptr::operator->() const
-{
- ACE_TRACE ("ACE_Dumpable_Ptr::operator->");
- return this->dumper_;
-}
-
-void
-ACE_Dumpable_Ptr::operator= (const ACE_Dumpable *dumper) const
-{
- ACE_TRACE ("ACE_Dumpable_Ptr::operator=");
- if (this->dumper_ != dumper)
- {
- delete (ACE_Dumpable *) this->dumper_;
- ((ACE_Dumpable_Ptr *) this)->dumper_ = dumper;
- }
-}
-
-ACE_ODB::ACE_ODB (void)
- // Let the Tuple default constructor initialize object_table_
- : current_size_ (0)
-{
- ACE_TRACE ("ACE_ODB::ACE_ODB");
-}
-
-ACE_ODB *
-ACE_ODB::instance (void)
-{
- ACE_TRACE ("ACE_ODB::instance");
-
- if (ACE_ODB::instance_ == 0)
- {
- ACE_MT (ACE_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_DUMP_LOCK);
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *lock, 0));
-
- if (ACE_ODB::instance_ == 0)
- ACE_NEW_RETURN (ACE_ODB::instance_,
- ACE_ODB,
- 0);
- }
-
- return ACE_ODB::instance_;
-}
-
-void
-ACE_ODB::dump_objects (void)
-{
- ACE_TRACE ("ACE_ODB::dump_objects");
- for (int i = 0; i < this->current_size_; i++)
- {
- if (this->object_table_[i].this_ != 0)
- // Dump the state of the object.
- this->object_table_[i].dumper_->dump ();
- }
-}
-
-// This method registers a new <dumper>. It detects
-// duplicates and simply overwrites them.
-
-void
-ACE_ODB::register_object (const ACE_Dumpable *dumper)
-{
- ACE_TRACE ("ACE_ODB::register_object");
- int i;
- int slot = 0;
-
- for (i = 0; i < this->current_size_; i++)
- {
- if (this->object_table_[i].this_ == 0)
- slot = i;
- else if (this->object_table_[i].this_ == dumper->this_)
- {
- slot = i;
- break;
- }
- }
-
- if (i == this->current_size_)
- {
- slot = this->current_size_++;
- ACE_ASSERT (this->current_size_ < ACE_ODB::MAX_TABLE_SIZE);
- }
- this->object_table_[slot].this_ = dumper->this_;
- this->object_table_[slot].dumper_ = dumper;
-}
-
-void
-ACE_ODB::remove_object (const void *this_ptr)
-{
- ACE_TRACE ("ACE_ODB::remove_object");
- int i;
-
- for (i = 0; i < this->current_size_; i++)
- {
- if (this->object_table_[i].this_ == this_ptr)
- break;
- }
-
- if (i < this->current_size_)
- {
- this->object_table_[i].this_ = 0;
- this->object_table_[i].dumper_ = 0;
- }
-}
-
-ACE_ODB *ACE_ODB::instance_ = 0;
diff --git a/ace/Dump.h b/ace/Dump.h
deleted file mode 100644
index 5c1ea0f357d..00000000000
--- a/ace/Dump.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Dump.h
-//
-// = DESCRIPTION
-//
-// A prototype mechanism that allow all ACE objects to be registered
-// with a central in-memory "database" that can dump the state of all
-// live ACE objects (e.g., from within a debugger).
-//
-// To turn on this feature simply compile with -DACE_NDEBUG
-//
-// There are several interesting aspects to this design:
-//
-// 1. It uses the External Polymorphism pattern to avoid having to
-// derive all ACE classes from a common base class that has virtual
-// methods (this is crucial to avoid unnecessary overhead). In
-// addition, there is no additional space added to ACE objects
-// (this is crucial to maintain binary layout compatibility).
-//
-// 2. This mechanism can be conditionally compiled in order to
-// completely disable this feature entirely. Moreover, by
-// using macros there are relatively few changes to ACE code.
-//
-// 3. This mechanism copes with single-inheritance hierarchies of
-// dumpable classes. In such cases we typically want only one
-// dump, corresponding to the most derived instance. Thanks to
-// Christian Millour (chris@etca.fr) for illustrating how to do
-// this. Note, however, that this scheme doesn't generalize to
-// work with multiple-inheritance or virtual base classes.
-//
-// Future work includes:
-//
-// 1. Using a dynamic object table rather than a static table
-//
-// 2. Adding support to allow particular classes of objects to
-// be selectively dumped.
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_DUMP_H
-#define ACE_DUMP_H
-#include "ace/pre.h"
-
-#include "ace/Synch.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Dumpable
-{
- // = TITLE
- // Base class that defines a uniform interface for all object
- // dumping.
-public:
- friend class ACE_ODB;
- friend class ACE_Dumpable_Ptr;
-
- ACE_Dumpable (const void *);
- // Constructor.
-
- virtual void dump (void) const = 0;
- // This pure virtual method must be filled in by a subclass.
-
-protected:
- virtual ~ACE_Dumpable (void);
-
-private:
- const void *this_;
- // Pointer to the object that is being stored.
-};
-
-class ACE_Export ACE_Dumpable_Ptr
-{
- // = TITLE
- // A smart pointer stored in the in-memory object database
- // ACE_ODB. The pointee (if any) is deleted when reassigned.
-public:
- ACE_Dumpable_Ptr (const ACE_Dumpable *dumper = 0);
- const ACE_Dumpable *operator->() const;
- void operator= (const ACE_Dumpable *dumper) const;
-
-private:
- const ACE_Dumpable *dumper_;
- // "Real" pointer to the underlying abstract base class
- // pointer that does the real work.
-};
-
-class ACE_Export ACE_ODB
-{
- // = TITLE
- // This is the object database (ODB) that keeps track of all
- // live ACE objects.
-public:
- enum {MAX_TABLE_SIZE = 100000}; // This is clearly inadequate and should be dynamic...
-
- void dump_objects (void);
- // Iterates through the entire set of registered objects and
- // dumps their state.
-
- void register_object (const ACE_Dumpable *dumper);
- // Add the tuple <dumper, this_> to the list of registered ACE objects.
-
- void remove_object (const void *this_);
- // Use <this_> to locate and remove the associated <dumper> from the
- // list of registered ACE objects.
-
- static ACE_ODB *instance (void);
- // Interface to the Singleton instance of the object database.
-
-private:
- ACE_ODB (void); // Ensure we have a Singleton...
-
- struct Tuple
- {
- const void *this_;
- // Pointer to the object that is registered.
-
- const ACE_Dumpable_Ptr dumper_;
- // Smart pointer to the ACE_Dumpable object associated with this_.
- // This uses an ACE_Dumpable_Ptr, instead of a bare pointer, to
- // cope with hierarchies of dumpable classes. In such cases we
- // typically want only one dump, corresponding to the most derived
- // instance. To achieve this, the handle registered for the
- // subobject corresponding to the base class is destroyed (hence
- // on destruction of the subobject its handle won't exist anymore
- // and we'll have to check for that).
-
- Tuple (void) : dumper_(0) {}
- };
-
- static ACE_ODB *instance_;
- // Singleton instance of this class.
-
- Tuple object_table_[ACE_ODB::MAX_TABLE_SIZE];
- // The current implementation is very simple-minded and will be
- // changed to be dynamic.
-
- int current_size_;
- // Current size of <object_table_>.
-};
-
-// Include the templates classes at this point.
-#include "ace/Dump_T.h"
-
-#include "ace/post.h"
-#endif /* ACE_DUMP_H */
diff --git a/ace/Dump_T.cpp b/ace/Dump_T.cpp
deleted file mode 100644
index 97386d4ba31..00000000000
--- a/ace/Dump_T.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// Dump_T.cpp
-// $Id$
-
-#ifndef ACE_DUMP_T_C
-#define ACE_DUMP_T_C
-
-#include "ace/Dump_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID(ace, Dump_T, "$Id$")
-
-template <class Concrete>
-ACE_Dumpable_Adapter<Concrete>::~ACE_Dumpable_Adapter (void)
-{
- ACE_TRACE ("ACE_Dumpable_Adapter<Concrete>::~ACE_Dumpable_Adapter");
-}
-
-template <class Concrete>
-ACE_Dumpable_Adapter<Concrete>::ACE_Dumpable_Adapter (const Concrete *t)
- : ACE_Dumpable ((const void *) t), this_ (t)
-{
- ACE_TRACE ("ACE_Dumpable_Adapter<Concrete>::ACE_Dumpable_Adapter");
-}
-
-template <class Concrete> Concrete *
-ACE_Dumpable_Adapter<Concrete>::operator->() const
-{
- return (Concrete *) this->this_;
-}
-
-template <class Concrete> void
-ACE_Dumpable_Adapter<Concrete>::dump (void) const
-{
- ACE_TRACE ("ACE_Dumpable_Adapter<Concrete>::dump");
- this->this_->dump ();
-}
-
-#endif /* ACE_DUMP_T_C */
diff --git a/ace/Dump_T.h b/ace/Dump_T.h
deleted file mode 100644
index 88b2765f721..00000000000
--- a/ace/Dump_T.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Dump.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_DUMP_T_H
-#define ACE_DUMP_T_H
-#include "ace/pre.h"
-
-#include "ace/Dump.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class Concrete>
-class ACE_Dumpable_Adapter : public ACE_Dumpable
-{
- // = TITLE
- // This class inherits the interface of the abstract ACE_Dumpable
- // class and is instantiated with the implementation of the
- // concrete component class <class Concrete>.
- //
- // = DESCRIPTION
- // This design is similar to the Adapter and Decorator patterns
- // from the ``Gang of Four'' book. Note that <class Concrete>
- // need not inherit from a common class since ACE_Dumpable
- // provides the uniform virtual interface!
-public:
- // = Initialization and termination methods.
- ACE_Dumpable_Adapter (const Concrete *t);
- ~ACE_Dumpable_Adapter (void);
-
- virtual void dump (void) const;
- // Concrete dump method (simply delegates to the <dump> method of
- // <class Concrete>).
-
- Concrete *operator->() const;
- // Delegate to methods in the Concrete class.
-
-private:
- const Concrete *this_;
- // Pointer to <this> of <class Concrete>.
-};
-
-// Some useful macros for conditionally compiling this feature...
-#if defined (ACE_NDEBUG)
-#define ACE_REGISTER_OBJECT(CLASS)
-#define ACE_REMOVE_OBJECT
-#else
-#define ACE_REGISTER_OBJECT(CLASS) \
- ACE_ODB::instance ()->register_object \
- (new ACE_Dumpable_Adapter<CLASS> (this));
-#define ACE_REMOVE_OBJECT \
- ACE_ODB::instance ()->remove_object \
- ((void *) this);
-#endif /* ACE_NDEBUG */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Dump_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Dump_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_DUMP_T_H */
diff --git a/ace/Dynamic.cpp b/ace/Dynamic.cpp
deleted file mode 100644
index 8edf58ef62e..00000000000
--- a/ace/Dynamic.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// Dynamic.cpp
-// $Id$
-
-#include "ace/Dynamic.h"
-#include "ace/Singleton.h"
-#include "ace/Synch_T.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Dynamic.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Dynamic, "$Id$")
-
-ACE_Dynamic::ACE_Dynamic (void)
- : is_dynamic_ (0)
-{
- ACE_TRACE ("ACE_Dynamic::ACE_Dynamic");
-}
-
-/* static */ ACE_Dynamic *
-ACE_Dynamic::instance (void)
-{
- return ACE_TSS_Singleton<ACE_Dynamic, ACE_SYNCH_NULL_MUTEX>::instance ();
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class ACE_TSS_Singleton<ACE_Dynamic, ACE_Null_Mutex>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
- #pragma instantiate ACE_TSS_Singleton<ACE_Dynamic, ACE_Null_Mutex>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Dynamic.h b/ace/Dynamic.h
deleted file mode 100644
index 3d16a9a8ca7..00000000000
--- a/ace/Dynamic.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Dynamic.h
-//
-// = AUTHOR
-// Doug Schmidt and Irfan Pyrarli.
-//
-// ============================================================================
-
-#ifndef ACE_DYNAMIC_H
-#define ACE_DYNAMIC_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch_T.h"
-#include "ace/Singleton.h"
-
-class ACE_Export ACE_Dynamic
-{
- // = TITLE
- // Checks to see if an object was dynamically allocated.
- //
- // = DESCRIPTION
- // This class holds the pointer in a thread-safe manner between
- // the call to operator new and the call to the constructor.
-public:
- // = Initialization and termination method.
- ACE_Dynamic (void);
- // Constructor.
-
- ~ACE_Dynamic (void);
- // Destructor.
-
- void set (void);
- // Sets a flag that indicates that the object was dynamically
- // created. This method is usually called in operator new and then
- // checked and reset in the constructor.
-
- int is_dynamic (void);
- // 1 if we were allocated dynamically, else 0.
-
- void reset (void);
- // Resets state flag.
-
- static ACE_Dynamic *instance (void);
-
-private:
- int is_dynamic_;
- // Flag that indicates that the object was dynamically created. This
- // method is usually called in operator new and then checked and
- // reset in the constructor.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Dynamic.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_DYNAMIC_H */
diff --git a/ace/Dynamic.i b/ace/Dynamic.i
deleted file mode 100644
index 6a32b94d4e6..00000000000
--- a/ace/Dynamic.i
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Dynamic.i
-
-ACE_INLINE
-ACE_Dynamic::~ACE_Dynamic (void)
-{
- ACE_TRACE ("ACE_Dynamic::~ACE_Dynamic");
-}
-
-ACE_INLINE void
-ACE_Dynamic::set (void)
-{
- ACE_TRACE ("ACE_Dynamic::set");
- this->is_dynamic_ = 1;
-}
-
-ACE_INLINE int
-ACE_Dynamic::is_dynamic ()
-{
- ACE_TRACE ("ACE_Dynamic::is_dynamic");
- return this->is_dynamic_;
-}
-
-ACE_INLINE void
-ACE_Dynamic::reset (void)
-{
- ACE_TRACE ("ACE_Dynamic::set");
- this->is_dynamic_ = 0;
-}
-
diff --git a/ace/Dynamic_Service.cpp b/ace/Dynamic_Service.cpp
deleted file mode 100644
index 1b8c831103b..00000000000
--- a/ace/Dynamic_Service.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Dynamic_Service.cpp
-// $Id$
-
-#ifndef ACE_DYNAMIC_SERVICE_C
-#define ACE_DYNAMIC_SERVICE_C
-
-#include "ace/Service_Config.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Service_Repository.h"
-#include "ace/Dynamic_Service.h"
-
-ACE_RCSID(ace, Dynamic_Service, "$Id$")
-
-template <class SERVICE> void
-ACE_Dynamic_Service<SERVICE>::dump (void) const
-{
- ACE_TRACE ("ACE_Dynamic_Service<SERVICE>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Get the instance using <name>.
-
-template <class SERVICE> SERVICE *
-ACE_Dynamic_Service<SERVICE>::instance (const ACE_TCHAR *name)
-{
- ACE_TRACE ("ACE_Dynamic_Service::instance");
- const ACE_Service_Type *svc_rec;
-
- if (ACE_Service_Repository::instance ()->find (name,
- &svc_rec) == -1)
- return 0;
-
- const ACE_Service_Type_Impl *type = svc_rec->type ();
-
- if (type == 0)
- return 0;
- else
- {
- void *obj = type->object ();
- return ACE_reinterpret_cast (SERVICE *, obj);
- }
-}
-
-#endif /* ACE_DYNAMIC_SERVICE_C */
diff --git a/ace/Dynamic_Service.h b/ace/Dynamic_Service.h
deleted file mode 100644
index b06f73b2ec3..00000000000
--- a/ace/Dynamic_Service.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Dynamic_Service.h
-//
-// = AUTHOR
-// Prashant Jain, Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_DYNAMIC_SERVICE_H
-#define ACE_DYNAMIC_SERVICE_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-template <class SERVICE>
-class ACE_Dynamic_Service
-{
- // = TITLE
- // Provides a general interface to retrieve arbitrary objects
- // from the ACE service repository.
- //
- // = DESCRIPTION
- // Uses "name" for lookup in the ACE service repository. Obtains
- // the object and returns it as the appropriate type.
-public:
- static SERVICE *instance (const ACE_TCHAR *name);
- // Return instance using <name> to search the Service_Repository.
-
- void dump (void) const;
- // Dump the current state of the object.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-# include "ace/Dynamic_Service.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-# pragma implementation ("Dynamic_Service.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_DYNAMIC_SERVICE_H */
diff --git a/ace/Dynamic_Service.i b/ace/Dynamic_Service.i
deleted file mode 100644
index a29b996d459..00000000000
--- a/ace/Dynamic_Service.i
+++ /dev/null
@@ -1,4 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Dynamic_Service.i
diff --git a/ace/Env_Value_T.cpp b/ace/Env_Value_T.cpp
deleted file mode 100644
index d99819ec6b9..00000000000
--- a/ace/Env_Value_T.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// $Id$
-
-#if !defined (ACE_ENV_VALUE_T_C)
-#define ACE_ENV_VALUE_T_C
-
-#include "ace/Env_Value_T.h"
-
-#if ! defined (__ACE_INLINE__)
-#include "ace/Env_Value_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Env_Value_T, "$Id$")
-
-#endif /* ACE_ENV_VALUE_T_C */
diff --git a/ace/Env_Value_T.h b/ace/Env_Value_T.h
deleted file mode 100644
index 0005d734c1f..00000000000
--- a/ace/Env_Value_T.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* This may look like C, but it's really -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = DESCRIPTION
-// Template to encapsulate getting a value from an environment variable
-// and using a supplied default value if not in the environment.
-//
-// = AUTHOR
-// Chris Cleeland (derived from work by Carlos O'Ryan)
-//
-// ============================================================================
-
-#ifndef ACE_ENV_VALUE_T_H
-#define ACE_ENV_VALUE_T_H
-#include "ace/pre.h"
-
-#include "ace/OS.h" // Need to get ACE_static_cast definition
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class T>
-class ACE_Env_Value
-{
- // = TITLE
- // Enviroment Variable Value
- //
- // = DESCRIPTION
- // Reads a variable from the user enviroment, providing a default
- // value.
- //
- // = AUTHOR
- // Chris Cleeland, Carlos O'Ryan
-public:
- ACE_Env_Value (void);
- // Default constructor which isn't bound to a specific environment
- // variable name or a default value. Before being useful it must
- // <open>'d.
-
- ACE_Env_Value (const ACE_TCHAR *varname,
- const T &vardefault);
- // Constructor that calls <open>.
-
- ~ACE_Env_Value (void);
- // Destroy the value.
-
- operator T (void);
- // Returns the value as type T.
-
- void open (const ACE_TCHAR *varname, const T &defval);
- // The constructor, read <varname> from the enviroment, using
- // <vardefault> as its value if it is not defined.
-
- const ACE_TCHAR *varname (void) const;
- // Returns the name of the variable being tracked.
-
-private:
- ACE_UNIMPLEMENTED_FUNC (ACE_Env_Value(const ACE_Env_Value<T> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Env_Value<T> operator=(const ACE_Env_Value<T> &))
- // Disallow copying and assignment.
-
- void fetch_value (void);
-
- const ACE_TCHAR *varname_;
- T value_;
-};
-
-template <class T> void ACE_Convert (const ACE_TCHAR *s, T &t);
-// Function to convert a string <s> into type <T>.
-
-#if defined (__ACE_INLINE__)
-#include "ace/Env_Value_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Env_Value_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-
-// Default calls a CTOR on type T of the form 'T::T(const char*)', but
-// users can feel free to create their own specialized conversion
-// functions if necessary, as shown below. Note that for 'char*' the
-// default is used because a simple cast will be performed and no
-// conversion will be necessary.
-
-template <class T> inline void
-ACE_Convert (const ACE_TCHAR *s, T &t)
-{
- t = T (s);
-}
-
-inline void
-ACE_Convert (const ACE_TCHAR *s, ACE_TCHAR *&v)
-{
- v = (ACE_TCHAR *) s;
-}
-
-inline void
-ACE_Convert (const ACE_TCHAR *s, const ACE_TCHAR *&v)
-{
- v = (const ACE_TCHAR *) s;
-}
-
-inline void
-ACE_Convert (const ACE_TCHAR *s, short &si)
-{
- si = ACE_static_cast (short, ACE_OS::strtol (s, 0, 10));
-}
-
-inline void
-ACE_Convert (const ACE_TCHAR *s, u_short &us)
-{
- us = ACE_static_cast (u_short, ACE_OS::strtol (s, 0, 10));
-}
-
-inline void
-ACE_Convert (const ACE_TCHAR *s, u_int &i)
-{
- i = ACE_static_cast (u_int,
- ACE_OS::strtol (s, 0, 10));
-}
-
-inline void
-ACE_Convert (const ACE_TCHAR *s, long &l)
-{
- l = ACE_OS::strtol (s, 0, 10);
-}
-
-inline void
-ACE_Convert (const ACE_TCHAR *s, int &i)
-{
- i = ACE_static_cast (int, ACE_OS::strtol (s, 0, 10));
-}
-
-inline void
-ACE_Convert (const ACE_TCHAR *s, u_long &ul)
-{
- ul = ACE_OS::strtoul (s, 0, 10);
-}
-
-inline void
-ACE_Convert (const ACE_TCHAR *s, double &d)
-{
- d = ACE_OS::strtod (s, 0);
-}
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Env_Value_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_ENV_VALUE_T_H */
diff --git a/ace/Env_Value_T.i b/ace/Env_Value_T.i
deleted file mode 100644
index 9f98f0fdb45..00000000000
--- a/ace/Env_Value_T.i
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id$
-
-template <class T> ACE_INLINE
-ACE_Env_Value<T>::operator T (void)
-{
- return value_;
-}
-
-template <class T> ACE_INLINE
-ACE_Env_Value<T>::ACE_Env_Value (void)
- : varname_ (0)
-{
-}
-
-template <class T> ACE_INLINE
-ACE_Env_Value<T>::ACE_Env_Value (const ACE_TCHAR *varname,
- const T &defval)
- : varname_ (varname),
- value_(defval)
-{
- this->fetch_value ();
-}
-
-template <class T> ACE_INLINE void
-ACE_Env_Value<T>::open (const ACE_TCHAR *varname,
- const T &defval)
-{
- varname_ = varname;
- value_ = defval;
- this->fetch_value ();
-}
-
-template <class T> ACE_INLINE void
-ACE_Env_Value<T>::fetch_value (void)
-{
- const ACE_TCHAR *env = ACE_OS::getenv (varname_);
-
- if (env != 0)
- ACE_Convert (env, value_);
-}
-
-template <class T> ACE_INLINE const ACE_TCHAR*
-ACE_Env_Value<T>::varname (void) const
-{
- return varname_;
-}
-
-template <class T> ACE_INLINE
-ACE_Env_Value<T>::~ACE_Env_Value (void)
-{
-}
diff --git a/ace/Event_Handler.cpp b/ace/Event_Handler.cpp
deleted file mode 100644
index 6e9d728c002..00000000000
--- a/ace/Event_Handler.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-// Event_Handler.cpp
-// $Id$
-
-#include "ace/Event_Handler.h"
-#include "ace/Message_Block.h"
-#include "ace/Reactor.h"
-#include "ace/Thread_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Event_Handler.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Event_Handler, "$Id$")
-
-// Implement conceptually abstract virtual functions in the base class
-// so derived classes don't have to implement unused ones.
-
-ACE_Event_Handler::ACE_Event_Handler (ACE_Reactor *r,
- int p)
- : priority_ (p),
- reactor_ (r)
-{
- // ACE_TRACE ("ACE_Event_Handler::ACE_Event_Handler");
-}
-
-ACE_Event_Handler::~ACE_Event_Handler (void)
-{
- // ACE_TRACE ("ACE_Event_Handler::~ACE_Event_Handler");
-}
-
-// Gets the file descriptor associated with this I/O device.
-
-ACE_HANDLE
-ACE_Event_Handler::get_handle (void) const
-{
- ACE_TRACE ("ACE_Event_Handler::get_handle");
- return ACE_INVALID_HANDLE;
-}
-
-// Sets the file descriptor associated with this I/O device.
-
-void
-ACE_Event_Handler::set_handle (ACE_HANDLE)
-{
- ACE_TRACE ("ACE_Event_Handler::set_handle");
-}
-
-// Gets the priority of this handler.
-
-int
-ACE_Event_Handler::priority (void) const
-{
- ACE_TRACE ("ACE_Event_Handler::priority");
- return this->priority_;
-}
-
-// Sets the priority
-
-void
-ACE_Event_Handler::priority (int priority)
-{
- ACE_TRACE ("ACE_Event_Handler::priority");
- this->priority_ = priority;
-}
-
-// Called when the object is about to be removed from the Dispatcher
-// tables.
-
-int
-ACE_Event_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
-{
- ACE_TRACE ("ACE_Event_Handler::handle_close");
- return -1;
-}
-
-// Called when input becomes available on fd.
-
-int
-ACE_Event_Handler::handle_input (ACE_HANDLE)
-{
- ACE_TRACE ("ACE_Event_Handler::handle_input");
- return -1;
-}
-
-// Called when output is possible on fd.
-
-int
-ACE_Event_Handler::handle_output (ACE_HANDLE)
-{
- ACE_TRACE ("ACE_Event_Handler::handle_output");
- return -1;
-}
-
-// Called when urgent data is available on fd.
-
-int
-ACE_Event_Handler::handle_exception (ACE_HANDLE)
-{
- ACE_TRACE ("ACE_Event_Handler::handle_exception");
- return -1;
-}
-
-// Called when timer expires, TV stores the current time.
-
-int
-ACE_Event_Handler::handle_timeout (const ACE_Time_Value &, const void *)
-{
- ACE_TRACE ("ACE_Event_Handler::handle_timeout");
- return -1;
-}
-
-// Called when a monitored Process exits
-
-int
-ACE_Event_Handler::handle_exit (ACE_Process *)
-{
- ACE_TRACE ("ACE_Event_Handler::handle_exit");
- return -1;
-}
-
-// Called when a registered signal occurs.
-
-int
-ACE_Event_Handler::handle_signal (int, siginfo_t *, ucontext_t *)
-{
- ACE_TRACE ("ACE_Event_Handler::handle_signal");
- return -1;
-}
-
-int
-ACE_Event_Handler::handle_qos (ACE_HANDLE)
-{
- ACE_TRACE ("ACE_Event_Handler::handle_qos");
- return -1;
-}
-
-int
-ACE_Event_Handler::handle_group_qos (ACE_HANDLE)
-{
- ACE_TRACE ("ACE_Event_Handler::handle_group_qos");
- return -1;
-}
-
-void
-ACE_Event_Handler::reactor (ACE_Reactor *reactor)
-{
- ACE_TRACE ("ACE_Event_Handler::reactor");
- this->reactor_ = reactor;
-}
-
-ACE_Reactor *
-ACE_Event_Handler::reactor (void) const
-{
- ACE_TRACE ("ACE_Event_Handler::reactor");
- return this->reactor_;
-}
-
-#if !defined (ACE_HAS_WINCE)
-
-// Used to read from non-socket ACE_HANDLEs in our own thread to work
-// around Win32 limitations that don't allow us to select() on
-// non-sockets (such as ACE_STDIN). This is commonly used in
-// situations where the Reactor is used to demultiplex read events on
-// ACE_STDIN on UNIX. Note that <event_handler> must be a subclass of
-// <ACE_Event_Handler>. If the <get_handle> method of this event
-// handler returns <ACE_INVALID_HANDLE> we default to reading from
-// ACE_STDIN.
-
-void *
-ACE_Event_Handler::read_adapter (void *args)
-{
- ACE_Event_Handler *this_ptr = (ACE_Event_Handler *) args;
- ACE_HANDLE handle = ACE_STDIN;
-
- while (this_ptr->handle_input (handle) != -1)
- continue;
-
- this_ptr->handle_close (handle,
- ACE_Event_Handler::READ_MASK);
- this_ptr->reactor ()->notify ();
-
- return 0;
-}
-
-int
-ACE_Event_Handler::register_stdin_handler (ACE_Event_Handler *eh,
- ACE_Reactor *reactor,
- ACE_Thread_Manager *thr_mgr,
- int flags)
-{
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG (reactor);
-
- eh->reactor (reactor);
- return thr_mgr->spawn (&read_adapter, (void *) eh, flags);
-#else
- // Keep compilers happy.
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (thr_mgr);
- return reactor->register_handler (ACE_STDIN,
- eh,
- ACE_Event_Handler::READ_MASK);
-#endif /* ACE_WIN32 */
-}
-
-int
-ACE_Event_Handler::remove_stdin_handler (ACE_Reactor *reactor,
- ACE_Thread_Manager *thr_mgr)
-{
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG (reactor);
- ACE_UNUSED_ARG (thr_mgr);
-
- // What should we do here?
- ACE_NOTSUP_RETURN (-1);
-#else
- // Keep compilers happy.
- ACE_UNUSED_ARG (thr_mgr);
- return reactor->remove_handler (ACE_STDIN,
- ACE_Event_Handler::READ_MASK);
-#endif /* ACE_WIN32 */
-}
-
-#endif /* ACE_HAS_WINCE */
-
-ACE_Notification_Buffer::ACE_Notification_Buffer (void)
-{
- ACE_TRACE ("ACE_Notification_Buffer::ACE_Notification_Buffer");
-}
-
-ACE_Notification_Buffer::ACE_Notification_Buffer (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask)
- : eh_ (eh),
- mask_ (mask)
-{
- ACE_TRACE ("ACE_Notification_Buffer::ACE_Notification_Buffer");
-}
diff --git a/ace/Event_Handler.h b/ace/Event_Handler.h
deleted file mode 100644
index 0f2f719960c..00000000000
--- a/ace/Event_Handler.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Event_Handler.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_EVENT_HANDLER_H
-#define ACE_EVENT_HANDLER_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Forward declaration.
-class ACE_Message_Block;
-class ACE_Reactor;
-class ACE_Thread_Manager;
-class ACE_Process;
-
-typedef u_long ACE_Reactor_Mask;
-
-class ACE_Export ACE_Event_Handler
-{
- // = TITLE
- // Provides an abstract interface for handling various types of
- // I/O, timer, and signal events.
- //
- // = DESCRIPTION
- // Subclasses read/write input/output on an I/O descriptor,
- // handle an exception raised on an I/O descriptor, handle a
- // timer's expiration, or handle a signal.
-public:
- enum
- {
- LO_PRIORITY = 0,
- HI_PRIORITY = 10,
- NULL_MASK = 0,
-#if defined (ACE_USE_POLL)
- READ_MASK = POLLIN,
- WRITE_MASK = POLLOUT,
- EXCEPT_MASK = POLLPRI,
-#else /* USE SELECT */
- READ_MASK = (1 << 0),
- WRITE_MASK = (1 << 1),
- EXCEPT_MASK = (1 << 2),
-#endif /* ACE_USE_POLL */
- ACCEPT_MASK = (1 << 3),
- CONNECT_MASK = (1 << 4),
- TIMER_MASK = (1 << 5),
- QOS_MASK = (1 << 6),
- GROUP_QOS_MASK = (1 << 7),
- SIGNAL_MASK = (1 << 8),
- ALL_EVENTS_MASK = READ_MASK |
- WRITE_MASK |
- EXCEPT_MASK |
- ACCEPT_MASK |
- CONNECT_MASK |
- TIMER_MASK |
- QOS_MASK |
- GROUP_QOS_MASK |
- SIGNAL_MASK,
- RWE_MASK = READ_MASK |
- WRITE_MASK |
- EXCEPT_MASK,
- DONT_CALL = (1 << 9)
- };
-
- virtual ~ACE_Event_Handler (void);
- // Destructor is virtual to enable proper cleanup.
-
- virtual ACE_HANDLE get_handle (void) const;
- // Get the I/O handle.
- virtual void set_handle (ACE_HANDLE);
- // Set the I/O handle.
-
- // = Get/set priority
-
- // Priorities run from MIN_PRIORITY (which is the "lowest priority")
- // to MAX_PRIORITY (which is the "highest priority").
- virtual int priority (void) const;
- // Get the priority of the Event_Handler.
- virtual void priority (int priority);
- // Set the priority of the Event_Handler.
-
- virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
- // Called when input events occur (e.g., connection or data).
-
- virtual int handle_output (ACE_HANDLE fd = ACE_INVALID_HANDLE);
- // Called when output events are possible (e.g., flow control
- // abates).
-
- virtual int handle_exception (ACE_HANDLE fd = ACE_INVALID_HANDLE);
- // Called when execption events occur (e.g., SIGURG).
-
- virtual int handle_timeout (const ACE_Time_Value &current_time,
- const void *act = 0);
- // Called when timer expires. <current_time> represents the current
- // time that the <Event_Handler> was selected for timeout
- // dispatching and <act> is the asynchronous completion token that
- // was passed in when <schedule_timer> was invoked.
-
- virtual int handle_exit (ACE_Process *);
- // Called when a process exits.
-
- virtual int handle_close (ACE_HANDLE handle,
- ACE_Reactor_Mask close_mask);
- // Called when object is removed from the <ACE_Reactor>.
-
- virtual int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0);
- // Called when object is signaled by OS (either via UNIX signals or
- // when a Win32 object becomes signaled).
-
- virtual int handle_qos (ACE_HANDLE = ACE_INVALID_HANDLE);
- virtual int handle_group_qos (ACE_HANDLE = ACE_INVALID_HANDLE);
-
- // = Accessors to set/get the various event demultiplexors.
- virtual void reactor (ACE_Reactor *reactor);
- virtual ACE_Reactor *reactor (void) const;
-
-#if !defined (ACE_HAS_WINCE)
- static void *read_adapter (void *event_handler);
- // Used to read from non-socket ACE_HANDLEs in our own thread to
- // work around Win32 limitations that don't allow us to <select> on
- // non-sockets (such as ACE_STDIN). This is commonly used in
- // situations where the Reactor is used to demultiplex read events
- // on ACE_STDIN on UNIX. Note that <event_handler> must be a
- // subclass of <ACE_Event_Handler>. If the <get_handle> method of
- // this event handler returns <ACE_INVALID_HANDLE> we default to
- // reading from ACE_STDIN.
-
- static int register_stdin_handler (ACE_Event_Handler *eh,
- ACE_Reactor *reactor,
- ACE_Thread_Manager *thr_mgr,
- int flags = THR_DETACHED);
- // Abstracts away from the differences between Win32 and ACE with
- // respect to reading from ACE_STDIN (which is non-<select>'able on
- // Win32.
-
- static int remove_stdin_handler (ACE_Reactor *reactor,
- ACE_Thread_Manager *thr_mgr);
- // Performs the inverse of the <register_stdin_handler> method.
-#endif /* ACE_HAS_WINCE */
-
-protected:
- ACE_Event_Handler (ACE_Reactor * = 0,
- int priority = ACE_Event_Handler::LO_PRIORITY);
- // Force ACE_Event_Handler to be an abstract base class.
-
-private:
-
- int priority_;
- // Priority of this Event_Handler.
-
- // = Pointers to the various event demultiplexors.
- ACE_Reactor *reactor_;
-};
-
-class ACE_Export ACE_Notification_Buffer
-{
- // = TITLE
- // Simple wrapper for passing <ACE_Event_Handler *>s and
- // <ACE_Reactor_Mask>s between threads.
-public:
- ACE_Notification_Buffer (void);
-
- ACE_Notification_Buffer (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask);
-
- ~ACE_Notification_Buffer (void);
- // Default dtor.
-
- ACE_Event_Handler *eh_;
- // Pointer to the Event_Handler that will be dispatched
- // by the main event loop.
-
- ACE_Reactor_Mask mask_;
- // Mask that indicates which method to call.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Event_Handler.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_EVENT_HANDLER_H */
diff --git a/ace/Event_Handler.i b/ace/Event_Handler.i
deleted file mode 100644
index 6ecccb4b1db..00000000000
--- a/ace/Event_Handler.i
+++ /dev/null
@@ -1,10 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Event_Handler.i
-
-ACE_INLINE
-ACE_Notification_Buffer::~ACE_Notification_Buffer (void)
-{
-}
-
diff --git a/ace/Event_Handler_T.cpp b/ace/Event_Handler_T.cpp
deleted file mode 100644
index f0efd27b43f..00000000000
--- a/ace/Event_Handler_T.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// Event_Handler_T.cpp
-// $Id$
-
-#ifndef EVENT_HANDLER_T_C
-#define EVENT_HANDLER_T_C
-
-#include "ace/Event_Handler_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID(ace, Event_Handler_T, "$Id$")
-
-#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Event_Handler_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Event_Handler_T)
-
-template <class T> void
-ACE_Event_Handler_T<T>::dump (void) const
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::dump");
-}
-
-template<class T>
-ACE_Event_Handler_T<T>::~ACE_Event_Handler_T (void)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::~ACE_Event_Handler_T");
- if (this->delete_handler_)
- delete this->op_handler_;
-}
-
-template <class T>
-ACE_Event_Handler_T<T>::ACE_Event_Handler_T (T *op_handler, int delete_handler,
- GET_HANDLE get_handle,
- IO_HANDLER input_h,
- CL_HANDLER close_h,
- SIG_HANDLER sig_h,
- TO_HANDLER timeout_h,
- IO_HANDLER output_h,
- SET_HANDLE set_handle,
- IO_HANDLER except_h)
- : op_handler_ (op_handler),
- input_handler_ (input_h),
- output_handler_ (output_h),
- except_handler_ (except_h),
- to_handler_ (timeout_h),
- cl_handler_ (close_h),
- sig_handler_ (sig_h),
- delete_handler_ (delete_handler),
- set_handle_ (set_handle),
- get_handle_ (get_handle)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::ACE_Event_Handler_T");
-}
-
-#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
-
-#endif /* EVENT_HANDLER_T_C */
diff --git a/ace/Event_Handler_T.h b/ace/Event_Handler_T.h
deleted file mode 100644
index 0ba36bf27ac..00000000000
--- a/ace/Event_Handler_T.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Event_Handler_T.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_EVENT_HANDLER_T_H
-#define ACE_EVENT_HANDLER_T_H
-#include "ace/pre.h"
-
-#include "ace/Event_Handler.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
-
-template <class T>
-class ACE_Event_Handler_T : public ACE_Event_Handler
-{
- // = TITLE
- // Enable a class that doesn't inherit from the
- // ACE_Event_Handler to be incorporated into the ACE_Reactor
- // framework. Thanks to Greg Lavender (g.lavender@isode.com)
- // for sharing this idea.
- //
- // = DESCRIPTION
- // It is sometimes the case that an application has a hierarchy
- // of operation dispatcher classes that have their own
- // inheritance hierarchy but also would like to integrate with
- // the ACE_Reactor. Rather than adopt a "mixin" approach, it is
- // often cleaner to define a template as a subclass of
- // ACE_Event_Handler and paramterize it with an operation
- // dispatcher type.
- //
- // When constructing an instantiation of the ACE_Event_Handler_T
- // object, a set of pointers to member functions must be
- // provided so that when one of the handle_* methods is called
- // by the ACE_Reactor, the appropriate method is called on the
- // underlying operations object. This is done since in some
- // cases it is useful to map any event that happens to the same
- // method on an object.
- //
- // The ACE_Event_Handler_T template is instantiated by an
- // operations object and registered with the ACE_Reactor, and it
- // then calls the appropriate op_handler. So, it's basically
- // just another level of indirection in event dispatching. The
- // coupling betweent the ultimate handler of the event and the
- // ACE_Event_Handler class is relaxed a bit by have this
- // intermediate <op_handler_> object of type <T> around. The
- // client object can then dynamically change the bindings for
- // the various handlers so that during the life of one of the
- // operation objects, it can change how it wants events to be
- // handled. It just instantiates a new instance of the template
- // with different bindings and reregisters this new object with
- // the ACE_Reactor.
-public:
- // = Typedefs to simplify pointer-to-member-function registration.
-
- // Get/set the underlying handle.
- typedef ACE_HANDLE (T::*GET_HANDLE) (void) const;
- typedef void (T::*SET_HANDLE) (ACE_HANDLE);
-
- typedef int (T::*IO_HANDLER) (ACE_HANDLE);
- // Handle I/O events.
-
- typedef int (T::*TO_HANDLER) (const ACE_Time_Value &, const void *);
- // Handle timeout events.
-
- typedef int (T::*CL_HANDLER) (ACE_HANDLE, ACE_Reactor_Mask);
- // Handle close events.
-
- typedef int (T::*SIG_HANDLER) (ACE_HANDLE, siginfo_t*, ucontext_t*);
- // = Initialization and termination methods.
-
- ACE_Event_Handler_T (T *op_handler,
- int delete_handler,
- GET_HANDLE get_handle = 0,
- IO_HANDLER input = 0,
- CL_HANDLER close = 0,
- SIG_HANDLER sig = 0,
- TO_HANDLER timeout = 0,
- IO_HANDLER output = 0,
- SET_HANDLE set_handle = 0,
- IO_HANDLER except = 0);
- // Initialize the op_handler.
-
- ~ACE_Event_Handler_T (void);
- // Close down and delete the <op_handler>
-
- // = Override all the ACE_Event_Handler methods.
-
- // These methods all delegate down to the <T> operations handler.
- virtual ACE_HANDLE get_handle (void) const;
- virtual void set_handle (ACE_HANDLE);
- virtual int handle_input (ACE_HANDLE fd = -1);
- virtual int handle_output (ACE_HANDLE fd = -1);
- virtual int handle_exception (ACE_HANDLE fd = -1);
- virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg = 0);
- virtual int handle_close (ACE_HANDLE fd, ACE_Reactor_Mask close_mask);
- virtual int handle_signal (ACE_HANDLE signum, siginfo_t * = 0, ucontext_t * = 0);
-
- // = Get/set the operations handler.
- T *op_handler (void);
- void op_handler (T *);
-
- // = Get/set the target pointer-to-method used for dispatching.
-
- GET_HANDLE handle_get (void);
- void handle_get (GET_HANDLE);
-
- SET_HANDLE handle_set (void);
- void handle_set (SET_HANDLE);
-
- IO_HANDLER input_handler (void);
- void input_handler (IO_HANDLER);
-
- IO_HANDLER output_handler (void);
- void output_handler (IO_HANDLER);
-
- IO_HANDLER except_handler (void);
- void except_handler (IO_HANDLER);
-
- TO_HANDLER to_handler (void);
- void to_handler (TO_HANDLER);
-
- CL_HANDLER cl_handler (void);
- void cl_handler (CL_HANDLER);
-
- SIG_HANDLER sig_handler (void);
- void sig_handler (SIG_HANDLER);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- T *op_handler_;
- // Pointer to the object that handles all the delegated operations.
-
- // = Handle input, output, and exception events.
- IO_HANDLER input_handler_;
- IO_HANDLER output_handler_;
- IO_HANDLER except_handler_;
-
- TO_HANDLER to_handler_;
- // Handle timeout events.
-
- CL_HANDLER cl_handler_;
- // Handle close events.
-
- SIG_HANDLER sig_handler_;
- // Handle signal events.
-
- int delete_handler_;
- // Keeps track of whether we need to delete the handler in the
- // destructor.
-
- // = Get/set underlying handle.
- SET_HANDLE set_handle_;
- GET_HANDLE get_handle_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Event_Handler_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Event_Handler_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Event_Handler_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
-#include "ace/post.h"
-#endif /* ACE_EVENT_HANDLER_H */
diff --git a/ace/Event_Handler_T.i b/ace/Event_Handler_T.i
deleted file mode 100644
index 4f2dc0374ae..00000000000
--- a/ace/Event_Handler_T.i
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-template<class T> ACE_INLINE void
-ACE_Event_Handler_T<T>::op_handler (T *op)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::op_handler");
- this->op_handler_ = op;
-}
-
-template<class T> ACE_INLINE T *
-ACE_Event_Handler_T<T>::op_handler (void)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::op_handler");
- return this->op_handler_;
-}
-
-template<class T> ACE_INLINE ACE_HANDLE
-ACE_Event_Handler_T<T>::get_handle (void) const
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::get_handle");
- return this->get_handle_ == 0 ? -1 : (this->op_handler_->*get_handle_) ();
-}
-
-template<class T> ACE_INLINE void
-ACE_Event_Handler_T<T>::set_handle (ACE_HANDLE h)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::set_handle");
- if (this->set_handle_ != 0)
- (this->op_handler_->*set_handle_) (h);
-}
-
-template<class T> ACE_INLINE int
-ACE_Event_Handler_T<T>::handle_input (ACE_HANDLE fd)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::handle_input");
- return this->input_handler_ == 0 ? 0 : (this->op_handler_->*input_handler_) (fd);
-}
-
-template<class T> ACE_INLINE int
-ACE_Event_Handler_T<T>::handle_output (ACE_HANDLE fd)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::handle_output");
- return this->output_handler_ == 0 ? 0 : (this->op_handler_->*output_handler_) (fd);
-}
-
-template<class T> ACE_INLINE int
-ACE_Event_Handler_T<T>::handle_exception (ACE_HANDLE fd)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::handle_exception");
- return this->except_handler_ == 0 ? 0 : (this->op_handler_->*except_handler_) (fd);
-}
-
-template<class T> ACE_INLINE int
-ACE_Event_Handler_T<T>::handle_timeout (const ACE_Time_Value &tv, const void *arg)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::handle_timeout");
- return this->to_handler_ == 0 ? 0 : (this->op_handler_->*to_handler_) (tv, arg);
-}
-
-template<class T> ACE_INLINE int
-ACE_Event_Handler_T<T>::handle_close (ACE_HANDLE fd, ACE_Reactor_Mask close_mask)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::handle_close");
- return this->cl_handler_ == 0 ? 0 : (this->op_handler_->*cl_handler_) (fd, close_mask);
-}
-
-template<class T> ACE_INLINE int
-ACE_Event_Handler_T<T>::handle_signal (ACE_HANDLE signum, siginfo_t *s, ucontext_t *u)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::handle_signal");
- return this->sig_handler_ == 0 ? 0 : (this->op_handler_->*sig_handler_) (signum, s, u);
-}
-
-template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::GET_HANDLE
-ACE_Event_Handler_T<T>::handle_get (void)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::handle_get");
- return this->get_handle_;
-}
-
-template<class T> ACE_INLINE void
-ACE_Event_Handler_T<T>::handle_get (ACE_TYPENAME ACE_Event_Handler_T<T>::GET_HANDLE h)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::handle_get");
- this->get_handle_ = h;
-}
-
-template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::SET_HANDLE
-ACE_Event_Handler_T<T>::handle_set (void)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::handle_set");
- return this->set_handle_;
-}
-
-template<class T> ACE_INLINE void
-ACE_Event_Handler_T<T>::handle_set (ACE_TYPENAME ACE_Event_Handler_T<T>::SET_HANDLE h)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::handle_set");
- this->set_handle_ = h;
-}
-
-template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER
-ACE_Event_Handler_T<T>::input_handler (void)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::input_handler");
- return this->input_handler_;
-}
-
-template<class T> ACE_INLINE void
-ACE_Event_Handler_T<T>::input_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER h)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::input_handler");
- this->input_handler_ = h;
-}
-
-template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER
-ACE_Event_Handler_T<T>::output_handler (void)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::output_handler");
- return this->output_handler_;
-}
-
-template<class T> ACE_INLINE void
-ACE_Event_Handler_T<T>::output_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER h)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::output_handler");
- this->output_handler_ = h;
-}
-
-template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER
-ACE_Event_Handler_T<T>::except_handler (void)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::except_handler");
- return this->except_handler_;
-}
-
-template<class T> ACE_INLINE void
-ACE_Event_Handler_T<T>::except_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::IO_HANDLER h)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::except_handler");
- this->except_handler_ = h;
-}
-
-template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::TO_HANDLER
-ACE_Event_Handler_T<T>::to_handler (void)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::to_handler");
- return this->to_handler_;
-}
-
-template<class T> ACE_INLINE void
-ACE_Event_Handler_T<T>::to_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::TO_HANDLER h)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::to_handler");
- this->to_handler_ = h;
-}
-
-template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::CL_HANDLER
-ACE_Event_Handler_T<T>::cl_handler (void)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::cl_handler");
- return this->cl_handler_;
-}
-
-template<class T> ACE_INLINE void
-ACE_Event_Handler_T<T>::cl_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::CL_HANDLER h)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::cl_handler");
- this->cl_handler_ = h;
-}
-
-template<class T> ACE_INLINE ACE_TYPENAME ACE_Event_Handler_T<T>::SIG_HANDLER
-ACE_Event_Handler_T<T>::sig_handler (void)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::sig_handler");
- return this->sig_handler_;
-}
-
-template<class T> ACE_INLINE void
-ACE_Event_Handler_T<T>::sig_handler (ACE_TYPENAME ACE_Event_Handler_T<T>::SIG_HANDLER h)
-{
- ACE_TRACE ("ACE_Event_Handler_T<T>::sig_handler");
- this->sig_handler_ = h;
-}
diff --git a/ace/FIFO.cpp b/ace/FIFO.cpp
deleted file mode 100644
index 588b00b318d..00000000000
--- a/ace/FIFO.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// FIFO.cpp
-// $Id$
-
-/* -*- C++ -*- */
-
-#include "ace/FIFO.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/FIFO.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, FIFO, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_FIFO)
-
-void
-ACE_FIFO::dump (void) const
-{
- ACE_TRACE ("ACE_FIFO::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("rendezvous_ = %s"), this->rendezvous_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-int
-ACE_FIFO::open (const ACE_TCHAR *r, int flags, int perms,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_FIFO::open");
- ACE_OS::strncpy (this->rendezvous_, r, MAXPATHLEN);
-
-#if defined (ACE_PSOS_DIAB_MIPS)
- if ( ACE_OS::mkfifo (this->rendezvous_, perms) == -1
- && !(errno == EEXIST))
- return -1;
-#else
- if ((flags & O_CREAT) != 0
- && ACE_OS::mkfifo (this->rendezvous_, perms) == -1
- && !(errno == EEXIST))
- return -1;
-#endif
-
- this->set_handle (ACE_OS::open (this->rendezvous_, flags, 0, sa));
- return this->get_handle () == ACE_INVALID_HANDLE ? -1 : 0;
-}
-
-ACE_FIFO::ACE_FIFO (const ACE_TCHAR *fifo_name,
- int flags,
- int perms,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_FIFO::ACE_FIFO");
- if (this->open (fifo_name, flags, perms, sa) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO")));
-}
-
-ACE_FIFO::ACE_FIFO (void)
-{
-// ACE_TRACE ("ACE_FIFO::ACE_FIFO");
-}
-
-int
-ACE_FIFO::close (void)
-{
- ACE_TRACE ("ACE_FIFO::close");
- int result = 0;
-
- if (this->get_handle () != ACE_INVALID_HANDLE)
- {
- result = ACE_OS::close (this->get_handle ());
- this->set_handle (ACE_INVALID_HANDLE);
- }
- return result;
-}
diff --git a/ace/FIFO.h b/ace/FIFO.h
deleted file mode 100644
index 8f0f44a9321..00000000000
--- a/ace/FIFO.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// FIFO.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_FIFO_H
-#define ACE_FIFO_H
-#include "ace/pre.h"
-
-#include "ace/IPC_SAP.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_FIFO : public ACE_IPC_SAP
-{
- // = TITLE
- // Abstract base class for UNIX FIFOs
- //
- // = DESCRIPTION
- // UNIX FIFOs are also known Named Pipes, which are totally
- // unrelated to Win32 Named Pipes. If you want to use a local
- // IPC mechanism that will be portable to both UNIX and Win32,
- // take a look at the <ACE_SPIPE_*> classes.
-public:
- int open (const ACE_TCHAR *rendezvous, int flags, int perms,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open up the named pipe on the <rendezvous> in accordance with the
- // flags.
-
- int close (void);
- // Close down the ACE_FIFO without removing the rendezvous point.
-
- int remove (void);
- // Close down the ACE_FIFO and remove the rendezvous point from the
- // file system.
-
- int get_local_addr (const ACE_TCHAR *&rendezvous) const;
- // Return the local address of this endpoint.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Make these protected to ensure that the class is "abstract."
- ACE_FIFO (void);
- // Default constructor.
-
- ACE_FIFO (const ACE_TCHAR *rendezvous, int flags, int perms,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open up the named pipe on the <rendezvous> in accordance with the
- // flags.
-
-private:
- ACE_TCHAR rendezvous_[MAXPATHLEN + 1];
- // Rendezvous point in the file system.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/FIFO.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_FIFO_H */
diff --git a/ace/FIFO.i b/ace/FIFO.i
deleted file mode 100644
index d640bb8141f..00000000000
--- a/ace/FIFO.i
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// FIFO.i
-
-ACE_INLINE int
-ACE_FIFO::get_local_addr (const ACE_TCHAR *&r) const
-{
- ACE_TRACE ("ACE_FIFO::get_local_addr");
- r = this->rendezvous_;
- return 0;
-}
-
-ACE_INLINE int
-ACE_FIFO::remove (void)
-{
- ACE_TRACE ("ACE_FIFO::remove");
- int result = this->close ();
- return ACE_OS::unlink (this->rendezvous_) == -1 || result == -1 ? -1 : 0;
-}
diff --git a/ace/FIFO_Recv.cpp b/ace/FIFO_Recv.cpp
deleted file mode 100644
index a2240f35b46..00000000000
--- a/ace/FIFO_Recv.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-// FIFO_Recv.cpp
-// $Id$
-
-/* -*- C++ -*- */
-
-#include "ace/FIFO_Recv.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FIFO_Recv.i"
-#endif
-
-ACE_RCSID(ace, FIFO_Recv, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Recv)
-
-void
-ACE_FIFO_Recv::dump (void) const
-{
- ACE_TRACE ("ACE_FIFO_Recv::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_FIFO::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("aux_handle_ = %d"), this->aux_handle_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-int
-ACE_FIFO_Recv::close (void)
-{
- ACE_TRACE ("ACE_FIFO_Recv::close");
- int result = ACE_FIFO::close ();
-
- if (this->aux_handle_ != ACE_INVALID_HANDLE)
- return ACE_OS::close (this->aux_handle_);
- else
- return result;
-}
-
-// Note that persistent means "open fifo for writing, as well as
-// reading." This ensures that the fifo never gets EOF, even if there
-// aren't any writers at the moment!
-
-int
-ACE_FIFO_Recv::open (const ACE_TCHAR *fifo_name,
- int flags,
- int perms,
- int persistent,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_FIFO_Recv::open");
-
- if (ACE_FIFO::open (fifo_name, ACE_NONBLOCK | flags, perms, sa) == -1)
- return -1;
- else if (this->disable (ACE_NONBLOCK) == -1)
- return -1;
- else if (persistent
- && (this->aux_handle_ = ACE_OS::open (fifo_name, O_WRONLY, 0, sa)) == ACE_INVALID_HANDLE)
- return -1;
- else
- return this->get_handle () == ACE_INVALID_HANDLE ? -1 : 0;
-}
-
-ACE_FIFO_Recv::ACE_FIFO_Recv (void)
- : aux_handle_ (ACE_INVALID_HANDLE)
-{
- ACE_TRACE ("ACE_FIFO_Recv::ACE_FIFO_Recv");
-}
-
-ACE_FIFO_Recv::ACE_FIFO_Recv (const ACE_TCHAR *fifo_name,
- int flags,
- int perms,
- int persistent,
- LPSECURITY_ATTRIBUTES sa)
- : aux_handle_ (ACE_INVALID_HANDLE)
-{
- ACE_TRACE ("ACE_FIFO_Recv::ACE_FIFO_Recv");
-
- if (this->ACE_FIFO_Recv::open (fifo_name,
- flags,
- perms,
- persistent,
- sa) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO_Recv")));
-}
diff --git a/ace/FIFO_Recv.h b/ace/FIFO_Recv.h
deleted file mode 100644
index c035343fb60..00000000000
--- a/ace/FIFO_Recv.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// FIFO_Recv.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_FIFO_RECV_H
-#define ACE_FIFO_RECV_H
-#include "ace/pre.h"
-
-#include "ace/FIFO.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_FIFO_Recv : public ACE_FIFO
-{
- // = TITLE
- // Receiver side of the bytestream C++ wrapper for UNIX
- // FIFOs.
-public:
- // = Initialization methods.
- ACE_FIFO_Recv (void);
- // Default constructor.
-
- ACE_FIFO_Recv (const ACE_TCHAR *rendezvous,
- int flags = O_CREAT | O_RDONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
- int persistent = 1,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open up a bytestream named pipe for reading.
-
- int open (const ACE_TCHAR *rendezvous,
- int flags = O_CREAT | O_RDONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
- int persistent = 1,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open up a bytestream named pipe for reading.
-
- int close (void);
- // Close down the named pipe.
-
- ssize_t recv (void *buf, size_t len);
- // Recv <buf> of up to <len> bytes.
-
- ssize_t recv_n (void *buf, size_t len);
- // Recv <buf> of exactly <len> bytes (block until done).
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_HANDLE aux_handle_;
- // Auxiliary handle that is used to implement persistent FIFOs.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FIFO_Recv.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_FIFO_RECV_H */
diff --git a/ace/FIFO_Recv.i b/ace/FIFO_Recv.i
deleted file mode 100644
index 693b2a944fe..00000000000
--- a/ace/FIFO_Recv.i
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// FIFO_Recv.i
-
-ASYS_INLINE ssize_t
-ACE_FIFO_Recv::recv (void *buf, size_t len)
-{
- ACE_TRACE ("ACE_FIFO_Recv::recv");
- return ACE_OS::read (this->get_handle (), (char *) buf, len);
-}
-
-ASYS_INLINE ssize_t
-ACE_FIFO_Recv::recv_n (void *buf, size_t n)
-{
- ACE_TRACE ("ACE_FIFO_Recv::recv_n");
- return ACE::recv_n (this->get_handle (), buf, n);
-}
diff --git a/ace/FIFO_Recv_Msg.cpp b/ace/FIFO_Recv_Msg.cpp
deleted file mode 100644
index 7f086e4b101..00000000000
--- a/ace/FIFO_Recv_Msg.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// FIFO_Recv_Msg.cpp
-// $Id$
-
-/* -*- C++ -*- */
-
-#include "ace/FIFO_Recv_Msg.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FIFO_Recv_Msg.i"
-#endif
-
-ACE_RCSID(ace, FIFO_Recv_Msg, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Recv_Msg)
-
-void
-ACE_FIFO_Recv_Msg::dump (void) const
-{
- ACE_TRACE ("ACE_FIFO_Recv_Msg::dump");
- ACE_FIFO_Recv::dump ();
-}
-
-// Note that persistent means "open FIFO for writing, as well as
-// reading." This ensures that the FIFO never gets EOF, even if there
-// aren't any writers at the moment!
-
-int
-ACE_FIFO_Recv_Msg::open (const ACE_TCHAR *fifo_name,
- int flags,
- int perms,
- int persistent,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_FIFO_Recv_Msg::open");
-
- return ACE_FIFO_Recv::open (fifo_name,
- flags,
- perms,
- persistent,
- sa);
-}
-
-ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (void)
-{
- ACE_TRACE ("ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg");
-}
-
-ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (const ACE_TCHAR *fifo_name,
- int flags,
- int perms,
- int persistent,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg");
-
- if (this->ACE_FIFO_Recv_Msg::open (fifo_name,
- flags,
- perms,
- persistent,
- sa) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO_Recv_Msg")));
-}
diff --git a/ace/FIFO_Recv_Msg.h b/ace/FIFO_Recv_Msg.h
deleted file mode 100644
index 4cc19ff2675..00000000000
--- a/ace/FIFO_Recv_Msg.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// FIFO_Recv_Msg.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_FIFO_RECV_MSG_H
-#define ACE_FIFO_RECV_MSG_H
-#include "ace/pre.h"
-
-#include "ace/FIFO_Recv.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_FIFO_Recv_Msg : public ACE_FIFO_Recv
-{
- // = TITLE
- // Receiver side for the record oriented C++ wrapper for UNIX FIFOs.
-public:
- // = Initialization methods.
- ACE_FIFO_Recv_Msg (void);
- // Default constructor.
-
- ACE_FIFO_Recv_Msg (const ACE_TCHAR *rendezvous,
- int flags = O_CREAT | O_RDONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
- int persistent = 1,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open up a record-oriented named pipe for reading.
-
- int open (const ACE_TCHAR *rendezvous,
- int flags = O_CREAT | O_RDONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
- int persistent = 1,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open up a record-oriented named pipe for reading.
-
- ssize_t recv (ACE_Str_Buf &msg);
- // Recv <msg> as an ACE_Str_Buf.
-
- ssize_t recv (void *buf, size_t len);
- // Recv <msg> as a buffer.
-
-#if defined (ACE_HAS_STREAM_PIPES)
- ssize_t recv (ACE_Str_Buf *data,
- ACE_Str_Buf *cntl,
- int *flags);
- // Recv <data> and <cntl> message via Stream pipes.
-
- ssize_t recv (int *band,
- ACE_Str_Buf *data,
- ACE_Str_Buf *cntl,
- int *flags);
- // Recv <data> and <cntl> message via Stream pipes in "band" mode.
-#endif /* ACE_HAS_STREAM_PIPES */
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FIFO_Recv_Msg.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_FIFO_RECV_MSG_H */
diff --git a/ace/FIFO_Recv_Msg.i b/ace/FIFO_Recv_Msg.i
deleted file mode 100644
index dce1d06e29a..00000000000
--- a/ace/FIFO_Recv_Msg.i
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// FIFO_Recv_Msg.i
-
-// Note that the return values mean different things if
-// ACE_HAS_STREAM_PIPES vs. if it doesn't... See the manual page on
-// getmsg(2) and read(2) for more details.
-
-ASYS_INLINE ssize_t
-ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf &recv_msg)
-{
- ACE_TRACE ("ACE_FIFO_Recv_Msg::recv");
-#if defined (ACE_HAS_STREAM_PIPES)
- int i = 0;
- return ACE_OS::getmsg (this->get_handle (),
- (strbuf *) 0,
- (strbuf *) &recv_msg,
- &i);
-#else /* Do the ol' 2-read trick... */
- if (ACE_OS::read (this->get_handle (),
- (char *) &recv_msg.len,
- sizeof recv_msg.len) != sizeof recv_msg.len)
- return -1;
- else
- return ACE_OS::read (this->get_handle (),
- (char *) recv_msg.buf,
- (int) recv_msg.len);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-ASYS_INLINE ssize_t
-ACE_FIFO_Recv_Msg::recv (void *buf, size_t max_len)
-{
- ACE_TRACE ("ACE_FIFO_Recv_Msg::recv");
- ACE_Str_Buf recv_msg ((char *) buf, 0, max_len);
-
- return this->recv (recv_msg);
-}
-
-#if defined (ACE_HAS_STREAM_PIPES)
-ASYS_INLINE ssize_t
-ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf *data,
- ACE_Str_Buf *cntl,
- int *flags)
-{
- ACE_TRACE ("ACE_FIFO_Recv_Msg::recv");
- return ACE_OS::getmsg (this->get_handle (),
- (strbuf *) cntl,
- (strbuf *) data,
- flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_FIFO_Recv_Msg::recv (int *band,
- ACE_Str_Buf *data,
- ACE_Str_Buf *cntl,
- int *flags)
-{
- ACE_TRACE ("ACE_FIFO_Recv_Msg::recv");
- return ACE_OS::getpmsg (this->get_handle (),
- (strbuf *) cntl,
- (strbuf *) data,
- band,
- flags);
-}
-#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/ace/FIFO_Send.cpp b/ace/FIFO_Send.cpp
deleted file mode 100644
index da38a6857b6..00000000000
--- a/ace/FIFO_Send.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// FIFO_Send.cpp
-// $Id$
-
-/* -*- C++ -*- */
-
-#include "ace/FIFO_Send.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FIFO_Send.i"
-#endif
-
-ACE_RCSID(ace, FIFO_Send, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Send)
-
-void
-ACE_FIFO_Send::dump (void) const
-{
- ACE_TRACE ("ACE_FIFO_Send::dump");
- ACE_FIFO::dump ();
-}
-
-ACE_FIFO_Send::ACE_FIFO_Send (void)
-{
-// ACE_TRACE ("ACE_FIFO_Send::ACE_FIFO_Send");
-}
-
-int
-ACE_FIFO_Send::open (const ACE_TCHAR *rendezvous_name,
- int flags,
- int perms,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_FIFO_Send::open");
- return ACE_FIFO::open (rendezvous_name,
- flags | O_WRONLY,
- perms,
- sa);
-}
-
-ACE_FIFO_Send::ACE_FIFO_Send (const ACE_TCHAR *fifo_name,
- int flags,
- int perms,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_FIFO_Send::ACE_FIFO_Send");
- if (this->ACE_FIFO_Send::open (fifo_name,
- flags,
- perms,
- sa) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_FIFO_Send::ACE_FIFO_Send")));
-}
diff --git a/ace/FIFO_Send.h b/ace/FIFO_Send.h
deleted file mode 100644
index a9733f8d478..00000000000
--- a/ace/FIFO_Send.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// FIFO_Send.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_FIFO_SEND_H
-#define ACE_FIFO_SEND_H
-#include "ace/pre.h"
-
-#include "ace/FIFO.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_FIFO_Send : public ACE_FIFO
-{
- // = TITLE
- // Sender side for the bytestream C++ wrapper for UNIX FIFOs
-public:
- // = Initialization methods.
- ACE_FIFO_Send (void);
- // Default constructor.
-
- ACE_FIFO_Send (const ACE_TCHAR *rendezvous,
- int flags = O_WRONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open up a bytestream named pipe for writing.
-
- int open (const ACE_TCHAR *rendezvous,
- int flags = O_WRONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open up a bytestream named pipe for writing.
-
- ssize_t send (const void *buf, size_t len);
- // Send <buf> of up to <len> bytes.
-
- ssize_t send_n (const void *buf, size_t len);
- // Send <buf> of exactly <len> bytes (block until done).
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FIFO_Send.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_FIFO_SEND_H */
diff --git a/ace/FIFO_Send.i b/ace/FIFO_Send.i
deleted file mode 100644
index c7e20eae8d2..00000000000
--- a/ace/FIFO_Send.i
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// FIFO_Send.i
-
-ASYS_INLINE ssize_t
-ACE_FIFO_Send::send (const void *buf, size_t len)
-{
- ACE_TRACE ("ACE_FIFO_Send::send");
- return ACE_OS::write (this->get_handle (), (const char *) buf, len);
-}
-
-ASYS_INLINE ssize_t
-ACE_FIFO_Send::send_n (const void *buf, size_t n)
-{
- ACE_TRACE ("ACE_FIFO_Send::send_n");
- return ACE::send_n (this->get_handle (), buf, n);
-}
diff --git a/ace/FIFO_Send_Msg.cpp b/ace/FIFO_Send_Msg.cpp
deleted file mode 100644
index d1c4455e9b8..00000000000
--- a/ace/FIFO_Send_Msg.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-// FIFO_Send_Msg.cpp
-// $Id$
-
-/* -*- C++ -*- */
-
-#include "ace/FIFO_Send_Msg.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FIFO_Send_Msg.i"
-#endif
-
-ACE_RCSID(ace, FIFO_Send_Msg, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Send_Msg)
-
-void
-ACE_FIFO_Send_Msg::dump (void) const
-{
- ACE_TRACE ("ACE_FIFO_Send_Msg::dump");
- ACE_FIFO_Send::dump ();
-}
-
-ssize_t
-ACE_FIFO_Send_Msg::send (const ACE_Str_Buf &send_msg)
-{
- // ACE_TRACE ("ACE_FIFO_Send_Msg::send");
-#if defined (ACE_HAS_STREAM_PIPES)
- return ACE_OS::putmsg (this->get_handle (),
- (strbuf *) 0,
- (strbuf *) &send_msg,
- 0);
-#else
- iovec iov[2];
-
- iov[0].iov_base = (char *) &send_msg.len;
- iov[0].iov_len = sizeof send_msg.len;
-
- iov[1].iov_base = (char *) send_msg.buf;
- iov[1].iov_len = int (send_msg.len);
-
- return ACE_OS::writev (this->get_handle (), iov, 2);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (void)
-{
-// ACE_TRACE ("ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg");
-}
-
-int
-ACE_FIFO_Send_Msg::open (const ACE_TCHAR *fifo_name,
- int flags,
- int perms,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_FIFO_Send_Msg::open");
- return ACE_FIFO_Send::open (fifo_name, flags | O_WRONLY, perms, sa);
-}
-
-ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (const ACE_TCHAR *fifo_name,
- int flags,
- int perms,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg");
- if (this->ACE_FIFO_Send_Msg::open (fifo_name, flags, perms, sa) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO_Send_Msg")));
-}
diff --git a/ace/FIFO_Send_Msg.h b/ace/FIFO_Send_Msg.h
deleted file mode 100644
index 0ed9ce9a707..00000000000
--- a/ace/FIFO_Send_Msg.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// FIFO_Send_Msg.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_FIFO_SEND_MSG_H
-#define ACE_FIFO_SEND_MSG_H
-#include "ace/pre.h"
-
-#include "ace/FIFO_Send.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_FIFO_Send_Msg : public ACE_FIFO_Send
-{
- // = TITLE
- // Sender side for the Record oriented C++ wrapper for UNIX
- // FIFOs.
-public:
- // = Initialization methods.
- ACE_FIFO_Send_Msg (void);
- // Default constructor.
-
- ACE_FIFO_Send_Msg (const ACE_TCHAR *rendezvous,
- int flags = O_WRONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open up a record-oriented named pipe for writing.
-
- int open (const ACE_TCHAR *rendezvous,
- int flags = O_WRONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open up a record-oriented named pipe for writing.
-
- ssize_t send (const ACE_Str_Buf &msg);
- // Send <buf> of up to <len> bytes.
-
- ssize_t send (const void *buf, size_t len);
- // Send <buf> of exactly <len> bytes (block until done).
-
-#if defined (ACE_HAS_STREAM_PIPES)
- ssize_t send (const ACE_Str_Buf *data,
- const ACE_Str_Buf *cntl = 0,
- int flags = 0);
- // Send <data> and <cntl> message via Stream pipes.
-
- ssize_t send (int band,
- const ACE_Str_Buf *data,
- const ACE_Str_Buf *cntl = 0,
- int flags = MSG_BAND);
- // Send <data> and <cntl> message via Stream pipes in "band" mode.
-#endif /* ACE_HAS_STREAM_PIPES */
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FIFO_Send_Msg.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_FIFO_SEND_MSG_H */
diff --git a/ace/FIFO_Send_Msg.i b/ace/FIFO_Send_Msg.i
deleted file mode 100644
index e81484983c2..00000000000
--- a/ace/FIFO_Send_Msg.i
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// FIFO_Send_Msg.i
-
-ASYS_INLINE ssize_t
-ACE_FIFO_Send_Msg::send (const void *buf, size_t len)
-{
- ACE_TRACE ("ACE_FIFO_Send_Msg::send");
- ACE_Str_Buf send_msg ((char *) buf, len);
-
- return this->send (send_msg);
-}
-
-#if defined (ACE_HAS_STREAM_PIPES)
-ASYS_INLINE ssize_t
-ACE_FIFO_Send_Msg::send (const ACE_Str_Buf *data,
- const ACE_Str_Buf *cntl,
- int flags)
-{
- ACE_TRACE ("ACE_FIFO_Send_Msg::send");
- return ACE_OS::putmsg (this->get_handle (),
- (strbuf *) cntl,
- (strbuf *) data,
- flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_FIFO_Send_Msg::send (int band,
- const ACE_Str_Buf *data,
- const ACE_Str_Buf *cntl,
- int flags)
-{
- ACE_TRACE ("ACE_FIFO_Send_Msg::send");
- return ACE_OS::putpmsg (this->get_handle (),
- (strbuf *) cntl,
- (strbuf *) data,
- band,
- flags);
-}
-#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/ace/FILE.cpp b/ace/FILE.cpp
deleted file mode 100644
index a3d6d5a5e52..00000000000
--- a/ace/FILE.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-// FILE.cpp
-// $Id$
-
-/* Defines the member functions for the base class of the ACE_IO_SAP
- ACE_FILE abstraction. */
-
-#include "ace/FILE.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FILE.i"
-#endif
-
-ACE_RCSID(ace, FILE, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_FILE)
-
-void
-ACE_FILE::dump (void) const
-{
- ACE_TRACE ("ACE_FILE::dump");
- ACE_IO_SAP::dump ();
-}
-
-// This is the do-nothing constructor.
-
-ACE_FILE::ACE_FILE (void)
-{
- ACE_TRACE ("ACE_FILE::ACE_FILE");
-}
-
-// Close the file
-
-int
-ACE_FILE::close (void)
-{
- ACE_TRACE ("ACE_FILE::close");
- int result = ACE_OS::close (this->get_handle ());
- this->set_handle (ACE_INVALID_HANDLE);
- return result;
-}
-
-int
-ACE_FILE::get_info (ACE_FILE_Info *finfo)
-{
- ACE_TRACE ("ACE_FILE::get_info");
- struct stat filestatus;
-
- int result = ACE_OS::fstat (this->get_handle (),
- &filestatus);
-
- if (result == 0)
- {
- finfo->mode_ = filestatus.st_mode;
- finfo->nlink_ = filestatus.st_nlink;
- finfo->size_ = filestatus.st_size;
- }
-
- return result;
-}
-
-int
-ACE_FILE::get_info (ACE_FILE_Info &finfo)
-{
- ACE_TRACE ("ACE_FILE::get_info");
-
- return this->get_info (&finfo);
-}
-
-int
-ACE_FILE::truncate (off_t length)
-{
- ACE_TRACE ("ACE_FILE::truncate");
- return ACE_OS::ftruncate (this->get_handle(), length);
-}
-
-off_t
-ACE_FILE::seek (off_t offset, int startpos)
-{
- return ACE_OS::lseek (this->get_handle (),
- offset,
- startpos);
-}
-
-off_t
-ACE_FILE::position (long offset, int startpos)
-{
- ACE_TRACE ("ACE_FILE::position");
- return this->seek (offset, startpos);
-}
-
-off_t
-ACE_FILE::tell (void)
-{
- ACE_TRACE ("ACE_FILE::position");
- return ACE_OS::lseek (this->get_handle (), 0, SEEK_CUR);
-}
-
-off_t
-ACE_FILE::position (void)
-{
- ACE_TRACE ("ACE_FILE::position");
- return this->tell ();
-}
-
-// Return the local endpoint address.
-
-int
-ACE_FILE::get_local_addr (ACE_Addr &addr) const
-{
- ACE_TRACE ("ACE_FILE::get_local_addr");
-
- // Perform the downcast since <addr> had better be an
- // <ACE_FILE_Addr>.
- ACE_FILE_Addr *file_addr =
- ACE_dynamic_cast (ACE_FILE_Addr *, &addr);
-
- if (file_addr == 0)
- return -1;
- else
- {
- *file_addr = this->addr_;
- return 0;
- }
-}
-
-// Return the same result as <get_local_addr>.
-
-int
-ACE_FILE::get_remote_addr (ACE_Addr &addr) const
-{
- ACE_TRACE ("ACE_FILE::get_remote_addr");
-
- return this->get_local_addr (addr);
-}
-
-int
-ACE_FILE::remove (void)
-{
- ACE_TRACE ("ACE_FILE::remove");
-
- this->close ();
- return ACE_OS::unlink (this->addr_.get_path_name ());
-}
-
-int
-ACE_FILE::unlink (void)
-{
- ACE_TRACE ("ACE_FILE::unlink");
-
- return ACE_OS::unlink (this->addr_.get_path_name ());
-}
diff --git a/ace/FILE.h b/ace/FILE.h
deleted file mode 100644
index 92f60ab7abb..00000000000
--- a/ace/FILE.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// FILE.h
-//
-// = AUTHOR
-// Gerhard Lenzer
-//
-// ============================================================================
-
-#ifndef ACE_FILE_H
-#define ACE_FILE_H
-#include "ace/pre.h"
-
-#include "ace/IO_SAP.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/FILE_Addr.h"
-
-// The following is necessary since many C++ compilers don't support
-// typedef'd types inside of classes used as formal template
-// arguments... ;-(. Luckily, using the C++ preprocessor I can hide
-// most of this nastiness!
-
-#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
-#define ACE_FILE_CONNECTOR ACE_FILE_Connector
-#define ACE_FILE_STREAM ACE_FILE_IO
-#else /* TEMPLATES are broken (must be a cfront-based compiler...) */
-#define ACE_FILE_CONNECTOR ACE_FILE_Connector, ACE_FILE_Addr
-#define ACE_FILE_STREAM ACE_FILE_IO, ACE_FILE_Addr
-#endif /* ACE_TEMPLATE_TYPEDEFS */
-
-class ACE_Export ACE_FILE_Info
-{
- // = TITLE
- // Abstracts basic OS FILE information.
-public:
- mode_t mode_;
- // mode of file
-
- nlink_t nlink_;
- // no of links
-
- off_t size_;
- // size of file
-};
-
-class ACE_Export ACE_FILE : public ACE_IO_SAP
-{
- // = TITLE
- // Defines the core methods of the <ACE_FILE> abstraction.
-public:
- int close (void);
- // Close the <ACE_FILE> handle without removing the <ACE_FILE> from
- // the file system.
-
- int remove (void);
- // Close and remove the <ACE_FILE> from the file system.
-
- int unlink (void);
- // Remove the <ACE_FILE> from the file system without closing the
- // <ACE_FILE> handle.
-
- int get_info (ACE_FILE_Info *finfo);
- // Get information on this <ACE_FILE>.
-
- int get_info (ACE_FILE_Info &finfo);
- // Get information on this <ACE_FILE>.
-
- int truncate (off_t length);
- // Set filesize to length byte.
-
- off_t seek (off_t offset,
- int whence = SEEK_CUR);
- // Sets the file pointer as follows:
- // o If <whence> is <SEEK_SET>, the pointer is set to <offset>
- // bytes.
- //
- // o If <whence> is <SEEK_CUR>, the pointer is set to its
- // current location plus <offset>.
- //
- // o If <whence> is <SEEK_END>, the pointer is set to the size
- // of the file plus offset.
- off_t position (long offset, int startpos);
- // Same as <seek>, but <position> is deprecated.
-
- off_t tell (void);
- // Return an offset for the file handle.
-
- off_t position (void);
- // Same as <tell>, but <position> is deprecated.
-
- int disable (int signum) const ;
- // Disable signal <signum>
- // This is here to prevent Win32 from
- // disabling SPIPE using socket calls
-
- int get_local_addr (ACE_Addr &) const;
- // Return the local endpoint address in the referenced <ACE_Addr>.
- // Returns 0 if successful, else -1.
-
- int get_remote_addr (ACE_Addr &) const;
- // Return the same thing as <get_local_addr>.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_FILE (void);
- // Ensure that this class is only created by the
- // <ACE_FILE_Connector>.
-
- ACE_FILE_Addr addr_;
- // File we are "connected" with...
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FILE.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_FILE_H */
diff --git a/ace/FILE.i b/ace/FILE.i
deleted file mode 100644
index cf1f4986479..00000000000
--- a/ace/FILE.i
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// FILE.i
-
-ASYS_INLINE int
-ACE_FILE::disable (int signum) const
-{
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG (signum) ;
- return 0 ;
-#else /* ACE_WIN32 */
- return ACE_IO_SAP::disable (signum) ;
-#endif /* ACE_WIN32 */
-}
-
diff --git a/ace/FILE_Addr.cpp b/ace/FILE_Addr.cpp
deleted file mode 100644
index 1e27092a4ec..00000000000
--- a/ace/FILE_Addr.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-// $Id$
-
-#include "ace/FILE_Addr.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/FILE_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, FILE_Addr, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_FILE_Addr)
-
-ACE_FILE_Addr::ACE_FILE_Addr (void)
- : ACE_Addr (AF_FILE, sizeof this->filename_)
-{
- this->filename_[0] = '\0';
-}
-
-int
-ACE_FILE_Addr::set (const ACE_FILE_Addr &sa)
-{
- if (sa.get_type () == AF_ANY)
- {
-#if defined (ACE_DEFAULT_TEMP_FILE)
- // Create a temporary file.
- ACE_OS::strcpy (this->filename_,
- ACE_DEFAULT_TEMP_FILE);
-#else /* ACE_DEFAULT_TEMP_FILE */
- if (ACE::get_temp_dir (this->filename_,
- MAXPATHLEN - 15) == -1) // -15 for ace-file-XXXXXX
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Temporary path too long, ")
- ACE_TEXT ("defaulting to current directory\n")));
- this->filename_[0] = 0;
- }
-
- // Add the filename to the end
- ACE_OS::strcat (this->filename_, ACE_TEXT ("ace-file-XXXXXX"));
-
-#endif /* ACE_DEFAULT_TEMP_FILE */
-
- ACE_OS::mktemp (this->filename_);
- this->base_set (AF_FILE,
- ACE_OS::strlen (this->filename_) + 1);
- }
- else
- {
- (void) ACE_OS::strncpy (this->filename_,
- sa.filename_,
- sa.get_size ());
-
- this->base_set (sa.get_type (),
- sa.get_size ());
- }
- return 0;
-}
-
-// Copy constructor.
-
-ACE_FILE_Addr::ACE_FILE_Addr (const ACE_FILE_Addr &sa)
- : ACE_Addr (AF_FILE, sizeof this->filename_)
-{
- this->set (sa);
-}
-
-int
-ACE_FILE_Addr::set (const ACE_TCHAR *filename)
-{
- this->ACE_Addr::base_set (AF_FILE,
- ACE_OS::strlen (filename) + 1);
- (void) ACE_OS::strncpy (this->filename_,
- filename,
- sizeof this->filename_);
- return 0;
-}
-
-ACE_FILE_Addr &
-ACE_FILE_Addr::operator= (const ACE_FILE_Addr &sa)
-{
- if (this != &sa)
- this->set (sa);
- return *this;
-}
-
-// Create a ACE_Addr from a ACE_FILE pathname.
-
-ACE_FILE_Addr::ACE_FILE_Addr (const ACE_TCHAR *filename)
-{
- this->set (filename);
-}
-
-int
-ACE_FILE_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const
-{
- ACE_OS::strncpy (s, this->filename_, len);
- return 0;
-}
-
-void
-ACE_FILE_Addr::dump (void) const
-{
- ACE_TRACE ("ACE_FILE_Addr::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("filename_ = %s"), this->filename_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
diff --git a/ace/FILE_Addr.h b/ace/FILE_Addr.h
deleted file mode 100644
index 1100c1f23e2..00000000000
--- a/ace/FILE_Addr.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// FILE_Addr.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_FILE_ADDR_H
-#define ACE_FILE_ADDR_H
-#include "ace/pre.h"
-
-#include "ace/Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/ACE.h"
-
-class ACE_Export ACE_FILE_Addr : public ACE_Addr
-{
- // = TITLE
- // Defines the FILE address family address format.
-public:
- // = Initialization methods.
- ACE_FILE_Addr (void);
- // Default constructor.
-
- ACE_FILE_Addr (const ACE_FILE_Addr &sa);
- // Copy constructor.
-
- int set (const ACE_FILE_Addr &sa);
- // Acts like a copy constructor. If <sa> == ACE_Addr::sap_any then
- // create a temporary filename using <ACE_OS::mktemp>.
-
- ACE_FILE_Addr (const ACE_TCHAR *filename);
- // Create a ACE_FILE_Addr from a pathname.
-
- int set (const ACE_TCHAR *filename);
- // Create a ACE_FILE_Addr from a pathname.
-
- ACE_FILE_Addr &operator= (const ACE_FILE_Addr &);
- // Assignment operator.
-
- virtual void *get_addr (void) const;
- // Return a pointer to the address.
-
- virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
- // Transform the current address into string format.
-
- int operator == (const ACE_FILE_Addr &SAP) const;
- // Compare two addresses for equality.
-
- int operator != (const ACE_FILE_Addr &SAP) const;
- // Compare two addresses for inequality.
-
- const ACE_TCHAR *get_path_name (void) const;
- // Return the path name used for the rendezvous point.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_TCHAR filename_[MAXNAMLEN + 1];
- // Name of the file.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/FILE_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_FILE_ADDR_H */
diff --git a/ace/FILE_Addr.i b/ace/FILE_Addr.i
deleted file mode 100644
index 6acce0515b8..00000000000
--- a/ace/FILE_Addr.i
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// FILE_Addr.i
-
-// Do nothing constructor.
-
-// Transform the current address into string format.
-
-#include "ace/SString.h"
-
-// Return the address.
-
-ACE_INLINE void *
-ACE_FILE_Addr::get_addr (void) const
-{
- return (void *) &this->filename_;
-}
-
-// Compare two addresses for equality.
-
-ACE_INLINE int
-ACE_FILE_Addr::operator == (const ACE_FILE_Addr &sap) const
-{
- return ACE_OS::strcmp (this->filename_, sap.filename_) == 0;
-}
-
-// Compare two addresses for inequality.
-
-ACE_INLINE int
-ACE_FILE_Addr::operator != (const ACE_FILE_Addr &sap) const
-{
- return !((*this) == sap); // This is lazy, of course... ;-)
-}
-
-// Return the path name used for the rendezvous point.
-
-ACE_INLINE const ACE_TCHAR *
-ACE_FILE_Addr::get_path_name (void) const
-{
- return this->filename_;
-}
-
diff --git a/ace/FILE_Connector.cpp b/ace/FILE_Connector.cpp
deleted file mode 100644
index 7e28fcfe791..00000000000
--- a/ace/FILE_Connector.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// FILE_Connector.cpp
-// $Id$
-
-#include "ace/FILE_Connector.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FILE_Connector.i"
-#endif
-
-ACE_RCSID(ace, FILE_Connector, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_FILE_Connector)
-
-void
-ACE_FILE_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_FILE_Connector::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_FILE_Connector::ACE_FILE_Connector (void)
-{
- ACE_TRACE ("ACE_FILE_Connector::ACE_FILE_Connector");
-}
-
-int
-ACE_FILE_Connector::connect (ACE_FILE_IO &new_io,
- const ACE_FILE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &,
- int,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_FILE_Connector::connect");
- ACE_ASSERT (new_io.get_handle () == ACE_INVALID_HANDLE);
-
- // Check to see if caller has requested that we create the filename.
- if (ACE_reinterpret_cast (const ACE_Addr &,
- ACE_const_cast (ACE_FILE_Addr &,
- remote_sap)) == ACE_Addr::sap_any)
- // Create a new temporary file.
- new_io.addr_ =
- ACE_FILE_Addr (ACE_sap_any_cast (ACE_FILE_Addr &)); // class copy.
- else
- new_io.addr_ = remote_sap; // class copy.
-
- ACE_HANDLE handle = ACE::handle_timed_open (timeout,
- new_io.addr_.get_path_name (),
- flags,
- perms);
- new_io.set_handle (handle);
- return handle == ACE_INVALID_HANDLE ? -1 : 0;
-}
-
diff --git a/ace/FILE_Connector.h b/ace/FILE_Connector.h
deleted file mode 100644
index 8a52471d059..00000000000
--- a/ace/FILE_Connector.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// FILE_Connector.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_FILE_CONNECTOR_H
-#define ACE_FILE_CONNECTOR_H
-#include "ace/pre.h"
-
-#include "ace/FILE_IO.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_FILE_Connector
-{
- // = TITLE
- // Defines an active connection factory for the ACE_FILE wrappers.
-public:
- // = Initialization methods.
- ACE_FILE_Connector (void);
- // Default constructor.
-
- ACE_FILE_Connector (ACE_FILE_IO &new_io,
- const ACE_FILE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR | O_CREAT,
- int perms = ACE_DEFAULT_FILE_PERMS);
- // Actively ``connect'' and produce a <new_io> <ACE_FILE_IO> object
- // if things go well. The <remote_sap> is the file that we are
- // trying to create/open. If it's the default value of
- // <ACE_Addr::sap_any> then the user is letting the OS create the
- // filename (via <ACE_OS::mktemp>). The <timeout> is the amount of
- // time to wait to create/open the file. If it's 0 then we block
- // indefinitely. If *timeout == {0, 0} then the file is created
- // using non-blocking mode. In this case, if the create/open can't
- // be done immediately the value of -1 is returned with <errno ==
- // EWOULDBLOCK>. If *timeout > {0, 0} then this is the amount of
- // time to wait before timing out. If the time expires before the
- // connection is made <errno == ETIME>. The <local_sap> and
- // <reuse_addr> parameters are ignored. The <flags> and <perms>
- // arguments are passed down to the <ACE_OS::open> method.
-
- int connect (ACE_FILE_IO &new_io,
- const ACE_FILE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR | O_CREAT,
- int perms = ACE_DEFAULT_FILE_PERMS);
- // Actively ``connect'' and produce a <new_io> <ACE_FILE_IO> object
- // if things go well. The <remote_sap> is the file that we are
- // trying to create/open. If it's the default value of
- // <ACE_Addr::sap_any> then the user is letting the OS create the
- // filename (via <ACE_OS::mktemp>). The <timeout> is the amount of
- // time to wait to create/open the file. If it's 0 then we block
- // indefinitely. If *timeout == {0, 0} then the file is created
- // using non-blocking mode. In this case, if the create/open can't
- // be done immediately the value of -1 is returned with <errno ==
- // EWOULDBLOCK>. If *timeout > {0, 0} then this is the amount of
- // time to wait before timing out. If the time expires before the
- // connection is made <errno == ETIME>. The <local_sap> and
- // <reuse_addr> parameters are ignored. The <flags> and <perms>
- // arguments are passed down to the <ACE_OS::open> method.
-
- int reset_new_handle (ACE_HANDLE handle);
- // Resets any event associations on this handle
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- // = Meta-type "trait" information.
- typedef ACE_FILE_Addr PEER_ADDR;
- typedef ACE_FILE_IO PEER_STREAM;
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FILE_Connector.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_FILE_CONNECTOR_H */
diff --git a/ace/FILE_Connector.i b/ace/FILE_Connector.i
deleted file mode 100644
index 27c4d94a080..00000000000
--- a/ace/FILE_Connector.i
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// FILE_Connector.i
-
-// Creates a Local ACE_FILE.
-
-ASYS_INLINE
-ACE_FILE_Connector::ACE_FILE_Connector (ACE_FILE_IO &new_io,
- const ACE_FILE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_FILE_Connector::ACE_FILE_Connector");
- if (this->connect (new_io, remote_sap, timeout, local_sap,
- reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE
- && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("address %s, %p\n"),
- remote_sap.get_path_name (),
- ACE_TEXT ("ACE_FILE_IO")));
-}
-
-ASYS_INLINE int
-ACE_FILE_Connector::reset_new_handle (ACE_HANDLE handle)
-{
- ACE_UNUSED_ARG (handle);
- // Nothing to do here since the handle is not a socket
- return 0;
-}
diff --git a/ace/FILE_IO.cpp b/ace/FILE_IO.cpp
deleted file mode 100644
index 14dcb6d2fed..00000000000
--- a/ace/FILE_IO.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-// FILE_IO.cpp
-// $Id$
-
-#include "ace/FILE_IO.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FILE_IO.i"
-#endif
-
-ACE_RCSID(ace, FILE_IO, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_FILE_IO)
-
-void
-ACE_FILE_IO::dump (void) const
-{
- ACE_TRACE ("ACE_FILE_IO::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->addr_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Simple-minded do nothing constructor.
-
-ACE_FILE_IO::ACE_FILE_IO (void)
-{
- ACE_TRACE ("ACE_FILE_IO::ACE_FILE_IO");
-}
-
-// Send N char *ptrs and int lengths. Note that the char *'s precede
-// the ints (basically, an varargs version of writev). The count N is
-// the *total* number of trailing arguments, *not* a couple of the
-// number of tuple pairs!
-
-ssize_t
-ACE_FILE_IO::send (size_t n, ...) const
-{
- ACE_TRACE ("ACE_FILE_IO::send");
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, int);
- }
-
- ssize_t result = ACE_OS::writev (this->get_handle (),
- iovp,
- total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-
-// This is basically an interface to ACE_OS::readv, that doesn't use
-// the struct iovec explicitly. The ... can be passed as an arbitrary
-// number of (char *ptr, int len) tuples. However, the count N is the
-// *total* number of trailing arguments, *not* a couple of the number
-// of tuple pairs!
-
-ssize_t
-ACE_FILE_IO::recv (size_t n, ...) const
-{
- ACE_TRACE ("ACE_FILE_IO::recv");
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, int);
- }
-
- ssize_t result = ACE_OS::readv (this->get_handle (),
- iovp,
- total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-
-// Allows a client to read from a file without having to provide a
-// buffer to read. This method determines how much data is in the
-// file, allocates a buffer of this size, reads in the data, and
-// returns the number of bytes read.
-
-ssize_t
-ACE_FILE_IO::recvv (iovec *io_vec)
-{
- ACE_TRACE ("ACE_FILE_IO::recvv");
-
- io_vec->iov_base = 0;
- long length = ACE_OS::filesize (this->get_handle ());
-
- if (length > 0)
- {
- ACE_NEW_RETURN (io_vec->iov_base,
- char[length],
- -1);
- io_vec->iov_len = this->recv_n (io_vec->iov_base,
- length);
- return io_vec->iov_len;
- }
- else
- return length;
-}
diff --git a/ace/FILE_IO.h b/ace/FILE_IO.h
deleted file mode 100644
index a1458ad3aa0..00000000000
--- a/ace/FILE_IO.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// FILE_IO.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_FILE_IO_H
-#define ACE_FILE_IO_H
-#include "ace/pre.h"
-
-#include "ace/FILE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/FILE_Addr.h"
-
-class ACE_Export ACE_FILE_IO : public ACE_FILE
-{
- // = TITLE
- // Read/Write operations on Files
-public:
- friend class ACE_FILE_Connector;
-
- // = Initialization method.
- ACE_FILE_IO (void);
- // Default constructor.
-
- ssize_t send (const void *buf, size_t n) const;
- // send upto <n> bytes in <buf>.
-
- ssize_t recv (void *buf, size_t n) const;
- // Recv upto <n> bytes in <buf>.
-
- ssize_t send_n (const void *buf, size_t n) const;
- // Send n bytes, keep trying until n are sent.
-
- ssize_t recv_n (void *buf, size_t n) const;
- // Recv n bytes, keep trying until n are received.
-
-#if defined (ACE_HAS_STREAM_PIPES)
- ssize_t send (const ACE_Str_Buf *cntl,
- const ACE_Str_Buf *data,
- int flags = 0) const;
- // Send bytes via STREAM pipes.
-
- ssize_t recv (ACE_Str_Buf *cntl,
- ACE_Str_Buf *data,
- int *flags) const;
- // Recv bytes via STREAM pipes.
-
- ssize_t send (const ACE_Str_Buf *cntl,
- const ACE_Str_Buf *data,
- int band,
- int flags) const;
- // Send bytes via STREAM pipes using "band" mode.
-
- ssize_t recv (ACE_Str_Buf *cntl,
- ACE_Str_Buf *data,
- int *band,
- int *flags) const;
- // Recv bytes via STREAM pipes using "band" mode.
-
-#endif /* ACE_HAS_STREAM_PIPES */
-
- ssize_t send (const iovec iov[], size_t n) const;
- // Send iovecs via <::writev>.
-
- ssize_t recv (iovec iov[], size_t n) const;
- // Recv iovecs via <::readv>.
-
- ssize_t send (size_t n, ...) const;
- // Send N char *ptrs and int lengths. Note that the char *'s
- // precede the ints (basically, an varargs version of writev). The
- // count N is the *total* number of trailing arguments, *not* a
- // couple of the number of tuple pairs!
-
- ssize_t recv (size_t n, ...) const;
- // This is an interface to ::readv, that doesn't use the struct
- // iovec explicitly. The ... can be passed as an arbitrary number
- // of (char *ptr, int len) tuples. However, the count N is the
- // *total* number of trailing arguments, *not* a couple of the
- // number of tuple pairs!
-
- ssize_t send (const void *buf,
- size_t n,
- ACE_OVERLAPPED *overlapped) const;
- // Send <n> bytes via Win32 WriteFile using overlapped I/O.
-
- ssize_t recv (void *buf,
- size_t n,
- ACE_OVERLAPPED *overlapped) const;
- // Recv <n> bytes via Win32 ReadFile using overlapped I/O.
-
- ssize_t sendv (const iovec iov[],
- size_t n) const;
- // Send an <iovec> of size <n> to the file.
-
- ssize_t recvv (iovec *io_vec);
- // Allows a client to read from a file without having to provide a
- // buffer to read. This method determines how much data is in the
- // file, allocates a buffer of this size, reads in the data, and
- // returns the number of bytes read. The caller is responsible for
- // deleting the member in the <iov_base> field of <io_vec> using
- // delete [] io_vec->iov_base.
-
- ssize_t sendv_n (const iovec iov[],
- size_t n) const;
- // Send an <iovec> of size <n> to the file. Will block until all
- // bytes are sent or an error occurs.
-
- ssize_t recvv_n (iovec iov[],
- size_t n) const;
- // Receive an <iovec> of size <n> to the file.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- // = Meta-type info
- typedef ACE_FILE_Addr PEER_ADDR;
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/FILE_IO.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_FILE_IO_H */
diff --git a/ace/FILE_IO.i b/ace/FILE_IO.i
deleted file mode 100644
index ab5956c468c..00000000000
--- a/ace/FILE_IO.i
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// FILE_IO.i
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::sendv_n (const iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_FILE_IO::sendv_n");
- return ACE::writev_n (this->get_handle (),
- iov,
- n);
-}
-
-// Recv an n byte message from the file.
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::recvv_n (iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_FILE_IO::recvv_n");
- // @@ Carlos, can you please update this to call the
- // new ACE::recvv_n() method that you write?
- return ACE_OS::readv (this->get_handle (),
- iov,
- n);
-}
-
-// Send an <iovec> of size <n> to the file.
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::sendv (const iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_FILE_IO::sendv");
- return ACE_OS::writev (this->get_handle (), iov, n);
-}
-
-// Send exactly N bytes from BUF to this file. Keeping trying until
-// this many bytes are sent.
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::send_n (const void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_FILE_IO::send_n");
- return ACE::write_n (this->get_handle (), buf, n);
-}
-
-// Receive exactly N bytes from this file into BUF. Keep trying until
-// this many bytes are received.
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::recv_n (void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_FILE_IO::recv_n");
- return ACE::read_n (this->get_handle (), buf, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::send (const void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_FILE_IO::send");
- return ACE_OS::write (this->get_handle (), (const char *) buf, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::recv (void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_FILE_IO::recv");
- return ACE_OS::read (this->get_handle (), (char *) buf, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::send (const iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_FILE_IO::send");
- return ACE_OS::writev (this->get_handle (), iov, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::recv (iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_FILE_IO::recv");
- return ACE_OS::readv (this->get_handle (), iov, n);
-}
-
-#if defined (ACE_HAS_STREAM_PIPES)
-ASYS_INLINE ssize_t
-ACE_FILE_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *band, int *flags) const
-{
- ACE_TRACE ("ACE_FILE_IO::recv");
- return ACE_OS::getpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int band, int flags) const
-{
- ACE_TRACE ("ACE_FILE_IO::send");
- return ACE_OS::putpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *flags) const
-{
- ACE_TRACE ("ACE_FILE_IO::recv");
- return ACE_OS::getmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int flags) const
-{
- ACE_TRACE ("ACE_FILE_IO::send");
- return ACE_OS::putmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::send (const void *buf, size_t n,
- ACE_OVERLAPPED *overlapped) const
-{
- ACE_TRACE ("ACE_FILE_IO::send");
- return ACE_OS::write (this->get_handle (),
- (const char *) buf, n,
- overlapped);
-}
-
-ASYS_INLINE ssize_t
-ACE_FILE_IO::recv (void *buf, size_t n,
- ACE_OVERLAPPED *overlapped) const
-{
- ACE_TRACE ("ACE_FILE_IO::recv");
- return ACE_OS::read (this->get_handle (), (char *) buf, n,
- overlapped);
-}
-
-#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/ace/Filecache.cpp b/ace/Filecache.cpp
deleted file mode 100644
index 1a0c37cdcb0..00000000000
--- a/ace/Filecache.cpp
+++ /dev/null
@@ -1,773 +0,0 @@
-// $Id$
-
-#include "ace/Filecache.h"
-#include "ace/Object_Manager.h"
-
-ACE_RCSID(ace, Filecache, "$Id$")
-
-#if defined (__BORLANDC__) //VSB
-// Third parameter will be ignored in ACE_OS::open
-static const int R_MASK = 0;
-static const int W_MASK = 0;
-#else
-static const int R_MASK = S_IRUSR|S_IRGRP|S_IROTH;
-static const int W_MASK = S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR|S_IWGRP|S_IWOTH;
-#endif /* __BORLANDC__ */
-
-#if defined (ACE_WIN32)
-// See if you can get rid of some of these.
-static const int READ_FLAGS = (FILE_FLAG_SEQUENTIAL_SCAN |
- FILE_FLAG_OVERLAPPED |
- O_RDONLY);
-// static const int RCOPY_FLAGS = (FILE_FLAG_SEQUENTIAL_SCAN |
-// O_RDONLY);
-static const int WRITE_FLAGS = (FILE_FLAG_SEQUENTIAL_SCAN |
- FILE_FLAG_OVERLAPPED |
- O_RDWR | O_CREAT | O_TRUNC);
-// static const int WCOPY_FLAGS = (FILE_FLAG_SEQUENTIAL_SCAN |
-// O_RDWR | O_CREAT | O_TRUNC);
-#else
-static const int READ_FLAGS = O_RDONLY;
-// static const int RCOPY_FLAGS = O_RDONLY;
-static const int WRITE_FLAGS = O_RDWR | O_CREAT | O_TRUNC;
-// static const int WCOPY_FLAGS = O_RDWR | O_CREAT | O_TRUNC;
-#endif /* ACE_WIN32 */
-
-// static data members
-ACE_Filecache *ACE_Filecache::cvf_ = 0;
-
-void
-ACE_Filecache_Handle::init (void)
-{
- this->file_ = 0;
- this->handle_ = ACE_INVALID_HANDLE;
-}
-
-ACE_Filecache_Handle::ACE_Filecache_Handle (void)
- : file_ (0), handle_ (0), mapit_ (0)
-{
- this->init ();
-}
-
-ACE_Filecache_Handle::ACE_Filecache_Handle (const ACE_TCHAR *filename,
- ACE_Filecache_Flag mapit)
- : file_ (0), handle_ (0), mapit_ (mapit)
-{
- this->init ();
- // Fetch the file from the Virtual_Filesystem let the
- // Virtual_Filesystem do the work of cache coherency.
-
- // Filecache will also do the acquire, since it holds the lock at
- // that time.
- this->file_ = ACE_Filecache::instance ()->fetch (filename, mapit);
-}
-
-ACE_Filecache_Handle::ACE_Filecache_Handle (const ACE_TCHAR *filename,
- int size,
- ACE_Filecache_Flag mapit)
- : file_ (0), handle_ (0), mapit_ (mapit)
-{
- this->init ();
-
- if (size == 0)
- ACE_Filecache::instance ()->remove (filename);
- else
- {
- // Since this is being opened for a write, simply create a new
- // ACE_Filecache_Object now, and let the destructor add it into CVF
- // later
-
- // Filecache will also do the acquire, since it holds the lock at
- // that time.
- this->file_ = ACE_Filecache::instance ()->create (filename, size);
- }
-}
-
-ACE_Filecache_Handle::~ACE_Filecache_Handle (void)
-{
- if (this->handle_ != ACE_INVALID_HANDLE)
- // this was dup ()'d
- ACE_OS::close (this->handle_);
-
- ACE_Filecache::instance ()->finish (this->file_);
-}
-
-void *
-ACE_Filecache_Handle::address (void) const
-{
- return this->file_ == 0 ? 0 : this->file_->address ();
-}
-
-ACE_HANDLE
-ACE_Filecache_Handle::handle (void) const
-{
- if (this->handle_ == ACE_INVALID_HANDLE && this->file_ != 0)
- {
- ACE_Filecache_Handle *mutable_this =
- (ACE_Filecache_Handle *) this;
- mutable_this->handle_ = ACE_OS::dup (this->file_->handle ());
- }
- return this->handle_;
-}
-
-int
-ACE_Filecache_Handle::error (void) const
-{
- if (this->file_ == 0)
- return -1;
- else
- return this->file_->error ();
-}
-
-size_t
-ACE_Filecache_Handle::size (void) const
-{
- if (this->file_ == 0)
- return (size_t) -1;
- else
- return this->file_->size ();
-}
-
-// ------------------
-// ACE_Filecache_Hash
-// ------------------
-
-#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
-
-#define ACE_Filecache_Hash \
- ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
-#define ACE_Filecache_Hash_Entry \
- ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>
-
-ACE_TEMPLATE_SPECIALIZATION
-ACE_Filecache_Hash_Entry::ACE_Hash_Map_Entry (const ACE_TCHAR *const &ext_id,
- ACE_Filecache_Object *const &int_id,
- ACE_Filecache_Hash_Entry *next,
- ACE_Filecache_Hash_Entry *prev)
- : ext_id_ (ext_id ? ACE_OS::strdup (ext_id) : ACE_OS::strdup (ACE_TEXT (""))),
- int_id_ (int_id),
- next_ (next),
- prev_ (prev)
-{
-}
-
-ACE_TEMPLATE_SPECIALIZATION
-ACE_Filecache_Hash_Entry::ACE_Hash_Map_Entry (ACE_Filecache_Hash_Entry *next,
- ACE_Filecache_Hash_Entry *prev)
- : ext_id_ (0),
- next_ (next),
- prev_ (prev)
-{
-}
-
-ACE_TEMPLATE_SPECIALIZATION
-ACE_Filecache_Hash_Entry::~ACE_Hash_Map_Entry (void)
-{
- ACE_OS::free ((void *) ext_id_);
-}
-
-// We need these template specializations since KEY is defined as a
-// ACE_TCHAR*, which doesn't have a hash() or equal() method defined on it.
-
-ACE_TEMPLATE_SPECIALIZATION
-unsigned long
-ACE_Filecache_Hash::hash (const ACE_TCHAR *const &ext_id)
-{
- return ACE::hash_pjw (ext_id);
-}
-
-ACE_TEMPLATE_SPECIALIZATION
-int
-ACE_Filecache_Hash::equal (const ACE_TCHAR *const &id1, const ACE_TCHAR *const &id2)
-{
- return ACE_OS::strcmp (id1, id2) == 0;
-}
-
-#undef ACE_Filecache_Hash
-#undef ACE_Filecache_Hash_Entry
-
-#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
-
-
-// -------------
-// ACE_Filecache
-// -------------
-
-ACE_Filecache *
-ACE_Filecache::instance (void)
-{
- // Double check locking pattern.
- if (ACE_Filecache::cvf_ == 0)
- {
- ACE_SYNCH_RW_MUTEX &lock =
- *ACE_Managed_Object<ACE_SYNCH_RW_MUTEX>::get_preallocated_object
- (ACE_Object_Manager::ACE_FILECACHE_LOCK);
- ACE_GUARD_RETURN (ACE_SYNCH_RW_MUTEX, ace_mon, lock, 0);
-
- // @@ James, please check each of the ACE_NEW_RETURN calls to
- // make sure that it is safe to return if allocation fails.
- if (ACE_Filecache::cvf_ == 0)
- ACE_NEW_RETURN (ACE_Filecache::cvf_,
- ACE_Filecache,
- 0);
- }
-
- return ACE_Filecache::cvf_;
-}
-
-ACE_Filecache::ACE_Filecache (void)
- : size_ (ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE),
- hash_ (this->size_)
-{
-}
-
-ACE_Filecache::~ACE_Filecache (void)
-{
-}
-
-ACE_Filecache_Object *
-ACE_Filecache::insert_i (const ACE_TCHAR *filename,
- ACE_SYNCH_RW_MUTEX &filelock,
- int mapit)
-{
- ACE_Filecache_Object *handle = 0;
-
- if (this->hash_.find (filename, handle) == -1)
- {
- ACE_NEW_RETURN (handle,
- ACE_Filecache_Object (filename, filelock, 0, mapit),
- 0);
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) CVF: creating %s\n"), filename));
-
- if (this->hash_.bind (filename, handle) == -1)
- {
- delete handle;
- handle = 0;
- }
- }
- else
- handle = 0;
-
- return handle;
-}
-
-ACE_Filecache_Object *
-ACE_Filecache::remove_i (const ACE_TCHAR *filename)
-{
- ACE_Filecache_Object *handle = 0;
-
- // Disassociate file from the cache.
- if (this->hash_.unbind (filename, handle) == 0)
- {
- handle->stale_ = 1;
-
- // Try a lock. If it succeds, we can delete it now.
- // Otherwise, it will clean itself up later.
- if (handle->lock_.tryacquire_write () == 0)
- {
- delete handle;
- handle = 0;
- }
- }
- else
- handle = 0;
-
- return handle;
-}
-
-ACE_Filecache_Object *
-ACE_Filecache::update_i (const ACE_TCHAR *filename,
- ACE_SYNCH_RW_MUTEX &filelock,
- int mapit)
-{
- ACE_Filecache_Object *handle = 0;
-
- handle = this->remove_i (filename);
- handle = this->insert_i (filename, filelock, mapit);
-
- return handle;
-}
-
-int
-ACE_Filecache::find (const ACE_TCHAR *filename)
-{
- return this->hash_.find (filename);
-}
-
-
-ACE_Filecache_Object *
-ACE_Filecache::remove (const ACE_TCHAR *filename)
-{
- ACE_Filecache_Object *handle = 0;
-
- u_long loc = ACE::hash_pjw (filename) % this->size_;
- ACE_SYNCH_RW_MUTEX &hashlock = this->hash_lock_[loc];
- // ACE_SYNCH_RW_MUTEX &filelock = this->file_lock_[loc];
-
- if (this->hash_.find (filename, handle) != -1)
- {
- ACE_WRITE_GUARD_RETURN (ACE_SYNCH_RW_MUTEX,
- ace_mon,
- hashlock,
- 0);
-
- return this->remove_i (filename);
- }
-
- return 0;
-}
-
-
-ACE_Filecache_Object *
-ACE_Filecache::fetch (const ACE_TCHAR *filename, int mapit)
-{
- ACE_Filecache_Object *handle = 0;
-
- u_long loc = ACE::hash_pjw (filename) % this->size_;
- ACE_SYNCH_RW_MUTEX &hashlock = this->hash_lock_[loc];
- ACE_SYNCH_RW_MUTEX &filelock = this->file_lock_[loc];
-
- filelock.acquire_read ();
-
- if (this->hash_.find (filename, handle) == -1)
- {
- ACE_WRITE_GUARD_RETURN (ACE_SYNCH_RW_MUTEX,
- ace_mon,
- hashlock,
- 0);
-
- // Second check in the method call
- handle = this->insert_i (filename, filelock, mapit);
-
- if (handle == 0)
- filelock.release ();
- }
- else
- {
- if (handle->update ())
- {
- {
- // Double check locking pattern
- ACE_WRITE_GUARD_RETURN (ACE_SYNCH_RW_MUTEX,
- ace_mon,
- hashlock,
- 0);
-
- // Second check in the method call
- handle = this->update_i (filename, filelock, mapit);
-
- if (handle == 0)
- filelock.release ();
- }
- }
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) CVF: found %s\n"), filename));
- }
-
- return handle;
-}
-
-ACE_Filecache_Object *
-ACE_Filecache::create (const ACE_TCHAR *filename, int size)
-{
- ACE_Filecache_Object *handle = 0;
-
- u_long loc = ACE::hash_pjw (filename) % this->size_;
- ACE_SYNCH_RW_MUTEX &filelock = this->file_lock_[loc];
-
- ACE_NEW_RETURN (handle,
- ACE_Filecache_Object (filename, size, filelock),
- 0);
- handle->acquire ();
-
- return handle;
-}
-
-ACE_Filecache_Object *
-ACE_Filecache::finish (ACE_Filecache_Object *&file)
-{
- if (file == 0)
- return file;
-
- u_long loc = ACE::hash_pjw (file->filename_) % this->size_;
- ACE_SYNCH_RW_MUTEX &hashlock = this->hash_lock_[loc];
-
- if (file != 0)
- switch (file->action_)
- {
- case ACE_Filecache_Object::ACE_WRITING:
- {
- ACE_WRITE_GUARD_RETURN (ACE_SYNCH_RW_MUTEX,
- ace_mon,
- hashlock,
- 0);
-
- file->release ();
-
- this->remove_i (file->filename_);
-#if 0
- int result = this->hash_.bind (file->filename (), file);
-
- if (result == 0)
- file->acquire ();
-#else
- // Last one using a stale file is resposible for deleting it.
- if (file->stale_)
- {
- // Try a lock. If it succeds, we can delete it now.
- // Otherwise, it will clean itself up later.
- if (file->lock_.tryacquire_write () == 0)
- {
- delete file;
- file = 0;
- }
- }
-#endif
- }
-
- break;
- default:
- file->release ();
-
- // Last one using a stale file is resposible for deleting it.
- if (file->stale_)
- {
- // Try a lock. If it succeds, we can delete it now.
- // Otherwise, it will clean itself up later.
- if (file->lock_.tryacquire_write () == 0)
- {
- delete file;
- file = 0;
- }
- }
-
- break;
- }
-
- return file;
-}
-
-void
-ACE_Filecache_Object::init (void)
-{
- this->filename_[0] = '\0';
- this->handle_ = ACE_INVALID_HANDLE;
- this->error_ = ACE_SUCCESS;
- this->tempname_ = 0;
- this->size_ = 0;
-
- ACE_OS::memset (&(this->stat_), 0, sizeof (this->stat_));
-}
-
-ACE_Filecache_Object::ACE_Filecache_Object (void)
- : tempname_ (0),
- mmap_ (),
- handle_ (0),
- // stat_ (),
- size_ (0),
- action_ (0),
- error_ (0),
- stale_ (0),
- // sa_ (),
- junklock_ (),
- lock_ (junklock_)
-{
- this->init ();
-}
-
-ACE_Filecache_Object::ACE_Filecache_Object (const ACE_TCHAR *filename,
- ACE_SYNCH_RW_MUTEX &lock,
- LPSECURITY_ATTRIBUTES sa,
- int mapit)
- : tempname_ (0),
- mmap_ (),
- handle_ (0),
- // stat_ (),
- size_ (0),
- action_ (0),
- error_ (0),
- stale_ (0),
- sa_ (sa),
- junklock_ (),
- lock_ (lock)
-{
- this->init ();
-
- // ASSERT strlen(filename) < sizeof (this->filename_)
- ACE_OS::strcpy (this->filename_, filename);
- this->action_ = ACE_Filecache_Object::ACE_READING;
- // place ourselves into the READING state
-
- // Can we access the file?
- if (ACE_OS::access (this->filename_, R_OK) == -1)
- {
- this->error_i (ACE_Filecache_Object::ACE_ACCESS_FAILED);
- return;
- }
-
- // Can we stat the file?
- if (ACE_OS::stat (this->filename_, &this->stat_) == -1)
- {
- this->error_i (ACE_Filecache_Object::ACE_STAT_FAILED);
- return;
- }
-
- this->size_ = this->stat_.st_size;
- this->tempname_ = this->filename_;
-
- // Can we open the file?
- this->handle_ = ACE_OS::open (this->tempname_,
- READ_FLAGS, R_MASK, this->sa_);
- if (this->handle_ == ACE_INVALID_HANDLE)
- {
- this->error_i (ACE_Filecache_Object::ACE_OPEN_FAILED,
- ACE_TEXT ("ACE_Filecache_Object::ctor: open"));
- return;
- }
-
- if (mapit)
- {
- // Can we map the file?
- if (this->mmap_.map (this->handle_, -1,
- PROT_READ, ACE_MAP_PRIVATE, 0, 0, this->sa_) != 0)
- {
- this->error_i (ACE_Filecache_Object::ACE_MEMMAP_FAILED,
- ACE_TEXT ("ACE_Filecache_Object::ctor: map"));
- ACE_OS::close (this->handle_);
- this->handle_ = ACE_INVALID_HANDLE;
- return;
- }
- }
-
- // Ok, finished!
- this->action_ = ACE_Filecache_Object::ACE_READING;
-}
-
-ACE_Filecache_Object::ACE_Filecache_Object (const ACE_TCHAR *filename,
- int size,
- ACE_SYNCH_RW_MUTEX &lock,
- LPSECURITY_ATTRIBUTES sa)
- : stale_ (0),
- sa_ (sa),
- lock_ (lock)
-{
- this->init ();
-
- this->size_ = size;
- ACE_OS::strcpy (this->filename_, filename);
- this->action_ = ACE_Filecache_Object::ACE_WRITING;
-
- // Can we access the file?
- if (ACE_OS::access (this->filename_, R_OK|W_OK) == -1
- // Does it exist?
- && ACE_OS::access (this->filename_, F_OK) != -1)
- {
- // File exists, but we cannot access it.
- this->error_i (ACE_Filecache_Object::ACE_ACCESS_FAILED);
- return;
- }
-
- this->tempname_ = this->filename_;
-
- // Can we open the file?
- this->handle_ = ACE_OS::open (this->tempname_, WRITE_FLAGS, W_MASK, this->sa_);
- if (this->handle_ == ACE_INVALID_HANDLE)
- {
- this->error_i (ACE_Filecache_Object::ACE_OPEN_FAILED,
- ACE_TEXT ("ACE_Filecache_Object::acquire: open"));
- return;
- }
-
- // Can we write?
- if (ACE_OS::pwrite (this->handle_, "", 1, this->size_ - 1) != 1)
- {
- this->error_i (ACE_Filecache_Object::ACE_WRITE_FAILED,
- ACE_TEXT ("ACE_Filecache_Object::acquire: write"));
- ACE_OS::close (this->handle_);
- return;
- }
-
- // Can we map?
- if (this->mmap_.map (this->handle_, this->size_, PROT_RDWR, MAP_SHARED,
- 0, 0, this->sa_) != 0)
- {
- this->error_i (ACE_Filecache_Object::ACE_MEMMAP_FAILED,
- ACE_TEXT ("ACE_Filecache_Object::acquire: map"));
- ACE_OS::close (this->handle_);
- }
-
- // Ok, done!
-}
-
-ACE_Filecache_Object::~ACE_Filecache_Object (void)
-{
- if (this->error_ == ACE_SUCCESS)
- {
- this->mmap_.unmap ();
- ACE_OS::close (this->handle_);
- this->handle_ = ACE_INVALID_HANDLE;
- }
-}
-
-int
-ACE_Filecache_Object::acquire (void)
-{
- return this->lock_.tryacquire_read ();
-}
-
-int
-ACE_Filecache_Object::release (void)
-{
- if (this->action_ == ACE_WRITING)
- {
- // We are safe since only one thread has a writable Filecache_Object
-
-#if 0
- ACE_HANDLE original = ACE_OS::open (this->filename_, WRITE_FLAGS, W_MASK,
- this->sa_);
- if (original == ACE_INVALID_HANDLE)
- this->error_ = ACE_Filecache_Object::ACE_OPEN_FAILED;
- else if (ACE_OS::write (original, this->mmap_.addr (),
- this->size_) == -1)
- {
- this->error_ = ACE_Filecache_Object::ACE_WRITE_FAILED;
- ACE_OS::close (original);
- ACE_OS::unlink (this->filename_);
- }
- else if (ACE_OS::stat (this->filename_, &this->stat_) == -1)
- this->error_ = ACE_Filecache_Object::ACE_STAT_FAILED;
-#endif
-
- this->mmap_.unmap ();
- ACE_OS::close (this->handle_);
- this->handle_ = ACE_INVALID_HANDLE;
-
-#if 0
- // Leave the file in an acquirable state.
- this->handle_ = ACE_OS::open (this->tempname_, READ_FLAGS, R_MASK);
- if (this->handle_ == ACE_INVALID_HANDLE)
- {
- this->error_i (ACE_Filecache_Object::ACE_OPEN_FAILED,
- "ACE_Filecache_Object::acquire: open");
- }
- else if (this->mmap_.map (this->handle_, -1,
- PROT_READ,
- ACE_MAP_PRIVATE,
- 0,
- 0,
- this->sa_) != 0)
- {
- this->error_i (ACE_Filecache_Object::ACE_MEMMAP_FAILED,
- "ACE_Filecache_Object::acquire: map");
- ACE_OS::close (this->handle_);
- this->handle_ = ACE_INVALID_HANDLE;
- }
-
- this->action_ = ACE_Filecache_Object::ACE_READING;
-#endif
- }
-
- return this->lock_.release ();
-}
-
-int
-ACE_Filecache_Object::error (void) const
-{
- // The existence of the object means a read lock is being held.
- return this->error_;
-}
-
-int
-ACE_Filecache_Object::error_i (int error_value, const ACE_TCHAR *s)
-{
- s = s;
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p.\n"), s));
- this->error_ = error_value;
- return error_value;
-}
-
-const ACE_TCHAR *
-ACE_Filecache_Object::filename (void) const
-{
- // The existence of the object means a read lock is being held.
- return this->filename_;
-}
-
-size_t
-ACE_Filecache_Object::size (void) const
-{
- // The existence of the object means a read lock is being held.
- return this->size_;
-}
-
-ACE_HANDLE
-ACE_Filecache_Object::handle (void) const
-{
- // The existence of the object means a read lock is being held.
- return this->handle_;
-}
-
-void *
-ACE_Filecache_Object::address (void) const
-{
- // The existence of the object means a read lock is being held.
- return this->mmap_.addr ();
-}
-
-int
-ACE_Filecache_Object::update (void) const
-{
- // The existence of the object means a read lock is being held.
- int result;
- struct stat statbuf;
-
- if (ACE_OS::stat (this->filename_, &statbuf) == -1)
- result = 1;
- else
- // non-portable code may follow
- result = ACE_OS::difftime (this->stat_.st_mtime, statbuf.st_mtime) < 0;
-
- return result;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
-template class ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>;
-template class ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>;
-#else
-template class ACE_Hash_Map_Entry<ACE_TString, ACE_Filecache_Object *>;
-template class ACE_Hash_Map_Manager<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
-#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
-#pragma instantiate ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>
-#pragma instantiate ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Hash<const ACE_TCHAR *>, ACE_Equal_To<const ACE_TCHAR *>, ACE_Null_Mutex>
-#else
-#pragma instantiate ACE_Hash_Map_Entry<ACE_TString, ACE_Filecache_Object *>
-#pragma instantiate ACE_Hash_Map_Manager<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>
-#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Filecache.h b/ace/Filecache.h
deleted file mode 100644
index 7f636f09795..00000000000
--- a/ace/Filecache.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/* -*- c++ -*- */
-// Hey, Emacs! This is a C++ file!
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Filecache.h
-//
-// = AUTHOR
-// James Hu
-//
-// ============================================================================
-
-#ifndef ACE_FILECACHE_H
-#define ACE_FILECACHE_H
-#include "ace/pre.h"
-
-#include "ace/Mem_Map.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch_T.h"
-#include "ace/Hash_Map_Manager.h"
-#include "ace/SString.h"
-
-enum ACE_Filecache_Flag
-{
- ACE_NOMAP = 0,
- ACE_MAPIT = 1
-};
-
-class ACE_Filecache_Object;
-
-class ACE_Export ACE_Filecache_Handle
-{
- // = TITLE
- // Abstraction over a real file. This is meant to be the entry
- // point into the Cached Virtual Filesystem.
- //
- // = DESCRIPTION
- // This is a cached filesystem implementation based loosely on the
- // implementation of JAWS_File. The interfaces will be nearly the
- // same. The under-the-hood implementation should hopefully be a
- // much faster thing.
- //
- // These will be given their own implementations later. For now, we
- // borrow the implementation provided by JAWS.
- //
- // On creation, the cache is checked, and reference count is
- // incremented. On destruction, reference count is decremented. If
- // the reference count is 0, the file is removed from the cache.
- //
- // E.g. 1,
- // {
- // ACE_Filecache_Handle foo("foo.html");
- // this->peer ().send (foo.address (), foo.size ());
- // }
- //
- // E.g. 2,
- // {
- // ACE_Filecache_Handle foo("foo.html");
- // io->transmitfile (foo.handle (), this->peer ().handle ());
- // }
- //
- // E.g. 3,
- // {
- // ACE_Filecache_Handle foo("foo.html", content_length);
- // this->peer ().recv (foo.address (), content_length);
- // }
- //
- // TODO:
-
- // (1) Get rid of the useless copying of files when reading. Although
- // it does make sure the file you send isn't being changed, it doesn't
- // make sure the file is in a sensible state before sending it.
-
- // Alternative: if the file get's trashed while it is being shipped, let
- // the client request the file again. The cache should have an updated
- // copy by that point.
-
- // (2) Use hashing for locating files. This means I need a hastable
- // implementation with buckets.
-
- // (3) Only lock when absolutely necessary. JAWS_Virtual_Filesystem was
- // rather conservative, but for some reason it still ran into problems.
- // Since this design should be simpler, problems should be easier to spot.
- //
-public:
-
- ACE_Filecache_Handle (const ACE_TCHAR *filename,
- ACE_Filecache_Flag mapit = ACE_MAPIT);
- // Query cache for file, and acquire it. Assumes the file is being
- // opened for reading.
-
- ACE_Filecache_Handle (const ACE_TCHAR *filename,
- int size,
- ACE_Filecache_Flag mapit = ACE_MAPIT);
- // Create new entry, and acquire it. Presence of SIZE assumes the
- // file is being opened for writing. If SIZE is zero, assumes the
- // file is to be removed from the cache.
-
- ~ACE_Filecache_Handle (void);
- // Closes any open handles, release acquired file.
-
- void *address (void) const;
- // Base address of memory mapped file.
-
- ACE_HANDLE handle (void) const;
- // A handle (e.g., UNIX file descriptor, or NT file handle).
-
- int error (void) const;
- // Any associated error in handle creation and acquisition.
-
- size_t size (void) const;
- // The size of the file.
-
-protected:
- ACE_Filecache_Handle (void);
- // Default do nothing constructor. Prevent it from being called.
-
- void init (void);
- // Common initializations for constructors.
-
-public:
- // = These come from ACE_Filecache_Object, which is an internal class.
- enum
- {
- ACE_SUCCESS = 0,
- ACE_ACCESS_FAILED,
- ACE_OPEN_FAILED,
- ACE_COPY_FAILED,
- ACE_STAT_FAILED,
- ACE_MEMMAP_FAILED,
- ACE_WRITE_FAILED
- };
-
-private:
- ACE_Filecache_Object *file_;
- // A reference to the low level instance.
-
- ACE_HANDLE handle_;
- // A <dup>'d version of the one from <file_>.
-
- int mapit_;
-};
-
-#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
-typedef ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>
- ACE_Filecache_Hash_Entry;
-
-typedef ACE_Hash_Map_Manager<const ACE_TCHAR *, ACE_Filecache_Object *, ACE_Null_Mutex>
- ACE_Filecache_Hash;
-#else
-typedef ACE_Hash_Map_Entry<ACE_TString, ACE_Filecache_Object *>
- ACE_Filecache_Hash_Entry;
-
-typedef ACE_Hash_Map_Manager<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>
- ACE_Filecache_Hash;
-#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
-
-class ACE_Export ACE_Filecache
-{
- // = TITLE
- // A hash table holding the information about entry point into
- // the Cached Virtual Filesystem. On insertion, the reference
- // count is incremented. On destruction, reference count is
- // decremented.
-public:
- static ACE_Filecache *instance (void);
- // Singleton pattern.
-
- ~ACE_Filecache (void);
-
- int find (const ACE_TCHAR *filename);
- // Returns 0 if the file associated with ``filename'' is in the cache,
- // or -1 if not.
-
- ACE_Filecache_Object *fetch (const ACE_TCHAR *filename, int mapit = 1);
- // Return the file associated with ``filename'' if it is in the cache,
- // or create if not.
-
- ACE_Filecache_Object *remove (const ACE_TCHAR *filename);
- // Remove the file associated with ``filename'' from the cache.
-
- ACE_Filecache_Object *create (const ACE_TCHAR *filename, int size);
- // Create a new Filecache_Object, returns it.
-
- ACE_Filecache_Object *finish (ACE_Filecache_Object *&new_file);
- // Release an acquired Filecache_Object, returns it again or NULL if it
- // was deleted.
-
-protected:
- ACE_Filecache_Object *insert_i (const ACE_TCHAR *filename,
- ACE_SYNCH_RW_MUTEX &filelock,
- int mapit);
- ACE_Filecache_Object *remove_i (const ACE_TCHAR *filename);
- ACE_Filecache_Object *update_i (const ACE_TCHAR *filename,
- ACE_SYNCH_RW_MUTEX &filelock,
- int mapit);
-
-public:
-
- enum
- {
- ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE = 512,
- // For this stupid implementation, use an array. Someday, use a
- // balanced search tree, or real hash table.
-
- ACE_DEFAULT_VIRTUAL_FILESYSTEM_CACHE_SIZE = 20
- // This determines the highwater mark in megabytes for the cache.
- // This will be ignored for now.
- };
-
-protected:
- ACE_Filecache (void);
- // Prevent it from being called.
-
-private:
- int size_;
-
- ACE_Filecache_Hash hash_;
- // The hash table
-
- static ACE_Filecache *cvf_;
- // The reference to the instance
-
- // = Synchronization variables.
- ACE_SYNCH_RW_MUTEX hash_lock_[ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE];
- ACE_SYNCH_RW_MUTEX file_lock_[ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE];
-};
-
-class ACE_Export ACE_Filecache_Object
-{
- // = TITLE
- // Abstraction over a real file. This is what the Virtual
- // Filesystem contains. This class is not intended for general
- // consumption. Please consult a physician before attempting to
- // use this class.
-public:
- friend class ACE_Filecache;
-
- ACE_Filecache_Object (const ACE_TCHAR *filename,
- ACE_SYNCH_RW_MUTEX &lock,
- LPSECURITY_ATTRIBUTES sa = 0,
- int mapit = 1);
- // Creates a file for reading.
-
- ACE_Filecache_Object (const ACE_TCHAR *filename,
- int size,
- ACE_SYNCH_RW_MUTEX &lock,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Creates a file for writing.
-
- ~ACE_Filecache_Object (void);
- // Only if reference count is zero should this be called.
-
- int acquire (void);
- // Increment the reference_count_.
-
- int release (void);
- // Decrement the reference_count_.
-
- // = error_ accessors
- int error (void) const;
- int error (int error_value,
- const ACE_TCHAR *s = ACE_TEXT ("ACE_Filecache_Object"));
-
- const ACE_TCHAR *filename (void) const;
- // filename_ accessor
-
- ACE_HANDLE handle (void) const;
- // handle_ accessor.
-
- void *address (void) const;
- // Base memory address for memory mapped file.
-
- size_t size (void) const;
- // size_ accessor.
-
- int update (void) const;
- // True if file on disk is newer than cached file.
-
-protected:
- ACE_Filecache_Object (void);
- // Prevent from being called.
-
- void init (void);
- // Common initialization code,
-
-private:
- int error_i (int error_value,
- const ACE_TCHAR *s = ACE_TEXT ("ACE_Filecache_Object"));
- // Internal error logging method, no locking.
-
-public:
-
- enum Creation_States
- {
- ACE_READING = 1,
- ACE_WRITING = 2
- };
-
- enum Error_Conditions
- {
- ACE_SUCCESS = 0,
- ACE_ACCESS_FAILED,
- ACE_OPEN_FAILED,
- ACE_COPY_FAILED,
- ACE_STAT_FAILED,
- ACE_MEMMAP_FAILED,
- ACE_WRITE_FAILED
- };
-
-private:
- ACE_TCHAR *tempname_;
- ACE_TCHAR filename_[MAXPATHLEN + 1];
- // The temporary file name and the real file name. The real file is
- // copied into the temporary file for safety reasons.
-
- ACE_Mem_Map mmap_;
- ACE_HANDLE handle_;
- // mmap_ holds the memory mapped version of the temporary file.
- // handle_ is the descriptor to the temporary file.
-
- struct stat stat_;
- size_t size_;
- // Used to compare against the real file to test if an update is needed.
-
- int action_;
- int error_;
- // Status indicators.
-
- int stale_;
- // If set to 1, means the object is flagged for removal.
-
- LPSECURITY_ATTRIBUTES sa_;
- // Security attribute object.
-
- ACE_SYNCH_RW_MUTEX junklock_;
- ACE_SYNCH_RW_MUTEX &lock_;
- // lock_ provides a bookkeeping mechanism for users of this object.
- // junklock_ is the default initializer
-};
-
-
-#include "ace/post.h"
-#endif /* ACE_FILECACHE_H */
diff --git a/ace/FlReactor.cpp b/ace/FlReactor.cpp
deleted file mode 100644
index 60fcc5ca380..00000000000
--- a/ace/FlReactor.cpp
+++ /dev/null
@@ -1,331 +0,0 @@
-// $Id$
-
-#include "ace/FlReactor.h"
-#include "ace/Synch_T.h"
-
-ACE_RCSID(ace, FlReactor, "$Id$")
-
-#if defined (ACE_HAS_FL)
-
-#include <FL/Fl.h>
-
-ACE_ALLOC_HOOK_DEFINE (ACE_FlReactor)
-
-// Must be called with lock held
-ACE_FlReactor::ACE_FlReactor (size_t size,
- int restart,
- ACE_Sig_Handler *h)
- : ACE_Select_Reactor (size, restart, h)
-{
- // When the ACE_Select_Reactor is constructed it creates the notify
- // pipe and registers it with the register_handler_i() method. The
- // FlReactor overloads this method BUT because the
- // register_handler_i occurs when constructing the base class
- // ACE_Select_Reactor, the ACE_Select_Reactor register_handler_i()
- // is called not the FlReactor register_handler_i(). This means
- // that the notify pipe is registered with the ACE_Select_Reactor
- // event handling code not the FlReactor and so notfications don't
- // work. To get around this we simply close and re-opened the
- // notification handler in the constructor of the FlReactor.
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- this->notify_handler_->close ();
- this->notify_handler_->open (this, 0);
-#endif /* ACE_MT_SAFE */
-}
-
-ACE_FlReactor::~ACE_FlReactor (void)
-{
-}
-
-// This is just the <wait_for_multiple_events> from ace/Reactor.cpp
-// but we use the Fl functions to wait for an event, not <select>
-
-int
-ACE_FlReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set,
- ACE_Time_Value *max_wait_time)
-{
- ACE_TRACE ("ACE_FlReactor::wait_for_multiple_events");
- int nfound;
-
- do
- {
- max_wait_time = this->timer_queue_->calculate_timeout (max_wait_time);
-
- size_t width = this->handler_rep_.max_handlep1 ();
- handle_set.rd_mask_ = this->wait_set_.rd_mask_;
- handle_set.wr_mask_ = this->wait_set_.wr_mask_;
- handle_set.ex_mask_ = this->wait_set_.ex_mask_;
-
- // Check to make sure our handle's are all usable.
- ACE_Select_Reactor_Handle_Set temp_set = handle_set;
-
- ACE_Time_Value zero = ACE_Time_Value::zero;
- if (ACE_OS::select (width,
- temp_set.rd_mask_,
- temp_set.wr_mask_,
- temp_set.ex_mask_,
- &zero) == -1)
- return -1; // Bad file arguments...
-
- // Instead of waiting using <select>, just use the Fl mechanism
- // to wait for one or more events...
-
- // Wait for something to happen.
- double t = 0;
- if (max_wait_time != 0)
- t = max_wait_time->sec () + max_wait_time->usec () / 1000000.0F;
-
- while (t > 0) {
- t = Fl::wait (t);
- }
-
- // Reset the width, in case it changed during the upcalls.
- width = this->handler_rep_.max_handlep1 ();
-
- // Now actually read the result needed by the <Select_Reactor>
- // using <select>.
- zero = ACE_Time_Value::zero;
- nfound = ACE_OS::select (width,
- handle_set.rd_mask_,
- handle_set.wr_mask_,
- handle_set.ex_mask_,
- &zero);
-
- } while (nfound == -1 && this->handle_error () > 0);
-
- if (nfound > 0)
- {
-#if !defined (ACE_WIN32)
- handle_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ());
- handle_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ());
- handle_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ());
-#endif /* ACE_WIN32 */
- }
- return nfound; // Timed out or input available
-}
-
-void
-ACE_FlReactor::fl_io_proc (int fd, void* reactor)
-{
- ACE_FlReactor *self = ACE_static_cast(ACE_FlReactor *, reactor);
- ACE_HANDLE handle = (ACE_HANDLE)fd; //ACE_reinterpret_cast(ACE_HANDLE, fd);
-
- // my copy isn't const.
- ACE_Time_Value zero = ACE_Time_Value::zero;
-
- ACE_Select_Reactor_Handle_Set wait_set;
-
- // Deal with one file event.
-
- // - read which kind of event
- if (self->wait_set_.rd_mask_.is_set (handle))
- wait_set.rd_mask_.set_bit (handle);
- if (self->wait_set_.wr_mask_.is_set (handle))
- wait_set.wr_mask_.set_bit (handle);
- if (self->wait_set_.ex_mask_.is_set (handle))
- wait_set.ex_mask_.set_bit (handle);
-
- int result = ACE_OS::select (fd + 1,
- wait_set.rd_mask_,
- wait_set.wr_mask_,
- wait_set.ex_mask_, &zero);
-
- ACE_Select_Reactor_Handle_Set dispatch_set;
-
- // - Use only that one file event (removes events for other files).
- if (result > 0)
- {
- if (wait_set.rd_mask_.is_set (handle))
- dispatch_set.rd_mask_.set_bit (handle);
- if (wait_set.wr_mask_.is_set (handle))
- dispatch_set.wr_mask_.set_bit (handle);
- if (wait_set.ex_mask_.is_set (handle))
- dispatch_set.ex_mask_.set_bit (handle);
-
- self->dispatch (1, dispatch_set);
- }
-}
-
-void
-ACE_FlReactor::fl_timeout_proc (void* reactor)
-{
- ACE_FlReactor *self = ACE_static_cast (ACE_FlReactor *, reactor);
-
- // Deal with any timer events
- ACE_Select_Reactor_Handle_Set handle_set;
- self->dispatch (0, handle_set);
- self->reset_timeout ();
-}
-
-
-int
-ACE_FlReactor::register_handler_i (ACE_HANDLE handle,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_FlReactor::register_handler_i");
-
- int result = ACE_Select_Reactor::register_handler_i (handle,
- handler, mask);
- if (result == -1)
- return -1;
-
- int condition = 0;
-
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK))
- ACE_SET_BITS (condition, FL_READ);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::WRITE_MASK))
- ACE_SET_BITS (condition, FL_WRITE);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::EXCEPT_MASK))
- ACE_SET_BITS (condition, FL_EXCEPT);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::ACCEPT_MASK))
- ACE_SET_BITS (condition, FL_READ);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK))
- {
- ACE_SET_BITS (condition, FL_WRITE); // connected, you may write
- ACE_SET_BITS (condition, FL_READ); // connected, you have data/err
- }
-
- if (condition != 0)
- {
- Fl::add_fd ((int)handle, // ACE_reinterpret_cast(int,handle),
- ACE_FlReactor::fl_io_proc,
- this);
- }
- return 0;
-}
-
-int
-ACE_FlReactor::register_handler_i (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- return ACE_Select_Reactor::register_handler_i (handles,
- handler,
- mask);
-}
-
-int
-ACE_FlReactor::remove_handler_i (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_FlReactor::remove_handler_i");
-
- // In the registration phase we registered first with
- // ACE_Select_Reactor and then with X. Now we are now doing things
- // in reverse order.
-
- // First clean up the corresponding X11Input.
- Fl::remove_fd ((int)handle); // ACE_reinterpret_cast(int,handle));
-
- // Now let the reactor do its work.
- return ACE_Select_Reactor::remove_handler_i (handle,
- mask);
-}
-
-int
-ACE_FlReactor::remove_handler_i (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask mask)
-{
- return ACE_Select_Reactor::remove_handler_i (handles,
- mask);
-}
-
-// The following function ensures there's an Fl timeout for the first
-// timeout in the Reactor's Timer_Queue.
-
-void
-ACE_FlReactor::reset_timeout (void)
-{
- ACE_Time_Value *max_wait_time =
- this->timer_queue_->calculate_timeout (0);
-
- if (max_wait_time != 0)
- {
- float t = max_wait_time->sec ()
- + max_wait_time->usec () / 1000000.0F;
- Fl::add_timeout (t,
- ACE_FlReactor::fl_timeout_proc,
- this);
- }
-}
-
-int
-ACE_FlReactor::reset_timer_interval
- (long timer_id,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_FlReactor::reset_timer_interval");
- ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token, ace_mon, this->token_, -1));
-
- int result =
- ACE_Select_Reactor::reset_timer_interval (timer_id,
- interval);
-
- if (result == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return result;
- }
-}
-
-long
-ACE_FlReactor::schedule_timer (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_FlReactor::schedule_timer");
- ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token, ace_mon, this->token_, -1));
-
- long result = ACE_Select_Reactor::schedule_timer (handler,
- arg,
- delta_time,
- interval);
- if (result == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return result;
- }
-}
-
-int
-ACE_FlReactor::cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_FlReactor::cancel_timer");
-
- if (ACE_Select_Reactor::cancel_timer (handler,
- dont_call_handle_close) == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return 0;
- }
-}
-
-int
-ACE_FlReactor::cancel_timer (long timer_id,
- const void **arg,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_FlReactor::cancel_timer");
-
- if (ACE_Select_Reactor::cancel_timer (timer_id,
- arg,
- dont_call_handle_close) == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return 0;
- }
-}
-
-#endif /* ACE_HAS_FL */
diff --git a/ace/FlReactor.h b/ace/FlReactor.h
deleted file mode 100644
index f13a731c978..00000000000
--- a/ace/FlReactor.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// FlReactor.h
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@cs.wustl.edu>
-//
-// Based in part in the ACE_XtReactor implementation by:
-//
-// Eric C. Newton's <ecn@clark.net>,
-// Kirill Rybaltchenko <Kirill.Rybaltchenko@cern.ch>, and
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_FLREACTOR_H
-#define ACE_FLREACTOR_H
-#include "ace/pre.h"
-
-#include "ace/Select_Reactor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_FL)
-
-class ACE_Export ACE_FlReactor : public ACE_Select_Reactor
-{
- // = TITLE
- // A Reactor implementation that uses the Fast-Light (FL) toolkit
- // for event demultiplexing. This will let us integrate the FL
- // toolkit with ACE and/or TAO.
- //
- // = DESCRIPTION
- // As many other GUI toolkits FL supports a minimal set of
- // callbacks to handle event demultiplexing, namely simple methods
- // to add file descriptors to the event demuxing set or timeout
- // events. This class adapts this simple mechanisms so they are
- // compatible with ACE's Reactor.
- //
-
-public:
- // = Initialization and termination methods.
- ACE_FlReactor (size_t size = DEFAULT_SIZE,
- int restart = 0,
- ACE_Sig_Handler * = 0);
- virtual ~ACE_FlReactor (void);
-
- // = Timer operations.
- virtual long schedule_timer (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval);
- virtual int reset_timer_interval (long timer_id,
- const ACE_Time_Value &interval);
- virtual int cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close = 1);
- virtual int cancel_timer (long timer_id,
- const void **arg = 0,
- int dont_call_handle_close = 1);
-
-protected:
- // = Register timers/handles with Fl.
- virtual int register_handler_i (ACE_HANDLE handle,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask);
- // Register a single <handler>.
-
- virtual int register_handler_i (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask);
- // Register a set of <handlers>.
-
- virtual int remove_handler_i (ACE_HANDLE handle,
- ACE_Reactor_Mask mask);
- // Remove the <handler> associated with this <handle>.
-
- virtual int remove_handler_i (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask);
- // Remove a set of <handles>.
-
- virtual int wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &,
- ACE_Time_Value *);
- // Wait for events to occur.
-
-private:
- void reset_timeout (void);
- // This method ensures there's an Fl timeout for the first timeout
- // in the Reactor's Timer_Queue.
-
- // = Integrate with the FL callback function mechanism.
- static void fl_io_proc (int fd, void*);
- static void fl_timeout_proc (void*);
-
- ACE_FlReactor (const ACE_FlReactor &);
- ACE_FlReactor &operator = (const ACE_FlReactor &);
- // Deny access since member-wise won't work...
-};
-
-#if defined(__ACE_INLINE__)
-#include "ace/FlReactor.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_FL */
-
-#include "ace/post.h"
-#endif /* ACE_FLREACTOR_H */
diff --git a/ace/FlReactor.i b/ace/FlReactor.i
deleted file mode 100644
index 74e88caa0c5..00000000000
--- a/ace/FlReactor.i
+++ /dev/null
@@ -1,2 +0,0 @@
-// $Id$
-
diff --git a/ace/Free_List.cpp b/ace/Free_List.cpp
deleted file mode 100644
index 703e2f7f572..00000000000
--- a/ace/Free_List.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// $Id$
-
-#ifndef ACE_FREE_LIST_C
-#define ACE_FREE_LIST_C
-
-#include "ace/Free_List.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Free_List.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Free_List, "$Id$")
-
-// Empty constructor
-
-template <class T>
-ACE_Free_List<T>::~ACE_Free_List (void)
-{
- // Nothing
-}
-
-// Default constructor that takes in a preallocation number
-// (<prealloc>), a low and high water mark (<lwm> and <hwm>) and an
-// increment value (<inc>)
-
-template <class T, class ACE_LOCK>
-ACE_Locked_Free_List<T, ACE_LOCK>::ACE_Locked_Free_List (int mode,
- size_t prealloc,
- size_t lwm,
- size_t hwm,
- size_t inc)
- : mode_ (mode),
- free_list_ (0),
- lwm_ (lwm),
- hwm_ (hwm),
- inc_ (inc),
- size_ (0)
-{
- this->alloc (prealloc);
-}
-
-// Destructor - removes all the elements from the free_list
-
-template <class T, class ACE_LOCK>
-ACE_Locked_Free_List<T, ACE_LOCK>::~ACE_Locked_Free_List (void)
-{
- if (this->mode_ != ACE_PURE_FREE_LIST)
- while (this->free_list_ != 0)
- {
- T *temp = this->free_list_;
- this->free_list_ = this->free_list_->get_next ();
- delete temp;
- }
-}
-
-// Allocates <n> extra nodes for the freelist
-
-template <class T, class ACE_LOCK> void
-ACE_Locked_Free_List<T, ACE_LOCK>::alloc (size_t n)
-{
- for (; n > 0; n--)
- {
- T *temp = 0;
- ACE_NEW (temp, T);
- temp->set_next (this->free_list_);
- this->free_list_ = temp;
- this->size_++;
- }
-}
-
-// Removes and frees <n> nodes from the freelist.
-
-template <class T, class ACE_LOCK> void
-ACE_Locked_Free_List<T, ACE_LOCK>::dealloc (size_t n)
-{
- for (; this->free_list_ != 0 && n > 0;
- n--)
- {
- T *temp = this->free_list_;
- this->free_list_ = this->free_list_->get_next ();
- delete temp;
- this->size_--;
- }
-}
-
-#endif /* ACE_FREE_LIST_C */
diff --git a/ace/Free_List.h b/ace/Free_List.h
deleted file mode 100644
index 41650439d1c..00000000000
--- a/ace/Free_List.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Free_List.h
-//
-// = AUTHOR
-// Darrell Brunsch (brunsch@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_FREE_LIST_H
-#define ACE_FREE_LIST_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch_T.h"
-
-template <class T>
-class ACE_Free_List
-{
- // = TITLE
- // Implements a free list.
- //
- // = DESCRIPTION
- // This class maintains a free list of nodes of type T.
-public:
- virtual ~ACE_Free_List (void);
- // Destructor - removes all the elements from the free_list.
-
- virtual void add (T *element) = 0;
- // Inserts an element onto the free list (if it isn't past the high
- // water mark).
-
- virtual T *remove (void) = 0;
- // Takes a element off the freelist and returns it. It creates
- // <inc> new elements if the size is at or below the low water mark.
-
- virtual size_t size (void) = 0;
- // Returns the current size of the free list.
-
- virtual void resize (size_t newsize) = 0;
- // Resizes the free list to <newsize>.
-};
-
-template <class T, class ACE_LOCK>
-class ACE_Locked_Free_List : public ACE_Free_List<T>
-{
- // = TITLE
- // Implements a free list.
- //
- // = DESCRIPTION
- // This class maintains a free list of nodes of type T. It
- // depends on the type T having a <get_next> and <set_next>
- // method. It maintains a mutex so the freelist can be used in
- // a multithreaded program .
-public:
- // = Initialization and termination.
- ACE_Locked_Free_List (int mode = ACE_FREE_LIST_WITH_POOL,
- size_t prealloc = ACE_DEFAULT_FREE_LIST_PREALLOC,
- size_t lwm = ACE_DEFAULT_FREE_LIST_LWM,
- size_t hwm = ACE_DEFAULT_FREE_LIST_HWM,
- size_t inc = ACE_DEFAULT_FREE_LIST_INC);
- // Constructor takes a <mode> (i.e., ACE_FREE_LIST_WITH_POOL or
- // ACE_PURE_FREE_LIST), a count of the number of nodes to
- // <prealloc>, a low and high water mark (<lwm> and <hwm>) that
- // indicate when to allocate more nodes, an increment value (<inc>)
- // that indicates how many nodes to allocate when the list must
- // grow.
-
- virtual ~ACE_Locked_Free_List (void);
- // Destructor - removes all the elements from the free_list.
-
- virtual void add (T *element);
- // Inserts an element onto the free list (if it isn't past the high
- // water mark).
-
- virtual T *remove (void);
- // Takes a element off the freelist and returns it. It creates
- // <inc> new elements if the size is at or below the low water mark.
-
- virtual size_t size (void);
- // Returns the current size of the free list.
-
- virtual void resize (size_t newsize);
- // Resizes the free list to <newsize>.
-
-protected:
- virtual void alloc (size_t n);
- // Allocates <n> extra nodes for the freelist.
-
- virtual void dealloc (size_t n);
- // Removes and frees <n> nodes from the freelist.
-
- int mode_;
- // Free list operation mode, either ACE_FREE_LIST_WITH_POOL or
- // ACE_PURE_FREE_LIST.
-
- T *free_list_;
- // Pointer to the first node in the freelist.
-
- size_t lwm_;
- // Low water mark.
-
- size_t hwm_;
- // High water mark.
-
- size_t inc_;
- // Increment value.
-
- size_t size_;
- // Keeps track of the size of the list.
-
- ACE_LOCK mutex_;
- // Synchronization variable for <ACE_Timer_Queue>.
-
-private:
- // = Don't allow these operations for now.
- ACE_UNIMPLEMENTED_FUNC (ACE_Locked_Free_List (const ACE_Locked_Free_List<T, ACE_LOCK> &))
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Locked_Free_List<T, ACE_LOCK> &))
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Free_List.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Free_List.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Free_List.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_FREE_LIST_H */
diff --git a/ace/Free_List.i b/ace/Free_List.i
deleted file mode 100644
index 7875592c8a9..00000000000
--- a/ace/Free_List.i
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// Inserts an element onto the free list (if we are allowed to manage
-// elements withing and it pasts the high water mark, delete the
-// element)
-
-template <class T, class ACE_LOCK> ACE_INLINE void
-ACE_Locked_Free_List<T, ACE_LOCK>::add (T *element)
-{
- ACE_MT (ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_));
-
- // Check to see that we not at the high water mark.
- if (this->mode_ == ACE_PURE_FREE_LIST
- || this->size_ < this->hwm_)
- {
- element->set_next (this->free_list_);
- this->free_list_ = element;
- this->size_++;
- }
- else
- delete element;
-}
-
-// Takes a element off the freelist and returns it. It creates <inc>
-// new elements if we are allowed to do it and the size is at the low
-// water mark.
-
-template <class T, class ACE_LOCK> ACE_INLINE T *
-ACE_Locked_Free_List<T, ACE_LOCK>::remove (void)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, 0));
-
- // If we are at the low water mark, add some nodes
- if (this->mode_ != ACE_PURE_FREE_LIST && this->size_ <= this->lwm_)
- this->alloc (this->inc_);
-
- // Remove a node
- T *temp = this->free_list_;
-
- if (temp != 0)
- {
- this->free_list_ = this->free_list_->get_next ();
- this->size_--;
- }
-
- return temp;
-}
-
-
-// Returns the current size of the free list
-
-template <class T, class ACE_LOCK> ACE_INLINE size_t
-ACE_Locked_Free_List<T, ACE_LOCK>::size (void)
-{
- return this->size_;
-}
-
-// Resizes the free list to <newsize>
-
-template <class T, class ACE_LOCK> ACE_INLINE void
-ACE_Locked_Free_List<T, ACE_LOCK>::resize (size_t newsize)
-{
- ACE_MT (ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_));
-
- // Check if we are allowed to resize
- if (this->mode_ != ACE_PURE_FREE_LIST)
- // Check to see if we grow or shrink
- if (newsize < this->size_)
- this->dealloc (this->size_ - newsize);
- else
- this->alloc (newsize - this->size_);
-}
-
-
diff --git a/ace/Functor.cpp b/ace/Functor.cpp
deleted file mode 100644
index d83ef473c6f..00000000000
--- a/ace/Functor.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Functor.cpp
-//
-// = DESCRIPTION
-// Non-inlinable method definitions for non-templatized classes
-// and template specializations implementing the GOF Command Pattern,
-// and STL-style functors.
-//
-// = AUTHOR
-// Chris Gill <cdgill@cs.wustl.edu>
-//
-// Based on Command Pattern implementations originally done by
-//
-// Carlos O'Ryan <coryan@cs.wustl.edu> and
-// Douglas C. Schmidt <schmidt@cs.wustl.edu> and
-// Sergio Flores-Gaitan <sergio@cs.wustl.edu>
-//
-// and on STL-style functor implementations originally done by
-//
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#if !defined (ACE_FUNCTOR_C)
-#define ACE_FUNCTOR_C
-
-#include "ace/Functor_T.h"
-#include "ace/Functor.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Functor.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Functor, "$Id$")
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-#endif /* ACE_FUNCTOR_C */
diff --git a/ace/Functor.h b/ace/Functor.h
deleted file mode 100644
index bce51209ff6..00000000000
--- a/ace/Functor.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Functor.h
-//
-// = DESCRIPTION
-// Non-templatized classes and class template specializations for
-// implementing function objects that are used in various places
-// in ACE. There are currently two major categories of function
-// objects in ACE: GoF Command Pattern objects, and STL-style
-// functors for comparison of container elements. The command objects
-// are invoked via an execute () method, while the STL-style functors are
-// invoked via an operator() () method.
-// Non-templatized classes for implementing the GoF Command Pattern,
-// also known as functors or function objects.
-//
-// = AUTHOR
-// Chris Gill <cdgill@cs.wustl.edu>
-//
-// Based on Command Pattern implementations originally done by
-//
-// Carlos O'Ryan <coryan@cs.wustl.edu> and
-// Douglas C. Schmidt <schmidt@cs.wustl.edu> and
-// Sergio Flores-Gaitan <sergio@cs.wustl.edu>
-//
-// and on STL-style functor implementations originally done by
-//
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_FUNCTOR_H
-#define ACE_FUNCTOR_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-//////////////////////////////////////////////////////////////
-// GOF Command Pattern Classes and Template Specializations //
-//////////////////////////////////////////////////////////////
-
-class ACE_Export ACE_Command_Base
-{
- // = TITLE
- // Defines an abstract class that allows us to invoke commands
- // without knowing anything about the implementation.
- //
- // = DESCRIPTION
- // This class declares an interface to execute a command
- // independent of the effect of the command, or the objects used
- // to implement it.
-public:
- // = Initialization and termination methods.
- ACE_Command_Base (void);
- // Default constructor.
-
- virtual ~ACE_Command_Base (void);
- // Virtaul destructor.
-
- virtual int execute (void *arg = 0) = 0;
- // Invokes the method encapsulated by the command, passing along the
- // passed argument (if any). Users of classes derived from this
- // class must ensure that the resulting invocation can tolerate a
- // null void pointer being passed, or otherwise ensure that this
- // will never occur.
-};
-
-////////////////////////////////////////////////////////////
-// STL-style Functor Classes and Template Specializations //
-////////////////////////////////////////////////////////////
-
-// Forward declaration since we are going to specialize that template
-// here. The template itself requires this file so every user of the
-// template should also see the specialization.
-template <class TYPE> class ACE_Hash;
-template <class TYPE> class ACE_Equal_To;
-template <class TYPE> class ACE_Less_Than;
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<char>
-{
- // = TITLE
- // Function object for hashing a char
-public:
- u_long operator () (char t) const;
- // Simply returns t
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<signed char>
-{
- // = TITLE
- // Function object for hashing a signed char
-public:
- u_long operator () (signed char t) const;
- // Simply returns t
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<unsigned char>
-{
- // = TITLE
- // Function object for hashing an unsigned char
-public:
- u_long operator () (unsigned char t) const;
- // Simply returns t
-};
-
-// @@ ADD HASHES FOR ACE TYPES
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<ACE_INT16>
-{
- // = TITLE
- // Function object for hashing a 16-bit signed number
-public:
- u_long operator () (ACE_INT16 t) const;
- // Simply returns t
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<ACE_UINT16>
-{
- // = TITLE
- // Function object for hashing a 16-bit unsigned number
-public:
- u_long operator () (ACE_UINT16 t) const;
- // Simply returns t
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<ACE_INT32>
-{
- // = TITLE
- // Function object for hashing a 32-bit signed number
-public:
- u_long operator () (ACE_INT32 t) const;
- // Simply returns t
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<ACE_UINT32>
-{
- // = TITLE
- // Function object for hashing a 32-bit unsigned number
-public:
- u_long operator () (ACE_UINT32 t) const;
- // Simply returns t
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<ACE_UINT64>
-{
- // = TITLE
- // Function object for hashing a 64-bit unsigned number
-public:
- u_long operator () (ACE_UINT64 t) const;
- // Simply returns t
-};
-
-// @@ DONE ADDING HASHES FOR ACE TYPES
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<const ACE_TCHAR *>
-{
- // = TITLE
- // Function object for hashing a const string
-public:
- u_long operator () (const ACE_TCHAR *t) const;
- // Calls ACE::hash_pjw
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Hash<ACE_TCHAR *>
-{
- // = TITLE
- // Function object for hashing a string
-public:
- u_long operator () (const ACE_TCHAR *t) const;
- // Calls ACE::hash_pjw
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Equal_To<const ACE_TCHAR *>
-{
- // = TITLE
- // Function object for determining whether two const strings are equal.
-public:
- int operator () (const ACE_TCHAR *lhs,
- const ACE_TCHAR *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Equal_To<ACE_TCHAR *>
-{
- // = TITLE
- // Function object for determining whether two non-const
- // strings are equal.
-public:
- int operator () (const ACE_TCHAR *lhs,
- const ACE_TCHAR *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Less_Than<const ACE_TCHAR *>
-{
- // = TITLE
- // Function object for determining whether the first const string
- // is less than the second const string.
-public:
- int operator () (const ACE_TCHAR *lhs,
- const ACE_TCHAR *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Less_Than<ACE_TCHAR *>
-{
- // = TITLE
- // Function object for determining whether the first string
- // is less than the second string.
-public:
- int operator () (const ACE_TCHAR *lhs,
- const ACE_TCHAR *rhs) const;
- // Simply calls ACE_OS::strcmp
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Functor.i"
-#endif /* __ACE_INLINE__ */
-
-// Include the templates here.
-#include "ace/Functor_T.h"
-
-#include "ace/post.h"
-#endif /* ACE_FUNCTOR_H */
diff --git a/ace/Functor.i b/ace/Functor.i
deleted file mode 100644
index 3fe587c8b95..00000000000
--- a/ace/Functor.i
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Functor.i
-//
-// = DESCRIPTION
-// Inlinable method definitions for non-templatized classes
-// and template specializations implementing the GOF Command Pattern,
-// and STL-style functors.
-//
-// = AUTHOR
-// Chris Gill <cdgill@cs.wustl.edu>
-//
-// Based on Command Pattern implementations originally done by
-//
-// Carlos O'Ryan <coryan@cs.wustl.edu> and
-// Douglas C. Schmidt <schmidt@cs.wustl.edu> and
-// Sergio Flores-Gaitan <sergio@cs.wustl.edu>
-//
-// and on STL-style functor implementations originally done by
-//
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-//////////////////////////////////////////////////////////////
-// GOF Command Pattern Classes and Template Specializations //
-//////////////////////////////////////////////////////////////
-
-// Default constructor.
-
-ACE_INLINE
-ACE_Command_Base::ACE_Command_Base (void)
-{
-}
-
-// Virtaul destructor.
-
-ACE_INLINE
-ACE_Command_Base::~ACE_Command_Base (void)
-{
-}
-
-////////////////////////////////////////////////////////////
-// STL-style Functor Classes and Template Specializations //
-////////////////////////////////////////////////////////////
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE
-u_long
-ACE_Hash<char>::operator () (char t) const
-{
- return t;
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<signed char>::operator () (signed char t) const
-{
- return t;
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<unsigned char>::operator () (unsigned char t) const
-{
- return t;
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<ACE_INT16>::operator () (ACE_INT16 t) const
-{
- return t;
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<ACE_UINT16>::operator () (ACE_UINT16 t) const
-{
- return t;
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<ACE_INT32>::operator () (ACE_INT32 t) const
-{
- return t;
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<ACE_UINT32>::operator () (ACE_UINT32 t) const
-{
- return t;
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<ACE_UINT64>::operator () (ACE_UINT64 t) const
-{
- return ACE_U64_TO_U32 (t);
-}
-
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<const ACE_TCHAR *>::operator () (const ACE_TCHAR *t) const
-{
- return ACE::hash_pjw (t);
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE u_long
-ACE_Hash<ACE_TCHAR *>::operator () (const ACE_TCHAR *t) const
-{
- return ACE::hash_pjw (t);
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Equal_To<const ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *rhs) const
-{
- return !ACE_OS::strcmp (lhs, rhs);
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Equal_To<ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *rhs) const
-{
- return !ACE_OS::strcmp (lhs, rhs);
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Less_Than<const ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *rhs) const
-{
- return (ACE_OS::strcmp (lhs, rhs) < 0) ? 1 : 0;
-}
-
-ACE_TEMPLATE_METHOD_SPECIALIZATION
-ACE_INLINE int
-ACE_Less_Than<ACE_TCHAR *>::operator () (const ACE_TCHAR *lhs, const ACE_TCHAR *rhs) const
-{
- return (ACE_OS::strcmp (lhs, rhs) < 0) ? 1 : 0;
-}
diff --git a/ace/Functor_T.cpp b/ace/Functor_T.cpp
deleted file mode 100644
index 73b183d0fd3..00000000000
--- a/ace/Functor_T.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef ACE_FUNCTOR_T_C
-#define ACE_FUNCTOR_T_C
-
-#include "ace/Functor_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Functor_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Functor_T, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Command_Callback)
-
-///////////////////////////////////
-// GOF Command Pattern Templates //
-///////////////////////////////////
-
-// Constructor.
-
-template <class RECEIVER, class ACTION>
-ACE_Command_Callback<RECEIVER, ACTION>::ACE_Command_Callback (RECEIVER &recvr,
- ACTION action)
- : receiver_ (recvr),
- action_ (action)
-{
-}
-
-template <class RECEIVER, class ACTION>
-ACE_Command_Callback<RECEIVER, ACTION>::~ACE_Command_Callback (void)
-{
-}
-
-// Invokes an operation.
-
-template <class RECEIVER, class ACTION> int
-ACE_Command_Callback<RECEIVER, ACTION>::execute (void *arg)
-{
- return (receiver_.*action_) (arg);
-}
-
-
-#endif /* ACE_FUNCTOR_T_C */
diff --git a/ace/Functor_T.h b/ace/Functor_T.h
deleted file mode 100644
index d3a59fa7749..00000000000
--- a/ace/Functor_T.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Functor_T.h
-//
-// = DESCRIPTION
-// Templatized classes for implementing function objects that are
-// used in various places in ACE. There are currently two major
-// categories of function objects in ACE: GOF Command Pattern
-// objects, and STL-style functors for comparison of container
-// elements. The command objects are invoked via an <execute>
-// method, while the STL-style functors are invoked via an
-// <operator()> method.
-//
-// = AUTHOR
-// Chris Gill <cdgill@cs.wustl.edu>
-//
-// Based on Command Pattern implementations originally done by
-//
-// Carlos O'Ryan <coryan@cs.wustl.edu>,
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>, and
-// Sergio Flores-Gaitan <sergio@cs.wustl.edu>
-//
-// and on STL-style functor implementations originally done by
-//
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_FUNCTOR_T_H
-#define ACE_FUNCTOR_T_H
-#include "ace/pre.h"
-
-#include "ace/Functor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-///////////////////////////////////
-// GOF Command Pattern Templates //
-///////////////////////////////////
-
-template <class RECEIVER, class ACTION>
-class ACE_Command_Callback : public ACE_Command_Base
-{
- // = TITLE
- // Defines a class template that allows us to invoke a GOF
- // command style callback to an object without knowing anything
- // about the object except its type.
- //
- // = DESCRIPTION
- // This class declares an interface to execute operations,
- // binding a RECEIVER object with an ACTION. The RECEIVER knows
- // how to implement the operation. A class can invoke operations
- // without knowing anything about it, or how it was implemented.
-public:
- ACE_Command_Callback (RECEIVER &recvr, ACTION action);
- // Constructor: sets the <receiver_> of the Command to recvr, and the
- // <action_> of the Command to <action>.
-
- virtual ~ACE_Command_Callback (void);
- // Virtual destructor.
-
- virtual int execute (void *arg = 0);
- // Invokes the method <action_> from the object <receiver_>.
-
-private:
- RECEIVER &receiver_;
- // Object where the method resides.
-
- ACTION action_;
- // Method that is going to be invoked.
-};
-
-/////////////////////////////////
-// STL-style Functor Templates //
-/////////////////////////////////
-
-template <class TYPE>
-class ACE_Hash
-{
- // = TITLE
- // Function object for hashing
-public:
- u_long operator () (const TYPE &t) const;
- // Simply calls t.hash ()
-};
-
-template <class TYPE>
-class ACE_Pointer_Hash
-{
- // = TITLE
- // Function object for hashing pointers
-public:
- u_long operator () (TYPE t) const;
- // Simply returns t.
-};
-
-template <class TYPE>
-class ACE_Equal_To
-{
- // = TITLE
- // Function object for comparing two objects of
- // the given type for equality.
-public:
- int operator () (const TYPE &lhs,
- const TYPE &rhs) const;
- // Simply calls operator==
-};
-
-template <class TYPE>
-class ACE_Less_Than
-{
- // = TITLE
- // Function object for determining whether the first object of
- // the given type is less than the second object of the same
- // type.
-public:
- int operator () (const TYPE &lhs,
- const TYPE &rhs) const;
- // Simply calls operator<
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Functor_T.i"
-#endif /* __ACE_INLINE__ */
-
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Functor_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Functor_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_FUNCTOR_T_H */
diff --git a/ace/Functor_T.i b/ace/Functor_T.i
deleted file mode 100644
index d626f76ed15..00000000000
--- a/ace/Functor_T.i
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-template <class TYPE> ACE_INLINE u_long
-ACE_Hash<TYPE>::operator () (const TYPE &t) const
-{
- return t.hash ();
-}
-
-template <class TYPE> ACE_INLINE u_long
-ACE_Pointer_Hash<TYPE>::operator () (TYPE t) const
-{
- return u_long (t);
-}
-
-template <class TYPE> ACE_INLINE int
-ACE_Equal_To<TYPE>::operator () (const TYPE &lhs,
- const TYPE &rhs) const
-{
- return lhs == rhs;
-}
-
-template <class TYPE> ACE_INLINE int
-ACE_Less_Than<TYPE>::operator () (const TYPE &lhs,
- const TYPE &rhs) const
-{
- return lhs < rhs ? 1 : 0;
-}
diff --git a/ace/Future.cpp b/ace/Future.cpp
deleted file mode 100644
index f70f8df83bb..00000000000
--- a/ace/Future.cpp
+++ /dev/null
@@ -1,425 +0,0 @@
-// $Id$
-
-#ifndef ACE_FUTURE_CPP
-#define ACE_FUTURE_CPP
-
-#include "ace/Future.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID (ace, Future, "$Id$")
-
-#if defined (ACE_HAS_THREADS)
-
-template <class T>
-ACE_Future_Holder<T>::ACE_Future_Holder (void)
-{
-}
-
-template <class T>
-ACE_Future_Holder<T>::ACE_Future_Holder (const ACE_Future<T> &item)
- : item_ (item)
-{
-}
-
-template <class T>
-ACE_Future_Holder<T>::~ACE_Future_Holder (void)
-{
-}
-
-template <class T>
-ACE_Future_Observer<T>::ACE_Future_Observer (void)
-{
-}
-
-template <class T>
-ACE_Future_Observer<T>::~ACE_Future_Observer (void)
-{
-}
-
-// Dump the state of an object.
-
-template <class T> void
-ACE_Future_Rep<T>::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG,
- "ref_count_ = %d\n",
- (int) this->ref_count_));
- ACE_DEBUG ((LM_INFO,"value_: \n"));
- if (this->value_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (NON-NULL)\n")));
- else
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (NULL)\n")));
-
- ACE_DEBUG ((LM_INFO,"value_ready_: \n"));
- this->value_ready_.dump ();
- ACE_DEBUG ((LM_INFO,"value_ready_mutex_: \n"));
- this->value_ready_mutex_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class T> ACE_Future_Rep<T> *
-ACE_Future_Rep<T>::create (void)
-{
- // Yes set ref count to zero.
- return new ACE_Future_Rep<T> ();
-}
-
-template <class T> ACE_Future_Rep<T> *
-ACE_Future_Rep<T>::attach (ACE_Future_Rep<T>*& rep)
-{
- ACE_ASSERT (rep != 0);
- // Use value_ready_mutex_ for both condition and ref count management
- ACE_MT (ACE_Guard<ACE_Thread_Mutex> r_mon (rep->value_ready_mutex_));
- ++rep->ref_count_;
- return rep;
-}
-
-template <class T> void
-ACE_Future_Rep<T>::detach (ACE_Future_Rep<T>*& rep)
-{
- ACE_ASSERT (rep != 0);
- // Use value_ready_mutex_ for both condition and ref count management
- ACE_MT (ACE_GUARD (ACE_Thread_Mutex, r_mon, rep->value_ready_mutex_));
-
- if (rep->ref_count_-- == 0)
- {
- ACE_MT (r_mon.release ());
- // We do not need the lock when deleting the representation.
- // There should be no side effects from deleting rep and we don
- // not want to release a deleted mutex.
- delete rep;
- }
-}
-
-template <class T> void
-ACE_Future_Rep<T>::assign (ACE_Future_Rep<T>*& rep, ACE_Future_Rep<T>* new_rep)
-{
- ACE_ASSERT (rep != 0);
- ACE_ASSERT (new_rep != 0);
- // Use value_ready_mutex_ for both condition and ref count management
- ACE_MT (ACE_GUARD (ACE_Thread_Mutex, r_mon, rep->value_ready_mutex_));
-
- ACE_Future_Rep<T>* old = rep;
- rep = new_rep;
-
- // detached old last for exception safety
- if (old->ref_count_-- == 0)
- {
- ACE_MT (r_mon.release ());
- // We do not need the lock when deleting the representation.
- // There should be no side effects from deleting rep and we don
- // not want to release a deleted mutex.
- delete old;
- }
-}
-
-template <class T>
-ACE_Future_Rep<T>::ACE_Future_Rep (void)
- : value_ (0),
- ref_count_ (0),
- value_ready_ (this->value_ready_mutex_)
-{
-}
-
-template <class T>
-ACE_Future_Rep<T>::~ACE_Future_Rep (void)
-{
- delete this->value_;
-}
-
-template <class T> int
-ACE_Future_Rep<T>::ready (void)
-{
- return this->value_ != 0;
-}
-
-template <class T> int
-ACE_Future_Rep<T>::set (const T &r,
- ACE_Future<T> &caller)
-{
- // If the value is already produced, ignore it...
- if (this->value_ == 0)
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->value_ready_mutex_, -1));
- // Otherwise, create a new result value. Note the use of the
- // Double-checked locking pattern to avoid multiple allocations.
-
- if (this->value_ == 0)
- ACE_NEW_RETURN (this->value_,
- T (r),
- -1);
-
- // Remove and notify all subscribed observers.
- ACE_TYPENAME OBSERVER_COLLECTION::iterator iterator =
- this->observer_collection_.begin ();
-
- ACE_TYPENAME OBSERVER_COLLECTION::iterator end =
- this->observer_collection_.end ();
-
- for (;
- iterator != end;
- ++iterator)
- {
- OBSERVER *observer = *iterator;
- observer->update (caller);
- }
-
- // Signal all the waiting threads.
- return this->value_ready_.broadcast ();
-
- // Destructor releases the lock.
- }
- return 0;
-}
-
-template <class T> int
-ACE_Future_Rep<T>::get (T &value,
- ACE_Time_Value *tv)
-{
- // If the value is already produced, return it.
- if (this->value_ == 0)
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->value_ready_mutex_, -1));
-
- // If the value is not yet defined we must block until the
- // producer writes to it.
-
- while (this->value_ == 0)
- // Perform a timed wait.
- if (this->value_ready_.wait (tv) == -1)
- return -1;
-
- // Destructor releases the lock.
- }
-
- value = *this->value_;
- return 0;
-}
-
-template <class T> int
-ACE_Future_Rep<T>::attach (ACE_Future_Observer<T> *observer,
- ACE_Future<T> &caller)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->value_ready_mutex_, -1));
-
- // Otherwise, create a new result value. Note the use of the
- // Double-checked locking pattern to avoid corrupting the list.
-
- int result = 1;
-
- // If the value is already produced, then notify observer
- if (this->value_ == 0)
- {
- result = this->observer_collection_.insert (observer);
- }
- else
- observer->update (caller);
-
- return result;
-}
-
-template <class T> int
-ACE_Future_Rep<T>::detach (ACE_Future_Observer<T> *observer)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->value_ready_mutex_, -1));
-
- // Remove all occurrences of the specified observer from this
- // objects hash map.
- return this->observer_collection_.remove (observer);
-}
-
-template <class T>
-ACE_Future_Rep<T>::operator T ()
-{
- // If the value is already produced, return it.
- if (this->value_ == 0)
- {
- // Constructor of ace_mon acquires the mutex.
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->value_ready_mutex_, 0));
-
- // If the value is not yet defined we must block until the
- // producer writes to it.
-
- // Wait ``forever.''
-
- while (this->value_ == 0)
- if (this->value_ready_.wait () == -1)
- // What to do in this case since we've got to indicate
- // failure somehow? Exceptions would be nice, but they're
- // not portable...
- return 0;
-
- // Destructor releases the mutex
- }
-
- return *this->value_;
-}
-
-template <class T>
-ACE_Future<T>::ACE_Future (void)
- : future_rep_ (FUTURE_REP::create ())
-{
-}
-
-template <class T>
-ACE_Future<T>::ACE_Future (const ACE_Future<T> &r)
- : future_rep_ (FUTURE_REP::attach (((ACE_Future<T> &) r).future_rep_))
-{
-}
-
-template <class T>
-ACE_Future<T>::ACE_Future (const T &r)
- : future_rep_ (FUTURE_REP::create ())
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT (" (%t) funny constructor\n")));
- this->future_rep_->set (r,
- *this);
-}
-
-template <class T>
-ACE_Future<T>::~ACE_Future (void)
-{
- FUTURE_REP::detach (future_rep_);
-}
-
-template <class T> int
-ACE_Future<T>::operator== (const ACE_Future<T> &r) const
-{
- return r.future_rep_ == this->future_rep_;
-}
-
-template <class T> int
-ACE_Future<T>::operator!= (const ACE_Future<T> &r) const
-{
- return r.future_rep_ != this->future_rep_;
-}
-
-template <class T> int
-ACE_Future<T>::cancel (const T &r)
-{
- this->cancel ();
- return this->future_rep_->set (r,
- *this);
-}
-
-template <class T> int
-ACE_Future<T>::cancel (void)
-{
- // If this ACE_Future is already attached to a ACE_Future_Rep,
- // detach it (maybe delete the ACE_Future_Rep).
- FUTURE_REP::assign (this->future_rep_,
- FUTURE_REP::create ());
- return 0;
-}
-
-template <class T> int
-ACE_Future<T>::set (const T &r)
-{
- // Give the pointer to the result to the ACE_Future_Rep.
- return this->future_rep_->set (r,
- *this);
-}
-
-template <class T> int
-ACE_Future<T>::ready (void)
-{
- // We're ready if the ACE_Future_rep is ready...
- return this->future_rep_->ready ();
-}
-
-template <class T> int
-ACE_Future<T>::get (T &value,
- ACE_Time_Value *tv)
-{
- // We return the ACE_Future_rep.
- return this->future_rep_->get (value, tv);
-}
-
-template <class T> int
-ACE_Future<T>::attach (ACE_Future_Observer<T> *observer)
-{
- return this->future_rep_->attach (observer, *this);
-}
-
-template <class T> int
-ACE_Future<T>::detach (ACE_Future_Observer<T> *observer)
-{
- return this->future_rep_->detach (observer);
-}
-
-template <class T>
-ACE_Future<T>::operator T ()
-{
- // note that this will fail (and COREDUMP!)
- // if future_rep_ == 0 !
- //
- // but...
- // this is impossible unless somebody is so stupid to
- // try something like this:
- //
- // Future<T> futT;
- // T t;
- // t = futT;
-
- // perform type conversion on Future_Rep.
- return *future_rep_;
-}
-
-template <class T> void
-ACE_Future<T>::operator = (const ACE_Future<T> &rhs)
-{
- // assignment:
- //
- // bind <this> to the same <ACE_Future_Rep> as <r>.
-
- // This will work if &r == this, by first increasing the ref count
- ACE_Future<T> &r = (ACE_Future<T> &) rhs;
- FUTURE_REP::assign (this->future_rep_,
- FUTURE_REP::attach (r.future_rep_));
-}
-
-template <class T> void
-ACE_Future<T>::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_BEGIN_DUMP, this));
-
- if (this->future_rep_)
- this->future_rep_->dump ();
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_END_DUMP));
-}
-
-template <class T> ACE_Future_Rep<T> *
-ACE_Future<T>::get_rep ()
-{
- return this->future_rep_;
-}
-
-template <class T> void *
-ACE_Future<T>::operator new (size_t)
-{
- ACE_throw_bad_alloc;
-#if defined (__HP_aCC)
- return 0;
-#endif /* 0 */
-}
-
-template <class T> void
-ACE_Future<T>::operator delete (void *)
-{
-}
-
-template <class T> void
-ACE_Future<T>::operator & ()
-{
-}
-
-#endif /* ACE_HAS_THREADS */
-#endif /* ACE_FUTURE_CPP */
diff --git a/ace/Future.h b/ace/Future.h
deleted file mode 100644
index 6abbc5d9a55..00000000000
--- a/ace/Future.h
+++ /dev/null
@@ -1,328 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Future.h
-//
-// = AUTHOR (S)
-// Andres Kruse <Andres.Kruse@cern.ch>,
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>,
-// Per Andersson <Per.Andersson@hfera.ericsson.se>, and
-// John Tucker <jtucker@infoglide.com>
-//
-// ============================================================================
-
-#ifndef ACE_FUTURE_H
-#define ACE_FUTURE_H
-#include "ace/pre.h"
-
-#include "ace/Containers.h"
-#include "ace/Synch.h"
-#include "ace/Strategies_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_THREADS)
-
-// Forward decl.
-template <class T> class ACE_Future_Holder;
-template <class T> class ACE_Future_Observer;
-template <class T> class ACE_Future_Rep;
-template <class T> class ACE_Future;
-
-template <class T>
-class ACE_Export ACE_Future_Holder
-{
- // = TITLE
- // Implementation of object which has holds ACE_Future.
-public:
- ACE_Future_Holder (const ACE_Future<T> &future);
- ~ACE_Future_Holder (void);
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- ACE_Future<T> item_;
-
-protected:
- ACE_Future_Holder (void);
-};
-
-template <class T>
-class ACE_Future_Observer
-{
- // = TITLE
- // ACE_Future_Observer<T>
- //
- // = DESCRIPTION
- // An ACE_Future_Observer object implements an object that is
- // subscribed with an ACE_Future object so that it may be
- // notified when the value of the ACE_Future object is
- // written to by a writer thread.
- //
- // It uses the Observer pattern
-public:
- // = Destructor
- virtual ~ACE_Future_Observer (void);
-
- virtual void update (const ACE_Future<T> &future) = 0;
- // Called by the ACE_Future in which we are subscribed to when
- // its value is written to.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-protected:
-
- // = Constructor
- ACE_Future_Observer (void);
-};
-
-template <class T>
-class ACE_Future_Rep
-{
- // = TITLE
- // ACE_Future_Rep<T>
- //
- // = DESCRIPTION
- // An ACE_Future_Rep<T> object encapsules a pointer to an object
- // of class T which is the result of an asynchronous method
- // invocation. It is pointed to by ACE_Future<T> object[s] and
- // only accessible through them.
-private:
- friend class ACE_Future<T>;
-
- int set (const T &r,
- ACE_Future<T> &caller);
- // Set the result value. The specified <caller> represents the
- // future that invoked this <set> method, which is used to notify
- // the list of future observers.
-
- int get (T &value,
- ACE_Time_Value *tv);
- // Wait up to <tv> time to get the <value>. Note that <tv> must be
- // specified in absolute time rather than relative time.
-
- int attach (ACE_Future_Observer<T> *observer,
- ACE_Future<T> &caller);
- // Attaches the specified observer to a subject (i.e. the
- // <ACE_Future_Rep>). The update method of the specified subject will
- // be invoked with a copy of the written-to <ACE_Future> as input when
- // the result gets set.
- //
- // Returns 0 if the observer is successfully attached, 1 if the
- // observer is already attached, and -1 if failures occur.
-
- int detach (ACE_Future_Observer<T> *observer);
- // Detaches the specified observer from a subject (i.e. the
- // <ACE_Future_Rep>). The update method of the specified subject will
- // not be invoked when the <ACE_Future_Rep>s result gets set. Returns
- // 1 if the specified observer was actually attached to the subject
- // prior to this call and 0 if was not.
- //
- // Returns 0 if the observer was successfully detached, and -1 if the
- // observer was not attached in the first place.
-
- operator T ();
- // Type conversion. will block forever until the result is
- // available. Note that this method is going away in a subsequent
- // release since it doesn't distinguish between failure results and
- // success results (exceptions should be used, but they aren't
- // portable...). The <get> method should be used instead since it
- // separates the error value from the result, and also permits
- // timeouts.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- // = Encapsulate reference count and object lifetime of instances.
-
- // These methods must go after the others to work around a bug with
- // Borland's C++ Builder...
-
- static ACE_Future_Rep<T> *create (void);
- // Create a ACE_Future_Rep<T> and initialize the reference count.
-
- static ACE_Future_Rep<T> *attach (ACE_Future_Rep<T> *&rep);
- // Increase the reference count and return argument. Uses the
- // attribute "value_ready_mutex_" to synchronize reference count
- // updating.
- //
- // Precondition (rep != 0).
-
- static void detach (ACE_Future_Rep<T> *&rep);
- // Decreases the reference count and and deletes rep if there are no
- // more references to rep.
- //
- // Precondition (rep != 0)
-
- static void assign (ACE_Future_Rep<T> *&rep,
- ACE_Future_Rep<T> *new_rep);
- // Decreases the rep's reference count and and deletes rep if there
- // are no more references to rep. Then assigns new_rep to rep.
- //
- // Precondition (rep != 0 && new_rep != 0)
-
- int ready (void);
- // Is result available?
-
- T *value_;
- // Pointer to the result.
-
- int ref_count_;
- // Reference count.
-
- typedef ACE_Future_Observer<T>
- OBSERVER;
-
- typedef ACE_Unbounded_Set<OBSERVER *>
- OBSERVER_COLLECTION;
-
- OBSERVER_COLLECTION observer_collection_;
- // Keep a list of ACE_Future_Observers unread by client's reader thread.
-
- // = Condition variable and mutex that protect the <value_>.
- ACE_Condition_Thread_Mutex value_ready_;
- ACE_Thread_Mutex value_ready_mutex_;
-
-private:
- // = Constructor and destructor private.
- ACE_Future_Rep (void);
- ~ACE_Future_Rep (void);
-};
-
-template <class T>
-class ACE_Future
-{
- // = TITLE
- // This class implements a ``single write, multiple read''
- // pattern that can be used to return results from asynchronous
- // method invocations.
-public:
- // = Initialization and termination methods.
- ACE_Future (void);
- // Constructor.
-
- ACE_Future (const ACE_Future<T> &r);
- // Copy constructor binds <this> and <r> to the same
- // <ACE_Future_Rep>. An <ACE_Future_Rep> is created if necessary.
-
- ACE_Future (const T &r);
- // Constructor that initialises an <ACE_Future> to point to the
- // result <r> immediately.
-
- ~ACE_Future (void);
- // Destructor.
-
- void operator = (const ACE_Future<T> &r);
- // Assignment operator that binds <this> and <r> to the same
- // <ACE_Future_Rep>. An <ACE_Future_Rep> is created if necessary.
-
- int cancel (const T &r);
- // Cancel an <ACE_Future> and assign the value <r>. It is used if a
- // client does not want to wait for <T> to be produced.
-
- int cancel (void);
- // Cancel an <ACE_Future>. Put the future into its initial
- // state. Returns 0 on succes and -1 on failure. It is now possible
- // to reuse the ACE_Future<T>. But remember, the ACE_Future<T>
- // is now bound to a new ACE_Future_Rep<T>.
-
- int operator == (const ACE_Future<T> &r) const;
- // Equality operator that returns 1 if both ACE_Future<T> objects
- // point to the same ACE_Future_Rep<T> object. Attention: It also
- // returns 1 if both objects have just been instantiated and not
- // used yet.
-
- int operator != (const ACE_Future<T> &r) const;
- // Inequality operator, which is the opposite of equality.
-
- int set (const T &r);
- // Make the result available. Is used by the server thread to give
- // the result to all waiting clients.
-
- int get (T &value,
- ACE_Time_Value *tv = 0);
- // Wait up to <tv> time to get the <value>. Note that <tv> must be
- // specified in absolute time rather than relative time.
-
- operator T ();
- // Type conversion, which obtains the result of the asynchronous
- // method invocation. Will block forever. Note that this method is
- // going away in a subsequent release since it doesn't distinguish
- // between failure results and success results (exceptions should be
- // used, but they aren't portable...). The <get> method should be
- // used instead since it separates the error value from the result,
- // and also permits timeouts.
-
- int ready (void);
- // Check if the result is available.
-
- int attach (ACE_Future_Observer<T> *observer);
- // Attaches the specified observer to a subject (i.e. the
- // <ACE_Future>). The update method of the specified subject will be
- // invoked with a copy of the associated <ACE_Future> as input when
- // the result gets set. If the result is already set when this
- // method gets invoked, then the update method of the specified
- // subject will be invoked immediately.
- //
- // Returns 0 if the observer is successfully attached, 1 if the
- // observer is already attached, and -1 if failures occur.
-
- int detach (ACE_Future_Observer<T> *observer);
- // Detaches the specified observer from a subject (i.e. the
- // <ACE_Future_Rep>). The update method of the specified subject will
- // not be invoked when the <ACE_Future_Reps> result gets set. Returns
- // 1 if the specified observer was actually attached to the subject
- // prior to this call and 0 if was not.
- //
- // Returns 0 if the observer was successfully detached, and -1 if the observer was
- // not attached in the first place.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_Future_Rep<T> *get_rep (void);
- // Get the underlying <ACE_Future_Rep>*. Note that this method should
- // rarely, if ever, be used and that modifying the undlerlying <ACE_Future_Rep>*
- // should be done with extreme caution.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- void *operator new (size_t nbytes);
- // Do not allow new operator.
-
- void operator delete (void *);
- // Do not allow delete operator
-
- void operator & ();
- // Do not allow address-of operator.
-
- // the ACE_Future_Rep
- typedef ACE_Future_Rep<T> FUTURE_REP;
- FUTURE_REP *future_rep_;
- // Protect operations on the <Future>.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Future.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Future.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* ACE_HAS_THREADS */
-#include "ace/post.h"
-#endif /* ACE_FUTURE_H */
diff --git a/ace/Future_Set.cpp b/ace/Future_Set.cpp
deleted file mode 100644
index 5b0069fac4f..00000000000
--- a/ace/Future_Set.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-// Future.cpp
-// $Id$
-
-#ifndef ACE_FUTURE_SET_CPP
-#define ACE_FUTURE_SET_CPP
-
-#include "ace/Future_Set.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID (ace, Future_Set, "$Id$")
-
-#if defined (ACE_HAS_THREADS)
-
-template <class T>
-ACE_Future_Set<T>::ACE_Future_Set (ACE_Message_Queue<ACE_SYNCH> *new_queue)
- : delete_queue_ (0)
-{
- if (new_queue)
- this->future_notification_queue_ = new_queue;
- else
- {
- ACE_NEW (this->future_notification_queue_,
- ACE_Message_Queue<ACE_SYNCH>);
- this->delete_queue_ = 1;
- }
-}
-
-template <class T>
-ACE_Future_Set<T>::~ACE_Future_Set (void)
-{
- // Detach ourselves from all remaining futures, if any, in our map.
- ACE_TYPENAME FUTURE_HASH_MAP::iterator iterator =
- this->future_map_.begin ();
-
- ACE_TYPENAME FUTURE_HASH_MAP::iterator end =
- this->future_map_.end ();
-
- for (;
- iterator != end;
- ++iterator)
- {
- FUTURE_HOLDER *future_holder = (*iterator).int_id_;
- future_holder->item_.detach (this);
- delete future_holder;
- }
-
- if (this->delete_queue_ != 0)
- delete this->future_notification_queue_;
-}
-
-template <class T> int
-ACE_Future_Set<T>::is_empty () const
-{
- return (((ACE_Future_Set<T>*)this)->future_map_.current_size () == 0 );
-}
-
-template <class T> int
-ACE_Future_Set<T>::insert (ACE_Future<T> &future)
-{
- FUTURE_HOLDER *future_holder;
- ACE_NEW_RETURN (future_holder,
- FUTURE_HOLDER (future),
- -1);
-
- FUTURE_REP *future_rep = future.get_rep ();
- int result = this->future_map_.bind (future_rep,
- future_holder);
-
- // If a new map entry was created, then attach to the future,
- // otherwise we were already attached to the future or some error
- // occurred so just delete the future holder.
- if ( result == 0 )
- // Attach ourself to the ACE_Futures list of observer
- future.attach (this);
- else
- delete future_holder;
-
- return result;
-}
-
-template <class T> void
-ACE_Future_Set<T>::update (const ACE_Future<T> &future)
-{
- ACE_Message_Block *mb;
- FUTURE &local_future = ACE_const_cast (ACE_Future<T> &, future);
-
- ACE_NEW (mb,
- ACE_Message_Block ((char *) local_future.get_rep (), 0));
-
- // Enqueue in priority order.
- this->future_notification_queue_->enqueue (mb, 0);
-}
-
-template <class T> int
-ACE_Future_Set<T>::next_readable (ACE_Future<T> &future,
- ACE_Time_Value *tv)
-{
- if (this->is_empty ())
- return 0;
-
- ACE_Message_Block *mb = 0;
- FUTURE_REP *future_rep = 0;
-
- // Wait for a "readable future" signal from the message queue.
- if (this->future_notification_queue_->dequeue_head (mb,
- tv) != -1)
- {
- // Extract future rep from the message block.
- future_rep =
- ACE_reinterpret_cast (FUTURE_REP *,
- mb->base ());
-
- // Delete the message block.
- mb->release ();
- }
- else
- return 0;
-
- // Remove the hash map entry with the specified future rep from our map.
- FUTURE_HOLDER *future_holder;
- if ( this->future_map_.find (future_rep,
- future_holder) != -1 )
- {
- future = future_holder->item_;
- this->future_map_.unbind (future_rep);
- delete future_holder;
- return 1;
- }
-
- return 0;
-}
-
-#endif /* ACE_HAS_THREADS */
-#endif /* ACE_FUTURE_SET_CPP */
diff --git a/ace/Future_Set.h b/ace/Future_Set.h
deleted file mode 100644
index eaecada4dc3..00000000000
--- a/ace/Future_Set.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Future_Set.h
-//
-// = AUTHOR (S)
-// John Tucker <jtucker@infoglide.com>
-//
-// ============================================================================
-
-#ifndef ACE_FUTURE_SET_H
-#define ACE_FUTURE_SET_H
-#include "ace/pre.h"
-
-#include "ace/Thread.h"
-#include "ace/Message_Queue.h"
-#include "ace/Future.h"
-#include "ace/Hash_Map_Manager.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_THREADS)
-
-template <class T>
-class ACE_Future_Set : public ACE_Future_Observer<T>
-{
- // = TITLE
- // This class implements a mechanism which allows the values of
- // a collections of <ACE_Future> objects to be accessed by
- // reader threads as they become available.
-public:
- // = Initialization and termination methods.
-
- ACE_Future_Set (ACE_Message_Queue<ACE_SYNCH> *future_notification_queue_ = 0);
- // Constructor.
-
- ~ACE_Future_Set (void);
- // Destructor.
-
- int is_empty (void) const;
- // Return 1 if their are no <ACE_Future> objects left on its queue and
- // 0 otherwise
-
- int insert (ACE_Future<T> &future);
- // Enqueus the given <ACE_Future> into this objects queue when it is
- // readable.
- //
- // Returns 0 if the future is successfully inserted, 1 if the
- // future is already inserted, and -1 if failures occur.
-
- int next_readable (ACE_Future<T> &result,
- ACE_Time_Value *tv = 0);
- // Wait up to <tv> time to get the <value>. Note that <tv> must be
- // specified in absolute time rather than relative time.); get the
- // next <ACE_Future> that is readable. If <tv> = 0, the will block
- // forever.
- //
- // If a readable future becomes available, then the input result
- // will be assigned with it and 1 will will be returned. If the set
- // is empty, then 0 is returned.
-
- virtual void update (const ACE_Future<T> &future);
- // Called by the <ACE_Future> subject in which we are subscribed to
- // when its value is written to.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Future_Set<T> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Future_Set (const ACE_Future_Set<T> &))
-
- typedef ACE_Future<T> FUTURE;
-
- typedef ACE_Future_Rep<T> FUTURE_REP;
-
- typedef ACE_Future_Holder<T> FUTURE_HOLDER;
-
- typedef ACE_Pointer_Hash<FUTURE_REP *> FUTURE_REP_HASH;
-
- typedef ACE_Equal_To<FUTURE_REP *> FUTURE_REP_COMPARE;
-
- typedef ACE_Hash_Map_Manager_Ex<FUTURE_REP *,
- FUTURE_HOLDER *,
- FUTURE_REP_HASH,
- FUTURE_REP_COMPARE,
- ACE_Null_Mutex> FUTURE_HASH_MAP;
-
- FUTURE_HASH_MAP future_map_;
- // Map of <ACE_Futures>, subjects, which have not been written to by
- // client's writer thread.
-
- ACE_Message_Queue<ACE_SYNCH> *future_notification_queue_;
- // Message queue for notifying the reader thread of <ACE_Futures> which
- // have been written to by client's writer thread.
-
- int delete_queue_;
- // Keeps track of whether we need to delete the message queue.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Future_Set.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Future_Set.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* ACE_HAS_THREADS */
-#include "ace/post.h"
-#endif /* ACE_FUTURE_SET_H */
diff --git a/ace/Get_Opt.cpp b/ace/Get_Opt.cpp
deleted file mode 100644
index b23c3ad2186..00000000000
--- a/ace/Get_Opt.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-// Get_Opt.cpp
-// $Id$
-
-#include "ace/Get_Opt.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Get_Opt.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Get_Opt, "$Id$")
-
-/*
- * Copyright (c) 1987, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Get_Opt)
-
-ACE_Get_Opt::ACE_Get_Opt (int argc,
- ACE_TCHAR **argv,
- const ACE_TCHAR *optstring,
- int skip,
- int report_errors)
- : optarg (0),
- optind (skip),
- opterr (report_errors),
- argc_ (argc),
- argv_ (argv),
- nextchar_ (0),
- optstring_ (optstring)
-{
- ACE_TRACE ("ACE_Get_Opt::ACE_Get_Opt");
-}
-
-void
-ACE_Get_Opt::dump (void) const
-{
- ACE_TRACE ("ACE_Get_Opt::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-int
-ACE_Get_Opt::operator () (void)
-{
- ACE_TRACE ("ACE_Get_Opt::operator");
-
- if (argv_ == 0)
- {
- // It can happen, e.g., on VxWorks.
- optind = 0;
- return EOF;
- }
-
- int opt; // Character checked for validity.
- const ACE_TCHAR *oli; // Option letter index.
-
- if (this->nextchar_ == 0 || *this->nextchar_ == '\0')
- {
- // Update scanning pointer.
-
- if (this->optind >= this->argc_
- || *(this->nextchar_ = this->argv_[this->optind]) != '-')
- {
- this->nextchar_ = ACE_const_cast (ACE_TCHAR *, ACE_TEXT (""));
- return EOF;
- }
-
- if (this->nextchar_[1] != 0
- && *++this->nextchar_ == '-')
- {
- // Found "--".
- ++this->optind;
- this->nextchar_ = ACE_const_cast (ACE_TCHAR *, ACE_TEXT (""));
- return EOF;
- }
- }
-
- // Option letter okay?
- opt = (int) *this->nextchar_++;
-
- if (opt == (int) ':'
- || ((oli = ACE_OS::strchr (this->optstring_, opt)) == 0))
- {
- // If the user didn't specify '-' as an option, assume it means
- // EOF.
- if (opt == (int) '-')
- return EOF;
-
- if (*this->nextchar_ == 0)
- ++this->optind;
-
- if (this->opterr && *this->optstring_ != ':')
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%s: illegal option -- %c\n"),
- this->argv_[0],
- opt));
- return '?';
- }
-
- if (*++oli != ':')
- { // Don't need argument.
- this->optarg = 0;
- if (!*this->nextchar_)
- ++this->optind;
- }
- else
- { // Need an argument.
- if (*this->nextchar_) // No white space.
- this->optarg = this->nextchar_;
- else if (this->argc_ <= ++this->optind)
- {
- // No arg.
- this->nextchar_ = ACE_const_cast (ACE_TCHAR *, ACE_TEXT (""));
-
- if (*this->optstring_ == ':')
- return ':';
- if (this->opterr)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%s: option requires an argument -- %c\n"),
- this->argv_[0], opt));
- return '?';
- }
- else // White space.
- this->optarg = this->argv_[this->optind];
-
- this->nextchar_ = ACE_const_cast (ACE_TCHAR *, ACE_TEXT (""));
- ++this->optind;
- }
-
- return opt; // Dump back option letter.
-}
diff --git a/ace/Get_Opt.h b/ace/Get_Opt.h
deleted file mode 100644
index e645328f0a9..00000000000
--- a/ace/Get_Opt.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Get_Opt.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_GET_OPT_H
-#define ACE_GET_OPT_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Get_Opt
-{
- // = TITLE
- // Iterator for parsing command-line arguments.
- //
- // = DESCRIPTION
- // This is a C++ wrapper for getopt(3c).
-public:
- ACE_Get_Opt (int argc,
- ACE_TCHAR **argv,
- const ACE_TCHAR *optstring,
- int skip_argv0 = 1,
- int report_errors = 0);
- // Initialize the internal data when the first call is made. Start
- // processing options with <argv>-element 0 + <skip_argv0>; the
- // sequence of previously skipped non-option <argv>-elements is
- // empty.
- //
- // <optstring> is a string containing the legitimate option
- // characters. A colon in <optstring> means that the previous
- // character is an option that wants an argument. The argument is
- // taken from the rest of the current <argv>-element, or from the
- // following <argv>-element, and returned in <optarg>.
- //
- // If an option character is seen that is not listed in <optstring>,
- // return '?' after printing an error message. If you set <opterr>
- // to zero, the error message is suppressed but we still return '?'.
- //
- // If a char in <optstring> is followed by a colon, that means it
- // wants an arg, so the following text in the same <argv>-element,
- // or the text of the following <argv>-element, is returned in
- // <optarg>.
-
- ~ACE_Get_Opt (void);
- // Default dtor.
-
- int operator () (void);
- // Scan elements of <argv> (whose length is <argc>) for option
- // characters given in <optstring>.
- //
- // If an element of <argv> starts with '-', and is not exactly "-"
- // or "--", then it is an option element. The characters of this
- // element (aside from the initial '-') are option characters. If
- // <operator()> is called repeatedly, it returns successively each
- // of the option characters from each of the option elements.
- //
- // If <operator()> finds another option character, it returns that
- // character, updating <optind> and <nextchar> so that the next call
- // to <operator()> can resume the scan with the following option
- // character or <argv>-element.
- //
- // If there are no more option characters, <operator()> returns
- // <EOF>. Then <optind> is the index in <argv> of the first
- // <argv>-element that is not an option. (The <argv>-elements have
- // been permuted so that those that are not options now come last.)
-
- // = Public data members (should be hidden...).
-
- ACE_TCHAR *optarg;
- // For communication from <operator()> to the caller. When
- // <operator()> finds an option that takes an argument, the argument
- // value is returned here.
-
- int optind;
- // Index in <argv> of the next element to be scanned. This is used
- // for communication to and from the caller and for communication
- // between successive calls to <operator()>. On entry to
- // <operator()>, zero means this is the first call; initialize.
- //
- // When <get_opt> returns <EOF>, this is the index of the first of
- // the non-option elements that the caller should itself scan.
- //
- // Otherwise, <optind> communicates from one call to the next how
- // much of <argv> has been scanned so far.
-
- int opterr;
- // Callers store zero here to inhibit the error message for
- // unrecognized options.
-
- int argc_;
- // Holds the <argc> count.
-
- ACE_TCHAR **argv_;
- // Holds the <argv> pointer.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
-
- ACE_TCHAR *nextchar_;
- // The next char to be scanned in the option-element in which the
- // last option character we returned was found. This allows us to
- // pick up the scan where we left off.
- //
- // If this is zero, or a null string, it means resume the scan
- // by advancing to the next <argv>-element.
-
- const ACE_TCHAR *optstring_;
- // Holds the option string.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Get_Opt.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_GET_OPT_H */
diff --git a/ace/Get_Opt.i b/ace/Get_Opt.i
deleted file mode 100644
index eceace918fa..00000000000
--- a/ace/Get_Opt.i
+++ /dev/null
@@ -1,9 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Get_Opt.i
-
-ACE_INLINE
-ACE_Get_Opt::~ACE_Get_Opt (void)
-{
-}
diff --git a/ace/Handle_Gobbler.h b/ace/Handle_Gobbler.h
deleted file mode 100644
index 6cf11614e76..00000000000
--- a/ace/Handle_Gobbler.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Handle_Gobbler.h
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_HANDLE_GOBBLER_H
-#define ACE_HANDLE_GOBBLER_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Containers_T.h"
-
-class ACE_Handle_Gobbler
-{
- // = TITLE
- // This class gobbles up handles.
- //
- // = DESCRIPTION
- // This is useful when we need to control the number of handles
- // available for a process. This class is mostly used for
- // testing purposes.
-public:
-
- inline ~ACE_Handle_Gobbler (void);
- // Destructor. Cleans up any remaining handles.
-
- inline int consume_handles (size_t n_handles_to_keep_available);
- // Handles are opened continously until the process runs out of
- // them, and then <n_handles_to_keep_available> handles are closed
- // (freed) thereby making them usable in the future.
-
- inline int free_handles (size_t n_handles);
- // Free up <n_handles>.
-
- inline void close_remaining_handles (void);
- // All remaining handles are closed.
-
-private:
-
- typedef ACE_Unbounded_Set<ACE_HANDLE> HANDLE_SET;
-
- HANDLE_SET handle_set_;
- // The container which holds the open descriptors.
-};
-
-#include "ace/Handle_Gobbler.i"
-
-#include "ace/post.h"
-#endif /* ACE_HANDLE_GOBBLER_H */
diff --git a/ace/Handle_Gobbler.i b/ace/Handle_Gobbler.i
deleted file mode 100644
index dcb107ef9e4..00000000000
--- a/ace/Handle_Gobbler.i
+++ /dev/null
@@ -1,81 +0,0 @@
-// $Id$
-
-inline void
-ACE_Handle_Gobbler::close_remaining_handles (void)
-{
- HANDLE_SET::iterator iterator =
- this->handle_set_.begin ();
-
- HANDLE_SET::iterator end =
- this->handle_set_.end ();
-
- for (;
- iterator != end;
- ++iterator)
- {
- ACE_OS::close (*iterator);
- }
-}
-
-inline
-ACE_Handle_Gobbler::~ACE_Handle_Gobbler (void)
-{
- this->close_remaining_handles ();
-}
-
-inline int
-ACE_Handle_Gobbler::free_handles (size_t n_handles)
-{
- HANDLE_SET::iterator iterator =
- this->handle_set_.begin ();
-
- HANDLE_SET::iterator end =
- this->handle_set_.end ();
-
- for (;
- iterator != end && n_handles > 0;
- ++iterator, --n_handles)
- {
- int result = ACE_OS::close (*iterator);
- if (result != 0)
- return result;
- }
-
- return 0;
-}
-
-inline int
-ACE_Handle_Gobbler::consume_handles (size_t n_handles_to_keep_available)
-{
- int result = 0;
-
- // On Win32, this style of gobbling doesn't seem to work.
-#if !defined (ACE_WIN32)
-
- while (1)
- {
- ACE_HANDLE handle = ACE_OS::open (ACE_DEV_NULL, O_WRONLY);
-
- if (handle == ACE_INVALID_HANDLE)
- {
- if (ACE::out_of_handles (errno))
- {
- result = this->free_handles (n_handles_to_keep_available);
- break;
- }
- else
- {
- result = -1;
- break;
- }
- }
-
- result = this->handle_set_.insert (handle);
- if (result == -1)
- break;
- }
-
-#endif /* ACE_WIN32 */
-
- return result;
-}
diff --git a/ace/Handle_Set.cpp b/ace/Handle_Set.cpp
deleted file mode 100644
index b7301bd7a7c..00000000000
--- a/ace/Handle_Set.cpp
+++ /dev/null
@@ -1,460 +0,0 @@
-// Handle_Set.cpp
-// $Id$
-
-#include "ace/Handle_Set.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Handle_Set.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Handle_Set, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Handle_Set)
-
-#if defined (linux) && __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1 && !defined (_XOPEN_SOURCE)
- // XPG4.2 requires the fds_bits member name, so it is not enabled by
- // default on Linux/glibc-2.1.x systems. Instead use "__fds_bits."
- // Ugly, but "what are you going to do?" 8-)
-#define fds_bits __fds_bits
-#endif /* linux && __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1 && !_GNU_SOURCE */
-
-void
-ACE_Handle_Set::dump (void) const
-{
- ACE_TRACE ("ACE_Handle_Set::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nsize_ = %d"), this->size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nmax_handle_ = %d"), this->max_handle_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n[ ")));
-
-#if defined (ACE_WIN32)
- for (size_t i = 0; i < (size_t) this->mask_.fd_count + 1; i++)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT(" %x "), this->mask_.fd_array[i]));
-#else /* !ACE_WIN32 */
- for (ACE_HANDLE i = 0; i < this->max_handle_ + 1; i++)
- if (this->is_set (i))
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT(" %d "), i));
-#endif /* ACE_WIN32 */
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT(" ]\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Table that maps bytes to counts of the enabled bits in each value
-// from 0 to 255,
-//
-// nbits_[0] == 0
-//
-// because there are no bits enabled for the value 0.
-//
-// nbits_[5] == 2
-//
-// because there are 2 bits enabled in the value 5, i.e., it's
-// 101 in binary.
-
-const char ACE_Handle_Set::nbits_[256] =
-{
- 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8,
-};
-
-// Constructor, initializes the bitmask to all 0s.
-
-ACE_Handle_Set::ACE_Handle_Set (void)
-{
- ACE_TRACE ("ACE_Handle_Set::ACE_Handle_Set");
- this->reset ();
-}
-
-ACE_Handle_Set::ACE_Handle_Set (const ACE_FD_SET_TYPE &fd_mask)
-{
- ACE_TRACE ("ACE_Handle_Set::ACE_Handle_Set");
- this->reset ();
- ACE_OS::memcpy ((void *) &this->mask_,
- (void *) &fd_mask,
- sizeof this->mask_);
-#if !defined (ACE_WIN32)
- this->sync (ACE_Handle_Set::MAXSIZE);
-#if defined (ACE_HAS_BIG_FD_SET)
- this->min_handle_ = 0;
-#endif /* ACE_HAS_BIG_FD_SET */
-#endif /* !ACE_WIN32 */
-}
-
-// Counts the number of bits enabled in N. Uses a table lookup to
-// speed up the count.
-
-int
-ACE_Handle_Set::count_bits (u_long n)
-{
-
- ACE_TRACE ("ACE_Handle_Set::count_bits");
-#if defined (ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT)
- register int rval = 0;
-
- // Count the number of enabled bits in <n>. This algorithm is very
- // fast, i.e., O(enabled bits in n).
-
- for (register u_long m = n;
- m != 0;
- m &= m - 1)
- rval++;
-
- return rval;
-#else
- return (ACE_Handle_Set::nbits_[n & 0xff]
- + ACE_Handle_Set::nbits_[(n >> 8) & 0xff]
- + ACE_Handle_Set::nbits_[(n >> 16) & 0xff]
- + ACE_Handle_Set::nbits_[(n >> 24) & 0xff]);
-#endif /* ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT */
-}
-
-#if defined (ACE_HAS_BIG_FD_SET)
-// Find the bit position counting from right to left worst case
-// (1<<31) is 8.
-
-int
-ACE_Handle_Set::bitpos (u_long bit)
-{
- register int l = 0;
- register u_long n = bit - 1;
-
- // This is a fast count method when have the most significative bit.
-
- while (n >> 8)
- {
- n >>= 8;
- l += 8;
- }
-
- // Is greater than 15?
- if (n & 16)
- {
- n >>= 4;
- l += 4;
- }
-
- // Count number remaining bits.
- while (n != 0)
- {
- n &= n - 1;
- l++;
- }
- return l;
-}
-#endif /* ACE_HAS_BIG_FD_SET */
-
-// Synchronize the underlying FD_SET with the MAX_FD and the SIZE.
-
-#if defined (ACE_USE_SHIFT_FOR_EFFICIENCY)
-// These don't work because shifting right 3 bits is not the same as
-// dividing by 3, e.g., dividing by 8 requires shifting right 3 bits.
-// In order to do the shift, we need to calculate the number of bits
-// at some point.
-#define ACE_DIV_BY_WORDSIZE(x) ((x) >> (ACE_Handle_Set::WORDSIZE))
-#define ACE_MULT_BY_WORDSIZE(x) ((x) << (ACE_Handle_Set::WORDSIZE))
-#else
-#define ACE_DIV_BY_WORDSIZE(x) ((x) / (ACE_Handle_Set::WORDSIZE))
-#define ACE_MULT_BY_WORDSIZE(x) ((x) * (ACE_Handle_Set::WORDSIZE))
-#endif /* ACE_USE_SHIFT_FOR_EFFICIENCY */
-
-void
-ACE_Handle_Set::sync (ACE_HANDLE max)
-{
- ACE_TRACE ("ACE_Handle_Set::sync");
-#if !defined (ACE_WIN32)
- fd_mask *maskp = (fd_mask *)(this->mask_.fds_bits);
- this->size_ = 0;
-
- for (int i = ACE_DIV_BY_WORDSIZE (max - 1);
- i >= 0;
- i--)
- this->size_ += ACE_Handle_Set::count_bits (maskp[i]);
-
- this->set_max (max);
-#else
- ACE_UNUSED_ARG (max);
-#endif /* !ACE_WIN32 */
-}
-
-// Resets the MAX_FD after a clear of the original MAX_FD.
-
-void
-ACE_Handle_Set::set_max (ACE_HANDLE current_max)
-{
- ACE_TRACE ("ACE_Handle_Set::set_max");
-#if !defined(ACE_WIN32)
- fd_mask * maskp = (fd_mask *)(this->mask_.fds_bits);
-
- if (this->size_ == 0)
- this->max_handle_ = ACE_INVALID_HANDLE;
- else
- {
- int i;
-
- for (i = ACE_DIV_BY_WORDSIZE(current_max - 1);
- maskp[i] == 0;
- i--)
- continue;
-
-#if 1 /* !defined(ACE_HAS_BIG_FD_SET) */
- this->max_handle_ = ACE_MULT_BY_WORDSIZE(i);
- for (fd_mask val = maskp[i];
- (val & ~1) != 0; // This obscure code is needed since "bit 0" is in location 1...
- val = (val >> 1) & ACE_MSB_MASK)
- this->max_handle_++;
-#else
- register u_long val = this->mask_.fds_bits[i];
- this->max_handle_ = ACE_MULT_BY_WORDSIZE(i)
- + ACE_Handle_Set::bitpos(val & ~(val - 1));
-#endif /* 1 */
- }
-
- // Do some sanity checking...
- if (this->max_handle_ >= ACE_Handle_Set::MAXSIZE)
- this->max_handle_ = ACE_Handle_Set::MAXSIZE - 1;
-#else
- ACE_UNUSED_ARG (current_max);
-#endif /* !ACE_WIN32 */
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Handle_Set_Iterator)
-
-void
-ACE_Handle_Set_Iterator::dump (void) const
-{
- ACE_TRACE ("ACE_Handle_Set_Iterator::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-#if defined(ACE_WIN32) || !defined(ACE_HAS_BIG_FD_SET)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nhandle_index_ = %d"), this->handle_index_));
-#elif defined(ACE_HAS_BIG_FD_SET)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nword_max_ = %d"), this->word_max_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nword_val_ = %d"), this->word_val_));
-#endif
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nword_num_ = %d"), this->word_num_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_HANDLE
-ACE_Handle_Set_Iterator::operator () (void)
-{
- ACE_TRACE ("ACE_Handle_Set_Iterator::operator");
-#if defined (ACE_WIN32)
- if (this->handle_index_ < this->handles_.mask_.fd_count)
- // Return the handle and advance the iterator.
- return (ACE_HANDLE) this->handles_.mask_.fd_array[this->handle_index_++];
- else
- return ACE_INVALID_HANDLE;
-
-#elif !defined (ACE_HAS_BIG_FD_SET) /* !ACE_WIN32 */
- // No sense searching further than the max_handle_ + 1;
- ACE_HANDLE maxhandlep1 = this->handles_.max_handle_ + 1;
-
- // HP-UX 11 plays some games with the fd_mask type - fd_mask is
- // defined as an int_32t, but the fds_bits is an array of longs.
- // This makes plainly indexing through the array by hand tricky,
- // since the FD_* macros treat the array as int32_t. So the bits
- // are in the right place for int32_t, even though the array is
- // long. This, they say, is to preserve the same in-memory layout
- // for 32-bit and 64-bit processes. So, we play the same game as
- // the FD_* macros to get the bits right. On all other systems,
- // this amounts to practically a NOP, since this is what would have
- // been done anyway, without all this type jazz.
- fd_mask * maskp = (fd_mask *)(this->handles_.mask_.fds_bits);
-
- if (this->handle_index_ >= maxhandlep1)
- // We've seen all the handles we're interested in seeing for this
- // iterator.
- return ACE_INVALID_HANDLE;
- else
- {
- ACE_HANDLE result = this->handle_index_;
-
- // Increment the iterator and advance to the next bit in this
- // word.
- this->handle_index_++;
- this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK;
-
- // If we've examined all the bits in this word, we'll go onto
- // the next word.
-
- if (this->word_val_ == 0)
- {
- // Start the handle_index_ at the beginning of the next word
- // and then loop until we've found the first non-zero bit or
- // we run past the <maxhandlep1> of the bitset.
-
- for (this->handle_index_ = ACE_MULT_BY_WORDSIZE(++this->word_num_);
- this->handle_index_ < maxhandlep1
- && maskp[this->word_num_] == 0;
- this->word_num_++)
- this->handle_index_ += ACE_Handle_Set::WORDSIZE;
-
- // If the bit index becomes >= the maxhandlep1 that means
- // there weren't any more bits set that we want to consider.
- // Therefore, we'll just store the maxhandlep1, which will
- // cause <operator()> to return <ACE_INVALID_HANDLE>
- // immediately next time it's called.
- if (this->handle_index_ >= maxhandlep1)
- {
- this->handle_index_ = maxhandlep1;
- return result;
- }
- else
- // Load the bits of the next word.
- this->word_val_ = maskp[this->word_num_];
- }
-
- // Loop until we get <word_val_> to have its least significant
- // bit enabled, keeping track of which <handle_index> this
- // represents (this information is used by subsequent calls to
- // <operator()>).
-
- for (;
- ACE_BIT_DISABLED (this->word_val_, 1);
- this->handle_index_++)
- this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK;
-
- return result;
- }
-#else /* !ACE_HAS_BIG_FD_SET */
- // Find the first word in fds_bits with bit on
- register u_long lsb = this->word_val_;
-
- if (lsb == 0)
- {
- do
- {
- // We have exceeded the word count in Handle_Set?
- if (++this->word_num_ >= this->word_max_)
- return ACE_INVALID_HANDLE;
-
- lsb = this->handles_.mask_.fds_bits[this->word_num_];
- }
- while (lsb == 0);
-
- // Set index to word boundary.
- this->handle_index_ = ACE_MULT_BY_WORDSIZE(this->word_num_);
-
- // Put new word_val.
- this->word_val_ = lsb;
-
- // Find the least significative bit.
- lsb &= ~(lsb - 1);
-
- // Remove least significative bit.
- this->word_val_ ^= lsb;
-
- // Save to calculate bit distance.
- this->oldlsb_ = lsb;
-
- // Move index to least significative bit.
- while (lsb >>= 1)
- this->handle_index_++;
- }
- else
- {
- // Find the least significative bit.
- lsb &= ~(lsb - 1);
-
- // Remove least significative bit.
- this->word_val_ ^= lsb;
-
- register u_long n = lsb - this->oldlsb_;
-
- // Move index to bit distance between new lsb and old lsb.
- do
- {
- this->handle_index_++;
- n &= n >> 1;
- }
- while (n != 0);
-
- this->oldlsb_ = lsb;
- }
-
- return this->handle_index_;
-#endif /* ACE_WIN32 */
-}
-
-void
-ACE_Handle_Set_Iterator::operator++ (void)
-{
- ACE_TRACE ("ACE_Handle_Set_Iterator::operator++");
-
- // This is now a no-op.
-}
-
-ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs)
- : handles_ (hs),
-#if !defined (ACE_HAS_BIG_FD_SET) || defined (ACE_WIN32)
- handle_index_ (0),
- word_num_ (-1)
-#elif defined (ACE_HAS_BIG_FD_SET)
- oldlsb_ (0),
- word_max_ (hs.max_handle_ == ACE_INVALID_HANDLE
- ? 0
- : ((ACE_DIV_BY_WORDSIZE (hs.max_handle_)) + 1))
-#endif /* ACE_HAS_BIG_FD_SET */
-{
- ACE_TRACE ("ACE_Handle_Set_Iterator::ACE_Handle_Set_Iterator");
-#if !defined (ACE_WIN32) && !defined (ACE_HAS_BIG_FD_SET)
- // No sense searching further than the max_handle_ + 1;
- ACE_HANDLE maxhandlep1 =
- this->handles_.max_handle_ + 1;
-
- fd_mask *maskp =
- (fd_mask *)(this->handles_.mask_.fds_bits);
-
- // Loop until we've found the first non-zero bit or we run past the
- // <maxhandlep1> of the bitset.
- while (this->handle_index_ < maxhandlep1
- && maskp[++this->word_num_] == 0)
- this->handle_index_ += ACE_Handle_Set::WORDSIZE;
-
- // If the bit index becomes >= the maxhandlep1 that means there
- // weren't any bits set. Therefore, we'll just store the
- // maxhandlep1, which will cause <operator()> to return
- // <ACE_INVALID_HANDLE> immediately.
- if (this->handle_index_ >= maxhandlep1)
- this->handle_index_ = maxhandlep1;
- else
- // Loop until we get <word_val_> to have its least significant bit
- // enabled, keeping track of which <handle_index> this represents
- // (this information is used by <operator()>).
- for (this->word_val_ = maskp[this->word_num_];
- ACE_BIT_DISABLED (this->word_val_, 1)
- && this->handle_index_ < maxhandlep1;
- this->handle_index_++)
- this->word_val_ = (this->word_val_ >> 1) & ACE_MSB_MASK;
-#elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET)
- if (this->word_max_==0)
- {
- this->word_num_ = -1;
- this->word_val_ = 0;
- }
- else
- {
- this->word_num_ =
- ACE_DIV_BY_WORDSIZE (this->handles_.min_handle_) - 1;
- this->word_val_ = 0;
- }
-#endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */
-}
diff --git a/ace/Handle_Set.h b/ace/Handle_Set.h
deleted file mode 100644
index aacb7609b05..00000000000
--- a/ace/Handle_Set.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Handle_Set.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_HANDLE_SET_H
-#define ACE_HANDLE_SET_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Handle_Set
-{
- // = TITLE
- // C++ wrapper facade for the socket <fd_set> abstraction.
- //
- // = DESCRIPTION
- // This abstraction is a very efficient wrapper facade over
- // <fd_set>. In particular, no range checking is performed, so
- // it's important not to set or clear bits that are outside the
- // <ACE_DEFAULT_SELECT_REACTOR_SIZE>.
-public:
- friend class ACE_Handle_Set_Iterator;
-
- // = Initialization and termination.
-
- enum
- {
- MAXSIZE = ACE_DEFAULT_SELECT_REACTOR_SIZE
- };
-
- // = Initialization methods.
- ACE_Handle_Set (void);
- // Constructor, initializes the bitmask to all 0s.
-
- ACE_Handle_Set (const ACE_FD_SET_TYPE &mask);
- // Constructor, initializes the handle set from a given mask.
- // <ACE_FD_SET_TYPE> is a <typedef> based on the platform's native
- // type used for masks passed to <select>.
-
-#if defined (ACE_HAS_WINCE)
- ~ACE_Handle_Set (void);
- // Default dtor.
-#endif /* ACE_HAS_WINCE */
-
- // = Methods for manipulating bitsets.
- void reset (void);
- // Initialize the bitmask to all 0s and reset the associated fields.
-
- int is_set (ACE_HANDLE handle) const;
- // Checks whether <handle> is enabled. No range checking is
- // performed so <handle> must be less than
- // <ACE_DEFAULT_SELECT_REACTOR_SIZE>.
-
- void set_bit (ACE_HANDLE handle);
- // Enables the <handle>. No range checking is performed so <handle>
- // must be less than <ACE_DEFAULT_SELECT_REACTOR_SIZE>.
-
- void clr_bit (ACE_HANDLE handle);
- // Disables the <handle>. No range checking is performed so
- // <handle> must be less than <ACE_DEFAULT_SELECT_REACTOR_SIZE>.
-
- int num_set (void) const;
- // Returns a count of the number of enabled bits.
-
- ACE_HANDLE max_set (void) const;
- // Returns the number of the large bit.
-
- void sync (ACE_HANDLE max);
- // Rescan the underlying <fd_set> up to handle <max> to find the new
- // <max_handle> (highest bit set) and <size> (how many bits set) values.
- // This is useful for evaluating the changes after the handle set has
- // been manipulated in some way other than member functions; for example,
- // after <select> modifies the <fd_set>.
-
- operator fd_set *();
- // Returns a pointer to the underlying <fd_set>. Returns 0 if
- // there are no handle bits set (<size_> == 0).
-
- fd_set *fdset (void);
- // Returns a pointer to the underlying <fd_set>. Returns 0 if
- // there are no handle bits set (<size_> == 0).
-
-#if defined (ACE_HAS_BIG_FD_SET)
- ACE_Handle_Set & operator= (const ACE_Handle_Set &);
- // Assignment operator optimizes for cases where <size_> == 0.
-#endif /* ACE_HAS_BIG_FD_SET */
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int size_;
- // Size of the set, i.e., a count of the number of enabled bits.
-
- ACE_HANDLE max_handle_;
- // Current max handle.
-
-#if defined (ACE_HAS_BIG_FD_SET)
- ACE_HANDLE min_handle_;
- // Current min handle.
-#endif /* ACE_HAS_BIG_FD_SET */
-
- fd_set mask_;
- // Bitmask.
-
- enum
- {
- WORDSIZE = NFDBITS,
-#if !defined (ACE_WIN32)
- NUM_WORDS = howmany (MAXSIZE, NFDBITS),
-#endif /* ACE_WIN32 */
- NBITS = 256
- };
-
- static int count_bits (u_long n);
- // Counts the number of bits enabled in N. Uses a table lookup to
- // speed up the count.
-
-#if defined (ACE_HAS_BIG_FD_SET)
- static int bitpos (u_long bit);
- // Find the position of the bit counting from right to left.
-#endif /* ACE_HAS_BIG_FD_SET */
-
- void set_max (ACE_HANDLE max);
- // Resets the <max_handle_> after a clear of the original
- // <max_handle_>.
-
- static const char nbits_[NBITS];
- // Table that maps bytes to counts of the enabled bits in each value
- // from 0 to 255.
-};
-
-class ACE_Export ACE_Handle_Set_Iterator
-{
- // = TITLE
- // Iterator for the <ACE_Handle_Set> abstraction.
-public:
- ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs);
- // Constructor.
-
- ~ACE_Handle_Set_Iterator (void);
- // Default dtor.
-
- ACE_HANDLE operator () (void);
- // "Next" operator. Returns the next unseen <ACE_HANDLE> in the
- // <Handle_Set> up to <handle_set_.max_handle_>). When all the
- // handles have been seen returns <ACE_INVALID_HANDLE>. Advances
- // the iterator automatically, so you need not call <operator++>
- // (which is now obsolete).
-
- void operator++ (void);
- // This is a no-op and no longer does anything. It's only here for
- // backwards compatibility.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const ACE_Handle_Set &handles_;
- // The <Handle_Set> we are iterating through.
-
-#if defined (ACE_WIN32)
- u_int handle_index_;
-#elif !defined (ACE_HAS_BIG_FD_SET)
- int handle_index_;
-#elif defined (ACE_HAS_BIG_FD_SET)
- int handle_index_;
- u_long oldlsb_;
-#endif /* ACE_WIN32 */
- // Index of the bit we're examining in the current <word_num_> word.
-
- int word_num_;
- // Number of the word we're iterating over (typically between 0..7).
-
-#if defined (ACE_HAS_BIG_FD_SET)
- int word_max_;
- // Number max of the words with a possible bit on.
-#endif /* ACE_HAS_BIG_FD_SET */
-
-#if !defined (ACE_WIN32) && !defined (ACE_HAS_BIG_FD_SET)
- fd_mask word_val_;
- // Value of the bits in the word we're iterating on.
-#elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET)
- u_long word_val_;
- // Value of the bits in the word we're iterating on.
-#endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Handle_Set.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_HANDLE_SET */
diff --git a/ace/Handle_Set.i b/ace/Handle_Set.i
deleted file mode 100644
index 676731ac0bc..00000000000
--- a/ace/Handle_Set.i
+++ /dev/null
@@ -1,174 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Handle_Set.i
-
-// Initialize the bitmask to all 0s and reset the associated fields.
-
-#if defined (ACE_HAS_WINCE)
-ACE_INLINE
-ACE_Handle_Set::~ACE_Handle_Set (void)
-{
- ACE_TRACE ("ACE_Handle_Set::~ACE_Handle_Set");
-}
-#endif /* ACE_HAS_WINCE */
-
-ACE_INLINE void
-ACE_Handle_Set::reset (void)
-{
- ACE_TRACE ("ACE_Handle_Set::reset");
- this->max_handle_ =
- ACE_INVALID_HANDLE;
-#if defined (ACE_HAS_BIG_FD_SET)
- this->min_handle_ =
- NUM_WORDS * WORDSIZE;
-#endif /* ACE_HAS_BIG_FD_SET */
- this->size_ = 0;
-#if !defined (ACE_HAS_BIG_FD_SET)
- FD_ZERO (&this->mask_);
-#endif /* ACE_HAS_BIG_FD_SET */
-}
-
-#if defined (ACE_HAS_BIG_FD_SET)
-ACE_INLINE ACE_Handle_Set &
-ACE_Handle_Set::operator= (const ACE_Handle_Set &rhs)
-{
- ACE_TRACE ("ACE_Handle_Set::reset");
-
- if (rhs.size_ > 0)
- {
- this->size_ =
- rhs.size_;
- this->max_handle_ =
- rhs.max_handle_;
- this->min_handle_ =
- rhs.min_handle_;
- this->mask_ =
- rhs.mask_;
- }
- else
- this->reset ();
-
- return *this;
-}
-#endif /* ACE_HAS_BIG_FD_SET */
-
-// Returns the number of the large bit.
-
-ACE_INLINE ACE_HANDLE
-ACE_Handle_Set::max_set (void) const
-{
- ACE_TRACE ("ACE_Handle_Set::max_set");
- return this->max_handle_;
-}
-
-// Checks whether handle is enabled.
-
-ACE_INLINE int
-ACE_Handle_Set::is_set (ACE_HANDLE handle) const
-{
- ACE_TRACE ("ACE_Handle_Set::is_set");
-#if defined (ACE_HAS_BIG_FD_SET)
- return FD_ISSET (handle,
- &this->mask_)
- && this->size_ > 0;
-#else
- return FD_ISSET (handle,
- &this->mask_);
-#endif /* ACE_HAS_BIG_FD_SET */
-}
-
-// Enables the handle.
-
-ACE_INLINE void
-ACE_Handle_Set::set_bit (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_Handle_Set::set_bit");
- if (!this->is_set (handle))
- {
-#if defined (ACE_WIN32)
- FD_SET ((SOCKET) handle,
- &this->mask_);
- this->size_++;
-#else /* ACE_WIN32 */
-#if defined (ACE_HAS_BIG_FD_SET)
- if (this->size_ == 0)
- FD_ZERO (&this->mask_);
-
- if (handle < this->min_handle_)
- this->min_handle_ = handle;
-#endif /* ACE_HAS_BIG_FD_SET */
-
- FD_SET (handle,
- &this->mask_);
- this->size_++;
-
- if (handle > this->max_handle_)
- this->max_handle_ = handle;
-#endif /* ACE_WIN32 */
- }
-}
-
-// Disables the handle.
-
-ACE_INLINE void
-ACE_Handle_Set::clr_bit (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_Handle_Set::clr_bit");
-
- if (this->is_set (handle))
- {
- FD_CLR ((ACE_SOCKET) handle,
- &this->mask_);
- this->size_--;
-
-#if !defined (ACE_WIN32)
- if (handle == this->max_handle_)
- this->set_max (this->max_handle_);
-#endif /* !ACE_WIN32 */
- }
-}
-
-// Returns a count of the number of enabled bits.
-
-ACE_INLINE int
-ACE_Handle_Set::num_set (void) const
-{
- ACE_TRACE ("ACE_Handle_Set::num_set");
-#if defined (ACE_WIN32)
- return this->mask_.fd_count;
-#else /* !ACE_WIN32 */
- return this->size_;
-#endif /* ACE_WIN32 */
-}
-
-// Returns a pointer to the underlying fd_set.
-
-ACE_INLINE
-ACE_Handle_Set::operator fd_set *()
-{
- ACE_TRACE ("ACE_Handle_Set::operator ACE_FD_SET_TYPE *");
-
- if (this->size_ > 0)
- return (fd_set *) &this->mask_;
- else
- return (fd_set *) NULL;
-}
-
-// Returns a pointer to the underlying fd_set.
-
-ACE_INLINE fd_set *
-ACE_Handle_Set::fdset (void)
-{
- ACE_TRACE ("ACE_Handle_Set::operator ACE_FD_SET_TYPE *");
-
- if (this->size_ > 0)
- return (fd_set *) &this->mask_;
- else
- return (fd_set *) NULL;
-}
-
-ACE_INLINE
-ACE_Handle_Set_Iterator::~ACE_Handle_Set_Iterator (void)
-{
-}
diff --git a/ace/Hash_Cache_Map_Manager_T.cpp b/ace/Hash_Cache_Map_Manager_T.cpp
deleted file mode 100644
index e632924334e..00000000000
--- a/ace/Hash_Cache_Map_Manager_T.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-// $Id$
-
-#ifndef ACE_HASH_CACHE_MAP_MANAGER_T_C
-#define ACE_HASH_CACHE_MAP_MANAGER_T_C
-
-#include "ace/Hash_Cache_Map_Manager_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Hash_Cache_Map_Manager_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Hash_Cache_Map_Manager_T, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Cache_Map_Manager)
-
-#define T_1 class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES
-#define T_2 KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES
-
-template <T_1>
-ACE_Hash_Cache_Map_Manager<T_2>::ACE_Hash_Cache_Map_Manager (CACHING_STRATEGY &caching_s,
- size_t size,
- ACE_Allocator *alloc)
- : ACE_HCMM_BASE (caching_s,
- size,
- alloc)
-{
-}
-
-template <T_1>
-ACE_Hash_Cache_Map_Manager<T_2>::~ACE_Hash_Cache_Map_Manager (void)
-{
-}
-
-template <T_1> int
-ACE_Hash_Cache_Map_Manager<T_2>:: bind (const KEY &key,
- const VALUE &value,
- ACE_Hash_Map_Entry<KEY, ACE_Pair<VALUE, ATTRIBUTES> > *&entry)
-{
- // Insert a entry which has the <key> and the <cache_value> which is
- // the combination of the <value> and the attributes of the caching
- // strategy.
- CACHE_VALUE cache_value (value,
- this->caching_strategy_.attributes ());
-
- int bind_result = this->map_.bind (key,
- cache_value,
- entry);
-
- if (bind_result != -1)
- {
-
- int result = this->caching_strategy_.notify_bind (bind_result,
- cache_value.second ());
-
- if (result == -1)
- {
-
- this->map_.unbind (key);
-
- // Unless the notification goes thru the bind operation is
- // not complete.
- bind_result = -1;
-
- }
- }
-
- return bind_result;
-}
-
-template <T_1> int
-ACE_Hash_Cache_Map_Manager<T_2>::rebind (const KEY &key,
- const VALUE &value,
- ACE_Hash_Map_Entry<KEY, ACE_Pair<VALUE, ATTRIBUTES> > *&entry)
-{
- CACHE_VALUE cache_value (value,
- this->caching_strategy_.attributes ());
-
- int rebind_result = this->map_.rebind (key,
- cache_value,
- entry);
-
- if (rebind_result != -1)
- {
-
- int result = this->caching_strategy_.notify_rebind (rebind_result,
- cache_value.second ());
-
- if (result == -1)
- {
-
- // Make sure the unbind operation is done only when the
- // notification fails after a bind which is denoted by
- // rebind_result = 0
- if (rebind_result == 0)
- this->map_.unbind (key);
-
- // Unless the notification goes thru the rebind operation is
- // not complete.
- rebind_result = -1;
-
- }
-
- }
-
- return rebind_result;
-}
-
-template <T_1> int
-ACE_Hash_Cache_Map_Manager<T_2>::trybind (const KEY &key,
- VALUE &value,
- ACE_Hash_Map_Entry<KEY, ACE_Pair<VALUE, ATTRIBUTES> > *&entry)
-{
- CACHE_VALUE cache_value (value,
- this->caching_strategy_.attributes ());
-
- int trybind_result = this->map_.trybind (key,
- cache_value,
- entry);
-
- if (trybind_result != -1)
- {
- int result = this->caching_strategy_.notify_trybind (trybind_result,
- cache_value.second ());
-
- if (result == -1)
- {
-
- // If the entry has got inserted into the map, it is removed
- // due to failure.
- if (trybind_result == 0)
- this->map_.unbind (key);
-
- trybind_result = -1;
-
- }
- else
- {
-
- // If an attempt is made to bind an existing entry the value
- // is overwritten with the value from the map.
- if (trybind_result == 1)
- value = cache_value.first ();
-
- }
-
- }
-
- return trybind_result;
-}
-
-template <T_1> int
-ACE_Hash_Cache_Map_Manager<T_2>::find (const KEY &key,
- ACE_Hash_Map_Entry<KEY, ACE_Pair<VALUE, ATTRIBUTES> > *&entry)
-{
- // Lookup the key and populate the <value>.
- int find_result = this->map_.find (key,
- entry);
-
- if (find_result != -1)
- {
-
- int result = this->caching_strategy_.notify_find (find_result,
- entry->int_id_.second ());
-
- // Unless the find and notification operations go thru, this
- // method is not successful.
- if (result == -1)
- find_result = -1;
- else
- find_result = 0;
-
- }
-
- return find_result;
-}
-
-template <T_1> int
-ACE_Hash_Cache_Map_Manager<T_2>::find (const KEY &key,
- VALUE &value)
-{
- CACHE_ENTRY *entry = 0;
-
- int result = this->find (key,
- entry);
-
- if (result != -1)
- {
- value = entry->int_id_.first ();
- }
-
- return result;
-}
-
-template <T_1> int
-ACE_Hash_Cache_Map_Manager<T_2>::find (const KEY &key)
-{
- CACHE_ENTRY *entry = 0;
-
- return this->find (key,
- entry);
-}
-
-template <T_1> int
-ACE_Hash_Cache_Map_Manager<T_2>::unbind (ACE_Hash_Map_Entry<KEY, ACE_Pair<VALUE, ATTRIBUTES> > *entry)
-{
- // Remove the entry from the cache.
- int unbind_result = this->map_.unbind (entry);
-
- if (unbind_result != -1)
- {
-
- int result = this->caching_strategy_.notify_unbind (unbind_result,
- entry->int_id_.second ());
-
- if (result == -1)
- unbind_result = -1;
-
- }
-
- return unbind_result;
-}
-
-#undef T_1
-#undef T_2
-
-#endif /* ACE_HASH_CACHE_MAP_MANAGER_T_C */
diff --git a/ace/Hash_Cache_Map_Manager_T.h b/ace/Hash_Cache_Map_Manager_T.h
deleted file mode 100644
index ca3ba4239d6..00000000000
--- a/ace/Hash_Cache_Map_Manager_T.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Hash_Cache_Map_Manager.h
-//
-// = AUTHOR
-// Kirthika Parameswaran <kirthika@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef HASH_CACHE_MAP_MANAGER_T_H
-#define HASH_CACHE_MAP_MANAGER_T_H
-#include "ace/pre.h"
-
-#include "ace/Hash_Map_Manager_T.h"
-#include "ace/Cache_Map_Manager_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Forward declaration.
-class ACE_Allocator;
-
-#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-#define ACE_CACHE_MAP_MANAGER \
- ACE_Cache_Map_Manager<KEY, \
- VALUE, \
- ACE_Hash_Map_Manager_Ex<KEY, ACE_Pair<VALUE, ATTRIBUTES>, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>, \
- ACE_Hash_Map_Iterator_Ex<KEY, ACE_Pair<VALUE, ATTRIBUTES>, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>, \
- ACE_Hash_Map_Reverse_Iterator_Ex<KEY, ACE_Pair<VALUE, ATTRIBUTES>, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>, \
- CACHING_STRATEGY, \
- ATTRIBUTES>
-#else
-#define ACE_CACHE_MAP_MANAGER \
- ACE_Cache_Map_Manager<KEY, \
- VALUE, \
- ACE_Hash_Map_Manager_Ex<KEY, ACE_Pair<VALUE, ATTRIBUTES>, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>, \
- CACHING_STRATEGY, \
- ATTRIBUTES>
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
-// For linkers that cant grok long names.
-#define ACE_Hash_Cache_Map_Manager AHCMM
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES>
-class ACE_Hash_Cache_Map_Manager : public ACE_CACHE_MAP_MANAGER
-{
- // = TITLE
- // Defines a abstraction which will purge entries from a map.
- // The map considered is the ACE_Hash_Map_Manager_Ex.
- //
- // = DESCRIPTION
- // The Hash_Cache_Map_Manager will manage the map it contains
- // and provide purging on demand from the map. The strategy for
- // caching is decided by the user and provided to the Cache
- // Manager. The Cache Manager acts as a agent and communicates
- // between the Map and the Strategy for purging entries from the
- // map. To tap the optimal methods like find(key,value,entry)
- // present in the ACE_Hash_Map_Manager,
- // Hash_Cache_Map_Manager provides extra functionality on top
- // of the Cache_Map_Manager.
- //
- // No locking mechanism provided since locking at this level
- // isnt efficient. Locking has to be provided by the
- // application.
- public:
-
- typedef ACE_Pair<VALUE, ATTRIBUTES> CACHE_VALUE;
- typedef ACE_Hash_Map_Manager_Ex<KEY, CACHE_VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> HASH_MAP;
- typedef ACE_Hash_Map_Entry<KEY, CACHE_VALUE> CACHE_ENTRY;
- typedef KEY key_type;
- typedef VALUE mapped_type;
- // The actual value mapped to the key in the map. The <attributes>
- // are used by the strategy and is transparent to the user of this
- // class.
-
- // = Initialization and termination methods.
- ACE_Hash_Cache_Map_Manager (CACHING_STRATEGY &caching_s,
- size_t size = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0);
- // Initialize a <Hash_Cache_Map_Manager> with <size> entries.
-
- ~ACE_Hash_Cache_Map_Manager (void);
- // Close down a <Cache_Map_Manager> and release dynamically allocated
- // resources.
-
- int bind (const KEY &key,
- const VALUE &value);
- // Associate <key> with <value>. If <key> is already in the
- // MAP then the ENTRY is not changed. Returns 0 if a new entry is
- // bound successfully, returns 1 if an attempt is made to bind an
- // existing entry, and returns -1 if failures occur.
-
- int bind (const KEY &key,
- const VALUE &value,
- CACHE_ENTRY *&entry);
- // Same as a normal bind, except the cache entry is also passed back
- // to the caller. The entry in this case will either be the newly
- // created entry, or the existing one.
-
- int find (const KEY &key,
- VALUE &value);
- // Loopkup entry<key,value> in the cache.
-
- int find (const KEY &key);
- // Is <key> in the cache?
-
- int find (const KEY &key,
- CACHE_ENTRY *&entry);
- // Obtain the entry when the find succeeds.
-
- int rebind (const KEY &key,
- const VALUE &value);
- // Reassociate the <key> with <value>. If the <key> already exists
- // in the cache then returns 1, on a new bind returns 0 and returns
- // -1 in case of any failures.
-
- int rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old value into the
- // "out" parameter <old_value>. The function fails if <key> is not
- // in the cache for caches that do not allow user specified keys.
- // However, for caches that allow user specified keys, if the key is
- // not in the cache, a new <key>/<value> association is created.
-
- int rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old key and value
- // into the "out" parameters <old_key> and <old_value>. The
- // function fails if <key> is not in the cache for caches that do not
- // allow user specified keys. However, for caches that allow user
- // specified keys, if the key is not in the cache, a new <key>/<value>
- // association is created.
-
- int rebind (const KEY &key,
- const VALUE &value,
- CACHE_ENTRY *&entry);
- // Same as a normal rebind, except the cache entry is also passed back
- // to the caller. The entry in this case will either be the newly
- // created entry, or the existing one.
-
- int trybind (const KEY &key,
- VALUE &value);
- // Associate <key> with <value> if and only if <key> is not in the
- // cache. If <key> is already in the cache, then the <value> parameter
- // is overwritten with the existing value in the cache. Returns 0 if a
- // new <key>/<value> association is created. Returns 1 if an
- // attempt is made to bind an existing entry. This function fails
- // for maps that do not allow user specified keys.
-
- int trybind (const KEY &key,
- VALUE &value,
- CACHE_ENTRY *&entry);
- // Same as a normal trybind, except the cache entry is also passed
- // back to the caller. The entry in this case will either be the
- // newly created entry, or the existing one.
-
- int unbind (const KEY &key);
- // Remove <key> from the cache.
-
- int unbind (const KEY &key,
- VALUE &value);
- // Remove <key> from the cache, and return the <value> associated with
- // <key>.
-
- int unbind (CACHE_ENTRY *entry);
- // Remove entry from map.
-
-protected:
-
- typedef ACE_CACHE_MAP_MANAGER ACE_HCMM_BASE;
- // Base class.
-};
-
-
-#if defined (__ACE_INLINE__)
-#include "ace/Hash_Cache_Map_Manager_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Hash_Cache_Map_Manager_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Hash_Cache_Map_Manager_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* HASH_CACHE_MAP_MANAGER_T_H */
diff --git a/ace/Hash_Cache_Map_Manager_T.i b/ace/Hash_Cache_Map_Manager_T.i
deleted file mode 100644
index f73e2d2aa7d..00000000000
--- a/ace/Hash_Cache_Map_Manager_T.i
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#define T_1 class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES
-#define T_2 KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES
-
-template <T_1> ACE_INLINE int
-ACE_Hash_Cache_Map_Manager<T_2>::bind (const KEY &key,
- const VALUE &value)
-{
- return ACE_HCMM_BASE::bind (key,
- value);
-}
-
-template <T_1> ACE_INLINE int
-ACE_Hash_Cache_Map_Manager<T_2>::rebind (const KEY &key,
- const VALUE &value)
-{
- return ACE_HCMM_BASE::rebind (key,
- value);
-}
-
-template <T_1> ACE_INLINE int
-ACE_Hash_Cache_Map_Manager<T_2>::rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value)
-{
- return ACE_HCMM_BASE::rebind (key,
- value,
- old_value);
-}
-
-template <T_1> ACE_INLINE int
-ACE_Hash_Cache_Map_Manager<T_2>::rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value)
-{
- return ACE_HCMM_BASE::rebind (key,
- value,
- old_key,
- old_value);
-}
-
-template <T_1> ACE_INLINE int
-ACE_Hash_Cache_Map_Manager<T_2>::trybind (const KEY &key,
- VALUE &value)
-{
- return ACE_HCMM_BASE::trybind (key,
- value);
-}
-
-template <T_1> ACE_INLINE int
-ACE_Hash_Cache_Map_Manager<T_2>::unbind (const KEY &key)
-{
- return ACE_HCMM_BASE::unbind (key);
-}
-
-template <T_1> ACE_INLINE int
-ACE_Hash_Cache_Map_Manager<T_2>::unbind (const KEY &key,
- VALUE &value)
-{
- return ACE_HCMM_BASE::unbind (key,
- value);
-}
-
-#undef T_1
-#undef T_2
diff --git a/ace/Hash_Map_Manager.cpp b/ace/Hash_Map_Manager.cpp
deleted file mode 100644
index 4378551c7f8..00000000000
--- a/ace/Hash_Map_Manager.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Hash_Map_Manager.cpp
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "ace/Hash_Map_Manager.h"
-
-ACE_RCSID(ace, Hash_Map_Manager, "$Id$")
-
diff --git a/ace/Hash_Map_Manager.h b/ace/Hash_Map_Manager.h
deleted file mode 100644
index 2d674f647d8..00000000000
--- a/ace/Hash_Map_Manager.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Hash_Map_Manager.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_HASH_MAP_MANAGER_H
-#define ACE_HASH_MAP_MANAGER_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-#include "ace/Functor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Include the templates here.
-#include "ace/Hash_Map_Manager_T.h"
-
-#include "ace/post.h"
-#endif /* ACE_HASH_MAP_MANAGER_H */
diff --git a/ace/Hash_Map_Manager_T.cpp b/ace/Hash_Map_Manager_T.cpp
deleted file mode 100644
index ec88ca9c3d3..00000000000
--- a/ace/Hash_Map_Manager_T.cpp
+++ /dev/null
@@ -1,446 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Hash_Map_Manager_T.cpp
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_HASH_MAP_MANAGER_T_CPP
-#define ACE_HASH_MAP_MANAGER_T_CPP
-
-#include "ace/Hash_Map_Manager_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-# include "ace/Hash_Map_Manager_T.i"
-#elif defined (__SUNPRO_CC)
-// If ACE_INLINE is on and we are on SunCC, undefine ACE_INLINE,
-// include ace/Hash_Map_Manager_T.i, and then redefine ACE_INLINE.
-// This nonsense is necessary since SunCC (version 4.2) cannot inline
-// the code in ace/Hash_Map_Manager_T.i (with the fast option).
-# undef ACE_INLINE
-# define ACE_INLINE
-# include "ace/Hash_Map_Manager_T.i"
-# undef ACE_INLINE
-# define ACE_INLINE inline
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Synch.h"
-#include "ace/Service_Config.h"
-#include "ace/Malloc.h"
-
-ACE_RCSID(ace, Hash_Map_Manager_T, "$Id$")
-
-template <class EXT_ID, class INT_ID>
-ACE_Hash_Map_Entry<EXT_ID, INT_ID>::ACE_Hash_Map_Entry (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *prev)
- : next_ (next),
- prev_ (prev)
-{
-}
-
-template <class EXT_ID, class INT_ID>
-ACE_Hash_Map_Entry<EXT_ID, INT_ID>::ACE_Hash_Map_Entry (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *prev)
- : ext_id_ (ext_id),
- int_id_ (int_id),
- next_ (next),
- prev_ (prev)
-{
-}
-
-# if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
-template <class EXT_ID, class INT_ID>
-ACE_Hash_Map_Entry<EXT_ID, INT_ID>::~ACE_Hash_Map_Entry (void)
-{
-}
-# endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
-
-template <class EXT_ID, class INT_ID> void
-ACE_Hash_Map_Entry<EXT_ID, INT_ID>::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %d"), this->next_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("prev_ = %d"), this->prev_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> void
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("total_size_ = %d"), this->total_size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d"), this->cur_size_));
- this->allocator_->dump ();
- this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::create_buckets (size_t size)
-{
- size_t bytes = size * sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>);
- void *ptr;
-
- ACE_ALLOCATOR_RETURN (ptr,
- this->allocator_->malloc (bytes),
- -1);
-
- this->table_ = (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *) ptr;
-
- this->total_size_ = size;
-
- // Initialize each entry in the hash table to be a circular linked
- // list with the dummy node in the front serving as the anchor of
- // the list.
- for (size_t i = 0; i < size; i++)
- new (&this->table_[i]) ACE_Hash_Map_Entry<EXT_ID, INT_ID> (&this->table_[i],
- &this->table_[i]);
- return 0;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::open (size_t size,
- ACE_Allocator *alloc)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- // Calling this->close_i () to ensure we release previous allocated
- // memory before allocating new one.
- this->close_i ();
-
- if (alloc == 0)
- alloc = ACE_Allocator::instance ();
-
- this->allocator_ = alloc;
-
- // This assertion is here to help track a situation that shouldn't
- // happen, but did with Sun C++ 4.1 (before a change to this class
- // was made: it used to have an enum that was supposed to be defined
- // to be ACE_DEFAULT_MAP_SIZE, but instead was defined to be 0).
- ACE_ASSERT (size != 0);
-
- return this->create_buckets (size);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::close_i (void)
-{
- // Protect against "double-deletion" in case the destructor also
- // gets called.
- if (this->table_ != 0)
- {
- // Remove all the entries.
- this->unbind_all_i ();
-
- // Iterate through the buckets cleaning up the sentinels.
- for (size_t i = 0; i < this->total_size_; i++)
- {
- // Destroy the dummy entry.
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry = &this->table_[i];
- // The "if" second argument results in a no-op instead of
- // deallocation.
- ACE_DES_FREE_TEMPLATE2 (entry, ACE_NOOP,
- ACE_Hash_Map_Entry, EXT_ID, INT_ID);
- }
-
- // Reset size.
- this->total_size_ = 0;
-
- // Free table memory.
- this->allocator_->free (this->table_);
-
- // Should be done last...
- this->table_ = 0;
- }
-
- return 0;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind_all_i (void)
-{
- // Iterate through the entire map calling the destuctor of each
- // <ACE_Hash_Map_Entry>.
- for (size_t i = 0; i < this->total_size_; i++)
- {
- for (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *temp_ptr = this->table_[i].next_;
- temp_ptr != &this->table_[i];
- )
- {
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *hold_ptr = temp_ptr;
- temp_ptr = temp_ptr->next_;
-
- // Explicitly call the destructor.
- ACE_DES_FREE_TEMPLATE2 (hold_ptr, this->allocator_->free,
- ACE_Hash_Map_Entry, EXT_ID, INT_ID);
- }
-
- // Restore the sentinel.
- this->table_[i].next_ = &this->table_[i];
- this->table_[i].prev_ = &this->table_[i];
- }
-
- this->cur_size_ = 0;
-
- return 0;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::bind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- u_long loc;
- int result = this->shared_find (ext_id, entry, loc);
-
- if (result == -1)
- {
- void *ptr;
- // Not found.
- ACE_ALLOCATOR_RETURN (ptr,
- this->allocator_->malloc (sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>)),
- -1);
-
- entry = new (ptr) ACE_Hash_Map_Entry<EXT_ID, INT_ID> (ext_id,
- int_id,
- this->table_[loc].next_,
- &this->table_[loc]);
- this->table_[loc].next_ = entry;
- entry->next_->prev_ = entry;
- this->cur_size_++;
- return 0;
- }
- else
- return 1;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::trybind_i (const EXT_ID &ext_id,
- INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- u_long loc;
- int result = this->shared_find (ext_id, entry, loc);
-
- if (result == -1)
- {
- // Not found.
- void *ptr;
- ACE_ALLOCATOR_RETURN (ptr,
- this->allocator_->malloc (sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>)),
- -1);
-
- entry = new (ptr) ACE_Hash_Map_Entry<EXT_ID, INT_ID> (ext_id,
- int_id,
- this->table_[loc].next_,
- &this->table_[loc]);
- this->table_[loc].next_ = entry;
- entry->next_->prev_ = entry;
- this->cur_size_++;
- return 0;
- }
- else
- return 1;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind_i (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *temp;
-
- u_long loc;
- int result = this->shared_find (ext_id, temp, loc);
-
- if (result == -1)
- {
- errno = ENOENT;
- return -1;
- }
-
- int_id = temp->int_id_;
-
- return this->unbind_i (temp);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind_i (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry)
-{
- entry->next_->prev_ = entry->prev_;
- entry->prev_->next_ = entry->next_;
-
- // Explicitly call the destructor.
- ACE_DES_FREE_TEMPLATE2 (entry, this->allocator_->free,
- ACE_Hash_Map_Entry, EXT_ID, INT_ID);
- this->cur_size_--;
- return 0;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::shared_find (const EXT_ID &ext_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry,
- u_long &loc)
-{
- loc = this->hash (ext_id) % this->total_size_;
-
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *temp = this->table_[loc].next_;
-
- while (temp != &this->table_[loc] && this->equal (temp->ext_id_, ext_id) == 0)
- temp = temp->next_;
-
- if (temp == &this->table_[loc])
- {
- errno = ENOENT;
- return -1;
- }
- else
- {
- entry = temp;
- return 0;
- }
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- u_long dummy;
- if (this->shared_find (ext_id, entry, dummy) == -1)
- return this->bind_i (ext_id, int_id);
- else
- {
- entry->ext_id_ = ext_id;
- entry->int_id_ = int_id;
- return 1;
- }
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- u_long dummy;
- if (this->shared_find (ext_id, entry, dummy) == -1)
- return this->bind_i (ext_id, int_id);
- else
- {
- old_int_id = entry->int_id_;
- entry->ext_id_ = ext_id;
- entry->int_id_ = int_id;
- return 1;
- }
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- u_long dummy;
- if (this->shared_find (ext_id, entry, dummy) == -1)
- return this->bind_i (ext_id, int_id);
- else
- {
- old_ext_id = entry->ext_id_;
- old_int_id = entry->int_id_;
- entry->ext_id_ = ext_id;
- entry->int_id_ = int_id;
- return 1;
- }
-}
-
-// ------------------------------------------------------------
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Iterator_Base_Ex)
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> void
-ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump_i (void) const
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i");
-
- if (this->map_man_->table_ == 0)
- return -1;
- // Handle initial case specially.
- else if (this->index_ == -1)
- {
- this->index_++;
- return this->forward_i ();
- }
- else if (this->index_ >= ACE_static_cast (ssize_t, this->map_man_->total_size_))
- return 0;
-
- this->next_ = this->next_->next_;
- if (this->next_ == &this->map_man_->table_[this->index_])
- {
- while (++this->index_ < ACE_static_cast (ssize_t,
- this->map_man_->total_size_))
- {
- this->next_ = this->map_man_->table_[this->index_].next_;
- if (this->next_ != &this->map_man_->table_[this->index_])
- break;
- }
- }
-
- return this->index_ < ACE_static_cast (ssize_t, this->map_man_->total_size_);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i");
-
- if (this->map_man_->table_ == 0)
- return -1;
- else if (this->index_ == ACE_static_cast (ssize_t, this->map_man_->total_size_))
- {
- this->index_--;
- return this->reverse_i ();
- }
- else if (this->index_ < 0)
- return 0;
-
- this->next_ = this->next_->prev_;
- if (this->next_ == &this->map_man_->table_[this->index_])
- {
- while (--this->index_ >= 0)
- {
- this->next_ = this->map_man_->table_[this->index_].prev_;
- if (this->next_ != &this->map_man_->table_[this->index_])
- break;
- }
- }
-
- return this->index_ >= 0;
-}
-
-#endif /* ACE_HASH_MAP_MANAGER_T_CPP */
diff --git a/ace/Hash_Map_Manager_T.h b/ace/Hash_Map_Manager_T.h
deleted file mode 100644
index 41f27e68c29..00000000000
--- a/ace/Hash_Map_Manager_T.h
+++ /dev/null
@@ -1,721 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Hash_Map_Manager_T.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_HASH_MAP_MANAGER_T_H
-#define ACE_HASH_MAP_MANAGER_T_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-#include "ace/Functor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class EXT_ID, class INT_ID>
-class ACE_Hash_Map_Entry
-{
- // = TITLE
- // Define an entry in the hash table.
-public:
- // = Initialization and termination methods.
- ACE_Hash_Map_Entry (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next = 0,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *prev = 0);
- // Constructor.
-
- ACE_Hash_Map_Entry (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *prev);
- // Constructor.
-
-# if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
- ~ACE_Hash_Map_Entry (void);
- // Destructor.
-#endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
-
- EXT_ID ext_id_;
- // Key used to look up an entry.
-
- INT_ID int_id_;
- // The contents of the entry itself.
-
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next_;
- // Pointer to the next item in the bucket of overflow nodes.
-
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *prev_;
- // Pointer to the prev item in the bucket of overflow nodes.
-
- void dump (void) const;
- // Dump the state of an object.
-};
-
-// Forward decl.
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_Hash_Map_Iterator_Base_Ex;
-
-// Forward decl.
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_Hash_Map_Iterator_Ex;
-
-// Forward decl.
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_Hash_Map_Reverse_Iterator_Ex;
-
-// Forward decl.
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_Hash_Map_Bucket_Iterator;
-
-// Forward decl.
-class ACE_Allocator;
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_Hash_Map_Manager_Ex
-{
- // = TITLE
- // Define a map abstraction that efficiently associates
- // <EXT_ID>s with <INT_ID>s.
- //
- // = DESCRIPTION
- //
- // This implementation of a map uses a hash table. Key hashing
- // is achieved through the HASH_KEY object and key comparison is
- // achieved through the COMPARE_KEYS object.
- //
- // This class uses an <ACE_Allocator> to allocate memory. The
- // user can make this a persistent class by providing an
- // <ACE_Allocator> with a persistable memory pool.
-public:
- friend class ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>;
- friend class ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>;
- friend class ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>;
- friend class ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>;
-
- typedef EXT_ID
- KEY;
- typedef INT_ID
- VALUE;
- typedef ACE_Hash_Map_Entry<EXT_ID, INT_ID>
- ENTRY;
-
- // = ACE-style iterator typedefs.
- typedef ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
- ITERATOR;
- typedef ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
- REVERSE_ITERATOR;
-
- // = STL-style iterator typedefs.
- typedef ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
- iterator;
- typedef ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
- reverse_iterator;
-
- // = Initialization and termination methods.
-
- ACE_Hash_Map_Manager_Ex (ACE_Allocator *alloc = 0);
- // Initialize a <Hash_Map_Manager_Ex> with default size.
-
- ACE_Hash_Map_Manager_Ex (size_t size,
- ACE_Allocator *alloc = 0);
- // Initialize a <Hash_Map_Manager_Ex> with size <length>.
-
- int open (size_t size = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0);
- // Initialize a <Hash_Map_Manager_Ex> with <size> elements.
-
- int close (void);
- // Close down a <Hash_Map_Manager_Ex> and release dynamically allocated
- // resources.
-
- int unbind_all (void);
- // Removes all the entries in <Map_Manager_Ex>.
-
- ~ACE_Hash_Map_Manager_Ex (void);
- // Initialize a <Hash_Map_Manager_Ex> with size <length>.
-
- int bind (const EXT_ID &item,
- const INT_ID &int_id);
- // Associate <ext_id> with <int_id>. If <ext_id> is already in the
- // map then the <ACE_Hash_Map_Entry> is not changed. Returns 0 if a
- // new entry is bound successfully, returns 1 if an attempt is made
- // to bind an existing entry, and returns -1 if failures occur.
-
- int bind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Same as a normal bind, except the map entry is also passed back
- // to the caller. The entry in this case will either be the newly
- // created entry, or the existing one.
-
- int trybind (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Associate <ext_id> with <int_id> if and only if <ext_id> is not
- // in the map. If <ext_id> is already in the map then the <int_id>
- // parameter is assigned the existing value in the map. Returns 0
- // if a new entry is bound successfully, returns 1 if an attempt is
- // made to bind an existing entry, and returns -1 if failures occur.
-
- int trybind (const EXT_ID &ext_id,
- INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Same as a normal trybind, except the map entry is also passed
- // back to the caller. The entry in this case will either be the
- // newly created entry, or the existing one.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id);
- // Reassociate <ext_id> with <int_id>. If <ext_id> is not in the
- // map then behaves just like <bind>. Returns 0 if a new entry is
- // bound successfully, returns 1 if an existing entry was rebound,
- // and returns -1 if failures occur.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Same as a normal rebind, except the map entry is also passed back
- // to the caller. The entry in this case will either be the newly
- // created entry, or the existing one.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id);
- // Associate <ext_id> with <int_id>. If <ext_id> is not in the map
- // then behaves just like <bind>. Otherwise, store the old value of
- // <int_id> into the "out" parameter and rebind the new parameters.
- // Returns 0 if a new entry is bound successfully, returns 1 if an
- // existing entry was rebound, and returns -1 if failures occur.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Same as a normal rebind, except the map entry is also passed back
- // to the caller. The entry in this case will either be the newly
- // created entry, or the existing one.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id);
- // Associate <ext_id> with <int_id>. If <ext_id> is not in the map
- // then behaves just like <bind>. Otherwise, store the old values
- // of <ext_id> and <int_id> into the "out" parameters and rebind the
- // new parameters. This is very useful if you need to have an
- // atomic way of updating <ACE_Hash_Map_Entrys> and you also need
- // full control over memory allocation. Returns 0 if a new entry is
- // bound successfully, returns 1 if an existing entry was rebound,
- // and returns -1 if failures occur.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Same as a normal rebind, except the map entry is also passed back
- // to the caller. The entry in this case will either be the newly
- // created entry, or the existing one.
-
- int find (const EXT_ID &ext_id,
- INT_ID &int_id) const;
- // Locate <ext_id> and pass out parameter via <int_id>. If found,
- // return 0, returns -1 if not found.
-
- int find (const EXT_ID &ext_id) const;
- // Returns 0 if the <ext_id> is in the mapping, otherwise -1.
-
- int find (const EXT_ID &ext_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry) const;
- // Locate <ext_id> and pass out parameter via <entry>. If found,
- // return 0, returns -1 if not found.
-
- int unbind (const EXT_ID &ext_id);
- // Unbind (remove) the <ext_id> from the map. Don't return the
- // <int_id> to the caller (this is useful for collections where the
- // <int_id>s are *not* dynamically allocated...)
-
- int unbind (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Break any association of <ext_id>. Returns the value of <int_id>
- // in case the caller needs to deallocate memory.
-
- int unbind (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry);
- // Remove entry from map.
-
- size_t current_size (void) const;
- // Return the current size of the map.
-
- size_t total_size (void) const;
- // Return the total size of the map.
-
- ACE_LOCK &mutex (void);
- // Returns a reference to the underlying <ACE_LOCK>. This makes it
- // possible to acquire the lock explicitly, which can be useful in
- // some cases if you instantiate the <ACE_Atomic_Op> with an
- // <ACE_Recursive_Mutex> or <ACE_Process_Mutex>, or if you need to
- // guard the state of an iterator. NOTE: the right name would be
- // <lock>, but HP/C++ will choke on that!
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL styled iterator factory functions.
-
- ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> begin (void);
- ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> end (void);
- // Return forward iterator.
-
- ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> rbegin (void);
- ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> rend (void);
- // Return reverse iterator.
-
-protected:
- // = The following methods do the actual work.
-
- int equal (const EXT_ID &id1, const EXT_ID &id2);
- // Returns 1 if <id1> == <id2>, else 0. This is defined as a
- // separate method to facilitate template specialization.
-
- u_long hash (const EXT_ID &ext_id);
- // Compute the hash value of the <ext_id>. This is defined as a
- // separate method to facilitate template specialization.
-
- // = These methods assume locks are held by private methods.
-
- int bind_i (const EXT_ID &ext_id,
- const INT_ID &int_id);
- // Performs bind. Must be called with locks held.
-
- int bind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Performs bind. Must be called with locks held.
-
- int trybind_i (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Performs trybind. Must be called with locks held.
-
- int trybind_i (const EXT_ID &ext_id,
- INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Performs trybind. Must be called with locks held.
-
- int rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id);
- // Performs rebind. Must be called with locks held.
-
- int rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Performs rebind. Must be called with locks held.
-
- int rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id);
- // Performs rebind. Must be called with locks held.
-
- int rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Performs rebind. Must be called with locks held.
-
- int rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id);
- // Performs rebind. Must be called with locks held.
-
- int rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Performs rebind. Must be called with locks held.
-
- int find_i (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Performs a find of <int_id> using <ext_id> as the key. Must be
- // called with locks held.
-
- int find_i (const EXT_ID &ext_id);
- // Performs a find using <ext_id> as the key. Must be called with
- // locks held.
-
- int find_i (const EXT_ID &ext_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
- // Performs a find using <ext_id> as the key. Must be called with
- // locks held.
-
- int unbind_i (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Performs unbind. Must be called with locks held.
-
- int unbind_i (const EXT_ID &ext_id);
- // Performs unbind. Must be called with locks held.
-
- int unbind_i (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry);
- // Performs unbind. Must be called with locks held.
-
- int create_buckets (size_t size);
- // Resize the map. Must be called with locks held. Note, that this
- // method should never be called more than once or else all the
- // hashing will get screwed up as the size will change.
-
- int close_i (void);
- // Close down a <Map_Manager_Ex>. Must be called with
- // locks held.
-
- int unbind_all_i (void);
- // Removes all the entries in <Map_Manager_Ex>. Must be called with
- // locks held.
-
- ACE_Allocator *allocator_;
- // Pointer to a memory allocator.
-
- ACE_LOCK lock_;
- // Synchronization variable for the MT_SAFE <ACE_Hash_Map_Manager_Ex>.
-
- HASH_KEY hash_key_;
- // Function object used for hashing keys.
-
- COMPARE_KEYS compare_keys_;
- // Function object used for comparing keys.
-
-private:
- int shared_find (const EXT_ID &ext_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry,
- u_long &loc);
- // Returns the <ACE_Hash_Map_Entry> that corresponds to <ext_id>.
-
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *table_;
- // Array of <ACE_Hash_Map_Entry> *s, each of which points to an
- // <ACE_Hash_Map_Entry> that serves as the beginning of a linked
- // list of <EXT_ID>s that hash to that bucket.
-
- size_t total_size_;
- // Total size of the hash table.
-
- size_t cur_size_;
- // Current number of entries in the table (note that this can be
- // larger than <total_size_> due to the bucket chaining).
-};
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_Hash_Map_Iterator_Base_Ex
-{
- // = TITLE
- // Base iterator for the <ACE_Hash_Map_Manager_Ex>
- //
- // = DESCRIPTION
- // This class factors out common code from its templatized
- // subclasses.
-public:
- // = Initialization method.
- ACE_Hash_Map_Iterator_Base_Ex (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
- int head);
- // Contructor. If head != 0, the iterator constructed is positioned
- // at the head of the map, it is positioned at the end otherwise.
-
- // = ITERATION methods.
-
- int next (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&next_entry) const;
- // Pass back the next <entry> that hasn't been seen in the Set.
- // Returns 0 when all items have been seen, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- ACE_Hash_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
- // Returns a reference to the interal element <this> is pointing to.
-
- ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
- // Returns reference the Hash_Map_Manager_Ex that is being iterated
- // over.
-
- int operator== (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
- int operator!= (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
- // Check if two iterators point to the same position
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- int forward_i (void);
- // Move forward by one element in the set. Returns 0 when there's
- // no more item in the set after the current items, else 1.
-
- int reverse_i (void);
- // Move backward by one element in the set. Returns 0 when there's
- // no more item in the set before the current item, else 1.
-
- void dump_i (void) const;
- // Dump the state of an object.
-
- ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *map_man_;
- // Map we are iterating over.
-
- ssize_t index_;
- // Keeps track of how far we've advanced in the table.
-
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next_;
- // Keeps track of how far we've advanced in a linked list in each
- // table slot.
-};
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_Hash_Map_Iterator_Ex : public ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-{
- // = TITLE
- // Forward iterator for the <ACE_Hash_Map_Manager_Ex>.
- //
- // = DESCRIPTION
- // This class does not perform any internal locking of the
- // <ACE_Hash_Map_Manager_Ex> it is iterating upon since locking is
- // inherently inefficient and/or error-prone within an STL-style
- // iterator. If you require locking, you can explicitly use an
- // <ACE_Guard> or <ACE_Read_Guard> on the <ACE_Hash_Map_Manager_Ex>'s
- // internal lock, which is accessible via its <mutex> method.
-public:
- // = Initialization method.
- ACE_Hash_Map_Iterator_Ex (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
- int tail = 0);
- // = Iteration methods.
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL styled iteration, compare, and reference functions.
-
- ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
- // Prefix advance.
-
- ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
- // Postfix advance.
-
- ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
- // Prefix reverse.
-
- ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
- // Postfix reverse.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_Hash_Map_Bucket_Iterator
-{
- // = TITLE
- // Forward iterator for the <ACE_Hash_Map_Manager_Ex> which only
- // traverses a particular bucket. The particular bucket is
- // specified by the <EXT_ID> parameter specified in the
- // constructor.
- //
- // = DESCRIPTION
- // This class does not perform any internal locking of the
- // <ACE_Hash_Map_Manager_Ex> it is iterating upon since locking
- // is inherently inefficient and/or error-prone within an
- // STL-style iterator. If you require locking, you can
- // explicitly use an <ACE_Guard> or <ACE_Read_Guard> on the
- // <ACE_Hash_Map_Manager_Ex>'s internal lock, which is
- // accessible via its <mutex> method.
- //
- // Note that this iterator cannot be created by calling a method
- // on the map, since this would require
-public:
- // = Initialization method.
- ACE_Hash_Map_Bucket_Iterator (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
- const EXT_ID &ext_id,
- int tail = 0);
-
- // = STL styled iteration, compare, and reference functions.
-
- ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
- // Prefix advance.
-
- ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
- // Postfix advance.
-
- ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
- // Prefix reverse.
-
- ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
- // Postfix reverse.
-
- ACE_Hash_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
- // Returns a reference to the interal element <this> is pointing to.
-
- ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
- // Returns reference the Hash_Map_Manager_Ex that is being iterated
- // over.
-
- int operator== (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
- int operator!= (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
- // Check if two iterators point to the same position
-
-protected:
- int forward_i (void);
- // Move forward by one element in the set. Returns 0 when there's
- // no more item in the set after the current items, else 1.
-
- int reverse_i (void);
- // Move backward by one element in the set. Returns 0 when there's
- // no more item in the set before the current item, else 1.
-
- ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *map_man_;
- // Map we are iterating over.
-
- ssize_t index_;
- // Keeps track of how far we've advanced in the table.
-
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next_;
- // Keeps track of how far we've advanced in a linked list in each
- // table slot.
-};
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_Hash_Map_Reverse_Iterator_Ex : public ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-{
- // = TITLE
- // Reverse iterator for the <ACE_Hash_Map_Manager_Ex>.
- //
- // = DESCRIPTION
- // This class does not perform any internal locking of the
- // <ACE_Hash_Map_Manager_Ex> it is iterating upon since locking is
- // inherently inefficient and/or error-prone within an STL-style
- // iterator. If you require locking, you can explicitly use an
- // <ACE_Guard> or <ACE_Read_Guard> on the <ACE_Hash_Map_Manager_Ex>'s
- // internal lock, which is accessible via its <mutex> method.
-public:
- // = Initialization method.
- ACE_Hash_Map_Reverse_Iterator_Ex (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
- int head = 0);
- // = Iteration methods.
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL styled iteration, compare, and reference functions.
-
- ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
- // Prefix reverse.
-
- ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
- // Postfix reverse.
-
- ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
- // Prefix advance.
-
- ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
- // Postfix advance.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Hash_Map_Manager : public ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>
-{
- // = TITLE
- // Wrapper for backward compatibility.
- //
- // = DESCRIPTION
- //
- // This implementation of a map uses a hash table. This class
- // expects that the <EXT_ID> contains a method called <hash>.
- // In addition, the <EXT_ID> must support <operator==>. Both of
- // these constraints can be alleviated via template
- // specialization, as shown in the $ACE_ROOT/tests/Conn_Test.cpp
- // test.
- //
-public:
- ACE_Hash_Map_Manager (ACE_Allocator *alloc = 0);
- // Initialize a <Hash_Map_Manager> with default size.
-
- ACE_Hash_Map_Manager (size_t size,
- ACE_Allocator *alloc = 0);
- // Initialize a <Hash_Map_Manager> with size <length>.
-
- // = The following two are necessary for template specialization of
- // ACE_Hash_Map_Manager to work.
- int equal (const EXT_ID &id1, const EXT_ID &id2);
- u_long hash (const EXT_ID &ext_id);
-};
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Hash_Map_Iterator : public ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>
-{
- // = TITLE
- // Wrapper for backward compatibility.
- //
-public:
- // = Initialization method.
- ACE_Hash_Map_Iterator (ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
- int tail = 0);
- // Construct from map
-
- ACE_Hash_Map_Iterator (const ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base);
- // Construct from base
-
- ACE_Hash_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
- operator= (const ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base);
- // Assignment from base
-};
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Hash_Map_Reverse_Iterator : public ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>
-{
- // = TITLE
- // Wrapper for backward compatibility.
- //
-public:
- // = Initialization method.
- ACE_Hash_Map_Reverse_Iterator (ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
- int head = 0);
-
- ACE_Hash_Map_Reverse_Iterator (const ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base);
- // Construct from base
-
- ACE_Hash_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
- operator= (const ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base);
- // Assignment from base
-};
-
-#if defined (__ACE_INLINE__)
-// Include ace/Hash_Map_Manager_T.i on all platforms excluding SunCC.
-// This nonsense is necessary since SunCC (version 4.2) cannot inline
-// the code in ace/Hash_Map_Manager_T.i (with the fast option).
-# if !defined (__SUNPRO_CC)
-# include "ace/Hash_Map_Manager_T.i"
-# endif /* ! __SUNPRO_CC */
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Hash_Map_Manager_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Hash_Map_Manager_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_HASH_MAP_MANAGER_T_H */
diff --git a/ace/Hash_Map_Manager_T.i b/ace/Hash_Map_Manager_T.i
deleted file mode 100644
index db517f15678..00000000000
--- a/ace/Hash_Map_Manager_T.i
+++ /dev/null
@@ -1,777 +0,0 @@
-// $Id$
-
-#include "ace/Synch.h"
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Manager_Ex (size_t size,
- ACE_Allocator *alloc)
- : allocator_ (alloc),
- table_ (0),
- total_size_ (0),
- cur_size_ (0)
-{
- if (this->open (size, alloc) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Hash_Map_Manager_Ex\n")));
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Manager_Ex (ACE_Allocator *alloc)
- : allocator_ (alloc),
- table_ (0),
- total_size_ (0),
- cur_size_ (0)
-{
- if (this->open (ACE_DEFAULT_MAP_SIZE, alloc) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Hash_Map_Manager_Ex\n")));
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::close (void)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->close_i ();
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind_all (void)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->unbind_all_i ();
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::~ACE_Hash_Map_Manager_Ex (void)
-{
- this->close ();
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE size_t
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::current_size (void) const
-{
- return this->cur_size_;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE size_t
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::total_size (void) const
-{
- return this->total_size_;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE ACE_LOCK &
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::mutex (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Manager_Ex::mutex");
- return this->lock_;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE u_long
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::hash (const EXT_ID &ext_id)
-{
- return this->hash_key_ (ext_id);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::equal (const EXT_ID &id1,
- const EXT_ID &id2)
-{
- return this->compare_keys_ (id1, id2);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::bind_i (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *temp;
-
- return this->bind_i (ext_id, int_id, temp);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->bind_i (ext_id, int_id);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->bind_i (ext_id, int_id, entry);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::trybind_i (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *temp;
-
- int result = this->trybind_i (ext_id, int_id, temp);
- if (result == 1)
- int_id = temp->int_id_;
- return result;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->trybind_i (ext_id, int_id);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_id,
- INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->trybind_i (ext_id, int_id, entry);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind_i (const EXT_ID &ext_id)
-{
- INT_ID int_id;
-
- return this->unbind_i (ext_id, int_id);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->unbind_i (ext_id, int_id);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->unbind_i (ext_id) == -1 ? -1 : 0;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::unbind (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->unbind_i (entry) == -1 ? -1 : 0;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::find_i (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry;
-
- u_long dummy;
- if (this->shared_find (ext_id, entry, dummy) == -1)
- return -1;
- else
- {
- int_id = entry->int_id_;
- return 0;
- }
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::find_i (const EXT_ID &ext_id)
-{
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry;
-
- u_long dummy;
- return this->shared_find (ext_id, entry, dummy);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
- INT_ID &int_id) const
-{
- ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *nc_this =
- (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *)
- this;
-
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, nc_this->lock_, -1);
-
- return nc_this->find_i (ext_id, int_id);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id) const
-{
- ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *nc_this =
- (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *)
- this;
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, nc_this->lock_, -1);
-
- return nc_this->find_i (ext_id);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::find_i (const EXT_ID &ext_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- u_long dummy;
- return this->shared_find (ext_id, entry, dummy);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry) const
-{
- ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *nc_this =
- (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *)
- this;
-
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, nc_this->lock_, -1);
-
- return nc_this->find_i (ext_id, entry);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *node;
-
- return this->rebind_i (ext_id,
- int_id,
- node);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id)
-{
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *node;
-
- return this->rebind_i (ext_id,
- int_id,
- old_int_id,
- node);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id)
-{
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *node;
-
- return this->rebind_i (ext_id,
- int_id,
- old_ext_id,
- old_int_id,
- node);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->rebind_i (ext_id, int_id);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->rebind_i (ext_id, int_id, entry);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->rebind_i (ext_id, int_id, old_int_id);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->rebind_i (ext_id, int_id, old_int_id, entry);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->rebind_i (ext_id, int_id, old_ext_id, old_int_id);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id,
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->rebind_i (ext_id, int_id, old_ext_id, old_int_id, entry);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::begin (void)
-{
- return ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> (*this);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::end (void)
-{
- return ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> (*this, 1);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rbegin (void)
-{
- return ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> (*this);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::rend (void)
-{
- return ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> (*this, 1);
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Iterator_Base_Ex (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
- int head)
- : map_man_ (&mm),
- index_ (head != 0 ? -1 : ACE_static_cast (ssize_t, mm.total_size_)),
- next_ (0)
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Iterator_Base_Ex");
-
- if (mm.table_ != 0)
- this->next_ = &mm.table_[head != 0 ? 0 : mm.total_size_ - 1];
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::next (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry) const
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::next");
-
- if (this->map_man_->table_ != 0
- && this->index_ < ACE_static_cast (ssize_t, this->map_man_->total_size_)
- && this->index_ >= 0
- && this->next_ != &this->map_man_->table_[this->index_])
- {
- entry = this->next_;
- return 1;
- }
- else
- return 0;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::done (void) const
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::done");
-
- return this->map_man_->table_ == 0
- || this->index_ >= ACE_static_cast (ssize_t, this->map_man_->total_size_)
- || this->index_ < 0;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Entry<EXT_ID, INT_ID> &
-ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator* (void) const
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator*");
- ACE_Hash_Map_Entry<EXT_ID, INT_ID> *retv = 0;
-
- int result = this->next (retv);
-
- ACE_UNUSED_ARG (result);
- ACE_ASSERT (result != 0);
-
- return *retv;
-}
-
-// Returns the reference to the hash_map_manager_ex that is being
-// iterated over.
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>&
-ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::map (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::map");
- return *this->map_man_;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator== (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &rhs) const
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator==");
- return this->map_man_ == rhs.map_man_
- && this->index_ == rhs.index_
- && this->next_ == rhs.next_;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!= (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &rhs) const
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!=");
- return this->next_ != rhs.next_
- || this->index_ != rhs.index_
- || this->map_man_ != rhs.map_man_;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Iterator_Ex)
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE void
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump (void) const
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump");
-
- this->dump_i ();
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Iterator_Ex (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
- int tail)
- : ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> (mm,
- tail == 0 ? 1 : 0)
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Iterator_Ex");
- if (tail == 0)
- this->forward_i ();
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::advance (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::advance");
- return this->forward_i ();
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (void)");
-
- this->forward_i ();
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (int)");
-
- ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> retv (*this);
- this->forward_i ();
- return retv;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (void)");
-
- this->reverse_i ();
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
-{
- ACE_TRACE ("ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (int)");
-
- ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> retv (*this);
- this->reverse_i ();
- return retv;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Bucket_Iterator (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
- const EXT_ID &ext_id,
- int tail)
- : map_man_ (&mm)
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Bucket_Iterator");
-
- this->index_ = this->map_man_->hash (ext_id) % this->map_man_->total_size_;
- this->next_ = &this->map_man_->table_[this->index_];
-
- if (tail == 0)
- this->forward_i ();
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (void)");
-
- this->forward_i ();
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (int)");
-
- ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> retv (*this);
- this->forward_i ();
- return retv;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (void)");
-
- this->reverse_i ();
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (int)");
-
- ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> retv (*this);
- this->reverse_i ();
- return retv;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i");
-
- this->next_ = this->next_->next_;
- return this->next_ != &this->map_man_->table_[this->index_];
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i");
-
- this->next_ = this->next_->prev_;
- return this->next_ != &this->map_man_->table_[this->index_];
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Entry<EXT_ID, INT_ID> &
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator* (void) const
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator*");
-
- return *this->next_;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::map (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::map");
- return *this->map_man_;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator== (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &rhs) const
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator==");
- return this->map_man_ == rhs.map_man_
- && this->index_ == rhs.index_
- && this->next_ == rhs.next_;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!= (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &rhs) const
-{
- ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!=");
- return this->next_ != rhs.next_
- || this->index_ != rhs.index_
- || this->map_man_ != rhs.map_man_;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Reverse_Iterator_Ex)
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE void
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump (void) const
-{
- ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump");
-
- this->dump_i ();
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Reverse_Iterator_Ex (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm, int head)
- : ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> (mm, head)
-{
- ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Reverse_Iterator_Ex");
- if (head == 0)
- this->reverse_i ();
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE int
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::advance (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::advance");
- return this->reverse_i ();
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (void)");
-
- this->reverse_i ();
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
-{
- ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator++ (int)");
-
- ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> retv (*this);
- this->reverse_i ();
- return retv;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (void)
-{
- ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (void)");
-
- this->forward_i ();
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK> ACE_INLINE
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
-ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
-{
- ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator-- (int)");
-
- ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> retv (*this);
- this->forward_i ();
- return retv;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Hash_Map_Manager (ACE_Allocator *alloc)
- : ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> (alloc)
-{
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Hash_Map_Manager (size_t size,
- ACE_Allocator *alloc)
- : ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> (size,
- alloc)
-{
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::equal (const EXT_ID &id1, const EXT_ID &id2)
-{
- return ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>::equal (id1, id2);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> u_long
-ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::hash (const EXT_ID &ext_id)
-{
- return ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>::hash (ext_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-ACE_Hash_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::ACE_Hash_Map_Iterator (ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
- int tail)
- : ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> (mm,
- tail)
-{
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-ACE_Hash_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::ACE_Hash_Map_Iterator (const ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base)
- : ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> (base)
-{
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_Hash_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
-ACE_Hash_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator= (const ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &rhs)
-{
- ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base = *this;
-
- base = rhs;
-
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-ACE_Hash_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::ACE_Hash_Map_Reverse_Iterator (ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
- int head)
- : ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> (mm,
- head)
-{
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-ACE_Hash_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::ACE_Hash_Map_Reverse_Iterator (const ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base)
- : ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> (base)
-{
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_Hash_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
-ACE_Hash_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator= (const ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &rhs)
-{
- ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base = *this;
-
- base = rhs;
-
- return *this;
-}
diff --git a/ace/Hash_Map_With_Allocator_T.cpp b/ace/Hash_Map_With_Allocator_T.cpp
deleted file mode 100644
index fa2a44ca06d..00000000000
--- a/ace/Hash_Map_With_Allocator_T.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// Hash_Map_With_Allocator_T.cpp
-// $Id$
-
-#ifndef ACE_HASH_MAP_WITH_ALLOCATOR_T_CPP
-#define ACE_HASH_MAP_WITH_ALLOCATOR_T_CPP
-
-#include "ace/Hash_Map_With_Allocator_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Hash_Map_With_Allocator_T.i"
-#endif /* __ACE_INLINE__ */
-
-template <class EXT_ID, class INT_ID>
-ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::ACE_Hash_Map_With_Allocator (ACE_Allocator *alloc)
- : ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_Null_Mutex> (alloc)
-{
- ACE_TRACE ("ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::ACE_Hash_Map_With_Allocator");
-}
-
-template <class EXT_ID, class INT_ID>
-ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::ACE_Hash_Map_With_Allocator (size_t size,
- ACE_Allocator *alloc)
- : ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_Null_Mutex> (size, alloc)
-{
- ACE_TRACE ("ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::ACE_Hash_Map_With_Allocator");
-}
-
-#endif /* ACE_HASH_MAP_WITH_ALLOCATOR_T_CPP */
diff --git a/ace/Hash_Map_With_Allocator_T.h b/ace/Hash_Map_With_Allocator_T.h
deleted file mode 100644
index 4799edf38ce..00000000000
--- a/ace/Hash_Map_With_Allocator_T.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Hash_Map_With_Allocator_T.h
-//
-// = AUTHOR
-// Marina Spivak <marina@cs.wustl.edu> and
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_HASH_MAP_WITH_ALLOCATOR_T_H
-#define ACE_HASH_MAP_WITH_ALLOCATOR_T_H
-#include "ace/pre.h"
-
-#include "ace/Hash_Map_Manager.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class EXT_ID, class INT_ID>
-class ACE_Hash_Map_With_Allocator :
- public ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_Null_Mutex>
-{
- // = TITLE
- // This class is a thin wrapper around ACE_Hash_Map_Manager,
- // which comes handy when ACE_Hash_Map_Manager is to be used with a
- // non-nil ACE_Allocator. This wrapper insures that the appropriate
- // allocator is in place for every operation that accesses or
- // updates the hash map.
- //
- // = DESCRIPTION
- // If we use ACE_Hash_Map_Manager with a shared memory allocator
- // (or memory-mapped file allocator, for example), the allocator
- // pointer used by ACE_Hash_Map_Manager gets stored with it, in
- // shared memory (or memory-mapped file). Naturally, this will
- // cause horrible problems, since only the first process to set
- // that pointer will be guaranteed the address of the allocator
- // is meaningful! That is why we need this wrapper, which
- // insures that appropriate allocator pointer is in place for
- // each call.
- //
-public:
- ACE_Hash_Map_With_Allocator (ACE_Allocator *alloc);
- // Constructor.
-
- ACE_Hash_Map_With_Allocator (size_t size,
- ACE_Allocator *alloc);
- // Constructor that specifies hash table size.
-
- // = The following methods are Proxies to the corresponding methods
- // in <ACE_Hash_Map_Manager>. Each method sets the allocator to
- // the one specified by the invoking entity, and then calls the
- // corresponding method in <ACE_Hash_Map_Manager> to do the
- // actual work.
-
- int bind (const EXT_ID &,
- const INT_ID &,
- ACE_Allocator *alloc);
-
- int unbind (const EXT_ID &,
- INT_ID &,
- ACE_Allocator *alloc);
-
- int unbind (const EXT_ID &,
- ACE_Allocator *alloc);
-
- int rebind (const EXT_ID &,
- const INT_ID &,
- EXT_ID &,
- INT_ID &,
- ACE_Allocator *alloc);
-
- int find (const EXT_ID &,
- INT_ID &,
- ACE_Allocator *alloc);
-
- int find (const EXT_ID &,
- ACE_Allocator *alloc);
- // Returns 0 if the <ext_id> is in the mapping, otherwise -1.
-
- int close (ACE_Allocator *alloc);
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Hash_Map_With_Allocator_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Hash_Map_With_Allocator_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Hash_Map_With_Allocator_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-
-#include "ace/post.h"
-#endif /* ACE_HASH_MAP_WITH_ALLOCATOR_T_H */
diff --git a/ace/Hash_Map_With_Allocator_T.i b/ace/Hash_Map_With_Allocator_T.i
deleted file mode 100644
index 5b8c42dde3d..00000000000
--- a/ace/Hash_Map_With_Allocator_T.i
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Hash_Map_With_Allocator_T.i
-
-
-template <class EXT_ID, class INT_ID> ACE_INLINE int
-ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::close (ACE_Allocator *alloc)
-{
- ACE_TRACE ("ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::close");
- this->allocator_ = alloc;
- return this->close_i ();
-}
-
-template <class EXT_ID, class INT_ID> ACE_INLINE int
-ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::bind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_Allocator *alloc)
-{
- ACE_TRACE ("ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::bind");
- this->allocator_ = alloc;
- return this->bind_i (ext_id, int_id);
-}
-
-template <class EXT_ID, class INT_ID> ACE_INLINE int
-ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::unbind (const EXT_ID &ext_id,
- INT_ID &int_id,
- ACE_Allocator *alloc)
-{
- ACE_TRACE ("ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::unbind");
- this->allocator_ = alloc;
- return this->unbind_i (ext_id, int_id);
-}
-
-template <class EXT_ID, class INT_ID> ACE_INLINE int
-ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::unbind (const EXT_ID &ext_id,
- ACE_Allocator *alloc)
-{
- ACE_TRACE ("ACE_Hash_Map_With_Allocator<EXT_ID>::unbind");
- this->allocator_ = alloc;
- return this->unbind_i (ext_id);
-}
-
-template <class EXT_ID, class INT_ID> ACE_INLINE int
-ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id,
- ACE_Allocator *alloc)
-{
- ACE_TRACE ("ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::rebind");
- this->allocator_ = alloc;
- return this->rebind_i (ext_id, int_id, old_ext_id, old_int_id);
-}
-
-template <class EXT_ID, class INT_ID> ACE_INLINE int
-ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::find (const EXT_ID &ext_id,
- INT_ID &int_id,
- ACE_Allocator *alloc)
-{
- ACE_TRACE ("ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::find");
- this->allocator_ = alloc;
- return this->find_i (ext_id, int_id);
-}
-
-template <class EXT_ID, class INT_ID> ACE_INLINE int
-ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::find (const EXT_ID &ext_id,
- ACE_Allocator *alloc)
-{
- ACE_TRACE ("ACE_Hash_Map_With_Allocator<EXT_ID, INT_ID>::find");
- this->allocator_ = alloc;
- return this->find_i (ext_id);
-}
diff --git a/ace/High_Res_Timer.cpp b/ace/High_Res_Timer.cpp
deleted file mode 100644
index 8b60b3bcf79..00000000000
--- a/ace/High_Res_Timer.cpp
+++ /dev/null
@@ -1,478 +0,0 @@
-// $Id$
-
-#include "ace/High_Res_Timer.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/High_Res_Timer.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Stats.h"
-
-ACE_RCSID(ace, High_Res_Timer, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_High_Res_Timer)
-
-// For Intel platforms, a scale factor is required for
-// ACE_OS::gethrtime. We'll still set this to one to prevent division
-// by zero errors.
-#if (defined (ACE_HAS_PENTIUM) || defined (ACE_HAS_POWERPC_TIMER) || \
- defined (ACE_HAS_ALPHA_TIMER)) && \
- !defined (ACE_HAS_HI_RES_TIMER)
-
-# include "ace/Synch.h"
-# include "ace/Object_Manager.h"
-
- // Initialize the global_scale_factor_ to 1. The first
- // ACE_High_Res_Timer instance construction will override this
- // value.
- /* static */
- ACE_UINT32 ACE_High_Res_Timer::global_scale_factor_ = 1u;
-
-#else /* ! (ACE_HAS_PENTIUM || ACE_HAS_POWERPC_TIMER || \
- ACE_HAS_ALPHA_TIMER) ||
- ACE_HAS_HI_RES_TIMER */
- // A scale_factor of 1000 converts nanosecond ticks to microseconds.
- // That is, on these platforms, 1 tick == 1 nanosecond.
- /* static */
- ACE_UINT32 ACE_High_Res_Timer::global_scale_factor_ = 1000u;
-#endif /* ! (ACE_HAS_PENTIUM || ACE_HAS_POWERPC_TIMER || \
- ACE_HAS_ALPHA_TIMER) ||
- ACE_HAS_HI_RES_TIMER */
-
-// This is used to tell if the global_scale_factor_ has been
-// set, and if high resolution timers are supported.
-/* static */
-int ACE_High_Res_Timer::global_scale_factor_status_ = 0;
-
-#if defined (linux)
-// Determine the apparent CPU clock speed from /proc/cpuinfo
-ACE_UINT32
-ACE_High_Res_Timer::get_cpuinfo (void)
-{
- ACE_UINT32 scale_factor = 1u;
-
- // Get the BogoMIPS from /proc/cpuinfo. It works fine on Alpha and
- // Pentium Pro. For other CPUs, it will be necessary to interpret
- // the BogoMips, as described in the BogoMips mini-HOWTO. Note that
- // this code assumes an order to the /proc/cpuinfo contents. The
- // BogoMips rating had better come after CPU type and model info.
-#if !defined (__alpha__)
- int supported = 0;
-#endif /* __alpha__ */
-
- FILE *cpuinfo = ACE_OS::fopen ("/proc/cpuinfo", "r");
-
- if (cpuinfo != 0)
- {
- ACE_TCHAR buf[128];
-
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nReading /proc/cpuinfo...")));
-
- while (ACE_OS::fgets (buf, sizeof buf, cpuinfo))
- {
-#if defined (__alpha__)
- ACE_UINT32 whole;
- ACE_UINT32 fractional;
- if (::sscanf (buf,
- "BogoMIPS : %d.%d\n",
- &whole,
- &fractional) == 2
- || ::sscanf (buf,
- "bogomips : %d.%d\n",
- &whole,
- &fractional) == 2)
- {
- scale_factor = whole;
- break;
- }
-#else
- double bmips = 1;
- ACE_TCHAR arg[128];
-
- // CPU type?
- if (::sscanf (buf, "cpu : %s\n", arg) == 1)
- {
- // If this is an Alpha chip, then the BogoMips rating is
- // usable...
- if (ACE_OS::strncmp (arg,
- "Alpha",
- 5) == 0)
- {
- supported = 1;
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" recognized Alpha chip...")));
- }
- }
- // Pentium CPU model?
- else if (supported == 0
- && ::sscanf (buf, "model : Pentium %s\n", arg) == 1)
- {
- // But if we don't have the right kind of Intel chip,
- // just quit.
- if (ACE_OS::strcmp (arg, "II") == 0
- || ACE_OS::strcmp (arg, "Pro") == 0)
- {
- supported = 1;
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" recognized Pentium Pro/II chip...")));
- }
- }
- else if (::sscanf (buf, "bogomips : %lf\n", &bmips) == 1
- || ::sscanf (buf, "BogoMIPS : %lf\n", &bmips) == 1)
- {
- if (supported)
- {
- scale_factor = (ACE_UINT32) (bmips + 0.5);
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" setting the clock scale factor to %u"), scale_factor));
- }
-#if 0
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\nThe BogoMIPS metric is not supported on this platform"
- "\n\tReport the results of the clock calibration and"
- "\n\tthe contents of /proc/cpuinfo to the ace-users mailing list")));
- }
-#endif /* 0 */
- break;
- }
-#endif /* __alpha__ */
- }
-
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (done)\n")));
-
- ACE_OS::fclose (cpuinfo);
- }
-
- return scale_factor;
-}
-#endif /* linux */
-
-ACE_UINT32
-ACE_High_Res_Timer::global_scale_factor (void)
-{
-#if (defined (ACE_HAS_PENTIUM) || defined (ACE_HAS_POWERPC_TIMER) || \
- defined (ACE_HAS_ALPHA_TIMER)) && \
- !defined (ACE_HAS_HI_RES_TIMER) && \
- ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || \
- defined (ghs) || defined (__GNUG__) || defined (__KCC))
- // Check if the global scale factor needs to be set, and do if so.
- if (ACE_High_Res_Timer::global_scale_factor_status_ == 0)
- {
- // Grab ACE's static object lock. This doesn't have anything to
- // do with static objects; it's just a convenient lock to use.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
-
- // Double check
- if (ACE_High_Res_Timer::global_scale_factor_status_ == 0)
- {
-# if defined (ACE_WIN32)
- LARGE_INTEGER freq;
- if (::QueryPerformanceFrequency (&freq))
- {
- ACE_High_Res_Timer::global_scale_factor_status_ = 1;
-
- // We have a high-res timer
- ACE_High_Res_Timer::global_scale_factor
- (ACE_static_cast (unsigned int,
- freq.QuadPart / ACE_ONE_SECOND_IN_USECS));
- }
- else
- // High-Res timers not supported
- ACE_High_Res_Timer::global_scale_factor_status_ = -1;
-
- return ACE_High_Res_Timer::global_scale_factor_;
-
-# elif defined (linux)
- ACE_High_Res_Timer::global_scale_factor (ACE_High_Res_Timer::get_cpuinfo ());
-# endif /* ! ACE_WIN32 && ! (linux && __alpha__) */
-
- if (ACE_High_Res_Timer::global_scale_factor_ == 1u)
- // Failed to retrieve CPU speed from system, so calculate it.
- ACE_High_Res_Timer::calibrate ();
- }
- }
-
- ACE_High_Res_Timer::global_scale_factor_status_ = 1;
-#endif /* (ACE_HAS_PENTIUM || ACE_HAS_POWERPC_TIMER || \
- ACE_HAS_ALPHA_TIMER) && \
- ! ACE_HAS_HIGH_RES_TIMER &&
- ((WIN32 && ! WINCE) || ghs || __GNUG__) */
-
- return ACE_High_Res_Timer::global_scale_factor_;
-}
-
-ACE_High_Res_Timer::ACE_High_Res_Timer (void)
-{
- ACE_TRACE ("ACE_High_Res_Timer::ACE_High_Res_Timer");
-
- this->reset ();
-
- // Make sure that the global scale factor is set.
- (void) global_scale_factor ();
-}
-
-ACE_UINT32
-ACE_High_Res_Timer::calibrate (const ACE_UINT32 usec,
- const u_int iterations)
-{
- const ACE_Time_Value sleep_time (0, usec);
- ACE_Stats delta_hrtime;
- // In units of 100 usec, to avoid overflow.
- ACE_Stats actual_sleeps;
-
- for (u_int i = 0;
- i < iterations;
- ++i)
- {
- const ACE_Time_Value actual_start =
- ACE_OS::gettimeofday ();
- const ACE_hrtime_t start =
- ACE_OS::gethrtime ();
- ACE_OS::sleep (sleep_time);
- const ACE_hrtime_t stop =
- ACE_OS::gethrtime ();
- const ACE_Time_Value actual_delta =
- ACE_OS::gettimeofday () - actual_start;
-
- // Store the sample.
- delta_hrtime.sample (ACE_U64_TO_U32 (stop - start));
- actual_sleeps.sample (actual_delta.msec () * 100u);
- }
-
- // Calculate the mean value of the samples, with no fractional
- // precision. Use it for the global scale factor.
- ACE_Stats_Value ticks (0);
- delta_hrtime.mean (ticks);
-
- ACE_Stats_Value actual_sleep (0);
- actual_sleeps.mean (actual_sleep);
-
- // The addition of 5 below rounds instead of truncates.
- const ACE_UINT32 scale_factor =
- (ticks.whole () / actual_sleep.whole () + 5) /
- 10u /* usec/100 usec */;
- ACE_High_Res_Timer::global_scale_factor (scale_factor);
-
- return scale_factor;
-}
-
-void
-ACE_High_Res_Timer::dump (void) const
-{
- ACE_TRACE ("ACE_High_Res_Timer::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nglobal_scale_factor_: %u\n"),
- global_scale_factor ()));
-#if defined (ACE_LACKS_LONGLONG_T)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT (":\nstart_.hi (): %8x; start_.lo (): %8x;\n")
- ACE_TEXT ("end_.hi (): %8x; end_.lo (): %8x;\n")
- ACE_TEXT ("total_.hi (): %8x; total_.lo (): %8x;\n")
- ACE_TEXT ("start_incr_.hi () %8x; start_incr_.lo (): %8x;\n"),
- start_.hi (), start_.lo (),
- end_.hi (), end_.lo (),
- total_.hi (), total_.lo (),
- start_incr_.hi (), start_incr_.lo ()));
-#else /* ! ACE_LACKS_LONGLONG_T */
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT (":\nstart_.hi (): %8x; start_.lo (): %8x;\n")
- ACE_TEXT ("end_.hi (): %8x; end_.lo (): %8x;\n")
- ACE_TEXT ("total_.hi (): %8x; total_.lo (): %8x;\n")
- ACE_TEXT ("start_incr_.hi () %8x; start_incr_.lo (): %8x;\n"),
- ACE_CU64_TO_CU32 (start_ >> 32),
- ACE_CU64_TO_CU32 (start_ & 0xfffffffful),
- ACE_CU64_TO_CU32 (end_ >> 32),
- ACE_CU64_TO_CU32 (end_ & 0xfffffffful),
- ACE_CU64_TO_CU32 (total_ >> 32),
- ACE_CU64_TO_CU32 (total_ & 0xfffffffful),
- ACE_CU64_TO_CU32 (start_incr_ >> 32),
- ACE_CU64_TO_CU32 (start_incr_ & 0xfffffffful)));
-#endif /* ! ACE_LACKS_LONGLONG_T */
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_High_Res_Timer::reset (void)
-{
- ACE_TRACE ("ACE_High_Res_Timer::reset");
-
- start_ = 0;
- end_ = 0;
- total_ = 0;
- start_incr_ = 0;
-}
-
-void
-ACE_High_Res_Timer::elapsed_time (ACE_Time_Value &tv) const
-{
- hrtime_to_tv (tv, end_ - start_);
-}
-
-#if defined (ACE_HAS_POSIX_TIME)
-void
-ACE_High_Res_Timer::elapsed_time (struct timespec &elapsed_time) const
-{
- // This implementation should be cleaned up.
-
- // Just grab the nanoseconds. That is, leave off all values above
- // microsecond. This equation is right! Don't mess with me! (It
- // first strips off everything but the portion less than 1 usec.
- // Then it converts that to nanoseconds by dividing by the scale
- // factor to convert to usec, and multiplying by 1000.) The cast
- // avoids a MSVC 4.1 compiler warning about narrowing.
- u_long nseconds = ACE_static_cast (u_long,
- (this->end_ - this->start_) %
- global_scale_factor () * 1000u /
- global_scale_factor ());
-
- // Get just the microseconds (dropping any left over nanoseconds).
- ACE_UINT32 useconds = (ACE_UINT32) ((this->end_ - this->start_) / global_scale_factor ());
-
-#if ! defined(ACE_HAS_BROKEN_TIMESPEC_MEMBERS)
- elapsed_time.tv_sec = (time_t) (useconds / ACE_ONE_SECOND_IN_USECS);
- // Transforms one second in microseconds into nanoseconds.
- elapsed_time.tv_nsec = (time_t) ((useconds % ACE_ONE_SECOND_IN_USECS) * 1000u + nseconds);
-#else
- elapsed_time.ts_sec = (time_t) (useconds / ACE_ONE_SECOND_IN_USECS);
- // Transforms one second in microseconds into nanoseconds.
- elapsed_time.ts_nsec = (time_t) ((useconds % ACE_ONE_SECOND_IN_USECS) * 1000u + nseconds);
-#endif /* ACE_HAS_BROKEN_TIMESPEC_MEMBERS */
-}
-#endif /* ACE_HAS_POSIX_TIME */
-
-void
-ACE_High_Res_Timer::elapsed_time_incr (ACE_Time_Value &tv) const
-{
- hrtime_to_tv (tv, total_);
-}
-
-void
-ACE_High_Res_Timer::elapsed_time (ACE_hrtime_t &nanoseconds) const
-{
- // Please do _not_ rearrange this equation. It is carefully
- // designed and tested to avoid overflow on machines that don't have
- // native 64-bit ints.
- nanoseconds = (this->end_ - this->start_)
- * (1000u / ACE_High_Res_Timer::global_scale_factor ());
-}
-
-void
-ACE_High_Res_Timer::elapsed_time_incr (ACE_hrtime_t &nanoseconds) const
-{
- // Same as above.
- nanoseconds = this->total_
- / ACE_High_Res_Timer::global_scale_factor () * 1000u;
-}
-
-#if !defined (ACE_HAS_WINCE)
-void
-ACE_High_Res_Timer::print_ave (const ACE_TCHAR *str,
- const int count,
- ACE_HANDLE handle) const
-{
- ACE_TRACE ("ACE_High_Res_Timer::print_ave");
-
- // Get the total number of nanoseconds elapsed.
- ACE_hrtime_t total_nanoseconds;
- this->elapsed_time (total_nanoseconds);
-
- // Separate to seconds and nanoseconds.
- u_long total_secs =
- ACE_static_cast (u_long,
- total_nanoseconds / (ACE_UINT32) ACE_ONE_SECOND_IN_NSECS);
- ACE_UINT32 extra_nsecs =
- ACE_static_cast (ACE_UINT32,
- total_nanoseconds % (ACE_UINT32) ACE_ONE_SECOND_IN_NSECS);
-
- ACE_TCHAR buf[100];
- if (count > 1)
- {
- ACE_hrtime_t avg_nsecs = total_nanoseconds / (ACE_UINT32) count;
- ACE_OS::sprintf (buf,
- ACE_TEXT (" count = %d, total (secs %lu, usecs %u), avg usecs = %lu\n"),
- count,
- total_secs,
- (extra_nsecs + 500u) / 1000u,
- (u_long) ((avg_nsecs + 500u) / 1000u));
- }
- else
- ACE_OS::sprintf (buf,
- ACE_TEXT (" total %3lu.%06lu secs\n"),
- total_secs,
- (extra_nsecs + 500lu) / 1000lu);
-
- ACE_OS::write (handle,
- str,
- ACE_OS::strlen (str));
- ACE_OS::write (handle,
- buf,
- ACE_OS::strlen (buf));
-}
-
-void
-ACE_High_Res_Timer::print_total (const ACE_TCHAR *str,
- const int count,
- ACE_HANDLE handle) const
-{
- ACE_TRACE ("ACE_High_Res_Timer::print_total");
-
- // Get the total number of nanoseconds elapsed.
- ACE_hrtime_t total_nanoseconds;
- this->elapsed_time (total_nanoseconds);
-
- // Separate to seconds and nanoseconds.
- u_long total_secs =
- (u_long) (total_nanoseconds / (ACE_UINT32) ACE_ONE_SECOND_IN_NSECS);
- ACE_UINT32 extra_nsecs =
- (ACE_UINT32) (total_nanoseconds % (ACE_UINT32) ACE_ONE_SECOND_IN_NSECS);
-
- ACE_TCHAR buf[100];
- if (count > 1)
- {
- ACE_hrtime_t avg_nsecs = this->total_ / (ACE_UINT32) count;
-
- ACE_OS::sprintf (buf,
- ACE_TEXT (" count = %d, total (secs %lu, usecs %u), avg usecs = %lu\n"),
- count,
- total_secs,
- (extra_nsecs + 500u) / 1000u,
- (u_long) ((avg_nsecs + 500u) / 1000u));
- }
- else
- ACE_OS::sprintf (buf,
- ACE_TEXT (" total %3lu.%06u secs\n"),
- total_secs,
- (extra_nsecs + 500u) / 1000u);
-
- ACE_OS::write (handle,
- str,
- ACE_OS::strlen (str));
- ACE_OS::write (handle,
- buf,
- ACE_OS::strlen (buf));
-}
-#endif /* !ACE_HAS_WINCE */
-
-int
-ACE_High_Res_Timer::get_env_global_scale_factor (const ACE_TCHAR *env)
-{
-#if !defined (ACE_HAS_WINCE)
- if (env != 0)
- {
- const ACE_TCHAR *env_value = ACE_OS::getenv (env);
- if (env_value != 0)
- {
- int value = ACE_OS::atoi (env_value);
- if (value > 0)
- {
- ACE_High_Res_Timer::global_scale_factor (value);
- return 0;
- }
- }
- }
-#else
- ACE_UNUSED_ARG (env);
-#endif /* !ACE_HAS_WINCE */
- return -1;
-}
diff --git a/ace/High_Res_Timer.h b/ace/High_Res_Timer.h
deleted file mode 100644
index 1045fcb1b3a..00000000000
--- a/ace/High_Res_Timer.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// High_Res_Timer.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_HIGH_RES_TIMER_H
-#define ACE_HIGH_RES_TIMER_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_High_Res_Timer
-{
- // = TITLE
- // A high resolution timer class wrapper that encapsulates
- // OS-specific high-resolution timers, such as those found on
- // Solaris, AIX, Win32/Pentium, and VxWorks.
- //
- // = DESCRIPTION
- // Most of the member functions don't return values. The only
- // reason that one would fail is if high-resolution time isn't
- // supported on the platform. To avoid impacting performance
- // and complicating the interface, in that case,
- // <ACE_OS::gettimeofday> is used instead.
- //
- // The global scale factor is required for platforms that have
- // high-resolution timers that return units other than
- // microseconds, such as clock ticks. It is represented as a
- // static u_long, can only be accessed through static methods,
- // and is used by all instances of High Res Timer. The member
- // functions that return or print times use the global scale
- // factor. They divide the "time" that they get from
- // <ACE_OS::gethrtime> by global_scale_factor_ to obtain the
- // time in microseconds. Its units are therefore 1/microsecond.
- // On Solaris, a scale factor of 1000 should be used because its
- // high-resolution timer returns nanoseconds. However, on Intel
- // platforms, we use RDTSC which returns the number of clock
- // ticks since system boot. For a 200MHz cpu, each clock tick
- // is 1/200 of a microsecond; the global_scale_factor_ should
- // therefore be 200.
- //
- // NOTE: the elapsed time calculations in the print methods use
- // ACE_hrtime_t values. Those methods do _not_ check for overflow!
- //
- // NOTE: Gabe <begeddov@proaxis.com> raises this issue regarding
- // <ACE_OS::gethrtime>: on multi-processors, the processor that
- // you query for your <timer.stop> value might not be the one
- // you queried for <timer.start>. Its not clear how much
- // divergence there would be, if any.
- //
- // This issue is not mentioned in the Solaris 2.5.1 gethrtime
- // man page.
-public:
- // = Initialization method.
-
- static void global_scale_factor (ACE_UINT32 gsf);
- // global_scale_factor_ is set to <gsf>. All High_Res_Timers use
- // global_scale_factor_. This allows applications to set the scale
- // factor just once for all High_Res_Timers. Check
- // High_Res_Timer.cpp for the default global_scale_factors for
- // several platforms. For many platforms (e.g., Solaris), the
- // global_scale_factor_ is set to 1000 so that <scale_factor> need
- // not be set. Careful, a <scale_factor> of 0 will cause division
- // by zero exceptions.
-
- static ACE_UINT32 global_scale_factor (void);
- // Returns the global_scale_factor.
-
- static int get_env_global_scale_factor (const ACE_TCHAR *env
- = ACE_TEXT ("ACE_SCALE_FACTOR"));
- // Sets the global_scale_factor to the value in the <env>
- // environment variable. Returns 0 on success, -1 on failure. Note
- // if <env> points to string "0" (value zero), this call will fail.
- // This is basically a no-op on CE because there is no concept of
- // environment variable on CE.
-
- static ACE_UINT32 calibrate (const ACE_UINT32 usec = 500000,
- const u_int iterations = 10);
- // Set (and return, for info) the global scale factor by sleeping
- // for <usec> and counting the number of intervening clock cycles.
- // Average over <iterations> of <usec> each. On some platforms,
- // such as Pentiums, this is called automatically during the first
- // ACE_High_Res_Timer construction with the default parameter
- // values. An application can override that by calling calibrate
- // with any desired parameter values _prior_ to constructing the
- // first ACE_High_Res_Timer instance.
-
- ACE_High_Res_Timer (void);
- // Initialize the timer.
-
- ~ACE_High_Res_Timer (void);
- // dtor.
-
- void reset (void);
- // Reinitialize the timer.
-
- void start (const ACE_OS::ACE_HRTimer_Op = ACE_OS::ACE_HRTIMER_GETTIME);
- // Start timing.
-
- void stop (const ACE_OS::ACE_HRTimer_Op = ACE_OS::ACE_HRTIMER_GETTIME);
- // Stop timing.
-
- void elapsed_time (ACE_Time_Value &tv) const;
- // Set <tv> to the number of microseconds elapsed.
-
- void elapsed_time (ACE_hrtime_t &nanoseconds) const;
- // Set <nanoseconds> to the number of nanoseconds elapsed.
-
-#if defined (ACE_HAS_POSIX_TIME)
- void elapsed_time (struct timespec &) const;
- // Returns the elapsed (stop - start) time in a struct timespec
- // (sec, nsec).
-#endif /* ACE_HAS_POSIX_TIME */
-
- void elapsed_microseconds (ACE_hrtime_t &usecs) const;
- // Sets <usecs> to the elapsed (stop - start) time in microseconds.
-
- void start_incr (const ACE_OS::ACE_HRTimer_Op = ACE_OS::ACE_HRTIMER_GETTIME);
- // Start incremental timing.
-
- void stop_incr (const ACE_OS::ACE_HRTimer_Op = ACE_OS::ACE_HRTIMER_GETTIME);
- // Stop incremental timing.
-
- void elapsed_time_incr (ACE_Time_Value &tv) const;
- // Set <tv> to the number of microseconds elapsed between all calls
- // to start_incr and stop_incr.
-
- void elapsed_time_incr (ACE_hrtime_t &nanoseconds) const;
- // Set <nsec> to the number of nanoseconds elapsed between all calls
- // to start_incr and stop_incr.
-
-#if !defined (ACE_HAS_WINCE)
- // @@ WINCE These two functions are currently not supported on Windows CE.
- // However, we should probably use the handle and ACE_Log_Msg to
- // print out the result.
- void print_total (const ACE_TCHAR *message,
- const int iterations = 1,
- ACE_HANDLE handle = ACE_STDOUT) const;
- // Print total time. NOTE: only use <print_total> if incremental
- // timings had been used!
-
- void print_ave (const ACE_TCHAR *message,
- const int iterations = 1,
- ACE_HANDLE handle = ACE_STDOUT) const;
- // Print average time.
-#endif /* !ACE_HAS_WINCE */
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- static ACE_Time_Value gettimeofday (const ACE_OS::ACE_HRTimer_Op =
- ACE_OS::ACE_HRTIMER_GETTIME);
- // THIS FUNCTION IS DEPRECATED. PLEASE USE <ACE_OS::gettimeofday>
- // INSTEAD! Calls <ACE_High_Res_Timer::hrtime_to_tv> passing
- // <ACE_OS::gethrtime>. This function can be used to parameterize
- // objects such as <ACE_Timer_Queue::gettimeofday>. If
- // <global_scale_factor_> is not set, and we're on a platform that
- // requires <global_scale_factor_> (e.g., Win32),
- // ACE_OS::gettimeofday will be used instead of <ACE_OS::gethrtime>.
- // This allows applications on Intel to use <High_Res_Timer> even
- // when <global_scale_factor> is not set. However, setting the
- // <global_scale_factor_> appropriately will result in the finest
- // resolution possible.
-
- static void hrtime_to_tv (ACE_Time_Value &tv,
- const ACE_hrtime_t hrt);
- // Converts an <hrt> to <tv> using global_scale_factor_.
-
-#if defined (linux)
- static ACE_UINT32 get_cpuinfo (void);
- // This is used to find out the Mhz of the machine for the scale
- // factor. If there are any problems getting it, we just return 1
- // (the default).
-#endif /* defined (linux) */
-
-private:
- static ACE_hrtime_t gettime (const ACE_OS::ACE_HRTimer_Op =
- ACE_OS::ACE_HRTIMER_GETTIME);
- // For internal use: gets the high-resolution time using
- // <ACE_OS::gethrtime>. Except on platforms that require that the
- // <global_scale_factor_> be set, such as ACE_WIN32, uses the
- // low-resolution clock if the <global_scale_factor_> has not been
- // set.
-
- ACE_hrtime_t start_;
- // Starting time.
-
- ACE_hrtime_t end_;
- // Ending time.
-
- ACE_hrtime_t total_;
- // Total elapsed time.
-
- ACE_hrtime_t start_incr_;
- // Start time of incremental timing.
-
- static ACE_UINT32 global_scale_factor_;
- // Converts ticks to microseconds. That is, ticks /
- // global_scale_factor_ == microseconds.
-
- static int global_scale_factor_status_;
- // Indicates the status of the global scale factor,
- // 0 = hasn't been set
- // 1 = been set
- // -1 = HR timer not supported
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/High_Res_Timer.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_HIGH_RES_TIMER_H */
diff --git a/ace/High_Res_Timer.i b/ace/High_Res_Timer.i
deleted file mode 100644
index add1f266fa2..00000000000
--- a/ace/High_Res_Timer.i
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE void
-ACE_High_Res_Timer::hrtime_to_tv (ACE_Time_Value &tv,
- const ACE_hrtime_t hrt)
-{
- // The following are based on the units of global_scale_factor_
- // being 1/microsecond. Therefore, dividing by it converts
- // clock ticks to microseconds.
- tv.sec ((long) (hrt / (ACE_UINT32) ACE_ONE_SECOND_IN_USECS /
- global_scale_factor ()));
-
- // Calculate usec in a manner that's compatible with ACE_U_LongLong.
- // hrt = (tv.sec * ACE_ONE_SECOND_IN_USECS + tv.usec) * global_scale_factor_
- // tv.usec = hrt / global_scale_factor_ - tv.sec * ACE_ONE_SECOND_IN_USECS
- // That first term will be lossy, so factor out global_scale_factor_:
- // tv.usec = (hrt - tv.sec * ACE_ONE_SECOND_IN_USECS * global_scale_factor_)/
- // global_scale_factor
- ACE_hrtime_t tmp = tv.sec ();
- tmp *= ((ACE_UINT32) ACE_ONE_SECOND_IN_USECS * global_scale_factor ());
- tv.usec ((long) ((hrt - tmp) / global_scale_factor ()));
-}
-
-
-ACE_INLINE ACE_Time_Value
-ACE_High_Res_Timer::gettimeofday (const ACE_OS::ACE_HRTimer_Op op)
-{
-#if defined (ACE_WIN32)
- // Get the global scale factor if there isn't one yet.
- if (ACE_High_Res_Timer::global_scale_factor_status_ == 0)
- ACE_High_Res_Timer::global_scale_factor ();
-
- // If there isn't a high-res timer, use gettimeofday ();
- if (ACE_High_Res_Timer::global_scale_factor_status_ == -1)
- return ACE_OS::gettimeofday ();
-#endif /* ACE_WIN32 */
-
- ACE_Time_Value tv;
- ACE_High_Res_Timer::hrtime_to_tv (tv,
- ACE_OS::gethrtime (op));
- return tv;
-}
-
-
-ACE_INLINE ACE_hrtime_t
-ACE_High_Res_Timer::gettime (const ACE_OS::ACE_HRTimer_Op op)
-{
-#if defined (ACE_WIN32)
- // Get the global scale factor if there isn't one yet.
- if (ACE_High_Res_Timer::global_scale_factor_status_ == 0)
- ACE_High_Res_Timer::global_scale_factor ();
-
- // If there isn't a high-res timer, use gettimeofday ();
- if (ACE_High_Res_Timer::global_scale_factor_status_ == -1)
- {
- ACE_Time_Value tv = ACE_OS::gettimeofday ();
- // Return the time in microseconds because the global_scale_factor_
- // is 1.
- return tv.sec () * ACE_ONE_SECOND_IN_USECS + tv.usec ();
- }
-#endif /* ACE_WIN32 */
-
- return ACE_OS::gethrtime (op);
-}
-
-ACE_INLINE
-ACE_High_Res_Timer::~ACE_High_Res_Timer (void)
-{
-}
-
-ACE_INLINE void
-ACE_High_Res_Timer::start (const ACE_OS::ACE_HRTimer_Op op)
-{
- ACE_TRACE ("ACE_High_Res_Timer::start");
- this->start_ = ACE_High_Res_Timer::gettime (op);
-}
-
-ACE_INLINE void
-ACE_High_Res_Timer::stop (const ACE_OS::ACE_HRTimer_Op op)
-{
- ACE_TRACE ("ACE_High_Res_Timer::stop");
- this->end_ = ACE_High_Res_Timer::gettime (op);
-}
-
-ACE_INLINE void
-ACE_High_Res_Timer::start_incr (const ACE_OS::ACE_HRTimer_Op op)
-{
- ACE_TRACE ("ACE_High_Res_Timer::start_incr");
- this->start_incr_ = ACE_High_Res_Timer::gettime (op);
-}
-
-ACE_INLINE void
-ACE_High_Res_Timer::stop_incr (const ACE_OS::ACE_HRTimer_Op op)
-{
- ACE_TRACE ("ACE_High_Res_Timer::stop_incr");
- this->total_ += ACE_High_Res_Timer::gettime (op) - this->start_incr_;
-}
-
-ACE_INLINE void
-ACE_High_Res_Timer::elapsed_microseconds (ACE_hrtime_t &usecs) const
-{
- usecs =
- (ACE_hrtime_t) ((this->end_ - this->start_) / global_scale_factor ());
-}
-
-ACE_INLINE void
-ACE_High_Res_Timer::global_scale_factor (ACE_UINT32 gsf)
-{
- global_scale_factor_ = gsf;
-}
diff --git a/ace/INET_Addr.cpp b/ace/INET_Addr.cpp
deleted file mode 100644
index 8f85baaced5..00000000000
--- a/ace/INET_Addr.cpp
+++ /dev/null
@@ -1,528 +0,0 @@
-// $Id$
-
-// Defines the Internet domain address family address format.
-
-#include "ace/INET_Addr.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/INET_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, INET_Addr, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_INET_Addr)
-
-// Transform the current address into string format.
-
-int
-ACE_INET_Addr::addr_to_string (ACE_TCHAR s[],
- size_t size,
- int ipaddr_format) const
-{
- ACE_TRACE ("ACE_INET_Addr::addr_to_string");
-
- size_t total_len = (ipaddr_format == 0 ?
- ACE_OS::strlen (this->get_host_name ()) :
- ACE_OS::strlen (this->get_host_addr ()))
- + ACE_OS::strlen ("65536") // Assume the max port number.
- + sizeof (':')
- + sizeof ('\0'); // For trailing '\0'.
-
- if (size < total_len)
- return -1;
- else
- {
- ACE_OS::sprintf (s,
- ACE_TEXT ("%s:%d"),
- (ipaddr_format == 0
- ? this->get_host_name ()
- : this->get_host_addr ()),
- this->get_port_number ());
- return 0;
- }
-}
-
-void
-ACE_INET_Addr::dump (void) const
-{
- ACE_TRACE ("ACE_INET_Addr::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_TCHAR s[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16];
- ACE_OS::sprintf (s, ACE_TEXT ("%s:%d"),
- this->get_host_addr (),
- this->get_port_number ());
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%s"), s));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Compare two addresses for inequality.
-
-int
-ACE_INET_Addr::operator != (const ACE_INET_Addr &sap) const
-{
- ACE_TRACE ("ACE_INET_Addr::operator !=");
- return !((*this) == sap);
-}
-
-// Compare two addresses for equality.
-
-int
-ACE_INET_Addr::operator == (const ACE_INET_Addr &sap) const
-{
- ACE_TRACE ("ACE_INET_Addr::operator ==");
-
- return this->inet_addr_.sin_port == sap.inet_addr_.sin_port
- && ACE_OS::memcmp ((void *) &this->inet_addr_.sin_addr,
- (void *) &sap.inet_addr_.sin_addr,
- sizeof (this->inet_addr_.sin_addr)) == 0;
-}
-
-ACE_INET_Addr::ACE_INET_Addr (void)
- : ACE_Addr (AF_INET, sizeof this->inet_addr_)
-{
- // ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
- (void) ACE_OS::memset ((void *) &this->inet_addr_,
- 0,
- sizeof this->inet_addr_);
-}
-
-int
-ACE_INET_Addr::set (const ACE_INET_Addr &sa)
-{
- ACE_TRACE ("ACE_INET_Addr::set");
-
- this->ACE_Addr::base_set (sa.get_type (),
- sa.get_size ());
-
- if (sa.get_type () == AF_ANY)
- // Ugh, this is really a base class, so don't copy it.
- (void) ACE_OS::memset ((void *) &this->inet_addr_,
- 0,
- sizeof this->inet_addr_);
- else
- // It's ok to make the copy.
- (void) ACE_OS::memcpy ((void *) &this->inet_addr_,
- (void *) &sa.inet_addr_,
- sizeof this->inet_addr_);
- return 0;
-}
-
-// Transform the string into the current addressing format.
-
-int
-ACE_INET_Addr::string_to_addr (const ACE_TCHAR s[])
-{
- ACE_TRACE ("ACE_INET_Addr::string_to_addr");
- int result;
- ACE_TCHAR *t;
-
- // Need to make a duplicate since we'll be overwriting the string.
- ACE_ALLOCATOR_RETURN (t,
- ACE_OS::strdup (s),
- -1);
- ACE_TCHAR *ip_addr = ACE_OS::strchr (t, ':');
-
- if (ip_addr == 0) // Assume it's a port number.
- {
- if (ACE_OS::strspn (t, ACE_TEXT ("1234567890"))
- == ACE_OS::strlen (t))
- { // port number
- u_short port = (u_short) ACE_OS::atoi (t);
- result = this->set (port,
- ACE_UINT32 (INADDR_ANY));
- }
- else // port name
- result = this->set (t,
- ACE_UINT32 (INADDR_ANY));
- }
- else
- {
- *ip_addr = '\0'; ++ip_addr; // skip over ':'
-
- if (ACE_OS::strspn (ip_addr,
- ACE_TEXT ("1234567890")) ==
- ACE_OS::strlen (ip_addr))
- {
- u_short port =
- (u_short) ACE_OS::atoi (ip_addr);
- result = this->set (port, t);
- }
- else
- result = this->set (ip_addr, t);
- }
-
- ACE_OS::free (ACE_MALLOC_T (t));
- return result;
-}
-
-int
-ACE_INET_Addr::set (const ACE_TCHAR address[])
-{
- ACE_TRACE ("ACE_INET_Addr::set");
- return this->string_to_addr (address);
-}
-
-ACE_INET_Addr::ACE_INET_Addr (const ACE_TCHAR address[])
- : ACE_Addr (AF_INET, sizeof this->inet_addr_)
-{
- ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
- this->set (address);
-}
-
-// Copy constructor.
-
-ACE_INET_Addr::ACE_INET_Addr (const ACE_INET_Addr &sa)
- : ACE_Addr (AF_INET, sizeof this->inet_addr_)
-{
- ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
- this->set (sa);
-}
-
-// Initializes a ACE_INET_Addr from a PORT_NUMBER and an Internet
-// address.
-
-int
-ACE_INET_Addr::set (u_short port_number,
- ACE_UINT32 inet_address,
- int encode)
-{
- ACE_TRACE ("ACE_INET_Addr::set");
- this->ACE_Addr::base_set (AF_INET, sizeof this->inet_addr_);
- (void) ACE_OS::memset ((void *) &this->inet_addr_,
- 0, sizeof this->inet_addr_);
- this->inet_addr_.sin_family = AF_INET;
-#if defined (ACE_HAS_SIN_LEN)
- this->inet_addr_.sin_len = sizeof this->inet_addr_;
-#endif /* ACE_HAS_SIN_LEN */
-
- if (encode)
- {
- inet_address = htonl (inet_address);
- this->inet_addr_.sin_port = htons (port_number);
- }
- else
- this->inet_addr_.sin_port = port_number;
-
- (void) ACE_OS::memcpy ((void *) &this->inet_addr_.sin_addr,
- (void *) &inet_address,
- sizeof this->inet_addr_.sin_addr);
- return 0;
-}
-
-// Initializes a ACE_INET_Addr from a PORT_NUMBER and the remote
-// HOST_NAME.
-
-int
-ACE_INET_Addr::set (u_short port_number,
- const ACE_TCHAR host_name[],
- int encode)
-{
- ACE_TRACE ("ACE_INET_Addr::set");
- ACE_UINT32 addr;
-
- this->ACE_Addr::base_set (AF_INET, sizeof this->inet_addr_);
- (void) ACE_OS::memset ((void *) &this->inet_addr_, 0, sizeof
- this->inet_addr_);
-
- // Yow, someone gave us a NULL host_name!
- if (host_name == 0)
- {
- errno = EINVAL;
- return -1;
- }
- else if (ACE_OS::inet_aton (host_name,
- (struct in_addr *) &addr) == 1)
- return this->set (port_number,
- encode ? ntohl (addr) : addr,
- encode);
- else
- {
-#if defined (VXWORKS) || defined (CHORUS)
- hostent *hp = ACE_OS::gethostbyname (host_name);
-#else
- hostent hentry;
- ACE_HOSTENT_DATA buf;
- int error;
-
- hostent *hp = ACE_OS::gethostbyname_r (host_name, &hentry,
- buf, &error);
-#endif /* VXWORKS */
-
- if (hp == 0)
- {
- errno = EINVAL;
- return -1;
- }
- else
- {
- (void) ACE_OS::memcpy ((void *) &addr,
- hp->h_addr,
- hp->h_length);
- return this->set (port_number,
- encode ? ntohl (addr) : addr,
- encode);
- }
- }
-}
-
-// Initializes a ACE_INET_Addr from a <port_name> and the remote
-// <host_name>.
-
-int
-ACE_INET_Addr::set (const ACE_TCHAR port_name[],
- const ACE_TCHAR host_name[],
- const ACE_TCHAR protocol[])
-{
- ACE_TRACE ("ACE_INET_Addr::set");
-
-#if defined (VXWORKS) || defined (CHORUS) || defined (ACE_LACKS_GETSERVBYNAME)
- ACE_UNUSED_ARG (port_name);
- ACE_UNUSED_ARG (host_name);
- ACE_UNUSED_ARG (protocol);
- ACE_NOTSUP_RETURN (-1);
-#else
- servent sentry;
- ACE_SERVENT_DATA buf;
-
- servent *sp = ACE_OS::getservbyname_r (port_name,
- protocol,
- &sentry,
- buf);
- if (sp == 0)
- return -1;
- else
- return this->set (sp->s_port, host_name, 0);
-#endif /* VXWORKS */
-}
-
-// Initializes a ACE_INET_Addr from a <port_name> and an Internet
-// address.
-
-int
-ACE_INET_Addr::set (const ACE_TCHAR port_name[],
- ACE_UINT32 inet_address,
- const ACE_TCHAR protocol[])
-{
- ACE_TRACE ("ACE_INET_Addr::set");
-
-#if defined (VXWORKS) || defined (CHORUS) || defined (ACE_LACKS_GETSERVBYNAME)
- ACE_UNUSED_ARG (port_name);
- ACE_UNUSED_ARG (inet_address);
- ACE_UNUSED_ARG (protocol);
- ACE_NOTSUP_RETURN (-1);
-#else
- servent sentry;
- ACE_SERVENT_DATA buf;
-
- servent *sp = ACE_OS::getservbyname_r (port_name,
- protocol,
- &sentry,
- buf);
- if (sp == 0)
- return -1;
- else
- return this->set (sp->s_port, inet_address, 0);
-#endif /* VXWORKS */
-}
-
-// Creates a ACE_INET_Addr from a PORT_NUMBER and the remote
-// HOST_NAME.
-
-
-ACE_INET_Addr::ACE_INET_Addr (u_short port_number,
- const ACE_TCHAR host_name[])
-{
- ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
- if (this->set (port_number,
- host_name) == -1)
-#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- ACE_ERROR ((LM_ERROR,
- (char *)"ACE_INET_Addr::ACE_INET_Addr: %p\n",
- (((char *) host_name == 0) ?
- ((char *) "<unknown>") :
- ((char *) (host_name)))));
-#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr: %p\n"),
- ((host_name == 0) ?
- (ACE_TEXT ("<unknown>")) :
- host_name)));
-#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
-}
-
-// Creates a ACE_INET_Addr from a sockaddr_in structure.
-
-int
-ACE_INET_Addr::set (const sockaddr_in *addr, int len)
-{
- ACE_TRACE ("ACE_INET_Addr::set");
- this->ACE_Addr::base_set (AF_INET, len);
- ACE_OS::memcpy ((void *) &this->inet_addr_,
- (void *) addr, len);
- return 0;
-}
-
-// Set a pointer to the address.
-void
-ACE_INET_Addr::set_addr (void *addr, int len)
-{
- ACE_TRACE ("ACE_INET_Addr::set_addr");
-
- this->ACE_Addr::base_set (AF_INET, len);
- ACE_OS::memcpy ((void *) &this->inet_addr_,
- (void *) addr, len);
-}
-
-// Creates a ACE_INET_Addr from a sockaddr_in structure.
-
-
-ACE_INET_Addr::ACE_INET_Addr (const sockaddr_in *addr, int len)
-{
- ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
- this->set (addr, len);
-}
-
-// Creates a ACE_INET_Addr from a PORT_NUMBER and an Internet address.
-
-
-ACE_INET_Addr::ACE_INET_Addr (u_short port_number,
- ACE_UINT32 inet_address)
-{
- ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
- if (this->set (port_number, inet_address) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr")));
-}
-
-// Creates a ACE_INET_Addr from a PORT_NAME and the remote
-// HOST_NAME.
-
-ACE_INET_Addr::ACE_INET_Addr (const ACE_TCHAR port_name[],
- const ACE_TCHAR host_name[],
- const ACE_TCHAR protocol[])
-{
- ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
- if (this->set (port_name,
- host_name,
- protocol) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr")));
-}
-
-// Creates a ACE_INET_Addr from a PORT_NAME and an Internet address.
-
-
-ACE_INET_Addr::ACE_INET_Addr (const ACE_TCHAR port_name[],
- ACE_UINT32 inet_address,
- const ACE_TCHAR protocol[])
-{
- ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
- if (this->set (port_name,
- inet_address,
- protocol) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr")));
-}
-
-int
-ACE_INET_Addr::get_host_name (ACE_TCHAR hostname[],
- size_t len) const
-{
- ACE_TRACE ("ACE_INET_Addr::get_host_name");
-
- if (this->inet_addr_.sin_addr.s_addr == INADDR_ANY)
- {
- if (ACE_OS::hostname (hostname, len) == -1)
- return -1;
- else
- return 0;
- }
- else
- {
-#if defined (VXWORKS)
- ACE_UNUSED_ARG (len);
- int error =
- ::hostGetByAddr ((int) this->inet_addr_.sin_addr.s_addr,
- hostname);
- if (error == OK)
- return 0;
- else
- {
- errno = error;
- return -1;
- }
-#else
-# if !defined(_UNICOS)
- int a_len = sizeof this->inet_addr_.sin_addr.s_addr;
-# else /* _UNICOS */
- int a_len = sizeof this->inet_addr_.sin_addr;
-# endif /* ! _UNICOS */
- int error = 0;
-
-#if defined (CHORUS)
- hostent *hp = ACE_OS::gethostbyaddr ((char *) &this->inet_addr_.sin_addr,
- a_len,
- this->addr_type_);
- if (hp == 0)
- error = errno; // So that the errno gets propagated back; it is
- // loaded from error below.
-#else
- hostent hentry;
- ACE_HOSTENT_DATA buf;
- hostent *hp =
- ACE_OS::gethostbyaddr_r (ACE_TEXT_CHAR_TO_TCHAR ((char *)&this->inet_addr_.sin_addr),
- a_len,
- this->addr_type_,
- &hentry,
- buf,
- &error);
-#endif /* CHORUS */
-
- if (hp == 0)
- {
- errno = error;
- return -1;
- }
-
- if (hp->h_name == 0)
- return -1;
-
- if (ACE_OS::strlen (hp->h_name) >= len)
- {
- errno = ENOSPC;
- return -1;
- }
-
- ACE_OS::strcpy (hostname, ACE_TEXT_CHAR_TO_TCHAR (hp->h_name));
- return 0;
-#endif /* VXWORKS */
- }
-}
-
-// Return the character representation of the hostname.
-
-const ACE_TCHAR *
-ACE_INET_Addr::get_host_name (void) const
-{
- ACE_TRACE ("ACE_INET_Addr::get_host_name");
-
- static ACE_TCHAR name[MAXHOSTNAMELEN + 1];
- if (this->get_host_name (name, MAXHOSTNAMELEN + 1) == -1)
- ACE_OS::strcpy (name, ACE_TEXT ("<unknown>"));
- return name;
-}
-
-void
-ACE_INET_Addr::set_port_number (u_short port_number,
- int encode)
-{
- ACE_TRACE ("ACE_INET_Addr::set_port_number");
-
- if (encode)
- port_number = htons (port_number);
-
- this->inet_addr_.sin_port = port_number;
-}
diff --git a/ace/INET_Addr.h b/ace/INET_Addr.h
deleted file mode 100644
index 1051f54a8d1..00000000000
--- a/ace/INET_Addr.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// INET_Addr.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_INET_ADDR_H
-#define ACE_INET_ADDR_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Addr.h"
-
-class ACE_Export ACE_INET_Addr : public ACE_Addr
-{
- // = TITLE
- // Defines a C++ wrapper facade for the Internet domain address
- // family format.
-public:
- // = Initialization methods.
- ACE_INET_Addr (void);
- // Default constructor.
-
- ACE_INET_Addr (const ACE_INET_Addr &);
- // Copy constructor.
-
- ACE_INET_Addr (const sockaddr_in *, int len);
- // Creates an <ACE_INET_Addr> from a sockaddr_in structure.
-
- ACE_INET_Addr (u_short port_number,
- const ACE_TCHAR host_name[]);
- // Creates an <ACE_INET_Addr> from a <port_number> and the remote
- // <host_name>.
-
- ACE_INET_Addr (const ACE_TCHAR address[]);
- // Initializes an <ACE_INET_Addr> from the <address>, which can be
- // "ip-number:port-number" (e.g., "tango.cs.wustl.edu:1234" or
- // "128.252.166.57:1234"). If there is no ':' in the <address> it
- // is assumed to be a port number, with the IP address being
- // INADDR_ANY.
-
- ACE_INET_Addr (u_short port_number,
- ACE_UINT32 ip_addr = INADDR_ANY);
- // Creates an <ACE_INET_Addr> from a <port_number> and an Internet
- // <ip_addr>. This method assumes that <port_number> and <ip_addr>
- // are in host byte order.
-
- ACE_INET_Addr (const ACE_TCHAR port_name[],
- const ACE_TCHAR host_name[],
- const ACE_TCHAR protocol[] = ACE_TEXT ("tcp"));
- // Uses <getservbyname> to create an <ACE_INET_Addr> from a
- // <port_name>, the remote <host_name>, and the <protocol>.
-
- ACE_INET_Addr (const ACE_TCHAR port_name[],
- ACE_UINT32 ip_addr,
- const ACE_TCHAR protocol[] = ACE_TEXT ("tcp"));
- // Uses <getservbyname> to create an <ACE_INET_Addr> from a
- // <port_name>, an Internet <ip_addr>, and the <protocol>. This
- // method assumes that <ip_addr> is in host byte order.
-
- ~ACE_INET_Addr (void);
- // Default dtor.
-
- // = Direct initialization methods.
-
- // These methods are useful after the object has been constructed.
-
- int set (const ACE_INET_Addr &);
- // Initializes from another <ACE_INET_Addr>.
-
- int set (u_short port_number,
- const ACE_TCHAR host_name[],
- int encode = 1);
- // Initializes an <ACE_INET_Addr> from a <port_number> and the
- // remote <host_name>. If <encode> is enabled then <port_number> is
- // converted into network byte order, otherwise it is assumed to be
- // in network byte order already and are passed straight through.
-
- int set (u_short port_number,
- ACE_UINT32 ip_addr = INADDR_ANY,
- int encode = 1);
- // Initializes an <ACE_INET_Addr> from a <port_number> and an
- // Internet <ip_addr>. If <encode> is enabled then <port_number>
- // and <ip_addr> are converted into network byte order, otherwise
- // they are assumed to be in network byte order already and are
- // passed straight through.
-
- int set (const ACE_TCHAR port_name[],
- const ACE_TCHAR host_name[],
- const ACE_TCHAR protocol[] = ACE_TEXT ("tcp"));
- // Uses <getservbyname> to initialize an <ACE_INET_Addr> from a
- // <port_name>, the remote <host_name>, and the <protocol>.
-
- int set (const ACE_TCHAR port_name[],
- ACE_UINT32 ip_addr,
- const ACE_TCHAR protocol[] = ACE_TEXT ("tcp"));
- // Uses <getservbyname> to initialize an <ACE_INET_Addr> from a
- // <port_name>, an <ip_addr>, and the <protocol>. This assumes that
- // <ip_addr> is already in network byte order.
-
- int set (const ACE_TCHAR addr[]);
- // Initializes an <ACE_INET_Addr> from the <addr>, which can be
- // "ip-number:port-number" (e.g., "tango.cs.wustl.edu:1234" or
- // "128.252.166.57:1234"). If there is no ':' in the <address> it
- // is assumed to be a port number, with the IP address being
- // INADDR_ANY.
-
- int set (const sockaddr_in *,
- int len);
- // Creates an <ACE_INET_Addr> from a sockaddr_in structure.
-
- virtual void *get_addr (void) const;
- // Return a pointer to the underlying network address.
-
- virtual void set_addr (void *, int len);
- // Set a pointer to the address.
-
- virtual int addr_to_string (ACE_TCHAR buffer[],
- size_t size,
- int ipaddr_format = 1) const;
- // Transform the current <ACE_INET_Addr> address into string format.
- // If <ipaddr_format> is non-0 this produces "ip-number:port-number"
- // (e.g., "128.252.166.57:1234"), whereas if <ipaddr_format> is 0
- // this produces "ip-name:port-number" (e.g.,
- // "tango.cs.wustl.edu:1234"). Returns -1 if the <size> of the
- // <buffer> is too small, else 0.
-
- virtual int string_to_addr (const ACE_TCHAR address[]);
- // Initializes an <ACE_INET_Addr> from the <address>, which can be
- // "ip-addr:port-number" (e.g., "tango.cs.wustl.edu:1234"),
- // "ip-addr:port-name" (e.g., "tango.cs.wustl.edu:telnet"),
- // "ip-number:port-number" (e.g., "128.252.166.57:1234"), or
- // "ip-number:port-name" (e.g., "128.252.166.57:telnet"). If there
- // is no ':' in the <address> it is assumed to be a port number,
- // with the IP address being INADDR_ANY.
-
- void set_port_number (u_short,
- int encode = 1);
- // Sets the port number without affecting the host name. If
- // <encode> is enabled then <port_number> is converted into network
- // byte order, otherwise it is assumed to be in network byte order
- // already and are passed straight through.
-
- u_short get_port_number (void) const;
- // Return the port number, converting it into host byte order.
-
- int get_host_name (ACE_TCHAR hostname[],
- size_t hostnamelen) const;
- // Return the character representation of the name of the host,
- // storing it in the <hostname> (which is assumed to be
- // <hostnamelen> bytes long). This version is reentrant.
-
- const ACE_TCHAR *get_host_name (void) const;
- // Return the character representation of the hostname (this version
- // is non-reentrant since it returns a pointer to a static data
- // area).
-
- const ACE_TCHAR *get_host_addr (void) const;
- // Return the "dotted decimal" Internet address.
-
- ACE_UINT32 get_ip_address (void) const;
- // Return the 4-byte IP address, converting it into host byte
- // order.
-
- int operator == (const ACE_INET_Addr &SAP) const;
- // Compare two addresses for equality. The addresses are considered
- // equal if they contain the same IP address and port number.
-
- int operator != (const ACE_INET_Addr &SAP) const;
- // Compare two addresses for inequality.
-
- virtual u_long hash (void) const;
- // Computes and returns hash value.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- sockaddr_in inet_addr_;
- // Underlying representation.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/INET_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_INET_ADDR_H */
diff --git a/ace/INET_Addr.i b/ace/INET_Addr.i
deleted file mode 100644
index cefbd932870..00000000000
--- a/ace/INET_Addr.i
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// INET_Addr.i
-
-// Default dtor.
-ACE_INLINE
-ACE_INET_Addr::~ACE_INET_Addr (void)
-{
-}
-
-// Return the port number, converting it into host byte order...
-
-ACE_INLINE u_short
-ACE_INET_Addr::get_port_number (void) const
-{
- ACE_TRACE ("ACE_INET_Addr::get_port_number");
- return ntohs (this->inet_addr_.sin_port);
-}
-
-// Return the address.
-
-ACE_INLINE void *
-ACE_INET_Addr::get_addr (void) const
-{
- ACE_TRACE ("ACE_INET_Addr::get_addr");
- return (void *) &this->inet_addr_;
-}
-
-// Return the dotted Internet address.
-
-ACE_INLINE const ACE_TCHAR *
-ACE_INET_Addr::get_host_addr (void) const
-{
- ACE_TRACE ("ACE_INET_Addr::get_host_addr");
- return ACE_OS::inet_ntoa (this->inet_addr_.sin_addr);
-}
-
-// Return the 4-byte IP address, converting it into host byte order.
-
-ACE_INLINE ACE_UINT32
-ACE_INET_Addr::get_ip_address (void) const
-{
- ACE_TRACE ("ACE_INET_Addr::get_ip_address");
- return ntohl (ACE_UINT32 (this->inet_addr_.sin_addr.s_addr));
-}
-
-ACE_INLINE u_long
-ACE_INET_Addr::hash (void) const
-{
- return this->get_ip_address () + this->get_port_number ();
-}
-
diff --git a/ace/IOStream.cpp b/ace/IOStream.cpp
deleted file mode 100644
index c024f85537f..00000000000
--- a/ace/IOStream.cpp
+++ /dev/null
@@ -1,658 +0,0 @@
-// $Id$
-
-#if !defined (ACE_IOSTREAM_C)
-#define ACE_IOSTREAM_C
-
-#include "ace/IOStream.h"
-
-ACE_RCSID(ace, IOStream, "$Id$")
-
-#if !defined (ACE_LACKS_ACE_IOSTREAM)
-
-///////////////////////////////////////////////////////////////////////////
-
-/* Here's a simple example of how iostream's non-virtual operators can
- get you in a mess:
-
- class myiostream : public iostream
- {
- public:
- myiostream& operator>> (String & s)
- {
- ...
- }
- };
-
- ...
-
- int i;
- String s;
- myiostream foo (...);
-
- foo >> s;
- // OK
- // invokes myiostream::operator>> (String&) returning myiostream&
-
- foo >> i;
- // OK
- // invokes iostream::operator>> (int&) returning iostream&
-
- foo >> i >> s;
- // BAD
- // invokes iostream::operator>> (int&) then iostream::operator>> (String&)
- //
- // What has happened is that the first >> is invoked on the base class and returns
- // a reference to iostream. The second >> has no idea of the ACE_IOStream and
- // gets invoked on iostream. Probably NOT what you wanted!
-
-
- // In order to make all of this work the way you want, you have to do this:
-
- class myiostream : public iostream
- {
- public:
- myiostream& operator>> (int & i)
- {
- return ((myiostream&)iostream::operator>> (i));
- }
-
- myiostream& operator>> (String & s)
- {
- ...
- }
- };
-
- ...
-
- int i;
- String s;
- myiostream foo (...);
-
- foo >> s;
- // OK
- // invokes myiostream::operator>> (String&) returning myiostream&
-
- foo >> i;
- // OK
- // invokes myiostream::operator>> (int&) returning myiostream&
-
-
- foo >> i >> s;
- // OK
- // Because you provided operator>> (int&) in class myiostream, that
- // function will be invoked by the first >>. Since it returns
- // a myiostream&, the second >> will be invoked as desired. */
-
-ACE_HANDLE
-ACE_Streambuf::get_handle (void)
-{
- return 0;
-}
-
-ACE_Time_Value *
-ACE_Streambuf::recv_timeout (ACE_Time_Value *tv)
-{
- ACE_Time_Value * rval = recv_timeout_;
- if (tv)
- {
- recv_timeout_value_ = *tv;
- recv_timeout_ = &recv_timeout_value_;
- }
- else
- recv_timeout_ = NULL;
-
- return rval;
-}
-
-int
-ACE_Streambuf::underflow (void)
-{
- // If input mode is not set, any attempt to read from the stream is
- // a failure.
-
- if (ACE_BIT_DISABLED (mode_, ios::in))
- return EOF;
-
- // If base () is empty then this is the first time any get/put
- // operation has been attempted on the stream.
-
- if (!this->base ())
- {
- // Set base () to use our private read buffer. The arguments are:
- // beginning of the buffer (base ())
- // one-beyond the end of the buffer (ebase ())
- // should base () be deleted on destruction
- //
- // We have to say "no" to the third parameter because we want to
- // explicitly handle deletion of the TWO buffers at destruction.
-
- setb (this->eback_saved_,
- this->eback_saved_ + streambuf_size_, 0);
-
- // Remember that we are now in getMode. This will help us if
- // we're called prior to a mode change as well as helping us
- // when the mode does change.
- this->cur_mode_ = this->get_mode_;
- // Using the new values for base (), initialize the get area.
- // This simply sets eback (), gptr () and egptr () described
- // earlier.
- setg (base (), base (), base ());
-
- // Set the put buffer such that puts will be disabled. Any
- // attempt to put data will now cause overflow to be invoked.
- setp (0, 0);
- }
- else // base () has been initialized already...
- {
- // If we are in put_mode_ now, then it is time to switch to get_mode_
- //
- // 1. get rid of any pending output
- // 2. rearrange base () to use our half of the buffer
- // 3. reset the mode
- //
- if (this->cur_mode_ == this->put_mode_)
- {
- // Dump any pending output to the peer. This is not really
- // necessary because of the dual-buffer arrangement we've
- // set up but intuitively it makes sense to send the pending
- // data before we request data since the peer will probably
- // need what we're sending before it can respond.
- if (out_waiting () && syncout () == EOF)
- return EOF;
-
- if( ! pbase() )
- {
- delete [] pbase_saved_;
- (void) reset_put_buffer();
- }
- else
- {
- // We're about to disable put mode but before we do
- // that, we want to preserve it's state.
- this->pbase_saved_ = pbase ();
- this->pptr_saved_ = pptr ();
- this->epptr_saved_ = epptr ();
- }
-
- // Disable put mode as described in the constructor.
- setp (0, 0);
-
- // Like the case where base () is false, we now point base
- // () to use our private get buffer.
- setb (this->eback_saved_,
- this->eback_saved_ + streambuf_size_,
- 0);
-
- // And restore the previous state of the get pointers.
-
- setg (this->eback_saved_, this->gptr_saved_,
- this->egptr_saved_);
-
- // Finally, set our mode so that we don't get back into this
- // if () and so that overflow can operate correctly.
- cur_mode_ = get_mode_;
- }
-
- // There could be data in the input buffer if we switched to put
- // mode before reading everything. In that case, we take this
- // opportunity to feed it back to the iostream.
- if (in_avail ())
- // Remember that we return an int so that we can give back
- // EOF. The explicit cast prevents us from returning a signed
- // char when we're not returning EOF.
- return (u_char) *gptr ();
- }
-
- // We really shouldn't be here unless there is a lack of data in the
- // read buffer. So... go get some more data from the peer.
-
- int result = fillbuf ();
-
- // Fillbuf will give us EOF if there was an error with the peer. In
- // that case, we can do no more input.
-
- if (EOF == result)
- {
- // Disable ourselves and return failure to the iostream. That
- // should result in a call to have oursleves closed.
- setg (0, 0, 0);
- return EOF;
- }
-
- // Return the next available character in the input buffer. Again,
- // we protect against sign extension.
-
- return (u_char) *gptr ();
-}
-
-// Much of this is similar to underflow. I'll just hit the highlights
-// rather than repeating a lot of what you've already seen.
-
-int
-ACE_Streambuf::overflow (int c)
-{
- // Check to see if output is allowed at all.
- if (! (mode_ & ios::out))
- return EOF;
-
- if (!base ())
- {
- // Set base () to use put's private buffer.
- //
- setb (this->pbase_saved_,
- this->pbase_saved_ + streambuf_size_, 0);
-
- // Set the mode for optimization.
- this->cur_mode_ = this->put_mode_;
- // Set the put area using the new base () values.
- setp (base (), ebuf ());
-
- // Disable the get area.
- setg (0, 0, 0);
- }
- else // We're already reading or writing
- {
- // If we're coming out of get mode...
- if (this->cur_mode_ == this->get_mode_)
- {
- // --> JCEJ 6/6/98
- if (! eback())
- {
- /* Something has happened to cause the streambuf
- to get rid of our get area.
- We could probably do this a bit cleaner but
- this method is sure to cleanup the bits and
- pieces.
- */
- delete [] eback_saved_;
- (void) reset_get_buffer();
- }
- else
- {
- // Save the current get mode values
- this->eback_saved_ = eback ();
- this->gptr_saved_ = gptr ();
- this->egptr_saved_ = egptr ();
- }
- // <-- JCEJ 6/6/98
-
- // then disable the get buffer
- setg (0, 0, 0);
-
- // Reconfigure base () and restore the put pointers.
- setb (pbase_saved_, pbase_saved_ + streambuf_size_, 0);
- setp (base (), ebuf ());
-
- // Save the new mode.
- this->cur_mode_ = this->put_mode_;
- }
-
- // If there is output to be flushed, do so now. We shouldn't
- // get here unless this is the case...
-
- if (out_waiting () && EOF == syncout ())
- return EOF;
- }
-
- // If we're not putting EOF, then we have to deal with the character
- // that is being put. Perhaps we should do something special with EOF???
-
- if (c != EOF)
- {
- // We've already written any data that may have been in the
- // buffer, so we're guaranteed to have room in the buffer for
- // this new information. So... we add it to the buffer and
- // adjust our 'next' pointer acordingly.
- *pptr () = (char) c;
- pbump (1);
- }
-
- return 0;
-}
-
-// syncin
-
-int
-ACE_Streambuf::syncin (void)
-{
- // As discussed, there really isn't any way to sync input from a
- // socket-like device. We specifially override this base-class
- // function so that it won't do anything evil to us.
- return 0;
-}
-
-// syncout
-
-int
-ACE_Streambuf::syncout (void)
-{
- // Unlike syncin, syncout is a doable thing. All we have to do is
- // write whatever is in the output buffer to the peer. flushbuf ()
- // is how we do it.
-
- if (flushbuf () == EOF)
- return EOF;
- else
- return 0;
-}
-
-int
-ACE_Streambuf::sync (void)
-{
- // sync () is fairly traditional in that it syncs both input and
- // output. We could have omitted the call to syncin () but someday,
- // we may want it to do something.
-
- syncin ();
-
- // Don't bother syncing the output unless there is data to be
- // sent...
-
- if (out_waiting ())
- return syncout ();
- else
- return 0;
-}
-
-// flushbuf
-
-int
-ACE_Streambuf::flushbuf (void)
-{
- // pptr () is one character beyond the last character put into the
- // buffer. pbase () points to the beginning of the put buffer.
- // Unless pptr () is greater than pbase () there is nothing to be
- // sent to the peer.
-
- if (pptr () <= pbase ())
- return 0;
-
- // 4/12/97 -- JCEJ
- // Kludge!!!
- // If the remote side shuts down the connection, an attempt to send
- // () to the remote will result in the message 'Broken Pipe' I think
- // this is an OS message, I've tracked it down to the ACE_OS::write
- // () function. That's the last one to be called before the
- // message. I can only test this on Linux though, so I don't know
- // how other systems will react.
- //
- // To get around this gracefully, I do a PEEK recv () with an
- // immediate (nearly) timeout. recv () is much more graceful on
- // it's failure. If we get -1 from recv () not due to timeout then
- // we know we're SOL.
- //
- // Q: Is 'errno' threadsafe? Should the section below be a
- // critical section?
- //
- // char tbuf[1];
- // ACE_Time_Value to (0,1);
- // if (this->recv (tbuf, 1, MSG_PEEK, &to) == -1)
- // {
- // if (errno != ETIME)
- // {
- // perror ("OOPS preparing to send to peer");
- // return EOF;
- // }
- // }
- //
- // The correct way to handle this is for the application to trap
- // (and ignore?) SIGPIPE. Thanks to Amos Shapira for reminding me
- // of this.
-
- // Starting at the beginning of the buffer, send as much data as
- // there is waiting. send guarantees that all of the data will be
- // sent or an error will be returned.
-
- if (this->send (pbase (), pptr () - pbase ()) == -1)
- return EOF;
-
- // Now that we've sent everything in the output buffer, we reset the
- // buffer pointers to appear empty.
- setp (base (), ebuf ());
-
- return 0;
-}
-
-int
-ACE_Streambuf::get_one_byte (void)
-{
- this->timeout_ = 0;
-
- // The recv function will return immediately if there is no data
- // waiting. So, we use recv_n to wait for exactly one byte to come
- // from the peer. Later, we can use recv to see if there is
- // anything else in the buffer. (Ok, we could use flags to tell it
- // to block but I like this better.)
-
- if (this->recv_n (base (), 1, MSG_PEEK, this->recv_timeout_) != 1)
- {
- if (errno == ETIME)
- this->timeout_ = 1;
- return EOF;
- }
- else
- return 1;
-}
-
-// This will be called when the read (get) buffer has been exhausted
-// (ie -- gptr == egptr).
-
-int
-ACE_Streambuf::fillbuf (void)
-{
- // Invoke recv_n to get exactly one byte from the remote. This will
- // block until something shows up.
-
- if (get_one_byte () == EOF)
- return EOF;
-
- // Now, get whatever else may be in the buffer. This will return if
- // there is nothing in the buffer.
-
- int bc = this->recv (base (), blen (), this->recv_timeout_);
-
- // recv will give us -1 if there was a problem. If there was
- // nothing waiting to be read, it will give us 0. That isn't an
- // error.
-
- if (bc < 0)
- {
- if (errno == ETIME)
- this->timeout_ = 1;
- return EOF;
- }
-
- // Move the get pointer to reflect the number of bytes we just read.
-
- setg (base (), base (), base () + bc);
-
- // Return the byte-read-count including the one from <get_one_byte>.
- return bc;
-}
-
-ACE_Streambuf::ACE_Streambuf (u_int streambuf_size, int io_mode)
- : eback_saved_ (0), // to avoid Purify UMR
- pbase_saved_ (0), // to avoid Purify UMR
- get_mode_ (1),
- put_mode_ (2),
- mode_ (io_mode),
- streambuf_size_ (streambuf_size),
- recv_timeout_ (NULL)
-{
- (void)reset_get_buffer ();
- (void)reset_put_buffer ();
-}
-
-u_int
-ACE_Streambuf::streambuf_size (void)
-{
- return streambuf_size_;
-}
-
-// Return the number of bytes not yet gotten. eback + get_waiting =
-// gptr.
-
-u_int
-ACE_Streambuf::get_waiting (void)
-{
- return this->gptr_saved_ - this->eback_saved_;
-}
-
-// Return the number of bytes in the get area (includes some already
-// gotten); eback + get_avail = egptr.
-
-u_int
-ACE_Streambuf::get_avail (void)
-{
- return this->egptr_saved_ - this->eback_saved_;
-}
-
-// Return the number of bytes to be 'put' onto the stream media.
-// pbase + put_avail = pptr.
-
-u_int
-ACE_Streambuf::put_avail (void)
-{
- return this->pptr_saved_ - this->pbase_saved_;
-}
-
-// Typical usage:
-//
-// u_int newGptr = otherStream->get_waiting ();
-// u_int newEgptr = otherStream->get_avail ();
-// char * newBuf = otherStream->reset_get_buffer ();
-// char * oldgetbuf = myStream->reset_get_buffer (newBuf, otherStream->streambuf_size (), newGptr, newEgptr);
-//
-// 'myStream' now has the get buffer of 'otherStream' and can use it in any way.
-// 'otherStream' now has a new, empty get buffer.
-
-char *
-ACE_Streambuf::reset_get_buffer (char *newBuffer,
- u_int _streambuf_size,
- u_int _gptr,
- u_int _egptr)
-{
- char * rval = this->eback_saved_;
-
- // The get area is where the iostream will get data from. This is
- // our read buffer. There are three pointers which describe the
- // read buffer:
- //
- // eback () - The beginning of the buffer. Also the furthest
- // point at which putbacks can be done. Hence the name.
- //
- // gptr () - Where the next character is to be got from.
- //
- // egptr () - One position beyond the last get-able character.
- //
- // So that we can switch quicky from read to write mode without
- // any data copying, we keep copies of these three pointers in
- // the variables below. Initially, they all point to the beginning
- // of our read-dedicated buffer.
- //
- if (newBuffer)
- {
- if (streambuf_size_ != _streambuf_size)
- return NULL;
- this->eback_saved_ = newBuffer;
- }
- else
- ACE_NEW_RETURN (this->eback_saved_,
- char[streambuf_size_],
- 0);
-
- this->gptr_saved_ = this->eback_saved_ + _gptr;
- this->egptr_saved_ = this->eback_saved_ + _egptr;
-
- // Disable the get area initially. This will cause underflow to be
- // invoked on the first get operation.
- setg (0, 0, 0);
-
- reset_base ();
-
- return rval;
-}
-
-// Typical usage:
-//
-// u_int newPptr = otherStream->put_avail ();
-// char * newBuf = otherStream->reset_put_buffer ();
-// char * oldputbuf = otherStream->reset_put_buffer (newBuf, otherStream->streambuf_size (), newPptr);
-
-char *
-ACE_Streambuf::reset_put_buffer (char *newBuffer,
- u_int _streambuf_size,
- u_int _pptr)
-{
- char *rval = this->pbase_saved_;
-
- // The put area is where the iostream will put data that needs to be
- // sent to the peer. This becomes our write buffer. The three
- // pointers which maintain this area are:
- //
- // pbase () - The beginning of the put area.
- //
- // pptr () - Where the next character is to be put.
- //
- // epptr () - One beyond the last valid position for putting.
- //
- // Again to switch quickly between modes, we keep copies of
- // these three pointers.
- //
- if (newBuffer)
- {
- if (streambuf_size_ != _streambuf_size)
- return NULL;
- this->pbase_saved_ = newBuffer;
- }
- else
- ACE_NEW_RETURN (this->pbase_saved_,
- char[streambuf_size_],
- 0);
-
- this->pptr_saved_ = this->pbase_saved_ + _pptr;
- this->epptr_saved_ = this->pbase_saved_ + streambuf_size_;
-
- // Disable the put area. Overflow will be called by the first call
- // to any put operator.
- setp (0, 0);
-
- reset_base ();
-
- return rval;
-}
-
-void
-ACE_Streambuf::reset_base (void)
-{
- // Until we experience the first get or put operation, we do not
- // know what our current IO mode is.
- this->cur_mode_ = 0;
-
- // The common area used for reading and writting is called "base".
- // We initialize it this way so that the first get/put operation
- // will have to "allocate" base. This allocation will set base to
- // the appropriate specific buffer and set the mode to the correct
- // value.
- setb (0, 0);
-}
-
-// If the default allocation strategey were used the common buffer
-// would be deleted when the object destructs. Since we are providing
-// separate read/write buffers, it is up to us to manage their memory.
-
-ACE_Streambuf::~ACE_Streambuf (void)
-{
- delete [] this->eback_saved_;
- delete [] this->pbase_saved_;
-}
-
-u_char ACE_Streambuf::timeout (void)
-{
- u_char rval = this->timeout_;
- this->timeout_ = 0;
- return rval;
-}
-
-#endif /* !ACE_LACKS_ACE_IOSTREAM */
-#endif /* ACE_IOSTREAM_C */
diff --git a/ace/IOStream.h b/ace/IOStream.h
deleted file mode 100644
index 61d97b796c4..00000000000
--- a/ace/IOStream.h
+++ /dev/null
@@ -1,499 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// IOStream.h
-//
-// = AUTHOR
-// James CE Johnson <jcej@lads.com> and Jim Crossley <jim@lads.com>
-//
-// ============================================================================
-
-#ifndef ACE_IOSTREAM_H
-#define ACE_IOSTREAM_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (ACE_LACKS_ACE_IOSTREAM)
-
-#include "ace/INET_Addr.h"
-#include "ace/Handle_Set.h"
-#include "ace/streams.h"
-
-#if defined (ACE_HAS_STRING_CLASS)
-#if defined (ACE_WIN32) && defined (_MSC_VER)
-typedef CString ACE_IOStream_String;
-#else
-#if !defined (ACE_HAS_STDCPP_STL_INCLUDES)
-#include /**/ <String.h>
-typedef String ACE_IOStream_String;
-#else
-#include /**/ <string>
-
-#if defined(ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
-typedef std::string ACE_IOStream_String;
-#else
-typedef string ACE_IOStream_String;
-#endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
-#endif /* ! ACE_HAS_STDCPP_STL_INCLUDES */
-#endif /* ACE_WIN32 && defined (_MSC_VER) */
-
-#if defined (__DECCXX_VER)
-# if __DECCXX_VER < 50700000
-# include /**/ <stl_macros>
-# else
-# include /**/ <stdcomp>
-# endif /* __DECCXX_VER < 50700000 */
-#endif /* __DECCXX_VER */
-
-class ACE_Export ACE_Quoted_String : public ACE_IOStream_String
-{
-public:
- inline ACE_Quoted_String (void) { *this = ""; }
- inline ACE_Quoted_String (const char *c) { *this = ACE_IOStream_String (c); }
- inline ACE_Quoted_String (const ACE_IOStream_String &s) { *this = s; }
- inline ACE_Quoted_String &operator= (const ACE_IOStream_String& s)
- {
- return (ACE_Quoted_String &) ACE_IOStream_String::operator= (s);
- }
- inline ACE_Quoted_String &operator = (const char c) {
- return (ACE_Quoted_String &) ACE_IOStream_String::operator= (c);
- }
- inline ACE_Quoted_String &operator = (const char *c) {
- return (ACE_Quoted_String &) ACE_IOStream_String::operator= (c);
- }
- inline int operator < (const ACE_Quoted_String &s) const {
- return *(ACE_IOStream_String *) this < (ACE_IOStream_String) s;
- }
-#if defined (ACE_WIN32) && defined (_MSC_VER)
- inline int length (void) { return this->GetLength (); }
-#endif /* ACE_WIN32 && defined (_MSC_VER) */
-};
-
-#endif /* ACE_HAS_STRING_CLASS */
-
-class ACE_Export ACE_Streambuf : public streambuf
-{
- // = TITLE
- // Create your custom streambuf by providing and ACE_*_Stream
- // object to this template. I have tested it with
- // ACE_SOCK_Stream and it should work fine for others as well.
- //
- // = DESCRIPTION
- // For any iostream object, the real work is done by the
- // underlying streambuf class. That is what we create here.
- //
- // A streambuf has an internal buffer area into which data is
- // read and written as the iostream requests and provides data.
- // At some point during the read process, the iostream will
- // realize that the streambuf has no more data. The underflow
- // function of the streambuf is then called.
- //
- // Likewise, during the write process, the iostream will
- // eventually notice that the streabuf's buffer has become full
- // and will invoke the overflow function.
- //
- // The empty/full state of the read/write "buffers" are
- // controled by two sets pointers. One set is dedicated to
- // read, the other to write. These pointers, in turn, reference
- // a common buffer that is to be shared by both read and write
- // operations. It is this common buffer to which data is
- // written and from which it is read.
- //
- // The common buffer is used by functions of the streambuf as
- // well as the iostream. Because of this and the fact that it
- // is "shared" by both read and write operators, there is a
- // danger of data corruption if read and write operations are
- // allowed to take place "at the same time".
- //
- // To prevent data corruption, we manipulate the read and write
- // pointer sets so that the streambuf is in either a read-mode
- // or write-mode at all times and can never be in both modes at
- // the same time.
- //
- // In the constructor: set the read and write sets to NULL This
- // causes the underflow or overflow operators to be invoked at
- // the first IO activity of the iostream.
- //
- // In the underflow function we arrange for the common buffer to
- // reference our read buffer and for the write pointer set to be
- // disabled. If a write operation is performed by the iostream
- // this will cause the overflow function to be invoked.
- //
- // In the overflow function we arrange for the common buffer to
- // reference our write buffer and for the read pointer set to be
- // disabled. This causes the underflow function to be invoked
- // when the iostream "changes our mode".
- //
- // The overflow function will also invoke the send_n function to
- // flush the buffered data to our peer. Similarly, the sync and
- // syncout functions will cause send_n to be invoked to send the
- // data.
- //
- // Since socket's and the like do not support seeking, there can
- // be no method for "syncing" the input. However, since we
- // maintain separate read/write buffers, no data is lost by
- // "syncing" the input. It simply remains buffered.
-public:
-
- virtual ~ACE_Streambuf (void);
- // If the default allocation strategey were used the common buffer
- // would be deleted when the object destructs. Since we are
- // providing separate read/write buffers, it is up to us to manage
- // their memory.
-
- ACE_Time_Value *recv_timeout (ACE_Time_Value *tv = NULL);
- // Get the current Time_Value pointer and provide a new one.
-
- char *reset_put_buffer (char *newBuffer = NULL,
- u_int _streambuf_size = 0,
- u_int _pptr = 0 );
- // Use this to allocate a new/different buffer for put operations.
- // If you do not provide a buffer pointer, one will be allocated.
- // That is the preferred method. If you do provide a buffer, the
- // size must match that being used by the get buffer. If
- // successful, you will receive a pointer to the current put buffer.
- // It is your responsibility to delete this memory when you are done
- // with it.
-
- u_int put_avail (void);
- // Return the number of bytes to be 'put' onto the stream media.
- // pbase + put_avail = pptr
-
- char *reset_get_buffer (char *newBuffer = NULL,
- u_int _streambuf_size = 0,
- u_int _gptr = 0,
- u_int _egptr = 0);
- // Use this to allocate a new/different buffer for get operations.
- // If you do not provide a buffer pointer, one will be allocated.
- // That is the preferred method. If you do provide a buffer, the
- // size must match that being used by the put buffer. If
- // successful, you will receive a pointer to the current get buffer.
- // It is your responsibility to delete this memory when you are done
- // with it.
-
- u_int get_waiting (void);
- // Return the number of bytes not yet gotten. eback + get_waiting =
- // gptr
-
- u_int get_avail (void);
- // Return the number of bytes in the get area (includes some already
- // gotten); eback + get_avail = egptr
-
- u_int streambuf_size (void);
- // Query the streambuf for the size of its buffers.
-
- u_char timeout (void);
- // Did we take an error because of an IO operation timeout? Note:
- // Invoking this resets the flag.
-
-protected:
- ACE_Streambuf (u_int streambuf_size,
- int io_mode);
-
- virtual int sync (void);
- // Sync both input and output. See syncin/syncout below for
- // descriptions.
-
- // = Signatures for the underflow/overflow discussed above.
- virtual int underflow (void);
-
- virtual int overflow (int = EOF);
- // The overflow function receives the character which caused the
- // overflow.
-
- void reset_base (void);
- // Resets the <base> pointer and streambuf mode. This is used
- // internally when get/put buffers are allocatd.
-
-protected:
- // = Two pointer sets for manipulating the read/write areas.
- char *eback_saved_;
- char *gptr_saved_;
- char *egptr_saved_;
- char *pbase_saved_;
- char *pptr_saved_;
- char *epptr_saved_;
-
- // = With cur_mode_ we keep track of our current IO mode.
-
- // This helps us to optimize the underflow/overflow functions.
- u_char cur_mode_;
- const u_char get_mode_;
- const u_char put_mode_;
-
- int mode_;
- // mode tells us if we're working for an istream, ostream, or
- // iostream.
-
- const u_int streambuf_size_;
- // This defines the size of the input and output buffers. It can be
- // set by the object constructor.
-
- u_char timeout_;
- // Did we take an error because of an IO operation timeout?
-
- ACE_Time_Value recv_timeout_value_;
- ACE_Time_Value *recv_timeout_;
- // We want to allow the user to provide Time_Value pointers to
- // prevent infinite blocking while waiting to receive data.
-
- int syncin (void);
- // syncin is called when the input needs to be synced with the
- // source file. In a filebuf, this results in the <seek> system
- // call being used. We can't do that on socket-like connections, so
- // this does basically nothing. That's safe because we have a
- // separate read buffer to maintain the already-read data. In a
- // filebuf, the single common buffer is used forcing the <seek>
- // call.
-
- int syncout (void);
- // syncout is called when the output needs to be flushed. This is
- // easily done by calling the peer's send_n function.
-
- int flushbuf (void);
- // flushbuf is the worker of syncout. It is a separate function
- // because it gets used sometimes in different context.
-
- int fillbuf (void);
- // fillbuf is called in a couple of places. This is the worker of
- // underflow. It will attempt to fill the read buffer from the
- // peer.
-
- virtual int get_one_byte (void);
- // Used by fillbuf and others to get exactly one byte from the peer.
- // recv_n is used to be sure we block until something is available.
- // It is virtual because we really need to override it for
- // datagram-derived objects.
-
- virtual ssize_t send (char *buf,
- ssize_t len) = 0;
- virtual ssize_t recv (char *buf,
- ssize_t len,
- ACE_Time_Value *tv = NULL) = 0;
- virtual ssize_t recv (char *buf,
- ssize_t len,
- int flags,
- ACE_Time_Value *tv = NULL) = 0;
- virtual ssize_t recv_n (char *buf,
- ssize_t len,
- int flags = 0,
- ACE_Time_Value *tv = NULL) = 0;
- // Stream connections and "unconnected connections" (ie --
- // datagrams) need to work just a little differently. We derive
- // custom Streambuf objects for them and provide these functions at
- // that time.
-
- virtual ACE_HANDLE get_handle (void);
-
-#if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0) && !defined (ACE_USES_OLD_IOSTREAMS)
- char *base (void) const
- {
- return cur_mode_ == get_mode_ ? eback_saved_
- : cur_mode_ == put_mode_ ? pbase_saved_
- : 0;
- }
- char *ebuf (void) const
- {
- return cur_mode_ == 0 ? 0 : base () + streambuf_size_;
- }
-
- int blen (void) const
- {
- return streambuf_size_;
- }
-
- void setb (char* b, char* eb, int /* a */=0)
- {
- setbuf (b, (eb - b));
- }
-
- int out_waiting (void)
- {
- return pptr () - pbase ();
- }
-#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
-};
-
-///////////////////////////////////////////////////////////////////////////
-
-// These typedefs are provided by G++ (on some systems?) without the
-// trailing '_'. Since we can't count on 'em, I've defined them to
-// what GNU wants here.
-//
-typedef ios& (*__manip_)(ios&);
-typedef istream& (*__imanip_)(istream&);
-typedef ostream& (*__omanip_)(ostream&);
-
-// Trying to do something like is shown below instead of using the
-// __*manip typedefs causes Linux do segfault when "<<endl" is done.
-//
-// virtual MT& operator<<(ios& (*func)(ios&)) { (*func)(*this); return *this; }
-
-// This macro defines the get operator for class MT into datatype DT.
-// We will use it below to quickly override most (all?) iostream get
-// operators. Notice how the <ipfx> and <isfx> functions are used.
-
-#define GET_SIG(MT,DT) inline virtual MT& operator>> (DT v)
-#if defined (__KCC)
-#define GET_CODE { \
- if (ipfx (0)) \
- { \
- (*((istream*)this)) >> (v); \
- } \
- isfx (); \
- return *this; \
- }
-#else
-#define GET_CODE { \
- if (ipfx (0)) \
- { \
- iostream::operator>> (v); \
- } \
- isfx (); \
- return *this; \
- }
-#endif /* __KCC */
-#define GET_PROT(MT,DT,CODE) GET_SIG(MT,DT) CODE
-#define GET_FUNC(MT,DT) GET_PROT(MT,DT,GET_CODE)
-
-// This macro defines the put operator for class MT into datatype DT.
-// We will use it below to quickly override most (all?) iostream put
-// operators. Notice how the <opfx> and <osfx> functions are used.
-
-#define PUT_SIG(MT,DT) inline virtual MT& operator<< (DT v)
-#if defined (__KCC)
-#define PUT_CODE { \
- if (opfx ()) \
- { \
- (*((ostream *) this)) << (v); \
- } \
- osfx (); \
- return *this; \
- }
-#else
-#define PUT_CODE { \
- if (opfx ()) \
- { \
- iostream::operator<< (v); \
- } \
- osfx (); \
- return *this; \
- }
-#endif /* __KCC */
-#define PUT_PROT(MT,DT,CODE) PUT_SIG(MT,DT) CODE
-#define PUT_FUNC(MT,DT) PUT_PROT(MT,DT,PUT_CODE)
-
-
-// These are necessary in case somebody wants to derive from us and
-// override one of these with a custom approach.
-
-#if defined (ACE_LACKS_CHAR_STAR_RIGHT_SHIFTS)
-#define GET_FUNC_SET0(MT,CODE,CODE2) \
- GET_PROT(MT,short &,CODE) \
- GET_PROT(MT,u_short &,CODE) \
- GET_PROT(MT,int &,CODE) \
- GET_PROT(MT,u_int &,CODE) \
- GET_PROT(MT,long &,CODE) \
- GET_PROT(MT,u_long &,CODE) \
- GET_PROT(MT,float &,CODE) \
- GET_PROT(MT,double &,CODE) \
- GET_PROT(MT,char &,CODE) \
- GET_PROT(MT,u_char &,CODE) \
- GET_PROT(MT,char *,CODE) \
- inline virtual MT& operator>>(__omanip_ func) CODE2 \
- inline virtual MT& operator>>(__manip_ func) CODE2
-#elif defined (ACE_LACKS_CHAR_RIGHT_SHIFTS)
-#define GET_FUNC_SET0(MT,CODE,CODE2) \
- GET_PROT(MT,short &,CODE) \
- GET_PROT(MT,u_short &,CODE) \
- GET_PROT(MT,int &,CODE) \
- GET_PROT(MT,u_int &,CODE) \
- GET_PROT(MT,long &,CODE) \
- GET_PROT(MT,u_long &,CODE) \
- GET_PROT(MT,float &,CODE) \
- GET_PROT(MT,double &,CODE) \
- inline virtual MT& operator>>(__omanip_ func) CODE2 \
- inline virtual MT& operator>>(__manip_ func) CODE2
-#else
-#define GET_FUNC_SET0(MT,CODE,CODE2) \
- GET_PROT(MT,short &,CODE) \
- GET_PROT(MT,u_short &,CODE) \
- GET_PROT(MT,int &,CODE) \
- GET_PROT(MT,u_int &,CODE) \
- GET_PROT(MT,long &,CODE) \
- GET_PROT(MT,u_long &,CODE) \
- GET_PROT(MT,float &,CODE) \
- GET_PROT(MT,double &,CODE) \
- GET_PROT(MT,char &,CODE) \
- GET_PROT(MT,u_char &,CODE) \
- GET_PROT(MT,char *,CODE) \
- GET_PROT(MT,u_char *,CODE) \
- inline virtual MT& operator>>(__omanip_ func) CODE2 \
- inline virtual MT& operator>>(__manip_ func) CODE2
-#endif
-
-#define PUT_FUNC_SET0(MT,CODE,CODE2) \
- PUT_PROT(MT,short,CODE) \
- PUT_PROT(MT,u_short,CODE) \
- PUT_PROT(MT,int,CODE) \
- PUT_PROT(MT,u_int,CODE) \
- PUT_PROT(MT,long,CODE) \
- PUT_PROT(MT,u_long,CODE) \
- PUT_PROT(MT,float,CODE) \
- PUT_PROT(MT,double,CODE) \
- PUT_PROT(MT,char,CODE) \
- PUT_PROT(MT,u_char,CODE) \
- PUT_PROT(MT,const char *,CODE) \
- PUT_PROT(MT,u_char *,CODE) \
- PUT_PROT(MT,void *,CODE) \
- inline virtual MT& operator<<(__omanip_ func) CODE2 \
- inline virtual MT& operator<<(__manip_ func) CODE2
-
-#if defined (ACE_LACKS_SIGNED_CHAR)
- #define GET_FUNC_SET1(MT,CODE,CODE2) GET_FUNC_SET0(MT,CODE,CODE2)
- #define PUT_FUNC_SET1(MT,CODE,CODE2) PUT_FUNC_SET0(MT,CODE,CODE2)
-#else
-#if defined (ACE_LACKS_CHAR_STAR_RIGHT_SHIFTS)
- #define GET_FUNC_SET1(MT,CODE,CODE2) \
- GET_PROT(MT,signed char &,CODE) \
- GET_FUNC_SET0(MT,CODE,CODE2)
-#else
- #define GET_FUNC_SET1(MT,CODE,CODE2) \
- GET_PROT(MT,signed char &,CODE) \
- GET_PROT(MT,signed char *,CODE) \
- GET_FUNC_SET0(MT,CODE,CODE2)
-#endif
-
- #define PUT_FUNC_SET1(MT,CODE,CODE2) \
- PUT_FUNC(MT,signed char) \
- PUT_FUNC(MT,const signed char *) \
- PUT_FUNC_SET0(MT,CODE,CODE2)
-#endif /* ACE_LACKS_SIGNED_CHAR */
-
-#define GET_MANIP_CODE { if (ipfx ()) { (*func) (*this); } isfx (); return *this; }
-#define PUT_MANIP_CODE { if (opfx ()) { (*func) (*this); } osfx (); return *this; }
-
-#define GET_FUNC_SET(MT) GET_FUNC_SET1(MT,GET_CODE,GET_MANIP_CODE)
-#define PUT_FUNC_SET(MT) PUT_FUNC_SET1(MT,PUT_CODE,PUT_MANIP_CODE)
-#define GETPUT_FUNC_SET(MT) GET_FUNC_SET(MT) PUT_FUNC_SET(MT)
-
-#define GET_SIG_SET(MT) GET_FUNC_SET1(MT,= 0;,= 0;)
-#define PUT_SIG_SET(MT) PUT_FUNC_SET1(MT,= 0;,= 0;)
-#define GETPUT_SIG_SET(MT) GET_SIG_SET(MT) PUT_SIG_SET(MT)
-
-// Include the templates here.
-#include "ace/IOStream_T.h"
-#endif /* !ACE_LACKS_ACE_IOSTREAM */
-#include "ace/post.h"
-#endif /* ACE_IOSTREAM_H */
diff --git a/ace/IOStream_T.cpp b/ace/IOStream_T.cpp
deleted file mode 100644
index 176f47afc17..00000000000
--- a/ace/IOStream_T.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-// $Id$
-
-#ifndef ACE_IOSTREAM_T_C
-#define ACE_IOSTREAM_T_C
-
-#include "ace/IOStream_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID(ace, IOStream_T, "$Id$")
-
-#if !defined (ACE_LACKS_ACE_IOSTREAM)
-
-#if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) && defined (__GNUG__)
-# if !defined (ACE_IOSTREAM_T_H)
- // _Only_ define this when compiling this .cpp file standalone, not
- // when instantiating templates. Its purpose is to provide something
- // for global constructors and destructors to be tied to. Without it,
- // they would be tied to the file(name). With Cygnus g++ 2.7.2/VxWorks,
- // that name is used directly in variable names in the munched ctor/dtor
- // file. That name contains a ".", so it's not a legal C variable name.
- // The root of all this trouble is a static instance (of Iostream_init)
- // declared in the iostream.h header file.
- int ACE_IOStream_global_of_builtin_type_to_avoid_munch_problems = 0;
-# endif /* ! ACE_IOSTREAM_T_H */
-#endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION && __GNUG__ */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/IOStream_T.i"
-#endif /* !__ACE_INLINE__ */
-
-// We will be given a STREAM by the iostream object which creates us.
-// See the ACE_IOStream template for how that works. Like other
-// streambuf objects, we can be input-only, output-only or both.
-
-template <class STREAM>
-ACE_Streambuf_T<STREAM>::ACE_Streambuf_T (STREAM *peer,
- u_int streambuf_size,
- int io_mode)
- : ACE_Streambuf (streambuf_size, io_mode),
- peer_ (peer)
-{
- // A streambuf allows for unbuffered IO where every character is
- // read as requested and written as provided. To me, this seems
- // terribly inefficient for socket-type operations, so I've disabled
- // it. All of the work would be done by the underflow/overflow
- // functions anyway and I haven't implemented anything there to
- // support unbuffered IO.
-
-#if !defined (ACE_LACKS_UNBUFFERED_STREAMBUF)
- this->unbuffered (0);
-#endif /* ! ACE_LACKS_UNBUFFERED_STREAMBUF */
-
- // Linebuffered is similar to unbuffered. Again, I don't have any
- // need for this and I don't see the advantage. I believe this
- // would have to be supported by underflow/overflow to be effective.
-#if !defined (ACE_LACKS_LINEBUFFERED_STREAMBUF)
- this->linebuffered (0);
-#endif /* ! ACE_LACKS_LINEBUFFERED_STREAMBUF */
-}
-
-// The typical constructor. This will initiailze your STREAM and then
-// setup the iostream baseclass to use a custom streambuf based on
-// STREAM.
-
-template <class STREAM>
-ACE_IOStream<STREAM>::ACE_IOStream (STREAM &stream,
- u_int streambuf_size)
- : iostream (0),
- STREAM (stream)
-{
- ACE_NEW (streambuf_,
- ACE_Streambuf_T<STREAM> ((STREAM *) this,
- streambuf_size));
- iostream::init (this->streambuf_);
-}
-
-template <class STREAM>
-ACE_IOStream<STREAM>::ACE_IOStream (u_int streambuf_size)
- : iostream (0)
-{
- ACE_NEW (this->streambuf_,
- ACE_Streambuf_T<STREAM> ((STREAM *) this,
- streambuf_size));
- iostream::init (this->streambuf_);
-}
-
-// We have to get rid of the streambuf_ ourselves since we gave it to
-// iostream ()
-
-template <class STREAM>
-ACE_IOStream<STREAM>::~ACE_IOStream (void)
-{
- delete this->streambuf_;
-}
-
-// The only ambituity in the multiple inheritance is the close ()
-// function.
-
-template <class STREAM> int
-ACE_IOStream<STREAM>::close (void)
-{
- return STREAM::close ();
-}
-
-template <class STREAM> ACE_IOStream<STREAM> &
-ACE_IOStream<STREAM>::operator>> (ACE_Time_Value *&tv)
-{
- ACE_Time_Value *old_tv = this->streambuf_->recv_timeout (tv);
- tv = old_tv;
- return *this;
-}
-
-#if defined (ACE_HAS_STRING_CLASS)
-
-// A simple string operator. The base iostream has 'em for char* but
-// that isn't always the best thing for a String. If we don't provide
-// our own here, we may not get what we want.
-
-template <class STREAM> ACE_IOStream<STREAM> &
-ACE_IOStream<STREAM>::operator>> (ACE_IOStream_String &v)
-{
- if (ipfx0 ())
- {
- char c;
- this->get (c);
-
- for (v = c;
- this->get (c) && !isspace (c);
- v += c)
- continue;
- }
-
- isfx ();
-
- return *this;
-}
-
-template <class STREAM> ACE_IOStream<STREAM> &
-ACE_IOStream<STREAM>::operator<< (ACE_IOStream_String &v)
-{
- if (opfx ())
- {
-#if defined (ACE_WIN32) && defined (_MSC_VER)
- for (int i = 0; i < v.GetLength (); ++i)
-#else
- for (u_int i = 0; i < (u_int) v.length (); ++i)
-#endif /* ACE_WIN32 && defined (_MSC_VER) */
- this->put (v[i]);
- }
-
- osfx ();
-
- return *this;
-}
-
-// A more clever put operator for strings that knows how to deal with
-// quoted strings containing back-quoted quotes.
-
-template <class STREAM> STREAM &
-operator>> (STREAM &stream,
- ACE_Quoted_String &str)
-{
- char c;
-
- if (!(stream >> c)) // eat space up to the first char
- // stream.set (ios::eofbit|ios::failbit);
- return stream;
-
- str = ""; // Initialize the string
-
- // if we don't have a quote, append until we see space
- if (c != '"')
- for (str = c; stream.get (c) && !isspace (c); str += c)
- continue;
- else
- for (; stream.get (c) && c != '"'; str += c)
- if (c == '\\')
- {
- stream.get (c);
- if (c != '"')
- str += '\\';
- }
-
- return stream;
-}
-
-template <class STREAM> STREAM &
-operator<< (STREAM &stream,
- ACE_Quoted_String &str)
-{
- stream.put ('"');
-
- for (u_int i = 0; i < str.length (); ++i)
- {
- if (str[i] == '"')
- stream.put ('\\');
- stream.put (str[i]);
- }
-
- stream.put ('"');
-
- return stream;
-}
-
-#endif /* ACE_HAS_STRING_CLASS */
-#endif /* ACE_LACKS_ACE_IOSTREAM */
-#endif /* ACE_IOSTREAM_T_C */
diff --git a/ace/IOStream_T.h b/ace/IOStream_T.h
deleted file mode 100644
index 2ca1d8ba50a..00000000000
--- a/ace/IOStream_T.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// IOStream_T.h
-//
-// = AUTHOR
-// James CE Johnson <jcej@lads.com> and Jim Crossley <jim@lads.com>
-//
-// = NOTE
-// This file should not be #included directly by application code.
-// Instead, it should #include "ace/IOStream.h". That's because
-// we only put some conditional compilations in that file.
-//
-// ============================================================================
-
-#ifndef ACE_IOSTREAM_T_H
-#define ACE_IOSTREAM_T_H
-#include "ace/pre.h"
-
-#include "ace/IOStream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (ACE_LACKS_ACE_IOSTREAM)
-
-#if defined (ACE_HAS_STRING_CLASS)
-template <class STREAM> STREAM & operator>> (STREAM &stream, ACE_Quoted_String &str);
-template <class STREAM> STREAM & operator<< (STREAM &stream, ACE_Quoted_String &str);
-#endif /* defined (ACE_HAS_STRING_CLASS) */
-
-template <class STREAM>
-class ACE_Streambuf_T : public ACE_Streambuf
-{
-public:
- ACE_Streambuf_T (STREAM *peer,
- u_int streambuf_size = ACE_STREAMBUF_SIZE,
- int io_mode = ios::in | ios::out);
- // We will be given a STREAM by the iostream object which creates
- // us. See the ACE_IOStream template for how that works. Like
- // other streambuf objects, we can be input-only, output-only or
- // both.
-
- virtual ssize_t send (char *buf, ssize_t len);
-
- virtual ssize_t recv (char *buf,
- ssize_t len,
- ACE_Time_Value *tv = NULL);
-
- virtual ssize_t recv (char *buf,
- ssize_t len,
- int flags,
- ACE_Time_Value * tv = NULL);
-
- virtual ssize_t recv_n (char *buf,
- ssize_t len,
- int flags = 0,
- ACE_Time_Value *tv = NULL);
-
-protected:
- virtual ACE_HANDLE get_handle (void);
-
- STREAM *peer_;
- // This will be our ACE_SOCK_Stream or similar object.
-};
-
-template <class STREAM>
-class ACE_IOStream : public iostream, public STREAM
-{
- // = TITLE
- // A template adapter for creating an iostream-like object using
- // an ACE IPC Stream for the actual I/O. Iostreams use an
- // underlying streambuf object for the IO interface. The
- // iostream class and derivatives provide you with a host of
- // convenient operators that access the streambuf.
- //
- // = DESCRIPTION
- // We inherit all characteristics of iostream and your <STREAM>
- // class. When you create a new class from this template, you
- // can use it anywhere you would have used your original
- // <STREAM> class.
- //
- // To create an iostream for your favorite ACE IPC class (e.g.,
- // <ACE_SOCK_Stream>), feed that class to this template's
- // <STREAM> parameter, e.g.,
- //
- // typedef ACE_Svc_Handler<ACE_SOCK_iostream,
- // ACE_INET_Addr, ACE_NULL_SYNCH>
- // Service_Handler;
- //
- // Because the operators in the iostream class are not virtual,
- // you cannot easily provide overloads in your custom
- // ACE_IOStream classes. To make these things work correctly,
- // you need to overload ALL operators of the ACE_IOStream you
- // create. I've attempted to do that here to make things easier
- // for you but there are no guarantees.
- //
- // In the iostream.cpp file is an example of why it is necessary
- // to overload all of the get/put operators when you want to
- // customize only one or two.
-public:
- // = Initialization and termination methods.
- ACE_IOStream (STREAM &stream,
- u_int streambuf_size = ACE_STREAMBUF_SIZE);
-
- ACE_IOStream (u_int streambuf_size = ACE_STREAMBUF_SIZE);
- // The default constructor. This will initiailze your STREAM and
- // then setup the iostream baseclass to use a custom streambuf based
- // on STREAM.
-
- virtual ~ACE_IOStream (void);
- // We have to get rid of the <streambuf_> ourselves since we gave it
- // to the <iostream> base class;
-
- virtual int close (void);
- // The only ambituity in the multiple inheritance is the <close>
- // function.
-
- int eof (void) const;
- // Returns 1 if we're at the end of the <STREAM>, i.e., if the
- // connection has closed down or an error has occurred, else 0.
- // Under the covers, <eof> calls the streambuf's <timeout> function
- // which will reset the timeout flag. As as result, you should save
- // the return of <eof> and check it instead of calling <eof>
- // successively.
-
-#if defined (ACE_HAS_STRING_CLASS)
- virtual ACE_IOStream<STREAM> &operator>> (ACE_IOStream_String &v);
- // A simple string operator. The base <iostream> has them for char*
- // but that isn't always the best thing for a <String>. If we don't
- // provide our own here, we may not get what we want.
-
- virtual ACE_IOStream<STREAM> &operator<< (ACE_IOStream_String &v);
- // The converse of the <String::put> operator.
-
-#endif /* ACE_HAS_STRING_CLASS */
- // = Using the macros to provide get/set operators.
- GETPUT_FUNC_SET (ACE_IOStream<STREAM>)
-
-#if defined (ACE_LACKS_IOSTREAM_FX)
- virtual int ipfx (int noskip = 0)
- {
- if (good ())
- {
- if (tie () != 0)
- tie ()->flush ();
- if (!noskip && flags () & skipws)
- {
- int ch;
- while (isspace (ch = rdbuf ()->sbumpc ()))
- continue;
- if (ch != EOF)
- rdbuf ()->sputbackc (ch);
- }
- if (good ())
- return 1;
- }
-#if !defined (ACE_WIN32)
- // MS VC++ 5.0 doesn't declare setstate.
- setstate (failbit);
-#endif /* !ACE_WIN32 */
- return (0);
- }
- virtual int ipfx0 (void) { return ipfx (0); } // Optimized ipfx(0)
- virtual int ipfx1 (void) // Optimized ipfx(1)
- {
- if (good ())
- {
- if (tie () != 0)
- tie ()->flush ();
- if (good ())
- return 1;
- }
-#if !defined (ACE_WIN32)
- // MS VC++ 5.0 doesn't declare setstate.
- setstate (failbit);
-#endif /* !ACE_WIN32 */
- return (0);
- }
- virtual void isfx (void) { return; }
- virtual int opfx (void)
- {
- if (good () && tie () != 0)
- tie ()->flush ();
- return good ();
- }
- virtual void osfx (void) { if (flags () & unitbuf) flush (); }
-#else
-#if defined (__GNUC__)
- virtual int ipfx0 (void) { return iostream::ipfx0 (); } // Optimized ipfx(0)
- virtual int ipfx1 (void) { return iostream::ipfx1 (); } // Optimized ipfx(1)
-#else
- virtual int ipfx0 (void) { return iostream::ipfx (0); }
- virtual int ipfx1 (void) { return iostream::ipfx (1); }
-#endif /* __GNUC__ */
- virtual int ipfx (int need = 0) { return iostream::ipfx (need); }
- virtual void isfx (void) { iostream::isfx (); }
- virtual int opfx (void) { return iostream::opfx (); }
- virtual void osfx (void) { iostream::osfx (); }
-#endif /* ACE_LACKS_IOSTREAM_FX */
-
- ACE_IOStream<STREAM> & operator>> (ACE_Time_Value *&tv);
- // Allow the programmer to provide a timeout for read operations.
- // Give it a pointer to NULL to block forever.
-
-protected:
- ACE_Streambuf_T<STREAM> *streambuf_;
- // This is where all of the action takes place. The streambuf_ is
- // the interface to the underlying STREAM.
-
-private:
- // = Private methods.
-
- // We move these into the private section so that they cannot be
- // used by the application programmer. This is necessary because
- // streambuf_ will be buffering IO on the STREAM object. If these
- // functions were used in your program, there is a danger of getting
- // the datastream out of sync.
- ACE_UNIMPLEMENTED_FUNC (ssize_t send (...))
- ACE_UNIMPLEMENTED_FUNC (ssize_t recv (...))
- ACE_UNIMPLEMENTED_FUNC (ssize_t send_n (...))
- ACE_UNIMPLEMENTED_FUNC (ssize_t recv_n (...))
-};
-
-template <class STREAM>
-class ACE_SOCK_Dgram_SC : public STREAM
-{
- // = TITLE
- // "Dgram_SC" is short for "Datagram Self-Contained."
- //
- // = DESCRIPTION
- // Datagrams don't have the notion of a "peer". Each send and
- // receive on a datagram can go to a different peer if you want.
- // If you're using datagrams for stream activity, you probably
- // want 'em all to go to (and come from) the same place. That's
- // what this class is for. Here, we keep an address object so
- // that we can remember who last sent us data. When we write
- // back, we're then able to write back to that same address.
-public:
- ACE_SOCK_Dgram_SC (void);
- ACE_SOCK_Dgram_SC (STREAM &source,
- ACE_INET_Addr &dest);
- ssize_t send_n (char *buf, ssize_t len);
- ssize_t recv (char *buf,
- ssize_t len,
- ACE_Time_Value *tv = NULL);
- ssize_t recv (char *buf,
- ssize_t len,
- int flags,
- ACE_Time_Value *tv = NULL);
- ssize_t recv_n (char *buf,
- ssize_t len,
- int flags = 0,
- ACE_Time_Value *tv = NULL);
- int get_remote_addr (ACE_INET_Addr &addr) const;
-
-protected:
- ACE_INET_Addr peer_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/IOStream_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/IOStream_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("IOStream_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-#endif /* ACE_LACKS_ACE_IOSTREAM */
-#include "ace/post.h"
-#endif /* ACE_IOSTREAM_T_H */
diff --git a/ace/IOStream_T.i b/ace/IOStream_T.i
deleted file mode 100644
index c145eb52cc3..00000000000
--- a/ace/IOStream_T.i
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-template <class STREAM> ssize_t
-ACE_Streambuf_T<STREAM>::send (char *buf, ssize_t len)
-{
- return peer_->send_n (buf,len);
-}
-
-template <class STREAM> ssize_t
-ACE_Streambuf_T<STREAM>::recv (char *buf,
- ssize_t len,
- ACE_Time_Value *tv)
-{
- return this->recv (buf, len, 0, tv);
-}
-
-template <class STREAM> ssize_t
-ACE_Streambuf_T<STREAM>::recv (char *buf,
- ssize_t len,
- int flags,
- ACE_Time_Value * tv)
-{
- this->timeout_ = 0;
- errno = ESUCCESS;
- ssize_t rval = peer_->recv (buf, len, flags, tv);
- if (errno == ETIME)
- this->timeout_ = 1;
- return rval;
-}
-
-template <class STREAM> ssize_t
-ACE_Streambuf_T<STREAM>::recv_n (char *buf,
- ssize_t len,
- int flags,
- ACE_Time_Value *tv)
-{
- this->timeout_ = 0;
- errno = ESUCCESS;
- ssize_t rval = peer_->recv_n (buf, len, flags, tv);
- if (errno == ETIME)
- this->timeout_ = 1;
- return rval;
-}
-
-template <class STREAM> ACE_HANDLE
-ACE_Streambuf_T<STREAM>::get_handle (void)
-{
- return peer_ ? peer_->get_handle () : 0;
-}
-
-template <class STREAM> ACE_INLINE int
-ACE_IOStream<STREAM>::eof (void) const
-{
- // Get the timeout value of the streambuf
- ACE_Time_Value *timeout = this->streambuf_->recv_timeout (0);
-
- // Reset the timeout value of the streambuf.
- (void) this->streambuf_->recv_timeout (timeout);
-
- char c;
- int rval = this->streambuf_->recv_n (&c,
- sizeof c,
- MSG_PEEK,
- timeout);
-
- // Timeout, not an eof
- if (this->streambuf_->timeout())
- return 0;
-
- // No timeout, got enough data: not eof
- if (rval == sizeof(char))
- return 0;
-
- // No timeout, not enough data: definately eof
- return 1;
-}
-
-template <class STREAM> ACE_INLINE
-ACE_SOCK_Dgram_SC<STREAM>::ACE_SOCK_Dgram_SC (void)
-{
-}
-
-template <class STREAM> ACE_INLINE
-ACE_SOCK_Dgram_SC<STREAM>::ACE_SOCK_Dgram_SC (STREAM &source,
- ACE_INET_Addr &dest)
- : STREAM (source),
- peer_ (dest)
-{
-}
-
-template <class STREAM> ACE_INLINE ssize_t
-ACE_SOCK_Dgram_SC<STREAM>::send_n (char *buf,
- ssize_t len)
-{
- return STREAM::send (buf, len, peer_);
-}
-
-template <class STREAM> ACE_INLINE ssize_t
-ACE_SOCK_Dgram_SC<STREAM>::recv (char *buf,
- ssize_t len,
- ACE_Time_Value *tv)
-{
- return recv (buf, len, 0, tv);
-}
-
-template <class STREAM> ACE_INLINE ssize_t
-ACE_SOCK_Dgram_SC<STREAM>::recv (char *buf,
- ssize_t len,
- int flags,
- ACE_Time_Value *tv)
-{
- if (tv != 0)
- {
- ACE_HANDLE handle = this->get_handle ();
- ACE_Handle_Set handle_set;
-
- handle_set.set_bit (handle);
-
- switch (ACE_OS::select (int (handle) + 1,
- (fd_set *) handle_set, // read_fds.
- (fd_set *) 0, // write_fds.
- (fd_set *) 0, // exception_fds.
- tv))
- {
- case 0:
- errno = ETIME;
- case -1:
- return -1;
- default:
- ; // Do the 'recv' below
- }
- }
-
- int rval = STREAM::recv (buf, len, peer_, flags);
-#if defined (ACE_WIN32)
- if (rval == SOCKET_ERROR)
- if (::WSAGetLastError () == WSAEMSGSIZE)
- if (ACE_BIT_ENABLED (flags, MSG_PEEK))
- rval = len;
-#endif /* ACE_WIN32 */
- return rval < len ? rval : len;
-}
-
-template <class STREAM> ACE_INLINE ssize_t
-ACE_SOCK_Dgram_SC<STREAM>::recv_n (char *buf,
- ssize_t len,
- int flags,
- ACE_Time_Value *tv)
-{
- int rval = this->recv (buf, len, flags, tv);
- return rval;
-}
-
-template <class STREAM> ACE_INLINE int
-ACE_SOCK_Dgram_SC<STREAM>::get_remote_addr (ACE_INET_Addr &addr) const
-{
- addr = peer_;
- return 0;
-}
diff --git a/ace/IO_Cntl_Msg.cpp b/ace/IO_Cntl_Msg.cpp
deleted file mode 100644
index aa8281f63d4..00000000000
--- a/ace/IO_Cntl_Msg.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// IO_Cntl_Msg.cpp
-// $Id$
-
-#if 0
-// This is not meant to be used, it's just a place holder...
-
-ACE_RCSID(ace, IO_Cntl_Msg, "$Id$")
-
-// Forward decl
-template <class SYNCH> class ACE_Module;
-
-
-class ACE_Module_Link
-{
- // = TITLE
- // Data structure used to link two modules together
- //
- // = DESCRIPTION
- //
-public:
- ACE_Module_Link (ACE_Module *m1, ACE_Module *m2): mod_upper_ (m1), mod_lower_ (m2), count_ (0) {}
-
- ACE_Module *upper (void) { return this->mod_upper_; }
- void upper (ACE_Module *u) { this->mod_upper_ = u; }
-
- ACE_Module *lower (void) { return this->mod_lower_; }
- void lower (ACE_Module *l) { this->mod_lower_ = l; }
-
- int count (void) { return this->count_; }
- void count (int c) { this->count_ = c; }
-
-private:
- ACE_Module *mod_upper_;
- ACE_Module *mod_lower_;
- int count_;
-};
-#endif
-
diff --git a/ace/IO_Cntl_Msg.h b/ace/IO_Cntl_Msg.h
deleted file mode 100644
index 5e00425ea66..00000000000
--- a/ace/IO_Cntl_Msg.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// IO_Cntl_Msg.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_IO_CNTL_MSG_H
-#define ACE_IO_CNTL_MSG_H
-#include "ace/pre.h"
-
-class ACE_Export ACE_IO_Cntl_Msg
-{
- // = TITLE
- // Data format for IOCTL messages
-public:
- enum ACE_IO_Cntl_Cmds
- {
- SET_LWM = 1, // Set the low water mark.
- GET_LWM = 2, // Get the low water mark.
- SET_HWM = 3, // Set the high water mark.
- GET_HWM = 4, // Get the high water mark.
- MOD_LINK = 5, // Link modules
- MOD_UNLINK = 6 // Unlink modules
- };
-
- // = Initialization method.
- ACE_IO_Cntl_Msg (ACE_IO_Cntl_Cmds c) { this->cmd_ = c; }
- // Initialize the control message.
-
- // = Get/set methods
-
- ACE_IO_Cntl_Cmds cmd (void) { return this->cmd_; }
- // Get command.
-
- void cmd (ACE_IO_Cntl_Cmds c) { this->cmd_ = c; }
- // Set command.
-
- size_t count (void) { return this->count_; }
- // Get count.
-
- void count (size_t c) { this->count_ = c; }
- // Set count.
-
- int error (void) { return this->error_; }
- // Get error.
-
- void error (int e) { this->error_ = e; }
- // Set error.
-
- int rval (void) { return this->rval_; }
- // Get return value.
-
- void rval (int r) { this->rval_ = r; }
- // Set return value.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_IO_Cntl_Cmds cmd_;
- // Command.
-
- size_t count_;
- // Count.
-
- int error_;
- // Error.
-
- int rval_;
- // Return value
-};
-
-#include "ace/post.h"
-#endif /* ACE_IO_CNTL_MSG_H */
diff --git a/ace/IO_SAP.cpp b/ace/IO_SAP.cpp
deleted file mode 100644
index a49f5145444..00000000000
--- a/ace/IO_SAP.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-// IO_SAP.cpp
-// $Id$
-
-#include "ace/IO_SAP.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/IO_SAP.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-ACE_RCSID(ace, IO_SAP, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_IO_SAP)
-
-// This is the do-nothing constructor. It does not perform a
-// ACE_OS::open system call.
-
-ACE_IO_SAP::ACE_IO_SAP (void)
- : handle_ (ACE_INVALID_HANDLE)
-{
- ACE_TRACE ("ACE_IO_SAP::ACE_IO_SAP");
-}
-
-void
-ACE_IO_SAP::dump (void) const
-{
- ACE_TRACE ("ACE_IO_SAP::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("handle_ = %d"), this->handle_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\npid_ = %d"), this->pid_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Cache for the process ID.
-pid_t ACE_IO_SAP::pid_ = 0;
-
-int
-ACE_IO_SAP::enable (int value) const
-{
- ACE_TRACE ("ACE_IO_SAP::enable");
- /* First-time in initialization. */
- if (ACE_IO_SAP::pid_ == 0)
- ACE_IO_SAP::pid_ = ACE_OS::getpid ();
-
-#if !defined(ACE_WIN32) && !defined (VXWORKS)
-
- switch (value)
- {
-#if defined (SIGURG)
- case SIGURG:
- case ACE_SIGURG:
-#if defined (F_SETOWN)
- return ACE_OS::fcntl (this->handle_,
- F_SETOWN,
- ACE_IO_SAP::pid_);
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* F_SETOWN */
-#endif /* SIGURG */
-#if defined (SIGIO)
- case SIGIO:
- case ACE_SIGIO:
-#if defined (F_SETOWN) && defined (FASYNC)
- if (ACE_OS::fcntl (this->handle_,
- F_SETOWN,
- ACE_IO_SAP::pid_) == -1
- || ACE::set_flags (this->handle_,
- FASYNC) == -1)
- return -1;
- break;
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* F_SETOWN && FASYNC */
-#else // <==
- ACE_NOTSUP_RETURN (-1);
-#endif /* SIGIO <== */
- case ACE_NONBLOCK:
- if (ACE::set_flags (this->handle_,
- ACE_NONBLOCK) == -1)
- return -1;
- break;
- default:
- return -1;
- }
-#else
- ACE_UNUSED_ARG (value);
-#endif /* !ACE_WIN32 */
-
- return 0;
-}
-
-int
-ACE_IO_SAP::disable (int value) const
-{
- ACE_TRACE ("ACE_IO_SAP::disable");
-
-#if !defined(ACE_WIN32) && !defined (VXWORKS)
- switch (value)
- {
-#if defined (SIGURG)
- case SIGURG:
- case ACE_SIGURG:
-#if defined (F_SETOWN)
- if (ACE_OS::fcntl (this->handle_,
- F_SETOWN, 0) == -1)
- return -1;
- break;
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* F_SETOWN */
-#endif /* SIGURG */
-#if defined (SIGIO)
- case SIGIO:
- case ACE_SIGIO:
-#if defined (F_SETOWN) && defined (FASYNC)
- if (ACE_OS::fcntl (this->handle_,
- F_SETOWN,
- 0) == -1
- || ACE::clr_flags (this->handle_, FASYNC) == -1)
- return -1;
- break;
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* F_SETOWN && FASYNC */
-#else // <==
- ACE_NOTSUP_RETURN (-1);
-#endif /* SIGIO <== */
- case ACE_NONBLOCK:
- if (ACE::clr_flags (this->handle_,
- ACE_NONBLOCK) == -1)
- return -1;
- break;
- default:
- return -1;
- }
- return 0;
-#else
- ACE_UNUSED_ARG (value);
- ACE_NOTSUP_RETURN (-1);
-#endif /* !ACE_WIN32 */
-}
diff --git a/ace/IO_SAP.h b/ace/IO_SAP.h
deleted file mode 100644
index 6f41465ebfb..00000000000
--- a/ace/IO_SAP.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// IO_SAP.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_IO_SAP_H
-#define ACE_IO_SAP_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_IO_SAP
-{
- // = TITLE
- // Defines the methods for the base class of the <ACE_IO_SAP>
- // abstraction, which includes <ACE_FILE> and <ACE_DEV>.
-public:
- enum
- {
- INVALID_HANDLE = -1 // Be consistent with Winsock
- };
-
- ~ACE_IO_SAP (void);
- // Default dtor.
-
- int control (int cmd, void *) const;
- // Interface for ioctl.
-
- // = Common I/O handle options related to files.
-
- int enable (int value) const;
- // Enable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG),
- // non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC),
- // which is passed as the <value>.
-
- int disable (int value) const;
- // Disable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG),
- // non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC),
- // which is passed as the <value>.
-
- ACE_HANDLE get_handle (void) const;
- // Get the underlying handle.
-
- void set_handle (ACE_HANDLE handle);
- // Set the underlying handle.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_IO_SAP (void);
- // Ensure that ACE_IO_SAP is an abstract base class.
-
-private:
- ACE_HANDLE handle_;
- // Underlying I/O handle.
-
- static pid_t pid_;
- // Cache the process ID.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/IO_SAP.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_IO_SAP_H */
diff --git a/ace/IO_SAP.i b/ace/IO_SAP.i
deleted file mode 100644
index 5bb805d48f4..00000000000
--- a/ace/IO_SAP.i
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// IO_SAP.i
-
-ASYS_INLINE
-ACE_IO_SAP::~ACE_IO_SAP (void)
-{
- ACE_TRACE ("ACE_IO_SAP::~ACE_IO_SAP");
-}
-
-// Used to return the underlying handle_.
-
-ASYS_INLINE ACE_HANDLE
-ACE_IO_SAP::get_handle (void) const
-{
- ACE_TRACE ("ACE_IO_SAP::get_handle");
- return this->handle_;
-}
-
-// Used to set the underlying handle_.
-
-ASYS_INLINE void
-ACE_IO_SAP::set_handle (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_IO_SAP::set_handle");
- this->handle_ = handle;
-}
-
-// Provides access to the ACE_OS::ioctl system call.
-
-ASYS_INLINE int
-ACE_IO_SAP::control (int cmd, void *arg) const
-{
- ACE_TRACE ("ACE_IO_SAP::control");
- return ACE_OS::ioctl (this->handle_, cmd, arg);
-}
-
-
diff --git a/ace/IPC_SAP.cpp b/ace/IPC_SAP.cpp
deleted file mode 100644
index 5ca6c520d85..00000000000
--- a/ace/IPC_SAP.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-// $Id$
-
-#include "ace/IPC_SAP.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/IPC_SAP.i"
-#endif
-
-ACE_RCSID(ace, IPC_SAP, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_IPC_SAP)
-
-void
-ACE_IPC_SAP::dump (void) const
-{
- ACE_TRACE ("ACE_IPC_SAP::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("handle_ = %d"), this->handle_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\npid_ = %d"), this->pid_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Cache for the process ID.
-pid_t ACE_IPC_SAP::pid_ = 0;
-
-// This is the do-nothing constructor. It does not perform a
-// ACE_OS::socket system call.
-
-ACE_IPC_SAP::ACE_IPC_SAP (void)
- : handle_ (ACE_INVALID_HANDLE)
-{
- // ACE_TRACE ("ACE_IPC_SAP::ACE_IPC_SAP");
-}
-
-int
-ACE_IPC_SAP::enable (int value) const
-{
- ACE_TRACE ("ACE_IPC_SAP::enable");
-
- // First-time in initialization.
- if (ACE_IPC_SAP::pid_ == 0)
- ACE_IPC_SAP::pid_ = ACE_OS::getpid ();
-
-#if defined (ACE_WIN32) || defined (VXWORKS)
- switch (value)
- {
- case ACE_NONBLOCK:
- {
- // nonblocking argument (1)
- // blocking: (0)
- u_long nonblock = 1;
- return ACE_OS::ioctl (this->handle_,
- FIONBIO,
- &nonblock);
- }
- default:
- ACE_NOTSUP_RETURN (-1);
- }
-#else /* ! ACE_WIN32 && ! VXWORKS */
- switch (value)
- {
-#if defined (SIGURG)
- case SIGURG:
- case ACE_SIGURG:
-#if defined (F_SETOWN)
- return ACE_OS::fcntl (this->handle_,
- F_SETOWN,
- ACE_IPC_SAP::pid_);
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* F_SETOWN */
-#endif /* SIGURG */
-#if defined (SIGIO)
- case SIGIO:
- case ACE_SIGIO:
-#if defined (F_SETOWN) && defined (FASYNC)
- if (ACE_OS::fcntl (this->handle_,
- F_SETOWN,
- ACE_IPC_SAP::pid_) == -1
- || ACE::set_flags (this->handle_,
- FASYNC) == -1)
- return -1;
- break;
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* F_SETOWN && FASYNC */
-#endif /* SIGIO <== */
-#if defined (F_SETFD)
- case ACE_CLOEXEC:
- // Enables the close-on-exec flag.
- if (ACE_OS::fcntl (this->handle_,
- F_SETFD,
- 1) == -1)
- return -1;
- break;
-#endif /* F_SETFD */
- case ACE_NONBLOCK:
- if (ACE::set_flags (this->handle_,
- ACE_NONBLOCK) == ACE_INVALID_HANDLE)
- return -1;
- break;
- default:
- return -1;
- }
- return 0;
-#endif /* ! ACE_WIN32 && ! VXWORKS */
-
- /* NOTREACHED */
-}
-
-int
-ACE_IPC_SAP::disable (int value) const
-{
- ACE_TRACE ("ACE_IPC_SAP::disable");
-
-#if defined (ACE_WIN32) || defined (VXWORKS)
- switch (value)
- {
- case ACE_NONBLOCK:
- // nonblocking argument (1)
- // blocking: (0)
- {
- u_long nonblock = 0;
- return ACE_OS::ioctl (this->handle_,
- FIONBIO,
- &nonblock);
- }
- default:
- ACE_NOTSUP_RETURN (-1);
- }
-#else /* ! ACE_WIN32 && ! VXWORKS */
- switch (value)
- {
-#if defined (SIGURG)
- case SIGURG:
- case ACE_SIGURG:
-#if defined (F_SETOWN)
- return ACE_OS::fcntl (this->handle_,
- F_SETOWN,
- 0);
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* F_SETOWN */
-#endif /* SIGURG */
-#if defined (SIGIO)
- case SIGIO:
- case ACE_SIGIO:
-#if defined (F_SETOWN) && defined (FASYNC)
- if (ACE_OS::fcntl (this->handle_,
- F_SETOWN,
- 0) == -1
- || ACE::clr_flags (this->handle_,
- FASYNC) == -1)
- return -1;
- break;
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* F_SETOWN && FASYNC */
-#endif /* SIGIO <== */
-#if defined (F_SETFD)
- case ACE_CLOEXEC:
- // Disables the close-on-exec flag.
- if (ACE_OS::fcntl (this->handle_,
- F_SETFD,
- 0) == -1)
- return -1;
- break;
-#endif /* F_SETFD */
- case ACE_NONBLOCK:
- if (ACE::clr_flags (this->handle_,
- ACE_NONBLOCK) == -1)
- return -1;
- break;
- default:
- return -1;
- }
- return 0;
-#endif /* ! ACE_WIN32 && ! VXWORKS */
- /* NOTREACHED */
-}
diff --git a/ace/IPC_SAP.h b/ace/IPC_SAP.h
deleted file mode 100644
index 910dfe1c7e1..00000000000
--- a/ace/IPC_SAP.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// IPC_SAP.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_IPC_SAP_H
-#define ACE_IPC_SAP_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_IPC_SAP
-{
- // = TITLE
- // Defines the member functions for the base class of the
- // ACE_IPC_SAP abstraction.
-public:
- ~ACE_IPC_SAP (void);
- // Default dtor.
-
- int control (int cmd, void *) const;
- // Interface for ioctl.
-
- // = Common I/O handle options related to sockets.
-
- int enable (int value) const;
- // Enable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG),
- // non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC),
- // which is passed as the <value>.
-
- int disable (int value) const;
- // Disable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG),
- // non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC),
- // which is passed as the <value>.
-
- ACE_HANDLE get_handle (void) const;
- // Get the underlying handle.
-
- void set_handle (ACE_HANDLE handle);
- // Set the underlying handle.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Ensure that ACE_IPC_SAP is an abstract base class.
- ACE_IPC_SAP (void);
- // Default constructor.
-
-private:
- ACE_HANDLE handle_;
- // Underlying I/O handle.
-
- static pid_t pid_;
- // Cache the process ID.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/IPC_SAP.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_IPC_SAP_H */
diff --git a/ace/IPC_SAP.i b/ace/IPC_SAP.i
deleted file mode 100644
index 63ccc967711..00000000000
--- a/ace/IPC_SAP.i
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// IPC_SAP.i
-
-// Used to return the underlying handle_.
-
-ASYS_INLINE
-ACE_IPC_SAP::~ACE_IPC_SAP (void)
-{
- // ACE_TRACE ("ACE_IPC_SAP::~ACE_IPC_SAP");
-}
-
-ASYS_INLINE ACE_HANDLE
-ACE_IPC_SAP::get_handle (void) const
-{
- ACE_TRACE ("ACE_IPC_SAP::get_handle");
- return this->handle_;
-}
-
-// Used to set the underlying handle_.
-
-ASYS_INLINE void
-ACE_IPC_SAP::set_handle (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_IPC_SAP::set_handle");
- this->handle_ = handle;
-}
-
-// Provides access to the ACE_OS::ioctl system call.
-
-ASYS_INLINE int
-ACE_IPC_SAP::control (int cmd, void *arg) const
-{
- ACE_TRACE ("ACE_IPC_SAP::control");
- return ACE_OS::ioctl (this->handle_, cmd, arg);
-}
diff --git a/ace/LOCK_SOCK_Acceptor.cpp b/ace/LOCK_SOCK_Acceptor.cpp
deleted file mode 100644
index 931216750ae..00000000000
--- a/ace/LOCK_SOCK_Acceptor.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// $Id$
-
-#ifndef ACE_LOCK_SOCK_ACCEPTOR_CPP
-#define ACE_LOCK_SOCK_ACCEPTOR_CPP
-
-#include "ace/Synch.h"
-#include "ace/LOCK_SOCK_Acceptor.h"
-
-ACE_RCSID(ace, LOCK_SOCK_Acceptor, "$Id$")
-
-template <class ACE_LOCK> int
-ACE_LOCK_SOCK_Acceptor<ACE_LOCK>::accept (ACE_SOCK_Stream &stream,
- ACE_Addr *remote_address,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle) const
-{
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->lock_, -1);
-
- return ACE_SOCK_Acceptor::accept (stream,
- remote_address,
- timeout,
- restart,
- reset_new_handle);
-}
-
-template <class ACE_LOCK> ACE_LOCK &
-ACE_LOCK_SOCK_Acceptor<ACE_LOCK>::lock (void)
-{
- return this->lock_;
-}
-
-#endif /* ACE_LOCK_SOCK_ACCEPTOR_CPP */
diff --git a/ace/LOCK_SOCK_Acceptor.h b/ace/LOCK_SOCK_Acceptor.h
deleted file mode 100644
index eaa16fc4e49..00000000000
--- a/ace/LOCK_SOCK_Acceptor.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// LOCK_SOCK_Acceptor.h
-//
-// = AUTHOR
-// James Hu and Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_LOCK_SOCK_ACCEPTOR_H
-#define ACE_LOCK_SOCK_ACCEPTOR_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Acceptor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class ACE_LOCK>
-class ACE_LOCK_SOCK_Acceptor : public ACE_SOCK_Acceptor
-{
- // = TITLE
- // Specialize <ACE_SOCK_Acceptor> to lock around <accept>;
- //
- // = DESCRIPTION
- // This class is necessary since some OS platforms (e.g.,
- // Solaris 2.5) do not allow multiple threads/processes to
- // simultaneously call <accept> on the same listen-mode
- // port/socket. Thus, we need to protect against multiple
- // concurrent accesses by using the appropriate type of lock.
-public:
- int accept (ACE_SOCK_Stream &new_stream,
- ACE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0) const;
- // Accept the connection under the control of the <ACE_LOCK>.
-
- ACE_LOCK &lock (void);
- // Return a reference to the lock.
-
-protected:
- ACE_LOCK lock_;
- // Type of locking mechanism.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/LOCK_SOCK_Acceptor.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("LOCK_SOCK_Acceptor.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_LOCK_SOCK_ACCEPTOR_H */
diff --git a/ace/LSOCK.cpp b/ace/LSOCK.cpp
deleted file mode 100644
index a83e7e86a77..00000000000
--- a/ace/LSOCK.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-// $Id$
-
-#include "ace/LSOCK.h"
-
-ACE_RCSID(ace, LSOCK, "$Id$")
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LSOCK.i"
-#endif
-
-ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK)
-
-void
-ACE_LSOCK::dump (void) const
-{
- ACE_TRACE ("ACE_LSOCK::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("aux_handle_ = %d"), this->aux_handle_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_MSG)
-// This routine sends an open file descriptor to <this->handle_>.
-
-int
-ACE_LSOCK::send_handle (const ACE_HANDLE handle) const
-{
- ACE_TRACE ("ACE_LSOCK::send_handle");
- unsigned char a[2];
- iovec iov;
- msghdr send_msg;
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- char cmsgbuf[ACE_BSD_CONTROL_MSG_LEN];
- cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf;
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
- a[0] = 0xab;
- a[1] = 0xcd;
- iov.iov_base = (char *) a;
- iov.iov_len = sizeof a;
- send_msg.msg_iov = &iov;
- send_msg.msg_iovlen = 1;
- send_msg.msg_name = 0;
- send_msg.msg_namelen = 0;
-
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- cmsgptr->cmsg_level = SOL_SOCKET;
- cmsgptr->cmsg_type = SCM_RIGHTS;
- cmsgptr->cmsg_len = sizeof cmsgbuf;
- send_msg.msg_control = cmsgbuf;
- send_msg.msg_controllen = sizeof cmsgbuf;
- *(ACE_HANDLE *) CMSG_DATA (cmsgptr) = handle;
- send_msg.msg_flags = 0;
-#else
- send_msg.msg_accrights = (char *) &handle;
- send_msg.msg_accrightslen = sizeof handle;
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
- return ACE_OS::sendmsg (this->get_handle (), &send_msg, 0);
-}
-
-// This file receives an open file descriptor from <this->handle_>.
-// Note, this routine returns -1 if problems occur, 0 if we recv a
-// message that does not have file descriptor in it, and 1 otherwise.
-
-int
-ACE_LSOCK::recv_handle (ACE_HANDLE &handle, char *pbuf, int *len) const
-{
- ACE_TRACE ("ACE_LSOCK::recv_handle");
- unsigned char a[2];
- iovec iov;
- msghdr recv_msg;
-
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- char cmsgbuf[ACE_BSD_CONTROL_MSG_LEN];
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
- if (pbuf != 0 && len != 0)
- {
- iov.iov_base = pbuf;
- iov.iov_len = *len;
- }
- else
- {
- iov.iov_base = (char *) a;
- iov.iov_len = sizeof a;
- }
-
- recv_msg.msg_iov = &iov;
- recv_msg.msg_iovlen = 1;
- recv_msg.msg_name = 0;
- recv_msg.msg_namelen = 0;
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- recv_msg.msg_control = cmsgbuf;
- recv_msg.msg_controllen = sizeof cmsgbuf;
-#else
- recv_msg.msg_accrights = (char *) &handle;
- recv_msg.msg_accrightslen = sizeof handle;
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
-#if defined (ACE_HAS_STREAMS)
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- ACE_UNUSED_ARG (handle);
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
- ssize_t nbytes = ACE_OS::recvmsg (this->get_handle (), &recv_msg, 0);
-
- if (nbytes != ACE_INVALID_HANDLE)
- {
- if (len != 0)
- *len = nbytes;
-
- if (nbytes == sizeof a
- && ((unsigned char *) iov.iov_base)[0] == 0xab
- && ((unsigned char *) iov.iov_base)[1] == 0xcd)
- return 1;
- else
- return 0;
- }
-#else
- ssize_t nbytes = ACE_OS::recvmsg (this->get_handle (),
- &recv_msg,
- MSG_PEEK);
-
- if (nbytes != ACE_INVALID_HANDLE)
- {
- if (nbytes == sizeof a
- && ((unsigned char *) iov.iov_base)[0] == 0xab
- && ((unsigned char *) iov.iov_base)[1] == 0xcd)
- {
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- // Close down the socket that was returned by the MSG_PEEK.
- ACE_OS::closesocket (*(ACE_HANDLE *) CMSG_DATA ((cmsghdr *) cmsgbuf));
- recv_msg.msg_control = cmsgbuf;
- recv_msg.msg_controllen = sizeof cmsgbuf;
-#else
- recv_msg.msg_accrights = (char *) &handle;
- recv_msg.msg_accrightslen = sizeof handle;
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
- if (ACE_OS::recvmsg (this->get_handle (),
- &recv_msg, 0) == ACE_INVALID_HANDLE)
- return ACE_INVALID_HANDLE;
- else
- {
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf;
- handle = *(ACE_HANDLE *) CMSG_DATA (cmsgptr) ;
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
- return 1;
- }
- }
- else
- {
- if (len != 0)
- *len = nbytes;
- return 0;
- }
- }
-#endif /* ACE_HAS_STREAMS */
- else
- return ACE_INVALID_HANDLE;
-}
-#endif /* ACE_HAS_MSG */
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
diff --git a/ace/LSOCK.h b/ace/LSOCK.h
deleted file mode 100644
index bdbc3003d47..00000000000
--- a/ace/LSOCK.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// LSOCK.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_LOCAL_SOCK_H
-#define ACE_LOCAL_SOCK_H
-#include "ace/pre.h"
-
-#include "ace/SOCK.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-class ACE_Export ACE_LSOCK
-{
- // = TITLE
- // Create a Local ACE_SOCK, which is used for passing file
- // descriptors.
-public:
-#if defined (ACE_HAS_MSG)
- int send_handle (const ACE_HANDLE handle) const;
- // Send an open FD to another process.
-
- int recv_handle (ACE_HANDLE &handles,
- char *pbuf = 0,
- int *len = 0) const;
- // Recv an open FD from another process.
-#endif /* ACE_HAS_MSG */
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Ensure that ACE_LSOCK is an abstract base class
-
- ACE_LSOCK (void);
- // Default constructor.
-
- ACE_LSOCK (ACE_HANDLE handle);
- // Initialize based on <handle>
-
- ACE_HANDLE get_handle (void) const;
- // Get handle.
-
- void set_handle (ACE_HANDLE handle);
- // Set handle.
-
-private:
- ACE_HANDLE aux_handle_;
- // An auxiliary handle used to avoid virtual base classes...
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LSOCK.i"
-#endif
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
-#include "ace/post.h"
-#endif /* ACE_LOCAL_SOCK_H */
diff --git a/ace/LSOCK.i b/ace/LSOCK.i
deleted file mode 100644
index c5b0057fa0e..00000000000
--- a/ace/LSOCK.i
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// LSOCK.i
-
-// Simple-minded constructor.
-
-ASYS_INLINE
-ACE_LSOCK::ACE_LSOCK (void)
- : aux_handle_ (ACE_INVALID_HANDLE)
-{
- ACE_TRACE ("ACE_LSOCK::ACE_LSOCK");
-}
-
-// Sets the underlying file descriptor.
-
-ASYS_INLINE void
-ACE_LSOCK::set_handle (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_LSOCK::set_handle");
- this->aux_handle_ = handle;
-}
-
-// Gets the underlying file descriptor.
-
-ASYS_INLINE ACE_HANDLE
-ACE_LSOCK::get_handle (void) const
-{
- ACE_TRACE ("ACE_LSOCK::get_handle");
- return this->aux_handle_;
-}
-
-// Sets the underlying file descriptor.
-
-ASYS_INLINE
-ACE_LSOCK::ACE_LSOCK (ACE_HANDLE handle)
- : aux_handle_ (handle)
-{
- ACE_TRACE ("ACE_LSOCK::ACE_LSOCK");
-}
diff --git a/ace/LSOCK_Acceptor.cpp b/ace/LSOCK_Acceptor.cpp
deleted file mode 100644
index 9735171f96b..00000000000
--- a/ace/LSOCK_Acceptor.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// LSOCK_Acceptor.cpp
-// $Id$
-
-#include "ace/LSOCK_Acceptor.h"
-
-ACE_RCSID(ace, LSOCK_Acceptor, "$Id$")
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Acceptor)
-
-// Return the local endpoint address.
-
-int
-ACE_LSOCK_Acceptor::get_local_addr (ACE_Addr &a) const
-{
- ACE_TRACE ("ACE_LSOCK_Acceptor::get_local_addr");
-
- ACE_UNIX_Addr& target = ACE_dynamic_cast (ACE_UNIX_Addr &, a);
-
- target = this->local_addr_;
-
- return 0;
-}
-
-void
-ACE_LSOCK_Acceptor::dump (void) const
-{
- ACE_TRACE ("ACE_LSOCK_Acceptor::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->local_addr_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Do nothing routine for constructor.
-
-ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor (void)
-{
- ACE_TRACE ("ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor");
-}
-
-int
-ACE_LSOCK_Acceptor::open (const ACE_Addr &remote_sap,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol)
-{
- ACE_TRACE ("ACE_LSOCK_Acceptor::open");
- this->local_addr_ = *((ACE_UNIX_Addr *) &remote_sap); // This is a gross hack...
- return ACE_SOCK_Acceptor::open (remote_sap, reuse_addr,
- protocol_family, backlog, protocol);
-}
-
-// General purpose routine for performing server ACE_SOCK creation.
-
-ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor (const ACE_Addr &remote_sap,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol)
-{
- ACE_TRACE ("ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor");
- if (this->open (remote_sap,
- reuse_addr,
- protocol_family,
- backlog,
- protocol) == -1)
- ACE_ERROR ((LM_ERROR,
- "ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor"));
-}
-
-// General purpose routine for accepting new connections.
-
-int
-ACE_LSOCK_Acceptor::accept (ACE_LSOCK_Stream &new_stream,
- ACE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle) const
-{
- ACE_TRACE ("ACE_LSOCK_Acceptor::accept");
-
- int in_blocking_mode = 0;
- if (this->shared_accept_start (timeout,
- restart,
- in_blocking_mode) == -1)
- return -1;
- else
- {
- sockaddr *addr = 0;
- int len = 0;
-
- if (remote_addr != 0)
- {
- len = remote_addr->get_size ();
- addr = (sockaddr *) remote_addr->get_addr ();
- }
-
- do
- new_stream.set_handle (ACE_OS::accept (this->get_handle (),
- addr,
- &len));
- while (new_stream.get_handle () == ACE_INVALID_HANDLE
- && restart != 0
- && errno == EINTR
- && timeout == 0);
-
- // Reset the size of the addr, which is only necessary for UNIX
- // domain sockets.
- if (new_stream.get_handle () != ACE_INVALID_HANDLE
- && remote_addr != 0)
- remote_addr->set_size (len);
- }
-
- return this->shared_accept_finish (new_stream,
- in_blocking_mode,
- reset_new_handle);
-}
-
-// Close down the UNIX domain stream and remove the rendezvous point
-// from the file system.
-
-int
-ACE_LSOCK_Acceptor::remove (void)
-{
- ACE_TRACE ("ACE_LSOCK_Acceptor::remove");
- int result = this->close ();
- return ACE_OS::unlink (this->local_addr_.get_path_name ()) == -1
- || result == -1 ? -1 : 0;
-}
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
diff --git a/ace/LSOCK_Acceptor.h b/ace/LSOCK_Acceptor.h
deleted file mode 100644
index 873cf98ec30..00000000000
--- a/ace/LSOCK_Acceptor.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// LSOCK_Aceeptor.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_LOCAL_SOCK_ACCEPTOR_H
-#define ACE_LOCAL_SOCK_ACCEPTOR_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Acceptor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/UNIX_Addr.h"
-#include "ace/LSOCK_Stream.h"
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-// Forward decl.
-class ACE_Reactor;
-
-class ACE_Export ACE_LSOCK_Acceptor : public ACE_SOCK_Acceptor
-{
- // = TITLE
- // Defines the format and interface for the acceptor side of the
- // local ACE_SOCK ACE_Stream.
-public:
- // = Initialization methods.
- ACE_LSOCK_Acceptor (void);
- // Default constructor.
-
- ACE_LSOCK_Acceptor (const ACE_Addr &local_sap,
- int reuse_addr = 0,
- int protocol_family = PF_UNIX,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initiate a passive mode socket.
-
- int open (const ACE_Addr &local_sap,
- int reuse_addr = 0,
- int protocol_family = PF_UNIX,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initiate a passive mode socket.
-
- int accept (ACE_LSOCK_Stream &new_ipc_sap,
- ACE_Addr * = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0) const;
- // Accept a new data transfer connection.
-
- int remove (void);
- // Close down the ACE_LSOCK and remove the rendezvous point from the
- // file system.
-
- int get_local_addr (ACE_Addr &) const;
- // Return the local endpoint address.
-
- // = Meta-type info
- typedef ACE_UNIX_Addr PEER_ADDR;
- typedef ACE_LSOCK_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_UNIX_Addr local_addr_;
- // Address of our rendezvous point.
-};
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
-#include "ace/post.h"
-#endif /* ACE_LOCAL_SOCK_ACCEPTOR_H */
diff --git a/ace/LSOCK_CODgram.cpp b/ace/LSOCK_CODgram.cpp
deleted file mode 100644
index b43674eb3af..00000000000
--- a/ace/LSOCK_CODgram.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// LSOCK_CODgram.cpp
-// $Id$
-
-#include "ace/LSOCK_CODgram.h"
-
-ACE_RCSID(ace, LSOCK_CODgram, "$Id$")
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LSOCK_CODgram.i"
-#endif
-
-ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_CODgram)
-
-void
-ACE_LSOCK_CODgram::dump (void) const
-{
- ACE_TRACE ("ACE_LSOCK_CODgram::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_SOCK_CODgram::dump ();
- ACE_LSOCK::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-/* Here's the general-purpose open routine. */
-
-int
-ACE_LSOCK_CODgram::open (const ACE_Addr &remote,
- const ACE_Addr &local,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_LSOCK_CODgram::open");
- if (ACE_SOCK_CODgram::open (remote, local, protocol_family,
- protocol) == -1)
- return -1;
- ACE_LSOCK::set_handle (this->get_handle ());
- return 0;
-}
-
-/* Create a local ACE_SOCK datagram. */
-
-ACE_LSOCK_CODgram::ACE_LSOCK_CODgram (const ACE_Addr &remote,
- const ACE_Addr &local,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_LSOCK_CODgram::ACE_LSOCK_CODgram");
- if (this->open (remote, local, protocol_family,
- protocol) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_LSOCK_CODgram")));
-}
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
diff --git a/ace/LSOCK_CODgram.h b/ace/LSOCK_CODgram.h
deleted file mode 100644
index 919d3f26c05..00000000000
--- a/ace/LSOCK_CODgram.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// LSOCK_CODgram.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_LOCAL_SOCK_CODGRAM_H
-#define ACE_LOCAL_SOCK_CODGRAM_H
-#include "ace/pre.h"
-
-#include "ace/LSOCK.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SOCK_CODgram.h"
-#include "ace/Addr.h"
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-class ACE_Export ACE_LSOCK_CODgram : public ACE_SOCK_CODgram, public ACE_LSOCK
-{
- // = TITLE
- // Defines the member functions for the <ACE_LSOCK> connected
- // datagram abstraction.
-public:
- // = Initialization methods.
- ACE_LSOCK_CODgram (void);
- // Default constructor.
-
- ACE_LSOCK_CODgram (const ACE_Addr &remote_sap,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int protocol_family = PF_UNIX,
- int protocol = 0);
- // Initiate a connected-datagram.
-
- int open (const ACE_Addr &remote_sap,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int protocol_family = PF_UNIX,
- int protocol = 0);
- // Initiate a connected-datagram.
-
- ACE_HANDLE get_handle (void) const;
- // Get underlying handle.
-
- void set_handle (ACE_HANDLE);
- // Set underlying handle.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LSOCK_CODgram.i"
-#endif
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
-#include "ace/post.h"
-#endif /* ACE_LOCAL_SOCK_CODGRAM_H */
diff --git a/ace/LSOCK_CODgram.i b/ace/LSOCK_CODgram.i
deleted file mode 100644
index 80a6071770c..00000000000
--- a/ace/LSOCK_CODgram.i
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// LSOCK_CODgram.i
-
-// Do nothing constructor.
-
-ASYS_INLINE
-ACE_LSOCK_CODgram::ACE_LSOCK_CODgram (void)
-{
- ACE_TRACE ("ACE_LSOCK_CODgram::ACE_LSOCK_CODgram");
-}
-
-ASYS_INLINE void
-ACE_LSOCK_CODgram::set_handle (ACE_HANDLE h)
-{
- ACE_TRACE ("ACE_LSOCK_CODgram::set_handle");
- this->ACE_SOCK_CODgram::set_handle (h);
- this->ACE_LSOCK::set_handle (h);
-}
-
-ASYS_INLINE ACE_HANDLE
-ACE_LSOCK_CODgram::get_handle (void) const
-{
- ACE_TRACE ("ACE_LSOCK_CODgram::get_handle");
- return this->ACE_SOCK_CODgram::get_handle ();
-}
diff --git a/ace/LSOCK_Connector.cpp b/ace/LSOCK_Connector.cpp
deleted file mode 100644
index c329d6e6620..00000000000
--- a/ace/LSOCK_Connector.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-// LSOCK_Connector.cpp
-// $Id$
-
-#include "ace/LSOCK_Connector.h"
-
-ACE_RCSID(ace, LSOCK_Connector, "$Id$")
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LSOCK_Connector.i"
-#endif
-
-ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Connector)
-
-void
-ACE_LSOCK_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_LSOCK_Connector::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_LSOCK_Connector::ACE_LSOCK_Connector (void)
-{
- ACE_TRACE ("ACE_LSOCK_Connector::ACE_LSOCK_Connector");
-}
-
-// Establish a connection.
-ACE_LSOCK_Connector::ACE_LSOCK_Connector (ACE_LSOCK_Stream &new_stream,
- const ACE_UNIX_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- int protocol_family,
- int protocol)
- : ACE_SOCK_Connector (new_stream,
- remote_sap,
- timeout,
- local_sap,
- reuse_addr,
- flags,
- perms,
- protocol_family,
- protocol)
-{
- ACE_TRACE ("ACE_LSOCK_Connector::ACE_LSOCK_Connector");
- // This is necessary due to the weird inheritance relationships of
- // ACE_LSOCK_Stream.
- new_stream.set_handle (new_stream.get_handle ());
-}
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
diff --git a/ace/LSOCK_Connector.h b/ace/LSOCK_Connector.h
deleted file mode 100644
index a7f2f6bceb7..00000000000
--- a/ace/LSOCK_Connector.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// LSOCK_Connector.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_LOCAL_SOCK_CONNECTOR_H
-#define ACE_LOCAL_SOCK_CONNECTOR_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Connector.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/LSOCK_Stream.h"
-#include "ace/UNIX_Addr.h"
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-class ACE_Export ACE_LSOCK_Connector : public ACE_SOCK_Connector
-{
- // = TITLE
- // Defines the format and interface for the connector side of
- // the <ACE_LSOCK_Stream>.
-public:
- // = Initialization methods.
- ACE_LSOCK_Connector (void);
- // Default constructor.
-
- ACE_LSOCK_Connector (ACE_LSOCK_Stream &new_stream,
- const ACE_UNIX_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol_family = PF_UNIX,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- int connect (ACE_LSOCK_Stream &new_stream,
- const ACE_UNIX_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protcol_family = PF_UNIX,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- // = Meta-type info
- typedef ACE_UNIX_Addr PEER_ADDR;
- typedef ACE_LSOCK_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LSOCK_Connector.i"
-#endif
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
-#include "ace/post.h"
-#endif /* ACE_LOCAL_SOCK_CONNECTOR_H */
diff --git a/ace/LSOCK_Connector.i b/ace/LSOCK_Connector.i
deleted file mode 100644
index 4c0a18663f5..00000000000
--- a/ace/LSOCK_Connector.i
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// LSOCK_Connector.i
-
-// Establish a connection.
-
-ASYS_INLINE int
-ACE_LSOCK_Connector::connect (ACE_LSOCK_Stream &new_stream,
- const ACE_UNIX_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_LSOCK_Connector::connect");
- int result = ACE_SOCK_Connector::connect (new_stream, remote_sap,
- timeout, local_sap,
- reuse_addr, flags, perms,
- protocol_family, protocol);
- if (result != -1)
- // This is necessary due to the weird inheritance relationships of ACE_LSOCK_Stream.
- new_stream.set_handle (new_stream.get_handle ());
- return result;
-}
-
diff --git a/ace/LSOCK_Dgram.cpp b/ace/LSOCK_Dgram.cpp
deleted file mode 100644
index d30a5ab7537..00000000000
--- a/ace/LSOCK_Dgram.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// $Id$
-
-#include "ace/LSOCK_Dgram.h"
-
-ACE_RCSID(ace, LSOCK_Dgram, "$Id$")
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LSOCK_Dgram.i"
-#endif
-
-ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Dgram)
-
-void
-ACE_LSOCK_Dgram::dump (void) const
-{
- ACE_TRACE ("ACE_LSOCK_Dgram::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_SOCK_Dgram::dump ();
- ACE_LSOCK::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// The "do nothing" constructor.
-
-ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (void)
-{
- ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram");
-}
-
-// Here's the general-purpose open routine.
-
-int
-ACE_LSOCK_Dgram::open (const ACE_Addr &local,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_LSOCK_Dgram::open");
- if (ACE_SOCK_Dgram::open (local,
- protocol_family,
- protocol) == -1)
- return -1;
- ACE_LSOCK::set_handle (this->ACE_SOCK_Dgram::get_handle ());
- return 0;
-}
-
-// Create a local ACE_SOCK datagram.
-
-ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (const ACE_Addr &local,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram");
- if (this->open (local,
- protocol_family,
- protocol) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_LSOCK_Dgram")));
-}
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
diff --git a/ace/LSOCK_Dgram.h b/ace/LSOCK_Dgram.h
deleted file mode 100644
index 723cc924430..00000000000
--- a/ace/LSOCK_Dgram.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// LSOCK_Dgram.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_LOCAL_SOCK_DGRAM_H
-#define ACE_LOCAL_SOCK_DGRAM_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Dgram.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/LSOCK.h"
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-class ACE_Export ACE_LSOCK_Dgram : public ACE_SOCK_Dgram, public ACE_LSOCK
-{
- // = TITLE
- // Create a Local ACE_SOCK datagram.
-public:
- // = Initialization methods.
- ACE_LSOCK_Dgram (void);
- // Default constructor.
-
- ACE_LSOCK_Dgram (const ACE_Addr &local,
- int protocol_family = PF_UNIX,
- int protocol = 0);
- // Initiate a local dgram.
-
- int open (const ACE_Addr &local,
- int protocol_family = PF_UNIX,
- int protocol = 0);
- // Initiate a local dgram.
-
- ACE_HANDLE get_handle (void) const;
- // Get handle.
-
- void set_handle (ACE_HANDLE);
- // Set handle.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LSOCK_Dgram.i"
-#endif
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
-#include "ace/post.h"
-#endif /* ACE_LOCAL_SOCK_DGRAM_H */
diff --git a/ace/LSOCK_Dgram.i b/ace/LSOCK_Dgram.i
deleted file mode 100644
index ffc1890d12b..00000000000
--- a/ace/LSOCK_Dgram.i
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// LSOCK_Dgram.i
-
-ASYS_INLINE void
-ACE_LSOCK_Dgram::set_handle (ACE_HANDLE h)
-{
- ACE_TRACE ("ACE_LSOCK_Dgram::set_handle");
- this->ACE_SOCK_Dgram::set_handle (h);
- this->ACE_LSOCK::set_handle (h);
-}
-
-ASYS_INLINE ACE_HANDLE
-ACE_LSOCK_Dgram::get_handle (void) const
-{
- ACE_TRACE ("ACE_LSOCK_Dgram::get_handle");
- return this->ACE_SOCK_Dgram::get_handle ();
-}
-
diff --git a/ace/LSOCK_Stream.cpp b/ace/LSOCK_Stream.cpp
deleted file mode 100644
index 48afdf02ccc..00000000000
--- a/ace/LSOCK_Stream.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-// LSOCK_Stream.cpp
-// $Id$
-
-#include "ace/LSOCK_Stream.h"
-
-ACE_RCSID(ace, LSOCK_Stream, "$Id$")
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LSOCK_Stream.i"
-#endif
-
-ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Stream)
-
-int
-ACE_LSOCK_Stream::get_local_addr (ACE_Addr &addr) const
-{
- ACE_TRACE ("ACE_LSOCK_Stream::get_local_addr");
-
- // Perform the downcast since <addr> had better be an
- // <ACE_UNIX_Addr>.
- ACE_UNIX_Addr *rhs_unix_addr = ACE_dynamic_cast (ACE_UNIX_Addr *, &addr);
- ACE_UNIX_Addr lhs_unix_addr;
-
- if (rhs_unix_addr == 0)
- return -1;
- else if (ACE_SOCK::get_local_addr (lhs_unix_addr) == -1)
- return -1;
- else
- {
- *rhs_unix_addr = lhs_unix_addr;
- return 0;
- }
-}
-
-int
-ACE_LSOCK_Stream::get_remote_addr (ACE_Addr &addr) const
-{
- ACE_TRACE ("ACE_LSOCK_Stream::get_remote_addr");
-
- return this->get_local_addr (addr);
-}
-
-void
-ACE_LSOCK_Stream::dump (void) const
-{
- ACE_TRACE ("ACE_LSOCK_Stream::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_SOCK_Stream::dump ();
- ACE_LSOCK::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_MSG)
-
-// Send a readv-style vector of buffers, along with an open I/O
-// handle.
-
-ssize_t
-ACE_LSOCK_Stream::send_msg (const iovec iov[],
- size_t n,
- ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_LSOCK_Stream::send_msg");
- msghdr send_msg;
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- char cmsgbuf[ACE_BSD_CONTROL_MSG_LEN];
- cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf;
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
- send_msg.msg_iov = (iovec *) iov;
- send_msg.msg_iovlen = n;
- send_msg.msg_name = 0;
- send_msg.msg_namelen = 0;
-
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- cmsgptr->cmsg_level = SOL_SOCKET;
- cmsgptr->cmsg_type = SCM_RIGHTS;
- cmsgptr->cmsg_len = sizeof cmsgbuf;
- send_msg.msg_control = cmsgbuf;
- send_msg.msg_controllen = sizeof cmsgbuf;
- *(ACE_HANDLE *) CMSG_DATA (cmsgptr) = handle;
- send_msg.msg_flags = 0 ;
-#else
- send_msg.msg_accrights = (char *) &handle;
- send_msg.msg_accrightslen = sizeof handle;
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
- return ACE_OS::sendmsg (this->ACE_SOCK_Stream::get_handle (),
- &send_msg, 0);
-}
-
-// Read a readv-style vector of buffers, along with an open I/O
-// handle.
-
-ssize_t
-ACE_LSOCK_Stream::recv_msg (iovec iov[],
- size_t n,
- ACE_HANDLE &handle)
-{
- ACE_TRACE ("ACE_LSOCK_Stream::recv_msg");
- msghdr recv_msg;
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- char cmsgbuf[ACE_BSD_CONTROL_MSG_LEN];
- cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf;
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
- recv_msg.msg_iov = (iovec *) iov;
- recv_msg.msg_iovlen = n;
- recv_msg.msg_name = 0;
- recv_msg.msg_namelen = 0;
-
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- recv_msg.msg_control = cmsgbuf;
- recv_msg.msg_controllen = sizeof cmsgbuf;
- ssize_t result = ACE_OS::recvmsg (this->ACE_SOCK_Stream::get_handle (),
- &recv_msg, 0);
- handle = *(ACE_HANDLE*) CMSG_DATA (cmsgptr) ;
- return result;
-#else
- recv_msg.msg_accrights = (char *) &handle;
- recv_msg.msg_accrightslen = sizeof handle;
-
- return ACE_OS::recvmsg (this->ACE_SOCK_Stream::get_handle (),
- &recv_msg, 0);
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-}
-#endif /* ACE_HAS_MSG */
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
diff --git a/ace/LSOCK_Stream.h b/ace/LSOCK_Stream.h
deleted file mode 100644
index 1784193d204..00000000000
--- a/ace/LSOCK_Stream.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// LSOCK_Stream.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_LOCAL_SOCK_STREAM_H
-#define ACE_LOCAL_SOCK_STREAM_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/UNIX_Addr.h"
-#include "ace/LSOCK.h"
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-class ACE_Export ACE_LSOCK_Stream : public ACE_SOCK_Stream, public ACE_LSOCK
-{
- // = TITLE
- // Create a Local ACE_SOCK stream.
-public:
- // = Send/recv methods.
- ssize_t send_msg (const iovec iov[],
- size_t n,
- ACE_HANDLE handle);
- // Send iovecs via <::writev>.
-
- ssize_t recv_msg (iovec iov[],
- size_t n,
- ACE_HANDLE &handle);
- // Send iovecs via <::writev>.
-
- ACE_HANDLE get_handle (void) const;
- // Get handle.
-
- void set_handle (ACE_HANDLE fd);
- // Overrides set_handle from the base classes.
-
- // = Meta-type info
- typedef ACE_UNIX_Addr PEER_ADDR;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- int get_local_addr (ACE_Addr &) const;
- // This method simply returns the "local" addr.
-
- int get_remote_addr (ACE_Addr &) const;
- // This method returns the "local" addr since it's the same value
- // for UNIX domain sockets.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/LSOCK_Stream.i"
-#endif
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
-#include "ace/post.h"
-#endif /* ACE_LOCAL_SOCK_STREAM_H */
diff --git a/ace/LSOCK_Stream.i b/ace/LSOCK_Stream.i
deleted file mode 100644
index 6ee0a6f90c7..00000000000
--- a/ace/LSOCK_Stream.i
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// LSOCK_Stream.i
-
-// Sets both the file descriptors... Overrides handle from the base
-// classes.
-
-ASYS_INLINE void
-ACE_LSOCK_Stream::set_handle (ACE_HANDLE fd)
-{
- ACE_TRACE ("ACE_LSOCK_Stream::set_handle");
- this->ACE_SOCK_Stream::set_handle (fd);
- this->ACE_LSOCK::set_handle (fd);
-}
-
-ASYS_INLINE ACE_HANDLE
-ACE_LSOCK_Stream::get_handle (void) const
-{
- ACE_TRACE ("ACE_LSOCK_Stream::get_handle");
- return this->ACE_SOCK_Stream::get_handle ();
-}
-
-
-
diff --git a/ace/Local_Name_Space.cpp b/ace/Local_Name_Space.cpp
deleted file mode 100644
index 7ef5494d116..00000000000
--- a/ace/Local_Name_Space.cpp
+++ /dev/null
@@ -1,215 +0,0 @@
-// Local_Name_Space.cpp
-// $Id$
-
-#if !defined (ACE_LOCAL_NAME_SPACE_C)
-#define ACE_LOCAL_NAME_SPACE_C
-
-#include "ace/ACE.h"
-#include "ace/Local_Name_Space.h"
-
-ACE_RCSID(ace, Local_Name_Space, "$Id$")
-
-ACE_USHORT16 *
-ACE_NS_String::fast_rep (void) const
-{
- ACE_TRACE ("ACE_NS_String::fast_rep");
- return this->rep_;
-}
-
-ACE_NS_String::operator ACE_WString () const
-{
- ACE_TRACE ("ACE_NS_String::operator ACE_WString");
- return ACE_WString (this->rep_,
- (this->len_ / sizeof (ACE_USHORT16)) - 1);
-}
-
-size_t
-ACE_NS_String::len (void) const
-{
- ACE_TRACE ("ACE_NS_String::len");
- return this->len_;
-}
-
-char *
-ACE_NS_String::char_rep (void) const
-{
- ACE_TRACE ("ACE_NS_String::char_rep");
- ACE_WString w_string (this->rep_,
- (this->len_ / sizeof (ACE_USHORT16)) - 1);
- return w_string.char_rep ();
-}
-
-ACE_NS_String::ACE_NS_String (void)
- : len_ (0),
- rep_ (0)
-{
- ACE_TRACE ("ACE_NS_String::ACE_NS_String");
-}
-
-ACE_NS_String::ACE_NS_String (const ACE_WString &s)
- : len_ ((s.length () + 1) * sizeof (ACE_USHORT16)),
- rep_ ((ACE_USHORT16 *) s.fast_rep ())
-{
- ACE_TRACE ("ACE_NS_String::ACE_NS_String");
-}
-
-int
-ACE_NS_String::strstr (const ACE_NS_String &s) const
-{
- ACE_TRACE ("ACE_NS_String::strstr");
-
- if (this->len_ < s.len_)
- // If they're larger than we are they can't be a substring of us!
- return -1;
- else if (this->len_ == s.len_)
- // Check if we're equal.
- return *this == s ? 0 : -1;
- else
- {
- // They're smaller than we are...
- size_t len = (this->len_ - s.len_) / sizeof (ACE_USHORT16);
- size_t pat_len = s.len_ / sizeof (ACE_USHORT16) - 1;
-
- for (size_t i = 0; i <= len; i++)
- {
- size_t j;
-
- for (j = 0; j < pat_len; j++)
- if (this->rep_[i + j] != s.rep_[j])
- break;
-
- if (j == pat_len)
- // Found a match! Return the index.
- return i;
- }
-
- return -1;
- }
-}
-
-int
-ACE_NS_String::operator == (const ACE_NS_String &s) const
-{
- ACE_TRACE ("ACE_NS_String::operator ==");
- return this->len_ == s.len_
- && ACE_OS::memcmp ((void *) this->rep_,
- (void *) s.rep_, this->len_) == 0;
-}
-
-int
-ACE_NS_String::operator != (const ACE_NS_String &s) const
-{
- ACE_TRACE ("ACE_NS_String::operator !=");
- return !this->operator == (s);
-}
-
-ACE_NS_String::ACE_NS_String (ACE_USHORT16 *dst,
- const ACE_USHORT16 *src,
- size_t bytes)
- : len_ (bytes),
- rep_ (dst)
-{
- ACE_TRACE ("ACE_NS_String::ACE_NS_String");
- ACE_OS::memcpy (this->rep_, src, bytes);
-}
-
-size_t
-ACE_NS_String::hash (void) const
-{
- return ACE::hash_pjw
- (ACE_reinterpret_cast (char *, ACE_const_cast (ACE_USHORT16 *,
- this->rep_)),
- this->len_);
-}
-
-ACE_NS_Internal::ACE_NS_Internal (void)
-{
-}
-
-ACE_NS_Internal::ACE_NS_Internal (ACE_NS_String &value, const char *type)
- : value_ (value),
- type_ (type)
-{
- ACE_TRACE ("ACE_NS_Internal::ACE_NS_Internal");
-}
-
-int
-ACE_NS_Internal::operator == (const ACE_NS_Internal &s) const
-{
- ACE_TRACE ("ACE_NS_Internal::operator ==");
- return this->value_ == s.value_;
-}
-
-ACE_NS_String
-ACE_NS_Internal::value (void)
-{
- ACE_TRACE ("ACE_NS_Internal::value");
- return this->value_;
-}
-
-const char *
-ACE_NS_Internal::type (void)
-{
- ACE_TRACE ("ACE_NS_Internal::type");
- return this->type_;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-#if (1)
-template class ACE_Hash_Map_Entry<ACE_NS_String, ACE_NS_Internal>;
-template class ACE_Hash<ACE_NS_String>;
-template class ACE_Equal_To<ACE_NS_String>;
-template class ACE_Hash_Map_Manager<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>;
-#else
-template class ACE_Map_Entry<ACE_NS_String, ACE_NS_Internal>;
-template class ACE_Map_Manager<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-#endif
-template class ACE_Unbounded_Set<ACE_Name_Binding>;
-template class ACE_Unbounded_Set_Iterator<ACE_Name_Binding>;
-template class ACE_Unbounded_Set<ACE_WString>;
-template class ACE_Unbounded_Set_Iterator<ACE_WString>;
-template class ACE_Node<ACE_WString>;
-template class ACE_Node<ACE_Name_Binding>;
-template class ACE_Guard<ACE_RW_Process_Mutex>;
-template class ACE_Read_Guard<ACE_RW_Process_Mutex>;
-template class ACE_Write_Guard<ACE_RW_Process_Mutex>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#if (1)
-#pragma instantiate ACE_Hash_Map_Entry<ACE_NS_String, ACE_NS_Internal>
-#pragma instantiate ACE_Hash<ACE_NS_String>
-#pragma instantiate ACE_Equal_To<ACE_NS_String>
-#pragma instantiate ACE_Hash_Map_Manager<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>
-#else
-#pragma instantiate ACE_Map_Entry<ACE_NS_String, ACE_NS_Internal>
-#pragma instantiate ACE_Map_Manager<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>
-#endif
-#pragma instantiate ACE_Unbounded_Set<ACE_Name_Binding>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Name_Binding>
-#pragma instantiate ACE_Unbounded_Set<ACE_WString>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_WString>
-#pragma instantiate ACE_Node<ACE_WString>
-#pragma instantiate ACE_Node<ACE_Name_Binding>
-#pragma instantiate ACE_Guard<ACE_RW_Process_Mutex>
-#pragma instantiate ACE_Read_Guard<ACE_RW_Process_Mutex>
-#pragma instantiate ACE_Write_Guard<ACE_RW_Process_Mutex>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-#endif /* ACE_LOCAL_NAME_SPACE_C */
diff --git a/ace/Local_Name_Space.h b/ace/Local_Name_Space.h
deleted file mode 100644
index edf83a69771..00000000000
--- a/ace/Local_Name_Space.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Local_Name_Space.h
-//
-// = AUTHOR
-// Prashant Jain (pjain@cs.wustl.edu), Irfan Pyarali
-// (irfan@wuerl.wustl.edu), and Douglas C. Schmidt
-// (schmidt@cs.wustl.edu).
-//
-// ============================================================================
-
-#ifndef ACE_LOCAL_NAME_SPACE_H
-#define ACE_LOCAL_NAME_SPACE_H
-#include "ace/pre.h"
-
-#include "ace/SString.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Containers.h"
-#include "ace/Malloc_T.h"
-#include "ace/Synch.h"
-
-class ACE_Export ACE_NS_String
-{
- // = TITLE
- // This class and ACE_NS_Internal are used as Adapters to work
- // with the Map_Manager.
- //
- // = DESCRIPTION
- // In order to work correctly, this class must be able to
- // convert back and forth with <ACE_WStrings>. Note that this
- // class must not have a destructor since otherwise we'll have
- // problems...
-public:
- // = Initialization.
- ACE_NS_String (void);
- // Default "no-op" constructor.
-
- ACE_NS_String (ACE_USHORT16 *dst,
- const ACE_USHORT16 *src,
- size_t len);
- // Initialization method.
-
- ACE_NS_String (const ACE_WString &);
- // Converts an ACE_WString to an ACE_NS_String;
-
- operator ACE_WString () const;
- // Converts an ACE_NS_String to fresh copy of an ACE_WString;
-
- char *char_rep (void) const;
- // Return the ASCII character representation.
-
- int strstr (const ACE_NS_String &) const;
- // Matches on substrings.
-
- int operator == (const ACE_NS_String &) const;
- // Compare an ACE_NS_String.
-
- int operator != (const ACE_NS_String &) const;
- // Compare an ACE_NS_String.
-
- size_t len (void) const;
- // Returns length of the string
-
- ACE_USHORT16 *fast_rep (void) const;
- // Returns the underlying representation.
-
- size_t hash (void) const;
- // Returns a hash value for this string.
-
-private:
- size_t len_;
- // Length of the string.
-
- ACE_USHORT16 *rep_;
- // This actually points into shared/persistent memory.
-};
-
-class ACE_Export ACE_NS_Internal
-{
- // = TITLE
- // This class and ACE_NS_String are used as Adapters to work
- // with the Map_Manager.
-public:
- ACE_NS_Internal (void);
- // No-op constructor.
-
- ACE_NS_Internal (ACE_NS_String &value, const char *type);
- // Constructor.
-
- int operator == (const ACE_NS_Internal &) const;
- // Compare an ACE_NS_Internal
-
- ACE_NS_String value (void);
- // Return value.
-
- const char *type (void);
- // Return type.
-
-private:
- ACE_NS_String value_;
- // Contains the value of the string.
-
- const char *type_;
- // Contains the type of the string.
-};
-
-// Include the ACE_Local_Name_Space templates stuff at this point.
-#include "ace/Local_Name_Space_T.h"
-
-#include "ace/post.h"
-#endif /* ACE_LOCAL_NAME_SPACE_H */
diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp
deleted file mode 100644
index 9a7f528d00d..00000000000
--- a/ace/Local_Name_Space_T.cpp
+++ /dev/null
@@ -1,917 +0,0 @@
-// $Id$
-
-#ifndef ACE_LOCAL_NAME_SPACE_T_C
-#define ACE_LOCAL_NAME_SPACE_T_C
-
-#include "ace/ACE.h"
-#include "ace/Auto_Ptr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Local_Name_Space.h"
-
-ACE_RCSID(ace, Local_Name_Space_T, "$Id$")
-
-template <class ALLOCATOR>
-ACE_Name_Space_Map<ALLOCATOR>::ACE_Name_Space_Map (ALLOCATOR *alloc)
- : MAP_MANAGER (alloc)
-{
- ACE_TRACE ("ACE_Name_Space_Map::ACE_Name_Space_Map");
-}
-
-template <class ALLOCATOR> int
-ACE_Name_Space_Map<ALLOCATOR>::close (ALLOCATOR *alloc)
-{
- ACE_TRACE ("ACE_Name_Space_Map::close");
-
- this->allocator_ = alloc;
- return this->close_i ();
-}
-
-template <class ALLOCATOR> int
-ACE_Name_Space_Map<ALLOCATOR>::bind (const ACE_NS_String &ext_id,
- const ACE_NS_Internal &int_id,
- ALLOCATOR *alloc)
-{
- ACE_TRACE ("ACE_Name_Space_Map::bind");
-
- this->allocator_ = alloc;
- return this->bind_i (ext_id, int_id);
-}
-
-template <class ALLOCATOR> int
-ACE_Name_Space_Map<ALLOCATOR>::unbind (const ACE_NS_String &ext_id,
- ACE_NS_Internal &int_id,
- ALLOCATOR *alloc)
-{
- ACE_TRACE ("ACE_Name_Space_Map::unbind");
-
- this->allocator_ = alloc;
- return this->unbind_i (ext_id, int_id);
-}
-
-template <class ALLOCATOR> int
-ACE_Name_Space_Map<ALLOCATOR>::rebind (const ACE_NS_String &ext_id,
- const ACE_NS_Internal &int_id,
- ACE_NS_String &old_ext_id,
- ACE_NS_Internal &old_int_id,
- ALLOCATOR *alloc)
-{
- ACE_TRACE ("ACE_Name_Space_Map::rebind");
-
- this->allocator_ = alloc;
- return this->rebind_i (ext_id, int_id, old_ext_id, old_int_id);
-}
-
-template <class ALLOCATOR> int
-ACE_Name_Space_Map<ALLOCATOR>::find (const ACE_NS_String &ext_id,
- ACE_NS_Internal &int_id,
- ALLOCATOR *alloc)
-{
- ACE_TRACE ("ACE_Name_Space_Map::find");
-
- this->allocator_ = alloc;
- return this->find_i (ext_id, int_id);
-}
-
-#if defined (ACE_WIN32)
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::remap (EXCEPTION_POINTERS *ep)
-{
- ACE_TRACE ("ACE_Name_Space_Map::remap");
-
- void *addr = (void *) ep->ExceptionRecord->ExceptionInformation[1];
-
- // The following requires Memory Pool to have ::remap()
- // defined. Thus currently this will only work for
- // ACE_MMap_Memory_Pool.
- if (this->allocator_->alloc ().memory_pool ().remap (addr) == -1)
- // Kick it upstairs...
- return (DWORD) EXCEPTION_CONTINUE_SEARCH;
-
-#if __X86__
- // This is 80x86-specific.
- ep->ContextRecord->Edi = (DWORD) addr;
-#elif __MIPS__
- ep->ContextRecord->IntA0 =
- ep->ContextRecord->IntV0 = (DWORD) addr;
- ep->ContextRecord->IntT5 = ep->ContextRecord->IntA0 + 3;
-#endif /* __X86__ */
- // Resume execution at the original point of "failure."
- return (DWORD) EXCEPTION_CONTINUE_EXECUTION;
-}
-#endif /* ACE_WIN32 */
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::shared_bind (const ACE_WString &name,
- const ACE_WString &value,
- const char *type,
- int rebind)
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
- int result = 0;
- ACE_SEH_TRY
- {
- result = this->shared_bind_i (name, value, type, rebind);
- }
- ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ()))
- {
- }
- return result;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::shared_bind_i (const ACE_WString &name,
- const ACE_WString &value,
- const char *type,
- int rebind)
-{
-
- ACE_TRACE ("ACE_Local_Name_Space::shared_bind");
- size_t name_len = (name.length () + 1) * sizeof (ACE_USHORT16);
- size_t value_len = (value.length () + 1) * sizeof (ACE_USHORT16);
- size_t type_len = ACE_OS::strlen (type) + 1;
- size_t total_len = name_len + value_len + type_len;
- char *ptr = (char *) this->allocator_->malloc (total_len);
-
- if (ptr == 0)
- return -1;
- else
- {
- // Note that the value_rep *must* come first to make sure we can
- // retrieve this pointer later on in unbind().
- ACE_USHORT16 *value_rep = (ACE_USHORT16 *) (ptr);
- ACE_USHORT16 *name_rep = (ACE_USHORT16 *) (ptr + value_len);
- char *new_type = (char *) (ptr + value_len + name_len);
-
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> name_urep (name.ushort_rep ());
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> value_urep (value.ushort_rep ());
- ACE_NS_String new_name (name_rep, name_urep.get (), name_len);
- ACE_NS_String new_value (value_rep, value_urep.get (), value_len);
-
- ACE_OS::strcpy (new_type, type);
- ACE_NS_Internal new_internal (new_value, new_type);
- int result = -1;
-
- if (rebind == 0)
- {
- // Do a normal bind. This will fail if there's already an
- // <new_internal> with the same name.
- result = this->name_space_map_->bind (new_name, new_internal, this->allocator_);
-
- if (result == 1)
- {
- // Entry already existed so bind failed. Free our dynamically allocated memory.
- this->allocator_->free ((void *) ptr);
- return result;
- }
- }
- else
- {
- // Do a rebind. If there's already any entry, this will return the existing
- // <new_name> and <new_internal> and overwrite the existing name binding.
- ACE_NS_String old_name;
- ACE_NS_Internal old_internal;
-
- result = this->name_space_map_->rebind (new_name, new_internal,
- old_name, old_internal,
- this->allocator_);
- if (result == 1)
- {
- // Free up the memory we allocated in shared_bind(). Note that this
- // assumes that the "value" pointer comes first and that the value,
- // name, and type are contiguously allocated (see above for details)
- this->allocator_->free ((void *) (old_internal.value ()).fast_rep ());
- }
- }
-
- if (result == -1)
- // Free our dynamically allocated memory.
- this->allocator_->free ((void *) ptr);
- else
- // If bind() or rebind() succeed, they will automatically sync
- // up the map manager entry. However, we must sync up our
- // name/value memory.
- this->allocator_->sync (ptr, total_len);
-
- return result;
- }
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::unbind (const ACE_WString &name)
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
- int result = 0;
- ACE_SEH_TRY
- {
- result = this->unbind_i (name);
- }
- ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ()))
- {
- }
- return result;
-
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::unbind_i (const ACE_WString &name)
-{
- ACE_TRACE ("ACE_Local_Name_Space::unbind");
-
- ACE_WRITE_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
- ACE_NS_String ns_name (name);
- ACE_NS_Internal ns_internal;
- if (this->name_space_map_->unbind (ns_name, ns_internal, this->allocator_) != 0)
- return -1;
- else
- {
- // Free up the memory we allocated in shared_bind(). Note that
- // this assumes that the "value" pointer comes first and that
- // the value, name and type are contiguously allocated (see
- // shared_bind() for details)
- this->allocator_->free ((void *) (ns_internal.value ()).fast_rep ());
- return 0;
- }
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::bind (const ACE_WString &name,
- const ACE_WString &value,
- const char *type)
-{
- ACE_TRACE ("ACE_Local_Name_Space::bind");
- ACE_WRITE_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
-
- return this->shared_bind (name, value, type, 0);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::rebind (const ACE_WString &name,
- const ACE_WString &value,
- const char *type)
-{
- ACE_TRACE ("ACE_Local_Name_Space::rebind");
- ACE_WRITE_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
-
- return this->shared_bind (name, value, type, 1);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::resolve (const ACE_WString &name,
- ACE_WString &value,
- char *&type)
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
- int result = 0;
- ACE_SEH_TRY
- {
- result = this->resolve_i (name, value, type);
- }
- ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ()))
- {
- }
- return result;
-}
-
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::resolve_i (const ACE_WString &name,
- ACE_WString &value,
- char *&type)
-{
- ACE_TRACE ("ACE_Local_Name_Space::resolve");
- ACE_READ_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
-
- ACE_NS_String ns_name (name);
- ACE_NS_Internal ns_internal;
- ACE_NS_String nbc_string; // Note the classy variable name! :)
-
- if (this->name_space_map_->find (ns_name,
- ns_internal,
- this->allocator_) != 0)
- return -1;
- else
- {
- // Calls conversion operator and then calls the ACE_WString
- // assignment operator to get a fresh copy. (*#*(@#&!*@!!*@&(
- // HP compiler causes us to add an extra copy explicitly !! :)
- nbc_string = ns_internal.value ();
- value = nbc_string;
-
- // Gets type and then the actual reprsentation which is a
- // ACE_USHORT16
- const char *temp = ns_internal.type ();
-
- size_t len = ACE_OS::strlen (ns_internal.type ());
- // Makes a copy here. Caller needs to call delete to free up
- // memory.
- char *new_type;
- ACE_NEW_RETURN (new_type,
- char [len + 1],
- -1);
-
- ACE_OS::strncpy (new_type, temp, len);
- new_type[len] = '\0'; // Null terminate the string
- type = new_type;
- return 0;
- }
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::open (ACE_Naming_Context::Context_Scope_Type scope_in)
-{
- ACE_TRACE ("ACE_Local_Name_Space::open");
- this->ns_scope_ = scope_in;
-
- return this->create_manager ();
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK>
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Local_Name_Space (void)
- : allocator_ (0),
- name_space_map_ (0),
- name_options_ (0)
-{
- ACE_TRACE ("ACE_Local_Name_Space::ACE_Local_Name_Space");
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK>
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Local_Name_Space (ACE_Naming_Context::Context_Scope_Type scope_in,
- ACE_Name_Options *name_options)
- : name_options_ (name_options)
-{
- ACE_TRACE ("ACE_Local_Name_Space::ACE_Local_Name_Space");
- if (this->open (scope_in) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Local_Name_Space::ACE_Local_Name_Space")));
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK>
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::~ACE_Local_Name_Space (void)
-{
- ACE_TRACE ("ACE_Local_Name_Space::~ACE_Local_Name_Space");
-
- // Remove the map.
- delete this->allocator_;
- delete this->lock_;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager (void)
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
- int result = 0;
- ACE_SEH_TRY
- {
- result = this->create_manager_i ();
- }
- ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ()))
- {
- }
- return result;
-}
-
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::create_manager_i (void)
-{
- ACE_TRACE ("ACE_Local_Name_Space::create_manager");
- // Get directory name
- const ACE_TCHAR *dir = this->name_options_->namespace_dir ();
- const ACE_TCHAR *database = this->name_options_->database ();
-
- // Use process name as the file name.
- size_t len = ACE_OS::strlen (dir);
- len += ACE_OS::strlen (ACE_DIRECTORY_SEPARATOR_STR);
- len += ACE_OS::strlen (database) + 1;
-
- if (len >= MAXNAMELEN + MAXPATHLEN)
- {
- errno = ENAMETOOLONG;
- return -1;
- }
-
- ACE_OS::strcpy (this->context_file_, dir);
- ACE_OS::strcat (this->context_file_, ACE_DIRECTORY_SEPARATOR_STR);
- ACE_OS::strcat (this->context_file_, database);
-
-#if !defined (CHORUS)
- ACE_MEM_POOL_OPTIONS options (this->name_options_->base_address ());
-#else
- // Use base address == 0, don't use a fixed address.
- ACE_MEM_POOL_OPTIONS options (0,
- 0,
- 0,
- ACE_CHORUS_LOCAL_NAME_SPACE_T_SIZE);
-#endif /* CHORUS */
-
- ACE_TCHAR lock_name_for_local_name_space [MAXNAMELEN + MAXPATHLEN];
- ACE_TCHAR lock_name_for_backing_store [MAXPATHLEN + MAXNAMELEN];
- const ACE_TCHAR *postfix = database;
-
- size_t length = 0;
- length = sizeof lock_name_for_local_name_space / sizeof (ACE_TCHAR);
- ACE_OS::strncpy (lock_name_for_local_name_space,
- ACE_TEXT ("name_space_"),
- length);
- ACE_OS::strncat (lock_name_for_local_name_space,
- postfix,
- length - ACE_OS::strlen (ACE_TEXT ("name_space_")));
-
- length = sizeof lock_name_for_backing_store / sizeof (ACE_TCHAR);
- ACE_OS::strncpy (lock_name_for_backing_store,
- ACE_TEXT ("backing_store_"),
- length);
- ACE_OS::strncat (lock_name_for_backing_store,
- postfix,
- length - ACE_OS::strlen (ACE_TEXT ("backing_store_")));
-
- // Create the allocator with the appropriate options.
- ACE_NEW_RETURN (this->allocator_,
- ALLOCATOR (this->context_file_,
- lock_name_for_backing_store,
- &options), -1);
-
- if (ACE_LOG_MSG->op_status ())
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Allocator::Allocator\n")),
- -1);
-
- ACE_NEW_RETURN (this->lock_,
- ACE_LOCK (lock_name_for_local_name_space),
- -1);
-
-#if !defined (ACE_LACKS_ACCESS)
- // Now check if the backing store has been created successfully
- if (ACE_OS::access (this->context_file_, F_OK) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("create_manager\n")),
- -1);
-#endif /* ACE_LACKS_ACCESS */
-
- void *ns_map = 0;
-
- // This is the easy case since if we find the Name Server Map
- // Manager we know it's already initialized.
- if (this->allocator_->find (ACE_NAME_SERVER_MAP, ns_map) == 0)
- {
- this->name_space_map_ = (ACE_Name_Space_Map <ALLOCATOR> *) ns_map;
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("name_space_map_ = %d, ns_map = %d\n"),
- this->name_space_map_, ns_map));
- }
-
- // This is the hard part since we have to avoid potential race
- // conditions... We will use the double check here
- else
- {
- ACE_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
-
- // This is the easy case since if we find the Name Server Map
- // Manager we know it's already initialized.
- if (this->allocator_->find (ACE_NAME_SERVER_MAP, ns_map) == 0)
- {
- this->name_space_map_ = (ACE_Name_Space_Map <ALLOCATOR> *) ns_map;
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("name_space_map_ = %d, ns_map = %d\n"),
- this->name_space_map_, ns_map));
- }
- else
- {
- size_t map_size = sizeof *this->name_space_map_;
- ns_map = this->allocator_->malloc (map_size);
-
- // Initialize the map into its memory location (e.g., shared memory).
- ACE_NEW_RETURN (this->name_space_map_,
- (ns_map) ACE_Name_Space_Map <ALLOCATOR> (this->allocator_),
- -1);
-
- if (this->allocator_->bind (ACE_NAME_SERVER_MAP, ns_map) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("create_manager\n")), -1);
- }
-
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("name_space_map_ = %d, ns_map = %d\n"),
- this->name_space_map_, ns_map));
- }
-
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_names_i (ACE_PWSTRING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Local_Name_Space::list_names");
- ACE_READ_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
-
- MAP_ITERATOR map_iterator (*this->name_space_map_);
- MAP_ENTRY *map_entry;
-
- int result = 1;
-
- for (map_entry = 0;
- map_iterator.next (map_entry) != 0;
- map_iterator.advance())
- {
- if (map_entry->ext_id_.strstr (pattern) != -1)
- {
- ACE_WString entry (map_entry->ext_id_ );
-
- if (set.insert (entry) == -1)
- {
- result = -1;
- break;
- }
- else
- result = 0;
- }
- }
-
- return result;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_values_i (ACE_PWSTRING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Local_Name_Space::list_values");
- ACE_READ_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
-
- MAP_ITERATOR map_iterator (*this->name_space_map_);
- MAP_ENTRY *map_entry;
-
- int result = 1;
-
- for (map_entry = 0;
- map_iterator.next (map_entry) != 0;
- map_iterator.advance ())
- {
- if (map_entry->int_id_.value ().strstr (pattern) != -1)
- {
- ACE_WString entry (map_entry->int_id_.value ());
-
- if (set.insert (entry) == -1)
- {
- result = -1;
- break;
- }
- else
- result = 0;
- }
- }
-
- return result;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_types_i (ACE_PWSTRING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Local_Name_Space::list_types");
- ACE_READ_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
-
- MAP_ITERATOR map_iterator (*this->name_space_map_);
- MAP_ENTRY *map_entry;
-
- char *compiled_regexp = 0;
-
- // Note that char_rep() allocates memory so we need to delete it
- char *pattern_rep = pattern.char_rep ();
-
- // Check for wildcard case first.
- if (ACE_OS::strcmp ("", pattern_rep) == 0)
- ACE_ALLOCATOR_RETURN (compiled_regexp,
- ACE_OS::strdup (""),
- -1);
- else
- // Compile the regular expression (the 0's cause ACE_OS::compile
- // to allocate space).
-#if defined (ACE_HAS_REGEX)
- compiled_regexp = ACE_OS::compile (pattern_rep, 0, 0);
-#else
- // If we don't have regular expressions just use the pattern
- // directly.
- compiled_regexp = pattern_rep;
-#endif /* ACE_HAS_REGEX */
-
- int result = 1;
-
- for (map_entry = 0;
- map_iterator.next (map_entry) != 0;
- map_iterator.advance ())
- {
- // Get the type
- const char *type = map_entry->int_id_.type ();
-
- // Everything matches the wildcard.
- if (ACE_OS::strcmp ("", pattern_rep) == 0
-#if defined (ACE_HAS_REGEX)
- || ACE_OS::step (type, compiled_regexp) != 0)
-#else
- // If we don't have regular expressions just use strstr() for
- // substring matching.
- || ACE_OS::strstr (type, compiled_regexp) != 0)
-#endif /* ACE_HAS_REGEX */
-
- {
- ACE_WString entry (type);
-
- if (set.insert (entry) == -1)
- {
- result = -1;
- break;
- }
- else
- result = 0;
- }
- }
-#if defined (ACE_HAS_REGEX)
- if (compiled_regexp)
- ACE_OS::free ((void *) compiled_regexp);
-#endif /* ACE_HAS_REGEX */
- delete [] pattern_rep; // delete pattern_rep;
- return result;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space <ACE_MEM_POOL_2, ACE_LOCK>::list_name_entries_i (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Local_Name_Space::list_name_entries");
- ACE_READ_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
-
- MAP_ITERATOR map_iterator (*this->name_space_map_);
- MAP_ENTRY *map_entry;
-
- for (map_entry = 0;
- map_iterator.next (map_entry) != 0;
- map_iterator.advance())
- {
- if (map_entry->ext_id_.strstr (pattern) != -1)
- {
- ACE_Name_Binding entry (map_entry->ext_id_,
- map_entry->int_id_.value (),
- map_entry->int_id_.type ());
-
- if (set.insert (entry) == -1)
- return -1;
- }
- }
-
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_value_entries_i (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Local_Name_Space::list_value_entries");
- ACE_READ_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
-
- MAP_ITERATOR map_iterator (*this->name_space_map_);
- MAP_ENTRY *map_entry;
-
- for (map_entry = 0;
- map_iterator.next (map_entry) != 0;
- map_iterator.advance ())
- {
- if (map_entry->int_id_.value ().strstr (pattern) != -1)
- {
- ACE_Name_Binding entry (map_entry->ext_id_,
- map_entry->int_id_.value (),
- map_entry->int_id_.type ());
-
- if (set.insert (entry) == -1)
- return -1;
- }
- }
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_type_entries_i (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Local_Name_Space::list_type_entries");
- ACE_READ_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1);
-
- MAP_ITERATOR map_iterator (*this->name_space_map_);
- MAP_ENTRY *map_entry;
-
- char *compiled_regexp = 0;
- // Note that char_rep() allocates memory so we need to delete it
- char *pattern_rep = pattern.char_rep ();
-
- // Check for wildcard case first.
- if (ACE_OS::strcmp ("", pattern_rep) == 0)
- compiled_regexp = ACE_OS::strdup ("");
- else
- // Compile the regular expression (the 0's cause ACE_OS::compile to allocate space).
-#if defined (ACE_HAS_REGEX)
- compiled_regexp = ACE_OS::compile (pattern_rep, 0, 0);
-#else /* If we don't have regular expressions just the pattern directly. */
- compiled_regexp = pattern_rep;
-#endif /* ACE_HAS_REGEX */
-
- for (map_entry = 0;
- map_iterator.next (map_entry) != 0;
- map_iterator.advance ())
- {
- // Get the type.
- const char *type = map_entry->int_id_.type ();
-
- if (ACE_OS::strcmp ("", pattern_rep) == 0 // Everything matches the wildcard.
-#if defined (ACE_HAS_REGEX)
- || ACE_OS::step (type, compiled_regexp) != 0)
-#else /* If we don't have regular expressions just use strstr() for substring matching. */
- || ACE_OS::strstr (type, compiled_regexp) != 0)
-#endif /* ACE_HAS_REGEX */
- {
- ACE_Name_Binding entry (map_entry->ext_id_,
- map_entry->int_id_.value (),
- map_entry->int_id_.type ());
-
- if (set.insert (entry) == -1)
- return -1;
- }
- }
-#if defined (ACE_HAS_REGEX)
- if (compiled_regexp)
- ACE_OS::free ((void *) compiled_regexp);
-#endif /* ACE_HAS_REGEX */
- delete [] pattern_rep; // delete pattern_rep;
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> void
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::dump_i (void) const
-{
- ACE_TRACE ("ACE_Local_Name_Space::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- MAP_ITERATOR map_iterator (*this->name_space_map_);
- MAP_ENTRY *map_entry;
-
- for (map_entry = 0;
- map_iterator.next (map_entry) != 0;
- map_iterator.advance())
- {
- char *key = map_entry->ext_id_.char_rep ();
- char *value = map_entry->int_id_.value ().char_rep ();
-#if !defined (ACE_NLOGGING)
- const char *type = map_entry->int_id_.type ();
-#endif /* ! ACE_NLOGGING */
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("key=%s\nvalue=%s\ntype=%s\n"),
- key, value, type));
- // We need to delete key and value since char_rep allocates memory for them
- delete [] key;
- delete [] value;
- }
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_names (ACE_PWSTRING_SET &set,
- const ACE_WString &pattern)
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
- int result = 0;
- ACE_SEH_TRY
- {
- result = this->list_names_i (set, pattern);
- }
- ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ()))
- {
- }
- return result;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_values (ACE_PWSTRING_SET &set,
- const ACE_WString &pattern)
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
- int result = 0;
- ACE_SEH_TRY
- {
- result = this->list_values_i (set, pattern);
- }
- ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ()))
- {
- }
- return result;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_types (ACE_PWSTRING_SET &set,
- const ACE_WString &pattern)
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
- int result = 0;
- ACE_SEH_TRY
- {
- result = this->list_types_i (set, pattern);
- }
- ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ()))
- {
- }
- return result;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space <ACE_MEM_POOL_2, ACE_LOCK>::list_name_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
- int result = 0;
- ACE_SEH_TRY
- {
- result = this->list_name_entries_i (set, pattern);
- }
- ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ()))
- {
- }
- return result;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_value_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
- int result = 0;
- ACE_SEH_TRY
- {
- result = this->list_value_entries_i (set, pattern);
- }
- ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ()))
- {
- }
- return result;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> int
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::list_type_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
- int result = 0;
- ACE_SEH_TRY
- {
- result = this->list_type_entries_i (set, pattern);
- }
- ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ()))
- {
- }
- return result;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> void
-ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::dump (void) const
-{
- // Note that we *must* use structured exception handling here
- // because (1) we may need to commit virtual memory pages and (2)
- // C++ exception handling doesn't support resumption.
-
- // This should really be a const cast
- ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK> *fake_this =
- (ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK> *) this;
- ACE_UNUSED_ARG (fake_this);
-
- ACE_SEH_TRY
- {
- this->dump_i ();
- }
- ACE_SEH_EXCEPT (fake_this->remap (GetExceptionInformation ()))
- {
- }
-}
-
-#endif /* ACE_LOCAL_NAME_SPACE_T_C */
diff --git a/ace/Local_Name_Space_T.h b/ace/Local_Name_Space_T.h
deleted file mode 100644
index 5fce9307b7a..00000000000
--- a/ace/Local_Name_Space_T.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Local_Name_Space_T.h
-//
-// = AUTHOR
-// Prashant Jain (pjain@cs.wustl.edu), Irfan Pyarali
-// (irfan@wuerl.wustl.edu), and Douglas C. Schmidt
-// (schmidt@cs.wustl.edu).
-//
-// ============================================================================
-
-#ifndef ACE_LOCAL_NAME_SPACE_T_H
-#define ACE_LOCAL_NAME_SPACE_T_H
-#include "ace/pre.h"
-
-#include "ace/Name_Space.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Naming_Context.h"
-#include "ace/SString.h"
-#include "ace/Local_Name_Space.h"
-
-// A short-hand name for our set of name/value/type tuples passed back
-// to callers.
-typedef ACE_Unbounded_Set<ACE_WString> ACE_WSTRING_SET;
-
-// Simplify later usage by defining typedefs.
-#if (1)
-#include "ace/Hash_Map_Manager.h"
-typedef ACE_Hash_Map_Manager<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex> MAP_MANAGER;
-typedef ACE_Hash_Map_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex> MAP_ITERATOR;
-typedef ACE_Hash_Map_Entry <ACE_NS_String, ACE_NS_Internal> MAP_ENTRY;
-#else
-#include "ace/Map_Manager.h"
-typedef ACE_Map_Manager<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex> MAP_MANAGER;
-typedef ACE_Map_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex> MAP_ITERATOR;
-typedef ACE_Map_Entry <ACE_NS_String, ACE_NS_Internal> MAP_ENTRY;
-#endif /* 0 */
-
-template <class ALLOCATOR>
-class ACE_Name_Space_Map : public MAP_MANAGER
-{
- // = TITLE
- // This class serves as a Proxy that ensures our process always
- // has the appropriate allocator in place for every operation
- // that accesses or updates the Map Manager.
- //
- // = DESCRIPTION
- // We need this class because otherwise the ALLOCATOR
- // pointer will be stored in the Map_Manager that resides within
- // shared memory. Naturally, this will cause horrible problems
- // since only the first process to set that pointer will be
- // guaranteed the address of the ALLOCATOR is meaningful!
-public:
- ACE_Name_Space_Map (ALLOCATOR *alloc);
- // Constructor.
-
- // = The following methods are Proxies to the underlying methods
- // provided by <ACE_Hash_Map_Manager>. When they are called, they
- // acquire the lock, set the allocator to the one specific to this
- // process, and then call down to perform the intended operation.
- int bind (const ACE_NS_String &,
- const ACE_NS_Internal &,
- ALLOCATOR *alloc);
-
- int unbind (const ACE_NS_String &,
- ACE_NS_Internal &,
- ALLOCATOR *alloc);
-
- int rebind (const ACE_NS_String &,
- const ACE_NS_Internal &,
- ACE_NS_String &,
- ACE_NS_Internal &,
- ALLOCATOR *alloc);
-
- int find (const ACE_NS_String &,
- ACE_NS_Internal &,
- ALLOCATOR *alloc);
-
- int close (ALLOCATOR *alloc);
-};
-
-template <ACE_MEM_POOL_1, class ACE_LOCK>
-class ACE_Local_Name_Space : public ACE_Name_Space
-{
- // = TITLE
- // Maintaining accesses Local Name Server Database. Allows to
- // add NameBindings, change them, remove them and resolve
- // NameBindings.
- //
- // = DESCRIPTION
- // Manages a Naming Service for a local name space which
- // includes bindings for node_local and host_local naming
- // contexts. All strings are stored in wide character format.
- // A Name Binding consists of a name (that's the key), a value
- // string and an optional type string (no wide chars).
-public:
- // = Initialization and termination methods.
- ACE_Local_Name_Space (void);
- // "Do-nothing" constructor.
-
- ACE_Local_Name_Space (ACE_Naming_Context::Context_Scope_Type scope_in,
- ACE_Name_Options *name_options);
- // Specifies the scope of this namespace, opens and memory-maps the
- // associated file (if accessible) or contacts the dedicated name
- // server process for NET_LOCAL namespace.
-
- int open (ACE_Naming_Context::Context_Scope_Type scope_in);
- // Specifies the scope of this namespace, opens and memory-maps the
- // associated file (if accessible) or contacts the dedicated name
- // server process for NET_LOCAL namespace.
-
- ~ACE_Local_Name_Space (void);
- // destructor, do some cleanup :TBD: last dtor should "compress"
- // file
-
- virtual int bind (const ACE_WString &name,
- const ACE_WString &value,
- const char *type = "");
- // Bind a new name to a naming context (Wide character strings).
-
- virtual int rebind (const ACE_WString &name,
- const ACE_WString &value,
- const char *type = "");
- // Overwrite the value or type of an existing name in a
- // ACE_Local_Name_Space or bind a new name to the context, if it
- // didn't exist yet. (Wide charcter strings interface).
-
- virtual int unbind (const ACE_WString &name);
- virtual int unbind_i (const ACE_WString &name);
- // Delete a name from a ACE_Local_Name_Space (Wide charcter strings
- // Interface).
-
- virtual int resolve (const ACE_WString &name,
- ACE_WString &value,
- char *&type);
- virtual int resolve_i (const ACE_WString &name,
- ACE_WString &value,
- char *&type);
- // Get value and type of a given name binding (Wide chars). The
- // caller is responsible for deleting <type>!
-
- virtual int list_names (ACE_WSTRING_SET &set,
- const ACE_WString &pattern);
- virtual int list_names_i (ACE_WSTRING_SET &set,
- const ACE_WString &pattern);
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string.
-
- virtual int list_values (ACE_WSTRING_SET &set,
- const ACE_WString &pattern);
- virtual int list_values_i (ACE_WSTRING_SET &set,
- const ACE_WString &pattern);
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string.
-
- virtual int list_types (ACE_WSTRING_SET &set,
- const ACE_WString &pattern);
- virtual int list_types_i (ACE_WSTRING_SET &set,
- const ACE_WString &pattern);
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string.
-
- virtual int list_name_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- virtual int list_name_entries_i (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_value_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- virtual int list_value_entries_i (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_type_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- virtual int list_type_entries_i (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual void dump (void) const;
- virtual void dump_i (void) const;
- // Dump the state of the object
-
- // = I just know this is going to cause problems on some platform...
- typedef ACE_Allocator_Adapter <ACE_Malloc <ACE_MEM_POOL_2, ACE_LOCK> >
- ALLOCATOR;
-
-private:
-#if defined (ACE_WIN32)
- int remap (EXCEPTION_POINTERS *ep);
- // Remap the backing store
-#endif /* ACE_WIN32 */
-
- int shared_bind (const ACE_WString &name,
- const ACE_WString &value,
- const char *type, int rebind);
- int shared_bind_i (const ACE_WString &name,
- const ACE_WString &value,
- const char *type, int rebind);
- // Factor out code from <bind> and <rebind>.
-
- int create_manager (void);
- int create_manager_i (void);
- // Allocate the appropriate type of map manager that stores the
- // key/value binding.
-
- ALLOCATOR *allocator_;
- // Pointer to the allocator
-
- ACE_Name_Space_Map <ALLOCATOR> *name_space_map_;
- // Pointer to the allocated map manager.
-
- ACE_Naming_Context::Context_Scope_Type ns_scope_;
- // Scope of this naming context (e.g., PROC_LOCAL, NODE_LOCAL, or
- // NET_LOCAL).
-
- ACE_Name_Options *name_options_;
- // Keep track of the options such as database name etc
-
- ACE_TCHAR context_file_[MAXPATHLEN + MAXNAMELEN];
- // Name of the file used as the backing store.
-
- ACE_LOCK *lock_;
- // Synchronization variable.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Local_Name_Space_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Local_Name_Space_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_LOCAL_NAME_SPACE_T_H */
diff --git a/ace/Local_Tokens.cpp b/ace/Local_Tokens.cpp
deleted file mode 100644
index e1f47c3e760..00000000000
--- a/ace/Local_Tokens.cpp
+++ /dev/null
@@ -1,1439 +0,0 @@
-// Local_Tokens.cpp
-// $Id$
-
-#include "ace/Thread.h"
-#include "ace/Local_Tokens.h"
-#include "ace/Token_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Local_Tokens.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Local_Tokens, "$Id$")
-
-void
-ACE_Tokens::dump (void) const
-{
- ACE_TRACE ("ACE_Tokens::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Tokens::dump:\n")
- ACE_TEXT (" reference_cont_ = %d\n")
- ACE_TEXT (" token_name_ = %s\n"),
- reference_count_, token_name_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("waiters_\n")));
- this->waiters_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Tokens::ACE_Tokens (void)
- : visited_ (0),
- reference_count_ (0)
-{
- ACE_TRACE ("ACE_Tokens::ACE_Tokens");
-}
-
-void
-ACE_Tokens::make_owner (ACE_TPQ_Entry *caller)
-{
- this->waiters_.remove (caller);
- this->waiters_.enqueue (caller, 0);
-}
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-ACE_Null_Token::ACE_Null_Token (void)
-{
-}
-
-ACE_Null_Token::~ACE_Null_Token (void)
-{
-}
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-void
-ACE_TPQ_Entry::dump (void) const
-{
- ACE_TRACE ("ACE_TPQ_Entry::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ACE_TPQ_Entry::dump:\n")
- ACE_TEXT (" nesting_level_ = %d\n")
- ACE_TEXT (" client_id_ = %s\n"),
- nesting_level_,
- client_id_));
-
- if (next_ != 0)
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next:.\n")));
- next_->dump ();
- }
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TPQ_Entry::dump end.\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_TPQ_Entry::ACE_TPQ_Entry (const ACE_Token_Proxy *new_proxy,
- const ACE_TCHAR *client_id)
- : cond_var_ (lock_),
- next_ (0),
- // This const typecast is safe.
- proxy_ ((ACE_Token_Proxy *) new_proxy),
- nesting_level_ (0),
- sleep_hook_ (0)
-{
- ACE_TRACE ("ACE_TPQ_Entry::ACE_TPQ_Entry");
-
- if (client_id != 0)
- this->client_id (client_id);
- else
- {
- // Just make sure we have enough space.
- ACE_TCHAR host_name[MAXHOSTNAMELEN];
- ACE_TCHAR name[(sizeof host_name / sizeof (ACE_TCHAR)) + 256];
- ACE_OS::hostname (host_name, sizeof host_name);
-
- ACE_OS::sprintf (name,
- ACE_TEXT ("/%s/%u/%lu"),
- host_name,
- ACE_static_cast (unsigned int, ACE_OS::getpid ()),
- ACE_Thread::self ());
-
- this->client_id (name);
- }
-}
-
-ACE_TPQ_Entry::ACE_TPQ_Entry (void)
- : cond_var_ (lock_),
- proxy_ (0),
- nesting_level_ (0),
- sleep_hook_ (0)
-{
- ACE_TRACE ("ACE_TPQ_Entry::ACE_TPQ_Entry null const.");
-}
-
-ACE_TPQ_Entry::ACE_TPQ_Entry (const ACE_TPQ_Entry &rhs)
-: cond_var_ (lock_)
-{
- ACE_TRACE ("ACE_TPQ_Entry::ACE_TPQ_Entry copy const.");
- *this = rhs;
-}
-
-ACE_TPQ_Entry::~ACE_TPQ_Entry (void)
-{
- ACE_TRACE ("ACE_TPQ_Entry::~ACE_TPQ_Entry");
-}
-
-void
-ACE_TPQ_Entry::operator= (const ACE_TPQ_Entry& rhs)
-{
- ACE_TRACE ("ACE_TPQ_Entry::operator=");
- if (&rhs == this)
- return;
- this->proxy_ = rhs.proxy ();
- this->nesting_level_ = rhs.nesting_level ();
- this->client_id (rhs.client_id ());
- this->sleep_hook_ = rhs.sleep_hook ();
-}
-
-void
-ACE_TPQ_Entry::client_id (const ACE_TCHAR *id)
-{
- ACE_TRACE ("ACE_TPQ_Entry::client_id");
-
- if (id == 0)
- return;
-
- int n = ACE_OS::strlen (id) + 1;
-
- if (n >= ACE_MAXCLIENTIDLEN)
- n = ACE_MAXCLIENTIDLEN - 1;
-
- ACE_OS::strncpy (this->client_id_, (ACE_TCHAR *) id, n);
- this->client_id_[ACE_MAXCLIENTIDLEN - 1] = '\0';
-}
-
-void
-ACE_TSS_TPQ_Entry::dump (void) const
-{
- ACE_TRACE ("ACE_TSS_TPQ_Entry::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- ACE_DEBUG ((LM_DEBUG, (char *) "ACE_TSS_TPQ_Entry::dump:\n",
- (char *) " client_id_ = %s\n",
- (char *) client_id_ == 0 ? (char *) "0" : (char *) client_id_));
-#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TSS_TPQ_Entry::dump:\n")
- ACE_TEXT (" client_id_ = %s\n"),
- client_id_ == 0 ? ACE_TEXT ("0") : client_id_));
-#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
- ACE_TPQ_ENTRY::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_TSS_TPQ_Entry::ACE_TSS_TPQ_Entry (const ACE_Token_Proxy *proxy,
- const ACE_TCHAR *client_id)
-: proxy_ (proxy),
- client_id_ (client_id)
-{
- ACE_TRACE ("ACE_TSS_TPQ_Entry::ACE_TSS_TPQ_Entry");
-}
-
-ACE_TPQ_Entry *
-ACE_TSS_TPQ_Entry::make_TSS_TYPE (void) const
-{
- ACE_TRACE ("ACE_TSS_TPQ_Entry::make_TSS_TYPE");
- ACE_TPQ_Entry *temp;
-
- ACE_NEW_RETURN (temp,
- ACE_TPQ_Entry (this->proxy_,
- this->client_id_),
- 0);
- return temp;
-}
-
-ACE_TSS_TPQ_Entry::operator ACE_TPQ_Entry * (void)
-{
-#if !defined (ACE_NO_TSS_TOKENS)
- return (ACE_TPQ_Entry *) (*((ACE_TSS<ACE_TPQ_Entry> *) this));
-#else
- // Not sure this is the right thing to do, but it seems to work.
- // The base class ALSO has a proxy_ and client_id_ members (weird?)
- // which don't get initialised. The following two lines make this
- // the same as the subclass, so that the slicing works .
- ACE_TPQ_ENTRY::proxy ((ACE_Token_Proxy *)(this->proxy_));
- ACE_TPQ_ENTRY::client_id (this->client_id_);
- return (ACE_TPQ_Entry *) this;;
-#endif /* !ACE_NO_TSS_TOKENS */
-}
-
-ACE_TPQ_Iterator::ACE_TPQ_Iterator (ACE_Token_Proxy_Queue &q)
- : current_ (q.head_)
-{
- ACE_TRACE ("ACE_TPQ_Iterator::ACE_TPQ_Iterator");
-}
-
-int
-ACE_TPQ_Iterator::next (ACE_TPQ_Entry *&next_item)
-{
- ACE_TRACE ("ACE_TPQ_Iterator::next");
-
- next_item = this->current_;
-
- return current_ != 0;
-}
-
-int
-ACE_TPQ_Iterator::done (void) const
-{
- ACE_TRACE ("ACE_TPQ_Iterator::done");
-
- return this->current_ == 0;
-}
-
-void
-ACE_TPQ_Iterator::advance (void)
-{
- ACE_TRACE ("ACE_TPQ_Iterator::advance");
-
- if (current_ != 0)
- this->current_ = this->current_->next_;
-}
-
-void
-ACE_TPQ_Iterator::dump (void) const
-{
- ACE_TRACE ("ACE_TPQ_Iterator::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TPQ_Iterator::dump:\n")
- ACE_TEXT (" current_ = %d\n"),
- (long) this->current_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("head_ and tail_\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Token_Proxy_Queue::dump (void) const
-{
- ACE_TRACE ("ACE_Token_Proxy_Queue::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy_Queue::dump:\n")
- ACE_TEXT (" size_ = %d\n"),
- size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("head_ and tail_\n")));
- if (this->head_ != 0)
- this->head_->dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy_Queue::dump end.\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Token_Proxy_Queue::ACE_Token_Proxy_Queue (void)
- : head_ (0),
- tail_ (0),
- size_ (0)
-{
- ACE_TRACE ("ACE_Token_Proxy_Queue::ACE_Token_Proxy_Queue");
-}
-
-void
-ACE_Token_Proxy_Queue::enqueue (ACE_TPQ_Entry *tpq,
- int position)
-{
- ACE_TRACE ("ACE_Token_Proxy_Queue::enqueue");
- tpq->next_ = 0;
-
- ++this->size_;
-
- if (this->head_ == 0)
- {
- // make tpq the entire list
- this->head_ = this->tail_ = tpq;
- return;
- }
-
- if (position == 0)
- {
- // make head of list
- tpq->next_ = this->head_;
- this->head_ = tpq;
- return;
- }
-
- if (position == -1)
- {
- // stick at back of list
- this->tail_->next_ = tpq;
- this->tail_ = tpq;
- return;
- }
-
- // walk through list to insertion point
- ACE_TPQ_Entry *temp = head_;
-
- for (int x = position;
- x > 1;
- --x)
- {
- // end of queue?
- if (temp->next_ == 0)
- break;
- // advance pointer
- else
- temp = temp->next_;
- }
-
- // insert new tpq after temp
- tpq->next_ = temp->next_;
- temp->next_ = tpq;
-}
-
-void
-ACE_Token_Proxy_Queue::dequeue (void)
-{
- ACE_TRACE ("ACE_Token_Proxy_Queue::dequeue");
-
- if (head_ == 0)
- return;
-
- ACE_TPQ_Entry *temp = this->head_;
-
- this->head_ = this->head_->next_;
-
- temp->next_ = 0;
-
- --this->size_;
-
- if (this->head_ == 0 && this->size_ != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("incorrect size = %d\n"),
- this->size_));
-}
-
-/*
-int
-ACE_Token_Proxy_Queue::member (const ACE_TCHAR *id)
-{
- ACE_TRACE ("ACE_Token_Proxy_Queue::member");
-
- for (ACE_TPQ_Entry *temp = this->head_;
- temp != 0;
- temp = temp->next_)
- if (ACE_OS::strcmp (temp->client_id (), id) == 0)
- // We found it!
- return 1;
-
- // We didn't find it :-(
- return 0;
-}
-*/
-
-void
-ACE_Token_Proxy_Queue::remove (const ACE_TPQ_Entry *remove_me)
-{
- ACE_TRACE ("ACE_Token_Proxy_Queue::remove");
- // sanity
- if ((remove_me == 0) || (this->head_ == 0))
- return;
-
- // is it the head?
- if (this->head_ == remove_me) // pointer comparison.
- {
- this->head_ = this->head_->next_;
- if (this->head_ == 0)
- this->tail_ = 0;
-
- --this->size_;
- return;
- }
-
- ACE_TPQ_Entry *temp = this->head_;
- ACE_TPQ_Entry *previous = 0;
-
- // is it in the middle or tail?
- while (temp != 0)
- {
- if (temp == remove_me)
- {
- // previous should never be null since the first if
- // conditional should always be false
- previous->next_ = temp->next_;
- // is it the tail?
- if (this->tail_ == temp)
- this->tail_ = previous;
-
- --this->size_;
- return;
- }
-
- previous = temp;
- temp = temp->next_;
- }
-
- // it wasn't in the list.
- return;
-}
-
-void
-ACE_Mutex_Token::dump (void) const
-{
- ACE_TRACE ("ACE_Mutex_Token::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Mutex_Token::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("lock_\n")));
- lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
- ACE_Tokens::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Mutex_Token::dump end.\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Mutex_Token::ACE_Mutex_Token (const ACE_TCHAR *name)
-{
- ACE_TRACE ("ACE_Mutex_Token::ACE_Mutex_Token");
-
- int n = ACE_OS::strlen (name) + 1; // + 1 for \0
-
- if (n > ACE_MAXTOKENNAMELEN)
- n = ACE_MAXTOKENNAMELEN - 1;
-
- ACE_OS::strncpy (this->token_name_, name, n);
- this->token_name_[ACE_MAXTOKENNAMELEN - 1] = '\0';
-}
-
-ACE_Mutex_Token::~ACE_Mutex_Token (void)
-{
- ACE_TRACE ("ACE_Mutex_Token::~ACE_Mutex_Token");
-}
-
-int
-ACE_Mutex_Token::acquire (ACE_TPQ_Entry *caller,
- int ignore_deadlock,
- int notify)
-{
- ACE_TRACE ("ACE_Mutex_Token::acquire");
- // We need to acquire two locks. This one to ensure that only one
- // thread uses this token at a time.
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon1, this->lock_, -1);
- // This one to ensure an atomic transaction across all tokens. Note
- // that this order is crucial too. It's resource coloring for other
- // threads which may be calling this same token.
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon2, ACE_Token_Manager::instance ()->mutex (), -1);
-
- // Does _anyone_ own the token?
- if (this->owner () == 0)
- {
- // there are no waiters, so queue as the first waiter (the owner.)
- this->waiters_.enqueue (caller, -1);
- return 0; // success
- }
-
- // Does the caller already own it?
- if (this->is_owner (caller->client_id ()))
- {
- // Recursive acquisition.
- caller->nesting_level (1);
- return 0; // success
- }
-
- // Check for deadlock.
- if (!ignore_deadlock
- && ACE_Token_Manager::instance ()->check_deadlock (caller->proxy ()) == 1)
- {
- errno = EDEADLK;
- ACE_RETURN (-1);
- }
-
- // Someone owns it. Sorry, you're getting queued up at the end of
- // the waiter queue.
- this->waiters_.enqueue (caller, -1);
-
- if (notify)
- this->owner ()->call_sleep_hook ();
-
- errno = EWOULDBLOCK;
- ACE_RETURN (-1);
-}
-
-int
-ACE_Mutex_Token::tryacquire (ACE_TPQ_Entry *caller)
-{
- ACE_TRACE ("ACE_Mutex_Token::tryacquire");
- // We need to acquire two locks. This one to ensure that only one
- // thread uses this token at a time.
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon1, this->lock_, -1);
- // This one to ensure an atomic transaction across all tokens. Note
- // that this order is crucial too. It's resource coloring for other
- // threads which may be calling this same token.
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon2, ACE_Token_Manager::instance ()->mutex (), -1);
-
- // Does _anyone_ own the token?
- if (this->owner () == 0)
- {
- this->waiters_.enqueue (caller, -1);
- return 0; // success
- }
- // Does the caller already own it?
- if (this->is_owner (caller->client_id ()))
- {
- // recursive acquisition
- caller->nesting_level (1);
- return 0; // success
- }
- else
- // Someone owns it. Fail.
- {
- errno = EWOULDBLOCK;
- ACE_RETURN (-1);
- }
-}
-
-int
-ACE_Mutex_Token::renew (ACE_TPQ_Entry *caller,
- int requeue_position)
-{
- ACE_TRACE ("ACE_Mutex_Token::renew");
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1);
-
- // Verify that the caller is the owner.
- if (this->is_owner (caller->client_id ()) == 0)
- {
- errno = EACCES;
- ACE_RETURN (-1);
- }
-
- // The caller is the owner, so check to see if there are any
- // waiters. If not, we just keep the token. == 1 means that there
- // is only the owner.
- if (this->waiters_.size () == 1 || requeue_position == 0)
- return 0;
-
- // Requeue the caller.
- this->waiters_.dequeue ();
-
- this->waiters_.enqueue (caller, requeue_position);
-
- // Notify new owner.
- if (this->owner () != 0)
- this->owner ()->proxy ()->token_acquired (this->owner ());
-
- // Tell the caller that the operation would block.
- errno = EWOULDBLOCK;
- ACE_RETURN (-1);
-}
-
-// Release the current holder of the token (which had
-// better be the caller's thread!).
-
-int
-ACE_Mutex_Token::release (ACE_TPQ_Entry *caller)
-{
- ACE_TRACE ("ACE_Mutex_Token::release");
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1);
-
- // Does anyone own the token?
- if (this->owner () == 0)
- {
- errno = EACCES;
- ACE_RETURN (-1);
- }
-
- // Is the caller the owner.
- if (this->is_owner (caller->client_id ()))
- {
- // Check the nesting level.
- if (caller->nesting_level () > 0)
- caller->nesting_level (-1);
- else
- {
- this->waiters_.dequeue ();
- // Notify new owner.
- if (this->owner () != 0)
- this->owner ()->proxy ()->token_acquired (this->owner ());
- }
- }
- else
- this->remove (caller);
-
- return 0;
-}
-
-int
-ACE_Mutex_Token::owners (OWNER_STACK &stack,
- const ACE_TCHAR *id)
-{
- ACE_TRACE ("ACE_Mutex_Token::owners");
- if (this->owner () != 0)
- {
- stack.push (this->owner ());
- // If an <id> is specified, return whether it is the owner being
- // returned.
- if (id != 0)
- return this->owner ()->equal_client_id (id);
- }
-
- return 0;
-}
-
-int
-ACE_Mutex_Token::is_waiting_for (const ACE_TCHAR *id)
-{
- ACE_TRACE ("ACE_Mutex_Token::is_waiting_for");
- // If there is no owner, or <id> is the owner, return false.
- if ((this->owner () == 0) || this->is_owner (id))
- return 0;
-
- // Step through each waiter looking for <id>.
- ACE_TPQ_Iterator iterator (waiters_);
- iterator.advance ();
- for (ACE_TPQ_Entry *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- if (temp->equal_client_id (id))
- return 1;
- }
-
- return 0;
-}
-
-int
-ACE_Mutex_Token::is_owner (const ACE_TCHAR *id)
-{
- ACE_TRACE ("ACE_Mutex_Token::is_owner");
- // If there is an owner, return whether it is <id>.
- if ((this->owner () != 0) &&
- this->owner ()->equal_client_id (id))
- return 1;
- else
- return 0;
-}
-
-void
-ACE_RW_Token::dump (void) const
-{
- ACE_TRACE ("ACE_RW_Token::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_RW_Token::dump:\n")
- ACE_TEXT ("num_writers_ = %d\n"), num_writers_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("lock_\n")));
- this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
- ACE_Tokens::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_RW_Token::dump end.\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_RW_Token::ACE_RW_Token (const ACE_TCHAR *name)
-: num_writers_ (0)
-{
- ACE_TRACE ("ACE_RW_Token::ACE_RW_Token");
-
- int n = ACE_OS::strlen (name) + 1; // + 1 for \0
-
- if (n > ACE_MAXTOKENNAMELEN)
- n = ACE_MAXTOKENNAMELEN;
-
- ACE_OS::strncpy (this->token_name_, name, n);
- this->token_name_[ACE_MAXTOKENNAMELEN - 1] = '\0';
-}
-
-ACE_RW_Token::~ACE_RW_Token (void)
-{
- ACE_TRACE ("ACE_RW_Token::~ACE_RW_Token");
-}
-
-int
-ACE_RW_Token::acquire (ACE_TPQ_Entry *caller,
- int ignore_deadlock,
- int notify)
-{
- ACE_TRACE ("ACE_RW_Token::acquire");
- // We need to acquire two locks. This one to ensure that only one
- // thread uses this token at a time.
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon1, this->lock_, -1);
- // This one to ensure an atomic transaction across all tokens. Note
- // that this order is crucial too. It's resource coloring for other
- // threads which may be calling this same token.
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon2, ACE_Token_Manager::instance ()->mutex (), -1);
-
- if (caller->proxy ()->type () == ACE_RW_Token::WRITER)
- this->num_writers_++;
-
- // Does _anyone_ own the token?
- if (this->owner () == 0)
- {
- // There are no waiters, so queue as the first waiter (the owner).
- this->waiters_.enqueue (caller, -1);
- return 0;
- }
-
- // Check for recursive acquisition.
- if (this->is_owner (caller->client_id ()))
- {
- caller->nesting_level (1);
- return 0; // Success.
- }
-
- // Reader.
- if (caller->proxy ()->type () == ACE_RW_Token::READER)
- {
- // Are there any writers?
- if (this->num_writers_ == 0)
- {
- // Queue the caller at the end of the queue.
- this->waiters_.enqueue (caller, -1);
- return 0;
- }
- // Else failure.
- }
-
- // Failure code.
-
- // Check for deadlock.
- if (!ignore_deadlock &&
- ACE_Token_Manager::instance ()->check_deadlock (caller->proxy ()) == 1)
- {
- if (caller->proxy ()->type () == ACE_RW_Token::WRITER)
- this->num_writers_--;
- errno = EDEADLK;
- ACE_RETURN (-1);
- }
-
- // Queue the caller at the end of the queue.
- this->waiters_.enqueue (caller, -1);
-
- if (notify)
- {
- // If it's a writer, just notify it.
- if (this->owner ()->proxy ()->type () == ACE_RW_Token::WRITER)
- this->owner ()->call_sleep_hook ();
- else
- {
- // Call back all reader owners.
- ACE_TPQ_Entry *temp = this->owner ();
- do
- {
- temp->call_sleep_hook ();
- temp = temp->next_;
- }
- while (temp != 0 &&
- temp->proxy ()->type () == ACE_RW_Token::READER);
- }
- }
-
- errno = EWOULDBLOCK;
- ACE_RETURN (-1);
-}
-
-int
-ACE_RW_Token::tryacquire (ACE_TPQ_Entry *caller)
-{
- ACE_TRACE ("ACE_RW_Token::tryacquire");
- // We need to acquire two locks. This one to ensure that only one
- // thread uses this token at a time.
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon1, this->lock_, -1);
- // This one to ensure an atomic transaction across all tokens. Note
- // that this order is crucial too. It's resource coloring for other
- // threads which may be calling this same token.
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon2, ACE_Token_Manager::instance ()->mutex (), -1);
-
- if (caller->proxy ()->type () == ACE_RW_Token::WRITER)
- {
- this->num_writers_++;
- }
-
- // Does _anyone_ own the token?
- if (this->owner () == 0)
- {
- // There are no waiters, so queue as the first waiter (the owner).
- this->waiters_.enqueue (caller, -1);
- return 0;
- }
-
- // Check for recursive acquisition.
- if (this->is_owner (caller->client_id ()))
- {
- caller->nesting_level (1);
- return 0; // Success.
- }
-
- // Reader.
- if (caller->proxy ()->type () == ACE_RW_Token::READER)
- {
- // Are there any writers?
- if (this->num_writers_ == 0)
- {
- // queue the caller at the end of the queue.
- this->waiters_.enqueue (caller, -1);
- return 0;
- }
- // Else, fail.
- }
- else // Writer.
- // We're going to fail, so decrement the num_writers.
- {
- this->num_writers_--;
- }
-
-
- errno = EWOULDBLOCK;
- ACE_RETURN (-1);
-}
-
-int
-ACE_RW_Token::renew (ACE_TPQ_Entry *caller,
- int requeue_position)
-{
- ACE_TRACE ("ACE_RW_Token::renew");
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1);
-
- // Werify that the caller is the owner
- if (this->is_owner (caller->client_id ()) == 0)
- {
- errno = EACCES;
- ACE_RETURN (-1);
- }
-
- // The caller is the owner, so check to see if there are any
- // waiters. If not, we just keep the token.
- if (this->waiters_.size () == 1 || requeue_position == 0)
- return 0;
-
- // There are waiters, so remove the caller.
- this->remove (caller);
-
- // Requeue the caller.
- this->waiters_.enqueue (caller, requeue_position);
-
- if (caller->proxy ()->type () == ACE_RW_Token::READER)
- {
- // If the caller got queued before any writers, the caller is
- // still the owner.
- if (this->is_owner (caller->client_id ()))
- return 0; // success
- // else fallthrough and return would block.
- }
- // Writers will always have to block since waiters_.size () == 1 or
- // requeue_position == 0.
-
- // Get a new owner.
- this->notify_new_owner (caller);
-
- // Tell the caller that the operation would block.
- errno = EWOULDBLOCK;
- ACE_RETURN (-1);
-}
-
-int
-ACE_RW_Token::release (ACE_TPQ_Entry *caller)
-{
- ACE_TRACE ("ACE_RW_Token::release");
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1);
-
- // Check for errors.
- if ((this->owner () == 0) ||
- (this->is_owner (caller->client_id ()) == 0))
- {
- errno = EACCES;
- ACE_RETURN (-1);
- }
-
- if (caller->proxy ()->type () == ACE_RW_Token::WRITER)
- num_writers_--;
-
- // Recursive release.
- if (caller->nesting_level () > 0)
- {
- caller->nesting_level (-1);
- return 0;
- }
-
- // Remove the caller and notify the new owner(s).
- this->remove (caller);
- this->notify_new_owner (caller);
-
- return 0;
-}
-
-void
-ACE_RW_Token::notify_new_owner (ACE_TPQ_Entry *old_owner)
-{
- ACE_TRACE ("ACE_RW_Token::new_owner");
-
- if (this->owner () == 0)
- return;
-
- if (this->owner ()->proxy ()->type () == ACE_RW_Token::READER)
- {
- if (old_owner->proxy ()->type () == ACE_RW_Token::READER)
- // the owners already know that they're owners
- return;
-
- // The current owner is a reader and the previous owner was a
- // writer, so notify all waiting readers up to the first writer.
- // call back all reader owners.
- ACE_TPQ_Iterator iterator (waiters_);
- for (ACE_TPQ_Entry *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- if (temp->proxy ()->type () == WRITER)
- // We've gone through all the readers.
- break;
-
- temp->proxy ()->token_acquired (temp);
- }
- }
- else // writer
- this->owner ()->proxy ()->token_acquired (this->owner ());
-}
-
-
-int
-ACE_RW_Token::owners (OWNER_STACK &stack,
- const ACE_TCHAR *id)
-{
- ACE_TRACE ("ACE_RW_Token::owners");
-
- if (this->owner () == 0)
- return 0;
-
- int id_is_owner = 0;
-
- // The first waiter is a writer, so there is only one owner.
- if (this->owner ()->proxy ()->type () == WRITER)
- {
- stack.push (this->owner ());
- // If an <id> is specified, return whether it is the owner being
- // returned.
- if ((id != 0) &&
- (ACE_OS::strcmp (id, this->owner ()->client_id ()) == 0))
- id_is_owner = 1;
- }
- // The first waiter is a reader, so there can be multiple owning
- // readers.
- else
- {
- ACE_TPQ_Iterator iterator (waiters_);
- for (ACE_TPQ_Entry *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- if (temp->proxy ()->type () == WRITER)
- // We've gone through all the readers.
- break;
-
- stack.push (temp);
-
- if (!id_is_owner && (id != 0) &&
- (ACE_OS::strcmp (id, temp->client_id ()) == 0))
- id_is_owner = 1;
- }
- }
-
- return id_is_owner;
-}
-
-int
-ACE_RW_Token::is_waiting_for (const ACE_TCHAR *id)
-{
- ACE_TRACE ("ACE_RW_Token::is_waiting_for");
- // If there is no owner, or <id> is the owner, return false.
- if ((this->owner () == 0) ||
- this->is_owner (id))
- return 0;
-
- // Step through each waiter looking for <id>.
- ACE_TPQ_Iterator iterator (waiters_);
- iterator.advance ();
- for (ACE_TPQ_Entry *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- if (temp->equal_client_id (id))
- return 1;
- }
-
- return 0;
-}
-
-int
-ACE_RW_Token::is_owner (const ACE_TCHAR *id)
-{
- ACE_TRACE ("ACE_Mutex_Token::is_owner");
- // If there is no owner, return false.
- if (this->owner () == 0)
- return 0;
-
- // A writer owns us.
- if (this->owner ()->proxy ()->type () == ACE_RW_Token::WRITER)
- return this->owner ()->equal_client_id (id);
-
- // Readers own us.
- // Step through each owning reader looking for <id>.
- ACE_TPQ_Iterator iterator (waiters_);
- for (ACE_TPQ_Entry *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- if (temp->proxy ()->type () != ACE_RW_Token::READER)
- break;
-
- if (temp->equal_client_id (id))
- return 1;
- }
-
- return 0;
-}
-
-void
-ACE_Token_Proxy::dump (void) const
-{
- ACE_TRACE ("ACE_Token_Proxy::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy::dump:\n")
- ACE_TEXT (" type = %d\n")
- ACE_TEXT (" ignore_deadlock_ = %d\n")
- ACE_TEXT (" debug_ = %d\n"),
- (int) this->type (), ignore_deadlock_, debug_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("mutex_, and waiter_\n")));
-
- if (this->token_ != 0)
- this->token_->dump ();
-
- this->waiter_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy::dump end.\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-const ACE_TCHAR *
-ACE_Token_Proxy::client_id (void) const
-{
- ACE_TRACE ("ACE_Token_Proxy::client_id");
- // Thread-specific.
- ACE_Token_Proxy *nc_this =
- ACE_const_cast (ACE_Token_Proxy *, this);
- const ACE_TPQ_Entry *temp =
- nc_this->waiter_.operator->();
- const ACE_TCHAR *id = temp->client_id ();
-
- if (id == 0)
- return ACE_TEXT ("ERROR NO CLIENT ID");
- else
- return id;
-}
-
-void
-ACE_Token_Proxy::client_id (const ACE_TCHAR *client_id)
-{
- ACE_TRACE ("ACE_Token_Proxy::client_id");
- this->waiter_->client_id (client_id);
-}
-
-const ACE_TCHAR *
-ACE_Token_Proxy::owner_id (void)
-{
- ACE_TRACE ("ACE_Token_Proxy::owner_id");
- return this->token_->owner_id ();
-}
-
-const ACE_TCHAR *
-ACE_Token_Proxy::name (void) const
-{
- ACE_TRACE ("ACE_Token_Proxy::owner_id");
- return this->token_->name ();
-}
-
-ACE_Token_Proxy::ACE_Token_Proxy (void)
-: token_ (0),
- waiter_ (this, 0)
-{
- ACE_TRACE ("ACE_Token_Proxy::ACE_Token_Proxy");
-}
-
-// Notice the token_ (0). Do *not* copy the token pointer. This must
-// be obtained through the token manager. Also, we don't copy any
-// waiter info. A copied Proxy does *not* inherit client_id.
-
-ACE_Token_Proxy::ACE_Token_Proxy (const ACE_Token_Proxy &)
- : token_ (0),
- waiter_ (this, 0)
-{
- ACE_TRACE ("ACE_Token_Proxy::ACE_Token_Proxy");
-}
-
-// @@ should I do a mutex_->release ()?
-ACE_Token_Proxy::~ACE_Token_Proxy (void)
-{
- ACE_TRACE ("ACE_Local_Mutex::~ACE_Local_Mutex");
-
- if (token_ != 0)
- // notify token manager that we are done with it so it can
- // free it if necessary
- ACE_Token_Manager::instance ()->release_token (token_);
-}
-
-int
-ACE_Token_Proxy::open (const ACE_TCHAR *token_name,
- int ignore_deadlock,
- int debug)
-{
- ACE_TRACE ("ACE_Token_Proxy::open");
-
- // Store some parameters.
- this->ignore_deadlock_ = ignore_deadlock;
- this->debug_ = debug;
-
- // Used in case a name was not specified.
- ACE_TCHAR name[BUFSIZ];
-
- // We must have a name.
- if (token_name == 0)
- {
- ACE_OS::sprintf (name, ACE_TEXT ("token %lx"),
- ACE_reinterpret_cast (long, this));
- token_name = name;
- }
-
- // Get or create the underlying token. The Token Manager will call
- // us back to set token_.
- ACE_Token_Manager::instance ()->get_token (this, token_name);
-
- // Check for failed get or failed new.
- if (this->token_ == 0)
- {
- errno = ENOMEM;
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Can't allocate mutex")), -1);
- }
-
- return 0;
-}
-
-int
-ACE_Token_Proxy::acquire (int notify,
- void (*sleep_hook)(void *),
- ACE_Synch_Options &options)
-{
- ACE_TRACE ("ACE_Token_Proxy::acquire");
- if (this->token_ == 0)
- {
- errno = ENOENT;
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Not open.\n")), -1);
- }
-
- // Make sure no one calls our token_acquired until we have a chance
- // to sleep first! If after we call an EWOULDBLOCK
- // mutex_->acquire() below, but before we enter handle_options to
- // wait on the cond_var, a thread tries to give take us off the
- // waiter queue and signal us, IT WILL FIRST HAVE TO ACQUIRE THIS
- // cond_var.mutex (). _This_ is why we acquire it.
- this->waiter_->cond_var_.mutex ().acquire ();
-
- this->waiter_->sleep_hook (sleep_hook);
-
- if (this->token_->acquire (this->waiter_, this->ignore_deadlock_, notify) == -1)
- // acquire failed
- {
- switch (errno)
- {
- case EDEADLK :
- if (!ignore_deadlock_)
- {
- waiter_->cond_var_.mutex ().release ();
- errno = EDEADLK;
- ACE_RETURN (-1);
- }
- // Else, fallthrough and block!
-
- case EWOULDBLOCK :
- if (this->debug_)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%t) waiting for %s, owner is %s, ")
- ACE_TEXT ("total waiters == %d\n"),
- this->name (),
- this->token_->owner_id (),
- token_->no_of_waiters ()));
-
- // no error, but would block, if error, return error (-1),
- // otherwise, return whether we called the holder or not.
- int return_value;
- if (this->handle_options (options,
- waiter_->cond_var_) == -1)
- return_value = -1;
- else
- return_value = notify == 1;
-
- errno = EWOULDBLOCK;
- ACE_RETURN (return_value);
-
- default :
- waiter_->cond_var_.mutex ().release ();
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("Token Proxy acquire.")),
- -1);
- }
- }
- else
- // we have the token
- {
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%t) acquired %s\n"),
- this->name ()));
- waiter_->cond_var_.mutex ().release ();
- }
-
- return 0;
-}
-
-int
-ACE_Token_Proxy::tryacquire (void (*sleep_hook)(void *))
-{
- ACE_TRACE ("ACE_Token_Proxy::tryacquire");
- if (this->token_ == 0)
- {
- errno = ENOENT;
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Not open.\n")),
- -1);
- }
-
- this->waiter_->sleep_hook (sleep_hook);
-
- return this->token_->tryacquire (waiter_);
-}
-
-int
-ACE_Token_Proxy::renew (int requeue_position,
- ACE_Synch_Options &options)
-{
- ACE_TRACE ("ACE_Token_Proxy::renew");
- if (this->token_ == 0)
- {
- errno = ENOENT;
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Not open.\n")),
- -1);
- }
-
- // Make sure no one calls our token_acquired until we have a chance
- // to sleep first!
- this->waiter_->cond_var_.mutex ().acquire ();
-
- if (this->token_->renew (this->waiter_, requeue_position) == -1)
- {
- // check for error
- if (errno != EWOULDBLOCK)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p renew failed\n"), ACE_TEXT ("ACE_Token_Proxy")), -1);
-
- if (this->debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) renew blocking for %s, owner is %s\n"),
- this->name (),
- token_->owner_id ()));
-
- // no error, but would block, so block or return
- return this->handle_options (options, waiter_->cond_var_);
- }
- else
- // we have the token
- {
- if (this->debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) renewed %s\n"),
- this->name ()));
- waiter_->cond_var_.mutex ().release ();
- return 0;
- }
-}
-
-int
-ACE_Token_Proxy::handle_options (ACE_Synch_Options &options,
- ACE_TOKEN_CONST::COND_VAR &cv)
-{
- // Some operation failed with EWOULDBLOCK.
- ACE_TRACE ("ACE_Token_Proxy::handle_options");
-
- if (options[ACE_Synch_Options::USE_REACTOR] == 1)
- // Asynchronous.
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- cv.mutex ().release ();
- ACE_RETURN (-1);
- }
- else
- // Synchronous.
- {
- // Block on condition variable.
- while (cv.wait ((ACE_Time_Value *) options.time_value ()) == -1)
- {
- // Note, this should obey whatever thread-specific
- // interrupt policy is currently in place...
- if (errno == EINTR)
- continue;
- // We come here if a timeout occurs or some serious
- // ACE_Condition object error.
- cv.mutex ().release ();
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("condition variable wait")
- ACE_TEXT (" bombed.")), -1);
- }
-
- if (this->debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) unblocking.\n"),
- this->client_id ()));
- cv.mutex ().release ();
- return 0; // operation succeeded
- }
-}
-
-int
-ACE_Token_Proxy::release (ACE_Synch_Options &)
-{
- ACE_TRACE ("ACE_Token_Proxy::release");
-
- if (this->token_ == 0)
- {
- errno = ENOENT;
- if (debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Must open before releasing.\n")));
- ACE_RETURN (-1);
- }
-
- if (this->token_->release (waiter_) != 0)
- {
- // Release failed.
- this->token_->remove (this->waiter_);
- if (debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) %p.\n"), ACE_TEXT ("release failed")));
- return -1;
- }
- else
- {
- if (this->debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) released %s, owner is %s\n"),
- this->name (),
- token_->owner_id ()));
-
- return 0;
- }
-}
-
-int
-ACE_Token_Proxy::remove (ACE_Synch_Options &)
-{
- ACE_TRACE ("ACE_Token_Proxy::remove");
- return 0;
-}
-
-void
-ACE_Token_Proxy::sleep_hook (void)
-{
- ACE_TRACE ("ACE_Token_Proxy::sleep_hook");
- // Somebody wants our token! (Let'em wait...)
- return;
-}
-
-void
-ACE_Token_Proxy::token_acquired (ACE_TPQ_Entry *e)
-{
- ACE_TRACE ("ACE_Token_Proxy::token_acquired");
- e->cond_var_.mutex ().acquire ();
- // We've been taken off the waiters list and given the token!
- // This implementation signals the internal condition
- // variable. Thus, if asynchronous acquires are used, this must be
- // overriden to do something more useful!
- e->cond_var_.signal ();
- e->cond_var_.mutex ().release ();
-
- return;
-}
-
-ACE_Token_Name::ACE_Token_Name (const ACE_TCHAR *token_name)
-{
- ACE_TRACE ("ACE_Token_Name::ACE_Token_Name");
- this->name (token_name);
-}
-
-ACE_Token_Name::ACE_Token_Name (const ACE_Token_Name &rhs)
-{
- ACE_TRACE ("ACE_Token_Name::ACE_Token_Name");
- this->name (rhs.name ());
-}
-
-ACE_Token_Name::~ACE_Token_Name ()
-{
- ACE_TRACE ("ACE_Token_Name::~ACE_Token_Name");
-}
-
-void
-ACE_Token_Name::dump (void) const
-{
- ACE_TRACE ("ACE_Token_Name::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- ACE_DEBUG ((LM_DEBUG, (char *) "ACE_Token_Name::dump:\n",
- (char *) " token_name_ = %s\n",
- (char *) token_name_ == 0 ? (char *) "no name" : (char *) token_name_));
-#else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Name::dump:\n")
- ACE_TEXT (" token_name_ = %s\n"),
- token_name_ == 0 ? ACE_TEXT ("no name") : token_name_));
-#endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-#if !defined (ACE_NO_TSS_TOKENS)
-template class ACE_TSS <ACE_TPQ_Entry>;
-#endif /* ACE_NO_TSS_TOKENS */
-template class ACE_Unbounded_Stack <ACE_TPQ_Entry *>;
-template class ACE_Node <ACE_TPQ_Entry *>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#if !defined (ACE_NO_TSS_TOKENS)
-#pragma instantiate ACE_TSS <ACE_TPQ_Entry>
-#endif /* ACE_NO_TSS_TOKENS */
-#pragma instantiate ACE_Unbounded_Stack <ACE_TPQ_Entry *>
-#pragma instantiate ACE_Node <ACE_TPQ_Entry *>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Local_Tokens.h b/ace/Local_Tokens.h
deleted file mode 100644
index f63eb1c0794..00000000000
--- a/ace/Local_Tokens.h
+++ /dev/null
@@ -1,1041 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Local_Tokens.h
-//
-// = AUTHOR
-// Karl-Heinz Dorn <kdorn@erlh.siemens.de>,
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>, and
-// Tim Harrison <harrison@cs.wustl.edu>
-//
-// = DESCRIPTION
-// This file contains definitions for the following classes:
-//
-// public:
-// 7. ACE_Token_Proxy
-// 8. ACE_Null_Token : public ACE_Token_Proxy
-// 9. ACE_Local_Mutex : public ACE_Token_Proxy
-// *. ACE_Local_RLock : public ACE_Local_Mutex
-// &. ACE_Local_WLock : public ACE_Local_Mutex
-// private:
-// 1. ACE_TOKEN_CONST
-// 3. ACE_TPQ_Entry
-// b. ACE_TSS_TPQ_Entry
-// c. ACE_TPQ_Iterator
-// 4. ACE_Token_Proxy_Queue
-// 5. ACE_Tokens
-// 6. ACE_Mutex_Token : public ACE_Tokens
-// 12. ACE_RW_Token : public ACE_Tokens
-// a. ACE_Token_Name
-//
-// Note that the locking classes defined in this file are *not*
-// intended to be used as general-purpose synchronization
-// mechanisms, such as mutexes or semaphores. Instead, you should
-// use the <ACE_Recursive_Thread_Mutex>, <ACE_Thread_Mutex>,
-// <ACE_Thread_Semaphore>, etc., that are defined in
-// $ACE_ROOT/ace/Synch.h and $ACE_ROOT/ace/Synch_T.h or the
-// <ACE_Token> that's defined in $ACE_ROOT/ace/Token.h.
-//
-// ============================================================================
-
-#ifndef ACE_LOCAL_MUTEX_H
-#define ACE_LOCAL_MUTEX_H
-#include "ace/pre.h"
-
-#include "ace/Synch_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Containers.h"
-#include "ace/Synch_Options.h"
-#include "ace/Map_Manager.h"
-
-#if !(defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE))
-# define ACE_NO_TSS_TOKENS 1
-#endif /* !(defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)) */
-
-// 1.
-class ACE_Export ACE_TOKEN_CONST
-{
- // = TITLE
- // Not a public interface.
- //
- // = DESCRIPTION
- // Constant definitions and typdefs for Token library. Mostly,
- // this class is necessary to fight the compiler with order of
- // declaration errors.
-public:
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- // ACE platform supports some form of threading.
- typedef ACE_Condition_Thread_Mutex COND_VAR;
- typedef ACE_Thread_Mutex MUTEX;
- typedef ACE_Guard<ACE_Thread_Mutex> GUARD;
-#else
- typedef ACE_Null_Condition COND_VAR;
- typedef ACE_Null_Mutex MUTEX;
- typedef ACE_Guard<ACE_Null_Mutex> GUARD;
-#endif /* ACE_HAS_THREADS */
-};
-
-// Forward decl.
-class ACE_Token_Proxy;
-
-// 3..
-class ACE_Export ACE_TPQ_Entry
-{
- // = TITLE
- // Token Proxy Queue entry. Used in the ACE_Token_Proxy_Queue
- //
- // = DESCRIPTION
- // Not a public interface.
-friend class ACE_Token_Manager;
-public:
- typedef void (*PTVF) (void *);
-
- ACE_TPQ_Entry (void);
- // Null constructor.
-
- ACE_TPQ_Entry (const ACE_Token_Proxy *proxy,
- const ACE_TCHAR *client_id);
- // Construction.
-
- ACE_TPQ_Entry (const ACE_TPQ_Entry &rhs);
- // Copy constructor.
-
- ~ACE_TPQ_Entry (void);
- // Death.
-
- void operator= (const ACE_TPQ_Entry &rhs);
- // Copy operator use by the queue.
-
- // = Set/get top of the queue.
- ACE_Token_Proxy *proxy (void) const;
- void proxy (ACE_Token_Proxy *);
-
- // = Delta/get nesting level of the entry.
- int nesting_level (void) const;
- void nesting_level (int delta);
-
- // = Set/get client_id of the entry.
- const ACE_TCHAR *client_id (void) const;
- void client_id (const ACE_TCHAR *);
-
- int equal_client_id (const ACE_TCHAR *id);
- // Returns 1 if <id> == client id. Does not check for <id> == 0.
-
- void set (void (*sleep_hook)(void *));
- // One method for arg and sleep_hook.
-
- // = Set/get sleep hook of the entry.
- void sleep_hook (void (*sh)(void *));
- PTVF sleep_hook (void) const;
-
- void call_sleep_hook (void);
- // Call the sleep hook function or method passing arg.
-
- void dump (void) const;
- // Dump the state of the class.
-
- // = Used to block the thread if an acquire fails with EWOULDBLOCK.
- ACE_TOKEN_CONST::COND_VAR cond_var_;
- ACE_TOKEN_CONST::MUTEX lock_;
-
- ACE_TPQ_Entry *next_;
- // Pointer to next in list.
-
- // = Get/set whether this client is blocked waiting for a token.
- int waiting (void) const;
- void waiting (int w);
-
-private:
- int waiting_;
- // This client is waiting for a token.
-
- ACE_Token_Proxy *proxy_;
- // Proxy.
-
- int nesting_level_;
- // Nesting level.
-
- void *arg_;
- // Arg.
-
- ACE_TCHAR client_id_[ACE_MAXCLIENTIDLEN];
- // Client id.
-
- void (*sleep_hook_)(void *);
- // Sleep hook.
-};
-
-// b..
-#if defined (ACE_NO_TSS_TOKENS)
-typedef ACE_TPQ_Entry ACE_TPQ_ENTRY;
-#else
-typedef ACE_TSS<ACE_TPQ_Entry> ACE_TPQ_ENTRY;
-#endif /* ACE_NO_TSS_TOKENS */
-
-class ACE_Export ACE_TSS_TPQ_Entry : public ACE_TPQ_ENTRY
-{
- // = TITLE
- // ACE_TSS_TPQ_Entry
- //
- // = DESCRIPTION
- // Not a public interface.
-public:
- ACE_TSS_TPQ_Entry (const ACE_Token_Proxy *proxy,
- const ACE_TCHAR *client_id);
- // These are passed to the constructor of ACE_TPQ_Entry in
- // make_TSS_TYPE
-
- virtual ~ACE_TSS_TPQ_Entry (void);
- // Destructor.
-
- virtual ACE_TPQ_Entry *make_TSS_TYPE (void) const;
- // Allows us to pass args to the construction of the TSS object.
-
- operator ACE_TPQ_Entry *(void);
- // Operator overloading and inheritence don't mix.
-
- void dump (void) const;
- // Dump the state of the class.
-
-#if defined (ACE_NO_TSS_TOKENS)
- ACE_TPQ_Entry *operator-> (void)
- {
- return (ACE_TPQ_Entry *) this;
- }
-#endif /* ACE_NO_TSS_TOKENS */
-
-private:
- ACE_TSS_TPQ_Entry (const ACE_TSS_TPQ_Entry &);
- void operator= (const ACE_TSS_TPQ_Entry &);
- // Private: should not be used
-
- // = These are passed to the constructor of ACE_TPQ_Entry in
- // make_TSS_TYPE
- const ACE_Token_Proxy *proxy_;
- // Proxy.
- const ACE_TCHAR *client_id_;
- // Client_id.
-};
-
-class ACE_Token_Proxy_Queue;
-
-// c..
-class ACE_Export ACE_TPQ_Iterator
-{
- // = TITLE
- // Iterates through ACE_Token_Proxy_Queues.
- //
- // = DESCRIPTION
- // Not a public interface.
-public:
- ACE_TPQ_Iterator (ACE_Token_Proxy_Queue &q);
- // Construction.
-
- ~ACE_TPQ_Iterator (void);
- // Destructor.
-
- int next (ACE_TPQ_Entry *&next_item);
- // Pass back the <next_item>.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- void advance (void);
- // Move forward by one element in the queue.
-
- void dump (void) const;
- // Dump the state of an object.
-
-private:
- ACE_TPQ_Entry *current_;
-};
-
-// 4..
-class ACE_Export ACE_Token_Proxy_Queue
-{
- // = TITLE
- // Token waiter list.
- //
- // = DESCRIPTION
- // Not a public interface.
- //
- // This queue holds all the token proxies waiting for ownership
- // of a token. Along with the proxy reference, it also stores
- // the nesting level, client id, and a magic cookie from the
- // proxy. This queue stores the ACE_TPQ_Entries by pointer
- // values. It DOES NOT make copies. Thus, the user is
- // responsible to ensure that the TPQ's stick around. This is
- // motivated by the need to reduce dynamic memory allocation.
-public:
- friend class ACE_TPQ_Iterator;
-
- ACE_Token_Proxy_Queue (void);
- // Construction.
-
- ~ACE_Token_Proxy_Queue (void);
- // Destructor
-
- void enqueue (ACE_TPQ_Entry* new_entry,
- int position);
- // Enqueue a proxy, nesting level, client_id, and a magic cookie at
- // the given position in the list. If the position is -1, we
- // enqueue at the end of the list (I think).
-
- const ACE_TPQ_Entry* head (void);
- // Top of the queue.
-
-// int member (const ACE_TCHAR *id);
- // Is this id in the waiter list?
-
- void dequeue (void);
- // Remove the top waiter.
-
- void remove (const ACE_TPQ_Entry *remove_me);
- // Remove the waiter whose proxy ref matches remove_me.
-
- int size (void);
- // The number of waiters.
-
- void dump (void) const;
- // Dump the state of the class.
-
-protected:
- ACE_TPQ_Entry *head_;
- // Head.
- ACE_TPQ_Entry *tail_;
- // Tail.
- int size_;
- // Size.
-};
-
-// 5..
-class ACE_Export ACE_Tokens
-{
- // = TITLE
- // Abstract representation of ACE tokens.
- //
- // = DESCRIPTION
- // Not a public interface.
- //
- // Currently, I don't see a reason for providing an abstract
- // interface at this level of the library. As of yet, no one
- // uses <ACE_Tokens< derivatives through this abstract interface
- // except for <ACE_Token_Manager>. It only uses the statistical
- // methods which are shared by all Tokens. For that reason, it
- // still makes since to have a common base class. However,
- // acquire, renew, and release do not need to have matching
- // interfaces throughout all Tokens.
- //
- // To add a new type of token (e.g. semaphore), this class must
- // be subtyped to define the new semantics. See
- // <ACE_Token_Manager> for details.
-public:
-
- ACE_Tokens (void);
- // Null constructor.
-
- virtual ~ACE_Tokens (void);
- // Destructor
-
- virtual int acquire (ACE_TPQ_Entry *caller,
- int ignore_deadlock,
- int notify) = 0;
- // No implementation.
-
- virtual int tryacquire (ACE_TPQ_Entry *caller) = 0;
- // No implementation.
-
- virtual int renew (ACE_TPQ_Entry *caller,
- int requeue_position) = 0;
- // No implementation.
-
- virtual int release (ACE_TPQ_Entry *caller) = 0;
- // No implementation.
-
- void make_owner (ACE_TPQ_Entry *caller);
- // Move the caller to the front of the waiter list. This is for use
- // with remote mutexes and shadow mutexes.
-
- void remove (ACE_TPQ_Entry *caller);
- // Remove the caller from the waiter list.
-
- // = Accessor methods.
-
- typedef ACE_Unbounded_Stack<ACE_TPQ_Entry *> OWNER_STACK;
- // Stack of owners.
-
- virtual int owners (OWNER_STACK &o, const ACE_TCHAR *id) = 0;
- // Returns a stack of the current owners. Returns -1 on error, 0 on
- // success. If <id> is non-zero, returns 1 if id is an owner.
-
- virtual int is_waiting_for (const ACE_TCHAR *id) = 0;
- // Returns 1 if <id> is waiting for this token. 0 otherwise.
-
- virtual int is_owner (const ACE_TCHAR *id) = 0;
- // Returns 1 if <id> is an owner of this token. 0 otherwise.
-
- virtual ACE_Token_Proxy_Queue *waiters (void);
- // Return the queue of waiters.
-
- virtual int no_of_waiters (void);
- // Return the number of proxies that are currently waiting to get
- // the token.
-
- const ACE_TCHAR *owner_id (void);
- // The current owner.
-
- const ACE_TCHAR* name (void);
- // Token name.
-
- // = Reference counting. These are only called by the
- // Token_Manager.
- void inc_reference (void);
- int dec_reference (void);
-
- void dump (void) const;
- // Dump the state of the class.
-
- enum TOKEN_TYPES { MUTEX, RWLOCK };
- // These are the Token types supported by the library at ship time.
- // There is no restriction on the number of Token types added by
- // "3rd parties." These are only necessary for the Token Server.
-
- virtual int type (void) const = 0;
- // Provides a manual RTTI mechanism. This method is used only by
- // ACE_Token_Request so that the type of a token can be sent to a
- // remote Token Server.
-
- // = The following methods allow the deadlock detection algorithm to
- // check if this token has been visited.
-
- void visit (int v);
- // Mark or unmark the token as visited.
-
- int visited (void);
- // Check if the token has been visited.
-
- ACE_TPQ_Entry *owner (void);
- // All the data of the current owner.
-
-protected:
-
- int visited_;
- // For the deadlock detection algorithm.
-
- int reference_count_;
- // Reference count.
-
- ACE_Token_Proxy_Queue waiters_;
- // List of client's owning and waiting the token.
-
- ACE_TCHAR token_name_[ACE_MAXTOKENNAMELEN];
- // Name of token.
-};
-
-class ACE_Local_Mutex;
-
-// 6..
-class ACE_Export ACE_Mutex_Token : public ACE_Tokens
-{
- // = TITLE
- // Class that acquires, renews, and releases a process-local
- // synchronization token.
- //
- // = DESCRIPTION
- // Not a public interface.
- //
- // This class is a more general-purpose synchronization mechanism
- // than SunOS 5.x mutexes. For example, it implements "recursive
- // mutex" semantics, where a thread that owns the token can
- // reacquire it without deadlocking. In addition, threads that
- // are blocked awaiting the token are serviced in strict FIFO
- // order as other threads release the token (SunOS 5.x mutexes
- // don't strictly enforce an acquisition order).
-public:
- ACE_Mutex_Token (const ACE_TCHAR* name);
- // life
-
- virtual ~ACE_Mutex_Token (void);
- // death
-
- // = Synchronization operations.
- // With acquire, renew, and release, the caller must be specified so
- // that multiple proxies (e.g. ACE_Local_Mutex) can use the same
- // token.
-
- virtual int acquire (ACE_TPQ_Entry *caller,
- int ignore_deadlock,
- int notify);
- // Returns 0 on success, -1 on failure with <ACE_Log_Msg::errnum> as
- // the reason. If errnum == EWOULDBLOCK, and notify == 1,
- // <ACE_Token_Proxy::sleep_hook> has been called on the current
- // owner of the token. If ignore_deadlock is passed as 1 and errnum
- // == EDEADLK, then deadlock was detected via ace_token_manager.
-
- virtual int tryacquire (ACE_TPQ_Entry *caller);
- // same as acquire, but fails if would block
-
- virtual int renew (ACE_TPQ_Entry *caller,
- int requeue_position);
- // An optimized method that efficiently reacquires the token if no
- // other threads are waiting. This is useful for situations where
- // you don't want to degrade the quality of service if there are
- // other threads waiting to get the token. If <requeue_position> ==
- // -1 and there are other threads waiting to obtain the token we are
- // queued at the end of the list of waiters. If <requeue_position>
- // > -1 then it indicates how many entries to skip over before
- // inserting our thread into the list of waiters (e.g.,
- // <requeue_position> == 0 means "insert at front of the queue").
- // Renew has the rather odd semantics such that if there are other
- // waiting threads it will give up the token even if the
- // nesting_level_ > 1. I'm not sure if this is really the right
- // thing to do (since it makes it possible for shared data to be
- // changed unexpectedly) so use with caution... Returns 0 on
- // success, -1 on failure with <ACE_Log_Msg::errnum> as the reason.
- // If errnum == EWOULDBLOCK, and notify == 1,
- // <ACE_Token_Proxy::sleep_hook> has been called on the current
- // owner of the token.
-
- virtual int release (ACE_TPQ_Entry *caller);
- // Relinquish the token. If there are any waiters then the next one
- // in line gets it. If the caller is not the owner, caller is
- // removed from the waiter list.
-
- void dump (void) const;
- // Dump the state of the class.
-
- virtual int type (void) const;
- // Returns ACE_Tokens::MUTEX.
-
- virtual int owners (OWNER_STACK &o, const ACE_TCHAR *id);
- // Returns a stack of the current owners. Returns -1 on error, 0 on
- // success. If <id> is non-zero, returns 1 if id is an owner.
-
- virtual int is_waiting_for (const ACE_TCHAR *id);
- // Returns 1 if <id> is waiting for this token. 0 otherwise.
-
- virtual int is_owner (const ACE_TCHAR *id);
- // Returns 1 if <id> is an owner of this token. 0 otherwise.
-
-private:
- ACE_TOKEN_CONST::MUTEX lock_;
- // ACE_Mutex_Token used to lock internal data structures.
-};
-
-// 12..
-class ACE_Export ACE_RW_Token : public ACE_Tokens
-{
- // = TITLE
- // Class that acquires, renews, and releases a process-local
- // synchronization token.
- //
- // = DESCRIPTION
- // Not a public interface.
- //
- // This class is a more general-purpose synchronization mechanism
- // than SunOS 5.x mutexes. For example, it implements "recursive
- // mutex" semantics, where a thread that owns the token can
- // reacquire it without deadlocking. In addition, threads that are
- // blocked awaiting the token are serviced in strict FIFO order as
- // other threads release the token (SunOS 5.x mutexes don't strictly
- // enforce an acquisition order).
-public:
- ACE_RW_Token (const ACE_TCHAR* name);
- // Life.
-
- virtual ~ACE_RW_Token (void);
- // Death.
-
- // = Synchronization operations.
- // With acquire, renew, and release, the caller must be specified so
- // that multiple proxies (e.g. ACE_Local_Mutex) can use the same
- // token.
-
- virtual int acquire (ACE_TPQ_Entry *caller,
- int ignore_deadlock,
- int notify);
- // Returns 0 on success, -1 on failure with <ACE_Log_Msg::errnum> as
- // the reason. If errnum == EWOULDBLOCK, and notify == 1,
- // <ACE_Token_Proxy::sleep_hook> has been called on the current
- // owner of the token. If ignore_deadlock is passed as 1 and errnum
- // == EDEADLK, then deadlock was detected via ace_token_manager.
-
- virtual int tryacquire (ACE_TPQ_Entry *caller);
- // same as acquire except fails on would block
-
- virtual int renew (ACE_TPQ_Entry *caller,
- int requeue_position);
- // An optimized method that efficiently reacquires the token if no
- // other threads are waiting. This is useful for situations where
- // you don't want to degrade the quality of service if there are
- // other threads waiting to get the token. If <requeue_position> ==
- // -1 and there are other threads waiting to obtain the token we are
- // queued at the end of the list of waiters. If <requeue_position>
- // > -1 then it indicates how many entries to skip over before
- // inserting our thread into the list of waiters (e.g.,
- // <requeue_position> == 0 means "insert at front of the queue").
- // Renew has the rather odd semantics such that if there are other
- // waiting threads it will give up the token even if the
- // nesting_level_ > 1. I'm not sure if this is really the right
- // thing to do (since it makes it possible for shared data to be
- // changed unexpectedly) so use with caution... Returns 0 on
- // success, -1 on failure with <ACE_Log_Msg::errnum> as the reason.
- // If errnum == EWOULDBLOCK, and notify == 1,
- // <ACE_Token_Proxy::sleep_hook> has been called on the current
- // owner of the token.
-
- virtual int release (ACE_TPQ_Entry *caller);
- // Relinquish the token. If there are any waiters then the next one
- // in line gets it. If the caller is not the owner, caller is
- // removed from the waiter list.
-
- void dump (void) const;
- // Dump the state of the class.
-
- enum PROXY_TYPE { READER, WRITER };
- // These are the types that proxies can be.
-
- virtual int type (void) const;
- // Returns READER or WRITER.
-
- virtual int owners (OWNER_STACK &o, const ACE_TCHAR *id);
- // Returns a stack of the current owners. Returns -1 on error, 0 on
- // success. If <id> is non-zero, returns 1 if id is an owner.
-
- virtual int is_waiting_for (const ACE_TCHAR *id);
- // Returns 1 if <id> is waiting for this token. 0 otherwise.
-
- virtual int is_owner (const ACE_TCHAR *id);
- // Returns 1 if <id> is an owner of this token. 0 otherwise.
-
-protected:
- int num_writers_;
- // the number of waiting writers.
-
- ACE_TOKEN_CONST::MUTEX lock_;
- // ACE_Mutex_Token used to lock internal data structures.
-
- void notify_new_owner (ACE_TPQ_Entry *caller);
- // Sets the new owner.
-};
-
-// a..
-class ACE_Export ACE_Token_Name
-{
- // = TITLE
- // Allows Token_Manger to identify tokens.
- //
- // = DESCRIPTION
- // For now, this is just a string. We need a string class
- // anyway to use in <ACE_Map_Manager>. Having this class
- // (instead of <ACE_SString>) allows us to easily change if
- // needed. For instance, we may choose to identify tokens by
- // name and *type* in the future.
-public:
- ACE_Token_Name (const ACE_TCHAR *token_name = 0);
- // Construction.
-
- ACE_Token_Name (const ACE_Token_Name &rhs);
- // Copy construction.
-
- virtual ~ACE_Token_Name (void);
- // Death.
-
- void operator= (const ACE_Token_Name &rhs);
- // Copy.
-
- int operator== (const ACE_Token_Name &rhs) const;
- // Comparison.
-
- const ACE_TCHAR *name (void) const;
- // Token name.
-
- void name (const ACE_TCHAR *new_name);
- // Token name.
-
- void dump (void) const;
- // Dump the state of the class.
-
-private:
- ACE_TCHAR token_name_[ACE_MAXTOKENNAMELEN];
- // Name of the token.
-};
-
-// 7..
-class ACE_Export ACE_Token_Proxy
-{
- // = TITLE
- // Abstract representation of ACE tokens.
- //
- // = DESCRIPTION
- // Interface for all Tokens in ACE. This class implements the
- // synchronization needed for tokens (condition variables etc.)
- // The algorithms for the operations (acquire, release, etc.)
- // operate on the generic ACE_Tokens interface. Thus, the _type_
- // of token (mutex, rwlock) can be set at construction of
- // ACE_Token_Proxy. You can use all Tokens in ACE through the
- // ACE_Token_Proxy by passing the proper values at construction.
- // Alternatively, there are class definitions which "know" how to
- // do this (ACE_Local_Mutex, ACE_Local_RLock, ACE_Local_WLock).
- //
- // To add a new type of token (e.g. semaphore), this class is not
- // changed. See ACE_Token_Manager for details.
- //
- // Tokens (e.g. ACE_Mutex_Token) assume that it can always call
- // <ACE_Token_Proxy::token_acquired> on a new token owner. This
- // is not a problem for synchronous use of token proxies (that is,
- // when acquires block until successful.) However, for
- // implementations of the Token Server, which may use asynch
- // operations, the proxy can not go away after an acquire until
- // the token is acquired. This is not really a problem, but
- // should be understood.
-public:
- friend class ACE_Token_Manager;
- friend class ACE_Token_Invariant_Manager; // For testing.
-
- // Initialization and termination methods.
- ACE_Token_Proxy (void);
- // Construction.
-
- virtual ~ACE_Token_Proxy (void);
- // Death.
-
- virtual int open (const ACE_TCHAR *name,
- int ignore_deadlock = 0,
- int debug = 0);
- // <name> is the string uniquely identifying the token.
- // <ignore_deadlock> can be 1 to disable deadlock notifications.
- // <debug> prints debug messages.
-
- // = The following methods have implementations which are
- // independent of the token semantics (mutex, rwlock, etc.) They
- // forward operations to the underlying token and perform the
- // necessary blocking semantics for operations (condition variables
- // etc.) This allows reuse of the blocking code as well as having
- // multiple proxies to the same token.
-
- virtual int acquire (int notify = 0,
- void (*sleep_hook)(void *) = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Calls acquire on the token. Blocks the calling thread if would
- // block.
-
- virtual int renew (int requeue_position = -1,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Calls renew on the token. Blocks the calling thread if would
- // block.
-
- virtual int tryacquire (void (*sleep_hook)(void *) = 0);
- // Calls renew on the token.
-
- virtual int release (ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Calls release on the token.
-
- virtual int remove (ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Calls remove on the token.
-
- virtual int acquire_read (int notify = 0,
- void (*sleep_hook)(void *) = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Since the locking mechanism doesn't support read locks then this
- // just calls <acquire>.
-
- virtual int acquire_write (int notify = 0,
- void (*sleep_hook)(void *) = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Since the locking mechanism doesn't support write locks then this
- // just calls <acquire>.
-
- virtual int tryacquire_read (void (*sleep_hook)(void *) = 0);
- // Since the locking mechanism doesn't support read locks then this
- // just calls <tryacquire>.
-
- virtual int tryacquire_write (void (*sleep_hook)(void *) = 0);
- // Since the locking mechanism doesn't support write locks then this
- // just calls <tryacquire>.
-
- // = Utility methods.
-
- virtual const ACE_TCHAR *client_id (void) const;
- // Get the client id of the proxy. This is implemented as
- // thread-specific data.
-
- virtual void client_id (const ACE_TCHAR *client_id);
- // Set the client_id for the calling thread. I strongly recommend
- // that this not be used unless you really know what you're doing.
- // I use this in the Token Server, and it caused many headaches.
-
- virtual const ACE_TCHAR *name (void) const;
- // Return the name of the token. This is important for use within
- // the token servers (local and remote) as well as with token
- // collections. So, all derivations of ACE_Token_Proxy must be able to
- // stringify some name. The name must uniquely identify a token.
- // So, for instance, the token within the reactor should probably be
- // called "Reactor Token."
-
- virtual void sleep_hook (void);
- // This should really be called <someone_waiting>. This is called
- // by ACE_Token_xx's when another proxy enters the waiting list and
- // requests that the current token holder be notified.
-
- virtual void token_acquired (ACE_TPQ_Entry *);
- // This is called when a queued (waiting) proxy is removed from the
- // waiters list and given the token.
-
- virtual const ACE_TCHAR *owner_id (void);
- // the client id of the current token holder
-
- virtual ACE_Token_Proxy *clone (void) const = 0;
- // Return a dynamically allocated clone of the derived class.
-
- void dump (void) const;
- // Dump the state of the class.
-
- virtual int type (void) const;
- // This method can be used be Tokens (e.g. Readers/Writer Tokens) to
- // distinguish between Proxy types. For instance a Reader proxy
- // should return a different type value than a Writer proxy. The
- // default implementation returns 0.
-
-protected:
- ACE_Token_Proxy (const ACE_Token_Proxy &);
- // Duplication.
-
- int ignore_deadlock_;
- // If this is set, we ignore deadlock.
-
- int debug_;
- // Print a bunch of debug messages.
-
- ACE_Tokens *token_;
- // Reference to the actual logical token. Many ACE_Local_Mutex
- // proxies can reference the same ACE_Mutex_Token.
-
- int handle_options (ACE_Synch_Options &options,
- ACE_TOKEN_CONST::COND_VAR &cv);
- // Handles cond_var waits.
-
- ACE_TSS_TPQ_Entry waiter_;
- // Waiter info used for asynchronous transactions.
-
- virtual ACE_Tokens *create_token (const ACE_TCHAR *name) = 0;
- // Make the correct type of ACE_Tokens. This is called by the Token
- // Manager.
-};
-
-// 8..
-class ACE_Export ACE_Null_Token : public ACE_Token_Proxy
-{
- // = TITLE
- // No op class for nonthreaded platform protocols.
-public:
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
- // @@ Hopefully, we can remove this ridicules ifdef when CE's compiler becomes more normal.
- ACE_Null_Token (void);
- // Construction.
-
- ~ACE_Null_Token (void);
- // Destructor
-#endif /* ACE_LACKS_INLINE_FUNCTION */
-
- virtual int acquire (int /* notify */ = 0,
- void (* /* sleep_hook */ )(void *) = 0,
- ACE_Synch_Options & /* options */ =
- ACE_Synch_Options::defaults) { return 0; }
- // Acquire.
-
- virtual int renew (int /* requeue_position */ = -1,
- ACE_Synch_Options & /* options */ =
- ACE_Synch_Options::defaults) { return 0; }
- // Renew.
-
- virtual int tryacquire (void (* /* sleep_hook */)(void *) = 0) { return 0; }
- // Try acquire.
-
- virtual int release (ACE_Synch_Options & /* options */ =
- ACE_Synch_Options::defaults) { return 0; }
- // Release.
-
- virtual int remove (ACE_Synch_Options & /* options */ =
- ACE_Synch_Options::defaults) { return 0; }
- // Remove.
-
- virtual ACE_Token_Proxy *clone (void) const { return new ACE_Null_Token; }
- // Return a dynamically allocated clone of the derived class.
-
- void dump (void) const;
- // Dump the state of the class.
-
- virtual ACE_Tokens *create_token (const ACE_TCHAR *) { return 0; }
- // Do not allow the Token Manager to create us.
-};
-
-// 9..
-class ACE_Export ACE_Local_Mutex : public ACE_Token_Proxy
-{
- // = TITLE
- // Class that acquires, renews, and releases a synchronization
- // token local to the process.
- //
- // = DESCRIPTION
- // This class is a more general-purpose synchronization mechanism
- // than SunOS 5.x mutexes. For example, it implements "recursive
- // mutex" semantics, where a thread that owns the token can
- // reacquire it without deadlocking. In addition, threads that
- // are blocked awaiting the token are serviced in strict FIFO
- // order as other threads release the token (SunOS 5.x mutexes
- // don't strictly enforce an acquisition order). Lastly,
- // ACE_Local_Mutex performs deadlock detection on acquire calls.
- //
- // The interfaces for acquire, tryacquire, renew, release,
- // etc. are defined in ACE_Token_Proxy. The semantics for
- // ACE_Local_Mutex are that of a mutex.
-public:
- ACE_Local_Mutex (const ACE_TCHAR *token_name = 0,
- int ignore_deadlock = 0,
- int debug = 0);
- // <token_name> uniquely id's the token.
- // <ignore_deadlock> will allow deadlock to occur (useful for
- // testing). <debug> prints a bunch of messages.
-
- ~ACE_Local_Mutex (void);
- // Destructor
-
- void dump (void) const;
- // Dump the state of the class.
-
- virtual ACE_Token_Proxy *clone (void) const;
- // Return deep copy.
-
-protected:
- virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
- // Return a new ACE_Local_Mutex.
-};
-
-// *.
-class ACE_Export ACE_Local_RLock : public ACE_Token_Proxy
-{
- // = TITLE
- // Class that acquires, renews, and releases a readers lock that
- // is local to the process.
- //
- // = DESCRIPTION
- // This class implements the reader interface to canonical
- // readers/writer locks. Multiple readers can hold the lock
- // simultaneously when no writers have the lock. Alternatively,
- // when a writer holds the lock, no other participants (readers
- // or writers) may hold the lock. This class is a more
- // general-purpose synchronization mechanism than SunOS 5.x
- // RLocks. For example, it implements "recursive RLock"
- // semantics, where a thread that owns the token can reacquire it
- // without deadlocking. In addition, threads that are blocked
- // awaiting the token are serviced in strict FIFO order as other
- // threads release the token (SunOS 5.x RLockes don't strictly
- // enforce an acquisition order).
- //
- // The interfaces for acquire, tryacquire, renew, release,
- // etc. are defined in ACE_Token_Proxy. The semantics for
- // ACE_Local_RLock are that of a readers/writers lock. Acquire
- // for this class implies a reader acquisition. That is,
- // multiple clients may acquire a lock for read only.
-public:
- // = Initialization and termination.
-
- ACE_Local_RLock (const ACE_TCHAR *token_name = 0,
- int ignore_deadlock = 0,
- int debug = 0);
- // <token_name> uniquely id's the token.
- // <ignore_deadlock> will allow deadlock to occur (useful for
- // testing). <debug> prints a bunch of messages.
-
- ~ACE_Local_RLock (void);
- // Destructor
-
- void dump (void) const;
- // Dump the state of the class.
-
- virtual int type (void) const;
- // Returns ACE_RW_Token::RLOCK.
-
- virtual ACE_Token_Proxy *clone (void) const;
- // Return deep copy.
-
-protected:
- virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
- // Return a new ACE_Local_Mutex.
-};
-
-// *.
-class ACE_Export ACE_Local_WLock : public ACE_Token_Proxy
-{
- // = TITLE
- // Class that acquires, renews, and releases a writer lock that
- // is local to the process.
- //
- // = DESCRIPTION
- // This class implements the writer interface to canonical
- // readers/writer locks. Multiple readers can hold the lock
- // simultaneously when no writers have the lock. Alternatively,
- // when a writer holds the lock, no other participants (readers
- // or writers) may hold the lock. This class is a more
- // general-purpose synchronization mechanism than SunOS 5.x
- // WLock. For example, it implements "recursive WLock"
- // semantics, where a thread that owns the token can reacquire it
- // without deadlocking. In addition, threads that are blocked
- // awaiting the token are serviced in strict FIFO order as other
- // threads release the token (SunOS 5.x WLocks don't strictly
- // enforce an acquisition order).
- //
- // The interfaces for acquire, tryacquire, renew, release,
- // etc. are defined in ACE_Token_Proxy. The semantics for
- // ACE_Local_WLock are that of a readers/writers lock. Acquire
- // for this class implies a writer acquisition. That is, only
- // one client may hold the lock for writing.
-public:
- // = Initialization and termination.
-
- ACE_Local_WLock (const ACE_TCHAR *token_name = 0,
- int ignore_deadlock = 0,
- int debug = 0);
- // <token_name> uniquely id's the token.
- // <ignore_deadlock> will allow deadlock to occur (useful for
- // testing). <debug> prints a bunch of messages.
-
- ~ACE_Local_WLock (void);
- // Destructor
-
- void dump (void) const;
- // Dump the state of the class.
-
- virtual int type (void) const;
- // Returns ACE_RW_Token::WLOCK.
-
- virtual ACE_Token_Proxy *clone (void) const;
- // Return deep copy.
-
-protected:
- ACE_Tokens *create_token (const ACE_TCHAR *name);
- // Return a new ACE_Local_Mutex.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Local_Tokens.i"
-#endif /* __ACE_INLINE__ */
-#include "ace/post.h"
-#endif /* ACE_LOCAL_MUTEX_H */
diff --git a/ace/Local_Tokens.i b/ace/Local_Tokens.i
deleted file mode 100644
index 0434936ab9c..00000000000
--- a/ace/Local_Tokens.i
+++ /dev/null
@@ -1,433 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Local_Tokens.i
-
-ACE_INLINE int
-ACE_Token_Proxy::type (void) const
-{
- ACE_TRACE ("ACE_Token_Proxy::type");
- return 0;
-}
-
-
-ACE_INLINE int
-ACE_Token_Proxy::acquire_read (int notify,
- void (*sleep_hook)(void *),
- ACE_Synch_Options &options)
-{
- return this->acquire (notify,
- sleep_hook,
- options);
-}
-
-ACE_INLINE int
-ACE_Token_Proxy::acquire_write (int notify,
- void (*sleep_hook)(void *),
- ACE_Synch_Options &options)
-{
- return this->acquire (notify,
- sleep_hook,
- options);
-}
-
-ACE_INLINE int
-ACE_Token_Proxy::tryacquire_read (void (*sleep_hook)(void *))
-{
- return this->tryacquire (sleep_hook);
-}
-
-ACE_INLINE int
-ACE_Token_Proxy::tryacquire_write (void (*sleep_hook)(void *))
-{
- return this->tryacquire (sleep_hook);
-}
-
-// ************************************************************
-
-ACE_INLINE int
-ACE_Token_Proxy_Queue::size (void)
-{
- ACE_TRACE ("ACE_Token_Proxy_Queue::size");
- return this->size_;
-}
-
-// ************************************************************
-
-ACE_INLINE int
-ACE_TPQ_Entry::waiting (void) const
-{
- ACE_TRACE ("ACE_TPQ_Entry::waiting");
- return waiting_;
-}
-
-ACE_INLINE void
-ACE_TPQ_Entry::waiting (int v)
-{
- ACE_TRACE ("ACE_TPQ_Entry::waiting");
- waiting_ = v;
-}
-
-ACE_INLINE const ACE_TCHAR *
-ACE_TPQ_Entry::client_id (void) const
-{
- ACE_TRACE ("ACE_TPQ_Entry::client_id");
- return this->client_id_;
-}
-
-ACE_INLINE ACE_Token_Proxy *
-ACE_TPQ_Entry::proxy (void) const
-{
- ACE_TRACE ("ACE_TPQ_Entry::proxy");
- return this->proxy_;
-}
-
-ACE_INLINE void
-ACE_TPQ_Entry::proxy (ACE_Token_Proxy *proxy)
-{
- ACE_TRACE ("ACE_TPQ_Entry::proxy");
- this->proxy_ = proxy;
-}
-
-ACE_INLINE
-ACE_TSS_TPQ_Entry::~ACE_TSS_TPQ_Entry (void)
-{
-}
-
-ACE_INLINE
-ACE_TPQ_Iterator::~ACE_TPQ_Iterator (void)
-{
-}
-
-ACE_INLINE
-ACE_Token_Proxy_Queue::~ACE_Token_Proxy_Queue (void)
-{
-}
-
-ACE_INLINE
-ACE_Tokens::~ACE_Tokens (void)
-{
-}
-
-ACE_INLINE void
-ACE_Tokens::remove (ACE_TPQ_Entry *caller)
-{
- this->waiters_.remove (caller);
-}
-
-ACE_INLINE int
-ACE_Tokens::dec_reference (void)
-{
- ACE_TRACE ("ACE_Tokens::dec_reference");
- if (this->reference_count_ == 0)
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("dec_reference already zero")));
- return 0;
- }
-
- return --this->reference_count_;
-}
-
-ACE_INLINE void
-ACE_Tokens::inc_reference (void)
-{
- ACE_TRACE ("ACE_Tokens::inc_reference");
- ++this->reference_count_;
-}
-
-ACE_INLINE ACE_Token_Proxy_Queue *
-ACE_Tokens::waiters ()
-{
- ACE_TRACE ("ACE_Tokens::waiters");
- return &this->waiters_;
-}
-
-ACE_INLINE int
-ACE_Tokens::no_of_waiters ()
-{
- ACE_TRACE ("ACE_Tokens::no_of_waiters");
- return this->waiters_.size ();
-}
-
-ACE_INLINE const ACE_TPQ_Entry *
-ACE_Token_Proxy_Queue::head (void)
-{
- ACE_TRACE ("ACE_Token_Proxy_Queue::head");
- if (this->head_ == 0)
- return 0;
- else
- return this->head_;
-}
-
-// **************************************************
-// **************************************************
-// **************************************************
-
-ACE_INLINE void
-ACE_Tokens::visit (int v)
-{
- ACE_TRACE ("ACE_Tokens::visit");
- visited_ = v;
-}
-
-ACE_INLINE int
-ACE_Tokens::visited (void)
-{
- ACE_TRACE ("ACE_Tokens::visited");
- return visited_;
-}
-
-ACE_INLINE ACE_TPQ_Entry *
-ACE_Tokens::owner (void)
-{
- ACE_TRACE ("ACE_Tokens::owner");
- return (ACE_TPQ_Entry *) this->waiters_.head ();
-}
-
-ACE_INLINE const ACE_TCHAR*
-ACE_Tokens::owner_id ()
-{
- ACE_TRACE ("ACE_Tokens::owner_id");
- if (this->owner () == 0)
- return ACE_TEXT ("no owner");
- else
- return this->owner ()->client_id ();
-}
-
-ACE_INLINE const ACE_TCHAR*
-ACE_Tokens::name (void)
-{
- ACE_TRACE ("ACE_Tokens::name");
- return this->token_name_;
-}
-
-#if 0
-ACE_INLINE ACE_Token_Proxy *
-ACE_Tokens::current_owner (void)
-{
- ACE_TRACE ("ACE_Tokens::current_owner");
- // ACE_GUARD_RETURN ???
-
- if (this->owner () == 0)
- return 0;
- else
- return this->owner ()->proxy ();
-}
-#endif /* 0 */
-
-// ************************************************************
-
-ACE_INLINE int
-ACE_Mutex_Token::type (void) const
-{
- ACE_TRACE ("ACE_Mutex_Token::type");
- return (int) ACE_Tokens::MUTEX;
-}
-
-// ************************************************************
-
-ACE_INLINE int
-ACE_RW_Token::type (void) const
-{
- ACE_TRACE ("ACE_RW_Token::type");
- return (int) ACE_Tokens::RWLOCK;
-}
-
-// ************************************************************
-
-ACE_INLINE int
-ACE_TPQ_Entry::nesting_level (void) const
-{
- ACE_TRACE ("ACE_TPQ_Entry::nesting_level");
- return this->nesting_level_;
-}
-
-ACE_INLINE void
-ACE_TPQ_Entry::nesting_level (int delta)
-{
- ACE_TRACE ("ACE_TPQ_Entry::nesting_level");
- this->nesting_level_ += delta;
-}
-
-ACE_INLINE ACE_TPQ_Entry::PTVF
-ACE_TPQ_Entry::sleep_hook (void) const
-{
- ACE_TRACE ("ACE_TPQ_Entry::sleep_hook");
- return this->sleep_hook_;
-}
-
-ACE_INLINE void
-ACE_TPQ_Entry::sleep_hook (void (*sh)(void *))
-{
- ACE_TRACE ("ACE_TPQ_Entry::sleep_hook");
- this->sleep_hook_ = sh;
-}
-
-ACE_INLINE void
-ACE_TPQ_Entry::call_sleep_hook (void)
-{
- ACE_TRACE ("ACE_TPQ_Entry::call_sleep_hook");
-
- // if a function has been registered, call it.
- if (this->sleep_hook () != 0)
- this->sleep_hook () ((void *) this->proxy ());
- else
- // otherwise, call back the sleep_hook method
- this->proxy ()->sleep_hook ();
-}
-
-ACE_INLINE int
-ACE_TPQ_Entry::equal_client_id (const ACE_TCHAR *id)
-{
- ACE_TRACE ("ACE_TPQ_Entry::equal_client_id");
- return (ACE_OS::strcmp (this->client_id (), id) == 0);
-}
-
-// ************************************************************
-// ************************************************************
-// ************************************************************
-
-ACE_INLINE
-ACE_Local_Mutex::ACE_Local_Mutex (const ACE_TCHAR *token_name,
- int ignore_deadlock,
- int debug)
-{
- ACE_TRACE ("ACE_Local_Mutex::ACE_Local_Mutex");
- this->open (token_name, ignore_deadlock, debug);
-}
-
-ACE_INLINE void
-ACE_Token_Name::name (const ACE_TCHAR *new_name)
-{
- ACE_TRACE ("ACE_Token_Name::name");
-
- if (new_name == 0)
- new_name = ACE_TEXT ("no name");
-
- int n = ACE_OS::strlen (new_name) + 1;
-
- if (n >= ACE_MAXTOKENNAMELEN)
- n = ACE_MAXTOKENNAMELEN - 1;
-
- ACE_OS::strncpy (this->token_name_, (ACE_TCHAR *) new_name, n);
-}
-
-ACE_INLINE const ACE_TCHAR*
-ACE_Token_Name::name (void) const
-{
- ACE_TRACE ("ACE_Token_Name::name");
- return this->token_name_;
-}
-
-ACE_INLINE ACE_Token_Proxy *
-ACE_Local_Mutex::clone (void) const
-{
- return new ACE_Local_Mutex (token_->name (),
- ignore_deadlock_,
- debug_);
-}
-
-ACE_INLINE ACE_Tokens *
-ACE_Local_Mutex::create_token (const ACE_TCHAR *name)
-{
- return new ACE_Mutex_Token (name);
-}
-
-ACE_INLINE
-ACE_Local_Mutex::~ACE_Local_Mutex (void)
-{
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_Local_RLock::ACE_Local_RLock (const ACE_TCHAR *token_name,
- int ignore_deadlock,
- int debug)
-{
- ACE_TRACE ("ACE_Local_RLock::ACE_Local_RLock");
- this->open (token_name, ignore_deadlock, debug);
-}
-
-ACE_INLINE
-ACE_Local_RLock::~ACE_Local_RLock (void)
-{
-}
-
-ACE_INLINE ACE_Tokens *
-ACE_Local_RLock::create_token (const ACE_TCHAR *name)
-{
- return new ACE_RW_Token (name);
-}
-
-ACE_INLINE int
-ACE_Local_RLock::type (void) const
-{
- return ACE_RW_Token::READER;
-}
-
-ACE_INLINE ACE_Token_Proxy *
-ACE_Local_RLock::clone (void) const
-{
- return new ACE_Local_RLock (token_->name (),
- ignore_deadlock_,
- debug_);
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_Local_WLock::ACE_Local_WLock (const ACE_TCHAR *token_name,
- int ignore_deadlock,
- int debug)
-{
- ACE_TRACE ("ACE_Local_WLock::ACE_Local_WLock");
- this->open (token_name, ignore_deadlock, debug);
-}
-
-ACE_INLINE
-ACE_Local_WLock::~ACE_Local_WLock (void)
-{
-}
-
-ACE_INLINE ACE_Tokens *
-ACE_Local_WLock::create_token (const ACE_TCHAR *name)
-{
- return new ACE_RW_Token (name);
-}
-
-ACE_INLINE int
-ACE_Local_WLock::type (void) const
-{
- return ACE_RW_Token::WRITER;
-}
-
-ACE_INLINE ACE_Token_Proxy *
-ACE_Local_WLock::clone (void) const
-{
- return new ACE_Local_WLock (token_->name (),
- ignore_deadlock_,
- debug_);
-}
-
-// ************************************************************
-
-
-ACE_INLINE void
-ACE_Token_Name::operator= (const ACE_Token_Name &rhs)
-{
- ACE_TRACE ("ACE_Token_Name::operator=");
- if (&rhs == this)
- return;
- else
- this->name (rhs.name ());
-}
-
-ACE_INLINE int
-ACE_Token_Name::operator== (const ACE_Token_Name &rhs) const
-{
- ACE_TRACE ("ACE_Token_Name::operator==");
-
- // the name and type must be the same
- return (ACE_OS::strcmp (this->token_name_, rhs.name ()) == 0);
-}
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
deleted file mode 100644
index 8bb2898902f..00000000000
--- a/ace/Log_Msg.cpp
+++ /dev/null
@@ -1,1768 +0,0 @@
-// $Id$
-
-// We need this to get the status of ACE_NTRACE...
-#include "ace/config-all.h"
-
-// Turn off tracing for the duration of this file.
-#if defined (ACE_NTRACE)
-# undef ACE_NTRACE
-#endif /* ACE_NTRACE */
-#define ACE_NTRACE 1
-
-// This must come first to avoid "order of include" problems...
-
-#if !defined (ACE_HAS_INLINED_OSCALLS) && !defined(ACE_HAS_ONE_DEFINITION_RULE)
-# define ACE_HAS_INLINED_OSCALLS
-# include "ace/ACE.h"
-# undef ACE_HAS_INLINED_OSCALLS
-#else
-# include "ace/ACE.h"
-#endif /* !ACE_HAS_INLINED_OSCALLS */
-
-#include "ace/Thread_Manager.h"
-#include "ace/OS.h"
-
-#if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE == 0)
-# include "ace/Object_Manager.h"
-#endif /* ! ACE_MT_SAFE */
-
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
-# include "ace/streams.h"
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-
-// IPC conduit between sender and client daemon. This should be
-// included in the <ACE_Log_Msg> class, but due to "order of include"
-// problems it can't be...
-#if defined (ACE_HAS_STREAM_PIPES)
-# include "ace/SPIPE_Connector.h"
-typedef ACE_SPIPE_Stream ACE_LOG_MSG_IPC_STREAM;
-typedef ACE_SPIPE_Connector ACE_LOG_MSG_IPC_CONNECTOR;
-typedef ACE_SPIPE_Addr ACE_LOG_MSG_IPC_ADDR;
-#else
-# include "ace/SOCK_Connector.h"
-typedef ACE_SOCK_Stream ACE_LOG_MSG_IPC_STREAM;
-typedef ACE_SOCK_Connector ACE_LOG_MSG_IPC_CONNECTOR;
-typedef ACE_INET_Addr ACE_LOG_MSG_IPC_ADDR;
-#endif /* ACE_HAS_STREAM_PIPES */
-
-ACE_RCSID(ace, Log_Msg, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Log_Msg)
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- int ACE_Log_Msg::key_created_ = 0;
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \
- defined (ACE_HAS_TSS_EMULATION)
- ACE_thread_key_t ACE_Log_Msg::log_msg_tss_key_;
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */
-#endif /* ACE_MT_SAFE */
-
-// This is only needed here because we can't afford to call
-// ACE_LOG_MSG->instance() from within ACE_Log_Msg::instance() or else
-// we will recurse infinitely! Not for public use!
-#define ACE_NEW_RETURN_I(POINTER,CONSTRUCTOR,RET_VAL) \
- do { POINTER = new CONSTRUCTOR; \
- if (POINTER == 0) { errno = ENOMEM; return RET_VAL; } \
- } while (0)
-
-// Instance count for Log_Msg - used to know when dynamically
-// allocated storage (program name and host name) can be safely
-// deleted.
-int ACE_Log_Msg::instance_count_ = 0;
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-# if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE == 0)
- template class ACE_Cleanup_Adapter<ACE_Log_Msg>;
-#else
-template class ACE_Reverse_Lock<ACE_Recursive_Thread_Mutex>;
-template class ACE_Guard<ACE_Reverse_Lock<ACE_Recursive_Thread_Mutex> >;
-# endif /* ! ACE_MT_SAFE */
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE == 0)
-# pragma instantiate ACE_Cleanup_Adapter<ACE_Log_Msg>
-#else
-#pragma instantiate ACE_Reverse_Lock<ACE_Recursive_Thread_Mutex>
-#pragma instantiate ACE_Guard<ACE_Reverse_Lock<ACE_Recursive_Thread_Mutex> >
-# endif /* ! ACE_MT_SAFE */
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-class ACE_Log_Msg_Manager
- // = TITLE
- // Synchronize output operations.
- //
- // = DESCRIPTION
- // Provides global point of contact for all ACE_Log_Msg instances
- // in a process.
- //
- // For internal use by ACE, only!
-{
-public:
- static ACE_LOG_MSG_IPC_STREAM *message_queue_;
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- static void close (void);
-
- static ACE_Recursive_Thread_Mutex *get_lock (void);
-
-private:
- static ACE_Recursive_Thread_Mutex *lock_;
-#endif /* ! ACE_MT_SAFE */
-};
-
-ACE_LOG_MSG_IPC_STREAM *ACE_Log_Msg_Manager::message_queue_ = 0;
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-ACE_Recursive_Thread_Mutex *ACE_Log_Msg_Manager::lock_ = 0;
-
-ACE_Recursive_Thread_Mutex *
-ACE_Log_Msg_Manager::get_lock (void)
-{
- // This function is called by the first thread to create an ACE_Log_Msg
- // instance. It makes the call while holding a mutex, so we don't have
- // to grab another one here.
-
- if (ACE_Log_Msg_Manager::lock_ == 0)
- {
- ACE_NO_HEAP_CHECK;
-
- ACE_NEW_RETURN_I (ACE_Log_Msg_Manager::lock_,
- ACE_Recursive_Thread_Mutex,
- 0);
- }
-
-
- if (ACE_Log_Msg_Manager::message_queue_ == 0)
- {
- ACE_NO_HEAP_CHECK;
-
- // Allocate the ACE_Log_Msg IPC instance.
- ACE_NEW_RETURN (ACE_Log_Msg_Manager::message_queue_,
- ACE_LOG_MSG_IPC_STREAM,
- 0);
- }
-
- return ACE_Log_Msg_Manager::lock_;
-}
-
-void
-ACE_Log_Msg_Manager::close (void)
-{
-#if defined (ACE_HAS_STHREADS) && ! defined (ACE_HAS_TSS_EMULATION) && ! defined (ACE_HAS_EXCEPTIONS)
- // Delete the (main thread's) Log_Msg instance. I think that this
- // is only "necessary" if exception handling is not enabled.
- // Without exception handling, main thread TSS destructors don't
- // seem to be called. It's not really necessary anyways, because
- // this one leak is harmless on Solaris.
- delete ACE_Log_Msg::instance ();
-#endif /* ACE_HAS_STHREADS && ! TSS_EMULATION && ! ACE_HAS_EXCEPTIONS */
-
- // Ugly, ugly, but don't know a better way.
- delete ACE_Log_Msg_Manager::lock_;
- ACE_Log_Msg_Manager::lock_ = 0;
-}
-
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \
- defined (ACE_HAS_TSS_EMULATION)
-/* static */
-#if defined (ACE_HAS_THR_C_DEST)
-extern "C"
-#endif /* ACE_HAS_THR_C_DEST */
-void
-ACE_TSS_cleanup (void *ptr)
-{
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- // Delegate to thr_desc if this not has terminated
- ACE_Log_Msg* log_msg = (ACE_Log_Msg*) ptr;
- if (log_msg->thr_desc()!=0)
- log_msg->thr_desc()->log_msg_cleanup(log_msg);
- else
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
- delete (ACE_Log_Msg *) ptr;
-}
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */
-#endif /* ! ACE_MT_SAFE */
-
-/* static */
-int
-ACE_Log_Msg::exists (void)
-{
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \
- defined (ACE_HAS_TSS_EMULATION)
- ACE_Log_Msg *tss_log_msg = 0;
-
- // Get the tss_log_msg from thread-specific storage.
- return key_created_
- && ACE_Thread::getspecific (log_msg_tss_key_,
- ACE_reinterpret_cast (void **,
- &tss_log_msg)) != -1
- && tss_log_msg;
-# else
-# error "Platform must support thread-specific storage if threads are used."
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */
-#else /* ! ACE_MT_SAFE */
- return 1;
-#endif /* ! ACE_MT_SAFE */
-}
-
-ACE_Log_Msg *
-ACE_Log_Msg::instance (void)
-{
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \
- defined (ACE_HAS_TSS_EMULATION)
- // TSS Singleton implementation.
-
- if (key_created_ == 0)
- {
- ACE_thread_mutex_t *lock =
- ACE_reinterpret_cast (ACE_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object
- [ACE_OS_Object_Manager::ACE_LOG_MSG_INSTANCE_LOCK]);
- ACE_OS::thread_mutex_lock (lock);
-
- if (key_created_ == 0)
- {
- // Allocate the Singleton lock.
- ACE_Log_Msg_Manager::get_lock ();
-
- {
- ACE_NO_HEAP_CHECK;
- if (ACE_Thread::keycreate (&log_msg_tss_key_,
- &ACE_TSS_cleanup) != 0)
- {
- ACE_OS::thread_mutex_unlock (lock);
- return 0; // Major problems, this should *never* happen!
- }
- }
-
- key_created_ = 1;
- }
-
- ACE_OS::thread_mutex_unlock (lock);
- }
-
- ACE_Log_Msg *tss_log_msg = 0;
-
- // Get the tss_log_msg from thread-specific storage.
- if (ACE_Thread::getspecific (log_msg_tss_key_,
- ACE_reinterpret_cast (void **,
- &tss_log_msg)) == -1)
- return 0; // This should not happen!
-
- // Check to see if this is the first time in for this thread.
- if (tss_log_msg == 0)
- {
- // Allocate memory off the heap and store it in a pointer in
- // thread-specific storage (on the stack...). Stop heap
- // checking, the memory will always be freed by the thread
- // rundown because of the TSS callback set up when the key was
- // created. This prevents from getting these blocks reported as
- // memory leaks.
- {
- ACE_NO_HEAP_CHECK;
-
- ACE_NEW_RETURN_I (tss_log_msg,
- ACE_Log_Msg,
- 0);
- // Store the dynamically allocated pointer in thread-specific
- // storage. It gets deleted via the ACE_TSS_cleanup function
- // when the thread terminates.
-
- if (ACE_Thread::setspecific (log_msg_tss_key_,
- ACE_reinterpret_cast (void *,
- tss_log_msg)) != 0)
- return 0; // Major problems, this should *never* happen!
- }
- }
-
- return tss_log_msg;
-# else
-# error "Platform must support thread-specific storage if threads are used."
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */
-#else /* ! ACE_MT_SAFE */
- // We don't have threads, we cannot call
- // ACE_Log_Msg_Manager::get_lock () to initialize the message queue,
- // so instead we do it here.
- if (ACE_Log_Msg_Manager::message_queue_ == 0)
- ACE_NEW_RETURN (ACE_Log_Msg_Manager::message_queue_,
- ACE_LOG_MSG_IPC_STREAM,
- 0);
-
- // Singleton implementation.
- static ACE_Cleanup_Adapter<ACE_Log_Msg> *log_msg = 0;
- if (log_msg == 0)
- {
- ACE_NEW_RETURN (log_msg, ACE_Cleanup_Adapter<ACE_Log_Msg>, 0);
- // Register the instance for destruction at program termination.
- ACE_Object_Manager::at_exit (log_msg);
- }
-
- return &log_msg->object ();
-#endif /* ! ACE_MT_SAFE */
-}
-
-// Sets the flag in the default priority mask used to initialize
-// ACE_Log_Msg instances, as well as the current per-thread instance.
-
-void
-ACE_Log_Msg::enable_debug_messages (ACE_Log_Priority priority)
-{
- ACE_SET_BITS (ACE_Log_Msg::default_priority_mask_, priority);
- ACE_Log_Msg *i = ACE_Log_Msg::instance ();
- i->priority_mask (i->priority_mask () | priority);
-}
-
-// Clears the flag in the default priority mask used to initialize
-// ACE_Log_Msg instances, as well as the current per-thread instance.
-
-void
-ACE_Log_Msg::disable_debug_messages (ACE_Log_Priority priority)
-{
- ACE_CLR_BITS (ACE_Log_Msg::default_priority_mask_, priority);
- ACE_Log_Msg *i = ACE_Log_Msg::instance ();
- i->priority_mask (i->priority_mask () & ~priority);
-}
-
-// Name of the local host.
-const ACE_TCHAR *ACE_Log_Msg::local_host_ = 0;
-
-// Records the program name.
-const ACE_TCHAR *ACE_Log_Msg::program_name_ = 0;
-
-// Default is to use stderr.
-u_long ACE_Log_Msg::flags_ = ACE_Log_Msg::STDERR;
-
-// Process id of the current process.
-pid_t ACE_Log_Msg::pid_ = -1;
-
-// Current offset of msg_[].
-int ACE_Log_Msg::msg_off_ = 0;
-
-// Default per-thread priority mask
-// By default, all priorities are enabled.
-u_long ACE_Log_Msg::default_priority_mask_ = LM_SHUTDOWN
- | LM_TRACE
- | LM_DEBUG
- | LM_INFO
- | LM_NOTICE
- | LM_WARNING
- | LM_STARTUP
- | LM_ERROR
- | LM_CRITICAL
- | LM_ALERT
- | LM_EMERGENCY;
-
-// Default per-process priority mask
-// By default, no priorities are enabled.
-u_long ACE_Log_Msg::process_priority_mask_ = 0;
-
-void
-ACE_Log_Msg::close (void)
-{
- // Please note that this will be called by a statement that is
- // harded coded into the ACE_Object_Manager's shutdown sequence, in
- // its destructor.
-
- ACE_MT (ACE_Log_Msg_Manager::close ());
-}
-
-// Call after a fork to resynchronize the PID and PROGRAM_NAME
-// variables.
-void
-ACE_Log_Msg::sync (const ACE_TCHAR *prog_name)
-{
- ACE_TRACE ("ACE_Log_Msg::sync");
-
- if (prog_name)
- {
- // Must free if already allocated!!!
- ACE_OS::free ((void *) ACE_Log_Msg::program_name_);
-
- // Stop heap checking, block will be freed by the destructor when
- // the last ACE_Log_Msg instance is deleted.
- // Heap checking state will be restored when the block is left.
- {
- ACE_NO_HEAP_CHECK;
-
- ACE_Log_Msg::program_name_ = ACE_OS::strdup (prog_name);
- }
- }
-
- ACE_Log_Msg::pid_ = ACE_OS::getpid ();
- ACE_Log_Msg::msg_off_ = 0;
-}
-
-u_long
-ACE_Log_Msg::flags (void)
-{
- ACE_TRACE ("ACE_Log_Msg::flags");
- u_long result;
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Log_Msg_Manager::get_lock (), 0));
-
- result = ACE_Log_Msg::flags_;
- return result;
-}
-
-void
-ACE_Log_Msg::set_flags (u_long flgs)
-{
- ACE_TRACE ("ACE_Log_Msg::set_flags");
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Log_Msg_Manager::get_lock ()));
-
- ACE_SET_BITS (ACE_Log_Msg::flags_, flgs);
-}
-
-void
-ACE_Log_Msg::clr_flags (u_long flgs)
-{
- ACE_TRACE ("ACE_Log_Msg::clr_flags");
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Log_Msg_Manager::get_lock ()));
-
- ACE_CLR_BITS (ACE_Log_Msg::flags_, flgs);
-}
-
-int
-ACE_Log_Msg::acquire (void)
-{
- ACE_TRACE ("ACE_Log_Msg::acquire");
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- return ACE_Log_Msg_Manager::get_lock ()->acquire ();
-#else /* ! ACE_MT_SAFE */
- return 0;
-#endif /* ! ACE_MT_SAFE */
-}
-
-u_long
-ACE_Log_Msg::priority_mask (u_long n_mask, MASK_TYPE mask_type)
-{
- u_long o_mask;
-
- if (mask_type == THREAD) {
- o_mask = this->priority_mask_;
- this->priority_mask_ = n_mask;
- }
- else {
- o_mask = ACE_Log_Msg::process_priority_mask_;
- ACE_Log_Msg::process_priority_mask_ = n_mask;
- }
-
- return o_mask;
-}
-
-u_long
-ACE_Log_Msg::priority_mask (MASK_TYPE mask_type)
-{
- return mask_type == THREAD ? this->priority_mask_
- : ACE_Log_Msg::process_priority_mask_;
-}
-
-int
-ACE_Log_Msg::log_priority_enabled (ACE_Log_Priority log_priority)
-{
- return ACE_BIT_ENABLED (this->priority_mask_ |
- ACE_Log_Msg::process_priority_mask_,
- log_priority);
-}
-
-int
-ACE_Log_Msg::release (void)
-{
- ACE_TRACE ("ACE_Log_Msg::release");
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- return ACE_Log_Msg_Manager::get_lock ()->release ();
-#else /* ! ACE_MT_SAFE */
- return 0;
-#endif /* ! ACE_MT_SAFE */
-}
-
-ACE_Log_Msg::ACE_Log_Msg (void)
- : status_ (0),
- errnum_ (0),
- linenum_ (0),
- restart_ (1), // Restart by default...
- ostream_ (0),
- msg_callback_ (0),
- trace_depth_ (0),
- trace_active_ (0),
- tracing_enabled_ (1), // On by default?
- delete_ostream_(0),
- thr_desc_ (0),
-#if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- seh_except_selector_ (ACE_SEH_Default_Exception_Selector),
- seh_except_handler_ (ACE_SEH_Default_Exception_Handler),
-#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
- priority_mask_ (default_priority_mask_)
-{
- // ACE_TRACE ("ACE_Log_Msg::ACE_Log_Msg");
-
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Log_Msg_Manager::get_lock ()));
- ++instance_count_;
-}
-
-ACE_Log_Msg::~ACE_Log_Msg (void)
-{
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-
- int instance_count;
-
- // Only hold the guard while updating the instance_count_.
- // If ACE_Log_Msg_Manager::close () is called, the lock will
- // be deleted.
- {
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Log_Msg_Manager::get_lock ()));
- instance_count = --instance_count_;
- }
- // Release the guard.
-
-#else /* ! ACE_MT_SAFE */
- int instance_count = --instance_count_;
-#endif /* ! ACE_MT_SAFE */
-
- // If this is the last instance then cleanup. Only the last
- // thread to destroy its ACE_Log_Msg instance should execute
- // this block.
- if (instance_count == 0)
- {
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# if defined (ACE_HAS_TSS_EMULATION)
- ACE_Log_Msg_Manager::close ();
-# endif /* ACE_HAS_TSS_EMULATION */
-# endif /* ACE_MT_SAFE */
-
- // Destroy the message queue instance.
- ACE_Log_Msg_Manager::message_queue_->close ();
- delete ACE_Log_Msg_Manager::message_queue_;
- ACE_Log_Msg_Manager::message_queue_ = 0;
-
- if (ACE_Log_Msg::program_name_)
- {
- ACE_OS::free ((void *) ACE_Log_Msg::program_name_);
- ACE_Log_Msg::program_name_ = 0;
- }
-
- if (ACE_Log_Msg::local_host_)
- {
- ACE_OS::free ((void *) ACE_Log_Msg::local_host_);
- ACE_Log_Msg::local_host_ = 0;
- }
- }
-
- //
- // do we need to close and clean up?
- //
- if (this->delete_ostream_ == 1)
-#if defined (ACE_LACKS_IOSTREAM_TOTALLY)
- {
- ACE_OS::fclose (this->ostream_);
- }
-#else
- {
- delete ostream_;
- }
-#endif
-}
-
-// Open the sender-side of the message queue.
-
-int
-ACE_Log_Msg::open (const ACE_TCHAR *prog_name,
- u_long flags,
- const ACE_TCHAR *logger_key)
-{
- ACE_TRACE ("ACE_Log_Msg::open");
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Log_Msg_Manager::get_lock (), -1));
-
- if (prog_name)
- {
- ACE_OS::free ((void *) ACE_Log_Msg::program_name_);
-
- // Stop heap checking, block will be freed by the destructor.
- {
- ACE_NO_HEAP_CHECK;
-
- ACE_ALLOCATOR_RETURN (ACE_Log_Msg::program_name_,
- ACE_OS::strdup (prog_name),
- -1);
- }
- }
-
- int status = 0;
-
- // Be sure that there is a message_queue_, with multiple threads.
- ACE_MT (ACE_Log_Msg_Manager::get_lock ());
-
- // Always close the current handle before doing anything else.
- if (ACE_Log_Msg_Manager::message_queue_->get_handle () != ACE_INVALID_HANDLE)
- {
- // If we don't do this, handles aren't reused on Win32 and the
- // server eventually crashes!
-#if defined (ACE_WIN32)
- ACE_INT32 dummy = ~0;
- ACE_Log_Msg_Manager::message_queue_->send_n ((const void *) &dummy,
- sizeof (ACE_INT32));
-#endif /* ACE_WIN32 */
- ACE_Log_Msg_Manager::message_queue_->close ();
- }
-
- // Note that if we fail to open the message queue the default action
- // is to use stderr (set via static initialization in the
- // ACE_Log_Msg.C file).
-
- if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::LOGGER))
- {
- if (logger_key == 0)
- status = -1;
- else
- {
- ACE_LOG_MSG_IPC_CONNECTOR con;
- status = con.connect (*ACE_Log_Msg_Manager::message_queue_,
- ACE_LOG_MSG_IPC_ADDR (logger_key));
- }
-
- if (status == -1)
- ACE_SET_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::STDERR);
- else
- ACE_SET_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::LOGGER);
- }
- else if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::LOGGER))
- {
- // If we are closing down logger, redirect logging to stderr.
- ACE_CLR_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::LOGGER);
- ACE_SET_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::STDERR);
- }
-
- // Remember, ACE_Log_Msg::STDERR bit is on by default...
- if (status != -1
- && ACE_BIT_ENABLED (flags,
- ACE_Log_Msg::STDERR) == 0)
- ACE_CLR_BITS (ACE_Log_Msg::flags_,
- ACE_Log_Msg::STDERR);
-
- // VERBOSE takes precedence over VERBOSE_LITE...
- if (ACE_BIT_ENABLED (flags,
- ACE_Log_Msg::VERBOSE_LITE))
- ACE_SET_BITS (ACE_Log_Msg::flags_,
- ACE_Log_Msg::VERBOSE_LITE);
- else if (ACE_BIT_ENABLED (flags,
- ACE_Log_Msg::VERBOSE))
- ACE_SET_BITS (ACE_Log_Msg::flags_,
- ACE_Log_Msg::VERBOSE);
-
- if (ACE_BIT_ENABLED (flags,
- ACE_Log_Msg::OSTREAM))
- {
- ACE_SET_BITS (ACE_Log_Msg::flags_,
- ACE_Log_Msg::OSTREAM);
- // Only set this to cerr if it hasn't already been set.
- if (this->msg_ostream () == 0)
- this->msg_ostream (ACE_DEFAULT_LOG_STREAM);
- }
-
- if (ACE_BIT_ENABLED (flags,
- ACE_Log_Msg::MSG_CALLBACK))
- ACE_SET_BITS (ACE_Log_Msg::flags_,
- ACE_Log_Msg::MSG_CALLBACK);
-
- if (ACE_BIT_ENABLED (flags,
- ACE_Log_Msg::SILENT))
- ACE_SET_BITS (ACE_Log_Msg::flags_,
- ACE_Log_Msg::SILENT);
-
- return status;
-}
-
-// Valid Options (prefixed by '%', as in printf format strings) include:
-// 'A': print an ACE_timer_t value
-// 'a': exit the program at this point (var-argument is the exit status!)
-// 'c': print a character
-// 'i', 'd': print a decimal number
-// 'I', indent according to nesting depth
-// 'e', 'E', 'f', 'F', 'g', 'G': print a double
-// 'l', print line number where an error occurred.
-// 'm': Return the message corresponding to errno value, e.g., as done by <strerror>
-// 'N': print file name where the error occurred.
-// 'n': print the name of the program (or "<unknown>" if not set)
-// 'o': print as an octal number
-// 'P': format the current process id
-// 'p': format the appropriate errno message from sys_errlist, e.g., as done by <perror>
-// 'Q': print out the uint64 number
-// 'r': call the function pointed to by the corresponding argument
-// 'R': print return status
-// 'S': format the appropriate _sys_siglist entry corresponding to var-argument.
-// 's': format a character string
-// 'T': print timestamp in hour:minute:sec:usec format.
-// 'D': print timestamp in month/day/year hour:minute:sec:usec format.
-// 't': print thread id (1 if single-threaded)
-// 'u': print as unsigned int
-// 'X', 'x': print as a hex number
-// 'W': print out a wide (Unicode) character string (currently Win32 only).
-// '%': format a single percent sign, '%'
-
-ssize_t
-ACE_Log_Msg::log (ACE_Log_Priority log_priority,
- const ACE_TCHAR *format_str, ...)
-{
- ACE_TRACE ("ACE_Log_Msg::log");
-
- // Start of variable args section.
- va_list argp;
-
- va_start (argp, format_str);
-
- int result = this->log (format_str,
- log_priority,
- argp);
- va_end (argp);
-
- return result;
-}
-
-ssize_t
-ACE_Log_Msg::log (const ACE_TCHAR *format_str,
- ACE_Log_Priority log_priority,
- va_list argp)
-{
- ACE_TRACE ("ACE_Log_Msg::log");
- // External decls.
-
-#if ! (defined(__BORLANDC__) && __BORLANDC__ >= 0x0530)
-#if defined (__FreeBSD__)
- extern const int sys_nerr;
-#else
- extern int sys_nerr;
-#endif /* !__FreeBSD__ */
-#endif /* ! (defined(__BORLANDC__) && __BORLANDC__ >= 0x0530) */
- typedef void (*PTF)(...);
-
- // Only print the message if <priority_mask_> hasn't been reset to
- // exclude this logging priority.
-
- if (this->log_priority_enabled (log_priority) == 0)
- return 0;
-
- ACE_Log_Record log_record (log_priority,
- ACE_OS::gettimeofday (),
- this->getpid ());
- ACE_TCHAR *bp = ACE_const_cast (ACE_TCHAR *, this->msg ());
- int abort_prog = 0;
- int exit_value = 0;
- ACE_TCHAR *format;
- ACE_ALLOCATOR_RETURN (format, ACE_OS::strdup (format_str), -1);
- ACE_TCHAR *save_p = format; // Remember pointer for ACE_OS::free()
-
- if (format == 0)
- return -1;
-
- if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::VERBOSE))
- {
- // Prepend the program name onto this message
-
- if (ACE_Log_Msg::program_name_ != 0)
- {
- for (const ACE_TCHAR *s = ACE_Log_Msg::program_name_;
- (*bp = *s) != '\0';
- s++)
- bp++;
-
- *bp++ = '|';
- }
- }
-
- while (*format != '\0')
- {
- // Copy input to output until we encounter a %, however a
- // % followed by another % is not a format specification.
-
- if (*format != '%')
- *bp++ = *format++;
- else if (format[1] == '%') // An "escaped" '%' (just print one '%').
- {
- *bp++ = *format++; // Store first %
- format++; // but skip second %
- }
- else
- {
- ACE_TCHAR c = '\0'; // high use character
- ACE_TCHAR *fp; // local format pointer
- int wpc; // width/precision cnt
- const int CONTINUE = 0;
- const int SKIP_SPRINTF = -1; // We must skip the sprintf phase
- const int SKIP_NUL_LOCATE = -2; // Skip locating the NUL character
- int type = CONTINUE; // conversion type
- int w[2]; // width/precision vals
-
- // % starts a format specification that ends with one of
- // "arnPpSsdciIouxXfFeEgG". An optional width and/or precision
- // (indicated by an "*") may be encountered prior to the
- // nend of the specification, each consumes an int arg.
- // A call to sprintf() does the actual conversion.
-
- fp = format++; // Remember beginning of format.
- wpc = 0; // Assume no width/precision seen.
-
- while (type == CONTINUE)
- {
- switch (*format++)
- {
- case 'A':
- type = SKIP_SPRINTF;
- {
-#if defined (ACE_LACKS_FLOATING_POINT)
- ACE_UINT32 value = va_arg (argp, ACE_UINT32);
- ACE_OS::sprintf (bp, ACE_TEXT ("%ld"), value);
-#else
- double value = va_arg (argp, double);
- ACE_OS::sprintf (bp, ACE_TEXT ("%f"), value);
-#endif /* ACE_LACKS_FLOATING_POINT */
- }
- break;
- case 'a': // Abort program after handling all of format string.
- type = SKIP_SPRINTF;
- abort_prog = 1;
- exit_value = va_arg (argp, int);
- ACE_OS::sprintf (bp, ACE_TEXT ("Aborting..."));
- // Make sure to NULL terminate this...
- break;
- case 'l':
- ACE_OS::sprintf (bp, ACE_TEXT ("%d"), this->linenum ());
- type = SKIP_SPRINTF;
- break;
- case 'N':
- {
- // @@ UNICODE
- const ACE_TCHAR *file = this->file ();
- ACE_OS::sprintf (bp, ACE_TEXT ("%s"),
- file ? file
- : ACE_TEXT ("<unknown file>"));
- type = SKIP_SPRINTF;
- break;
- }
- case 'n': // Print the name of the program.
- type = SKIP_SPRINTF;
- // @@ UNICODE
- ACE_OS::strcpy (bp, ACE_Log_Msg::program_name_ ?
- ACE_Log_Msg::program_name_ :
- ACE_TEXT ("<unknown>"));
- break;
- case 'P': // Format the current process id.
- type = SKIP_SPRINTF;
- ACE_OS::sprintf (bp, ACE_TEXT ("%d"),
- ACE_static_cast (int, this->getpid ()));
- break;
- case 'p': // Format the string assocated with the errno value.
- {
- type = SKIP_SPRINTF;
- errno = ACE::map_errno (this->errnum ());
-#if !defined (ACE_HAS_WINCE)
- // @@ WINCE There is no strerror available on CE.
- // Have to double check if this change is valid.
- if (errno >= 0 && errno < sys_nerr)
- ACE_OS::sprintf (bp, ACE_TEXT ("%s: %s"),
- va_arg (argp, ACE_TCHAR *),
- strerror (errno));
- else
-#endif /* ACE_HAS_WINCE */
- {
-#if defined (ACE_WIN32)
- ACE_TCHAR *lpMsgBuf = 0;
-
- // PharLap can't do FormatMessage, so try for socket
- // error.
-# if !defined (ACE_HAS_PHARLAP)
- ACE_TEXT_FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER
- | FORMAT_MESSAGE_MAX_WIDTH_MASK
- | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- errno,
- MAKELANGID (LANG_NEUTRAL,
- SUBLANG_DEFAULT),
- // Default language
- (ACE_TCHAR *) &lpMsgBuf,
- 0,
- NULL);
-# endif /* ACE_HAS_PHARLAP */
-
- // If we don't get a valid response from
- // <FormatMessage>, we'll assume this is a
- // WinSock error and so we'll try to convert
- // it into a string. If this doesn't work it
- // returns "unknown error" which is fine for
- // our purposes.
- if (lpMsgBuf == 0)
- {
- const ACE_TCHAR *message =
- ACE::sock_error (errno);
- ACE_OS::sprintf (bp, ACE_TEXT ("%s: %s"),
- va_arg (argp, const ACE_TCHAR *),
- message);
- }
- else
- {
- ACE_OS::sprintf (bp, ACE_TEXT ("%s: %s"),
- va_arg (argp, ACE_TCHAR *),
- lpMsgBuf);
- // Free the buffer.
- ::LocalFree (lpMsgBuf);
- }
-#elif !defined (ACE_HAS_WINCE)
- ACE_OS::sprintf (bp,
- ACE_TEXT (
- "%s: <unknown error> = %d"),
- va_arg (argp, ACE_TCHAR *), errno);
-#endif /* ACE_WIN32 */
- }
- break;
- }
- case 'm': // Format the string assocated with the errno value.
- {
- type = SKIP_SPRINTF;
- errno = ACE::map_errno (this->errnum ());
-#if !defined (ACE_HAS_WINCE)
- // @@ There is no strerror available on CE.
- // Have to double check if this change is valid.
- if (errno >= 0 && errno < sys_nerr)
- ACE_OS::sprintf (bp,
- ACE_TEXT ("%s"),
- strerror (errno));
- else
-#endif /* ACE_HAS_WINCE */
- {
-#if defined (ACE_WIN32)
- ACE_TCHAR *lpMsgBuf = 0;
-
- // PharLap can't do FormatMessage, so try for socket
- // error.
-# if !defined (ACE_HAS_PHARLAP)
- ACE_TEXT_FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER
- | FORMAT_MESSAGE_MAX_WIDTH_MASK
- | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- errno,
- MAKELANGID (LANG_NEUTRAL,
- SUBLANG_DEFAULT),
- // Default language
- (ACE_TCHAR *) &lpMsgBuf,
- 0,
- NULL);
-# endif /* ACE_HAS_PHARLAP */
-
- // If we don't get a valid response from
- // <FormatMessage>, we'll assume this is a
- // WinSock error and so we'll try to convert
- // it into a string. If this doesn't work it
- // returns "unknown error" which is fine for
- // our purposes.
- if (lpMsgBuf == 0)
- {
- const ACE_TCHAR *message =
- ACE::sock_error (errno);
- ACE_OS::sprintf (bp,
- ACE_TEXT ("%s"),
- message);
- }
- else
- {
- ACE_OS::sprintf (bp,
- ACE_TEXT ("%s"),
- lpMsgBuf);
- // Free the buffer.
- ::LocalFree (lpMsgBuf);
- }
-#elif !defined (ACE_HAS_WINCE)
- ACE_OS::sprintf (bp,
- ACE_TEXT ("<unknown error> = %d"),
- errno);
-#endif /* ACE_WIN32 */
- }
- break;
- }
- case 'R': // Format the return status of the operation.
- this->op_status (va_arg (argp, int));
- ACE_OS::sprintf (bp, ACE_TEXT ("%d"), this->op_status ());
- break;
-
- case '{': // Increment the trace_depth, then indent
- type = SKIP_NUL_LOCATE;
- (void) this->inc ();
- break;
-
- case '}': // indent, then decrement trace_depth
- type = SKIP_NUL_LOCATE;
- (void) this->dec ();
- break;
-
- case '$': // insert a newline, then indent the next line
- // according to %I
- *bp++ = '\n';
- /* fallthrough */
-
- case 'I': // Indent with nesting_depth*width spaces
- type = SKIP_SPRINTF;
- if (!wpc)
- w[wpc++] = 1;
- w[wpc-1] *= this->trace_depth_;
- ACE_OS::memset (bp, ' ', w[wpc-1]);
- bp += w[wpc - 1];
- *bp = '\0';
- break;
-
- case 'r': // Run (invoke) this subroutine.
- {
- int osave = ACE_Log_Msg::msg_off_;
-
- if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_,
- ACE_Log_Msg::SILENT))
- *bp++ = '{';
- ACE_Log_Msg::msg_off_ = bp - this->msg_;
-
- type = SKIP_SPRINTF;
- (*va_arg (argp, PTF))();
-
- if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_,
- ACE_Log_Msg::SILENT))
- {
- bp += ACE_OS::strlen (bp);
- *bp++ = '}';
- }
- *bp = '\0';
-
- ACE_Log_Msg::msg_off_ = osave;
- break;
- }
- case 'S': // format the string for with this signal number.
- {
- int sig = va_arg (argp, int);
- type = SKIP_SPRINTF;
-#if defined (ACE_HAS_SYS_SIGLIST)
- if (sig >= 0 && sig < ACE_NSIG)
- ACE_OS::strcpy (bp, _sys_siglist[sig]);
- else
- ACE_OS::sprintf (bp, ACE_TEXT ("<unknown signal> %d"),
- sig);
-#else
- ACE_OS::sprintf (bp, ACE_TEXT ("signal %d"), sig);
-#endif /* ACE_HAS_SYS_SIGLIST */
- break;
- }
- case 'D': // Format the timestamp in month/day/year
- // hour:minute:sec:usec format.
- {
- type = SKIP_SPRINTF;
- ACE_TCHAR day_and_time[35];
- ACE::timestamp (day_and_time,
- sizeof day_and_time);
- ACE_OS::sprintf (bp, ACE_TEXT ("%s"), day_and_time);
- break;
- }
- case 'T': // Format the timestamp in
- // hour:minute:sec:usec format.
- {
- type = SKIP_SPRINTF;
- ACE_TCHAR day_and_time[35];
- ACE_OS::sprintf (bp,
- ACE_TEXT ("%s"),
- ACE::timestamp (day_and_time,
- sizeof day_and_time));
- break;
- }
- case 't': // Format thread id.
- type = SKIP_SPRINTF;
-#if defined (ACE_WIN32)
- ACE_OS::sprintf (bp, ACE_TEXT ("%u"), ACE_Thread::self ());
-#elif defined (AIX) && (ACE_AIX_MINOR_VERS <= 2)
- // AIX's pthread_t (ACE_hthread_t) is a pointer, and it's
- // a little ugly to send that through a %u format. So,
- // get the kernel thread ID (tid_t) via thread_self() and
- // display that instead.
- // This isn't conditionalized on ACE_HAS_THREAD_SELF because
- // 1. AIX 4.2 doesn't have that def anymore (it messes up
- // other things)
- // 2. OSF/1 V3.2 has that def, and I'm not sure what affect
- // this would have on that.
- // -Steve Huston, 19-Aug-97
- ACE_OS::sprintf (bp, ACE_TEXT ("%u"), thread_self());
-#elif defined (DIGITAL_UNIX)
- ACE_OS::sprintf (bp, ACE_TEXT ("%u"),
- pthread_getselfseq_np());
-#else
- ACE_hthread_t t_id;
- ACE_Thread::self (t_id);
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4) && defined (HPUX_10)
- // HP-UX 10.x DCE's thread ID is a pointer. Grab the
- // more meaningful, readable, thread ID. This will match
- // the one seen in the debugger as well.
- ACE_OS::sprintf (bp, ACE_TEXT ("%u"),
- pthread_getunique_np(&t_id));
-# else
- // Yes, this is an ugly C-style cast, but the correct
- // C++ cast is different depending on whether the t_id
- // is an integral type or a pointer type. FreeBSD uses
- // a pointer type, but doesn't have a _np function to
- // get an integral type, like the OSes above.
- ACE_OS::sprintf (bp, ACE_TEXT ("%lu"),
- (unsigned long)t_id);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 && HPUX_10 */
-
-#endif /* ACE_WIN32 */
- break;
- case 's':
- type = 1 + wpc; // 1, 2, 3
- break;
- case 'W':
- // @@ UNICODE
-#if defined (ACE_WIN32)
- fp[1] = 'S';
-#endif /* ACE_WIN32 */
- case 'd': case 'c': case 'i': case 'o':
- case 'u': case 'x': case 'X':
- type = 4 + wpc; // 4, 5, 6
- break;
- case 'F': case 'f': case 'e': case 'E':
- case 'g': case 'G':
- type = 7 + wpc; // 7, 8, 9
- break;
- case 'Q':
- type = 10 + wpc;
- break;
- case '*': // consume width/precision
- w[wpc++] = va_arg (argp, int);
- break;
- default:
- // ?
- break;
- }
- }
-
- if (type != SKIP_SPRINTF)
- {
- c = *format; // Remember char before we overwrite.
- *format = 0; // Overwrite, terminating format.
-
- switch (type)
- {
- case 1:
- ACE_OS::sprintf (bp, fp, va_arg (argp, ACE_TCHAR *));
- break;
- case 2:
- ACE_OS::sprintf (bp, fp, w[0], va_arg (argp, ACE_TCHAR *));
- bp += w[0];
- type = SKIP_NUL_LOCATE;
- break;
- case 3:
- ACE_OS::sprintf (bp, fp, w[0], w[1],
- va_arg (argp, ACE_TCHAR *));
- bp += w[0];
- type = SKIP_NUL_LOCATE;
- break;
- case 4:
- ACE_OS::sprintf (bp, fp, va_arg (argp, int));
- break;
- case 5:
- ACE_OS::sprintf (bp, fp, w[0], va_arg (argp, int));
- break;
- case 6:
- ACE_OS::sprintf (bp, fp, w[0], w[1], va_arg (argp, int));
- break;
- case 7:
- ACE_OS::sprintf (bp, fp, va_arg (argp, double));
- break;
- case 8:
- ACE_OS::sprintf (bp, fp, w[0], va_arg (argp, double));
- break;
- case 9:
- ACE_OS::sprintf (bp, fp, w[0], w[1], va_arg (argp, double));
- break;
- case 10:
-#if defined (ACE_LACKS_LONGLONG_T)
- {
- // This relies on the ACE_U_LongLong storage layout.
- ACE_UINT32 hi = va_arg (argp, ACE_UINT32);
- ACE_UINT32 lo = va_arg (argp, ACE_UINT32);
- if (hi > 0)
- ACE_OS::sprintf (bp, "0x%lx%0*lx", hi, 2 * sizeof lo,
- lo);
- else
- ACE_OS::sprintf (bp, "0x%lx", lo);
- }
-#else /* ! ACE_LACKS_LONGLONG_T */
- ACE_OS::sprintf (bp,
- ACE_UINT64_FORMAT_SPECIFIER,
- va_arg (argp, ACE_UINT64));
-#endif /* ! ACE_LACKS_LONGLONG_T */
- break;
- }
- *format = c; // Restore char we overwrote.
- }
-
- if (type != SKIP_NUL_LOCATE)
- while (*bp != '\0') // Locate end of bp.
- bp++;
- }
- }
-
- *bp = '\0'; // Terminate bp, but don't auto-increment this!
-
- ACE_OS::free (ACE_MALLOC_T (save_p));
-
- // Copy the message from thread-specific storage into the transfer
- // buffer (this can be optimized away by changing other code...).
- log_record.msg_data (this->msg ());
-
- // Write the <log_record> to the appropriate location.
- ssize_t result = this->log (log_record,
- abort_prog);
-
- if (abort_prog)
- {
- // Since we are now calling abort instead of exit, this value is
- // not used.
- ACE_UNUSED_ARG (exit_value);
-
- // *Always* print a message to stderr if we're aborting. We
- // don't use verbose, however, to avoid recursive aborts if
- // something is hosed.
- log_record.print (ACE_Log_Msg::local_host_, 0);
-#if defined (ACE_HAS_WINCE)
- // @@ WINCE: Is this what we want to do?
- while (1) ;
-#else
- ACE_OS::abort ();
-#endif /* ACE_HAS_WINCE */
- }
-
- return result;
-}
-
-#if !defined (ACE_WIN32)
-class ACE_Log_Msg_Sig_Guard
-{
- // = TITLE
- // Bare-bones ACE_Sig_Guard.
- //
- // = DESCRIPTION
- // For use only by ACE_Log_Msg.
- // doesn't require the use of global variables or global
- // functions in an application).
-private:
- ACE_Log_Msg_Sig_Guard (void);
- ~ACE_Log_Msg_Sig_Guard (void);
-
- sigset_t omask_;
- // Original signal mask.
-
- friend ssize_t ACE_Log_Msg::log (ACE_Log_Record &log_record,
- int suppress_stderr);
-};
-
-ACE_Log_Msg_Sig_Guard::ACE_Log_Msg_Sig_Guard (void)
-{
- ACE_OS::sigemptyset (&this->omask_);
-
-#if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK)
- ACE_OS::sigprocmask (SIG_BLOCK,
- ACE_OS_Object_Manager::default_mask (),
- &this->omask_);
-#else
- ACE_OS::thr_sigsetmask (SIG_BLOCK,
- ACE_OS_Object_Manager::default_mask (),
- &this->omask_);
-#endif /* ACE_LACKS_PTHREAD_THR_SIGSETMASK */
-}
-
-ACE_Log_Msg_Sig_Guard::~ACE_Log_Msg_Sig_Guard (void)
-{
-#if !defined (ACE_LACKS_UNIX_SIGNALS)
-# if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK)
- ACE_OS::sigprocmask (SIG_SETMASK,
- &this->omask_,
- 0);
-# else
- ACE_OS::thr_sigsetmask (SIG_SETMASK,
- &this->omask_,
- 0);
-# endif /* ACE_LACKS_PTHREAD_THR_SIGSETMASK */
-#endif /* ! ACE_LACKS_UNIX_SIGNALS */
-}
-#endif /* ! ACE_WIN32 */
-
-ssize_t
-ACE_Log_Msg::log (ACE_Log_Record &log_record,
- int suppress_stderr)
-{
- ssize_t result = 0;
-
- // Only print the message if "SILENT" mode is disabled.
- if (ACE_BIT_DISABLED (ACE_Log_Msg::flags_,
- ACE_Log_Msg::SILENT))
- {
- int tracing = this->tracing_enabled ();
- this->stop_tracing ();
-
-#if !defined (ACE_WIN32)
- // Make this block signal-safe.
- ACE_Log_Msg_Sig_Guard sb;
-#endif /* ACE_WIN32 */
-
- // Make sure that the lock is held during all this.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Log_Msg_Manager::get_lock (),
- -1));
-
- if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_,
- ACE_Log_Msg::STDERR)
- && !suppress_stderr) // This is taken care of by our caller.
- log_record.print (ACE_Log_Msg::local_host_,
- ACE_Log_Msg::flags_
-#if defined (ACE_HAS_WINCE)
- );
-#else
- , stderr);
-#endif /* ACE_HAS_WINCE */
-
- if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_,
- ACE_Log_Msg::LOGGER))
- {
- // Be sure that there is a message_queue_, with multiple threads.
- ACE_MT (ACE_Log_Msg_Manager::get_lock ());
-
-#if defined (ACE_HAS_STREAM_PIPES)
- ACE_Str_Buf log_msg (ACE_static_cast (void *,
- &log_record),
- ACE_static_cast (int,
- log_record.length ()));
-
- // Try to use the <putpmsg> API if possible in order to
- // ensure correct message queueing according to priority.
- result =
- ACE_Log_Msg_Manager::message_queue_->send
- (ACE_reinterpret_cast (const ACE_Str_Buf *,
- 0),
- &log_msg,
- ACE_static_cast (int,
- log_record.priority ()),
- MSG_BAND);
-#else
- // We're running over sockets, so we'll need to indicate the
- // number of bytes to send.
- result =
- ACE_Log_Msg_Manager::message_queue_->send_n ((void *) &log_record,
- log_record.length ());
-#endif /* ACE_HAS_STREAM_PIPES */
- }
- // Format the message and print it to stderr and/or ship it off
- // to the log_client daemon, and/or print it to the ostream.
- // This must come last, after the other two print operations
- // (see the <ACE_Log_Record::print> method for details).
-
- if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_,
- ACE_Log_Msg::OSTREAM)
- && this->msg_ostream () != 0)
- log_record.print (ACE_Log_Msg::local_host_,
- ACE_Log_Msg::flags_,
-#if defined (ACE_LACKS_IOSTREAM_TOTALLY)
- ACE_static_cast (FILE *,
- this->msg_ostream ())
-#else /* ! ACE_LACKS_IOSTREAM_TOTALLY */
- *this->msg_ostream ()
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
- );
- if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_,
- ACE_Log_Msg::MSG_CALLBACK)
- && this->msg_callback () != 0)
- {
- // Use a "reverse lock" to avoid holding the lock during the
- // callback so we don't have deadlock if the callback uses
- // the logger.
- ACE_MT (ACE_Reverse_Lock<ACE_Recursive_Thread_Mutex> reverse_lock
- (*ACE_Log_Msg_Manager::get_lock ()));
- ACE_MT (ACE_GUARD_RETURN (ACE_Reverse_Lock<ACE_Recursive_Thread_Mutex>,
- ace_mon_1, reverse_lock, -1));
- this->msg_callback ()->log (log_record);
- }
- if (tracing)
- this->start_tracing ();
- }
-
- return result;
-}
-
-// Calls log to do the actual print, but formats first.
-
-int
-ACE_Log_Msg::log_hexdump (ACE_Log_Priority log_priority,
- const char *buffer,
- int size,
- const ACE_TCHAR *text)
-{
- ACE_TCHAR buf[ACE_Log_Record::MAXLOGMSGLEN -
- ACE_Log_Record::VERBOSE_LEN - 58];
- // 58 for the HEXDUMP header;
-
- ACE_TCHAR msg_buf[80];
-
- buf[0] = 0; // in case size = 0
-
- int len = ACE::format_hexdump (buffer,
- size,
- buf,
- sizeof (buf) / sizeof (ACE_TCHAR));
-
- int sz = 0;
-
- if (text)
- sz = ACE_OS::sprintf (msg_buf,
- ACE_TEXT ("%s - "),
- text);
-
- sz += ACE_OS::sprintf (msg_buf + sz,
- ACE_TEXT ("HEXDUMP %d bytes"),
- size);
-
- if (len < size)
- ACE_OS::sprintf (msg_buf + sz,
- ACE_TEXT (" (showing first %d bytes)"),
- len);
-
- // Now print out the formatted buffer.
- this->log (log_priority,
- ACE_TEXT ("%s\n%s"),
- msg_buf,
- buf);
- return 0;
-}
-
-void
-ACE_Log_Msg::set (const ACE_TCHAR *filename,
- int line,
- int status,
- int err,
- int rs,
- ACE_OSTREAM_TYPE *os,
- ACE_Log_Msg_Callback *c)
-{
- ACE_TRACE ("ACE_Log_Msg::set");
- this->file (filename);
- this->linenum (line);
- this->op_status (status);
- this->errnum (err);
- this->restart (rs);
- this->msg_ostream (os);
- this->msg_callback (c);
-}
-
-void
-ACE_Log_Msg::dump (void) const
-{
- ACE_TRACE ("ACE_Log_Msg::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("status_ = %d\n"), this->status_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nerrnum_ = %d\n"), this->errnum_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nlinenum_ = %d\n"), this->linenum_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nfile_ = %s\n"), this->file_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_ = %s\n"), this->msg_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nrestart_ = %d\n"), this->restart_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nostream_ = %x\n"), this->ostream_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_callback_ = %x\n"),
- this->msg_callback_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nprogram_name_ = %s\n"),
- this->program_name_ ? this->program_name_
- : ACE_TEXT ("<unknown>")));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nlocal_host_ = %s\n"),
- this->local_host_ ? this->local_host_
- : ACE_TEXT ("<unknown>")));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\npid_ = %d\n"), this->getpid ()));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags_ = %x\n"), this->flags_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntrace_depth_ = %d\n"),
- this->trace_depth_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\trace_active_ = %d\n"),
- this->trace_active_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\tracing_enabled_ = %d\n"),
- this->tracing_enabled_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\npriority_mask_ = %x\n"),
- this->priority_mask_));
- if (this->thr_desc_ != 0 && this->thr_desc_->state () != 0)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\thr_state_ = %d\n"),
- this->thr_desc_->state ()));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_off_ = %d\n"), this->msg_off_));
-
- // Be sure that there is a message_queue_, with multiple threads.
- ACE_MT (ACE_Log_Msg_Manager::get_lock ());
-
- ACE_Log_Msg_Manager::message_queue_->dump ();
-
- ACE_MT (ACE_Log_Msg_Manager::get_lock ()->dump ());
- // Synchronize output operations.
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Log_Msg::op_status (int status)
-{
- this->status_ = status;
-}
-
-int
-ACE_Log_Msg::op_status (void)
-{
- return this->status_;
-}
-
-void
-ACE_Log_Msg::restart (int r)
-{
- this->restart_ = r;
-}
-
-int
-ACE_Log_Msg::restart (void)
-{
- return this->restart_;
-}
-
-int
-ACE_Log_Msg::errnum (void)
-{
- return this->errnum_;
-}
-
-void
-ACE_Log_Msg::errnum (int e)
-{
- this->errnum_ = e;
-}
-
-int
-ACE_Log_Msg::linenum (void)
-{
- return this->linenum_;
-}
-
-void
-ACE_Log_Msg::linenum (int l)
-{
- this->linenum_ = l;
-}
-
-int
-ACE_Log_Msg::inc (void)
-{
- return this->trace_depth_++;
-}
-
-int
-ACE_Log_Msg::dec (void)
-{
- return --this->trace_depth_;
-}
-
-int
-ACE_Log_Msg::trace_depth (void)
-{
- return this->trace_depth_;
-}
-
-void
-ACE_Log_Msg::trace_depth (int depth)
-{
- this->trace_depth_ = depth;
-}
-
-int
-ACE_Log_Msg::trace_active (void)
-{
- return this->trace_active_;
-}
-
-void
-ACE_Log_Msg::trace_active (int value)
-{
- this->trace_active_ = value;
-}
-
-ACE_Thread_Descriptor *
-ACE_Log_Msg::thr_desc (void) const
-{
- return this->thr_desc_;
-}
-
-void
-ACE_Log_Msg::thr_desc (ACE_Thread_Descriptor *td)
-{
- this->thr_desc_ = td;
-
- if (td != 0)
- td->acquire_release ();
-}
-
-#if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
-ACE_SEH_EXCEPT_HANDLER
-ACE_Log_Msg::seh_except_selector (void)
-{
- return this->seh_except_selector_;
-}
-
-ACE_SEH_EXCEPT_HANDLER
-ACE_Log_Msg::seh_except_selector (ACE_SEH_EXCEPT_HANDLER n)
-{
- ACE_SEH_EXCEPT_HANDLER retv = this->seh_except_selector_;
- this->seh_except_selector_ = n;
- return retv;
-}
-
-ACE_SEH_EXCEPT_HANDLER
-ACE_Log_Msg::seh_except_handler (void)
-{
- return this->seh_except_handler_;
-}
-
-ACE_SEH_EXCEPT_HANDLER
-ACE_Log_Msg::seh_except_handler (ACE_SEH_EXCEPT_HANDLER n)
-{
- ACE_SEH_EXCEPT_HANDLER retv = this->seh_except_handler_;
- this->seh_except_handler_ = n;
- return retv;
-}
-#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
-// Enable the tracing facility on a per-thread basis.
-
-void
-ACE_Log_Msg::start_tracing (void)
-{
- this->tracing_enabled_ = 1;
-}
-
-// Disable the tracing facility on a per-thread basis.
-
-void
-ACE_Log_Msg::stop_tracing (void)
-{
- this->tracing_enabled_ = 0;
-}
-
-int
-ACE_Log_Msg::tracing_enabled (void)
-{
- return this->tracing_enabled_;
-}
-
-const ACE_TCHAR *
-ACE_Log_Msg::file (void)
-{
- return this->file_;
-}
-
-void
-ACE_Log_Msg::file (const ACE_TCHAR *s)
-{
- ACE_OS::strncpy (this->file_, s,
- (sizeof this->file_ / sizeof (ACE_TCHAR)));
-}
-
-const ACE_TCHAR *
-ACE_Log_Msg::msg (void)
-{
- return this->msg_ + ACE_Log_Msg::msg_off_;
-}
-
-void
-ACE_Log_Msg::msg (const ACE_TCHAR *m)
-{
- ACE_OS::strncpy (this->msg_, m,
- (sizeof this->msg_ / sizeof (ACE_TCHAR)));
-}
-
-ACE_Log_Msg_Callback *
-ACE_Log_Msg::msg_callback (void) const
-{
- return this->msg_callback_;
-}
-
-ACE_Log_Msg_Callback *
-ACE_Log_Msg::msg_callback (ACE_Log_Msg_Callback *c)
-{
- ACE_Log_Msg_Callback *old = this->msg_callback_;
- this->msg_callback_ = c;
- return old;
-}
-
-ACE_OSTREAM_TYPE *
-ACE_Log_Msg::msg_ostream (void) const
-{
- return this->ostream_;
-}
-
-void
-ACE_Log_Msg::msg_ostream (ACE_OSTREAM_TYPE *m, int delete_ostream)
-{
- this->delete_ostream_ = delete_ostream;
- this->ostream_ = m;
-}
-
-void
-ACE_Log_Msg::msg_ostream (ACE_OSTREAM_TYPE *m)
-{
- this->ostream_ = m;
-}
-
-void
-ACE_Log_Msg::local_host (const ACE_TCHAR *s)
-{
- if (s)
- {
- ACE_OS::free ((void *) ACE_Log_Msg::local_host_);
- {
- ACE_NO_HEAP_CHECK;
-
- ACE_ALLOCATOR (ACE_Log_Msg::local_host_, ACE_OS::strdup (s));
- }
- }
-}
-
-const ACE_TCHAR *
-ACE_Log_Msg::local_host (void) const
-{
- return ACE_Log_Msg::local_host_;
-}
-
-pid_t
-ACE_Log_Msg::getpid (void) const
-{
- if (ACE_Log_Msg::pid_ == -1)
- ACE_Log_Msg::pid_ = ACE_OS::getpid ();
-
- return ACE_Log_Msg::pid_;
-}
-
-ACE_Log_Msg_Callback::~ACE_Log_Msg_Callback (void)
-{
-}
-
-int
-ACE_Log_Msg::log_priority_enabled (ACE_Log_Priority log_priority,
- const char *,
- ...)
-{
- return this->log_priority_enabled (log_priority);
-}
-
-#if defined (ACE_USES_WCHAR)
-int
-ACE_Log_Msg::log_priority_enabled (ACE_Log_Priority log_priority,
- const wchar_t *,
- ...)
-{
- return this->log_priority_enabled (log_priority);
-}
-#endif /* ACE_USES_WCHAR */
diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h
deleted file mode 100644
index 6e17b25e62f..00000000000
--- a/ace/Log_Msg.h
+++ /dev/null
@@ -1,565 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Log_Msg.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_LOG_MSG_H
-#define ACE_LOG_MSG_H
-#include "ace/pre.h"
-
-// This stuff must come first to avoid problems with circular
-// headers...
-
-// The following ASSERT macro is courtesy of Alexandre Karev
-// <akg@na47sun05.cern.ch>.
-#if defined (ACE_NDEBUG)
-#define ACE_ASSERT(x)
-#else
-#define ACE_ASSERT(X) \
- do { if(!(X)) { \
- int __ace_error = ACE_OS::last_error (); \
- ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->set (ACE_TEXT_CHAR_TO_TCHAR(__FILE__), __LINE__, -1, __ace_error, ace___->restart (), \
- ace___->msg_ostream (), ace___->msg_callback ()); \
- ace___->log (LM_ERROR, ACE_TEXT ("ACE_ASSERT: file %N, line %l assertion failed for '%s'.%a\n"), #X, -1); \
- } } while (0)
-#endif /* ACE_NDEBUG */
-
-#if defined (ACE_NLOGGING)
-#define ACE_HEX_DUMP(X) do {} while (0)
-#define ACE_RETURN(Y) do { return (Y); } while (0)
-#define ACE_ERROR_RETURN(X, Y) return (Y)
-#define ACE_ERROR_BREAK(X) { break; }
-#define ACE_ERROR(X) do {} while (0)
-#define ACE_DEBUG(X) do {} while (0)
-#define ACE_ERROR_INIT(VALUE, FLAGS)
-#else
-#define ACE_HEX_DUMP(X) \
- do { \
- int __ace_error = ACE_OS::last_error (); \
- ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- if (ace___->log_priority_enabled X != 0) { \
- ace___->set (ACE_TEXT_CHAR_TO_TCHAR(__FILE__), __LINE__, 0, __ace_error, ace___->restart (), \
- ace___->msg_ostream (), ace___->msg_callback ()); \
- ace___->log_hexdump X; \
- } \
- } while (0)
-#define ACE_RETURN(Y) \
- do { \
- int __ace_error = ACE_OS::last_error (); \
- ACE_Log_Msg::instance ()->set (ACE_TEXT_CHAR_TO_TCHAR (__FILE__), __LINE__, Y, __ace_error); \
- return Y; \
- } while (0)
-#define ACE_ERROR_RETURN(X, Y) \
- do { \
- int __ace_error = ACE_OS::last_error (); \
- ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- if (ace___->log_priority_enabled X != 0) { \
- ace___->set (ACE_TEXT_CHAR_TO_TCHAR (__FILE__), __LINE__, Y, __ace_error, ace___->restart (), \
- ace___->msg_ostream (), ace___->msg_callback ()); \
- ace___->log X; \
- } \
- return Y; \
- } while (0)
-#define ACE_ERROR(X) \
- do { \
- int __ace_error = ACE_OS::last_error (); \
- ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- if (ace___->log_priority_enabled X != 0) { \
- ace___->set (ACE_TEXT_CHAR_TO_TCHAR (__FILE__), __LINE__, -1, __ace_error, ace___->restart (), \
- ace___->msg_ostream (), ace___->msg_callback ()); \
- ace___->log X; \
- } \
- } while (0)
-#define ACE_DEBUG(X) \
- do { \
- int __ace_error = ACE_OS::last_error (); \
- ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- if (ace___->log_priority_enabled X != 0) { \
- ace___->set (ACE_TEXT_CHAR_TO_TCHAR(__FILE__), __LINE__, 0, __ace_error, ace___->restart (), \
- ace___->msg_ostream (), ace___->msg_callback ()); \
- ace___->log X; \
- } \
- } while (0)
-#define ACE_ERROR_INIT(VALUE, FLAGS) \
- do { \
- ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->set_flags (FLAGS); ace___->op_status (VALUE); \
- } while (0)
-#define ACE_ERROR_BREAK(X) { ACE_ERROR (X); break; }
-#endif /* ACE_NLOGGING */
-
-#include "ace/Log_Record.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (__Lynx__)
-# undef STDERR
-#endif /* __Lynx__ */
-
-#if defined (THREAD)
-// This workaround is necessary for nasty libraries that #define
-// THREAD 1.
-#define ACE_THREAD_HACK THREAD
-#undef THREAD
-#endif /* THREAD */
-
-class ACE_Export ACE_Log_Msg_Callback
-{
- // = TITLE
- // An interface class used to get logging callbacks.
- //
- // = DESCRIPTION
- // Users who are interested in getting the logging messages
- // directly, can subclass this interface and override the log()
- // method. They must then register their subclass with the
- // Log_Msg class and make sure that they turn on the
- // ACE_Log_Msg::MSG_CALLBACK flag.
- //
- // Your <log> routine is called with an instance of
- // ACE_Log_Record. From this class, you can get the log
- // message, the verbose log message, message type, message
- // priority, and so on.
- //
- // Remember that there is one Log_Msg object per thread.
- // Therefore, you may need to register your callback object with
- // many <ACE_Log_Msg> objects (and have the correct
- // synchronization in the <log> method) or have a separate
- // callback object per Log_Msg object. Moreover,
- // <ACE_Log_Msg_Callbacks> are not inherited when a new thread
- // is spawned, so you'll need to reset these in each new thread.
-public:
- virtual ~ACE_Log_Msg_Callback (void);
- // No-op virtual destructor.
-
- virtual void log (ACE_Log_Record &log_record) = 0;
- // Callback routine. This is called when we want to log a message.
- // Since this routine is pure virtual, it must be overwritten by the
- // subclass.
-};
-
-#define ACE_LOG_MSG ACE_Log_Msg::instance ()
-
-// Forward declaration
-class ACE_Thread_Descriptor;
-
-class ACE_Export ACE_Log_Msg
-{
- // = TITLE
- // Provides a variable length argument message logging
- // abstraction.
- //
- // = DESCRIPTION
- // This class is very flexible since it allows formatted error
- // messages to be printed in a thread-safe manner to stderr or a
- // distributed logger. Moreover, the message is kept in a
- // thread-specific storage location, which can be used to
- // communicate errors between framework methods and callers.
-public:
- // Logger Flags.
- enum
- {
- STDERR = 1,
- // Write messages to stderr.
- LOGGER = 2,
- // Write messages to the local client logger deamon.
- OSTREAM = 4,
- // Write messages to the ostream * stored in thread-specific
- // storage.
- MSG_CALLBACK = 8,
- // Write messages to the callback object.
- VERBOSE = 16,
- // Display messages in a verbose manner.
- VERBOSE_LITE = 32,
- // Display messages in a less verbose manner (i.e., only print
- // information that can change between calls).
- SILENT = 64
- // Do not print messages at all (just leave in thread-specific
- // storage for later inspection).
- };
-
- // = Initialization and termination routines.
-
- static ACE_Log_Msg *instance (void);
- // Returns a pointer to the Singleton.
-
- static int exists (void);
- // Returns non-null if an ACE_Log_Msg exists for the calling thread.
-
- static void disable_debug_messages (ACE_Log_Priority priority = LM_DEBUG);
- // Clears the flag from the default priority mask used to
- // initialize ACE_Log_Msg instances.
-
- static void enable_debug_messages (ACE_Log_Priority priority = LM_DEBUG);
- // Sets the flag in the default priority mask used to initialize
- // ACE_Log_Msg instances.
-
- ACE_Log_Msg (void);
- // Initialize logger.
-
- ~ACE_Log_Msg (void);
- // cleanup logger.
-
- int open (const ACE_TCHAR *prog_name,
- u_long options_flags = ACE_Log_Msg::STDERR,
- const ACE_TCHAR *logger_key = 0);
- // Initialize the ACE error handling facility. <prog_name> is the
- // name of the executable program. <flags> are a bitwise-or of
- // options flags passed to the Logger (see the enum above for the valid
- // values). If the <LOGGER> bit in <flags> is enabled then
- // <logger_key> is the name of ACE_FIFO rendezvous point where the
- // local client logger daemon is listening for logging messages.
-
- // = Set/get the options flags.
-
- void set_flags (u_long f);
- // Enable the bits in the logger's options flags.
- void clr_flags (u_long f);
- // Disable the bits in the logger's options flags.
- u_long flags (void);
- // Return the bits in the logger's options flags.
-
- // = Allow apps to acquire and release internal synchronization lock.
-
- // This lock is used internally by the <ACE_Log_Msg> implementation.
- // By exporting the lock, applications can hold the lock atomically
- // over a number of calls to <ACE_Log_Msg>.
- int acquire (void);
- // Acquire the internal lock.
- int release (void);
- // Release the internal lock.
-
- void sync (const ACE_TCHAR *program_name);
- // Call after doing a <fork> to resynchronize the process id and
- // <program_name> variables.
-
- // = Set/get methods. Note that these are non-static and thus will
- // be thread-specific.
-
- void op_status (int status);
- // Set the result of the operation status (by convention, -1 means
- // error).
-
- int op_status (void);
- // Get the result of the operation status (by convention, -1 means
- // error).
-
- void errnum (int);
- // Set the value of the errnum (by convention this corresponds to
- // errno).
-
- int errnum (void);
- // Get the value of the errnum (by convention this corresponds to
- // errno).
-
- void linenum (int);
- // Set the line number where an error occurred.
-
- int linenum (void);
- // Get the line number where an error occurred.
-
- void file (const ACE_TCHAR *);
- // Set the file name where an error occurred.
-
- const ACE_TCHAR *file (void);
- // Get the file name where an error occurred.
-
- void msg (const ACE_TCHAR *);
- // Set the message that describes what type of error occurred.
-
- const ACE_TCHAR *msg (void);
- // Get the message that describes what type of error occurred.
-
- void restart (int);
- // Set the field that indicates whether interrupted calls should be
- // restarted.
-
- int restart (void);
- // Get the field that indicates whether interrupted calls should be
- // restarted.
-
- // = Notice that the following two function is equivalent to
- // "void msg_ostream (HANDLE)" and "HANDLE msg_ostream (void)"
- // on Windows CE. There is no <iostream.h> support on CE.
-
- void msg_ostream (ACE_OSTREAM_TYPE *);
- // Update the ostream without overwriting the delete_ostream_ flag.
-
- void msg_ostream (ACE_OSTREAM_TYPE *, int delete_ostream);
- // delete_stream == 1, forces Log_Msg.h to delete the stream in
- // its own ~dtor (assumes control of the stream)
- // use only with proper ostream (eg: fstream), not (cout, cerr)
-
- ACE_OSTREAM_TYPE *msg_ostream (void) const;
- // Get the ostream that is used to print error messages.
-
- ACE_Log_Msg_Callback *msg_callback (ACE_Log_Msg_Callback *c);
- ACE_Log_Msg_Callback *msg_callback (void) const;
- // Set a new callback object and return the existing callback to
- // allow "chaining". Note that <ACE_Log_Msg_Callback>s are not
- // inherited when spawning a new thread, so you'll need to reset
- // them in each thread.
-
- // = Nesting depth increment and decrement.
- int inc (void);
- int dec (void);
-
- // = Get/set trace depth.
- int trace_depth (void);
- void trace_depth (int);
-
- // = Get/set trace active status.
- int trace_active (void);
- void trace_active (int value);
-
- ACE_Thread_Descriptor *thr_desc (void) const;
- // Get the TSS thread descriptor.
-
- void thr_desc (ACE_Thread_Descriptor *td);
- // Set the TSS thread descriptor. This method will call
- // td->acquire_release to block execution until this call
- // return.
-
-#if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- ACE_SEH_EXCEPT_HANDLER seh_except_selector (void);
- ACE_SEH_EXCEPT_HANDLER seh_except_selector (ACE_SEH_EXCEPT_HANDLER);
- // Get/Set TSS exception action.
-
- ACE_SEH_EXCEPT_HANDLER seh_except_handler (void);
- ACE_SEH_EXCEPT_HANDLER seh_except_handler (ACE_SEH_EXCEPT_HANDLER);
- // Get/Set TSS exception handler.
-#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
- // = Stop/start/query tracing status on a per-thread basis...
- void stop_tracing (void);
- void start_tracing (void);
- int tracing_enabled (void);
-
- typedef enum
- {
- PROCESS = 0,
- THREAD = 1
- } MASK_TYPE;
-
- // = Get/set the priority mask.
- u_long priority_mask (MASK_TYPE = THREAD);
- // Get the current <ACE_Log_Priority> mask.
- u_long priority_mask (u_long, MASK_TYPE = THREAD);
- // Set the <ACE_Log_Priority> mask, returns original mask.
-
- int log_priority_enabled (ACE_Log_Priority log_priority);
- // Return true if the requested priority is enabled.
-
- int log_priority_enabled (ACE_Log_Priority log_priority,
- const char *,
- ...);
- // Return true if the requested priority is enabled.
-
-#if defined (ACE_USES_WCHAR)
- // We are not using ACE_TCHAR for this since ACE_HEX_DUMP
- // doesn't take in a ACE_TCHAR. log_hexdump takes in a char
- // string, so this must be able to take in a char string even
- // when using ACE_USES_WCHAR.
- int log_priority_enabled (ACE_Log_Priority log_priority,
- const wchar_t *,
- ...);
- // Return true if the requested priority is enabled.
-#endif /* ACE_USES_WCHAR */
-
- pid_t getpid (void) const;
- // Optimize reading of the pid (avoids a system call if the value is
- // cached...).
-
- // = Set/get the name of the local host.
- const ACE_TCHAR *local_host (void) const;
- void local_host (const ACE_TCHAR *);
-
- void set (const ACE_TCHAR *file,
- int line,
- int op_status = -1,
- int errnum = 0,
- int restart = 1,
- ACE_OSTREAM_TYPE *os = 0,
- ACE_Log_Msg_Callback *c = 0);
- // Set the line number, file name, operational status, error number,
- // restart flag, ostream, and the callback object. This combines
- // all the other set methods into a single method.
-
- ssize_t log (ACE_Log_Priority priority, const ACE_TCHAR *format, ...);
- // Format a message to the thread-safe ACE logging mechanism. Valid
- // options (prefixed by '%', as in printf format strings) include:
- // 'A': print an ACE_timer_t value (which could be either double or ACE_UINT32.)
- // 'a': exit the program at this point (var-argument is the exit status!)
- // 'c': print a character
- // 'i', 'd': print a decimal number
- // 'I', indent according to nesting depth
- // 'e', 'E', 'f', 'F', 'g', 'G': print a double
- // 'l', print line number where an error occurred.
- // 'm': Return the message corresponding to errno value, e.g., as done by strerror()
- // 'N': print file name where the error occurred.
- // 'n': print the name of the program (or "<unknown>" if not set)
- // 'o': print as an octal number
- // 'P': print out the current process id
- // 'p': print out the appropriate errno message from sys_errlist, e.g., as done by perror()
- // 'Q': print out the uint64 number
- // 'r': call the function pointed to by the corresponding argument
- // 'R': print return status
- // 'S': print out the appropriate _sys_siglist entry corresponding to var-argument.
- // 's': print out a character string
- // 'T': print timestamp in hour:minute:sec:usec format.
- // 'D': print timestamp in month/day/year hour:minute:sec:usec format.
- // 't': print thread id (1 if single-threaded)
- // 'u': print as unsigned int
- // 'W': print out a wide (Unicode) character string (currently Win32 only).
- // 'X', 'x': print as a hex number
- // '%': print out a single percent sign, '%'
-
- ssize_t log (const ACE_TCHAR *format,
- ACE_Log_Priority priority,
- va_list argp);
- // An alternative logging mechanism that makes it possible to
- // integrate variable argument lists from other logging mechanisms
- // into the ACE mechanism.
-
- ssize_t log (ACE_Log_Record &log_record,
- int suppress_stderr = 0);
- // Log a custom built log record to the currently enabled logging
- // sinks.
-
- int log_hexdump (ACE_Log_Priority log_priority,
- const char *buffer,
- int size,
- const ACE_TCHAR *text = 0);
- // Method to log hex dump. This is useful for debugging. Calls
- // <log> to do the actual print, but formats first to make the chars
- // printable.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int status_;
- // Status of operation (-1 means failure, >= 0 means success).
-
- int errnum_;
- // Type of error that occurred (see <sys/errno.h>).
-
- int linenum_;
- // Line number where the error occurred.
-
- ACE_TCHAR file_[MAXPATHLEN + 1];
- // File where the error occurred.
-
- ACE_TCHAR msg_[ACE_Log_Record::MAXLOGMSGLEN];
- // The error message.
-
- int restart_;
- // Indicates whether we should restart system calls that are
- // interrupted.
-
- ACE_OSTREAM_TYPE *ostream_;
- // The ostream where logging messages can be written.
-
- ACE_Log_Msg_Callback *msg_callback_;
- // The callback object.
-
- int trace_depth_;
- // Depth of the nesting for printing traces.
-
- int trace_active_;
- // Are we already within an ACE_Trace constructor call?
-
- int tracing_enabled_;
- // Are we allowing tracing in this thread?
-
- int delete_ostream_;
- // Are we deleting this ostream?
-
- ACE_Thread_Descriptor *thr_desc_;
- // If we're running in the context of an <ACE_Thread_Manager> this
- // will point to the thread descriptor adapter which holds the
- // thread descriptor of the thread. This can be used to repidly
- // access all thread data kept in <ACE_Thread_Descriptor>.
-
-#if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- ACE_SEH_EXCEPT_HANDLER seh_except_selector_;
- ACE_SEH_EXCEPT_HANDLER seh_except_handler_;
- // These handlers determine how a thread handles win32 structured
- // exception.
-#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
- u_long priority_mask_;
- // Keeps track of all the per-thread <ACE_Log_Priority> values that
- // are currently enabled. Default is for all logging priorities to
- // be enabled.
-
- // = The following fields are *not* kept in thread-specific storage.
-
- // We only want one instance for the entire process!
-
- static u_long process_priority_mask_;
- // Keeps track of all the per-process <ACE_Log_Priority> values that
- // are currently enabled. Default is for all logging priorities to
- // be enabled.
-
- static const ACE_TCHAR *program_name_;
- // Records the program name.
-
- static const ACE_TCHAR *local_host_;
- // Name of the local host (used when printing messages).
-
- static pid_t pid_;
- // Process id of the current process.
-
- static u_long flags_;
- // Options flags.
-
- static int msg_off_;
- // Offset of msg_[].
-
- static int instance_count_;
- // Number of existing Log_Msg instances; when 0, delete program/host
- // names
- static u_long default_priority_mask_;
- // Priority mask to use for each new instance
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- static int key_created_;
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \
- defined (ACE_HAS_TSS_EMULATION)
- static ACE_thread_key_t log_msg_tss_key_;
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */
-#endif /* ACE_MT_SAFE */
-
- static void close (void);
- // For cleanup, at program termination.
-
- friend void ACE_OS::cleanup_tss (const u_int);
-
- // = Disallow these operations.
- ACE_Log_Msg &operator= (const ACE_Log_Msg &);
- ACE_Log_Msg (const ACE_Log_Msg &);
-};
-
-#if defined (ACE_THREAD_HACK)
-#define THREAD ACE_THREAD_HACK
-#undef ACE_THREAD_HACK
-#endif /* ACE_THREAD_HACK */
-#include "ace/post.h"
-#endif /* ACE_LOG_MSG_H */
diff --git a/ace/Log_Priority.h b/ace/Log_Priority.h
deleted file mode 100644
index 393458aced3..00000000000
--- a/ace/Log_Priority.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Log_Priority.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_LOG_PRIORITY_H
-#define ACE_LOG_PRIORITY_H
-#include "ace/pre.h"
-
-enum ACE_Log_Priority
-{
- // = TITLE
- // This data type indicates the relative priorities of the
- // logging messages, from lowest to highest priority.
- //
- // = DESCRIPTION
- // These values are defined using powers of two so that it's
- // possible to form a mask to turn them on or off dynamically.
-
- // = Note, this first argument *must* start at 1!
-
- LM_SHUTDOWN = 01,
- // Shutdown the logger (decimal 1).
-
- LM_TRACE = 02,
- // Messages indicating function-calling sequence (decimal 2).
-
- LM_DEBUG = 04,
- // Messages that contain information normally of use only when
- // debugging a program (decimal 4).
-
- LM_INFO = 010,
- // Informational messages (decimal 8).
-
- LM_NOTICE = 020,
- // Conditions that are not error conditions, but that may require
- // special handling (decimal 16).
-
- LM_WARNING = 040,
- // Warning messages (decimal 32).
-
- LM_STARTUP = 0100,
- // Initialize the logger (decimal 64).
-
- LM_ERROR = 0200,
- // Error messages (decimal 128).
-
- LM_CRITICAL = 0400,
- // Critical conditions, such as hard device errors (decimal 256).
-
- LM_ALERT = 01000,
- // A condition that should be corrected immediately, such as a
- // corrupted system database (decimal 512).
-
- LM_EMERGENCY = 02000,
- // A panic condition. This is normally broadcast to all users
- // (decimal 1024).
-
- LM_MAX = LM_EMERGENCY,
- // The maximum logging priority.
-
- // Do not use!! This enum value ensures that the underlying
- // integral type for this enum is at least 32 bits.
- LM_ENSURE_32_BITS = 0x7FFFFFFF
-};
-
-#include "ace/post.h"
-#endif /* ACE_LOG_PRIORITY_H */
diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp
deleted file mode 100644
index ca874ed359a..00000000000
--- a/ace/Log_Record.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-// $Id$
-
-#include "ace/Log_Record.h"
-#include "ace/ACE.h"
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
-# include "ace/streams.h"
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-# include "ace/Log_Record.i"
-#endif
-
-ACE_RCSID(ace, Log_Record, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Log_Record)
-
-const ACE_TCHAR *ACE_Log_Record::priority_names_[] =
-{
- ACE_TEXT ("<none>"),
- ACE_TEXT ("LM_SHUTDOWN"),
- ACE_TEXT ("LM_TRACE"),
- ACE_TEXT ("LM_DEBUG"),
- ACE_TEXT ("LM_INFO"),
- ACE_TEXT ("LM_NOTICE"),
- ACE_TEXT ("LM_WARNING"),
- ACE_TEXT ("LM_STARTUP"),
- ACE_TEXT ("LM_ERROR"),
- ACE_TEXT ("LM_CRITICAL"),
- ACE_TEXT ("LM_ALERT"),
- ACE_TEXT ("LM_EMERGENCY")
-};
-
-const ACE_TCHAR *
-ACE_Log_Record::priority_name (ACE_Log_Priority p)
-{
- return ACE_Log_Record::priority_names_[ACE::log2 (p)];
-}
-
-u_long
-ACE_Log_Record::priority (void) const
-{
- ACE_TRACE ("ACE_Log_Record::priority");
- return ACE::log2 (this->type_);
-}
-
-void
-ACE_Log_Record::priority (u_long p)
-{
- ACE_TRACE ("ACE_Log_Record::priority");
- this->type_ = p;
-}
-
-void
-ACE_Log_Record::dump (void) const
-{
- // ACE_TRACE ("ACE_Log_Record::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("length_ = %d\n"), this->length_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntype_ = %d\n"), this->type_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntime_stamp_ = (%d, %d)\n"), this->time_stamp_.sec (), this->time_stamp_.usec ()));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\npid_ = %d\n"), this->pid_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_data_ = %s\n"), this->msg_data_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Log_Record::msg_data (const ACE_TCHAR *data)
-{
- // ACE_TRACE ("ACE_Log_Record::msg_data");
- ACE_OS::strncpy (this->msg_data_, data, ACE_Log_Record::MAXLOGMSGLEN);
- this->round_up ();
-}
-
-ACE_Log_Record::ACE_Log_Record (ACE_Log_Priority lp,
- long ts_sec,
- long p)
- : length_ (0),
- type_ (long (lp)),
- time_stamp_ (ts_sec),
- pid_ (p)
-{
- // ACE_TRACE ("ACE_Log_Record::ACE_Log_Record");
-}
-
-ACE_Log_Record::ACE_Log_Record (ACE_Log_Priority lp,
- const ACE_Time_Value &ts,
- long p)
- : length_ (0),
- type_ (long (lp)),
- time_stamp_ (ts),
- pid_ (p)
-{
- // ACE_TRACE ("ACE_Log_Record::ACE_Log_Record");
-}
-
-void
-ACE_Log_Record::round_up (void)
-{
- // ACE_TRACE ("ACE_Log_Record::round_up");
- // Determine the length of the payload.
- int len = (sizeof (*this) - sizeof (this->msg_data_))
- + (sizeof (ACE_TCHAR) * ((ACE_OS::strlen (this->msg_data_) + 1)));
-
- // Round up to the alignment.
- this->length_ = ((len + ACE_Log_Record::ALIGN_WORDB - 1)
- & ~(ACE_Log_Record::ALIGN_WORDB - 1));
-}
-
-ACE_Log_Record::ACE_Log_Record (void)
- : length_ (0),
- type_ (0),
- time_stamp_ (0L),
- pid_ (0)
-{
- // ACE_TRACE ("ACE_Log_Record::ACE_Log_Record");
-}
-
-int
-ACE_Log_Record::format_msg (const ACE_TCHAR *host_name,
- u_long verbose_flag,
- ACE_TCHAR *verbose_msg)
-{
- /* 0123456789012345678901234 */
- /* Oct 18 14:25:36.000 1989<nul> */
- ACE_TCHAR timestamp[26]; // Only used by VERBOSE and VERBOSE_LITE.
-
- if (ACE_BIT_ENABLED (verbose_flag,
- ACE_Log_Msg::VERBOSE)
- || ACE_BIT_ENABLED (verbose_flag,
- ACE_Log_Msg::VERBOSE_LITE))
- {
- time_t now = this->time_stamp_.sec ();
- ACE_TCHAR ctp[26]; // 26 is a magic number...
-
- if (ACE_OS::ctime_r (&now, ctp, sizeof ctp) == 0)
- return -1;
-
- /* 01234567890123456789012345 */
- /* Wed Oct 18 14:25:36 1989n0 */
-
- ctp[19] = '\0'; // NUL-terminate after the time.
- ctp[24] = '\0'; // NUL-terminate after the date.
-
- ACE_OS::sprintf (timestamp,
- ACE_TEXT ("%s.%03ld %s"),
- ctp + 4,
- this->time_stamp_.usec () / 1000,
- ctp + 20);
- }
-
- if (ACE_BIT_ENABLED (verbose_flag,
- ACE_Log_Msg::VERBOSE))
- {
-# if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- const ACE_TCHAR *lhost_name = (const ACE_TCHAR *) ((host_name == 0)
- ? ((char *) ACE_TEXT ("<local_host>"))
- : ((char *) host_name));
-# else /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- const ACE_TCHAR *lhost_name = ((host_name == 0)
- ? ACE_TEXT ("<local_host>")
- : host_name);
-# endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- ACE_OS::sprintf (verbose_msg,
- ACE_TEXT ("%s@%s@%ld@%s@%s"),
- timestamp,
- lhost_name,
- this->pid_,
- ACE_Log_Record::priority_name (ACE_Log_Priority (this->type_)),
- this->msg_data_);
- }
- else if (ACE_BIT_ENABLED (verbose_flag, ACE_Log_Msg::VERBOSE_LITE))
- ACE_OS::sprintf (verbose_msg,
- ACE_TEXT ("%s@%s@%s"),
- timestamp,
- ACE_Log_Record::priority_name (ACE_Log_Priority (this->type_)),
- this->msg_data_);
- else
- ACE_OS::sprintf (verbose_msg,
- ACE_TEXT ("%s"),
- this->msg_data_);
- return 0;
-}
-
-#if defined (ACE_HAS_WINCE)
-
-int
-ACE_Log_Record::print (const ACE_TCHAR *host_name,
- u_long verbose_flag,
- ACE_CE_Bridge *log_window)
-{
- ACE_TCHAR verbose_msg [MAXVERBOSELOGMSGLEN];
- int result = this->format_msg (host_name, verbose_flag, verbose_msg);
-
- if (result == 0)
- {
- if (log_window == 0)
- log_window = ACE_CE_Bridge::get_default_winbridge ();
-
- // <verbose_cstring> will be deleted by <write_msg> function
- log_window->write_msg (verbose_msg);
- }
-
- return result;
-}
-
-#endif /* defined (ACE_HAS_WINCE) */
-
-int
-ACE_Log_Record::print (const ACE_TCHAR *host_name,
- u_long verbose_flag,
- FILE *fp)
-{
- ACE_TCHAR verbose_msg [MAXVERBOSELOGMSGLEN];
- int result = this->format_msg (host_name, verbose_flag, verbose_msg);
-
- if (result == 0)
- {
- if (fp != NULL)
- {
- int verbose_msg_len = ACE_OS::strlen (verbose_msg);
- int fwrite_result = ACE_OS::fprintf (fp, "%s", verbose_msg);
-
- // We should have written everything
- if (fwrite_result != verbose_msg_len)
- {
- result = -1;
- }
- else
- {
- ACE_OS::fflush (fp);
- }
- }
- }
-
- return result;
-}
-
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
-
-int
-ACE_Log_Record::print (const ACE_TCHAR *host_name,
- u_long verbose_flag,
- ostream &s)
-{
- ACE_TCHAR verbose_msg [MAXVERBOSELOGMSGLEN];
- int result = this->format_msg (host_name, verbose_flag, verbose_msg);
-
- if (result == 0)
- {
- // Since ostream expects only chars, we cannot pass wchar_t's
- s << ACE_TEXT_ALWAYS_CHAR (verbose_msg);
- s.flush ();
- }
-
- return result;
-}
-
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
diff --git a/ace/Log_Record.h b/ace/Log_Record.h
deleted file mode 100644
index f30c4baa6de..00000000000
--- a/ace/Log_Record.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Log_Record.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-// These need to go outside of the #ifdef to avoid problems with
-// circular dependencies...
-#include "ace/OS.h"
-
-#include "ace/Log_Priority.h"
-
-#ifndef ACE_LOG_RECORD_H
-#define ACE_LOG_RECORD_H
-#include "ace/pre.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Log_Record
-{
-public:
- // = TITLE
- // Defines the structure of an ACE logging record.
-
- enum
- {
- MAXLOGMSGLEN = ACE_MAXLOGMSGLEN,
- // Maximum size of a logging message.
-
- ALIGN_WORDB = 8,
- // Most restrictive alignment.
-
- VERBOSE_LEN = 128,
- // Size used by verbose mode.
- // 20 (date) + 15 (host_name) + 10 (pid) + 10 (type) + 4 (@) ... +
- // ? (progname)
-
- MAXVERBOSELOGMSGLEN = VERBOSE_LEN + MAXLOGMSGLEN
- // Maximum size of a logging message with the verbose headers
- };
-
- // = Initialization
- ACE_Log_Record (void);
- ACE_Log_Record (ACE_Log_Priority lp,
- long time_stamp,
- long pid);
- // Create a <Log_Record> and set its priority, time stamp, and
- // process id.
- ACE_Log_Record (ACE_Log_Priority lp,
- const ACE_Time_Value &time_stamp,
- long pid);
- // Create a <Log_Record> and set its priority, time stamp, and
- // process id.
-
- ~ACE_Log_Record (void);
- // Default dtor.
-
-
- int print (const ACE_TCHAR host_name[],
- u_long verbose_flag,
-#if !defined (ACE_HAS_WINCE)
- FILE *fp = stderr);
-#else
- FILE *fp);
-#endif /* ACE_HAS_WINCE */
- // Write the contents of the logging record to the appropriate
- // <FILE>.
-
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
- int print (const ACE_TCHAR host_name[],
- u_long verbose_flag,
- ostream &stream);
- // Write the contents of the logging record to the appropriate
- // <ostream>.
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-
- int format_msg (const ACE_TCHAR host_name[],
- u_long verbose_flag,
- ACE_TCHAR *verbose_msg);
-
-#if defined (ACE_HAS_WINCE)
- int print (const ACE_TCHAR host_name[],
- u_long verbose_flag,
- ACE_CE_Bridge *log_ = 0);
- // For Windows CE, the default is to log messages to a preset
- // window.
-#endif /* defined (ACE_HAS_WINCE) */
-
- static const ACE_TCHAR *priority_name (ACE_Log_Priority p);
- // Returns a character array with the string form of the
- // <ACE_Log_Priority> parameter. This is used for the verbose
- // printing format.
-
- // = Marshall/demarshall
- void encode (void);
- // Encode the <Log_Record> for transmission on the network.
-
- void decode (void);
- // Decode the <Log_Record> received from the network.
-
- // = Set/get methods
-
- long type (void) const;
- // Get the type of the <Log_Record>.
-
- void type (long);
- // Set the type of the <Log_Record>.
-
- u_long priority (void) const;
- // Get the priority of the <Log_Record> <type_>. This is computed
- // as the base 2 logarithm of <type_> (which must be a power of 2,
- // as defined by the enums in <ACE_Log_Priority>).
-
- void priority (u_long num);
- // Set the priority of the <Log_Record> <type_> (which must be a
- // power of 2, as defined by the enums in <ACE_Log_Priority>).
-
- long length (void) const;
- // Get the length of the <Log_Record>.
-
- void length (long);
- // Set the length of the <Log_Record>.
-
- const ACE_Time_Value &time_stamp (void) const;
- // Get the time stamp of the <Log_Record>.
-
- void time_stamp (const ACE_Time_Value &);
- // Set the time stamp of the <Log_Record>.
-
- long pid (void) const;
- // Get the process id of the <Log_Record>.
-
- void pid (long);
- // Set the process id of the <Log_Record>.
-
- ACE_TCHAR *msg_data (void);
- // Get the message data of the <Log_Record>.
-
- void msg_data (const ACE_TCHAR *data);
- // Set the message data of the <Log_Record>.
-
- void msg_data_len (size_t len);
- // Set the size of the message data of the <Log_Record>.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- void round_up (void);
- // Round up to the alignment restrictions.
-
- ACE_INT32 length_;
- // Total length of the logging record in bytes. This field *must*
- // come first in order for various IPC framing mechanisms to work
- // correctly. In addition, the field must be an ACE_INT32 in order
- // to be passed portably across platforms.
-
- long type_;
- // Type of logging record.
-
- ACE_Time_Value time_stamp_;
- // Time that the logging record was generated.
-
- long pid_;
- // Id of process that generated the logging record.
-
- ACE_TCHAR msg_data_[MAXLOGMSGLEN];
- // Logging record data
-
- static const ACE_TCHAR *priority_names_[];
- // Symbolic names for the <ACE_Log_Priority> enums.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/Log_Record.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_LOG_RECORD_H */
diff --git a/ace/Log_Record.i b/ace/Log_Record.i
deleted file mode 100644
index 5d9315dc1d9..00000000000
--- a/ace/Log_Record.i
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Log_Record.i
-
-ASYS_INLINE
-ACE_Log_Record::~ACE_Log_Record (void)
-{
-}
-
-ASYS_INLINE void
-ACE_Log_Record::encode (void)
-{
- ACE_TRACE ("ACE_Log_Record::encode");
- this->length_ = htonl (this->length_);
- this->type_ = htonl (this->type_);
- // Make sure we don't enclose the sec() and usec() fields until
- // they've been normalized.
- this->time_stamp_.sec (htonl (this->time_stamp_.sec ()));
- this->time_stamp_.usec (htonl (this->time_stamp_.usec ()));
- this->pid_ = htonl (this->pid_);
-}
-
-ASYS_INLINE void
-ACE_Log_Record::decode (void)
-{
- ACE_TRACE ("ACE_Log_Record::decode");
- this->time_stamp_ = ACE_Time_Value (ntohl (this->time_stamp_.sec()),
- ntohl (this->time_stamp_.usec()));
- this->type_ = ntohl (this->type_);
- this->pid_ = ntohl (this->pid_);
- this->length_ = ntohl (this->length_);
-}
-
-ASYS_INLINE long
-ACE_Log_Record::type (void) const
-{
- ACE_TRACE ("ACE_Log_Record::type");
- return this->type_;
-}
-
-ASYS_INLINE void
-ACE_Log_Record::type (long t)
-{
- ACE_TRACE ("ACE_Log_Record::type");
- this->type_ = t;
-}
-
-ASYS_INLINE long
-ACE_Log_Record::length (void) const
-{
- ACE_TRACE ("ACE_Log_Record::length");
- return this->length_;
-}
-
-ASYS_INLINE void
-ACE_Log_Record::length (long l)
-{
- ACE_TRACE ("ACE_Log_Record::length");
- this->length_ = ACE_static_cast (ACE_UINT32, l);
-}
-
-ASYS_INLINE const ACE_Time_Value &
-ACE_Log_Record::time_stamp (void) const
-{
- ACE_TRACE ("ACE_Log_Record::time_stamp");
- return this->time_stamp_;
-}
-
-ASYS_INLINE void
-ACE_Log_Record::time_stamp (const ACE_Time_Value &ts)
-{
- ACE_TRACE ("ACE_Log_Record::time_stamp");
- this->time_stamp_ = ts;
-}
-
-ASYS_INLINE long
-ACE_Log_Record::pid (void) const
-{
- ACE_TRACE ("ACE_Log_Record::pid");
- return this->pid_;
-}
-
-ASYS_INLINE void
-ACE_Log_Record::pid (long p)
-{
- ACE_TRACE ("ACE_Log_Record::pid");
- this->pid_ = p;
-}
-
-ASYS_INLINE ACE_TCHAR *
-ACE_Log_Record::msg_data (void)
-{
- ACE_TRACE ("ACE_Log_Record::msg_data");
- return this->msg_data_;
-}
diff --git a/ace/MEM_Acceptor.cpp b/ace/MEM_Acceptor.cpp
deleted file mode 100644
index 3812c5a7885..00000000000
--- a/ace/MEM_Acceptor.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-// MEM_Acceptor.cpp
-// $Id$
-
-#include "ace/MEM_Acceptor.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/MEM_Acceptor.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-ACE_RCSID(ace, MEM_Acceptor, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Acceptor)
-
-void
-ACE_MEM_Acceptor::dump (void) const
-{
- ACE_TRACE ("ACE_MEM_Acceptor::dump");
-}
-
-// Do nothing routine for constructor.
-
-ACE_MEM_Acceptor::ACE_MEM_Acceptor (void)
- : mmap_prefix_ (0)
-{
- ACE_TRACE ("ACE_MEM_Acceptor::ACE_MEM_Acceptor");
-}
-
-ACE_MEM_Acceptor::~ACE_MEM_Acceptor (void)
-{
- ACE_TRACE ("ACE_MEM_Acceptor::~ACE_MEM_Acceptor");
- delete[] this->mmap_prefix_;
-}
-
-// General purpose routine for performing server ACE_SOCK creation.
-
-ACE_MEM_Acceptor::ACE_MEM_Acceptor (const ACE_MEM_Addr &remote_sap,
- int reuse_addr,
- int backlog,
- int protocol)
- : mmap_prefix_ (0)
-{
- ACE_TRACE ("ACE_MEM_Acceptor::ACE_MEM_Acceptor");
- if (this->open (remote_sap,
- reuse_addr,
- backlog,
- protocol) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_MEM_Acceptor::ACE_MEM_Acceptor")));
-}
-
-int
-ACE_MEM_Acceptor::open (const ACE_MEM_Addr &remote_sap,
- int reuse_addr,
- int back_log,
- int protocol)
-{
- ACE_TRACE ("ACE_MEM_Acceptor::open");
- return this->ACE_SOCK_Acceptor::open (remote_sap.get_local_addr (),
- reuse_addr,
- PF_INET,
- back_log,
- protocol);
-}
-
-// General purpose routine for accepting new connections.
-
-int
-ACE_MEM_Acceptor::accept (ACE_MEM_Stream &new_stream,
- ACE_MEM_Addr *remote_sap,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle)
-{
- ACE_TRACE ("ACE_MEM_Acceptor::accept");
-
- int *len_ptr = 0;
- sockaddr *addr = 0;
-
- int in_blocking_mode = 0;
- if (this->shared_accept_start (timeout,
- restart,
- in_blocking_mode) == -1)
- return -1;
- else
- {
- do
- new_stream.set_handle (ACE_OS::accept (this->get_handle (),
- addr,
- len_ptr));
- while (new_stream.get_handle () == ACE_INVALID_HANDLE
- && restart != 0
- && errno == EINTR
- && timeout == 0);
-
- if (remote_sap != 0)
- {
- ACE_INET_Addr temp (ACE_reinterpret_cast (sockaddr_in *, addr),
- *len_ptr);
- remote_sap->set_port_number(temp.get_port_number ());
- }
- }
-
- if (this->shared_accept_finish (new_stream,
- in_blocking_mode,
- reset_new_handle) == -1)
- return -1;
-
- // Allocate 2 * MAXPATHLEN so we can accomodate the unique
- // name that gets appended later
- ACE_TCHAR buf [2 * MAXPATHLEN + 1];
-
- ACE_INET_Addr local_addr;
- if (new_stream.get_local_addr (local_addr) == -1)
- return -1;
-
- if (this->mmap_prefix_ != 0)
- {
- ACE_OS::sprintf (buf,
- ACE_TEXT ("%s_%d_"),
- this->mmap_prefix_,
- local_addr.get_port_number ());
- }
- else
- {
- ACE_TCHAR name[25];
- // - 24 is so we can append name to the end.
- if (ACE::get_temp_dir (buf, MAXPATHLEN - 24) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Temporary path too long, ")
- ACE_TEXT ("defaulting to current directory\n")));
- buf[0] = 0;
- }
-
- ACE_OS::sprintf (name,
- ACE_TEXT ("MEM_Acceptor_%d_"),
- local_addr.get_port_number ());
- ACE_OS::strcat (buf, name);
- }
- ACE_TCHAR unique [MAXPATHLEN];
- ACE_OS::unique_name (&new_stream, unique, MAXPATHLEN);
-
- ACE_OS::strcat (buf, unique);
-
- // Make sure we have a fresh start.
- ACE_OS::unlink (buf);
-
- // Now set up the shared memory malloc pool.
- if (new_stream.create_shm_malloc (buf, &this->malloc_options_) == -1)
- return -1;
-
- // @@ Need to handle timeout here.
- ACE_UINT16 buf_len = (ACE_OS::strlen (buf) + 1) * sizeof (ACE_TCHAR);
- ACE_HANDLE new_handle = new_stream.get_handle ();
-
- // No need to worry about byte-order because both parties should always
- // be on the same machine.
- if (ACE::send (new_handle, &buf_len, sizeof (ACE_UINT16)) == -1)
- return -1;
-
- // Now send the pathname of the mmap file.
- if (ACE::send (new_handle, buf, buf_len) == -1)
- return -1;
- return 0;
-}
-
-int
-ACE_MEM_Acceptor::shared_accept_finish (ACE_MEM_Stream new_stream,
- int in_blocking_mode,
- int reset_new_handle) const
-{
- ACE_TRACE ("ACE_MEM_Acceptor::shared_accept_finish ()");
-
- ACE_HANDLE new_handle = new_stream.get_handle ();
-
- // Check to see if we were originally in blocking mode, and if so,
- // set the <new_stream>'s handle and <this> handle to be in blocking
- // mode.
- if (in_blocking_mode)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
-
- // Only disable ACE_NONBLOCK if we weren't in non-blocking mode
- // originally.
- ACE::clr_flags (this->get_handle (),
- ACE_NONBLOCK);
- ACE::clr_flags (new_handle,
- ACE_NONBLOCK);
- }
-
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- if (reset_new_handle)
- // Reset the event association inherited by the new handle.
- ::WSAEventSelect ((SOCKET) new_handle, 0, 0);
-#else
- ACE_UNUSED_ARG (reset_new_handle);
-#endif /* ACE_WIN32 */
- if (new_handle == ACE_INVALID_HANDLE)
- return -1;
-
- return 0;
-}
diff --git a/ace/MEM_Acceptor.h b/ace/MEM_Acceptor.h
deleted file mode 100644
index 63603fbdbbd..00000000000
--- a/ace/MEM_Acceptor.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// MEM_Aceeptor.h
-//
-// = AUTHOR
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_MEM_ACCEPTOR_H
-#define ACE_MEM_ACCEPTOR_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Acceptor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/MEM_Stream.h"
-#include "ace/MEM_Addr.h"
-
-// Forward decl.
-class ACE_Reactor;
-
-class ACE_Export ACE_MEM_Acceptor : public ACE_SOCK_Acceptor
-{
- // = TITLE
- // Defines the format and interface for the acceptor side of the
- // local mmap stream.
- //
- // = DESCRIPTION
- // This class should be modified to prevent user passing a
- // non-localhost endpoint as the acceptor listen point because
- // it doesn't make any sense at all to make the listening
- // endpoint visible (or connectable) anywhere outside of this
- // machine. However, the type of endpoint is left as <ACE_Addr>
- // so we can later changed to use UNIX sockets with mmap stream
- // if so desired. (Currently, using UNIX socket with this class
- // will not work.)
-public:
- // = Initialization methods.
- ACE_MEM_Acceptor (void);
- // Default constructor.
-
- ~ACE_MEM_Acceptor (void);
- // destructor.
-
- ACE_MEM_Acceptor (const ACE_MEM_Addr &remote_sap,
- int reuse_addr = 0,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initiate a passive mode socket.
-
- int open (const ACE_MEM_Addr &local_sap,
- int reuse_addr = 0,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initialize a passive-mode BSD-style acceptor socket (no QoS).
- // <local_sap> is the address that we're going to listen for
- // connections on. If <reuse_addr> is 1 then we'll use the
- // <SO_REUSEADDR> to reuse this address. Returns 0 on success and
- // -1 on failure.
-
- int accept (ACE_MEM_Stream &new_ipc_sap,
- ACE_MEM_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0);
- // Accept a new data transfer connection.
-
- int shared_accept_finish (ACE_MEM_Stream new_stream,
- int in_blocking_mode,
- int reset_new_handle) const;
- // Perform operations that must occur after <ACE_OS::accept> is
- // called.
-
- const ACE_TCHAR *mmap_prefix (void) const;
- void mmap_prefix (ACE_TCHAR *prefix);
- // Accessor/mutator of mmap filename prefix. By default, the
- // <mmap_prefix_> is not set and the mmap filename is
- // ${(TMP|TEMP)}//ACE_MEM_Acceptor_(port-number)_(&stream),
- // otherwise, it is <mmap_prefix_>_(port-number)_(&stream),
- // <mmap_prefix_> should include _absolute_ path so the connector
- // within the same host can located the mmap file. Example:
- // /tmp/mmapfile.
-
- int get_local_addr (ACE_MEM_Addr &) const;
- // Return the local endpoint address in the referenced <ACE_Addr>.
- // Returns 0 if successful, else -1.
-
- ACE_MEM_SAP::MALLOC_OPTIONS& malloc_options (void);
- // Accessor to the mmap options.
-
- // = Meta-type info
- typedef ACE_MEM_Addr PEER_ADDR;
- typedef ACE_MEM_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = The following methods should not be accessable externally
- // because MEM_Acceptor do not support their semantics.
- int open (const ACE_Addr &local_sap,
- int reuse_addr = 0,
- int protocol_family = PF_INET,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
-
- int open (const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int protocol_family,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
-
- int accept (ACE_SOCK_Stream &new_stream,
- ACE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0) const;
-
- int accept (ACE_SOCK_Stream &new_stream,
- ACE_Accept_QoS_Params qos_params,
- ACE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0) const;
-
-private:
- ACE_TCHAR *mmap_prefix_;
- // The filename prefix of the created mmap files. It should
- // contains the absolute path name of the file.
-
- ACE_MEM_SAP::MALLOC_OPTIONS malloc_options_;
- // A cached MALLOC_OPTIONS. MEM_Accaptor use it to create the shared
- // mamory malloc upon every incoming connection.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/MEM_Acceptor.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_MEM_ACCEPTOR_H */
diff --git a/ace/MEM_Acceptor.i b/ace/MEM_Acceptor.i
deleted file mode 100644
index 82f9206c9e8..00000000000
--- a/ace/MEM_Acceptor.i
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// MEM_Acceptor.i
-
-ASYS_INLINE int
-ACE_MEM_Acceptor::open (const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol)
-{
- return this->ACE_SOCK_Acceptor::open
- (local_sap, protocolinfo, g, flags, reuse_addr, protocol_family,
- backlog, protocol);
-}
-
-ASYS_INLINE int
-ACE_MEM_Acceptor::accept (ACE_SOCK_Stream &new_stream,
- ACE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle) const
-{
- return this->ACE_SOCK_Acceptor::accept
- (new_stream, remote_addr, timeout, restart, reset_new_handle);
-}
-
-ASYS_INLINE int
-ACE_MEM_Acceptor::accept (ACE_SOCK_Stream &new_stream,
- ACE_Accept_QoS_Params qos_params,
- ACE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle) const
-{
- return this->ACE_SOCK_Acceptor::accept
- (new_stream, qos_params, remote_addr, timeout, restart, reset_new_handle);
-}
-
-ASYS_INLINE int
-ACE_MEM_Acceptor::get_local_addr (ACE_MEM_Addr &sap) const
-{
- ACE_INET_Addr temp;
-
- this->ACE_SOCK_Acceptor::get_local_addr (temp);
- sap.set_port_number (temp.get_port_number ());
- return 0;
-}
-
-ASYS_INLINE const ACE_TCHAR *
-ACE_MEM_Acceptor::mmap_prefix (void) const
-{
- return this->mmap_prefix_;
-}
-
-ASYS_INLINE void
-ACE_MEM_Acceptor::mmap_prefix (ACE_TCHAR *prefix)
-{
- this->mmap_prefix_ = ACE::strnew (prefix);
-}
-
-ASYS_INLINE ACE_MEM_SAP::MALLOC_OPTIONS &
-ACE_MEM_Acceptor::malloc_options (void)
-{
- return this->malloc_options_;
-}
diff --git a/ace/MEM_Addr.cpp b/ace/MEM_Addr.cpp
deleted file mode 100644
index c0e875c9714..00000000000
--- a/ace/MEM_Addr.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-// $Id$
-
-// Defines the Internet domain address family address format.
-
-#include "ace/MEM_Addr.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/MEM_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, MEM_Addr, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Addr)
-
-// Transform the current address into string format.
-
-ACE_MEM_Addr::ACE_MEM_Addr (void)
- : ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr))
-{
- // ACE_TRACE ("ACE_MEM_Addr::ACE_MEM_Addr");
- this->initialize_local (0);
-}
-
-ACE_MEM_Addr::ACE_MEM_Addr (const ACE_MEM_Addr &sa)
- : ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr))
-{
- ACE_TRACE ("ACE_MEM_Addr::ACE_MEM_Addr");
- this->external_.set (sa.external_);
- this->internal_.set (sa.internal_);
-}
-
-ACE_MEM_Addr::ACE_MEM_Addr (const ACE_TCHAR port_number[])
- : ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr))
-{
- ACE_TRACE ("ACE_MEM_Addr::ACE_MEM_Addr");
- u_short pn
- = ACE_static_cast (u_short,
- ACE_OS::strtoul (port_number,
- NULL,
- 10));
- this->initialize_local (pn);
-}
-
-ACE_MEM_Addr::ACE_MEM_Addr (u_short port_number)
- : ACE_Addr (AF_INET, sizeof (ACE_MEM_Addr))
-{
- ACE_TRACE ("ACE_MEM_Addr::ACE_MEM_Addr");
- this->initialize_local (port_number);
-}
-
-int
-ACE_MEM_Addr::initialize_local (u_short port_number)
-{
- ACE_TCHAR name[MAXHOSTNAMELEN + 1];
- if (ACE_OS::hostname (name, MAXHOSTNAMELEN+1) == -1)
- return -1;
-
- this->external_.set (port_number, name);
- this->internal_.set (port_number, ACE_TEXT ("localhost"));
- return 0;
-}
-
-int
-ACE_MEM_Addr::same_host (const ACE_INET_Addr &sap)
-{
- ACE_TRACE ("ACE_MEM_Addr::same_host");
-
- return this->external_.get_ip_address () ==
- sap.get_ip_address ();
-}
-
-int
-ACE_MEM_Addr::addr_to_string (ACE_TCHAR s[],
- size_t size,
- int ipaddr_format) const
-{
- ACE_TRACE ("ACE_MEM_Addr::addr_to_string");
-
- return this->external_.addr_to_string (s, size, ipaddr_format);
-}
-
-// Transform the string into the current addressing format.
-
-int
-ACE_MEM_Addr::string_to_addr (const ACE_TCHAR s[])
-{
- ACE_TRACE ("ACE_MEM_Addr::string_to_addr");
-
- u_short pn
- = ACE_static_cast (u_short,
- ACE_OS::strtoul (s,
- NULL,
- 10));
- return this->set (pn);
-}
-
-// Return the address.
-
-void *
-ACE_MEM_Addr::get_addr (void) const
-{
- ACE_TRACE ("ACE_MEM_Addr::get_addr");
- return this->external_.get_addr ();
-}
-
-// Set a pointer to the address.
-void
-ACE_MEM_Addr::set_addr (void *addr, int len)
-{
- ACE_TRACE ("ACE_MEM_Addr::set_addr");
-
- this->external_.set_addr (addr, len);
- this->internal_.set_port_number (this->external_.get_port_number ());
-}
-
-int
-ACE_MEM_Addr::get_host_name (ACE_TCHAR hostname[],
- size_t len) const
-{
- ACE_TRACE ("ACE_MEM_Addr::get_host_name");
- return this->external_.get_host_name (hostname, len);
-}
-
-// Return the character representation of the hostname.
-
-const ACE_TCHAR *
-ACE_MEM_Addr::get_host_name (void) const
-{
- ACE_TRACE ("ACE_MEM_Addr::get_host_name");
- return this->external_.get_host_name ();
-}
-
-void
-ACE_MEM_Addr::dump (void) const
-{
- ACE_TRACE ("ACE_MEM_Addr::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->external_.dump ();
- this->internal_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
diff --git a/ace/MEM_Addr.h b/ace/MEM_Addr.h
deleted file mode 100644
index a6dd68ede60..00000000000
--- a/ace/MEM_Addr.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// MEM_Addr.h
-//
-// = AUTHOR
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_MEM_ADDR_H
-#define ACE_MEM_ADDR_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/INET_Addr.h"
-
-class ACE_Export ACE_MEM_Addr : public ACE_Addr
-{
- // = TITLE
- // Defines a C++ wrapper facade for the shared memory transport
- // address family format.
-public:
- // = Initialization methods.
- ACE_MEM_Addr (void);
- // Default constructor.
-
- ACE_MEM_Addr (const ACE_MEM_Addr &);
- // Copy constructor.
-
- ACE_MEM_Addr (u_short port_number);
- // Creates an <ACE_INET_Addr> from a <port_number> and the remote
- // <host_name>.
-
- ACE_MEM_Addr (const ACE_TCHAR port_name[]);
- // Creates an <ACE_INET_Addr> from a <port_name>.
-
- ~ACE_MEM_Addr (void);
- // Default dtor.
-
- // = Direct initialization methods.
-
- int initialize_local (u_short port);
- // default initialization routine.
-
- int same_host (const ACE_INET_Addr& sap);
- // Check if <sap> designate an enpoint withing the same host.
-
- // These methods are useful after the object has been constructed.
-
- int set (u_short port_number,
- int encode = 1);
- // Initializes an <ACE_INET_Addr> from a <port_number> and the
- // remote <host_name>. If <encode> is enabled then <port_number> is
- // converted into network byte order, otherwise it is assumed to be
- // in network byte order already and are passed straight through.
-
- int set (const ACE_TCHAR port_name[]);
- // Uses <getservbyname> to initialize an <ACE_INET_Addr> from a
- // <port_name>, the remote <host_name>, and the <protocol>.
-
- virtual void *get_addr (void) const;
- // Return a pointer to the underlying network address.
-
- virtual void set_addr (void *, int len);
- // Set a pointer to the address.
-
- virtual int addr_to_string (ACE_TCHAR buffer[],
- size_t size,
- int ipaddr_format = 1) const;
- // Transform the external <ACE_INET_Addr> address into string
- // format.
-
- virtual int string_to_addr (const ACE_TCHAR address[]);
- // Initializes the external <ACE_INET_Addr> from the <address>.
-
- void set_port_number (u_short,
- int encode = 1);
- // Sets the port number.
-
- u_short get_port_number (void) const;
- // Return the port number, converting it into host byte order.
-
- int get_host_name (ACE_TCHAR hostname[],
- size_t hostnamelen) const;
- // Return the character representation of the hostname.
-
- const ACE_TCHAR *get_host_name (void) const;
- // Return the character representation of the hostname (this version
- // is non-reentrant since it returns a pointer to a static data
- // area).
-
- const ACE_TCHAR *get_host_addr (void) const;
- // Return the "dotted decimal" external address.
-
- ACE_UINT32 get_ip_address (void) const;
- // Return the 4-byte external IP address, converting it into host byte
- // order.
-
- const ACE_INET_Addr &get_remote_addr (void) const;
- const ACE_INET_Addr &get_local_addr (void) const;
-
- int operator == (const ACE_MEM_Addr &SAP) const;
- int operator == (const ACE_INET_Addr &SAP) const;
- // Compare two addresses for equality. The addresses are considered
- // equal if they contain the same IP address and port number.
-
- int operator != (const ACE_MEM_Addr &SAP) const;
- int operator != (const ACE_INET_Addr &SAP) const;
- // Compare two addresses for inequality.
-
- virtual u_long hash (void) const;
- // Computes and returns hash value.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_INET_Addr external_;
- // External INET addr used for identifying host.
-
- ACE_INET_Addr internal_;
- // Internal INET addr for accepting/connecting.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/MEM_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_MEM_ADDR_H */
diff --git a/ace/MEM_Addr.i b/ace/MEM_Addr.i
deleted file mode 100644
index 579481e2ce6..00000000000
--- a/ace/MEM_Addr.i
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// MEM_Addr.i
-
-// Default dtor.
-ACE_INLINE
-ACE_MEM_Addr::~ACE_MEM_Addr (void)
-{
-}
-
-// Set the port number.
-
-ACE_INLINE void
-ACE_MEM_Addr::set_port_number (u_short port_number,
- int encode)
-{
- ACE_TRACE ("ACE_MEM_Addr::set_port_number");
-
- this->external_.set_port_number (port_number, encode);
- this->internal_.set_port_number (port_number, encode);
-}
-
-ACE_INLINE int
-ACE_MEM_Addr::set (u_short port_number, int encode)
-{
- ACE_TRACE ("ACE_INET_Addr::set");
- this->set_port_number (port_number, encode);
- return 0;
-}
-
-ACE_INLINE int
-ACE_MEM_Addr::set (const ACE_TCHAR port_number[])
-{
- ACE_TRACE ("ACE_MEM_Addr::set");
- return this->string_to_addr (port_number);
-}
-
-// Return the port number.
-
-ACE_INLINE u_short
-ACE_MEM_Addr::get_port_number (void) const
-{
- ACE_TRACE ("ACE_MEM_Addr::get_port_number");
- return this->internal_.get_port_number ();
-}
-
-// Return the dotted Internet address.
-
-ACE_INLINE const ACE_TCHAR *
-ACE_MEM_Addr::get_host_addr (void) const
-{
- ACE_TRACE ("ACE_MEM_Addr::get_host_addr");
- return this->internal_.get_host_addr ();
-}
-
-// Return the 4-byte IP address, converting it into host byte order.
-
-ACE_INLINE ACE_UINT32
-ACE_MEM_Addr::get_ip_address (void) const
-{
- ACE_TRACE ("ACE_MEM_Addr::get_ip_address");
- return this->external_.get_ip_address ();
-}
-
-ACE_INLINE const ACE_INET_Addr &
-ACE_MEM_Addr::get_local_addr (void) const
-{
- return this->internal_;
-}
-
-ACE_INLINE const ACE_INET_Addr &
-ACE_MEM_Addr::get_remote_addr (void) const
-{
- return this->external_;
-}
-
-// Compare two addresses for equality.
-
-ACE_INLINE int
-ACE_MEM_Addr::operator == (const ACE_MEM_Addr &sap) const
-{
- ACE_TRACE ("ACE_MEM_Addr::operator ==");
-
- return this->external_ == sap.external_ &&
- this->internal_ == sap.internal_;
-}
-
-ACE_INLINE int
-ACE_MEM_Addr::operator == (const ACE_INET_Addr &sap) const
-{
- ACE_TRACE ("ACE_MEM_Addr::operator ==");
-
- return this->external_ == sap;
-}
-
-// Compare two addresses for inequality.
-
-ACE_INLINE int
-ACE_MEM_Addr::operator != (const ACE_MEM_Addr &sap) const
-{
- ACE_TRACE ("ACE_MEM_Addr::operator !=");
- return !((*this) == sap);
-}
-
-ACE_INLINE int
-ACE_MEM_Addr::operator != (const ACE_INET_Addr &sap) const
-{
- ACE_TRACE ("ACE_MEM_Addr::operator !=");
- return !((*this) == sap);
-}
-
-ACE_INLINE u_long
-ACE_MEM_Addr::hash (void) const
-{
- return this->external_.hash ();
-}
diff --git a/ace/MEM_Connector.cpp b/ace/MEM_Connector.cpp
deleted file mode 100644
index 9c6ca6ed918..00000000000
--- a/ace/MEM_Connector.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-// MEM_Connector.cpp
-// $Id$
-
-#include "ace/MEM_Connector.h"
-
-ACE_RCSID(ace, MEM_Connector, "$Id$")
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/MEM_Connector.i"
-#endif
-
-ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Connector)
-
-void
-ACE_MEM_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_MEM_Connector::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_MEM_Connector::ACE_MEM_Connector (void)
-{
- ACE_TRACE ("ACE_MEM_Connector::ACE_MEM_Connector");
-}
-
-// Establish a connection.
-ACE_MEM_Connector::ACE_MEM_Connector (ACE_MEM_Stream &new_stream,
- const ACE_INET_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- int protocol)
-{
- ACE_TRACE ("ACE_MEM_Connector::ACE_MEM_Connector");
- // This is necessary due to the weird inheritance relationships of
- // ACE_MEM_Stream.
- this->connect (new_stream,
- remote_sap,
- timeout,
- local_sap,
- reuse_addr,
- flags,
- perms,
- protocol);
-}
-
-int
-ACE_MEM_Connector::connect (ACE_MEM_Stream &new_stream,
- const ACE_INET_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- int protocol)
-{
- ACE_TRACE ("ACE_MEM_Connector::connect");
-
- if (!this->address_.same_host (remote_sap))
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) MEM_Connector can't connect ")
- ACE_TEXT ("to %s:%d which is not a local endpoint"),
- remote_sap.get_host_name (),
- remote_sap.get_port_number ()),
- -1);
- else
- this->address_.set_port_number (remote_sap.get_port_number ());
-
-
- ACE_SOCK_Stream temp_stream;
-
- if (ACE_SOCK_Connector::connect (temp_stream,
- this->address_.get_local_addr (),
- timeout, local_sap,
- reuse_addr, flags, perms,
- PF_INET, protocol) == -1)
- return -1;
-
- ACE_HANDLE new_handle = temp_stream.get_handle ();
- new_stream.set_handle (new_handle);
- // Do not close the handle.
-
- // now we should setup the mmap malloc.
- ACE_TCHAR buf[MAXPATHLEN];
-
- // @@ Need to handle timeout here.
- ACE_INT16 buf_len;
- // Byte-order is not a problem for this read.
- if (ACE::recv (new_handle, &buf_len, sizeof (buf_len)) == -1)
- return -1;
-
- if (ACE::recv (new_handle, buf, buf_len) == -1)
- return -1;
-
- if (new_stream.create_shm_malloc (buf, &this->malloc_options_) == -1)
- return -1;
-
- return 0;
-}
diff --git a/ace/MEM_Connector.h b/ace/MEM_Connector.h
deleted file mode 100644
index 10a5f9ade73..00000000000
--- a/ace/MEM_Connector.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// MEM_Connector.h
-//
-// = AUTHOR
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_MEM_CONNECTOR_H
-#define ACE_MEM_CONNECTOR_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Connector.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/MEM_Stream.h"
-#include "ace/MEM_Addr.h"
-
-class ACE_Export ACE_MEM_Connector : public ACE_SOCK_Connector
-{
- // = TITLE
- // Defines the format and interface for the connector side of
- // the <ACE_MEM_Stream>.
-public:
- // = Initialization methods.
- ACE_MEM_Connector (void);
- // Default constructor.
-
- ACE_MEM_Connector (ACE_MEM_Stream &new_stream,
- const ACE_INET_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <0> then the user is letting the OS do the
- // binding. If <reuse_addr> == 1 then the <local_addr> is reused,
- // even if it hasn't been cleanedup yet.
-
- int connect (ACE_MEM_Stream &new_stream,
- const ACE_INET_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <0> then the user is letting the OS do the
- // binding. If <reuse_addr> == 1 then the <local_addr> is reused,
- // even if it hasn't been cleanedup yet.
-
- ACE_MEM_SAP::MALLOC_OPTIONS &malloc_options (void);
- // Accessor to underlying malloc options.
-
- // = Meta-type info
- typedef ACE_INET_Addr PEER_ADDR;
- typedef ACE_MEM_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_MEM_Addr address_;
- // The acceptor address this connector is connecting to.
-
- ACE_MEM_SAP::MALLOC_OPTIONS malloc_options_;
- // A cached MALLOC_OPTIONS that the MEM_Connector used to initialize
- // the shared memory malloc update connection establishment.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/MEM_Connector.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_MEM_CONNECTOR_H */
diff --git a/ace/MEM_Connector.i b/ace/MEM_Connector.i
deleted file mode 100644
index 3fdf59e19e0..00000000000
--- a/ace/MEM_Connector.i
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// MEM_Connector.i
-
-// Establish a connection.
-
-ASYS_INLINE ACE_MEM_SAP::MALLOC_OPTIONS &
-ACE_MEM_Connector::malloc_options (void)
-{
- return this->malloc_options_;
-}
diff --git a/ace/MEM_IO.cpp b/ace/MEM_IO.cpp
deleted file mode 100644
index 79e49e81021..00000000000
--- a/ace/MEM_IO.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-// MEM_IO.cpp
-// $Id$
-
-#include "ace/MEM_IO.h"
-#include "ace/Handle_Set.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/MEM_IO.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-ACE_RCSID(ace, MEM_IO, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_MEM_IO)
-
-void
-ACE_MEM_IO::dump (void) const
-{
- ACE_TRACE ("ACE_MEM_IO::dump");
-}
-
-// Allows a client to read from a socket without having to provide
-// a buffer to read. This method determines how much data is in the
-// socket, allocates a buffer of this size, reads in the data, and
-// returns the number of bytes read.
-
-ssize_t
-ACE_MEM_IO::send (const ACE_Message_Block *message_block,
- const ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_MEM_IO::send");
-
- ssize_t len = message_block->total_length ();
-
- if (len != 0)
- {
- char *buf = ACE_static_cast (char *, this->acquire_buffer (len));
- ssize_t n = 0;
- while (message_block != 0)
- {
- ACE_OS::memcpy (buf + n,
- message_block->rd_ptr (),
- message_block->length ());
- n += message_block->length ();
-
- if (message_block->cont ())
- message_block = message_block->cont ();
- else
- message_block = message_block->next ();
- }
-
- off_t offset = this->set_buf_len (buf, len);
- if (ACE::send (this->get_handle (),
- (const char *) &offset,
- sizeof (offset),
- 0,
- timeout) != sizeof (offset))
- {
- // unsucessful send, release the memory in the shared-memory.
- this->release_buffer (buf);
-
- return -1;
- }
- return len;
- }
- return 0;
-}
-
-
-#if 0
-ssize_t
-ACE_MEM_IO::recvv (iovec *io_vec,
- const ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_MEM_IO::recvv");
-#if defined (FIONREAD)
- ACE_Handle_Set handle_set;
- handle_set.reset ();
- handle_set.set_bit (this->get_handle ());
-
- io_vec->iov_base = 0;
-
- // Check the status of the current socket.
- switch (ACE_OS::select (int (this->get_handle ()) + 1,
- handle_set,
- 0, 0,
- timeout))
- {
- case -1:
- return -1;
- /* NOTREACHED */
- case 0:
- errno = ETIME;
- return -1;
- /* NOTREACHED */
- default:
- // Goes fine, fallthrough to get data
- break;
- }
-
- u_long inlen;
-
- if (ACE_OS::ioctl (this->get_handle (),
- FIONREAD,
- (u_long *) &inlen) == -1)
- return -1;
- else if (inlen > 0)
- {
- ACE_NEW_RETURN (io_vec->iov_base,
- char[inlen],
- -1);
- io_vec->iov_len = this->recv (io_vec->iov_base,
- inlen);
- return io_vec->iov_len;
- }
- else
- return 0;
-#else
- ACE_UNUSED_ARG (io_vec);
- ACE_UNUSED_ARG (timeout);
- ACE_NOTSUP_RETURN (-1);
-#endif /* FIONREAD */
-}
-
-// Send N char *ptrs and int lengths. Note that the char *'s precede
-// the ints (basically, an varargs version of writev). The count N is
-// the *total* number of trailing arguments, *not* a couple of the
-// number of tuple pairs!
-
-ssize_t
-ACE_MEM_IO::send (size_t n, ...) const
-{
- ACE_TRACE ("ACE_MEM_IO::send");
-
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, ssize_t);
- }
-
- ssize_t result = ACE_OS::sendv (this->get_handle (),
- iovp,
- total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-
-// This is basically an interface to ACE_OS::readv, that doesn't use
-// the struct iovec_Base explicitly. The ... can be passed as an arbitrary
-// number of (char *ptr, int len) tuples. However, the count N is the
-// *total* number of trailing arguments, *not* a couple of the number
-// of tuple pairs!
-
-ssize_t
-ACE_MEM_IO::recv (size_t n, ...) const
-{
- ACE_TRACE ("ACE_MEM_IO::recv");
-
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, ssize_t);
- }
-
- ssize_t result = ACE_OS::recvv (this->get_handle (),
- iovp,
- total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-#endif /* 0 */
diff --git a/ace/MEM_IO.h b/ace/MEM_IO.h
deleted file mode 100644
index 445cdfc70c7..00000000000
--- a/ace/MEM_IO.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// MEM_IO.h
-//
-// = AUTHOR
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_MEM_IO_H
-#define ACE_MEM_IO_H
-#include "ace/pre.h"
-
-#include "ace/SOCK.h"
-#include "ace/MEM_SAP.h"
-#include "ace/Memory_Pool.h"
-#include "ace/Message_Block.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_MEM_IO : public ACE_SOCK, public ACE_MEM_SAP
-{
- // = TITLE
- // Defines the methods for the ACE shared memeory wrapper I/O
- // routines (e.g., send/recv).
- //
- // The shared memory transport uses ACE_SOCK_* class to
- // implement the signaling mechanism so we can easily use the
- // new mechanism with the Reactor pattern (which uses select
- // under the hood.)
- //
- // ACE_MEM_Acceptor and ACE_MEM_Connector are used to establish
- // connections. When a connection is established,
- // ACE_MEM_Acceptor creates the MMAP file for data exchange and
- // sends the location of the file (complete path name) to
- // ACE_MEM_Connector thru the socket. ACE_MEM_Connector then
- // reads the location of the file off the socket and opens up
- // the same MMAP file. ACE_MEM_Stream at each side then
- // contains a reference to the ACE_Mallo object using the same
- // MMAP file.
- //
- // When sending information using methods provided in this
- // class, ACE_MEM_IO requests a chunk of memory from the
- // MALLOC_TYPE object, copy the data into the shared memory and
- // send the memory offset (from the start of the ACE_Malloc)
- // across the socket. This action also servers as a signal to
- // the other end. The receiving side then reverses the
- // procedures and copies the information into user buffer.
-public:
- // = Initialization and termination methods.
- ACE_MEM_IO (void);
- // Constructor.
-
- ~ACE_MEM_IO (void);
- // Destructor.
-
- ssize_t send (const void *buf,
- size_t n,
- int flags) ;
- // Send an <n> byte buffer to the other process using shm_malloc_
- // connected thru the socket.
-
- ssize_t recv (void *buf,
- size_t n,
- int flags) ;
- // Recv an <n> byte buffer from the shm_malloc_ thru connected socket.
-
- ssize_t send (const void *buf,
- size_t n) ;
- // Send an <n> byte buffer to the other process using shm_malloc_
- // connected thru the socket.
-
- ssize_t recv (void *buf,
- size_t n) ;
- // Recv an <n> byte buffer from the shm_malloc_ thru connected socket.
-
- ssize_t send (const void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout);
- // Wait to to <timeout> amount of time to send up to <n> bytes into
- // <buf> from <handle> (uses the <send> call). If <send> times out
- // a -1 is returned with <errno == ETIME>. If it succeeds the
- // number of bytes sent is returned.
-
- ssize_t recv (void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout);
- // Wait up to <timeout> amount of time to receive up to <n> bytes
- // into <buf> from <handle> (uses the <recv> call). If <recv> times
- // out a -1 is returned with <errno == ETIME>. If it succeeds the
- // number of bytes received is returned.
-
- ssize_t send (const void *buf,
- size_t n,
- const ACE_Time_Value *timeout);
- // Wait to to <timeout> amount of time to send up to <n> bytes into
- // <buf> from <handle> (uses the <send> call). If <send> times out
- // a -1 is returned with <errno == ETIME>. If it succeeds the
- // number of bytes sent is returned.
-
- ssize_t recv (void *buf,
- size_t n,
- const ACE_Time_Value *timeout);
- // Wait up to <timeout> amount of time to receive up to <n> bytes
- // into <buf> from <handle> (uses the <recv> call). If <recv> times
- // out a -1 is returned with <errno == ETIME>. If it succeeds the
- // number of bytes received is returned.
-
- ssize_t send (const ACE_Message_Block *message_block,
- const ACE_Time_Value *timeout);
- // Wait to to <timeout> amount of time to send the <message_block>.
- // If <send> times out a -1 is returned with <errno == ETIME>. If
- // it succeeds the number of bytes sent is returned.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- /* int get_local_port (u_short &) const;
- // Return the local endpoint port number. Returns 0 if successful,
- // else -1.
-
- int get_remote_port (u_short &) const;
- // Return the port number of the remotely connected peer (if there
- // is one). Returns 0 if successful, else -1.
- */
-
-protected:
- ssize_t fetch_recv_buf (int flags, const ACE_Time_Value *timeout = 0);
- // Fetch location of next available data into <recv_buffer_>.
- // As this operation read the address of the data off the socket
- // using ACE::recv, <timeout> only applies to ACE::recv.
-
-private:
- void *recv_buffer_;
- // Internal pointer for support recv/send.
-
- ssize_t buf_size_;
- // Record the current total buffer size of <recv_buffer_>.
-
- ssize_t cur_offset_;
- // Record the current read pointer location in <recv_buffer_>.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/MEM_IO.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_IO_H */
diff --git a/ace/MEM_IO.i b/ace/MEM_IO.i
deleted file mode 100644
index aa2cadb1a18..00000000000
--- a/ace/MEM_IO.i
+++ /dev/null
@@ -1,168 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// MEM_IO.i
-
-// Send an n byte message to the connected socket.
-ASYS_INLINE
-ACE_MEM_IO::ACE_MEM_IO (void)
- : recv_buffer_ (0),
- buf_size_ (0),
- cur_offset_ (0)
-{
- // ACE_TRACE ("ACE_MEM_IO::ACE_MEM_IO");
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_IO::fetch_recv_buf (int flag, const ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_MEM_IO::fetch_recv_buf");
-
- // This method can only be called when <buf_size_> == <cur_offset_>.
- ACE_ASSERT (this->buf_size_ == this->cur_offset_);
-
- // We have done using the previous buffer, return it to malloc.
- if (this->recv_buffer_ != 0)
- this->release_buffer (this->recv_buffer_);
-
- this->cur_offset_ = 0;
- off_t new_offset = 0;
- int retv = ACE::recv (this->get_handle (),
- (char *) &new_offset,
- sizeof (off_t),
- flag,
- timeout);
-
- if (retv != sizeof (off_t))
- {
- // Nothing available or we are really screwed.
- this->buf_size_ = 0;
- this->recv_buffer_ = 0;
- return -1;
- }
- else
- this->buf_size_ = this->get_buf_len (new_offset,
- this->recv_buffer_);
- return this->buf_size_;
-}
-
-ASYS_INLINE
-ACE_MEM_IO::~ACE_MEM_IO (void)
-{
- // ACE_TRACE ("ACE_MEM_IO::~ACE_MEM_IO");
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_IO::send (const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_MEM_IO::send");
- void *sbuf = this->acquire_buffer (len);
- if (sbuf == 0)
- return -1; // Memory buffer not initialized.
- ACE_OS::memcpy (sbuf, buf, len);
- off_t offset = this->set_buf_len (sbuf, len); // <set_buf_len> also calculate
- // the offset.
-
- // Send the offset value over the socket.
- if (ACE::send (this->get_handle (),
- (const char *) &offset,
- sizeof (offset),
- flags,
- timeout) != sizeof (offset))
- {
- // unsucessful send, release the memory in the shared-memory.
- this->release_buffer (sbuf);
-
- return -1;
- }
- return len;
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_IO::recv (void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_MEM_IO::recv");
-
- size_t count = 0;
-
-// while (len > 0)
-// {
- size_t buf_len = this->buf_size_ - this->cur_offset_;
- if (buf_len == 0)
- {
- if (this->fetch_recv_buf (flags, timeout) == -1)
- return -1;
- buf_len = this->buf_size_;
- }
-
- size_t length = (len > buf_len ? buf_len : len);
-
- ACE_OS::memcpy ((char *) buf + count,
- (char *) this->recv_buffer_ + this->cur_offset_,
- length);
- this->cur_offset_ += length;
-// len -= length;
- count += length;
-// }
-
- return count;
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_IO::send (const void *buf, size_t n, int flags)
-{
- ACE_TRACE ("ACE_MEM_IO::send");
- return this->send (buf, n, flags, 0);
-}
-
-// Recv an n byte message from the connected socket.
-
-ASYS_INLINE ssize_t
-ACE_MEM_IO::recv (void *buf, size_t n, int flags)
-{
- ACE_TRACE ("ACE_MEM_IO::recv");
- return this->recv (buf, n, flags, 0);
-}
-
-// Send an n byte message to the connected socket.
-
-ASYS_INLINE ssize_t
-ACE_MEM_IO::send (const void *buf, size_t n)
-{
- ACE_TRACE ("ACE_MEM_IO::send");
- return this->send (buf, n, 0);
-}
-
-// Recv an n byte message from the connected socket.
-
-ASYS_INLINE ssize_t
-ACE_MEM_IO::recv (void *buf, size_t n)
-{
- ACE_TRACE ("ACE_MEM_IO::recv");
-
- return this->recv (buf, n, 0);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_IO::recv (void *buf,
- size_t len,
- const ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_MEM_IO::recv");
- return this->recv (buf, len, 0, timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_IO::send (const void *buf,
- size_t len,
- const ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_MEM_IO::send");
- return this->send (buf, len, 0, timeout);
-}
diff --git a/ace/MEM_SAP.cpp b/ace/MEM_SAP.cpp
deleted file mode 100644
index bbb9a1849b4..00000000000
--- a/ace/MEM_SAP.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id$
-
-#include "ace/MEM_SAP.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/MEM_SAP.i"
-#endif
-
-ACE_RCSID(ace, IPC_SAP, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_IPC_SAP)
-
-void
-ACE_MEM_SAP::dump (void) const
-{
- ACE_TRACE ("ACE_MEM_SAP::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- if (this->shm_malloc_ != 0)
- this->shm_malloc_->dump ();
- else
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_MEM_SAP uninitialized.\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_MEM_SAP::ACE_MEM_SAP (void)
- : shm_malloc_ (0)
-{
- // ACE_TRACE ("ACE_MEM_SAP::ACE_MEM_SAP");
-}
-
-int
-ACE_MEM_SAP::create_shm_malloc (const ACE_TCHAR *name,
- MALLOC_OPTIONS *options)
-{
- ACE_TRACE ("ACE_MEM_SAP::create_shm_malloc");
-
- if (this->shm_malloc_ != 0)
- return -1; // already initialized.
-
- ACE_NEW_RETURN (this->shm_malloc_,
- MALLOC_TYPE (name,
- 0,
- options),
- -1);
-
- return 0;
-}
-
-int
-ACE_MEM_SAP::close_shm_malloc (const int remove)
-{
- if (this->shm_malloc_ != 0 && remove != 0)
- {
- this->shm_malloc_->remove ();
- return 0;
- }
- return -1;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Write_Guard<ACE_Process_Mutex>;
-template class ACE_Read_Guard<ACE_Process_Mutex>;
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block>;
-#else
-template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex>;
-template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block>;
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Write_Guard<ACE_Process_Mutex>
-#pragma instantiate ACE_Read_Guard<ACE_Process_Mutex>
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-#pragma instantiate ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block>
-#else
-#pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex>
-#pragma instantiate ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block>
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/MEM_SAP.h b/ace/MEM_SAP.h
deleted file mode 100644
index 05270a74c8a..00000000000
--- a/ace/MEM_SAP.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// MEM_SAP.h
-//
-// = AUTHOR
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_MEM_SAP_H
-#define ACE_MEM_SAP_H
-#include "ace/pre.h"
-
-#include "ace/Malloc.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_MEM_SAP
-{
- // = TITLE
- // Defines the methods of shared memory management for
- // shared memory transport.
-public:
- // = Initialization and termination methods.
-
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
- typedef ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> MALLOC_TYPE;
-#else
- typedef ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_Control_Block> MALLOC_TYPE;
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
- typedef ACE_MMAP_Memory_Pool_Options MALLOC_OPTIONS;
- // I'll just hardcode this for mmap for now.
-
- ~ACE_MEM_SAP (void);
- // Destructor.
-
- void *acquire_buffer (const ssize_t size);
- // request a buffer of size <size>. Return 0 if the <shm_malloc_> is
- // not initialized.
-
- int release_buffer (void *buf);
- // release a buffer pointed by <buf>. Return -1 if the <shm_malloc_>
- // is not initialized.
-
- off_t set_buf_len (void *buf,
- size_t n);
- // Set the length of buf (containing information) to <n> bytes.
- // Return the offset of the <buf> relative to the base address.
- // <buf> must be acquired by <get_buffer> method. Return -1 if the
- // <shm_malloc_> is not initialized.
-
- ssize_t get_buf_len (const off_t off, void *&buf);
- // Convert the buffer offset <off> to absolute address to <buf>.
- // Return the size of valid information containing in the <buf>,
- // -1 if <shm_malloc_> is not initialized.
-
- int remove (void);
- // Remove the shared resouce (mmap file) used by us.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Class initializing methods to create/connect to a shared memory pool.
-
- int create_shm_malloc (const ACE_TCHAR *name,
- MALLOC_OPTIONS *options = 0);
- // Create a new shm_malloc object. Return 0 if succeed and -1
- // otherwise. This method should only be called from an acceptor
- // class that wants to create a new memory pool for inter process
- // communication.
-
- int close_shm_malloc (const int remove = 0);
- // Close down the share memory pool. If <remove> != 0, then the
- // mmap file will also get removed.
-
- MALLOC_TYPE *shm_malloc_;
- // Data exchange channel.
-
- ACE_MEM_SAP (void);
- // Constructor. Prevent this class from being instantiated.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/MEM_SAP.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_IO_H */
diff --git a/ace/MEM_SAP.i b/ace/MEM_SAP.i
deleted file mode 100644
index 697e082b114..00000000000
--- a/ace/MEM_SAP.i
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// MEM_SAP.i
-
-ASYS_INLINE
-ACE_MEM_SAP::~ACE_MEM_SAP (void)
-{
- // ACE_TRACE ("ACE_MEM_SAP::~ACE_MEM_SAP");
- delete this->shm_malloc_;
-}
-
-
-ASYS_INLINE void *
-ACE_MEM_SAP::acquire_buffer (const ssize_t size)
-{
- ACE_TRACE ("ACE_MEM_SAP::acquire_buffer");
- if (this->shm_malloc_ == 0)
- return 0; // not initialized.
-
- size_t *lptr = ACE_static_cast (size_t *,
- this->shm_malloc_->malloc (sizeof (size_t) + size));
-
- *lptr = size;
- ++lptr;
-
- return lptr;
-}
-
-ASYS_INLINE int
-ACE_MEM_SAP::release_buffer (void *buf)
-{
- ACE_TRACE ("ACE_MEM_SAP::release_buffer");
- if (this->shm_malloc_ == 0)
- return -1; // not initialized.
-
- size_t *lptr = ACE_static_cast (size_t *, buf);
-
- --lptr;
- this->shm_malloc_->free (lptr);
- return 0;
-}
-
-ASYS_INLINE off_t
-ACE_MEM_SAP::set_buf_len (void *buf, size_t n)
-{
- ACE_TRACE ("ACE_MEM_SAP::set_buf_len");
- if (this->shm_malloc_ == 0)
- return -1;
-
- size_t *lptr = ACE_static_cast (size_t *, buf);
- --lptr;
-
- if (*lptr >= n)
- *lptr = n;
-
- return ((char *) lptr - (char *) this->shm_malloc_->memory_pool ().base_addr ());
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_SAP::get_buf_len (const off_t off, void *&buf)
-{
-#if !defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- ACE_TRACE ("ACE_MEM_SAP::get_buf_len");
-#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
- if (this->shm_malloc_ == 0)
- return -1;
-
- ssize_t retv = 0;
-
- ACE_SEH_TRY
- {
- size_t *lptr = (size_t*) ((char *) this->shm_malloc_->memory_pool ().base_addr () + off);
- buf = lptr + 1;
- retv = *lptr;
- }
- ACE_SEH_EXCEPT (this->shm_malloc_->memory_pool ().seh_selector (GetExceptionInformation ()))
- {
- }
-
- return retv;
-}
-
-ASYS_INLINE int
-ACE_MEM_SAP::remove (void)
-{
- ACE_TRACE ("ACE_MEM_SAP::remove");
-
- return close_shm_malloc (1);
-}
diff --git a/ace/MEM_Stream.cpp b/ace/MEM_Stream.cpp
deleted file mode 100644
index 9e13eb1708f..00000000000
--- a/ace/MEM_Stream.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// MEM_Stream.cpp
-// $Id$
-
-#include "ace/MEM_Stream.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/MEM_Stream.i"
-#endif
-
-ACE_RCSID(ace, MEM_Stream, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_MEM_Stream)
-
-void
-ACE_MEM_Stream::dump (void) const
-{
- ACE_TRACE ("ACE_MEM_Stream::dump");
-}
-
-int
-ACE_MEM_Stream::close (void)
-{
-#if defined (ACE_WIN32)
- // We need the following call to make things work correctly on
- // Win32, which requires use to do a <close_writer> before doing the
- // close in order to avoid losing data. Note that we don't need to
- // do this on UNIX since it doesn't have this "feature". Moreover,
- // this will cause subtle problems on UNIX due to the way that
- // fork() works.
- this->close_writer ();
-#endif /* ACE_WIN32 */
- // Close down the socket.
- return ACE_SOCK::close ();
-}
diff --git a/ace/MEM_Stream.h b/ace/MEM_Stream.h
deleted file mode 100644
index 5aeff9e1190..00000000000
--- a/ace/MEM_Stream.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// MEM_Stream.h
-//
-// = AUTHOR
-// Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_MEM_STREAM_H
-#define ACE_MEM_STREAM_H
-#include "ace/pre.h"
-
-#include "ace/MEM_IO.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/INET_Addr.h"
-
-class ACE_MEM_Acceptor;
-class ACE_MEM_Connector;
-
-class ACE_Export ACE_MEM_Stream : public ACE_MEM_IO
-{
- // = TITLE
- // Defines the methods in the <ACE_MEM_Stream> abstraction.
- //
- // = DESCRIPTION
- // This adds additional wrapper methods atop the <ACE_MEM_IO>
- // class.
-public:
-
- friend class ACE_MEM_Acceptor;
- friend class ACE_MEM_Connector;
-
- // Initialization and termination methods.
- ACE_MEM_Stream (void);
- // Constructor.
-
- ACE_MEM_Stream (ACE_HANDLE h);
- // Constructor (sets the underlying <ACE_HANDLE> with <h>).
-
- ~ACE_MEM_Stream (void);
- // Destructor.
-
- //= The following two methods use write and read system calls.
- ssize_t send_n (const void *buf, int n);
- // Send n bytes, keep trying until n are sent.
- ssize_t recv_n (void *buf, int n);
- // Recv n bytes, keep trying until n are received.
-
- // = The following two methods use the send and recv system calls.
- ssize_t send_n (const void *buf, int n, int flags);
- // Send n bytes, keep trying until n are sent.
- ssize_t recv_n (void *buf, int n, int flags);
- // Recv n bytes, keep trying until n are received.
-
-/*
- ssize_t send_n (const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout);
- // Try to send exactly <len> bytes into <buf> from <handle> (uses
- // the <send> call). If <send> blocks for longer than <timeout> the
- // number of bytes actually sent is returned with <errno == ETIME>.
- // If a timeout does not occur, <send_n> return <len> (i.e., the
- // number of bytes requested to be sent).
-
- ssize_t recv_n (void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout);
- // Try to recv exactly <len> bytes into <buf> from <handle> (uses
- // the <ACE::recv_n> call). The <ACE_Time_Value> indicates how long
- // to blocking trying to receive. If <timeout> == 0, the caller
- // will block until action is possible, else will wait until the
- // relative time specified in *<timeout> elapses). If <recv> blocks
- // for longer than <timeout> the number of bytes actually read is
- // returned with <errno == ETIME>. If a timeout does not occur,
- // <recv_n> return <len> (i.e., the number of bytes requested to be
- // read).
-
- ssize_t sendv_n (const iovec iov[],
- size_t n) const;
- // Send an <iovec> of size <n> to the connected socket (uses
- // <ACE::sendv_n>). Will block until all bytes are sent or an error
- // occurs.
-
- ssize_t recvv_n (iovec iov[],
- size_t n) const;
- // Receive an <iovec> of size <n> to the connected socket.
-*/
- // = Selectively close endpoints.
- int close_reader (void);
- // Close down the reader.
- int close_writer (void);
- // Close down the writer.
-
- int close (void);
- // Close down the socket (we need this to make things work correctly
- // on Win32, which requires use to do a <close_writer> before doing
- // the close to avoid losing data).
-
- // = Meta-type info
- typedef ACE_Addr PEER_ADDR;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/MEM_Stream.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_MEM_STREAM_H */
diff --git a/ace/MEM_Stream.i b/ace/MEM_Stream.i
deleted file mode 100644
index 7aa77710e49..00000000000
--- a/ace/MEM_Stream.i
+++ /dev/null
@@ -1,176 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// MEM_Stream.i
-
-#include "ace/MEM_Stream.h"
-
-ASYS_INLINE
-ACE_MEM_Stream::ACE_MEM_Stream (void)
-{
- // ACE_TRACE ("ACE_MEM_Stream::ACE_MEM_Stream");
-}
-
-ASYS_INLINE
-ACE_MEM_Stream::ACE_MEM_Stream (ACE_HANDLE h)
-{
- // ACE_TRACE ("ACE_MEM_Stream::ACE_MEM_Stream");
- this->set_handle (h);
-}
-
-ASYS_INLINE
-ACE_MEM_Stream::~ACE_MEM_Stream (void)
-{
- // ACE_TRACE ("ACE_MEM_Stream::~ACE_MEM_Stream");
-}
-
-ASYS_INLINE int
-ACE_MEM_Stream::close_reader (void)
-{
- ACE_TRACE ("ACE_MEM_Stream::close_reader");
- if (this->get_handle () != ACE_INVALID_HANDLE)
- return ACE_OS::shutdown (this->get_handle (), 0);
- else
- return 0;
-}
-
-// Shut down just the writing end of a ACE_SOCK.
-
-ASYS_INLINE int
-ACE_MEM_Stream::close_writer (void)
-{
- ACE_TRACE ("ACE_MEM_Stream::close_writer");
- if (this->get_handle () != ACE_INVALID_HANDLE)
- return ACE_OS::shutdown (this->get_handle (), 1);
- else
- return 0;
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::send_n (const void *buf, int n)
-{
- return this->send (buf, n);
-}
-
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::recv_n (void *buf, int n)
-{
- return this->recv (buf, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::send_n (const void *buf, int n, int flags)
-{
- return this->send (buf, n, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::recv_n (void *buf, int n, int flags)
-{
- return this->recv (buf, n, flags);
-}
-
-#if 0
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::recv_n (void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_MEM_Stream::recv_n");
- return ACE::recv_n (this->get_handle (),
- buf,
- len,
- flags,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::recv_n (void *buf,
- size_t len,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_MEM_Stream::recv_n");
- return ACE::recv_n (this->get_handle (),
- buf,
- len,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::recvv_n (iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_MEM_Stream::recvv_n");
- return ACE::recvv_n (this->get_handle (),
- iov,
- n,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::send_n (const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_MEM_Stream::send_n");
- return ACE::send_n (this->get_handle (),
- buf,
- len,
- flags,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::send_n (const void *buf,
- size_t len,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_MEM_Stream::send_n");
- return ACE::send_n (this->get_handle (),
- buf,
- len,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::sendv_n (iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_MEM_Stream::sendv_n");
- return ACE::sendv_n (this->get_handle (),
- iov,
- n,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::send_urg (const void *ptr,
- size_t len,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_MEM_Stream::send_urg");
- return ACE::send (this->get_handle (),
- ptr,
- len,
- MSG_OOB,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_MEM_Stream::recv_urg (void *ptr,
- size_t len,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_MEM_Stream::recv_urg");
- return ACE::recv (this->get_handle (),
- ptr,
- len,
- MSG_OOB,
- timeout);
-}
-#endif /* 0 */
diff --git a/ace/Makefile b/ace/Makefile
deleted file mode 100644
index 3b11b2a8307..00000000000
--- a/ace/Makefile
+++ /dev/null
@@ -1,10495 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Makefile for the entire ACE release
-#----------------------------------------------------------------------------
-
-MAKEFILE = Makefile
-LIB = libACE.a
-SHLIB = libACE.$(SOEXT)
-
-OS_FILES = \
- Basic_Types \
- OS \
- OS_Dirent \
- Sched_Params
-UTILS_FILES = \
- ACE \
- Active_Map_Manager \
- Arg_Shifter \
- ARGV \
- Capabilities \
- Containers \
- Configuration \
- Dirent \
- Dynamic \
- Functor \
- Get_Opt \
- Hash_Map_Manager \
- High_Res_Timer \
- Method_Request \
- Object_Manager \
- Profile_Timer \
- Registry \
- SString \
- Stats \
- System_Time \
- Time_Request_Reply \
- Timeprobe \
- Timer_Hash \
- Timer_Heap \
- Timer_List \
- Timer_Queue \
- Timer_Wheel
- #### NOTE: see below for Filecache.
-LOGGING_FILES = \
- Dump \
- Log_Msg \
- Log_Record \
- Trace
-THREADS_FILES = \
- Activation_Queue \
- Process \
- Process_Manager \
- Synch \
- Synch_Options \
- Thread \
- Thread_Manager \
- Token
-DEMUX_FILES = \
- Event_Handler \
- FlReactor \
- Handle_Set \
- Msg_WFMO_Reactor \
- POSIX_Proactor \
- Priority_Reactor \
- Proactor \
- Reactor \
- Select_Reactor \
- Select_Reactor_Base \
- TP_Reactor \
- TkReactor \
- WFMO_Reactor \
- XtReactor \
- QtReactor
-CONNECTION_FILES = \
- Asynch_IO \
- Asynch_IO_Impl \
- POSIX_Asynch_IO \
- Strategies
-SOCKETS_FILES = \
- IPC_SAP \
- LSOCK \
- LSOCK_Acceptor \
- LSOCK_CODgram \
- LSOCK_Connector \
- LSOCK_Dgram \
- LSOCK_Stream \
- SOCK \
- SOCK_Acceptor \
- SOCK_CODgram \
- SOCK_Connector \
- SOCK_Dgram \
- SOCK_Dgram_Bcast \
- SOCK_Dgram_Mcast \
- SOCK_Dgram_Mcast_QoS \
- SOCK_IO \
- SOCK_Stream
-IPC_FILES = \
- Addr \
- ATM_Addr \
- ATM_Acceptor \
- ATM_Connector \
- ATM_Params \
- ATM_QoS \
- ATM_Stream \
- XTI_ATM_Mcast \
- DEV \
- DEV_Addr \
- DEV_Connector \
- DEV_IO \
- FIFO \
- FIFO_Recv \
- FIFO_Recv_Msg \
- FIFO_Send \
- FIFO_Send_Msg \
- FILE_Addr \
- FILE \
- FILE_Connector \
- FILE_IO \
- INET_Addr \
- IO_SAP \
- IOStream \
- Pipe \
- Signal \
- SPIPE_Addr \
- SPIPE \
- SPIPE_Acceptor \
- SPIPE_Connector \
- SPIPE_Stream \
- SV_Message \
- SV_Message_Queue \
- SV_Semaphore_Complex \
- SV_Semaphore_Simple \
- SV_Shared_Memory \
- TLI \
- TLI_Acceptor \
- TLI_Connector \
- TLI_Stream \
- TTY_IO \
- UNIX_Addr \
- UPIPE_Acceptor \
- UPIPE_Connector \
- UPIPE_Stream \
- MEM_Acceptor \
- MEM_Addr \
- MEM_Connector \
- MEM_IO \
- MEM_SAP \
- MEM_Stream
-SVCCONF_FILES = \
- DLL \
- Parse_Node \
- Service_Config \
- Service_Manager \
- Service_Object \
- Service_Repository \
- Service_Types \
- Shared_Object \
- Svc_Conf_l \
- Svc_Conf_y
-STREAMS_FILES = \
- CDR_Stream \
- Codeset_IBM1047 \
- Message_Block \
- Message_Queue \
- Task
-MEMORY_FILES = \
- Based_Pointer_Repository \
- Malloc \
- Mem_Map \
- Memory_Pool \
- Obstack \
- Read_Buffer \
- Shared_Memory \
- Shared_Memory_MM \
- Shared_Memory_SV
-TOKEN_FILES = \
- Local_Tokens \
- Remote_Tokens \
- Token_Collection \
- Token_Invariants \
- Token_Manager \
- Token_Request_Reply
-OTHER_FILES = \
- CORBA_Handler \
- CORBA_Ref \
- Local_Name_Space \
- Name_Proxy \
- Name_Request_Reply \
- Name_Space \
- Naming_Context \
- Registry_Name_Space \
- Remote_Name_Space \
- QoS_Session_Impl \
- QoS_Session_Factory \
- QoS_Manager
-
-TEMPLATE_FILES = \
- Acceptor \
- Active_Map_Manager_T \
- Asynch_Acceptor \
- Auto_IncDec_T \
- Auto_Ptr \
- Based_Pointer_T \
- Connector \
- Containers_T \
- Cache_Map_Manager_T \
- Cached_Connect_Strategy_T \
- Caching_Strategies_T \
- Caching_Utility_T \
- Cleanup_Strategies_T \
- Dump_T \
- Dynamic_Service \
- Env_Value_T \
- Event_Handler_T \
- Free_List \
- Functor_T \
- Future \
- Future_Set \
- Hash_Map_Manager_T \
- Hash_Cache_Map_Manager_T \
- IOStream_T \
- LOCK_SOCK_Acceptor \
- Local_Name_Space_T \
- Malloc_T \
- Managed_Object \
- Map_Manager \
- Map_T \
- Message_Block_T \
- Message_Queue_T \
- Module \
- Pair_T \
- RB_Tree \
- Select_Reactor_T \
- Singleton \
- Strategies_T \
- Stream \
- Stream_Modules \
- Svc_Handler \
- Synch_T \
- Task_T \
- Template_Instantiations \
- Timeprobe_T \
- Timer_Hash_T \
- Timer_Heap_T \
- Timer_List_T \
- Timer_Queue_Adapters \
- Timer_Queue_T \
- Timer_Wheel_T \
- Typed_SV_Message \
- Typed_SV_Message_Queue
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-
-ifneq ($(GHS),)
- ifeq ($(CPU),86)
- #### With Green Hills for x86 target, compile gethrtime.cpp.
- FILES += gethrtime
- LSRC += gethrtime.cpp
- endif # 86
-endif # GHS
-
-####
-#### Build customization.
-####
-ifndef ACE_COMPONENTS
- #### Please see docs/ACE-subsets.html for documentation.
- ACE_COMPONENTS = \
- OS \
- Utils \
- Logging \
- Threads \
- Demux \
- Connection \
- Sockets \
- IPC \
- Svcconf \
- Streams \
- Memory \
- Token \
- Other
-endif # ACE_COMPONENTS
-
-ifeq (FOR_TAO,$(ACE_COMPONENTS))
- #### These ACE components are necessary to support TAO.
- override ACE_COMPONENTS = \
- OS \
- Utils \
- Logging \
- Threads \
- Demux \
- Connection \
- Sockets \
- IPC \
- Svcconf \
- Streams \
- Memory
-else # ! FOR_TAO
- #### TAO doesn't need Filecache. It costs 14 Kb.
- UTILS_FILES += Filecache
-endif # ! FOR_TAO
-
-####
-#### ACE_COMPONENTS support.
-####
-ifneq (,$(findstring OS,$(ACE_COMPONENTS)))
- FILES += $(OS_FILES)
-endif # OS
-
-ifneq (,$(findstring Utils,$(ACE_COMPONENTS)))
- FILES += $(UTILS_FILES)
-endif # Utils
-
-ifneq (,$(findstring Logging,$(ACE_COMPONENTS)))
- FILES += $(LOGGING_FILES)
-endif # Logging
-
-ifneq (,$(findstring Threads,$(ACE_COMPONENTS)))
- FILES += $(THREADS_FILES)
-endif # Threads
-
-ifneq (,$(findstring Demux,$(ACE_COMPONENTS)))
- FILES += $(DEMUX_FILES)
-endif # Demux
-
-ifneq (,$(findstring Connection,$(ACE_COMPONENTS)))
- FILES += $(CONNECTION_FILES)
-endif # Connection
-
-ifneq (,$(findstring Sockets,$(ACE_COMPONENTS)))
- FILES += $(SOCKETS_FILES)
-endif # Sockets
-
-ifneq (,$(findstring IPC,$(ACE_COMPONENTS)))
- FILES += $(IPC_FILES)
-endif # IPC
-
-ifneq (,$(findstring Svcconf,$(ACE_COMPONENTS)))
- FILES += $(SVCCONF_FILES)
-else # ! Svcconf
- CCFLAGS += -DACE_LACKS_ACE_SVCCONF
-endif # ! Svcconf
-
-ifneq (,$(findstring Streams,$(ACE_COMPONENTS)))
- FILES += $(STREAMS_FILES)
-endif # Streams
-
-ifneq (,$(findstring Memory,$(ACE_COMPONENTS)))
- FILES += $(MEMORY_FILES)
-endif # Memory
-
-ifeq (,$(findstring Token,$(ACE_COMPONENTS)))
- CCFLAGS += -DACE_LACKS_ACE_TOKEN
-else # ! Token
- FILES += $(TOKEN_FILES)
-endif # ! Token
-
-ifeq (,$(findstring Other,$(ACE_COMPONENTS)))
- CCFLAGS += -DACE_LACKS_ACE_OTHER
-else # ! Other
- FILES += $(OTHER_FILES)
-endif # ! Other
-
-ifeq ($(AIX_TEMPLATE_HACK),1)
- FILES = 0_ACE_All_Src
- TEMPLATE_FILES = 0_ACE_All_Tmp
-endif
-
-#This is a hack. If the qt_reactor needs to be built we need to run
-#the moc (Meta Object Compiler) on QtReactor.h that would generate
-#QtReactor_moc.cpp. We need to compile this file and add it to the
-#library.
-ifneq ($(qt_reactor),)
- DEMUX_FILES += QtReactor_moc
-endif #qt_recator
-
-LSRC = $(addsuffix .cpp,$(FILES))
-
-BUILD += ACE_COMPONENTS
-
-#### Setting ACELIB to null allows it to be used for building shared
-#### libraries, including libACE.$(SOEXT,) on certain platforms.
-ACELIB =
-
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
-#### Disable installs in this ($(ACE_ROOT)/ace) directory, because this
-#### is the (default) destination of installs anyways. This line prevents
-#### creation of a link from the ACE library to itself when the build of
-#### the ACE library fails.
-INSTALL =
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets
-#----------------------------------------------------------------------------
-
-.PHONY: ACE_COMPONENTS
-ACE_COMPONENTS:
- @sh $(ACE_ROOT)/bin/ace_components --ace --set ' $(ACE_COMPONENTS) '
-
-realclean:
- @sh $(ACE_ROOT)/bin/ace_components --ace --remove
-
-# AIX template compilation speedup hack
-
-ACE_All: 0_ACE_All_Src.cpp 0_ACE_All_Tmp.cpp
-
-0_ACE_All_Src.h:
- @echo;
- echo > $@ "// $@";
- echo >> $@ "// This file should speed up compilation for AIX. ";
- echo >> $@ "// It includes all non-template .h-files in one batch.";
- echo >> $@ "// The .h-files #include those .i-files that are needed.";
- echo >> $@;
- for name in $(FILES); do \
- echo "#include \"$$name.h\""; \
- done >> $@;
- echo >> $@;
- echo >> $@ "// EOF";
-
-0_ACE_All_Src.cpp: 0_ACE_All_Src.h
- @echo;
- echo > $@ "// $@";
- echo >> $@ "// This file should speed up compilation for AIX. ";
- echo >> $@ "// It includes all non-template .cpp-files in one batch.";
- echo >> $@ "// The .h-files #include those .i-files that are needed.";
- echo >> $@;
- echo >> $@ "#include \"$*.h\"";
- echo >> $@;
- for name in $(FILES); do \
- echo "#include \"$$name.cpp\""; \
- done >> $@;
- echo >> $@;
- echo >> $@ "// EOF";
-
-0_ACE_All_Tmp.cpp:
- @echo;
- echo > $@ "// $@";
- echo >> $@ "// This file should speed up compilation for AIX. ";
- echo >> $@ "// It includes all _template_ .h-files in one batch. ";
- echo >> $@ "// Each of these will include any needed template";
- echo >> $@ "// implementations from .cpp- and .i-files. ";
- echo >> $@;
- for name in $(TEMPLATE_FILES); do \
- echo "#include \"$$name.cpp\""; \
- done >> $@;
- echo >> $@;
- echo >> $@ "// EOF";
-
-Svc_Conf_y.cpp: Svc_Conf.y
- if [ -f /home/cs/faculty/schmidt/bin/SunOS5/yacc ]; then \
- /home/cs/faculty/schmidt/bin/SunOS5/yacc -d Svc_Conf.y; \
- sed -e "s/char \*getenv/char *ace_foo/g" \
- -e "s/= getenv/= ACE_OS::getenv/g" \
- -e "s/yyerrlab://g" \
- -e "s/yynewerror://g" \
- -e "s/yy/ace_yy/g" \
- -e "s/YY/ACE_YY/g" \
- -e "s/y\.tab\.c/Svc_Conf_y.cpp/g" < y.tab.c > /tmp/$@; \
- cp /tmp/$@ $@; \
- patch < ../etc/Svc_Conf_y.cpp.diff; \
- echo '// $$'\I\d'$$' > Svc_Conf_Tokens.h; \
- cat y.tab.h >> Svc_Conf_Tokens.h; \
- $(RM) -f /tmp/$@ y.tab.c y.tab.h Svc_Conf_y.cpp.orig; \
- else \
- touch $@; \
- fi
-
-Svc_Conf_l.cpp: Svc_Conf.l
- if [ -f /home/cs/faculty/schmidt/bin/SunOS5/flex ]; then \
- /home/cs/faculty/schmidt/bin/SunOS5/flex -t -I Svc_Conf.l > $@; \
- sed -e "s/unistd/stdio/g" \
- -e "s/yy/ace_yy/g" \
- -e "s/YY/ACE_YY/g" \
- -e "s/free( ptr );/free( ACE_MALLOC_T (ptr) );/g" \
- -e "s/exit( 1 );/ACE_OS::exit( 1 );/g" \
- -e "s/isatty( fileno(file)/ACE_OS::isatty( fileno (file)/g" \
- -e "s/int isatty/int nop_isatty/g" \
- -e "s/realloc( ptr, size );/realloc( ACE_MALLOC_T (ptr), size );/g" \
- -e "s@#include <stdio\.h>@#include \"ace/OS.h\"@" \
- -e "s@#include <@#include /**/ <@" \
- -e "s@ECHO@ACE_SVC_CONF_ECHO@" < $@ >> /tmp/$@; \
- cp /tmp/$@ $@; \
- patch < ../etc/Svc_Conf_l.cpp.diff; \
- $(RM) -f /tmp/$@ Svc_Conf_l.cpp.orig; \
- else \
- touch $@; \
- fi
-
-# Some compilation for the QtReactor stuff. We need to run moc
-# ie. (Meta Object compiler) for our QtReactor.h. So, let me do it
-# here.
-
-ifneq ($(qt_reactor),)
-QtReactor_moc.cpp: QtReactor.h
- moc QtReactor.h >QtReactor_moc.cpp
-endif #qt_reactor
-
-ifeq ($(SUPPRESS_DASH_G),1)
-#### Build this target without -g on some platforms.
- $(COMPILE-NO_DASH_G.cc) -o $@ $<
-endif # SUPPRESS_DASH_G
-
-ifeq ($(CHORUS),1)
- ifeq ($(CC),$(GHS_DIR)/build -driver ch68)
- #### Build this target without -g, because it causes ghs 1.8.8 to core
- #### dump.
- $(VDIR)Select_Reactor.o .obj/Select_Reactor.so .shobj/Select_Reactor.o .shobj/Select_Reactor.so:
- $(COMPILE-NO_DASH_G.cc) -o $@ $<
- endif # CC
-endif # CHORUS
-
-ifneq ($(GHS),)
- ifeq ($(CPU),86)
- $(VDIR)gethrtime.$(OBJEXT):
- $(MAKE) $@ ghs=0
- endif # 86
-endif # GHS
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-
-.obj/Basic_Types.o .obj/Basic_Types.so .shobj/Basic_Types.o .shobj/Basic_Types.so: Basic_Types.cpp \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Template_Instantiations.cpp
-
-.obj/OS.o .obj/OS.so .shobj/OS.o .shobj/OS.so: OS.cpp $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/Sched_Params.i
-
-.obj/Sched_Params.o .obj/Sched_Params.so .shobj/Sched_Params.o .shobj/Sched_Params.so: Sched_Params.cpp \
- $(ACE_ROOT)/ace/Sched_Params.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Sched_Params.i
-
-.obj/ACE.o .obj/ACE.so .shobj/ACE.o .shobj/ACE.so: ACE.cpp $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Auto_Ptr.h \
- $(ACE_ROOT)/ace/Auto_Ptr.i \
- $(ACE_ROOT)/ace/Auto_Ptr.cpp \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Version.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp
-
-.obj/Active_Map_Manager.o .obj/Active_Map_Manager.so .shobj/Active_Map_Manager.o .shobj/Active_Map_Manager.so: Active_Map_Manager.cpp \
- $(ACE_ROOT)/ace/Active_Map_Manager.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Active_Map_Manager.i \
- $(ACE_ROOT)/ace/Active_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Active_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Active_Map_Manager_T.cpp
-
-.obj/Arg_Shifter.o .obj/Arg_Shifter.so .shobj/Arg_Shifter.o .shobj/Arg_Shifter.so: Arg_Shifter.cpp \
- $(ACE_ROOT)/ace/Arg_Shifter.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-.obj/ARGV.o .obj/ARGV.so .shobj/ARGV.o .shobj/ARGV.so: ARGV.cpp \
- $(ACE_ROOT)/ace/ARGV.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/ARGV.i
-
-.obj/Capabilities.o .obj/Capabilities.so .shobj/Capabilities.o .shobj/Capabilities.so: Capabilities.cpp \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Capabilities.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Capabilities.i
-
-.obj/Containers.o .obj/Containers.so .shobj/Containers.o .shobj/Containers.so: Containers.cpp \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i
-
-.obj/Configuration.o .obj/Configuration.so .shobj/Configuration.o .shobj/Configuration.so: Configuration.cpp \
- $(ACE_ROOT)/ace/Configuration.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Hash_Map_With_Allocator_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Hash_Map_With_Allocator_T.i \
- $(ACE_ROOT)/ace/Hash_Map_With_Allocator_T.cpp
-
-.obj/Dirent.o .obj/Dirent.so .shobj/Dirent.o .shobj/Dirent.so: Dirent.cpp \
- $(ACE_ROOT)/ace/Dirent.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Dirent.i
-
-.obj/Dynamic.o .obj/Dynamic.so .shobj/Dynamic.o .shobj/Dynamic.so: Dynamic.cpp \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Dynamic.i
-
-.obj/Functor.o .obj/Functor.so .shobj/Functor.o .shobj/Functor.so: Functor.cpp \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp
-
-.obj/Get_Opt.o .obj/Get_Opt.so .shobj/Get_Opt.o .shobj/Get_Opt.so: Get_Opt.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Get_Opt.i
-
-.obj/Hash_Map_Manager.o .obj/Hash_Map_Manager.so .shobj/Hash_Map_Manager.o .shobj/Hash_Map_Manager.so: Hash_Map_Manager.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h
-
-.obj/High_Res_Timer.o .obj/High_Res_Timer.so .shobj/High_Res_Timer.o .shobj/High_Res_Timer.so: High_Res_Timer.cpp \
- $(ACE_ROOT)/ace/High_Res_Timer.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/High_Res_Timer.i \
- $(ACE_ROOT)/ace/Stats.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Stats.i
-
-.obj/Method_Request.o .obj/Method_Request.so .shobj/Method_Request.o .shobj/Method_Request.so: Method_Request.cpp \
- $(ACE_ROOT)/ace/Method_Request.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-.obj/Object_Manager.o .obj/Object_Manager.so .shobj/Object_Manager.o .shobj/Object_Manager.so: Object_Manager.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Token_Manager.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Local_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Local_Tokens.i \
- $(ACE_ROOT)/ace/Token_Manager.i \
- $(ACE_ROOT)/ace/Naming_Context.h \
- $(ACE_ROOT)/ace/Name_Proxy.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Name_Request_Reply.h \
- $(ACE_ROOT)/ace/Name_Space.h \
- $(ACE_ROOT)/ace/Service_Manager.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/Service_Manager.i
-
-.obj/Profile_Timer.o .obj/Profile_Timer.so .shobj/Profile_Timer.o .shobj/Profile_Timer.so: Profile_Timer.cpp \
- $(ACE_ROOT)/ace/Profile_Timer.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/High_Res_Timer.h \
- $(ACE_ROOT)/ace/High_Res_Timer.i \
- $(ACE_ROOT)/ace/Profile_Timer.i
-
-.obj/Registry.o .obj/Registry.so .shobj/Registry.o .shobj/Registry.so: Registry.cpp \
- $(ACE_ROOT)/ace/Registry.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-.obj/SString.o .obj/SString.so .shobj/SString.o .shobj/SString.so: SString.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Auto_Ptr.h \
- $(ACE_ROOT)/ace/Auto_Ptr.i \
- $(ACE_ROOT)/ace/Auto_Ptr.cpp
-
-.obj/Stats.o .obj/Stats.so .shobj/Stats.o .shobj/Stats.so: Stats.cpp \
- $(ACE_ROOT)/ace/Stats.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Stats.i
-
-.obj/System_Time.o .obj/System_Time.so .shobj/System_Time.o .shobj/System_Time.so: System_Time.cpp \
- $(ACE_ROOT)/ace/System_Time.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i
-
-.obj/Time_Request_Reply.o .obj/Time_Request_Reply.so .shobj/Time_Request_Reply.o .shobj/Time_Request_Reply.so: Time_Request_Reply.cpp \
- $(ACE_ROOT)/ace/Time_Request_Reply.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h
-
-.obj/Timeprobe.o .obj/Timeprobe.so .shobj/Timeprobe.o .shobj/Timeprobe.so: Timeprobe.cpp \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-.obj/Timer_Hash.o .obj/Timer_Hash.so .shobj/Timer_Hash.o .shobj/Timer_Hash.so: Timer_Hash.cpp \
- $(ACE_ROOT)/ace/Timer_Hash.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Timer_Hash_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Hash_T.cpp \
- $(ACE_ROOT)/ace/High_Res_Timer.h \
- $(ACE_ROOT)/ace/High_Res_Timer.i \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
- $(ACE_ROOT)/ace/Timer_List_T.h \
- $(ACE_ROOT)/ace/Timer_List_T.cpp
-
-.obj/Timer_Heap.o .obj/Timer_Heap.so .shobj/Timer_Heap.o .shobj/Timer_Heap.so: Timer_Heap.cpp \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp
-
-.obj/Timer_List.o .obj/Timer_List.so .shobj/Timer_List.o .shobj/Timer_List.so: Timer_List.cpp \
- $(ACE_ROOT)/ace/Timer_List.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Timer_List_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_List_T.cpp
-
-.obj/Timer_Queue.o .obj/Timer_Queue.so .shobj/Timer_Queue.o .shobj/Timer_Queue.so: Timer_Queue.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp
-
-.obj/Timer_Wheel.o .obj/Timer_Wheel.so .shobj/Timer_Wheel.o .shobj/Timer_Wheel.so: Timer_Wheel.cpp \
- $(ACE_ROOT)/ace/Timer_Wheel.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Timer_Wheel_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Wheel_T.cpp \
- $(ACE_ROOT)/ace/High_Res_Timer.h \
- $(ACE_ROOT)/ace/High_Res_Timer.i
-
-.obj/Filecache.o .obj/Filecache.so .shobj/Filecache.o .shobj/Filecache.so: Filecache.cpp \
- $(ACE_ROOT)/ace/Filecache.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h
-
-.obj/Dump.o .obj/Dump.so .shobj/Dump.o .shobj/Dump.so: Dump.cpp \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Dump.h \
- $(ACE_ROOT)/ace/Dump_T.h \
- $(ACE_ROOT)/ace/Dump_T.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp
-
-.obj/Log_Msg.o .obj/Log_Msg.so .shobj/Log_Msg.o .shobj/Log_Msg.so: Log_Msg.cpp \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/SPIPE_Connector.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i \
- $(ACE_ROOT)/ace/SPIPE_Connector.i
-
-.obj/Log_Record.o .obj/Log_Record.so .shobj/Log_Record.o .shobj/Log_Record.so: Log_Record.cpp \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i
-
-.obj/Trace.o .obj/Trace.so .shobj/Trace.o .shobj/Trace.so: Trace.cpp \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-.obj/Activation_Queue.o .obj/Activation_Queue.so .shobj/Activation_Queue.o .shobj/Activation_Queue.so: Activation_Queue.cpp \
- $(ACE_ROOT)/ace/Activation_Queue.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Method_Request.h \
- $(ACE_ROOT)/ace/Activation_Queue.i
-
-.obj/Process.o .obj/Process.so .shobj/Process.o .shobj/Process.so: Process.cpp \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Process.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Process.i \
- $(ACE_ROOT)/ace/ARGV.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/ARGV.i
-
-.obj/Process_Manager.o .obj/Process_Manager.so .shobj/Process_Manager.o .shobj/Process_Manager.so: Process_Manager.cpp \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Process.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Process.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Process_Manager.h \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Process_Manager.i
-
-.obj/Synch.o .obj/Synch.so .shobj/Synch.o .shobj/Synch.so: Synch.cpp \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp
-
-.obj/Synch_Options.o .obj/Synch_Options.so .shobj/Synch_Options.o .shobj/Synch_Options.so: Synch_Options.cpp \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Synch_Options.i
-
-.obj/Thread.o .obj/Thread.so .shobj/Thread.o .shobj/Thread.so: Thread.cpp \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Thread.i
-
-.obj/Thread_Manager.o .obj/Thread_Manager.so .shobj/Thread_Manager.o .shobj/Thread_Manager.so: Thread_Manager.cpp \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Dynamic.h \
- $(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Auto_Ptr.h \
- $(ACE_ROOT)/ace/Auto_Ptr.i \
- $(ACE_ROOT)/ace/Auto_Ptr.cpp
-
-.obj/Token.o .obj/Token.so .shobj/Token.o .shobj/Token.so: Token.cpp \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Token.i
-
-.obj/Event_Handler.o .obj/Event_Handler.so .shobj/Event_Handler.o .shobj/Event_Handler.so: Event_Handler.cpp \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i
-
-.obj/FlReactor.o .obj/FlReactor.so .shobj/FlReactor.o .shobj/FlReactor.so: FlReactor.cpp \
- $(ACE_ROOT)/ace/FlReactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor_T.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Select_Reactor_T.cpp \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
- $(ACE_ROOT)/ace/Select_Reactor_T.i
-
-.obj/Handle_Set.o .obj/Handle_Set.so .shobj/Handle_Set.o .shobj/Handle_Set.so: Handle_Set.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Handle_Set.i
-
-.obj/Msg_WFMO_Reactor.o .obj/Msg_WFMO_Reactor.so .shobj/Msg_WFMO_Reactor.o .shobj/Msg_WFMO_Reactor.so: Msg_WFMO_Reactor.cpp \
- $(ACE_ROOT)/ace/Msg_WFMO_Reactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Msg_WFMO_Reactor.i
-
-.obj/POSIX_Proactor.o .obj/POSIX_Proactor.so .shobj/POSIX_Proactor.o .shobj/POSIX_Proactor.so: POSIX_Proactor.cpp \
- $(ACE_ROOT)/ace/POSIX_Proactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Proactor_Impl.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-.obj/Priority_Reactor.o .obj/Priority_Reactor.so .shobj/Priority_Reactor.o .shobj/Priority_Reactor.so: Priority_Reactor.cpp \
- $(ACE_ROOT)/ace/Priority_Reactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor_T.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.h \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Select_Reactor_T.cpp \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
- $(ACE_ROOT)/ace/Select_Reactor_T.i
-
-.obj/Proactor.o .obj/Proactor.so .shobj/Proactor.o .shobj/Proactor.so: Proactor.cpp \
- $(ACE_ROOT)/ace/Proactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Proactor_Impl.h \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.cpp
-
-.obj/Reactor.o .obj/Reactor.so .shobj/Reactor.o .shobj/Reactor.so: Reactor.cpp \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Msg_WFMO_Reactor.h \
- $(ACE_ROOT)/ace/Msg_WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor_T.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.h \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Select_Reactor_Base.i \
- $(ACE_ROOT)/ace/Select_Reactor_T.cpp \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
- $(ACE_ROOT)/ace/Select_Reactor_T.i \
- $(ACE_ROOT)/ace/TP_Reactor.h \
- $(ACE_ROOT)/ace/TP_Reactor.i
-
-.obj/Select_Reactor.o .obj/Select_Reactor.so .shobj/Select_Reactor.o .shobj/Select_Reactor.so: Select_Reactor.cpp \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Select_Reactor_T.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Select_Reactor_T.cpp \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
- $(ACE_ROOT)/ace/Select_Reactor_T.i
-
-.obj/Select_Reactor_Base.o .obj/Select_Reactor_Base.so .shobj/Select_Reactor_Base.o .shobj/Select_Reactor_Base.so: Select_Reactor_Base.cpp \
- $(ACE_ROOT)/ace/Select_Reactor_Base.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp
-
-.obj/TP_Reactor.o .obj/TP_Reactor.so .shobj/TP_Reactor.o .shobj/TP_Reactor.so: TP_Reactor.cpp \
- $(ACE_ROOT)/ace/TP_Reactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor_T.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Select_Reactor_T.cpp \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
- $(ACE_ROOT)/ace/Select_Reactor_T.i \
- $(ACE_ROOT)/ace/TP_Reactor.i
-
-.obj/TkReactor.o .obj/TkReactor.so .shobj/TkReactor.o .shobj/TkReactor.so: TkReactor.cpp \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/TkReactor.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor_T.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Select_Reactor_T.cpp \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
- $(ACE_ROOT)/ace/Select_Reactor_T.i
-
-.obj/WFMO_Reactor.o .obj/WFMO_Reactor.so .shobj/WFMO_Reactor.o .shobj/WFMO_Reactor.so: WFMO_Reactor.cpp \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp
-
-.obj/XtReactor.o .obj/XtReactor.so .shobj/XtReactor.o .shobj/XtReactor.so: XtReactor.cpp \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/XtReactor.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor_T.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Select_Reactor_T.cpp \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
- $(ACE_ROOT)/ace/Select_Reactor_T.i
-
-.obj/QtReactor.o .obj/QtReactor.so .shobj/QtReactor.o .shobj/QtReactor.so: QtReactor.cpp \
- $(ACE_ROOT)/ace/QtReactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Select_Reactor.h \
- $(ACE_ROOT)/ace/Select_Reactor_T.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Token.h \
- $(ACE_ROOT)/ace/Token.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Select_Reactor_Base.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Select_Reactor_T.cpp \
- $(ACE_ROOT)/ace/Timer_Heap.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.h \
- $(ACE_ROOT)/ace/Timer_Heap_T.cpp \
- $(ACE_ROOT)/ace/Select_Reactor_T.i
-
-.obj/Asynch_IO.o .obj/Asynch_IO.so .shobj/Asynch_IO.o .shobj/Asynch_IO.so: Asynch_IO.cpp \
- $(ACE_ROOT)/ace/Asynch_IO.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-.obj/Asynch_IO_Impl.o .obj/Asynch_IO_Impl.so .shobj/Asynch_IO_Impl.o .shobj/Asynch_IO_Impl.so: Asynch_IO_Impl.cpp \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Asynch_IO_Impl.h
-
-.obj/POSIX_Asynch_IO.o .obj/POSIX_Asynch_IO.so .shobj/POSIX_Asynch_IO.o .shobj/POSIX_Asynch_IO.so: POSIX_Asynch_IO.cpp \
- $(ACE_ROOT)/ace/POSIX_Asynch_IO.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-.obj/Strategies.o .obj/Strategies.so .shobj/Strategies.o .shobj/Strategies.so: Strategies.cpp \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i
-
-.obj/IPC_SAP.o .obj/IPC_SAP.so .shobj/IPC_SAP.o .shobj/IPC_SAP.so: IPC_SAP.cpp \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i
-
-.obj/LSOCK.o .obj/LSOCK.so .shobj/LSOCK.o .shobj/LSOCK.so: LSOCK.cpp \
- $(ACE_ROOT)/ace/LSOCK.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/LSOCK.i
-
-.obj/LSOCK_Acceptor.o .obj/LSOCK_Acceptor.so .shobj/LSOCK_Acceptor.o .shobj/LSOCK_Acceptor.so: LSOCK_Acceptor.cpp \
- $(ACE_ROOT)/ace/LSOCK_Acceptor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/UNIX_Addr.h \
- $(ACE_ROOT)/ace/UNIX_Addr.i \
- $(ACE_ROOT)/ace/LSOCK_Stream.h \
- $(ACE_ROOT)/ace/LSOCK.h \
- $(ACE_ROOT)/ace/LSOCK.i \
- $(ACE_ROOT)/ace/LSOCK_Stream.i
-
-.obj/LSOCK_CODgram.o .obj/LSOCK_CODgram.so .shobj/LSOCK_CODgram.o .shobj/LSOCK_CODgram.so: LSOCK_CODgram.cpp \
- $(ACE_ROOT)/ace/LSOCK_CODgram.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/LSOCK.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/LSOCK.i \
- $(ACE_ROOT)/ace/SOCK_CODgram.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_CODgram.i \
- $(ACE_ROOT)/ace/LSOCK_CODgram.i
-
-.obj/LSOCK_Connector.o .obj/LSOCK_Connector.so .shobj/LSOCK_Connector.o .shobj/LSOCK_Connector.so: LSOCK_Connector.cpp \
- $(ACE_ROOT)/ace/LSOCK_Connector.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/LSOCK_Stream.h \
- $(ACE_ROOT)/ace/UNIX_Addr.h \
- $(ACE_ROOT)/ace/UNIX_Addr.i \
- $(ACE_ROOT)/ace/LSOCK.h \
- $(ACE_ROOT)/ace/LSOCK.i \
- $(ACE_ROOT)/ace/LSOCK_Stream.i \
- $(ACE_ROOT)/ace/LSOCK_Connector.i
-
-.obj/LSOCK_Dgram.o .obj/LSOCK_Dgram.so .shobj/LSOCK_Dgram.o .shobj/LSOCK_Dgram.so: LSOCK_Dgram.cpp \
- $(ACE_ROOT)/ace/LSOCK_Dgram.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/ace/LSOCK.h \
- $(ACE_ROOT)/ace/LSOCK.i \
- $(ACE_ROOT)/ace/LSOCK_Dgram.i
-
-.obj/LSOCK_Stream.o .obj/LSOCK_Stream.so .shobj/LSOCK_Stream.o .shobj/LSOCK_Stream.so: LSOCK_Stream.cpp \
- $(ACE_ROOT)/ace/LSOCK_Stream.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/UNIX_Addr.h \
- $(ACE_ROOT)/ace/UNIX_Addr.i \
- $(ACE_ROOT)/ace/LSOCK.h \
- $(ACE_ROOT)/ace/LSOCK.i \
- $(ACE_ROOT)/ace/LSOCK_Stream.i
-
-.obj/SOCK.o .obj/SOCK.so .shobj/SOCK.o .shobj/SOCK.so: SOCK.cpp \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i
-
-.obj/SOCK_Acceptor.o .obj/SOCK_Acceptor.so .shobj/SOCK_Acceptor.o .shobj/SOCK_Acceptor.so: SOCK_Acceptor.cpp \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp
-
-.obj/SOCK_CODgram.o .obj/SOCK_CODgram.so .shobj/SOCK_CODgram.o .shobj/SOCK_CODgram.so: SOCK_CODgram.cpp \
- $(ACE_ROOT)/ace/SOCK_CODgram.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_CODgram.i
-
-.obj/SOCK_Connector.o .obj/SOCK_Connector.so .shobj/SOCK_Connector.o .shobj/SOCK_Connector.so: SOCK_Connector.cpp \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i
-
-.obj/SOCK_Dgram.o .obj/SOCK_Dgram.so .shobj/SOCK_Dgram.o .shobj/SOCK_Dgram.so: SOCK_Dgram.cpp \
- $(ACE_ROOT)/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp
-
-.obj/SOCK_Dgram_Bcast.o .obj/SOCK_Dgram_Bcast.so .shobj/SOCK_Dgram_Bcast.o .shobj/SOCK_Dgram_Bcast.so: SOCK_Dgram_Bcast.cpp \
- $(ACE_ROOT)/ace/SOCK_Dgram_Bcast.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/ace/SOCK_Dgram_Bcast.i
-
-.obj/SOCK_Dgram_Mcast.o .obj/SOCK_Dgram_Mcast.so .shobj/SOCK_Dgram_Mcast.o .shobj/SOCK_Dgram_Mcast.so: SOCK_Dgram_Mcast.cpp \
- $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i
-
-.obj/SOCK_Dgram_Mcast_QoS.o .obj/SOCK_Dgram_Mcast_QoS.so .shobj/SOCK_Dgram_Mcast_QoS.o .shobj/SOCK_Dgram_Mcast_QoS.so: SOCK_Dgram_Mcast_QoS.cpp \
- $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_QoS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \
- $(ACE_ROOT)/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.i \
- $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_QoS.i
-
-.obj/SOCK_IO.o .obj/SOCK_IO.so .shobj/SOCK_IO.o .shobj/SOCK_IO.so: SOCK_IO.cpp \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i
-
-.obj/SOCK_Stream.o .obj/SOCK_Stream.so .shobj/SOCK_Stream.o .shobj/SOCK_Stream.so: SOCK_Stream.cpp \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i
-
-.obj/Addr.o .obj/Addr.so .shobj/Addr.o .shobj/Addr.so: Addr.cpp \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.i
-
-.obj/ATM_Addr.o .obj/ATM_Addr.so .shobj/ATM_Addr.o .shobj/ATM_Addr.so: ATM_Addr.cpp \
- $(ACE_ROOT)/ace/ATM_Addr.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/ATM_Addr.i
-
-.obj/ATM_Acceptor.o .obj/ATM_Acceptor.so .shobj/ATM_Acceptor.o .shobj/ATM_Acceptor.so: ATM_Acceptor.cpp \
- $(ACE_ROOT)/ace/ATM_Acceptor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ATM_Stream.h \
- $(ACE_ROOT)/ace/ATM_Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/ATM_Addr.i \
- $(ACE_ROOT)/ace/ATM_Params.h \
- $(ACE_ROOT)/ace/ATM_QoS.h
-
-.obj/ATM_Connector.o .obj/ATM_Connector.so .shobj/ATM_Connector.o .shobj/ATM_Connector.so: ATM_Connector.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/ATM_Connector.h \
- $(ACE_ROOT)/ace/ATM_Stream.h \
- $(ACE_ROOT)/ace/ATM_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/ATM_Addr.i \
- $(ACE_ROOT)/ace/ATM_Params.h \
- $(ACE_ROOT)/ace/ATM_QoS.h
-
-.obj/ATM_Params.o .obj/ATM_Params.so .shobj/ATM_Params.o .shobj/ATM_Params.so: ATM_Params.cpp \
- $(ACE_ROOT)/ace/ATM_Params.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i
-
-.obj/ATM_QoS.o .obj/ATM_QoS.so .shobj/ATM_QoS.o .shobj/ATM_QoS.so: ATM_QoS.cpp \
- $(ACE_ROOT)/ace/ATM_QoS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i
-
-.obj/ATM_Stream.o .obj/ATM_Stream.so .shobj/ATM_Stream.o .shobj/ATM_Stream.so: ATM_Stream.cpp \
- $(ACE_ROOT)/ace/ATM_Stream.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ATM_Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/ATM_Addr.i \
- $(ACE_ROOT)/ace/ATM_Params.h
-
-.obj/XTI_ATM_Mcast.o .obj/XTI_ATM_Mcast.so .shobj/XTI_ATM_Mcast.o .shobj/XTI_ATM_Mcast.so: XTI_ATM_Mcast.cpp \
- $(ACE_ROOT)/ace/XTI_ATM_Mcast.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/TLI_Connector.h \
- $(ACE_ROOT)/ace/TLI_Stream.h \
- $(ACE_ROOT)/ace/TLI.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/TLI.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/TLI_Stream.i \
- $(ACE_ROOT)/ace/TLI_Connector.i \
- $(ACE_ROOT)/ace/ATM_Addr.h \
- $(ACE_ROOT)/ace/ATM_Addr.i
-
-.obj/DEV.o .obj/DEV.so .shobj/DEV.o .shobj/DEV.so: DEV.cpp $(ACE_ROOT)/ace/DEV.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/IO_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IO_SAP.i \
- $(ACE_ROOT)/ace/DEV_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/DEV_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/DEV.i
-
-.obj/DEV_Addr.o .obj/DEV_Addr.so .shobj/DEV_Addr.o .shobj/DEV_Addr.so: DEV_Addr.cpp \
- $(ACE_ROOT)/ace/DEV_Addr.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/DEV_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h
-
-.obj/DEV_Connector.o .obj/DEV_Connector.so .shobj/DEV_Connector.o .shobj/DEV_Connector.so: DEV_Connector.cpp \
- $(ACE_ROOT)/ace/DEV_Connector.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/DEV_IO.h \
- $(ACE_ROOT)/ace/DEV.h \
- $(ACE_ROOT)/ace/IO_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IO_SAP.i \
- $(ACE_ROOT)/ace/DEV_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/DEV_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/DEV.i \
- $(ACE_ROOT)/ace/DEV_IO.i \
- $(ACE_ROOT)/ace/DEV_Connector.i
-
-.obj/DEV_IO.o .obj/DEV_IO.so .shobj/DEV_IO.o .shobj/DEV_IO.so: DEV_IO.cpp \
- $(ACE_ROOT)/ace/DEV_IO.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/DEV.h \
- $(ACE_ROOT)/ace/IO_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IO_SAP.i \
- $(ACE_ROOT)/ace/DEV_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/DEV_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/DEV.i \
- $(ACE_ROOT)/ace/DEV_IO.i
-
-.obj/FIFO.o .obj/FIFO.so .shobj/FIFO.o .shobj/FIFO.so: FIFO.cpp \
- $(ACE_ROOT)/ace/FIFO.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/FIFO.i
-
-.obj/FIFO_Recv.o .obj/FIFO_Recv.so .shobj/FIFO_Recv.o .shobj/FIFO_Recv.so: FIFO_Recv.cpp \
- $(ACE_ROOT)/ace/FIFO_Recv.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/FIFO.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/FIFO.i \
- $(ACE_ROOT)/ace/FIFO_Recv.i
-
-.obj/FIFO_Recv_Msg.o .obj/FIFO_Recv_Msg.so .shobj/FIFO_Recv_Msg.o .shobj/FIFO_Recv_Msg.so: FIFO_Recv_Msg.cpp \
- $(ACE_ROOT)/ace/FIFO_Recv_Msg.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/FIFO_Recv.h \
- $(ACE_ROOT)/ace/FIFO.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/FIFO.i \
- $(ACE_ROOT)/ace/FIFO_Recv.i \
- $(ACE_ROOT)/ace/FIFO_Recv_Msg.i
-
-.obj/FIFO_Send.o .obj/FIFO_Send.so .shobj/FIFO_Send.o .shobj/FIFO_Send.so: FIFO_Send.cpp \
- $(ACE_ROOT)/ace/FIFO_Send.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/FIFO.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/FIFO.i \
- $(ACE_ROOT)/ace/FIFO_Send.i
-
-.obj/FIFO_Send_Msg.o .obj/FIFO_Send_Msg.so .shobj/FIFO_Send_Msg.o .shobj/FIFO_Send_Msg.so: FIFO_Send_Msg.cpp \
- $(ACE_ROOT)/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/FIFO_Send.h \
- $(ACE_ROOT)/ace/FIFO.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/FIFO.i \
- $(ACE_ROOT)/ace/FIFO_Send.i \
- $(ACE_ROOT)/ace/FIFO_Send_Msg.i
-
-.obj/FILE_Addr.o .obj/FILE_Addr.so .shobj/FILE_Addr.o .shobj/FILE_Addr.so: FILE_Addr.cpp \
- $(ACE_ROOT)/ace/FILE_Addr.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/FILE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h
-
-.obj/FILE.o .obj/FILE.so .shobj/FILE.o .shobj/FILE.so: FILE.cpp \
- $(ACE_ROOT)/ace/FILE.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/IO_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IO_SAP.i \
- $(ACE_ROOT)/ace/FILE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/FILE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/FILE.i
-
-.obj/FILE_Connector.o .obj/FILE_Connector.so .shobj/FILE_Connector.o .shobj/FILE_Connector.so: FILE_Connector.cpp \
- $(ACE_ROOT)/ace/FILE_Connector.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/FILE_IO.h \
- $(ACE_ROOT)/ace/FILE.h \
- $(ACE_ROOT)/ace/IO_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IO_SAP.i \
- $(ACE_ROOT)/ace/FILE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/FILE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/FILE.i \
- $(ACE_ROOT)/ace/FILE_IO.i \
- $(ACE_ROOT)/ace/FILE_Connector.i
-
-.obj/FILE_IO.o .obj/FILE_IO.so .shobj/FILE_IO.o .shobj/FILE_IO.so: FILE_IO.cpp \
- $(ACE_ROOT)/ace/FILE_IO.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/FILE.h \
- $(ACE_ROOT)/ace/IO_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IO_SAP.i \
- $(ACE_ROOT)/ace/FILE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/FILE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/FILE.i \
- $(ACE_ROOT)/ace/FILE_IO.i
-
-.obj/INET_Addr.o .obj/INET_Addr.so .shobj/INET_Addr.o .shobj/INET_Addr.so: INET_Addr.cpp \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i
-
-.obj/IO_SAP.o .obj/IO_SAP.so .shobj/IO_SAP.o .shobj/IO_SAP.so: IO_SAP.cpp \
- $(ACE_ROOT)/ace/IO_SAP.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IO_SAP.i
-
-.obj/IOStream.o .obj/IOStream.so .shobj/IOStream.o .shobj/IOStream.so: IOStream.cpp \
- $(ACE_ROOT)/ace/IOStream.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/IOStream_T.h \
- $(ACE_ROOT)/ace/IOStream_T.i \
- $(ACE_ROOT)/ace/IOStream_T.cpp
-
-.obj/Pipe.o .obj/Pipe.so .shobj/Pipe.o .shobj/Pipe.so: Pipe.cpp \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i
-
-.obj/Signal.o .obj/Signal.so .shobj/Signal.o .shobj/Signal.so: Signal.cpp \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i
-
-.obj/SPIPE_Addr.o .obj/SPIPE_Addr.so .shobj/SPIPE_Addr.o .shobj/SPIPE_Addr.so: SPIPE_Addr.cpp \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h
-
-.obj/SPIPE.o .obj/SPIPE.so .shobj/SPIPE.o .shobj/SPIPE.so: SPIPE.cpp \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE.i
-
-.obj/SPIPE_Acceptor.o .obj/SPIPE_Acceptor.so .shobj/SPIPE_Acceptor.o .shobj/SPIPE_Acceptor.so: SPIPE_Acceptor.cpp \
- $(ACE_ROOT)/ace/SPIPE_Acceptor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i
-
-.obj/SPIPE_Connector.o .obj/SPIPE_Connector.so .shobj/SPIPE_Connector.o .shobj/SPIPE_Connector.so: SPIPE_Connector.cpp \
- $(ACE_ROOT)/ace/SPIPE_Connector.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i \
- $(ACE_ROOT)/ace/SPIPE_Connector.i
-
-.obj/SPIPE_Stream.o .obj/SPIPE_Stream.so .shobj/SPIPE_Stream.o .shobj/SPIPE_Stream.so: SPIPE_Stream.cpp \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i
-
-.obj/SV_Message.o .obj/SV_Message.so .shobj/SV_Message.o .shobj/SV_Message.so: SV_Message.cpp \
- $(ACE_ROOT)/ace/SV_Message.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Message.i
-
-.obj/SV_Message_Queue.o .obj/SV_Message_Queue.so .shobj/SV_Message_Queue.o .shobj/SV_Message_Queue.so: SV_Message_Queue.cpp \
- $(ACE_ROOT)/ace/SV_Message_Queue.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Message.h \
- $(ACE_ROOT)/ace/SV_Message.i \
- $(ACE_ROOT)/ace/SV_Message_Queue.i
-
-.obj/SV_Semaphore_Complex.o .obj/SV_Semaphore_Complex.so .shobj/SV_Semaphore_Complex.o .shobj/SV_Semaphore_Complex.so: SV_Semaphore_Complex.cpp \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i
-
-.obj/SV_Semaphore_Simple.o .obj/SV_Semaphore_Simple.so .shobj/SV_Semaphore_Simple.o .shobj/SV_Semaphore_Simple.so: SV_Semaphore_Simple.cpp \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i
-
-.obj/SV_Shared_Memory.o .obj/SV_Shared_Memory.so .shobj/SV_Shared_Memory.o .shobj/SV_Shared_Memory.so: SV_Shared_Memory.cpp \
- $(ACE_ROOT)/ace/SV_Shared_Memory.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Shared_Memory.i
-
-.obj/TLI.o .obj/TLI.so .shobj/TLI.o .shobj/TLI.so: TLI.cpp $(ACE_ROOT)/ace/TLI.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/TLI.i
-
-.obj/TLI_Acceptor.o .obj/TLI_Acceptor.so .shobj/TLI_Acceptor.o .shobj/TLI_Acceptor.so: TLI_Acceptor.cpp \
- $(ACE_ROOT)/ace/TLI_Acceptor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/TLI.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/TLI.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/TLI_Stream.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/TLI_Stream.i
-
-.obj/TLI_Connector.o .obj/TLI_Connector.so .shobj/TLI_Connector.o .shobj/TLI_Connector.so: TLI_Connector.cpp \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/TLI_Connector.h \
- $(ACE_ROOT)/ace/TLI_Stream.h \
- $(ACE_ROOT)/ace/TLI.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/TLI.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/TLI_Stream.i \
- $(ACE_ROOT)/ace/TLI_Connector.i
-
-.obj/TLI_Stream.o .obj/TLI_Stream.so .shobj/TLI_Stream.o .shobj/TLI_Stream.so: TLI_Stream.cpp \
- $(ACE_ROOT)/ace/TLI_Stream.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/TLI.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/TLI.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/TLI_Stream.i
-
-.obj/TTY_IO.o .obj/TTY_IO.so .shobj/TTY_IO.o .shobj/TTY_IO.so: TTY_IO.cpp \
- $(ACE_ROOT)/ace/TTY_IO.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/DEV_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/DEV_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/DEV_Connector.h \
- $(ACE_ROOT)/ace/DEV_IO.h \
- $(ACE_ROOT)/ace/DEV.h \
- $(ACE_ROOT)/ace/IO_SAP.h \
- $(ACE_ROOT)/ace/IO_SAP.i \
- $(ACE_ROOT)/ace/DEV.i \
- $(ACE_ROOT)/ace/DEV_IO.i \
- $(ACE_ROOT)/ace/DEV_Connector.i
-
-.obj/UNIX_Addr.o .obj/UNIX_Addr.so .shobj/UNIX_Addr.o .shobj/UNIX_Addr.so: UNIX_Addr.cpp \
- $(ACE_ROOT)/ace/UNIX_Addr.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/UNIX_Addr.i
-
-.obj/UPIPE_Acceptor.o .obj/UPIPE_Acceptor.so .shobj/UPIPE_Acceptor.o .shobj/UPIPE_Acceptor.so: UPIPE_Acceptor.cpp \
- $(ACE_ROOT)/ace/UPIPE_Acceptor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/UPIPE_Stream.h \
- $(ACE_ROOT)/ace/Stream.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.cpp \
- $(ACE_ROOT)/ace/Stream.i \
- $(ACE_ROOT)/ace/Stream.cpp \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/UPIPE_Addr.h \
- $(ACE_ROOT)/ace/UPIPE_Stream.i \
- $(ACE_ROOT)/ace/SPIPE_Acceptor.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.i \
- $(ACE_ROOT)/ace/UPIPE_Acceptor.i
-
-.obj/UPIPE_Connector.o .obj/UPIPE_Connector.so .shobj/UPIPE_Connector.o .shobj/UPIPE_Connector.so: UPIPE_Connector.cpp \
- $(ACE_ROOT)/ace/UPIPE_Connector.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/UPIPE_Stream.h \
- $(ACE_ROOT)/ace/Stream.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.cpp \
- $(ACE_ROOT)/ace/Stream.i \
- $(ACE_ROOT)/ace/Stream.cpp \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/UPIPE_Addr.h \
- $(ACE_ROOT)/ace/UPIPE_Stream.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.i \
- $(ACE_ROOT)/ace/UPIPE_Connector.i
-
-.obj/UPIPE_Stream.o .obj/UPIPE_Stream.so .shobj/UPIPE_Stream.o .shobj/UPIPE_Stream.so: UPIPE_Stream.cpp \
- $(ACE_ROOT)/ace/UPIPE_Stream.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Stream.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.cpp \
- $(ACE_ROOT)/ace/Stream.i \
- $(ACE_ROOT)/ace/Stream.cpp \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/UPIPE_Addr.h \
- $(ACE_ROOT)/ace/UPIPE_Stream.i
-
-.obj/MEM_Acceptor.o .obj/MEM_Acceptor.so .shobj/MEM_Acceptor.o .shobj/MEM_Acceptor.so: MEM_Acceptor.cpp \
- $(ACE_ROOT)/ace/MEM_Acceptor.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/MEM_Stream.h \
- $(ACE_ROOT)/ace/MEM_IO.h \
- $(ACE_ROOT)/ace/MEM_SAP.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/MEM_SAP.i \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/MEM_IO.i \
- $(ACE_ROOT)/ace/MEM_Stream.i \
- $(ACE_ROOT)/ace/MEM_Addr.h \
- $(ACE_ROOT)/ace/MEM_Addr.i \
- $(ACE_ROOT)/ace/MEM_Acceptor.i
-
-.obj/MEM_Addr.o .obj/MEM_Addr.so .shobj/MEM_Addr.o .shobj/MEM_Addr.so: MEM_Addr.cpp \
- $(ACE_ROOT)/ace/MEM_Addr.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/MEM_Addr.i
-
-.obj/MEM_Connector.o .obj/MEM_Connector.so .shobj/MEM_Connector.o .shobj/MEM_Connector.so: MEM_Connector.cpp \
- $(ACE_ROOT)/ace/MEM_Connector.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/MEM_Stream.h \
- $(ACE_ROOT)/ace/MEM_IO.h \
- $(ACE_ROOT)/ace/MEM_SAP.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/MEM_SAP.i \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/MEM_IO.i \
- $(ACE_ROOT)/ace/MEM_Stream.i \
- $(ACE_ROOT)/ace/MEM_Addr.h \
- $(ACE_ROOT)/ace/MEM_Addr.i \
- $(ACE_ROOT)/ace/MEM_Connector.i
-
-.obj/MEM_IO.o .obj/MEM_IO.so .shobj/MEM_IO.o .shobj/MEM_IO.so: MEM_IO.cpp \
- $(ACE_ROOT)/ace/MEM_IO.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/MEM_SAP.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/MEM_SAP.i \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/MEM_IO.i \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i
-
-.obj/MEM_SAP.o .obj/MEM_SAP.so .shobj/MEM_SAP.o .shobj/MEM_SAP.so: MEM_SAP.cpp \
- $(ACE_ROOT)/ace/MEM_SAP.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/MEM_SAP.i
-
-.obj/MEM_Stream.o .obj/MEM_Stream.so .shobj/MEM_Stream.o .shobj/MEM_Stream.so: MEM_Stream.cpp \
- $(ACE_ROOT)/ace/MEM_Stream.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/MEM_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/MEM_SAP.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/MEM_SAP.i \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/MEM_IO.i \
- $(ACE_ROOT)/ace/MEM_Stream.i
-
-.obj/DLL.o .obj/DLL.so .shobj/DLL.o .shobj/DLL.so: DLL.cpp $(ACE_ROOT)/ace/DLL.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i
-
-.obj/Parse_Node.o .obj/Parse_Node.so .shobj/Parse_Node.o .shobj/Parse_Node.so: Parse_Node.cpp \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.cpp \
- $(ACE_ROOT)/ace/Parse_Node.h \
- $(ACE_ROOT)/ace/Parse_Node.i
-
-.obj/Service_Config.o .obj/Service_Config.so .shobj/Service_Config.o .shobj/Service_Config.so: Service_Config.cpp \
- $(ACE_ROOT)/ace/Svc_Conf.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Obstack.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Obstack.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Parse_Node.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Parse_Node.i \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/ARGV.h \
- $(ACE_ROOT)/ace/ARGV.i \
- $(ACE_ROOT)/ace/Service_Manager.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/Service_Manager.i \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/Auto_Ptr.h \
- $(ACE_ROOT)/ace/Auto_Ptr.i \
- $(ACE_ROOT)/ace/Auto_Ptr.cpp \
- $(ACE_ROOT)/ace/Proactor.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i
-
-.obj/Service_Manager.o .obj/Service_Manager.so .shobj/Service_Manager.o .shobj/Service_Manager.so: Service_Manager.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Service_Manager.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/ace/Service_Manager.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.i
-
-.obj/Service_Object.o .obj/Service_Object.so .shobj/Service_Object.o .shobj/Service_Object.so: Service_Object.cpp \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Service_Types.i
-
-.obj/Service_Repository.o .obj/Service_Repository.so .shobj/Service_Repository.o .shobj/Service_Repository.so: Service_Repository.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp
-
-.obj/Service_Types.o .obj/Service_Types.so .shobj/Service_Types.o .shobj/Service_Types.so: Service_Types.cpp \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.cpp \
- $(ACE_ROOT)/ace/Stream.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/Stream.i \
- $(ACE_ROOT)/ace/Stream.cpp
-
-.obj/Shared_Object.o .obj/Shared_Object.so .shobj/Shared_Object.o .shobj/Shared_Object.so: Shared_Object.cpp \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Shared_Object.i
-
-.obj/Svc_Conf_l.o .obj/Svc_Conf_l.so .shobj/Svc_Conf_l.o .shobj/Svc_Conf_l.so: Svc_Conf_l.cpp \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Svc_Conf.h \
- $(ACE_ROOT)/ace/Obstack.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Obstack.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Parse_Node.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Parse_Node.i
-
-.obj/Svc_Conf_y.o .obj/Svc_Conf_y.so .shobj/Svc_Conf_y.o .shobj/Svc_Conf_y.so: Svc_Conf_y.cpp \
- $(ACE_ROOT)/ace/ARGV.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/ARGV.i \
- $(ACE_ROOT)/ace/Svc_Conf.h \
- $(ACE_ROOT)/ace/Obstack.h \
- $(ACE_ROOT)/ace/Obstack.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Parse_Node.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Parse_Node.i \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.cpp \
- $(ACE_ROOT)/ace/Stream.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/Stream.i \
- $(ACE_ROOT)/ace/Stream.cpp
-
-.obj/CDR_Stream.o .obj/CDR_Stream.so .shobj/CDR_Stream.o .shobj/CDR_Stream.so: CDR_Stream.cpp \
- $(ACE_ROOT)/ace/CDR_Stream.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/CDR_Stream.i
-
-.obj/Codeset_IBM1047.o .obj/Codeset_IBM1047.so .shobj/Codeset_IBM1047.o .shobj/Codeset_IBM1047.so: Codeset_IBM1047.cpp \
- $(ACE_ROOT)/ace/Codeset_IBM1047.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h
-
-.obj/Message_Block.o .obj/Message_Block.so .shobj/Message_Block.o .shobj/Message_Block.so: Message_Block.cpp \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/Timeprobe.h
-
-.obj/Message_Queue.o .obj/Message_Queue.so .shobj/Message_Queue.o .shobj/Message_Queue.so: Message_Queue.cpp \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i
-
-.obj/Task.o .obj/Task.so .shobj/Task.o .shobj/Task.so: Task.cpp \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Strategies_T.i \
- $(ACE_ROOT)/ace/Strategies_T.cpp \
- $(ACE_ROOT)/ace/Service_Repository.h \
- $(ACE_ROOT)/ace/Service_Types.h \
- $(ACE_ROOT)/ace/Service_Types.i \
- $(ACE_ROOT)/ace/Service_Repository.i \
- $(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(ACE_ROOT)/ace/Strategies.i \
- $(ACE_ROOT)/ace/Message_Queue.i \
- $(ACE_ROOT)/ace/Task_T.i \
- $(ACE_ROOT)/ace/Task_T.cpp \
- $(ACE_ROOT)/ace/Module.h \
- $(ACE_ROOT)/ace/Module.i \
- $(ACE_ROOT)/ace/Module.cpp \
- $(ACE_ROOT)/ace/Stream_Modules.h \
- $(ACE_ROOT)/ace/Stream_Modules.cpp
-
-.obj/Based_Pointer_Repository.o .obj/Based_Pointer_Repository.so .shobj/Based_Pointer_Repository.o .shobj/Based_Pointer_Repository.so: Based_Pointer_Repository.cpp \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h
-
-.obj/Malloc.o .obj/Malloc.so .shobj/Malloc.o .shobj/Malloc.so: Malloc.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i
-
-.obj/Mem_Map.o .obj/Mem_Map.so .shobj/Mem_Map.o .shobj/Mem_Map.so: Mem_Map.cpp \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Mem_Map.i
-
-.obj/Memory_Pool.o .obj/Memory_Pool.so .shobj/Memory_Pool.o .shobj/Memory_Pool.so: Memory_Pool.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Auto_Ptr.h \
- $(ACE_ROOT)/ace/Auto_Ptr.i \
- $(ACE_ROOT)/ace/Auto_Ptr.cpp
-
-.obj/Obstack.o .obj/Obstack.so .shobj/Obstack.o .shobj/Obstack.so: Obstack.cpp \
- $(ACE_ROOT)/ace/Obstack.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Obstack.i
-
-.obj/Read_Buffer.o .obj/Read_Buffer.so .shobj/Read_Buffer.o .shobj/Read_Buffer.so: Read_Buffer.cpp \
- $(ACE_ROOT)/ace/Read_Buffer.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Read_Buffer.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h
-
-.obj/Shared_Memory.o .obj/Shared_Memory.so .shobj/Shared_Memory.o .shobj/Shared_Memory.so: Shared_Memory.cpp \
- $(ACE_ROOT)/ace/Shared_Memory.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i
-
-.obj/Shared_Memory_MM.o .obj/Shared_Memory_MM.so .shobj/Shared_Memory_MM.o .shobj/Shared_Memory_MM.so: Shared_Memory_MM.cpp \
- $(ACE_ROOT)/ace/Shared_Memory_MM.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Shared_Memory.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Shared_Memory_MM.i
-
-.obj/Shared_Memory_SV.o .obj/Shared_Memory_SV.so .shobj/Shared_Memory_SV.o .shobj/Shared_Memory_SV.so: Shared_Memory_SV.cpp \
- $(ACE_ROOT)/ace/Shared_Memory_SV.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Shared_Memory.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Shared_Memory.h \
- $(ACE_ROOT)/ace/SV_Shared_Memory.i \
- $(ACE_ROOT)/ace/Shared_Memory_SV.i
-
-.obj/Local_Tokens.o .obj/Local_Tokens.so .shobj/Local_Tokens.o .shobj/Local_Tokens.so: Local_Tokens.cpp \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Local_Tokens.h \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Local_Tokens.i \
- $(ACE_ROOT)/ace/Token_Manager.h \
- $(ACE_ROOT)/ace/Token_Manager.i
-
-.obj/Remote_Tokens.o .obj/Remote_Tokens.so .shobj/Remote_Tokens.o .shobj/Remote_Tokens.so: Remote_Tokens.cpp \
- $(ACE_ROOT)/ace/Remote_Tokens.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Local_Tokens.h \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Local_Tokens.i \
- $(ACE_ROOT)/ace/Token_Request_Reply.h \
- $(ACE_ROOT)/ace/Token_Request_Reply.i \
- $(ACE_ROOT)/ace/Remote_Tokens.i
-
-.obj/Token_Collection.o .obj/Token_Collection.so .shobj/Token_Collection.o .shobj/Token_Collection.so: Token_Collection.cpp \
- $(ACE_ROOT)/ace/Token_Collection.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Local_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Local_Tokens.i \
- $(ACE_ROOT)/ace/Token_Collection.i
-
-.obj/Token_Invariants.o .obj/Token_Invariants.so .shobj/Token_Invariants.o .shobj/Token_Invariants.so: Token_Invariants.cpp \
- $(ACE_ROOT)/ace/Token_Invariants.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Local_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Local_Tokens.i
-
-.obj/Token_Manager.o .obj/Token_Manager.so .shobj/Token_Manager.o .shobj/Token_Manager.so: Token_Manager.cpp \
- $(ACE_ROOT)/ace/Token_Manager.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Local_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Local_Tokens.i \
- $(ACE_ROOT)/ace/Token_Manager.i
-
-.obj/Token_Request_Reply.o .obj/Token_Request_Reply.so .shobj/Token_Request_Reply.o .shobj/Token_Request_Reply.so: Token_Request_Reply.cpp \
- $(ACE_ROOT)/ace/Token_Request_Reply.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Local_Tokens.h \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Local_Tokens.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/Token_Request_Reply.i
-
-.obj/CORBA_Handler.o .obj/CORBA_Handler.so .shobj/CORBA_Handler.o .shobj/CORBA_Handler.so: CORBA_Handler.cpp \
- $(ACE_ROOT)/ace/CORBA_Handler.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Pipe.h \
- $(ACE_ROOT)/ace/Pipe.i \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Manager.i
-
-.obj/CORBA_Ref.o .obj/CORBA_Ref.so .shobj/CORBA_Ref.o .shobj/CORBA_Ref.so: CORBA_Ref.cpp \
- $(ACE_ROOT)/ace/CORBA_Ref.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/CORBA_Ref.cpp
-
-.obj/Local_Name_Space.o .obj/Local_Name_Space.so .shobj/Local_Name_Space.o .shobj/Local_Name_Space.so: Local_Name_Space.cpp \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Local_Name_Space.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Local_Name_Space_T.h \
- $(ACE_ROOT)/ace/Name_Space.h \
- $(ACE_ROOT)/ace/Name_Proxy.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Name_Request_Reply.h \
- $(ACE_ROOT)/ace/Naming_Context.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Local_Name_Space_T.cpp
-
-.obj/Name_Proxy.o .obj/Name_Proxy.so .shobj/Name_Proxy.o .shobj/Name_Proxy.so: Name_Proxy.cpp \
- $(ACE_ROOT)/ace/Name_Proxy.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Name_Request_Reply.h
-
-.obj/Name_Request_Reply.o .obj/Name_Request_Reply.so .shobj/Name_Request_Reply.o .shobj/Name_Request_Reply.so: Name_Request_Reply.cpp \
- $(ACE_ROOT)/ace/Name_Request_Reply.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h
-
-.obj/Name_Space.o .obj/Name_Space.so .shobj/Name_Space.o .shobj/Name_Space.so: Name_Space.cpp \
- $(ACE_ROOT)/ace/Name_Space.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Name_Proxy.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Name_Request_Reply.h
-
-.obj/Naming_Context.o .obj/Naming_Context.so .shobj/Naming_Context.o .shobj/Naming_Context.so: Naming_Context.cpp \
- $(ACE_ROOT)/ace/Get_Opt.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Get_Opt.i \
- $(ACE_ROOT)/ace/Naming_Context.h \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Name_Proxy.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Name_Request_Reply.h \
- $(ACE_ROOT)/ace/Name_Space.h \
- $(ACE_ROOT)/ace/Remote_Name_Space.h \
- $(ACE_ROOT)/ace/Local_Name_Space_T.h \
- $(ACE_ROOT)/ace/Local_Name_Space.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Local_Name_Space_T.cpp \
- $(ACE_ROOT)/ace/Registry_Name_Space.h
-
-.obj/Registry_Name_Space.o .obj/Registry_Name_Space.so .shobj/Registry_Name_Space.o .shobj/Registry_Name_Space.so: Registry_Name_Space.cpp \
- $(ACE_ROOT)/ace/Registry_Name_Space.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i
-
-.obj/Remote_Name_Space.o .obj/Remote_Name_Space.so .shobj/Remote_Name_Space.o .shobj/Remote_Name_Space.so: Remote_Name_Space.cpp \
- $(ACE_ROOT)/ace/Remote_Name_Space.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Name_Proxy.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
- $(ACE_ROOT)/ace/SOCK_Stream.h \
- $(ACE_ROOT)/ace/SOCK_IO.h \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/SOCK_IO.i \
- $(ACE_ROOT)/ace/SOCK_Stream.i \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/SOCK_Connector.i \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/Service_Object.i \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- $(ACE_ROOT)/ace/Synch_Options.h \
- $(ACE_ROOT)/ace/Synch_Options.i \
- $(ACE_ROOT)/ace/Name_Request_Reply.h \
- $(ACE_ROOT)/ace/Name_Space.h
-
-.obj/QoS_Session_Impl.o .obj/QoS_Session_Impl.so .shobj/QoS_Session_Impl.o .shobj/QoS_Session_Impl.so: QoS_Session_Impl.cpp \
- $(ACE_ROOT)/ace/SOCK.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/SOCK.i \
- $(ACE_ROOT)/ace/QoS_Manager.h \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/QoS_Session_Impl.h \
- $(ACE_ROOT)/ace/QoS_Session_Impl.i
-
-.obj/QoS_Session_Factory.o .obj/QoS_Session_Factory.so .shobj/QoS_Session_Factory.o .shobj/QoS_Session_Factory.so: QoS_Session_Factory.cpp \
- $(ACE_ROOT)/ace/QoS_Session_Factory.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/QoS_Session.h \
- $(ACE_ROOT)/ace/INET_Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/INET_Addr.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/QoS_Session_Impl.h \
- $(ACE_ROOT)/ace/QoS_Session_Impl.i
-
-.obj/QoS_Manager.o .obj/QoS_Manager.so .shobj/QoS_Manager.o .shobj/QoS_Manager.so: QoS_Manager.cpp \
- $(ACE_ROOT)/ace/QoS_Manager.h \
- $(ACE_ROOT)/ace/pre.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/svc_export.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.h \
- $(ACE_ROOT)/ace/Based_Pointer_T.i \
- $(ACE_ROOT)/ace/Based_Pointer_T.cpp \
- $(ACE_ROOT)/ace/Based_Pointer_Repository.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/Event_Handler.i \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Atomic_Op.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/Memory_Pool.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/ace/Makefile.am b/ace/Makefile.am
deleted file mode 100644
index ff0949b090b..00000000000
--- a/ace/Makefile.am
+++ /dev/null
@@ -1,907 +0,0 @@
-##----------------------------------------------------------------------------
-## $Id$
-##
-## Makefile.am for the entire ACE release
-##----------------------------------------------------------------------------
-
-##
-## Process this file with automake to create Makefile.in
-##
-
-## The number in AUTOMAKE_OPTIONS is the minimum required version automake
-## needed to process this file.
-AUTOMAKE_OPTIONS = 1.4
-
-## Disable building of CLASSIX library for now.
-## SUBDIRS = CLASSIX
-
-INCLUDES = -I$(top_builddir) -I$(top_srcdir)
-
-# Define any X libraries that ACE needs, if any.
-ACE_XLIBS = @ACE_XLIBS@
-
-
-# We only want `gethrtime.cpp' if building on Pentium(tm) with GNU C++.
-if ACE_ON_PENTIUM
-ACE_GETHRTIME_CPP = gethrtime.cpp
-else
-ACE_GETHRTIME_CPP =
-endif
-
-# Define which ACE components to build
-if BUILD_OS_FILES
-LIBACE_OS = libACE_OS.la
-else
-LIBACE_OS =
-endif
-
-if BUILD_UTILS_FILES
-LIBACE_UTILS = libACE_Utils.la
-else
-LIBACE_UTILS =
-endif
-
-if BUILD_LOGGING_FILES
-LIBACE_LOGGING = libACE_Logging.la
-else
-LIBACE_LOGGING =
-endif
-
-
-if BUILD_THREADS_FILES
-LIBACE_THREADS = libACE_Threads.la
-else
-LIBACE_THREADS =
-endif
-
-if BUILD_DEMUX_FILES
-LIBACE_DEMUX = libACE_Demux.la
-else
-LIBACE_DEMUX =
-endif
-
-if BUILD_CONNECTION_FILES
-LIBACE_CONNECTION = libACE_Connection.la
-else
-LIBACE_CONNECTION =
-endif
-
-if BUILD_SOCKETS_FILES
-LIBACE_SOCKETS = libACE_Sockets.la
-else
-LIBACE_SOCKETS =
-endif
-
-if BUILD_IPC_FILES
-LIBACE_IPC = libACE_IPC.la
-else
-LIBACE_IPC =
-endif
-
-if BUILD_SVCCONF_FILES
-LIBACE_SVCCONF = libACE_Svcconf.la
-else
-LIBACE_SVCCONF =
-endif
-
-if BUILD_STREAMS_FILES
-LIBACE_STREAMS = libACE_Streams.la
-else
-LIBACE_STREAMS =
-endif
-
-if BUILD_MEMORY_FILES
-LIBACE_MEMORY = libACE_Memory.la
-else
-LIBACE_MEMORY =
-endif
-
-if BUILD_TOKEN_FILES
-LIBACE_TOKEN = libACE_Token.la
-else
-LIBACE_TOKEN =
-endif
-
-if BUILD_OTHER_FILES
-LIBACE_OTHER = libACE_Other.la
-else
-LIBACE_OTHER =
-endif
-
-if BUILD_FULL_LIBRARY
-LIBACE = libACE.la
-else
-LIBACE =
-endif
-
-# Build a libtool library, libACE.la for installation in libdir.
-lib_LTLIBRARIES = \
- $(LIBACE) \
- $(LIBACE_OS) \
- $(LIBACE_UTILS) \
- $(LIBACE_LOGGING) \
- $(LIBACE_THREADS) \
- $(LIBACE_DEMUX) \
- $(LIBACE_CONNECTION) \
- $(LIBACE_SOCKETS) \
- $(LIBACE_IPC) \
- $(LIBACE_SVCCONF) \
- $(LIBACE_STREAMS) \
- $(LIBACE_MEMORY) \
- $(LIBACE_TOKEN) \
- $(LIBACE_OTHER)
-
-libACE_OS_la_SOURCES = \
- Basic_Types.cpp \
- OS.cpp \
- OS_Dirent.cpp \
- Sched_Params.cpp
-
-libACE_Utils_la_SOURCES = \
- ACE.cpp \
- Active_Map_Manager.cpp \
- Arg_Shifter.cpp \
- ARGV.cpp \
- Capabilities.cpp \
- Configuration.cpp \
- Containers.cpp \
- Dirent.cpp \
- Dynamic.cpp \
- Filecache.cpp \
- Functor.cpp \
- Get_Opt.cpp \
- Hash_Map_Manager.cpp \
- High_Res_Timer.cpp \
- Method_Request.cpp \
- Object_Manager.cpp \
- Profile_Timer.cpp \
- Registry.cpp \
- SString.cpp \
- Stats.cpp \
- System_Time.cpp \
- Time_Request_Reply.cpp \
- Timeprobe.cpp \
- Timer_Hash.cpp \
- Timer_Heap.cpp \
- Timer_List.cpp \
- Timer_Queue.cpp \
- Timer_Wheel.cpp \
- $(ACE_GETHRTIME_CPP)
-
-# We only want `gethrtime.cpp' if building on Pentium(tm) so we need
-# to let Automake know that `gethrtime.cpp' is conditionally built.
-EXTRA_libACE_Utils_la_SOURCES = gethrtime.cpp
-
-libACE_Logging_la_SOURCES = \
- Dump.cpp \
- Log_Msg.cpp \
- Log_Record.cpp \
- Trace.cpp
-
-libACE_Threads_la_SOURCES = \
- Activation_Queue.cpp \
- Process.cpp \
- Process_Manager.cpp \
- Synch.cpp \
- Synch_Options.cpp \
- Thread.cpp \
- Thread_Manager.cpp \
- Token.cpp
-
-libACE_Demux_la_SOURCES = \
- Event_Handler.cpp \
- FlReactor.cpp \
- Handle_Set.cpp \
- Msg_WFMO_Reactor.cpp \
- POSIX_Proactor.cpp \
- Priority_Reactor.cpp \
- Proactor.cpp \
- Reactor.cpp \
- Select_Reactor.cpp \
- Select_Reactor_Base.cpp \
- TP_Reactor.cpp \
- TkReactor.cpp \
- WFMO_Reactor.cpp \
- XtReactor.cpp \
- QtReactor.cpp
-
-libACE_Connection_la_SOURCES = \
- Asynch_IO.cpp \
- Asynch_IO_Impl.cpp \
- POSIX_Asynch_IO.cpp \
- Strategies.cpp
-
-libACE_Sockets_la_SOURCES = \
- IPC_SAP.cpp \
- LSOCK.cpp \
- LSOCK_Acceptor.cpp \
- LSOCK_CODgram.cpp \
- LSOCK_Connector.cpp \
- LSOCK_Dgram.cpp \
- LSOCK_Stream.cpp \
- SOCK.cpp \
- SOCK_Acceptor.cpp \
- SOCK_CODgram.cpp \
- SOCK_Connector.cpp \
- SOCK_Dgram.cpp \
- SOCK_Dgram_Bcast.cpp \
- SOCK_Dgram_Mcast.cpp \
- SOCK_Dgram_Mcast_QoS.cpp \
- SOCK_IO.cpp \
- SOCK_Stream.cpp
-
-libACE_IPC_la_SOURCES = \
- Addr.cpp \
- ATM_Addr.cpp \
- ATM_Acceptor.cpp \
- ATM_Connector.cpp \
- ATM_Params.cpp \
- ATM_QoS.cpp \
- ATM_Stream.cpp \
- DEV.cpp \
- DEV_Addr.cpp \
- DEV_Connector.cpp \
- DEV_IO.cpp \
- FIFO.cpp \
- FIFO_Recv.cpp \
- FIFO_Recv_Msg.cpp \
- FIFO_Send.cpp \
- FIFO_Send_Msg.cpp \
- FILE_Addr.cpp \
- FILE.cpp \
- FILE_Connector.cpp \
- FILE_IO.cpp \
- INET_Addr.cpp \
- IO_SAP.cpp \
- IOStream.cpp \
- Pipe.cpp \
- Signal.cpp \
- SPIPE_Addr.cpp \
- SPIPE.cpp \
- SPIPE_Acceptor.cpp \
- SPIPE_Connector.cpp \
- SPIPE_Stream.cpp \
- SV_Message.cpp \
- SV_Message_Queue.cpp \
- SV_Semaphore_Complex.cpp \
- SV_Semaphore_Simple.cpp \
- SV_Shared_Memory.cpp \
- TLI.cpp \
- TLI_Acceptor.cpp \
- TLI_Connector.cpp \
- TLI_Stream.cpp \
- TTY_IO.cpp \
- UNIX_Addr.cpp \
- UPIPE_Acceptor.cpp \
- UPIPE_Connector.cpp \
- UPIPE_Stream.cpp \
- XTI_ATM_Mcast.cpp \
- MEM_Acceptor.cpp \
- MEM_Addr.cpp \
- MEM_Connector.cpp \
- MEM_IO.cpp \
- MEM_SAP.cpp \
- MEM_Stream.cpp
-
-libACE_Svcconf_la_SOURCES = \
- DLL.cpp \
- Parse_Node.cpp \
- Service_Config.cpp \
- Service_Manager.cpp \
- Service_Object.cpp \
- Service_Repository.cpp \
- Service_Types.cpp \
- Shared_Object.cpp \
- Svc_Conf_l.cpp \
- Svc_Conf_y.cpp
-
-libACE_Streams_la_SOURCES = \
- CDR_Stream.cpp \
- Codeset_IBM1047.cpp \
- Message_Block.cpp \
- Message_Queue.cpp \
- Task.cpp
-
-libACE_Memory_la_SOURCES = \
- Based_Pointer_Repository.cpp \
- Malloc.cpp \
- Mem_Map.cpp \
- Memory_Pool.cpp \
- Obstack.cpp \
- Read_Buffer.cpp \
- Shared_Memory.cpp \
- Shared_Memory_MM.cpp \
- Shared_Memory_SV.cpp
-
-libACE_Token_la_SOURCES = \
- Local_Tokens.cpp \
- Remote_Tokens.cpp \
- Token_Collection.cpp \
- Token_Invariants.cpp \
- Token_Manager.cpp \
- Token_Request_Reply.cpp
-
-libACE_Other_la_SOURCES = \
- CORBA_Handler.cpp \
- CORBA_Ref.cpp \
- Local_Name_Space.cpp \
- Name_Proxy.cpp \
- Name_Request_Reply.cpp \
- Name_Space.cpp \
- Naming_Context.cpp \
- Registry_Name_Space.cpp \
- Remote_Name_Space.cpp \
- QoS_Session_Impl.cpp \
- QoS_Session_Factory.cpp \
- QoS_Manager.cpp
-
-libACE_la_SOURCES = \
- $(libACE_OS_la_SOURCES) \
- $(libACE_Utils_la_SOURCES) \
- $(libACE_Logging_la_SOURCES) \
- $(libACE_Threads_la_SOURCES) \
- $(libACE_Demux_la_SOURCES) \
- $(libACE_Connection_la_SOURCES) \
- $(libACE_Sockets_la_SOURCES) \
- $(libACE_IPC_la_SOURCES) \
- $(libACE_Svcconf_la_SOURCES) \
- $(libACE_Streams_la_SOURCES) \
- $(libACE_Memory_la_SOURCES) \
- $(libACE_Token_la_SOURCES) \
- $(libACE_Other_la_SOURCES)
-
-# We only want `gethrtime.cpp' if building on Pentium(tm) so we need
-# to let Automake know that `gethrtime.cpp' is conditionally built.
-EXTRA_libACE_la_SOURCES = gethrtime.cpp
-
-
-## The following is an excerpt from the "libtool" manual, written by
-## Gordon Matzigkeit:
-##
-## This flag accepts an argument of the form `current[:revision[:age]]'. So,
-## passing `-version-info 3:12:1' sets current to 3, revision to 12, and age
-## to 1.
-## If either revision or age are omitted, they default to 0. Also note that
-## age must be less than or equal to the current interface number.
-##
-## Here are a set of rules to help you update your library version
-## information:
-##
-## 1.Start with version information of `0:0:0' for each libtool library.
-## 2.Update the version information only immediately before a public
-## release of your software. More frequent updates are unnecessary, and
-## only guarantee that the current interface number gets larger faster.
-## 3.If the library source code has changed at all since the last update,
-## then increment revision (`c:r:a' becomes `c:r+1:a').
-## 4.If any interfaces have been added, removed, or changed since the last
-## update, increment current, and set revision to 0.
-## 5.If any interfaces have been added since the last public release, then
-## increment age.
-## 6.If any interfaces have been removed since the last public release,
-## then set age to 0.
-##
-## Never try to set the interface numbers so that they correspond to the
-## release number of your package. This is an abuse that only fosters
-## misunderstanding of the purpose of library versions. Instead, use the
-## `-release' flag (see section 6.4 Managing release information), but be
-## warned that every release of your package will not be binary compatibility
-## with any other release.
-
-## The below "-version-info" isn't being used the way libtool intends
-## it to be used but we do it that way to make the version numbers
-## that ACE uses match those created by libtool from "-version-info."
-##libACE_la_LDFLAGS = $(X_LIBS) \
-## -version-info 10:4:6 ## 10-6=4 --> libACE.so.4.6.4
-libACE_la_LDFLAGS = $(X_LIBS) \
- -version-info @ACE_CURRENT@:@ACE_REVISION@:@ACE_AGE@
-
-# We also add any X libraries to the list.
-libACE_la_LIBADD = $(X_PRE_LIBS) $(ACE_XLIBS) $(X_EXTRA_LIBS)
-
-## These are template source files.
-TEMPLATE_FILES = \
- Acceptor.cpp \
- Active_Map_Manager_T.cpp \
- Asynch_Acceptor.cpp \
- Auto_IncDec_T.cpp \
- Auto_Ptr.cpp \
- Based_Pointer_T.cpp \
- Connector.cpp \
- Containers_T.cpp \
- Cache_Map_Manager_T.cpp \
- Cached_Connect_Strategy_T.cpp \
- Caching_Strategies_T.cpp \
- Caching_Utility_T.cpp \
- Cleanup_Strategies_T.cpp \
- Dump_T.cpp \
- Dynamic_Service.cpp \
- Env_Value_T.cpp \
- Event_Handler_T.cpp \
- Free_List.cpp \
- Functor_T.cpp \
- Future.cpp \
- Future_Set.cpp \
- Hash_Map_Manager_T.cpp \
- Hash_Cache_Map_Manager_T.cpp \
- IOStream_T.cpp \
- LOCK_SOCK_Acceptor.cpp \
- Local_Name_Space_T.cpp \
- Malloc_T.cpp \
- Managed_Object.cpp \
- Map_Manager.cpp \
- Map_T.cpp \
- Message_Block_T.cpp \
- Message_Queue_T.cpp \
- Module.cpp \
- Pair_T.cpp \
- RB_Tree.cpp \
- Select_Reactor_T.cpp \
- Singleton.cpp \
- Strategies_T.cpp \
- Stream.cpp \
- Stream_Modules.cpp \
- Svc_Handler.cpp \
- Synch_T.cpp \
- Task_T.cpp \
- Template_Instantiations.cpp \
- Timeprobe_T.cpp \
- Timer_Hash_T.cpp \
- Timer_Heap_T.cpp \
- Timer_List_T.cpp \
- Timer_Queue_Adapters.cpp \
- Timer_Queue_T.cpp \
- Timer_Wheel_T.cpp \
- Typed_SV_Message.cpp \
- Typed_SV_Message_Queue.cpp
-
-HEADER_FILES = \
- ACE.h \
- ACE_export.h \
- ARGV.h \
- ATM_Acceptor.h \
- ATM_Addr.h \
- ATM_Connector.h \
- ATM_Params.h \
- ATM_QoS.h \
- ATM_Stream.h \
- Acceptor.h \
- Activation_Queue.h \
- Active_Map_Manager.h \
- Active_Map_Manager_T.h \
- Addr.h \
- Arg_Shifter.h \
- Array.h \
- Asynch_Acceptor.h \
- Asynch_IO.h \
- Asynch_IO_Impl.h \
- Auto_IncDec_T.h \
- Auto_Ptr.h \
- Based_Pointer_Repository.h \
- Based_Pointer_T.h \
- Basic_Types.h \
- CDR_Stream.h \
- CORBA_Handler.h \
- CORBA_Ref.h \
- CORBA_macros.h \
- Cache_Map_Manager_T.h \
- Cached_Connect_Strategy_T.h \
- Caching_Strategies_T.h \
- Caching_Utility_T.h \
- Capabilities.h \
- Cleanup_Strategies_T.h \
- Codeset_IBM1047.h \
- Configuration.h \
- Connector.h \
- Containers.h \
- Containers_T.h \
- DEV.h \
- DEV_Addr.h \
- DEV_Connector.h \
- DEV_IO.h \
- DLL.h \
- Date_Time.h \
- Dirent.h \
- Dump.h \
- Dump_T.h \
- Dynamic.h \
- Dynamic_Service.h \
- Env_Value_T.h \
- Event_Handler.h \
- Event_Handler_T.h \
- FIFO.h \
- FIFO_Recv.h \
- FIFO_Recv_Msg.h \
- FIFO_Send.h \
- FIFO_Send_Msg.h \
- FILE.h \
- FILE_Addr.h \
- FILE_Connector.h \
- FILE_IO.h \
- Filecache.h \
- FlReactor.h \
- Free_List.h \
- Functor.h \
- Functor_T.h \
- Future.h \
- Future_Set.h \
- Get_Opt.h \
- Handle_Gobbler.h \
- Handle_Set.h \
- Hash_Cache_Map_Manager_T.h \
- Hash_Map_Manager.h \
- Hash_Map_Manager_T.h \
- Hash_Map_With_Allocator_T.h \
- High_Res_Timer.h \
- INET_Addr.h \
- IOStream.h \
- IOStream_T.h \
- IO_Cntl_Msg.h \
- IO_SAP.h \
- IPC_SAP.h \
- LOCK_SOCK_Acceptor.h \
- LSOCK.h \
- LSOCK_Acceptor.h \
- LSOCK_CODgram.h \
- LSOCK_Connector.h \
- LSOCK_Dgram.h \
- LSOCK_Stream.h \
- Local_Name_Space.h \
- Local_Name_Space_T.h \
- Local_Tokens.h \
- Log_Msg.h \
- Log_Priority.h \
- Log_Record.h \
- MEM_Acceptor.h \
- MEM_Addr.h \
- MEM_Connector.h \
- MEM_IO.h \
- MEM_SAP.h \
- MEM_Stream.h \
- Malloc.h \
- Malloc_Base.h \
- Malloc_T.h \
- Managed_Object.h \
- Map.h \
- Map_Manager.h \
- Map_T.h \
- Mem_Map.h \
- Memory_Pool.h \
- Message_Block.h \
- Message_Block_T.h \
- Message_Queue.h \
- Message_Queue_T.h \
- Method_Object.h \
- Method_Request.h \
- Min_Max.h \
- Module.h \
- Msg_WFMO_Reactor.h \
- Multiplexor.h \
- NT_Service.h \
- Name_Proxy.h \
- Name_Request_Reply.h \
- Name_Space.h \
- Naming_Context.h \
- OS.h \
- Object_Manager.h \
- Obstack.h \
- POSIX_Asynch_IO.h \
- POSIX_Proactor.h \
- Pair.h \
- Pair_T.h \
- Parse_Node.h \
- Pipe.h \
- Priority_Reactor.h \
- Proactor.h \
- Proactor_Impl.h \
- Process.h \
- Process_Manager.h \
- Profile_Timer.h \
- QoS_Manager.h \
- QoS_Session.h \
- QoS_Session_Factory.h \
- QoS_Session_Impl.h \
- QtReactor.h \
- RB_Tree.h \
- Reactor.h \
- Reactor_Impl.h \
- Read_Buffer.h \
- Registry.h \
- Registry_Name_Space.h \
- Remote_Name_Space.h \
- Remote_Tokens.h \
- SOCK.h \
- SOCK_Acceptor.h \
- SOCK_CODgram.h \
- SOCK_Connector.h \
- SOCK_Dgram.h \
- SOCK_Dgram_Bcast.h \
- SOCK_Dgram_Mcast.h \
- SOCK_Dgram_Mcast_QoS.h \
- SOCK_IO.h \
- SOCK_Stream.h \
- SPIPE.h \
- SPIPE_Acceptor.h \
- SPIPE_Addr.h \
- SPIPE_Connector.h \
- SPIPE_Stream.h \
- SString.h \
- SV_Message.h \
- SV_Message_Queue.h \
- SV_Semaphore_Complex.h \
- SV_Semaphore_Simple.h \
- SV_Shared_Memory.h \
- Sched_Params.h \
- Select_Reactor.h \
- Select_Reactor_Base.h \
- Select_Reactor_T.h \
- Service_Config.h \
- Service_Manager.h \
- Service_Object.h \
- Service_Repository.h \
- Service_Types.h \
- Shared_Memory.h \
- Shared_Memory_MM.h \
- Shared_Memory_SV.h \
- Shared_Object.h \
- Signal.h \
- Singleton.h \
- Stats.h \
- Strategies.h \
- Strategies_T.h \
- Stream.h \
- Stream_Modules.h \
- Svc_Conf.h \
- Svc_Conf_Tokens.h \
- Svc_Handler.h \
- Synch.h \
- Synch_Options.h \
- Synch_T.h \
- System_Time.h \
- TLI.h \
- TLI_Acceptor.h \
- TLI_Connector.h \
- TLI_Stream.h \
- TP_Reactor.h \
- TTY_IO.h \
- Task.h \
- Task_T.h \
- Thread.h \
- Thread_Manager.h \
- Time_Request_Reply.h \
- Time_Value.h \
- Timeprobe.h \
- Timeprobe_T.h \
- Timer_Hash.h \
- Timer_Hash_T.h \
- Timer_Heap.h \
- Timer_Heap_T.h \
- Timer_List.h \
- Timer_List_T.h \
- Timer_Queue.h \
- Timer_Queue_Adapters.h \
- Timer_Queue_T.h \
- Timer_Wheel.h \
- Timer_Wheel_T.h \
- TkReactor.h \
- Token.h \
- Token_Collection.h \
- Token_Invariants.h \
- Token_Manager.h \
- Token_Request_Reply.h \
- Trace.h \
- Typed_SV_Message.h \
- Typed_SV_Message_Queue.h \
- UNIX_Addr.h \
- UPIPE_Acceptor.h \
- UPIPE_Addr.h \
- UPIPE_Connector.h \
- UPIPE_Stream.h \
- Version.h \
- WFMO_Reactor.h \
- WIN32_Asynch_IO.h \
- WIN32_Proactor.h \
- XTI_ATM_Mcast.h \
- XtReactor.h \
- config.h \
- config-all.h \
- iosfwd.h \
- post.h \
- pre.h \
- streams.h \
- svc_export.h \
- ws2tcpip.h
-## Make sure config.h is in the above header list!
-
-INLINE_FILES = \
- ACE.i \
- ARGV.i \
- ATM_Acceptor.i \
- ATM_Addr.i \
- ATM_Connector.i \
- ATM_Params.i \
- ATM_QoS.i \
- ATM_Stream.i \
- Activation_Queue.i \
- Active_Map_Manager.i \
- Active_Map_Manager_T.i \
- Addr.i \
- Asynch_IO_Impl.i \
- Atomic_Op.i \
- Auto_IncDec_T.i \
- Auto_Ptr.i \
- Based_Pointer_T.i \
- Basic_Types.i \
- CDR_Stream.i \
- CORBA_Handler.i \
- Cache_Map_Manager_T.i \
- Caching_Strategies_T.i \
- Capabilities.i \
- Containers.i \
- Containers_T.i \
- DEV.i \
- DEV_Addr.i \
- DEV_Connector.i \
- DEV_IO.i \
- Date_Time.i \
- Dirent.i \
- Dynamic.i \
- Dynamic_Service.i \
- Env_Value_T.i \
- Event_Handler.i \
- Event_Handler_T.i \
- FIFO.i \
- FIFO_Recv.i \
- FIFO_Recv_Msg.i \
- FIFO_Send.i \
- FIFO_Send_Msg.i \
- FILE.i \
- FILE_Addr.i \
- FILE_Connector.i \
- FILE_IO.i \
- FlReactor.i \
- Free_List.i \
- Functor.i \
- Functor_T.i \
- Get_Opt.i \
- Handle_Gobbler.i \
- Handle_Set.i \
- Hash_Cache_Map_Manager_T.i \
- Hash_Map_Manager_T.i \
- Hash_Map_With_Allocator_T.i \
- High_Res_Timer.i \
- INET_Addr.i \
- IOStream_T.i \
- IO_SAP.i \
- IPC_SAP.i \
- LSOCK.i \
- LSOCK_CODgram.i \
- LSOCK_Connector.i \
- LSOCK_Dgram.i \
- LSOCK_Stream.i \
- Local_Tokens.i \
- Log_Record.i \
- MEM_Acceptor.i \
- MEM_Addr.i \
- MEM_Connector.i \
- MEM_IO.i \
- MEM_SAP.i \
- MEM_Stream.i \
- Malloc.i \
- Malloc_T.i \
- Managed_Object.i \
- Map_Manager.i \
- Map_T.i \
- Mem_Map.i \
- Memory_Pool.i \
- Message_Block.i \
- Message_Block_T.i \
- Message_Queue.i \
- Message_Queue_T.i \
- Module.i \
- Msg_WFMO_Reactor.i \
- Multiplexor.i \
- NT_Service.i \
- OS.i \
- Object_Manager.i \
- Obstack.i \
- POSIX_Asynch_IO.i \
- POSIX_Proactor.i \
- Pair_T.i \
- Parse_Node.i \
- Pipe.i \
- Proactor.i \
- Process.i \
- Process_Manager.i \
- Profile_Timer.i \
- QoS_Session_Impl.i \
- RB_Tree.i \
- Reactor.i \
- Read_Buffer.i \
- Remote_Tokens.i \
- SOCK.i \
- SOCK_Acceptor.i \
- SOCK_CODgram.i \
- SOCK_Connector.i \
- SOCK_Dgram.i \
- SOCK_Dgram_Bcast.i \
- SOCK_Dgram_Mcast.i \
- SOCK_Dgram_Mcast_QoS.i \
- SOCK_IO.i \
- SOCK_Stream.i \
- SPIPE.i \
- SPIPE_Addr.i \
- SPIPE_Connector.i \
- SPIPE_Stream.i \
- SString.i \
- SV_Message.i \
- SV_Message_Queue.i \
- SV_Semaphore_Complex.i \
- SV_Semaphore_Simple.i \
- SV_Shared_Memory.i \
- Sched_Params.i \
- Select_Reactor_Base.i \
- Select_Reactor_T.i \
- Service_Config.i \
- Service_Manager.i \
- Service_Object.i \
- Service_Repository.i \
- Service_Types.i \
- Shared_Memory_MM.i \
- Shared_Memory_SV.i \
- Shared_Object.i \
- Signal.i \
- Singleton.i \
- Stats.i \
- Strategies.i \
- Strategies_T.i \
- Stream.i \
- Synch.i \
- Synch_Options.i \
- Synch_T.i \
- TLI.i \
- TLI_Connector.i \
- TLI_Stream.i \
- TP_Reactor.i \
- Task.i \
- Task_T.i \
- Thread.i \
- Thread_Manager.i \
- Timeprobe.i \
- Timer_Queue_Adapters.i \
- Timer_Queue_T.i \
- Token.i \
- Token_Collection.i \
- Token_Manager.i \
- Token_Request_Reply.i \
- Typed_SV_Message.i \
- Typed_SV_Message_Queue.i \
- UNIX_Addr.i \
- UPIPE_Acceptor.i \
- UPIPE_Connector.i \
- UPIPE_Stream.i \
- WFMO_Reactor.i \
- XTI_ATM_Mcast.i
-
-
-## It would be good to remove pkgincludedir. However, we want to install
-## headers in "$(prefix)/ace" not "$(prefix)/ACE" because the source files
-## include files in the directory "ace." By default pkgincludedir would
-## be "$(prefix)/$(PACKAGE)" which would be "$(prefix)/ACE" in our case.
-## It is for this reason that we must redefine "pkgincludedir."
-## However, if we set the package to "ace" instead of "ACE" then we won't
-## need to set the "pkgincludedir."
-## -Ossama
-##pkgincludedir = $(prefix)/include/ace
-pkginclude_HEADERS = \
- $(HEADER_FILES) \
- $(INLINE_FILES) \
- $(TEMPLATE_FILES)
-
-## Make sure the following get into the distribution
-##EXTRA_DIST = $(TEMPLATE_FILES)
-
-## Clean up template repositories, etc.
-clean-local:
- -rm -f *.bak *.rpo *.sym lib*.*_pure_* Makefile.old core
- -rm -f gcctemp.c gcctemp so_locations
- -rm -rf ptrepository SunWS_cache Templates.DB
diff --git a/ace/Makefile.bor b/ace/Makefile.bor
deleted file mode 100644
index b25c580e836..00000000000
--- a/ace/Makefile.bor
+++ /dev/null
@@ -1,196 +0,0 @@
-
-#
-# Makefile for building the ACE library with Borland C++Builder 4.x
-#
-
-NAME = ace
-
-OBJFILES = \
- $(OBJDIR)\ACE.obj \
- $(OBJDIR)\Activation_Queue.obj \
- $(OBJDIR)\Active_Map_Manager.obj \
- $(OBJDIR)\Addr.obj \
- $(OBJDIR)\Arg_Shifter.obj \
- $(OBJDIR)\ARGV.obj \
- $(OBJDIR)\Asynch_IO.obj \
- $(OBJDIR)\Asynch_IO_Impl.obj \
- $(OBJDIR)\ATM_Acceptor.obj \
- $(OBJDIR)\ATM_Addr.obj \
- $(OBJDIR)\ATM_Connector.obj \
- $(OBJDIR)\ATM_Params.obj \
- $(OBJDIR)\ATM_QoS.obj \
- $(OBJDIR)\ATM_Stream.obj \
- $(OBJDIR)\Based_Pointer_Repository.obj \
- $(OBJDIR)\Basic_Types.obj \
- $(OBJDIR)\Capabilities.obj \
- $(OBJDIR)\CDR_Stream.obj \
- $(OBJDIR)\Configuration.obj \
- $(OBJDIR)\Containers.obj \
- $(OBJDIR)\CORBA_Handler.obj \
- $(OBJDIR)\CORBA_Ref.obj \
- $(OBJDIR)\Date_Time.obj \
- $(OBJDIR)\DEV.obj \
- $(OBJDIR)\DEV_Addr.obj \
- $(OBJDIR)\DEV_Connector.obj \
- $(OBJDIR)\DEV_IO.obj \
- $(OBJDIR)\Dirent.obj \
- $(OBJDIR)\DLL.obj \
- $(OBJDIR)\Dump.obj \
- $(OBJDIR)\Dynamic.obj \
- $(OBJDIR)\Dynamic_Service.obj \
- $(OBJDIR)\Event_Handler.obj \
- $(OBJDIR)\FIFO.obj \
- $(OBJDIR)\FIFO_Recv.obj \
- $(OBJDIR)\FIFO_Recv_Msg.obj \
- $(OBJDIR)\FIFO_Send.obj \
- $(OBJDIR)\FIFO_Send_Msg.obj \
- $(OBJDIR)\FILE.obj \
- $(OBJDIR)\FILE_Addr.obj \
- $(OBJDIR)\FILE_Connector.obj \
- $(OBJDIR)\FILE_IO.obj \
- $(OBJDIR)\Filecache.obj \
- $(OBJDIR)\Functor.obj \
- $(OBJDIR)\Get_Opt.obj \
- $(OBJDIR)\Handle_Set.obj \
- $(OBJDIR)\Hash_Map_Manager.obj \
- $(OBJDIR)\High_Res_Timer.obj \
- $(OBJDIR)\INET_Addr.obj \
- $(OBJDIR)\IO_Cntl_Msg.obj \
- $(OBJDIR)\IO_SAP.obj \
- $(OBJDIR)\IOStream.obj \
- $(OBJDIR)\IPC_SAP.obj \
- $(OBJDIR)\Local_Name_Space.obj \
- $(OBJDIR)\Local_Tokens.obj \
- $(OBJDIR)\Log_Msg.obj \
- $(OBJDIR)\Log_Record.obj \
- $(OBJDIR)\LSOCK.obj \
- $(OBJDIR)\LSOCK_Acceptor.obj \
- $(OBJDIR)\LSOCK_CODgram.obj \
- $(OBJDIR)\LSOCK_Connector.obj \
- $(OBJDIR)\LSOCK_Dgram.obj \
- $(OBJDIR)\LSOCK_Stream.obj \
- $(OBJDIR)\Malloc.obj \
- $(OBJDIR)\Map.obj \
- $(OBJDIR)\MEM_Acceptor.obj \
- $(OBJDIR)\MEM_Addr.obj \
- $(OBJDIR)\MEM_Connector.obj \
- $(OBJDIR)\MEM_IO.obj \
- $(OBJDIR)\Mem_Map.obj \
- $(OBJDIR)\MEM_SAP.obj \
- $(OBJDIR)\MEM_Stream.obj \
- $(OBJDIR)\Memory_Pool.obj \
- $(OBJDIR)\Message_Block.obj \
- $(OBJDIR)\Message_Queue.obj \
- $(OBJDIR)\Method_Request.obj \
- $(OBJDIR)\Msg_WFMO_Reactor.obj \
- $(OBJDIR)\Multiplexor.obj \
- $(OBJDIR)\Name_Proxy.obj \
- $(OBJDIR)\Name_Request_Reply.obj \
- $(OBJDIR)\Name_Space.obj \
- $(OBJDIR)\Naming_Context.obj \
- $(OBJDIR)\NT_Service.obj \
- $(OBJDIR)\Object_Manager.obj \
- $(OBJDIR)\Obstack.obj \
- $(OBJDIR)\OS.obj \
- $(OBJDIR)\OS_Dirent.obj \
- $(OBJDIR)\Pair.obj \
- $(OBJDIR)\Parse_Node.obj \
- $(OBJDIR)\Pipe.obj \
- $(OBJDIR)\Priority_Reactor.obj \
- $(OBJDIR)\Proactor.obj \
- $(OBJDIR)\Process.obj \
- $(OBJDIR)\Process_Manager.obj \
- $(OBJDIR)\Profile_Timer.obj \
- $(OBJDIR)\QoS_Manager.obj \
- $(OBJDIR)\QoS_Session_Factory.obj \
- $(OBJDIR)\QoS_Session_Impl.obj \
- $(OBJDIR)\Reactor.obj \
- $(OBJDIR)\Read_Buffer.obj \
- $(OBJDIR)\Registry.obj \
- $(OBJDIR)\Registry_Name_Space.obj \
- $(OBJDIR)\Remote_Name_Space.obj \
- $(OBJDIR)\Remote_Tokens.obj \
- $(OBJDIR)\Sched_Params.obj \
- $(OBJDIR)\Select_Reactor.obj \
- $(OBJDIR)\Select_Reactor_Base.obj \
- $(OBJDIR)\Service_Config.obj \
- $(OBJDIR)\Service_Manager.obj \
- $(OBJDIR)\Service_Object.obj \
- $(OBJDIR)\Service_Repository.obj \
- $(OBJDIR)\Service_Types.obj \
- $(OBJDIR)\Shared_Memory.obj \
- $(OBJDIR)\Shared_Memory_MM.obj \
- $(OBJDIR)\Shared_Memory_SV.obj \
- $(OBJDIR)\Shared_Object.obj \
- $(OBJDIR)\Signal.obj \
- $(OBJDIR)\SOCK.obj \
- $(OBJDIR)\SOCK_Acceptor.obj \
- $(OBJDIR)\SOCK_CODgram.obj \
- $(OBJDIR)\SOCK_Connector.obj \
- $(OBJDIR)\SOCK_Dgram.obj \
- $(OBJDIR)\SOCK_Dgram_Bcast.obj \
- $(OBJDIR)\SOCK_Dgram_Mcast.obj \
- $(OBJDIR)\SOCK_Dgram_Mcast_QoS.obj \
- $(OBJDIR)\SOCK_IO.obj \
- $(OBJDIR)\SOCK_Stream.obj \
- $(OBJDIR)\SPIPE.obj \
- $(OBJDIR)\SPIPE_Acceptor.obj \
- $(OBJDIR)\SPIPE_Addr.obj \
- $(OBJDIR)\SPIPE_Connector.obj \
- $(OBJDIR)\SPIPE_Stream.obj \
- $(OBJDIR)\SString.obj \
- $(OBJDIR)\Stats.obj \
- $(OBJDIR)\Strategies.obj \
- $(OBJDIR)\SV_Message.obj \
- $(OBJDIR)\SV_Message_Queue.obj \
- $(OBJDIR)\SV_Semaphore_Complex.obj \
- $(OBJDIR)\SV_Semaphore_Simple.obj \
- $(OBJDIR)\SV_Shared_Memory.obj \
- $(OBJDIR)\Svc_Conf_l.obj \
- $(OBJDIR)\Svc_Conf_y.obj \
- $(OBJDIR)\Svc_Handler.obj \
- $(OBJDIR)\Synch.obj \
- $(OBJDIR)\Synch_Options.obj \
- $(OBJDIR)\System_Time.obj \
- $(OBJDIR)\Task.obj \
- $(OBJDIR)\Template_Instantiations.obj \
- $(OBJDIR)\Thread.obj \
- $(OBJDIR)\Thread_Manager.obj \
- $(OBJDIR)\Time_Request_Reply.obj \
- $(OBJDIR)\Timeprobe.obj \
- $(OBJDIR)\Timer_Hash.obj \
- $(OBJDIR)\Timer_Heap.obj \
- $(OBJDIR)\Timer_List.obj \
- $(OBJDIR)\Timer_Queue.obj \
- $(OBJDIR)\Timer_Queue_Adapters.obj \
- $(OBJDIR)\Timer_Wheel.obj \
- $(OBJDIR)\TLI.obj \
- $(OBJDIR)\TLI_Acceptor.obj \
- $(OBJDIR)\TLI_Connector.obj \
- $(OBJDIR)\TLI_Stream.obj \
- $(OBJDIR)\Token.obj \
- $(OBJDIR)\Token_Collection.obj \
- $(OBJDIR)\Token_Invariants.obj \
- $(OBJDIR)\Token_Manager.obj \
- $(OBJDIR)\Token_Request_Reply.obj \
- $(OBJDIR)\TP_Reactor.obj \
- $(OBJDIR)\Trace.obj \
- $(OBJDIR)\TTY_IO.obj \
- $(OBJDIR)\Typed_SV_Message.obj \
- $(OBJDIR)\Typed_SV_Message_Queue.obj \
- $(OBJDIR)\UNIX_Addr.obj \
- $(OBJDIR)\UPIPE_Acceptor.obj \
- $(OBJDIR)\UPIPE_Connector.obj \
- $(OBJDIR)\UPIPE_Stream.obj \
- $(OBJDIR)\WFMO_Reactor.obj \
- $(OBJDIR)\WIN32_Asynch_IO.obj \
- $(OBJDIR)\WIN32_Proactor.obj \
- $(OBJDIR)\XtReactor.obj
-
-RESOURCE = $(OBJDIR)\ace.res
-
-CFLAGS = $(ACE_CFLAGS) -DACE_BUILD_DLL
-
-CPPDIR = .
-
-!include <$(ACE_ROOT)\include\makeinclude\build_core_library.bor>
diff --git a/ace/Malloc.cpp b/ace/Malloc.cpp
deleted file mode 100644
index 82307dc12ed..00000000000
--- a/ace/Malloc.cpp
+++ /dev/null
@@ -1,458 +0,0 @@
-// $Id$
-
-#if !defined (ACE_MALLOC_CPP)
-#define ACE_MALLOC_CPP
-
-#include "ace/Malloc.h"
-#include "ace/Object_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Malloc.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Synch_T.h"
-
-ACE_RCSID(ace, Malloc, "$Id$")
-
-// Process-wide ACE_Allocator.
-ACE_Allocator *ACE_Allocator::allocator_ = 0;
-
-// Controls whether the Allocator is deleted when we shut down (we can
-// only delete it safely if we created it!) This is no longer used;
-// see ACE_Allocator::instance (void).
-int ACE_Allocator::delete_allocator_ = 0;
-
-void
-ACE_Control_Block::ACE_Malloc_Header::dump (void) const
-{
- ACE_TRACE ("ACE_Malloc_Header::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_block = %x"), (ACE_Malloc_Header *) this->next_block_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsize = %d\n"), this->size_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Control_Block::print_alignment_info (void)
-{
- ACE_TRACE ("ACE_Control_Block::print_alignment_info");
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Start ---> ACE_Control_Block::print_alignment_info:\n")));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Sizeof ptr: %d\n")
- ACE_TEXT ("Sizeof size_t: %d\n")
- ACE_TEXT ("Sizeof long: %d\n")
- ACE_TEXT ("Sizeof double: %d\n")
- ACE_TEXT ("Sizeof ACE_MALLOC_ALIGN: %d\n")
- ACE_TEXT ("sizeof ACE_MALLOC_PADDING: %d\n")
- ACE_TEXT ("Sizeof ACE_MALLOC_HEADER_SIZE: %d\n")
- ACE_TEXT ("Sizeof ACE_MALLOC_PADDING_SIZE: %d\n")
- ACE_TEXT ("Sizeof ACE_CONTROL_BLOCK_SIZE: %d\n")
- ACE_TEXT ("Sizeof ACE_CONTROL_BLOCK_ALIGN_LONGS: %d\n")
- ACE_TEXT ("Sizeof (MALLOC_HEADER): %d\n")
- ACE_TEXT ("Sizeof (CONTROL_BLOCK): %d\n"),
- sizeof (char *),
- sizeof (size_t),
- sizeof (long),
- sizeof (double),
- ACE_MALLOC_ALIGN,
- ACE_MALLOC_PADDING,
- ACE_MALLOC_HEADER_SIZE,
- ACE_MALLOC_PADDING_SIZE,
- ACE_CONTROL_BLOCK_SIZE,
- ACE_CONTROL_BLOCK_ALIGN_LONGS,
- sizeof (ACE_Malloc_Header),
- sizeof (ACE_Control_Block)
- ));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("End <--- ACE_Control_Block::print_alignment_info:\n")));
-}
-
-void
-ACE_Control_Block::dump (void) const
-{
- ACE_TRACE ("ACE_Control_Block::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Name Node:\n")));
- for (ACE_Name_Node *nextn = this->name_head_;
- nextn != 0;
- nextn = nextn->next_)
- nextn->dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("freep_ = %x"), (ACE_Malloc_Header *) this->freep_));
- this->base_.dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nMalloc Header:\n")));
- for (ACE_Malloc_Header *nexth = ((ACE_Malloc_Header *)this->freep_)->next_block_;
- nexth != 0 && nexth != &this->base_;
- nexth = nexth->next_block_)
- nexth->dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Control_Block::ACE_Name_Node::ACE_Name_Node (void)
-{
- ACE_TRACE ("ACE_Name_Node::ACE_Name_Node");
-}
-
-ACE_Control_Block::ACE_Name_Node::ACE_Name_Node (const char *name,
- char *name_ptr,
- char *pointer,
- ACE_Name_Node *next)
- : name_ (name_ptr),
- pointer_ (pointer),
- next_ (next),
- prev_ (0)
-{
- ACE_TRACE ("ACE_Name_Node::ACE_Name_Node");
- char *n = this->name_;
- ACE_OS::strcpy (n, name);
- if (next != 0)
- next->prev_ = this;
-}
-
-ACE_Control_Block::ACE_Name_Node::ACE_Name_Node (const ACE_Name_Node &)
-{
- ACE_TRACE ("ACE_Name_Node::ACE_Name_Node");
-#if !defined (ACE_PSOS)
- ACE_ASSERT (0 == "not implemented!");
-#endif /* ! ACE_PSOS */
-}
-
-const char *
-ACE_Control_Block::ACE_Name_Node::name (void) const
-{
- const char *c = this->name_;
- return c;
-}
-
-void
-ACE_Control_Block::ACE_Name_Node::name (const char *)
-{
-#if !defined (ACE_PSOS)
- ACE_ASSERT (0 == "not implemented!");
-#endif /* ! ACE_PSOS */
-}
-
-ACE_Control_Block::ACE_Malloc_Header::ACE_Malloc_Header (void)
- : next_block_ (0),
- size_ (0)
-{
-}
-
-void
-ACE_Control_Block::ACE_Name_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Name_Node");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("pointer = %x"), (const char *) this->pointer_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nnext_ = %x"), (ACE_Name_Node *) this->next_));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("\nname_ = (%x, %s)"),
- (const char *) this->name_,
- (const char *) this->name_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-void
-ACE_PI_Control_Block::ACE_Malloc_Header::dump (void) const
-{
- ACE_TRACE ("ACE_Malloc_Header::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_block = %x"), (ACE_Malloc_Header *) this->next_block_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsize = %d\n"), this->size_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_PI_Control_Block::print_alignment_info (void)
-{
- ACE_TRACE ("ACE_Control_Block::print_alignment_info");
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Start ---> ACE_PI_Control_Block::print_alignment_info:\n")));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Sizeof ptr: %d\n")
- ACE_TEXT ("Sizeof size_t: %d\n")
- ACE_TEXT ("Sizeof long: %d\n")
- ACE_TEXT ("Sizeof double: %d\n")
- ACE_TEXT ("Sizeof ACE_MALLOC_ALIGN: %d\n")
- ACE_TEXT ("sizeof ACE_MALLOC_PADDING: %d\n")
- ACE_TEXT ("Sizeof ACE_MALLOC_HEADER_SIZE: %d\n")
- ACE_TEXT ("Sizeof ACE_PI_MALLOC_PADDING_SIZE: %d\n")
- ACE_TEXT ("Sizeof ACE_PI_CONTROL_BLOCK_SIZE: %d\n")
- ACE_TEXT ("Sizeof ACE_PI_CONTROL_BLOCK_ALIGN_LONGS: %d\n")
- ACE_TEXT ("Sizeof (MALLOC_HEADER): %d\n")
- ACE_TEXT ("Sizeof (CONTROL_BLOCK): %d\n"),
- sizeof (char *),
- sizeof (size_t),
- sizeof (long),
- sizeof (double),
- ACE_MALLOC_ALIGN,
- ACE_MALLOC_PADDING,
- ACE_MALLOC_HEADER_SIZE,
- ACE_PI_MALLOC_PADDING_SIZE,
- ACE_PI_CONTROL_BLOCK_SIZE,
- ACE_PI_CONTROL_BLOCK_ALIGN_LONGS,
- sizeof (ACE_Malloc_Header),
- sizeof (ACE_PI_Control_Block)
- ));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("End <--- ACE_PI_Control_Block::print_alignment_info:\n")));
-}
-
-void
-ACE_PI_Control_Block::dump (void) const
-{
- ACE_TRACE ("ACE_Control_Block::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Name Node:\n")));
- for (ACE_Name_Node *nextn = this->name_head_;
- nextn != 0;
- nextn = nextn->next_)
- nextn->dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("freep_ = %x"), (ACE_Malloc_Header *) this->freep_));
- this->base_.dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nMalloc Header:\n")));
- for (ACE_Malloc_Header *nexth = ((ACE_Malloc_Header *)this->freep_)->next_block_;
- nexth != 0 && nexth != &this->base_;
- nexth = nexth->next_block_)
- nexth->dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_PI_Control_Block::ACE_Name_Node::ACE_Name_Node (void)
-{
- ACE_TRACE ("ACE_Name_Node::ACE_Name_Node");
-}
-
-ACE_PI_Control_Block::ACE_Name_Node::ACE_Name_Node (const char *name,
- char *name_ptr,
- char *pointer,
- ACE_Name_Node *next)
- : name_ (name_ptr),
- pointer_ (pointer),
- next_ (next),
- prev_ (0)
-{
- ACE_TRACE ("ACE_Name_Node::ACE_Name_Node");
- char *n = this->name_;
- ACE_OS::strcpy (n, name);
- if (next != 0)
- next->prev_ = this;
-}
-
-ACE_PI_Control_Block::ACE_Name_Node::ACE_Name_Node (const ACE_Name_Node &)
-{
- ACE_TRACE ("ACE_Name_Node::ACE_Name_Node");
- ACE_ASSERT (0); // not implemented!
-}
-
-const char *
-ACE_PI_Control_Block::ACE_Name_Node::name (void) const
-{
- const char *c = this->name_;
- return c;
-}
-
-void
-ACE_PI_Control_Block::ACE_Name_Node::name (const char *)
-{
- ACE_ASSERT (0); // not implemented yet.
-}
-
-ACE_PI_Control_Block::ACE_Malloc_Header::ACE_Malloc_Header (void)
- : next_block_ (0),
- size_ (0)
-{
-}
-
-void
-ACE_PI_Control_Block::ACE_Name_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Name_Node");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("pointer = %x"), (const char *) this->pointer_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nnext_ = %x"), (ACE_Name_Node *) this->next_));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT("\nname_ = (%x, %s)"),
- (const char *) this->name_,
- (const char *) this->name_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-
-ACE_Allocator *
-ACE_Allocator::instance (void)
-{
- // ACE_TRACE ("ACE_Allocator::instance");
-
- if (ACE_Allocator::allocator_ == 0)
- {
- // Perform Double-Checked Locking Optimization.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
-
- if (ACE_Allocator::allocator_ == 0)
- {
- // Have a seat. We want to avoid ever having to delete the
- // ACE_Allocator instance, to avoid shutdown order
- // dependencies. ACE_New_Allocator never needs to be
- // destroyed: its destructor is empty and its instance
- // doesn't have any state. Therefore, sizeof
- // ACE_New_Allocator is equal to sizeof void *. It's
- // instance just contains a pointer to its virtual function
- // table.
- //
- // So, we allocate space for the ACE_New_Allocator instance
- // in the data segment. Because its size is the same as
- // that of a pointer, we allocate it as a pointer so that it
- // doesn't get constructed statically. We never bother to
- // destroy it.
- static void *allocator_instance = 0;
-
- // Check this critical assumption. We put it in a variable
- // first to avoid stupid compiler warnings that the
- // condition may always be true/false.
-# if !defined (ACE_NDEBUG)
- int assertion = (sizeof allocator_instance ==
- sizeof (ACE_New_Allocator));
- ACE_ASSERT (assertion);
-# endif /* !ACE_NDEBUG */
-
- // Initialize the allocator_instance by using a placement
- // new. The ACE_NEW_RETURN below doesn't actually allocate
- // a new instance. It just initializes it in place.
- ACE_NEW_RETURN (ACE_Allocator::allocator_,
- (&allocator_instance) ACE_New_Allocator,
- 0);
- // If we ever need to cast the address of
- // allocator_instance, then expand the ACE_NEW_RETURN above
- // as follows . . .
- //
- // ACE_Allocator::allocator_ =
- // (ACE_New_Allocator *)
- // new (&allocator_instance) ACE_New_Allocator;
- }
- }
-
- return ACE_Allocator::allocator_;
-}
-
-ACE_Allocator *
-ACE_Allocator::instance (ACE_Allocator *r)
-{
- ACE_TRACE ("ACE_Allocator::instance");
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
- ACE_Allocator *t = ACE_Allocator::allocator_;
-
- // We can't safely delete it since we don't know who created it!
- ACE_Allocator::delete_allocator_ = 0;
-
- ACE_Allocator::allocator_ = r;
- return t;
-}
-
-void
-ACE_Allocator::close_singleton (void)
-{
- ACE_TRACE ("ACE_Allocator::close_singleton");
-
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance ()));
-
- if (ACE_Allocator::delete_allocator_)
- {
- // This should never be executed.... See the
- // ACE_Allocator::instance (void) method for an explanation.
- delete ACE_Allocator::allocator_;
- ACE_Allocator::allocator_ = 0;
- ACE_Allocator::delete_allocator_ = 0;
- }
-}
-
-ACE_Allocator::~ACE_Allocator (void)
-{
- ACE_TRACE ("ACE_Allocator::~ACE_Allocator");
-}
-
-ACE_Allocator::ACE_Allocator (void)
-{
- ACE_TRACE ("ACE_Allocator::ACE_Allocator");
-}
-
-void
-ACE_Static_Allocator_Base::dump (void) const
-{
- ACE_TRACE ("ACE_Static_Base_Allocator::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\noffset_ = %d"), this->offset_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsize_ = %d\n"), this->size_));
- ACE_HEX_DUMP ((LM_DEBUG, this->buffer_, this->size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_MALLOC_STATS)
-ACE_Malloc_Stats::ACE_Malloc_Stats (void)
- : nblocks_ (0),
- nchunks_ (0),
- ninuse_ (0)
-{
- ACE_TRACE ("ACE_Malloc_Stats::ACE_Malloc_Stats");
-}
-
-void
-ACE_Malloc_Stats::dump (void) const
-{
- ACE_TRACE ("ACE_Malloc_Stats::print");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- int nblocks = this->nblocks_.value ();
- int ninuse = this->ninuse_.value ();
- int nchunks = this->nchunks_.value ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("nblocks = %d"), nblocks));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nninuse = %d"), ninuse));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\nnchunks = %d"), nchunks));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Atomic_Op<ACE_PROCESS_MUTEX, int>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Atomic_Op<ACE_PROCESS_MUTEX, int>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-#endif /* ACE_HAS_MALLOC_STATS */
-
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Based_Pointer_Basic<ACE_PI_Control_Block::ACE_Malloc_Header>;
-template class ACE_Based_Pointer_Basic<ACE_PI_Control_Block::ACE_Name_Node>;
-template class ACE_Based_Pointer_Basic<char>;
-template class ACE_Based_Pointer<ACE_PI_Control_Block::ACE_Malloc_Header>;
-template class ACE_Based_Pointer<ACE_PI_Control_Block::ACE_Name_Node>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Based_Pointer_Basic<ACE_PI_Control_Block::ACE_Malloc_Header>
-#pragma instantiate ACE_Based_Pointer_Basic<ACE_PI_Control_Block::ACE_Name_Node>
-#pragma instantiate ACE_Based_Pointer_Basic<char>
-#pragma instantiate ACE_Based_Pointer<ACE_PI_Control_Block::ACE_Malloc_Header>
-#pragma instantiate ACE_Based_Pointer<ACE_PI_Control_Block::ACE_Name_Node>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1*/
-
-#endif /* ACE_MALLOC_CPP */
diff --git a/ace/Malloc.h b/ace/Malloc.h
deleted file mode 100644
index 4e6e74d01db..00000000000
--- a/ace/Malloc.h
+++ /dev/null
@@ -1,668 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Malloc.h
-//
-// = AUTHOR
-// Doug Schmidt and Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_MALLOC_H
-#define ACE_MALLOC_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Malloc_Base.h"
-
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-#include "ace/Based_Pointer_T.h"
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-
-#if defined (ACE_HAS_MALLOC_STATS)
-#include "ace/Synch_T.h"
-#if defined (ACE_HAS_THREADS)
-#define ACE_PROCESS_MUTEX ACE_Process_Mutex
-#else
-#include "ace/SV_Semaphore_Simple.h"
-#define ACE_PROCESS_MUTEX ACE_SV_Semaphore_Simple
-#endif /* ACE_HAS_THREADS */
-
-typedef ACE_Atomic_Op<ACE_PROCESS_MUTEX, int> ACE_INT;
-
-/******************************************************************
-
-* Assume that ACE_MALLOC_ALIGN is the number of bytes of the alignment
- of the platform. Usually, this will be 4 on most platforms. Some
- platforms require this to be 8. In any case, this macro should
- always be a 2's power.
-
-* Malloc_Header structure.
-
- Notice that sizeof (ACE_Malloc_Header) must be multiple of
- ACE_MALLOC_ALIGN
-
- +-----------------------------------------+
- |MALLOC_HEADER_PTR *next_block_; |
- | // Points to next free Malloc_Header |
- | // in this chain. |
- +-----------------------------------------+
- |size_t size_; |
- | // Size of buffer associate with |
- | // this Malloc_Header |
- } // The size is in number of |
- | // Malloc_Header (including this one.)|
- +-----------------------------------------+
- |long paddings_[ACE_MALLOC_PADDING_SIZE]; |
- | // Padding long array. This purpose |
- | // of this padding array is to adjust |
- | // the sizeof (Malloc_Header) to be |
- | // multiple of ACE_MALLOC_ALIGN. |
- | // If you are sure that |
- | // sizeof (MALLOC_HEADER_PTR) |
- | // + sizeof (size_t) is a multiple |
- | // of ACE_MALLOC_ALIGN, then you can |
- | // #define ACE_MALLOC_PADDING_SIZE 0 |
- | // to complete remove this data member|
- | // from Malloc_Header. Otherwise, |
- | // ACE will try to figure out the |
- | // correct value of this macro. |
- | // However, the calculation does not |
- | // always do the right thing and in |
- | // some rare cases, you'll need to |
- | // tweak this value by defining the |
- | // macro (ACE_MALLOC_PADDING_SIZE) |
- | // explicitly. |
- +-----------------------------------------+
-
-* Name_Node
-
- ACE_Malloc allows searching thru it's allocated buffer using names.
- Name_Node is an internal data structure that ACE_Malloc used to
- maintain a linked list that manages this (name, buffer) mappings.
-
- +-----------------------------------------+
- |char *name_; |
- | // Points to a dynamically allocated |
- | // char buffer that holds the name |
- | // of this node. This buffer is |
- | // allocated from using this |
- | // ACE_MALLOC instance that owns this |
- | // Name_Node (so it always points to |
- | // a buffer owned by its Malloc. |
- +-----------------------------------------+
- |char *pointer_; |
- | // Points to the content that <name_> |
- | // referring to. Like <name_>, the |
- | // context always resides within the |
- | // Malloc. |
- +-----------------------------------------+
- |NAME_NODE_PTR next_; |
- +-----------------------------------------+
- |NAME_NODE_PTR prev_; |
- | // Name Node linked list pointers. |
- +-----------------------------------------+
-
-
-* Control_Block
-
- Only the first ACE_Malloc instance that uses
- the shared memory will initialize the control block because all
- later instances are supposed to share the memory with the first
- instance. The following diagram shows the initial value of a
- Control_Block.
-
- +-----------------------------------------+
- |NAME_NODE_PTR name_head_; |<---- NULL
- | // Entry point for double-linked list.|
- | // Initialized to NULL pointer to |
- | // indicate an empty list. |
- +-----------------------------------------+
- |MALLOC_HEADER_PTR freep_; |
- | // Pointer to last un-allocated |
- | // malloc_header linked list. |---+
- +-----------------------------------------+ |
- |char lock_name_[MAXNAMELEN]; | |
- | // The global name of the lock. | |
- +-----------------------------------------+ |
- |Malloc_Stats malloc_stats_; | |
- | // (Optional statistic information. | |
- | // Do not exist if | |
- | // ACE_HAS_MALLOC_STATS is not | |
- | // defined. | |
- +-----------------------------------------+ |
- |long align_[CONTROL_BLOCK_ALIGN_LONGS]; | |
- | // | |
- +-----------------------------------------+ |
- |Malloc_Header base_; |<--+
- | // Dummy node used to anchor the |
- | // freelist. |<--+
- | +-------------+ |
- | |next_ |---+
- | +-------------+
- | |size_ |----> 0
- +-----------------------------------------+
-
- The first ACE_Malloc initializes the control block by allocating a
- memory block of size equal to or greater than sizeof (control block)
- (rounded to the closest <rounded_bytes>) and invokes the placement
- new's on to initialize the control block and its internal
- pointers/data structures. If the extra memory (memory after the
- <base_> in the following diagram) is enough to create a
- Malloc_Header chain, one is created and added to the freelist list.
- That is, if the memory size returned by init_acquire() is greater
- than the sizeof Control_Block, the control block is initialized to
- the following diagram:
-
-
- +-------------------------------------
- |name_head_; |
- +-------------------------------------+
- |MALLOC_HEADER_PTR freep_; |--+
- +-------------------------------------+ |
- |lock_name_[...]; | |
- +-------------------------------------+ |
- |malloc_stats_; (Optional) | |
- +-------------------------------------+ |
- |align_[...]; | |
- +-------------------------------------+ |
- |Malloc_Header base_; |<-+
- | +-----------+
- | |next_; |--+
- | +-----------+ |
- | |size_ = 0; | |
- +=====================================+ |
- |Malloc_Header base_; |<-+
- | +-----------+
- | |next_; |
- | +-----------+
- | |size_ = 3; |
- +-------------------------------------+
- |Malloc_Header base_; |
- | +-----------+
- | (Uninitialized) |next_; |
- | +-----------+
- | |size_; |
- +-------------------------------------+
- |Malloc_Header base_; |
- | +-----------+
- | (Uninitialized) |next_; |
- | +-----------+
- | |size_; |
- +-------------------------------------+
-
-***********************************************************/
-
-struct ACE_Export ACE_Malloc_Stats
-// TITLE
-// This keeps stats on the usage of the memory manager.
-{
- ACE_Malloc_Stats (void);
- void dump (void) const;
-
- ACE_INT nchunks_;
- // Coarse-grained unit of allocation.
-
- ACE_INT nblocks_;
- // Fine-grained unit of allocation.
-
- ACE_INT ninuse_;
- // Number of blocks in use
-};
-#define ACE_MALLOC_STATS(X) X
-#else
-#define ACE_MALLOC_STATS(X)
-#endif /* ACE_HAS_MALLOC_STATS */
-
-#if !defined (ACE_MALLOC_PADDING)
-// ACE_MALLOC_PADDING allows you to insure that allocated regions are
-// at least <ACE_MALLOC_PADDING> bytes long. It is especially useful
-// when you want areas to be at least a page long, or 32K long, or
-// something like that. It doesn't guarantee alignment to an address
-// multiple, like 8-byte data alignment, etc. The allocated area's
-// padding to your selected size is done with an added array of long[]
-// and your compiler will decide how to align things in memory.
-
-#define ACE_MALLOC_PADDING 1
-#endif /* ACE_MALLOC_PADDING */
-
-#if !defined (ACE_MALLOC_ALIGN)
-// Align the malloc header size to a multiple of a double.
-#define ACE_MALLOC_ALIGN (sizeof (double))
-#endif /* ACE_MALLOC_ALIGN */
-
-// ACE_MALLOC_HEADER_SIZE is the normalized malloc header size.
-#define ACE_MALLOC_HEADER_SIZE (ACE_MALLOC_PADDING % ACE_MALLOC_ALIGN == 0 \
- ? ACE_MALLOC_PADDING \
- : (((ACE_MALLOC_PADDING / ACE_MALLOC_ALIGN) + 1) \
- * ACE_MALLOC_ALIGN))
-
-class ACE_Export ACE_Control_Block
-{
- // = TITLE
- // This information is stored in memory allocated by the <Memory_Pool>.
- //
- // = DESCRIPTION
- // This class defines the "old" control block class for use in
- // ACE_Malloc_T. This control block implementation is
- // considerable more efficient than the "position independent"
- // one below (ACE_PI_Control_Block) but if you are going to use
- // it to construct a ACE_Malloc_T and access the memory from
- // several different processes, you must "map" the underlying
- // memory pool to the same address.
-public:
-
- class ACE_Export ACE_Malloc_Header
- {
- // = TITLE
- // This is the control block header. It's used by <ACE_Malloc>
- // to keep track of each chunk of data when it's in the free
- // list or in use.
- public:
- ACE_Malloc_Header (void);
-
- ACE_Malloc_Header *next_block_;
- // Points to next block if on free list.
-
- static void init_ptr (ACE_Malloc_Header **ptr,
- ACE_Malloc_Header *init,
- void *base_addr);
- // Initialize a malloc header pointer.
-
- size_t size_;
- // Size of this header control block.
-
-#if defined (ACE_MALLOC_PADDING_SIZE) && (ACE_MALLOC_PADDING_SIZE == 0)
- // No padding required.
-#else
-# if !defined (ACE_MALLOC_PADDING_SIZE)
-# define ACE_MALLOC_PADDING_SIZE ((int) (ACE_MALLOC_HEADER_SIZE - \
- (sizeof (ACE_Malloc_Header*) + sizeof (size_t)))\
- / (int) sizeof (long))
-# endif /* !ACE_MALLOC_PADDING_SIZE */
- long padding_[ACE_MALLOC_PADDING_SIZE < 1 ? 1 : ACE_MALLOC_PADDING_SIZE];
-#endif /* ACE_MALLOC_PADDING_SIZE && ACE_MALLOC_PADDING_SIZE == 0 */
-
- void dump (void) const;
- // Dump the state of the object.
- };
-
- class ACE_Export ACE_Name_Node
- {
- // = TITLE
- // This class supports "named memory regions" within <ACE_Malloc>.
- //
- // = DESCRIPTION
- // Internally, the named memory regions are stored as a
- // doubly-linked list within the <Memory_Pool>. This makes
- // it easy to iterate over the items in the list in both FIFO
- // and LIFO order.
- public:
- // = Initialization methods.
- ACE_Name_Node (const char *name,
- char *name_ptr,
- char *pointer,
- ACE_Name_Node *head);
- // Constructor.
-
- ACE_Name_Node (const ACE_Name_Node &);
- // Copy constructor.
-
- ACE_Name_Node (void);
- // Constructor.
-
- ~ACE_Name_Node (void);
- // Constructor.
-
- static void init_ptr (ACE_Name_Node **ptr,
- ACE_Name_Node *init,
- void *base_addr);
- // Initialize a name node pointer.
-
- const char *name (void) const;
- // Return a pointer to the name of this node.
-
- void name (const char *);
- // Assign a name;
-
- char *name_;
- // Name of the Node.
-
- char *pointer_;
- // Pointer to the contents.
-
- ACE_Name_Node *next_;
- // Pointer to the next node in the doubly-linked list.
-
- ACE_Name_Node *prev_;
- // Pointer to the previous node in the doubly-linked list.
-
- void dump (void) const;
- // Dump the state of the object.
- };
-
- static void print_alignment_info (void);
- // Print out a bunch of size info for debugging.
-
- ACE_Name_Node *name_head_;
- // Head of the linked list of Name Nodes.
-
- ACE_Malloc_Header *freep_;
- // Current head of the freelist.
-
- char lock_name_[MAXNAMELEN];
- // Name of lock thats ensures mutual exclusion.
-
-#if defined (ACE_HAS_MALLOC_STATS)
- // Keep statistics about ACE_Malloc state and performance.
- ACE_Malloc_Stats malloc_stats_;
-#define ACE_CONTROL_BLOCK_SIZE ((int)(sizeof (ACE_Name_Node*) \
- + sizeof (ACE_Malloc_Header*) \
- + MAXNAMELEN \
- + sizeof (ACE_Malloc_Stats)))
-#else
-#define ACE_CONTROL_BLOCK_SIZE ((int)(sizeof (ACE_Name_Node*) \
- + sizeof (ACE_Malloc_Header*) \
- + MAXNAMELEN))
-#endif /* ACE_HAS_MALLOC_STATS */
-
-// Notice the casting to int for <sizeof> otherwise unsigned int
-// arithmetic is used and some awful things may happen.
-#if defined (ACE_CONTROL_BLOCK_ALIGN_LONGS) && (ACE_CONTROL_BLOCK_ALIGN_LONGS == 0)
- // No padding required in control block.
-#else
-# if !defined (ACE_CONTROL_BLOCK_ALIGN_LONGS)
-# define ACE_CONTROL_BLOCK_ALIGN_LONGS \
- ((ACE_CONTROL_BLOCK_SIZE % ACE_MALLOC_ALIGN != 0 \
- ? ACE_MALLOC_ALIGN - (ACE_CONTROL_BLOCK_SIZE % ACE_MALLOC_ALIGN) \
- : ACE_MALLOC_ALIGN) / int (sizeof (long)))
-# endif /* !ACE_CONTROL_BLOCK_ALIGN_LONGS */
- long align_[ACE_CONTROL_BLOCK_ALIGN_LONGS < 1 ? 1 : ACE_CONTROL_BLOCK_ALIGN_LONGS];
- // Force alignment.
-#endif /* ACE_CONTROL_BLOCK_ALIGN_LONGS && ACE_CONTROL_BLOCK_ALIGN_LONGS == 0 */
-
- ACE_Malloc_Header base_;
- // Dummy node used to anchor the freelist. This needs to come last...
-
- void dump (void) const;
- // Dump the state of the object.
-};
-
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-
-// prepare for position independent malloc
-class ACE_Export ACE_PI_Control_Block
-{
- // = TITLE
- // This information is stored in memory allocated by the <Memory_Pool>.
- //
- // = DESCRIPTION
- // This class implements the control block structure that can be
- // used in a "position indepent" fashion, i.e., you don't need to
- // "map" the underlying memory pool to the same address in
- // processes sharing the memory. The tradoff of this flexibility
- // is more expensive malloc/free operations.
-public:
- class ACE_Malloc_Header;
- class ACE_Name_Node;
-
- typedef ACE_Based_Pointer<ACE_Malloc_Header> MALLOC_HEADER_PTR;
- typedef ACE_Based_Pointer<ACE_Name_Node> NAME_NODE_PTR;
- typedef ACE_Based_Pointer_Basic<char> CHAR_PTR;
-
- class ACE_Export ACE_Malloc_Header
- {
- // = TITLE
- // This is the control block header. It's used by <ACE_Malloc>
- // to keep track of each chunk of data when it's in the free
- // list or in use.
- public:
- ACE_Malloc_Header (void);
-
- MALLOC_HEADER_PTR next_block_;
- // Points to next block if on free list.
-
- static void init_ptr (MALLOC_HEADER_PTR *ptr,
- ACE_Malloc_Header *init,
- void *base_addr);
- // Initialize a malloc header pointer.
-
- size_t size_;
- // Size of this header control block.
-
-#if defined (ACE_PI_MALLOC_PADDING_SIZE) && (ACE_PI_MALLOC_PADDING_SIZE == 0)
- // No padding required for PI_Malloc_Header.
-#else
-# if !defined (ACE_PI_MALLOC_PADDING_SIZE)
-# define ACE_PI_MALLOC_PADDING_SIZE ((int) (ACE_MALLOC_HEADER_SIZE - \
- (sizeof (MALLOC_HEADER_PTR) + sizeof (size_t)))\
- / (int) sizeof (long))
-# endif /* !ACE_PI_MALLOC_PADDING_SIZE */
- long padding_[ACE_PI_MALLOC_PADDING_SIZE < 1 ? 1 : ACE_PI_MALLOC_PADDING_SIZE];
-#endif /* ACE_PI_MALLOC_PADDING_SIZE && ACE_PI_MALLOC_PADDING_SIZE == 0 */
-
- void dump (void) const;
- // Dump the state of the object.
-
- private:
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Malloc_Header &))
- };
-
- class ACE_Export ACE_Name_Node
- {
- // = TITLE
- // This class supports "named memory regions" within <ACE_Malloc>.
- //
- // = DESCRIPTION
- // Internally, the named memory regions are stored as a
- // doubly-linked list within the <Memory_Pool>. This makes
- // it easy to iterate over the items in the list in both FIFO
- // and LIFO order.
- public:
- // = Initialization methods.
- ACE_Name_Node (const char *name,
- char *name_ptr,
- char *pointer,
- ACE_Name_Node *head);
- // Constructor.
-
- ACE_Name_Node (const ACE_Name_Node &);
- // Copy constructor.
-
- ACE_Name_Node (void);
- // Constructor.
-
- ~ACE_Name_Node (void);
- // Constructor.
-
- static void init_ptr (NAME_NODE_PTR *ptr,
- ACE_Name_Node *init,
- void *base_addr);
- // Initialize a name node pointer.
-
- const char *name (void) const;
- // Return a pointer to the name of this node.
-
- void name (const char *);
- // Assign a name;
-
- CHAR_PTR name_;
- // Name of the Node.
-
- CHAR_PTR pointer_;
- // Pointer to the contents.
-
- NAME_NODE_PTR next_;
- // Pointer to the next node in the doubly-linked list.
-
- NAME_NODE_PTR prev_;
- // Pointer to the previous node in the doubly-linked list.
-
- void dump (void) const;
- // Dump the state of the object.
-
- private:
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Name_Node &))
- };
-
- static void print_alignment_info (void);
- // Print out a bunch of size info for debugging.
-
- NAME_NODE_PTR name_head_;
- // Head of the linked list of Name Nodes.
-
- MALLOC_HEADER_PTR freep_;
- // Current head of the freelist.
-
- char lock_name_[MAXNAMELEN];
- // Name of lock thats ensures mutual exclusion.
-
-#if defined (ACE_HAS_MALLOC_STATS)
- // Keep statistics about ACE_Malloc state and performance.
- ACE_Malloc_Stats malloc_stats_;
-#define ACE_PI_CONTROL_BLOCK_SIZE ((int)(sizeof (NAME_NODE_PTR) \
- + sizeof (MALLOC_HEADER_PTR) \
- + MAXNAMELEN \
- + sizeof (ACE_Malloc_Stats)))
-#else
-#define ACE_PI_CONTROL_BLOCK_SIZE ((int)(sizeof (NAME_NODE_PTR) \
- + sizeof (MALLOC_HEADER_PTR) \
- + MAXNAMELEN))
-#endif /* ACE_HAS_MALLOC_STATS */
-
-#if defined (ACE_PI_CONTROL_BLOCK_ALIGN_LONGS) && (ACE_PI_CONTROL_BLOCK_ALIGN_LONGS == 0)
- // No padding required for PI_Control_Block.
-#else
-# if !defined (ACE_PI_CONTROL_BLOCK_ALIGN_LONGS)
-// Notice the casting to int for <sizeof> otherwise unsigned int
-// arithmetic is used and some awful things may happen.
-# define ACE_PI_CONTROL_BLOCK_ALIGN_LONGS \
- ((ACE_PI_CONTROL_BLOCK_SIZE % ACE_MALLOC_ALIGN != 0 \
- ? ACE_MALLOC_ALIGN - (ACE_PI_CONTROL_BLOCK_SIZE % ACE_MALLOC_ALIGN) \
- : ACE_MALLOC_ALIGN) / int (sizeof (long)))
-# endif /* !ACE_PI_CONTROL_BLOCK_ALIGN_LONGS */
- long align_[ACE_PI_CONTROL_BLOCK_ALIGN_LONGS < 1 ? 1 : ACE_PI_CONTROL_BLOCK_ALIGN_LONGS];
- // Force alignment.
-#endif /* ACE_PI_CONTROL_BLOCK_ALIGN_LONGS && ACE_PI_CONTROL_BLOCK_ALIGN_LONGS == 0 */
-
- ACE_Malloc_Header base_;
- // Dummy node used to anchor the freelist. This needs to come last...
-
- void dump (void) const;
- // Dump the state of the object.
-
-private:
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Control_Block &))
-};
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-
-class ACE_Export ACE_New_Allocator : public ACE_Allocator
-{
- // = TITLE
- // Defines a class that provided a simple implementation of
- // memory allocation.
- //
- // = DESCRIPTION
- // This class uses the new/delete operators to allocate and free
- // up memory. Please note that the only methods that are
- // supported are malloc and free. All other methods are no-ops.
- // If you require this functionality, please use:
- // ACE_Allocator_Adapter <ACE_Malloc <ACE_LOCAL_MEMORY_POOL,
- // MUTEX> > This will allow you to use the added functionality
- // of bind/find/etc. while using the new/delete operators.
-public:
- virtual void *malloc (size_t nbytes);
- virtual void *calloc (size_t nbytes, char initial_value = '\0');
- virtual void free (void *ptr);
- virtual int remove (void);
- virtual int bind (const char *name, void *pointer, int duplicates = 0);
- virtual int trybind (const char *name, void *&pointer);
- virtual int find (const char *name, void *&pointer);
- virtual int find (const char *name);
- virtual int unbind (const char *name);
- virtual int unbind (const char *name, void *&pointer);
- virtual int sync (ssize_t len = -1, int flags = MS_SYNC);
- virtual int sync (void *addr, size_t len, int flags = MS_SYNC);
- virtual int protect (ssize_t len = -1, int prot = PROT_RDWR);
- virtual int protect (void *addr, size_t len, int prot = PROT_RDWR);
-#if defined (ACE_HAS_MALLOC_STATS)
- virtual void print_stats (void) const;
-#endif /* ACE_HAS_MALLOC_STATS */
- virtual void dump (void) const;
-
-private:
- // DO NOT ADD ANY STATE (DATA MEMBERS) TO THIS CLASS!!!! See the
- // <ACE_Allocator::instance> implementation for explanation.
-};
-
-class ACE_Export ACE_Static_Allocator_Base : public ACE_Allocator
-{
- // = TITLE
- // Defines a class that provided a highly optimized memory
- // management scheme for allocating memory statically.
- //
- // = DESCRIPTION
- // This class manages a fixed-size <POOL_SIZE> of memory. Every
- // time <malloc>/<calloc> is called, it simply moves an internal
- // index forward and returns a pointer to the requested chunk.
- // All memory is allocated statically (typically via the
- // <ACE_Static_Allocator> template) and <free> is a no-op. This
- // behavior is useful for use-cases where all the memory
- // allocation needs are known in advance and no deletions ever
- // occur.
-public:
- ACE_Static_Allocator_Base (char *buffer, size_t size);
- virtual void *malloc (size_t nbytes);
- virtual void *calloc (size_t nbytes, char initial_value = '\0');
- virtual void free (void *ptr);
- virtual int remove (void);
- virtual int bind (const char *name, void *pointer, int duplicates = 0);
- virtual int trybind (const char *name, void *&pointer);
- virtual int find (const char *name, void *&pointer);
- virtual int find (const char *name);
- virtual int unbind (const char *name);
- virtual int unbind (const char *name, void *&pointer);
- virtual int sync (ssize_t len = -1, int flags = MS_SYNC);
- virtual int sync (void *addr, size_t len, int flags = MS_SYNC);
- virtual int protect (ssize_t len = -1, int prot = PROT_RDWR);
- virtual int protect (void *addr, size_t len, int prot = PROT_RDWR);
-#if defined (ACE_HAS_MALLOC_STATS)
- virtual void print_stats (void) const;
-#endif /* ACE_HAS_MALLOC_STATS */
- virtual void dump (void) const;
-
-protected:
- ACE_Static_Allocator_Base (void);
- // Don't allow direct instantiations of this class.
-
- char *buffer_;
- // Pointer to the buffer.
-
- size_t size_;
- // Size of the buffer.
-
- size_t offset_;
- // Pointer to the current offset in the <buffer_>.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Malloc.i"
-#endif /* __ACE_INLINE__ */
-
-// Include the ACE_Malloc templates and ACE_Memory_Pool classes at this point.
-#include "ace/Malloc_T.h"
-#include "ace/Memory_Pool.h"
-
-#include "ace/post.h"
-#endif /* ACE_MALLOC_H */
diff --git a/ace/Malloc.i b/ace/Malloc.i
deleted file mode 100644
index 50760cf65e8..00000000000
--- a/ace/Malloc.i
+++ /dev/null
@@ -1,268 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_Control_Block::ACE_Name_Node::~ACE_Name_Node (void)
-{
-}
-
-ACE_INLINE void
-ACE_Control_Block::ACE_Malloc_Header::init_ptr
- (ACE_Malloc_Header **ptr, ACE_Malloc_Header *init, void *)
-{
- *ptr = init;
-}
-
-ACE_INLINE void
-ACE_Control_Block::ACE_Name_Node::init_ptr
- (ACE_Name_Node **ptr, ACE_Name_Node *init, void *)
-{
- *ptr = init;
-}
-
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-ACE_INLINE
-ACE_PI_Control_Block::ACE_Name_Node::~ACE_Name_Node (void)
-{
-}
-
-ACE_INLINE void
-ACE_PI_Control_Block::ACE_Malloc_Header::init_ptr
- (MALLOC_HEADER_PTR *ptr, ACE_Malloc_Header *init, void *base_addr)
-{
- new ((void *) ptr) MALLOC_HEADER_PTR (base_addr, 0);
- *ptr = init;
-}
-
-ACE_INLINE void
-ACE_PI_Control_Block::ACE_Name_Node::init_ptr
- (NAME_NODE_PTR *ptr, ACE_Name_Node *init, void *base_addr)
-{
- new ((void *) ptr) NAME_NODE_PTR (base_addr, 0);
- *ptr = init;
-}
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-
-ACE_INLINE void *
-ACE_New_Allocator::malloc (size_t nbytes)
-{
- char *ptr = 0;
-
- if (nbytes > 0)
- ACE_NEW_RETURN (ptr, char[nbytes], 0);
- return (void *) ptr;
-}
-
-ACE_INLINE void *
-ACE_New_Allocator::calloc (size_t nbytes,
- char initial_value)
-{
- char *ptr = 0;
-
- ACE_NEW_RETURN (ptr, char[nbytes], 0);
-
- ACE_OS::memset (ptr, initial_value, nbytes);
- return (void *) ptr;
-}
-
-ACE_INLINE void
-ACE_New_Allocator::free (void *ptr)
-{
- delete [] (char *) ptr;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::remove (void)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::bind (const char *, void *, int)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::trybind (const char *, void *&)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::find (const char *, void *&)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::find (const char *)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::unbind (const char *)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::unbind (const char *, void *&)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::sync (ssize_t, int)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::sync (void *, size_t, int)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::protect (ssize_t, int)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_New_Allocator::protect (void *, size_t, int)
-{
- return -1;
-}
-
-#if defined (ACE_HAS_MALLOC_STATS)
-ACE_INLINE void
-ACE_New_Allocator::print_stats (void) const
-{
-}
-#endif /* ACE_HAS_MALLOC_STATS */
-
-ACE_INLINE void
-ACE_New_Allocator::dump (void) const
-{
-}
-
-ACE_INLINE void *
-ACE_Static_Allocator_Base::malloc (size_t nbytes)
-{
- if (this->offset_ + nbytes > this->size_)
- {
- errno = ENOMEM;
- return 0;
- }
- else
- {
- // Record the current offset, increment the offset by the number
- // of bytes requested, and return the original offset.
- char *ptr = &this->buffer_[this->offset_];
- this->offset_ += nbytes;
- return (void *) ptr;
- }
-}
-
-ACE_INLINE void *
-ACE_Static_Allocator_Base::calloc (size_t nbytes,
- char initial_value)
-{
- void *ptr = this->malloc (nbytes);
-
- ACE_OS::memset (ptr, initial_value, nbytes);
- return (void *) ptr;
-}
-
-ACE_INLINE void
-ACE_Static_Allocator_Base::free (void *ptr)
-{
- // Check to see if ptr is within our pool?!
- ACE_UNUSED_ARG (ptr);
- ACE_ASSERT (ptr >= this->buffer_ && ptr < this->buffer_ + this->size_);
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::remove (void)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::bind (const char *, void *, int)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::trybind (const char *, void *&)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::find (const char *, void *&)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::find (const char *)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::unbind (const char *)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::unbind (const char *, void *&)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::sync (ssize_t, int)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::sync (void *, size_t, int)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::protect (ssize_t, int)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Static_Allocator_Base::protect (void *, size_t, int)
-{
- return -1;
-}
-
-#if defined (ACE_HAS_MALLOC_STATS)
-ACE_INLINE void
-ACE_Static_Allocator_Base::print_stats (void) const
-{
-}
-#endif /* ACE_HAS_MALLOC_STATS */
-
-ACE_INLINE
-ACE_Static_Allocator_Base::ACE_Static_Allocator_Base (char *buffer,
- size_t size)
- : buffer_ (buffer),
- size_ (size),
- offset_ (0)
-{
-}
diff --git a/ace/Malloc_Base.h b/ace/Malloc_Base.h
deleted file mode 100644
index 4fc87199788..00000000000
--- a/ace/Malloc_Base.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Malloc_Base.h
-//
-// = AUTHOR
-// Doug Schmidt and Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_MALLOC_BASE_H
-#define ACE_MALLOC_BASE_H
-#include "ace/pre.h"
-
-// The definition of this class is located in Malloc.cpp.
-
-class ACE_Export ACE_Allocator
-{
- // = TITLE
- // Interface for a dynamic memory allocator that uses inheritance
- // and dynamic binding to provide extensible mechanisms for
- // allocating and deallocating memory.
-public:
- // = Memory Management
-
- static ACE_Allocator *instance (void);
- // Get pointer to a default <ACE_Allocator>.
-
- static ACE_Allocator *instance (ACE_Allocator *);
- // Set pointer to a process-wide <ACE_Allocator> and return existing
- // pointer.
-
- static void close_singleton (void);
- // Delete the dynamically allocated Singleton
-
- ACE_Allocator (void);
- // "No-op" constructor (needed to make certain compilers happy).
-
- virtual ~ACE_Allocator (void);
- // Virtual destructor
-
- virtual void *malloc (size_t nbytes) = 0;
- // Allocate <nbytes>, but don't give them any initial value.
-
- virtual void *calloc (size_t nbytes, char initial_value = '\0') = 0;
- // Allocate <nbytes>, giving them <initial_value>.
-
- virtual void free (void *ptr) = 0;
- // Free <ptr> (must have been allocated by <ACE_Allocator::malloc>).
-
- virtual int remove (void) = 0;
- // Remove any resources associated with this memory manager.
-
- // = Map manager like functions
-
- virtual int bind (const char *name, void *pointer, int duplicates = 0) = 0;
- // Associate <name> with <pointer>. If <duplicates> == 0 then do
- // not allow duplicate <name>/<pointer> associations, else if
- // <duplicates> != 0 then allow duplicate <name>/<pointer>
- // assocations. Returns 0 if successfully binds (1) a previously
- // unbound <name> or (2) <duplicates> != 0, returns 1 if trying to
- // bind a previously bound <name> and <duplicates> == 0, else
- // returns -1 if a resource failure occurs.
-
- virtual int trybind (const char *name, void *&pointer) = 0;
- // Associate <name> with <pointer>. Does not allow duplicate
- // <name>/<pointer> associations. Returns 0 if successfully binds
- // (1) a previously unbound <name>, 1 if trying to bind a previously
- // bound <name>, or returns -1 if a resource failure occurs. When
- // this call returns <pointer>'s value will always reference the
- // void * that <name> is associated with. Thus, if the caller needs
- // to use <pointer> (e.g., to free it) a copy must be maintained by
- // the caller.
-
- virtual int find (const char *name, void *&pointer) = 0;
- // Locate <name> and pass out parameter via pointer. If found,
- // return 0, Returns -1 if failure occurs.
-
- virtual int find (const char *name) = 0;
- // returns 0 if the name is in the mapping. -1, otherwise.
-
- virtual int unbind (const char *name) = 0;
- // Unbind (remove) the name from the map. Don't return the pointer
- // to the caller
-
- virtual int unbind (const char *name, void *&pointer) = 0;
- // Break any association of name. Returns the value of pointer in
- // case the caller needs to deallocate memory.
-
- // = Protection and "sync" (i.e., flushing memory to persistent
- // backing store).
-
- virtual int sync (ssize_t len = -1, int flags = MS_SYNC) = 0;
- // Sync <len> bytes of the memory region to the backing store
- // starting at <this->base_addr_>. If <len> == -1 then sync the
- // whole region.
-
- virtual int sync (void *addr, size_t len, int flags = MS_SYNC) = 0;
- // Sync <len> bytes of the memory region to the backing store
- // starting at <addr_>.
-
- virtual int protect (ssize_t len = -1, int prot = PROT_RDWR) = 0;
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <this->base_addr_> up to <len> bytes. If <len> == -1
- // then change protection of all pages in the mapped region.
-
- virtual int protect (void *addr, size_t len, int prot = PROT_RDWR) = 0;
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <addr> up to <len> bytes.
-
-#if defined (ACE_HAS_MALLOC_STATS)
- virtual void print_stats (void) const = 0;
- // Dump statistics of how malloc is behaving.
-#endif /* ACE_HAS_MALLOC_STATS */
-
- virtual void dump (void) const = 0;
- // Dump the state of the object.
-private:
- // DO NOT ADD ANY STATE (DATA MEMBERS) TO THIS CLASS!!!! See the
- // <ACE_Allocator::instance> implementation for explanation.
-
- static ACE_Allocator *allocator_;
- // Pointer to a process-wide <ACE_Allocator> instance.
-
- static int delete_allocator_;
- // Must delete the <allocator_> if non-0.
-};
-
-#include "ace/post.h"
-#endif /* ACE_MALLOC_BASE_H */
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp
deleted file mode 100644
index 4633c6fa5a3..00000000000
--- a/ace/Malloc_T.cpp
+++ /dev/null
@@ -1,915 +0,0 @@
-// Malloc_T.cpp
-// $Id$
-
-#ifndef ACE_MALLOC_T_C
-#define ACE_MALLOC_T_C
-
-#include "ace/Malloc_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Malloc_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Malloc_T, "$Id$")
-
-template <class T, class ACE_LOCK>
-ACE_Cached_Allocator<T, ACE_LOCK>::ACE_Cached_Allocator (size_t n_chunks)
- : pool_ (0),
- free_list_ (ACE_PURE_FREE_LIST)
-{
- ACE_NEW (this->pool_,
- char[n_chunks * sizeof (T)]);
-
- for (size_t c = 0;
- c < n_chunks;
- c++)
- {
- void* placement = this->pool_ + c * sizeof(T);
- this->free_list_.add (new (placement) ACE_Cached_Mem_Pool_Node<T>);
- }
- // Put into free list using placement contructor, no real memory
- // allocation in the above <new>.
-}
-
-template <class T, class ACE_LOCK>
-ACE_Cached_Allocator<T, ACE_LOCK>::~ACE_Cached_Allocator (void)
-{
- delete [] this->pool_;
-}
-
-ACE_ALLOC_HOOK_DEFINE (ACE_Malloc_T)
-
-template <class MALLOC> int
-ACE_Allocator_Adapter<MALLOC>::protect (ssize_t len, int flags)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::protect");
- return this->allocator_.protect (len, flags);
-}
-
-template <class MALLOC> int
-ACE_Allocator_Adapter<MALLOC>::protect (void *addr, size_t len, int flags)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::protect");
- return this->allocator_.protect (addr, len, flags);
-}
-
-template <class MALLOC>
-ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter (const ACE_TCHAR *pool_name)
- : allocator_ (pool_name)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter");
-}
-
-template <class MALLOC>
-ACE_Allocator_Adapter<MALLOC>::~ACE_Allocator_Adapter (void)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::~ACE_Allocator_Adapter");
-}
-
-#if defined (ACE_HAS_MALLOC_STATS)
-template <class MALLOC> void
-ACE_Allocator_Adapter<MALLOC>::print_stats (void) const
-{
- ACE_TRACE ("ACE_Allocator_Adaptor<MALLOC>::print_stats");
- this->allocator_.print_stats ();
-}
-#endif /* ACE_HAS_MALLOC_STATS */
-
-template <class MALLOC> void
-ACE_Allocator_Adapter<MALLOC>::dump (void) const
-{
- ACE_TRACE ("ACE_Malloc<MALLOC>::dump");
- this->allocator_.dump ();
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump (void) const
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->memory_pool_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("cb_ptr_ = %x"), this->cb_ptr_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- this->cb_ptr_->dump ();
-#if defined (ACE_HAS_MALLOC_STATS)
- if (this->cb_ptr_ != 0)
- this->cb_ptr_->malloc_stats_.dump ();
-#endif /* ACE_HAS_MALLOC_STATS */
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_MALLOC_STATS)
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::print_stats (void) const
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::print_stats");
- ACE_GUARD (ACE_LOCK, ace_mon, (ACE_LOCK &) this->lock_);
-
- if (this->cb_ptr_ == 0)
- return;
- this->cb_ptr_->malloc_stats_.dump ();
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) contents of freelist:\n")));
-
- for (MALLOC_HEADER *currp = this->cb_ptr_->freep_->next_block_;
- ;
- currp = currp->next_block_)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) ptr = %u, MALLOC_HEADER units = %d, byte units = %d\n"),
- currp,
- currp->size_,
- currp->size_ * sizeof (MALLOC_HEADER)));
- if (currp == this->cb_ptr_->freep_)
- break;
- }
-}
-#endif /* ACE_HAS_MALLOC_STATS */
-
-// Put <ptr> in the free list (locked version).
-
-template<ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::free (void *ptr)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::free");
- ACE_GUARD (ACE_LOCK, ace_mon, this->lock_);
-
- this->shared_free (ptr);
-}
-
-// This function is called by the ACE_Malloc_T constructor to initialize
-// the memory pool. The first time in it allocates room for the
-// control block (as well as a chunk of memory, depending on
-// rounding...). Depending on the type of <MEM_POOL> (i.e., shared
-// vs. local) subsequent calls from other processes will only
-// initialize the control block pointer.
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::open (void)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::open");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- size_t rounded_bytes = 0;
- int first_time = 0;
-
- this->cb_ptr_ = (ACE_CB *)
- this->memory_pool_.init_acquire (sizeof *this->cb_ptr_,
- rounded_bytes,
- first_time);
- if (this->cb_ptr_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %p\n"),
- ACE_TEXT ("init_acquire failed")),
- -1);
- else if (first_time)
- {
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) first time in, control block = %u\n"), this->cb_ptr_));
-
- MALLOC_HEADER::init_ptr (&this->cb_ptr_->freep_,
- &this->cb_ptr_->base_,
- this->cb_ptr_);
-
- MALLOC_HEADER::init_ptr (&this->cb_ptr_->freep_->next_block_,
- this->cb_ptr_->freep_,
- this->cb_ptr_);
-
- NAME_NODE::init_ptr (&this->cb_ptr_->name_head_,
- 0,
- this->cb_ptr_);
-
- this->cb_ptr_->freep_->size_ = 0;
-
- if (rounded_bytes > (sizeof *this->cb_ptr_ + sizeof (MALLOC_HEADER)))
- {
- // If we've got any extra space at the end of the control
- // block, then skip past the dummy <MALLOC_HEADER> to
- // point at the first free block.
- MALLOC_HEADER *p = ((MALLOC_HEADER *) (this->cb_ptr_->freep_)) + 1;
-
- MALLOC_HEADER::init_ptr (&p->next_block_,
- 0,
- this->cb_ptr_);
-
- // Why aC++ in 64-bit mode can't grok this, I have no
- // idea... but it ends up with an extra bit set which makes
- // size_ really big without this hack.
-#if defined (__hpux) && defined (__LP64__)
- size_t hpux11_hack = (rounded_bytes - sizeof *this->cb_ptr_)
- / sizeof (MALLOC_HEADER);
- p->size_ = hpux11_hack;
-#else
- p->size_ = (rounded_bytes - sizeof *this->cb_ptr_)
- / sizeof (MALLOC_HEADER);
-#endif /* (__hpux) && defined (__LP64__) */
-
- ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nchunks_);
- ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nblocks_);
- ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.ninuse_);
-
- // Insert the newly allocated chunk of memory into the free
- // list. Add "1" to skip over the <MALLOC_HEADER> when
- // freeing the pointer.
- this->shared_free (p + 1);
- }
- }
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *pool_name)
- : memory_pool_ (pool_name),
- lock_ (pool_name == 0 ? 0 : ACE::basename (pool_name,
- ACE_DIRECTORY_SEPARATOR_CHAR))
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
- if (this->open () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *pool_name,
- const ACE_TCHAR *lock_name,
- const ACE_MEM_POOL_OPTIONS *options)
- : memory_pool_ (pool_name, options),
- lock_ (lock_name != 0 ? lock_name : ACE::basename (pool_name,
- ACE_DIRECTORY_SEPARATOR_CHAR))
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
- if (this->open () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p"),
- ACE_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
-}
-
-#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS)
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *pool_name,
- const ACE_TCHAR *lock_name,
- const void *options)
- : memory_pool_ (pool_name,
- (const ACE_MEM_POOL_OPTIONS *) options),
- lock_ (lock_name)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T");
- if (this->open () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p"),
- ACE_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T")));
-}
-#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
-
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::~ACE_Malloc_T (void)
-{
- ACE_TRACE ("ACE_Malloc_T<MEM_POOL>::~ACE_Malloc_T<MEM_POOL>");
-}
-
-// Clean up the resources allocated by ACE_Malloc_T.
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::remove (void)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::remove");
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) destroying ACE_Malloc_T\n")));
- int result = 0;
-
-#if defined (ACE_HAS_MALLOC_STATS)
- this->print_stats ();
-#endif /* ACE_HAS_MALLOC_STATS */
-
- // Remove the ACE_LOCK.
- this->lock_.remove ();
-
- // Give the memory pool a chance to release its resources.
- result = this->memory_pool_.release ();
-
- return result;
-}
-
-// General-purpose memory allocator. Assumes caller holds the locks.
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void *
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_malloc (size_t nbytes)
-{
-#if !defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_malloc");
-#endif /* !ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
- if (this->cb_ptr_ == 0)
- return 0;
-
- // Round up request to a multiple of the MALLOC_HEADER size.
- size_t nunits =
- (nbytes + sizeof (MALLOC_HEADER) - 1) / sizeof (MALLOC_HEADER)
- + 1; // Add one for the <MALLOC_HEADER> itself.
-
- MALLOC_HEADER *prevp = 0;
- MALLOC_HEADER *currp = 0;
-
- ACE_SEH_TRY
- {
- // Begin the search starting at the place in the freelist where the
- // last block was found.
- prevp = this->cb_ptr_->freep_;
- currp = prevp->next_block_;
- }
- ACE_SEH_EXCEPT (this->memory_pool_.seh_selector (GetExceptionInformation ()))
- {
- }
-
- // Search the freelist to locate a block of the appropriate size.
-
-
- while (1)
-
- // *Warning* Do not use "continue" within this while-loop.
-
- {
- ACE_SEH_TRY
- {
- if (currp->size_ >= nunits) // Big enough
- {
- ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.ninuse_);
- if (currp->size_ == nunits)
- // Exact size, just update the pointers.
- prevp->next_block_ = currp->next_block_;
- else
- {
- // Remaining chunk is larger than requested block, so
- // allocate at tail end.
- ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nblocks_);
- currp->size_ -= nunits;
- currp += currp->size_;
- MALLOC_HEADER::init_ptr (&currp->next_block_,
- 0,
- this->cb_ptr_);
- currp->size_ = nunits;
- }
- this->cb_ptr_->freep_ = prevp;
-
- // Skip over the MALLOC_HEADER when returning pointer.
- return currp + 1;
- }
- else if (currp == this->cb_ptr_->freep_)
- {
- // We've wrapped around freelist without finding a
- // block. Therefore, we need to ask the memory pool for
- // a new chunk of bytes.
-
- size_t chunk_bytes = 0;
-
- currp = (MALLOC_HEADER *)
- this->memory_pool_.acquire (nunits * sizeof (MALLOC_HEADER),
- chunk_bytes);
- if (currp != 0)
- {
- ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nblocks_);
- ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nchunks_);
- ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.ninuse_);
-
- MALLOC_HEADER::init_ptr (&currp->next_block_,
- 0,
- this->cb_ptr_);
- // Compute the chunk size in MALLOC_HEADER units.
- currp->size_ = chunk_bytes / sizeof (MALLOC_HEADER);
-
- // Insert the newly allocated chunk of memory into the
- // free list. Add "1" to skip over the
- // <MALLOC_HEADER> when freeing the pointer since
- // the first thing <free> does is decrement by this
- // amount.
- this->shared_free (currp + 1);
- currp = this->cb_ptr_->freep_;
- }
- else
- return 0;
- // Shouldn't do this here because of errors with the wchar ver
- // This is because ACE_ERROR_RETURN converts the __FILE__ to
- // wchar before printing out. The compiler will complain
- // about this since a destructor would present in a SEH block
- //ACE_ERROR_RETURN ((LM_ERROR,
- // ACE_TEXT ("(%P|%t) %p\n"),
- // ACE_TEXT ("malloc")),
- // 0);
- }
- prevp = currp;
- currp = currp->next_block_;
- }
- ACE_SEH_EXCEPT (this->memory_pool_.seh_selector (GetExceptionInformation ()))
- {
- }
- }
- ACE_NOTREACHED (return 0;)
-}
-
-// General-purpose memory allocator.
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void *
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::malloc (size_t nbytes)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::malloc");
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, 0);
-
- return this->shared_malloc (nbytes);
-}
-
-// General-purpose memory allocator.
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void *
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::calloc (size_t nbytes,
- char initial_value)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::calloc");
- void *ptr = this->malloc (nbytes);
-
- if (ptr != 0)
- ACE_OS::memset (ptr, initial_value, nbytes);
-
- return ptr;
-}
-
-// Put block AP in the free list (must be called with locks held!)
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_free (void *ap)
-{
-#if !defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_free");
-#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
- if (ap == 0 || this->cb_ptr_ == 0)
- return;
-
-
- // Adjust AP to point to the block MALLOC_HEADER
- MALLOC_HEADER *blockp = ((MALLOC_HEADER *) ap) - 1;
- MALLOC_HEADER *currp = this->cb_ptr_->freep_;
-
- // Search until we find the location where the blocks belongs. Note
- // that addresses are kept in sorted order.
-
- ACE_SEH_TRY
- {
- for (;
- blockp <= currp
- || blockp >= (MALLOC_HEADER *) currp->next_block_;
- currp = currp->next_block_)
- {
- if (currp >= (MALLOC_HEADER *) currp->next_block_
- && (blockp > currp
- || blockp < (MALLOC_HEADER *) currp->next_block_))
- // Freed block at the start or the end of the memory pool.
- break;
- }
-
- // Join to upper neighbor.
- if ((blockp + blockp->size_) == currp->next_block_)
- {
- ACE_MALLOC_STATS (--this->cb_ptr_->malloc_stats_.nblocks_);
- blockp->size_ += currp->next_block_->size_;
- blockp->next_block_ = currp->next_block_->next_block_;
- }
- else
- blockp->next_block_ = currp->next_block_;
-
- // Join to lower neighbor.
- if ((currp + currp->size_) == blockp)
- {
- ACE_MALLOC_STATS (--this->cb_ptr_->malloc_stats_.nblocks_);
- currp->size_ += blockp->size_;
- currp->next_block_ = blockp->next_block_;
- }
- else
- currp->next_block_ = blockp;
-
- ACE_MALLOC_STATS (--this->cb_ptr_->malloc_stats_.ninuse_);
- this->cb_ptr_->freep_ = currp;
- }
- ACE_SEH_EXCEPT (this->memory_pool_.seh_selector (GetExceptionInformation ()))
- {
- }
-}
-
-// No locks held here, caller must acquire/release lock.
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void*
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_find (const char *name)
-{
-#if !defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_find");
-#endif /* !ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
- if (this->cb_ptr_ == 0)
- return 0;
-
- ACE_SEH_TRY
- {
- for (NAME_NODE *node = this->cb_ptr_->name_head_;
- node != 0;
- node = node->next_)
- if (ACE_OS::strcmp (node->name (),
- name) == 0)
- return node;
- }
- ACE_SEH_EXCEPT (this->memory_pool_.seh_selector (GetExceptionInformation ()))
- {
- }
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::shared_bind (const char *name,
- void *pointer)
-{
- if (this->cb_ptr_ == 0)
- return -1;
-
- // Combine the two allocations into one to avoid overhead...
- NAME_NODE *new_node = 0;
-
- ACE_ALLOCATOR_RETURN (new_node,
- (NAME_NODE *)
- this->shared_malloc (sizeof (NAME_NODE) +
- ACE_OS::strlen (name) + 1),
- -1);
- char *name_ptr = (char *) (new_node + 1);
-
- // Use operator placement new to insert <new_node> at the head of
- // the linked list of <NAME_NODE>s.
- NAME_NODE *result =
- new (new_node) NAME_NODE (name,
- name_ptr,
- ACE_reinterpret_cast (char *,
- pointer),
- this->cb_ptr_->name_head_);
- this->cb_ptr_->name_head_ = result;
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::trybind (const char *name,
- void *&pointer)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::trybind");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- NAME_NODE *node = (NAME_NODE *) this->shared_find (name);
-
- if (node == 0)
- // Didn't find it, so insert it.
- return this->shared_bind (name, pointer);
- else
- {
- // Found it, so return a copy of the current entry.
- pointer = (char *) node->pointer_;
- return 1;
- }
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::bind (const char *name,
- void *pointer,
- int duplicates)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::bind");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- if (duplicates == 0 && this->shared_find (name) != 0)
- // If we're not allowing duplicates, then if the name is already
- // present, return 1.
- return 1;
- else
- // If we get this far, either we're allowing duplicates or we didn't
- // find the name yet.
-
- return this->shared_bind (name, pointer);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::find (const char *name,
- void *&pointer)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::find");
-
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- NAME_NODE *node = (NAME_NODE *) this->shared_find (name);
-
- if (node == 0)
- return -1;
- else
- {
- pointer = (char *) node->pointer_;
- return 0;
- }
-}
-
-// Returns a count of the number of available chunks that can hold
-// <size> byte allocations. Function can be used to determine if you
-// have reached a water mark. This implies a fixed amount of allocated
-// memory.
-//
-// @param size - the chunk size of that you would like a count of
-// @return function returns the number of chunks of the given size
-// that would fit in the currently allocated memory
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ssize_t
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::avail_chunks (size_t size) const
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::avail_chunks");
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->lock_, -1);
-
- if (this->cb_ptr_ == 0)
- return -1;
-
- size_t count = 0;
- // Avoid dividing by 0...
- size = size == 0 ? 1 : size;
- MALLOC_HEADER *currp = this->cb_ptr_->freep_;
-
- // Calculate how many will fit in this block.
- do {
- size_t avail_size = currp->size_ - 1;
- if (avail_size * sizeof (MALLOC_HEADER) >= size)
- count += avail_size * sizeof (MALLOC_HEADER) / size;
- currp = currp->next_block_;
- }
- while (currp != this->cb_ptr_->freep_);
-
- return count;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::find (const char *name)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::find");
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->shared_find (name) == 0 ? -1 : 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::unbind (const char *name, void *&pointer)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::unbind");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- if (this->cb_ptr_ == 0)
- return -1;
-
- NAME_NODE *prev = 0;
-
- for (NAME_NODE *curr = this->cb_ptr_->name_head_;
- curr != 0;
- curr = curr->next_)
- {
- if (ACE_OS::strcmp (curr->name (), name) == 0)
- {
- pointer = (char *) curr->pointer_;
-
- if (prev == 0)
- this->cb_ptr_->name_head_ = curr->next_;
- else
- prev->next_ = curr->next_;
-
- if (curr->next_)
- curr->next_->prev_ = prev;
-
- // This will free up both the node and the name due to our
- // clever trick in <bind>!
- this->shared_free (curr);
- return 0;
- }
- prev = curr;
- }
-
- // Didn't find it, so fail.
- return -1;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::unbind (const char *name)
-{
- ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::unbind");
- void *temp = 0;
- return this->unbind (name, temp);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void
-ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump (void) const
-{
- ACE_TRACE ("ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->curr_->dump ();
- this->guard_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("name_ = %s"), this->name_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_LIFO_Iterator_T (ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB> &malloc,
- const char *name)
- : malloc_ (malloc),
- curr_ (0),
- guard_ (malloc_.lock_),
- name_ (name != 0 ? ACE_OS::strdup (name) : 0)
-{
- ACE_TRACE ("ACE_Malloc_LIFO_Iterator<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_LIFO_Iterator");
- // Cheap trick to make code simple.
- // @@ Doug, this looks like trouble...
- NAME_NODE temp;
- this->curr_ = &temp;
- this->curr_->next_ = malloc_.cb_ptr_->name_head_;
-
- this->advance ();
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::~ACE_Malloc_LIFO_Iterator_T (void)
-{
- ACE_OS::free ((void *) this->name_);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::next (void *&next_entry,
- const char *&name)
-{
- ACE_TRACE ("ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::next");
-
- if (this->curr_ != 0)
- {
- next_entry = (char *) this->curr_->pointer_;
- name = this->curr_->name ();
- return 1;
- }
- else
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::next (void *&next_entry)
-{
- ACE_TRACE ("ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::next");
-
- if (this->curr_ != 0)
- {
- next_entry = this->curr_->pointer_;
- return 1;
- }
- else
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done (void) const
-{
- ACE_TRACE ("ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done");
-
- return this->curr_ == 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance (void)
-{
- ACE_TRACE ("ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance");
-
- this->curr_ = this->curr_->next_;
-
- if (this->name_ == 0)
- return this->curr_ != 0;
-
- while (this->curr_ != 0
- && ACE_OS::strcmp (this->name_,
- this->curr_->name ()) != 0)
- this->curr_ = this->curr_->next_;
-
- return this->curr_ != 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> void
-ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump (void) const
-{
- ACE_TRACE ("ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->curr_->dump ();
- this->guard_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("name_ = %s"), this->name_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_FIFO_Iterator_T (ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB> &malloc,
- const char *name)
- : malloc_ (malloc),
- curr_ (0),
- guard_ (malloc_.lock_),
- name_ (name != 0 ? ACE_OS::strdup (name) : 0)
-{
- ACE_TRACE ("ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_FIFO_Iterator");
- // Cheap trick to make code simple.
- // @@ Doug, this looks like trouble...
- NAME_NODE temp;
- this->curr_ = &temp;
- this->curr_->next_ = malloc_.cb_ptr_->name_head_;
- this->curr_->prev_ = 0;
-
- // Go to the first element that was inserted.
- this->start ();
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::~ACE_Malloc_FIFO_Iterator_T (void)
-{
- ACE_OS::free ((void *) this->name_);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::next (void *&next_entry,
- const char *&name)
-{
- ACE_TRACE ("ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::next");
-
- if (this->curr_ != 0)
- {
- next_entry = (char *) this->curr_->pointer_;
- name = this->curr_->name ();
- return 1;
- }
- else
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::next (void *&next_entry)
-{
- ACE_TRACE ("ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::next");
-
- if (this->curr_ != 0)
- {
- next_entry = this->curr_->pointer_;
- return 1;
- }
- else
- return 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done (void) const
-{
- ACE_TRACE ("ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::done");
-
- return this->curr_ == 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance (void)
-{
- ACE_TRACE ("ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::advance");
-
- this->curr_ = this->curr_->prev_;
-
- if (this->name_ == 0)
- return this->curr_ != 0;
-
- while (this->curr_ != 0
- && ACE_OS::strcmp (this->name_,
- this->curr_->name ()) != 0)
- this->curr_ = this->curr_->prev_;
-
- return this->curr_ != 0;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> int
-ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::start (void)
-{
- this->curr_ = this->curr_->next_;
- NAME_NODE *prev = 0;
-
- // Locate the element that was inserted first.
- // @@ We could optimize this by making the list a circular list or
- // storing an extra pointer.
- while (this->curr_ != 0)
- {
- prev = this->curr_;
- this->curr_ = this->curr_->next_;
- }
-
- this->curr_ = prev;
- return this->curr_ != 0;
-}
-
-#endif /* ACE_MALLOC_T_C */
diff --git a/ace/Malloc_T.h b/ace/Malloc_T.h
deleted file mode 100644
index 2a09d9db54e..00000000000
--- a/ace/Malloc_T.h
+++ /dev/null
@@ -1,618 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Malloc_T.h
-//
-// = AUTHOR
-// Doug Schmidt and Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_MALLOC_T_H
-#define ACE_MALLOC_T_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch.h"
-#include "ace/Malloc.h"
-#include "ace/Free_List.h"
-
-template <class T>
-class ACE_Cached_Mem_Pool_Node
-{
- // = TITLE
- // <ACE_Cached_Mem_Pool_Node> keeps unused memory within a free
- // list.
- //
- // = DESCRIPTION
- // The length of a piece of unused memory must be greater than
- // sizeof (void*). This makes sense because we'll waste even
- // more memory if we keep them in a separate data structure.
- // This class should really be placed within the next class
- // <ACE_Cached_Allocator>. But this can't be done due to C++
- // compiler portability problems.
-public:
- T *addr (void);
- // return the address of free memory.
-
- ACE_Cached_Mem_Pool_Node<T> *get_next (void);
- // get the next ACE_Cached_Mem_Pool_Node in a list.
-
- void set_next (ACE_Cached_Mem_Pool_Node<T> *ptr);
- // set the next ACE_Cached_Mem_Pool_Node.
-
-private:
- ACE_Cached_Mem_Pool_Node<T> *next_;
- // Since memory is not used when placed in a free list,
- // we can use it to maintain the structure of free list.
- // I was using union to hide the fact of overlapping memory
- // usage. However, that cause problem on MSVC. So, I now turn
- // back to hack this with casting.
-};
-
-template <class T, class ACE_LOCK>
-class ACE_Cached_Allocator : public ACE_New_Allocator
-{
- // = TITLE
- // Create a cached memory poll with <n_chunks> chunks each with
- // sizeof (TYPE) size.
- //
- // = DESCRIPTION
- // This class enables caching of dynamically allocated,
- // fixed-sized classes.
-public:
- ACE_Cached_Allocator (size_t n_chunks);
- // Create a cached memory poll with <n_chunks> chunks
- // each with sizeof (TYPE) size.
-
- ~ACE_Cached_Allocator (void);
- // clear things up.
-
- void* malloc (size_t);
- // get a chunk of memory from free store.
-
- void free (void *);
- // return a chunk of memory back to free store.
-
-private:
- char *pool_;
- // remember how we allocate the memory in the first place so
- // we can clear things up later.
-
- ACE_Locked_Free_List<ACE_Cached_Mem_Pool_Node<T>, ACE_LOCK> free_list_;
- // Maintain a cached memory free list.
-};
-
-template <class MALLOC>
-class ACE_Allocator_Adapter : public ACE_Allocator
-{
- // = TITLE
- // This class is an Adapter that allows the <ACE_Allocator> to
- // use the <Malloc> class below.
-public:
- // Trait.
- typedef MALLOC ALLOCATOR;
-
-#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
- // The following code will break C++ compilers that don't support
- // template typedefs correctly.
- typedef const ACE_TYPENAME MALLOC::MEMORY_POOL_OPTIONS *MEMORY_POOL_OPTIONS;
-#else
- typedef const void *MEMORY_POOL_OPTIONS;
-#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
-
- // = Initialization.
- ACE_Allocator_Adapter (const ACE_TCHAR *pool_name = 0);
-
- ACE_Allocator_Adapter (const ACE_TCHAR *pool_name,
- const ACE_TCHAR *lock_name,
- MEMORY_POOL_OPTIONS options = 0)
- : allocator_ (pool_name, lock_name, options)
- {
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter");
- }
- // Constructor (this has to be inline to avoid bugs with some C++ compilers.
-
- virtual ~ACE_Allocator_Adapter (void);
- // Destructor.
-
- // = Memory Management
-
- virtual void *malloc (size_t nbytes);
- // Allocate <nbytes>, but don't give them any initial value.
-
- virtual void *calloc (size_t nbytes, char initial_value = '\0');
- // Allocate <nbytes>, giving them all an <initial_value>.
-
- virtual void free (void *ptr);
- // Free <ptr> (must have been allocated by <ACE_Allocator::malloc>).
-
- virtual int remove (void);
- // Remove any resources associated with this memory manager.
-
- // = Map manager like functions
-
- virtual int bind (const char *name, void *pointer, int duplicates = 0);
- // Associate <name> with <pointer>. If <duplicates> == 0 then do
- // not allow duplicate <name>/<pointer> associations, else if
- // <duplicates> != 0 then allow duplicate <name>/<pointer>
- // assocations. Returns 0 if successfully binds (1) a previously
- // unbound <name> or (2) <duplicates> != 0, returns 1 if trying to
- // bind a previously bound <name> and <duplicates> == 0, else
- // returns -1 if a resource failure occurs.
-
- virtual int trybind (const char *name, void *&pointer);
- // Associate <name> with <pointer>. Does not allow duplicate
- // <name>/<pointer> associations. Returns 0 if successfully binds
- // (1) a previously unbound <name>, 1 if trying to bind a previously
- // bound <name>, or returns -1 if a resource failure occurs. When
- // this call returns <pointer>'s value will always reference the
- // void * that <name> is associated with. Thus, if the caller needs
- // to use <pointer> (e.g., to free it) a copy must be maintained by
- // the caller.
-
- virtual int find (const char *name, void *&pointer);
- // Locate <name> and pass out parameter via pointer. If found,
- // return 0, Returns -1 if <name> isn't found.
-
- virtual int find (const char *name);
- // Returns 0 if the name is in the mapping and -1 if not.
-
- virtual int unbind (const char *name);
- // Unbind (remove) the name from the map. Don't return the pointer
- // to the caller
-
- virtual int unbind (const char *name, void *&pointer);
- // Break any association of name. Returns the value of pointer in
- // case the caller needs to deallocate memory.
-
- // = Protection and "sync" (i.e., flushing data to backing store).
-
- virtual int sync (ssize_t len = -1, int flags = MS_SYNC);
- // Sync <len> bytes of the memory region to the backing store
- // starting at <this->base_addr_>. If <len> == -1 then sync the
- // whole region.
-
- virtual int sync (void *addr, size_t len, int flags = MS_SYNC);
- // Sync <len> bytes of the memory region to the backing store
- // starting at <addr_>.
-
- virtual int protect (ssize_t len = -1, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <this->base_addr_> up to <len> bytes. If <len> == -1
- // then change protection of all pages in the mapped region.
-
- virtual int protect (void *addr, size_t len, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <addr> up to <len> bytes.
-
- ALLOCATOR &alloc (void);
- // Returns the underlying allocator.
-
-#if defined (ACE_HAS_MALLOC_STATS)
- virtual void print_stats (void) const;
- // Dump statistics of how malloc is behaving.
-#endif /* ACE_HAS_MALLOC_STATS */
-
- virtual void dump (void) const;
- // Dump the state of the object.
-
-private:
- ALLOCATOR allocator_;
- // ALLOCATOR instance, which is owned by the adapter.
-};
-
-template <size_t POOL_SIZE>
-class ACE_Static_Allocator : public ACE_Static_Allocator_Base
-{
- // = TITLE
- // Defines a class that provided a highly optimized memory
- // management scheme for allocating memory statically.
- //
- // = DESCRIPTION
- // This class allocates a fixed-size <POOL_SIZE> of memory and
- // uses the <ACE_Static_Allocator_Base> class implementations of
- // <malloc> and <calloc> to optimize memory allocation from this
- // pool.
-public:
- ACE_Static_Allocator (void)
- : ACE_Static_Allocator_Base (pool_, POOL_SIZE)
- {
- // This function <{must}> be inlined!!!
- }
-
-private:
- char pool_[POOL_SIZE];
- // Pool contents.
-};
-
-// Forward declaration.
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-class ACE_Malloc_LIFO_Iterator_T;
-
-// Ensure backwards compatibility...
-#define ACE_Malloc_Iterator ACE_Malloc_LIFO_Iterator
-
-// Forward declaration.
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-class ACE_Malloc_FIFO_Iterator_T;
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-class ACE_Malloc_T
-{
- // = TITLE
- // Define a C++ class that uses parameterized types to provide
- // an extensible mechanism for encapsulating various of dynamic
- // memory management strategies.
- //
- // = DESCRIPTION
- // This class can be configured flexibly with different
- // MEMORY_POOL strategies and different types of ACE_LOCK
- // strategies.
-public:
- friend class ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>;
- friend class ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>;
- typedef ACE_MEM_POOL MEMORY_POOL;
- typedef ACE_MEM_POOL_OPTIONS MEMORY_POOL_OPTIONS;
- typedef ACE_TYPENAME ACE_CB::ACE_Name_Node NAME_NODE;
- typedef ACE_TYPENAME ACE_CB::ACE_Malloc_Header MALLOC_HEADER;
-
- // = Initialization and termination methods.
- ACE_Malloc_T (const ACE_TCHAR *pool_name = 0);
- // Initialize ACE_Malloc. This constructor passes <pool_name> to
- // initialize the memory pool, and uses <ACE::basename> to
- // automatically extract out the name used for the underlying lock
- // name (if necessary).
-
- ACE_Malloc_T (const ACE_TCHAR *pool_name,
- const ACE_TCHAR *lock_name,
- const ACE_MEM_POOL_OPTIONS *options = 0);
- // Initialize ACE_Malloc. This constructor passes <pool_name> to
- // initialize the memory pool, and uses <lock_name> to automatically
- // extract out the name used for the underlying lock name (if
- // necessary). In addition, <options> is passed through to
- // initialize the underlying memory pool.
-
-#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS)
- ACE_Malloc_T (const ACE_TCHAR *pool_name,
- const ACE_TCHAR *lock_name,
- const void *options = 0);
- // This is necessary to work around template bugs with certain C++
- // compilers.
-#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
-
- ~ACE_Malloc_T (void);
- // Destructor
-
- int remove (void);
- // Releases resources allocated by ACE_Malloc.
-
- // = Memory management
-
- void *malloc (size_t nbytes);
- // Allocate <nbytes>, but don't give them any initial value.
-
- void *calloc (size_t nbytes, char initial_value = '\0');
- // Allocate <nbytes>, giving them <initial_value>.
-
- void free (void *ptr);
- // Deallocate memory pointed to by <ptr>, which must have been
- // allocated previously by <this->malloc>.
-
- MEMORY_POOL &memory_pool (void);
- // Returns a reference to the underlying memory pool.
-
- // = Map manager like functions
-
- int bind (const char *name, void *pointer, int duplicates = 0);
- // Associate <name> with <pointer>. If <duplicates> == 0 then do
- // not allow duplicate <name>/<pointer> associations, else if
- // <duplicates> != 0 then allow duplicate <name>/<pointer>
- // assocations. Returns 0 if successfully binds (1) a previously
- // unbound <name> or (2) <duplicates> != 0, returns 1 if trying to
- // bind a previously bound <name> and <duplicates> == 0, else
- // returns -1 if a resource failure occurs.
-
- int trybind (const char *name, void *&pointer);
- // Associate <name> with <pointer>. Does not allow duplicate
- // <name>/<pointer> associations. Returns 0 if successfully binds
- // (1) a previously unbound <name>, 1 if trying to bind a previously
- // bound <name>, or returns -1 if a resource failure occurs. When
- // this call returns <pointer>'s value will always reference the
- // void * that <name> is associated with. Thus, if the caller needs
- // to use <pointer> (e.g., to free it) a copy must be maintained by
- // the caller.
-
- int find (const char *name, void *&pointer);
- // Locate <name> and pass out parameter via <pointer>. If found,
- // return 0, returns -1 if failure occurs.
-
- int find (const char *name);
- // Returns 0 if <name> is in the mapping. -1, otherwise.
-
- int unbind (const char *name);
- // Unbind (remove) the name from the map. Don't return the pointer
- // to the caller. If you want to remove all occurrences of <name>
- // you'll need to call this method multiple times until it fails...
-
- int unbind (const char *name, void *&pointer);
- // Unbind (remove) one association of <name> to <pointer>. Returns
- // the value of pointer in case the caller needs to deallocate
- // memory. If you want to remove all occurrences of <name> you'll
- // need to call this method multiple times until it fails...
-
- // = Protection and "sync" (i.e., flushing data to backing store).
-
- int sync (ssize_t len = -1, int flags = MS_SYNC);
- // Sync <len> bytes of the memory region to the backing store
- // starting at <this->base_addr_>. If <len> == -1 then sync the
- // whole region.
-
- int sync (void *addr, size_t len, int flags = MS_SYNC);
- // Sync <len> bytes of the memory region to the backing store
- // starting at <addr_>.
-
- int protect (ssize_t len = -1, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <this->base_addr_> up to <len> bytes. If <len> == -1
- // then change protection of all pages in the mapped region.
-
- int protect (void *addr, size_t len, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <addr> up to <len> bytes.
-
- ssize_t avail_chunks (size_t size) const;
- // Returns a count of the number of available chunks that can hold
- // <size> byte allocations. Function can be used to determine if you
- // have reached a water mark. This implies a fixed amount of allocated
- // memory.
- //
- // @param size - the chunk size of that you would like a count of
- // @return function returns the number of chunks of the given size
- // that would fit in the currently allocated memory.
-
-#if defined (ACE_HAS_MALLOC_STATS)
- void print_stats (void) const;
- // Dump statistics of how malloc is behaving.
-#endif /* ACE_HAS_MALLOC_STATS */
-
- ACE_LOCK &mutex (void);
- // Returns a pointer to the lock used to provide mutual exclusion to
- // an <ACE_Malloc> allocator.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int open (void);
- // Initialize the Malloc pool.
-
- int shared_bind (const char *name,
- void *pointer);
- // Associate <name> with <pointer>. Assumes that locks are held by
- // callers.
-
- void *shared_find (const char *name);
- // Try to locate <name>. If found, return the associated
- // <ACE_Name_Node>, else returns 0 if can't find the <name>.
- // Assumes that locks are held by callers. Remember to cast the
- // return value to ACE_CB::ACE_Name_Node*.
-
- void *shared_malloc (size_t nbytes);
- // Allocate memory. Assumes that locks are held by callers.
-
- void shared_free (void *ptr);
- // Deallocate memory. Assumes that locks are held by callers.
-
- ACE_CB *cb_ptr_;
- // Pointer to the control block that is stored in memory controlled
- // by <MEMORY_POOL>.
-
- MEMORY_POOL memory_pool_;
- // Pool of memory used by <ACE_Malloc> to manage its freestore.
-
- ACE_LOCK lock_;
- // Lock that ensures mutual exclusion for the <MEMORY_POOL>.
-};
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-class ACE_Malloc_LIFO_Iterator_T
-{
- // = TITLE
- // LIFO iterator for names stored in Malloc'd memory.
- //
- // = DESCRIPTION
- // Does not support deletions while iteration is occurring.
-public:
- typedef ACE_TYPENAME ACE_CB::ACE_Name_Node NAME_NODE;
- typedef ACE_TYPENAME ACE_CB::ACE_Malloc_Header MALLOC_HEADER;
-
- // = Initialization method.
- ACE_Malloc_LIFO_Iterator_T (ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB> &malloc,
- const char *name = 0);
- // if <name> = 0 it will iterate through everything else only
- // through those entries whose <name> match.
-
- ~ACE_Malloc_LIFO_Iterator_T (void);
-
- // = Iteration methods.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- int next (void *&next_entry);
- // Pass back the next <entry> in the set that hasn't yet been
- // visited. Returns 0 when all items have been seen, else 1.
-
- int next (void *&next_entry,
- const char *&name);
- // Pass back the next <entry> (and the <name> associated with it) in
- // the set that hasn't yet been visited. Returns 0 when all items
- // have been seen, else 1.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB> &malloc_;
- // Malloc we are iterating over.
-
- NAME_NODE *curr_;
- // Keeps track of how far we've advanced...
-
- ACE_Read_Guard<ACE_LOCK> guard_;
- // Lock Malloc for the lifetime of the iterator.
-
- const char *name_;
- // Name that we are searching for.
-};
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB>
-class ACE_Malloc_FIFO_Iterator_T
-{
- // = TITLE
- // FIFO iterator for names stored in Malloc'd memory.
- //
- // = DESCRIPTION
- // Does not support deletions while iteration is occurring.
-public:
- typedef ACE_TYPENAME ACE_CB::ACE_Name_Node NAME_NODE;
- typedef ACE_TYPENAME ACE_CB::ACE_Malloc_Header MALLOC_HEADER;
-
- // = Initialization method.
- ACE_Malloc_FIFO_Iterator_T (ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB> &malloc,
- const char *name = 0);
- // if <name> = 0 it will iterate through everything else only
- // through those entries whose <name> match.
-
- ~ACE_Malloc_FIFO_Iterator_T (void);
-
- // = Iteration methods.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- int next (void *&next_entry);
- // Pass back the next <entry> in the set that hasn't yet been
- // visited. Returns 0 when all items have been seen, else 1.
-
- int next (void *&next_entry,
- const char *&name);
- // Pass back the next <entry> (and the <name> associated with it) in
- // the set that hasn't yet been visited. Returns 0 when all items
- // have been seen, else 1.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- int start (void);
- // Go to the starting element that was inserted first. Returns 0
- // when there is no item in the set, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB> &malloc_;
- // Malloc we are iterating over.
-
- NAME_NODE *curr_;
- // Keeps track of how far we've advanced...
-
- ACE_Read_Guard<ACE_LOCK> guard_;
- // Lock Malloc for the lifetime of the iterator.
-
- const char *name_;
- // Name that we are searching for.
-};
-
-template <ACE_MEM_POOL_1, class ACE_LOCK>
-class ACE_Malloc : public ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block>
-{
-public:
- // = Initialization and termination methods.
- ACE_Malloc (const ACE_TCHAR *pool_name = 0);
- // Initialize ACE_Malloc. This constructor passes <pool_name> to
- // initialize the memory pool, and uses <ACE::basename> to
- // automatically extract out the name used for the underlying lock
- // name (if necessary).
-
- ACE_Malloc (const ACE_TCHAR *pool_name,
- const ACE_TCHAR *lock_name,
- const ACE_MEM_POOL_OPTIONS *options = 0);
- // Initialize ACE_Malloc. This constructor passes <pool_name> to
- // initialize the memory pool, and uses <lock_name> to automatically
- // extract out the name used for the underlying lock name (if
- // necessary). In addition, <options> is passed through to
- // initialize the underlying memory pool.
-
-#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS)
- ACE_Malloc (const ACE_TCHAR *pool_name,
- const ACE_TCHAR *lock_name,
- const void *options = 0);
- // This is necessary to work around template bugs with certain C++
- // compilers.
-#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
-};
-
-template <ACE_MEM_POOL_1, class ACE_LOCK>
-class ACE_Malloc_LIFO_Iterator : public ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block>
-{
-public:
- // = Initialization method.
- ACE_Malloc_LIFO_Iterator (ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK> &malloc,
- const char *name = 0);
- // if <name> = 0 it will iterate through everything else only
- // through those entries whose <name> match.
-};
-
-template <ACE_MEM_POOL_1, class ACE_LOCK>
-class ACE_Malloc_FIFO_Iterator : public ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block>
-{
-public:
- // = Initialization method.
- ACE_Malloc_FIFO_Iterator (ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK> &malloc,
- const char *name = 0);
- // if <name> = 0 it will iterate through everything else only
- // through those entries whose <name> match.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Malloc_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Malloc_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Malloc_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_MALLOC_H */
diff --git a/ace/Malloc_T.i b/ace/Malloc_T.i
deleted file mode 100644
index 9f0d70f7ea6..00000000000
--- a/ace/Malloc_T.i
+++ /dev/null
@@ -1,238 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Malloc_T.i
-
-template <class T> ACE_INLINE T *
-ACE_Cached_Mem_Pool_Node<T>::addr (void)
-{
- // This should be done using a single reinterpret_cast, but Sun/CC
- // (4.2) gets awfully confused when T is a char[20] (and maybe other
- // types).
- return ACE_static_cast (T *, ACE_static_cast (void *, this));
-}
-
-template <class T> ACE_INLINE ACE_Cached_Mem_Pool_Node<T> *
-ACE_Cached_Mem_Pool_Node<T>::get_next (void)
-{
- return this->next_;
-}
-
-template <class T> ACE_INLINE void
-ACE_Cached_Mem_Pool_Node<T>::set_next (ACE_Cached_Mem_Pool_Node<T> *ptr)
-{
- this->next_ = ptr;
-}
-
-template <class T, class ACE_LOCK> ACE_INLINE void *
-ACE_Cached_Allocator<T, ACE_LOCK>::malloc (size_t nbytes)
-{
- // Check if size requested fits within pre-determined size.
- if (nbytes > sizeof (T))
- return NULL;
-
- // addr() call is really not absolutely necessary because of the way
- // ACE_Cached_Mem_Pool_Node's internal structure arranged.
- return this->free_list_.remove ()->addr ();
-}
-
-template <class T, class ACE_LOCK> ACE_INLINE void
-ACE_Cached_Allocator<T, ACE_LOCK>::free (void * ptr)
-{
- this->free_list_.add ((ACE_Cached_Mem_Pool_Node<T> *) ptr) ;
-}
-
-template <class MALLOC> ACE_INLINE void *
-ACE_Allocator_Adapter<MALLOC>::malloc (size_t nbytes)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::malloc");
- return this->allocator_.malloc (nbytes);
-}
-
-template <class MALLOC> ACE_INLINE void *
-ACE_Allocator_Adapter<MALLOC>::calloc (size_t nbytes,
- char initial_value)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::malloc");
- return this->allocator_.calloc (nbytes, initial_value);
-}
-
-template <class MALLOC> ACE_INLINE MALLOC &
-ACE_Allocator_Adapter<MALLOC>::alloc (void)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::allocator");
- return this->allocator_;
-}
-
-template <class MALLOC> ACE_INLINE void
-ACE_Allocator_Adapter<MALLOC>::free (void *ptr)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::free");
- this->allocator_.free (ptr);
-}
-
-template <class MALLOC> ACE_INLINE int
-ACE_Allocator_Adapter<MALLOC>::remove (void)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::remove");
- return this->allocator_.remove ();
-}
-
-template <class MALLOC> ACE_INLINE int
-ACE_Allocator_Adapter<MALLOC>::trybind (const char *name,
- void *&pointer)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::trybind");
- return this->allocator_.trybind (name, pointer);
-}
-
-template <class MALLOC> ACE_INLINE int
-ACE_Allocator_Adapter<MALLOC>::bind (const char *name,
- void *pointer,
- int duplicates)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::bind");
- return this->allocator_.bind (name, pointer, duplicates);
-}
-
-template <class MALLOC> ACE_INLINE int
-ACE_Allocator_Adapter<MALLOC>::find (const char *name,
- void *&pointer)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::find");
- return this->allocator_.find (name, pointer);
-}
-
-template <class MALLOC> ACE_INLINE int
-ACE_Allocator_Adapter<MALLOC>::find (const char *name)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::find");
- return this->allocator_.find (name);
-}
-
-template <class MALLOC> ACE_INLINE int
-ACE_Allocator_Adapter<MALLOC>::unbind (const char *name, void *&pointer)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::unbind");
- return this->allocator_.unbind (name, pointer);
-}
-
-template <class MALLOC> ACE_INLINE int
-ACE_Allocator_Adapter<MALLOC>::unbind (const char *name)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::unbind");
- return this->allocator_.unbind (name);
-}
-
-template <class MALLOC> ACE_INLINE int
-ACE_Allocator_Adapter<MALLOC>::sync (ssize_t len, int flags)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::sync");
- return this->allocator_.sync (len, flags);
-}
-
-template <class MALLOC> ACE_INLINE int
-ACE_Allocator_Adapter<MALLOC>::sync (void *addr, size_t len, int flags)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::sync");
- return this->allocator_.sync (addr, len, flags);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE ACE_MEM_POOL &
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::memory_pool (void)
-{
- ACE_TRACE ("ACE_Malloc_T<MEMORY_POOL, ACE_LOCK, ACE_CB>::memory_pool");
- return this->memory_pool_;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::sync (ssize_t len,
- int flags)
-{
- ACE_TRACE ("ACE_Malloc_T<MEMORY_POOL, ACE_LOCK, ACE_CB>::sync");
- return this->memory_pool_.sync (len, flags);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::sync (void *addr,
- size_t len,
- int flags)
-{
- ACE_TRACE ("ACE_Malloc_T<MEMORY_POOL, ACE_LOCK, ACE_CB>::sync");
- return this->memory_pool_.sync (addr, len, flags);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::protect (ssize_t len,
- int flags)
-{
- ACE_TRACE ("ACE_Malloc_T<MEMORY_POOL, ACE_LOCK, ACE_CB>::protect");
- return this->memory_pool_.protect (len, flags);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE int
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::protect (void *addr,
- size_t len,
- int flags)
-{
- ACE_TRACE ("ACE_Malloc_T<MEMORY_POOL, ACE_LOCK, ACE_CB>::protect");
- return this->memory_pool_.protect (addr, len, flags);
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE ACE_LOCK &
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::mutex (void)
-{
- return this->lock_;
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> ACE_INLINE
-ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc (const ACE_TCHAR *pool_name)
- : ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block> (pool_name)
-{
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> ACE_INLINE
-ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc (const ACE_TCHAR *pool_name,
- const ACE_TCHAR *lock_name,
- const ACE_MEM_POOL_OPTIONS *options)
- : ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block> (pool_name, lock_name, options)
-{
-}
-
-#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS)
-template <ACE_MEM_POOL_1, class ACE_LOCK> ACE_INLINE
-ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc (const ACE_TCHAR *pool_name,
- const ACE_TCHAR *lock_name,
- const void *options)
- : ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block> (pool_name, lock_name, options)
-{
-}
-#endif /* !ACE_HAS_TEMPLATE_TYPEDEFS */
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> ACE_INLINE
-ACE_Malloc_LIFO_Iterator<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc_LIFO_Iterator (ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK> &malloc,
- const char *name)
- : ACE_Malloc_LIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block> (malloc, name)
-{
-}
-
-template <ACE_MEM_POOL_1, class ACE_LOCK> ACE_INLINE
-ACE_Malloc_FIFO_Iterator<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Malloc_FIFO_Iterator (ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK> &malloc,
- const char *name)
- : ACE_Malloc_FIFO_Iterator_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_Control_Block> (malloc, name)
-{
-}
-
-
-
-#if 0
-template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE void
-ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::init_malloc_header_ptr (void* ptr)
-{
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
- new (ptr) ACE_MALLOC_HEADER_PTR (this->cb_ptr_, 0);
-#else
- ACE_UNUSED_ARG (ptr);
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-}
-#endif
diff --git a/ace/Managed_Object.cpp b/ace/Managed_Object.cpp
deleted file mode 100644
index 1ca8fc31f18..00000000000
--- a/ace/Managed_Object.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id$
-
-#ifndef ACE_MANAGED_OBJECT_CPP
-#define ACE_MANAGED_OBJECT_CPP
-
-#include "ace/Managed_Object.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Managed_Object.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Managed_Object, "$Id$")
-
-template <class TYPE>
-ACE_Cleanup_Adapter<TYPE>::~ACE_Cleanup_Adapter (void)
-{
-}
-
-#endif /* ACE_MANAGED_OBJECT_CPP */
diff --git a/ace/Managed_Object.h b/ace/Managed_Object.h
deleted file mode 100644
index d5b8eb71d8d..00000000000
--- a/ace/Managed_Object.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Managed_Object.h
-//
-// = AUTHORS
-// David L. Levine
-//
-// ============================================================================
-
-#ifndef ACE_MANAGED_OBJECT_H
-#define ACE_MANAGED_OBJECT_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Object_Manager.h"
-
-template <class TYPE>
-class ACE_Cleanup_Adapter : public ACE_Cleanup
-{
- // = TITLE
- // Adapter for ACE_Cleanup objects that allows them to be readily
- // managed by the ACE_Object_Manager.
- //
- // = DESCRIPTION
- // This template class adapts an object of any type to be an
- // ACE_Cleanup object. The object can then be destroyed
- // type-safely by the ACE_Object_Manager. This class is
- // typically used to replace a cast; but, it's a bit cleaner and
- // allows insertion of, say, run-time type identification
- // internally if desired.
-public:
- ACE_Cleanup_Adapter (void);
- // Default constructor.
-
- virtual ~ACE_Cleanup_Adapter (void);
- // Virtual destructor, needed by some compilers for vtable placement.
-
- TYPE &object (void);
- // Accessor for contained object.
-
-private:
- TYPE object_;
- // Contained object.
-};
-
-template <class TYPE>
-class ACE_Managed_Object
-{
- // = TITLE
- // Wrapper for interface to allocate an object managed by the
- // ACE_Object_Manager.
- //
- // = DESCRIPTION
- // This template class wraps an interface that is used to
- // allocate and access an object that is managed by the
- // ACE_Object_Manager. Because static template member functions
- // are not supported by some compilers, it is a separate
- // (template) class.
- //
- // This interface is typically used to replace a static object
- // with one that is dynamically allocated. It helps to avoid
- // problems with order of static object
- // construction/destruction. Managed objects won't be allocated
- // until needed, but should be allocated when first needed. And
- // they are destroyed in the reverse order of construction.
- //
- // <get_preallocated_object> accesses a "preallocated" object,
- // i.e., one that is identified by a value in the
- // ACE_Object_Manager:: Preallocated_Object enum. These objects
- // are used internally by the ACE library.
- //
- // Hooks are provided for the application to preallocate objects
- // via the same mechanism.
- // ACE_APPLICATION_PREALLOCATED_OBJECT_DECLARATIONS can be used
- // to define enum values;
- // ACE_APPLICATION_PREALLOCATED_OBJECT_DEFINITIONS can be used
- // to define the corresponding objects. The format of the ACE
- // internal library definitions should be followed. And
- // similarly, ACE_APPLICATION_PREALLOCATED_ARRAY_DECLARATIONS
- // and ACE_APPLICATION_PREALLOCATED_ARRAY_DEFINITIONS can be
- // used to preallocate arrays.
- //
- // By default, preallocation uses dynamic allocation. The
- // preallocated objects and arrays are allocated off the heap in
- // the ACE_Object_Manager constructor. To statically place the
- // preallocated objects in program global data instead of on the
- // heap, #define ACE_HAS_STATIC_PREALLOCATION prior to building
- // the ACE library.
-public:
- static TYPE *get_preallocated_object (ACE_Object_Manager::Preallocated_Object id)
- {
- // The preallocated objects are in a separate, "read-only" array so
- // that this function doesn't need a lock. Also, because it is
- // intended _only_ for use with hard-code values, it performs no
- // range checking on "id".
-
- // Cast the return type of the the object pointer based
- // on the type of the function template parameter.
- return &((ACE_Cleanup_Adapter<TYPE> *)
- ACE_Object_Manager::preallocated_object[id])->object ();
- }
- // Get the preallocated object identified by "id". Returns a
- // pointer to the object. Beware: no error indication is provided,
- // because it can _only_ be used for accessing preallocated objects.
- // Note: the function definition is inlined here so that it compiles
- // on AIX 4.1 w/xlC v. 3.01.
-
- static TYPE *get_preallocated_array (ACE_Object_Manager::Preallocated_Array id)
- {
- // The preallocated array are in a separate, "read-only" array so
- // that this function doesn't need a lock. Also, because it is
- // intended _only_ for use with hard-code values, it performs no
- // range checking on "id".
-
- // Cast the return type of the the object pointer based
- // on the type of the function template parameter.
- return &((ACE_Cleanup_Adapter<TYPE> *)
- ACE_Object_Manager::preallocated_array[id])->object ();
- }
- // Get the preallocated array identified by "id". Returns a
- // pointer to the array. Beware: no error indication is provided,
- // because it can _only_ be used for accessing preallocated arrays.
- // Note: the function definition is inlined here so that it compiles
- // on AIX 4.1 w/xlC v. 3.01.
-
-private:
- // Disallow instantiation of this class.
- ACE_UNIMPLEMENTED_FUNC (ACE_Managed_Object (void))
- ACE_UNIMPLEMENTED_FUNC (ACE_Managed_Object (const ACE_Managed_Object<TYPE> &))
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Managed_Object<TYPE> &))
-
- friend class this_prevents_compiler_warning_about_only_private_constructors;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Managed_Object.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Managed_Object.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Managed_Object.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_MANAGED_OBJECT_H */
diff --git a/ace/Managed_Object.i b/ace/Managed_Object.i
deleted file mode 100644
index d4dd6043418..00000000000
--- a/ace/Managed_Object.i
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-template <class TYPE>
-ACE_INLINE
-ACE_Cleanup_Adapter<TYPE>::ACE_Cleanup_Adapter (void)
- // Note: don't explicitly initialize "object_", because TYPE may not
- // have a default constructor. Let the compiler figure it out . . .
-{
-}
-
-template <class TYPE>
-ACE_INLINE
-TYPE &
-ACE_Cleanup_Adapter<TYPE>::object (void)
-{
- return this->object_;
-}
diff --git a/ace/Map.cpp b/ace/Map.cpp
deleted file mode 100644
index daa8b29dc70..00000000000
--- a/ace/Map.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Map.cpp
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#include "ace/Map.h"
-
-ACE_RCSID(ace, Map, "$Id$")
-
diff --git a/ace/Map.h b/ace/Map.h
deleted file mode 100644
index 28445cf4356..00000000000
--- a/ace/Map.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Map.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_MAP_H
-#define ACE_MAP_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Include the templates here.
-#include "ace/Map_T.h"
-
-#include "ace/post.h"
-#endif /* ACE_MAP_H */
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp
deleted file mode 100644
index 63cd4983b28..00000000000
--- a/ace/Map_Manager.cpp
+++ /dev/null
@@ -1,614 +0,0 @@
-// $Id$
-
-#ifndef ACE_MAP_MANAGER_C
-#define ACE_MAP_MANAGER_C
-
-#include "ace/Malloc.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Service_Config.h"
-#include "ace/Map_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Map_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Map_Manager, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Map_Entry)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Map_Manager)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Map_Iterator_Base)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Map_Iterator)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Map_Reverse_Iterator)
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::open (size_t size,
- ACE_Allocator *alloc)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- // Close old map (if any).
- this->close_i ();
-
- // Use the user specified allocator or the default singleton one.
- if (alloc == 0)
- alloc = ACE_Allocator::instance ();
-
- this->allocator_ = alloc;
-
- // This assertion is here to help track a situation that shouldn't
- // happen.
- ACE_ASSERT (size != 0);
-
- // Resize from 0 to <size>. Note that this will also set up the
- // circular free list.
- return this->resize_i (size);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::close_i (void)
-{
- // Free entries.
- this->free_search_structure ();
-
- // Reset sizes.
- this->total_size_ = 0;
- this->cur_size_ = 0;
-
- // Reset circular free list.
- this->free_list_.next (this->free_list_id ());
- this->free_list_.prev (this->free_list_id ());
-
- // Reset circular occupied list.
- this->occupied_list_.next (this->occupied_list_id ());
- this->occupied_list_.prev (this->occupied_list_id ());
-
- return 0;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::bind_i (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- // Try to find the key.
- size_t slot = 0;
- int result = this->find_and_return_index (ext_id,
- slot);
-
- if (result == 0)
- // We found the key. Nothing to change.
- return 1;
- else
- // We didn't find the key.
- return this->shared_bind (ext_id,
- int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::next_free (size_t &free_slot)
-{
- // Look in the free list for an empty slot.
- free_slot = this->free_list_.next ();
-
- // If we do find a free slot, return successfully.
- if (free_slot != this->free_list_id ())
- return 0;
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- // Move any free slots from occupied list to free list.
- this->move_all_free_slots_from_occupied_list ();
-
- // Try again in case we found any free slots in the occupied list.
- free_slot = this->free_list_.next ();
-
- // If we do find a free slot, return successfully.
- if (free_slot != this->free_list_id ())
- return 0;
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
- // Resize the map.
- int result = this->resize_i (this->new_size ());
-
- // Check for errors.
- if (result == 0)
- // New free slot.
- free_slot = this->free_list_.next ();
-
- return result;
-}
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> void
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::move_all_free_slots_from_occupied_list (void)
-{
- //
- // In the case of lazy map managers, the movement of free slots from
- // the occupied list to the free list is delayed until we run out of
- // free slots in the free list.
- //
-
- // Go through the entire occupied list, moving free slots to the
- // free list. Note that all free slots in the occupied list are
- // moved in this loop.
- for (size_t i = this->occupied_list_.next ();
- i != this->occupied_list_id ();
- )
- {
- //
- // Note the trick used here: Information about the current slot
- // is first noted; <i> then moves to the next occupied slot;
- // only after this is the slot (potentially) moved from the
- // occupied list to the free list. This order of things, i.e.,
- // moving <i> before moving the free slot is necessary,
- // otherwise we'll forget which our next occupied slot is.
- //
-
- // Note information about current slot.
- ACE_Map_Entry<EXT_ID, INT_ID> &current_slot = this->search_structure_[i];
- size_t position_of_current_slot = i;
-
- // Move <i> to next occupied slot.
- i = this->search_structure_[i].next ();
-
- // If current slot is free
- if (current_slot.free_)
- {
- // Reset free flag to zero before moving to free list.
- current_slot.free_ = 0;
-
- // Move from occupied list to free list.
- this->move_from_occupied_list_to_free_list (position_of_current_slot);
- }
- }
-}
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> void
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::shared_move (size_t slot,
- ACE_Map_Entry<EXT_ID, INT_ID> &current_list,
- size_t current_list_id,
- ACE_Map_Entry<EXT_ID, INT_ID> &new_list,
- size_t new_list_id)
-{
- // Grab the entry.
- ENTRY &entry = this->search_structure_[slot];
-
- // Remove from current list.
-
- // Fix the entry before us.
- size_t current_list_prev = entry.prev ();
-
- if (current_list_prev == current_list_id)
- current_list.next (entry.next ());
- else
- this->search_structure_[current_list_prev].next (entry.next ());
-
- // Fix the entry after us.
- size_t current_list_next = entry.next ();
-
- if (current_list_next == current_list_id)
- current_list.prev (entry.prev ());
- else
- this->search_structure_[current_list_next].prev (entry.prev ());
-
- // Add to new list.
-
- // Fix us.
- size_t new_list_next = new_list.next ();
- entry.next (new_list_next);
- entry.prev (new_list_id);
-
- // Fix entry before us.
- new_list.next (slot);
-
- // Fix entry after us.
- if (new_list_next == new_list_id)
- new_list.prev (slot);
- else
- this->search_structure_[new_list_next].prev (slot);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::shared_bind (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- // This function assumes that the find() has already been done, and
- // therefore, simply adds to the map.
-
- // Find an empty slot.
- size_t slot = 0;
- int result = this->next_free (slot);
-
- if (result == 0)
- {
- // Copy key and value.
- this->search_structure_[slot].int_id_ = int_id;
- this->search_structure_[slot].ext_id_ = ext_id;
-
- // Move from free list to occupied list
- this->move_from_free_list_to_occupied_list (slot);
-
- // Update the current size.
- ++this->cur_size_;
- }
-
- return result;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id)
-{
- // First try to find the key.
- size_t slot = 0;
- int result = this->find_and_return_index (ext_id,
- slot);
- if (result == 0)
- {
- // We found it, so make copies of the old entries and rebind
- // current entries.
- ENTRY &ss = this->search_structure_[slot];
- old_ext_id = ss.ext_id_;
- old_int_id = ss.int_id_;
- ss.ext_id_ = ext_id;
- ss.int_id_ = int_id;
-
- // Sync changed entry.
- this->allocator_->sync (&ss, sizeof ss);
-
- return 1;
- }
- else
- // We didn't find it, so let's add it.
- return this->shared_bind (ext_id,
- int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id)
-{
- // First try to find the key.
- size_t slot = 0;
- int result = this->find_and_return_index (ext_id,
- slot);
- if (result == 0)
- {
- // We found it, so make copies of the old entries and rebind
- // current entries.
- ENTRY &ss = this->search_structure_[slot];
- old_int_id = ss.int_id_;
- ss.ext_id_ = ext_id;
- ss.int_id_ = int_id;
-
- // Sync changed entry.
- this->allocator_->sync (&ss, sizeof ss);
-
- return 1;
- }
- else
- // We didn't find it, so let's add it.
- return this->shared_bind (ext_id,
- int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- // First try to find the key.
- size_t slot = 0;
- int result = this->find_and_return_index (ext_id,
- slot);
- if (result == 0)
- {
- // We found it, so rebind current entries.
- ENTRY &ss = this->search_structure_[slot];
- ss.ext_id_ = ext_id;
- ss.int_id_ = int_id;
-
- // Sync changed entry.
- this->allocator_->sync (&ss, sizeof ss);
-
- return 1;
- }
- else
- // We didn't find it, so let's add it.
- return this->shared_bind (ext_id,
- int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::trybind_i (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- // Try to find the key.
- size_t slot = 0;
- int result = this->find_and_return_index (ext_id,
- slot);
- if (result == 0)
- {
- // Key was found. Make a copy of value, but *don't* update
- // anything in the map!
- int_id = this->search_structure_[slot].int_id_;
- return 1;
- }
- else
- // We didn't find it, so let's bind it!
- return this->bind_i (ext_id,
- int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::find_and_return_index (const EXT_ID &ext_id,
- size_t &slot)
-{
- // Go through the entire occupied list looking for the key.
- for (size_t i = this->occupied_list_.next ();
- i != this->occupied_list_id ();
- i = this->search_structure_[i].next ())
- {
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- if (this->search_structure_[i].free_)
- continue;
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
- if (this->equal (this->search_structure_[i].ext_id_,
- ext_id))
- {
- // If found, return slot.
- slot = i;
- return 0;
- }
- }
-
- // Key was not found.
- return -1;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::find_i (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- // Try to find the key.
- size_t slot = 0;
- int result = this->find_and_return_index (ext_id,
- slot);
- if (result == 0)
- // Key was found. Make a copy of value.
- int_id = this->search_structure_[slot].int_id_;
-
- return result;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind_and_return_index (const EXT_ID &ext_id,
- size_t &slot)
-{
- // Try to find the key.
- int result = this->find_and_return_index (ext_id,
- slot);
-
- if (result == 0)
- {
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- //
- // In the case of lazy map managers, the movement of free slots
- // from the occupied list to the free list is delayed until we
- // run out of free slots in the free list.
- //
-
- this->search_structure_[slot].free_ = 1;
-
-#else
-
- // Move from occupied list to free list.
- this->move_from_occupied_list_to_free_list (slot);
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
- // Update the current size.
- --this->cur_size_;
- }
-
- return result;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind_i (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- // Unbind the entry.
- size_t slot = 0;
- int result = this->unbind_and_return_index (ext_id,
- slot);
- if (result == 0)
- // If found, copy the value.
- int_id = this->search_structure_[slot].int_id_;
-
- return result;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::resize_i (size_t new_size)
-{
- size_t i;
- ENTRY *temp = 0;
-
- // Allocate new memory.
- ACE_ALLOCATOR_RETURN (temp,
- (ENTRY *) this->allocator_->malloc (new_size * sizeof (ENTRY)),
- -1);
-
- // Copy over the occupied entires.
- for (i = this->occupied_list_.next ();
- i != this->occupied_list_id ();
- i = this->search_structure_[i].next ())
- // Call the copy constructor using operator placement new.
- new (&(temp[i])) ENTRY (this->search_structure_[i]);
-
- // Copy over the free entires.
- for (i = this->free_list_.next ();
- i != this->free_list_id ();
- i = this->search_structure_[i].next ())
- // Call the copy constructor using operator placement new.
- new (&(temp[i])) ENTRY (this->search_structure_[i]);
-
- // Construct the new elements.
- for (i = this->total_size_; i < new_size; i++)
- {
- // Call the constructor for each element in the array using
- // operator placement new. Note that this requires a default
- // constructor for <EXT_ID> and <INT_ID>.
- new (&(temp[i])) ENTRY;
- temp[i].next (i + 1);
- temp[i].prev (i - 1);
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- // Even though this slot is initially free, we need the <free_>
- // flag to be zero so that we don't have to set it when the slot
- // is moved to the occupied list. In addition, this flag has no
- // meaning while this slot is in the free list.
- temp[i].free_ = 0;
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
- }
-
- // Add new entries to the free list.
- this->free_list_.next (this->total_size_);
- this->free_list_.prev (new_size - 1);
- temp[new_size - 1].next (this->free_list_id ());
- temp[this->total_size_].prev (this->free_list_id ());
-
- // Remove/free old elements, update the new totoal size.
- this->free_search_structure ();
- this->total_size_ = new_size;
-
- // Start using new elements.
- this->search_structure_ = temp;
-
- return 0;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> size_t
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::new_size (void)
-{
- // Calculate the new size.
- size_t current_size = this->total_size_;
-
- if (current_size < MAX_EXPONENTIAL)
- // Exponentially increase if we haven't reached MAX_EXPONENTIAL.
- current_size *= 2;
- else
- // Linear increase if we have reached MAX_EXPONENTIAL.
- current_size += LINEAR_INCREASE;
-
- // This should be the new size.
- return current_size;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> void
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::free_search_structure (void)
-{
- // Free up the structure.
- if (this->search_structure_ != 0)
- {
- for (size_t i = 0; i < this->total_size_; i++)
- // Explicitly call the destructor.
- {
- ENTRY *ss = &this->search_structure_[i];
- // The "if" second argument results in a no-op instead of
- // deallocation.
- ACE_DES_FREE_TEMPLATE2 (ss, ACE_NOOP,
- ACE_Map_Entry, EXT_ID, INT_ID);
- }
-
- // Actually free the memory.
- this->allocator_->free (this->search_structure_);
- this->search_structure_ = 0;
- }
-}
-
-template <class EXT_ID, class INT_ID> void
-ACE_Map_Entry<EXT_ID, INT_ID>::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %d"), this->next_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("prev_ = %d"), this->prev_));
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("free_ = %d"), this->free_));
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> void
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("total_size_ = %d"), this->total_size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d"), this->cur_size_));
- this->allocator_->dump ();
- this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> void
-ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::dump_i (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %d"), this->next_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-ACE_Map_Entry<EXT_ID, INT_ID>&
-ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::operator* (void) const
-{
- // @@ This function should be inlined. We moved it here to avoid a
- // compiler bug in SunCC 4.2. Once we know the correct patch to fix
- // the compiler problem, it should be moved back to .i file again.
- ACE_Map_Entry<EXT_ID, INT_ID> *retv = 0;
-
- int result = this->next (retv);
- ACE_ASSERT (result != 0);
- ACE_UNUSED_ARG (result);
-
- return *retv;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> void
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::dump (void) const
-{
- this->dump_i ();
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> void
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::dump (void) const
-{
- this->dump_i ();
-}
-
-#endif /* ACE_MAP_MANAGER_C */
diff --git a/ace/Map_Manager.h b/ace/Map_Manager.h
deleted file mode 100644
index dde1cdde82e..00000000000
--- a/ace/Map_Manager.h
+++ /dev/null
@@ -1,553 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Map_Manager.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_MAP_MANAGER_H
-#define ACE_MAP_MANAGER_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch.h"
-
-// Forward declaration.
-class ACE_Allocator;
-
-template <class EXT_ID, class INT_ID>
-class ACE_Map_Entry
-{
- // = TITLE
- // An entry in the Map.
-public:
-# if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
- ~ACE_Map_Entry (void);
- // We need this destructor to keep some compilers from complaining.
- // It's just a no-op, however.
-# endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
-
- EXT_ID ext_id_;
- // Key used to look up an entry.
-
- INT_ID int_id_;
- // The contents of the entry itself.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- // = These are really private, but unfortunately template friends
- // are not portable.
-
- size_t next (void) const;
- void next (size_t n);
- // Get/Set next entry.
-
- size_t prev (void) const;
- void prev (size_t p);
- // Get/Set prev entry.
-
- size_t next_;
- // Keeps track of the next entry.
-
- size_t prev_;
- // Keeps track of the previous entry.
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- int free_;
- // Is this entry free?
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
-};
-
-// Forward decl.
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Map_Iterator_Base;
-
-// Forward decl.
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Map_Iterator;
-
-// Forward decl.
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Map_Reverse_Iterator;
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Map_Manager
-{
- // = TITLE
- // Define a map abstraction that associates <EXT_ID>s with
- // <INT_ID>s.
- //
- // = DESCRIPTION
- // The <EXT_ID> must support <operator==>. This constraint can
- // be alleviated via template specialization, as shown in the
- // $ACE_ROOT/tests/Conn_Test.cpp test.
- //
- // This class uses an <ACE_Allocator> to allocate memory. The
- // user can make this a persistant class by providing an
- // <ACE_Allocator> with a persistable memory pool.
- //
- // This implementation of a map uses an array, which is searched
- // linearly. For more efficient searching you should use the
- // <ACE_Hash_Map_Manager>.
-public:
- friend class ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>;
- friend class ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>;
- friend class ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>;
-
- // = Traits.
- typedef EXT_ID KEY;
- typedef INT_ID VALUE;
- typedef ACE_Map_Entry<EXT_ID, INT_ID> ENTRY;
- typedef ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> ITERATOR;
- typedef ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> REVERSE_ITERATOR;
-
- typedef ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> iterator;
- typedef ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> reverse_iterator;
-
- // = Initialization and termination methods.
- ACE_Map_Manager (ACE_Allocator *alloc = 0);
- // Initialize a <Map_Manager> with the <ACE_DEFAULT_MAP_SIZE>.
-
- ACE_Map_Manager (size_t size,
- ACE_Allocator *alloc = 0);
- // Initialize a <Map_Manager> with <size> entries.
-
- int open (size_t length = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0);
- // Initialize a <Map_Manager> with size <length>.
-
- int close (void);
- // Close down a <Map_Manager> and release dynamically allocated
- // resources.
-
- ~ACE_Map_Manager (void);
- // Close down a <Map_Manager> and release dynamically allocated
- // resources.
-
- int bind (const EXT_ID &ext_id,
- const INT_ID &int_id);
- // Associate <ext_id> with <int_id>. If <ext_id> is already in the
- // map then the <Map_Entry> is not changed. Returns 0 if a new
- // entry is bound successfully, returns 1 if an attempt is made to
- // bind an existing entry, and returns -1 if failures occur.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id);
- // Reassociate <ext_id> with <int_id>. If <ext_id> is not in the
- // map then behaves just like <bind>. Otherwise, store the old
- // values of <ext_id> and <int_id> into the "out" parameters and
- // rebind the new parameters. This is very useful if you need to
- // have an atomic way of updating <Map_Entries> and you also need
- // full control over memory allocation. Returns 0 if a new entry is
- // bound successfully, returns 1 if an existing entry was rebound,
- // and returns -1 if failures occur.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id);
- // Reassociate <ext_id> with <int_id>. If <ext_id> is not in the
- // map then behaves just like <bind>. Otherwise, store the old
- // values of <int_id> into the "out" parameter and rebind the new
- // parameters. Returns 0 if a new entry is bound successfully,
- // returns 1 if an existing entry was rebound, and returns -1 if
- // failures occur.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id);
- // Reassociate <ext_id> with <int_id>. Old values in the map are
- // ignored.
-
- int trybind (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Associate <ext_id> with <int_id> if and only if <ext_id> is not
- // in the map. If <ext_id> is already in the map then the <int_id>
- // parameter is overwritten with the existing value in the map
- // Returns 0 if a new entry is bound successfully, returns 1 if an
- // attempt is made to bind an existing entry, and returns -1 if
- // failures occur.
-
- int find (const EXT_ID &ext_id,
- INT_ID &int_id) const;
- // Locate <ext_id> and pass out parameter via <int_id>. If found,
- // returns and non-negative integer; returns -1 if not found.
-
- int find (const EXT_ID &ext_id) const;
- // Returns a non-negative integer if the <ext_id> is in the mapping, otherwise -1.
-
- int unbind (const EXT_ID &ext_id);
- // Unbind (remove) the <ext_id> from the map. Don't return the
- // <int_id> to the caller (this is useful for collections where the
- // <int_id>s are *not* dynamically allocated...) Returns 0 if
- // successful, else -1.
-
- int unbind (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Break any association of <ext_id>. Returns the value of <int_id>
- // in case the caller needs to deallocate memory. Returns 0 if
- // successful, else -1.
-
- size_t current_size (void) const;
- // Return the current size of the map.
-
- size_t total_size (void) const;
- // Return the total size of the map.
-
- ACE_LOCK &mutex (void);
- // Returns a reference to the underlying <ACE_LOCK>. This makes it
- // possible to acquire the lock explicitly, which can be useful in
- // some cases if you instantiate the <ACE_Atomic_Op> with an
- // <ACE_Recursive_Mutex> or <ACE_Process_Mutex>, or if you need to
- // guard the state of an iterator. NOTE: the right name would be
- // <lock>, but HP/C++ will choke on that!
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL styled iterator factory functions.
-
- ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> begin (void);
- ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> end (void);
- // Return forward iterator.
-
- ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> rbegin (void);
- ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> rend (void);
- // Return reverse iterator.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
-
- // = The following methods do the actual work.
-
- // These methods assume that the locks are held by the private
- // methods.
-
- int bind_i (const EXT_ID &ext_id,
- const INT_ID &int_id);
- // Performs the binding of <ext_id> to <int_id>. Must be called
- // with locks held.
-
- int shared_bind (const EXT_ID &ext_id,
- const INT_ID &int_id);
- // Bind an entry (without finding first). Must be called with locks
- // held.
-
- int rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id);
- // Performs a rebinding of <ext_it> to <int_id>. Also, recovers old
- // values. Must be called with locks held.
-
- int rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id);
- // Performs a rebinding of <ext_it> to <int_id>. Also, recovers old
- // values. Must be called with locks held.
-
- int rebind_i (const EXT_ID &ext_id,
- const INT_ID &int_id);
- // Performs a rebinding of <ext_it> to <int_id>. Must be called
- // with locks held.
-
- int trybind_i (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Performs a conditional bind of <int_id> using <ext_id> as the
- // key. Must be called with locks held.
-
- int find_i (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Performs a find of <int_id> using <ext_id> as the key. Must be
- // called with locks held.
-
- int find_and_return_index (const EXT_ID &ext_id,
- size_t &slot);
- // Performs a find using <ext_id> as the key. Must be called with
- // locks held.
-
- int unbind_i (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Performs an unbind of <int_id> using <ext_id> as the key. Must
- // be called with locks held.
-
- int unbind_i (const EXT_ID &ext_id);
- // Performs an unbind using <ext_id> as the key. Must be called
- // with locks held.
-
- int unbind_and_return_index (const EXT_ID &ext_id,
- size_t &slot);
- // Performs an unbind using <ext_id> as the key. Must be called
- // with locks held.
-
- int resize_i (size_t size);
- // Resize the map. Must be called with locks held.
-
- int close_i (void);
- // Close down a <Map_Manager>. Must be called with locks held.
-
- int equal (const EXT_ID &id1, const EXT_ID &id2);
- // Returns 1 if <id1> == <id2>, else 0. This is defined as a
- // separate method to facilitate template specialization.
-
- size_t new_size (void);
- // This function returns the new size of the Map Manager. This
- // function is called when we run out of room and need to resize.
-
- void free_search_structure (void);
- // Explicitly call the destructors and free up the
- // <search_structure_>.
-
- size_t free_list_id (void) const;
- // Id of the free list sentinel.
-
- size_t occupied_list_id (void) const;
- // Id of the occupied list sentinel.
-
- int next_free (size_t &slot);
- // Finds the next free slot.
-
- void move_from_free_list_to_occupied_list (size_t slot);
- // Move from free list to occupied list.
-
- void move_from_occupied_list_to_free_list (size_t slot);
- // Move from occupied list to free list.
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- void move_all_free_slots_from_occupied_list (void);
- // In the case of lazy map managers, the movement of free slots from
- // the occupied list to the free list is delayed until we run out of
- // free slots in the free list. This function goes through the
- // entire occupied list, moving free slots to the free list.
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
- void shared_move (size_t slot,
- ACE_Map_Entry<EXT_ID, INT_ID> &current_list,
- size_t current_list_id,
- ACE_Map_Entry<EXT_ID, INT_ID> &new_list,
- size_t new_list_id);
- // Move helper.
-
- ACE_Allocator *allocator_;
- // Pointer to a memory allocator.
-
- ACE_LOCK lock_;
- // Synchronization variable for the MT_SAFE <ACE_Map_Manager>.
-
- ACE_Map_Entry<EXT_ID, INT_ID> *search_structure_;
- // Implement the Map as a resizeable array of <ACE_Map_Entry>.
-
- size_t total_size_;
- // Total number of elements in this->search_structure_.
-
- size_t cur_size_;
- // Current size of the map.
-
- ACE_Map_Entry<EXT_ID, INT_ID> free_list_;
- // Free list.
-
- ACE_Map_Entry<EXT_ID, INT_ID> occupied_list_;
- // Occupied list.
-
- enum
- {
- // Grow map exponentially up to 64K
- MAX_EXPONENTIAL = 64 * 1024,
-
- // Afterwards grow in chunks of 32K
- LINEAR_INCREASE = 32 * 1024
- };
-
-private:
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Map_Manager (const ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &))
-};
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Map_Iterator_Base
-{
- // = TITLE
- // Iterator for the <ACE_Map_Manager>.
- //
- // = DESCRIPTION
- // This class factors out common code from its templatized
- // subclasses.
-public:
- // = Initialization method.
- ACE_Map_Iterator_Base (ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> &mm);
- // Contructor. If head != 0, the iterator constructed is positioned
- // at the head of the map, it is positioned at the end otherwise.
-
- // = Iteration methods.
-
- int next (ACE_Map_Entry<EXT_ID, INT_ID> *&next_entry) const;
- // Pass back the next <entry> that hasn't been seen in the Set.
- // Returns 0 when all items have been seen, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- ACE_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
- // Returns a reference to the interal element <this> is pointing to.
-
- ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>& map (void);
- // Returns reference the Map_Manager that is being iterated
- // over.
-
- int operator== (const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &) const;
- int operator!= (const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &) const;
- // Check if two iterators point to the same position
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- int forward_i (void);
- // Move forward by one element in the set. Returns 0 when there's
- // no more item in the set after the current items, else 1.
-
- int reverse_i (void);
- // Move backware by one element in the set. Returns 0 when there's
- // no more item in the set before the current item, else 1.
-
- void dump_i (void) const;
- // Dump the state of an object.
-
- ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> *map_man_;
- // Map we are iterating over.
-
- size_t next_;
- // Keeps track of how far we've advanced...
-};
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Map_Iterator : public ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>
-{
- // = TITLE
- // Forward iterator for the <ACE_Map_Manager>.
- //
- // = DESCRIPTION
- // This class does not perform any internal locking of the
- // <ACE_Map_Manager> it is iterating upon since locking is
- // inherently inefficient and/or error-prone within an STL-style
- // iterator. If you require locking, you can explicitly use an
- // <ACE_Guard> or <ACE_Read_Guard> on the <ACE_Map_Manager>'s
- // internal lock, which is accessible via its <mutex> method.
-public:
- // = Initialization method.
- ACE_Map_Iterator (ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> &mm,
- int pass_end = 0);
-
- // = Iteration methods.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL styled iteration, compare, and reference functions.
-
- ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> &operator++ (void);
- // Prefix advance.
-
- ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> operator++ (int);
- // Postfix advance.
-
- ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> &operator-- (void);
- // Prefix reverse.
-
- ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> operator-- (int);
- // Postfix reverse.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK>
-class ACE_Map_Reverse_Iterator : public ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>
-{
- // = TITLE
- // Reverse Iterator for the <ACE_Map_Manager>.
- //
- // = DESCRIPTION
- // This class does not perform any internal locking of the
- // <ACE_Map_Manager> it is iterating upon since locking is
- // inherently inefficient and/or error-prone within an STL-style
- // iterator. If you require locking, you can explicitly use an
- // <ACE_Guard> or <ACE_Read_Guard> on the <ACE_Map_Manager>'s
- // internal lock, which is accessible via its <mutex> method.
-public:
- // = Initialization method.
- ACE_Map_Reverse_Iterator (ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> &mm,
- int pass_end = 0);
-
- // = Iteration methods.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL styled iteration, compare, and reference functions.
-
- ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> &operator++ (void);
- // Prefix reverse.
-
- ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> operator++ (int);
- // Postfix reverse.
-
- ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> &operator-- (void);
- // Prefix advance.
-
- ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> operator-- (int);
- // Postfix advance.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Map_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Map_Manager.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Map_Manager.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_MAP_MANAGER_H */
diff --git a/ace/Map_Manager.i b/ace/Map_Manager.i
deleted file mode 100644
index 64eaca8af96..00000000000
--- a/ace/Map_Manager.i
+++ /dev/null
@@ -1,532 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-# if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
-template <class EXT_ID, class INT_ID> ACE_INLINE
-ACE_Map_Entry<EXT_ID, INT_ID>::~ACE_Map_Entry (void)
-{
- // No-op just to keep some compilers happy...
-}
-#endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
-
-template <class EXT_ID, class INT_ID> ACE_INLINE size_t
-ACE_Map_Entry<EXT_ID, INT_ID>::next (void) const
-{
- return this->next_;
-}
-
-template <class EXT_ID, class INT_ID> ACE_INLINE void
-ACE_Map_Entry<EXT_ID, INT_ID>::next (size_t n)
-{
- this->next_ = n;
-}
-
-template <class EXT_ID, class INT_ID> ACE_INLINE size_t
-ACE_Map_Entry<EXT_ID, INT_ID>::prev (void) const
-{
- return this->prev_;
-}
-
-template <class EXT_ID, class INT_ID> ACE_INLINE void
-ACE_Map_Entry<EXT_ID, INT_ID>::prev (size_t p)
-{
- this->prev_ = p;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Manager (size_t size,
- ACE_Allocator *alloc)
- : allocator_ (0),
- search_structure_ (0),
- total_size_ (0),
- cur_size_ (0)
-{
- if (this->open (size, alloc) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Map_Manager\n")));
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Manager (ACE_Allocator *alloc)
- : allocator_ (0),
- search_structure_ (0),
- total_size_ (0),
- cur_size_ (0)
-{
- if (this->open (ACE_DEFAULT_MAP_SIZE, alloc) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Map_Manager\n")));
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::close (void)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->close_i ();
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::~ACE_Map_Manager (void)
-{
- this->close ();
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::bind (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->bind_i (ext_id,
- int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->rebind_i (ext_id,
- int_id,
- old_ext_id,
- old_int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->rebind_i (ext_id,
- int_id,
- old_int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->rebind_i (ext_id,
- int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::trybind (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->trybind_i (ext_id,
- int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::find (const EXT_ID &ext_id) const
-{
- ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> *nc_this =
- (ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> *)
- this;
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, nc_this->lock_, -1);
-
- size_t slot = 0;
- return nc_this->find_and_return_index (ext_id,
- slot);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::find (const EXT_ID &ext_id,
- INT_ID &int_id) const
-{
- ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> *nc_this =
- (ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> *)
- this;
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, nc_this->lock_, -1);
-
- return nc_this->find_i (ext_id,
- int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind_i (const EXT_ID &ext_id)
-{
- // Unbind the entry.
- size_t slot = 0;
- return this->unbind_and_return_index (ext_id,
- slot);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->unbind_i (ext_id,
- int_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind (const EXT_ID &ext_id)
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
- return this->unbind_i (ext_id);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE size_t
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::current_size (void) const
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, ACE_const_cast (ACE_LOCK &, this->lock_), ACE_static_cast (size_t, -1));
- return this->cur_size_;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE size_t
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::total_size (void) const
-{
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, ACE_const_cast (ACE_LOCK &, this->lock_), ACE_static_cast (size_t, -1));
- return this->total_size_;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE ACE_LOCK &
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::mutex (void)
-{
- return this->lock_;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE void
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::move_from_free_list_to_occupied_list (size_t slot)
-{
- this->shared_move (slot,
- this->free_list_,
- this->free_list_id (),
- this->occupied_list_,
- this->occupied_list_id ());
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE void
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::move_from_occupied_list_to_free_list (size_t slot)
-{
- this->shared_move (slot,
- this->occupied_list_,
- this->occupied_list_id (),
- this->free_list_,
- this->free_list_id ());
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::equal (const EXT_ID &id1,
- const EXT_ID &id2)
-{
- return id1 == id2;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE size_t
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::free_list_id (void) const
-{
- // If you change ~0, please change
- // ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key()
- // accordingly.
- return (size_t) ~0;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE size_t
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::occupied_list_id (void) const
-{
- return (size_t) ~1;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::begin (void)
-{
- return ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> (*this);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::end (void)
-{
- return ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> (*this, 1);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rbegin (void)
-{
- return ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> (*this);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rend (void)
-{
- return ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> (*this, 1);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Iterator_Base (ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm)
- : map_man_ (&mm),
- next_ (this->map_man_->occupied_list_id ())
-{
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::next (ACE_Map_Entry<EXT_ID, INT_ID> *&mm) const
-{
- if (this->next_ != this->map_man_->occupied_list_id ())
- {
- mm = &this->map_man_->search_structure_[this->next_];
- return 1;
- }
- else
- return 0;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::done (void) const
-{
- return this->next_ == this->map_man_->occupied_list_id ();
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::forward_i (void)
-{
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- while (1)
- {
- // Go to the next item in the list.
- this->next_ = this->map_man_->search_structure_[this->next_].next ();
-
- // Stop if we reach the end.
- if (this->done ())
- break;
-
- // Break if we find a non-free slot.
- if (!this->map_man_->search_structure_[this->next_].free_)
- {
- break;
- }
- }
-
-#else
-
- this->next_ = this->map_man_->search_structure_[this->next_].next ();
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
- return this->next_ != this->map_man_->occupied_list_id ();
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::reverse_i (void)
-{
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- while (1)
- {
- // Go to the prev item in the list.
- this->next_ = this->map_man_->search_structure_[this->next_].prev ();
-
- // Stop if we reach the end.
- if (this->done ())
- break;
-
- // Break if we find a non-free slot.
- if (!this->map_man_->search_structure_[this->next_].free_)
- {
- break;
- }
- }
-
-#else
-
- this->next_ = this->map_man_->search_structure_[this->next_].prev ();
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
- return this->next_ != this->map_man_->occupied_list_id ();
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &
-ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::map (void)
-{
- return *this->map_man_;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::operator== (const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &rhs) const
-{
- return (this->map_man_ == rhs.map_man_ &&
- this->next_ == rhs.next_);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::operator!= (const ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> &rhs) const
-{
- return !this->operator== (rhs);
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Iterator (ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
- int pass_end)
- : ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> (mm)
-{
- if (!pass_end)
- {
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- // Start here.
- this->next_ = this->map_man_->occupied_list_.next ();
-
- while (1)
- {
- // Stop if we reach the end.
- if (this->done ())
- break;
-
- // Break if we find a non-free slot.
- if (!this->map_man_->search_structure_[this->next_].free_)
- {
- break;
- }
-
- // Go to the next item in the list.
- this->next_ = this->map_man_->search_structure_[this->next_].next ();
- }
-
-#else
-
- this->next_ = this->map_man_->occupied_list_.next ();
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
- }
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::advance (void)
-{
- return this->forward_i ();
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator++ (void)
-{
- this->forward_i ();
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator++ (int)
-{
- ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> retv (*this);
- this->forward_i ();
- return retv;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator-- (void)
-{
- this->reverse_i ();
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>
-ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator-- (int)
-{
- ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> retv (*this);
- this->reverse_i ();
- return retv;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Reverse_Iterator (ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
- int pass_end)
- : ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK> (mm)
-{
- if (!pass_end)
- {
-
-#if defined (ACE_HAS_LAZY_MAP_MANAGER)
-
- // Start here.
- this->next_ = this->map_man_->occupied_list_.prev ();
-
- while (1)
- {
- // Stop if we reach the end.
- if (this->done ())
- break;
-
- // Break if we find a non-free slot.
- if (!this->map_man_->search_structure_[this->next_].free_)
- {
- break;
- }
-
- // Go to the prev item in the list.
- this->next_ = this->map_man_->search_structure_[this->next_].prev ();
- }
-
-#else
-
- this->next_ = this->map_man_->occupied_list_.prev ();
-
-#endif /* ACE_HAS_LAZY_MAP_MANAGER */
-
-}
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::advance (void)
-{
- return this->reverse_i ();
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator++ (void)
-{
- this->reverse_i ();
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator++ (int)
-{
- ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> retv (*this);
- this->reverse_i ();
- return retv;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator-- (void)
-{
- this->forward_i ();
- return *this;
-}
-
-template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>
-ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK>::operator-- (int)
-{
- ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> retv (*this);
- this->forward_i ();
- return retv;
-}
diff --git a/ace/Map_T.cpp b/ace/Map_T.cpp
deleted file mode 100644
index e2329089630..00000000000
--- a/ace/Map_T.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// $Id$
-
-#ifndef ACE_MAP_T_C
-#define ACE_MAP_T_C
-
-#include "ace/Map_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Map_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Map_T, "$Id$")
-
-#endif /* ACE_MAP_T_C */
diff --git a/ace/Map_T.h b/ace/Map_T.h
deleted file mode 100644
index 7d970d198b4..00000000000
--- a/ace/Map_T.h
+++ /dev/null
@@ -1,1439 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Map_T.h
-//
-// = AUTHOR
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_MAP_T_H
-#define ACE_MAP_T_H
-#include "ace/pre.h"
-
-#include "ace/Map.h"
-#include "ace/Pair.h"
-#include "ace/Map_Manager.h"
-#include "ace/Hash_Map_Manager.h"
-#include "ace/Active_Map_Manager.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class T>
-class ACE_Noop_Key_Generator
-{
- // = TITLE
- // Defines a noop key generator.
-public:
-
- int operator () (T &);
- // Functor method: generates a new key.
-};
-
-template <class T>
-class ACE_Incremental_Key_Generator
-{
- // = TITLE
- // Defines a simple incremental key generator.
- //
- // = DESCRIPTION
- // Generates a new key of type T by incrementing current
- // value. Requirements on T are:
- //
- // - Constructor that accepts 0 in the constructor.
- // - Prefix increment.
- // - Assignment.
- //
- // Note that a primitive types such as u_long, int, etc., are
- // suitable for this class.
-public:
-
- ACE_Incremental_Key_Generator (void);
- // Constructor.
-
- int operator () (T &t);
- // Functor method: generates a new key.
-
- T& current_value (void);
- // Returns the current value.
-
-protected:
-
- T t_;
- // Current value.
-};
-
-template <class T>
-class ACE_Iterator_Impl
-{
- // = TITLE
- // Defines a abstract iterator.
- //
- // = DESCRIPTION
- // Implementation to be provided by subclasses.
-public:
-
- virtual ~ACE_Iterator_Impl (void);
- // Destructor.
-
- virtual ACE_Iterator_Impl<T> *clone (void) const = 0;
- // Clone.
-
- virtual int compare (const ACE_Iterator_Impl<T> &rhs) const = 0;
- // Comparison.
-
- virtual T dereference (void) const = 0;
- // Dereference.
-
- virtual void plus_plus (void) = 0;
- // Advance.
-
- virtual void minus_minus (void) = 0;
- // Reverse.
-};
-
-template <class T>
-class ACE_Reverse_Iterator_Impl
-{
- // = TITLE
- // Defines a abstract reverse iterator.
- //
- // = DESCRIPTION
- // Implementation to be provided by subclasses.
-public:
-
- virtual ~ACE_Reverse_Iterator_Impl (void);
- // Destructor.
-
- virtual ACE_Reverse_Iterator_Impl<T> *clone (void) const = 0;
- // Clone.
-
- virtual int compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const = 0;
- // Comparison.
-
- virtual T dereference (void) const = 0;
- // Dereference.
-
- virtual void plus_plus (void) = 0;
- // Advance.
-
- virtual void minus_minus (void) = 0;
- // Reverse.
-};
-
-template <class T>
-class ACE_Iterator
-{
- // = TITLE
- // Defines the iterator interface.
- //
- // = DESCRIPTION
- // Implementation to be provided by forwarding.
-public:
-
- // = Traits.
- typedef T value_type;
- typedef ACE_Iterator_Impl<T> implementation;
-
- ACE_Iterator (ACE_Iterator_Impl<T> *impl);
- // Constructor.
-
- ACE_Iterator (const ACE_Iterator<T> &rhs);
- // Copy constructor.
-
- ~ACE_Iterator (void);
- // Destructor.
-
- ACE_Iterator<T> &operator= (const ACE_Iterator<T> &rhs);
- // Assignment operator.
-
- int operator== (const ACE_Iterator<T> &rhs) const;
- int operator!= (const ACE_Iterator<T> &rhs) const;
- // Comparison operators.
-
- T operator *() const;
- // Dereference operator.
-
- ACE_Iterator<T> &operator++ (void);
- // Prefix advance.
-
- ACE_Iterator<T> operator++ (int);
- // Postfix advance.
-
- ACE_Iterator<T> &operator-- (void);
- // Prefix reverse.
-
- ACE_Iterator<T> operator-- (int);
- // Postfix reverse.
-
- ACE_Iterator_Impl<T> &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- ACE_Iterator_Impl<T> *implementation_;
- // Implementation pointer.
-};
-
-template <class T>
-class ACE_Reverse_Iterator
-{
- // = TITLE
- // Defines the reverse iterator interface.
- //
- // = DESCRIPTION
- // Implementation to be provided by forwarding.
-public:
-
- // = Traits.
- typedef T value_type;
- typedef ACE_Reverse_Iterator_Impl<T> implementation;
-
- ACE_Reverse_Iterator (ACE_Reverse_Iterator_Impl<T> *impl);
- // Constructor.
-
- ACE_Reverse_Iterator (const ACE_Reverse_Iterator<T> &rhs);
- // Copy constructor.
-
- ~ACE_Reverse_Iterator (void);
- // Destructor.
-
- ACE_Reverse_Iterator<T> &operator= (const ACE_Reverse_Iterator<T> &rhs);
- // Assignment operator.
-
- int operator== (const ACE_Reverse_Iterator<T> &rhs) const;
- int operator!= (const ACE_Reverse_Iterator<T> &rhs) const;
- // Comparison operators.
-
- T operator *() const;
- // Dereference operator.
-
- ACE_Reverse_Iterator<T> &operator++ (void);
- // Prefix advance.
-
- ACE_Reverse_Iterator<T> operator++ (int);
- // Postfix advance.
-
- ACE_Reverse_Iterator<T> &operator-- (void);
- // Prefix reverse.
-
- ACE_Reverse_Iterator<T> operator-- (int);
- // Postfix reverse.
-
- ACE_Reverse_Iterator_Impl<T> &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- ACE_Reverse_Iterator_Impl<T> *implementation_;
- // Implementation pointer.
-};
-
-template <class KEY, class VALUE>
-class ACE_Map
-{
- // = TITLE
- // Defines a map interface.
- //
- // = DESCRIPTION
- // Implementation to be provided by subclasses.
-public:
-
- // = Traits.
- typedef KEY
- key_type;
- typedef VALUE
- mapped_type;
- typedef ACE_Reference_Pair<const KEY, VALUE>
- value_type;
- typedef ACE_Iterator<value_type>
- iterator;
- typedef ACE_Reverse_Iterator<value_type>
- reverse_iterator;
- typedef ACE_Iterator_Impl<value_type>
- iterator_implementation;
- typedef ACE_Reverse_Iterator_Impl<value_type>
- reverse_iterator_implementation;
-
- virtual ~ACE_Map (void);
- // Close down and release dynamically allocated resources.
-
- virtual int open (size_t length = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0) = 0;
- // Initialize a <Map> with size <length>.
-
- virtual int close (void) = 0;
- // Close down a <Map> and release dynamically allocated resources.
-
- virtual int bind (const KEY &key,
- const VALUE &value) = 0;
- // Add <key>/<value> pair to the map. If <key> is already in the
- // map then no changes are made and 1 is returned. Returns 0 on a
- // successful addition. This function fails for maps that do not
- // allow user specified keys. <key> is an "in" parameter.
-
- virtual int bind_modify_key (const VALUE &value,
- KEY &key) = 0;
- // Add <key>/<value> pair to the map. <key> is an "inout" parameter
- // and maybe modified/extended by the map to add additional
- // information. To recover original key, call the <recover_key>
- // method.
-
- virtual int bind_create_key (const VALUE &value,
- KEY &key) = 0;
- // Add <value> to the map, and the corresponding key produced by the
- // Map is returned through <key> which is an "out" parameter. For
- // maps that do not naturally produce keys, the map adapters will
- // use the <KEY_GENERATOR> class to produce a key. However, the
- // users are responsible for not jeopardizing this key production
- // scheme by using user specified keys with keys produced by the key
- // generator.
-
- virtual int bind_create_key (const VALUE &value) = 0;
- // Add <value> to the map. The user does not care about the
- // corresponding key produced by the Map. For maps that do not
- // naturally produce keys, the map adapters will use the
- // <KEY_GENERATOR> class to produce a key. However, the users are
- // responsible for not jeopardizing this key production scheme by
- // using user specified keys with keys produced by the key
- // generator.
-
- virtual int recover_key (const KEY &modified_key,
- KEY &original_key) = 0;
- // Recovers the original key potentially modified by the map during
- // <bind_modify_key>.
-
- virtual int rebind (const KEY &key,
- const VALUE &value) = 0;
- // Reassociate <key> with <value>. The function fails if <key> is
- // not in the map for maps that do not allow user specified keys.
- // However, for maps that allow user specified keys, if the key is
- // not in the map, a new <key>/<value> association is created.
-
- virtual int rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value) = 0;
- // Reassociate <key> with <value>, storing the old value into the
- // "out" parameter <old_value>. The function fails if <key> is not
- // in the map for maps that do not allow user specified keys.
- // However, for maps that allow user specified keys, if the key is
- // not in the map, a new <key>/<value> association is created.
-
- virtual int rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value) = 0;
- // Reassociate <key> with <value>, storing the old key and value
- // into the "out" parameters <old_key> and <old_value>. The
- // function fails if <key> is not in the map for maps that do not
- // allow user specified keys. However, for maps that allow user
- // specified keys, if the key is not in the map, a new <key>/<value>
- // association is created.
-
- virtual int trybind (const KEY &key,
- VALUE &value) = 0;
- // Associate <key> with <value> if and only if <key> is not in the
- // map. If <key> is already in the map, then the <value> parameter
- // is overwritten with the existing value in the map. Returns 0 if a
- // new <key>/<value> association is created. Returns 1 if an
- // attempt is made to bind an existing entry. This function fails
- // for maps that do not allow user specified keys.
-
- virtual int find (const KEY &key,
- VALUE &value) = 0;
- // Locate <value> associated with <key>.
-
- virtual int find (const KEY &key) = 0;
- // Is <key> in the map?
-
- virtual int unbind (const KEY &key) = 0;
- // Remove <key> from the map.
-
- virtual int unbind (const KEY &key,
- VALUE &value) = 0;
- // Remove <key> from the map, and return the <value> associated with
- // <key>.
-
- virtual size_t current_size (void) const = 0;
- // Return the current size of the map.
-
- virtual size_t total_size (void) const = 0;
- // Return the total size of the map.
-
- virtual void dump (void) const = 0;
- // Dump the state of an object.
-
- // = STL styled iterator factory functions.
-
- iterator begin (void);
- iterator end (void);
- // Return forward iterator.
-
- reverse_iterator rbegin (void);
- reverse_iterator rend (void);
- // Return reverse iterator.
-
-protected:
-
- // = Protected no-op constructor.
- ACE_Map (void);
-
- virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *begin_impl (void) = 0;
- virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *end_impl (void) = 0;
- // Return forward iterator.
-
- virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rbegin_impl (void) = 0;
- virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rend_impl (void) = 0;
- // Return reverse iterator.
-
-private:
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Map<KEY, VALUE> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Map (const ACE_Map<KEY, VALUE> &))
-};
-
-template <class T, class IMPLEMENTATION, class ENTRY>
-class ACE_Map_Impl_Iterator_Adapter : public ACE_Iterator_Impl<T>
-{
- // = TITLE
- // Defines a iterator implementation for the Map_Impl class.
- //
- // = DESCRIPTION
- // Implementation to be provided by <IMPLEMENTATION>.
-public:
-
- // = Traits.
- typedef IMPLEMENTATION
- implementation;
-
- ACE_Map_Impl_Iterator_Adapter (const IMPLEMENTATION &impl);
- // Constructor.
-
- virtual ~ACE_Map_Impl_Iterator_Adapter (void);
- // Destructor.
-
- virtual ACE_Iterator_Impl<T> *clone (void) const;
- // Clone.
-
- virtual int compare (const ACE_Iterator_Impl<T> &rhs) const;
- // Comparison.
-
- virtual T dereference (void) const;
- // Dereference.
-
- virtual void plus_plus (void);
- // Advance.
-
- virtual void minus_minus (void);
- // Reverse.
-
- IMPLEMENTATION &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- IMPLEMENTATION implementation_;
- // All implementation details are forwarded to this class.
-};
-
-template <class T, class IMPLEMENTATION, class ENTRY>
-class ACE_Map_Impl_Reverse_Iterator_Adapter : public ACE_Reverse_Iterator_Impl<T>
-{
- // = TITLE
- // Defines a reverse iterator implementation for the Map_Impl class.
- //
- // = DESCRIPTION
- // Implementation to be provided by IMPLEMENTATION.
-public:
-
- // = Traits.
- typedef IMPLEMENTATION
- implementation;
-
- ACE_Map_Impl_Reverse_Iterator_Adapter (const IMPLEMENTATION &impl);
- // Constructor.
-
- virtual ~ACE_Map_Impl_Reverse_Iterator_Adapter (void);
- // Destructor.
-
- virtual ACE_Reverse_Iterator_Impl<T> *clone (void) const;
- // Clone.
-
- virtual int compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const;
- // Comparison.
-
- virtual T dereference (void) const;
- // Dereference.
-
- virtual void plus_plus (void);
- // Advance.
-
- virtual void minus_minus (void);
- // Reverse.
-
- IMPLEMENTATION &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- IMPLEMENTATION implementation_;
- // All implementation details are forwarded to this class.
-};
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY>
-class ACE_Map_Impl : public ACE_Map<KEY, VALUE>
-{
- // = TITLE
- // Defines a map implementation.
- //
- // = DESCRIPTION
- // Implementation to be provided by <IMPLEMENTATION>.
-public:
-
- // = Traits.
- typedef ACE_Map_Impl_Iterator_Adapter<ACE_TYPENAME ACE_Map<KEY, VALUE>::value_type, ITERATOR, ENTRY>
- iterator_impl;
- typedef ACE_Map_Impl_Reverse_Iterator_Adapter<ACE_TYPENAME ACE_Map<KEY, VALUE>::value_type, REVERSE_ITERATOR, ENTRY>
- reverse_iterator_impl;
-
- typedef IMPLEMENTATION
- implementation;
-
- // = Initialization and termination methods.
- ACE_Map_Impl (ACE_Allocator *alloc = 0);
- // Initialize with the <ACE_DEFAULT_MAP_SIZE>.
-
- ACE_Map_Impl (size_t size,
- ACE_Allocator *alloc = 0);
- // Initialize with <size> entries. The <size> parameter is ignore
- // by maps for which an initialize size does not make sense.
-
- virtual ~ACE_Map_Impl (void);
- // Close down and release dynamically allocated resources.
-
- virtual int open (size_t length = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0);
- // Initialize a <Map> with size <length>.
-
- virtual int close (void);
- // Close down a <Map> and release dynamically allocated resources.
-
- virtual int bind (const KEY &key,
- const VALUE &value);
- // Add <key>/<value> pair to the map. If <key> is already in the
- // map then no changes are made and 1 is returned. Returns 0 on a
- // successful addition. This function fails for maps that do not
- // allow user specified keys. <key> is an "in" parameter.
-
- virtual int bind_modify_key (const VALUE &value,
- KEY &key);
- // Add <key>/<value> pair to the map. <key> is an "inout" parameter
- // and maybe modified/extended by the map to add additional
- // information. To recover original key, call the <recover_key>
- // method.
-
- virtual int bind_create_key (const VALUE &value,
- KEY &key);
- // Add <value> to the map, and the corresponding key produced by the
- // Map is returned through <key> which is an "out" parameter. For
- // maps that do not naturally produce keys, the map adapters will
- // use the <KEY_GENERATOR> class to produce a key. However, the
- // users are responsible for not jeopardizing this key production
- // scheme by using user specified keys with keys produced by the key
- // generator.
-
- virtual int bind_create_key (const VALUE &value);
- // Add <value> to the map. The user does not care about the
- // corresponding key produced by the Map. For maps that do not
- // naturally produce keys, the map adapters will use the
- // <KEY_GENERATOR> class to produce a key. However, the users are
- // responsible for not jeopardizing this key production scheme by
- // using user specified keys with keys produced by the key
- // generator.
-
- virtual int recover_key (const KEY &modified_key,
- KEY &original_key);
- // Recovers the original key potentially modified by the map during
- // <bind_modify_key>.
-
- virtual int rebind (const KEY &key,
- const VALUE &value);
- // Reassociate <key> with <value>. The function fails if <key> is
- // not in the map for maps that do not allow user specified keys.
- // However, for maps that allow user specified keys, if the key is
- // not in the map, a new <key>/<value> association is created.
-
- virtual int rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old value into the
- // "out" parameter <old_value>. The function fails if <key> is not
- // in the map for maps that do not allow user specified keys.
- // However, for maps that allow user specified keys, if the key is
- // not in the map, a new <key>/<value> association is created.
-
- virtual int rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old key and value
- // into the "out" parameters <old_key> and <old_value>. The
- // function fails if <key> is not in the map for maps that do not
- // allow user specified keys. However, for maps that allow user
- // specified keys, if the key is not in the map, a new <key>/<value>
- // association is created.
-
- virtual int trybind (const KEY &key,
- VALUE &value);
- // Associate <key> with <value> if and only if <key> is not in the
- // map. If <key> is already in the map, then the <value> parameter
- // is overwritten with the existing value in the map. Returns 0 if a
- // new <key>/<value> association is created. Returns 1 if an
- // attempt is made to bind an existing entry. This function fails
- // for maps that do not allow user specified keys.
-
- virtual int find (const KEY &key,
- VALUE &value);
- // Locate <value> associated with <key>.
-
- virtual int find (const KEY &key);
- // Is <key> in the map?
-
- virtual int unbind (const KEY &key);
- // Remove <key> from the map.
-
- virtual int unbind (const KEY &key,
- VALUE &value);
- // Remove <key> from the map, and return the <value> associated with
- // <key>.
-
- virtual size_t current_size (void) const;
- // Return the current size of the map.
-
- virtual size_t total_size (void) const;
- // Return the total size of the map.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- IMPLEMENTATION &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- IMPLEMENTATION implementation_;
- // All implementation details are forwarded to this class.
-
- // = STL styled iterator factory functions.
-
- virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *begin_impl (void);
- virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *end_impl (void);
- // Return forward iterator.
-
- virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rbegin_impl (void);
- virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rend_impl (void);
- // Return reverse iterator.
-
-private:
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Map_Impl (const ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY> &))
-};
-
-template <class T, class VALUE>
-class ACE_Active_Map_Manager_Iterator_Adapter : public ACE_Iterator_Impl<T>
-{
- // = TITLE
- // Defines a iterator implementation for the Active_Map_Manager_Adapter.
- //
- // = DESCRIPTION
- // Implementation to be provided by ACE_Active_Map_Manager::iterator.
-public:
-
- // = Traits.
- typedef ACE_TYPENAME ACE_Active_Map_Manager<VALUE>::iterator
- implementation;
-
- ACE_Active_Map_Manager_Iterator_Adapter (const ACE_Map_Iterator<ACE_Active_Map_Manager_Key, VALUE, ACE_Null_Mutex> &impl);
- // Constructor.
-
- virtual ~ACE_Active_Map_Manager_Iterator_Adapter (void);
- // Destructor.
-
- virtual ACE_Iterator_Impl<T> *clone (void) const;
- // Clone.
-
- virtual int compare (const ACE_Iterator_Impl<T> &rhs) const;
- // Comparison.
-
- virtual T dereference (void) const;
- // Dereference.
-
- virtual void plus_plus (void);
- // Advance.
-
- virtual void minus_minus (void);
- // Reverse.
-
- ACE_Map_Iterator<ACE_Active_Map_Manager_Key, VALUE, ACE_Null_Mutex> &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- ACE_Map_Iterator<ACE_Active_Map_Manager_Key, VALUE, ACE_Null_Mutex> implementation_;
- // All implementation details are forwarded to this class.
-};
-
-template <class T, class VALUE>
-class ACE_Active_Map_Manager_Reverse_Iterator_Adapter : public ACE_Reverse_Iterator_Impl<T>
-{
- // = TITLE
- // Defines a reverse iterator implementation for the Active_Map_Manager_Adapter.
- //
- // = DESCRIPTION
- // Implementation to be provided by ACE_Active_Map_Manager::reverse_iterator.
-public:
-
- // = Traits.
- typedef ACE_TYPENAME ACE_Active_Map_Manager<VALUE>::reverse_iterator
- implementation;
-
- ACE_Active_Map_Manager_Reverse_Iterator_Adapter (const ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, VALUE, ACE_Null_Mutex> &impl);
- // Constructor.
-
- virtual ~ACE_Active_Map_Manager_Reverse_Iterator_Adapter (void);
- // Destructor.
-
- virtual ACE_Reverse_Iterator_Impl<T> *clone (void) const;
- // Clone.
-
- virtual int compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const;
- // Comparison.
-
- virtual T dereference (void) const;
- // Dereference.
-
- virtual void plus_plus (void);
- // Advance.
-
- virtual void minus_minus (void);
- // Reverse.
-
- ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, VALUE, ACE_Null_Mutex> &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, VALUE, ACE_Null_Mutex> implementation_;
- // All implementation details are forwarded to this class.
-};
-
-template <class KEY, class VALUE, class KEY_ADAPTER>
-class ACE_Active_Map_Manager_Adapter : public ACE_Map<KEY, VALUE>
-{
- // = TITLE
- // Defines a map implementation.
- //
- // = DESCRIPTION
- // Implementation to be provided by <ACE_Active_Map_Manager>.
-public:
-
- // = Traits.
- typedef ACE_Pair<KEY, VALUE>
- expanded_value;
- typedef ACE_Active_Map_Manager_Iterator_Adapter<ACE_Reference_Pair<const KEY, VALUE>, expanded_value>
- iterator_impl;
- typedef ACE_Active_Map_Manager_Reverse_Iterator_Adapter<ACE_Reference_Pair<const KEY, VALUE>, expanded_value>
- reverse_iterator_impl;
- typedef ACE_Active_Map_Manager<expanded_value>
- implementation;
-
- // = Initialization and termination methods.
- ACE_Active_Map_Manager_Adapter (ACE_Allocator *alloc = 0);
- // Initialize with the <ACE_DEFAULT_MAP_SIZE>.
-
- ACE_Active_Map_Manager_Adapter (size_t size,
- ACE_Allocator *alloc = 0);
- // Initialize with <size> entries. The <size> parameter is ignore
- // by maps for which an initialize size does not make sense.
-
- virtual ~ACE_Active_Map_Manager_Adapter (void);
- // Close down and release dynamically allocated resources.
-
- virtual int open (size_t length = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0);
- // Initialize a <Map> with size <length>.
-
- virtual int close (void);
- // Close down a <Map> and release dynamically allocated resources.
-
- virtual int bind (const KEY &key,
- const VALUE &value);
- // Add <key>/<value> pair to the map. If <key> is already in the
- // map then no changes are made and 1 is returned. Returns 0 on a
- // successful addition. This function fails for maps that do not
- // allow user specified keys. <key> is an "in" parameter.
-
- virtual int bind_modify_key (const VALUE &value,
- KEY &key);
- // Add <key>/<value> pair to the map. <key> is an "inout" parameter
- // and maybe modified/extended by the map to add additional
- // information. To recover original key, call the <recover_key>
- // method.
-
- virtual int bind_create_key (const VALUE &value,
- KEY &key);
- // Add <value> to the map, and the corresponding key produced by the
- // Map is returned through <key> which is an "out" parameter. For
- // maps that do not naturally produce keys, the map adapters will
- // use the <KEY_GENERATOR> class to produce a key. However, the
- // users are responsible for not jeopardizing this key production
- // scheme by using user specified keys with keys produced by the key
- // generator.
-
- virtual int bind_create_key (const VALUE &value);
- // Add <value> to the map. The user does not care about the
- // corresponding key produced by the Map. For maps that do not
- // naturally produce keys, the map adapters will use the
- // <KEY_GENERATOR> class to produce a key. However, the users are
- // responsible for not jeopardizing this key production scheme by
- // using user specified keys with keys produced by the key
- // generator.
-
- virtual int recover_key (const KEY &modified_key,
- KEY &original_key);
- // Recovers the original key potentially modified by the map during
- // <bind_modify_key>.
-
- virtual int rebind (const KEY &key,
- const VALUE &value);
- // Reassociate <key> with <value>. The function fails if <key> is
- // not in the map for maps that do not allow user specified keys.
- // However, for maps that allow user specified keys, if the key is
- // not in the map, a new <key>/<value> association is created.
-
- virtual int rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old value into the
- // "out" parameter <old_value>. The function fails if <key> is not
- // in the map for maps that do not allow user specified keys.
- // However, for maps that allow user specified keys, if the key is
- // not in the map, a new <key>/<value> association is created.
-
- virtual int rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old key and value
- // into the "out" parameters <old_key> and <old_value>. The
- // function fails if <key> is not in the map for maps that do not
- // allow user specified keys. However, for maps that allow user
- // specified keys, if the key is not in the map, a new <key>/<value>
- // association is created.
-
- virtual int trybind (const KEY &key,
- VALUE &value);
- // Associate <key> with <value> if and only if <key> is not in the
- // map. If <key> is already in the map, then the <value> parameter
- // is overwritten with the existing value in the map. Returns 0 if a
- // new <key>/<value> association is created. Returns 1 if an
- // attempt is made to bind an existing entry. This function fails
- // for maps that do not allow user specified keys.
-
- virtual int find (const KEY &key,
- VALUE &value);
- // Locate <value> associated with <key>.
-
- virtual int find (const KEY &key);
- // Is <key> in the map?
-
- virtual int unbind (const KEY &key);
- // Remove <key> from the map.
-
- virtual int unbind (const KEY &key,
- VALUE &value);
- // Remove <key> from the map, and return the <value> associated with
- // <key>.
-
- virtual size_t current_size (void) const;
- // Return the current size of the map.
-
- virtual size_t total_size (void) const;
- // Return the total size of the map.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_Active_Map_Manager<ACE_Pair<KEY, VALUE> > &impl (void);
- // Accessor to implementation object.
-
- KEY_ADAPTER &key_adapter (void);
- // Accessor to key adapter.
-
-protected:
-
- virtual int find (const KEY &key,
- expanded_value *&internal_value);
- // Find helper.
-
- virtual int unbind (const KEY &key,
- expanded_value *&internal_value);
- // Unbind helper.
-
- ACE_Active_Map_Manager<ACE_Pair<KEY, VALUE> > implementation_;
- // All implementation details are forwarded to this class.
-
- KEY_ADAPTER key_adapter_;
- // Adapts between the user key and the Active_Map_Manager_Key.
-
- // = STL styled iterator factory functions.
-
- virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *begin_impl (void);
- virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *end_impl (void);
- // Return forward iterator.
-
- virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rbegin_impl (void);
- virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rend_impl (void);
- // Return reverse iterator.
-
-private:
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Active_Map_Manager_Adapter (const ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER> &))
-};
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS>
-class ACE_Hash_Map_Manager_Ex_Iterator_Adapter : public ACE_Iterator_Impl<T>
-{
- // = TITLE
- // Defines a iterator implementation for the Hash_Map_Manager_Adapter.
- //
- // = DESCRIPTION
- // Implementation to be provided by ACE_Hash_Map_Manager_Ex::iterator.
-public:
-
- // = Traits.
- typedef ACE_TYPENAME ACE_Hash_Map_Manager_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>::iterator
- implementation;
-
- ACE_Hash_Map_Manager_Ex_Iterator_Adapter (const ACE_Hash_Map_Iterator_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> &impl);
- // Constructor.
-
- virtual ~ACE_Hash_Map_Manager_Ex_Iterator_Adapter (void);
- // Destructor.
-
- virtual ACE_Iterator_Impl<T> *clone (void) const;
- // Clone.
-
- virtual int compare (const ACE_Iterator_Impl<T> &rhs) const;
- // Comparison.
-
- virtual T dereference (void) const;
- // Dereference.
-
- virtual void plus_plus (void);
- // Advance.
-
- virtual void minus_minus (void);
- // Reverse.
-
- ACE_Hash_Map_Iterator_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- ACE_Hash_Map_Iterator_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> implementation_;
- // All implementation details are forwarded to this class.
-};
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS>
-class ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter : public ACE_Reverse_Iterator_Impl<T>
-{
- // = TITLE
- // Defines a reverse iterator implementation for the Hash_Map_Manager_Adapter.
- //
- // = DESCRIPTION
- // Implementation to be provided by ACE_Hash_Map_Manager_Ex::reverse_iterator.
-public:
-
- // = Traits.
- typedef ACE_TYPENAME ACE_Hash_Map_Manager_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>::reverse_iterator
- implementation;
-
- ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter (const ACE_Hash_Map_Reverse_Iterator_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> &impl);
- // Constructor.
-
- virtual ~ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter (void);
- // Destructor.
-
- virtual ACE_Reverse_Iterator_Impl<T> *clone (void) const;
- // Clone.
-
- virtual int compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const;
- // Comparison.
-
- virtual T dereference (void) const;
- // Dereference.
-
- virtual void plus_plus (void);
- // Advance.
-
- virtual void minus_minus (void);
- // Reverse.
-
- ACE_Hash_Map_Reverse_Iterator_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- ACE_Hash_Map_Reverse_Iterator_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> implementation_;
- // All implementation details are forwarded to this class.
-};
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR>
-class ACE_Hash_Map_Manager_Ex_Adapter : public ACE_Map<KEY, VALUE>
-{
- // = TITLE
- // Defines a map implementation.
- //
- // = DESCRIPTION
- // Implementation to be provided by <ACE_Hash_Map_Manager_Ex>.
-public:
-
- // = Traits.
- typedef ACE_Hash_Map_Manager_Ex_Iterator_Adapter<ACE_Reference_Pair<const KEY, VALUE>, KEY, VALUE, HASH_KEY, COMPARE_KEYS>
- iterator_impl;
- typedef ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<ACE_Reference_Pair<const KEY, VALUE>, KEY, VALUE, HASH_KEY, COMPARE_KEYS>
- reverse_iterator_impl;
- typedef ACE_Hash_Map_Manager_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>
- implementation;
-
- // = Initialization and termination methods.
- ACE_Hash_Map_Manager_Ex_Adapter (ACE_Allocator *alloc = 0);
- // Initialize with the <ACE_DEFAULT_MAP_SIZE>.
-
- ACE_Hash_Map_Manager_Ex_Adapter (size_t size,
- ACE_Allocator *alloc = 0);
- // Initialize with <size> entries. The <size> parameter is ignore
- // by maps for which an initialize size does not make sense.
-
- virtual ~ACE_Hash_Map_Manager_Ex_Adapter (void);
- // Close down and release dynamically allocated resources.
-
- virtual int open (size_t length = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0);
- // Initialize a <Map> with size <length>.
-
- virtual int close (void);
- // Close down a <Map> and release dynamically allocated resources.
-
- virtual int bind (const KEY &key,
- const VALUE &value);
- // Add <key>/<value> pair to the map. If <key> is already in the
- // map then no changes are made and 1 is returned. Returns 0 on a
- // successful addition. This function fails for maps that do not
- // allow user specified keys. <key> is an "in" parameter.
-
- virtual int bind_modify_key (const VALUE &value,
- KEY &key);
- // Add <key>/<value> pair to the map. <key> is an "inout" parameter
- // and maybe modified/extended by the map to add additional
- // information. To recover original key, call the <recover_key>
- // method.
-
- virtual int bind_create_key (const VALUE &value,
- KEY &key);
- // Add <value> to the map, and the corresponding key produced by the
- // Map is returned through <key> which is an "out" parameter. For
- // maps that do not naturally produce keys, the map adapters will
- // use the <KEY_GENERATOR> class to produce a key. However, the
- // users are responsible for not jeopardizing this key production
- // scheme by using user specified keys with keys produced by the key
- // generator.
-
- virtual int bind_create_key (const VALUE &value);
- // Add <value> to the map. The user does not care about the
- // corresponding key produced by the Map. For maps that do not
- // naturally produce keys, the map adapters will use the
- // <KEY_GENERATOR> class to produce a key. However, the users are
- // responsible for not jeopardizing this key production scheme by
- // using user specified keys with keys produced by the key
- // generator.
-
- virtual int recover_key (const KEY &modified_key,
- KEY &original_key);
- // Recovers the original key potentially modified by the map during
- // <bind_modify_key>.
-
- virtual int rebind (const KEY &key,
- const VALUE &value);
- // Reassociate <key> with <value>. The function fails if <key> is
- // not in the map for maps that do not allow user specified keys.
- // However, for maps that allow user specified keys, if the key is
- // not in the map, a new <key>/<value> association is created.
-
- virtual int rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old value into the
- // "out" parameter <old_value>. The function fails if <key> is not
- // in the map for maps that do not allow user specified keys.
- // However, for maps that allow user specified keys, if the key is
- // not in the map, a new <key>/<value> association is created.
-
- virtual int rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old key and value
- // into the "out" parameters <old_key> and <old_value>. The
- // function fails if <key> is not in the map for maps that do not
- // allow user specified keys. However, for maps that allow user
- // specified keys, if the key is not in the map, a new <key>/<value>
- // association is created.
-
- virtual int trybind (const KEY &key,
- VALUE &value);
- // Associate <key> with <value> if and only if <key> is not in the
- // map. If <key> is already in the map, then the <value> parameter
- // is overwritten with the existing value in the map. Returns 0 if a
- // new <key>/<value> association is created. Returns 1 if an
- // attempt is made to bind an existing entry. This function fails
- // for maps that do not allow user specified keys.
-
- virtual int find (const KEY &key,
- VALUE &value);
- // Locate <value> associated with <key>.
-
- virtual int find (const KEY &key);
- // Is <key> in the map?
-
- virtual int unbind (const KEY &key);
- // Remove <key> from the map.
-
- virtual int unbind (const KEY &key,
- VALUE &value);
- // Remove <key> from the map, and return the <value> associated with
- // <key>.
-
- virtual size_t current_size (void) const;
- // Return the current size of the map.
-
- virtual size_t total_size (void) const;
- // Return the total size of the map.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_Hash_Map_Manager_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> &impl (void);
- // Accessor to implementation object.
-
- KEY_GENERATOR &key_generator (void);
- // Accessor to key generator.
-
-protected:
-
- ACE_Hash_Map_Manager_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> implementation_;
- // All implementation details are forwarded to this class.
-
- KEY_GENERATOR key_generator_;
- // Functor class used for generating key.
-
- // = STL styled iterator factory functions.
-
- virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *begin_impl (void);
- virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *end_impl (void);
- // Return forward iterator.
-
- virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rbegin_impl (void);
- virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rend_impl (void);
- // Return reverse iterator.
-
-private:
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Hash_Map_Manager_Ex_Adapter (const ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR> &))
-};
-
-template <class T, class KEY, class VALUE>
-class ACE_Map_Manager_Iterator_Adapter : public ACE_Iterator_Impl<T>
-{
- // = TITLE
- // Defines a iterator implementation for the Map_Manager_Adapter.
- //
- // = DESCRIPTION
- // Implementation to be provided by ACE_Map_Manager::iterator.
-public:
-
- // = Traits.
- typedef ACE_TYPENAME ACE_Map_Manager<KEY, VALUE, ACE_Null_Mutex>::iterator
- implementation;
-
- ACE_Map_Manager_Iterator_Adapter (const ACE_Map_Iterator<KEY, VALUE, ACE_Null_Mutex> &impl);
- // Constructor.
-
- virtual ~ACE_Map_Manager_Iterator_Adapter (void);
- // Destructor.
-
- virtual ACE_Iterator_Impl<T> *clone (void) const;
- // Clone.
-
- virtual int compare (const ACE_Iterator_Impl<T> &rhs) const;
- // Comparison.
-
- virtual T dereference (void) const;
- // Dereference.
-
- virtual void plus_plus (void);
- // Advance.
-
- virtual void minus_minus (void);
- // Reverse.
-
- ACE_Map_Iterator<KEY, VALUE, ACE_Null_Mutex> &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- ACE_Map_Iterator<KEY, VALUE, ACE_Null_Mutex> implementation_;
- // All implementation details are forwarded to this class.
-};
-
-template <class T, class KEY, class VALUE>
-class ACE_Map_Manager_Reverse_Iterator_Adapter : public ACE_Reverse_Iterator_Impl<T>
-{
- // = TITLE
- // Defines a reverse iterator implementation for the Map Manager.
- //
- // = DESCRIPTION
- // Implementation to be provided by ACE_Map_Manager::reverse_iterator.
-public:
-
- // = Traits.
- typedef ACE_TYPENAME ACE_Map_Manager<KEY, VALUE, ACE_Null_Mutex>::reverse_iterator
- implementation;
-
- ACE_Map_Manager_Reverse_Iterator_Adapter (const ACE_Map_Reverse_Iterator<KEY, VALUE, ACE_Null_Mutex> &impl);
- // Constructor.
-
- virtual ~ACE_Map_Manager_Reverse_Iterator_Adapter (void);
- // Destructor.
-
- virtual ACE_Reverse_Iterator_Impl<T> *clone (void) const;
- // Clone.
-
- virtual int compare (const ACE_Reverse_Iterator_Impl<T> &rhs) const;
- // Comparison.
-
- virtual T dereference (void) const;
- // Dereference.
-
- virtual void plus_plus (void);
- // Advance.
-
- virtual void minus_minus (void);
- // Reverse.
-
- ACE_Map_Reverse_Iterator<KEY, VALUE, ACE_Null_Mutex> &impl (void);
- // Accessor to implementation object.
-
-protected:
-
- ACE_Map_Reverse_Iterator<KEY, VALUE, ACE_Null_Mutex> implementation_;
- // All implementation details are forwarded to this class.
-};
-
-template <class KEY, class VALUE, class KEY_GENERATOR>
-class ACE_Map_Manager_Adapter : public ACE_Map<KEY, VALUE>
-{
- // = TITLE
- // Defines a map implementation.
- //
- // = DESCRIPTION
- // Implementation to be provided by <ACE_Map_Manager>.
-public:
-
- // = Traits.
- typedef ACE_Map_Manager_Iterator_Adapter<ACE_Reference_Pair<const KEY, VALUE>, KEY, VALUE>
- iterator_impl;
- typedef ACE_Map_Manager_Reverse_Iterator_Adapter<ACE_Reference_Pair<const KEY, VALUE>, KEY, VALUE>
- reverse_iterator_impl;
- typedef ACE_Map_Manager<KEY, VALUE, ACE_Null_Mutex>
- implementation;
-
- // = Initialization and termination methods.
- ACE_Map_Manager_Adapter (ACE_Allocator *alloc = 0);
- // Initialize with the <ACE_DEFAULT_MAP_SIZE>.
-
- ACE_Map_Manager_Adapter (size_t size,
- ACE_Allocator *alloc = 0);
- // Initialize with <size> entries. The <size> parameter is ignore
- // by maps for which an initialize size does not make sense.
-
- virtual ~ACE_Map_Manager_Adapter (void);
- // Close down and release dynamically allocated resources.
-
- virtual int open (size_t length = ACE_DEFAULT_MAP_SIZE,
- ACE_Allocator *alloc = 0);
- // Initialize a <Map> with size <length>.
-
- virtual int close (void);
- // Close down a <Map> and release dynamically allocated resources.
-
- virtual int bind (const KEY &key,
- const VALUE &value);
- // Add <key>/<value> pair to the map. If <key> is already in the
- // map then no changes are made and 1 is returned. Returns 0 on a
- // successful addition. This function fails for maps that do not
- // allow user specified keys. <key> is an "in" parameter.
-
- virtual int bind_modify_key (const VALUE &value,
- KEY &key);
- // Add <key>/<value> pair to the map. <key> is an "inout" parameter
- // and maybe modified/extended by the map to add additional
- // information. To recover original key, call the <recover_key>
- // method.
-
- virtual int bind_create_key (const VALUE &value,
- KEY &key);
- // Add <value> to the map, and the corresponding key produced by the
- // Map is returned through <key> which is an "out" parameter. For
- // maps that do not naturally produce keys, the map adapters will
- // use the <KEY_GENERATOR> class to produce a key. However, the
- // users are responsible for not jeopardizing this key production
- // scheme by using user specified keys with keys produced by the key
- // generator.
-
- virtual int bind_create_key (const VALUE &value);
- // Add <value> to the map. The user does not care about the
- // corresponding key produced by the Map. For maps that do not
- // naturally produce keys, the map adapters will use the
- // <KEY_GENERATOR> class to produce a key. However, the users are
- // responsible for not jeopardizing this key production scheme by
- // using user specified keys with keys produced by the key
- // generator.
-
- virtual int recover_key (const KEY &modified_key,
- KEY &original_key);
- // Recovers the original key potentially modified by the map during
- // <bind_modify_key>.
-
- virtual int rebind (const KEY &key,
- const VALUE &value);
- // Reassociate <key> with <value>. The function fails if <key> is
- // not in the map for maps that do not allow user specified keys.
- // However, for maps that allow user specified keys, if the key is
- // not in the map, a new <key>/<value> association is created.
-
- virtual int rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old value into the
- // "out" parameter <old_value>. The function fails if <key> is not
- // in the map for maps that do not allow user specified keys.
- // However, for maps that allow user specified keys, if the key is
- // not in the map, a new <key>/<value> association is created.
-
- virtual int rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value);
- // Reassociate <key> with <value>, storing the old key and value
- // into the "out" parameters <old_key> and <old_value>. The
- // function fails if <key> is not in the map for maps that do not
- // allow user specified keys. However, for maps that allow user
- // specified keys, if the key is not in the map, a new <key>/<value>
- // association is created.
-
- virtual int trybind (const KEY &key,
- VALUE &value);
- // Associate <key> with <value> if and only if <key> is not in the
- // map. If <key> is already in the map, then the <value> parameter
- // is overwritten with the existing value in the map. Returns 0 if a
- // new <key>/<value> association is created. Returns 1 if an
- // attempt is made to bind an existing entry. This function fails
- // for maps that do not allow user specified keys.
-
- virtual int find (const KEY &key,
- VALUE &value);
- // Locate <value> associated with <key>.
-
- virtual int find (const KEY &key);
- // Is <key> in the map?
-
- virtual int unbind (const KEY &key);
- // Remove <key> from the map.
-
- virtual int unbind (const KEY &key,
- VALUE &value);
- // Remove <key> from the map, and return the <value> associated with
- // <key>.
-
- virtual size_t current_size (void) const;
- // Return the current size of the map.
-
- virtual size_t total_size (void) const;
- // Return the total size of the map.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_Map_Manager<KEY, VALUE, ACE_Null_Mutex> &impl (void);
- // Accessor to implementation object.
-
- KEY_GENERATOR &key_generator (void);
- // Accessor to key generator.
-
-protected:
-
- ACE_Map_Manager<KEY, VALUE, ACE_Null_Mutex> implementation_;
- // All implementation details are forwarded to this class.
-
- KEY_GENERATOR key_generator_;
- // Functor class used for generating key.
-
- // = STL styled iterator factory functions.
-
- virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *begin_impl (void);
- virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *end_impl (void);
- // Return forward iterator.
-
- virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rbegin_impl (void);
- virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rend_impl (void);
- // Return reverse iterator.
-
-private:
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Map_Manager_Adapter (const ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR> &))
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Map_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Map_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Map_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_MAP_T_H */
diff --git a/ace/Map_T.i b/ace/Map_T.i
deleted file mode 100644
index 08899ad7a63..00000000000
--- a/ace/Map_T.i
+++ /dev/null
@@ -1,1601 +0,0 @@
-// $Id$
-
-template <class T> ACE_INLINE int
-ACE_Noop_Key_Generator<T>::operator() (T &)
-{
- return -1;
-}
-
-template <class T> ACE_INLINE
-ACE_Incremental_Key_Generator<T>::ACE_Incremental_Key_Generator (void)
- : t_ (0)
-{
-}
-
-template <class T> ACE_INLINE int
-ACE_Incremental_Key_Generator<T>::operator() (T &t)
-{
- t = ++this->t_;
- return 0;
-}
-
-template <class T> ACE_INLINE T &
-ACE_Incremental_Key_Generator<T>::current_value (void)
-{
- return this->t_;
-}
-
-template <class T> ACE_INLINE
-ACE_Iterator_Impl<T>::~ACE_Iterator_Impl (void)
-{
-}
-
-template <class T> ACE_INLINE
-ACE_Reverse_Iterator_Impl<T>::~ACE_Reverse_Iterator_Impl (void)
-{
-}
-
-template <class T> ACE_INLINE
-ACE_Iterator<T>::ACE_Iterator (ACE_Iterator_Impl<T> *impl)
- : implementation_ (impl)
-{
-}
-
-template <class T> ACE_INLINE
-ACE_Iterator<T>::ACE_Iterator (const ACE_Iterator<T> &rhs)
- : implementation_ (rhs.implementation_->clone ())
-{
-}
-
-template <class T> ACE_INLINE
-ACE_Iterator<T>::~ACE_Iterator (void)
-{
- delete this->implementation_;
-}
-
-template <class T> ACE_INLINE ACE_Iterator<T> &
-ACE_Iterator<T>::operator= (const ACE_Iterator<T> &rhs)
-{
- delete this->implementation_;
- this->implementation_ = rhs.implementation_->clone ();
- return *this;
-}
-
-template <class T> ACE_INLINE int
-ACE_Iterator<T>::operator== (const ACE_Iterator<T> &rhs) const
-{
- return this->implementation_->compare (*rhs.implementation_);
-}
-
-template <class T> ACE_INLINE int
-ACE_Iterator<T>::operator!= (const ACE_Iterator<T> &rhs) const
-{
- return !this->operator== (rhs);
-}
-
-template <class T> ACE_INLINE T
-ACE_Iterator<T>::operator* (void) const
-{
- return this->implementation_->dereference ();
-}
-
-template <class T> ACE_INLINE ACE_Iterator<T> &
-ACE_Iterator<T>::operator++ (void)
-{
- this->implementation_->plus_plus ();
- return *this;
-}
-
-template <class T> ACE_INLINE ACE_Iterator<T>
-ACE_Iterator<T>::operator++ (int)
-{
- ACE_Iterator<T> tmp = *this;
- this->implementation_->plus_plus ();
- return tmp;
-}
-
-template <class T> ACE_INLINE ACE_Iterator<T> &
-ACE_Iterator<T>::operator-- (void)
-{
- this->implementation_->minus_minus ();
- return *this;
-}
-
-template <class T> ACE_INLINE ACE_Iterator<T>
-ACE_Iterator<T>::operator-- (int)
-{
- ACE_Iterator<T> tmp = *this;
- this->implementation_->minus_minus ();
- return tmp;
-}
-
-template <class T> ACE_INLINE ACE_Iterator_Impl<T> &
-ACE_Iterator<T>::impl (void)
-{
- return *this->implementation_;
-}
-
-template <class T> ACE_INLINE
-ACE_Reverse_Iterator<T>::ACE_Reverse_Iterator (ACE_Reverse_Iterator_Impl<T> *impl)
- : implementation_ (impl)
-{
-}
-
-template <class T> ACE_INLINE
-ACE_Reverse_Iterator<T>::ACE_Reverse_Iterator (const ACE_Reverse_Iterator<T> &rhs)
- : implementation_ (rhs.implementation_->clone ())
-{
-}
-
-template <class T> ACE_INLINE
-ACE_Reverse_Iterator<T>::~ACE_Reverse_Iterator (void)
-{
- delete this->implementation_;
-}
-
-template <class T> ACE_INLINE ACE_Reverse_Iterator<T> &
-ACE_Reverse_Iterator<T>::operator= (const ACE_Reverse_Iterator<T> &rhs)
-{
- delete this->implementation_;
- this->implementation_ = rhs.implementation_->clone ();
- return *this;
-}
-
-template <class T> ACE_INLINE int
-ACE_Reverse_Iterator<T>::operator== (const ACE_Reverse_Iterator<T> &rhs) const
-{
- return this->implementation_->compare (*rhs.implementation_);
-}
-
-template <class T> ACE_INLINE int
-ACE_Reverse_Iterator<T>::operator!= (const ACE_Reverse_Iterator<T> &rhs) const
-{
- return !this->operator== (rhs);
-}
-
-template <class T> ACE_INLINE T
-ACE_Reverse_Iterator<T>::operator* (void) const
-{
- return this->implementation_->dereference ();
-}
-
-template <class T> ACE_INLINE ACE_Reverse_Iterator<T> &
-ACE_Reverse_Iterator<T>::operator++ (void)
-{
- this->implementation_->plus_plus ();
- return *this;
-}
-
-template <class T> ACE_INLINE ACE_Reverse_Iterator<T>
-ACE_Reverse_Iterator<T>::operator++ (int)
-{
- ACE_Reverse_Iterator<T> tmp = *this;
- this->implementation_->plus_plus ();
- return tmp;
-}
-
-template <class T> ACE_INLINE ACE_Reverse_Iterator<T> &
-ACE_Reverse_Iterator<T>::operator-- (void)
-{
- this->implementation_->minus_minus ();
- return *this;
-}
-
-template <class T> ACE_INLINE ACE_Reverse_Iterator<T>
-ACE_Reverse_Iterator<T>::operator-- (int)
-{
- ACE_Reverse_Iterator<T> tmp = *this;
- this->implementation_->minus_minus ();
- return tmp;
-}
-
-template <class T> ACE_INLINE ACE_Reverse_Iterator_Impl<T> &
-ACE_Reverse_Iterator<T>::impl (void)
-{
- return *this->implementation_;
-}
-
-template <class KEY, class VALUE> ACE_INLINE
-ACE_Map<KEY, VALUE>::ACE_Map (void)
-{
-}
-
-template <class KEY, class VALUE> ACE_INLINE
-ACE_Map<KEY, VALUE>::~ACE_Map (void)
-{
-}
-
-template <class KEY, class VALUE> ACE_INLINE ACE_Iterator<ACE_Reference_Pair<const KEY, VALUE> >
-ACE_Map<KEY, VALUE>::begin (void)
-{
- return iterator (this->begin_impl ());
-}
-
-template <class KEY, class VALUE> ACE_INLINE ACE_Iterator<ACE_Reference_Pair<const KEY, VALUE> >
-ACE_Map<KEY, VALUE>::end (void)
-{
- return iterator (this->end_impl ());
-}
-
-template <class KEY, class VALUE> ACE_INLINE ACE_Reverse_Iterator<ACE_Reference_Pair<const KEY, VALUE> >
-ACE_Map<KEY, VALUE>::rbegin (void)
-{
- return reverse_iterator (this->rbegin_impl ());
-}
-
-template <class KEY, class VALUE> ACE_INLINE ACE_Reverse_Iterator<ACE_Reference_Pair<const KEY, VALUE> >
-ACE_Map<KEY, VALUE>::rend (void)
-{
- return reverse_iterator (this->rend_impl ());
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE
-ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::ACE_Map_Impl_Iterator_Adapter (const IMPLEMENTATION &impl)
- : implementation_ (impl)
-{
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE
-ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::~ACE_Map_Impl_Iterator_Adapter (void)
-{
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE ACE_Iterator_Impl<T> *
-ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::clone (void) const
-{
- return new ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY> (*this);
-}
-
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE int
-ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::compare (const ACE_Iterator_Impl<T> &rhs_base) const
-{
- const ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY> &rhs
- = ACE_dynamic_cast_3_ref (const ACE_Map_Impl_Iterator_Adapter, T, IMPLEMENTATION, ENTRY, rhs_base);
-
- return this->implementation_ == rhs.implementation_;
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE T
-ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::dereference () const
-{
- ENTRY &entry = *this->implementation_;
- return T (entry.ext_id_,
- entry.int_id_);
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE void
-ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::plus_plus (void)
-{
- ++this->implementation_;
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE void
-ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::minus_minus (void)
-{
- --this->implementation_;
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE IMPLEMENTATION &
-ACE_Map_Impl_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE
-ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::ACE_Map_Impl_Reverse_Iterator_Adapter (const IMPLEMENTATION &impl)
- : implementation_ (impl)
-{
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE
-ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::~ACE_Map_Impl_Reverse_Iterator_Adapter (void)
-{
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE ACE_Reverse_Iterator_Impl<T> *
-ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::clone (void) const
-{
- return new ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY> (*this);
-}
-
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE int
-ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::compare (const ACE_Reverse_Iterator_Impl<T> &rhs_base) const
-{
- const ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY> &rhs
- = ACE_dynamic_cast_3_ref (const ACE_Map_Impl_Reverse_Iterator_Adapter, T, IMPLEMENTATION, ENTRY, rhs_base);
-
- return this->implementation_ == rhs.implementation_;
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE T
-ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::dereference () const
-{
- ENTRY &entry = *this->implementation_;
- return T (entry.ext_id_,
- entry.int_id_);
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE void
-ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::plus_plus (void)
-{
- ++this->implementation_;
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE void
-ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::minus_minus (void)
-{
- --this->implementation_;
-}
-
-template <class T, class IMPLEMENTATION, class ENTRY> ACE_INLINE IMPLEMENTATION &
-ACE_Map_Impl_Reverse_Iterator_Adapter<T, IMPLEMENTATION, ENTRY>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::ACE_Map_Impl (ACE_Allocator *alloc)
- : implementation_ (alloc)
-{
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::ACE_Map_Impl (size_t size,
- ACE_Allocator *alloc)
- : implementation_ (size,
- alloc)
-{
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::~ACE_Map_Impl (void)
-{
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::open (size_t length,
- ACE_Allocator *alloc)
-{
- return this->implementation_.open (length,
- alloc);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::close (void)
-{
- return this->implementation_.close ();
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::bind (const KEY &key,
- const VALUE &value)
-{
- return this->implementation_.bind (key,
- value);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::bind_modify_key (const VALUE &value,
- KEY &key)
-{
- return this->implementation_.bind_modify_key (value,
- key);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::bind_create_key (const VALUE &value,
- KEY &key)
-{
- return this->implementation_.bind_create_key (value,
- key);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::bind_create_key (const VALUE &value)
-{
- return this->implementation_.bind_create_key (value);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::recover_key (const KEY &modified_key,
- KEY &original_key)
-{
- return this->implementation_.recover_key (modified_key,
- original_key);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::rebind (const KEY &key,
- const VALUE &value)
-{
- return this->implementation_.rebind (key,
- value);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value)
-{
- return this->implementation_.rebind (key,
- value,
- old_value);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value)
-{
- return this->implementation_.rebind (key,
- value,
- old_key,
- old_value);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::trybind (const KEY &key,
- VALUE &value)
-{
- return this->implementation_.trybind (key,
- value);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::find (const KEY &key,
- VALUE &value)
-{
- return this->implementation_.find (key,
- value);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::find (const KEY &key)
-{
- return this->implementation_.find (key);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::unbind (const KEY &key)
-{
- return this->implementation_.unbind (key);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE int
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::unbind (const KEY &key,
- VALUE &value)
-{
- return this->implementation_.unbind (key,
- value);
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE size_t
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::current_size (void) const
-{
- return this->implementation_.current_size ();
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE size_t
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::total_size (void) const
-{
- return this->implementation_.total_size ();
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE void
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::dump (void) const
-{
- this->implementation_.dump ();
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::begin_impl (void)
-{
- return new iterator_impl (this->implementation_.begin ());
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::end_impl (void)
-{
- return new iterator_impl (this->implementation_.end ());
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::rbegin_impl (void)
-{
- return new reverse_iterator_impl (this->implementation_.rbegin ());
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::rend_impl (void)
-{
- return new reverse_iterator_impl (this->implementation_.rend ());
-}
-
-template <class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> ACE_INLINE IMPLEMENTATION &
-ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class T, class VALUE> ACE_INLINE
-ACE_Active_Map_Manager_Iterator_Adapter<T, VALUE>::ACE_Active_Map_Manager_Iterator_Adapter (const ACE_Map_Iterator<ACE_Active_Map_Manager_Key, VALUE, ACE_Null_Mutex> &impl)
- : implementation_ (impl)
-{
-}
-
-template <class T, class VALUE> ACE_INLINE
-ACE_Active_Map_Manager_Iterator_Adapter<T, VALUE>::~ACE_Active_Map_Manager_Iterator_Adapter (void)
-{
-}
-
-template <class T, class VALUE> ACE_INLINE ACE_Iterator_Impl<T> *
-ACE_Active_Map_Manager_Iterator_Adapter<T, VALUE>::clone (void) const
-{
- return new ACE_Active_Map_Manager_Iterator_Adapter<T, VALUE> (*this);
-}
-
-
-template <class T, class VALUE> ACE_INLINE int
-ACE_Active_Map_Manager_Iterator_Adapter<T, VALUE>::compare (const ACE_Iterator_Impl<T> &rhs_base) const
-{
- const ACE_Active_Map_Manager_Iterator_Adapter<T, VALUE> &rhs
- = ACE_dynamic_cast_2_ref (const ACE_Active_Map_Manager_Iterator_Adapter, T, VALUE, rhs_base);
-
- return this->implementation_ == rhs.implementation_;
-}
-
-template <class T, class VALUE> ACE_INLINE T
-ACE_Active_Map_Manager_Iterator_Adapter<T, VALUE>::dereference () const
-{
- // The following syntax is necessary to work around certain broken compilers.
- // In particular, please do not prefix implementation_ with this->
- return T ((*implementation_).int_id_.first (),
- (*implementation_).int_id_.second ());
-}
-
-template <class T, class VALUE> ACE_INLINE void
-ACE_Active_Map_Manager_Iterator_Adapter<T, VALUE>::plus_plus (void)
-{
- ++this->implementation_;
-}
-
-template <class T, class VALUE> ACE_INLINE void
-ACE_Active_Map_Manager_Iterator_Adapter<T, VALUE>::minus_minus (void)
-{
- --this->implementation_;
-}
-
-template <class T, class VALUE> ACE_INLINE ACE_Map_Iterator<ACE_Active_Map_Manager_Key, VALUE, ACE_Null_Mutex> &
-ACE_Active_Map_Manager_Iterator_Adapter<T, VALUE>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class T, class VALUE> ACE_INLINE
-ACE_Active_Map_Manager_Reverse_Iterator_Adapter<T, VALUE>::ACE_Active_Map_Manager_Reverse_Iterator_Adapter (const ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, VALUE, ACE_Null_Mutex> &impl)
- : implementation_ (impl)
-{
-}
-
-template <class T, class VALUE> ACE_INLINE
-ACE_Active_Map_Manager_Reverse_Iterator_Adapter<T, VALUE>::~ACE_Active_Map_Manager_Reverse_Iterator_Adapter (void)
-{
-}
-
-template <class T, class VALUE> ACE_INLINE ACE_Reverse_Iterator_Impl<T> *
-ACE_Active_Map_Manager_Reverse_Iterator_Adapter<T, VALUE>::clone (void) const
-{
- return new ACE_Active_Map_Manager_Reverse_Iterator_Adapter<T, VALUE> (*this);
-}
-
-
-template <class T, class VALUE> ACE_INLINE int
-ACE_Active_Map_Manager_Reverse_Iterator_Adapter<T, VALUE>::compare (const ACE_Reverse_Iterator_Impl<T> &rhs_base) const
-{
- const ACE_Active_Map_Manager_Reverse_Iterator_Adapter<T, VALUE> &rhs
- = ACE_dynamic_cast_2_ref (const ACE_Active_Map_Manager_Reverse_Iterator_Adapter, T, VALUE, rhs_base);
-
- return this->implementation_ == rhs.implementation_;
-}
-
-template <class T, class VALUE> ACE_INLINE T
-ACE_Active_Map_Manager_Reverse_Iterator_Adapter<T, VALUE>::dereference () const
-{
- // The following syntax is necessary to work around certain broken compilers.
- // In particular, please do not prefix implementation_ with this->
- return T ((*implementation_).int_id_.first (),
- (*implementation_).int_id_.second ());
-}
-
-template <class T, class VALUE> ACE_INLINE void
-ACE_Active_Map_Manager_Reverse_Iterator_Adapter<T, VALUE>::plus_plus (void)
-{
- ++this->implementation_;
-}
-
-template <class T, class VALUE> ACE_INLINE void
-ACE_Active_Map_Manager_Reverse_Iterator_Adapter<T, VALUE>::minus_minus (void)
-{
- --this->implementation_;
-}
-
-template <class T, class VALUE> ACE_INLINE ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, VALUE, ACE_Null_Mutex> &
-ACE_Active_Map_Manager_Reverse_Iterator_Adapter<T, VALUE>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::ACE_Active_Map_Manager_Adapter (ACE_Allocator *alloc)
- : implementation_ (alloc)
-{
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::ACE_Active_Map_Manager_Adapter (size_t size,
- ACE_Allocator *alloc)
- : implementation_ (size,
- alloc)
-{
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::~ACE_Active_Map_Manager_Adapter (void)
-{
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::open (size_t length,
- ACE_Allocator *alloc)
-{
- return this->implementation_.open (length,
- alloc);
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::close (void)
-{
- return this->implementation_.close ();
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::bind (const KEY &,
- const VALUE &)
-{
- ACE_NOTSUP_RETURN (-1);
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::bind_modify_key (const VALUE &value,
- KEY &key)
-{
- // Reserve a slot and create an active key.
- expanded_value *internal_value = 0;
- ACE_Active_Map_Manager_Key active_key;
- int result = this->implementation_.bind (active_key,
- internal_value);
- if (result == 0)
- {
- // Encode the active key and the existing user key into key part
- // of <expanded_value>.
- result = this->key_adapter_.encode (key,
- active_key,
- internal_value->first ());
- if (result == 0)
- {
- // Copy user value into <expanded_value>.
- internal_value->second (value);
- // Copy new, modified key back to the user key.
- key = internal_value->first ();
- }
- else
- {
- // In case of errors, unbind from map.
- this->implementation_.unbind (active_key);
- }
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::bind_create_key (const VALUE &value,
- KEY &key)
-{
- // Reserve a slot and create an active key.
- expanded_value *internal_value = 0;
- ACE_Active_Map_Manager_Key active_key;
- int result = this->implementation_.bind (active_key,
- internal_value);
- if (result == 0)
- {
- // Encode the active key into key part of <expanded_value>.
- result = this->key_adapter_.encode (internal_value->first (),
- active_key,
- internal_value->first ());
- if (result == 0)
- {
- // Copy user value into <expanded_value>.
- internal_value->second (value);
- // Copy new, modified key to the user key.
- key = internal_value->first ();
- }
- else
- {
- // In case of errors, unbind from map.
- this->implementation_.unbind (active_key);
- }
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::bind_create_key (const VALUE &value)
-{
- // Reserve a slot and create an active key.
- expanded_value *internal_value = 0;
- ACE_Active_Map_Manager_Key active_key;
- int result = this->implementation_.bind (active_key,
- internal_value);
- if (result == 0)
- {
- // Encode the active key into key part of <expanded_value>.
- result = this->key_adapter_.encode (internal_value->first (),
- active_key,
- internal_value->first ());
- if (result == 0)
- {
- // Copy user value into <expanded_value>.
- internal_value->second (value);
- }
- else
- {
- // In case of errors, unbind from map.
- this->implementation_.unbind (active_key);
- }
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::recover_key (const KEY &modified_key,
- KEY &original_key)
-{
- // Ask the <key_adapter_> to help out with recovering the original
- // user key, since it was the one that encode it in the first place.
- return this->key_adapter_.decode (modified_key,
- original_key);
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::find (const KEY &key,
- ACE_Pair<KEY, VALUE> *&internal_value)
-{
- // Ask the <key_adapter_> to recover the active key.
- ACE_Active_Map_Manager_Key active_key;
- int result = this->key_adapter_.decode (key,
- active_key);
- if (result == 0)
- {
- // Find recovered active key in map.
- result = this->implementation_.find (active_key,
- internal_value);
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::find (const KEY &key,
- VALUE &value)
-{
- expanded_value *internal_value = 0;
- int result = this->find (key,
- internal_value);
-
- if (result == 0)
- {
- // Copy value.
- value = internal_value->second ();
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::find (const KEY &key)
-{
- expanded_value *internal_value = 0;
- return this->find (key,
- internal_value);
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::rebind (const KEY &key,
- const VALUE &value)
-{
- expanded_value *internal_value = 0;
- int result = this->find (key,
- internal_value);
-
- if (result == 0)
- {
- // Reset value.
- internal_value->second (value);
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value)
-{
- expanded_value *internal_value = 0;
- int result = this->find (key,
- internal_value);
-
- if (result == 0)
- {
- // Copy old value.
- old_value = internal_value->second ();
-
- // Reset to new value.
- internal_value->second (value);
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value)
-{
- expanded_value *internal_value = 0;
- int result = this->find (key,
- internal_value);
-
- if (result == 0)
- {
- // Copy old key and value.
- old_key = internal_value->first ();
- old_value = internal_value->second ();
-
- // Reset to new value.
- internal_value->second (value);
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::trybind (const KEY &,
- VALUE &)
-{
- ACE_NOTSUP_RETURN (-1);
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::unbind (const KEY &key,
- ACE_Pair<KEY, VALUE> *&internal_value)
-{
- // Ask the <key_adapter_> to recover the active key.
- ACE_Active_Map_Manager_Key active_key;
- int result = this->key_adapter_.decode (key,
- active_key);
- if (result == 0)
- {
- // Unbind recovered active key from map.
- result = this->implementation_.unbind (active_key,
- internal_value);
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::unbind (const KEY &key)
-{
- expanded_value *internal_value = 0;
- return this->unbind (key,
- internal_value);
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE int
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::unbind (const KEY &key,
- VALUE &value)
-{
- expanded_value *internal_value = 0;
- int result = this->unbind (key,
- internal_value);
-
- if (result == 0)
- {
- // Copy value.
- value = internal_value->second ();
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE size_t
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::current_size (void) const
-{
- return this->implementation_.current_size ();
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE size_t
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::total_size (void) const
-{
- return this->implementation_.total_size ();
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE void
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::dump (void) const
-{
- this->implementation_.dump ();
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::begin_impl (void)
-{
- return new iterator_impl (this->implementation_.begin ());
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::end_impl (void)
-{
- return new iterator_impl (this->implementation_.end ());
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::rbegin_impl (void)
-{
- return new reverse_iterator_impl (this->implementation_.rbegin ());
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::rend_impl (void)
-{
- return new reverse_iterator_impl (this->implementation_.rend ());
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE ACE_Active_Map_Manager<ACE_Pair<KEY, VALUE> > &
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class KEY, class VALUE, class KEY_ADAPTER> ACE_INLINE KEY_ADAPTER &
-ACE_Active_Map_Manager_Adapter<KEY, VALUE, KEY_ADAPTER>::key_adapter (void)
-{
- return this->key_adapter_;
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE
-ACE_Hash_Map_Manager_Ex_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::ACE_Hash_Map_Manager_Ex_Iterator_Adapter (const ACE_Hash_Map_Iterator_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> &impl)
- : implementation_ (impl)
-{
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE
-ACE_Hash_Map_Manager_Ex_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::~ACE_Hash_Map_Manager_Ex_Iterator_Adapter (void)
-{
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE ACE_Iterator_Impl<T> *
-ACE_Hash_Map_Manager_Ex_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::clone (void) const
-{
- return new ACE_Hash_Map_Manager_Ex_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS> (*this);
-}
-
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::compare (const ACE_Iterator_Impl<T> &rhs_base) const
-{
- const ACE_Hash_Map_Manager_Ex_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS> &rhs
- = ACE_dynamic_cast_5_ref (const ACE_Hash_Map_Manager_Ex_Iterator_Adapter, T, KEY, VALUE, HASH_KEY, COMPARE_KEYS, rhs_base);
-
- return this->implementation_ == rhs.implementation_;
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE T
-ACE_Hash_Map_Manager_Ex_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::dereference () const
-{
- // The following syntax is necessary to work around certain broken compilers.
- // In particular, please do not prefix implementation_ with this->
- return T ((*implementation_).ext_id_,
- (*implementation_).int_id_);
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE void
-ACE_Hash_Map_Manager_Ex_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::plus_plus (void)
-{
- ++this->implementation_;
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE void
-ACE_Hash_Map_Manager_Ex_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::minus_minus (void)
-{
- --this->implementation_;
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE ACE_Hash_Map_Iterator_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> &
-ACE_Hash_Map_Manager_Ex_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE
-ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter (const ACE_Hash_Map_Reverse_Iterator_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> &impl)
- : implementation_ (impl)
-{
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE
-ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::~ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter (void)
-{
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE ACE_Reverse_Iterator_Impl<T> *
-ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::clone (void) const
-{
- return new ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS> (*this);
-}
-
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::compare (const ACE_Reverse_Iterator_Impl<T> &rhs_base) const
-{
- const ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS> &rhs
- = ACE_dynamic_cast_5_ref (const ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter, T, KEY, VALUE, HASH_KEY, COMPARE_KEYS, rhs_base);
-
- return this->implementation_ == rhs.implementation_;
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE T
-ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::dereference () const
-{
- // The following syntax is necessary to work around certain broken compilers.
- // In particular, please do not prefix implementation_ with this->
- return T ((*implementation_).ext_id_,
- (*implementation_).int_id_);
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE void
-ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::plus_plus (void)
-{
- ++this->implementation_;
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE void
-ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::minus_minus (void)
-{
- --this->implementation_;
-}
-
-template <class T, class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS> ACE_INLINE ACE_Hash_Map_Reverse_Iterator_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> &
-ACE_Hash_Map_Manager_Ex_Reverse_Iterator_Adapter<T, KEY, VALUE, HASH_KEY, COMPARE_KEYS>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::ACE_Hash_Map_Manager_Ex_Adapter (ACE_Allocator *alloc)
- : implementation_ (alloc)
-{
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::ACE_Hash_Map_Manager_Ex_Adapter (size_t size,
- ACE_Allocator *alloc)
- : implementation_ (size,
- alloc)
-{
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::~ACE_Hash_Map_Manager_Ex_Adapter (void)
-{
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::open (size_t length,
- ACE_Allocator *alloc)
-{
- return this->implementation_.open (length,
- alloc);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::close (void)
-{
- return this->implementation_.close ();
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::bind (const KEY &key,
- const VALUE &value)
-{
- return this->implementation_.bind (key,
- value);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::bind_modify_key (const VALUE &value,
- KEY &key)
-{
- return this->implementation_.bind (key,
- value);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::bind_create_key (const VALUE &value,
- KEY &key)
-{
- // Invoke the user specified key generation functor.
- int result = this->key_generator_ (key);
-
- if (result == 0)
- {
- // Try to add.
- result = this->implementation_.bind (key,
- value);
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::bind_create_key (const VALUE &value)
-{
- KEY key;
- return this->bind_create_key (value,
- key);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::recover_key (const KEY &modified_key,
- KEY &original_key)
-{
- original_key = modified_key;
- return 0;
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::rebind (const KEY &key,
- const VALUE &value)
-{
- return this->implementation_.rebind (key,
- value);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value)
-{
- return this->implementation_.rebind (key,
- value,
- old_value);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value)
-{
- return this->implementation_.rebind (key,
- value,
- old_key,
- old_value);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::trybind (const KEY &key,
- VALUE &value)
-{
- return this->implementation_.trybind (key,
- value);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::find (const KEY &key,
- VALUE &value)
-{
- return this->implementation_.find (key,
- value);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::find (const KEY &key)
-{
- return this->implementation_.find (key);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::unbind (const KEY &key)
-{
- return this->implementation_.unbind (key);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE int
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::unbind (const KEY &key,
- VALUE &value)
-{
- return this->implementation_.unbind (key,
- value);
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE size_t
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::current_size (void) const
-{
- return this->implementation_.current_size ();
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE size_t
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::total_size (void) const
-{
- return this->implementation_.total_size ();
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE void
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::dump (void) const
-{
- this->implementation_.dump ();
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::begin_impl (void)
-{
- return new iterator_impl (this->implementation_.begin ());
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::end_impl (void)
-{
- return new iterator_impl (this->implementation_.end ());
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::rbegin_impl (void)
-{
- return new reverse_iterator_impl (this->implementation_.rbegin ());
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::rend_impl (void)
-{
- return new reverse_iterator_impl (this->implementation_.rend ());
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE ACE_Hash_Map_Manager_Ex<KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> &
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class KEY_GENERATOR> ACE_INLINE KEY_GENERATOR &
-ACE_Hash_Map_Manager_Ex_Adapter<KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR>::key_generator (void)
-{
- return this->key_generator_;
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE
-ACE_Map_Manager_Iterator_Adapter<T, KEY, VALUE>::ACE_Map_Manager_Iterator_Adapter (const ACE_Map_Iterator<KEY, VALUE, ACE_Null_Mutex> &impl)
- : implementation_ (impl)
-{
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE
-ACE_Map_Manager_Iterator_Adapter<T, KEY, VALUE>::~ACE_Map_Manager_Iterator_Adapter (void)
-{
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE ACE_Iterator_Impl<T> *
-ACE_Map_Manager_Iterator_Adapter<T, KEY, VALUE>::clone (void) const
-{
- return new ACE_Map_Manager_Iterator_Adapter<T, KEY, VALUE> (*this);
-}
-
-
-template <class T, class KEY, class VALUE> ACE_INLINE int
-ACE_Map_Manager_Iterator_Adapter<T, KEY, VALUE>::compare (const ACE_Iterator_Impl<T> &rhs_base) const
-{
- const ACE_Map_Manager_Iterator_Adapter<T, KEY, VALUE> &rhs
- = ACE_dynamic_cast_3_ref (const ACE_Map_Manager_Iterator_Adapter, T, KEY, VALUE, rhs_base);
-
- return this->implementation_ == rhs.implementation_;
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE T
-ACE_Map_Manager_Iterator_Adapter<T, KEY, VALUE>::dereference () const
-{
- // The following syntax is necessary to work around certain broken compilers.
- // In particular, please do not prefix implementation_ with this->
- return T ((*implementation_).ext_id_,
- (*implementation_).int_id_);
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE void
-ACE_Map_Manager_Iterator_Adapter<T, KEY, VALUE>::plus_plus (void)
-{
- ++this->implementation_;
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE void
-ACE_Map_Manager_Iterator_Adapter<T, KEY, VALUE>::minus_minus (void)
-{
- --this->implementation_;
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE ACE_Map_Iterator<KEY, VALUE, ACE_Null_Mutex> &
-ACE_Map_Manager_Iterator_Adapter<T, KEY, VALUE>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE
-ACE_Map_Manager_Reverse_Iterator_Adapter<T, KEY, VALUE>::ACE_Map_Manager_Reverse_Iterator_Adapter (const ACE_Map_Reverse_Iterator<KEY, VALUE, ACE_Null_Mutex> &impl)
- : implementation_ (impl)
-{
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE
-ACE_Map_Manager_Reverse_Iterator_Adapter<T, KEY, VALUE>::~ACE_Map_Manager_Reverse_Iterator_Adapter (void)
-{
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE ACE_Reverse_Iterator_Impl<T> *
-ACE_Map_Manager_Reverse_Iterator_Adapter<T, KEY, VALUE>::clone (void) const
-{
- return new ACE_Map_Manager_Reverse_Iterator_Adapter<T, KEY, VALUE> (*this);
-}
-
-
-template <class T, class KEY, class VALUE> ACE_INLINE int
-ACE_Map_Manager_Reverse_Iterator_Adapter<T, KEY, VALUE>::compare (const ACE_Reverse_Iterator_Impl<T> &rhs_base) const
-{
- const ACE_Map_Manager_Reverse_Iterator_Adapter<T, KEY, VALUE> &rhs
- = ACE_dynamic_cast_3_ref (const ACE_Map_Manager_Reverse_Iterator_Adapter, T, KEY, VALUE, rhs_base);
-
- return this->implementation_ == rhs.implementation_;
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE T
-ACE_Map_Manager_Reverse_Iterator_Adapter<T, KEY, VALUE>::dereference () const
-{
- // The following syntax is necessary to work around certain broken compilers.
- // In particular, please do not prefix implementation_ with this->
- return T ((*implementation_).ext_id_,
- (*implementation_).int_id_);
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE void
-ACE_Map_Manager_Reverse_Iterator_Adapter<T, KEY, VALUE>::plus_plus (void)
-{
- ++this->implementation_;
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE void
-ACE_Map_Manager_Reverse_Iterator_Adapter<T, KEY, VALUE>::minus_minus (void)
-{
- --this->implementation_;
-}
-
-template <class T, class KEY, class VALUE> ACE_INLINE ACE_Map_Reverse_Iterator<KEY, VALUE, ACE_Null_Mutex> &
-ACE_Map_Manager_Reverse_Iterator_Adapter<T, KEY, VALUE>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::ACE_Map_Manager_Adapter (ACE_Allocator *alloc)
- : implementation_ (alloc)
-{
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::ACE_Map_Manager_Adapter (size_t size,
- ACE_Allocator *alloc)
- : implementation_ (size,
- alloc)
-{
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::~ACE_Map_Manager_Adapter (void)
-{
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::open (size_t length,
- ACE_Allocator *alloc)
-{
- return this->implementation_.open (length,
- alloc);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::close (void)
-{
- return this->implementation_.close ();
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::bind (const KEY &key,
- const VALUE &value)
-{
- return this->implementation_.bind (key,
- value);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::bind_modify_key (const VALUE &value,
- KEY &key)
-{
- return this->implementation_.bind (key,
- value);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::bind_create_key (const VALUE &value,
- KEY &key)
-{
- // Invoke the user specified key generation functor.
- int result = this->key_generator_ (key);
-
- if (result == 0)
- {
- // Try to add.
- result = this->implementation_.bind (key,
- value);
- }
-
- return result;
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::bind_create_key (const VALUE &value)
-{
- KEY key;
- return this->bind_create_key (value,
- key);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::recover_key (const KEY &modified_key,
- KEY &original_key)
-{
- original_key = modified_key;
- return 0;
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::rebind (const KEY &key,
- const VALUE &value)
-{
- return this->implementation_.rebind (key,
- value);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::rebind (const KEY &key,
- const VALUE &value,
- VALUE &old_value)
-{
- return this->implementation_.rebind (key,
- value,
- old_value);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::rebind (const KEY &key,
- const VALUE &value,
- KEY &old_key,
- VALUE &old_value)
-{
- return this->implementation_.rebind (key,
- value,
- old_key,
- old_value);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::trybind (const KEY &key,
- VALUE &value)
-{
- return this->implementation_.trybind (key,
- value);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::find (const KEY &key,
- VALUE &value)
-{
- return this->implementation_.find (key,
- value);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::find (const KEY &key)
-{
- return this->implementation_.find (key);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::unbind (const KEY &key)
-{
- return this->implementation_.unbind (key);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE int
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::unbind (const KEY &key,
- VALUE &value)
-{
- return this->implementation_.unbind (key,
- value);
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE size_t
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::current_size (void) const
-{
- return this->implementation_.current_size ();
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE size_t
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::total_size (void) const
-{
- return this->implementation_.total_size ();
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE void
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::dump (void) const
-{
- this->implementation_.dump ();
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::begin_impl (void)
-{
- return new iterator_impl (this->implementation_.begin ());
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::end_impl (void)
-{
- return new iterator_impl (this->implementation_.end ());
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::rbegin_impl (void)
-{
- return new reverse_iterator_impl (this->implementation_.rbegin ());
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::rend_impl (void)
-{
- return new reverse_iterator_impl (this->implementation_.rend ());
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE ACE_Map_Manager<KEY, VALUE, ACE_Null_Mutex> &
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::impl (void)
-{
- return this->implementation_;
-}
-
-template <class KEY, class VALUE, class KEY_GENERATOR> ACE_INLINE KEY_GENERATOR &
-ACE_Map_Manager_Adapter<KEY, VALUE, KEY_GENERATOR>::key_generator (void)
-{
- return this->key_generator_;
-}
diff --git a/ace/Mem_Map.cpp b/ace/Mem_Map.cpp
deleted file mode 100644
index 35df95724aa..00000000000
--- a/ace/Mem_Map.cpp
+++ /dev/null
@@ -1,322 +0,0 @@
-// $Id$
-
-// Defines the member functions for the memory mapping facility.
-
-#include "ace/Mem_Map.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Mem_Map.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Mem_Map, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Mem_Map)
-
-void
-ACE_Mem_Map::dump (void) const
-{
- ACE_TRACE ("ACE_Mem_Map::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base_addr_ = %x"), this->base_addr_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nfilename_ = %s"), this->filename_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nlength_ = %d"), this->length_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhandle_ = %d"), this->handle_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nfile_mapping_ = %d"), this->file_mapping_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nclose_handle_ = %d"), this->close_handle_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-int
-ACE_Mem_Map::close (void)
-{
- ACE_TRACE ("ACE_Mem_Map::close");
-
- this->unmap ();
-
- return this->close_handle ();
-}
-
-ACE_Mem_Map::~ACE_Mem_Map (void)
-{
- ACE_TRACE ("ACE_Mem_Map::~ACE_Mem_Map");
-
- this->close ();
-}
-
-// This function does the dirty work of actually calling ACE_OS::mmap
-// to map the file into memory.
-
-int
-ACE_Mem_Map::map_it (ACE_HANDLE handle,
- int length_request,
- int prot,
- int share,
- void *addr,
- off_t offset,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_Mem_Map::map_it");
-
-#if defined (ACE_LACKS_AUTO_MMAP_REPLACEMENT)
- // If the system does not replace any previous mappings, then
- // unmap() before (potentially) mapping to the same location.
- int unmap_result = this->unmap ();
- if (unmap_result != 0)
- return unmap_result;
-#endif /* ACE_LACKS_AUTO_MMAP_REMAPPING */
-
- this->base_addr_ = addr;
- this->handle_ = handle;
-
-#if defined (CHORUS)
- // Chorus does not support filesize on a shared memory handle. We
- // assume that <length_> = 0 when <ACE_Mem_Map> is initially
- // constructed (i.e., before <map_it> is called with a valid
- // <len_request>).
- long result = this->length_;
-
- if (result == -1)
- return -1;
-#else
- long result = ACE_OS::filesize (this->handle_);
-#endif /* CHORUS */
-
- // At this point we know <result> is not negative...
- size_t current_file_length = ACE_static_cast (size_t, result);
-
- // Flag to indicate if we need to extend the back store
- int extend_backing_store = 0;
-
- // File length requested by user
- size_t requested_file_length = 0;
-
- // Check <length_request>
- if (length_request == -1)
- // Set length to file_request
- this->length_ = current_file_length;
- else
- {
- // File length implicitly requested by user
- requested_file_length = length_request + offset;
-
- // Check to see if we need to extend the backing store
- if (requested_file_length > current_file_length)
- {
- // If the length of the mapped region is less than the
- // length of the file then we force a complete new remapping
- // by setting the descriptor to ACE_INVALID_HANDLE (closing
- // down the descriptor if necessary).
- this->close_filemapping_handle ();
-
- // Remember to extend the backing store
- extend_backing_store = 1;
- }
-
- // Set length to length_request
- this->length_ = length_request;
- }
-
- // Check if we need to extend the backing store.
- if (extend_backing_store)
- {
-#if !defined (CHORUS)
- // Remember than write increases the size by one.
- size_t null_byte_position;
- if (requested_file_length > 0)
- // This will make the file size <requested_file_length>
- null_byte_position = requested_file_length - 1;
- else
- // This will make the file size 1
- null_byte_position = 0;
-
- if (ACE_OS::pwrite (this->handle_,
- "",
- 1,
- null_byte_position) == -1)
- return -1;
-#else
- // This nonsense is to make this code similar to the above code.
- size_t actual_file_length;
- if (requested_file_length > 0)
- // This will make the file size <requested_file_length>
- actual_file_length = requested_file_length;
- else
- // This will make the file size 1
- actual_file_length = 1;
-
- if (ACE_OS::ftruncate (this->handle_,
- actual_file_length) == -1)
- return -1;
-#endif /* !CHORUS */
- }
-
-#if defined (__Lynx__)
- // Set flag that indicates whether PROT_WRITE has been enabled.
- write_enabled_ = ACE_BIT_ENABLED (prot, PROT_WRITE);
-#endif /* __Lynx__ */
-
- this->base_addr_ = ACE_OS::mmap (this->base_addr_,
- this->length_,
- prot,
- share,
- this->handle_,
- offset,
- &this->file_mapping_,
- sa);
-
- return this->base_addr_ == MAP_FAILED ? -1 : 0;
-}
-
-int
-ACE_Mem_Map::open (const ACE_TCHAR *file_name,
- int flags,
- int mode,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_Mem_Map::open");
-
- ACE_OS::strncpy (this->filename_,
- file_name,
- MAXPATHLEN);
-
-#if defined (CHORUS)
- this->handle_ = ACE_OS::shm_open (file_name, flags, mode, sa);
-#else
- this->handle_ = ACE_OS::open (file_name, flags, mode, sa);
-#endif /* CHORUS */
-
- if (this->handle_ == ACE_INVALID_HANDLE)
- return -1;
- else
- {
- this->close_handle_ = 1;
- return 0;
- }
-}
-
-int
-ACE_Mem_Map::map (const ACE_TCHAR *file_name,
- int len,
- int flags,
- int mode,
- int prot,
- int share,
- void *addr,
- off_t offset,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_Mem_Map::map");
- this->length_ = 0;
-
- if (this->open (file_name,
- flags,
- mode,
- sa) == -1)
- return -1;
- else
- return this->map_it (this->handle (),
- len,
- prot,
- share,
- addr,
- offset,
- sa);
-}
-
-ACE_Mem_Map::ACE_Mem_Map (void)
- : base_addr_ (MAP_FAILED),
- length_ (0),
- handle_ (ACE_INVALID_HANDLE),
- file_mapping_ (ACE_INVALID_HANDLE),
- close_handle_ (0)
-{
- ACE_TRACE ("ACE_Mem_Map::ACE_Mem_Map");
- ACE_OS::memset (this->filename_, 0, sizeof this->filename_);
-}
-
-// Map a file specified by FILE_NAME.
-
-ACE_Mem_Map::ACE_Mem_Map (const ACE_TCHAR *file_name,
- int len,
- int flags,
- int mode,
- int prot,
- int share,
- void *addr,
- off_t offset,
- LPSECURITY_ATTRIBUTES sa)
- : base_addr_ (MAP_FAILED),
- length_ (0),
- handle_ (ACE_INVALID_HANDLE),
- file_mapping_ (ACE_INVALID_HANDLE),
- close_handle_ (0)
-{
- ACE_TRACE ("ACE_Mem_Map::ACE_Mem_Map");
- if (this->map (file_name,
- len,
- flags,
- mode,
- prot,
- share,
- addr,
- offset,
- sa) < 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Mem_Map::ACE_Mem_Map")));
-}
-
-// Map a file from an open file descriptor HANDLE. This function will
-// lookup the length of the file if it is not given.
-
-ACE_Mem_Map::ACE_Mem_Map (ACE_HANDLE handle,
- int len,
- int prot,
- int share,
- void *addr,
- off_t offset,
- LPSECURITY_ATTRIBUTES sa)
- : base_addr_ (MAP_FAILED),
- length_ (0),
- handle_ (ACE_INVALID_HANDLE),
- file_mapping_ (ACE_INVALID_HANDLE),
- close_handle_ (0)
-{
- ACE_TRACE ("ACE_Mem_Map::ACE_Mem_Map");
-
- ACE_OS::memset (this->filename_,
- 0,
- sizeof this->filename_);
- if (this->map (handle,
- len,
- prot,
- share,
- addr,
- offset,
- sa) < 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Mem_Map::ACE_Mem_Map")));
-}
-
-// Close down and remove the file from the file system.
-
-int
-ACE_Mem_Map::remove (void)
-{
- ACE_TRACE ("ACE_Mem_Map::remove");
-
- ACE_OS::ftruncate (this->handle_, 0);
- this->close ();
-
- if (this->filename_[0] != '\0')
-#if defined (CHORUS)
- return ACE_OS::shm_unlink (this->filename_);
-#else
- return ACE_OS::unlink (this->filename_);
-#endif /* CHORUS */
-
- else
- return 0;
-}
diff --git a/ace/Mem_Map.h b/ace/Mem_Map.h
deleted file mode 100644
index 7c6781c8ba6..00000000000
--- a/ace/Mem_Map.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Mem_Map.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_MEM_MAP_H
-#define ACE_MEM_MAP_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Mem_Map
-{
- // = TITLE
- // C++ interface OS memory mapping system call.
- //
- // = DESCRIPTION
- // This class works with both the mmap(2) UNIX system and the
- // Win32 family of memory mapping system calls.
-public:
- // = Initialization and termination methods.
-
- ACE_Mem_Map (void);
- // Default constructor.
-
- ACE_Mem_Map (ACE_HANDLE handle,
- int length = -1,
- int prot = PROT_RDWR,
- int share = ACE_MAP_PRIVATE,
- void *addr = 0,
- off_t offset = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Map a file from an open file descriptor <handle>. This function
- // will lookup the length of the file if it is not given.
-
- ACE_Mem_Map (const ACE_TCHAR *filename,
- int len = -1,
- int flags = O_RDWR | O_CREAT,
- int mode = ACE_DEFAULT_FILE_PERMS,
- int prot = PROT_RDWR,
- int share = ACE_MAP_PRIVATE,
- void *addr = 0,
- off_t offset = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Map a file specified by <file_name>.
-
- int map (ACE_HANDLE handle,
- int length = -1,
- int prot = PROT_RDWR,
- int share = ACE_MAP_PRIVATE,
- void *addr = 0,
- off_t offset = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Map a file from an open file descriptor <handle>. This function
- // will lookup the length of the file if it is not given.
-
- int map (int length = -1,
- int prot = PROT_RDWR,
- int share = ACE_MAP_PRIVATE,
- void *addr = 0,
- off_t offset = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Remap the file associated with <handle_>.
-
- int map (const ACE_TCHAR *filename,
- int len = -1,
- int flags = O_RDWR | O_CREAT,
- int mode = ACE_DEFAULT_FILE_PERMS,
- int prot = PROT_RDWR,
- int share = ACE_MAP_PRIVATE,
- void *addr = 0,
- off_t offset = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Map a file specified by <filename>.
-
- ~ACE_Mem_Map (void);
- // Destructor.
-
- int open (const ACE_TCHAR *filename,
- int flags = O_RDWR | O_CREAT,
- int mode = ACE_DEFAULT_FILE_PERMS,
- LPSECURITY_ATTRIBUTES sa = 0);
- // Open the file without mapping it.
-
- int close (void);
- // Close down the <handle_> if necessary and unmap the mapping.
-
- int close_handle (void);
- // Close down the <handle_> if necessary.
-
- int close_filemapping_handle (void);
- // Close down the internal <file_mapping_> if necessary. This is
- // mostly necessary on Win32, which has a different handle for
- // file-mapping kernel object.
-
- int operator () (void *&addr);
- // This operator passes back the starting address of the mapped
- // file.
-
- void *addr (void) const;
- // Return the base address.
-
- size_t size (void) const;
- // This function returns the number of bytes currently mapped in the
- // file.
-
- int unmap (int len = -1);
- // Unmap the region starting at <base_addr_>.
-
- int unmap (void *addr, int len);
- // Unmap the region starting at <addr_>.
-
- int sync (ssize_t len = -1, int flags = MS_SYNC);
- // Sync <len> bytes of the memory region to the backing store
- // starting at <base_addr_>. If <len> == -1 then sync the whole
- // region.
-
- int sync (void *addr, size_t len, int flags = MS_SYNC);
- // Sync <len> bytes of the memory region to the backing store
- // starting at <addr_>.
-
- int protect (ssize_t len = -1, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <base_addr_> up to <len> bytes. If <len> == -1 then
- // change protection of all pages in the mapped region.
-
- int protect (void *addr, size_t len, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <addr> up to <len> bytes.
-
- int remove (void);
- // Close and remove the file from the file system.
-
- int advise (int behavior, int len = -1);
- // Hook into the underlying VM system.
-
- ACE_HANDLE handle (void) const;
- // Return the underlying <handle_>.
-
- const ACE_TCHAR *filename (void) const;
- // Return the name of file that is mapped (if any).
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- void *base_addr_;
- // Base address of the memory-mapped file.
-
- ACE_TCHAR filename_[MAXPATHLEN + 1];
- // Name of the file that is mapped.
-
- size_t length_;
- // Length of the mapping.
-
- ACE_HANDLE handle_;
- // HANDLE for the open file.
-
- ACE_HANDLE file_mapping_;
- // HANDLE for the open mapping.
-
-#if defined (__Lynx__)
- int write_enabled_;
- // Flag to indicate that PROT_WRITE has been enabled.
-#endif /* __Lynx__ */
-
- int close_handle_;
- // Keeps track of whether we need to close the handle. This is set
- // if we opened the file.
-
- int map_it (ACE_HANDLE handle,
- int len = -1,
- int prot = PROT_RDWR,
- int share = MAP_SHARED,
- void *addr = 0,
- off_t offset = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- // This method does the dirty work of actually calling ::mmap to map
- // the file into memory.
-
- // = Disallow copying and assignment.
- ACE_UNIMPLEMENTED_FUNC (ACE_Mem_Map (const ACE_Mem_Map &))
- ACE_UNIMPLEMENTED_FUNC (void operator = (const ACE_Mem_Map &))
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Mem_Map.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_MEM_MAP_H */
diff --git a/ace/Mem_Map.i b/ace/Mem_Map.i
deleted file mode 100644
index 7448fcb4933..00000000000
--- a/ace/Mem_Map.i
+++ /dev/null
@@ -1,251 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE ACE_HANDLE
-ACE_Mem_Map::handle (void) const
-{
- ACE_TRACE ("ACE_Mem_Map::handle");
- return this->handle_;
-}
-
-// Return the name of file that is mapped (if any).
-
-ACE_INLINE const ACE_TCHAR *
-ACE_Mem_Map::filename (void) const
-{
- return this->filename_;
-}
-
-ACE_INLINE int
-ACE_Mem_Map::map (ACE_HANDLE handle,
- int len,
- int prot,
- int share,
- void *addr,
- off_t offset,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_Mem_Map::map");
- return this->map_it (handle, len, prot, share, addr, offset, sa);
-}
-
-// Remap the file associated with <this->handle_>.
-
-ACE_INLINE int
-ACE_Mem_Map::map (int len,
- int prot,
- int share,
- void *addr,
- off_t offset,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_Mem_Map::map");
- // If we're already mapped at a particular location then try to
- // remap the file using the same base address.
- if (addr == 0 && this->base_addr_ != 0 && this->base_addr_ != MAP_FAILED)
- {
- share |= MAP_FIXED;
- addr = this->base_addr_;
- }
- return this->map_it (this->handle (), len, prot,
- share, addr, offset, sa);
-}
-
-// This operator passes back the starting address of the mapped file.
-
-ACE_INLINE int
-ACE_Mem_Map::operator () (void *&addr)
-{
- ACE_TRACE ("ACE_Mem_Map::operator");
-
- if (this->base_addr_ == MAP_FAILED)
- return -1;
- else
- {
- addr = this->base_addr_;
- return 0;
- }
-}
-
-// Return the base address.
-
-ACE_INLINE void *
-ACE_Mem_Map::addr (void) const
-{
- ACE_TRACE ("ACE_Mem_Map::addr");
-
- return this->base_addr_;
-}
-
-// This function returns the number of bytes currently mapped in the
-// file.
-
-ACE_INLINE size_t
-ACE_Mem_Map::size (void) const
-{
- ACE_TRACE ("ACE_Mem_Map::size");
- return this->length_;
-}
-
-ACE_INLINE int
-ACE_Mem_Map::close_filemapping_handle (void)
-{
- int result = 0;
-
- if (this->file_mapping_ != this->handle_
- && this->file_mapping_ != ACE_INVALID_HANDLE)
- {
- // On LynxOS, this will result in unlinking of the (hidden)
- // shared memory file if there are no more references to it.
- result = ACE_OS::close (this->file_mapping_);
- this->file_mapping_ = ACE_INVALID_HANDLE;
- }
-
- return result;
-}
-
-// Unmap the region starting at <this->base_addr_>.
-
-ACE_INLINE int
-ACE_Mem_Map::unmap (int len)
-{
- ACE_TRACE ("ACE_Mem_Map::unmap");
-
- this->close_filemapping_handle ();
-
-#if defined (__Lynx__)
- int writeback_result = 0;
- if (write_enabled_)
- {
- // Write back the contents of the shared memory object to the
- // file.
- const off_t filesize = ACE_OS::filesize (handle_);
- writeback_result =
- ACE_OS::lseek (handle_, 0, 0) != -1
- && ACE_OS::write (handle_,
- base_addr_,
- (int) filesize) == filesize ? 0 : -1;
- }
-#endif /* __Lynx__ */
- if (this->base_addr_ != MAP_FAILED)
- {
- int result = ACE_OS::munmap (this->base_addr_,
- len < 0 ? this->length_ : len);
- this->base_addr_ = MAP_FAILED;
- return result;
- }
- else
-#if defined (__Lynx__)
- return writeback_result;
-#else /* ! __Lynx__ */
- return 0;
-#endif /* ! __Lynx__ */
-}
-
-// Unmap the region starting at <addr_>.
-
-ACE_INLINE int
-ACE_Mem_Map::unmap (void *addr, int len)
-{
- ACE_TRACE ("ACE_Mem_Map::unmap");
-
- this->close_filemapping_handle ();
-
-#if defined (__Lynx__)
- int writeback_result = 0;
- if (write_enabled_)
- {
- // Write back the contents of the shared memory object to the file.
- const off_t filesize = ACE_OS::filesize (handle_);
- writeback_result =
- ACE_OS::lseek (handle_, 0, 0) != -1
- && ACE_OS::write (handle_,
- base_addr_,
- (int) filesize) == filesize ? 0 : -1;
- }
-#endif /* __Lynx__ */
-
-#if defined (__Lynx__)
- return ACE_OS::munmap (addr,
- len < 0 ? this->length_ : len)
- | writeback_result;;
-#else /* ! __Lynx__ */
- return ACE_OS::munmap (addr,
- len < 0 ? this->length_ : len);
-#endif /* ! __Lynx__ */
-}
-
-// Sync <len> bytes of the memory region to the backing store starting
-// at <this->base_addr_>. If <len> == -1 then sync the whole mapped
-// region.
-
-ACE_INLINE int
-ACE_Mem_Map::sync (ssize_t len, int flags)
-{
- ACE_TRACE ("ACE_Mem_Map::sync");
- return ACE_OS::msync (this->base_addr_,
- len < 0 ? this->length_ : len,
- flags);
-}
-
-// Sync <len> bytes of the memory region to the backing store starting
-// at <addr_>.
-
-ACE_INLINE int
-ACE_Mem_Map::sync (void *addr, size_t len, int flags)
-{
- ACE_TRACE ("ACE_Mem_Map::sync");
- return ACE_OS::msync (addr, len, flags);
-}
-
-// Change the protection of the pages of the mapped region to <prot>
-// starting at <this->base_addr_> up to <len> bytes. If <len> == -1
-// then change protection of all pages in the mapped region.
-
-ACE_INLINE int
-ACE_Mem_Map::protect (ssize_t len, int prot)
-{
- ACE_TRACE ("ACE_Mem_Map::protect");
- if (len < 0)
- len = this->length_;
- return ACE_OS::mprotect (this->base_addr_, len, prot);
-}
-
-// Change the protection of the pages of the mapped region to <prot>
-// starting at <addr> up to <len> bytes.
-
-ACE_INLINE int
-ACE_Mem_Map::protect (void *addr, size_t len, int prot)
-{
- ACE_TRACE ("ACE_Mem_Map::protect");
- return ACE_OS::mprotect (addr, len, prot);
-}
-
-// Hook into the underlying VM system.
-
-ACE_INLINE int
-ACE_Mem_Map::advise (int behavior, int len)
-{
- ACE_TRACE ("ACE_Mem_Map::advise");
- if (len < 0)
- len = this->length_;
-
- return ACE_OS::madvise ((caddr_t) this->base_addr_,
- len,
- behavior);
-}
-
-ACE_INLINE int
-ACE_Mem_Map::close_handle (void)
-{
- int result = 0;
-
- if (this->close_handle_)
- {
- this->close_handle_ = 0;
- result = ACE_OS::close (this->handle_);
- this->handle_ = ACE_INVALID_HANDLE;
- }
-
- return result;
-}
diff --git a/ace/Memory_Pool.cpp b/ace/Memory_Pool.cpp
deleted file mode 100644
index e68a8407599..00000000000
--- a/ace/Memory_Pool.cpp
+++ /dev/null
@@ -1,1325 +0,0 @@
-// $Id$
-
-// Memory_Pool.cpp
-#include "ace/Memory_Pool.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Memory_Pool.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Auto_Ptr.h"
-
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-#include "ace/Based_Pointer_T.h"
-#include "ace/Based_Pointer_Repository.h"
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-
-ACE_RCSID(ace, Memory_Pool, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Local_Memory_Pool)
-
-void
-ACE_Local_Memory_Pool::dump (void) const
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::dump");
-}
-
-ACE_Local_Memory_Pool::ACE_Local_Memory_Pool (const ACE_TCHAR *,
- const OPTIONS *)
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::ACE_Local_Memory_Pool");
-}
-
-void *
-ACE_Local_Memory_Pool::acquire (size_t nbytes,
- size_t &rounded_bytes)
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::acquire");
- rounded_bytes = this->round_up (nbytes);
-
- char *temp = 0;
- ACE_NEW_RETURN (temp,
- char[rounded_bytes],
- 0);
-
- ACE_Auto_Basic_Array_Ptr<char> cp (temp);
-
- if (this->allocated_chunks_.insert (cp.get ()) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) insertion into set failed\n")),
- 0);
-
- return cp.release ();
-}
-
-int
-ACE_Local_Memory_Pool::release (void)
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::release");
-
- // Zap the memory we allocated.
- for (ACE_Unbounded_Set<char *>::iterator i = this->allocated_chunks_.begin ();
- i != this->allocated_chunks_.end ();
- ++i)
- delete [] *i;
-
- return 0;
-}
-
-#if defined (ACE_WIN32)
-int
-ACE_Local_Memory_Pool::seh_selector (void *)
-{
- return 0;
- // Continue propagate the structural exception up.
-}
-#endif /* ACE_WIN32 */
-
-int
-ACE_Local_Memory_Pool::remap (void *)
-{
- return 0;
- // Not much can be done.
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_MMAP_Memory_Pool)
-
-void
-ACE_MMAP_Memory_Pool::dump (void) const
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::dump");
-}
-
-int
-ACE_MMAP_Memory_Pool::release (void)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::release");
-
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
- ACE_BASED_POINTER_REPOSITORY::instance ()->unbind (this->mmap_.addr ());
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-
- this->mmap_.remove ();
- return 0;
-}
-
-int
-ACE_MMAP_Memory_Pool::sync (ssize_t len, int flags)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::sync");
-
- if (len < 0)
- len = ACE_OS::lseek (this->mmap_.handle (), 0, SEEK_END);
-
- return this->mmap_.sync (len, flags);
-}
-
-// Sync <len> bytes of the memory region to the backing store starting
-// at <addr_>.
-
-int
-ACE_MMAP_Memory_Pool::sync (void *addr, size_t len, int flags)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::sync");
- return ACE_OS::msync (addr, len, flags);
-}
-
-// Change the protection of the pages of the mapped region to <prot>
-// starting at <this->base_addr_> up to <len> bytes. If <len> == -1
-// then change protection of all pages in the mapped region.
-
-int
-ACE_MMAP_Memory_Pool::protect (ssize_t len, int prot)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::protect");
-
- if (len < 0)
- len = ACE_OS::lseek (this->mmap_.handle (), 0, SEEK_END);
-
- return this->mmap_.protect (len, prot);
-}
-
-// Change the protection of the pages of the mapped region to <prot>
-// starting at <addr> up to <len> bytes.
-
-int
-ACE_MMAP_Memory_Pool::protect (void *addr, size_t len, int prot)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::protect");
- return ACE_OS::mprotect (addr, len, prot);
-}
-
-ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (const ACE_TCHAR *backing_store_name,
- const OPTIONS *options)
- : base_addr_ (0),
- flags_ (MAP_SHARED),
- write_each_page_ (0),
- minimum_bytes_ (0),
- sa_ (0)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool");
-
-#if (defined (ACE_HAS_SIGINFO_T) && !defined (ACE_LACKS_SI_ADDR)) || defined (ACE_WIN32)
- // For plaforms that give the faulting address.
- guess_on_fault_ = 0;
-#else
- // For plaforms that do NOT give the faulting address, let the
- // options decide whether to guess or not.
- if (options)
- guess_on_fault_ = options->guess_on_fault_;
- else
- // If no options are specified, default to true.
- guess_on_fault_ = 1;
-#endif
-
- // Only change the defaults if <options> != 0.
- if (options)
- {
- if (options->use_fixed_addr_)
- {
- this->base_addr_ =
- ACE_const_cast (void *, options->base_addr_);
- ACE_SET_BITS (flags_, MAP_FIXED);
- }
- this->write_each_page_ = options->write_each_page_;
- this->minimum_bytes_ = options->minimum_bytes_;
- if (options->flags_ != 0)
- this->flags_ = options->flags_;
- if (options->sa_ != 0)
- this->sa_ = options->sa_;
- }
-
- if (backing_store_name == 0)
- {
- // Only create a new unique filename for the backing store file
- // if the user didn't supply one...
-#if defined (ACE_DEFAULT_BACKING_STORE)
- // Create a temporary file.
- ACE_OS::strcpy (this->backing_store_name_,
- ACE_DEFAULT_BACKING_STORE);
-#else /* ACE_DEFAULT_BACKING_STORE */
- if (ACE::get_temp_dir (this->backing_store_name_,
- MAXPATHLEN - 17) == -1) // -17 for ace-malloc-XXXXXX
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Temporary path too long, ")
- ACE_TEXT ("defaulting to current directory\n")));
- this->backing_store_name_[0] = 0;
- }
-
- // Add the filename to the end
- ACE_OS::strcat (this->backing_store_name_,
- ACE_TEXT ("ace-malloc-XXXXXX"));
-
-#endif /* ACE_DEFAULT_BACKING_STORE */
- }
- else
- ACE_OS::strncpy (this->backing_store_name_,
- backing_store_name,
- (sizeof this->backing_store_name_ / sizeof (ACE_TCHAR)));
-
-#if !defined (ACE_WIN32) && !defined (CHORUS)
- if (this->signal_handler_.register_handler (SIGSEGV, this) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n", this->backing_store_name_));
-#endif /* ACE_WIN32 */
-}
-
-// Compute the new map_size of the backing store and commit the
-// memory.
-int
-ACE_MMAP_Memory_Pool::commit_backing_store_name (size_t rounded_bytes,
- off_t &map_size)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::commit_backing_store_name");
-
-#if defined (CHORUS)
- map_size = rounded_bytes;
-#else
- size_t seek_len;
-
- if (this->write_each_page_)
- // Write to the end of every block to ensure that we have enough
- // space in the backing store.
- seek_len = this->round_up (1); // round_up(1) is one page.
- else
- // We're willing to risk it all in the name of efficiency...
- seek_len = rounded_bytes;
-
- // The following loop will execute multiple times (if
- // this->write_each_page == 1) or just once (if
- // this->write_each_page == 0).
-
- for (size_t cur_block = 0;
- cur_block < rounded_bytes;
- cur_block += seek_len)
- {
- map_size = ACE_OS::lseek (this->mmap_.handle (),
- seek_len - 1,
- SEEK_END);
-
- if (map_size == -1
- || ACE_OS::write (this->mmap_.handle (),
- "",
- 1) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %p\n"),
- this->backing_store_name_),
- -1);
- }
-
- // Increment by one to put us at the beginning of the next chunk...
- map_size++;
-#endif /* CHORUS */
- return 0;
-}
-
-// Memory map the file up to <map_size> bytes.
-
-int
-ACE_MMAP_Memory_Pool::map_file (off_t map_size)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::map_file");
-
- // Unmap the existing mapping.
- this->mmap_.unmap ();
-
- // Remap the file.
- if (this->mmap_.map (map_size,
- PROT_RDWR,
- this->flags_,
- this->base_addr_,
- 0,
- this->sa_) == -1
- || this->base_addr_ != 0 && this->mmap_.addr () != this->base_addr_)
- {
-#if 0
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) addr = %u, base_addr = %u, map_size = %u, %p\n"),
- this->mmap_.addr (),
- this->base_addr_,
- map_size,
- this->backing_store_name_));
-#endif /* 0 */
- return -1;
- }
- else
- {
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
- this->base_addr_ = this->mmap_.addr ();
- ACE_BASED_POINTER_REPOSITORY::instance ()->bind (this->base_addr_,
- map_size);
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
- return 0;
- }
-}
-
-// Ask operating system for more shared memory, increasing the mapping
-// accordingly. Note that this routine assumes that the appropriate
-// locks are held when it is called.
-
-void *
-ACE_MMAP_Memory_Pool::acquire (size_t nbytes,
- size_t &rounded_bytes)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::acquire");
- rounded_bytes = this->round_up (nbytes);
-
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) acquiring more chunks, nbytes =
- // %d, rounded_bytes = %d\n", nbytes, rounded_bytes));
-
- off_t map_size;
-
- if (this->commit_backing_store_name (rounded_bytes,
- map_size) == -1)
- return 0;
- else if (this->map_file (map_size) == -1)
- return 0;
-
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) acquired more chunks, nbytes = %d,
- // rounded_bytes = %d, map_size = %d\n", nbytes, rounded_bytes,
- // map_size));
-
- return (void *) ((char *) this->mmap_.addr () + (this->mmap_.size () - rounded_bytes));
-}
-
-// Ask system for initial chunk of shared memory.
-
-void *
-ACE_MMAP_Memory_Pool::init_acquire (size_t nbytes,
- size_t &rounded_bytes,
- int &first_time)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::init_acquire");
-
- first_time = 0;
-
- if (nbytes < (size_t) 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, this->sa_) != -1)
- {
- // First time in, so need to acquire memory.
- first_time = 1;
- return this->acquire (nbytes, rounded_bytes);
- }
- else if (errno == EEXIST)
- {
- errno = 0;
- // Reopen file *without* using O_EXCL...
- if (this->mmap_.map (this->backing_store_name_,
-#if defined (CHORUS)
- nbytes,
-#else
- -1,
-#endif /* CHORUS */
- O_RDWR,
- ACE_DEFAULT_FILE_PERMS,
- PROT_RDWR,
- this->flags_,
- this->base_addr_,
- 0,
- this->sa_) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("open")),
- 0);
-
- return this->mmap_.addr ();
- }
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("open")),
- 0);
-}
-
-#if defined (ACE_WIN32)
-int
-ACE_MMAP_Memory_Pool::seh_selector (void *ep)
-{
- int ecode = ((EXCEPTION_POINTERS *) ep)->ExceptionRecord->ExceptionCode;
-
- if (ecode == EXCEPTION_ACCESS_VIOLATION)
- {
- void * fault_addr = (void *)
- ((EXCEPTION_POINTERS *) ep)->ExceptionRecord->ExceptionInformation[1];
-
- if (this->remap (fault_addr) == 0)
- return 1;
- }
-
- return 0;
-}
-#endif /* ACE_WIN32 */
-
-int
-ACE_MMAP_Memory_Pool::remap (void *addr)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::remap");
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Remapping with fault address at: %X\n"), addr));
- off_t current_map_size = ACE_OS::filesize (this->mmap_.handle ());
- // ACE_OS::lseek (this->mmap_.handle (), 0, SEEK_END);
-
- if (!(addr < (void *) ((char *) this->mmap_.addr () + current_map_size)
- && addr >= this->mmap_.addr ()))
- return -1;
-
- // Extend the mapping to cover the size of the backing store.
- return this->map_file (current_map_size);
-}
-
-ACE_MMAP_Memory_Pool_Options::ACE_MMAP_Memory_Pool_Options (const void *base_addr,
- int use_fixed_addr,
- int write_each_page,
- off_t minimum_bytes,
- u_int flags,
- int guess_on_fault,
- LPSECURITY_ATTRIBUTES sa)
- : base_addr_ (base_addr),
- use_fixed_addr_ (base_addr == 0 ? 0 : use_fixed_addr),
- write_each_page_ (write_each_page),
- minimum_bytes_ (minimum_bytes),
- flags_ (flags),
- guess_on_fault_ (guess_on_fault),
- sa_ (sa)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool_Options::ACE_MMAP_Memory_Pool_Options");
- // HP-UX 11, 64-bit bug workaround.
-#if defined (__hpux) && defined (__LP64__)
- long temp = ACE_DEFAULT_BASE_ADDRL;
- base_addr_ = (void *) temp;
-#endif /* defined (__hpux) && defined (__LP64__) */
-}
-
-// Handle SIGSEGV and SIGBUS signals to remap memory properly. When a
-// process reads or writes to non-mapped memory a signal (SIGBUS or
-// SIGSEGV) will be triggered. At that point, the ACE_Sig_Handler
-// (which is part of the ACE_Reactor) will catch the signal and
-// dispatch the handle_signal() method defined here. If the SIGSEGV
-// signal occurred due to the fact that the mapping wasn't uptodate
-// with respect to the backing store, the handler method below will
-// update the mapping accordingly. When the signal handler returns,
-// the instruction should be restarted and the operation should work.
-
-int
-ACE_MMAP_Memory_Pool::handle_signal (int signum, siginfo_t *siginfo, ucontext_t *)
-{
- if (signum != SIGSEGV)
- return -1;
- else
- ; // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) received %S\n"), signum));
-
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) new mapping address = %u\n"), (char *) this->base_addr_ + current_map_size));
-
-#if defined (ACE_HAS_SIGINFO_T) && !defined (ACE_LACKS_SI_ADDR)
- // Make sure that the pointer causing the problem is within the
- // range of the backing store.
-
- if (siginfo != 0)
- {
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) si_signo = %d, si_code = %d, addr = %u\n"), siginfo->si_signo, siginfo->si_code, siginfo->si_addr));
- if (this->remap ((void *) siginfo->si_addr) == -1)
- return -1;
- // ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) address %u out of range\n",
- // siginfo->si_addr), -1);
- return 0;
- }
-#else
- ACE_UNUSED_ARG(siginfo);
-#endif /* ACE_HAS_SIGINFO_T && !defined ACE_LACKS_SI_ADDR */
- // If guess_on_fault_ is true, then we want to try to remap without
- // knowing the faulting address. guess_on_fault_ can only be true
- // on platforms that do not provide the faulting address through
- // signals or exceptions. We check to see if the mapping is up to
- // date. If it is, then this fault isn't due to this mapping and we
- // pass it on.
- if (guess_on_fault_)
- {
- // Check if the current mapping is up to date.
- off_t current_map_size = ACE_OS::filesize (this->mmap_.handle ());
-
- if (ACE_static_cast (size_t, current_map_size) == this->mmap_.size ())
- {
- // The mapping is up to date so this really is a bad
- // address. Thus, remove current signal handler so process
- // will fail with default action and core file will be
- // written.
- this->signal_handler_.remove_handler (SIGSEGV);
- return 0;
- }
-
- // Extend the mapping to cover the size of the backing store.
- return this->map_file (current_map_size);
- }
- else
- return -1;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Lite_MMAP_Memory_Pool)
-
-ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool (const ACE_TCHAR *backing_store_name,
- const OPTIONS *options)
- : ACE_MMAP_Memory_Pool (backing_store_name, options)
-{
- ACE_TRACE ("ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool");
-}
-
-int
-ACE_Lite_MMAP_Memory_Pool::sync (ssize_t, int)
-{
- ACE_TRACE ("ACE_Lite_MMAP_Memory_Pool::sync");
- return 0;
-}
-
-int
-ACE_Lite_MMAP_Memory_Pool::sync (void *, size_t, int)
-{
- ACE_TRACE ("ACE_Lite_MMAP_Memory_Pool::sync");
- return 0;
-}
-
-#if !defined (ACE_LACKS_SBRK)
-ACE_ALLOC_HOOK_DEFINE(ACE_Sbrk_Memory_Pool)
-
-// Ask system for more local memory via sbrk(2).
-
-void *
-ACE_Sbrk_Memory_Pool::acquire (size_t nbytes,
- size_t &rounded_bytes)
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::acquire");
- rounded_bytes = this->round_up (nbytes);
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) acquiring more chunks, nbytes = %d, rounded_bytes = %d\n"), nbytes, rounded_bytes));
- void *cp = ACE_OS::sbrk (rounded_bytes);
-
- if (cp == MAP_FAILED)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) cp = %u\n",
- cp),
- 0);
- else
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) acquired more chunks, nbytes = %d, rounded_bytes = %d, new break = %u\n"), nbytes, rounded_bytes, cp));
- return cp;
-}
-
-void
-ACE_Sbrk_Memory_Pool::dump (void) const
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::dump");
-}
-
-ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool (const ACE_TCHAR *,
- const OPTIONS *)
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool");
-}
-#endif /* !ACE_LACKS_SBRK */
-
-#if !defined (ACE_LACKS_SYSV_SHMEM)
-ACE_ALLOC_HOOK_DEFINE(ACE_Shared_Memory_Pool)
-
-ACE_Shared_Memory_Pool_Options::ACE_Shared_Memory_Pool_Options (const char *base_addr,
- size_t max_segments,
- size_t file_perms,
- off_t minimum_bytes,
- size_t segment_size)
- : base_addr_ (base_addr),
- max_segments_ (max_segments),
- minimum_bytes_ (minimum_bytes),
- file_perms_ (file_perms),
- segment_size_ (segment_size)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool_Options::ACE_Shared_Memory_Pool_Options");
- // HP-UX 11, 64-bit bug workaround
-#if defined (__hpux) && defined (__LP64__)
- long temp = ACE_DEFAULT_BASE_ADDRL;
- base_addr_ = (char *) temp;
-#endif /* defined (__hpux) && defined (__LP64__) */
-}
-
-void
-ACE_Shared_Memory_Pool::dump (void) const
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::dump");
-}
-
-int
-ACE_Shared_Memory_Pool::in_use (off_t &offset,
- size_t &counter)
-{
- offset = 0;
- SHM_TABLE *st = ACE_reinterpret_cast (SHM_TABLE *,
- this->base_addr_);
- shmid_ds buf;
-
- for (counter = 0;
- counter < this->max_segments_ && st[counter].used_ == 1;
- counter++)
- {
- if (ACE_OS::shmctl (st[counter].shmid_, IPC_STAT, &buf) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %p\n"),
- ACE_TEXT ("shmctl")),
- -1);
- offset += buf.shm_segsz;
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) segment size = %d, offset = %d\n"), buf.shm_segsz, offset));
- }
-
- return 0;
-}
-
-int
-ACE_Shared_Memory_Pool::find_seg (const void* const searchPtr,
- off_t &offset,
- size_t &counter)
-{
- offset = 0;
- SHM_TABLE *st = ACE_reinterpret_cast (SHM_TABLE *,
- this->base_addr_);
- shmid_ds buf;
-
- for (counter = 0;
- counter < this->max_segments_
- && st[counter].used_ == 1;
- counter++)
- {
- if (ACE_OS::shmctl (st[counter].shmid_, IPC_STAT, &buf) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %p\n"),
- ACE_TEXT ("shmctl")),
- -1);
- offset += buf.shm_segsz;
-
- // If segment 'counter' starts at a location greater than the
- // place we are searching for. We then decrement the offset to
- // the start of counter-1. (flabar@vais.net)
- if ((offset + (off_t)(this->base_addr_) ) > (off_t)searchPtr)
- {
- --counter;
- offset -= buf.shm_segsz;
- return 0;
- }
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) segment size = %d, offset = %d\n"), buf.shm_segsz, offset));
- }
-
- return 0;
-}
-
-int
-ACE_Shared_Memory_Pool::commit_backing_store_name (size_t rounded_bytes,
- off_t &offset)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::update");
-
- size_t counter;
- SHM_TABLE *st = ACE_reinterpret_cast (SHM_TABLE *,
- this->base_addr_);
-
- if (this->in_use (offset, counter) == -1)
- return -1;
-
- if (counter == this->max_segments_)
- ACE_ERROR_RETURN ((LM_ERROR,
- "exceeded max number of segments = %d, base = %u, offset = %u\n",
- counter,
- this->base_addr_,
- offset),
- -1);
- else
- {
- int shmid = ACE_OS::shmget (st[counter].key_,
- rounded_bytes,
- this->file_perms_ | IPC_CREAT | IPC_EXCL);
- if (shmid == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %p\n"),
- ACE_TEXT ("shmget")),
- 0);
- st[counter].shmid_ = shmid;
- st[counter].used_ = 1;
-
- void *address = (void *) (((char *) this->base_addr_) + offset);
- void *shmem = ACE_OS::shmat (st[counter].shmid_,
- (char *) address,
- 0);
-
- if (shmem != address)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) %p, shmem = %u, address = %u\n",
- "shmat",
- shmem,
- address),
- 0);
- }
- return 0;
-}
-
-// Handle SIGSEGV and SIGBUS signals to remap shared memory properly.
-
-int
-ACE_Shared_Memory_Pool::handle_signal (int , siginfo_t *siginfo, ucontext_t *)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::handle_signal");
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("signal %S occurred\n"), signum));
-
-#if defined (ACE_HAS_SIGINFO_T) && !defined (ACE_LACKS_SI_ADDR)
- off_t offset;
- // Make sure that the pointer causing the problem is within the
- // range of the backing store.
-
- if (siginfo != 0)
- {
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) si_signo = %d, si_code = %d, addr = %u\n"), siginfo->si_signo, siginfo->si_code, siginfo->si_addr));
- size_t counter;
- if (this->in_use (offset, counter) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %p\n"),
- ACE_TEXT ("in_use")));
-#if !defined(_UNICOS)
- else if (!(siginfo->si_code == SEGV_MAPERR
- && siginfo->si_addr < (((char *) this->base_addr_) + offset)
- && siginfo->si_addr >= ((char *) this->base_addr_)))
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) address %u out of range\n",
- siginfo->si_addr),
- -1);
-#else /* ! _UNICOS */
- else if (!(siginfo->si_code == SEGV_MEMERR
- && siginfo->si_addr < (((unsigned long) this->base_addr_) + offset)
- && siginfo->si_addr >= ((unsigned long) this->base_addr_)))
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) address %u out of range\n",
- siginfo->si_addr),
- -1);
-#endif /* ! _UNICOS */
- }
-
- // The above if case will check to see that the address is in the
- // proper range. Therefore there is a segment out there that the
- // pointer wants to point into. Find the segment that someone else
- // has used and attach to it (flabar@vais.net)
-
- size_t counter; // ret value to get shmid from the st table.
-
-#if !defined(_UNICOS)
- if (this->find_seg (siginfo->si_addr, offset, counter) == -1)
-#else /* ! _UNICOS */
- if (this->find_seg ((const void *)siginfo->si_addr, offset, counter) == -1)
-#endif /* ! _UNICOS */
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %p\n"),
- ACE_TEXT ("in_use")),
- -1);
-
- void *address = (void *) (((char *) this->base_addr_) + offset);
- SHM_TABLE *st = ACE_reinterpret_cast (SHM_TABLE *,
- this->base_addr_);
-
- void *shmem = ACE_OS::shmat (st[counter].shmid_, (char *) address, 0);
-
- if (shmem != address)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) %p, shmem = %u, address = %u\n",
- "shmat",
- shmem,
- address),
- 0);
-
- // NOTE: this won't work if we dont have SIGINFO_T or SI_ADDR
-#else
- ACE_UNUSED_ARG (siginfo);
-#endif /* ACE_HAS_SIGINFO_T && !defined (ACE_LACKS_SI_ADDR) */
-
- return 0;
-}
-
-ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (const ACE_TCHAR *backing_store_name,
- const OPTIONS *options)
- : base_addr_ (0),
- file_perms_ (ACE_DEFAULT_FILE_PERMS),
- max_segments_ (ACE_DEFAULT_MAX_SEGMENTS),
- minimum_bytes_ (0),
- segment_size_ (ACE_DEFAULT_SEGMENT_SIZE)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool");
-
- // Only change the defaults if <options> != 0.
- if (options)
- {
- this->base_addr_ =
- ACE_reinterpret_cast (void *,
- ACE_const_cast (char *,
- options->base_addr_));
- this->max_segments_ = options->max_segments_;
- this->file_perms_ = options->file_perms_;
- this->minimum_bytes_ = options->minimum_bytes_;
- this->segment_size_ = options->segment_size_;
- }
-
- if (backing_store_name)
- {
- // Convert the string into a number that is used as the segment
- // key.
-
- int segment_key;
- int result = ::sscanf (backing_store_name,
- "%d",
- &segment_key);
-
- if (result == 0 || result == EOF)
- // The conversion to a number failed so hash with crc32
- // ACE::crc32 is also used in <SV_Semaphore_Simple>.
- this->base_shm_key_ = (key_t) ACE::crc32 (backing_store_name);
- else
- this->base_shm_key_ = segment_key;
-
- if (this->base_shm_key_ == IPC_PRIVATE)
- // Make sure that the segment can be shared between unrelated
- // processes.
- this->base_shm_key_ = ACE_DEFAULT_SHM_KEY;
- }
- else
- this->base_shm_key_ = ACE_DEFAULT_SHM_KEY;
-
- if (this->signal_handler_.register_handler (SIGSEGV, this) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Sig_Handler::register_handler")));
-}
-
-// Ask system for more shared memory.
-
-void *
-ACE_Shared_Memory_Pool::acquire (size_t nbytes,
- size_t &rounded_bytes)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::acquire");
-
- rounded_bytes = this->round_up (nbytes);
-
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) acquiring more chunks, nbytes = %d, rounded_bytes = %d\n"), nbytes, rounded_bytes));
-
- off_t offset;
-
- if (this->commit_backing_store_name (rounded_bytes, offset) == -1)
- return 0;
-
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) acquired more chunks, nbytes = %d, rounded_bytes = %d\n"), nbytes, rounded_bytes));
- return ((char *) this->base_addr_) + offset;
-}
-
-// Ask system for initial chunk of shared memory.
-
-void *
-ACE_Shared_Memory_Pool::init_acquire (size_t nbytes,
- size_t &rounded_bytes,
- int &first_time)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::init_acquire");
-
- off_t shm_table_offset = ACE::round_to_pagesize (sizeof (SHM_TABLE));
- rounded_bytes = this->round_up (nbytes > (size_t) this->minimum_bytes_
- ? nbytes
- : (size_t) this->minimum_bytes_);
-
- // Acquire the semaphore to serialize initialization and prevent
- // race conditions.
-
- int shmid = ACE_OS::shmget (this->base_shm_key_,
- rounded_bytes + shm_table_offset,
- this->file_perms_ | IPC_CREAT | IPC_EXCL);
- if (shmid == -1)
- {
- if (errno != EEXIST)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %p\n"),
- ACE_TEXT ("shmget")),
- 0);
- first_time = 0;
-
- shmid = ACE_OS::shmget (this->base_shm_key_, 0, 0);
-
- if (shmid == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %p\n"),
- ACE_TEXT ("shmget")),
- 0);
-
- // This implementation doesn't care if we don't get the key we
- // want...
- this->base_addr_ =
- ACE_OS::shmat (shmid,
- ACE_reinterpret_cast (char *,
- this->base_addr_),
- 0);
- if (this->base_addr_ == ACE_reinterpret_cast (void *, -1))
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) %p, base_addr = %u\n",
- "shmat",
- this->base_addr_),
- 0);
- }
- else
- {
- first_time = 1;
-
- // This implementation doesn't care if we don't get the key we
- // want...
- this->base_addr_ =
- ACE_OS::shmat (shmid,
- ACE_reinterpret_cast (char *,
- this->base_addr_),
- 0);
- if (this->base_addr_ == ACE_reinterpret_cast (char *, -1))
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) %p, base_addr = %u\n",
- "shmat",
- this->base_addr_), 0);
-
- SHM_TABLE *st = ACE_reinterpret_cast (SHM_TABLE *,
- this->base_addr_);
- st[0].key_ = this->base_shm_key_;
- st[0].shmid_ = shmid;
-
- st[0].used_ = 1;
-
- for (size_t counter = 1; // Skip over the first entry...
- counter < this->max_segments_;
- counter++)
- {
- st[counter].key_ = this->base_shm_key_ + counter;
- st[counter].shmid_ = 0;
- st[counter].used_ = 0;
- }
- }
-
- return (void *) (((char *) this->base_addr_) + shm_table_offset);
-}
-
-// Instruct the memory pool to release all of its resources.
-
-int
-ACE_Shared_Memory_Pool::release (void)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::release");
-
- int result = 0;
- SHM_TABLE *st = ACE_reinterpret_cast (SHM_TABLE *,
- this->base_addr_);
-
- for (size_t counter = 0;
- counter < this->max_segments_ && st[counter].used_ == 1;
- counter++)
- if (ACE_OS::shmctl (st[counter].shmid_, IPC_RMID, 0) == -1)
- result = -1;
-
- return result;
-}
-#endif /* !ACE_LACKS_SYSV_SHMEM */
-
-#if defined (ACE_WIN32)
-#if !defined (ACE_HAS_WINCE)
-#define ACE_MAP_FILE(_hnd, _access, _offHigh, _offLow, _nBytes, _baseAdd)\
- MapViewOfFileEx (_hnd, _access, _offHigh, _offLow, _nBytes, _baseAdd)
-#else //if !defined (ACE_HAS_WINCE)
-#define ACE_MAP_FILE(_hnd, _access, _offHigh, _offLow, _nBytes, _baseAdd)\
- MapViewOfFile (_hnd, _access, _offHigh, _offLow, _nBytes)
-#endif /* !defined (ACE_HAS_WINCE) */
-
-ACE_Pagefile_Memory_Pool_Options::ACE_Pagefile_Memory_Pool_Options (void *base_addr,
- size_t max_size)
- : base_addr_ (base_addr),
- max_size_ (max_size)
-{
-}
-
-int
-ACE_Pagefile_Memory_Pool::release (void)
-{
- return this->unmap ();
-}
-
-ACE_Pagefile_Memory_Pool::ACE_Pagefile_Memory_Pool (const ACE_TCHAR *backing_store_name,
- const OPTIONS *options)
- : shared_cb_ (0),
- page_size_ (ACE_Pagefile_Memory_Pool::round_to_page_size (1)),
- object_handle_ (0)
-{
- // Initialize local copy of pool statistics.
- if (options != 0)
- {
- this->local_cb_.req_base_ = options->base_addr_;
- this->local_cb_.mapped_base_ = 0;
- this->local_cb_.sh_.max_size_ =
- options->max_size_;
- this->local_cb_.sh_.mapped_size_ = 0;
- this->local_cb_.sh_.free_offset_ =
- this->local_cb_.sh_.mapped_size_;
- this->local_cb_.sh_.free_size_ = 0;
- }
-
- if (backing_store_name == 0)
- // Only create a new unique filename for the backing store file if
- // the user didn't supply one...
- backing_store_name = ACE_DEFAULT_PAGEFILE_POOL_NAME;
-
- ACE_OS::strncpy (this->backing_store_name_,
- backing_store_name,
- (sizeof this->backing_store_name_ / sizeof (ACE_TCHAR)));
-}
-
-void *
-ACE_Pagefile_Memory_Pool::acquire (size_t nbytes,
- size_t &rounded_bytes)
-{
- rounded_bytes = round_to_page_size (nbytes);
- void *result = 0;
- int first_time = 0;
-
- // Check local_cb_ for consistency. Remap, if extra space is too
- // small and/or we didn't map the whole shared memory section
- if (this->shared_cb_->sh_.mapped_size_
- > this->local_cb_.sh_.mapped_size_
- || this->shared_cb_->sh_.free_size_
- < (int) rounded_bytes)
- {
- int append =
- rounded_bytes - this->shared_cb_->sh_.free_size_;
- if (append < 0)
- append = 0;
-
- if (this->map (first_time, append) < 0)
- return result;
- }
-
- // Get the block from extra space and update shared and local
- // control block
- if (this->shared_cb_->sh_.free_size_
- < (int) rounded_bytes)
- return result;
-
- result = (void *)((char *) this->local_cb_.mapped_base_
- + this->shared_cb_->sh_.free_offset_);
- this->shared_cb_->sh_.free_offset_ += rounded_bytes;
- this->shared_cb_->sh_.free_size_ -= rounded_bytes;
- this->local_cb_.sh_ = this->shared_cb_->sh_;
-
- return result;
-}
-
-void *
-ACE_Pagefile_Memory_Pool::init_acquire (size_t nbytes,
- size_t &rounded_bytes,
- int &first_time)
-{
- // Map the shared memory and get information, if we created the
- // shared memory.
- if (this->map (first_time) < 0)
- return 0;
-
- if (first_time != 0)
- // We created the shared memory. So we have to allocate the
- // requested memory.
- return this->acquire (nbytes, rounded_bytes);
- else
- // We just mapped the memory and return the base address
- return (void *)((char *) this->local_cb_.mapped_base_
- + ACE_Pagefile_Memory_Pool::round_to_page_size
- ((int) sizeof (Control_Block)));
-}
-
-int
-ACE_Pagefile_Memory_Pool::seh_selector (void *ep)
-{
- int ecode = ((EXCEPTION_POINTERS *) ep)->ExceptionRecord->ExceptionCode;
-
- if (ecode == EXCEPTION_ACCESS_VIOLATION)
- {
- void * fault_addr = (void *)
- ((EXCEPTION_POINTERS *) ep)->ExceptionRecord->ExceptionInformation[1];
-
- if (this->remap (fault_addr) == 0)
- return 1;
- }
-
- return 0;
-}
-
-int
-ACE_Pagefile_Memory_Pool::remap (void *addr)
-{
- // If the shared memory is not mapped or the address, that caused
- // the memory fault is outside of the commited range of chunks, we
- // return.
- if (this->shared_cb_ == 0
- || addr < this->local_cb_.mapped_base_
- || addr >= (void *)((char *) this->local_cb_.mapped_base_
- + this->shared_cb_->sh_.mapped_size_))
- return -1;
-
- // We can solve the problem by committing additional chunks.
- int first_time = 0;
- return this->map (first_time);
-}
-
-int
-ACE_Pagefile_Memory_Pool::unmap (void)
-{
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
- ACE_BASED_POINTER_REPOSITORY::instance ()->unbind
- (this->local_cb_.mapped_base_);
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-
- // Cleanup cached pool pointer.
- this->shared_cb_ = 0;
-
- if (this->local_cb_.sh_.mapped_size_ > 0)
- ::UnmapViewOfFile (this->local_cb_.mapped_base_);
-
- // Reset local pool statistics.
- this->local_cb_.req_base_ =
- ACE_DEFAULT_PAGEFILE_POOL_BASE;
- this->local_cb_.mapped_base_ = 0;
- this->local_cb_.sh_.max_size_ =
- ACE_DEFAULT_PAGEFILE_POOL_SIZE;
- this->local_cb_.sh_.mapped_size_ = 0;
- this->local_cb_.sh_.free_offset_ =
- this->local_cb_.sh_.mapped_size_;
- this->local_cb_.sh_.free_size_ = 0;
-
- // Release the pool
- if (this->object_handle_ == 0)
- {
- ::CloseHandle (this->object_handle_);
- this->object_handle_ = 0;
- }
- return 0;
-}
-
-int
-ACE_Pagefile_Memory_Pool::map (int &first_time,
- int append_bytes)
-{
- int mem_offset = 0;
- int map_size;
- void *map_addr;
-
- // Create file mapping, if not yet done
- if (object_handle_ == 0)
- {
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
- // Allow access by all users.
- SECURITY_ATTRIBUTES sa;
- SECURITY_DESCRIPTOR sd;
- ::InitializeSecurityDescriptor (&sd,
- SECURITY_DESCRIPTOR_REVISION);
- ::SetSecurityDescriptorDacl (&sd,
- TRUE,
- NULL,
- FALSE);
- sa.nLength = sizeof (SECURITY_ATTRIBUTES);
- sa.lpSecurityDescriptor = &sd;
- sa.bInheritHandle = FALSE;
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
-
- // Get an object handle to the named reserved memory object.
- object_handle_ =
- ACE_TEXT_CreateFileMapping ((HANDLE) 0xffffffff,
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
- &sa,
-#else
- NULL,
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
- PAGE_READWRITE | SEC_RESERVE,
- 0,
- this->local_cb_.sh_.max_size_,
- this->backing_store_name_);
- if (object_handle_ == 0)
- return -1;
- first_time =
- ::GetLastError () == ERROR_ALREADY_EXISTS
- ? 0
- : 1;
- }
-
- // Do the initial mapping.
- if (this->shared_cb_ == 0)
- {
- // Map a view to the shared memory. Note: <MapViewOfFile[Ex]>
- // does *not* commit the pages!
- this->shared_cb_ = (ACE_Pagefile_Memory_Pool::Control_Block *)
- ACE_MAP_FILE (this->object_handle_,
- FILE_MAP_WRITE,
- 0,
- 0,
- this->local_cb_.sh_.max_size_,
- this->local_cb_.req_base_);
- if (this->shared_cb_ == 0)
- return -1;
-
- // There was no previous mapping, so we map the first chunk and
- // initialize the shared pool statistics.
- if (first_time)
- {
- // 1st block is used to keep shared memory statistics.
- map_size =
- ACE_Pagefile_Memory_Pool::round_to_chunk_size
- (ACE_Pagefile_Memory_Pool::round_to_page_size
- ((int) sizeof(Control_Block))
- + append_bytes);
-
- if (::VirtualAlloc ((void *) this->shared_cb_,
- map_size,
- MEM_COMMIT,
- PAGE_READWRITE) == 0)
- return -1;
-
- this->shared_cb_->req_base_ = 0;
- this->shared_cb_->mapped_base_ = 0;
- this->local_cb_.mapped_base_ = this->shared_cb_;
- this->local_cb_.sh_.mapped_size_ = map_size;
- this->local_cb_.sh_.free_offset_ =
- round_to_page_size ((int) sizeof (Control_Block));
- this->local_cb_.sh_.free_size_ =
- this->local_cb_.sh_.mapped_size_ -
- this->local_cb_.sh_.free_offset_;
- this->shared_cb_->sh_ = this->local_cb_.sh_;
- }
-
- // The shared memory exists, so we map the first chunk to the
- // base address of the pool to get the shared pool statistics.
- else
- {
- // 1st block is used to keep shared memory statistics.
- map_size =
- ACE_Pagefile_Memory_Pool::round_to_chunk_size
- ((int) sizeof (Control_Block));
-
- if (::VirtualAlloc ((void *) this->shared_cb_,
- map_size,
- MEM_COMMIT,
- PAGE_READWRITE) == 0)
- return -1;
- this->local_cb_.mapped_base_ = this->shared_cb_;
- this->local_cb_.sh_.mapped_size_ = map_size;
- }
- }
-
- // If the shared memory is larger than the part we've already
- // committed, we have to remap it.
- if (this->shared_cb_->sh_.mapped_size_ >
- this->local_cb_.sh_.mapped_size_
- || append_bytes > 0)
- {
- map_size =
- (this->shared_cb_->sh_.mapped_size_ -
- this->local_cb_.sh_.mapped_size_)
- + ACE_Pagefile_Memory_Pool::round_to_chunk_size
- (append_bytes);
-
- mem_offset =
- this->local_cb_.sh_.mapped_size_;
- map_addr = (void *)((char *) this->shared_cb_ +
- this->local_cb_.sh_.mapped_size_);
-
- if (::VirtualAlloc (map_addr,
- map_size,
- MEM_COMMIT,
- PAGE_READWRITE) == 0)
- return -1;
- else if (append_bytes > 0)
- {
- this->shared_cb_->sh_.mapped_size_ +=
- round_to_chunk_size (append_bytes);
- this->shared_cb_->sh_.free_size_ =
- this->shared_cb_->sh_.mapped_size_ -
- this->shared_cb_->sh_.free_offset_;
- }
- }
-
- // Update local copy of the shared memory statistics.
- this->local_cb_.sh_ =
- this->shared_cb_->sh_;
-#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
- ACE_BASED_POINTER_REPOSITORY::instance ()->bind
- (this->local_cb_.mapped_base_,
- this->local_cb_.sh_.mapped_size_);
-#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
-
- return 0;
-}
-
-#endif /* ACE_WIN32 */
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Auto_Basic_Array_Ptr<char>;
-template class ACE_Unbounded_Set<char *>;
-template class ACE_Unbounded_Set_Iterator<char *>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Auto_Basic_Array_Ptr<char>
-#pragma instantiate ACE_Unbounded_Set<char *>
-#pragma instantiate ACE_Unbounded_Set_Iterator<char *>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Memory_Pool.h b/ace/Memory_Pool.h
deleted file mode 100644
index 84966642406..00000000000
--- a/ace/Memory_Pool.h
+++ /dev/null
@@ -1,680 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ACE_Memory_Pool.h
-//
-// = AUTHOR
-// Doug Schmidt and Prashant Jain
-//
-// ============================================================================
-
-#ifndef ACE_MEMORY_POOL_H
-#define ACE_MEMORY_POOL_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Event_Handler.h"
-#include "ace/Signal.h"
-#include "ace/Mem_Map.h"
-#if !defined (ACE_WIN32)
-#include "ace/SV_Semaphore_Complex.h"
-#endif /* !ACE_WIN32 */
-
-#if !defined (ACE_LACKS_SBRK)
-class ACE_Export ACE_Sbrk_Memory_Pool_Options
-{
- // = TITLE
- // Helper class for Sbrk Memory Pool constructor options.
- //
- // = DESCRIPTION
- // This should be a nested class, but that breaks too many
- // compilers.
-};
-
-class ACE_Export ACE_Sbrk_Memory_Pool
-{
- // = TITLE
- // Make a memory pool that is based on <sbrk(2)>.
-public:
- typedef ACE_Sbrk_Memory_Pool_Options OPTIONS;
-
- ACE_Sbrk_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
- const OPTIONS *options = 0);
- // Initialize the pool.
-
- virtual ~ACE_Sbrk_Memory_Pool (void);
-
- // = Implementor operations.
- virtual void *init_acquire (size_t nbytes,
- size_t &rounded_bytes,
- int &first_time);
- // Ask system for initial chunk of local memory.
-
- virtual void *acquire (size_t nbytes,
- size_t &rounded_bytes);
- // Acquire at least NBYTES from the memory pool. ROUNDED_BYTES is
- // the actual number of bytes allocated.
-
- virtual int release (void);
- // Instruct the memory pool to release all of its resources.
-
- virtual int sync (ssize_t len = -1, int flags = MS_SYNC);
- // Sync <len> bytes of the memory region to the backing store
- // starting at <this->base_addr_>. If <len> == -1 then sync the
- // whole region.
-
- virtual int sync (void *addr, size_t len, int flags = MS_SYNC);
- // Sync <len> bytes of the memory region to the backing store
- // starting at <addr_>.
-
- virtual int protect (ssize_t len = -1, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <this->base_addr_> up to <len> bytes. If <len> == -1
- // then change protection of all pages in the mapped region.
-
- virtual int protect (void *addr, size_t len, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <addr> up to <len> bytes.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- virtual size_t round_up (size_t nbytes);
- // Implement the algorithm for rounding up the request to an
- // appropriate chunksize.
-};
-#endif /* !ACE_LACKS_SBRK */
-
-#if !defined (ACE_LACKS_SYSV_SHMEM)
-
-class ACE_Export ACE_Shared_Memory_Pool_Options
-{
- // = TITLE
- // Helper class for Shared Memory Pool constructor options.
- //
- // = DESCRIPTION
- // This should be a nested class, but that breaks too many
- // compilers.
-public:
- // = Initialization method.
- ACE_Shared_Memory_Pool_Options (const char *base_addr = ACE_DEFAULT_BASE_ADDR,
- size_t max_segments = ACE_DEFAULT_MAX_SEGMENTS,
- size_t file_perms = ACE_DEFAULT_FILE_PERMS,
- off_t minimum_bytes = 0,
- size_t segment_size = ACE_DEFAULT_SEGMENT_SIZE);
-
- const char *base_addr_;
- // Base address of the memory-mapped backing store.
-
- size_t max_segments_;
- // Number of shared memory segments to allocate.
-
- off_t minimum_bytes_;
- // What the minimum bytes of the initial segment should be.
-
- size_t file_perms_;
- // File permissions to use when creating/opening a segment.
-
- size_t segment_size_;
- // Shared memory segment size.
-};
-
-class ACE_Export ACE_Shared_Memory_Pool : public ACE_Event_Handler
-{
- // = TITLE
- // Make a memory pool that is based on System V shared memory
- // (shmget(2) etc.). This implementation allows memory to be
- // shared between processes.
-public:
- typedef ACE_Shared_Memory_Pool_Options OPTIONS;
-
- ACE_Shared_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
- const OPTIONS *options = 0);
- // Initialize the pool.
-
- virtual ~ACE_Shared_Memory_Pool (void);
-
- virtual void *init_acquire (size_t nbytes,
- size_t &rounded_bytes,
- int &first_time);
- // Ask system for initial chunk of local memory.
-
- virtual void *acquire (size_t nbytes,
- size_t &rounded_bytes);
- // Acquire at least NBYTES from the memory pool. ROUNDED_BYTES is
- // the actual number of bytes allocated. Also acquires an internal
- // semaphore that ensures proper serialization of Memory_Pool
- // initialization across processes.
-
- virtual int release (void);
- // Instruct the memory pool to release all of its resources.
-
- virtual int sync (ssize_t len = -1, int flags = MS_SYNC);
- // Sync the memory region to the backing store starting at
- // <this->base_addr_>.
-
- virtual int sync (void *addr, size_t len, int flags = MS_SYNC);
- // Sync the memory region to the backing store starting at <addr_>.
-
- virtual int protect (ssize_t len = -1, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <this->base_addr_> up to <len> bytes. If <len> == -1
- // then change protection of all pages in the mapped region.
-
- virtual int protect (void *addr, size_t len, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <addr> up to <len> bytes.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- virtual size_t round_up (size_t nbytes);
- // Implement the algorithm for rounding up the request to an
- // appropriate chunksize.
-
- virtual int commit_backing_store_name (size_t rounded_bytes,
- off_t &offset);
- // Commits a new shared memory segment if necessary after an
- // <acquire> or a signal. <offset> is set to the new offset into
- // the backing store.
-
- // = Keeps track of all the segments being used.
- struct SHM_TABLE
- {
- key_t key_;
- // Shared memory segment key.
-
- int shmid_;
- // Shared memory segment internal id.
-
- int used_;
- // Is the segment currently used.;
- };
-
- void *base_addr_;
- // Base address of the shared memory segment. If this has the value
- // of 0 then the OS is free to select any address, otherwise this
- // value is what the OS must try to use to map the shared memory
- // segment.
-
- size_t file_perms_;
- // File permissions to use when creating/opening a segment.
-
- size_t max_segments_;
- // Number of shared memory segments in the <SHM_TABLE> table.
-
- off_t minimum_bytes_;
- // What the minimim bytes of the initial segment should be.
-
- size_t segment_size_;
- // Shared memory segment size.
-
- key_t base_shm_key_;
- // Base shared memory key for the segment.
-
- virtual int find_seg (const void *const searchPtr,
- off_t &offset,
- size_t &counter);
- // find the segment that contains the searchPtr
-
- virtual int in_use (off_t &offset,
- size_t &counter);
- // Determine how much memory is currently in use.
-
- ACE_Sig_Handler signal_handler_;
- // Handles SIGSEGV.
-
- virtual int handle_signal (int signum, siginfo_t *, ucontext_t *);
- // Handle SIGSEGV and SIGBUS signals to remap shared memory
- // properly.
-};
-#endif /* !ACE_LACKS_SYSV_SHMEM */
-
-class ACE_Export ACE_Local_Memory_Pool_Options
-{
- // = TITLE
- // Helper class for Local Memory Pool constructor options.
- //
- // = DESCRIPTION
- // This should be a nested class, but that breaks too many
- // compilers.
-};
-
-class ACE_Export ACE_Local_Memory_Pool
-{
- // = TITLE
- // Make a memory pool that is based on C++ new/delete. This is
- // useful for integrating existing components that use new/delete
- // into the ACE Malloc scheme...
-public:
- typedef ACE_Local_Memory_Pool_Options OPTIONS;
-
- ACE_Local_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
- const OPTIONS *options = 0);
- // Initialize the pool.
-
- virtual ~ACE_Local_Memory_Pool (void);
-
- virtual void *init_acquire (size_t nbytes,
- size_t &rounded_bytes,
- int &first_time);
- // Ask system for initial chunk of local memory.
-
- virtual void *acquire (size_t nbytes,
- size_t &rounded_bytes);
- // Acquire at least NBYTES from the memory pool. ROUNDED_BYTES is
- // the actual number of bytes allocated.
-
- virtual int release (void);
- // Instruct the memory pool to release all of its resources.
-
- virtual int sync (ssize_t len = -1, int flags = MS_SYNC);
- // Sync <len> bytes of the memory region to the backing store
- // starting at <this->base_addr_>. If <len> == -1 then sync the
- // whole region.
-
- virtual int sync (void *addr, size_t len, int flags = MS_SYNC);
- // Sync <len> bytes of the memory region to the backing store
- // starting at <addr_>.
-
- virtual int protect (ssize_t len = -1, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <this->base_addr_> up to <len> bytes. If <len> == -1
- // then change protection of all pages in the mapped region.
-
- virtual int protect (void *addr, size_t len, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <addr> up to <len> bytes.
-
-#if defined (ACE_WIN32)
- virtual int seh_selector (void *);
- // Win32 Structural exception selector. The return value decides
- // how to handle memory pool related structural exceptions. Returns
- // 1, 0, or , -1.
-#endif /* ACE_WIN32 */
-
- virtual int remap (void *addr);
- // Try to extend the virtual address space so that <addr> is now
- // covered by the address mapping. Always returns 0 since we can't
- // remap a local memory pool.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_Unbounded_Set<char *> allocated_chunks_;
- // List of memory that we have allocated.
-
- virtual size_t round_up (size_t nbytes);
-
- // Implement the algorithm for rounding up the request to an
- // appropriate chunksize.
-};
-
-class ACE_Export ACE_MMAP_Memory_Pool_Options
-{
- // = TITLE
- // Helper class for MMAP Memory Pool constructor options.
- //
- // = DESCRIPTION
- // This should be a nested class, but that breaks too many
- // compilers.
-public:
- // = Initialization method.
- ACE_MMAP_Memory_Pool_Options (const void *base_addr = ACE_DEFAULT_BASE_ADDR,
- int use_fixed_addr = 1,
- int write_each_page = 1,
- off_t minimum_bytes = 0,
- u_int flags = 0,
- int guess_on_fault = 1,
- LPSECURITY_ATTRIBUTES sa = 0);
-
- const void *base_addr_;
- // Base address of the memory-mapped backing store.
-
- int use_fixed_addr_;
- // Must we use the <base_addr_> or can we let mmap(2) select it?
-
- int write_each_page_;
- // Should each page be written eagerly to avoid surprises later
- // on?
-
- off_t minimum_bytes_;
- // What the minimim bytes of the initial segment should be.
-
- u_int flags_;
- // Any special flags that need to be used for <mmap>.
-
- int guess_on_fault_;
- // Try to remap without knowing the faulting address. This
- // parameter is ignored on platforms that know the faulting address
- // (UNIX with SI_ADDR and Win32).
-
- LPSECURITY_ATTRIBUTES sa_;
- // Pointer to a security attributes object. Only used on NT.
-
-};
-
-class ACE_Export ACE_MMAP_Memory_Pool : public ACE_Event_Handler
-{
- // = TITLE
- // Make a memory pool that is based on <mmap(2)>. This
- // implementation allows memory to be shared between processes.
-public:
- typedef ACE_MMAP_Memory_Pool_Options OPTIONS;
-
- // = Initialization and termination methods.
-
- ACE_MMAP_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
- const OPTIONS *options = 0);
- // Initialize the pool.
-
- virtual ~ACE_MMAP_Memory_Pool (void);
-
- virtual void *init_acquire (size_t nbytes,
- size_t &rounded_bytes,
- int &first_time);
- // Ask system for initial chunk of shared memory.
-
- virtual void *acquire (size_t nbytes,
- size_t &rounded_bytes);
- // Acquire at least <nbytes> from the memory pool. <rounded_bytes>
- // is the actual number of bytes allocated. Also acquires an
- // internal semaphore that ensures proper serialization of
- // <ACE_MMAP_Memory_Pool> initialization across processes.
-
- virtual int release (void);
- // Instruct the memory pool to release all of its resources.
-
- virtual int sync (ssize_t len = -1, int flags = MS_SYNC);
- // Sync the memory region to the backing store starting at
- // <this->base_addr_>.
-
- virtual int sync (void *addr, size_t len, int flags = MS_SYNC);
- // Sync the memory region to the backing store starting at <addr_>.
-
- virtual int protect (ssize_t len = -1, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <this->base_addr_> up to <len> bytes. If <len> == -1
- // then change protection of all pages in the mapped region.
-
- virtual int protect (void *addr, size_t len, int prot = PROT_RDWR);
- // Change the protection of the pages of the mapped region to <prot>
- // starting at <addr> up to <len> bytes.
-
-#if defined (ACE_WIN32)
- virtual int seh_selector (void *);
- // Win32 Structural exception selector. The return value decides
- // how to handle memory pool related structural exceptions. Returns
- // 1, 0, or , -1.
-#endif /* ACE_WIN32 */
-
- virtual int remap (void *addr);
- // Try to extend the virtual address space so that <addr> is now
- // covered by the address mapping. The method succeeds and returns
- // 0 if the backing store has adequate memory to cover this address.
- // Otherwise, it returns -1. This method is typically called by a
- // UNIX signal handler for SIGSEGV or a Win32 structured exception
- // when another process has grown the backing store (and its
- // mapping) and our process now incurs a fault because our mapping
- // isn't in range (yet).
-
-
- virtual void *base_addr (void) const;
- // Return the base address of this memory pool.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Implement the algorithm for rounding up the request to an
- // appropriate chunksize.
-
- virtual size_t round_up (size_t nbytes);
-
- virtual int commit_backing_store_name (size_t rounded_bytes,
- off_t &map_size);
- // Compute the new <map_size> of the backing store and commit the
- // memory.
-
- virtual int map_file (off_t map_size);
- // Memory map the file up to <map_size> bytes.
-
- virtual int handle_signal (int signum, siginfo_t *, ucontext_t *);
- // Handle SIGSEGV and SIGBUS signals to remap shared memory
- // properly.
-
- ACE_Sig_Handler signal_handler_;
- // Handles SIGSEGV.
-
- ACE_Mem_Map mmap_;
- // Memory-mapping object.
-
- void *base_addr_;
- // Base of mapped region. If this has the value of 0 then the OS is
- // free to select any address to map the file, otherwise this value
- // is what the OS must try to use to mmap the file.
-
- int flags_;
- // Flags passed into <ACE_OS::mmap>.
-
- int write_each_page_;
- // Should we write a byte to each page to forceably allocate memory
- // for this backing store?
-
- off_t minimum_bytes_;
- // What the minimum bytes of the initial segment should be.
-
- ACE_TCHAR backing_store_name_[MAXPATHLEN + 1];
- // Name of the backing store where the shared memory pool is kept.
-
- int guess_on_fault_;
- // Try to remap without knowing the faulting address. This
- // parameter is ignored on platforms that know the faulting address
- // (UNIX with SI_ADDR and Win32).
-
- LPSECURITY_ATTRIBUTES sa_;
- // Security attributes object, only used on NT.
-
-};
-
-class ACE_Export ACE_Lite_MMAP_Memory_Pool : public ACE_MMAP_Memory_Pool
-{
- // = TITLE
- // Make a ``lighter-weight'' memory pool based <ACE_Mem_Map>.
- //
- // = DESCRIPTION
- // This implementation allows memory to be shared between
- // processes. However, unlike the <ACE_MMAP_Memory_Pool>
- // the <sync> methods are no-ops, which means that we don't pay
- // for the price of flushing the memory to the backing store on
- // every update. Naturally, this trades off increased
- // performance for less reliability if the machine crashes.
-public:
- // = Initialization and termination methods.
-
- ACE_Lite_MMAP_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
- const OPTIONS *options = 0);
- // Initialize the pool.
-
- virtual ~ACE_Lite_MMAP_Memory_Pool (void);
-
- virtual int sync (ssize_t len = -1, int flags = MS_SYNC);
- // Overwrite the default sync behavior with no-op
-
- virtual int sync (void *addr, size_t len, int flags = MS_SYNC);
- // Overwrite the default sync behavior with no-op
-};
-
-#if defined (ACE_WIN32)
-
-class ACE_Export ACE_Pagefile_Memory_Pool_Options
-{
- // = TITLE
- // Helper class for Pagefile Memory Pool constructor options.
- //
- // = DESCRIPTION
- // This should be a nested class, but that breaks too many
- // compilers.
-public:
- // Initialization method.
- ACE_Pagefile_Memory_Pool_Options (void *base_addr = ACE_DEFAULT_PAGEFILE_POOL_BASE,
- size_t max_size = ACE_DEFAULT_PAGEFILE_POOL_SIZE);
-
- void *base_addr_;
- // Base address of the memory-mapped backing store.
-
- size_t max_size_;
- // Maximum size the pool may grow.
-};
-
-class ACE_Export ACE_Pagefile_Memory_Pool
-{
- // = TITLE
- // Make a memory pool that is based on "anonymous" memory
- // regions allocated from the Win32 page file.
-public:
- typedef ACE_Pagefile_Memory_Pool_Options OPTIONS;
-
- ACE_Pagefile_Memory_Pool (const ACE_TCHAR *backing_store_name = 0,
- const OPTIONS *options = 0);
- // Initialize the pool.
-
- void *init_acquire (size_t nbytes,
- size_t &rounded_bytes,
- int &first_time);
- // Ask system for initial chunk of shared memory.
-
- void *acquire (size_t nbytes,
- size_t &rounded_bytes);
- // Acquire at least <nbytes> from the memory pool. <rounded_bytes>
- // is the actual number of bytes allocated.
-
- int release (void);
- // Instruct the memory pool to release all of its resources.
-
- virtual int seh_selector (void *);
- // Win32 Structural exception selector. The return value decides
- // how to handle memory pool related structural exceptions. Returns
- // 1, 0, or , -1.
-
- int remap (void *addr);
- // Try to extend the virtual address space so that <addr> is now
- // covered by the address mapping. The method succeeds and returns
- // 0 if the backing store has adequate memory to cover this address.
- // Otherwise, it returns -1. This method is typically called by an
- // exception handler for a Win32 structured exception when another
- // process has grown the backing store (and its mapping) and our
- // process now incurs a fault because our mapping isn't in range
- // (yet).
-
- size_t round_to_page_size (size_t nbytes);
- // Round up to system page size.
-
- size_t round_to_chunk_size (size_t nbytes);
- // Round up to the chunk size required by the operation system
-
- // = Don't need this methods here ...
- int sync (ssize_t = -1, int = MS_SYNC);
- int sync (void *, size_t, int = MS_SYNC);
- int protect (ssize_t = -1, int = PROT_RDWR);
- int protect (void *, size_t, int = PROT_RDWR);
- void dump (void) const {}
-
-protected:
-
- int map (int &firstTime, int appendBytes = 0);
- // Map portions or the entire pool into the local virtual address
- // space. To do this, we compute the new <file_offset> of the
- // backing store and commit the memory.
-
- int unmap (void);
- // Release the mapping.
-
-private:
-
- class Control_Block
- {
- // = TITLE
- // Attributes that are meaningful in local storage only.
- public:
- void *req_base_;
- // required base address
-
- void *mapped_base_;
- // Base address returned from system call
-
- class Shared_Control_Block
- {
- // = TITLE
- // Pool statistics
- public:
- size_t max_size_;
- // Maximum size the pool may grow
-
- int mapped_size_;
- // Size of mapped shared memory segment
-
- int free_offset_;
- // Offset to mapped but not yet acquired address space
-
- int free_size_;
- // Size of mapped but not yet acquired address space
- };
-
- Shared_Control_Block sh_;
- };
-
- // Base of mapped region. If this has the value of 0 then the OS is
- // free to select any address to map the file, otherwise this value
- // is what the OS must try to use to mmap the file.
-
- Control_Block local_cb_;
- // Description of what our process mapped.
-
- Control_Block *shared_cb_;
- // Shared memory pool statistics.
-
- ACE_HANDLE object_handle_;
- // File mapping handle.
-
- size_t page_size_;
- // System page size.
-
- ACE_TCHAR backing_store_name_[MAXPATHLEN];
- // Name of the backing store where the shared memory pool is kept.
-};
-
-#endif /* ACE_WIN32 */
-
-#if defined (__ACE_INLINE__)
-#include "ace/Memory_Pool.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_MEMORY_POOL_H */
diff --git a/ace/Memory_Pool.i b/ace/Memory_Pool.i
deleted file mode 100644
index 935ff7802aa..00000000000
--- a/ace/Memory_Pool.i
+++ /dev/null
@@ -1,242 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_Local_Memory_Pool::~ACE_Local_Memory_Pool (void)
-{
-}
-
-ACE_INLINE int
-ACE_Local_Memory_Pool::sync (ssize_t, int)
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::sync");
- return 0;
-}
-
-ACE_INLINE int
-ACE_Local_Memory_Pool::sync (void *, size_t, int)
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::sync");
- return 0;
-}
-
-ACE_INLINE int
-ACE_Local_Memory_Pool::protect (ssize_t, int)
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::protect");
- return 0;
-}
-
-ACE_INLINE int
-ACE_Local_Memory_Pool::protect (void *, size_t, int)
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::protect");
- return 0;
-}
-
-ACE_INLINE
-ACE_MMAP_Memory_Pool::~ACE_MMAP_Memory_Pool (void)
-{
-}
-
-ACE_INLINE
-ACE_Lite_MMAP_Memory_Pool::~ACE_Lite_MMAP_Memory_Pool (void)
-{
-}
-
-ACE_INLINE size_t
-ACE_MMAP_Memory_Pool::round_up (size_t nbytes)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::round_up");
- return ACE::round_to_pagesize (nbytes);
-}
-
-ACE_INLINE void *
-ACE_MMAP_Memory_Pool::base_addr (void) const
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::base_addr");
- return this->base_addr_;
-}
-
-// Ask system for initial chunk of local memory.
-
-ACE_INLINE void *
-ACE_Local_Memory_Pool::init_acquire (size_t nbytes,
- size_t &rounded_bytes,
- int &first_time)
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::init_acquire");
- // Note that we assume that when ACE_Local_Memory_Pool is used,
- // ACE_Malloc's constructor will only get called once. If this
- // assumption doesn't hold, we are in deep trouble!
-
- first_time = 1;
- return this->acquire (nbytes, rounded_bytes);
-}
-
-// Let the underlying new operator figure out the alignment...
-
-ACE_INLINE size_t
-ACE_Local_Memory_Pool::round_up (size_t nbytes)
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::round_up");
- return ACE::round_to_pagesize (nbytes);
-}
-
-#if !defined (ACE_LACKS_SYSV_SHMEM)
-// Implement the algorithm for rounding up the request to an
-// appropriate chunksize.
-
-ACE_INLINE
-ACE_Shared_Memory_Pool::~ACE_Shared_Memory_Pool (void)
-{
-}
-
-ACE_INLINE size_t
-ACE_Shared_Memory_Pool::round_up (size_t nbytes)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::round_up");
- if (nbytes < this->segment_size_)
- nbytes = this->segment_size_;
-
- return ACE::round_to_pagesize (nbytes);
-}
-
-ACE_INLINE int
-ACE_Shared_Memory_Pool::sync (ssize_t, int)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::sync");
- return 0;
-}
-
-ACE_INLINE int
-ACE_Shared_Memory_Pool::sync (void *, size_t, int)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::sync");
- return 0;
-}
-
-ACE_INLINE int
-ACE_Shared_Memory_Pool::protect (ssize_t, int)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::protect");
- return 0;
-}
-
-ACE_INLINE int
-ACE_Shared_Memory_Pool::protect (void *, size_t, int)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::protect");
- return 0;
-}
-#endif /* !ACE_LACKS_SYSV_SHMEM */
-
-#if !defined (ACE_LACKS_SBRK)
-
-ACE_INLINE
-ACE_Sbrk_Memory_Pool::~ACE_Sbrk_Memory_Pool (void)
-{
-}
-
-// Ask system for initial chunk of local memory.
-
-ACE_INLINE void *
-ACE_Sbrk_Memory_Pool::init_acquire (size_t nbytes,
- size_t &rounded_bytes,
- int &first_time)
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::init_acquire");
- // Note that we assume that when ACE_Sbrk_Memory_Pool is used,
- // ACE_Malloc's constructor will only get called once. If this
- // assumption doesn't hold, we are in deep trouble!
-
- first_time = 1;
- return this->acquire (nbytes, rounded_bytes);
-}
-
-// Round up the request to a multiple of the page size.
-
-ACE_INLINE size_t
-ACE_Sbrk_Memory_Pool::round_up (size_t nbytes)
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::round_up");
- return ACE::round_to_pagesize (nbytes);
-}
-
-/* No-op for now... */
-
-ACE_INLINE int
-ACE_Sbrk_Memory_Pool::release (void)
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::release");
- return 0;
-}
-
-ACE_INLINE int
-ACE_Sbrk_Memory_Pool::sync (ssize_t, int)
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::sync");
- return 0;
-}
-
-ACE_INLINE int
-ACE_Sbrk_Memory_Pool::sync (void *, size_t, int)
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::sync");
- return 0;
-}
-
-ACE_INLINE int
-ACE_Sbrk_Memory_Pool::protect (ssize_t, int)
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::protect");
- return 0;
-}
-
-ACE_INLINE int
-ACE_Sbrk_Memory_Pool::protect (void *, size_t, int)
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::protect");
- return 0;
-}
-#endif /* !ACE_LACKS_SBRK */
-
-#if defined (ACE_WIN32)
-
-ACE_INLINE size_t
-ACE_Pagefile_Memory_Pool::round_to_chunk_size (size_t nbytes)
-{
- return (nbytes + ACE_DEFAULT_PAGEFILE_POOL_CHUNK - 1)
- & (~(ACE_DEFAULT_PAGEFILE_POOL_CHUNK - 1));
-}
-
-ACE_INLINE size_t
-ACE_Pagefile_Memory_Pool::round_to_page_size (size_t nbytes)
-{
- return ACE::round_to_pagesize (nbytes);
-}
-
-ACE_INLINE int
-ACE_Pagefile_Memory_Pool::sync (ssize_t, int)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Pagefile_Memory_Pool::sync (void *, size_t, int)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Pagefile_Memory_Pool::protect (ssize_t, int)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Pagefile_Memory_Pool::protect (void *, size_t, int)
-{
- return 0;
-}
-#endif /* ACE_WIN32 */
diff --git a/ace/Message_Block.cpp b/ace/Message_Block.cpp
deleted file mode 100644
index a26e910e344..00000000000
--- a/ace/Message_Block.cpp
+++ /dev/null
@@ -1,1183 +0,0 @@
-// $Id$
-
-#include "ace/Message_Block.h"
-#include "ace/Synch_T.h"
-
-//#define ACE_ENABLE_TIMEPROBES
-#include "ace/Timeprobe.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Message_Block.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Message_Block, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Message_Block)
-
-#if defined (ACE_ENABLE_TIMEPROBES)
-
-static const char *ACE_MB_Timeprobe_Description[] =
-{
- "Message_Block::init_i - enter",
- "Message_Block::init_i - leave",
- "Message_Block::init_i - db alloc",
- "Message_Block::init_i - db ctor",
- "Data_Block::ctor[1] - enter",
- "Data_Block::ctor[1] - leave",
- "Data_Block::ctor[2] - enter",
- "Data_Block::ctor[2] - leave",
- "Data_Block::clone - enter",
- "Data_Block::clone - leave"
-};
-
-enum
-{
- ACE_MESSAGE_BLOCK_INIT_I_ENTER = 3000,
- ACE_MESSAGE_BLOCK_INIT_I_LEAVE,
- ACE_MESSAGE_BLOCK_INIT_I_DB_ALLOC,
- ACE_MESSAGE_BLOCK_INIT_I_DB_CTOR,
- ACE_DATA_BLOCK_CTOR1_ENTER,
- ACE_DATA_BLOCK_CTOR1_LEAVE,
- ACE_DATA_BLOCK_CTOR2_ENTER,
- ACE_DATA_BLOCK_CTOR2_LEAVE,
- ACE_DATA_BLOCK_CLONE_ENTER,
- ACE_DATA_BLOCK_CLONE_LEAVE
-};
-
-
-// Setup Timeprobes
-ACE_TIMEPROBE_EVENT_DESCRIPTIONS (ACE_MB_Timeprobe_Description,
- ACE_MESSAGE_BLOCK_INIT_I_ENTER);
-
-#endif /* ACE_ENABLE_TIMEPROBES */
-
-void
-ACE_Message_Block::data_block (ACE_Data_Block *db)
-{
- ACE_TRACE ("ACE_Message_Block::data_block");
- if (this->data_block_ != 0)
- this->data_block_->release ();
-
- this->data_block_ = db;
-
- // Set the read and write pointers in the <Message_Block> to point
- // to the buffer in the <ACE_Data_Block>.
- this->rd_ptr (this->data_block ()->base ());
- this->wr_ptr (this->data_block ()->base ());
-}
-
-int
-ACE_Message_Block::copy (const char *buf, size_t n)
-{
- ACE_TRACE ("ACE_Message_Block::copy");
-
- // Note that for this to work correct, end() *must* be >= wr_ptr().
- size_t len = ACE_static_cast(size_t,
- this->end () - this->wr_ptr ());
- if (len < n)
- return -1;
- else
- {
- (void) ACE_OS::memcpy (this->wr_ptr (),
- buf,
- n);
- this->wr_ptr (n);
- return 0;
- }
-}
-
-int
-ACE_Message_Block::copy (const char *buf)
-{
- ACE_TRACE ("ACE_Message_Block::copy");
-
- // Note that for this to work correct, end() *must* be >= wr_ptr().
- size_t len = ACE_static_cast(size_t,
- (this->end () - this->wr_ptr ()));
- size_t buflen = ACE_OS::strlen (buf) + 1;
-
- if (len < buflen)
- return -1;
- else
- {
- (void) ACE_OS::memcpy (this->wr_ptr (),
- buf,
- buflen);
- this->wr_ptr (buflen);
- return 0;
- }
-}
-
-void
-ACE_Message_Block::crunch (void)
-{
- if (this->rd_ptr () > this->base ())
- {
- size_t len = this->length ();
- (void) ACE_OS::memmove (this->base (),
- this->rd_ptr (),
- len);
- this->rd_ptr (this->base ());
- this->wr_ptr (this->base () + len);
- }
-}
-
-void
-ACE_Data_Block::dump (void) const
-{
- ACE_TRACE ("ACE_Data_Block::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("-----( Data Block )-----\n")
- ACE_TEXT ("type_ = %d\n")
- ACE_TEXT ("cur_size_ = %u\n")
- ACE_TEXT ("max_size_ = %u\n")
- ACE_TEXT ("flags_ = %u\n")
- ACE_TEXT ("base_ = %u\n")
- ACE_TEXT ("locking_strategy_ = %u\n")
- ACE_TEXT ("reference_count_ = %u\n")
- ACE_TEXT ("---------------------------\n"),
- this->type_,
- this->cur_size_,
- this->max_size_,
- this->flags_,
- this->base_,
- this->locking_strategy_,
- this->reference_count_));
- this->allocator_strategy_->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Message_Block::dump (void) const
-{
- ACE_TRACE ("ACE_Message_Block::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("-----( Message Block )-----\n")
- ACE_TEXT ("priority_ = %d\n")
- ACE_TEXT ("next_ = %u\n")
- ACE_TEXT ("prev_ = %u\n")
- ACE_TEXT ("cont_ = %u\n")
- ACE_TEXT ("rd_ptr_ = %u\n")
- ACE_TEXT ("wr_ptr_ = %u\n")
- ACE_TEXT ("---------------------------\n"),
- this->priority_,
- this->next_,
- this->prev_,
- this->cont_,
- this->rd_ptr_,
- this->wr_ptr_));
- this->data_block ()->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-int
-ACE_Data_Block::size (size_t length)
-{
- ACE_TRACE ("ACE_Data_Block::size");
-
- if (length <= this->max_size_)
- this->cur_size_ = length;
- else
- {
- // We need to resize!
- char *buf;
- ACE_ALLOCATOR_RETURN (buf,
- (char *) this->allocator_strategy_->malloc (length),
- -1);
-
- ACE_OS::memcpy (buf,
- this->base_,
- this->cur_size_);
- if (ACE_BIT_DISABLED (this->flags_,
- ACE_Message_Block::DONT_DELETE))
- this->allocator_strategy_->free ((void *) this->base_);
- else
- // We now assume ownership.
- ACE_CLR_BITS (this->flags_,
- ACE_Message_Block::DONT_DELETE);
- this->max_size_ = length;
- this->cur_size_ = length;
- this->base_ = buf;
- }
- return 0;
-}
-
-int
-ACE_Message_Block::size (size_t length)
-{
- ACE_TRACE ("ACE_Message_Block::size");
-
- // Resize the underlying <ACE_Data_Block>.
- if (this->data_block ()->size (length) == -1)
- return -1;
-
- return 0;
-}
-
-size_t
-ACE_Message_Block::total_size (void) const
-{
- ACE_TRACE ("ACE_Message_Block::total_size");
-
- size_t size = 0;
-
- for (const ACE_Message_Block *i = this;
- i != 0;
- i = i->cont ())
- size += i->size ();
-
- return size;
-}
-
-size_t
-ACE_Message_Block::total_length (void) const
-{
- ACE_TRACE ("ACE_Message_Block::total_length");
-
- size_t length = 0;
- for (const ACE_Message_Block *i = this;
- i != 0;
- i = i->cont ())
- length += i->length ();
-
- return length;
-}
-
-size_t
-ACE_Message_Block::total_capacity (void) const
-{
- ACE_TRACE ("ACE_Message_Block::total_size");
-
- size_t size = 0;
-
- for (const ACE_Message_Block *i = this;
- i != 0;
- i = i->cont ())
- size += i->capacity ();
-
- return size;
-}
-
-ACE_Data_Block::ACE_Data_Block (void)
- : type_ (ACE_Message_Block::MB_DATA),
- cur_size_ (0),
- max_size_ (0),
- flags_ (ACE_Message_Block::DONT_DELETE),
- base_ (0),
- allocator_strategy_ (0),
- locking_strategy_ (0),
- reference_count_ (1),
- data_block_allocator_ (0)
-{
- ACE_TRACE ("ACE_Data_Block::ACE_Data_Block");
- ACE_FUNCTION_TIMEPROBE (ACE_DATA_BLOCK_CTOR1_ENTER);
-
- ACE_ALLOCATOR (this->allocator_strategy_,
- ACE_Allocator::instance ());
-
- ACE_ALLOCATOR (this->data_block_allocator_,
- ACE_Allocator::instance ());
-}
-
-ACE_Data_Block::ACE_Data_Block (size_t size,
- ACE_Message_Block::ACE_Message_Type msg_type,
- const char *msg_data,
- ACE_Allocator *allocator_strategy,
- ACE_Lock *locking_strategy,
- ACE_Message_Block::Message_Flags flags,
- ACE_Allocator *data_block_allocator)
- : type_ (msg_type),
- cur_size_ (size),
- max_size_ (size),
- flags_ (flags),
- base_ ((char *) msg_data),
- allocator_strategy_ (allocator_strategy),
- locking_strategy_ (locking_strategy),
- reference_count_ (1),
- data_block_allocator_ (data_block_allocator)
-{
- ACE_TRACE ("ACE_Data_Block::ACE_Data_Block");
- ACE_FUNCTION_TIMEPROBE (ACE_DATA_BLOCK_CTOR2_ENTER);
-
- // If the user didn't pass one in, let's use the
- // <ACE_Allocator::instance>.
- if (this->allocator_strategy_ == 0)
- ACE_ALLOCATOR (this->allocator_strategy_,
- ACE_Allocator::instance ());
-
- if (this->data_block_allocator_ == 0)
- ACE_ALLOCATOR (this->data_block_allocator_,
- ACE_Allocator::instance ());
-
- if (msg_data == 0)
- ACE_ALLOCATOR (this->base_,
- (char *) this->allocator_strategy_->malloc (size));
- else
- this->base_ = (char *) msg_data;
-}
-
-ACE_Message_Block::ACE_Message_Block (const char *data,
- size_t size,
- u_long priority)
- : data_block_ (0)
-{
- ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
-
- if (this->init_i (size, // size
- MB_DATA, // type
- 0, // cont
- data, // data
- 0, // allocator
- 0, // locking strategy
- ACE_Message_Block::DONT_DELETE, // flags
- priority, // priority
- ACE_Time_Value::zero, // execution time
- ACE_Time_Value::max_time, // absolute time of deadline
- 0, // data block
- 0, // data_block allocator
- 0) == -1) // message_block allocator
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_Message_Block")));
-}
-
-ACE_Message_Block::ACE_Message_Block (ACE_Allocator *message_block_allocator)
- : data_block_ (0)
-{
- ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
-
- if (this->init_i (0, // size
- MB_DATA, // type
- 0, // cont
- 0, // data
- 0, // allocator
- 0, // locking strategy
- ACE_Message_Block::DONT_DELETE, // flags
- 0, // priority
- ACE_Time_Value::zero, // execution time
- ACE_Time_Value::max_time, // absolute time of deadline
- 0, // data block
- 0, // data_block allocator
- message_block_allocator) == -1) // message_block allocator
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_Message_Block")));
-}
-
-ACE_Message_Block::ACE_Message_Block (size_t size,
- ACE_Message_Type msg_type,
- ACE_Message_Block *msg_cont,
- const char *msg_data,
- ACE_Allocator *allocator_strategy,
- ACE_Lock *locking_strategy,
- u_long priority,
- const ACE_Time_Value &execution_time,
- const ACE_Time_Value &deadline_time,
- ACE_Allocator *data_block_allocator,
- ACE_Allocator *message_block_allocator)
- : data_block_ (0)
-{
- ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
-
- if (this->init_i (size,
- msg_type,
- msg_cont,
- msg_data,
- allocator_strategy,
- locking_strategy,
- msg_data ? ACE_Message_Block::DONT_DELETE : 0,
- priority,
- execution_time,
- deadline_time,
- 0, // data block
- data_block_allocator,
- message_block_allocator) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_Message_Block")));
-}
-
-int
-ACE_Message_Block::init (size_t size,
- ACE_Message_Type msg_type,
- ACE_Message_Block *msg_cont,
- const char *msg_data,
- ACE_Allocator *allocator_strategy,
- ACE_Lock *locking_strategy,
- u_long priority,
- const ACE_Time_Value &execution_time,
- const ACE_Time_Value &deadline_time,
- ACE_Allocator *data_block_allocator,
- ACE_Allocator *message_block_allocator)
-{
- ACE_TRACE ("ACE_Message_Block::init");
-
- return this->init_i (size,
- msg_type,
- msg_cont,
- msg_data,
- allocator_strategy,
- locking_strategy,
- msg_data ? ACE_Message_Block::DONT_DELETE : 0,
- priority,
- execution_time,
- deadline_time,
- 0, // data block
- data_block_allocator,
- message_block_allocator);
-}
-
-int
-ACE_Message_Block::init (const char *data,
- size_t size)
-{
- ACE_TRACE ("ACE_Message_Block::init");
- // Should we also initialize all the other fields, as well?
-
- return this->init_i (size, // size
- MB_DATA, // type
- 0, // cont
- data, // data
- 0, // allocator
- 0, // locking strategy
- ACE_Message_Block::DONT_DELETE, // flags
- 0, // priority
- ACE_Time_Value::zero, // execution time
- ACE_Time_Value::max_time, // absolute time of deadline
- 0, // data block
- 0, // data_block allocator
- 0); // message_block allocator
-}
-
-ACE_Message_Block::ACE_Message_Block (size_t size,
- ACE_Message_Type msg_type,
- ACE_Message_Block *msg_cont,
- const char *msg_data,
- ACE_Allocator *allocator_strategy,
- ACE_Lock *locking_strategy,
- Message_Flags flags,
- u_long priority,
- const ACE_Time_Value &execution_time,
- const ACE_Time_Value &deadline_time,
- ACE_Data_Block *db,
- ACE_Allocator *data_block_allocator,
- ACE_Allocator *message_block_allocator)
- : data_block_ (0)
-{
- ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
-
- if (this->init_i (size,
- msg_type,
- msg_cont,
- msg_data,
- allocator_strategy,
- locking_strategy,
- flags,
- priority,
- execution_time,
- deadline_time,
- db,
- data_block_allocator,
- message_block_allocator) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_Message_Block")));
-}
-
-ACE_Message_Block::ACE_Message_Block (ACE_Data_Block *data_block,
- ACE_Allocator *message_block_allocator)
- : data_block_ (0)
-{
- ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
-
- if (this->init_i (0, // size
- MB_NORMAL, // type
- 0, // cont
- 0, // data
- 0, // allocator
- 0, // locking strategy
- 0, // flags
- 0, // priority
- ACE_Time_Value::zero, // execution time
- ACE_Time_Value::max_time, // absolute time of deadline
- data_block, // data block
- data_block->data_block_allocator (),
- message_block_allocator) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_Message_Block")));
-}
-
-int
-ACE_Message_Block::init_i (size_t size,
- ACE_Message_Type msg_type,
- ACE_Message_Block *msg_cont,
- const char *msg_data,
- ACE_Allocator *allocator_strategy,
- ACE_Lock *locking_strategy,
- Message_Flags flags,
- u_long priority,
- const ACE_Time_Value &execution_time,
- const ACE_Time_Value &deadline_time,
- ACE_Data_Block *db,
- ACE_Allocator *data_block_allocator,
- ACE_Allocator *message_block_allocator)
-{
- ACE_TRACE ("ACE_Message_Block::init_i");
- ACE_FUNCTION_TIMEPROBE (ACE_MESSAGE_BLOCK_INIT_I_ENTER);
-
- this->rd_ptr_ = 0;
- this->wr_ptr_ = 0;
- this->priority_ = priority;
-#if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS)
- this->execution_time_ = execution_time;
- this->deadline_time_ = deadline_time;
-#else
- ACE_UNUSED_ARG (execution_time);
- ACE_UNUSED_ARG (deadline_time);
-#endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */
- this->cont_ = msg_cont;
- this->next_ = 0;
- this->prev_ = 0;
-
- this->message_block_allocator_ = message_block_allocator;
-
- if (this->data_block_ != 0)
- {
- this->data_block_->release ();
- this->data_block_ = 0;
- }
-
- if (db == 0)
- {
- if (data_block_allocator == 0)
- ACE_ALLOCATOR_RETURN (data_block_allocator,
- ACE_Allocator::instance (),
- -1);
-
- ACE_TIMEPROBE (ACE_MESSAGE_BLOCK_INIT_I_DB_ALLOC);
-
- // Allocate the <ACE_Data_Block> portion, which is reference
- // counted.
- ACE_NEW_MALLOC_RETURN (db,
- ACE_static_cast(ACE_Data_Block*,
- data_block_allocator->malloc (sizeof (ACE_Data_Block))),
- ACE_Data_Block (size,
- msg_type,
- msg_data,
- allocator_strategy,
- locking_strategy,
- flags,
- data_block_allocator),
- -1);
- ACE_TIMEPROBE (ACE_MESSAGE_BLOCK_INIT_I_DB_CTOR);
- }
-
- // Reset the data_block_ pointer.
- this->data_block (db);
- return 0;
-}
-
-ACE_Data_Block::~ACE_Data_Block (void)
-{
- // Sanity check...
- ACE_ASSERT (this->reference_count_ <= 1);
-
- // Just to be safe...
- this->reference_count_ = 0;
-
- if (ACE_BIT_DISABLED (this->flags_,
- ACE_Message_Block::DONT_DELETE))
- {
- this->allocator_strategy_->free ((void *) this->base_);
- this->base_ = 0;
- }
-}
-
-ACE_Data_Block *
-ACE_Data_Block::release_i (void)
-{
- ACE_TRACE ("ACE_Data_Block::release_i");
-
- ACE_ASSERT (this->reference_count_ > 0);
-
- ACE_Data_Block *result = 0;
-
- // decrement reference count
- this->reference_count_--;
-
- if (this->reference_count_ == 0)
- // this will cause deletion of this
- result = 0;
- else
- result = this;
-
- return result;
-}
-
-ACE_Data_Block *
-ACE_Data_Block::release_no_delete (ACE_Lock *lock)
-{
- ACE_TRACE ("ACE_Data_Block::release_no_delete");
-
- ACE_Data_Block *result = 0;
- ACE_Lock *lock_to_be_used = 0;
-
- // Check if we were passed in a lock
- if (lock != 0)
- {
- // Make sure that the lock passed in and our lock are the same
- if (lock == this->locking_strategy_)
- // In this case no locking is required.
- lock_to_be_used = 0;
-
- // The lock passed in does not match our lock
- else
- // Lock to be used is our lock
- lock_to_be_used = this->locking_strategy_;
- }
- // This is the case when no lock was passed in
- else
- // Lock to be used is our lock
- lock_to_be_used = this->locking_strategy_;
-
- // If there's a locking strategy then we need to acquire the lock
- // before decrementing the count.
- if (lock_to_be_used != 0)
- {
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *lock_to_be_used, 0);
-
- result = this->release_i ();
- }
- else
- result = this->release_i ();
-
- return result;
-}
-
-ACE_Data_Block *
-ACE_Data_Block::release (ACE_Lock *lock)
-{
- ACE_TRACE ("ACE_Data_Block::release");
-
- ACE_Allocator *allocator = this->data_block_allocator_;
-
- ACE_Data_Block *result = this->release_no_delete (lock);
-
- // We must delete this outside the scope of the locking_strategy_
- // since otherwise we'd be trying to "release" through a deleted
- // pointer!
- if (result == 0)
- ACE_DES_FREE (this,
- allocator->free,
- ACE_Data_Block);
- return result;
-}
-
-ACE_Message_Block *
-ACE_Message_Block::release (void)
-{
- ACE_TRACE ("ACE_Message_Block::release");
-
- // We want to hold the data block in a temporary variable because we
- // invoked "delete this;" at some point, so using this->data_block_
- // could be a bad idea.
- ACE_Data_Block *tmp = this->data_block ();
-
- // This flag is set to 1 when we have to destroy the data_block
- int destroy_dblock = 0;
-
- ACE_Lock *lock = 0;
-
- // Do we have a valid data block
- if (this->data_block ())
- {
- // Grab the lock that belongs to my data block
- lock = this->data_block ()->locking_strategy ();
-
- // if we have a lock
- if (lock != 0)
- {
- // One guard for all
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *lock, 0);
-
- // Call non-guarded release with <lock>
- destroy_dblock = this->release_i (lock);
- }
- // This is the case when we have a valid data block but no lock
- else
- // Call non-guarded release with no lock
- destroy_dblock = this->release_i (0);
- }
- else
- // This is the case when we don't even have a valid data block
- destroy_dblock = this->release_i (0);
-
- if (destroy_dblock != 0)
- ACE_DES_FREE (tmp,
- tmp->data_block_allocator ()->free,
- ACE_Data_Block);
- return 0;
-}
-
-int
-ACE_Message_Block::release_i (ACE_Lock *lock)
-{
- ACE_TRACE ("ACE_Message_Block::release_i");
-
- // Free up all the continuation messages.
- if (this->cont_)
- {
- ACE_Message_Block *mb = this->cont_;
- ACE_Message_Block *tmp;
-
- do
- {
- tmp = mb;
- mb = mb->cont_;
- tmp->cont_ = 0;
-
- ACE_Data_Block *db = tmp->data_block ();
- if (tmp->release_i (lock) != 0)
- ACE_DES_FREE (db,
- db->data_block_allocator ()->free,
- ACE_Data_Block);
- }
- while (mb);
-
- this->cont_ = 0;
- }
-
- int result = 0;
-
- if (this->data_block ())
- {
- if (this->data_block ()->release_no_delete (lock) == 0)
- result = 1;
- this->data_block_ = 0;
- }
-
- // We will now commit suicide: this object *must* have come from the
- // allocator given.
- if (this->message_block_allocator_ == 0)
- delete this;
- else
- ACE_DES_FREE (this,
- message_block_allocator_->free,
- ACE_Message_Block);
-
- return result;
-}
-
-/* static */ ACE_Message_Block *
-ACE_Message_Block::release (ACE_Message_Block *mb)
-{
- ACE_TRACE ("ACE_Message_Block::release");
-
- if (mb != 0)
- return mb->release ();
- else
- return 0;
-}
-
-ACE_Message_Block::~ACE_Message_Block (void)
-{
- ACE_TRACE ("ACE_Message_Block::~ACE_Message_Block");
-
- if (this->data_block ())
- this->data_block ()->release ();
-
- this->prev_ = 0;
- this->next_ = 0;
-}
-
-ACE_Data_Block *
-ACE_Data_Block::duplicate (void)
-{
- ACE_TRACE ("ACE_Data_Block::duplicate");
-
- // Create a new <ACE_Message_Block>, but share the <base_> pointer
- // data (i.e., don't copy that).
- if (this->locking_strategy_)
- {
- // We need to acquire the lock before incrementing the count.
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->locking_strategy_, 0);
- this->reference_count_++;
- }
- else
- this->reference_count_++;
-
- return this;
-}
-
-#if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS)
-#define ACE_EXECUTION_TIME this->execution_time_
-#define ACE_DEADLINE_TIME this->deadline_time_
-#else
-#define ACE_EXECUTION_TIME ACE_Time_Value::zero
-#define ACE_DEADLINE_TIME ACE_Time_Value::max_time
-#endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */
-
-ACE_Message_Block *
-ACE_Message_Block::duplicate (void) const
-{
- ACE_TRACE ("ACE_Message_Block::duplicate");
-
- ACE_Message_Block *nb;
-
- // Create a new <ACE_Message_Block> that contains unique copies of
- // the message block fields, but a reference counted duplicate of
- // the <ACE_Data_Block>.
-
- // If there is no allocator, use the standard new and delete calls.
- if (this->message_block_allocator_ == 0)
- ACE_NEW_RETURN (nb,
- ACE_Message_Block (0, // size
- ACE_Message_Type (0), // type
- 0, // cont
- 0, // data
- 0, // allocator
- 0, // locking strategy
- 0, // flags
- this->priority_, // priority
- ACE_EXECUTION_TIME,
- ACE_DEADLINE_TIME,
- // Get a pointer to a
- // "duplicated" <ACE_Data_Block>
- // (will simply increment the
- // reference count).
- this->data_block ()->duplicate (),
- this->data_block ()->data_block_allocator (),
- this->message_block_allocator_),
- 0);
- else // Otherwise, use the message_block_allocator passed in.
- ACE_NEW_MALLOC_RETURN (nb,
- ACE_reinterpret_cast(ACE_Message_Block*,
- message_block_allocator_->malloc (sizeof (ACE_Message_Block))),
- ACE_Message_Block (0, // size
- ACE_Message_Type (0), // type
- 0, // cont
- 0, // data
- 0, // allocator
- 0, // locking strategy
- 0, // flags
- this->priority_, // priority
- ACE_EXECUTION_TIME,
- ACE_DEADLINE_TIME,
- // Get a pointer to a
- // "duplicated" <ACE_Data_Block>
- // (will simply increment the
- // reference count).
- this->data_block ()->duplicate (),
- this->data_block ()->data_block_allocator (),
- this->message_block_allocator_),
- 0);
-
- // Set the read and write pointers in the new <Message_Block> to the
- // same relative offset as in the existing <Message_Block>. Note
- // that we are assuming that the data_block()->base() pointer
- // doesn't change when it's duplicated.
- nb->rd_ptr (this->rd_ptr_);
- nb->wr_ptr (this->wr_ptr_);
-
- // Increment the reference counts of all the continuation messages.
- if (this->cont_)
- {
- nb->cont_ = this->cont_->duplicate ();
-
- // If things go wrong, release all of our resources and return
- // 0.
- if (nb->cont_ == 0)
- {
- nb->release ();
- nb = 0;
- }
- }
-
- return nb;
-}
-
-ACE_Message_Block *
-ACE_Message_Block::duplicate (const ACE_Message_Block *mb)
-{
- ACE_TRACE ("ACE_Message_Block::duplicate");
- if (mb == 0)
- return 0;
- else
- return mb->duplicate ();
-}
-
-ACE_Data_Block *
-ACE_Data_Block::clone (ACE_Message_Block::Message_Flags mask) const
-{
- ACE_TRACE ("ACE_Data_Block::clone");
-
- ACE_Data_Block* nb = this->clone_nocopy (mask);
-
- // Copy all of the payload memory into the new object.
- ACE_OS::memcpy (nb->base_,
- this->base_,
- this->max_size_);
-
- return nb;
-}
-
-ACE_Data_Block *
-ACE_Data_Block::clone_nocopy (ACE_Message_Block::Message_Flags mask) const
-{
- ACE_FUNCTION_TIMEPROBE(ACE_DATA_BLOCK_CLONE_ENTER);
-
- ACE_TRACE ("ACE_Data_Block::clone_nocopy");
-
- // You always want to clear this one to prevent memory leaks but you
- // might add some others later.
- const ACE_Message_Block::Message_Flags always_clear =
- ACE_Message_Block::DONT_DELETE;
-
- ACE_Data_Block *nb;
-
- ACE_NEW_MALLOC_RETURN (nb,
- ACE_static_cast(ACE_Data_Block*,
- this->data_block_allocator_->malloc (sizeof (ACE_Data_Block))),
- ACE_Data_Block (this->max_size_, // size
- this->type_, // type
- 0, // data
- this->allocator_strategy_, // allocator
- this->locking_strategy_, // locking strategy
- this->flags_, // flags
- this->data_block_allocator_),
- 0);
-
-
- // Set new flags minus the mask...
- nb->clr_flags (mask | always_clear);
- return nb;
-}
-
-ACE_Message_Block *
-ACE_Message_Block::clone (Message_Flags mask) const
-{
- ACE_TRACE ("ACE_Message_Block::clone");
-
- // Get a pointer to a "cloned" <ACE_Data_Block> (will copy the
- // values rather than increment the reference count).
- ACE_Data_Block *db = this->data_block ()->clone (mask);
-
- if (db == 0)
- return 0;
-
- ACE_Message_Block *nb;
-
- if(message_block_allocator_ == 0)
- {
- nb = new ACE_Message_Block (0, // size
- ACE_Message_Type (0), // type
- 0, // cont
- 0, // data
- 0, // allocator
- 0, // locking strategy
- 0, // flags
- this->priority_, // priority
- ACE_EXECUTION_TIME, // execution time
- ACE_DEADLINE_TIME, // absolute time to deadline
- // Get a pointer to a
- // "duplicated" <ACE_Data_Block>
- // (will simply increment the
- // reference count).
- db,
- db->data_block_allocator (),
- this->message_block_allocator_);
- }
- else
- {
- // This is the ACE_NEW_MALLOC macro with the return check removed.
- // We need to do it this way because if it fails we need to release
- // the cloned data block that was created above. If we used
- // ACE_NEW_MALLOC_RETURN, there would be a memory leak because the
- // above db pointer would be left dangling.
- nb = ACE_static_cast(ACE_Message_Block*,message_block_allocator_->malloc (sizeof (ACE_Message_Block)));
- if(nb != 0)
- new (nb) ACE_Message_Block (0, // size
- ACE_Message_Type (0), // type
- 0, // cont
- 0, // data
- 0, // allocator
- 0, // locking strategy
- 0, // flags
- this->priority_, // priority
- ACE_EXECUTION_TIME, // execution time
- ACE_DEADLINE_TIME, // absolute time to deadline
- db,
- db->data_block_allocator (),
- this->message_block_allocator_);
- }
-
- if (nb == 0)
- {
- db->release ();
- return 0;
- }
-
- // Set the read and write pointers in the new <Message_Block> to the
- // same relative offset as in the existing <Message_Block>.
- nb->rd_ptr (this->rd_ptr_);
- nb->wr_ptr (this->wr_ptr_);
-
- // Clone all the continuation messages if necessary.
- if (this->cont () != 0
- && (nb->cont_ = this->cont ()->clone (mask)) == 0)
- {
- nb->release ();
- return 0;
- }
- return nb;
-}
-
-// This is private.
-ACE_Message_Block &
-ACE_Message_Block::operator= (const ACE_Message_Block &)
-{
- ACE_TRACE ("ACE_Message_Block::operator=");
- return *this;
-}
-
-void
-ACE_Data_Block::base (char *msg_data,
- size_t msg_length,
- ACE_Message_Block::Message_Flags msg_flags)
-{
- if (ACE_BIT_DISABLED (this->flags_,
- ACE_Message_Block::DONT_DELETE))
- this->allocator_strategy_->free (this->base_);
- this->max_size_ = msg_length;
- this->cur_size_ = msg_length;
- this->base_ = msg_data;
- this->flags_ = msg_flags;
-}
-
-// ctor
-
-ACE_Dynamic_Message_Strategy::ACE_Dynamic_Message_Strategy (u_long static_bit_field_mask,
- u_long static_bit_field_shift,
- u_long dynamic_priority_max,
- u_long dynamic_priority_offset)
- : static_bit_field_mask_ (static_bit_field_mask),
- static_bit_field_shift_ (static_bit_field_shift),
- dynamic_priority_max_ (dynamic_priority_max),
- dynamic_priority_offset_ (dynamic_priority_offset),
- max_late_ (0, dynamic_priority_offset - 1),
- min_pending_ (0, dynamic_priority_offset),
- pending_shift_ (0, dynamic_priority_max)
-{
-}
-
-// dtor
-
-ACE_Dynamic_Message_Strategy::~ACE_Dynamic_Message_Strategy (void)
-{
-}
-
-// Dump the state of the strategy.
-
-void
-ACE_Dynamic_Message_Strategy::dump (void) const
-{
- ACE_TRACE ("ACE_Dynamic_Message_Strategy::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("static_bit_field_mask_ = %u\n")
- ACE_TEXT ("static_bit_field_shift_ = %u\n")
- ACE_TEXT ("dynamic_priority_max_ = %u\n")
- ACE_TEXT ("dynamic_priority_offset_ = %u\n")
- ACE_TEXT ("max_late_ = [%d sec, %d usec]\n")
- ACE_TEXT ("min_pending_ = [%d sec, %d usec]\n")
- ACE_TEXT ("pending_shift_ = [%d sec, %d usec]\n"),
- this->static_bit_field_mask_,
- this->static_bit_field_shift_,
- this->dynamic_priority_max_,
- this->dynamic_priority_offset_,
- this->max_late_.sec (),
- this->max_late_.usec (),
- this->min_pending_.sec (),
- this->min_pending_.usec (),
- this->pending_shift_.sec (),
- this->pending_shift_.usec ()));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Deadline_Message_Strategy:: ACE_Deadline_Message_Strategy (u_long static_bit_field_mask,
- u_long static_bit_field_shift,
- u_long dynamic_priority_max,
- u_long dynamic_priority_offset)
- : ACE_Dynamic_Message_Strategy (static_bit_field_mask,
- static_bit_field_shift,
- dynamic_priority_max,
- dynamic_priority_offset)
-{
-}
-
-ACE_Deadline_Message_Strategy::~ACE_Deadline_Message_Strategy (void)
-{
-}
-
-void
-ACE_Deadline_Message_Strategy::dump (void) const
-{
- ACE_TRACE ("ACE_Deadline_Message_Strategy::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Dynamic_Message_Strategy base class: \n")));
- this->ACE_Dynamic_Message_Strategy::dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nderived class: ACE_Deadline_Message_Strategy\n")));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Laxity_Message_Strategy::ACE_Laxity_Message_Strategy (u_long static_bit_field_mask,
- u_long static_bit_field_shift,
- u_long dynamic_priority_max,
- u_long dynamic_priority_offset)
- : ACE_Dynamic_Message_Strategy (static_bit_field_mask,
- static_bit_field_shift,
- dynamic_priority_max,
- dynamic_priority_offset)
-{
-}
-
-ACE_Laxity_Message_Strategy::~ACE_Laxity_Message_Strategy (void)
-{
-}
-
-void
-ACE_Laxity_Message_Strategy::dump (void) const
-{
- ACE_TRACE ("ACE_Laxity_Message_Strategy::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Dynamic_Message_Strategy base class: \n")));
- this->ACE_Dynamic_Message_Strategy::dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nderived class: ACE_Laxity_Message_Strategy\n")));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
- // Dump the state of the strategy.
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Guard <ACE_Lock>;
-// These specializations aren't needed for the ACE library because
-// Service_Config.cpp has them:
-//
-// template class ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex>;
-// template class ACE_Allocator_Adapter <ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> >;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Guard <ACE_Lock>
-// These specializations aren't needed for the ACE library because
-// Service_Config.cpp has them:
-//
-// #pragma instantiate ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex>
-// #pragma instantiate ACE_Allocator_Adapter <ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> >
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Message_Block.h b/ace/Message_Block.h
deleted file mode 100644
index 8df4d6fab40..00000000000
--- a/ace/Message_Block.h
+++ /dev/null
@@ -1,843 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Message_Block.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#ifndef ACE_MESSAGE_BLOCK_H
-#define ACE_MESSAGE_BLOCK_H
-#include "ace/pre.h"
-
-#include "ace/Malloc.h"
-
-// Forward declaration.
-class ACE_Data_Block;
-class ACE_Lock;
-class ACE_Time_Value;
-
-class ACE_Export ACE_Message_Block
-{
- // = TITLE
- // Stores messages for use throughout ACE (particularly
- // <ACE_Message_Queue>).
- //
- // = DESCRIPTION
- // An <ACE_Message_Block> is modeled after the message data
- // structures used in System V STREAMS. Its purpose is to
- // enable efficient manipulation of arbitrarily-large messages
- // without much incurring memory copying overhead. Here are the
- // main characteristics of an <ACE_Message_Block>:
- //
- // 1. Contains a pointer to a reference-counted
- // <ACE_Data_Block>, which in turn points to the actual data
- // buffer. This allows very flexible and efficient sharing of
- // data by multiple <ACE_Message_Block>s.
- //
- // 2. One or more <ACE_Message_Blocks> can be linked to form a
- // ``fragment chain.''
- //
- // 3. <ACE_Message_Blocks> can be linked together by <prev_> and
- // <next_> pointers to form a queue of messages (e.g., this is how
- // <ACE_Message_Queue> works).
-public:
- friend class ACE_Data_Block;
-
- enum
- {
- // = Data and protocol messages (regular and priority)
- MB_DATA = 0x01, // regular data
- MB_PROTO = 0x02, // protocol control
-
- // = Control messages (regular and priority)
- MB_BREAK = 0x03, // line break
- MB_PASSFP = 0x04, // pass file pointer
- MB_EVENT = 0x05, // post an event to an event queue
- MB_SIG = 0x06, // generate process signal
- MB_IOCTL = 0x07, // ioctl; set/get params
- MB_SETOPTS = 0x08, // set various stream head options
-
- // = Control messages (high priority; go to head of queue)
- MB_IOCACK = 0x81, // acknowledge ioctl
- MB_IOCNAK = 0x82, // negative ioctl acknowledge
- MB_PCPROTO = 0x83, // priority proto message
- MB_PCSIG = 0x84, // generate process signal
- MB_READ = 0x85, // generate read notification
- MB_FLUSH = 0x86, // flush your queues
- MB_STOP = 0x87, // stop transmission immediately
- MB_START = 0x88, // restart transmission after stop
- MB_HANGUP = 0x89, // line disconnect
- MB_ERROR = 0x8a, // fatal error used to set u.u_error
- MB_PCEVENT = 0x8b, // post an event to an event queue
-
- // Message class masks
- MB_NORMAL = 0x00, // Normal priority messages
- MB_PRIORITY = 0x80, // High priority control messages
- MB_USER = 0x200 // User-defined control messages
- };
-
- typedef int ACE_Message_Type;
- typedef u_long Message_Flags;
-
- enum
- {
- DONT_DELETE = 01, // Don't delete the data on exit since we don't own it.
- USER_FLAGS = 0x1000 // user defined flags start here
- };
-
- // = Initialization and termination.
- ACE_Message_Block (ACE_Allocator *message_block_allocator = 0);
- // Create an empty message.
-
- ACE_Message_Block (ACE_Data_Block *,
- ACE_Allocator *message_block_allocator = 0);
- // Create an <ACE_Message_Block> that owns the <ACE_Data_Block> *.
-
- ACE_Message_Block (const char *data,
- size_t size = 0,
- u_long priority = ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY);
- // Create a Message Block that assumes ownership of <data> without
- // copying it (i.e., we don't delete it since we don't malloc it!).
- // Note that the <size> of the <Message_Block> will be <size>, but
- // the <length> will be 0 until <wr_ptr> is set.
-
- ACE_Message_Block (size_t size,
- ACE_Message_Type type = MB_DATA,
- ACE_Message_Block *cont = 0,
- const char *data = 0,
- ACE_Allocator *allocator_strategy = 0,
- ACE_Lock *locking_strategy = 0,
- u_long priority = ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY,
- const ACE_Time_Value &execution_time = ACE_Time_Value::zero,
- const ACE_Time_Value &deadline_time = ACE_Time_Value::max_time,
- ACE_Allocator *data_block_allocator = 0,
- ACE_Allocator *message_block_allocator = 0);
- // Create an initialized message of type <type> containing <size>
- // bytes. The <cont> argument initializes the continuation field in
- // the <Message_Block>. If <data> == 0 then we create and own the
- // <data>, using <allocator> to get the data if it's non-0. If
- // <data> != 0 we assume ownership of the <data> (and don't delete
- // it). If <locking_strategy> is non-0 then this is used to protect
- // regions of code that access shared state (e.g., reference
- // counting) from race conditions. Note that the <size> of the
- // <Message_Block> will be <size>, but the <length> will be 0 until
- // <wr_ptr> is set.
- // The <data_block_allocator> is use to allocate the data blocks
- // while the <allocator_strategy> is used to allocate the buffers
- // contained by those.
- // The <message_block_allocator> is used to allocate new
- // <Message_Block> objects when a duplicate method is called. If
- // a <message_block_allocator> is given, this <Message_Block> and
- // future <Message_Block> objects created by duplicate will be free'ed
- // into this allocator when they are released. Note: if you use this
- // allocator, the <Message_Block> you created should have been created
- // using this allocator because it will be released to the same allocator.
-
- int init (const char *data,
- size_t size = 0);
- // Create a Message Block that assumes ownership of <data> (i.e.,
- // doesn't delete it since it didn't malloc it!). Note that the
- // <size> of the <Message_Block> will be <size>, but the <length>
- // will be 0 until <wr_ptr> is set.
-
- int init (size_t size,
- ACE_Message_Type type = MB_DATA,
- ACE_Message_Block *cont = 0,
- const char *data = 0,
- ACE_Allocator *allocator_strategy = 0,
- ACE_Lock *locking_strategy = 0,
- u_long priority = ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY,
- const ACE_Time_Value &execution_time = ACE_Time_Value::zero,
- const ACE_Time_Value &deadline_time = ACE_Time_Value::max_time,
- ACE_Allocator *data_block_allocator = 0,
- ACE_Allocator *message_block_allocator = 0);
- // Create an initialized message of type <type> containing <size>
- // bytes. The <cont> argument initializes the continuation field in
- // the <Message_Block>. If <data> == 0 then we create and own the
- // <data>, using <allocator> to get the data if it's non-0. If
- // <data> != 0 we assume ownership of the <data> (and don't delete
- // it). If <locking_strategy> is non-0 then this is used to protect
- // regions of code that access shared state (e.g., reference
- // counting) from race conditions. Note that the <size> of the
- // <Message_Block> will be <size>, but the <length> will be 0 until
- // <wr_ptr> is set.
- // The <data_block_allocator> is use to allocate the data blocks
- // while the <allocator_strategy> is used to allocate the buffers
- // contained by those.
-
- virtual ~ACE_Message_Block (void);
- // Delete all the resources held in the message.
- //
- // Note that <release> is designed to release the continuation
- // chain; the destructor is not. See <release> for details.
-
- // = Message Type accessors and mutators.
-
- ACE_Message_Type msg_type (void) const;
- // Get type of the message.
-
- void msg_type (ACE_Message_Type type);
- // Set type of the message.
-
- int is_data_msg (void) const;
- // Find out what type of message this is.
-
- ACE_Message_Type msg_class (void) const;
- // Find out what class of message this is (there are two classes,
- // <normal> messages and <high-priority> messages).
-
- // = Message flag accessors and mutators.
- Message_Flags set_flags (Message_Flags more_flags);
- // Bitwise-or the <more_flags> into the existing message flags and
- // return the new value.
-
- Message_Flags clr_flags (Message_Flags less_flags);
- // Clear the message flag bits specified in <less_flags> and return
- // the new value.
-
- Message_Flags flags (void) const;
- // Get the current message flags.
-
- u_long msg_priority (void) const;
- // Get priority of the message.
-
- void msg_priority (u_long priority);
- // Set priority of the message.
-
- const ACE_Time_Value &msg_execution_time (void) const;
- // Get execution time associated with the message.
-
- void msg_execution_time (const ACE_Time_Value &et);
- // Set execution time associated with the message.
-
- const ACE_Time_Value &msg_deadline_time (void) const;
- // Get absolute time of deadline associated with the message.
-
- void msg_deadline_time (const ACE_Time_Value &dt);
- // Set absolute time of deadline associated with the message.
-
- // = Deep copy and shallow copy methods.
-
- virtual ACE_Message_Block *clone (Message_Flags mask = 0) const;
- // Return an exact "deep copy" of the message, i.e., create fresh
- // new copies of all the Data_Blocks and continuations.
-
- ACE_Message_Block *duplicate (void) const;
- // Return a "shallow" copy that increments our reference count by 1.
-
- static ACE_Message_Block *duplicate (const ACE_Message_Block *mb);
- // Return a "shallow" copy that increments our reference count by 1.
- // This is similar to CORBA's <_duplicate> method, which is useful
- // if you want to eliminate lots of checks for NULL <mb> pointers
- // before calling <_duplicate> on them.
-
- ACE_Message_Block *release (void);
- // Decrease the shared ACE_Data_Block's reference count by 1. If the
- // ACE_Data_Block's reference count goes to 0, it is deleted.
- // In all cases, this ACE_Message_Block is deleted - it must have come
- // from the heap, or there will be trouble.
- //
- // <release> is designed to release the continuation chain; the
- // destructor is not. If we make the destructor release the
- // continuation chain by calling <release> or delete on the message
- // blocks in the continuation chain, the following code will not
- // work since the message block in the continuation chain is not off
- // the heap:
- //
- // ACE_Message_Block mb1 (1024);
- // ACE_Message_Block mb2 (1024);
- //
- // mb1.cont (&mb2);
- //
- // And hence, call <release> on a dynamically allocated message
- // block. This will release all the message blocks in the
- // continuation chain. If you call delete or let the message block
- // fall off the stack, cleanup of the message blocks in the
- // continuation chain becomes the responsibility of the user.
-
- static ACE_Message_Block *release (ACE_Message_Block *mb);
- // This behaves like the non-static method <release>, except that it
- // checks if <mb> is 0. This is similar to <CORBA::release>, which
- // is useful if you want to eliminate lots of checks for NULL
- // pointers before calling <release> on them. Returns <mb>.
-
- // = Operations on Message data
-
- int copy (const char *buf, size_t n);
- // Copies <n> bytes from <buf> into the Message_Block starting at
- // the <wr_ptr> offset. Return 0 and increment <wr_ptr> by <n> if
- // the method succeeds. Returns -1 if the size of the message is
- // too small, i.e., for this to work correct, <end> must be >=
- // <wr_ptr>.
-
- int copy (const char *buf);
- // Copies <buf> into the Message_Block starting at the <wr_ptr>
- // offset. This call assumees that <buf> is NUL-terminated. Return
- // 0 and increment <wr_ptr> by <ACE_OS::strlen (buf) + 1> if the
- // method succeeds. Returns -1 if the size of the message is too
- // small, i.e., for this to work correct, <end> must be >= <wr_ptr>.
-
- void crunch (void);
- // Normalizes data in the top-level <Message_Block> to align with the base.
-
- void reset (void);
- // Resets the Message Block data to contain nothing, i.e., sets the
- // read and write pointers to align with the base.
-
- char *base (void) const;
- // Get message data.
-
- void base (char *data,
- size_t size,
- Message_Flags = DONT_DELETE);
- // Set message data (doesn't reallocate).
-
- char *end (void) const;
- // Return a pointer to 1 past the end of the allocated data in a message.
-
- char *mark (void) const;
- // Return a pointer to 1 past the end of the allotted data in a message.
- // Allotted data may be less than allocated data if a value smaller than
- // capacity() to is passed to size().
-
- char *rd_ptr (void) const;
- // Get the read pointer.
- void rd_ptr (char *ptr);
- // Set the read pointer to <ptr>.
- void rd_ptr (size_t n);
- // Set the read pointer ahead <n> bytes.
-
- char *wr_ptr (void) const;
- // Get the write pointer.
- void wr_ptr (char *ptr);
- // Set the write pointer to <ptr>.
- void wr_ptr (size_t n);
- // Set the write pointer ahead <n> bytes. This is used to compute
- // the <length> of a message.
-
- // = Message length is <wr_ptr> - <rd_ptr>.
- size_t length (void) const;
- // Get the length of the message
- void length (size_t n);
- // Set the length of the message
- size_t total_length (void) const;
- // Get the length of the <Message_Block>s, including chained
- // <Message_Block>s.
-
- // = Set/get <Message_Block> size info.
- size_t total_size (void) const;
- // Get the total number of bytes in all <Message_Block>s, including
- // chained <Message_Block>s.
-
- size_t size (void) const;
- // Get the number of bytes in the top-level <Message_Block> (i.e.,
- // does not consider the bytes in chained <Message_Block>s).
-
- int size (size_t length);
- // Set the number of bytes in the top-level <Message_Block>,
- // reallocating space if necessary. However, the <rd_ptr_> and
- // <wr_ptr_> remain at the original offsets into the buffer, even if
- // it is reallocated. Returns 0 if successful, else -1.
-
- size_t total_capacity (void) const;
- // Get the number of allocated bytes in all <Message_Block>, including
- // chained <Message_Block>s.
-
- size_t capacity (void) const;
- // Get the number of allocated bytes in the top-level <Message_Block>.
-
- size_t space (void) const;
- // Get the number of bytes available after the <wr_ptr_> in the
- // top-level <Message_Block>.
-
- // = <ACE_Data_Block> methods.
-
- ACE_Data_Block *data_block (void) const;
- // Get a pointer to the data block. Note that the <ACE_Message_Block>
- // still references the block; this call does not change the reference
- // count.
-
- void data_block (ACE_Data_Block *);
- // Set a new data block pointer. The original <ACE_Data_Block> is released
- // as a result of this call. If you need to keep the original block, call
- // <replace_data_block> instead. Upon return, this <ACE_Message_Block>
- // holds a pointer to the new <ACE_Data_Block>, taking over the reference
- // you held on it prior to the call.
-
- ACE_Data_Block *replace_data_block (ACE_Data_Block*);
- // Set a new data block pointer. A pointer to the original <ACE_Data_Block>
- // is returned, and not released (as it is with <data_block>).
-
- // = The continuation field chains together composite messages.
- ACE_Message_Block *cont (void) const;
- // Get the continuation field.
- void cont (ACE_Message_Block *);
- // Set the continuation field.
-
- // = Pointer to the <Message_Block> directly ahead in the <ACE_Message_Queue>.
- ACE_Message_Block *next (void) const;
- // Get link to next message.
- void next (ACE_Message_Block *);
- // Set link to next message.
-
- // = Pointer to the <Message_Block> directly behind in the <ACE_Message_Queue>.
- ACE_Message_Block *prev (void) const;
- // Get link to prev message.
- void prev (ACE_Message_Block *);
- // Set link to prev message.
-
- // = The locking strategy prevents race conditions.
- ACE_Lock *locking_strategy (void);
- // Get the locking strategy.
- ACE_Lock *locking_strategy (ACE_Lock *);
- // Set a new locking strategy and return the hold one.
-
- int reference_count (void) const;
- // Get the current reference count.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Internal initialization methods.
- ACE_Message_Block (size_t size,
- ACE_Message_Type type,
- ACE_Message_Block *cont,
- const char *data,
- ACE_Allocator *allocator_strategy,
- ACE_Lock *locking_strategy,
- Message_Flags flags,
- u_long priority,
- const ACE_Time_Value &execution_time,
- const ACE_Time_Value &deadline_time,
- ACE_Data_Block *db,
- ACE_Allocator *data_block_allocator,
- ACE_Allocator *message_block_allocator);
- // Perform the actual initialization.
-
- int release_i (ACE_Lock *lock);
- // Internal release implementation
- // Returns 1 if the data block has to be destroyed.
-
- int init_i (size_t size,
- ACE_Message_Type type,
- ACE_Message_Block *cont,
- const char *data,
- ACE_Allocator *allocator_strategy,
- ACE_Lock *locking_strategy,
- Message_Flags flags,
- u_long priority,
- const ACE_Time_Value &execution_time,
- const ACE_Time_Value &deadline_time,
- ACE_Data_Block *db,
- ACE_Allocator *data_block_allocator,
- ACE_Allocator *message_block_allocator);
- // Perform the actual initialization.
-
- size_t rd_ptr_;
- // Pointer to beginning of next read.
-
- size_t wr_ptr_;
- // Pointer to beginning of next write.
-
- u_long priority_;
- // Priority of message.
-
-#if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS)
- ACE_Time_Value execution_time_;
- // execution time associated with the message
-
- ACE_Time_Value deadline_time_;
- // absolute deadline time for message
-#endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */
-
- // = Links to other ACE_Message_Block *s.
- ACE_Message_Block *cont_;
- // Pointer to next message block in the chain.
-
- ACE_Message_Block *next_;
- // Pointer to next message in the list.
-
- ACE_Message_Block *prev_;
- // Pointer to previous message in the list.
-
- ACE_Data_Block *data_block_;
- // Pointer to the reference counted data structure that contains the
- // actual memory buffer.
-
- ACE_Allocator *message_block_allocator_;
- // The allocator used to destroy ourselves when release is called
- // and create new message blocks on duplicate.
-
-private:
- // = Disallow these operations for now (use <clone> instead).
- ACE_Message_Block &operator= (const ACE_Message_Block &);
- ACE_Message_Block (const ACE_Message_Block &);
-};
-
-class ACE_Export ACE_Data_Block
-{
- // = TITLE
- // Stores the data payload that is accessed via one or more
- // <ACE_Message_Block>s.
- //
- // = DESCRIPTION
- // This data structure is reference counted to maximize
- // sharing. It also contains the <locking_strategy_> (which
- // protects the reference count from race conditions in
- // concurrent programs) and the <allocation_strategy_> (which
- // determines what memory pool is used to allocate the memory).
-public:
- // = Initialization and termination methods.
- ACE_Data_Block (void);
- // Default "do-nothing" constructor.
-
- ACE_Data_Block (size_t size,
- ACE_Message_Block::ACE_Message_Type msg_type,
- const char *msg_data,
- ACE_Allocator *allocator_strategy,
- ACE_Lock *locking_strategy,
- ACE_Message_Block::Message_Flags flags,
- ACE_Allocator *data_block_allocator);
- // Initialize.
-
- virtual ~ACE_Data_Block (void);
- // Delete all the resources held in the message.
-
- ACE_Message_Block::ACE_Message_Type msg_type (void) const;
- // Get type of the message.
-
- void msg_type (ACE_Message_Block::ACE_Message_Type type);
- // Set type of the message.
-
- char *base (void) const;
- // Get message data pointer
-
- void base (char *data,
- size_t size,
- ACE_Message_Block::Message_Flags mflags = ACE_Message_Block::DONT_DELETE);
- // Set message data pointer (doesn't reallocate).
-
- char *end (void) const;
- // Return a pointer to 1 past the end of the allocated data in a message.
-
- char *mark (void) const;
- // Return a pointer to 1 past the end of the allotted data in a message.
- // The allotted data may be less than allocated data if <size()> is passed
- // an argument less than <capacity()>.
-
- // = Message size is the total amount of space alloted.
-
- size_t size (void) const;
- // Get the total amount of allotted space in the message. The amount of
- // allotted space may be less than allocated space.
-
- int size (size_t length);
- // Set the total amount of space in the message. Returns 0 if
- // successful, else -1.
-
- size_t capacity (void) const;
- // Get the total amount of allocated space.
-
- virtual ACE_Data_Block *clone (ACE_Message_Block::Message_Flags mask = 0) const;
- // Return an exact "deep copy" of the message, i.e., create fresh
- // new copies of all the Data_Blocks and continuations.
- // Notice that Data_Blocks can act as "Prototypes", i.e. derived
- // classes can override this method and create instances of
- // themselves.
-
- virtual ACE_Data_Block *clone_nocopy (ACE_Message_Block::Message_Flags mask = 0) const;
- // As clone above, but it does not copy the contents of the buffer,
- // i.e., create a new Data_Block of the same dynamic type, with the
- // same allocator, locking_strategy, and with the same amount of
- // storage available but the buffer is unitialized.
-
- ACE_Data_Block *duplicate (void);
- // Return a "shallow" copy that increments our reference count by 1.
-
- ACE_Data_Block *release (ACE_Lock *lock = 0);
- // Decrease the shared reference count by 1. If the reference count
- // is > 0 then return this; else if reference count == 0 then delete
- // <this> and <mb> and return 0. Behavior is undefined if reference
- // count < 0.
-
- // = Message flag accessors and mutators.
- ACE_Message_Block::Message_Flags set_flags (ACE_Message_Block::Message_Flags more_flags);
- // Bitwise-or the <more_flags> into the existing message flags and
- // return the new value.
-
- ACE_Message_Block::Message_Flags clr_flags (ACE_Message_Block::Message_Flags less_flags);
- // Clear the message flag bits specified in <less_flags> and return
- // the new value.
-
- ACE_Message_Block::Message_Flags flags (void) const;
- // Get the current message flags.
-
- ACE_Allocator *allocator_strategy (void) const;
- // Obtain the allocator strategy.
-
- // = The locking strategy prevents race conditions.
- ACE_Lock *locking_strategy (void);
- // Get the locking strategy.
- ACE_Lock *locking_strategy (ACE_Lock *);
- // Set a new locking strategy and return the hold one.
-
- void dump (void) const;
- // Dump the state of an object.
-
- int reference_count (void) const;
- // Get the current reference count.
-
- ACE_Allocator *data_block_allocator (void) const;
- // Get the allocator used to create this object
-
-protected:
- ACE_Data_Block *release_i (void);
- // Internal release implementation
-
- friend class ACE_Message_Block;
- ACE_Data_Block *release_no_delete (ACE_Lock *lock);
- // Decrease the reference count, but don't delete the object.
- // Returns 0 if the object should be removed.
- // If <lock> is equal to the locking strategy then we assume that
- // the lock is beign held by the current thread; this is used to
- // release all the data blocks in a chain while holding a single
- // lock.
-
- ACE_Message_Block::ACE_Message_Type type_;
- // Type of message.
-
- size_t cur_size_;
- // Current size of message block.
-
- size_t max_size_;
- // Total size of buffer.
-
- ACE_Message_Block::Message_Flags flags_;
- // Misc flags (e.g., DONT_DELETE and USER_FLAGS).
-
- char *base_;
- // Pointer to beginning of message payload.
-
- // = Strategies.
- ACE_Allocator *allocator_strategy_;
- // Pointer to the allocator defined for this <ACE_Data_Block>. Note
- // that this pointer is shared by all owners of this
- // <ACE_Data_Block>.
-
- ACE_Lock *locking_strategy_;
- // Pointer to the locking strategy defined for this
- // <ACE_Data_Block>. This is used to protect regions of code that
- // access shared <ACE_Data_Block> state. Note that this lock is
- // shared by all owners of the <ACE_Data_Block>'s data.
-
- int reference_count_;
- // Reference count for this <ACE_Data_Block>, which is used to avoid
- // deep copies (i.e., <clone>). Note that this pointer value is
- // shared by all owners of the <Data_Block>'s data, i.e., all the
- // <ACE_Message_Block>s.
-
- ACE_Allocator *data_block_allocator_;
- // The allocator use to destroy ourselves.
-
-private:
- // = Disallow these operations.
- ACE_Data_Block &operator= (const ACE_Data_Block &);
- ACE_Data_Block (const ACE_Data_Block &);
-};
-
-class ACE_Export ACE_Dynamic_Message_Strategy
-{
- // = TITLE
- // An abstract base class which provides dynamic priority
- // evaluation methods for use by the <ACE_Dynamic_Message_Queue>
- // class or any other class which needs to manage the priorities
- // of a collection of <ACE_Message_Block>s dynamically.
- //
- // = DESCRIPTION
- // Methods for deadline and laxity based priority evaluation are
- // provided. These methods assume a specific partitioning of
- // the message priority number into a higher order dynamic bit
- // field and a lower order static priority bit field. The
- // default partitioning assumes an unsigned dynamic message
- // priority field of 22 bits and an unsigned static message
- // priority field of 10 bits. This corresponds to the initial
- // values of the static class members. To provide a different
- // partitioning, assign a different set of values to the static
- // class memebers before using the static member functions.
-public:
-
- // = Message priority status
-
- // Values are defined as bit flags so that status combinations may
- // be specified easily.
-
- enum Priority_Status
- {
- PENDING = 0x01, // message can still make its deadline
- LATE = 0x02, // message cannot make its deadline
- BEYOND_LATE = 0x04, // message is so late its priority is undefined
- ANY_STATUS = 0x07 // mask to match any priority status
- };
-
- ACE_Dynamic_Message_Strategy (u_long static_bit_field_mask,
- u_long static_bit_field_shift,
- u_long dynamic_priority_max,
- u_long dynamic_priority_offset);
- // ctor
-
- virtual ~ACE_Dynamic_Message_Strategy (void);
- // virtual dtor
-
- Priority_Status priority_status (ACE_Message_Block &mb,
- const ACE_Time_Value &tv);
- // Updates the message's priority and returns its priority status.
-
- u_long static_bit_field_mask (void);
- // Get static bit field mask.
-
- void static_bit_field_mask (u_long);
- // Set static bit field mask.
-
- u_long static_bit_field_shift (void);
- // Get left shift value to make room for static bit field.
-
- void static_bit_field_shift (u_long);
- // Set left shift value to make room for static bit field.
-
- u_long dynamic_priority_max (void);
- // Get maximum supported priority value.
-
- void dynamic_priority_max (u_long);
- // Set maximum supported priority value.
-
- u_long dynamic_priority_offset (void);
- // Get offset to boundary between signed range and unsigned range.
-
- void dynamic_priority_offset (u_long);
- // Set offset to boundary between signed range and unsigned range.
-
- virtual void dump (void) const;
- // Dump the state of the strategy.
-
-protected:
- virtual void convert_priority (ACE_Time_Value &priority,
- const ACE_Message_Block &mb) = 0;
- // Hook method for dynamic priority conversion.
-
- u_long static_bit_field_mask_;
- // This is a bit mask with all ones in the static bit field.
-
- u_long static_bit_field_shift_;
- // This is a left shift value to make room for static bit field:
- // this value should be the logarithm base 2 of
- // (static_bit_field_mask_ + 1).
-
- u_long dynamic_priority_max_;
- // Maximum supported priority value.
-
- u_long dynamic_priority_offset_;
- // Offset to boundary between signed range and unsigned range.
-
- ACE_Time_Value max_late_;
- // Maximum late time value that can be represented.
-
- ACE_Time_Value min_pending_;
- // Minimum pending time value that can be represented.
-
- ACE_Time_Value pending_shift_;
- // Time value by which to shift pending priority.
-};
-
-class ACE_Export ACE_Deadline_Message_Strategy : public ACE_Dynamic_Message_Strategy
-{
- // = TITLE
- // Deadline based message priority strategy.
- //
- // = DESCRIPTION
- // Assigns dynamic message priority according to time to deadline. The
- // message priority is divided into high and low order bit fields. The
- // high order bit field is used for dynamic message priority, which is
- // updated whenever the convert_priority (...) method is called. The
- // low order bit field is used for static message priority and is left
- // unchanged. The partitioning of the priority value into high and low
- // order bit fields is done according to the arguments passed to the
- // strategy object's constructor.
- //
-public:
- ACE_Deadline_Message_Strategy (u_long static_bit_field_mask = 0x3FFUL, // 2^(10) - 1
- u_long static_bit_field_shift = 10, // 10 low order bits
- u_long dynamic_priority_max = 0x3FFFFFUL, // 2^(22)-1
- u_long dynamic_priority_offset = 0x200000UL); // 2^(22-1)
- // Ctor, with all arguments defaulted.
-
- virtual ~ACE_Deadline_Message_Strategy (void);
- // Virtual dtor.
-
- virtual void convert_priority (ACE_Time_Value &priority,
- const ACE_Message_Block &mb);
- // Dynamic priority conversion function based on time to deadline.
-
- virtual void dump (void) const;
- // Dump the state of the strategy.
-};
-
-class ACE_Export ACE_Laxity_Message_Strategy : public ACE_Dynamic_Message_Strategy
-{
- // = TITLE
- // Laxity based message priority strategy.
- //
- // = DESCRIPTION
- // Assigns dynamic message priority according to laxity (time to
- // deadline minus worst case execution time). The message priority is
- // divided into high and low order bit fields. The high order
- // bit field is used for dynamic message priority, which is
- // updated whenever the convert_priority (...) method is called. The
- // low order bit field is used for static message priority and is left
- // unchanged. The partitioning of the priority value into high and low
- // order bit fields is done according to the arguments passed to the
- // strategy object's constructor.
- //
-public:
- ACE_Laxity_Message_Strategy (u_long static_bit_field_mask = 0x3FFUL, // 2^(10) - 1
- u_long static_bit_field_shift = 10, // 10 low order bits
- u_long dynamic_priority_max = 0x3FFFFFUL, // 2^(22)-1
- u_long dynamic_priority_offset = 0x200000UL); // 2^(22-1)
- // Ctor, with all arguments defaulted.
-
- virtual ~ACE_Laxity_Message_Strategy (void);
- // virtual dtor.
-
- virtual void convert_priority (ACE_Time_Value &priority,
- const ACE_Message_Block &mb);
- // Dynamic priority conversion function based on laxity.
-
- virtual void dump (void) const;
- // Dump the state of the strategy.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Message_Block.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Message_Block_T.h"
-#include "ace/post.h"
-#endif /* ACE_MESSAGE_BLOCK_H */
diff --git a/ace/Message_Block.i b/ace/Message_Block.i
deleted file mode 100644
index 829dcc20d35..00000000000
--- a/ace/Message_Block.i
+++ /dev/null
@@ -1,607 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Message_Block.i
-
-ACE_INLINE ACE_Data_Block *
-ACE_Message_Block::data_block (void) const
-{
- ACE_TRACE ("ACE_Message_Block::data_block");
- return this->data_block_;
-}
-
-// This function must comes before ACE_Message_Block::reference_count
-// to avoid a g++ warning.
-ACE_INLINE int
-ACE_Data_Block::reference_count (void) const
-{
- return reference_count_;
-}
-
-ACE_INLINE int
-ACE_Message_Block::reference_count (void) const
-{
- return data_block () ? data_block ()->reference_count () : 0;
-}
-
-ACE_INLINE char *
-ACE_Data_Block::base (void) const
-{
- ACE_TRACE ("ACE_Data_Block::base");
- return this->base_;
-}
-
-ACE_INLINE size_t
-ACE_Data_Block::size (void) const
-{
- ACE_TRACE ("ACE_Data_Block::size");
- return this->cur_size_;
-}
-
-ACE_INLINE size_t
-ACE_Data_Block::capacity (void) const
-{
- ACE_TRACE ("ACE_Data_Block::capacity");
- return this->max_size_;
-}
-
-ACE_INLINE ACE_Message_Block::Message_Flags
-ACE_Data_Block::set_flags (ACE_Message_Block::Message_Flags more_flags)
-{
- ACE_TRACE ("ACE_Data_Block::set_flags");
- // Later we might mask more_glags so that user can't change internal
- // ones: more_flags &= ~(USER_FLAGS -1).
- return ACE_SET_BITS (this->flags_, more_flags);
-}
-
-ACE_INLINE ACE_Message_Block::Message_Flags
-ACE_Data_Block::clr_flags (ACE_Message_Block::Message_Flags less_flags)
-{
- ACE_TRACE ("ACE_Data_Block::clr_flags");
- // Later we might mask more_flags so that user can't change internal
- // ones: less_flags &= ~(USER_FLAGS -1).
- return ACE_CLR_BITS (this->flags_, less_flags);
-}
-
-ACE_INLINE ACE_Message_Block::Message_Flags
-ACE_Data_Block::flags (void) const
-{
- ACE_TRACE ("ACE_Data_Block::flags");
- return this->flags_;
-}
-
-ACE_INLINE ACE_Allocator*
-ACE_Data_Block::data_block_allocator (void) const
-{
- ACE_TRACE ("ACE_Message_Block::data_block_allocator");
- return this->data_block_allocator_;
-}
-
-ACE_INLINE ACE_Message_Block::Message_Flags
-ACE_Message_Block::set_flags (ACE_Message_Block::Message_Flags more_flags)
-{
- ACE_TRACE ("ACE_Message_Block::set_flags");
- return this->data_block ()->set_flags (more_flags);
-}
-
-ACE_INLINE ACE_Message_Block::Message_Flags
-ACE_Message_Block::clr_flags (ACE_Message_Block::Message_Flags less_flags)
-{
- ACE_TRACE ("ACE_Message_Block::clr_flags");
- return this->data_block ()->clr_flags (less_flags);
-}
-
-ACE_INLINE ACE_Message_Block::Message_Flags
-ACE_Message_Block::flags (void) const
-{
- ACE_TRACE ("ACE_Message_Block::flags");
- return this->data_block ()->flags ();
-}
-
-// Return the length of the "active" portion of the message.
-
-ACE_INLINE size_t
-ACE_Message_Block::length (void) const
-{
- ACE_TRACE ("ACE_Message_Block::length");
- return this->wr_ptr_ - this->rd_ptr_;
-}
-
-// Sets the length of the "active" portion of the message. This is
-// defined as the offset from RD_PTR to WR_PTR.
-
-ACE_INLINE void
-ACE_Message_Block::length (size_t len)
-{
- ACE_TRACE ("ACE_Message_Block::length");
- this->wr_ptr_ = this->rd_ptr_ + len;
-}
-
-// Return the length of the potential size of the message.
-
-ACE_INLINE size_t
-ACE_Message_Block::size (void) const
-{
- ACE_TRACE ("ACE_Message_Block::size");
- return this->data_block ()->size ();
-}
-
-ACE_INLINE size_t
-ACE_Message_Block::capacity (void) const
-{
- ACE_TRACE ("ACE_Message_Block::capacity");
- return this->data_block ()->capacity ();
-}
-
-ACE_INLINE ACE_Message_Block::ACE_Message_Type
-ACE_Data_Block::msg_type (void) const
-{
- ACE_TRACE ("ACE_Data_Block::msg_type");
- return this->type_;
-}
-
-ACE_INLINE void
-ACE_Data_Block::msg_type (ACE_Message_Block::ACE_Message_Type t)
-{
- ACE_TRACE ("ACE_Data_Block::msg_type");
- this->type_ = t;
-}
-
-ACE_INLINE ACE_Message_Block::ACE_Message_Type
-ACE_Message_Block::msg_type (void) const
-{
- ACE_TRACE ("ACE_Message_Block::msg_type");
- return this->data_block ()->msg_type ();
-}
-
-ACE_INLINE void
-ACE_Message_Block::msg_type (ACE_Message_Block::ACE_Message_Type t)
-{
- ACE_TRACE ("ACE_Message_Block::msg_type");
- this->data_block ()->msg_type (t);
-}
-
-ACE_INLINE ACE_Message_Block::ACE_Message_Type
-ACE_Message_Block::msg_class (void) const
-{
- ACE_TRACE ("ACE_Message_Block::msg_class");
-
- if (this->msg_type () < ACE_Message_Block::MB_PRIORITY)
- return ACE_Message_Block::MB_NORMAL;
- else if (this->msg_type () < ACE_Message_Block::MB_USER)
- return ACE_Message_Block::MB_PRIORITY;
- else
- return ACE_Message_Block::MB_USER;
-}
-
-ACE_INLINE int
-ACE_Message_Block::is_data_msg (void) const
-{
- ACE_TRACE ("ACE_Message_Block::is_data_msg");
- ACE_Message_Type mt = this->msg_type ();
- return
- mt == ACE_Message_Block::MB_DATA
- || mt == ACE_Message_Block::MB_PROTO
- || mt == ACE_Message_Block::MB_PCPROTO;
-}
-
-ACE_INLINE u_long
-ACE_Message_Block::msg_priority (void) const
-{
- ACE_TRACE ("ACE_Message_Block::msg_priority");
- return this->priority_;
-}
-
-ACE_INLINE void
-ACE_Message_Block::msg_priority (u_long pri)
-{
- ACE_TRACE ("ACE_Message_Block::msg_priority");
- this->priority_ = pri;
-}
-
-ACE_INLINE const ACE_Time_Value &
-ACE_Message_Block::msg_execution_time (void) const
-{
- ACE_TRACE ("ACE_Message_Block::msg_execution_time (void)");
-#if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS)
- return this->execution_time_;
-#else
- return ACE_Time_Value::zero;
-#endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */
-}
-
-ACE_INLINE void
-ACE_Message_Block::msg_execution_time (const ACE_Time_Value &et)
-{
- ACE_TRACE ("ACE_Message_Block::msg_execution_time (const ACE_Time_Value & et)");
-#if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS)
- this->execution_time_ = et;
-#else
- ACE_UNUSED_ARG (et);
-#endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */
-}
-
-ACE_INLINE const ACE_Time_Value &
-ACE_Message_Block::msg_deadline_time (void) const
-{
- ACE_TRACE ("ACE_Message_Block::msg_deadline_time (void)");
-
-#if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS)
- return this->deadline_time_;
-#else
- return ACE_Time_Value::max_time; // absolute time of deadline
-#endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */
-}
-
-ACE_INLINE void
-ACE_Message_Block::msg_deadline_time (const ACE_Time_Value &dt)
-{
- ACE_TRACE ("ACE_Message_Block::msg_deadline_time (const ACE_Time_Value & et)");
-#if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS)
- this->deadline_time_ = dt;
-#else
- ACE_UNUSED_ARG (dt);
-#endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */
-}
-
-ACE_INLINE char *
-ACE_Message_Block::base (void) const
-{
- ACE_TRACE ("ACE_Message_Block::base");
- return this->data_block ()->base ();
-}
-
-ACE_INLINE void
-ACE_Message_Block::base (char *msg_data,
- size_t msg_length,
- Message_Flags msg_flags)
-{
- ACE_TRACE ("ACE_Message_Block::base");
- this->rd_ptr_ = 0;
- this->wr_ptr_ = 0;
- this->data_block ()->base (msg_data, msg_length, msg_flags);
-}
-
-ACE_INLINE char *
-ACE_Message_Block::rd_ptr (void) const
-{
- ACE_TRACE ("ACE_Message_Block::rd_ptr");
- return this->base () + this->rd_ptr_;
-}
-
-ACE_INLINE void
-ACE_Message_Block::wr_ptr (char *new_ptr)
-{
- ACE_TRACE ("ACE_Message_Block::wr_ptr");
- this->wr_ptr_ = new_ptr - this->base ();
-}
-
-// Return a pointer to 1 past the end of the data buffer.
-
-ACE_INLINE char *
-ACE_Data_Block::mark (void) const
-{
- ACE_TRACE ("ACE_Data_Block::mark");
- return this->base_ + this->cur_size_;
-}
-
-ACE_INLINE char *
-ACE_Message_Block::mark (void) const
-{
- ACE_TRACE ("ACE_Message_Block::mark");
- return this->data_block ()->mark ();
-}
-
-ACE_INLINE char *
-ACE_Data_Block::end (void) const
-{
- ACE_TRACE ("ACE_Data_Block::end");
- return this->base_ + this->max_size_;
-}
-
-ACE_INLINE char *
-ACE_Message_Block::end (void) const
-{
- ACE_TRACE ("ACE_Message_Block::end");
- return this->data_block ()->end ();
-}
-
-
-ACE_INLINE void
-ACE_Message_Block::rd_ptr (char *new_ptr)
-{
- ACE_TRACE ("ACE_Message_Block::rd_ptr");
- this->rd_ptr_ = new_ptr - this->base ();
-}
-
-ACE_INLINE void
-ACE_Message_Block::rd_ptr (size_t n)
-{
- ACE_TRACE ("ACE_Message_Block::rd_ptr");
- this->rd_ptr_ += n;
-}
-
-ACE_INLINE char *
-ACE_Message_Block::wr_ptr (void) const
-{
- ACE_TRACE ("ACE_Message_Block::wr_ptr");
- return this->base () + this->wr_ptr_;
-}
-
-ACE_INLINE void
-ACE_Message_Block::wr_ptr (size_t n)
-{
- ACE_TRACE ("ACE_Message_Block::wr_ptr");
- this->wr_ptr_ += n;
-}
-
-ACE_INLINE void
-ACE_Message_Block::reset (void)
-{
- ACE_TRACE ("ACE_Message_Block::reset");
- this->rd_ptr_ = 0;
- this->wr_ptr_ = 0;
-}
-
-ACE_INLINE size_t
-ACE_Message_Block::space (void) const
-{
- ACE_TRACE ("ACE_Message_Block::space");
- return this->mark () - this->wr_ptr ();
-}
-
-ACE_INLINE ACE_Data_Block *
-ACE_Message_Block::replace_data_block (ACE_Data_Block *db)
-{
- ACE_TRACE ("ACE_Message_Block::replace_data_block");
- ACE_Data_Block *old = this->data_block_;
- this->data_block_ = db;
-
- if (db != 0)
- {
- // Set the read and write pointers in the <Message_Block> to point
- // to the buffer in the <ACE_Data_Block>.
- this->rd_ptr (this->data_block ()->base ());
- this->wr_ptr (this->data_block ()->base ());
- }
-
- return old;
-}
-
-ACE_INLINE void
-ACE_Message_Block::cont (ACE_Message_Block *cont_msg)
-{
- ACE_TRACE ("ACE_Message_Block::cont");
- this->cont_ = cont_msg;
-}
-
-ACE_INLINE ACE_Message_Block *
-ACE_Message_Block::cont (void) const
-{
- ACE_TRACE ("ACE_Message_Block::cont");
- return this->cont_;
-}
-
-ACE_INLINE void
-ACE_Message_Block::next (ACE_Message_Block *next_msg)
-{
- ACE_TRACE ("ACE_Message_Block::next");
- this->next_ = next_msg;
-}
-
-ACE_INLINE ACE_Message_Block *
-ACE_Message_Block::next (void) const
-{
- ACE_TRACE ("ACE_Message_Block::next");
- return this->next_;
-}
-
-ACE_INLINE void
-ACE_Message_Block::prev (ACE_Message_Block *next_msg)
-{
- ACE_TRACE ("ACE_Message_Block::prev");
- this->prev_ = next_msg;
-}
-
-ACE_INLINE ACE_Message_Block *
-ACE_Message_Block::prev (void) const
-{
- ACE_TRACE ("ACE_Message_Block::prev");
- return this->prev_;
-}
-
-ACE_INLINE ACE_Allocator *
-ACE_Data_Block::allocator_strategy (void) const
-{
- ACE_TRACE ("ACE_Data_Block::allocator_strategy");
- return this->allocator_strategy_;
-}
-
-ACE_INLINE ACE_Lock *
-ACE_Data_Block::locking_strategy (void)
-{
- ACE_TRACE ("ACE_Data_Block::locking_strategy");
- return this->locking_strategy_;
-}
-
-ACE_INLINE ACE_Lock *
-ACE_Data_Block::locking_strategy (ACE_Lock *nls)
-{
- ACE_TRACE ("ACE_Data_Block::locking_strategy");
- ACE_Lock *ols = this->locking_strategy_;
-
- this->locking_strategy_ = nls;
- return ols;
-}
-
-ACE_INLINE ACE_Lock *
-ACE_Message_Block::locking_strategy (void)
-{
- ACE_TRACE ("ACE_Message_Block::locking_strategy");
- return this->data_block ()->locking_strategy ();
-}
-
-ACE_INLINE ACE_Lock *
-ACE_Message_Block::locking_strategy (ACE_Lock *nls)
-{
- ACE_TRACE ("ACE_Message_Block::locking_strategy");
- ACE_Lock *ols = this->data_block ()->locking_strategy ();
- this->data_block ()->locking_strategy (nls);
- return ols;
-}
-
-
-////////////////////////////////////////
-// class ACE_Dynamic_Message_Strategy //
-////////////////////////////////////////
-
-ACE_INLINE u_long
-ACE_Dynamic_Message_Strategy::static_bit_field_mask (void)
-{
- return static_bit_field_mask_;
-}
- // get static bit field mask
-
-ACE_INLINE void
-ACE_Dynamic_Message_Strategy::static_bit_field_mask (u_long ul)
-{
- static_bit_field_mask_ = ul;
-}
- // set static bit field mask
-
-ACE_INLINE u_long
-ACE_Dynamic_Message_Strategy::static_bit_field_shift (void)
-{
- return static_bit_field_shift_;
-}
- // get left shift value to make room for static bit field
-
-ACE_INLINE void
-ACE_Dynamic_Message_Strategy::static_bit_field_shift (u_long ul)
-{
- static_bit_field_shift_ = ul;
-}
- // set left shift value to make room for static bit field
-
-ACE_INLINE u_long
-ACE_Dynamic_Message_Strategy::dynamic_priority_max (void)
-{
- return dynamic_priority_max_;
-}
- // get maximum supported priority value
-
-ACE_INLINE void
-ACE_Dynamic_Message_Strategy::dynamic_priority_max (u_long ul)
-{
- // pending_shift_ depends on dynamic_priority_max_: for performance
- // reasons, the value in pending_shift_ is (re)calculated only when
- // dynamic_priority_max_ is initialized or changes, and is stored
- // as a class member rather than being a derived value.
- dynamic_priority_max_ = ul;
- pending_shift_ = ACE_Time_Value (0, ul);
-}
- // set maximum supported priority value
-
-ACE_INLINE u_long
-ACE_Dynamic_Message_Strategy::dynamic_priority_offset (void)
-{
- return dynamic_priority_offset_;
-}
- // get offset for boundary between signed range and unsigned range
-
-ACE_INLINE void
-ACE_Dynamic_Message_Strategy::dynamic_priority_offset (u_long ul)
-{
-
-
- // max_late_ and min_pending_ depend on dynamic_priority_offset_: for
- // performance reasons, the values in max_late_ and min_pending_ are
- // (re)calculated only when dynamic_priority_offset_ is initialized
- // or changes, and are stored as a class member rather than being
- // derived each time one of their values is needed.
- dynamic_priority_offset_ = ul;
- max_late_ = ACE_Time_Value (0, ul - 1);
- min_pending_ = ACE_Time_Value (0, ul);
-}
- // set offset for boundary between signed range and unsigned range
-
-
-ACE_INLINE ACE_Dynamic_Message_Strategy::Priority_Status
-ACE_Dynamic_Message_Strategy::priority_status (ACE_Message_Block & mb,
- const ACE_Time_Value & tv)
-{
- // default the message to have pending priority status
- Priority_Status status = ACE_Dynamic_Message_Strategy::PENDING;
-
- // start with the passed absolute time as the message's priority, then
- // call the polymorphic hook method to (at least partially) convert
- // the absolute time and message attributes into the message's priority
- ACE_Time_Value priority (tv);
- convert_priority (priority, mb);
-
- // if the priority is negative, the message is pending
- if (priority < ACE_Time_Value::zero)
- {
- // priority for pending messages must be shifted
- // upward above the late priority range
- priority += pending_shift_;
- if (priority < min_pending_)
- {
- priority = min_pending_;
- }
- }
- // otherwise, if the priority is greater than the maximum late
- // priority value that can be represented, it is beyond late
- else if (priority > max_late_)
- {
- // all messages that are beyond late are assigned lowest priority (zero)
- mb.msg_priority (0);
- return ACE_Dynamic_Message_Strategy::BEYOND_LATE;
- }
- // otherwise, the message is late, but its priority is correct
- else
- {
- status = ACE_Dynamic_Message_Strategy::LATE;
- }
-
- // use (fast) bitwise operators to isolate and replace
- // the dynamic portion of the message's priority
- mb.msg_priority((mb.msg_priority() & static_bit_field_mask_) |
- ((priority.usec () + ACE_ONE_SECOND_IN_USECS * priority.sec ()) <<
- static_bit_field_shift_));
-
- return status;
-}
- // returns the priority status of the message
-
-
-
-/////////////////////////////////////////
-// class ACE_Deadline_Message_Strategy //
-/////////////////////////////////////////
-
-ACE_INLINE void
-ACE_Deadline_Message_Strategy::convert_priority (ACE_Time_Value & priority,
- const ACE_Message_Block & mb)
-{
- // Convert absolute time passed in tv to negative time
- // to deadline of mb with respect to that absolute time.
- priority -= mb.msg_deadline_time ();
-}
- // dynamic priority conversion function based on time to deadline
-
-
-///////////////////////////////////////
-// class ACE_Laxity_Message_Strategy //
-///////////////////////////////////////
-
-ACE_INLINE void
-ACE_Laxity_Message_Strategy::convert_priority (ACE_Time_Value & priority,
- const ACE_Message_Block & mb)
-{
- // Convert absolute time passed in tv to negative
- // laxity of mb with respect to that absolute time.
- priority += mb.msg_execution_time ();
- priority -= mb.msg_deadline_time ();
-}
- // dynamic priority conversion function based on laxity
diff --git a/ace/Message_Block_T.cpp b/ace/Message_Block_T.cpp
deleted file mode 100644
index 0ce56b7ef41..00000000000
--- a/ace/Message_Block_T.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// $Id$
-
-#if !defined (ACE_MESSAGE_BLOCK_T_C)
-#define ACE_MESSAGE_BLOCK_T_C
-
-#include "ace/Message_Block_T.h"
-
-ACE_RCSID(ace, Message_Block_T, "$Id$")
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Message_Block_T.i"
-#endif /* __ACE_INLINE__ */
-
-template<class ACE_LOCK>
-ACE_Locked_Data_Block<ACE_LOCK>::~ACE_Locked_Data_Block (void)
-{
-}
-
-template<class L> ACE_Data_Block *
-ACE_Locked_Data_Block<L>::clone_nocopy (ACE_Message_Block::Message_Flags mask) const
-{
- ACE_TRACE ("ACE_Data_Block::clone");
-
- // You always want to clear this one to prevent memory leaks but you
- // might add some others later.
- const ACE_Message_Block::Message_Flags always_clear =
- ACE_Message_Block::DONT_DELETE;
-
- ACE_Locked_Data_Block<L> *nb;
-
- ACE_NEW_MALLOC_RETURN (nb,
- ACE_static_cast(ACE_Locked_Data_Block<L>*,
- this->data_block_allocator ()->malloc (sizeof (ACE_Locked_Data_Block<L>))),
- ACE_Locked_Data_Block<L> (this->size (),
- this->msg_type (),
- 0,
- this->allocator_strategy (),
- this->flags (),
- this->data_block_allocator ()),
- 0);
-
- // Set new flags minus the mask...
- nb->clr_flags (mask | always_clear);
- return nb;
-}
-
-#endif /* ACE_MESSAGE_BLOCK_T_C */
diff --git a/ace/Message_Block_T.h b/ace/Message_Block_T.h
deleted file mode 100644
index 1aee946e693..00000000000
--- a/ace/Message_Block_T.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Message_Block_T.h
-//
-// = AUTHOR
-// Doug Schmidt & Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef ACE_MESSAGE_BLOCK_T_H
-#define ACE_MESSAGE_BLOCK_T_H
-#include "ace/pre.h"
-
-#include "ace/Message_Block.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class ACE_LOCK>
-class ACE_Locked_Data_Block : public ACE_Data_Block
-{
- // = TITLE
- // A Data_Block with a concrete locking strategy.
- //
- // = DESCRIPTION
- // Data_Blocks can be parametric on the kind of lock they use; in
- // many cases the lifetime of the lock is tied to the lifetime of
- // the Data_Block itself. But since Data_Blocks are reference
- // counted it is hard for users to control the lock lifetime.
- // This class is parametric over the kind of lock used.
- //
-public:
- // = Initialization and termination methods.
- ACE_Locked_Data_Block (void);
- // Default "do-nothing" constructor.
-
- ACE_Locked_Data_Block (size_t size,
- ACE_Message_Block::ACE_Message_Type msg_type,
- const char *msg_data,
- ACE_Allocator *allocator_strategy,
- ACE_Message_Block::Message_Flags flags,
- ACE_Allocator *data_block_allocator);
- // Initialize.
-
- virtual ~ACE_Locked_Data_Block (void);
- // Delete all the resources held in the message.
-
- virtual ACE_Data_Block *clone_nocopy (ACE_Message_Block::Message_Flags mask = 0) const;
- // Return an exact "deep copy" of the message, the dynamic type is
- // ACE_Locked_Data_Block<>
- // See the documentation in Message_Block.h for details.
-
-private:
- ACE_LOCK lock_;
- // The lock
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (ACE_Locked_Data_Block<ACE_LOCK> &operator= (const ACE_Locked_Data_Block<ACE_LOCK> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Locked_Data_Block (const ACE_Locked_Data_Block<ACE_LOCK> &))
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Message_Block_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Message_Block_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Message_Block_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_MESSAGE_BLOCK_T_H */
diff --git a/ace/Message_Block_T.i b/ace/Message_Block_T.i
deleted file mode 100644
index 279dcaa704d..00000000000
--- a/ace/Message_Block_T.i
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Message_Block_T.i
-
-
-template<class ACE_LOCK> ACE_INLINE
-ACE_Locked_Data_Block<ACE_LOCK>::ACE_Locked_Data_Block (void)
-{
- this->locking_strategy_ = &this->lock_;
-}
-
-template<class ACE_LOCK> ACE_INLINE
-ACE_Locked_Data_Block<ACE_LOCK>::
-ACE_Locked_Data_Block (size_t size,
- ACE_Message_Block::ACE_Message_Type msg_type,
- const char *msg_data,
- ACE_Allocator *allocator_strategy,
- ACE_Message_Block::Message_Flags flags,
- ACE_Allocator *data_block_allocator)
- : ACE_Data_Block (size,
- msg_type,
- msg_data,
- allocator_strategy,
- &lock_,
- flags,
- data_block_allocator)
-{
-}
diff --git a/ace/Message_Queue.cpp b/ace/Message_Queue.cpp
deleted file mode 100644
index 95897147a25..00000000000
--- a/ace/Message_Queue.cpp
+++ /dev/null
@@ -1,442 +0,0 @@
-// $Id$
-
-#if !defined (ACE_MESSAGE_QUEUE_C)
-#define ACE_MESSAGE_QUEUE_C
-
-#include "ace/Message_Queue.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Message_Queue.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Message_Queue, "$Id$")
-
-#if defined (VXWORKS)
-
-////////////////////////////////
-// class ACE_Message_Queue_Vx //
-////////////////////////////////
-
-void
-ACE_Message_Queue_Vx::dump (void) const
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("deactivated = %d\n")
- ACE_TEXT ("low_water_mark = %d\n")
- ACE_TEXT ("high_water_mark = %d\n")
- ACE_TEXT ("cur_bytes = %d\n")
- ACE_TEXT ("cur_length = %d\n")
- ACE_TEXT ("cur_count = %d\n")
- ACE_TEXT ("head_ = %u\n")
- ACE_TEXT ("MSG_Q_ID = %u\n"),
- this->deactivated_,
- this->low_water_mark_,
- this->high_water_mark_,
- this->cur_bytes_,
- this->cur_length_,
- this->cur_count_,
- this->head_,
- this->tail_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Message_Queue_Vx::ACE_Message_Queue_Vx (size_t max_messages,
- size_t max_message_length,
- ACE_Notification_Strategy *ns)
- : ACE_Message_Queue<ACE_NULL_SYNCH> (0, 0, ns),
- max_messages_ (ACE_static_cast (int, max_messages)),
- max_message_length_ (ACE_static_cast (int, max_message_length))
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::ACE_Message_Queue_Vx");
-
- if (this->open (max_messages_, max_message_length_, ns) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("open")));
-}
-
-ACE_Message_Queue_Vx::~ACE_Message_Queue_Vx (void)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::~ACE_Message_Queue_Vx");
-
- if (this->tail_ != 0 && this->close () == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("close")));
-}
-
-// Don't bother locking since if someone calls this function more than
-// once for the same queue, we're in bigger trouble than just
-// concurrency control!
-
-int
-ACE_Message_Queue_Vx::open (size_t max_messages,
- size_t max_message_length,
- ACE_Notification_Strategy *ns)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::open");
- this->high_water_mark_ = 0;
- this->low_water_mark_ = 0;
- this->deactivated_ = 0;
- this->cur_bytes_ = 0;
- this->cur_length_ = 0;
- this->cur_count_ = 0;
- this->head_ = 0;
- this->notification_strategy_ = ns;
- this->max_messages_ = ACE_static_cast (int, max_messages);
- this->max_message_length_ = ACE_static_cast (int, max_message_length);
-
- if (tail_)
- {
- // Had already created a msgQ, so delete it.
- close ();
- activate_i ();
- }
-
- return (this->tail_ =
- ACE_reinterpret_cast (ACE_Message_Block *,
- ::msgQCreate (max_messages_,
- max_message_length_,
- MSG_Q_FIFO))) == NULL ? -1 : 0;
-}
-
-// Implementation of the public deactivate() method
-// (assumes locks are held).
-
-int
-ACE_Message_Queue_Vx::deactivate_i (void)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::deactivate_i");
-
- int current_status =
- this->deactivated_ ? WAS_INACTIVE : WAS_ACTIVE;
-
- this->deactivated_ = 1;
-
- return current_status;
-}
-
-int
-ACE_Message_Queue_Vx::activate_i (void)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::activate_i");
- int current_status =
- this->deactivated_ ? WAS_INACTIVE : WAS_ACTIVE;
- this->deactivated_ = 0;
- return current_status;
-}
-
-// Clean up the queue if we have not already done so!
-
-int
-ACE_Message_Queue_Vx::close (void)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::close");
- // Don't lock, because we don't have a lock. It shouldn't be
- // necessary, anyways.
-
- this->deactivate_i ();
-
- // Don't bother to free up the remaining message on the list,
- // because we don't have any way to iterate over what's in the
- // queue.
-
- return ::msgQDelete (msgq ());
-}
-
-int
-ACE_Message_Queue_Vx::signal_enqueue_waiters (void)
-{
- // No-op.
- return 0;
-}
-
-int
-ACE_Message_Queue_Vx::signal_dequeue_waiters (void)
-{
- // No-op.
- return 0;
-}
-
-int
-ACE_Message_Queue_Vx::enqueue_tail_i (ACE_Message_Block *new_item)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::enqueue_tail_i");
-
- if (new_item == 0)
- return -1;
-
- // Don't try to send a composite message!!!! Only the first
- // block will be sent.
-
- this->cur_count_++;
-
- // Always use this method to actually send a message on the queue.
- if (::msgQSend (msgq (),
- new_item->rd_ptr (),
- new_item->size (),
- WAIT_FOREVER,
- MSG_PRI_NORMAL) == OK)
- return ::msgQNumMsgs (msgq ());
- else
- return -1;
-}
-
-int
-ACE_Message_Queue_Vx::enqueue_head_i (ACE_Message_Block *new_item)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::enqueue_head_i");
-
- // Just delegate to enqueue_tail_i.
- return enqueue_tail_i (new_item);
-}
-
-int
-ACE_Message_Queue_Vx::enqueue_i (ACE_Message_Block *new_item)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::enqueue_i");
-
- if (new_item == 0)
- return -1;
-
- if (this->head_ == 0)
- // Should always take this branch.
- return this->enqueue_head_i (new_item);
- else
- ACE_NOTSUP_RETURN (-1);
-}
-
-// Actually get the first ACE_Message_Block (no locking, so must be
-// called with locks held). This method assumes that the queue has at
-// least one item in it when it is called.
-
-int
-ACE_Message_Queue_Vx::dequeue_head_i (ACE_Message_Block *&first_item)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::dequeue_head_i");
-
- // We don't allocate a new Message_Block: the caller must provide
- // it, and must ensure that it is big enough (without chaining).
-
- if (first_item == 0 || first_item->wr_ptr () == 0)
- return -1;
-
- if (::msgQReceive (msgq (),
- first_item->wr_ptr (),
- first_item->size (),
- WAIT_FOREVER) == ERROR)
- return -1;
- else
- return ::msgQNumMsgs (msgq ());
-}
-
-// Take a look at the first item without removing it.
-
-int
-ACE_Message_Queue_Vx::wait_not_full_cond (ACE_Guard<ACE_Null_Mutex> &mon,
- ACE_Time_Value *tv)
-{
- // Always return here, and let the VxWorks message queue handle blocking.
- ACE_UNUSED_ARG (mon);
- ACE_UNUSED_ARG (tv);
-
- return 0;
-}
-
-int
-ACE_Message_Queue_Vx::wait_not_empty_cond (ACE_Guard<ACE_Null_Mutex> &mon,
- ACE_Time_Value *tv)
-{
- // Always return here, and let the VxWorks message queue handle blocking.
- ACE_UNUSED_ARG (mon);
- ACE_UNUSED_ARG (tv);
-
- return 0;
-}
-
-#if ! defined (ACE_NEEDS_FUNC_DEFINITIONS)
-int
-ACE_Message_Queue_Vx::peek_dequeue_head (ACE_Message_Block *&,
- ACE_Time_Value *tv)
-{
- ACE_UNUSED_ARG (tv);
- ACE_NOTSUP_RETURN (-1);
-}
-#endif /* ! ACE_NEEDS_FUNC_DEFINITIONS */
-
-#endif /* VXWORKS */
-
-#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
-
-ACE_Message_Queue_NT::ACE_Message_Queue_NT (size_t max_threads)
- : max_cthrs_ (max_threads),
- cur_thrs_ (0),
- cur_bytes_ (0),
- cur_length_ (0),
- cur_count_ (0),
- deactivated_ (0),
- completion_port_ (ACE_INVALID_HANDLE)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::ACE_Message_Queue_NT");
- this->open (max_threads);
-}
-
-int
-ACE_Message_Queue_NT::open (size_t max_threads)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::open");
- this->max_cthrs_ = max_threads;
- this->completion_port_ = ::CreateIoCompletionPort (ACE_INVALID_HANDLE,
- NULL,
- ACE_Message_Queue_Base::WAS_ACTIVE,
- max_threads);
- return (this->completion_port_ == NULL ? -1 : 0);
-}
-
-int
-ACE_Message_Queue_NT::close (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::close");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
- this->deactivate ();
- return (::CloseHandle (this->completion_port_) ? 0 : -1 );
-}
-
-ACE_Message_Queue_NT::~ACE_Message_Queue_NT (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::~ACE_Message_Queue_NT");
- this->close ();
-}
-
-int
-ACE_Message_Queue_NT::enqueue (ACE_Message_Block *new_item,
- ACE_Time_Value *)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::enqueue");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
- if (!this->deactivated_)
- {
- size_t msize = new_item->total_size ();
- size_t mlength = new_item->total_length ();
- if (::PostQueuedCompletionStatus (this->completion_port_,
- msize,
- this->deactivated_,
- ACE_reinterpret_cast (LPOVERLAPPED, new_item)))
- {
- // Update the states once I succeed.
- this->cur_bytes_ += msize;
- this->cur_length_ += mlength;
- return ++this->cur_count_;
- }
- }
- else
- errno = ESHUTDOWN;
-
- // Fail to enqueue the message.
- return -1;
-}
-
-int
-ACE_Message_Queue_NT::dequeue (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::dequeue_head");
-
- {
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
- if (this->deactivated_) // Make sure the MQ is not deactivated before
- { // I proceed.
- errno = ESHUTDOWN; // Operation on deactivated MQ not allowed.
- return -1;
- }
- else
- ++this->cur_thrs_; // Increase the waiting thread count.
- }
-
- DWORD shutdown;
- DWORD msize;
- // Get a message from the completion port.
- int retv = ::GetQueuedCompletionStatus (this->completion_port_,
- &msize,
- &shutdown,
- ACE_reinterpret_cast (LPOVERLAPPED *, &first_item),
- (timeout == 0 ? INFINITE : timeout->msec ()));
- {
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
- --this->cur_thrs_; // Decrease waiting thread count.
- if (retv)
- {
- if (!shutdown)
- { // Really get a valid MB from the queue.
- --this->cur_count_;
- this->cur_bytes_ -= msize;
- this->cur_length_ -= first_item->total_length ();
- return this->cur_count_;
- }
- else // I am woken up by deactivate ().
- errno = ESHUTDOWN;
- }
- }
- return -1;
-}
-
-int
-ACE_Message_Queue_NT::deactivate (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::deactivate");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
-
- if (this->deactivated_) // Check if I have been deactivated already.
- return ACE_Message_Queue_Base::WAS_INACTIVE;
-
- this->deactivated_ = 1;
-
- // Get the number of shutdown messages necessary to wake up
- // all waiting threads.
-
- for (size_t cntr = this->cur_thrs_ - this->cur_count_;
- cntr > 0; cntr++)
- ::PostQueuedCompletionStatus (this->completion_port_,
- 0,
- this->deactivated_,
- NULL);
- return ACE_Message_Queue_Base::WAS_ACTIVE;
-}
-
-int
-ACE_Message_Queue_NT::activate (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::activate");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
- if (!this->deactivated_)
- return ACE_Message_Queue_Base::WAS_ACTIVE;
-
- this->deactivated_ = 0;
- return ACE_Message_Queue_Base::WAS_INACTIVE;
-}
-
-void
-ACE_Message_Queue_NT::dump (void) const
-{
- ACE_TRACE ("ACE_Message_Queue_NT::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("deactivated = %d\n")
- ACE_TEXT ("max_cthrs_ = %d\n")
- ACE_TEXT ("cur_thrs_ = %d\n")
- ACE_TEXT ("cur_bytes = %d\n")
- ACE_TEXT ("cur_length = %d\n")
- ACE_TEXT ("cur_count = %d\n")
- ACE_TEXT ("completion_port_ = %x\n"),
- this->deactivated_,
- this->max_cthrs_,
- this->cur_thrs_,
- this->cur_bytes_,
- this->cur_length_,
- this->cur_count_,
- this->completion_port_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
-
-#endif /* ACE_MESSAGE_QUEUE_C */
diff --git a/ace/Message_Queue.h b/ace/Message_Queue.h
deleted file mode 100644
index 7d1df9e0ec3..00000000000
--- a/ace/Message_Queue.h
+++ /dev/null
@@ -1,476 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Message_Queue.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_MESSAGE_QUEUE_H
-#define ACE_MESSAGE_QUEUE_H
-#include "ace/pre.h"
-
-#include "ace/Message_Block.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/IO_Cntl_Msg.h"
-
-// Forward decls.
-class ACE_Notification_Strategy;
-template <ACE_SYNCH_DECL> class ACE_Message_Queue_Iterator;
-template <ACE_SYNCH_DECL> class ACE_Message_Queue_Reverse_Iterator;
-
-class ACE_Export ACE_Message_Queue_Base
-{
- // = TITLE
- // Workaround HP/C++ compiler bug with enums in templates.
- //
- // = DESCRIPTION
- // The ever lamest HP/C++ compiler seems to fail if enums are
- // defined inside a template, hence we have to move them into a
- // base class.
-public:
- // = Default high and low water marks.
- enum
- {
- DEFAULT_HWM = 16 * 1024,
- // Default high watermark (16 K).
- DEFAULT_LWM = 16 * 1024,
- // Default low watermark (same as high water mark).
- WAS_ACTIVE = 1,
- // Message queue was active before <activate> or <deactivate>.
- WAS_INACTIVE = 2
- // Message queue was inactive before <activate> or <deactivate>.
- };
-
- ACE_Message_Queue_Base (void);
-
- virtual int close (void) = 0;
- // Close down the message queue and release all resources.
-
- virtual ~ACE_Message_Queue_Base (void);
- // Close down the message queue and release all resources.
-
- // = Enqueue and dequeue methods.
-
- // For the following enqueue and dequeue methods, the caller will
- // block until action is possible if <timeout> == 0. Otherwise, it
- // will wait until the absolute time specified in *<timeout>
- // elapses. These calls will -1 when queue is closed, deactivated
- // (in which case <errno> == <ESHUTDOWN>), when a signal occurs (in
- // which case <errno> == <EINTR>, or if the time specified in
- // timeout elapses (in which case <errno> == <EWOULDBLOCK>).
-
- virtual int enqueue_tail (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout = 0) = 0;
- // Enqueue a <ACE_Message_Block *> into the tail of the queue.
- // Returns number of items in queue if the call succeeds or -1
- // otherwise.
- virtual int enqueue (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout = 0) = 0;
- // Enqueue a <ACE_Message_Block *> into the tail of the queue.
- // Returns number of items in queue if the call succeeds or -1
- // otherwise.
-
- virtual int dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout = 0) = 0;
- // Dequeue and return the <ACE_Message_Block *> at the head of the
- // queue. Returns number of items in queue if the call succeeds or
- // -1 otherwise.
- virtual int dequeue (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout = 0) = 0;
- // Dequeue and return the <ACE_Message_Block *> at the head of the
- // queue. Returns number of items in queue if the call succeeds or
- // -1 otherwise.
-
- // = Check if queue is full/empty.
- virtual int is_full (void) = 0;
- // True if queue is full, else false.
- virtual int is_empty (void) = 0;
- // True if queue is empty, else false.
-
- // = Queue statistic methods.
- virtual size_t message_bytes (void) = 0;
- // Number of total bytes on the queue, i.e., sum of the message
- // block sizes.
- virtual size_t message_length (void) = 0;
- // Number of total length on the queue, i.e., sum of the message
- // block lengths.
- virtual size_t message_count (void) = 0;
- // Number of total messages on the queue.
-
- // = Manual changes to these stats (used when queued message blocks
- // change size or lengths).
- virtual void message_bytes (size_t new_size) = 0;
- // New value of the number of total bytes on the queue, i.e., sum of
- // the message block sizes.
- virtual void message_length (size_t new_length) = 0;
- // New value of the number of total length on the queue, i.e., sum
- // of the message block lengths.
-
- // = Activation control methods.
-
- virtual int deactivate (void) = 0;
- // Deactivate the queue and wakeup all threads waiting on the queue
- // so they can continue. No messages are removed from the queue,
- // however. Any other operations called until the queue is
- // activated again will immediately return -1 with <errno> ==
- // ESHUTDOWN. Returns WAS_INACTIVE if queue was inactive before the
- // call and WAS_ACTIVE if queue was active before the call.
-
- virtual int activate (void) = 0;
- // Reactivate the queue so that threads can enqueue and dequeue
- // messages again. Returns WAS_INACTIVE if queue was inactive
- // before the call and WAS_ACTIVE if queue was active before the
- // call.
-
- virtual int deactivated (void) = 0;
- // Returns true if <deactivated_> is enabled.
-
- // = Notification hook.
-
- virtual void dump (void) const = 0;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Message_Queue_Base &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Message_Queue_Base (const ACE_Message_Queue_Base &))
-};
-
-// Include the templates here.
-#include "ace/Message_Queue_T.h"
-
-// This typedef is used to get around a compiler bug in g++/vxworks.
-typedef ACE_Message_Queue<ACE_SYNCH> ACE_DEFAULT_MESSAGE_QUEUE_TYPE;
-
-#if defined (VXWORKS)
-# include /**/ <msgQLib.h>
-
-class ACE_Message_Queue_Vx : public ACE_Message_Queue<ACE_NULL_SYNCH>
-{
- // = TITLE
- // Wrapper for VxWorks message queues.
- //
- // = DESCRIPTION
- // Specialization of ACE_Message_Queue to simply wrap VxWorks
- // MsgQ. It does not use any synchronization, because it relies
- // on the native MsgQ implementation to take care of that. The
- // only system calls that it uses are VxWorks msgQLib calls, so
- // it is suitable for use in interrupt service routines.
- //
- // NOTE: *Many* ACE_Message_Queue features are not supported with
- // this specialization, including:
- // * The two size arguments to the constructor and <open> are
- // interpreted differently. The first is interpreted as the
- // maximum number of bytes in a message. The second is
- // interpreted as the maximum number of messages that can be
- // queued.
- // * <dequeue_head> *requires* that the ACE_Message_Block
- // pointer argument point to an ACE_Message_Block that was
- // allocated by the caller. It must be big enough to support
- // the received message, without using continutation. The
- // pointer argument is not modified.
- // * Message priority. MSG_Q_FIFO is hard-coded.
- // * enqueue method timeouts.
- // * <peek_dequeue_head>.
- // * <ACE_Message_Queue_Iterators>.
- // * The ability to change low and high water marks after creation.
- // * <Message_Block> chains. The continuation field of <ACE_Message_Block>
- // * is ignored; only the first block of a fragment chain is
- // * recognized.
-public:
- // = Initialization and termination methods.
- ACE_Message_Queue_Vx (size_t max_messages,
- size_t max_message_length,
- ACE_Notification_Strategy * = 0);
-
- // Create a message queue with all the defaults.
- virtual int open (size_t max_messages,
- size_t max_message_length,
- ACE_Notification_Strategy * = 0);
- // Create a message queue with all the defaults.
-
- virtual int close (void);
- // Close down the message queue and release all resources.
-
- virtual ~ACE_Message_Queue_Vx (void);
- // Close down the message queue and release all resources.
-
- // = Queue statistic methods.
- virtual size_t message_bytes (void);
- // Number of total bytes on the queue, i.e., sum of the message
- // block sizes.
- virtual size_t message_length (void);
- // Number of total length on the queue, i.e., sum of the message
- // block lengths.
- virtual size_t message_count (void);
- // Number of total messages on the queue.
-
- // = Manual changes to these stats (used when queued message blocks
- // change size or lengths).
- virtual void message_bytes (size_t new_size);
- // New value of the number of total bytes on the queue, i.e., sum of
- // the message block sizes.
- virtual void message_length (size_t new_length);
- // New value of the number of total length on the queue, i.e., sum
- // of the message block lengths.
-
- // = Flow control routines
- virtual size_t high_water_mark (void);
- // Get high watermark.
- virtual void high_water_mark (size_t hwm);
- // Set high watermark.
- virtual size_t low_water_mark (void);
- // Get low watermark.
- virtual void low_water_mark (size_t lwm);
- // Set low watermark.
-
- // = Activation control methods.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- virtual int enqueue_i (ACE_Message_Block *new_item);
- // Enqueue an <ACE_Message_Block *> in accordance with its priority.
-
- virtual int enqueue_tail_i (ACE_Message_Block *new_item);
- // Enqueue an <ACE_Message_Block *> at the end of the queue.
-
- virtual int enqueue_head_i (ACE_Message_Block *new_item);
- // Enqueue an <ACE_Message_Block *> at the head of the queue.
-
- virtual int dequeue_head_i (ACE_Message_Block *&first_item);
- // Dequeue and return the <ACE_Message_Block *> at the head of the
- // queue.
-
- // = Check the boundary conditions (assumes locks are held).
- virtual int is_full_i (void);
- // True if queue is full, else false.
- virtual int is_empty_i (void);
- // True if queue is empty, else false.
-
- // = Implementation of public <activate>/<deactivate> methods above.
-
- // These methods assume locks are held.
-
- virtual int deactivate_i (void);
- // Deactivate the queue.
- virtual int activate_i (void);
- // Activate the queue.
-
- // = Helper methods to factor out common #ifdef code.
- virtual int wait_not_full_cond (ACE_Guard<ACE_Null_Mutex> &mon,
- ACE_Time_Value *tv);
- // Wait for the queue to become non-full.
-
- virtual int wait_not_empty_cond (ACE_Guard<ACE_Null_Mutex> &mon,
- ACE_Time_Value *tv);
- // Wait for the queue to become non-empty.
-
- virtual int signal_enqueue_waiters (void);
- // Inform any threads waiting to enqueue that they can procede.
-
- virtual int signal_dequeue_waiters (void);
- // Inform any threads waiting to dequeue that they can procede.
-
- MSG_Q_ID msgq (void);
- // Access the underlying msgQ.
-
-private:
- int max_messages_;
- // Maximum number of messages that can be queued.
-
- int max_message_length_;
- // Maximum message size, in bytes.
-
- int options_;
- // Native message queue options.
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Message_Queue_Vx &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Message_Queue_Vx (const ACE_Message_Queue_Vx &))
-
- ACE_UNIMPLEMENTED_FUNC (virtual int peek_dequeue_head
- (ACE_Message_Block *&first_item,
- ACE_Time_Value *tv = 0))
-};
-#endif /* VXWORKS */
-
-#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
-class ACE_Export ACE_Message_Queue_NT : public ACE_Message_Queue_Base
-{
- // = TITLE
- // Message Queue implementation using IO completion port on NT.
- //
- // = DESCRIPTION
- // Implementation of a strip-downed ACE_Message_Queue using NT's
- // IO completion port mechanism.
- //
- // NOTE: *Many* ACE_Message_Queue features are not supported with
- // this implementation, including:
- // * <open> method have different signatures.
- // * <dequeue_head> *requires* that the <ACE_Message_Block>
- // pointer argument point to an <ACE_Message_Block> that was
- // allocated by the caller.
- // * <peek_dequeue_head>.
- // * <ACE_Message_Queue_Iterators>.
- // * No flow control.
-public:
- // = Initialization and termination methods.
- ACE_Message_Queue_NT (size_t max_threads = ACE_Message_Queue_Base::DEFAULT_HWM);
-
- virtual int open (size_t max_threads = ACE_Message_Queue_Base::DEFAULT_HWM);
- // Initialize the Message Queue by creating a new NT I/O completion
- // port. The first arguemnt specifies the number of threads
- // released by the MQ that are allowed to run concurrently. Return
- // 0 when succeeds, -1 otherwise.
-
- virtual int close (void);
- // Close down the underlying I/O completion port. You need to
- // re-open the MQ after this function is executed.
-
- virtual ~ACE_Message_Queue_NT (void);
- // Close down the message queue and release all resources.
-
- // = Enqueue and dequeue methods.
-
- virtual int enqueue_tail (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout = 0);
- virtual int enqueue (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout = 0);
- // Enqueue an <ACE_Message_Block *> at the end of the queue.
- // Returns -1 on failure, else the number of items still on the
- // queue.
-
- virtual int dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout = 0);
- virtual int dequeue (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout = 0);
- // Dequeue and return the <ACE_Message_Block *> at the head of the
- // queue. Returns -1 on failure, else the number of items still on
- // the queue.
-
- // = Check if queue is full/empty.
- virtual int is_full (void);
- // Always return false.
- virtual int is_empty (void);
- // True if queue is empty, else false. Notice the return value is
- // only transient.
-
- // = Queue statistic methods (transient.)
- virtual size_t message_bytes (void);
- // Number of total bytes on the queue, i.e., sum of the message
- // block sizes.
- virtual size_t message_length (void);
- // Number of total length on the queue, i.e., sum of the message
- // block lengths.
- virtual size_t message_count (void);
- // Number of total messages on the queue.
-
- // = Manual changes to these stats (used when queued message blocks
- // change size or lengths).
- virtual void message_bytes (size_t new_size);
- // New value of the number of total bytes on the queue, i.e., sum of
- // the message block sizes.
- virtual void message_length (size_t new_length);
- // New value of the number of total length on the queue, i.e., sum
- // of the message block lengths.
-
- virtual size_t max_threads (void);
- // Get the max concurrent thread number.
-
- // = Activation control methods.
-
- virtual int deactivate (void);
- // Deactivate the queue and wakeup all threads waiting on the queue
- // so they can continue. Messages already in the queue get removed.
- // If there are more messages in the queue than there are threads
- // waiting on the queue, the left over messages will not be removed.
- // Any other enqueue/dequeue operations called until the queue is
- // activated again will immediately return -1 with <errno> ==
- // ESHUTDOWN. Returns WAS_INACTIVE if queue was inactive before the
- // call and WAS_ACTIVE if queue was active before the call.
-
- virtual int activate (void);
- // Reactivate the queue so that threads can enqueue and dequeue
- // messages again. Returns WAS_INACTIVE if queue was inactive
- // before the call and WAS_ACTIVE if queue was active before the
- // call.
-
- virtual int deactivated (void);
- // Returns true if <deactivated_> is enabled.
-
- // = Notification hook.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- virtual ACE_HANDLE completion_port (void);
- // Get the handle to the underlying completion port.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- // = Internal states.
-
- size_t max_cthrs_;
- // Maximum threads that can be released (and run) concurrently.
-
- size_t cur_thrs_;
- // Current number of threads waiting to dequeue messages.
-
- size_t cur_bytes_;
- // Current number of bytes in queue.
-
- size_t cur_length_;
- // Current length of messages in queue.
-
- size_t cur_count_;
- // Current number of messages in the queue.
-
- ACE_Thread_Mutex lock_;
- // Synchronizer. This should really be an ACE_Recursive_Thread_Mutex
- // but since this class is only supported on NT, it's okay to use
- // ACE_Thread_Mutex here.
-
- int deactivated_;
- // Indicates that the queue is inactive.
-
- ACE_HANDLE completion_port_;
- // Underlying NT IoCompletionPort.
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Message_Queue_NT &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Message_Queue_NT (const ACE_Message_Queue_NT &))
-};
-#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
-
-// This must go here to avoid problems with circular includes.
-#include "ace/Strategies.h"
-
-#if defined (__ACE_INLINE__)
-#include "ace/Message_Queue.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_MESSAGE_QUEUE_H */
diff --git a/ace/Message_Queue.i b/ace/Message_Queue.i
deleted file mode 100644
index 3aa86dbd3fd..00000000000
--- a/ace/Message_Queue.i
+++ /dev/null
@@ -1,204 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_Message_Queue_Base::ACE_Message_Queue_Base (void)
-{
-}
-
-ACE_INLINE
-ACE_Message_Queue_Base::~ACE_Message_Queue_Base (void)
-{
-}
-
-#if defined (VXWORKS)
-// Specialization to use native VxWorks Message Queues.
-
-ACE_INLINE MSG_Q_ID
-ACE_Message_Queue_Vx::msgq ()
-{
- // Hijack the tail_ field to store the MSG_Q_ID.
- return ACE_reinterpret_cast (MSG_Q_ID, tail_);
-}
-
-ACE_INLINE int
-ACE_Message_Queue_Vx::is_empty_i (void)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::is_empty_i");
- return ::msgQNumMsgs (msgq ()) == 0;
-}
-
-ACE_INLINE int
-ACE_Message_Queue_Vx::is_full_i (void)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::is_full_i");
- return ::msgQNumMsgs (msgq ()) >= max_messages_;
-}
-
-ACE_INLINE size_t
-ACE_Message_Queue_Vx::high_water_mark (void)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::high_water_mark");
- ACE_NOTSUP_RETURN ((size_t) -1);
-}
-
-ACE_INLINE void
-ACE_Message_Queue_Vx::high_water_mark (size_t)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::high_water_mark");
- ACE_NOTSUP;
-}
-
-ACE_INLINE size_t
-ACE_Message_Queue_Vx::low_water_mark (void)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::low_water_mark");
- // Don't need to guard, because this is fixed.
-
- ACE_NOTSUP_RETURN ((size_t) -1);
-}
-
-ACE_INLINE void
-ACE_Message_Queue_Vx::low_water_mark (size_t)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::low_water_mark");
- ACE_NOTSUP;
-}
-
-ACE_INLINE size_t
-ACE_Message_Queue_Vx::message_bytes (void)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::message_bytes");
- ACE_NOTSUP_RETURN ((size_t) -1);
-}
-
-ACE_INLINE size_t
-ACE_Message_Queue_Vx::message_length (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_length");
- ACE_NOTSUP_RETURN ((size_t) -1);
-}
-
-ACE_INLINE size_t
-ACE_Message_Queue_Vx::message_count (void)
-{
- ACE_TRACE ("ACE_Message_Queue_Vx::message_count");
- // Don't need to guard, because this is a system call.
-
- return ::msgQNumMsgs (msgq ());
-}
-
-ACE_INLINE void
-ACE_Message_Queue_Vx::message_bytes (size_t)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_bytes");
- ACE_NOTSUP;
-}
-
-ACE_INLINE void
-ACE_Message_Queue_Vx::message_length (size_t)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_length");
- ACE_NOTSUP;
-}
-
-#endif /* VXWORKS */
-
-#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
-ACE_INLINE int
-ACE_Message_Queue_NT::enqueue_tail (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::enqueue_tail");
- return this->enqueue (new_item, timeout);
-}
-
-ACE_INLINE int
-ACE_Message_Queue_NT::dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::dequeue_head");
- return this->dequeue (first_item, timeout);
-}
-
-ACE_INLINE int
-ACE_Message_Queue_NT::is_full (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::is_full");
- return 0; // Always not full.
-}
-
-ACE_INLINE int
-ACE_Message_Queue_NT::is_empty (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::is_empty");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0);
-
- return (this->cur_bytes_ > 0 && this->cur_count_ > 0 ? 1 : 0);
-}
-
-ACE_INLINE size_t
-ACE_Message_Queue_NT::message_bytes (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::message_bytes");
- // Accessing to size_t must be atomic.
- return this->cur_bytes_;
-}
-
-ACE_INLINE size_t
-ACE_Message_Queue_NT::message_length (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_length");
- // Accessing to size_t must be atomic.
- return this->cur_length_;
-}
-
-ACE_INLINE size_t
-ACE_Message_Queue_NT::message_count (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::message_count");
- // Accessing to size_t must be atomic.
- return this->cur_count_;
-}
-
-ACE_INLINE void
-ACE_Message_Queue_NT::message_bytes (size_t new_value)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_bytes");
- ACE_GUARD (ACE_Thread_Mutex, ace_mon, this->lock_);
-
- this->cur_bytes_ = new_value;
-}
-
-ACE_INLINE void
-ACE_Message_Queue_NT::message_length (size_t new_value)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_length");
- ACE_GUARD (ACE_Thread_Mutex, ace_mon, this->lock_);
-
- this->cur_length_ = new_value;
-}
-
-ACE_INLINE size_t
-ACE_Message_Queue_NT::max_threads (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::max_threads");
- return this->max_cthrs_;
-}
-
-ACE_INLINE int
-ACE_Message_Queue_NT::deactivated (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::ceactivated");
- // Accessing to int must be atomic.
- return this->deactivated_;
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_Message_Queue_NT::completion_port (void)
-{
- ACE_TRACE ("ACE_Message_Queue_NT::completion_port");
- return this->completion_port_;
-}
-
-#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
diff --git a/ace/Message_Queue_T.cpp b/ace/Message_Queue_T.cpp
deleted file mode 100644
index 7307e181361..00000000000
--- a/ace/Message_Queue_T.cpp
+++ /dev/null
@@ -1,1663 +0,0 @@
-// $Id$
-
-#ifndef ACE_MESSAGE_QUEUE_T_C
-#define ACE_MESSAGE_QUEUE_T_C
-
-// #include Message_Queue.h instead of Message_Queue_T.h to avoid
-// circular include problems.
-#include "ace/Message_Queue.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Message_Queue_T.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Strategies.h" // Need ACE_Notification_Strategy
-
-ACE_RCSID(ace, Message_Queue_T, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Message_Queue)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Dynamic_Message_Queue)
-
-template <ACE_SYNCH_DECL>
-ACE_Message_Queue_Iterator<ACE_SYNCH_USE>::ACE_Message_Queue_Iterator (ACE_Message_Queue <ACE_SYNCH_USE> &q)
- : queue_ (q),
- curr_ (q.head_)
-{
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue_Iterator<ACE_SYNCH_USE>::next (ACE_Message_Block *&entry)
-{
- ACE_READ_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->queue_.lock_, -1)
-
- if (this->curr_ != 0)
- {
- entry = this->curr_;
- return 1;
- }
- else
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue_Iterator<ACE_SYNCH_USE>::done (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->queue_.lock_, -1)
-
- return this->curr_ == 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue_Iterator<ACE_SYNCH_USE>::advance (void)
-{
- ACE_READ_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->queue_.lock_, -1)
-
- if (this->curr_)
- this->curr_ = this->curr_->next ();
- return this->curr_ != 0;
-}
-
-template <ACE_SYNCH_DECL> void
-ACE_Message_Queue_Iterator<ACE_SYNCH_USE>::dump (void) const
-{
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Message_Queue_Iterator)
-
-template <ACE_SYNCH_DECL>
-ACE_Message_Queue_Reverse_Iterator<ACE_SYNCH_USE>::ACE_Message_Queue_Reverse_Iterator (ACE_Message_Queue <ACE_SYNCH_USE> &q)
- : queue_ (q),
- curr_ (queue_.tail_)
-{
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue_Reverse_Iterator<ACE_SYNCH_USE>::next (ACE_Message_Block *&entry)
-{
- ACE_READ_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->queue_.lock_, -1)
-
- if (this->curr_ != 0)
- {
- entry = this->curr_;
- return 1;
- }
- else
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue_Reverse_Iterator<ACE_SYNCH_USE>::done (void) const
-{
- ACE_READ_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->queue_.lock_, -1)
-
- return this->curr_ == 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue_Reverse_Iterator<ACE_SYNCH_USE>::advance (void)
-{
- ACE_READ_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->queue_.lock_, -1)
-
- if (this->curr_)
- this->curr_ = this->curr_->prev ();
- return this->curr_ != 0;
-}
-
-template <ACE_SYNCH_DECL> void
-ACE_Message_Queue_Reverse_Iterator<ACE_SYNCH_USE>::dump (void) const
-{
-}
-
-template <ACE_SYNCH_DECL> void
-ACE_Message_Queue<ACE_SYNCH_USE>::dump (void) const
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("deactivated = %d\n")
- ACE_TEXT ("low_water_mark = %d\n")
- ACE_TEXT ("high_water_mark = %d\n")
- ACE_TEXT ("cur_bytes = %d\n")
- ACE_TEXT ("cur_length = %d\n")
- ACE_TEXT ("cur_count = %d\n")
- ACE_TEXT ("head_ = %u\n")
- ACE_TEXT ("tail_ = %u\n"),
- this->deactivated_,
- this->low_water_mark_,
- this->high_water_mark_,
- this->cur_bytes_,
- this->cur_length_,
- this->cur_count_,
- this->head_,
- this->tail_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("not_full_cond: \n")));
- not_full_cond_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("not_empty_cond: \n")));
- not_empty_cond_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <ACE_SYNCH_DECL> void
-ACE_Message_Queue<ACE_SYNCH_USE>::message_bytes (size_t new_value)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_bytes");
- ACE_GUARD (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_);
-
- this->cur_bytes_ = new_value;
-}
-
-template <ACE_SYNCH_DECL> void
-ACE_Message_Queue<ACE_SYNCH_USE>::message_length (size_t new_value)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_length");
- ACE_GUARD (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_);
-
- this->cur_length_ = new_value;
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Message_Queue<ACE_SYNCH_USE>::ACE_Message_Queue (size_t hwm,
- size_t lwm,
- ACE_Notification_Strategy *ns)
-#if defined (ACE_HAS_OPTIMIZED_MESSAGE_QUEUE)
- : not_empty_cond_ (0),
- not_full_cond_ (0),
- enqueue_waiters_ (0),
- dequeue_waiters_ (0)
-#else
- : not_empty_cond_ (this->lock_),
- not_full_cond_ (this->lock_)
-#endif /* ACE_HAS_OPTIMIZED_MESSAGE_QUEUE */
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::ACE_Message_Queue");
-
- if (this->open (hwm, lwm, ns) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("open")));
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Message_Queue<ACE_SYNCH_USE>::~ACE_Message_Queue (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::~ACE_Message_Queue");
- if (this->head_ != 0 && this->close () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("close")));
-}
-
-// Don't bother locking since if someone calls this function more than
-// once for the same queue, we're in bigger trouble than just
-// concurrency control!
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::open (size_t hwm,
- size_t lwm,
- ACE_Notification_Strategy *ns)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::open");
- this->high_water_mark_ = hwm;
- this->low_water_mark_ = lwm;
- this->deactivated_ = 0;
- this->cur_bytes_ = 0;
- this->cur_length_ = 0;
- this->cur_count_ = 0;
- this->tail_ = 0;
- this->head_ = 0;
- this->notification_strategy_ = ns;
- return 0;
-}
-
-// Implementation of the public deactivate() method
-// (assumes locks are held).
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::deactivate_i (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::deactivate_i");
- int current_status =
- this->deactivated_ ? WAS_INACTIVE : WAS_ACTIVE;
-
- // Wakeup all waiters.
-#if !defined (ACE_HAS_OPTIMIZED_MESSAGE_QUEUE)
- this->not_empty_cond_.broadcast ();
- this->not_full_cond_.broadcast ();
-#endif /* ACE_HAS_OPTIMIZED_MESSAGE_QUEUE */
-
- this->deactivated_ = 1;
- return current_status;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::activate_i (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::activate_i");
- int current_status =
- this->deactivated_ ? WAS_INACTIVE : WAS_ACTIVE;
- this->deactivated_ = 0;
- return current_status;
-}
-
-// Clean up the queue if we have not already done so!
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::close (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::close");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- int res = this->deactivate_i ();
-
- // Free up the remaining messages on the queue.
-
- for (this->tail_ = 0; this->head_ != 0; )
- {
- this->cur_count_--;
-
- this->cur_bytes_ -= this->head_->total_size ();
- this->cur_length_ -= this->head_->total_length ();
-
- ACE_Message_Block *temp = this->head_;
- this->head_ = this->head_->next ();
-
- // Make sure to use <release> rather than <delete> since this is
- // reference counted.
- temp->release ();
- }
-
- return res;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::signal_enqueue_waiters (void)
-{
-#if !defined (ACE_HAS_OPTIMIZED_MESSAGE_QUEUE)
- if (this->not_full_cond_.signal () != 0)
- return -1;
-#else
- if (this->enqueue_waiters_ > 0)
- {
- --this->enqueue_waiters_;
- return this->not_full_cond_.release ();
- }
-#endif /* ACE_HAS_OPTIMIZED_MESSAGE_QUEUE */
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::signal_dequeue_waiters (void)
-{
-#if !defined (ACE_HAS_OPTIMIZED_MESSAGE_QUEUE)
- // Tell any blocked threads that the queue has a new item!
- if (this->not_empty_cond_.signal () != 0)
- return -1;
-#else
- if (this->dequeue_waiters_ > 0)
- {
- --this->dequeue_waiters_;
- return this->not_empty_cond_.release ();
- }
-#endif /* ACE_HAS_OPTIMIZED_MESSAGE_QUEUE */
- return 0;
-}
-
-// Actually put the node at the end (no locking so must be called with
-// locks held).
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_tail_i (ACE_Message_Block *new_item)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_tail_i");
-
- if (new_item == 0)
- return -1;
-
- // List was empty, so build a new one.
- if (this->tail_ == 0)
- {
- this->head_ = new_item;
- this->tail_ = new_item;
- new_item->next (0);
- new_item->prev (0);
- }
- // Link at the end.
- else
- {
- new_item->next (0);
- this->tail_->next (new_item);
- new_item->prev (this->tail_);
- this->tail_ = new_item;
- }
-
- // Make sure to count all the bytes in a composite message!!!
- this->cur_bytes_ += new_item->total_size ();
- this->cur_length_ += new_item->total_length ();
-
- this->cur_count_++;
-
- if (this->signal_dequeue_waiters () == -1)
- return -1;
- else
- return this->cur_count_;
-}
-
-// Actually put the node at the head (no locking)
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head_i (ACE_Message_Block *new_item)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head_i");
-
- if (new_item == 0)
- return -1;
-
- new_item->prev (0);
- new_item->next (this->head_);
-
- if (this->head_ != 0)
- this->head_->prev (new_item);
- else
- this->tail_ = new_item;
-
- this->head_ = new_item;
-
- // Make sure to count all the bytes in a composite message!!!
- this->cur_bytes_ += new_item->total_size ();
- this->cur_length_ += new_item->total_length ();
-
- this->cur_count_++;
-
- if (this->signal_dequeue_waiters () == -1)
- return -1;
- else
- return this->cur_count_;
-}
-
-// Actually put the node at its proper position relative to its
-// priority.
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_i (ACE_Message_Block *new_item)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_i");
-
- if (new_item == 0)
- return -1;
-
- if (this->head_ == 0)
- // Check for simple case of an empty queue, where all we need to
- // do is insert <new_item> into the head.
- return this->enqueue_head_i (new_item);
- else
- {
- ACE_Message_Block *temp;
-
- // Figure out where the new item goes relative to its priority.
- // We start looking from the highest priority to the lowest
- // priority.
-
- for (temp = this->tail_;
- temp != 0;
- temp = temp->prev ())
- if (temp->msg_priority () >= new_item->msg_priority ())
- // Break out when we've located an item that has
- // greater or equal priority.
- break;
-
- if (temp == 0)
- // Check for simple case of inserting at the head of the queue,
- // where all we need to do is insert <new_item> before the
- // current head.
- return this->enqueue_head_i (new_item);
- else if (temp->next () == 0)
- // Check for simple case of inserting at the tail of the
- // queue, where all we need to do is insert <new_item> after
- // the current tail.
- return this->enqueue_tail_i (new_item);
- else
- {
- // Insert the new message behind the message of
- // greater or equal priority. This ensures that FIFO order is
- // maintained when messages of the same priority are
- // inserted consecutively.
- new_item->prev (temp);
- new_item->next (temp->next ());
- temp->next ()->prev (new_item);
- temp->next (new_item);
- }
- }
-
- // Make sure to count all the bytes in a composite message!!!
- this->cur_bytes_ += new_item->total_size ();
- this->cur_length_ += new_item->total_length ();
-
- this->cur_count_++;
-
- if (this->signal_dequeue_waiters () == -1)
- return -1;
- else
- return this->cur_count_;
-}
-
-// Actually get the first ACE_Message_Block (no locking, so must be
-// called with locks held). This method assumes that the queue has at
-// least one item in it when it is called.
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::dequeue_head_i (ACE_Message_Block *&first_item)
-{
- if (this->head_ ==0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Attempting to dequeue from empty queue")),
- -1);
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::dequeue_head_i");
- first_item = this->head_;
- this->head_ = this->head_->next ();
-
- if (this->head_ == 0)
- this->tail_ = 0;
- else
- // The prev pointer of the first message block has to point to
- // NULL...
- this->head_->prev (0);
-
- // Subtract off all of the bytes associated with this message.
- this->cur_bytes_ -= first_item->total_size ();
- this->cur_length_ -= first_item->total_length ();
-
- this->cur_count_--;
-
- // Only signal enqueueing threads if we've fallen below the low
- // water mark.
- if (this->cur_bytes_ <= this->low_water_mark_
- && this->signal_enqueue_waiters () == -1)
- return -1;
- else
- return this->cur_count_;
-}
-
-// Take a look at the first item without removing it.
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::peek_dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::peek_dequeue_head");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- if (this->deactivated_)
- {
- errno = ESHUTDOWN;
- return -1;
- }
-
- // Wait for at least one item to become available.
-
- if (this->wait_not_empty_cond (ace_mon, timeout) == -1)
- return -1;
-
- first_item = this->head_;
- return this->cur_count_;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::wait_not_full_cond (ACE_Guard<ACE_SYNCH_MUTEX_T> &mon,
- ACE_Time_Value *timeout)
-{
- int result = 0;
-#if defined (ACE_HAS_OPTIMIZED_MESSAGE_QUEUE)
- while (this->is_full_i () && result != -1)
- {
- ++this->enqueue_waiters_;
- // @@ Need to add sanity checks for failure...
- mon.release ();
- if (timeout == 0)
- result = this->not_full_cond_.acquire ();
- else
- result = this->not_full_cond_.acquire (*timeout);
-
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- mon.acquire ();
- }
-#else
- ACE_UNUSED_ARG (mon);
-
- // Wait while the queue is full.
-
- while (this->is_full_i ())
- {
- if (this->not_full_cond_.wait (timeout) == -1)
- {
- if (errno == ETIME)
- errno = EWOULDBLOCK;
- result = -1;
- break;
- }
- if (this->deactivated_)
- {
- errno = ESHUTDOWN;
- result = -1;
- break;
- }
- }
-#endif /* ACE_HAS_OPTIMIZED_MESSAGE_QUEUE */
- return result;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::wait_not_empty_cond (ACE_Guard<ACE_SYNCH_MUTEX_T> &mon,
- ACE_Time_Value *timeout)
-{
- int result = 0;
-#if defined (ACE_HAS_OPTIMIZED_MESSAGE_QUEUE)
- while (this->is_empty_i () && result != -1)
- {
- ++this->dequeue_waiters_;
- // @@ Need to add sanity checks for failure...
- mon.release ();
- if (timeout == 0)
- result = this->not_empty_cond_.acquire ();
- else
- {
- result = this->not_empty_cond_.acquire (*timeout);
- if (result == -1 && errno == ETIME)
- errno = EWOULDBLOCK;
- }
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- mon.acquire ();
- }
-#else
- ACE_UNUSED_ARG (mon);
-
- // Wait while the queue is empty.
-
- while (this->is_empty_i ())
- {
- if (this->not_empty_cond_.wait (timeout) == -1)
- {
- if (errno == ETIME)
- errno = EWOULDBLOCK;
- result = -1;
- break;
- }
- if (this->deactivated_)
- {
- errno = ESHUTDOWN;
- result = -1;
- break;
- }
- }
-#endif /* ACE_HAS_OPTIMIZED_MESSAGE_QUEUE */
- return result;
-}
-
-// Block indefinitely waiting for an item to arrive, does not ignore
-// alerts (e.g., signals).
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- if (this->deactivated_)
- {
- errno = ESHUTDOWN;
- return -1;
- }
-
- if (this->wait_not_full_cond (ace_mon, timeout) == -1)
- return -1;
-
- int queue_count = this->enqueue_head_i (new_item);
-
- if (queue_count == -1)
- return -1;
- else
- {
- this->notify ();
- return queue_count;
- }
-}
-
-// Enqueue an <ACE_Message_Block *> into the <Message_Queue> in
-// accordance with its <msg_priority> (0 is lowest priority). Returns
-// -1 on failure, else the number of items still on the queue.
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_prio (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_prio");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- if (this->deactivated_)
- {
- errno = ESHUTDOWN;
- return -1;
- }
-
- if (this->wait_not_full_cond (ace_mon, timeout) == -1)
- return -1;
-
- int queue_count = this->enqueue_i (new_item);
-
- if (queue_count == -1)
- return -1;
- else
- {
- this->notify ();
- return queue_count;
- }
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::enqueue (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue");
- return this->enqueue_prio (new_item, timeout);
-}
-
-// Block indefinitely waiting for an item to arrive,
-// does not ignore alerts (e.g., signals).
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_tail (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_tail");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- if (this->deactivated_)
- {
- errno = ESHUTDOWN;
- return -1;
- }
-
- if (this->wait_not_full_cond (ace_mon, timeout) == -1)
- return -1;
-
- int queue_count = this->enqueue_tail_i (new_item);
-
- if (queue_count == -1)
- return -1;
- else
- {
- this->notify ();
- return queue_count;
- }
-}
-
-// Remove an item from the front of the queue. If timeout == 0 block
-// indefinitely (or until an alert occurs). Otherwise, block for upto
-// the amount of time specified by timeout.
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::dequeue_head");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- if (this->deactivated_)
- {
- errno = ESHUTDOWN;
- return -1;
- }
-
- if (this->wait_not_empty_cond (ace_mon, timeout) == -1)
- return -1;
-
- return this->dequeue_head_i (first_item);
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Message_Queue<ACE_SYNCH_USE>::notify (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::notify");
-
- // By default, don't do anything.
- if (this->notification_strategy_ == 0)
- return 0;
- else
- return this->notification_strategy_->notify ();
-}
-
-
-// = Initialization and termination methods.
-template <ACE_SYNCH_DECL>
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::ACE_Dynamic_Message_Queue (ACE_Dynamic_Message_Strategy & message_strategy,
- size_t hwm,
- size_t lwm,
- ACE_Notification_Strategy *ns)
- : ACE_Message_Queue<ACE_SYNCH_USE> (hwm, lwm, ns),
- pending_head_ (0),
- pending_tail_ (0),
- late_head_ (0),
- late_tail_ (0),
- beyond_late_head_ (0),
- beyond_late_tail_ (0),
- message_strategy_ (message_strategy)
-{
- // Note, the ACE_Dynamic_Message_Queue assumes full responsibility
- // for the passed ACE_Dynamic_Message_Strategy object, and deletes
- // it in its own dtor
-}
-
-// dtor: free message strategy and let base class dtor do the rest.
-
-template <ACE_SYNCH_DECL>
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::~ACE_Dynamic_Message_Queue (void)
-{
- delete &this->message_strategy_;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::remove_messages (ACE_Message_Block *&list_head,
- ACE_Message_Block *&list_tail,
- u_int status_flags)
-{
- // start with an empty list
- list_head = 0;
- list_tail = 0;
-
- // Get the current time
- ACE_Time_Value current_time = ACE_OS::gettimeofday ();
-
- // Refresh priority status boundaries in the queue.
- int result = this->refresh_queue (current_time);
- if (result < 0)
- return result;
-
- if (ACE_BIT_ENABLED (status_flags,
- (u_int) ACE_Dynamic_Message_Strategy::PENDING)
- && this->pending_head_
- && this->pending_tail_)
- {
- // patch up pointers for the new tail of the queue
- if (this->pending_head_->prev ())
- {
- this->tail_ = this->pending_head_->prev ();
- this->pending_head_->prev ()->next (0);
- }
- else
- {
- // the list has become empty
- this->head_ = 0;
- this->tail_ = 0;
- }
-
- // point to the head and tail of the list
- list_head = this->pending_head_;
- list_tail = this->pending_tail_;
-
- // cut the pending messages out of the queue entirely
- this->pending_head_->prev (0);
- this->pending_head_ = 0;
- this->pending_tail_ = 0;
- }
-
- if (ACE_BIT_ENABLED (status_flags,
- (u_int) ACE_Dynamic_Message_Strategy::LATE)
- && this->late_head_
- && this->late_tail_)
- {
- // Patch up pointers for the (possibly) new head and tail of the
- // queue.
- if (this->late_tail_->next ())
- this->late_tail_->next ()->prev (this->late_head_->prev ());
- else
- this->tail_ = this->late_head_->prev ();
-
- if (this->late_head_->prev ())
- this->late_head_->prev ()->next (this->late_tail_->next ());
- else
- this->head_ = this->late_tail_->next ();
-
- // put late messages behind pending messages (if any) being returned
- this->late_head_->prev (list_tail);
- if (list_tail)
- list_tail->next (this->late_head_);
- else
- list_head = this->late_head_;
-
- list_tail = this->late_tail_;
-
- this->late_tail_->next (0);
- this->late_head_ = 0;
- this->late_tail_ = 0;
- }
-
- if (ACE_BIT_ENABLED (status_flags,
- (u_int) ACE_Dynamic_Message_Strategy::BEYOND_LATE)
- && this->beyond_late_head_
- && this->beyond_late_tail_)
- {
- // Patch up pointers for the new tail of the queue
- if (this->beyond_late_tail_->next ())
- {
- this->head_ = this->beyond_late_tail_->next ();
- this->beyond_late_tail_->next ()->prev (0);
- }
- else
- {
- // the list has become empty
- this->head_ = 0;
- this->tail_ = 0;
- }
-
- // Put beyond late messages at the end of the list being
- // returned.
- if (list_tail)
- {
- this->beyond_late_head_->prev (list_tail);
- list_tail->next (this->beyond_late_head_);
- }
- else
- list_head = this->beyond_late_head_;
-
- list_tail = this->beyond_late_tail_;
-
- this->beyond_late_tail_->next (0);
- this->beyond_late_head_ = 0;
- this->beyond_late_tail_ = 0;
- }
-
- // Decrement message and size counts for removed messages.
- ACE_Message_Block *temp1;
-
- for (temp1 = list_head;
- temp1 != 0;
- temp1 = temp1->next ())
- {
- this->cur_count_--;
-
- this->cur_bytes_ -= temp1->total_size ();
- this->cur_length_ -= temp1->total_length ();
- }
-
- return result;
-}
-
-// Detach all messages with status given in the passed flags from the
-// queue and return them by setting passed head and tail pointers to
-// the linked list they comprise. This method is intended primarily
-// as a means of periodically harvesting messages that have missed
-// their deadlines, but is available in its most general form. All
-// messages are returned in priority order, from head to tail, as of
-// the time this method was called.
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::dequeue_head");
-
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- if (this->deactivated_)
- {
- errno = ESHUTDOWN;
- return -1;
- }
-
- int result;
-
- // get the current time
- ACE_Time_Value current_time = ACE_OS::gettimeofday ();
-
- // refresh priority status boundaries in the queue
- result = this->refresh_queue (current_time);
- if (result < 0)
- return result;
-
- // *now* it's appropriate to wait for an enqueued item
- result = this->wait_not_empty_cond (ace_mon, timeout);
- if (result == -1)
- return result;
-
- // call the internal dequeue method, which selects an item from the
- // highest priority status portion of the queue that has messages
- // enqueued.
- result = this->dequeue_head_i (first_item);
-
- return result;
-}
-
-// Dequeue and return the <ACE_Message_Block *> at the (logical) head
-// of the queue.
-
-template <ACE_SYNCH_DECL> void
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::dump (void) const
-{
- ACE_TRACE ("ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Message_Queue<ACE_SYNCH_USE> (base class): \n")));
- this->ACE_Message_Queue<ACE_SYNCH_USE>::dump ();
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("pending_head_ = %u\n")
- ACE_TEXT ("pending_tail_ = %u\n")
- ACE_TEXT ("late_head_ = %u\n")
- ACE_TEXT ("late_tail_ = %u\n")
- ACE_TEXT ("beyond_late_head_ = %u\n")
- ACE_TEXT ("beyond_late_tail_ = %u\n"),
- this->pending_head_,
- this->pending_tail_,
- this->late_head_,
- this->late_tail_,
- this->beyond_late_head_,
- this->beyond_late_tail_));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("message_strategy_ : \n")));
- message_strategy_.dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
- // dump the state of the queue
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::enqueue_i (ACE_Message_Block *new_item)
-{
- ACE_TRACE ("ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::enqueue_i");
-
- if (new_item == 0)
- return -1;
-
- int result = 0;
-
- // Get the current time.
- ACE_Time_Value current_time = ACE_OS::gettimeofday ();
-
- // Refresh priority status boundaries in the queue.
-
- result = this->refresh_queue (current_time);
- if (result < 0)
- return result;
-
- // Where we enqueue depends on the message's priority status.
- switch (message_strategy_.priority_status (*new_item,
- current_time))
- {
- case ACE_Dynamic_Message_Strategy::PENDING:
- if (this->pending_tail_ == 0)
- {
- // Check for simple case of an empty pending queue, where
- // all we need to do is insert <new_item> into the tail of
- // the queue.
- pending_head_ = new_item;
- pending_tail_ = pending_head_;
- return this->enqueue_tail_i (new_item);
- }
- else
- {
- // Enqueue the new message in priority order in the pending
- // sublist
- result = sublist_enqueue_i (new_item,
- current_time,
- this->pending_head_,
- this->pending_tail_,
- ACE_Dynamic_Message_Strategy::PENDING);
- }
- break;
-
- case ACE_Dynamic_Message_Strategy::LATE:
- if (this->late_tail_ == 0)
- {
- late_head_ = new_item;
- late_tail_ = late_head_;
-
- if (this->pending_head_ == 0)
- // Check for simple case of an empty pending queue,
- // where all we need to do is insert <new_item> into the
- // tail of the queue.
- return this->enqueue_tail_i (new_item);
- else if (this->beyond_late_tail_ == 0)
- // Check for simple case of an empty beyond late queue, where all
- // we need to do is insert <new_item> into the head of the queue.
- return this->enqueue_head_i (new_item);
- else
- {
- // Otherwise, we can just splice the new message in
- // between the pending and beyond late portions of the
- // queue.
- this->beyond_late_tail_->next (new_item);
- new_item->prev (this->beyond_late_tail_);
- this->pending_head_->prev (new_item);
- new_item->next (this->pending_head_);
- }
- }
- else
- {
- // Enqueue the new message in priority order in the late
- // sublist
- result = sublist_enqueue_i (new_item,
- current_time,
- this->late_head_,
- this->late_tail_,
- ACE_Dynamic_Message_Strategy::LATE);
- }
- break;
-
- case ACE_Dynamic_Message_Strategy::BEYOND_LATE:
- if (this->beyond_late_tail_ == 0)
- {
- // Check for simple case of an empty beyond late queue,
- // where all we need to do is insert <new_item> into the
- // head of the queue.
- beyond_late_head_ = new_item;
- beyond_late_tail_ = beyond_late_head_;
- return this->enqueue_head_i (new_item);
- }
- else
- {
- // all beyond late messages have the same (zero) priority,
- // so just put the new one at the end of the beyond late
- // messages
- if (this->beyond_late_tail_->next ())
- this->beyond_late_tail_->next ()->prev (new_item);
- else
- this->tail_ = new_item;
-
- new_item->next (this->beyond_late_tail_->next ());
- this->beyond_late_tail_->next (new_item);
- new_item->prev (this->beyond_late_tail_);
- this->beyond_late_tail_ = new_item;
- }
-
- break;
-
- // should never get here, but just in case...
- default:
- result = -1;
- break;
- }
-
- if (result < 0)
- return result;
-
- this->cur_bytes_ += new_item->total_size ();
- this->cur_length_ += new_item->total_length ();
-
- this->cur_count_++;
-
- if (this->signal_dequeue_waiters () == -1)
- return -1;
- else
- return this->cur_count_;
-}
-
-// Enqueue an <ACE_Message_Block *> in accordance with its priority.
-// priority may be *dynamic* or *static* or a combination or *both* It
-// calls the priority evaluation function passed into the Dynamic
-// Message Queue constructor to update the priorities of all enqueued
-// messages.
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::sublist_enqueue_i (ACE_Message_Block *new_item,
- const ACE_Time_Value &current_time,
- ACE_Message_Block *&sublist_head,
- ACE_Message_Block *&sublist_tail,
- ACE_Dynamic_Message_Strategy::Priority_Status status)
-{
- int result = 0;
- ACE_Message_Block *current_item = 0;
-
- // Find message after which to enqueue new item, based on message
- // priority and priority status.
- for (current_item = sublist_tail;
- current_item;
- current_item = current_item->prev ())
- {
- if (message_strategy_.priority_status (*current_item, current_time) == status)
- {
- if (current_item->msg_priority () >= new_item->msg_priority ())
- break;
- }
- else
- {
- sublist_head = new_item;
- break;
- }
- }
-
- if (current_item == 0)
- {
- // If the new message has highest priority of any, put it at the
- // head of the list (and sublist).
- new_item->prev (0);
- new_item->next (this->head_);
- if (this->head_ != 0)
- this->head_->prev (new_item);
- else
- {
- this->tail_ = new_item;
- sublist_tail = new_item;
- }
- this->head_ = new_item;
- sublist_head = new_item;
- }
- else
- {
- // insert the new item into the list
- new_item->next (current_item->next ());
- new_item->prev (current_item);
-
- if (current_item->next ())
- current_item->next ()->prev (new_item);
- else
- this->tail_ = new_item;
-
- current_item->next (new_item);
-
- // If the new item has lowest priority of any in the sublist,
- // move the tail pointer of the sublist back to the new item
- if (current_item == sublist_tail)
- sublist_tail = new_item;
- }
-
- return result;
-}
-
-// Enqueue a message in priority order within a given priority status
-// sublist.
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::dequeue_head_i (ACE_Message_Block *&first_item)
-{
- ACE_TRACE ("ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::dequeue_head_i");
-
- int result = 0;
- int last_in_subqueue = 0;
-
- // first, try to dequeue from the head of the pending list
- if (this->pending_head_)
- {
- first_item = this->pending_head_;
-
- if (0 == this->pending_head_->prev ())
- this->head_ = this->pending_head_->next ();
- else
- this->pending_head_->prev ()->next (this->pending_head_->next ());
-
- if (0 == this->pending_head_->next ())
- {
- this->tail_ = this->pending_head_->prev ();
- this->pending_head_ = 0;
- this->pending_tail_ = 0;
- }
- else
- {
- this->pending_head_->next ()->prev (this->pending_head_->prev ());
- this->pending_head_ = this->pending_head_->next ();
- }
-
- first_item->prev (0);
- first_item->next (0);
- }
-
- // Second, try to dequeue from the head of the late list
- else if (this->late_head_)
- {
- last_in_subqueue = this->late_head_ == this->late_tail_ ? 1 : 0;
-
- first_item = this->late_head_;
-
- if (0 == this->late_head_->prev ())
- this->head_ = this->late_head_->next ();
- else
- this->late_head_->prev ()->next (this->late_head_->next ());
-
- if (0 == this->late_head_->next ())
- this->tail_ = this->late_head_->prev ();
- else
- {
- this->late_head_->next ()->prev (this->late_head_->prev ());
- this->late_head_ = this->late_head_->next ();
- }
-
- if (last_in_subqueue)
- {
- this->late_head_ = 0;
- this->late_tail_ = 0;
- }
-
- first_item->prev (0);
- first_item->next (0);
- }
- // finally, try to dequeue from the head of the beyond late list
- else if (this->beyond_late_head_)
- {
- last_in_subqueue =
- (this->beyond_late_head_ == this->beyond_late_tail_) ? 1 : 0;
-
- first_item = this->beyond_late_head_;
- this->head_ = this->beyond_late_head_->next ();
-
- if (0 == this->beyond_late_head_->next ())
- this->tail_ = this->beyond_late_head_->prev ();
- else
- {
- this->beyond_late_head_->next ()->prev (this->beyond_late_head_->prev ());
- this->beyond_late_head_ = this->beyond_late_head_->next ();
- }
-
- if (last_in_subqueue)
- {
- this->beyond_late_head_ = 0;
- this->beyond_late_tail_ = 0;
- }
-
- first_item->prev (0);
- first_item->next (0);
- }
- else
- {
- // nothing to dequeue: set the pointer to zero and return an error code
- first_item = 0;
- result = -1;
- }
-
- if (result < 0)
- return result;
-
- // Make sure to subtract off all of the bytes associated with this
- // message.
- this->cur_bytes_ -= first_item->total_size ();
- this->cur_length_ -= first_item->total_length ();
-
- this->cur_count_--;
-
- // Only signal enqueueing threads if we've fallen below the low
- // water mark.
- if (this->cur_bytes_ <= this->low_water_mark_
- && this->signal_enqueue_waiters () == -1)
- return -1;
- else
- return this->cur_count_;
-}
-
-// Dequeue and return the <ACE_Message_Block *> at the head of the
-// logical queue. Attempts first to dequeue from the pending portion
-// of the queue, or if that is empty from the late portion, or if that
-// is empty from the beyond late portion, or if that is empty just
-// sets the passed pointer to zero and returns -1.
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_queue (const ACE_Time_Value &current_time)
-{
- int result;
-
- result = refresh_pending_queue (current_time);
-
- if (result != -1)
- result = refresh_late_queue (current_time);
-
- return result;
-}
-
-// Refresh the queue using the strategy specific priority status
-// function.
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_pending_queue (const ACE_Time_Value &current_time)
-{
- ACE_Dynamic_Message_Strategy::Priority_Status current_status;
-
- // refresh priority status boundaries in the queue
- if (this->pending_head_)
- {
- current_status = message_strategy_.priority_status (*this->pending_head_,
- current_time);
- switch (current_status)
- {
- case ACE_Dynamic_Message_Strategy::BEYOND_LATE:
- // Make sure the head of the beyond late queue is set (there
- // may not have been any beyond late messages previously)
- this->beyond_late_head_ = this->head_;
-
- // Zero out the late queue pointers, and set them only if
- // there turn out to be late messages in the pending sublist
- this->late_head_ = 0;
- this->late_tail_ = 0;
-
- // Advance through the beyond late messages in the pending queue
- do
- {
- this->pending_head_ = this->pending_head_->next ();
-
- if (this->pending_head_)
- current_status = message_strategy_.priority_status (*this->pending_head_,
- current_time);
- else
- break; // do while
-
- }
- while (current_status == ACE_Dynamic_Message_Strategy::BEYOND_LATE);
-
- if (this->pending_head_)
- {
- // point tail of beyond late sublist to previous item
- this->beyond_late_tail_ = this->pending_head_->prev ();
-
- if (current_status == ACE_Dynamic_Message_Strategy::PENDING)
- // there are no late messages left in the queue
- break; // switch
- else if (current_status != ACE_Dynamic_Message_Strategy::LATE)
- {
- // if we got here, something is *seriously* wrong with the queue
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unexpected message priority status [%d] (expected LATE)"),
- (int) current_status),
- -1);
- }
- /* FALLTHRU */
- }
- else
- {
- // There are no pending or late messages left in the
- // queue.
- this->beyond_late_tail_ = this->tail_;
- this->pending_head_ = 0;
- this->pending_tail_ = 0;
- break; // switch
- }
-
- case ACE_Dynamic_Message_Strategy::LATE:
- // Make sure the head of the late queue is set (there may
- // not have been any late messages previously, or they may
- // have all become beyond late).
- if (this->late_head_ == 0)
- this->late_head_ = this->pending_head_;
-
- // advance through the beyond late messages in the pending queue
- do
- {
- this->pending_head_ = this->pending_head_->next ();
-
- if (this->pending_head_)
- current_status = message_strategy_.priority_status (*this->pending_head_,
- current_time);
- else
- break; // do while
-
- }
- while (current_status == ACE_Dynamic_Message_Strategy::LATE);
-
- if (this->pending_head_)
- {
- if (current_status != ACE_Dynamic_Message_Strategy::PENDING)
- // if we got here, something is *seriously* wrong with the queue
- ACE_ERROR_RETURN((LM_ERROR,
- ACE_TEXT ("Unexpected message priority status [%d] (expected PENDING)"),
- (int) current_status),
- -1);
-
- // Point tail of late sublist to previous item
- this->late_tail_ = this->pending_head_->prev ();
- }
- else
- {
- // there are no pending messages left in the queue
- this->late_tail_ = this->tail_;
- this->pending_head_ = 0;
- this->pending_tail_ = 0;
- }
-
- break; // switch
- case ACE_Dynamic_Message_Strategy::PENDING:
- // do nothing - the pending queue is unchanged
- break; // switch
- default:
- // if we got here, something is *seriously* wrong with the queue
- ACE_ERROR_RETURN((LM_ERROR,
- ACE_TEXT ("Unknown message priority status [%d]"),
- (int) current_status),
- -1);
- }
- }
- return 0;
-}
-
-// Refresh the pending queue using the strategy specific priority
-// status function.
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::refresh_late_queue (const ACE_Time_Value &current_time)
-{
- ACE_Dynamic_Message_Strategy::Priority_Status current_status;
-
- if (this->late_head_)
- {
- current_status = message_strategy_.priority_status (*this->late_head_,
- current_time);
- switch (current_status)
- {
- case ACE_Dynamic_Message_Strategy::BEYOND_LATE:
-
- // make sure the head of the beyond late queue is set
- // (there may not have been any beyond late messages previously)
- this->beyond_late_head_ = this->head_;
-
- // advance through the beyond late messages in the late queue
- do
- {
- this->late_head_ = this->late_head_->next ();
-
- if (this->late_head_)
- current_status = message_strategy_.priority_status (*this->late_head_,
- current_time);
- else
- break; // do while
-
- }
- while (current_status == ACE_Dynamic_Message_Strategy::BEYOND_LATE);
-
- if (this->late_head_)
- {
- // point tail of beyond late sublist to previous item
- this->beyond_late_tail_ = this->late_head_->prev ();
-
- if (current_status == ACE_Dynamic_Message_Strategy::PENDING)
- {
- // there are no late messages left in the queue
- this->late_head_ = 0;
- this->late_tail_ = 0;
- }
- else if (current_status != ACE_Dynamic_Message_Strategy::LATE)
- // if we got here, something is *seriously* wrong with the queue
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unexpected message priority status [%d] (expected LATE)"),
- (int) current_status),
- -1);
- }
- else
- {
- // there are no late messages left in the queue
- this->beyond_late_tail_ = this->tail_;
- this->late_head_ = 0;
- this->late_tail_ = 0;
- }
-
- break; // switch
-
- case ACE_Dynamic_Message_Strategy::LATE:
- // do nothing - the late queue is unchanged
- break; // switch
-
- case ACE_Dynamic_Message_Strategy::PENDING:
- // if we got here, something is *seriously* wrong with the queue
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unexpected message priority status ")
- ACE_TEXT ("[%d] (expected LATE or BEYOND_LATE)"),
- (int) current_status),
- -1);
- default:
- // if we got here, something is *seriously* wrong with the queue
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unknown message priority status [%d]"),
- (int) current_status),
- -1);
- }
- }
-
- return 0;
-}
-
-// Refresh the late queue using the strategy specific priority status
-// function.
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::peek_dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout)
-{
- return ACE_Message_Queue<ACE_SYNCH_USE>::peek_dequeue_head (first_item,
- timeout);
-}
-
-// Private method to hide public base class method: just calls base
-// class method.
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::enqueue_tail (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::enqueue_tail");
- return this->enqueue_prio (new_item, timeout);
-}
-
-// Just call priority enqueue method: tail enqueue semantics for
-// dynamic message queues are unstable: the message may or may not be
-// where it was placed after the queue is refreshed prior to the next
-// enqueue or dequeue operation.
-
-template <ACE_SYNCH_DECL> int
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::enqueue_head (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Dynamic_Message_Queue<ACE_SYNCH_USE>::enqueue_head");
- return this->enqueue_prio (new_item, timeout);
-}
-
-// Just call priority enqueue method: head enqueue semantics for
-// dynamic message queues are unstable: the message may or may not be
-// where it was placed after the queue is refreshed prior to the next
-// enqueue or dequeue operation.
-
-template <ACE_SYNCH_DECL>
-ACE_Message_Queue<ACE_SYNCH_USE> *
-ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_static_message_queue (size_t hwm,
- size_t lwm,
- ACE_Notification_Strategy *ns)
-{
- ACE_Message_Queue<ACE_SYNCH_USE> *tmp;
-
- ACE_NEW_RETURN (tmp,
- ACE_Message_Queue<ACE_SYNCH_USE> (hwm, lwm, ns),
- 0);
- return tmp;
-}
-
-// Factory method for a statically prioritized ACE_Message_Queue.
-
-template <ACE_SYNCH_DECL>
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> *
-ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_deadline_message_queue (size_t hwm,
- size_t lwm,
- ACE_Notification_Strategy *ns,
- u_long static_bit_field_mask,
- u_long static_bit_field_shift,
- u_long dynamic_priority_max,
- u_long dynamic_priority_offset)
-{
- ACE_Deadline_Message_Strategy *adms;
-
- ACE_NEW_RETURN (adms,
- ACE_Deadline_Message_Strategy (static_bit_field_mask,
- static_bit_field_shift,
- dynamic_priority_max,
- dynamic_priority_offset),
- 0);
-
- ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> *tmp;
- ACE_NEW_RETURN (tmp,
- ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> (*adms, hwm, lwm, ns),
- 0);
- return tmp;
-}
-
-// Factory method for a dynamically prioritized (by time to deadline)
-// ACE_Dynamic_Message_Queue.
-
-template <ACE_SYNCH_DECL>
-ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> *
-ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_laxity_message_queue (size_t hwm,
- size_t lwm,
- ACE_Notification_Strategy *ns,
- u_long static_bit_field_mask,
- u_long static_bit_field_shift,
- u_long dynamic_priority_max,
- u_long dynamic_priority_offset)
-{
- ACE_Laxity_Message_Strategy *alms;
-
- ACE_NEW_RETURN (alms,
- ACE_Laxity_Message_Strategy (static_bit_field_mask,
- static_bit_field_shift,
- dynamic_priority_max,
- dynamic_priority_offset),
- 0);
-
- ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> *tmp;
- ACE_NEW_RETURN (tmp,
- ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> (*alms, hwm, lwm, ns),
- 0);
- return tmp;
-}
-
-// Factory method for a dynamically prioritized (by laxity)
-// <ACE_Dynamic_Message_Queue>.
-
-#if defined (VXWORKS)
-
-template <ACE_SYNCH_DECL>
-ACE_Message_Queue_Vx *
-ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_Vx_message_queue (size_t max_messages,
- size_t max_message_length,
- ACE_Notification_Strategy *ns)
-{
- ACE_Message_Queue_Vx *tmp;
-
- ACE_NEW_RETURN (tmp,
- ACE_Message_Queue_Vx (max_messages, max_message_length, ns),
- 0);
- return tmp;
-}
- // factory method for a wrapped VxWorks message queue
-
-#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
-
-template <ACE_SYNCH_DECL>
-ACE_Message_Queue_NT *
-ACE_Message_Queue_Factory<ACE_SYNCH_USE>::create_NT_message_queue (size_t max_threads)
-{
- ACE_Message_Queue_NT *tmp;
-
- ACE_NEW_RETURN (tmp,
- ACE_Message_Queue_NT (max_threads);
- 0);
- return tmp;
-}
-
-#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
-#endif /* defined (VXWORKS) */
-#endif /* ACE_MESSAGE_QUEUE_T_C */
diff --git a/ace/Message_Queue_T.h b/ace/Message_Queue_T.h
deleted file mode 100644
index 51db6122ba6..00000000000
--- a/ace/Message_Queue_T.h
+++ /dev/null
@@ -1,709 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Message_Queue_T.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_MESSAGE_QUEUE_T_H
-#define ACE_MESSAGE_QUEUE_T_H
-#include "ace/pre.h"
-
-#include "ace/Synch.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (VXWORKS)
-class ACE_Message_Queue_Vx;
-#endif /* defined (VXWORKS) */
-
-#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
-class ACE_Message_Queue_NT;
-#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
-
-template <ACE_SYNCH_DECL>
-class ACE_Message_Queue : public ACE_Message_Queue_Base
-{
- // = TITLE
- // A threaded message queueing facility, modeled after the
- // queueing facilities in System V STREAMs.
- //
- // = DESCRIPTION
- // An <ACE_Message_Queue> is the central queueing facility for
- // messages in the ASX framework. If <ACE_SYNCH_DECL> is
- // <ACE_MT_SYNCH> then all operations are thread-safe.
- // Otherwise, if it's <ACE_NULL_SYNCH> then there's no locking
- // overhead.
-public:
- friend class ACE_Message_Queue_Iterator<ACE_SYNCH_USE>;
- friend class ACE_Message_Queue_Reverse_Iterator<ACE_SYNCH_USE>;
-
- // = Traits
- typedef ACE_Message_Queue_Iterator<ACE_SYNCH_USE>
- ITERATOR;
- typedef ACE_Message_Queue_Reverse_Iterator<ACE_SYNCH_USE>
- REVERSE_ITERATOR;
-
- // = Initialization and termination methods.
- ACE_Message_Queue (size_t high_water_mark = ACE_Message_Queue_Base::DEFAULT_HWM,
- size_t low_water_mark = ACE_Message_Queue_Base::DEFAULT_LWM,
- ACE_Notification_Strategy * = 0);
- // Initialize an <ACE_Message_Queue>. The <high_water_mark>
- // determines how many bytes can be stored in a queue before it's
- // considered "full." Supplier threads must block until the queue
- // is no longer full. The <low_water_mark> determines how many
- // bytes must be in the queue before supplier threads are allowed to
- // enqueue additional <ACE_Message_Block>s. By default, the
- // <high_water_mark> equals the <low_water_mark>, which means that
- // suppliers will be able to enqueue new messages as soon as a
- // consumer removes any message from the queue. Making the
- // <low_water_mark> smaller than the <high_water_mark> forces
- // consumers to drain more messages from the queue before suppliers
- // can enqueue new messages, which can minimize the "silly window
- // syndrome."
-
- virtual int open (size_t hwm = ACE_Message_Queue_Base::DEFAULT_HWM,
- size_t lwm = ACE_Message_Queue_Base::DEFAULT_LWM,
- ACE_Notification_Strategy * = 0);
- // Initialize an <ACE_Message_Queue>. The <high_water_mark>
- // determines how many bytes can be stored in a queue before it's
- // considered "full." Supplier threads must block until the queue
- // is no longer full. The <low_water_mark> determines how many
- // bytes must be in the queue before supplier threads are allowed to
- // enqueue additional <ACE_Message_Block>s. By default, the
- // <high_water_mark> equals the <low_water_mark>, which means that
- // suppliers will be able to enqueue new messages as soon as a
- // consumer removes any message from the queue. Making the
- // <low_water_mark> smaller than the <high_water_mark> forces
- // consumers to drain more messages from the queue before suppliers
- // can enqueue new messages, which can minimize the "silly window
- // syndrome."
-
- virtual int close (void);
- // Close down the message queue and release all resources.
-
- virtual ~ACE_Message_Queue (void);
- // Close down the message queue and release all resources.
-
- // = Enqueue and dequeue methods.
-
- // For the following enqueue and dequeue methods if <timeout> == 0,
- // the caller will block until action is possible, else will wait
- // until the absolute time specified in *<timeout> elapses). These
- // calls will return, however, when queue is closed, deactivated,
- // when a signal occurs, or if the time specified in timeout
- // elapses, (in which case errno = EWOULDBLOCK).
-
- virtual int peek_dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout = 0);
- // Retrieve the first <ACE_Message_Block> without removing it. Note
- // that <timeout> uses <{absolute}> time rather than <{relative}>
- // time. If the <timeout> elapses without receiving a message -1 is
- // returned and <errno> is set to <EWOULDBLOCK>. If the queue is
- // deactivated -1 is returned and <errno> is set to <ESHUTDOWN>.
- // Otherwise, returns -1 on failure, else the number of items still
- // on the queue.
-
- virtual int enqueue_prio (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout = 0);
- // Enqueue an <ACE_Message_Block *> into the <Message_Queue> in
- // accordance with its <msg_priority> (0 is lowest priority). FIFO
- // order is maintained when messages of the same priority are
- // inserted consecutively. Note that <timeout> uses <{absolute}>
- // time rather than <{relative}> time. If the <timeout> elapses
- // without receiving a message -1 is returned and <errno> is set to
- // <EWOULDBLOCK>. If the queue is deactivated -1 is returned and
- // <errno> is set to <ESHUTDOWN>. Otherwise, returns -1 on failure,
- // else the number of items still on the queue.
-
- virtual int enqueue (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout = 0);
- // This is an alias for <enqueue_prio>. It's only here for
- // backwards compatibility and will go away in a subsequent release.
- // Please use <enqueue_prio> instead. Note that <timeout> uses
- // <{absolute}> time rather than <{relative}> time.
-
- virtual int enqueue_tail (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout = 0);
- // Enqueue an <ACE_Message_Block *> at the end of the queue. Note
- // that <timeout> uses <{absolute}> time rather than <{relative}>
- // time. If the <timeout> elapses without receiving a message -1 is
- // returned and <errno> is set to <EWOULDBLOCK>. If the queue is
- // deactivated -1 is returned and <errno> is set to <ESHUTDOWN>.
- // Otherwise, returns -1 on failure, else the number of items still
- // on the queue.
-
- virtual int enqueue_head (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout = 0);
- // Enqueue an <ACE_Message_Block *> at the head of the queue. Note
- // that <timeout> uses <{absolute}> time rather than <{relative}>
- // time. If the <timeout> elapses without receiving a message -1 is
- // returned and <errno> is set to <EWOULDBLOCK>. If the queue is
- // deactivated -1 is returned and <errno> is set to <ESHUTDOWN>.
- // Otherwise, returns -1 on failure, else the number of items still
- // on the queue.
-
- virtual int dequeue (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout = 0);
- // This method is an alias for the following <dequeue_head> method.
-
- virtual int dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout = 0);
- // Dequeue and return the <ACE_Message_Block *> at the head of the
- // queue. Note that <timeout> uses <{absolute}> time rather than
- // <{relative}> time. If the <timeout> elapses without receiving a
- // message -1 is returned and <errno> is set to <EWOULDBLOCK>. If
- // the queue is deactivated -1 is returned and <errno> is set to
- // <ESHUTDOWN>. Otherwise, returns -1 on failure, else the number
- // of items still on the queue.
-
- // = Check if queue is full/empty.
- virtual int is_full (void);
- // True if queue is full, else false.
- virtual int is_empty (void);
- // True if queue is empty, else false.
-
- // = Queue statistic methods.
- virtual size_t message_bytes (void);
- // Number of total bytes on the queue, i.e., sum of the message
- // block sizes.
- virtual size_t message_length (void);
- // Number of total length on the queue, i.e., sum of the message
- // block lengths.
- virtual size_t message_count (void);
- // Number of total messages on the queue.
-
- // = Manual changes to these stats (used when queued message blocks
- // change size or lengths).
- virtual void message_bytes (size_t new_size);
- // New value of the number of total bytes on the queue, i.e., sum of
- // the message block sizes.
- virtual void message_length (size_t new_length);
- // New value of the number of total length on the queue, i.e., sum
- // of the message block lengths.
-
- // = Flow control methods.
-
- virtual size_t high_water_mark (void);
- // Get high watermark.
- virtual void high_water_mark (size_t hwm);
- // Set the high watermark, which determines how many bytes can be
- // stored in a queue before it's considered "full."
-
- virtual size_t low_water_mark (void);
- // Get low watermark.
- virtual void low_water_mark (size_t lwm);
- // Set the low watermark, which determines how many bytes must be in
- // the queue before supplier threads are allowed to enqueue
- // additional <ACE_Message_Block>s.
-
- // = Activation control methods.
-
- virtual int deactivate (void);
- // Deactivate the queue and wakeup all threads waiting on the queue
- // so they can continue. No messages are removed from the queue,
- // however. Any other operations called until the queue is
- // activated again will immediately return -1 with <errno> ==
- // ESHUTDOWN. Returns WAS_INACTIVE if queue was inactive before the
- // call and WAS_ACTIVE if queue was active before the call.
-
- virtual int activate (void);
- // Reactivate the queue so that threads can enqueue and dequeue
- // messages again. Returns WAS_INACTIVE if queue was inactive
- // before the call and WAS_ACTIVE if queue was active before the
- // call.
-
- virtual int deactivated (void);
- // Returns true if <deactivated_> is enabled.
-
- // = Notification hook.
-
- virtual int notify (void);
- // This hook is automatically invoked by <enqueue_head>,
- // <enqueue_tail>, and <enqueue_prio> when a new item is inserted
- // into the queue. Subclasses can override this method to perform
- // specific notification strategies (e.g., signaling events for a
- // <WFMO_Reactor>, notifying a <Reactor>, etc.). In a
- // multi-threaded application with concurrent consumers, there is no
- // guarantee that the queue will be still be non-empty by the time
- // the notification occurs.
-
- // = Get/set the notification strategy for the <Message_Queue>
- virtual ACE_Notification_Strategy *notification_strategy (void);
- virtual void notification_strategy (ACE_Notification_Strategy *s);
-
- ACE_SYNCH_MUTEX_T &lock (void);
- // Returns a reference to the lock used by the <ACE_Message_Queue>.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Routines that actually do the enqueueing and dequeueing.
-
- // These routines assume that locks are held by the corresponding
- // public methods. Since they are virtual, you can change the
- // queueing mechanism by subclassing from <ACE_Message_Queue>.
-
- virtual int enqueue_i (ACE_Message_Block *new_item);
- // Enqueue an <ACE_Message_Block *> in accordance with its priority.
-
- virtual int enqueue_tail_i (ACE_Message_Block *new_item);
- // Enqueue an <ACE_Message_Block *> at the end of the queue.
-
- virtual int enqueue_head_i (ACE_Message_Block *new_item);
- // Enqueue an <ACE_Message_Block *> at the head of the queue.
-
- virtual int dequeue_head_i (ACE_Message_Block *&first_item);
- // Dequeue and return the <ACE_Message_Block *> at the head of the
- // queue.
-
- // = Check the boundary conditions (assumes locks are held).
-
- virtual int is_full_i (void);
- // True if queue is full, else false.
-
- virtual int is_empty_i (void);
- // True if queue is empty, else false.
-
- // = Implementation of the public <activate> and <deactivate> methods.
-
- // These methods assume locks are held.
-
- virtual int deactivate_i (void);
- // Deactivate the queue.
-
- virtual int activate_i (void);
- // Activate the queue.
-
- // = Helper methods to factor out common #ifdef code.
-
- virtual int wait_not_full_cond (ACE_Guard<ACE_SYNCH_MUTEX_T> &mon,
- ACE_Time_Value *timeout);
- // Wait for the queue to become non-full.
-
- virtual int wait_not_empty_cond (ACE_Guard<ACE_SYNCH_MUTEX_T> &mon,
- ACE_Time_Value *timeout);
- // Wait for the queue to become non-empty.
-
- virtual int signal_enqueue_waiters (void);
- // Inform any threads waiting to enqueue that they can procede.
-
- virtual int signal_dequeue_waiters (void);
- // Inform any threads waiting to dequeue that they can procede.
-
- ACE_Message_Block *head_;
- // Pointer to head of ACE_Message_Block list.
-
- ACE_Message_Block *tail_;
- // Pointer to tail of ACE_Message_Block list.
-
- size_t low_water_mark_;
- // Lowest number before unblocking occurs.
-
- size_t high_water_mark_;
- // Greatest number of bytes before blocking.
-
- size_t cur_bytes_;
- // Current number of bytes in the queue.
-
- size_t cur_length_;
- // Current length of messages in the queue.
-
- size_t cur_count_;
- // Current number of messages in the queue.
-
- int deactivated_;
- // Indicates that the queue is inactive.
-
- ACE_Notification_Strategy *notification_strategy_;
- // The notification strategy used when a new message is enqueued.
-
- // = Synchronization primitives for controlling concurrent access.
- ACE_SYNCH_MUTEX_T lock_;
- // Protect queue from concurrent access.
-
-#if defined (ACE_HAS_OPTIMIZED_MESSAGE_QUEUE)
- ACE_SYNCH_SEMAPHORE_T not_empty_cond_;
- // Used to make threads sleep until the queue is no longer empty.
-
- ACE_SYNCH_SEMAPHORE_T not_full_cond_;
- // Used to make threads sleep until the queue is no longer full.
-
- size_t dequeue_waiters_;
- // Number of threads waiting to dequeue a <Message_Block>.
-
- size_t enqueue_waiters_;
- // Number of threads waiting to enqueue a <Message_Block>.
-#else
- ACE_SYNCH_CONDITION_T not_empty_cond_;
- // Used to make threads sleep until the queue is no longer empty.
-
- ACE_SYNCH_CONDITION_T not_full_cond_;
- // Used to make threads sleep until the queue is no longer full.
-#endif /* ACE_HAS_OPTIMIZED_MESSAGE_QUEUE */
-
-private:
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Message_Queue<ACE_SYNCH_USE> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Message_Queue (const ACE_Message_Queue<ACE_SYNCH_USE> &))
-};
-
-template <ACE_SYNCH_DECL>
-class ACE_Message_Queue_Iterator
-{
- // = TITLE
- // Iterator for the <ACE_Message_Queue>.
-public:
- // = Initialization method.
- ACE_Message_Queue_Iterator (ACE_Message_Queue <ACE_SYNCH_USE> &queue);
-
- // = Iteration methods.
- int next (ACE_Message_Block *&entry);
- // Pass back the <entry> that hasn't been seen in the queue.
- // Returns 0 when all items have been seen, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- int advance (void);
- // Move forward by one element in the queue. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Message_Queue <ACE_SYNCH_USE> &queue_;
- // Message_Queue we are iterating over.
-
- ACE_Message_Block *curr_;
- // Keeps track of how far we've advanced...
-};
-
-template <ACE_SYNCH_DECL>
-class ACE_Message_Queue_Reverse_Iterator
-{
- // = TITLE
- // Reverse Iterator for the <ACE_Message_Queue>.
-public:
- // = Initialization method.
- ACE_Message_Queue_Reverse_Iterator (ACE_Message_Queue <ACE_SYNCH_USE> &queue);
-
- // = Iteration methods.
- int next (ACE_Message_Block *&entry);
- // Pass back the <entry> that hasn't been seen in the queue.
- // Returns 0 when all items have been seen, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- int advance (void);
- // Move forward by one element in the queue. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Message_Queue <ACE_SYNCH_USE> &queue_;
- // Message_Queue we are iterating over.
-
- ACE_Message_Block *curr_;
- // Keeps track of how far we've advanced...
-};
-
-template <ACE_SYNCH_DECL>
-class ACE_Dynamic_Message_Queue : public ACE_Message_Queue<ACE_SYNCH_USE>
-{
- // = TITLE
- // A derived class which adapts the <ACE_Message_Queue>
- // class in order to maintain dynamic priorities for enqueued
- // <ACE_Message_Blocks> and manage the queue order according
- // to these dynamic priorities.
- //
- // = DESCRIPTION
- //
- // The messages in the queue are managed so as to preserve
- // a logical ordering with minimal overhead per enqueue and
- // dequeue operation. For this reason, the actual order of
- // messages in the linked list of the queue may differ from
- // their priority order. As time passes, a message may change
- // from pending status to late status, and eventually to beyond
- // late status. To minimize reordering overhead under this
- // design force, three separate boundaries are maintained
- // within the linked list of messages. Messages are dequeued
- // preferentially from the head of the pending portion, then
- // the head of the late portion, and finally from the head
- // of the beyond late portion. In this way, only the boundaries
- // need to be maintained (which can be done efficiently, as
- // aging messages maintain the same linked list order as they
- // progress from one status to the next), with no reordering
- // of the messages themselves, while providing correct priority
- // ordered dequeueing semantics.
- //
- // Head and tail enqueue methods inherited from ACE_Message_Queue
- // are made private to prevent out-of-order messages from confusing
- // management of the various portions of the queue. Messages in
- // the pending portion of the queue whose priority becomes late
- // (according to the specific dynamic strategy) advance into
- // the late portion of the queue. Messages in the late portion
- // of the queue whose priority becomes later than can be represented
- // advance to the beyond_late portion of the queue. These behaviors
- // support a limited schedule overrun, with pending messages prioritized
- // ahead of late messages, and late messages ahead of beyond late
- // messages. These behaviors can be modified in derived classes by
- // providing alternative definitions for the appropriate virtual methods.
- //
- // When filled with messages, the queue's linked list should look like:
- //
- // H T
- // | |
- //
- // B - B - B - B - L - L - L - P - P - P - P - P
- //
- // | | | | | |
- // BH BT LH LT PH PT
- //
- // Where the symbols are as follows:
- //
- // H = Head of the entire list
- // T = Tail of the entire list
- // B = Beyond late message
- // BH = Beyond late messages Head
- // BT = Beyond late messages Tail
- // L = Late message
- // LH = Late messages Head
- // LT = Late messages Tail
- // P = Pending message
- // PH = Pending messages Head
- // PT = Pending messages Tail
- //
- // Caveat: the virtual methods enqueue_tail, enqueue_head,
- // and peek_dequeue_head have semantics for the static
- // message queues that cannot be guaranteed for dynamic
- // message queues. The peek_dequeue_head method just
- // calls the base class method, while the two enqueue
- // methods call the priority enqueue method. The
- // order of messages in the dynamic queue is a function
- // of message deadlines and how long they are in the
- // queues. You can manipulate these in some cases to
- // ensure the correct semantics, but that is not a
- // very stable or portable approach (discouraged).
- //
-public:
- // = Initialization and termination methods.
- ACE_Dynamic_Message_Queue (ACE_Dynamic_Message_Strategy & message_strategy,
- size_t hwm = ACE_Message_Queue_Base::DEFAULT_HWM,
- size_t lwm = ACE_Message_Queue_Base::DEFAULT_LWM,
- ACE_Notification_Strategy * = 0);
-
- virtual ~ACE_Dynamic_Message_Queue (void);
- // Close down the message queue and release all resources.
-
- virtual int remove_messages (ACE_Message_Block *&list_head,
- ACE_Message_Block *&list_tail,
- u_int status_flags);
- // Detach all messages with status given in the passed flags from
- // the queue and return them by setting passed head and tail pointers
- // to the linked list they comprise. This method is intended primarily
- // as a means of periodically harvesting messages that have missed
- // their deadlines, but is available in its most general form. All
- // messages are returned in priority order, from head to tail, as of
- // the time this method was called.
-
- virtual int dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout = 0);
- // Dequeue and return the <ACE_Message_Block *> at the head of the
- // queue. Returns -1 on failure, else the number of items still on
- // the queue.
-
- virtual void dump (void) const;
- // Dump the state of the queue.
-
- virtual int enqueue_tail (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout = 0);
- // just call priority enqueue method: tail enqueue semantics for dynamic
- // message queues are unstable: the message may or may not be where
- // it was placed after the queue is refreshed prior to the next
- // enqueue or dequeue operation.
-
- virtual int enqueue_head (ACE_Message_Block *new_item,
- ACE_Time_Value *timeout = 0);
- // just call priority enqueue method: head enqueue semantics for dynamic
- // message queues are unstable: the message may or may not be where
- // it was placed after the queue is refreshed prior to the next
- // enqueue or dequeue operation.
-
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
-
- virtual int enqueue_i (ACE_Message_Block *new_item);
- // Enqueue an <ACE_Message_Block *> in accordance with its priority.
- // priority may be *dynamic* or *static* or a combination or *both*
- // It calls the priority evaluation function passed into the Dynamic
- // Message Queue constructor to update the priorities of all
- // enqueued messages.
-
- virtual int sublist_enqueue_i (ACE_Message_Block *new_item,
- const ACE_Time_Value &current_time,
- ACE_Message_Block *&sublist_head,
- ACE_Message_Block *&sublist_tail,
- ACE_Dynamic_Message_Strategy::Priority_Status status);
- // enqueue a message in priority order within a given priority status sublist
-
- virtual int dequeue_head_i (ACE_Message_Block *&first_item);
- // Dequeue and return the <ACE_Message_Block *> at the head of the
- // logical queue. Attempts first to dequeue from the pending
- // portion of the queue, or if that is empty from the late portion,
- // or if that is empty from the beyond late portion, or if that is
- // empty just sets the passed pointer to zero and returns -1.
-
- virtual int refresh_queue (const ACE_Time_Value & current_time);
- // Refresh the queue using the strategy
- // specific priority status function.
-
- virtual int refresh_pending_queue (const ACE_Time_Value & current_time);
- // Refresh the pending queue using the strategy
- // specific priority status function.
-
- virtual int refresh_late_queue (const ACE_Time_Value & current_time);
- // Refresh the late queue using the strategy
- // specific priority status function.
-
- ACE_Message_Block *pending_head_;
- // Pointer to head of the pending messages
-
- ACE_Message_Block *pending_tail_;
- // Pointer to tail of the pending messages
-
- ACE_Message_Block *late_head_;
- // Pointer to head of the late messages
-
- ACE_Message_Block *late_tail_;
- // Pointer to tail of the late messages
-
- ACE_Message_Block *beyond_late_head_;
- // Pointer to head of the beyond late messages
-
- ACE_Message_Block *beyond_late_tail_;
- // Pointer to tail of the beyond late messages
-
- ACE_Dynamic_Message_Strategy &message_strategy_;
- // Pointer to a dynamic priority evaluation function.
-
-private:
- // = Disallow public access to these operations.
-
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Dynamic_Message_Queue (const ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> &))
-
- // provide definitions for these (just call base class method),
- // but make them private so they're not accessible outside the class
-
- virtual int peek_dequeue_head (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout = 0);
- // private method to hide public base class method: just calls base class method
-
-};
-
-template <ACE_SYNCH_DECL>
-class ACE_Message_Queue_Factory
-{
- // = TITLE
- // ACE_Message_Queue_Factory is a static factory class template which
- // provides a separate factory method for each of the major kinds of
- // priority based message dispatching: static, earliest deadline first
- // (EDF), and minimum laxity first (MLF).
- //
- // = DESCRIPTION
- // The ACE_Dynamic_Message_Queue class assumes responsibility for
- // releasing the resources of the strategy with which it was
- // constructed: the user of a message queue constructed by
- // any of these factory methods is only responsible for
- // ensuring destruction of the message queue itself.
-
-public:
- static ACE_Message_Queue<ACE_SYNCH_USE> *
- create_static_message_queue (size_t hwm = ACE_Message_Queue_Base::DEFAULT_HWM,
- size_t lwm = ACE_Message_Queue_Base::DEFAULT_LWM,
- ACE_Notification_Strategy * = 0);
- // factory method for a statically prioritized ACE_Message_Queue
-
- static ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> *
- create_deadline_message_queue (size_t hwm = ACE_Message_Queue_Base::DEFAULT_HWM,
- size_t lwm = ACE_Message_Queue_Base::DEFAULT_LWM,
- ACE_Notification_Strategy * = 0,
- u_long static_bit_field_mask = 0x3FFUL, // 2^(10) - 1
- u_long static_bit_field_shift = 10, // 10 low order bits
- u_long dynamic_priority_max = 0x3FFFFFUL, // 2^(22)-1
- u_long dynamic_priority_offset = 0x200000UL); // 2^(22-1)
- // factory method for a dynamically prioritized (by time to deadline) ACE_Dynamic_Message_Queue
-
- static ACE_Dynamic_Message_Queue<ACE_SYNCH_USE> *
- create_laxity_message_queue (size_t hwm = ACE_Message_Queue_Base::DEFAULT_HWM,
- size_t lwm = ACE_Message_Queue_Base::DEFAULT_LWM,
- ACE_Notification_Strategy * = 0,
- u_long static_bit_field_mask = 0x3FFUL, // 2^(10) - 1
- u_long static_bit_field_shift = 10, // 10 low order bits
- u_long dynamic_priority_max = 0x3FFFFFUL, // 2^(22)-1
- u_long dynamic_priority_offset = 0x200000UL); // 2^(22-1)
- // factory method for a dynamically prioritized (by laxity) ACE_Dynamic_Message_Queue
-
-
-#if defined (VXWORKS)
-
- static ACE_Message_Queue_Vx *
- create_Vx_message_queue (size_t max_messages, size_t max_message_length,
- ACE_Notification_Strategy *ns = 0);
- // factory method for a wrapped VxWorks message queue
-
-#endif /* defined (VXWORKS) */
-
-#if defined (ACE_WIN32) && (ACE_HAS_WINNT4 != 0)
-
- static ACE_Message_Queue_NT *
- create_NT_message_queue (size_t max_threads);
- // factory method for a NT message queue.
-
-#endif /* ACE_WIN32 && ACE_HAS_WINNT4 != 0 */
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Message_Queue_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Message_Queue_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Message_Queue_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_MESSAGE_QUEUE_T_H */
diff --git a/ace/Message_Queue_T.i b/ace/Message_Queue_T.i
deleted file mode 100644
index 403b11a75a9..00000000000
--- a/ace/Message_Queue_T.i
+++ /dev/null
@@ -1,163 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Message_Queue<ACE_SYNCH_USE>::dequeue (ACE_Message_Block *&first_item,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::notification_strategy");
- return this->dequeue_head (first_item, timeout);
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE ACE_Notification_Strategy *
-ACE_Message_Queue<ACE_SYNCH_USE>::notification_strategy (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::notification_strategy");
-
- return this->notification_strategy_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE void
-ACE_Message_Queue<ACE_SYNCH_USE>::notification_strategy (ACE_Notification_Strategy *s)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::notification_strategy");
-
- this->notification_strategy_ = s;
-}
-
-// Check if queue is empty (does not hold locks).
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Message_Queue<ACE_SYNCH_USE>::is_empty_i (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::is_empty_i");
- return this->tail_ == 0;
-}
-
-// Check if queue is full (does not hold locks).
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Message_Queue<ACE_SYNCH_USE>::is_full_i (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::is_full_i");
- return this->cur_bytes_ > this->high_water_mark_;
-}
-
-// Check if queue is empty (holds locks).
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Message_Queue<ACE_SYNCH_USE>::is_empty (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::is_empty");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- return this->is_empty_i ();
-}
-
-// Check if queue is full (holds locks).
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Message_Queue<ACE_SYNCH_USE>::is_full (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::is_full");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- return this->is_full_i ();
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE size_t
-ACE_Message_Queue<ACE_SYNCH_USE>::high_water_mark (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::high_water_mark");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, 0);
-
- return this->high_water_mark_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE void
-ACE_Message_Queue<ACE_SYNCH_USE>::high_water_mark (size_t hwm)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::high_water_mark");
- ACE_GUARD (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_);
-
- this->high_water_mark_ = hwm;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE size_t
-ACE_Message_Queue<ACE_SYNCH_USE>::low_water_mark (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::low_water_mark");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, 0);
-
- return this->low_water_mark_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE void
-ACE_Message_Queue<ACE_SYNCH_USE>::low_water_mark (size_t lwm)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::low_water_mark");
- ACE_GUARD (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_);
-
- this->low_water_mark_ = lwm;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE size_t
-ACE_Message_Queue<ACE_SYNCH_USE>::message_bytes (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_bytes");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, 0);
-
- return this->cur_bytes_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE size_t
-ACE_Message_Queue<ACE_SYNCH_USE>::message_length (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_length");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, 0);
-
- return this->cur_length_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE size_t
-ACE_Message_Queue<ACE_SYNCH_USE>::message_count (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::message_count");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, 0);
-
- return this->cur_count_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Message_Queue<ACE_SYNCH_USE>::activate (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::activate");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- return this->activate_i ();
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Message_Queue<ACE_SYNCH_USE>::deactivate (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::deactivate");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- return this->deactivate_i ();
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Message_Queue<ACE_SYNCH_USE>::deactivated (void)
-{
- ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::deactivated");
-
- return this->deactivated_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE ACE_SYNCH_MUTEX_T &
-ACE_Message_Queue<ACE_SYNCH_USE>::lock (void)
-{
- return this->lock_;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Message_Queue_Reverse_Iterator)
diff --git a/ace/Method_Object.h b/ace/Method_Object.h
deleted file mode 100644
index 5f992bb2d04..00000000000
--- a/ace/Method_Object.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Method_Object.h
-//
-// = DESCRIPTION
-// This file just #includes "ace/Method_Request.h" and is just here
-// for backwards compatibility with earlier versions of ACE.
-// Please don't use it directly since it may go away at some point.
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_METHOD_OBJECT_H
-#define ACE_METHOD_OBJECT_H
-#include "ace/pre.h"
-
-#include "ace/Method_Request.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Maintain backwards compatibility so that Steve Huston doesn't go
-// postal... ;-)
-typedef ACE_Method_Request ACE_Method_Object;
-
-#include "ace/post.h"
-#endif /* ACE_METHOD_OBJECT_H */
diff --git a/ace/Method_Request.cpp b/ace/Method_Request.cpp
deleted file mode 100644
index 22b5d64873a..00000000000
--- a/ace/Method_Request.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// Method_Request.cpp
-// $Id$
-
-#include "ace/Method_Request.h"
-
-ACE_RCSID(ace, Method_Request, "$Id$")
-
-ACE_Method_Request::ACE_Method_Request (u_long prio)
- : priority_ (prio)
-{
-}
-
-ACE_Method_Request::~ACE_Method_Request (void)
-{
-}
-
-u_long
-ACE_Method_Request::priority (void)
-{
- return this->priority_;
-}
-
-void
-ACE_Method_Request::priority (u_long prio)
-{
- this->priority_ = prio;
-}
diff --git a/ace/Method_Request.h b/ace/Method_Request.h
deleted file mode 100644
index 69739e39ffe..00000000000
--- a/ace/Method_Request.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Method_Request.h
-//
-// = AUTHOR
-// Andres Kruse <Andres.Kruse@cern.ch> and Douglas C. Schmidt
-// <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_METHOD_REQUEST_H
-#define ACE_METHOD_REQUEST_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Method_Request
-{
- // = TITLE
- // Reifies a method into a request. Subclasses provide
- // the necessary state and behavior.
- //
- // = DESCRIPTION
- // A <Method_Request> is inserted in the <Activation_Queue>,
- // where it is subsequently removed by a <Scheduler>, which
- // invokes the <call> method.
-public:
- // = Initialization and termination methods.
- ACE_Method_Request (u_long priority = 0);
- // Constructor.
-
- virtual ~ACE_Method_Request (void);
- // Destructor.
-
- // = Accessors.
- u_long priority (void);
- // Get priority.
-
- void priority (u_long);
- // Set priority.
-
- // = Invocation method (must be overridden by subclasses).
- virtual int call (void) = 0;
- // Invoked when the <Method_Request> is scheduled to run.
-
-protected:
- u_long priority_;
- // The priority of the request.
-};
-
-#include "ace/post.h"
-#endif /* ACE_METHOD_REQUEST_H */
diff --git a/ace/Min_Max.h b/ace/Min_Max.h
deleted file mode 100644
index 5d3617c9096..00000000000
--- a/ace/Min_Max.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-#ifndef ACE_MIN_MAX_H
-#define ACE_MIN_MAX_H
-#include "ace/pre.h"
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Min_Max.h
-//
-// = DESCRIPTION
-// Define an appropriate set of min()/max() functions using templates.
-//
-// = AUTHOR
-// Derek Dominish <Derek.Dominish@Australia.Boeing.com>
-//
-// ============================================================================
-
-# if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-# endif /* ACE_LACKS_PRAGMA_ONCE */
-
-# if !defined (ACE_LACKS_MIN_MAX_TEMPLATES)
-template <class T>
-inline const T &
-ace_min (const T &t1, const T &t2)
-{
- return t2 > t1 ? t1 : t2;
-}
-
-template <class T>
-inline const T &
-ace_max (const T &t1, const T &t2)
-{
- return t1 > t2 ? t1 : t2;
-}
-
-template <class T>
-inline const T &
-ace_min (const T &t1, const T &t2, const T &t3)
-{
- return ace_min (ace_min (t1, t2), t3);
-}
-
-template <class T>
-inline const T &
-ace_max (const T &t1, const T &t2, const T &t3)
-{
- return ace_max (ace_max (t1, t2), t3);
-}
-
-template <class T>
-inline const T &
-ace_range (const T &min, const T &max, const T &val)
-{
- return ace_min (ace_max (min, val), max);
-}
-# else
-// These macros should only be used if a C++ compiler can't grok the
-// inline templates
-# define ace_min(a,b) (((b) > (a)) ? (a) : (b))
-# define ace_max(a,b) (((a) > (b)) ? (a) : (b))
-# define ace_range(a,b,c) (ace_min(ace_max((a), (c)), (b))
-
-# endif /* ACE_LACKS_MIN_MAX_TEMPLATES */
-
-# define ACE_MIN(a,b) ace_min((a),(b))
-# define ACE_MAX(a,b) ace_max((a),(b))
-# define ACE_RANGE(a,b,c) ace_range((a),(b),(c))
-
-#include "ace/post.h"
-#endif /* ACE_MIN_MAX_H */
diff --git a/ace/Module.cpp b/ace/Module.cpp
deleted file mode 100644
index 9ac03b7e1cb..00000000000
--- a/ace/Module.cpp
+++ /dev/null
@@ -1,266 +0,0 @@
-// Module.cpp
-// $Id$
-
-#ifndef ACE_MODULE_C
-#define ACE_MODULE_C
-
-#include "ace/Module.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Stream_Modules.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Module.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Module, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Module)
-
-template <ACE_SYNCH_DECL> void
-ACE_Module<ACE_SYNCH_USE>::dump (void) const
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::dump");
-}
-
-template <ACE_SYNCH_DECL> void
-ACE_Module<ACE_SYNCH_USE>::writer (ACE_Task<ACE_SYNCH_USE> *q,
- int flags /* = M_DELETE_WRITER */)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::writer");
-
- // Close and maybe delete old writer
- this->close_i (1, flags);
-
- this->q_pair_[1] = q;
-
- if (q != 0)
- {
- ACE_CLR_BITS (q->flags_, ACE_Task_Flags::ACE_READER);
- // Set the q's module pointer to point to us.
- q->mod_ = this;
- }
-
- // Don't allow the caller to change the reader status.
- ACE_SET_BITS (flags_, (flags & M_DELETE_WRITER));
-}
-
-template <ACE_SYNCH_DECL> void
-ACE_Module<ACE_SYNCH_USE>::reader (ACE_Task<ACE_SYNCH_USE> *q,
- int flags /* = M_DELETE_READER */)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::reader");
-
- // Close and maybe delete old writer
- this->close_i (0, flags);
-
- this->q_pair_[0] = q;
-
- if (q != 0)
- {
- ACE_SET_BITS (q->flags_, ACE_Task_Flags::ACE_READER);
- // Set the q's module pointer to point to us.
- q->mod_ = this;
- }
-
- // don't allow the caller to change the reader status
- ACE_SET_BITS (flags_, (flags & M_DELETE_READER));
-}
-
-// Link this ACE_Module on top of ACE_Module M.
-
-template <ACE_SYNCH_DECL> void
-ACE_Module<ACE_SYNCH_USE>::link (ACE_Module<ACE_SYNCH_USE> *m)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::link");
- this->next (m);
- this->writer ()->next (m->writer ());
- m->reader ()->next (this->reader ());
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Module<ACE_SYNCH_USE>::open (const ACE_TCHAR *mod_name,
- ACE_Task<ACE_SYNCH_USE> *writer_q,
- ACE_Task<ACE_SYNCH_USE> *reader_q,
- void *arg,
- int flags /* = M_DELETE */)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::open");
- this->name (mod_name);
- this->arg_ = arg;
-
- // We may already have readers and/or writers.
- if (this->reader ())
- this->close_i (0, M_DELETE_READER);
-
- if (this->writer ())
- this->close_i (1, M_DELETE_WRITER);
-
- if (writer_q == 0)
- {
- ACE_NEW_RETURN (writer_q,
- ACE_Thru_Task<ACE_SYNCH_USE>,
- -1);
- ACE_SET_BITS (flags, M_DELETE_WRITER);
- }
-
- if (reader_q == 0)
- {
- ACE_NEW_RETURN (reader_q,
- ACE_Thru_Task<ACE_SYNCH_USE>,
- -1);
- ACE_SET_BITS (flags, M_DELETE_READER);
- }
-
- this->reader (reader_q);
- this->writer (writer_q);
-
- // Save the flags
- this->flags_ = flags;
-
- // Make sure that the memory is allocated before proceding.
- if (writer_q == 0 || reader_q == 0)
- {
- // These calls will delete writer_q and/or reader_q, if
- // necessary.
- this->close_i (0, M_DELETE_READER);
- this->close_i (1, M_DELETE_WRITER);
-
- errno = ENOMEM;
- return -1;
- }
-
- // Setup back pointers (this must come last, after we've made sure
- // there's memory allocated here.
- reader_q->mod_ = this;
- writer_q->mod_ = this;
-
- return 0;
-}
-
-// Set and get pointer to sibling ACE_Task in ACE_Module.
-
-template <ACE_SYNCH_DECL> ACE_Task<ACE_SYNCH_USE> *
-ACE_Module<ACE_SYNCH_USE>::sibling (ACE_Task<ACE_SYNCH_USE> *orig)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::sibling");
- if (this->q_pair_[0] == orig)
- return this->q_pair_[1];
- else if (this->q_pair_[1] == orig)
- return this->q_pair_[0];
- else
- return 0;
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Module<ACE_SYNCH_USE>::ACE_Module (void)
- : flags_ (0)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::ACE_Module");
- this->name ("<unknown>");
- // Do nothing...
- this->q_pair_[0] = 0;
- this->q_pair_[1] = 0;
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Module<ACE_SYNCH_USE>::~ACE_Module (void)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::~ACE_Module");
-
- // Only close down if we haven't already done so.
- if (this->reader () || this->writer ())
- this->close ();
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Module<ACE_SYNCH_USE>::ACE_Module (const ACE_TCHAR *mod_name,
- ACE_Task<ACE_SYNCH_USE> *writer_q,
- ACE_Task<ACE_SYNCH_USE> *reader_q,
- void *args,
- int flags /* = M_DELETE */)
- : flags_ (0)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::ACE_Module");
-
- this->q_pair_[0] = 0;
- this->q_pair_[1] = 0;
-
- if (this->open (mod_name, writer_q, reader_q, args, flags) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Module")));
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Module<ACE_SYNCH_USE>::close (int flags /* = M_DELETE_NONE */)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::close");
-
- int result = 0;
-
- ACE_SET_BITS (flags_, flags);
-
- if (this->close_i (0, flags) == -1)
- result = -1;
-
- if (this->close_i (1, flags) == -1)
- result = -1;
-
- return result;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Module<ACE_SYNCH_USE>::close_i (int which,
- int flags)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::close_i");
-
- if (this->q_pair_[which] == 0)
- return 0;
-
- // Copy task pointer to prevent problems when ACE_Task::close
- // changes the task pointer
- ACE_Task<ACE_SYNCH_USE> *task = this->q_pair_[which];
-
- // Change so that close doesn't get called again from the task base.
-
- // Now close the task.
- int result = 0;
-
- if (task->module_closed () == -1)
- result = -1;
-
- task->flush ();
- task->next (0);
-
- // Should we also delete it ?
- if (flags != M_DELETE_NONE
- && ACE_BIT_ENABLED (flags_, which + 1))
- {
- // Only delete the Tasks if there aren't any more threads
- // running in them.
- task->wait ();
-
- // If this assert happens it is likely because the task was
- // activated with the THR_DETACHED flag, which means that we
- // can't join() with the thread. Not using THR_DETACHED should
- // solve this problem.
- ACE_ASSERT (task->thr_count () == 0);
-
- delete task;
- }
-
- // Set the tasks pointer to 0 so that we don't try to close()
- // this object again if the destructor gets called.
- this->q_pair_[which] = 0;
-
- // Finally remove the delete bit.
- ACE_CLR_BITS (flags_, which + 1);
-
- return result;
-}
-#endif /* ACE_MODULE_C */
diff --git a/ace/Module.h b/ace/Module.h
deleted file mode 100644
index 7a28201b83c..00000000000
--- a/ace/Module.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Module.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_MODULE_H
-#define ACE_MODULE_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Task_T.h"
-
-class ACE_Export ACE_Module_Base
-{
- // = TITLE
- // Workaround HP/C++ compiler bug with enums in templates.
- //
- // = DESCRIPTION
- // Certain C++ compilers, e.g., the HP/UX 10.x and 9.x compilers,
- // seem to fail if enums are defined inside a template, hence we
- // have to move them into a base class.
-public:
- enum
- {
- M_DELETE_NONE = 0,
- // Indicates that <close> should not delete any Tasks.
-
- M_DELETE_READER = 1,
- // Indicates that <close> should delete the writer Task.
-
- M_DELETE_WRITER = 2,
- // Indicates that <close> should delete the reader Task.
-
- M_DELETE = 3
- // Indicates that <close> deletes the Tasks. Don't change this
- // value without updating the same enum in class ACE_Stream...
- // The <M_DELETE_READER> and <M_DELETE_WRITER> flags may be or'ed
- // together.
- };
-};
-
-template <ACE_SYNCH_DECL>
-class ACE_Module : public ACE_Module_Base
-{
- // = TITLE
- // An abstraction for managing a bi-directional flow of messages.
- //
- // = DESCRIPTION
- // This is based on the Module concept in System V Streams,
- // which contains a pair of Tasks, one for handling upstream
- // processing, one for handling downstream processing. In
- // general, you shouldn't subclass from this class, but instead
- // subclass from the <ACE_Task>.
-public:
- friend class ACE_Shutup_GPlusPlus; // Turn off g++ warning
-
- // = Initialization and termination methods.
- ACE_Module (void);
- // Create an empty Module.
-
- ~ACE_Module (void);
- // Shutdown the Module.
-
- ACE_Module (const ACE_TCHAR *module_name,
- ACE_Task<ACE_SYNCH_USE> *writer = 0,
- ACE_Task<ACE_SYNCH_USE> *reader = 0,
- void *args = 0,
- int flags = M_DELETE);
- // Create an initialized module with <module_name> as its identity
- // and <reader> and <writer> as its tasks.
-
- int open (const ACE_TCHAR *module_name,
- ACE_Task<ACE_SYNCH_USE> *writer = 0,
- ACE_Task<ACE_SYNCH_USE> *reader = 0,
- void *a = 0,
- int flags = M_DELETE);
- // Create an initialized module with <module_name> as its identity
- // and <reader> and <writer> as its tasks. Previously register
- // reader or writers or closed down and deleted according to the
- // value of flags_. Should not be called from within
- // <ACE_Task::module_closed>.
-
- int close (int flags = M_DELETE_NONE);
- // Close down the Module and its Tasks. The flags argument can be
- // used to override the default behaviour, which depends on previous
- // <flags> values in calls to c'tor, <open>, <reader>, and <writer>.
- // A previous value M_DELETE[_XXX] can not be overridden. Should
- // not be called from within <ACE_Task::module_closed>.
-
- // = ACE_Task manipulation routines
- ACE_Task<ACE_SYNCH_USE> *writer (void);
- // Get the writer task.
-
- void writer (ACE_Task<ACE_SYNCH_USE> *q, int flags = M_DELETE_WRITER);
- // Set the writer task. <flags> can be used to indicate that the
- // module should delete the writer during a call to close or to the
- // destructor. If a previous writer exists, it is closed. It may
- // also be deleted, depending on the old flags_ value. Should not
- // be called from within <ACE_Task::module_closed>.
-
- ACE_Task<ACE_SYNCH_USE> *reader (void);
- // Get the reader task.
-
- void reader (ACE_Task<ACE_SYNCH_USE> *q, int flags = M_DELETE_READER);
- // Set the reader task. <flags> can be used to indicate that the
- // module should delete the reader during a call to close or to the
- // destructor. If a previous reader exists, it is closed. It may
- // also be deleted, depending on the old flags_ value. Should not
- // be called from within <ACE_Task::module_closed>.
-
- ACE_Task<ACE_SYNCH_USE> *sibling (ACE_Task<ACE_SYNCH_USE> *orig);
- // Set and get pointer to sibling <ACE_Task> in an <ACE_Module>
-
- // = Identify the module
- const ACE_TCHAR *name (void) const;
- // Get the module name.
- void name (const ACE_TCHAR *);
- // Set the module name.
-
- // = Argument to the Tasks.
- void *arg (void) const;
- // Get the argument passed to the tasks.
-
- void arg (void *);
- // Set the argument passed to the tasks.
-
- void link (ACE_Module<ACE_SYNCH_USE> *m);
- // Link to other modules in the ustream stack
-
- ACE_Module<ACE_SYNCH_USE> *next (void);
- // Get the next pointer to the module above in the stream.
-
- void next (ACE_Module<ACE_SYNCH_USE> *m);
- // Set the next pointer to the module above in the stream.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int close_i (int which, int flags);
- // Implements the close operation for either the reader or the
- // writer task (depending on <which>).
-
- ACE_Task<ACE_SYNCH_USE> *q_pair_[2];
- // Pair of Tasks that form the "read-side" and "write-side" of the
- // ACE_Module partitioning.
-
- ACE_TCHAR name_[MAXNAMLEN + 1];
- // Name of the ACE_Module.
-
- ACE_Module<ACE_SYNCH_USE> *next_;
- // Next ACE_Module in the stack.
-
- void *arg_;
- // Argument passed through to the reader and writer task when they
- // are opened.
-
- int flags_;
- // Holds flags which are used to determine if the reader and writer
- // task have to be deleted on exit
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Module.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Module.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Module.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_MODULE_H */
diff --git a/ace/Module.i b/ace/Module.i
deleted file mode 100644
index f1c60bb90eb..00000000000
--- a/ace/Module.i
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Module.i
-
-template <ACE_SYNCH_DECL> ACE_INLINE void *
-ACE_Module<ACE_SYNCH_USE>::arg (void) const
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::arg");
- return this->arg_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE void
-ACE_Module<ACE_SYNCH_USE>::arg (void *a)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::arg");
- this->arg_ = a;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE const ACE_TCHAR *
-ACE_Module<ACE_SYNCH_USE>::name (void) const
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::name");
- return this->name_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE void
-ACE_Module<ACE_SYNCH_USE>::name (const ACE_TCHAR *n)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::name");
- ACE_OS::strncpy (this->name_, n, MAXNAMLEN);
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE ACE_Task<ACE_SYNCH_USE> *
-ACE_Module<ACE_SYNCH_USE>::writer (void)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::writer");
- return this->q_pair_[1];
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE ACE_Task<ACE_SYNCH_USE> *
-ACE_Module<ACE_SYNCH_USE>::reader (void)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::reader");
- return this->q_pair_[0];
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE ACE_Module<ACE_SYNCH_USE> *
-ACE_Module<ACE_SYNCH_USE>::next (void)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::next");
- return this->next_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE void
-ACE_Module<ACE_SYNCH_USE>::next (ACE_Module<ACE_SYNCH_USE> *m)
-{
- ACE_TRACE ("ACE_Module<ACE_SYNCH_USE>::next");
- this->next_ = m;
-}
-
-
diff --git a/ace/Msg_WFMO_Reactor.cpp b/ace/Msg_WFMO_Reactor.cpp
deleted file mode 100644
index ded0e200926..00000000000
--- a/ace/Msg_WFMO_Reactor.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// $Id$
-
-#include "ace/Msg_WFMO_Reactor.h"
-
-ACE_RCSID(ace, Msg_WFMO_Reactor, "$Id$")
-
-#if defined (ACE_WIN32) && !defined (ACE_LACKS_MSG_WFMO)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Msg_WFMO_Reactor.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_Msg_WFMO_Reactor::ACE_Msg_WFMO_Reactor (ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq)
- : ACE_WFMO_Reactor (sh, tq)
-{
-}
-
-ACE_Msg_WFMO_Reactor::ACE_Msg_WFMO_Reactor (size_t size,
- int unused,
- ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq)
- : ACE_WFMO_Reactor (size, unused, sh, tq)
-{
-}
-
-ACE_Msg_WFMO_Reactor::~ACE_Msg_WFMO_Reactor (void)
-{
-}
-
-int
-ACE_Msg_WFMO_Reactor::wait_for_multiple_events (int timeout,
- int alertable)
-{
- // Wait for any of handles_ to be active, or until timeout expires.
- // If <alertable> is enabled allow asynchronous completion of
- // ReadFile and WriteFile operations. QS_ALLINPUT allows
- // <MsgWaitForMultipleObjectsEx> to wait for any message is in the
- // queue.
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
- return ::MsgWaitForMultipleObjectsEx (this->handler_rep_.max_handlep1 (),
- this->handler_rep_.handles (),
- timeout,
- QS_ALLINPUT,
- alertable);
-#else
- ACE_UNUSED_ARG (alertable);
- return ::MsgWaitForMultipleObjects (this->handler_rep_.max_handlep1 (),
- this->handler_rep_.handles (),
- FALSE,
- timeout,
- QS_ALLINPUT);
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
-}
-
-int
-ACE_Msg_WFMO_Reactor::dispatch_window_messages (void)
-{
- int number_of_messages = 0;
- MSG msg;
-
- // Process all pending message from this thread's message queue
- while (::PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
- {
- ::TranslateMessage (&msg);
- if (msg.message == WM_QUIT)
- {
- // Should inform the main thread
- ::PostQuitMessage (msg.wParam);
- return -1;
- }
-
- ::DispatchMessage (&msg);
- number_of_messages++;
- }
-
- return number_of_messages;
-}
-
-DWORD
-ACE_Msg_WFMO_Reactor::poll_remaining_handles (size_t slot)
-{
- return ::MsgWaitForMultipleObjects (this->handler_rep_.max_handlep1 () - slot,
- this->handler_rep_.handles () + slot,
- FALSE,
- 0,
- QS_ALLINPUT);
-}
-
-#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */
diff --git a/ace/Msg_WFMO_Reactor.h b/ace/Msg_WFMO_Reactor.h
deleted file mode 100644
index 1cfe2a7f211..00000000000
--- a/ace/Msg_WFMO_Reactor.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Msg_WFMO_Reactor.h
-//
-// = AUTHOR
-// Beskrovny Evgeny <evgeny_beskrovny@icomverse.com> and
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_MSG_WFMO_REACTOR_H
-#define ACE_MSG_WFMO_REACTOR_H
-#include "ace/pre.h"
-
-#include "ace/WFMO_Reactor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_WIN32) && !defined (ACE_LACKS_MSG_WFMO)
-
-class ACE_Export ACE_Msg_WFMO_Reactor : public ACE_WFMO_Reactor
-{
- // = TITLE
- // An OO event demultiplexor and event handler dispatcher for
- // Win32 <MsgWaitForMultipleObjects>.
- //
- // = DESCRIPTION
- // The ACE_Msg_WFMO_Reactor is an OO event demultiplexor and
- // event handler Reactor. It differs from <ACE_WFMO_Reactor> by
- // its ability to react on Windows messages. It is needed when
- // the task should serve also as a COM/DCOM server.
-public:
- // = Initialization and termination methods.
- ACE_Msg_WFMO_Reactor (ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0);
- // Initialize <ACE_Msg_WFMO_Reactor> with the default size.
-
- ACE_Msg_WFMO_Reactor (size_t size,
- int unused = 0,
- ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0);
- // Initialize <ACE_Msg_WFMO_Reactor> with size <size>. Two slots will be
- // added to the <size> parameter which will store handles used for
- // internal management purposes.
-
- virtual ~ACE_Msg_WFMO_Reactor (void);
- // Close down the ACE_Msg_WFMO_Reactor and release all of its resources.
-
- virtual int handle_events (ACE_Time_Value *max_wait_time = 0);
- virtual int alertable_handle_events (ACE_Time_Value *max_wait_time = 0);
- // This event loop driver blocks for up to <max_wait_time> before
- // returning. It will return earlier if timer events, I/O events,
- // window events, or signal events occur. Note that <max_wait_time>
- // can be 0, in which case this method blocks indefinitely until
- // events occur.
- //
- // <max_wait_time> is decremented to reflect how much time this call
- // took. For instance, if a time value of 3 seconds is passed to
- // handle_events and an event occurs after 2 seconds,
- // <max_wait_time> will equal 1 second. This can be used if an
- // application wishes to handle events for some fixed amount of
- // time.
- //
- // <MsgWaitForMultipleObjects> is used as the demultiplexing call
- //
- // Returns the total number of <ACE_Event_Handler>s that were
- // dispatched, 0 if the <max_wait_time> elapsed without dispatching
- // any handlers, or -1 if an error occurs.
- //
- // The only difference between <alertable_handle_events> and
- // <handle_events> is that in the alertable case, MWMO_ALERTABLE is
- // passed to <MsgWaitForMultipleObjects> for the <bAlertable>
- // option.
-
- virtual int handle_events (ACE_Time_Value &max_wait_time);
- virtual int alertable_handle_events (ACE_Time_Value &max_wait_time);
- // This method is just like the one above, except the
- // <max_wait_time> value is a reference and can therefore never be
- // NULL.
-
-protected:
- virtual int wait_for_multiple_events (int timeout,
- int alertable);
- // Wait for timer and I/O events to occur.
-
- virtual DWORD poll_remaining_handles (size_t index);
- // Check for activity on remaining handles.
-
- virtual int dispatch_window_messages (void);
- // Dispatches window messages.
-};
-
-#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */
-
-#if defined (__ACE_INLINE__)
-#include "ace/Msg_WFMO_Reactor.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_MSG_WFMO_REACTOR_H */
diff --git a/ace/Msg_WFMO_Reactor.i b/ace/Msg_WFMO_Reactor.i
deleted file mode 100644
index c8d7f25c8d7..00000000000
--- a/ace/Msg_WFMO_Reactor.i
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#if defined (ACE_WIN32) && !defined (ACE_LACKS_MSG_WFMO)
-
-ACE_INLINE int
-ACE_Msg_WFMO_Reactor::handle_events (ACE_Time_Value &how_long)
-{
- return this->event_handling (&how_long, 0);
-}
-
-ACE_INLINE int
-ACE_Msg_WFMO_Reactor::alertable_handle_events (ACE_Time_Value &how_long)
-{
- return this->event_handling (&how_long, MWMO_ALERTABLE);
-}
-
-ACE_INLINE int
-ACE_Msg_WFMO_Reactor::handle_events (ACE_Time_Value *how_long)
-{
- return this->event_handling (how_long, 0);
-}
-
-ACE_INLINE int
-ACE_Msg_WFMO_Reactor::alertable_handle_events (ACE_Time_Value *how_long)
-{
- return this->event_handling (how_long, MWMO_ALERTABLE);
-}
-
-#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */
diff --git a/ace/Multiplexor.cpp b/ace/Multiplexor.cpp
deleted file mode 100644
index e4d33295b31..00000000000
--- a/ace/Multiplexor.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// Multiplexor.cpp
-// $Id$
-
-#if defined (ACE_HAS_THREADS)
-
-#include "ace/Multiplexor.h"
-
-ACE_RCSID(ace, Multiplexor, "$Id$")
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Multiplexor.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_THREADS */
diff --git a/ace/Multiplexor.h b/ace/Multiplexor.h
deleted file mode 100644
index 03ccf42285b..00000000000
--- a/ace/Multiplexor.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Multiplexor.h
-//
-// = DESCRIPTION
-// Define the ACE_Driver and ACE_Multiplexor container classes.
-// Note that these classes have never been implemented due to lack
-// of need.
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_MULTIPLEXOR_H
-#define ACE_MULTIPLEXOR_H
-#include "ace/pre.h"
-
-#include "ace/Module.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Map_Manager.h"
-
-#if defined (ACE_HAS_THREADS)
-
-#if 0
-class ACE_Export ACE_Driver
-{
- // = TITLE
- //
- //
- // = DESCRIPTION
- //
-public:
- ACE_Driver (void);
- ~ACE_Driver (void);
-
- virtual int link_from_below (ACE_Module *mod);
- virtual ACE_Module *alloc_module (ACE_Driver *) = 0;
- virtual int unlink_from_below (ACE_Module *);
-};
-
-class ACE_Export ACE_Multiplexor
-{
- // = TITLE
- //
- // = DESCRIPTION
- //
-public:
- // = Constructors and destructors
- ACE_Multiplexor (void);
- ~ACE_Multiplexor (void);
-
- virtual int link_from_above (ACE_Driver &ld);
- virtual int link_from_above (ACE_Multiplexor &lm);
- virtual int link_from_below (ACE_Module *mod);
- virtual ACE_Module *alloc_lower_module (ACE_Multiplexor *) = 0;
- virtual ACE_Module *alloc_upper_module (ACE_Multiplexor *) = 0;
-
- virtual int unlink_from_above (ACE_Driver &ld);
- virtual int unlink_from_above (ACE_Multiplexor &lm);
- virtual int unlink_from_below (ACE_Module *mod);
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Multiplexor.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* 0 */
-
-#endif /* ACE_HAS_THREADS */
-#include "ace/post.h"
-#endif /* ACE_MULTIPLEXOR_H */
diff --git a/ace/Multiplexor.i b/ace/Multiplexor.i
deleted file mode 100644
index 1763c13ab4c..00000000000
--- a/ace/Multiplexor.i
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Multiplexor.i
-
-int
-Driver::link_from_below (ACE_Module *stream_head)
-{
- ACE_TRACE ("Driver::link_from_below");
- ACE_Module *stream_tail = this->alloc_module (this);
-
- stream_head->link (stream_tail);
- if (stream_tail->reader ()->open () == -1
- || stream_tail->writer ()->open () == -1)
- {
- stream_tail->close ();
- return -1;
- }
- return 0;
-}
-
-int
-Driver::unlink_from_below (ACE_Module *)
-{
- ACE_TRACE ("Driver::unlink_from_below");
- return -1;
-}
-
-ACE_Multiplexor::ACE_Multiplexor (void)
-{
- ACE_TRACE ("ACE_Multiplexor::ACE_Multiplexor");
-}
-
-ACE_Multiplexor::~ACE_Multiplexor (void)
-{
- ACE_TRACE ("ACE_Multiplexor::~ACE_Multiplexor");
-}
-
-int
-ACE_Multiplexor::link_from_above (Driver &ld)
-{
- ACE_TRACE ("ACE_Multiplexor::link_from_above");
- return ld.link_from_below (this->alloc_lower_module (this));
-}
-
-int
-ACE_Multiplexor::link_from_above (ACE_Multiplexor &lm)
-{
- ACE_TRACE ("ACE_Multiplexor::link_from_above");
- return lm.link_from_below (this->alloc_lower_module (this));
-}
-
-int
-ACE_Multiplexor::link_from_below (ACE_Module *stream_head)
-{
- ACE_TRACE ("ACE_Multiplexor::link_from_below");
- ACE_Module *stream_tail = this->alloc_upper_module (this);
-
- stream_head->link (stream_tail);
- if (stream_tail->reader ()->open () == -1
- || stream_tail->writer ()->open () == -1)
- {
- stream_tail->close ();
- return -1;
- }
- return 0;
-}
-
-int
-ACE_Multiplexor::unlink_from_above (Driver &)
-{
- ACE_TRACE ("ACE_Multiplexor::unlink_from_above");
- return -1;
-}
-
-int
-ACE_Multiplexor::unlink_from_above (ACE_Multiplexor &)
-{
- ACE_TRACE ("ACE_Multiplexor::unlink_from_above");
- return -1;
-}
-
-int
-ACE_Multiplexor::unlink_from_below (ACE_Module *)
-{
- ACE_TRACE ("ACE_Multiplexor::unlink_from_below");
- return -1;
-}
diff --git a/ace/NT_Service.cpp b/ace/NT_Service.cpp
deleted file mode 100644
index b65b24e0ee2..00000000000
--- a/ace/NT_Service.cpp
+++ /dev/null
@@ -1,502 +0,0 @@
-// $Id$
-
-// NT_Service.cpp
-
-#include "ace/config-all.h"
-#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP)
-
-#include "ace/NT_Service.h"
-#include "ace/Service_Object.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/NT_Service.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_NT_Service)
-
-// ACE_NT_Service destructor.
-
-ACE_NT_Service::~ACE_NT_Service (void)
-{
- if (svc_sc_handle_ != 0)
- {
- CloseServiceHandle (svc_sc_handle_);
- svc_sc_handle_ = 0;
- }
- delete [] desc_;
- delete [] name_;
- delete [] host_;
-}
-
-// This default implementation of ACE_NT_Service::open sets the
-// service's status to START_PENDING with the estimated time until
-// STARTED set to the value given when this object was constructed.
-// Then the svc function is called, which implements the guts of the
-// service. Note that this function is running in a thread created by
-// the OS, not by ACE_Thread_Manager. The thread manager does not
-// know anything about this thread. The service can, however, use
-// ACE_Thread_Manager to start more threads if desired. When the svc
-// function returns, the service status is set to STOPPED, and exit
-// codes set based on errno/GetLastError if the svc function returns
-// -1.
-//
-// The svc function is expected to set the service status to SERVICE_RUNNING
-// after it initializes.
-//
-// The handle_control function will be called for each time there is a
-// request for the service. It is up to that function and svc to
-// cooperate to both respond appropriately to the request (by at least
-// updating the service's status) and to fulfill the request.
-
-int
-ACE_NT_Service::open (void *args)
-{
- report_status (SERVICE_START_PENDING, 0);
-
- int svc_return = this->svc ();
- if (svc_return == 0)
- {
- this->svc_status_.dwWin32ExitCode = NO_ERROR;
- this->svc_status_.dwServiceSpecificExitCode = 0;
- }
- else
- {
- if (errno == 0)
- {
- this->svc_status_.dwWin32ExitCode = GetLastError ();
- }
- else
- {
- this->svc_status_.dwWin32ExitCode = ERROR_SERVICE_SPECIFIC_ERROR;
- this->svc_status_.dwServiceSpecificExitCode = errno;
- }
- }
-
- report_status (SERVICE_STOPPED, 0);
-
- return svc_return;
-
-}
-
-void
-ACE_NT_Service::handle_control (DWORD control_code)
-{
- switch(control_code)
- {
- case SERVICE_CONTROL_SHUTDOWN:
- case SERVICE_CONTROL_STOP:
- stop_requested (control_code);
- break;
-
- case SERVICE_CONTROL_PAUSE:
- pause_requested (control_code);
- break;
-
- case SERVICE_CONTROL_CONTINUE:
- continue_requested (control_code);
- break;
-
- case SERVICE_CONTROL_INTERROGATE:
- interrogate_requested (control_code);
- break;
- }
-}
-
-void
-ACE_NT_Service::stop_requested (DWORD)
-{
- this->report_status (SERVICE_STOP_PENDING);
- /* how to cancel? */
-}
-
-void
-ACE_NT_Service::pause_requested (DWORD)
-{
- this->report_status (SERVICE_PAUSE_PENDING);
- this->suspend ();
- report_status (SERVICE_PAUSED);
-}
-
-void
-ACE_NT_Service::continue_requested (DWORD)
-{
- this->report_status (SERVICE_CONTINUE_PENDING);
- this->resume ();
- report_status (SERVICE_RUNNING);
-}
-
-void
-ACE_NT_Service::interrogate_requested (DWORD)
-{
- this->report_status (0);
-}
-
-void
-ACE_NT_Service::name (const ACE_TCHAR *name, const ACE_TCHAR *desc)
-{
- delete [] desc_;
- delete [] name_;
-
- if (desc == 0)
- desc = name;
-
- name_ = ACE::strnew (name);
- desc_ = ACE::strnew (desc);
-}
-
-void
-ACE_NT_Service::host (const ACE_TCHAR *host)
-{
- delete [] host_;
-
- if (svc_sc_handle_ != 0)
- {
- CloseServiceHandle (svc_sc_handle_);
- svc_sc_handle_ = 0;
- }
-
- if (host == 0)
- {
- host_ = 0;
- }
- else
- {
- host_ = ACE::strnew (host);
- }
-}
-
-int
-ACE_NT_Service::insert (DWORD start_type,
- DWORD error_control,
- const ACE_TCHAR *exe_path,
- const ACE_TCHAR *group_name,
- LPDWORD tag_id,
- const ACE_TCHAR *dependencies,
- const ACE_TCHAR *account_name,
- const ACE_TCHAR *password)
-{
- ACE_TCHAR this_exe[MAXPATHLEN];
-
- if (exe_path == 0)
- {
- if (ACE_TEXT_GetModuleFileName (0, this_exe, sizeof this_exe) == 0)
- return -1;
- exe_path = this_exe;
- }
-
- SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (),
- 0,
- SC_MANAGER_ALL_ACCESS);
- if (sc_mgr == 0)
- return -1;
-
- SC_HANDLE sh = ACE_TEXT_CreateService (sc_mgr,
- this->name (),
- this->desc (),
- SERVICE_ALL_ACCESS,
- svc_status_.dwServiceType,
- start_type,
- error_control,
- exe_path,
- group_name,
- tag_id,
- dependencies,
- account_name,
- password);
- CloseServiceHandle (sc_mgr);
- if (sh == 0)
- return -1;
-
- this->svc_sc_handle_ = sh;
-
- return 0;
-
-}
-
-int
-ACE_NT_Service::remove (void)
-{
- if (this->svc_sc_handle () == 0)
- return -1;
-
- if (DeleteService (this->svc_sc_handle()) == 0
- && GetLastError () != ERROR_SERVICE_MARKED_FOR_DELETE)
- return -1;
-
- return 0;
-}
-
-// Sets the startup type for the service. Returns -1 on error, 0 on
-// success.
-int
-ACE_NT_Service::startup (DWORD startup)
-{
- SC_HANDLE svc = this->svc_sc_handle ();
- if (svc == 0)
- return -1;
-
- BOOL ok = ChangeServiceConfig (svc,
- SERVICE_NO_CHANGE,// No change to service type
- startup, // New startup type
- SERVICE_NO_CHANGE,// No change to error ctrl
- 0, // No change to pathname
- 0, // No change to load group
- 0, // No change to tag
- 0, // No change to dependencies
- 0, 0, // No change to acct/passwd
- 0); // No change to name
-
- return ok ? 0 : -1;
-}
-
-// Returns the current startup type.
-
-DWORD
-ACE_NT_Service::startup (void)
-{
- // The query buffer will hold strings as well as the defined struct.
- // The string pointers in the struct point to other areas in the
- // passed memory area, so it has to be large enough to hold the
- // struct plus all the strings.
- char cfgbuff[1024];
- LPQUERY_SERVICE_CONFIG cfg;
- DWORD cfgsize, needed_size;
-
- SC_HANDLE svc = this->svc_sc_handle ();
- if (svc == 0)
- return -1;
-
- cfgsize = sizeof cfgbuff;
- cfg = (LPQUERY_SERVICE_CONFIG) cfgbuff;
- BOOL ok = QueryServiceConfig (svc, cfg, cfgsize, &needed_size);
- if (ok)
- return cfg->dwStartType;
- return 0;
-
-}
-
-int
-ACE_NT_Service::start_svc (ACE_Time_Value *wait_time,
- DWORD *svc_state,
- DWORD argc, const ACE_TCHAR **argv)
-{
- SC_HANDLE svc = this->svc_sc_handle ();
- if (svc == 0)
- return -1;
-
- if (!ACE_TEXT_StartService (svc, argc, argv))
- return -1;
-
- wait_for_service_state (SERVICE_RUNNING, wait_time);
- if (svc_state != 0)
- *svc_state = this->svc_status_.dwCurrentState;
-
- return 0;
-}
-
-int
-ACE_NT_Service::stop_svc (ACE_Time_Value *wait_time,
- DWORD *svc_state)
-{
- SC_HANDLE svc = this->svc_sc_handle ();
- if (svc == 0)
- return -1;
-
- if (!ControlService (svc,
- SERVICE_CONTROL_STOP,
- &this->svc_status_))
- return -1;
-
- wait_for_service_state (SERVICE_STOPPED,
- wait_time);
- if (svc_state != 0)
- *svc_state = this->svc_status_.dwCurrentState;
-
- return 0;
-}
-
-int
-ACE_NT_Service::pause_svc (ACE_Time_Value *wait_time,
- DWORD *svc_state)
-{
- SC_HANDLE svc = this->svc_sc_handle ();
- if (svc == 0)
- return -1;
-
- if (!ControlService (svc,
- SERVICE_CONTROL_PAUSE,
- &this->svc_status_))
- return -1;
-
- wait_for_service_state (SERVICE_PAUSED,
- wait_time);
- if (svc_state != 0)
- *svc_state = this->svc_status_.dwCurrentState;
-
- return 0;
-}
-
-int
-ACE_NT_Service::continue_svc (ACE_Time_Value *wait_time,
- DWORD *svc_state)
-{
- SC_HANDLE svc = this->svc_sc_handle ();
- if (svc == 0)
- return -1;
-
- if (!ControlService (svc,
- SERVICE_CONTROL_CONTINUE,
- &this->svc_status_))
- return -1;
-
- wait_for_service_state (SERVICE_RUNNING,
- wait_time);
- if (svc_state != 0)
- *svc_state = this->svc_status_.dwCurrentState;
-
- return 0;
-}
-
-DWORD
-ACE_NT_Service::state (ACE_Time_Value *wait_hint)
-{
- DWORD curr_state;
-
- if (this->state (&curr_state,
- wait_hint) == -1)
- return 0;
- return curr_state;
-}
-
-int
-ACE_NT_Service::state (DWORD *pstate,
- ACE_Time_Value *wait_hint)
-{
- SC_HANDLE svc = this->svc_sc_handle ();
- if (svc == 0)
- return -1;
-
- if (QueryServiceStatus (svc,
- &this->svc_status_) == 0)
- return -1;
-
- if (wait_hint != 0)
- wait_hint->msec (this->svc_status_.dwWaitHint);
-
- *pstate = this->svc_status_.dwCurrentState;
-
- return 0;
-}
-
-// test_access
-//
-// Open a new handle, ignoring any handle open in svc_sc_handle_.
-// This function's results are returned without leaving the handle
-// open.
-
-int
-ACE_NT_Service::test_access (DWORD desired_access)
-{
- int status = -1; // Guilty until proven innocent
-
- SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (),
- 0,
- GENERIC_READ);
- if (sc_mgr != 0)
- {
- SC_HANDLE handle = ACE_TEXT_OpenService (sc_mgr,
- this->name (),
- desired_access);
- CloseServiceHandle (sc_mgr);
- if (handle != 0)
- {
- status = 0;
- CloseServiceHandle (handle);
- }
- }
-
- return status;
-}
-
-// report_status
-//
-// Reports the current status. If new_status is not 0, it sets the
-// status to the new value before reporting. NOTE - this assumes that
-// no actual service status values have the value 0. This is true in
-// WinNT 4. If the status is a 'pending' type, the supplied time hint
-// is used unless it's 0, in which case the existing hint is used.
-// The dwWaitHint is not updated by this function. The checkpoint is
-// incremented by one after a pending report.
-
-int
-ACE_NT_Service::report_status (DWORD new_status,
- DWORD time_hint)
-{
- int bump_checkpoint = 0;
- int retval = 0;
- DWORD save_controls = 0;
-
- if (new_status != 0)
- this->svc_status_.dwCurrentState = new_status;
- switch (this->svc_status_.dwCurrentState)
- {
- case SERVICE_START_PENDING:
- save_controls = this->svc_status_.dwControlsAccepted;
- this->svc_status_.dwControlsAccepted = 0;
- /* Fall through */
- case SERVICE_STOP_PENDING:
- case SERVICE_CONTINUE_PENDING:
- case SERVICE_PAUSE_PENDING:
- this->svc_status_.dwWaitHint = time_hint ? time_hint : this->start_time_;
- bump_checkpoint = 1;
- break;
-
- default:
- this->svc_status_.dwCheckPoint = 0;
- }
-
- retval = SetServiceStatus (this->svc_handle_,
- &this->svc_status_) ? 0 : -1;
-
- if (save_controls != 0)
- this->svc_status_.dwControlsAccepted = save_controls;
-
- if (bump_checkpoint)
- ++this->svc_status_.dwCheckPoint;
-
- return retval;
-}
-
-SC_HANDLE
-ACE_NT_Service::svc_sc_handle (void)
-{
- if (svc_sc_handle_ == 0)
- {
- SC_HANDLE sc_mgr = ACE_TEXT_OpenSCManager (this->host (),
- 0,
- SC_MANAGER_ALL_ACCESS);
- if (sc_mgr != 0)
- {
- svc_sc_handle_ = ACE_TEXT_OpenService (sc_mgr,
- this->name (),
- SERVICE_ALL_ACCESS);
- CloseServiceHandle (sc_mgr);
- }
- }
-
- return svc_sc_handle_;
-}
-
-void
-ACE_NT_Service::wait_for_service_state (DWORD desired_state,
- ACE_Time_Value *wait_time)
-{
- // Doing the right thing with these needs to be added.
- ACE_UNUSED_ARG (desired_state);
- ACE_UNUSED_ARG (wait_time);
-
- QueryServiceStatus (this->svc_sc_handle_,
- &this->svc_status_);
-}
-
-#endif /* ACE_WIN32 && !ACE_HAS_PHARLAP */
diff --git a/ace/NT_Service.h b/ace/NT_Service.h
deleted file mode 100644
index 9f01164c623..00000000000
--- a/ace/NT_Service.h
+++ /dev/null
@@ -1,377 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// NT_Service.h
-//
-// = AUTHOR
-// Steve Huston <shuston@riverace.com>
-//
-// ============================================================================
-
-#ifndef ACE_NT_SERVICE_H
-#define ACE_NT_SERVICE_H
-#include "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP)
-
-#include "ace/Service_Object.h"
-#include "ace/Synch.h"
-#include "ace/Task.h"
-
-// ACE_NT_SERVICE_START_TIMEOUT is an estimate of the number of
-// milliseconds your service will take to start. Default is 5
-// seconds; you can pass a different value (or set one) when you
-// create the ACE_NT_Service object for your service.
-#if !defined ACE_NT_SERVICE_START_TIMEOUT
-#define ACE_NT_SERVICE_START_TIMEOUT 5000
-#endif /* ACE_NT_SERVICE_TIMEOUT */
-
-class ACE_Export ACE_NT_Service : public ACE_Task<ACE_MT_SYNCH>
-{
- // = TITLE
- // Provide the base class which defines the interface for controlling
- // an NT service.
- //
- // = DESCRIPTION
- // NT Services can be implemented using the framework defined by
- // the ACE_NT_Service class, and the macros defined in this file.
- // Some quick refresher notes on NT Services:
-
- // - The main program defines an array of entries describing the
- // services offered. The ACE_NT_SERVICE_ENTRY macro can help with
- // this.
- // - For each service, a separate ServiceMain and Handler function
- // need to be defined. These are taken care of by the
- // ACE_NT_SERVICE_DEFINE macro.
- // - When the main program/thread calls
- // StartServiceCtrlDispatcher, NT creates a thread for each
- // service, and runs the ServiceMain function for the service in
- // that new thread. When that thread exits, the service is gone.
- //
- // To use this facility, you could derive a class from
- // ACE_Service_Object (if you want to start via ACE's service
- // configurator), or use any other class to run when the image
- // starts (assuming that NT runs the image). You must set up an
- // NT SERVICE_TABLE_ENTRY array to define your service(s). You
- // can use the ACE_NT_SERVICE_... macros defined below for this.
- //
- // A SERVICE_TABLE might look like this:
- // ACE_NT_SERVICE_REFERENCE(Svc1); // If service is in another file
- // SERVICE_TABLE_ENTRY myServices[] = {
- // ACE_NT_SERVICE_ENTRY ("MyNeatService", Svc1),
- // { 0, 0 } };
- //
- // In the file where your service(s) are implemented, use the
- // ACE_NT_SERVICE_DEFINE macro to set up the following:
- // 1. A pointer to the service's implementation object (must be derived
- // from ACE_NT_Service).
- // 2. The service's Handler function (forwards all requests to the
- // ACE_NT_Service-derived object's handle_control function).
- // 3. The service's ServiceMain function. Creates a new instance
- // of the ACE_NT_Service-derived class SVCCLASS, unless one has
- // been created already.
- //
- // If you are using all the default constructor values, you can
- // let the generated ServiceMain function create the object, else
- // you need to create it by hand before calling
- // StartServiceCtrlDispatcher. Set the pointer so ServiceMain
- // won't create another one. Another reason you may want to do
- // the object creation yourself is if you want to also implement
- // suspend and resume functions (the ones inherited from
- // ACE_Service_Object) to do something intelligent to the services
- // which are running, like call their handle_control functions to
- // request suspend and resume actions, similar to what NT would do
- // if a Services control panel applet would do if the user clicks
- // on Suspend.
-public:
- // = Initialization and termination methods.
- ACE_NT_Service (DWORD start_timeout = ACE_NT_SERVICE_START_TIMEOUT,
- DWORD service_type = SERVICE_WIN32_OWN_PROCESS,
- DWORD controls_mask = SERVICE_ACCEPT_STOP);
- // Constructor primarily for use when running the service.
-
- ACE_NT_Service (const ACE_TCHAR *name,
- const ACE_TCHAR *desc = 0,
- DWORD start_timeout = ACE_NT_SERVICE_START_TIMEOUT,
- DWORD service_type = SERVICE_WIN32_OWN_PROCESS,
- DWORD controls_mask = SERVICE_ACCEPT_STOP);
- // Constructor primarily for use when inserting/removing/controlling
- // the service.
-
- virtual ~ACE_NT_Service (void);
-
- // = Functions to operate the service
-
- virtual int open (void *args = 0);
- // Hook called to open the service. By default, will set the status
- // to <START>_PENDING, <svc>, <wait>, then set the status to
- // STOPPED.
-
- virtual int svc (void);
- // The actual service implementation. This function need not be overridden
- // by applications that are just using SCM capabilities, but must be
- // by subclasses when actually running the service. It is expected that
- // this function will set the status to RUNNING.
-
- virtual void handle_control (DWORD control_code);
- // This function is called in response to a request from the Service
- // Dispatcher. It must interact with the <svc> function to effect the
- // requested control operation. The default implementation handles
- // all requests as follows:
- // SERVICE_CONTROL_STOP: set stop pending, set cancel flag
- // SERVICE_CONTROL_PAUSE: set pause pending, <suspend>, set paused
- // SERVICE_CONTROL_CONTINUE: set continue pending, <resume>, set running
- // SERVICE_CONTROL_INTERROGATE: reports current status
- // SERVICE_CONTROL_SHUTDOWN: same as SERVICE_CONTROL_STOP.
-
- void svc_handle (const SERVICE_STATUS_HANDLE new_svc_handle);
- // Set the svc_handle_ member. This is only a public function because
- // the macro-generated service function calls it.
-
-
- // = Methods which can be used to do SCP-like functions. The first group
- // are used to register/insert and remove the service's definition in the
- // SCM registry.
-
- void name (const ACE_TCHAR *name, const ACE_TCHAR *desc = 0);
- // Sets the name and description for the service.
- // If desc is 0, it takes the same value as name.
-
- const ACE_TCHAR *name (void) const;
- // Get the service name.
-
- const ACE_TCHAR *desc (void) const;
- // Get the service description.
-
- void host (const ACE_TCHAR *host);
- // Sets the host machine
-
- const ACE_TCHAR *host (void) const;
- // Get the host machine.
-
- int insert (DWORD start_type = SERVICE_DEMAND_START,
- DWORD error_control = SERVICE_ERROR_IGNORE,
- const ACE_TCHAR *exe_path = 0,
- const ACE_TCHAR *group_name = 0,
- LPDWORD tag_id = 0,
- const ACE_TCHAR *dependencies = 0,
- const ACE_TCHAR *account_name = 0,
- const ACE_TCHAR *password = 0);
- // Insert (create) the service in the NT Service Control Manager,
- // with the given creation values. exe_path defaults to the path name
- // of the program that calls the function. All other 0-defaulted arguments
- // pass 0 into the service creation, taking NT_specified defaults.
- // Returns -1 on error, 0 on success.
-
- int remove (void);
- // Remove the service from the NT Service Control Manager. Returns -1 on
- // error, 0 on success. This just affects the SCM and registry - the
- // can and will keep running fine if it is already running.
-
- int startup (DWORD startup);
- // Sets the startup type for the service. Returns -1 on error, 0 on success.
-
- DWORD startup (void);
- // Returns the current startup type.
-
-
- // = Methods which control the service's execution.
-
- // These methods to start/pause/resume/stop/check the service all
- // have the following common behavior with respect to <wait_time>
- // and return value. <wait_time> is a pointer to an ACE_Time_Value
- // object. If not supplied (a zero pointer) the function will wait
- // indefinitely for the action to be finalized (service reach
- // running state, completely shut down, etc.) or get "stuck" before
- // returning. If the time is supplied, it specifies how long to
- // wait for the service to reach a steady state, and on return, it
- // is updated to the service's last reported wait hint. So, if you
- // want to control the waiting yourself (for example, you want to
- // react to UI events during the wait) specify a <wait_time> of (0,
- // 0) and use the updated time to know when to check the service's
- // state again. NOTE!!!! The wait_time things don't work yet. The
- // calls always check status once, and do not wait for it to change.
- //
- // The return value from start_svc, stop_svc, pause_svc,
- // continue_svc is 0 if the request to NT to effect the change was
- // made successfully. The service may refuse to change, or not do
- // what you wanted; so if you need to know, supply a <svc_state>
- // pointer to receive the service's reported last state on return
- // and check it to see if it's what you want. The functions only
- // return -1 when the actual request to the service is refused -
- // this would include privilege restrictions and if the service is
- // not configured to receive the request (this is most likely to
- // happen in the case of pause and continue).
-
- int start_svc (ACE_Time_Value *wait_time = 0,
- DWORD *svc_state = 0,
- DWORD argc = 0, const ACE_TCHAR **argv = 0);
- // Start the service (must have been inserted before). wait_time is
- // the time to wait for the service to reach a steady state before
- // returning. If it is 0, the function waits as long as it takes
- // for the service to reach the 'running' state, or gets stuck in
- // some other state, or exits. If <wait_time> is supplied, it is
- // updated on return to hold the service's last reported wait hint.
- // svc_state can be used to receive the state which the service
- // settled in. If the value is 0, the service never ran. argc/argv
- // are passed to the service's ServiceMain function when it starts.
- // Returns 0 for success, -1 for error.
-
- int stop_svc (ACE_Time_Value *wait_time = 0, DWORD *svc_state = 0);
- // Requests the service to stop. Will wait up to <wait_time> for
- // the service to actually stop. If not specified, the function
- // waits until the service either stops or gets stuck in some other
- // state before it stops. If <svc_state> is specified, it receives
- // the last reported state of the service. Returns 0 if the request
- // was made successfully, -1 if not.
-
- int pause_svc (ACE_Time_Value *wait_time = 0, DWORD *svc_state = 0);
- // Pause the service.
-
- int continue_svc (ACE_Time_Value *wait_time = 0, DWORD *svc_state = 0);
- // Continue the service.
-
- DWORD state (ACE_Time_Value *wait_hint = 0);
- // Get the current state for the service. If <wait_hint> is not 0,
- // it receives the service's reported wait hint. Note that this
- // function returns 0 on failure (not -1 as is usual in ACE). A
- // zero return would (probably) only be returned if there is either
- // no service with the given name in the SCM database, or the caller
- // does not have sufficient rights to access the service state. The
- // set of valid service state values are all greater than 0.
-
- int state (DWORD *pstate, ACE_Time_Value *wait_hint = 0);
- // A version of <state> that returns -1 for failure, 0 for success.
- // The DWORD pointed to by pstate receives the state value.
-
- int test_access (DWORD desired_access = SERVICE_ALL_ACCESS);
- // Test access to the object's service in the SCM. The service must
- // already have been inserted in the SCM database. This function
- // has no affect on the service itself. Returns 0 if the specified
- // access is allowed, -1 otherwise (either the access is denied, or
- // there is a problem with the service's definition - check
- // ACE_OS::last_error to get the specific error indication.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- int report_status (DWORD new_status, DWORD time_hint = 0);
-
- SC_HANDLE svc_sc_handle (void);
- // Return the svc_sc_handle_ member. If the member is null, it
- // retrieves the handle from the Service Control Manager and caches
- // it.
-
- void wait_for_service_state (DWORD desired_state, ACE_Time_Value *wait_time);
- // Waits for the service to reach <desired_state> or get
- // (apparently) stuck before it reaches that state. Will wait at
- // most <wait_time> to get to the desired state. If <wait_time> is
- // 0, then the function keeps waiting until the desired state is
- // reached or the service doesn't update its state any further. The
- // svc_status_ class member is updated upon return. NOTE - the
- // timeout doesn't currently work - it always acts like
- // ACE_Time_Value::zero is passed - it checks the state once but
- // doesn't wait after that.
-
- virtual void stop_requested (DWORD control_code);
- // Called by <handle_control> when a stop/shutdown was requested.
-
- virtual void pause_requested (DWORD control_code);
- // Called by <handle_control> when a pause was requested.
-
- virtual void continue_requested (DWORD control_code);
- // Called by <handle_control> when a continue was requested.
-
- virtual void interrogate_requested (DWORD control_code);
- // Called by <handle_control> when a interrogate was requested.
-
-protected:
- DWORD start_time_;
- // Estimate of init time needed
- SERVICE_STATUS_HANDLE svc_handle_;
- // Service handle - doesn't need close.
- SERVICE_STATUS svc_status_;
-
- SC_HANDLE svc_sc_handle_;
- // Service's SCM handle
- ACE_TCHAR *name_;
- ACE_TCHAR *desc_;
- ACE_TCHAR *host_;
-
-};
-
-// These macros help to get things set up correctly at compile time
-// and to take most of the grudge work out of creating the proper
-// functions and doing the registrations.
-//
-// ACE_NT_SERVICE_DEFINE - defines the 'ServiceMain' function which NT will
-// call in its own thread when the service control
-// dispatcher starts.
-
-#define ACE_NT_SERVICE_DEFINE(SVCNAME, SVCCLASS, SVCDESC) \
- ACE_NT_Service * _ace_nt_svc_obj_##SVCNAME = 0; \
- VOID WINAPI ace_nt_svc_handler_##SVCNAME (DWORD fdwControl) { \
- _ace_nt_svc_obj_##SVCNAME->handle_control(fdwControl); \
- } \
- VOID WINAPI ace_nt_svc_main_##SVCNAME (DWORD dwArgc, \
- ACE_TCHAR **lpszArgv) { \
- int delete_svc_obj = 0; \
- if (_ace_nt_svc_obj_##SVCNAME == 0) { \
- ACE_NEW (_ace_nt_svc_obj_##SVCNAME, SVCCLASS); \
- if (_ace_nt_svc_obj_##SVCNAME == 0) \
- return; \
- delete_svc_obj = 1; \
- } \
- _ace_nt_svc_obj_##SVCNAME->init(dwArgc, lpszArgv); \
- _ace_nt_svc_obj_##SVCNAME->svc_handle( \
- RegisterServiceCtrlHandler(SVCDESC, \
- &ace_nt_svc_handler_##SVCNAME)); \
- _ace_nt_svc_obj_##SVCNAME->open(); \
- _ace_nt_svc_obj_##SVCNAME->wait(); \
- _ace_nt_svc_obj_##SVCNAME->fini(); \
- if (delete_svc_obj) { \
- delete _ace_nt_svc_obj_##SVCNAME; \
- _ace_nt_svc_obj_##SVCNAME = 0; \
- } \
- return; \
- }
-
-#define ACE_NT_SERVICE_REFERENCE(SVCNAME) \
-extern ACE_NT_Service * _ace_nt_svc_obj_##SVCNAME; \
-extern VOID WINAPI ace_nt_svc_main_##SVCNAME (DWORD dwArgc, \
- ACE_TCHAR **lpszArgv);
-
-#define ACE_NT_SERVICE_ENTRY(SVCDESC, SVCNAME) \
- { SVCDESC, &ace_nt_svc_main_##SVCNAME }
-
-#define ACE_NT_SERVICE_RUN(SVCNAME, SVCINSTANCE, RET) \
- SERVICE_TABLE_ENTRY _ace_nt_svc_table[2] = \
- { \
- ACE_NT_SERVICE_ENTRY(#SVCNAME, SVCNAME), \
- { 0, 0 } \
- }; \
- _ace_nt_svc_obj_##SVCNAME = SVCINSTANCE; \
- ACE_OS::last_error (0); \
- int RET = StartServiceCtrlDispatcher(_ace_nt_svc_table);
-
-#if defined (__ACE_INLINE__)
-#include "ace/NT_Service.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_WIN32 && !ACE_HAS_PHARLAP */
-
-#include "ace/post.h"
-#endif /* ACE_SERVICE_OBJECT_H */
diff --git a/ace/NT_Service.i b/ace/NT_Service.i
deleted file mode 100644
index 5a465066727..00000000000
--- a/ace/NT_Service.i
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_NT_Service::ACE_NT_Service (DWORD start_timeout,
- DWORD service_type,
- DWORD controls_mask) :
- start_time_(start_timeout),
- svc_handle_(0),
- svc_sc_handle_(0),
- name_(0),
- desc_(0),
- host_(0)
-{
- svc_status_.dwServiceType = service_type;
- svc_status_.dwCurrentState = 0;
- svc_status_.dwControlsAccepted = controls_mask;
- svc_status_.dwWin32ExitCode = NO_ERROR;
- svc_status_.dwServiceSpecificExitCode = 0;
- svc_status_.dwCheckPoint = 0;
-}
-
-
-ACE_INLINE
-ACE_NT_Service::ACE_NT_Service (const ACE_TCHAR *name,
- const ACE_TCHAR *desc,
- DWORD start_timeout,
- DWORD service_type,
- DWORD controls_mask) :
- start_time_(start_timeout),
- svc_handle_(0),
- svc_sc_handle_(0),
- name_(ACE::strnew(name)),
- desc_(ACE::strnew(desc)),
- host_(0)
-{
- svc_status_.dwServiceType = service_type;
- svc_status_.dwCurrentState = 0;
- svc_status_.dwControlsAccepted = controls_mask;
- svc_status_.dwWin32ExitCode = NO_ERROR;
- svc_status_.dwServiceSpecificExitCode = 0;
- svc_status_.dwCheckPoint = 0;
-}
-
-
-ACE_INLINE int
-ACE_NT_Service::svc (void)
-{
- return -1;
-}
-
-
-ACE_INLINE
-const ACE_TCHAR *
-ACE_NT_Service::name (void) const
-{
- return name_;
-}
-
-ACE_INLINE
-const ACE_TCHAR *
-ACE_NT_Service::desc (void) const
-{
- return desc_;
-}
-
-ACE_INLINE
-const ACE_TCHAR *
-ACE_NT_Service::host (void) const
-{
- return host_;
-}
-
-ACE_INLINE void
-ACE_NT_Service::svc_handle(const SERVICE_STATUS_HANDLE new_svc_handle)
-{
- this->svc_handle_ = new_svc_handle;
- return;
-}
diff --git a/ace/Name_Proxy.cpp b/ace/Name_Proxy.cpp
deleted file mode 100644
index 1868e56f850..00000000000
--- a/ace/Name_Proxy.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-// Name_Proxy.cpp
-// $Id$
-
-#include "ace/Name_Proxy.h"
-
-ACE_RCSID(ace, Name_Proxy, "$Id$")
-
-void
-ACE_Name_Proxy::dump (void) const
-{
- ACE_TRACE ("ACE_Name_Proxy::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->connector_.dump ();
- this->peer_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("reactor_ = %x"), this->reactor_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Default constructor.
-
-ACE_Name_Proxy::ACE_Name_Proxy (void)
- : reactor_ (0)
-{
- ACE_TRACE ("ACE_Name_Proxy::ACE_Name_Proxy");
-}
-
-// Establish binding with the ACE_Name Server at remote_addr.
-
-int
-ACE_Name_Proxy::open (const ACE_INET_Addr &remote_addr,
- ACE_Synch_Options& options)
-{
- ACE_TRACE ("ACE_Name_Proxy::open");
- ACE_Time_Value *timeout = 0;
-
- if (options[ACE_Synch_Options::USE_TIMEOUT])
- timeout = ACE_const_cast (ACE_Time_Value *, options.time_value ());
-
- // Initiate the connection.
- return this->connector_.connect (this->peer_,
- remote_addr,
- timeout);
-}
-
-// Establish binding with the ACE_Name Server at remote_addr.
-
-ACE_Name_Proxy::ACE_Name_Proxy (const ACE_INET_Addr &remote_addr,
- ACE_Synch_Options& options)
-{
- ACE_TRACE ("ACE_Name_Proxy::ACE_Name_Proxy");
- if (this->open (remote_addr, options) == -1
- && options[ACE_Synch_Options::USE_TIMEOUT] && errno != EWOULDBLOCK)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Name_Proxy::ACE_Name_Proxy")));
-}
-
-// Obtain underlying handle.
-
-/* VIRTUAL */ ACE_HANDLE
-ACE_Name_Proxy::get_handle (void) const
-{
- ACE_TRACE ("ACE_Name_Proxy::get_handle");
- return this->peer_.get_handle ();
-}
-
-int
-ACE_Name_Proxy::request_reply (ACE_Name_Request &request)
-{
- ACE_TRACE ("ACE_Name_Proxy::request_reply");
- void *buffer;
- ssize_t length = request.encode (buffer);
-
- if (length == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("encode failed")),
- -1);
-
- // Transmit request via a blocking send.
-
- if (this->peer_.send_n (buffer, length) != length)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("send_n failed")),
- -1);
- else
- {
- ACE_Name_Reply reply;
-
- // Receive reply via blocking read.
-
- if (this->peer_.recv_n (&reply,
- sizeof reply) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("recv failed")),
- -1);
- else if (reply.decode () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("decode failed")),
- -1);
- errno = int (reply.errnum ());
- return reply.status ();
- }
-}
-
-int
-ACE_Name_Proxy::send_request (ACE_Name_Request &request)
-{
- ACE_TRACE ("ACE_Name_Proxy::send_request");
- void *buffer;
- ssize_t length = request.encode (buffer);
-
- if (length == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("encode failed")),
- -1);
-
- // Transmit request via a blocking send.
-
- else if (this->peer_.send_n (buffer, length) != length)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("send_n failed")),
- -1);
- return 0;
-}
-
-int
-ACE_Name_Proxy::recv_reply (ACE_Name_Request &reply)
-{
- ACE_TRACE ("ACE_Name_Proxy::recv_reply");
- // Read the first 4 bytes to get the length of the message This
- // implementation assumes that the first 4 bytes are the length of
- // the message.
- ssize_t n = this->peer_.recv ((void *) &reply, sizeof (ACE_UINT32));
-
- switch (n)
- {
- case -1:
- // FALLTHROUGH
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("****************** recv_reply returned -1\n")));
- default:
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p got %d bytes, expected %d bytes\n"),
- ACE_TEXT ("recv failed"),
- n,
- sizeof (ACE_UINT32)));
- // FALLTHROUGH
- case 0:
- // We've shutdown unexpectedly
- return -1;
- // NOTREACHED
- case sizeof (ACE_UINT32):
- {
- // Transform the length into host byte order.
- ssize_t length = ntohl (reply.length ());
-
- // Receive the rest of the request message.
- // @@ beware of blocking read!!!.
- n = this->peer_.recv ((void *) (((char *) &reply)
- + sizeof (ACE_UINT32)),
- length - sizeof (ACE_UINT32));
-
- // Subtract off the size of the part we skipped over...
- if (n != ssize_t (length - sizeof (ACE_UINT32)))
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p expected %d, got %d\n"),
- ACE_TEXT ("invalid length"),
- length,
- n));
- return -1;
- }
-
- // Decode the request into host byte order.
- if (reply.decode () == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("decode failed")));
- return -1;
- }
- }
- }
- return 0;
-}
-
-// Close down the connection to the server.
-
-ACE_Name_Proxy::~ACE_Name_Proxy (void)
-{
- ACE_TRACE ("ACE_Name_Proxy::~ACE_Name_Proxy");
- this->peer_.close ();
-}
diff --git a/ace/Name_Proxy.h b/ace/Name_Proxy.h
deleted file mode 100644
index 604062a1cce..00000000000
--- a/ace/Name_Proxy.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Name_Proxy.h
-//
-// = DESCRIPTION
-// Proxy for dealing with remote server process managing NET_LOCAL
-// Name_Bindings.
-//
-// = AUTHOR
-// Gerhard Lenzer, Douglas C. Schmidt, and Prashant Jain
-//
-// ============================================================================
-
-#ifndef ACE_NAME_PROXY_H
-#define ACE_NAME_PROXY_H
-#include "ace/pre.h"
-
-#include "ace/INET_Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SOCK_Connector.h"
-#include "ace/SOCK_Stream.h"
-#include "ace/Service_Config.h"
-#include "ace/Synch_Options.h"
-#include "ace/Name_Request_Reply.h"
-
-class ACE_Export ACE_Name_Proxy : public ACE_Event_Handler
-{
- // = TITLE
- // Proxy for dealing with remote server process managing NET_LOCAL
- // NameBindings.
- //
- // = DESCRIPTION
- // Shields applications from details of interacting with the
- // ACE_Name Server.
-public:
- ACE_Name_Proxy (void);
- // Default constructor.
-
- // = Establish a binding with the ACE_Name Server.
- ACE_Name_Proxy (const ACE_INET_Addr &remote_addr, // Address of ACE_Name Server.
- ACE_Synch_Options& options =
- ACE_Synch_Options::defaults);
-
- int open (const ACE_INET_Addr &remote_addr, // Address of ACE_Name Server.
- ACE_Synch_Options& options =
- ACE_Synch_Options::defaults);
-
- int request_reply (ACE_Name_Request &request);
- // Perform the request and wait for the reply.
-
- int send_request (ACE_Name_Request &request);
- // Perform the request.
-
- int recv_reply (ACE_Name_Request &reply);
- // Receive the reply.
-
- virtual ACE_HANDLE get_handle (void) const;
- // Obtain underlying handle.
-
- virtual ~ACE_Name_Proxy (void);
- // Close down the connection to the server.
-
- void dump (void) const;
- // Dump the state of the object;
-
-private:
-
- ACE_SOCK_Connector connector_;
- // ACE_Connector factory used to establish connections actively.
-
- ACE_SOCK_Stream peer_;
- // Connection to ACE_Name Server peer.
-
- ACE_Reactor *reactor_;
- // Pointer to ACE_Reactor (used if we are run in "reactive-mode").
-};
-
-#include "ace/post.h"
-#endif /* ACE_NAME_PROXY_H */
diff --git a/ace/Name_Request_Reply.cpp b/ace/Name_Request_Reply.cpp
deleted file mode 100644
index 511d2632c59..00000000000
--- a/ace/Name_Request_Reply.cpp
+++ /dev/null
@@ -1,555 +0,0 @@
-// $Id$
-
-#include "ace/Name_Request_Reply.h"
-
-ACE_RCSID(ace, Name_Request_Reply, "$Id$")
-
-// Default "do nothing" constructor.
-
-ACE_Name_Request::ACE_Name_Request (void)
-{
- ACE_TRACE ("ACE_Name_Request::ACE_Name_Request");
-}
-
-// Create a ACE_Name_Request message.
-
-ACE_Name_Request::ACE_Name_Request (ACE_INT32 t, // Type of request.
- const ACE_USHORT16 name[], // Name
- const size_t name_length, // size in bytes
- const ACE_USHORT16 value[], //
- const size_t value_length, // size in bytes
- const char type[], //
- const size_t type_length, // size in bytes
- ACE_Time_Value *timeout) // Max time waiting for request.
-{
- ACE_TRACE ("ACE_Name_Request::ACE_Name_Request");
- this->msg_type (t);
- this->name_len (name_length);
- this->value_len (value_length);
- this->type_len (type_length);
-
- // If timeout is a NULL pointer, then block forever...
- if (timeout == 0)
- {
- this->transfer_.block_forever_ = 1;
- this->transfer_.sec_timeout_ = 0;
- this->transfer_.usec_timeout_ = 0;
- }
- else // Do a "timed wait."
- {
- this->block_forever (0);
- // Keep track of how long client is willing to wait.
- this->transfer_.sec_timeout_ = timeout->sec ();
- this->transfer_.usec_timeout_ = timeout->usec ();
- }
-
- // Set up pointers and copy name value and type into request.
- this->name_ = this->transfer_.data_;
- this->value_ = &this->name_[name_length / sizeof (ACE_USHORT16) ];
- this->type_ = (char *)(&this->value_[value_length / sizeof (ACE_USHORT16)]); //
-
- (void) ACE_OS::memcpy (this->name_,
- name,
- name_length);
- (void) ACE_OS::memcpy (this->value_,
- value,
- value_length);
- (void) ACE_OS::memcpy (this->type_,
- type,
- type_length);
-
- // Compute size of the fixed portion of the message...
- size_t len = sizeof this->transfer_ - sizeof this->transfer_.data_;
-
- // ... then add in the amount of the variable-sized portion.
- len += name_length + value_length + type_length ;
-
- this->length (len);
-}
-
-// Initialize length_ in order to avoid problems with byte-ordering.
-
-void
-ACE_Name_Request::init (void)
-{
- ACE_TRACE ("ACE_Name_Request::init");
- this->length (sizeof this->transfer_);
-}
-
-// = Set/get the length of the encoded/decoded message.
-
-ACE_UINT32
-ACE_Name_Request::length (void) const
-{
- ACE_TRACE ("ACE_Name_Request::length");
- return this->transfer_.length_;
-}
-
-void
-ACE_Name_Request::length (ACE_UINT32 l)
-{
- ACE_TRACE ("ACE_Name_Request::length");
- this->transfer_.length_ = l;
-}
-
-// = Set/get the type of the message.
-
-ACE_INT32
-ACE_Name_Request::msg_type (void) const
-{
- ACE_TRACE ("ACE_Name_Request::msg_type");
- return this->transfer_.msg_type_;
-}
-
-void
-ACE_Name_Request::msg_type (ACE_INT32 t)
-{
- ACE_TRACE ("ACE_Name_Request::msg_type");
- this->transfer_.msg_type_ = t;
-}
-
-// = Set/get the len of the name
-
-ACE_UINT32
-ACE_Name_Request::name_len (void) const
-{
- ACE_TRACE ("ACE_Name_Request::name_len");
- return this->transfer_.name_len_;
-}
-
-void
-ACE_Name_Request::name_len (ACE_UINT32 t)
-{
- ACE_TRACE ("ACE_Name_Request::name_len");
- this->transfer_.name_len_ = t;
-}
-
-// = Set/get the len of the value
-
-ACE_UINT32
-ACE_Name_Request::value_len (void) const
-{
- ACE_TRACE ("ACE_Name_Request::value_len");
- return this->transfer_.value_len_;
-}
-
-void
-ACE_Name_Request::value_len (ACE_UINT32 t)
-{
- ACE_TRACE ("ACE_Name_Request::value_len");
- this->transfer_.value_len_ = t;
-}
-
-// = Set/get the len of the type
-
-ACE_UINT32
-ACE_Name_Request::type_len (void) const
-{
- ACE_TRACE ("ACE_Name_Request::type_len");
- return this->transfer_.type_len_;
-}
-
-void
-ACE_Name_Request::type_len (ACE_UINT32 t)
-{
- ACE_TRACE ("ACE_Name_Request::type_len");
- this->transfer_.type_len_ = t;
-}
-
-// = Set/get the blocking semantics.
-
-ACE_UINT32
-ACE_Name_Request::block_forever (void) const
-{
- ACE_TRACE ("ACE_Name_Request::block_forever");
- return this->transfer_.block_forever_;
-}
-
-void
-ACE_Name_Request::block_forever (ACE_UINT32 bs)
-{
- ACE_TRACE ("ACE_Name_Request::block_forever");
- this->transfer_.block_forever_ = bs;
-}
-
-// = Set/get the timeout.
-
-ACE_Time_Value
-ACE_Name_Request::timeout (void) const
-{
- ACE_TRACE ("ACE_Name_Request::timeout");
- return ACE_Time_Value (this->transfer_.sec_timeout_,
- this->transfer_.usec_timeout_);
-}
-
-void
-ACE_Name_Request::timeout (const ACE_Time_Value timeout)
-{
- ACE_TRACE ("ACE_Name_Request::timeout");
- this->transfer_.sec_timeout_ = timeout.sec ();
- this->transfer_.usec_timeout_ = timeout.usec ();
-}
-
-// = Set/get the name
-
-const ACE_USHORT16 *
-ACE_Name_Request::name (void) const
-{
- ACE_TRACE ("ACE_Name_Request::name");
- return this->name_;
-}
-
-void
-ACE_Name_Request::name (const ACE_USHORT16 *t)
-{
- ACE_TRACE ("ACE_Name_Request::name");
- (void) ACE_OS::memcpy (this->name_,
- t,
- this->name_len ());
-}
-
-// = Set/get the value
-
-const ACE_USHORT16 *
-ACE_Name_Request::value (void) const
-{
- ACE_TRACE ("ACE_Name_Request::value");
- return this->value_;
-}
-
-void
-ACE_Name_Request::value (const ACE_USHORT16 *c)
-{
- ACE_TRACE ("ACE_Name_Request::value");
-
- (void) ACE_OS::memcpy (this->value_,
- c,
- this->value_len());
-}
-
-// = Set/get the type
-
-const char *
-ACE_Name_Request::type (void) const
-{
- ACE_TRACE ("ACE_Name_Request::type");
- return this->type_;
-}
-
-void
-ACE_Name_Request::type (const char *c)
-{
- ACE_TRACE ("ACE_Name_Request::type");
- (void) ::strncpy (this->type_,
- c,
- MAXPATHLEN + 1);
-}
-
-// Encode the transfer buffer into network byte order so that it can
-// be sent to the server.
-
-int
-ACE_Name_Request::encode (void *&buf)
-{
- ACE_TRACE ("ACE_Name_Request::encode");
- // Compute the length *before* doing the marshaling.
-
- ssize_t len = this->length ();
-
- size_t nv_data_len =
- (this->transfer_.name_len_ + this->transfer_.value_len_)
- / sizeof (ACE_USHORT16);
-
- for (size_t i = 0; i < nv_data_len; i++)
- this->transfer_.data_[i] =
- htons (this->transfer_.data_[i]);
-
- buf = (void *) &this->transfer_;
- this->transfer_.block_forever_ = htonl (this->transfer_.block_forever_);
- this->transfer_.usec_timeout_ = htonl (this->transfer_.usec_timeout_);
- this->transfer_.sec_timeout_ = htonl (this->transfer_.sec_timeout_);
- this->transfer_.length_ = htonl (this->transfer_.length_);
- this->transfer_.msg_type_ = htonl (this->transfer_.msg_type_);
- this->transfer_.name_len_ = htonl (this->transfer_.name_len_);
- this->transfer_.value_len_ = htonl (this->transfer_.value_len_);
- this->transfer_.type_len_ = htonl (this->transfer_.type_len_);
-
- return len;
-}
-
-// Decode the transfer buffer into host byte byte order so that it can
-// be used by the server.
-
-int
-ACE_Name_Request::decode (void)
-{
- ACE_TRACE ("ACE_Name_Request::decode");
- // Decode the fixed-sized portion first.
- this->transfer_.block_forever_ = ntohl (this->transfer_.block_forever_);
- this->transfer_.usec_timeout_ = ntohl (this->transfer_.usec_timeout_);
- this->transfer_.sec_timeout_ = ntohl (this->transfer_.sec_timeout_);
- this->transfer_.length_ = ntohl (this->transfer_.length_);
- this->transfer_.msg_type_ = ntohl (this->transfer_.msg_type_);
- this->transfer_.name_len_ = ntohl (this->transfer_.name_len_);
- this->transfer_.value_len_ = ntohl (this->transfer_.value_len_);
- this->transfer_.type_len_ = ntohl (this->transfer_.type_len_);
-
- size_t nv_data_len =
- (this->transfer_.name_len_ + this->transfer_.value_len_)
- / sizeof (ACE_USHORT16);
-
- for (size_t i = 0; i < nv_data_len; i++)
- this->transfer_.data_[i] =
- ntohs (this->transfer_.data_[i]);
-
- this->name_ = this->transfer_.data_;
- this->value_ = &this->name_[this->transfer_.name_len_ / sizeof (ACE_USHORT16)];
- this->type_ = (char *)(&this->value_[this->transfer_.value_len_ / sizeof (ACE_USHORT16)]);
- this->type_[this->transfer_.type_len_] = '\0';
-
- // Decode the variable-sized portion.
- return 0;
-}
-
-// Print out the current values of the ACE_Name_Request.
-
-void
-ACE_Name_Request::dump (void) const
-{
- ACE_TRACE ("ACE_Name_Request::dump");
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("*******\nlength = %d\n"),
- this->length ()));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("message-type = ")));
-
- switch (this->msg_type ())
- {
- case ACE_Name_Request::BIND:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("BIND\n")));
- break;
- case ACE_Name_Request::REBIND:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("REBIND\n")));
- break;
- case ACE_Name_Request::RESOLVE:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("RESOLVE\n")));
- break;
- case ACE_Name_Request::UNBIND:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("UNBIND\n")));
- break;
- case ACE_Name_Request::LIST_NAMES:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("LIST_NAMES\n")));
- break;
- case ACE_Name_Request::LIST_VALUES:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("LIST_VALUES\n")));
- break;
- case ACE_Name_Request::LIST_TYPES:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("LIST_TYPES\n")));
- break;
- case ACE_Name_Request::LIST_NAME_ENTRIES:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("LIST_NAME_ENTRIES\n")));
- break;
- case ACE_Name_Request::LIST_VALUE_ENTRIES:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("LIST_VALUE_ENTRIES\n")));
- break;
- case ACE_Name_Request::LIST_TYPE_ENTRIES:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("LIST_TYPE_ENTRIES\n")));
- break;
- default:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("<unknown type> = %d\n"),
- this->msg_type ()));
- break;
- }
-
- if (this->block_forever ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("blocking forever\n")));
- else
- {
-#if !defined (ACE_NLOGGING)
- ACE_Time_Value tv = this->timeout ();
-#endif /* ! ACE_NLOGGING */
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("waiting for %d secs and %d usecs\n"),
- tv.sec (),
- tv.usec ()));
- }
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("*******\nname_len = %d\n"),
- this->name_len ()));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("*******\nvalue_len = %d\n"),
- this->value_len ()));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("+++++++\n")));
-}
-
-// Default constructor.
-
-ACE_Name_Reply::ACE_Name_Reply (void)
-{
- ACE_TRACE ("ACE_Name_Reply::ACE_Name_Reply");
-
- // Initialize to a known quantity.
- this->msg_type (0);
- this->errnum (0);
- this->length (sizeof this->transfer_);
-}
-
-// Create a ACE_Name_Reply message.
-
-ACE_Name_Reply::ACE_Name_Reply (ACE_UINT32 t, ACE_UINT32 err) // Type of reply.
-{
- ACE_TRACE ("ACE_Name_Reply::ACE_Name_Reply");
- this->msg_type (t);
- this->errnum (err);
- this->length (sizeof this->transfer_);
-}
-
-// Initialize length_ to avoid problems with byte-ordering.
-
-void
-ACE_Name_Reply::init (void)
-{
- ACE_TRACE ("ACE_Name_Reply::init");
- this->length (sizeof this->transfer_);
-}
-
-// = Set/get the length of the encoded/decoded message.
-
-ACE_UINT32
-ACE_Name_Reply::length (void) const
-{
- ACE_TRACE ("ACE_Name_Reply::length");
- return this->transfer_.length_;
-}
-
-void
-ACE_Name_Reply::length (ACE_UINT32 l)
-{
- ACE_TRACE ("ACE_Name_Reply::length");
- this->transfer_.length_ = l;
-}
-
-// = Set/get the type of the message.
-
-ACE_INT32
-ACE_Name_Reply::msg_type (void) const
-{
- ACE_TRACE ("ACE_Name_Reply::msg_type");
- return this->transfer_.type_;
-}
-
-void
-ACE_Name_Reply::msg_type (ACE_INT32 t)
-{
- ACE_TRACE ("ACE_Name_Reply::msg_type");
- this->transfer_.type_ = t;
-}
-
-// Get the status of the reply (0 == success, -1 == failure).
-
-ACE_INT32
-ACE_Name_Reply::status (void) const
-{
- ACE_TRACE ("ACE_Name_Reply::status");
- return this->transfer_.type_;
-}
-
-// Set the status of the reply (0 == success, -1 == failure).
-
-void
-ACE_Name_Reply::status (ACE_INT32 s)
-{
- ACE_TRACE ("ACE_Name_Reply::status");
- if (s == -1)
- this->transfer_.type_ = -1;
- else
- this->transfer_.type_ = 0;
-}
-
-// = Set/get the errno of a failed reply.
-ACE_UINT32
-ACE_Name_Reply::errnum (void) const
-{
- ACE_TRACE ("ACE_Name_Reply::errnum");
- return this->transfer_.errno_;
-}
-
-void
-ACE_Name_Reply::errnum (ACE_UINT32 e)
-{
- ACE_TRACE ("ACE_Name_Reply::errnum");
- this->transfer_.errno_ = e;
-}
-
-// Encode the transfer buffer into network byte order
-// so that it can be sent to the client.
-
-int
-ACE_Name_Reply::encode (void *&buf)
-{
- ACE_TRACE ("ACE_Name_Reply::encode");
- int len = this->length (); // Get length *before* marshaling.
-
- this->transfer_.length_ = htonl (this->transfer_.length_);
- this->transfer_.type_ = htonl (this->transfer_.type_);
- this->transfer_.errno_ = htonl (this->transfer_.errno_);
- buf = (void *) &this->transfer_;
- return len;
-}
-
-// Decode the transfer buffer into host byte order so that it can be
-// used by the client.
-
-int
-ACE_Name_Reply::decode (void)
-{
- ACE_TRACE ("ACE_Name_Reply::decode");
- this->transfer_.length_ = ntohl (this->transfer_.length_);
- this->transfer_.type_ = ntohl (this->transfer_.type_);
- this->transfer_.errno_ = ntohl (this->transfer_.errno_);
- return 0;
-}
-
-// Print out current values of the ACE_Name_Reply object.
-
-void
-ACE_Name_Reply::dump (void) const
-{
- ACE_TRACE ("ACE_Name_Reply::dump");
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("*******\nlength = %d\nerrnum = %d"),
- this->length (),
- this->errnum ()));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("type = ")));
- switch (this->msg_type ())
- {
- case 0:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("SUCCESS\n")));
- break;
- case -1:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("FAILURE\n")));
- break;
- default:
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("<unknown type> = %d\n"),
- this->msg_type ()));
- break;
- }
-}
diff --git a/ace/Name_Request_Reply.h b/ace/Name_Request_Reply.h
deleted file mode 100644
index 8e1784083c4..00000000000
--- a/ace/Name_Request_Reply.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Name_Request_Reply.h
-//
-// = DESCRIPTION
-// Define the format used to exchange messages between the
-// ACE_Name Server and its clients.
-//
-// = AUTHOR
-// Gerhard Lenzer, Douglas C. Schmidt, and Prashant Jain
-//
-// ============================================================================
-
-#ifndef ACE_NAME_REQUEST_REPLY_H
-#define ACE_NAME_REQUEST_REPLY_H
-#include "ace/pre.h"
-
-#include "ace/Time_Value.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SString.h"
-
-class ACE_Export ACE_Name_Request
-{
- // = TITLE
- // Message format for delivering requests to the ACE_Name Server.
- //
- // = DESCRIPTION
- // This class is implemented to minimize data copying. In
- // particular, all marshaling is done in situ...
-public:
- enum Constants
- {
- // Request message types.
- BIND = 01,
- REBIND = 02,
- RESOLVE = 03,
- UNBIND = 04,
- LIST_NAMES = 05,
- LIST_VALUES = 015,
- LIST_TYPES = 025,
- LIST_NAME_ENTRIES = 06,
- LIST_VALUE_ENTRIES = 016,
- LIST_TYPE_ENTRIES = 026,
- MAX_ENUM = 11,
- MAX_LIST = 3,
-
- // Mask for bitwise operation used for table lookup
- OP_TABLE_MASK = 07, // Mask for lookup of operation
- LIST_OP_MASK = 030, // Mask for lookup of list_operation
-
- // Class-specific constant values.
- MAX_NAME_LENGTH = MAXPATHLEN + 1
- };
-
- ACE_Name_Request (void);
- // Default constructor.
-
- ACE_Name_Request (ACE_INT32 msg_type, // Type of request.
- const ACE_USHORT16 name[], //
- const size_t name_length,
- const ACE_USHORT16 value[],
- const size_t value_length,
- const char type[],
- const size_t type_length,
- ACE_Time_Value *timeout = 0); // Max time willing to wait for request.
- // Create a <ACE_Name_Request> message.
-
- void init (void);
- // Initialize length_ in order to ensure correct byte ordering
- // before a request is sent.
-
- // = Set/get the length of the encoded/decoded message.
- ACE_UINT32 length (void) const;
- void length (ACE_UINT32);
-
- // = Set/get the type of the message.
- ACE_INT32 msg_type (void) const;
- void msg_type (ACE_INT32);
-
- // = Set/get the blocking semantics.
- ACE_UINT32 block_forever (void) const;
- void block_forever (ACE_UINT32);
-
- // = Set/get the timeout.
- ACE_Time_Value timeout (void) const;
- void timeout (const ACE_Time_Value timeout);
-
- // = Set/get the name
- const ACE_USHORT16 *name (void) const;
- void name (const ACE_USHORT16 *);
-
- // = Set/get the value
- const ACE_USHORT16 *value (void) const;
- void value (const ACE_USHORT16 *);
-
- // = Set/get the type
- const char *type (void) const;
- void type (const char *);
-
- // = Set/get the len of name
- ACE_UINT32 name_len (void) const;
- void name_len (ACE_UINT32);
-
- // = Set/get the len of value
- ACE_UINT32 value_len (void) const;
- void value_len (ACE_UINT32);
-
- // = Set/get the len of type
- ACE_UINT32 type_len (void) const;
- void type_len (ACE_UINT32);
-
- int encode (void *&);
- // Encode the message before transmission.
-
- int decode (void);
- // Decode message after reception.
-
- void dump (void) const;
- // Print out the values of the message for debugging purposes.
-
-private:
- // = The 5 fields in the <Transfer> struct are transmitted to the server.
- // The remaining 2 fields are not tranferred -- they are used only on
- // the server-side to simplify lookups.
-
- struct Transfer
- {
- ACE_UINT32 length_;
- // Length of entire request.
-
- ACE_UINT32 msg_type_;
- // Type of the request (i.e., <BIND>, <REBIND>, <RESOLVE>, and <UNBIND>).
-
- ACE_UINT32 block_forever_;
- // Indicates if we should block forever. If 0, then <secTimeout_>
- // and <usecTimeout_> indicates how long we should wait.
-
- ACE_UINT32 sec_timeout_;
- // Max seconds willing to wait for name if not blocking forever.
-
- ACE_UINT32 usec_timeout_;
- // Max micro seconds to wait for name if not blocking forever.
-
- ACE_UINT32 name_len_;
- // Len of name in bytes
-
- ACE_UINT32 value_len_;
- // Len of value in bytes
-
- ACE_UINT32 type_len_;
- // Len of type in bytes
-
- ACE_USHORT16 data_[MAX_NAME_LENGTH + MAXPATHLEN + MAXPATHLEN + 2];
- // The data portion contains the <name_>
- // followed by the <value_>
- // followed by the <type_>.
- };
-
- Transfer transfer_;
- // Transfer buffer.
-
- ACE_USHORT16 *name_;
- // Pointer to the beginning of the name in this->data_.
-
- ACE_USHORT16 *value_;
- // Pointer to the beginning of the value in this->data_;
-
- char *type_;
- // Pointer to the beginning of the type in this->data_;
-};
-
-class ACE_Export ACE_Name_Reply
-{
- // = TITLE
- // Message format for delivering replies from the ACE_Name Server.
- //
- // = DESCRIPTION
- // This class is implemented to minimize data copying. In
- // particular, all marshaling is done in situ...
-public:
- enum Constants
- {
- // Class-specific constant values.
- MAX_NAME_LENGTH = MAXPATHLEN + 1
- };
-
- ACE_Name_Reply (void);
- // Default constructor.
-
- ACE_Name_Reply (ACE_UINT32 type, ACE_UINT32 err); // Type of reply.
- // Create a <ACE_Name_Reply> message.
-
- void init (void);
- // Initialize length_ in order to ensure correct byte ordering
- // before a reply is sent.
-
- // = Set/get the length of the encoded/decoded message.
- ACE_UINT32 length (void) const;
- void length (ACE_UINT32);
-
- // = Set/get the type of the message.
- ACE_INT32 msg_type (void) const;
- void msg_type (ACE_INT32);
-
- // = Set/get the status of the reply (0 == success, -1 == failure).
- ACE_INT32 status (void) const;
- void status (ACE_INT32);
-
- // = Set/get the errno of a failed reply.
- ACE_UINT32 errnum (void) const;
- void errnum (ACE_UINT32);
-
- int encode (void *&);
- // Encode the message before transfer.
-
- int decode (void);
- // Decode a message after reception.
-
- void dump (void) const;
- // Print out the values of the message for debugging purposes.
-
-private:
- // = The 3 fields in the <Transfer> struct are transmitted to the server.
-
- struct Transfer
- {
- ACE_UINT32 length_;
- // Length of entire reply.
-
- ACE_INT32 type_;
- // Type of the reply, i.e., success (0) or failure (-1).
-
- ACE_UINT32 errno_;
- // Indicates why error occurred if <this->type_> == failure (-1).
- // Typical reasons include: <ETIME> (if the client timed out after
- // waiting for the name).
- };
-
- Transfer transfer_;
- // Transfer buffer.
-};
-
-#include "ace/post.h"
-#endif /* ACE_NAME_REQUEST_REPLY_H */
diff --git a/ace/Name_Space.cpp b/ace/Name_Space.cpp
deleted file mode 100644
index dbc3c392d6c..00000000000
--- a/ace/Name_Space.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// Name_Space.cpp
-// $Id$
-
-#include "ace/Name_Space.h"
-
-ACE_RCSID(ace, Name_Space, "$Id$")
-
-ACE_Name_Binding::ACE_Name_Binding (void)
- : type_ (ACE_OS::strdup (""))
-{
- ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
-}
-
-
-ACE_Name_Binding::~ACE_Name_Binding (void)
-{
- ACE_TRACE ("ACE_Name_Binding::~ACE_Name_Binding");
- ACE_OS::free ((void *) this->type_);
-}
-
-ACE_Name_Binding::ACE_Name_Binding (const ACE_WString &name,
- const ACE_WString &value,
- const char *type)
- : name_ (name),
- value_ (value),
- type_ (type == 0 ? ACE_OS::strdup ("") : ACE_OS::strdup (type))
-{
- ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
-}
-
-ACE_Name_Binding::ACE_Name_Binding (const ACE_Name_Binding &s)
- : name_ (s.name_),
- value_ (s.value_),
- type_ (ACE_OS::strdup (s.type_))
-{
- ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
-}
-
-void
-ACE_Name_Binding::operator = (const ACE_Name_Binding &s)
-{
- ACE_TRACE ("ACE_Name_Binding::operator =");
-
- this->name_ = s.name_;
- this->value_ = s.value_;
- this->type_ = ACE_OS::strdup (s.type_);
-}
-
-int
-ACE_Name_Binding::operator == (const ACE_Name_Binding &s) const
-{
- ACE_TRACE ("ACE_Name_Binding::operator ==");
- return this->name_ == s.name_
- && this->value_ == s.value_
- && ACE_OS::strcmp (this->type_, s.type_) == 0;
-}
-
-ACE_Name_Space::~ACE_Name_Space (void)
-{
- ACE_TRACE ("ACE_Name_Space::~ACE_Name_Space");
-}
-
diff --git a/ace/Name_Space.h b/ace/Name_Space.h
deleted file mode 100644
index 97e7a7b954c..00000000000
--- a/ace/Name_Space.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Name_Space.h
-//
-// = AUTHOR
-// Prashant Jain
-//
-// ============================================================================
-
-#ifndef ACE_NAME_SPACE_H
-#define ACE_NAME_SPACE_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SString.h"
-#include "ace/Containers.h"
-#include "ace/Name_Proxy.h"
-
-typedef ACE_Unbounded_Set<ACE_WString> ACE_WSTRING_SET;
-
-class ACE_Export ACE_Name_Binding
-{
- // = TITLE
- // Maintains a mapping from name to value and type.
-public:
- // = Initialization and termination.
- ACE_Name_Binding (const ACE_WString &n,
- const ACE_WString &v,
- const char *t);
- // Main constructor that initializes all the fields.
-
- ACE_Name_Binding (void);
- // Default constructor.
-
- ACE_Name_Binding (const ACE_Name_Binding &);
- // Copy constructor.
-
- void operator= (const ACE_Name_Binding &);
- // Assignment operator.
-
- ~ACE_Name_Binding (void);
- // Destructor.
-
- int operator == (const ACE_Name_Binding &s) const;
- // Test for equality.
-
- ACE_WString name_;
- // Name of the binding.
-
- ACE_WString value_;
- // Value of the binding.
-
- char *type_;
- // Type of the binding.
-};
-
-typedef ACE_Unbounded_Set<ACE_Name_Binding> ACE_BINDING_SET;
-typedef ACE_Unbounded_Set_Iterator<ACE_Name_Binding> ACE_BINDING_ITERATOR;
-
-typedef ACE_Unbounded_Set<ACE_WString> ACE_PWSTRING_SET;
-typedef ACE_Unbounded_Set_Iterator<ACE_WString> ACE_PWSTRING_ITERATOR;
-
-class ACE_Export ACE_Name_Space
-{
- // = TITLE
- // Abstract base class that provides an abstract interface to
- // the database without exposing any implemenation details.
- //
- // = DESCRIPTION
- // Manages a Naming Service Name Space. Provides the basic
- // methods -- bind, unbind, rebind, find, and listnames.
-public:
-
- virtual ~ACE_Name_Space (void);
- // virtual destructor to ensure destructors of subclasses get
- // called.
-
- virtual int bind (const ACE_WString &name_in,
- const ACE_WString &value_in,
- const char *type_in = "") = 0;
- // Bind a new name to a naming context (Wide character strings).
-
-
- virtual int rebind (const ACE_WString &name_in,
- const ACE_WString &value_in,
- const char *type_in = "") = 0;
- // Overwrite the value or type of an existing name in a
- // ACE_Name_Space or bind a new name to the context, if it didn't
- // exist yet. (Wide charcter strings interface).
-
- virtual int unbind (const ACE_WString &name_in) = 0;
- // Delete a name from a ACE_Name_Space (Wide charcter strings
- // Interface).
-
- virtual int resolve (const ACE_WString &name_in,
- ACE_WString &value_out,
- char *&type_out) = 0;
- // Get value and type of a given name binding (Wide chars). The
- // caller is responsible for deleting both <value_out> and <type_out>!
-
- virtual int list_names (ACE_WSTRING_SET &set_out,
- const ACE_WString &pattern_in) = 0;
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string.
-
- virtual int list_values (ACE_WSTRING_SET &set_out,
- const ACE_WString &pattern_in) = 0;
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string.
-
- virtual int list_types (ACE_WSTRING_SET &set_out,
- const ACE_WString &pattern_in) = 0;
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string.
-
- virtual int list_name_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern) = 0;
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_value_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern) = 0;
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_type_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern) = 0;
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual void dump (void) const = 0;
- // Dump the state of the object
-};
-
-#include "ace/post.h"
-#endif /* ACE_NAME_SPACE_H */
diff --git a/ace/Naming_Context.cpp b/ace/Naming_Context.cpp
deleted file mode 100644
index 145281a4341..00000000000
--- a/ace/Naming_Context.cpp
+++ /dev/null
@@ -1,685 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Naming_Context.h"
-#include "ace/Remote_Name_Space.h"
-#include "ace/Local_Name_Space_T.h"
-#include "ace/Registry_Name_Space.h"
-#include "ace/Memory_Pool.h"
-
-ACE_RCSID(ace, Naming_Context, "$Id$")
-
-// Make life easier later on...
-
-typedef ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
- LOCAL_NAME_SPACE;
-typedef ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
- LITE_LOCAL_NAME_SPACE;
-
-// The following Factory is used by the ACE_Service_Config and
-// svc.conf file to dynamically initialize the state of the Name
-// Server client.
-
-ACE_FACTORY_DEFINE (ACE, ACE_Naming_Context)
-
-// The ACE_Naming_Context static service object is now defined
-// by the ACE_Object_Manager, in Object_Manager.cpp.
-
-int
-ACE_Naming_Context::info (char **strp,
- size_t length) const
-{
- ACE_TRACE ("ACE_Naming_Context::info");
- char buf[BUFSIZ];
-
- ACE_OS::sprintf (buf, "%s\t#%s\n",
- "ACE_Naming_Context",
- "Proxy for making calls to a Name Server");
-
- if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*strp, buf, length);
- return ACE_OS::strlen (buf);
-}
-
-int
-ACE_Naming_Context::local (void)
-{
- ACE_TRACE ("ACE_Naming_Context::local");
- return ACE_OS::strcmp (this->netnameserver_host_,
- ACE_TEXT ("localhost")) == 0
- || ACE_OS::strcmp (this->netnameserver_host_,
- this->hostname_) == 0;
-}
-
-int
-ACE_Naming_Context::open (Context_Scope_Type scope_in, int lite)
-{
- ACE_TRACE ("ACE_Naming_Context::open");
- ACE_OS::hostname (this->hostname_,
- (sizeof this->hostname_ / sizeof (ACE_TCHAR)));
-
- this->netnameserver_host_ =
- this->name_options_->nameserver_host ();
- this->netnameserver_port_ =
- this->name_options_->nameserver_port ();
-
- // Perform factory operation to select appropriate type of
- // Name_Space subclass.
-
-#if (defined (ACE_WIN32) && defined (UNICODE))
-// This only works on Win32 platforms when UNICODE is turned on
-
- if (this->name_options_->use_registry ())
- // Use ACE_Registry
- ACE_NEW_RETURN (this->name_space_,
- ACE_Registry_Name_Space (this->name_options_),
- -1);
-#endif /* ACE_WIN32 && UNICODE */
- if (!this->name_options_->use_registry ())
- if (scope_in == ACE_Naming_Context::NET_LOCAL && this->local () == 0)
- {
- // Use NET_LOCAL name space, set up connection with remote server.
- ACE_NEW_RETURN (this->name_space_,
- ACE_Remote_Name_Space (this->netnameserver_host_,
- (u_short) this->netnameserver_port_),
- -1);
- }
- else // Use NODE_LOCAL or PROC_LOCAL name space.
- {
- if (lite)
- ACE_NEW_RETURN (this->name_space_,
- LITE_LOCAL_NAME_SPACE (scope_in,
- this->name_options_),
- -1);
- else
- ACE_NEW_RETURN (this->name_space_,
- LOCAL_NAME_SPACE (scope_in,
- this->name_options_),
- -1);
- }
-
- if (ACE_LOG_MSG->op_status () != 0 || this->name_space_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("NAME_SPACE::NAME_SPACE\n")),
- -1);
- return 0;
-}
-
-int
-ACE_Naming_Context::close_down (void)
-{
- ACE_TRACE ("ACE_Naming_Context::close_down");
-
- delete this->name_options_;
- this->name_options_ = 0;
-
- return this->close ();
-}
-
-int
-ACE_Naming_Context::close (void)
-{
- ACE_TRACE ("ACE_Naming_Context::close");
-
- delete this->name_space_;
- this->name_space_ = 0;
-
- return 0;
-}
-
-ACE_Naming_Context::ACE_Naming_Context (void)
- : name_options_ (0),
- name_space_ (0)
-{
- ACE_TRACE ("ACE_Naming_Context::ACE_Naming_Context");
-
- ACE_NEW (this->name_options_,
- ACE_Name_Options);
-}
-
-ACE_Naming_Context::ACE_Naming_Context (Context_Scope_Type scope_in,
- int lite)
- : name_options_ (0),
- name_space_ (0)
-{
- ACE_TRACE ("ACE_Naming_Context::ACE_Naming_Context");
-
- ACE_NEW (this->name_options_,
- ACE_Name_Options);
-
- // Initialize.
- if (this->open (scope_in, lite) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Naming_Context::ACE_Naming_Context")));
-}
-
-ACE_Name_Options *
-ACE_Naming_Context::name_options (void)
-{
- return this->name_options_;
-}
-
-int
-ACE_Naming_Context::bind (const ACE_WString &name_in,
- const ACE_WString &value_in,
- const char *type_in)
-{
- ACE_TRACE ("ACE_Naming_Context::bind");
- return this->name_space_->bind (name_in, value_in, type_in);
-}
-
-int
-ACE_Naming_Context::bind (const char *name_in,
- const char *value_in,
- const char *type_in)
-{
- ACE_TRACE ("ACE_Naming_Context::bind");
- return this->bind (ACE_WString (name_in),
- ACE_WString (value_in),
- type_in);
-}
-
-int
-ACE_Naming_Context::rebind (const ACE_WString &name_in,
- const ACE_WString &value_in,
- const char *type_in)
-{
- ACE_TRACE ("ACE_Naming_Context::rebind");
- return this->name_space_->rebind (name_in,
- value_in,
- type_in);
-}
-
-int
-ACE_Naming_Context::rebind (const char *name_in,
- const char *value_in,
- const char *type_in)
-{
- ACE_TRACE ("ACE_Naming_Context::rebind");
- return rebind (ACE_WString (name_in),
- ACE_WString (value_in),
- type_in);
-}
-
-int
-ACE_Naming_Context::resolve (const ACE_WString &name_in,
- ACE_WString &value_out,
- char *&type_out)
-{
- ACE_TRACE ("ACE_Naming_Context::resolve");
- return this->name_space_->resolve (name_in,
- value_out,
- type_out);
-}
-
-int
-ACE_Naming_Context::resolve (const char *name_in,
- ACE_WString &value_out,
- char *&type_out)
-{
- ACE_TRACE ("ACE_Naming_Context::resolve");
- return this->resolve (ACE_WString (name_in),
- value_out,
- type_out);
-}
-
-int
-ACE_Naming_Context::resolve (const char *name_in,
- char *&value_out,
- char *&type_out)
-{
- ACE_TRACE ("ACE_Naming_Context::resolve");
- ACE_WString val_str;
-
- if (this->resolve (ACE_WString (name_in),
- val_str,
- type_out) == -1)
- return -1;
-
- // Note that <char_rep> *allocates* the memory! Thus, caller is
- // responsible for deleting it!
- value_out = val_str.char_rep ();
-
- return value_out == 0 ? -1 : 0;
-}
-
-int
-ACE_Naming_Context::unbind (const ACE_WString &name_in)
-{
- ACE_TRACE ("ACE_Naming_Context::unbind");
- return this->name_space_->unbind (name_in);
-}
-
-int
-ACE_Naming_Context::unbind (const char *name_in)
-{
- ACE_TRACE ("ACE_Naming_Context::unbind");
- return this->unbind (ACE_WString (name_in));
-}
-
-int
-ACE_Naming_Context::list_names (ACE_PWSTRING_SET &set_out,
- const ACE_WString &pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_names");
- return this->name_space_->list_names (set_out,
- pattern_in);
-}
-
-int
-ACE_Naming_Context::list_names (ACE_PWSTRING_SET &set_out,
- const char *pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_names");
- return this->list_names (set_out,
- ACE_WString (pattern_in));
-}
-
-int
-ACE_Naming_Context::list_values (ACE_PWSTRING_SET &set_out,
- const ACE_WString &pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_values");
- return this->name_space_->list_values (set_out,
- pattern_in);
-}
-
-int
-ACE_Naming_Context::list_values (ACE_PWSTRING_SET &set_out,
- const char *pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_values");
- return this->list_values (set_out,
- ACE_WString (pattern_in));
-}
-
-int
-ACE_Naming_Context::list_types (ACE_PWSTRING_SET &set_out,
- const ACE_WString &pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_types");
- return this->name_space_->list_types (set_out,
- pattern_in);
-}
-
-int
-ACE_Naming_Context::list_types (ACE_PWSTRING_SET &set_out,
- const char *pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_types");
- return this->list_types (set_out,
- ACE_WString (pattern_in));
-}
-
-int
-ACE_Naming_Context::list_name_entries (ACE_BINDING_SET &set_out,
- const ACE_WString &pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_name_entries");
- return this->name_space_->list_name_entries (set_out,
- pattern_in);
-}
-
-int
-ACE_Naming_Context::list_name_entries (ACE_BINDING_SET &set_out,
- const char *pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_name_entries");
- return this->list_name_entries (set_out,
- ACE_WString (pattern_in));
-}
-
-int
-ACE_Naming_Context::list_value_entries (ACE_BINDING_SET &set_out,
- const ACE_WString &pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_value_entries");
- return this->name_space_->list_value_entries (set_out,
- pattern_in);
-}
-
-int
-ACE_Naming_Context::list_value_entries (ACE_BINDING_SET &set_out,
- const char *pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_value_entries");
- return this->list_value_entries (set_out,
- ACE_WString (pattern_in));
-}
-
-int
-ACE_Naming_Context::list_type_entries (ACE_BINDING_SET &set_out,
- const ACE_WString &pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_type_entries");
- return this->name_space_->list_type_entries (set_out,
- pattern_in);
-}
-
-int
-ACE_Naming_Context::list_type_entries (ACE_BINDING_SET &set_out,
- const char *pattern_in)
-{
- ACE_TRACE ("ACE_Naming_Context::list_type_entries");
- return this->list_type_entries (set_out,
- ACE_WString (pattern_in));
-}
-
-ACE_Naming_Context::~ACE_Naming_Context (void)
-{
- ACE_TRACE ("ACE_Naming_Context::~ACE_Naming_Context");
-
- this->close_down ();
-}
-
-void
-ACE_Naming_Context::dump ()
-{
- ACE_TRACE ("ACE_Naming_Context::dump");
- this->name_space_->dump();
-}
-
-int
-ACE_Naming_Context::init (int argc, ACE_TCHAR *argv[])
-{
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ACE_Naming_Context::init\n")));
- this->name_options_->parse_args (argc, argv);
- return this->open (this->name_options_->context ());
-}
-
-int
-ACE_Naming_Context::fini (void)
-{
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ACE_Naming_Context::fini\n")));
- this->close_down ();
- return 0;
-}
-
-ACE_Name_Options::ACE_Name_Options (void)
- : debugging_ (0),
- verbosity_ (0),
- use_registry_ (0),
- nameserver_port_ (ACE_DEFAULT_SERVER_PORT),
- nameserver_host_ (ACE_OS::strdup (ACE_DEFAULT_SERVER_HOST)),
- process_name_ (0),
- database_ (ACE_OS::strdup (ACE_DEFAULT_LOCALNAME)),
- base_address_ (ACE_DEFAULT_BASE_ADDR)
-{
- ACE_TRACE ("ACE_Name_Options::ACE_Name_Options");
-
-#if defined (ACE_DEFAULT_NAMESPACE_DIR)
- this->namespace_dir_ = ACE_OS::strdup (ACE_DEFAULT_NAMESPACE_DIR);
-#else /* ACE_DEFAULT_NAMESPACE_DIR */
- size_t pathsize = (MAXPATHLEN + 1) * sizeof (ACE_TCHAR);
- this->namespace_dir_ = ACE_static_cast (ACE_TCHAR *, ACE_OS::malloc (pathsize));
-
- if (ACE::get_temp_dir (this->namespace_dir_, MAXPATHLEN) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Temporary path too long, ")
- ACE_TEXT ("defaulting to current directory\n")));
- ACE_OS::strcat (this->namespace_dir_, ACE_TEXT ("."));
- ACE_OS::strcat (this->namespace_dir_, ACE_DIRECTORY_SEPARATOR_STR);
- }
-#endif /* ACE_DEFAULT_NAMESPACE_DIR */
-}
-
-ACE_Name_Options::~ACE_Name_Options (void)
-{
- ACE_TRACE ("ACE_Name_Options::~ACE_Name_Options");
-
- ACE_OS::free ((void *) this->nameserver_host_);
- ACE_OS::free ((void *) this->namespace_dir_ );
- ACE_OS::free ((void *) this->process_name_ );
- ACE_OS::free ((void *) this->database_ );
-}
-
-void
-ACE_Name_Options::nameserver_port (int port)
-{
- ACE_TRACE ("ACE_Name_Options::nameserver_port");
- this->nameserver_port_ = port;
-}
-
-int
-ACE_Name_Options::nameserver_port (void)
-{
- ACE_TRACE ("ACE_Name_Options::nameserver_port");
- return this->nameserver_port_;
-}
-
-void
-ACE_Name_Options::namespace_dir (const ACE_TCHAR *dir)
-{
- ACE_TRACE ("ACE_Name_Options::namespace_dir");
- ACE_OS::free ((void *) this->namespace_dir_ );
- this->namespace_dir_ = ACE_OS::strdup (dir);
-}
-
-void
-ACE_Name_Options::process_name (const ACE_TCHAR *pname)
-{
- ACE_TRACE ("ACE_Name_Options::process_name");
- const ACE_TCHAR *t = ACE::basename (pname, ACE_DIRECTORY_SEPARATOR_CHAR);
- ACE_OS::free ((void *) this->process_name_ );
- this->process_name_ = ACE_OS::strdup (t);
-}
-
-void
-ACE_Name_Options::nameserver_host (const ACE_TCHAR *host)
-{
- ACE_TRACE ("ACE_Name_Options::nameserver_host");
- ACE_OS::free ((void *) this->nameserver_host_);
- this->nameserver_host_ = ACE_OS::strdup (host);
-}
-
-const ACE_TCHAR *
-ACE_Name_Options::nameserver_host (void)
-{
- ACE_TRACE ("ACE_Name_Options::nameserver_host");
- return this->nameserver_host_;
-}
-
-const ACE_TCHAR *
-ACE_Name_Options::database (void)
-{
- ACE_TRACE ("ACE_Name_Options::database");
- return this->database_;
-}
-
-void
-ACE_Name_Options::database (const ACE_TCHAR *db)
-{
- ACE_TRACE ("ACE_Name_Options::database");
- ACE_OS::free ((void *) this->database_);
- this->database_ = ACE_OS::strdup (db);
-}
-
-char *
-ACE_Name_Options::base_address (void)
-{
- ACE_TRACE ("ACE_Name_Options::database");
- return this->base_address_;
-}
-
-void
-ACE_Name_Options::base_address (char *base_address)
-{
- ACE_TRACE ("ACE_Name_Options::base_address");
- // HP-UX 11, aC++ has a bug with 64-bit pointer initialization from
- // a literal. To work around it, assign the literal to a long, then
- // to the pointer. This is allegedly fixed in aC++ A.03.10.
-#if defined (__hpux) && defined(__LP64__)
- long temp = ACE_DEFAULT_BASE_ADDRL;
- base_address = (char *) temp;
-#endif /* defined (__hpux) && defined(__LP64__) */
- this->base_address_ = base_address;
-}
-
-ACE_Naming_Context::Context_Scope_Type
-ACE_Name_Options::context (void)
-{
- ACE_TRACE ("ACE_Name_Options::context");
- return this->context_;
-}
-
-void
-ACE_Name_Options::context (ACE_Naming_Context::Context_Scope_Type context)
-{
- ACE_TRACE ("ACE_Name_Options::context");
- this->context_ = context;
-}
-
-const ACE_TCHAR *
-ACE_Name_Options::process_name (void)
-{
- ACE_TRACE ("ACE_Name_Options::process_name");
- return this->process_name_;
-}
-
-const ACE_TCHAR *
-ACE_Name_Options::namespace_dir (void)
-{
- ACE_TRACE ("ACE_Name_Options::namespace_dir");
- return this->namespace_dir_;
-}
-
-int
-ACE_Name_Options::debug (void)
-{
- ACE_TRACE ("ACE_Name_Options::debug");
- return this->debugging_;
-}
-
-int
-ACE_Name_Options::use_registry (void)
-{
- ACE_TRACE ("ACE_Name_Options::use_registry");
- return this->use_registry_;
-}
-
-void
-ACE_Name_Options::use_registry (int x)
-{
- ACE_TRACE ("ACE_Name_Options::use_registry");
- this->use_registry_ = x;
-}
-
-int
-ACE_Name_Options::verbose (void)
-{
- ACE_TRACE ("ACE_Name_Options::verbose");
- return this->verbosity_;
-}
-
-void
-ACE_Name_Options::parse_args (int argc, ACE_TCHAR *argv[])
-{
- ACE_TRACE ("ACE_Name_Options::parse_args");
- ACE_LOG_MSG->open (argv[0]);
- this->process_name (argv[0]);
-
- // Default is to use the PROC_LOCAL context...
- this->context (ACE_Naming_Context::PROC_LOCAL);
-
- // Make the database name the same as the process name by default
- // (note that this makes a copy of the process_name_ so that we can
- // clean it up in the destructor).
- this->database (this->process_name ());
-
- ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("b:c:dh:l:P:p:s:T:vr"));
-
- for (int c; (c = get_opt ()) != -1; )
- switch (c)
- {
- case 'c':
- {
- if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("PROC_LOCAL")) == 0)
- this->context (ACE_Naming_Context::PROC_LOCAL);
- else if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("NODE_LOCAL")) == 0)
- this->context (ACE_Naming_Context::NODE_LOCAL);
- else if (ACE_OS::strcmp (get_opt.optarg, ACE_TEXT ("NET_LOCAL")) == 0)
- this->context (ACE_Naming_Context::NET_LOCAL);
- }
- break;
- case 'd':
- this->debugging_ = 1;
- break;
- case 'r':
- this->use_registry_ = 1;
- break;
- case 'h':
- this->nameserver_host (get_opt.optarg);
- break;
- case 'l':
- this->namespace_dir (get_opt.optarg);
- break;
- case 'P':
- this->process_name (get_opt.optarg);
- break;
- case 'p':
- this->nameserver_port (ACE_OS::atoi (get_opt.optarg));
- break;
- case 's':
- this->database (get_opt.optarg);
- break;
- case 'b':
- this->base_address ((char *) ACE_OS::atoi (get_opt.optarg));
- break;
- case 'T':
- if (ACE_OS::strcasecmp (get_opt.optarg, ACE_TEXT ("ON")) == 0)
- ACE_Trace::start_tracing ();
- else if (ACE_OS::strcasecmp (get_opt.optarg, ACE_TEXT ("OFF")) == 0)
- ACE_Trace::stop_tracing ();
- break;
- case 'v':
- this->verbosity_ = 1;
- break;
- default:
- ACE_OS::fprintf (stderr, "%s\n"
- "\t[-d] (enable debugging)\n"
- "\t[-h nameserver host]\n"
- "\t[-l namespace directory]\n"
- "\t[-P processname]\n"
- "\t[-p nameserver port]\n"
- "\t[-s database name]\n"
- "\t[-b base address]\n"
- "\t[-v] (verbose) \n"
- "\t[-r] (use Win32 Registry) \n",
- argv[0]);
- /* NOTREACHED */
- break;
- }
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
-template class ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
-template class ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
-template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
-template class ACE_Malloc_T<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex, ACE_Control_Block>;
-template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex, ACE_Control_Block>;
-template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >;
-template class ACE_Allocator_Adapter<ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >;
-template class ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >;
-template class ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
-#pragma instantiate ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
-#pragma instantiate ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
-#pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>
-#pragma instantiate ACE_Malloc_T<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex, ACE_Control_Block>
-#pragma instantiate ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex, ACE_Control_Block>
-#pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >
-#pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >
-#pragma instantiate ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >
-#pragma instantiate ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
diff --git a/ace/Naming_Context.h b/ace/Naming_Context.h
deleted file mode 100644
index da03a26c0bc..00000000000
--- a/ace/Naming_Context.h
+++ /dev/null
@@ -1,335 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Naming_Context.h
-//
-// = AUTHOR
-// Gerhard Lenzer, Douglas C. Schmidt, and Prashant Jain
-//
-// ============================================================================
-
-#ifndef ACE_NAMING_CONTEXT_H
-#define ACE_NAMING_CONTEXT_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SString.h"
-#include "ace/Containers.h"
-#include "ace/Service_Object.h"
-#include "ace/Name_Proxy.h"
-#include "ace/Name_Space.h"
-
-// Forward decl
-class ACE_Name_Options;
-
-class ACE_Export ACE_Naming_Context : public ACE_Service_Object
-{
- // = TITLE
- // Maintaining accesses Name Server Databases. Allows to add
- // NameBindings, change them, remove them and resolve
- // NameBindings
- //
- // = DESCRIPTION
- // Manages a Naming Service . That represents a persistent
- // string to string mapping for different scopes. The scope of a
- // ACE_Naming_Context may be either local for the calling
- // process (Note : A process is hereby not identified by it's
- // pid, but by it's argv[0]. So different processes (in UNIX
- // syntax) may access the same NameBindings), global for all
- // processes running on one host or global for all processes on
- // the net (that know the address of the net name server
- // socket). Strings may be plain character strings or Wide
- // character strings. A Name Binding consists of a name string
- // (that's the key), a value string and an optional type string
- // (no wide chars).
-public:
- enum Context_Scope_Type
- {
- PROC_LOCAL, // Name lookup is local to the process.
- NODE_LOCAL, // Name lookup is local to the node (host).
- NET_LOCAL // Name lookup is local to the (sub)network.
- };
-
- // = Initialization and termination methods.
- ACE_Naming_Context (void);
- // "Do-nothing" constructor.
-
- ACE_Naming_Context (Context_Scope_Type scope_in, int light = 0);
- // Specifies the scope of this namespace, opens and memory-maps the
- // associated file (if accessible) or contacts the dedicated name
- // server process for NET_LOCAL namespace. Note that <light>
- // specifies whether or not we want to use
- // ACE_Lite_MMap_Memory_Pool. By default we use ACE_MMap_Memory_Pool.
-
- int open (Context_Scope_Type scope_in = ACE_Naming_Context::PROC_LOCAL,
- int light = 0);
- // Specifies the scope of this namespace, opens and memory-maps the
- // associated file (if accessible) or contacts the dedicated name
- // server process for NET_LOCAL namespace. Note that <light>
- // specifies whether or not we want to use
- // ACE_Lite_MMap_Memory_Pool. By default we use ACE_MMap_Memory_Pool.
-
- int close (void);
- // Deletes the instance of Name Space. Must be called before
- // switching name spaces.
-
- int close_down (void);
- // Release all resources. Gets called by destructor and fini.
-
- ~ACE_Naming_Context (void);
- // destructor, do some cleanup :TBD: last dtor should "compress"
- // file
-
- // = Dynamic initialization hooks.
- virtual int init (int argc, ACE_TCHAR *argv[]);
- // Initialize name options and naming context when dynamically
- // linked.
-
- virtual int fini (void);
- // Close down the test when dynamically unlinked.
-
- virtual int info (char **strp, size_t length) const;
- // Returns information about this context.
-
- ACE_Name_Options *name_options (void);
- // Returns the ACE_Name_Options associated with the Naming_Context
-
- int bind (const ACE_WString &name_in,
- const ACE_WString &value_in,
- const char *type_in = "");
- // Bind a new name to a naming context (Wide character strings).
-
- int bind (const char *name_in,
- const char *value_in,
- const char *type_in = "");
- // Bind a new name to a naming context ( character strings).
-
- int rebind (const ACE_WString &name_in,
- const ACE_WString &value_in,
- const char *type_in = "");
- // Overwrite the value or type of an existing name in a
- // ACE_Naming_Context or bind a new name to the context, if it
- // didn't exist yet. (Wide charcter strings interface).
-
- int rebind (const char *name_in,
- const char *value_in,
- const char *type_in = "");
- // Overwrite the value or type of an existing name in a
- // ACE_Naming_Context or bind a new name to the context, if it
- // didn't exist yet. ( charcter strings interface)
-
- int unbind (const ACE_WString &name_in);
- // Delete a name from a ACE_Naming_Context (Wide charcter strings
- // Interface).
-
- int unbind (const char *name_in);
- // Delete a name from a ACE_Naming_Context (character strings
- // interface).
-
- int resolve (const ACE_WString &name_in,
- ACE_WString &value_out,
- char *&type_out);
- // Get value and type of a given name binding (Wide chars). The
- // caller is responsible for deleting both <value_out> and <type_out>!
-
- int resolve (const char *name_in,
- ACE_WString &value_out,
- char *&type_out);
- // Get value and type of a given name binding (Wide chars output).
- // The caller is responsible for deleting both <value_out> and
- // <type_out>!
-
- int resolve (const char *name_in,
- char *&value_out,
- char *&type_out);
- // Get value and type of a given name binding ( chars ). The caller
- // is responsible for deleting both <value_out> and <type_out>!
-
- int list_names (ACE_PWSTRING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string.
-
- int list_names (ACE_PWSTRING_SET &set_out,
- const char *pattern_in);
- // Get a set of names matching a specified pattern (chars). Matching
- // means the names must begin with the pattern string.
-
- int list_values (ACE_PWSTRING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string.
-
- int list_values (ACE_PWSTRING_SET &set_out,
- const char *pattern_in);
- // Get a set of values matching a specified pattern (chars). Matching
- // means the values must begin with the pattern string.
-
- int list_types (ACE_PWSTRING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string.
-
- int list_types (ACE_PWSTRING_SET &set_out,
- const char *pattern_in);
- // Get a set of types matching a specified pattern (chars). Matching
- // means the types must begin with the pattern string.
-
- virtual int list_name_entries (ACE_BINDING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_name_entries (ACE_BINDING_SET &set_out,
- const char *pattern_in);
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_value_entries (ACE_BINDING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_value_entries (ACE_BINDING_SET &set_out,
- const char *pattern_in);
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_type_entries (ACE_BINDING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_type_entries (ACE_BINDING_SET &set_out,
- const char *pattern_in);
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- void dump (void);
- // Dump the state of the object.
-
-private:
- ACE_Name_Options *name_options_;
- // Keep track of the options such as database name etc per Naming Context
-
- ACE_Name_Space *name_space_;
- // Name space (can be either local or remote) dynamically bound.
-
- ACE_TCHAR hostname_[MAXHOSTNAMELEN + 1];
- // Holds the local hostname.
-
- const ACE_TCHAR *netnameserver_host_;
- // Holds name of net name server.
-
- int netnameserver_port_;
- // Holds port number of the net name server.
-
- int local (void);
- // 1 if we're on the same local machine as the name server, else 0.
-
-};
-
-class ACE_Export ACE_Name_Options
-{
- // = TITLE
- // Manages the options for the ACE Name_Server.
-public:
- // = Initialization and termination methods.
- ACE_Name_Options (void);
- ~ACE_Name_Options (void);
-
- void parse_args (int argc,
- ACE_TCHAR *argv[]);
- // Parse arguments.
-
- // = Set/Get port number
- void nameserver_port (int port);
- int nameserver_port (void);
-
- // = Set/Get the context
- ACE_Naming_Context::Context_Scope_Type context (void);
- void context (ACE_Naming_Context::Context_Scope_Type);
-
- // = Set/Get host name
- void nameserver_host (const ACE_TCHAR *host);
- const ACE_TCHAR *nameserver_host (void);
-
- // = Set/Get name space directory
- void namespace_dir (const ACE_TCHAR *dir);
- const ACE_TCHAR *namespace_dir (void);
-
- // = Set/Get process name
- void process_name (const ACE_TCHAR *dir);
- const ACE_TCHAR *process_name (void);
-
- // = Set/Get database name
- void database (const ACE_TCHAR *);
- const ACE_TCHAR *database (void);
-
- // = Set/Get base address of the underlying allocator
- void base_address (char *address);
- char *base_address (void);
-
- // Set/Get use of registry in naming
- int use_registry (void);
- void use_registry (int);
-
- int debug (void);
- // Return debug status
-
- int verbose (void);
- // Return verbose status
-
-private:
- int debugging_;
- // Extra debugging info
-
- int verbosity_;
- // Extra verbose messages
-
- int use_registry_;
- // Use Win32 Registry
-
- int nameserver_port_;
- // Port to connect to nameserver process.
-
- const ACE_TCHAR *nameserver_host_;
- // Hostname of nameserver.
-
- ACE_TCHAR *namespace_dir_;
- // Directory to hold name_bindings.
-
- const ACE_TCHAR *process_name_;
- // Name of this process.
-
- const ACE_TCHAR *database_;
- // Name of the database that stores the name/value/type bindings.
-
- char *base_address_;
- // Base address of the underlying allocator
-
- ACE_Naming_Context::Context_Scope_Type context_;
- // The context in which the naming database will be created.
-};
-
-ACE_FACTORY_DECLARE (ACE, ACE_Naming_Context)
-
-#include "ace/post.h"
-#endif /* ACE_NAMING_CONTEXT_H */
diff --git a/ace/OS.cpp b/ace/OS.cpp
deleted file mode 100644
index d6a597af43e..00000000000
--- a/ace/OS.cpp
+++ /dev/null
@@ -1,7137 +0,0 @@
-// $Id$
-
-#include "ace/OS.h"
-#include "ace/Sched_Params.h"
-
-#if defined (ACE_THREADS_DONT_INHERIT_LOG_MSG) || \
- defined (ACE_HAS_MINIMAL_ACE_OS)
-# if defined (ACE_PSOS)
-// Unique file identifier
-int unique_file_id=0;
-# endif /* ACE_PSOS */
-#endif /* ACE_THREADS_DONT_INHERIT_LOG_MSG) || ACE_HAS_MINIMAL_ACE_OS */
-
-// Perhaps we should *always* include ace/OS.i in order to make sure
-// we can always link against the OS symbols?
-#if !defined (ACE_HAS_INLINED_OSCALLS)
-# include "ace/OS.i"
-#endif /* ACE_HAS_INLINED_OS_CALLS */
-
-ACE_RCSID(ace, OS, "$Id$")
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# if defined (ACE_HAS_WINCE)
-const wchar_t *ACE_OS::day_of_week_name[] = {ACE_TEXT ("Sun"), ACE_TEXT ("Mon"),
- ACE_TEXT ("Tue"), ACE_TEXT ("Wed"),
- ACE_TEXT ("Thr"), ACE_TEXT ("Fri"),
- ACE_TEXT ("Sat")};
-const wchar_t *ACE_OS::month_name[] = {ACE_TEXT ("Jan"), ACE_TEXT ("Feb"),
- ACE_TEXT ("Mar"), ACE_TEXT ("Apr"),
- ACE_TEXT ("May"), ACE_TEXT ("Jun"),
- ACE_TEXT ("Jul"), ACE_TEXT ("Aug"),
- ACE_TEXT ("Sep"), ACE_TEXT ("Oct"),
- ACE_TEXT ("Nov"), ACE_TEXT ("Dec") };
-
-static const ACE_TCHAR *ACE_OS_CTIME_R_FMTSTR = ACE_TEXT ("%3s %3s %02d %02d:%02d:%02d %04d\n");
-# endif /* ACE_HAS_WINCE */
-
-# if defined (ACE_WIN32)
-OSVERSIONINFO ACE_OS::win32_versioninfo_;
-// Cached win32 version information.
-# endif /* ACE_WIN32 */
-
-class ACE_OS_Thread_Mutex_Guard
-{
- // = TITLE
- // This data structure is meant to be used within an ACE_OS
- // function. It performs automatic aquisition and release of
- // an ACE_thread_mutex_t.
- //
- // = DESCRIPTION
- // For internal use only by ACE_OS.
-public:
- ACE_OS_Thread_Mutex_Guard (ACE_thread_mutex_t &m);
- // Implicitly and automatically acquire the lock.
-
- ~ACE_OS_Thread_Mutex_Guard (void);
- // Implicitly release the lock.
-
- int acquire (void);
- // Explicitly acquire the lock.
-
- int release (void);
- // Explicitly release the lock.
-
-protected:
- ACE_thread_mutex_t &lock_;
- // Reference to the mutex.
-
- int owner_;
- // Keeps track of whether we acquired the lock or failed.
-
- // = Prevent assignment and initialization.
- ACE_OS_Thread_Mutex_Guard &operator= (const ACE_OS_Thread_Mutex_Guard &);
- ACE_OS_Thread_Mutex_Guard (const ACE_OS_Thread_Mutex_Guard &);
-};
-
-inline
-int
-ACE_OS_Thread_Mutex_Guard::acquire (void)
-{
- return owner_ = ACE_OS::thread_mutex_lock (&lock_);
-}
-
-inline
-int
-ACE_OS_Thread_Mutex_Guard::release (void)
-{
- if (owner_ == -1)
- return 0;
- else
- {
- owner_ = -1;
- return ACE_OS::thread_mutex_unlock (&lock_);
- }
-}
-
-inline
-ACE_OS_Thread_Mutex_Guard::ACE_OS_Thread_Mutex_Guard (ACE_thread_mutex_t &m)
- : lock_ (m)
-{
- acquire ();
-}
-
-ACE_OS_Thread_Mutex_Guard::~ACE_OS_Thread_Mutex_Guard ()
-{
- release ();
-}
-
-class ACE_OS_Recursive_Thread_Mutex_Guard
-{
- // = TITLE
- // This data structure is meant to be used within an ACE_OS
- // function. It performs automatic aquisition and release of
- // an ACE_recursive_thread_mutex_t.
- //
- // = DESCRIPTION
- // For internal use only by ACE_OS.
-public:
- ACE_OS_Recursive_Thread_Mutex_Guard (ACE_recursive_thread_mutex_t &m);
- // Implicitly and automatically acquire the lock.
-
- ~ACE_OS_Recursive_Thread_Mutex_Guard (void);
- // Implicitly release the lock.
-
- int acquire (void);
- // Explicitly acquire the lock.
-
- int release (void);
- // Explicitly release the lock.
-
-protected:
- ACE_recursive_thread_mutex_t &lock_;
- // Reference to the mutex.
-
- int owner_;
- // Keeps track of whether we acquired the lock or failed.
-
- // = Prevent assignment and initialization.
- ACE_OS_Recursive_Thread_Mutex_Guard &operator= (
- const ACE_OS_Recursive_Thread_Mutex_Guard &);
- ACE_OS_Recursive_Thread_Mutex_Guard (
- const ACE_OS_Recursive_Thread_Mutex_Guard &);
-};
-
-inline
-int
-ACE_OS_Recursive_Thread_Mutex_Guard::acquire (void)
-{
- return owner_ = ACE_OS::recursive_mutex_lock (&lock_);
-}
-
-inline
-int
-ACE_OS_Recursive_Thread_Mutex_Guard::release (void)
-{
- if (owner_ == -1)
- return 0;
- else
- {
- owner_ = -1;
- return ACE_OS::recursive_mutex_unlock (&lock_);
- }
-}
-
-inline
-ACE_OS_Recursive_Thread_Mutex_Guard::ACE_OS_Recursive_Thread_Mutex_Guard (
- ACE_recursive_thread_mutex_t &m)
- : lock_ (m),
- owner_ (-1)
-{
- acquire ();
-}
-
-ACE_OS_Recursive_Thread_Mutex_Guard::~ACE_OS_Recursive_Thread_Mutex_Guard ()
-{
- release ();
-}
-
-#define ACE_OS_GUARD \
- ACE_OS_Thread_Mutex_Guard (*(ACE_thread_mutex_t *) \
- ACE_OS_Object_Manager::preallocated_object[ \
- ACE_OS_Object_Manager::ACE_OS_MONITOR_LOCK]);
-
-#define ACE_TSS_CLEANUP_GUARD \
- ACE_OS_Recursive_Thread_Mutex_Guard (*(ACE_recursive_thread_mutex_t *) \
- ACE_OS_Object_Manager::preallocated_object[ \
- ACE_OS_Object_Manager::ACE_TSS_CLEANUP_LOCK]);
-
-#define ACE_TSS_BASE_GUARD \
- ACE_OS_Recursive_Thread_Mutex_Guard (*(ACE_recursive_thread_mutex_t *) \
- ACE_OS_Object_Manager::preallocated_object[ \
- ACE_OS_Object_Manager::ACE_TSS_BASE_LOCK]);
-
-
-# if defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
-int
-ACE_OS::netdb_acquire (void)
-{
- return ACE_OS::thread_mutex_lock ((ACE_thread_mutex_t *)
- ACE_OS_Object_Manager::preallocated_object[
- ACE_OS_Object_Manager::ACE_OS_MONITOR_LOCK]);
-}
-
-int
-ACE_OS::netdb_release (void)
-{
- return ACE_OS::thread_mutex_unlock ((ACE_thread_mutex_t *)
- ACE_OS_Object_Manager::preallocated_object[
- ACE_OS_Object_Manager::ACE_OS_MONITOR_LOCK]);
-}
-# endif /* defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS) */
-#else /* ! ACE_MT_SAFE */
-# define ACE_OS_GUARD
-# define ACE_TSS_CLEANUP_GUARD
-# define ACE_TSS_BASE_GUARD
-#endif /* ! ACE_MT_SAFE */
-
-ACE_EXIT_HOOK ACE_OS::exit_hook_ = 0;
-
-u_int ACE_Thread_Exit::is_constructed_ = 0;
-
-// Static constant representing `zero-time'.
-// Note: this object requires static construction.
-const ACE_Time_Value ACE_Time_Value::zero;
-
-// Constant for maximum time representable. Note that this time
-// is not intended for use with select () or other calls that may
-// have *their own* implementation-specific maximum time representations.
-// Its primary use is in time computations such as those used by the
-// dynamic subpriority strategies in the ACE_Dynamic_Message_Queue class.
-// Note: this object requires static construction.
-const ACE_Time_Value ACE_Time_Value::max_time (LONG_MAX,
- ACE_ONE_SECOND_IN_USECS - 1);
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Time_Value)
-
-// Initializes the ACE_Time_Value object from a timeval.
-
-#if defined (ACE_WIN32)
-// Initializes the ACE_Time_Value object from a Win32 FILETIME
-
-// Static constant to remove time skew between FILETIME and POSIX
-// time.
-//
-// In the beginning (Jan. 1, 1601), there was no time and no computer.
-// And Bill said: "Let there be time," and there was time....
-const DWORDLONG ACE_Time_Value::FILETIME_to_timval_skew =
-ACE_INT64_LITERAL (0x19db1ded53e8000);
-
-ACE_Time_Value::ACE_Time_Value (const FILETIME &file_time)
-{
- // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
- this->set (file_time);
-}
-
-void ACE_Time_Value::set (const FILETIME &file_time)
-{
- // Initializes the ACE_Time_Value object from a Win32 FILETIME
- ULARGE_INTEGER _100ns =
- {
- file_time.dwLowDateTime,
- file_time.dwHighDateTime
- };
- _100ns.QuadPart -= ACE_Time_Value::FILETIME_to_timval_skew;
-
- // Convert 100ns units to seconds;
- this->tv_.tv_sec = (long) (_100ns.QuadPart / (10000 * 1000));
- // Convert remainder to microseconds;
- this->tv_.tv_usec = (long) ((_100ns.QuadPart % (10000 * 1000)) / 10);
-}
-
-// Returns the value of the object as a Win32 FILETIME.
-
-ACE_Time_Value::operator FILETIME () const
-{
- ACE_TRACE ("ACE_Time_Value::operator FILETIME");
- ULARGE_INTEGER _100ns;
- _100ns.QuadPart = (((DWORDLONG) this->tv_.tv_sec * (10000 * 1000) +
- this->tv_.tv_usec * 10) +
- ACE_Time_Value::FILETIME_to_timval_skew);
- FILETIME file_time;
-
- file_time.dwLowDateTime = _100ns.LowPart;
- file_time.dwHighDateTime = _100ns.HighPart;
-
- return file_time;
-}
-
-#endif /* ACE_WIN32 */
-
-ACE_Cleanup_Info::ACE_Cleanup_Info (void)
- : object_ (0),
- cleanup_hook_ (0),
- param_ (0)
-{
-}
-
-int
-ACE_Cleanup_Info::operator== (const ACE_Cleanup_Info &o) const
-{
- return o.object_ == this->object_
- && o.cleanup_hook_ == this->cleanup_hook_
- && o.param_ == this->param_;
-}
-
-int
-ACE_Cleanup_Info::operator!= (const ACE_Cleanup_Info &o) const
-{
- return !(*this == o);
-}
-
-class ACE_Cleanup_Info_Node
-{
- // = TITLE
- // For maintaining a list of ACE_Cleanup_Info items.
- //
- // = DESCRIPTION
- // For internal use by ACE_Object_Manager.
-public:
- ACE_Cleanup_Info_Node (void);
- ACE_Cleanup_Info_Node (const ACE_Cleanup_Info &new_info,
- ACE_Cleanup_Info_Node *next);
- ~ACE_Cleanup_Info_Node (void);
- ACE_Cleanup_Info_Node *insert (const ACE_Cleanup_Info &);
-private:
- ACE_Cleanup_Info cleanup_info_;
- ACE_Cleanup_Info_Node *next_;
-
- friend class ACE_OS_Exit_Info;
-};
-
-ACE_Cleanup_Info_Node::ACE_Cleanup_Info_Node (void)
- : cleanup_info_ (),
- next_ (0)
-{
-}
-
-ACE_Cleanup_Info_Node::ACE_Cleanup_Info_Node (const ACE_Cleanup_Info &new_info,
- ACE_Cleanup_Info_Node *next)
- : cleanup_info_ (new_info),
- next_ (next)
-{
-}
-
-ACE_Cleanup_Info_Node::~ACE_Cleanup_Info_Node (void)
-{
- delete next_;
-}
-
-ACE_Cleanup_Info_Node *
-ACE_Cleanup_Info_Node::insert (const ACE_Cleanup_Info &new_info)
-{
- ACE_Cleanup_Info_Node *new_node;
-
- ACE_NEW_RETURN (new_node,
- ACE_Cleanup_Info_Node (new_info, this),
- 0);
-
- return new_node;
-}
-
-ACE_OS_Exit_Info::ACE_OS_Exit_Info (void)
-{
- ACE_NEW (registered_objects_, ACE_Cleanup_Info_Node);
-}
-
-ACE_OS_Exit_Info::~ACE_OS_Exit_Info (void)
-{
- delete registered_objects_;
- registered_objects_ = 0;
-}
-
-int
-ACE_OS_Exit_Info::at_exit_i (void *object,
- ACE_CLEANUP_FUNC cleanup_hook,
- void *param)
-{
- ACE_Cleanup_Info new_info;
- new_info.object_ = object;
- new_info.cleanup_hook_ = cleanup_hook;
- new_info.param_ = param;
-
- // Return -1 and sets errno if unable to allocate storage. Enqueue
- // at the head and dequeue from the head to get LIFO ordering.
-
- ACE_Cleanup_Info_Node *new_node;
-
- if ((new_node = registered_objects_->insert (new_info)) == 0)
- return -1;
- else
- {
- registered_objects_ = new_node;
- return 0;
- }
-}
-
-int
-ACE_OS_Exit_Info::find (void *object)
-{
- // Check for already in queue, and return 1 if so.
- for (ACE_Cleanup_Info_Node *iter = registered_objects_;
- iter && iter->next_ != 0;
- iter = iter->next_)
- {
- if (iter->cleanup_info_.object_ == object)
- {
- // The object has already been registered.
- return 1;
- }
- }
-
- return 0;
-}
-
-void
-ACE_OS_Exit_Info::call_hooks ()
-{
- // Call all registered cleanup hooks, in reverse order of
- // registration.
- for (ACE_Cleanup_Info_Node *iter = registered_objects_;
- iter && iter->next_ != 0;
- iter = iter->next_)
- {
- ACE_Cleanup_Info &info = iter->cleanup_info_;
- if (info.cleanup_hook_ == ACE_reinterpret_cast (ACE_CLEANUP_FUNC,
- ace_cleanup_destroyer))
- // The object is an ACE_Cleanup.
- ace_cleanup_destroyer (ACE_reinterpret_cast (ACE_Cleanup *,
- info.object_),
- info.param_);
- else if (info.object_ == &ace_exit_hook_marker)
- // The hook is an ACE_EXIT_HOOK.
- (* ACE_reinterpret_cast (ACE_EXIT_HOOK, info.cleanup_hook_)) ();
- else
- (*info.cleanup_hook_) (info.object_, info.param_);
- }
-}
-
-void
-ACE_Time_Value::dump (void) const
-{
- ACE_TRACE ("ACE_Time_Value::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntv_sec_ = %d"), this->tv_.tv_sec));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntv_usec_ = %d\n"), this->tv_.tv_usec));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Time_Value::normalize (void)
-{
- // ACE_TRACE ("ACE_Time_Value::normalize");
- // New code from Hans Rohnert...
-
- if (this->tv_.tv_usec >= ACE_ONE_SECOND_IN_USECS)
- {
- do
- {
- this->tv_.tv_sec++;
- this->tv_.tv_usec -= ACE_ONE_SECOND_IN_USECS;
- }
- while (this->tv_.tv_usec >= ACE_ONE_SECOND_IN_USECS);
- }
- else if (this->tv_.tv_usec <= -ACE_ONE_SECOND_IN_USECS)
- {
- do
- {
- this->tv_.tv_sec--;
- this->tv_.tv_usec += ACE_ONE_SECOND_IN_USECS;
- }
- while (this->tv_.tv_usec <= -ACE_ONE_SECOND_IN_USECS);
- }
-
- if (this->tv_.tv_sec >= 1 && this->tv_.tv_usec < 0)
- {
- this->tv_.tv_sec--;
- this->tv_.tv_usec += ACE_ONE_SECOND_IN_USECS;
- }
- else if (this->tv_.tv_sec < 0 && this->tv_.tv_usec > 0)
- {
- this->tv_.tv_sec++;
- this->tv_.tv_usec -= ACE_ONE_SECOND_IN_USECS;
- }
-}
-
-ACE_Countdown_Time::ACE_Countdown_Time (ACE_Time_Value *max_wait_time)
- : max_wait_time_ (max_wait_time),
- stopped_ (0)
-{
- this->start ();
-}
-
-ACE_Countdown_Time::~ACE_Countdown_Time (void)
-{
- this->stop ();
-}
-
-#if defined (ACE_HAS_POWERPC_TIMER) && defined (ghs)
-void
-ACE_OS::readPPCTimeBase (u_long &most, u_long &least)
-{
- ACE_TRACE ("ACE_OS::readPPCTimeBase");
-
- // This function can't be inline because it depends on the arguments
- // being in particular registers (r3 and r4), in conformance with the
- // EABI standard. It would be nice if we knew how to put the variable
- // names directly into the assembler instructions . . .
- asm("aclock:");
- asm("mftb r5,TBU");
- asm("mftb r6,TBL");
- asm("mftb r7,TBU");
- asm("cmpw r5,r7");
- asm("bne aclock");
-
- asm("stw r5, 0(r3)");
- asm("stw r6, 0(r4)");
-}
-#elif defined (ACE_HAS_POWERPC_TIMER) && defined (__GNUG__)
-void
-ACE_OS::readPPCTimeBase (u_long &most, u_long &least)
-{
- ACE_TRACE ("ACE_OS::readPPCTimeBase");
-
- // This function can't be inline because it defines a symbol,
- // aclock. If there are multiple calls to the function in a
- // compilation unit, then that symbol would be multiply defined if
- // the function was inline.
- asm volatile ("aclock:\n"
- "mftbu 5\n" /* upper time base register */
- "mftb 6\n" /* lower time base register */
- "mftbu 7\n" /* upper time base register */
- "cmpw 5,7\n" /* check for rollover of upper */
- "bne aclock\n"
- "stw 5,%0\n" /* most */
- "stw 6,%1" /* least */
- : "=m" (most), "=m" (least) /* outputs */
- : /* no inputs */
- : "5", "6", "7", "memory" /* constraints */);
-}
-#endif /* ACE_HAS_POWERPC_TIMER && (ghs or __GNUG__) */
-
-#if defined (ACE_WIN32) || defined (VXWORKS) || defined (CHORUS) || defined (ACE_PSOS)
-// Don't inline on those platforms because this function contains
-// string literals, and some compilers, e.g., g++, don't handle those
-// efficiently in unused inline functions.
-int
-ACE_OS::uname (struct utsname *name)
-{
- ACE_TRACE ("ACE_OS::uname");
-# if defined (ACE_WIN32)
- size_t maxnamelen = sizeof name->nodename;
- ACE_OS::strcpy (name->sysname,
- ACE_TEXT ("Win32"));
-
- OSVERSIONINFO vinfo;
- vinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- ::GetVersionEx (&vinfo);
-
- SYSTEM_INFO sinfo;
-# if defined (ACE_HAS_PHARLAP)
- // PharLap doesn't do GetSystemInfo. What's really wanted is the CPU
- // architecture, so we can get that with EtsGetSystemInfo. Fill in what's
- // wanted in the SYSTEM_INFO structure, and carry on. Note that the
- // CPU type values in EK_KERNELINFO have the same values are the ones
- // defined for SYSTEM_INFO.
- EK_KERNELINFO ets_kern;
- EK_SYSTEMINFO ets_sys;
- EtsGetSystemInfo (&ets_kern, &ets_sys);
- sinfo.wProcessorLevel = ACE_static_cast (WORD, ets_kern.CpuType);
- sinfo.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_INTEL;
- sinfo.dwProcessorType = ets_kern.CpuType * 100 + 86;
-# else
- ::GetSystemInfo(&sinfo);
-
- ACE_OS::strcpy (name->sysname, ACE_TEXT ("Win32"));
-# endif /* ACE_HAS_PHARLAP */
-
- if (vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT)
- {
- // Get information from the two structures
- ACE_OS::sprintf (name->release,
-# if defined (ACE_HAS_WINCE)
- ACE_TEXT ("Windows CE %d.%d"),
-# else
- ACE_TEXT ("Windows NT %d.%d"),
-# endif /* ACE_HAS_WINCE */
- vinfo.dwMajorVersion,
- vinfo.dwMinorVersion);
- ACE_OS::sprintf (name->version,
- ACE_TEXT ("Build %d %s"),
- vinfo.dwBuildNumber,
- vinfo.szCSDVersion);
-
- // We have to make sure that the size of (processor + subtype) is
- // not greater than the size of name->machine. So we give half
- // the space to the processor and half the space to subtype. The
- // -1 is necessary for because of the space between processor and
- // subtype in the machine name.
- const int bufsize = ((sizeof (name->machine) / sizeof (ACE_TCHAR)) / 2) - 1;
- ACE_TCHAR processor[bufsize] = ACE_TEXT ("Unknown");
- ACE_TCHAR subtype[bufsize] = ACE_TEXT ("Unknown");
-
- WORD arch = sinfo.wProcessorArchitecture;
-
- switch (arch)
- {
- case PROCESSOR_ARCHITECTURE_INTEL:
- ACE_OS::strcpy (processor, ACE_TEXT ("Intel"));
- if (sinfo.wProcessorLevel == 3)
- ACE_OS::strcpy (subtype, ACE_TEXT ("80386"));
- else if (sinfo.wProcessorLevel == 4)
- ACE_OS::strcpy (subtype, ACE_TEXT ("80486"));
- else if (sinfo.wProcessorLevel == 5)
- ACE_OS::strcpy (subtype, ACE_TEXT ("Pentium"));
- else if (sinfo.wProcessorLevel == 6)
- ACE_OS::strcpy (subtype, ACE_TEXT ("Pentium Pro"));
- else if (sinfo.wProcessorLevel == 7) // I'm guessing here
- ACE_OS::strcpy (subtype, ACE_TEXT ("Pentium II"));
- break;
- case PROCESSOR_ARCHITECTURE_MIPS:
- ACE_OS::strcpy (processor, ACE_TEXT ("MIPS"));
- ACE_OS::strcpy (subtype, ACE_TEXT ("R4000"));
- break;
- case PROCESSOR_ARCHITECTURE_ALPHA:
- ACE_OS::strcpy (processor, ACE_TEXT ("Alpha"));
- ACE_OS::sprintf (subtype, ACE_TEXT ("%d"), sinfo.wProcessorLevel);
- break;
- case PROCESSOR_ARCHITECTURE_PPC:
- ACE_OS::strcpy (processor, ACE_TEXT ("PPC"));
- if (sinfo.wProcessorLevel == 1)
- ACE_OS::strcpy (subtype, ACE_TEXT ("601"));
- else if (sinfo.wProcessorLevel == 3)
- ACE_OS::strcpy (subtype, ACE_TEXT ("603"));
- else if (sinfo.wProcessorLevel == 4)
- ACE_OS::strcpy (subtype, ACE_TEXT ("604"));
- else if (sinfo.wProcessorLevel == 6)
- ACE_OS::strcpy (subtype, ACE_TEXT ("603+"));
- else if (sinfo.wProcessorLevel == 9)
- ACE_OS::strcpy (subtype, ACE_TEXT ("804+"));
- else if (sinfo.wProcessorLevel == 20)
- ACE_OS::strcpy (subtype, ACE_TEXT ("620"));
- break;
- case PROCESSOR_ARCHITECTURE_UNKNOWN:
- default:
- // @@ We could provide WinCE specific info here. But let's
- // defer that to some later point.
- ACE_OS::strcpy (processor, ACE_TEXT ("Unknown"));
- break;
- }
- ACE_OS::sprintf(name->machine, ACE_TEXT ("%s %s"), processor, subtype);
- }
- else if (vinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
- {
- // Get Windows 95 Information
- ACE_OS::strcpy (name->release, ACE_TEXT ("Windows 95"));
- ACE_OS::sprintf (name->version, ACE_TEXT ("%d"), LOWORD (vinfo.dwBuildNumber));
- if (sinfo.dwProcessorType == PROCESSOR_INTEL_386)
- ACE_OS::strcpy (name->machine, ACE_TEXT ("Intel 80386"));
- else if (sinfo.dwProcessorType == PROCESSOR_INTEL_486)
- ACE_OS::strcpy (name->machine, ACE_TEXT ("Intel 80486"));
- else if (sinfo.dwProcessorType == PROCESSOR_INTEL_PENTIUM)
- ACE_OS::strcpy (name->machine, ACE_TEXT ("Intel Pentium"));
- }
- else
- {
- // We don't know what this is!
-
- ACE_OS::strcpy (name->release, ACE_TEXT ("???"));
- ACE_OS::strcpy (name->version, ACE_TEXT ("???"));
- ACE_OS::strcpy (name->machine, ACE_TEXT ("???"));
- }
-
- return ACE_OS::hostname (name->nodename, maxnamelen);
-# elif defined (VXWORKS)
- size_t maxnamelen = sizeof name->nodename;
- ACE_OS::strcpy (name->sysname, "VxWorks");
- ACE_OS::strcpy (name->release, "???");
- ACE_OS::strcpy (name->version, sysBspRev ());
- ACE_OS::strcpy (name->machine, sysModel ());
-
- return ACE_OS::hostname (name->nodename, maxnamelen);
-# elif defined (CHORUS)
- size_t maxnamelen = sizeof name->nodename;
- ACE_OS::strcpy (name->sysname, "CHORUS/ClassiX");
- ACE_OS::strcpy (name->release, "???");
- ACE_OS::strcpy (name->version, "???");
- ACE_OS::strcpy (name->machine, "???");
-
- return ACE_OS::hostname (name->nodename, maxnamelen);
-#elif defined (ACE_PSOS)
- ACE_UNUSED_ARG (name);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-#endif /* ACE_WIN32 || VXWORKS */
-
-
-#if defined (VXWORKS)
-struct hostent *
-ACE_OS::gethostbyname (const char *name)
-{
- ACE_TRACE ("ACE_OS::gethostbyname");
-
- // not thread safe!
- static hostent ret;
- static int first_addr;
- static char *hostaddr[2];
- static char *aliases[1];
-
- ACE_OSCALL (::hostGetByName ((char *) name), int, -1, first_addr);
- if (first_addr == -1)
- return 0;
-
- hostaddr[0] = (char *) &first_addr;
- hostaddr[1] = 0;
- aliases[0] = 0;
-
- // Might not be official: just echo input arg.
- ret.h_name = (char *) name;
- ret.h_addrtype = AF_INET;
- ret.h_length = 4; // VxWorks 5.2/3 doesn't define IP_ADDR_LEN;
- ret.h_addr_list = hostaddr;
- ret.h_aliases = aliases;
-
- return &ret;
-}
-
-struct hostent *
-ACE_OS::gethostbyaddr (const char *addr, int length, int type)
-{
- ACE_TRACE ("ACE_OS::gethostbyaddr");
-
- if (length != 4 || type != AF_INET)
- {
- errno = EINVAL;
- return 0;
- }
-
- // not thread safe!
- static hostent ret;
- static char name [MAXNAMELEN + 1];
- static char *hostaddr[2];
- static char *aliases[1];
-
- if (::hostGetByAddr (*(int *) addr, name) != 0)
- {
- // errno will have been set to S_hostLib_UNKNOWN_HOST.
- return 0;
- }
-
- // Might not be official: just echo input arg.
- hostaddr[0] = (char *) addr;
- hostaddr[1] = 0;
- aliases[0] = 0;
-
- ret.h_name = name;
- ret.h_addrtype = AF_INET;
- ret.h_length = 4; // VxWorks 5.2/3 doesn't define IP_ADDR_LEN;
- ret.h_addr_list = hostaddr;
- ret.h_aliases = aliases;
-
- return &ret;
-}
-
-struct hostent *
-ACE_OS::gethostbyaddr_r (const char *addr, int length, int type,
- hostent *result, ACE_HOSTENT_DATA buffer,
- int *h_errnop)
-{
- ACE_TRACE ("ACE_OS::gethostbyaddr_r");
- if (length != 4 || type != AF_INET)
- {
- errno = EINVAL;
- return 0;
- }
-
- if (ACE_OS::netdb_acquire ())
- return 0;
- else
- {
- // buffer layout:
- // buffer[0-3]: h_addr_list[0], the first (and only) addr.
- // buffer[4-7]: h_addr_list[1], the null terminator for the h_addr_list.
- // buffer[8]: the name of the host, null terminated.
-
- // Call ::hostGetByAddr (), which puts the (one) hostname into
- // buffer.
- if (::hostGetByAddr (*(int *) addr, &buffer[8]) == 0)
- {
- // Store the return values in result.
- result->h_name = &buffer[8]; // null-terminated host name
- result->h_addrtype = AF_INET;
- result->h_length = 4; // VxWorks 5.2/3 doesn't define IP_ADDR_LEN.
-
- result->h_addr_list = (char **) buffer;
- // Might not be official: just echo input arg.
- result->h_addr_list[0] = (char *) addr;
- // Null-terminate the list of addresses.
- result->h_addr_list[1] = 0;
- // And no aliases, so null-terminate h_aliases.
- result->h_aliases = &result->h_addr_list[1];
- }
- else
- {
- // errno will have been set to S_hostLib_UNKNOWN_HOST.
- result = 0;
- }
- }
-
- ACE_OS::netdb_release ();
- *h_errnop = errno;
- return result;
-}
-
-struct hostent *
-ACE_OS::gethostbyname_r (const char *name, hostent *result,
- ACE_HOSTENT_DATA buffer,
- int *h_errnop)
-{
- ACE_TRACE ("ACE_OS::gethostbyname_r");
-
- if (ACE_OS::netdb_acquire ())
- return 0;
- else
- {
- int addr;
- ACE_OSCALL (::hostGetByName ((char *) name), int, -1, addr);
-
- if (addr == -1)
- {
- // errno will have been set to S_hostLib_UNKNOWN_HOST
- result = 0;
- }
- else
- {
- // Might not be official: just echo input arg.
- result->h_name = (char *) name;
- result->h_addrtype = AF_INET;
- result->h_length = 4; // VxWorks 5.2/3 doesn't define IP_ADDR_LEN;
-
- // buffer layout:
- // buffer[0-3]: h_addr_list[0], pointer to the addr.
- // buffer[4-7]: h_addr_list[1], null terminator for the h_addr_list.
- // buffer[8-11]: the first (and only) addr.
-
- // Store the address list in buffer.
- result->h_addr_list = (char **) buffer;
- // Store the actual address _after_ the address list.
- result->h_addr_list[0] = (char *) &result->h_addr_list[2];
- result->h_addr_list[2] = (char *) addr;
- // Null-terminate the list of addresses.
- result->h_addr_list[1] = 0;
- // And no aliases, so null-terminate h_aliases.
- result->h_aliases = &result->h_addr_list[1];
- }
- }
-
- ACE_OS::netdb_release ();
- *h_errnop = errno;
- return result;
-}
-#endif /* VXWORKS */
-
-void
-ACE_OS::ace_flock_t::dump (void) const
-{
-ACE_TRACE ("ACE_OS::ace_flock_t::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("handle_ = %u"), this->handle_));
-#if defined (ACE_WIN32)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nInternal = %d"), this->overlapped_.Internal));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nInternalHigh = %d"), this->overlapped_.InternalHigh));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nOffsetHigh = %d"), this->overlapped_.OffsetHigh));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhEvent = %d"), this->overlapped_.hEvent));
-#elif !defined (CHORUS)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nl_whence = %d"), this->lock_.l_whence));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nl_start = %d"), this->lock_.l_start));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nl_len = %d"), this->lock_.l_len));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nl_type = %d"), this->lock_.l_type));
-#endif /* ACE_WIN32 */
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_OS::mutex_lock_cleanup (void *mutex)
-{
-ACE_TRACE ("ACE_OS::mutex_lock_cleanup");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- ACE_mutex_t *p_lock = (ACE_mutex_t *) mutex;
- ACE_OS::mutex_unlock (p_lock);
-# else
- ACE_UNUSED_ARG (mutex);
-# endif /* ACE_HAS_PTHREADS */
-#else
- ACE_UNUSED_ARG (mutex);
-#endif /* ACE_HAS_THREADS */
-}
-
-#if defined (ACE_HAS_WINCE)
-FILE *
-ACE_OS::fopen (const ACE_TCHAR *filename,
- const ACE_TCHAR *mode)
-{
- return ::_wfopen (filename, mode);
-}
-
-#elif defined (ACE_WIN32)
-FILE *
-ACE_OS::fopen (const ACE_TCHAR *filename,
- const ACE_TCHAR *mode)
-{
- ACE_TRACE ("ACE_OS::fopen");
- int hmode = _O_TEXT;
-
- for (const ACE_TCHAR *mode_ptr = mode; *mode_ptr != 0; mode_ptr++)
- ACE_OS::fopen_mode_to_open_mode_converter (*mode_ptr, hmode);
-
- ACE_HANDLE handle = ACE_OS::open (filename, hmode);
- if (handle != ACE_INVALID_HANDLE)
- {
- hmode &= _O_TEXT | _O_RDONLY | _O_APPEND;
- int fd = _open_osfhandle ((long) handle, hmode);
- if (fd != -1)
- {
-# if defined(__BORLANDC__)
- FILE *fp = _fdopen (fd, ACE_const_cast (char *, mode));
-# elif defined (ACE_USES_WCHAR)
- FILE *fp = _wfdopen (fd, mode);
-# else
- FILE *fp = _fdopen (fd, mode);
-# endif /* defined(__BORLANDC__) */
- if (fp != NULL)
- return fp;
- _close (fd);
- }
- ACE_OS::close (handle);
- }
- return NULL;
-}
-#endif /* ACE_WIN32 */
-
-// The following *printf functions aren't inline because
-// they use varargs.
-
-int
-ACE_OS::fprintf (FILE *fp, const char *format, ...)
-{
- ACE_TRACE ("ACE_OS::fprintf");
-# if defined (ACE_HAS_WINCE)
- ACE_NOTSUP_RETURN (-1);
-# else /* ACE_HAS_WINCE */
- int result = 0;
- va_list ap;
- va_start (ap, format);
- ACE_OSCALL (::vfprintf (fp, format, ap), int, -1, result);
- va_end (ap);
- return result;
-# endif /* ACE_HAS_WINCE */
-}
-
-#if defined (ACE_HAS_WCHAR)
-int
-ACE_OS::fprintf (FILE *fp, const wchar_t *format, ...)
-{
- ACE_TRACE ("ACE_OS::fprintf");
-# if defined (ACE_HAS_WINCE)
- ACE_NOTSUP_RETURN (-1);
-# else /* ACE_HAS_WINCE */
- int result = 0;
- va_list ap;
- va_start (ap, format);
- ACE_OSCALL (::vfwprintf (fp, format, ap), int, -1, result);
- va_end (ap);
- return result;
-# endif /* ACE_HAS_WINCE */
-}
-#endif /* ACE_HAS_WCHAR */
-
-int
-ACE_OS::printf (const char *format, ...)
-{
- ACE_TRACE ("ACE_OS::printf");
- int result;
- va_list ap;
- va_start (ap, format);
- ACE_OSCALL (::vprintf (format, ap), int, -1, result);
- va_end (ap);
- return result;
-}
-
-int
-ACE_OS::sprintf (char *buf, const char *format, ...)
-{
- // ACE_TRACE ("ACE_OS::sprintf");
-
- int result;
- va_list ap;
- va_start (ap, format);
- ACE_OSCALL (ACE_SPRINTF_ADAPTER (::vsprintf (buf, format, ap)), int, -1, result);
- va_end (ap);
- return result;
-}
-
-#if defined (ACE_HAS_WCHAR)
-int
-ACE_OS::sprintf (wchar_t *buf, const wchar_t *format, ...)
-{
- ACE_TRACE ("ACE_OS::sprintf");
- int result;
- va_list ap;
- va_start (ap, format);
- ACE_OSCALL (::vswprintf (buf, format, ap), int, -1, result);
- va_end (ap);
- return result;
-}
-#endif /* ACE_HAS_WCHAR */
-
-char *
-ACE_OS::gets (char *str, int n)
-{
- ACE_TRACE ("ACE_OS::gets");
- int c;
- char *s = str;
-
- if (str == 0 || n < 0) n = 0;
- if (n == 0) str = 0;
- else n--;
-
- while ((c = getchar ()) != '\n')
- {
-
-# if defined (ACE_HAS_SIGNAL_SAFE_OS_CALLS)
- if (c == EOF && errno == EINTR && ACE_LOG_MSG->restart ())
- continue;
-# endif /* ACE_HAS_SIGNAL_SAFE_OS_CALLS */
-
- if (c == EOF)
- break;
-
- if (n > 0)
- n--, *s++ = c;
- }
- if (s) *s = '\0';
-
- return (c == EOF) ? 0 : str;
-}
-
-int
-ACE_OS::execl (const char * /* path */, const char * /* arg0 */, ...)
-{
- ACE_TRACE ("ACE_OS::execl");
-#if defined (ACE_WIN32) || defined (VXWORKS)
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_NOTSUP_RETURN (-1);
- // Need to write this code.
- // ACE_OSCALL_RETURN (::execv (path, argv), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-int
-ACE_OS::execle (const char * /* path */, const char * /* arg0 */, ...)
-{
- ACE_TRACE ("ACE_OS::execle");
-#if defined (ACE_WIN32) || defined (VXWORKS)
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_NOTSUP_RETURN (-1);
- // Need to write this code.
- // ACE_OSCALL_RETURN (::execve (path, argv, envp), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-int
-ACE_OS::execlp (const char * /* file */, const char * /* arg0 */, ...)
-{
- ACE_TRACE ("ACE_OS::execlp");
-#if defined (ACE_WIN32) || defined (VXWORKS)
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_NOTSUP_RETURN (-1);
- // Need to write this code.
- // ACE_OSCALL_RETURN (::execvp (file, argv), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-int
-ACE_OS::scheduling_class (const char *class_name, ACE_id_t &id)
-{
-#if defined (ACE_HAS_PRIOCNTL)
- // Get the priority class ID.
- pcinfo_t pcinfo;
- // The following is just to avoid Purify warnings about unitialized
- // memory reads.
- ACE_OS::memset (&pcinfo, 0, sizeof pcinfo);
-
- ACE_OS::strcpy (pcinfo.pc_clname, class_name);
- if (ACE_OS::priority_control (P_ALL /* ignored */,
- P_MYID /* ignored */,
- PC_GETCID,
- (char *) &pcinfo) == -1)
- {
- return -1;
- }
- else
- {
- id = pcinfo.pc_cid;
- return 0;
- }
-#else /* ! ACE_HAS_PRIOCNTL */
- ACE_UNUSED_ARG (class_name);
- ACE_UNUSED_ARG (id);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ! ACE_HAS_PRIOCNTL */
-}
-
-int
-ACE_OS::set_scheduling_params (const ACE_Sched_Params &sched_params,
- ACE_id_t id)
-{
-#if defined (ACE_HAS_PRIOCNTL)
- // Set priority class, priority, and quantum of this LWP or process as
- // specified in sched_params.
-
- // Get the priority class ID.
- ACE_id_t class_id;
- if (ACE_OS::scheduling_class (sched_params.policy() == ACE_SCHED_OTHER ?
- "TS" :
- "RT", class_id) == -1)
- {
- return -1;
- }
-
- pcparms_t pcparms;
- // The following is just to avoid Purify warnings about unitialized
- // memory reads.
- ACE_OS::memset (&pcparms, 0, sizeof pcparms);
-
- pcparms.pc_cid = class_id;
-
- if (sched_params.policy () == ACE_SCHED_OTHER &&
- sched_params.quantum () == ACE_Time_Value::zero)
- // SunOS doesn't support non-zero quantums in time-sharing class: use
- // real-time class instead.
- {
- tsparms_t tsparms;
- // The following is just to avoid Purify warnings about unitialized
- // memory reads.
- ACE_OS::memset (&tsparms, 0, sizeof tsparms);
-
- // Don't change ts_uprilim (user priority limit)
- tsparms.ts_uprilim = TS_NOCHANGE;
- tsparms.ts_upri = sched_params.priority ();
-
- // Package up the TS class ID and parameters for the
- // priority_control () call.
- ACE_OS::memcpy (pcparms.pc_clparms, &tsparms, sizeof tsparms);
- }
- else if (sched_params.policy () == ACE_SCHED_FIFO ||
- (sched_params.policy () == ACE_SCHED_RR &&
- sched_params.quantum () != ACE_Time_Value::zero))
- // must have non-zero quantum for RR, to make it meaningful
- // A zero quantum with FIFO has special significance: it actually
- // means infinite time quantum, i.e., run-to-completion.
- {
- rtparms_t rtparms;
- // The following is just to avoid Purify warnings about unitialized
- // memory reads.
- ACE_OS::memset (&rtparms, 0, sizeof rtparms);
-
- rtparms.rt_pri = sched_params.priority ();
-
- if (sched_params.quantum () == ACE_Time_Value::zero)
- {
- // rtparms.rt_tqsecs is ignored with RT_TQINF
- rtparms.rt_tqnsecs = RT_TQINF;
- }
- else
- {
- rtparms.rt_tqsecs = (ulong) sched_params.quantum ().sec ();
- rtparms.rt_tqnsecs = sched_params.quantum ().usec () * 1000;
- }
-
- // Package up the RT class ID and parameters for the
- // priority_control () call.
- ACE_OS::memcpy (pcparms.pc_clparms, &rtparms, sizeof rtparms);
- }
- else
- {
- errno = EINVAL;
- return -1;
- }
-
- if (ACE_OS::priority_control ((idtype_t) (sched_params.scope () ==
- ACE_SCOPE_THREAD ?
- ACE_SCOPE_PROCESS :
- sched_params.scope ()),
- id,
- PC_SETPARMS,
- (char *) &pcparms) < 0)
- {
- return ACE_OS::last_error ();
- }
-
- return 0;
-#else /* ! ACE_HAS_PRIOCNTL */
- ACE_UNUSED_ARG (sched_params);
- ACE_UNUSED_ARG (id);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ! ACE_HAS_PRIOCNTL */
-}
-
-int
-ACE_OS::thr_setprio (const ACE_Sched_Priority prio)
-{
- // Set the thread priority on the current thread.
- ACE_hthread_t my_thread_id;
- ACE_OS::thr_self (my_thread_id);
-
- int status = ACE_OS::thr_setprio (my_thread_id, prio);
-
-# if defined (ACE_NEEDS_LWP_PRIO_SET)
- // If the thread is in the RT class, then set the priority on its
- // LWP. (Instead of doing this if the thread is in the RT class, it
- // should be done for all bound threads. But, there doesn't appear
- // to be an easy way to determine if the thread is bound.)
-
- if (status == 0)
- {
- // Find what scheduling class the thread's LWP is in.
- ACE_Sched_Params sched_params (ACE_SCHED_OTHER, 0);
- if (ACE_OS::lwp_getparams (sched_params) == -1)
- {
- return -1;
- }
- else if (sched_params.policy () == ACE_SCHED_FIFO ||
- sched_params.policy () == ACE_SCHED_RR)
- {
- // This thread's LWP is in the RT class, so we need to set
- // its priority.
- sched_params.priority (prio);
- return ACE_OS::lwp_setparams (sched_params);
- }
- // else this is not an RT thread. Nothing more needs to be
- // done.
- }
-# endif /* ACE_NEEDS_LWP_PRIO_SET */
-
- return status;
-}
-
-int
-ACE_OS::sched_params (const ACE_Sched_Params &sched_params,
- ACE_id_t id)
-{
- ACE_TRACE ("ACE_OS::sched_params");
-# if defined (CHORUS)
- ACE_UNUSED_ARG (id);
- int result;
- struct sched_param param;
- ACE_thread_t thr_id = ACE_OS::thr_self ();
-
- param.sched_priority = sched_params.priority ();
-
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setschedparam (thr_id,
- sched_params.policy (),
- &param),
- result),
- int, -1);
-# elif defined (ACE_HAS_STHREADS)
- return ACE_OS::set_scheduling_params (sched_params, id);
-# elif defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_SETSCHED)
- ACE_UNUSED_ARG (id);
- if (sched_params.quantum () != ACE_Time_Value::zero)
- {
- // quantums not supported
- errno = EINVAL;
- return -1;
- }
-
- // Thanks to Thilo Kielmann <kielmann@informatik.uni-siegen.de> for
- // providing this code for 1003.1c PThreads. Please note that this
- // has only been tested for POSIX 1003.1c threads, and may cause problems
- // with other PThreads flavors!
-
- struct sched_param param;
- param.sched_priority = sched_params.priority ();
-
- if (sched_params.scope () == ACE_SCOPE_PROCESS)
- {
- int result = ::sched_setscheduler (0, // this process
- sched_params.policy (),
- &param) == -1 ? -1 : 0;
-# if defined (DIGITAL_UNIX)
- return result == 0
- ? // Use priocntl (2) to set the process in the RT class,
- // if using an RT policy.
- ACE_OS::set_scheduling_params (sched_params)
- : result;
-# else /* ! DIGITAL_UNIX */
- return result;
-# endif /* ! DIGITAL_UNIX */
- }
- else if (sched_params.scope () == ACE_SCOPE_THREAD)
- {
- ACE_thread_t thr_id = ACE_OS::thr_self ();
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- return (::pthread_setscheduler(thr_id,
- sched_params.policy (),
- sched_params.priority()) == -1 ? -1 : 0);
-# else
- int result;
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setschedparam (
- thr_id,
- sched_params.policy (),
- &param),
- result),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-
- }
-#if defined (sun)
- // We need to be able to set LWP priorities on Suns, even without
- // ACE_HAS_STHREADS, to obtain preemption.
- else if (sched_params.scope () == ACE_SCOPE_LWP)
- return ACE_OS::set_scheduling_params (sched_params, id);
-#endif /* sun */
- else // sched_params.scope () == ACE_SCOPE_LWP, which isn't POSIX
- {
- errno = EINVAL;
- return -1;
- }
-
-# elif defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
-
- // PharLap ETS can act on the current thread - it can set the quantum also,
- // unlike Win32. All this only works on the RT version.
-# if defined (ACE_HAS_PHARLAP_RT)
- if (id != ACE_SELF)
- ACE_NOTSUP_RETURN (-1);
-
- if (sched_params.quantum() != ACE_Time_Value::zero)
- EtsSetTimeSlice (sched_params.quantum().msec());
-
-# else
- ACE_UNUSED_ARG (id);
-
- if (sched_params.scope () != ACE_SCOPE_PROCESS ||
- sched_params.quantum () != ACE_Time_Value::zero)
- {
- // Win32 only allows setting priority class (therefore, policy)
- // at the process level. I don't know of a way to set the quantum.
- errno = EINVAL;
- return -1;
- }
-
- // Set the priority class of this process to the REALTIME process class
- // _if_ the policy is ACE_SCHED_FIFO. Otherwise, set to NORMAL.
- if (! ::SetPriorityClass (
- ::GetCurrentProcess (),
- sched_params.policy () == ACE_SCHED_FIFO
- ? REALTIME_PRIORITY_CLASS
- : NORMAL_PRIORITY_CLASS))
- {
- return -1;
- }
-# endif /* ACE_HAS_PHARLAP_RT */
-
- // Set the thread priority on the current thread.
- return ACE_OS::thr_setprio (sched_params.priority ());
-
-# elif defined (VXWORKS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (id);
-
- // There is only one class of priorities on VxWorks, and no
- // time quanta. So, just set the current thread's priority.
-
- if (sched_params.policy () != ACE_SCHED_FIFO ||
- sched_params.scope () != ACE_SCOPE_PROCESS ||
- sched_params.quantum () != ACE_Time_Value::zero)
- {
- errno = EINVAL;
- return -1;
- }
-
- // Set the thread priority on the current thread.
- return ACE_OS::thr_setprio (sched_params.priority ());
-#else
- ACE_UNUSED_ARG (sched_params);
- ACE_UNUSED_ARG (id);
- ACE_NOTSUP_RETURN (-1);
-#endif /* CHORUS */
-}
-
-// = Static initialization.
-
-// This is necessary to deal with POSIX pthreads insanity. This
-// guarantees that we've got a "zero'd" thread id even when
-// ACE_thread_t, ACE_hthread_t, and ACE_thread_key_t are implemented
-// as structures... Under no circumstances should these be given
-// initial values.
-// Note: these three objects require static construction.
-ACE_thread_t ACE_OS::NULL_thread;
-ACE_hthread_t ACE_OS::NULL_hthread;
-#if defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS))
- ACE_thread_key_t ACE_OS::NULL_key = ACE_static_cast (ACE_thread_key_t, -1);
-#else /* ! ACE_HAS_TSS_EMULATION */
- ACE_thread_key_t ACE_OS::NULL_key;
-#endif /* ! ACE_HAS_TSS_EMULATION */
-
-#if defined (CHORUS)
-KnCap ACE_OS::actorcaps_[ACE_CHORUS_MAX_ACTORS];
-// This is used to map an actor's id into a KnCap for killing and
-// waiting actors.
-#endif /* CHORUS */
-
-#if defined (ACE_WIN32)
-
-// = Static initialization.
-
-// Keeps track of whether we've initialized the WinSock DLL.
-int ACE_OS::socket_initialized_;
-
-#endif /* WIN32 */
-
-#if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS))
-
-// Moved class ACE_TSS_Ref declaration to OS.h so it can be visible to
-// the single file of template instantiations.
-
-ACE_TSS_Ref::ACE_TSS_Ref (ACE_thread_t id)
- : tid_(id)
-{
-ACE_TRACE ("ACE_TSS_Ref::ACE_TSS_Ref");
-}
-
-ACE_TSS_Ref::ACE_TSS_Ref (void)
-{
-ACE_TRACE ("ACE_TSS_Ref::ACE_TSS_Ref");
-}
-
-// Check for equality.
-int
-ACE_TSS_Ref::operator== (const ACE_TSS_Ref &info) const
-{
-ACE_TRACE ("ACE_TSS_Ref::operator==");
-
- return this->tid_ == info.tid_;
-}
-
-// Check for inequality.
-inline
-int
-ACE_TSS_Ref::operator!= (const ACE_TSS_Ref &tss_ref) const
-{
-ACE_TRACE ("ACE_TSS_Ref::operator==");
-
- return !(*this == tss_ref);
-}
-
-// moved class ACE_TSS_Info declaration
-// to OS.h so it can be visible to the
-// single file of template instantiations
-
-ACE_TSS_Info::ACE_TSS_Info (ACE_thread_key_t key,
- void (*dest)(void *),
- void *tss_inst)
- : key_ (key),
- destructor_ (dest),
- tss_obj_ (tss_inst),
- thread_count_ (-1)
-{
-ACE_TRACE ("ACE_TSS_Info::ACE_TSS_Info");
-}
-
-ACE_TSS_Info::ACE_TSS_Info (void)
- : key_ (ACE_OS::NULL_key),
- destructor_ (0),
- tss_obj_ (0),
- thread_count_ (-1)
-{
-ACE_TRACE ("ACE_TSS_Info::ACE_TSS_Info");
-}
-
-# if defined (ACE_HAS_NONSCALAR_THREAD_KEY_T)
- static inline int operator== (const ACE_thread_key_t &lhs,
- const ACE_thread_key_t &rhs)
- {
- return ! ACE_OS::memcmp (&lhs, &rhs, sizeof (ACE_thread_key_t));
- }
-
- static inline int operator!= (const ACE_thread_key_t &lhs,
- const ACE_thread_key_t &rhs)
- {
- return ! (lhs == rhs);
- }
-# endif /* ACE_HAS_NONSCALAR_THREAD_KEY_T */
-
-// Check for equality.
-int
-ACE_TSS_Info::operator== (const ACE_TSS_Info &info) const
-{
-ACE_TRACE ("ACE_TSS_Info::operator==");
-
- return this->key_ == info.key_;
-}
-
-// Check for inequality.
-int
-ACE_TSS_Info::operator!= (const ACE_TSS_Info &info) const
-{
-ACE_TRACE ("ACE_TSS_Info::operator==");
-
- return !(*this == info);
-}
-
-void
-ACE_TSS_Info::dump (void)
-{
-// ACE_TRACE ("ACE_TSS_Info::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("key_ = %u\n"), this->key_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("destructor_ = %u\n"), this->destructor_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("tss_obj_ = %u\n"), this->tss_obj_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Moved class ACE_TSS_Keys declaration to OS.h so it can be visible
-// to the single file of template instantiations.
-
-ACE_TSS_Keys::ACE_TSS_Keys (void)
-{
- for (u_int i = 0; i < ACE_WORDS; ++i)
- {
- key_bit_words_[i] = 0;
- }
-}
-
-inline
-void
-ACE_TSS_Keys::find (const u_int key, u_int &word, u_int &bit)
-{
- word = key / ACE_BITS_PER_WORD;
- bit = key % ACE_BITS_PER_WORD;
-}
-
-int
-ACE_TSS_Keys::test_and_set (const ACE_thread_key_t key)
-{
- ACE_KEY_INDEX (key_index, key);
- u_int word, bit;
- find (key_index, word, bit);
-
- if (ACE_BIT_ENABLED (key_bit_words_[word], 1 << bit))
- {
- return 1;
- }
- else
- {
- ACE_SET_BITS (key_bit_words_[word], 1 << bit);
- return 0;
- }
-}
-
-int
-ACE_TSS_Keys::test_and_clear (const ACE_thread_key_t key)
-{
- ACE_KEY_INDEX (key_index, key);
-
- u_int word, bit;
- find (key_index, word, bit);
-
- if (ACE_BIT_ENABLED (key_bit_words_[word], 1 << bit))
- {
- ACE_CLR_BITS (key_bit_words_[word], 1 << bit);
- return 0;
- }
- else
- {
- return 1;
- }
-}
-
-class ACE_TSS_Cleanup
- // = TITLE
- // Singleton that knows how to clean up all the thread-specific
- // resources for Win32.
- //
- // = DESCRIPTION
- // All this nonsense is required since Win32 doesn't
- // automatically cleanup thread-specific storage on thread exit,
- // unlike real operating systems... ;-)
-{
-public:
- static ACE_TSS_Cleanup *instance (void);
-
- ~ACE_TSS_Cleanup (void);
-
- void exit (void *status);
- // Cleanup the thread-specific objects. Does _NOT_ exit the thread.
-
- int insert (ACE_thread_key_t key, void (*destructor)(void *), void *inst);
- // Insert a <key, destructor> tuple into the table.
-
- int remove (ACE_thread_key_t key);
- // Remove a <key, destructor> tuple from the table.
-
- int detach (void *inst);
- // Detaches a tss_instance from its key.
-
- void key_used (ACE_thread_key_t key);
- // Mark a key as being used by this thread.
-
- int free_all_keys_left (void);
- // Free all keys left in the table before destruction.
-
- static int lockable () { return instance_ != 0; }
- // Indication of whether the ACE_TSS_CLEANUP_LOCK is usable, and
- // therefore whether we are in static constructor/destructor phase
- // or not.
-
-protected:
- void dump (void);
-
- ACE_TSS_Cleanup (void);
- // Ensure singleton.
-
-private:
- // Array of <ACE_TSS_Info> objects.
- typedef ACE_TSS_Info ACE_TSS_TABLE[ACE_DEFAULT_THREAD_KEYS];
- typedef ACE_TSS_Info *ACE_TSS_TABLE_ITERATOR;
-
- ACE_TSS_TABLE table_;
- // Table of <ACE_TSS_Info>'s.
-
- ACE_thread_key_t in_use_;
- // Key for the thread-specific array of whether each TSS key is in use.
-
- ACE_TSS_Keys *tss_keys ();
- // Accessor for this threads ACE_TSS_Keys instance.
-
-#if defined (ACE_HAS_TSS_EMULATION)
- ACE_thread_key_t in_use_key_;
- // Key that is used by in_use_. We save this key so that we know
- // not to call its destructor in free_all_keys_left ().
-#endif /* ACE_HAS_TSS_EMULATION */
-
- // = Static data.
- static ACE_TSS_Cleanup *instance_;
- // Pointer to the singleton instance.
-};
-
-// = Static object initialization.
-
-// Pointer to the singleton instance.
-ACE_TSS_Cleanup *ACE_TSS_Cleanup::instance_ = 0;
-
-ACE_TSS_Cleanup::~ACE_TSS_Cleanup (void)
-{
- // Zero out the instance pointer to support lockable () accessor.
- ACE_TSS_Cleanup::instance_ = 0;
-}
-
-void
-ACE_TSS_Cleanup::exit (void * /* status */)
-{
- ACE_TRACE ("ACE_TSS_Cleanup::exit");
-
- ACE_TSS_TABLE_ITERATOR key_info = table_;
- ACE_TSS_Info info_arr[ACE_DEFAULT_THREAD_KEYS];
- int info_ix = 0;
-
- // While holding the lock, we only collect the ACE_TSS_Info objects
- // in an array without invoking the according destructors.
- {
- ACE_TSS_CLEANUP_GUARD
-
- // Iterate through all the thread-specific items and free them all
- // up.
-
- for (unsigned int i = 0;
- i < ACE_DEFAULT_THREAD_KEYS;
- ++key_info, ++i)
- {
- if (key_info->key_ == ACE_OS::NULL_key ||
- ! key_info->key_in_use ()) continue;
-
- // If the key's ACE_TSS_Info in-use bit for this thread was set,
- // unset it and decrement the key's thread_count_.
- if (! tss_keys ()->test_and_clear (key_info->key_))
- {
- --key_info->thread_count_;
- }
-
- void *tss_info = 0;
-
- if (key_info->destructor_
- && ACE_OS::thr_getspecific (key_info->key_, &tss_info) == 0
- && tss_info)
- {
- info_arr[info_ix].key_ = key_info->key_;
- info_arr[info_ix].destructor_ = key_info->destructor_;
- info_arr[info_ix++].tss_obj_ = key_info->tss_obj_;
- }
- }
- }
-
- // Now we have given up the ACE_TSS_Cleanup::lock_ and we start
- // invoking destructors, in the reverse order of creation.
- for (int i = info_ix - 1; i >= 0; --i)
- {
- void *tss_info = 0;
-
- ACE_OS::thr_getspecific (info_arr[i].key_, &tss_info);
-
- if (tss_info != 0)
- {
- // Only call the destructor if the value is non-zero for this
- // thread.
- (*info_arr[i].destructor_)(tss_info);
- }
- }
-
- // Acquire the ACE_TSS_CLEANUP_LOCK, then free TLS keys and remove
- // entries from ACE_TSS_Info table.
- {
- ACE_TSS_CLEANUP_GUARD
-
-# if 0
- // We shouldn't free the key and remove it from the table here
- // because if we do and some thread ends before other threads
- // even get started (or their TSS object haven't been created yet,)
- // it's entry will be removed from the table and we are in big chaos.
- // For TSS object, these have been done in ACE_TSS_Cleanup::detach.
- // Two other use cases will be user managed TSS'es and system wide
- // TSS, ones are users responsibilities and the others should be
- // persistant system wide.
- for (int i = 0; i < index; i++)
- {
-# if defined (ACE_WIN32) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS))
- // Calling thr_keyfree here ensure the key
- // gets removed appropriately. Notice that
- // a key should be removed before freeing it.
- ACE_OS::thr_keyfree (key_info->key_);
-# else
- // don't bother to free the key
- this->remove (key_info->key_);
-# endif /* ACE_WIN32 */
- }
-# endif /* 0 */
- }
-}
-
-int
-ACE_TSS_Cleanup::free_all_keys_left (void)
- // This is called from ACE_OS::cleanup_tss (). When this gets
- // called, all threads should have exited except the main thread.
- // No key should be freed from this routine. It there's any,
- // something might be wrong.
-{
- ACE_thread_key_t key_arr[ACE_DEFAULT_THREAD_KEYS];
- ACE_TSS_TABLE_ITERATOR key_info = table_;
- unsigned int idx = 0;
- unsigned int i;
-
- for (i = 0;
- i < ACE_DEFAULT_THREAD_KEYS;
- ++key_info, ++i)
-#if defined (ACE_HAS_TSS_EMULATION)
- if (key_info->key_ != in_use_key_)
-#endif /* ACE_HAS_TSS_EMULATION */
- // Don't call ACE_OS::thr_keyfree () on ACE_TSS_Cleanup's own
- // key. See the comments in ACE_OS::thr_key_detach (): the key
- // doesn't get detached, so it will be in the table here.
- // However, there's no resource associated with it, so we don't
- // need to keyfree it. The dynamic memory associated with it
- // was already deleted by ACE_TSS_Cleanup::exit (), so we don't
- // want to access it again.
- key_arr [idx++] = key_info->key_;
-
- for (i = 0; i < idx; i++)
- if (key_arr[i] != ACE_OS::NULL_key)
-#if defined (ACE_HAS_TSS_EMULATION)
- ACE_OS::thr_keyfree (key_arr[i]);
-#elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)
- // Don't call ACE_OS::thr_keyfree here. It will try to use
- // <in_use_> which has already been cleaned up here.
- ::tsd_delete (key_arr[i]);
-#else /* ACE_WIN32 */
- // Don't call ACE_OS::thr_keyfree here. It will try to use
- // <in_use_> which has already been cleaned up here.
- TlsFree (key_arr[i]);
-#endif /* ACE_HAS_TSS_EMULATION */
-
- return 0;
-}
-
-extern "C" void
-ACE_TSS_Cleanup_keys_destroyer (void *tss_keys)
-{
- delete ACE_reinterpret_cast (ACE_TSS_Keys *, tss_keys);
-}
-
-ACE_TSS_Cleanup::ACE_TSS_Cleanup (void)
- : in_use_ (ACE_OS::NULL_key)
-#if defined (ACE_HAS_TSS_EMULATION)
- // ACE_TSS_Emulation::total_keys () provides the value of the next
- // key to be created.
- , in_use_key_ (ACE_TSS_Emulation::total_keys ())
-#endif /* ACE_HAS_TSS_EMULATION */
-{
- ACE_TRACE ("ACE_TSS_Cleanup::ACE_TSS_Cleanup");
-}
-
-ACE_TSS_Cleanup *
-ACE_TSS_Cleanup::instance (void)
-{
- ACE_TRACE ("ACE_TSS_Cleanup::instance");
-
- // Create and initialize thread-specific key.
- if (ACE_TSS_Cleanup::instance_ == 0)
- {
- // Insure that we are serialized!
- ACE_TSS_CLEANUP_GUARD
-
- // Now, use the Double-Checked Locking pattern to make sure we
- // only create the ACE_TSS_Cleanup instance once.
- if (ACE_TSS_Cleanup::instance_ == 0)
- ACE_NEW_RETURN (ACE_TSS_Cleanup::instance_,
- ACE_TSS_Cleanup,
- 0);
- }
-
- return ACE_TSS_Cleanup::instance_;
-}
-
-int
-ACE_TSS_Cleanup::insert (ACE_thread_key_t key,
- void (*destructor)(void *),
- void *inst)
-{
-ACE_TRACE ("ACE_TSS_Cleanup::insert");
- ACE_TSS_CLEANUP_GUARD
-
- ACE_KEY_INDEX (key_index, key);
- if (key_index < ACE_DEFAULT_THREAD_KEYS)
- {
- table_[key_index] = ACE_TSS_Info (key, destructor, inst);
- return 0;
- }
- else
- {
- return -1;
- }
-}
-
-int
-ACE_TSS_Cleanup::remove (ACE_thread_key_t key)
-{
- ACE_TRACE ("ACE_TSS_Cleanup::remove");
- ACE_TSS_CLEANUP_GUARD
-
- ACE_KEY_INDEX (key_index, key);
- if (key_index < ACE_DEFAULT_THREAD_KEYS)
- {
- // "Remove" the TSS_Info table entry by zeroing out its key_ and
- // destructor_ fields. Also, keep track of the number threads
- // using the key.
- ACE_TSS_Info &info = this->table_ [key_index];
-
- // Don't bother to check <in_use_> if the program is shutting
- // down. Doing so will cause a new ACE_TSS object getting
- // created again.
- if (!ACE_OS_Object_Manager::shutting_down ()
- && ! tss_keys ()->test_and_clear (info.key_))
- --info.thread_count_;
-
- info.key_ = ACE_OS::NULL_key;
- info.destructor_ = 0;
- return 0;
- }
- else
- return -1;
-}
-
-int
-ACE_TSS_Cleanup::detach (void *inst)
-{
- ACE_TSS_CLEANUP_GUARD
-
- ACE_TSS_TABLE_ITERATOR key_info = table_;
- int success = 0;
- int ref_cnt = 0;
-
- // Mark the key as detached in the TSS_Info table.
- // It only works for the first key that "inst" owns.
- // I don't know why.
- for (unsigned int i = 0;
- i < ACE_DEFAULT_THREAD_KEYS;
- ++key_info, ++i)
- {
- if (key_info->tss_obj_ == inst)
- {
- key_info->tss_obj_ = 0;
- ref_cnt = key_info->thread_count_;
- success = 1;
- break;
- }
- }
-
- if (success == 0)
- return -1;
- else if (ref_cnt == 0)
- {
- // Mark the key as no longer being used.
- key_info->key_in_use (0);
-# if defined (ACE_WIN32) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS))
- ACE_thread_key_t temp_key = key_info->key_;
-# endif /* ACE_WIN32 */
- int retv = this->remove (key_info->key_);
-
-# if defined (ACE_WIN32)
- ::TlsFree (temp_key);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)
- ::tsd_delete (temp_key);
-# endif /* ACE_WIN32 */
- return retv;
- }
-
- return 0;
-}
-
-void
-ACE_TSS_Cleanup::key_used (ACE_thread_key_t key)
-{
- // If the key's ACE_TSS_Info in-use bit for this thread is not set,
- // set it and increment the key's thread_count_.
- if (! tss_keys ()->test_and_set (key))
- {
- ACE_TSS_CLEANUP_GUARD
-
- // Retrieve the key's ACE_TSS_Info and increment its thread_count_.
- ACE_KEY_INDEX (key_index, key);
- ACE_TSS_Info &key_info = this->table_ [key_index];
- if (key_info.thread_count_ == -1)
- key_info.key_in_use (1);
- else
- ++key_info.thread_count_;
- }
-}
-
-void
-ACE_TSS_Cleanup::dump (void)
-{
- // Iterate through all the thread-specific items and dump them all.
-
- ACE_TSS_TABLE_ITERATOR key_info = table_;
- for (unsigned int i = 0;
- i < ACE_DEFAULT_THREAD_KEYS;
- ++key_info, ++i)
- key_info->dump ();
-}
-
-ACE_TSS_Keys *
-ACE_TSS_Cleanup::tss_keys ()
-{
- if (in_use_ == ACE_OS::NULL_key)
- {
- ACE_TSS_CLEANUP_GUARD
- // Double-check;
- if (in_use_ == ACE_OS::NULL_key)
- {
- // Initialize in_use_ with a new key.
- if (ACE_OS::thr_keycreate (&in_use_,
- &ACE_TSS_Cleanup_keys_destroyer))
- return 0; // Major problems, this should *never* happen!
- }
- }
-
- ACE_TSS_Keys *ts_keys = 0;
- if (ACE_OS::thr_getspecific (in_use_,
- ACE_reinterpret_cast (void **, &ts_keys)) == -1)
- return 0; // This should not happen!
-
- if (ts_keys == 0)
- {
- ACE_NEW_RETURN (ts_keys,
- ACE_TSS_Keys,
- 0);
- // Store the dynamically allocated pointer in thread-specific
- // storage.
- if (ACE_OS::thr_setspecific (in_use_,
- ACE_reinterpret_cast (void *,
- ts_keys)) == -1)
- {
- delete ts_keys;
- return 0; // Major problems, this should *never* happen!
- }
- }
-
- return ts_keys;
-}
-
-# if defined (ACE_HAS_TSS_EMULATION)
-u_int ACE_TSS_Emulation::total_keys_ = 0;
-
-ACE_TSS_Emulation::ACE_TSS_DESTRUCTOR
-ACE_TSS_Emulation::tss_destructor_[ACE_TSS_Emulation::ACE_TSS_THREAD_KEYS_MAX]
- = { 0 };
-
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
-
-int ACE_TSS_Emulation::key_created_ = 0;
-
-ACE_OS_thread_key_t ACE_TSS_Emulation::native_tss_key_;
-
-/* static */
-# if defined (ACE_HAS_THR_C_FUNC)
-extern "C"
-# endif /* ACE_HAS_THR_C_FUNC */
-void
-ACE_TSS_Emulation_cleanup (void *ptr)
-{
- ACE_UNUSED_ARG (ptr);
- // Really this must be used for ACE_TSS_Emulation code to make the TSS
- // cleanup
-}
-
-void **
-ACE_TSS_Emulation::tss_base (void* ts_storage[], u_int *ts_created)
-{
- // TSS Singleton implementation.
-
- // Create the one native TSS key, if necessary.
- if (key_created_ == 0)
- {
- // Double-checked lock . . .
- ACE_TSS_BASE_GUARD
-
- if (key_created_ == 0)
- {
- ACE_NO_HEAP_CHECK;
- if (ACE_OS::thr_keycreate (&native_tss_key_,
- &ACE_TSS_Emulation_cleanup) != 0)
- {
- return 0; // Major problems, this should *never* happen!
- }
- key_created_ = 1;
- }
- }
-
- void **old_ts_storage = 0;
-
- // Get the tss_storage from thread-OS specific storage.
- if (ACE_OS::thr_getspecific (native_tss_key_,
- (void **) &old_ts_storage) == -1)
- return 0; // This should not happen!
-
- // Check to see if this is the first time in for this thread.
- // This block can also be entered after a fork () in the child process,
- // at least on Pthreads Draft 4 platforms.
- if (old_ts_storage == 0)
- {
- if (ts_created)
- *ts_created = 1u;
-
- // Use the ts_storage passed as argument, if non-zero. It is
- // possible that this has been implemented in the stack. At the
- // moment, this is unknown. The cleanup must not do nothing.
- // If ts_storage is zero, allocate (and eventually leak) the
- // storage array.
- if (ts_storage == 0)
- {
- ACE_NO_HEAP_CHECK;
-
- ACE_NEW_RETURN (ts_storage,
- void*[ACE_TSS_THREAD_KEYS_MAX],
- 0);
-
- // Zero the entire TSS array. Do it manually instead of
- // using memset, for optimum speed. Though, memset may be
- // faster :-)
- void **tss_base_p = ts_storage;
-
- for (u_int i = 0;
- i < ACE_TSS_THREAD_KEYS_MAX;
- ++i)
- *tss_base_p++ = 0;
- }
-
- // Store the pointer in thread-specific storage. It gets
- // deleted via the ACE_TSS_Emulation_cleanup function when the
- // thread terminates.
- if (ACE_OS::thr_setspecific (native_tss_key_,
- (void *) ts_storage) != 0)
- return 0; // Major problems, this should *never* happen!
- }
- else
- if (ts_created)
- ts_created = 0;
-
- return ts_storage ? ts_storage : old_ts_storage;
-}
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
-
-u_int
-ACE_TSS_Emulation::total_keys ()
-{
- ACE_OS_Recursive_Thread_Mutex_Guard (
- *ACE_static_cast (ACE_recursive_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[
- ACE_OS_Object_Manager::ACE_TSS_KEY_LOCK]));
-
- return total_keys_;
-}
-
-int
-ACE_TSS_Emulation::next_key (ACE_thread_key_t &key)
-{
- ACE_OS_Recursive_Thread_Mutex_Guard (
- *ACE_static_cast (ACE_recursive_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[
- ACE_OS_Object_Manager::ACE_TSS_KEY_LOCK]));
-
- if (total_keys_ < ACE_TSS_THREAD_KEYS_MAX)
- {
-# if defined (ACE_HAS_NONSCALAR_THREAD_KEY_T)
- ACE_OS::memset (&key, 0, sizeof (ACE_thread_key_t));
- ACE_OS::memcpy (&key, &total_keys_, sizeof (u_int));
-# else
- key = total_keys_;
-# endif /* ACE_HAS_NONSCALAR_THREAD_KEY_T */
-
- ++total_keys_;
- return 0;
- }
- else
- {
- key = ACE_OS::NULL_key;
- return -1;
- }
-}
-
-void *
-ACE_TSS_Emulation::tss_open (void *ts_storage[ACE_TSS_THREAD_KEYS_MAX])
-{
-# if defined (ACE_PSOS)
- u_long tss_base;
-
- // Use the supplied array for this thread's TSS.
- tss_base = (u_long) ts_storage;
- t_setreg (0, PSOS_TASK_REG_TSS, tss_base);
-
- // Zero the entire TSS array.
- void **tss_base_p = ts_storage;
- for (u_int i = 0; i < ACE_TSS_THREAD_KEYS_MAX; ++i, ++tss_base_p)
- {
- *tss_base_p = 0;
- }
-
- return (void *) tss_base;
-# else /* ! ACE_PSOS */
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- // On VxWorks, in particular, don't check to see if the field
- // is 0. It isn't always, specifically, when a program is run
- // directly by the shell (without spawning a new task) after
- // another program has been run.
-
- u_int ts_created = 0;
- tss_base (ts_storage, &ts_created);
- if (ts_created)
- {
-# else /* ! ACE_HAS_THREAD_SPECIFIC_STORAGE */
- tss_base () = ts_storage;
-# endif
-
- // Zero the entire TSS array. Do it manually instead of using
- // memset, for optimum speed. Though, memset may be faster :-)
- void **tss_base_p = tss_base ();
- for (u_int i = 0; i < ACE_TSS_THREAD_KEYS_MAX; ++i, ++tss_base_p)
- {
- *tss_base_p = 0;
- }
-
- return tss_base ();
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- }
- else
- {
- return 0;
- }
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
-# endif /* ! ACE_PSOS */
-}
-
-void
-ACE_TSS_Emulation::tss_close ()
-{
-#if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- // Free native_tss_key_ here.
-#endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
-}
-
-# endif /* ACE_HAS_TSS_EMULATION */
-
-#endif /* WIN32 || ACE_HAS_TSS_EMULATION */
-
-void
-ACE_OS::cleanup_tss (const u_int main_thread)
-{
-#if defined (ACE_HAS_TSS_EMULATION) || defined (ACE_WIN32) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS))
- // Call TSS destructors for current thread.
- ACE_TSS_Cleanup::instance ()->exit (0);
-#endif /* ACE_HAS_TSS_EMULATION || ACE_WIN32 || ACE_PSOS_HAS_TSS */
-
- if (main_thread)
- {
-#if !defined (ACE_HAS_TSS_EMULATION) && !defined (ACE_HAS_MINIMAL_ACE_OS)
- // Just close the ACE_Log_Msg for the current (which should be
- // main) thread. We don't have TSS emulation; if there's native
- // TSS, it should call its destructors when the main thread
- // exits.
- ACE_Log_Msg::close ();
-#endif /* ! ACE_HAS_TSS_EMULATION && ! ACE_HAS_MINIMAL_ACE_OS */
-
-#if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS))
-#if ! defined (ACE_HAS_TSS_EMULATION)
- // Don't do this with TSS_Emulation, because the the
- // ACE_TSS_Cleanup::instance () has already exited (). We can't
- // safely access the TSS values that were created by the main
- // thread.
-
- // Remove all TSS_Info table entries.
- ACE_TSS_Cleanup::instance ()->free_all_keys_left ();
-#endif /* ! ACE_HAS_TSS_EMULATION */
-
- // Finally, free up the ACE_TSS_Cleanup instance. This method gets
- // called by the ACE_Object_Manager.
- delete ACE_TSS_Cleanup::instance ();
-#endif /* WIN32 || ACE_HAS_TSS_EMULATION || ACE_PSOS_HAS_TSS */
-
-#if defined (ACE_HAS_TSS_EMULATION)
- ACE_TSS_Emulation::tss_close ();
-#endif /* ACE_HAS_TSS_EMULATION */
- }
-}
-
-void
-ACE_Thread_Adapter::inherit_log_msg (void)
-{
-#if !defined (ACE_THREADS_DONT_INHERIT_LOG_MSG) && \
- !defined (ACE_HAS_MINIMAL_ACE_OS)
- // Inherit the logging features if the parent thread has an
- // <ACE_Log_Msg>. Note that all of the following operations occur
- // within thread-specific storage.
- ACE_Log_Msg *new_log = ACE_LOG_MSG;
-
- // Note that we do not inherit the callback because this might have
- // been allocated off of the stack of the original thread, in which
- // case all hell would break loose...
-
- if (this->ostream_)
- {
- new_log->msg_ostream (this->ostream_);
- new_log->priority_mask (this->priority_mask_);
-
- if (this->tracing_enabled_)
- new_log->start_tracing ();
-
- new_log->restart (this->restart_);
- new_log->trace_depth (this->trace_depth_);
- }
-
-# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- new_log->seh_except_selector (this->seh_except_selector_);
- new_log->seh_except_handler (this->seh_except_handler_);
-# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
- // @@ Now the TSS Log_Msg has been created, cache my thread
- // descriptor in.
-
- if (this->thr_desc_ != 0)
- // This downcast is safe. We do it to avoid having to #include
- // ace/Thread_Manager.h.
- ACE_LOG_MSG->thr_desc (ACE_reinterpret_cast (ACE_Thread_Descriptor *,
- this->thr_desc_));
- // Block the thread from proceeding until
- // thread manager has thread descriptor ready.
-
-# else /* Don't inherit Log Msg */
-# if defined (ACE_PSOS)
- //Create a special name for each thread...
- char new_name[MAXPATHLEN]={"Ace_thread-"};
- char new_id[2]={0,0}; //Now it's pre-terminated!
-
- new_id[0] = '0' + (unique_file_id++); //Unique identifier
- ACE_OS::strcat(new_name, new_id);
-
- //Initialize the task specific logger
- ACE_LOG_MSG->open(new_name);
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) starting %s thread at %D\n"),new_name));
-# endif /* ACE_PSOS */
-#endif /* ! ACE_THREADS_DONT_INHERIT_LOG_MSG && ! ACE_HAS_MINIMAL_ACE_OS */
-}
-
-#if defined (__IBMCPP__) && (__IBMCPP__ >= 400)
-#define ACE_ENDTHREADEX(STATUS) ::_endthreadex ()
-#define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \
- (*THR_ID = ::_beginthreadex ((void(_Optlink*)(void*))ENTRY_POINT, STACK, STACKSIZE, ARGS), *THR_ID)
-#elif defined (ACE_HAS_WINCE) && defined (UNDER_CE) && (UNDER_CE >= 211)
-#define ACE_ENDTHREADEX(STATUS) ExitThread ((DWORD) STATUS)
-#define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \
- CreateThread (NULL, STACKSIZE, (unsigned long (__stdcall *) (void *)) ENTRY_POINT, ARGS, (FLAGS) & CREATE_SUSPENDED, (unsigned long *) THR_ID)
-#else
-#define ACE_ENDTHREADEX(STATUS) ::_endthreadex ((DWORD) STATUS)
-#define ACE_BEGINTHREADEX(STACK, STACKSIZE, ENTRY_POINT, ARGS, FLAGS, THR_ID) \
- ::_beginthreadex (STACK, STACKSIZE, (unsigned (__stdcall *) (void *)) ENTRY_POINT, ARGS, FLAGS, (unsigned int *) THR_ID)
-#endif /* defined (__IBMCPP__) && (__IBMCPP__ >= 400) */
-
-void *
-ACE_Thread_Hook::start (ACE_THR_FUNC func,
- void *arg)
-{
- return (func) (arg);
-}
-
-ACE_Thread_Hook *
-ACE_Thread_Hook::thread_hook (ACE_Thread_Hook *hook)
-{
- return ACE_OS_Object_Manager::thread_hook (hook);
-}
-
-ACE_Thread_Hook *
-ACE_Thread_Hook::thread_hook (void)
-{
- return ACE_OS_Object_Manager::thread_hook ();
-}
-
-void *
-ACE_Thread_Adapter::invoke (void)
-{
- // Inherit the logging features if the parent thread has an
- // ACE_Log_Msg instance in thread-specific storage.
- this->inherit_log_msg ();
-
-#if !defined(ACE_USE_THREAD_MANAGER_ADAPTER)
- // NOTE: this preprocessor directive should match the one in
- // above ACE_Thread_Exit::instance (). With the Xavier Pthreads
- // package, the exit_hook in TSS causes a seg fault. So, this
- // works around that by creating exit_hook on the stack.
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)
- // Obtain our thread-specific exit hook and make sure that it
- // knows how to clean us up! Note that we never use this
- // pointer directly (it's stored in thread-specific storage), so
- // it's ok to dereference it here and only store it as a
- // reference.
- if (this->thr_mgr () != 0)
- {
- ACE_Thread_Exit &exit_hook = *ACE_Thread_Exit::instance ();
- // Keep track of the <Thread_Manager> that's associated with this
- // <exit_hook>.
- exit_hook.thr_mgr (this->thr_mgr ());
- }
-# else
- // Without TSS, create an <ACE_Thread_Exit> instance. When this
- // function returns, its destructor will be called because the
- // object goes out of scope. The drawback with this appraoch is
- // that the destructor _won't_ get called if <thr_exit> is
- // called. So, threads shouldn't exit that way. Instead, they
- // should return from <svc>.
- ACE_Thread_Exit exit_hook;
- exit_hook.thr_mgr (this->thr_mgr ());
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */
-
-#endif /* ! ACE_USE_THREAD_MANAGER_ADAPTER */
-
- // Extract the arguments.
- ACE_THR_FUNC_INTERNAL func = ACE_reinterpret_cast (ACE_THR_FUNC_INTERNAL,
- this->user_func_);
- void *arg = this->arg_;
-
-#if defined (ACE_WIN32) && defined (ACE_HAS_MFC) && (ACE_HAS_MFC != 0)
- ACE_OS_Thread_Descriptor *thr_desc = this->thr_desc_;
-#endif /* ACE_WIN32 && ACE_HAS_MFC && (ACE_HAS_MFC != 0) */
-
- // Delete ourselves since we don't need <this> anymore. Make sure
- // not to access <this> anywhere below this point.
- delete this;
-
-#if defined (ACE_NEEDS_LWP_PRIO_SET)
- // On SunOS, the LWP priority needs to be set in order to get
- // preemption when running in the RT class. This is the ACE way to
- // do that . . .
- ACE_hthread_t thr_handle;
- ACE_OS::thr_self (thr_handle);
- int prio;
-
- // thr_getprio () on the current thread should never fail.
- ACE_OS::thr_getprio (thr_handle, prio);
-
- // ACE_OS::thr_setprio () has the special logic to set the LWP priority,
- // if running in the RT class.
- ACE_OS::thr_setprio (prio);
-
-#endif /* ACE_NEEDS_LWP_PRIO_SET */
-
- void *status = 0;
-
- ACE_SEH_TRY
- {
- ACE_SEH_TRY
- {
- ACE_Thread_Hook *hook =
- ACE_OS_Object_Manager::thread_hook ();
-
- if (hook)
- // Invoke the start hook to give the user a chance to
- // perform some initialization processing before the
- // <func> is invoked.
- status = hook->start (ACE_reinterpret_cast (ACE_THR_FUNC, func),
- arg);
- else
- {
- // Call thread entry point.
-#if defined (ACE_PSOS)
- (*func) (arg);
-#else /* ! ACE_PSOS */
- status = ACE_reinterpret_cast (void *, (*func) (arg));
-#endif /* ACE_PSOS */
- }
-#if defined (ACE_PSOS)
- // pSOS task functions do not return a value.
- status = 0;
-#endif /* ACE_PSOS */
- }
-
-#if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- ACE_SEH_EXCEPT (ACE_LOG_MSG->seh_except_selector ()(
- (void *) GetExceptionInformation ()))
- {
- ACE_LOG_MSG->seh_except_handler ()(0);
- }
-#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
- }
-
- ACE_SEH_FINALLY
- {
- // If we changed this to 1, change the respective if in
- // Task::svc_run to 0.
-#if 0
- // Call the <Task->close> hook.
- if (func == ACE_reinterpret_cast (ACE_THR_FUNC_INTERNAL,
- ACE_Task_Base::svc_run))
- {
- ACE_Task_Base *task_ptr = (ACE_Task_Base *) arg;
- ACE_Thread_Manager *thr_mgr_ptr = task_ptr->thr_mgr ();
-
- // This calls the Task->close () hook.
- task_ptr->cleanup (task_ptr, 0);
-
- // This prevents a second invocation of the cleanup code
- // (called later by <ACE_Thread_Manager::exit>.
- thr_mgr_ptr->at_exit (task_ptr, 0, 0);
- }
-#endif /* 0 */
-
-#if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION)
-# if defined (ACE_WIN32) && defined (ACE_HAS_MFC) && (ACE_HAS_MFC != 0)
- int using_afx = -1;
- if (thr_desc)
- using_afx = ACE_BIT_ENABLED (thr_desc->flags (), THR_USE_AFX);
-# endif /* ACE_WIN32 && ACE_HAS_MFC && (ACE_HAS_MFC != 0) */
- // Call TSS destructors.
- ACE_OS::cleanup_tss (0 /* not main thread */);
-
-# if defined (ACE_WIN32)
- // Exit the thread. Allow CWinThread-destructor to be invoked
- // from AfxEndThread. _endthreadex will be called from
- // AfxEndThread so don't exit the thread now if we are running
- // an MFC thread.
-# if defined (ACE_HAS_MFC) && (ACE_HAS_MFC != 0)
- if (using_afx != -1)
- {
- if (using_afx)
- ::AfxEndThread ((DWORD) status);
- else
- ACE_ENDTHREADEX (status);
- }
- else
- {
- // Not spawned by ACE_Thread_Manager, use the old buggy
- // version. You should seriously consider using
- // ACE_Thread_Manager to spawn threads. The following code
- // is know to cause some problem.
- CWinThread *pThread = ::AfxGetThread ();
-
- if (!pThread || pThread->m_nThreadID != ACE_OS::thr_self ())
- ACE_ENDTHREADEX (status);
- else
- ::AfxEndThread ((DWORD)status);
- }
-# else
-
- ACE_ENDTHREADEX (status);
-# endif /* ACE_HAS_MFC && ACE_HAS_MFS != 0*/
-# endif /* ACE_WIN32 */
-#endif /* ACE_WIN32 || ACE_HAS_TSS_EMULATION */
-
- return status;
- }
-
- ACE_NOTREACHED (return status);
-}
-
-#if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
-int ACE_SEH_Default_Exception_Selector (void *)
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%t) Win32 structured exception exiting thread\n")));
- return (DWORD) ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION;
-}
-
-int ACE_SEH_Default_Exception_Handler (void *)
-{
- return 0;
-}
-#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
-extern "C" void
-ace_cleanup_destroyer (ACE_Cleanup *object, void *param)
-{
- object->cleanup (param);
-}
-
-// Run the thread entry point for the <ACE_Thread_Adapter>. This must
-// be an extern "C" to make certain compilers happy...
-
-#if defined (ACE_PSOS)
-extern "C" void ace_thread_adapter (unsigned long args)
-#else /* ! defined (ACE_PSOS) */
-extern "C" void *
-ace_thread_adapter (void *args)
-#endif /* ACE_PSOS */
-{
- ACE_TRACE ("ace_thread_adapter");
-
-#if defined (ACE_HAS_TSS_EMULATION)
- // As early as we can in the execution of the new thread, allocate
- // its local TS storage. Allocate it on the stack, to save dynamic
- // allocation/dealloction.
- void *ts_storage[ACE_TSS_Emulation::ACE_TSS_THREAD_KEYS_MAX];
- ACE_TSS_Emulation::tss_open (ts_storage);
-#endif /* ACE_HAS_TSS_EMULATION */
-
- ACE_Thread_Adapter *thread_args = (ACE_Thread_Adapter *) args;
-
- // Invoke the user-supplied function with the args.
- void *status = thread_args->invoke ();
-
-#if ! defined (ACE_PSOS)
- return status;
-#endif /* ACE_PSOS */
-}
-
-
-ACE_Thread_Adapter::ACE_Thread_Adapter (ACE_THR_FUNC user_func,
- void *arg,
- ACE_THR_C_FUNC entry_point,
- ACE_Thread_Manager *tm,
- ACE_Thread_Descriptor *td
-#if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- , ACE_SEH_EXCEPT_HANDLER selector,
- ACE_SEH_EXCEPT_HANDLER handler
-#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
- )
- : user_func_ (user_func),
- arg_ (arg),
- entry_point_ (entry_point),
- thr_mgr_ (tm),
- // An ACE_Thread_Descriptor really is an ACE_OS_Thread_Descriptor.
- // But without #including ace/Thread_Manager.h, we don't know that.
- thr_desc_ (ACE_reinterpret_cast (ACE_OS_Thread_Descriptor *,td))
-#if !defined (ACE_THREADS_DONT_INHERIT_LOG_MSG)
- ,
- ostream_ (0),
- priority_mask_ (0),
- tracing_enabled_ (0),
- restart_ (1),
- trace_depth_ (0)
-# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- , seh_except_selector_ (selector),
- seh_except_handler_ (handler)
-# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-#endif /* ACE_THREADS_DONT_INHERIT_LOG_MSG */
-{
-ACE_TRACE ("Ace_Thread_Adapter::Ace_Thread_Adapter");
-#if !defined (ACE_THREADS_DONT_INHERIT_LOG_MSG) && \
- !defined (ACE_HAS_MINIMAL_ACE_OS)
- if (ACE_Log_Msg::exists ())
- {
- ACE_Log_Msg *inherit_log_ = ACE_LOG_MSG;
- this->ostream_ = inherit_log_->msg_ostream ();
- this->priority_mask_ = inherit_log_->priority_mask ();
- this->tracing_enabled_ = inherit_log_->tracing_enabled ();
- this->restart_ = inherit_log_->restart ();
- this->trace_depth_ = inherit_log_->trace_depth ();
-# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- this->seh_except_selector_ = selector;
- this->seh_except_handler_ = handler;
-# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
- }
-#endif /* ! ACE_THREADS_DONT_INHERIT_LOG_MSG && ! ACE_HAS_MINIMAL_ACE_OS */
-}
-
-int
-ACE_OS::thr_create (ACE_THR_FUNC func,
- void *args,
- long flags,
- ACE_thread_t *thr_id,
- ACE_hthread_t *thr_handle,
- long priority,
- void *stack,
- size_t stacksize,
- ACE_Thread_Adapter *thread_adapter)
-{
- ACE_TRACE ("ACE_OS::thr_create");
-
- if (ACE_BIT_DISABLED (flags, THR_DETACHED) &&
- ACE_BIT_DISABLED (flags, THR_JOINABLE))
- ACE_SET_BITS (flags, THR_JOINABLE);
-
-# if defined (ACE_NO_THREAD_ADAPTER)
-# define ACE_THREAD_FUNCTION func
-# define ACE_THREAD_ARGUMENT args
-# else /* ! defined (ACE_NO_THREAD_ADAPTER) */
-# if defined (ACE_PSOS)
-# define ACE_THREAD_FUNCTION (PSOS_TASK_ENTRY_POINT) thread_args->entry_point ()
-# else
-# define ACE_THREAD_FUNCTION thread_args->entry_point ()
-# endif /* defined (ACE_PSOS) */
-# define ACE_THREAD_ARGUMENT thread_args
-# endif /* ! defined (ACE_NO_THREAD_ADAPTER) */
-
- ACE_Thread_Adapter *thread_args;
- if (thread_adapter == 0)
-# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- ACE_NEW_RETURN (thread_args,
- ACE_Thread_Adapter (func, args,
- (ACE_THR_C_FUNC) ace_thread_adapter,
- 0,
- 0,
- ACE_LOG_MSG->seh_except_selector(),
- ACE_LOG_MSG->seh_except_handler()),
- -1);
-# else
- ACE_NEW_RETURN (thread_args,
- ACE_Thread_Adapter (func, args,
- (ACE_THR_C_FUNC) ace_thread_adapter),
- -1);
-
-# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
- else
- thread_args = thread_adapter;
-
-# if defined (ACE_HAS_THREADS)
-
- // *** Set Stack Size
-# if defined (ACE_NEEDS_HUGE_THREAD_STACKSIZE)
- if (stacksize < ACE_NEEDS_HUGE_THREAD_STACKSIZE)
- stacksize = ACE_NEEDS_HUGE_THREAD_STACKSIZE;
-# endif /* ACE_NEEDS_HUGE_THREAD_STACKSIZE */
-
-# if !defined (VXWORKS)
- // On VxWorks, the OS will provide a task name if the user doesn't.
- // So, we don't need to create a tmp_thr. If the caller of this
- // member function is the Thread_Manager, than thr_id will be non-zero
- // anyways.
- ACE_thread_t tmp_thr;
-
- if (thr_id == 0)
- thr_id = &tmp_thr;
-# endif /* ! VXWORKS */
-
- ACE_hthread_t tmp_handle;
- if (thr_handle == 0)
- thr_handle = &tmp_handle;
-
-# if defined (ACE_HAS_PTHREADS)
-
- int result;
- pthread_attr_t attr;
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- if (::pthread_attr_create (&attr) != 0)
-# else /* ACE_HAS_PTHREADS_DRAFT4 */
- if (::pthread_attr_init (&attr) != 0)
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- return -1;
-
-# if defined (CHORUS)
- // If it is a super actor, we can't set stacksize. But for the time
- // being we are all non-super actors. Should be fixed to take care
- // of super actors!!!
- if (stacksize == 0)
- stacksize = ACE_CHORUS_DEFAULT_MIN_STACK_SIZE;
- else if (stacksize < ACE_CHORUS_DEFAULT_MIN_STACK_SIZE)
- stacksize = ACE_CHORUS_DEFAULT_MIN_STACK_SIZE;
-# endif /*CHORUS */
-
- if (stacksize != 0)
- {
- size_t size = stacksize;
-
-# if defined (PTHREAD_STACK_MIN)
- if (size < ACE_static_cast (size_t, PTHREAD_STACK_MIN))
- size = PTHREAD_STACK_MIN;
-# endif /* PTHREAD_STACK_MIN */
-
-# if !defined (ACE_LACKS_THREAD_STACK_SIZE) // JCEJ 12/17/96
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- if (::pthread_attr_setstacksize (&attr, size) != 0)
-# else
- if (ACE_ADAPT_RETVAL(pthread_attr_setstacksize (&attr, size), result) == -1)
-# endif /* ACE_HAS_PTHREADS_DRAFT4, 6 */
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_attr_delete (&attr);
-# else /* ACE_HAS_PTHREADS_DRAFT4 */
- ::pthread_attr_destroy (&attr);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- return -1;
- }
-# else
- ACE_UNUSED_ARG (size);
-# endif /* !ACE_LACKS_THREAD_STACK_SIZE */
- }
-
- // *** Set Stack Address
-# if !defined (ACE_LACKS_THREAD_STACK_ADDR)
- if (stack != 0)
- {
- if (::pthread_attr_setstackaddr (&attr, stack) != 0)
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_attr_delete (&attr);
-# else /* ACE_HAS_PTHREADS_DRAFT4 */
- ::pthread_attr_destroy (&attr);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- return -1;
- }
- }
-# else
- ACE_UNUSED_ARG (stack);
-# endif /* !ACE_LACKS_THREAD_STACK_ADDR */
-
- // *** Deal with various attributes
- if (flags != 0)
- {
- // *** Set Detach state
-# if !defined (ACE_LACKS_SETDETACH)
- if (ACE_BIT_ENABLED (flags, THR_DETACHED)
- || ACE_BIT_ENABLED (flags, THR_JOINABLE))
- {
- int dstate = PTHREAD_CREATE_JOINABLE;
-
- if (ACE_BIT_ENABLED (flags, THR_DETACHED))
- dstate = PTHREAD_CREATE_DETACHED;
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- if (::pthread_attr_setdetach_np (&attr, dstate) != 0)
-# else /* ACE_HAS_PTHREADS_DRAFT4 */
-# if defined (ACE_HAS_PTHREADS_DRAFT6)
- if (::pthread_attr_setdetachstate (&attr, &dstate) != 0)
-# else
- if (ACE_ADAPT_RETVAL(::pthread_attr_setdetachstate (&attr, dstate),
- result) != 0)
-# endif /* ACE_HAS_PTHREADS_DRAFT6 */
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_attr_delete (&attr);
-# else /* ACE_HAS_PTHREADS_DRAFT4 */
- ::pthread_attr_destroy (&attr);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- return -1;
- }
- }
-
- // Note: if ACE_LACKS_SETDETACH and THR_DETACHED is enabled, we
- // call ::pthread_detach () below. If THR_DETACHED is not
- // enabled, we call ::pthread_detach () in the Thread_Manager,
- // after joining with the thread.
-# endif /* ACE_LACKS_SETDETACH */
-
- // *** Set Policy
-# if !defined (ACE_LACKS_SETSCHED)
- // If we wish to set the priority explicitly, we have to enable
- // explicit scheduling, and a policy, too.
- if (priority != ACE_DEFAULT_THREAD_PRIORITY)
- {
- ACE_SET_BITS (flags, THR_EXPLICIT_SCHED);
- if (ACE_BIT_DISABLED (flags, THR_SCHED_FIFO)
- && ACE_BIT_DISABLED (flags, THR_SCHED_RR)
- && ACE_BIT_DISABLED (flags, THR_SCHED_DEFAULT))
- ACE_SET_BITS (flags, THR_SCHED_DEFAULT);
- }
-
- if (ACE_BIT_ENABLED (flags, THR_SCHED_FIFO)
- || ACE_BIT_ENABLED (flags, THR_SCHED_RR)
- || ACE_BIT_ENABLED (flags, THR_SCHED_DEFAULT))
- {
- int spolicy;
-
-# if defined (ACE_HAS_ONLY_SCHED_OTHER)
- // SunOS, thru version 5.6, only supports SCHED_OTHER.
- spolicy = SCHED_OTHER;
-# else
- // Make sure to enable explicit scheduling, in case we didn't
- // enable it above (for non-default priority).
- ACE_SET_BITS (flags, THR_EXPLICIT_SCHED);
-
- if (ACE_BIT_ENABLED (flags, THR_SCHED_DEFAULT))
- spolicy = SCHED_OTHER;
- else if (ACE_BIT_ENABLED (flags, THR_SCHED_FIFO))
- spolicy = SCHED_FIFO;
-# if defined (SCHED_IO)
- else if (ACE_BIT_ENABLED (flags, THR_SCHED_IO))
- spolicy = SCHED_IO;
-# else
- else if (ACE_BIT_ENABLED (flags, THR_SCHED_IO))
- {
- errno = ENOSYS;
- return -1;
- }
-# endif /* SCHED_IO */
- else
- spolicy = SCHED_RR;
-
-# if defined (ACE_HAS_FSU_PTHREADS)
- int ret;
- switch (spolicy)
- {
- case SCHED_FIFO:
- case SCHED_RR:
- ret = 0;
- break;
- default:
- ret = 22;
- break;
- }
- if (ret != 0)
- {
- ::pthread_attr_destroy (&attr);
- return -1;
- }
-# endif /* ACE_HAS_FSU_PTHREADS */
-
-# endif /* ACE_HAS_ONLY_SCHED_OTHER */
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- result = ::pthread_attr_setsched (&attr, spolicy);
-# elif defined (ACE_HAS_PTHREADS_DRAFT6)
- result = ::pthread_attr_setschedpolicy (&attr, spolicy);
-# else /* draft 7 or std */
- ACE_ADAPT_RETVAL(::pthread_attr_setschedpolicy (&attr, spolicy),
- result);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- if (result != 0)
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_attr_delete (&attr);
-# else /* ACE_HAS_PTHREADS_DRAFT4 */
- ::pthread_attr_destroy (&attr);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- return -1;
- }
- }
-
- // *** Set Priority (use reasonable default priorities)
-# if defined(ACE_HAS_PTHREADS_STD)
- // If we wish to explicitly set a scheduling policy, we also
- // have to specify a priority. We choose a "middle" priority as
- // default. Maybe this is also necessary on other POSIX'ish
- // implementations?
- if ((ACE_BIT_ENABLED (flags, THR_SCHED_FIFO)
- || ACE_BIT_ENABLED (flags, THR_SCHED_RR)
- || ACE_BIT_ENABLED (flags, THR_SCHED_DEFAULT))
- && priority == ACE_DEFAULT_THREAD_PRIORITY)
- {
- if (ACE_BIT_ENABLED (flags, THR_SCHED_FIFO))
- priority = ACE_THR_PRI_FIFO_DEF;
- else if (ACE_BIT_ENABLED (flags, THR_SCHED_RR))
- priority = ACE_THR_PRI_RR_DEF;
- else // THR_SCHED_DEFAULT
- priority = ACE_THR_PRI_OTHER_DEF;
- }
-# endif /* ACE_HAS_PTHREADS_STD */
- if (priority != ACE_DEFAULT_THREAD_PRIORITY)
- {
- struct sched_param sparam;
- ACE_OS::memset ((void *) &sparam, 0, sizeof sparam);
-
-# if defined (ACE_HAS_IRIX62_THREADS)
- sparam.sched_priority = ACE_MIN (priority,
- (long) PTHREAD_MAX_PRIORITY);
-# elif defined (PTHREAD_MAX_PRIORITY) && !defined(ACE_HAS_PTHREADS_STD)
- /* For MIT pthreads... */
- sparam.prio = ACE_MIN (priority, PTHREAD_MAX_PRIORITY);
-# elif defined(ACE_HAS_PTHREADS_STD) && !defined (ACE_HAS_STHREADS)
- // The following code forces priority into range.
- if (ACE_BIT_ENABLED (flags, THR_SCHED_FIFO))
- sparam.sched_priority =
- ACE_MIN (ACE_THR_PRI_FIFO_MAX,
- ACE_MAX (ACE_THR_PRI_FIFO_MIN, priority));
- else if (ACE_BIT_ENABLED(flags, THR_SCHED_RR))
- sparam.sched_priority =
- ACE_MIN (ACE_THR_PRI_RR_MAX,
- ACE_MAX (ACE_THR_PRI_RR_MIN, priority));
- else // Default policy, whether set or not
- sparam.sched_priority =
- ACE_MIN (ACE_THR_PRI_OTHER_MAX,
- ACE_MAX (ACE_THR_PRI_OTHER_MIN, priority));
-# elif defined (PRIORITY_MAX)
- sparam.sched_priority = ACE_MIN (priority,
- (long) PRIORITY_MAX);
-# else
- sparam.sched_priority = priority;
-# endif /* ACE_HAS_IRIX62_THREADS */
-
-# if defined (ACE_HAS_FSU_PTHREADS)
- if (sparam.sched_priority >= PTHREAD_MIN_PRIORITY
- && sparam.sched_priority <= PTHREAD_MAX_PRIORITY)
- attr.prio = sparam.sched_priority;
- else
- {
- pthread_attr_destroy (&attr);
- errno = EINVAL;
- return -1;
- }
-# else
- {
-# if defined (sun) && defined (ACE_HAS_ONLY_SCHED_OTHER)
- // SunOS, through 5.6, POSIX only allows priorities > 0 to
- // ::pthread_attr_setschedparam. If a priority of 0 was
- // requested, set the thread priority after creating it, below.
- if (priority > 0)
-# endif /* sun && ACE_HAS_ONLY_SCHED_OTHER */
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- result = ::pthread_attr_setprio (&attr,
- sparam.sched_priority);
-# else /* this is draft 7 or std */
- ACE_ADAPT_RETVAL(::pthread_attr_setschedparam (&attr, &sparam),
- result);
-# endif /* ACE_HAS_PTHREADS_DRAFT4, 6 */
- if (result != 0)
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_attr_delete (&attr);
-# else /* ACE_HAS_PTHREADS_DRAFT4 */
- ::pthread_attr_destroy (&attr);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- return -1;
- }
- }
- }
-# endif /* ACE_HAS_FSU_PTHREADS */
- }
-
- // *** Set scheduling explicit or inherited
- if (ACE_BIT_ENABLED (flags, THR_INHERIT_SCHED)
- || ACE_BIT_ENABLED (flags, THR_EXPLICIT_SCHED))
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- int sched = PTHREAD_DEFAULT_SCHED;
-# else /* ACE_HAS_PTHREADS_DRAFT4 */
- int sched = PTHREAD_EXPLICIT_SCHED;
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- if (ACE_BIT_ENABLED (flags, THR_INHERIT_SCHED))
- sched = PTHREAD_INHERIT_SCHED;
- if (::pthread_attr_setinheritsched (&attr, sched) != 0)
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_attr_delete (&attr);
-# else /* ACE_HAS_PTHREADS_DRAFT4 */
- ::pthread_attr_destroy (&attr);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- return -1;
- }
- }
-# else /* ACE_LACKS_SETSCHED */
- ACE_UNUSED_ARG (priority);
-# endif /* ACE_LACKS_SETSCHED */
-
- // *** Set Scope
-# if !defined (ACE_LACKS_THREAD_PROCESS_SCOPING)
- if (ACE_BIT_ENABLED (flags, THR_SCOPE_SYSTEM)
- || ACE_BIT_ENABLED (flags, THR_SCOPE_PROCESS))
- {
- int scope = PTHREAD_SCOPE_PROCESS;
- if (ACE_BIT_ENABLED (flags, THR_SCOPE_SYSTEM))
- scope = PTHREAD_SCOPE_SYSTEM;
-
- if (::pthread_attr_setscope (&attr, scope) != 0)
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_attr_delete (&attr);
-# else /* ACE_HAS_PTHREADS_DRAFT4 */
- ::pthread_attr_destroy (&attr);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- return -1;
- }
- }
-# endif /* !ACE_LACKS_THREAD_PROCESS_SCOPING */
-
- if (ACE_BIT_ENABLED (flags, THR_NEW_LWP))
- {
- // Increment the number of LWPs by one to emulate the
- // SunOS semantics.
- int lwps = ACE_OS::thr_getconcurrency ();
- if (lwps == -1)
- {
- if (errno == ENOTSUP)
- {
- // Suppress the ENOTSUP because it's harmless.
- errno = 0;
- }
- else
- {
- // This should never happen on SunOS:
- // ::thr_getconcurrency () should always succeed.
- return -1;
- }
- }
- else
- {
- if (ACE_OS::thr_setconcurrency (lwps + 1) == -1)
- {
- if (errno == ENOTSUP)
- {
- // Unlikely: ::thr_getconcurrency () is supported but
- // ::thr_setconcurrency () is not?
- }
- else
- {
- return -1;
- }
- }
- }
- }
- }
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ACE_OSCALL (::pthread_create (thr_id, attr,
- thread_args->entry_point (),
- thread_args),
- int, -1, result);
-
-# if defined (ACE_LACKS_SETDETACH)
- if (ACE_BIT_ENABLED (flags, THR_DETACHED))
- {
-# if defined (HPUX_10)
- // HP-UX DCE threads' pthread_detach will smash thr_id if it's
- // just given as an argument. This will cause ACE_Thread_Manager
- // (if it's doing this create) to lose track of the new thread
- // since the ID will be passed back equal to 0. So give
- // pthread_detach a junker to scribble on.
- ACE_thread_t junker;
- cma_handle_assign(thr_id, &junker);
- ::pthread_detach (&junker);
-# else
- ::pthread_detach (thr_id);
-# endif /* HPUX_10 */
- }
-# endif /* ACE_LACKS_SETDETACH */
-
- ::pthread_attr_delete (&attr);
-
-# elif defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_OSCALL (::pthread_create (thr_id, &attr,
- thread_args->entry_point (),
- thread_args),
- int, -1, result);
- ::pthread_attr_destroy (&attr);
-
-# else /* this is draft 7 or std */
- ACE_OSCALL (ACE_ADAPT_RETVAL (::pthread_create (thr_id,
- &attr,
- thread_args->entry_point (),
- thread_args),
- result),
- int, -1, result);
- ::pthread_attr_destroy (&attr);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-
- // This is a SunOS or POSIX implementation of pthreads,
- // where we assume that ACE_thread_t and ACE_hthread_t are the same.
- // If this *isn't* correct on some platform, please let us know.
- if (result != -1)
- *thr_handle = *thr_id;
-
-# if defined (sun) && defined (ACE_HAS_ONLY_SCHED_OTHER)
- // SunOS prior to 5.7:
-
- // If the priority is 0, then we might have to set it now
- // because we couldn't set it with
- // ::pthread_attr_setschedparam, as noted above. This doesn't
- // provide strictly correct behavior, because the thread was
- // created (above) with the priority of its parent. (That
- // applies regardless of the inherit_sched attribute: if it
- // was PTHREAD_INHERIT_SCHED, then it certainly inherited its
- // parent's priority. If it was PTHREAD_EXPLICIT_SCHED, then
- // "attr" was initialized by the SunOS ::pthread_attr_init
- // () to contain NULL for the priority, which indicated to
- // SunOS ::pthread_create () to inherit the parent
- // priority.)
- if (priority == 0)
- {
- // Check the priority of this thread, which is the parent
- // of the newly created thread. If it is 0, then the
- // newly created thread will have inherited the priority
- // of 0, so there's no need to explicitly set it.
- struct sched_param sparam;
- int policy = 0;
- ACE_OSCALL (ACE_ADAPT_RETVAL (::pthread_getschedparam (thr_self (),
- &policy,
- &sparam),
- result), int,
- -1, result);
-
- // The only policy supported by by SunOS, thru version 5.6,
- // is SCHED_OTHER, so that's hard-coded here.
- policy = ACE_SCHED_OTHER;
-
- if (sparam.sched_priority != 0)
- {
- ACE_OS::memset ((void *) &sparam, 0, sizeof sparam);
- // The memset to 0 sets the priority to 0, so we don't need
- // to explicitly set sparam.sched_priority.
-
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setschedparam (
- *thr_id,
- policy,
- &sparam),
- result),
- int, -1);
- }
- }
-
-# if defined (ACE_NEEDS_LWP_PRIO_SET)
-# if 0
- // It would be useful if we could make this work. But, it
- // requires a mechanism for determining the ID of an LWP
- // to which another thread is bound. Is there a way to do
- // that? Instead, just rely on the code in
- // ACE_Thread_Adapter::invoke () to set the LWP priority.
-
- // If the thread is bound, then set the priority on its LWP.
- if (ACE_BIT_ENABLED (flags, THR_BOUND))
- {
- ACE_Sched_Params sched_params (
- ACE_BIT_ENABLED (flags, THR_SCHED_FIFO) ||
- ACE_BIT_ENABLED (flags, THR_SCHED_RR) ?
- ACE_SCHED_FIFO :
- ACE_SCHED_OTHER,
- priority);
- result = ACE_OS::lwp_setparams (sched_params,
- /* ? How do we find the ID of the LWP
- to which *thr_id is bound? */);
- }
-# endif /* 0 */
-# endif /* ACE_NEEDS_LWP_PRIO_SET */
-
-# endif /* sun && ACE_HAS_ONLY_SCHED_OTHER */
- return result;
-# elif defined (ACE_HAS_STHREADS)
- int result;
- int start_suspended = ACE_BIT_ENABLED (flags, THR_SUSPENDED);
-
- if (priority != ACE_DEFAULT_THREAD_PRIORITY)
- // If we need to set the priority, then we need to start the
- // thread in a suspended mode.
- ACE_SET_BITS (flags, THR_SUSPENDED);
-
- ACE_OSCALL (ACE_ADAPT_RETVAL (::thr_create (stack, stacksize,
- thread_args->entry_point (),
- thread_args,
- flags, thr_id), result),
- int, -1, result);
-
- if (result != -1)
- {
- // With SunOS threads, ACE_thread_t and ACE_hthread_t are the same.
- *thr_handle = *thr_id;
-
- if (priority != ACE_DEFAULT_THREAD_PRIORITY)
- {
- // Set the priority of the new thread and then let it
- // continue, but only if the user didn't start it suspended
- // in the first place!
- if ((result = ACE_OS::thr_setprio (*thr_id, priority)) != 0)
- {
- errno = result;
- return -1;
- }
-
- if (start_suspended == 0)
- {
- if ((result = ACE_OS::thr_continue (*thr_id)) != 0)
- {
- errno = result;
- return -1;
- }
- }
- }
- }
- return result;
-# elif defined (ACE_HAS_WTHREADS)
- ACE_UNUSED_ARG (stack);
-# if defined (ACE_HAS_MFC) && (ACE_HAS_MFC != 0)
- if (ACE_BIT_ENABLED (flags, THR_USE_AFX))
- {
- CWinThread *cwin_thread =
- ::AfxBeginThread ((AFX_THREADPROC) thread_args->entry_point (),
- thread_args,
- priority,
- 0,
- flags | THR_SUSPENDED);
- // Have to duplicate the handle because
- // CWinThread::~CWinThread() closes the original handle.
-# if !defined (ACE_HAS_WINCE)
- (void) ::DuplicateHandle (::GetCurrentProcess (),
- cwin_thread->m_hThread,
- ::GetCurrentProcess (),
- thr_handle,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS);
-# endif /* ! ACE_HAS_WINCE */
- *thr_id = cwin_thread->m_nThreadID;
-
- if (ACE_BIT_ENABLED (flags, THR_SUSPENDED) == 0)
- cwin_thread->ResumeThread ();
- // cwin_thread will be deleted in AfxThreadExit()
- // Warning: If AfxThreadExit() is called from within the
- // thread, ACE_TSS_Cleanup->exit() never gets called !
- }
- else
-# endif /* ACE_HAS_MFC */
- {
- int start_suspended = ACE_BIT_ENABLED (flags, THR_SUSPENDED);
-
- if (priority != ACE_DEFAULT_THREAD_PRIORITY)
- // If we need to set the priority, then we need to start the
- // thread in a suspended mode.
- ACE_SET_BITS (flags, THR_SUSPENDED);
-
- *thr_handle = (void *) ACE_BEGINTHREADEX (0,
- stacksize,
- thread_args->entry_point (),
- thread_args,
- flags,
- thr_id);
-
- if (priority != ACE_DEFAULT_THREAD_PRIORITY && *thr_handle != 0)
- {
- // Set the priority of the new thread and then let it
- // continue, but only if the user didn't start it suspended
- // in the first place!
- ACE_OS::thr_setprio (*thr_handle, priority);
-
- if (start_suspended == 0)
- ACE_OS::thr_continue (*thr_handle);
- }
- }
-# if 0
- *thr_handle = ::CreateThread
- (0,
- stacksize,
- LPTHREAD_START_ROUTINE (thread_args->entry_point ()),
- thread_args,
- flags,
- thr_id);
-# endif /* 0 */
-
- // Close down the handle if no one wants to use it.
- if (thr_handle == &tmp_handle)
- ::CloseHandle (tmp_handle);
-
- if (*thr_handle != 0)
- return 0;
- else
- ACE_FAIL_RETURN (-1);
- /* NOTREACHED */
-
-# elif defined (ACE_PSOS)
-
- // stack is created in the task's memory region 0
- ACE_UNUSED_ARG (stack);
-
- // task creation and start flags are fixed
- ACE_UNUSED_ARG (flags);
-
- // lowest priority is reserved for the IDLE pSOS+ system daemon,
- // highest are reserved for high priority pSOS+ system daemons
- if (priority < PSOS_TASK_MIN_PRIORITY)
- {
- priority = PSOS_TASK_MIN_PRIORITY;
- }
- else if (priority > PSOS_TASK_MAX_PRIORITY)
- {
- priority = PSOS_TASK_MAX_PRIORITY;
- }
-
- // set the stacksize to a default value if no size is specified
- if (stacksize == 0)
- stacksize = ACE_PSOS_DEFAULT_STACK_SIZE;
-
- ACE_hthread_t tid;
- *thr_handle = 0;
-
- // create the thread
- if (t_create ((char *) thr_id, // task name
- priority, // (possibly adjusted) task priority
- stacksize, // passed stack size is used for supervisor stack
- 0, // no user stack: tasks run strictly in supervisor mode
- T_LOCAL, // local to the pSOS+ node (does not support pSOS+m)
- &tid) // receives task id
- != 0)
- {
- return -1;
- }
-
- // pSOS tasks are passed an array of 4 u_longs
- u_long targs[4];
- targs[0] = (u_long) ACE_THREAD_ARGUMENT;
- targs[1] = 0;
- targs[2] = 0;
- targs[3] = 0;
-
- // start the thread
- if (t_start (tid,
- T_PREEMPT | // Task can be preempted
-// T_NOTSLICE | // Task is not timesliced with other tasks at same priority
- T_TSLICE | // Task is timesliced with other tasks at same priority
- T_NOASR | // Task level signals disabled
- T_SUPV | // Task runs strictly in supervisor mode
- T_ISR, // Hardware interrupts are enabled
- ACE_THREAD_FUNCTION, // Task entry point
- targs) // Task argument(s)
- != 0)
- {
- return -1;
- }
-
- // store the task id in the handle and return success
- *thr_handle = tid;
- return 0;
-
-# elif defined (VXWORKS)
- // The hard-coded values below are what ::sp () would use. (::sp ()
- // hardcodes priority to 100, flags to VX_FP_TASK, and stacksize to
- // 20,000.) stacksize should be an even integer. If a stack is not
- // specified, ::taskSpawn () is used so that we can set the
- // priority, flags, and stacksize. If a stack is specified,
- // ::taskInit ()/::taskActivate() are used.
-
- // If called with thr_create() defaults, use same default values as ::sp ():
- if (priority == ACE_DEFAULT_THREAD_PRIORITY) priority = 100;
- // Assumes that there is a floating point coprocessor. As noted
- // above, ::sp () hardcodes this, so we should be safe with it.
- if (flags == 0) flags = VX_FP_TASK;
- if (stacksize == 0) stacksize = 20000;
-
- const u_int thr_id_provided =
- thr_id && *thr_id && (*thr_id)[0] != ACE_THR_ID_ALLOCATED;
-
- ACE_hthread_t tid;
-# if 0 /* Don't support setting of stack, because it doesn't seem to work. */
- if (stack == 0)
- {
-# else
- ACE_UNUSED_ARG (stack);
-# endif /* 0 */
- // The call below to ::taskSpawn () causes VxWorks to assign a
- // unique task name of the form: "t" + an integer, because the
- // first argument is 0.
- tid = ::taskSpawn (thr_id_provided ? *thr_id : 0,
- priority,
- (int) flags,
- (int) stacksize,
- thread_args->entry_point (),
- (int) thread_args,
- 0, 0, 0, 0, 0, 0, 0, 0, 0);
-# if 0 /* Don't support setting of stack, because it doesn't seem to work. */
- }
- else
- {
- // If a task name (thr_id) was not supplied, then the task will
- // not have a unique name. That's VxWorks' behavior.
-
- // Carve out a TCB at the beginning of the stack space. The TCB
- // occupies 400 bytes with VxWorks 5.3.1/I386.
- WIND_TCB *tcb = (WIND_TCB *) stack;
-
- // The TID is defined to be the address of the TCB.
- int status = ::taskInit (tcb,
- thr_id_provided ? *thr_id : 0,
- priority,
- (int) flags,
- (char *) stack + sizeof (WIND_TCB),
- (int) (stacksize - sizeof (WIND_TCB)),
- thread_args->entry_point (),
- (int) thread_args,
- 0, 0, 0, 0, 0, 0, 0, 0, 0);
-
- if (status == OK)
- {
- // The task was successfully initialized, now activate it.
- status = ::taskActivate ((ACE_hthread_t) tcb);
- }
-
- tid = status == OK ? (ACE_hthread_t) tcb : ERROR;
- }
-# endif /* 0 */
-
- if (tid == ERROR)
- return -1;
- else
- {
- if (! thr_id_provided && thr_id)
- {
- if (*thr_id && (*thr_id)[0] == ACE_THR_ID_ALLOCATED)
- // *thr_id was allocated by the Thread_Manager. ::taskTcb
- // (int tid) returns the address of the WIND_TCB (task
- // control block). According to the ::taskSpawn()
- // documentation, the name of the new task is stored at
- // pStackBase, but is that of the current task? If so, it
- // might be a bit quicker than this extraction of the tcb
- // . . .
- ACE_OS::strncpy (*thr_id + 1, ::taskTcb (tid)->name, 10);
- else
- // *thr_id was not allocated by the Thread_Manager.
- // Pass back the task name in the location pointed to
- // by thr_id.
- *thr_id = ::taskTcb (tid)->name;
- }
- // else if the thr_id was provided, there's no need to overwrite
- // it with the same value (string). If thr_id is 0, then we can't
- // pass the task name back.
-
- if (thr_handle)
- *thr_handle = tid;
-
- return 0;
- }
-
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (func);
- ACE_UNUSED_ARG (args);
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (thr_id);
- ACE_UNUSED_ARG (thr_handle);
- ACE_UNUSED_ARG (priority);
- ACE_UNUSED_ARG (stack);
- ACE_UNUSED_ARG (stacksize);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-void
-ACE_OS::thr_exit (void *status)
-{
-ACE_TRACE ("ACE_OS::thr_exit");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- ::pthread_exit (status);
-# elif defined (ACE_HAS_STHREADS)
- ::thr_exit (status);
-# elif defined (ACE_HAS_WTHREADS)
- // Can't call it here because on NT, the thread is exited
- // directly by ACE_Thread_Adapter::invoke ().
- // ACE_TSS_Cleanup::instance ()->exit (status);
-
-# if defined (ACE_HAS_MFC) && (ACE_HAS_MFC != 0)
- int using_afx = -1;
- // An ACE_Thread_Descriptor really is an ACE_OS_Thread_Descriptor.
- // But without #including ace/Thread_Manager.h, we don't know that.
- ACE_OS_Thread_Descriptor *td =
- ACE_reinterpret_cast (ACE_OS_Thread_Descriptor *,
- ACE_Log_Msg::instance ()->thr_desc ());
- if (td)
- using_afx = ACE_BIT_ENABLED (td->flags (), THR_USE_AFX);
-# endif /* ACE_HAS_MFC && (ACE_HAS_MFC != 0) */
-
- // Call TSS destructors.
- ACE_OS::cleanup_tss (0 /* not main thread */);
-
- // Exit the thread.
- // Allow CWinThread-destructor to be invoked from AfxEndThread.
- // _endthreadex will be called from AfxEndThread so don't exit the
- // thread now if we are running an MFC thread.
-# if defined (ACE_HAS_MFC) && (ACE_HAS_MFC != 0)
- if (using_afx != -1)
- {
- if (using_afx)
- ::AfxEndThread ((DWORD)status);
- else
- ACE_ENDTHREADEX (status);
- }
- else
- {
- // Not spawned by ACE_Thread_Manager, use the old buggy
- // version. You should seriously consider using
- // ACE_Thread_Manager to spawn threads. The following code is
- // know to cause some problem.
- CWinThread *pThread = ::AfxGetThread ();
- if (!pThread || pThread->m_nThreadID != ACE_OS::thr_self ())
- ACE_ENDTHREADEX (status);
- else
- ::AfxEndThread ((DWORD)status);
- }
-# else
- ACE_ENDTHREADEX (status);
-# endif /* ACE_HAS_MFC && ACE_HAS_MFS != 0*/
-
-# elif defined (VXWORKS)
- ACE_hthread_t tid;
- ACE_OS::thr_self (tid);
- *((int *) status) = ::taskDelete (tid);
-# elif defined (ACE_PSOS)
- ACE_hthread_t tid;
- ACE_OS::thr_self (tid);
-
-# if defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)
- // Call TSS destructors.
- ACE_OS::cleanup_tss (0 /* not main thread */);
-# endif /* ACE_PSOS && ACE_PSOS_HAS_TSS */
-
- *((u_long *) status) = ::t_delete (tid);
-# endif /* ACE_HAS_PTHREADS */
-# else
- ACE_UNUSED_ARG (status);
-# endif /* ACE_HAS_THREADS */
-}
-
-int
-ACE_OS::lwp_getparams (ACE_Sched_Params &sched_params)
-{
-# if defined (ACE_HAS_STHREADS) || defined (sun)
- // Get the class TS and RT class IDs.
- ACE_id_t rt_id;
- ACE_id_t ts_id;
- if (ACE_OS::scheduling_class ("RT", rt_id) == -1
- || ACE_OS::scheduling_class ("TS", ts_id) == -1)
- return -1;
-
- // Get this LWP's scheduling parameters.
- pcparms_t pcparms;
- // The following is just to avoid Purify warnings about unitialized
- // memory reads.
- ACE_OS::memset (&pcparms, 0, sizeof pcparms);
- pcparms.pc_cid = PC_CLNULL;
-
- if (ACE_OS::priority_control (P_LWPID,
- P_MYID,
- PC_GETPARMS,
- (char *) &pcparms) == -1)
- return -1;
- else if (pcparms.pc_cid == rt_id)
- {
- // RT class.
- rtparms_t rtparms;
- ACE_OS::memcpy (&rtparms, pcparms.pc_clparms, sizeof rtparms);
-
- sched_params.policy (ACE_SCHED_FIFO);
- sched_params.priority (rtparms.rt_pri);
- sched_params.scope (ACE_SCOPE_THREAD);
- ACE_Time_Value quantum (rtparms.rt_tqsecs,
- rtparms.rt_tqnsecs == RT_TQINF
- ? 0 : rtparms.rt_tqnsecs * 1000);
- sched_params.quantum (quantum);
- return 0;
- }
- else if (pcparms.pc_cid == ts_id)
- {
- /* TS class */
- tsparms_t tsparms;
- ACE_OS::memcpy (&tsparms, pcparms.pc_clparms, sizeof tsparms);
-
- sched_params.policy (ACE_SCHED_OTHER);
- sched_params.priority (tsparms.ts_upri);
- sched_params.scope (ACE_SCOPE_THREAD);
- return 0;
- }
- else
- return -1;
-
-# else /* ! ACE_HAS_STHREADS && ! sun */
- ACE_UNUSED_ARG (sched_params);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ! ACE_HAS_STHREADS && ! sun */
-}
-
-int
-ACE_OS::lwp_setparams (const ACE_Sched_Params &sched_params)
-{
-# if defined (ACE_HAS_STHREADS) || defined (sun)
- ACE_Sched_Params lwp_params (sched_params);
- lwp_params.scope (ACE_SCOPE_LWP);
- return ACE_OS::sched_params (lwp_params);
-# else /* ! ACE_HAS_STHREADS && ! sun */
- ACE_UNUSED_ARG (sched_params);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ! ACE_HAS_STHREADS && ! sun */
-}
-
-# if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
-int
-ACE_OS::thr_setspecific (ACE_OS_thread_key_t key, void *data)
-{
- // ACE_TRACE ("ACE_OS::thr_setspecific");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_FSU_PTHREADS)
- // Call pthread_init() here to initialize threads package. FSU
- // threads need an initialization before the first thread constructor.
- // This seems to be the one; however, a segmentation fault may
- // indicate that another pthread_init() is necessary, perhaps in
- // Synch.cpp or Synch_T.cpp. FSU threads will not reinit if called
- // more than once, so another call to pthread_init will not adversely
- // affect existing threads.
- pthread_init ();
-# endif /* ACE_HAS_FSU_PTHREADS */
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setspecific (key, data), ace_result_), int, -1);
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setspecific (key, data), ace_result_), int, -1);
-# elif defined (ACE_HAS_WTHREADS)
- ::TlsSetValue (key, data);
- return 0;
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (data);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-# endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */
-
-int
-ACE_OS::thr_setspecific (ACE_thread_key_t key, void *data)
-{
- // ACE_TRACE ("ACE_OS::thr_setspecific");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_TSS_EMULATION)
- ACE_KEY_INDEX (key_index, key);
-
- if (key_index >= ACE_TSS_Emulation::total_keys ())
- {
- errno = EINVAL;
- data = 0;
- return -1;
- }
- else
- {
- ACE_TSS_Emulation::ts_object (key) = data;
- ACE_TSS_Cleanup::instance ()->key_used (key);
-
- return 0;
- }
-# elif defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_FSU_PTHREADS)
- // Call pthread_init() here to initialize threads package. FSU
- // threads need an initialization before the first thread constructor.
- // This seems to be the one; however, a segmentation fault may
- // indicate that another pthread_init() is necessary, perhaps in
- // Synch.cpp or Synch_T.cpp. FSU threads will not reinit if called
- // more than once, so another call to pthread_init will not adversely
- // affect existing threads.
- pthread_init ();
-# endif /* ACE_HAS_FSU_PTHREADS */
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_OSCALL_RETURN (::pthread_setspecific (key, data), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setspecific (key, data),
- ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4, 6 */
-
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setspecific (key, data), ace_result_), int, -1);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)
- ACE_hthread_t tid;
- ACE_OS::thr_self (tid);
- if (::tsd_setval (key, tid, data) != 0)
- return -1;
- ACE_TSS_Cleanup::instance ()->key_used (key);
- return 0;
-# elif defined (ACE_HAS_WTHREADS)
- ::TlsSetValue (key, data);
- ACE_TSS_Cleanup::instance ()->key_used (key);
- return 0;
-# else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (data);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (data);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-int
-ACE_OS::thr_keyfree (ACE_thread_key_t key)
-{
-ACE_TRACE ("ACE_OS::thr_keyfree");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_TSS_EMULATION)
- return ACE_TSS_Cleanup::instance ()->remove (key);
-# elif defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_UNUSED_ARG (key);
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_HAS_PTHREADS)
- return ::pthread_key_delete (key);
-# elif defined (ACE_HAS_THR_KEYDELETE)
- return ::thr_keydelete (key);
-# elif defined (ACE_HAS_STHREADS)
- ACE_UNUSED_ARG (key);
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_HAS_WTHREADS)
- // Extract out the thread-specific table instance and free up
- // the key and destructor.
- ACE_TSS_Cleanup::instance ()->remove (key);
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::TlsFree (key), ace_result_), int, -1);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)
- // Extract out the thread-specific table instance and free up
- // the key and destructor.
- ACE_TSS_Cleanup::instance ()->remove (key);
- return (::tsd_delete (key) == 0) ? 0 : -1;
-# else
- ACE_UNUSED_ARG (key);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_TSS_EMULATION */
-# else
- ACE_UNUSED_ARG (key);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-# if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
-int
-ACE_OS::thr_keycreate (ACE_OS_thread_key_t *key,
-# if defined (ACE_HAS_THR_C_DEST)
- ACE_THR_C_DEST dest,
-# else
- ACE_THR_DEST dest,
-# endif /* ACE_HAS_THR_C_DEST */
- void *inst)
-{
- // ACE_TRACE ("ACE_OS::thr_keycreate");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- ACE_UNUSED_ARG (inst);
-
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
-# if defined (ACE_HAS_STDARG_THR_DEST)
- ACE_OSCALL_RETURN (::pthread_keycreate (key, (void (*)(...)) dest), int, -1);
-# else /* ! ACE_HAS_STDARG_THR_DEST */
- ACE_OSCALL_RETURN (::pthread_keycreate (key, dest), int, -1);
-# endif /* ! ACE_HAS_STDARG_THR_DEST */
-# elif defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_OSCALL_RETURN (::pthread_key_create (key, dest), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_key_create (key, dest),
- ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-# elif defined (ACE_HAS_STHREADS)
- ACE_UNUSED_ARG (inst);
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_keycreate (key, dest),
- ace_result_),
- int, -1);
-# elif defined (ACE_HAS_WTHREADS)
- *key = ::TlsAlloc ();
-
- if (*key != ACE_SYSCALL_FAILED)
- {
- // Extract out the thread-specific table instance and stash away
- // the key and destructor so that we can free it up later on...
- return ACE_TSS_Cleanup::instance ()->insert (*key, dest, inst);
- }
- else
- ACE_FAIL_RETURN (-1);
- /* NOTREACHED */
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (dest);
- ACE_UNUSED_ARG (inst);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-# endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */
-
-int
-ACE_OS::thr_keycreate (ACE_thread_key_t *key,
-# if defined (ACE_HAS_THR_C_DEST)
- ACE_THR_C_DEST dest,
-# else
- ACE_THR_DEST dest,
-# endif /* ACE_HAS_THR_C_DEST */
- void *inst)
-{
- // ACE_TRACE ("ACE_OS::thr_keycreate");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_TSS_EMULATION)
- if (ACE_TSS_Emulation::next_key (*key) == 0)
- {
- ACE_TSS_Emulation::tss_destructor (*key, dest);
-
- // Extract out the thread-specific table instance and stash away
- // the key and destructor so that we can free it up later on...
- return ACE_TSS_Cleanup::instance ()->insert (*key, dest, inst);
- }
- else
- {
- errno = EAGAIN;
- return -1;
- }
-# elif defined (ACE_HAS_PTHREADS)
- ACE_UNUSED_ARG (inst);
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
-# if defined (ACE_HAS_STDARG_THR_DEST)
- ACE_OSCALL_RETURN (::pthread_keycreate (key, (void (*)(...)) dest), int, -1);
-# else /* ! ACE_HAS_STDARG_THR_DEST */
- ACE_OSCALL_RETURN (::pthread_keycreate (key, dest), int, -1);
-# endif /* ! ACE_HAS_STDARG_THR_DEST */
-# elif defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_OSCALL_RETURN (::pthread_key_create (key, dest), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_key_create (key, dest),
- ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-
-# elif defined (ACE_HAS_STHREADS)
- ACE_UNUSED_ARG (inst);
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_keycreate (key, dest),
- ace_result_),
- int, -1);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)
-
- static u_long unique_name = 0;
- void *tsdanchor;
-
- ++unique_name;
- if (::tsd_create (ACE_reinterpret_cast (char *, unique_name),
- 0, TSD_NOALLOC, &tsdanchor, key) != 0)
- {
- return -1;
- }
-
- return ACE_TSS_Cleanup::instance ()->insert (*key, dest, inst);
-# elif defined (ACE_HAS_WTHREADS)
- *key = ::TlsAlloc ();
-
- if (*key != ACE_SYSCALL_FAILED)
- {
- // Extract out the thread-specific table instance and stash away
- // the key and destructor so that we can free it up later on...
- return ACE_TSS_Cleanup::instance ()->insert (*key, dest, inst);
- }
- else
- ACE_FAIL_RETURN (-1);
- /* NOTREACHED */
-# else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (dest);
- ACE_UNUSED_ARG (inst);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_TSS_EMULATION */
-# else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (dest);
- ACE_UNUSED_ARG (inst);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-int
-ACE_OS::thr_key_used (ACE_thread_key_t key)
-{
-# if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS))
- ACE_TSS_Cleanup::instance ()->key_used (key);
- return 0;
-# else
- ACE_UNUSED_ARG (key);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_WIN32 || ACE_HAS_TSS_EMULATION || ACE_PSOS_HAS_TSS */
-}
-
-int
-ACE_OS::thr_key_detach (void *inst)
-{
-# if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS))
- if (ACE_TSS_Cleanup::lockable ())
- return ACE_TSS_Cleanup::instance()->detach (inst);
- else
- // We're in static constructor/destructor phase. Don't
- // try to use the ACE_TSS_Cleanup instance because its lock
- // might not have been constructed yet, or might have been
- // destroyed already. Just leak the key . . .
- return -1;
-# else
- ACE_UNUSED_ARG (inst);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_WIN32 || ACE_HAS_TSS_EMULATION */
-}
-
-void
-ACE_OS::unique_name (const void *object,
- ACE_TCHAR *name,
- size_t length)
-{
- // The process ID will provide uniqueness between processes on the
- // same machine. The "this" pointer of the <object> will provide
- // uniqueness between other "live" objects in the same process. The
- // uniqueness of this name is therefore only valid for the life of
- // <object>.
- ACE_TCHAR temp_name[ACE_UNIQUE_NAME_LEN];
- ACE_OS::sprintf (temp_name,
- ACE_TEXT ("%lx%d"),
- ACE_reinterpret_cast (long, object),
- ACE_static_cast (int, ACE_OS::getpid ()));
- ACE_OS::strncpy (name,
- temp_name,
- length);
-}
-
-int
-ACE_OS::argv_to_string (ACE_TCHAR **argv,
- ACE_TCHAR *&buf,
- int substitute_env_args)
-{
- if (argv == 0 || argv[0] == 0)
- return 0;
-
- int buf_len = 0;
-
- // Determine the length of the buffer.
-
- for (int i = 0; argv[i] != 0; i++)
- {
- ACE_TCHAR *temp = 0;
-
- // Account for environment variables.
- if (substitute_env_args
- && (argv[i][0] == '$'
- && (temp = ACE_OS::getenv (&argv[i][1])) != 0))
- buf_len += ACE_OS::strlen (temp);
- else
- buf_len += ACE_OS::strlen (argv[i]);
-
- // Add one for the extra space between each string.
- buf_len++;
- }
-
- // Step through all argv params and copy each one into buf; separate
- // each param with white space.
-
- ACE_NEW_RETURN (buf,
- ACE_TCHAR[buf_len + 1],
- 0);
-
- // Initial null charater to make it a null string.
- buf[0] = '\0';
- ACE_TCHAR *end = buf;
- int j;
-
- for (j = 0; argv[j] != 0; j++)
- {
- ACE_TCHAR *temp = 0;
-
- // Account for environment variables.
- if (substitute_env_args
- && (argv[j][0] == '$'
- && (temp = ACE_OS::getenv (&argv[j][1])) != 0))
- end = ACE_OS::strecpy (end, temp);
- else
- end = ACE_OS::strecpy (end, argv[j]);
-
- // Replace the null char that strecpy put there with white
- // space.
- end[-1] = ' ';
- }
-
- // Null terminate the string.
- *end = '\0';
- // The number of arguments.
- return j;
-}
-
-int
-ACE_OS::string_to_argv (ACE_TCHAR *buf,
- size_t &argc,
- ACE_TCHAR **&argv,
- int substitute_env_args)
-{
- // Reset the number of arguments
- argc = 0;
-
- if (buf == 0)
- return -1;
-
- ACE_TCHAR *cp = buf;
-
- // First pass: count arguments.
-
- // '#' is the start-comment token..
- while (*cp != '\0' && *cp != '#')
- {
- // Skip whitespace..
- while (ACE_OS::ace_isspace (*cp))
- cp++;
-
- // Increment count and move to next whitespace..
- if (*cp != '\0')
- argc++;
-
- // Grok quotes....
- if (*cp == '\'' || *cp == '"')
- {
- ACE_TCHAR quote = *cp;
-
- // Scan past the string..
- for (cp++; *cp != '\0' && *cp != quote; cp++)
- continue;
-
- // '\0' implies unmatched quote..
- if (*cp == '\0')
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("unmatched %c detected\n"),
- quote));
- argc--;
- break;
- }
- else
- cp++;
- }
- else // Skip over non-whitespace....
- while (*cp != '\0' && !ACE_OS::ace_isspace (*cp))
- cp++;
- }
-
- // Second pass: copy arguments.
- ACE_TCHAR arg[ACE_DEFAULT_ARGV_BUFSIZ];
- ACE_TCHAR *argp = arg;
-
- // Make sure that the buffer we're copying into is always large
- // enough.
- if (cp - buf >= ACE_DEFAULT_ARGV_BUFSIZ)
- ACE_NEW_RETURN (argp,
- ACE_TCHAR[cp - buf + 1],
- -1);
-
- // Make a new argv vector of argc + 1 elements.
- ACE_NEW_RETURN (argv,
- ACE_TCHAR *[argc + 1],
- -1);
-
- ACE_TCHAR *ptr = buf;
-
- for (size_t i = 0; i < argc; i++)
- {
- // Skip whitespace..
- while (ACE_OS::ace_isspace (*ptr))
- ptr++;
-
- // Copy next argument and move to next whitespace..
- if (*ptr == '\'' || *ptr == '"')
- {
- ACE_TCHAR quote = *ptr++;
-
- for (cp = argp;
- *ptr != '\0' && *ptr != quote;
- ptr++, cp++)
- {
- // @@ We can probably remove this since we ensure it's
- // big enough earlier!
- ACE_ASSERT (unsigned (cp - argp) < ACE_DEFAULT_ARGV_BUFSIZ);
- *cp = *ptr;
- }
-
- *cp = '\0';
- if (*ptr == quote)
- ptr++;
- }
- else
- {
- for (cp = arg;
- *ptr && !ACE_OS::ace_isspace (*ptr);
- ptr++, cp++)
- {
- // @@ We can probably remove this since we ensure it's
- // big enough earlier!
- ACE_ASSERT (u_int (cp - argp) < ACE_DEFAULT_ARGV_BUFSIZ);
- *cp = *ptr;
- }
-
- *cp = '\0';
- }
-
- // Check for environment variable substitution here.
- if (substitute_env_args)
- ACE_ALLOCATOR_RETURN (argv[i],
- ACE_OS::strenvdup (arg),
- -1);
- else
- ACE_ALLOCATOR_RETURN (argv[i],
- ACE_OS::strdup (arg),
- -1);
- }
-
- if (argp != arg)
- delete [] argp;
-
- argv[argc] = 0;
- return 0;
-}
-
-// Create a contiguous command-line argument buffer with each arg
-// separated by spaces.
-
-pid_t
-ACE_OS::fork_exec (ACE_TCHAR *argv[])
-{
-# if defined (ACE_WIN32)
- ACE_TCHAR *buf;
-
- if (ACE_OS::argv_to_string (argv, buf) != -1)
- {
- PROCESS_INFORMATION process_info;
-# if !defined (ACE_HAS_WINCE)
- ACE_TEXT_STARTUPINFO startup_info;
- ACE_OS::memset ((void *) &startup_info,
- 0,
- sizeof startup_info);
- startup_info.cb = sizeof startup_info;
-
- if (ACE_TEXT_CreateProcess (0,
- buf,
- 0, // No process attributes.
- 0, // No thread attributes.
- TRUE, // Allow handle inheritance.
- 0, // Don't create a new console window.
- 0, // No environment.
- 0, // No current directory.
- &startup_info,
- &process_info))
-# else
- if (ACE_TEXT_CreateProcess (0,
- buf,
- 0, // No process attributes.
- 0, // No thread attributes.
- FALSE, // Can's inherit handles on CE
- 0, // Don't create a new console window.
- 0, // No environment.
- 0, // No current directory.
- 0, // Can't use startup info on CE
- &process_info))
-# endif /* ! ACE_HAS_WINCE */
- {
- // Free resources allocated in kernel.
- ACE_OS::close (process_info.hThread);
- ACE_OS::close (process_info.hProcess);
- // Return new process id.
- delete [] buf;
- return process_info.dwProcessId;
- }
- }
-
- // CreateProcess failed.
- return -1;
-# elif defined (CHORUS)
- return ACE_OS::execv (argv[0], argv);
-# else
- pid_t result = ACE_OS::fork ();
-
- switch (result)
- {
- case -1:
- // Error.
- return -1;
- case 0:
- // Child process.
- if (ACE_OS::execv (argv[0], argv) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- "%p Exec failed\n"));
-
- // If the execv fails, this child needs to exit.
- ACE_OS::exit (errno);
- }
- default:
- // Server process. The fork succeeded.
- return result;
- }
-# endif /* ACE_WIN32 */
-}
-
-ssize_t
-ACE_OS::read_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = ACE_OS::read (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred);
-
- if (n == -1 || n == 0)
- return n;
- }
-
- return bytes_transferred;
-}
-
-// Write <len> bytes from <buf> to <handle> (uses the <write>
-// system call on UNIX and the <WriteFile> call on Win32).
-
-ssize_t
-ACE_OS::write_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- size_t *bt)
-{
- size_t temp;
- size_t &bytes_transferred = bt == 0 ? temp : *bt;
- ssize_t n;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = ACE_OS::write (handle,
- (char *) buf + bytes_transferred,
- len - bytes_transferred);
-
- if (n == -1 || n == 0)
- return n;
- }
-
- return bytes_transferred;
-}
-
-# if defined (ACE_LACKS_WRITEV)
-
-// "Fake" writev for operating systems without it. Note that this is
-// thread-safe.
-
-extern "C" int
-writev (ACE_HANDLE handle, ACE_WRITEV_TYPE iov[], int n)
-{
- ACE_TRACE ("::writev");
-
- size_t length = 0;
- int i;
-
- // Determine the total length of all the buffers in <iov>.
- for (i = 0; i < n; i++)
- if (ACE_static_cast (int, iov[i].iov_len) < 0)
- return -1;
- else
- length += iov[i].iov_len;
-
- char *buf;
-
-# if defined (ACE_HAS_ALLOCA)
- buf = (char *) alloca (length);
-# else
- ACE_NEW_RETURN (buf,
- char[length],
- -1);
-# endif /* !defined (ACE_HAS_ALLOCA) */
-
- char *ptr = buf;
-
- for (i = 0; i < n; i++)
- {
- ACE_OS::memcpy (ptr, iov[i].iov_base, iov[i].iov_len);
- ptr += iov[i].iov_len;
- }
-
- ssize_t result = ACE_OS::write (handle, buf, length);
-# if !defined (ACE_HAS_ALLOCA)
- delete [] buf;
-# endif /* !defined (ACE_HAS_ALLOCA) */
- return result;
-}
-# endif /* ACE_LACKS_WRITEV */
-
-# if defined (ACE_LACKS_READV)
-
-// "Fake" readv for operating systems without it. Note that this is
-// thread-safe.
-
-extern "C" int
-readv (ACE_HANDLE handle,
- ACE_READV_TYPE *iov,
- int n)
-{
-ACE_TRACE ("readv");
-
- ssize_t length = 0;
- int i;
-
- for (i = 0; i < n; i++)
- if (ACE_static_cast (int, iov[i].iov_len) < 0)
- return -1;
- else
- length += iov[i].iov_len;
-
- char *buf;
-# if defined (ACE_HAS_ALLOCA)
- buf = (char *) alloca (length);
-# else
- ACE_NEW_RETURN (buf,
- char[length],
- -1);
-# endif /* !defined (ACE_HAS_ALLOCA) */
-
- length = ACE_OS::read (handle, buf, length);
-
- if (length != -1)
- {
- char *ptr = buf;
- int copyn = length;
-
- for (i = 0;
- i < n && copyn > 0;
- i++)
- {
- ACE_OS::memcpy (iov[i].iov_base, ptr,
- // iov_len is int on some platforms, size_t on others
- copyn > (int) iov[i].iov_len
- ? (size_t) iov[i].iov_len
- : (size_t) copyn);
- ptr += iov[i].iov_len;
- copyn -= iov[i].iov_len;
- }
- }
-
-# if !defined (ACE_HAS_ALLOCA)
- delete [] buf;
-# endif /* !defined (ACE_HAS_ALLOCA) */
- return length;
-}
-# endif /* ACE_LACKS_READV */
-
-# if defined (ACE_NEEDS_FTRUNCATE)
-extern "C" int
-ftruncate (ACE_HANDLE handle, long len)
-{
- struct flock fl;
- fl.l_whence = 0;
- fl.l_len = 0;
- fl.l_start = len;
- fl.l_type = F_WRLCK;
-
- return ACE_OS::fcntl (handle, F_FREESP, ACE_reinterpret_cast (long, &fl));
-}
-# endif /* ACE_NEEDS_FTRUNCATE */
-
-# if defined (ACE_LACKS_MKTEMP)
-ACE_TCHAR *
-ACE_OS::mktemp (ACE_TCHAR *s)
-{
- ACE_TRACE ("ACE_OS::mktemp");
- if (s == 0)
- // check for null template string failed!
- return 0;
- else
- {
- ACE_TCHAR *xxxxxx = ACE_OS::strstr (s, ACE_TEXT ("XXXXXX"));
-
- if (xxxxxx == 0)
- // the template string doesn't contain "XXXXXX"!
- return s;
- else
- {
- ACE_TCHAR unique_letter = ACE_TEXT ('a');
- struct stat sb;
-
- // Find an unused filename for this process. It is assumed
- // that the user will open the file immediately after
- // getting this filename back (so, yes, there is a race
- // condition if multiple threads in a process use the same
- // template). This appears to match the behavior of the
- // SunOS 5.5 mktemp().
- ACE_OS::sprintf (xxxxxx,
- ACE_TEXT ("%05d%c"),
- ACE_OS::getpid (),
- unique_letter);
- while (ACE_OS::stat (s, &sb) >= 0)
- {
- if (++unique_letter <= ACE_TEXT ('z'))
- ACE_OS::sprintf (xxxxxx,
- ACE_TEXT ("%05d%c"),
- ACE_OS::getpid (),
- unique_letter);
- else
- {
- // maximum of 26 unique files per template, per process
- ACE_OS::sprintf (xxxxxx, ACE_TEXT ("%s"), ACE_TEXT (""));
- return s;
- }
- }
- }
- return s;
- }
-}
-# endif /* ACE_LACKS_MKTEMP */
-
-int
-ACE_OS::socket_init (int version_high, int version_low)
-{
-# if defined (ACE_WIN32)
- if (ACE_OS::socket_initialized_ == 0)
- {
- WORD version_requested = MAKEWORD (version_high, version_low);
- WSADATA wsa_data;
- int error = WSAStartup (version_requested, &wsa_data);
-
- if (error != 0)
-# if defined (ACE_HAS_WINCE)
- {
- wchar_t fmt[] = ACE_TEXT ("%s failed, WSAGetLastError returned %d");
- wchar_t buf[80]; // @@ Eliminate magic number.
- ACE_OS::sprintf (buf, fmt, ACE_TEXT ("WSAStartup"), error);
- ::MessageBox (NULL, buf, ACE_TEXT ("WSAStartup failed!"), MB_OK);
- }
-# else
- ACE_OS::fprintf (stderr,
- "ACE_OS::socket_init; WSAStartup failed, "
- "WSAGetLastError returned %d\n",
- error);
-# endif /* ACE_HAS_WINCE */
-
- ACE_OS::socket_initialized_ = 1;
- }
-# else
- ACE_UNUSED_ARG (version_high);
- ACE_UNUSED_ARG (version_low);
-# endif /* ACE_WIN32 */
- return 0;
-}
-
-int
-ACE_OS::socket_fini (void)
-{
-# if defined (ACE_WIN32)
- if (ACE_OS::socket_initialized_ != 0)
- {
- if (WSACleanup () != 0)
- {
- int error = ::WSAGetLastError ();
-# if defined (ACE_HAS_WINCE)
- wchar_t fmt[] = ACE_TEXT ("%s failed, WSAGetLastError returned %d");
- wchar_t buf[80]; // @@ Eliminate magic number.
- ACE_OS::sprintf (buf, fmt, ACE_TEXT ("WSACleanup"), error);
- ::MessageBox (NULL, buf , ACE_TEXT ("WSACleanup failed!"), MB_OK);
-# else
- ACE_OS::fprintf (stderr,
- "ACE_OS::socket_fini; WSACleanup failed, "
- "WSAGetLastError returned %d\n",
- error);
-# endif /* ACE_HAS_WINCE */
- }
- ACE_OS::socket_initialized_ = 0;
- }
-# endif /* ACE_WIN32 */
- return 0;
-}
-
-# if defined (ACE_LACKS_SYS_NERR)
-int sys_nerr = ERRMAX + 1;
-# endif /* ACE_LACKS_SYS_NERR */
-
-# if defined (VXWORKS)
-# include /**/ <usrLib.h> /* for ::sp() */
-
-// This global function can be used from the VxWorks shell to pass
-// arguments to a C main () function.
-//
-// usage: -> spa main, "arg1", "arg2"
-//
-// All arguments must be quoted, even numbers.
-int
-spa (FUNCPTR entry, ...)
-{
- static const unsigned int MAX_ARGS = 10;
- static char *argv[MAX_ARGS];
- va_list pvar;
- unsigned int argc;
-
- // Hardcode a program name because the real one isn't available
- // through the VxWorks shell.
- argv[0] = "ace_main";
-
- // Peel off arguments to spa () and put into argv. va_arg () isn't
- // necessarily supposed to return 0 when done, though since the
- // VxWorks shell uses a fixed number (10) of arguments, it might 0
- // the unused ones. This function could be used to increase that
- // limit, but then it couldn't depend on the trailing 0. So, the
- // number of arguments would have to be passed.
- va_start (pvar, entry);
-
- for (argc = 1; argc <= MAX_ARGS; ++argc)
- {
- argv[argc] = va_arg (pvar, char *);
-
- if (argv[argc] == 0)
- break;
- }
-
- if (argc > MAX_ARGS && argv[argc-1] != 0)
- {
- // try to read another arg, and warn user if the limit was exceeded
- if (va_arg (pvar, char *) != 0)
- ACE_OS::fprintf (stderr, "spa(): number of arguments limited to %d\n",
- MAX_ARGS);
- }
- else
- {
- // fill unused argv slots with 0 to get rid of leftovers
- // from previous invocations
- for (unsigned int i = argc; i <= MAX_ARGS; ++i)
- argv[i] = 0;
- }
-
- // The hard-coded options are what ::sp () uses, except for the
- // larger stack size (instead of ::sp ()'s 20000).
- const int ret = ::taskSpawn (argv[0], // task name
- 100, // task priority
- VX_FP_TASK, // task options
- ACE_NEEDS_HUGE_THREAD_STACKSIZE, // stack size
- entry, // entry point
- argc, // first argument to main ()
- (int) argv, // second argument to main ()
- 0, 0, 0, 0, 0, 0, 0, 0);
- va_end (pvar);
-
- // ::taskSpawn () returns the taskID on success: return 0 instead if
- // successful
- return ret > 0 ? 0 : ret;
-}
-# endif /* VXWORKS */
-
-# if !defined (ACE_HAS_SIGINFO_T)
-siginfo_t::siginfo_t (ACE_HANDLE handle)
- : si_handle_ (handle),
- si_handles_ (&handle)
-{
-}
-
-siginfo_t::siginfo_t (ACE_HANDLE *handles)
- : si_handle_ (handles[0]),
- si_handles_ (handles)
-{
-}
-# endif /* ACE_HAS_SIGINFO_T */
-
-pid_t
-ACE_OS::fork (const ACE_TCHAR *program_name)
-{
- ACE_TRACE ("ACE_OS::fork");
-# if defined (ACE_LACKS_FORK)
- ACE_UNUSED_ARG (program_name);
- ACE_NOTSUP_RETURN (pid_t (-1));
-# else
- pid_t pid =
-# if defined (ACE_HAS_STHREADS)
- ::fork1 ();
-#else
- ::fork ();
-#endif /* ACE_HAS_STHREADS */
-
-#if !defined (ACE_HAS_MINIMAL_ACE_OS)
- if (pid == 0)
- ACE_LOG_MSG->sync (program_name);
-#endif /* ! ACE_HAS_MINIMAL_ACE_OS */
-
- return pid;
-# endif /* ACE_WIN32 */
-}
-
-void
-ACE_Cleanup::cleanup (void *)
-{
- delete this;
-}
-
-
-ACE_Cleanup::~ACE_Cleanup (void)
-{
-}
-
-// This is necessary to work around nasty problems with MVS C++.
-
-extern "C" void
-ace_mutex_lock_cleanup_adapter (void *args)
-{
- ACE_OS::mutex_lock_cleanup (args);
-}
-
-ACE_Thread_ID::ACE_Thread_ID (ACE_thread_t thread_id,
- ACE_hthread_t thread_handle)
- : thread_id_ (thread_id),
- thread_handle_ (thread_handle)
-{
-}
-
-ACE_Thread_ID::ACE_Thread_ID (const ACE_Thread_ID &id)
- : thread_id_ (id.thread_id_),
- thread_handle_ (id.thread_handle_)
-{
-}
-
-ACE_thread_t
-ACE_Thread_ID::id (void)
-{
- return this->thread_id_;
-}
-
-void
-ACE_Thread_ID::id (ACE_thread_t thread_id)
-{
- this->thread_id_ = thread_id;
-}
-
-ACE_hthread_t
-ACE_Thread_ID::handle (void)
-{
- return this->thread_handle_;
-}
-
-void
-ACE_Thread_ID::handle (ACE_hthread_t thread_handle)
-{
- this->thread_handle_ = thread_handle;
-}
-
-int
-ACE_Thread_ID::operator== (const ACE_Thread_ID &rhs) const
-{
- return ACE_OS::thr_cmp (this->thread_handle_, rhs.thread_handle_) == 0
- && ACE_OS::thr_equal (this->thread_id_, rhs.thread_id_) == 0;
-}
-
-int
-ACE_Thread_ID::operator!= (const ACE_Thread_ID &rhs) const
-{
- return !(*this == rhs);
-}
-
-int
-ACE_OS::inet_aton (const ACE_TCHAR *host_name, struct in_addr *addr)
-{
- ACE_UINT32 ip_addr = ACE_OS::inet_addr (host_name);
-
- if (ip_addr == (ACE_UINT32) htonl ((ACE_UINT32) ~0)
- // Broadcast addresses are weird...
- && ACE_OS::strcmp (host_name, ACE_TEXT ("255.255.255.255")) != 0)
- return 0;
- else if (addr == 0)
- return 0;
- else
- {
-#if !defined(_UNICOS)
- ACE_OS::memcpy ((void *) addr, (void *) &ip_addr, sizeof ip_addr);
-#else /* ! _UNICOS */
- // on UNICOS, perform assignment to bitfield, since doing the above
- // actually puts the address outside of the 32-bit bitfield
- addr->s_addr = ip_addr;
-#endif /* ! _UNICOS */
- return 1;
- }
-}
-
-struct tm *
-ACE_OS::localtime_r (const time_t *t, struct tm *res)
-{
- ACE_TRACE ("ACE_OS::localtime_r");
-#if defined (ACE_HAS_REENTRANT_FUNCTIONS)
-# if defined (DIGITAL_UNIX)
- ACE_OSCALL_RETURN (::_Plocaltime_r (t, res), struct tm *, 0);
-# elif defined (HPUX_10)
- return (::localtime_r (t, res) == 0 ? res : (struct tm *)0);
-# else
- ACE_OSCALL_RETURN (::localtime_r (t, res), struct tm *, 0);
-# endif /* DIGITAL_UNIX */
-#elif !defined (ACE_HAS_WINCE) && !defined(ACE_PSOS) || defined (ACE_PSOS_HAS_TIME)
- ACE_OS_GUARD
-
- ACE_UNUSED_ARG (res);
- struct tm * res_ptr;
- ACE_OSCALL (::localtime (t), struct tm *, 0, res_ptr);
- if (res_ptr == 0)
- return 0;
- else
- {
- *res = *res_ptr;
- return res;
- }
-#else
- // @@ Same as ACE_OS::localtime (), you need to implement it
- // yourself.
- ACE_UNUSED_ARG (t);
- ACE_UNUSED_ARG (res);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_REENTRANT_FUNCTIONS */
-}
-
-ssize_t
-ACE_OS::pread (ACE_HANDLE handle,
- void *buf,
- size_t nbytes,
- off_t offset)
-{
-# if defined (ACE_HAS_P_READ_WRITE)
-# if defined (ACE_WIN32)
-
- ACE_OS_GUARD
-
- // Remember the original file pointer position
- DWORD original_position = ::SetFilePointer (handle,
- 0,
- NULL,
- FILE_CURRENT);
-
- if (original_position == 0xFFFFFFFF)
- return -1;
-
- // Go to the correct position
- DWORD altered_position = ::SetFilePointer (handle,
- offset,
- NULL,
- FILE_BEGIN);
- if (altered_position == 0xFFFFFFFF)
- return -1;
-
- DWORD bytes_read;
-
-# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)
-
- OVERLAPPED overlapped;
- overlapped.Internal = 0;
- overlapped.InternalHigh = 0;
- overlapped.Offset = offset;
- overlapped.OffsetHigh = 0;
- overlapped.hEvent = 0;
-
- BOOL result = ::ReadFile (handle,
- buf,
- nbytes,
- &bytes_read,
- &overlapped);
-
- if (result == FALSE)
- {
- if (::GetLastError () != ERROR_IO_PENDING)
- return -1;
-
- else
- {
- result = ::GetOverlappedResult (handle,
- &overlapped,
- &bytes_read,
- TRUE);
- if (result == FALSE)
- return -1;
- }
- }
-
-# else /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
-
- BOOL result = ::ReadFile (handle,
- buf,
- nbytes,
- &bytes_read,
- NULL);
- if (result == FALSE)
- return -1;
-
-# endif /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
-
- // Reset the original file pointer position
- if (::SetFilePointer (handle,
- original_position,
- NULL,
- FILE_BEGIN) == 0xFFFFFFFF)
- return -1;
-
- return (ssize_t) bytes_read;
-
-# else /* ACE_WIN32 */
-
- return ::pread (handle, buf, nbytes, offset);
-
-# endif /* ACE_WIN32 */
-
-# else /* ACE_HAS_P_READ_WRITE */
-
- ACE_OS_GUARD
-
- // Remember the original file pointer position
- off_t original_position = ACE_OS::lseek (handle,
- 0,
- SEEK_SET);
-
- if (original_position == -1)
- return -1;
-
- // Go to the correct position
- off_t altered_position = ACE_OS::lseek (handle,
- offset,
- SEEK_SET);
-
- if (altered_position == -1)
- return -1;
-
- ssize_t bytes_read = ACE_OS::read (handle,
- buf,
- nbytes);
-
- if (bytes_read == -1)
- return -1;
-
- if (ACE_OS::lseek (handle,
- original_position,
- SEEK_SET) == -1)
- return -1;
-
- return bytes_read;
-
-# endif /* ACE_HAD_P_READ_WRITE */
-}
-
-ssize_t
-ACE_OS::pwrite (ACE_HANDLE handle,
- const void *buf,
- size_t nbytes,
- off_t offset)
-{
-# if defined (ACE_HAS_P_READ_WRITE)
-# if defined (ACE_WIN32)
-
- ACE_OS_GUARD
-
- // Remember the original file pointer position
- DWORD original_position = ::SetFilePointer (handle,
- 0,
- NULL,
- FILE_CURRENT);
-
- if (original_position == 0xFFFFFFFF)
- return -1;
-
- // Go to the correct position
- DWORD altered_position = ::SetFilePointer (handle,
- offset,
- NULL,
- FILE_BEGIN);
- if (altered_position == 0xFFFFFFFF)
- return -1;
-
- DWORD bytes_written;
-
-# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)
-
- OVERLAPPED overlapped;
- overlapped.Internal = 0;
- overlapped.InternalHigh = 0;
- overlapped.Offset = offset;
- overlapped.OffsetHigh = 0;
- overlapped.hEvent = 0;
-
- BOOL result = ::WriteFile (handle,
- buf,
- nbytes,
- &bytes_written,
- &overlapped);
-
- if (result == FALSE)
- {
- if (::GetLastError () != ERROR_IO_PENDING)
- return -1;
-
- else
- {
- result = ::GetOverlappedResult (handle,
- &overlapped,
- &bytes_written,
- TRUE);
- if (result == FALSE)
- return -1;
- }
- }
-
-# else /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
-
- BOOL result = ::WriteFile (handle,
- buf,
- nbytes,
- &bytes_written,
- NULL);
- if (result == FALSE)
- return -1;
-
-# endif /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
-
- // Reset the original file pointer position
- if (::SetFilePointer (handle,
- original_position,
- NULL,
- FILE_BEGIN) == 0xFFFFFFFF)
- return -1;
-
- return (ssize_t) bytes_written;
-
-# else /* ACE_WIN32 */
-
- return ::pwrite (handle, buf, nbytes, offset);
-# endif /* ACE_WIN32 */
-# else /* ACE_HAS_P_READ_WRITE */
-
- ACE_OS_GUARD
-
- // Remember the original file pointer position
- off_t original_position = ACE_OS::lseek (handle,
- 0,
- SEEK_SET);
- if (original_position == -1)
- return -1;
-
- // Go to the correct position
- off_t altered_position = ACE_OS::lseek (handle,
- offset,
- SEEK_SET);
- if (altered_position == -1)
- return -1;
-
- ssize_t bytes_written = ACE_OS::write (handle,
- buf,
- nbytes);
- if (bytes_written == -1)
- return -1;
-
- if (ACE_OS::lseek (handle,
- original_position,
- SEEK_SET) == -1)
- return -1;
-
- return bytes_written;
-# endif /* ACE_HAD_P_READ_WRITE */
-}
-
-ACE_HANDLE
-ACE_OS::open (const ACE_TCHAR *filename,
- int mode,
- int perms,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_OS::open");
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG (perms);
-
- DWORD access = GENERIC_READ;
- if (ACE_BIT_ENABLED (mode, O_WRONLY))
- access = GENERIC_WRITE;
- else if (ACE_BIT_ENABLED (mode, O_RDWR))
- access = GENERIC_READ | GENERIC_WRITE;
-
- DWORD creation = OPEN_EXISTING;
-
- if ((mode & (_O_CREAT | _O_EXCL)) == (_O_CREAT | _O_EXCL))
- creation = CREATE_NEW;
- else if ((mode & (_O_CREAT | _O_TRUNC)) == (_O_CREAT | _O_TRUNC))
- creation = CREATE_ALWAYS;
- else if (ACE_BIT_ENABLED (mode, _O_CREAT))
- creation = OPEN_ALWAYS;
- else if (ACE_BIT_ENABLED (mode, _O_TRUNC))
- creation = TRUNCATE_EXISTING;
-
- DWORD flags = 0;
-
- if (ACE_BIT_ENABLED (mode, _O_TEMPORARY))
- flags |= FILE_FLAG_DELETE_ON_CLOSE | FILE_ATTRIBUTE_TEMPORARY;
-
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_WRITE_THROUGH))
- flags |= FILE_FLAG_WRITE_THROUGH;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_OVERLAPPED))
- flags |= FILE_FLAG_OVERLAPPED;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_NO_BUFFERING))
- flags |= FILE_FLAG_NO_BUFFERING;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_RANDOM_ACCESS))
- flags |= FILE_FLAG_RANDOM_ACCESS;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_SEQUENTIAL_SCAN))
- flags |= FILE_FLAG_SEQUENTIAL_SCAN;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_DELETE_ON_CLOSE))
- flags |= FILE_FLAG_DELETE_ON_CLOSE;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_BACKUP_SEMANTICS))
- flags |= FILE_FLAG_BACKUP_SEMANTICS;
- if (ACE_BIT_ENABLED (mode, FILE_FLAG_POSIX_SEMANTICS))
- flags |= FILE_FLAG_POSIX_SEMANTICS;
-
- ACE_MT (ACE_thread_mutex_t *ace_os_monitor_lock = 0;)
-
- if (ACE_BIT_ENABLED (mode, _O_APPEND))
- {
- ACE_MT
- (
- ace_os_monitor_lock = (ACE_thread_mutex_t *)
- ACE_OS_Object_Manager::preallocated_object[
- ACE_OS_Object_Manager::ACE_OS_MONITOR_LOCK];
- ACE_OS::thread_mutex_lock (ace_os_monitor_lock);
- )
- }
-
- DWORD shared_mode = FILE_SHARE_READ | FILE_SHARE_WRITE;
-#if !defined (ACE_HAS_WINCE) // CE doesn't have FILE_SHARE_DELETE
- if (ACE_OS::get_win32_versioninfo().dwPlatformId ==
- VER_PLATFORM_WIN32_NT)
- shared_mode |= FILE_SHARE_DELETE;
-#endif /* ACE_HAS_WINCE */
-
- ACE_HANDLE h = ACE_TEXT_CreateFile (filename, access,
- shared_mode,
- ACE_OS::default_win32_security_attributes (sa),
- creation,
- flags,
- 0);
-
- if (ACE_BIT_ENABLED (mode, _O_APPEND))
- {
- if (h != ACE_INVALID_HANDLE)
- {
- ::SetFilePointer (h, 0, 0, FILE_END);
- }
-
- ACE_MT (ACE_OS::thread_mutex_unlock (ace_os_monitor_lock);)
- }
-
- if (h == ACE_INVALID_HANDLE)
- ACE_FAIL_RETURN (h);
- else
- return h;
-#elif defined (ACE_PSOS)
- ACE_UNUSED_ARG (perms);
- ACE_UNUSED_ARG (sa);
-# if defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (filename);
- return 0;
-# else
- unsigned long result, handle;
- result = ::open_f (&handle, ACE_const_cast(char *, filename), 0);
- if (result != 0)
- {
- // We need to clean this up...not 100% correct!
- // To correct we should handle all the cases of TRUNC and CREAT
- if ((result == 0x200B) && (ACE_BIT_ENABLED (mode, O_CREAT)))
- {
- result = ::create_f(ACE_const_cast(char *, filename),1,0);
- if (result != 0)
- {
- errno = result;
- return ACE_static_cast (ACE_HANDLE, -1);
- }
- else //File created...try to open it again
- {
- result = ::open_f (&handle, ACE_const_cast(char *, filename), 0);
- if (result != 0)
- {
- errno = result;
- return ACE_static_cast (ACE_HANDLE, -1);
- }
-
- }
- }
- else
- {
- errno = result;
- return ACE_static_cast (ACE_HANDLE, -1);
- }
- }
- return ACE_static_cast (ACE_HANDLE, handle);
-# endif /* defined (ACE_PSOS_LACKS_PHILE) */
-#else
- ACE_UNUSED_ARG (sa);
- ACE_OSCALL_RETURN (::open (filename, mode, perms), ACE_HANDLE, -1);
-#endif /* ACE_WIN32 */
-}
-
-# if defined (ACE_LACKS_DIFFTIME)
-double
-ACE_OS::difftime (time_t t1, time_t t0)
-{
- /* return t1 - t0 in seconds */
- struct tm tms[2], *ptms[2], temp;
- double seconds;
- double days;
- int swap = 0;
-
- /* extract the tm structure from time_t */
- ptms[1] = gmtime_r (&t1, &tms[1]);
- if (ptms[1] == 0) return 0.0;
-
- ptms[0] = gmtime_r (&t0, &tms[0]);
- if (ptms[0] == 0) return 0.0;
-
- /* make sure t1 is > t0 */
- if (tms[1].tm_year < tms[0].tm_year)
- swap = 1;
- else if (tms[1].tm_year == tms[0].tm_year)
- {
- if (tms[1].tm_yday < tms[0].tm_yday)
- swap = 1;
- else if (tms[1].tm_yday == tms[0].tm_yday)
- {
- if (tms[1].tm_hour < tms[0].tm_hour)
- swap = 1;
- else if (tms[1].tm_hour == tms[0].tm_hour)
- {
- if (tms[1].tm_min < tms[0].tm_min)
- swap = 1;
- else if (tms[1].tm_min == tms[0].tm_min)
- {
- if (tms[1].tm_sec < tms[0].tm_sec)
- swap = 1;
- }
- }
- }
- }
-
- if (swap)
- temp = tms[0], tms[0] = tms[1], tms[1] = temp;
-
- seconds = 0.0;
- if (tms[1].tm_year > tms[0].tm_year)
- {
- // Accumulate the time until t[0] catches up to t[1]'s year.
- seconds = 60 - tms[0].tm_sec;
- tms[0].tm_sec = 0;
- tms[0].tm_min += 1;
- seconds += 60 * (60 - tms[0].tm_min);
- tms[0].tm_min = 0;
- tms[0].tm_hour += 1;
- seconds += 60*60 * (24 - tms[0].tm_hour);
- tms[0].tm_hour = 0;
- tms[0].tm_yday += 1;
-
-# define ISLEAPYEAR(y) ((y)&3u?0:(y)%25u?1:(y)/25u&12?0:1)
-
- if (ISLEAPYEAR(tms[0].tm_year))
- seconds += 60*60*24 * (366 - tms[0].tm_yday);
- else
- seconds += 60*60*24 * (365 - tms[0].tm_yday);
-
- tms[0].tm_yday = 0;
- tms[0].tm_year += 1;
-
- while (tms[1].tm_year > tms[0].tm_year)
- {
- if (ISLEAPYEAR(tms[0].tm_year))
- seconds += 60*60*24 * 366;
- else
- seconds += 60*60*24 * 365;
-
- tms[0].tm_year += 1;
- }
-
-# undef ISLEAPYEAR
-
- }
- else
- {
- // Normalize
- if (tms[1].tm_sec < tms[0].tm_sec)
- {
- if (tms[1].tm_min == 0)
- {
- if (tms[1].tm_hour == 0)
- {
- tms[1].tm_yday -= 1;
- tms[1].tm_hour += 24;
- }
- tms[1].tm_hour -= 1;
- tms[1].tm_min += 60;
- }
- tms[1].tm_min -= 1;
- tms[1].tm_sec += 60;
- }
- tms[1].tm_sec -= tms[0].tm_sec;
-
- if (tms[1].tm_min < tms[0].tm_min)
- {
- if (tms[1].tm_hour == 0)
- {
- tms[1].tm_yday -= 1;
- tms[1].tm_hour += 24;
- }
- tms[1].tm_hour -= 1;
- tms[1].tm_min += 60;
- }
- tms[1].tm_min -= tms[0].tm_min;
-
- if (tms[1].tm_hour < tms[0].tm_hour)
- {
- tms[1].tm_yday -= 1;
- tms[1].tm_hour += 24;
- }
- tms[1].tm_hour -= tms[0].tm_hour;
-
- tms[1].tm_yday -= tms[0].tm_yday;
- }
-
- // accumulate the seconds
- seconds += tms[1].tm_sec;
- seconds += 60 * tms[1].tm_min;
- seconds += 60*60 * tms[1].tm_hour;
- seconds += 60*60*24 * tms[1].tm_yday;
-
- return seconds;
-}
-# endif /* ACE_LACKS_DIFFTIME */
-
-# if defined (ACE_HAS_WINCE)
-ACE_TCHAR *
-ACE_OS::ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen)
-{
- // buflen must be at least 26 wchar_t long.
- if (buflen < 26) // Again, 26 is a magic number.
- return 0;
- // This is really stupid, converting FILETIME to timeval back and
- // forth. It assumes FILETIME and DWORDLONG are the same structure
- // internally.
- ULARGE_INTEGER _100ns;
- _100ns.QuadPart = (DWORDLONG) *clock * 10000 * 1000
- + ACE_Time_Value::FILETIME_to_timval_skew;
- FILETIME file_time;
- file_time.dwLowDateTime = _100ns.LowPart;
- file_time.dwHighDateTime = _100ns.HighPart;
-
- FILETIME localtime;
- SYSTEMTIME systime;
- FileTimeToLocalFileTime (&file_time, &localtime);
- FileTimeToSystemTime (&localtime, &systime);
- ACE_OS::sprintf (buf, ACE_OS_CTIME_R_FMTSTR,
- ACE_OS::day_of_week_name[systime.wDayOfWeek],
- ACE_OS::month_name[systime.wMonth - 1],
- systime.wDay,
- systime.wHour,
- systime.wMinute,
- systime.wSecond,
- systime.wYear);
- return buf;
-}
-# endif /* ACE_HAS_WINCE */
-
-# if !defined (ACE_HAS_WINCE)
-time_t
-ACE_OS::mktime (struct tm *t)
-{
- ACE_TRACE ("ACE_OS::mktime");
-# if defined (ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME)
- ACE_UNUSED_ARG (t);
- ACE_NOTSUP_RETURN (-1);
-# else
-# if defined (ACE_HAS_THREADS) && !defined (ACE_HAS_MT_SAFE_MKTIME)
- ACE_OS_GUARD
-# endif /* ACE_HAS_THREADS && ! ACE_HAS_MT_SAFE_MKTIME */
-
- ACE_OSCALL_RETURN (::mktime (t), time_t, (time_t) -1);
-# endif /* ACE_PSOS && ! ACE_PSOS_HAS_TIME */
-}
-# endif /* !ACE_HAS_WINCE */
-
-# if !defined (ACE_HAS_THREADS) || defined (ACE_LACKS_RWLOCK_T)
-int
-ACE_OS::rwlock_init (ACE_rwlock_t *rw,
- int type,
- const ACE_TCHAR *name,
- void *arg)
-{
- // ACE_TRACE ("ACE_OS::rwlock_init");
-# if defined (ACE_HAS_THREADS) && defined (ACE_LACKS_RWLOCK_T)
- // NT, POSIX, and VxWorks don't support this natively.
- ACE_UNUSED_ARG (name);
- int result = -1;
-
- // Since we cannot use the user specified name for all three
- // objects, we will create three completely new names.
- ACE_TCHAR name1[ACE_UNIQUE_NAME_LEN];
- ACE_TCHAR name2[ACE_UNIQUE_NAME_LEN];
- ACE_TCHAR name3[ACE_UNIQUE_NAME_LEN];
- ACE_TCHAR name4[ACE_UNIQUE_NAME_LEN];
-
- ACE_OS::unique_name ((const void *) &rw->lock_,
- name1,
- ACE_UNIQUE_NAME_LEN);
- ACE_OS::unique_name ((const void *) &rw->waiting_readers_,
- name2,
- ACE_UNIQUE_NAME_LEN);
- ACE_OS::unique_name ((const void *) &rw->waiting_writers_,
- name3,
- ACE_UNIQUE_NAME_LEN);
- ACE_OS::unique_name ((const void *) &rw->waiting_important_writer_,
- name4,
- ACE_UNIQUE_NAME_LEN);
-
- ACE_condattr_t attributes;
- if (ACE_OS::condattr_init (attributes, type) == 0)
- {
- if (ACE_OS::mutex_init (&rw->lock_, type, name1,
- (ACE_mutexattr_t *) arg) == 0
- && ACE_OS::cond_init (&rw->waiting_readers_,
- attributes, name2, arg) == 0
- && ACE_OS::cond_init (&rw->waiting_writers_,
- attributes, name3, arg) == 0
- && ACE_OS::cond_init (&rw->waiting_important_writer_,
- attributes, name4, arg) == 0)
- {
- // Success!
- rw->ref_count_ = 0;
- rw->num_waiting_writers_ = 0;
- rw->num_waiting_readers_ = 0;
- rw->important_writer_ = 0;
- result = 0;
- }
- ACE_OS::condattr_destroy (attributes);
- }
-
- if (result == -1)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- ACE_OS::mutex_destroy (&rw->lock_);
- ACE_OS::cond_destroy (&rw->waiting_readers_);
- ACE_OS::cond_destroy (&rw->waiting_writers_);
- ACE_OS::cond_destroy (&rw->waiting_important_writer_);
- }
- return result;
-# else
- ACE_UNUSED_ARG (rw);
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-# endif /* ! ACE_HAS_THREADS || ACE_LACKS_RWLOCK_T */
-
-#if defined (ACE_LACKS_COND_T) && ! defined (ACE_PSOS_DIAB_MIPS)
-// NOTE: The ACE_OS::cond_* functions for some non-Unix platforms are
-// defined here either because they're too big to be inlined, or
-// to avoid use before definition if they were inline.
-
-int
-ACE_OS::cond_destroy (ACE_cond_t *cv)
-{
- ACE_TRACE ("ACE_OS::cond_destroy");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_WTHREADS)
- ACE_OS::event_destroy (&cv->waiters_done_);
-# elif defined (VXWORKS) || defined (ACE_PSOS)
- ACE_OS::sema_destroy (&cv->waiters_done_);
-# endif /* VXWORKS */
- ACE_OS::thread_mutex_destroy (&cv->waiters_lock_);
- return ACE_OS::sema_destroy (&cv->sema_);
-# else
- ACE_UNUSED_ARG (cv);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-// @@ The following functions could be inlined if i could figure where
-// to put it among the #ifdefs!
-int
-ACE_OS::condattr_init (ACE_condattr_t &attributes,
- int type)
-{
- attributes.type = type;
- return 0;
-}
-
-int
-ACE_OS::condattr_destroy (ACE_condattr_t &)
-{
- return 0;
-}
-
-int
-ACE_OS::cond_init (ACE_cond_t *cv,
- ACE_condattr_t &attributes,
- const ACE_TCHAR *name, void *arg)
-{
- return ACE_OS::cond_init (cv, attributes.type, name, arg);
-}
-
-int
-ACE_OS::cond_init (ACE_cond_t *cv, short type, const ACE_TCHAR *name, void *arg)
-{
-ACE_TRACE ("ACE_OS::cond_init");
-# if defined (ACE_HAS_THREADS)
- cv->waiters_ = 0;
- cv->was_broadcast_ = 0;
-
- int result = 0;
- if (ACE_OS::sema_init (&cv->sema_, 0, type, name, arg) == -1)
- result = -1;
- else if (ACE_OS::thread_mutex_init (&cv->waiters_lock_) == -1)
- result = -1;
-# if defined (VXWORKS) || defined (ACE_PSOS)
- else if (ACE_OS::sema_init (&cv->waiters_done_, 0, type) == -1)
-# else
- else if (ACE_OS::event_init (&cv->waiters_done_) == -1)
-# endif /* VXWORKS */
- result = -1;
- return result;
-# else
- ACE_UNUSED_ARG (cv);
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-int
-ACE_OS::cond_signal (ACE_cond_t *cv)
-{
-ACE_TRACE ("ACE_OS::cond_signal");
-# if defined (ACE_HAS_THREADS)
- // If there aren't any waiters, then this is a no-op. Note that
- // this function *must* be called with the <external_mutex> held
- // since other wise there is a race condition that can lead to the
- // lost wakeup bug... This is needed to ensure that the <waiters_>
- // value is not in an inconsistent internal state while being
- // updated by another thread.
- ACE_OS::thread_mutex_lock (&cv->waiters_lock_);
- int have_waiters = cv->waiters_ > 0;
- ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
-
- if (have_waiters != 0)
- return ACE_OS::sema_post (&cv->sema_);
- else
- return 0; // No-op
-# else
- ACE_UNUSED_ARG (cv);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-int
-ACE_OS::cond_broadcast (ACE_cond_t *cv)
-{
-ACE_TRACE ("ACE_OS::cond_broadcast");
-# if defined (ACE_HAS_THREADS)
- // The <external_mutex> must be locked before this call is made.
-
- // This is needed to ensure that <waiters_> and <was_broadcast_> are
- // consistent relative to each other.
- ACE_OS::thread_mutex_lock (&cv->waiters_lock_);
- int have_waiters = 0;
-
- if (cv->waiters_ > 0)
- {
- // We are broadcasting, even if there is just one waiter...
- // Record the fact that we are broadcasting. This helps the
- // cond_wait() method know how to optimize itself. Be sure to
- // set this with the <waiters_lock_> held.
- cv->was_broadcast_ = 1;
- have_waiters = 1;
- }
- ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
- int result = 0;
- if (have_waiters)
- {
- // Wake up all the waiters.
- if (ACE_OS::sema_post (&cv->sema_, cv->waiters_) == -1)
- result = -1;
- // Wait for all the awakened threads to acquire their part of
- // the counting semaphore.
-# if defined (VXWORKS) || defined (ACE_PSOS)
- else if (ACE_OS::sema_wait (&cv->waiters_done_) == -1)
-# else
- else if (ACE_OS::event_wait (&cv->waiters_done_) == -1)
-# endif /* VXWORKS */
- result = -1;
- // This is okay, even without the <waiters_lock_> held because
- // no other waiter threads can wake up to access it.
- cv->was_broadcast_ = 0;
- }
- return result;
-# else
- ACE_UNUSED_ARG (cv);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-int
-ACE_OS::cond_wait (ACE_cond_t *cv,
- ACE_mutex_t *external_mutex)
-{
- ACE_TRACE ("ACE_OS::cond_wait");
-# if defined (ACE_HAS_THREADS)
- // Prevent race conditions on the <waiters_> count.
- ACE_OS::thread_mutex_lock (&cv->waiters_lock_);
- cv->waiters_++;
- ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
-
- int result = 0;
-
-# if defined (ACE_HAS_SIGNAL_OBJECT_AND_WAIT)
- if (external_mutex->type_ == USYNC_PROCESS)
- // This call will automatically release the mutex and wait on the semaphore.
- ACE_WIN32CALL (ACE_ADAPT_RETVAL (::SignalObjectAndWait (external_mutex->proc_mutex_,
- cv->sema_, INFINITE, FALSE),
- result),
- int, -1, result);
- else
-# endif /* ACE_HAS_SIGNAL_OBJECT_AND_WAIT */
- {
- // We keep the lock held just long enough to increment the count of
- // waiters by one. Note that we can't keep it held across the call
- // to ACE_OS::sema_wait() since that will deadlock other calls to
- // ACE_OS::cond_signal().
- if (ACE_OS::mutex_unlock (external_mutex) != 0)
- return -1;
-
- // Wait to be awakened by a ACE_OS::cond_signal() or
- // ACE_OS::cond_broadcast().
- result = ACE_OS::sema_wait (&cv->sema_);
- }
-
- // Reacquire lock to avoid race conditions on the <waiters_> count.
- ACE_OS::thread_mutex_lock (&cv->waiters_lock_);
-
- // We're ready to return, so there's one less waiter.
- cv->waiters_--;
-
- int last_waiter = cv->was_broadcast_ && cv->waiters_ == 0;
-
- // Release the lock so that other collaborating threads can make
- // progress.
- ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
-
- if (result == -1)
- // Bad things happened, so let's just return below.
- /* NOOP */;
-# if defined (ACE_HAS_SIGNAL_OBJECT_AND_WAIT)
- else if (external_mutex->type_ == USYNC_PROCESS)
- {
- if (last_waiter)
-
- // This call atomically signals the <waiters_done_> event and
- // waits until it can acquire the mutex. This is important to
- // prevent unfairness.
- ACE_WIN32CALL (ACE_ADAPT_RETVAL (::SignalObjectAndWait (cv->waiters_done_,
- external_mutex->proc_mutex_,
- INFINITE, FALSE),
- result),
- int, -1, result);
- else
- // We must always regain the <external_mutex>, even when
- // errors occur because that's the guarantee that we give to
- // our callers.
- ACE_OS::mutex_lock (external_mutex);
-
- return result;
- /* NOTREACHED */
- }
-# endif /* ACE_HAS_SIGNAL_OBJECT_AND_WAIT */
- // If we're the last waiter thread during this particular broadcast
- // then let all the other threads proceed.
- else if (last_waiter)
-# if defined (VXWORKS) || defined (ACE_PSOS)
- ACE_OS::sema_post (&cv->waiters_done_);
-# else
- ACE_OS::event_signal (&cv->waiters_done_);
-# endif /* VXWORKS */
-
- // We must always regain the <external_mutex>, even when errors
- // occur because that's the guarantee that we give to our callers.
- ACE_OS::mutex_lock (external_mutex);
-
- return result;
-# else
- ACE_UNUSED_ARG (cv);
- ACE_UNUSED_ARG (external_mutex);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-int
-ACE_OS::cond_timedwait (ACE_cond_t *cv,
- ACE_mutex_t *external_mutex,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_OS::cond_timedwait");
-# if defined (ACE_HAS_THREADS)
- // Handle the easy case first.
- if (timeout == 0)
- return ACE_OS::cond_wait (cv, external_mutex);
-# if defined (ACE_HAS_WTHREADS) || defined (VXWORKS) || defined (ACE_PSOS)
-
- // Prevent race conditions on the <waiters_> count.
- ACE_OS::thread_mutex_lock (&cv->waiters_lock_);
- cv->waiters_++;
- ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
-
- int result = 0;
- ACE_Errno_Guard error (errno, 0);
- int msec_timeout;
-
- if (timeout->sec () == 0 && timeout->usec () == 0)
- msec_timeout = 0; // Do a "poll."
- else
- {
- // Note that we must convert between absolute time (which is
- // passed as a parameter) and relative time (which is what
- // WaitForSingleObjects() expects).
- ACE_Time_Value relative_time (*timeout - ACE_OS::gettimeofday ());
-
- // Watchout for situations where a context switch has caused the
- // current time to be > the timeout.
- if (relative_time < ACE_Time_Value::zero)
- msec_timeout = 0;
- else
- msec_timeout = relative_time.msec ();
- }
-
-# if defined (ACE_HAS_SIGNAL_OBJECT_AND_WAIT)
- if (external_mutex->type_ == USYNC_PROCESS)
- // This call will automatically release the mutex and wait on the
- // semaphore.
- result = ::SignalObjectAndWait (external_mutex->proc_mutex_,
- cv->sema_,
- msec_timeout,
- FALSE);
- else
-# endif /* ACE_HAS_SIGNAL_OBJECT_AND_WAIT */
- {
- // We keep the lock held just long enough to increment the count
- // of waiters by one. Note that we can't keep it held across
- // the call to WaitForSingleObject since that will deadlock
- // other calls to ACE_OS::cond_signal().
- if (ACE_OS::mutex_unlock (external_mutex) != 0)
- return -1;
-
- // Wait to be awakened by a ACE_OS::signal() or
- // ACE_OS::broadcast().
-# if defined (ACE_WIN32)
-# if !defined (ACE_USES_WINCE_SEMA_SIMULATION)
- result = ::WaitForSingleObject (cv->sema_, msec_timeout);
-# else /* ACE_USES_WINCE_SEMA_SIMULATION */
- // Can't use Win32 API on our simulated semaphores.
- result = ACE_OS::sema_wait (&cv->sema_,
- ACE_Time_Value (0, msec_timeout * 1000));
-# endif /* ACE_USES_WINCE_SEMA_SIMULATION */
-# elif defined (ACE_PSOS)
- // Inline the call to ACE_OS::sema_wait () because it takes an
- // ACE_Time_Value argument. Avoid the cost of that conversion . . .
- u_long ticks = (KC_TICKS2SEC * msec_timeout) / ACE_ONE_SECOND_IN_MSECS;
- //Tick set to 0 tells pSOS to wait forever is SM_WAIT is set.
- if(ticks == 0)
- result = ::sm_p (cv->sema_.sema_, SM_NOWAIT, ticks); //no timeout
- else
- result = ::sm_p (cv->sema_.sema_, SM_WAIT, ticks);
-# elif defined (VXWORKS)
- // Inline the call to ACE_OS::sema_wait () because it takes an
- // ACE_Time_Value argument. Avoid the cost of that conversion . . .
- int ticks_per_sec = ::sysClkRateGet ();
- int ticks = msec_timeout * ticks_per_sec / ACE_ONE_SECOND_IN_MSECS;
- result = ::semTake (cv->sema_.sema_, ticks);
-# endif /* ACE_WIN32 || VXWORKS */
- }
-
- // Reacquire lock to avoid race conditions.
- ACE_OS::thread_mutex_lock (&cv->waiters_lock_);
- cv->waiters_--;
-
- int last_waiter = cv->was_broadcast_ && cv->waiters_ == 0;
-
- ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
-
-# if defined (ACE_WIN32)
- if (result != WAIT_OBJECT_0)
- {
- switch (result)
- {
- case WAIT_TIMEOUT:
- error = ETIME;
- break;
- default:
- error = ::GetLastError ();
- break;
- }
- result = -1;
- }
-# elif defined (ACE_PSOS)
- if (result != 0)
- {
- switch (result)
- {
- case ERR_TIMEOUT: // Timeout occured with SM_WAIT
- case ERR_NOMSG: // Didn't acquire semaphore w/ SM_NOWAIT (ticks=0)
- error = ETIME;
- break;
- default:
- error = errno;
- break;
- }
- result = -1;
- }
-# elif defined (VXWORKS)
- if (result == ERROR)
- {
- switch (errno)
- {
- case S_objLib_OBJ_TIMEOUT:
- error = ETIME;
- break;
- default:
- error = errno;
- break;
- }
- result = -1;
- }
-# endif /* ACE_WIN32 || VXWORKS */
-# if defined (ACE_HAS_SIGNAL_OBJECT_AND_WAIT)
- if (external_mutex->type_ == USYNC_PROCESS)
- {
- if (last_waiter)
- // This call atomically signals the <waiters_done_> event and
- // waits until it can acquire the mutex. This is important to
- // prevent unfairness.
- ACE_WIN32CALL (ACE_ADAPT_RETVAL (::SignalObjectAndWait (cv->waiters_done_,
- external_mutex->proc_mutex_,
- INFINITE, FALSE),
- result),
- int, -1, result);
- else
- // We must always regain the <external_Mutex>, even when
- // errors occur because that's the guarantee that we give to
- // our callers.
- ACE_OS::mutex_lock (external_mutex);
-
- return result;
- /* NOTREACHED */
- }
-# endif /* ACE_HAS_SIGNAL_OBJECT_AND_WAIT */
- // Note that this *must* be an "if" statement rather than an "else
- // if" statement since the caller may have timed out and hence the
- // result would have been -1 above.
- if (last_waiter)
- // Release the signaler/broadcaster if we're the last waiter.
-# if defined (ACE_WIN32)
- ACE_OS::event_signal (&cv->waiters_done_);
-# else
- ACE_OS::sema_post (&cv->waiters_done_);
-# endif /* ACE_WIN32 */
-
- // We must always regain the <external_mutex>, even when errors
- // occur because that's the guarantee that we give to our callers.
- ACE_OS::mutex_lock (external_mutex);
-
- return result;
-# endif /* ACE_HAS_WTHREADS || ACE_HAS_VXWORKS || ACE_PSOS */
-# else
- ACE_UNUSED_ARG (cv);
- ACE_UNUSED_ARG (external_mutex);
- ACE_UNUSED_ARG (timeout);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-# if defined (ACE_HAS_WTHREADS)
-int
-ACE_OS::cond_timedwait (ACE_cond_t *cv,
- ACE_thread_mutex_t *external_mutex,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_OS::cond_timedwait");
-# if defined (ACE_HAS_THREADS)
- // Handle the easy case first.
- if (timeout == 0)
- return ACE_OS::cond_wait (cv, external_mutex);
-
- // Prevent race conditions on the <waiters_> count.
- ACE_OS::thread_mutex_lock (&cv->waiters_lock_);
- cv->waiters_++;
- ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
-
- int result = 0;
- int error = 0;
- int msec_timeout;
-
- if (timeout->sec () == 0 && timeout->usec () == 0)
- msec_timeout = 0; // Do a "poll."
- else
- {
- // Note that we must convert between absolute time (which is
- // passed as a parameter) and relative time (which is what
- // WaitForSingleObjects() expects).
- ACE_Time_Value relative_time (*timeout - ACE_OS::gettimeofday ());
-
- // Watchout for situations where a context switch has caused the
- // current time to be > the timeout.
- if (relative_time < ACE_Time_Value::zero)
- msec_timeout = 0;
- else
- msec_timeout = relative_time.msec ();
- }
-
- // We keep the lock held just long enough to increment the count of
- // waiters by one. Note that we can't keep it held across the call
- // to WaitForSingleObject since that will deadlock other calls to
- // ACE_OS::cond_signal().
- if (ACE_OS::thread_mutex_unlock (external_mutex) != 0)
- return -1;
-
- // Wait to be awakened by a ACE_OS::signal() or ACE_OS::broadcast().
-# if !defined (ACE_USES_WINCE_SEMA_SIMULATION)
- result = ::WaitForSingleObject (cv->sema_, msec_timeout);
-# else
- // Can't use Win32 API on simulated semaphores.
- result = ACE_OS::sema_wait (&cv->sema_,
- ACE_Time_Value (0, msec_timeout * 1000));
-
- if (result != WAIT_OBJECT_0 && errno == ETIME)
- result = WAIT_TIMEOUT;
-
-# endif /* ACE_USES_WINCE_SEMA_SIMULATION */
-
- // Reacquire lock to avoid race conditions.
- ACE_OS::thread_mutex_lock (&cv->waiters_lock_);
-
- cv->waiters_--;
-
- int last_waiter = cv->was_broadcast_ && cv->waiters_ == 0;
-
- ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
-
- if (result != WAIT_OBJECT_0)
- {
- switch (result)
- {
- case WAIT_TIMEOUT:
- error = ETIME;
- break;
- default:
- error = ::GetLastError ();
- break;
- }
- result = -1;
- }
-
- if (last_waiter)
- // Release the signaler/broadcaster if we're the last waiter.
- ACE_OS::event_signal (&cv->waiters_done_);
-
- // We must always regain the <external_mutex>, even when errors
- // occur because that's the guarantee that we give to our callers.
- ACE_OS::thread_mutex_lock (external_mutex);
- errno = error;
- return result;
-# else
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-int
-ACE_OS::cond_wait (ACE_cond_t *cv,
- ACE_thread_mutex_t *external_mutex)
-{
- ACE_TRACE ("ACE_OS::cond_wait");
-# if defined (ACE_HAS_THREADS)
- ACE_OS::thread_mutex_lock (&cv->waiters_lock_);
- cv->waiters_++;
- ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
-
- int result = 0;
- int error = 0;
-
- // We keep the lock held just long enough to increment the count of
- // waiters by one. Note that we can't keep it held across the call
- // to ACE_OS::sema_wait() since that will deadlock other calls to
- // ACE_OS::cond_signal().
- if (ACE_OS::thread_mutex_unlock (external_mutex) != 0)
- return -1;
-
- // Wait to be awakened by a ACE_OS::cond_signal() or
- // ACE_OS::cond_broadcast().
-# if !defined (ACE_USES_WINCE_SEMA_SIMULATION)
- result = ::WaitForSingleObject (cv->sema_, INFINITE);
-# else
- // Can't use Win32 API on simulated semaphores.
- result = ACE_OS::sema_wait (&cv->sema_);
-
- if (result != WAIT_OBJECT_0 && errno == ETIME)
- result = WAIT_TIMEOUT;
-
-# endif /* ACE_USES_WINCE_SEMA_SIMULATION */
-
- // Reacquire lock to avoid race conditions.
- ACE_OS::thread_mutex_lock (&cv->waiters_lock_);
-
- cv->waiters_--;
-
- int last_waiter = cv->was_broadcast_ && cv->waiters_ == 0;
-
- ACE_OS::thread_mutex_unlock (&cv->waiters_lock_);
-
- if (result != WAIT_OBJECT_0)
- {
- switch (result)
- {
- case WAIT_TIMEOUT:
- error = ETIME;
- break;
- default:
- error = ::GetLastError ();
- break;
- }
- }
- else if (last_waiter)
- // Release the signaler/broadcaster if we're the last waiter.
- ACE_OS::event_signal (&cv->waiters_done_);
-
- // We must always regain the <external_mutex>, even when errors
- // occur because that's the guarantee that we give to our callers.
- ACE_OS::thread_mutex_lock (external_mutex);
-
- // Reset errno in case mutex_lock() also fails...
- errno = error;
- return result;
-# else
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-# endif /* ACE_HAS_WTHREADS */
-#endif /* ACE_LACKS_COND_T */
-
-void
-ACE_OS::exit (int status)
-{
- ACE_TRACE ("ACE_OS::exit");
-
-#if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) && !defined (ACE_HAS_WINCE) && !defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER)
- // Shut down the ACE_Object_Manager, if it had registered its exit_hook.
- // With ACE_HAS_NONSTATIC_OBJECT_MANAGER, the ACE_Object_Manager is
- // instantiated on the main's stack. ::exit () doesn't destroy it.
- if (exit_hook_)
- (*exit_hook_) ();
-#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */
-
-#if !defined (ACE_HAS_WINCE)
-# if defined (ACE_WIN32)
- ::ExitProcess ((UINT) status);
-# elif defined (ACE_PSOSIM)
- ::u_exit (status);
-# else
- ::exit (status);
-# endif /* ACE_WIN32 */
-#else
- // @@ This is not exactly the same as ExitProcess. But this is the
- // closest one I can get.
- ::TerminateProcess (::GetCurrentProcess (), status);
-#endif /* ACE_HAS_WINCE */
-}
-
-# if defined (ACE_PSOS)
-
-// bit masks and shifts for prying info out of the pSOS time encoding
-const u_long ACE_PSOS_Time_t::year_mask = 0x0000FFFFul;
-const u_long ACE_PSOS_Time_t::month_mask = 0x000000FFul;
-const u_long ACE_PSOS_Time_t::day_mask = 0x000000FFul;
-const u_long ACE_PSOS_Time_t::hour_mask = 0x0000FFFFul;
-const u_long ACE_PSOS_Time_t::minute_mask = 0x000000FFul;
-const u_long ACE_PSOS_Time_t::second_mask = 0x000000FFul;
-const int ACE_PSOS_Time_t::year_shift = 16;
-const int ACE_PSOS_Time_t::month_shift = 8;
-const int ACE_PSOS_Time_t::hour_shift = 16;
-const int ACE_PSOS_Time_t::minute_shift = 8;
-const int ACE_PSOS_Time_t::year_origin = 1900;
-const int ACE_PSOS_Time_t::month_origin = 1;
-
-// maximum number of clock ticks supported
-const u_long ACE_PSOS_Time_t::max_ticks = ~0UL;
-
-ACE_PSOS_Time_t::ACE_PSOS_Time_t (void)
- : date_ (0),
- time_ (0),
- ticks_ (0)
-{
-}
-
-// default ctor: date, time, and ticks all zeroed
-
-ACE_PSOS_Time_t::ACE_PSOS_Time_t (const timespec_t& t)
-{
- struct tm* tm_struct = ACE_OS::gmtime (&(t.tv_sec));
-
- // Encode date values from tm struct into pSOS date bit array.
- date_ = (ACE_PSOS_Time_t::year_mask &
- ACE_static_cast (u_long,
- tm_struct->tm_year + ACE_PSOS_Time_t::year_origin)) <<
- ACE_PSOS_Time_t::year_shift;
- date_ |= (ACE_PSOS_Time_t::month_mask &
- ACE_static_cast (u_long,
- tm_struct->tm_mon + ACE_PSOS_Time_t::month_origin)) <<
- ACE_PSOS_Time_t::month_shift;
- date_ |= ACE_PSOS_Time_t::day_mask &
- ACE_static_cast (u_long, tm_struct->tm_mday);
- // Encode time values from tm struct into pSOS time bit array.
- time_ = (ACE_PSOS_Time_t::hour_mask &
- ACE_static_cast (u_long, tm_struct->tm_hour)) <<
- ACE_PSOS_Time_t::hour_shift;
- time_ |= (ACE_PSOS_Time_t::minute_mask &
- ACE_static_cast (u_long, tm_struct->tm_min)) <<
- ACE_PSOS_Time_t::minute_shift;
- time_ |= ACE_PSOS_Time_t::second_mask &
- ACE_static_cast (u_int, tm_struct->tm_sec);
-
- // encode nanoseconds as system clock ticks
- ticks_ = ACE_static_cast (u_long,
- ((ACE_static_cast (double, t.tv_nsec) *
- ACE_static_cast (double, KC_TICKS2SEC)) /
- ACE_static_cast (double, 1000000000)));
-
-}
-
-// ctor from a timespec_t
-
-ACE_PSOS_Time_t::operator timespec_t (void)
-{
- struct tm tm_struct;
-
- // Decode date and time bit arrays and fill in fields of tm_struct.
-
- tm_struct.tm_year =
- ACE_static_cast (int, (ACE_PSOS_Time_t::year_mask &
- (date_ >> ACE_PSOS_Time_t::year_shift))) -
- ACE_PSOS_Time_t::year_origin;
- tm_struct.tm_mon =
- ACE_static_cast (int, (ACE_PSOS_Time_t::month_mask &
- (date_ >> ACE_PSOS_Time_t::month_shift))) -
- ACE_PSOS_Time_t::month_origin;
- tm_struct.tm_mday =
- ACE_static_cast (int, (ACE_PSOS_Time_t::day_mask & date_));
- tm_struct.tm_hour =
- ACE_static_cast (int, (ACE_PSOS_Time_t::hour_mask &
- (time_ >> ACE_PSOS_Time_t::hour_shift)));
- tm_struct.tm_min =
- ACE_static_cast (int, (ACE_PSOS_Time_t::minute_mask &
- (time_ >> ACE_PSOS_Time_t::minute_shift)));
- tm_struct.tm_sec =
- ACE_static_cast (int, (ACE_PSOS_Time_t::second_mask & time_));
-
- // Indicate values we don't know as negative numbers.
- tm_struct.tm_wday = -1;
- tm_struct.tm_yday = -1;
- tm_struct.tm_isdst = -1;
-
- timespec_t t;
-
- // Convert calendar time to time struct.
- t.tv_sec = ACE_OS::mktime (&tm_struct);
-
- // Encode nanoseconds as system clock ticks.
- t.tv_nsec = ACE_static_cast (long,
- ((ACE_static_cast (double, ticks_) *
- ACE_static_cast (double, 1000000000)) /
- ACE_static_cast (double, KC_TICKS2SEC)));
- return t;
-}
-
-// type cast operator (to a timespec_t)
-
-u_long
-ACE_PSOS_Time_t::get_system_time (ACE_PSOS_Time_t& t)
-{
- u_long ret_val = 0;
-
-# if defined (ACE_PSOSIM) // system time is broken in simulator.
- timeval tv;
- int result = 0;
- ACE_OSCALL (::gettimeofday (&tv, 0), int, -1, result);
- if (result == -1)
- return 1;
-
- ACE_Time_Value atv (tv);
- timespec ts = atv;
- ACE_PSOS_Time_t pt (ts);
- t.date_ = pt.date_;
- t.time_ = pt.time_;
- t.ticks_ = pt.ticks_;
-# else
- ret_val = tm_get (&(t.date_), &(t.time_), &(t.ticks_));
-# endif /* ACE_PSOSIM */
- return ret_val;
-}
-
-// Static member function to get current system time.
-
-u_long
-ACE_PSOS_Time_t::set_system_time (const ACE_PSOS_Time_t& t)
-{
- return tm_set (t.date_, t.time_, t.ticks_);
-}
-
-// Static member function to set current system time.
-
-# if defined (ACE_PSOSIM)
-
-u_long
-ACE_PSOS_Time_t::init_simulator_time (void)
-{
- // This is a hack using a direct UNIX system call, because the
- // appropriate ACE_OS method ultimately uses the pSOS tm_get
- // function, which would fail because the simulator's system time is
- // uninitialized (chicken and egg).
- timeval t;
- int result = 0;
- ACE_OSCALL (::gettimeofday (&t, 0),
- int,
- -1,
- result);
-
- if (result == -1)
- return 1;
- else
- {
- ACE_Time_Value tv (t);
- timespec ts = tv;
- ACE_PSOS_Time_t pt (ts);
- u_long ret_val =
- ACE_PSOS_Time_t::set_system_time (pt);
- return ret_val;
-
- }
-}
-
-// Static member function to initialize system time, using UNIX calls.
-
-# endif /* ACE_PSOSIM */
-# endif /* ACE_PSOS && ! ACE_PSOS_DIAB_MIPS */
-
-# if defined (__DGUX) && defined (ACE_HAS_THREADS) && defined (_POSIX4A_DRAFT10_SOURCE)
-extern "C" int __d6_sigwait (sigset_t *set);
-
-extern "C" int __d10_sigwait (const sigset_t *set, int *sig)
-{
- sigset_t unconst_set = *set;
- int caught_sig = __d6_sigwait (&unconst_set);
-
- if (caught == -1)
- return -1;
-
- *sig = caught_sig;
- return 0;
-}
-# endif /* __DGUX && PTHREADS && _POSIX4A_DRAFT10_SOURCE */
-
-# if defined (CHORUS)
-extern "C"
-void
-ace_sysconf_dump (void)
-{
- ACE_Time_Value time = ACE_OS::gettimeofday ();
-
- if (time == -1)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Cannot get time\n")));
- else
- time.dump ();
-
- ACE_DEBUG ((LM_DEBUG,
- "ARG_MAX \t= \t%d\t"
- "DELAYTIMER_MAX \t= \t%d\n"
- "_MQ_OPEN_MAX \t= \t%d\t"
- "_MQ_PRIO_MAX \t= \t%d\n"
- "_MQ_DFL_MSGSIZE\t= \t%d\t"
- "_MQ_DFL_MAXMSGNB\t= \t%d\n"
- "_MQ_PATHMAX \t= \t%d\n"
- "NGROUPS_MAX \t= \t%d\t"
- "OPEN_MAX \t= \t%d\n"
- "PAGESIZE \t= \t%d\n"
- "PTHREAD_DESTRUCTOR_ITERATIONS \t= \t%d\n"
- "PTHREAD_KEYS_MAX \t= \t%d\n"
- "PTHREAD_STACK_MIN \t= \t%d\n"
- "PTHREAD_THREADS_MAX \t= \t%d\n"
- "SEM_VALUE_MAX \t= \t%d\n"
- "SEM_PATHMAX \t= \t%d\n"
- "TIMER_MAX \t= \t%d\n"
- "TZNAME_MAX \t= \t%d\n"
- "_POSIX_MESSAGE_PASSING \t= \t%d\n"
- "_POSIX_SEMAPHORES \t= \t%d\n"
- "_POSIX_SHARED_MEMORY_OBJECTS \t= \t%d\n"
- "_POSIX_THREADS \t= \t%d\n"
- "_POSIX_THREAD_ATTR_STACKADDR \t= \t%d\n"
- "_POSIX_THREAD_ATTR_STACKSIZE \t= \t%d\n"
- "_POSIX_THREAD_PRIORITY_SCHEDULING= \t%d\n"
- "_POSIX_THREAD_PRIO_INHERIT \t= \t%d\n"
- "_POSIX_THREAD_PRIO_PROTECT \t= \t%d\n"
- "_POSIX_THREAD_PROCESS_SHARED \t= \t%d\n"
- "_POSIX_THREAD_SAFE_FUNCTIONS \t= \t%d\n"
- "_POSIX_TIMERS \t= \t%d\n"
- "_POSIX_VERSION \t= \t%d\n",
- ACE_OS::sysconf (_SC_ARG_MAX),
- ACE_OS::sysconf (_SC_DELAYTIMER_MAX),
- ACE_OS::sysconf (_SC_MQ_OPEN_MAX),
- ACE_OS::sysconf (_SC_MQ_PRIO_MAX),
- ACE_OS::sysconf (_SC_MQ_DFL_MSGSIZE),
- ACE_OS::sysconf (_SC_MQ_DFL_MAXMSGNB),
- ACE_OS::sysconf (_SC_MQ_PATHMAX),
- ACE_OS::sysconf (_SC_NGROUPS_MAX),
- ACE_OS::sysconf (_SC_OPEN_MAX),
- ACE_OS::sysconf (_SC_PAGESIZE),
- ACE_OS::sysconf (_SC_PTHREAD_DESTRUCTOR_ITERATIONS),
- ACE_OS::sysconf (_SC_PTHREAD_KEYS_MAX),
- ACE_OS::sysconf (_SC_PTHREAD_STACK_MIN),
- ACE_OS::sysconf (_SC_PTHREAD_THREADS_MAX),
- ACE_OS::sysconf (_SC_SEM_VALUE_MAX),
- ACE_OS::sysconf (_SC_SHM_PATHMAX),
- ACE_OS::sysconf (_SC_TIMER_MAX),
- ACE_OS::sysconf (_SC_TZNAME_MAX),
- ACE_OS::sysconf (_SC_MESSAGE_PASSING),
- ACE_OS::sysconf (_SC_SEMAPHORES),
- ACE_OS::sysconf (_SC_SHARED_MEMORY_OBJECTS),
- ACE_OS::sysconf (_SC_THREADS),
- ACE_OS::sysconf (_SC_THREAD_ATTR_STACKADDR),
- ACE_OS::sysconf (_SC_THREAD_ATTR_STACKSIZE),
- ACE_OS::sysconf (_SC_THREAD_PRIORITY_SCHEDULING),
- ACE_OS::sysconf (_SC_THREAD_PRIO_INHERIT),
- ACE_OS::sysconf (_SC_THREAD_PRIO_PROTECT),
- ACE_OS::sysconf (_SC_THREAD_PROCESS_SHARED),
- ACE_OS::sysconf (_SC_THREAD_SAFE_FUNCTIONS),
- ACE_OS::sysconf (_SC_TIMERS),
- ACE_OS::sysconf (_SC_VERSION)));
-}
-# endif /* CHORUS */
-
-# define ACE_OS_PREALLOCATE_OBJECT(TYPE, ID)\
- {\
- TYPE *obj_p = 0;\
- ACE_NEW_RETURN (obj_p, TYPE, -1);\
- preallocated_object[ID] = (void *) obj_p;\
- }
-# define ACE_OS_DELETE_PREALLOCATED_OBJECT(TYPE, ID)\
- delete (TYPE *) preallocated_object[ID];\
- preallocated_object[ID] = 0;
-
-ACE_Object_Manager_Base::ACE_Object_Manager_Base (void)
- : object_manager_state_ (OBJ_MAN_UNINITIALIZED)
- , dynamically_allocated_ (0)
- , next_ (0)
-{
-}
-
-ACE_Object_Manager_Base::~ACE_Object_Manager_Base (void)
-{
-#if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
- // Clear the flag so that fini () doesn't delete again.
- dynamically_allocated_ = 0;
-#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
-}
-
-int
-ACE_Object_Manager_Base::starting_up_i ()
-{
- return object_manager_state_ < OBJ_MAN_INITIALIZED;
-}
-
-int
-ACE_Object_Manager_Base::shutting_down_i ()
-{
- return object_manager_state_ > OBJ_MAN_INITIALIZED;
-}
-
-extern "C"
-void
-ACE_OS_Object_Manager_Internal_Exit_Hook (void)
-{
- if (ACE_OS_Object_Manager::instance_)
- ACE_OS_Object_Manager::instance ()->fini ();
-}
-
-ACE_OS_Object_Manager *ACE_OS_Object_Manager::instance_ = 0;
-
-void *ACE_OS_Object_Manager::preallocated_object[
- ACE_OS_Object_Manager::ACE_OS_PREALLOCATED_OBJECTS] = { 0 };
-
-ACE_OS_Object_Manager::ACE_OS_Object_Manager (void)
- // default_mask_ isn't initialized, because it's defined by <init>.
- : thread_hook_ (0),
- exit_info_ ()
-{
- // If instance_ was not 0, then another ACE_OS_Object_Manager has
- // already been instantiated (it is likely to be one initialized by
- // way of library/DLL loading). Let this one go through
- // construction in case there really is a good reason for it (like,
- // ACE is a static/archive library, and this one is the non-static
- // instance (with ACE_HAS_NONSTATIC_OBJECT_MANAGER, or the user has
- // a good reason for creating a separate one) but the original one
- // will be the one retrieved from calls to
- // ACE_Object_Manager::instance().
-
- // Be sure that no further instances are created via instance ().
- if (instance_ == 0)
- instance_ = this;
-
- init ();
-}
-
-ACE_OS_Object_Manager::~ACE_OS_Object_Manager (void)
-{
- dynamically_allocated_ = 0; // Don't delete this again in fini()
- fini ();
-}
-
-sigset_t *
-ACE_OS_Object_Manager::default_mask (void)
-{
- return ACE_OS_Object_Manager::instance ()->default_mask_;
-}
-
-ACE_Thread_Hook *
-ACE_OS_Object_Manager::thread_hook (void)
-{
- return ACE_OS_Object_Manager::instance ()->thread_hook_;
-}
-
-ACE_Thread_Hook *
-ACE_OS_Object_Manager::thread_hook (ACE_Thread_Hook *new_thread_hook)
-{
- ACE_OS_Object_Manager *os_om = ACE_OS_Object_Manager::instance ();
- ACE_Thread_Hook *old_hook = os_om->thread_hook_;
- os_om->thread_hook_ = new_thread_hook;
- return old_hook;
-}
-
-ACE_OS_Object_Manager *
-ACE_OS_Object_Manager::instance (void)
-{
- // This function should be called during construction of static
- // instances, or before any other threads have been created in the
- // process. So, it's not thread safe.
-
- if (instance_ == 0)
- {
- ACE_OS_Object_Manager *instance_pointer;
-
- ACE_NEW_RETURN (instance_pointer,
- ACE_OS_Object_Manager,
- 0);
- ACE_ASSERT (instance_pointer == instance_);
-
- instance_pointer->dynamically_allocated_ = 1;
-
- }
-
- return instance_;
-}
-
-int
-ACE_OS_Object_Manager::init (void)
-{
- if (starting_up_i ())
- {
- // First, indicate that this ACE_OS_Object_Manager instance is being
- // initialized.
- object_manager_state_ = OBJ_MAN_INITIALIZING;
-
- if (this == instance_)
- {
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
- ACE_CE_Errno::init ();
-# endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
- ACE_OS_PREALLOCATE_OBJECT (ACE_thread_mutex_t, ACE_OS_MONITOR_LOCK)
- if (ACE_OS::thread_mutex_init (ACE_reinterpret_cast (
- ACE_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[
- ACE_OS_MONITOR_LOCK])) != 0)
- ACE_OS_Object_Manager::print_error_message (
- __LINE__, ACE_TEXT ("ACE_OS_MONITOR_LOCK"));
- ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t,
- ACE_TSS_CLEANUP_LOCK)
- if (ACE_OS::recursive_mutex_init (ACE_reinterpret_cast (
- ACE_recursive_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[
- ACE_TSS_CLEANUP_LOCK])) != 0)
- ACE_OS_Object_Manager::print_error_message (
- __LINE__, ACE_TEXT ("ACE_TSS_CLEANUP_LOCK"));
- ACE_OS_PREALLOCATE_OBJECT (ACE_thread_mutex_t,
- ACE_LOG_MSG_INSTANCE_LOCK)
- if (ACE_OS::thread_mutex_init (ACE_reinterpret_cast (
- ACE_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[
- ACE_LOG_MSG_INSTANCE_LOCK])) != 0)
- ACE_OS_Object_Manager::print_error_message (
- __LINE__, ACE_TEXT ("ACE_LOG_MSG_INSTANCE_LOCK"));
-# if defined (ACE_HAS_TSS_EMULATION)
- ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t,
- ACE_TSS_KEY_LOCK)
- if (ACE_OS::recursive_mutex_init (ACE_reinterpret_cast (
- ACE_recursive_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[
- ACE_TSS_KEY_LOCK])) != 0)
- ACE_OS_Object_Manager::print_error_message (
- __LINE__, ACE_TEXT ("ACE_TSS_KEY_LOCK"));
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t,
- ACE_TSS_BASE_LOCK)
- if (ACE_OS::recursive_mutex_init (ACE_reinterpret_cast (
- ACE_recursive_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[
- ACE_TSS_BASE_LOCK])) != 0)
- ACE_OS_Object_Manager::print_error_message (
- __LINE__, ACE_TEXT ("ACE_TSS_BASE_LOCK"));
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
-# endif /* ACE_HAS_TSS_EMULATION */
-# endif /* ACE_MT_SAFE */
-
- // Open Winsock (no-op on other platforms).
- ACE_OS::socket_init (ACE_WSOCK_VERSION);
-
- // Register the exit hook, for use by ACE_OS::exit ().
- ACE_OS::set_exit_hook (&ACE_OS_Object_Manager_Internal_Exit_Hook);
- }
-
- ACE_NEW_RETURN (default_mask_, sigset_t, -1);
- ACE_OS::sigfillset (default_mask_);
-
- // Finally, indicate that the ACE_OS_Object_Manager instance has
- // been initialized.
- object_manager_state_ = OBJ_MAN_INITIALIZED;
-
-# if defined (ACE_WIN32)
- ACE_OS::win32_versioninfo_.dwOSVersionInfoSize =
- sizeof (OSVERSIONINFO);
- ::GetVersionEx (&ACE_OS::win32_versioninfo_);
-# endif /* ACE_WIN32 */
- return 0;
- } else {
- // Had already initialized.
- return 1;
- }
-}
-
-// Clean up an ACE_OS_Object_Manager. There can be instances of this object
-// other than The Instance. This can happen if a user creates one for some
-// reason. All objects clean up their per-object information and managed
-// objects, but only The Instance cleans up the static preallocated objects.
-int
-ACE_OS_Object_Manager::fini (void)
-{
- if (instance_ == 0 || shutting_down_i ())
- // Too late. Or, maybe too early. Either fini () has already
- // been called, or init () was never called.
- return object_manager_state_ == OBJ_MAN_SHUT_DOWN ? 1 : -1;
-
- // No mutex here. Only the main thread should destroy the singleton
- // ACE_OS_Object_Manager instance.
-
- // Indicate that the ACE_OS_Object_Manager instance is being shut
- // down. This object manager should be the last one to be shut
- // down.
- object_manager_state_ = OBJ_MAN_SHUTTING_DOWN;
-
- // If another Object_Manager has registered for termination, do it.
- if (next_)
- {
- next_->fini ();
- next_ = 0; // Protect against recursive calls.
- }
-
- // Call all registered cleanup hooks, in reverse order of
- // registration.
- exit_info_.call_hooks ();
-
- // Only clean up preallocated objects when the singleton Instance is being
- // destroyed.
- if (this == instance_)
- {
- // Close down Winsock (no-op on other platforms).
- ACE_OS::socket_fini ();
-
-#if ! defined (ACE_HAS_STATIC_PREALLOCATION)
- // Cleanup the dynamically preallocated objects.
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# if !defined (__Lynx__)
- // LynxOS 3.0.0 has problems with this after fork.
- if (ACE_OS::thread_mutex_destroy (ACE_reinterpret_cast (
- ACE_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[ACE_OS_MONITOR_LOCK])) != 0)
- ACE_OS_Object_Manager::print_error_message (
- __LINE__, ACE_TEXT ("ACE_OS_MONITOR_LOCK"));
-# endif /* ! __Lynx__ */
- ACE_OS_DELETE_PREALLOCATED_OBJECT (ACE_thread_mutex_t,
- ACE_OS_MONITOR_LOCK)
-# if !defined (__Lynx__)
- // LynxOS 3.0.0 has problems with this after fork.
- if (ACE_OS::recursive_mutex_destroy (ACE_reinterpret_cast (
- ACE_recursive_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[
- ACE_TSS_CLEANUP_LOCK])) != 0)
- ACE_OS_Object_Manager::print_error_message (
- __LINE__, ACE_TEXT ("ACE_TSS_CLEANUP_LOCK"));
-# endif /* ! __Lynx__ */
- ACE_OS_DELETE_PREALLOCATED_OBJECT (ACE_recursive_thread_mutex_t,
- ACE_TSS_CLEANUP_LOCK)
-# if !defined (__Lynx__)
- // LynxOS 3.0.0 has problems with this after fork.
- if (ACE_OS::thread_mutex_destroy (ACE_reinterpret_cast (
- ACE_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object
- [ACE_LOG_MSG_INSTANCE_LOCK])) != 0)
- ACE_OS_Object_Manager::print_error_message (
- __LINE__, ACE_TEXT ("ACE_LOG_MSG_INSTANCE_LOCK "));
-# endif /* ! __Lynx__ */
- ACE_OS_DELETE_PREALLOCATED_OBJECT (ACE_thread_mutex_t,
- ACE_LOG_MSG_INSTANCE_LOCK)
-# if defined (ACE_HAS_TSS_EMULATION)
-# if !defined (__Lynx__)
- // LynxOS 3.0.0 has problems with this after fork.
- if (ACE_OS::recursive_mutex_destroy (ACE_reinterpret_cast (
- ACE_recursive_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[
- ACE_TSS_KEY_LOCK])) != 0)
- ACE_OS_Object_Manager::print_error_message (
- __LINE__, ACE_TEXT ("ACE_TSS_KEY_LOCK"));
-# endif /* ! __Lynx__ */
- ACE_OS_DELETE_PREALLOCATED_OBJECT (ACE_recursive_thread_mutex_t,
- ACE_TSS_KEY_LOCK)
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
-# if !defined (__Lynx__)
- // LynxOS 3.0.0 has problems with this after fork.
- if (ACE_OS::recursive_mutex_destroy (ACE_reinterpret_cast (
- ACE_recursive_thread_mutex_t *,
- ACE_OS_Object_Manager::preallocated_object[
- ACE_TSS_BASE_LOCK])) != 0)
- ACE_OS_Object_Manager::print_error_message (
- __LINE__, ACE_TEXT ("ACE_TSS_BASE_LOCK"));
-# endif /* ! __Lynx__ */
- ACE_OS_DELETE_PREALLOCATED_OBJECT (ACE_recursive_thread_mutex_t,
- ACE_TSS_BASE_LOCK)
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
-# endif /* ACE_HAS_TSS_EMULATION */
-# if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
- ACE_CE_Errno::fini ();
-# endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
-# endif /* ACE_MT_SAFE */
-#endif /* ! ACE_HAS_STATIC_PREALLOCATION */
- }
-
- delete default_mask_;
- default_mask_ = 0;
-
- // Indicate that this ACE_OS_Object_Manager instance has been shut down.
- object_manager_state_ = OBJ_MAN_SHUT_DOWN;
-
- if (dynamically_allocated_)
- {
- delete this;
- }
-
- if (this == instance_)
- instance_ = 0;
-
- return 0;
-}
-
-int ace_exit_hook_marker = 0;
-
-int
-ACE_OS_Object_Manager::at_exit (ACE_EXIT_HOOK func)
-{
- return exit_info_.at_exit_i (&ace_exit_hook_marker,
- ACE_reinterpret_cast (ACE_CLEANUP_FUNC, func),
- 0);
-}
-
-void
-ACE_OS_Object_Manager::print_error_message (u_int line_number,
- const ACE_TCHAR *message)
-{
- // To avoid duplication of these const strings in OS.o.
-#if !defined (ACE_HAS_WINCE)
- fprintf (stderr, "ace/OS.cpp, line %u: %s ",
- line_number,
- message);
- perror ("failed");
-#else
- // @@ Need to use the following information.
- ACE_UNUSED_ARG (line_number);
- ACE_UNUSED_ARG (message);
-
- ACE_TCHAR *lpMsgBuf = 0;
- ::FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- ::GetLastError (),
- MAKELANGID (LANG_NEUTRAL,
- SUBLANG_DEFAULT),
- // Default language
- (ACE_TCHAR *) &lpMsgBuf,
- 0,
- NULL);
- ::MessageBox (NULL,
- lpMsgBuf,
- ACE_TEXT ("ACE_OS error"),
- MB_OK);
-#endif
-}
-
-int
-ACE_OS_Object_Manager::starting_up (void)
-{
- return ACE_OS_Object_Manager::instance_
- ? instance_->starting_up_i ()
- : 1;
-}
-
-int
-ACE_OS_Object_Manager::shutting_down (void)
-{
- return ACE_OS_Object_Manager::instance_
- ? instance_->shutting_down_i ()
- : 1;
-}
-
-#if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
-class ACE_Export ACE_OS_Object_Manager_Manager
- // = TITLE
- // Ensure that the <ACE_OS_Object_Manager> gets initialized at
- // program startup, and destroyed at program termination.
- //
- // = DESCRIPTION
- // Without ACE_HAS_NONSTATIC_OBJECT_MANAGER, a static instance of this
- // class is created. Therefore, it gets created before main ()
- // is called. And it gets destroyed after main () returns.
-{
-public:
- ACE_OS_Object_Manager_Manager (void);
- ~ACE_OS_Object_Manager_Manager (void);
-
-private:
- ACE_thread_t saved_main_thread_id_;
- // Save the main thread ID, so that destruction can be suppressed.
-};
-
-ACE_OS_Object_Manager_Manager::ACE_OS_Object_Manager_Manager (void)
- : saved_main_thread_id_ (ACE_OS::thr_self ())
-{
- // Ensure that the Object_Manager gets initialized before any
- // application threads have been spawned. Because this will be called
- // during construction of static objects, that should always be the
- // case.
- (void) ACE_OS_Object_Manager::instance ();
-}
-
-ACE_OS_Object_Manager_Manager::~ACE_OS_Object_Manager_Manager (void)
-{
- if (ACE_OS::thr_equal (ACE_OS::thr_self (),
- saved_main_thread_id_))
- {
- delete ACE_OS_Object_Manager::instance_;
- ACE_OS_Object_Manager::instance_ = 0;
- }
- // else if this destructor is not called by the main thread, then do
- // not delete the ACE_OS_Object_Manager. That causes problems, on
- // WIN32 at least.
-}
-
-static ACE_OS_Object_Manager_Manager ACE_OS_Object_Manager_Manager_instance;
-#endif /* ! ACE_HAS_NONSTATIC_OBJECT_MANAGER */
-
-# if defined (ACE_HAS_WINCE)
-# if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
-ACE_CE_Errno *ACE_CE_Errno::instance_ = 0;
-DWORD ACE_CE_Errno::errno_key_ = 0xffffffff;
-
-void
-ACE_CE_Errno::init ()
-{
- ACE_CE_Errno::instance_ = new ACE_CE_Errno ();
- ACE_CE_Errno::errno_key_ = TlsAlloc ();
-}
-
-void
-ACE_CE_Errno::fini ()
-{
- TlsFree (ACE_CE_Errno::errno_key_);
- delete ACE_CE_Errno::instance_;
- ACE_CE_Errno::instance_ = 0;
-}
-# endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
-
-ACE_CE_Bridge *ACE_CE_Bridge::default_text_bridge_ = 0;
-
-ACE_CE_Bridge::ACE_CE_Bridge (void)
- : text_output_ (0),
- notification_ (0),
- idc_ (0)
-{
-}
-
-ACE_CE_Bridge::ACE_CE_Bridge (HWND w, int n, int i)
- : text_output_ (w),
- notification_ (n),
- idc_ (i)
-{
-}
-
-void
-ACE_CE_Bridge::set_window (HWND w, int n, int i)
-{
- this->text_output_ = w;
- this->notification_ = n;
- this->idc_ = i;
-}
-
-ACE_CE_Bridge::~ACE_CE_Bridge (void)
-{
- // This method needs to be defined because there seems to be a bug
- // in CE's compiler.
-}
-
-void
-ACE_CE_Bridge::set_self_default (void)
-{
- ACE_CE_Bridge::default_text_bridge_ = this;
-}
-
-int
-ACE_CE_Bridge::notification (void)
-{
- return this->notification_;
-}
-
-int
-ACE_CE_Bridge::idc (void)
-{
- return this->idc_;
-}
-
-HWND
-ACE_CE_Bridge::window (void)
-{
- return this->text_output_;
-}
-
-ACE_CE_Bridge *
-ACE_CE_Bridge::get_default_winbridge (void)
-{
- return ACE_CE_Bridge::default_text_bridge_;
-}
-
-int
-ACE_CE_Bridge::write_msg (const ACE_TCHAR *str)
-{
- ACE_TCHAR *s = ACE_OS::strdup (str);
- return PostMessage (this->text_output_,
- WM_COMMAND,
- MAKEWORD (this->idc_,
- this->notification_),
- (long)((void *) s));
-}
-
-#if 0
-int
-ACE_CE_Bridge::write_msg (CString *s)
-{
- // Don't ask!
- return PostMessage (this->text_output_,
- WM_COMMAND,
- MAKEWORD (this->idc_,
- this->notification_),
- (long)((void *) s));
-}
-#endif /* 0 */
-
-// **** Warning ****
-// You should not use the following function under CE at all. This
-// function is used to make Svc_Conf_l.cpp compile under WinCE. It
-// might not do what it is expected to do under regular environments.
-// **** Warning ****
-
-# if defined (UNDER_CE) && (UNDER_CE < 211)
-void
-exit (int status)
-{
-# if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) && !defined (ACE_HAS_WINCE) && !defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER)
- // Shut down the ACE_Object_Manager, if it had registered its exit_hook.
- // With ACE_HAS_NONSTATIC_OBJECT_MANAGER, the ACE_Object_Manager is
- // instantiated on the main's stack. ::exit () doesn't destroy it.
- if (exit_hook_)
- (*exit_hook_) ();
-# endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */
-
- ACE_OS::exit (status);
-}
-# endif /* UNDER_CE && UNDER_CE < 211 */
-# endif /* ACE_HAS_WINCE */
-
-#if defined (ACE_HAS_STRPTIME)
-# if defined (ACE_LACKS_NATIVE_STRPTIME)
-int
-ACE_OS::strptime_getnum (char *buf,
- int *num,
- int *bi,
- int *fi,
- int min,
- int max)
-{
- int i = 0, tmp = 0;
-
- while (isdigit (buf[i]))
- {
- tmp = (tmp * 10) + (buf[i] - '0');
- if (max && (tmp > max))
- return 0;
- i++;
- }
-
- if (tmp < min)
- return 0;
- else if (i)
- {
- *num = tmp;
- (*fi)++;
- *bi += i;
- return 1;
- }
- else
- return 0;
-}
-# endif /* ACE_LACKS_NATIVE_STRPTIME */
-
-char *
-ACE_OS::strptime (char *buf,
- const char *format,
- struct tm *tm)
-{
-#if !defined (ACE_HAS_WINCE)
-#if defined (ACE_LACKS_NATIVE_STRPTIME)
- int bi = 0;
- int fi = 0;
- int percent = 0;
-
- if (!buf || !format)
- return 0;
-
- while (format[fi] != '\0')
- {
- if (percent)
- {
- percent = 0;
- switch (format[fi])
- {
- case '%': // an escaped %
- if (buf[bi] == '%')
- {
- fi++; bi++;
- }
- else
- return buf + bi;
- break;
-
- /* not supported yet: weekday via locale long/short names
- case 'a': / * weekday via locale * /
- / * FALL THROUGH * /
- case 'A': / * long/short names * /
- break;
- */
-
- /* not supported yet:
- case 'b': / * month via locale * /
- / * FALL THROUGH * /
- case 'B': / * long/short names * /
- / * FALL THROUGH * /
- case 'h':
- break;
- */
-
- /* not supported yet:
- case 'c': / * %x %X * /
- break;
- */
-
- /* not supported yet:
- case 'C': / * date & time - * /
- / * locale long format * /
- break;
- */
-
- case 'd': /* day of month (1-31) */
- /* FALL THROUGH */
- case 'e':
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_mday, &bi, &fi, 1, 31))
- return buf + bi;
-
- break;
-
- case 'D': /* %m/%d/%y */
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_mon, &bi, &fi, 1, 12))
- return buf + bi;
-
- fi--;
- tm->tm_mon--;
-
- if (buf[bi] != '/')
- return buf + bi;
-
- bi++;
-
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_mday, &bi, &fi, 1, 31))
- return buf + bi;
-
- fi--;
- if (buf[bi] != '/')
- return buf + bi;
- bi++;
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_year, &bi, &fi, 0, 99))
- return buf + bi;
- if (tm->tm_year < 69)
- tm->tm_year += 100;
- break;
-
- case 'H': /* hour (0-23) */
- /* FALL THROUGH */
- case 'k':
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_hour, &bi, &fi, 0, 23))
- return buf + bi;
- break;
-
- /* not supported yet:
- case 'I': / * hour (0-12) * /
- / * FALL THROUGH * /
- case 'l':
- break;
- */
-
- case 'j': /* day of year (0-366) */
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_yday, &bi, &fi, 1, 366))
- return buf + bi;
-
- tm->tm_yday--;
- break;
-
- case 'm': /* an escaped % */
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_mon, &bi, &fi, 1, 12))
- return buf + bi;
-
- tm->tm_mon--;
- break;
-
- case 'M': /* minute (0-59) */
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_min, &bi, &fi, 0, 59))
- return buf + bi;
-
- break;
-
- /* not supported yet:
- case 'p': / * am or pm for locale * /
- break;
- */
-
- /* not supported yet:
- case 'r': / * %I:%M:%S %p * /
- break;
- */
-
- case 'R': /* %H:%M */
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_hour, &bi, &fi, 0, 23))
- return buf + bi;
-
- fi--;
- if (buf[bi] != ':')
- return buf + bi;
- bi++;
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_min, &bi, &fi, 0, 59))
- return buf + bi;
-
- break;
-
- case 'S': /* seconds (0-61) */
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_sec, &bi, &fi, 0, 61))
- return buf + bi;
- break;
-
- case 'T': /* %H:%M:%S */
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_hour, &bi, &fi, 0, 23))
- return buf + bi;
-
- fi--;
- if (buf[bi] != ':')
- return buf + bi;
- bi++;
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_min, &bi, &fi, 0, 59))
- return buf + bi;
-
- fi--;
- if (buf[bi] != ':')
- return buf + bi;
- bi++;
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_sec, &bi, &fi, 0, 61))
- return buf + bi;
-
- break;
-
- case 'w': /* day of week (0=Sun-6) */
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_wday, &bi, &fi, 0, 6))
- return buf + bi;
-
- break;
-
- /* not supported yet: date, based on locale
- case 'x': / * date, based on locale * /
- break;
- */
-
- /* not supported yet:
- case 'X': / * time, based on locale * /
- break;
- */
-
- case 'y': /* the year - 1900 (0-99) */
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_year, &bi, &fi, 0, 99))
- return buf + bi;
-
- if (tm->tm_year < 69)
- tm->tm_year += 100;
- break;
-
- case 'Y': /* the full year (1999) */
- if (!ACE_OS::strptime_getnum (buf + bi, &tm->tm_year, &bi, &fi, 0, 0))
- return buf + bi;
-
- tm->tm_year -= 1900;
- break;
-
- default: /* unrecognised */
- return buf + bi;
- } /* switch (format[fi]) */
-
- }
- else
- { /* if (percent) */
- if (format[fi] == '%')
- {
- percent = 1;
- fi++;
- }
- else
- {
- if (format[fi] == buf[bi])
- {
- fi++;
- bi++;
- }
- else
- return buf + bi;
- }
- } /* if (percent) */
- } /* while (format[fi] */
-
- return buf + bi;
-#else /* ! ACE_LACKS_NATIVE_STRPTIME */
- return ::strptime (buf,
- format,
- tm);
-#endif /* ! ACE_LACKS_NATIVE_STRPTIME */
-#else /* ! ACE_HAS_WINCE */
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (format);
- ACE_UNUSED_ARG (tm);
-
- ACE_NOTSUP_RETURN (0);
-#endif /* ! ACE_HAS_WINCE */
-}
-#endif /* ACE_HAS_STRPTIME */
-
-
-// You may be asking yourself, why are we doing this? Well, in winbase.h,
-// MS didn't follow their normal Api_FunctionA and Api_FunctionW style,
-// so we have to #undef their define to get access to the unicode version.
-// And because we don't want to #undef this for the users code, we keep
-// this method in the .cpp file.
-#if defined (ACE_WIN32) && defined (UNICODE) && !defined (ACE_USES_TCHAR)
-#undef GetEnvironmentStrings
-#endif /* ACE_WIN32 && UNICODE !ACE_USES_TCHAR */
-
-ACE_TCHAR *
-ACE_OS::getenvstrings (void)
-{
-#if defined (ACE_WIN32)
-# if defined (ACE_USES_WCHAR)
- return ::GetEnvironmentStringsW ();
-# else /* ACE_USES_WCHAR */
- return ::GetEnvironmentStrings ();
-# endif /* ACE_USES_WCHAR */
-#else /* ACE_WIN32 */
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_WIN32 */
-}
diff --git a/ace/OS.h b/ace/OS.h
deleted file mode 100644
index 4f25c2bbfc0..00000000000
--- a/ace/OS.h
+++ /dev/null
@@ -1,7842 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// OS.h
-//
-// = AUTHOR
-// Doug Schmidt <schmidt@cs.wustl.edu>, Jesper S. M|ller
-// <stophph@diku.dk>, and a cast of thousands...
-//
-// ============================================================================
-
-#ifndef ACE_OS_H
-#define ACE_OS_H
-#include "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Include the split up ACE_OS classes
-#include "ace/OS_Dirent.h"
-
-# if !defined (ACE_MALLOC_ALIGN)
-# define ACE_MALLOC_ALIGN ((int) sizeof (long))
-# endif /* ACE_MALLOC_ALIGN */
-
-// Allow an installation to replace the lowest-level allocation
-// functions without changing the source of ACE.
-//
-// To do this, simple #define ACE_*_FUNC macros in config.h to
-// the names of the site-specific functions, e.g.,
-//
-// #define ACE_MALLOC_FUNC dlmalloc
-// #define ACE_CALLOC_FUNC dlcalloc
-// #define ACE_FREE_FUNC dlfree
-// #define ACE_REALLOC_FUNC dlrealloc
-//
-// For completeness' sake, you should probably put
-// #define ACE_HAS_STRDUP_EMULATION
-// too, so that you guarantee that strdup() calls your desired mallocator
-// and not the system mallocator.
-//
-# if !defined (ACE_MALLOC_FUNC)
-# define ACE_MALLOC_FUNC ::malloc
-# endif
-# if !defined (ACE_CALLOC_FUNC)
-# define ACE_CALLOC_FUNC ::calloc
-# endif
-# if !defined (ACE_FREE_FUNC)
-# define ACE_FREE_FUNC ::free
-# endif
-# if !defined (ACE_REALLOC_FUNC)
-# define ACE_REALLOC_FUNC ::realloc
-# endif
-
-# if !defined (ACE_HAS_POSITION_INDEPENDENT_POINTERS)
-# define ACE_HAS_POSITION_INDEPENDENT_POINTERS 1
-# endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS */
-
-// States of a recyclable object.
-enum ACE_Recyclable_State
-{
- ACE_RECYCLABLE_IDLE_AND_PURGABLE,
- // Idle and can be purged.
-
- ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE,
- // Idle but cannot be purged.
-
- ACE_RECYCLABLE_PURGABLE_BUT_NOT_IDLE,
- // Can be purged, but is not idle (mostly for debugging).
-
- ACE_RECYCLABLE_BUSY,
- // Busy (i.e., cannot be recycled or purged).
-
- ACE_RECYCLABLE_CLOSED,
- // Closed.
-
- ACE_RECYCLABLE_UNKNOWN
- // Unknown state.
-};
-
-#if !defined (ACE_DEFAULT_PAGEFILE_POOL_BASE)
-#define ACE_DEFAULT_PAGEFILE_POOL_BASE (void *) 0
-#endif /* ACE_DEFAULT_PAGEFILE_POOL_BASE */
-
-#if !defined (ACE_DEFAULT_PAGEFILE_POOL_SIZE)
-#define ACE_DEFAULT_PAGEFILE_POOL_SIZE (size_t) 0x01000000
-#endif /* ACE_DEFAULT_PAGEFILE_POOL_SIZE */
-
-#if !defined (ACE_DEFAULT_PAGEFILE_POOL_CHUNK)
-#define ACE_DEFAULT_PAGEFILE_POOL_CHUNK (size_t) 0x00010000
-#endif /* ACE_DEFAULT_PAGEFILE_POOL_CHUNK */
-
-#if !defined (ACE_DEFAULT_PAGEFILE_POOL_NAME)
-#define ACE_DEFAULT_PAGEFILE_POOL_NAME ACE_TEXT ("Default_ACE_Pagefile_Memory_Pool")
-#endif /* ACE_DEFAULT_PAGEFILE_POOL_NAME */
-
-#if !defined (ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY)
-#define ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY 0
-#endif /* ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY */
-
-#if !defined (ACE_DEFAULT_SERVICE_REPOSITORY_SIZE)
-#define ACE_DEFAULT_SERVICE_REPOSITORY_SIZE 1024
-#endif /* ACE_DEFAULT_SERVICE_REPOSITORY_SIZE */
-
-#if !defined (ACE_REACTOR_NOTIFICATION_ARRAY_SIZE)
-#define ACE_REACTOR_NOTIFICATION_ARRAY_SIZE 1024
-#endif /* ACE_REACTOR_NOTIFICATION_ARRAY_SIZE */
-
-// Do not change these values wantonly since GPERF depends on them..
-#define ACE_ASCII_SIZE 128
-#define ACE_EBCDIC_SIZE 256
-
-#if 'a' < 'A'
-#define ACE_HAS_EBCDIC
-#define ACE_STANDARD_CHARACTER_SET_SIZE 256
-#else
-#define ACE_HAS_ASCII
-#define ACE_STANDARD_CHARACTER_SET_SIZE 128
-#endif /* 'a' < 'A' */
-
-# if defined (ACE_PSOS_TM)
-typedef long long longlong_t;
-typedef long id_t;
-# endif /* ACE_PSOS_TM */
-
-# if defined (ACE_LACKS_INLINE_FUNCTIONS) && !defined (ACE_NO_INLINE)
-# define ACE_NO_INLINE
-# endif /* defined (ACE_LACKS_INLINE_FUNCTIONS) && !defined (ACE_NO_INLINE) */
-
-# if defined (ACE_HAS_ANSI_CASTS)
-
-# define ACE_sap_any_cast(TYPE) reinterpret_cast<TYPE> (const_cast<ACE_Addr &> (ACE_Addr::sap_any))
-
-# define ACE_static_cast(TYPE, EXPR) static_cast<TYPE> (EXPR)
-# define ACE_static_cast_1_ptr(TYPE, T1, EXPR) static_cast<TYPE<T1> *> (EXPR)
-# define ACE_static_cast_2_ptr(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> *> (EXPR)
-# define ACE_static_cast_3_ptr(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> *> (EXPR)
-# define ACE_static_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
-# define ACE_static_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
-# define ACE_static_cast_1_ref(TYPE, T1, EXPR) static_cast<TYPE<T1> &> (EXPR)
-# define ACE_static_cast_2_ref(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> &> (EXPR)
-# define ACE_static_cast_3_ref(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> &> (EXPR)
-# define ACE_static_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
-# define ACE_static_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
-
-# define ACE_const_cast(TYPE, EXPR) const_cast<TYPE> (EXPR)
-# define ACE_const_cast_1_ptr(TYPE, T1, EXPR) const_cast<TYPE<T1> *> (EXPR)
-# define ACE_const_cast_2_ptr(TYPE, T1, T2, EXPR) const_cast<TYPE<T1, T2> *> (EXPR)
-# define ACE_const_cast_3_ptr(TYPE, T1, T2, T3, EXPR) const_cast<TYPE<T1, T2, T3> *> (EXPR)
-# define ACE_const_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) const_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
-# define ACE_const_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) const_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
-# define ACE_const_cast_1_ref(TYPE, T1, EXPR) const_cast<TYPE<T1> &> (EXPR)
-# define ACE_const_cast_2_ref(TYPE, T1, T2, EXPR) const_cast<TYPE<T1, T2> &> (EXPR)
-# define ACE_const_cast_3_ref(TYPE, T1, T2, T3, EXPR) const_cast<TYPE<T1, T2, T3> &> (EXPR)
-# define ACE_const_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) const_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
-# define ACE_const_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) const_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
-
-# define ACE_reinterpret_cast(TYPE, EXPR) reinterpret_cast<TYPE> (EXPR)
-# define ACE_reinterpret_cast_1_ptr(TYPE, T1, EXPR) reinterpret_cast<TYPE<T1> *> (EXPR)
-# define ACE_reinterpret_cast_2_ptr(TYPE, T1, T2, EXPR) reinterpret_cast<TYPE<T1, T2> *> (EXPR)
-# define ACE_reinterpret_cast_3_ptr(TYPE, T1, T2, T3, EXPR) reinterpret_cast<TYPE<T1, T2, T3> *> (EXPR)
-# define ACE_reinterpret_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
-# define ACE_reinterpret_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
-# define ACE_reinterpret_cast_1_ref(TYPE, T1, EXPR) reinterpret_cast<TYPE<T1> &> (EXPR)
-# define ACE_reinterpret_cast_2_ref(TYPE, T1, T2, EXPR) reinterpret_cast<TYPE<T1, T2> &> (EXPR)
-# define ACE_reinterpret_cast_3_ref(TYPE, T1, T2, T3, EXPR) reinterpret_cast<TYPE<T1, T2, T3> &> (EXPR)
-# define ACE_reinterpret_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
-# define ACE_reinterpret_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
-
-# if defined (ACE_LACKS_RTTI)
-# define ACE_dynamic_cast(TYPE, EXPR) static_cast<TYPE> (EXPR)
-# define ACE_dynamic_cast_1_ptr(TYPE, T1, EXPR) static_cast<TYPE<T1> *> (EXPR)
-# define ACE_dynamic_cast_2_ptr(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> *> (EXPR)
-# define ACE_dynamic_cast_3_ptr(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> *> (EXPR)
-# define ACE_dynamic_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
-# define ACE_dynamic_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
-# define ACE_dynamic_cast_1_ref(TYPE, T1, EXPR) static_cast<TYPE<T1> &> (EXPR)
-# define ACE_dynamic_cast_2_ref(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> &> (EXPR)
-# define ACE_dynamic_cast_3_ref(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> &> (EXPR)
-# define ACE_dynamic_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
-# define ACE_dynamic_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
-# else /* ! ACE_LACKS_RTTI */
-# define ACE_dynamic_cast(TYPE, EXPR) dynamic_cast<TYPE> (EXPR)
-# define ACE_dynamic_cast_1_ptr(TYPE, T1, EXPR) dynamic_cast<TYPE<T1> *> (EXPR)
-# define ACE_dynamic_cast_2_ptr(TYPE, T1, T2, EXPR) dynamic_cast<TYPE<T1, T2> *> (EXPR)
-# define ACE_dynamic_cast_3_ptr(TYPE, T1, T2, T3, EXPR) dynamic_cast<TYPE<T1, T2, T3> *> (EXPR)
-# define ACE_dynamic_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
-# define ACE_dynamic_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
-# define ACE_dynamic_cast_1_ref(TYPE, T1, EXPR) dynamic_cast<TYPE<T1> &> (EXPR)
-# define ACE_dynamic_cast_2_ref(TYPE, T1, T2, EXPR) dynamic_cast<TYPE<T1, T2> &> (EXPR)
-# define ACE_dynamic_cast_3_ref(TYPE, T1, T2, T3, EXPR) dynamic_cast<TYPE<T1, T2, T3> &> (EXPR)
-# define ACE_dynamic_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
-# define ACE_dynamic_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
-# endif /* ! ACE_LACKS_RTTI */
-
-# else
-
-# define ACE_sap_any_cast(TYPE) ((TYPE) (ACE_Addr::sap_any))
-
-# define ACE_static_cast(TYPE, EXPR) ((TYPE) (EXPR))
-# define ACE_static_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
-# define ACE_static_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
-# define ACE_static_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
-# define ACE_static_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
-# define ACE_static_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
-# define ACE_static_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
-# define ACE_static_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
-# define ACE_static_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
-# define ACE_static_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
-# define ACE_static_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
-
-# define ACE_const_cast(TYPE, EXPR) ((TYPE) (EXPR))
-# define ACE_const_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
-# define ACE_const_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
-# define ACE_const_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
-# define ACE_const_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
-# define ACE_const_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
-# define ACE_const_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
-# define ACE_const_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
-# define ACE_const_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
-# define ACE_const_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
-# define ACE_const_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
-
-# define ACE_reinterpret_cast(TYPE, EXPR) ((TYPE) (EXPR))
-# define ACE_reinterpret_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
-# define ACE_reinterpret_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
-# define ACE_reinterpret_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
-# define ACE_reinterpret_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
-# define ACE_reinterpret_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
-# define ACE_reinterpret_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
-# define ACE_reinterpret_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
-# define ACE_reinterpret_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
-# define ACE_reinterpret_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
-# define ACE_reinterpret_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
-
-# define ACE_dynamic_cast(TYPE, EXPR) ((TYPE) (EXPR))
-# define ACE_dynamic_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
-# define ACE_dynamic_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
-# define ACE_dynamic_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
-# define ACE_dynamic_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
-# define ACE_dynamic_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
-# define ACE_dynamic_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
-# define ACE_dynamic_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
-# define ACE_dynamic_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
-# define ACE_dynamic_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
-# define ACE_dynamic_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
-# endif /* ACE_HAS_ANSI_CASTS */
-
-# if !defined (ACE_CAST_CONST)
- // Sun CC 4.2, for example, requires const in reinterpret casts of
- // data members in const member functions. But, other compilers
- // complain about the useless const. This keeps everyone happy.
-# if defined (__SUNPRO_CC)
-# define ACE_CAST_CONST const
-# else /* ! __SUNPRO_CC */
-# define ACE_CAST_CONST
-# endif /* ! __SUNPRO_CC */
-# endif /* ! ACE_CAST_CONST */
-
-// Deal with MSVC++ insanity for CORBA...
-# if defined (ACE_HAS_BROKEN_NAMESPACES)
-# define ACE_CORBA_1(NAME) CORBA_##NAME
-# define ACE_CORBA_2(TYPE, NAME) CORBA_##TYPE##_##NAME
-# define ACE_CORBA_3(TYPE, NAME) CORBA_##TYPE::NAME
-# define ACE_NESTED_CLASS(TYPE, NAME) NAME
-# else /* ! ACE_HAS_BROKEN_NAMESPACES */
-# define ACE_CORBA_1(NAME) CORBA::NAME
-# define ACE_CORBA_2(TYPE, NAME) CORBA::TYPE::NAME
-# define ACE_CORBA_3(TYPE, NAME) CORBA::TYPE::NAME
-# define ACE_NESTED_CLASS(TYPE, NAME) TYPE::NAME
-# endif /* ! ACE_HAS_BROKEN_NAMESPACES */
-
-
-# if !defined (ACE_DEFAULT_CLOSE_ALL_HANDLES)
-# define ACE_DEFAULT_CLOSE_ALL_HANDLES 1
-# endif /* ACE_DEFAULT_CLOSE_ALL_HANDLES */
-
-// The maximum length for a fully qualified Internet name.
-# if !defined(ACE_MAX_FULLY_QUALIFIED_NAME_LEN)
-# define ACE_MAX_FULLY_QUALIFIED_NAME_LEN 256
-# endif /* ACE_MAX_FULLY_QUALIFIED_NAME_LEN */
-
-# if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- // Control message size to pass a file descriptor.
-# define ACE_BSD_CONTROL_MSG_LEN sizeof (struct cmsghdr) + sizeof (ACE_HANDLE)
-# if defined (ACE_LACKS_CMSG_DATA_MACRO)
-# if defined (ACE_LACKS_CMSG_DATA_MEMBER)
-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
-# else
-# define CMSG_DATA(cmsg) ((cmsg)->cmsg_data)
-# endif /* ACE_LACKS_CMSG_DATA_MEMBER */
-# endif /* ACE_LACKS_CMSG_DATA_MACRO */
-# endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
-// Define the default constants for ACE. Many of these are used for
-// the ACE tests and applications. You can change these values by
-// defining the macros in your config.h file.
-
-# if !defined (ACE_DEFAULT_TIMEOUT)
-# define ACE_DEFAULT_TIMEOUT 5
-# endif /* ACE_DEFAULT_TIMEOUT */
-
-# if !defined (ACE_DEFAULT_BACKLOG)
-# define ACE_DEFAULT_BACKLOG 5
-# endif /* ACE_DEFAULT_BACKLOG */
-
-# if !defined (ACE_DEFAULT_THREADS)
-# define ACE_DEFAULT_THREADS 1
-# endif /* ACE_DEFAULT_THREADS */
-
-// The following 3 defines are used in the IP multicast and broadcast tests.
-# if !defined (ACE_DEFAULT_BROADCAST_PORT)
-# define ACE_DEFAULT_BROADCAST_PORT 10000
-# endif /* ACE_DEFAULT_BROADCAST_PORT */
-
-# if !defined (ACE_DEFAULT_MULTICAST_PORT)
-# define ACE_DEFAULT_MULTICAST_PORT 10001
-# endif /* ACE_DEFAULT_MULTICAST_PORT */
-
-# if !defined (ACE_DEFAULT_MULTICAST_ADDR)
-// This address MUST be within the range for host group addresses:
-// 224.0.0.0 to 239.255.255.255.
-# define ACE_DEFAULT_MULTICAST_ADDR "224.9.9.2"
-# endif /* ACE_DEFAULT_MULTICAST_ADDR */
-
-// Default port number for HTTP.
-# if !defined (ACE_DEFAULT_HTTP_SERVER_PORT)
-# define ACE_DEFAULT_HTTP_SERVER_PORT 80
-# endif /* ACE_DEFAULT_HTTP_SERVER_PORT */
-
-// Used in many IPC_SAP tests
-# if !defined (ACE_DEFAULT_SERVER_PORT)
-# define ACE_DEFAULT_SERVER_PORT 10002
-# endif /* ACE_DEFAULT_SERVER_PORT */
-
-# if !defined (ACE_DEFAULT_HTTP_PORT)
-# define ACE_DEFAULT_HTTP_PORT 80
-# endif /* ACE_DEFAULT_HTTP_PORT */
-
-# if !defined (ACE_DEFAULT_MAX_SOCKET_BUFSIZ)
-# define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65536
-# endif /* ACE_DEFAULT_MAX_SOCKET_BUFSIZ */
-
-# if !defined (ACE_DEFAULT_SERVER_PORT_STR)
-# define ACE_DEFAULT_SERVER_PORT_STR "10002"
-# endif /* ACE_DEFAULT_SERVER_PORT_STR */
-
-// Used for the Service_Directory test
-# if !defined (ACE_DEFAULT_SERVICE_PORT)
-# define ACE_DEFAULT_SERVICE_PORT 10003
-# endif /* ACE_DEFAULT_SERVICE_PORT */
-
-// Used for the ACE_Thread_Spawn test
-# if !defined (ACE_DEFAULT_THR_PORT )
-# define ACE_DEFAULT_THR_PORT 10004
-# endif /* ACE_DEFAULT_THR_PORT */
-
-// Used for <SOCK_Connect::connect> tests
-# if !defined (ACE_DEFAULT_LOCAL_PORT)
-# define ACE_DEFAULT_LOCAL_PORT 10005
-# endif /* ACE_DEFAULT_LOCAL_PORT */
-
-// Used for Connector tests
-# if !defined (ACE_DEFAULT_LOCAL_PORT_STR)
-# define ACE_DEFAULT_LOCAL_PORT_STR "10005"
-# endif /* ACE_DEFAULT_LOCAL_PORT_STR */
-
-// Used for the name server.
-# if !defined (ACE_DEFAULT_NAME_SERVER_PORT)
-# define ACE_DEFAULT_NAME_SERVER_PORT 10006
-# endif /* ACE_DEFAULT_NAME_SERVER_PORT */
-
-# if !defined (ACE_DEFAULT_NAME_SERVER_PORT_STR)
-# define ACE_DEFAULT_NAME_SERVER_PORT_STR "10006"
-# endif /* ACE_DEFAULT_NAME_SERVER_PORT_STR */
-
-// Used for the token server.
-# if !defined (ACE_DEFAULT_TOKEN_SERVER_PORT)
-# define ACE_DEFAULT_TOKEN_SERVER_PORT 10007
-# endif /* ACE_DEFAULT_TOKEN_SERVER_PORT */
-
-# if !defined (ACE_DEFAULT_TOKEN_SERVER_PORT_STR)
-# define ACE_DEFAULT_TOKEN_SERVER_PORT_STR "10007"
-# endif /* ACE_DEFAULT_TOKEN_SERVER_PORT_STR */
-
-// Used for the logging server.
-# if !defined (ACE_DEFAULT_LOGGING_SERVER_PORT)
-# define ACE_DEFAULT_LOGGING_SERVER_PORT 10008
-# endif /* ACE_DEFAULT_LOGGING_SERVER_PORT */
-
-# if !defined (ACE_DEFAULT_LOGGING_SERVER_PORT_STR)
-# define ACE_DEFAULT_LOGGING_SERVER_PORT_STR "10008"
-# endif /* ACE_DEFAULT_LOGGING_SERVER_PORT_STR */
-
-// Used for the logging server.
-# if !defined (ACE_DEFAULT_THR_LOGGING_SERVER_PORT)
-# define ACE_DEFAULT_THR_LOGGING_SERVER_PORT 10008
-# endif /* ACE_DEFAULT_THR_LOGGING_SERVER_PORT */
-
-# if !defined (ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR)
-# define ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR "10008"
-# endif /* ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR */
-
-// Used for the time server.
-# if !defined (ACE_DEFAULT_TIME_SERVER_PORT)
-# define ACE_DEFAULT_TIME_SERVER_PORT 10009
-# endif /* ACE_DEFAULT_TIME_SERVER_PORT */
-
-# if !defined (ACE_DEFAULT_TIME_SERVER_PORT_STR)
-# define ACE_DEFAULT_TIME_SERVER_PORT_STR "10009"
-# endif /* ACE_DEFAULT_TIME_SERVER_PORT_STR */
-
-# if !defined (ACE_DEFAULT_TIME_SERVER_STR)
-# define ACE_DEFAULT_TIME_SERVER_STR "ACE_TS_TIME"
-# endif /* ACE_DEFAULT_TIME_SERVER_STR */
-
-// Used by the FIFO tests and the Client_Logging_Handler netsvc.
-# if !defined (ACE_DEFAULT_RENDEZVOUS)
-# if defined (ACE_HAS_STREAM_PIPES)
-# define ACE_DEFAULT_RENDEZVOUS "/tmp/fifo.ace"
-# else
-# define ACE_DEFAULT_RENDEZVOUS "localhost:10010"
-# endif /* ACE_HAS_STREAM_PIPES */
-# endif /* ACE_DEFAULT_RENDEZVOUS */
-
-# if !defined (ACE_DEFAULT_LOGGER_KEY)
-
-# if defined (ACE_HAS_STREAM_PIPES)
-# define ACE_DEFAULT_LOGGER_KEY ACE_TEXT ("/tmp/server_daemon")
-# else
-# define ACE_DEFAULT_LOGGER_KEY ACE_TEXT ("localhost:10012")
-# endif /* ACE_HAS_STREAM_PIPES */
-# endif /* ACE_DEFAULT_LOGGER_KEY */
-
-// The way to specify the local host for loopback IP. This is usually
-// "localhost" but it may need changing on some platforms.
-# if !defined (ACE_LOCALHOST)
-# define ACE_LOCALHOST ACE_TEXT ("localhost")
-# endif
-
-# if !defined (ACE_DEFAULT_SERVER_HOST)
-# define ACE_DEFAULT_SERVER_HOST ACE_LOCALHOST
-# endif /* ACE_DEFAULT_SERVER_HOST */
-
-// Default shared memory key
-# if !defined (ACE_DEFAULT_SHM_KEY)
-# define ACE_DEFAULT_SHM_KEY 1234
-# endif /* ACE_DEFAULT_SHM_KEY */
-
-// Default segment size used by SYSV shared memory (128 K)
-# if !defined (ACE_DEFAULT_SEGMENT_SIZE)
-# define ACE_DEFAULT_SEGMENT_SIZE 1024 * 128
-# endif /* ACE_DEFAULT_SEGMENT_SIZE */
-
-// Maximum number of SYSV shared memory segments
-// (does anyone know how to figure out the right values?!)
-# if !defined (ACE_DEFAULT_MAX_SEGMENTS)
-# define ACE_DEFAULT_MAX_SEGMENTS 6
-# endif /* ACE_DEFAULT_MAX_SEGMENTS */
-
-// Name of the map that's stored in shared memory.
-# if !defined (ACE_NAME_SERVER_MAP)
-# define ACE_NAME_SERVER_MAP "Name Server Map"
-# endif /* ACE_NAME_SERVER_MAP */
-
-// Default file permissions.
-# if !defined (ACE_DEFAULT_FILE_PERMS)
-# define ACE_DEFAULT_FILE_PERMS 0666
-# endif /* ACE_DEFAULT_FILE_PERMS */
-
-// Default directory permissions.
-# if !defined (ACE_DEFAULT_DIR_PERMS)
-# define ACE_DEFAULT_DIR_PERMS 0777
-# endif /* ACE_DEFAULT_DIR_PERMS */
-
-// Default size of the ACE Reactor.
-# if !defined (ACE_DEFAULT_SELECT_REACTOR_SIZE)
-# define ACE_DEFAULT_SELECT_REACTOR_SIZE FD_SETSIZE
-# endif /* ACE_DEFAULT_SELECT_REACTOR_SIZE */
-
-# if !defined (ACE_DEFAULT_TIMEPROBE_TABLE_SIZE)
-# define ACE_DEFAULT_TIMEPROBE_TABLE_SIZE 8 * 1024
-# endif /* ACE_DEFAULT_TIMEPROBE_TABLE_SIZE */
-
-// Default size of the ACE Map_Manager.
-# if !defined (ACE_DEFAULT_MAP_SIZE)
-# define ACE_DEFAULT_MAP_SIZE 1024
-# endif /* ACE_DEFAULT_MAP_SIZE */
-
-// Defaults for ACE Timer Wheel
-# if !defined (ACE_DEFAULT_TIMER_WHEEL_SIZE)
-# define ACE_DEFAULT_TIMER_WHEEL_SIZE 1024
-# endif /* ACE_DEFAULT_TIMER_WHEEL_SIZE */
-
-# if !defined (ACE_DEFAULT_TIMER_WHEEL_RESOLUTION)
-# define ACE_DEFAULT_TIMER_WHEEL_RESOLUTION 100
-# endif /* ACE_DEFAULT_TIMER_WHEEL_RESOLUTION */
-
-// Default size for ACE Timer Hash table
-# if !defined (ACE_DEFAULT_TIMER_HASH_TABLE_SIZE)
-# define ACE_DEFAULT_TIMER_HASH_TABLE_SIZE 1024
-# endif /* ACE_DEFAULT_TIMER_HASH_TABLE_SIZE */
-
-// Defaults for the ACE Free List
-# if !defined (ACE_DEFAULT_FREE_LIST_PREALLOC)
-# define ACE_DEFAULT_FREE_LIST_PREALLOC 0
-# endif /* ACE_DEFAULT_FREE_LIST_PREALLOC */
-
-# if !defined (ACE_DEFAULT_FREE_LIST_LWM)
-# define ACE_DEFAULT_FREE_LIST_LWM 0
-# endif /* ACE_DEFAULT_FREE_LIST_LWM */
-
-# if !defined (ACE_DEFAULT_FREE_LIST_HWM)
-# define ACE_DEFAULT_FREE_LIST_HWM 25000
-# endif /* ACE_DEFAULT_FREE_LIST_HWM */
-
-# if !defined (ACE_DEFAULT_FREE_LIST_INC)
-# define ACE_DEFAULT_FREE_LIST_INC 100
-# endif /* ACE_DEFAULT_FREE_LIST_INC */
-
-# if !defined (ACE_UNIQUE_NAME_LEN)
-# define ACE_UNIQUE_NAME_LEN 100
-# endif /* ACE_UNIQUE_NAME_LEN */
-
-# if !defined (ACE_MAX_DGRAM_SIZE)
- // This is just a guess. 8k is the normal limit on
- // most machines because that's what NFS expects.
-# define ACE_MAX_DGRAM_SIZE 8192
-# endif /* ACE_MAX_DGRAM_SIZE */
-
-# if !defined (ACE_DEFAULT_ARGV_BUFSIZ)
-# define ACE_DEFAULT_ARGV_BUFSIZ 1024 * 4
-# endif /* ACE_DEFAULT_ARGV_BUFSIZ */
-
-
-// Here are all ACE-specific global declarations needed throughout
-// ACE.
-
-// Helpful dump macros.
-# define ACE_BEGIN_DUMP ACE_TEXT ("\n====\n(%P|%t|%x)")
-# define ACE_END_DUMP ACE_TEXT ("====\n")
-
-// A free list which create more elements when there aren't enough
-// elements.
-# define ACE_FREE_LIST_WITH_POOL 1
-
-// A simple free list which doen't allocate/deallocate elements.
-# define ACE_PURE_FREE_LIST 2
-
-# if defined (ACE_NDEBUG)
-# define ACE_DB(X)
-# else
-# define ACE_DB(X) X
-# endif /* ACE_NDEBUG */
-
-// ACE_NO_HEAP_CHECK macro can be used to suppress false report of
-// memory leaks. It turns off the built-in heap checking until the
-// block is left. The old state will then be restored Only used for
-// Win32 (in the moment).
-# if defined (ACE_WIN32)
-
-// This is necessary to work around bugs with Win32 non-blocking
-// connects...
-# if !defined (ACE_NON_BLOCKING_BUG_DELAY)
-# define ACE_NON_BLOCKING_BUG_DELAY 35000
-# endif /* ACE_NON_BLOCKING_BUG_DELAY */
-
-# if defined (_DEBUG) && !defined (ACE_HAS_WINCE) && !defined (__BORLANDC__)
-class ACE_Export ACE_No_Heap_Check
-{
-public:
- ACE_No_Heap_Check (void)
- : old_state (_CrtSetDbgFlag (_CRTDBG_REPORT_FLAG))
- { _CrtSetDbgFlag (old_state & ~_CRTDBG_ALLOC_MEM_DF);}
- ~ACE_No_Heap_Check (void) { _CrtSetDbgFlag (old_state);}
-private:
- int old_state;
-};
-# define ACE_NO_HEAP_CHECK ACE_No_Heap_Check ____no_heap;
-# else /* !_DEBUG */
-# define ACE_NO_HEAP_CHECK
-# endif /* _DEBUG */
-# else /* !ACE_WIN32 */
-# define ACE_NO_HEAP_CHECK
-# endif /* ACE_WIN32 */
-
-// Turn a number into a string.
-# define ACE_ITOA(X) #X
-
-// Create a string of a server address with a "host:port" format.
-# define ACE_SERVER_ADDRESS(H,P) H":"P
-
-// A couple useful inline functions for checking whether bits are
-// enabled or disabled.
-
-// Efficiently returns the least power of two >= X...
-# define ACE_POW(X) (((X) == 0)?1:(X-=1,X|=X>>1,X|=X>>2,X|=X>>4,X|=X>>8,X|=X>>16,(++X)))
-# define ACE_EVEN(NUM) (((NUM) & 1) == 0)
-# define ACE_ODD(NUM) (((NUM) & 1) == 1)
-# define ACE_BIT_ENABLED(WORD, BIT) (((WORD) & (BIT)) != 0)
-# define ACE_BIT_DISABLED(WORD, BIT) (((WORD) & (BIT)) == 0)
-# define ACE_BIT_CMP_MASK(WORD, BIT, MASK) (((WORD) & (BIT)) == MASK)
-# define ACE_SET_BITS(WORD, BITS) (WORD |= (BITS))
-# define ACE_CLR_BITS(WORD, BITS) (WORD &= ~(BITS))
-
-// include the ACE min()/max() functions.
-# include "ace/Min_Max.h"
-
-
-# if !defined (ACE_ENDLESS_LOOP)
-# define ACE_ENDLESS_LOOP
-# endif /* ! ACE_ENDLESS_LOOP */
-
-# if defined (ACE_NEEDS_FUNC_DEFINITIONS)
- // It just evaporated ;-) Not pleasant.
-# define ACE_UNIMPLEMENTED_FUNC(f)
-# else
-# define ACE_UNIMPLEMENTED_FUNC(f) f;
-# endif /* ACE_NEEDS_FUNC_DEFINITIONS */
-
-// Easy way to designate that a class is used as a pseudo-namespace.
-// Insures that g++ "friendship" anamolies are properly handled.
-# define ACE_CLASS_IS_NAMESPACE(CLASSNAME) \
-private: \
-CLASSNAME (void); \
-CLASSNAME (const CLASSNAME&); \
-friend class ace_dewarn_gplusplus
-
-// These hooks enable ACE to have all dynamic memory management
-// automatically handled on a per-object basis.
-
-# if defined (ACE_HAS_ALLOC_HOOKS)
-# define ACE_ALLOC_HOOK_DECLARE \
- void *operator new (size_t bytes); \
- void operator delete (void *ptr);
-
- // Note that these are just place holders for now. Some day they
- // may be be replaced by <ACE_Malloc>.
-# define ACE_ALLOC_HOOK_DEFINE(CLASS) \
- void *CLASS::operator new (size_t bytes) { return ::new char[bytes]; } \
- void CLASS::operator delete (void *ptr) { delete [] ((char *) ptr); }
-# else
-# define ACE_ALLOC_HOOK_DECLARE struct __Ace {} /* Just need a dummy... */
-# define ACE_ALLOC_HOOK_DEFINE(CLASS)
-# endif /* ACE_HAS_ALLOC_HOOKS */
-
-# if defined (ACE_LACKS_KEY_T)
-# if defined (ACE_WIN32)
- // Win32 doesn't use numeric values to name its semaphores, it uses
- // strings!
-typedef char *key_t;
-# else
-typedef int key_t;
-# endif /* ACE_WIN32 */
-# endif /* ACE_LACKS_KEY_T */
-
-# if defined (VXWORKS)
-# if defined (ghs)
- // GreenHills 1.8.8 needs the stdarg.h #include before the #include of
- // vxWorks.h.
- // Also, be sure that these #includes come _after_ the key_t typedef, and
- // before the #include of time.h.
-# include /**/ <stdarg.h>
-# endif /* ghs */
-
-# include /**/ <vxWorks.h>
-# endif /* VXWORKS */
-
-
-///////////////////////////////////////////
-// //
-// NOTE: Please do not add any #includes //
-// before this point. On VxWorks, //
-// vxWorks.h must be #included //
-// first! //
-// //
-///////////////////////////////////////////
-
-# if defined (ACE_PSOS)
-
- // remap missing error numbers for system functions
-# define EPERM 1 /* Not super-user */
-# define ENOENT 2 /* No such file or directory */
-# define ESRCH 3 /* No such process */
-# if ! defined (ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM)
-# define EINTR 4 /* interrupted system call */
-# endif /* ! defined (ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM) */
-# define EBADF 9 /* Bad file number */
-# define EAGAIN 11 /* Resource temporarily unavailable */
-# if ! defined (ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM)
-# define EWOULDBLOCK EAGAIN /* Blocking resource request would block */
-# define ENOMEM 12 /* Not enough core */
-# endif /* ! defined (ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM) */
-# define EACCES 13 /* Permission denied */
-# define EFAULT 14 /* Bad access */
-# if ! defined (ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM)
-# define EEXIST 17 /* File exists */
-# endif /* ! defined (ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM) */
-# define ENOSPC 28 /* No space left on device */
-# if ! defined (ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM)
-# define EPIPE 32 /* Broken pipe */
-# endif /* ! defined (ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM) */
-# define ETIME 62 /* timer expired */
-# define ENAMETOOLONG 78 /* path name is too long */
-# define ENOSYS 89 /* Unsupported file system operation */
-# if ! defined (ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM)
-# define EADDRINUSE 125 /* Address already in use */
-# define ENETUNREACH 128 /* Network is unreachable */
-# define EISCONN 133 /* Socket is already connected */
-# define ESHUTDOWN 143 /* Can't send after socket shutdown */
-# define ECONNREFUSED 146 /* Connection refused */
-# define EINPROGRESS 150 /* operation now in progress */
-# endif /* ! defined (ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM) */
-# define ERRMAX 151 /* Last error number */
-
-# if ! defined (NSIG)
-# define NSIG 32
-# endif /* NSIG */
-
-# if ! defined (TCP_NODELAY)
-# define TCP_NODELAY 1
-# endif /* TCP_NODELAY */
-
-#if defined (ACE_LACKS_ASSERT_MACRO)
- #define assert(expr)
-#endif
-
-# if defined (ACE_PSOSIM)
-
-# include /**/ "ace/sys_conf.h" /* system configuration file */
-# include /**/ <psos.h> /* pSOS+ system calls */
-# include /**/ <pna.h> /* pNA+ TCP/IP Network Manager calls */
-
- /* In the *simulator* environment, use unsigned int for size_t */
-# define size_t unsigned int
-
-
- /* include <rpc.h> pRPC+ Remote Procedure Call Library calls */
- /* are not supported by pSOSim */
- /* */
- /* include <phile.h> pHILE+ file system calls are not supported */
- /* by pSOSim *so*, for the time being, we make */
- /* use of UNIX file system headers and then */
- /* when we have time, we wrap UNIX file system */
- /* calls w/ pHILE+ wrappers, and modify ACE to */
- /* use the wrappers under pSOSim */
-
- /* put includes for necessary UNIX file system calls here */
-# include /**/ <sys/stat.h>
-# include /**/ <sys/ioctl.h>
-# include /**/ <sys/sockio.h>
-# include /**/ <netinet/tcp.h>
-
-# define TCP_
-# if ! defined (BUFSIZ)
-# define BUFSIZ 1024
-# endif /* ! defined (BUFSIZ) */
-
-
-# else
-
-# if defined (ACE_PSOS_CANT_USE_SYS_TYPES)
- // these are missing from the pSOS types.h file, and the compiler
- // supplied types.h file collides with the pSOS version
- typedef unsigned char u_char;
- typedef unsigned short u_short;
- typedef unsigned int u_int;
- typedef unsigned long u_long;
- typedef unsigned char uchar_t;
- typedef unsigned short ushort_t;
- typedef unsigned int uint_t;
- typedef unsigned long ulong_t;
- typedef char * caddr_t;
-
-# if defined (ACE_PSOS_DIAB_PPC)
- typedef unsigned long pid_t;
-# define ACE_INVALID_PID ((pid_t) ~0)
-# else /* !defined (ACE_PSOS_DIAB_PPC) */
- typedef long pid_t;
-# define ACE_INVALID_PID ((pid_t) -1)
-# endif /* defined (ACE_PSOS_DIAB_PPC) */
-
-// typedef unsigned char wchar_t;
-# endif
-
-# include /**/ "ace/sys_conf.h" /* system configuration file */
-# include /**/ <configs.h> /* includes all pSOS headers */
-// #include /**/ <psos.h> /* pSOS system calls */
-# include /**/ <pna.h> /* pNA+ TCP/IP Network Manager calls */
-# include /**/ <phile.h> /* pHILE+ file system calls */
-// #include /**/ <prepccfg.h> /* pREPC+ file system calls */
-# if defined (ACE_PSOS_DIAB_MIPS)
-# if defined (ACE_PSOS_USES_DIAB_SYS_CALLS)
-# include /**/ <unistd.h> /* Diab Data supplied file system calls */
-# else
-# include /**/ <prepc.h>
-# endif /* ACE_PSOS_USES_DIAB_SYS_CALLS */
-# include /**/ <sys/wait.h> /* Diab Data supplied header file */
-# endif /* ACE_PSOS_DIAB_MIPS */
-
-// This collides with phile.h
-// #include /**/ <sys/stat.h> /* Diab Data supplied header file */
-
- // missing preprocessor definitions
-# define AF_UNIX 0x1
-# define PF_UNIX AF_UNIX
-# define PF_INET AF_INET
-# define AF_MAX AF_INET
-# define IFF_LOOPBACK IFF_EXTLOOPBACK
-
- typedef long fd_mask;
-# define IPPORT_RESERVED 1024
-# define IPPORT_USERRESERVED 5000
-
-# define howmany(x, y) (((x)+((y)-1))/(y))
-
- extern "C"
- {
- typedef void (* ACE_SignalHandler) (void);
- typedef void (* ACE_SignalHandlerV) (void);
- }
-
-# if !defined(SIG_DFL)
-# define SIG_DFL (ACE_SignalHandler) 0
-# endif // philabs
-
-# endif /* defined (ACE_PSOSIM) */
-
-// For general purpose portability
-
-# define ACE_BITS_PER_ULONG (8 * sizeof (u_long))
-
-typedef u_long ACE_idtype_t;
-typedef u_long ACE_id_t;
-# define ACE_SELF (0)
-typedef u_long ACE_pri_t;
-
-// Use pSOS semaphores, wrapped . . .
-typedef struct
-{
- u_long sema_;
- // Semaphore handle. This is allocated by pSOS.
-
- char name_[4];
- // Name of the semaphore: really a 32 bit number to pSOS
-} ACE_sema_t;
-
-// Used for dynamic linking.
-# if !defined (ACE_DEFAULT_SVC_CONF)
-# define ACE_DEFAULT_SVC_CONF "./svc.conf"
-# endif /* ACE_DEFAULT_SVC_CONF */
-
-# if !defined (ACE_DEFAULT_SEM_KEY)
-# define ACE_DEFAULT_SEM_KEY 1234
-# endif /* ACE_DEFAULT_SEM_KEY */
-
-# define ACE_STDIN 0
-# define ACE_STDOUT 1
-# define ACE_STDERR 2
-
-# define ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("/")
-# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_TEXT ('/')
-
-# define ACE_DLL_SUFFIX ACE_TEXT (".so")
-# define ACE_DLL_PREFIX ACE_TEXT ("lib")
-# define ACE_LD_SEARCH_PATH ACE_TEXT ("LD_LIBRARY_PATH")
-# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ACE_TEXT (":")
-# define ACE_LOGGER_KEY ACE_TEXT ("/tmp/server_daemon")
-
-# define ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("/")
-# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_TEXT ('/')
-# define ACE_PLATFORM ACE_TEXT ("pSOS")
-# define ACE_PLATFORM_EXE_SUFFIX ACE_TEXT ("")
-
-# define ACE_MAX_DEFAULT_PORT 65535
-
-# if ! defined(MAXPATHLEN)
-# define MAXPATHLEN 1024
-# endif /* MAXPATHLEN */
-
-# if ! defined(MAXNAMLEN)
-# define MAXNAMLEN 255
-# endif /* MAXNAMLEN */
-
-# if defined (ACE_LACKS_MMAP)
-# define PROT_READ 0
-# define PROT_WRITE 0
-# define PROT_EXEC 0
-# define PROT_NONE 0
-# define PROT_RDWR 0
-# define MAP_PRIVATE 0
-# define MAP_SHARED 0
-# define MAP_FIXED 0
-# endif /* ACE_LACKS_MMAP */
-
-// The following 2 defines are used by the ACE Name Server...
-# if !defined (ACE_DEFAULT_LOCALNAME)
-# define ACE_DEFAULT_LOCALNAME ACE_TEXT ("localnames")
-# endif /* ACE_DEFAULT_LOCALNAME */
-# if !defined (ACE_DEFAULT_GLOBALNAME)
-# define ACE_DEFAULT_GLOBALNAME ACE_TEXT ("globalnames")
-# endif /* ACE_DEFAULT_GLOBALNAME */
-
-typedef int ACE_HANDLE;
-typedef ACE_HANDLE ACE_SOCKET;
-# define ACE_INVALID_HANDLE -1
-typedef int ACE_exitcode;
-
-typedef ACE_HANDLE ACE_SHLIB_HANDLE;
-# define ACE_SHLIB_INVALID_HANDLE ACE_INVALID_HANDLE
-# define ACE_DEFAULT_SHLIB_MODE 0
-
-# define ACE_INVALID_SEM_KEY -1
-
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* address length */
- char **h_addr_list; /* (first, only) address from name server */
-# define h_addr h_addr_list[0] /* the first address */
-};
-
-struct servent {
- char *s_name; /* official service name */
- char **s_aliases; /* alias list */
- int s_port; /* port # */
- char *s_proto; /* protocol to use */
-};
-
-# define ACE_SEH_TRY if (1)
-# define ACE_SEH_EXCEPT(X) while (0)
-# define ACE_SEH_FINALLY if (1)
-
-# if !defined (LPSECURITY_ATTRIBUTES)
-# define LPSECURITY_ATTRIBUTES int
-# endif /* !defined LPSECURITY_ATTRIBUTES */
-# if !defined (GENERIC_READ)
-# define GENERIC_READ 0
-# endif /* !defined GENERIC_READ */
-# if !defined (FILE_SHARE_READ)
-# define FILE_SHARE_READ 0
-# endif /* !defined FILE_SHARE_READ */
-# if !defined (OPEN_EXISTING)
-# define OPEN_EXISTING 0
-# endif /* !defined OPEN_EXISTING */
-# if !defined (FILE_ATTRIBUTE_NORMAL)
-# define FILE_ATTRIBUTE_NORMAL 0
-# endif /* !defined FILE_ATTRIBUTE_NORMAL */
-# if !defined (MAXIMUM_WAIT_OBJECTS)
-# define MAXIMUM_WAIT_OBJECTS 0
-# endif /* !defined MAXIMUM_WAIT_OBJECTS */
-# if !defined (FILE_FLAG_OVERLAPPED)
-# define FILE_FLAG_OVERLAPPED 0
-# endif /* !defined FILE_FLAG_OVERLAPPED */
-# if !defined (FILE_FLAG_SEQUENTIAL_SCAN)
-# define FILE_FLAG_SEQUENTIAL_SCAN 0
-# endif /* !defined FILE_FLAG_SEQUENTIAL_SCAN */
-
-struct ACE_OVERLAPPED
-{
- u_long Internal;
- u_long InternalHigh;
- u_long Offset;
- u_long OffsetHigh;
- ACE_HANDLE hEvent;
-};
-
-# if !defined (USER_INCLUDE_SYS_TIME_TM)
-# if defined (ACE_PSOS_DIAB_PPC)
-typedef struct timespec timespec_t;
-# else /* ! defined (ACE_PSOS_DIAB_PPC) */
-typedef struct timespec
-{
- time_t tv_sec; // Seconds
- long tv_nsec; // Nanoseconds
-} timespec_t;
-# endif /* defined (ACE_PSOS_DIAB_PPC) */
-# endif /* !defined (USER_INCLUDE_SYS_TIME_TM) */
-
-#if defined (ACE_PSOS_HAS_TIME)
-
-// Use pSOS time, wrapped . . .
-class ACE_Export ACE_PSOS_Time_t
-{
-public:
- ACE_PSOS_Time_t (void);
- // default ctor: date, time, and ticks all zeroed.
-
- ACE_PSOS_Time_t (const timespec_t& t);
- // ctor from a timespec_t
-
- operator timespec_t ();
- // type cast operator (to a timespec_t)
-
- static u_long get_system_time (ACE_PSOS_Time_t& t);
- // static member function to get current system time
-
- static u_long set_system_time (const ACE_PSOS_Time_t& t);
- // static member function to set current system time
-
-# if defined (ACE_PSOSIM)
- static u_long init_simulator_time (void);
- // static member function to initialize system time, using UNIX calls
-# endif /* ACE_PSOSIM */
-
- static const u_long max_ticks;
- // max number of ticks supported in a single system call
-private:
- // = Constants for prying info out of the pSOS time encoding.
- static const u_long year_mask;
- static const u_long month_mask;
- static const u_long day_mask;
- static const u_long hour_mask;
- static const u_long minute_mask;
- static const u_long second_mask;
- static const int year_shift;
- static const int month_shift;
- static const int hour_shift;
- static const int minute_shift;
- static const int year_origin;
- static const int month_origin;
-
- // error codes
- static const u_long err_notime; // system time not set
- static const u_long err_illdate; // date out of range
- static const u_long err_illtime; // time out of range
- static const u_long err_illticks; // ticks out of range
-
- u_long date_;
- // date : year in bits 31-16, month in bits 15-8, day in bits 7-0
-
- u_long time_;
- // time : hour in bits 31-16, minutes in bits 15-8, seconds in bits 7-0
-
- u_long ticks_;
- // ticks: number of system clock ticks (KC_TICKS2SEC-1 max)
-} ;
-#endif /* ACE_PSOS_HAS_TIME */
-
-# endif /* defined (ACE_PSOS) */
-
-# if defined (ACE_HAS_CHARPTR_SPRINTF)
-# define ACE_SPRINTF_ADAPTER(X) ::strlen (X)
-# else
-# define ACE_SPRINTF_ADAPTER(X) X
-# endif /* ACE_HAS_CHARPTR_SPRINTF */
-
-// Default address for shared memory mapped files and SYSV shared memory
-// (defaults to 64 M).
-# if !defined (ACE_DEFAULT_BASE_ADDR)
-# define ACE_DEFAULT_BASE_ADDR ((char *) (64 * 1024 * 1024))
-# endif /* ACE_DEFAULT_BASE_ADDR */
-
-// This fudge factor can be overriden for timers that need it, such as on
-// Solaris, by defining the ACE_TIMER_SKEW symbol in the appropriate config
-// header.
-# if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 0
-# endif /* ACE_TIMER_SKEW */
-
-// This needs to go here *first* to avoid problems with AIX.
-# if defined (ACE_HAS_PTHREADS)
-extern "C" {
-# define ACE_DONT_INCLUDE_ACE_SIGNAL_H
-# include /**/ <signal.h>
-# undef ACE_DONT_INCLUDE_ACE_SIGNAL_H
-# include /**/ <pthread.h>
-# if defined (DIGITAL_UNIX)
-# define pthread_self __pthread_self
-extern "C" pthread_t pthread_self (void);
-# endif /* DIGITAL_UNIX */
-}
-# if defined (HPUX_10)
-// HP-UX 10 needs to see cma_sigwait, and since _CMA_NOWRAPPERS_ is defined,
-// this header does not get included from pthreads.h.
-# include /**/ <dce/cma_sigwait.h>
-# endif /* HPUX_10 */
-# endif /* ACE_HAS_PTHREADS */
-
-// There are a lot of threads-related macro definitions in the config files.
-// They came in at different times and from different places and platform
-// requirements as threads evolved. They are probably not all needed - some
-// overlap or are otherwise confused. This is an attempt to start
-// straightening them out.
-# if defined (ACE_HAS_PTHREADS_STD) /* POSIX.1c threads (pthreads) */
- // ... and 2-parameter asctime_r and ctime_r
-# if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && \
- !defined (ACE_HAS_STHREADS)
-# define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-# endif
-# endif /* ACE_HAS_PTHREADS_STD */
-
-# if (ACE_NTRACE == 1)
-# define ACE_TRACE(X)
-# else
-# define ACE_TRACE(X) ACE_Trace ____ (ACE_TEXT (X), __LINE__, ACE_TEXT (__FILE__))
-# endif /* ACE_NTRACE */
-
-# if !defined (ACE_HAS_WINCE) && !defined (ACE_PSOS_DIAB_MIPS)
-# include /**/ <time.h>
-# if defined (__Lynx__)
-# include /**/ <st.h>
-# include /**/ <sem.h>
-# endif /* __Lynx__ */
-# endif /* ACE_HAS_WINCE ACE_PSOS_DIAB_MIPS */
-
-# if defined (ACE_LACKS_SYSTIME_H)
-// Some platforms may need to include this, but I suspect that most
-// will get it from <time.h>
-# if defined (VXWORKS)
-# include /**/ <sys/times.h>
-# else
-# include /**/ <sys/time.h>
-# endif /* VXWORKS */
-# endif /* ACE_LACKS_SYSTIME_H */
-
-# if !defined (ACE_HAS_POSIX_TIME) && !defined (ACE_PSOS)
-// Definition per POSIX.
-typedef struct timespec
-{
- time_t tv_sec; // Seconds
- long tv_nsec; // Nanoseconds
-} timespec_t;
-# elif defined (ACE_HAS_BROKEN_POSIX_TIME)
-// OSF/1 defines struct timespec in <sys/timers.h> - Tom Marrs
-# include /**/ <sys/timers.h>
-# endif /* !ACE_HAS_POSIX_TIME */
-
-# if defined(ACE_LACKS_TIMESPEC_T)
-typedef struct timespec timespec_t;
-# endif /* ACE_LACKS_TIMESPEC_T */
-
-# if !defined (ACE_HAS_CLOCK_GETTIME) && !defined (_CLOCKID_T)
-typedef int clockid_t;
-# if !defined (CLOCK_REALTIME)
-# define CLOCK_REALTIME 0
-# endif /* CLOCK_REALTIME */
-# endif /* ! ACE_HAS_CLOCK_GETTIME && ! _CLOCKID_T */
-
-// -------------------------------------------------------------------
-// These forward declarations are only used to circumvent a bug in
-// MSVC 6.0 compiler. They shouldn't cause any problem for other
-// compilers and they can be removed once MS release a SP that contains
-// the fix.
-class ACE_Time_Value;
-ACE_Export ACE_Time_Value operator + (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
-
-ACE_Export ACE_Time_Value operator - (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
-// -------------------------------------------------------------------
-
-class ACE_Export ACE_Time_Value
-{
- // = TITLE
- // Operations on "timeval" structures.
- //
- // = DESCRIPTION
- // This class centralizes all the time related processing in
- // ACE. These timers are typically used in conjunction with OS
- // mechanisms like <select>, <poll>, or <cond_timedwait>.
- // <ACE_Time_Value> makes the use of these mechanisms portable
- // across OS platforms,
-public:
- // = Useful constants.
-
- static const ACE_Time_Value zero;
- // Constant "0".
-
- static const ACE_Time_Value max_time;
- // Constant for maximum time representable. Note that this time is
- // not intended for use with <select> or other calls that may have
- // *their own* implementation-specific maximum time representations.
- // Its primary use is in time computations such as those used by the
- // dynamic subpriority strategies in the <ACE_Dynamic_Message_Queue>
- // class.
-
- // = Initialization methods.
-
- ACE_Time_Value (void);
- // Default Constructor.
-
- ACE_Time_Value (long sec, long usec = 0);
- // Constructor.
-
- // = Methods for converting to/from various time formats.
- ACE_Time_Value (const struct timeval &t);
- // Construct the <ACE_Time_Value> from a <timeval>.
-
- ACE_Time_Value (const timespec_t &t);
- // Initializes the <ACE_Time_Value> object from a <timespec_t>.
-
- ACE_Time_Value (const ACE_Time_Value &tv);
- // Copy constructor.
-
-# if defined (ACE_WIN32)
- ACE_Time_Value (const FILETIME &ft);
- // Initializes the ACE_Time_Value object from a Win32 FILETIME
-# endif /* ACE_WIN32 */
-
- void set (long sec, long usec);
- // Construct a <Time_Value> from two <long>s.
-
- void set (double d);
- // Construct a <Time_Value> from a <double>, which is assumed to be
- // in second format, with any remainder treated as microseconds.
-
- void set (const timeval &t);
- // Construct a <Time_Value> from a <timeval>.
-
- void set (const timespec_t &t);
- // Initializes the <Time_Value> object from a <timespec_t>.
-
-# if defined (ACE_WIN32)
- void set (const FILETIME &ft);
- // Initializes the <Time_Value> object from a <timespec_t>.
-# endif /* ACE_WIN32 */
-
- long msec (void) const;
- // Converts from <Time_Value> format into milli-seconds format.
-
- void msec (long);
- // Converts from milli-seconds format into <Time_Value> format.
-
- operator timespec_t () const;
- // Returns the value of the object as a <timespec_t>.
-
- operator timeval () const;
- // Returns the value of the object as a <timeval>.
-
- operator const timeval *() const;
- // Returns a pointer to the object as a <timeval>.
-
-# if defined (ACE_WIN32)
- operator FILETIME () const;
- // Returns the value of the object as a Win32 FILETIME.
-# endif /* ACE_WIN32 */
-
- // = The following are accessor/mutator methods.
-
- long sec (void) const;
- // Get seconds.
-
- void sec (long sec);
- // Set seconds.
-
- long usec (void) const;
- // Get microseconds.
-
- void usec (long usec);
- // Set microseconds.
-
- // = The following are arithmetic methods for operating on
- // Time_Values.
-
- void operator += (const ACE_Time_Value &tv);
- // Add <tv> to this.
-
- void operator -= (const ACE_Time_Value &tv);
- // Subtract <tv> to this.
-
- friend ACE_Export ACE_Time_Value operator + (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
- // Adds two ACE_Time_Value objects together, returns the sum.
-
- friend ACE_Export ACE_Time_Value operator - (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
- // Subtracts two ACE_Time_Value objects, returns the difference.
-
- friend ACE_Export int operator < (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
- // True if tv1 < tv2.
-
- friend ACE_Export int operator > (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
- // True if tv1 > tv2.
-
- friend ACE_Export int operator <= (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
- // True if tv1 <= tv2.
-
- friend ACE_Export int operator >= (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
- // True if tv1 >= tv2.
-
- friend ACE_Export int operator == (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
- // True if tv1 == tv2.
-
- friend ACE_Export int operator != (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2);
- // True if tv1 != tv2.
-
- void dump (void) const;
- // Dump the state of an object.
-
-# if defined (ACE_WIN32)
- static const DWORDLONG FILETIME_to_timval_skew;
- // Const time difference between FILETIME and POSIX time.
-# endif /* ACE_WIN32 */
-
-private:
- void normalize (void);
- // Put the timevalue into a canonical form.
-
- timeval tv_;
- // Store the values as a <timeval>.
-};
-
-class ACE_Export ACE_Countdown_Time
-{
- // = TITLE
- // Keeps track of the amount of elapsed time.
- //
- // = DESCRIPTION
- // This class has a side-effect on the <max_wait_time> -- every
- // time the <stop> method is called the <max_wait_time> is
- // updated.
-public:
- // = Initialization and termination methods.
- ACE_Countdown_Time (ACE_Time_Value *max_wait_time);
- // Cache the <max_wait_time> and call <start>.
-
- ~ACE_Countdown_Time (void);
- // Call <stop>.
-
- int start (void);
- // Cache the current time and enter a start state.
-
- int stop (void);
- // Subtract the elapsed time from max_wait_time_ and enter a stopped
- // state.
-
- int update (void);
- // Calls stop and then start. max_wait_time_ is modified by the
- // call to stop.
-
-private: ACE_Time_Value *max_wait_time_;
- // Maximum time we were willing to wait.
-
- ACE_Time_Value start_time_;
- // Beginning of the start time.
-
- int stopped_;
- // Keeps track of whether we've already been stopped.
-};
-
-# if defined (ACE_HAS_USING_KEYWORD)
-# define ACE_USING using
-# else
-# define ACE_USING
-# endif /* ACE_HAS_USING_KEYWORD */
-
-# if defined (ACE_HAS_TYPENAME_KEYWORD)
-# define ACE_TYPENAME typename
-# else
-# define ACE_TYPENAME
-# endif /* ACE_HAS_TYPENAME_KEYWORD */
-
-# if defined (ACE_HAS_STD_TEMPLATE_SPECIALIZATION)
-# define ACE_TEMPLATE_SPECIALIZATION template<>
-# else
-# define ACE_TEMPLATE_SPECIALIZATION
-# endif /* ACE_HAS_STD_TEMPLATE_SPECIALIZATION */
-
-# if defined (ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION)
-# define ACE_TEMPLATE_METHOD_SPECIALIZATION template<>
-# else
-# define ACE_TEMPLATE_METHOD_SPECIALIZATION
-# endif /* ACE_HAS_STD_TEMPLATE_SPECIALIZATION */
-
-# if defined (ACE_HAS_EXPLICIT_KEYWORD)
-# define ACE_EXPLICIT explicit
-# else /* ! ACE_HAS_EXPLICIT_KEYWORD */
-# define ACE_EXPLICIT
-# endif /* ! ACE_HAS_EXPLICIT_KEYWORD */
-
-# if defined (ACE_HAS_MUTABLE_KEYWORD)
-# define ACE_MUTABLE mutable
-# else /* ! ACE_HAS_MUTABLE_KEYWORD */
-# define ACE_MUTABLE
-# endif /* ! ACE_HAS_MUTABLE_KEYWORD */
-
-// The following is necessary since many C++ compilers don't support
-// typedef'd types inside of classes used as formal template
-// arguments... ;-(. Luckily, using the C++ preprocessor I can hide
-// most of this nastiness!
-
-# if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
-
-// Handle ACE_Message_Queue.
-# define ACE_SYNCH_DECL class _ACE_SYNCH
-# define ACE_SYNCH_USE _ACE_SYNCH
-# define ACE_SYNCH_MUTEX_T ACE_TYPENAME _ACE_SYNCH::MUTEX
-# define ACE_SYNCH_CONDITION_T ACE_TYPENAME _ACE_SYNCH::CONDITION
-# define ACE_SYNCH_SEMAPHORE_T ACE_TYPENAME _ACE_SYNCH::SEMAPHORE
-
-// Handle ACE_Malloc*
-# define ACE_MEM_POOL_1 class _ACE_MEM_POOL
-# define ACE_MEM_POOL_2 _ACE_MEM_POOL
-# define ACE_MEM_POOL _ACE_MEM_POOL
-# define ACE_MEM_POOL_OPTIONS ACE_TYPENAME _ACE_MEM_POOL::OPTIONS
-
-// Handle ACE_Svc_Handler
-# define ACE_PEER_STREAM_1 class _ACE_PEER_STREAM
-# define ACE_PEER_STREAM_2 _ACE_PEER_STREAM
-# define ACE_PEER_STREAM _ACE_PEER_STREAM
-# define ACE_PEER_STREAM_ADDR ACE_TYPENAME _ACE_PEER_STREAM::PEER_ADDR
-
-// Handle ACE_Acceptor
-# define ACE_PEER_ACCEPTOR_1 class _ACE_PEER_ACCEPTOR
-# define ACE_PEER_ACCEPTOR_2 _ACE_PEER_ACCEPTOR
-# define ACE_PEER_ACCEPTOR _ACE_PEER_ACCEPTOR
-# define ACE_PEER_ACCEPTOR_ADDR ACE_TYPENAME _ACE_PEER_ACCEPTOR::PEER_ADDR
-
-// Handle ACE_Connector
-# define ACE_PEER_CONNECTOR_1 class _ACE_PEER_CONNECTOR
-# define ACE_PEER_CONNECTOR_2 _ACE_PEER_CONNECTOR
-# define ACE_PEER_CONNECTOR _ACE_PEER_CONNECTOR
-# define ACE_PEER_CONNECTOR_ADDR ACE_TYPENAME _ACE_PEER_CONNECTOR::PEER_ADDR
-# if !defined(ACE_HAS_TYPENAME_KEYWORD)
-# define ACE_PEER_CONNECTOR_ADDR_ANY ACE_PEER_CONNECTOR_ADDR::sap_any
-# else
- //
- // If the compiler supports 'typename' we cannot use
- //
- // PEER_CONNECTOR::PEER_ADDR::sap_any
- //
- // because PEER_CONNECTOR::PEER_ADDR is not considered a type. But:
- //
- // typename PEER_CONNECTOR::PEER_ADDR::sap_any
- //
- // will not work either, because now we are declaring sap_any a
- // type, further:
- //
- // (typename PEER_CONNECTOR::PEER_ADDR)::sap_any
- //
- // is considered a casting expression. All I can think of is using a
- // typedef, I tried PEER_ADDR but that was a source of trouble on
- // some platforms. I will try:
- //
-# define ACE_PEER_CONNECTOR_ADDR_ANY ACE_PEER_ADDR_TYPEDEF::sap_any
-# endif /* ACE_HAS_TYPENAME_KEYWORD */
-
-// Handle ACE_SOCK_*
-# define ACE_SOCK_ACCEPTOR ACE_SOCK_Acceptor
-# define ACE_SOCK_CONNECTOR ACE_SOCK_Connector
-# define ACE_SOCK_STREAM ACE_SOCK_Stream
-
-// Handle ACE_MEM_*
-# define ACE_MEM_ACCEPTOR ACE_MEM_Acceptor
-# define ACE_MEM_CONNECTOR ACE_MEM_Connector
-# define ACE_MEM_STREAM ACE_MEM_Stream
-
-// Handle ACE_LSOCK_*
-# define ACE_LSOCK_ACCEPTOR ACE_LSOCK_Acceptor
-# define ACE_LSOCK_CONNECTOR ACE_LSOCK_Connector
-# define ACE_LSOCK_STREAM ACE_LSOCK_Stream
-
-// Handle ACE_TLI_*
-# define ACE_TLI_ACCEPTOR ACE_TLI_Acceptor
-# define ACE_TLI_CONNECTOR ACE_TLI_Connector
-# define ACE_TLI_STREAM ACE_TLI_Stream
-
-// Handle ACE_SPIPE_*
-# define ACE_SPIPE_ACCEPTOR ACE_SPIPE_Acceptor
-# define ACE_SPIPE_CONNECTOR ACE_SPIPE_Connector
-# define ACE_SPIPE_STREAM ACE_SPIPE_Stream
-
-// Handle ACE_UPIPE_*
-# define ACE_UPIPE_ACCEPTOR ACE_UPIPE_Acceptor
-# define ACE_UPIPE_CONNECTOR ACE_UPIPE_Connector
-# define ACE_UPIPE_STREAM ACE_UPIPE_Stream
-
-// Handle ACE_FILE_*
-# define ACE_FILE_CONNECTOR ACE_FILE_Connector
-# define ACE_FILE_STREAM ACE_FILE_IO
-
-// Handle ACE_*_Memory_Pool.
-# define ACE_MMAP_MEMORY_POOL ACE_MMAP_Memory_Pool
-# define ACE_LITE_MMAP_MEMORY_POOL ACE_Lite_MMAP_Memory_Pool
-# define ACE_SBRK_MEMORY_POOL ACE_Sbrk_Memory_Pool
-# define ACE_SHARED_MEMORY_POOL ACE_Shared_Memory_Pool
-# define ACE_LOCAL_MEMORY_POOL ACE_Local_Memory_Pool
-# define ACE_PAGEFILE_MEMORY_POOL ACE_Pagefile_Memory_Pool
-
-# else /* TEMPLATES are broken in some form or another (i.e., most C++ compilers) */
-
-// Handle ACE_Message_Queue.
-# if defined (ACE_HAS_OPTIMIZED_MESSAGE_QUEUE)
-# define ACE_SYNCH_DECL class _ACE_SYNCH_MUTEX_T, class _ACE_SYNCH_CONDITION_T, class _ACE_SYNCH_SEMAPHORE_T
-# define ACE_SYNCH_USE _ACE_SYNCH_MUTEX_T, _ACE_SYNCH_CONDITION_T, _ACE_SYNCH_SEMAPHORE_T
-# else
-# define ACE_SYNCH_DECL class _ACE_SYNCH_MUTEX_T, class _ACE_SYNCH_CONDITION_T
-# define ACE_SYNCH_USE _ACE_SYNCH_MUTEX_T, _ACE_SYNCH_CONDITION_T
-# endif /* ACE_HAS_OPTIMIZED_MESSAGE_QUEUE */
-# define ACE_SYNCH_MUTEX_T _ACE_SYNCH_MUTEX_T
-# define ACE_SYNCH_CONDITION_T _ACE_SYNCH_CONDITION_T
-# define ACE_SYNCH_SEMAPHORE_T _ACE_SYNCH_SEMAPHORE_T
-
-// Handle ACE_Malloc*
-# define ACE_MEM_POOL_1 class _ACE_MEM_POOL, class _ACE_MEM_POOL_OPTIONS
-# define ACE_MEM_POOL_2 _ACE_MEM_POOL, _ACE_MEM_POOL_OPTIONS
-# define ACE_MEM_POOL _ACE_MEM_POOL
-# define ACE_MEM_POOL_OPTIONS _ACE_MEM_POOL_OPTIONS
-
-// Handle ACE_Svc_Handler
-# define ACE_PEER_STREAM_1 class _ACE_PEER_STREAM, class _ACE_PEER_ADDR
-# define ACE_PEER_STREAM_2 _ACE_PEER_STREAM, _ACE_PEER_ADDR
-# define ACE_PEER_STREAM _ACE_PEER_STREAM
-# define ACE_PEER_STREAM_ADDR _ACE_PEER_ADDR
-
-// Handle ACE_Acceptor
-# define ACE_PEER_ACCEPTOR_1 class _ACE_PEER_ACCEPTOR, class _ACE_PEER_ADDR
-# define ACE_PEER_ACCEPTOR_2 _ACE_PEER_ACCEPTOR, _ACE_PEER_ADDR
-# define ACE_PEER_ACCEPTOR _ACE_PEER_ACCEPTOR
-# define ACE_PEER_ACCEPTOR_ADDR _ACE_PEER_ADDR
-
-// Handle ACE_Connector
-# define ACE_PEER_CONNECTOR_1 class _ACE_PEER_CONNECTOR, class _ACE_PEER_ADDR
-# define ACE_PEER_CONNECTOR_2 _ACE_PEER_CONNECTOR, _ACE_PEER_ADDR
-# define ACE_PEER_CONNECTOR _ACE_PEER_CONNECTOR
-# define ACE_PEER_CONNECTOR_ADDR _ACE_PEER_ADDR
-# define ACE_PEER_CONNECTOR_ADDR_ANY ACE_PEER_CONNECTOR_ADDR::sap_any
-
-// Handle ACE_SOCK_*
-# define ACE_SOCK_ACCEPTOR ACE_SOCK_Acceptor, ACE_INET_Addr
-# define ACE_SOCK_CONNECTOR ACE_SOCK_Connector, ACE_INET_Addr
-# define ACE_SOCK_STREAM ACE_SOCK_Stream, ACE_INET_Addr
-
-// Handle ACE_MEM_*
-# define ACE_MEM_ACCEPTOR ACE_MEM_Acceptor, ACE_MEM_Addr
-# define ACE_MEM_CONNECTOR ACE_MEM_Connector, ACE_INET_Addr
-# define ACE_MEM_STREAM ACE_MEM_Stream, ACE_INET_Addr
-
-// Handle ACE_LSOCK_*
-# define ACE_LSOCK_ACCEPTOR ACE_LSOCK_Acceptor, ACE_UNIX_Addr
-# define ACE_LSOCK_CONNECTOR ACE_LSOCK_Connector, ACE_UNIX_Addr
-# define ACE_LSOCK_STREAM ACE_LSOCK_Stream, ACE_UNIX_Addr
-
-// Handle ACE_TLI_*
-# define ACE_TLI_ACCEPTOR ACE_TLI_Acceptor, ACE_INET_Addr
-# define ACE_TLI_CONNECTOR ACE_TLI_Connector, ACE_INET_Addr
-# define ACE_TLI_STREAM ACE_TLI_Stream, ACE_INET_Addr
-
-// Handle ACE_SPIPE_*
-# define ACE_SPIPE_ACCEPTOR ACE_SPIPE_Acceptor, ACE_SPIPE_Addr
-# define ACE_SPIPE_CONNECTOR ACE_SPIPE_Connector, ACE_SPIPE_Addr
-# define ACE_SPIPE_STREAM ACE_SPIPE_Stream, ACE_SPIPE_Addr
-
-// Handle ACE_UPIPE_*
-# define ACE_UPIPE_ACCEPTOR ACE_UPIPE_Acceptor, ACE_SPIPE_Addr
-# define ACE_UPIPE_CONNECTOR ACE_UPIPE_Connector, ACE_SPIPE_Addr
-# define ACE_UPIPE_STREAM ACE_UPIPE_Stream, ACE_SPIPE_Addr
-
-// Handle ACE_FILE_*
-# define ACE_FILE_CONNECTOR ACE_FILE_Connector, ACE_FILE_Addr
-# define ACE_FILE_STREAM ACE_FILE_IO, ACE_FILE_Addr
-
-// Handle ACE_*_Memory_Pool.
-# define ACE_MMAP_MEMORY_POOL ACE_MMAP_Memory_Pool, ACE_MMAP_Memory_Pool_Options
-# define ACE_LITE_MMAP_MEMORY_POOL ACE_Lite_MMAP_Memory_Pool, ACE_MMAP_Memory_Pool_Options
-# define ACE_SBRK_MEMORY_POOL ACE_Sbrk_Memory_Pool, ACE_Sbrk_Memory_Pool_Options
-# define ACE_SHARED_MEMORY_POOL ACE_Shared_Memory_Pool, ACE_Shared_Memory_Pool_Options
-# define ACE_LOCAL_MEMORY_POOL ACE_Local_Memory_Pool, ACE_Local_Memory_Pool_Options
-# define ACE_PAGEFILE_MEMORY_POOL ACE_Pagefile_Memory_Pool, ACE_Pagefile_Memory_Pool_Options
-# endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
-
-// These two are only for backward compatibility. You should avoid
-// using them if not necessary.
-# define ACE_SYNCH_1 ACE_SYNCH_DECL
-# define ACE_SYNCH_2 ACE_SYNCH_USE
-
-// For Win32 compatibility...
-# if !defined (ACE_WSOCK_VERSION)
-# define ACE_WSOCK_VERSION 0, 0
-# endif /* ACE_WSOCK_VERSION */
-
-# if defined (ACE_HAS_BROKEN_CTIME)
-# undef ctime
-# endif /* ACE_HAS_BROKEN_CTIME */
-
-extern "C" {
-typedef void (*ACE_Service_Object_Exterminator)(void *);
-}
-
-// Static service macros
-# define ACE_STATIC_SVC_DECLARE(X) extern ACE_Static_Svc_Descriptor ace_svc_desc_##X ;
-# define ACE_STATIC_SVC_DEFINE(X, NAME, TYPE, FN, FLAGS, ACTIVE) \
-ACE_Static_Svc_Descriptor ace_svc_desc_##X = { NAME, TYPE, FN, FLAGS, ACTIVE };
-# define ACE_STATIC_SVC_REQUIRE(X)\
-class ACE_Static_Svc_##X {\
-public:\
- ACE_Static_Svc_##X() { ACE_Service_Config::static_svcs ()->insert (&ace_svc_desc_##X); }\
-};\
-static ACE_Static_Svc_##X ace_static_svc_##X;
-
-
-// More generic dynamic/static service macros.
-# define ACE_FACTORY_DECLARE(CLS,X) extern "C" CLS##_Export ACE_Service_Object *_make_##X (ACE_Service_Object_Exterminator *);
-# define ACE_FACTORY_DEFINE(CLS,X) \
-extern "C" void _gobble_##X (void *p) { \
- ACE_Service_Object *_p = ACE_reinterpret_cast (ACE_Service_Object *, p); \
- ACE_ASSERT (_p != 0); \
- delete _p; } \
-extern "C" ACE_Service_Object *_make_##X (ACE_Service_Object_Exterminator *gobbler) \
-{ ACE_TRACE (#X); \
-if (gobbler != 0) *gobbler = (ACE_Service_Object_Exterminator) _gobble_##X; return new X; }
-
-// Dynamic/static service macros.
-# define ACE_SVC_FACTORY_DECLARE(X) ACE_FACTORY_DECLARE (ACE_Svc, X)
-# define ACE_SVC_INVOKE(X) _make_##X (0)
-# define ACE_SVC_NAME(X) _make_##X
-# define ACE_SVC_FACTORY_DEFINE(X) ACE_FACTORY_DEFINE (ACE_Svc, X)
-
-# if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))
-# define ACE_TSS_TYPE(T) ACE_TSS< T >
-# if defined (ACE_HAS_BROKEN_CONVERSIONS)
-# define ACE_TSS_GET(I, T) (*(I))
-# else
-# define ACE_TSS_GET(I, T) ((I)->operator T * ())
-# endif /* ACE_HAS_BROKEN_CONVERSIONS */
-# else
-# define ACE_TSS_TYPE(T) T
-# define ACE_TSS_GET(I, T) (I)
-# endif /* ACE_HAS_THREADS && (ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATIOND) */
-
-# if defined (ACE_LACKS_MODE_MASKS)
-// MODE MASKS
-
-// the following macros are for POSIX conformance.
-
-# if !defined (ACE_HAS_USER_MODE_MASKS)
-# define S_IRWXU 00700 /* read, write, execute: owner. */
-# define S_IRUSR 00400 /* read permission: owner. */
-# define S_IWUSR 00200 /* write permission: owner. */
-# define S_IXUSR 00100 /* execute permission: owner. */
-# endif /* ACE_HAS_USER_MODE_MASKS */
-# define S_IRWXG 00070 /* read, write, execute: group. */
-# define S_IRGRP 00040 /* read permission: group. */
-# define S_IWGRP 00020 /* write permission: group. */
-# define S_IXGRP 00010 /* execute permission: group. */
-# define S_IRWXO 00007 /* read, write, execute: other. */
-# define S_IROTH 00004 /* read permission: other. */
-# define S_IWOTH 00002 /* write permission: other. */
-# define S_IXOTH 00001 /* execute permission: other. */
-
-# endif /* ACE_LACKS_MODE_MASKS */
-
-# if defined (ACE_LACKS_SEMBUF_T)
-struct sembuf
-{
- unsigned short sem_num; // semaphore #
- short sem_op; // semaphore operation
- short sem_flg; // operation flags
-};
-# endif /* ACE_LACKS_SEMBUF_T */
-
-# if defined (ACE_LACKS_MSGBUF_T)
-struct msgbuf {};
-# endif /* ACE_LACKS_MSGBUF_T */
-
-# if defined (ACE_LACKS_STRRECVFD)
-struct strrecvfd {};
-# endif /* ACE_LACKS_STRRECVFD */
-
-# if defined (ACE_HAS_PROC_FS)
-# include /**/ <sys/procfs.h>
-# endif /* ACE_HAS_PROC_FS */
-
-# if defined (ACE_HAS_BROKEN_WRITEV)
-typedef struct iovec ACE_WRITEV_TYPE;
-# else
-typedef const struct iovec ACE_WRITEV_TYPE;
-# endif /* ACE_HAS_BROKEN_WRITEV */
-
-# if defined (ACE_HAS_BROKEN_READV)
-typedef const struct iovec ACE_READV_TYPE;
-# else
-typedef struct iovec ACE_READV_TYPE;
-# endif /* ACE_HAS_BROKEN_READV */
-
-# if defined (ACE_HAS_BROKEN_SETRLIMIT)
-typedef struct rlimit ACE_SETRLIMIT_TYPE;
-# else
-typedef const struct rlimit ACE_SETRLIMIT_TYPE;
-# endif /* ACE_HAS_BROKEN_SETRLIMIT */
-
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# define ACE_MT(X) X
-# if !defined (_REENTRANT)
-# define _REENTRANT
-# endif /* _REENTRANT */
-# else
-# define ACE_MT(X)
-# endif /* ACE_MT_SAFE */
-
-# if !defined (ACE_DEFAULT_THREAD_PRIORITY)
-# define ACE_DEFAULT_THREAD_PRIORITY (-0x7fffffffL - 1L)
-# endif /* ACE_DEFAULT_THREAD_PRIORITY */
-
-// Convenient macro for testing for deadlock, as well as for detecting
-// when mutexes fail.
-# define ACE_GUARD(MUTEX,OBJ,LOCK) \
- ACE_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) return;
-# define ACE_GUARD_RETURN(MUTEX,OBJ,LOCK,RETURN) \
- ACE_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) return RETURN;
-# define ACE_WRITE_GUARD(MUTEX,OBJ,LOCK) \
- ACE_Write_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) return;
-# define ACE_WRITE_GUARD_RETURN(MUTEX,OBJ,LOCK,RETURN) \
- ACE_Write_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) return RETURN;
-# define ACE_READ_GUARD(MUTEX,OBJ,LOCK) \
- ACE_Read_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) return;
-# define ACE_READ_GUARD_RETURN(MUTEX,OBJ,LOCK,RETURN) \
- ACE_Read_Guard< MUTEX > OBJ (LOCK); \
- if (OBJ.locked () == 0) return RETURN;
-
-# if defined (ACE_HAS_POSIX_SEM)
-# include /**/ <semaphore.h>
-
-# if !defined (SEM_FAILED) && !defined (ACE_LACKS_NAMED_POSIX_SEM)
-# define SEM_FAILED ((sem_t *) -1)
-# endif /* !SEM_FAILED */
-
-typedef struct
-{
- sem_t *sema_;
- // Pointer to semaphore handle. This is allocated by ACE if we are
- // working with an unnamed POSIX semaphore or by the OS if we are
- // working with a named POSIX semaphore.
-
- char *name_;
- // Name of the semaphore (if this is non-NULL then this is a named
- // POSIX semaphore, else its an unnamed POSIX semaphore).
-} ACE_sema_t;
-# endif /* ACE_HAS_POSIX_SEM */
-
-struct cancel_state
-{
- int cancelstate;
- // e.g., PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE,
- // PTHREAD_CANCELED.
-
- int canceltype;
- // e.g., PTHREAD_CANCEL_DEFERRED and PTHREAD_CANCEL_ASYNCHRONOUS.
-};
-
-# if defined (ACE_HAS_WINCE)
-# include /**/ <types.h>
-
-typedef DWORD nlink_t;
-
-// CE's add-on for c-style fstat/stat functionalities. This struct is
-// by no mean complete compared to what you usually find in UNIX
-// platforms. Only members that have direct conversion using Win32's
-// BY_HANDLE_FILE_INFORMATION are defined so that users can discover
-// non-supported members at compile time. Time values are of type
-// ACE_Time_Value for easy comparison.
-
-struct stat
-{
- // mode_t st_mode; // UNIX styled file attribute
- // nlink_t st_nlink; // number of hard links
- ACE_Time_Value st_atime; // time of last access
- ACE_Time_Value st_mtime; // time of last data modification
- off_t st_size; // file size, in bytes
- // u_long st_blksize; // optimal blocksize for I/O
- // u_long st_flags; // user defined flags for file
-};
-
-# else /* ! ACE_HAS_WINCE */
-# if defined (ACE_LACKS_SYS_TYPES_H)
-# if ! defined (ACE_PSOS)
- typedef unsigned char u_char;
- typedef unsigned short u_short;
- typedef unsigned int u_int;
- typedef unsigned long u_long;
-
- typedef unsigned char uchar_t;
- typedef unsigned short ushort_t;
- typedef unsigned int uint_t;
- typedef unsigned long ulong_t;
-# endif /* ! defined (ACE_PSOS) */
-# else
-# include /**/ <sys/types.h>
-# endif /* ACE_LACKS_SYS_TYPES_H */
-
-# if ! defined (ACE_PSOS)
-# include /**/ <sys/stat.h>
-# endif
-# endif /* ACE_HAS_WINCE */
-
-
-#if defined (ACE_HAS_NO_THROW_SPEC)
-# define ACE_THROW_SPEC(X)
-#else
-# if defined (ACE_HAS_EXCEPTIONS)
-# define ACE_THROW_SPEC(X) throw X
-# if defined (ACE_WIN32)
-// @@ MSVC "supports" the keyword but doesn't implement it (Huh?).
-// Therefore, we simply supress the warning for now.
-# pragma warning( disable : 4290 )
-# endif /* ACE_WIN32 */
-# else /* ! ACE_HAS_EXCEPTIONS */
-# define ACE_THROW_SPEC(X)
-# endif /* ! ACE_HAS_EXCEPTIONS */
-#endif /*ACE_HAS_NO_THROW_SPEC*/
-
-
-#if defined (ACE_HAS_PRIOCNTL)
- // Need to #include thread.h before #defining THR_BOUND, etc.,
- // when building without threads on SunOS 5.x.
-# if defined (sun)
-# include /**/ <thread.h>
-# endif /* sun */
-
- // Need to #include these before #defining USYNC_PROCESS on SunOS 5.x.
-# include /**/ <sys/rtpriocntl.h>
-# include /**/ <sys/tspriocntl.h>
-#endif /* ACE_HAS_PRIOCNTL */
-
-# if defined (ACE_HAS_THREADS)
-
-# if defined (ACE_HAS_STHREADS)
-# include /**/ <synch.h>
-# include /**/ <thread.h>
-# define ACE_SCOPE_PROCESS P_PID
-# define ACE_SCOPE_LWP P_LWPID
-# define ACE_SCOPE_THREAD (ACE_SCOPE_LWP + 1)
-# else
-# define ACE_SCOPE_PROCESS 0
-# define ACE_SCOPE_LWP 1
-# define ACE_SCOPE_THREAD 2
-# endif /* ACE_HAS_STHREADS */
-
-# if !defined (ACE_HAS_PTHREADS)
-# define ACE_SCHED_OTHER 0
-# define ACE_SCHED_FIFO 1
-# define ACE_SCHED_RR 2
-# endif /* ! ACE_HAS_PTHREADS */
-
-# if defined (ACE_HAS_PTHREADS)
-# define ACE_SCHED_OTHER SCHED_OTHER
-# define ACE_SCHED_FIFO SCHED_FIFO
-# define ACE_SCHED_RR SCHED_RR
-
-// Definitions for mapping POSIX pthreads draft 6 into 1003.1c names
-
-# if defined (ACE_HAS_PTHREADS_DRAFT6)
-# define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
-# define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_GLOBAL
-# define PTHREAD_CREATE_UNDETACHED 0
-# define PTHREAD_CREATE_DETACHED 1
-# define PTHREAD_CREATE_JOINABLE 0
-# define PTHREAD_EXPLICIT_SCHED 0
-# define PTHREAD_MIN_PRIORITY 0
-# define PTHREAD_MAX_PRIORITY 126
-# endif /* ACE_HAS_PTHREADS_DRAFT6 */
-
-// Definitions for THREAD- and PROCESS-LEVEL priorities...some
-// implementations define these while others don't. In order to
-// further complicate matters, we don't redefine the default (*_DEF)
-// values if they've already been defined, which allows individual
-// programs to have their own ACE-wide "default".
-
-// PROCESS-level values
-# if !defined(_UNICOS)
-# define ACE_PROC_PRI_FIFO_MIN (sched_get_priority_min(SCHED_FIFO))
-# define ACE_PROC_PRI_RR_MIN (sched_get_priority_min(SCHED_RR))
-# define ACE_PROC_PRI_OTHER_MIN (sched_get_priority_min(SCHED_OTHER))
-# else // UNICOS is missing a sched_get_priority_min() implementation
-# define ACE_PROC_PRI_FIFO_MIN 0
-# define ACE_PROC_PRI_RR_MIN 0
-# define ACE_PROC_PRI_OTHER_MIN 0
-# endif
-# define ACE_PROC_PRI_FIFO_MAX (sched_get_priority_max(SCHED_FIFO))
-# define ACE_PROC_PRI_RR_MAX (sched_get_priority_max(SCHED_RR))
-# define ACE_PROC_PRI_OTHER_MAX (sched_get_priority_max(SCHED_OTHER))
-# if !defined(ACE_PROC_PRI_FIFO_DEF)
-# define ACE_PROC_PRI_FIFO_DEF (ACE_PROC_PRI_FIFO_MIN + (ACE_PROC_PRI_FIFO_MAX - ACE_PROC_PRI_FIFO_MIN)/2)
-# endif
-# if !defined(ACE_PROC_PRI_RR_DEF)
-# define ACE_PROC_PRI_RR_DEF (ACE_PROC_PRI_RR_MIN + (ACE_PROC_PRI_RR_MAX - ACE_PROC_PRI_RR_MIN)/2)
-# endif
-# if !defined(ACE_PROC_PRI_OTHER_DEF)
-# define ACE_PROC_PRI_OTHER_DEF (ACE_PROC_PRI_OTHER_MIN + (ACE_PROC_PRI_OTHER_MAX - ACE_PROC_PRI_OTHER_MIN)/2)
-# endif
-
-// THREAD-level values
-# if defined(PRI_FIFO_MIN) && defined(PRI_FIFO_MAX) && defined(PRI_RR_MIN) && defined(PRI_RR_MAX) && defined(PRI_OTHER_MIN) && defined(PRI_OTHER_MAX)
-# define ACE_THR_PRI_FIFO_MIN (long) PRI_FIFO_MIN
-# define ACE_THR_PRI_FIFO_MAX (long) PRI_FIFO_MAX
-# define ACE_THR_PRI_RR_MIN (long) PRI_RR_MIN
-# define ACE_THR_PRI_RR_MAX (long) PRI_RR_MAX
-# define ACE_THR_PRI_OTHER_MIN (long) PRI_OTHER_MIN
-# define ACE_THR_PRI_OTHER_MAX (long) PRI_OTHER_MAX
-# elif defined (AIX)
-# define ACE_THR_PRI_FIFO_MIN (long) PRIORITY_MIN
-# define ACE_THR_PRI_FIFO_MAX (long) PRIORITY_MAX
-# define ACE_THR_PRI_RR_MIN (long) PRIORITY_MIN
-# define ACE_THR_PRI_RR_MAX (long) PRIORITY_MAX
-# define ACE_THR_PRI_OTHER_MIN (long) PRIORITY_MIN
-# define ACE_THR_PRI_OTHER_MAX (long) PRIORITY_MAX
-# elif defined (sun)
- // SunOS 5.6 could use sched_get_priority_min/max () for FIFO
- // and RR. But for OTHER, it returns negative values, which
- // can't be used. sched_get_priority_min/max () aren't
- // supported in SunOS 5.5.1.
-# define ACE_THR_PRI_FIFO_MIN (long) 0
-# define ACE_THR_PRI_FIFO_MAX (long) 59
-# define ACE_THR_PRI_RR_MIN (long) 0
-# define ACE_THR_PRI_RR_MAX (long) 59
-# define ACE_THR_PRI_OTHER_MIN (long) 0
-# define ACE_THR_PRI_OTHER_MAX (long) 59
-# else
-# define ACE_THR_PRI_FIFO_MIN (long) ACE_PROC_PRI_FIFO_MIN
-# define ACE_THR_PRI_FIFO_MAX (long) ACE_PROC_PRI_FIFO_MAX
-# define ACE_THR_PRI_RR_MIN (long) ACE_PROC_PRI_RR_MIN
-# define ACE_THR_PRI_RR_MAX (long) ACE_PROC_PRI_RR_MAX
-# define ACE_THR_PRI_OTHER_MIN (long) ACE_PROC_PRI_OTHER_MIN
-# define ACE_THR_PRI_OTHER_MAX (long) ACE_PROC_PRI_OTHER_MAX
-# endif
-# if !defined(ACE_THR_PRI_FIFO_DEF)
-# define ACE_THR_PRI_FIFO_DEF ((ACE_THR_PRI_FIFO_MIN + ACE_THR_PRI_FIFO_MAX)/2)
-# endif
-# if !defined(ACE_THR_PRI_RR_DEF)
-# define ACE_THR_PRI_RR_DEF ((ACE_THR_PRI_RR_MIN + ACE_THR_PRI_RR_MAX)/2)
-# endif
-# if !defined(ACE_THR_PRI_OTHER_DEF)
-# define ACE_THR_PRI_OTHER_DEF ((ACE_THR_PRI_OTHER_MIN + ACE_THR_PRI_OTHER_MAX)/2)
-# endif
-
-// Typedefs to help compatibility with Windows NT and Pthreads.
-typedef pthread_t ACE_hthread_t;
-typedef pthread_t ACE_thread_t;
-
-# if defined (ACE_HAS_TSS_EMULATION)
- typedef pthread_key_t ACE_OS_thread_key_t;
- typedef u_long ACE_thread_key_t;
-# else /* ! ACE_HAS_TSS_EMULATION */
- typedef pthread_key_t ACE_thread_key_t;
-# endif /* ! ACE_HAS_TSS_EMULATION */
-
-# if !defined (ACE_LACKS_COND_T)
-typedef pthread_mutex_t ACE_mutex_t;
-typedef pthread_cond_t ACE_cond_t;
-typedef pthread_condattr_t ACE_condattr_t;
-typedef pthread_mutexattr_t ACE_mutexattr_t;
-# endif /* ! ACE_LACKS_COND_T */
-typedef pthread_mutex_t ACE_thread_mutex_t;
-
-# if !defined (PTHREAD_CANCEL_DISABLE)
-# define PTHREAD_CANCEL_DISABLE 0
-# endif /* PTHREAD_CANCEL_DISABLE */
-
-# if !defined (PTHREAD_CANCEL_ENABLE)
-# define PTHREAD_CANCEL_ENABLE 0
-# endif /* PTHREAD_CANCEL_ENABLE */
-
-# if !defined (PTHREAD_CANCEL_DEFERRED)
-# define PTHREAD_CANCEL_DEFERRED 0
-# endif /* PTHREAD_CANCEL_DEFERRED */
-
-# if !defined (PTHREAD_CANCEL_ASYNCHRONOUS)
-# define PTHREAD_CANCEL_ASYNCHRONOUS 0
-# endif /* PTHREAD_CANCEL_ASYNCHRONOUS */
-
-# define THR_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
-# define THR_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
-# define THR_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
-# define THR_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
-
-# if !defined (PTHREAD_CREATE_JOINABLE)
-# if defined (PTHREAD_CREATE_UNDETACHED)
-# define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED
-# else
-# define PTHREAD_CREATE_JOINABLE 0
-# endif /* PTHREAD_CREATE_UNDETACHED */
-# endif /* PTHREAD_CREATE_JOINABLE */
-
-# if !defined (PTHREAD_CREATE_DETACHED)
-# define PTHREAD_CREATE_DETACHED 1
-# endif /* PTHREAD_CREATE_DETACHED */
-
-# if !defined (PTHREAD_PROCESS_PRIVATE) && !defined (ACE_HAS_PTHREAD_PROCESS_ENUM)
-# if defined (PTHREAD_MUTEXTYPE_FAST)
-# define PTHREAD_PROCESS_PRIVATE PTHREAD_MUTEXTYPE_FAST
-# else
-# define PTHREAD_PROCESS_PRIVATE 0
-# endif /* PTHREAD_MUTEXTYPE_FAST */
-# endif /* PTHREAD_PROCESS_PRIVATE */
-
-# if !defined (PTHREAD_PROCESS_SHARED) && !defined (ACE_HAS_PTHREAD_PROCESS_ENUM)
-# if defined (PTHREAD_MUTEXTYPE_FAST)
-# define PTHREAD_PROCESS_SHARED PTHREAD_MUTEXTYPE_FAST
-# else
-# define PTHREAD_PROCESS_SHARED 1
-# endif /* PTHREAD_MUTEXTYPE_FAST */
-# endif /* PTHREAD_PROCESS_SHARED */
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
-# if defined (PTHREAD_PROCESS_PRIVATE)
-# if !defined (USYNC_THREAD)
-# define USYNC_THREAD PTHREAD_PROCESS_PRIVATE
-# endif /* ! USYNC_THREAD */
-# else
-# if !defined (USYNC_THREAD)
-# define USYNC_THREAD MUTEX_NONRECURSIVE_NP
-# endif /* ! USYNC_THREAD */
-# endif /* PTHREAD_PROCESS_PRIVATE */
-
-# if defined (PTHREAD_PROCESS_SHARED)
-# if !defined (USYNC_PROCESS)
-# define USYNC_PROCESS PTHREAD_PROCESS_SHARED
-# endif /* ! USYNC_PROCESS */
-# else
-# if !defined (USYNC_PROCESS)
-# define USYNC_PROCESS MUTEX_NONRECURSIVE_NP
-# endif /* ! USYNC_PROCESS */
-# endif /* PTHREAD_PROCESS_SHARED */
-# elif !defined (ACE_HAS_STHREADS)
-# if !defined (USYNC_THREAD)
-# define USYNC_THREAD PTHREAD_PROCESS_PRIVATE
-# endif /* ! USYNC_THREAD */
-# if !defined (USYNC_PROCESS)
-# define USYNC_PROCESS PTHREAD_PROCESS_SHARED
-# endif /* ! USYNC_PROCESS */
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-
-# define THR_BOUND 0x00000001
-# if defined (CHORUS)
-# define THR_NEW_LWP 0x00000000
-# else
-# define THR_NEW_LWP 0x00000002
-# endif /* CHORUS */
-# define THR_DETACHED 0x00000040
-# define THR_SUSPENDED 0x00000080
-# define THR_DAEMON 0x00000100
-# define THR_JOINABLE 0x00010000
-# define THR_SCHED_FIFO 0x00020000
-# define THR_SCHED_RR 0x00040000
-# define THR_SCHED_DEFAULT 0x00080000
-# if defined (ACE_HAS_IRIX62_THREADS)
-# define THR_SCOPE_SYSTEM 0x00100000
-# else
-# define THR_SCOPE_SYSTEM THR_BOUND
-# endif /* ACE_HAS_IRIX62_THREADS */
-# define THR_SCOPE_PROCESS 0x00200000
-# define THR_INHERIT_SCHED 0x00400000
-# define THR_EXPLICIT_SCHED 0x00800000
-# define THR_SCHED_IO 0x01000000
-
-# if !defined (ACE_HAS_STHREADS)
-# if !defined (ACE_HAS_POSIX_SEM)
-class ACE_Export ACE_sema_t
-{
- // = TITLE
- // This is used to implement semaphores for platforms that support
- // POSIX pthreads, but do *not* support POSIX semaphores, i.e.,
- // it's a different type than the POSIX <sem_t>.
-friend class ACE_OS;
-protected:
- ACE_mutex_t lock_;
- // Serialize access to internal state.
-
- ACE_cond_t count_nonzero_;
- // Block until there are no waiters.
-
- u_long count_;
- // Count of the semaphore.
-
- u_long waiters_;
- // Number of threads that have called <ACE_OS::sema_wait>.
-};
-# endif /* !ACE_HAS_POSIX_SEM */
-
-# if defined (ACE_LACKS_PTHREAD_YIELD) && defined (ACE_HAS_THR_YIELD)
- // If we are on Solaris we can just reuse the existing
- // implementations of these synchronization types.
-# if !defined (ACE_LACKS_RWLOCK_T)
-# include /**/ <synch.h>
-typedef rwlock_t ACE_rwlock_t;
-# endif /* !ACE_LACKS_RWLOCK_T */
-# include /**/ <thread.h>
-# endif /* (ACE_LACKS_PTHREAD_YIELD) && defined (ACE_HAS_THR_YIELD) */
-
-# else
-# if !defined (ACE_HAS_POSIX_SEM)
-typedef sema_t ACE_sema_t;
-# endif /* !ACE_HAS_POSIX_SEM */
-# endif /* !ACE_HAS_STHREADS */
-# elif defined (ACE_HAS_STHREADS)
-// Solaris threads, without PTHREADS.
-// Typedefs to help compatibility with Windows NT and Pthreads.
-typedef thread_t ACE_thread_t;
-typedef thread_key_t ACE_thread_key_t;
-typedef mutex_t ACE_mutex_t;
-# if !defined (ACE_LACKS_RWLOCK_T)
-typedef rwlock_t ACE_rwlock_t;
-# endif /* !ACE_LACKS_RWLOCK_T */
-# if !defined (ACE_HAS_POSIX_SEM)
-typedef sema_t ACE_sema_t;
-# endif /* !ACE_HAS_POSIX_SEM */
-
-typedef cond_t ACE_cond_t;
-struct ACE_Export ACE_condattr_t
-{
- int type;
-};
-struct ACE_Export ACE_mutexattr_t
-{
- int type;
-};
-typedef ACE_thread_t ACE_hthread_t;
-typedef ACE_mutex_t ACE_thread_mutex_t;
-
-# define THR_CANCEL_DISABLE 0
-# define THR_CANCEL_ENABLE 0
-# define THR_CANCEL_DEFERRED 0
-# define THR_CANCEL_ASYNCHRONOUS 0
-# define THR_JOINABLE 0
-# define THR_SCHED_FIFO 0
-# define THR_SCHED_RR 0
-# define THR_SCHED_DEFAULT 0
-
-# elif defined (ACE_PSOS)
-
-// Some versions of pSOS provide native mutex support. For others,
-// implement ACE_thread_mutex_t and ACE_mutex_t using pSOS semaphores.
-// Either way, the types are all u_longs.
-typedef u_long ACE_mutex_t;
-typedef u_long ACE_thread_mutex_t;
-typedef u_long ACE_thread_t;
-typedef u_long ACE_hthread_t;
-
-#if defined (ACE_PSOS_HAS_COND_T)
-typedef u_long ACE_cond_t;
-struct ACE_Export ACE_condattr_t
-{
- int type;
-};
-struct ACE_Export ACE_mutexattr_t
-{
- int type;
-};
-#endif /* ACE_PSOS_HAS_COND_T */
-
-
-// TCB registers 0-7 are for application use
-# define PSOS_TASK_REG_TSS 0
-# define PSOS_TASK_REG_MAX 7
-
-# define PSOS_TASK_MIN_PRIORITY 1
-# define PSOS_TASK_MAX_PRIORITY 239
-
-// Key type: the ACE TSS emulation requires the key type be unsigned,
-// for efficiency. Current POSIX and Solaris TSS implementations also
-// use unsigned int, so the ACE TSS emulation is compatible with them.
-// Native pSOS TSD, where available, uses unsigned long as the key type.
-# if defined (ACE_PSOS_HAS_TSS)
-typedef u_long ACE_thread_key_t;
-# else
-typedef u_int ACE_thread_key_t;
-# endif /* ACE_PSOS_HAS_TSS */
-
-# define THR_CANCEL_DISABLE 0 /* thread can never be cancelled */
-# define THR_CANCEL_ENABLE 0 /* thread can be cancelled */
-# define THR_CANCEL_DEFERRED 0 /* cancellation deferred to cancellation point */
-# define THR_CANCEL_ASYNCHRONOUS 0 /* cancellation occurs immediately */
-
-# define THR_BOUND 0
-# define THR_NEW_LWP 0
-# define THR_DETACHED 0
-# define THR_SUSPENDED 0
-# define THR_DAEMON 0
-# define THR_JOINABLE 0
-
-# define THR_SCHED_FIFO 0
-# define THR_SCHED_RR 0
-# define THR_SCHED_DEFAULT 0
-# define USYNC_THREAD T_LOCAL
-# define USYNC_PROCESS T_GLOBAL
-
-/* from psos.h */
-/* #define T_NOPREEMPT 0x00000001 Not preemptible bit */
-/* #define T_PREEMPT 0x00000000 Preemptible */
-/* #define T_TSLICE 0x00000002 Time-slicing enabled bit */
-/* #define T_NOTSLICE 0x00000000 No Time-slicing */
-/* #define T_NOASR 0x00000004 ASRs disabled bit */
-/* #define T_ASR 0x00000000 ASRs enabled */
-
-/* #define SM_GLOBAL 0x00000001 1 = Global */
-/* #define SM_LOCAL 0x00000000 0 = Local */
-/* #define SM_PRIOR 0x00000002 Queue by priority */
-/* #define SM_FIFO 0x00000000 Queue by FIFO order */
-
-/* #define T_NOFPU 0x00000000 Not using FPU */
-/* #define T_FPU 0x00000002 Using FPU bit */
-
-# elif defined (VXWORKS)
-// For mutex implementation using mutual-exclusion semaphores (which
-// can be taken recursively).
-# include /**/ <semLib.h>
-
-# include /**/ <envLib.h>
-# include /**/ <hostLib.h>
-# include /**/ <ioLib.h>
-# include /**/ <remLib.h>
-# include /**/ <selectLib.h>
-# include /**/ <sigLib.h>
-# include /**/ <sockLib.h>
-# include /**/ <sysLib.h>
-# include /**/ <taskLib.h>
-# include /**/ <taskHookLib.h>
-
-extern "C"
-struct sockaddr_un {
- short sun_family; // AF_UNIX.
- char sun_path[108]; // path name.
-};
-
-# define MAXPATHLEN 1024
-# define MAXNAMLEN 255
-# define NSIG (_NSIGS + 1)
-
-// task options: the other options are either obsolete, internal, or for
-// Fortran or Ada support
-# define VX_UNBREAKABLE 0x0002 /* breakpoints ignored */
-# define VX_FP_TASK 0x0008 /* floating point coprocessor */
-# define VX_PRIVATE_ENV 0x0080 /* private environment support */
-# define VX_NO_STACK_FILL 0x0100 /* do not stack fill for
- checkstack () */
-
-# define THR_CANCEL_DISABLE 0
-# define THR_CANCEL_ENABLE 0
-# define THR_CANCEL_DEFERRED 0
-# define THR_CANCEL_ASYNCHRONOUS 0
-# define THR_BOUND 0
-# define THR_NEW_LWP 0
-# define THR_DETACHED 0
-# define THR_SUSPENDED 0
-# define THR_DAEMON 0
-# define THR_JOINABLE 0
-# define THR_SCHED_FIFO 0
-# define THR_SCHED_RR 0
-# define THR_SCHED_DEFAULT 0
-# define USYNC_THREAD 0
-# define USYNC_PROCESS 1 /* It's all global on VxWorks
- (without MMU option). */
-
-# if !defined (ACE_DEFAULT_SYNCH_TYPE)
- // Types include these options: SEM_Q_PRIORITY, SEM_Q_FIFO,
- // SEM_DELETE_SAFE, and SEM_INVERSION_SAFE. SEM_Q_FIFO is
- // used as the default because that is VxWorks' default.
-# define ACE_DEFAULT_SYNCH_TYPE SEM_Q_FIFO
-# endif /* ! ACE_DEFAULT_SYNCH_TYPE */
-
-typedef SEM_ID ACE_mutex_t;
-// Implement ACE_thread_mutex_t with ACE_mutex_t because there's just
-// one process . . .
-typedef ACE_mutex_t ACE_thread_mutex_t;
-# if !defined (ACE_HAS_POSIX_SEM)
-// Use VxWorks semaphores, wrapped ...
-typedef struct
-{
- SEM_ID sema_;
- // Semaphore handle. This is allocated by VxWorks.
-
- char *name_;
- // Name of the semaphore: always NULL with VxWorks.
-} ACE_sema_t;
-# endif /* !ACE_HAS_POSIX_SEM */
-typedef char * ACE_thread_t;
-typedef int ACE_hthread_t;
-// Key type: the ACE TSS emulation requires the key type be unsigned,
-// for efficiency. (Current POSIX and Solaris TSS implementations also
-// use u_int, so the ACE TSS emulation is compatible with them.)
-typedef u_int ACE_thread_key_t;
-
- // Marker for ACE_Thread_Manager to indicate that it allocated
- // an ACE_thread_t. It is placed at the beginning of the ID.
-# define ACE_THR_ID_ALLOCATED '\022'
-
-# elif defined (ACE_HAS_WTHREADS)
-
-typedef CRITICAL_SECTION ACE_thread_mutex_t;
-typedef struct
-{
- int type_; // Either USYNC_THREAD or USYNC_PROCESS
- union
- {
- HANDLE proc_mutex_;
- CRITICAL_SECTION thr_mutex_;
- };
-} ACE_mutex_t;
-
-// Wrapper for NT Events.
-typedef HANDLE ACE_event_t;
-
-//@@ ACE_USES_WINCE_SEMA_SIMULATION is used to debug
-// semaphore simulation on WinNT. It should be
-// changed to ACE_USES_HAS_WINCE at some later point.
-# if !defined (ACE_USES_WINCE_SEMA_SIMULATION)
-typedef HANDLE ACE_sema_t;
-# else
-
-class ACE_Export ACE_sema_t
-{
- // = TITLE
- // Semaphore simulation for Windows CE.
-public:
- ACE_thread_mutex_t lock_;
- // Serializes access to <count_>.
-
- ACE_event_t count_nonzero_;
- // This event is signaled whenever the count becomes non-zero.
-
- u_int count_;
- // Current count of the semaphore.
-};
-
-# endif /* ACE_USES_WINCE_SEMA_SIMULATION */
-
-// These need to be different values, neither of which can be 0...
-# define USYNC_THREAD 1
-# define USYNC_PROCESS 2
-
-# define THR_CANCEL_DISABLE 0
-# define THR_CANCEL_ENABLE 0
-# define THR_CANCEL_DEFERRED 0
-# define THR_CANCEL_ASYNCHRONOUS 0
-# define THR_DETACHED 0x02000000 /* ignore in most places */
-# define THR_BOUND 0 /* ignore in most places */
-# define THR_NEW_LWP 0 /* ignore in most places */
-# define THR_DAEMON 0 /* ignore in most places */
-# define THR_JOINABLE 0 /* ignore in most places */
-# define THR_SUSPENDED CREATE_SUSPENDED
-# define THR_USE_AFX 0x01000000
-# define THR_SCHED_FIFO 0
-# define THR_SCHED_RR 0
-# define THR_SCHED_DEFAULT 0
-# endif /* ACE_HAS_PTHREADS / STHREADS / PSOS / VXWORKS / WTHREADS */
-
-# if defined (ACE_LACKS_COND_T)
-class ACE_Export ACE_cond_t
-{
- // = TITLE
- // This structure is used to implement condition variables on
- // platforms that lack it natively, such as VxWorks, pSoS, and
- // Win32.
- //
- // = DESCRIPTION
- // At the current time, this stuff only works for threads
- // within the same process.
-public:
- friend class ACE_OS;
-
- long waiters (void) const;
- // Returns the number of waiters.
-
-protected:
- long waiters_;
- // Number of waiting threads.
-
- ACE_thread_mutex_t waiters_lock_;
- // Serialize access to the waiters count.
-
- ACE_sema_t sema_;
- // Queue up threads waiting for the condition to become signaled.
-
-# if defined (VXWORKS) || defined (ACE_PSOS)
- ACE_sema_t waiters_done_;
- // A semaphore used by the broadcast/signal thread to wait for all
- // the waiting thread(s) to wake up and be released from the
- // semaphore.
-# elif defined (ACE_WIN32)
- HANDLE waiters_done_;
- // An auto reset event used by the broadcast/signal thread to wait
- // for the waiting thread(s) to wake up and get a chance at the
- // semaphore.
-# else
-# error "Please implement this feature or check your config.h file!"
-# endif /* VXWORKS || ACE_PSOS */
-
- size_t was_broadcast_;
- // Keeps track of whether we were broadcasting or just signaling.
-};
-
-struct ACE_Export ACE_condattr_t
-{
- int type;
-};
-struct ACE_Export ACE_mutexattr_t
-{
- int type;
-};
-# endif /* ACE_LACKS_COND_T */
-
-# if defined (ACE_LACKS_RWLOCK_T) && !defined (ACE_HAS_PTHREADS_UNIX98_EXT)
-struct ACE_Export ACE_rwlock_t
-{
- // = TITLE
- // This is used to implement readers/writer locks on NT,
- // VxWorks, and POSIX pthreads.
- //
- // = DESCRIPTION
- // At the current time, this stuff only works for threads
- // within the same process.
-protected:
- friend class ACE_OS;
-
- ACE_mutex_t lock_;
- // Serialize access to internal state.
-
- ACE_cond_t waiting_readers_;
- // Reader threads waiting to acquire the lock.
-
- int num_waiting_readers_;
- // Number of waiting readers.
-
- ACE_cond_t waiting_writers_;
- // Writer threads waiting to acquire the lock.
-
- int num_waiting_writers_;
- // Number of waiting writers.
-
- int ref_count_;
- // Value is -1 if writer has the lock, else this keeps track of the
- // number of readers holding the lock.
-
- int important_writer_;
- // indicate that a reader is trying to upgrade
-
- ACE_cond_t waiting_important_writer_;
- // condition for the upgrading reader
-};
-# elif defined (ACE_HAS_PTHREADS_UNIX98_EXT)
-typedef pthread_rwlock_t ACE_rwlock_t;
-# elif defined (ACE_HAS_STHREADS)
-# include /**/ <synch.h>
-typedef rwlock_t ACE_rwlock_t;
-# endif /* ACE_LACKS_RWLOCK_T */
-
-// Define some default thread priorities on all threaded platforms, if
-// not defined above or in the individual platform config file.
-// ACE_THR_PRI_FIFO_DEF should be used by applications for default
-// real-time thread priority. ACE_THR_PRI_OTHER_DEF should be used
-// for non-real-time priority.
-# if !defined(ACE_THR_PRI_FIFO_DEF)
-# if defined (ACE_WTHREADS)
- // It would be more in spirit to use THREAD_PRIORITY_NORMAL. But,
- // using THREAD_PRIORITY_ABOVE_NORMAL should give preference to the
- // threads in this process, even if the process is not in the
- // REALTIME_PRIORITY_CLASS.
-# define ACE_THR_PRI_FIFO_DEF THREAD_PRIORITY_ABOVE_NORMAL
-# else /* ! ACE_WTHREADS */
-# define ACE_THR_PRI_FIFO_DEF 0
-# endif /* ! ACE_WTHREADS */
-# endif /* ! ACE_THR_PRI_FIFO_DEF */
-
-# if !defined(ACE_THR_PRI_OTHER_DEF)
-# if defined (ACE_WTHREADS)
- // It would be more in spirit to use THREAD_PRIORITY_NORMAL. But,
- // using THREAD_PRIORITY_ABOVE_NORMAL should give preference to the
- // threads in this process, even if the process is not in the
- // REALTIME_PRIORITY_CLASS.
-# define ACE_THR_PRI_OTHER_DEF THREAD_PRIORITY_NORMAL
-# else /* ! ACE_WTHREADS */
-# define ACE_THR_PRI_OTHER_DEF 0
-# endif /* ! ACE_WTHREADS */
-# endif /* ! ACE_THR_PRI_OTHER_DEF */
-
-#if defined (ACE_HAS_RECURSIVE_MUTEXES)
-typedef ACE_thread_mutex_t ACE_recursive_thread_mutex_t;
-#else
-class ACE_recursive_thread_mutex_t
-{
- // = TITLE
- // Implement a thin C++ wrapper that allows nested acquisition
- // and release of a mutex that occurs in the same thread.
- //
- // = DESCRIPTION
- // This implementation is based on an algorithm sketched by Dave
- // Butenhof <butenhof@zko.dec.com>. Naturally, I take the
- // credit for any mistakes ;-)
-public:
- ACE_thread_mutex_t nesting_mutex_;
- // Guards the state of the nesting level and thread id.
-
- ACE_cond_t lock_available_;
- // This condition variable suspends other waiting threads until the
- // mutex is available.
-
- int nesting_level_;
- // Current nesting level of the recursion.
-
- ACE_thread_t owner_id_;
- // Current owner of the lock.
-};
-#endif /* ACE_WIN32 */
-
-# else /* !ACE_HAS_THREADS, i.e., the OS/platform doesn't support threading. */
-
-// Give these things some reasonable value...
-# define ACE_SCOPE_PROCESS 0
-# define ACE_SCOPE_LWP 1
-# define ACE_SCOPE_THREAD 2
-# define ACE_SCHED_OTHER 0
-# define ACE_SCHED_FIFO 1
-# define ACE_SCHED_RR 2
-# if !defined (THR_CANCEL_DISABLE)
-# define THR_CANCEL_DISABLE 0
-# endif /* ! THR_CANCEL_DISABLE */
-# if !defined (THR_CANCEL_ENABLE)
-# define THR_CANCEL_ENABLE 0
-# endif /* ! THR_CANCEL_ENABLE */
-# if !defined (THR_CANCEL_DEFERRED)
-# define THR_CANCEL_DEFERRED 0
-# endif /* ! THR_CANCEL_DEFERRED */
-# if !defined (THR_CANCEL_ASYNCHRONOUS)
-# define THR_CANCEL_ASYNCHRONOUS 0
-# endif /* ! THR_CANCEL_ASYNCHRONOUS */
-# if !defined (THR_JOINABLE)
-# define THR_JOINABLE 0 /* ignore in most places */
-# endif /* ! THR_JOINABLE */
-# if !defined (THR_DETACHED)
-# define THR_DETACHED 0 /* ignore in most places */
-# endif /* ! THR_DETACHED */
-# if !defined (THR_DAEMON)
-# define THR_DAEMON 0 /* ignore in most places */
-# endif /* ! THR_DAEMON */
-# if !defined (THR_BOUND)
-# define THR_BOUND 0 /* ignore in most places */
-# endif /* ! THR_BOUND */
-# if !defined (THR_NEW_LWP)
-# define THR_NEW_LWP 0 /* ignore in most places */
-# endif /* ! THR_NEW_LWP */
-# if !defined (THR_SUSPENDED)
-# define THR_SUSPENDED 0 /* ignore in most places */
-# endif /* ! THR_SUSPENDED */
-# if !defined (THR_SCHED_FIFO)
-# define THR_SCHED_FIFO 0
-# endif /* ! THR_SCHED_FIFO */
-# if !defined (THR_SCHED_RR)
-# define THR_SCHED_RR 0
-# endif /* ! THR_SCHED_RR */
-# if !defined (THR_SCHED_DEFAULT)
-# define THR_SCHED_DEFAULT 0
-# endif /* ! THR_SCHED_DEFAULT */
-# if !defined (USYNC_THREAD)
-# define USYNC_THREAD 0
-# endif /* ! USYNC_THREAD */
-# if !defined (USYNC_PROCESS)
-# define USYNC_PROCESS 0
-# endif /* ! USYNC_PROCESS */
-// These are dummies needed for class OS.h
-typedef int ACE_cond_t;
-struct ACE_Export ACE_condattr_t
-{
- int type;
-};
-struct ACE_Export ACE_mutexattr_t
-{
- int type;
-};
-typedef int ACE_mutex_t;
-typedef int ACE_thread_mutex_t;
-typedef int ACE_recursive_thread_mutex_t;
-# if !defined (ACE_HAS_POSIX_SEM) && !defined (ACE_PSOS)
-typedef int ACE_sema_t;
-# endif /* !ACE_HAS_POSIX_SEM && !ACE_PSOS */
-typedef int ACE_rwlock_t;
-typedef int ACE_thread_t;
-typedef int ACE_hthread_t;
-typedef u_int ACE_thread_key_t;
-
-// Ensure that ACE_THR_PRI_FIFO_DEF and ACE_THR_PRI_OTHER_DEF are
-// defined on non-threaded platforms, to support application source
-// code compatibility. ACE_THR_PRI_FIFO_DEF should be used by
-// applications for default real-time thread priority.
-// ACE_THR_PRI_OTHER_DEF should be used for non-real-time priority.
-# if !defined(ACE_THR_PRI_FIFO_DEF)
-# define ACE_THR_PRI_FIFO_DEF 0
-# endif /* ! ACE_THR_PRI_FIFO_DEF */
-# if !defined(ACE_THR_PRI_OTHER_DEF)
-# define ACE_THR_PRI_OTHER_DEF 0
-# endif /* ! ACE_THR_PRI_OTHER_DEF */
-
-# endif /* ACE_HAS_THREADS */
-
-# if defined (ACE_PSOS)
-
-// Wrapper for NT events on pSOS.
-class ACE_Export ACE_event_t
-{
- friend class ACE_OS;
-
-protected:
-
- ACE_mutex_t lock_;
- // Protect critical section.
-
- ACE_cond_t condition_;
- // Keeps track of waiters.
-
- int manual_reset_;
- // Specifies if this is an auto- or manual-reset event.
-
- int is_signaled_;
- // "True" if signaled.
-
- u_long waiting_threads_;
- // Number of waiting threads.
-};
-
-# endif /* ACE_PSOS */
-
-// Standard C Library includes
-// NOTE: stdarg.h must be #included before stdio.h on LynxOS.
-# include /**/ <stdarg.h>
-# if !defined (ACE_HAS_WINCE)
-# include /**/ <assert.h>
-# include /**/ <stdio.h>
-// this is a nasty hack to get around problems with the
-// pSOS definition of BUFSIZ as the config table entry
-// (which is valued using the LC_BUFSIZ value anyway)
-# if defined (ACE_PSOS)
-# if defined (BUFSIZ)
-# undef BUFSIZ
-# endif /* defined (BUFSIZ) */
-# define BUFSIZ LC_BUFSIZ
-# endif /* defined (ACE_PSOS) */
-
-#if defined (ACE_PSOS_DIAB_MIPS)
-#undef size_t
-typedef unsigned int size_t;
-#endif
-
-# if !defined (ACE_LACKS_NEW_H)
-# include /**/ <new.h>
-# endif /* ! ACE_LACKS_NEW_H */
-
-# if !defined (ACE_PSOS_DIAB_MIPS) && !defined (VXWORKS)
-# define ACE_DONT_INCLUDE_ACE_SIGNAL_H
-# include /**/ <signal.h>
-# undef ACE_DONT_INCLUDE_ACE_SIGNAL_H
-# endif /* ! ACE_PSOS_DIAB_MIPS && ! VXWORKS */
-
-# if ! defined (ACE_PSOS_DIAB_MIPS)
-# include /**/ <fcntl.h>
-# endif /* ! ACE_PSOS_DIAB_MIPS */
-# endif /* ACE_HAS_WINCE */
-
-# include /**/ <limits.h>
-# include /**/ <ctype.h>
-# if ! defined (ACE_PSOS_DIAB_MIPS)
-# include /**/ <string.h>
-# include /**/ <stdlib.h>
-# endif /* ! ACE_PSOS_DIAB_MIPS */
-# include /**/ <float.h>
-
-// This is defined by XOPEN to be a minimum of 16. POSIX.1g
-// also defines this value. platform-specific config.h can
-// override this if need be.
-# if !defined (IOV_MAX)
-# define IOV_MAX 16
-# endif /* IOV_MAX */
-
-# if defined (ACE_PSOS_SNARFS_HEADER_INFO)
- // Header information snarfed from compiler provided header files
- // that are not included because there is already an identically
- // named file provided with pSOS, which does not have this info
- // from compiler supplied stdio.h
- extern FILE *fdopen(int, const char *);
- extern int getopt(int, char *const *, const char *);
- extern char *tempnam(const char *, const char *);
- extern "C" int fileno(FILE *);
-
-// #define fileno(stream) ((stream)->_file)
-
- // from compiler supplied string.h
- extern char *strdup (const char *);
-
- // from compiler supplied stat.h
- extern mode_t umask (mode_t);
- extern int mkfifo (const char *, mode_t);
- extern int mkdir (const char *, mode_t);
-
- // from compiler supplied stdlib.h
- extern int putenv (char *);
-
- int isatty (int h);
-
-# endif /* ACE_PSOS_SNARFS_HEADER_INFO */
-
-# if defined (ACE_NEEDS_SCHED_H)
-# include /**/ <sched.h>
-# endif /* ACE_NEEDS_SCHED_H */
-
-# if defined (ACE_HAS_WINCE)
-# define islower iswlower
-# define isdigit iswdigit
-# endif /* ACE_HAS_WINCE */
-
-#if !defined (ACE_OSTREAM_TYPE)
-# if defined (ACE_LACKS_IOSTREAM_TOTALLY)
-# define ACE_OSTREAM_TYPE FILE
-# else /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-# define ACE_OSTREAM_TYPE ostream
-# endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-#endif /* ! ACE_OSTREAM_TYPE */
-
-#if !defined (ACE_DEFAULT_LOG_STREAM)
-# if defined (ACE_LACKS_IOSTREAM_TOTALLY)
-# define ACE_DEFAULT_LOG_STREAM 0
-# else /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-# define ACE_DEFAULT_LOG_STREAM (&cerr)
-# endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-#endif /* ! ACE_DEFAULT_LOG_STREAM */
-
-// If the user wants minimum IOStream inclusion, we will just include
-// the forward declarations
-# if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION)
-// Forward declaration for streams
-# include "ace/iosfwd.h"
-# else /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */
-// Else they will get all the stream header files
-# include "ace/streams.h"
-# endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */
-
-# if !defined (ACE_HAS_WINCE)
-# if ! defined (ACE_PSOS_DIAB_MIPS)
-# include /**/ <fcntl.h>
-# endif /* ! ACE_PSOS_DIAB_MIPS */
-# endif /* ACE_HAS_WINCE */
-
-// This must come after signal.h is #included.
-# if defined (SCO)
-# define SIGIO SIGPOLL
-# include /**/ <sys/regset.h>
-# endif /* SCO */
-
-# if defined ACE_HAS_BYTESEX_H
-# include /**/ <bytesex.h>
-# endif /* ACE_HAS_BYTESEX_H */
-# include "ace/Basic_Types.h"
-
-/* This should work for linux, solaris 5.6 and above, IRIX, OSF */
-# if defined (ACE_HAS_LLSEEK) || defined (ACE_HAS_LSEEK64)
-# if ACE_SIZEOF_LONG == 8
- typedef off_t ACE_LOFF_T;
-# elif defined (__sgi) || defined (AIX) || defined (HPUX) \
- || defined (__QNX__)
- typedef off64_t ACE_LOFF_T;
-# elif defined (__sun)
- typedef offset_t ACE_LOFF_T;
-# else
- typedef loff_t ACE_LOFF_T;
-# endif
-# endif /* ACE_HAS_LLSEEK || ACE_HAS_LSEEK64 */
-
-// Define some helpful constants.
-// Not type-safe, and signed. For backward compatibility.
-#define ACE_ONE_SECOND_IN_MSECS 1000L
-#define ACE_ONE_SECOND_IN_USECS 1000000L
-#define ACE_ONE_SECOND_IN_NSECS 1000000000L
-
-// Type-safe, and unsigned.
-static const ACE_UINT32 ACE_U_ONE_SECOND_IN_MSECS = 1000U;
-static const ACE_UINT32 ACE_U_ONE_SECOND_IN_USECS = 1000000U;
-static const ACE_UINT32 ACE_U_ONE_SECOND_IN_NSECS = 1000000000U;
-
-# if defined (ACE_HAS_SIG_MACROS)
-# undef sigemptyset
-# undef sigfillset
-# undef sigaddset
-# undef sigdelset
-# undef sigismember
-# endif /* ACE_HAS_SIG_MACROS */
-
-// This must come after signal.h is #included. It's to counteract
-// the sigemptyset and sigfillset #defines, which only happen
-// when __OPTIMIZE__ is #defined (really!) on Linux.
-# if defined (linux) && defined (__OPTIMIZE__)
-# undef sigemptyset
-# undef sigfillset
-# endif /* linux && __OPTIMIZE__ */
-
-// Prototypes should come after ace/Basic_Types.h since some types may
-// be used in the prototypes.
-
-#if defined (ACE_LACKS_GETPGID_PROTOTYPE) && \
- !defined (_XOPEN_SOURCE) && !defined (_XOPEN_SOURCE_EXTENDED)
-extern "C" pid_t getpgid (pid_t pid);
-#endif /* ACE_LACKS_GETPGID_PROTOTYPE &&
- !_XOPEN_SOURCE && !_XOPEN_SOURCE_EXTENDED */
-
-#if defined (ACE_LACKS_STRPTIME_PROTOTYPE) && !defined (_XOPEN_SOURCE)
-extern "C" char *strptime (const char *s, const char *fmt, struct tm *tp);
-#endif /* ACE_LACKS_STRPTIME_PROTOTYPE */
-
-#if defined (ACE_LACKS_STRTOK_R_PROTOTYPE) && !defined (_POSIX_SOURCE)
-extern "C" char *strtok_r (char *s, const char *delim, char **save_ptr);
-#endif /* ACE_LACKS_STRTOK_R_PROTOTYPE */
-
-#if !defined (_LARGEFILE64_SOURCE)
-# if defined (ACE_LACKS_LSEEK64_PROTOTYPE) && \
- defined (ACE_LACKS_LLSEEK_PROTOTYPE)
-# error Define either ACE_LACKS_LSEEK64_PROTOTYPE or ACE_LACKS_LLSEEK_PROTOTYPE, not both!
-# elif defined (ACE_LACKS_LSEEK64_PROTOTYPE)
-extern "C" ACE_LOFF_T lseek64 (int fd, ACE_LOFF_T offset, int whence);
-# elif defined (ACE_LACKS_LLSEEK_PROTOTYPE)
-extern "C" ACE_LOFF_T llseek (int fd, ACE_LOFF_T offset, int whence);
-# endif
-#endif /* _LARGEFILE64_SOURCE */
-
-#if defined (ACE_LACKS_PREAD_PROTOTYPE) && (_XOPEN_SOURCE - 0) != 500
-// _XOPEN_SOURCE == 500 Single Unix conformance
-extern "C" ssize_t pread (int fd,
- void *buf,
- size_t nbytes,
- off_t offset);
-
-extern "C" ssize_t pwrite (int fd,
- const void *buf,
- size_t n,
- off_t offset);
-#endif /* ACE_LACKS_PREAD_PROTOTYPE && (_XOPEN_SOURCE - 0) != 500 */
-
-# if defined (ACE_LACKS_UALARM_PROTOTYPE)
-extern "C" u_int ualarm (u_int usecs, u_int interval);
-# endif /* ACE_LACKS_UALARM_PROTOTYPE */
-
-
-# if defined (ACE_HAS_BROKEN_SENDMSG)
-typedef struct msghdr ACE_SENDMSG_TYPE;
-# else
-typedef const struct msghdr ACE_SENDMSG_TYPE;
-# endif /* ACE_HAS_BROKEN_SENDMSG */
-
-# if defined (ACE_HAS_BROKEN_RANDR)
-// The SunOS 5.4.X version of rand_r is inconsistent with the header
-// files...
-typedef u_int ACE_RANDR_TYPE;
-extern "C" int rand_r (ACE_RANDR_TYPE seed);
-# else
-# if defined (HPUX_10)
-// HP-UX 10.x's stdlib.h (long *) doesn't match that man page (u_int *)
-typedef long ACE_RANDR_TYPE;
-# else
-typedef u_int ACE_RANDR_TYPE;
-# endif /* HPUX_10 */
-# endif /* ACE_HAS_BROKEN_RANDR */
-
-# if defined (ACE_HAS_UTIME)
-# include /**/ <utime.h>
-# endif /* ACE_HAS_UTIME */
-
-# if !defined (ACE_HAS_MSG) && !defined (SCO)
-struct msghdr {};
-# endif /* ACE_HAS_MSG */
-
-# if defined (ACE_HAS_MSG) && defined (ACE_LACKS_MSG_ACCRIGHTS)
-# if !defined (msg_accrights)
-# undef msg_control
-# define msg_accrights msg_control
-# endif /* ! msg_accrights */
-
-# if !defined (msg_accrightslen)
-# undef msg_controllen
-# define msg_accrightslen msg_controllen
-# endif /* ! msg_accrightslen */
-# endif /* ACE_HAS_MSG && ACE_LACKS_MSG_ACCRIGHTS */
-
-# if !defined (ACE_HAS_SIG_ATOMIC_T)
-typedef int sig_atomic_t;
-# endif /* !ACE_HAS_SIG_ATOMIC_T */
-
-# if !defined (ACE_HAS_SSIZE_T)
-typedef int ssize_t;
-# endif /* ACE_HAS_SSIZE_T */
-
-# if defined (ACE_HAS_OLD_MALLOC)
-typedef char *ACE_MALLOC_T;
-# else
-typedef void *ACE_MALLOC_T;
-# endif /* ACE_HAS_OLD_MALLOC */
-
-# if defined (ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES)
-// Prototypes for both signal() and struct sigaction are consistent..
-# if defined (ACE_HAS_SIG_C_FUNC)
-extern "C" {
-# endif /* ACE_HAS_SIG_C_FUNC */
-# if !defined (ACE_PSOS)
-typedef void (*ACE_SignalHandler)(int);
-typedef void (*ACE_SignalHandlerV)(int);
-# endif /* !defined (ACE_PSOS) */
-# if defined (ACE_HAS_SIG_C_FUNC)
-}
-# endif /* ACE_HAS_SIG_C_FUNC */
-# elif defined (ACE_HAS_LYNXOS_SIGNALS)
-typedef void (*ACE_SignalHandler)(...);
-typedef void (*ACE_SignalHandlerV)(...);
-# elif defined (ACE_HAS_TANDEM_SIGNALS)
-typedef void (*ACE_SignalHandler)(...);
-typedef void (*ACE_SignalHandlerV)(...);
-# elif defined (ACE_HAS_IRIX_53_SIGNALS)
-typedef void (*ACE_SignalHandler)(...);
-typedef void (*ACE_SignalHandlerV)(...);
-# elif defined (ACE_HAS_SPARCWORKS_401_SIGNALS)
-typedef void (*ACE_SignalHandler)(int, ...);
-typedef void (*ACE_SignalHandlerV)(int,...);
-# elif defined (ACE_HAS_SUNOS4_SIGNAL_T)
-typedef void (*ACE_SignalHandler)(...);
-typedef void (*ACE_SignalHandlerV)(...);
-# elif defined (ACE_HAS_SVR4_SIGNAL_T)
-// SVR4 Signals are inconsistent (e.g., see struct sigaction)..
-typedef void (*ACE_SignalHandler)(int);
-# if !defined (m88k) /* with SVR4_SIGNAL_T */
-typedef void (*ACE_SignalHandlerV)(void);
-# else
-typedef void (*ACE_SignalHandlerV)(int);
-# endif // m88k /* with SVR4_SIGNAL_T */
-# elif defined (ACE_WIN32)
-typedef void (__cdecl *ACE_SignalHandler)(int);
-typedef void (__cdecl *ACE_SignalHandlerV)(int);
-# elif defined (ACE_HAS_UNIXWARE_SVR4_SIGNAL_T)
-typedef void (*ACE_SignalHandler)(int);
-typedef void (*ACE_SignalHandlerV)(...);
-# else /* This is necessary for some older broken version of cfront */
-# if defined (SIG_PF)
-# define ACE_SignalHandler SIG_PF
-# else
-typedef void (*ACE_SignalHandler)(int);
-# endif /* SIG_PF */
-typedef void (*ACE_SignalHandlerV)(...);
-# endif /* ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES */
-
-# if defined (BUFSIZ)
-# define ACE_STREAMBUF_SIZE BUFSIZ
-# else
-# define ACE_STREAMBUF_SIZE 1024
-# endif /* BUFSIZ */
-
-# if defined (ACE_WIN32)
-// Turn off warnings for /W4
-// To resume any of these warning: #pragma warning(default: 4xxx)
-// which should be placed after these defines
-# ifndef ALL_WARNINGS
-// #pragma warning(disable: 4101) // unreferenced local variable
-# pragma warning(disable: 4127) /* constant expression for TRACE/ASSERT */
-# pragma warning(disable: 4134) /* message map member fxn casts */
-# pragma warning(disable: 4511) /* private copy constructors are good to have */
-# pragma warning(disable: 4512) /* private operator= are good to have */
-# pragma warning(disable: 4514) /* unreferenced inlines are common */
-# pragma warning(disable: 4710) /* private constructors are disallowed */
-# pragma warning(disable: 4705) /* statement has no effect in optimized code */
-// #pragma warning(disable: 4701) // local variable *may* be used without init
-// #pragma warning(disable: 4702) // unreachable code caused by optimizations
-# pragma warning(disable: 4791) /* loss of debugging info in retail version */
-// #pragma warning(disable: 4204) // non-constant aggregate initializer
-# pragma warning(disable: 4275) /* deriving exported class from non-exported */
-# pragma warning(disable: 4251) /* using non-exported as public in exported */
-# pragma warning(disable: 4786) /* identifier was truncated to '255' characters in the browser information */
-# pragma warning(disable: 4097) /* typedef-name used as synonym for class-name */
-# endif /*!ALL_WARNINGS */
-
-// STRICT type checking in WINDOWS.H enhances type safety for Windows
-// programs by using distinct types to represent all the different
-// HANDLES in Windows. So for example, STRICT prevents you from
-// mistakenly passing an HPEN to a routine expecting an HBITMAP.
-// Note that we only use this if we
-# if defined (ACE_HAS_STRICT) && (ACE_HAS_STRICT != 0)
-# if !defined (STRICT) /* may already be defined */
-# define STRICT
-# endif /* !STRICT */
-# endif /* ACE_HAS_STRICT */
-
-# if !defined (ACE_HAS_WINCE)
-# include /**/ <sys/timeb.h>
-# endif /* ACE_HAS_WINCE */
-
-// The following defines are used by the ACE Name Server...
-# if !defined (ACE_DEFAULT_LOCALNAME)
-# define ACE_DEFAULT_LOCALNAME ACE_TEXT ("localnames")
-# endif /* ACE_DEFAULT_LOCALNAME */
-
-# if !defined (ACE_DEFAULT_GLOBALNAME)
-# define ACE_DEFAULT_GLOBALNAME ACE_TEXT ("globalnames")
-# endif /* ACE_DEFAULT_GLOBALNAME */
-
-// Need to work around odd glitches with NT.
-# if !defined (ACE_MAX_DEFAULT_PORT)
-# define ACE_MAX_DEFAULT_PORT 0
-# endif /* ACE_MAX_DEFAULT_PORT */
-
-// We're on WinNT or Win95
-# define ACE_PLATFORM ACE_TEXT ("Win32")
-# define ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (".exe")
-
-// Used for dynamic linking
-# if !defined (ACE_DEFAULT_SVC_CONF)
-# define ACE_DEFAULT_SVC_CONF ACE_TEXT (".\\svc.conf")
-# endif /* ACE_DEFAULT_SVC_CONF */
-
-// The following are #defines and #includes that are specific to
-// WIN32.
-# define ACE_STDIN GetStdHandle (STD_INPUT_HANDLE)
-# define ACE_STDOUT GetStdHandle (STD_OUTPUT_HANDLE)
-# define ACE_STDERR GetStdHandle (STD_ERROR_HANDLE)
-
-// Default semaphore key and mutex name
-# if !defined (ACE_DEFAULT_SEM_KEY)
-# define ACE_DEFAULT_SEM_KEY "ACE_SEM_KEY"
-# endif /* ACE_DEFAULT_SEM_KEY */
-
-# define ACE_INVALID_SEM_KEY 0
-
-# if defined (ACE_HAS_WINCE)
-// @@ WinCE probably doesn't have structural exception support
-// But I need to double check to find this out
-# define ACE_SEH_TRY if (1)
-# define ACE_SEH_EXCEPT(X) while (0)
-# define ACE_SEH_FINALLY if (1)
-# else
-# if !defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
-# define ACE_SEH_TRY if (1)
-# define ACE_SEH_EXCEPT(X) while (0)
-# define ACE_SEH_FINALLY if (1)
-# elif defined(__BORLANDC__)
-# if (__BORLANDC__ >= 0x0530) /* Borland C++ Builder 3.0 */
-# define ACE_SEH_TRY try
-# define ACE_SEH_EXCEPT(X) __except(X)
-# define ACE_SEH_FINALLY __finally
-# else
-# define ACE_SEH_TRY if (1)
-# define ACE_SEH_EXCEPT(X) while (0)
-# define ACE_SEH_FINALLY if (1)
-# endif
-# elif defined (__IBMCPP__) && (__IBMCPP__ >= 400)
-# define ACE_SEH_TRY if (1)
-# define ACE_SEH_EXCEPT(X) while (0)
-# define ACE_SEH_FINALLY if (1)
-# else
-# define ACE_SEH_TRY __try
-# define ACE_SEH_EXCEPT(X) __except(X)
-# define ACE_SEH_FINALLY __finally
-# endif /* __BORLANDC__ */
-# endif /* ACE_HAS_WINCE */
-
-# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
-typedef int (*ACE_SEH_EXCEPT_HANDLER)(void *);
-// Prototype of win32 structured exception handler functions.
-// They are used to get the exception handling expression or
-// as exception handlers.
-# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
-// The "null" device on Win32.
-# define ACE_DEV_NULL "nul"
-
-// Define the pathname separator characters for Win32 (ugh).
-# define ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("\\")
-# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_TEXT ('\\')
-# define ACE_LD_SEARCH_PATH ACE_TEXT ("PATH")
-# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ACE_TEXT (";")
-# define ACE_DLL_SUFFIX ACE_TEXT (".dll")
-# define ACE_DLL_PREFIX ACE_TEXT ("")
-
-// This will help until we figure out everything:
-# define NFDBITS 32 /* only used in unused functions... */
-// These two may be used for internal flags soon:
-# define MAP_PRIVATE 1
-# define MAP_SHARED 2
-# define MAP_FIXED 4
-
-# define RUSAGE_SELF 1
-
-struct shmaddr { };
-struct msqid_ds {};
-
-// Fake the UNIX rusage structure. Perhaps we can add more to this
-// later on?
-struct rusage
-{
- FILETIME ru_utime;
- FILETIME ru_stime;
-};
-
-// MMAP flags
-# define PROT_READ PAGE_READONLY
-# define PROT_WRITE PAGE_READWRITE
-# define PROT_RDWR PAGE_READWRITE
-/* If we can find suitable use for these flags, here they are:
-PAGE_WRITECOPY
-PAGE_EXECUTE
-PAGE_EXECUTE_READ
-PAGE_EXECUTE_READWRITE
-PAGE_EXECUTE_WRITECOPY
-PAGE_GUARD
-PAGE_NOACCESS
-PAGE_NOCACHE */
-
-# if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-# include "ace/ws2tcpip.h"
-# endif /* ACE_HAS_WINSOCK2 */
-
-// error code mapping
-# define ETIME ERROR_SEM_TIMEOUT
-# define EWOULDBLOCK WSAEWOULDBLOCK
-# define EINPROGRESS WSAEINPROGRESS
-# define EALREADY WSAEALREADY
-# define ENOTSOCK WSAENOTSOCK
-# define EDESTADDRREQ WSAEDESTADDRREQ
-# define EMSGSIZE WSAEMSGSIZE
-# define EPROTOTYPE WSAEPROTOTYPE
-# define ENOPROTOOPT WSAENOPROTOOPT
-# define EPROTONOSUPPORT WSAEPROTONOSUPPORT
-# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
-# define EOPNOTSUPP WSAEOPNOTSUPP
-# define EPFNOSUPPORT WSAEPFNOSUPPORT
-# define EAFNOSUPPORT WSAEAFNOSUPPORT
-# define EADDRINUSE WSAEADDRINUSE
-# define EADDRNOTAVAIL WSAEADDRNOTAVAIL
-# define ENETDOWN WSAENETDOWN
-# define ENETUNREACH WSAENETUNREACH
-# define ENETRESET WSAENETRESET
-# define ECONNABORTED WSAECONNABORTED
-# define ECONNRESET WSAECONNRESET
-# define ENOBUFS WSAENOBUFS
-# define EISCONN WSAEISCONN
-# define ENOTCONN WSAENOTCONN
-# define ESHUTDOWN WSAESHUTDOWN
-# define ETOOMANYREFS WSAETOOMANYREFS
-# define ETIMEDOUT WSAETIMEDOUT
-# define ECONNREFUSED WSAECONNREFUSED
-# define ELOOP WSAELOOP
-# define EHOSTDOWN WSAEHOSTDOWN
-# define EHOSTUNREACH WSAEHOSTUNREACH
-# define EPROCLIM WSAEPROCLIM
-# define EUSERS WSAEUSERS
-# define EDQUOT WSAEDQUOT
-# define ESTALE WSAESTALE
-# define EREMOTE WSAEREMOTE
-// Grrr! These two are already defined by the horrible 'standard'
-// library.
-// #define ENAMETOOLONG WSAENAMETOOLONG
-// #define ENOTEMPTY WSAENOTEMPTY
-
-# if !defined (ACE_HAS_WINCE)
-# include /**/ <time.h>
-# include /**/ <direct.h>
-# include /**/ <process.h>
-# include /**/ <io.h>
-# endif /* ACE_HAS_WINCE */
-
-# if defined (__BORLANDC__)
-# include /**/ <fcntl.h>
-# define _chdir chdir
-# define _ftime ftime
-# undef _access
-# define _access access
-# if (__BORLANDC__ <= 0x540)
-# define _getcwd getcwd
-# define _stat stat
-# endif
-# define _isatty isatty
-# define _umask umask
-# define _fstat fstat
-# define _stricmp stricmp
-# define _strnicmp strnicmp
-
-# define _timeb timeb
-
-# define _O_CREAT O_CREAT
-# define _O_EXCL O_EXCL
-# define _O_TRUNC O_TRUNC
- // 0x0800 is used for O_APPEND. 0x08 looks free.
-# define _O_TEMPORARY 0x08 // see fcntl.h
-# define _O_RDWR O_RDWR
-# define _O_WRONLY O_WRONLY
-# define _O_RDONLY O_RDONLY
-# define _O_APPEND O_APPEND
-# define _O_BINARY O_BINARY
-# define _O_TEXT O_TEXT
-# endif /* __BORLANDC__ */
-
-typedef OVERLAPPED ACE_OVERLAPPED;
-typedef DWORD ACE_thread_t;
-typedef HANDLE ACE_hthread_t;
-typedef long pid_t;
-#define ACE_INVALID_PID ((pid_t) -1)
-# if defined (ACE_HAS_TSS_EMULATION)
- typedef DWORD ACE_OS_thread_key_t;
- typedef u_int ACE_thread_key_t;
-# else /* ! ACE_HAS_TSS_EMULATION */
- typedef DWORD ACE_thread_key_t;
-# endif /* ! ACE_HAS_TSS_EMULATION */
-
-// 64-bit quad-word definitions.
-typedef unsigned __int64 ACE_QWORD;
-typedef unsigned __int64 ACE_hrtime_t;
-inline ACE_QWORD ACE_MAKE_QWORD (DWORD lo, DWORD hi) { return ACE_QWORD (lo) | (ACE_QWORD (hi) << 32); }
-inline DWORD ACE_LOW_DWORD (ACE_QWORD q) { return (DWORD) q; }
-inline DWORD ACE_HIGH_DWORD (ACE_QWORD q) { return (DWORD) (q >> 32); }
-
-// Win32 dummies to help compilation.
-
-# if !defined (__BORLANDC__)
-typedef DWORD nlink_t;
-typedef int mode_t;
-typedef int uid_t;
-typedef int gid_t;
-# endif /* __BORLANDC__ */
-typedef char *caddr_t;
-struct rlimit { };
-struct t_call { };
-struct t_bind { };
-struct t_info { };
-struct t_optmgmt { };
-struct t_discon { };
-struct t_unitdata { };
-struct t_uderr { };
-struct netbuf { };
-
-// This is for file descriptors.
-typedef HANDLE ACE_HANDLE;
-
-// For Win32 compatibility.
-typedef SOCKET ACE_SOCKET;
-
-typedef DWORD ACE_exitcode;
-# define ACE_INVALID_HANDLE INVALID_HANDLE_VALUE
-# define ACE_SYSCALL_FAILED 0xFFFFFFFF
-
-// Needed to map calls to NT transparently.
-# define MS_ASYNC 0
-# define MS_INVALIDATE 0
-
-// Reliance on CRT - I don't really like this.
-
-# define O_NDELAY 1
-# if !defined (MAXPATHLEN)
-# define MAXPATHLEN _MAX_PATH
-# endif /* !MAXPATHLEN */
-# define MAXNAMLEN _MAX_FNAME
-# define EADDRINUSE WSAEADDRINUSE
-
-// The ordering of the fields in this struct is important. It has to
-// match those in WSABUF.
-struct iovec
-{
- size_t iov_len; // byte count to read/write
- char *iov_base; // data to be read/written
-
- // WSABUF is a Winsock2-only type.
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- operator WSABUF &(void) { return *((WSABUF *) this); }
-#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
-};
-
-struct msghdr
-{
- sockaddr * msg_name;
- // optional address
-
- int msg_namelen;
- // size of address
-
- iovec *msg_iov;
- /* scatter/gather array */
-
- int msg_iovlen;
- // # elements in msg_iov
-
- caddr_t msg_accrights;
- // access rights sent/received
-
- int msg_accrightslen;
-};
-
-typedef int ACE_idtype_t;
-typedef DWORD ACE_id_t;
-# define ACE_SELF (0)
-typedef int ACE_pri_t;
-
-// Dynamic loading-related types - used for dlopen and family.
-# if !defined(RTLD_LAZY)
-# define RTLD_LAZY 1
-# endif /* !RTLD_LAZY */
-typedef HINSTANCE ACE_SHLIB_HANDLE;
-# define ACE_SHLIB_INVALID_HANDLE 0
-# define ACE_DEFAULT_SHLIB_MODE 0
-
-# elif defined (ACE_PSOS)
-
-typedef ACE_UINT64 ACE_hrtime_t;
-
-# if defined (ACE_SIGINFO_IS_SIGINFO_T)
- typedef struct siginfo siginfo_t;
-# endif /* ACE_LACKS_SIGINFO_H */
-
-# else /* !defined (ACE_WIN32) && !defined (ACE_PSOS) */
-
-# if defined (m88k)
-# define RUSAGE_SELF 1
-# endif /* m88k */
-
-// Default port is MAX_SHORT.
-# define ACE_MAX_DEFAULT_PORT 65535
-
-// Default semaphore key
-# if !defined (ACE_DEFAULT_SEM_KEY)
-# define ACE_DEFAULT_SEM_KEY 1234
-# endif /* ACE_DEFAULT_SEM_KEY */
-
-# define ACE_INVALID_SEM_KEY -1
-
-// Define the pathname separator characters for UNIX.
-# define ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT ("/")
-# define ACE_DIRECTORY_SEPARATOR_CHAR ACE_TEXT ('/')
-
-// We're some kind of UNIX...
-# define ACE_PLATFORM ACE_TEXT("UNIX")
-# define ACE_PLATFORM_EXE_SUFFIX ACE_TEXT("")
-
-# if !defined (ACE_LD_SEARCH_PATH)
-# define ACE_LD_SEARCH_PATH "LD_LIBRARY_PATH"
-# endif /* ACE_LD_SEARCH_PATH */
-# if !defined (ACE_LD_SEARCH_PATH_SEPARATOR_STR)
-# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ":"
-# endif /* ACE_LD_SEARCH_PATH_SEPARATOR_STR */
-
-# if !defined (ACE_DLL_SUFFIX)
-# define ACE_DLL_SUFFIX ".so"
-# endif /* ACE_DLL_SUFFIX */
-# if !defined (ACE_DLL_PREFIX)
-# define ACE_DLL_PREFIX "lib"
-# endif /* ACE_DLL_PREFIX */
-
-// The following 2 defines are used by the ACE Name Server...
-# if !defined (ACE_DEFAULT_LOCALNAME)
-# define ACE_DEFAULT_LOCALNAME ACE_TEXT ("localnames")
-# endif /* ACE_DEFAULT_LOCALNAME */
-
-# if !defined (ACE_DEFAULT_GLOBALNAME)
-# define ACE_DEFAULT_GLOBALNAME ACE_TEXT ("globalnames")
-# endif /* ACE_DEFAULT_GLOBALNAME */
-
-// Used for dynamic linking.
-# if !defined (ACE_DEFAULT_SVC_CONF)
-# define ACE_DEFAULT_SVC_CONF ACE_TEXT ("./svc.conf")
-# endif /* ACE_DEFAULT_SVC_CONF */
-
-// The following are #defines and #includes that are specific to UNIX.
-
-# define ACE_STDIN 0
-# define ACE_STDOUT 1
-# define ACE_STDERR 2
-
-// Be consistent with Winsock naming
-typedef int ACE_exitcode;
-# define ACE_INVALID_HANDLE -1
-# define ACE_SYSCALL_FAILED -1
-
-# define ACE_SEH_TRY if (1)
-# define ACE_SEH_EXCEPT(X) while (0)
-# define ACE_SEH_FINALLY if (1)
-
-# if !defined (ACE_INVALID_PID)
-# define ACE_INVALID_PID ((pid_t) -1)
-# endif /* ACE_INVALID_PID */
-
-// The "null" device on UNIX.
-# define ACE_DEV_NULL "/dev/null"
-
-// Wrapper for NT events on UNIX.
-class ACE_Export ACE_event_t
-{
- friend class ACE_OS;
-protected:
- ACE_mutex_t lock_;
- // Protect critical section.
-
- ACE_cond_t condition_;
- // Keeps track of waiters.
-
- int manual_reset_;
- // Specifies if this is an auto- or manual-reset event.
-
- int is_signaled_;
- // "True" if signaled.
-
- u_long waiting_threads_;
- // Number of waiting threads.
-};
-
-// Provide compatibility with Windows NT.
-typedef int ACE_HANDLE;
-// For Win32 compatibility.
-typedef ACE_HANDLE ACE_SOCKET;
-
-struct ACE_OVERLAPPED
-{
- u_long Internal;
- u_long InternalHigh;
- u_long Offset;
- u_long OffsetHigh;
- ACE_HANDLE hEvent;
-};
-
-// Add some typedefs and macros to enhance Win32 conformance...
-# if !defined (LPSECURITY_ATTRIBUTES)
-# define LPSECURITY_ATTRIBUTES int
-# endif /* !defined LPSECURITY_ATTRIBUTES */
-# if !defined (GENERIC_READ)
-# define GENERIC_READ 0
-# endif /* !defined GENERIC_READ */
-# if !defined (FILE_SHARE_READ)
-# define FILE_SHARE_READ 0
-# endif /* !defined FILE_SHARE_READ */
-# if !defined (OPEN_EXISTING)
-# define OPEN_EXISTING 0
-# endif /* !defined OPEN_EXISTING */
-# if !defined (FILE_ATTRIBUTE_NORMAL)
-# define FILE_ATTRIBUTE_NORMAL 0
-# endif /* !defined FILE_ATTRIBUTE_NORMAL */
-# if !defined (MAXIMUM_WAIT_OBJECTS)
-# define MAXIMUM_WAIT_OBJECTS 0
-# endif /* !defined MAXIMUM_WAIT_OBJECTS */
-# if !defined (FILE_FLAG_OVERLAPPED)
-# define FILE_FLAG_OVERLAPPED 0
-# endif /* !defined FILE_FLAG_OVERLAPPED */
-# if !defined (FILE_FLAG_SEQUENTIAL_SCAN)
-# define FILE_FLAG_SEQUENTIAL_SCAN 0
-# endif /* FILE_FLAG_SEQUENTIAL_SCAN */
-
-# if defined (ACE_HAS_BROKEN_IF_HEADER)
-struct ifafilt;
-# endif /* ACE_HAS_BROKEN_IF_HEADER */
-
-# if defined (ACE_HAS_AIX_BROKEN_SOCKET_HEADER)
-# undef __cplusplus
-# include /**/ <sys/socket.h>
-# define __cplusplus
-# else
-# include /**/ <sys/socket.h>
-# endif /* ACE_HAS_AIX_BROKEN_SOCKET_HEADER */
-
-extern "C"
-{
-# if defined (VXWORKS)
- struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* aliases: not used on VxWorks */
- int h_addrtype; /* host address type */
- int h_length; /* address length */
- char **h_addr_list; /* (first, only) address from name server */
-# define h_addr h_addr_list[0] /* the first address */
- };
-# elif defined (ACE_HAS_CYGWIN32_SOCKET_H)
-# include /**/ <cygwin32/socket.h>
-# else
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# define queue _Queue_
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# include /**/ <netdb.h>
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# undef queue
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# endif /* VXWORKS */
-
-// This part if to avoid STL name conflict with the map structure
-// in net/if.h.
-# if defined (ACE_HAS_STL_MAP_CONFLICT)
-# define map _Resource_Allocation_Map_
-# endif /* ACE_HAS_STL_MAP_CONFLICT */
-# include /**/ <net/if.h>
-# if defined (ACE_HAS_STL_MAP_CONFLICT)
-# undef map
-# endif /* ACE_HAS_STL_MAP_CONFLICT */
-
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# define queue _Queue_
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# include /**/ <netinet/in.h>
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# undef queue
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-
-# if defined (VXWORKS)
- // Work around a lack of ANSI prototypes for these functions on VxWorks.
- unsigned long inet_addr (const char *);
- char *inet_ntoa (const struct in_addr);
- struct in_addr inet_makeaddr (const int, const int);
- unsigned long inet_network (const char *);
-# else /* ! VXWORKS */
-# include /**/ <arpa/inet.h>
-# endif /* ! VXWORKS */
-}
-# if !defined (ACE_LACKS_TCP_H)
-# include /**/ <netinet/tcp.h>
-# endif /* ACE_LACKS_TCP_H */
-
-# if defined (__Lynx__)
-# ifndef howmany
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* howmany */
-# endif /* __Lynx__ */
-
-# if defined (CHORUS)
-# include /**/ <chorus.h>
-# if !defined(CHORUS_4)
-# include /**/ <cx/select.h>
-# else
-# include /**/ <stdio.h>
-# endif
-# include /**/ <sys/uio.h>
-# include /**/ <time.h>
-# include /**/ <stdfileio.h>
-# include /**/ <am/afexec.h>
-# include /**/ <sys/types.h>
-# include /**/ <sys/signal.h>
-# include /**/ <sys/wait.h>
-# include /**/ <pwd.h>
-# include /**/ <timer/chBench.h>
-extern_C int getgid __((void));
-extern_C int getuid __((void));
-extern_C char* getcwd __((char* buf, size_t size));
-extern_C int pipe __((int* fildes));
-extern_C int gethostname __((char*, size_t));
-
-// This must come after limits.h is included
-# define MAXPATHLEN _POSIX_PATH_MAX
-
-# if !defined(CHORUS_4)
-typedef cx_fd_mask fd_mask;
-typedef void (*__sighandler_t)(int); // keep Signal compilation happy
-# endif
-# ifndef howmany
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* howmany */
-# elif defined (CYGWIN32)
-# include /**/ <sys/uio.h>
-# include /**/ <sys/file.h>
-# include /**/ <sys/time.h>
-# include /**/ <sys/resource.h>
-# include /**/ <sys/wait.h>
-# include /**/ <pwd.h>
-# elif defined (__QNX__)
-# include /**/ <sys/uio.h>
-# include /**/ <sys/ipc.h>
-# include /**/ <sys/sem.h>
-# include /**/ <sys/time.h>
-# include /**/ <sys/wait.h>
-# include /**/ <sys/resource.h>
-# include /**/ <pwd.h>
- // sets O_NDELAY
-# include /**/ <unix.h>
-# include /**/ <sys/param.h> /* for NBBY */
- typedef long fd_mask;
-# if !defined (NFDBITS)
-# define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
-# endif /* ! NFDBITS */
-# if !defined (howmany)
-# define howmany(x, y) (((x)+((y)-1))/(y))
-# endif /* ! howmany */
-# elif ! defined (VXWORKS)
-# include /**/ <sys/uio.h>
-# include /**/ <sys/ipc.h>
-# include /**/ <sys/shm.h>
-# include /**/ <sys/sem.h>
-# include /**/ <sys/file.h>
-# include /**/ <sys/time.h>
-# include /**/ <sys/resource.h>
-# include /**/ <sys/wait.h>
-# include /**/ <pwd.h>
-# endif /* ! VXWORKS */
-# include /**/ <sys/ioctl.h>
-
-// IRIX5 defines bzero() in this odd file...
-# if defined (ACE_HAS_BSTRING)
-# include /**/ <bstring.h>
-# endif /* ACE_HAS_BSTRING */
-
-// AIX defines bzero() in this odd file...
-# if defined (ACE_HAS_STRINGS)
-# include /**/ <strings.h>
-# endif /* ACE_HAS_STRINGS */
-
-# if defined (ACE_HAS_TERM_IOCTLS)
-# if defined (__QNX__)
-# include /**/ <termios.h>
-# else /* ! __QNX__ */
-# include /**/ <sys/termios.h>
-# endif /* ! __QNX__ */
-# endif /* ACE_HAS_TERM_IOCTLS */
-
-# if !defined (ACE_LACKS_UNISTD_H)
-# include /**/ <unistd.h>
-# endif /* ACE_LACKS_UNISTD_H */
-
-# if defined (ACE_HAS_AIO_CALLS)
-# include /**/ <aio.h>
-# endif /* ACE_HAS_AIO_CALLS */
-
-# if !defined (ACE_LACKS_PARAM_H)
-# include /**/ <sys/param.h>
-# endif /* ACE_LACKS_PARAM_H */
-
-# if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) && !defined (VXWORKS)
-# include /**/ <sys/un.h>
-# endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
-
-# if defined (ACE_HAS_SIGINFO_T)
-# if !defined (ACE_LACKS_SIGINFO_H)
-# if defined (__QNX__)
-# include /**/ <sys/siginfo.h>
-# else /* ! __QNX__ */
-# include /**/ <siginfo.h>
-# endif /* ! __QNX__ */
-# endif /* ACE_LACKS_SIGINFO_H */
-# if !defined (ACE_LACKS_UCONTEXT_H)
-# include /**/ <ucontext.h>
-# endif /* ACE_LACKS_UCONTEXT_H */
-# endif /* ACE_HAS_SIGINFO_T */
-
-# if defined (ACE_HAS_POLL)
-# include /**/ <poll.h>
-# endif /* ACE_HAS_POLL */
-
-# if defined (ACE_HAS_STREAMS)
-# if defined (AIX)
-# if !defined (_XOPEN_EXTENDED_SOURCE)
-# define _XOPEN_EXTENDED_SOURCE
-# endif /* !_XOPEN_EXTENDED_SOURCE */
-# include /**/ <stropts.h>
-# undef _XOPEN_EXTENDED_SOURCE
-# else
-# include /**/ <stropts.h>
-# endif /* AIX */
-# endif /* ACE_HAS_STREAMS */
-
-# if defined (DIGITAL_UNIX)
- // sigwait is yet another macro on Digital UNIX 4.0, just causing
- // trouble when introducing member functions with the same name.
- // Thanks to Thilo Kielmann" <kielmann@informatik.uni-siegen.de> for
- // this fix.
-# if defined (__DECCXX_VER)
-# undef sigwait
- // cxx on Digital Unix 4.0 needs this declaration. With it,
- // <::_Psigwait> works with cxx -pthread. g++ does _not_ need
- // it.
- extern "C" int _Psigwait __((const sigset_t *set, int *sig));
-# endif /* __DECCXX_VER */
-# elif !defined (ACE_HAS_SIGWAIT)
- extern "C" int sigwait (sigset_t *set);
-# endif /* ! DIGITAL_UNIX && ! ACE_HAS_SIGWAIT */
-
-# if defined (ACE_HAS_SELECT_H)
-# include /**/ <sys/select.h>
-# endif /* ACE_HAS_SELECT_H */
-
-# if defined (ACE_HAS_ALLOCA_H)
-# include /**/ <alloca.h>
-# endif /* ACE_HAS_ALLOCA_H */
-
-# if defined (ACE_HAS_TIUSER_H) || defined (ACE_HAS_XTI) || defined (ACE_HAS_FORE_ATM_XTI)
-# if defined (ACE_HAS_BROKEN_XTI_MACROS)
-# undef TCP_NODELAY
-# undef TCP_MAXSEG
-# endif /* ACE_HAS_BROKEN_XTI_MACROS */
-# if defined (ACE_HAS_TIUSER_H_BROKEN_EXTERN_C)
-extern "C" {
-# endif /* ACE_HAS_TIUSER_H_BROKEN_EXTERN_C */
-# if defined (ACE_HAS_FORE_ATM_XTI)
-# include /**/ <fore_xti/xti_user_types.h>
-# include /**/ <fore_xti/xti.h>
-# include /**/ <fore_xti/xti_atm.h>
-# include /**/ <fore_xti/netatm/atm.h>
-# include /**/ <fore_xti/ans.h>
-# elif defined (ACE_HAS_TIUSER_H)
-# include /**/ <tiuser.h>
-# elif defined (ACE_HAS_SYS_XTI_H)
-# define class ace_xti_class
-# include /**/ <sys/xti.h>
-# undef class
-# else
-# include /**/ <xti.h>
-# endif /* ACE_HAS_FORE_ATM_XTI */
-# if defined (ACE_HAS_TIUSER_H_BROKEN_EXTERN_C)
-}
-# endif /* ACE_HAS_TIUSER_H_BROKEN_EXTERN_C */
-# endif /* ACE_HAS_TIUSER_H || ACE_HAS_XTI */
-
-/* Set the proper handle type for dynamically-loaded libraries. */
-/* Also define a default 'mode' for loading a library - the names and values */
-/* differ between OSes, so if you write code that uses the mode, be careful */
-/* of the platform differences. */
-# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
-# if defined (ACE_HAS_DLFCN_H_BROKEN_EXTERN_C)
-extern "C" {
-# endif /* ACE_HAS_DLFCN_H_BROKEN_EXTERN_C */
-# include /**/ <dlfcn.h>
-# if defined (ACE_HAS_DLFCN_H_BROKEN_EXTERN_C)
-}
-# endif /* ACE_HAS_DLFCN_H_BROKEN_EXTERN_C */
- typedef void *ACE_SHLIB_HANDLE;
-# define ACE_SHLIB_INVALID_HANDLE 0
-# if !defined (RTLD_LAZY)
-# define RTLD_LAZY 1
-# endif /* !RTLD_LAZY */
-# if defined (__KCC)
-# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY | RTLD_GROUP | RTLD_NODELETE
-# else
-# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY
-# endif /* KCC */
-# elif defined (__hpux)
-# if defined(__GNUC__) || __cplusplus >= 199707L
-# include /**/ <dl.h>
-# else
-# include /**/ <cxxdl.h>
-# endif /* (g++ || HP aC++) vs. HP C++ */
- typedef shl_t ACE_SHLIB_HANDLE;
-# define ACE_SHLIB_INVALID_HANDLE 0
-# define ACE_DEFAULT_SHLIB_MODE BIND_DEFERRED
-# else
-# if !defined(RTLD_LAZY)
-# define RTLD_LAZY 1
-# endif /* !RTLD_LAZY */
- typedef void *ACE_SHLIB_HANDLE;
-# define ACE_SHLIB_INVALID_HANDLE 0
-# define ACE_DEFAULT_SHLIB_MODE RTLD_LAZY
-
-# endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
-
-# if defined (ACE_HAS_SOCKIO_H)
-# include /**/ <sys/sockio.h>
-# endif /* ACE_HAS_SOCKIO_ */
-
-// There must be a better way to do this...
-# if !defined (RLIMIT_NOFILE)
-# if defined (linux) || defined (AIX) || defined (SCO)
-# if defined (RLIMIT_OFILE)
-# define RLIMIT_NOFILE RLIMIT_OFILE
-# else
-# define RLIMIT_NOFILE 200
-# endif /* RLIMIT_OFILE */
-# endif /* defined (linux) || defined (AIX) || defined (SCO) */
-# endif /* RLIMIT_NOFILE */
-
-# if !defined (ACE_HAS_TLI_PROTOTYPES)
-// Define ACE_TLI headers for systems that don't prototype them....
-extern "C"
-{
- int t_accept(int fildes, int resfd, struct t_call *call);
- char *t_alloc(int fildes, int struct_type, int fields);
- int t_bind(int fildes, struct t_bind *req, struct t_bind *ret);
- int t_close(int fildes);
- int t_connect(int fildes, struct t_call *sndcall,
- struct t_call *rcvcall);
- void t_error(const char *errmsg);
- int t_free(char *ptr, int struct_type);
- int t_getinfo(int fildes, struct t_info *info);
- int t_getname (int fildes, struct netbuf *namep, int type);
- int t_getstate(int fildes);
- int t_listen(int fildes, struct t_call *call);
- int t_look(int fildes);
- int t_open(char *path, int oflag, struct t_info *info);
- int t_optmgmt(int fildes, struct t_optmgmt *req,
- struct t_optmgmt *ret);
- int t_rcv(int fildes, char *buf, u_int nbytes, int *flags);
- int t_rcvconnect(int fildes, struct t_call *call);
- int t_rcvdis(int fildes, struct t_discon *discon);
- int t_rcvrel(int fildes);
- int t_rcvudata(int fildes, struct t_unitdata *unitdata, int *flags);
- int t_rcvuderr(int fildes, struct t_uderr *uderr);
- int t_snd(int fildes, const char *buf, u_int nbytes, int flags);
- int t_snddis(int fildes, struct t_call *call);
- int t_sndrel(int fildes);
- int t_sndudata(int fildes, struct t_unitdata *unitdata);
- int t_sync(int fildes);
- int t_unbind(int fildes);
-}
-# endif /* !ACE_HAS_TLI_PROTOTYPES */
-
-# if defined (ACE_LACKS_MMAP)
-# define PROT_READ 0
-# define PROT_WRITE 0
-# define PROT_EXEC 0
-# define PROT_NONE 0
-# define PROT_RDWR 0
-# define MAP_PRIVATE 0
-# define MAP_SHARED 0
-# define MAP_FIXED 0
-# endif /* ACE_LACKS_MMAP */
-
-// Fixes a problem with HP/UX.
-# if defined (ACE_HAS_BROKEN_MMAP_H)
-extern "C"
-{
-# include /**/ <sys/mman.h>
-}
-# elif !defined (ACE_LACKS_MMAP)
-# include /**/ <sys/mman.h>
-# endif /* ACE_HAS_BROKEN_MMAP_H */
-
-// OSF1 has problems with sys/msg.h and C++...
-# if defined (ACE_HAS_BROKEN_MSG_H)
-# define _KERNEL
-# endif /* ACE_HAS_BROKEN_MSG_H */
-# if !defined (ACE_LACKS_SYSV_MSG_H)
-# include /**/ <sys/msg.h>
-# endif /* ACE_LACKS_SYSV_MSG_H */
-# if defined (ACE_HAS_BROKEN_MSG_H)
-# undef _KERNEL
-# endif /* ACE_HAS_BROKEN_MSG_H */
-
-# if defined (ACE_LACKS_SYSV_MSQ_PROTOS)
-extern "C"
-{
- int msgget (key_t, int);
- int msgrcv (int, void *, size_t, long, int);
- int msgsnd (int, const void *, size_t, int);
- int msgctl (int, int, struct msqid_ds *);
-}
-# endif /* ACE_LACKS_SYSV_MSQ_PROTOS */
-
-# if defined (ACE_HAS_PRIOCNTL)
-# include /**/ <sys/priocntl.h>
-# endif /* ACE_HAS_PRIOCNTL */
-
-# if defined (ACE_HAS_IDTYPE_T)
- typedef idtype_t ACE_idtype_t;
-# else
- typedef int ACE_idtype_t;
-# endif /* ACE_HAS_IDTYPE_T */
-
-# if defined (ACE_HAS_STHREADS) || defined (DIGITAL_UNIX)
-# if defined (ACE_LACKS_PRI_T)
- typedef int pri_t;
-# endif /* ACE_LACKS_PRI_T */
- typedef id_t ACE_id_t;
-# define ACE_SELF P_MYID
- typedef pri_t ACE_pri_t;
-# else /* ! ACE_HAS_STHREADS && ! DIGITAL_UNIX */
- typedef long ACE_id_t;
-# define ACE_SELF (-1)
- typedef short ACE_pri_t;
-# endif /* ! ACE_HAS_STHREADS && ! DIGITAL_UNIX */
-
-# if defined (ACE_HAS_HI_RES_TIMER) && !defined (ACE_LACKS_LONGLONG_T)
- /* hrtime_t is defined on systems (Suns) with ACE_HAS_HI_RES_TIMER */
- typedef hrtime_t ACE_hrtime_t;
-# else /* ! ACE_HAS_HI_RES_TIMER || ACE_LACKS_LONGLONG_T */
- typedef ACE_UINT64 ACE_hrtime_t;
-# endif /* ! ACE_HAS_HI_RES_TIMER || ACE_LACKS_LONGLONG_T */
-
-# endif /* !defined (ACE_WIN32) && !defined (ACE_PSOS) */
-
-// defined Win32 specific macros for UNIX platforms
-# if !defined (O_BINARY)
-# define O_BINARY 0
-# endif /* O_BINARY */
-# if !defined (_O_BINARY)
-# define _O_BINARY O_BINARY
-# endif /* _O_BINARY */
-# if !defined (O_TEXT)
-# define O_TEXT 0
-# endif /* O_TEXT */
-# if !defined (_O_TEXT)
-# define _O_TEXT O_TEXT
-# endif /* _O_TEXT */
-# if !defined (O_RAW)
-# define O_RAW 0
-# endif /* O_RAW */
-# if !defined (_O_RAW)
-# define _O_RAW O_RAW
-# endif /* _O_RAW */
-
-# if !defined (ACE_DEFAULT_SYNCH_TYPE)
-# define ACE_DEFAULT_SYNCH_TYPE USYNC_THREAD
-# endif /* ! ACE_DEFAULT_SYNCH_TYPE */
-
-# if !defined (ACE_MAP_PRIVATE)
-# define ACE_MAP_PRIVATE MAP_PRIVATE
-# endif /* ! ACE_MAP_PRIVATE */
-
-# if !defined (ACE_MAP_SHARED)
-# define ACE_MAP_SHARED MAP_SHARED
-# endif /* ! ACE_MAP_SHARED */
-
-# if !defined (ACE_MAP_FIXED)
-# define ACE_MAP_FIXED MAP_FIXED
-# endif /* ! ACE_MAP_FIXED */
-
-# if defined (ACE_LACKS_UTSNAME_T)
-# define _SYS_NMLN 257
-struct utsname
-{
- ACE_TCHAR sysname[_SYS_NMLN];
- ACE_TCHAR nodename[_SYS_NMLN];
- ACE_TCHAR release[_SYS_NMLN];
- ACE_TCHAR version[_SYS_NMLN];
- ACE_TCHAR machine[_SYS_NMLN];
-};
-# else
-# include /**/ <sys/utsname.h>
-# endif /* ACE_LACKS_UTSNAME_T */
-
-// Increase the range of "address families". Please note that this
-// must appear _after_ the include of sys/socket.h, for the AF_FILE
-// definition on Linux/glibc2.
-# define AF_ANY (-1)
-# define AF_SPIPE (AF_MAX + 1)
-# if !defined (AF_FILE)
-# define AF_FILE (AF_MAX + 2)
-# endif /* ! AF_FILE */
-# define AF_DEV (AF_MAX + 3)
-# define AF_UPIPE (AF_SPIPE)
-
-# if defined (ACE_SELECT_USES_INT)
-typedef int ACE_FD_SET_TYPE;
-# else
-typedef fd_set ACE_FD_SET_TYPE;
-# endif /* ACE_SELECT_USES_INT */
-
-# if !defined (MAXNAMELEN)
-# if defined (FILENAME_MAX)
-# define MAXNAMELEN FILENAME_MAX
-# else
-# define MAXNAMELEN 256
-# endif /* FILENAME_MAX */
-# endif /* MAXNAMELEN */
-
-# if !defined(MAXHOSTNAMELEN)
-# define MAXHOSTNAMELEN 256
-# endif /* MAXHOSTNAMELEN */
-
-// Define INET loopback address constant if it hasn't been defined
-// Dotted Decimal 127.0.0.1 == Hexidecimal 0x7f000001
-# if !defined (INADDR_LOOPBACK)
-# define INADDR_LOOPBACK 0x7f000001
-# endif /* INADDR_LOOPBACK */
-
-// Define INET string length constants if they haven't been defined
-//
-// for IPv4 dotted-decimal
-# if !defined (INET_ADDRSTRLEN)
-# define INET_ADDRSTRLEN 16
-# endif /* INET_ADDRSTRLEN */
-//
-// for IPv6 hex string
-# if !defined (INET6_ADDRSTRLEN)
-# define INET6_ADDRSTRLEN 46
-# endif /* INET6_ADDRSTRLEN */
-
-# if defined (ACE_LACKS_SIGSET)
-typedef u_int sigset_t;
-# endif /* ACE_LACKS_SIGSET */
-
-# if defined (ACE_LACKS_SIGACTION)
-struct sigaction
-{
- int sa_flags;
- ACE_SignalHandlerV sa_handler;
- sigset_t sa_mask;
-};
-# endif /* ACE_LACKS_SIGACTION */
-
-# if !defined (SIGHUP)
-# define SIGHUP 0
-# endif /* SIGHUP */
-
-# if !defined (SIGINT)
-# define SIGINT 0
-# endif /* SIGINT */
-
-# if !defined (SIGSEGV)
-# define SIGSEGV 0
-# endif /* SIGSEGV */
-
-# if !defined (SIGIO)
-# define SIGIO 0
-# endif /* SIGSEGV */
-
-# if !defined (SIGUSR1)
-# define SIGUSR1 0
-# endif /* SIGUSR1 */
-
-# if !defined (SIGUSR2)
-# define SIGUSR2 0
-# endif /* SIGUSR2 */
-
-# if !defined (SIGCHLD)
-# define SIGCHLD 0
-# endif /* SIGCHLD */
-
-# if !defined (SIGCLD)
-# define SIGCLD SIGCHLD
-# endif /* SIGCLD */
-
-# if !defined (SIGQUIT)
-# define SIGQUIT 0
-# endif /* SIGQUIT */
-
-# if !defined (SIGPIPE)
-# define SIGPIPE 0
-# endif /* SIGPIPE */
-
-# if !defined (SIGALRM)
-# define SIGALRM 0
-# endif /* SIGALRM */
-
-# if !defined (SIG_DFL)
-# if defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC)
-# define SIG_DFL ((void *) 0)
-# else
-# define SIG_DFL ((__sighandler_t) 0)
-# endif
-# endif /* SIG_DFL */
-
-# if !defined (SIG_IGN)
-# if defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC)
-# define SIG_IGN ((void *) 1) /* ignore signal */
-# else
-# define SIG_IGN ((__sighandler_t) 1) /* ignore signal */
-# endif
-# endif /* SIG_IGN */
-
-# if !defined (SIG_ERR)
-# if defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC)
-# define SIG_ERR ((void *) -1) /* error return from signal */
-# else
-# define SIG_ERR ((__sighandler_t) -1) /* error return from signal */
-# endif
-# endif /* SIG_ERR */
-
-# if !defined (O_NONBLOCK)
-# define O_NONBLOCK 1
-# endif /* O_NONBLOCK */
-
-# if !defined (SIG_BLOCK)
-# define SIG_BLOCK 1
-# endif /* SIG_BLOCK */
-
-# if !defined (SIG_UNBLOCK)
-# define SIG_UNBLOCK 2
-# endif /* SIG_UNBLOCK */
-
-# if !defined (SIG_SETMASK)
-# define SIG_SETMASK 3
-# endif /* SIG_SETMASK */
-
-# if !defined (IPC_CREAT)
-# define IPC_CREAT 0
-# endif /* IPC_CREAT */
-
-# if !defined (IPC_NOWAIT)
-# define IPC_NOWAIT 0
-# endif /* IPC_NOWAIT */
-
-# if !defined (IPC_RMID)
-# define IPC_RMID 0
-# endif /* IPC_RMID */
-
-# if !defined (IPC_EXCL)
-# define IPC_EXCL 0
-# endif /* IPC_EXCL */
-
-# if !defined (IP_DROP_MEMBERSHIP)
-# define IP_DROP_MEMBERSHIP 0
-# endif /* IP_DROP_MEMBERSHIP */
-
-# if !defined (IP_ADD_MEMBERSHIP)
-# define IP_ADD_MEMBERSHIP 0
-# define ACE_LACKS_IP_ADD_MEMBERSHIP
-# endif /* IP_ADD_MEMBERSHIP */
-
-# if !defined (IP_DEFAULT_MULTICAST_TTL)
-# define IP_DEFAULT_MULTICAST_TTL 0
-# endif /* IP_DEFAULT_MULTICAST_TTL */
-
-# if !defined (IP_DEFAULT_MULTICAST_LOOP)
-# define IP_DEFAULT_MULTICAST_LOOP 0
-# endif /* IP_DEFAULT_MULTICAST_LOOP */
-
-# if !defined (IP_MAX_MEMBERSHIPS)
-# define IP_MAX_MEMBERSHIPS 0
-# endif /* IP_MAX_MEMBERSHIP */
-
-# if !defined (SIOCGIFBRDADDR)
-# define SIOCGIFBRDADDR 0
-# endif /* SIOCGIFBRDADDR */
-
-# if !defined (SIOCGIFADDR)
-# define SIOCGIFADDR 0
-# endif /* SIOCGIFADDR */
-
-# if !defined (IPC_PRIVATE)
-# define IPC_PRIVATE ACE_INVALID_SEM_KEY
-# endif /* IPC_PRIVATE */
-
-# if !defined (IPC_STAT)
-# define IPC_STAT 0
-# endif /* IPC_STAT */
-
-# if !defined (GETVAL)
-# define GETVAL 0
-# endif /* GETVAL */
-
-# if !defined (F_GETFL)
-# define F_GETFL 0
-# endif /* F_GETFL */
-
-# if !defined (SETVAL)
-# define SETVAL 0
-# endif /* SETVAL */
-
-# if !defined (GETALL)
-# define GETALL 0
-# endif /* GETALL */
-
-# if !defined (SETALL)
-# define SETALL 0
-# endif /* SETALL */
-
-# if !defined (SEM_UNDO)
-# define SEM_UNDO 0
-# endif /* SEM_UNDO */
-
-# if defined (__Lynx__)
- // LynxOS Neutrino sets NSIG to the highest-numbered signal.
-# define ACE_NSIG (NSIG + 1)
-# else
- // All other platforms set NSIG to one greater than the
- // highest-numbered signal.
-# define ACE_NSIG NSIG
-# endif /* __Lynx__ */
-
-# if !defined (R_OK)
-# define R_OK 04 /* Test for Read permission. */
-# endif /* R_OK */
-
-# if !defined (W_OK)
-# define W_OK 02 /* Test for Write permission. */
-# endif /* W_OK */
-
-# if !defined (X_OK)
-# define X_OK 01 /* Test for eXecute permission. */
-# endif /* X_OK */
-
-# if !defined (F_OK)
-# define F_OK 0 /* Test for existence of File. */
-# endif /* F_OK */
-
-# if !defined (ESUCCESS)
-# define ESUCCESS 0
-# endif /* !ESUCCESS */
-
-# if !defined (EIDRM)
-# define EIDRM 0
-# endif /* !EIDRM */
-
-# if !defined (ENFILE)
-# define ENFILE EMFILE /* No more socket descriptors are available. */
-# endif /* !ENOSYS */
-
-# if !defined (ECOMM)
- // Not the same, but ECONNABORTED is provided on NT.
-# define ECOMM ECONNABORTED
-# endif /* ECOMM */
-
-# if !defined (WNOHANG)
-# define WNOHANG 0100
-# endif /* !WNOHANG */
-
-# if !defined (EDEADLK)
-# define EDEADLK 1000 /* Some large number.... */
-# endif /* !EDEADLK */
-
-# if !defined (MS_SYNC)
-# define MS_SYNC 0x0
-# endif /* !MS_SYNC */
-
-# if !defined (PIPE_BUF)
-# define PIPE_BUF 5120
-# endif /* PIPE_BUF */
-
-# if !defined (PROT_RDWR)
-# define PROT_RDWR (PROT_READ|PROT_WRITE)
-# endif /* PROT_RDWR */
-
-# if !defined (WNOHANG)
-# define WNOHANG 0
-# endif /* WNOHANG */
-
-# if defined (ACE_HAS_POSIX_NONBLOCK)
-# define ACE_NONBLOCK O_NONBLOCK
-# else
-# define ACE_NONBLOCK O_NDELAY
-# endif /* ACE_HAS_POSIX_NONBLOCK */
-
-// These are used by the <ACE_IPC_SAP::enable> and
-// <ACE_IPC_SAP::disable> methods. They must be unique and cannot
-// conflict with the value of <ACE_NONBLOCK>. We make the numbers
-// negative here so they won't conflict with other values like SIGIO,
-// etc.
-# define ACE_SIGIO -1
-# define ACE_SIGURG -2
-# define ACE_CLOEXEC -3
-
-# define LOCALNAME 0
-# define REMOTENAME 1
-
-# if !defined (ETIMEDOUT) && defined (ETIME)
-# define ETIMEDOUT ETIME
-# endif /* ETIMEDOUT */
-
-# if !defined (ETIME) && defined (ETIMEDOUT)
-# define ETIME ETIMEDOUT
-# endif /* ETIMED */
-
-# if !defined (EBUSY)
-# define EBUSY ETIME
-# endif /* EBUSY */
-
-# if !defined (_SC_TIMER_MAX)
-# define _SC_TIMER_MAX 44
-# endif /* _SC_TIMER_MAX */
-
-// Default number of <ACE_Event_Handler>s supported by
-// <ACE_Timer_Heap>.
-# if !defined (ACE_DEFAULT_TIMERS)
-# define ACE_DEFAULT_TIMERS _SC_TIMER_MAX
-# endif /* ACE_DEFAULT_TIMERS */
-
-# if defined (ACE_HAS_STRUCT_NETDB_DATA)
-typedef char ACE_HOSTENT_DATA[sizeof(struct hostent_data)];
-typedef char ACE_SERVENT_DATA[sizeof(struct servent_data)];
-typedef char ACE_PROTOENT_DATA[sizeof(struct protoent_data)];
-# else
-# if !defined ACE_HOSTENT_DATA_SIZE
-# define ACE_HOSTENT_DATA_SIZE (4*1024)
-# endif /*ACE_HOSTENT_DATA_SIZE */
-# if !defined ACE_SERVENT_DATA_SIZE
-# define ACE_SERVENT_DATA_SIZE (4*1024)
-# endif /*ACE_SERVENT_DATA_SIZE */
-# if !defined ACE_PROTOENT_DATA_SIZE
-# define ACE_PROTOENT_DATA_SIZE (2*1024)
-# endif /*ACE_PROTOENT_DATA_SIZE */
-typedef char ACE_HOSTENT_DATA[ACE_HOSTENT_DATA_SIZE];
-typedef char ACE_SERVENT_DATA[ACE_SERVENT_DATA_SIZE];
-typedef char ACE_PROTOENT_DATA[ACE_PROTOENT_DATA_SIZE];
-# endif /* ACE_HAS_STRUCT_NETDB_DATA */
-
-# if !defined (ACE_HAS_SEMUN) || (defined (__GLIBC__) && defined (_SEM_SEMUN_UNDEFINED))
-union semun
-{
- int val; // value for SETVAL
- struct semid_ds *buf; // buffer for IPC_STAT & IPC_SET
- u_short *array; // array for GETALL & SETALL
-};
-# endif /* !ACE_HAS_SEMUN || (defined (__GLIBC__) && defined (_SEM_SEMUN_UNDEFINED)) */
-
-// Max size of an ACE Log Record data buffer. This can be reset in
-// the config.h file if you'd like to increase or decrease the size.
-# if !defined (ACE_MAXLOGMSGLEN)
-# define ACE_MAXLOGMSGLEN 4 * 1024
-# endif /* ACE_MAXLOGMSGLEN */
-
-// Max size of an ACE Token.
-# define ACE_MAXTOKENNAMELEN 40
-
-// Max size of an ACE Token client ID.
-# define ACE_MAXCLIENTIDLEN MAXHOSTNAMELEN + 20
-
-// Create some useful typedefs.
-
-typedef const char **SYS_SIGLIST;
-typedef void *(*ACE_THR_FUNC)(void *);
-// This is for C++ static methods.
-# if defined (VXWORKS)
-typedef int ACE_THR_FUNC_INTERNAL_RETURN_TYPE;
-typedef FUNCPTR ACE_THR_FUNC_INTERNAL; // where typedef int (*FUNCPTR) (...)
-# elif defined (ACE_PSOS)
-typedef void (*ACE_THR_FUNC_INTERNAL)(void *);
-# else
-typedef ACE_THR_FUNC ACE_THR_FUNC_INTERNAL;
-# endif /* VXWORKS */
-
-extern "C" {
-typedef void (*ACE_THR_C_DEST)(void *);
-}
-typedef void (*ACE_THR_DEST)(void *);
-
-extern "C"
-{
-# if defined (VXWORKS)
-typedef FUNCPTR ACE_THR_C_FUNC; // where typedef int (*FUNCPTR) (...)
-# elif defined (ACE_PSOS)
-// needed to handle task entry point type inconsistencies in pSOS+
-typedef void (*PSOS_TASK_ENTRY_POINT)();
-typedef void (*ACE_THR_C_FUNC)(void *);
-# else
-typedef void *(*ACE_THR_C_FUNC)(void *);
-# endif /* VXWORKS */
-}
-
-# if !defined (MAP_FAILED) || defined (ACE_HAS_BROKEN_MAP_FAILED)
-# undef MAP_FAILED
-# define MAP_FAILED ((void *) -1)
-# elif defined (ACE_HAS_LONG_MAP_FAILED)
-# undef MAP_FAILED
-# define MAP_FAILED ((void *) -1L)
-# endif /* !MAP_FAILED || ACE_HAS_BROKEN_MAP_FAILED */
-
-# if defined (ACE_HAS_CHARPTR_DL)
-typedef ACE_TCHAR * ACE_DL_TYPE;
-# else
-typedef const ACE_TCHAR * ACE_DL_TYPE;
-# endif /* ACE_HAS_CHARPTR_DL */
-
-# if !defined (ACE_HAS_SIGINFO_T)
-struct ACE_Export siginfo_t
-{
- siginfo_t (ACE_HANDLE handle);
- siginfo_t (ACE_HANDLE *handles); // JCEJ 12/23/96
-
- ACE_HANDLE si_handle_;
- // Win32 HANDLE that has become signaled.
-
- ACE_HANDLE *si_handles_;
- // Array of Win32 HANDLEs all of which have become signaled.
-};
-# endif /* ACE_HAS_SIGINFO_T */
-
-// Typedef for the null handler func.
-extern "C"
-{
- typedef void (*ACE_SIGNAL_C_FUNC)(int,siginfo_t*,void*);
-}
-
-# if !defined (ACE_HAS_UCONTEXT_T)
-typedef int ucontext_t;
-# endif /* ACE_HAS_UCONTEXT_T */
-
-# if !defined (SA_SIGINFO)
-# define SA_SIGINFO 0
-# endif /* SA_SIGINFO */
-
-# if !defined (SA_RESTART)
-# define SA_RESTART 0
-# endif /* SA_RESTART */
-
-# if defined (ACE_HAS_TIMOD_H)
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# define queue _Queue_
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# include /**/ <sys/timod.h>
-# if defined (ACE_HAS_STL_QUEUE_CONFLICT)
-# undef queue
-# endif /* ACE_HAS_STL_QUEUE_CONFLICT */
-# elif defined (ACE_HAS_OSF_TIMOD_H)
-# include /**/ <tli/timod.h>
-# endif /* ACE_HAS_TIMOD_H */
-
-class ACE_Export ACE_Thread_ID
-{
- // = TITLE
- // Defines a platform-independent thread ID.
-public:
- // = Initialization method.
- ACE_Thread_ID (ACE_thread_t, ACE_hthread_t);
- ACE_Thread_ID (const ACE_Thread_ID &id);
-
- // = Set/Get the Thread ID.
- ACE_thread_t id (void);
- void id (ACE_thread_t);
-
- // = Set/Get the Thread handle.
- ACE_hthread_t handle (void);
- void handle (ACE_hthread_t);
-
- // != Comparison operator.
- int operator== (const ACE_Thread_ID &) const;
- int operator!= (const ACE_Thread_ID &) const;
-
-private:
- ACE_thread_t thread_id_;
- // Identify the thread.
-
- ACE_hthread_t thread_handle_;
- // Handle to the thread (typically used to "wait" on Win32).
-};
-
-// Type of the extended signal handler.
-typedef void (*ACE_Sig_Handler_Ex) (int, siginfo_t *siginfo, ucontext_t *ucontext);
-
-// If the xti.h file redefines the function names, do it now, else
-// when the functigon definitions are encountered, they won't match the
-// declaration here.
-
-# if defined (ACE_REDEFINES_XTI_FUNCTIONS)
-# include /**/ <xti.h>
-# if defined (UNIXWARE_2_0) /* They apparantly forgot one... */
-extern "C" int _xti_error(char *);
-# endif /* UNIXWARE */
-# endif /* ACE_REDEFINES_XTI_FUNCTIONS */
-
-// = The ACE_Sched_Priority type should be used for platform-
-// independent thread and process priorities, by convention.
-// int should be used for OS-specific priorities.
-typedef int ACE_Sched_Priority;
-
-// forward declaration
-class ACE_Sched_Params;
-
-# if defined (ACE_LACKS_FILELOCKS)
-# if ! defined (VXWORKS) && ! defined (ACE_PSOS)
-// VxWorks defines struct flock in sys/fcntlcom.h. But it doesn't
-// appear to support flock ().
-struct flock
-{
- short l_type;
- short l_whence;
- off_t l_start;
- off_t l_len; /* len == 0 means until end of file */
- long l_sysid;
- pid_t l_pid;
- long l_pad[4]; /* reserve area */
-};
-# endif /* ! VXWORKS */
-# endif /* ACE_LACKS_FILELOCKS */
-
-# if !defined (ACE_HAS_IP_MULTICAST) && defined (ACE_LACKS_IP_ADD_MEMBERSHIP)
- // Even if ACE_HAS_IP_MULTICAST is not defined, if IP_ADD_MEMBERSHIP
- // is defined, assume that the ip_mreq struct is also defined
- // (presumably in netinet/in.h).
- struct ip_mreq
- {
- struct in_addr imr_multiaddr;
- // IP multicast address of group
- struct in_addr imr_interface;
- // local IP address of interface
- };
-# endif /* ! ACE_HAS_IP_MULTICAST && ACE_LACKS_IP_ADD_MEMBERSHIP */
-
-# if !defined (ACE_HAS_STRBUF_T)
-struct strbuf
-{
- int maxlen; // no. of bytes in buffer.
- int len; // no. of bytes returned.
- void *buf; // pointer to data.
-};
-# endif /* ACE_HAS_STRBUF_T */
-
-class ACE_Export ACE_Str_Buf : public strbuf
-{
- // = TITLE
- // Simple wrapper for STREAM pipes strbuf.
-public:
- // = Initialization method
- ACE_Str_Buf (void *b = 0, int l = 0, int max = 0);
- // Constructor.
-
- ACE_Str_Buf (strbuf &);
- // Constructor.
-};
-
-# if defined (ACE_HAS_BROKEN_BITSHIFT)
- // This might not be necessary any more: it was added prior to the
- // (fd_mask) cast being added to the version below. Maybe that cast
- // will fix the problem on tandems. Fri Dec 12 1997 David L. Levine
-# define ACE_MSB_MASK (~(ACE_UINT32 (1) << ACE_UINT32 (NFDBITS - 1)))
-# else
- // This needs to go here to avoid overflow problems on some compilers.
-# if defined (ACE_WIN32)
- // Does ACE_WIN32 have an fd_mask?
-# define ACE_MSB_MASK (~(1 << (NFDBITS - 1)))
-# else /* ! ACE_WIN32 */
-# define ACE_MSB_MASK (~((fd_mask) 1 << (NFDBITS - 1)))
-# endif /* ! ACE_WIN32 */
-# endif /* ACE_HAS_BROKEN_BITSHIFT */
-
-// Signature for registering a cleanup function that is used by the
-// <ACE_Object_Manager> and the <ACE_Thread_Manager>.
-# if defined (ACE_HAS_SIG_C_FUNC)
-extern "C" {
-# endif /* ACE_HAS_SIG_C_FUNC */
-typedef void (*ACE_CLEANUP_FUNC)(void *object, void *param) /* throw () */;
-# if defined (ACE_HAS_SIG_C_FUNC)
-}
-# endif /* ACE_HAS_SIG_C_FUNC */
-
-# if defined (ACE_WIN32)
-// Default WIN32 structured exception handler.
-int ACE_SEH_Default_Exception_Selector (void *);
-int ACE_SEH_Default_Exception_Handler (void *);
-# endif /* ACE_WIN32 */
-
-class ACE_Export ACE_Cleanup
-{
- // = TITLE
- // Base class for objects that are cleaned by ACE_Object_Manager.
-public:
- ACE_Cleanup (void);
- // No-op constructor.
-
- virtual ~ACE_Cleanup (void);
- // Destructor.
-
- virtual void cleanup (void *param = 0);
- // Cleanup method that, by default, simply deletes itself.
-};
-
-// Adapter for cleanup, used by ACE_Object_Manager.
-extern "C" ACE_Export
-void ace_cleanup_destroyer (ACE_Cleanup *, void *param = 0);
-
-class ACE_Export ACE_Cleanup_Info
-{
- // = TITLE
- // Hold cleanup information for thread/process
-public:
- ACE_Cleanup_Info (void);
- // Default constructor.
-
- int operator== (const ACE_Cleanup_Info &o) const;
- // Equality operator.
-
- int operator!= (const ACE_Cleanup_Info &o) const;
- // Inequality operator.
-
- void *object_;
- // Point to object that gets passed into the <cleanup_hook_>.
-
- ACE_CLEANUP_FUNC cleanup_hook_;
- // Cleanup hook that gets called back.
-
- void *param_;
- // Parameter passed to the <cleanup_hook_>.
-};
-
-class ACE_Cleanup_Info_Node;
-
-class ACE_Export ACE_OS_Exit_Info
-{
- // = TITLE
- // Hold Object Manager cleanup (exit) information.
- //
- // = DESCRIPTION
- // For internal use by the ACE library, only.
-public:
- ACE_OS_Exit_Info (void);
- // Default constructor.
-
- ~ACE_OS_Exit_Info (void);
- // Destructor.
-
- int at_exit_i (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param);
- // Use to register a cleanup hook.
-
- int find (void *object);
- // Look for a registered cleanup hook object. Returns 1 if already
- // registered, 0 if not.
-
- void call_hooks ();
- // Call all registered cleanup hooks, in reverse order of
- // registration.
-
-private:
- ACE_Cleanup_Info_Node *registered_objects_;
- // Keeps track of all registered objects. The last node is only
- // used to terminate the list (it doesn't contain a valid
- // ACE_Cleanup_Info).
-};
-
-// Run the thread entry point for the <ACE_Thread_Adapter>. This must
-// be an extern "C" to make certain compilers happy...
-#if defined (ACE_PSOS)
-extern "C" void ace_thread_adapter (unsigned long args);
-#else /* ! defined (ACE_PSOS) */
-extern "C" ACE_Export void *ace_thread_adapter (void *args);
-#endif /* ACE_PSOS */
-
-class ACE_OS_Thread_Descriptor
-{
- // = TITLE
- // Parent class of all ACE_Thread_Descriptor classes.
- //
- // =
- // Container for ACE_Thread_Descriptor members that are
- // used in ACE_OS.
-public:
- long flags (void) const;
- // Get the thread creation flags.
-
-protected:
- ACE_OS_Thread_Descriptor (long flags = 0);
- // For use by ACE_Thread_Descriptor.
-
- long flags_;
- // Keeps track of whether this thread was created "detached" or not.
- // If a thread is *not* created detached then if someone calls
- // <ACE_Thread_Manager::wait>, we need to join with that thread (and
- // close down the handle).
-};
-
-// Forward decl.
-class ACE_Thread_Manager;
-class ACE_Thread_Descriptor;
-
-class ACE_Export ACE_Thread_Adapter
-{
- // = TITLE
- // Converts a C++ function into a function <ace_thread_adapter>
- // function that can be called from a thread creation routine
- // (e.g., <pthread_create> or <_beginthreadex>) that expects an
- // extern "C" entry point. This class also makes it possible to
- // transparently provide hooks to register a thread with an
- // <ACE_Thread_Manager>.
- //
- // = DESCRIPTION
- // This class is used in <ACE_OS::thr_create>. In general, the
- // thread that creates an object of this class is different from
- // the thread that calls <invoke> on this object. Therefore,
- // the <invoke> method is responsible for deleting itself.
-public:
- ACE_Thread_Adapter (ACE_THR_FUNC user_func,
- void *arg,
- ACE_THR_C_FUNC entry_point = (ACE_THR_C_FUNC) ace_thread_adapter,
- ACE_Thread_Manager *thr_mgr = 0,
- ACE_Thread_Descriptor *td = 0
-# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- , ACE_SEH_EXCEPT_HANDLER selector = 0,
- ACE_SEH_EXCEPT_HANDLER handler = 0
-# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
- );
- // Constructor.
-
- void *invoke (void);
- // Execute the <user_func_> with the <arg>. This function deletes
- // <this>, thereby rendering the object useless after the call
- // returns.
-
- ACE_Thread_Manager *thr_mgr (void);
- // Accessor for the optional <Thread_Manager>.
-
- ACE_THR_C_FUNC entry_point (void);
- // Accessor for the C entry point function to the OS thread creation
- // routine.
-
-private:
- ~ACE_Thread_Adapter (void);
- // Ensure that this object must be allocated on the heap.
-
- void inherit_log_msg (void);
- // Inherit the logging features if the parent thread has an
- // <ACE_Log_Msg>.
-
- ACE_THR_FUNC user_func_;
- // Thread startup function passed in by the user (C++ linkage).
-
- void *arg_;
- // Argument to thread startup function.
-
- ACE_THR_C_FUNC entry_point_;
- // Entry point to the underlying OS thread creation call (C
- // linkage).
-
- ACE_Thread_Manager *thr_mgr_;
- // Optional thread manager.
-
- ACE_OS_Thread_Descriptor *thr_desc_;
- // Optional thread descriptor. Passing this pointer in will force
- // the spawned thread to cache this location in <Log_Msg> and wait
- // until <Thread_Manager> fills in all information in thread
- // descriptor.
-
-# if !defined (ACE_THREADS_DONT_INHERIT_LOG_MSG)
- ACE_OSTREAM_TYPE *ostream_;
- // Ostream where the new TSS Log_Msg will use.
-
- u_long priority_mask_;
- // Priority_mask to be used in new TSS Log_Msg.
-
- int tracing_enabled_;
- // Are we allowing tracing in this thread?
-
- int restart_;
- // Indicates whether we should restart system calls that are
- // interrupted.
-
- int trace_depth_;
- // Depth of the nesting for printing traces.
-
-# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- ACE_SEH_EXCEPT_HANDLER seh_except_selector_;
- ACE_SEH_EXCEPT_HANDLER seh_except_handler_;
-# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-# endif /* ACE_THREADS_DONT_INHERIT_LOG_MSG */
-
- friend class ACE_Thread_Adapter_Has_Private_Destructor;
- // Friend declaration to avoid compiler warning: only defines a private
- // destructor and has no friends.
-};
-
-class ACE_Export ACE_Thread_Hook
-{
- // = TITLE
- // This class makes it possible to provide user-defined "start"
- // hooks that are called before the thread entry point function
- // is invoked.
-
-public:
- virtual void *start (ACE_THR_FUNC func,
- void *arg);
- // This method can be overridden in a subclass to customize this
- // pre-function call "hook" invocation that can perform
- // initialization processing before the thread entry point <func>
- // method is called back. The <func> and <arg> passed into the
- // start hook are the same as those passed by the application that
- // spawned the thread.
-
- static ACE_Thread_Hook *thread_hook (ACE_Thread_Hook *hook);
- // sets the system wide thread hook, returns the previous thread
- // hook or 0 if none is set.
-
- static ACE_Thread_Hook *thread_hook (void);
- // Returns the current system thread hook.
-};
-
-class ACE_Export ACE_Thread_Control
-{
- // = TITLE
- // Used to keep track of a thread's activities within its entry
- // point function.
- //
- // = DESCRIPTION
- // A <ACE_Thread_Manager> uses this class to ensure that threads
- // it spawns automatically register and unregister themselves
- // with it.
- //
- // This class can be stored in thread-specific storage using the
- // <ACE_TSS> wrapper. When a thread exits the
- // <ACE_TSS::cleanup> function deletes this object, thereby
- // ensuring that it gets removed from its associated
- // <ACE_Thread_Manager>.
-public:
- ACE_Thread_Control (ACE_Thread_Manager *tm = 0,
- int insert = 0);
- // Initialize the thread control object. If <insert> != 0, then
- // register the thread with the Thread_Manager.
-
- ~ACE_Thread_Control (void);
- // Remove the thread from its associated <Thread_Manager> and exit
- // the thread if <do_thr_exit> is enabled.
-
- void *exit (void *status,
- int do_thr_exit);
- // Remove this thread from its associated <Thread_Manager> and exit
- // the thread if <do_thr_exit> is enabled.
-
- int insert (ACE_Thread_Manager *tm, int insert = 0);
- // Store the <Thread_Manager> and use it to register ourselves for
- // correct shutdown.
-
- ACE_Thread_Manager *thr_mgr (void);
- // Returns the current <Thread_Manager>.
-
- ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *);
- // Atomically set a new <Thread_Manager> and return the old
- // <Thread_Manager>.
-
- void *status (void *status);
- // Set the exit status (and return existing status).
-
- void *status (void);
- // Get the current exit status.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Thread_Manager *tm_;
- // Pointer to the thread manager for this block of code.
-
- void *status_;
- // Keeps track of the exit status for the thread.
-};
-
-class ACE_Export ACE_Thread_Exit
-{
- // = TITLE
- // Keep exit information for a Thread in thread specific storage.
- // so that the thread-specific exit hooks will get called no
- // matter how the thread exits (e.g., via <ACE_Thread::exit>, C++
- // or Win32 exception, "falling off the end" of the thread entry
- // point function, etc.).
- //
- // = DESCRIPTION
- // This clever little helper class is stored in thread-specific
- // storage using the <ACE_TSS> wrapper. When a thread exits the
- // <ACE_TSS::cleanup> function deletes this object, thereby
- // closing it down gracefully.
-public:
- ACE_Thread_Exit (void);
- // Capture the Thread that will be cleaned up automatically.
-
- void thr_mgr (ACE_Thread_Manager *tm);
- // Set the <ACE_Thread_Manager>.
-
- ~ACE_Thread_Exit (void);
- // Destructor calls the thread-specific exit hooks when a thread
- // exits.
-
- static ACE_Thread_Exit *instance (void);
- // Singleton access point.
-
- static void cleanup (void *instance, void *);
- // Cleanup method, used by the <ACE_Object_Manager> to destroy the
- // singleton.
-
-private:
- ACE_Thread_Control thread_control_;
- // Automatically add/remove the thread from the
- // <ACE_Thread_Manager>.
-
- static u_int is_constructed_;
- // Used to detect whether we should create a new instance (or not)
- // within the instance method -- we don't trust the instance_ ptr
- // because the destructor may have run (if ACE::fini() was called).
- // See bug #526.
- // We don't follow the singleton pattern due to dependency issues.
-};
-
-# if defined (ACE_HAS_PHARLAP_RT)
-#define ACE_IPPROTO_TCP SOL_SOCKET
-# else
-#define ACE_IPPROTO_TCP IPPROTO_TCP
-# endif /* ACE_HAS_PHARLAP_RT */
-
-# if defined (ACE_LACKS_FLOATING_POINT)
-typedef ACE_UINT32 ACE_timer_t;
-# else
-typedef double ACE_timer_t;
-# endif /* ACE_LACKS_FLOATING_POINT */
-
-# if defined (ACE_HAS_PRUSAGE_T)
- typedef prusage_t ACE_Rusage;
-# elif defined (ACE_HAS_GETRUSAGE)
- typedef rusage ACE_Rusage;
-# else
- typedef int ACE_Rusage;
-# endif /* ACE_HAS_PRUSAGE_T */
-
-#if defined (ACE_HAS_SYS_FILIO_H)
-# include /**/ <sys/filio.h>
-#endif /* ACE_HAS_SYS_FILIO_H */
-
-# if defined (ACE_WIN32)
- // = typedef for the _stat data structure
- typedef struct _stat ACE_stat;
-# else
- typedef struct stat ACE_stat;
-# endif /* ACE_WIN32 */
-
-// We need this for MVS...
-extern "C" {
- typedef int (*ACE_COMPARE_FUNC)(const void *, const void *);
-}
-
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-#if defined (ACE_HAS_WINSOCK2_GQOS)
-typedef SERVICETYPE ACE_SERVICE_TYPE;
-#else
-typedef u_long ACE_SERVICE_TYPE;
-#endif /* ACE_HAS_WINSOCK2_GQOS */
-typedef GROUP ACE_SOCK_GROUP;
-typedef WSAPROTOCOL_INFO ACE_Protocol_Info;
-#define ACE_OVERLAPPED_SOCKET_FLAG WSA_FLAG_OVERLAPPED
-
-#define ACE_XP1_QOS_SUPPORTED XP1_QOS_SUPPORTED
-#define ACE_XP1_SUPPORT_MULTIPOINT XP1_SUPPORT_MULTIPOINT
-
-#define ACE_BASEERR WSABASEERR
-#define ACE_ENOBUFS WSAENOBUFS
-#define ACE_FROM_PROTOCOL_INFO FROM_PROTOCOL_INFO
-#define ACE_FLAG_MULTIPOINT_C_ROOT WSA_FLAG_MULTIPOINT_C_ROOT
-#define ACE_FLAG_MULTIPOINT_C_LEAF WSA_FLAG_MULTIPOINT_C_LEAF
-#define ACE_FLAG_MULTIPOINT_D_ROOT WSA_FLAG_MULTIPOINT_D_ROOT
-#define ACE_FLAG_MULTIPOINT_D_LEAF WSA_FLAG_MULTIPOINT_D_LEAF
-
-#define ACE_QOS_NOT_SPECIFIED QOS_NOT_SPECIFIED
-#define ACE_SERVICETYPE_NOTRAFFIC SERVICETYPE_NOTRAFFIC
-#define ACE_SERVICETYPE_CONTROLLEDLOAD SERVICETYPE_CONTROLLEDLOAD
-#define ACE_SERVICETYPE_GUARANTEED SERVICETYPE_GUARANTEED
-
-#define ACE_JL_SENDER_ONLY JL_SENDER_ONLY
-#define ACE_JL_BOTH JL_BOTH
-
-#define ACE_SIO_GET_QOS SIO_GET_QOS
-#define ACE_SIO_MULTIPOINT_LOOPBACK SIO_MULTIPOINT_LOOPBACK
-#define ACE_SIO_MULTICAST_SCOPE SIO_MULTICAST_SCOPE
-#define ACE_SIO_SET_QOS SIO_SET_QOS
-
-#else
-typedef u_long ACE_SERVICE_TYPE;
-typedef u_long ACE_SOCK_GROUP;
-struct ACE_Protocol_Info
-{
- u_long dwServiceFlags1;
- int iAddressFamily;
- int iProtocol;
- char szProtocol[255+1];
-};
-#define ACE_OVERLAPPED_SOCKET_FLAG 0
-
-#define ACE_XP1_QOS_SUPPORTED 0x00002000
-#define ACE_XP1_SUPPORT_MULTIPOINT 0x00000400
-
-#define ACE_BASEERR 10000
-#define ACE_ENOBUFS (ACE_BASEERR+55)
-
-#define ACE_FROM_PROTOCOL_INFO (-1)
-
-#define ACE_FLAG_MULTIPOINT_C_ROOT 0x02
-#define ACE_FLAG_MULTIPOINT_C_LEAF 0x04
-#define ACE_FLAG_MULTIPOINT_D_ROOT 0x08
-#define ACE_FLAG_MULTIPOINT_D_LEAF 0x10
-
-#define ACE_QOS_NOT_SPECIFIED 0xFFFFFFFF
-#define ACE_SERVICETYPE_NOTRAFFIC 0x00000000 // No data in this direction.
-#define ACE_SERVICETYPE_CONTROLLEDLOAD 0x00000002 // Controlled Load.
-#define ACE_SERVICETYPE_GUARANTEED 0x00000003 // Guaranteed.
-
-#define ACE_JL_SENDER_ONLY 0x01
-#define ACE_JL_BOTH 0x04
-
-#define ACE_SIO_GET_QOS (0x40000000 | 0x08000000 | 7)
-#define ACE_SIO_MULTIPOINT_LOOPBACK (0x08000000 | 9)
-#define ACE_SIO_MULTICAST_SCOPE (0x08000000 | 10)
-#define ACE_SIO_SET_QOS (0x08000000 | 11)
-
-#endif /* ACE_HAS_WINSOCK2 && ACE_HAS_WINSOCK2 != 0 */
-
-class ACE_Export ACE_Flow_Spec
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- : public FLOWSPEC
-#endif /* ACE_HAS_WINSOCK2 */
-{
- // = TITLE
- // Wrapper class that defines the flow spec QoS information, which
- // is used by IntServ (RSVP) and DiffServ.
-public:
- // = Initialization methods.
- ACE_Flow_Spec (void);
- // Default constructor.
-
- ACE_Flow_Spec (u_long token_rate,
- u_long token_bucket_size,
- u_long peak_bandwidth,
- u_long latency,
- u_long delay_variation,
- ACE_SERVICE_TYPE service_type,
- u_long max_sdu_size,
- u_long minimum_policed_size,
- int ttl,
- int priority);
- // Constructor that initializes all the fields.
-
- // = Get/set the token rate in bytes/sec.
- u_long token_rate (void) const;
- void token_rate (u_long tr);
-
- // = Get/set the token bucket size in bytes.
- u_long token_bucket_size (void) const;
- void token_bucket_size (u_long tbs);
-
- // = Get/set the PeakBandwidth in bytes/sec.
- u_long peak_bandwidth (void) const;
- void peak_bandwidth (u_long pb);
-
- // = Get/set the latency in microseconds.
- u_long latency (void) const;
- void latency (u_long l);
-
- // = Get/set the delay variation in microseconds.
- u_long delay_variation (void) const;
- void delay_variation (u_long dv);
-
- // = Get/set the service type.
- ACE_SERVICE_TYPE service_type (void) const;
- void service_type (ACE_SERVICE_TYPE st);
-
- // = Get/set the maximum SDU size in bytes.
- u_long max_sdu_size (void) const;
- void max_sdu_size (u_long mss);
-
- // = Get/set the minimum policed size in bytes.
- u_long minimum_policed_size (void) const;
- void minimum_policed_size (u_long mps);
-
- // = Get/set the time-to-live.
- int ttl (void) const;
- void ttl (int t);
-
- // = Get/set the priority.
- int priority (void) const;
- void priority (int p);
-
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
-#else
-private:
- u_long token_rate_;
- u_long token_bucket_size_;
- u_long peak_bandwidth_;
- u_long latency_;
- u_long delay_variation_;
- ACE_SERVICE_TYPE service_type_;
- u_long max_sdu_size_;
- u_long minimum_policed_size_;
- int ttl_;
- int priority_;
-#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS) */
-};
-
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-class ACE_Export ACE_QoS : public QOS
-#else
-class ACE_Export ACE_QoS
-#endif /* ACE_HAS_WINSOCK2 */
-{
- // = TITLE
- // Wrapper class that holds the sender and receiver flow spec
- // information, which is used by IntServ (RSVP) and DiffServ.
-public:
- // = Get/set the flow spec for data sending.
- ACE_Flow_Spec sending_flowspec (void) const;
- void sending_flowspec (const ACE_Flow_Spec &fs);
-
- // = Get/set the flow spec for data receiving.
- ACE_Flow_Spec receiving_flowspec (void) const;
- void receiving_flowspec (const ACE_Flow_Spec &fs);
-
- // = Get/set the provider specific information.
- iovec provider_specific (void) const;
- void provider_specific (const iovec &ps);
-
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-#else
-private:
-
- ACE_Flow_Spec sending_flowspec_;
- ACE_Flow_Spec receiving_flowspec_;
-#endif
-
-};
-
-class ACE_Export ACE_QoS_Params
-{
- // = TITLE
- // Wrapper class that simplifies the information passed to the QoS
- // enabled <ACE_OS::connect> and <ACE_OS::join_leaf> methods.
-public:
- ACE_QoS_Params (iovec *caller_data = 0,
- iovec *callee_data = 0,
- ACE_QoS *socket_qos = 0,
- ACE_QoS *group_socket_qos = 0,
- u_long flags = 0);
- // Initialize the data members. The <caller_data> is a pointer to
- // the user data that is to be transferred to the peer during
- // connection establishment. The <callee_data> is a pointer to the
- // user data that is to be transferred back from the peer during
- // connection establishment. The_<socket_qos> is a pointer to the
- // flow specifications for the socket, one for each direction. The
- // <group_socket_qos> is a pointer to the flow speicfications for
- // the socket group, if applicable. The_<flags> indicate if we're a
- // sender, receiver, or both.
-
- // = Get/set caller data.
- iovec *caller_data (void) const;
- void caller_data (iovec *);
-
- // = Get/set callee data.
- iovec *callee_data (void) const;
- void callee_data (iovec *);
-
- // = Get/set socket qos.
- ACE_QoS *socket_qos (void) const;
- void socket_qos (ACE_QoS *);
-
- // = Get/set group socket qos.
- ACE_QoS *group_socket_qos (void) const;
- void group_socket_qos (ACE_QoS *);
-
- // = Get/set flags.
- u_long flags (void) const;
- void flags (u_long);
-
-private:
- iovec *caller_data_;
- // A pointer to the user data that is to be transferred to the peer
- // during connection establishment.
-
- iovec *callee_data_;
- // A pointer to the user data that is to be transferred back from
- // the peer during connection establishment.
-
- ACE_QoS *socket_qos_;
- // A pointer to the flow speicfications for the socket, one for each
- // direction.
-
- ACE_QoS *group_socket_qos_;
- // A pointer to the flow speicfications for the socket group, if
- // applicable.
-
- u_long flags_;
- // Flags that indicate if we're a sender, receiver, or both.
-};
-
-// Callback function that's used by the QoS-enabled <ACE_OS::accept>
-// method.
-typedef int (*ACE_QOS_CONDITION_FUNC) (iovec *caller_id,
- iovec *caller_data,
- ACE_QoS *socket_qos,
- ACE_QoS *group_socket_qos,
- iovec *callee_id,
- iovec *callee_data,
- ACE_SOCK_GROUP *g,
- u_long callbackdata);
-
-// Callback function that's used by the QoS-enabled <ACE_OS::ioctl>
-// method.
-#if defined(ACE_HAS_WINSOCK2) && ACE_HAS_WINSOCK2 != 0
-typedef LPWSAOVERLAPPED_COMPLETION_ROUTINE ACE_OVERLAPPED_COMPLETION_FUNC;
-#else
-typedef void (*ACE_OVERLAPPED_COMPLETION_FUNC) (u_long error,
- u_long bytes_transferred,
- ACE_OVERLAPPED *overlapped,
- u_long flags);
-#endif /* ACE_HAS_WINSOCK2 != 0 */
-
-class ACE_Export ACE_Accept_QoS_Params
-{
- // = TITLE
- // Wrapper class that simplifies the information passed to the QoS
- // enabled <ACE_OS::accept> method.
-public:
- ACE_Accept_QoS_Params (ACE_QOS_CONDITION_FUNC qos_condition_callback = 0,
- u_long callback_data = 0);
- // Initialize the data members. The <qos_condition_callback> is the
- // address of an optional, application-supplied condition function
- // that will make an accept/reject decision based on the caller
- // information pass in as parameters, and optionally create or join
- // a socket group by assinging an appropriate value to the result
- // parameter <g> of this function. The <callback_data> data is
- // passed back to the application as a condition function parameter,
- // i.e., it is an Asynchronous Completion Token (ACT).
-
- // = Get/set QoS condition callback.
- ACE_QOS_CONDITION_FUNC qos_condition_callback (void) const;
- void qos_condition_callback (ACE_QOS_CONDITION_FUNC qcc);
-
- // = Get/Set callback data.
- u_long callback_data (void) const;
- void callback_data (u_long cd);
-
-private:
- ACE_QOS_CONDITION_FUNC qos_condition_callback_;
- // This is the address of an optional, application-supplied
- // condition function that will make an accept/reject decision based
- // on the caller information pass in as parameters, and optionally
- // create or join a socket group by assinging an appropriate value
- // to the result parameter <g> of this function.
-
- u_long callback_data_;
- // This data is passed back to the application as a condition
- // function parameter, i.e., it is an Asynchronous Completion Token
- // (ACT).
-};
-
-class ACE_Export ACE_OS : public ACE_OS_Dirent
-{
- // = TITLE
- // This class defines an OS independent programming API that
- // shields developers from nonportable aspects of writing
- // efficient system programs on Win32, POSIX and other versions
- // of UNIX, and various real-time operating systems.
- //
- // = DESCRIPTION
- // This class encapsulates the differences between various OS
- // platforms. When porting ACE to a new platform, this class is
- // the place to focus on. Once this file is ported to a new
- // platform, pretty much everything else comes for "free." See
- // <www.cs.wustl.edu/~schmidt/ACE_wrappers/etc/ACE-porting.html>
- // for instructions on porting ACE. Please see the README file
- // in this directory for complete information on the meaning of
- // the various macros.
-
- ACE_CLASS_IS_NAMESPACE (ACE_OS);
-public:
-
-# if defined (CHORUS) && !defined (CHORUS_4)
- // We must format this code as follows to avoid confusing OSE.
- enum ACE_HRTimer_Op
- {
- ACE_HRTIMER_START = K_BSTART,
- ACE_HRTIMER_INCR = K_BPOINT,
- ACE_HRTIMER_STOP = K_BSTOP,
- ACE_HRTIMER_GETTIME = 0xFFFF
- };
-# else /* ! CHORUS */
- enum ACE_HRTimer_Op
- {
- ACE_HRTIMER_START = 0x0, // Only use these if you can stand
- ACE_HRTIMER_INCR = 0x1, // for interrupts to be disabled during
- ACE_HRTIMER_STOP = 0x2, // the timed interval!!!!
- ACE_HRTIMER_GETTIME = 0xFFFF
- };
-# endif /* ! CHORUS */
-
- class ace_flock_t
- {
- // = TITLE
- // OS file locking structure.
- public:
- void dump (void) const;
- // Dump state of the object.
-
-# if defined (ACE_WIN32)
- ACE_OVERLAPPED overlapped_;
-# else
- struct flock lock_;
-# endif /* ACE_WIN32 */
-
- const ACE_TCHAR *lockname_;
- // Name of this filelock.
-
- ACE_HANDLE handle_;
- // Handle to the underlying file.
-
-# if defined (CHORUS)
- ACE_mutex_t *process_lock_;
- // This is the mutex that's stored in shared memory. It can only
- // be destroyed by the actor that initialized it.
-# endif /* CHORUS */
- };
-
-# if defined (ACE_WIN32)
- // = Default Win32 Security Attributes definition.
- static LPSECURITY_ATTRIBUTES default_win32_security_attributes (LPSECURITY_ATTRIBUTES);
-
- // = Win32 OS version determination function.
- static const OSVERSIONINFO &get_win32_versioninfo (void);
- // Return the win32 OSVERSIONINFO structure.
-
-# endif /* ACE_WIN32 */
-
- // = A set of wrappers for miscellaneous operations.
- static int atoi (const ACE_TCHAR *s);
- static ACE_TCHAR *getenv (const ACE_TCHAR *symbol);
- static int putenv (const ACE_TCHAR *string);
- static ACE_TCHAR *strenvdup (const ACE_TCHAR *str);
- static ACE_TCHAR *getenvstrings (void);
-
- static int getopt (int argc,
- char *const *argv,
- const char *optstring);
- static int argv_to_string (ACE_TCHAR **argv,
- ACE_TCHAR *&buf,
- int substitute_env_args = 1);
- static int string_to_argv (ACE_TCHAR *buf,
- size_t &argc,
- ACE_TCHAR **&argv,
- int substitute_env_args = 1);
- static long sysconf (int);
-
- // = A set of wrappers for condition variables.
- static int condattr_init (ACE_condattr_t &attributes,
- int type = ACE_DEFAULT_SYNCH_TYPE);
- static int condattr_destroy (ACE_condattr_t &attributes);
- static int cond_broadcast (ACE_cond_t *cv);
- static int cond_destroy (ACE_cond_t *cv);
- static int cond_init (ACE_cond_t *cv,
- short type = ACE_DEFAULT_SYNCH_TYPE,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
- static int cond_init (ACE_cond_t *cv,
- ACE_condattr_t &attributes,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
- static int cond_signal (ACE_cond_t *cv);
- static int cond_timedwait (ACE_cond_t *cv,
- ACE_mutex_t *m,
- ACE_Time_Value *);
- static int cond_wait (ACE_cond_t *cv,
- ACE_mutex_t *m);
-# if defined (ACE_WIN32) && defined (ACE_HAS_WTHREADS)
- static int cond_timedwait (ACE_cond_t *cv,
- ACE_thread_mutex_t *m,
- ACE_Time_Value *);
- static int cond_wait (ACE_cond_t *cv,
- ACE_thread_mutex_t *m);
-# endif /* ACE_WIN32 && ACE_HAS_WTHREADS */
-
- // = A set of wrappers for determining config info.
- static ACE_TCHAR *cuserid (ACE_TCHAR *user,
- size_t maxlen = 32);
- static int uname (struct utsname *name);
- static long sysinfo (int cmd,
- char *buf,
- long count);
- static int hostname (ACE_TCHAR *name,
- size_t maxnamelen);
-
- // = A set of wrappers for explicit dynamic linking.
- static int dlclose (ACE_SHLIB_HANDLE handle);
-
- static ACE_TCHAR *dlerror (void);
- static ACE_SHLIB_HANDLE dlopen (const ACE_TCHAR *filename,
- int mode = ACE_DEFAULT_SHLIB_MODE);
- static void *dlsym (ACE_SHLIB_HANDLE handle,
- const ACE_TCHAR *symbol);
-
- // = A set of wrappers for stdio file operations.
- static int last_error (void);
- static void last_error (int);
- static int set_errno_to_last_error (void);
- static int set_errno_to_wsa_last_error (void);
- static int fclose (FILE *fp);
- static int fcntl (ACE_HANDLE handle,
- int cmd,
- long arg = 0);
- static int fdetach (const char *file);
-
- static int fsync (ACE_HANDLE handle);
-
- static FILE *fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode);
-# if defined (fdopen)
-# undef fdopen
-# endif /* fdopen */
- static FILE *fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode);
- static ACE_TCHAR *fgets (ACE_TCHAR *buf, int size, FILE *fp);
- static int stat (const ACE_TCHAR *file, struct stat *);
- static int truncate (const ACE_TCHAR *filename, off_t length);
-
- static int fprintf (FILE *fp, const char *format, ...);
- static int sprintf (char *buf, const char *format, ...);
- static int vsprintf (char *buffer, const char *format, va_list argptr);
- static int printf (const char *format, ...);
-# if defined (ACE_HAS_WCHAR)
- static int sprintf (wchar_t *buf, const wchar_t *format, ...);
- static int fprintf (FILE *fp, const wchar_t *format, ...);
- static int vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr);
-# endif /* ACE_HAS_WCHAR */
-
- static void perror (const ACE_TCHAR *s);
-
-
- // The old gets () which directly maps to the evil, unprotected
- // gets () has been deprecated. If you really need gets (),
- // consider the following one.
-
- // A better gets ().
- // If n == 0, input is swallowed, but NULL is returned.
- // Otherwise, reads up to n-1 bytes (not including the newline),
- // then swallows rest up to newline
- // then swallows newline
- static char *gets (char *str, int n = 0);
- static int puts (const ACE_TCHAR *s);
- static int fputs (const ACE_TCHAR *s,
- FILE *stream);
-
- static int fflush (FILE *fp);
- static size_t fread (void *ptr,
- size_t size,
- size_t nelems,
- FILE *fp);
- static int fseek (FILE *fp,
- long offset,
- int ptrname);
- static int fstat (ACE_HANDLE,
- struct stat *);
- static int lstat (const char *,
- struct stat *);
- static int ftruncate (ACE_HANDLE,
- off_t);
- static size_t fwrite (const void *ptr,
- size_t size,
- size_t nitems,
- FILE *fp);
- static void rewind (FILE *fp);
-
- // = Wrappers for searching and sorting.
- static void *bsearch (const void *key,
- const void *base,
- size_t nel,
- size_t size,
- ACE_COMPARE_FUNC);
- static void qsort (void *base,
- size_t nel,
- size_t width,
- ACE_COMPARE_FUNC);
-
- // = A set of wrappers for file locks.
- static int flock_init (ACE_OS::ace_flock_t *lock,
- int flags = 0,
- const ACE_TCHAR *name = 0,
- mode_t perms = 0);
- static int flock_destroy (ACE_OS::ace_flock_t *lock,
- int unlink_file = 1);
-# if defined (ACE_WIN32)
- static void adjust_flock_params (ACE_OS::ace_flock_t *lock,
- short whence,
- off_t &start,
- off_t &len);
-# endif /* ACE_WIN32 */
- static int flock_rdlock (ACE_OS::ace_flock_t *lock,
- short whence = 0,
- off_t start = 0,
- off_t len = 0);
- static int flock_tryrdlock (ACE_OS::ace_flock_t *lock,
- short whence = 0,
- off_t start = 0,
- off_t len = 0);
- static int flock_trywrlock (ACE_OS::ace_flock_t *lock,
- short whence = 0,
- off_t start = 0,
- off_t len = 0);
- static int flock_unlock (ACE_OS::ace_flock_t *lock,
- short whence = 0,
- off_t start = 0,
- off_t len = 0);
- static int flock_wrlock (ACE_OS::ace_flock_t *lock,
- short whence = 0,
- off_t start = 0,
- off_t len = 0);
-
- // = A set of wrappers for low-level process operations.
- static int atexit (ACE_EXIT_HOOK func);
- static int execl (const char *path,
- const char *arg0, ...);
- static int execle (const char *path,
- const char *arg0, ...);
- static int execlp (const char *file,
- const char *arg0, ...);
- static int execv (const char *path,
- char *const argv[]);
- static int execvp (const char *file,
- char *const argv[]);
- static int execve (const char *path,
- char *const argv[],
- char *const envp[]);
- static void _exit (int status = 0);
- static void exit (int status = 0);
- static void abort (void);
- static pid_t fork (void);
- static pid_t fork (const ACE_TCHAR *program_name);
- static pid_t fork_exec (ACE_TCHAR *argv[]);
- // Forks and exec's a process in a manner that works on Solaris and
- // NT. argv[0] must be the full path name to the executable.
-
- static int getpagesize (void);
- static int allocation_granularity (void);
-
- static gid_t getgid (void);
- static int setgid (gid_t);
- static pid_t getpid (void);
- static pid_t getpgid (pid_t pid);
- static pid_t getppid (void);
- static uid_t getuid (void);
- static int setuid (uid_t);
- static pid_t setsid (void);
- static int setpgid (pid_t pid, pid_t pgid);
- static int setreuid (uid_t ruid, uid_t euid);
- static int setregid (gid_t rgid, gid_t egid);
- static int system (const ACE_TCHAR *s);
- static pid_t waitpid (pid_t pid,
- ACE_exitcode *status = 0,
- int wait_options = 0,
- ACE_HANDLE handle = 0);
- // Calls <::waitpid> on UNIX/POSIX platforms and <::await> on
- // Chorus. Does not work on Vxworks, or pSoS.
- // On Win32, <pid> is ignored if the <handle> is not equal to 0.
- // Passing the process <handle> is prefer on Win32 because using
- // <pid> to wait on the project doesn't always work correctly
- // if the waited process has already terminated.
- static pid_t wait (pid_t pid,
- ACE_exitcode *status,
- int wait_options = 0,
- ACE_HANDLE handle = 0);
- // Calls <::WaitForSingleObject> on Win32 and <ACE::waitpid>
- // otherwise. Returns the passed in <pid_t> on success and -1 on
- // failure.
- // On Win32, <pid> is ignored if the <handle> is not equal to 0.
- // Passing the process <handle> is prefer on Win32 because using
- // <pid> to wait on the project doesn't always work correctly
- // if the waited process has already terminated.
- static pid_t wait (int * = 0);
- // Calls OS <::wait> function, so it's only portable to UNIX/POSIX
- // platforms.
-
- // = A set of wrappers for timers and resource stats.
- static u_int alarm (u_int secs);
- static u_int ualarm (u_int usecs,
- u_int interval = 0);
- static u_int ualarm (const ACE_Time_Value &tv,
- const ACE_Time_Value &tv_interval = ACE_Time_Value::zero);
- static ACE_hrtime_t gethrtime (const ACE_HRTimer_Op = ACE_HRTIMER_GETTIME);
-# if defined (ACE_HAS_POWERPC_TIMER) && (defined (ghs) || defined (__GNUG__))
- static void readPPCTimeBase (u_long &most,
- u_long &least);
-# endif /* ACE_HAS_POWERPC_TIMER && (ghs or __GNUG__) */
- static int clock_gettime (clockid_t,
- struct timespec *);
- static ACE_Time_Value gettimeofday (void);
- static int getrusage (int who,
- struct rusage *rusage);
- static int getrlimit (int resource,
- struct rlimit *rl);
- static int setrlimit (int resource,
- ACE_SETRLIMIT_TYPE *rl);
- static int sleep (u_int seconds);
- static int sleep (const ACE_Time_Value &tv);
- static int nanosleep (const struct timespec *requested,
- struct timespec *remaining = 0);
-
-# if defined (ACE_HAS_BROKEN_R_ROUTINES)
-# undef ctime_r
-# undef asctime_r
-# undef rand_r
-# undef getpwnam_r
-# endif /* ACE_HAS_BROKEN_R_ROUTINES */
-
-# if defined (difftime)
-# define ACE_DIFFTIME(t1, t0) difftime(t1,t0)
-# undef difftime
-# endif /* difftime */
-
- // = A set of wrappers for operations on time.
-# if !defined (ACE_HAS_WINCE)
- static time_t mktime (struct tm *timeptr);
-# endif /* !ACE_HAS_WINCE */
-
- // wrapper for time zone information.
- static void tzset (void);
- static long timezone (void);
-
- static double difftime (time_t t1,
- time_t t0);
- static time_t time (time_t *tloc = 0);
- static struct tm *localtime (const time_t *clock);
- static struct tm *localtime_r (const time_t *clock,
- struct tm *res);
- static struct tm *gmtime (const time_t *clock);
- static struct tm *gmtime_r (const time_t *clock,
- struct tm *res);
- static char *asctime (const struct tm *tm);
- static char *asctime_r (const struct tm *tm,
- char *buf, int buflen);
- static ACE_TCHAR *ctime (const time_t *t);
- static ACE_TCHAR *ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen);
- static size_t strftime (char *s,
- size_t maxsize,
- const char *format,
- const struct tm *timeptr);
-
- // = A set of wrappers for memory managment.
- static void *sbrk (int brk);
- static void *calloc (size_t elements,
- size_t sizeof_elements);
- static void *malloc (size_t);
- static void *realloc (void *,
- size_t);
- static void free (void *);
-
- // = A set of wrappers for memory copying operations.
- static int memcmp (const void *t,
- const void *s,
- size_t len);
- static const void *memchr (const void *s,
- int c,
- size_t len);
- static void *memcpy (void *t,
- const void *s,
- size_t len);
- static void *memmove (void *t,
- const void *s,
- size_t len);
- static void *memset (void *s,
- int c,
- size_t len);
-
- // = A set of wrappers for System V message queues.
- static int msgctl (int msqid,
- int cmd,
- struct msqid_ds *);
- static int msgget (key_t key,
- int msgflg);
- static int msgrcv (int int_id,
- void *buf,
- size_t len,
- long type,
- int flags);
- static int msgsnd (int int_id,
- const void *buf,
- size_t len,
- int flags);
-
- // = A set of wrappers for memory mapped files.
- static int madvise (caddr_t addr,
- size_t len,
- int advice);
- static void *mmap (void *addr,
- size_t len,
- int prot,
- int flags,
- ACE_HANDLE handle,
- off_t off = 0,
- ACE_HANDLE *file_mapping = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- static int mprotect (void *addr,
- size_t len,
- int prot);
- static int msync (void *addr,
- size_t len,
- int sync);
- static int munmap (void *addr,
- size_t len);
-
- // = A set of wrappers for recursive mutex locks.
- static int recursive_mutex_init (ACE_recursive_thread_mutex_t *m,
- const ACE_TCHAR *name = 0,
- ACE_mutexattr_t *arg = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- static int recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m);
- static int recursive_mutex_lock (ACE_recursive_thread_mutex_t *m);
- static int recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m);
- static int recursive_mutex_unlock (ACE_recursive_thread_mutex_t *m);
-
- // = A set of wrappers for mutex locks.
- static int mutex_init (ACE_mutex_t *m,
- int type = ACE_DEFAULT_SYNCH_TYPE,
- const ACE_TCHAR *name = 0,
- ACE_mutexattr_t *arg = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- static int mutex_destroy (ACE_mutex_t *m);
- static int mutex_lock (ACE_mutex_t *m);
- // Win32 note: Abandoned mutexes are not treated differently. 0 is
- // returned since the calling thread does get the ownership.
- static int mutex_lock (ACE_mutex_t *m,
- int &abandoned);
- // This method is only implemented for Win32. For abandoned
- // mutexes, <abandoned> is set to 1 and 0 is returned.
- static int mutex_trylock (ACE_mutex_t *m);
- // Win32 note: Abandoned mutexes are not treated differently. 0 is
- // returned since the calling thread does get the ownership.
- static int mutex_trylock (ACE_mutex_t *m,
- int &abandoned);
- // This method is only implemented for Win32. For abandoned
- // mutexes, <abandoned> is set to 1 and 0 is returned.
- static int mutex_unlock (ACE_mutex_t *m);
-
- // = A set of wrappers for mutex locks that only work within a
- // single process.
- static int thread_mutex_init (ACE_thread_mutex_t *m,
- int type = ACE_DEFAULT_SYNCH_TYPE,
- const ACE_TCHAR *name = 0,
- ACE_mutexattr_t *arg = 0);
- static int thread_mutex_destroy (ACE_thread_mutex_t *m);
- static int thread_mutex_lock (ACE_thread_mutex_t *m);
- static int thread_mutex_trylock (ACE_thread_mutex_t *m);
- static int thread_mutex_unlock (ACE_thread_mutex_t *m);
-
- // = A set of wrappers for low-level file operations.
- static int access (const ACE_TCHAR *path, int amode);
- static int close (ACE_HANDLE handle);
- static ACE_HANDLE creat (const ACE_TCHAR *filename,
- mode_t mode);
- static ACE_HANDLE dup (ACE_HANDLE handle);
- static int dup2 (ACE_HANDLE oldfd,
- ACE_HANDLE newfd);
- static int fattach (int handle,
- const char *path);
- static long filesize (ACE_HANDLE handle);
- static long filesize (const ACE_TCHAR *handle);
- static int getmsg (ACE_HANDLE handle,
- struct strbuf *ctl,
- struct strbuf
- *data, int *flags);
- static int getpmsg (ACE_HANDLE handle,
- struct strbuf *ctl,
- struct strbuf
- *data,
- int *band,
- int *flags);
- static int ioctl (ACE_HANDLE handle,
- int cmd,
- void * = 0);
- // UNIX-style <ioctl>.
- static int ioctl (ACE_HANDLE socket,
- u_long io_control_code,
- void *in_buffer_p,
- u_long in_buffer,
- void *out_buffer_p,
- u_long out_buffer,
- u_long *bytes_returned,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func);
- // QoS-enabled <ioctl>.
- static int ioctl (ACE_HANDLE socket,
- u_long io_control_code,
- ACE_QoS &ace_qos,
- u_long *bytes_returned,
- void *buffer_p = 0,
- u_long buffer = 0,
- ACE_OVERLAPPED *overlapped = 0,
- ACE_OVERLAPPED_COMPLETION_FUNC func = 0);
- // QoS-enabled <ioctl> when the I/O control code is either SIO_SET_QOS
- // or SIO_GET_QOS.
- static int isastream (ACE_HANDLE handle);
- static int isatty (int handle);
-#if defined (ACE_WIN32)
- static int isatty (ACE_HANDLE handle);
-#endif /* ACE_WIN32 */
- static off_t lseek (ACE_HANDLE handle,
- off_t offset,
- int whence);
-#if defined (ACE_HAS_LLSEEK) || defined (ACE_HAS_LSEEK64)
- ACE_LOFF_T llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence);
-#endif /* ACE_HAS_LLSEEK */
- static ACE_HANDLE open (const ACE_TCHAR *filename,
- int mode,
- int perms = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- static int putmsg (ACE_HANDLE handle,
- const struct strbuf *ctl,
- const struct strbuf *data,
- int flags);
- static int putpmsg (ACE_HANDLE handle,
- const struct strbuf *ctl,
- const struct strbuf *data,
- int band,
- int flags);
- static ssize_t read (ACE_HANDLE handle,
- void *buf,
- size_t len);
- static ssize_t read (ACE_HANDLE handle,
- void *buf,
- size_t len,
- ACE_OVERLAPPED *);
- static ssize_t read_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- size_t *bytes_transferred = 0);
- // Receive <len> bytes into <buf> from <handle> (uses the
- // <ACE_OS::read> call, which uses the <read> system call on UNIX
- // and the <ReadFile> call on Win32). If errors occur, -1 is
- // returned. If EOF occurs, 0 is returned. Whatever data has been
- // transmitted will be returned to the caller through
- // <bytes_transferred>.
- static int readlink (const char *path,
- char *buf,
- size_t bufsiz);
- static ssize_t pread (ACE_HANDLE handle,
- void *buf,
- size_t nbyte,
- off_t offset);
- static int recvmsg (ACE_HANDLE handle,
- struct msghdr *msg,
- int flags);
- static int sendmsg (ACE_HANDLE handle,
- const struct msghdr *msg,
- int flags);
- static ssize_t write (ACE_HANDLE handle,
- const void *buf,
- size_t nbyte);
- static ssize_t write (ACE_HANDLE handle,
- const void *buf,
- size_t nbyte,
- ACE_OVERLAPPED *);
- static ssize_t write_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- size_t *bytes_transferred = 0);
- // Send <len> bytes from <buf> to <handle> (uses the <ACE_OS::write>
- // calls, which is uses the <write> system call on UNIX and the
- // <WriteFile> call on Win32). If errors occur, -1 is returned. If
- // EOF occurs, 0 is returned. Whatever data has been transmitted
- // will be returned to the caller through <bytes_transferred>.
- static ssize_t pwrite (ACE_HANDLE handle,
- const void *buf,
- size_t nbyte,
- off_t offset);
- static ssize_t readv (ACE_HANDLE handle,
- iovec *iov,
- int iovlen);
- static ssize_t writev (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt);
- static ssize_t recvv (ACE_HANDLE handle,
- iovec *iov,
- int iovlen);
- static ssize_t sendv (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt);
-
- // = A set of wrappers for event demultiplexing and IPC.
- static int select (int width,
- fd_set *rfds,
- fd_set *wfds,
- fd_set *efds,
- const ACE_Time_Value *tv = 0);
- static int select (int width,
- fd_set *rfds,
- fd_set *wfds,
- fd_set *efds,
- const ACE_Time_Value &tv);
- static int poll (struct pollfd *pollfds,
- u_long len,
- ACE_Time_Value *tv = 0);
- static int poll (struct pollfd *pollfds,
- u_long len,
- const ACE_Time_Value &tv);
- static int pipe (ACE_HANDLE handles[]);
-
- static ACE_HANDLE shm_open (const ACE_TCHAR *filename,
- int mode,
- int perms = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- static int shm_unlink (const ACE_TCHAR *path);
-
- // = A set of wrappers for directory operations.
- static mode_t umask (mode_t cmask);
- static int chdir (const ACE_TCHAR *path);
- static int mkdir (const ACE_TCHAR *path,
- mode_t mode = ACE_DEFAULT_DIR_PERMS);
- static int mkfifo (const ACE_TCHAR *file,
- mode_t mode = ACE_DEFAULT_FILE_PERMS);
- static ACE_TCHAR *mktemp (ACE_TCHAR *t);
- static ACE_TCHAR *getcwd (ACE_TCHAR *, size_t);
- static int rename (const ACE_TCHAR *old_name,
- const ACE_TCHAR *new_name);
- static int unlink (const ACE_TCHAR *path);
- static ACE_TCHAR *tempnam (const ACE_TCHAR *dir = 0,
- const ACE_TCHAR *pfx = 0);
-
- // = A set of wrappers for random number operations.
- static int rand (void);
- static int rand_r (ACE_RANDR_TYPE &seed);
- static void srand (u_int seed);
-
- // = A set of wrappers for readers/writer locks.
- static int rwlock_init (ACE_rwlock_t *rw,
- int type = ACE_DEFAULT_SYNCH_TYPE,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
- static int rwlock_destroy (ACE_rwlock_t *rw);
- static int rw_rdlock (ACE_rwlock_t *rw);
- static int rw_wrlock (ACE_rwlock_t *rw);
- static int rw_tryrdlock (ACE_rwlock_t *rw);
- static int rw_trywrlock (ACE_rwlock_t *rw);
- static int rw_trywrlock_upgrade (ACE_rwlock_t *rw);
- static int rw_unlock (ACE_rwlock_t *rw);
-
- // = A set of wrappers for auto-reset and manuaevents.
- static int event_init (ACE_event_t *event,
- int manual_reset = 0,
- int initial_state = 0,
- int type = ACE_DEFAULT_SYNCH_TYPE,
- const ACE_TCHAR *name = 0,
- void *arg = 0,
- LPSECURITY_ATTRIBUTES sa = 0);
- static int event_destroy (ACE_event_t *event);
- static int event_wait (ACE_event_t *event);
- static int event_timedwait (ACE_event_t *event,
- ACE_Time_Value *timeout);
- static int event_signal (ACE_event_t *event);
- static int event_pulse (ACE_event_t *event);
- static int event_reset (ACE_event_t *event);
-
- // = A set of wrappers for semaphores.
- static int sema_destroy (ACE_sema_t *s);
- static int sema_init (ACE_sema_t *s,
- u_int count,
- int type = ACE_DEFAULT_SYNCH_TYPE,
- const ACE_TCHAR *name = 0,
- void *arg = 0,
- int max = 0x7fffffff,
- LPSECURITY_ATTRIBUTES sa = 0);
- static int sema_post (ACE_sema_t *s);
- static int sema_post (ACE_sema_t *s,
- size_t release_count);
- static int sema_trywait (ACE_sema_t *s);
- static int sema_wait (ACE_sema_t *s);
- static int sema_wait (ACE_sema_t *s,
- ACE_Time_Value &tv);
-
- // = A set of wrappers for System V semaphores.
- static int semctl (int int_id,
- int semnum,
- int cmd,
- semun);
- static int semget (key_t key,
- int nsems,
- int flags);
- static int semop (int int_id,
- struct sembuf *sops,
- size_t nsops);
-
- // = Thread scheduler interface.
- static int sched_params (const ACE_Sched_Params &, ACE_id_t id = ACE_SELF);
- // Set scheduling parameters. An id of ACE_SELF indicates, e.g.,
- // set the parameters on the calling thread.
-
- // = A set of wrappers for System V shared memory.
- static void *shmat (int int_id,
- void *shmaddr,
- int shmflg);
- static int shmctl (int int_id,
- int cmd,
- struct shmid_ds *buf);
- static int shmdt (void *shmaddr);
- static int shmget (key_t key,
- int size,
- int flags);
-
- // = A set of wrappers for Signals.
- static int kill (pid_t pid,
- int signum);
- static int sigaction (int signum,
- const struct sigaction *nsa,
- struct sigaction *osa);
- static int sigaddset (sigset_t *s,
- int signum);
- static int sigdelset (sigset_t *s,
- int signum);
- static int sigemptyset (sigset_t *s);
- static int sigfillset (sigset_t *s);
- static int sigismember (sigset_t *s,
- int signum);
- static ACE_SignalHandler signal (int signum,
- ACE_SignalHandler);
- static int sigsuspend (const sigset_t *set);
- static int sigprocmask (int how,
- const sigset_t *nsp,
- sigset_t *osp);
-
- static int pthread_sigmask (int how,
- const sigset_t *nsp,
- sigset_t *osp);
-
- // = A set of wrappers for sockets.
- static ACE_HANDLE accept (ACE_HANDLE handle,
- struct sockaddr *addr,
- int *addrlen);
- // BSD-style <accept> (no QoS).
- static ACE_HANDLE accept (ACE_HANDLE handle,
- struct sockaddr *addr,
- int *addrlen,
- const ACE_Accept_QoS_Params &qos_params);
- // QoS-enabled <accept>, which passes <qos_params> to <accept>. If
- // the OS platform doesn't support QoS-enabled <accept> then the
- // <qos_params> are ignored and the BSD-style <accept> is called.
- static int bind (ACE_HANDLE s,
- struct sockaddr *name,
- int namelen);
- static int connect (ACE_HANDLE handle,
- struct sockaddr *addr,
- int addrlen);
- // BSD-style <connect> (no QoS).
- static int connect (ACE_HANDLE handle,
- const sockaddr *addr,
- int addrlen,
- const ACE_QoS_Params &qos_params);
- // QoS-enabled <connect>, which passes <qos_params> to <connect>.
- // If the OS platform doesn't support QoS-enabled <connect> then the
- // <qos_params> are ignored and the BSD-style <connect> is called.
-
- static int closesocket (ACE_HANDLE s);
- static struct hostent *gethostbyaddr (const ACE_TCHAR *addr,
- int length,
- int type);
- static struct hostent *gethostbyname (const ACE_TCHAR *name);
- static struct hostent *gethostbyname2 (const ACE_TCHAR *name, int type);
- static struct hostent *gethostbyaddr_r (const ACE_TCHAR *addr,
- int length,
- int type,
- struct hostent *result,
- ACE_HOSTENT_DATA buffer,
- int *h_errnop);
- static struct hostent *gethostbyname_r (const ACE_TCHAR *name,
- struct hostent *result,
- ACE_HOSTENT_DATA buffer,
- int *h_errnop);
- static int getpeername (ACE_HANDLE handle,
- struct sockaddr *addr,
- int *addrlen);
- static struct protoent *getprotobyname (const ACE_TCHAR *name);
- static struct protoent *getprotobyname_r (const ACE_TCHAR *name,
- struct protoent *result,
- ACE_PROTOENT_DATA buffer);
- static struct protoent *getprotobynumber (int proto);
- static struct protoent *getprotobynumber_r (int proto,
- struct protoent *result,
- ACE_PROTOENT_DATA buffer);
- static struct servent *getservbyname (const ACE_TCHAR *svc,
- const ACE_TCHAR *proto);
- static struct servent *getservbyname_r (const ACE_TCHAR *svc,
- const ACE_TCHAR *proto,
- struct servent *result,
- ACE_SERVENT_DATA buf);
- static int getsockname (ACE_HANDLE handle,
- struct sockaddr *addr,
- int *addrlen);
- static int getsockopt (ACE_HANDLE handle,
- int level,
- int optname,
- char *optval,
- int *optlen);
- static long inet_addr (const ACE_TCHAR *name);
- static ACE_TCHAR *inet_ntoa (const struct in_addr addr);
- static int inet_aton (const ACE_TCHAR *strptr,
- struct in_addr *addr);
- static const ACE_TCHAR *inet_ntop (int family,
- const void *addrptr,
- ACE_TCHAR *strptr,
- size_t len);
- static int inet_pton (int family,
- const ACE_TCHAR *strptr,
- void *addrptr);
- static int enum_protocols (int *protocols,
- ACE_Protocol_Info *protocol_buffer,
- u_long *buffer_length);
- // Retrieve information about available transport protocols
- // installed on the local machine.
- static ACE_HANDLE join_leaf (ACE_HANDLE socket,
- const sockaddr *name,
- int namelen,
- const ACE_QoS_Params &qos_params);
- // Joins a leaf node into a QoS-enabled multi-point session.
- static int listen (ACE_HANDLE handle,
- int backlog);
- static int recv (ACE_HANDLE handle,
- char *buf,
- int len,
- int flags = 0);
- static int recvfrom (ACE_HANDLE handle,
- char *buf,
- int len,
- int flags,
- struct sockaddr *addr,
- int *addrlen);
- static int recvfrom (ACE_HANDLE handle,
- iovec *buffers,
- int buffer_count,
- size_t &number_of_bytes_recvd,
- int &flags,
- struct sockaddr *addr,
- int *addrlen,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func);
- static int send (ACE_HANDLE handle,
- const char *buf,
- int len,
- int flags = 0);
- static int sendto (ACE_HANDLE handle,
- const char *buf,
- int len,
- int flags,
- const struct sockaddr *addr,
- int addrlen);
- static int sendto (ACE_HANDLE handle,
- const iovec *buffers,
- int buffer_count,
- size_t &number_of_bytes_sent,
- int flags,
- const struct sockaddr *addr,
- int addrlen,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func);
- static int setsockopt (ACE_HANDLE handle,
- int level,
- int optname,
- const char *optval,
- int optlen);
- // QoS-enabled <ioctl> wrapper.
- static int shutdown (ACE_HANDLE handle,
- int how);
- static ACE_HANDLE socket (int protocol_family,
- int type,
- int proto);
-
- // Create a BSD-style socket (no QoS).
- static ACE_HANDLE socket (int protocol_family,
- int type,
- int proto,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags);
- // Create a QoS-enabled socket. If the OS platform doesn't support
- // QoS-enabled <socket> then the BSD-style <socket> is called.
-
- static int socketpair (int domain,
- int type,
- int protocol,
- ACE_HANDLE sv[2]);
- static int socket_init (int version_high = 1,
- int version_low = 1);
- // Initialize WinSock before first use (e.g., when a DLL is first
- // loaded or the first use of a socket() call.
-
- static int socket_fini (void);
- // Finalize WinSock after last use (e.g., when a DLL is unloaded).
-
- // = A set of wrappers for password routines.
- static void setpwent (void);
- static void endpwent (void);
- static struct passwd *getpwent (void);
- static struct passwd *getpwnam (const char *user);
- static struct passwd *getpwnam_r (const char *name,
- struct passwd *pwent,
- char *buffer,
- int buflen);
-
- // = A set of wrappers for regular expressions.
- static char *compile (const char *instring,
- char *expbuf,
- char *endbuf);
- static int step (const char *str,
- char *expbuf);
-
- // = A set of wrappers for string operations.
-
- static int to_lower (int c);
-#if defined (ACE_HAS_WCHAR)
- static wint_t to_lower (wint_t c);
-#endif /* ACE_HAS_WCHAR */
-
- static char *strcat (char *s, const char *t);
- static char *strncat (char *s, const char *t, size_t len);
-#if defined (ACE_HAS_WCHAR)
- static wchar_t *strcat (wchar_t *s, const wchar_t *t);
- static wchar_t *strncat (wchar_t *s, const wchar_t *t, size_t len);
-#endif /* ACE_HAS_WCHAR */
-
- static char *strchr (char *s, int c);
- static const char *strchr (const char *s, int c);
- static char *strrchr (char *s, int c);
- static const char *strrchr (const char *s, int c);
- static char *strnchr (char *s, int c, size_t len);
- static const char *strnchr (const char *s, int c, size_t len);
-#if defined (ACE_HAS_WCHAR)
- static wchar_t *strchr (wchar_t *s, wint_t c);
- static const wchar_t *strchr (const wchar_t *s, wint_t c);
- static wchar_t *strrchr (wchar_t *s, wint_t c);
- static const wchar_t *strrchr (const wchar_t *s, wint_t c);
- static wchar_t *strnchr (wchar_t *s, wint_t c, size_t len);
- static const wchar_t *strnchr (const wchar_t *s, wint_t c, size_t len);
-#endif /* ACE_HAS_WCHAR */
-
- static int strcmp (const char *s, const char *t);
- static int strncmp (const char *s, const char *t, size_t len);
- static int strcasecmp (const char *s, const char *t);
- static int strncasecmp (const char *s, const char *t, size_t len);
-#if defined (ACE_HAS_WCHAR)
- static int strcmp (const wchar_t *s, const wchar_t *t);
- static int strncmp (const wchar_t *s, const wchar_t *t, size_t len);
- static int strcasecmp (const wchar_t *s, const wchar_t *t);
- static int strncasecmp (const wchar_t *s, const wchar_t *t, size_t len);
-#endif /* ACE_HAS_WCHAR */
-
- static char *strcpy (char *s, const char *t);
- static char *strecpy (char *des, const char *src);
- // Copies <src> to <des>, returning a pointer to the end of the
- // copied region, rather than the beginning, as <strcpy> does.
- static char *strncpy (char *s, const char *t, size_t len);
-#if defined (ACE_HAS_WCHAR)
- static wchar_t *strcpy (wchar_t *s, const wchar_t *t);
- static wchar_t *strecpy (wchar_t *s, const wchar_t *t);
- static wchar_t *strncpy (wchar_t *s, const wchar_t *t, size_t len);
-#endif /* ACE_HAS_WCHAR */
-
- static char *strpbrk (char *s1, const char *s2);
- static const char *strpbrk (const char *s1, const char *s2);
-#if defined (ACE_HAS_WCHAR)
- static wchar_t *strpbrk (wchar_t *s1, const wchar_t *s2);
- static const wchar_t *strpbrk (const wchar_t *s1, const wchar_t *s2);
-#endif /* ACE_HAS_WCHAR */
-
-
- static size_t strcspn (const char *s, const char *reject);
-
- static size_t strspn (const char *s1, const char *s2);
-#if defined (ACE_HAS_WCHAR)
- static size_t strspn (const wchar_t *s1, const wchar_t *s2);
-#endif /* ACE_HAS_WCHAR */
-
-#if defined (ACE_HAS_STRPTIME)
- static char *strptime (char *buf,
- const char *format,
- struct tm *tm);
-#endif /* ACE_HAS_STRPTIME */
-
- static char *strstr (char *s, const char *t);
- static const char *strstr (const char *s, const char *t);
- static char *strnstr (char *s, const char *t, size_t len);
- static const char *strnstr (const char *s, const char *t, size_t len);
-#if defined (ACE_HAS_WCHAR)
- static wchar_t *strstr (wchar_t *s, const wchar_t *t);
- static const wchar_t *strstr (const wchar_t *s, const wchar_t *t);
- static wchar_t *strnstr (wchar_t *s, const wchar_t *t, size_t len);
- static const wchar_t *strnstr (const wchar_t *s, const wchar_t *t, size_t len);
-#endif /* ACE_HAS_WCHAR */
-
- static char *strdup (const char *s); // Uses malloc
-#if defined (ACE_HAS_WCHAR)
- static wchar_t *strdup (const wchar_t *s);
-#endif /* ACE_HAS_WCHAR */
-
- static size_t strlen (const char *s);
-#if defined (ACE_HAS_WCHAR)
- static size_t strlen (const wchar_t *s);
-#endif /* ACE_HAS_WCHAR */
-
- static char *strtok (char *s, const char *tokens);
- static char *strtok_r (char *s, const char *tokens, char **lasts);
-#if defined (ACE_HAS_WCHAR)
- static wchar_t *strtok (wchar_t *s, const wchar_t *tokens);
-#endif /* ACE_HAS_WCHAR */
-
- static long strtol (const char *s, char **ptr, int base);
- static u_long strtoul (const char *s, char **ptr, int base);
- static double strtod (const char *s, char **endptr);
-#if defined (ACE_HAS_WCHAR)
- static long strtol (const wchar_t *s, wchar_t **ptr, int base);
- static u_long strtoul (const wchar_t *s, wchar_t **ptr, int base);
- static double strtod (const wchar_t *s, wchar_t **endptr);
-#endif /* ACE_HAS_WCHAR */
-
- static int ace_isspace (const ACE_TCHAR s);
- static int ace_isprint (const ACE_TCHAR s);
-
- // @@ UNICODE: (brunsch) Can this be handled better?
- // The following WChar typedef and functions are used by TAO. TAO
- // does not use wchar_t because the size of wchar_t is
- // platform-dependent. These are to be used for all
- // manipulate\ions of CORBA::WString.
- typedef ACE_UINT16 WChar;
- static u_int wslen (const WChar *);
- static WChar *wscpy (WChar *,
- const WChar *);
- static int wscmp (const WChar *,
- const WChar *);
- static int wsncmp (const WChar *,
- const WChar *,
- size_t len);
-
- // = A set of wrappers for TLI.
- static int t_accept (ACE_HANDLE fildes,
- int resfd,
- struct t_call
- *call);
- static char *t_alloc (ACE_HANDLE fildes,
- int struct_type,
- int
- fields);
- static int t_bind (ACE_HANDLE fildes,
- struct t_bind *req,
- struct
- t_bind *ret);
- static int t_close (ACE_HANDLE fildes);
- static int t_connect(int fildes,
- struct t_call *sndcall,
- struct t_call *rcvcall);
- static void t_error (const char *errmsg);
- static int t_free (char *ptr,
- int struct_type);
- static int t_getinfo (ACE_HANDLE fildes,
- struct t_info *info);
- static int t_getname (ACE_HANDLE fildes,
- struct netbuf *namep,
- int type);
- static int t_getstate (ACE_HANDLE fildes);
- static int t_listen (ACE_HANDLE fildes,
- struct t_call *call);
- static int t_look (ACE_HANDLE fildes);
- static int t_open (char *path,
- int oflag,
- struct t_info *info);
- static int t_optmgmt (ACE_HANDLE fildes,
- struct t_optmgmt *req,
- struct t_optmgmt *ret);
- static int t_rcv (ACE_HANDLE fildes,
- char *buf,
- u_int nbytes,
- int *flags);
- static int t_rcvdis (ACE_HANDLE fildes,
- struct t_discon *discon);
- static int t_rcvrel (ACE_HANDLE fildes);
- static int t_rcvudata (ACE_HANDLE fildes,
- struct t_unitdata *unitdata,
- int *flags);
- static int t_rcvuderr (ACE_HANDLE fildes,
- struct t_uderr *uderr);
- static int t_snd (ACE_HANDLE fildes,
- const char *buf,
- u_int nbytes,
- int flags);
- static int t_snddis (ACE_HANDLE fildes,
- struct t_call *call);
- static int t_sndrel (ACE_HANDLE fildes);
- static int t_sync (ACE_HANDLE fildes);
- static int t_unbind (ACE_HANDLE fildes);
-
-# if 0
- // = A set of wrappers for threads (these are portable since they use the ACE_Thread_ID).
- static int thr_continue (const ACE_Thread_ID &thread);
- static int thr_create (ACE_THR_FUNC,
- void *args,
- long flags,
- ACE_Thread_ID *,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- void *stack = 0,
- size_t stacksize = 0);
- static int thr_getprio (ACE_Thread_ID thr_id,
- int &prio,
- int *policy = 0);
- static int thr_join (ACE_Thread_ID waiter_id,
- void **status);
- static int thr_kill (ACE_Thread_ID thr_id,
- int signum);
- static ACE_Thread_ID thr_self (void);
- static int thr_setprio (ACE_Thread_ID thr_id,
- int prio);
- static int thr_setprio (const ACE_Sched_Priority prio);
- static int thr_suspend (ACE_Thread_ID target_thread);
- static int thr_cancel (ACE_Thread_ID t_id);
-# endif /* 0 */
-
- // = A set of wrappers for threads
-
- // These are non-portable since they use ACE_thread_t and
- // ACE_hthread_t and will go away in a future release.
- static int thr_continue (ACE_hthread_t target_thread);
- static int thr_create (ACE_THR_FUNC func,
- void *args,
- long flags,
- ACE_thread_t *thr_id,
- ACE_hthread_t *t_handle = 0,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- void *stack = 0,
- size_t stacksize = 0,
- ACE_Thread_Adapter *thread_adapter = 0);
- // Creates a new thread having <flags> attributes and running <func>
- // with <args> (if <thread_adapter> is non-0 then <func> and <args>
- // are ignored and are obtained from <thread_adapter>). <thr_id>
- // and <t_handle> are set to the thread's ID and handle (?),
- // respectively. The thread runs at <priority> priority (see
- // below).
- //
- // The <flags> are a bitwise-OR of the following:
- // = BEGIN<INDENT>
- // THR_CANCEL_DISABLE, THR_CANCEL_ENABLE, THR_CANCEL_DEFERRED,
- // THR_CANCEL_ASYNCHRONOUS, THR_BOUND, THR_NEW_LWP, THR_DETACHED,
- // THR_SUSPENDED, THR_DAEMON, THR_JOINABLE, THR_SCHED_FIFO,
- // THR_SCHED_RR, THR_SCHED_DEFAULT
- // = END<INDENT>
- //
- // By default, or if <priority> is set to
- // ACE_DEFAULT_THREAD_PRIORITY, an "appropriate" priority value for
- // the given scheduling policy (specified in <flags}>, e.g.,
- // <THR_SCHED_DEFAULT>) is used. This value is calculated
- // dynamically, and is the median value between the minimum and
- // maximum priority values for the given policy. If an explicit
- // value is given, it is used. Note that actual priority values are
- // EXTREMEMLY implementation-dependent, and are probably best
- // avoided.
- //
- // Note that <thread_adapter> is always deleted by <thr_create>,
- // therefore it must be allocated with global operator new.
-
- static int thr_getprio (ACE_hthread_t thr_id,
- int &prio);
- static int thr_join (ACE_hthread_t waiter_id,
- void **status);
- static int thr_join (ACE_thread_t waiter_id,
- ACE_thread_t *thr_id,
- void **status);
- static int thr_kill (ACE_thread_t thr_id,
- int signum);
- static ACE_thread_t thr_self (void);
- static void thr_self (ACE_hthread_t &);
- static int thr_setprio (ACE_hthread_t thr_id,
- int prio);
- static int thr_setprio (const ACE_Sched_Priority prio);
- static int thr_suspend (ACE_hthread_t target_thread);
- static int thr_cancel (ACE_thread_t t_id);
-
- static int thr_cmp (ACE_hthread_t t1,
- ACE_hthread_t t2);
- static int thr_equal (ACE_thread_t t1,
- ACE_thread_t t2);
- static void thr_exit (void *status = 0);
- static int thr_getconcurrency (void);
- static int lwp_getparams (ACE_Sched_Params &);
-# if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- static int thr_getspecific (ACE_OS_thread_key_t key,
- void **data);
-# endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */
- static int thr_getspecific (ACE_thread_key_t key,
- void **data);
- static int thr_keyfree (ACE_thread_key_t key);
- static int thr_key_detach (void *inst);
-# if defined (ACE_HAS_THR_C_DEST)
-# if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- static int thr_keycreate (ACE_OS_thread_key_t *key,
- ACE_THR_C_DEST,
- void *inst = 0);
-# endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */
- static int thr_keycreate (ACE_thread_key_t *key,
- ACE_THR_C_DEST,
- void *inst = 0);
-# else
-# if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- static int thr_keycreate (ACE_OS_thread_key_t *key,
- ACE_THR_DEST,
- void *inst = 0);
-# endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */
- static int thr_keycreate (ACE_thread_key_t *key,
- ACE_THR_DEST,
- void *inst = 0);
-# endif /* ACE_HAS_THR_C_DEST */
- static int thr_key_used (ACE_thread_key_t key);
- static size_t thr_min_stack (void);
- static int thr_setconcurrency (int hint);
- static int lwp_setparams (const ACE_Sched_Params &);
-# if defined (ACE_HAS_TSS_EMULATION) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- static int thr_setspecific (ACE_OS_thread_key_t key,
- void *data);
-# endif /* ACE_HAS_TSS_EMULATION && ACE_HAS_THREAD_SPECIFIC_STORAGE */
- static int thr_setspecific (ACE_thread_key_t key,
- void *data);
- static int thr_sigsetmask (int how,
- const sigset_t *nsm,
- sigset_t *osm);
- static int thr_setcancelstate (int new_state,
- int *old_state);
- static int thr_setcanceltype (int new_type,
- int *old_type);
- static int sigwait (sigset_t *set,
- int *sig = 0);
- static int sigtimedwait (const sigset_t *set,
- siginfo_t *info,
- const ACE_Time_Value *timeout);
- static void thr_testcancel (void);
- static void thr_yield (void);
-
- static void unique_name (const void *object,
- ACE_TCHAR *name,
- size_t length);
- // This method uses process id and object pointer to come up with a
- // machine wide unique name. The process ID will provide uniqueness
- // between processes on the same machine. The "this" pointer of the
- // <object> will provide uniqueness between other "live" objects in
- // the same process. The uniqueness of this name is therefore only
- // valid for the life of <object>.
-
- static ACE_thread_t NULL_thread;
- // This is necessary to deal with POSIX pthreads and their use of
- // structures for thread ids.
-
- static ACE_hthread_t NULL_hthread;
- // This is necessary to deal with POSIX pthreads and their use of
- // structures for thread handles.
-
- static ACE_thread_key_t NULL_key;
- // This is necessary to deal with POSIX pthreads and their use of
- // structures for TSS keys.
-
-# if defined (CHORUS)
- static KnCap actorcaps_[ACE_CHORUS_MAX_ACTORS];
- // This is used to map an actor's id into a KnCap for killing and
- // waiting actors.
-# endif /* CHORUS */
-
-# if defined (ACE_WIN32)
- static int socket_initialized_;
- // Keeps track of whether we've already initialized WinSock...
-# endif /* ACE_WIN32 */
-
- static void mutex_lock_cleanup (void *mutex);
- // Handle asynchronous thread cancellation cleanup.
-
- static void cleanup_tss (const u_int main_thread);
- // Call TSS destructors for the current thread. If the current
- // thread is the main thread, then the argument must be 1.
- // For private use of ACE_Object_Manager and ACE_Thread_Adapter only.
-
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) && defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
- static int netdb_acquire (void);
- static int netdb_release (void);
-# endif /* defined (ACE_MT_SAFE) && ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
-
- static int scheduling_class (const char *class_name, ACE_id_t &);
- // Find the schedling class ID that corresponds to the class name.
-
- static int set_scheduling_params (const ACE_Sched_Params &,
- ACE_id_t id = ACE_SELF);
- // Friendly interface to <priocntl>(2).
-
- // Can't call the following priocntl, because that's a macro on Solaris.
- static int priority_control (ACE_idtype_t, ACE_id_t, int, void *);
- // Low-level interface to <priocntl>(2).
-
-private:
- static ACE_EXIT_HOOK exit_hook_;
- // Function that is called by <ACE_OS::exit>, if non-null.
-
- static ACE_EXIT_HOOK set_exit_hook (ACE_EXIT_HOOK hook);
- // For use by ACE_Object_Manager only, to register its exit hook..
-
- friend class ACE_OS_Object_Manager;
- // Allow the ACE_OS_Object_Manager to call set_exit_hook.
-
-#if defined (ACE_HAS_STRPTIME) && defined (ACE_LACKS_NATIVE_STRPTIME)
- static int strptime_getnum (char *buf,
- int *num,
- int *bi,
- int *fi,
- int min,
- int max);
-#endif /* ACE_HAS_STRPTIME && ACE_LACKS_NATIVE_STRPTIME */
-
-# if defined (ACE_WIN32)
-# if defined (ACE_HAS_WINCE)
- static const wchar_t *day_of_week_name[7];
- static const wchar_t *month_name[12];
- // Supporting data for ctime and ctime_r functions on WinCE.
-# endif /* ACE_HAS_WINCE */
-
- static void fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode);
- // Translate fopen's mode char to open's mode. This helper function
- // is here to avoid maintaining several pieces of identical code.
-
- static OSVERSIONINFO win32_versioninfo_;
-
-# endif /* ACE_WIN32 */
-};
-
-class ACE_Export ACE_Object_Manager_Base
-{
- // = TITLE
- // Base class for ACE_Object_Manager(s).
- //
- // = DESCRIPTION
- // Encapsulates the most useful ACE_Object_Manager data structures.
-# if (defined (ACE_PSOS) && defined (__DIAB)) || \
- (defined (__DECCXX_VER) && __DECCXX_VER < 60000000)
- // The Diab compiler got confused and complained about access rights
- // if this section was protected (changing this to public makes it happy).
- // Similarly, DEC CXX 5.6 needs the methods to be public.
-public:
-# else /* ! (ACE_PSOS && __DIAB) || ! __DECCXX_VER < 60000000 */
-protected:
-# endif /* ! (ACE_PSOS && __DIAB) || ! __DECCXX_VER < 60000000 */
- ACE_Object_Manager_Base (void);
- // Default constructor.
-
- virtual ~ACE_Object_Manager_Base (void);
- // Destructor.
-
-public:
- virtual int init (void) = 0;
- // Explicitly initialize. Returns 0 on success, -1 on failure due
- // to dynamic allocation failure (in which case errno is set to
- // ENOMEM), or 1 if it had already been called.
-
- virtual int fini (void) = 0;
- // Explicitly destroy. Returns 0 on success, -1 on failure because
- // the number of fini () calls hasn't reached the number of init ()
- // calls, or 1 if it had already been called.
-
- enum Object_Manager_State
- {
- OBJ_MAN_UNINITIALIZED = 0,
- OBJ_MAN_INITIALIZING,
- OBJ_MAN_INITIALIZED,
- OBJ_MAN_SHUTTING_DOWN,
- OBJ_MAN_SHUT_DOWN
- };
-
-protected:
- int starting_up_i (void);
- // Returns 1 before ACE_Object_Manager_Base has been constructed.
- // This flag can be used to determine if the program is constructing
- // static objects. If no static object spawns any threads, the
- // program will be single-threaded when this flag returns 1. (Note
- // that the program still might construct some static objects when
- // this flag returns 0, if ACE_HAS_NONSTATIC_OBJECT_MANAGER is not
- // defined.)
-
- int shutting_down_i (void);
- // Returns 1 after ACE_Object_Manager_Base has been destroyed. This
- // flag can be used to determine if the program is in the midst of
- // destroying static objects. (Note that the program might destroy
- // some static objects before this flag can return 1, if
- // ACE_HAS_NONSTATIC_OBJECT_MANAGER is not defined.)
-
- Object_Manager_State object_manager_state_;
- // State of the Object_Manager;
-
- u_int dynamically_allocated_;
- // Flag indicating whether the ACE_Object_Manager was dynamically
- // allocated by ACE. (If is was dynamically allocated by the
- // application, then the application is responsible for destroying
- // it.)
-
- ACE_Object_Manager_Base *next_;
- // Link to next Object_Manager, for chaining.
-private:
- // Disallow copying by not implementing the following . . .
- ACE_Object_Manager_Base (const ACE_Object_Manager_Base &);
- ACE_Object_Manager_Base &operator= (const ACE_Object_Manager_Base &);
-};
-
-extern "C"
-void
-ACE_OS_Object_Manager_Internal_Exit_Hook (void);
-
-class ACE_Export ACE_OS_Object_Manager : public ACE_Object_Manager_Base
-{
-public:
- virtual int init (void);
- // Explicitly initialize.
-
- virtual int fini (void);
- // Explicitly destroy.
-
- static int starting_up (void);
- // Returns 1 before the <ACE_OS_Object_Manager> has been
- // constructed. See <ACE_Object_Manager::starting_up> for more
- // information.
-
- static int shutting_down (void);
- // Returns 1 after the <ACE_OS_Object_Manager> has been destroyed.
- // See <ACE_Object_Manager::shutting_down> for more information.
-
- enum Preallocated_Object
- {
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_OS_MONITOR_LOCK,
- ACE_TSS_CLEANUP_LOCK,
- ACE_LOG_MSG_INSTANCE_LOCK,
-# if defined (ACE_HAS_TSS_EMULATION)
- ACE_TSS_KEY_LOCK,
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- ACE_TSS_BASE_LOCK,
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
-# endif /* ACE_HAS_TSS_EMULATION */
-# else
- // Without ACE_MT_SAFE, There are no preallocated objects. Make
- // sure that the preallocated_array size is at least one by
- // declaring this dummy . . .
- ACE_OS_EMPTY_PREALLOCATED_OBJECT,
-# endif /* ACE_MT_SAFE */
-
- ACE_OS_PREALLOCATED_OBJECTS // This enum value must be last!
- };
- // Unique identifiers for preallocated objects.
-
- static sigset_t *default_mask (void);
- // Accesses a default signal set used, for example, in
- // <ACE_Sig_Guard> methods.
-
- static ACE_Thread_Hook *thread_hook (void);
- // Returns the current thread hook for the process.
-
- static ACE_Thread_Hook *thread_hook (ACE_Thread_Hook *new_thread_hook);
- // Returns the existing thread hook and assign a <new_thread_hook>.
-
-public:
- // = Applications shouldn't use these so they're hidden here.
-
- // They're public so that the <ACE_Object_Manager> can be
- // constructed/destructed in <main> with
- // <ACE_HAS_NONSTATIC_OBJECT_MANAGER>.
- ACE_OS_Object_Manager (void);
- // Constructor.
-
- ~ACE_OS_Object_Manager (void);
- // Destructor.
-
-private:
- static ACE_OS_Object_Manager *instance (void);
- // Accessor to singleton instance.
-
- static ACE_OS_Object_Manager *instance_;
- // Singleton instance pointer.
-
- static void *preallocated_object[ACE_OS_PREALLOCATED_OBJECTS];
- // Table of preallocated objects.
-
- sigset_t *default_mask_;
- // Default signal set used, for example, in ACE_Sig_Guard.
-
- ACE_Thread_Hook *thread_hook_;
- // Thread hook that's used by this process.
-
- ACE_OS_Exit_Info exit_info_;
- // For at_exit support.
-
- int at_exit (ACE_EXIT_HOOK func);
- // For <ACE_OS::atexit> support.
-
- static void print_error_message (u_int line_number, const ACE_TCHAR *message);
- // For use by init () and fini (), to consolidate error reporting.
-
- friend class ACE_OS;
- friend class ACE_Object_Manager;
- friend class ACE_OS_Object_Manager_Manager;
- friend class ACE_TSS_Cleanup;
- friend class ACE_TSS_Emulation;
- friend class ACE_Log_Msg;
- friend void ACE_OS_Object_Manager_Internal_Exit_Hook ();
- // This class is for internal use by ACE_OS, etc., only.
-};
-
-# if defined (ACE_LACKS_TIMEDWAIT_PROTOTYPES)
-extern "C" ssize_t recv_timedwait (ACE_HANDLE handle,
- char *buf,
- int len,
- int flags,
- struct timespec *timeout);
-extern "C" ssize_t read_timedwait (ACE_HANDLE handle,
- char *buf,
- size_t n,
- struct timespec *timeout);
-extern "C" ssize_t recvmsg_timedwait (ACE_HANDLE handle,
- struct msghdr *msg,
- int flags,
- struct timespec *timeout);
-extern "C" ssize_t recvfrom_timedwait (ACE_HANDLE handle,
- char *buf,
- int len,
- int flags,
- struct sockaddr *addr,
- int
- *addrlen,
- struct timespec *timeout);
-extern "C" ssize_t readv_timedwait (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- struct timespec* timeout);
-extern "C" ssize_t send_timedwait (ACE_HANDLE handle,
- const char *buf,
- int len,
- int flags,
- struct timespec *timeout);
-extern "C" ssize_t write_timedwait (ACE_HANDLE handle,
- const void *buf,
- size_t n,
- struct timespec *timeout);
-extern "C" ssize_t sendmsg_timedwait (ACE_HANDLE handle,
- ACE_SENDMSG_TYPE *msg,
- int flags,
- struct timespec *timeout);
-extern "C" ssize_t sendto_timedwait (ACE_HANDLE handle,
- const char *buf,
- int len,
- int flags,
- const struct sockaddr *addr,
- int addrlen,
- struct timespec *timeout);
-extern "C" ssize_t writev_timedwait (ACE_HANDLE handle,
- ACE_WRITEV_TYPE *iov,
- int iovcnt,
- struct timespec *timeout);
-# endif /* ACE_LACKS_TIMEDWAIT_PROTOTYPES */
-
-# if defined (ACE_HAS_TSS_EMULATION)
- // Allow config.h to set the default number of thread keys.
-# if !defined (ACE_DEFAULT_THREAD_KEYS)
-# define ACE_DEFAULT_THREAD_KEYS 64
-# endif /* ! ACE_DEFAULT_THREAD_KEYS */
-
-class ACE_Export ACE_TSS_Emulation
-{
- // = TITLE
- // Thread-specific storage emulation.
- //
- // = DESCRIPTION
- // This provides a thread-specific storage implementation.
- // It is intended for use on platforms that don't have a
- // native TSS, or have a TSS with limitations such as the
- // number of keys or lack of support for removing keys.
-public:
- typedef void (*ACE_TSS_DESTRUCTOR)(void *value) /* throw () */;
-
- enum { ACE_TSS_THREAD_KEYS_MAX = ACE_DEFAULT_THREAD_KEYS };
- // Maximum number of TSS keys allowed over the life of the program.
-
- static u_int total_keys ();
- // Returns the total number of keys allocated so far.
-
- static int next_key (ACE_thread_key_t &key);
- // Sets the argument to the next available key. Returns 0 on success,
- // -1 if no keys are available.
-
- static ACE_TSS_DESTRUCTOR tss_destructor (const ACE_thread_key_t key);
- // Returns the exit hook associated with the key. Does _not_ check
- // for a valid key.
-
- static void tss_destructor (const ACE_thread_key_t key,
- ACE_TSS_DESTRUCTOR destructor);
- // Associates the TSS destructor with the key. Does _not_ check
- // for a valid key.
-
- static void *&ts_object (const ACE_thread_key_t key);
- // Accesses the object referenced by key in the current thread's TSS array.
- // Does _not_ check for a valid key.
-
- static void *tss_open (void *ts_storage[ACE_TSS_THREAD_KEYS_MAX]);
- // Setup an array to be used for local TSS. Returns the array
- // address on success. Returns 0 if local TSS had already been
- // setup for this thread. There is no corresponding tss_close ()
- // because it is not needed.
- // NOTE: tss_open () is called by ACE for threads that it spawns.
- // If your application spawns threads without using ACE, and it uses
- // ACE's TSS emulation, each of those threads should call tss_open
- // (). See the ace_thread_adapter () implementaiton for an example.
-
- static void tss_close ();
- // Shutdown TSS emulation. For use only by ACE_OS::cleanup_tss ().
-
-private:
- // Global TSS structures.
- static u_int total_keys_;
- // Always contains the value of the next key to be allocated.
-
- static ACE_TSS_DESTRUCTOR tss_destructor_ [ACE_TSS_THREAD_KEYS_MAX];
- // Array of thread exit hooks (TSS destructors) that are called for each
- // key (that has one) when the thread exits.
-
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- static void **tss_base (void* ts_storage[] = 0, u_int *ts_created = 0);
- // Location of current thread's TSS array.
-# else /* ! ACE_HAS_THREAD_SPECIFIC_STORAGE */
- static void **&tss_base ();
- // Location of current thread's TSS array.
-# endif /* ! ACE_HAS_THREAD_SPECIFIC_STORAGE */
-
-# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
- // Rely on native thread specific storage for the implementation,
- // but just use one key.
- static ACE_OS_thread_key_t native_tss_key_;
-
- // Used to indicate if native tss key has been allocated
- static int key_created_;
-# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
-};
-
-# else /* ! ACE_HAS_TSS_EMULATION */
-# if defined (TLS_MINIMUM_AVAILABLE)
- // WIN32 platforms define TLS_MINIMUM_AVAILABLE natively.
-# define ACE_DEFAULT_THREAD_KEYS TLS_MINIMUM_AVAILABLE
-# endif /* TSL_MINIMUM_AVAILABLE */
-
-# endif /* ACE_HAS_TSS_EMULATION */
-
-// moved ACE_TSS_Ref, ACE_TSS_Info, and ACE_TSS_Keys class
-// declarations from OS.cpp so they are visible to the single
-// file of template instantiations.
-# if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) || (defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS))
-class ACE_TSS_Ref
-{
- // = TITLE
- // "Reference count" for thread-specific storage keys.
- //
- // = DESCRIPTION
- // Since the <ACE_Unbounded_Stack> doesn't allow duplicates, the
- // "reference count" is the identify of the thread_id.
-public:
- ACE_TSS_Ref (ACE_thread_t id);
- // Constructor
-
- ACE_TSS_Ref (void);
- // Default constructor
-
- int operator== (const ACE_TSS_Ref &) const;
- // Check for equality.
-
- int operator!= (const ACE_TSS_Ref &) const;
- // Check for inequality.
-
-// private:
-
- ACE_thread_t tid_;
- // ID of thread using a specific key.
-};
-
-class ACE_TSS_Info
-{
- // = TITLE
- // Thread Specific Key management.
- //
- // = DESCRIPTION
- // This class maps a key to a "destructor."
-public:
- ACE_TSS_Info (ACE_thread_key_t key,
- void (*dest)(void *) = 0,
- void *tss_inst = 0);
- // Constructor
-
- ACE_TSS_Info (void);
- // Default constructor
-
- int key_in_use (void) const { return thread_count_ != -1; }
- // Returns 1 if the key is in use, 0 if not.
-
- void key_in_use (int flag) { thread_count_ = flag == 0 ? -1 : 1; }
- // Mark the key as being in use if the flag is non-zero, or
- // not in use if the flag is 0.
-
- int operator== (const ACE_TSS_Info &) const;
- // Check for equality.
-
- int operator!= (const ACE_TSS_Info &) const;
- // Check for inequality.
-
- void dump (void);
- // Dump the state.
-
-private:
- ACE_thread_key_t key_;
- // Key to the thread-specific storage item.
-
- void (*destructor_)(void *);
- // "Destructor" that gets called when the item is finally released.
-
- void *tss_obj_;
- // Pointer to ACE_TSS<xxx> instance that has/will allocate the key.
-
- int thread_count_;
- // Count of threads that are using this key. Contains -1 when the
- // key is not in use.
-
- friend class ACE_TSS_Cleanup;
-};
-
-class ACE_TSS_Keys
-{
- // = TITLE
- // Collection of in-use flags for a thread's TSS keys.
- // For internal use only by ACE_TSS_Cleanup; it is public because
- // some compilers can't use nested classes for template instantiation
- // parameters.
- //
- // = DESCRIPTION
- // Wrapper around array of whether each key is in use. A simple
- // typedef doesn't work with Sun C++ 4.2.
-public:
- ACE_TSS_Keys (void);
- // Default constructor, to initialize all bits to zero (unused).
-
- int test_and_set (const ACE_thread_key_t key);
- // Mark the specified key as being in use, if it was not already so marked.
- // Returns 1 if the had already been marked, 0 if not.
-
- int test_and_clear (const ACE_thread_key_t key);
- // Mark the specified key as not being in use, if it was not already so
- // cleared. Returns 1 if the had already been cleared, 0 if not.
-
-private:
- static void find (const u_int key, u_int &word, u_int &bit);
- // For a given key, find the word and bit number that represent it.
-
- enum
- {
-# if ACE_SIZEOF_LONG == 8
- ACE_BITS_PER_WORD = 64,
-# elif ACE_SIZEOF_LONG == 4
- ACE_BITS_PER_WORD = 32,
-# else
-# error ACE_TSS_Keys only supports 32 or 64 bit longs.
-# endif /* ACE_SIZEOF_LONG == 8 */
- ACE_WORDS = (ACE_DEFAULT_THREAD_KEYS - 1) / ACE_BITS_PER_WORD + 1
- };
-
- u_long key_bit_words_[ACE_WORDS];
- // Bit flag collection. A bit value of 1 indicates that the key is in
- // use by this thread.
-};
-
-# endif /* defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) */
-
-// Support non-scalar thread keys, such as with some POSIX
-// implementations, e.g., MVS.
-# if defined (ACE_HAS_NONSCALAR_THREAD_KEY_T)
-# define ACE_KEY_INDEX(OBJ,KEY) \
- u_int OBJ; \
- ACE_OS::memcpy (&OBJ, &KEY, sizeof (u_int))
-# else
-# define ACE_KEY_INDEX(OBJ,KEY) u_int OBJ = KEY
-# endif /* ACE_HAS_NONSCALAR_THREAD_KEY_T */
-
-// Some useful abstrations for expressions involving
-// ACE_Allocator.malloc (). The difference between ACE_NEW_MALLOC*
-// with ACE_ALLOCATOR* is that they call constructors also.
-
-# define ACE_ALLOCATOR_RETURN(POINTER,ALLOCATOR,RET_VAL) \
- do { POINTER = ALLOCATOR; \
- if (POINTER == 0) { errno = ENOMEM; return RET_VAL; } \
- } while (0)
-# define ACE_ALLOCATOR(POINTER,ALLOCATOR) \
- do { POINTER = ALLOCATOR; \
- if (POINTER == 0) { errno = ENOMEM; return; } \
- } while (0)
-
-# define ACE_NEW_MALLOC_RETURN(POINTER,ALLOCATOR,CONSTRUCTOR,RET_VAL) \
- do { POINTER = ALLOCATOR; \
- if (POINTER == 0) { errno = ENOMEM; return RET_VAL;} \
- else { new (POINTER) CONSTRUCTOR; } \
- } while (0)
-# define ACE_NEW_MALLOC(POINTER,ALLOCATOR,CONSTRUCTOR) \
- do { POINTER = ALLOCATOR; \
- if (POINTER == 0) { errno = ENOMEM; return;} \
- else { new (POINTER) CONSTRUCTOR; } \
- } while (0)
-
-# define ACE_NOOP(x)
-
-# define ACE_DES_NOFREE(POINTER,CLASS) \
- do { \
- if (POINTER) \
- { \
- (POINTER)->~CLASS (); \
- } \
- } \
- while (0)
-
-# define ACE_DES_ARRAY_NOFREE(POINTER,SIZE,CLASS) \
- do { \
- if (POINTER) \
- { \
- for (size_t i = 0; \
- i < SIZE; \
- ++i) \
- { \
- (&(POINTER)[i])->~CLASS (); \
- } \
- } \
- } \
- while (0)
-
-# define ACE_DES_FREE(POINTER,DEALLOCATOR,CLASS) \
- do { \
- if (POINTER) \
- { \
- (POINTER)->~CLASS (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-
-# define ACE_DES_ARRAY_FREE(POINTER,SIZE,DEALLOCATOR,CLASS) \
- do { \
- if (POINTER) \
- { \
- for (size_t i = 0; \
- i < SIZE; \
- ++i) \
- { \
- (&(POINTER)[i])->~CLASS (); \
- } \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-
-# if defined (ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR)
-# define ACE_DES_NOFREE_TEMPLATE(POINTER,T_CLASS,T_PARAMETER) \
- do { \
- if (POINTER) \
- { \
- (POINTER)->~T_CLASS (); \
- } \
- } \
- while (0)
-# define ACE_DES_ARRAY_NOFREE_TEMPLATE(POINTER,SIZE,T_CLASS,T_PARAMETER) \
- do { \
- if (POINTER) \
- { \
- for (size_t i = 0; \
- i < SIZE; \
- ++i) \
- { \
- (&(POINTER)[i])->~T_CLASS (); \
- } \
- } \
- } \
- while (0)
-#if defined(__IBMCPP__) && (__IBMCPP__ >= 400)
-# define ACE_DES_FREE_TEMPLATE(POINTER,DEALLOCATOR,T_CLASS,T_PARAMETER) \
- do { \
- if (POINTER) \
- { \
- (POINTER)->~T_CLASS T_PARAMETER (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-#else
-# define ACE_DES_FREE_TEMPLATE(POINTER,DEALLOCATOR,T_CLASS,T_PARAMETER) \
- do { \
- if (POINTER) \
- { \
- (POINTER)->~T_CLASS (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-#endif /* defined(__IBMCPP__) && (__IBMCPP__ >= 400) */
-# define ACE_DES_ARRAY_FREE_TEMPLATE(POINTER,SIZE,DEALLOCATOR,T_CLASS,T_PARAMETER) \
- do { \
- if (POINTER) \
- { \
- for (size_t i = 0; \
- i < SIZE; \
- ++i) \
- { \
- (&(POINTER)[i])->~T_CLASS (); \
- } \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-#if defined(__IBMCPP__) && (__IBMCPP__ >= 400)
-# define ACE_DES_FREE_TEMPLATE2(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2) \
- do { \
- if (POINTER) \
- { \
- (POINTER)->~T_CLASS <T_PARAM1, T_PARAM2> (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-#else
-# define ACE_DES_FREE_TEMPLATE2(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2) \
- do { \
- if (POINTER) \
- { \
- (POINTER)->~T_CLASS (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-#endif /* defined(__IBMCPP__) && (__IBMCPP__ >= 400) */
-# define ACE_DES_FREE_TEMPLATE3(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2,T_PARAM3) \
- do { \
- if (POINTER) \
- { \
- (POINTER)->~T_CLASS (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-# define ACE_DES_FREE_TEMPLATE4(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2,T_PARAM3, T_PARAM4) \
- do { \
- if (POINTER) \
- { \
- (POINTER)->~T_CLASS (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-# define ACE_DES_ARRAY_FREE_TEMPLATE2(POINTER,SIZE,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2) \
- do { \
- if (POINTER) \
- { \
- for (size_t i = 0; \
- i < SIZE; \
- ++i) \
- { \
- (&(POINTER)[i])->~T_CLASS (); \
- } \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-# else /* ! ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR */
-# define ACE_DES_NOFREE_TEMPLATE(POINTER,T_CLASS,T_PARAMETER) \
- do { \
- if (POINTER) \
- { \
- (POINTER)->T_CLASS T_PARAMETER::~T_CLASS (); \
- } \
- } \
- while (0)
-# define ACE_DES_ARRAY_NOFREE_TEMPLATE(POINTER,SIZE,T_CLASS,T_PARAMETER) \
- do { \
- if (POINTER) \
- { \
- for (size_t i = 0; \
- i < SIZE; \
- ++i) \
- { \
- (POINTER)[i].T_CLASS T_PARAMETER::~T_CLASS (); \
- } \
- } \
- } \
- while (0)
-# if defined (__Lynx__) && __LYNXOS_SDK_VERSION == 199701L
- // LynxOS 3.0.0's g++ has trouble with the real versions of these.
-# define ACE_DES_FREE_TEMPLATE(POINTER,DEALLOCATOR,T_CLASS,T_PARAMETER)
-# define ACE_DES_ARRAY_FREE_TEMPLATE(POINTER,DEALLOCATOR,T_CLASS,T_PARAMETER)
-# define ACE_DES_FREE_TEMPLATE2(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2)
-# define ACE_DES_FREE_TEMPLATE3(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2)
-# define ACE_DES_FREE_TEMPLATE4(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2)
-# define ACE_DES_ARRAY_FREE_TEMPLATE2(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2)
-# else
-# define ACE_DES_FREE_TEMPLATE(POINTER,DEALLOCATOR,T_CLASS,T_PARAMETER) \
- do { \
- if (POINTER) \
- { \
- POINTER->T_CLASS T_PARAMETER::~T_CLASS (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-# define ACE_DES_ARRAY_FREE_TEMPLATE(POINTER,SIZE,DEALLOCATOR,T_CLASS,T_PARAMETER) \
- do { \
- if (POINTER) \
- { \
- for (size_t i = 0; \
- i < SIZE; \
- ++i) \
- { \
- POINTER[i].T_CLASS T_PARAMETER::~T_CLASS (); \
- } \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-# define ACE_DES_FREE_TEMPLATE2(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2) \
- do { \
- if (POINTER) \
- { \
- POINTER->T_CLASS <T_PARAM1, T_PARAM2>::~T_CLASS (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-# define ACE_DES_FREE_TEMPLATE3(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2,T_PARAM3) \
- do { \
- if (POINTER) \
- { \
- POINTER->T_CLASS <T_PARAM1, T_PARAM2, T_PARAM3>::~T_CLASS (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-# define ACE_DES_FREE_TEMPLATE4(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2,T_PARAM3,T_PARAM4) \
- do { \
- if (POINTER) \
- { \
- POINTER->T_CLASS <T_PARAM1, T_PARAM2, T_PARAM3, T_PARAM4>::~T_CLASS (); \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-# define ACE_DES_ARRAY_FREE_TEMPLATE2(POINTER,SIZE,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2) \
- do { \
- if (POINTER) \
- { \
- for (size_t i = 0; \
- i < SIZE; \
- ++i) \
- { \
- POINTER[i].T_CLASS <T_PARAM1, T_PARAM2>::~T_CLASS (); \
- } \
- DEALLOCATOR (POINTER); \
- } \
- } \
- while (0)
-# endif /* defined (__Lynx__) && __LYNXOS_SDK_VERSION == 199701L */
-# endif /* defined ! ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR */
-
-# if defined (ACE_HAS_THR_C_FUNC)
-// This is necessary to work around nasty problems with MVS C++.
-extern "C" ACE_Export void ace_mutex_lock_cleanup_adapter (void *args);
-# define ACE_PTHREAD_CLEANUP_PUSH(A) pthread_cleanup_push (ace_mutex_lock_cleanup_adapter, (void *) A);
-# define ACE_PTHREAD_CLEANUP_POP(A) pthread_cleanup_pop(A)
-# elif defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_CLEANUP)
-# define ACE_PTHREAD_CLEANUP_PUSH(A) pthread_cleanup_push (ACE_OS::mutex_lock_cleanup, (void *) A);
-# define ACE_PTHREAD_CLEANUP_POP(A) pthread_cleanup_pop(A)
-# else
-# define ACE_PTHREAD_CLEANUP_PUSH(A)
-# define ACE_PTHREAD_CLEANUP_POP(A)
-# endif /* ACE_HAS_THR_C_FUNC */
-
-# if !defined (ACE_DEFAULT_MUTEX)
-# define ACE_DEFAULT_MUTEX ACE_TEXT ("ACE_MUTEX")
-# endif /* ACE_DEFAULT_MUTEX */
-
-# if !defined (ACE_MAIN)
-# define ACE_MAIN main
-# endif /* ! ACE_MAIN */
-
-# if defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER)
-# if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
-# define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-# endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
-# endif /* ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */
-
-# if defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER) && !defined (ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER)
-
-# if !defined (ACE_HAS_MINIMAL_ACE_OS)
-# include "ace/Object_Manager.h"
-# endif /* ! ACE_HAS_MINIMAL_ACE_OS */
-
-// Rename "main ()" on platforms that don't allow it to be called "main ()".
-
-// Also, create ACE_Object_Manager static instance(s) in "main ()".
-// ACE_MAIN_OBJECT_MANAGER defines the ACE_Object_Manager(s) that will
-// be instantiated on the stack of main (). Note that it is only used
-// when compiling main (): its value does not affect the contents of
-// ace/OS.o.
-# if !defined (ACE_MAIN_OBJECT_MANAGER)
-# define ACE_MAIN_OBJECT_MANAGER \
- ACE_OS_Object_Manager ace_os_object_manager; \
- ACE_Object_Manager ace_object_manager;
-# endif /* ! ACE_MAIN_OBJECT_MANAGER */
-
-# if defined (ACE_PSOSIM)
-// PSOSIM root lacks the standard argc, argv command line parameters,
-// create dummy argc and argv in the "real" main and pass to "user" main.
-// NOTE: ACE_MAIN must be defined to give the return type as well as the
-// name of the entry point.
-# define main \
-ace_main_i (int, char *[]); /* forward declaration */ \
-ACE_MAIN () /* user's entry point, e.g., "main" w/out argc, argv */ \
-{ \
- int argc = 1; /* dummy arg count */ \
- char *argv[] = {"psosim"}; /* dummy arg list */ \
- ACE_MAIN_OBJECT_MANAGER \
- int ret_val = -1; /* assume the worst */ \
- if (ACE_PSOS_Time_t::init_simulator_time ()) /* init simulator time */ \
- { \
- ACE_ERROR((LM_ERROR, "init_simulator_time failed\n")); /* report */ \
- } \
- else \
- { \
- ret_val = ace_main_i (argc, argv); /* call user main, save result */ \
- } \
- ACE_OS::exit (ret_val); /* pass code to simulator exit */ \
-} \
-int \
-ace_main_i
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_LACKS_ARGC_ARGV)
-// PSOS root lacks the standard argc, argv command line parameters,
-// create dummy argc and argv in the "real" main and pass to "user" main.
-// Ignore return value from user main as well. NOTE: ACE_MAIN must be
-// defined to give the return type as well as the name of the entry point
-# define main \
-ace_main_i (int, char *[]); /* forward declaration */ \
-ACE_MAIN () /* user's entry point, e.g., "main" w/out argc, argv */ \
-{ \
- int argc = 1; /* dummy arg count */ \
- char *argv[] = {"root"}; /* dummy arg list */ \
- ACE_MAIN_OBJECT_MANAGER \
- ace_main_i (argc, argv); /* call user main, ignore result */ \
-} \
-int \
-ace_main_i
-# else
-# define main \
-ace_main_i (int, ACE_TCHAR *[]); /* forward declaration */ \
-int \
-ACE_MAIN (int argc, ACE_TCHAR *argv[]) /* user's entry point, e.g., main */ \
-{ \
- ACE_MAIN_OBJECT_MANAGER \
- return ace_main_i (argc, argv); /* what the user calls "main" */ \
-} \
-int \
-ace_main_i
-# if defined (ACE_WIN32) && defined (UNICODE)
-# define wmain \
-ace_main_i (int, ACE_TCHAR *[]); /* forward declaration */ \
-int \
-wmain (int argc, ACE_TCHAR *argv[]) /* user's entry point, e.g., main */ \
-{ \
- ACE_MAIN_OBJECT_MANAGER \
- return ace_main_i (argc, argv); /* what the user calls "main" */ \
-} \
-int \
-ace_main_i
-# endif /* ACE_WIN32 && UNICODE */
-# endif /* ACE_PSOSIM */
-# endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER && !ACE_HAS_WINCE && !ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER */
-
-# if defined (ACE_HAS_WINCE)
-# if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
-class ACE_Export ACE_CE_Errno
-{
- // Some versions of CE don't support <errno> and some versions'
- // implementations are busted. So we implement our own.
- // Our implementation takes up one Tls key, however, it does not
- // allocate memory fromt the heap so there's no problem with cleanin
- // up the errno when a thread exit.
-public:
- ACE_CE_Errno () {}
- static void init ();
- static void fini ();
- static ACE_CE_Errno *instance ();
-
- operator int (void) const;
- int operator= (int);
-
-private:
- static ACE_CE_Errno *instance_;
- static DWORD errno_key_;
-};
-
-# define errno (* (ACE_CE_Errno::instance ()))
-# endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
-
-class ACE_Export ACE_CE_Bridge
-{
- // = TITLE
- // This class bridges between ACE's default text output windows
- // and the original ACE program.
- //
- // = DESCRIPTION
- // As there is no such thing as text-based programs on Windows
- // CE. We need to create a windows to read the command prompt
- // and bridge the output windows with the original ACE program
- // entry point. You'll need to link your program with
- // "ace-windows.lib" for this to work. You can refer to
- // $ACE_ROOT/WindowsCE/Main for how I use a dialog box to run
- // the original ACE programs. This is certainly not the only
- // way to use ACE in Windows programs.
-public:
- ACE_CE_Bridge (void);
- // Default ctor.
-
- ACE_CE_Bridge (HWND, int notification, int idc);
- // Construct and set the default windows.
-
- ~ACE_CE_Bridge (void);
- // Default dtor.
-
- void set_window (HWND, int notification, int idc);
- // Specify which window to use.
-
- void set_self_default (void);
- // Set the default window.
-
- int notification (void);
- int idc (void);
- HWND window (void);
- // Access functions.
-
- static ACE_CE_Bridge *get_default_winbridge (void);
- // Get the reference of default ACE_CE_BRIDGE.
-
- int write_msg (const ACE_TCHAR *str);
- // Write a string to windows.
-
-#if 0
- int write_msg (CString *cs);
- // Write a CString to windows. Notice that the CString object will
- // be freed by windows.
-#endif /* 0 */
-private:
- // @@ We should use a allocator here.
-
- HWND text_output_;
- // A pointer to the window that knows how to
- // handle ACE related messages.
-
- int notification_;
- // Notification of the window that receives WM_COMMAND when
- // outputing strings.
-
- int idc_;
- // IDC code of the window that receives WM_COMMAND when
- // outputing strings.
-
- ACE_TCHAR *cmdline_;
-
- static ACE_CE_Bridge *default_text_bridge_;
- // A pointer to the default ACE_CE_BRIDGE obj.
-};
-
-# endif /* ACE_HAS_WINCE */
-
-#if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
-# define ACE_ERRNO_TYPE ACE_CE_Errno
-#else
-# define ACE_ERRNO_TYPE int
-#endif /* ACE_HAS_WINCE */
-
-class ACE_Export ACE_Errno_Guard
-{
- // = TITLE
- // Provides a wrapper to improve performance when thread-specific
- // errno must be saved and restored in a block of code.
- //
- // = DESCRIPTION
- // The typical use-case for this is the following:
- //
- // int error = errno;
- // call_some_function_that_might_change_errno ();
- // errno = error;
- //
- // This can be replaced with
- //
- // {
- // ACE_Errno_Guard guard (errno);
- // call_some_function_that_might_change_errno ();
- // }
- //
- // This implementation is more elegant and more efficient since it
- // avoids an unnecessary second access to thread-specific storage
- // by caching a pointer to the value of errno in TSS.
-public:
- // = Initialization and termination methods.
- ACE_Errno_Guard (ACE_ERRNO_TYPE &errno_ref,
- int error);
- // Stash the value of <error> into <error_> and initialize the
- // <errno_ptr_> to the address of <errno_ref>.
-
- ACE_Errno_Guard (ACE_ERRNO_TYPE &errno_ref);
- // Stash the value of <errno> into <error_> and initialize the
- // <errno_ptr_> to the address of <errno_ref>.
-
- ~ACE_Errno_Guard (void);
- // Reset the value of <errno> to <error>.
-
-#if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
- int operator= (const ACE_ERRNO_TYPE &errno_ref);
- // Assign <errno_ref> to <error_>.
-#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
-
- int operator= (int error);
- // Assign <error> to <error_>.
-
- int operator== (int error);
- // Compare <error> with <error_> for equality.
-
- int operator!= (int error);
- // Compare <error> with <error_> for inequality.
-
-private:
-#if defined (ACE_MT_SAFE)
- ACE_ERRNO_TYPE *errno_ptr_;
-#endif /* ACE_MT_SAFE */
- int error_;
-};
-
-# if defined (ACE_WIN32) && ! defined (ACE_HAS_WINCE) \
- && ! defined (ACE_HAS_PHARLAP)
-typedef TRANSMIT_FILE_BUFFERS ACE_TRANSMIT_FILE_BUFFERS;
-typedef LPTRANSMIT_FILE_BUFFERS ACE_LPTRANSMIT_FILE_BUFFERS;
-typedef PTRANSMIT_FILE_BUFFERS ACE_PTRANSMIT_FILE_BUFFERS;
-
-# define ACE_INFINITE INFINITE
-# define ACE_STATUS_TIMEOUT STATUS_TIMEOUT
-# define ACE_WAIT_FAILED WAIT_FAILED
-# define ACE_WAIT_TIMEOUT WAIT_TIMEOUT
-# else /* ACE_WIN32 */
-struct ACE_TRANSMIT_FILE_BUFFERS
-{
- void *Head;
- size_t HeadLength;
- void *Tail;
- size_t TailLength;
-};
-typedef ACE_TRANSMIT_FILE_BUFFERS* ACE_PTRANSMIT_FILE_BUFFERS;
-typedef ACE_TRANSMIT_FILE_BUFFERS* ACE_LPTRANSMIT_FILE_BUFFERS;
-
-# if !defined (ACE_INFINITE)
-# define ACE_INFINITE LONG_MAX
-# endif /* ACE_INFINITE */
-# define ACE_STATUS_TIMEOUT LONG_MAX
-# define ACE_WAIT_FAILED LONG_MAX
-# define ACE_WAIT_TIMEOUT LONG_MAX
-# endif /* ACE_WIN32 */
-
-
-// Some ACE classes always use inline functions to maintain high
-// performance, but some platforms have buggy inline function support.
-// In this case, we don't use inline with them.
-# if defined (ACE_LACKS_INLINE_FUNCTIONS)
-# if defined (ASYS_INLINE)
-# undef ASYS_INLINE
-# endif /* ASYS_INLINE */
-# define ASYS_INLINE
-# if defined (ACE_HAS_INLINED_OSCALLS)
-# undef ACE_HAS_INLINED_OSCALLS
-# endif /* ACE_HAS_INLINED_OSCALLS */
-# else
-# define ASYS_INLINE inline
-# endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-# if !defined (ACE_HAS_MINIMAL_ACE_OS)
-# include "ace/Trace.h"
-# endif /* ! ACE_HAS_MINIMAL_ACE_OS */
-
-
-# if defined (ACE_HAS_INLINED_OSCALLS)
-# if defined (ACE_INLINE)
-# undef ACE_INLINE
-# endif /* ACE_INLINE */
-# define ACE_INLINE inline
-# include "ace/OS.i"
-# endif /* ACE_HAS_INLINED_OSCALLS */
-
-# if !defined (ACE_HAS_MINIMAL_ACE_OS)
- // This needs to come here to avoid problems with circular dependencies.
-# include "ace/Log_Msg.h"
-# endif /* ! ACE_HAS_MINIMAL_ACE_OS */
-
-// Byte swapping macros to deal with differences between little endian
-// and big endian machines. Note that "long" here refers to 32 bit
-// quantities.
-# define ACE_SWAP_LONG(L) ((ACE_SWAP_WORD ((L) & 0xFFFF) << 16) \
- | ACE_SWAP_WORD(((L) >> 16) & 0xFFFF))
-# define ACE_SWAP_WORD(L) ((((L) & 0x00FF) << 8) | (((L) & 0xFF00) >> 8))
-
-# if defined (ACE_LITTLE_ENDIAN)
-# define ACE_HTONL(X) ACE_SWAP_LONG (X)
-# define ACE_NTOHL(X) ACE_SWAP_LONG (X)
-# define ACE_IDL_NCTOHL(X) (X)
-# define ACE_IDL_NSTOHL(X) (X)
-# else
-# define ACE_HTONL(X) X
-# define ACE_NTOHL(X) X
-# define ACE_IDL_NCTOHL(X) (X << 24)
-# define ACE_IDL_NSTOHL(X) ((X) << 16)
-# endif /* ACE_LITTLE_ENDIAN */
-
-# if defined (ACE_LITTLE_ENDIAN)
-# define ACE_HTONS(x) ACE_SWAP_WORD(x)
-# define ACE_NTOHS(x) ACE_SWAP_WORD(x)
-# else
-# define ACE_HTONS(x) x
-# define ACE_NTOHS(x) x
-# endif /* ACE_LITTLE_ENDIAN */
-
-# if defined (ACE_HAS_AIO_CALLS)
- // = Giving unique ACE scoped names for some important
- // RTSignal-Related constants. Becuase sometimes, different
- // platforms use different names for these constants.
-
- // Number of realtime signals provided in the system.
- // _POSIX_RTSIG_MAX is the upper limit on the number of real time
- // signals supported in a posix-4 compliant system.
-# if defined (_POSIX_RTSIG_MAX)
-# define ACE_RTSIG_MAX _POSIX_RTSIG_MAX
-# else /* not _POSIX_RTSIG_MAX */
- // POSIX-4 compilant system has to provide atleast 8 RT signals.
- // @@ Make sure the platform does *not* define this constant with
- // some other name. If yes, use that instead of 8.
-# define ACE_RTSIG_MAX 8
-# endif /* _POSIX_RTSIG_MAX */
-# endif /* ACE_HAS_AIO_CALLS */
-
- // Wrapping around wait status <wstat> macros for platforms that
- // lack them.
-
- // Evaluates to a non-zero value if status was returned for a child
- // process that terminated normally. 0 means status wasn't
- // returned.
-#if !defined (WIFEXITED)
-# define WIFEXITED(stat) 1
-#endif /* WIFEXITED */
-
- // If the value of WIFEXITED(stat) is non-zero, this macro evaluates
- // to the exit code that the child process exit(3C), or the value
- // that the child process returned from main. Peaceful exit code is
- // 0.
-#if !defined (WEXITSTATUS)
-# define WEXITSTATUS(stat) stat
-#endif /* WEXITSTATUS */
-
- // Evaluates to a non-zero value if status was returned for a child
- // process that terminated due to the receipt of a signal. 0 means
- // status wasnt returned.
-#if !defined (WIFSIGNALED)
-# define WIFSIGNALED(stat) 0
-#endif /* WIFSIGNALED */
-
- // If the value of WIFSIGNALED(stat) is non-zero, this macro
- // evaluates to the number of the signal that caused the
- // termination of the child process.
-#if !defined (WTERMSIG)
-# define WTERMSIG(stat) 0
-#endif /* WTERMSIG */
-
-#if !defined (WIFSTOPPED)
-# define WIFSTOPPED(stat) 0
-#endif /* WIFSTOPPED */
-
-#if !defined (WSTOPSIG)
-# define WSTOPSIG(stat) 0
-#endif /* WSTOPSIG */
-
-#if !defined (WIFCONTINUED)
-# define WIFCONTINUED(stat) 0
-#endif /* WIFCONTINUED */
-
-#if !defined (WCOREDUMP)
-# define WCOREDUMP(stat) 0
-#endif /* WCOREDUMP */
-
-// Stuff used by the ACE CDR classes.
-#if defined ACE_LITTLE_ENDIAN
-# define ACE_CDR_BYTE_ORDER 1
-// little endian encapsulation byte order has value = 1
-#else /* ! ACE_LITTLE_ENDIAN */
-# define ACE_CDR_BYTE_ORDER 0
-// big endian encapsulation byte order has value = 0
-#endif /* ! ACE_LITTLE_ENDIAN */
-
-// Default constants for ACE CDR performance optimizations.
-#if !defined (ACE_DEFAULT_CDR_BUFSIZE)
-# define ACE_DEFAULT_CDR_BUFSIZE 512
-#endif /* ACE_DEFAULT_CDR_BUFSIZE */
-#if !defined (ACE_DEFAULT_CDR_EXP_GROWTH_MAX)
-# define ACE_DEFAULT_CDR_EXP_GROWTH_MAX 65536
-#endif /* ACE_DEFAULT_CDR_EXP_GROWTH_MAX */
-#if !defined (ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK)
-# define ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK 65536
-#endif /* ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK */
-// Even though the strategy above minimizes copies in some cases it is
-// more efficient just to copy the octet sequence, for instance, while
-// enconding a "small" octet sequence in a buffer that has enough
-// space. This parameter controls the default value for "small enough",
-// but an ORB may use a different value, set from a command line option.
-#define ACE_DEFAULT_CDR_MEMCPY_TRADEOFF 256
-
-// In some environments it is useful to swap the bytes on write, for
-// instance: a fast server can be feeding a lot of slow clients that
-// happen to have the wrong byte order.
-// This macro enables the functionality to support that, but we still
-// need a way to activate it on a per-connection basis.
-//
-// #define ACE_ENABLE_SWAP_ON_WRITE
-
-// In some environements we never need to swap bytes when reading, for
-// instance embebbed systems (such as avionics) or homogenous
-// networks.
-// Setting this macro disables the capabilities to demarshall streams
-// in the wrong byte order.
-//
-// #define ACE_DISABLE_SWAP_ON_READ
-
-// For some applications it is important to optimize octet sequences
-// and minimize the number of copies made of the sequence buffer.
-// TAO supports this optimizations by sharing the CDR stream buffer
-// and the octet sequences buffer via ACE_Message_Block's.
-// This feature can be disabled for: debugging, performance
-// comparisons, complaince checking (the octet sequences add an API to
-// access the underlying message block).
-
-
-// Typedefs and macros for efficient ACE CDR memory address
-// boundary alignment
-
-// Efficiently align "value" up to "alignment", knowing that all such
-// boundaries are binary powers and that we're using two's complement
-// arithmetic.
-
-// Since the alignment is a power of two its binary representation is:
-// alignment = 0...010...0
-//
-// hence
-//
-// alignment - 1 = 0...001...1 = T1
-//
-// so the complement is:
-//
-// ~(alignment - 1) = 1...110...0 = T2
-//
-// Notice that there is a multiple of <alignment> in the range
-// [<value>,<value> + T1], also notice that if
-//
-// X = ( <value> + T1 ) & T2
-//
-// then
-//
-// <value> <= X <= <value> + T1
-//
-// because the & operator only changes the last bits, and since X is a
-// multiple of <alignment> (its last bits are zero) we have found the
-// multiple we wanted.
-//
-
-#define ACE_align_binary(ptr, alignment) \
- ((ptr + ((ptr_arith_t)((alignment)-1))) & (~((ptr_arith_t)((alignment)-1))))
-
-// Efficiently round "ptr" up to an "alignment" boundary, knowing that
-// all such boundaries are binary powers and that we're using two's
-// complement arithmetic.
-//
-#define ACE_ptr_align_binary(ptr, alignment) \
- ((char *) ACE_align_binary (((ptr_arith_t) (ptr)), (alignment)))
-
-// Defining POSIX4 real-time signal range.
-#if defined ACE_HAS_AIO_CALLS
-#define ACE_SIGRTMIN SIGRTMIN
-#define ACE_SIGRTMAX SIGRTMAX
-#else /* !ACE_HAS_AIO_CALLS */
-#define ACE_SIGRTMIN 0
-#define ACE_SIGRTMAX 0
-#endif /* ACE_HAS_AIO_CALLS */
-
-#include "ace/post.h"
-#endif /* ACE_OS_H */
diff --git a/ace/OS.i b/ace/OS.i
deleted file mode 100644
index cdf74c2b5b8..00000000000
--- a/ace/OS.i
+++ /dev/null
@@ -1,12295 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-#if !defined (ACE_HAS_INLINED_OSCALLS)
-# undef ACE_INLINE
-# define ACE_INLINE
-#endif /* ACE_HAS_INLINED_OSCALLS */
-
-#if defined (ACE_LACKS_RLIMIT_PROTOTYPE)
-int getrlimit (int resource, struct rlimit *rlp);
-int setrlimit (int resource, const struct rlimit *rlp);
-#endif /* ACE_LACKS_RLIMIT_PROTOTYPE */
-
-#if !defined (ACE_HAS_STRERROR)
-# if defined (ACE_HAS_SYS_ERRLIST)
-extern char *sys_errlist[];
-# define strerror(err) sys_errlist[err]
-# else
-# define strerror(err) "strerror is unsupported"
-# endif /* ACE_HAS_SYS_ERRLIST */
-#endif /* !ACE_HAS_STERROR */
-
-#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 */
-
-#if defined (ACE_HAS_SOCKLEN_T)
-typedef socklen_t ACE_SOCKET_LEN;
-#elif defined (ACE_HAS_SIZET_SOCKET_LEN)
-typedef size_t ACE_SOCKET_LEN;
-#else
-typedef int ACE_SOCKET_LEN;
-#endif /* ACE_HAS_SIZET_SOCKET_LEN */
-
-#if defined (ACE_LACKS_CONST_STRBUF_PTR)
-typedef struct strbuf *ACE_STRBUF_TYPE;
-#else
-typedef const struct strbuf *ACE_STRBUF_TYPE;
-#endif /* ACE_LACKS_CONST_STRBUF_PTR */
-
-#if defined (ACE_HAS_VOIDPTR_SOCKOPT)
-typedef void *ACE_SOCKOPT_TYPE1;
-#elif defined (ACE_HAS_CHARPTR_SOCKOPT)
-typedef char *ACE_SOCKOPT_TYPE1;
-#else
-typedef const char *ACE_SOCKOPT_TYPE1;
-#endif /* ACE_HAS_VOIDPTR_SOCKOPT */
-
-#if !defined (_BSD_SOURCE) && \
- !defined (_XOPEN_SOURCE) && !defined (_XOPEN_SOURCE_EXTENDED)
-# if defined (ACE_LACKS_SETREUID_PROTOTYPE)
-extern "C" {
-extern int setreuid (uid_t ruid, uid_t euid);
-}
-# endif /* ACE_LACKS_SETREUID_PROTOTYPE */
-
-# if defined (ACE_LACKS_SETREGID_PROTOTYPE)
-extern "C" {
-extern int setregid (gid_t rgid, gid_t egid);
-}
-# endif /* ACE_LACKS_SETREGID_PROTOTYPE */
-#endif /* !_BSD_SOURCE && !_XOPEN_SOURCE && !_XOPEN_SOURCE_EXTENDED */
-
-#if defined (ACE_LACKS_WRITEV)
-extern "C" ACE_Export int writev (ACE_HANDLE handle, ACE_WRITEV_TYPE *iov, int iovcnt);
-#endif /* ACE_LACKS_WRITEV */
-
-#if defined (ACE_LACKS_READV)
-extern "C" ACE_Export ssize_t readv (ACE_HANDLE handle, ACE_READV_TYPE *iov, int iovcnt);
-#endif /* ACE_LACKS_READV */
-
-#if defined (ACE_NEEDS_FTRUNCATE)
-extern "C" ACE_Export int ftruncate (ACE_HANDLE handle, long len);
-#endif /* ACE_NEEDS_FTRUNCATE */
-
-#if defined (ACE_HAS_VOIDPTR_MMAP)
-// Needed for some odd OS's (e.g., SGI).
-typedef void *ACE_MMAP_TYPE;
-#else
-typedef char *ACE_MMAP_TYPE;
-#endif /* ACE_HAS_VOIDPTR_MMAP */
-
-#if defined (ACE_HAS_XLI)
-# include /**/ <xliuser.h>
-#endif /* ACE_HAS_XLI */
-
-#if defined (_M_UNIX)
-extern "C" int _dlclose (void *);
-extern "C" char *_dlerror (void);
-extern "C" void *_dlopen (const char *, int);
-extern "C" void * _dlsym (void *, const char *);
-#endif /* _M_UNIX */
-
-#if !defined (ACE_HAS_CPLUSPLUS_HEADERS)
-# include /**/ <libc.h>
-# include /**/ <osfcn.h>
-#endif /* ACE_HAS_CPLUSPLUS_HEADERS */
-
-#if defined (ACE_HAS_SYSENT_H)
-# include /**/ <sysent.h>
-#endif /* ACE_HAS_SYSENT_H_*/
-
-#if defined (ACE_HAS_SVR4_GETTIMEOFDAY)
-# if !defined (m88k) && !defined (SCO)
-extern "C" int gettimeofday (struct timeval *tp, void * = 0);
-# else
-extern "C" int gettimeofday (struct timeval *tp);
-# endif /* !m88k && !SCO */
-#elif defined (ACE_HAS_OSF1_GETTIMEOFDAY)
-extern "C" int gettimeofday (struct timeval *tp, struct timezone * = 0);
-#elif defined (ACE_HAS_SUNOS4_GETTIMEOFDAY)
-# define ACE_HAS_SVR4_GETTIMEOFDAY
-#endif /* ACE_HAS_SVR4_GETTIMEOFDAY */
-
-#if defined (ACE_LACKS_CONST_TIMESPEC_PTR)
-typedef struct timespec * ACE_TIMESPEC_PTR;
-#else
-typedef const struct timespec * ACE_TIMESPEC_PTR;
-#endif /* HPUX */
-
-#if !defined (ACE_LACKS_MALLOC_H)
-# include /**/ <malloc.h>
-#endif /* ACE_LACKS_MALLOC_H */
-
-ACE_INLINE
-ACE_Errno_Guard::ACE_Errno_Guard (ACE_ERRNO_TYPE &errno_ref,
- int error)
- :
-#if defined (ACE_MT_SAFE)
- errno_ptr_ (&errno_ref),
-#endif /* ACE_MT_SAFE */
- error_ (error)
-{
-#if !defined(ACE_MT_SAFE)
- ACE_UNUSED_ARG (errno_ref);
-#endif /* ACE_MT_SAFE */
-}
-
-ACE_INLINE
-ACE_Errno_Guard::ACE_Errno_Guard (ACE_ERRNO_TYPE &errno_ref)
- :
-#if defined (ACE_MT_SAFE)
- errno_ptr_ (&errno_ref),
-#endif /* ACE_MT_SAFE */
- error_ (errno_ref)
-{
-}
-
-ACE_INLINE
-ACE_Errno_Guard::~ACE_Errno_Guard (void)
-{
-#if defined (ACE_MT_SAFE)
- *errno_ptr_ = this->error_;
-#else
- errno = this->error_;
-#endif /* ACE_MT_SAFE */
-}
-
-#if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
-ACE_INLINE int
-ACE_Errno_Guard::operator= (const ACE_ERRNO_TYPE &error)
-{
- return this->error_ = error;
-}
-#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
-
-ACE_INLINE int
-ACE_Errno_Guard::operator= (int error)
-{
- return this->error_ = error;
-}
-
-ACE_INLINE int
-ACE_Errno_Guard::operator== (int error)
-{
- return this->error_ == error;
-}
-
-ACE_INLINE int
-ACE_Errno_Guard::operator!= (int error)
-{
- return this->error_ != error;
-}
-
-#if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
-ACE_INLINE ACE_CE_Errno *
-ACE_CE_Errno::instance ()
-{
- // This should be inlined.
- return ACE_CE_Errno::instance_;
-}
-
-ACE_INLINE
-ACE_CE_Errno::operator int (void) const
-{
- return (int) TlsGetValue (ACE_CE_Errno::errno_key_);
-}
-
-ACE_INLINE int
-ACE_CE_Errno::operator= (int x)
-{
- // error checking?
- TlsSetValue (ACE_CE_Errno::errno_key_, (void *) x);
- return x;
-}
-#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
-
-// Returns the value of the object as a timeval.
-
-ACE_INLINE
-ACE_Time_Value::operator timeval () const
-{
- ACE_TRACE ("ACE_Time_Value::operator timeval");
- return this->tv_;
-}
-
-// Returns a pointer to the object as a timeval.
-
-ACE_INLINE
-ACE_Time_Value::operator const timeval * () const
-{
- ACE_TRACE ("ACE_Time_Value::operator timeval");
- return (const timeval *) &this->tv_;
-}
-
-ACE_INLINE void
-ACE_Time_Value::set (long sec, long usec)
-{
- // ACE_TRACE ("ACE_Time_Value::set");
- this->tv_.tv_sec = sec;
- this->tv_.tv_usec = usec;
-}
-
-ACE_INLINE void
-ACE_Time_Value::set (double d)
-{
- // ACE_TRACE ("ACE_Time_Value::set");
- long l = (long) d;
- this->tv_.tv_sec = l;
- this->tv_.tv_usec = (long) ((d - (double) l) * ACE_ONE_SECOND_IN_USECS);
- this->normalize ();
-}
-
-// Initializes a timespec_t. Note that this approach loses precision
-// since it converts the nano-seconds into micro-seconds. But then
-// again, do any real systems have nano-second timer precision?!
-
-ACE_INLINE void
-ACE_Time_Value::set (const timespec_t &tv)
-{
- // ACE_TRACE ("ACE_Time_Value::set");
-#if ! defined(ACE_HAS_BROKEN_TIMESPEC_MEMBERS)
- this->tv_.tv_sec = tv.tv_sec;
- // Convert nanoseconds into microseconds.
- this->tv_.tv_usec = tv.tv_nsec / 1000;
-#else
- this->tv_.tv_sec = tv.ts_sec;
- // Convert nanoseconds into microseconds.
- this->tv_.tv_usec = tv.ts_nsec / 1000;
-#endif /* ACE_HAS_BROKEN_TIMESPEC_MEMBERS */
-
- this->normalize ();
-}
-
-ACE_INLINE void
-ACE_Time_Value::set (const timeval &tv)
-{
- // ACE_TRACE ("ACE_Time_Value::set");
- this->tv_.tv_sec = tv.tv_sec;
- this->tv_.tv_usec = tv.tv_usec;
-
- this->normalize ();
-}
-
-ACE_INLINE
-ACE_Time_Value::ACE_Time_Value (const timeval &tv)
- // : tv_ ()
-{
- // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
- this->set (tv);
-}
-
-ACE_INLINE
-ACE_Time_Value::ACE_Time_Value (void)
- // : tv_ ()
-{
- // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
- this->set (0, 0);
-
- // Don't need to normalize time value of (0, 0).
-}
-
-ACE_INLINE
-ACE_Time_Value::ACE_Time_Value (long sec, long usec)
-{
- // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
- this->set (sec, usec);
- this->normalize ();
-}
-
-// Returns number of seconds.
-
-ACE_INLINE long
-ACE_Time_Value::sec (void) const
-{
- ACE_TRACE ("ACE_Time_Value::sec");
- return this->tv_.tv_sec;
-}
-
-// Sets the number of seconds.
-
-ACE_INLINE void
-ACE_Time_Value::sec (long sec)
-{
- ACE_TRACE ("ACE_Time_Value::sec");
- this->tv_.tv_sec = sec;
-}
-
-// Converts from Time_Value format into milli-seconds format.
-
-ACE_INLINE long
-ACE_Time_Value::msec (void) const
-{
- ACE_TRACE ("ACE_Time_Value::msec");
- return this->tv_.tv_sec * 1000 + this->tv_.tv_usec / 1000;
-}
-
-// Converts from milli-seconds format into Time_Value format.
-
-ACE_INLINE void
-ACE_Time_Value::msec (long milliseconds)
-{
- ACE_TRACE ("ACE_Time_Value::msec");
- // Convert millisecond units to seconds;
- this->tv_.tv_sec = milliseconds / 1000;
- // Convert remainder to microseconds;
- this->tv_.tv_usec = (milliseconds - (this->tv_.tv_sec * 1000)) * 1000;
-}
-
-// Returns number of micro-seconds.
-
-ACE_INLINE long
-ACE_Time_Value::usec (void) const
-{
- ACE_TRACE ("ACE_Time_Value::usec");
- return this->tv_.tv_usec;
-}
-
-// Sets the number of micro-seconds.
-
-ACE_INLINE void
-ACE_Time_Value::usec (long usec)
-{
- ACE_TRACE ("ACE_Time_Value::usec");
- this->tv_.tv_usec = usec;
-}
-
-// True if tv1 > tv2.
-
-ACE_INLINE int
-operator > (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2)
-{
- ACE_TRACE ("operator >");
- if (tv1.sec () > tv2.sec ())
- return 1;
- else if (tv1.sec () == tv2.sec ()
- && tv1.usec () > tv2.usec ())
- return 1;
- else
- return 0;
-}
-
-// True if tv1 >= tv2.
-
-ACE_INLINE int
-operator >= (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2)
-{
- ACE_TRACE ("operator >=");
- if (tv1.sec () > tv2.sec ())
- return 1;
- else if (tv1.sec () == tv2.sec ()
- && tv1.usec () >= tv2.usec ())
- return 1;
- else
- return 0;
-}
-
-// Returns the value of the object as a timespec_t.
-
-ACE_INLINE
-ACE_Time_Value::operator timespec_t () const
-{
- ACE_TRACE ("ACE_Time_Value::operator timespec_t");
- timespec_t tv;
-#if ! defined(ACE_HAS_BROKEN_TIMESPEC_MEMBERS)
- tv.tv_sec = this->sec ();
- // Convert microseconds into nanoseconds.
- tv.tv_nsec = this->tv_.tv_usec * 1000;
-#else
- tv.ts_sec = this->sec ();
- // Convert microseconds into nanoseconds.
- tv.ts_nsec = this->tv_.tv_usec * 1000;
-#endif /* ACE_HAS_BROKEN_TIMESPEC_MEMBERS */
- return tv;
-}
-
-// Initializes the ACE_Time_Value object from a timespec_t.
-
-ACE_INLINE
-ACE_Time_Value::ACE_Time_Value (const timespec_t &tv)
- // : tv_ ()
-{
- // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
- this->set (tv);
-}
-
-// Initializes the ACE_Time_Value object from another ACE_Time_Value
-
-ACE_INLINE
-ACE_Time_Value::ACE_Time_Value (const ACE_Time_Value &tv)
- : tv_ (tv.tv_)
-{
- // ACE_TRACE ("ACE_Time_Value::ACE_Time_Value");
-}
-
-// True if tv1 < tv2.
-
-ACE_INLINE int
-operator < (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2)
-{
- ACE_TRACE ("operator <");
- return tv2 > tv1;
-}
-
-// True if tv1 >= tv2.
-
-ACE_INLINE int
-operator <= (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2)
-{
- ACE_TRACE ("operator <=");
- return tv2 >= tv1;
-}
-
-// True if tv1 == tv2.
-
-ACE_INLINE int
-operator == (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2)
-{
- // ACE_TRACE ("operator ==");
- return tv1.sec () == tv2.sec ()
- && tv1.usec () == tv2.usec ();
-}
-
-// True if tv1 != tv2.
-
-ACE_INLINE int
-operator != (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2)
-{
- // ACE_TRACE ("operator !=");
- return !(tv1 == tv2);
-}
-
-// Add TV to this.
-
-ACE_INLINE void
-ACE_Time_Value::operator+= (const ACE_Time_Value &tv)
-{
- ACE_TRACE ("ACE_Time_Value::operator+=");
- this->sec (this->sec () + tv.sec ());
- this->usec (this->usec () + tv.usec ());
- this->normalize ();
-}
-
-// Subtract TV to this.
-
-ACE_INLINE void
-ACE_Time_Value::operator-= (const ACE_Time_Value &tv)
-{
- ACE_TRACE ("ACE_Time_Value::operator-=");
- this->sec (this->sec () - tv.sec ());
- this->usec (this->usec () - tv.usec ());
- this->normalize ();
-}
-
-// Adds two ACE_Time_Value objects together, returns the sum.
-
-ACE_INLINE ACE_Time_Value
-operator + (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2)
-{
- ACE_TRACE ("operator +");
- ACE_Time_Value sum (tv1.sec () + tv2.sec (),
- tv1.usec () + tv2.usec ());
-
- sum.normalize ();
- return sum;
-}
-
-// Subtracts two ACE_Time_Value objects, returns the difference.
-
-ACE_INLINE ACE_Time_Value
-operator - (const ACE_Time_Value &tv1,
- const ACE_Time_Value &tv2)
-{
- ACE_TRACE ("operator -");
- ACE_Time_Value delta (tv1.sec () - tv2.sec (),
- tv1.usec () - tv2.usec ());
- delta.normalize ();
- return delta;
-}
-
-ACE_INLINE int
-ACE_OS::fcntl (ACE_HANDLE handle, int cmd, long arg)
-{
- ACE_TRACE ("ACE_OS::fcntl");
-# if defined (ACE_LACKS_FCNTL)
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (cmd);
- ACE_UNUSED_ARG (arg);
- ACE_NOTSUP_RETURN (-1);
-# else
- ACE_OSCALL_RETURN (::fcntl (handle, cmd, arg), int, -1);
-# endif /* ACE_LACKS_FCNTL */
-}
-
-ACE_INLINE int
-ACE_OS::chdir (const ACE_TCHAR *path)
-{
- ACE_TRACE ("ACE_OS::chdir");
-# if defined (VXWORKS)
- ACE_OSCALL_RETURN (::chdir (ACE_const_cast (char *, path)), int, -1);
-
-# elif defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (path);
- ACE_NOTSUP_RETURN (-1);
-
-# elif defined (ACE_PSOS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::change_dir ((char *) path), ace_result_),
- int, -1);
-
-# elif defined (__IBMCPP__) && (__IBMCPP__ >= 400)
- ACE_OSCALL_RETURN (::_chdir (path), int, -1);
-
-#elif defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (path);
- ACE_NOTSUP_RETURN (-1);
-
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wchdir (path), int, -1);
-
-#else
- ACE_OSCALL_RETURN (::chdir (path), int, -1);
-
-# endif /* VXWORKS */
-}
-
-#if !defined (ACE_LACKS_MKTEMP)
-ACE_INLINE ACE_TCHAR *
-ACE_OS::mktemp (ACE_TCHAR *s)
-{
-# if defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- return ::_wmktemp (s);
-# elif defined (ACE_WIN32)
- return ::_mktemp (s);
-# else /* ACE_WIN32 */
- return ::mktemp (s);
-# endif /* ACE_WIN32 */
-}
-#endif /* !ACE_LACKS_MKTEMP */
-
-ACE_INLINE int
-ACE_OS::mkfifo (const ACE_TCHAR *file, mode_t mode)
-{
- ACE_TRACE ("ACE_OS::mkfifo");
-#if defined (ACE_LACKS_MKFIFO)
- ACE_UNUSED_ARG (file);
- ACE_UNUSED_ARG (mode);
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_OSCALL_RETURN (::mkfifo (file, mode), int, -1);
-# endif /* ACE_LACKS_MKFIFO */
-}
-
-#if !defined (ACE_WIN32)
-
-// Matthew Stevens 7-10-95 Fix GNU GCC 2.7 for memchr() problem.
-# if defined (ACE_HAS_GNU_CSTRING_H)
-// Define this file to keep /usr/include/memory.h from being included.
-# include /**/ <cstring>
-# else
-# if defined (ACE_LACKS_MEMORY_H)
-# if !defined (ACE_PSOS_DIAB_MIPS)
-# include /**/ <string.h>
-# endif /* ACE_PSOS_DIAB_MIPS */
-# else
-# include /**/ <memory.h>
-# endif /* VXWORKS */
-# endif /* ACE_HAS_GNU_CSTRING_H */
-
-// These prototypes are chronically lacking from many versions of
-// UNIX.
-extern "C" int t_getname (int, struct netbuf *, int);
-extern "C" int isastream (int);
-# if !defined (ACE_HAS_GETRUSAGE_PROTO)
-extern "C" int getrusage (int who, struct rusage *rusage);
-# endif /* ! ACE_HAS_GETRUSAGE_PROTO */
-
-# if defined (ACE_LACKS_SYSCALL)
-extern "C" int syscall (int, ACE_HANDLE, struct rusage *);
-# endif /* ACE_LACKS_SYSCALL */
-
-# if defined (ACE_LACKS_MKTEMP)
-extern "C" char *mktemp (char *);
-# endif /* ACE_LACKS_MKTEMP */
-
-// The following are #defines and #includes that must be visible for
-// ACE to compile it's OS wrapper class implementation correctly. We
-// put them inside of here to reduce compiler overhead if we're not
-// inlining...
-
-# if defined (ACE_HAS_REGEX)
-# include /**/ <regexpr.h>
-# endif /* ACE_HAS_REGEX */
-
-# if defined (ACE_HAS_SYSINFO)
-# include /**/ <sys/systeminfo.h>
-# endif /* ACE_HAS_SYS_INFO */
-
-# if defined (ACE_HAS_SYSCALL_H)
-# include /**/ <sys/syscall.h>
-# endif /* ACE_HAS_SYSCALL_H */
-
-# if defined (UNIXWARE) /* See strcasecmp, below */
-# include /**/ <ctype.h>
-# endif /* UNIXWARE */
-
-// Adapt the weird threading and synchronization routines (which
-// return errno rather than -1) so that they return -1 and set errno.
-// This is more consistent with the rest of ACE_OS and enables use to
-// use the ACE_OSCALL* macros.
-# if defined (VXWORKS)
-# define ACE_ADAPT_RETVAL(OP,RESULT) ((RESULT = (OP)) != OK ? (errno = RESULT, -1) : 0)
-# else
-# define ACE_ADAPT_RETVAL(OP,RESULT) ((RESULT = (OP)) != 0 ? (errno = RESULT, -1) : 0)
-# endif /* VXWORKS */
-
-ACE_INLINE int
-ACE_OS::fstat (ACE_HANDLE handle, struct stat *stp)
-{
- ACE_TRACE ("ACE_OS::fstat");
-#if defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (stp);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_PSOS)
- ACE_OSCALL_RETURN (::fstat_f (handle, stp), int, -1);
-#else
-# if defined (ACE_HAS_X86_STAT_MACROS)
- // Solaris for intel uses an macro for fstat(), this is a wrapper
- // for _fxstat() use of the macro.
- // causes compile and runtime problems.
- ACE_OSCALL_RETURN (::_fxstat (_STAT_VER, handle, stp), int, -1);
-# else /* !ACE_HAS_X86_STAT_MACROS */
- ACE_OSCALL_RETURN (::fstat (handle, stp), int, -1);
-# endif /* !ACE_HAS_X86_STAT_MACROS */
-#endif /* defined (ACE_PSOS) */
-}
-
-ACE_INLINE int
-ACE_OS::lstat (const char *file, struct stat *stp)
-{
- ACE_TRACE ("ACE_OS::lstat");
-# if defined (ACE_LACKS_LSTAT) || \
- defined (ACE_HAS_WINCE) || defined (ACE_WIN32)
- ACE_UNUSED_ARG (file);
- ACE_UNUSED_ARG (stp);
- ACE_NOTSUP_RETURN (-1);
-#else
-# if defined (ACE_HAS_X86_STAT_MACROS)
- // Solaris for intel uses an macro for lstat(), this macro is a
- // wrapper for _lxstat().
- ACE_OSCALL_RETURN (::_lxstat (_STAT_VER, file, stp), int, -1);
-#else /* !ACE_HAS_X86_STAT_MACROS */
- ACE_OSCALL_RETURN (::lstat (file, stp), int, -1);
-#endif /* !ACE_HAS_X86_STAT_MACROS */
-# endif /* VXWORKS */
-}
-
-ACE_INLINE int
-ACE_OS::fsync (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::fsync");
-# if defined (ACE_LACKS_FSYNC)
- ACE_UNUSED_ARG (handle);
- ACE_NOTSUP_RETURN (-1);
-# else
- ACE_OSCALL_RETURN (::fsync (handle), int, -1);
-# endif /* ACE_LACKS_FSYNC */
-}
-
-ACE_INLINE int
-ACE_OS::getopt (int argc, char *const *argv, const char *optstring)
-{
- ACE_TRACE ("ACE_OS::getopt");
-#if defined (VXWORKS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (argc);
- ACE_UNUSED_ARG (argv);
- ACE_UNUSED_ARG (optstring);
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_LACKS_GETOPT_PROTO)
- ACE_OSCALL_RETURN (::getopt (argc, (char**) argv, optstring), int, -1);
-# elif defined (ACE_LACKS_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::getopt (argc, (const char* const *) argv, optstring), int, -1);
-# else
- ACE_OSCALL_RETURN (::getopt (argc, argv, optstring), int, -1);
-# endif /* VXWORKS */
-}
-
-ACE_INLINE int
-ACE_OS::pipe (ACE_HANDLE fds[])
-{
- ACE_TRACE ("ACE_OS::pipe");
-#if defined (VXWORKS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (fds);
- ACE_NOTSUP_RETURN (-1);
-# else
- ACE_OSCALL_RETURN (::pipe (fds), int, -1);
-# endif /* VXWORKS */
-}
-
-# if defined (DIGITAL_UNIX)
-extern "C" {
- extern char *_Pctime_r (const time_t *, char *);
- extern struct tm *_Plocaltime_r (const time_t *, struct tm *);
- extern struct tm *_Pgmtime_r (const time_t *, struct tm *);
- extern char *_Pasctime_r (const struct tm *, char *);
- extern int _Prand_r (unsigned int *seedptr);
- extern int _Pgetpwnam_r (const char *, struct passwd *,
- char *, size_t, struct passwd **);
-}
-# endif /* DIGITAL_UNIX */
-
-// VAC++ doesn't correctly grok the ::getpwnam_r - the function is redefined
-// in pwd.h, and that redefinition is used here
-# if defined (_AIX) && defined (__IBMCPP__) && (__IBMCPP__ >= 400)
-extern "C" {
- extern int _posix_getpwnam_r(const char *, struct passwd *, char *,
- int, struct passwd **);
- }
-#endif /* AIX and VAC++ 4 */
-
-ACE_INLINE int
-ACE_OS::rand_r (ACE_RANDR_TYPE &seed)
-{
- ACE_TRACE ("ACE_OS::rand_r");
-# if defined (ACE_HAS_REENTRANT_FUNCTIONS) && \
- !defined (ACE_LACKS_RAND_REENTRANT_FUNCTIONS)
-# if defined (DIGITAL_UNIX)
- ACE_OSCALL_RETURN (::_Prand_r (&seed), int, -1);
-# elif defined (HPUX_10)
- // rand() is thread-safe on HP-UX 10. rand_r's signature is not consistent
- // with latest POSIX and will change in a future HP-UX release so that it
- // is consistent. At that point, this #elif section can be changed or
- // removed, and just call rand_r.
- ACE_UNUSED_ARG (seed);
- ACE_OSCALL_RETURN (::rand(), int, -1);
-# elif defined (ACE_HAS_BROKEN_RANDR)
- ACE_OSCALL_RETURN (::rand_r (seed), int, -1);
-# else
- ACE_OSCALL_RETURN (::rand_r (&seed), int, -1);
-# endif /* DIGITAL_UNIX */
-# else
- ACE_UNUSED_ARG (seed);
- ACE_OSCALL_RETURN (::rand (), int, -1);
-# endif /* ACE_HAS_REENTRANT_FUNCTIONS */
-}
-
-ACE_INLINE pid_t
-ACE_OS::setsid (void)
-{
- ACE_TRACE ("ACE_OS::setsid");
-#if defined (VXWORKS) || defined (CHORUS) || defined (ACE_PSOS)
- ACE_NOTSUP_RETURN (-1);
-# else
- ACE_OSCALL_RETURN (::setsid (), int, -1);
-# endif /* VXWORKS */
-}
-
-ACE_INLINE mode_t
-ACE_OS::umask (mode_t cmask)
-{
- ACE_TRACE ("ACE_OS::umask");
-#if defined (VXWORKS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (cmask);
- ACE_NOTSUP_RETURN (-1);
-# else
- return ::umask (cmask); // This call shouldn't fail...
-# endif /* VXWORKS */
-}
-
-#else /* ACE_WIN32 */
-
-// Adapt the Win32 System Calls (which return BOOLEAN values of TRUE
-// and FALSE) into int values expected by the ACE_OSCALL macros.
-# define ACE_ADAPT_RETVAL(OP,RESULT) ((RESULT = (OP)) == FALSE ? -1 : 0)
-
-// Perform a mapping of Win32 error numbers into POSIX errnos.
-# define ACE_FAIL_RETURN(RESULT) do { \
- switch (ACE_OS::set_errno_to_last_error ()) { \
- case ERROR_NOT_ENOUGH_MEMORY: errno = ENOMEM; break; \
- case ERROR_FILE_EXISTS: errno = EEXIST; break; \
- case ERROR_SHARING_VIOLATION: errno = EACCES; break; \
- case ERROR_PATH_NOT_FOUND: errno = ENOENT; break; \
- } \
- return RESULT; } while (0)
-
-ACE_INLINE LPSECURITY_ATTRIBUTES
-ACE_OS::default_win32_security_attributes (LPSECURITY_ATTRIBUTES sa)
-{
-#if defined (ACE_DEFINES_DEFAULT_WIN32_SECURITY_ATTRIBUTES)
- if (sa == 0)
- {
- // @@ This is a good place to use pthread_once.
- static SECURITY_ATTRIBUTES default_sa;
- static SECURITY_DESCRIPTOR sd;
- InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE);
- default_sa.nLength = sizeof(SECURITY_ATTRIBUTES);
- default_sa.lpSecurityDescriptor = &sd;
- default_sa.bInheritHandle = TRUE;
- sa = &default_sa;
- }
- return sa;
-#else /* !ACE_DEFINES_DEFAULT_WIN32_SECURITY_ATTRIBUTES */
- return sa;
-#endif /* ACE_DEFINES_DEFAULT_WIN32_SECURITY_ATTRIBUTES */
-}
-
-ACE_INLINE int
-ACE_OS::getopt (int argc, char *const *argv, const char *optstring)
-{
- ACE_UNUSED_ARG (argc);
- ACE_UNUSED_ARG (argv);
- ACE_UNUSED_ARG (optstring);
-
- ACE_TRACE ("ACE_OS::getopt");
- ACE_NOTSUP_RETURN (-1);
-}
-
-ACE_INLINE int
-ACE_OS::pipe (ACE_HANDLE fds[])
-{
-# if !defined (ACE_HAS_WINCE) && !defined (__IBMCPP__) //VisualAge C++ 4.0 does not support this
- ACE_TRACE ("ACE_OS::pipe");
- ACE_OSCALL_RETURN (::_pipe ((int *) fds, PIPE_BUF, 0),
- int,
- -1); // Use default mode
-# else
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::rand_r (ACE_RANDR_TYPE& seed)
-{
- ACE_UNUSED_ARG (seed);
-
- ACE_TRACE ("ACE_OS::rand_r");
- ACE_NOTSUP_RETURN (-1);
-}
-
-ACE_INLINE pid_t
-ACE_OS::setsid (void)
-{
- ACE_TRACE ("ACE_OS::setsid");
- ACE_NOTSUP_RETURN (-1);
-}
-
-ACE_INLINE mode_t
-ACE_OS::umask (mode_t cmask)
-{
-# if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::umask");
- ACE_OSCALL_RETURN (::_umask (cmask), int, -1);
-# else
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::fstat (ACE_HANDLE handle, struct stat *stp)
-{
- ACE_TRACE ("ACE_OS::fstat");
-# if 1
- BY_HANDLE_FILE_INFORMATION fdata;
-
- if (::GetFileInformationByHandle (handle, &fdata) == FALSE)
- {
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- else if (fdata.nFileSizeHigh != 0)
- {
- errno = EINVAL;
- return -1;
- }
- else
- {
- stp->st_size = fdata.nFileSizeLow;
- stp->st_atime = ACE_Time_Value (fdata.ftLastAccessTime).sec ();
- stp->st_mtime = ACE_Time_Value (fdata.ftLastWriteTime).sec ();
-#if !defined (ACE_HAS_WINCE)
- stp->st_ctime = ACE_Time_Value (fdata.ftCreationTime).sec ();
- stp->st_nlink = ACE_static_cast (short, fdata.nNumberOfLinks);
- stp->st_dev = stp->st_rdev = 0; // No equivalent conversion.
- stp->st_mode = S_IXOTH | S_IROTH |
- (fdata.dwFileAttributes & FILE_ATTRIBUTE_READONLY ? 0 : S_IWOTH);
-#endif /* !ACE_HAS_WINCE */
- }
- return 0;
-# else /* 1 */
- // This implementation close the handle.
- int retval = -1;
- int fd = ::_open_osfhandle ((long) handle, 0);
- if (fd != -1)
- retval = ::_fstat (fd, (struct _stat *) stp);
-
- ::_close (fd);
- // Remember to close the file handle.
- return retval;
-# endif /* 1 */
-}
-
-#endif /* WIN32 */
-
-ACE_INLINE int
-ACE_OS::clock_gettime (clockid_t clockid, struct timespec *ts)
-{
- ACE_TRACE ("ACE_OS::clock_gettime");
-#if defined (ACE_HAS_CLOCK_GETTIME)
- ACE_OSCALL_RETURN (::clock_gettime (clockid, ts), int, -1);
-# elif defined (ACE_PSOS) && ! defined (ACE_PSOS_DIAB_MIPS)
- ACE_UNUSED_ARG (clockid);
- ACE_PSOS_Time_t pt;
- int result = ACE_PSOS_Time_t::get_system_time (pt);
- *ts = ACE_static_cast (struct timespec, pt);
- return result;
-#else
- ACE_UNUSED_ARG (clockid);
- ACE_UNUSED_ARG (ts);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_CLOCK_GETTIME */
-}
-
-ACE_INLINE ACE_Time_Value
-ACE_OS::gettimeofday (void)
-{
- // ACE_TRACE ("ACE_OS::gettimeofday");
-
- timeval tv;
- int result = 0;
-#if defined (ACE_HAS_WINCE)
- SYSTEMTIME tsys;
- FILETIME tfile;
- ::GetSystemTime (&tsys);
- ::SystemTimeToFileTime (&tsys, &tfile);
- return ACE_Time_Value (tfile);
-#elif defined (ACE_WIN32)
- FILETIME tfile;
- ::GetSystemTimeAsFileTime (&tfile);
- return ACE_Time_Value (tfile);
-#if 0
- // From Todd Montgomery...
- struct _timeb tb;
- ::_ftime (&tb);
- tv.tv_sec = tb.time;
- tv.tv_usec = 1000 * tb.millitm;
-#endif /* 0 */
-#elif defined (ACE_HAS_AIX_HI_RES_TIMER)
- timebasestruct_t tb;
-
- ::read_real_time (&tb, TIMEBASE_SZ);
- ::time_base_to_time (&tb, TIMEBASE_SZ);
-
- tv.tv_sec = tb.tb_high;
- tv.tv_usec = tb.tb_low / 1000L;
-#else
-# if defined (ACE_HAS_TIMEZONE_GETTIMEOFDAY) || \
- (defined (ACE_HAS_SVR4_GETTIMEOFDAY) && !defined (m88k) && !defined (SCO))
- ACE_OSCALL (::gettimeofday (&tv, 0), int, -1, result);
-# elif defined (VXWORKS) || defined (CHORUS) || defined (ACE_PSOS)
- // Assumes that struct timespec is same size as struct timeval,
- // which assumes that time_t is a long: it currently (VxWorks
- // 5.2/5.3) is.
- struct timespec ts;
-
- ACE_OSCALL (ACE_OS::clock_gettime (CLOCK_REALTIME, &ts), int, -1, result);
- tv.tv_sec = ts.tv_sec;
- tv.tv_usec = ts.tv_nsec / 1000L; // timespec has nsec, but timeval has usec
-# else
- ACE_OSCALL (::gettimeofday (&tv), int, -1, result);
-# endif /* ACE_HAS_SVR4_GETTIMEOFDAY */
-#endif /* ACE_WIN32 */
- if (result == -1)
- return -1;
- else
- return ACE_Time_Value (tv);
-}
-
-ACE_INLINE int
-ACE_OS::stat (const ACE_TCHAR *file, struct stat *stp)
-{
- ACE_TRACE ("ACE_OS::stat");
-#if defined (VXWORKS)
- ACE_OSCALL_RETURN (::stat ((char *) file, stp), int, -1);
-#elif defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (file);
- ACE_UNUSED_ARG (stp);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_PSOS)
- ACE_OSCALL_RETURN (::stat_f ((char *) file, stp), int, -1);
-#elif defined (ACE_HAS_WINCE)
- ACE_TEXT_WIN32_FIND_DATA fdata;
-
- HANDLE fhandle;
-
- fhandle = ::FindFirstFile (file, &fdata);
- if (fhandle == INVALID_HANDLE_VALUE)
- {
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- else if (fdata.nFileSizeHigh != 0)
- {
- errno = EINVAL;
- return -1;
- }
- else
- {
- stp->st_size = fdata.nFileSizeLow;
- stp->st_atime = ACE_Time_Value (fdata.ftLastAccessTime);
- stp->st_mtime = ACE_Time_Value (fdata.ftLastWriteTime);
- }
- return 0;
-#elif defined (ACE_HAS_X86_STAT_MACROS)
- // Solaris for intel uses an macro for stat(), this macro is a
- // wrapper for _xstat().
- ACE_OSCALL_RETURN (::_xstat (_STAT_VER, file, stp), int, -1);
-#elif defined (__BORLANDC__) && (__BORLANDC__ <= 0x540) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wstat (file, stp), int, -1);
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wstat (file, (struct _stat *) stp), int, -1);
-#else /* VXWORKS */
- ACE_OSCALL_RETURN (::stat (file, stp), int, -1);
-#endif /* VXWORKS */
-}
-
-ACE_INLINE time_t
-ACE_OS::time (time_t *tloc)
-{
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::time");
-# if defined (ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME)
- unsigned long d_date, d_time, d_tick;
- tm_get(&d_date, &d_time, &d_tick); // get current time
- if (tloc)
- *tloc = d_time; // set time as time_t
- return d_time;
-# else
- ACE_OSCALL_RETURN (::time (tloc), time_t, (time_t) -1);
-# endif /* ACE_PSOS && ! ACE_PSOS_HAS_TIME */
-#else
- time_t retv = ACE_OS::gettimeofday ().sec ();
- if (tloc)
- *tloc = retv;
- return retv;
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE void
-ACE_OS::srand (u_int seed)
-{
- ACE_TRACE ("ACE_OS::srand");
- ::srand (seed);
-}
-
-ACE_INLINE int
-ACE_OS::rand (void)
-{
- ACE_TRACE ("ACE_OS::rand");
- ACE_OSCALL_RETURN (::rand (), int, -1);
-}
-
-ACE_INLINE int
-ACE_OS::unlink (const ACE_TCHAR *path)
-{
- ACE_TRACE ("ACE_OS::unlink");
-# if defined (VXWORKS)
- ACE_OSCALL_RETURN (::unlink (ACE_const_cast (char *, path)), int, -1);
-# elif defined (ACE_PSOS) && ! defined (ACE_PSOS_LACKS_PHILE)
- ACE_OSCALL_RETURN (::remove_f ((char *) path), int , -1);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_C_LIBRARY)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::remove ((char *) path),
- ace_result_),
- int, -1);
-# elif defined (ACE_HAS_WINCE)
- // @@ The problem is, DeleteFile is not actually equals to unlink. ;(
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::DeleteFile (path), ace_result_),
- int, -1);
-# elif defined (ACE_LACKS_UNLINK)
- ACE_UNUSED_ARG (path);
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wunlink (path), int, -1);
-# else
- ACE_OSCALL_RETURN (::unlink (path), int, -1);
-# endif /* VXWORKS */
-}
-
-ACE_INLINE int
-ACE_OS::rename (const ACE_TCHAR *old_name, const ACE_TCHAR *new_name)
-{
-# if (ACE_LACKS_RENAME)
- ACE_UNUSED_ARG (old_name);
- ACE_UNUSED_ARG (new_name);
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_HAS_WINCE)
- ACE_OSCALL_RETURN (::MoveFile (new_name, old_name), int, -1);
-# elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wrename (old_name, new_name), int, -1);
-# else /* ACE_LACKS_RENAME */
- ACE_OSCALL_RETURN (::rename (old_name, new_name), int, -1);
-# endif /* ACE_LACKS_RENAME */
-}
-
-ACE_INLINE ACE_TCHAR *
-ACE_OS::tempnam (const ACE_TCHAR *dir, const ACE_TCHAR *pfx)
-{
- ACE_TRACE ("ACE_OS::tempnam");
-#if defined (VXWORKS) || defined (ACE_LACKS_TEMPNAM)
- ACE_UNUSED_ARG (dir);
- ACE_UNUSED_ARG (pfx);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_PSOS)
- // pSOS only considers the directory prefix
- ACE_UNUSED_ARG (pfx);
- ACE_OSCALL_RETURN (::tmpnam ((char *) dir), char *, 0);
-#elif defined (__BORLANDC__) || (__IBMCPP__)
- ACE_OSCALL_RETURN (::_tempnam ((char *) dir, (char *) pfx), char *, 0);
-#elif defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (dir);
- ACE_UNUSED_ARG (pfx);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wtempnam (dir, pfx), wchar_t *, 0);
-#else /* VXWORKS */
- ACE_OSCALL_RETURN (::tempnam (dir, pfx), char *, 0);
-#endif /* VXWORKS */
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_OS::shm_open (const ACE_TCHAR *filename,
- int mode,
- int perms,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_OS::shm_open");
-# if defined (ACE_HAS_SHM_OPEN)
- ACE_UNUSED_ARG (sa);
- ACE_OSCALL_RETURN (::shm_open (filename, mode, perms), ACE_HANDLE, -1);
-# else /* ! ACE_HAS_SHM_OPEN */
- // Just use ::open.
- return ACE_OS::open (filename, mode, perms, sa);
-# endif /* ! ACE_HAS_SHM_OPEN */
-}
-
-ACE_INLINE int
-ACE_OS::shm_unlink (const ACE_TCHAR *path)
-{
- ACE_TRACE ("ACE_OS::shm_unlink");
-# if defined (ACE_HAS_SHM_OPEN)
- ACE_OSCALL_RETURN (::shm_unlink (path), int, -1);
-# else /* ! ACE_HAS_SHM_OPEN */
- // Just use ::unlink.
- return ACE_OS::unlink (path);
-# endif /* ! ACE_HAS_SHM_OPEN */
-}
-
-ACE_INLINE ACE_TCHAR *
-ACE_OS::cuserid (ACE_TCHAR *user, size_t maxlen)
-{
- ACE_TRACE ("ACE_OS::cuserid");
-#if defined (VXWORKS)
- ACE_UNUSED_ARG (maxlen);
- if (user == 0)
- {
- // Require that the user field be non-null, i.e., don't
- // allocate or use static storage.
- ACE_NOTSUP_RETURN (0);
- }
- else
- {
- ::remCurIdGet (user, 0);
- return user;
- }
-#elif defined (CHORUS) || defined (ACE_HAS_WINCE) || defined (ACE_PSOS) || defined (__QNXNTO__)
- // @@ WinCE doesn't support GetUserName. But there should be a way
- // to get around this.
- ACE_UNUSED_ARG (user);
- ACE_UNUSED_ARG (maxlen);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_WIN32)
- BOOL result = ACE_TEXT_GetUserName (user, (u_long *) &maxlen);
- if (result == FALSE)
- ACE_FAIL_RETURN (0);
- else
- return user;
-#elif defined (ACE_HAS_ALT_CUSERID)
-# if defined (ACE_LACKS_PWD_FUNCTIONS)
-# error Cannot use alternate cuserid() without POSIX password functions!
-# endif /* ACE_LACKS_PWD_FUNCTIONS */
-
- // POSIX.1 dropped the cuserid() function.
- // GNU GLIBC and other platforms correctly deprecate the cuserid()
- // function.
-
- struct passwd *pw = 0;
-
- // Make sure the file pointer is at the beginning of the password file
- ::setpwent ();
- // Should use ACE_OS::setpwent() but I didn't want to move this
- // method after it.
-
- // Use the effective user ID to determine the user name.
- pw = ::getpwuid (::geteuid ());
-
- // Make sure the password file is closed.
- ::endpwent ();
-
- // Extract the user name from the passwd structure.
- if (::strlen (pw->pw_name) <= maxlen)
- return ::strcpy (user, pw->pw_name);
- else
- return 0;
-#else
- // Hackish because of missing buffer size!
- ACE_UNUSED_ARG (maxlen);
- ACE_OSCALL_RETURN (::cuserid (user), char *, 0);
-#endif /* VXWORKS */
-}
-
-ACE_INLINE int
-ACE_OS::atexit (ACE_EXIT_HOOK func)
-{
- return ACE_OS_Object_Manager::instance ()->at_exit (func);
-}
-
-// Doesn't need a macro since it *never* returns!
-
-ACE_INLINE void
-ACE_OS::_exit (int status)
-{
- ACE_TRACE ("ACE_OS::_exit");
-#if defined (VXWORKS)
- ::exit (status);
-#elif defined (ACE_PSOSIM)
- ::u_exit (status);
-#elif defined (ACE_PSOS)
-# if defined (ACE_PSOS_LACKS_PREPC) // pSoS TM does not support exit.
- ACE_UNUSED_ARG (status);
- return;
-# else
- ::exit (status);
-# endif /* defined (ACE_PSOS_LACKS_PREPC) */
-#elif !defined (ACE_HAS_WINCE)
- ::_exit (status);
-#else
- ::TerminateProcess (::GetCurrentProcess (),
- status);
-#endif /* VXWORKS */
-}
-
-ACE_INLINE void
-ACE_OS::abort (void)
-{
-#if !defined (ACE_HAS_WINCE)
- ::abort ();
-#else
- // @@ CE doesn't support abort?
- exit (1);
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE void *
-ACE_OS::malloc (size_t nbytes)
-{
- ACE_TRACE ("ACE_OS::malloc");
- return ACE_MALLOC_FUNC (nbytes);
-}
-
-ACE_INLINE void *
-ACE_OS::calloc (size_t elements, size_t sizeof_elements)
-{
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::calloc");
- return ACE_CALLOC_FUNC (elements, sizeof_elements);
-#else
- // @@ This will probably not work since it doesn't consider
- // alignment properly.
- return ACE_MALLOC_FUNC (elements * sizeof_elements);
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE void *
-ACE_OS::realloc (void *ptr, size_t nbytes)
-{
- ACE_TRACE ("ACE_OS::realloc");
- return ACE_REALLOC_FUNC (ACE_MALLOC_T (ptr), nbytes);
-}
-
-ACE_INLINE void
-ACE_OS::free (void *ptr)
-{
- // ACE_TRACE ("ACE_OS::free");
- ACE_FREE_FUNC (ACE_MALLOC_T (ptr));
-}
-
-ACE_INLINE int
-ACE_OS::memcmp (const void *t, const void *s, size_t len)
-{
- ACE_TRACE ("ACE_OS::memcmp");
- return ::memcmp (t, s, len);
-}
-
-ACE_INLINE const void *
-ACE_OS::memchr (const void *s, int c, size_t len)
-{
-#if defined (ACE_HAS_MEMCHR)
- ACE_TRACE ("ACE_OS::memchr");
- return ::memchr (s, c, len);
-#else
- const u_char *t = (const u_char *) s;
- const u_char *e = (const u_char *) s + len;
-
- while (t < e)
- if (((int) *t) == c)
- return t;
- else
- t++;
-
- return 0;
-#endif /* ACE_HAS_MEMCHR */
-}
-
-ACE_INLINE void *
-ACE_OS::memcpy (void *t, const void *s, size_t len)
-{
- // ACE_TRACE ("ACE_OS::memcpy");
- return ::memcpy (t, s, len);
-}
-
-ACE_INLINE void *
-ACE_OS::memmove (void *t, const void *s, size_t len)
-{
- ACE_TRACE ("ACE_OS::memmove");
- return ::memmove (t, s, len);
-}
-
-ACE_INLINE void *
-ACE_OS::memset (void *s, int c, size_t len)
-{
- // ACE_TRACE ("ACE_OS::memset");
- return ::memset (s, c, len);
-}
-
-ACE_INLINE char *
-ACE_OS::strcat (char *s, const char *t)
-{
- ACE_TRACE ("ACE_OS::strcat");
- return ::strcat (s, t);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strcat (wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strcat");
- return ::wcscat (s, t);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE size_t
-ACE_OS::strcspn (const char *s, const char *reject)
-{
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::strcspn");
- return ::strcspn (s, reject);
-#else
- const char *scan;
- const char *rej_scan;
- int count = 0;
-
- for (scan = s; *scan; scan++)
- {
-
- for (rej_scan = reject; *rej_scan; rej_scan++)
- if (*scan == *rej_scan)
- return count;
-
- count++;
- }
-
- return count;
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE size_t
-ACE_OS::strspn (const char *s, const char *t)
-{
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::strspn");
- return ::strspn (s, t);
-#else
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (t);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_WINCE */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE size_t
-ACE_OS::strspn (const wchar_t*s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strspn");
- return ::wcsspn (s, t);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strchr (char *s, int c)
-{
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::strchr");
- return ::strchr (s, c);
-#else
- for (;;++s)
- {
- if (*s == c)
- return s;
- if (*s == 0)
- return 0;
- }
-#endif /* ACE_HAS_WINCE */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strchr (wchar_t *s, wint_t c)
-{
- ACE_TRACE ("ACE_OS::strchr");
- return ::wcschr (s, c);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE const char *
-ACE_OS::strchr (const char *s, int c)
-{
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::strchr");
- return (const char *) ::strchr (s, c);
-#else
- for (;;++s)
- {
- if (*s == c)
- return s;
- if (*s == 0)
- return 0;
- }
-#endif /* ACE_HAS_WINCE */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE const wchar_t *
-ACE_OS::strchr (const wchar_t *s, wint_t c)
-{
- ACE_TRACE ("ACE_OS::strchr");
- return (const wchar_t *) ::wcschr (s, c);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE const char *
-ACE_OS::strnchr (const char *s, int c, size_t len)
-{
- for (size_t i = 0; i < len; i++)
- if (s[i] == c)
- return s + i;
-
- return 0;
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE const wchar_t *
-ACE_OS::strnchr (const wchar_t *s, wint_t c, size_t len)
-{
- for (size_t i = 0; i < len; i++)
- if (s[i] == c)
- return s + i;
-
- return 0;
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strnchr (char *s, int c, size_t len)
-{
-#if defined ACE_PSOS_DIAB_PPC //Complier problem Diab 4.2b
- const char *const_char_s=s;
- return (char *) ACE_OS::strnchr (const_char_s, c, len);
-#else
- return (char *) ACE_OS::strnchr ((const char *) s, c, len);
-#endif
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strnchr (wchar_t *s, wint_t c, size_t len)
-{
-#if defined ACE_PSOS_DIAB_PPC //Complier problem Diab 4.2b
- const wchar_t *const_wchar_s=s;
- return (wchar_t *) ACE_OS::strnchr (const_wchar_s, c, len);
-#else
- return (wchar_t *) ACE_OS::strnchr ((const wchar_t *) s, c, len);
-#endif
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE const char *
-ACE_OS::strstr (const char *s, const char *t)
-{
- ACE_TRACE ("ACE_OS::strstr");
- return (const char *) ::strstr (s, t);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE const wchar_t *
-ACE_OS::strstr (const wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strstr");
- return (const wchar_t *) ::wcsstr (s, t);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strstr (char *s, const char *t)
-{
- ACE_TRACE ("ACE_OS::strstr");
- return ::strstr (s, t);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strstr (wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strstr");
- return ::wcsstr (s, t);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE size_t
-ACE_OS::strlen (const char *s)
-{
- return ::strlen (s);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE size_t
-ACE_OS::strlen (const wchar_t *s)
-{
- return ::wcslen (s);
-}
-#endif
-
-ACE_INLINE const char *
-ACE_OS::strnstr (const char *s1, const char *s2, size_t len2)
-{
- // Substring length
- size_t len1 = ACE_OS::strlen (s1);
-
- // Check if the substring is longer than the string being searched.
- if (len2 > len1)
- return 0;
-
- // Go upto <len>
- size_t len = len1 - len2;
-
- for (size_t i = 0; i <= len; i++)
- {
- if (ACE_OS::memcmp (s1 + i, s2, len2) == 0)
- // Found a match! Return the index.
- return s1 + i;
- }
-
- return 0;
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE const wchar_t *
-ACE_OS::strnstr (const wchar_t *s1, const wchar_t *s2, size_t len2)
-{
- // Substring length
- size_t len1 = ACE_OS::strlen (s1);
-
- // Check if the substring is longer than the string being searched.
- if (len2 > len1)
- return 0;
-
- // Go upto <len>
- size_t len = len1 - len2;
-
- for (size_t i = 0; i <= len; i++)
- {
- if (ACE_OS::memcmp (s1 + i, s2, len2 * sizeof (wchar_t)) == 0)
- // Found a match! Return the index.
- return s1 + i;
- }
-
- return 0;
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strnstr (char *s, const char *t, size_t len)
-{
-#if defined ACE_PSOS_DIAB_PPC //Complier problem Diab 4.2b
- const char *const_char_s=s;
- return (char *) ACE_OS::strnstr (const_char_s, t, len);
-#else
- return (char *) ACE_OS::strnstr ((const char *) s, t, len);
-#endif
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strnstr (wchar_t *s, const wchar_t *t, size_t len)
-{
- return (wchar_t *) ACE_OS::strnstr ((const wchar_t *) s, t, len);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strrchr (char *s, int c)
-{
- ACE_TRACE ("ACE_OS::strrchr");
-#if !defined (ACE_LACKS_STRRCHR)
- return ::strrchr (s, c);
-#else
- char *p = s + ::strlen (s);
-
- while (*p != c)
- if (p == s)
- return 0;
- else
- p--;
-
- return p;
-#endif /* ACE_LACKS_STRRCHR */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE const wchar_t *
-ACE_OS::strrchr (const wchar_t *s, wint_t c)
-{
- ACE_TRACE ("ACE_OS::strrchr");
-# if !defined (ACE_LACKS_WCSRCHR)
- return (const wchar_t *) ::wcsrchr (s, c);
-# else
- const wchar_t *p = s + ::wcslen (s);
-
- while (*p != c)
- if (p == s)
- return 0;
- else
- p--;
-
- return p;
-# endif /* ACE_LACKS_WCSRCHR */
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE const char *
-ACE_OS::strrchr (const char *s, int c)
-{
- ACE_TRACE ("ACE_OS::strrchr");
-#if !defined (ACE_LACKS_STRRCHR)
- return (const char *) ::strrchr (s, c);
-#else
- const char *p = s + ::strlen (s);
-
- while (*p != c)
- if (p == s)
- return 0;
- else
- p--;
-
- return p;
-#endif /* ACE_LACKS_STRRCHR */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strrchr (wchar_t *s, wint_t c)
-{
- ACE_TRACE ("ACE_OS::strrchr");
-# if !defined (ACE_LACKS_WCSRCHR)
- return (wchar_t *) ::wcsrchr (s, c);
-# else
- wchar_t *p = s + ::wcslen (s);
-
- while (*p != c)
- if (p == s)
- return 0;
- else
- p--;
-
- return p;
-# endif /* ACE_LACKS_WCSRCHR */
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE int
-ACE_OS::strcmp (const char *s, const char *t)
-{
- return ::strcmp (s, t);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE int
-ACE_OS::strcmp (const wchar_t *s, const wchar_t *t)
-{
- return ::wcscmp (s, t);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strcpy (char *s, const char *t)
-{
- return ::strcpy (s, t);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strcpy (wchar_t *s, const wchar_t *t)
-{
- return ::wcscpy (s, t);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strecpy (char *s, const char *t)
-{
- register char *dscan = s;
- register const char *sscan = t;
-
- while ((*dscan++ = *sscan++) != '\0')
- continue;
-
- return dscan;
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strecpy (wchar_t *s, const wchar_t *t)
-{
- register wchar_t *dscan = s;
- register const wchar_t *sscan = t;
-
- while ((*dscan++ = *sscan++) != L'\0')
- continue;
-
- return dscan;
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE int
-ACE_OS::to_lower (int c)
-{
- ACE_TRACE ("ACE_OS::to_lower");
- return tolower (c);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wint_t
-ACE_OS::to_lower (wint_t c)
-{
- ACE_TRACE ("ACE_OS::to_lower");
- return ::towlower (c);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strpbrk (char *s1, const char *s2)
-{
-#if !defined (ACE_HAS_WINCE)
- return ::strpbrk (s1, s2);
-#else
- ACE_UNUSED_ARG (s1);
- ACE_UNUSED_ARG (s2);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_WINCE */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strpbrk (wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::wcspbrk");
- return ::wcspbrk (s, t);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE const char *
-ACE_OS::strpbrk (const char *s1, const char *s2)
-{
-#if !defined (ACE_HAS_WINCE)
- return (const char *) ::strpbrk (s1, s2);
-#else
- ACE_UNUSED_ARG (s1);
- ACE_UNUSED_ARG (s2);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE char *
-ACE_OS::strdup (const char *s)
-{
- // @@ WINCE Should we provide this function on WinCE?
-#if defined (ACE_HAS_STRDUP_EMULATION)
- char *t = (char *) ACE_OS::malloc (::strlen (s) + 1);
- if (t == 0)
- return 0;
- else
- return ACE_OS::strcpy (t, s);
-#else
- return ::strdup (s);
-#endif /* ACE_HAS_STRDUP_EMULATION */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strdup (const wchar_t *s)
-{
-# if defined (__BORLANDC__)
- wchar_t *buffer = (wchar_t *) malloc ((ACE_OS::strlen (s) + 1) * sizeof (wchar_t));
- return ::wcscpy (buffer, s);
-# else
- return ::wcsdup (s);
-# endif /* __BORLANDC__ */
-}
-#endif /* ACE_HAS_WCHAR */
-
-#if !defined (ACE_HAS_WINCE)
-ACE_INLINE int
-ACE_OS::vsprintf (char *buffer, const char *format, va_list argptr)
-{
- return ACE_SPRINTF_ADAPTER (::vsprintf (buffer, format, argptr));
-}
-#endif /* ACE_HAS_WINCE */
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE int
-ACE_OS::vsprintf (wchar_t *buffer, const wchar_t *format, va_list argptr)
-{
- return ::vswprintf (buffer, format, argptr);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE int
-ACE_OS::strcasecmp (const char *s, const char *t)
-{
-#if !defined (ACE_WIN32) || defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::strcasecmp");
-# if defined (ACE_LACKS_STRCASECMP)
- const char *scan1 = s;
- const char *scan2 = t;
-
- while (*scan1 != 0
- && ACE_OS::to_lower (*scan1) == ACE_OS::to_lower (*scan2))
- {
- ++scan1;
- ++scan2;
- }
-
- // The following case analysis is necessary so that characters which
- // look negative collate low against normal characters but high
- // against the end-of-string NUL.
-
- if (*scan1 == '\0' && *scan2 == '\0')
- return 0;
- else if (*scan1 == '\0')
- return -1;
- else if (*scan2 == '\0')
- return 1;
- else
- return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2);
-# else
- return ::strcasecmp (s, t);
-# endif /* ACE_LACKS_STRCASECMP */
-#else /* ACE_WIN32 */
- return ::_stricmp (s, t);
-#endif /* ACE_WIN32 */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE int
-ACE_OS::strcasecmp (const wchar_t *s, const wchar_t *t)
-{
- ACE_TRACE ("ACE_OS::strcasecmp");
-
-# if !defined (ACE_WIN32)
- const wchar_t *scan1 = s;
- const wchar_t *scan2 = t;
-
- while (*scan1 != 0
- && ACE_OS::to_lower (*scan1) == ACE_OS::to_lower (*scan2))
- {
- ++scan1;
- ++scan2;
- }
-
- // The following case analysis is necessary so that characters which
- // look negative collate low against normal characters but high
- // against the end-of-string NUL.
-
- if (*scan1 == '\0' && *scan2 == '\0')
- return 0;
- else if (*scan1 == '\0')
- return -1;
- else if (*scan2 == '\0')
- return 1;
- else
- return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2);
-# else /* ACE_WIN32 */
- return ::_wcsicmp (s, t);
-# endif /* ACE_WIN32 */
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE int
-ACE_OS::strncasecmp (const char *s,
- const char *t,
- size_t len)
-{
-#if !defined (ACE_WIN32) || defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::strncasecmp");
-# if defined (ACE_LACKS_STRCASECMP)
- const char *scan1 = s;
- const char *scan2 = t;
- ssize_t count = ssize_t (len);
-
- while (--count >= 0
- && *scan1 != 0
- && ACE_OS::to_lower (*scan1) == ACE_OS::to_lower (*scan2))
- {
- ++scan1;
- ++scan2;
- }
-
- if (count < 0)
- return 0;
-
- // The following case analysis is necessary so that characters which
- // look negative collate low against normal characters but high
- // against the end-of-string NUL.
-
- if (*scan1 == '\0' && *scan2 == '\0')
- return 0;
- else if (*scan1 == '\0')
- return -1;
- else if (*scan2 == '\0')
- return 1;
- else
- return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2);
-# else
- return ::strncasecmp (s, t, len);
-# endif /* ACE_LACKS_STRCASECMP */
-#else /* ACE_WIN32 */
- return ::_strnicmp (s, t, len);
-#endif /* ACE_WIN32 */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE int
-ACE_OS::strncasecmp (const wchar_t *s,
- const wchar_t *t,
- size_t len)
-{
- ACE_TRACE ("ACE_OS::strcasecmp");
-
-# if !defined (ACE_WIN32)
- const wchar_t *scan1 = s;
- const wchar_t *scan2 = t;
- ssize_t count = ssize_t (n);
-
- while (--count >= 0
- && *scan1 != 0
- && ACE_OS::to_lower (*scan1) == ACE_OS::to_lower (*scan2))
- {
- ++scan1;
- ++scan2;
- }
-
- if (count < 0)
- return 0;
-
- // The following case analysis is necessary so that characters which
- // look negative collate low against normal characters but high
- // against the end-of-string NUL.
-
- if (*scan1 == '\0' && *scan2 == '\0')
- return 0;
- else if (*scan1 == '\0')
- return -1;
- else if (*scan2 == '\0')
- return 1;
- else
- return ACE_OS::to_lower (*scan1) - ACE_OS::to_lower (*scan2);
-# else /* ACE_WIN32 */
- return ::_wcsnicmp (s, t, len);
-# endif /* ACE_WIN32 */
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE int
-ACE_OS::strncmp (const char *s, const char *t, size_t len)
-{
- ACE_TRACE ("ACE_OS::strncmp");
- return ::strncmp (s, t, len);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE int
-ACE_OS::strncmp (const wchar_t *s, const wchar_t *t, size_t len)
-{
- ACE_TRACE ("ACE_OS::strncmp");
- return ::wcsncmp (s, t, len);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strncpy (char *s, const char *t, size_t len)
-{
- return ::strncpy (s, t, len);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strncpy (wchar_t *s, const wchar_t *t, size_t len)
-{
- return ::wcsncpy (s, t, len);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strncat (char *s, const char *t, size_t len)
-{
- ACE_TRACE ("ACE_OS::strncat");
- return ::strncat (s, t, len);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strncat (wchar_t *s, const wchar_t *t, size_t len)
-{
- ACE_TRACE ("ACE_OS::strncat");
- return ::wcsncat (s, t, len);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE char *
-ACE_OS::strtok (char *s, const char *tokens)
-{
- ACE_TRACE ("ACE_OS::strtok");
- return ::strtok (s, tokens);
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE wchar_t *
-ACE_OS::strtok (wchar_t *s, const wchar_t *tokens)
-{
- ACE_TRACE ("ACE_OS::strtok");
- return ::wcstok (s, tokens);
-}
-#endif /* ACE_HAS_WCHAR */
-
-
-ACE_INLINE char *
-ACE_OS::strtok_r (char *s, const char *tokens, char **lasts)
-{
- ACE_TRACE ("ACE_OS::strtok_r");
-#if defined (ACE_HAS_REENTRANT_FUNCTIONS)
- return ::strtok_r (s, tokens, lasts);
-#else
- if (s == 0)
- s = *lasts;
- else
- *lasts = s;
- if (*s == 0) // We have reached the end
- return 0;
- int l_org = ACE_OS::strlen (s);
- int l_sub = ACE_OS::strlen (s = ::strtok (s, tokens));
- *lasts = s + l_sub;
- if (l_sub != l_org)
- *lasts += 1;
- return s ;
-#endif /* (ACE_HAS_REENTRANT_FUNCTIONS) */
-}
-
-ACE_INLINE long
-ACE_OS::strtol (const char *s, char **ptr, int base)
-{
- // @@ We must implement this function for WinCE also.
- // Notice WinCE support wcstol.
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::strtol");
- return ::strtol (s, ptr, base);
-#else
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (ptr);
- ACE_UNUSED_ARG (base);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_WINCE */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE long
-ACE_OS::strtol (const wchar_t *s, wchar_t **ptr, int base)
-{
- ACE_TRACE ("ACE_OS::strtol");
- return ::wcstol (s, ptr, base);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE unsigned long
-ACE_OS::strtoul (const char *s, char **ptr, int base)
-{
- // @@ WINCE: We must implement this function for WinCE also.
- // Notice WinCE support wcstoul.
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::strtoul");
-# if defined (linux) && defined (__GLIBC__)
- // ::strtoul () appears to be broken on Linux 2.0.30/Alpha w/glibc:
- // it returns 0 for a negative number.
- return (unsigned long) ::strtol (s, ptr, base);
-# else /* ! linux || ! __GLIBC__ */
- return ::strtoul (s, ptr, base);
-# endif /* ! linux || ! __GLIBC__ */
-#else /* ACE_HAS_WINCE */
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (ptr);
- ACE_UNUSED_ARG (base);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_WINCE */
-}
-
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE unsigned long
-ACE_OS::strtoul (const wchar_t *s, wchar_t **ptr, int base)
-{
- ACE_TRACE ("ACE_OS::strtoul");
- return ::wcstoul (s, ptr, base);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE double
-ACE_OS::strtod (const char *s, char **endptr)
-{
- // @@ WinCE only support wcstod
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::strtod");
- return ::strtod (s, endptr);
-#else /* ACE_HAS_WINCE */
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (endptr);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_WINCE */
-}
-
-#if defined (ACE_HAS_WCHAR)
-ACE_INLINE double
-ACE_OS::strtod (const wchar_t *s, wchar_t **endptr)
-{
- ACE_TRACE ("ACE_OS::strtod");
- return ::wcstod (s, endptr);
-}
-#endif /* ACE_HAS_WCHAR */
-
-ACE_INLINE int
-ACE_OS::ace_isspace (const ACE_TCHAR s)
-{
-#if defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (s);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_USES_WCHAR)
- return iswspace (s);
-#else
- return isspace (s);
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::ace_isprint (const ACE_TCHAR s)
-{
-#if defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (s);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_USES_WCHAR)
- return iswprint (s);
-#else
- return isprint (s);
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE long
-ACE_OS::sysconf (int name)
-{
- ACE_TRACE ("ACE_OS::sysconf");
-#if defined (ACE_WIN32) || defined (VXWORKS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (name);
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_OSCALL_RETURN (::sysconf (name), long, -1);
-#endif /* ACE_WIN32 || VXWORKS */
-}
-
-ACE_INLINE int
-ACE_OS::mutex_init (ACE_mutex_t *m,
- int type,
- const ACE_TCHAR *name,
- ACE_mutexattr_t *attributes,
- LPSECURITY_ATTRIBUTES sa)
-{
- // ACE_TRACE ("ACE_OS::mutex_init");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (attributes);
- ACE_UNUSED_ARG (sa);
-
- pthread_mutexattr_t l_attributes;
- if (attributes == 0)
- attributes = &l_attributes;
- int result = -1;
-
- // Only do these initializations if the <attributes> parameter
- // wasn't originally set.
- if (attributes == &l_attributes)
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- if (::pthread_mutexattr_create (attributes) == 0)
-# elif defined (ACE_HAS_PTHREADS_DRAFT7) || defined (ACE_HAS_PTHREADS_STD)
- if (ACE_ADAPT_RETVAL (::pthread_mutexattr_init (attributes), result) == 0)
-# else // draft 6
- if (::pthread_mutexattr_init (attributes) == 0)
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- result = 0;
- else
- result = -1; // ACE_ADAPT_RETVAL used it for intermediate status
- }
-
- if (result == 0)
- {
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- if (
-# if defined (ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP)
- ::pthread_mutexattr_setkind_np (attributes, type) == 0 &&
-# endif /* ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP */
- ::pthread_mutex_init (m, *attributes) == 0)
-# elif defined (ACE_HAS_PTHREADS_DRAFT7) || defined (ACE_HAS_PTHREADS_STD)
- if (
-# if defined (_POSIX_THREAD_PROCESS_SHARED) && !defined (ACE_LACKS_MUTEXATTR_PSHARED)
- ACE_ADAPT_RETVAL (::pthread_mutexattr_setpshared (attributes, type),
- result) == 0 &&
-# endif /* _POSIX_THREAD_PROCESS_SHARED && ! ACE_LACKS_MUTEXATTR_PSHARED */
- ACE_ADAPT_RETVAL (::pthread_mutex_init (m, attributes), result) == 0)
-# else
- if (
-# if !defined (ACE_LACKS_MUTEXATTR_PSHARED)
- ::pthread_mutexattr_setpshared (attributes, type) == 0 &&
-# endif /* ACE_LACKS_MUTEXATTR_PSHARED */
-# if defined (ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP)
- ::pthread_mutexattr_setkind_np (attributes, type) == 0 &&
-# endif /* ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP */
- ::pthread_mutex_init (m, attributes) == 0)
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- result = 0;
- else
- result = -1; // ACE_ADAPT_RETVAL used it for intermediate status
- }
-
-# if (!defined (ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP) && !defined (_POSIX_THREAD_PROCESS_SHARED) || defined (ACE_LACKS_MUTEXATTR_PSHARED))
- ACE_UNUSED_ARG (type);
-# endif /* ! ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP */
-
- // Only do the deletions if the <attributes> parameter wasn't
- // originally set.
- if (attributes == &l_attributes)
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_mutexattr_delete (&l_attributes);
-# else
- ::pthread_mutexattr_destroy (&l_attributes);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-
- return result;
-# elif defined (ACE_HAS_STHREADS)
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (sa);
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_init (m, type, attributes),
- ace_result_),
- int, -1);
-# elif defined (ACE_HAS_WTHREADS)
- m->type_ = type;
-
- switch (type)
- {
- case USYNC_PROCESS:
- m->proc_mutex_ = ACE_TEXT_CreateMutex (ACE_OS::default_win32_security_attributes (sa),
- FALSE,
- name);
- if (m->proc_mutex_ == 0)
- ACE_FAIL_RETURN (-1);
- else
- return 0;
- case USYNC_THREAD:
- return ACE_OS::thread_mutex_init (&m->thr_mutex_,
- type,
- name,
- attributes);
- default:
- errno = EINVAL;
- return -1;
- }
- /* NOTREACHED */
-
-# elif defined (ACE_PSOS)
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (attributes);
- ACE_UNUSED_ARG (sa);
-# if defined (ACE_PSOS_HAS_MUTEX)
-
- u_long flags = MU_LOCAL;
- u_long ceiling = 0;
-
-# if defined (ACE_HAS_RECURSIVE_MUTEXES)
- flags |= MU_RECURSIVE;
-# else /* ! ACE_HAS_RECURSIVE_MUTEXES */
- flags |= MU_NONRECURSIVE;
-# endif /* ACE_HAS_RECURSIVE_MUTEXES */
-
-# if defined (ACE_PSOS_HAS_PRIO_MUTEX)
-
- flags |= MU_PRIOR;
-
-# if defined (ACE_PSOS_HAS_PRIO_INHERIT_MUTEX)
- flags |= MU_PRIO_INHERIT;
-# elif defined (ACE_PSOS_HAS_PRIO_PROTECT_MUTEX)
- ceiling = PSOS_TASK_MAX_PRIORITY;
- flags |= MU_PRIO_PROTECT;
-# else
- flags |= MU_PRIO_NONE;
-# endif /* ACE_PSOS_HAS_PRIO_INHERIT_MUTEX */
-
-# else /* ! ACE_PSOS_HAS_PRIO_MUTEX */
-
- flags |= MU_FIFO | MU_PRIO_NONE;
-
-# endif
-
- return (::mu_create (ACE_reinterpret_cast (char *, name),
- flags, ceiling, m) == 0) ? 0 : -1;
-
-# else /* ! ACE_PSOS_HAS_MUTEX */
- return ::sm_create ((char *) name,
- 1,
- SM_LOCAL | SM_PRIOR,
- m) == 0 ? 0 : -1;
-# endif /* ACE_PSOS_HAS_MUTEX */
-# elif defined (VXWORKS)
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (attributes);
- ACE_UNUSED_ARG (sa);
-
- return (*m = ::semMCreate (type)) == 0 ? -1 : 0;
-# endif /* ACE_HAS_PTHREADS */
-#else
- ACE_UNUSED_ARG (m);
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (attributes);
- ACE_UNUSED_ARG (sa);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::mutex_destroy (ACE_mutex_t *m)
-{
- ACE_TRACE ("ACE_OS::mutex_destroy");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
-# if (defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6))
- ACE_OSCALL_RETURN (::pthread_mutex_destroy (m), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_destroy (m),
- ace_result_), int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6*/
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_destroy (m), ace_result_), int, -1);
-# elif defined (ACE_HAS_WTHREADS)
- switch (m->type_)
- {
- case USYNC_PROCESS:
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (m->proc_mutex_),
- ace_result_),
- int, -1);
- case USYNC_THREAD:
- return ACE_OS::thread_mutex_destroy (&m->thr_mutex_);
- default:
- errno = EINVAL;
- return -1;
- }
- /* NOTREACHED */
-# elif defined (ACE_PSOS)
-# if defined (ACE_PSOS_HAS_MUTEX)
- return (::mu_delete (*m) == 0) ? 0 : -1;
-# else /* ! ACE_PSOS_HAS_MUTEX */
- return (::sm_delete (*m) == 0) ? 0 : -1;
-# endif /* ACE_PSOS_HAS_MUTEX */
-# elif defined (VXWORKS)
- return ::semDelete (*m) == OK ? 0 : -1;
-# endif /* Threads variety case */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::mutex_lock (ACE_mutex_t *m)
-{
- // ACE_TRACE ("ACE_OS::mutex_lock");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- // Note, don't use "::" here since the following call is often a macro.
-# if (defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6))
- ACE_OSCALL_RETURN (pthread_mutex_lock (m), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_mutex_lock (m), ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6 */
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_lock (m), ace_result_), int, -1);
-# elif defined (ACE_HAS_WTHREADS)
- switch (m->type_)
- {
- case USYNC_PROCESS:
- // Timeout can't occur, so don't bother checking...
-
- switch (::WaitForSingleObject (m->proc_mutex_, INFINITE))
- {
- case WAIT_OBJECT_0:
- case WAIT_ABANDONED:
- // We will ignore abandonments in this method
- // Note that we still hold the lock
- return 0;
- default:
- // This is a hack, we need to find an appropriate mapping...
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- case USYNC_THREAD:
- return ACE_OS::thread_mutex_lock (&m->thr_mutex_);
- default:
- errno = EINVAL;
- return -1;
- }
- /* NOTREACHED */
-# elif defined (ACE_PSOS)
-# if defined (ACE_PSOS_HAS_MUTEX)
- return (::mu_lock (*m, MU_WAIT, 0) == 0) ? 0 : -1;
-# else /* ACE_PSOS_HAS_MUTEX */
- return (::sm_p (*m, SM_WAIT, 0) == 0) ? 0 : -1;
-# endif /* ACE_PSOS_HAS_MUTEX */
-# elif defined (VXWORKS)
- return ::semTake (*m, WAIT_FOREVER) == OK ? 0 : -1;
-# endif /* Threads variety case */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::mutex_lock (ACE_mutex_t *m,
- int &abandoned)
-{
- ACE_TRACE ("ACE_OS::mutex_lock");
-#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_WTHREADS)
- abandoned = 0;
- switch (m->type_)
- {
- case USYNC_PROCESS:
- // Timeout can't occur, so don't bother checking...
-
- switch (::WaitForSingleObject (m->proc_mutex_, INFINITE))
- {
- case WAIT_OBJECT_0:
- return 0;
- case WAIT_ABANDONED:
- abandoned = 1;
- return 0; // something goofed, but we hold the lock ...
- default:
- // This is a hack, we need to find an appropriate mapping...
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- case USYNC_THREAD:
- return ACE_OS::thread_mutex_lock (&m->thr_mutex_);
- default:
- errno = EINVAL;
- return -1;
- }
- /* NOTREACHED */
-#else
- ACE_UNUSED_ARG (m);
- ACE_UNUSED_ARG (abandoned);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS and ACE_HAS_WTHREADS */
-}
-
-ACE_INLINE int
-ACE_OS::mutex_trylock (ACE_mutex_t *m)
-{
- ACE_TRACE ("ACE_OS::mutex_trylock");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- // Note, don't use "::" here since the following call is often a macro.
-# if (defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6))
- int status = pthread_mutex_trylock (m);
- if (status == 1)
- status = 0;
- else if (status == 0) {
- status = -1;
- errno = EBUSY;
- }
- return status;
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_mutex_trylock (m), ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6 */
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_trylock (m), ace_result_), int, -1);
-# elif defined (ACE_HAS_WTHREADS)
- switch (m->type_)
- {
- case USYNC_PROCESS:
- {
- // Try for 0 milliseconds - i.e. nonblocking.
- switch (::WaitForSingleObject (m->proc_mutex_, 0))
- {
- case WAIT_OBJECT_0:
- return 0;
- case WAIT_ABANDONED:
- // We will ignore abandonments in this method. Note that
- // we still hold the lock.
- return 0;
- case WAIT_TIMEOUT:
- errno = EBUSY;
- return -1;
- default:
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- }
- case USYNC_THREAD:
- return ACE_OS::thread_mutex_trylock (&m->thr_mutex_);
- default:
- errno = EINVAL;
- return -1;
- }
- /* NOTREACHED */
-# elif defined (ACE_PSOS)
-# if defined (ACE_PSOS_HAS_MUTEX)
- return (::mu_lock (*m, MU_NOWAIT, 0) == 0) ? 0 : -1;
-# else /* ! ACE_PSOS_HAS_MUTEX */
- switch (::sm_p (*m, SM_NOWAIT, 0))
- {
- case 0:
- return 0;
- case ERR_NOSEM:
- errno = EBUSY;
- // intentional fall through
- default:
- return -1;
- }
-# endif /* ACE_PSOS_HAS_MUTEX */
-
-# elif defined (VXWORKS)
- if (::semTake (*m, NO_WAIT) == ERROR)
- if (errno == S_objLib_OBJ_TIMEOUT)
- {
- // couldn't get the semaphore
- errno = EBUSY;
- return -1;
- }
- else
- // error
- return -1;
- else
- // got the semaphore
- return 0;
-# endif /* Threads variety case */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::mutex_trylock (ACE_mutex_t *m, int &abandoned)
-{
-#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_WTHREADS)
- abandoned = 0;
- switch (m->type_)
- {
- case USYNC_PROCESS:
- {
- // Try for 0 milliseconds - i.e. nonblocking.
- switch (::WaitForSingleObject (m->proc_mutex_, 0))
- {
- case WAIT_OBJECT_0:
- return 0;
- case WAIT_ABANDONED:
- abandoned = 1;
- return 0; // something goofed, but we hold the lock ...
- case WAIT_TIMEOUT:
- errno = EBUSY;
- return -1;
- default:
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- }
- case USYNC_THREAD:
- return ACE_OS::thread_mutex_trylock (&m->thr_mutex_);
- default:
- errno = EINVAL;
- return -1;
- }
- /* NOTREACHED */
-#else
- ACE_UNUSED_ARG (m);
- ACE_UNUSED_ARG (abandoned);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS and ACE_HAS_WTHREADS */
-}
-
-ACE_INLINE int
-ACE_OS::mutex_unlock (ACE_mutex_t *m)
-{
- ACE_TRACE ("ACE_OS::mutex_unlock");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- // Note, don't use "::" here since the following call is often a macro.
-# if (defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6))
- ACE_OSCALL_RETURN (pthread_mutex_unlock (m), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_mutex_unlock (m), ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6 */
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_unlock (m), ace_result_), int, -1);
-# elif defined (ACE_HAS_WTHREADS)
- switch (m->type_)
- {
- case USYNC_PROCESS:
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::ReleaseMutex (m->proc_mutex_),
- ace_result_),
- int, -1);
- case USYNC_THREAD:
- return ACE_OS::thread_mutex_unlock (&m->thr_mutex_);
- default:
- errno = EINVAL;
- return -1;
- }
- /* NOTREACHED */
-# elif defined (ACE_PSOS)
-# if defined (ACE_PSOS_HAS_MUTEX)
- return (::mu_unlock (*m) == 0) ? 0 : -1;
-# else /* ! ACE_PSOS_HAS_MUTEX */
- return (::sm_v (*m) == 0) ? 0 : -1;
-# endif /* ACE_PSOS_HAS_MUTEX */
-# elif defined (VXWORKS)
- return ::semGive (*m) == OK ? 0 : -1;
-# endif /* Threads variety case */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m,
- int type,
- const ACE_TCHAR *name,
- ACE_mutexattr_t *arg)
-{
- // ACE_TRACE ("ACE_OS::thread_mutex_init");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS)
- ACE_UNUSED_ARG (type);
- // Force the use of USYNC_THREAD!
- return ACE_OS::mutex_init (m, USYNC_THREAD, name, arg);
-# elif defined (ACE_HAS_WTHREADS)
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
-
- ::InitializeCriticalSection (m);
- return 0;
-# elif defined (VXWORKS) || defined (ACE_PSOS)
- return mutex_init (m, type, name, arg);
-# endif /* Threads variety case */
-#else
- ACE_UNUSED_ARG (m);
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thread_mutex_destroy (ACE_thread_mutex_t *m)
-{
- ACE_TRACE ("ACE_OS::thread_mutex_destroy");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS)
- return ACE_OS::mutex_destroy (m);
-# elif defined (ACE_HAS_WTHREADS)
- ::DeleteCriticalSection (m);
- return 0;
-# elif defined (VXWORKS) || defined (ACE_PSOS)
- return mutex_destroy (m);
-# endif /* ACE_HAS_STHREADS || ACE_HAS_PTHREADS */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thread_mutex_lock (ACE_thread_mutex_t *m)
-{
- // ACE_TRACE ("ACE_OS::thread_mutex_lock");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS)
- return ACE_OS::mutex_lock (m);
-# elif defined (ACE_HAS_WTHREADS)
- ::EnterCriticalSection (m);
- return 0;
-#elif defined (VXWORKS) || defined (ACE_PSOS)
- return mutex_lock (m);
-# endif /* ACE_HAS_STHREADS || ACE_HAS_PTHREADS */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thread_mutex_trylock (ACE_thread_mutex_t *m)
-{
- ACE_TRACE ("ACE_OS::thread_mutex_trylock");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS)
- return ACE_OS::mutex_trylock (m);
-# elif defined (ACE_HAS_WTHREADS)
-# if defined (ACE_HAS_WIN32_TRYLOCK)
- BOOL result = ::TryEnterCriticalSection (m);
- if (result == TRUE)
- return 0;
- else
- {
- errno = EBUSY;
- return -1;
- }
-# else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_WIN32_TRYLOCK */
-# elif defined (VXWORKS) || defined (ACE_PSOS)
- return ACE_OS::mutex_trylock (m);
-# endif /* Threads variety case */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thread_mutex_unlock (ACE_thread_mutex_t *m)
-{
- ACE_TRACE ("ACE_OS::thread_mutex_unlock");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS) || defined (ACE_HAS_PTHREADS)
- return ACE_OS::mutex_unlock (m);
-# elif defined (ACE_HAS_WTHREADS)
- ::LeaveCriticalSection (m);
- return 0;
-# elif defined (VXWORKS) || defined (ACE_PSOS)
- return ACE_OS::mutex_unlock (m);
-# endif /* Threads variety case */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-#if !defined (ACE_LACKS_COND_T)
-// NOTE: The ACE_OS::cond_* functions for Unix platforms are defined
-// here because the ACE_OS::sema_* functions below need them.
-// However, ACE_WIN32 and VXWORKS define the ACE_OS::cond_* functions
-// using the ACE_OS::sema_* functions. So, they are defined in OS.cpp.
-
-ACE_INLINE int
-ACE_OS::cond_destroy (ACE_cond_t *cv)
-{
- ACE_TRACE ("ACE_OS::cond_destroy");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_OSCALL_RETURN (::pthread_cond_destroy (cv), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_destroy (cv), ace_result_), int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6 */
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_destroy (cv), ace_result_), int, -1);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_COND_T)
- return (::cv_delete (*cv)) ? 0 : -1;
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (cv);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::condattr_init (ACE_condattr_t &attributes,
- int type)
-{
- ACE_UNUSED_ARG (type);
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- int result = -1;
-
- if (
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_condattr_create (&attributes) == 0
-# elif defined (ACE_HAS_PTHREADS_STD) || defined (ACE_HAS_PTHREADS_DRAFT7)
- ACE_ADAPT_RETVAL(::pthread_condattr_init (&attributes), result) == 0
-# if defined (_POSIX_THREAD_PROCESS_SHARED) && !defined (ACE_LACKS_MUTEXATTR_PSHARED)
- && ACE_ADAPT_RETVAL(::pthread_condattr_setpshared(&attributes, type),
- result) == 0
-# endif /* _POSIX_THREAD_PROCESS_SHARED && ! ACE_LACKS_MUTEXATTR_PSHARED */
-# else /* this is draft 6 */
- ::pthread_condattr_init (&attributes) == 0
-# if !defined (ACE_LACKS_CONDATTR_PSHARED)
- && ::pthread_condattr_setpshared (&attributes, type) == 0
-# endif /* ACE_LACKS_CONDATTR_PSHARED */
-# if defined (ACE_HAS_PTHREAD_CONDATTR_SETKIND_NP)
- && ::pthread_condattr_setkind_np (&attributes, type) == 0
-# endif /* ACE_HAS_PTHREAD_CONDATTR_SETKIND_NP */
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- )
- result = 0;
- else
- result = -1; // ACE_ADAPT_RETVAL used it for intermediate status
-
- return result;
-# elif defined (ACE_HAS_STHREADS)
- attributes.type = type;
-
- return 0;
-# endif /* ACE_HAS_PTHREADS && ACE_HAS_STHREADS */
-
-# else
- ACE_UNUSED_ARG (attributes);
- ACE_UNUSED_ARG (type);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::condattr_destroy (ACE_condattr_t &attributes)
-{
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_condattr_delete (&attributes);
-# else
- ::pthread_condattr_destroy (&attributes);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-
-# elif defined (ACE_HAS_STHREADS)
- attributes.type = 0;
-# endif /* ACE_HAS_PTHREADS && ACE_HAS_STHREADS */
- return 0;
-# else
- ACE_UNUSED_ARG (attributes);
- return 0;
-# endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::cond_init (ACE_cond_t *cv,
- ACE_condattr_t &attributes,
- const ACE_TCHAR *name,
- void *arg)
-{
- // ACE_TRACE ("ACE_OS::cond_init");
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- int result = -1;
-
- if (
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- ::pthread_cond_init (cv, attributes) == 0
-# elif defined (ACE_HAS_PTHREADS_STD) || defined (ACE_HAS_PTHREADS_DRAFT7)
- ACE_ADAPT_RETVAL(::pthread_cond_init (cv, &attributes), result) == 0
-# else /* this is draft 6 */
- ::pthread_cond_init (cv, &attributes) == 0
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
- )
- result = 0;
- else
- result = -1; // ACE_ADAPT_RETVAL used it for intermediate status
-
- return result;
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_init (cv,
- attributes.type,
- arg),
- ace_result_),
- int, -1);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_COND_T)
-# if defined (ACE_PSOS_HAS_PRIO_MUTEX)
- u_long flags = CV_LOCAL | CV_PRIOR;
-# else /* ACE_PSOS_HAS_PRIO_MUTEX */
- u_long flags = CV_LOCAL | CV_FIFO;
-# endif /* ACE_PSOS_HAS_PRIO_MUTEX */
- return (::cv_create ((char *) name, flags, cv)) ? 0 : -1;
-# endif /* ACE_HAS_PTHREADS && ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (cv);
- ACE_UNUSED_ARG (attributes);
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::cond_init (ACE_cond_t *cv, short type, const ACE_TCHAR *name, void *arg)
-{
- ACE_condattr_t attributes;
- if (ACE_OS::condattr_init (attributes, type) == 0
- && ACE_OS::cond_init (cv, attributes, name, arg) == 0)
- {
- (void) ACE_OS::condattr_destroy (attributes);
- return 0;
- }
- return -1;
-}
-
-ACE_INLINE int
-ACE_OS::cond_signal (ACE_cond_t *cv)
-{
-ACE_TRACE ("ACE_OS::cond_signal");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_OSCALL_RETURN (::pthread_cond_signal (cv), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_signal (cv),ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6 */
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_signal (cv), ace_result_), int, -1);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_COND_T)
- return (::cv_signal (*cv)) ? 0 : -1;
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (cv);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::cond_broadcast (ACE_cond_t *cv)
-{
-ACE_TRACE ("ACE_OS::cond_broadcast");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_OSCALL_RETURN (::pthread_cond_broadcast (cv), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_broadcast (cv),
- ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6 */
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_broadcast (cv),
- ace_result_),
- int, -1);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_COND_T)
- return (::cv_broadcast (*cv)) ? 0 : -1;
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (cv);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::cond_wait (ACE_cond_t *cv,
- ACE_mutex_t *external_mutex)
-{
- ACE_TRACE ("ACE_OS::cond_wait");
-# if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_OSCALL_RETURN (::pthread_cond_wait (cv, external_mutex), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_wait (cv, external_mutex), ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6 */
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_wait (cv, external_mutex), ace_result_),
- int, -1);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_COND_T)
- return (::cv_wait (*cv, *external_mutex, 0)) ? 0 : -1;
-# endif /* ACE_HAS_PTHREADS */
-# else
- ACE_UNUSED_ARG (cv);
- ACE_UNUSED_ARG (external_mutex);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::cond_timedwait (ACE_cond_t *cv,
- ACE_mutex_t *external_mutex,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_OS::cond_timedwait");
-# if defined (ACE_HAS_THREADS)
- int result;
- timespec_t ts;
-
- if (timeout != 0)
- ts = *timeout; // Calls ACE_Time_Value::operator timespec_t().
-
-# if defined (ACE_HAS_PTHREADS)
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- if (timeout == 0)
- ACE_OSCALL (::pthread_cond_wait (cv, external_mutex),
- int, -1, result);
- else
- {
-
-# if defined (__Lynx__)
- // Note that we must convert between absolute time (which is
- // passed as a parameter) and relative time (which is what the
- // LynxOS pthread_cond_timedwait expects). This differs from 1003.4a
- // draft 4.
-
- timespec_t relative_time = *timeout - ACE_OS::gettimeofday ();
-
- ACE_OSCALL (::pthread_cond_timedwait (cv, external_mutex,
- &relative_time),
- int, -1, result);
-# else
- ACE_OSCALL (::pthread_cond_timedwait (cv, external_mutex,
- (ACE_TIMESPEC_PTR) &ts),
- int, -1, result);
-# endif /* __Lynx__ */
- }
-
-# else
- ACE_OSCALL (ACE_ADAPT_RETVAL (timeout == 0
- ? ::pthread_cond_wait (cv, external_mutex)
- : ::pthread_cond_timedwait (cv, external_mutex,
- (ACE_TIMESPEC_PTR) &ts),
- result),
- int, -1, result);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6*/
- // We need to adjust this to make the POSIX and Solaris return
- // values consistent. EAGAIN is from Pthreads DRAFT4 (HP-UX 10.20 and
- // down); EINTR is from LynxOS.
- if (result == -1 &&
- (errno == ETIMEDOUT || errno == EAGAIN || errno == EINTR))
- errno = ETIME;
-
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL (ACE_ADAPT_RETVAL (timeout == 0
- ? ::cond_wait (cv, external_mutex)
- : ::cond_timedwait (cv,
- external_mutex,
- (timestruc_t*)&ts),
- result),
- int, -1, result);
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_COND_T)
- if (timeout == 0)
- return (::cv_wait (*cv, *external_mutex, 0)) ? 0 : -1;
- else
- return (::cv_wait (*cv, *external_mutex, *timeout)) ? 0 : -1;
-# endif /* ACE_HAS_STHREADS */
- if (timeout != 0)
- timeout->set (ts); // Update the time value before returning.
-
- return result;
-# else
- ACE_UNUSED_ARG (cv);
- ACE_UNUSED_ARG (external_mutex);
- ACE_UNUSED_ARG (timeout);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_THREADS */
-}
-#endif /* !ACE_LACKS_COND_T */
-
-ACE_INLINE int
-ACE_OS::thr_equal (ACE_thread_t t1, ACE_thread_t t2)
-{
-#if defined (ACE_HAS_PTHREADS)
-# if defined (pthread_equal)
- // If it's a macro we can't say "::pthread_equal"...
- return pthread_equal (t1, t2);
-# else
- return ::pthread_equal (t1, t2);
-# endif /* pthread_equal */
-#elif defined (VXWORKS)
- return ! ACE_OS::strcmp (t1, t2);
-#else /* For both STHREADS and WTHREADS... */
- // Hum, Do we need to treat WTHREAD differently?
- // levine 13 oct 98 % I don't think so, ACE_thread_t is a DWORD.
- return t1 == t2;
-#endif /* Threads variety case */
-}
-
-ACE_INLINE void
-ACE_OS::thr_self (ACE_hthread_t &self)
-{
- ACE_TRACE ("ACE_OS::thr_self");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- // Note, don't use "::" here since the following call is often a macro.
- self = pthread_self ();
-# elif defined (ACE_HAS_THREAD_SELF)
- self = ::thread_self ();
-# elif defined (ACE_HAS_STHREADS)
- self = ::thr_self ();
-# elif defined (ACE_HAS_WTHREADS)
- self = ::GetCurrentThread ();
-# elif defined (ACE_PSOS)
- t_ident ((char *) 0, 0, &self);
-# elif defined (VXWORKS)
- self = ::taskIdSelf ();
-# endif /* ACE_HAS_STHREADS */
-#else
- self = 1; // Might as well make it the main thread ;-)
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE ACE_thread_t
-ACE_OS::thr_self (void)
-{
- // ACE_TRACE ("ACE_OS::thr_self");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
- // Note, don't use "::" here since the following call is often a macro.
- ACE_OSCALL_RETURN (pthread_self (), int, -1);
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (::thr_self (), int, -1);
-# elif defined (ACE_HAS_WTHREADS)
- return ::GetCurrentThreadId ();
-# elif defined (ACE_PSOS)
- // there does not appear to be a way to get
- // a task's name other than at creation
- return 0;
-# elif defined (VXWORKS)
- return ::taskName (::taskIdSelf ());
-# endif /* ACE_HAS_STHREADS */
-#else
- return 1; // Might as well make it the first thread ;-)
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::recursive_mutex_init (ACE_recursive_thread_mutex_t *m,
- const ACE_TCHAR *name,
- ACE_mutexattr_t *arg,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_UNUSED_ARG (sa);
-#if defined (ACE_HAS_THREADS)
-#if defined (ACE_HAS_RECURSIVE_MUTEXES)
- return ACE_OS::thread_mutex_init (m, 0, name, arg);
-#else
- if (ACE_OS::thread_mutex_init (&m->nesting_mutex_, 0, name, arg) == -1)
- return -1;
- else if (ACE_OS::cond_init (&m->lock_available_,
- (short) USYNC_THREAD,
- name,
- 0) == -1)
- return -1;
- else
- {
- m->nesting_level_ = 0;
- m->owner_id_ = ACE_OS::NULL_thread;
- return 0;
- }
-#endif /* ACE_HAS_RECURSIVE_MUTEXES */
-#else
- ACE_UNUSED_ARG (m);
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::recursive_mutex_destroy (ACE_recursive_thread_mutex_t *m)
-{
-#if defined (ACE_HAS_THREADS)
-#if defined (ACE_HAS_RECURSIVE_MUTEXES)
- return ACE_OS::thread_mutex_destroy (m);
-#else
- if (ACE_OS::thread_mutex_destroy (&m->nesting_mutex_) == -1)
- return -1;
- else if (ACE_OS::cond_destroy (&m->lock_available_) == -1)
- return -1;
- else
- return 0;
-#endif /* ACE_HAS_RECURSIVE_MUTEXES */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::recursive_mutex_lock (ACE_recursive_thread_mutex_t *m)
-{
-#if defined (ACE_HAS_THREADS)
-#if defined (ACE_HAS_RECURSIVE_MUTEXES)
- return ACE_OS::thread_mutex_lock (m);
-#else
- ACE_thread_t t_id = ACE_OS::thr_self ();
- int result = 0;
-
- // Acquire the guard.
- if (ACE_OS::thread_mutex_lock (&m->nesting_mutex_) == -1)
- result = -1;
- else
- {
- // If there's no contention, just grab the lock immediately
- // (since this is the common case we'll optimize for it).
- if (m->nesting_level_ == 0)
- m->owner_id_ = t_id;
- // If we already own the lock, then increment the nesting level
- // and return.
- else if (ACE_OS::thr_equal (t_id, m->owner_id_) == 0)
- {
- // Wait until the nesting level has dropped to zero, at
- // which point we can acquire the lock.
- while (m->nesting_level_ > 0)
- ACE_OS::cond_wait (&m->lock_available_,
- &m->nesting_mutex_);
-
- // At this point the nesting_mutex_ is held...
- m->owner_id_ = t_id;
- }
-
- // At this point, we can safely increment the nesting_level_ no
- // matter how we got here!
- m->nesting_level_++;
- }
-
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- ACE_OS::thread_mutex_unlock (&m->nesting_mutex_);
- }
- return result;
-#endif /* ACE_HAS_RECURSIVE_MUTEXES */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::recursive_mutex_trylock (ACE_recursive_thread_mutex_t *m)
-{
-#if defined (ACE_HAS_THREADS)
-#if defined (ACE_HAS_RECURSIVE_MUTEXES)
- return ACE_OS::thread_mutex_trylock (m);
-#else
- ACE_thread_t t_id = ACE_OS::thr_self ();
- int result = 0;
-
- // Acquire the guard.
- if (ACE_OS::thread_mutex_lock (&m->nesting_mutex_) == -1)
- result = -1;
- else
- {
- // If there's no contention, just grab the lock immediately.
- if (m->nesting_level_ == 0)
- {
- m->owner_id_ = t_id;
- m->nesting_level_ = 1;
- }
- // If we already own the lock, then increment the nesting level
- // and proceed.
- else if (ACE_OS::thr_equal (t_id, m->owner_id_))
- m->nesting_level_++;
- else
- {
- errno = EBUSY;
- result = -1;
- }
- }
-
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- ACE_OS::thread_mutex_unlock (&m->nesting_mutex_);
- }
- return result;
-#endif /* ACE_HAS_RECURSIVE_MUTEXES */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::recursive_mutex_unlock (ACE_recursive_thread_mutex_t *m)
-{
-#if defined (ACE_HAS_THREADS)
-#if defined (ACE_HAS_RECURSIVE_MUTEXES)
- return ACE_OS::thread_mutex_unlock (m);
-#else
-ACE_TRACE ("ACE_Recursive_Thread_Mutex::release");
-#if !defined (ACE_NDEBUG)
- ACE_thread_t t_id = ACE_OS::thr_self ();
-#endif /* ACE_NDEBUG */
- int result = 0;
-
- if (ACE_OS::thread_mutex_lock (&m->nesting_mutex_) == -1)
- result = -1;
- else
- {
-#if !defined (ACE_NDEBUG)
- if (m->nesting_level_ == 0
- || ACE_OS::thr_equal (t_id, m->owner_id_) == 0)
- {
- errno = EINVAL;
- result = -1;
- }
- else
-#endif /* ACE_NDEBUG */
- {
- m->nesting_level_--;
- if (m->nesting_level_ == 0)
- {
- // This may not be strictly necessary, but it does put
- // the mutex into a known state...
- m->owner_id_ = ACE_OS::NULL_thread;
-
- // Inform waiters that the lock is free.
- if (ACE_OS::cond_signal (&m->lock_available_) == -1)
- result = -1;
- }
- }
- }
-
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- ACE_OS::thread_mutex_unlock (&m->nesting_mutex_);
- }
- return result;
-#endif /* ACE_HAS_RECURSIVE_MUTEXES */
-#else
- ACE_UNUSED_ARG (m);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::sema_destroy (ACE_sema_t *s)
-{
- ACE_TRACE ("ACE_OS::sema_destroy");
-# if defined (ACE_HAS_POSIX_SEM)
- int result;
-# if defined (ACE_LACKS_NAMED_POSIX_SEM)
- if (s->name_)
- {
- // Only destroy the semaphore if we're the ones who
- // initialized it.
- ACE_OSCALL (::sem_destroy (s->sema_),int, -1, result);
- ACE_OS::shm_unlink (s->name_);
- delete s->name_;
- return result;
- }
-#else
- if (s->name_)
- {
- ACE_OSCALL (::sem_unlink (s->name_), int, -1, result);
- ACE_OS::free ((void *) s->name_);
- ACE_OSCALL_RETURN (::sem_close (s->sema_), int, -1);
- }
-# endif /* ACE_LACKS_NAMED_POSIX_SEM */
- else
- {
- ACE_OSCALL (::sem_destroy (s->sema_), int, -1, result);
- delete s->sema_;
- s->sema_ = 0;
- return result;
- }
-# elif defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_destroy (s), ace_result_), int, -1);
-# elif defined (ACE_HAS_PTHREADS)
- int r1 = ACE_OS::mutex_destroy (&s->lock_);
- int r2 = ACE_OS::cond_destroy (&s->count_nonzero_);
- return r1 != 0 || r2 != 0 ? -1 : 0;
-# elif defined (ACE_HAS_WTHREADS)
-# if !defined (ACE_USES_WINCE_SEMA_SIMULATION)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (*s), ace_result_), int, -1);
-# else /* ACE_USES_WINCE_SEMA_SIMULATION */
- // Free up underlying objects of the simulated semaphore.
- int r1 = ACE_OS::thread_mutex_destroy (&s->lock_);
- int r2 = ACE_OS::event_destroy (&s->count_nonzero_);
- return r1 != 0 || r2 != 0 ? -1 : 0;
-# endif /* ACE_USES_WINCE_SEMA_SIMULATION */
-# elif defined (ACE_PSOS)
- int result;
- ACE_OSCALL (ACE_ADAPT_RETVAL (::sm_delete (s->sema_), result), int, -1, result);
- s->sema_ = 0;
- return result;
-# elif defined (VXWORKS)
- int result;
- ACE_OSCALL (::semDelete (s->sema_), int, -1, result);
- s->sema_ = 0;
- return result;
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (s);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_POSIX_SEM */
-}
-
-// NOTE: The following four function definitions must appear before
-// ACE_OS::sema_init ().
-
-ACE_INLINE int
-ACE_OS::close (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::close");
-#if defined (ACE_WIN32)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (handle), ace_result_), int, -1);
-#elif defined (ACE_PSOS) && ! defined (ACE_PSOS_LACKS_PHILE)
- u_long result = ::close_f (handle);
- if (result != 0)
- {
- errno = result;
- return ACE_static_cast (int, -1);
- }
- return ACE_static_cast (int, 0);
-#else
- ACE_OSCALL_RETURN (::close (handle), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-// This function returns the number of bytes in the file referenced by
-// FD.
-
-ACE_INLINE long
-ACE_OS::filesize (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::filesize");
-#if defined (ACE_WIN32)
- ACE_WIN32CALL_RETURN (::GetFileSize (handle, NULL), long, -1);
-#else /* !ACE_WIN32 */
- struct stat sb;
-
- return ACE_OS::fstat (handle, &sb) == -1 ? -1 : (long) sb.st_size;
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::ftruncate (ACE_HANDLE handle, off_t offset)
-{
- ACE_TRACE ("ACE_OS::ftruncate");
-#if defined (ACE_WIN32)
- if (::SetFilePointer (handle, offset, NULL, FILE_BEGIN) != (unsigned) -1)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetEndOfFile (handle), ace_result_), int, -1);
- else
- ACE_FAIL_RETURN (-1);
- /* NOTREACHED */
-#elif defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (offset);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_PSOS)
- ACE_OSCALL_RETURN (::ftruncate_f (handle, offset), int, -1);
-#else
- ACE_OSCALL_RETURN (::ftruncate (handle, offset), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE void *
-ACE_OS::mmap (void *addr,
- size_t len,
- int prot,
- int flags,
- ACE_HANDLE file_handle,
- off_t off,
- ACE_HANDLE *file_mapping,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_OS::mmap");
-#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP)
- int nt_flags = 0;
- ACE_HANDLE local_handle = ACE_INVALID_HANDLE;
-
- // Ensure that file_mapping is non-zero.
- if (file_mapping == 0)
- file_mapping = &local_handle;
-
- if (ACE_BIT_ENABLED (flags, MAP_PRIVATE))
- {
- prot = PAGE_WRITECOPY;
- nt_flags = FILE_MAP_COPY;
- }
- else if (ACE_BIT_ENABLED (flags, MAP_SHARED))
- {
- if (ACE_BIT_ENABLED (prot, PAGE_READONLY))
- nt_flags = FILE_MAP_READ;
- if (ACE_BIT_ENABLED (prot, PAGE_READWRITE))
- nt_flags = FILE_MAP_WRITE;
- }
-
- // Only create a new handle if we didn't have a valid one passed in.
- if (*file_mapping == ACE_INVALID_HANDLE)
- *file_mapping = ::CreateFileMapping (file_handle,
- ACE_OS::default_win32_security_attributes (sa),
- prot,
- 0,
- 0,
- 0);
- if (*file_mapping == 0)
- ACE_FAIL_RETURN (MAP_FAILED);
-
-# if defined (ACE_OS_EXTRA_MMAP_FLAGS)
- nt_flags |= ACE_OS_EXTRA_MMAP_FLAGS;
-# endif /* ACE_OS_EXTRA_MMAP_FLAGS */
-
-# if !defined (ACE_HAS_WINCE)
- void *addr_mapping = ::MapViewOfFileEx (*file_mapping,
- nt_flags,
- 0,
- off,
- len,
- addr);
-# else
- ACE_UNUSED_ARG (addr); // WinCE doesn't allow specifying <addr>.
- void *addr_mapping = ::MapViewOfFile (*file_mapping,
- nt_flags,
- 0,
- off,
- len);
-# endif /* ! ACE_HAS_WINCE */
-
- // Only close this down if we used the temporary.
- if (file_mapping == &local_handle)
- ::CloseHandle (*file_mapping);
-
- if (addr_mapping == 0)
- ACE_FAIL_RETURN (MAP_FAILED);
-
- else if (ACE_BIT_ENABLED (flags, MAP_FIXED)
- && addr_mapping != addr)
- {
- errno = EINVAL;
- return MAP_FAILED;
- }
- else
- return addr_mapping;
-#elif defined (__Lynx__)
- // The LynxOS 2.5.0 mmap doesn't allow operations on plain
- // file descriptors. So, create a shm object and use that.
- ACE_UNUSED_ARG (sa);
-
- char name [128];
- sprintf (name, "%d", file_handle);
-
- // Assumes that this was called by ACE_Mem_Map, so &file_mapping != 0.
- // Otherwise, we don't support the incomplete LynxOS mmap implementation.
- // We do support it by creating a hidden shared memory object, and using
- // that for the mapping.
- int shm_handle;
- if (! file_mapping)
- file_mapping = &shm_handle;
- if ((*file_mapping = ::shm_open (name,
- O_RDWR | O_CREAT | O_TRUNC,
- ACE_DEFAULT_FILE_PERMS)) == -1)
- return MAP_FAILED;
- else
- {
- // The size of the shared memory object must be explicitly set on LynxOS.
- const off_t filesize = ACE_OS::filesize (file_handle);
- if (::ftruncate (*file_mapping, filesize) == -1)
- return MAP_FAILED;
- else
- {
-# if defined (ACE_OS_EXTRA_MMAP_FLAGS)
- flags |= ACE_OS_EXTRA_MMAP_FLAGS;
-# endif /* ACE_OS_EXTRA_MMAP_FLAGS */
- char *map = (char *) ::mmap ((ACE_MMAP_TYPE) addr,
- len,
- prot,
- flags,
- *file_mapping,
- off);
- if (map == MAP_FAILED)
- return MAP_FAILED;
- else
- // Finally, copy the file contents to the shared memory object.
- return ::read (file_handle, map, (int) filesize) == filesize
- ? map
- : MAP_FAILED;
- }
- }
-#elif !defined (ACE_LACKS_MMAP)
- ACE_UNUSED_ARG (sa);
-
-# if defined (ACE_OS_EXTRA_MMAP_FLAGS)
- flags |= ACE_OS_EXTRA_MMAP_FLAGS;
-# endif /* ACE_OS_EXTRA_MMAP_FLAGS */
- ACE_UNUSED_ARG (file_mapping);
- ACE_OSCALL_RETURN ((void *) ::mmap ((ACE_MMAP_TYPE) addr,
- len,
- prot,
- flags,
- file_handle,
- off),
- void *, MAP_FAILED);
-#else
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (len);
- ACE_UNUSED_ARG (prot);
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (file_handle);
- ACE_UNUSED_ARG (off);
- ACE_UNUSED_ARG (file_mapping);
- ACE_UNUSED_ARG (sa);
- ACE_NOTSUP_RETURN (MAP_FAILED);
-#endif /*ACE_WIN32 */
-}
-
-// NOTE: The previous four function definitions must appear before
-// ACE_OS::sema_init ().
-
-ACE_INLINE int
-ACE_OS::sema_init (ACE_sema_t *s,
- u_int count,
- int type,
- const ACE_TCHAR *name,
- void *arg,
- int max,
- LPSECURITY_ATTRIBUTES sa)
-{
- ACE_TRACE ("ACE_OS::sema_init");
-# if defined (ACE_HAS_POSIX_SEM)
- ACE_UNUSED_ARG (arg);
- ACE_UNUSED_ARG (max);
- ACE_UNUSED_ARG (sa);
-
- s->name_ = 0;
-
-# if defined (ACE_LACKS_NAMED_POSIX_SEM)
- if (type == USYNC_PROCESS)
- {
- // Let's see if it already exists.
- ACE_HANDLE fd = ACE_OS::shm_open (name,
- O_RDWR | O_CREAT | O_EXCL,
- ACE_DEFAULT_FILE_PERMS);
- if (fd == ACE_INVALID_HANDLE)
- {
- if (errno == EEXIST)
- fd = ACE_OS::shm_open (name,
- O_RDWR | O_CREAT,
- ACE_DEFAULT_FILE_PERMS);
- else
- return -1;
- }
- else
- {
- // We own this shared memory object! Let's set its
- // size.
- if (ACE_OS::ftruncate (fd,
- sizeof (ACE_sema_t)) == -1)
- return -1;
- s->name_ = ACE_OS::strdup (name);
- if (s->name_ == 0)
- return -1;
- }
- if (fd == -1)
- return -1;
-
- s->sema_ = (sem_t *)
- ACE_OS::mmap (0,
- sizeof (ACE_sema_t),
- PROT_RDWR,
- MAP_SHARED,
- fd,
- 0);
- ACE_OS::close (fd);
- if (s->sema_ == (sem_t *) MAP_FAILED)
- return -1;
- if (s->name_
- // @@ According UNIX Network Programming V2 by Stevens,
- // sem_init() is currently not required to return zero on
- // success, but it *does* return -1 upon failure. For
- // this reason, check for failure by comparing to -1,
- // instead of checking for success by comparing to zero.
- // -Ossama
- // Only initialize it if we're the one who created it.
- && ::sem_init (s->sema_, type == USYNC_PROCESS, count) == -1)
- return -1;
- return 0;
- }
-#else
- if (name)
- {
- ACE_ALLOCATOR_RETURN (s->name_,
- ACE_OS::strdup (name),
- -1);
- s->sema_ = ::sem_open (s->name_,
- O_CREAT,
- ACE_DEFAULT_FILE_PERMS,
- count);
- if (s->sema_ == SEM_FAILED)
- return -1;
- else
- return 0;
- }
-# endif /* ACE_LACKS_NAMED_POSIX_SEM */
- else
- {
- ACE_NEW_RETURN (s->sema_,
- sem_t,
- -1);
- ACE_OSCALL_RETURN (::sem_init (s->sema_,
- type != USYNC_THREAD,
- count), int, -1);
- }
-# elif defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (max);
- ACE_UNUSED_ARG (sa);
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_init (s, count, type, arg), ace_result_),
- int, -1);
-# elif defined (ACE_HAS_PTHREADS)
- ACE_UNUSED_ARG (max);
- ACE_UNUSED_ARG (sa);
- int result = -1;
-
- if (ACE_OS::mutex_init (&s->lock_, type, name,
- (ACE_mutexattr_t *) arg) == 0
- && ACE_OS::cond_init (&s->count_nonzero_, type, name, arg) == 0
- && ACE_OS::mutex_lock (&s->lock_) == 0)
- {
- s->count_ = count;
- s->waiters_ = 0;
-
- if (ACE_OS::mutex_unlock (&s->lock_) == 0)
- result = 0;
- }
-
- if (result == -1)
- {
- ACE_OS::mutex_destroy (&s->lock_);
- ACE_OS::cond_destroy (&s->count_nonzero_);
- }
- return result;
-# elif defined (ACE_HAS_WTHREADS)
-# if ! defined (ACE_USES_WINCE_SEMA_SIMULATION)
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (arg);
- // Create the semaphore with its value initialized to <count> and
- // its maximum value initialized to <max>.
- *s =
- ACE_TEXT_CreateSemaphore (ACE_OS::default_win32_security_attributes (sa),
- count,
- max,
- name);
-
- if (*s == 0)
- ACE_FAIL_RETURN (-1);
- /* NOTREACHED */
- else
- return 0;
-# else /* ACE_USES_WINCE_SEMA_SIMULATION */
- int result = -1;
-
- // Initialize internal object for semaphore simulation.
- // Grab the lock as soon as possible when we initializing
- // the semaphore count. Notice that we initialize the
- // event object as "manually reset" so we can amortize the
- // cost for singling/reseting the event.
- // @@ I changed the mutex type to thread_mutex. Notice that this
- // is basically a CriticalSection object and doesn't not has
- // any security attribute whatsoever. However, since this
- // semaphore implementation only works within a process, there
- // shouldn't any security issue at all.
- if (ACE_OS::thread_mutex_init (&s->lock_, type, name, (ACE_mutexattr_t *)arg) == 0
- && ACE_OS::event_init (&s->count_nonzero_, 1,
- count > 0, type, name, arg, sa) == 0
- && ACE_OS::thread_mutex_lock (&s->lock_) == 0)
- {
- s->count_ = count;
-
- if (ACE_OS::thread_mutex_unlock (&s->lock_) == 0)
- result = 0;
- }
-
- // Destroy the internal objects if we didn't initialize
- // either of them successfully. Don't bother to check
- // for errors.
- if (result == -1)
- {
- ACE_OS::thread_mutex_destroy (&s->lock_);
- ACE_OS::event_destroy (&s->count_nonzero_);
- }
- return result;
-# endif /* ACE_USES_WINCE_SEMA_SIMULATION */
-# elif defined (ACE_PSOS)
- u_long result;
- ACE_OS::memcpy (s->name_, name, sizeof (s->name_));
- // default semaphore creation flags to priority based, global across nodes
- u_long flags = 0;
- flags |= (type & SM_LOCAL) ? SM_LOCAL : SM_GLOBAL;
- flags |= (type & SM_FIFO) ? SM_FIFO : SM_PRIOR;
- result = ::sm_create (s->name_, count, flags, &(s->sema_));
- return (result == 0) ? 0 : -1;
-# elif defined (VXWORKS)
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
- ACE_UNUSED_ARG (max);
- ACE_UNUSED_ARG (sa);
- s->name_ = 0;
- s->sema_ = ::semCCreate (type, count);
- return s->sema_ ? 0 : -1;
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (count);
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
- ACE_UNUSED_ARG (max);
- ACE_UNUSED_ARG (sa);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_POSIX_SEM */
-}
-
-ACE_INLINE int
-ACE_OS::sema_post (ACE_sema_t *s)
-{
- ACE_TRACE ("ACE_OS::sema_post");
-# if defined (ACE_HAS_POSIX_SEM)
- ACE_OSCALL_RETURN (::sem_post (s->sema_), int, -1);
-# elif defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_post (s), ace_result_), int, -1);
-# elif defined (ACE_HAS_PTHREADS)
- int result = -1;
-
- if (ACE_OS::mutex_lock (&s->lock_) == 0)
- {
- // Always allow a waiter to continue if there is one.
- if (s->waiters_ > 0)
- result = ACE_OS::cond_signal (&s->count_nonzero_);
- else
- result = 0;
-
- s->count_++;
- ACE_OS::mutex_unlock (&s->lock_);
- }
- return result;
-# elif defined (ACE_HAS_WTHREADS)
-# if !defined (ACE_USES_WINCE_SEMA_SIMULATION)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::ReleaseSemaphore (*s, 1, 0),
- ace_result_),
- int, -1);
-# else /* ACE_USES_WINCE_SEMA_SIMULATION */
- int result = -1;
-
- // Since we are simulating semaphores, we need to update semaphore
- // count manually. Grab the lock to prevent race condition first.
- if (ACE_OS::thread_mutex_lock (&s->lock_) == 0)
- {
- // Check the original state of event object. Single the event
- // object in transition from semaphore not available to
- // semaphore available.
- if (s->count_++ <= 0)
- result = ACE_OS::event_signal (&s->count_nonzero_);
- else
- result = 0;
-
- ACE_OS::thread_mutex_unlock (&s->lock_);
- }
- return result;
-# endif /* ACE_USES_WINCE_SEMA_SIMULATION */
-# elif defined (ACE_PSOS)
- int result;
- ACE_OSCALL (ACE_ADAPT_RETVAL (::sm_v (s->sema_), result), int, -1, result);
- return result;
-# elif defined (VXWORKS)
- ACE_OSCALL_RETURN (::semGive (s->sema_), int, -1);
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (s);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_POSIX_SEM */
-}
-
-ACE_INLINE int
-ACE_OS::sema_post (ACE_sema_t *s, size_t release_count)
-{
-#if defined (ACE_WIN32) && !defined (ACE_USES_WINCE_SEMA_SIMULATION)
- // Win32 supports this natively.
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::ReleaseSemaphore (*s, release_count, 0),
- ace_result_), int, -1);
-#else
- // On POSIX platforms we need to emulate this ourselves.
- // @@ We can optimize on this implementation. However,
- // the semaphore promitive on Win32 doesn't allow one
- // to increase a semaphore to more than the count it was
- // first initialized. Posix and solaris don't seem to have
- // this restriction. Should we impose the restriction in
- // our semaphore simulation?
- for (size_t i = 0; i < release_count; i++)
- if (ACE_OS::sema_post (s) == -1)
- return -1;
-
- return 0;
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::sema_trywait (ACE_sema_t *s)
-{
- ACE_TRACE ("ACE_OS::sema_trywait");
-# if defined (ACE_HAS_POSIX_SEM)
- // POSIX semaphores set errno to EAGAIN if trywait fails
- ACE_OSCALL_RETURN (::sem_trywait (s->sema_), int, -1);
-# elif defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- // STHREADS semaphores set errno to EBUSY if trywait fails.
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_trywait (s),
- ace_result_),
- int, -1);
-# elif defined (ACE_HAS_PTHREADS)
-
- int result = -1;
-
- if (ACE_OS::mutex_lock (&s->lock_) == 0)
- {
- if (s->count_ > 0)
- {
- --s->count_;
- result = 0;
- }
- else
- errno = EBUSY;
-
- ACE_OS::mutex_unlock (&s->lock_);
- }
- return result;
-# elif defined (ACE_HAS_WTHREADS)
-# if !defined (ACE_USES_WINCE_SEMA_SIMULATION)
- int result = ::WaitForSingleObject (*s, 0);
-
- if (result == WAIT_OBJECT_0)
- return 0;
- else
- {
- if (result == WAIT_TIMEOUT)
- errno = EBUSY;
- else
- ACE_OS::set_errno_to_last_error ();
- // This is a hack, we need to find an appropriate mapping...
- return -1;
- }
-# else /* ACE_USES_WINCE_SEMA_SIMULATION */
- // Check the status of semaphore first. Return immediately
- // if the semaphore is not available and avoid grabing the
- // lock.
- int result = ::WaitForSingleObject (s->count_nonzero_, 0);
-
- if (result == WAIT_OBJECT_0) // Proceed when it is available.
- {
- ACE_OS::thread_mutex_lock (&s->lock_);
-
- // Need to double check if the semaphore is still available.
- // The double checking scheme will slightly affect the
- // efficiency if most of the time semaphores are not blocked.
- result = ::WaitForSingleObject (s->count_nonzero_, 0);
- if (result == WAIT_OBJECT_0)
- {
- // Adjust the semaphore count. Only update the event
- // object status when the state changed.
- s->count_--;
- if (s->count_ <= 0)
- ACE_OS::event_reset (&s->count_nonzero_);
- result = 0;
- }
-
- ACE_OS::thread_mutex_unlock (&s->lock_);
- }
-
- // Translate error message to errno used by ACE.
- if (result == WAIT_TIMEOUT)
- errno = EBUSY;
- else
- ACE_OS::set_errno_to_last_error ();
- // This is taken from the hack above. ;)
- return -1;
-# endif /* ACE_USES_WINCE_SEMA_SIMULATION */
-# elif defined (ACE_PSOS)
- switch (::sm_p (s->sema_, SM_NOWAIT, 0))
- {
- case 0:
- return 0;
- case ERR_NOSEM:
- errno = EBUSY;
- // intentional fall through
- default:
- return -1;
- }
-# elif defined (VXWORKS)
- if (::semTake (s->sema_, NO_WAIT) == ERROR)
- if (errno == S_objLib_OBJ_TIMEOUT)
- {
- // couldn't get the semaphore
- errno = EBUSY;
- return -1;
- }
- else
- // error
- return -1;
- else
- // got the semaphore
- return 0;
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (s);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_POSIX_SEM */
-}
-
-ACE_INLINE int
-ACE_OS::sema_wait (ACE_sema_t *s)
-{
- ACE_TRACE ("ACE_OS::sema_wait");
-# if defined (ACE_HAS_POSIX_SEM)
- ACE_OSCALL_RETURN (::sem_wait (s->sema_), int, -1);
-# elif defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_wait (s), ace_result_), int, -1);
-# elif defined (ACE_HAS_PTHREADS)
- int result = 0;
-
- ACE_PTHREAD_CLEANUP_PUSH (&s->lock_);
-
- if (ACE_OS::mutex_lock (&s->lock_) != 0)
- result = -1;
- else
- {
- // Keep track of the number of waiters so that we can signal
- // them properly in <ACE_OS::sema_post>.
- s->waiters_++;
-
- // Wait until the semaphore count is > 0.
- while (s->count_ == 0)
- if (ACE_OS::cond_wait (&s->count_nonzero_,
- &s->lock_) == -1)
- {
- result = -2; // -2 means that we need to release the mutex.
- break;
- }
-
- --s->waiters_;
- }
-
- if (result == 0)
- --s->count_;
-
- if (result != -1)
- ACE_OS::mutex_unlock (&s->lock_);
- ACE_PTHREAD_CLEANUP_POP (0);
- return result < 0 ? -1 : result;
-
-# elif defined (ACE_HAS_WTHREADS)
-# if !defined (ACE_USES_WINCE_SEMA_SIMULATION)
- switch (::WaitForSingleObject (*s, INFINITE))
- {
- case WAIT_OBJECT_0:
- return 0;
- default:
- // This is a hack, we need to find an appropriate mapping...
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- /* NOTREACHED */
-# else /* ACE_USES_WINCE_SEMA_SIMULATION */
- // Timed wait.
- int result = -1;
- for (;;)
- // Check if the semaphore is avialable or not and wait forever.
- // Don't bother to grab the lock if it is not available (to avoid
- // deadlock.)
- switch (::WaitForSingleObject (s->count_nonzero_, INFINITE))
- {
- case WAIT_OBJECT_0:
- ACE_OS::thread_mutex_lock (&s->lock_);
-
- // Need to double check if the semaphore is still available.
- // This time, we shouldn't wait at all.
- if (::WaitForSingleObject (s->count_nonzero_, 0) == WAIT_OBJECT_0)
- {
- // Decrease the internal counter. Only update the event
- // object's status when the state changed.
- s->count_--;
- if (s->count_ <= 0)
- ACE_OS::event_reset (&s->count_nonzero_);
- result = 0;
- }
-
- ACE_OS::thread_mutex_unlock (&s->lock_);
- // if we didn't get a hold on the semaphore, the result won't
- // be 0 and thus, we'll start from the beginning again.
- if (result == 0)
- return 0;
- break;
-
- default:
- // Since we wait indefinitely, anything other than
- // WAIT_OBJECT_O indicates an error.
- ACE_OS::set_errno_to_last_error ();
- // This is taken from the hack above. ;)
- return -1;
- }
- /* NOTREACHED */
-# endif /* ACE_USES_WINCE_SEMA_SIMULATION */
-# elif defined (ACE_PSOS)
- int result;
- ACE_OSCALL (ACE_ADAPT_RETVAL (::sm_p (s->sema_, SM_WAIT, 0), result),
- int, -1, result);
- return result;
-# elif defined (VXWORKS)
- ACE_OSCALL_RETURN (::semTake (s->sema_, WAIT_FOREVER), int, -1);
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (s);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_POSIX_SEM */
-}
-
-ACE_INLINE int
-ACE_OS::sema_wait (ACE_sema_t *s, ACE_Time_Value &tv)
-{
- ACE_TRACE ("ACE_OS::sema_wait");
-# if defined (ACE_HAS_POSIX_SEM)
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (tv);
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (tv);
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_HAS_PTHREADS)
- int result = 0;
- ACE_Errno_Guard error (errno, 0);
-
- ACE_PTHREAD_CLEANUP_PUSH (&s->lock_);
-
- if (ACE_OS::mutex_lock (&s->lock_) != 0)
- result = -1;
- else
- {
- // Keep track of the number of waiters so that we can signal
- // them properly in <ACE_OS::sema_post>.
- s->waiters_++;
-
- // Wait until the semaphore count is > 0 or until we time out.
- while (s->count_ == 0)
- if (ACE_OS::cond_timedwait (&s->count_nonzero_,
- &s->lock_,
- &tv) == -1)
- {
- error = errno;
- result = -2; // -2 means that we need to release the mutex.
- break;
- }
-
- --s->waiters_;
- }
-
- if (result == 0)
- {
-# if defined (ACE_LACKS_COND_TIMEDWAIT_RESET)
- tv = ACE_OS::gettimeofday ();
-# endif /* ACE_LACKS_COND_TIMEDWAIT_RESET */
- --s->count_;
- }
-
- if (result != -1)
- ACE_OS::mutex_unlock (&s->lock_);
- ACE_PTHREAD_CLEANUP_POP (0);
- return result < 0 ? -1 : result;
-# elif defined (ACE_HAS_WTHREADS)
-# if !defined (ACE_USES_WINCE_SEMA_SIMULATION)
- int msec_timeout;
-
- if (tv.sec () == 0 && tv.usec () == 0)
- msec_timeout = 0; // Do a "poll."
- else
- {
- // Note that we must convert between absolute time (which is
- // passed as a parameter) and relative time (which is what
- // <WaitForSingleObjects> expects).
- ACE_Time_Value relative_time (tv - ACE_OS::gettimeofday ());
-
- // Watchout for situations where a context switch has caused the
- // current time to be > the timeout.
- if (relative_time < ACE_Time_Value::zero)
- msec_timeout = 0;
- else
- msec_timeout = relative_time.msec ();
- }
-
- switch (::WaitForSingleObject (*s, msec_timeout))
- {
- case WAIT_OBJECT_0:
- tv = ACE_OS::gettimeofday (); // Update time to when acquired
- return 0;
- case WAIT_TIMEOUT:
- errno = ETIME;
- return -1;
- default:
- // This is a hack, we need to find an appropriate mapping...
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- /* NOTREACHED */
-# else /* ACE_USES_WINCE_SEMA_SIMULATION */
- // Note that in this mode, the acquire is done in two steps, and
- // we may get signaled but cannot grab the semaphore before
- // timeout. In that case, we'll need to restart the process with
- // updated timeout value.
-
- // <tv> is an absolute time
- ACE_Time_Value relative_time = tv - ACE_OS::gettimeofday ();
- int result = -1;
-
- // While we are not timeout yet.
- while (relative_time > ACE_Time_Value::zero)
- {
- // Wait for our turn to get the object.
- switch (::WaitForSingleObject (s->count_nonzero_, relative_time.msec ()))
- {
- case WAIT_OBJECT_0:
- ACE_OS::thread_mutex_lock (&s->lock_);
-
- // Need to double check if the semaphore is still available.
- // We can only do a "try lock" styled wait here to avoid
- // blocking threads that want to signal the semaphore.
- if (::WaitForSingleObject (s->count_nonzero_, 0) == WAIT_OBJECT_0)
- {
- // As before, only reset the object when the semaphore
- // is no longer available.
- s->count_--;
- if (s->count_ <= 0)
- ACE_OS::event_reset (&s->count_nonzero_);
- result = 0;
- }
-
- ACE_OS::thread_mutex_unlock (&s->lock_);
-
- // Only return when we successfully get the semaphore.
- if (result == 0)
- {
- tv = ACE_OS::gettimeofday (); // Update to time acquired
- return 0;
- }
- break;
-
- // We have timed out.
- case WAIT_TIMEOUT:
- errno = ETIME;
- return -1;
-
- // What?
- default:
- ACE_OS::set_errno_to_last_error ();
- // This is taken from the hack above. ;)
- return -1;
- };
-
- // Haven't been able to get the semaphore yet, update the
- // timeout value to reflect the remaining time we want to wait.
- relative_time = tv - ACE_OS::gettimeofday ();
- }
-
- // We have timed out.
- errno = ETIME;
- return -1;
-# endif /* ACE_USES_WINCE_SEMA_SIMULATION */
-# elif defined (ACE_PSOS)
- // Note that we must convert between absolute time (which is
- // passed as a parameter) and relative time (which is what
- // the system call expects).
- ACE_Time_Value relative_time (tv - ACE_OS::gettimeofday ());
-
- u_long ticks = relative_time.sec() * KC_TICKS2SEC +
- relative_time.usec () * KC_TICKS2SEC /
- ACE_ONE_SECOND_IN_USECS;
- if(ticks == 0)
- ACE_OSCALL_RETURN (::sm_p (s->sema_, SM_NOWAIT, 0), int, -1); //no timeout
- else
- ACE_OSCALL_RETURN (::sm_p (s->sema_, SM_WAIT, ticks), int, -1);
-# elif defined (VXWORKS)
- // Note that we must convert between absolute time (which is
- // passed as a parameter) and relative time (which is what
- // the system call expects).
- ACE_Time_Value relative_time (tv - ACE_OS::gettimeofday ());
-
- int ticks_per_sec = ::sysClkRateGet ();
-
- int ticks = relative_time.sec() * ticks_per_sec +
- relative_time.usec () * ticks_per_sec / ACE_ONE_SECOND_IN_USECS;
- if (::semTake (s->sema_, ticks) == ERROR)
- {
- if (errno == S_objLib_OBJ_TIMEOUT)
- // Convert the VxWorks errno to one that's common for to ACE
- // platforms.
- errno = ETIME;
- return -1;
- }
- else
- {
- tv = ACE_OS::gettimeofday (); // Update to time acquired
- return 0;
- }
-# endif /* ACE_HAS_STHREADS */
-# else
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (tv);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_POSIX_SEM */
-}
-
-
-ACE_INLINE int
-ACE_OS::rw_tryrdlock (ACE_rwlock_t *rw)
-{
- ACE_TRACE ("ACE_OS::rw_tryrdlock");
-#if defined (ACE_HAS_THREADS)
-# if !defined (ACE_LACKS_RWLOCK_T) || defined (ACE_HAS_PTHREADS_UNIX98_EXT)
-# if defined (ACE_HAS_PTHREADS_UNIX98_EXT)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_tryrdlock (rw),
- ace_result_),
- int, -1);
-# else /* Solaris */
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_tryrdlock (rw), ace_result_), int, -1);
-# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
-# else /* NT, POSIX, and VxWorks don't support this natively. */
- int result = -1;
-
- if (ACE_OS::mutex_lock (&rw->lock_) != -1)
- {
- ACE_Errno_Guard error (errno, 0);
-
- if (rw->ref_count_ == -1 || rw->num_waiting_writers_ > 0)
- {
- error = EBUSY;
- result = -1;
- }
- else
- {
- rw->ref_count_++;
- result = 0;
- }
-
- ACE_OS::mutex_unlock (&rw->lock_);
- }
- return result;
-# endif /* ! ACE_LACKS_RWLOCK_T */
-#else
- ACE_UNUSED_ARG (rw);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::rw_trywrlock (ACE_rwlock_t *rw)
-{
- ACE_TRACE ("ACE_OS::rw_trywrlock");
-#if defined (ACE_HAS_THREADS)
-# if !defined (ACE_LACKS_RWLOCK_T) || defined (ACE_HAS_PTHREADS_UNIX98_EXT)
-# if defined (ACE_HAS_PTHREADS_UNIX98_EXT)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_trywrlock (rw),
- ace_result_),
- int, -1);
-# else /* Solaris */
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_trywrlock (rw), ace_result_), int, -1);
-# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
-# else /* NT, POSIX, and VxWorks don't support this natively. */
- int result = -1;
-
- if (ACE_OS::mutex_lock (&rw->lock_) != -1)
- {
- ACE_Errno_Guard error (errno, 0);
-
- if (rw->ref_count_ != 0)
- {
- error = EBUSY;
- result = -1;
- }
- else
- {
- rw->ref_count_ = -1;
- result = 0;
- }
-
- ACE_OS::mutex_unlock (&rw->lock_);
- }
- return result;
-# endif /* ! ACE_LACKS_RWLOCK_T */
-#else
- ACE_UNUSED_ARG (rw);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::rw_rdlock (ACE_rwlock_t *rw)
-{
- ACE_TRACE ("ACE_OS::rw_rdlock");
-#if defined (ACE_HAS_THREADS)
-# if !defined (ACE_LACKS_RWLOCK_T) || defined (ACE_HAS_PTHREADS_UNIX98_EXT)
-# if defined (ACE_HAS_PTHREADS_UNIX98_EXT)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_rdlock (rw),
- ace_result_),
- int, -1);
-# else /* Solaris */
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_rdlock (rw), ace_result_), int, -1);
-# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
-# else /* NT, POSIX, and VxWorks don't support this natively. */
-# if defined (ACE_HAS_PTHREADS)
- ACE_PTHREAD_CLEANUP_PUSH (&rw->lock_);
-# endif /* ACE_HAS_PTHREADS */
- int result = 0;
- if (ACE_OS::mutex_lock (&rw->lock_) == -1)
- result = -1; // -1 means didn't get the mutex.
- else
- {
- // Give preference to writers who are waiting.
- while (rw->ref_count_ < 0 || rw->num_waiting_writers_ > 0)
- {
- rw->num_waiting_readers_++;
- if (ACE_OS::cond_wait (&rw->waiting_readers_, &rw->lock_) == -1)
- {
- result = -2; // -2 means that we need to release the mutex.
- break;
- }
- rw->num_waiting_readers_--;
- }
- }
- if (result == 0)
- rw->ref_count_++;
- if (result != -1)
- ACE_OS::mutex_unlock (&rw->lock_);
-# if defined (ACE_HAS_PTHREADS)
- ACE_PTHREAD_CLEANUP_POP (0);
-# endif /* defined (ACE_HAS_PTHREADS) */
- return 0;
-# endif /* ! ACE_LACKS_RWLOCK_T */
-#else
- ACE_UNUSED_ARG (rw);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::rw_wrlock (ACE_rwlock_t *rw)
-{
- ACE_TRACE ("ACE_OS::rw_wrlock");
-#if defined (ACE_HAS_THREADS)
-# if !defined (ACE_LACKS_RWLOCK_T) || defined (ACE_HAS_PTHREADS_UNIX98_EXT)
-# if defined (ACE_HAS_PTHREADS_UNIX98_EXT)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_wrlock (rw),
- ace_result_),
- int, -1);
-# else /* Solaris */
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_wrlock (rw), ace_result_), int, -1);
-# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
-# else /* NT, POSIX, and VxWorks don't support this natively. */
-# if defined (ACE_HAS_PTHREADS)
- ACE_PTHREAD_CLEANUP_PUSH (&rw->lock_);
-# endif /* defined (ACE_HAS_PTHREADS) */
- int result = 0;
-
- if (ACE_OS::mutex_lock (&rw->lock_) == -1)
- result = -1; // -1 means didn't get the mutex.
- else
- {
- while (rw->ref_count_ != 0)
- {
- rw->num_waiting_writers_++;
-
- if (ACE_OS::cond_wait (&rw->waiting_writers_, &rw->lock_) == -1)
- {
- result = -2; // -2 means we need to release the mutex.
- break;
- }
-
- rw->num_waiting_writers_--;
- }
- }
- if (result == 0)
- rw->ref_count_ = -1;
- if (result != -1)
- ACE_OS::mutex_unlock (&rw->lock_);
-# if defined (ACE_HAS_PTHREADS)
- ACE_PTHREAD_CLEANUP_POP (0);
-# endif /* defined (ACE_HAS_PTHREADS) */
- return 0;
-# endif /* ! ACE_LACKS_RWLOCK_T */
-#else
- ACE_UNUSED_ARG (rw);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::rw_unlock (ACE_rwlock_t *rw)
-{
- ACE_TRACE ("ACE_OS::rw_unlock");
-#if defined (ACE_HAS_THREADS)
-# if !defined (ACE_LACKS_RWLOCK_T) || defined (ACE_HAS_PTHREADS_UNIX98_EXT)
-# if defined (ACE_HAS_PTHREADS_UNIX98_EXT)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_unlock (rw),
- ace_result_),
- int, -1);
-# else /* Solaris */
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_unlock (rw), ace_result_), int, -1);
-# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
-# else /* NT, POSIX, and VxWorks don't support this natively. */
- if (ACE_OS::mutex_lock (&rw->lock_) == -1)
- return -1;
-
- if (rw->ref_count_ > 0) // Releasing a reader.
- rw->ref_count_--;
- else if (rw->ref_count_ == -1) // Releasing a writer.
- rw->ref_count_ = 0;
- else
- return -1; // @@ ACE_ASSERT (!"count should not be 0!\n");
-
-
- int result = 0;
- ACE_Errno_Guard error (errno, 0);
-
- if (rw->important_writer_ && rw->ref_count_ == 1)
- // only the reader requesting to upgrade its lock is left over.
- {
- result = ACE_OS::cond_signal (&rw->waiting_important_writer_);
- error = errno;
- }
- else if (rw->num_waiting_writers_ > 0 && rw->ref_count_ == 0)
- // give preference to writers over readers...
- {
- result = ACE_OS::cond_signal (&rw->waiting_writers_);
- error = errno;
- }
- else if (rw->num_waiting_readers_ > 0 && rw->num_waiting_writers_ == 0)
- {
- result = ACE_OS::cond_broadcast (&rw->waiting_readers_);
- error = errno;
- }
-
- ACE_OS::mutex_unlock (&rw->lock_);
- return result;
-# endif /* ! ace_lacks_rwlock_t */
-#else
- ACE_UNUSED_ARG (rw);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ace_has_threads */
-}
-
-// Note that the caller of this method *must* already possess this
-// lock as a read lock.
-// return {-1 and no errno set means: error,
-// -1 and errno==EBUSY set means: could not upgrade,
-// 0 means: upgraded successfully}
-
-
-ACE_INLINE int
-ACE_OS::rw_trywrlock_upgrade (ACE_rwlock_t *rw)
-{
- ACE_TRACE ("ACE_OS::rw_wrlock");
-#if defined (ACE_HAS_THREADS)
-# if !defined (ACE_LACKS_RWLOCK_T)
- // Some native rwlocks, such as those on Solaris and HP-UX 11, don't
- // support the upgrade feature . . .
- ACE_UNUSED_ARG (rw);
- ACE_NOTSUP_RETURN (-1);
-# else /* NT, POSIX, and VxWorks don't support this natively. */
- // The ACE rwlock emulation does support upgrade . . .
- int result = 0;
-
-# if defined (ACE_HAS_PTHREADS)
- ACE_PTHREAD_CLEANUP_PUSH (&rw->lock_);
-# endif /* defined (ACE_HAS_PTHREADS) */
-
- if (ACE_OS::mutex_lock (&rw->lock_) == -1)
- return -1;
- // -1 means didn't get the mutex, error
- else if (rw->important_writer_)
- // an other reader upgrades already
- {
- result = -1;
- errno = EBUSY;
- }
- else
- {
- while (rw->ref_count_ > 1) // wait until only I am left
- {
- rw->num_waiting_writers_++; // prohibit any more readers
- rw->important_writer_ = 1;
-
- if (ACE_OS::cond_wait (&rw->waiting_important_writer_, &rw->lock_) == -1)
- {
- result = -1;
- // we know that we have the lock again, we have this guarantee,
- // but something went wrong
- }
- rw->important_writer_ = 0;
- rw->num_waiting_writers_--;
- }
- if (result == 0)
- {
- // nothing bad happend
- rw->ref_count_ = -1;
- // now I am a writer
- // everything is O.K.
- }
- }
-
- ACE_OS::mutex_unlock (&rw->lock_);
-
-# if defined (ACE_HAS_PTHREADS)
- ACE_PTHREAD_CLEANUP_POP (0);
-# endif /* defined (ACE_HAS_PTHREADS) */
-
- return result;
-
-# endif /* ! ACE_LACKS_RWLOCK_T */
-#else
- ACE_UNUSED_ARG (rw);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-#if defined (ACE_HAS_THREADS) && (!defined (ACE_LACKS_RWLOCK_T) || \
- defined (ACE_HAS_PTHREADS_UNIX98_EXT))
-ACE_INLINE int
-ACE_OS::rwlock_init (ACE_rwlock_t *rw,
- int type,
- const ACE_TCHAR *name,
- void *arg)
-{
- // ACE_TRACE ("ACE_OS::rwlock_init");
-# if defined (ACE_HAS_PTHREADS_UNIX98_EXT)
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
-
- int status;
- pthread_rwlockattr_t attr;
- pthread_rwlockattr_init (&attr);
- pthread_rwlockattr_setpshared (&attr, (type == USYNC_THREAD ?
- PTHREAD_PROCESS_PRIVATE :
- PTHREAD_PROCESS_SHARED));
- status = ACE_ADAPT_RETVAL (pthread_rwlock_init (rw, &attr), status);
- pthread_rwlockattr_destroy (&attr);
-
- return status;
-
-# else
- type = type;
- name = name;
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rwlock_init (rw, type, arg), ace_result_), int, -1);
-# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
-}
-#endif /* ACE_HAS THREADS && !defined (ACE_LACKS_RWLOCK_T) */
-
-ACE_INLINE int
-ACE_OS::rwlock_destroy (ACE_rwlock_t *rw)
-{
- ACE_TRACE ("ACE_OS::rwlock_destroy");
-#if defined (ACE_HAS_THREADS)
-# if !defined (ACE_LACKS_RWLOCK_T) || defined (ACE_HAS_PTHREADS_UNIX98_EXT)
-# if defined (ACE_HAS_PTHREADS_UNIX98_EXT)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_rwlock_destroy (rw),
- ace_result_),
- int, -1);
-# else /* Solaris */
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rwlock_destroy (rw), ace_result_), int, -1);
-# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
-# else /* NT, POSIX, and VxWorks don't support this natively. */
- ACE_OS::mutex_destroy (&rw->lock_);
- ACE_OS::cond_destroy (&rw->waiting_readers_);
- ACE_OS::cond_destroy (&rw->waiting_important_writer_);
- return ACE_OS::cond_destroy (&rw->waiting_writers_);
-# endif /* ACE_HAS_STHREADS && !defined (ACE_LACKS_RWLOCK_T) */
-#else
- ACE_UNUSED_ARG (rw);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::event_init (ACE_event_t *event,
- int manual_reset,
- int initial_state,
- int type,
- const ACE_TCHAR *name,
- void *arg,
- LPSECURITY_ATTRIBUTES sa)
-{
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (arg);
- *event = ACE_TEXT_CreateEvent (ACE_OS::default_win32_security_attributes(sa),
- manual_reset,
- initial_state,
- name);
- if (*event == NULL)
- ACE_FAIL_RETURN (-1);
- else
- return 0;
-#elif defined (ACE_HAS_THREADS)
- ACE_UNUSED_ARG (sa);
- event->manual_reset_ = manual_reset;
- event->is_signaled_ = initial_state;
- event->waiting_threads_ = 0;
-
- int result = ACE_OS::cond_init (&event->condition_,
- type,
- name,
- arg);
- if (result == 0)
- result = ACE_OS::mutex_init (&event->lock_,
- type,
- name,
- (ACE_mutexattr_t *) arg);
- return result;
-#else
- ACE_UNUSED_ARG (event);
- ACE_UNUSED_ARG (manual_reset);
- ACE_UNUSED_ARG (initial_state);
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (arg);
- ACE_UNUSED_ARG (sa);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::event_destroy (ACE_event_t *event)
-{
-#if defined (ACE_WIN32)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (*event), ace_result_), int, -1);
-#elif defined (ACE_HAS_THREADS)
- int r1 = ACE_OS::mutex_destroy (&event->lock_);
- int r2 = ACE_OS::cond_destroy (&event->condition_);
- return r1 != 0 || r2 != 0 ? -1 : 0;
-#else
- ACE_UNUSED_ARG (event);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::event_wait (ACE_event_t *event)
-{
-#if defined (ACE_WIN32)
- switch (::WaitForSingleObject (*event, INFINITE))
- {
- case WAIT_OBJECT_0:
- return 0;
- default:
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
-#elif defined (ACE_HAS_THREADS)
- int result = 0;
- int error = 0;
-
- // grab the lock first
- if (ACE_OS::mutex_lock (&event->lock_) == 0)
- {
- if (event->is_signaled_ == 1)
- // Event is currently signaled.
- {
- if (event->manual_reset_ == 0)
- // AUTO: reset state
- event->is_signaled_ = 0;
- }
- else
- // event is currently not signaled
- {
- event->waiting_threads_++;
-
- if (ACE_OS::cond_wait (&event->condition_,
- &event->lock_) != 0)
- {
- result = -1;
- error = errno;
- // Something went wrong...
- }
-
- event->waiting_threads_--;
- }
-
- // Now we can let go of the lock.
- ACE_OS::mutex_unlock (&event->lock_);
-
- if (result == -1)
- // Reset errno in case mutex_unlock() also fails...
- errno = error;
- }
- else
- result = -1;
- return result;
-#else
- ACE_UNUSED_ARG (event);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::event_timedwait (ACE_event_t *event,
- ACE_Time_Value *timeout)
-{
-#if defined (ACE_WIN32)
- DWORD result;
-
- if (timeout == 0)
- // Wait forever
- result = ::WaitForSingleObject (*event, INFINITE);
- else if (timeout->sec () == 0 && timeout->usec () == 0)
- // Do a "poll".
- result = ::WaitForSingleObject (*event, 0);
- else
- {
- // Wait for upto <relative_time> number of milliseconds. Note
- // that we must convert between absolute time (which is passed
- // as a parameter) and relative time (which is what
- // WaitForSingleObjects() expects).
- ACE_Time_Value relative_time (*timeout - ACE_OS::gettimeofday ());
-
- // Watchout for situations where a context switch has caused the
- // current time to be > the timeout. Thanks to Norbert Rapp
- // <NRapp@nexus-informatics.de> for pointing this.
- int msec_timeout;
- if (relative_time < ACE_Time_Value::zero)
- msec_timeout = 0;
- else
- msec_timeout = relative_time.msec ();
- result = ::WaitForSingleObject (*event, msec_timeout);
- }
-
- switch (result)
- {
- case WAIT_OBJECT_0:
- return 0;
- case WAIT_TIMEOUT:
- errno = ETIME;
- return -1;
- default:
- // This is a hack, we need to find an appropriate mapping...
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
-#elif defined (ACE_HAS_THREADS)
- int result = 0;
- int error = 0;
-
- // grab the lock first
- if (ACE_OS::mutex_lock (&event->lock_) == 0)
- {
- if (event->is_signaled_ == 1)
- // event is currently signaled
- {
- if (event->manual_reset_ == 0)
- // AUTO: reset state
- event->is_signaled_ = 0;
- }
- else
- // event is currently not signaled
- {
- event->waiting_threads_++;
-
- if (ACE_OS::cond_timedwait (&event->condition_,
- &event->lock_,
- timeout) != 0)
- {
- result = -1;
- error = errno;
- }
-
- event->waiting_threads_--;
- }
-
- // Now we can let go of the lock.
- ACE_OS::mutex_unlock (&event->lock_);
-
- if (result == -1)
- // Reset errno in case mutex_unlock() also fails...
- errno = error;
- }
- else
- result = -1;
- return result;
-#else
- ACE_UNUSED_ARG (event);
- ACE_UNUSED_ARG (timeout);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::event_signal (ACE_event_t *event)
-{
-#if defined (ACE_WIN32)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetEvent (*event), ace_result_), int, -1);
-#elif defined (ACE_HAS_THREADS)
- int result = 0;
- int error = 0;
-
- // grab the lock first
- if (ACE_OS::mutex_lock (&event->lock_) == 0)
- {
- // Manual-reset event.
- if (event->manual_reset_ == 1)
- {
- // signal event
- event->is_signaled_ = 1;
- // wakeup all
- if (ACE_OS::cond_broadcast (&event->condition_) != 0)
- {
- result = -1;
- error = errno;
- }
- }
- // Auto-reset event
- else
- {
- if (event->waiting_threads_ == 0)
- // No waiters: signal event.
- event->is_signaled_ = 1;
-
- // Waiters: wakeup one waiter.
- else if (ACE_OS::cond_signal (&event->condition_) != 0)
- {
- result = -1;
- error = errno;
- }
- }
-
- // Now we can let go of the lock.
- ACE_OS::mutex_unlock (&event->lock_);
-
- if (result == -1)
- // Reset errno in case mutex_unlock() also fails...
- errno = error;
- }
- else
- result = -1;
- return result;
-#else
- ACE_UNUSED_ARG (event);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::event_pulse (ACE_event_t *event)
-{
-#if defined (ACE_WIN32)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::PulseEvent (*event), ace_result_), int, -1);
-#elif defined (ACE_HAS_THREADS)
- int result = 0;
- int error = 0;
-
- // grab the lock first
- if (ACE_OS::mutex_lock (&event->lock_) == 0)
- {
- // Manual-reset event.
- if (event->manual_reset_ == 1)
- {
- // Wakeup all waiters.
- if (ACE_OS::cond_broadcast (&event->condition_) != 0)
- {
- result = -1;
- error = errno;
- }
- }
- // Auto-reset event: wakeup one waiter.
- else if (ACE_OS::cond_signal (&event->condition_) != 0)
- {
- result = -1;
- error = errno;
- }
-
- // Reset event.
- event->is_signaled_ = 0;
-
- // Now we can let go of the lock.
- ACE_OS::mutex_unlock (&event->lock_);
-
- if (result == -1)
- // Reset errno in case mutex_unlock() also fails...
- errno = error;
- }
- else
- result = -1;
- return result;
-#else
- ACE_UNUSED_ARG (event);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::event_reset (ACE_event_t *event)
-{
-#if defined (ACE_WIN32)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::ResetEvent (*event), ace_result_), int, -1);
-#elif defined (ACE_HAS_THREADS)
- int result = 0;
-
- // Grab the lock first.
- if (ACE_OS::mutex_lock (&event->lock_) == 0)
- {
- // Reset event.
- event->is_signaled_ = 0;
-
- // Now we can let go of the lock.
- ACE_OS::mutex_unlock (&event->lock_);
- }
- else
- result = -1;
- return result;
-#else
- ACE_UNUSED_ARG (event);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-#if defined (ACE_WIN32)
-# define ACE_SOCKCALL_RETURN(OP,TYPE,FAILVALUE) \
- do { TYPE ace_result_ = (TYPE) OP; \
- if (ace_result_ == FAILVALUE) { int ___ = ::WSAGetLastError (); errno = ___; return (TYPE) FAILVALUE; } else return ace_result_; \
- } while (0)
-#else
-# define ACE_SOCKCALL_RETURN(OP,TYPE,FAILVALUE) ACE_OSCALL_RETURN(OP,TYPE,FAILVALUE)
-#endif /* ACE_WIN32 */
-
-#if defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# define ACE_NETDBCALL_RETURN(OP,TYPE,FAILVALUE,TARGET,SIZE) \
- do \
- { \
- if (ACE_OS::netdb_acquire ()) \
- return FAILVALUE; \
- else \
- { \
- TYPE ace_result_; \
- ACE_OSCALL (OP, TYPE, FAILVALUE, ace_result_); \
- if (ace_result_ != FAILVALUE) \
- ::memcpy (TARGET, \
- ace_result_, \
- SIZE < sizeof (TYPE) ? SIZE : sizeof (TYPE)); \
- ACE_OS::netdb_release (); \
- return ace_result_; \
- } \
- } while(0)
-# else /* ! (ACE_MT_SAFE && ACE_MT_SAFE != 0) */
-# define ACE_NETDBCALL_RETURN(OP,TYPE,FAILVALUE,TARGET,SIZE) \
- do \
- { \
- TYPE ace_result_; \
- ACE_OSCALL(OP,TYPE,FAILVALUE,ace_result_); \
- if (ace_result_ != FAILVALUE) \
- ::memcpy (TARGET, \
- ace_result_, \
- SIZE < sizeof (TYPE) ? SIZE : sizeof (TYPE)); \
- return ace_result_; \
- } while(0)
-# endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */
-#endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
-
-ACE_INLINE
-ACE_Flow_Spec::ACE_Flow_Spec (u_long token_rate,
- u_long token_bucket_size,
- u_long peak_bandwidth,
- u_long latency,
- u_long delay_variation,
- ACE_SERVICE_TYPE service_type,
- u_long max_sdu_size,
- u_long minimum_policed_size,
- int ttl,
- int priority)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- this->TokenRate = token_rate;
- this->TokenBucketSize = token_bucket_size;
- this->PeakBandwidth = peak_bandwidth;
- this->Latency = latency;
- this->DelayVariation = delay_variation;
-#if defined(ACE_HAS_WINSOCK2_GQOS)
- this->ServiceType = service_type;
- this->MaxSduSize = max_sdu_size;
- this->MinimumPolicedSize = minimum_policed_size;
-#else
- ACE_UNUSED_ARG (service_type);
- ACE_UNUSED_ARG (max_sdu_size);
- ACE_UNUSED_ARG (minimum_policed_size);
-#endif /* ACE_HAS_WINSOCK2_GQOS */
- ACE_UNUSED_ARG (ttl);
- ACE_UNUSED_ARG (priority);
-#else
-
- this->token_rate_ = token_rate;
- this->token_bucket_size_ = token_bucket_size;
- this->peak_bandwidth_ = peak_bandwidth;
- this->latency_ = latency;
- this->delay_variation_ = delay_variation;
- this->service_type_ = service_type;
- this->max_sdu_size_ = max_sdu_size;
- this->minimum_policed_size_ = minimum_policed_size;
- this->ttl_ = ttl;
- this->priority_ = priority;
-
-#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
-}
-
-ACE_INLINE
-ACE_Flow_Spec::ACE_Flow_Spec (void)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- this->TokenRate = 0;
- this->TokenBucketSize = 0;
- this->PeakBandwidth = 0;
- this->Latency = 0;
- this->DelayVariation = 0;
-#if defined(ACE_HAS_WINSOCK2_GQOS)
- this->ServiceType = 0;
- this->MaxSduSize = 0;
- this->MinimumPolicedSize = 0;
-#endif /* ACE_HAS_WINSOCK2_GQOS */
-#else
-
- this->token_rate_ = 0;
- this->token_bucket_size_ = 0;
- this->peak_bandwidth_ = 0;
- this->latency_ = 0;
- this->delay_variation_ = 0;
- this->service_type_ = 0;
- this->max_sdu_size_ = 0;
- this->minimum_policed_size_ = 0;
- this->ttl_ = 0;
- this->priority_ = 0;
-
-#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
-}
-
-ACE_INLINE u_long
-ACE_Flow_Spec::token_rate (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- return this->TokenRate;
-#else
- return this->token_rate_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_Flow_Spec::token_rate (u_long tr)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- this->TokenRate = tr;
-#else
- this->token_rate_ = tr;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE u_long
-ACE_Flow_Spec::token_bucket_size (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- return this->TokenBucketSize;
-#else
- return this->token_bucket_size_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_Flow_Spec::token_bucket_size (u_long tbs)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- this->TokenBucketSize = tbs;
-#else
- this->token_bucket_size_ = tbs;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE u_long
-ACE_Flow_Spec::peak_bandwidth (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- return this->PeakBandwidth;
-#else
- return this->peak_bandwidth_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_Flow_Spec::peak_bandwidth (u_long pb)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- this->PeakBandwidth = pb;
-#else
- this->peak_bandwidth_ = pb;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE u_long
-ACE_Flow_Spec::latency (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- return this->Latency;
-#else
- return this->latency_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_Flow_Spec::latency (u_long l)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- this->Latency = l;
-#else
- this->latency_ = l;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE u_long
-ACE_Flow_Spec::delay_variation (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- return this->DelayVariation;
-#else
- return this->delay_variation_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-ACE_INLINE void
-ACE_Flow_Spec::delay_variation (u_long dv)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- this->DelayVariation = dv;
-#else
- this->delay_variation_ = dv;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE ACE_SERVICE_TYPE
-ACE_Flow_Spec::service_type (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
- return this->ServiceType;
-#else
- return this->service_type_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_Flow_Spec::service_type (ACE_SERVICE_TYPE st)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
- this->ServiceType = st;
-#else
- this->service_type_ = st;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE u_long
-ACE_Flow_Spec::max_sdu_size (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
- return this->MaxSduSize;
-#else
- return this->max_sdu_size_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_Flow_Spec::max_sdu_size (u_long mss)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
- this->MaxSduSize = mss;
-#else
- this->max_sdu_size_ = mss;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE u_long
-ACE_Flow_Spec::minimum_policed_size (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
- return this->MinimumPolicedSize;
-#else
- return this->minimum_policed_size_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_Flow_Spec::minimum_policed_size (u_long mps)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
- this->MinimumPolicedSize = mps;
-#else
- this->minimum_policed_size_ = mps;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE int
-ACE_Flow_Spec::ttl (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
- ACE_NOTSUP_RETURN (-1);
-#else
- return this->ttl_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_Flow_Spec::ttl (int t)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
- ACE_UNUSED_ARG (t);
- // TBD...
-#else
- this->ttl_ = t;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE int
-ACE_Flow_Spec::priority (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
- ACE_NOTSUP_RETURN (-1);
-#else
- return this->priority_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_Flow_Spec::priority (int p)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
- defined (ACE_HAS_WINSOCK2_GQOS)
- ACE_UNUSED_ARG (p);
- // TBD...
-#else
- this->priority_ = p;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE ACE_Flow_Spec
-ACE_QoS::sending_flowspec (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- return (ACE_Flow_Spec &) this->SendingFlowspec;
-#else
- return this->sending_flowspec_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_QoS::sending_flowspec (const ACE_Flow_Spec &fs)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- this->SendingFlowspec = (FLOWSPEC) fs;
-#else
- this->sending_flowspec_ = fs;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE ACE_Flow_Spec
-ACE_QoS::receiving_flowspec (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- return (ACE_Flow_Spec &) this->ReceivingFlowspec;
-#else
- return receiving_flowspec_;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_QoS::receiving_flowspec (const ACE_Flow_Spec &fs)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- this->ReceivingFlowspec = (FLOWSPEC) fs;
-#else
- this->receiving_flowspec_ = fs;
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE iovec
-ACE_QoS::provider_specific (void) const
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- return (iovec &) this->ProviderSpecific;
-#else
- ACE_NOTSUP_RETURN (iovec ());
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE void
-ACE_QoS::provider_specific (const iovec &ps)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- this->ProviderSpecific = (WSABUF) ((iovec &) ps);
-#else
- ACE_UNUSED_ARG (ps);
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE
-ACE_QoS_Params::ACE_QoS_Params (iovec *caller_data,
- iovec *callee_data,
- ACE_QoS *socket_qos,
- ACE_QoS *group_socket_qos,
- u_long flags)
- : caller_data_ (caller_data),
- callee_data_ (callee_data),
- socket_qos_ (socket_qos),
- group_socket_qos_ (group_socket_qos),
- flags_ (flags)
-{
-}
-
-ACE_INLINE iovec *
-ACE_QoS_Params::caller_data (void) const
-{
- return this->caller_data_;
-}
-
-ACE_INLINE void
-ACE_QoS_Params::caller_data (iovec *cd)
-{
- this->caller_data_ = cd;
-}
-
-ACE_INLINE iovec *
-ACE_QoS_Params::callee_data (void) const
-{
- return this->callee_data_;
-}
-
-ACE_INLINE void
-ACE_QoS_Params::callee_data (iovec *cd)
-{
- this->callee_data_ = cd;
-}
-
-ACE_INLINE ACE_QoS *
-ACE_QoS_Params::socket_qos (void) const
-{
- return this->socket_qos_;
-}
-
-ACE_INLINE void
-ACE_QoS_Params::socket_qos (ACE_QoS *sq)
-{
- this->socket_qos_ = sq;
-}
-
-ACE_INLINE ACE_QoS *
-ACE_QoS_Params::group_socket_qos (void) const
-{
- return this->group_socket_qos_;
-}
-
-ACE_INLINE void
-ACE_QoS_Params::group_socket_qos (ACE_QoS *gsq)
-{
- this->group_socket_qos_ = gsq;
-}
-
-ACE_INLINE u_long
-ACE_QoS_Params::flags (void) const
-{
- return this->flags_;
-}
-
-ACE_INLINE void
-ACE_QoS_Params::flags (u_long f)
-{
- this->flags_ = f;
-}
-
-ACE_INLINE
-ACE_Accept_QoS_Params::ACE_Accept_QoS_Params (ACE_QOS_CONDITION_FUNC qos_condition_callback,
- u_long callback_data)
- : qos_condition_callback_ (qos_condition_callback),
- callback_data_ (callback_data)
-{
-}
-
-ACE_INLINE ACE_QOS_CONDITION_FUNC
-ACE_Accept_QoS_Params::qos_condition_callback (void) const
-{
- return this->qos_condition_callback_;
-}
-
-ACE_INLINE void
-ACE_Accept_QoS_Params::qos_condition_callback (ACE_QOS_CONDITION_FUNC qcc)
-{
- this->qos_condition_callback_ = qcc;
-}
-
-ACE_INLINE u_long
-ACE_Accept_QoS_Params::callback_data (void) const
-{
- return this->callback_data_;
-}
-
-ACE_INLINE void
-ACE_Accept_QoS_Params::callback_data (u_long cd)
-{
- this->callback_data_ = cd;
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_OS::accept (ACE_HANDLE handle,
- struct sockaddr *addr,
- int *addrlen)
-{
- ACE_TRACE ("ACE_OS::accept");
-#if defined (ACE_PSOS)
-# if !defined (ACE_PSOS_DIAB_PPC)
- ACE_SOCKCALL_RETURN (::accept ((ACE_SOCKET) handle,
- (struct sockaddr_in *) addr,
- (ACE_SOCKET_LEN *) addrlen),
- ACE_HANDLE,
- ACE_INVALID_HANDLE);
-# else
-ACE_SOCKCALL_RETURN (::accept ((ACE_SOCKET) handle,
- (struct sockaddr *) addr,
- (ACE_SOCKET_LEN *) addrlen),
- ACE_HANDLE,
- ACE_INVALID_HANDLE);
-# endif /* defined ACE_PSOS_DIAB_PPC */
-#else
- // On a non-blocking socket with no connections to accept, this
- // system call will return EWOULDBLOCK or EAGAIN, depending on the
- // platform. UNIX 98 allows either errno, and they may be the same
- // numeric value. So to make life easier for upper ACE layers as
- // well as application programmers, always change EAGAIN to
- // EWOULDBLOCK. Rather than hack the ACE_OSCALL_RETURN macro, it's
- // handled explicitly here. If the ACE_OSCALL macro ever changes,
- // this function needs to be reviewed. On Win32, the regular macros
- // can be used, as this is not an issue.
-
-# if defined (ACE_WIN32)
- ACE_SOCKCALL_RETURN (::accept ((ACE_SOCKET) handle,
- addr,
- (ACE_SOCKET_LEN *) addrlen),
- ACE_HANDLE,
- ACE_INVALID_HANDLE);
-# else
-# if defined (ACE_HAS_BROKEN_ACCEPT_ADDR)
- // Apparently some platforms like VxWorks can't correctly deal with
- // a NULL addr.
-
- sockaddr_in fake_addr;
- int fake_addrlen;
-
- if (addrlen == 0)
- addrlen = &fake_addrlen;
-
- if (addr == 0)
- {
- addr = (sockaddr *) &fake_addr;
- *addrlen = sizeof fake_addr;
- }
-# endif /* VXWORKS */
- ACE_HANDLE ace_result = ::accept ((ACE_SOCKET) handle,
- addr,
- (ACE_SOCKET_LEN *) addrlen) ;
- if (ace_result == ACE_INVALID_HANDLE && errno == EAGAIN)
- errno = EWOULDBLOCK;
- return ace_result;
-
-# endif /* defined (ACE_WIN32) */
-#endif /* defined (ACE_PSOS) */
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_OS::accept (ACE_HANDLE handle,
- struct sockaddr *addr,
- int *addrlen,
- const ACE_Accept_QoS_Params &qos_params)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- ACE_SOCKCALL_RETURN (::WSAAccept ((ACE_SOCKET) handle,
- addr,
- (ACE_SOCKET_LEN *) addrlen,
- (LPCONDITIONPROC) qos_params.qos_condition_callback (),
- qos_params.callback_data ()),
- ACE_HANDLE,
- ACE_INVALID_HANDLE);
-#else
- ACE_UNUSED_ARG (qos_params);
- return ACE_OS::accept (handle,
- addr,
- addrlen);
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE int
-ACE_OS::enum_protocols (int *protocols,
- ACE_Protocol_Info *protocol_buffer,
- u_long *buffer_length)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-
- ACE_SOCKCALL_RETURN (::WSAEnumProtocols (protocols,
- protocol_buffer,
- buffer_length),
- int,
- SOCKET_ERROR);
-
-#else
- ACE_UNUSED_ARG (protocols);
- ACE_UNUSED_ARG (protocol_buffer);
- ACE_UNUSED_ARG (buffer_length);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_OS::join_leaf (ACE_HANDLE socket,
- const sockaddr *name,
- int namelen,
- const ACE_QoS_Params &qos_params)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-
- QOS qos;
- // Construct the WinSock2 QOS structure.
-
- qos.SendingFlowspec = qos_params.socket_qos ()->sending_flowspec ();
- qos.ReceivingFlowspec = qos_params.socket_qos ()->receiving_flowspec ();
- qos.ProviderSpecific = (WSABUF) qos_params.socket_qos ()->provider_specific ();
-
- ACE_SOCKCALL_RETURN (::WSAJoinLeaf ((ACE_SOCKET) socket,
- name,
- namelen,
- (WSABUF *) qos_params.caller_data (),
- (WSABUF *) qos_params.callee_data (),
- &qos,
- (QOS *) qos_params.group_socket_qos (),
- qos_params.flags ()),
- ACE_HANDLE,
- ACE_INVALID_HANDLE);
-
-#else
- ACE_UNUSED_ARG (socket);
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (namelen);
- ACE_UNUSED_ARG (qos_params);
- ACE_NOTSUP_RETURN (ACE_INVALID_HANDLE);
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE int
-ACE_OS::ioctl (ACE_HANDLE socket,
- u_long io_control_code,
- void *in_buffer_p,
- u_long in_buffer,
- void *out_buffer_p,
- u_long out_buffer,
- u_long *bytes_returned,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- ACE_SOCKCALL_RETURN (::WSAIoctl ((ACE_SOCKET) socket,
- io_control_code,
- in_buffer_p,
- in_buffer,
- out_buffer_p,
- out_buffer,
- bytes_returned,
- (WSAOVERLAPPED *) overlapped,
- func),
- int,
- SOCKET_ERROR);
-#else
- ACE_UNUSED_ARG (socket);
- ACE_UNUSED_ARG (io_control_code);
- ACE_UNUSED_ARG (in_buffer_p);
- ACE_UNUSED_ARG (in_buffer);
- ACE_UNUSED_ARG (out_buffer_p);
- ACE_UNUSED_ARG (out_buffer);
- ACE_UNUSED_ARG (bytes_returned);
- ACE_UNUSED_ARG (overlapped);
- ACE_UNUSED_ARG (func);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-
-
-ACE_INLINE int
-ACE_OS::ioctl (ACE_HANDLE socket,
- u_long io_control_code,
- ACE_QoS &ace_qos,
- u_long *bytes_returned,
- void *buffer_p,
- u_long buffer,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func)
-{
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-
- QOS qos;
- u_long qos_len = sizeof (QOS);
-
- if (io_control_code == SIO_SET_QOS)
- {
- qos.SendingFlowspec = ace_qos.sending_flowspec ();
- qos.ReceivingFlowspec = ace_qos.receiving_flowspec ();
- qos.ProviderSpecific = (WSABUF) ace_qos.provider_specific ();
-
- qos_len += ace_qos.provider_specific ().iov_len;
-
- ACE_SOCKCALL_RETURN (::WSAIoctl ((ACE_SOCKET) socket,
- io_control_code,
- &qos,
- qos_len,
- buffer_p,
- buffer,
- bytes_returned,
- (WSAOVERLAPPED *) overlapped,
- func),
- int,
- SOCKET_ERROR);
- }
- else
- {
- u_long dwBufferLen = 0;
-
- // Query for the buffer size.
- int result = ::WSAIoctl ((ACE_SOCKET) socket,
- io_control_code,
- NULL,
- 0,
- &dwBufferLen,
- sizeof (dwBufferLen),
- bytes_returned,
- NULL,
- NULL);
-
-
- if (result == SOCKET_ERROR)
- {
- u_long dwErr = ::WSAGetLastError ();
-
- if (dwErr == WSAEWOULDBLOCK)
- {
- errno = dwErr;
- return -1;
- }
- else
- if (dwErr != WSAENOBUFS)
- {
- errno = dwErr;
- return -1;
- }
- }
-
- char *qos_buf;
- ACE_NEW_RETURN (qos_buf,
- char [dwBufferLen],
- -1);
-
- QOS *qos = ACE_reinterpret_cast (QOS*,
- qos_buf);
-
- result = ::WSAIoctl ((ACE_SOCKET) socket,
- io_control_code,
- NULL,
- 0,
- qos,
- dwBufferLen,
- bytes_returned,
- NULL,
- NULL);
-
- if (result == SOCKET_ERROR)
- return result;
-
- ACE_Flow_Spec sending_flowspec (qos->SendingFlowspec.TokenRate,
- qos->SendingFlowspec.TokenBucketSize,
- qos->SendingFlowspec.PeakBandwidth,
- qos->SendingFlowspec.Latency,
- qos->SendingFlowspec.DelayVariation,
-#if defined(ACE_HAS_WINSOCK2_GQOS)
- qos->SendingFlowspec.ServiceType,
- qos->SendingFlowspec.MaxSduSize,
- qos->SendingFlowspec.MinimumPolicedSize,
-#else /* ACE_HAS_WINSOCK2_GQOS */
- 0,
- 0,
- 0,
-#endif /* ACE_HAS_WINSOCK2_GQOS */
- 0,
- 0);
-
- ACE_Flow_Spec receiving_flowspec (qos->ReceivingFlowspec.TokenRate,
- qos->ReceivingFlowspec.TokenBucketSize,
- qos->ReceivingFlowspec.PeakBandwidth,
- qos->ReceivingFlowspec.Latency,
- qos->ReceivingFlowspec.DelayVariation,
-#if defined(ACE_HAS_WINSOCK2_GQOS)
- qos->ReceivingFlowspec.ServiceType,
- qos->ReceivingFlowspec.MaxSduSize,
- qos->ReceivingFlowspec.MinimumPolicedSize,
-#else /* ACE_HAS_WINSOCK2_GQOS */
- 0,
- 0,
- 0,
-#endif /* ACE_HAS_WINSOCK2_GQOS */
- 0,
- 0);
-
- ace_qos.sending_flowspec (sending_flowspec);
- ace_qos.receiving_flowspec (receiving_flowspec);
- ace_qos.provider_specific (*((struct iovec *) (&qos->ProviderSpecific)));
-
-
- return result;
- }
-
-#else
- ACE_UNUSED_ARG (socket);
- ACE_UNUSED_ARG (io_control_code);
- ACE_UNUSED_ARG (ace_qos);
- ACE_UNUSED_ARG (bytes_returned);
- ACE_UNUSED_ARG (buffer_p);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (overlapped);
- ACE_UNUSED_ARG (func);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE int
-ACE_OS::bind (ACE_HANDLE handle, struct sockaddr *addr, int addrlen)
-{
- ACE_TRACE ("ACE_OS::bind");
-#if defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC)
- ACE_SOCKCALL_RETURN (::bind ((ACE_SOCKET) handle,
- (struct sockaddr_in *) addr,
- (ACE_SOCKET_LEN) addrlen),
- int, -1);
-#else /* !defined (ACE_PSOS) || defined (ACE_PSOS_DIAB_PPC) */
- ACE_SOCKCALL_RETURN (::bind ((ACE_SOCKET) handle,
- addr,
- (ACE_SOCKET_LEN) addrlen), int, -1);
-#endif /* defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC) */
-}
-
-ACE_INLINE int
-ACE_OS::connect (ACE_HANDLE handle,
- struct sockaddr *addr,
- int addrlen)
-{
- ACE_TRACE ("ACE_OS::connect");
-#if defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC)
- ACE_SOCKCALL_RETURN (::connect ((ACE_SOCKET) handle,
- (struct sockaddr_in *) addr,
- (ACE_SOCKET_LEN) addrlen),
- int, -1);
-#else /* !defined (ACE_PSOS) || defined (ACE_PSOS_DIAB_PPC) */
- ACE_SOCKCALL_RETURN (::connect ((ACE_SOCKET) handle,
- addr,
- (ACE_SOCKET_LEN) addrlen), int, -1);
-#endif /* defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC) */
-}
-
-ACE_INLINE int
-ACE_OS::connect (ACE_HANDLE handle,
- const sockaddr *addr,
- int addrlen,
- const ACE_QoS_Params &qos_params)
-{
- ACE_TRACE ("ACE_OS::connect");
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- ACE_SOCKCALL_RETURN (::WSAConnect ((ACE_SOCKET) handle,
- (const sockaddr *) addr,
- (ACE_SOCKET_LEN) addrlen,
- (WSABUF *) qos_params.caller_data (),
- (WSABUF *) qos_params.callee_data (),
- (QOS *) qos_params.socket_qos (),
- (QOS *) qos_params.group_socket_qos ()),
- int, -1);
-#else
- ACE_UNUSED_ARG (qos_params);
- return ACE_OS::connect (handle,
- (sockaddr *) addr,
- addrlen);
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-#if !defined (VXWORKS)
-ACE_INLINE struct hostent *
-ACE_OS::gethostbyname (const ACE_TCHAR *name)
-{
- ACE_TRACE ("ACE_OS::gethostbyname");
-# if defined (ACE_PSOS)
- ACE_UNUSED_ARG (name);
- ACE_NOTSUP_RETURN (0);
-# elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_SOCKCALL_RETURN (::gethostbyname (ACE_const_cast (char *, name)),
- struct hostent *,
- 0);
-# else
- ACE_SOCKCALL_RETURN (::gethostbyname (ACE_TEXT_ALWAYS_CHAR (name)),
- struct hostent *,
- 0);
-# endif /* ACE_HAS_NONCONST_GETBY */
-}
-
-ACE_INLINE struct hostent *
-ACE_OS::gethostbyname2 (const ACE_TCHAR *name, int family)
-{
- ACE_TRACE ("ACE_OS::gethostbyname2");
-# if defined (ACE_PSOS)
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (family);
- ACE_NOTSUP_RETURN (0);
-# elif defined (ACE_HAS_IP6)
-# if defined (ACE_HAS_NONCONST_GETBY)
- ACE_SOCKCALL_RETURN (::gethostbyname2 (ACE_const_cast (char *, name),
- family),
- struct hostent *,
- 0);
-# else
- ACE_SOCKCALL_RETURN (::gethostbyname2 (ACE_TEXT_ALWAYS_CHAR (name), family),
- struct hostent *,
- 0);
-# endif /* ACE_HAS_NONCONST_GETBY */
-# else
- // IPv4-only implementation
- if (family == AF_INET)
- return ACE_OS::gethostbyname (name);
-
- ACE_NOTSUP_RETURN (0);
-# endif /* ACE_PSOS */
-}
-
-ACE_INLINE struct hostent *
-ACE_OS::gethostbyaddr (const ACE_TCHAR *addr, int length, int type)
-{
- ACE_TRACE ("ACE_OS::gethostbyaddr");
-# if defined (ACE_PSOS)
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (length);
- ACE_UNUSED_ARG (type);
- ACE_NOTSUP_RETURN (0);
-# elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_SOCKCALL_RETURN (::gethostbyaddr (ACE_const_cast (char *, addr),
- (ACE_SOCKET_LEN) length,
- type),
- struct hostent *,
- 0);
-# else
- ACE_SOCKCALL_RETURN (::gethostbyaddr (ACE_TEXT_ALWAYS_CHAR (addr),
- (ACE_SOCKET_LEN) length,
- type),
- struct hostent *,
- 0);
-# endif /* ACE_HAS_NONCONST_GETBY */
-}
-#endif /* ! VXWORKS */
-
-// It would be really cool to add another version of select that would
-// function like the one we're defending against below!
-ACE_INLINE int
-ACE_OS::select (int width,
- fd_set *rfds, fd_set *wfds, fd_set *efds,
- const ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_OS::select");
-#if defined (ACE_HAS_NONCONST_SELECT_TIMEVAL)
- // We must defend against non-conformity!
- timeval copy;
- timeval *timep;
-
- if (timeout != 0)
- {
- copy = *timeout;
- timep = &copy;
- }
- else
- timep = 0;
-#else
- const timeval *timep = (timeout == 0 ? (const timeval *)0 : *timeout);
-#endif /* ACE_HAS_NONCONST_SELECT_TIMEVAL */
- ACE_SOCKCALL_RETURN (::select (width,
- (ACE_FD_SET_TYPE *) rfds,
- (ACE_FD_SET_TYPE *) wfds,
- (ACE_FD_SET_TYPE *) efds,
- timep),
- int, -1);
-}
-
-ACE_INLINE int
-ACE_OS::select (int width,
- fd_set *rfds, fd_set *wfds, fd_set *efds,
- const ACE_Time_Value &timeout)
-{
- ACE_TRACE ("ACE_OS::select");
-#if defined (ACE_HAS_NONCONST_SELECT_TIMEVAL)
-# define ___ACE_TIMEOUT &copy
- timeval copy = timeout;
-#else
-# define ___ACE_TIMEOUT timep
- const timeval *timep = timeout;
-#endif /* ACE_HAS_NONCONST_SELECT_TIMEVAL */
- ACE_SOCKCALL_RETURN (::select (width,
- (ACE_FD_SET_TYPE *) rfds,
- (ACE_FD_SET_TYPE *) wfds,
- (ACE_FD_SET_TYPE *) efds,
- ___ACE_TIMEOUT),
- int, -1);
-#undef ___ACE_TIMEOUT
-}
-
-ACE_INLINE int
-ACE_OS::recv (ACE_HANDLE handle, char *buf, int len, int flags)
-{
- ACE_TRACE ("ACE_OS::recv");
-
- // On UNIX, a non-blocking socket with no data to receive, this
- // system call will return EWOULDBLOCK or EAGAIN, depending on the
- // platform. UNIX 98 allows either errno, and they may be the same
- // numeric value. So to make life easier for upper ACE layers as
- // well as application programmers, always change EAGAIN to
- // EWOULDBLOCK. Rather than hack the ACE_OSCALL_RETURN macro, it's
- // handled explicitly here. If the ACE_OSCALL macro ever changes,
- // this function needs to be reviewed. On Win32, the regular macros
- // can be used, as this is not an issue.
-#if defined (ACE_WIN32)
- ACE_SOCKCALL_RETURN (::recv ((ACE_SOCKET) handle, buf, len, flags), int, -1);
-#else
-
- int ace_result_;
- ace_result_ = ::recv ((ACE_SOCKET) handle, buf, len, flags);
- if (ace_result_ == -1 && errno == EAGAIN)
- errno = EWOULDBLOCK;
- return ace_result_;
-
-#endif /* defined (ACE_WIN32) */
-}
-
-ACE_INLINE int
-ACE_OS::recvfrom (ACE_HANDLE handle,
- char *buf,
- int len,
- int flags,
- struct sockaddr *addr,
- int *addrlen)
-{
- ACE_TRACE ("ACE_OS::recvfrom");
-#if defined (ACE_PSOS)
-# if !defined ACE_PSOS_DIAB_PPC
- ACE_SOCKCALL_RETURN (::recvfrom ((ACE_SOCKET) handle, buf, (ACE_SOCKET_LEN) len, flags,
- (struct sockaddr_in *) addr, (ACE_SOCKET_LEN *) addrlen),
- int, -1);
-# else
- ACE_SOCKCALL_RETURN (::recvfrom ((ACE_SOCKET) handle, buf, (ACE_SOCKET_LEN) len, flags,
- (struct sockaddr *) addr, (ACE_SOCKET_LEN *) addrlen),
- int, -1);
-# endif /* defined ACE_PSOS_DIAB_PPC */
-#elif defined (ACE_WIN32)
- int result = ::recvfrom ((ACE_SOCKET) handle,
- buf,
- (ACE_SOCKET_LEN) len,
- flags,
- addr,
- (ACE_SOCKET_LEN *) addrlen);
- if (result == SOCKET_ERROR)
- {
- ACE_OS::set_errno_to_wsa_last_error ();
- if (errno == WSAEMSGSIZE &&
- ACE_BIT_ENABLED (flags, MSG_PEEK))
- return len;
- else
- return -1;
- }
- else
- return result;
-#else /* non Win32 and non PSOS */
- ACE_SOCKCALL_RETURN (::recvfrom ((ACE_SOCKET) handle, buf, (ACE_SOCKET_LEN) len, flags,
- addr, (ACE_SOCKET_LEN *) addrlen),
- int, -1);
-#endif /* defined (ACE_PSOS) */
-}
-
-ACE_INLINE int
-ACE_OS::send (ACE_HANDLE handle, const char *buf, int len, int flags)
-{
- ACE_TRACE ("ACE_OS::send");
-#if defined (VXWORKS) || defined (HPUX) || defined (ACE_PSOS)
- ACE_SOCKCALL_RETURN (::send ((ACE_SOCKET) handle, (char *) buf, len, flags), int, -1);
-#else
- ACE_SOCKCALL_RETURN (::send ((ACE_SOCKET) handle, buf, len, flags), int, -1);
-#endif /* VXWORKS */
-}
-
-ACE_INLINE int
-ACE_OS::recvfrom (ACE_HANDLE handle,
- iovec *buffers,
- int buffer_count,
- size_t &number_of_bytes_recvd,
- int &flags,
- struct sockaddr *addr,
- int *addrlen,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func)
-{
- ACE_TRACE ("ACE_OS::recvfrom");
-
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- DWORD bytes_recvd;
- DWORD the_flags = flags;
- int result = ::WSARecvFrom ((SOCKET) handle,
- (WSABUF*)buffers,
- buffer_count,
- &bytes_recvd,
- &the_flags,
- addr,
- addrlen,
- overlapped,
- func);
- flags = the_flags;
- number_of_bytes_recvd = ACE_static_cast (size_t, bytes_recvd);
- return result;
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (buffers);
- ACE_UNUSED_ARG (buffer_count);
- ACE_UNUSED_ARG (number_of_bytes_recvd);
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (addrlen);
- ACE_UNUSED_ARG (overlapped);
- ACE_UNUSED_ARG (func);
- ACE_NOTSUP_RETURN (-1);
-#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
-}
-
-ACE_INLINE int
-ACE_OS::sendto (ACE_HANDLE handle,
- const char *buf,
- int len,
- int flags,
- const struct sockaddr *addr,
- int addrlen)
-{
- ACE_TRACE ("ACE_OS::sendto");
-#if defined (VXWORKS)
- ACE_SOCKCALL_RETURN (::sendto ((ACE_SOCKET) handle, (char *) buf, len, flags,
- ACE_const_cast (struct sockaddr *, addr), addrlen),
- int, -1);
-#elif defined (ACE_PSOS)
-# if !defined (ACE_PSOS_DIAB_PPC)
- ACE_SOCKCALL_RETURN (::sendto ((ACE_SOCKET) handle, (char *) buf, len, flags,
- (struct sockaddr_in *) addr, addrlen),
- int, -1);
-# else
- ACE_SOCKCALL_RETURN (::sendto ((ACE_SOCKET) handle, (char *) buf, len, flags,
- (struct sockaddr *) addr, addrlen),
- int, -1);
-# endif /*defined ACE_PSOS_DIAB_PPC */
-#else
- ACE_SOCKCALL_RETURN (::sendto ((ACE_SOCKET) handle, buf, len, flags,
- ACE_const_cast (struct sockaddr *, addr), addrlen),
- int, -1);
-#endif /* VXWORKS */
-}
-
-ACE_INLINE int
-ACE_OS::sendto (ACE_HANDLE handle,
- const iovec *buffers,
- int buffer_count,
- size_t &number_of_bytes_sent,
- int flags,
- const struct sockaddr *addr,
- int addrlen,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func)
-{
- ACE_TRACE ("ACE_OS::sendto");
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- DWORD bytes_sent;
- int result = ::WSASendTo ((SOCKET) handle,
- (WSABUF*)buffers,
- buffer_count,
- &bytes_sent,
- flags,
- addr,
- addrlen,
- overlapped,
- func);
- number_of_bytes_sent = ACE_static_cast (size_t, bytes_sent);
- return result;
-#else
- ACE_UNUSED_ARG (overlapped);
- ACE_UNUSED_ARG (func);
-
- number_of_bytes_sent = 0;
-
- int result = 0;
-
- for (int i = 0; i < buffer_count; i++)
- {
- result = ACE_OS::sendto (handle,
- ACE_reinterpret_cast (char *ACE_CAST_CONST,
- buffers[i].iov_base),
- buffers[i].iov_len,
- flags,
- addr,
- addrlen);
- if (result == -1)
- break;
- number_of_bytes_sent += result;
- }
-
- return result;
-#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
-}
-
-ACE_INLINE int
-ACE_OS::getpeername (ACE_HANDLE handle, struct sockaddr *addr,
- int *addrlen)
-{
- ACE_TRACE ("ACE_OS::getpeername");
-#if defined (ACE_PSOS) && !defined ACE_PSOS_DIAB_PPC
- ACE_SOCKCALL_RETURN (::getpeername ((ACE_SOCKET) handle,
- (struct sockaddr_in *) addr,
- (ACE_SOCKET_LEN *) addrlen),
- int, -1);
-#else
- ACE_SOCKCALL_RETURN (::getpeername ((ACE_SOCKET) handle,
- addr,
- (ACE_SOCKET_LEN *) addrlen),
- int, -1);
-#endif /* defined (ACE_PSOS) */
-}
-
-ACE_INLINE struct protoent *
-ACE_OS::getprotobyname (const ACE_TCHAR *name)
-{
-#if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (name);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_SOCKCALL_RETURN (::getprotobyname (ACE_const_cast (char *, name)),
- struct protoent *,
- 0);
-#else
- ACE_SOCKCALL_RETURN (::getprotobyname (ACE_TEXT_ALWAYS_CHAR (name)),
- struct protoent *,
- 0);
-#endif /* VXWORKS */
-}
-
-ACE_INLINE struct protoent *
-ACE_OS::getprotobyname_r (const ACE_TCHAR *name,
- struct protoent *result,
- ACE_PROTOENT_DATA buffer)
-{
-#if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (buffer);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE)
-# if defined (AIX) || defined (DIGITAL_UNIX) || defined (HPUX_10)
- if (::getprotobyname_r (name, result, (struct protoent_data *) buffer) == 0)
- return result;
- else
- return 0;
-# else
-# if defined(ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
- ACE_UNUSED_ARG (result);
- ACE_NETDBCALL_RETURN (::getprotobyname (name),
- struct protoent *, 0,
- buffer, sizeof (ACE_PROTOENT_DATA));
-# else
- ACE_SOCKCALL_RETURN (::getprotobyname_r (name,
- result,
- buffer,
- sizeof (ACE_PROTOENT_DATA)),
- struct protoent *, 0);
-# endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
-# endif /* defined (AIX) || defined (DIGITAL_UNIX) */
-#elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (buffer);
- ACE_SOCKCALL_RETURN (::getprotobyname (ACE_const_cast (char *, name)),
- struct protoent *, 0);
-#else
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (result);
-
- ACE_SOCKCALL_RETURN (::getprotobyname (ACE_TEXT_ALWAYS_CHAR (name)),
- struct protoent *,
- 0);
-#endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) !defined (UNIXWARE) */
-}
-
-ACE_INLINE struct protoent *
-ACE_OS::getprotobynumber (int proto)
-{
-#if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (proto);
- ACE_NOTSUP_RETURN (0);
-#else
- ACE_SOCKCALL_RETURN (::getprotobynumber (proto),
- struct protoent *, 0);
-#endif /* VXWORKS */
-}
-
-ACE_INLINE struct protoent *
-ACE_OS::getprotobynumber_r (int proto,
- struct protoent *result,
- ACE_PROTOENT_DATA buffer)
-{
-#if defined (VXWORKS) || defined (ACE_HAS_WINCE) || (defined (ghs) && defined (__Chorus)) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (proto);
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (buffer);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE)
-# if defined (AIX) || defined (DIGITAL_UNIX) || defined (HPUX_10)
- if (::getprotobynumber_r (proto, result, (struct protoent_data *) buffer) == 0)
- return result;
- else
- return 0;
-# else
-# if defined(ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
- ACE_UNUSED_ARG (result);
- ACE_NETDBCALL_RETURN (::getprotobynumber (proto),
- struct protoent *, 0,
- buffer, sizeof (ACE_PROTOENT_DATA));
-# else
- ACE_SOCKCALL_RETURN (::getprotobynumber_r (proto, result, buffer, sizeof (ACE_PROTOENT_DATA)),
- struct protoent *, 0);
-# endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
-# endif /* defined (AIX) || defined (DIGITAL_UNIX) */
-#else
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (result);
-
- ACE_SOCKCALL_RETURN (::getprotobynumber (proto),
- struct protoent *, 0);
-#endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE) */
-}
-
-ACE_INLINE struct servent *
-ACE_OS::getservbyname (const ACE_TCHAR *svc, const ACE_TCHAR *proto)
-{
- ACE_TRACE ("ACE_OS::getservbyname");
-#if defined (ACE_LACKS_GETSERVBYNAME)
- ACE_UNUSED_ARG (svc);
- ACE_UNUSED_ARG (proto);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_SOCKCALL_RETURN (::getservbyname (ACE_const_cast (char *, svc),
- ACE_const_cast (char *, proto)),
- struct servent *,
- 0);
-#else
- ACE_SOCKCALL_RETURN (::getservbyname (ACE_TEXT_ALWAYS_CHAR (svc),
- ACE_TEXT_ALWAYS_CHAR (proto)),
- struct servent *,
- 0);
-#endif /* ACE_HAS_NONCONST_GETBY */
-}
-
-ACE_INLINE int
-ACE_OS::getsockname (ACE_HANDLE handle,
- struct sockaddr *addr,
- int *addrlen)
-{
- ACE_TRACE ("ACE_OS::getsockname");
-#if defined (ACE_PSOS) && !defined (ACE_PSOS_DIAB_PPC)
- ACE_SOCKCALL_RETURN (::getsockname ((ACE_SOCKET) handle,
- (struct sockaddr_in *) addr,
- (ACE_SOCKET_LEN *) addrlen),
- int, -1);
-#else
- ACE_SOCKCALL_RETURN (::getsockname ((ACE_SOCKET) handle,
- addr,
- (ACE_SOCKET_LEN *) addrlen),
- int, -1);
-#endif /* defined (ACE_PSOS) */
-}
-
-ACE_INLINE int
-ACE_OS::getsockopt (ACE_HANDLE handle,
- int level,
- int optname,
- char *optval,
- int *optlen)
-{
- ACE_TRACE ("ACE_OS::getsockopt");
- ACE_SOCKCALL_RETURN (::getsockopt ((ACE_SOCKET) handle,
- level,
- optname,
- optval,
- (ACE_SOCKET_LEN *) optlen),
- int,
- -1);
-}
-
-ACE_INLINE int
-ACE_OS::listen (ACE_HANDLE handle, int backlog)
-{
- ACE_TRACE ("ACE_OS::listen");
- ACE_SOCKCALL_RETURN (::listen ((ACE_SOCKET) handle, backlog), int, -1);
-}
-
-ACE_INLINE int
-ACE_OS::setsockopt (ACE_HANDLE handle,
- int level,
- int optname,
- const char *optval,
- int optlen)
-{
- ACE_TRACE ("ACE_OS::setsockopt");
- ACE_SOCKCALL_RETURN (::setsockopt ((ACE_SOCKET) handle,
- level,
- optname,
- (ACE_SOCKOPT_TYPE1) optval,
- optlen),
- int,
- -1);
-}
-
-ACE_INLINE int
-ACE_OS::shutdown (ACE_HANDLE handle, int how)
-{
- ACE_TRACE ("ACE_OS::shutdown");
- ACE_SOCKCALL_RETURN (::shutdown ((ACE_SOCKET) handle, how), int, -1);
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_OS::socket (int domain,
- int type,
- int proto)
-{
- ACE_TRACE ("ACE_OS::socket");
- ACE_SOCKCALL_RETURN (::socket (domain,
- type,
- proto),
- ACE_HANDLE,
- ACE_INVALID_HANDLE);
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_OS::socket (int domain,
- int type,
- int proto,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags)
-{
- ACE_TRACE ("ACE_OS::socket");
-
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- ACE_SOCKCALL_RETURN (::WSASocket (domain,
- type,
- proto,
- protocolinfo,
- g,
- flags),
- ACE_HANDLE,
- ACE_INVALID_HANDLE);
-#else
- ACE_UNUSED_ARG (protocolinfo);
- ACE_UNUSED_ARG (g);
- ACE_UNUSED_ARG (flags);
-
- return ACE_OS::socket (domain,
- type,
- proto);
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE int
-ACE_OS::atoi (const ACE_TCHAR *s)
-{
- ACE_TRACE ("ACE_OS::atoi");
-#if defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wtoi (s), int, -1);
-#else /* ACE_WIN32 */
- ACE_OSCALL_RETURN (::atoi (s), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::recvmsg (ACE_HANDLE handle, struct msghdr *msg, int flags)
-{
- ACE_TRACE ("ACE_OS::recvmsg");
-#if !defined (ACE_LACKS_RECVMSG)
-# if (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
- DWORD bytes_received = 0;
-
- int result = ::WSARecvFrom ((SOCKET) handle,
- (WSABUF *) msg->msg_iov,
- msg->msg_iovlen,
- &bytes_received,
- (DWORD *) &flags,
- msg->msg_name,
- &msg->msg_namelen,
- 0,
- 0);
-
- if (result != 0)
- {
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- else
- return (ssize_t) bytes_received;
-# else /* ACE_HAS_WINSOCK2 */
- ACE_SOCKCALL_RETURN (::recvmsg (handle, msg, flags), int, -1);
-# endif /* ACE_HAS_WINSOCK2 */
-#else
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (msg);
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_LACKS_RECVMSG */
-}
-
-ACE_INLINE int
-ACE_OS::sendmsg (ACE_HANDLE handle,
- const struct msghdr *msg,
- int flags)
-{
- ACE_TRACE ("ACE_OS::sendmsg");
-#if !defined (ACE_LACKS_SENDMSG)
-# if (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
- DWORD bytes_sent = 0;
- int result = ::WSASendTo ((SOCKET) handle,
- (WSABUF *) msg->msg_iov,
- msg->msg_iovlen,
- &bytes_sent,
- flags,
- msg->msg_name,
- msg->msg_namelen,
- 0,
- 0);
-
- if (result != 0)
- {
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- else
- return (ssize_t) bytes_sent;
-# elif defined (ACE_LACKS_POSIX_PROTOTYPES) || defined (ACE_PSOS)
- ACE_SOCKCALL_RETURN (::sendmsg (handle, (struct msghdr *) msg, flags), int, -1);
-# else
- ACE_SOCKCALL_RETURN (::sendmsg (handle, (ACE_SENDMSG_TYPE *) msg, flags), int, -1);
-# endif /* ACE_LACKS_POSIX_PROTOTYPES */
-#else
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (msg);
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_LACKS_SENDMSG */
-}
-
-ACE_INLINE int
-ACE_OS::fclose (FILE *fp)
-{
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::fclose");
- ACE_OSCALL_RETURN (::fclose (fp), int, -1);
-#else
- // On CE, FILE * == void * == HANDLE
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL(::CloseHandle (fp), ace_result_),
- int, -1);
-#endif /* !ACE_HAS_WINCE */
-}
-
-ACE_INLINE ACE_TCHAR *
-ACE_OS::fgets (ACE_TCHAR *buf, int size, FILE *fp)
-{
- ACE_TRACE ("ACE_OS::fgets");
-#if defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (size);
- ACE_UNUSED_ARG (fp);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::fgetws (buf, size, fp), wchar_t *, 0);
-#else /* ACE_WIN32 */
- ACE_OSCALL_RETURN (::fgets (buf, size, fp), char *, 0);
-#endif /* ACE_WIN32 */
-}
-
-#if !defined (ACE_WIN32)
-// Win32 implementation of fopen(const ACE_TCHAR*, const ACE_TCHAR*)
-// is in OS.cpp.
-ACE_INLINE FILE *
-ACE_OS::fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode)
-{
- ACE_TRACE ("ACE_OS::fopen");
- ACE_OSCALL_RETURN (::fopen (filename, mode), FILE *, 0);
-}
-#endif /* ACE_WIN32 */
-
-ACE_INLINE int
-ACE_OS::fflush (FILE *fp)
-{
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::fflush");
- ACE_OSCALL_RETURN (::fflush (fp), int, -1);
-#else
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL(::FlushFileBuffers (fp),
- ace_result_),
- int, -1);
-#endif /* ! ACE_HAS_WINCE */
-}
-
-ACE_INLINE size_t
-ACE_OS::fread (void *ptr, size_t size, size_t nelems, FILE *fp)
-{
- ACE_TRACE ("ACE_OS::fread");
-#if defined (ACE_HAS_WINCE)
- DWORD len = 0;
- size_t tlen = size * nelems;
-
- if (::ReadFile (fp, ptr, tlen, &len, NULL) == FALSE)
- {
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- else if (tlen != len)
- {
- // only return length of multiple of <size>
- len = (len / size) * size ;
- // then rewind file pointer.
- ::SetFilePointer (fp, (len - tlen), 0, FILE_CURRENT);
- }
- return len;
-#elif defined (ACE_LACKS_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::fread ((char *) ptr, size, nelems, fp), int, 0);
-#else
- ACE_OSCALL_RETURN (::fread (ptr, size, nelems, fp), int, 0);
-#endif /* ACE_LACKS_POSIX_PROTOTYPES */
-}
-
-ACE_INLINE size_t
-ACE_OS::fwrite (const void *ptr, size_t size, size_t nitems, FILE *fp)
-{
- ACE_TRACE ("ACE_OS::fwrite");
-#if defined (ACE_HAS_WINCE)
- DWORD len = 0;
- size_t tlen = size * nitems;
-
- if (::WriteFile (fp, ptr, tlen, &len, NULL) == FALSE)
- {
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- else if (tlen != len)
- {
- // only return length of multiple of <size>
- len = (len / size) * size ;
- // then rewind file pointer.
- ::SetFilePointer (fp, (len - tlen), 0, FILE_CURRENT);
- }
- return len;
-#elif defined (ACE_LACKS_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::fwrite ((const char *) ptr, size, nitems, fp), int, 0);
-#else
- ACE_OSCALL_RETURN (::fwrite (ptr, size, nitems, fp), int, 0);
-#endif /* ACE_LACKS_POSIX_PROTOTYPES */
-}
-
-ACE_INLINE int
-ACE_OS::truncate (const ACE_TCHAR *filename,
- off_t offset)
-{
- ACE_TRACE ("ACE_OS::truncate");
-#if defined (ACE_WIN32)
- ACE_HANDLE handle = ACE_OS::open (filename,
- O_WRONLY,
- ACE_DEFAULT_FILE_PERMS);
- if (handle == ACE_INVALID_HANDLE)
- ACE_FAIL_RETURN (-1);
- else
- {
- if (::SetFilePointer (handle,
- offset,
- NULL,
- FILE_BEGIN) != (unsigned) -1)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetEndOfFile (handle),
- ace_result_), int, -1);
- else
- ACE_FAIL_RETURN (-1);
- }
- /* NOTREACHED */
-#elif !defined (ACE_LACKS_TRUNCATE)
- ACE_OSCALL_RETURN (::truncate (filename, offset), int, -1);
-#else
- ACE_UNUSED_ARG (filename);
- ACE_UNUSED_ARG (offset);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-// Accessors to PWD file.
-
-ACE_INLINE struct passwd *
-ACE_OS::getpwnam (const char *name)
-{
-#if !defined (ACE_LACKS_PWD_FUNCTIONS)
-# if !defined (ACE_WIN32)
- return ::getpwnam (name);
-# else
- ACE_UNUSED_ARG (name);
- ACE_NOTSUP_RETURN (0);
-# endif /* ACE_WIN32 */
-#else
- ACE_UNUSED_ARG (name);
- ACE_NOTSUP_RETURN (0);
-#endif /* ! ACE_LACKS_PWD_FUNCTIONS */
-}
-
-ACE_INLINE void
-ACE_OS::setpwent (void)
-{
-#if !defined (ACE_LACKS_PWD_FUNCTIONS)
-# if !defined (ACE_WIN32)
- ::setpwent ();
-# else
-# endif /* ACE_WIN32 */
-#else
-#endif /* ! ACE_LACKS_PWD_FUNCTIONS */
-}
-
-ACE_INLINE void
-ACE_OS::endpwent (void)
-{
-#if !defined (ACE_LACKS_PWD_FUNCTIONS)
-# if !defined (ACE_WIN32)
- ::endpwent ();
-# else
-# endif /* ACE_WIN32 */
-#else
-#endif /* ! ACE_LACKS_PWD_FUNCTIONS */
-}
-
-ACE_INLINE struct passwd *
-ACE_OS::getpwent (void)
-{
-#if !defined (ACE_LACKS_PWD_FUNCTIONS)
-# if !defined (ACE_WIN32)
- return ::getpwent ();
-# else
- ACE_NOTSUP_RETURN (0);
-# endif /* ACE_WIN32 */
-#else
- ACE_NOTSUP_RETURN (0);
-#endif /* ! ACE_LACKS_PWD_FUNCTIONS */
-}
-
-ACE_INLINE struct passwd *
-ACE_OS::getpwnam_r (const char *name, struct passwd *pwent,
- char *buffer, int buflen)
-{
-#if !defined (ACE_LACKS_PWD_FUNCTIONS)
-# if defined (ACE_HAS_REENTRANT_FUNCTIONS)
-# if !defined (ACE_LACKS_PWD_REENTRANT_FUNCTIONS)
-# if defined (ACE_HAS_PTHREADS_STD) && \
- !defined (ACE_HAS_STHREADS) || \
- defined (__USLC__) // Added by Roland Gigler for SCO UnixWare 7.
- struct passwd *result;
- int status;
-# if defined (DIGITAL_UNIX)
- ::_Pgetpwnam_r (name, pwent, buffer, buflen, &result);
-# else
- // VAC++ doesn't correctly grok the ::getpwnam_r - the function is redefined
- // in pwd.h, and that redefinition is used here
-# if defined (__IBMCPP__) && (__IBMCPP__ >= 400) /* VAC++ 4 */
- status = _posix_getpwnam_r (name, pwent, buffer, buflen, &result);
-# else
- status = ::getpwnam_r (name, pwent, buffer, buflen, &result);
-# endif /* __IBMCPP__ && (__IBMCPP__ >= 400) */
- if (status != 0)
- {
- errno = status;
- result = 0;
- }
-# endif /* (DIGITAL_UNIX) */
- return result;
-# elif defined (AIX) || defined (HPUX_10)
- if (::getpwnam_r (name, pwent, buffer, buflen) == -1)
- return 0;
- else
- return pwent;
-# else
- return ::getpwnam_r (name, pwent, buffer, buflen);
-# endif /* ACE_HAS_PTHREADS_STD */
-# else
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (pwent);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (buflen);
- ACE_NOTSUP_RETURN (0);
-# endif /* ! ACE_LACKS_PWD_REENTRANT_FUNCTIONS */
-# else
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (pwent);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (buflen);
- ACE_NOTSUP_RETURN (0);
-# endif /* ACE_HAS_REENTRANT_FUNCTIONS */
-#else
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (pwent);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (buflen);
- ACE_NOTSUP_RETURN (0);
-#endif /* ! ACE_LACKS_PWD_FUNCTIONS */
-}
-
-// DNS accessors.
-
-#if !defined (VXWORKS)
-ACE_INLINE struct hostent *
-ACE_OS::gethostbyaddr_r (const ACE_TCHAR *addr,
- int length,
- int type,
- hostent *result,
- ACE_HOSTENT_DATA buffer,
- int *h_errnop)
-{
- ACE_TRACE ("ACE_OS::gethostbyaddr_r");
-# if defined (ACE_PSOS)
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (length);
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (h_errnop);
- ACE_NOTSUP_RETURN (0);
-# elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE)
-# if defined (AIX) || defined (DIGITAL_UNIX) || defined (HPUX_10)
- ::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA));
-
- if (::gethostbyaddr_r ((char *) addr, length, type, result,
- (struct hostent_data *) buffer)== 0)
- return result;
- else
- {
- *h_errnop = h_errno;
- return (struct hostent *) 0;
- }
-# else
-# if defined(ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (h_errnop);
- ACE_NETDBCALL_RETURN (::gethostbyaddr (addr, (ACE_SOCKET_LEN) length, type),
- struct hostent *, 0,
- buffer, sizeof (ACE_HOSTENT_DATA));
-# else
- ACE_SOCKCALL_RETURN (::gethostbyaddr_r (addr, length, type, result,
- buffer, sizeof (ACE_HOSTENT_DATA),
- h_errnop),
- struct hostent *, 0);
-# endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
-# endif /* defined (AIX) || defined (DIGITAL_UNIX) */
-# elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (h_errnop);
- ACE_SOCKCALL_RETURN (::gethostbyaddr (ACE_const_cast (char *, addr),
- (ACE_SOCKET_LEN) length,
- type),
- struct hostent *,
- 0);
-# else
- ACE_UNUSED_ARG (h_errnop);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (result);
-
- ACE_SOCKCALL_RETURN (::gethostbyaddr (ACE_TEXT_ALWAYS_CHAR (addr),
- (ACE_SOCKET_LEN) length,
- type),
- struct hostent *,
- 0);
-# endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE) */
-}
-
-ACE_INLINE struct hostent *
-ACE_OS::gethostbyname_r (const ACE_TCHAR *name,
- hostent *result,
- ACE_HOSTENT_DATA buffer,
- int *h_errnop)
-{
- ACE_TRACE ("ACE_OS::gethostbyname_r");
-#if defined (ACE_PSOS)
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (h_errnop);
- ACE_NOTSUP_RETURN (0);
-# elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE)
-# if defined (DIGITAL_UNIX) || \
- (defined (ACE_AIX_MINOR_VERS) && (ACE_AIX_MINOR_VERS > 2))
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (h_errnop);
-
- // gethostbyname returns thread-specific storage on Digital Unix and
- // AIX 4.3
- ACE_SOCKCALL_RETURN (::gethostbyname (name), struct hostent *, 0);
-# elif defined (AIX) || defined (HPUX_10)
- ::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA));
-
- if (::gethostbyname_r (name, result, (struct hostent_data *) buffer) == 0)
- return result;
- else
- {
- *h_errnop = h_errno;
- return (struct hostent *) 0;
- }
-# else
-# if defined(ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (h_errnop);
- ACE_NETDBCALL_RETURN (::gethostbyname (name),
- struct hostent *, 0,
- buffer, sizeof (ACE_HOSTENT_DATA));
-# else
- ACE_SOCKCALL_RETURN (::gethostbyname_r (name, result, buffer,
- sizeof (ACE_HOSTENT_DATA),
- h_errnop),
- struct hostent *,
- 0);
-# endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
-# endif /* defined (AIX) || defined (DIGITAL_UNIX) */
-# elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (h_errnop);
- ACE_SOCKCALL_RETURN (::gethostbyname (ACE_const_cast (char *, name)),
- struct hostent *,
- 0);
-# else
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (buffer);
- ACE_UNUSED_ARG (h_errnop);
-
- ACE_SOCKCALL_RETURN (::gethostbyname (ACE_TEXT_ALWAYS_CHAR (name)),
- struct hostent *,
- 0);
-# endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE) */
-}
-#endif /* ! VXWORKS */
-
-#if 0
-// @@ gets is evil anyway.
-// and it is *** DEPRECATED *** now. If you
-// really needs gets, use ACE_OS::gets (char*, int)
-// instead.
-ACE_INLINE char *
-ACE_OS::gets (char *str)
-{
- ACE_TRACE ("ACE_OS::gets");
- ACE_OSCALL_RETURN (::gets (str), char *, 0);
-}
-#endif /* 0 */
-
-ACE_INLINE struct servent *
-ACE_OS::getservbyname_r (const ACE_TCHAR *svc,
- const ACE_TCHAR *proto,
- struct servent *result,
- ACE_SERVENT_DATA buf)
-{
- ACE_TRACE ("ACE_OS::getservbyname_r");
-#if defined (ACE_LACKS_GETSERVBYNAME)
- ACE_UNUSED_ARG (svc);
- ACE_UNUSED_ARG (proto);
- ACE_UNUSED_ARG (result);
- ACE_UNUSED_ARG (buf);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE)
-# if defined (AIX) || defined (DIGITAL_UNIX) || defined (HPUX_10)
- ::memset (buf, 0, sizeof (ACE_SERVENT_DATA));
-
- if (::getservbyname_r (svc, proto, result, (struct servent_data *) buf) == 0)
- return result;
- else
- return (struct servent *) 0;
-# else
-# if defined(ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
- ACE_UNUSED_ARG (result);
- ACE_NETDBCALL_RETURN (::getservbyname (svc, proto),
- struct servent *, 0,
- buf, sizeof (ACE_SERVENT_DATA));
-# else
- ACE_SOCKCALL_RETURN (::getservbyname_r (svc, proto, result, buf,
- sizeof (ACE_SERVENT_DATA)),
- struct servent *, 0);
-# endif /* ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
-# endif /* defined (AIX) || defined (DIGITAL_UNIX) */
-#elif defined (ACE_HAS_NONCONST_GETBY)
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (result);
- ACE_SOCKCALL_RETURN (::getservbyname (ACE_const_cast (char *, svc),
- ACE_const_cast (char *, proto)),
- struct servent *,
- 0);
-#else
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (result);
-
- ACE_SOCKCALL_RETURN (::getservbyname (ACE_TEXT_ALWAYS_CHAR (svc),
- ACE_TEXT_ALWAYS_CHAR (proto)),
- struct servent *,
- 0);
-#endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE) */
-}
-
-ACE_INLINE long
-ACE_OS::inet_addr (const ACE_TCHAR *name)
-{
- ACE_TRACE ("ACE_OS::inet_addr");
-#if defined (VXWORKS) || defined (ACE_PSOS)
-
- u_long ret = 0;
- u_int segment;
- u_int valid = 1;
-
- for (u_int i = 0; i < 4; ++i)
- {
- ret <<= 8;
- if (*name != '\0')
- {
- segment = 0;
-
- while (*name >= '0' && *name <= '9')
- {
- segment *= 10;
- segment += *name++ - '0';
- }
- if (*name != '.' && *name != '\0')
- {
- valid = 0;
- break;
- }
-
- ret |= segment;
-
- if (*name == '.')
- {
- ++name;
- }
- }
- }
- return valid ? (long) htonl (ret) : -1L;
-#elif defined (ACE_HAS_NONCONST_GETBY)
- return ::inet_addr ((char *) name);
-#else
- return ::inet_addr (ACE_TEXT_ALWAYS_CHAR (name));
-#endif /* ACE_HAS_NONCONST_GETBY */
-}
-
-ACE_INLINE ACE_TCHAR *
-ACE_OS::inet_ntoa (const struct in_addr addr)
-{
- ACE_TRACE ("ACE_OS::inet_ntoa");
-#if defined (ACE_PSOS)
- ACE_UNUSED_ARG (addr);
- ACE_NOTSUP_RETURN (0);
-#else
- ACE_OSCALL_RETURN (ACE_TEXT_CHAR_TO_TCHAR (::inet_ntoa (addr)),
- ACE_TCHAR *,
- 0);
-#endif /* defined (ACE_PSOS) */
-}
-
-ACE_INLINE int
-ACE_OS::inet_pton (int family, const ACE_TCHAR *strptr, void *addrptr)
-{
- ACE_TRACE ("ACE_OS::inet_pton");
-
-#if defined (ACE_HAS_IP6)
- ACE_OSCALL_RETURN (::inet_pton (family, strptr, addrptr), int, -1);
-#else
- if (family == AF_INET)
- {
- struct in_addr in_val;
-
- if (ACE_OS::inet_aton (strptr, &in_val))
- {
- ACE_OS::memcpy (addrptr, &in_val, sizeof (struct in_addr));
- return 1; // Success
- }
-
- return 0; // Input is not a valid presentation format
- }
-
- ACE_NOTSUP_RETURN(-1);
-#endif /* ACE_HAS_IP6 */
-}
-
-ACE_INLINE const ACE_TCHAR *
-ACE_OS::inet_ntop (int family, const void *addrptr, ACE_TCHAR *strptr, size_t len)
-{
- ACE_TRACE ("ACE_OS::inet_ntop");
-
-#if defined (ACE_HAS_IP6)
- ACE_OSCALL_RETURN (::inet_ntop (family, addrptr, strptr, len), const char *, 0);
-#else
- const u_char *p =
- ACE_reinterpret_cast (const u_char *, addrptr);
-
- if (family == AF_INET)
- {
- ACE_TCHAR temp[INET_ADDRSTRLEN];
-
- // Stevens uses snprintf() in his implementation but snprintf()
- // doesn't appear to be very portable. For now, hope that using
- // sprintf() will not cause any string/memory overrun problems.
- ACE_OS::sprintf (temp,
- ACE_TEXT ("%d.%d.%d.%d"),
- p[0], p[1], p[2], p[3]);
-
- if (ACE_OS::strlen (temp) >= len)
- {
- errno = ENOSPC;
- return 0; // Failure
- }
-
- ACE_OS::strcpy (strptr, temp);
- return strptr;
- }
-
- ACE_NOTSUP_RETURN(0);
-#endif /* ACE_HAS_IP6 */
-}
-
-ACE_INLINE int
-ACE_OS::set_errno_to_last_error (void)
-{
-# if defined (ACE_WIN32)
-// Borland C++ Builder 4 has a bug in the RTL that resets the
-// <GetLastError> value to zero when errno is accessed. Thus, we have
-// to use this to set errno to GetLastError. It's bad, but only for
-// WIN32
-# if defined(__BORLANDC__) && (__BORLANDC__ == 0x540)
- int last_error = ::GetLastError ();
- return errno = last_error;
-# else /* defined(__BORLANDC__) && (__BORLANDC__ == 0x540) */
- return errno = ::GetLastError ();
-# endif /* defined(__BORLANDC__) && (__BORLANDC__ == 0x540) */
-#else
- return errno;
-# endif /* defined(ACE_WIN32) */
-}
-
-ACE_INLINE int
-ACE_OS::set_errno_to_wsa_last_error (void)
-{
-# if defined (ACE_WIN32)
-// Borland C++ Builder 4 has a bug in the RTL that resets the
-// <GetLastError> value to zero when errno is accessed. Thus, we have
-// to use this to set errno to GetLastError. It's bad, but only for
-// WIN32
-# if defined(__BORLANDC__) && (__BORLANDC__ == 0x540)
- int last_error = ::WSAGetLastError ();
- return errno = last_error;
-# else /* defined(__BORLANDC__) && (__BORLANDC__ == 0x540) */
- return errno = ::WSAGetLastError ();
-# endif /* defined(__BORLANDC__) && (__BORLANDC__ == 0x540) */
-#else
- return errno;
-# endif /* defined(ACE_WIN32) */
-}
-
-ACE_INLINE int
-ACE_OS::last_error (void)
-{
- // ACE_TRACE ("ACE_OS::last_error");
-
-#if defined (ACE_WIN32)
- int lerror = ::GetLastError ();
- int lerrno = errno;
- return lerrno == 0 ? lerror : lerrno;
-#else
- return errno;
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE void
-ACE_OS::last_error (int error)
-{
- ACE_TRACE ("ACE_OS::last_error");
-#if defined (ACE_WIN32)
- ::SetLastError (error);
-#else
- errno = error;
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE void
-ACE_OS::perror (const ACE_TCHAR *s)
-{
- ACE_TRACE ("ACE_OS::perror");
-#if defined (ACE_HAS_WINCE)
- // @@ WINCE: How should this be handled
- ACE_UNUSED_ARG (s);
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ::_wperror (s);
-#else
- ::perror (s);
-#endif /* ACE_HAS_WINCE */
-}
-
-
-// @@ WINCE: Do we need to implement puts on WinCE???
-#if !defined (ACE_HAS_WINCE)
-ACE_INLINE int
-ACE_OS::puts (const ACE_TCHAR *s)
-{
- ACE_TRACE ("ACE_OS::puts");
-#if defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_putws (s), int, -1);
-#else /* ACE_WIN32 */
- ACE_OSCALL_RETURN (::puts (s), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::fputs (const ACE_TCHAR *s, FILE *stream)
-{
- ACE_TRACE ("ACE_OS::fputs");
-#if defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::fputws (s, stream), int, -1);
-#else /* ACE_WIN32 */
- ACE_OSCALL_RETURN (::fputs (s, stream), int, -1);
-#endif /* ACE_WIN32 */
-}
-#endif /* ! ACE_HAS_WINCE */
-
-ACE_INLINE ACE_SignalHandler
-ACE_OS::signal (int signum, ACE_SignalHandler func)
-{
- if (signum == 0)
- return 0;
- else
-#if defined (ACE_PSOS) && !defined (ACE_PSOS_TM) && !defined (ACE_PSOS_DIAB_MIPS) && !defined (ACE_PSOS_DIAB_PPC)
- return (ACE_SignalHandler) ::signal (signum, (void (*)(void)) func);
-#elif defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC)
- return 0;
-#elif defined (ACE_PSOS_TM)
- // @@ It would be good to rework this so the ACE_PSOS_TM specific
- // branch is not needed, but prying it out of ACE_LACKS_UNIX_SIGNALS
- // will take some extra work - deferred for now.
- return (ACE_SignalHandler) ::signal (signum, (void (*)(int)) func);
-#elif defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) || !defined (ACE_LACKS_UNIX_SIGNALS)
-# if !defined (ACE_HAS_TANDEM_SIGNALS) && !defined (ACE_HAS_LYNXOS_SIGNALS)
- return ::signal (signum, func);
-# else
- return (ACE_SignalHandler) ::signal (signum, (void (*)(int)) func);
-# endif /* !ACE_HAS_TANDEM_SIGNALS */
-#else
- // @@ WINCE: Don't know how to implement signal on WinCE (yet.)
- ACE_UNUSED_ARG (signum);
- ACE_UNUSED_ARG (func);
- ACE_NOTSUP_RETURN (0); // Should return SIG_ERR but it is not defined on WinCE.
-#endif /* ! ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::system (const ACE_TCHAR *s)
-{
- // ACE_TRACE ("ACE_OS::system");
-#if defined (CHORUS) || defined (ACE_HAS_WINCE) || defined(ACE_PSOS)
- ACE_UNUSED_ARG (s);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wsystem (s), int, -1);
-#else
- ACE_OSCALL_RETURN (::system (s), int, -1);
-#endif /* !CHORUS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_continue (ACE_hthread_t target_thread)
-{
- ACE_TRACE ("ACE_OS::thr_continue");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_continue (target_thread), ace_result_), int, -1);
-# elif defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_UNIX98_EXT)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_continue (target_thread),
- ace_result_),
- int, -1);
-# else
- ACE_UNUSED_ARG (target_thread);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
-# elif defined (ACE_HAS_WTHREADS)
- DWORD result = ::ResumeThread (target_thread);
- if (result == ACE_SYSCALL_FAILED)
- ACE_FAIL_RETURN (-1);
- else
- return 0;
-# elif defined (ACE_PSOS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::t_resume (target_thread), ace_result_), int, -1);
-# elif defined (VXWORKS)
- ACE_OSCALL_RETURN (::taskResume (target_thread), int, -1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_UNUSED_ARG (target_thread);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_cmp (ACE_hthread_t t1, ACE_hthread_t t2)
-{
-#if defined (ACE_HAS_PTHREADS)
-# if defined (pthread_equal)
- // If it's a macro we can't say "::pthread_equal"...
- return pthread_equal (t1, t2);
-# else
- return ::pthread_equal (t1, t2);
-# endif /* pthread_equal */
-#else /* For STHREADS, WTHREADS, and VXWORKS ... */
- // Hum, Do we need to treat WTHREAD differently?
- // levine 13 oct 98 % Probably, ACE_hthread_t is a HANDLE.
- return t1 == t2;
-#endif /* Threads variety case */
-}
-
-ACE_INLINE int
-ACE_OS::thr_getconcurrency (void)
-{
- ACE_TRACE ("ACE_OS::thr_getconcurrency");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- return ::thr_getconcurrency ();
-# elif defined (ACE_HAS_PTHREADS) || defined (VXWORKS) || defined (ACE_PSOS)
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_HAS_WTHREADS)
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_getprio (ACE_hthread_t thr_id, int &prio)
-{
- ACE_TRACE ("ACE_OS::thr_getprio");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getprio (thr_id, &prio), ace_result_), int, -1);
-# elif (defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_SETSCHED))
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- int result;
- result = ::pthread_getprio (thr_id);
- if (result != -1)
- {
- prio = result;
- return 0;
- }
- else
- return -1;
-# elif defined (ACE_HAS_PTHREADS_DRAFT6)
-
- pthread_attr_t attr;
- if (pthread_getschedattr (thr_id, &attr) == 0)
- {
- prio = pthread_attr_getprio(&attr);
- return 0;
- }
- return -1;
-# else
-
- struct sched_param param;
- int result;
- int policy = 0;
-
- ACE_OSCALL (ACE_ADAPT_RETVAL (::pthread_getschedparam (thr_id, &policy, &param),
- result), int,
- -1, result);
- prio = param.sched_priority;
- return result;
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-# elif defined (ACE_HAS_WTHREADS)
- prio = ::GetThreadPriority (thr_id);
- if (prio == THREAD_PRIORITY_ERROR_RETURN)
- ACE_FAIL_RETURN (-1);
- else
- return 0;
-# elif defined (ACE_PSOS)
- // passing a 0 in the second argument does not alter task priority, third arg gets existing one
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::t_setpri (thr_id, 0, (u_long *) &prio), ace_result_), int, -1);
-# elif defined (VXWORKS)
- ACE_OSCALL_RETURN (::taskPriorityGet (thr_id, &prio), int, -1);
-# else
- ACE_UNUSED_ARG (thr_id);
- ACE_UNUSED_ARG (prio);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_UNUSED_ARG (thr_id);
- ACE_UNUSED_ARG (prio);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-
-#if defined (ACE_HAS_TSS_EMULATION)
-
-#if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
-ACE_INLINE int
-ACE_OS::thr_getspecific (ACE_OS_thread_key_t key, void **data)
-{
- ACE_TRACE ("ACE_OS::thr_getspecific");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getspecific (key, data), ace_result_), int, -1);
-# elif defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- return pthread_getspecific (key, data);
-# else /* this is ACE_HAS_PTHREADS_DRAFT7 or STD */
-#if (pthread_getspecific)
- // This is a macro on some platforms, e.g., CHORUS!
- *data = pthread_getspecific (key);
-#else
- *data = pthread_getspecific (key);
-#endif /* pthread_getspecific */
-# endif /* ACE_HAS_PTHREADS_DRAFT4, 6 */
- return 0;
-# elif defined (ACE_PSOS) && defined (ACE_PSOS_HAS_TSS)
- ACE_hthread_t tid;
- ACE_OS::thr_self (tid);
- return (::tsd_getval (key, tid, data) == 0) ? 0 : -1;
-# elif defined (ACE_HAS_WTHREADS)
-
- // The following handling of errno is designed like this due to
- // ACE_Log_Msg::instance calling ACE_OS::thr_getspecific.
- // Basically, it is ok for a system call to reset the error to zero.
- // (It really shouldn't, though). However, we have to remember to
- // store errno *immediately* after an error is detected. Calling
- // ACE_ERROR_RETURN((..., errno)) did not work because errno was
- // cleared before being passed to the thread-specific instance of
- // ACE_Log_Msg. The workaround for was to make it so
- // thr_getspecific did not have the side effect of clearing errno.
- // The correct fix is for ACE_ERROR_RETURN to store errno
- //(actually ACE_OS::last_error) before getting the ACE_Log_Msg tss
- // pointer, which is how it is implemented now. However, other uses
- // of ACE_Log_Msg may not work correctly, so we're keeping this as
- // it is for now.
-
- ACE_Errno_Guard error (errno);
- *data = ::TlsGetValue (key);
-# if !defined (ACE_HAS_WINCE)
- if (*data == 0 && (error = ::GetLastError ()) != NO_ERROR)
- return -1;
- else
-# endif /* ACE_HAS_WINCE */
- return 0;
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (data);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-#endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
-
-#if !defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
-ACE_INLINE
-void **&
-ACE_TSS_Emulation::tss_base ()
-{
-# if defined (VXWORKS)
- return (void **&) taskIdCurrent->ACE_VXWORKS_SPARE;
-# elif defined (ACE_PSOS)
- // not supported
- long x=0; //JINLU
- return (void **&) x;
-# else
- // Uh oh.
- ACE_NOTSUP_RETURN (0);
-# endif /* VXWORKS */
-}
-#endif /* ! ACE_HAS_THREAD_SPECIFIC_STORAGE */
-
-ACE_INLINE
-ACE_TSS_Emulation::ACE_TSS_DESTRUCTOR
-ACE_TSS_Emulation::tss_destructor (const ACE_thread_key_t key)
-{
- ACE_KEY_INDEX (key_index, key);
- return tss_destructor_ [key_index];
-}
-
-ACE_INLINE
-void
-ACE_TSS_Emulation::tss_destructor (const ACE_thread_key_t key,
- ACE_TSS_DESTRUCTOR destructor)
-{
- ACE_KEY_INDEX (key_index, key);
- tss_destructor_ [key_index] = destructor;
-}
-
-ACE_INLINE
-void *&
-ACE_TSS_Emulation::ts_object (const ACE_thread_key_t key)
-{
- ACE_KEY_INDEX (key_index, key);
-
-#if defined (ACE_PSOS)
- u_long tss_base;
- t_getreg (0, PSOS_TASK_REG_TSS, &tss_base);
- return ((void **) tss_base)[key_index];
-#else
-# if defined (VXWORKS)
- /* If someone wants tss_base make sure they get one. This
- gets used if someone spawns a VxWorks task directly, not
- through ACE. The allocated array will never be deleted! */
- if (0 == taskIdCurrent->ACE_VXWORKS_SPARE)
- {
- taskIdCurrent->ACE_VXWORKS_SPARE =
- ACE_reinterpret_cast (int, new void *[ACE_TSS_THREAD_KEYS_MAX]);
-
- // Zero the entire TSS array. Do it manually instead of using
- // memset, for optimum speed. Though, memset may be faster :-)
- void **tss_base_p =
- ACE_reinterpret_cast (void **, taskIdCurrent->ACE_VXWORKS_SPARE);
- for (u_int i = 0; i < ACE_TSS_THREAD_KEYS_MAX; ++i, ++tss_base_p)
- {
- *tss_base_p = 0;
- }
- }
-# endif /* VXWORKS */
-
- return tss_base ()[key_index];
-#endif /* defined (ACE_PSOS) */
-}
-
-#endif /* ACE_HAS_TSS_EMULATION */
-
-
-ACE_INLINE int
-ACE_OS::thr_getspecific (ACE_thread_key_t key, void **data)
-{
- // ACE_TRACE ("ACE_OS::thr_getspecific");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_TSS_EMULATION)
- ACE_KEY_INDEX (key_index, key);
- if (key_index >= ACE_TSS_Emulation::total_keys ())
- {
- errno = EINVAL;
- data = 0;
- return -1;
- }
- else
- {
- *data = ACE_TSS_Emulation::ts_object (key);
- return 0;
- }
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getspecific (key, data), ace_result_), int, -1);
-# elif defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- return ::pthread_getspecific (key, data);
-# else /* this is Draft 7 or STD */
- *data = pthread_getspecific (key);
- return 0;
-# endif /* ACE_HAS_PTHREADS_DRAFT4, 6 */
-# elif defined (ACE_HAS_WTHREADS)
-
- // The following handling of errno is designed like this due to
- // ACE_Log_Msg::instance calling ACE_OS::thr_getspecific.
- // Basically, it is ok for a system call to reset the error to zero.
- // (It really shouldn't, though). However, we have to remember to
- // store errno *immediately* after an error is detected. Calling
- // ACE_ERROR_RETURN((..., errno)) did not work because errno was
- // cleared before being passed to the thread-specific instance of
- // ACE_Log_Msg. The workaround for was to make it so
- // thr_getspecific did not have the side effect of clearing errno.
- // The correct fix is for ACE_ERROR_RETURN to store errno
- //(actually ACE_OS::last_error) before getting the ACE_Log_Msg tss
- // pointer, which is how it is implemented now. However, other uses
- // of ACE_Log_Msg may not work correctly, so we're keeping this as
- // it is for now.
-
- ACE_Errno_Guard error (errno);
- *data = ::TlsGetValue (key);
-# if !defined (ACE_HAS_WINCE)
- if (*data == 0 && (error = ::GetLastError ()) != NO_ERROR)
-
- return -1;
- else
-# endif /* ACE_HAS_WINCE */
- return 0;
-# else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (data);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (data);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_join (ACE_hthread_t thr_handle,
- void **status)
-{
- ACE_TRACE ("ACE_OS::thr_join");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_join (thr_handle, 0, status), ace_result_),
- int, -1);
-# elif defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
-# if defined (ACE_LACKS_NULL_PTHREAD_STATUS)
- void *temp;
- ACE_OSCALL_RETURN (::pthread_join (thr_handle,
- status == 0 ? &temp : status), int, -1);
-# else
- ACE_OSCALL_RETURN (::pthread_join (thr_handle, status), int, -1);
-# endif
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_join (thr_handle, status), ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4, 6 */
-# elif defined (ACE_HAS_WTHREADS)
- void *local_status = 0;
-
- // Make sure that status is non-NULL.
- if (status == 0)
- status = &local_status;
-
- if (::WaitForSingleObject (thr_handle, INFINITE) == WAIT_OBJECT_0
- && ::GetExitCodeThread (thr_handle, (LPDWORD) status) != FALSE)
- {
- ::CloseHandle (thr_handle);
- return 0;
- }
- ACE_FAIL_RETURN (-1);
- /* NOTREACHED */
-# elif defined (VXWORKS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (thr_handle);
- ACE_UNUSED_ARG (status);
- ACE_NOTSUP_RETURN (-1);
-# else
- ACE_UNUSED_ARG (thr_handle);
- ACE_UNUSED_ARG (status);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_UNUSED_ARG (thr_handle);
- ACE_UNUSED_ARG (status);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_join (ACE_thread_t waiter_id,
- ACE_thread_t *thr_id,
- void **status)
-{
- ACE_TRACE ("ACE_OS::thr_join");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_join (waiter_id, thr_id, status), ace_result_),
- int, -1);
-# elif defined (ACE_HAS_PTHREADS)
- ACE_UNUSED_ARG (thr_id);
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
-# if defined (ACE_LACKS_NULL_PTHREAD_STATUS)
- void *temp;
- ACE_OSCALL_RETURN (::pthread_join (waiter_id,
- status == 0 ? &temp : status), int, -1);
-# else
- ACE_OSCALL_RETURN (::pthread_join (waiter_id, status), int, -1);
-# endif
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_join (waiter_id, status), ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4, 6 */
-# elif defined (ACE_HAS_WTHREADS)
- ACE_UNUSED_ARG (waiter_id);
- ACE_UNUSED_ARG (thr_id);
- ACE_UNUSED_ARG (status);
-
- // This could be implemented if the DLL-Main function or the
- // task exit base class some log the threads which have exited
- ACE_NOTSUP_RETURN (-1);
-# elif defined (VXWORKS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (waiter_id);
- ACE_UNUSED_ARG (thr_id);
- ACE_UNUSED_ARG (status);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_UNUSED_ARG (waiter_id);
- ACE_UNUSED_ARG (thr_id);
- ACE_UNUSED_ARG (status);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_setcancelstate (int new_state, int *old_state)
-{
- ACE_TRACE ("ACE_OS::thr_setcancelstate");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_CANCEL)
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- int old;
- old = pthread_setcancel (new_state);
- if (old == -1)
- return -1;
- *old_state = old;
- return 0;
-# elif defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_UNUSED_ARG(old_state);
- ACE_OSCALL_RETURN (pthread_setintr (new_state), int, -1);
-# else /* this is draft 7 or std */
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setcancelstate (new_state,
- old_state),
- ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-# elif defined (ACE_HAS_STHREADS)
- ACE_UNUSED_ARG (new_state);
- ACE_UNUSED_ARG (old_state);
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_HAS_WTHREADS)
- ACE_UNUSED_ARG (new_state);
- ACE_UNUSED_ARG (old_state);
- ACE_NOTSUP_RETURN (-1);
-# else /* Could be ACE_HAS_PTHREADS && ACE_LACKS_PTHREAD_CANCEL */
- ACE_UNUSED_ARG (new_state);
- ACE_UNUSED_ARG (old_state);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_PTHREADS */
-#else
- ACE_UNUSED_ARG (new_state);
- ACE_UNUSED_ARG (old_state);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_setcanceltype (int new_type, int *old_type)
-{
- ACE_TRACE ("ACE_OS::thr_setcanceltype");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_CANCEL)
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- int old;
- old = pthread_setasynccancel(new_type);
- if (old == -1)
- return -1;
- *old_type = old;
- return 0;
-# elif defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_UNUSED_ARG(old_type);
- ACE_OSCALL_RETURN (pthread_setintrtype (new_type), int, -1);
-# else /* this is draft 7 or std */
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setcanceltype (new_type,
- old_type),
- ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-# else /* Could be ACE_HAS_PTHREADS && ACE_LACKS_PTHREAD_CANCEL */
- ACE_UNUSED_ARG (new_type);
- ACE_UNUSED_ARG (old_type);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_PTHREADS */
-#else
- ACE_UNUSED_ARG (new_type);
- ACE_UNUSED_ARG (old_type);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_cancel (ACE_thread_t thr_id)
-{
- ACE_TRACE ("ACE_OS::thr_cancel");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_CANCEL)
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
- ACE_OSCALL_RETURN (::pthread_cancel (thr_id), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cancel (thr_id),
- ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 || ACE_HAS_PTHREADS_DRAFT6 */
-# else /* Could be ACE_HAS_PTHREADS && ACE_LACKS_PTHREAD_CANCEL */
- ACE_UNUSED_ARG (thr_id);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_PTHREADS */
-#else
- ACE_UNUSED_ARG (thr_id);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::sigwait (sigset_t *set, int *sig)
-{
- ACE_TRACE ("ACE_OS::sigwait");
- int local_sig;
- if (sig == 0)
- sig = &local_sig;
-#if defined (ACE_HAS_THREADS)
-# if (defined (__FreeBSD__) && (__FreeBSD__ < 3)) || defined (CHORUS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (set);
- ACE_NOTSUP_RETURN (-1);
-# elif (defined (ACE_HAS_STHREADS) && !defined (_POSIX_PTHREAD_SEMANTICS))
- *sig = ::sigwait (set);
- return *sig;
-# elif defined (ACE_HAS_PTHREADS)
- // LynxOS and Digital UNIX have their own hoops to jump through.
-# if defined (__Lynx__)
- // Second arg is a void **, which we don't need (the selected
- // signal number is returned).
- *sig = ::sigwait (set, 0);
- return *sig;
-# elif defined (DIGITAL_UNIX) && defined (__DECCXX_VER)
- // DEC cxx (but not g++) needs this direct call to its internal
- // sigwait (). This allows us to #undef sigwait, so that we can
- // have ACE_OS::sigwait. cxx gets confused by ACE_OS::sigwait
- // if sigwait is _not_ #undef'ed.
- errno = ::_Psigwait (set, sig);
- return errno == 0 ? *sig : -1;
-# else /* ! __Lynx __ && ! (DIGITAL_UNIX && __DECCXX_VER) */
-# if (defined (ACE_HAS_PTHREADS_DRAFT4) || (defined (ACE_HAS_PTHREADS_DRAFT6)) && !defined(ACE_HAS_FSU_PTHREADS)) || (defined (_UNICOS) && _UNICOS == 9)
-# if defined (HPUX_10)
- *sig = cma_sigwait (set);
-# else
- *sig = ::sigwait (set);
-# endif /* HPUX_10 */
- return *sig;
-# elif defined(ACE_HAS_FSU_PTHREADS)
- return ::sigwait (set, sig);
-# else /* this is draft 7 or std */
- errno = ::sigwait (set, sig);
- return errno == 0 ? *sig : -1;
-# endif /* ACE_HAS_PTHREADS_DRAFT4, 6 */
-# endif /* ! __Lynx__ && ! (DIGITAL_UNIX && __DECCXX_VER) */
-# elif defined (ACE_HAS_WTHREADS)
- ACE_UNUSED_ARG (set);
- ACE_NOTSUP_RETURN (-1);
-# elif defined (VXWORKS)
- // Second arg is a struct siginfo *, which we don't need (the
- // selected signal number is returned). Third arg is timeout: 0
- // means forever.
- *sig = ::sigtimedwait (set, 0, 0);
- return *sig;
-# endif /* __FreeBSD__ */
-#else
- ACE_UNUSED_ARG (set);
- ACE_UNUSED_ARG (sig);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::sigtimedwait (const sigset_t *set,
- siginfo_t *info,
- const ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_OS::sigtimedwait");
-#if defined (ACE_HAS_SIGTIMEDWAIT)
- timespec_t ts;
- timespec_t *tsp;
-
- if (timeout != 0)
- {
- ts = *timeout; // Calls ACE_Time_Value::operator timespec_t().
- tsp = &ts;
- }
- else
- tsp = 0;
-
- ACE_OSCALL_RETURN (::sigtimedwait (set, info, tsp),
- int, -1);
-#else
- ACE_UNUSED_ARG (set);
- ACE_UNUSED_ARG (info);
- ACE_UNUSED_ARG (timeout);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE void
-ACE_OS::thr_testcancel (void)
-{
- ACE_TRACE ("ACE_OS::thr_testcancel");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_PTHREAD_CANCEL)
-#if defined(ACE_HAS_PTHREADS_DRAFT6)
- ::pthread_testintr ();
-#else /* ACE_HAS_PTHREADS_DRAFT6 */
- ::pthread_testcancel ();
-#endif /* !ACE_HAS_PTHREADS_DRAFT6 */
-# elif defined (ACE_HAS_STHREADS)
-# elif defined (ACE_HAS_WTHREADS)
-# elif defined (VXWORKS) || defined (ACE_PSOS)
-# else
- // no-op: can't use ACE_NOTSUP_RETURN because there is no return value
-# endif /* ACE_HAS_PTHREADS */
-#else
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_sigsetmask (int how,
- const sigset_t *nsm,
- sigset_t *osm)
-{
- ACE_TRACE ("ACE_OS::thr_sigsetmask");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK)
- // DCE threads and Solaris 2.4 have no such function.
- ACE_UNUSED_ARG (osm);
- ACE_UNUSED_ARG (nsm);
- ACE_UNUSED_ARG (how);
-
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_HAS_SIGTHREADMASK)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sigthreadmask (how, nsm, osm),
- ace_result_), int, -1);
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_sigsetmask (how, nsm, osm),
- ace_result_),
- int, -1);
-# elif defined (ACE_HAS_PTHREADS)
-# if defined (AIX)
- ACE_OSCALL_RETURN (sigthreadmask (how, nsm, osm), int, -1);
- // Draft 4 and 6 implementations will sometimes have a sigprocmask () that
- // modifies the calling thread's mask only. If this is not so for your
- // platform, define ACE_LACKS_PTHREAD_THR_SIGSETMASK.
-# elif defined(ACE_HAS_PTHREADS_DRAFT4) || \
- defined (ACE_HAS_PTHREADS_DRAFT6) || (defined (_UNICOS) && _UNICOS == 9)
- ACE_OSCALL_RETURN (::sigprocmask (how, nsm, osm), int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_sigmask (how, nsm, osm),
- ace_result_), int, -1);
-# endif /* AIX */
-
-#if 0
- /* Don't know if anyt platform actually needs this... */
- // as far as I can tell, this is now pthread_sigaction() -- jwr
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_sigaction (how, nsm, osm),
- ace_result_), int, -1);
-#endif /* 0 */
-
-# elif defined (ACE_HAS_WTHREADS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (osm);
- ACE_UNUSED_ARG (nsm);
- ACE_UNUSED_ARG (how);
-
- ACE_NOTSUP_RETURN (-1);
-# elif defined (VXWORKS)
- switch (how)
- {
- case SIG_BLOCK:
- case SIG_UNBLOCK:
- {
- // get the old mask
- *osm = ::sigsetmask (*nsm);
- // create a new mask: the following assumes that sigset_t is 4 bytes,
- // which it is on VxWorks 5.2, so bit operations are done simply . . .
- ::sigsetmask (how == SIG_BLOCK ? (*osm |= *nsm) : (*osm &= ~*nsm));
- break;
- }
- case SIG_SETMASK:
- *osm = ::sigsetmask (*nsm);
- break;
- default:
- return -1;
- }
-
- return 0;
-# else /* Should not happen. */
- ACE_UNUSED_ARG (how);
- ACE_UNUSED_ARG (nsm);
- ACE_UNUSED_ARG (osm);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_LACKS_PTHREAD_THR_SIGSETMASK */
-#else
- ACE_UNUSED_ARG (how);
- ACE_UNUSED_ARG (nsm);
- ACE_UNUSED_ARG (osm);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_kill (ACE_thread_t thr_id, int signum)
-{
- ACE_TRACE ("ACE_OS::thr_kill");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined(ACE_LACKS_PTHREAD_KILL)
- ACE_UNUSED_ARG (signum);
- ACE_UNUSED_ARG (thr_id);
- ACE_NOTSUP_RETURN (-1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_kill (thr_id, signum),
- ace_result_),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-# elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_kill (thr_id, signum),
- ace_result_),
- int, -1);
-# elif defined (ACE_HAS_WTHREADS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (signum);
- ACE_UNUSED_ARG (thr_id);
-
- ACE_NOTSUP_RETURN (-1);
-# elif defined (VXWORKS)
- ACE_hthread_t tid;
- ACE_OSCALL (::taskNameToId (thr_id), int, ERROR, tid);
-
- if (tid == ERROR)
- return -1;
- else
- ACE_OSCALL_RETURN (::kill (tid, signum), int, -1);
-
-# else /* This should not happen! */
- ACE_UNUSED_ARG (thr_id);
- ACE_UNUSED_ARG (signum);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_UNUSED_ARG (thr_id);
- ACE_UNUSED_ARG (signum);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE size_t
-ACE_OS::thr_min_stack (void)
-{
- ACE_TRACE ("ACE_OS::thr_min_stack");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
-# if defined (ACE_HAS_THR_MINSTACK)
- // Tandem did some weirdo mangling of STHREAD names...
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_minstack (),
- ace_result_),
- int, -1);
-# else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_min_stack (),
- ace_result_),
- int, -1);
-# endif /* !ACE_HAS_THR_MINSTACK */
-# elif defined (ACE_HAS_PTHREADS)
-# if defined (_SC_THREAD_STACK_MIN)
- return (size_t) ACE_OS::sysconf (_SC_THREAD_STACK_MIN);
-# elif defined (PTHREAD_STACK_MIN)
- return PTHREAD_STACK_MIN;
-# else
- ACE_NOTSUP_RETURN (0);
-# endif /* _SC_THREAD_STACK_MIN */
-# elif defined (ACE_HAS_WTHREADS)
- ACE_NOTSUP_RETURN (0);
-# elif defined (ACE_PSOS)
- // there does not appear to be a way to get the
- // task stack size except at task creation
- ACE_NOTSUP_RETURN (0);
-# elif defined (VXWORKS)
- TASK_DESC taskDesc;
- STATUS status;
-
- ACE_hthread_t tid;
- ACE_OS::thr_self (tid);
-
- ACE_OSCALL (ACE_ADAPT_RETVAL (::taskInfoGet (tid, &taskDesc),
- status),
- STATUS, -1, status);
- return status == OK ? taskDesc.td_stackSize : 0;
-# else /* Should not happen... */
- ACE_NOTSUP_RETURN (0);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_setconcurrency (int hint)
-{
- ACE_TRACE ("ACE_OS::thr_setconcurrency");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setconcurrency (hint),
- ace_result_),
- int, -1);
-# elif defined (ACE_HAS_PTHREADS)
- ACE_UNUSED_ARG (hint);
- ACE_NOTSUP_RETURN (-1);
-# elif defined (ACE_HAS_WTHREADS)
- ACE_UNUSED_ARG (hint);
-
- ACE_NOTSUP_RETURN (-1);
-# elif defined (VXWORKS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (hint);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_UNUSED_ARG (hint);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_setprio (ACE_hthread_t thr_id, int prio)
-{
- ACE_TRACE ("ACE_OS::thr_setprio");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setprio (thr_id, prio),
- ace_result_),
- int, -1);
-# elif (defined (ACE_HAS_PTHREADS) && !defined (ACE_LACKS_SETSCHED))
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4)
- int result;
- result = ::pthread_setprio(thr_id, prio);
- return (result == -1 ? -1 : 0);
-# elif defined (ACE_HAS_PTHREADS_DRAFT6)
- pthread_attr_t attr;
- if (pthread_getschedattr(thr_id, &attr) == -1)
- return -1;
- if (pthread_attr_setprio (attr, prio) == -1)
- return -1;
- return pthread_setschedattr(thr_id, attr);
-# else
- struct sched_param param;
- int policy = 0;
- int result;
-
- ACE_OSCALL (ACE_ADAPT_RETVAL (::pthread_getschedparam (thr_id, &policy, &param),
- result), // not sure if use of result here is cool, cjc
- int, -1, result);
- if (result == -1)
- return result; // error in pthread_getschedparam
- param.sched_priority = prio;
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setschedparam (thr_id, policy, &param),
- result),
- int, -1);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 */
-# elif defined (ACE_HAS_WTHREADS)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::SetThreadPriority (thr_id, prio),
- ace_result_),
- int, -1);
-# elif defined (ACE_PSOS)
- u_long oldprio;
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::t_setpri (thr_id, prio, &oldprio),
- ace_result_),
- int, -1);
-# elif defined (VXWORKS)
- ACE_OSCALL_RETURN (::taskPrioritySet (thr_id, prio), int, -1);
-# else
- // For example, platforms that support Pthreads but LACK_SETSCHED.
- ACE_UNUSED_ARG (thr_id);
- ACE_UNUSED_ARG (prio);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_UNUSED_ARG (thr_id);
- ACE_UNUSED_ARG (prio);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::thr_suspend (ACE_hthread_t target_thread)
-{
- ACE_TRACE ("ACE_OS::thr_suspend");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_suspend (target_thread), ace_result_), int, -1);
-# elif defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_UNIX98_EXT)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (pthread_suspend (target_thread),
- ace_result_),
- int, -1);
-# else
- ACE_UNUSED_ARG (target_thread);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
-# elif defined (ACE_HAS_WTHREADS)
- if (::SuspendThread (target_thread) != ACE_SYSCALL_FAILED)
- return 0;
- else
- ACE_FAIL_RETURN (-1);
- /* NOTREACHED */
-# elif defined (ACE_PSOS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::t_suspend (target_thread), ace_result_), int, -1);
-# elif defined (VXWORKS)
- ACE_OSCALL_RETURN (::taskSuspend (target_thread), int, -1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ACE_UNUSED_ARG (target_thread);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE void
-ACE_OS::thr_yield (void)
-{
- ACE_TRACE ("ACE_OS::thr_yield");
-#if defined (ACE_HAS_THREADS)
-# if defined (ACE_HAS_STHREADS)
- ::thr_yield ();
-# elif defined (ACE_HAS_PTHREADS)
-# if defined (ACE_HAS_PTHREADS_STD)
- // Note - this is a POSIX.4 function - not a POSIX.1c function...
- ::sched_yield ();
-# elif defined (ACE_HAS_PTHREADS_DRAFT6)
- ::pthread_yield (NULL);
-# else /* Draft 4 and 7 */
- ::pthread_yield ();
-# endif /* ACE_HAS_IRIX62_THREADS */
-# elif defined (ACE_HAS_WTHREADS)
- ::Sleep (0);
-# elif defined (VXWORKS)
- // An argument of 0 to ::taskDelay doesn't appear to yield the
- // current thread.
- ::taskDelay (1);
-# endif /* ACE_HAS_STHREADS */
-#else
- ;
-#endif /* ACE_HAS_THREADS */
-}
-
-ACE_INLINE int
-ACE_OS::priority_control (ACE_idtype_t idtype, ACE_id_t id, int cmd, void *arg)
-{
- ACE_TRACE ("ACE_OS::priority_control");
-#if defined (ACE_HAS_PRIOCNTL)
- ACE_OSCALL_RETURN (priocntl (idtype, id, cmd, ACE_static_cast (caddr_t, arg)),
- int, -1);
-#else /* ! ACE_HAS_PRIOCNTL*/
- ACE_UNUSED_ARG (idtype);
- ACE_UNUSED_ARG (id);
- ACE_UNUSED_ARG (cmd);
- ACE_UNUSED_ARG (arg);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ! ACE_HAS_PRIOCNTL*/
-}
-
-ACE_INLINE void
-ACE_OS::rewind (FILE *fp)
-{
-#if !defined (ACE_HAS_WINCE)
- ACE_TRACE ("ACE_OS::rewind");
- ::rewind (fp);
-#else
- // In WinCE, "FILE *" is actually a HANDLE.
- ::SetFilePointer (fp, 0L, 0L, FILE_BEGIN);
-#endif /* ! ACE_HAS_WINCE */
-}
-
-ACE_INLINE ssize_t
-ACE_OS::readv (ACE_HANDLE handle,
- iovec *iov,
- int iovlen)
-{
- ACE_TRACE ("ACE_OS::readv");
- ACE_OSCALL_RETURN (::readv (handle, iov, iovlen), ssize_t, -1);
-}
-
-ACE_INLINE ssize_t
-ACE_OS::writev (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt)
-{
- ACE_TRACE ("ACE_OS::writev");
- ACE_OSCALL_RETURN (::writev (handle, (ACE_WRITEV_TYPE *) iov, iovcnt), int, -1);
-}
-
-ACE_INLINE ssize_t
-ACE_OS::recvv (ACE_HANDLE handle,
- iovec *buffers,
- int n)
-{
-#if defined (ACE_HAS_WINSOCK2)
-
- DWORD bytes_received = 0;
- int result = 1;
-
- // Winsock 2 has WSARecv and can do this directly, but Winsock 1 needs
- // to do the recvs piece-by-piece.
-
-# if (ACE_HAS_WINSOCK2 != 0)
- DWORD flags = 0;
- result = ::WSARecv ((SOCKET) handle,
- (WSABUF *) buffers,
- n,
- &bytes_received,
- &flags,
- 0,
- 0);
-# else
- int i, chunklen;
- char *chunkp = 0;
-
- // Step through the buffers requested by caller; for each one, cycle
- // through reads until it's filled or an error occurs.
- for (i = 0; i < n && result > 0; i++)
- {
- chunkp = buffers[i].iov_base; // Point to part of chunk being read
- chunklen = buffers[i].iov_len; // Track how much to read to chunk
- while (chunklen > 0 && result > 0)
- {
- result = ::recv ((SOCKET) handle, chunkp, chunklen, 0);
- if (result > 0)
- {
- chunkp += result;
- chunklen -= result;
- bytes_received += result;
- }
- }
- }
-# endif /* ACE_HAS_WINSOCK2 != 0 */
-
- if (result == SOCKET_ERROR)
- {
- ACE_OS::set_errno_to_wsa_last_error ();
- return -1;
- }
- else
- return (ssize_t) bytes_received;
-#else
- return ACE_OS::readv (handle, buffers, n);
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE ssize_t
-ACE_OS::sendv (ACE_HANDLE handle,
- const iovec *buffers,
- int n)
-{
-#if defined (ACE_HAS_WINSOCK2)
- DWORD bytes_sent = 0;
- int result = 0;
-
- // Winsock 2 has WSASend and can do this directly, but Winsock 1 needs
- // to do the sends one-by-one.
-# if (ACE_HAS_WINSOCK2 != 0)
- result = ::WSASend ((SOCKET) handle,
- (WSABUF *) buffers,
- n,
- &bytes_sent,
- 0,
- 0,
- 0);
-# else
- int i;
- for (i = 0; i < n && result != SOCKET_ERROR; i++)
- {
- result = ::send ((SOCKET) handle,
- buffers[i].iov_base,
- buffers[i].iov_len,
- 0);
- bytes_sent += buffers[i].iov_len; // Gets ignored on error anyway
- }
-# endif /* ACE_HAS_WINSOCK2 != 0 */
-
- if (result == SOCKET_ERROR)
- {
- ACE_OS::set_errno_to_wsa_last_error ();
- return -1;
- }
- else
- return (ssize_t) bytes_sent;
-
-#else
- return ACE_OS::writev (handle, buffers, n);
-#endif /* ACE_HAS_WINSOCK2 */
-}
-
-ACE_INLINE int
-ACE_OS::poll (struct pollfd *pollfds, u_long len, ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_OS::poll");
-#if defined (ACE_HAS_POLL)
- int to = timeout == 0 ? -1 : int (timeout->msec ());
- ACE_OSCALL_RETURN (::poll (pollfds, len, to), int, -1);
-#else
- ACE_UNUSED_ARG (timeout);
- ACE_UNUSED_ARG (len);
- ACE_UNUSED_ARG (pollfds);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_POLL */
-}
-
-ACE_INLINE int
-ACE_OS::poll (struct pollfd *pollfds, u_long len, const ACE_Time_Value &timeout)
-{
- ACE_TRACE ("ACE_OS::poll");
-#if defined (ACE_HAS_POLL)
- ACE_OSCALL_RETURN (::poll (pollfds, len, int (timeout.msec ())), int, -1);
-#else
- ACE_UNUSED_ARG (timeout);
- ACE_UNUSED_ARG (len);
- ACE_UNUSED_ARG (pollfds);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_POLL */
-}
-
-ACE_INLINE int
-ACE_OS::t_accept (ACE_HANDLE handle, int reshandle,
- struct t_call *call)
-{
- ACE_TRACE ("ACE_OS::t_accept");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_accept (handle, reshandle, call), int, -1);
-#else
- ACE_UNUSED_ARG (call);
- ACE_UNUSED_ARG (reshandle);
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE char *
-ACE_OS::t_alloc (ACE_HANDLE handle, int struct_type,
- int fields)
-{
- ACE_TRACE ("ACE_OS::t_alloc");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_alloc (handle, struct_type, fields),
- char *, 0);
-#else
- ACE_UNUSED_ARG (fields);
- ACE_UNUSED_ARG (struct_type);
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_bind (ACE_HANDLE handle, struct t_bind *req,
- struct t_bind *ret)
-{
- ACE_TRACE ("ACE_OS::t_bind");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_bind (handle, req, ret), int, -1);
-#else
- ACE_UNUSED_ARG (ret);
- ACE_UNUSED_ARG (req);
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_close (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::t_close");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_close (handle), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_connect(int fildes,
- struct t_call *sndcall,
- struct t_call *rcvcall)
-{
- ACE_TRACE ("ACE_OS::t_connect");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_connect (fildes, sndcall, rcvcall), int, -1);
-#else
- ACE_UNUSED_ARG (fildes);
- ACE_UNUSED_ARG (sndcall);
- ACE_UNUSED_ARG (rcvcall);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE void
-ACE_OS::t_error (const char *errmsg)
-{
- ACE_TRACE ("ACE_OS::t_error");
-#if defined (ACE_HAS_TLI)
-#if defined (ACE_HAS_BROKEN_T_ERROR)
- ::t_error (ACE_const_cast (char *, errmsg));
-#else
- ::t_error (errmsg);
-#endif /* ACE_HAS_BROKEN_T_ERROR */
-#else
- ACE_UNUSED_ARG (errmsg);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_free (char *ptr, int struct_type)
-{
- ACE_TRACE ("ACE_OS::t_free");
-#if defined (ACE_HAS_TLI)
- if (ptr == 0)
- return 0;
- ACE_OSCALL_RETURN (::t_free (ptr, struct_type), int, -1);
-#else
- ACE_UNUSED_ARG (struct_type);
- ACE_UNUSED_ARG (ptr);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_getinfo (ACE_HANDLE handle, struct t_info *info)
-{
- ACE_TRACE ("ACE_OS::t_getinfo");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_getinfo (handle, info), int, -1);
-#else
- ACE_UNUSED_ARG (info);
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_getname (ACE_HANDLE handle,
- struct netbuf *namep,
- int type)
-{
- ACE_TRACE ("ACE_OS::t_getname");
-#if defined (ACE_HAS_SVR4_TLI)
- ACE_OSCALL_RETURN (::t_getname (handle, namep, type), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (namep);
- ACE_UNUSED_ARG (type);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SVR4_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_getstate (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::t_getstate");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_getstate (handle), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_listen (ACE_HANDLE handle, struct t_call *call)
-{
- ACE_TRACE ("ACE_OS::t_listen");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_listen (handle, call), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (call);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_look (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::t_look");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_look (handle), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_open (char *path, int oflag, struct t_info *info)
-{
- ACE_TRACE ("ACE_OS::t_open");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_open (path, oflag, info), int, -1);
-#else
- ACE_UNUSED_ARG (path);
- ACE_UNUSED_ARG (oflag);
- ACE_UNUSED_ARG (info);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_optmgmt (ACE_HANDLE handle,
- struct t_optmgmt *req,
- struct t_optmgmt *ret)
-{
- ACE_TRACE ("ACE_OS::t_optmgmt");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_optmgmt (handle, req, ret), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (req);
- ACE_UNUSED_ARG (ret);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_rcv (ACE_HANDLE handle,
- char *buf,
- unsigned nbytes,
- int *flags)
-{
- ACE_TRACE ("ACE_OS::t_rcv");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_rcv (handle, buf, nbytes, flags),
- int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (nbytes);
- ACE_UNUSED_ARG (flags);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_rcvdis (ACE_HANDLE handle, struct t_discon *discon)
-{
- ACE_TRACE ("ACE_OS::t_rcvdis");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_rcvdis (handle, discon), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (discon);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_rcvrel (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::t_rcvrel");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_rcvrel (handle), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_rcvudata (ACE_HANDLE handle,
- struct t_unitdata *unitdata,
- int *flags)
-{
- ACE_TRACE ("ACE_OS::t_rcvudata");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_rcvudata (handle, unitdata, flags),
- int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (unitdata);
- ACE_UNUSED_ARG (flags);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_rcvuderr (ACE_HANDLE handle, struct t_uderr *uderr)
-{
- ACE_TRACE ("ACE_OS::t_rcvuderr");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_rcvuderr (handle, uderr), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (uderr);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_snd (ACE_HANDLE handle, const char *buf, unsigned nbytes, int flags)
-{
- ACE_TRACE ("ACE_OS::t_snd");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_snd (handle, (char *) buf, nbytes, flags), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (nbytes);
- ACE_UNUSED_ARG (flags);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_snddis (ACE_HANDLE handle, struct t_call *call)
-{
- ACE_TRACE ("ACE_OS::t_snddis");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_snddis (handle, call), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (call);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_sndrel (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::t_sndrel");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_sndrel (handle), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_sync (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::t_sync");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_sync (handle), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE int
-ACE_OS::t_unbind (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::t_unbind");
-#if defined (ACE_HAS_TLI)
- ACE_OSCALL_RETURN (::t_unbind (handle), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TLI */
-}
-
-ACE_INLINE char *
-ACE_OS::compile (const char *instring, char *expbuf, char *endbuf)
-{
- ACE_TRACE ("ACE_OS::compile");
-#if defined (ACE_HAS_REGEX)
- ACE_OSCALL_RETURN (::compile (instring, expbuf, endbuf), char *, 0);
-#else
- ACE_UNUSED_ARG (instring);
- ACE_UNUSED_ARG (expbuf);
- ACE_UNUSED_ARG (endbuf);
-
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_REGEX */
-}
-
-ACE_INLINE long
-ACE_OS::filesize (const ACE_TCHAR *filename)
-{
- ACE_TRACE ("ACE_OS::filesize");
-
- ACE_HANDLE h = ACE_OS::open (filename, O_RDONLY);
- if (h != ACE_INVALID_HANDLE)
- {
- long size = ACE_OS::filesize (h);
- ACE_OS::close (h);
- return size;
- }
- else
- return -1;
-}
-
-ACE_INLINE int
-ACE_OS::closesocket (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::close");
-#if defined (ACE_WIN32)
- ACE_SOCKCALL_RETURN (::closesocket ((SOCKET) handle), int, -1);
-#elif defined (ACE_PSOS_DIAB_PPC)
- ACE_OSCALL_RETURN (::pna_close (handle), int, -1);
-#else
- ACE_OSCALL_RETURN (::close (handle), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::access (const ACE_TCHAR *path, int amode)
-{
- ACE_TRACE ("ACE_OS::access");
-#if defined (ACE_LACKS_ACCESS)
- ACE_UNUSED_ARG (path);
- ACE_UNUSED_ARG (amode);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_HAS_WINCE)
- // @@ WINCE: There should be a Win32 API that can do this.
- // Hard coded read access here.
- FILE* handle = ACE_OS::fopen (path, ACE_TEXT ("r"));
- ACE_UNUSED_ARG (amode);
-
- ACE_OS::fclose (handle);
- return (handle == ACE_INVALID_HANDLE ? -1 : 0);
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_waccess (path, amode), int, -1);
-#else
- ACE_OSCALL_RETURN (::access (path, amode), int, -1);
-#endif /* ACE_LACKS_ACCESS */
-}
-
-
-ACE_INLINE ACE_HANDLE
-ACE_OS::creat (const ACE_TCHAR *filename, mode_t mode)
-{
- ACE_TRACE ("ACE_OS::creat");
-#if defined (ACE_WIN32)
- return ACE_OS::open (filename, mode);
-#elif defined(ACE_PSOS)
- ACE_OSCALL_RETURN(::create_f((char *)filename, 1024,
- S_IRUSR | S_IWUSR | S_IXUSR),
- ACE_HANDLE, ACE_INVALID_HANDLE);
-#elif defined(ACE_PSOS_TM)
- ACE_UNUSED_ARG (filename);
- ACE_UNUSED_ARG (mode);
- ACE_NOTSUP_RETURN (-1);
-#elif defined(ACE_PSOS)
- ACE_UNUSED_ARG (filename);
- ACE_UNUSED_ARG (mode);
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_OSCALL_RETURN (::creat (filename, mode),
- ACE_HANDLE, ACE_INVALID_HANDLE);
-#endif /* ACE_WIN32 */
-}
-
-#if !defined (ACE_WIN32) && !defined (VXWORKS) && !defined (CHORUS) && !defined (ACE_PSOS)
-// Don't inline on those platforms because this function contains
-// string literals, and some compilers, e.g., g++, don't handle those
-// efficiently in unused inline functions.
-ACE_INLINE int
-ACE_OS::uname (struct utsname *name)
-{
- ACE_TRACE ("ACE_OS::uname");
- ACE_OSCALL_RETURN (::uname (name), int, -1);
-}
-#endif /* ! ACE_WIN32 && ! VXWORKS && ! CHORUS */
-
-ACE_INLINE int
-ACE_OS::hostname (ACE_TCHAR name[], size_t maxnamelen)
-{
- ACE_TRACE ("ACE_OS::hostname");
-#if defined (ACE_HAS_WINCE)
- // @@ WINCE: Don't know how to implement this (yet.) Can probably get around
- // this by peeking into the Register set.
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (maxnamelen);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_HAS_PHARLAP)
- // PharLap only can do net stuff with the RT version.
-# if defined (ACE_HAS_PHARLAP_RT)
- // @@This is not at all reliable... requires ethernet and BOOTP to be used.
- // A more reliable way is to go thru the devices w/ EtsTCPGetDeviceCfg until
- // a legit IP address is found, then get its name w/ gethostbyaddr.
- ACE_SOCKCALL_RETURN (gethostname (name, maxnamelen), int, SOCKET_ERROR);
-# else
- ACE_UNUSED_ARG (name);
- ACE_UNUSED_ARG (maxnamelen);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_PHARLAP_RT */
-#elif defined (ACE_WIN32)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (ACE_TEXT_GetComputerName (name,
- LPDWORD (&maxnamelen)),
- ace_result_), int, -1);
-#elif defined (VXWORKS)
- ACE_OSCALL_RETURN (::gethostname (name, maxnamelen), int, -1);
-#elif defined (CHORUS)
- if (::gethostname (name, maxnamelen) == -1)
- return -1;
- else
- {
- if (ACE_OS::strlen (name) == 0)
- {
- // Try the HOST environment variable.
- ACE_TCHAR *const hostenv = ::getenv (ACE_TEXT ("HOST"));
- if (hostenv)
- ACE_OS::strncpy (name, hostenv, maxnamelen);
- }
- return 0;
- }
-#else /* ACE_HAS_WINCE */
- struct utsname host_info;
-
- if (ACE_OS::uname (&host_info) == -1)
- return -1;
- else
- {
- ACE_OS::strncpy (name, host_info.nodename, maxnamelen);
- return 0;
- }
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::msgctl (int msqid, int cmd, struct msqid_ds *val)
-{
- ACE_TRACE ("ACE_OS::msgctl");
-#if defined (ACE_HAS_SYSV_IPC)
- ACE_OSCALL_RETURN (::msgctl (msqid, cmd, val), int, -1);
-#else
- ACE_UNUSED_ARG (msqid);
- ACE_UNUSED_ARG (cmd);
- ACE_UNUSED_ARG (val);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE int
-ACE_OS::msgget (key_t key, int msgflg)
-{
- ACE_TRACE ("ACE_OS::msgget");
-#if defined (ACE_HAS_SYSV_IPC)
- ACE_OSCALL_RETURN (::msgget (key, msgflg), int, -1);
-#else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (msgflg);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE int
-ACE_OS::msgrcv (int int_id, void *buf, size_t len,
- long type, int flags)
-{
- ACE_TRACE ("ACE_OS::msgrcv");
-#if defined (ACE_HAS_SYSV_IPC)
-# if defined (ACE_LACKS_POSIX_PROTOTYPES) || defined (ACE_LACKS_SOME_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::msgrcv (int_id, (msgbuf *) buf, len, type, flags),
- int, -1);
-# else
- ACE_OSCALL_RETURN (::msgrcv (int_id, buf, len, type, flags),
- int, -1);
-# endif /* ACE_LACKS_POSIX_PROTOTYPES */
-#else
- ACE_UNUSED_ARG (int_id);
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (len);
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (flags);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE int
-ACE_OS::msgsnd (int int_id, const void *buf, size_t len, int flags)
-{
- ACE_TRACE ("ACE_OS::msgsnd");
-#if defined (ACE_HAS_SYSV_IPC)
-# if defined (ACE_HAS_NONCONST_MSGSND)
- ACE_OSCALL_RETURN (::msgsnd (int_id, (void *) buf, len, flags), int, -1);
-# elif defined (ACE_LACKS_POSIX_PROTOTYPES) || defined (ACE_LACKS_SOME_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::msgsnd (int_id, (msgbuf *) buf, len, flags), int, -1);
-# else
- ACE_OSCALL_RETURN (::msgsnd (int_id, buf, len, flags), int, -1);
-# endif /* ACE_LACKS_POSIX_PROTOTYPES || ACE_HAS_NONCONST_MSGSND */
-#else
- ACE_UNUSED_ARG (int_id);
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (len);
- ACE_UNUSED_ARG (flags);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE u_int
-ACE_OS::alarm (u_int secs)
-{
- ACE_TRACE ("ACE_OS::alarm");
-
-#if defined (ACE_WIN32) || defined (VXWORKS) || defined (CHORUS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (secs);
-
- ACE_NOTSUP_RETURN (0);
-#else
- return ::alarm (secs);
-#endif /* ACE_WIN32 || VXWORKS || CHORUS */
-}
-
-ACE_INLINE u_int
-ACE_OS::ualarm (u_int usecs, u_int interval)
-{
- ACE_TRACE ("ACE_OS::ualarm");
-
-#if defined (ACE_HAS_UALARM)
- return ::ualarm (usecs, interval);
-#elif !defined (ACE_LACKS_UNIX_SIGNALS)
- ACE_UNUSED_ARG (interval);
- return ::alarm (usecs * ACE_ONE_SECOND_IN_USECS);
-#else
- ACE_UNUSED_ARG (usecs);
- ACE_UNUSED_ARG (interval);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_UALARM */
-}
-
-ACE_INLINE u_int
-ACE_OS::ualarm (const ACE_Time_Value &tv,
- const ACE_Time_Value &tv_interval)
-{
- ACE_TRACE ("ACE_OS::ualarm");
-
-#if defined (ACE_HAS_UALARM)
- u_int usecs = (tv.sec () * ACE_ONE_SECOND_IN_USECS) + tv.usec ();
- u_int interval = (tv_interval.sec () * ACE_ONE_SECOND_IN_USECS) + tv_interval.usec ();
- return ::ualarm (usecs, interval);
-#elif !defined (ACE_LACKS_UNIX_SIGNALS)
- ACE_UNUSED_ARG (tv_interval);
- return ::alarm (tv.sec ());
-#else
- ACE_UNUSED_ARG (tv_interval);
- ACE_UNUSED_ARG (tv);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_UALARM */
-}
-
-ACE_INLINE int
-ACE_OS::dlclose (ACE_SHLIB_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::dlclose");
-#if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
-
-# if !defined (ACE_HAS_AUTOMATIC_INIT_FINI)
- // SunOS4 does not automatically call _fini()!
- void *ptr;
-
- ACE_OSCALL (::dlsym (handle, ACE_TEXT ("_fini")), void *, 0, ptr);
-
- if (ptr != 0)
- (*((int (*)(void)) ptr)) (); // Call _fini hook explicitly.
-# endif /* ACE_HAS_AUTOMATIC_INIT_FINI */
-#if defined (_M_UNIX)
- ACE_OSCALL_RETURN (::_dlclose (handle), int, -1);
-#else /* _MUNIX */
- ACE_OSCALL_RETURN (::dlclose (handle), int, -1);
-#endif /* _M_UNIX */
-#elif defined (ACE_WIN32)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::FreeLibrary (handle), ace_result_), int, -1);
-#elif defined (__hpux)
- // HP-UX 10.x and 32-bit 11.00 do not pay attention to the ref count
- // when unloading a dynamic lib. So, if the ref count is more than
- // 1, do not unload the lib. This will cause a library loaded more
- // than once to not be unloaded until the process runs down, but
- // that's life. It's better than unloading a library that's in use.
- // So far as I know, there's no way to decrement the refcnt that the
- // kernel is looking at - the shl_descriptor is a copy of what the
- // kernel has, not the actual struct. On 64-bit HP-UX using dlopen,
- // this problem has been fixed.
- struct shl_descriptor desc;
- if (shl_gethandle_r (handle, &desc) == -1)
- return -1;
- if (desc.ref_count > 1)
- return 0;
-# if defined(__GNUC__) || __cplusplus >= 199707L
- ACE_OSCALL_RETURN (::shl_unload (handle), int, -1);
-# else
- ACE_OSCALL_RETURN (::cxxshl_unload (handle), int, -1);
-# endif /* aC++ vs. Hp C++ */
-#else
- ACE_UNUSED_ARG (handle);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
-}
-
-ACE_INLINE ACE_TCHAR *
-ACE_OS::dlerror (void)
-{
- ACE_TRACE ("ACE_OS::dlerror");
-# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
-#if defined(_M_UNIX)
- ACE_OSCALL_RETURN ((char *)::_dlerror (), char *, 0);
-#else /* _M_UNIX */
- ACE_OSCALL_RETURN ((char *)::dlerror (), char *, 0);
-#endif /* _M_UNIX */
-# elif defined (__hpux)
- ACE_OSCALL_RETURN (::strerror(errno), char *, 0);
-# elif defined (ACE_WIN32)
- static ACE_TCHAR buf[128];
-# if defined (ACE_HAS_PHARLAP)
- ACE_OS::sprintf (buf, "error code %d", GetLastError());
-# else
- ACE_TEXT_FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- ::GetLastError (),
- 0,
- buf,
- sizeof buf / sizeof buf[0],
- NULL);
-# endif /* ACE_HAS_PHARLAP */
- return buf;
-# else
- ACE_NOTSUP_RETURN (0);
-# endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
-}
-
-ACE_INLINE ACE_SHLIB_HANDLE
-ACE_OS::dlopen (const ACE_TCHAR *fname,
- int mode)
-{
- ACE_TRACE ("ACE_OS::dlopen");
-
- // Get the correct OS type.
- ACE_DL_TYPE filename = ACE_const_cast (ACE_DL_TYPE, fname);
-
-# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
- void *handle;
-# if defined (ACE_HAS_SGIDLADD)
- ACE_OSCALL (::sgidladd (filename, mode), void *, 0, handle);
-# elif defined (_M_UNIX)
- ACE_OSCALL (::_dlopen (filename, mode), void *, 0, handle);
-# else
- ACE_OSCALL (::dlopen (filename, mode), void *, 0, handle);
-# endif /* ACE_HAS_SGIDLADD */
-# if !defined (ACE_HAS_AUTOMATIC_INIT_FINI)
- if (handle != 0)
- {
- void *ptr;
- // Some systems (e.g., SunOS4) do not automatically call _init(), so
- // we'll have to call it manually.
-
- ACE_OSCALL (::dlsym (handle, ACE_TEXT ("_init")), void *, 0, ptr);
-
- if (ptr != 0 && (*((int (*)(void)) ptr)) () == -1) // Call _init hook explicitly.
- {
- // Close down the handle to prevent leaks.
- ::dlclose (handle);
- return 0;
- }
- }
-# endif /* ACE_HAS_AUTOMATIC_INIT_FINI */
- return handle;
-# elif defined (ACE_WIN32)
- ACE_UNUSED_ARG (mode);
-
- ACE_WIN32CALL_RETURN (ACE_TEXT_LoadLibrary (filename), ACE_SHLIB_HANDLE, 0);
-# elif defined (__hpux)
-
-# if defined(__GNUC__) || __cplusplus >= 199707L
- ACE_OSCALL_RETURN (::shl_load(filename, mode, 0L), ACE_SHLIB_HANDLE, 0);
-# else
- ACE_OSCALL_RETURN (::cxxshl_load(filename, mode, 0L), ACE_SHLIB_HANDLE, 0);
-# endif /* aC++ vs. Hp C++ */
-
-# else
- ACE_UNUSED_ARG (filename);
- ACE_UNUSED_ARG (mode);
- ACE_NOTSUP_RETURN (0);
-# endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
-}
-
-ACE_INLINE void *
-ACE_OS::dlsym (ACE_SHLIB_HANDLE handle,
- const ACE_TCHAR *sname)
-{
- ACE_TRACE ("ACE_OS::dlsym");
-
- // Get the correct OS type.
-#if defined (ACE_HAS_WINCE)
- const wchar_t *symbolname = sname;
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- char *symbolname = ACE_TEXT_ALWAYS_CHAR (sname);
-#elif defined (ACE_HAS_CHARPTR_DL)
- char *symbolname = ACE_const_cast (char *, sname);
-#else
- const char *symbolname = sname;
-#endif /* ACE_HAS_CHARPTR_DL */
-
-# if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
-
-# if defined (ACE_LACKS_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::dlsym (handle, symbolname), void *, 0);
-# elif defined (ACE_USES_ASM_SYMBOL_IN_DLSYM)
- int l = ACE_OS::strlen (symbolname) + 2;
- char *asm_symbolname = 0;
- ACE_NEW_RETURN (asm_symbolname, char[l], 0);
- ACE_OS::strcpy (asm_symbolname, "_") ;
- ACE_OS::strcpy (asm_symbolname + 1, symbolname) ;
- void *ace_result;
- ACE_OSCALL (::dlsym (handle, asm_symbolname), void *, 0, ace_result);
- delete [] asm_symbolname;
- return ace_result;
-# elif defined (_M_UNIX)
- ACE_OSCALL_RETURN (::_dlsym (handle, symbolname), void *, 0);
-# else
- ACE_OSCALL_RETURN (::dlsym (handle, symbolname), void *, 0);
-# endif /* ACE_LACKS_POSIX_PROTOTYPES */
-
-# elif defined (ACE_WIN32)
-
- ACE_WIN32CALL_RETURN (::GetProcAddress (handle, symbolname), void *, 0);
-
-# elif defined (__hpux)
-
- void *value;
- int status;
- shl_t _handle = handle;
- ACE_OSCALL (::shl_findsym(&_handle, symbolname, TYPE_UNDEFINED, &value), int, -1, status);
- return status == 0 ? value : NULL;
-
-# else
-
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (symbolname);
- ACE_NOTSUP_RETURN (0);
-
-# endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
-}
-
-ACE_INLINE int
-ACE_OS::step (const char *str, char *expbuf)
-{
- ACE_TRACE ("ACE_OS::step");
-#if defined (ACE_HAS_REGEX)
- ACE_OSCALL_RETURN (::step (str, expbuf), int, -1);
-#else
- ACE_UNUSED_ARG (str);
- ACE_UNUSED_ARG (expbuf);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_REGEX */
-}
-
-ACE_INLINE long
-ACE_OS::sysinfo (int cmd, char *buf, long count)
-{
- ACE_TRACE ("ACE_OS::sysinfo");
-#if defined (ACE_HAS_SYSINFO)
- ACE_OSCALL_RETURN (::sysinfo (cmd, buf, count), long, -1);
-#else
- ACE_UNUSED_ARG (cmd);
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (count);
-
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_SYSINFO */
-}
-
-ACE_INLINE ssize_t
-ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte)
-{
- ACE_TRACE ("ACE_OS::write");
-#if defined (ACE_WIN32)
- DWORD bytes_written; // This is set to 0 byte WriteFile.
-
- if (::WriteFile (handle, buf, nbyte, &bytes_written, 0))
- return (ssize_t) bytes_written;
- else
- ACE_FAIL_RETURN (-1);
-#elif defined (ACE_PSOS)
-# if defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (nbyte);
- ACE_NOTSUP_RETURN (-1);
-# else
- if(::write_f(handle, (void *) buf, nbyte) == 0)
- return (ssize_t) nbyte;
- else
- return -1;
-# endif /* defined (ACE_PSOS_LACKS_PHILE) */
-#else
-# if defined (ACE_LACKS_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::write (handle, (const char *) buf, nbyte), ssize_t, -1);
-# elif defined (ACE_PSOS)
- ACE_OSCALL_RETURN (::write_f(handle, (void *) buf, nbyte), ssize_t, -1);
-# elif defined (ACE_HAS_CHARPTR_SOCKOPT)
- ACE_OSCALL_RETURN (::write (handle, (char *) buf, nbyte), ssize_t, -1);
-# else
- ACE_OSCALL_RETURN (::write (handle, buf, nbyte), ssize_t, -1);
-# endif /* ACE_LACKS_POSIX_PROTOTYPES */
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE ssize_t
-ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte,
- ACE_OVERLAPPED *overlapped)
-{
- ACE_TRACE ("ACE_OS::write");
- overlapped = overlapped;
-#if defined (ACE_WIN32)
- DWORD bytes_written; // This is set to 0 byte WriteFile.
-
- if (::WriteFile (handle, buf, nbyte, &bytes_written, overlapped))
- return (ssize_t) bytes_written;
- else
- return -1;
-#else
- return ACE_OS::write (handle, buf, nbyte);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE ssize_t
-ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len)
-{
- ACE_TRACE ("ACE_OS::read");
-#if defined (ACE_WIN32)
- DWORD ok_len;
- if (::ReadFile (handle, buf, len, &ok_len, 0))
- return (ssize_t) ok_len;
- else
- ACE_FAIL_RETURN (-1);
-#elif defined (ACE_PSOS)
-# if defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (len);
- ACE_NOTSUP_RETURN (-1);
-# else
- unsigned long count, result;
- result = ::read_f (handle, buf, len, &count);
- if (result != 0)
- {
- return ACE_static_cast (ssize_t, -1);
- }
- else
- {
- return ACE_static_cast (ssize_t,
- (count = len ? count : 0));
- }
-# endif /* defined (ACE_PSOS_LACKS_PHILE */
-#else
-
- int result;
-
-# if defined (ACE_LACKS_POSIX_PROTOTYPES) || defined (ACE_HAS_CHARPTR_SOCKOPT)
- ACE_OSCALL (::read (handle, (char *) buf, len), ssize_t, -1, result);
-# else
- ACE_OSCALL (::read (handle, buf, len), ssize_t, -1, result);
-# endif /* ACE_LACKS_POSIX_PROTOTYPES */
- if (result == -1 && errno == EAGAIN)
- errno = EWOULDBLOCK;
- return result;
-
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE ssize_t
-ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len,
- ACE_OVERLAPPED *overlapped)
-{
- ACE_TRACE ("ACE_OS::read");
- overlapped = overlapped;
-#if defined (ACE_WIN32)
- DWORD ok_len;
- return ::ReadFile (handle, buf, len, &ok_len, overlapped) ? (ssize_t) ok_len : -1;
-#else
- return ACE_OS::read (handle, buf, len);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::readlink (const char *path, char *buf, size_t bufsiz)
-{
- ACE_TRACE ("ACE_OS::readlink");
-# if defined (ACE_LACKS_READLINK) || \
- defined (ACE_HAS_WINCE) || defined (ACE_WIN32)
- ACE_UNUSED_ARG (path);
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (bufsiz);
- ACE_NOTSUP_RETURN (-1);
-# else
-# if !defined(ACE_HAS_NONCONST_READLINK)
- ACE_OSCALL_RETURN (::readlink (path, buf, bufsiz), int, -1);
-# else
- ACE_OSCALL_RETURN (::readlink ((char *)path, buf, bufsiz), int, -1);
-# endif
-# endif /* ACE_LACKS_READLINK */
-}
-
-ACE_INLINE int
-ACE_OS::getmsg (ACE_HANDLE handle,
- struct strbuf *ctl,
- struct strbuf *data,
- int *flags)
-{
- ACE_TRACE ("ACE_OS::getmsg");
-#if defined (ACE_HAS_STREAM_PIPES)
- ACE_OSCALL_RETURN (::getmsg (handle, ctl, data, flags), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (ctl);
- ACE_UNUSED_ARG (data);
- ACE_UNUSED_ARG (flags);
-
- // I'm not sure how to implement this correctly.
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-ACE_INLINE int
-ACE_OS::getpmsg (ACE_HANDLE handle,
- struct strbuf *ctl,
- struct strbuf *data,
- int *band,
- int *flags)
-{
- ACE_TRACE ("ACE_OS::getpmsg");
-#if defined (ACE_HAS_STREAM_PIPES)
- ACE_OSCALL_RETURN (::getpmsg (handle, ctl, data, band, flags), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (ctl);
- ACE_UNUSED_ARG (data);
- ACE_UNUSED_ARG (band);
- ACE_UNUSED_ARG (flags);
-
- // I'm not sure how to implement this correctly.
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-ACE_INLINE int
-ACE_OS::getrusage (int who, struct rusage *ru)
-{
- ACE_TRACE ("ACE_OS::getrusage");
-
-#if defined (ACE_HAS_SYSCALL_GETRUSAGE)
- // This nonsense is necessary for HP/UX...
- ACE_OSCALL_RETURN (::syscall (SYS_GETRUSAGE, who, ru), int, -1);
-#elif defined (ACE_HAS_GETRUSAGE)
-# if defined (ACE_WIN32)
- ACE_UNUSED_ARG (who);
-
- FILETIME dummy_1;
- FILETIME dummy_2;
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::GetProcessTimes (::GetCurrentProcess(),
- &dummy_1, // start
- &dummy_2, // exited
- &ru->ru_stime,
- &ru->ru_utime),
- ace_result_),
- int, -1);
-# else
-# if defined (ACE_HAS_RUSAGE_WHO_ENUM)
- ACE_OSCALL_RETURN (::getrusage ((ACE_HAS_RUSAGE_WHO_ENUM) who, ru), int, -1);
-# else
- ACE_OSCALL_RETURN (::getrusage (who, ru), int, -1);
-# endif /* ACE_HAS_RUSAGE_WHO_ENUM */
-# endif /* ACE_WIN32 */
-#else
- who = who;
- ru = ru;
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSCALL_GETRUSAGE */
-}
-
-ACE_INLINE int
-ACE_OS::isastream (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::isastream");
-#if defined (ACE_HAS_STREAM_PIPES)
- ACE_OSCALL_RETURN (::isastream (handle), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-// Implements simple read/write control for pages. Affects a page if
-// part of the page is referenced. Currently PROT_READ, PROT_WRITE,
-// and PROT_RDWR has been mapped in OS.h. This needn't have anything
-// to do with a mmap region.
-
-ACE_INLINE int
-ACE_OS::mprotect (void *addr, size_t len, int prot)
-{
- ACE_TRACE ("ACE_OS::mprotect");
-#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP)
- DWORD dummy; // Sigh!
- return ::VirtualProtect(addr, len, prot, &dummy) ? 0 : -1;
-#elif !defined (ACE_LACKS_MPROTECT)
- ACE_OSCALL_RETURN (::mprotect ((ACE_MMAP_TYPE) addr, len, prot), int, -1);
-#else
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (len);
- ACE_UNUSED_ARG (prot);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::msync (void *addr, size_t len, int sync)
-{
- ACE_TRACE ("ACE_OS::msync");
-#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP)
- ACE_UNUSED_ARG (sync);
-
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::FlushViewOfFile (addr, len), ace_result_), int, -1);
-#elif !defined (ACE_LACKS_MSYNC)
-# if !defined (ACE_HAS_BROKEN_NETBSD_MSYNC)
- ACE_OSCALL_RETURN (::msync ((ACE_MMAP_TYPE) addr, len, sync), int, -1);
-# else
- ACE_OSCALL_RETURN (::msync ((ACE_MMAP_TYPE) addr, len), int, -1);
- ACE_UNUSED_ARG (sync);
-# endif /* ACE_HAS_BROKEN_NETBSD_MSYNC */
-#else
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (len);
- ACE_UNUSED_ARG (sync);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::munmap (void *addr, size_t len)
-{
- ACE_TRACE ("ACE_OS::munmap");
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG (len);
-
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::UnmapViewOfFile (addr), ace_result_), int, -1);
-#elif !defined (ACE_LACKS_MMAP)
- ACE_OSCALL_RETURN (::munmap ((ACE_MMAP_TYPE) addr, len), int, -1);
-#else
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (len);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::madvise (caddr_t addr, size_t len, int advice)
-{
- ACE_TRACE ("ACE_OS::madvise");
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (len);
- ACE_UNUSED_ARG (advice);
-
- ACE_NOTSUP_RETURN (-1);
-#elif !defined (ACE_LACKS_MADVISE)
- ACE_OSCALL_RETURN (::madvise (addr, len, advice), int, -1);
-#else
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (len);
- ACE_UNUSED_ARG (advice);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::putmsg (ACE_HANDLE handle, const struct strbuf *ctl,
- const struct strbuf *data, int flags)
-{
- ACE_TRACE ("ACE_OS::putmsg");
-#if defined (ACE_HAS_STREAM_PIPES)
- ACE_OSCALL_RETURN (::putmsg (handle,
- (ACE_STRBUF_TYPE) ctl,
- (ACE_STRBUF_TYPE) data,
- flags), int, -1);
-#else
- ACE_UNUSED_ARG (flags);
- if (ctl == 0 && data == 0)
- {
- errno = EINVAL;
- return 0;
- }
- // Handle the two easy cases.
- else if (ctl != 0)
- return ACE_OS::write (handle, ctl->buf, ctl->len);
- else if (data != 0)
- return ACE_OS::write (handle, data->buf, data->len);
- else
- {
- // This is the hard case.
- char *buf;
- ACE_NEW_RETURN (buf, char [ctl->len + data->len], -1);
- ACE_OS::memcpy (buf, ctl->buf, ctl->len);
- ACE_OS::memcpy (buf + ctl->len, data->buf, data->len);
- int result = ACE_OS::write (handle, buf, ctl->len + data->len);
- delete [] buf;
- return result;
- }
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-ACE_INLINE int
-ACE_OS::putpmsg (ACE_HANDLE handle,
- const struct strbuf *ctl,
- const struct strbuf *data,
- int band,
- int flags)
-{
- ACE_TRACE ("ACE_OS::putpmsg");
-#if defined (ACE_HAS_STREAM_PIPES)
- ACE_OSCALL_RETURN (::putpmsg (handle,
- (ACE_STRBUF_TYPE) ctl,
- (ACE_STRBUF_TYPE) data,
- band, flags), int, -1);
-#else
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (band);
- return ACE_OS::putmsg (handle, ctl, data, flags);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-ACE_INLINE int
-ACE_OS::semctl (int int_id, int semnum, int cmd, semun value)
-{
- ACE_TRACE ("ACE_OS::semctl");
-#if defined (ACE_HAS_SYSV_IPC)
- ACE_OSCALL_RETURN (::semctl (int_id, semnum, cmd, value), int, -1);
-#else
- ACE_UNUSED_ARG (int_id);
- ACE_UNUSED_ARG (semnum);
- ACE_UNUSED_ARG (cmd);
- ACE_UNUSED_ARG (value);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE int
-ACE_OS::semget (key_t key, int nsems, int flags)
-{
- ACE_TRACE ("ACE_OS::semget");
-#if defined (ACE_HAS_SYSV_IPC)
- ACE_OSCALL_RETURN (::semget (key, nsems, flags), int, -1);
-#else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (nsems);
- ACE_UNUSED_ARG (flags);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE int
-ACE_OS::semop (int int_id, struct sembuf *sops, size_t nsops)
-{
- ACE_TRACE ("ACE_OS::semop");
-#if defined (ACE_HAS_SYSV_IPC)
- ACE_OSCALL_RETURN (::semop (int_id, sops, nsops), int, -1);
-#else
- ACE_UNUSED_ARG (int_id);
- ACE_UNUSED_ARG (sops);
- ACE_UNUSED_ARG (nsops);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE void *
-ACE_OS::shmat (int int_id, void *shmaddr, int shmflg)
-{
- ACE_TRACE ("ACE_OS::shmat");
-#if defined (ACE_HAS_SYSV_IPC)
-# if defined (ACE_LACKS_POSIX_PROTOTYPES) || defined (ACE_LACKS_SOME_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::shmat (int_id, (char *)shmaddr, shmflg), void *, (void *) -1);
-# else
- ACE_OSCALL_RETURN (::shmat (int_id, shmaddr, shmflg), void *, (void *) -1);
-# endif /* ACE_LACKS_POSIX_PROTOTYPES */
-#else
- ACE_UNUSED_ARG (int_id);
- ACE_UNUSED_ARG (shmaddr);
- ACE_UNUSED_ARG (shmflg);
-
- ACE_NOTSUP_RETURN ((void *) -1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE int
-ACE_OS::shmctl (int int_id, int cmd, struct shmid_ds *buf)
-{
- ACE_TRACE ("ACE_OS::shmctl");
-#if defined (ACE_HAS_SYSV_IPC)
- ACE_OSCALL_RETURN (::shmctl (int_id, cmd, buf), int, -1);
-#else
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (cmd);
- ACE_UNUSED_ARG (int_id);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE int
-ACE_OS::shmdt (void *shmaddr)
-{
- ACE_TRACE ("ACE_OS::shmdt");
-#if defined (ACE_HAS_SYSV_IPC)
- ACE_OSCALL_RETURN (::shmdt ((char *) shmaddr), int, -1);
-#else
- ACE_UNUSED_ARG (shmaddr);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE int
-ACE_OS::shmget (key_t key, int size, int flags)
-{
- ACE_TRACE ("ACE_OS::shmget");
-#if defined (ACE_HAS_SYSV_IPC)
- ACE_OSCALL_RETURN (::shmget (key, size, flags), int, -1);
-#else
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (size);
- ACE_UNUSED_ARG (key);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SYSV_IPC */
-}
-
-ACE_INLINE void
-ACE_OS::tzset (void)
-{
-# if !defined (ACE_HAS_WINCE) && !defined (VXWORKS) && !defined (ACE_PSOS)
-# if defined (ACE_WIN32)
- ::_tzset (); // For Win32.
-# else
- ::tzset (); // For UNIX platforms.
-# endif /* ACE_WIN32 */
-# else
- errno = ENOTSUP;
-# endif /* !ACE_HAS_WINCE && !VXWORKS && !ACE_PSOS */
-}
-
-ACE_INLINE long
-ACE_OS::timezone (void)
-{
-# if !defined (ACE_HAS_WINCE) && !defined (VXWORKS) && !defined (ACE_PSOS) \
-&& !defined (CHORUS)
-# if defined (ACE_WIN32)
- return _timezone; // For Win32.
-# elif defined (__Lynx__) || defined (__FreeBSD__) || defined (ACE_HAS_SUNOS4_GETTIMEOFDAY)
- long result = 0;
- struct timeval time;
- struct timezone zone;
- ACE_UNUSED_ARG (result);
- ACE_OSCALL (::gettimeofday (&time, &zone), int, -1, result);
- return zone.tz_minuteswest * 60;
-# else
- return ::timezone; // For UNIX platforms.
-# endif
-# else
- ACE_NOTSUP_RETURN (0);
-# endif /* !ACE_HAS_WINCE && !VXWORKS && !ACE_PSOS */
-}
-
-#if !defined (ACE_LACKS_DIFFTIME)
-ACE_INLINE double
-ACE_OS::difftime (time_t t1, time_t t0)
-{
-#if defined (ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME)
- // simulate difftime ; just subtracting ; ACE_PSOS case
- return ((double)t1) - ((double)t0);
-#else
-# if defined (ACE_DIFFTIME)
- return ACE_DIFFTIME (t1, t0);
-# else
- return ::difftime (t1, t0);
-# endif /* ACE_DIFFTIME && ! ACE_PSOS_HAS_TIME */
-#endif // ACE_PSOS
-}
-#endif /* ! ACE_LACKS_DIFFTIME */
-
-ACE_INLINE ACE_TCHAR *
-ACE_OS::ctime (const time_t *t)
-{
- ACE_TRACE ("ACE_OS::ctime");
-#if defined (ACE_HAS_BROKEN_CTIME)
- ACE_OSCALL_RETURN (::asctime (::localtime (t)), char *, 0);
-#elif defined(ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME)
- return "ctime-return";
-#elif defined (ACE_HAS_WINCE)
- ACE_TCHAR buf[26]; // 26 is a "magic number" ;)
- return ACE_OS::ctime_r (t, buf, 26);
-#elif defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wctime (t), wchar_t *, 0);
-#else
- ACE_OSCALL_RETURN (::ctime (t), char *, 0);
-# endif /* ACE_HAS_BROKEN_CTIME) */
-}
-
-#if !defined (ACE_HAS_WINCE) /* CE version in OS.cpp */
-ACE_INLINE ACE_TCHAR *
-ACE_OS::ctime_r (const time_t *t, ACE_TCHAR *buf, int buflen)
-{
- ACE_TRACE ("ACE_OS::ctime_r");
-# if defined (ACE_HAS_REENTRANT_FUNCTIONS)
-# if defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R)
- ACE_TCHAR *result;
-# if defined (DIGITAL_UNIX)
- ACE_OSCALL (::_Pctime_r (t, buf), ACE_TCHAR *, 0, result);
-# else /* DIGITAL_UNIX */
- ACE_OSCALL (::ctime_r (t, buf), ACE_TCHAR *, 0, result);
-# endif /* DIGITAL_UNIX */
- if (result != 0)
- ::strncpy (buf, result, buflen);
- return buf;
-# else /* ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R */
-
-# if defined (ACE_CTIME_R_RETURNS_INT)
- return (::ctime_r (t, buf, buflen) == -1 ? 0 : buf);
-# else /* ACE_CTIME_R_RETURNS_INT */
- ACE_OSCALL_RETURN (::ctime_r (t, buf, buflen), ACE_TCHAR *, 0);
-# endif /* ACE_CTIME_R_RETURNS_INT */
-
-# endif /* ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R */
-# else /* ACE_HAS_REENTRANT_FUNCTIONS */
-# if defined(ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME)
- ::strncpy(buf, "ctime-return",buflen);
- return buf;
-# else /* ACE_PSOS && !ACE_PSOS_HAS_TIME */
-
- ACE_TCHAR *result;
-# if defined (ACE_USES_WCHAR)
- ACE_OSCALL (::_wctime (t), wchar_t *, 0, result);
-# else /* ACE_WIN32 */
- ACE_OSCALL (::ctime (t), char *, 0, result);
-# endif /* ACE_WIN32 */
- if (result != 0)
- ACE_OS::strncpy (buf, result, buflen);
- return buf;
-# endif /* ACE_PSOS && !ACE_PSOS_HAS_TIME */
-# endif /* ACE_HAS_REENTRANT_FUNCTIONS */
-}
-#endif /* !ACE_HAS_WINCE */
-
-ACE_INLINE struct tm *
-ACE_OS::localtime (const time_t *t)
-{
-#if !defined (ACE_HAS_WINCE) && !defined(ACE_PSOS) || defined (ACE_PSOS_HAS_TIME)
- ACE_TRACE ("ACE_OS::localtime");
- ACE_OSCALL_RETURN (::localtime (t), struct tm *, 0);
-#else
- // @@ Don't you start wondering what kind of functions
- // does WinCE really support?
- ACE_UNUSED_ARG (t);
- ACE_NOTSUP_RETURN (0);
-#endif /* ! ACE_HAS_WINCE */
-}
-
-ACE_INLINE struct tm *
-ACE_OS::gmtime (const time_t *t)
-{
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_PSOS) || defined (ACE_PSOS_HAS_TIME)
- ACE_TRACE ("ACE_OS::localtime");
- ACE_OSCALL_RETURN (::gmtime (t), struct tm *, 0);
-#else
- // @@ WinCE doesn't have gmtime also.
- ACE_UNUSED_ARG (t);
- ACE_NOTSUP_RETURN (0);
-#endif /* ! ACE_HAS_WINCE */
-}
-
-ACE_INLINE struct tm *
-ACE_OS::gmtime_r (const time_t *t, struct tm *res)
-{
- ACE_TRACE ("ACE_OS::localtime_r");
-#if defined (ACE_HAS_REENTRANT_FUNCTIONS)
-# if defined (DIGITAL_UNIX)
- ACE_OSCALL_RETURN (::_Pgmtime_r (t, res), struct tm *, 0);
-# elif defined (HPUX_10)
- return (::gmtime_r (t, res) == 0 ? res : (struct tm *) 0);
-# else
- ACE_OSCALL_RETURN (::gmtime_r (t, res), struct tm *, 0);
-# endif /* DIGITAL_UNIX */
-#elif !defined (ACE_HAS_WINCE) && !defined(ACE_PSOS) || defined (ACE_PSOS_HAS_TIME)
- struct tm *result;
- ACE_OSCALL (::gmtime (t), struct tm *, 0, result) ;
- if (result != 0)
- *res = *result;
- return res;
-#else
- // @@ Same as ACE_OS::gmtime (), you need to implement it
- // yourself.
- ACE_UNUSED_ARG (t);
- ACE_UNUSED_ARG (res);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_REENTRANT_FUNCTIONS */
-}
-
-ACE_INLINE char *
-ACE_OS::asctime (const struct tm *t)
-{
-#if !defined (ACE_HAS_WINCE) && !defined(ACE_PSOS) || defined (ACE_PSOS_HAS_TIME)
- ACE_TRACE ("ACE_OS::asctime");
- ACE_OSCALL_RETURN (::asctime (t), char *, 0);
-#else
- // @@ WinCE doesn't have gmtime also.
- ACE_UNUSED_ARG (t);
- ACE_NOTSUP_RETURN (0);
-#endif /* ! ACE_HAS_WINCE */
-}
-
-ACE_INLINE char *
-ACE_OS::asctime_r (const struct tm *t, char *buf, int buflen)
-{
- ACE_TRACE ("ACE_OS::asctime_r");
-#if defined (ACE_HAS_REENTRANT_FUNCTIONS)
-# if defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R)
- char *result;
-# if defined (DIGITAL_UNIX)
- ACE_OSCALL (::_Pasctime_r (t, buf), char *, 0, result);
-# else
- ACE_OSCALL (::asctime_r (t, buf), char *, 0, result);
-# endif /* DIGITAL_UNIX */
- ::strncpy (buf, result, buflen);
- return buf;
-# else
-# if defined (HPUX_10)
- return (::asctime_r(t, buf, buflen) == 0 ? buf : (char *)0);
-# else
- ACE_OSCALL_RETURN (::asctime_r (t, buf, buflen), char *, 0);
-# endif /* HPUX_10 */
-# endif /* ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R */
-#elif ! defined (ACE_HAS_WINCE) && !defined(ACE_PSOS) || defined (ACE_PSOS_HAS_TIME)
- char *result;
- ACE_OSCALL (::asctime (t), char *, 0, result);
- ::strncpy (buf, result, buflen);
- return buf;
-#else
- // @@ Same as ACE_OS::asctime (), you need to implement it
- // yourself.
- ACE_UNUSED_ARG (t);
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (buflen);
- ACE_NOTSUP_RETURN (0);
-#endif /* defined (ACE_HAS_REENTRANT_FUNCTIONS) */
-}
-
-ACE_INLINE size_t
-ACE_OS::strftime (char *s, size_t maxsize, const char *format,
- const struct tm *timeptr)
-{
-#if !defined (ACE_HAS_WINCE) && !defined(ACE_PSOS) || defined (ACE_PSOS_HAS_TIME)
- return ::strftime (s, maxsize, format, timeptr);
-#else
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (maxsize);
- ACE_UNUSED_ARG (format);
- ACE_UNUSED_ARG (timeptr);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_OS::flock_init (ACE_OS::ace_flock_t *lock,
- int flags,
- const ACE_TCHAR *name,
- mode_t perms)
-{
- ACE_TRACE ("ACE_OS::flock_init");
-#if defined (CHORUS)
- lock->lockname_ = 0;
- // Let's see if it already exists.
- lock->handle_ = ACE_OS::shm_open (name,
- flags | O_CREAT | O_EXCL,
- perms);
- if (lock->handle_ == ACE_INVALID_HANDLE)
- {
- if (errno == EEXIST)
- // It's already there, so we'll just open it.
- lock->handle_ = ACE_OS::shm_open (name,
- flags | O_CREAT,
- ACE_DEFAULT_FILE_PERMS);
- else
- return -1;
- }
- else
- {
- // We own this shared memory object! Let's set its size.
- if (ACE_OS::ftruncate (lock->handle_,
- sizeof (ACE_mutex_t)) == -1)
- return -1;
- // Note that only the owner can destroy a file lock...
- ACE_ALLOCATOR_RETURN (lock->lockname_,
- ACE_OS::strdup (name),
- -1);
- }
- if (lock->handle_ == ACE_INVALID_HANDLE)
- return -1;
-
- lock->process_lock_ =
- (ACE_mutex_t *) ACE_OS::mmap (0,
- sizeof (ACE_mutex_t),
- PROT_RDWR,
- MAP_SHARED,
- lock->handle_,
- 0);
- if (lock->process_lock_ == MAP_FAILED)
- return -1;
-
- if (lock->lockname_
- // Only initialize it if we're the one who created it.
- && ACE_OS::mutex_init (lock->process_lock_,
- USYNC_PROCESS,
- name,
- 0) != 0)
- return -1;
- return 0;
-#else
-#if defined (ACE_WIN32)
- // Once initialized, these values are never changed.
- lock->overlapped_.Internal = 0;
- lock->overlapped_.InternalHigh = 0;
- lock->overlapped_.OffsetHigh = 0;
- lock->overlapped_.hEvent = NULL;
-#endif /* ACE_WIN32 */
- lock->handle_ = ACE_INVALID_HANDLE;
- lock->lockname_ = 0;
-
- if (name != 0)
- {
- ACE_OSCALL (ACE_OS::open (name, flags, perms),
- ACE_HANDLE,
- ACE_INVALID_HANDLE,
- lock->handle_);
- lock->lockname_ = ACE_OS::strdup (name);
- return lock->handle_ == ACE_INVALID_HANDLE ? -1 : 0;
- }
- else
- return 0;
-#endif /* CHORUS */
-}
-
-#if defined (ACE_WIN32)
-ACE_INLINE void
-ACE_OS::adjust_flock_params (ACE_OS::ace_flock_t *lock,
- short whence,
- off_t &start,
- off_t &len)
-{
- switch (whence)
- {
- case SEEK_SET:
- break;
- case SEEK_CUR:
- start += SetFilePointer (lock->handle_, 0, 0, FILE_CURRENT);
- break;
- case SEEK_END:
- start += ::GetFileSize (lock->handle_, NULL);
- break;
- }
- lock->overlapped_.Offset = start;
- if (len == 0)
- len = ::GetFileSize (lock->handle_,
- NULL) - start;
-}
-#endif /* ACE_WIN32 */
-
-ACE_INLINE int
-ACE_OS::flock_wrlock (ACE_OS::ace_flock_t *lock,
- short whence,
- off_t start,
- off_t len)
-{
- ACE_TRACE ("ACE_OS::flock_wrlock");
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
- ACE_OS::adjust_flock_params (lock, whence, start, len);
-# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::LockFileEx (lock->handle_,
- LOCKFILE_EXCLUSIVE_LOCK,
- 0,
- len,
- 0,
- &lock->overlapped_),
- ace_result_), int, -1);
-# else /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::LockFile (lock->handle_,
- lock->overlapped_.Offset,
- 0,
- len,
- 0),
- ace_result_), int, -1);
-# endif /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
-#elif defined (CHORUS)
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- return ACE_OS::mutex_lock (lock->process_lock_);
-#elif defined (ACE_LACKS_FILELOCKS)
- ACE_UNUSED_ARG (lock);
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- ACE_NOTSUP_RETURN (-1);
-#else
- lock->lock_.l_whence = whence;
- lock->lock_.l_start = start;
- lock->lock_.l_len = len;
- lock->lock_.l_type = F_WRLCK; // set write lock
- // block, if no access
- ACE_OSCALL_RETURN (ACE_OS::fcntl (lock->handle_, F_SETLKW,
- ACE_reinterpret_cast (long, &lock->lock_)),
- int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::flock_rdlock (ACE_OS::ace_flock_t *lock,
- short whence,
- off_t start,
- off_t len)
-{
- ACE_TRACE ("ACE_OS::flock_rdlock");
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
- ACE_OS::adjust_flock_params (lock, whence, start, len);
-# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::LockFileEx (lock->handle_,
- 0,
- 0,
- len,
- 0,
- &lock->overlapped_),
- ace_result_), int, -1);
-# else /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::LockFile (lock->handle_,
- lock->overlapped_.Offset,
- 0,
- len,
- 0),
- ace_result_), int, -1);
-# endif /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
-#elif defined (CHORUS)
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- return ACE_OS::mutex_lock (lock->process_lock_);
-#elif defined (ACE_LACKS_FILELOCKS)
- ACE_UNUSED_ARG (lock);
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- ACE_NOTSUP_RETURN (-1);
-#else
- lock->lock_.l_whence = whence;
- lock->lock_.l_start = start;
- lock->lock_.l_len = len;
- lock->lock_.l_type = F_RDLCK; // set read lock
- // block, if no access
- ACE_OSCALL_RETURN (ACE_OS::fcntl (lock->handle_, F_SETLKW,
- ACE_reinterpret_cast (long, &lock->lock_)),
- int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::flock_trywrlock (ACE_OS::ace_flock_t *lock,
- short whence,
- off_t start,
- off_t len)
-{
- ACE_TRACE ("ACE_OS::ace_flock_trywrlock");
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
-# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)
- ACE_OS::adjust_flock_params (lock, whence, start, len);
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::LockFileEx (lock->handle_,
- LOCKFILE_FAIL_IMMEDIATELY | LOCKFILE_EXCLUSIVE_LOCK,
- 0,
- len,
- 0,
- &lock->overlapped_),
- ace_result_), int, -1);
-# else /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
- ACE_UNUSED_ARG (lock);
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
-#elif defined (CHORUS)
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- return ACE_OS::mutex_trylock (lock->process_lock_);
-#elif defined (ACE_LACKS_FILELOCKS)
- ACE_UNUSED_ARG (lock);
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- ACE_NOTSUP_RETURN (-1);
-#else
- lock->lock_.l_whence = whence;
- lock->lock_.l_start = start;
- lock->lock_.l_len = len;
- lock->lock_.l_type = F_WRLCK; // set write lock
-
- int result = 0;
- // Does not block, if no access, returns -1 and set errno = EBUSY;
- ACE_OSCALL (ACE_OS::fcntl (lock->handle_,
- F_SETLK,
- ACE_reinterpret_cast (long, &lock->lock_)),
- int, -1, result);
-
-# if ! defined (ACE_PSOS)
- if (result == -1 && (errno == EACCES || errno == EAGAIN))
- errno = EBUSY;
-# endif /* ! defined (ACE_PSOS) */
-
- return result;
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::flock_tryrdlock (ACE_OS::ace_flock_t *lock,
- short whence,
- off_t start,
- off_t len)
-{
- ACE_TRACE ("ACE_OS::ace_flock_tryrdlock");
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
-# if defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)
- ACE_OS::adjust_flock_params (lock, whence, start, len);
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::LockFileEx (lock->handle_,
- LOCKFILE_FAIL_IMMEDIATELY,
- 0,
- len,
- 0,
- &lock->overlapped_),
- ace_result_), int, -1);
-# else /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
- ACE_UNUSED_ARG (lock);
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- ACE_NOTSUP_RETURN (-1);
-# endif /* ACE_HAS_WINNT4 && (ACE_HAS_WINNT4 != 0) */
-#elif defined (CHORUS)
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- return ACE_OS::mutex_trylock (lock->process_lock_);
-#elif defined (ACE_LACKS_FILELOCKS)
- ACE_UNUSED_ARG (lock);
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- ACE_NOTSUP_RETURN (-1);
-#else
- lock->lock_.l_whence = whence;
- lock->lock_.l_start = start;
- lock->lock_.l_len = len;
- lock->lock_.l_type = F_RDLCK; // set read lock
-
- int result = 0;
- // Does not block, if no access, returns -1 and set errno = EBUSY;
- ACE_OSCALL (ACE_OS::fcntl (lock->handle_, F_SETLK,
- ACE_reinterpret_cast (long, &lock->lock_)),
- int, -1, result);
-
-# if ! defined (ACE_PSOS)
- if (result == -1 && (errno == EACCES || errno == EAGAIN))
- errno = EBUSY;
-# endif /* ! defined (ACE_PSOS) */
-
- return result;
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::flock_unlock (ACE_OS::ace_flock_t *lock,
- short whence,
- off_t start,
- off_t len)
-{
- ACE_TRACE ("ACE_OS::flock_unlock");
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
- ACE_OS::adjust_flock_params (lock, whence, start, len);
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::UnlockFile (lock->handle_,
- lock->overlapped_.Offset,
- 0,
- len,
- 0),
- ace_result_), int, -1);
-#elif defined (CHORUS)
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- return ACE_OS::mutex_unlock (lock->process_lock_);
-#elif defined (ACE_LACKS_FILELOCKS)
- ACE_UNUSED_ARG (lock);
- ACE_UNUSED_ARG (whence);
- ACE_UNUSED_ARG (start);
- ACE_UNUSED_ARG (len);
- ACE_NOTSUP_RETURN (-1);
-#else
- lock->lock_.l_whence = whence;
- lock->lock_.l_start = start;
- lock->lock_.l_len = len;
- lock->lock_.l_type = F_UNLCK; // Unlock file.
-
- // release lock
- ACE_OSCALL_RETURN (ACE_OS::fcntl (lock->handle_, F_SETLK,
- ACE_reinterpret_cast (long, &lock->lock_)),
- int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::flock_destroy (ACE_OS::ace_flock_t *lock,
- int unlink_file)
-{
- ACE_TRACE ("ACE_OS::flock_destroy");
- if (lock->handle_ != ACE_INVALID_HANDLE)
- {
- ACE_OS::flock_unlock (lock);
- // Close the handle.
- ACE_OS::close (lock->handle_);
- lock->handle_ = ACE_INVALID_HANDLE;
-#if defined (CHORUS)
- // Are we the owner?
- if (lock->process_lock_ && lock->lockname_ != 0)
- {
- // Only destroy the lock if we're the owner
- ACE_OS::mutex_destroy (lock->process_lock_);
- ACE_OS::munmap (lock->process_lock_,
- sizeof (ACE_mutex_t));
- if (unlink_file)
- ACE_OS::shm_unlink (lock->lockname_);
- ACE_OS::free (ACE_static_cast (void *,
- ACE_const_cast (ACE_TCHAR *,
- lock->lockname_)));
- }
- else if (lock->process_lock_)
- // Just unmap the memory.
- ACE_OS::munmap (lock->process_lock_,
- sizeof (ACE_mutex_t));
-#else
- if (lock->lockname_ != 0)
- {
- if (unlink_file)
- ACE_OS::unlink (lock->lockname_);
- ACE_OS::free (ACE_static_cast (void *,
- ACE_const_cast (ACE_TCHAR *,
- lock->lockname_)));
- }
-#endif /* CHORUS */
- lock->lockname_ = 0;
- }
- return 0;
-}
-
-ACE_INLINE int
-ACE_OS::execv (const char *path,
- char *const argv[])
-{
- ACE_TRACE ("ACE_OS::execv");
-#if defined (ACE_LACKS_EXEC)
- ACE_UNUSED_ARG (path);
- ACE_UNUSED_ARG (argv);
-
- ACE_NOTSUP_RETURN (-1);
-#elif defined (CHORUS)
- KnCap cactorcap;
- int result = ::afexecv (path, &cactorcap, 0, argv);
- if (result != -1)
- ACE_OS::actorcaps_[result] = cactorcap;
- return result;
-#elif defined (ACE_WIN32)
-# if defined (__BORLANDC__) // VSB
- return ::execv (path, argv);
-# else
- return ::_execv (path, (const char *const *) argv);
-# endif /* __BORLANDC__ */
-#elif defined (ACE_LACKS_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::execv (path, (const char **) argv), int, -1);
-#else
- ACE_OSCALL_RETURN (::execv (path, argv), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::execve (const char *path,
- char *const argv[],
- char *const envp[])
-{
- ACE_TRACE ("ACE_OS::execve");
-#if defined (ACE_LACKS_EXEC)
- ACE_UNUSED_ARG (path);
- ACE_UNUSED_ARG (argv);
- ACE_UNUSED_ARG (envp);
-
- ACE_NOTSUP_RETURN (-1);
-#elif defined(CHORUS)
- KnCap cactorcap;
- int result = ::afexecve (path, &cactorcap, 0, argv, envp);
- if (result != -1)
- ACE_OS::actorcaps_[result] = cactorcap;
- return result;
-#elif defined (ACE_WIN32)
-# if defined (__BORLANDC__) // VSB
- return ::execve (path, argv, envp);
-# else
- return ::_execve (path, (const char *const *) argv, (const char *const *) envp);
-# endif /* __BORLANDC__ */
-#elif defined (ACE_LACKS_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::execve (path, (const char **) argv, (char **) envp), int, -1);
-#else
- ACE_OSCALL_RETURN (::execve (path, argv, envp), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::execvp (const char *file,
- char *const argv[])
-{
- ACE_TRACE ("ACE_OS::execvp");
-#if defined (ACE_LACKS_EXEC)
- ACE_UNUSED_ARG (file);
- ACE_UNUSED_ARG (argv);
-
- ACE_NOTSUP_RETURN (-1);
-#elif defined(CHORUS)
- KnCap cactorcap;
- int result = ::afexecvp (file, &cactorcap, 0, argv);
- if (result != -1)
- ACE_OS::actorcaps_[result] = cactorcap;
- return result;
-#elif defined (ACE_WIN32)
-# if defined (__BORLANDC__) // VSB
- return ::execvp (file, argv);
-# else
- return ::_execvp (file, (const char *const *) argv);
-# endif /* __BORLANDC__ */
-#elif defined (ACE_LACKS_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::execvp (file, (const char **) argv), int, -1);
-#else
- ACE_OSCALL_RETURN (::execvp (file, argv), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-#if !defined (ACE_HAS_WINCE)
-ACE_INLINE FILE *
-ACE_OS::fdopen (ACE_HANDLE handle, const ACE_TCHAR *mode)
-{
- ACE_TRACE ("ACE_OS::fdopen");
-# if defined (ACE_WIN32)
- // kernel file handle -> FILE* conversion...
- // Options: _O_APPEND, _O_RDONLY and _O_TEXT are lost
-
- FILE *file = 0;
-
- int crt_handle = ::_open_osfhandle ((long) handle, 0);
-
- if (crt_handle != -1)
- {
-# if defined(__BORLANDC__) // VSB
- file = ::_fdopen (crt_handle, (char *) mode);
-# elif defined (ACE_USES_WCHAR)
- file = ::_wfdopen (crt_handle, mode);
-# else
- file = ::_fdopen (crt_handle, mode);
-# endif /* __BORLANDC__ */
-
- if (!file)
- {
-# if (defined(__BORLANDC__) && __BORLANDC__ >= 0x0530)
- ::_rtl_close (crt_handle);
-# else
- ::_close (crt_handle);
-# endif /* (defined(__BORLANDC__) && __BORLANDC__ >= 0x0530) */
- }
- }
-
- return file;
-# elif defined (ACE_PSOS)
- // @@ it may be possible to implement this for pSOS,
- // but it isn't obvious how to do this (perhaps via
- // f_stat to glean the default volume, and then open_fn ?)
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (mode);
- ACE_NOTSUP_RETURN (0);
-# else
- ACE_OSCALL_RETURN (::fdopen (handle, mode), FILE *, 0);
-# endif /* ACE_WIN32 */
-}
-#endif /* ! ACE_HAS_WINCE */
-
-ACE_INLINE int
-ACE_OS::getrlimit (int resource, struct rlimit *rl)
-{
- ACE_TRACE ("ACE_OS::getrlimit");
-
-#if defined (ACE_LACKS_RLIMIT)
- ACE_UNUSED_ARG (resource);
- ACE_UNUSED_ARG (rl);
-
- ACE_NOTSUP_RETURN (-1);
-#else
-# if defined (ACE_HAS_RLIMIT_RESOURCE_ENUM)
- ACE_OSCALL_RETURN (::getrlimit ((ACE_HAS_RLIMIT_RESOURCE_ENUM) resource, rl), int, -1);
-# else
- ACE_OSCALL_RETURN (::getrlimit (resource, rl), int, -1);
-# endif /* ACE_HAS_RLIMIT_RESOURCE_ENUM */
-#endif /* ACE_LACKS_RLIMIT */
-}
-
-ACE_INLINE int
-ACE_OS::setrlimit (int resource, ACE_SETRLIMIT_TYPE *rl)
-{
- ACE_TRACE ("ACE_OS::setrlimit");
-
-#if defined (ACE_LACKS_RLIMIT)
- ACE_UNUSED_ARG (resource);
- ACE_UNUSED_ARG (rl);
-
- ACE_NOTSUP_RETURN (-1);
-#else
-# if defined (ACE_HAS_RLIMIT_RESOURCE_ENUM)
- ACE_OSCALL_RETURN (::setrlimit ((ACE_HAS_RLIMIT_RESOURCE_ENUM) resource, rl), int, -1);
-# else
- ACE_OSCALL_RETURN (::setrlimit (resource, rl), int, -1);
-# endif /* ACE_HAS_RLIMIT_RESOURCE_ENUM */
-#endif /* ACE_LACKS_RLIMIT */
-}
-
-ACE_INLINE int
-ACE_OS::socketpair (int domain, int type,
- int protocol, ACE_HANDLE sv[2])
-{
- ACE_TRACE ("ACE_OS::socketpair");
-#if defined (ACE_WIN32) || defined (ACE_LACKS_SOCKETPAIR)
- ACE_UNUSED_ARG (domain);
- ACE_UNUSED_ARG (type);
- ACE_UNUSED_ARG (protocol);
- ACE_UNUSED_ARG (sv);
-
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_OSCALL_RETURN (::socketpair (domain, type, protocol, sv),
- int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_OS::dup (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::dup");
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
- ACE_HANDLE new_fd;
- if (::DuplicateHandle(::GetCurrentProcess (),
- handle,
- ::GetCurrentProcess(),
- &new_fd,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS))
- return new_fd;
- else
- ACE_FAIL_RETURN (ACE_INVALID_HANDLE);
- /* NOTREACHED */
-#elif defined (VXWORKS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (handle);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (handle);
- ACE_NOTSUP_RETURN (0);
-#else
- ACE_OSCALL_RETURN (::dup (handle), ACE_HANDLE, ACE_INVALID_HANDLE);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::dup2 (ACE_HANDLE oldhandle, ACE_HANDLE newhandle)
-{
- ACE_TRACE ("ACE_OS::dup2");
-#if defined (ACE_WIN32) || defined (VXWORKS) || defined (ACE_PSOS)
- // msvcrt has _dup2 ?!
- ACE_UNUSED_ARG (oldhandle);
- ACE_UNUSED_ARG (newhandle);
-
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_OSCALL_RETURN (::dup2 (oldhandle, newhandle), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-#if defined (ghs) && defined (ACE_HAS_PENTIUM)
- extern "C" ACE_hrtime_t ACE_gethrtime ();
-#endif /* ghs && ACE_HAS_PENTIUM */
-
-ACE_INLINE ACE_hrtime_t
-ACE_OS::gethrtime (const ACE_HRTimer_Op op)
-{
- ACE_TRACE ("ACE_OS::gethrtime");
-#if defined (ACE_HAS_HI_RES_TIMER)
- ACE_UNUSED_ARG (op);
- return ::gethrtime ();
-#elif defined (ACE_HAS_AIX_HI_RES_TIMER)
- ACE_UNUSED_ARG (op);
- timebasestruct_t tb;
-
- ::read_real_time(&tb, TIMEBASE_SZ);
- ::time_base_to_time(&tb, TIMEBASE_SZ);
-
- return ACE_hrtime_t(tb.tb_high) * ACE_ONE_SECOND_IN_NSECS + tb.tb_low;
-#elif defined (ghs) && defined (ACE_HAS_PENTIUM)
- ACE_UNUSED_ARG (op);
- // Use .obj/gethrtime.o, which was compiled with g++.
- return ACE_gethrtime ();
-#elif defined (__GNUG__) && defined (ACE_HAS_PENTIUM)
- ACE_UNUSED_ARG (op);
-
-# if defined (ACE_LACKS_LONGLONG_T)
- double now;
-# else /* ! ACE_LACKS_LONGLONG_T */
- ACE_hrtime_t now;
-# endif /* ! ACE_LACKS_LONGLONG_T */
-
- // See comments about the RDTSC Pentium instruction for the ACE_WIN32
- // version of ACE_OS::gethrtime (), below.
- //
- // Read the high-res tick counter directly into memory variable "now".
- // The A constraint signifies a 64-bit int.
- asm volatile ("rdtsc" : "=A" (now) : : "memory");
-
-# if defined (ACE_LACKS_LONGLONG_T)
- ACE_UINT32 least, most;
- ACE_OS::memcpy (&least, &now, sizeof (ACE_UINT32));
- ACE_OS::memcpy (&most, (u_char *) &now + sizeof (ACE_UINT32),
- sizeof (ACE_UINT32));
-
- ACE_hrtime_t ret (least, most);
- return ret;
-# else /* ! ACE_LACKS_LONGLONG_T */
- return now;
-# endif /* ! ACE_LACKS_LONGLONG_T */
-#elif defined (linux) && defined (ACE_HAS_ALPHA_TIMER)
- // NOTE: alphas only have a 32 bit tick (cycle) counter. The rpcc
- // instruction actually reads 64 bits, but the high 32 bits are
- // implementation-specific. Linux and Digital Unix, for example,
- // use them for virtual tick counts, i.e., taking into account only
- // the time that the process was running. This information is from
- // David Mosberger's article, see comment below.
- ACE_UINT32 now;
-
- // The following statement is based on code published by:
- // Mosberger, David, "How to Make Your Applications Fly, Part 1",
- // Linux Journal Issue 42, October 1997, page 50. It reads the
- // high-res tick counter directly into the memory variable.
- asm volatile ("rpcc %0" : "=r" (now) : : "memory");
-
- return now;
-#elif defined (ACE_WIN32) && defined (ACE_HAS_PENTIUM)
- LARGE_INTEGER freq;
-
- ::QueryPerformanceCounter (&freq);
-
- return freq.QuadPart;
-
-#elif defined (CHORUS)
- if (op == ACE_OS::ACE_HRTIMER_GETTIME)
- {
- struct timespec ts;
-
- ACE_OS::clock_gettime (CLOCK_REALTIME, &ts);
-
- // Carefully create the return value to avoid arithmetic overflow
- // if ACE_hrtime_t is ACE_U_LongLong.
- ACE_hrtime_t now = ts.tv_sec;
- now *= ACE_U_ONE_SECOND_IN_NSECS;
- now += ts.tv_nsec;
-
- return now;
- }
- else
- {
- // Use the sysBench timer on Chorus. On MVME177, at least, it only
- // has 32 bits. Be careful, because using it disables interrupts!
- ACE_UINT32 now;
- if (::sysBench (op, (int *) &now) == K_OK)
- {
- now *= 1000u /* nanoseconds/microsecond */;
- return (ACE_hrtime_t) now;
- }
- else
- {
- // Something went wrong. Just return 0.
- return (ACE_hrtime_t) 0;
- }
- }
-
-#elif defined (ACE_HAS_POWERPC_TIMER) && (defined (ghs) || defined (__GNUG__))
- // PowerPC w/ GreenHills or g++.
-
- ACE_UNUSED_ARG (op);
- u_long most;
- u_long least;
- ACE_OS::readPPCTimeBase (most, least);
-#if defined (ACE_LACKS_LONGLONG_T)
- return ACE_U_LongLong (least, most);
-#else /* ! ACE_LACKS_LONGLONG_T */
- return 0x100000000llu * most + least;
-#endif /* ! ACE_LACKS_LONGLONG_T */
-
-#elif defined (ACE_HAS_CLOCK_GETTIME) || defined (ACE_PSOS)
- // e.g., VxWorks (besides POWERPC && GreenHills) . . .
- ACE_UNUSED_ARG (op);
- struct timespec ts;
-
- ACE_OS::clock_gettime (CLOCK_REALTIME, &ts);
-
- // Carefully create the return value to avoid arithmetic overflow
- // if ACE_hrtime_t is ACE_U_LongLong.
- return ACE_static_cast (ACE_hrtime_t, ts.tv_sec) *
- ACE_U_ONE_SECOND_IN_NSECS + ACE_static_cast (ACE_hrtime_t, ts.tv_nsec);
-#else
- ACE_UNUSED_ARG (op);
- const ACE_Time_Value now = ACE_OS::gettimeofday ();
-
- // Carefully create the return value to avoid arithmetic overflow
- // if ACE_hrtime_t is ACE_U_LongLong.
- return (ACE_static_cast (ACE_hrtime_t, now.sec ()) * (ACE_UINT32) 1000000 +
- ACE_static_cast (ACE_hrtime_t, now.usec ())) * (ACE_UINT32) 1000;
-#endif /* ACE_HAS_HI_RES_TIMER */
-}
-
-ACE_INLINE int
-ACE_OS::fdetach (const char *file)
-{
- ACE_TRACE ("ACE_OS::fdetach");
-#if defined (ACE_HAS_STREAM_PIPES)
- ACE_OSCALL_RETURN (::fdetach (file), int, -1);
-#else
- ACE_UNUSED_ARG (file);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-ACE_INLINE int
-ACE_OS::fattach (int handle, const char *path)
-{
- ACE_TRACE ("ACE_OS::fattach");
-#if defined (ACE_HAS_STREAM_PIPES)
- ACE_OSCALL_RETURN (::fattach (handle, path), int, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (path);
-
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-ACE_INLINE pid_t
-ACE_OS::fork (void)
-{
- ACE_TRACE ("ACE_OS::fork");
-#if defined (ACE_LACKS_FORK)
- ACE_NOTSUP_RETURN (pid_t (-1));
-#else
- ACE_OSCALL_RETURN (::fork (), pid_t, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::getpagesize (void)
-{
- ACE_TRACE ("ACE_OS::getpagesize");
-#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP)
- SYSTEM_INFO sys_info;
- ::GetSystemInfo (&sys_info);
- return (int) sys_info.dwPageSize;
-#elif defined (_SC_PAGESIZE)
- return (int) ::sysconf (_SC_PAGESIZE);
-#elif defined (ACE_HAS_GETPAGESIZE)
- return ::getpagesize ();
-#else
- // Use the default set in config.h
- return ACE_PAGE_SIZE;
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::allocation_granularity (void)
-{
-#if defined (ACE_WIN32)
- SYSTEM_INFO sys_info;
- ::GetSystemInfo (&sys_info);
- return (int) sys_info.dwAllocationGranularity;
-#else
- return ACE_OS::getpagesize ();
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE pid_t
-ACE_OS::getpid (void)
-{
- // ACE_TRACE ("ACE_OS::getpid");
-#if defined (ACE_WIN32)
- return ::GetCurrentProcessId ();
-#elif defined (VXWORKS) || defined (ACE_PSOS)
- // getpid() is not supported: just one process anyways
- return 0;
-#elif defined (CHORUS)
- return (pid_t) (::agetId ());
-#else
- ACE_OSCALL_RETURN (::getpid (), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE pid_t
-ACE_OS::getpgid (pid_t pid)
-{
- ACE_TRACE ("ACE_OS::getpgid");
-#if defined (ACE_LACKS_GETPGID)
- ACE_UNUSED_ARG (pid);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (VXWORKS) || defined (ACE_PSOS)
- // getpgid() is not supported, only one process anyway.
- ACE_UNUSED_ARG (pid);
- return 0;
-#elif defined (linux) && __GLIBC__ > 1 && __GLIBC_MINOR__ >= 0
- // getpgid() is from SVR4, which appears to be the reason why GLIBC
- // doesn't enable its prototype by default.
- // Rather than create our own extern prototype, just use the one
- // that is visible (ugh).
- ACE_OSCALL_RETURN (::__getpgid (pid), pid_t, -1);
-#else
- ACE_OSCALL_RETURN (::getpgid (pid), pid_t, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE pid_t
-ACE_OS::getppid (void)
-{
- ACE_TRACE ("ACE_OS::getppid");
-#if defined (ACE_LACKS_GETPPID)
- ACE_NOTSUP_RETURN (-1);
-#elif defined (VXWORKS) || defined (ACE_PSOS)
- // getppid() is not supported, only one process anyway.
- return 0;
-#else
- ACE_OSCALL_RETURN (::getppid (), pid_t, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::setpgid (pid_t pid, pid_t pgid)
-{
- ACE_TRACE ("ACE_OS::setpgid");
-#if defined (ACE_LACKS_SETPGID)
- ACE_UNUSED_ARG (pid);
- ACE_UNUSED_ARG (pgid);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (VXWORKS) || defined (ACE_PSOS)
- // <setpgid> is not supported, only one process anyway.
- ACE_UNUSED_ARG (pid);
- ACE_UNUSED_ARG (pgid);
- return 0;
-#else
- ACE_OSCALL_RETURN (::setpgid (pid, pgid), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::setreuid (uid_t ruid, uid_t euid)
-{
- ACE_TRACE ("ACE_OS::setreuid");
-#if defined (ACE_LACKS_SETREUID)
- ACE_UNUSED_ARG (ruid);
- ACE_UNUSED_ARG (euid);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (VXWORKS) || defined (ACE_PSOS)
- // <setpgid> is not supported, only one process anyway.
- ACE_UNUSED_ARG (ruid);
- ACE_UNUSED_ARG (euid);
- return 0;
-#else
- ACE_OSCALL_RETURN (::setreuid (ruid, euid), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::setregid (gid_t rgid, gid_t egid)
-{
- ACE_TRACE ("ACE_OS::setregid");
-#if defined (ACE_LACKS_SETREGID)
- ACE_UNUSED_ARG (rgid);
- ACE_UNUSED_ARG (egid);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (VXWORKS) || defined (ACE_PSOS)
- // <setregid> is not supported, only one process anyway.
- ACE_UNUSED_ARG (rgid);
- ACE_UNUSED_ARG (egid);
- return 0;
-#else
- ACE_OSCALL_RETURN (::setregid (rgid, egid), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE off_t
-ACE_OS::lseek (ACE_HANDLE handle, off_t offset, int whence)
-{
- ACE_TRACE ("ACE_OS::lseek");
-
-#if defined (ACE_WIN32)
-# if SEEK_SET != FILE_BEGIN || SEEK_CUR != FILE_CURRENT || SEEK_END != FILE_END
- //#error Windows NT is evil AND rude!
- switch (whence)
- {
- case SEEK_SET:
- whence = FILE_BEGIN;
- break;
- case SEEK_CUR:
- whence = FILE_CURRENT;
- break;
- case SEEK_END:
- whence = FILE_END;
- break;
- default:
- errno = EINVAL;
- return ACE_static_cast (off_t, -1); // rather safe than sorry
- }
-# endif /* SEEK_SET != FILE_BEGIN || SEEK_CUR != FILE_CURRENT || SEEK_END != FILE_END */
- DWORD result = ::SetFilePointer (handle, offset, NULL, whence);
- if (result == ACE_SYSCALL_FAILED)
- ACE_FAIL_RETURN (ACE_static_cast (off_t, -1));
- else
- return result;
-#elif defined (ACE_PSOS)
-# if defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (offset);
- ACE_UNUSED_ARG (whence);
- ACE_NOTSUP_RETURN (ACE_static_cast (off_t, -1));
-# else
- unsigned long oldptr, newptr, result;
- // seek to the requested position
- result = ::lseek_f (handle, whence, offset, &oldptr);
- if (result != 0)
- {
- errno = result;
- return ACE_static_cast (off_t, -1);
- }
- // now do a dummy seek to the current position to obtain the position
- result = ::lseek_f (handle, SEEK_CUR, 0, &newptr);
- if (result != 0)
- {
- errno = result;
- return ACE_static_cast (off_t, -1);
- }
- return ACE_static_cast (off_t, newptr);
-# endif /* defined (ACE_PSOS_LACKS_PHILE */
-#else
- ACE_OSCALL_RETURN (::lseek (handle, offset, whence), off_t, -1);
-#endif /* ACE_WIN32 */
-}
-
-#if defined (ACE_HAS_LLSEEK) || defined (ACE_HAS_LSEEK64)
-ACE_INLINE ACE_LOFF_T
-ACE_OS::llseek (ACE_HANDLE handle, ACE_LOFF_T offset, int whence)
-{
- ACE_TRACE ("ACE_OS::llseek");
-
-#if ACE_SIZEOF_LONG == 8
- /* The native lseek is 64 bit. Use it. */
- return ACE_OS::lseek (handle, offset, whence);
-#elif defined (ACE_HAS_LLSEEK) && defined (ACE_HAS_LSEEK64)
-# error Either ACE_HAS_LSEEK64 and ACE_HAS_LLSEEK should be defined, not both!
-#elif defined (ACE_HAS_LSEEK64)
- ACE_OSCALL_RETURN (::lseek64 (handle, offset, whence), ACE_LOFF_T, -1);
-#elif defined (ACE_HAS_LLSEEK)
- ACE_OSCALL_RETURN (::llseek (handle, offset, whence), ACE_LOFF_T, -1);
-#endif
-}
-#endif /* ACE_HAS_LLSEEK || ACE_HAS_LSEEK64 */
-
-ACE_INLINE int
-ACE_OS::fseek (FILE *fp, long offset, int whence)
-{
-#if defined (ACE_HAS_WINCE)
- return ACE_OS::lseek (fp, offset, whence);
-#else /* ACE_HAS_WINCE */
-# if defined (ACE_WIN32)
-# if SEEK_SET != FILE_BEGIN || SEEK_CUR != FILE_CURRENT || SEEK_END != FILE_END
- //#error Windows NT is evil AND rude!
- switch (whence)
- {
- case SEEK_SET:
- whence = FILE_BEGIN;
- break;
- case SEEK_CUR:
- whence = FILE_CURRENT;
- break;
- case SEEK_END:
- whence = FILE_END;
- break;
- default:
- errno = EINVAL;
- return -1; // rather safe than sorry
- }
-# endif /* SEEK_SET != FILE_BEGIN || SEEK_CUR != FILE_CURRENT || SEEK_END != FILE_END */
-# endif /* ACE_WIN32 */
- ACE_OSCALL_RETURN (::fseek (fp, offset, whence), int, -1);
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE pid_t
-ACE_OS::waitpid (pid_t pid,
- ACE_exitcode *status,
- int wait_options,
- ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::waitpid");
-#if defined (VXWORKS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (pid);
- ACE_UNUSED_ARG (status);
- ACE_UNUSED_ARG (wait_options);
- ACE_UNUSED_ARG (handle);
-
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_WIN32)
- int blocking_period = ACE_BIT_ENABLED (wait_options, WNOHANG)
- ? 0 /* don't hang */
- : INFINITE;
-
- ACE_HANDLE phandle = handle;
-
- if (phandle == 0)
- {
- phandle = ::OpenProcess (SYNCHRONIZE,
- FALSE,
- pid);
-
- if (phandle == 0)
- {
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
- }
-
- pid_t result = pid;
-
- // Don't try to get the process exit status if wait failed so we can
- // keep the original error code intact.
- switch (::WaitForSingleObject (phandle,
- blocking_period))
- {
- case WAIT_OBJECT_0:
- if (status != 0)
- // The error status of <GetExitCodeProcess> is nonetheless
- // not tested because we don't know how to return the value.
- ::GetExitCodeProcess (phandle,
- status);
- break;
- case WAIT_TIMEOUT:
- errno = ETIME;
- result = 0;
- break;
- default:
- ACE_OS::set_errno_to_last_error ();
- result = -1;
- }
- if (handle == 0)
- ::CloseHandle (phandle);
- return result;
-#elif defined (CHORUS)
- ACE_UNUSED_ARG (status);
- ACE_UNUSED_ARG (wait_options);
- ACE_UNUSED_ARG (handle);
- ACE_OSCALL_RETURN (::await (&ACE_OS::actorcaps_[pid]),
- pid_t, -1);
-#else
- ACE_UNUSED_ARG (handle);
- ACE_OSCALL_RETURN (::waitpid (pid, status, wait_options),
- pid_t, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE pid_t
-ACE_OS::wait (pid_t pid,
- ACE_exitcode *status,
- int wait_options,
- ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_OS::wait");
- return ACE_OS::waitpid (pid,
- status,
- wait_options,
- handle);
-}
-
-ACE_INLINE pid_t
-ACE_OS::wait (int *status)
-{
- ACE_TRACE ("ACE_OS::wait");
-#if defined (ACE_WIN32) || defined (VXWORKS) || defined(CHORUS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (status);
-
- ACE_NOTSUP_RETURN (0);
-#else
-# if defined (ACE_HAS_UNION_WAIT)
- ACE_OSCALL_RETURN (::wait ((union wait *) status), pid_t, -1);
-# else
- ACE_OSCALL_RETURN (::wait (status), pid_t, -1);
-# endif /* ACE_HAS_UNION_WAIT */
-#endif /* defined (ACE_WIN32) */
-}
-
-ACE_INLINE int
-ACE_OS::ioctl (ACE_HANDLE handle,
- int cmd,
- void *val)
-{
- ACE_TRACE ("ACE_OS::ioctl");
-
-#if defined (ACE_WIN32)
- ACE_SOCKET sock = (ACE_SOCKET) handle;
- ACE_SOCKCALL_RETURN (::ioctlsocket (sock, cmd, (u_long *) val), int, -1);
-#elif defined (VXWORKS)
- ACE_OSCALL_RETURN (::ioctl (handle, cmd, ACE_reinterpret_cast (int, val)),
- int, -1);
-#elif defined (ACE_PSOS)
- ACE_OSCALL_RETURN (::ioctl (handle, cmd, (char *) val), int, -1);
-#elif defined (__CYGWIN32__)
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (cmd);
- ACE_UNUSED_ARG (val);
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_OSCALL_RETURN (::ioctl (handle, cmd, val), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::kill (pid_t pid, int signum)
-{
- ACE_TRACE ("ACE_OS::kill");
-#if defined (ACE_WIN32) || defined (CHORUS) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (pid);
- ACE_UNUSED_ARG (signum);
- ACE_NOTSUP_RETURN (-1);
-#else
- ACE_OSCALL_RETURN (::kill (pid, signum), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::sigaction (int signum,
- const struct sigaction *nsa,
- struct sigaction *osa)
-{
- ACE_TRACE ("ACE_OS::sigaction");
- if (signum == 0)
- return 0;
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
- struct sigaction sa;
-
- if (osa == 0)
- osa = &sa;
-
- if (nsa == 0)
- {
- osa->sa_handler = ::signal (signum, SIG_IGN);
- ::signal (signum, osa->sa_handler);
- }
- else
- osa->sa_handler = ::signal (signum, nsa->sa_handler);
- return osa->sa_handler == SIG_ERR ? -1 : 0;
-#elif defined (CHORUS) || defined (ACE_HAS_WINCE) || defined(ACE_PSOS)
- ACE_UNUSED_ARG (signum);
- ACE_UNUSED_ARG (nsa);
- ACE_UNUSED_ARG (osa);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_LACKS_POSIX_PROTOTYPES) || defined (ACE_LACKS_SOME_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::sigaction (signum, (struct sigaction*) nsa, osa), int, -1);
-#else
- ACE_OSCALL_RETURN (::sigaction (signum, nsa, osa), int, -1);
-#endif /* ACE_LACKS_POSIX_PROTOTYPES */
-}
-
-ACE_INLINE ACE_TCHAR *
-ACE_OS::getcwd (ACE_TCHAR *buf, size_t size)
-{
- ACE_TRACE ("ACE_OS::getcwd");
-#if defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (size);
- ACE_NOTSUP_RETURN ( (char*)-1);
-#elif defined (ACE_PSOS)
-
- static char pathbuf [BUFSIZ];
-
- // blank the path buffer
- ACE_OS::memset (pathbuf, '\0', BUFSIZ);
-
- // the following was suggested in the documentation for get_fn ()
- u_long result;
- char cur_dir_name [BUFSIZ] = ".";
-
- u_long cur_dir = 0, prev_dir = 0;
- while ((ACE_OS::strlen (pathbuf) < BUFSIZ) &&
- (ACE_OS::strlen (cur_dir_name) < BUFSIZ - ACE_OS::strlen ("/..")))
- {
- // get the current directory handle
- result = ::get_fn (cur_dir_name, &cur_dir);
-
- // check whether we're at the root: this test is
- // really lame, but the get_fn documentation says
- // *either* condition indicates you're trying to
- // move above the root.
- if ((result != 0) || ( cur_dir == prev_dir))
- {
- break;
- }
-
- // change name to the parent directory
- ACE_OS::strcat (cur_dir_name, "/..");
-
- // open the parent directory
- XDIR xdir;
- result = ::open_dir (cur_dir_name, &xdir);
- if (result != 0)
- {
- return 0;
- }
-
- // look for an entry that matches the current directory handle
- struct dirent dir_entry;
- while (1)
- {
- // get the next directory entry
- result = ::read_dir (&xdir, &dir_entry);
- if (result != 0)
- {
- return 0;
- }
-
- // check for a match
- if (dir_entry.d_filno == cur_dir)
- {
- // prefix the previous path with the entry's name and break
- if (ACE_OS::strlen (pathbuf) + ACE_OS::strlen (dir_entry.d_name) < BUFSIZ)
- {
- ACE_OS::strcpy (pathbuf + ACE_OS::strlen (dir_entry.d_name), pathbuf);
- ACE_OS::strcpy (pathbuf, dir_entry.d_name);
- break;
- }
- else
- {
- // we're out of room in the buffer
- return 0;
- }
- }
- }
-
- // close the parent directory
- result = ::close_dir (&xdir);
- if (result != 0)
- {
- return 0;
- }
-
- // save the current directory handle as the previous
- prev_dir = cur_dir;
- }
-
- // return the path, if there is one
- return (ACE_OS::strlen (pathbuf) > 0) ? pathbuf : (char *) 0;
-#elif defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (buf);
- ACE_UNUSED_ARG (size);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- return ::_wgetcwd (buf, size);
-#else
- ACE_OSCALL_RETURN (::getcwd (buf, size), char *, 0);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::sleep (u_int seconds)
-{
- ACE_TRACE ("ACE_OS::sleep");
-#if defined (ACE_WIN32)
- ::Sleep (seconds * ACE_ONE_SECOND_IN_MSECS);
- return 0;
-#if 0
-#elif defined (HPUX_10) && defined (ACE_HAS_PTHREADS_DRAFT4)
- // On HP-UX 10, _CMA_NOWRAPPERS_ disables the mapping from sleep to cma_sleep
- // which makes sleep() put the whole process to sleep, and keeps it from
- // noticing pending cancels. So, in this case, use pthread_delay_np
- struct timespec rqtp;
- rqtp.tv_sec = seconds;
- rqtp.tv_nsec = 0L;
- return pthread_delay_np (&rqtp);
-#endif /* 0 */
-#elif defined (ACE_HAS_CLOCK_GETTIME)
- struct timespec rqtp;
- // Initializer doesn't work with Green Hills 1.8.7
- rqtp.tv_sec = seconds;
- rqtp.tv_nsec = 0L;
- ACE_OSCALL_RETURN (::nanosleep (&rqtp, 0), int, -1);
-#elif defined (ACE_PSOS)
- timeval wait;
- wait.tv_sec = seconds;
- wait.tv_usec = 0;
- ACE_OSCALL_RETURN (::select (0, 0, 0, 0, &wait), int, -1);
-#else
- ACE_OSCALL_RETURN (::sleep (seconds), int, -1);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::sleep (const ACE_Time_Value &tv)
-{
- ACE_TRACE ("ACE_OS::sleep");
-#if defined (ACE_WIN32)
- ::Sleep (tv.msec ());
- return 0;
-#else
-# if defined (ACE_HAS_NONCONST_SELECT_TIMEVAL)
- // Copy the timeval, because this platform doesn't declare the timeval
- // as a pointer to const.
- timeval tv_copy = tv;
- ACE_OSCALL_RETURN (::select (0, 0, 0, 0, &tv_copy), int, -1);
-# else /* ! ACE_HAS_NONCONST_SELECT_TIMEVAL */
- const timeval *tvp = tv;
- ACE_OSCALL_RETURN (::select (0, 0, 0, 0, tvp), int, -1);
-# endif /* ACE_HAS_NONCONST_SELECT_TIMEVAL */
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::nanosleep (const struct timespec *requested,
- struct timespec *remaining)
-{
- ACE_TRACE ("ACE_OS::nanosleep");
-#if defined (ACE_HAS_CLOCK_GETTIME)
- // ::nanosleep () is POSIX 1003.1b. So is ::clock_gettime (). So,
- // if ACE_HAS_CLOCK_GETTIME is defined, then ::nanosleep () should
- // be available on the platform. On Solaris 2.x, both functions
- // require linking with -lposix4.
- return ::nanosleep ((ACE_TIMESPEC_PTR) requested, remaining);
-#elif defined (ACE_PSOS)
-# if ! defined (ACE_PSOS_DIAB_MIPS)
- double ticks = KC_TICKS2SEC * requested->tv_sec +
- ( ACE_static_cast (double, requested->tv_nsec) *
- ACE_static_cast (double, KC_TICKS2SEC) ) /
- ACE_static_cast (double, ACE_ONE_SECOND_IN_NSECS);
-
- if (ticks > ACE_static_cast (double, ACE_PSOS_Time_t::max_ticks))
- {
- ticks -= ACE_static_cast (double, ACE_PSOS_Time_t::max_ticks);
- remaining->tv_sec = ACE_static_cast (time_t,
- (ticks /
- ACE_static_cast (double,
- KC_TICKS2SEC)));
- ticks -= ACE_static_cast (double, remaining->tv_sec) *
- ACE_static_cast (double, KC_TICKS2SEC);
-
- remaining->tv_nsec =
- ACE_static_cast (long,
- (ticks * ACE_static_cast (double,
- ACE_ONE_SECOND_IN_NSECS)) /
- ACE_static_cast (double, KC_TICKS2SEC));
-
- ::tm_wkafter (ACE_PSOS_Time_t::max_ticks);
- }
- else
- {
- remaining->tv_sec = 0;
- remaining->tv_nsec = 0;
- ::tm_wkafter (ACE_static_cast (u_long, ticks));
- }
-
- // tm_wkafter always returns 0
-# endif /* ACE_PSOS_DIAB_MIPS */
- return 0;
-#else
- ACE_UNUSED_ARG (remaining);
-
- // Convert into seconds and microseconds.
-# if ! defined(ACE_HAS_BROKEN_TIMESPEC_MEMBERS)
- ACE_Time_Value tv (requested->tv_sec,
- requested->tv_nsec / 1000);
-# else
- ACE_Time_Value tv (requested->ts_sec,
- requested->ts_nsec / 1000);
-# endif /* ACE_HAS_BROKEN_TIMESPEC_MEMBERS */
- return ACE_OS::sleep (tv);
-#endif /* ACE_HAS_CLOCK_GETTIME */
-}
-
-ACE_INLINE int
-ACE_OS::mkdir (const ACE_TCHAR *path, mode_t mode)
-{
-#if defined (ACE_PSOS_LACKS_PHILE)
- ACE_UNUSED_ARG (path);
- ACE_UNUSED_ARG (mode);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_PSOS)
- //The pSOS make_dir fails if the last character is a '/'
- int location;
- char *phile_path;
-
- phile_path = (char *)ACE_OS::malloc(strlen(path));
- if (phile_path == 0)
- {
- ACE_OS::printf ("malloc in make_dir failed: [%X]\n",
- errno);
- return -1;
- }
- else
- ACE_OS::strcpy (phile_path, path);
-
- location = ACE_OS::strlen(phile_path);
- if(phile_path[location-1] == '/')
- {
- phile_path[location-1] = 0;
- }
-
- u_long result;
- result = ::make_dir ((char *) phile_path, mode);
- if (result == 0x2011) // Directory already exists
- {
- result = 0;
- }
- else if (result != 0)
- {
- result = -1;
- }
-
- ACE_OS::free(phile_path);
- return result;
-
-#elif defined (VXWORKS)
- ACE_UNUSED_ARG (mode);
- ACE_OSCALL_RETURN (::mkdir ((char *) path), int, -1);
-#elif defined (ACE_WIN32) && defined (__IBMCPP__) && (__IBMCPP__ >= 400)
- ACE_UNUSED_ARG (mode);
- ACE_OSCALL_RETURN (::_mkdir ((char *) path), int, -1);
-#elif defined (ACE_HAS_WINCE)
- ACE_UNUSED_ARG (mode);
- ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::CreateDirectory (path, NULL),
- ace_result_),
- int, -1);
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wmkdir (path), int, -1);
-#elif defined (ACE_WIN32)
- ACE_OSCALL_RETURN (::mkdir (path), int, -1);
-#else
- ACE_OSCALL_RETURN (::mkdir (path, mode), int, -1);
-#endif /* VXWORKS */
-}
-
-ACE_INLINE ACE_TCHAR *
-ACE_OS::getenv (const ACE_TCHAR *symbol)
-{
- ACE_TRACE ("ACE_OS::getenv");
-#if defined (ACE_HAS_WINCE) || defined (ACE_PSOS)
- ACE_UNUSED_ARG (symbol);
- ACE_NOTSUP_RETURN (0);
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wgetenv (symbol), ACE_TCHAR *, 0);
-#else /* ACE_HAS_WINCE || ACE_PSOS */
- ACE_OSCALL_RETURN (::getenv (symbol), char *, 0);
-#endif /* ACE_HAS_WINCE || ACE_PSOS */
-}
-
-ACE_INLINE int
-ACE_OS::putenv (const ACE_TCHAR *string)
-{
- ACE_TRACE ("ACE_OS::putenv");
-#if defined (ACE_HAS_WINCE) || defined (ACE_PSOS)
- // WinCE and pSOS don't have the concept of environment variables.
- ACE_UNUSED_ARG (string);
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_OSCALL_RETURN (::_wputenv (string), int, -1);
-#else /* ! ACE_HAS_WINCE && ! ACE_PSOS */
- // VxWorks declares ::putenv with a non-const arg.
- ACE_OSCALL_RETURN (::putenv ((char *) string), int, -1);
-#endif /* ! ACE_HAS_WINCE && ! ACE_PSOS */
-}
-
-ACE_INLINE
-ACE_Str_Buf::ACE_Str_Buf (void *b, int l, int max)
-{
- this->maxlen = max;
- this->len = l;
- this->buf = (char *) b;
-}
-
-ACE_INLINE
-ACE_Str_Buf::ACE_Str_Buf (strbuf &sb)
-{
- this->maxlen = sb.maxlen;
- this->len = sb.len;
- this->buf = sb.buf;
-}
-
-ACE_INLINE u_int
-ACE_OS::wslen (const WChar *s)
-{
- u_int len = 0;
-
- while (*s++ != 0)
- len++;
-
- return len;
-}
-
-ACE_INLINE ACE_OS::WChar *
-ACE_OS::wscpy (WChar *dest, const WChar *src)
-{
- WChar *original_dest = dest;
-
- while ((*dest++ = *src++) != 0)
- continue;
-
- return original_dest;
-}
-
-ACE_INLINE int
-ACE_OS::wscmp (const WChar *s, const WChar *t)
-{
- const WChar *scan1 = s;
- const WChar *scan2 = t;
-
- while (*scan1 != 0 && *scan1 == *scan2)
- {
- ++scan1;
- ++scan2;
- }
-
- return *scan1 - *scan2;
-}
-
-ACE_INLINE int
-ACE_OS::wsncmp (const WChar *s, const WChar *t, size_t len)
-{
- const WChar *scan1 = s;
- const WChar *scan2 = t;
-
- while (len != 0 && *scan1 != 0 && *scan1 == *scan2)
- {
- ++scan1;
- ++scan2;
- --len;
- }
-
- return len == 0 ? 0 : *scan1 - *scan2;
-}
-
-#if defined (ACE_LACKS_COND_T) && defined (ACE_HAS_THREADS)
-ACE_INLINE long
-ACE_cond_t::waiters (void) const
-{
- return this->waiters_;
-}
-#endif /* ACE_LACKS_COND_T && ACE_HAS_THREADS */
-
-#if 0
-ACE_INLINE int
-ACE_OS::thr_continue (const ACE_Thread_ID &thr_id)
-{
- ACE_TRACE ("ACE_OS::thr_continue");
- return ACE_OS::thr_continue (thr_id.id ());
-}
-
-ACE_INLINE int
-ACE_OS::thr_create (ACE_THR_FUNC func,
- void *args,
- long flags,
- ACE_Thread_ID *thr_id,
- long priority,
- void *stack,
- size_t stacksize);
-{
- ACE_TRACE ("ACE_OS::thr_create");
- ACE_thread_t thread_id;
- ACE_hthread_t thread_handle;
-
- int result = ACE_OS::thr_create (func, args, flags,
- &thread_id, &thread_handle,
- priority, stack, stacksize);
- if (result == -1)
- return -1;
- else if (thr_id != 0)
- {
- thr_id->id (thread_id);
- thr_id->handle (thread_handle);
- return result;
- }
-}
-
-ACE_INLINE int
-ACE_OS::thr_getprio (const ACE_Thread_ID &thr_id, int &prio)
-{
- ACE_TRACE ("ACE_OS::thr_getprio");
- return ACE_OS::thr_getprio (thr_id.handle (), prio);
-}
-
-ACE_INLINE int
-ACE_OS::thr_join (const ACE_Thread_ID &thr_id, void **status)
-{
-# if defined (ACE_WIN32)
- return ACE_OS::thr_join (thr_id.handle (), status);
-# else
- return ACE_OS::thr_join (thr_id.id (), status);
-# endif /* ACE_WIN32 */
-}
-
-ACE_INLINE int
-ACE_OS::thr_cancel (const ACE_Thread_ID &thr_id)
-{
- return ACE_OS::thr_cancel (thr_id.id ());
-}
-
-ACE_INLINE int
-ACE_OS::thr_kill (const ACE_Thread_ID &thr_id, int signum)
-{
- return ACE_OS::thr_kill (thr_id.id (), signum);
-}
-
-ACE_INLINE ACE_Thread_ID
-ACE_OS::thr_self (void)
-{
- ACE_hthread_t thr_handle;
- ACE_OS::thr_self (thr_handle);
- ACE_thread_t thr_id = ACE_OS::thr_self ();
-
- return ACE_Thread_ID (thr_id, thr_handle);
-}
-
-ACE_INLINE int
-ACE_OS::thr_setprio (const ACE_Thread_ID &thr_id, int prio)
-{
- ACE_TRACE ("ACE_OS::thr_setprio");
- return ACE_OS::thr_setprio (thr_id.handle (), prio);
-}
-
-ACE_INLINE int
-ACE_OS::thr_suspend (const ACE_Thread_ID &thr_id)
-{
- return ACE_OS::thr_suspend (thr_id.handle ());
-}
-
-#endif /* 0 */
-
-ACE_INLINE int
-ACE_OS::sigaddset (sigset_t *s, int signum)
-{
- ACE_TRACE ("ACE_OS::sigaddset");
-#if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS)
- if (s == NULL)
- {
- errno = EFAULT;
- return -1;
- }
- else if (signum < 1 || signum >= ACE_NSIG)
- {
- errno = EINVAL;
- return -1; // Invalid signum, return error
- }
-# if defined (ACE_PSOS) && defined (__DIAB) && ! defined(ACE_PSOS_DIAB_MIPS) && !defined (ACE_PSOS_DIAB_PPC)
- // treat 0th u_long of sigset_t as high bits,
- // and 1st u_long of sigset_t as low bits.
- if (signum <= ACE_BITS_PER_ULONG)
- s->s[1] |= (1 << (signum - 1));
- else
- s->s[0] |= (1 << (signum - ACE_BITS_PER_ULONG - 1));
-# else
- *s |= (1 << (signum - 1)) ;
-# endif /* defined (ACE_PSOS) && defined (__DIAB) */
- return 0 ;
-#else
- ACE_OSCALL_RETURN (::sigaddset (s, signum), int, -1);
-#endif /* ACE_LACKS_SIGSET || ACE_LACKS_SIGSET_DEFINITIONS */
-}
-
-ACE_INLINE int
-ACE_OS::sigdelset (sigset_t *s, int signum)
-{
-#if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS)
- if (s == NULL)
- {
- errno = EFAULT;
- return -1;
- }
- else if (signum < 1 || signum >= ACE_NSIG)
- {
- errno = EINVAL;
- return -1; // Invalid signum, return error
- }
-# if defined (ACE_PSOS) && defined (__DIAB) && ! defined (ACE_PSOS_DIAB_MIPS) && !defined (ACE_PSOS_DIAB_PPC)
- // treat 0th u_long of sigset_t as high bits,
- // and 1st u_long of sigset_t as low bits.
- if (signum <= ACE_BITS_PER_ULONG)
- s->s[1] &= ~(1 << (signum - 1));
- else
- s->s[0] &= ~(1 << (signum - ACE_BITS_PER_ULONG - 1));
-# else
- *s &= ~(1 << (signum - 1)) ;
-# endif /* defined (ACE_PSOS) && defined (__DIAB) */
- return 0;
-#else
- ACE_OSCALL_RETURN (::sigdelset (s, signum), int, -1);
-#endif /* ACE_LACKS_SIGSET || ACE_LACKS_SIGSET_DEFINITIONS */
-}
-
-ACE_INLINE int
-ACE_OS::sigemptyset (sigset_t *s)
-{
-#if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS)
- if (s == NULL)
- {
- errno = EFAULT;
- return -1;
- }
-# if defined (ACE_PSOS) && defined (__DIAB) && ! defined (ACE_PSOS_DIAB_MIPS) && !defined (ACE_PSOS_DIAB_PPC)
- s->s[0] = 0;
- s->s[1] = 0;
-# else
- *s = 0 ;
-# endif /* defined (ACE_PSOS) && defined (__DIAB) */
- return 0 ;
-#else
- ACE_OSCALL_RETURN (::sigemptyset (s), int, -1);
-#endif /* ACE_LACKS_SIGSET || ACE_LACKS_SIGSET_DEFINITIONS */
-}
-
-ACE_INLINE int
-ACE_OS::sigfillset (sigset_t *s)
-{
-#if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS)
- if (s == NULL)
- {
- errno = EFAULT;
- return -1;
- }
-# if defined (ACE_PSOS) && defined (__DIAB) && ! defined (ACE_PSOS_DIAB_MIPS) && !defined (ACE_PSOS_DIAB_PPC)
- s->s[0] = ~(u_long) 0;
- s->s[1] = ~(u_long) 0;
-# else
- *s = ~(sigset_t) 0;
-# endif /* defined (ACE_PSOS) && defined (__DIAB) */
- return 0 ;
-#else
- ACE_OSCALL_RETURN (::sigfillset (s), int, -1);
-#endif /* ACE_LACKS_SIGSET || ACE_LACKS_SIGSET_DEFINITIONS */
-}
-
-ACE_INLINE int
-ACE_OS::sigismember (sigset_t *s, int signum)
-{
-#if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS)
- if (s == NULL)
- {
- errno = EFAULT;
- return -1;
- }
- else if (signum < 1 || signum >= ACE_NSIG)
- {
- errno = EINVAL;
- return -1; // Invalid signum, return error
- }
-# if defined (ACE_PSOS) && defined (__DIAB) && ! defined (ACE_PSOS_DIAB_MIPS) && !defined (ACE_PSOS_DIAB_PPC)
- // treat 0th u_long of sigset_t as high bits,
- // and 1st u_long of sigset_t as low bits.
- if (signum <= ACE_BITS_PER_ULONG)
- return ((s->s[1] & (1 << (signum - 1))) != 0);
- else
- return ((s->s[0] & (1 << (signum - ACE_BITS_PER_ULONG - 1))) != 0);
-# else
- return ((*s & (1 << (signum - 1))) != 0) ;
-# endif /* defined (ACE_PSOS) && defined (__DIAB) */
-#else
-# if defined (ACE_HAS_SIGISMEMBER_BUG)
- if (signum < 1 || signum >= ACE_NSIG)
- {
- errno = EINVAL;
- return -1; // Invalid signum, return error
- }
-# endif /* ACE_HAS_SIGISMEMBER_BUG */
- ACE_OSCALL_RETURN (::sigismember (s, signum), int, -1);
-#endif /* ACE_LACKS_SIGSET || ACE_LACKS_SIGSET_DEFINITIONS */
-}
-
-ACE_INLINE int
-ACE_OS::sigsuspend (const sigset_t *sigset)
-{
-#if defined (ACE_HAS_SIGSUSPEND)
- sigset_t s;
-
- if (sigset == 0)
- {
- sigset = &s;
- ACE_OS::sigemptyset (&s);
- }
- ACE_OSCALL_RETURN (::sigsuspend (sigset), int, -1);
-#else
- ACE_UNUSED_ARG (sigset);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SIGSUSPEND */
-}
-
-ACE_INLINE int
-ACE_OS::sigprocmask (int how, const sigset_t *nsp, sigset_t *osp)
-{
-#if defined (ACE_LACKS_SIGSET) || defined (ACE_LACKS_SIGSET_DEFINITIONS)
- ACE_UNUSED_ARG (how);
- ACE_UNUSED_ARG (nsp);
- ACE_UNUSED_ARG (osp);
- ACE_NOTSUP_RETURN (-1);
-#else
-# if defined (ACE_LACKS_POSIX_PROTOTYPES)
- ACE_OSCALL_RETURN (::sigprocmask (how, (int*) nsp, osp), int, -1);
-# else
- ACE_OSCALL_RETURN (::sigprocmask (how, nsp, osp), int, -1);
-# endif /* ACE_LACKS_POSIX_PROTOTYPES */
-#endif /* ACE_LACKS_SIGSET || ACE_LACKS_SIGSET_DEFINITIONS */
-}
-
-ACE_INLINE int
-ACE_OS::pthread_sigmask (int how, const sigset_t *nsp, sigset_t *osp)
-{
-#if defined (ACE_HAS_PTHREADS_STD) && !defined (ACE_LACKS_PTHREAD_SIGMASK)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_sigmask (how, nsp, osp),
- ace_result_),
- int,
- -1);
-#else /* !ACE_HAS_PTHREADS_STD */
- ACE_UNUSED_ARG (how);
- ACE_UNUSED_ARG (nsp);
- ACE_UNUSED_ARG (osp);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_PTHREADS_STD */
-}
-
-ACE_INLINE void *
-ACE_OS::sbrk (int brk)
-{
- ACE_TRACE ("ACE_OS::sbrk");
-
-#if defined (ACE_LACKS_SBRK)
- ACE_UNUSED_ARG (brk);
- ACE_NOTSUP_RETURN (0);
-#else
- ACE_OSCALL_RETURN (::sbrk (brk), void *, 0);
-#endif /* VXWORKS */
-}
-
-ACE_INLINE long
-ACE_OS_Thread_Descriptor::flags (void) const
-{
- ACE_TRACE ("ACE_OS_Thread_Descriptor::flags");
- return flags_;
-}
-
-
-ACE_INLINE
-ACE_OS_Thread_Descriptor::ACE_OS_Thread_Descriptor (long flags)
- : flags_ (flags)
-{
-}
-
-
-ACE_INLINE ACE_Thread_Manager *
-ACE_Thread_Adapter::thr_mgr (void)
-{
- return this->thr_mgr_;
-}
-
-ACE_INLINE
-ACE_Thread_Adapter::~ACE_Thread_Adapter (void)
-{
-}
-
-ACE_INLINE ACE_THR_C_FUNC
-ACE_Thread_Adapter::entry_point (void)
-{
- return this->entry_point_;
-}
-
-#if defined (ACE_PSOS)
-ACE_INLINE int
-isatty (int h)
-{
- return ACE_OS::isatty (h);
-}
-#if defined (fileno)
-#undef fileno
-#endif /* defined (fileno)*/
-ACE_INLINE ACE_HANDLE
-fileno (FILE *fp)
-{
- return (ACE_HANDLE) fp;
-}
-#endif /* defined (ACE_PSOS) */
-
-ACE_INLINE
-ACE_Cleanup::ACE_Cleanup (void)
-{
-}
-
-ACE_INLINE void *
-ACE_OS::bsearch (const void *key,
- const void *base,
- size_t nel,
- size_t size,
- ACE_COMPARE_FUNC compar)
-{
-#if !defined (ACE_LACKS_BSEARCH)
- return ::bsearch (key, base, nel, size, compar);
-#else
- ACE_UNUSED_ARG (key);
- ACE_UNUSED_ARG (base);
- ACE_UNUSED_ARG (nel);
- ACE_UNUSED_ARG (size);
- ACE_UNUSED_ARG (compar);
- ACE_NOTSUP_RETURN (NULL);
-#endif /* ACE_LACKS_BSEARCH */
-}
-
-ACE_INLINE void
-ACE_OS::qsort (void *base,
- size_t nel,
- size_t width,
- ACE_COMPARE_FUNC compar)
-{
-#if !defined (ACE_LACKS_QSORT)
- ::qsort (base, nel, width, compar);
-#else
- ACE_UNUSED_ARG (base);
- ACE_UNUSED_ARG (nel);
- ACE_UNUSED_ARG (width);
- ACE_UNUSED_ARG (compar);
-#endif /* ACE_LACKS_QSORT */
-}
-
-ACE_INLINE int
-ACE_OS::setuid (uid_t uid)
-{
- ACE_TRACE ("ACE_OS::setuid");
-# if defined (VXWORKS) || defined (ACE_PSOS)
- // setuid() is not supported: just one user anyways
- ACE_UNUSED_ARG (uid);
- return 0;
-# elif defined (ACE_WIN32) || defined(CHORUS)
- ACE_UNUSED_ARG (uid);
- ACE_NOTSUP_RETURN (-1);
-# else
- ACE_OSCALL_RETURN (::setuid (uid), int, -1);
-# endif /* VXWORKS */
-}
-
-ACE_INLINE uid_t
-ACE_OS::getuid (void)
-{
- ACE_TRACE ("ACE_OS::getuid");
-# if defined (VXWORKS) || defined (ACE_PSOS)
- // getuid() is not supported: just one user anyways
- return 0;
-# elif defined (ACE_WIN32) || defined(CHORUS)
- ACE_NOTSUP_RETURN (ACE_static_cast (uid_t, -1));
-# else
- ACE_OSCALL_RETURN (::getuid (), uid_t, (uid_t) -1);
-# endif /* VXWORKS */
-}
-
-ACE_INLINE int
-ACE_OS::setgid (gid_t gid)
-{
- ACE_TRACE ("ACE_OS::setgid");
-# if defined (VXWORKS) || defined (ACE_PSOS)
- // setgid() is not supported: just one user anyways
- ACE_UNUSED_ARG (gid);
- return 0;
-# elif defined (ACE_WIN32) || defined(CHORUS)
- ACE_UNUSED_ARG (gid);
- ACE_NOTSUP_RETURN (-1);
-# else
- ACE_OSCALL_RETURN (::setgid (gid), int, -1);
-# endif /* VXWORKS */
-}
-
-ACE_INLINE gid_t
-ACE_OS::getgid (void)
-{
- ACE_TRACE ("ACE_OS::getgid");
-# if defined (VXWORKS) || defined (ACE_PSOS)
- // getgid() is not supported: just one user anyways
- return 0;
-# elif defined (ACE_WIN32) || defined(CHORUS)
- ACE_NOTSUP_RETURN (ACE_static_cast (gid_t, -1));
-# else
- ACE_OSCALL_RETURN (::getgid (), gid_t, (gid_t) -1);
-# endif /* VXWORKS */
-}
-
-ACE_INLINE ACE_EXIT_HOOK
-ACE_OS::set_exit_hook (ACE_EXIT_HOOK exit_hook)
-{
- ACE_EXIT_HOOK old_hook = exit_hook_;
- exit_hook_ = exit_hook;
- return old_hook;
-}
-
-ACE_INLINE int
-ACE_OS::isatty (int handle)
-{
-# if defined (ACE_LACKS_ISATTY)
- ACE_UNUSED_ARG (handle);
- return 0;
-# elif defined (ACE_WIN32)
- ACE_TRACE ("ACE_OS::isatty");
- return ::_isatty (handle);
-# else
- ACE_TRACE ("ACE_OS::isatty");
- ACE_OSCALL_RETURN (::isatty (handle), int, -1);
-# endif /* defined (ACE_LACKS_ISATTY) */
-}
-
-#if defined (ACE_WIN32)
-ACE_INLINE int
-ACE_OS::isatty (ACE_HANDLE handle)
-{
-#if defined (ACE_LACKS_ISATTY)
- ACE_UNUSED_ARG (handle);
- return 0;
-#else
- int fd = ::_open_osfhandle ((long) handle, 0);
- return ::_isatty (fd);
-#endif /* ACE_LACKS_ISATTY */
-}
-
-ACE_INLINE void
-ACE_OS::fopen_mode_to_open_mode_converter (ACE_TCHAR x, int &hmode)
-{
- switch (x)
- {
- case ACE_TEXT ('r'):
- if (ACE_BIT_DISABLED (hmode, _O_RDWR))
- {
- ACE_CLR_BITS (hmode, _O_WRONLY);
- ACE_SET_BITS (hmode, _O_RDONLY);
- }
- break;
- case ACE_TEXT ('w'):
- if (ACE_BIT_DISABLED (hmode, _O_RDWR))
- {
- ACE_CLR_BITS (hmode, _O_RDONLY);
- ACE_SET_BITS (hmode, _O_WRONLY);
- }
- ACE_SET_BITS (hmode, _O_CREAT | _O_TRUNC);
- break;
- case ACE_TEXT ('a'):
- if (ACE_BIT_DISABLED (hmode, _O_RDWR))
- {
- ACE_CLR_BITS (hmode, _O_RDONLY);
- ACE_SET_BITS (hmode, _O_WRONLY);
- }
- ACE_SET_BITS (hmode, _O_CREAT | _O_APPEND);
- break;
- case ACE_TEXT ('+'):
- ACE_CLR_BITS (hmode, _O_RDONLY | _O_WRONLY);
- ACE_SET_BITS (hmode, _O_RDWR);
- break;
- case ACE_TEXT ('t'):
- ACE_CLR_BITS (hmode, _O_BINARY);
- ACE_SET_BITS (hmode, _O_TEXT);
- break;
- case ACE_TEXT ('b'):
- ACE_CLR_BITS (hmode, _O_TEXT);
- ACE_SET_BITS (hmode, _O_BINARY);
- break;
- }
-}
-#endif /* ACE_WIN32 */
-
-// Return a dynamically allocated duplicate of <str>, substituting the
-// environment variable if <str[0] == '$'>. Note that the pointer is
-// allocated with <ACE_OS::malloc> and must be freed by
-// <ACE_OS::free>.
-
-ACE_INLINE ACE_TCHAR *
-ACE_OS::strenvdup (const ACE_TCHAR *str)
-{
-#if defined (ACE_HAS_WINCE)
- // WinCE doesn't have environment variables so we just skip it.
- return ACE_OS::strdup (str);
-#else
- ACE_TCHAR *temp = 0;
-
- if (str[0] == ACE_TEXT ('$')
- && (temp = ACE_OS::getenv (&str[1])) != 0)
- return ACE_OS::strdup (temp);
- else
- return ACE_OS::strdup (str);
-#endif /* ACE_HAS_WINCE */
-}
-
-ACE_INLINE int
-ACE_Countdown_Time::start (void)
-{
- if (this->max_wait_time_ != 0)
- {
- this->start_time_ = ACE_OS::gettimeofday ();
- this->stopped_ = 0;
- }
- return 0;
-}
-
-ACE_INLINE int
-ACE_Countdown_Time::stop (void)
-{
- if (this->max_wait_time_ != 0 && this->stopped_ == 0)
- {
- ACE_Time_Value elapsed_time =
- ACE_OS::gettimeofday () - this->start_time_;
-
- if (*this->max_wait_time_ > elapsed_time)
- *this->max_wait_time_ -= elapsed_time;
- else
- {
- // Used all of timeout.
- *this->max_wait_time_ = ACE_Time_Value::zero;
- // errno = ETIME;
- }
- this->stopped_ = 1;
- }
- return 0;
-}
-
-ACE_INLINE int
-ACE_Countdown_Time::update (void)
-{
- return this->stop () == 0 && this->start ();
-}
-
-
-#if defined (ACE_WIN32)
-ACE_INLINE const OSVERSIONINFO &
-ACE_OS::get_win32_versioninfo ()
-{
- return ACE_OS::win32_versioninfo_;
-}
-#endif /* ACE_WIN32 */
diff --git a/ace/OS_Dirent.cpp b/ace/OS_Dirent.cpp
deleted file mode 100644
index b779f96e47e..00000000000
--- a/ace/OS_Dirent.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// $Id$
-
-#include "ace/OS_Dirent.h"
-
-// @@ (brunsch) We have to include OS.h here for the string operations.
-// Once the string stuff gets split off, then we can just include that
-// instead.
-#include "ace/OS.h"
-
-ACE_RCSID(ace, OS_Dirent, "$Id$")
-
-#if !defined (ACE_HAS_INLINED_OSCALLS)
-# include "ace/OS_Dirent.inl"
-#endif /* ACE_HAS_INLINED_OS_CALLS */
-
-DIR *
-ACE_OS_Dirent::opendir (const ACE_TCHAR *filename)
-{
-#if defined (ACE_HAS_DIRENT)
-# if defined (ACE_PSOS)
-
- // The pointer to the DIR buffer must be passed to ACE_OS_Dirent::closedir
- // in order to free it and avoid a memory leak.
- DIR *dir;
- u_long result;
- ACE_NEW_RETURN (dir, DIR, 0);
-#if defined (ACE_PSOS_DIAB_PPC)
- result = ::open_dir (ACE_const_cast (char *, filename), &(dir->xdir));
-#else
- result = ::open_dir (ACE_const_cast (char *, filename), dir);
-#endif /* defined ACE_PSOS_DIAB_PPC */
- if (result == 0)
- return dir;
- else
- {
- errno = result;
- return 0;
- }
-
-# else /* ! defined (ACE_PSOS) */
-#if defined (ACE_WIN32)
- DIR *dir;
- ACE_NEW_RETURN (dir, DIR, 0);
- ACE_NEW_RETURN (dir->directory_name_,
- ACE_TCHAR[ACE_OS::strlen (filename)],
- 0);
- ACE_OS::strcpy (dir->directory_name_, filename);
- dir->current_handle_ = INVALID_HANDLE_VALUE;
- dir->started_reading_ = 0;
- return dir;
-#else
- // VxWorks' ::opendir () is declared with a non-const argument.
- return ::opendir (ACE_const_cast (char *, filename));
-#endif /* defined (ACE_WIN32) */
-# endif /* ! defined (ACE_PSOS) */
-#else
- ACE_UNUSED_ARG (filename);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_DIRENT */
-}
diff --git a/ace/OS_Dirent.h b/ace/OS_Dirent.h
deleted file mode 100644
index cbcd61c3228..00000000000
--- a/ace/OS_Dirent.h
+++ /dev/null
@@ -1,104 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// OS_Dirent.h
-//
-// = AUTHOR
-// (Originally in OS.h)
-// Doug Schmidt <schmidt@cs.wustl.edu>, Jesper S. M|ller
-// <stophph@diku.dk>, and a cast of thousands...
-//
-// ============================================================================
-
-#ifndef ACE_OS_DIRENT_H
-#define ACE_OS_DIRENT_H
-#include "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (ACE_WIN32) && !defined (ACE_PSOS)
-# include /**/ <sys/types.h>
-# include /**/ <dirent.h>
-#endif /* !ACE_WIN32 && !ACE_PSOS */
-
-// At least compile on some of the platforms without DIR info yet.
-# if !defined (ACE_HAS_DIRENT)
-typedef int DIR;
-struct dirent {
-};
-# endif /* ACE_HAS_DIRENT */
-
-#if defined (ACE_WIN32)
-struct dirent {
- unsigned short d_ino;
- unsigned short d_off;
- unsigned short d_reclen;
- const ACE_TCHAR *d_name;
-};
-
-struct DIR {
- ACE_TCHAR *directory_name_;
- // The name of the directory we are looking into
-
- HANDLE current_handle_;
- // Remember the handle between calls.
-
- dirent dirent_;
- // The struct for the results
-
- ACE_TEXT_WIN32_FIND_DATA fdata_;
- // The struct for intermediate results.
-
- int started_reading_;
- // A flag to remember if we started reading already.
-};
-#elif defined (ACE_PSOS)
-// pHILE+ calls the DIR struct XDIR instead
-# if !defined (ACE_PSOS_DIAB_PPC)
-typedef XDIR DIR;
-# endif /* !defined (ACE_PSOS_DIAB_PPC) */
-#endif /* ACE_WIN32 && ACE_PSOS */
-
-#if defined rewinddir
-# undef rewinddir
-#endif /* rewinddir */
-
-class ACE_Export ACE_OS_Dirent
- // = TITLE
- // This class is a wrapper for the dirent.h operations
- //
- // = DESCRIPTION
-{
-public:
- static DIR *opendir (const ACE_TCHAR *filename);
- static void closedir (DIR *);
- static struct dirent *readdir (DIR *);
- static int readdir_r (DIR *dirp,
- struct dirent *entry,
- struct dirent **result);
- static long telldir (DIR *);
- static void seekdir (DIR *,
- long loc);
- static void rewinddir (DIR *);
-};
-
-# if defined (ACE_HAS_INLINED_OSCALLS)
-# if defined (ACE_INLINE)
-# undef ACE_INLINE
-# endif /* ACE_INLINE */
-# define ACE_INLINE inline
-# include "ace/OS_Dirent.inl"
-# endif /* ACE_HAS_INLINED_OSCALLS */
-
-#include "ace/post.h"
-#endif /* ACE_OS_DIRENT_H */
diff --git a/ace/OS_Dirent.inl b/ace/OS_Dirent.inl
deleted file mode 100644
index a14dc02543e..00000000000
--- a/ace/OS_Dirent.inl
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE void
-ACE_OS_Dirent::closedir (DIR *d)
-{
-#if defined (ACE_HAS_DIRENT)
-# if defined (ACE_PSOS)
- u_long result;
-#if defined (ACE_PSOS_DIAB_PPC)
- result = ::close_dir (&(d->xdir));
-#else
- result = ::close_dir (d);
-#endif /* defined ACE_PSOS_DIAB_PPC */
- delete d;
- if (result != 0)
- errno = result;
-# else /* ! defined (ACE_PSOS) */
-# if defined (ACE_WIN32)
- if (d->current_handle_ != INVALID_HANDLE_VALUE)
- ::FindClose (d->current_handle_);
- d->current_handle_ = INVALID_HANDLE_VALUE;
- d->started_reading_ = 0;
-# else /* defined (ACE_WIN32) */
- ::closedir (d);
-# endif /* defined (ACE_WIN32) */
-# endif /* ! defined (ACE_PSOS) */
-#else
- ACE_UNUSED_ARG (d);
-#endif /* ACE_HAS_DIRENT */
-}
-
-ACE_INLINE struct dirent *
-ACE_OS_Dirent::readdir (DIR *d)
-{
-#if defined (ACE_HAS_DIRENT)
-# if defined (ACE_PSOS)
- // The returned pointer to the dirent struct must be deleted by the
- // caller to avoid a memory leak.
- struct dirent *dir_ent;
- u_long result;
-
- ACE_NEW_RETURN (dir_ent,
- dirent,
- 0);
-#if defined (ACE_PSOS_DIAB_PPC)
- result = ::read_dir (&(d->xdir), dir_ent);
-#else
- result = ::read_dir (d, dir_ent);
-#endif /* defined ACE_PSOS_DIAB_PPC) */
-
- if (0 == result)
- return dir_ent;
- else
- {
- errno = result;
- return 0;
- }
-
-# else /* ! defined (ACE_PSOS) */
-# if defined (ACE_WIN32)
- if (!d->started_reading_)
- {
- d->current_handle_ = ACE_TEXT_FindFirstFile (d->directory_name_,
- &(d->fdata_));
-
- if (d->current_handle_ != INVALID_HANDLE_VALUE
- && d->fdata_.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY)
- {
- ::FindClose (d->current_handle_);
- d->current_handle_ = INVALID_HANDLE_VALUE;
- }
- else // Skip "." and ".."
- {
- int retval = 1;
- while (*(d->fdata_.cFileName) == '.'
- && retval
- && d->current_handle_ != INVALID_HANDLE_VALUE)
- {
- retval = ACE_TEXT_FindNextFile (d->current_handle_,
- &(d->fdata_));
- }
- if (retval == 0)
- d->current_handle_ = INVALID_HANDLE_VALUE;
- }
-
- d->started_reading_ = 1;
- }
- else
- {
- int retval = ACE_TEXT_FindNextFile (d->current_handle_,
- &(d->fdata_));
- if (retval == 0)
- d->current_handle_ = INVALID_HANDLE_VALUE;
- }
-
- if (d->current_handle_ != INVALID_HANDLE_VALUE)
- {
- d->dirent_.d_name = d->fdata_.cFileName;
- return &(d->dirent_);
- }
- else
- return 0;
-# else /* defined (ACE_WIN32) */
- return ::readdir (d);
-# endif /* defined (ACE_WIN32) */
-# endif /* ! defined (ACE_PSOS) */
-#else
- ACE_UNUSED_ARG (d);
- ACE_NOTSUP_RETURN (0);
-#endif /* ACE_HAS_DIRENT */
-}
-
-ACE_INLINE int
-ACE_OS_Dirent::readdir_r (DIR *dirp,
- struct dirent *entry,
- struct dirent **result)
-{
-# if !defined (ACE_HAS_REENTRANT_FUNCTIONS)
- ACE_UNUSED_ARG (entry);
- // <result> has better not be 0!
- *result = ACE_OS_Dirent::readdir (dirp);
- return 0;
-# elif defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_READDIR_R)
-# if (defined (sun) && (defined (_POSIX_PTHREAD_SEMANTICS) || \
- (_FILE_OFFSET_BITS == 64))) || \
- (!defined (sun) && (defined (ACE_HAS_PTHREADS_STD) || \
- defined (ACE_HAS_PTHREADS_DRAFT7) || \
- defined (__USE_POSIX)))
-# if defined (__GNUG__) && defined (DIGITAL_UNIX)
- return readdir_r (dirp, entry, result);
-# else
- return ::readdir_r (dirp, entry, result);
-# endif /* defined (__GNUG__) && defined (DIGITAL_UNIX) */
- return ::readdir_r (dirp, entry, result);
-# else /* ! POSIX.1c - this is draft 4 or draft 6 */
-# if defined (HPUX_10) /* But HP 10.x doesn't follow the draft either */
- *result = entry;
- return ::readdir_r (dirp, entry);
-# else
- // <result> had better not be 0!
- *result = ::readdir_r (dirp, entry);
- return 0;
-# endif /* HPUX_10 */
-# endif /* ! POSIX.1c */
-#else /* ! ACE_HAS_DIRENT || ACE_LACKS_READDIR_R */
- ACE_UNUSED_ARG (dirp);
- ACE_UNUSED_ARG (entry);
- ACE_UNUSED_ARG (result);
- ACE_NOTSUP_RETURN (0);
-
-#endif /* !ACE_HAS_REENTRANT_FUNCTIONS */
-}
-
-ACE_INLINE long
-ACE_OS_Dirent::telldir (DIR *d)
-{
-#if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_TELLDIR)
- return ::telldir (d);
-#else /* ! ACE_HAS_DIRENT || ACE_LACKS_TELLDIR */
- ACE_UNUSED_ARG (d);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ! ACE_HAS_DIRENT || ACE_LACKS_TELLDIR */
-}
-
-ACE_INLINE void
-ACE_OS_Dirent::seekdir (DIR *d, long loc)
-{
-#if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_SEEKDIR)
- ::seekdir (d, loc);
-#else /* ! ACE_HAS_DIRENT || ACE_LACKS_SEEKDIR */
- ACE_UNUSED_ARG (d);
- ACE_UNUSED_ARG (loc);
-#endif /* ! ACE_HAS_DIRENT || ACE_LACKS_SEEKDIR */
-}
-
-ACE_INLINE void
-ACE_OS_Dirent::rewinddir (DIR *d)
-{
-#if defined (ACE_HAS_DIRENT)
-# if defined (ACE_LACKS_SEEKDIR)
-# if defined (ACE_LACKS_REWINDDIR)
- ACE_UNUSED_ARG (d);
-# else /* ! defined (ACE_LACKS_REWINDDIR) */
- ::rewinddir (d);
-# endif /* ! defined (ACE_LACKS_REWINDDIR) */
-# else /* ! ACE_LACKS_SEEKDIR */
- // We need to implement <rewinddir> using <seekdir> since it's often
- // defined as a macro...
- ::seekdir (d, long (0));
-# endif /* ! ACE_LACKS_SEEKDIR */
-#else
- ACE_UNUSED_ARG (d);
-#endif /* ACE_HAS_DIRENT */
-}
diff --git a/ace/Object_Manager.cpp b/ace/Object_Manager.cpp
deleted file mode 100644
index 88a6cb502aa..00000000000
--- a/ace/Object_Manager.cpp
+++ /dev/null
@@ -1,870 +0,0 @@
-// $Id$
-
-#include "ace/Object_Manager.h"
-#if !defined (ACE_LACKS_ACE_TOKEN)
-# include "ace/Token_Manager.h"
-#endif /* ! ACE_LACKS_ACE_TOKEN */
-#if defined (ACE_LACKS_ACE_SVCCONF)
-# if !defined (ACE_HAS_WINCE)
-# include "ace/Proactor.h"
-# endif /* !ACE_HAS_WINCE */
-# include "ace/Reactor.h"
-# include "ace/Thread_Manager.h"
-#else /* ! ACE_LACKS_ACE_SVCCONF */
-# if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER)
-# include "ace/Naming_Context.h"
-# endif /* ! ACE_HAS_WINCE && ! ACE_LACKS_ACE_OTHER */
-# include "ace/Service_Manager.h"
-# include "ace/Service_Config.h"
-#endif /* ! ACE_LACKS_ACE_SVCCONF */
-#include "ace/Signal.h"
-#include "ace/Log_Msg.h"
-#include "ace/Containers.h"
-#include "ace/Synch.h"
-#include "ace/Malloc.h"
-#include "ace/Signal.h"
-
-#if !defined (__ACE_INLINE__)
-# include "ace/Object_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Object_Manager, "$Id$")
-
-#if ! defined (ACE_APPLICATION_PREALLOCATED_OBJECT_DEFINITIONS)
-# define ACE_APPLICATION_PREALLOCATED_OBJECT_DEFINITIONS
-#endif /* ACE_APPLICATION_PREALLOCATED_OBJECT_DEFINITIONS */
-
-#if ! defined (ACE_APPLICATION_PREALLOCATED_ARRAY_DEFINITIONS)
-# define ACE_APPLICATION_PREALLOCATED_ARRAY_DEFINITIONS
-#endif /* ACE_APPLICATION_PREALLOCATED_ARRAY_DEFINITIONS */
-
-#if ! defined (ACE_APPLICATION_PREALLOCATED_OBJECT_DELETIONS)
-# define ACE_APPLICATION_PREALLOCATED_OBJECT_DELETIONS
-#endif /* ACE_APPLICATION_PREALLOCATED_OBJECT_DELETIONS */
-
-#if ! defined (ACE_APPLICATION_PREALLOCATED_ARRAY_DELETIONS)
-# define ACE_APPLICATION_PREALLOCATED_ARRAY_DELETIONS
-#endif /* ACE_APPLICATION_PREALLOCATED_ARRAY_DELETIONS */
-
-// Singleton pointer.
-ACE_Object_Manager *ACE_Object_Manager::instance_ = 0;
-
-void *ACE_Object_Manager::preallocated_object[
- ACE_Object_Manager::ACE_PREALLOCATED_OBJECTS] = { 0 };
-
-void *ACE_Object_Manager::preallocated_array[
- ACE_Object_Manager::ACE_PREALLOCATED_ARRAYS] = { 0 };
-
-// Handy macros for use by ACE_Object_Manager constructor to
-// preallocate or delete an object or array, either statically (in
-// global data) or dynamically (on the heap).
-#if defined (ACE_HAS_STATIC_PREALLOCATION)
-# define ACE_PREALLOCATE_OBJECT(TYPE, ID)\
- {\
- static ACE_Cleanup_Adapter<TYPE> obj;\
- preallocated_object[ID] = &obj;\
- }
-# define ACE_PREALLOCATE_ARRAY(TYPE, ID, COUNT)\
- {\
- static ACE_Cleanup_Adapter<TYPE> obj[COUNT];\
- preallocated_array[ID] = &obj;\
- }
-#else
-# define ACE_PREALLOCATE_OBJECT(TYPE, ID)\
- {\
- ACE_Cleanup_Adapter<TYPE> *obj_p;\
- ACE_NEW_RETURN (obj_p, ACE_Cleanup_Adapter<TYPE>, -1);\
- preallocated_object[ID] = obj_p;\
- }
-# define ACE_PREALLOCATE_ARRAY(TYPE, ID, COUNT)\
- {\
- ACE_Cleanup_Adapter<TYPE[COUNT]> *array_p;\
- ACE_NEW_RETURN (array_p, ACE_Cleanup_Adapter<TYPE[COUNT]>, -1);\
- preallocated_array[ID] = array_p;\
- }
-# define ACE_DELETE_PREALLOCATED_OBJECT(TYPE, ID)\
- ace_cleanup_destroyer (\
- (ACE_Cleanup_Adapter<TYPE> *) preallocated_object[ID], 0);\
- preallocated_object[ID] = 0;
-# define ACE_DELETE_PREALLOCATED_ARRAY(TYPE, ID, COUNT)\
- delete (ACE_Cleanup_Adapter<TYPE[COUNT]> *) preallocated_array[ID];\
- preallocated_array[ID] = 0;
-#endif /* ACE_HAS_STATIC_PREALLOCATION */
-
-#if !defined (ACE_LACKS_ACE_SVCCONF)
-
-class ACE_Object_Manager_Preallocations
-{
- // = TITLE
- // Performs preallocations of certain statically allocated
- // services needed by ACE.
-public:
- ACE_Object_Manager_Preallocations (void);
- ~ACE_Object_Manager_Preallocations (void);
-
-private:
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER)
- ACE_Static_Svc_Descriptor ace_svc_desc_ACE_Naming_Context;
-#endif /* ! ACE_HAS_WINCE && ! ACE_LACKS_ACE_OTHER */
- ACE_Static_Svc_Descriptor ace_svc_desc_ACE_Service_Manager;
-};
-
-// We can't use the ACE_SVC_FACTORY_DECLARE macro here because this
-// needs to be in the ACE_Export context rather than the
-// ACE_Svc_Export context.
-extern "C" ACE_Export
-ACE_Service_Object *
-_make_ACE_Service_Manager (ACE_Service_Object_Exterminator *);
-
-ACE_Object_Manager_Preallocations::ACE_Object_Manager_Preallocations (void)
-{
- // Define the static services. This macro call creates static
- // service descriptors that are used for initialization below.
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER)
- ACE_STATIC_SVC_DEFINE (ACE_Naming_Context_initializer,
- ACE_TEXT ("ACE_Naming_Context"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (ACE_Naming_Context),
- ACE_Service_Type::DELETE_THIS |
- ACE_Service_Type::DELETE_OBJ,
- 0)
-
-#endif /* ! ACE_HAS_WINCE && ! ACE_LACKS_ACE_OTHER */
-
- ACE_STATIC_SVC_DEFINE (ACE_Service_Manager_initializer,
- ACE_TEXT ("ACE_Service_Manager"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (ACE_Service_Manager),
- ACE_Service_Type::DELETE_THIS |
- ACE_Service_Type::DELETE_OBJ,
- 0)
-
- // Initialize the static service objects using the descriptors created
- // above.
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER)
- ace_svc_desc_ACE_Naming_Context =
- ace_svc_desc_ACE_Naming_Context_initializer;
-#endif /* ! ACE_HAS_WINCE && ! ACE_LACKS_ACE_OTHER */
-
- ace_svc_desc_ACE_Service_Manager =
- ace_svc_desc_ACE_Service_Manager_initializer;
-
- // Add to the list of static configured services.
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER)
- ACE_Service_Config::static_svcs ()->
- insert (&ace_svc_desc_ACE_Naming_Context);
-#endif /* ! ACE_HAS_WINCE && ! ACE_LACKS_ACE_OTHER */
-
- ACE_Service_Config::static_svcs ()->
- insert (&ace_svc_desc_ACE_Service_Manager);
-}
-
-ACE_Object_Manager_Preallocations::~ACE_Object_Manager_Preallocations (void)
-{
-}
-
-#endif /* ! ACE_LACKS_ACE_SVCCONF */
-
-int
-ACE_Object_Manager::starting_up (void)
-{
- return ACE_Object_Manager::instance_ ? instance_->starting_up_i () : 1;
-}
-
-int
-ACE_Object_Manager::shutting_down (void)
-{
- return ACE_Object_Manager::instance_ ? instance_->shutting_down_i () : 1;
-}
-
-// Initialize an ACE_Object_Manager. There can be instances of this object
-// other than The Instance. This can happen if a user creates one for some
-// reason. All objects set up their per-object information and managed
-// objects, but only The Instance sets up the static preallocated objects and
-// the (static) ACE_Service_Config signal handler.
-int
-ACE_Object_Manager::init (void)
-{
- if (starting_up_i ())
- {
- // First, indicate that the ACE_Object_Manager instance is being
- // initialized.
- object_manager_state_ = OBJ_MAN_INITIALIZING;
-
- // Only The Instance sets up with ACE_OS_Object_Manager and initializes
- // the preallocated objects.
- if (this == instance_)
- {
- // Make sure that the ACE_OS_Object_Manager has been created,
- // and register with it for chained fini ().
- ACE_OS_Object_Manager::instance ()->next_ = this;
-
-# if !defined (ACE_LACKS_ACE_SVCCONF)
- // Construct the ACE_Service_Config's signal handler.
- ACE_NEW_RETURN (ace_service_config_sig_handler_,
- ACE_Sig_Adapter (&ACE_Service_Config::handle_signal), -1);
- ACE_Service_Config::signal_handler (ace_service_config_sig_handler_);
-# endif /* ! ACE_LACKS_ACE_SVCCONF */
-
- // Allocate the preallocated (hard-coded) object instances.
- ACE_PREALLOCATE_OBJECT (ACE_SYNCH_RW_MUTEX, ACE_FILECACHE_LOCK)
-# if defined (ACE_HAS_THREADS)
- ACE_PREALLOCATE_OBJECT (ACE_Recursive_Thread_Mutex,
- ACE_STATIC_OBJECT_LOCK)
-# endif /* ACE_HAS_THREADS */
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_PREALLOCATE_OBJECT (ACE_Thread_Mutex,
- ACE_MT_CORBA_HANDLER_LOCK)
- ACE_PREALLOCATE_OBJECT (ACE_Thread_Mutex, ACE_DUMP_LOCK)
- ACE_PREALLOCATE_OBJECT (ACE_Recursive_Thread_Mutex,
- ACE_SIG_HANDLER_LOCK)
- ACE_PREALLOCATE_OBJECT (ACE_Null_Mutex, ACE_SINGLETON_NULL_LOCK)
- ACE_PREALLOCATE_OBJECT (ACE_Recursive_Thread_Mutex,
- ACE_SINGLETON_RECURSIVE_THREAD_LOCK)
- ACE_PREALLOCATE_OBJECT (ACE_Thread_Mutex, ACE_THREAD_EXIT_LOCK)
-#if !defined (ACE_LACKS_ACE_TOKEN)
- ACE_PREALLOCATE_OBJECT (ACE_TOKEN_CONST::MUTEX,
- ACE_TOKEN_MANAGER_CREATION_LOCK)
- ACE_PREALLOCATE_OBJECT (ACE_TOKEN_CONST::MUTEX,
- ACE_TOKEN_INVARIANTS_CREATION_LOCK)
-#endif /* ! ACE_LACKS_ACE_TOKEN */
- ACE_PREALLOCATE_OBJECT (ACE_Thread_Mutex,
- ACE_PROACTOR_EVENT_LOOP_LOCK)
-# endif /* ACE_MT_SAFE */
- }
-
- if (this == instance_)
- {
- // Hooks for preallocated objects and arrays provided by application.
- ACE_APPLICATION_PREALLOCATED_OBJECT_DEFINITIONS
- ACE_APPLICATION_PREALLOCATED_ARRAY_DEFINITIONS
-
-# if defined (ACE_HAS_TSS_EMULATION)
- // Initialize the main thread's TS storage.
- ACE_TSS_Emulation::tss_open (ts_storage_);
-# endif /* ACE_HAS_TSS_EMULATION */
-
-# if !defined (ACE_LACKS_ACE_SVCCONF)
- ACE_NEW_RETURN (preallocations_,
- ACE_Object_Manager_Preallocations,
- -1);
-# endif /* ! ACE_LACKS_ACE_SVCCONF */
-
- // Open the main thread's ACE_Log_Msg.
- (void) ACE_LOG_MSG;
- }
-
- // Finally, indicate that the ACE_Object_Manager instance has
- // been initialized.
- object_manager_state_ = OBJ_MAN_INITIALIZED;
-
- return 0;
- } else {
- // Had already initialized.
- return 1;
- }
-}
-
-ACE_Object_Manager::ACE_Object_Manager (void)
- // With ACE_HAS_TSS_EMULATION, ts_storage_ is initialized by the call to
- // ACE_OS::tss_open () in the function body.
- : exit_info_ ()
-#if !defined (ACE_LACKS_ACE_SVCCONF)
- , preallocations_ (0)
- , ace_service_config_sig_handler_ (0)
-#endif /* ! ACE_LACKS_ACE_SVCCONF */
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- , internal_lock_ (new ACE_Recursive_Thread_Mutex)
- , singleton_null_lock_ (0)
- , singleton_recursive_lock_ (0)
-# endif /* ACE_MT_SAFE */
-{
- // If instance_ was not 0, then another ACE_Object_Manager has
- // already been instantiated (it is likely to be one initialized by way
- // of library/DLL loading). Let this one go through construction in
- // case there really is a good reason for it (like, ACE is a static/archive
- // library, and this one is the non-static instance (with
- // ACE_HAS_NONSTATIC_OBJECT_MANAGER, or the user has a good reason for
- // creating a separate one) but the original one will be the one retrieved
- // from calls to ACE_Object_Manager::instance().
-
- // Be sure that no further instances are created via instance ().
- if (instance_ == 0)
- instance_ = this;
-
- init ();
-}
-
-ACE_Object_Manager::~ACE_Object_Manager (void)
-{
- dynamically_allocated_ = 0; // Don't delete this again in fini()
- fini ();
-}
-
-ACE_Object_Manager *
-ACE_Object_Manager::instance (void)
-{
- // This function should be called during construction of static
- // instances, or before any other threads have been created in
- // the process. So, it's not thread safe.
-
- if (instance_ == 0)
- {
- ACE_Object_Manager *instance_pointer;
-
- ACE_NEW_RETURN (instance_pointer,
- ACE_Object_Manager,
- 0);
- ACE_ASSERT (instance_pointer == instance_);
-
- instance_pointer->dynamically_allocated_ = 1;
-
- return instance_pointer;
- }
- else
- return instance_;
-}
-
-int
-ACE_Object_Manager::at_exit_i (void *object,
- ACE_CLEANUP_FUNC cleanup_hook,
- void *param)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *instance_->internal_lock_, -1));
-
- if (shutting_down_i ())
- {
- errno = EAGAIN;
- return -1;
- }
-
- if (exit_info_.find (object))
- {
- // The object has already been registered.
- errno = EEXIST;
- return -1;
- }
-
- return exit_info_.at_exit_i (object, cleanup_hook, param);
-}
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-
-int
-ACE_Object_Manager::get_singleton_lock (ACE_Null_Mutex *&lock)
-{
- if (starting_up () || shutting_down ())
- {
- // The preallocated lock has not been constructed yet.
- // Therefore, the program is single-threaded at this point. Or,
- // the ACE_Object_Manager instance has been destroyed, so the
- // preallocated lock is not available. Allocate a lock to use,
- // for interface compatibility, though there should be no
- // contention on it.
- if (ACE_Object_Manager::instance ()->singleton_null_lock_ == 0)
- {
- ACE_NEW_RETURN (ACE_Object_Manager::instance ()->
- singleton_null_lock_,
- ACE_Cleanup_Adapter<ACE_Null_Mutex>,
- -1);
-
- // Can't register with the ACE_Object_Manager here! The
- // lock's declaration is visible to the ACE_Object_Manager
- // destructor, so it will clean it up as a special case.
- }
-
- if (ACE_Object_Manager::instance ()->singleton_null_lock_ != 0)
- lock = &ACE_Object_Manager::instance ()->singleton_null_lock_->
- object ();
- }
- else
- // Use the Object_Manager's preallocated lock.
- lock = ACE_Managed_Object<ACE_Null_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SINGLETON_NULL_LOCK);
-
- return 0;
-}
-
-int
-ACE_Object_Manager::get_singleton_lock (ACE_Thread_Mutex *&lock)
-{
- if (lock == 0)
- {
- if (starting_up () || shutting_down ())
- {
- // The Object_Manager and its internal lock have not been
- // constructed yet. Therefore, the program is single-
- // threaded at this point. Or, the ACE_Object_Manager
- // instance has been destroyed, so the internal lock is not
- // available. Either way, we can not use double-checked
- // locking. So, we'll leak the lock.
- ACE_NEW_RETURN (lock,
- ACE_Thread_Mutex,
- -1);
- }
- else
- {
- // Allocate a new lock, but use double-checked locking to
- // ensure that only one thread allocates it.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex,
- ace_mon,
- *ACE_Object_Manager::instance ()->
- internal_lock_,
- -1));
-
- if (lock == 0)
- {
- ACE_Cleanup_Adapter<ACE_Thread_Mutex> *lock_adapter;
- ACE_NEW_RETURN (lock_adapter,
- ACE_Cleanup_Adapter<ACE_Thread_Mutex>,
- -1);
- lock = &lock_adapter->object ();
-
- // Register the lock for destruction at program
- // termination. This call will cause us to grab the
- // ACE_Object_Manager::instance ()->internal_lock_
- // again; that's why it is a recursive lock.
- ACE_Object_Manager::at_exit (lock_adapter);
- }
- }
- }
-
- return 0;
-}
-
-int
-ACE_Object_Manager::get_singleton_lock (ACE_Mutex *&lock)
-{
- if (lock == 0)
- {
- if (starting_up () || shutting_down ())
- {
- // The Object_Manager and its internal lock have not been
- // constructed yet. Therefore, the program is single-
- // threaded at this point. Or, the ACE_Object_Manager
- // instance has been destroyed, so the internal lock is not
- // available. Either way, we can not use double-checked
- // locking. So, we'll leak the lock.
-
- ACE_NEW_RETURN (lock,
- ACE_Mutex,
- -1);
- }
- else
- {
- // Allocate a new lock, but use double-checked locking to
- // ensure that only one thread allocates it.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex,
- ace_mon,
- *ACE_Object_Manager::instance ()->
- internal_lock_,
- -1));
-
- if (lock == 0)
- {
- ACE_Cleanup_Adapter<ACE_Mutex> *lock_adapter;
- ACE_NEW_RETURN (lock_adapter,
- ACE_Cleanup_Adapter<ACE_Mutex>,
- -1);
- lock = &lock_adapter->object ();
-
- // Register the lock for destruction at program
- // termination. This call will cause us to grab the
- // ACE_Object_Manager::instance ()->internal_lock_
- // again; that's why it is a recursive lock.
- ACE_Object_Manager::at_exit (lock_adapter);
- }
- }
- }
-
- return 0;
-}
-
-int
-ACE_Object_Manager::get_singleton_lock (ACE_Recursive_Thread_Mutex *&lock)
-{
- if (starting_up () || shutting_down ())
- {
- // The preallocated lock has not been constructed yet.
- // Therefore, the program is single-threaded at this point. Or,
- // the ACE_Object_Manager instance has been destroyed, so the
- // preallocated lock is not available. Allocate a lock to use,
- // for interface compatibility, though there should be no
- // contention on it.
- if (ACE_Object_Manager::instance ()->singleton_recursive_lock_ == 0)
- ACE_NEW_RETURN (ACE_Object_Manager::instance ()->
- singleton_recursive_lock_,
- ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex>,
- -1);
-
- // Can't register with the ACE_Object_Manager here! The lock's
- // declaration is visible to the ACE_Object_Manager destructor,
- // so it will clean it up as a special case.
-
- if (ACE_Object_Manager::instance ()->singleton_recursive_lock_ != 0)
- lock = &ACE_Object_Manager::instance ()->singleton_recursive_lock_->
- object ();
- }
- else
- {
- // Use the Object_Manager's preallocated lock.
- lock = ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::
- get_preallocated_object (ACE_Object_Manager::
- ACE_SINGLETON_RECURSIVE_THREAD_LOCK);
- }
-
- return 0;
-}
-
-int
-ACE_Object_Manager::get_singleton_lock (ACE_RW_Thread_Mutex *&lock)
-{
- if (lock == 0)
- {
- if (starting_up () || shutting_down ())
- {
- // The Object_Manager and its internal lock have not been
- // constructed yet. Therefore, the program is single-
- // threaded at this point. Or, the ACE_Object_Manager
- // instance has been destroyed, so the internal lock is not
- // available. Either way, we can not use double-checked
- // locking. So, we'll leak the lock.
-
- ACE_NEW_RETURN (lock,
- ACE_RW_Thread_Mutex,
- -1);
- }
- else
- {
- // Allocate a new lock, but use double-checked locking to
- // ensure that only one thread allocates it.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex,
- ace_mon,
- *ACE_Object_Manager::instance ()->
- internal_lock_,
- -1));
-
- if (lock == 0)
- {
- ACE_Cleanup_Adapter<ACE_RW_Thread_Mutex> *lock_adapter;
- ACE_NEW_RETURN (lock_adapter,
- ACE_Cleanup_Adapter<ACE_RW_Thread_Mutex>,
- -1);
- lock = &lock_adapter->object ();
-
-
- // Register the lock for destruction at program
- // termination. This call will cause us to grab the
- // ACE_Object_Manager::instance ()->internal_lock_
- // again; that's why it is a recursive lock.
- ACE_Object_Manager::at_exit (lock_adapter);
- }
- }
- }
-
- return 0;
-}
-#endif /* ACE_MT_SAFE */
-
-// NOTE: this function needs to appear _after_ the
-// get_singleton_lock () functions in order to compile with
-// g++ 2.7.2.3.
-//
-// Clean up an ACE_Object_Manager. There can be instances of this object
-// other than The Instance. This can happen if (on Win32) the ACE DLL
-// causes one to be created, or if a user creates one for some reason.
-// Only The Instance cleans up the static preallocated objects. All objects
-// clean up their per-object information and managed objects.
-int
-ACE_Object_Manager::fini (void)
-{
- if (shutting_down_i ())
- // Too late. Or, maybe too early. Either fini () has already
- // been called, or init () was never called.
- return object_manager_state_ == OBJ_MAN_SHUT_DOWN ? 1 : -1;
-
- // No mutex here. Only the main thread should destroy the singleton
- // ACE_Object_Manager instance.
-
- // First, indicate that this ACE_Object_Manager instance is being
- // shut down.
- object_manager_state_ = OBJ_MAN_SHUTTING_DOWN;
-
- // Call all registered cleanup hooks, in reverse order of
- // registration.
- exit_info_.call_hooks ();
-
- if (this == instance_)
- {
-#if !defined (ACE_LACKS_ACE_SVCCONF)
- delete preallocations_;
- preallocations_ = 0;
-#endif /* ! ACE_LACKS_ACE_SVCCONF */
-
- ACE_Trace::stop_tracing ();
-
-#if defined (ACE_LACKS_ACE_SVCCONF)
-
- ACE_Reactor::close_singleton ();
-
-# if (((defined (ACE_HAS_WINNT)) && (ACE_HAS_WINNT == 1)) || (defined (ACE_HAS_AIO_CALLS)))
- ACE_Proactor::close_singleton ();
-# endif /* !ACE_HAS_WINCE */
-
-# if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS)
- ACE_Thread_Manager::close_singleton ();
-# endif /* ! ACE_THREAD_MANAGER_LACKS_STATICS */
-
-#else /* ! ACE_LACKS_ACE_SVCCONF */
-
- // Close and possibly delete all service instances in the Service
- // Repository.
- ACE_Service_Config::fini_svcs ();
-
-#endif /* ! ACE_LACKS_ACE_SVCCONF */
-
-
-
- // Close the main thread's TSS, including its Log_Msg instance.
- ACE_OS::cleanup_tss (1 /* main thread */);
-
- //
- // Note: Do not access Log Msg after this since it is gone
- //
-
-#if !defined (ACE_LACKS_ACE_SVCCONF)
- // Unlink all services in the Service Repository and close/delete
- // all ACE library services and singletons.
- ACE_Service_Config::close ();
-#endif /* ! ACE_LACKS_ACE_SVCCONF */
-
- // Close the ACE_Allocator.
- ACE_Allocator::close_singleton ();
-
-#if ! defined (ACE_HAS_STATIC_PREALLOCATION)
- // Hooks for deletion of preallocated objects and arrays provided by
- // application.
- ACE_APPLICATION_PREALLOCATED_ARRAY_DELETIONS
- ACE_APPLICATION_PREALLOCATED_OBJECT_DELETIONS
-
- // Cleanup the dynamically preallocated arrays.
- // (none)
-
- // Cleanup the dynamically preallocated objects.
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_SYNCH_RW_MUTEX, ACE_FILECACHE_LOCK)
-#if defined (ACE_HAS_THREADS)
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_Recursive_Thread_Mutex,
- ACE_STATIC_OBJECT_LOCK)
-#endif /* ACE_HAS_THREADS */
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_Thread_Mutex,
- ACE_MT_CORBA_HANDLER_LOCK)
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_Thread_Mutex, ACE_DUMP_LOCK)
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_Recursive_Thread_Mutex,
- ACE_SIG_HANDLER_LOCK)
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_Null_Mutex,
- ACE_SINGLETON_NULL_LOCK)
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_Recursive_Thread_Mutex,
- ACE_SINGLETON_RECURSIVE_THREAD_LOCK)
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_Thread_Mutex, ACE_THREAD_EXIT_LOCK)
-#if !defined (ACE_LACKS_ACE_TOKEN)
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_TOKEN_CONST::MUTEX,
- ACE_TOKEN_MANAGER_CREATION_LOCK)
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_TOKEN_CONST::MUTEX,
- ACE_TOKEN_INVARIANTS_CREATION_LOCK)
-#endif /* ! ACE_LACKS_ACE_TOKEN */
- ACE_DELETE_PREALLOCATED_OBJECT (ACE_Thread_Mutex,
- ACE_PROACTOR_EVENT_LOOP_LOCK)
-# endif /* ACE_MT_SAFE */
-#endif /* ! ACE_HAS_STATIC_PREALLOCATION */
-
-#if defined (ACE_HAS_THREADS)
- ACE_Static_Object_Lock::cleanup_lock ();
-#endif /* ACE_HAS_THREADS */
- }
-
-#if !defined (ACE_LACKS_ACE_SVCCONF)
- delete ace_service_config_sig_handler_;
- ace_service_config_sig_handler_ = 0;
-#endif /* ! ACE_LACKS_ACE_SVCCONF */
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- delete internal_lock_;
- internal_lock_ = 0;
-
- delete singleton_null_lock_;
- singleton_null_lock_ = 0;
-
- delete singleton_recursive_lock_;
- singleton_recursive_lock_ = 0;
-#endif /* ACE_MT_SAFE */
-
- // Indicate that this ACE_Object_Manager instance has been shut down.
- object_manager_state_ = OBJ_MAN_SHUT_DOWN;
-
- // Then, ensure that the ACE_OS_Object_Manager gets shut down.
- if (this == instance_ && ACE_OS_Object_Manager::instance_)
- ACE_OS_Object_Manager::instance_->fini ();
-
- if (dynamically_allocated_)
- {
- delete this;
- }
-
- if (this == instance_)
- instance_ = 0;
-
- return 0;
-}
-
-
-#if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
-class ACE_Export ACE_Object_Manager_Manager
- // = TITLE
- // Ensure that the <ACE_Object_Manager> gets initialized at
- // program startup, and destroyed at program termination.
- //
- // = DESCRIPTION
- // Without ACE_HAS_NONSTATIC_OBJECT_MANAGER, a static instance of this
- // class is created. Therefore, it gets created before main ()
- // is called. And it gets destroyed after main () returns.
-{
-public:
- ACE_Object_Manager_Manager (void);
- ~ACE_Object_Manager_Manager (void);
-
-private:
- ACE_thread_t saved_main_thread_id_;
- // Save the main thread ID, so that destruction can be suppressed.
-};
-
-ACE_Object_Manager_Manager::ACE_Object_Manager_Manager (void)
- : saved_main_thread_id_ (ACE_OS::thr_self ())
-{
- // Ensure that the Object_Manager gets initialized before any
- // application threads have been spawned. Because this will be called
- // during construction of static objects, that should always be the
- // case.
- (void) ACE_Object_Manager::instance ();
-}
-
-ACE_Object_Manager_Manager::~ACE_Object_Manager_Manager (void)
-{
- if (ACE_OS::thr_equal (ACE_OS::thr_self (),
- saved_main_thread_id_))
- {
- delete ACE_Object_Manager::instance_;
- ACE_Object_Manager::instance_ = 0;
- }
- // else if this destructor is not called by the main thread, then do
- // not delete the ACE_Object_Manager. That causes problems, on
- // WIN32 at least.
-}
-
-static ACE_Object_Manager_Manager ACE_Object_Manager_Manager_instance;
-#endif /* ! ACE_HAS_NONSTATIC_OBJECT_MANAGER */
-
-#if defined (ACE_HAS_THREADS)
-
-// This is global so that it doesn't have to be declared in the header
-// file. That would cause nasty circular include problems.
-typedef ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex>
- ACE_Static_Object_Lock_Type;
-static ACE_Static_Object_Lock_Type *
- ACE_Static_Object_Lock_lock = 0;
-
-// ACE_SHOULD_MALLOC_STATIC_OBJECT_LOCK isn't (currently) used by ACE.
-// But, applications may find it useful for avoiding recursive calls
-// if they have overridden operator new. Thanks to Jody Hagins
-// <jody@atdesk.com> for contributing it.
-
-ACE_Recursive_Thread_Mutex *
-ACE_Static_Object_Lock::instance (void)
-{
- if (ACE_Object_Manager::starting_up () ||
- ACE_Object_Manager::shutting_down ())
- {
- // The preallocated ACE_STATIC_OBJECT_LOCK has not been
- // constructed yet. Therefore, the program is single-threaded
- // at this point. Or, the ACE_Object_Manager instance has been
- // destroyed, so the preallocated lock is not available.
- // Allocate a lock to use, for interface compatibility, though
- // there should be no contention on it.
- if (ACE_Static_Object_Lock_lock == 0)
- {
-# if defined (ACE_SHOULD_MALLOC_STATIC_OBJECT_LOCK)
- // Allocate a buffer with malloc, and then use placement
- // new for the object, on the malloc'd buffer.
- void *buffer =
- ACE_OS::malloc (sizeof (*ACE_Static_Object_Lock_lock));
- if (buffer == 0)
- {
- return 0;
- }
- ACE_NEW_RETURN (ACE_Static_Object_Lock_lock,
- (buffer) ACE_Static_Object_Lock_Type (),
- 0);
-# else /* ! ACE_SHOULD_MALLOC_STATIC_OBJECT_LOCK */
- ACE_NEW_RETURN (ACE_Static_Object_Lock_lock,
- ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex>,
- 0);
-# endif /* ! ACE_SHOULD_MALLOC_STATIC_OBJECT_LOCK */
- }
-
- // Can't register with the ACE_Object_Manager here! The lock's
- // declaration is visible to the ACE_Object_Manager destructor,
- // so it will clean it up as a special case.
-
- return &ACE_Static_Object_Lock_lock->object ();
- }
- else
- // Return the preallocated ACE_STATIC_OBJECT_LOCK.
- return
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_STATIC_OBJECT_LOCK);
-}
-
-void
-ACE_Static_Object_Lock::cleanup_lock (void)
-{
-# if defined(ACE_SHOULD_MALLOC_STATIC_OBJECT_LOCK)
- // It was malloc'd, so we need to explicitly call the dtor
- // and then free the memory.
- ACE_DES_FREE (ACE_Static_Object_Lock_lock,
- ACE_OS::free,
- ACE_Static_Object_Lock_Type);
-# else /* ! ACE_SHOULD_MALLOC_STATIC_OBJECT_LOCK */
- delete ACE_Static_Object_Lock_lock;
-# endif /* ! ACE_SHOULD_MALLOC_STATIC_OBJECT_LOCK */
- ACE_Static_Object_Lock_lock = 0;
-}
-#endif /* ACE_HAS_THREADS */
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- template class ACE_Cleanup_Adapter<ACE_Null_Mutex>;
- template class ACE_Cleanup_Adapter<ACE_Mutex>;
- template class ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex>;
- template class ACE_Cleanup_Adapter<ACE_Thread_Mutex>;
- template class ACE_Managed_Object<ACE_Null_Mutex>;
- template class ACE_Managed_Object<ACE_Mutex>;
- template class ACE_Managed_Object<ACE_Recursive_Thread_Mutex>;
- template class ACE_Managed_Object<ACE_Thread_Mutex>;
-# endif /* ACE_MT_SAFE */
- template class ACE_Cleanup_Adapter<ACE_SYNCH_RW_MUTEX>;
- template class ACE_Managed_Object<ACE_SYNCH_RW_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# pragma instantiate ACE_Cleanup_Adapter<ACE_Null_Mutex>
-# pragma instantiate ACE_Cleanup_Adapter<ACE_Mutex>
-# pragma instantiate ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex>
-# pragma instantiate ACE_Cleanup_Adapter<ACE_Thread_Mutex>
-# pragma instantiate ACE_Managed_Object<ACE_Null_Mutex>
-# pragma instantiate ACE_Managed_Object<ACE_Mutex>
-# pragma instantiate ACE_Managed_Object<ACE_Recursive_Thread_Mutex>
-# pragma instantiate ACE_Managed_Object<ACE_Thread_Mutex>
-# endif /* ACE_MT_SAFE */
-# pragma instantiate ACE_Cleanup_Adapter<ACE_SYNCH_RW_MUTEX>
-# pragma instantiate ACE_Managed_Object<ACE_SYNCH_RW_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Object_Manager.h b/ace/Object_Manager.h
deleted file mode 100644
index 91457dd2e46..00000000000
--- a/ace/Object_Manager.h
+++ /dev/null
@@ -1,436 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Object_Manager.h
-//
-// = AUTHORS
-// David L. Levine, Matthias Kerkhoff, and Per Andersson
-//
-// ============================================================================
-
-#ifndef ACE_OBJECT_MANAGER_H
-#define ACE_OBJECT_MANAGER_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Forward declarations.
-class ACE_Object_Manager_Preallocations;
-class ACE_Sig_Adapter;
-class ACE_Sig_Set;
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- class ACE_Mutex;
- class ACE_Null_Mutex;
- class ACE_Thread_Mutex;
- class ACE_Recursive_Thread_Mutex;
- class ACE_RW_Thread_Mutex;
-#endif /* ACE_MT_SAFE */
-
-class ACE_Cleanup_Info_Node;
-template <class T> class ACE_Cleanup_Adapter;
-
-
-// Configuration parameters.
-#if !defined (ACE_MAX_MANAGED_OBJECTS)
-# define ACE_MAX_MANAGED_OBJECTS 128
-#endif /* ! ACE_MAX_MANAGED_OBJECTS */
-
-#if !defined (ACE_APPLICATION_PREALLOCATED_OBJECT_DECLARATIONS)
-# define ACE_APPLICATION_PREALLOCATED_OBJECT_DECLARATIONS
-#endif /* ! ACE_APPLICATION_PREALLOCATED_OBJECT_DECLARATIONS */
-
-#if !defined (ACE_APPLICATION_PREALLOCATED_ARRAY_DECLARATIONS)
-# define ACE_APPLICATION_PREALLOCATED_ARRAY_DECLARATIONS
-#endif /* ! ACE_APPLICATION_PREALLOCATED_ARRAY_DECLARATIONS */
-
-
-class ACE_Export ACE_Object_Manager : public ACE_Object_Manager_Base
-{
- // = TITLE
- // Manager for ACE library services and singleton cleanup.
- //
- // = DESCRIPTION
- // The <ACE_Object_Manager> manages cleanup of objects, typically
- // singletons, at program termination. In addition to managing
- // the cleanup of the ACE library, it provides an interface for
- // application to register objects to be cleaned up.
- //
- // This class also shuts down ACE library services, so that they
- // can reclaim their storage, at program termination. It works
- // by creating a static instance whose destructor gets called
- // along with those of all other static objects. Hooks are
- // provided for application code to register objects and arrays
- // for cleanup, e.g., destruction. The order of such cleanup
- // calls is in the reverse order of registration, i.e., that
- // last object/array to register gets cleaned up first.
- //
- // The <ACE_Object_Manager> API includes <ACE_Managed_Object>. That
- // class is contained in a separate file because it is a
- // template class, and some compilers require that template and
- // non-template class definitions appear in separate files.
- // Please see ace/Managed_Object.h for a description of that
- // part of the API. In summary, <ACE_Managed_Object> provides two
- // adapters, the <ACE_Cleanup_Adapter> and <ACE_Managed_Object>
- // template classes for adapting objects of any type to be
- // easily managed by the <ACE_Object_Manager>. There are several
- // mechanisms for adapting objects and arrays for cleanup at
- // program termination, in roughly increasing order of ease-of-use:
- //
- // 1) Derive the object's class from <ACE_Cleanup>.
- // 2) Allow the <ACE_Object_Manager> to both dynamically allocate
- // and deallocate the object.
- // 3) Provide an <ACE_CLEANUP_FUNC> cleanup hook for the object or
- // array.
- // 4) Allow the <ACE_Object_Manager> to both preallocate the object
- // or array, either statically in global data or dynamically on
- // the heap, when its singleton instance is construction.
- //
- // There are also several mechanisms for registering objects and
- // arrays for cleanup. In decreasing order of flexibility and
- // complexity (with the exception of the last mechanism):
- //
- // 1) ACE_Object_Manager::at_exit (void *object,
- // ACE_CLEANUP_FUNC cleanup_hook,
- // void *param);
- // can be used to register any object or array for any
- // cleanup activity at program termination.
- //
- // 2) ACE_Object_Manager::at_exit (ACE_Cleanup *object,
- // void *param = 0);
- // can be used to register an <ACE_Cleanup> object
- // for any cleanup activity at program termination.
- //
- // The final mechanism is not general purpose, but can only
- // be used to allocate objects and arrays at program startup:
- //
- // 3) ACE_Managed_Object::get_preallocated_object
- // (ACE_Object_Manager::Preallocated_Object id);
- // and
- // ACE_Managed_Object::get_preallocated_array
- // (ACE_Object_Manager::Preallocated_Array id);
- // can only be used to allocate objects at program startup,
- // either in global data or on the heap (selected at compile
- // time). These are intended to replace static locks, etc.
- //
- // Instead of creating a static <ACE_Object_Manager> instance, one
- // can alternatively be created on the stack of the main program
- // thread. It is created just after entry to ::main (int, char
- // *[]), and before any existing code in that function is
- // executed. To enable this alternative, add #define
- // ACE_HAS_NONSTATIC_OBJECT_MANAGER before including the platform
- // specific config-* file in ace/config.h prior to
- // building the ACE library and your applications. This #define
- // is enabled in some config files that are supplied with ACE.
- // To ensure a static object manager is used, #undef
- // ACE_HAS_NONSTATIC_OBJECT_MANAGER *after* including the platform
- // specific config-* file.
- //
- // Note that the ACE_Object_Manager _must_ be created before
- // any threads are spawned by the program.
- //
- // If ACE_HAS_NONSTATIC_OBJECT_MANAGER is not #defined, the ACE
- // library creates a static, singleton <ACE_Object_Manager> instance.
- // The instance is placed in global program data, and constructed
- // via a static object constructor. If ACE_HAS_NONSTATIC_OBJECT_MANAGER
- // is #defined, the <ACE_Object_Manager> instance is created on the stack
- // of the main program thread, as noted above.
- //
- // With ACE_HAS_NONSTATIC_OBJECT_MANAGER enabled, the ACE
- // library has no static objects that require destruction.
- // However, there are two drawbacks to using it:
- //
- // 1) main (int, char *[]) must be declared with arguments, even
- // if they're not used. All of ACE is converted to this, so
- // just applications have to be concerned with it.
- //
- // 2) If there any static objects that depend on those that are
- // cleaned up by the Object_Manager, they'll get cleaned up too
- // late. The ACE tests do not violate this requirement.
- // However, applications may have trouble with it.
- //
- // NOTE on the use of <::exit> -- <::exit> does not destroy
- // automatic objects. Therefore, if
- // ACE_HAS_NONSTATIC_OBJECT_MANAGER is enabled, the
- // <ACE_Object_Manager> instance will *not* be destroyed if
- // <::exit> is called! However, <ACE_OS::exit> will properly
- // destroy the ACE_Object_Manager. It is highly recommended
- // that <ACE_OS::exit> be used instead of <::exit>.
- //
- // However, <::exit> and <ACE_OS::exit> are tricky to use
- // properly, especially in multithread programs. It is much
- // safer to throw an exception (or simulate that effect) that
- // will be caught by <main> instead of calling exit. Then,
- // <main> can perform any necessary application-specific cleanup
- // and return the status value. In addition, it's usually best
- // to avoid calling <::exit> and <ACE_OS::exit> from threads
- // other than the main thread. Thanks to Jeff Greif
- // <jmg@trivida.com> for pointing out that <::exit> doesn't
- // destroy automatic objects, and for developing the
- // recommendations in this paragraph.
- //
- // Instead of creating a static <ACE_Object_Manager>, or letting
- // ACE create it on the stack of <main> for you, another
- // alternative is to #define
- // ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER. With that
- // #define, the application must create the ACE_Object_Manager.
- // The recommended way is to call <ACE::init> at the start of
- // the program, and call <ACE::fini> at the end. Alternatively,
- // the application could explicity construct an
- // <ACE_Object_Manager>.
-
-public:
- virtual int init (void);
- // Explicitly initialize (construct the singleton instance of) the
- // ACE_Object_Manager. Returns 0 on success, -1 on failure, and 1
- // if it had already been called.
-
- virtual int fini (void);
- // Explicitly destroy the singleton instance of the
- // ACE_Object_Manager. Returns 0 on success, -1 on failure, and 1
- // if it had already been called.
-
- static int starting_up (void);
- // Returns 1 before the ACE_Object_Manager has been constructed.
- // This flag can be used to determine if the program is constructing
- // static objects. If no static object spawns any threads, the
- // program will be single-threaded when this flag returns 1. (Note
- // that the program still might construct some static objects when
- // this flag returns 0, if ACE_HAS_NONSTATIC_OBJECT_MANAGER is not
- // defined.)
-
- static int shutting_down (void);
- // Returns 1 after the ACE_Object_Manager has been destroyed. This
- // flag can be used to determine if the program is in the midst of
- // destroying static objects. (Note that the program might destroy
- // some static objects before this flag can return 1, if
- // ACE_HAS_NONSTATIC_OBJECT_MANAGER is not defined.)
-
- static int at_exit (ACE_Cleanup *object, void *param = 0);
- // Register an ACE_Cleanup object for cleanup at process
- // termination. The object is deleted via the
- // <ace_cleanup_destroyer>. If you need more flexiblity, see the
- // <other at_exit> method below. For OS's that do not have
- // processes, cleanup takes place at the end of <main>. Returns 0
- // on success. On failure, returns -1 and sets errno to: EAGAIN if
- // shutting down, ENOMEM if insufficient virtual memory, or EEXIST
- // if the object (or array) had already been registered.
-
- static int at_exit (void *object,
- ACE_CLEANUP_FUNC cleanup_hook,
- void *param);
- // Register an object (or array) for cleanup at process termination.
- // "cleanup_hook" points to a (global, or static member) function
- // that is called for the object or array when it to be destroyed.
- // It may perform any necessary cleanup specific for that object or
- // its class. "param" is passed as the second parameter to the
- // "cleanup_hook" function; the first parameter is the object (or
- // array) to be destroyed. "cleanup_hook", for example, may delete
- // the object (or array). For OS's that do not have processes, this
- // function is the same as <at_thread_exit>. Returns 0 on success.
- // On failure, returns -1 and sets errno to: EAGAIN if shutting
- // down, ENOMEM if insufficient virtual memory, or EEXIST if the
- // object (or array) had already been registered.
-
-#if 0 /* not implemented yet */
- static int at_thread_exit (void *object,
- ACE_CLEANUP_FUNC cleanup_hook,
- void *param);
- // Similar to <at_exit>, except that the cleanup_hook is called
- // when the current thread exits instead of when the program terminates.
-#endif /* 0 */
-
- enum Preallocated_Object
- {
- ACE_FILECACHE_LOCK,
-#if defined (ACE_HAS_THREADS)
- ACE_STATIC_OBJECT_LOCK,
-#endif /* ACE_HAS_THREADS */
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_MT_CORBA_HANDLER_LOCK,
- ACE_DUMP_LOCK,
- ACE_SIG_HANDLER_LOCK,
- ACE_SINGLETON_NULL_LOCK,
- ACE_SINGLETON_RECURSIVE_THREAD_LOCK,
- ACE_THREAD_EXIT_LOCK,
-#if !defined (ACE_LACKS_ACE_TOKEN)
- ACE_TOKEN_MANAGER_CREATION_LOCK,
- ACE_TOKEN_INVARIANTS_CREATION_LOCK,
-#endif /* ! ACE_LACKS_ACE_TOKEN */
- ACE_PROACTOR_EVENT_LOOP_LOCK,
-#endif /* ACE_MT_SAFE */
-
- // Hook for preallocated objects provided by application.
- ACE_APPLICATION_PREALLOCATED_OBJECT_DECLARATIONS
-
- ACE_PREALLOCATED_OBJECTS // This enum value must be last!
- };
- // Unique identifiers for preallocated objects. Please see
- // ace/Managed_Object.h for information on accessing preallocated
- // objects.
-
- enum Preallocated_Array
- {
- // There currently are no preallocated arrays in the ACE
- // library. If the application doesn't have any, make sure
- // the the preallocated_array size is at least one by declaring
- // this dummy . . .
- ACE_EMPTY_PREALLOCATED_ARRAY,
-
- // Hook for preallocated arrays provided by application.
- ACE_APPLICATION_PREALLOCATED_ARRAY_DECLARATIONS
-
- ACE_PREALLOCATED_ARRAYS // This enum value must be last!
- };
- // Unique identifiers for preallocated arrays. Please see
- // ace/Managed_Object.h for information on accessing preallocated
- // arrays.
-
- static ACE_Sig_Set &default_mask (void);
- // Accesses a default signal set used, for example, in ACE_Sig_Guard
- // methods.
- // Deprecated: use ACE_Object_Manager::default_mask () instead.
-
-private:
- ACE_OS_Exit_Info exit_info_;
- // For at_exit support.
-
-#if !defined (ACE_LACKS_ACE_SVCCONF)
- ACE_Object_Manager_Preallocations *preallocations_;
- // Preallocated objects collection.
-
- ACE_Sig_Adapter *ace_service_config_sig_handler_;
- // ACE_Service_Config signal handler.
-#endif /* ! ACE_LACKS_ACE_SVCCONF */
-
- int at_exit_i (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param);
- // Register an object or array for deletion at program termination.
- // See description of static version above for return values.
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-public:
- // = The <get_singleton_lock> accessors are for internal
- // use by ACE_Singleton _only_.
-
- static int get_singleton_lock (ACE_Null_Mutex *&);
- // Accesses an <ACE_Null_Mutex> to be used for construction of
- // <ACE_Singletons>. Returns 0, and the lock in the argument, on
- // success; returns -1 on failure.
-
- static int get_singleton_lock (ACE_Thread_Mutex *&);
- // Accesses a non-recursive <ACE_Thread_Mutex> to be used for
- // construction of <ACE_Singletons>. Returns 0, and the lock in the
- // argument, on success; returns -1 on failure.
-
- static int get_singleton_lock (ACE_Mutex *&);
- // Accesses a non-recursive <ACE_Mutex> to be used for construction
- // of <ACE_Singletons>. Returns 0, and the lock in the argument, on
- // success; returns -1 on failure.
-
- static int get_singleton_lock (ACE_Recursive_Thread_Mutex *&);
- // Accesses a recursive <ACE_Recursive_Thread_Mutex> to be used for
- // construction of <ACE_Singletons>. Returns 0, and the lock in the
- // argument, on success; returns -1 on failure.
-
- static int get_singleton_lock (ACE_RW_Thread_Mutex *&);
- // Accesses a readers/writer <ACE_RW_Thread_Mutex> to be used for
- // construction of <ACE_Singletons>. Returns 0, and the lock in the
- // argument, on success; returns -1 on failure.
-#endif /* ACE_MT_SAFE */
-
-public:
- // For internal use only by ACE_Managed_Objects.
-
- static ACE_Object_Manager *instance (void);
- // Accessor to singleton instance. Because static member functions
- // are provided in the interface, this should not be public. However,
- // it is public so that ACE_Managed_Object<TYPE> can access it.
-
- static void *preallocated_object[ACE_PREALLOCATED_OBJECTS];
- // Table of preallocated objects.
-
- static void *preallocated_array[ACE_PREALLOCATED_ARRAYS];
- // Table of preallocated arrays.
-
-public:
- // Application code should not use these explicitly, so they're
- // hidden here. They're public so that the ACE_Object_Manager can
- // be constructed/destructed in <main> with
- // ACE_HAS_NONSTATIC_OBJECT_MANAGER.
- ACE_Object_Manager (void);
- ~ACE_Object_Manager (void);
-
-private:
- static ACE_Object_Manager *instance_;
- // Singleton pointer.
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_Recursive_Thread_Mutex *internal_lock_;
- // Lock that is used to guard internal structures.
-
- ACE_Cleanup_Adapter<ACE_Null_Mutex> *singleton_null_lock_;
- // Null lock for guarding singleton creation.
-
- ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex> *singleton_recursive_lock_;
- // Lock for guarding singleton creation, when Object_Manager
- // hasn't been started up, or has already been shut down.
-#endif /* ACE_MT_SAFE */
-
-#if defined (ACE_HAS_TSS_EMULATION)
- // Main thread's thread-specific storage array.
- void *ts_storage_[ACE_TSS_Emulation::ACE_TSS_THREAD_KEYS_MAX];
-#endif /* ACE_HAS_TSS_EMULATION */
-
-#if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
- friend class ACE_Object_Manager_Manager;
-#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
-
- // Disallow copying by not implementing the following . . .
- ACE_Object_Manager (const ACE_Object_Manager &);
- ACE_Object_Manager &operator= (const ACE_Object_Manager &);
-};
-
-
-#if defined (ACE_HAS_THREADS)
-
-class ACE_Recursive_Thread_Mutex;
-
-class ACE_Export ACE_Static_Object_Lock
-{
- // = TITLE
- // Provide an interface to access a global lock.
- //
- // = DESCRIPTION
- // This class is used to serialize the creation of static
- // singleton objects. It really isn't needed any more, because
- // anyone can access ACE_STATIC_OBJECT_LOCK directly. But, it
- // is retained for backward compatibility.
-public:
- static ACE_Recursive_Thread_Mutex *instance (void);
- // Static lock access point.
-
- static void cleanup_lock (void);
- // For use only by ACE_Object_Manager to clean up lock if it
- // what dynamically allocated.
-};
-
-#endif /* ACE_HAS_THREADS */
-
-
-#if defined (__ACE_INLINE__)
-#include "ace/Object_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Managed_Object.h"
-
-#include "ace/post.h"
-#endif /* ACE_OBJECT_MANAGER_H */
diff --git a/ace/Object_Manager.i b/ace/Object_Manager.i
deleted file mode 100644
index a93cbc208b1..00000000000
--- a/ace/Object_Manager.i
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-int
-ACE_Object_Manager::at_exit (ACE_Cleanup *object,
- void *param)
-{
- return ACE_Object_Manager::instance ()->at_exit_i (
- object,
- (ACE_CLEANUP_FUNC) ace_cleanup_destroyer,
- param);
-}
-
-ACE_INLINE
-int
-ACE_Object_Manager::at_exit (void *object,
- ACE_CLEANUP_FUNC cleanup_hook,
- void *param)
-{
- return ACE_Object_Manager::instance ()->at_exit_i (
- object,
- cleanup_hook,
- param);
-}
-
-ACE_INLINE
-ACE_Sig_Set &
-ACE_Object_Manager::default_mask (void)
-{
- // A safe cast, but this static method shouldn't be used anyways.
- // Use ACE_Object_Manager::default_mask () instead.
- return *ACE_reinterpret_cast (ACE_Sig_Set *,
- ACE_OS_Object_Manager::default_mask ());
-}
diff --git a/ace/Obstack.cpp b/ace/Obstack.cpp
deleted file mode 100644
index 5a92c271359..00000000000
--- a/ace/Obstack.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// $Id$
-
-#include "ace/Obstack.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Obstack.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Obstack, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Obstack)
-
-void
-ACE_Obstack::dump (void) const
-{
- ACE_TRACE ("ACE_Obstack::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("size_ = %d\n"), this->size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("head_ = %x\n"), this->head_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("curr_ = %x\n"), this->curr_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Obchunk)
-
-void
-ACE_Obchunk::dump (void) const
-{
- ACE_TRACE ("ACE_Obchunk::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("end_ = %x\n"), this->end_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("cur_ = %x\n"), this->cur_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Obchunk::ACE_Obchunk (size_t size)
- : end_ (contents_ + size),
- cur_ (contents_),
- next_ (0)
-{
-}
-
-class ACE_Obchunk *
-ACE_Obstack::new_chunk (void)
-{
- ACE_TRACE ("ACE_Obstack::new_chunk");
-
- ACE_TCHAR *temp;
-
- ACE_ALLOCATOR_RETURN
- (temp,
- ACE_static_cast (ACE_TCHAR *,
- this->allocator_strategy_->malloc
- (sizeof (class ACE_Obchunk)
- + this->size_ * sizeof (ACE_TCHAR))),
- 0);
-
- return new (temp) ACE_Obchunk (this->size_);
-}
-
-ACE_Obstack::ACE_Obstack (size_t size,
- ACE_Allocator *allocator_strategy)
- : allocator_strategy_ (allocator_strategy),
- size_ (size)
-{
- ACE_TRACE ("ACE_Obstack::ACE_Obstack");
-
- if (this->allocator_strategy_ == 0)
- ACE_ALLOCATOR (this->allocator_strategy_,
- ACE_Allocator::instance ());
-
- this->head_ = this->new_chunk ();
- this->curr_ = this->head_;
-}
-
-ACE_Obstack::~ACE_Obstack (void)
-{
- ACE_TRACE ("ACE_Obstack::~ACE_Obstack");
-
- ACE_Obchunk *temp = this->head_;
-
- while (temp != 0)
- {
- ACE_Obchunk *next = temp->next_;
- temp->next_ = 0;
- this->allocator_strategy_->free ((void *) temp);
- temp = next;
- }
-}
-
-ACE_TCHAR *
-ACE_Obstack::copy (const ACE_TCHAR *s,
- size_t len)
-{
- ACE_TRACE ("ACE_Obstack::copy");
- ACE_TCHAR *result;
-
- ACE_ASSERT (this->size_ >= len + 1);
-
- // Check whether we need to grow our chunk...
-
- if (this->curr_->cur_ + len + 1 >= this->curr_->end_)
- {
- if (this->curr_->next_ == 0)
- {
- // We must allocate new memory.
- this->curr_->next_ = this->new_chunk ();
- this->curr_ = this->curr_->next_;
- }
- else
- {
- // We can reuse previously allocated memory.
- this->curr_ = this->curr_->next_;
- this->curr_->cur_ = this->curr_->contents_;
- }
- }
-
- result = this->curr_->cur_;
- ACE_OS::memcpy (result, s, len);
- result[len] = '\0';
- this->curr_->cur_ += (len + 1);
- return result;
-}
-
-void
-ACE_Obstack::release (void)
-{
- ACE_TRACE ("ACE_Obstack::release");
-
- this->curr_ = this->head_;
- this->curr_->cur_ = this->curr_->contents_;
-}
-
-
diff --git a/ace/Obstack.h b/ace/Obstack.h
deleted file mode 100644
index 815307984d6..00000000000
--- a/ace/Obstack.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Obstack.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_OBSTACK_H
-#define ACE_OBSTACK_H
-#include "ace/pre.h"
-
-#include "ace/Malloc.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Obchunk
-{
- // = TITLE
- // Defines the state that represents a "chunk" of memory.
-public:
- friend class ACE_Obstack;
-
- ACE_Obchunk (size_t size);
- // Constructor.
-
- ~ACE_Obchunk (void);
- // dtor.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_TCHAR *end_;
- // Pointer to the end of the chunk.
-
- ACE_TCHAR *cur_;
- // Pointer to the current location in the chunk.
-
- ACE_Obchunk *next_;
- // Next chunk in the chain.
-
- ACE_TCHAR contents_[4];
- // Pointer to the beginning contents of this chunk. This field is
- // actually overlayed by the memory allocated by
- // <ACE_Obstack::new_chunk>. Therefore, it *must* come last.
-};
-
-class ACE_Export ACE_Obstack
-{
- // = TITLE
- // Define a simple "mark and release" memory allocation utility.
- //
- // = DESCRIPTION
- // The implementation is similar to the GNU obstack utility,
- // which is used extensively in the GCC compiler.
-public:
- // = Initialization and termination methods.
- ACE_Obstack (size_t size = 4096 - sizeof (ACE_Obchunk),
- ACE_Allocator *allocator_strategy = 0);
- ~ACE_Obstack (void);
-
- ACE_TCHAR *copy (const ACE_TCHAR *data,
- size_t len);
- // Copy the data into the current Obchunk.
-
- void release (void);
- // "Release" the entire stack of Obchunks, putting it back on the
- // free list.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- class ACE_Obchunk *new_chunk (void);
-
- ACE_Allocator *allocator_strategy_;
- // Pointer to the allocator used by this Obstack.
-
- size_t size_;
- // Current size of the Obstack;
-
- // = Don't change the order of the following two fields.
- class ACE_Obchunk *head_;
- // Head of the Obchunk chain.
-
- class ACE_Obchunk *curr_;
- // Pointer to the current Obchunk.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Obstack.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_OBSTACK_H */
diff --git a/ace/Obstack.i b/ace/Obstack.i
deleted file mode 100644
index 7a47c3da4cc..00000000000
--- a/ace/Obstack.i
+++ /dev/null
@@ -1,9 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Obstack.i
-
-ACE_INLINE
-ACE_Obchunk::~ACE_Obchunk (void)
-{
-}
diff --git a/ace/POSIX_Asynch_IO.cpp b/ace/POSIX_Asynch_IO.cpp
deleted file mode 100644
index a82e7ac2026..00000000000
--- a/ace/POSIX_Asynch_IO.cpp
+++ /dev/null
@@ -1,3381 +0,0 @@
-// $Id$
-
-#include "ace/POSIX_Asynch_IO.h"
-
-#if defined (ACE_HAS_AIO_CALLS)
-
-
-#include "ace/Proactor.h"
-#include "ace/Message_Block.h"
-#include "ace/Service_Config.h"
-#include "ace/INET_Addr.h"
-#include "ace/Task_T.h"
-#include "ace/POSIX_Proactor.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/POSIX_Asynch_IO.i"
-#endif /* __ACE_INLINE__ */
-
-u_long
-ACE_POSIX_Asynch_Result::bytes_transferred (void) const
-{
- return this->bytes_transferred_;
-}
-
-const void *
-ACE_POSIX_Asynch_Result::act (void) const
-{
- return this->act_;
-}
-
-int
-ACE_POSIX_Asynch_Result::success (void) const
-{
- return this->success_;
-}
-
-const void *
-ACE_POSIX_Asynch_Result::completion_key (void) const
-{
- return this->completion_key_;
-}
-
-u_long
-ACE_POSIX_Asynch_Result::error (void) const
-{
- return this->error_;
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Result::event (void) const
-{
- return ACE_INVALID_HANDLE;
-}
-
-u_long
-ACE_POSIX_Asynch_Result::offset (void) const
-{
- return this->aio_offset;
-}
-
-u_long
-ACE_POSIX_Asynch_Result::offset_high (void) const
-{
- //
- // @@ Support aiocb64??
- //
- ACE_NOTSUP_RETURN (0);
-}
-
-int
-ACE_POSIX_Asynch_Result::priority (void) const
-{
- return this->aio_reqprio;
-}
-
-int
-ACE_POSIX_Asynch_Result::signal_number (void) const
-{
- return this->aio_sigevent.sigev_signo;
-}
-
-int
-ACE_POSIX_Asynch_Result::post_completion (ACE_Proactor_Impl *proactor_impl)
-{
- // Get to the platform specific implementation.
- ACE_POSIX_Proactor *posix_proactor = ACE_dynamic_cast (ACE_POSIX_Proactor *,
- proactor_impl);
-
- if (posix_proactor == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Dynamic cast to POSIX Proactor failed\n"), -1);
-
- // Post myself.
- return posix_proactor->post_completion (this);
-}
-
-ACE_POSIX_Asynch_Result::~ACE_POSIX_Asynch_Result (void)
-{
-}
-
-ACE_POSIX_Asynch_Result::ACE_POSIX_Asynch_Result (ACE_Handler &handler,
- const void* act,
- ACE_HANDLE event,
- u_long offset,
- u_long offset_high,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- aiocb (),
- handler_ (handler),
- act_ (act),
- success_ (0),
- completion_key_ (0)
-{
- aio_offset = offset;
- aio_reqprio = priority;
- aio_sigevent.sigev_signo = signal_number;
-
- // Event is not used on POSIX.
-ACE_UNUSED_ARG (event);
-
- //
- // @@ Support offset_high with aiocb64.
- //
- ACE_UNUSED_ARG (offset_high);
-
- // Other fields in the <aiocb> will be initialized by the
- // subclasses.
-}
-
-// ****************************************************************
-
-int
-ACE_POSIX_Asynch_Operation::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- this->proactor_ = proactor;
- this->handler_ = &handler;
- this->handle_ = handle;
-
- // Grab the handle from the <handler> if <handle> is invalid
- if (this->handle_ == ACE_INVALID_HANDLE)
- this->handle_ = this->handler_->handle ();
- if (this->handle_ == ACE_INVALID_HANDLE)
- return -1;
-
-#if 0
- // @@ If <proactor> is 0, let us not bother about getting this
- // Proactor, we have already got the specific implementation
- // Proactor.
-
- // If no proactor was passed
- if (this->proactor_ == 0)
- {
- // Grab the proactor from the <Service_Config> if
- // <handler->proactor> is zero
- this->proactor_ = this->handler_->proactor ();
- if (this->proactor_ == 0)
- this->proactor_ = ACE_Proactor::instance();
- }
-#endif /* 0 */
-
- // AIO stuff is present. So no registering.
- ACE_UNUSED_ARG (completion_key);
- return 0;
-}
-
-int
-ACE_POSIX_Asynch_Operation::cancel (void)
-{
- int result = ::aio_cancel (this->handle_, 0);
-
- if (result == -1)
- return -1;
-
- // Check the return value and return 0/1/2 appropriately.
- if (result == AIO_CANCELED)
- return 0;
- else if (result == AIO_ALLDONE)
- return 1;
- else if (result == AIO_NOTCANCELED)
- return 2;
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P | %t):%p\n"
- "ACE_POSIX_Asynch_Operation::cancel: "
- "Unexpected result from <aio_cancel>"),
- -1);
-}
-
-ACE_Proactor *
-ACE_POSIX_Asynch_Operation::proactor (void) const
-{
- return this->proactor_;
-}
-
-ACE_POSIX_Asynch_Operation::~ACE_POSIX_Asynch_Operation (void)
-{
-}
-
-ACE_POSIX_Asynch_Operation::ACE_POSIX_Asynch_Operation (void)
- : ACE_Asynch_Operation_Impl (),
- handler_ (0),
- handle_ (ACE_INVALID_HANDLE)
-{
-}
-
-// *********************************************************************
-
-ACE_POSIX_AIOCB_Proactor *
-ACE_POSIX_AIOCB_Asynch_Operation::posix_proactor (void) const
-{
- return this->posix_aiocb_proactor_;
-}
-
-ACE_POSIX_AIOCB_Asynch_Operation::ACE_POSIX_AIOCB_Asynch_Operation (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_POSIX_Asynch_Operation (),
- posix_aiocb_proactor_ (posix_aiocb_proactor)
-{
-}
-
-ACE_POSIX_AIOCB_Asynch_Operation::~ACE_POSIX_AIOCB_Asynch_Operation (void)
-{
-}
-
-// If the ptr is o, just check whether there is any slot free and
-// return 0 if yes, else return -1. If a valid ptr is passed, keep it
-// in a free slot.
-int
-ACE_POSIX_AIOCB_Asynch_Operation::register_aio_with_proactor (ACE_POSIX_Asynch_Result *result)
-{
- return this->posix_proactor ()->register_aio_with_proactor (result);
-}
-
-// *********************************************************************
-
-ACE_POSIX_SIG_Proactor *
-ACE_POSIX_SIG_Asynch_Operation::posix_proactor (void) const
-{
- return this->posix_sig_proactor_;
-}
-
-ACE_POSIX_SIG_Asynch_Operation::ACE_POSIX_SIG_Asynch_Operation (ACE_POSIX_SIG_Proactor *posix_sig_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_POSIX_Asynch_Operation (),
- posix_sig_proactor_ (posix_sig_proactor)
-{
-}
-
-ACE_POSIX_SIG_Asynch_Operation::~ACE_POSIX_SIG_Asynch_Operation (void)
-{
-}
-
-// *********************************************************************
-
-u_long
-ACE_POSIX_Asynch_Read_Stream_Result::bytes_to_read (void) const
-{
- return this->aio_nbytes;
-}
-
-ACE_Message_Block &
-ACE_POSIX_Asynch_Read_Stream_Result::message_block (void) const
-{
- return this->message_block_;
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Read_Stream_Result::handle (void) const
-{
- return this->aio_fildes;
-}
-
-ACE_POSIX_Asynch_Read_Stream_Result::ACE_POSIX_Asynch_Read_Stream_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Read_Stream_Result_Impl (),
- ACE_POSIX_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
- message_block_ (message_block)
-{
- this->aio_fildes = handle;
- this->aio_buf = message_block.wr_ptr ();
- this->aio_nbytes = bytes_to_read;
- ACE_UNUSED_ARG (event);
-}
-
-void
-ACE_POSIX_Asynch_Read_Stream_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // <errno> is available in the aiocb.
- ACE_UNUSED_ARG (error);
-
- // Appropriately move the pointers in the message block.
- this->message_block_.wr_ptr (bytes_transferred);
-
- // Create the interface result class.
- ACE_Asynch_Read_Stream::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_read_stream (result);
-}
-
-ACE_POSIX_Asynch_Read_Stream_Result::~ACE_POSIX_Asynch_Read_Stream_Result (void)
-{
-}
-
-// = Base class operations. These operations are here to kill
-// dominance warnings. These methods call the base class methods.
-
-u_long
-ACE_POSIX_Asynch_Read_Stream_Result::bytes_transferred (void) const
-{
- return ACE_POSIX_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_POSIX_Asynch_Read_Stream_Result::act (void) const
-{
- return ACE_POSIX_Asynch_Result::act ();
-}
-
-int
-ACE_POSIX_Asynch_Read_Stream_Result::success (void) const
-{
- return ACE_POSIX_Asynch_Result::success ();
-}
-
-const void *
-ACE_POSIX_Asynch_Read_Stream_Result::completion_key (void) const
-{
- return ACE_POSIX_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_POSIX_Asynch_Read_Stream_Result::error (void) const
-{
- return ACE_POSIX_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Read_Stream_Result::event (void) const
-{
- return ACE_POSIX_Asynch_Result::event ();
-}
-
-u_long
-ACE_POSIX_Asynch_Read_Stream_Result::offset (void) const
-{
- return ACE_POSIX_Asynch_Result::offset ();
-}
-
-u_long
-ACE_POSIX_Asynch_Read_Stream_Result::offset_high (void) const
-{
- return ACE_POSIX_Asynch_Result::offset_high ();
-}
-
-int
-ACE_POSIX_Asynch_Read_Stream_Result::priority (void) const
-{
- return ACE_POSIX_Asynch_Result::priority ();
-}
-
-int
-ACE_POSIX_Asynch_Read_Stream_Result::signal_number (void) const
-{
- return ACE_POSIX_Asynch_Result::signal_number ();
-}
-
-int
-ACE_POSIX_Asynch_Read_Stream_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_POSIX_Asynch_Result::post_completion (proactor);
-}
-
-// ************************************************************
-
-ACE_POSIX_AIOCB_Asynch_Read_Stream::ACE_POSIX_AIOCB_Asynch_Read_Stream (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Read_Stream_Impl (),
- ACE_POSIX_AIOCB_Asynch_Operation (posix_aiocb_proactor)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number)
-{
- // Create the Asynch_Result.
- ACE_POSIX_Asynch_Read_Stream_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Read_Stream_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_read,
- act,
- this->posix_proactor ()->get_handle (),
- priority,
- signal_number),
- -1);
-
- ssize_t return_val = this->shared_read (result);
-
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_POSIX_AIOCB_Asynch_Read_Stream::~ACE_POSIX_AIOCB_Asynch_Read_Stream (void)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Read_Stream::shared_read (ACE_POSIX_Asynch_Read_Stream_Result *result)
-{
- // AIO_CONTROL_BLOCKS strategy.
-
- // Store this <result> with the proactor.
-
- // Make sure there is space in the aiocb list.
- if (this->register_aio_with_proactor (0) == -1)
- {
- // @@ Set errno to EAGAIN so that applications will know this as
- // a queueing failure and try again this aio_read it they want.
- errno = EAGAIN;
- ACE_ERROR_RETURN ((LM_ERROR,
- "Fatal error:%N:%l:%p\n",
- "AIOContol Block Array is full!!!. Didnt issue the aio call"),
- -1);
- }
-
- // Setup AIOCB.
-
- // We are not making use of the RT signal queueing in this
- // strategy.
- result->aio_sigevent.sigev_notify = SIGEV_NONE;
-
- // Fire off the aio read.
- if (aio_read (result) == -1)
- // Queueing failed.
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%p\n",
- "Asynch_Read_Stream: aio_read queueing failed"),
- -1);
-
- // <aio_read> successfully issued. Store the <result> with
- // proactor.
- if (this->register_aio_with_proactor (result) == -1)
- // This shouldn't happen anyway, since we have already checked for
- // availability of free slots.
- ACE_ERROR_RETURN ((LM_ERROR,
- "Fatal error:%N:%l:%p\n",
- "AIOContol Block Array is full!!!. Didnt issue the aio call"),
- -1);
-
- // <aio_read> successfully issued and ptr stored.
- return 0;
-}
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route the
-// call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_AIOCB_Asynch_Read_Stream::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Read_Stream::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_AIOCB_Asynch_Read_Stream::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// *********************************************************************
-
-ACE_POSIX_SIG_Asynch_Read_Stream::ACE_POSIX_SIG_Asynch_Read_Stream (ACE_POSIX_SIG_Proactor *posix_sig_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Read_Stream_Impl (),
- ACE_POSIX_SIG_Asynch_Operation (posix_sig_proactor)
-{
-}
-
-int
-ACE_POSIX_SIG_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number)
-{
- // Create the Asynch_Result.
- ACE_POSIX_Asynch_Read_Stream_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Read_Stream_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_read,
- act,
- this->posix_sig_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- ssize_t return_val = this->shared_read (result);
-
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_POSIX_SIG_Asynch_Read_Stream::~ACE_POSIX_SIG_Asynch_Read_Stream (void)
-{
-}
-
-int
-ACE_POSIX_SIG_Asynch_Read_Stream::shared_read (ACE_POSIX_Asynch_Read_Stream_Result *result)
-{
- // Setup AIOCB.
-
- // We want queuing of RT signal to notify completion.
- result->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
- result->aio_sigevent.sigev_signo = result->signal_number ();
-
- // Keep ACE_POSIX_Asynch_Result, the base class pointer in the
- // signal value.
- ACE_POSIX_Asynch_Result *base_result = result;
- result->aio_sigevent.sigev_value.sival_ptr = ACE_reinterpret_cast (void *,
- base_result);
-
- // Fire off the aio read.
- if (aio_read (result) == -1)
- // Queueing failed.
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%N%l:%p\n",
- "Asynch_Read_Stream: aio_read queueing failed"),
- -1);
- return 0;
-}
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route the
-// call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_SIG_Asynch_Read_Stream::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_POSIX_SIG_Asynch_Read_Stream::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_SIG_Asynch_Read_Stream::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// ****************************************************************
-
-u_long
-ACE_POSIX_Asynch_Write_Stream_Result::bytes_to_write (void) const
-{
- return this->aio_nbytes;
-}
-
-ACE_Message_Block &
-ACE_POSIX_Asynch_Write_Stream_Result::message_block (void) const
-{
- return this->message_block_;
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Write_Stream_Result::handle (void) const
-{
- return this->aio_fildes;
-}
-
-ACE_POSIX_Asynch_Write_Stream_Result::ACE_POSIX_Asynch_Write_Stream_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Write_Stream_Result_Impl (),
- ACE_POSIX_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
- message_block_ (message_block)
-{
- this->aio_fildes = handle;
- this->aio_buf = message_block.rd_ptr ();
- this->aio_nbytes = bytes_to_write;
- ACE_UNUSED_ARG (event);
-}
-
-void
-ACE_POSIX_Asynch_Write_Stream_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Get all the data copied.
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // <errno> is available in the aiocb.
- ACE_UNUSED_ARG (error);
-
- // Appropriately move the pointers in the message block.
- this->message_block_.rd_ptr (bytes_transferred);
-
- // Create the interface result class.
- ACE_Asynch_Write_Stream::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_write_stream (result);
-}
-
-ACE_POSIX_Asynch_Write_Stream_Result::~ACE_POSIX_Asynch_Write_Stream_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_POSIX_Asynch_Write_Stream_Result::bytes_transferred (void) const
-{
- return ACE_POSIX_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_POSIX_Asynch_Write_Stream_Result::act (void) const
-{
- return ACE_POSIX_Asynch_Result::act ();
-}
-
-int
-ACE_POSIX_Asynch_Write_Stream_Result::success (void) const
-{
- return ACE_POSIX_Asynch_Result::success ();
-}
-
-const void *
-ACE_POSIX_Asynch_Write_Stream_Result::completion_key (void) const
-{
- return ACE_POSIX_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_POSIX_Asynch_Write_Stream_Result::error (void) const
-{
- return ACE_POSIX_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Write_Stream_Result::event (void) const
-{
- return ACE_POSIX_Asynch_Result::event ();
-}
-
-u_long
-ACE_POSIX_Asynch_Write_Stream_Result::offset (void) const
-{
- return ACE_POSIX_Asynch_Result::offset ();
-}
-
-u_long
-ACE_POSIX_Asynch_Write_Stream_Result::offset_high (void) const
-{
- return ACE_POSIX_Asynch_Result::offset_high ();
-}
-
-int
-ACE_POSIX_Asynch_Write_Stream_Result::priority (void) const
-{
- return ACE_POSIX_Asynch_Result::priority ();
-}
-
-int
-ACE_POSIX_Asynch_Write_Stream_Result::signal_number (void) const
-{
- return ACE_POSIX_Asynch_Result::signal_number ();
-}
-
-int
-ACE_POSIX_Asynch_Write_Stream_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_POSIX_Asynch_Result::post_completion (proactor);
-}
-
-// *********************************************************************
-
-ACE_POSIX_AIOCB_Asynch_Write_Stream::ACE_POSIX_AIOCB_Asynch_Write_Stream (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Write_Stream_Impl (),
- ACE_POSIX_AIOCB_Asynch_Operation (posix_aiocb_proactor)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number)
-{
- ACE_POSIX_Asynch_Write_Stream_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Write_Stream_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_write,
- act,
- this->posix_proactor ()->get_handle (),
- priority,
- signal_number),
- -1);
-
- ssize_t return_val = this->shared_write (result);
-
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_POSIX_AIOCB_Asynch_Write_Stream::~ACE_POSIX_AIOCB_Asynch_Write_Stream (void)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Write_Stream::shared_write (ACE_POSIX_Asynch_Write_Stream_Result *result)
-{
- // AIO_CONTROL_BLOCKS strategy.
-
- // Make sure there is space in the aiocb list.
- if (this->register_aio_with_proactor (0) == -1)
- {
- // @@ Set errno to EAGAIN so that applications will know this as
- // a queueing failure and try again this aio_read it they want.
- errno = EAGAIN;
- ACE_ERROR_RETURN ((LM_ERROR,
- "Fatal error:%N:%l:%p\n",
- "AIOContol Block Array is full!!!. Didnt issue the aio call"),
- -1);
- }
-
- // Setup AIOCB.
- result->aio_sigevent.sigev_notify = SIGEV_NONE;
-
- // Fire off the aio write.
- if (aio_write (result) == -1)
- // Queueing failed.
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%p\n",
- "Asynch_Write_Stream: aio_write queueing failed"),
- -1);
-
- // Success. Store the <result> with Proactor.
- if (this->register_aio_with_proactor (result) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Fatal error:%N:%l:%p\n",
- "AIOContol Block Array is full!!!"),
- -1);
-
- // Aio successfully issued.
- return 0;
-}
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route
-// the call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_AIOCB_Asynch_Write_Stream::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Write_Stream::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_AIOCB_Asynch_Write_Stream::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// *********************************************************************
-
-ACE_POSIX_SIG_Asynch_Write_Stream::ACE_POSIX_SIG_Asynch_Write_Stream (ACE_POSIX_SIG_Proactor *posix_sig_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Write_Stream_Impl (),
- ACE_POSIX_SIG_Asynch_Operation (posix_sig_proactor)
-{
-}
-
-int
-ACE_POSIX_SIG_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number)
-{
- ACE_POSIX_Asynch_Write_Stream_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Write_Stream_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_write,
- act,
- this->posix_sig_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- ssize_t return_val = this->shared_write (result);
-
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_POSIX_SIG_Asynch_Write_Stream::~ACE_POSIX_SIG_Asynch_Write_Stream (void)
-{
-}
-
-int
-ACE_POSIX_SIG_Asynch_Write_Stream::shared_write (ACE_POSIX_Asynch_Write_Stream_Result *result)
-{
- // Setup AIOCB.
-
- // We want queuing of RT signal to notify completion.
- result->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
- result->aio_sigevent.sigev_signo = result->signal_number ();
-
- // Keep ACE_POSIX_Asynch_Result, the base class pointer in the
- // signal value.
- ACE_POSIX_Asynch_Result *base_result = result;
- result->aio_sigevent.sigev_value.sival_ptr = ACE_reinterpret_cast (void *,
- base_result);
-
- // Fire off the aio write.
- if (aio_write (result) == -1)
- // Queueing failed.
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%p\n",
- "Asynch_Write_Stream: aio_write queueing failed"),
- -1);
- return 0;
-}
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route
-// the call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_SIG_Asynch_Write_Stream::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_POSIX_SIG_Asynch_Write_Stream::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_SIG_Asynch_Write_Stream::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// *************************************************************
-
-ACE_POSIX_Asynch_Read_File_Result::ACE_POSIX_Asynch_Read_File_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Read_Stream_Result_Impl (),
- ACE_Asynch_Read_File_Result_Impl (),
- ACE_POSIX_Asynch_Read_Stream_Result (handler,
- handle,
- message_block,
- bytes_to_read,
- act,
- event,
- priority,
- signal_number)
-{
- this->aio_offset = offset;
- //
- // @@ Use aiocb64??
- //
- ACE_UNUSED_ARG (offset_high);
-}
-
-void
-ACE_POSIX_Asynch_Read_File_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Copy all the data.
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // <errno> is available in the aiocb.
- ACE_UNUSED_ARG (error);
-
- // Appropriately move the pointers in the message block.
- this->message_block_.wr_ptr (bytes_transferred);
-
- // Create the interface result class.
- ACE_Asynch_Read_File::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_read_file (result);
-}
-
-ACE_POSIX_Asynch_Read_File_Result::~ACE_POSIX_Asynch_Read_File_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_POSIX_Asynch_Read_File_Result::bytes_transferred (void) const
-{
- return ACE_POSIX_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_POSIX_Asynch_Read_File_Result::act (void) const
-{
- return ACE_POSIX_Asynch_Result::act ();
-}
-
-int
-ACE_POSIX_Asynch_Read_File_Result::success (void) const
-{
- return ACE_POSIX_Asynch_Result::success ();
-}
-
-const void *
-ACE_POSIX_Asynch_Read_File_Result::completion_key (void) const
-{
- return ACE_POSIX_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_POSIX_Asynch_Read_File_Result::error (void) const
-{
- return ACE_POSIX_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Read_File_Result::event (void) const
-{
- return ACE_POSIX_Asynch_Result::event ();
-}
-
-u_long
-ACE_POSIX_Asynch_Read_File_Result::offset (void) const
-{
- return ACE_POSIX_Asynch_Result::offset ();
-}
-
-u_long
-ACE_POSIX_Asynch_Read_File_Result::offset_high (void) const
-{
- return ACE_POSIX_Asynch_Result::offset_high ();
-}
-
-int
-ACE_POSIX_Asynch_Read_File_Result::priority (void) const
-{
- return ACE_POSIX_Asynch_Result::priority ();
-}
-
-int
-ACE_POSIX_Asynch_Read_File_Result::signal_number (void) const
-{
- return ACE_POSIX_Asynch_Result::signal_number ();
-}
-
-// The following methods belong to
-// ACE_POSIX_Asynch_Read_Stream_Result. They are here to avoid
-// dominace warnings. These methods route their call to the
-// ACE_POSIX_Asynch_Read_Stream_Result base class.
-
-u_long
-ACE_POSIX_Asynch_Read_File_Result::bytes_to_read (void) const
-{
- return ACE_POSIX_Asynch_Read_Stream_Result::bytes_to_read ();
-}
-
-ACE_Message_Block &
-ACE_POSIX_Asynch_Read_File_Result::message_block (void) const
-{
- return ACE_POSIX_Asynch_Read_Stream_Result::message_block ();
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Read_File_Result::handle (void) const
-{
- return ACE_POSIX_Asynch_Read_Stream_Result::handle ();
-}
-
-int
-ACE_POSIX_Asynch_Read_File_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_POSIX_Asynch_Result::post_completion (proactor);
-}
-
-// *********************************************************************
-
-ACE_POSIX_AIOCB_Asynch_Read_File::ACE_POSIX_AIOCB_Asynch_Read_File (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Read_Stream_Impl (),
- ACE_Asynch_Read_File_Impl (),
- ACE_POSIX_AIOCB_Asynch_Read_Stream (posix_aiocb_proactor)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number)
-{
- ACE_POSIX_Asynch_Read_File_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Read_File_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_read,
- act,
- offset,
- offset_high,
- this->posix_proactor ()->get_handle (),
- priority,
- signal_number),
- -1);
-
- ssize_t return_val = this->shared_read (result);
-
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_POSIX_AIOCB_Asynch_Read_File::~ACE_POSIX_AIOCB_Asynch_Read_File (void)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number)
-{
- return ACE_POSIX_AIOCB_Asynch_Read_Stream::read (message_block,
- bytes_to_read,
- act,
- priority,
- signal_number);
-}
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route
-// the call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_AIOCB_Asynch_Read_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Read_File::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_AIOCB_Asynch_Read_File::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// ************************************************************
-
-ACE_POSIX_SIG_Asynch_Read_File::ACE_POSIX_SIG_Asynch_Read_File (ACE_POSIX_SIG_Proactor *posix_sig_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Read_Stream_Impl (),
- ACE_Asynch_Read_File_Impl (),
- ACE_POSIX_SIG_Asynch_Read_Stream (posix_sig_proactor)
-{
-}
-
-int
-ACE_POSIX_SIG_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number)
-{
- ACE_POSIX_Asynch_Read_File_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Read_File_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_read,
- act,
- offset,
- offset_high,
- this->posix_sig_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- ssize_t return_val = this->shared_read (result);
-
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-int
-ACE_POSIX_SIG_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number)
-{
- return ACE_POSIX_SIG_Asynch_Read_Stream::read (message_block,
- bytes_to_read,
- act,
- priority,
- signal_number);
-}
-
-ACE_POSIX_SIG_Asynch_Read_File::~ACE_POSIX_SIG_Asynch_Read_File (void)
-{
-}
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route
-// the call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_SIG_Asynch_Read_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_POSIX_SIG_Asynch_Read_File::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_SIG_Asynch_Read_File::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// ************************************************************
-
-ACE_POSIX_Asynch_Write_File_Result::ACE_POSIX_Asynch_Write_File_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Write_Stream_Result_Impl (),
- ACE_Asynch_Write_File_Result_Impl (),
- ACE_POSIX_Asynch_Write_Stream_Result (handler,
- handle,
- message_block,
- bytes_to_write,
- act,
- event,
- priority,
- signal_number)
-{
- this->aio_offset = offset;
- //
- // @@ Support offset_high with aiocb64.
- //
- ACE_UNUSED_ARG (offset_high);
-}
-
-void
-ACE_POSIX_Asynch_Write_File_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Copy the data.
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // <error> is available in <aio_resultp.aio_error>
- ACE_UNUSED_ARG (error);
-
- // Appropriately move the pointers in the message block.
- this->message_block_.rd_ptr (bytes_transferred);
-
- // Create the interface result class.
- ACE_Asynch_Write_File::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_write_file (result);
-}
-
-ACE_POSIX_Asynch_Write_File_Result::~ACE_POSIX_Asynch_Write_File_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_POSIX_Asynch_Write_File_Result::bytes_transferred (void) const
-{
- return ACE_POSIX_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_POSIX_Asynch_Write_File_Result::act (void) const
-{
- return ACE_POSIX_Asynch_Result::act ();
-}
-
-int
-ACE_POSIX_Asynch_Write_File_Result::success (void) const
-{
- return ACE_POSIX_Asynch_Result::success ();
-}
-
-const void *
-ACE_POSIX_Asynch_Write_File_Result::completion_key (void) const
-{
- return ACE_POSIX_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_POSIX_Asynch_Write_File_Result::error (void) const
-{
- return ACE_POSIX_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Write_File_Result::event (void) const
-{
- return ACE_POSIX_Asynch_Result::event ();
-}
-
-u_long
-ACE_POSIX_Asynch_Write_File_Result::offset (void) const
-{
- return ACE_POSIX_Asynch_Result::offset ();
-}
-
-u_long
-ACE_POSIX_Asynch_Write_File_Result::offset_high (void) const
-{
- return ACE_POSIX_Asynch_Result::offset_high ();
-}
-
-int
-ACE_POSIX_Asynch_Write_File_Result::priority (void) const
-{
- return ACE_POSIX_Asynch_Result::priority ();
-}
-
-int
-ACE_POSIX_Asynch_Write_File_Result::signal_number (void) const
-{
- return ACE_POSIX_Asynch_Result::signal_number ();
-}
-
-// The following methods belong to
-// ACE_POSIX_Asynch_Write_Stream_Result. They are here to avoid
-// dominance warnings. These methods route their call to the
-// ACE_POSIX_Asynch_Write_Stream_Result base class.
-
-u_long
-ACE_POSIX_Asynch_Write_File_Result::bytes_to_write (void) const
-{
- return ACE_POSIX_Asynch_Write_Stream_Result::bytes_to_write ();
-}
-
-ACE_Message_Block &
-ACE_POSIX_Asynch_Write_File_Result::message_block (void) const
-{
- return ACE_POSIX_Asynch_Write_Stream_Result::message_block ();
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Write_File_Result::handle (void) const
-{
- return ACE_POSIX_Asynch_Write_Stream_Result::handle ();
-}
-
-int
-ACE_POSIX_Asynch_Write_File_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_POSIX_Asynch_Result::post_completion (proactor);
-}
-
-// *********************************************************************
-
-ACE_POSIX_AIOCB_Asynch_Write_File::ACE_POSIX_AIOCB_Asynch_Write_File (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Write_Stream_Impl (),
- ACE_Asynch_Write_File_Impl (),
- ACE_POSIX_AIOCB_Asynch_Write_Stream (posix_aiocb_proactor)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number)
-{
- ACE_POSIX_Asynch_Write_File_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Write_File_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_write,
- act,
- offset,
- offset_high,
- this->posix_proactor ()->get_handle (),
- priority,
- signal_number),
- -1);
-
- ssize_t return_val = this->shared_write (result);
-
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_POSIX_AIOCB_Asynch_Write_File::~ACE_POSIX_AIOCB_Asynch_Write_File (void)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number)
-{
- return ACE_POSIX_AIOCB_Asynch_Write_Stream::write (message_block,
- bytes_to_write,
- act,
- priority,
- signal_number);
-}
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route
-// the call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_AIOCB_Asynch_Write_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Write_File::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_AIOCB_Asynch_Write_File::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// *********************************************************************
-
-ACE_POSIX_SIG_Asynch_Write_File::ACE_POSIX_SIG_Asynch_Write_File (ACE_POSIX_SIG_Proactor *posix_sig_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Write_Stream_Impl (),
- ACE_Asynch_Write_File_Impl (),
- ACE_POSIX_SIG_Asynch_Write_Stream (posix_sig_proactor)
-{
-}
-
-int
-ACE_POSIX_SIG_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number)
-{
- ACE_POSIX_Asynch_Write_File_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Write_File_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_write,
- act,
- offset,
- offset_high,
- this->posix_sig_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- ssize_t return_val = this->shared_write (result);
-
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_POSIX_SIG_Asynch_Write_File::~ACE_POSIX_SIG_Asynch_Write_File (void)
-{
-}
-
-int
-ACE_POSIX_SIG_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number)
-{
- return ACE_POSIX_SIG_Asynch_Write_Stream::write (message_block,
- bytes_to_write,
- act,
- priority,
- signal_number);
-}
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route
-// the call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_SIG_Asynch_Write_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_POSIX_SIG_Asynch_Write_File::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_SIG_Asynch_Write_File::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// *********************************************************************
-
-u_long
-ACE_POSIX_Asynch_Accept_Result::bytes_to_read (void) const
-{
- return this->aio_nbytes;
-}
-
-ACE_Message_Block &
-ACE_POSIX_Asynch_Accept_Result::message_block (void) const
-{
- return this->message_block_;
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Accept_Result::listen_handle (void) const
-{
- return this->listen_handle_;
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Accept_Result::accept_handle (void) const
-{
- return this->aio_fildes;
-}
-
-ACE_POSIX_Asynch_Accept_Result::ACE_POSIX_Asynch_Accept_Result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Accept_Result_Impl (),
- ACE_POSIX_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
- message_block_ (message_block),
- listen_handle_ (listen_handle)
-{
- this->aio_fildes = accept_handle;
- this->aio_nbytes = bytes_to_read;
-}
-
-void
-ACE_POSIX_Asynch_Accept_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Copy the data.
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // Appropriately move the pointers in the message block.
- this->message_block_.wr_ptr (bytes_transferred);
-
- // Create the interface result class.
- ACE_Asynch_Accept::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_accept (result);
-}
-
-ACE_POSIX_Asynch_Accept_Result::~ACE_POSIX_Asynch_Accept_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_POSIX_Asynch_Accept_Result::bytes_transferred (void) const
-{
- return ACE_POSIX_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_POSIX_Asynch_Accept_Result::act (void) const
-{
- return ACE_POSIX_Asynch_Result::act ();
-}
-
-int
-ACE_POSIX_Asynch_Accept_Result::success (void) const
-{
- return ACE_POSIX_Asynch_Result::success ();
-}
-
-const void *
-ACE_POSIX_Asynch_Accept_Result::completion_key (void) const
-{
- return ACE_POSIX_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_POSIX_Asynch_Accept_Result::error (void) const
-{
- return ACE_POSIX_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Accept_Result::event (void) const
-{
- return ACE_POSIX_Asynch_Result::event ();
-}
-
-u_long
-ACE_POSIX_Asynch_Accept_Result::offset (void) const
-{
- return ACE_POSIX_Asynch_Result::offset ();
-}
-
-u_long
-ACE_POSIX_Asynch_Accept_Result::offset_high (void) const
-{
- return ACE_POSIX_Asynch_Result::offset_high ();
-}
-
-int
-ACE_POSIX_Asynch_Accept_Result::priority (void) const
-{
- return ACE_POSIX_Asynch_Result::priority ();
-}
-
-int
-ACE_POSIX_Asynch_Accept_Result::signal_number (void) const
-{
- return ACE_POSIX_Asynch_Result::signal_number ();
-}
-
-int
-ACE_POSIX_Asynch_Accept_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_POSIX_Asynch_Result::post_completion (proactor);
-}
-
-// *********************************************************************
-
-class ACE_Export ACE_POSIX_Asynch_Accept_Handler : public ACE_Event_Handler
-{
- // = TITLE
- // For the POSIX implementation, we have two helper classes
- // (ACE_POSIX_AIOCB_Asynch_Accept_Hander and
- // ACE_POSIX_SIG_Asynch_Accept_Handler) to do <Asynch_Accept>. This
- // class abstracts out the commonalities on these two helper classes.
- //
- // = DESCRIPTION
- //
-public:
- ~ACE_POSIX_Asynch_Accept_Handler (void);
- // Destructor.
-
-protected:
- ACE_POSIX_Asynch_Accept_Handler (ACE_Reactor* reactor,
- ACE_POSIX_Proactor *posix_proactor);
- // Constructor. Give the reactor so that it can activate/deactivate
- // the handlers. Give also the proactor used here, so that the
- // handler can send the <POSIX_Asynch_Accept> result block through
- // <post_completion>.
-
- int register_accept_call_i (ACE_POSIX_Asynch_Accept_Result* result);
- // Worker method for registering this <accept> call with the local
- // handler. This method has the common code found between the two
- // differnt implementation subclasses. This method assumes that
- // locks are already obtained to access the shared the queues.
-
- ACE_POSIX_Asynch_Accept_Result* deregister_accept_call (void);
- // Method for deregistering.
-
- ACE_Reactor* reactor_;
- // Reactor used by the Asynch_Accept. We need this here to enable
- // and disable the <handle> now and then, depending on whether any
- // <accept> is pending or no.
-
- ACE_POSIX_Proactor *posix_proactor_;
- // POSIX_Proactor.
-
- ACE_Unbounded_Queue<ACE_POSIX_Asynch_Accept_Result*> result_queue_;
- // Queue of Result pointers that correspond to all the <accept>'s
- // pending.
-
- ACE_SYNCH_MUTEX lock_;
- // The lock to protect the result queue which is shared. The queue
- // is updated by main thread in the register function call and
- // through the auxillary thread in the deregister fun. So let us
- // mutex it.
-};
-
-// *********************************************************************
-
-class ACE_Export ACE_POSIX_AIOCB_Asynch_Accept_Handler : public ACE_POSIX_Asynch_Accept_Handler
-{
- // = TITLE
- // For the POSIX implementation, this class takes care of doing
- // <Asynch_Accept> for AIOCB strategy.
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_AIOCB_Asynch_Accept_Handler (ACE_Reactor *reactor,
- ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor);
- // Constructor. Give the reactor so that it can activate/deactivate
- // the handlers. Give also the proactor used here, so that the
- // handler can send information through the notification pipe
- // (<post_completion>).
-
- ~ACE_POSIX_AIOCB_Asynch_Accept_Handler (void);
- // Destructor.
-
- int register_accept_call (ACE_POSIX_Asynch_Accept_Result* result);
- // Register this <accept> call with the local handler.
-
- virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
- // Called when accept event comes up on the <listen_handle>.
-};
-
-// *********************************************************************
-
-class ACE_Export ACE_POSIX_SIG_Asynch_Accept_Handler : public ACE_POSIX_Asynch_Accept_Handler
-{
- // = TITLE
- // For the POSIX implementation, this class takes care of doing
- // Asynch_Accept.
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_SIG_Asynch_Accept_Handler (ACE_Reactor* reactor,
- ACE_POSIX_SIG_Proactor *posix_sig_proactor);
- // Constructor. Give the reactor so that it can activate/deactivate
- // the handlers. Give also the proactor used here, so that the
- // handler can send information through <post_completion>.
-
- ~ACE_POSIX_SIG_Asynch_Accept_Handler (void);
- // Destructor.
-
- int register_accept_call (ACE_POSIX_Asynch_Accept_Result* result);
- // Register this <accept> call with the local handler.
-
- virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);
- // Called when accept event comes up on the <listen_handle>.
-};
-
-// *********************************************************************
-
-ACE_POSIX_Asynch_Accept_Handler::ACE_POSIX_Asynch_Accept_Handler (ACE_Reactor* reactor,
- ACE_POSIX_Proactor *posix_proactor)
- : reactor_ (reactor),
- posix_proactor_ (posix_proactor)
-{
-}
-
-ACE_POSIX_Asynch_Accept_Handler::~ACE_POSIX_Asynch_Accept_Handler (void)
-{
-}
-
-int
-ACE_POSIX_Asynch_Accept_Handler::register_accept_call_i (ACE_POSIX_Asynch_Accept_Result* result)
-{
- // Insert this result to the queue.
- int insert_result = this->result_queue_.enqueue_tail (result);
- if (insert_result == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:ACE_POSIX_Asynch_Accept_Handler::register_accept_call failed\n"),
- -1);
-
- // If this is the only item, then it means there the set was empty
- // before. So enable the <handle> in the reactor.
- if (this->result_queue_.size () == 1)
- {
- int return_val = this->reactor_->resume_handler (result->listen_handle ());
- if (return_val == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:ACE_POSIX_Asynch_Accept_Handler::register_accept_call: "
- "Reactor::resume_handler failed\n"),
- -1);
- }
-
- return 0;
-}
-
-// @@ We could have a queue where the <result> objects are arranged
-// according to the priority. This will help us to demux the accept
-// completions based on the priority. (Alex).
-
-ACE_POSIX_Asynch_Accept_Result *
-ACE_POSIX_Asynch_Accept_Handler::deregister_accept_call (void)
-{
- // The queue is updated by main thread in the register function call and
- // thru the auxillary thread in the deregister fun. So let us mutex
- // it.
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->lock_, 0);
-
- // Get the first item (result ptr) from the Queue.
- ACE_POSIX_Asynch_Accept_Result* result = 0;
- if (this->result_queue_.dequeue_head (result) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t):%p\n",
- "ACE_POSIX_Asynch_Accept_Handler::"
- "deregister_accept_call:dequeueing failed"),
- 0);
-
- ACE_ASSERT (result != 0);
-
- // Disable the <handle> in the reactor if no <accept>'s are pending.
- if (this->result_queue_.size () == 0)
- {
- if (this->reactor_->suspend_handler (result->listen_handle ()) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t):%p\n",
- "ACE_POSIX_Asynch_Accept_Handler::"
- "deregister_accept_call:suspend handler failed"),
- 0);
- }
-
- // Return the result pointer.
- return result;
-}
-
-// *********************************************************************
-
-ACE_POSIX_AIOCB_Asynch_Accept_Handler::ACE_POSIX_AIOCB_Asynch_Accept_Handler (ACE_Reactor* reactor,
- ACE_POSIX_AIOCB_Proactor* posix_aiocb_proactor)
- : ACE_POSIX_Asynch_Accept_Handler (reactor, posix_aiocb_proactor)
-{
-}
-
-ACE_POSIX_AIOCB_Asynch_Accept_Handler::~ACE_POSIX_AIOCB_Asynch_Accept_Handler (void)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Accept_Handler::register_accept_call (ACE_POSIX_Asynch_Accept_Result* result)
-{
- // The queue is updated by main thread in the register function call
- // and thru the auxillary thread in the deregister fun. So let us
- // mutex it.
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->lock_, -1);
-
- return register_accept_call_i (result);
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Accept_Handler::handle_input (ACE_HANDLE /* fd */)
-{
- // An <accept> has been sensed on the <listen_handle>. We should be
- // able to just go ahead and do the <accept> now on this <fd>. This
- // should be the same as the <listen_handle>.
-
- // Deregister this info pertaining to this <accept> call.
- ACE_POSIX_Asynch_Accept_Result* result = this->deregister_accept_call ();
- if (result == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t):%p\n",
- "ACE_POSIX_AIOCB_Asynch_Accept_Handler::"
- "handle_input:deregister_accept_call failed"),
- -1);
-
- // Issue <accept> now.
- // @@ We shouldnt block here since we have already done poll/select
- // thru reactor. But are we sure?
- ACE_HANDLE new_handle = ACE_OS::accept (result->listen_handle (), 0, 0);
- if (new_handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t):%p\n",
- "ACE_POSIX_AIOCB_Asynch_Accept_Handler::"
- "handle_input:<accept> system call failed"),
- -1);
-
- // Accept has completed.
-
- // Store the new handle.
- result->aio_fildes = new_handle;
-
- // Notify the main process about this completion
- // Send the Result through the notification pipe.
- if (this->posix_proactor_->post_completion (result) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:(%P | %t):%p\n",
- "ACE_POSIX_AIOCB_Asynch_Accept_Handler::"
- "handle_input:<post_completion> failed"),
- -1);
-
- return 0;
-}
-
-// *********************************************************************
-
-ACE_POSIX_SIG_Asynch_Accept_Handler::ACE_POSIX_SIG_Asynch_Accept_Handler (ACE_Reactor* reactor,
- ACE_POSIX_SIG_Proactor *posix_sig_proactor)
- : ACE_POSIX_Asynch_Accept_Handler (reactor, posix_sig_proactor)
-{
-}
-
-ACE_POSIX_SIG_Asynch_Accept_Handler::~ACE_POSIX_SIG_Asynch_Accept_Handler (void)
-{
-}
-
-int
-ACE_POSIX_SIG_Asynch_Accept_Handler::register_accept_call (ACE_POSIX_Asynch_Accept_Result* result)
-{
- // The queue is updated by main thread in the register function call
- // and thru the auxillary thread in the deregister fun. So let us
- // mutex it.
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->lock_, -1);
-
- // Do the work.
- if (this->register_accept_call_i (result) == -1)
- return -1;
-
- return 0;
-}
-
-int
-ACE_POSIX_SIG_Asynch_Accept_Handler::handle_input (ACE_HANDLE /* fd */)
-{
- // An <accept> has been sensed on the <listen_handle>. We should be
- // able to just go ahead and do the <accept> now on this <fd>. This
- // should be the same as the <listen_handle>.
-
- // Deregister this info pertaining to this <accept> call.
- ACE_POSIX_Asynch_Accept_Result* result = this->deregister_accept_call ();
- if (result == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t):%p\n",
- "ACE_POSIX_SIG_Asynch_Accept_Handler::"
- "handle_input:deregister_accept_call failed"),
- -1);
-
- // Issue <accept> now.
- // @@ We shouldnt block here since we have already done poll/select
- // thru reactor. But are we sure?
- ACE_HANDLE new_handle = ACE_OS::accept (result->listen_handle (), 0, 0);
- if (new_handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:(%P | %t):%p\n",
- "ACE_POSIX_SIG_Asynch_Accept_Handler::"
- "handle_input:<accept> system call failed"),
- -1);
-
- // Accept has completed.
-
- // Store the new handle.
- result->aio_fildes = new_handle;
-
- // Notify the main process about this completion.
- if (this->posix_proactor_->post_completion (result) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:(%P | %t):%p\n",
- "ACE_POSIX_SIG_Asynch_Accept_Handler::"
- "handle_input:<post_completion> failed"),
- -1);
-
- return 0;
-}
-
-// *********************************************************************
-
-ACE_POSIX_AIOCB_Asynch_Accept::ACE_POSIX_AIOCB_Asynch_Accept (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Accept_Impl (),
- ACE_POSIX_AIOCB_Asynch_Operation (posix_aiocb_proactor),
- accept_handler_ (0)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Accept::accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle,
- const void *act,
- int priority,
- int signal_number)
-{
- // Sanity check: make sure that enough space has been allocated by
- // the caller.
- size_t address_size = sizeof (sockaddr_in) + sizeof (sockaddr);
- size_t space_in_use = message_block.wr_ptr () - message_block.base ();
- size_t total_size = message_block.size ();
- size_t available_space = total_size - space_in_use;
- size_t space_needed = bytes_to_read + 2 * address_size;
- if (available_space < space_needed)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Buffer too small\n")), -1);
-
- // Common code for both WIN and POSIX.
- ACE_POSIX_Asynch_Accept_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Accept_Result (*this->handler_,
- this->handle_,
- accept_handle,
- message_block,
- bytes_to_read,
- act,
- this->posix_proactor ()->get_handle (),
- priority,
- signal_number),
- -1);
-
- // Register this <accept> call with the local handler.
- if (this->accept_handler_->register_accept_call (result) == -1)
- return -1;
-
- return 0;
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Accept::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- int result = ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
- if (result == -1)
- return result;
-
- // Init the Asynch_Accept_Handler now. It needs to keep Proactor
- // also with it.
- ACE_NEW_RETURN (this->accept_handler_,
- ACE_POSIX_AIOCB_Asynch_Accept_Handler (&this->reactor_,
- this->posix_proactor ()),
- -1);
-
- // Register the handle with the reactor.
- int return_val = this->reactor_.register_handler (this->handle_,
- this->accept_handler_,
- ACE_Event_Handler::ACCEPT_MASK);
- if (return_val == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:Reactor::register_handler failed\n"),
- -1);
-
- // Suspend the <handle> now. Enable only when the <accept> is issued
- // by the application.
- return_val = this->reactor_.suspend_handler (this->handle_);
- if (return_val == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:Reactor::suspend_handler failed\n"),
- -1);
-
- // Spawn the thread. It is the only thread we are going to have. It
- // will do the <handle_events> on the reactor.
- return_val = ACE_Thread_Manager::instance ()->spawn (ACE_POSIX_AIOCB_Asynch_Accept::thread_function,
- ACE_reinterpret_cast (void *, &this->reactor_));
- if (return_val == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:Thread_Manager::spawn failed\n"),
- -1);
-
- return 0;
-}
-
-ACE_POSIX_AIOCB_Asynch_Accept::~ACE_POSIX_AIOCB_Asynch_Accept (void)
-{
-}
-
-void*
-ACE_POSIX_AIOCB_Asynch_Accept::thread_function (void* arg_reactor)
-{
- // Retrieve the reactor pointer from the argument.
- ACE_Reactor* reactor = ACE_reinterpret_cast (ACE_Reactor *,
- arg_reactor);
-
- // It should be valid Reactor, since we have a reactor_ ,e,ner we
- // are passing only that one here.
- if (reactor == 0)
- ACE_ERROR ((LM_ERROR,
- "%n:%l:Invalid Reactor pointer passed to the thread_function\n",
- 0));
-
- // For this reactor, this thread is the owner.
- reactor->owner (ACE_OS::thr_self ());
-
- // Handle events.
- int result = 0;
- while (result != -1)
- {
- result = reactor->handle_events ();
- }
- return 0;
-}
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route
-// the call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_AIOCB_Asynch_Accept::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_AIOCB_Asynch_Accept::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// *********************************************************************
-
-ACE_POSIX_SIG_Asynch_Accept::ACE_POSIX_SIG_Asynch_Accept (ACE_POSIX_SIG_Proactor *posix_sig_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Accept_Impl (),
- ACE_POSIX_SIG_Asynch_Operation (posix_sig_proactor),
- accept_handler_ (0)
-{
-}
-
-int
-ACE_POSIX_SIG_Asynch_Accept::accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle,
- const void *act,
- int priority,
- int signal_number)
-{
- // Sanity check: make sure that enough space has been allocated by
- // the caller.
- size_t address_size = sizeof (sockaddr_in) + sizeof (sockaddr);
- size_t space_in_use = message_block.wr_ptr () - message_block.base ();
- size_t total_size = message_block.size ();
- size_t available_space = total_size - space_in_use;
- size_t space_needed = bytes_to_read + 2 * address_size;
- if (available_space < space_needed)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Buffer too small\n")), -1);
-
- // Common code for both WIN and POSIX.
- ACE_POSIX_Asynch_Accept_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Accept_Result (*this->handler_,
- this->handle_,
- accept_handle,
- message_block,
- bytes_to_read,
- act,
- this->posix_sig_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- // Register this <accept> call with the local handler.
- this->accept_handler_->register_accept_call (result);
-
- return 0;
-}
-
-
-int
-ACE_POSIX_SIG_Asynch_Accept::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- int result = ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
- if (result == -1)
- return result;
-
- // Init the Asynch_Accept_Handler now. It needs to keep Proactor
- // also with it.
- ACE_NEW_RETURN (this->accept_handler_,
- ACE_POSIX_SIG_Asynch_Accept_Handler (&this->reactor_,
- this->posix_proactor ()),
- -1);
-
- // Register the handle with the reactor.
- int return_val = this->reactor_.register_handler (this->handle_,
- this->accept_handler_,
- ACE_Event_Handler::ACCEPT_MASK);
- if (return_val == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:Reactor::register_handler failed\n"),
- -1);
-
- // Suspend the <handle> now. Enable only when the <accept> is issued
- // by the application.
- return_val = this->reactor_.suspend_handler (this->handle_);
- if (return_val == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:Reactor::suspend_handler failed\n"),
- -1);
-
- // Spawn the thread. It is the only thread we are going to have. It
- // will do the <handle_events> on the reactor.
- return_val = ACE_Thread_Manager::instance ()->spawn (ACE_POSIX_SIG_Asynch_Accept::thread_function,
- (void *)&this->reactor_);
- if (return_val == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:Thread_Manager::spawn failed\n"),
- -1);
-
- return 0;
-}
-
-ACE_POSIX_SIG_Asynch_Accept::~ACE_POSIX_SIG_Asynch_Accept (void)
-{
-}
-
-void*
-ACE_POSIX_SIG_Asynch_Accept::thread_function (void* arg_reactor)
-{
- // Retrieve the reactor pointer from the argument.
- ACE_Reactor* reactor = ACE_reinterpret_cast (ACE_Reactor *,
- arg_reactor);
- if (reactor == 0)
- reactor = ACE_Reactor::instance ();
-
- // For this reactor, this thread is the owner.
- reactor->owner (ACE_OS::thr_self ());
-
- // Handle events. Wait for any connection events.
- int result = 0;
- while (result != -1)
- result = reactor->handle_events ();
-
- return 0;
-}
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route
-// the call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_SIG_Asynch_Accept::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_SIG_Asynch_Accept::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// *********************************************************************
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Transmit_File_Result::socket (void) const
-{
- return this->socket_;
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Transmit_File_Result::file (void) const
-{
- return this->aio_fildes;
-}
-
-ACE_Asynch_Transmit_File::Header_And_Trailer *
-ACE_POSIX_Asynch_Transmit_File_Result::header_and_trailer (void) const
-{
- return this->header_and_trailer_;
-}
-
-u_long
-ACE_POSIX_Asynch_Transmit_File_Result::bytes_to_write (void) const
-{
- return this->aio_nbytes;
-}
-
-u_long
-ACE_POSIX_Asynch_Transmit_File_Result::bytes_per_send (void) const
-{
- return this->bytes_per_send_;
-}
-
-u_long
-ACE_POSIX_Asynch_Transmit_File_Result::flags (void) const
-{
- return this->flags_;
-}
-
-ACE_POSIX_Asynch_Transmit_File_Result::ACE_POSIX_Asynch_Transmit_File_Result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Transmit_File_Result_Impl (),
- ACE_POSIX_Asynch_Result (handler, act, event, offset, offset_high, priority, signal_number),
- socket_ (socket),
- header_and_trailer_ (header_and_trailer),
- bytes_per_send_ (bytes_per_send),
- flags_ (flags)
-{
- this->aio_fildes = file;
- this->aio_nbytes = bytes_to_write;
-}
-
-void
-ACE_POSIX_Asynch_Transmit_File_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Copy the data.
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // We will not do this because (a) the header and trailer blocks may
- // be the same message_blocks and (b) in cases of failures we have
- // no idea how much of what (header, data, trailer) was sent.
- /*
- if (this->success_ && this->header_and_trailer_ != 0)
- {
- ACE_Message_Block *header = this->header_and_trailer_->header ();
- if (header != 0)
- header->rd_ptr (this->header_and_trailer_->header_bytes ());
-
- ACE_Message_Block *trailer = this->header_and_trailer_->trailer ();
- if (trailer != 0)
- trailer->rd_ptr (this->header_and_trailer_->trailer_bytes ());
- }
- */
-
- // Create the interface result class.
- ACE_Asynch_Transmit_File::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_transmit_file (result);
-}
-
-ACE_POSIX_Asynch_Transmit_File_Result::~ACE_POSIX_Asynch_Transmit_File_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_POSIX_Asynch_Transmit_File_Result::bytes_transferred (void) const
-{
- return ACE_POSIX_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_POSIX_Asynch_Transmit_File_Result::act (void) const
-{
- return ACE_POSIX_Asynch_Result::act ();
-}
-
-int
-ACE_POSIX_Asynch_Transmit_File_Result::success (void) const
-{
- return ACE_POSIX_Asynch_Result::success ();
-}
-
-const void *
-ACE_POSIX_Asynch_Transmit_File_Result::completion_key (void) const
-{
- return ACE_POSIX_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_POSIX_Asynch_Transmit_File_Result::error (void) const
-{
- return ACE_POSIX_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_POSIX_Asynch_Transmit_File_Result::event (void) const
-{
- return ACE_POSIX_Asynch_Result::event ();
-}
-
-u_long
-ACE_POSIX_Asynch_Transmit_File_Result::offset (void) const
-{
- return ACE_POSIX_Asynch_Result::offset ();
-}
-
-u_long
-ACE_POSIX_Asynch_Transmit_File_Result::offset_high (void) const
-{
- return ACE_POSIX_Asynch_Result::offset_high ();
-}
-
-int
-ACE_POSIX_Asynch_Transmit_File_Result::priority (void) const
-{
- return ACE_POSIX_Asynch_Result::priority ();
-}
-
-int
-ACE_POSIX_Asynch_Transmit_File_Result::signal_number (void) const
-{
- return ACE_POSIX_Asynch_Result::signal_number ();
-}
-
-int
-ACE_POSIX_Asynch_Transmit_File_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_POSIX_Asynch_Result::post_completion (proactor);
-}
-
-// *********************************************************************
-
-class ACE_Export ACE_POSIX_Asynch_Transmit_Handler : public ACE_Handler
-{
- // = TITLE
- //
- // Auxillary handler for doing <Asynch_Transmit_File> in
- // Unix. <ACE_POSIX_Asynch_Transmit_File> internally uses this.
- //
- // = DESCRIPTION
- //
- // This is a helper class for implementing
- // <ACE_POSIX_Asynch_Transmit_File> in Unix systems. This class
- // abstracts out all the commonalities in the two different
- // POSIX Transmit Handler implementations.
-
-public:
- virtual ~ACE_POSIX_Asynch_Transmit_Handler (void);
- // Destructor.
-
-protected:
- ACE_POSIX_Asynch_Transmit_Handler (ACE_POSIX_Asynch_Transmit_File_Result *result);
- // Constructor. Result pointer will have all the information to do
- // the file transmission (socket, file, application handler, bytes
- // to write).
-
- ACE_POSIX_Asynch_Transmit_File_Result *result_;
- // The asynch result pointer made from the initial transmit file
- // request.
-
- ACE_Message_Block *mb_;
- // Message bloack used to do the transmission.
-
- enum ACT
- {
- HEADER_ACT = 1,
- DATA_ACT = 2,
- TRAILER_ACT = 3
- };
-
- ACT header_act_;
- ACT data_act_;
- ACT trailer_act_;
- // ACT to transmit header, data and trailer.
-
- size_t file_offset_;
- // Current offset of the file being transmitted.
-
- size_t file_size_;
- // Total size of the file.
-
- size_t bytes_transferred_;
- // Number of bytes transferred on the stream.
-};
-
-// ************************************************************
-
-class ACE_Export ACE_POSIX_AIOCB_Asynch_Transmit_Handler : public ACE_POSIX_Asynch_Transmit_Handler
-{
- // = TITLE
- //
- // Auxillary handler for doing <Asynch_Transmit_File> in
- // Unix. <ACE_POSIX_Asynch_Transmit_File> internally uses this.
- //
- // = DESCRIPTION
- //
- // This is a helper class for implementing
- // <ACE_POSIX_Asynch_Transmit_File> in Unix systems.
-
-public:
- ACE_POSIX_AIOCB_Asynch_Transmit_Handler (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor,
- ACE_POSIX_Asynch_Transmit_File_Result *result);
- // Constructor. Result pointer will have all the information to do
- // the file transmission (socket, file, application handler, bytes
- // to write).
-
- virtual ~ACE_POSIX_AIOCB_Asynch_Transmit_Handler (void);
- // Destructor.
-
- int transmit (void);
- // Do the transmission. All the info to do the transmission is in
- // the <result> member.
-
-protected:
- virtual void handle_write_stream (const ACE_Asynch_Write_Stream::Result &result);
- // This is called when asynchronous writes from the socket complete.
-
- virtual void handle_read_file (const ACE_Asynch_Read_File::Result &result);
- // This is called when asynchronous reads from the file complete.
-
- int initiate_read_file (void);
- // Issue asynch read from the file.
-
- ACE_POSIX_AIOCB_Asynch_Read_File rf_;
- // To read from the file to be transmitted.
-
- ACE_POSIX_AIOCB_Asynch_Write_Stream ws_;
- // Write stream to write the header, trailer and the data.
-};
-
-// *********************************************************************
-
-class ACE_Export ACE_POSIX_SIG_Asynch_Transmit_Handler : public ACE_POSIX_Asynch_Transmit_Handler
-{
- // = TITLE
- // Auxillary handler for doing <Asynch_Transmit_File> in
- // Unix. <ACE_POSIX_Asynch_Transmit_File> internally uses this.
- //
- // = DESCRIPTION
- // This is a helper class for implementing
- // <ACE_POSIX_Asynch_Transmit_File> in Unix systems.
-public:
- ACE_POSIX_SIG_Asynch_Transmit_Handler (ACE_POSIX_SIG_Proactor *proactor,
- ACE_POSIX_Asynch_Transmit_File_Result *result);
- // Constructor. Result pointer will have all the information to do
- // the file transmission (socket, file, application handler, bytes
- // to write).
-
- virtual ~ACE_POSIX_SIG_Asynch_Transmit_Handler (void);
- // Destructor.
-
- int transmit (void);
- // Do the transmission. All the info to do the transmission is in
- // the <result> member.
-
-protected:
- virtual void handle_write_stream (const ACE_Asynch_Write_Stream::Result &result);
- // This is called when asynchronous writes from the socket complete.
-
- virtual void handle_read_file (const ACE_Asynch_Read_File::Result &result);
- // This is called when asynchronous reads from the file complete.
-
- int initiate_read_file (void);
- // Issue asynch read from the file.
-
- ACE_POSIX_SIG_Asynch_Read_File rf_;
- // To read from the file to be transmitted.
-
- ACE_POSIX_SIG_Asynch_Write_Stream ws_;
- // Write stream to write the header, trailer and the data.
-};
-
-// *********************************************************************
-
-// Constructor.
-ACE_POSIX_Asynch_Transmit_Handler::ACE_POSIX_Asynch_Transmit_Handler (ACE_POSIX_Asynch_Transmit_File_Result *result)
- : result_ (result),
- mb_ (0),
- header_act_ (this->HEADER_ACT),
- data_act_ (this->DATA_ACT),
- trailer_act_ (this->TRAILER_ACT),
- file_offset_ (result->offset ()),
- file_size_ (0),
- bytes_transferred_ (0)
-{
- // Allocate memory for the message block.
- ACE_NEW (this->mb_,
- ACE_Message_Block (this->result_->bytes_per_send ()
- + 1));
- // Init the file size.
- file_size_ = ACE_OS::filesize (this->result_->file ());
-}
-
-// Destructor.
-ACE_POSIX_Asynch_Transmit_Handler::~ACE_POSIX_Asynch_Transmit_Handler (void)
-{
- delete result_;
- mb_->release ();
-}
-
-// *********************************************************************
-
-ACE_POSIX_AIOCB_Asynch_Transmit_Handler::ACE_POSIX_AIOCB_Asynch_Transmit_Handler (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor,
- ACE_POSIX_Asynch_Transmit_File_Result *result)
- : ACE_POSIX_Asynch_Transmit_Handler (result),
- rf_ (posix_aiocb_proactor),
- ws_ (posix_aiocb_proactor)
-{
-}
-
-ACE_POSIX_AIOCB_Asynch_Transmit_Handler::~ACE_POSIX_AIOCB_Asynch_Transmit_Handler (void)
-{
-}
-
-// Do the transmission.
-// Initiate transmitting the header. When that completes
-// handle_write_stream will be called, there start transmitting the file.
-int
-ACE_POSIX_AIOCB_Asynch_Transmit_Handler::transmit (void)
-{
- // No proactor is given for the <open>'s. Because we are using the
- // concrete implementations of the Asynch_Operations, and we have
- // already given them the specific proactor, so they wont need the
- // general <proactor> interface pointer.
-
- // Open Asynch_Read_File.
- if (this->rf_.open (*this,
- this->result_->file (),
- 0,
- 0) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_Asynch_Transmit_Handler:read_file open failed\n"),
- -1);
-
- // Open Asynch_Write_Stream.
- if (this->ws_.open (*this,
- this->result_->socket (),
- 0,
- 0) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_Asynch_Transmit_Handler:write_stream open failed\n"),
- -1);
-
- // Transmit the header.
- if (this->ws_.write (*this->result_->header_and_trailer ()->header (),
- this->result_->header_and_trailer ()->header_bytes (),
- ACE_reinterpret_cast (void *, &this->header_act_),
- 0) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Asynch_Transmit_Handler:transmitting header:write_stream failed\n"),
- -1);
- return 0;
-}
-
-void
-ACE_POSIX_AIOCB_Asynch_Transmit_Handler::handle_write_stream (const ACE_Asynch_Write_Stream::Result &result)
-{
- // Update bytes transferred so far.
- this->bytes_transferred_ += result.bytes_transferred ();
-
- // Check the success parameter.
- if (result.success () == 0)
- {
- // Failure.
- ACE_ERROR ((LM_ERROR,
- "Asynch_Transmit_File failed.\n"));
-
- ACE_SEH_TRY
- {
- this->result_->complete (this->bytes_transferred_,
- 0, // Failure.
- 0, // @@ Completion key.
- 0); // @@ Error no.
- }
- ACE_SEH_FINALLY
- {
- // This is crucial to prevent memory leaks. This deletes
- // the result pointer also.
- delete this;
- }
- }
-
- // Write stream successful.
-
- // Partial write to socket.
- int unsent_data = result.bytes_to_write () - result.bytes_transferred ();
- if (unsent_data != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "%N:%l:Partial write to socket: Asynch_write called again\n"));
-
- // Duplicate the message block and retry remaining data
- if (this->ws_.write (*result.message_block ().duplicate (),
- unsent_data,
- result.act (),
- this->result_->priority (),
- this->result_->signal_number ()) == -1)
- {
- // @@ Handle this error.
- ACE_ERROR ((LM_ERROR,
- "Asynch_Transmit_Handler:write_stream failed\n"));
- return;
- }
-
- // @@ Handling *partial write* to a socket. Let us not continue
- // further before this write finishes. Because proceeding with
- // another read and then write might change the order of the
- // file transmission, because partial write to the stream is
- // always possible.
- return;
- }
-
- // Not a partial write. A full write.
-
- // Check ACT to see what was sent.
- ACT act = * (ACT *) result.act ();
-
- switch (act)
- {
- case TRAILER_ACT:
- // If it is the "trailer" that is just sent, then transmit file
- // is complete.
- // Call the application handler.
- ACE_SEH_TRY
- {
- this->result_->complete (this->bytes_transferred_,
- 1, // @@ Success.
- 0, // @@ Completion key.
- 0); // @@ Errno.
- }
- ACE_SEH_FINALLY
- {
- delete this;
- }
- break;
-
- case HEADER_ACT:
- case DATA_ACT:
- // If header/data was sent, initiate the file data transmission.
- if (this->initiate_read_file () == -1)
- // @@ Handle this error.
- ACE_ERROR ((LM_ERROR,
- "Error:Asynch_Transmit_Handler:read_file couldnt be initiated\n"));
- break;
-
- default:
- // @@ Handle this error.
- ACE_ERROR ((LM_ERROR,
- "Error:ACE_Asynch_Transmit_Handler::handle_write_stream::Unexpected act\n"));
- }
-}
-
-void
-ACE_POSIX_AIOCB_Asynch_Transmit_Handler::handle_read_file (const ACE_Asynch_Read_File::Result &result)
-{
- // Failure.
- if (result.success () == 0)
- {
- //
- ACE_SEH_TRY
- {
- this->result_->complete (this->bytes_transferred_,
- 0, // Failure.
- 0, // @@ Completion key.
- errno); // Error no.
- }
- ACE_SEH_FINALLY
- {
- delete this;
- }
- return;
- }
-
- // Read successful.
- if (result.bytes_transferred () == 0)
- return;
-
- // Increment offset.
- this->file_offset_ += result.bytes_transferred ();
-
- // Write data to network.
- if (this->ws_.write (result.message_block (),
- result.bytes_transferred (),
- (void *)&this->data_act_,
- this->result_->priority (),
- this->result_->signal_number ()) == -1)
- {
- // @@ Handle this error.
- ACE_ERROR ((LM_ERROR,
- "Error:ACE_Asynch_Transmit_File : write to the stream failed\n"));
- return;
- }
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Transmit_Handler::initiate_read_file (void)
-{
- // Is there something to read.
- if (this->file_offset_ >= this->file_size_)
- {
- // File is sent. Send the trailer.
- if (this->ws_.write (*this->result_->header_and_trailer ()->trailer (),
- this->result_->header_and_trailer ()->trailer_bytes (),
- (void *)&this->trailer_act_,
- this->result_->priority (),
- this->result_->signal_number ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:Asynch_Transmit_Handler:write_stream writing trailer failed\n"),
- -1);
- return 0;
- }
- else
- {
- // @@ Is this right??
- // Previous reads and writes are over. For the new read, adjust
- // the wr_ptr and the rd_ptr to the beginning.
- this->mb_->rd_ptr (this->mb_->base ());
- this->mb_->wr_ptr (this->mb_->base ());
-
- // Inititiate an asynchronous read from the file.
- if (this->rf_.read (*this->mb_,
- this->mb_->size () - 1,
- this->file_offset_,
- 0, // @@ offset_high !!! if aiocb64 is used.
- 0, // Act
- this->result_->priority (),
- this->result_->signal_number ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:Asynch_Transmit_Handler::read from file failed\n"),
- -1);
- return 0;
- }
-}
-
-// *********************************************************************
-
-ACE_POSIX_SIG_Asynch_Transmit_Handler::ACE_POSIX_SIG_Asynch_Transmit_Handler (ACE_POSIX_SIG_Proactor *posix_sig_proactor,
- ACE_POSIX_Asynch_Transmit_File_Result *result)
- : ACE_POSIX_Asynch_Transmit_Handler (result),
- rf_ (posix_sig_proactor),
- ws_ (posix_sig_proactor)
-{
-}
-
-ACE_POSIX_SIG_Asynch_Transmit_Handler::~ACE_POSIX_SIG_Asynch_Transmit_Handler (void)
-{
-}
-
-// Do the transmission.
-// Initiate transmitting the header. When that completes
-// handle_write_stream will be called, there start transmitting the file.
-int
-ACE_POSIX_SIG_Asynch_Transmit_Handler::transmit (void)
-{
- // The Proactor given for the <open>'s is not going to be
- // used. Because we are using the
- // concrete implementations of the Asynch_Operations, and we have
- // already given them the specific proactor, so they wont need the
- // general <proactor> interface pointer.
-
- // Open Asynch_Read_File.
- if (this->rf_.open (*this,
- this->result_->file (),
- this->result_->completion_key ()) // Completion key
- == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_Asynch_Transmit_Handler:read_file open failed\n"),
- -1);
-
- // Open Asynch_Write_Stream.
- if (this->ws_.open (*this,
- this->result_->socket (),
- this->result_->completion_key ()) // Completion key
- == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ACE_Asynch_Transmit_Handler:write_stream open failed\n"),
- -1);
-
- // Transmit the header.
- if (this->ws_.write (*this->result_->header_and_trailer ()->header (),
- this->result_->header_and_trailer ()->header_bytes (),
- ACE_reinterpret_cast (void *,
- &this->header_act_),
- this->result_->priority (),
- this->result_->signal_number ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Asynch_Transmit_Handler:transmitting header:write_stream failed\n"),
- -1);
- return 0;
-}
-
-void
-ACE_POSIX_SIG_Asynch_Transmit_Handler::handle_write_stream (const ACE_Asynch_Write_Stream::Result &result)
-{
- // Update bytes transferred so far.
- this->bytes_transferred_ += result.bytes_transferred ();
-
- // Check the success parameter.
- if (result.success () == 0)
- {
- ACE_ERROR ((LM_ERROR,
- "Asynch_Transmit_File failed.\n"));
-
- // Check the success parameter.
- if (result.success () == 0)
- {
- // Failure.
- ACE_ERROR ((LM_ERROR,
- "Asynch_Transmit_File failed.\n"));
-
- ACE_SEH_TRY
- {
- this->result_->complete (this->bytes_transferred_,
- 0, // Failure.
- 0, // @@ Completion key.
- 0); // @@ Error no.
- }
- ACE_SEH_FINALLY
- {
- // This is crucial to prevent memory leaks. This deletes
- // the result pointer also.
- delete this;
- }
- }
- }
-
- // Write stream successful.
-
- // Partial write to socket.
- int unsent_data = result.bytes_to_write () - result.bytes_transferred ();
- if (unsent_data != 0)
- {
- // Reset pointers.
- result.message_block ().rd_ptr (result.bytes_transferred ());
-
- // Duplicate the message block and retry remaining data
- if (this->ws_.write (*result.message_block ().duplicate (),
- unsent_data,
- result.act (),
- result.priority (),
- this->result_->signal_number ()) == -1)
- {
- // @@ Handle this error.
- ACE_ERROR ((LM_ERROR,
- "Asynch_Transmit_Handler:write_stream failed\n"));
- return;
- }
-
- // @@ Handling *partial write* to a socket. Let us not continue
- // further before this write finishes. Because proceeding with
- // another read and then write might change the order of the
- // file transmission, because partial write to the stream is
- // always possible.
- return;
- }
-
- // Not a partial write. A full write.
-
- // Check ACT to see what was sent.
- ACT act = *(ACT *) result.act ();
-
- switch (act)
- {
- case TRAILER_ACT:
- // If it is the "trailer" that is just sent, then transmit file
- // is complete.
- // Call the application handler.
- ACE_SEH_TRY
- {
- this->result_->complete (this->bytes_transferred_,
- 1, // @@ Success.
- 0, // @@ Completion key.
- 0); // @@ Errno.
- }
- ACE_SEH_FINALLY
- {
- delete this;
- }
- break;
-
- case HEADER_ACT:
- case DATA_ACT:
- // If header/data was sent, initiate the file data transmission.
- if (this->initiate_read_file () == -1)
- // @@ Handle this error.
- ACE_ERROR ((LM_ERROR,
- "Error:Asynch_Transmit_Handler:read_file couldnt be initiated\n"));
- break;
-
- default:
- // @@ Handle this error.
- ACE_ERROR ((LM_ERROR,
- "Error:ACE_Asynch_Transmit_Handler::handle_write_stream::Unexpected act\n"));
- }
-}
-
-void
-ACE_POSIX_SIG_Asynch_Transmit_Handler::handle_read_file (const ACE_Asynch_Read_File::Result &result)
-{
- // Failure.
- if (result.success () == 0)
- {
- //
- ACE_SEH_TRY
- {
- this->result_->complete (this->bytes_transferred_,
- 0, // Failure.
- 0, // @@ Completion key.
- errno); // Error no.
- }
- ACE_SEH_FINALLY
- {
- delete this;
- }
- return;
- }
-
- // Read successful.
- if (result.bytes_transferred () == 0)
- return;
-
- // Increment offset and write data to network.
- this->file_offset_ += result.bytes_transferred ();
- if (this->ws_.write (result.message_block (),
- result.bytes_transferred (),
- (void *)&this->data_act_,
- result.priority (),
- result.signal_number ()) == -1)
- {
- // @@ Handle this error.
- ACE_ERROR ((LM_ERROR,
- "Error:ACE_Asynch_Transmit_File : write to the stream failed\n"));
- return;
- }
-}
-
-int
-ACE_POSIX_SIG_Asynch_Transmit_Handler::initiate_read_file (void)
-{
- // Is there something to read.
- if (this->file_offset_ >= this->file_size_)
- {
- // File is sent. Send the trailer.
- if (this->ws_.write (*this->result_->header_and_trailer ()->trailer (),
- this->result_->header_and_trailer ()->trailer_bytes (),
- (void *)&this->trailer_act_,
- this->result_->priority (),
- this->result_->signal_number ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:Asynch_Transmit_Handler:write_stream writing trailer failed\n"),
- -1);
- return 0;
- }
- else
- {
- // Inititiate an asynchronous read from the file.
- if (this->rf_.read (*this->mb_,
- this->mb_->size () - 1,
- this->file_offset_,
- 0, // @@, offset_high, not implemented.
- 0, // ACT
- this->result_->priority (),
- this->result_->signal_number ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:Asynch_Transmit_Handler::read from file failed\n"),
- -1);
- return 0;
- }
-}
-
-// *********************************************************************
-
-ACE_POSIX_AIOCB_Asynch_Transmit_File::ACE_POSIX_AIOCB_Asynch_Transmit_File (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Transmit_File_Impl (),
- ACE_POSIX_AIOCB_Asynch_Operation (posix_aiocb_proactor)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- int priority,
- int signal_number)
-{
- // Adjust these parameters if there are default values specified.
- ssize_t file_size = ACE_OS::filesize (file);
-
- if (file_size == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%N:%l:%p\n",
- "POSIX_AIOCB_Asynch_Transmit_File:filesize failed"),
- -1);
-
- if (bytes_to_write == 0)
- bytes_to_write = file_size;
-
- if (offset > (size_t) file_size)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%p\n",
- "Asynch_Transmit_File:File size is less than offset"),
- -1);
-
- if (offset != 0)
- bytes_to_write = file_size - offset + 1;
-
- if (bytes_per_send == 0)
- bytes_per_send = bytes_to_write;
-
- // Configure the result parameter.
- ACE_POSIX_Asynch_Transmit_File_Result *result = 0;
-
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Transmit_File_Result (*this->handler_,
- this->handle_,
- file,
- header_and_trailer,
- bytes_to_write,
- offset,
- offset_high,
- bytes_per_send,
- flags,
- act,
- this->posix_proactor ()->get_handle (),
- priority,
- signal_number),
- -1);
-
- // Make the auxillary handler and initiate transmit.
- ACE_POSIX_AIOCB_Asynch_Transmit_Handler *transmit_handler = 0;
-
- ACE_NEW_RETURN (transmit_handler,
- ::ACE_POSIX_AIOCB_Asynch_Transmit_Handler (this->posix_proactor (),
- result),
- -1);
-
- ssize_t return_val = transmit_handler->transmit ();
-
- if (return_val == -1)
- // This deletes the <result> in it too.
- delete transmit_handler;
-
- return 0;
-}
-
-ACE_POSIX_AIOCB_Asynch_Transmit_File::~ACE_POSIX_AIOCB_Asynch_Transmit_File (void)
-{
-}
-
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route the
-// call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_AIOCB_Asynch_Transmit_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_POSIX_AIOCB_Asynch_Transmit_File::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_AIOCB_Asynch_Transmit_File::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-// *********************************************************************
-
-ACE_POSIX_SIG_Asynch_Transmit_File::ACE_POSIX_SIG_Asynch_Transmit_File (ACE_POSIX_SIG_Proactor *posix_sig_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Transmit_File_Impl (),
- ACE_POSIX_SIG_Asynch_Operation (posix_sig_proactor)
-{
-}
-
-int
-ACE_POSIX_SIG_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- int priority,
- int signal_number)
-{
- // Adjust these parameters if there are default values specified.
- ssize_t file_size = ACE_OS::filesize (file);
-
- if (file_size == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%p\n",
- ":Asynch_Transmit_File:Couldnt know the file size"),
- -1);
-
- if (bytes_to_write == 0)
- bytes_to_write = file_size;
-
- if (offset > (size_t) file_size)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%p\n",
- "Asynch_Transmit_File:File size is less than offset"),
- -1);
-
- if (offset != 0)
- bytes_to_write = file_size - offset + 1;
-
- if (bytes_per_send == 0)
- bytes_per_send = bytes_to_write;
-
- // Configure the result parameter.
- ACE_POSIX_Asynch_Transmit_File_Result *result = 0;
-
- ACE_NEW_RETURN (result,
- ACE_POSIX_Asynch_Transmit_File_Result (*this->handler_,
- this->handle_,
- file,
- header_and_trailer,
- bytes_to_write,
- offset,
- offset_high,
- bytes_per_send,
- flags,
- act,
- this->posix_sig_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- // Make the auxillary handler and initiate transmit.
- ACE_POSIX_SIG_Asynch_Transmit_Handler *transmit_handler = 0;
-
- ACE_NEW_RETURN (transmit_handler,
- ::ACE_POSIX_SIG_Asynch_Transmit_Handler (this->posix_sig_proactor_, result),
- -1);
-
- ssize_t return_val = transmit_handler->transmit ();
-
- if (return_val == -1)
- // This deletes the <result> in it too.
- delete transmit_handler;
-
- return 0;
-}
-
-ACE_POSIX_SIG_Asynch_Transmit_File::~ACE_POSIX_SIG_Asynch_Transmit_File (void)
-{
-}
-
-
-// Methods belong to ACE_POSIX_Asynch_Operation base class. These
-// methods are defined here to avoid dominance warnings. They route the
-// call to the ACE_POSIX_Asynch_Operation base class.
-
-int
-ACE_POSIX_SIG_Asynch_Transmit_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_POSIX_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_POSIX_SIG_Asynch_Transmit_File::cancel (void)
-{
- return ACE_POSIX_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_POSIX_SIG_Asynch_Transmit_File::proactor (void) const
-{
- return ACE_POSIX_Asynch_Operation::proactor ();
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Unbounded_Queue<ACE_POSIX_Asynch_Accept_Result *>;
-template class ACE_Node<ACE_POSIX_Asynch_Accept_Result *>;
-template class ACE_Unbounded_Queue_Iterator<ACE_POSIX_Asynch_Accept_Result *>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Unbounded_Queue<ACE_POSIX_Asynch_Accept_Result *>
-#pragma instantiate ACE_Node<ACE_POSIX_Asynch_Accept_Result *>
-#pragma instantiate ACE_Unbounded_Queue_Iterator<ACE_POSIX_Asynch_Accept_Result *>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-#endif /* ACE_HAS_AIO_CALLS */
diff --git a/ace/POSIX_Asynch_IO.h b/ace/POSIX_Asynch_IO.h
deleted file mode 100644
index 20dc6dd7915..00000000000
--- a/ace/POSIX_Asynch_IO.h
+++ /dev/null
@@ -1,1655 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-//
-// ace
-//
-// = FILENAME
-//
-// POSIX_Asynch_IO.h
-//
-// = DESCRIPTION
-//
-// The implementation classes for POSIX implementation of Asynch
-// Operations are defined here in this file.
-//
-// = AUTHOR
-//
-// Irfan Pyarali (irfan@cs.wustl.edu),
-// Tim Harrison (harrison@cs.wustl.edu) and
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_POSIX_ASYNCH_IO_H
-#define ACE_POSIX_ASYNCH_IO_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_AIO_CALLS)
-
-#include "ace/Asynch_IO_Impl.h"
-#include "ace/Reactor.h"
-
-// Forward declarations
-class ACE_POSIX_SIG_Proactor;
-class ACE_POSIX_AIOCB_Proactor;
-class ACE_Proactor_Impl;
-
-class ACE_Export ACE_POSIX_Asynch_Result : public virtual ACE_Asynch_Result_Impl,
- public aiocb
-{
- // = TITLE
- //
- // This class provides concrete implementation for
- // ACE_Asynch_Result for POSIX4 platforms. This class extends
- // <aiocb> and makes it more useful.
- //
- // = DESCRIPTION
- //
-public:
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This is the ACT associated with the handle on which the
- // Asynch_Operation takes place.
- //
- // @@ This is not implemented for POSIX4 platforms.
- //
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // This returns ACE_INVALID_HANDLE on POSIX4 platforms.
-
- u_long offset (void) const;
- u_long offset_high (void) const;
- // This really make sense only when doing file I/O.
- //
- // @@ On POSIX4-Unix, offset_high should be supported using
- // aiocb64.
- //
-
- int priority (void) const;
- // Priority of the operation.
-
- int signal_number (void) const;
- // POSIX4 real-time signal number to be used for the
- // operation. <signal_number> ranges from SIGRTMIN to SIGRTMAX. By
- // default, SIGRTMIN is used to issue <aio_> calls.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor.
-
- virtual ~ACE_POSIX_Asynch_Result (void);
- // Destructor.
-
-protected:
- ACE_POSIX_Asynch_Result (ACE_Handler &handler,
- const void* act,
- ACE_HANDLE event,
- u_long offset,
- u_long offset_high,
- int priority,
- int signal_number);
- // Constructor. <Event> is not used on POSIX.
-
- ACE_Handler &handler_;
- // Handler that will be called back.
-
- const void *act_;
- // ACT for this operation.
- // We could use <aiocb::aio_sigevent.sigev_value.sival_ptr> for
- // this. But it doesnot provide the constness, so this may be
- // better.
-
- u_long bytes_transferred_;
- // Bytes transferred by this operation.
-
- int success_;
- // Success indicator.
-
- const void *completion_key_;
- // ACT associated with handle.
-
- u_long error_;
- // Error if operation failed.
-};
-
-class ACE_Export ACE_POSIX_Asynch_Operation : public virtual ACE_Asynch_Operation_Impl
-{
- // = TITLE
- //
- // This class abstracts out the common things needed for
- // implementing Asynch_Operation for POSIX platforms. Specific
- // implementations such as POSIX_AIOCB_Asynch_Operation and
- // POSIX_SIG_Asynch_Operation etc., can derive from this class.
- //
- // = DESCRIPTION
- //
-public:
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle. No need for the Proactor since the sub classes
- // will know the correct implementation Proactor class, since this
- // Operation class itself was created by the correct implementation
- // Proactor class.
-
- int cancel (void);
- // Check the documentation for <ACE_Asynch_Operation::cancel>.
-
- // = Access methods.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-protected:
- ACE_POSIX_Asynch_Operation (void);
- // No op contructor.
-
- virtual ~ACE_POSIX_Asynch_Operation (void);
- // Destructor.
-
- ACE_Proactor *proactor_;
- // Proactor that this Asynch IO will be registered with.
-
- ACE_Handler *handler_;
- // Handler that will receive the callback.
-
- ACE_HANDLE handle_;
- // I/O handle used for reading.
-};
-
-class ACE_Export ACE_POSIX_AIOCB_Asynch_Operation : public virtual ACE_POSIX_Asynch_Operation
-{
- // = TITLE
- //
- // This class implements ACE_Asynch_Operation for AIOCB
- // (Asynchronous I/O Control Blocks) based implementation of
- // Proactor.
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_AIOCB_Proactor *posix_proactor (void) const;
- // Return the underlying Proactor implementation.
-
-protected:
- ACE_POSIX_AIOCB_Asynch_Operation (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor);
- // Contructor.
-
- virtual ~ACE_POSIX_AIOCB_Asynch_Operation (void);
- // Destructor.
-
- int register_aio_with_proactor (ACE_POSIX_Asynch_Result *result);
- // This call is for the POSIX implementation. This method is used by
- // <ACE_Asynch_Operation> to store some information with the
- // Proactor after an <aio_> call is issued, so that the Proactor can
- // retreve this information to do <aio_return> and <aio_error>.
- // Passing a '0' ptr returns the status, indicating whether there
- // are slots available or no. Passing a valid ptr stores the ptr
- // with the Proactor.
-
- ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor_;
- // It is easy to get this specific implementation proactor here,
- // since it is the one that creates the correct POSIX_Asynch_*
- // objects. We can use this to get to the implementation proactor
- // directly.
-};
-
-class ACE_Export ACE_POSIX_SIG_Asynch_Operation : public virtual ACE_POSIX_Asynch_Operation
-{
- // = TITLE
- //
- // This class implements ACE_Asynch_Operation for Real-Time
- // Signal (<sigtimedwait>) based implementation of Proactor.
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_SIG_Proactor *posix_proactor (void) const;
- // Return the underlying Proactor implemetation.
-
-protected:
- ACE_POSIX_SIG_Asynch_Operation (ACE_POSIX_SIG_Proactor *posix_sig_proactor);
- // Contructor.
-
- virtual ~ACE_POSIX_SIG_Asynch_Operation (void);
- // Destructor.
-
- ACE_POSIX_SIG_Proactor *posix_sig_proactor_;
- // It is easy to get this specific implementation proactor here,
- // since it is the one that creates the correct POSIX_Asynch_*
- // objects. We can use this to get to the implementation proactor
- // directly.
-};
-
-class ACE_Export ACE_POSIX_Asynch_Read_Stream_Result : public virtual ACE_Asynch_Read_Stream_Result_Impl,
- public ACE_POSIX_Asynch_Result
-{
- // = TITLE
- //
- // This class provides concrete implementation for
- // ACE_Asynch_Read_Stream::Result class for POSIX platforms.
- //
- // = DESCRIPTION
- //
-
- friend class ACE_POSIX_AIOCB_Asynch_Read_Stream;
- friend class ACE_POSIX_SIG_Asynch_Read_Stream;
- // Factory classes willl have special permissions.
-
- friend class ACE_POSIX_Proactor;
- // The Proactor constructs the Result class for faking results.
-
-public:
- u_long bytes_to_read (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous read.
-
- ACE_Message_Block &message_block (void) const;
- // Message block which contains the read data.
-
- ACE_HANDLE handle (void) const;
- // I/O handle used for reading.
-
- // = Base class operations. These operations are here to kill
- // dominance warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This is the ACT associated with the handle on which the
- // Asynch_Operation takes place.
- //
- // @@ This is not implemented for POSIX4 platforms.
- //
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // This returns ACE_INVALID_HANDLE.
-
- u_long offset (void) const;
- u_long offset_high (void) const;
- // This really make sense only when doing file I/O.
- //
- // @@ On POSIX4-Unix, offset_high should be supported using
- // aiocb64.
- //
-
- int priority (void) const;
- // The priority of the asynchronous operation.
-
- int signal_number (void) const;
- // POSIX4 real-time signal number to be used for the
- // operation. <signal_number> ranges from SIGRTMIN to SIGRTMAX. By
- // default, SIGRTMIN is used to issue <aio_> calls. This is a no-op
- // on non-POSIX4 systems and returns 0.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor.
-
-protected:
- ACE_POSIX_Asynch_Read_Stream_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Read_Stream factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // Get the data copied to this class, before calling application
- // handler.
-
- virtual ~ACE_POSIX_Asynch_Read_Stream_Result (void);
- // Destrcutor.
-
- // aiocb::aio_nbytes
- // Bytes requested when the asynchronous read was initiated.
-
- ACE_Message_Block &message_block_;
- // Message block for reading the data into.
-
- // aiocb::aio_filedes
- // I/O handle used for reading.
-};
-
-class ACE_Export ACE_POSIX_AIOCB_Asynch_Read_Stream : public virtual ACE_Asynch_Read_Stream_Impl,
- public ACE_POSIX_AIOCB_Asynch_Operation
-{
- // = TITLE
- //
- // This class implements ACE_Asynch_Read_Stream for AIOCB
- // (Asynchronous I/O Control Blocks) based implementation of
- // Proactor.
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_AIOCB_Asynch_Read_Stream (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor);
- // Constructor.
-
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>.
-
- virtual ~ACE_POSIX_AIOCB_Asynch_Read_Stream (void);
- // Destructor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-protected:
- int shared_read (ACE_POSIX_Asynch_Read_Stream_Result *result);
- // This is the method which does the real work and is there so that
- // the ACE_Asynch_Read_File class can use it too.
-};
-
-
-class ACE_Export ACE_POSIX_SIG_Asynch_Read_Stream : public virtual ACE_Asynch_Read_Stream_Impl,
- public ACE_POSIX_SIG_Asynch_Operation
-{
- // = TITLE
- //
- // This class implements ACE_Asynch_Read_Stream for Real-Time
- // Signal (<sigtimedwait>) based implementation of Proactor.
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_SIG_Asynch_Read_Stream (ACE_POSIX_SIG_Proactor *posix_sig_proactor);
- // Constructor.
-
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number);
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>.
-
- virtual ~ACE_POSIX_SIG_Asynch_Read_Stream (void);
- // Destructor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-protected:
- int shared_read (ACE_POSIX_Asynch_Read_Stream_Result *result);
- // This is the method which does the real work and is there so that
- // the ACE_Asynch_Read_File class can use it too.
-};
-
-class ACE_Export ACE_POSIX_Asynch_Write_Stream_Result : public virtual ACE_Asynch_Write_Stream_Result_Impl,
- public ACE_POSIX_Asynch_Result
-{
- // = TITLE
- //
- // This class provides concrete implementation for
- // ACE_Asynch_Write_Stream::Result on POSIX platforms.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous write.
-
- friend class ACE_POSIX_AIOCB_Asynch_Write_Stream;
- friend class ACE_POSIX_SIG_Asynch_Write_Stream;
- // Factory classes will have special privilages.
-
- friend class ACE_POSIX_Proactor;
- // The Proactor constructs the Result class for faking results.
-
-public:
- u_long bytes_to_write (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous write.
-
- ACE_Message_Block &message_block (void) const;
- // Message block that contains the data to be written.
-
- ACE_HANDLE handle (void) const;
- // I/O handle used for writing.
-
- // = Base class operations. These operations are here to kill
- // dominance warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This is the ACT associated with the handle on which the
- // Asynch_Operation takes place.
- //
- // @@ This is not implemented for POSIX4 platforms.
- //
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // This returns ACE_INVALID_HANDLE on POSIX4 platforms.
-
- u_long offset (void) const;
- u_long offset_high (void) const;
- // This really make sense only when doing file I/O.
- //
- // @@ On POSIX4-Unix, offset_high should be supported using
- // aiocb64.
- //
-
- int priority (void) const;
- // The priority of the asynchronous operation.
-
- int signal_number (void) const;
- // POSIX4 real-time signal number to be used for the
- // operation. <signal_number> ranges from SIGRTMIN to SIGRTMAX. By
- // default, SIGRTMIN is used to issue <aio_> calls. This is a no-op
- // on non-POSIX4 systems and returns 0.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor.
-
-protected:
- ACE_POSIX_Asynch_Write_Stream_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Write_Stream factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // ACE_Proactor will call this method when the write completes.
-
- virtual ~ACE_POSIX_Asynch_Write_Stream_Result (void);
- // Destructor.
-
-protected:
- // aiocb::aio_nbytes
- // The number of bytes which were requested at the start of the
- // asynchronous write.
-
- ACE_Message_Block &message_block_;
- // Message block that contains the data to be written.
-
- // aiocb::aio_filedes
- // I/O handle used for writing.
-};
-
-class ACE_Export ACE_POSIX_AIOCB_Asynch_Write_Stream : public virtual ACE_Asynch_Write_Stream_Impl,
- public ACE_POSIX_AIOCB_Asynch_Operation
-{
- // = TITLE
- //
- // This class implements ACE_Asynch_Write_Stream for AIOCB
- // (Asynchronous I/O Control Blocks) based implementation of
- // Proactor.
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_AIOCB_Asynch_Write_Stream (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor);
- // Constructor.
-
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be written from the <message_block>.
-
- virtual ~ACE_POSIX_AIOCB_Asynch_Write_Stream (void);
- // Destrcutor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-protected:
- int shared_write (ACE_POSIX_Asynch_Write_Stream_Result *result);
- // This is the method which does the real work and is there so that
- // the ACE_Asynch_Write_File class can use it too.
-};
-
-class ACE_Export ACE_POSIX_SIG_Asynch_Write_Stream : public virtual ACE_Asynch_Write_Stream_Impl,
- public ACE_POSIX_SIG_Asynch_Operation
-{
- // = TITLE
- //
- // This class implements ACE_Asynch_Write_Stream for Real-Time
- // Signal (<sigtimedwait>) based implementation of Proactor.
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_SIG_Asynch_Write_Stream (ACE_POSIX_SIG_Proactor *posix_sig_proactor);
- // Constrctor.
-
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number);
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be written from the <message_block>.
-
- virtual ~ACE_POSIX_SIG_Asynch_Write_Stream (void);
- // Destructor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-protected:
- int shared_write (ACE_POSIX_Asynch_Write_Stream_Result *result);
- // This is the method which does the real work and is there so that
- // the ACE_Asynch_Write_File class can use it too.
-};
-
-class ACE_Export ACE_POSIX_Asynch_Read_File_Result : public virtual ACE_Asynch_Read_File_Result_Impl,
- public ACE_POSIX_Asynch_Read_Stream_Result
-{
- // = TITLE
- //
- // This class provides concrete implementation for
- // ACE_Asynch_Read_File::Result class for POSIX platforms.
- //
- // = DESCRIPTION
- //
-
- friend class ACE_POSIX_AIOCB_Asynch_Read_File;
- friend class ACE_POSIX_SIG_Asynch_Read_File;
- // Factory classes willl have special permissions.
-
- friend class ACE_POSIX_Proactor;
- // The Proactor constructs the Result class for faking results.
-
-public:
- // = These methods belong to ACE_POSIX_Asynch_Result class base
- // class. These operations are here to kill dominance
- // warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This is the ACT associated with the handle on which the
- // Asynch_Operation takes place.
- //
- // @@ This is not implemented for POSIX4 platforms.
- //
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // This returns ACE_INVALID_HANDLE on POSIX4 platforms.
-
- u_long offset (void) const;
- u_long offset_high (void) const;
- // This really make sense only when doing file I/O.
- //
- // @@ On POSIX4-Unix, offset_high should be supported using
- // aiocb64.
- //
-
- int priority (void) const;
- // The priority of the asynchronous operation.
-
- int signal_number (void) const;
- // POSIX4 real-time signal number to be used for the
- // operation. <signal_number> ranges from SIGRTMIN to SIGRTMAX. By
- // default, SIGRTMIN is used to issue <aio_> calls. This is a no-op
- // on non-POSIX4 systems and returns 0.
-
- // = The following methods belong to
- // ACE_POSIX_Asynch_Read_Stream_Result. They are here to avoid
- // dominance warnings. These methods route their call to the
- // ACE_POSIX_Asynch_Read_Stream_Result base class.
-
- u_long bytes_to_read (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous read.
-
- ACE_Message_Block &message_block (void) const;
- // Message block which contains the read data.
-
- ACE_HANDLE handle (void) const;
- // I/O handle used for reading.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor.
-
-protected:
- ACE_POSIX_Asynch_Read_File_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Read_File factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // ACE_Proactor will call this method when the read completes.
-
- virtual ~ACE_POSIX_Asynch_Read_File_Result (void);
- // Destructor.
-};
-
-class ACE_Export ACE_POSIX_AIOCB_Asynch_Read_File : public virtual ACE_Asynch_Read_File_Impl,
- public ACE_POSIX_AIOCB_Asynch_Read_Stream
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous reads
- // on a file. This class implements ACE_Asynch_Read_File for
- // AIOCB (Asynchronous I/O Control Blocks) based implementation
- // of Proactor.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <read>s can
- // started using this class. A ACE_Asynch_Read_File::Result
- // will be passed back to the <handler> when the asynchronous
- // reads completes through the <ACE_Handler::handle_read_file>
- // callback.
- //
- // This class differs slightly from ACE_Asynch_Read_Stream as it
- // allows the user to specify an offset for the read.
-
-public:
- ACE_POSIX_AIOCB_Asynch_Read_File (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor);
- // Constructor.
-
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>. The read will start
- // at <offset> from the beginning of the file.
-
- virtual ~ACE_POSIX_AIOCB_Asynch_Read_File (void);
- // Destructor.
-
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-private:
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number = 0);
- // This belongs to ACE_POSIX_AIOCB_Asynch_Read_Stream. We have
- // defined this here to avoid compiler warnings and forward the
- // method to <ACE_POSIX_AIOCB_Asynch_Read_Stream::read>.
-};
-
-class ACE_Export ACE_POSIX_SIG_Asynch_Read_File : public virtual ACE_Asynch_Read_File_Impl,
- public ACE_POSIX_SIG_Asynch_Read_Stream
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous reads
- // on a file. This class implements ACE_Asynch_Operation for
- // Real-Time Signal (<sigtimedwait>) based implementation of
- // Proactor.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <read>s can
- // started using this class. A ACE_Asynch_Read_File::Result
- // will be passed back to the <handler> when the asynchronous
- // reads completes through the <ACE_Handler::handle_read_file>
- // callback.
-
-public:
- ACE_POSIX_SIG_Asynch_Read_File (ACE_POSIX_SIG_Proactor *posix_sig_proactor);
- // Constructor.
-
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number);
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>. The read will start
- // at <offset> from the beginning of the file.
-
- virtual ~ACE_POSIX_SIG_Asynch_Read_File (void);
- // Destructor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-private:
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number);
- // This belongs to ACE_POSIX_SIG_Asynch_Read_Stream. We have
- // defined this here to avoid compiler warnings and forward the
- // method to <ACE_POSIX_SIG_Asynch_Read_Stream::read>.
-};
-
-class ACE_Export ACE_POSIX_Asynch_Write_File_Result : public virtual ACE_Asynch_Write_File_Result_Impl,
- public ACE_POSIX_Asynch_Write_Stream_Result
-{
- // = TITLE
- //
- // This class provides implementation for
- // ACE_Asynch_Write_File_Result for POSIX platforms.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous write.
- //
- // This class differs slightly from
- // ACE_Asynch_Write_Stream::Result as it calls back
- // <ACE_Handler::handle_write_file> on the <handler> instead
- // of <ACE_Handler::handle_write_stream>. No additional state
- // is required by this class as ACE_Asynch_Result can store
- // the <offset>.
-
- friend class ACE_POSIX_AIOCB_Asynch_Write_File;
- friend class ACE_POSIX_SIG_Asynch_Write_File;
- // Factory classes will have special permissions.
-
- friend class ACE_POSIX_Proactor;
- // The Proactor constructs the Result class for faking results.
-
-public:
- // = Base class operations. These operations are here to kill some
- // warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This is the ACT associated with the handle on which the
- // Asynch_Operation takes place.
- //
- // @@ This is not implemented for POSIX4 platforms.
- //
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // This returns ACE_INVALID_HANDLE on POSIX4 platforms.
-
- u_long offset (void) const;
- u_long offset_high (void) const;
- // This really make sense only when doing file I/O.
- //
- // @@ On POSIX4-Unix, offset_high should be supported using
- // aiocb64.
- //
-
- int priority (void) const;
- // The priority of the asynchronous operation.
-
- int signal_number (void) const;
- // POSIX4 real-time signal number to be used for the
- // operation. <signal_number> ranges from SIGRTMIN to SIGRTMAX. By
- // default, SIGRTMIN is used to issue <aio_> calls. This is a no-op
- // on non-POSIX4 systems and returns 0.
-
- // = The following methods belong to
- // ACE_POSIX_Asynch_Write_Stream_Result. They are here to avoid
- // dominace warnings. These methods route their call to the
- // ACE_POSIX_Asynch_Write_Stream_Result base class.
-
- u_long bytes_to_write (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous write.
-
- ACE_Message_Block &message_block (void) const;
- // Message block that contains the data to be written.
-
- ACE_HANDLE handle (void) const;
- // I/O handle used for writing.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor.
-
-protected:
- ACE_POSIX_Asynch_Write_File_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Write_File factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // ACE_Proactor will call this method when the write completes.
-
- virtual ~ACE_POSIX_Asynch_Write_File_Result (void);
- // Destructor.
-};
-
-class ACE_Export ACE_POSIX_AIOCB_Asynch_Write_File : public virtual ACE_Asynch_Write_File_Impl,
- public ACE_POSIX_AIOCB_Asynch_Write_Stream
-{
- // = TITLE
- //
- // This class provides concrete implementation for
- // ACE_Asynch_Write_File for POSIX platforms where the
- // completion strategy for Proactor is based on AIOCB (AIO
- // Control Blocks).
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_AIOCB_Asynch_Write_File (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor);
- // Constructor.
-
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be write and stored in the <message_block>. The write will
- // start at <offset> from the beginning of the file.
-
- virtual ~ACE_POSIX_AIOCB_Asynch_Write_File (void);
- // Destructor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-private:
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number = 0);
- // This <write> belongs to ACE_POSIX_AIOCB_Asynch_Write_Stream. We
- // have put this here to avoid compiler warnings. We forward this
- // method call to the <ACE_POSIX_SIG_Asynch_Write_Stream::write>
- // one.
-};
-
-class ACE_Export ACE_POSIX_SIG_Asynch_Write_File : public virtual ACE_Asynch_Write_File_Impl,
- public ACE_POSIX_SIG_Asynch_Write_Stream
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous reads
- // on a file. This class implements ACE_Asynch_Operation for
- // Real-Time Signal (<sigtimedwait>) based implementation of
- // Proactor.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <read>s can
- // started using this class. A ACE_Asynch_Read_File::Result
- // will be passed back to the <handler> when the asynchronous
- // reads completes through the <ACE_Handler::handle_read_file>
- // callback.
-
-public:
- ACE_POSIX_SIG_Asynch_Write_File (ACE_POSIX_SIG_Proactor *posix_sig_proactor);
- // Constructor.
-
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number);
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be write and stored in the <message_block>. The write will
- // start at <offset> from the beginning of the file.
-
- virtual ~ACE_POSIX_SIG_Asynch_Write_File (void);
- // Destrcutor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-private:
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number);
- // This <write> belongs to ACE_POSIX_SIG_Asynch_Write_Stream. We
- // have put this here to avoid compiler warnings. We forward this
- // method call to the <ACE_POSIX_SIG_Asynch_Write_Stream::write>
- // one.
-};
-
-class ACE_Export ACE_POSIX_Asynch_Accept_Result : public virtual ACE_Asynch_Accept_Result_Impl,
- public ACE_POSIX_Asynch_Result
-{
- // = TITLE
- //
- // This is that class which will be passed back to the
- // <handler> when the asynchronous accept completes.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous accept.
-
- friend class ACE_POSIX_AIOCB_Asynch_Accept;
- friend class ACE_POSIX_SIG_Asynch_Accept;
- // Factory classes willl have special permissions.
-
- friend class ACE_POSIX_Proactor;
- // The Proactor constructs the Result class for faking results.
-
-public:
- u_long bytes_to_read (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous accept.
-
- ACE_Message_Block &message_block (void) const;
- // Message block which contains the read data.
-
- ACE_HANDLE listen_handle (void) const;
- // I/O handle used for accepting new connections.
-
- ACE_HANDLE accept_handle (void) const;
- // I/O handle for the new connection.
-
- // = Base class operations. These operations are here to kill
- // dominance warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This is the ACT associated with the handle on which the
- // Asynch_Operation takes place.
- //
- // @@ This is not implemented for POSIX4 platforms.
- //
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // This returns ACE_INVALID_HANDLE on POSIX4 platforms.
-
- u_long offset (void) const;
- u_long offset_high (void) const;
- // This really make sense only when doing file I/O.
- //
- // @@ On POSIX4-Unix, offset_high should be supported using
- // aiocb64.
- //
-
- int priority (void) const;
- // The priority of the asynchronous operation.
-
- int signal_number (void) const;
- // POSIX4 real-time signal number to be used for the
- // operation. <signal_number> ranges from SIGRTMIN to SIGRTMAX. By
- // default, SIGRTMIN is used to issue <aio_> calls. This is a no-op
- // on non-POSIX4 systems and returns 0.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor.
-
-protected:
- ACE_POSIX_Asynch_Accept_Result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Accept factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // ACE_Proactor will call this method when the accept completes.
-
- virtual ~ACE_POSIX_Asynch_Accept_Result (void);
- // Destructor.
-
- // aiocb::aio_nbytes
- // Bytes requested when the asynchronous read was initiated.
- // Actually, on POSIX implementation, we dont read any intial data.
-
- ACE_Message_Block &message_block_;
- // Message block for reading the data into.
-
- ACE_HANDLE listen_handle_;
- // I/O handle used for accepting new connections.
-
- // aiocb::aio_filedes
- // I/O handle for the new connection.
-};
-
-class ACE_POSIX_AIOCB_Asynch_Accept_Handler;
-// Forward declaration. This class is defined the in the cpp file,
-// since this is internal to the implementation.
-
-class ACE_Export ACE_POSIX_AIOCB_Asynch_Accept : public virtual ACE_Asynch_Accept_Impl,
- public ACE_POSIX_AIOCB_Asynch_Operation
-{
-public:
- ACE_POSIX_AIOCB_Asynch_Accept (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor);
- // Constructor.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // This <open> belongs to ACE_AIOCB_Asynch_Operation. We forward
- // this call to that method. We have put this here to avoid the
- // compiler warnings.
-
- int accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous accept. The asynchronous accept
- // call also allows any initial data to be returned to the
- // <handler>. Upto <bytes_to_read> will be read and stored in the
- // <message_block>. The <accept_handle> will be used for the
- // <accept> call. If (<accept_handle> == INVALID_HANDLE), a new
- // handle will be created.
- //
- // <message_block> must be specified. This is because the address of
- // the new connection is placed at the end of this buffer.
-
- virtual ~ACE_POSIX_AIOCB_Asynch_Accept (void);
- // Destructor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-private:
- static void* thread_function (void* reactor);
- // The thread function that does handle events.
-
- ACE_Reactor reactor_;
- // Reactor to wait on the <listen_handle>.
-
- ACE_POSIX_AIOCB_Asynch_Accept_Handler* accept_handler_;
- // The Event Handler to do handle_input.
-};
-
-class ACE_POSIX_SIG_Asynch_Accept_Handler;
-// Forward declaration. This class is defined the in the cpp file,
-// since this is internal to the implementation.
-
-class ACE_Export ACE_POSIX_SIG_Asynch_Accept : public virtual ACE_Asynch_Accept_Impl,
- public ACE_POSIX_SIG_Asynch_Operation
-{
- // = TITLE
- //
- // This class implements ACE_Asynch_Accept for Real-Time
- // Signal (<sigtimedwait>) based implementation of Proactor.
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_SIG_Asynch_Accept (ACE_POSIX_SIG_Proactor *posix_sig_proactor);
- // Constructor.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // This <open> belongs to ACE_SIG_Asynch_Operation. We forward this
- // call to that method. We have put this here to avoid the compiler
- // warnings.
-
- int accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle,
- const void *act,
- int priority,
- int signal_number);
- // This starts off an asynchronous accept. The asynchronous accept
- // call also allows any initial data to be returned to the
- // <handler>. Upto <bytes_to_read> will be read and stored in the
- // <message_block>. The <accept_handle> will be used for the
- // <accept> call. If (<accept_handle> == INVALID_HANDLE), a new
- // handle will be created.
- //
- // <message_block> must be specified. This is because the address of
- // the new connection is placed at the end of this buffer.
-
- virtual ~ACE_POSIX_SIG_Asynch_Accept (void);
- // Destructor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-private:
- static void* thread_function (void* reactor);
- // The thread function that does handle events.
-
- ACE_Reactor reactor_;
- // Reactor to wait on the <listen_handle>.
-
- ACE_POSIX_SIG_Asynch_Accept_Handler* accept_handler_;
- // The Event Handler to do handle_input.
-};
-
-class ACE_Export ACE_POSIX_Asynch_Transmit_File_Result : public virtual ACE_Asynch_Transmit_File_Result_Impl,
- public ACE_POSIX_Asynch_Result
-{
- // = TITLE
- //
- // This is that class which will be passed back to the
- // <handler> when the asynchronous transmit file completes.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous transmit file.
-
- friend class ACE_POSIX_AIOCB_Asynch_Transmit_File;
- friend class ACE_POSIX_SIG_Asynch_Transmit_File;
- // Factory classes willl have special permissions.
-
- friend class ACE_POSIX_Asynch_Transmit_Handler;
- friend class ACE_POSIX_AIOCB_Asynch_Transmit_Handler;
- friend class ACE_POSIX_SIG_Asynch_Transmit_Handler;
- // Handlers do all the job.
-
- friend class ACE_POSIX_Proactor;
- // The Proactor constructs the Result class for faking results.
-
-public:
- ACE_HANDLE socket (void) const;
- // Socket used for transmitting the file.
-
- ACE_HANDLE file (void) const;
- // File from which the data is read.
-
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer (void) const;
- // Header and trailer data associated with this transmit file.
-
- u_long bytes_to_write (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous transmit file.
-
- u_long bytes_per_send (void) const;
- // Number of bytes per send requested at the start of the transmit
- // file.
-
- u_long flags (void) const;
- // Flags which were passed into transmit file.
-
- // = Base class operations. These operations are here to kill
- // dominance warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This is the ACT associated with the handle on which the
- // Asynch_Operation takes place.
- //
- // @@ This is not implemented for POSIX4 platforms.
- //
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // This returns ACE_INVALID_HANDLE.
-
- u_long offset (void) const;
- u_long offset_high (void) const;
- // This really make sense only when doing file I/O.
- //
- // @@ On POSIX4-Unix, offset_high should be supported using
- // aiocb64.
- //
-
- int priority (void) const;
- // The priority of the asynchronous operation.
-
- int signal_number (void) const;
- // POSIX4 real-time signal number to be used for the
- // operation. <signal_number> ranges from SIGRTMIN to SIGRTMAX. By
- // default, SIGRTMIN is used to issue <aio_> calls. This is a no-op
- // on non-POSIX4 systems and returns 0.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor.
-
-protected:
- ACE_POSIX_Asynch_Transmit_File_Result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event,
- int priority,
- int signal_number);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Transmit_File factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // ACE_Proactor will call this method when the write completes.
-
- virtual ~ACE_POSIX_Asynch_Transmit_File_Result (void);
- // Destructor.
-
- ACE_HANDLE socket_;
- // Network I/O handle.
-
- // aiocb::aio_filedes
- // File I/O handle.
-
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer_;
- // Header and trailer data associated with this transmit file.
-
- // aiocb::aio_nbytes
- // The number of bytes which were requested at the start of the
- // asynchronous transmit file.
-
- u_long bytes_per_send_;
- // Number of bytes per send requested at the start of the transmit
- // file.
-
- u_long flags_;
- // Flags which were passed into transmit file.
-};
-
-class ACE_Export ACE_POSIX_AIOCB_Asynch_Transmit_File : public virtual ACE_Asynch_Transmit_File_Impl,
- public ACE_POSIX_AIOCB_Asynch_Operation
-{
- // = DESCRIPTION
- // Implementation for transmit_file will make use of
- // POSIX_AIOCB_Asynch_Transmit_Handler.
-public:
- ACE_POSIX_AIOCB_Asynch_Transmit_File (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor);
- // Constructor.
-
- int transmit_file (ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous transmit file. The <file> is a
- // handle to an open file. <header_and_trailer> is a pointer to a
- // data structure that contains pointers to data to send before and
- // after the file data is sent. Set this parameter to 0 if you only
- // want to transmit the file data. Upto <bytes_to_write> will be
- // written to the <socket>. If you want to send the entire file,
- // let <bytes_to_write> = 0. <bytes_per_send> is the size of each
- // block of data sent per send operation. Please read the POSIX
- // documentation on what the flags should be.
-
- virtual ~ACE_POSIX_AIOCB_Asynch_Transmit_File (void);
- // Destructor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-};
-
-class ACE_Export ACE_POSIX_SIG_Asynch_Transmit_File : public virtual ACE_Asynch_Transmit_File_Impl,
- public ACE_POSIX_SIG_Asynch_Operation
-{
- // = TITLE
- //
- // This class implements ACE_Asynch_Transmit_File for Real-Time
- // Signal (<sigtimedwait>) based implementation of Proactor.
- //
- // = DESCRIPTION
- //
-public:
- ACE_POSIX_SIG_Asynch_Transmit_File (ACE_POSIX_SIG_Proactor *posix_sig_proactor);
- // Constructor.
-
- int transmit_file (ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- int priority,
- int signal_number);
- // This starts off an asynchronous transmit file. The <file> is a
- // handle to an open file. <header_and_trailer> is a pointer to a
- // data structure that contains pointers to data to send before and
- // after the file data is sent. Set this parameter to 0 if you only
- // want to transmit the file data. Upto <bytes_to_write> will be
- // written to the <socket>. If you want to send the entire file,
- // let <bytes_to_write> = 0. <bytes_per_send> is the size of each
- // block of data sent per send operation.
-
- virtual ~ACE_POSIX_SIG_Asynch_Transmit_File (void);
- // Destructor.
-
- // = Methods belong to ACE_POSIX_Asynch_Operation base class. These
- // methods are defined here to avoid dominace warnings. They route
- // the call to the ACE_POSIX_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor = 0);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- //
- // @@ Not implemented. Returns 0.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/POSIX_Asynch_IO.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_AIO_CALLS */
-#include "ace/post.h"
-#endif /* ACE_POSIX_ASYNCH_IO_H */
diff --git a/ace/POSIX_Asynch_IO.i b/ace/POSIX_Asynch_IO.i
deleted file mode 100644
index 6318deb79a0..00000000000
--- a/ace/POSIX_Asynch_IO.i
+++ /dev/null
@@ -1,2 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
diff --git a/ace/POSIX_Proactor.cpp b/ace/POSIX_Proactor.cpp
deleted file mode 100644
index 123f4f9a6fe..00000000000
--- a/ace/POSIX_Proactor.cpp
+++ /dev/null
@@ -1,1264 +0,0 @@
-// $Id$
-
-#include "ace/POSIX_Proactor.h"
-
-#if defined (ACE_HAS_AIO_CALLS)
-
-#include "ace/Task_T.h"
-#include "ace/Log_Msg.h"
-#include "ace/Object_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/POSIX_Proactor.i"
-#endif /* __ACE_INLINE__ */
-
-class ACE_Export ACE_POSIX_Wakeup_Completion : public ACE_POSIX_Asynch_Result
-{
- // = TITLE
- //
- // This is result object is used by the <end_event_loop> of the
- // ACE_Proactor interface to wake up all the threads blocking
- // for completions.
- //
- // = DESCRIPTION
- //
-
-public:
- ACE_POSIX_Wakeup_Completion (ACE_Handler &handler,
- const void *act = 0,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Constructor.
-
- virtual ~ACE_POSIX_Wakeup_Completion (void);
- // Destructor.
-
-
- virtual void complete (u_long bytes_transferred = 0,
- int success = 1,
- const void *completion_key = 0,
- u_long error = 0);
- // This method calls the <handler>'s <handle_wakeup> method.
-};
-
-// *********************************************************************
-
-ACE_POSIX_Proactor::~ACE_POSIX_Proactor (void)
-{
- this->close ();
-}
-
-int
-ACE_POSIX_Proactor::close (void)
-{
- return 0;
-}
-
-int
-ACE_POSIX_Proactor::register_handle (ACE_HANDLE handle,
- const void *completion_key)
-{
- ACE_UNUSED_ARG (handle);
- ACE_UNUSED_ARG (completion_key);
- return 0;
-}
-
-int
-ACE_POSIX_Proactor::wake_up_dispatch_threads (void)
-{
- return 0;
-}
-
-int
-ACE_POSIX_Proactor::close_dispatch_threads (int)
-{
- return 0;
-}
-
-size_t
-ACE_POSIX_Proactor::number_of_threads (void) const
-{
- // @@ Implement it.
- ACE_NOTSUP_RETURN (0);
-}
-
-void
-ACE_POSIX_Proactor::number_of_threads (size_t threads)
-{
- // @@ Implement it.
- ACE_UNUSED_ARG (threads);
-}
-
-ACE_HANDLE
-ACE_POSIX_Proactor::get_handle (void) const
-{
- return ACE_INVALID_HANDLE;
-}
-
-ACE_Asynch_Read_Stream_Result_Impl *
-ACE_POSIX_Proactor::create_asynch_read_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Read_Stream_Result_Impl *implementation;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_Asynch_Read_Stream_Result (handler,
- handle,
- message_block,
- bytes_to_read,
- act,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Write_Stream_Result_Impl *
-ACE_POSIX_Proactor::create_asynch_write_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Write_Stream_Result_Impl *implementation;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_Asynch_Write_Stream_Result (handler,
- handle,
- message_block,
- bytes_to_write,
- act,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Read_File_Result_Impl *
-ACE_POSIX_Proactor::create_asynch_read_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Read_File_Result_Impl *implementation;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_Asynch_Read_File_Result (handler,
- handle,
- message_block,
- bytes_to_read,
- act,
- offset,
- offset_high,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Write_File_Result_Impl *
-ACE_POSIX_Proactor::create_asynch_write_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Write_File_Result_Impl *implementation;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_Asynch_Write_File_Result (handler,
- handle,
- message_block,
- bytes_to_write,
- act,
- offset,
- offset_high,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Accept_Result_Impl *
-ACE_POSIX_Proactor::create_asynch_accept_result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Accept_Result_Impl *implementation;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_Asynch_Accept_Result (handler,
- listen_handle,
- accept_handle,
- message_block,
- bytes_to_read,
- act,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Transmit_File_Result_Impl *
-ACE_POSIX_Proactor::create_asynch_transmit_file_result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Transmit_File_Result_Impl *implementation;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_Asynch_Transmit_File_Result (handler,
- socket,
- file,
- header_and_trailer,
- bytes_to_write,
- offset,
- offset_high,
- bytes_per_send,
- flags,
- act,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Result_Impl *
-ACE_POSIX_Proactor::create_asynch_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Result_Impl *implementation;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_Asynch_Timer (handler,
- act,
- tv,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_POSIX_Proactor::ACE_POSIX_Proactor (void)
-{
-}
-
-#if 0
-int
-ACE_POSIX_Proactor::handle_signal (int, siginfo_t *, ucontext_t *)
-{
- // Perform a non-blocking "poll" for all the I/O events that have
- // completed in the I/O completion queue.
-
- ACE_Time_Value timeout (0, 0);
- int result = 0;
-
- while (1)
- {
- result = this->handle_events (timeout);
- if (result != 0 || errno == ETIME)
- break;
- }
-
- // If our handle_events failed, we'll report a failure to the
- // Reactor.
- return result == -1 ? -1 : 0;
-}
-
-int
-ACE_POSIX_Proactor::handle_close (ACE_HANDLE handle,
- ACE_Reactor_Mask close_mask)
-{
- ACE_UNUSED_ARG (close_mask);
- ACE_UNUSED_ARG (handle);
-
- return this->close ();
-}
-#endif /* 0 */
-
-void
-ACE_POSIX_Proactor::application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
- u_long bytes_transferred,
- int success,
- const void */* completion_key*/,
- u_long error)
-{
- ACE_SEH_TRY
- {
- // Call completion hook
- asynch_result->complete (bytes_transferred,
- success,
- 0, // No completion key.
- error);
- }
- ACE_SEH_FINALLY
- {
- // This is crucial to prevent memory leaks
- delete asynch_result;
- }
-}
-
-int
-ACE_POSIX_Proactor::post_wakeup_completions (int how_many)
-{
- ACE_POSIX_Wakeup_Completion *wakeup_completion = 0;
- for (ssize_t ci = 0; ci < how_many; ci++)
- {
- ACE_NEW_RETURN (wakeup_completion,
- ACE_POSIX_Wakeup_Completion (this->wakeup_handler_),
- -1);
-
- if (wakeup_completion->post_completion (this) == -1)
- return -1;
- }
-
- return 0;
-}
-
-class ACE_Export ACE_AIOCB_Notify_Pipe_Manager : public ACE_Handler
-{
- // = TITLE
- // This class manages the notify pipe of the AIOCB
- // Proactor. This class acts as the Handler for the
- // <Asynch_Read> operations issued on the notify pipe. This
- // class is very useful in implementing <Asynch_Accept> operation
- // class for the <AIOCB_Proactor>. This is also useful for
- // implementing <post_completion> for <AIOCB_Proactor>.
- //
- // = DESCRIPTION
- // <AIOCB_Proactor> class issues a <Asynch_Read> on
- // the pipe, using this class as the
- // Handler. <POSIX_Asynch_Result *>'s are sent through the
- // notify pipe. When <POSIX_Asynch_Result *>'s show up on the
- // notify pipe, the <POSIX_AIOCB_Proactor> dispatches the
- // completion of the <Asynch_Read_Stream> and calls the
- // <handle_read_stream> of this class. This class calls
- // <complete> on the <POSIX_Asynch_Result *> and thus calls the
- // application handler.
- // Handling the MessageBlock:
- // We give this message block to read the result pointer through
- // the notify pipe. We expect that to read 4 bytes from the
- // notify pipe, for each <accept> call. Before giving this
- // message block to another <accept>, we update <wr_ptr> and put
- // it in its initial position.
-public:
- ACE_AIOCB_Notify_Pipe_Manager (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor);
- // Constructor. You need the posix proactor because you need to call
- // <application_specific_code>
-
- virtual ~ACE_AIOCB_Notify_Pipe_Manager (void);
- // Destructor.
-
- int notify (ACE_POSIX_Asynch_Result *result);
- // Send the result pointer through the notification pipe.
-
- virtual void handle_read_stream (const ACE_Asynch_Read_Stream::Result &result);
- // This is the call back method when <Asynch_Read> from the pipe is
- // complete.
-
-private:
- ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor_;
- // The implementation proactor class.
-
- ACE_Message_Block message_block_;
- // Message block to get ACE_POSIX_Asynch_Result pointer from the
- // pipe.
-
- ACE_Pipe pipe_;
- // Pipe for the communication between Proactor and the
- // Asynch_Accept.
-
- ACE_POSIX_AIOCB_Asynch_Read_Stream read_stream_;
- // To do asynch_read on the pipe.
-
- ACE_AIOCB_Notify_Pipe_Manager (void);
- // Default constructor. Shouldnt be called.
-};
-
-ACE_AIOCB_Notify_Pipe_Manager::ACE_AIOCB_Notify_Pipe_Manager (ACE_POSIX_AIOCB_Proactor *posix_aiocb_proactor)
- : posix_aiocb_proactor_ (posix_aiocb_proactor),
- message_block_ (sizeof (ACE_POSIX_Asynch_Accept_Result *)),
- read_stream_ (posix_aiocb_proactor)
-{
- // Open the pipe.
- this->pipe_.open ();
-
- // Open the read stream.
- if (this->read_stream_.open (*this,
- this->pipe_.read_handle (),
- 0, // Completion Key
- 0) // Proactor
- == -1)
- ACE_ERROR ((LM_ERROR,
- "%N:%l:%p\n",
- "ACE_AIOCB_Notify_Pipe_Manager::ACE_AIOCB_Notify_Pipe_Manager:"
- "Open on Read Stream failed"));
-
- // Issue an asynch_read on the read_stream of the notify pipe.
- if (this->read_stream_.read (this->message_block_,
- sizeof (ACE_POSIX_Asynch_Result *),
- 0, // ACT
- 0) // Priority
- == -1)
- ACE_ERROR ((LM_ERROR,
- "%N:%l:%p\n",
- "ACE_AIOCB_Notify_Pipe_Manager::ACE_AIOCB_Notify_Pipe_Manager:"
- "Read from pipe failed"));
-}
-
-ACE_AIOCB_Notify_Pipe_Manager::~ACE_AIOCB_Notify_Pipe_Manager (void)
-{
-}
-
-int
-ACE_AIOCB_Notify_Pipe_Manager::notify (ACE_POSIX_Asynch_Result *result)
-{
- // Send the result pointer through the pipe.
- int return_val = ACE::send (this->pipe_.write_handle (),
- ACE_reinterpret_cast (char *,
- &result),
- sizeof (result));
- if (return_val != sizeof (result))
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P %t):%p\n",
- "ACE_AIOCB_Notify_Pipe_Manager::notify"
- "Error:Writing on to notify pipe failed"),
- -1);
- return 0;
-}
-
-void
-ACE_AIOCB_Notify_Pipe_Manager::handle_read_stream (const ACE_Asynch_Read_Stream::Result &result)
-{
- // The message block actually contains the ACE_POSIX_Asynch_Result
- // pointer.
- ACE_POSIX_Asynch_Result *asynch_result = 0;
- asynch_result = *(ACE_POSIX_Asynch_Result **) result.message_block ().rd_ptr ();
-
- // Do the upcall.
- this->posix_aiocb_proactor_->application_specific_code (asynch_result,
- 0, // No Bytes transferred.
- 1, // Success.
- 0, // Completion token.
- 0); // Error.
-
- // Set the message block properly. Put the <wr_ptr> back in the
- // initial position.
- if (this->message_block_.length () > 0)
- this->message_block_.wr_ptr (this->message_block_.rd_ptr ());
-
- // One accept has completed. Issue a read to handle any
- // <post_completion>s in the future.
- if (this->read_stream_.read (this->message_block_,
- sizeof (ACE_POSIX_Asynch_Result *),
- 0, // ACT
- 0) // Priority
- == -1)
- ACE_ERROR ((LM_ERROR,
- "%N:%l:(%P | %t):%p\n",
- "ACE_AIOCB_Notify_Pipe_Manager::handle_read_stream:"
- "Read from pipe failed"));
-}
-
-// *********************************************************************
-
-ACE_POSIX_AIOCB_Proactor::ACE_POSIX_AIOCB_Proactor (void)
- : aiocb_notify_pipe_manager_ (0),
- aiocb_list_max_size_ (ACE_RTSIG_MAX),
- aiocb_list_cur_size_ (0)
-{
- // Initialize the array.
- for (size_t ai = 0; ai < this->aiocb_list_max_size_; ai++)
- {
- aiocb_list_[ai] = 0;
- result_list_ [ai] = 0;
- }
-
- // Accept Handler for aio_accept. Remember! this issues a Asynch_Read
- // on the notify pipe for doing the Asynch_Accept.
- ACE_NEW (aiocb_notify_pipe_manager_,
- ACE_AIOCB_Notify_Pipe_Manager (this));
-}
-
-// Destructor.
-ACE_POSIX_AIOCB_Proactor::~ACE_POSIX_AIOCB_Proactor (void)
-{
-}
-
-int
-ACE_POSIX_AIOCB_Proactor::handle_events (ACE_Time_Value &wait_time)
-{
- // Decrement <wait_time> with the amount of time spent in the method
- ACE_Countdown_Time countdown (&wait_time);
- return this->handle_events (wait_time.msec ());
-}
-
-int
-ACE_POSIX_AIOCB_Proactor::handle_events (void)
-{
- return this->handle_events (ACE_INFINITE);
-}
-
-int
-ACE_POSIX_AIOCB_Proactor::post_completion (ACE_POSIX_Asynch_Result *result)
-{
- // Notify to the completion queue.
- return this->aiocb_notify_pipe_manager_->notify (result);
-}
-
-ACE_Asynch_Read_Stream_Impl *
-ACE_POSIX_AIOCB_Proactor::create_asynch_read_stream (void)
-{
- ACE_Asynch_Read_Stream_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_AIOCB_Asynch_Read_Stream (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Write_Stream_Impl *
-ACE_POSIX_AIOCB_Proactor::create_asynch_write_stream (void)
-{
- ACE_Asynch_Write_Stream_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_AIOCB_Asynch_Write_Stream (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Read_File_Impl *
-ACE_POSIX_AIOCB_Proactor::create_asynch_read_file (void)
-{
- ACE_Asynch_Read_File_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_AIOCB_Asynch_Read_File (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Write_File_Impl *
-ACE_POSIX_AIOCB_Proactor::create_asynch_write_file (void)
-{
- ACE_Asynch_Write_File_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_AIOCB_Asynch_Write_File (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Accept_Impl *
-ACE_POSIX_AIOCB_Proactor::create_asynch_accept (void)
-{
- ACE_Asynch_Accept_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_AIOCB_Asynch_Accept (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Transmit_File_Impl *
-ACE_POSIX_AIOCB_Proactor::create_asynch_transmit_file (void)
-{
- ACE_Asynch_Transmit_File_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_AIOCB_Asynch_Transmit_File (this),
- 0);
- return implementation;
-}
-
-int
-ACE_POSIX_AIOCB_Proactor::handle_events (unsigned long milli_seconds)
-{
- int result_suspend = 0;
- if (milli_seconds == ACE_INFINITE)
- {
- // Indefinite blocking.
- result_suspend = aio_suspend (this->aiocb_list_,
- this->aiocb_list_max_size_,
- 0);
- }
- else
- {
- // Block on <aio_suspend> for <milli_seconds>
- timespec timeout;
- timeout.tv_sec = milli_seconds / 1000;
- timeout.tv_nsec = (milli_seconds - (timeout.tv_sec * 1000)) * 1000;
- result_suspend = aio_suspend (this->aiocb_list_,
- this->aiocb_list_max_size_,
- &timeout);
- }
-
- // Check for errors
- if (result_suspend == -1)
- {
- // If failure is because of timeout, then return *0*, otherwise
- // return -1.
- if (errno == EAGAIN)
- return 0;
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t)::%p\n",
- "ACE_POSIX_AIOCB_Proactor::handle_events:"
- "aio_suspend failed"),
- -1);
- }
-
- // No errors, check which aio has finished.
- size_t ai;
- int error_status = 0;
- int return_status = 0;
- for (ai = 0; ai < this->aiocb_list_max_size_; ai++)
- {
- // Dont process null blocks.
- if (aiocb_list_ [ai] == 0)
- continue;
-
- // Analyze error and return values.
-
- // Get the error status of the aio_ operation.
- error_status = aio_error (aiocb_list_[ai]);
- if (error_status == -1)
- // <aio_error> itself has failed.
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t)::%p\n",
- "ACE_POSIX_AIOCB_Proactor::handle_events:"
- "<aio_error> has failed"),
- -1);
-
- // Continue the loop if <aio_> operation is still in progress.
- if (error_status == EINPROGRESS)
- continue;
-
- // Handle cancel'ed asynchronous operation. We dont have to call
- // <aio_return> in this case, since return_status is going to be
- // -1. We will pass 0 for the <bytes_transferred> in this case
- if (error_status == ECANCELED)
- {
- return_status = 0;
- break;
- }
-
- // Error_status is not -1 and not EINPROGRESS. So, an <aio_>
- // operation has finished (successfully or unsuccessfully!!!)
- // Get the return_status of the <aio_> operation.
- return_status = aio_return (aiocb_list_[ai]);
-
- if (return_status == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t)::%p\n",
- "ACE_POSIX_AIOCB_Proactor::handle_events:"
- "<aio_return> failed"),
- -1);
- else
- // This AIO has finished.
- break;
- }
-
- // Something should have completed.
- ACE_ASSERT (ai != this->aiocb_list_max_size_);
-
- // Retrive the result pointer.
- ACE_POSIX_Asynch_Result *asynch_result = this->result_list_ [ai];
-
- // ACE_reinterpret_cast (ACE_POSIX_Asynch_Result *,
- // this->aiocb_list_[ai]);
- // ACE_dynamic_cast (ACE_POSIX_Asynch_Result *,
- // this->aiocb_list_[ai]);
-
- // Invalidate entry in the aiocb list.
- this->aiocb_list_[ai] = 0;
- this->result_list_ [ai] = 0;
- this->aiocb_list_cur_size_--;
-
- // Call the application code.
- this->application_specific_code (asynch_result,
- return_status, // Bytes transferred.
- 1, // Success
- 0, // No completion key.
- error_status); // Error
-
- // Success
- return 1;
-}
-
-void
-ACE_POSIX_AIOCB_Proactor::application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
- u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- ACE_POSIX_Proactor::application_specific_code (asynch_result,
- bytes_transferred,
- success,
- completion_key,
- error);
-}
-
-int
-ACE_POSIX_AIOCB_Proactor::register_aio_with_proactor (ACE_POSIX_Asynch_Result *result)
-{
- ACE_TRACE ("ACE_POSIX_AIOCB_Proactor::register_aio_with_proactor");
-
- if (result == 0)
- {
- // Just check the status of the list.
- if (this->aiocb_list_cur_size_ >=
- this->aiocb_list_max_size_)
- return -1;
- else
- return 0;
- }
-
- // Non-zero ptr. Find a free slot and store.
-
- // Make sure again.
- if (this->aiocb_list_cur_size_ >=
- this->aiocb_list_max_size_)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:Asynch_Operation: No space to store the <aio> info.\n"),
- -1);
-
- // Slot(s) available. Find a free one.
- size_t ai;
- for (ai = 0;
- ai < this->aiocb_list_max_size_;
- ai++)
- if (this->aiocb_list_[ai] == 0)
- break;
-
- // Sanity check.
- if (ai == this->aiocb_list_max_size_)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:Asynch_Operation: No space to store the <aio> info.\n"),
- -1);
-
- // Store the pointers.
- this->aiocb_list_[ai] = result;
- this->result_list_ [ai] = result;
-
- this->aiocb_list_cur_size_ ++;
-
- return 0;
-}
-
-// *********************************************************************
-
-ACE_POSIX_SIG_Proactor::ACE_POSIX_SIG_Proactor (void)
-{
- // = Mask all the signals, keep a mask set with ACE_SIGRTMIN and set
- // up signal handler for SIGRTMIN.
-
- // Mask all the signals.
- if (this->mask_all () != 0)
- return;
-
- // = Keep a mask set with ACE_SIGRTMIN.
-
- // Clear the signal set.
- if (sigemptyset (&this->RT_completion_signals_) == -1)
- ACE_ERROR ((LM_ERROR,
- "Error:%p\n",
- "Couldn't init the RT completion signal set"));
-
- // Add the signal number to the signal set.
- if (sigaddset (&this->RT_completion_signals_, ACE_SIGRTMIN) == -1)
- ACE_ERROR ((LM_ERROR,
- "Error:%p\n",
- "Couldnt init the RT completion signal set"));
-
- // Set up the signal handler for SIGRTMIN.
- setup_signal_handler (ACE_SIGRTMIN);
-}
-
-ACE_POSIX_SIG_Proactor::ACE_POSIX_SIG_Proactor (const sigset_t signal_set)
-{
- // = Keep <Signal_set> with the Proactor, mask all the signals and
- // setup signal handlers for the signals in the <signal_set>.
-
- // = Keep <signal_set> with the Proactor.
-
- // Empty the signal set first.
- if (sigemptyset (&this->RT_completion_signals_) == -1)
- ACE_ERROR ((LM_ERROR,
- "Error:(%P | %t):%p\n",
- "sigemptyset failed"));
-
- // Put the <signal_set>.
- if (ACE_OS::pthread_sigmask (SIG_SETMASK, &signal_set, 0) != 0)
- ACE_ERROR ((LM_ERROR,
- "Error:(%P | %t):%p\n",
- "pthread_sigmask failed"));
-
- // Get the <signal_set> back from the OS.
- if (ACE_OS::pthread_sigmask (SIG_SETMASK, 0, &this->RT_completion_signals_) != 0)
- ACE_ERROR ((LM_ERROR,
- "Error:(%P | %t):%p\n",
- "ACE_OS::pthread_sigmask failed"));
-
-
- // Mask all the signals.
- if (this->mask_all () != 0)
- return;
-
- // For each signal number present in the <signal_set>, set up the
- // signal handler.
- int member = 0;
- for (int si = ACE_SIGRTMIN; si <= ACE_SIGRTMAX; si++)
- {
- member = sigismember (&signal_set,
- si);
- if (member == -1)
- ACE_ERROR ((LM_ERROR,
- "%N:%l:(%P | %t)::%p\n",
- "ACE_POSIX_SIG_Proactor::ACE_POSIX_SIG_Proactor:"
- "sigismember failed"));
- else if (member == 1)
- {
- if (this->setup_signal_handler (si) == -1)
- return;
- }
- }
-}
-
-ACE_POSIX_SIG_Proactor::~ACE_POSIX_SIG_Proactor (void)
-{
- // @@ Enable the masked signals again.
-}
-
-int
-ACE_POSIX_SIG_Proactor::handle_events (ACE_Time_Value &wait_time)
-{
- // Decrement <wait_time> with the amount of time spent in the method
- ACE_Countdown_Time countdown (&wait_time);
- return this->handle_events (wait_time.msec ());
-}
-
-int
-ACE_POSIX_SIG_Proactor::handle_events (void)
-{
- return this->handle_events (ACE_INFINITE);
-}
-
-int
-ACE_POSIX_SIG_Proactor::post_completion (ACE_POSIX_Asynch_Result *result)
-{
- // Get this process id.
- pid_t pid = ACE_OS::getpid ();
- if (pid == (pid_t) -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%N:%l(%P | %t):%p",
- "<getpid> failed"),
- -1);
-
- // Set the signal information.
- sigval value;
- value.sival_ptr = ACE_reinterpret_cast (void *,
- result);
-
- // Queue the signal.
- if (sigqueue (pid, result->signal_number (), value) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%N:%l:(%P | %t):%p\n",
- "<sigqueue> failed"),
- -1);
- return 0;
-}
-
-ACE_Asynch_Read_Stream_Impl *
-ACE_POSIX_SIG_Proactor::create_asynch_read_stream (void)
-{
- ACE_Asynch_Read_Stream_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_SIG_Asynch_Read_Stream (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Write_Stream_Impl *
-ACE_POSIX_SIG_Proactor::create_asynch_write_stream (void)
-{
- ACE_Asynch_Write_Stream_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_SIG_Asynch_Write_Stream (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Read_File_Impl *
-ACE_POSIX_SIG_Proactor::create_asynch_read_file (void)
-{
- ACE_Asynch_Read_File_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_SIG_Asynch_Read_File (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Write_File_Impl *
-ACE_POSIX_SIG_Proactor::create_asynch_write_file (void)
-{
- ACE_Asynch_Write_File_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_SIG_Asynch_Write_File (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Accept_Impl *
-ACE_POSIX_SIG_Proactor::create_asynch_accept (void)
-{
- ACE_Asynch_Accept_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_SIG_Asynch_Accept (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Transmit_File_Impl *
-ACE_POSIX_SIG_Proactor::create_asynch_transmit_file (void)
-{
- ACE_Asynch_Transmit_File_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_SIG_Asynch_Transmit_File (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Result_Impl *
-ACE_POSIX_SIG_Proactor::create_asynch_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- int is_member = 0;
-
- // Fix the signal number.
- if (signal_number == -1)
- {
- int si;
- for (si = ACE_SIGRTMAX;
- (is_member == 0) && (si >= ACE_SIGRTMIN);
- si--)
- {
- is_member = sigismember (&this->RT_completion_signals_,
- si);
- if (is_member == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t)::\n",
- "ACE_POSIX_SIG_Proactor::create_asynch_timer:"
- "sigismember failed"),
- 0);
- }
-
- if (is_member == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%N:%l:(%P | %t)::%s\n",
- "ACE_POSIX_SIG_Proactor::ACE_POSIX_SIG_Proactor:"
- "Signal mask set empty"),
- 0);
- else
- // + 1 to nullify loop increment.
- signal_number = si + 1;
- }
-
- ACE_Asynch_Result_Impl *implementation;
- ACE_NEW_RETURN (implementation,
- ACE_POSIX_Asynch_Timer (handler,
- act,
- tv,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-int
-ACE_POSIX_SIG_Proactor::setup_signal_handler (int signal_number) const
-{
- // Set up the handler(actually Null handler) for this real-time
- // signal.
- struct sigaction reaction;
- sigemptyset (&reaction.sa_mask); // Nothing else to mask.
- reaction.sa_flags = SA_SIGINFO; // Realtime flag.
-#if defined (SA_SIGACTION)
- // Lynx says, it is better to set this bit, to be portable.
- reaction.sa_flags &= SA_SIGACTION;
-#endif /* SA_SIGACTION */
- // Null handler function.
- reaction.sa_sigaction =
- ACE_SIGNAL_C_FUNC (&ACE_POSIX_SIG_Proactor::null_handler);
- int sigaction_return = ACE_OS::sigaction (signal_number,
- &reaction,
- 0);
- if (sigaction_return == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%p\n",
- "Proactor couldnt do sigaction for the RT SIGNAL"),
- -1);
- return 0;
-}
-
-void
-ACE_POSIX_SIG_Proactor::null_handler (int signal_number,
- siginfo_t * /* info */,
- void * /* context */)
-{
- ACE_ERROR ((LM_ERROR,
- "Error:(%P | %t):ACE_POSIX_SIG_Proactor::null_handler called,"
- "Signal number %d,"
- "Mask all the RT signals for this thread\n",
- signal_number));
-}
-
-int
-ACE_POSIX_SIG_Proactor::mask_all (void) const
-{
- sigset_t full_set;
-
- // Get full set.
- if (sigfillset (&full_set) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:(%P | %t):%p\n",
- "sigfillset failed"),
- -1);
-
- // Mask them.
- if (ACE_OS::pthread_sigmask (SIG_SETMASK, &full_set, 0) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:(%P | %t):%p\n",
- "pthread_sigmask failed"),
- -1);
-
- return 0;
-}
-
-int
-ACE_POSIX_SIG_Proactor::handle_events (unsigned long milli_seconds)
-{
- int result_sigwait = 0;
- siginfo_t sig_info;
-
- // Mask all the signals.
- if (this->mask_all () != 0)
- return -1;
-
- // Wait for the signals.
- if (milli_seconds == ACE_INFINITE)
- {
- result_sigwait = sigwaitinfo (&this->RT_completion_signals_,
- &sig_info);
- }
- else
- {
- // Wait for <milli_seconds> amount of time.
- timespec timeout;
- timeout.tv_sec = milli_seconds / 1000;
- timeout.tv_nsec = (milli_seconds - (timeout.tv_sec * 1000)) * 1000;
- result_sigwait = sigtimedwait (&this->RT_completion_signals_,
- &sig_info,
- &timeout);
- }
-
- // Check for errors
- if (result_sigwait == -1)
- {
- // If failure is coz of timeout, then return *0* but set errno
- // appropriately.
- if (errno == EAGAIN)
- return 0;
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t)::%p\n",
- "ACE_POSIX_SIG_Proactor::handle_events:"
- "sigtimedwait/sigwaitinfo failed"),
- -1);
- }
-
- // No errors, RT compleion signal is received.
-
- // Is the signo returned consistent with the sig info?
- if (sig_info.si_signo != result_sigwait)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error:%N:%l:(%P | %t):"
- "ACE_POSIX_SIG_Proactor::handle_events:"
- "Inconsistent signal number (%d) in the signal info block",
- sig_info.si_signo),
- -1);
-
- // Retrive the result pointer.
- ACE_POSIX_Asynch_Result *asynch_result = ACE_reinterpret_cast (ACE_POSIX_Asynch_Result *,
- sig_info.si_value.sival_ptr);
-
- // Check the <signal code> and act according to that.
- if (sig_info.si_code == SI_ASYNCIO)
- {
- // Analyze error and return values.
-
- int error_status = 0;
- int return_status = 0;
-
- // Check the error status
- error_status = aio_error (asynch_result);
-
- // <aio_error> itself has failed.
- if (error_status == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t)::%p\n",
- "ACE_POSIX_SIG_Proactor::handle_events:"
- "<aio_error> has failed"),
- -1);
-
- // Completion signal has been received, so it can't be in
- // progress.
- if (error_status == EINPROGRESS)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t)::%p\n",
- "ACE_POSIX_SIG_Proactor::handle_events:"
- "Internal error: AIO in progress. "
- "But completion signal was received"),
- -1);
-
- // Handle cancel'ed asynchronous operation. We dont have to call
- // <aio_return> in this case, since return_status is going to be
- // -1. We will pass 0 for the <bytes_transferred> in this case
- if (error_status == ECANCELED)
- {
- return_status = 0;
- }
- else
- {
- // Get the return_status of the <aio_> operation.
- return_status = aio_return (asynch_result);
-
- // Failure.
- if (return_status == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%N:%l:(%P | %t)::%p\n",
- "ACE_POSIX_SIG_Proactor::handle_events:"
- "<aio_return> failed"),
- -1);
- }
-
- // error status and return status are obtained. Dispatch the
- // completion .
- this->application_specific_code (asynch_result,
- return_status,
- 1, // Result : True.
- 0, // No completion key.
- error_status); // Error.
- }
- else if (sig_info.si_code == SI_QUEUE)
- {
- this->application_specific_code (asynch_result,
- 0, // No bytes transferred.
- 1, // Result : True.
- 0, // No completion key.
- 0); // No error.
- }
- else
- // Unknown signal code.
- ACE_ERROR_RETURN ((LM_DEBUG,
- "%N:%l:(%P | %t):",
- "ACE_POSIX_SIG_Proactor::handle_events:\n"
- "Unexpected signal code (%d) returned on completion querying\n",
- sig_info.si_code),
- -1);
-
- // Success
- return 1;
-}
-
-// *********************************************************************
-
-ACE_POSIX_Asynch_Timer::ACE_POSIX_Asynch_Timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_POSIX_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
- time_ (tv)
-{
-}
-
-void
-ACE_POSIX_Asynch_Timer::complete (u_long /* bytes_transferred */,
- int /* success */,
- const void * /* completion_key */,
- u_long /* error */)
-{
- this->handler_.handle_time_out (this->time_, this->act ());
-}
-
-// *********************************************************************
-
-ACE_POSIX_Wakeup_Completion::ACE_POSIX_Wakeup_Completion (ACE_Handler &handler,
- const void *act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_POSIX_Asynch_Result (handler, act, event, 0, 0, priority, signal_number)
-{
-}
-
-ACE_POSIX_Wakeup_Completion::~ACE_POSIX_Wakeup_Completion (void)
-{
-}
-
-void
-ACE_POSIX_Wakeup_Completion::complete (u_long /* bytes_transferred */,
- int /* success */,
- const void * /* completion_key */,
- u_long /* error */)
-{
- this->handler_.handle_wakeup ();
-}
-
-#endif /* ACE_HAS_AIO_CALLS */
diff --git a/ace/POSIX_Proactor.h b/ace/POSIX_Proactor.h
deleted file mode 100644
index de8dece5e4d..00000000000
--- a/ace/POSIX_Proactor.h
+++ /dev/null
@@ -1,433 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// POSIX_Proactor.h
-//
-// = AUTHOR
-// Irfan Pyarali <irfan@cs.wustl.edu>,
-// Tim Harrison <harrison@cs.wustl.edu> and
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_POSIX_PROACTOR_H
-#define ACE_POSIX_PROACTOR_H
-#include "ace/pre.h"
-
-#include "ace/Proactor_Impl.h"
-
-#if defined (ACE_HAS_AIO_CALLS)
-// POSIX implementation of Proactor depends on the <aio_> family of
-// system calls.
-
-#include "ace/Free_List.h"
-#include "ace/Pipe.h"
-#include "ace/POSIX_Asynch_IO.h"
-
-class ACE_Export ACE_POSIX_Proactor : public ACE_Proactor_Impl
-{
- // = TITLE
- //
- // POSIX implementation of the Proactor.
- //
- // = DESCRIPTION
- //
- // There are two different strategies by which Proactor can get
- // to know the completion of <aio> operations. One is based on
- // Asynchronous I/O Control Blocks (AIOCB) where a list of
- // AIOCBs are stored and completion status of the corresponding
- // operations are queried on them. The other one is based on
- // POSIX Real Time signals. This class abstracts out the common
- // code needed for both the strategies. ACE_AIOCB_Proactor and
- // ACE_SIG_Proactor specialize this class for each strategy.
-
- friend class ACE_POSIX_SIG_Asynch_Accept_Handler;
- // For <POSIX_SIG_Asynch_Accept> operation, this handler class does
- // the actual work, has to register the real-time signal with the
- // Proactor.
-
-public:
- virtual ~ACE_POSIX_Proactor (void);
- // Virtual destructor.
-
- virtual int close (void);
- // Close down the Proactor.
-
- virtual int register_handle (ACE_HANDLE handle,
- const void *completion_key);
- // This function is a no-op function for Unix systems. Returns 0.
-
- virtual int post_completion (ACE_POSIX_Asynch_Result *result) = 0;
- // Post a result to the completion port of the Proactor. If errors
- // occur, the result will be deleted by this method. If successful,
- // the result will be deleted by the Proactor when the result is
- // removed from the completion port. Therefore, the result should
- // have been dynamically allocated and should be orphaned by the
- // user once this method is called.
-
- int wake_up_dispatch_threads (void);
- // @@ This is a no-op on POSIX platforms. Returns 0.
-
- int close_dispatch_threads (int wait);
- // @@ This is a no-op on POSIX platforms. Returns 0.
-
- size_t number_of_threads (void) const;
- void number_of_threads (size_t threads);
- // @@ This is a no-op on POSIX platforms. Returns 0.
-
- virtual ACE_HANDLE get_handle (void) const;
- // This is a no-op in POSIX. Returns ACE_INVALID_HANDLE.
-
- // Methods used to create Asynch_IO_Result objects. We create the right
- // objects here in these methods.
-
- virtual ACE_Asynch_Read_Stream_Result_Impl *create_asynch_read_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
-
- virtual ACE_Asynch_Write_Stream_Result_Impl *create_asynch_write_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
-
- virtual ACE_Asynch_Read_File_Result_Impl *create_asynch_read_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
-
- virtual ACE_Asynch_Write_File_Result_Impl *create_asynch_write_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
-
- virtual ACE_Asynch_Accept_Result_Impl *create_asynch_accept_result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
-
- virtual ACE_Asynch_Transmit_File_Result_Impl *create_asynch_transmit_file_result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
-
- virtual ACE_Asynch_Result_Impl *create_asynch_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Create a timer result object which can be used with the Timer
- // mechanism of the Proactor.
-
-protected:
- ACE_POSIX_Proactor (void);
- // Constructor.
-
- void application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
- u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // Protect against structured exceptions caused by user code when
- // dispatching handles. The <completion_key> is not very useful
- // compared to <AST> that can be associated each asynchronous
- // operation. <completion_key> is implemented right now for the
- // POSIX Proators.
-
- virtual int post_wakeup_completions (int how_many);
- // Post <how_many> completions to the completion port so that all
- // threads can wake up. This is used in conjunction with the
- // <run_event_loop>.
-
-protected:
- ACE_Handler wakeup_handler_;
- // Handler to handle the wakeups. This works in conjunction with the
- // <ACE_Proactor::run_event_loop>.
-};
-
-// Forward declarations.
-class ACE_AIOCB_Notify_Pipe_Manager;
-
-class ACE_Export ACE_POSIX_AIOCB_Proactor : public ACE_POSIX_Proactor
-{
- // = TITLE
- //
- // This Proactor makes use of Asynchronous I/O Control Blocks
- // (AIOCB) to notify/get the completion status of the <aio_>
- // operations issued.
- //
- // = DESCRIPTION
- //
-
- friend class ACE_AIOCB_Notify_Pipe_Manager;
- // Handler needs to call application specific code.
-
- friend class ACE_POSIX_AIOCB_Asynch_Operation;
- // This class does the registering of Asynch Operations with the
- // Proactor which is necessary in the AIOCB strategy.
-
- // friend class ACE_POSIX_AIOCB_Asynch_Accept_Handler;
- // For <Asynch_Accept> operation class, this helper class takes care
- // of doing the <Asynch_Accept>.
-
-public:
- ACE_POSIX_AIOCB_Proactor (void);
- // Constructor.
-
- virtual ~ACE_POSIX_AIOCB_Proactor (void);
- // Destructor.
-
- virtual int handle_events (ACE_Time_Value &wait_time);
- // Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return 0. Return 1 on success i.e., when a
- // completion is dispatched, non-zero (-1) on errors and errno is
- // set accordingly.
-
- virtual int handle_events (void);
- // Block indefinitely until at least one event is dispatched.
- // Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return 0. Return 1 on success i.e., when a
- // completion is dispatched, non-zero (-1) on errors and errno is
- // set accordingly.
-
- virtual int post_completion (ACE_POSIX_Asynch_Result *result);
- // Post a result to the completion port of the Proactor.
-
- // = Methods used to create Asynch_IO objects. We create the right
- // objects here in these methods.
-
- virtual ACE_Asynch_Read_Stream_Impl *create_asynch_read_stream (void);
-
- virtual ACE_Asynch_Write_Stream_Impl *create_asynch_write_stream (void);
-
- virtual ACE_Asynch_Read_File_Impl *create_asynch_read_file (void);
-
- virtual ACE_Asynch_Write_File_Impl *create_asynch_write_file (void);
-
- virtual ACE_Asynch_Accept_Impl *create_asynch_accept (void);
-
- virtual ACE_Asynch_Transmit_File_Impl *create_asynch_transmit_file (void);
-
-protected:
- virtual int handle_events (unsigned long milli_seconds);
- // Dispatch a single set of events. If <milli_seconds> elapses
- // before any events occur, return 0. Return 1 if a completion
- // dispatched. Return -1 on errors.
-
- void application_specific_code (ACE_POSIX_Asynch_Result *asynch_result,
- u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // We will call the base class's application_specific_code from
- // here.
-
- int register_aio_with_proactor (ACE_POSIX_Asynch_Result *result);
- // If the ptr is o, just check whether there is any slot free and
- // return 0 if yes, else return -1. If a valid ptr is passed, keep it
- // in a free slot.
-
- ACE_AIOCB_Notify_Pipe_Manager* aiocb_notify_pipe_manager_;
- // This class takes care of doing <accept> when we use
- // AIO_CONTROL_BLOCKS strategy.
-
- aiocb *aiocb_list_ [ACE_RTSIG_MAX];
- // Use an array to keep track of all the aio's issued
- // currently. We'll limit the array size to Maximum RT signals that
- // can be queued in a process. This is the upper limit how many aio
- // operations can be pending at a time.
-
- ACE_POSIX_Asynch_Result *result_list_ [ACE_RTSIG_MAX];
- // @@ Keeping an extra copy of the <aiocb_list> here so that we can
- // avoid dynamic cast when we use the result object calling back
- // the hook methods.
-
- size_t aiocb_list_max_size_;
- // To maintain the maximum size of the array (list).
-
- size_t aiocb_list_cur_size_;
- // To maintain the current size of the array (list).
-};
-
-class ACE_Export ACE_POSIX_SIG_Proactor : public ACE_POSIX_Proactor
-{
- // = TITLE
- //
- // This Proactor implementation does compeltion querying using
- // POSIX Real Time signals. <sigtimedwait>/<sigwaitinfo> call is
- // used to get the notify/get the completions.
- // The real-time signals that are going to be used with this
- // Proactor should be given apriori in the constructor, so that
- // those signals can be masked from asynchornous delivery.
- //
- // = DESCRIPTION
- //
-
- friend class ACE_POSIX_SIG_Asynch_Operation;
- // This class does the registering of Asynch Operations with the
- // Proactor which is necessary in the SIG strategy, because we need
- // to store the signal number.
-
-public:
- ACE_POSIX_SIG_Proactor (void);
- // This constructor masks only the <ACE_SIGRTMIN>
- // real-time signal. Only this signal should be used to issue
- // asynchronous operations using this Proctor.
-
- ACE_POSIX_SIG_Proactor (const sigset_t mask_set);
- // This constructor should be used to tell the Proactor to mask and
- // wait for the real-time signals specified in this set. Only these
- // signals should be used by the asynchronous operations when they
- // use this Proactor.
-
- virtual ~ACE_POSIX_SIG_Proactor (void);
- // Destructor.
-
- virtual int handle_events (ACE_Time_Value &wait_time);
- // Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return 0. Return 1 on success i.e., when a
- // completion is dispatched, non-zero (-1) on errors and errno is
- // set accordingly.
-
- virtual int handle_events (void);
- // Block indefinitely until at least one event is dispatched.
- // Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return 0. Return 1 on success i.e., when a
- // completion is dispatched, non-zero (-1) on errors and errno is
- // set accordingly.
-
- virtual int post_completion (ACE_POSIX_Asynch_Result *result);
- // Post a result to the completion port of the Proactor.
-
- // = Methods used to create Asynch_IO objects. We create the right
- // objects here in these methods.
-
- virtual ACE_Asynch_Read_Stream_Impl *create_asynch_read_stream (void);
-
- virtual ACE_Asynch_Write_Stream_Impl *create_asynch_write_stream (void);
-
- virtual ACE_Asynch_Read_File_Impl *create_asynch_read_file (void);
-
- virtual ACE_Asynch_Write_File_Impl *create_asynch_write_file (void);
-
- virtual ACE_Asynch_Accept_Impl *create_asynch_accept (void);
-
- virtual ACE_Asynch_Transmit_File_Impl *create_asynch_transmit_file (void);
-
- virtual ACE_Asynch_Result_Impl *create_asynch_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // If <signal_number> is -1, check with the Proactor and use one of
- // the signals that is present in the mask set (i.e. the signals for
- // which the Proactor will be waiting) of the Proactor. If there are
- // more than one signal, the higher numbered signal will be chosen.
-
-protected:
- int setup_signal_handler (int signal_number) const;
- // To setup the handler for a real-time signbal.
-
- static void null_handler (int signal_number, siginfo_t *info, void *context);
- // Dummy signal handler. This wont get called at all, since we are
- // going to be masking the signal in all the threads.
-
- int mask_all (void) const;
- // To mask all the signals in a thread.
-
- virtual int handle_events (unsigned long milli_seconds);
- // Dispatch a single set of events. If <milli_seconds> elapses
- // before any events occur, return 0. Return 1 if a completion is
- // dispatched. Return -1 on errors.
-
- sigset_t RT_completion_signals_;
- // These signals are used for completion notification by the
- // Proactor. The signals specified while issueing <Asynch
- // Operation>s are stored here in this set. These signals are masked
- // for a thread when it calls the Proactor::handle_events.
-};
-
-class ACE_Export ACE_POSIX_Asynch_Timer : public ACE_POSIX_Asynch_Result
-{
- // = TITLE
- // This class is posted to the completion port when a timer
- // expires. When the <complete method> of this object is
- // called, the <handler>'s <handle_timeout> method will be
- // called.
-
- friend class ACE_POSIX_Proactor;
- friend class ACE_POSIX_SIG_Proactor;
- // The factory method for this class is with the POSIX_Proactor
- // class.
-
-protected:
- ACE_POSIX_Asynch_Timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Constructor.
-
- virtual ~ACE_POSIX_Asynch_Timer (void) {}
- // Destructor.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error = 0);
- // This method calls the <handler>'s handle_timeout method.
-
- ACE_Time_Value time_;
- // Time value requested by caller
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/POSIX_Proactor.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_AIO_CALLS */
-#include "ace/post.h"
-#endif /* ACE_POSIX_PROACTOR_H */
diff --git a/ace/POSIX_Proactor.i b/ace/POSIX_Proactor.i
deleted file mode 100644
index 6318deb79a0..00000000000
--- a/ace/POSIX_Proactor.i
+++ /dev/null
@@ -1,2 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
diff --git a/ace/Pair.cpp b/ace/Pair.cpp
deleted file mode 100644
index 7b595e8b3c7..00000000000
--- a/ace/Pair.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Pair.cpp
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#include "ace/Pair.h"
-
-ACE_RCSID(ace, Pair, "$Id$")
-
diff --git a/ace/Pair.h b/ace/Pair.h
deleted file mode 100644
index e4722a5975e..00000000000
--- a/ace/Pair.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Pair.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_PAIR_H
-#define ACE_PAIR_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Include the templates here.
-#include "ace/Pair_T.h"
-
-#include "ace/post.h"
-#endif /* ACE_PAIR_H */
diff --git a/ace/Pair_T.cpp b/ace/Pair_T.cpp
deleted file mode 100644
index 27e7f6d34df..00000000000
--- a/ace/Pair_T.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// $Id$
-
-#ifndef ACE_PAIR_T_C
-#define ACE_PAIR_T_C
-
-#include "ace/Pair_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Pair_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Pair_T, "$Id$")
-
-#endif /* ACE_PAIR_T_C */
diff --git a/ace/Pair_T.h b/ace/Pair_T.h
deleted file mode 100644
index 18787e4902b..00000000000
--- a/ace/Pair_T.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Pair_T.h
-//
-// = AUTHOR
-// Irfan Pyarali <irfan@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_PAIR_T_H
-#define ACE_PAIR_T_H
-#include "ace/pre.h"
-
-#include "ace/Pair.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class T1, class T2>
-class ACE_Pair
-{
- // = TITLE
- // Defines a pair.
- //
- // = DESCRIPTION
- // Similar to the STL pair.
-public:
-
- // = Traits.
- typedef T1 first_type;
- typedef T2 second_type;
-
- // = Initialization and termination methods.
- ACE_Pair (const T1 &t1,
- const T2 &t2);
- // Constructor.
-
- ACE_Pair (void);
- // Default constructor.
-
- T1 &first (void);
- const T1 &first (void) const;
- void first (const T1 &t1);
- // Get/Set first.
-
- T2 &second (void);
- const T2 &second (void) const;
- void second (const T2 &t2);
- // Access second.
-
-protected:
-
- T1 first_;
- T2 second_;
-};
-
-template <class T1, class T2>
-class ACE_Reference_Pair
-{
- // = TITLE
- // Defines a pair that only hold references.
- //
- // = DESCRIPTION
- // Similar to the STL pair (but restricted to holding references
- // and not copies).
-public:
-
- // = Traits.
- typedef T1 first_type;
- typedef T2 second_type;
-
- // = Initialization and termination methods.
- ACE_Reference_Pair (T1 &t1,
- T2 &t2);
- // Constructor.
-
- T1 &first (void) const;
- // Access first.
-
- T2 &second (void) const;
- // Access second.
-
-protected:
-
- T1 &first_;
- T2 &second_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Pair_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Pair_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Pair_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_PAIR_T_H */
diff --git a/ace/Pair_T.i b/ace/Pair_T.i
deleted file mode 100644
index 7ef61c9cf44..00000000000
--- a/ace/Pair_T.i
+++ /dev/null
@@ -1,72 +0,0 @@
-// $Id$
-
-template <class T1, class T2> ACE_INLINE
-ACE_Pair<T1, T2>::ACE_Pair (const T1 &t1,
- const T2 &t2)
- : first_ (t1),
- second_ (t2)
-{
-}
-
-template <class T1, class T2> ACE_INLINE
-ACE_Pair<T1, T2>::ACE_Pair (void)
-{
-}
-
-template <class T1, class T2> ACE_INLINE T1 &
-ACE_Pair<T1, T2>::first (void)
-{
- return this->first_;
-}
-
-template <class T1, class T2> ACE_INLINE const T1 &
-ACE_Pair<T1, T2>::first (void) const
-{
- return this->first_;
-}
-
-template <class T1, class T2> ACE_INLINE void
-ACE_Pair<T1, T2>::first (const T1 &t1)
-{
- this->first_ = t1;
-}
-
-template <class T1, class T2> ACE_INLINE T2 &
-ACE_Pair<T1, T2>::second (void)
-{
- return this->second_;
-}
-
-template <class T1, class T2> ACE_INLINE const T2 &
-ACE_Pair<T1, T2>::second (void) const
-{
- return this->second_;
-}
-
-template <class T1, class T2> ACE_INLINE void
-ACE_Pair<T1, T2>::second (const T2 &t2)
-{
- this->second_ = t2;
-}
-
-template <class T1, class T2> ACE_INLINE
-ACE_Reference_Pair<T1, T2>::ACE_Reference_Pair (T1 &t1,
- T2 &t2)
- : first_ (t1),
- second_ (t2)
-{
-}
-
-template <class T1, class T2> ACE_INLINE T1 &
-ACE_Reference_Pair<T1, T2>::first (void) const
-{
- return this->first_;
-}
-
-template <class T1, class T2> ACE_INLINE T2 &
-ACE_Reference_Pair<T1, T2>::second (void) const
-{
- return this->second_;
-}
-
-////////////////////////////////////////////////////////////////////////////////
diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp
deleted file mode 100644
index 18d9ebec285..00000000000
--- a/ace/Parse_Node.cpp
+++ /dev/null
@@ -1,710 +0,0 @@
-// $Id$
-
-#include "ace/Service_Config.h"
-#include "ace/Service_Repository.h"
-#include "ace/Task.h"
-#include "ace/Parse_Node.h"
-
-// Provide the class hierarchy that defines the parse tree of Service
-// Nodes.
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Parse_Node.i"
-#endif /* ____ */
-
-ACE_RCSID(ace, Parse_Node, "$Id$")
-
-// Keeps track of the number of errors encountered so far.
-extern int ace_yyerrno;
-
-// Global variable used to communicate between the parser and the main
-// program.
-extern ACE_Service_Config *ace_this_svc;
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Node)
-
-void
-ACE_Stream_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Stream_Node::dump");
-}
-
-void
-ACE_Stream_Node::apply (void)
-{
- ACE_TRACE ("ACE_Stream_Node::apply");
-
- if (ACE_Service_Config::initialize (this->node_->record (),
- this->node_->parameters ()) == -1)
- ace_yyerrno++;
-
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("did stream on %s, error = %d\n"),
- this->node_->name (),
- ace_yyerrno));
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Parse_Node)
-
-void
-ACE_Parse_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Parse_Node::dump");
-}
-
-const ACE_TCHAR *
-ACE_Parse_Node::name (void) const
-{
- ACE_TRACE ("ACE_Parse_Node::name");
- return this->name_;
-}
-
-ACE_Parse_Node *
-ACE_Parse_Node::link (void) const
-{
- ACE_TRACE ("ACE_Parse_Node::link");
- return this->next_;
-}
-
-void
-ACE_Parse_Node::link (ACE_Parse_Node *n)
-{
- ACE_TRACE ("ACE_Parse_Node::link");
- this->next_ = n;
-}
-
-ACE_Stream_Node::ACE_Stream_Node (const ACE_Static_Node *str_ops,
- const ACE_Parse_Node *str_mods)
-#if defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS)
- : ACE_Parse_Node (str_ops == 0 ? ACE_static_cast (ACE_TCHAR *,
- ACE_TEXT ("<unknown>"))
- : ACE_static_cast (ACE_TCHAR *,
- str_ops->name ())),
-#else
- : ACE_Parse_Node ((str_ops == 0 ? ACE_TEXT ("<unknown>") : str_ops->name ())),
-#endif /* defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */
- node_ (str_ops),
- mods_ (str_mods)
-{
- ACE_TRACE ("ACE_Stream_Node::ACE_Stream_Node");
-}
-
-
-ACE_Stream_Node::~ACE_Stream_Node (void)
-{
- ACE_TRACE ("ACE_Stream_Node::~ACE_Stream_Node");
- ACE_Static_Node *n = ACE_const_cast (ACE_Static_Node *,
- this->node_);
- delete n;
- ACE_Parse_Node *m = ACE_const_cast (ACE_Parse_Node *,
- this->mods_);
- delete m;
-}
-
-ACE_Parse_Node::ACE_Parse_Node (void)
- : name_ (0),
- next_ (0)
-{
- ACE_TRACE ("ACE_Parse_Node::ACE_Parse_Node");
-}
-
-
-ACE_Parse_Node::ACE_Parse_Node (const ACE_TCHAR *nm)
- : name_ (nm ? ACE::strnew (nm) : 0),
- next_ (0)
-{
- ACE_TRACE ("ACE_Parse_Node::ACE_Parse_Node");
-}
-
-void
-ACE_Parse_Node::print (void) const
-{
- ACE_TRACE ("ACE_Parse_Node::print");
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("svc = %s\n"),
- this->name ()));
-
- if (this->next_)
- this->next_->print ();
-}
-
-
-ACE_Parse_Node::~ACE_Parse_Node (void)
-{
- ACE_TRACE ("ACE_Parse_Node::~ACE_Parse_Node");
- delete[] ACE_const_cast (ACE_TCHAR*, this->name_);
- delete this->next_;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Suspend_Node)
-
-void
-ACE_Suspend_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Suspend_Node::dump");
-}
-
-ACE_Suspend_Node::ACE_Suspend_Node (const ACE_TCHAR *name)
- : ACE_Parse_Node (name)
-{
- ACE_TRACE ("ACE_Suspend_Node::ACE_Suspend_Node");
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Resume_Node)
-
-void
-ACE_Resume_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Resume_Node::dump");
-}
-
-ACE_Resume_Node::ACE_Resume_Node (const ACE_TCHAR *name)
- : ACE_Parse_Node (name)
-{
- ACE_TRACE ("ACE_Resume_Node::ACE_Resume_Node");
-}
-
-void
-ACE_Suspend_Node::apply (void)
-{
- ACE_TRACE ("ACE_Suspend_Node::apply");
-
- if (ACE_Service_Config::suspend (this->name ()) == -1)
- ace_yyerrno++;
-
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("did suspend on %s, error = %d\n"),
- this->name (),
- ace_yyerrno));
-}
-
-void
-ACE_Resume_Node::apply (void)
-{
- ACE_TRACE ("ACE_Resume_Node::apply");
- if (ACE_Service_Config::resume (this->name ()) == -1)
- ace_yyerrno++;
-
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("did resume on %s, error = %d\n"),
- this->name (),
- ace_yyerrno));
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Remove_Node)
-
-void
-ACE_Remove_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Remove_Node::dump");
-}
-
-ACE_Remove_Node::ACE_Remove_Node (const ACE_TCHAR *name)
- : ACE_Parse_Node (name)
-{
- ACE_TRACE ("ACE_Remove_Node::ACE_Remove_Node");
-}
-
-void
-ACE_Remove_Node::apply (void)
-{
- ACE_TRACE ("ACE_Remove_Node::apply");
- if (ACE_Service_Config::remove (this->name ()) == -1)
- ace_yyerrno++;
-
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("did remove on %s, error = %d\n"),
- this->name (),
- ace_yyerrno));
-}
-
-ACE_Dynamic_Node::ACE_Dynamic_Node (const ACE_Service_Type *sr,
- ACE_TCHAR *parms)
- : ACE_Static_Node (sr->name (), parms),
- record_ (sr)
-{
- ACE_TRACE ("ACE_Dynamic_Node::ACE_Dynamic_Node");
-}
-
-const ACE_Service_Type *
-ACE_Dynamic_Node::record (void) const
-{
- ACE_TRACE ("ACE_Dynamic_Node::record");
- return this->record_;
-}
-
-void
-ACE_Dynamic_Node::apply (void)
-{
- ACE_TRACE ("ACE_Dynamic_Node::apply");
-
- if (ACE_Service_Config::initialize (this->record (),
- this->parameters ()) == -1)
- ace_yyerrno++;
-
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("did dynamic on %s, error = %d\n"),
- this->name (),
- ace_yyerrno));
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Dynamic_Node)
-
-void
-ACE_Dynamic_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Dynamic_Node::dump");
-}
-
-ACE_Dynamic_Node::~ACE_Dynamic_Node (void)
-{
- ACE_TRACE ("ACE_Dynamic_Node::~ACE_Dynamic_Node");
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Static_Node)
-
-void
-ACE_Static_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Static_Node::dump");
-}
-
-ACE_Static_Node::ACE_Static_Node (const ACE_TCHAR *nm,
- ACE_TCHAR *params)
- : ACE_Parse_Node (nm),
- parameters_ (params ? ACE::strnew (params) : 0)
-{
- ACE_TRACE ("ACE_Static_Node::ACE_Static_Node");
-}
-
-const ACE_Service_Type *
-ACE_Static_Node::record (void) const
-{
- ACE_TRACE ("ACE_Static_Node::record");
- ACE_Service_Type *sr;
-
- if (ACE_Service_Repository::instance()->find
- (this->name (),
- (const ACE_Service_Type **) &sr) == -1)
- return 0;
- else
- return sr;
-}
-
-ACE_TCHAR *
-ACE_Static_Node::parameters (void) const
-{
- ACE_TRACE ("ACE_Static_Node::parameters");
- return this->parameters_;
-}
-
-void
-ACE_Static_Node::apply (void)
-{
- ACE_TRACE ("ACE_Static_Node::apply");
- if (ACE_Service_Config::initialize (this->name (),
- this->parameters ()) == -1)
- ace_yyerrno++;
-
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("did static on %s, error = %d\n"),
- this->name (),
- ace_yyerrno));
-}
-
-ACE_Static_Node::~ACE_Static_Node (void)
-{
- ACE_TRACE ("ACE_Static_Node::~ACE_Static_Node");
- delete[] this->parameters_;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Location_Node)
-
-void
-ACE_Location_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Location_Node::dump");
-}
-
-ACE_Location_Node::ACE_Location_Node (void)
- : pathname_ (0),
- handle_ (0),
- symbol_ (0)
-{
- ACE_TRACE ("ACE_Location_Node::ACE_Location_Node");
-}
-
-ACE_Location_Node::~ACE_Location_Node (void)
-{
- ACE_TRACE ("ACE_Location_Node::~ACE_Location_Node");
-}
-
-const ACE_TCHAR *
-ACE_Location_Node::pathname (void) const
-{
- ACE_TRACE ("ACE_Location_Node::pathname");
- return this->pathname_;
-}
-
-void
-ACE_Location_Node::pathname (const ACE_TCHAR *p)
-{
- ACE_TRACE ("ACE_Location_Node::pathname");
- this->pathname_ = p;
-}
-
-void
-ACE_Location_Node::handle (const ACE_SHLIB_HANDLE h)
-{
- ACE_TRACE ("ACE_Location_Node::handle");
- this->handle_ = h;
-}
-
-ACE_SHLIB_HANDLE
-ACE_Location_Node::handle (void) const
-{
- ACE_TRACE ("ACE_Location_Node::handle");
- return this->handle_;
-}
-
-void
-ACE_Location_Node::set_symbol (void *s)
-{
- ACE_TRACE ("ACE_Location_Node::set_symbol");
- this->symbol_ = s;
-}
-
-int
-ACE_Location_Node::dispose (void) const
-{
- ACE_TRACE ("ACE_Location_Node::dispose");
- return this->must_delete_;
-}
-
-ACE_SHLIB_HANDLE
-ACE_Location_Node::open_handle (void)
-{
- ACE_TRACE ("ACE_Location_Node::open_handle");
-
- ACE_TCHAR dl_pathname[MAXPATHLEN + 1];
-
- // Transform the pathname into the appropriate dynamic link library
- // by searching the ACE_LD_SEARCH_PATH.
- int result = ACE::ldfind (this->pathname (),
- dl_pathname,
- (sizeof dl_pathname / sizeof (ACE_TCHAR)));
-
- // Check for errors
- if (result != 0)
- return 0;
-
- // Set the handle
- this->handle (ACE_OS::dlopen (dl_pathname));
-
- if (this->handle () == 0)
- {
- ace_yyerrno++;
-
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("dlopen failed for %s"),
- dl_pathname));
-
- ACE_TCHAR *errmsg = ACE_OS::dlerror ();
-
- if (errmsg != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT (": %s\n"),
- errmsg),
- 0);
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("\n")),
- 0);
- }
- else
- return this->handle ();
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Object_Node)
-
-void
-ACE_Object_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Object_Node::dump");
-}
-
-ACE_Object_Node::ACE_Object_Node (const ACE_TCHAR *path,
- const ACE_TCHAR *obj_name)
- : object_name_ (obj_name ? ACE::strnew (obj_name) : 0)
-{
- ACE_TRACE ("ACE_Object_Node::ACE_Object_Node");
- this->pathname (path ? ACE::strnew (path) : 0);
- this->must_delete_ = 0;
-}
-
-void *
-ACE_Object_Node::symbol (ACE_Service_Object_Exterminator *)
-{
- ACE_TRACE ("ACE_Object_Node::symbol");
- if (this->open_handle () != 0)
- {
- ACE_TCHAR *object_name = ACE_const_cast (ACE_TCHAR *, this->object_name_);
-
- this->symbol_ = (void *)
- ACE_OS::dlsym ((ACE_SHLIB_HANDLE) this->handle (),
- object_name);
-
- if (this->symbol_ == 0)
- {
- ace_yyerrno++;
-
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("dlsym failed for object %s\n"),
- object_name));
-
- ACE_TCHAR *errmsg = ACE_OS::dlerror ();
-
- if (errmsg != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT (": %s\n"),
- errmsg),
- 0);
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("\n")),
- 0);
- }
- return this->symbol_;
- }
-
- return 0;
-}
-
-ACE_Object_Node::~ACE_Object_Node (void)
-{
- ACE_TRACE ("ACE_Object_Node::~ACE_Object_Node");
- delete[] ACE_const_cast (ACE_TCHAR *, this->object_name_);
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Function_Node)
-
-void
-ACE_Function_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Function_Node::dump");
-}
-
-ACE_Function_Node::ACE_Function_Node (const ACE_TCHAR *path,
- const ACE_TCHAR *func_name)
- : function_name_ (func_name ? ACE::strnew (func_name) : 0)
-{
- ACE_TRACE ("ACE_Function_Node::ACE_Function_Node");
- this->pathname (path);
- this->must_delete_ = 1;
-}
-
-void *
-ACE_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
-{
- ACE_TRACE ("ACE_Function_Node::symbol");
- if (this->open_handle () != 0)
- {
- void *(*func) (ACE_Service_Object_Exterminator *) = 0;
- this->symbol_ = 0;
-
- // Locate the factory function <function_name> in the shared
- // object.
-
- ACE_TCHAR *function_name = ACE_const_cast (ACE_TCHAR *,
- this->function_name_);
-
- // According to the new ANSI C++ specification, casting a void*
- // pointer to a function pointer is not allowed. However,
- // casting a void* pointer to an integer type that is large
- // enough to hold the pointer value is legal. I (Nanbor) chose
- // to cast the return value to long since it should be large
- // enough to hold the void* pointer's value on most platforms.
- // I am not sure if casting a long value to a function pointer
- // is legal or not (can't find a good explanation in spec) but
- // SunC++, egcs, and KAI compilers, all of which are pretty
- // close to (or, at least claim to conform with) the standard
- // did not complain about this as an illegal pointer conversion.
- long temp_ptr =
- ACE_reinterpret_cast(long,
- ACE_OS::dlsym ((ACE_SHLIB_HANDLE) this->handle (),
- function_name));
- func = ACE_reinterpret_cast(void *(*)(ACE_Service_Object_Exterminator *),
- temp_ptr);
-
- if (func == 0)
- {
- ace_yyerrno++;
-
- if (this->symbol_ == 0)
- {
- ace_yyerrno++;
-
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("dlsym failed for function %s\n"),
- function_name));
-
- ACE_TCHAR *errmsg = ACE_OS::dlerror ();
-
- if (errmsg != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT (": %s\n"),
- errmsg),
- 0);
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("\n")),
- 0);
- }
- }
- // Invoke the factory function and record it's return value.
- this->symbol_ = (*func) (gobbler);
-
- if (this->symbol_ == 0)
- {
- ace_yyerrno++;
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- this->function_name_),
- 0);
- }
- }
- return this->symbol_;
-}
-
-ACE_Function_Node::~ACE_Function_Node (void)
-{
- ACE_TRACE ("ACE_Function_Node::~ACE_Function_Node");
- delete[] ACE_const_cast (ACE_TCHAR *, function_name_);
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Dummy_Node)
-
-void
-ACE_Dummy_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Dummy_Node::dump");
-}
-
-ACE_Dummy_Node::ACE_Dummy_Node (const ACE_Static_Node *static_node,
- const ACE_Parse_Node *str_mods)
- : ACE_Parse_Node (static_node->name ()),
- node_ (static_node),
- mods_ (str_mods)
-{
- ACE_TRACE ("ACE_Dummy_Node::ACE_Dummy_Node");
-}
-
-void
-ACE_Dummy_Node::apply (void)
-{
- ACE_TRACE ("ACE_Dummy_Node::apply");
-
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("did operations on stream %s, error = %d\n"),
- this->name (),
- ace_yyerrno));
-}
-
-ACE_Dummy_Node::~ACE_Dummy_Node (void)
-{
- ACE_TRACE ("ACE_Dummy_Node::~ACE_Dummy_Node");
- ACE_Static_Node *n = ACE_const_cast (ACE_Static_Node *,
- this->node_);
- delete n;
- ACE_Parse_Node *m = ACE_const_cast (ACE_Parse_Node *,
- this->mods_);
- delete m;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Static_Function_Node)
-
-void
-ACE_Static_Function_Node::dump (void) const
-{
- ACE_TRACE ("ACE_Static_Function_Node::dump");
-}
-
-ACE_Static_Function_Node::ACE_Static_Function_Node (const ACE_TCHAR *func_name)
- : function_name_ (func_name ? ACE::strnew (func_name) : 0)
-{
- ACE_TRACE ("ACE_Static_Function_Node::ACE_Static_Function_Node");
- this->must_delete_ = 1;
-}
-
-void *
-ACE_Static_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler)
-{
- ACE_TRACE ("ACE_Static_Function_Node::symbol");
-
- void *(*func)(ACE_Service_Object_Exterminator *) = 0;
- this->symbol_ = 0;
-
- // Locate the factory function <function_name> in the statically
- // linked svcs.
-
- ACE_Static_Svc_Descriptor **ssdp = 0;
- ACE_STATIC_SVCS &svcs = *ACE_Service_Config::static_svcs ();
- ACE_TCHAR *function_name = ACE_const_cast (ACE_TCHAR *, this->function_name_);
-
- for (ACE_STATIC_SVCS_ITERATOR iter (svcs);
- iter.next (ssdp) != 0;
- iter.advance ())
- {
- ACE_Static_Svc_Descriptor *ssd = *ssdp;
- if (ACE_OS::strcmp (ssd->name_,
- function_name) == 0)
- func = (void *(*)(ACE_Service_Object_Exterminator*)) ssd->alloc_;
- }
-
- if (func == 0)
- {
- ace_yyerrno++;
-
- if (this->symbol_ == 0)
- {
- ace_yyerrno++;
-
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("no static service registered for function %s\n"),
- function_name),
- 0);
- }
- }
-
- // Invoke the factory function and record it's return value.
- this->symbol_ = (*func) (gobbler);
-
- if (this->symbol_ == 0)
- {
- ace_yyerrno++;
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- this->function_name_),
- 0);
- }
-
- return this->symbol_;
-}
-
-ACE_Static_Function_Node::~ACE_Static_Function_Node (void)
-{
- ACE_TRACE ("ACE_Static_Function_Node::~ACE_Static_Function_Node");
- delete[] ACE_const_cast (ACE_TCHAR *, this->function_name_);
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Parse_Node.h b/ace/Parse_Node.h
deleted file mode 100644
index 81678c46f40..00000000000
--- a/ace/Parse_Node.h
+++ /dev/null
@@ -1,301 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Parse_Node.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_PARSE_NODE_H
-#define ACE_PARSE_NODE_H
-#include "ace/pre.h"
-
-#include "ace/Service_Types.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Parse_Node
-{
- // = TITLE
- // Provide the base of the object hierarchy that defines the parse
- // tree of Service Nodes.
-public:
- ACE_Parse_Node (void);
- ACE_Parse_Node (const ACE_TCHAR *name);
- virtual ~ACE_Parse_Node (void);
-
- ACE_Parse_Node *link (void) const;
- void link (ACE_Parse_Node *);
- virtual void apply (void) = 0;
-
- const ACE_TCHAR *name (void) const;
- void print (void) const;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const ACE_TCHAR *name_;
- ACE_Parse_Node *next_;
-};
-
-class ACE_Export ACE_Suspend_Node : public ACE_Parse_Node
-{
- // = TITLE
- // Suspend a Service Node.
-public:
- ACE_Suspend_Node (const ACE_TCHAR *name);
- ~ACE_Suspend_Node (void);
-
- virtual void apply (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-class ACE_Export ACE_Resume_Node : public ACE_Parse_Node
-{
- // = TITLE
- // Resume a Service Node.
-public:
- ACE_Resume_Node (const ACE_TCHAR *name);
- ~ACE_Resume_Node (void);
-
- virtual void apply (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-class ACE_Export ACE_Remove_Node : public ACE_Parse_Node
-{
- // = TITLE
- // Remove a Service Node.
-public:
- ACE_Remove_Node (const ACE_TCHAR *name);
- ~ACE_Remove_Node (void);
-
- virtual void apply (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-class ACE_Export ACE_Static_Node : public ACE_Parse_Node
-{
- // = TITLE
- // Handle a statically linked node.
-public:
- ACE_Static_Node (const ACE_TCHAR *name, ACE_TCHAR *params = 0);
- virtual ~ACE_Static_Node (void);
-
- virtual void apply (void);
- virtual const ACE_Service_Type *record (void) const;
- ACE_TCHAR *parameters (void) const;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_TCHAR *parameters_;
- // "Command-line" parameters.
-};
-
-class ACE_Export ACE_Dynamic_Node : public ACE_Static_Node
-{
- // = TITLE
- // Handle a dynamically linked node.
-public:
- ACE_Dynamic_Node (const ACE_Service_Type *, ACE_TCHAR *params);
- virtual ~ACE_Dynamic_Node (void);
-
- virtual const ACE_Service_Type *record (void) const;
- virtual void apply (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const ACE_Service_Type *record_;
- // Pointer to a descriptor that describes this node.
-};
-
-class ACE_Export ACE_Stream_Node : public ACE_Parse_Node
-{
- // = TITLE
- // Handle a Stream.
-public:
- ACE_Stream_Node (const ACE_Static_Node *, const ACE_Parse_Node *);
- virtual ~ACE_Stream_Node (void);
-
- virtual void apply (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const ACE_Static_Node *node_;
- const ACE_Parse_Node *mods_;
- // Linked list of modules that are part of the stream.
-};
-
-class ACE_Export ACE_Location_Node
-{
- // = TITLE
- // Keep track of where a shared library is located.
-public:
- ACE_Location_Node (void);
- virtual void *symbol (ACE_Service_Object_Exterminator * = 0) = 0;
- virtual void set_symbol (void *h);
- ACE_SHLIB_HANDLE handle (void) const;
- void handle (const ACE_SHLIB_HANDLE h);
- const ACE_TCHAR *pathname (void) const;
- void pathname (const ACE_TCHAR *h);
- int dispose (void) const;
-
- virtual ~ACE_Location_Node (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_SHLIB_HANDLE open_handle (void);
-
- const ACE_TCHAR *pathname_;
- // Pathname to the shared library we are working on.
-
- int must_delete_;
- // Flag indicating whether the Service_Object generated by this
- // Location Node should be deleted or not
- // (ACE_Service_Type::DELETE_OBJ.)
-
- ACE_SHLIB_HANDLE handle_;
- // Handle to the open shared library.
-
- void *symbol_;
- // Symbol that we've obtained from the shared library.
-};
-
-class ACE_Export ACE_Object_Node : public ACE_Location_Node
-{
- // = TITLE
- // Keeps track of the symbol name for a shared object.
-public:
- ACE_Object_Node (const ACE_TCHAR *pathname, const ACE_TCHAR *obj_name);
- virtual void *symbol (ACE_Service_Object_Exterminator * = 0);
- virtual ~ACE_Object_Node (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const ACE_TCHAR *object_name_;
- // Name of the object that we're parsing.
-};
-
-class ACE_Export ACE_Function_Node : public ACE_Location_Node
-{
- // = TITLE
- // Keeps track of the symbol name of for a shared function.
-public:
- ACE_Function_Node (const ACE_TCHAR *pathname, const ACE_TCHAR *func_name);
- virtual void *symbol (ACE_Service_Object_Exterminator *gobbler = 0);
- virtual ~ACE_Function_Node (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const ACE_TCHAR *function_name_;
- // Name of the function that we're parsing.
-};
-
-class ACE_Export ACE_Dummy_Node : public ACE_Parse_Node
-{
- // = TITLE
- // I forget why this is here... ;-)
-public:
- ACE_Dummy_Node (const ACE_Static_Node *, const ACE_Parse_Node *);
- ~ACE_Dummy_Node (void);
- virtual void apply (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const ACE_Static_Node *node_;
- const ACE_Parse_Node *mods_;
- // Linked list of modules that we're dealing with.
-};
-
-class ACE_Export ACE_Static_Function_Node : public ACE_Location_Node
-{
- // = TITLE
- // Keeps track of the symbol name for a function that is not
- // linked in from a DLL, but is statically linked with the
- // application.
-public:
- ACE_Static_Function_Node (const ACE_TCHAR *func_name);
- virtual void *symbol (ACE_Service_Object_Exterminator * = 0);
- virtual ~ACE_Static_Function_Node (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const ACE_TCHAR *function_name_;
- // Name of the function that we're parsing.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Parse_Node.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_PARSE_NODE_H */
diff --git a/ace/Parse_Node.i b/ace/Parse_Node.i
deleted file mode 100644
index 0728118ea80..00000000000
--- a/ace/Parse_Node.i
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Parse_Node.i
-
-ACE_INLINE
-ACE_Suspend_Node::~ACE_Suspend_Node (void)
-{
-}
-
-ACE_INLINE
-ACE_Resume_Node::~ACE_Resume_Node (void)
-{
-}
-
-ACE_INLINE
-ACE_Remove_Node::~ACE_Remove_Node (void)
-{
-}
diff --git a/ace/Pipe.cpp b/ace/Pipe.cpp
deleted file mode 100644
index e26d93f8706..00000000000
--- a/ace/Pipe.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-// $Id$
-
-#include "ace/SOCK_Acceptor.h"
-#include "ace/SOCK_Connector.h"
-#include "ace/Pipe.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/Pipe.i"
-#endif
-
-ACE_RCSID(ace, Pipe, "$Id$")
-
-void
-ACE_Pipe::dump (void) const
-{
- ACE_TRACE ("ACE_Pipe::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("handles_[0] = %d"), this->handles_[0]));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhandles_[1] = %d"), this->handles_[1]));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-int
-ACE_Pipe::open (int buffer_size)
-{
- ACE_TRACE ("ACE_Pipe::open");
-
-#if defined (ACE_WIN32) || defined (ACE_LACKS_SOCKETPAIR) || defined (__Lynx__)
- ACE_INET_Addr my_addr;
- ACE_SOCK_Acceptor acceptor;
- ACE_SOCK_Connector connector;
- ACE_SOCK_Stream reader;
- ACE_SOCK_Stream writer;
- int result = 0;
-
- // Bind listener to any port and then find out what the port was.
- if (acceptor.open (ACE_Addr::sap_any) == -1
- || acceptor.get_local_addr (my_addr) == -1)
- result = -1;
- else
- {
- ACE_INET_Addr sv_addr (my_addr.get_port_number (),
- ACE_LOCALHOST);
-
- // Establish a connection within the same process.
- if (connector.connect (writer, sv_addr) == -1)
- result = -1;
- else if (acceptor.accept (reader) == -1)
- {
- writer.close ();
- result = -1;
- }
- }
-
- // Close down the acceptor endpoint since we don't need it anymore.
- acceptor.close ();
- if (result == -1)
- return -1;
-
- this->handles_[0] = reader.get_handle ();
- this->handles_[1] = writer.get_handle ();
-
-# if !defined (ACE_LACKS_TCP_NODELAY)
- int one = 1;
-
- // Make sure that the TCP stack doesn't try to buffer small writes.
- // Since this communication is purely local to the host it doesn't
- // affect network performance.
-
- if (writer.set_option (ACE_IPPROTO_TCP,
- TCP_NODELAY,
- &one,
- sizeof one) == -1)
- {
- this->close ();
- return -1;
- }
-# endif /* ! ACE_LACKS_TCP_NODELAY */
-
-# if defined (ACE_LACKS_SOCKET_BUFSIZ)
- ACE_UNUSED_ARG (buffer_size);
-# else /* ! ACE_LACKS_SOCKET_BUFSIZ */
- if (reader.set_option (SOL_SOCKET,
- SO_SNDBUF,
- ACE_reinterpret_cast (void *, &buffer_size),
- sizeof (buffer_size)) == -1
- && errno != ENOTSUP)
- {
- this->close ();
- return -1;
- }
- else if (writer.set_option (SOL_SOCKET,
- SO_RCVBUF,
- ACE_reinterpret_cast (void *, &buffer_size),
- sizeof (buffer_size)) == -1
- && errno != ENOTSUP)
- {
- this->close ();
- return -1;
- }
-# endif /* ! ACE_LACKS_SOCKET_BUFSIZ */
-
-#elif defined (ACE_HAS_STREAM_PIPES)
- ACE_UNUSED_ARG (buffer_size);
- if (ACE_OS::pipe (this->handles_) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("pipe")),
- -1);
- int arg = RMSGN;
-
- // Enable "msg no discard" mode, which ensures that record
- // boundaries are maintained when messages are sent and received.
- if (ACE_OS::ioctl (this->handles_[0],
- I_SRDOPT,
- (void *) arg) == -1
- || ACE_OS::ioctl (this->handles_[1],
- I_SRDOPT,
- (void *) arg) == -1)
- {
- this->close ();
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ioctl")), -1);
- }
-#else /* ! ACE_WIN32 && ! ACE_LACKS_SOCKETPAIR && ! ACE_HAS_STREAM_PIPES */
- if (ACE_OS::socketpair (AF_UNIX,
- SOCK_STREAM,
- 0,
- this->handles_) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("socketpair")),
- -1);
-# if defined (ACE_LACKS_SOCKET_BUFSIZ)
- ACE_UNUSED_ARG (buffer_size);
-# else /* ! ACE_LACKS_SOCKET_BUFSIZ */
- if (ACE_OS::setsockopt (this->handles_[0],
- SOL_SOCKET,
- SO_RCVBUF,
- ACE_reinterpret_cast (const char *,
- &buffer_size),
- sizeof (buffer_size)) == -1
- && errno != ENOTSUP)
- {
- this->close ();
- return -1;
- }
- if (ACE_OS::setsockopt (this->handles_[1],
- SOL_SOCKET,
- SO_SNDBUF,
- ACE_reinterpret_cast (const char *, &buffer_size),
- sizeof (buffer_size)) == -1
- && errno != ENOTSUP)
- {
- this->close ();
- return -1;
- }
-# endif /* ! ACE_LACKS_SOCKET_BUFSIZ */
-#endif /* ! ACE_WIN32 && ! ACE_LACKS_SOCKETPAIR && ! ACE_HAS_STREAM_PIPES */
- // Point both the read and write HANDLES to the appropriate socket
- // HANDLEs.
-
- return 0;
-}
-
-int
-ACE_Pipe::open (ACE_HANDLE handles[2])
-{
- ACE_TRACE ("ACE_Pipe::open");
-
- if (this->open () == -1)
- return -1;
- else
- {
- handles[0] = this->handles_[0];
- handles[1] = this->handles_[1];
- return 0;
- }
-}
-
-// Do nothing...
-
-ACE_Pipe::ACE_Pipe (void)
-{
- ACE_TRACE ("ACE_Pipe::ACE_Pipe");
-
- this->handles_[0] = ACE_INVALID_HANDLE;
- this->handles_[1] = ACE_INVALID_HANDLE;
-}
-
-ACE_Pipe::ACE_Pipe (ACE_HANDLE handles[2])
-{
- ACE_TRACE ("ACE_Pipe::ACE_Pipe");
-
- if (this->open (handles) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_Pipe::ACE_Pipe")));
-}
-
-ACE_Pipe::ACE_Pipe (ACE_HANDLE read,
- ACE_HANDLE write)
-{
- ACE_TRACE ("ACE_Pipe::ACE_Pipe");
- this->handles_[0] = read;
- this->handles_[1] = write;
-}
-
-int
-ACE_Pipe::close (void)
-{
- ACE_TRACE ("ACE_Pipe::close");
-
- int result = 0;
-
- // Note that the following will work even if we aren't closing down
- // sockets because <ACE_OS::closesocket> will just call <::close> in
- // that case!
-
- if (this->handles_[0] != ACE_INVALID_HANDLE)
- result = ACE_OS::closesocket (this->handles_[0]);
- this->handles_[0] = ACE_INVALID_HANDLE;
-
- if (this->handles_[1] != ACE_INVALID_HANDLE)
- result |= ACE_OS::closesocket (this->handles_[1]);
- this->handles_[1] = ACE_INVALID_HANDLE;
-
- return result;
-}
diff --git a/ace/Pipe.h b/ace/Pipe.h
deleted file mode 100644
index 7fe3a772d04..00000000000
--- a/ace/Pipe.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Pipe.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_PIPE_H
-#define ACE_PIPE_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Pipe
-{
- // = TITLE
- // Provides a bidirectional "pipe" abstraction that is portable
- // to Windows NT, SVR4 UNIX, and BSD UNIX.
- //
- // = DESCRIPTION
- // Uses "name" for lookup in the ACE service repository. Obtains
- // the object and returns it as the appropriate type.
-public:
- // = Initialization and termination.
- ACE_Pipe (void);
- // Default constructor (does nothing...).
-
- ACE_Pipe (ACE_HANDLE handles[2]);
- // Open the pipe and initialize the handles.
-
- ACE_Pipe (ACE_HANDLE read, ACE_HANDLE write);
- // Initialize the <ACE_Pipe> from the <read> and <write> handles.
-
- ~ACE_Pipe (void);
- // Default dtor. It doesn't close the handles for you.
-
- int open (ACE_HANDLE handles[2]);
- // Open the pipe and initialize the handles.
-
- int open (int buffer_size = ACE_DEFAULT_MAX_SOCKET_BUFSIZ);
- // Open the pipe, setting the buffer size to the maximum.
-
- int close (void);
- // Close down the pipe HANDLEs;
-
- // = Accessors.
-
- ACE_HANDLE read_handle (void) const;
- // This is the "read" side of the pipe. Note, however, that
- // processes can also write to this handle as well since pipes are
- // bi-directional.
-
- ACE_HANDLE write_handle (void) const;
- // This is the "write" side of the pipe. Note, however, that
- // processes can also read to this handle as well since pipes are
- // bi-directional.
-
- void dump (void) const;
- // Dump the state of the object.
-
-private:
- ACE_HANDLE handles_[2];
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/Pipe.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_PIPE_H */
diff --git a/ace/Pipe.i b/ace/Pipe.i
deleted file mode 100644
index 0eb87370827..00000000000
--- a/ace/Pipe.i
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Pipe.i
-
-ASYS_INLINE
-ACE_Pipe::~ACE_Pipe (void)
-{
- ACE_TRACE ("ACE_Pipe::~ACE_Pipe");
- // Notice that the destructor doesn't close the handles for you.
-}
-
-ASYS_INLINE ACE_HANDLE
-ACE_Pipe::read_handle (void) const
-{
- ACE_TRACE ("ACE_Pipe::read_handle");
- return this->handles_[0];
-}
-
-ASYS_INLINE ACE_HANDLE
-ACE_Pipe::write_handle (void) const
-{
- ACE_TRACE ("ACE_Pipe::write_handle");
- return this->handles_[1];
-}
diff --git a/ace/Priority_Reactor.cpp b/ace/Priority_Reactor.cpp
deleted file mode 100644
index dd6da51fb3e..00000000000
--- a/ace/Priority_Reactor.cpp
+++ /dev/null
@@ -1,171 +0,0 @@
-// $Id$
-
-#include "ace/Priority_Reactor.h"
-#include "ace/Malloc_T.h"
-
-ACE_RCSID(ace, Priority_Reactor, "$Id$")
-
-typedef ACE_Unbounded_Queue_Iterator<ACE_Event_Tuple> QUEUE_ITERATOR;
-// Its iterator.
-
-typedef ACE_Cached_Allocator<ACE_Node<ACE_Event_Tuple>, ACE_SYNCH_NULL_MUTEX> TUPLE_ALLOCATOR;
-// Defines the memory allocator used, no need for locking because it
-// is only used in one thread of control.
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Priority_Reactor)
-
-// Initialize ACE_Select_Reactor.
-
-const int npriorities =
- ACE_Event_Handler::HI_PRIORITY - ACE_Event_Handler::LO_PRIORITY + 1;
-
-ACE_INLINE void
-ACE_Priority_Reactor::init_bucket (void)
-{
- // Allocate enough space for all the handles.
- // TODO: This can be wrong, maybe we should use other kind of
- // allocator here?
- ACE_NEW (this->tuple_allocator_,
- TUPLE_ALLOCATOR (ACE_Select_Reactor::DEFAULT_SIZE));
-
- // The event handlers are assigned to a new As the Event
- ACE_NEW (this->bucket_,
- QUEUE *[npriorities]);
-
- // This loops "ensures" exception safety.
- for (int i = 0; i < npriorities; ++i)
- ACE_NEW (this->bucket_[i],
- QUEUE (this->tuple_allocator_));
-}
-
-ACE_Priority_Reactor::ACE_Priority_Reactor (ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq)
- : ACE_Select_Reactor(sh, tq),
- bucket_ (0),
- tuple_allocator_ (0)
-{
- ACE_TRACE ("ACE_Priority_Reactor::ACE_Priority_Reactor");
- this->init_bucket ();
-}
-
-ACE_Priority_Reactor::ACE_Priority_Reactor (size_t size,
- int rs,
- ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq)
- : ACE_Select_Reactor (size, rs, sh, tq),
- bucket_ (0),
- tuple_allocator_ (0)
-{
- ACE_TRACE ("ACE_Priority_Reactor::ACE_Priority_Reactor");
- this->init_bucket ();
-}
-
-ACE_Priority_Reactor::~ACE_Priority_Reactor (void)
-{
- ACE_TRACE ("ACE_Priority_Reactor::~ACE_Priority_Reactor");
-
- for (int i = 0; i < npriorities; ++i)
- delete this->bucket_[i];
-
- delete[] this->bucket_;
- delete tuple_allocator_;
-}
-
-int
-ACE_Priority_Reactor::dispatch_io_set (int number_of_active_handles,
- int& number_dispatched,
- int mask,
- ACE_Handle_Set& dispatch_mask,
- ACE_Handle_Set& ready_mask,
- ACE_EH_PTMF callback)
-{
- ACE_TRACE ("ACE_Priority_Reactor::dispatch_io_set");
-
- if (number_of_active_handles == 0)
- return 0;
-
- // The range for which there exists any Event_Tuple is computed on
- // the ordering loop, minimizing iterations on the dispatching loop.
- int min_priority = ACE_Event_Handler::HI_PRIORITY;
- int max_priority = ACE_Event_Handler::LO_PRIORITY;
-
- ACE_Handle_Set_Iterator handle_iter (dispatch_mask);
-
- for (ACE_HANDLE handle;
- (handle = handle_iter ()) != ACE_INVALID_HANDLE;
- )
- {
- ACE_Event_Tuple et (this->handler_rep_.find (handle),
- handle);
- int prio = et.event_handler_->priority ();
-
- // If the priority is out of range assign the minimum priority.
- if (prio < ACE_Event_Handler::LO_PRIORITY
- || prio > ACE_Event_Handler::HI_PRIORITY)
- prio = ACE_Event_Handler::LO_PRIORITY;
-
- bucket_[prio]->enqueue_tail (et);
-
- // Update the priority ranges....
- if (min_priority > prio)
- min_priority = prio;
- if (max_priority < prio)
- max_priority = prio;
- }
-
- for (int i = max_priority; i >= min_priority; --i)
- {
- // Remove all the entries from the wrappers
- while (!bucket_[i]->is_empty ()
- && number_dispatched < number_of_active_handles
- && this->state_changed_ == 0)
- {
- ACE_Event_Tuple et;
- bucket_[i]->dequeue_head (et);
- this->notify_handle (et.handle_,
- mask,
- ready_mask,
- et.event_handler_,
- callback);
- number_dispatched++;
- }
- // Even if we are aborting the loop due to this->state_changed
- // or another error we still want to cleanup the buckets.
- bucket_[i]->reset ();
- }
-
- if (number_dispatched > 0 && this->state_changed_)
- return -1;
-
- return 0;
-}
-
-void
-ACE_Priority_Reactor::dump (void) const
-{
- ACE_TRACE ("ACE_Priority_Reactor::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_Select_Reactor::dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Unbounded_Queue<ACE_Event_Tuple>;
-template class ACE_Unbounded_Queue_Iterator<ACE_Event_Tuple>;
-template class ACE_Node<ACE_Event_Tuple>;
-template class ACE_Cached_Allocator<ACE_Node<ACE_Event_Tuple>, ACE_SYNCH_NULL_MUTEX>;
-template class ACE_Locked_Free_List<ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> >,ACE_SYNCH_NULL_MUTEX>;
-template class ACE_Free_List<ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> > >;
-template class ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> >;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Unbounded_Queue<ACE_Event_Tuple>
-#pragma instantiate ACE_Unbounded_Queue_Iterator<ACE_Event_Tuple>
-#pragma instantiate ACE_Node<ACE_Event_Tuple>
-#pragma instantiate ACE_Cached_Allocator<ACE_Node<ACE_Event_Tuple>, ACE_SYNCH_NULL_MUTEX>
-#pragma instantiate ACE_Locked_Free_List<ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> >,ACE_SYNCH_NULL_MUTEX>
-#pragma instantiate ACE_Free_List<ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> > >
-#pragma instantiate ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> >
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Priority_Reactor.h b/ace/Priority_Reactor.h
deleted file mode 100644
index ed059d70da7..00000000000
--- a/ace/Priority_Reactor.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Priority_Reactor.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_PRIORITY_REACTOR_H
-#define ACE_PRIORITY_REACTOR_H
-#include "ace/pre.h"
-
-#include "ace/Containers.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Select_Reactor.h"
-
-class ACE_Export ACE_Priority_Reactor : public ACE_Select_Reactor
-{
- // = TITLE
- // Implements priority based dispatching.
- //
- // = DESCRIPTION
- // This class refines the dispatching mechanism for the
- // Select_Reactor by taking advantage of the priority method on
- // ACE_Event_Handler.
-public:
- // = Initialization and termination methods.
-
- ACE_Priority_Reactor (ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0);
- // Initialize <ACE_Priority_Reactor> with the default size.
-
- ACE_Priority_Reactor (size_t size,
- int restart = 0,
- ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0);
- // Initialize <ACE_Priority_Reactor> with size <size>.
-
- virtual ~ACE_Priority_Reactor (void);
- // Close down the select_reactor and release all of its resources.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Dispatching methods.
-
- virtual int dispatch_io_set (int number_of_active_handles,
- int &number_dispatched,
- int mask,
- ACE_Handle_Set &dispatch_mask,
- ACE_Handle_Set &ready_mask,
- ACE_EH_PTMF callback);
- // We simply override this function to implement the priority
- // dispatching.
-
-private:
- void init_bucket (void);
- // A small helper to initialize the bucket.
-
- typedef ACE_Unbounded_Queue<ACE_Event_Tuple> QUEUE;
- QUEUE** bucket_;
- // There is a queue per-priority, which simply holds the
- // Event_Handlers until we knwo who goes first.
-
- ACE_Allocator* tuple_allocator_;
- // The queues themselves use this allocator to minimize dynamic
- // memory usage.
-
- ACE_Priority_Reactor (const ACE_Select_Reactor &);
- ACE_Priority_Reactor &operator = (const ACE_Select_Reactor &);
- // Deny access since member-wise won't work...
-};
-
-#include "ace/post.h"
-#endif /* ACE_PRIORITY_REACTOR_H */
diff --git a/ace/Proactor.cpp b/ace/Proactor.cpp
deleted file mode 100644
index d5b5b2642c1..00000000000
--- a/ace/Proactor.cpp
+++ /dev/null
@@ -1,1037 +0,0 @@
-// $Id$
-
-#include "ace/Proactor.h"
-#include "ace/Proactor_Impl.h"
-#include "ace/Object_Manager.h"
-#include "ace/Task_T.h"
-
-ACE_RCSID(ace, Proactor, "$Id$")
-
-#if ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
-// This only works on Win32 platforms and on Unix platforms with aio
-// calls.
-#include "ace/Task_T.h"
-#include "ace/Log_Msg.h"
-
-#if defined (ACE_HAS_AIO_CALLS)
-# include "ace/POSIX_Proactor.h"
-#else /* !ACE_HAS_AIO_CALLS */
-# include "ace/WIN32_Proactor.h"
-#endif /* ACE_HAS_AIO_CALLS */
-
-// Process-wide ACE_Proactor.
-ACE_Proactor *ACE_Proactor::proactor_ = 0;
-
-// Controls whether the Proactor is deleted when we shut down (we can
-// only delete it safely if we created it!)
-int ACE_Proactor::delete_proactor_ = 0;
-
-// Terminate the eventloop.
-sig_atomic_t ACE_Proactor::end_event_loop_ = 0;
-
-// Number of threads in the event loop.
-sig_atomic_t ACE_Proactor::event_loop_thread_count_ = 0;
-
-class ACE_Export ACE_Proactor_Timer_Handler : public ACE_Task <ACE_NULL_SYNCH>
-{
- // = TITLE
- // A Handler for timer. It helps in the management of timers
- // registered with the Proactor.
- //
- // = DESCRIPTION
- // This object has a thread that will wait on the earliest time
- // in a list of timers and an event. When a timer expires, the
- // thread will post a completion event on the port and go back
- // to waiting on the timer queue and event. If the event is
- // signaled, the thread will refresh the time it is currently
- // waiting on (in case the earliest time has changed).
-
- friend class ACE_Proactor;
- // Proactor has special privileges
- // Access needed to: timer_event_
-
-public:
- ACE_Proactor_Timer_Handler (ACE_Proactor &proactor);
- // Constructor.
-
- virtual ~ACE_Proactor_Timer_Handler (void);
- // Destructor.
-
- int destroy (void);
- // Proactor calls this to shut down the timer handler
- // gracefully. Just calling the destructor alone doesnt do what
- // <destroy> does. <destroy> make sure the thread exits properly.
-
-protected:
- virtual int svc (void);
- // Run by a daemon thread to handle deferred processing. In other
- // words, this method will do the waiting on the earliest timer and
- // event.
-
- ACE_Auto_Event timer_event_;
- // Event to wait on.
-
- ACE_Proactor &proactor_;
- // Proactor.
-
- int shutting_down_;
- // Flag used to indicate when we are shutting down.
-};
-
-ACE_Proactor_Timer_Handler::ACE_Proactor_Timer_Handler (ACE_Proactor &proactor)
- : ACE_Task <ACE_NULL_SYNCH> (&proactor.thr_mgr_),
- proactor_ (proactor),
- shutting_down_ (0)
-{
-}
-
-ACE_Proactor_Timer_Handler::~ACE_Proactor_Timer_Handler (void)
-{
- // Mark for closing down.
- this->shutting_down_ = 1;
-
- // Signal timer event.
- this->timer_event_.signal ();
-
- // Wait for the Timer Handler thread to exit.
- this->thr_mgr ()->wait ();
-}
-
-int
-ACE_Proactor_Timer_Handler::svc (void)
-{
- ACE_Time_Value absolute_time;
- int empty_flag = 0;
- int result = 0;
-
- while (this->shutting_down_ == 0)
- {
- // Is the timer queue empty?
- empty_flag = this->proactor_.timer_queue ()->is_empty ();
-
- if (!empty_flag)
- {
- // Get the earliest absolute time.
- absolute_time = this->proactor_.timer_queue ()->earliest_time ();
-
- // Block for absolute time.
- result = this->timer_event_.wait (&absolute_time);
- }
- else
- {
- // Wait for ever.
- result = this->timer_event_.wait ();
- }
-
- // Check for timer expiries.
- if (result == -1)
- {
- switch (errno)
- {
- case ETIME:
- // timeout: expire timers
- this->proactor_.timer_queue ()->expire ();
- break;
- default:
- // Error.
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
- ACE_TEXT ("ACE_Proactor_Timer_Handler::svc:wait failed")),
- -1);
- }
- }
- }
- return 0;
-}
-
-// *********************************************************************
-
-ACE_Proactor_Handle_Timeout_Upcall::ACE_Proactor_Handle_Timeout_Upcall (void)
- : proactor_ (0)
-{
-}
-
-int
-ACE_Proactor_Handle_Timeout_Upcall::timeout (TIMER_QUEUE &timer_queue,
- ACE_Handler *handler,
- const void *act,
- const ACE_Time_Value &time)
-{
- ACE_UNUSED_ARG (timer_queue);
-
- if (this->proactor_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%t) No Proactor set in ACE_Proactor_Handle_Timeout_Upcall,")
- ACE_TEXT (" no completion port to post timeout to?!@\n")),
- -1);
-
- // Create the Asynch_Timer.
- ACE_Asynch_Result_Impl *asynch_timer = this->proactor_->create_asynch_timer (*handler,
- act,
- time,
- ACE_INVALID_HANDLE,
- 0,
- -1);
- if (asynch_timer == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
- ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall::timeout:")
- ACE_TEXT ("create_asynch_timer failed")),
- -1);
-
- // Post a completion.
- if (asynch_timer->post_completion (this->proactor_->implementation ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Failure in dealing with timers: ")
- ACE_TEXT ("PostQueuedCompletionStatus failed\n")),
- -1);
- return 0;
-}
-
-int
-ACE_Proactor_Handle_Timeout_Upcall::cancellation (TIMER_QUEUE &timer_queue,
- ACE_Handler *handler)
-{
- ACE_UNUSED_ARG (timer_queue);
- ACE_UNUSED_ARG (handler);
-
- // Do nothing
- return 0;
-}
-
-int
-ACE_Proactor_Handle_Timeout_Upcall::deletion (TIMER_QUEUE &timer_queue,
- ACE_Handler *handler,
- const void *arg)
-{
- ACE_UNUSED_ARG (timer_queue);
- ACE_UNUSED_ARG (handler);
- ACE_UNUSED_ARG (arg);
-
- // Do nothing
- return 0;
-}
-
-int
-ACE_Proactor_Handle_Timeout_Upcall::proactor (ACE_Proactor &proactor)
-{
- if (this->proactor_ == 0)
- {
- this->proactor_ = &proactor;
- return 0;
- }
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall is only suppose")
- ACE_TEXT (" to be used with ONE (and only one) Proactor\n")),
- -1);
-}
-
-// *********************************************************************
-
-ACE_Proactor::ACE_Proactor (ACE_Proactor_Impl *implementation,
- int delete_implementation,
- TIMER_QUEUE *tq)
- : implementation_ (0),
- delete_implementation_ (delete_implementation),
- timer_handler_ (0),
- timer_queue_ (0),
- delete_timer_queue_ (0)
-{
- this->implementation (implementation);
-
- if (this->implementation () == 0)
- {
-#if defined (ACE_HAS_AIO_CALLS)
- // POSIX Proactor.
- #if defined (ACE_POSIX_AIOCB_PROACTOR)
- ACE_NEW (implementation,
- ACE_POSIX_AIOCB_Proactor);
- #elif defined (ACE_POSIX_SIG_PROACTOR)
- ACE_NEW (implementation,
- ACE_POSIX_SIG_Proactor);
- #else /* Default is to use the SIG one */
- ACE_NEW (implementation,
- ACE_POSIX_SIG_Proactor);
- #endif
-#elif (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
- // WIN_Proactor.
- ACE_NEW (implementation,
- ACE_WIN32_Proactor);
-#endif /* ACE_HAS_AIO_CALLS */
- this->implementation (implementation);
- this->delete_implementation_ = 1;
- }
-
- // Set the timer queue.
- this->timer_queue (tq);
-
- // Create the timer handler
- ACE_NEW (this->timer_handler_,
- ACE_Proactor_Timer_Handler (*this));
-
- // Activate <timer_handler>.
- if (this->timer_handler_->activate (THR_NEW_LWP | THR_DETACHED) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
- ACE_TEXT ("Task::activate:could not create thread\n")));
-}
-
-ACE_Proactor::~ACE_Proactor (void)
-{
- this->close ();
-}
-
-ACE_Proactor *
-ACE_Proactor::instance (size_t /* threads */)
-{
- ACE_TRACE ("ACE_Proactor::instance");
-
- if (ACE_Proactor::proactor_ == 0)
- {
- // Perform Double-Checked Locking Optimization.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (),
- 0));
-
- if (ACE_Proactor::proactor_ == 0)
- {
- ACE_NEW_RETURN (ACE_Proactor::proactor_,
- ACE_Proactor,
- 0);
- ACE_Proactor::delete_proactor_ = 1;
- }
- }
- return ACE_Proactor::proactor_;
-}
-
-ACE_Proactor *
-ACE_Proactor::instance (ACE_Proactor *r)
-{
- ACE_TRACE ("ACE_Proactor::instance");
-
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
-
- ACE_Proactor *t = ACE_Proactor::proactor_;
-
- // We can't safely delete it since we don't know who created it!
- ACE_Proactor::delete_proactor_ = 0;
-
- ACE_Proactor::proactor_ = r;
- return t;
-}
-
-void
-ACE_Proactor::close_singleton (void)
-{
- ACE_TRACE ("ACE_Proactor::close_singleton");
-
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance ()));
-
- if (ACE_Proactor::delete_proactor_)
- {
- delete ACE_Proactor::proactor_;
- ACE_Proactor::proactor_ = 0;
- ACE_Proactor::delete_proactor_ = 0;
- }
-}
-
-int
-ACE_Proactor::run_event_loop (void)
-{
- int result = 0;
-
- // Declaring the lock variable.
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_PROACTOR_EVENT_LOOP_LOCK);
-#endif /* ACE_MT_SAFE */
-
- // Early check. It is ok to do this without lock, since we care just
- // whether it is zero or non-zero.
- if (ACE_Proactor::end_event_loop_ != 0)
- return 0;
-
- // First time you are in. Increment the thread count.
- {
- // Obtain the lock in the MT environments.
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *lock, -1);
-#endif /* ACE_MT_SAFE */
-
- // Increment the thread count.
- ACE_Proactor::event_loop_thread_count_ ++;
- }
-
- // Run the event loop.
- while (1)
- {
- // Check the end loop flag. It is ok to do this without lock,
- // since we care just whether it is zero or non-zero.
- if (ACE_Proactor::end_event_loop_ != 0)
- break;
-
- // <end_event_loop> is not set. Ready to do <handle_events>.
- result = ACE_Proactor::instance ()->handle_events ();
-
- if (ACE_Service_Config::reconfig_occurred ())
- ACE_Service_Config::reconfigure ();
-
- else if (result == -1)
- break;
- }
-
- // Leaving the event loop. Decrement the thread count.
-
- // Obtain the lock in the MT environments.
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *lock, -1);
-#endif /* ACE_MT_SAFE */
-
- // Decrement the thread count.
- ACE_Proactor::event_loop_thread_count_ --;
-
- return result;
-}
-
-// Handle events for -tv- time. handle_events updates -tv- to reflect
-// time elapsed, so do not return until -tv- == 0, or an error occurs.
-int
-ACE_Proactor::run_event_loop (ACE_Time_Value &tv)
-{
- ACE_TRACE ("ACE_Proactor::run_event_loop");
-
- int result = 0;
-
- // Declaring the lock variable.
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_PROACTOR_EVENT_LOOP_LOCK);
-#endif /* ACE_MT_SAFE */
-
- // Early check. It is ok to do this without lock, since we care just
- // whether it is zero or non-zero.
- if (ACE_Proactor::end_event_loop_ != 0 ||
- tv == ACE_Time_Value::zero)
- return 0;
-
- // First time you are in. Increment the thread count.
- {
- // Obtain the lock in the MT environments.
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *lock, -1);
-#endif /* ACE_MT_SAFE */
-
- // Increment the thread count.
- ACE_Proactor::event_loop_thread_count_ ++;
- }
-
- // Run the event loop.
- while (1)
- {
- // Check for end of loop. It is ok to do this without lock,
- // since we care just whether it is zero or non-zero.
- if (ACE_Proactor::end_event_loop_ != 0 ||
- tv == ACE_Time_Value::zero)
- break;
-
- // <end_event_loop> is not set. Ready to do <handle_events>.
- result = ACE_Proactor::instance ()->handle_events (tv);
-
- if (ACE_Service_Config::reconfig_occurred ())
- ACE_Service_Config::reconfigure ();
-
- // An error has occurred.
- else if (result == -1)
- break;
- }
-
- // Leaving the event loop. Decrement the thread count.
-
- // Obtain the lock in the MT environments.
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *lock, -1);
-#endif /* ACE_MT_SAFE */
-
- // Decrement the thread count.
- ACE_Proactor::event_loop_thread_count_ --;
-
- return result;
-}
-
-int
-ACE_Proactor::end_event_loop (void)
-{
- ACE_TRACE ("ACE_Proactor::end_event_loop");
-
- // Obtain the lock, set the end flag and post the wakeup
- // completions.
-
- // Obtain the lock in the MT environments.
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_PROACTOR_EVENT_LOOP_LOCK);
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *lock, -1);
-#endif /* ACE_MT_SAFE */
-
- // Set the end flag.
- ACE_Proactor::end_event_loop_ = 1;
-
- // Number of completions to post.
- int how_many = ACE_Proactor::event_loop_thread_count_;
-
- // Reset the thread count.
- ACE_Proactor::event_loop_thread_count_ = 0;
-
- // Post completions to all the threads so that they will all wake
- // up.
- return ACE_Proactor::post_wakeup_completions (how_many);
-}
-
-int
-ACE_Proactor::event_loop_done (void)
-{
- ACE_TRACE ("ACE_Proactor::event_loop_done");
- return ACE_Proactor::end_event_loop_ != 0;
-}
-
-int
-ACE_Proactor::close (void)
-{
- // Close the implementation.
- if (this->implementation ()->close () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
- ACE_TEXT ("ACE_Proactor::close:implementation couldnt be closed")),
- -1);
-
- // Delete the implementation.
- if (this->delete_implementation_)
- {
- delete this->implementation ();
- this->implementation_ = 0;
- }
-
- // Delete the timer handler.
- if (this->timer_handler_)
- {
- delete this->timer_handler_;
- this->timer_handler_ = 0;
- }
-
- // Delete the timer queue.
- if (this->delete_timer_queue_)
- {
- delete this->timer_queue_;
- this->timer_queue_ = 0;
- this->delete_timer_queue_ = 0;
- }
-
- return 0;
-}
-
-int
-ACE_Proactor::register_handle (ACE_HANDLE handle,
- const void *completion_key)
-{
- return this->implementation ()->register_handle (handle,
- completion_key);
-}
-
-long
-ACE_Proactor::schedule_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &time)
-{
- return this->schedule_timer (handler,
- act,
- time,
- ACE_Time_Value::zero);
-}
-
-long
-ACE_Proactor::schedule_repeating_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &interval)
-{
- return this->schedule_timer (handler,
- act,
- interval,
- interval);
-}
-
-long
-ACE_Proactor::schedule_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &time,
- const ACE_Time_Value &interval)
-{
- // absolute time.
- ACE_Time_Value absolute_time =
- this->timer_queue_->gettimeofday () + time;
-
- // Only one guy goes in here at a time
- ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX,
- ace_mon,
- this->timer_queue_->mutex (),
- -1);
-
- // Schedule the timer
- long result = this->timer_queue_->schedule (&handler,
- act,
- absolute_time,
- interval);
- if (result != -1)
- {
- // no failures: check to see if we are the earliest time
- if (this->timer_queue_->earliest_time () == absolute_time)
-
- // wake up the timer thread
- if (this->timer_handler_->timer_event_.signal () == -1)
- {
- // Cancel timer
- this->timer_queue_->cancel (result);
- result = -1;
- }
- }
- return result;
-}
-
-int
-ACE_Proactor::cancel_timer (long timer_id,
- const void **arg,
- int dont_call_handle_close)
-{
- // No need to singal timer event here. Even if the cancel timer was
- // the earliest, we will have an extra wakeup.
- return this->timer_queue_->cancel (timer_id,
- arg,
- dont_call_handle_close);
-}
-
-int
-ACE_Proactor::cancel_timer (ACE_Handler &handler,
- int dont_call_handle_close)
-{
- // No need to signal timer event here. Even if the cancel timer was
- // the earliest, we will have an extra wakeup.
- return this->timer_queue_->cancel (&handler,
- dont_call_handle_close);
-}
-
-int
-ACE_Proactor::handle_events (ACE_Time_Value &wait_time)
-{
- return implementation ()->handle_events (wait_time);
-}
-
-int
-ACE_Proactor::handle_events (void)
-{
- return this->implementation ()->handle_events ();
-}
-
-int
-ACE_Proactor::wake_up_dispatch_threads (void)
-{
- return 0;
-}
-
-int
-ACE_Proactor::close_dispatch_threads (int)
-{
- return 0;
-}
-
-size_t
-ACE_Proactor::number_of_threads (void) const
-{
- return this->implementation ()->number_of_threads ();
-}
-
-void
-ACE_Proactor::number_of_threads (size_t threads)
-{
- this->implementation ()->number_of_threads (threads);
-}
-
-ACE_Proactor::TIMER_QUEUE *
-ACE_Proactor::timer_queue (void) const
-{
- return this->timer_queue_;
-}
-
-void
-ACE_Proactor::timer_queue (TIMER_QUEUE *tq)
-{
- // Cleanup old timer queue.
- if (this->delete_timer_queue_)
- {
- delete this->timer_queue_;
- this->delete_timer_queue_ = 0;
- }
-
- // New timer queue.
- if (tq == 0)
- {
- ACE_NEW (this->timer_queue_,
- TIMER_HEAP);
- this->delete_timer_queue_ = 1;
- }
- else
- {
- this->timer_queue_ = tq;
- this->delete_timer_queue_ = 0;
- }
-
- // Set the proactor in the timer queue's functor
- this->timer_queue_->upcall_functor ().proactor (*this);
-}
-
-ACE_HANDLE
-ACE_Proactor::get_handle (void) const
-{
- return this->implementation ()->get_handle ();
-}
-
-ACE_Proactor_Impl *
-ACE_Proactor::implementation (void) const
-{
- return this->implementation_;
-}
-
-
-ACE_Asynch_Read_Stream_Impl *
-ACE_Proactor::create_asynch_read_stream (void)
-{
- return this->implementation ()->create_asynch_read_stream ();
-}
-
-ACE_Asynch_Write_Stream_Impl *
-ACE_Proactor::create_asynch_write_stream (void)
-{
- return this->implementation ()->create_asynch_write_stream ();
-}
-
-ACE_Asynch_Read_File_Impl *
-ACE_Proactor::create_asynch_read_file (void)
-{
- return this->implementation ()->create_asynch_read_file ();
-}
-
-ACE_Asynch_Write_File_Impl *
-ACE_Proactor::create_asynch_write_file (void)
-{
- return this->implementation ()->create_asynch_write_file ();
-}
-
-ACE_Asynch_Accept_Impl *
-ACE_Proactor::create_asynch_accept (void)
-{
- return this->implementation ()->create_asynch_accept ();
-}
-
-ACE_Asynch_Transmit_File_Impl *
-ACE_Proactor::create_asynch_transmit_file (void)
-{
- return this->implementation ()->create_asynch_transmit_file ();
-}
-
-ACE_Asynch_Read_Stream_Result_Impl *
-ACE_Proactor::create_asynch_read_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- return this->implementation ()->create_asynch_read_stream_result (handler,
- handle,
- message_block,
- bytes_to_read,
- act,
- event,
- priority,
- signal_number);
-}
-
-
-ACE_Asynch_Write_Stream_Result_Impl *
-ACE_Proactor::create_asynch_write_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-
-{
- return this->implementation ()->create_asynch_write_stream_result (handler,
- handle,
- message_block,
- bytes_to_write,
- act,
- event,
- priority,
- signal_number);
-}
-
-
-
-ACE_Asynch_Read_File_Result_Impl *
-ACE_Proactor::create_asynch_read_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-
-{
- return this->implementation ()->create_asynch_read_file_result (handler,
- handle,
- message_block,
- bytes_to_read,
- act,
- offset,
- offset_high,
- event,
- priority,
- signal_number);
-}
-
-
-
-ACE_Asynch_Write_File_Result_Impl *
-ACE_Proactor::create_asynch_write_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-
-{
- return this->implementation ()->create_asynch_write_file_result (handler,
- handle,
- message_block,
- bytes_to_write,
- act,
- offset,
- offset_high,
- event,
- priority,
- signal_number);
-}
-
-
-ACE_Asynch_Accept_Result_Impl *
-ACE_Proactor::create_asynch_accept_result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-
-{
- return this->implementation ()->create_asynch_accept_result (handler,
- listen_handle,
- accept_handle,
- message_block,
- bytes_to_read,
- act,
- event,
- priority,
- signal_number);
-}
-
-ACE_Asynch_Transmit_File_Result_Impl *
-ACE_Proactor::create_asynch_transmit_file_result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-
-{
- return this->implementation ()->create_asynch_transmit_file_result (handler,
- socket,
- file,
- header_and_trailer,
- bytes_to_write,
- offset,
- offset_high,
- bytes_per_send,
- flags,
- act,
- event,
- priority,
- signal_number);
-}
-
-ACE_Asynch_Result_Impl *
-ACE_Proactor::create_asynch_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- return this->implementation ()->create_asynch_timer (handler,
- act,
- tv,
- event,
- priority,
- signal_number);
-}
-
-int
-ACE_Proactor::post_wakeup_completions (int how_many)
-{
- return ACE_Proactor::instance ()->implementation ()->post_wakeup_completions (how_many);
-}
-
-void
-ACE_Proactor::implementation (ACE_Proactor_Impl *implementation)
-{
- this->implementation_ = implementation;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Timer_Queue_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Queue_Iterator_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_List_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_List_Iterator_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Node_T<ACE_Handler *>;
-template class ACE_Unbounded_Set<ACE_Timer_Node_T<ACE_Handler *> *>;
-template class ACE_Unbounded_Set_Iterator<ACE_Timer_Node_T<ACE_Handler *> *>;
-template class ACE_Node <ACE_Timer_Node_T<ACE_Handler *> *>;
-template class ACE_Free_List<ACE_Timer_Node_T<ACE_Handler *> >;
-template class ACE_Locked_Free_List<ACE_Timer_Node_T<ACE_Handler *>, ACE_Null_Mutex>;
-template class ACE_Timer_Heap_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Heap_Iterator_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Wheel_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Wheel_Iterator_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Timer_Queue_T<ACE_Handler *,\
- ACE_Proactor_Handle_Timeout_Upcall,\
- ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_Queue_Iterator_T<ACE_Handler *,\
- ACE_Proactor_Handle_Timeout_Upcall,\
- ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_List_T<ACE_Handler *,\
- ACE_Proactor_Handle_Timeout_Upcall,\
- ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_List_Iterator_T<ACE_Handler *,\
- ACE_Proactor_Handle_Timeout_Upcall,\
- ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_Node_T<ACE_Handler *>
-#pragma instantiate ACE_Unbounded_Set<ACE_Timer_Node_T<ACE_Handler *> *>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Timer_Node_T<ACE_Handler *> *>
-#pragma instantiate ACE_Node <ACE_Timer_Node_T<ACE_Handler *> *>
-#pragma instantiate ACE_Free_List<ACE_Timer_Node_T<ACE_Handler *> >
-#pragma instantiate ACE_Locked_Free_List<ACE_Timer_Node_T<ACE_Handler *>,\
- ACE_Null_Mutex>
-#pragma instantiate ACE_Timer_Heap_T<ACE_Handler *,\
- ACE_Proactor_Handle_Timeout_Upcall,\
- ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_Heap_Iterator_T<ACE_Handler *,\
- ACE_Proactor_Handle_Timeout_Upcall,\
- ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_Wheel_T<ACE_Handler *,\
- ACE_Proactor_Handle_Timeout_Upcall,\
- ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_Wheel_Iterator_T<ACE_Handler *,\
- ACE_Proactor_Handle_Timeout_Upcall,\
- ACE_SYNCH_RECURSIVE_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-#else /* !ACE_WIN32 || !ACE_HAS_AIO_CALLS */
-
-ACE_Proactor *
-ACE_Proactor::instance (size_t threads)
-{
- ACE_UNUSED_ARG (threads);
- return 0;
-}
-
-ACE_Proactor *
-ACE_Proactor::instance (ACE_Proactor *)
-{
- return 0;
-}
-
-void
-ACE_Proactor::close_singleton (void)
-{
-}
-
-int
-ACE_Proactor::run_event_loop (void)
-{
- // not implemented
- return -1;
-}
-
-int
-ACE_Proactor::run_event_loop (ACE_Time_Value &tv)
-{
- // not implemented
- ACE_UNUSED_ARG (tv);
- return -1;
-}
-
-int
-ACE_Proactor::end_event_loop (void)
-{
- // not implemented
- return -1;
-}
-
-sig_atomic_t
-ACE_Proactor::event_loop_done (void)
-{
- return sig_atomic_t (1);
-}
-
-#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS*/
diff --git a/ace/Proactor.h b/ace/Proactor.h
deleted file mode 100644
index f6ace6439fb..00000000000
--- a/ace/Proactor.h
+++ /dev/null
@@ -1,471 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Proactor.h
-//
-// = AUTHOR
-// Irfan Pyarali <irfan@cs.wustl.edu>,
-// Tim Harrison <harrison@cs.wustl.edu> and
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_PROACTOR_H
-#define ACE_PROACTOR_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
-// This only works on Win32 platforms and on Unix platforms supporting
-// POSIX aio calls.
-
-#include "ace/Asynch_IO.h"
-#include "ace/Asynch_IO_Impl.h"
-#include "ace/Thread_Manager.h"
-#include "ace/Timer_Queue.h"
-#include "ace/Timer_List.h"
-#include "ace/Timer_Heap.h"
-#include "ace/Timer_Wheel.h"
-
-// Forward declarations.
-class ACE_Proactor_Impl;
-class ACE_Proactor_Timer_Handler;
-
-class ACE_Export ACE_Proactor_Handle_Timeout_Upcall
-{
- // = TITLE
- // Functor for <ACE_Timer_Queue>.
- //
- // = DESCRIPTION
- // This class implements the functor required by the Timer
- // Queue to call <handle_timeout> on ACE_Handlers.
-
- typedef ACE_Timer_Queue_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_QUEUE;
- // Type def for the timer queue.
-
- friend class ACE_Proactor;
- // The main Proactor class has special permissions.
-
-public:
- ACE_Proactor_Handle_Timeout_Upcall (void);
- // Constructor.
-
- int timeout (TIMER_QUEUE &timer_queue,
- ACE_Handler *handler,
- const void *arg,
- const ACE_Time_Value &cur_time);
- // This method is called when the timer expires.
-
- int cancellation (TIMER_QUEUE &timer_queue,
- ACE_Handler *handler);
- // This method is called when the timer is canceled.
-
- int deletion (TIMER_QUEUE &timer_queue,
- ACE_Handler *handler,
- const void *arg);
- // This method is called when the timer queue is destroyed and the
- // timer is still contained in it.
-
-protected:
- int proactor (ACE_Proactor &proactor);
- // Set the proactor. This will fail, if one is already set!
-
- ACE_Proactor *proactor_;
- // Handle to the proactor. This is needed for posting a timer result
- // to the Proactor's completion queue.
-};
-
-class ACE_Export ACE_Proactor
-{
- // = TITLE
- // A manager for asynchronous event demultiplexing.
- //
- // = DESCRIPTION
- // See the Proactor pattern description at
- // http://www.cs.wustl.edu/~schmidt/proactor.ps.gz for more
- // details.
-
- // = Here are the private typedefs that the <ACE_Proactor> uses.
-
- typedef ACE_Timer_Queue_Iterator_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_QUEUE_ITERATOR;
- typedef ACE_Timer_List_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_LIST;
- typedef ACE_Timer_List_Iterator_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_LIST_ITERATOR;
- typedef ACE_Timer_Heap_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_HEAP;
- typedef ACE_Timer_Heap_Iterator_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_HEAP_ITERATOR;
- typedef ACE_Timer_Wheel_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_WHEEL;
- typedef ACE_Timer_Wheel_Iterator_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_WHEEL_ITERATOR;
-
- // = Friendship.
-
- friend class ACE_Proactor_Timer_Handler;
- // Timer handler runs a thread and manages the timers, on behalf of
- // the Proactor.
-
-public:
- typedef ACE_Timer_Queue_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_QUEUE;
- // Public type.
-
- ACE_Proactor (ACE_Proactor_Impl *implementation = 0,
- int delete_implementation = 0,
- TIMER_QUEUE *tq = 0);
- // Constructor. If <implementation> is 0, the correct implementation
- // object will be created. <delete_implementation> flag determines
- // whether the implementation object should be deleted by the
- // Proactor or not. If <tq> is 0, a new TIMER_QUEUE is created.
-
- virtual ~ACE_Proactor (void);
- // Virtual destruction.
-
- static ACE_Proactor *instance (size_t threads = 0);
- // Get pointer to a process-wide <ACE_Proactor>. <threads> should
- // be part of another method.
-
- static ACE_Proactor *instance (ACE_Proactor *);
- // Set pointer to a process-wide <ACE_Proactor> and return existing
- // pointer.
-
- static void close_singleton (void);
- // Delete the dynamically allocated Singleton.
-
- // = Proactor event loop management methods.
-
- static int run_event_loop (void);
- // Run the event loop until the <ACE_Proactor::handle_events> method
- // returns -1 or the <end_event_loop> method is invoked.
-
- static int run_event_loop (ACE_Time_Value &tv);
- // Run the event loop until the <ACE_Proactor::handle_events> method
- // returns -1, the <end_event_loop> method is invoked, or the
- // <ACE_Time_Value> expires.
-
- static int end_event_loop (void);
- // Instruct the <ACE_Proactor::instance> to terminate its event
- // loop.
- // This method wakes up all the threads blocked on waiting for
- // completions and end the event loop.
-
- static int event_loop_done (void);
- // Report if the <ACE_Proactor::instance> event loop is finished.
-
- virtual int close (void);
- // Close the IO completion port.
-
- virtual int register_handle (ACE_HANDLE handle,
- const void *completion_key);
- // This method adds the <handle> to the I/O completion port. This
- // function is a no-op function for Unix systems and returns 0;
-
- // = Timer management.
- virtual long schedule_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &time);
- // Schedule a <handler> that will expire after <time>. If it
- // expires then <act> is passed in as the value to the <handler>'s
- // <handle_timeout> callback method. This method returns a
- // <timer_id>. This <timer_id> can be used to cancel a timer before
- // it expires. The cancellation ensures that <timer_ids> are unique
- // up to values of greater than 2 billion timers. As long as timers
- // don't stay around longer than this there should be no problems
- // with accidentally deleting the wrong timer. Returns -1 on
- // failure (which is guaranteed never to be a valid <timer_id>).
-
- virtual long schedule_repeating_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &interval);
-
- // Same as above except <interval> it is used to reschedule the
- // <handler> automatically.
-
- virtual long schedule_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &time,
- const ACE_Time_Value &interval);
- // This combines the above two methods into one. Mostly for backward
- // compatibility.
-
- virtual int cancel_timer (ACE_Handler &handler,
- int dont_call_handle_close = 1);
- // Cancel all timers associated with this <handler>. Returns number
- // of timers cancelled.
-
- virtual int cancel_timer (long timer_id,
- const void **act = 0,
- int dont_call_handle_close = 1);
- // Cancel the single <ACE_Handler> that matches the <timer_id> value
- // (which was returned from the <schedule> method). If <act> is
- // non-NULL then it will be set to point to the ``magic cookie''
- // argument passed in when the <Handler> was registered. This makes
- // it possible to free up the memory and avoid memory leaks.
- // Returns 1 if cancellation succeeded and 0 if the <timer_id>
- // wasn't found.
-
- virtual int handle_events (ACE_Time_Value &wait_time);
- // Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return 0. Return 1 on success i.e., when a
- // completion is dispatched, non-zero (-1) on errors and errno is
- // set accordingly.
-
- virtual int handle_events (void);
- // Block indefinitely until at least one event is dispatched.
- // Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return 0. Return 1 on success i.e., when a
- // completion is dispatched, non-zero (-1) on errors and errno is
- // set accordingly.
-
- int wake_up_dispatch_threads (void);
- // Add wakeup dispatch threads (reinit).
-
- int close_dispatch_threads (int wait);
- // Close all dispatch threads.
-
- size_t number_of_threads (void) const;
- void number_of_threads (size_t threads);
- // Number of thread used as a parameter to CreatIoCompletionPort.
-
- TIMER_QUEUE *timer_queue (void) const;
- void timer_queue (TIMER_QUEUE *timer_queue);
- // Get/Set timer queue.
-
- virtual ACE_HANDLE get_handle (void) const;
- // Get the event handle.
- // It is a no-op in POSIX platforms and it returns
- // ACE_INVALID_HANDLE.
-
- virtual ACE_Proactor_Impl *implementation (void) const;
- // Get the implementation class.
-
- // = Factory methods for the operations
-
- // Note that the user does not have to use or know about these
- // methods.
-
- virtual ACE_Asynch_Read_Stream_Impl *create_asynch_read_stream (void);
- // Create the correct implementation class for doing
- // Asynch_Read_Stream.
-
- virtual ACE_Asynch_Write_Stream_Impl *create_asynch_write_stream (void);
- // Create the correct implementation class for doing
- // Asynch_Write_Stream.
-
- virtual ACE_Asynch_Read_File_Impl *create_asynch_read_file (void);
- // Create the correct implementation class for doing
- // Asynch_Read_File.
-
- virtual ACE_Asynch_Write_File_Impl *create_asynch_write_file (void);
- // Create the correct implementation class for doing
- // Asynch_Write_File.
-
- virtual ACE_Asynch_Accept_Impl *create_asynch_accept (void);
- // Create the correct implementation class for doing Asynch_Accept.
-
- virtual ACE_Asynch_Transmit_File_Impl *create_asynch_transmit_file (void);
- // Create the correct implementation class for doing
- // Asynch_Transmit_File.
-
- // = Factory methods for the results
-
- // Note that the user does not have to use or know about these
- // methods unless they want to "fake" results.
-
- virtual ACE_Asynch_Read_Stream_Result_Impl *create_asynch_read_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Create the correct implementation class for ACE_Asynch_Read_Stream::Result class.
-
- virtual ACE_Asynch_Write_Stream_Result_Impl *create_asynch_write_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Create the correct implementation class for ACE_Asynch_Write_Stream::Result.
-
- virtual ACE_Asynch_Read_File_Result_Impl *create_asynch_read_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Create the correct implementation class for ACE_Asynch_Read_File::Result.
-
- virtual ACE_Asynch_Write_File_Result_Impl *create_asynch_write_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Create the correct implementation class for ACE_Asynch_Write_File::Result.
-
- virtual ACE_Asynch_Accept_Result_Impl *create_asynch_accept_result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Create the correct implementation class for ACE_Asynch_Accept::Result.
-
- virtual ACE_Asynch_Transmit_File_Result_Impl *create_asynch_transmit_file_result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Create the correct implementation class for ACE_Asynch_Transmit_File::Result.
-
- virtual ACE_Asynch_Result_Impl *create_asynch_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Create a timer result object which can be used with the Timer
- // mechanism of the Proactor.
- // If <signal_number> is -1, <POSIX_SIG_Proactor> will create a
- // Timer object with a meaningful signal number, choosing the
- // largest signal number from the signal mask of the Proactor.
-
-protected:
-
- static int post_wakeup_completions (int how_many);
- // Post <how_many> completions to the completion port so that all
- // threads can wake up. This is used in conjunction with the
- // <run_event_loop>.
-
- virtual void implementation (ACE_Proactor_Impl *implementation);
- // Set the implementation class.
-
- ACE_Proactor_Impl *implementation_;
- // Delegation/implementation class that all methods will be
- // forwarded to.
-
- int delete_implementation_;
- // Flag used to indicate whether we are responsible for cleaning up
- // the implementation instance.
-
- static ACE_Proactor *proactor_;
- // Pointer to a process-wide <ACE_Proactor>.
-
- static int delete_proactor_;
- // Must delete the <proactor_> if non-0.
-
- ACE_Proactor_Timer_Handler *timer_handler_;
- // Handles timeout events.
-
- ACE_Thread_Manager thr_mgr_;
- // This will manage the thread in the Timer_Handler.
-
- TIMER_QUEUE *timer_queue_;
- // Timer Queue.
-
- int delete_timer_queue_;
- // Flag on whether to delete the timer queue.
-
- static sig_atomic_t end_event_loop_;
- // Terminate the proactor event loop.
-
- static sig_atomic_t event_loop_thread_count_;
- // Number of threads in the event loop.
-
-private:
- ACE_Proactor (const ACE_Proactor &);
- ACE_Proactor &operator= (const ACE_Proactor &);
- // Deny access since member-wise won't work...
-};
-
-#else /* NOT WIN32 or POSIX with AIO features. */
-class ACE_Export ACE_Proactor
-{
-public:
- class Timer_Queue {};
- ACE_Proactor (size_t /* number_of_threads */ = 0,
- Timer_Queue * /* tq */ = 0) {}
- virtual int handle_events (void) { return -1; }
- virtual int handle_events (ACE_Time_Value &) { return -1; }
-
- static ACE_Proactor *instance (size_t threads = 0);
- // Placeholder to enable compilation on non-Win32 platforms
-
- static ACE_Proactor *instance (ACE_Proactor *);
- // Placeholder to enable compilation on non-Win32 platforms
-
- static void close_singleton (void);
- // Placeholder to enable compilation on non-Win32 platforms
-
- static int run_event_loop (void);
- // Placeholder to enable compilation on non-Win32 platforms
-
- static int run_event_loop (ACE_Time_Value &tv);
- // Placeholder to enable compilation on non-Win32 platforms
-
- static int end_event_loop (void);
- // Placeholder to enable compilation on non-Win32 platforms
-
- static sig_atomic_t event_loop_done (void);
- // Placeholder to enable compilation on non-Win32 platforms
-};
-#endif /* ACE_WIN32 && !ACE_HAS_WINCE || ACE_HAS_AIO_CALLS*/
-#include "ace/post.h"
-#endif /* ACE_PROACTOR_H */
diff --git a/ace/Proactor.i b/ace/Proactor.i
deleted file mode 100644
index 6318deb79a0..00000000000
--- a/ace/Proactor.i
+++ /dev/null
@@ -1,2 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
diff --git a/ace/Proactor_Impl.h b/ace/Proactor_Impl.h
deleted file mode 100644
index bb302387088..00000000000
--- a/ace/Proactor_Impl.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Proactor_Impl.h
-//
-// = AUTHOR
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_PROACTOR_IMPL_H
-#define ACE_PROACTOR_IMPL_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS)))
-// This only works on Win32 platforms and on Unix platforms supporting
-// aio calls.
-
-#include "ace/Asynch_IO.h"
-#include "ace/Reactor.h"
-
-class ACE_Export ACE_Proactor_Impl : public ACE_Event_Handler
-{
- // = TITLE
- //
- // A manager for asynchronous event demultiplexing. This class
- // is the base class for all the concrete implementation
- // classes.
- //
- // = DESCRIPTION
- //
- // See the Proactor pattern description at
- // http://www.cs.wustl.edu/~schmidt/proactor.ps.gz for more
- // details.
-
-public:
- virtual ~ACE_Proactor_Impl (void) {}
- // Virtual destruction.
-
- virtual int close (void) = 0;
- // Close the IO completion port.
-
- virtual int register_handle (ACE_HANDLE handle,
- const void *completion_key) = 0;
- // This method adds the <handle> to the I/O completion port. This
- // function is a no-op function for Unix systems.
-
- virtual int handle_events (ACE_Time_Value &wait_time) = 0;
- // Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return 0. Return 1 on success i.e., when a
- // completion is dispatched, non-zero (-1) on errors and errno is
- // set accordingly.
-
- virtual int handle_events (void) = 0;
- // Block indefinitely until at least one event is dispatched.
- // Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return 0. Return 1 on success i.e., when a
- // completion is dispatched, non-zero (-1) on errors and errno is
- // set accordingly.
-
- virtual int wake_up_dispatch_threads (void) = 0;
- // Add wakeup dispatch threads (reinit).
-
- virtual int close_dispatch_threads (int wait) = 0;
- // Close all dispatch threads.
-
- virtual size_t number_of_threads (void) const = 0;
- virtual void number_of_threads (size_t threads) = 0;
- // Number of thread used as a parameter to CreatIoCompletionPort.
-
- virtual ACE_HANDLE get_handle (void) const = 0;
- // Get the event handle.
-
- //
- // = Factory methods for the operations
- //
- // Note that the user does not have to use or know about these
- // methods.
-
- virtual ACE_Asynch_Read_Stream_Impl *create_asynch_read_stream (void) = 0;
- // Create the correct implementation class for doing Asynch_Read_Stream.
-
- virtual ACE_Asynch_Write_Stream_Impl *create_asynch_write_stream (void) = 0;
- // Create the correct implementation class for doing Asynch_Write_Stream.
-
- virtual ACE_Asynch_Read_File_Impl *create_asynch_read_file (void) = 0;
- // Create the correct implementation class for doing Asynch_Read_File.
-
- virtual ACE_Asynch_Write_File_Impl *create_asynch_write_file (void) = 0;
- // Create the correct implementation class for doing Asynch_Write_File.
-
- virtual ACE_Asynch_Accept_Impl *create_asynch_accept (void) = 0;
- // Create the correct implementation class for doing Asynch_Accept.
-
- virtual ACE_Asynch_Transmit_File_Impl *create_asynch_transmit_file (void) = 0;
- // Create the correct implementation class for doing Asynch_Transmit_File.
-
- //
- // = Factory methods for the results
- //
- // Note that the user does not have to use or know about these
- // methods unless they want to "fake" results.
-
- virtual ACE_Asynch_Read_Stream_Result_Impl *create_asynch_read_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN) = 0;
- // Create the correct implementation class for ACE_Asynch_Read_Stream::Result class.
-
- virtual ACE_Asynch_Write_Stream_Result_Impl *create_asynch_write_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN) = 0;
- // Create the correct implementation class for ACE_Asynch_Write_Stream::Result.
-
- virtual ACE_Asynch_Read_File_Result_Impl *create_asynch_read_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN) = 0;
- // Create the correct implementation class for ACE_Asynch_Read_File::Result.
-
- virtual ACE_Asynch_Write_File_Result_Impl *create_asynch_write_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN) = 0;
- // Create the correct implementation class for ACE_Asynch_Write_File::Result.
-
- virtual ACE_Asynch_Accept_Result_Impl *create_asynch_accept_result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN) = 0;
- // Create the correct implementation class for ACE_Asynch_Accept::Result.
-
- virtual ACE_Asynch_Transmit_File_Result_Impl *create_asynch_transmit_file_result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN) = 0;
- // Create the correct implementation class for ACE_Asynch_Transmit_File::Result.
-
- virtual ACE_Asynch_Result_Impl *create_asynch_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = 0) = 0;
- // Create the correct implementation object for the Timer
- // result. POSIX_SIG_Proactor will create a Timer object with a
- // meaningful signal number, if you leave the signal number as 0.
-
- virtual int post_wakeup_completions (int how_many) = 0;
- // Post <how_many> completions to the completion port so that all
- // threads can wake up. This is used in conjunction with the
- // <run_event_loop>.
-};
-
-#endif /* (ACE_WIN32 && ACE_HAS_WINCE) || ACE_HAS_AIO_CALLS */
-#include "ace/post.h"
-#endif /* ACE_PROACTOR_IMPL_H */
diff --git a/ace/Process.cpp b/ace/Process.cpp
deleted file mode 100644
index 4aba3f5c2a9..00000000000
--- a/ace/Process.cpp
+++ /dev/null
@@ -1,710 +0,0 @@
-// $Id$
-
-#include "ace/OS.h"
-#include "ace/Process.h"
-#include "ace/ARGV.h"
-#include "ace/Signal.h"
-#include "ace/SString.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Process.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID (ace, Process, "$Id$")
-
-ACE_Process::ACE_Process (void)
- :
-#if !defined (ACE_WIN32)
- child_id_ (ACE_INVALID_PID),
-#endif /* !defined (ACE_WIN32) */
- exit_code_ (0)
-{
-#if defined (ACE_WIN32)
- ACE_OS::memset ((void *) &this->process_info_,
- 0,
- sizeof this->process_info_);
-#endif /* ACE_WIN32 */
-}
-
-ACE_Process::~ACE_Process (void)
-{
-#if defined (ACE_WIN32)
- // Free resources allocated in kernel.
- ACE_OS::close (this->process_info_.hThread);
- ACE_OS::close (this->process_info_.hProcess);
-#endif /* ACE_WIN32 */
-}
-
-int
-ACE_Process::prepare (ACE_Process_Options &)
-{
- return 0;
-}
-
-pid_t
-ACE_Process::spawn (ACE_Process_Options &options)
-{
-#if defined (ACE_WIN32)
- if (prepare (options) < 0)
- return ACE_INVALID_PID;
-
- BOOL fork_result =
- ACE_TEXT_CreateProcess (0,
- options.command_line_buf (),
- options.get_process_attributes (),
- options.get_thread_attributes (),
- options.handle_inheritence (),
- options.creation_flags (),
- options.env_buf (), // environment variables
- options.working_directory (),
- options.startup_info (),
- &this->process_info_);
-
- if (fork_result) {
- parent (this->getpid ());
- return this->getpid ();
- } else
- return ACE_INVALID_PID;
-#elif defined (CHORUS)
- // This only works if we exec. Chorus does not really support
- // forking.
- if (ACE_BIT_ENABLED (options.creation_flags (),
- ACE_Process_Options::NO_EXEC))
- ACE_NOTSUP_RETURN (ACE_INVALID_PID);
-
- // These are all currently unsupported.
- if (options.get_stdin () != ACE_INVALID_HANDLE)
- ACE_NOTSUP_RETURN (ACE_INVALID_PID);
- if (options.get_stdout () != ACE_INVALID_HANDLE)
- ACE_NOTSUP_RETURN (ACE_INVALID_PID);
- if (options.get_stderr () != ACE_INVALID_HANDLE)
- ACE_NOTSUP_RETURN (ACE_INVALID_PID);
- if (options.working_directory () != 0)
- ACE_NOTSUP_RETURN (ACE_INVALID_PID);
-
- if (options.env_argv ()[0] == 0)
- // command-line args
- this->child_id_ = ACE_OS::execvp (options.process_name (),
- options.command_line_argv ());
- else
- {
- // Add the new environment variables to the environment context
- // of the context before doing an <execvp>.
- for (char *const *user_env = options.env_argv ();
- *user_env != 0;
- user_env++)
- if (ACE_OS::putenv (*user_env) != 0)
- return ACE_INVALID_PID;
-
- // Now the forked process has both inherited variables and the
- // user's supplied variables.
- this->child_id_ = ACE_OS::execvp (options.process_name (),
- options.command_line_argv ());
- }
-
- return this->child_id_;
-#else /* ACE_WIN32 */
- if (prepare (options) < 0)
- return ACE_INVALID_PID;
-
- // Fork the new process.
- this->child_id_ = ACE::fork (options.process_name (),
- options.avoid_zombies ());
-
- if (this->child_id_ == 0)
- {
- // If we're the child and the options specified a non-default
- // process group, try to set our pgid to it. This allows the
- // <ACE_Process_Manager> to wait for processes by their
- // process-group.
- if (options.getgroup () != ACE_INVALID_PID
- && ACE_OS::setpgid (0,
- options.getgroup ()) < 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p.\n"),
- ACE_TEXT ("ACE_Process::spawn: setpgid failed.")));
-
-#if !defined (ACE_LACKS_SETREUID)
- // Set user and group id's.
- if (options.getruid () != (uid_t) -1
- || options.geteuid () != (uid_t) -1)
- if (ACE_OS::setreuid (options.getruid (),
- options.geteuid ()) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p.\n"),
- ACE_TEXT ("ACE_Process::spawn: setreuid failed.")));
-#endif /* ACE_LACKS_SETREUID */
-
-#if !defined (ACE_LACKS_SETREGID)
- if (options.getrgid () != (uid_t) -1
- || options.getegid () != (uid_t) -1)
- if (ACE_OS::setregid (options.getrgid (),
- options.getegid ()) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p.\n"),
- ACE_TEXT ("ACE_Process::spawn: setregid failed.")));
-#endif /* ACE_LACKS_SETREGID */
-
- this->child (ACE_OS::getppid ());
- }
- else if (this->child_id_ != -1)
- this->parent (this->child_id_);
-
- // If we're not supposed to exec, return the process id.
- if (ACE_BIT_ENABLED (options.creation_flags (),
- ACE_Process_Options::NO_EXEC))
- return this->child_id_;
-
- switch (this->child_id_)
- {
- case -1:
- // Error.
- return ACE_INVALID_PID;
- case 0:
- // Child process...exec the
- {
- if (options.get_stdin () != ACE_INVALID_HANDLE
- && ACE_OS::dup2 (options.get_stdin (),
- ACE_STDIN) == -1)
- ACE_OS::exit (errno);
- else if (options.get_stdout () != ACE_INVALID_HANDLE
- && ACE_OS::dup2 (options.get_stdout (),
- ACE_STDOUT) == -1)
- ACE_OS::exit (errno);
- else if (options.get_stderr () != ACE_INVALID_HANDLE
- && ACE_OS::dup2 (options.get_stderr (),
- ACE_STDERR) == -1)
- ACE_OS::exit (errno);
-
- // close down unneeded descriptors
- ACE_OS::close (options.get_stdin ());
- ACE_OS::close (options.get_stdout ());
- ACE_OS::close (options.get_stderr ());
-
- // If we must, set the working directory for the child
- // process.
- if (options.working_directory () != 0)
- ACE_OS::chdir (options.working_directory ());
- // Should check for error here!
-
- // Child process executes the command.
- int result = 0;
-
- if (options.env_argv ()[0] == 0)
- // command-line args
- result = ACE_OS::execvp (options.process_name (),
- options.command_line_argv ());
- else
- {
-#if defined (ghs)
- // GreenHills 1.8.8 (for VxWorks 5.3.x) can't compile this
- // code. Processes aren't supported on VxWorks anyways.
- ACE_NOTSUP_RETURN (ACE_INVALID_PID);
-#else
- // Add the new environment variables to the environment
- // context of the context before doing an <execvp>.
- for (char *const *user_env = options.env_argv ();
- *user_env != 0;
- user_env++)
- if (ACE_OS::putenv (*user_env) != 0)
- return ACE_INVALID_PID;
-
- // Now the forked process has both inherited variables and
- // the user's supplied variables.
- result = ACE_OS::execvp (options.process_name (),
- options.command_line_argv ());
-#endif /* ghs */
- }
- if (result == -1)
- {
- // If the execv fails, this child needs to exit.
-
- // Exit with the errno so that the calling process can
- // catch this and figure out what went wrong.
- ACE_OS::exit (errno);
- }
- // ... otherwise, this is never reached.
- return 0;
- }
- default:
- // Server process. The fork succeeded.
- return this->child_id_;
- }
-#endif /* ACE_WIN32 */
-}
-
-void
-ACE_Process::parent (pid_t)
-{
- // nothing to do
-}
-
-void
-ACE_Process::child (pid_t)
-{
- // nothing to do
-}
-
-void
-ACE_Process::unmanage (void)
-{
- // nothing to do
-}
-
-int
-ACE_Process::running (void) const
-{
-#if defined (ACE_WIN32)
- DWORD code;
-
- BOOL result = ::GetExitCodeProcess (this->gethandle (),
- &code);
- return result && code == STILL_ACTIVE;
-#else
- return ACE_OS::kill (this->getpid (),
- 0) == 0
- || errno != ESRCH;
-#endif /* ACE_WIN32 */
-}
-
-pid_t
-ACE_Process::wait (const ACE_Time_Value &tv,
- ACE_exitcode *status)
-{
-#if defined (ACE_WIN32)
- // Don't try to get the process exit status if wait failed so we can
- // keep the original error code intact.
- switch (::WaitForSingleObject (process_info_.hProcess,
- tv.msec ()))
- {
- case WAIT_OBJECT_0:
- if (status != 0)
- // The error status of <GetExitCodeProcess> is nonetheless not
- // tested because we don't know how to return the value.
- ::GetExitCodeProcess (process_info_.hProcess,
- status);
- return this->getpid ();
- case WAIT_TIMEOUT:
- errno = ETIME;
- return 0;
- default:
- ACE_OS::set_errno_to_last_error ();
- return -1;
- }
-#else /* ACE_WIN32 */
- if (tv == ACE_Time_Value::zero)
- ACE_OSCALL_RETURN (ACE_OS::waitpid (this->child_id_,
- status,
- WNOHANG),
- int, ACE_INVALID_PID);
-
- if (tv == ACE_Time_Value::max_time)
- return this->wait (status);
-
- ACE_Time_Value wait_until = ACE_OS::gettimeofday () + tv;
-
- for (;;)
- {
- int result = ACE_OS::waitpid (this->getpid (),
- status,
- WNOHANG);
- if (result != 0)
- return result;
-
- ACE_Sig_Set alarm_or_child;
-
- alarm_or_child.sig_add (SIGALRM);
- alarm_or_child.sig_add (SIGCHLD);
-
- ACE_Time_Value time_left = wait_until - ACE_OS::gettimeofday ();
-
- // If ACE_OS::ualarm doesn't have sub-second resolution:
- time_left += ACE_Time_Value (0, 500000);
- time_left.usec (0);
-
- if (time_left <= ACE_Time_Value::zero)
- return 0; // timeout
-
- ACE_OS::ualarm (time_left);
- if (ACE_OS::sigwait (alarm_or_child) == -1)
- return ACE_INVALID_PID;
- }
-#endif /* ACE_WIN32 */
-}
-
-ACE_Process_Options::ACE_Process_Options (int ie,
- int cobl,
- int ebl,
- int mea)
- :
-#if !defined (ACE_HAS_WINCE)
- inherit_environment_ (ie),
-#endif /* ACE_HAS_WINCE */
- creation_flags_ (0),
-#if !defined (ACE_HAS_WINCE)
-#if defined (ACE_WIN32)
- environment_inherited_ (0),
- handle_inheritence_ (TRUE),
- process_attributes_ (NULL),
- thread_attributes_ (NULL),
-#else /* ACE_WIN32 */
- stdin_ (ACE_INVALID_HANDLE),
- stdout_ (ACE_INVALID_HANDLE),
- stderr_ (ACE_INVALID_HANDLE),
- avoid_zombies_ (0),
- ruid_ ((uid_t) -1),
- euid_ ((uid_t) -1),
- rgid_ ((uid_t) -1),
- egid_ ((uid_t) -1),
-#endif /* ACE_WIN32 */
- set_handles_called_ (0),
- environment_buf_index_ (0),
- environment_argv_index_ (0),
- environment_buf_ (0),
- environment_buf_len_ (ebl),
- max_environment_args_ (mea),
- max_environ_argv_index_ (mea - 1),
-#endif /* !ACE_HAS_WINCE */
- command_line_argv_calculated_ (0),
- command_line_buf_ (0),
- process_group_ (ACE_INVALID_PID)
-{
- ACE_NEW (command_line_buf_,
- ACE_TCHAR[cobl]);
- command_line_buf_[0] = '\0';
-
-#if !defined (ACE_HAS_WINCE)
- working_directory_[0] = '\0';
- ACE_NEW (environment_buf_,
- ACE_TCHAR[ebl]);
- ACE_NEW (environment_argv_,
- ACE_TCHAR *[mea]);
- environment_buf_[0] = '\0';
- environment_argv_[0] = 0;
- process_name_[0] = '\0';
-#if defined (ACE_WIN32)
- ACE_OS::memset ((void *) &this->startup_info_,
- 0,
- sizeof this->startup_info_);
- this->startup_info_.cb = sizeof this->startup_info_;
-#endif /* ACE_WIN32 */
-#endif /* !ACE_HAS_WINCE */
-}
-
-#if !defined (ACE_HAS_WINCE)
-#if defined (ACE_WIN32)
-void
-ACE_Process_Options::inherit_environment (void)
-{
- // Ensure only once execution.
- if (environment_inherited_)
- return;
- environment_inherited_ = 1;
-
- // Get the existing environment.
- ACE_TCHAR *existing_environment = ACE_OS::getenvstrings ();
-
- int slot = 0;
-
- while (existing_environment[slot] != '\0')
- {
- int len = ACE_OS::strlen (existing_environment + slot);
-
- // Add the string to our env buffer.
- if (this->setenv_i (existing_environment + slot, len) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p.\n"),
- ACE_TEXT ("ACE_Process_Options::ACE_Process_Options")));
- break;
- }
-
- // Skip to the next word.
- slot += len + 1;
- }
-
- ACE_TEXT_FreeEnvironmentStrings (existing_environment);
-}
-
-#else /* defined ACE_WIN32 */
-
-ACE_TCHAR * const *
-ACE_Process_Options::env_argv (void)
-{
- return environment_argv_;
-}
-
-#endif /* ACE_WIN32 */
-
-int
-ACE_Process_Options::setenv (ACE_TCHAR *envp[])
-{
- int i = 0;
- while (envp[i])
- {
- if (this->setenv_i (envp[i],
- ACE_OS::strlen (envp[i])) == -1)
- return -1;
- i++;
- }
-
-#if defined (ACE_WIN32)
- if (inherit_environment_)
- this->inherit_environment ();
-#endif /* ACE_WIN32 */
-
- return 0;
-}
-
-int
-ACE_Process_Options::setenv (const ACE_TCHAR *format, ...)
-{
- ACE_TCHAR stack_buf[DEFAULT_COMMAND_LINE_BUF_LEN];
-
- // Start varargs.
- va_list argp;
- va_start (argp, format);
-
- // Add the rest of the varargs.
- ACE_OS::vsprintf (stack_buf,
- format,
- argp);
- // End varargs.
- va_end (argp);
-
- // Append the string to are environment buffer.
- if (this->setenv_i (stack_buf,
- ACE_OS::strlen (stack_buf)) == -1)
- return -1;
-
-#if defined (ACE_WIN32)
- if (inherit_environment_)
- this->inherit_environment ();
-#endif /* ACE_WIN32 */
-
- return 0;
-}
-
-int
-ACE_Process_Options::setenv (const ACE_TCHAR *variable_name,
- const ACE_TCHAR *format, ...)
-{
- ACE_TCHAR newformat[DEFAULT_COMMAND_LINE_BUF_LEN];
-
- // Add in the variable name.
- ACE_OS::sprintf (newformat,
- ACE_TEXT ("%s=%s"),
- variable_name,
- format);
-
- ACE_TCHAR stack_buf[DEFAULT_COMMAND_LINE_BUF_LEN];
-
- // Start varargs.
- va_list argp;
- va_start (argp, format);
-
- // Add the rest of the varargs.
- ACE_OS::vsprintf (stack_buf, newformat, argp);
-
- // End varargs.
- va_end (argp);
-
- // Append the string to our environment buffer.
- if (this->setenv_i (stack_buf,
- ACE_OS::strlen (stack_buf)) == -1)
- return -1;
-
-#if defined (ACE_WIN32)
- if (inherit_environment_)
- this->inherit_environment ();
-#endif /* ACE_WIN32 */
-
- return 0;
-}
-
-int
-ACE_Process_Options::setenv_i (ACE_TCHAR *assignment,
- int len)
-{
- // Add one for the null char.
- len++;
-
- // If environment larger than allocated buffer return. Also check to
- // make sure we have enough room.
- if (environment_argv_index_ == max_environ_argv_index_
- || (len + environment_buf_index_) >= environment_buf_len_)
- return -1;
-
- // Copy the new environment string.
- ACE_OS::memcpy (environment_buf_ + environment_buf_index_,
- assignment,
- len * sizeof (ACE_TCHAR));
-
- // Update the argv array.
- environment_argv_[environment_argv_index_++] =
- environment_buf_ + environment_buf_index_;
- environment_argv_[environment_argv_index_] = 0;
-
- // Update our index.
- environment_buf_index_ += len;
-
- // Make sure the buffer is null-terminated.
- environment_buf_[environment_buf_index_] = '\0';
- return 0;
-}
-
-int
-ACE_Process_Options::set_handles (ACE_HANDLE std_in,
- ACE_HANDLE std_out,
- ACE_HANDLE std_err)
-{
- this->set_handles_called_ = 1;
-#if defined (ACE_WIN32)
-
- // Tell the new process to use our std handles.
- this->startup_info_.dwFlags = STARTF_USESTDHANDLES;
-
- if (std_in == ACE_INVALID_HANDLE)
- std_in = ACE_STDIN;
- if (std_out == ACE_INVALID_HANDLE)
- std_out = ACE_STDOUT;
- if (std_err == ACE_INVALID_HANDLE)
- std_err = ACE_STDERR;
-
- if (!::DuplicateHandle (::GetCurrentProcess (),
- std_in,
- ::GetCurrentProcess (),
- &this->startup_info_.hStdInput,
- NULL,
- TRUE,
- DUPLICATE_SAME_ACCESS))
- return -1;
-
- if (!::DuplicateHandle (::GetCurrentProcess (),
- std_out,
- ::GetCurrentProcess (),
- &this->startup_info_.hStdOutput,
- NULL,
- TRUE,
- DUPLICATE_SAME_ACCESS))
- return -1;
-
- if (!::DuplicateHandle (::GetCurrentProcess (),
- std_err,
- ::GetCurrentProcess (),
- &this->startup_info_.hStdError,
- NULL,
- TRUE,
- DUPLICATE_SAME_ACCESS))
- return -1;
-#else /* ACE_WIN32 */
- this->stdin_ = ACE_OS::dup (std_in);
- this->stdout_ = ACE_OS::dup (std_out);
- this->stderr_ = ACE_OS::dup (std_err);
-#endif /* ACE_WIN32 */
-
- return 0; // Success.
-}
-#endif /* !ACE_HAS_WINCE */
-
-ACE_Process_Options::~ACE_Process_Options (void)
-{
-#if !defined (ACE_HAS_WINCE)
- if (set_handles_called_)
- {
-#if defined (ACE_WIN32)
- ACE_OS::close (startup_info_.hStdInput);
- ACE_OS::close (startup_info_.hStdOutput);
- ACE_OS::close (startup_info_.hStdError);
-#else /* ACE_WIN32 */
- ACE_OS::close (stdin_);
- ACE_OS::close (stdout_);
- ACE_OS::close (stderr_);
-#endif /* ACE_WIN32 */
- set_handles_called_ = 0;
- }
- delete [] environment_buf_;
- delete [] environment_argv_;
-#endif /* !ACE_HAS_WINCE */
- delete [] command_line_buf_;
-}
-
-int
-ACE_Process_Options::command_line (const ACE_TCHAR *const argv[])
-{
- // @@ Factor out the code between this
- int i = 0;
-
- if (argv[i])
- {
- ACE_OS::strcat (command_line_buf_, argv[i]);
- while (argv[++i])
- {
- ACE_OS::strcat (command_line_buf_,
- ACE_TEXT (" "));
- ACE_OS::strcat (command_line_buf_,
- argv[i]);
- }
- }
-
- return 0; // Success.
-}
-
-int
-ACE_Process_Options::command_line (const ACE_TCHAR *format, ...)
-{
- // Store all ... args in argp.
- va_list argp;
- va_start (argp, format);
-
- // sprintf the format and args into command_line_buf__.
- ACE_OS::vsprintf (command_line_buf_,
- format,
- argp);
-
- // Useless macro.
- va_end (argp);
-
- return 0;
-}
-
-ACE_TCHAR *
-ACE_Process_Options::env_buf (void)
-{
-#if !defined (ACE_HAS_WINCE)
- if (environment_buf_[0] == '\0')
- return 0;
- else
- return environment_buf_;
-#else
- return 0;
-#endif /* !ACE_HAS_WINCE */
-}
-
-ACE_TCHAR * const *
-ACE_Process_Options::command_line_argv (void)
-{
- if (command_line_argv_calculated_ == 0)
- {
- command_line_argv_calculated_ = 1;
-
- // This tokenizer will replace all spaces with end-of-string
- // characters and will preserve text between "" and '' pairs.
- ACE_Tokenizer parser (command_line_buf_);
- parser.delimiter_replace (' ', '\0');
- parser.preserve_designators ('\"', '\"'); // "
- parser.preserve_designators ('\'', '\'');
-
- int x = 0;
- do
- command_line_argv_[x] = parser.next ();
- while (command_line_argv_[x] != 0
- // substract one for the ending zero.
- && ++x < MAX_COMMAND_LINE_OPTIONS - 1);
-
- command_line_argv_[x] = 0;
- }
-
- return command_line_argv_;
-}
-
diff --git a/ace/Process.h b/ace/Process.h
deleted file mode 100644
index 5e848ec5441..00000000000
--- a/ace/Process.h
+++ /dev/null
@@ -1,440 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Process.h
-//
-// = AUTHOR
-// Tim Harrison <harrison@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_PROCESS_H
-#define ACE_PROCESS_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Process_Options
-{
- // = TITLE
- // Process Options
- //
- // = DESCRIPTION
- // This class controls the options passed to <CreateProcess> (or <fork>
- // and <exec>).
- // Notice that on Windows CE, creating a process merely means
- // instantiating a new process. You can't set the handles (since
- // there's no stdin, stdout and stderr,) specify process/thread
- // options, set environment,... So, basically, this class only
- // set the command line and nothing else.
- //
- // Notice that on UNIX platforms, if the <setenv> is used, the
- // <spawn> is using the <execve> system call. It means that the
- // <command_line> should include a full path to the program file
- // (<execve> does not search the PATH). If <setenv> is not used
- // then, the <spawn> is using the <execvp> which searches for the
- // program file in the PATH variable.
-public:
- enum
- {
- DEFAULT_COMMAND_LINE_BUF_LEN = 1024,
- // UNIX process creation flags.
-#if defined (ACE_WIN32)
- NO_EXEC = 0
-#else
- NO_EXEC = 1
-#endif /* ACE_WIN32 */
- };
-
-protected:
- // = Default settings not part of public Interface.
- //
- // @@ These sizes should be taken from the appropriate
- // POSIX/system header files and/or defined dynamically.
- enum
- {
- MAX_COMMAND_LINE_OPTIONS = 128,
- ENVIRONMENT_BUFFER = 16 * 1024, // 16K
- MAX_ENVIRONMENT_ARGS = 512 //
- };
-
-public:
- ACE_Process_Options (int inherit_environment = 1,
- int command_line_buf_len = DEFAULT_COMMAND_LINE_BUF_LEN,
- int env_buf_len = ENVIRONMENT_BUFFER,
- int max_env_args = MAX_ENVIRONMENT_ARGS);
- // If <inherit_environment> == 1, the new process will inherit the
- // environment of the current process. <command_line_buf_len> is the
- // max strlen for command-line arguments.
-
- ~ACE_Process_Options (void);
- // Destructor.
-
- // = Methods to set process creation options portably.
-
- int set_handles (ACE_HANDLE std_in,
- ACE_HANDLE std_out = ACE_INVALID_HANDLE,
- ACE_HANDLE std_err = ACE_INVALID_HANDLE);
- // Set the standard handles of the new process to the respective
- // handles. If you want to affect a subset of the handles, make
- // sure to set the others to ACE_INVALID_HANDLE. Returns 0 on
- // success, -1 on failure.
-
- int setenv (const ACE_TCHAR *format,
- ...);
- // <format> must be of the form "VARIABLE=VALUE". There can not be
- // any spaces between VARIABLE and the equal sign.
-
- int setenv (const ACE_TCHAR *variable_name,
- const ACE_TCHAR *format,
- ...);
- // Set a single environment variable, <variable_name>. Since
- // different platforms separate each environment variable
- // differently, you must call this method once for each variable.
- // <format> can be any printf format string. So options->setenv
- // ("FOO","one + two = %s", "three") will result in "FOO=one + two =
- // three".
-
- int setenv (ACE_TCHAR *envp[]);
- // Same as above with argv format. <envp> must be null terminated.
-
- void working_directory (const ACE_TCHAR *wd);
- // Set the working directory for the process. strlen of <wd> must
- // be <= MAXPATHLEN.
-
- int command_line (const ACE_TCHAR *format, ...);
- // Set the command-line arguments. <format> can use any printf
- // formats. The first token in <format> should be the path to the
- // application. This can either be a full path, relative path, or
- // just an executable name. If an executable name is used, we rely
- // on the platform's support for searching paths. Since we need a
- // path to run a process, this method *must* be called! Returns 0
- // on success, -1 on failure.
-
- int command_line (const ACE_TCHAR * const argv[]);
- // Same as above in argv format. <argv> must be null terminated.
-
- // = Set/get the pathname used to name the process.
- void process_name (const ACE_TCHAR *name);
- // Specify the full path or relative path, or just the executable
- // name for the process. If this is set, then <name> will be used to
- // create the process instead of argv[0] set in the command
- // line. This is here so that you can supply something other than
- // executable name as argv[0].
-
- const ACE_TCHAR *process_name (void);
- // Return the process_name. If the <process_name(name)> set
- // method is not called, this method will return argv[0].
-
- // = Set/get creation flags.
- u_long creation_flags (void) const;
- // Get the creation flags.
- void creation_flags (u_long);
- // Set the creation flags.
-
- // = <ACE_Process> uses these operations to retrieve option values.
-
- ACE_TCHAR *working_directory (void);
- // Current working directory. Returns "" if nothing has been set.
-
- ACE_TCHAR *command_line_buf (void);
- // Buffer of command-line options. Returns exactly what was passed
- // to this->command_line.
-
- ACE_TCHAR * const *command_line_argv (void);
- // argv-style command-line options. Parses and modifies the string
- // created from <command_line_>. All spaces not in quotes ("" or
- // '') are replaced with null (\0) bytes. An argv array is built
- // and returned with each entry pointing to the start of
- // null-terminated string. Returns { 0 } if nothing has been set.
-
- ACE_TCHAR *env_buf (void);
- // Null-terminated buffer of null terminated strings. Each string
- // is an environment assignment "VARIABLE=value". This buffer
- // should end with two null characters.
-
- // = Get/set process group.
- pid_t getgroup (void) const;
- pid_t setgroup (pid_t pgrp);
- // On UNIX, these methods are used by the <ACE_Process_Manager> to
- // manage groups of processes.
-
-#if defined (ACE_WIN32)
- // = Non-portable accessors for when you "just have to use them."
-
- ACE_TEXT_STARTUPINFO *startup_info (void);
- // Used for setting and getting.
-
- LPSECURITY_ATTRIBUTES get_process_attributes (void) const;
- // Get the process_attributes. Returns NULL if
- // set_process_attributes has not been set.
-
- LPSECURITY_ATTRIBUTES set_process_attributes (void);
- // If this is called, a non-null process attributes is sent to
- // CreateProcess.
-
- LPSECURITY_ATTRIBUTES get_thread_attributes (void) const;
- // Get the thread_attributes. Returns NULL if set_thread_attributes
- // has not been set.
-
- LPSECURITY_ATTRIBUTES set_thread_attributes (void);
- // If this is called, a non-null thread attributes is sent to
- // CreateProcess.
-
- int handle_inheritence (void);
- // Default is TRUE.
- void handle_inheritence (int);
- // Allows disabling of handle inheritence.
-#else /* All things not WIN32 */
-
- ACE_TCHAR *const *env_argv (void);
- // argv-style array of environment settings.
-
- // = Accessors for the standard handles.
- ACE_HANDLE get_stdin (void);
- ACE_HANDLE get_stdout (void);
- ACE_HANDLE get_stderr (void);
-
- void avoid_zombies (int);
- // Set value for avoid_zombies.
- int avoid_zombies (void);
- // Get current value for avoid_zombies.
-
- // = Set/get real & effective user & group id associated with user.
- int setreugid (const ACE_TCHAR* user);
- void setruid (uid_t id);
- void seteuid (uid_t id);
- void setrgid (uid_t id);
- void setegid (uid_t id);
- uid_t getruid (void);
- uid_t geteuid (void);
- uid_t getrgid (void);
- uid_t getegid (void);
-#endif /* ACE_WIN32 */
-protected:
-
-#if !defined (ACE_HAS_WINCE)
- int setenv_i (ACE_TCHAR *assignment, int len);
- // Add <assignment> to environment_buf_ and adjust
- // environment_argv_. <len> is the strlen of <assignment>.
-
- int inherit_environment_;
- // Whether the child process inherits the current process
- // environment.
-#endif /* !ACE_HAS_WINCE */
-
- u_long creation_flags_;
- // Default 0.
-
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
- void inherit_environment (void);
- // Helper function to grab win32 environment and stick it in
- // environment_buf_ using this->setenv_i.
-
- int environment_inherited_;
- // Ensures once only call to inherit environment.
-
- ACE_TEXT_STARTUPINFO startup_info_;
-
- BOOL handle_inheritence_;
- // Default TRUE.
-
- LPSECURITY_ATTRIBUTES process_attributes_;
- // Pointer to security_buf1_.
-
- LPSECURITY_ATTRIBUTES thread_attributes_;
- // Pointer to security_buf2_.
-
- SECURITY_ATTRIBUTES security_buf1_;
- // Data for process_attributes_.
-
- SECURITY_ATTRIBUTES security_buf2_;
- // Data for thread_attributes_.
-
-#else /* !ACE_WIN32 */
- ACE_HANDLE stdin_;
- ACE_HANDLE stdout_;
- ACE_HANDLE stderr_;
- int avoid_zombies_;
- // Avoid zombies for spawned processes.
-
- // = Real & effective user & group id's.
- // These should be set to -1 to leave unchanged (default).
- uid_t ruid_;
- uid_t euid_;
- uid_t rgid_;
- uid_t egid_;
-#endif /* ACE_WIN32 */
-
-#if !defined (ACE_HAS_WINCE)
- int set_handles_called_;
- // Is 1 if stdhandles was called.
-
- int environment_buf_index_;
- // Pointer into environment_buf_. This should point to the next
- // free spot.
-
- int environment_argv_index_;
- // Pointer to environment_argv_.
-
- ACE_TCHAR *environment_buf_;
- // Pointer to buffer of the environment settings.
-
- int environment_buf_len_;
- // Size of the environment buffer. Configurable
-
- ACE_TCHAR **environment_argv_;
- // Pointers into environment_buf_.
-
- int max_environment_args_;
- // Maximum number of environment variables. Configurable
-
- int max_environ_argv_index_;
- // Maximum index of environment_argv_ buffer
-
- ACE_TCHAR working_directory_[MAXPATHLEN + 1];
- // The current working directory.
-#endif /* !ACE_HAS_WINCE */
-
- int command_line_argv_calculated_;
- // Ensures command_line_argv is only calculated once.
-
- ACE_TCHAR *command_line_buf_;
- // Pointer to buffer of command-line arguments. E.g., "-f foo -b bar".
-
- ACE_TCHAR *command_line_argv_[MAX_COMMAND_LINE_OPTIONS];
- // Argv-style command-line arguments.
-
- pid_t process_group_;
- // Process-group on Unix; unused on Win32.
-
- ACE_TCHAR process_name_[MAXPATHLEN + 1];
- // Pathname for the process. Relative path or absolute path or just
- // the program name.
-};
-
-class ACE_Export ACE_Process
-{
- // = TITLE
- // Process
- //
- // = DESCRIPTION
- // A Portable encapsulation for creating new processes.
- //
- // Notice that on UNIX platforms, if the <setenv> is used, the
- // <spawn> is using the <execve> system call. It means that the
- // <command_line> should include a full path to the program file
- // (<execve> does not search the PATH). If <setenv> is not used
- // then, the <spawn> is using the <execvp> which searches for the
- // program file in the PATH variable.
-public:
-
- ACE_Process (void);
- // Default construction. Must use <ACE_Process::spawn> to start.
-
- virtual ~ACE_Process (void);
- // Destructor.
-
- virtual int prepare (ACE_Process_Options &options);
- // Called just before <ACE_OS::fork> in the <spawn>. If this
- // returns non-zero, the <spawn> is aborted (and returns
- // ACE_INVALID_PID). The default simply returns zero.
-
- virtual pid_t spawn (ACE_Process_Options &options);
- // Launch a new process as described by <options>. Returns the
- // process id of the newly spawned child on success or -1 on
- // failure.
-
- virtual void parent (pid_t child);
- // Called just after <ACE_OS::fork> in the parent's context, if the
- // <fork> succeeds. The default is to do nothing.
-
- virtual void child (pid_t parent);
- // Called just after <ACE_OS::fork> in the child's context. The
- // default does nothing. This function is *not* called on Win32
- // because the process-creation scheme does not allow it.
-
- virtual void unmanage (void);
- // Called by a <Process_Manager> that is removing this Process from
- // its table of managed Processes. Default is to do nothing.
-
- pid_t wait (ACE_exitcode *status = 0,
- int wait_options = 0);
- // Wait for the process we've created to exit. If <status> != 0, it
- // points to an integer where the function store the exit status of
- // child process to. If <wait_options> == <WNOHANG> then return 0
- // and don't block if the child process hasn't exited yet. A return
- // value of -1 represents the <wait> operation failed, otherwise,
- // the child process id is returned.
-
- pid_t wait (const ACE_Time_Value &tv,
- ACE_exitcode *status = 0);
- // Timed wait for the process we've created to exit. A return value
- // of -1 indicates that the something failed; 0 indicates that a
- // timeout occurred. Otherwise, the child's process id is returned.
- // If <status> != 0, it points to an integer where the function
- // stores the child's exit status.
- //
- // NOTE: on UNIX platforms this function uses <ualarm>, i.e., it
- // overwrites any existing alarm. In addition, it steals all
- // <SIGCHLD>s during the timeout period, which will break another
- // <ACE_Process_Manager> in the same process that's expecting
- // <SIGCHLD> to kick off process reaping.
-
- int kill (int signum = SIGINT);
- // Send the process a signal. This is only portable to operating
- // systems that support signals, such as UNIX/POSIX.
-
- int terminate (void);
- // Terminate the process abruptly using <ACE::terminate_process>.
- // This call doesn't give the process a chance to cleanup, so use it
- // with caution...
-
- pid_t getpid (void) const;
- // Return the process id of the new child process.
-
- ACE_HANDLE gethandle (void) const;
- // Return the handle of the process, if it has one.
-
- int running (void) const;
- // Return 1 if running; 0 otherwise.
-
- int exit_code (void) const;
- // Return the Process' exit code
-
- void exit_code (int code);
- // Set the Process' exit code (completely unrelated to whether the
- // Process has actually exited)!
-
-#if defined (ACE_WIN32)
- PROCESS_INFORMATION process_info (void);
-#endif /* ACE_WIN32 */
-
-protected:
-#if defined (ACE_WIN32)
- PROCESS_INFORMATION process_info_;
-#else /* ACE_WIN32 */
- pid_t child_id_;
- // Process id of the child.
-#endif /* ACE_WIN32 */
- int exit_code_;
-};
-
-#include "ace/SString.h"
-
-#if defined (__ACE_INLINE__)
-#include "ace/Process.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_PROCESS_H */
diff --git a/ace/Process.i b/ace/Process.i
deleted file mode 100644
index c4208b73298..00000000000
--- a/ace/Process.i
+++ /dev/null
@@ -1,359 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#if defined (ACE_WIN32)
-
-ACE_INLINE PROCESS_INFORMATION
-ACE_Process::process_info (void)
-{
- return process_info_;
-}
-#endif /* ACE_WIN32 */
-
-ACE_INLINE ACE_HANDLE
-ACE_Process::gethandle (void) const
-{
-#if defined (ACE_WIN32)
- return process_info_.hProcess;
-#else
- return ACE_HANDLE (child_id_);
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE pid_t
-ACE_Process::getpid (void)
- const
-{
-#if defined (ACE_WIN32)
- return process_info_.dwProcessId;
-#else /* ACE_WIN32 */
- return child_id_;
-#endif /* ACE_WIN32 */
-}
-
-ACE_INLINE pid_t
-ACE_Process::wait (ACE_exitcode *status,
- int wait_options)
-{
- return ACE_OS::wait (this->getpid (),
- status,
- wait_options
-#if defined (ACE_WIN32)
- , process_info_.hProcess
-#endif /* ACE_WIN32 */
- );
-}
-
-ACE_INLINE int
-ACE_Process::kill (int signum)
-{
- return ACE_OS::kill (this->getpid (),
- signum);
-}
-
-ACE_INLINE int
-ACE_Process::terminate (void)
-{
- return ACE::terminate_process (this->getpid ());
-}
-
-ACE_INLINE int
-ACE_Process::exit_code (void) const
-{
- return this->exit_code_;
-}
-
-ACE_INLINE void
-ACE_Process::exit_code (int code)
-{
- this->exit_code_ = code;
-}
-
-ACE_INLINE u_long
-ACE_Process_Options::creation_flags (void) const
-{
-#if defined (UNICODE) && !defined (ACE_HAS_WINCE)
- return creation_flags_ | CREATE_UNICODE_ENVIRONMENT;
-#else
- return creation_flags_;
-#endif /* UNICODE */
-}
-
-ACE_INLINE void
-ACE_Process_Options::creation_flags (u_long cf)
-{
- creation_flags_ = cf;
-}
-
-ACE_INLINE pid_t
-ACE_Process_Options::getgroup (void) const
-{
- return process_group_;
-}
-
-ACE_INLINE pid_t
-ACE_Process_Options::setgroup (pid_t pgrp)
-{
- pid_t old = process_group_;
- process_group_ = pgrp;
- return old;
-}
-
-#if defined (ACE_WIN32)
-
-ACE_INLINE ACE_TEXT_STARTUPINFO *
-ACE_Process_Options::startup_info (void)
-{
-#if !defined (ACE_HAS_WINCE)
- return &startup_info_;
-#else
- return 0;
-#endif /* !ACE_HAS_WINCE */
-}
-
-ACE_INLINE LPSECURITY_ATTRIBUTES
-ACE_Process_Options::get_process_attributes (void) const
-{
-#if !defined (ACE_HAS_WINCE)
- return process_attributes_;
-#else
- return 0;
-#endif /* !ACE_HAS_WINCE */
-}
-
-ACE_INLINE LPSECURITY_ATTRIBUTES
-ACE_Process_Options::set_process_attributes (void)
-{
-#if !defined (ACE_HAS_WINCE)
- process_attributes_ = &security_buf1_;
- return process_attributes_;
-#else
- return 0;
-#endif /* !ACE_HAS_WINCE */
-}
-
-ACE_INLINE LPSECURITY_ATTRIBUTES
-ACE_Process_Options::get_thread_attributes (void) const
-{
-#if !defined (ACE_HAS_WINCE)
- return thread_attributes_;
-#else
- return 0;
-#endif /* !ACE_HAS_WINCE */
-}
-
-ACE_INLINE LPSECURITY_ATTRIBUTES
-ACE_Process_Options::set_thread_attributes (void)
-{
-#if !defined (ACE_HAS_WINCE)
- thread_attributes_ = &security_buf2_;
- return thread_attributes_;
-#else
- return 0;
-#endif /* !ACE_HAS_WINCE */
-}
-
-
-ACE_INLINE int
-ACE_Process_Options::handle_inheritence (void)
-{
-#if !defined (ACE_HAS_WINCE)
- return handle_inheritence_;
-#else
- return FALSE;
-#endif /* !ACE_HAS_WINCE */
-}
-
-ACE_INLINE void
-ACE_Process_Options::handle_inheritence (int hi)
-{
-#if !defined (ACE_HAS_WINCE)
- handle_inheritence_ = hi;
-#else
- ACE_UNUSED_ARG (hi);
-#endif /* !ACE_HAS_WINCE */
-}
-
-#else /* !defined (ACE_WIN32) */
-
-ACE_INLINE ACE_HANDLE
-ACE_Process_Options::get_stdin (void)
-{
- return stdin_;
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_Process_Options::get_stdout (void)
-{
- return stdout_;
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_Process_Options::get_stderr (void)
-{
- return stderr_;
-}
-
-ACE_INLINE int
-ACE_Process_Options::avoid_zombies (void)
-{
- return avoid_zombies_;
-}
-ACE_INLINE void
-ACE_Process_Options::avoid_zombies (int avoid_zombies)
-{
- avoid_zombies_ = avoid_zombies;
-}
-
-ACE_INLINE int
-ACE_Process_Options::setreugid (const char* user)
-{
-#if !defined (ACE_LACKS_PWD_FUNCTIONS)
- struct passwd *ent = ACE_OS::getpwnam (user);
-
- if (ent != 0)
- {
- this->euid_ = ent->pw_uid;
- this->ruid_ = ent->pw_uid;
- this->egid_ = ent->pw_gid;
- this->rgid_ = ent->pw_gid;
- return 0;
- }
- else
- return -1;
-#else
- ACE_UNUSED_ARG (user);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_LACKS_PWD_FUNCTIONS */
-}
-
-ACE_INLINE void
-ACE_Process_Options::setruid (uid_t id)
-{
- this->ruid_ = id;
-}
-
-ACE_INLINE void
-ACE_Process_Options::seteuid (uid_t id)
-{
- this->euid_ = id;
-}
-
-ACE_INLINE void
-ACE_Process_Options::setrgid (uid_t id)
-{
- this->rgid_ = id;
-}
-
-ACE_INLINE void
-ACE_Process_Options::setegid (uid_t id)
-{
- this->egid_ = id;
-}
-
-ACE_INLINE uid_t
-ACE_Process_Options::getruid (void)
-{
- return this->ruid_;
-}
-
-ACE_INLINE uid_t
-ACE_Process_Options::geteuid (void)
-{
- return this->euid_;
-}
-
-ACE_INLINE uid_t
-ACE_Process_Options::getrgid (void)
-{
- return this->rgid_;
-}
-
-ACE_INLINE uid_t
-ACE_Process_Options::getegid (void)
-{
- return this->egid_;
-}
-#endif /* ACE_WIN32 */
-
-ACE_INLINE ACE_TCHAR *
-ACE_Process_Options::command_line_buf (void)
-{
- return command_line_buf_;
-}
-
-ACE_INLINE ACE_TCHAR *
-ACE_Process_Options::working_directory (void)
-{
-#if !defined (ACE_HAS_WINCE)
- if (working_directory_[0] == '\0')
- return 0;
- else
- return working_directory_;
-#else
- return 0;
-#endif /* !ACE_HAS_WINCE */
-}
-
-ACE_INLINE void
-ACE_Process_Options::working_directory (const ACE_TCHAR *wd)
-{
-#if !defined(ACE_HAS_WINCE)
- ACE_OS::strcpy (working_directory_, wd);
-#else
- ACE_UNUSED_ARG (wd);
-#endif /* !ACE_HAS_WINCE */
-}
-
-ACE_INLINE void
-ACE_Process_Options::process_name (const ACE_TCHAR *p)
-{
- ACE_OS::strcpy (this->process_name_, p);
-}
-
-ACE_INLINE const ACE_TCHAR *
-ACE_Process_Options::process_name (void)
-{
- if (process_name_[0] == '\0')
- this->process_name (this->command_line_argv ()[0]);
-
- return this->process_name_;
-}
-
-#if defined (ACE_HAS_WINCE)
-// Here is a collection of inline functions which are defined only
-// under CE. They are not empty on most other platforms.
-
-ACE_INLINE int
-ACE_Process_Options::setenv (ACE_TCHAR *envp[])
-{
- ACE_UNUSED_ARG (envp);
- return -1;
-}
-
-ACE_INLINE int
-ACE_Process_Options::setenv (const ACE_TCHAR *format, ...)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Process_Options::setenv (const ACE_TCHAR *variable_name,
- const ACE_TCHAR *format,
- ...)
-{
- return -1;
-}
-
-ACE_INLINE int
-ACE_Process_Options::set_handles (ACE_HANDLE std_in,
- ACE_HANDLE std_out,
- ACE_HANDLE std_err)
-{
- ACE_UNUSED_ARG (std_in);
- ACE_UNUSED_ARG (std_out);
- ACE_UNUSED_ARG (std_err);
- return -1;
-}
-
-#endif /* ACE_HAS_WINCE */
diff --git a/ace/Process_Manager.cpp b/ace/Process_Manager.cpp
deleted file mode 100644
index 0449db4759a..00000000000
--- a/ace/Process_Manager.cpp
+++ /dev/null
@@ -1,955 +0,0 @@
-// $Id$
-
-// Process_Manager.cpp
-#include "ace/Synch_T.h"
-#include "ace/Process.h"
-#include "ace/Signal.h"
-#include "ace/Process_Manager.h"
-#include "ace/Object_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Process_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Process_Manager, "$Id$")
-
-class ACE_Managed_Process : public ACE_Process
-{
- // = TITLE
- // <ACE_Managed_Process> is just an <ACE_Process> with an
- // <unmanage> method that deletes the instance.
-public:
- ACE_Managed_Process (void);
- // Constructor.
-
- virtual void unmanage (void);
- // Cleanup by deleting <this>.
-
-private:
- virtual ~ACE_Managed_Process (void);
- // Make sure that we're allocated dynamically!
-
- friend class ace_dewarn_gplusplus;
- // Keep G++ happy...
-};
-
-ACE_Managed_Process::ACE_Managed_Process (void)
-{
-}
-
-ACE_Managed_Process::~ACE_Managed_Process (void)
-{
-}
-
-void
-ACE_Managed_Process::unmanage (void)
-{
- delete this;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Process_Manager)
-
-// Singleton instance.
-ACE_Process_Manager *ACE_Process_Manager::instance_ = 0;
-
-// Controls whether the <Process_Manager> is deleted when we shut down
-// (we can only delete it safely if we created it!)
-int ACE_Process_Manager::delete_instance_ = 0;
-
-ACE_Process_Descriptor::~ACE_Process_Descriptor (void)
-{
-}
-
-void
-ACE_Process_Descriptor::dump (void) const
-{
- ACE_TRACE ("ACE_Process_Descriptor::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nproc_id_ = %d"),
- this->process_->getpid( )));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Process_Manager::dump (void) const
-{
- ACE_TRACE ("ACE_Process_Manager::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmax_process_table_size_ = %d"), this->max_process_table_size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncurrent_count_ = %d"), this->current_count_));
-
- for (size_t i = 0; i < this->current_count_; i++)
- this->process_table_[i].dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Process_Descriptor::ACE_Process_Descriptor (void)
- : process_ (0),
- exit_notify_ (0)
-{
- ACE_TRACE ("ACE_Process_Descriptor::ACE_Process_Descriptor");
-}
-
-ACE_Process_Manager *
-ACE_Process_Manager::instance (void)
-{
- ACE_TRACE ("ACE_Process_Manager::instance");
-
- if (ACE_Process_Manager::instance_ == 0)
- {
- // Perform Double-Checked Locking Optimization.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
-
- if (ACE_Process_Manager::instance_ == 0)
- {
- ACE_NEW_RETURN (ACE_Process_Manager::instance_,
- ACE_Process_Manager,
- 0);
- ACE_Process_Manager::delete_instance_ = 1;
- }
- }
-
- return ACE_Process_Manager::instance_;
-}
-
-ACE_Process_Manager *
-ACE_Process_Manager::instance (ACE_Process_Manager *tm)
-{
- ACE_TRACE ("ACE_Process_Manager::instance");
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
-
- ACE_Process_Manager *t = ACE_Process_Manager::instance_;
- // We can't safely delete it since we don't know who created it!
- ACE_Process_Manager::delete_instance_ = 0;
-
- ACE_Process_Manager::instance_ = tm;
- return t;
-}
-
-int
-ACE_Process_Manager::resize (size_t size)
-{
- ACE_TRACE ("ACE_Process_Manager::resize");
-
- ACE_Process_Descriptor *temp;
-
- ACE_NEW_RETURN (temp,
- ACE_Process_Descriptor[size],
- -1);
-
- for (size_t i = 0;
- i < this->current_count_;
- i++)
- // Structure assignment.
- temp[i] = this->process_table_[i];
-
- this->max_process_table_size_ = size;
-
- delete [] this->process_table_;
-
- this->process_table_ = temp;
- return 0;
-}
-
-// Create and initialize the table to keep track of the process pool.
-
-int
-ACE_Process_Manager::open (size_t size,
- ACE_Reactor *r)
-{
- ACE_TRACE ("ACE_Process_Manager::open");
-
-#if !defined (ACE_LACKS_SETPGID)
- // Set up a process group so that the thread that opened this
- // Manager will be able to put children into its own group and wait
- // for them.
- if (ACE_OS::setpgid (0, 0) == -1)
- ACE_ERROR ((LM_WARNING,
- ACE_TEXT ("%p.\n"),
- ACE_TEXT ("ACE_Process_Manager::open: can't create a ")
- ACE_TEXT ("process group; some wait functions may fail")));
-#endif /* ACE_LACKS_SETPGID */
-
- if (r)
- {
- ACE_Event_Handler::reactor (r);
-#if !defined(ACE_WIN32) && !defined (ACE_PSOS)
- // (No signals for child-exited on Win32) Assign the
- // Process_Manager a dummy I/O descriptor. Note that even
- // though we open this file "Write Only" we still need to use
- // the ACE_Event_Handler::NULL_MASK when registering this with
- // the ACE_Reactor (see below).
- this->dummy_handle_ = ACE_OS::open (ACE_DEV_NULL,
- O_WRONLY);
- ACE_ASSERT (this->dummy_handle_ != ACE_INVALID_HANDLE);
-#if defined (F_SETFD)
- // Don't want children to inherit the dummy I/O handle!
- ACE_OS::fcntl (this->dummy_handle_, F_SETFD, 1);
-#endif /* F_SETFD */
-
- // Register signal handler object. Note that NULL_MASK is used
- // to keep the ACE_Reactor from calling us back on the
- // "/dev/null" descriptor. NULL_MASK just reserves a "slot" in
- // the Reactor's internal demuxing table, but doesn't cause it
- // to dispatch the event handler directly. Instead, we use the
- // signal handler to do this.
- if (reactor ()->register_handler
- (this,
- ACE_Event_Handler::NULL_MASK) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "register_handler",
- 1));
-
- if (reactor ()->register_handler
- (SIGCHLD, this) == -1)
- ACE_ERROR ((LM_ERROR,
- "%p\n%a",
- "register_handler",
- 1));
-#endif // !defined(ACE_WIN32) && !defined (ACE_PSOS)
- }
-
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- if (this->max_process_table_size_ < size)
- this->resize (size);
- return 0;
-}
-
-// Initialize the synchronization variables.
-
-ACE_Process_Manager::ACE_Process_Manager (size_t size,
- ACE_Reactor *r)
- : ACE_Event_Handler (),
- process_table_ (0),
- max_process_table_size_ (0),
- current_count_ (0),
-#if !defined(ACE_WIN32)
- dummy_handle_ (ACE_INVALID_HANDLE),
-#endif // !defined(ACE_WIN32)
- default_exit_handler_ (0)
-#if defined (ACE_HAS_THREADS)
- , lock_ ()
-#endif /* ACE_HAS_THREADS */
-{
- ACE_TRACE ("ACE_Process_Manager::ACE_Process_Manager");
-
- if (this->open (size,
- r) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Process_Manager")));
-}
-
-// Close up and release all resources.
-
-int
-ACE_Process_Manager::close (void)
-{
- ACE_TRACE ("ACE_Process_Manager::close");
-
-#if !defined (ACE_WIN32)
- if (this->reactor ())
- {
- this->reactor ()->remove_handler (this, 0);
- this->reactor (0);
- }
-#endif /* !ACE_WIN32 */
-
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- if (this->process_table_ != 0)
- {
- while (this->current_count_ > 0)
- this->remove_proc (0);
-
- delete [] this->process_table_;
- this->process_table_ = 0;
- this->max_process_table_size_ = 0;
- this->current_count_ = 0;
- }
-
- if (this->default_exit_handler_ != 0)
- this->default_exit_handler_->handle_close (ACE_INVALID_HANDLE,0);
- this->default_exit_handler_ = 0;
-
- return 0;
-}
-
-ACE_Process_Manager::~ACE_Process_Manager (void)
-{
- ACE_TRACE ("ACE_Process_Manager::~ACE_Process_Manager");
- this->close ();
-}
-
-#if !defined (ACE_WIN32)
-
-// This is called when the Reactor notices that a Process has exited.
-// What has actually happened is a SIGCHLD invoked the <handle_signal>
-// routine, which fooled the Reactor into thinking that this routine
-// needed to be called. Since we don't know which Process exited, we
-// must reap as many exit statuses as are immediately available.
-
-int
-ACE_Process_Manager::handle_input (ACE_HANDLE)
-{
- ACE_TRACE ("ACE_Process_Manager::handle_input");
-
- pid_t pid;
-
- do
- pid = this->wait (0,
- ACE_Time_Value::zero);
- while (pid != 0 && pid != ACE_INVALID_PID);
-
- return 0;
-}
-
-ACE_HANDLE
-ACE_Process_Manager::get_handle (void) const
-{
- return this->dummy_handle_;
-}
-#endif /* !ACE_WIN32 */
-
-// On Unix, this routine is called asynchronously when a SIGCHLD is
-// received. We just tweak the reactor so that it'll call back our
-// <handle_input> function, which allows us to handle Process exits
-// synchronously.
-//
-// On Win32, this routine is called synchronously, and is passed the
-// HANDLE of the Process that exited, so we can do all our work here.
-
-int
-ACE_Process_Manager::handle_signal (int,
- siginfo_t *si,
- ucontext_t *)
-{
-#if defined (ACE_WIN32)
- ACE_HANDLE proc = si->si_handle_;
- ACE_exitcode status = 0;
- BOOL result = ::GetExitCodeProcess (proc,
- &status);
- if (result)
- {
- if (status != STILL_ACTIVE)
- {
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock_, -1));
-
- ssize_t i = this->find_proc (proc);
- pid_t pid = i != -1
- ? process_table_[i].process_->getpid ()
- : ACE_INVALID_PID;
- this->notify_proc_handler (i, status);
- this->remove_proc (i);
- }
- return -1; // remove this HANDLE/Event_Handler combination
- }
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Process still active")
- ACE_TEXT (" -- shouldn't have been called yet!\n")),
- 0); // return 0 : stay registered
- }
- else
- {
- // <GetExitCodeProcess> failed.
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("GetExitCodeProcess failed")),
- -1); // return -1: unregister
- }
-#else /* !ACE_WIN32 */
- ACE_UNUSED_ARG (si);
- return reactor ()->ready_ops
- (this->dummy_handle_,
- ACE_Event_Handler::READ_MASK,
- ACE_Reactor::ADD_MASK);
-#endif /* !ACE_WIN32 */
-}
-
-int
-ACE_Process_Manager::register_handler (ACE_Event_Handler *eh,
- pid_t pid)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- if (pid == ACE_INVALID_PID)
- {
- if (this->default_exit_handler_ != 0)
- this->default_exit_handler_->handle_close
- (ACE_INVALID_HANDLE,
- 0);
- this->default_exit_handler_ = eh;
- return 0;
- }
-
- ssize_t i = this->find_proc (pid);
-
- if (i == -1)
- // set "process not found" error
- return -1;
- else
- {
- ACE_Process_Descriptor &proc_desc = this->process_table_[i];
-
- if (proc_desc.exit_notify_ != 0)
- proc_desc.exit_notify_->handle_close
- (ACE_INVALID_HANDLE,
- 0);
- proc_desc.exit_notify_ = eh;
- return 0;
- }
-}
-
-int
-ACE_Process_Manager::handle_close (ACE_HANDLE handle,
- ACE_Reactor_Mask)
-{
- ACE_TRACE ("ACE_Process_Manager::handle_close");
- ACE_UNUSED_ARG (handle);
-
-#if !defined (ACE_WIN32)
- ACE_ASSERT (handle == this->dummy_handle_);
-
- ACE_OS::close (dummy_handle_);
-#endif /* ACE_WIN32 */
- return 0;
-}
-
-// Create a new process.
-
-pid_t
-ACE_Process_Manager::spawn (ACE_Process_Options &options)
-{
- ACE_Process *process;
- ACE_NEW_RETURN (process,
- ACE_Managed_Process,
- ACE_INVALID_PID);
-
- return spawn (process, options);
-}
-
-// Create a new process.
-
-pid_t
-ACE_Process_Manager::spawn (ACE_Process *process,
- ACE_Process_Options &options)
-{
- ACE_TRACE ("ACE_Process_Manager::spawn");
-
- if (options.getgroup () == ACE_INVALID_PID)
- options.setgroup (ACE_OS::getpid ());
-
- pid_t pid = process->spawn (options);
-
- // Only include the pid in the parent's table.
- if (pid == ACE_INVALID_PID
- || pid == 0)
- return pid;
- else
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex,
- ace_mon, this->lock_, -1));
-
- if (this->append_proc (process) == -1)
- // bad news: spawned, but not registered in table.
- return ACE_INVALID_PID;
- else
- return pid;
- }
-}
-
-// Create N new processs.
-
-int
-ACE_Process_Manager::spawn_n (size_t n,
- ACE_Process_Options &options,
- pid_t *child_pids)
-{
- ACE_TRACE ("ACE_Process_Manager::spawn_n");
-
- if (child_pids != 0)
- for (size_t i = 0;
- i < n;
- ++i)
- child_pids[i] = ACE_INVALID_PID;
-
- for (size_t i = 0;
- i < n;
- i++)
- {
- pid_t pid = this->spawn (options);
- if (pid == ACE_INVALID_PID || pid == 0)
- // We're in the child or something's gone wrong.
- return pid;
- else if (child_pids != 0)
- child_pids[i] = pid;
- }
-
- return 0;
-}
-
-// Append a process into the pool (does not check for duplicates).
-// Must be called with locks held.
-
-int
-ACE_Process_Manager::append_proc (ACE_Process *proc)
-{
- ACE_TRACE ("ACE_Process_Manager::append_proc");
-
- // Try to resize the array to twice its existing size if we run out
- // of space...
- if (this->current_count_ >= this->max_process_table_size_
- && this->resize (this->max_process_table_size_ * 2) == -1)
- return -1;
- else
- {
- ACE_Process_Descriptor &proc_desc =
- this->process_table_[this->current_count_];
-
- proc_desc.process_ = proc;
- proc_desc.exit_notify_ = 0;
-
-#if defined (ACE_WIN32)
- // If we have a Reactor, then we're supposed to reap Processes
- // automagically. Get a handle to this new Process and tell the
- // Reactor we're interested in <handling_input> on it.
-
- ACE_Reactor *r = this->reactor ();
- if (r != 0)
- r->register_handler (this,
- proc->gethandle ());
-#endif /* ACE_WIN32 */
-
- this->current_count_++;
- return 0;
- }
-}
-
-// Insert a process into the pool (checks for duplicates and doesn't
-// allow them to be inserted twice).
-
-int
-ACE_Process_Manager::insert_proc (ACE_Process *proc)
-{
- ACE_TRACE ("ACE_Process_Manager::insert_proc");
-
- // Check for duplicates and bail out if they're already
- // registered...
- if (this->find_proc (proc->getpid ()) != -1)
- return -1;
-
- return this->append_proc (proc);
-}
-
-// Remove a process from the pool.
-
-int
-ACE_Process_Manager::remove (pid_t pid)
-{
- ACE_TRACE ("ACE_Process_Manager::remove");
-
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- ssize_t i = this->find_proc (pid);
-
- if (i != -1)
- return this->remove_proc (i);
- else
- // set "process not found" error
- return -1;
-}
-
-// Remove a process from the pool. Must be called with locks held.
-
-int
-ACE_Process_Manager::remove_proc (size_t i)
-{
- ACE_TRACE ("ACE_Process_Manager::remove");
-
- // If there's an exit_notify_ <Event_Handler> for this pid, call its
- // <handle_close> method.
-
- if (this->process_table_[i].exit_notify_ != 0)
- {
- this->process_table_[i].exit_notify_->handle_close
- (this->process_table_[i].process_->gethandle(),
- 0);
- this->process_table_[i].exit_notify_ = 0;
- }
-
-#if defined (ACE_WIN32)
- ACE_Reactor *r = this->reactor ();
- if (r != 0)
- r->remove_handler (this->process_table_[i].process_->gethandle (),
- ACE_Event_Handler::DONT_CALL);
-#endif /* ACE_WIN32 */
-
- this->process_table_[i].process_->unmanage ();
-
- this->process_table_[i].process_ = 0;
-
- this->current_count_--;
-
- if (this->current_count_ > 0)
- // Compact the table by moving the last item into the slot vacated
- // by the index being removed (this is a structure assignment).
- this->process_table_[i] =
- this->process_table_[this->current_count_];
-
- return 0;
-}
-
-int
-ACE_Process_Manager::terminate (pid_t pid)
-{
- ACE_TRACE ("ACE_Process_Manager::terminate");
-
- // Check for duplicates and bail out if they're already
- // registered...
- ssize_t i = this->find_proc (pid);
-
- if (i == -1)
- // set "no such process" error
- return -1;
-
- int result = ACE::terminate_process (pid);
-
- if (result != -1)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- this->remove (i);
- return 0;
- }
- else
- return -1;
-}
-
-int
-ACE_Process_Manager::terminate (pid_t pid,
- int sig)
-{
- ACE_TRACE ("ACE_Process_Manager::terminate");
-
- // Check for duplicates and bail out if they're already
- // registered...
- ssize_t i = this->find_proc (pid);
-
- if (i == -1)
- // set "no such process" error
- return -1;
-
- return ACE_OS::kill (pid, sig);
-}
-
-// Locate the index in the table associated with <pid>. Must be
-// called with the lock held.
-
-ssize_t
-ACE_Process_Manager::find_proc (pid_t pid)
-{
- ACE_TRACE ("ACE_Process_Manager::find_proc");
-
- for (size_t i = 0; i < this->current_count_; ++i)
- if (pid == this->process_table_[i].process_->getpid ())
- return i;
-
- return -1;
-}
-
-#if defined (ACE_WIN32)
-// Locate the index in the table associated with <h>. Must be
-// called with the lock held.
-
-ssize_t
-ACE_Process_Manager::find_proc (ACE_HANDLE h)
-{
- ACE_TRACE ("ACE_Process_Manager::find_proc");
-
- for (size_t i = 0; i < this->current_count_; ++i)
- if (h == this->process_table_[i].process_->gethandle ())
- return i;
-
- return -1;
-}
-#endif /* ACE_WIN32 */
-
-// Wait for all the Processs to exit, or until <timeout> elapses.
-// Returns the number of Processes remaining, or -1 on an error.
-
-int
-ACE_Process_Manager::wait (const ACE_Time_Value &timeout)
-{
- ACE_TRACE ("ACE_Process_Manager::wait");
-
- ACE_Time_Value until = timeout;
- ACE_Time_Value remaining = timeout;
-
- if (until < ACE_Time_Value::max_time)
- until += ACE_OS::gettimeofday ();
-
- while (current_count_ > 0)
- {
- pid_t pid = this->wait (0, remaining);
-
- if (pid == ACE_INVALID_PID) // wait() failed
- return -1;
- else if (pid == 0) // timeout
- break;
-
- remaining = until < ACE_Time_Value::max_time
- ? until - ACE_OS::gettimeofday ()
- : ACE_Time_Value::max_time;
-
- if (remaining <= ACE_Time_Value::zero)
- break;
-
- // else Process terminated...wait for more...
- }
- return current_count_;
-}
-
-// Collect a single child process' exit status. Store the exit code
-// in *<stat_loc> if non-zero. Call the appropriate exit_notify. If
-// <pid> == 0, wait for any of the Process_Manager's children (or as
-// near as possible -- on Unix, we might accidentally get some other
-// Process_Manager's Process, or an unmanaged Process, or a child
-// process started by some other means.
-
-pid_t
-ACE_Process_Manager::wait (pid_t pid,
- ACE_exitcode *status)
-{
- ACE_TRACE ("ACE_Process_Manager::wait");
-
- return this->wait (pid,
- ACE_Time_Value::max_time,
- status);
-}
-
-// Collect a single child processes' exit status, unless <timeout>
-// elapses before the process exits. Same caveats about accidental
-// Process reaping on Unix as above.
-
-pid_t
-ACE_Process_Manager::wait (pid_t pid,
- const ACE_Time_Value &timeout,
- ACE_exitcode *status)
-{
- ACE_TRACE ("ACE_Process_Manager::wait");
-
- ACE_exitcode local_stat = 0;
- if (status == 0)
- status = &local_stat;
-
- *status = 0;
-
- ssize_t idx = -1;
- ACE_Process *proc = 0;
-
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- if (pid != 0)
- {
- idx = this->find_proc (pid);
- if (idx == -1)
- return ACE_INVALID_PID;
- else
- proc = process_table_[idx].process_;
- }
-
- if (proc != 0)
- pid = proc->wait (timeout, status);
- else
- {
- // Wait for any Process spawned by this Process_Manager.
-#if defined (ACE_WIN32)
- HANDLE *handles;
-
- ACE_NEW_RETURN (handles,
- HANDLE[current_count_],
- ACE_INVALID_PID);
-
- for (size_t i = 0;
- i < current_count_;
- ++i)
- handles[i] =
- process_table_[i].process_->gethandle ();
-
- DWORD result = ::WaitForMultipleObjects (current_count_,
- handles,
- FALSE,
- timeout == ACE_Time_Value::max_time
- ? INFINITE
- : timeout.msec ());
- if (result == WAIT_FAILED)
- pid = ACE_INVALID_PID;
- else if (result == WAIT_TIMEOUT)
- pid = 0;
- else
- {
- ACE_ASSERT (result >= WAIT_OBJECT_0
- && result < WAIT_OBJECT_0 + current_count_);
-
- idx = this->find_proc (handles[result - WAIT_OBJECT_0]);
-
- if (idx != -1)
- {
- pid = process_table_[idx].process_->getpid ();
- result = ::GetExitCodeProcess (handles[result - WAIT_OBJECT_0],
- status);
- if (result == 0)
- {
- // <GetExitCodeProcess> failed!
- this->remove_proc (idx);
- pid = ACE_INVALID_PID;
- }
- }
- else
- {
- // uh oh...handle removed from process_table_, even though
- // we're holding a lock!
- delete [] handles;
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Process removed")
- ACE_TEXT (" -- somebody's ignoring the lock!\n")),
- -1);
- }
- }
-
- delete [] handles;
-#else /* !defined(ACE_WIN32) */
- if (timeout == ACE_Time_Value::max_time)
- pid = ACE_OS::waitpid (-(ACE_OS::getpid ()),
- status,
- 0);
- else if (timeout == ACE_Time_Value::zero)
- pid = ACE_OS::waitpid (-(ACE_OS::getpid ()),
- status,
- WNOHANG);
- else
- {
- ACE_Time_Value wait_until =
- timeout + ACE_OS::gettimeofday();
-
- for (;;)
- {
- pid = ACE_OS::waitpid (-(ACE_OS::getpid()),
- status,
- WNOHANG);
- if (pid != 0)
- // "no such children" error, or got one!
- break;
-
- ACE_Sig_Set alarm_or_child;
-
- alarm_or_child.sig_add (SIGALRM);
- alarm_or_child.sig_add (SIGCHLD);
-
- ACE_Time_Value time_left = wait_until - ACE_OS::gettimeofday ();
-
- // if ACE_OS::ualarm doesn't have sub-second resolution:
- time_left += ACE_Time_Value (0, 500000);
- time_left.usec (0);
-
- if (time_left <= ACE_Time_Value::zero) {
- pid = 0;
- break;
- }
-
- ACE_OS::ualarm (time_left);
- ACE_OS::sigwait (alarm_or_child);
- }
- }
-#endif /* !defined (ACE_WIN32) */
- }
-
- if (pid != ACE_INVALID_PID && pid != 0)
- {
- if (proc == 0)
- {
- idx = this->find_proc (pid);
- if (idx == -1)
- {
- // oops, reaped an unmanaged process!
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) oops, reaped unmanaged %d\n"),
- pid));
- return pid;
- }
- else
- proc = process_table_[idx].process_;
- }
- else
- ACE_ASSERT (pid == proc->getpid ());
-
- this->notify_proc_handler (idx,
- *status);
- this->remove_proc (idx);
- }
-
- return pid;
-}
-
-// Legacy method:
-
-int
-ACE_Process_Manager::reap (pid_t pid,
- ACE_exitcode *stat_loc,
- int options)
-{
- ACE_TRACE ("ACE_Process_Manager::reap");
-
- return this->wait (pid,
- (ACE_BIT_ENABLED (options, WNOHANG)
- ? ACE_Time_Value::zero
- : ACE_Time_Value::max_time),
- stat_loc);
-}
-
-// Notify either the process-specific handler or the generic handler.
-// If process-specific, call handle_close on the handler. Returns 1
-// if process found, 0 if not. Must be called with locks held.
-
-int
-ACE_Process_Manager::notify_proc_handler (size_t i,
- ACE_exitcode exit_code)
-{
- if (i < current_count_)
- {
- ACE_Process_Descriptor &proc_desc =
- this->process_table_[i];
-
- proc_desc.process_->exit_code (exit_code);
-
- if (proc_desc.exit_notify_ != 0)
- proc_desc.exit_notify_->handle_exit (proc_desc.process_);
- else if (this->default_exit_handler_ != 0
- && this->default_exit_handler_->handle_exit (proc_desc.process_) < 0)
- {
- this->default_exit_handler_->handle_close
- (ACE_INVALID_HANDLE,
- 0);
- this->default_exit_handler_ = 0;
- }
- return 1;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P:%t|%T) ACE_Process_Manager::notify_proc_handler:"),
- ACE_TEXT (" unknown/unmanaged process reaped\n")));
- return 0;
- }
-}
diff --git a/ace/Process_Manager.h b/ace/Process_Manager.h
deleted file mode 100644
index 1458f3d1091..00000000000
--- a/ace/Process_Manager.h
+++ /dev/null
@@ -1,390 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Process_Manager.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_PROCESS_MANAGER_H
-#define ACE_PROCESS_MANAGER_H
-#include "ace/pre.h"
-
-#include "ace/Synch.h"
-#include "ace/Reactor.h"
-#include "ace/Event_Handler.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Process.h"
-
-class ACE_Export ACE_Process_Descriptor
-{
- // = TITLE
- // Information describing each process that's controlled by an
- // <ACE_Process_Manager>.
-private:
- friend class ACE_Process_Manager;
-
- ACE_Process_Descriptor (void);
- ~ACE_Process_Descriptor (void);
- // Default ctor/dtor.
-
- ACE_Process *process_;
- // Describes the process itself.
-
- ACE_Event_Handler *exit_notify_;
- // function to call when process exits
-
- void dump (void) const;
- // Dump the state of an object.
-};
-
-class ACE_Export ACE_Process_Manager : protected ACE_Event_Handler
-{
- // = TITLE
- // Manages a group of processes.
- //
- // = DESCRIPTION
- // This class allows applications to control groups of processes,
- // similar to how the <ACE_Thread_Manager> controls groups of
- // threads. Naturally, it doesn't work at all on platforms, such
- // as VxWorks or pSoS, that don't support process.
- //
- // There are two (main) ways of using <ACE_Process_Manager>,
- // depending on how involved you wish to be with the termination
- // of managed <ACE_Process>es. If you just want <Process>es to
- // go away when they're finished, simply register the
- // <Process_Manager> with an <ACE_Reactor>:
- //
- // ACE_Process_Manager mgr( 100, some_reactor )
- // -or-
- // ACE_Process_Manager mgr;
- // ...
- // mgr.open( 100, some_reactor );
- //
- // Then, the <Process_Manager> will clean up after any
- // <Process>es that it spawns. (On Unix, this means executing a
- // wait(2) to collect the exit status -- and avoid zombie
- // processes; on Win32, it means closing the process and thread
- // HANDLEs that are created when CreateProcess is called.)
- //
- // If, on the other hand (and for some inexplicable reason) you
- // want to explicitly invoke the terminated <Process> cleanup
- // code, then *don't* register the <Process_Manager> with a
- // Reactor, and be sure to call one of the
- // <Process_Manager::wait> functions whenever there might be
- // managed <Process>es that have exited.
- //
- // Note that in either case, <Process_Manager> allows you to
- // register "<Event_Handlers>" to be called when a specific
- // <Process> exits, or when any <Process> without a specific
- // <Event_Handler> exits. When a <Process> exits, the
- // appropriate <Event_Handler>'s <handle_input> is called; the
- // <ACE_HANDLE> passed is either the Process' HANDLE (on Win32),
- // or its pid cast to an <ACE_HANDLE> (on unix).
- //
- // It is also possible to call the <Process_Manager::wait>
- // functions even though the <Process_Manager> is registered with
- // a <Reactor>. I don't know what happens in this case, but it's
- // probably not *too* bad.
- //
- // Note also that the wait functions are "sloppy" on Unix,
- // because there's no good way to wait for a subset of the
- // children of a process. The wait functions may end up
- // collecting the exit status of a process that's not managed by
- // the <Process_Manager> whose <wait> you invoked. It's best to
- // only use a single <Process_Manager>, and to create all
- // subprocesses by calling that <Process_Manager>'s <spawn>
- // method. (I have some ideas for workarounds to improve this
- // situation, but I consider it fairly low priority because I
- // think the "single <Process_Manager>" pattern will be
- // sufficient in most cases.)
- //
- // Incidentally, here's how the auto-reaping works on unix when
- // you register your <Process_Manager> with a <Reactor>:
- //
- // * the <Process_Manager> opens ACE_DEV_NULL to get a dummy
- // <HANDLE>.
- //
- // * the dummy <HANDLE> is registered with the <Reactor>, but
- // with a NULL_MASK so that it's never normally active.
- //
- // * the <Process_Manager> also registers a signal handler for
- // SIGCHLD.
- //
- // * the SIGCHLD handler, when invoked, marks the dummy <HANDLE>
- // as ready for input.
- //
- // * the <Reactor> calls the <Process_Manager>'s <handle_input>
- // (this happens synchronously, not in sighandler-space).
- //
- // * <handle_input> collects all available exit statuses.
-public:
- friend class ACE_Process_Control;
-
- enum
- {
- DEFAULT_SIZE = 100
- };
-
- // = Initialization and termination methods.
- ACE_Process_Manager (size_t size = ACE_Process_Manager::DEFAULT_SIZE,
- ACE_Reactor *reactor = 0);
- // Initialize an <ACE_Process_Manager> with a table containing up to
- // <size> processes. This table resizes itself automatically as
- // needed. If a non-NULL <reactor> is provided, this
- // <ACE_Process_Manager> uses it to notify an application when a
- // process it controls exits. By default, however, we don't use an
- // <ACE_Reactor>.
-
- int open (size_t size = DEFAULT_SIZE,
- ACE_Reactor *r = 0);
- // Initialize an <ACE_Process_Manager> with a table containing up to
- // <size> processes. This table resizes itself automatically as
- // needed. If a non-NULL <reactor> is provided, this
- // <ACE_Process_Manager> uses it to notify an application when a
- // process it controls exits. By default, however, we don't use an
- // <ACE_Reactor>.
-
- int close (void);
- // Release all resources. Do not wait for processes to exit.
-
- virtual ~ACE_Process_Manager (void);
- // Destructor releases all resources and does not wait for processes
- // to exit.
-
- // = Singleton accessors.
- static ACE_Process_Manager *instance (void);
- // Get pointer to a process-wide <ACE_Process_Manager>.
-
- static ACE_Process_Manager *instance (ACE_Process_Manager *);
- // Set pointer to a process-wide <ACE_Process_Manager> and return
- // existing pointer.
-
- // = Process creation methods.
-
- pid_t spawn (ACE_Process *proc,
- ACE_Process_Options &options);
- // Create a new process by passing <options> to <proc.spawn>. On
- // success, returns the process id of the child that was created.
- // On failure, returns ACE_INVALID_PID.
-
- pid_t spawn (ACE_Process_Options &options);
- // Create a new process by passing <options> to
- // <ACE_Process::spawn>. On success, returns the process id of the
- // child that was created. On failure, returns ACE_INVALID_PID.
-
- int spawn_n (size_t n,
- ACE_Process_Options &options,
- pid_t *child_pids = 0);
- // Create <n> new processes by passing <options> to
- // <ACE_Process::spawn>, which is called <n> times. If <child_pids>
- // is non-0 it is expected to be an array of <n> <pid_t>'s, which
- // are filled in with the process ids of each newly created process.
- // Returns 0 on success and -1 on failure.
-
- // = Process synchronization operations.
-
- int wait (const ACE_Time_Value &timeout = ACE_Time_Value::max_time);
- // Block until there are no more child processes running that were
- // <spawn>ed by this <ACE_Process_Manager>. Unlike the <wait> call
- // below, this method does not require a signal handler or
- // <ACE_OS::sigwait> because it simply blocks synchronously waiting
- // for all the children managed by this <ACE_Process_Manager> to
- // exit. Note that this does not return any status information
- // about the success or failure of exiting child processes, although
- // any registered exit_handlers are called. Returns 0 on success
- // (and <remove>s the corresponding <ACE_Process_Descriptor> entries
- // from the <Process_Manager>; otherwise, returns -1 on failure.
-
- pid_t wait (pid_t pid,
- const ACE_Time_Value &timeout,
- ACE_exitcode *status = 0);
- // Wait up to <timeout> for a single process to terminate. If
- // pid==0, waits for any of the managed <Process>es (but see the
- // note in DESCRIPTION above for caveats about this -- "sloppy
- // Process cleanup on unix") If pid != 0, waits for that <Process>
- // only. Returns the pid of the Process whose exit was handled, 0
- // if a timeout occurred, or ACE_INVALID_PID on error.
-
- pid_t wait (pid_t pid,
- ACE_exitcode *status = 0);
- // Wait indefinitely for a single process to terminate. If pid==0,
- // waits for any of the managed <Process>es (but see the note in
- // DESCRIPTION above for caveats about this -- "sloppy Process
- // cleanup on unix") If pid != 0, waits for that <Process> only.
- // Returns the pid of the process whose exit was handled, or
- // ACE_INVALID_PID on error.
-
- int reap (pid_t pid = -1,
- ACE_exitcode *stat_loc = 0,
- int options = WNOHANG);
- // Reap the result of a single process by calling <ACE_OS::waitpid>,
- // therefore, this method is not portable to Win32. If the child is
- // successfully reaped, <remove> is called automatically. This
- // method does the same thing that the <wait> method directly above
- // it does -- It's just here for backwards compatibility.
-
- // = Utility methods.
- int register_handler (ACE_Event_Handler *event_handler,
- pid_t pid = ACE_INVALID_PID);
- // Register an Event_Handler to be called back when the specified
- // process exits. If pid == ACE_INVALID_PID this handler is called
- // when any process with no specific handler exits.
-
- int remove (pid_t pid);
- // Remove process <pid> from the table. This is called
- // automatically by the <reap> method after it successfully reaped a
- // <SIGCHLD> signal. It's also possible to call this method
- // directly from a signal handler, but don't call both <reap> and
- // <remove>!
-
- int terminate (pid_t pid);
- // Abruptly terminate a single process with id <pid> using the
- // <ACE::terminate_process> method. Note that this call is
- // potentially dangerous to use since the process being terminated
- // may not have a chance to cleanup before it shuts down. Returns 0
- // on success and -1 on failure.
-
- int terminate (pid_t pid,
- int sig);
- // On OSs that support signals, send the signal to the specified
- // process. Returns 0 on success and -1 on failure.
-
- size_t managed (void) const;
- // Return the number of managed Processes.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = These methods allow a <Process_Manager> to be an <Event_Handler>.
-
- // As an <Event_Handler>, the <Process_Manager> automagically
- // detects child Processes exiting and calls notify_proc_handler()
- // and remove(). This means that you don't have to (shouldn't!)
- // call the wait(...) methods yourself.
-
- // On Unix, we can't detect individual process termination very
- // well; the best method is to catch SIGCHLD and then call the
- // polling wait() function to collect any available exit statuses.
- // However, we don't want to do this from within a signal handler
- // because of the restrictions associated. Therefore (following the
- // lead in examples/mumble) we open a bogus handle (to ACE_DEV_NULL)
- // and register that handle with our Reactor. Then, when our
- // SIGCHLD handler gets invoked, we tell the Reactor that the bogus
- // handle is readable. That will cause the handle_input() function
- // to be called once we're out of the interrupt context, and
- // handle_input() collects exit statuses.
-
- // On Win32, we simply register ourself with the Reactor to deal
- // with the Process handle becoming signaled. No muss, no fuss, no
- // signal handler, and no dummy handle.
-
-#if !defined(ACE_WIN32)
- virtual int handle_input (ACE_HANDLE proc);
- // Collect one (or more, on unix) Process exit status
-
- virtual ACE_HANDLE get_handle (void) const;
- // (unix only) : return dummy handle
-#endif // !defined(ACE_WIN32)
-
- virtual int handle_signal (int signum,
- siginfo_t * = 0,
- ucontext_t * = 0);
- // On Unix, this routine is called asynchronously when a SIGCHLD is
- // received. We just tweak the reactor so that it'll call back our
- // <handle_input> function, which allows us to handle Process exits
- // synchronously.
- //
- // On Win32, this routine is called synchronously, and is passed the
- // HANDLE of the Process that exited, so we can do all our work here
-
- virtual int handle_close (ACE_HANDLE handle,
- ACE_Reactor_Mask close_mask);
- // we're being removed from Reactor...on unix, close bogus handle.
-
-private:
- int resize (size_t);
- // Resize the pool of Process_Descriptors.
-
- ssize_t find_proc (pid_t process_id);
- // Locate the index of the table slot occupied by <process_id>.
- // Returns -1 if <process_id> is not in the <process_table_>
-
-#if defined (ACE_WIN32)
- ssize_t find_proc (ACE_HANDLE process_handle);
- // Locate the index of the table slot occupied by <process_handle>.
- // Returns ~0 if <process_handle> is not in the <process_table_>
-#endif /* ACE_WIN32 */
-
- int insert_proc (ACE_Process *process);
- // Insert a process in the table (checks for duplicates). Omitting
- // the process handle won't work on Win32...
-
- int append_proc (ACE_Process *process);
- // Append information about a process, i.e., its <process_id> in the
- // <process_table_>. Each entry is added at the end, growing the
- // table if necessary.
-
- int remove_proc (size_t n);
- // Actually removes the process at index <n> from the table. This method
- // must be called with locks held.
-
- int notify_proc_handler (size_t n,
- ACE_exitcode status);
- // If there's a specific handler for the Process at index <n> in the
- // table, or there's a default handler, call it.
-
- ACE_Process_Descriptor *process_table_;
- // Vector that describes process state within the Process_Manager.
-
- size_t max_process_table_size_;
- // Maximum number of processes we can manage (should be dynamically
- // allocated).
-
- size_t current_count_;
- // Current number of processes we are managing.
-
-#if !defined(ACE_WIN32)
- ACE_HANDLE dummy_handle_;
- // Allows SIGCHLD to be handled synchronously.
-#endif
-
- ACE_Event_Handler *default_exit_handler_;
- // This event handler is used to notify when a process we control
- // exits.
-
- static ACE_Process_Manager *instance_;
- // Singleton pointer.
-
- static int delete_instance_;
- // Controls whether the <Process_Manager> is deleted when we shut
- // down (we can only delete it safely if we created it!)
-
-#if defined (ACE_HAS_THREADS)
- // = ACE_Thread_Mutex for access/ops on process_table_
- ACE_Thread_Mutex lock_;
-#endif /* ACE_HAS_THREADS */
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Process_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_PROCESS_MANAGER_H */
diff --git a/ace/Process_Manager.i b/ace/Process_Manager.i
deleted file mode 100644
index c6ee1f25260..00000000000
--- a/ace/Process_Manager.i
+++ /dev/null
@@ -1,8 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE size_t
-ACE_Process_Manager::managed (void) const
-{
- return current_count_;
-}
diff --git a/ace/Profile_Timer.cpp b/ace/Profile_Timer.cpp
deleted file mode 100644
index 0ec1f9ba00d..00000000000
--- a/ace/Profile_Timer.cpp
+++ /dev/null
@@ -1,409 +0,0 @@
-// $Id$
-
-#include "ace/Profile_Timer.h"
-
-#if !defined (__ACE_INLINE__)
-# include "ace/Profile_Timer.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Profile_Timer, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Profile_Timer)
-
-#if (defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE)) && !defined (ACE_WIN32)
-
-void
-ACE_Profile_Timer::dump (void) const
-{
- ACE_TRACE ("ACE_Profile_Timer::dump");
-}
-
-// Initialize interval timer.
-
-ACE_Profile_Timer::ACE_Profile_Timer (void)
-{
- ACE_TRACE ("ACE_Profile_Timer::ACE_Profile_Timer");
- ACE_OS::memset (&this->end_usage_, 0, sizeof this->end_usage_);
- ACE_OS::memset (&this->begin_usage_, 0, sizeof this->begin_usage_);
- ACE_OS::memset (&this->last_usage_, 0, sizeof this->last_usage_);
-
-# if defined (ACE_HAS_PRUSAGE_T)
- ACE_OS::memset (&this->last_usage_, 0, sizeof this->last_usage_);
- char buf[20];
- ACE_OS::sprintf (buf, "/proc/%d", ACE_static_cast (int, ACE_OS::getpid ()));
-
- if ((this->proc_handle_ = ACE_OS::open (buf, O_RDONLY, 0)) == -1)
- ACE_OS::perror (buf);
-# elif defined (ACE_HAS_GETRUSAGE)
- ACE_OS::memset (&this->begin_time_, 0, sizeof this->begin_time_);
- ACE_OS::memset (&this->end_time_, 0, sizeof this->end_time_);
- ACE_OS::memset (&this->last_time_, 0, sizeof this->last_time_);
-# endif /* ACE_HAS_PRUSAGE_T */
-}
-
-// Terminate the interval timer.
-ACE_Profile_Timer::~ACE_Profile_Timer (void)
-{
- ACE_TRACE ("ACE_Profile_Timer::~ACE_Profile_Timer");
-# if defined (ACE_HAS_PRUSAGE_T)
- if (ACE_OS::close (this->proc_handle_) == -1)
- ACE_OS::perror ("ACE_Profile_Timer::~ACE_Profile_Timer");
-# endif /* ACE_HAS_PRUSAGE_T */
-}
-
-// Return the resource utilization.
-
-void
-ACE_Profile_Timer::get_rusage (ACE_Profile_Timer::Rusage &usage)
-{
- ACE_TRACE ("ACE_Profile_Timer::get_rusage");
- usage = this->end_usage_;
-}
-
-# if defined (ACE_HAS_PRUSAGE_T)
-
-// Compute the amount of resource utilization since the start time.
-
-void
-ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &rusage)
-{
- ACE_TRACE ("ACE_Profile_Timer::elapsed_rusage");
- rusage.pr_lwpid =
- this->end_usage_.pr_lwpid - this->last_usage_.pr_lwpid;
- rusage.pr_count =
- this->end_usage_.pr_count - this->last_usage_.pr_count;
- rusage.pr_minf =
- this->end_usage_.pr_minf - this->last_usage_.pr_minf;
- rusage.pr_majf =
- this->end_usage_.pr_majf - this->last_usage_.pr_majf;
- rusage.pr_inblk =
- this->end_usage_.pr_inblk - this->last_usage_.pr_inblk;
- rusage.pr_oublk =
- this->end_usage_.pr_oublk - this->last_usage_.pr_oublk;
- rusage.pr_msnd =
- this->end_usage_.pr_msnd - this->last_usage_.pr_msnd;
- rusage.pr_mrcv =
- this->end_usage_.pr_mrcv - this->last_usage_.pr_mrcv;
- rusage.pr_sigs =
- this->end_usage_.pr_sigs - this->last_usage_.pr_sigs;
- this->subtract (rusage.pr_wtime,
- this->end_usage_.pr_wtime,
- this->last_usage_.pr_wtime);
- this->subtract (rusage.pr_ltime,
- this->end_usage_.pr_ltime,
- this->last_usage_.pr_ltime);
- this->subtract (rusage.pr_slptime,
- this->end_usage_.pr_slptime,
- this->last_usage_.pr_slptime);
- rusage.pr_vctx =
- this->end_usage_.pr_vctx - this->last_usage_.pr_vctx;
- rusage.pr_ictx =
- this->end_usage_.pr_ictx - this->last_usage_.pr_ictx;
- rusage.pr_sysc =
- this->end_usage_.pr_sysc - this->last_usage_.pr_sysc;
- rusage.pr_ioch =
- this->end_usage_.pr_ioch - this->last_usage_.pr_ioch;
-}
-
-// Compute the elapsed time.
-
-void
-ACE_Profile_Timer::compute_times (ACE_Elapsed_Time &et)
-{
- ACE_TRACE ("ACE_Profile_Timer::compute_times");
- timespec_t td;
-
- ACE_Profile_Timer::Rusage &end = this->end_usage_;
- ACE_Profile_Timer::Rusage &begin = this->begin_usage_;
-
- this->subtract (td, end.pr_tstamp, begin.pr_tstamp);
- // Convert nanoseconds into seconds.
- et.real_time = td.tv_sec + ((double) td.tv_nsec) / ACE_ONE_SECOND_IN_NSECS;
- this->subtract (td, end.pr_utime, begin.pr_utime);
- // Convert nanoseconds into seconds.
- et.user_time = td.tv_sec + ((double) td.tv_nsec) / ACE_ONE_SECOND_IN_NSECS;
- this->subtract (td, end.pr_stime, begin.pr_stime);
- // Convert nanoseconds into seconds.
- et.system_time = td.tv_sec + ((double) td.tv_nsec) / ACE_ONE_SECOND_IN_NSECS;
-}
-
-// Determine the difference between T1 and T2.
-
-void
-ACE_Profile_Timer::subtract (timespec_t &tdiff, timespec_t &t1, timespec_t &t0)
-{
- ACE_TRACE ("ACE_Profile_Timer::subtract");
- tdiff.tv_sec = t1.tv_sec - t0.tv_sec;
- tdiff.tv_nsec = t1.tv_nsec - t0.tv_nsec;
-
- // Normalize the time.
-
- while (tdiff.tv_nsec < 0)
- {
- tdiff.tv_sec--;
- tdiff.tv_nsec += ACE_ONE_SECOND_IN_NSECS;
- }
-}
-
-# elif defined (ACE_HAS_GETRUSAGE)
-// Compute the amount of resource utilization since the start time.
-
-void
-ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &usage)
-{
- ACE_TRACE ("ACE_Profile_Timer::elapsed_rusage");
-# if !defined (ACE_WIN32) && !defined (ACE_HAS_LIMITED_RUSAGE_T)
- // integral shared memory size
- usage.ru_ixrss =
- this->end_usage_.ru_ixrss - this->last_usage_.ru_ixrss;
- // integral unshared data "
- usage.ru_idrss =
- this->end_usage_.ru_idrss - this->last_usage_.ru_idrss;
- // integral unshared stack "
- usage.ru_isrss =
- this->end_usage_.ru_isrss - this->last_usage_.ru_isrss;
- // page reclaims - total vmfaults
- usage.ru_minflt =
- this->end_usage_.ru_minflt - this->last_usage_.ru_minflt;
- // page faults
- usage.ru_majflt =
- this->end_usage_.ru_majflt - this->last_usage_.ru_majflt;
- // swaps
- usage.ru_nswap =
- this->end_usage_.ru_nswap - this->last_usage_.ru_nswap;
- // block input operations
- usage.ru_inblock =
- this->end_usage_.ru_inblock - this->last_usage_.ru_inblock;
- // block output operations
- usage.ru_oublock =
- this->end_usage_.ru_oublock - this->last_usage_.ru_oublock;
- // messages sent
- usage.ru_msgsnd =
- this->end_usage_.ru_msgsnd - this->last_usage_.ru_msgsnd;
- // messages received
- usage.ru_msgrcv =
- this->end_usage_.ru_msgrcv - this->last_usage_.ru_msgrcv;
- // signals received
- usage.ru_nsignals =
- this->end_usage_.ru_nsignals - this->last_usage_.ru_nsignals;
- // voluntary context switches
- usage.ru_nvcsw =
- this->end_usage_.ru_nvcsw - this->last_usage_.ru_nvcsw;
- // involuntary context switches
- usage.ru_nivcsw =
- this->end_usage_.ru_nivcsw - this->last_usage_.ru_nivcsw;
- this->subtract (usage.ru_utime,
- this->end_usage_.ru_utime,
- this->last_usage_.ru_utime);
- this->subtract (usage.ru_stime,
- this->end_usage_.ru_stime,
- this->last_usage_.ru_stime);
-# else
- ACE_UNUSED_ARG(usage);
-# endif /* ACE_WIN32 */
-}
-
-void
-ACE_Profile_Timer::compute_times (ACE_Elapsed_Time &et)
-{
- ACE_TRACE ("ACE_Profile_Timer::compute_times");
-
-# if defined (ACE_WIN32)
- ACE_Time_Value atv = this->end_time_ - this->begin_time_;
- et.real_time = atv.sec () + ((double) atv.usec ()) / ACE_ONE_SECOND_IN_USECS;
-
- atv = ACE_Time_Value (this->end_usage_.ru_utime)
- - ACE_Time_Value (this->begin_usage_.ru_utime);
-
- et.user_time = atv.sec () + ((double) atv.usec ()) / ACE_ONE_SECOND_IN_USECS;
-
- atv = ACE_Time_Value (this->end_usage_.ru_stime)
- - ACE_Time_Value (this->begin_usage_.ru_stime);
- et.system_time = atv.sec () + ((double) atv.usec ()) / ACE_ONE_SECOND_IN_USECS;
-# else
- timeval td;
-
- this->subtract (td, this->end_time_, this->begin_time_);
- et.real_time = td.tv_sec + ((double) td.tv_usec) / ACE_ONE_SECOND_IN_USECS;
-
- this->subtract (td, this->end_usage_.ru_utime, this->begin_usage_.ru_utime);
- et.user_time = td.tv_sec + ((double) td.tv_usec) / ACE_ONE_SECOND_IN_USECS;
-
- this->subtract (td, this->end_usage_.ru_stime, this->begin_usage_.ru_stime);
- et.system_time = td.tv_sec + ((double) td.tv_usec) / ACE_ONE_SECOND_IN_USECS;
-# endif /* ACE_WIN32 */
-}
-
-// Determine the difference between T1 and T2.
-
-void
-ACE_Profile_Timer::subtract (timeval &tdiff, timeval &t1, timeval &t0)
-{
- ACE_TRACE ("ACE_Profile_Timer::subtract");
- tdiff.tv_sec = t1.tv_sec - t0.tv_sec;
- tdiff.tv_usec = t1.tv_usec - t0.tv_usec;
-
- // Normalize the time.
-
- while (tdiff.tv_usec < 0)
- {
- tdiff.tv_sec--;
- tdiff.tv_usec += ACE_ONE_SECOND_IN_USECS;
- }
-}
-
-# endif /* ACE_HAS_PRUSAGE_T */
-
-// Compute the amount of time that has elapsed between start and stop.
-
-int
-ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et)
-{
- ACE_TRACE ("ACE_Profile_Timer::elapsed_time");
- this->compute_times (et);
- return 0;
-}
-
-#elif defined (ACE_WIN32) /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */
-
-void
-ACE_Profile_Timer::dump (void) const
-{
- ACE_TRACE ("ACE_Profile_Timer::dump");
- timer_.dump ();
-}
-
-// Initialize interval timer.
-ACE_Profile_Timer::ACE_Profile_Timer (void)
- : timer_ ()
-{
- ACE_TRACE ("ACE_Profile_Timer::ACE_Profile_Timer");
-# if defined (ACE_HAS_GETRUSAGE)
-
- ACE_OS::memset (&this->end_usage_, 0, sizeof this->end_usage_);
- ACE_OS::memset (&this->begin_usage_, 0, sizeof this->begin_usage_);
- ACE_OS::memset (&this->last_usage_, 0, sizeof this->last_usage_);
-
- ACE_OS::memset (&this->begin_time_, 0, sizeof this->begin_time_);
- ACE_OS::memset (&this->end_time_, 0, sizeof this->end_time_);
- ACE_OS::memset (&this->last_time_, 0, sizeof this->last_time_);
-# endif /* ACE_HAS_GETRUSAGE */
-}
-
-int
-ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et)
-{
- ACE_TRACE ("ACE_Profile_Timer::elapsed_time");
-
- ACE_hrtime_t delta_t; // nanoseconds
- timer_.elapsed_time (delta_t);
-
- et.real_time = (__int64) delta_t / (double) ACE_ONE_SECOND_IN_NSECS;
-
-# if defined (ACE_HAS_GETRUSAGE)
- ACE_Time_Value atv = ACE_Time_Value (this->end_usage_.ru_utime)
- - ACE_Time_Value (this->begin_usage_.ru_utime);
- et.user_time = atv.sec () + ((double) atv.usec ()) / ACE_ONE_SECOND_IN_USECS;
-
- atv = ACE_Time_Value (this->end_usage_.ru_stime)
- - ACE_Time_Value (this->begin_usage_.ru_stime);
- et.system_time = atv.sec () + ((double) atv.usec ()) / ACE_ONE_SECOND_IN_USECS;
-# else /* ACE_HAS_GETRUSAGE */
- et.user_time = 0;
- et.system_time = 0;
-# endif /* ACE_HAS_GETRUSAGE */
-
- return 0;
-}
-
-// Return the resource utilization.
-
-void
-ACE_Profile_Timer::get_rusage (ACE_Profile_Timer::Rusage &usage)
-{
- ACE_TRACE ("ACE_Profile_Timer::get_rusage");
-# if defined (ACE_HAS_GETRUSAGE)
- usage = this->end_usage_;
-# else /* ACE_HAS_GETRUSAGE */
- usage = 0;
-# endif /* ACE_HAS_GETRUSAGE */
-}
-
-// Compute the amount of resource utilization since the start time.
-
-void
-ACE_Profile_Timer::elapsed_rusage (ACE_Profile_Timer::Rusage &usage)
-{
- ACE_TRACE ("ACE_Profile_Timer::elapsed_rusage");
-
-# if defined (ACE_HAS_GETRUSAGE)
- usage.ru_utime =
- this->end_usage_.ru_utime - this->begin_usage_.ru_utime;
- usage.ru_stime =
- this->end_usage_.ru_stime - this->begin_usage_.ru_stime;
-# else /* ACE_HAS_GETRUSAGE */
- usage = 0;
-# endif /* ACE_HAS_GETRUSAGE */
-}
-
-# if defined (ACE_HAS_GETRUSAGE)
-// Determine the difference between T1 and T2.
-
-void
-ACE_Profile_Timer::subtract (timeval &tdiff, timeval &t1, timeval &t0)
-{
- ACE_TRACE ("ACE_Profile_Timer::subtract");
- tdiff.tv_sec = t1.tv_sec - t0.tv_sec;
- tdiff.tv_usec = t1.tv_usec - t0.tv_usec;
-
- // Normalize the time.
-
- while (tdiff.tv_usec < 0)
- {
- tdiff.tv_sec--;
- tdiff.tv_usec += ACE_ONE_SECOND_IN_USECS;
- }
-}
-# endif /* ACE_HAS_GETRUSAGE */
-
-#else /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */
-
-void
-ACE_Profile_Timer::dump (void) const
-{
- ACE_TRACE ("ACE_Profile_Timer::dump");
- timer_.dump ();
-}
-
-ACE_Profile_Timer::ACE_Profile_Timer (void)
- : timer_ ()
-{
- ACE_TRACE ("ACE_Profile_Timer::ACE_Profile_Timer");
-}
-
-int
-ACE_Profile_Timer::elapsed_time (ACE_Elapsed_Time &et)
-{
- ACE_TRACE ("ACE_Profile_Timer::elapsed_time");
-
-# if defined (ACE_LACKS_FLOATING_POINT)
- ACE_Time_Value delta_t; /* elapsed time will be in microseconds */
- timer_.elapsed_time (delta_t);
-
- // Store the time in usecs.
- et.real_time = delta_t.sec () * ACE_ONE_SECOND_IN_USECS +
- delta_t.usec ();
-# else /* ! ACE_LACKS_FLOATING_POINT */
- ACE_hrtime_t delta_t; /* nanoseconds */
- timer_.elapsed_time (delta_t);
-
- et.real_time = delta_t / (double) ACE_ONE_SECOND_IN_NSECS;
-# endif /* ! ACE_LACKS_FLOATING_POINT */
-
- et.user_time = 0;
- et.system_time = 0;
-
- return 0;
-}
-
-#endif /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */
diff --git a/ace/Profile_Timer.h b/ace/Profile_Timer.h
deleted file mode 100644
index ddaae18d85e..00000000000
--- a/ace/Profile_Timer.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Profile_Timer.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_PROFILE_TIMER_H
-#define ACE_PROFILE_TIMER_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Time_Value.h"
-#include "ace/High_Res_Timer.h"
-
-class ACE_Export ACE_Profile_Timer
-{
- // = TITLE
- // This class provides both a timing mechanism and a mechanism
- // for reporting the resource usage of a process.
-public:
-
- class ACE_Elapsed_Time
- {
- // = TITLE
- // Keeps track of the various user, system, and elapsed (real)
- // times.
- //
- // = DESCRIPTION
- // If <ACE_HAS_FLOATING_POINT> is enabled these values are in
- // microseconds, otherwise, they are in seconds.
- public:
- ACE_timer_t real_time;
- ACE_timer_t user_time;
- ACE_timer_t system_time;
- };
-
- typedef ACE_Rusage Rusage;
-
- // = Initialization and termination methods.
- ACE_Profile_Timer (void);
- // Default constructor.
-
- ~ACE_Profile_Timer (void);
- // Shutdown the timer.
-
- // = Timer methods.
- int start (void);
- // Activate the timer.
-
- int stop (void);
- // Stop the timer.
-
- // = Resource utilization methods.
- int elapsed_time (ACE_Elapsed_Time &et);
- // Compute the time elapsed since <start>.
-
- void elapsed_rusage (ACE_Profile_Timer::Rusage &rusage);
- // Compute the amount of resource utilization since the start time.
-
- void get_rusage (ACE_Profile_Timer::Rusage &rusage);
- // Return the resource utilization (don't recompute it).
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- void compute_times (ACE_Elapsed_Time &et);
- // Compute how much time has elapsed.
-
- ACE_Profile_Timer::Rusage begin_usage_;
- // Keep track of the starting resource utilization.
-
- ACE_Profile_Timer::Rusage end_usage_;
- // Keep track of the ending resource utilization.
-
- ACE_Profile_Timer::Rusage last_usage_;
- // Keep track of the last rusage for incremental timing.
-
-#if defined (ACE_HAS_PRUSAGE_T)
- void subtract (timespec_t &tdiff, timespec_t &t0, timespec_t &t1);
- // Substract two timestructs and store their difference.
-
- ACE_HANDLE proc_handle_;
- // I/O handle for /proc file system.
-
-#elif defined (ACE_HAS_GETRUSAGE)
- void subtract (timeval &tdiff,
- timeval &t0,
- timeval &t1);
- // Substract two timestructs and store their difference.
-
- timeval begin_time_;
- // Keep track of the beginning time.
-
- timeval end_time_;
- // Keep track of the ending time.
-
- timeval last_time_;
- // Keep track of the last time for incremental timing.
-#endif /* ACE_HAS_PRUSAGE_T */
-
-#if defined (ACE_WIN32) || (!defined (ACE_HAS_PRUSAGE_T) && !defined (ACE_HAS_GETRUSAGE))
- ACE_High_Res_Timer timer_;
- // The high resolution timer
-#endif /* ACE_WIN32 || !ACE_HAS_PRUSAGE_T && !ACE_HAS_GETRUSAGE */
-};
-
-#if defined (__ACE_INLINE__)
-# include "ace/Profile_Timer.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_PROFILE_TIMER_H */
-
diff --git a/ace/Profile_Timer.i b/ace/Profile_Timer.i
deleted file mode 100644
index e77af9b1686..00000000000
--- a/ace/Profile_Timer.i
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#if (defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE)) && !defined (ACE_WIN32)
-
-# if defined (ACE_HAS_PRUSAGE_T)
-ACE_INLINE int
-ACE_Profile_Timer::start (void)
-{
- ACE_TRACE ("ACE_Profile_Timer::start");
- return ACE_OS::ioctl (this->proc_handle_,
- PIOCUSAGE,
- &this->begin_usage_);
-}
-
-ACE_INLINE int
-ACE_Profile_Timer::stop (void)
-{
- ACE_TRACE ("ACE_Profile_Timer::stop");
- this->last_usage_ = this->end_usage_;
- return ACE_OS::ioctl (this->proc_handle_,
- PIOCUSAGE,
- &this->end_usage_);
-}
-# elif defined (ACE_HAS_GETRUSAGE)
-ACE_INLINE int
-ACE_Profile_Timer::start (void)
-{
- ACE_TRACE ("ACE_Profile_Timer::start");
- this->begin_time_ = ACE_OS::gettimeofday ();
- ACE_OS::getrusage (RUSAGE_SELF,
- &this->begin_usage_);
- return 0;
-}
-
-ACE_INLINE int
-ACE_Profile_Timer::stop (void)
-{
- ACE_TRACE ("ACE_Profile_Timer::stop");
- this->last_time_ = this->end_time_;
- this->end_time_ = ACE_OS::gettimeofday ();
- this->last_usage_ = this->end_usage_;
- ACE_OS::getrusage (RUSAGE_SELF,
- &this->end_usage_);
- return 0;
-}
-
-# endif /* ACE_HAS_PRUSAGE_T */
-
-#elif defined (ACE_WIN32)
-
-ACE_INLINE
-ACE_Profile_Timer::~ACE_Profile_Timer (void)
-{
-}
-
-ACE_INLINE int
-ACE_Profile_Timer::start (void)
-{
- ACE_TRACE ("ACE_Profile_Timer::start");
-# if defined (ACE_HAS_GETRUSAGE)
- ACE_OS::getrusage (RUSAGE_SELF,
- &this->begin_usage_);
-# endif /* ACE_HAS_GETRUSAGE */
- this->timer_.start ();
- return 0;
-}
-
-ACE_INLINE int
-ACE_Profile_Timer::stop (void)
-{
- ACE_TRACE ("ACE_Profile_Timer::stop");
- this->timer_.stop ();
-# if defined (ACE_HAS_GETRUSAGE)
- this->last_usage_ = this->end_usage_;
- ACE_OS::getrusage (RUSAGE_SELF, &this->end_usage_);
-# endif /* ACE_HAS_GETRUSAGE */
- return 0;
-}
-
-#else
-
-ACE_INLINE int
-ACE_Profile_Timer::start (void)
-{
- ACE_TRACE ("ACE_Profile_Timer::start");
- this->timer_.start ();
- return 0;
-}
-
-ACE_INLINE int
-ACE_Profile_Timer::stop (void)
-{
- ACE_TRACE ("ACE_Profile_Timer::stop");
- this->timer_.stop ();
- return 0;
-}
-
-ACE_INLINE
-ACE_Profile_Timer::~ACE_Profile_Timer (void)
-{
-}
-
-#endif /* defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) */
diff --git a/ace/QoS_Manager.cpp b/ace/QoS_Manager.cpp
deleted file mode 100644
index 0928c76842d..00000000000
--- a/ace/QoS_Manager.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// QoS_Manager.cpp
-// $Id$
-
-#include "ace/QoS_Manager.h"
-
-ACE_RCSID(ace, QoS_Manager, "$Id $")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_QOS_MANAGER)
-
-ACE_QoS_Manager::ACE_QoS_Manager (void)
-{}
-
-ACE_QoS_Manager::~ACE_QoS_Manager (void)
-{}
-
-// Adds the given session to the list of session objects joined by
-// this socket.
-
-int
-ACE_QoS_Manager::join_qos_session (ACE_QoS_Session *qos_session)
-{
- if (this->qos_session_set ().insert (qos_session) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Error in adding a new session to the ")
- ACE_TEXT ("socket session set\n")),
- -1);
- return 0;
-}
-
-// Returns the QoS session set for this socket.
-
-ACE_Unbounded_Set <ACE_QoS_Session *>
-ACE_QoS_Manager::qos_session_set (void)
-{
- return this->qos_session_set_;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Node<ACE_QoS_Session *>;
-template class ACE_Unbounded_Set<ACE_QoS_Session *>;
-template class ACE_Unbounded_Set_Iterator<ACE_QoS_Session *>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Node<ACE_QoS_Session *>
-#pragma instantiate ACE_Unbounded_Set<ACE_QoS_Session *>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_QoS_Session *>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/QoS_Manager.h b/ace/QoS_Manager.h
deleted file mode 100644
index 66936aeeb8e..00000000000
--- a/ace/QoS_Manager.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-//============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// QoS_Manager.h
-//
-// = AUTHOR
-// Vishal Kachroo
-//
-//============================================================================
-
-#ifndef ACE_QOS_MANAGER_H
-#define ACE_QOS_MANAGER_H
-#include "ace/pre.h"
-
-#include "ace/Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#define ACE_LACKS_PRAGMA_ONCE
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/IPC_SAP.h"
-#include "ace/Containers_T.h"
-
-class ACE_QoS_Session;
-
-class ACE_Export ACE_QoS_Manager
-{
- // = TITLE
- // This class manages the QoS sessions associated with ACE_SOCK.
- //
- // = DESCRIPTION
- // This class provides functions to manage the QoS
- // associated with a socket. The idea is to keep the management of
- // QoS for a socket separate from the socket itself. Currently, the
- // manager is used to manage the QoS session set. It will handle more
- // responsibilities in the future.
-
-public:
- ACE_QoS_Manager (void);
- ~ACE_QoS_Manager (void);
- // Default ctor/dtor.
-
- int join_qos_session (ACE_QoS_Session *qos_session);
- // Join the given QoS session. A socket can join multiple QoS
- // sessions. This call adds the given QoS session to the list of
- // QoS sessions that the socket has already joined.
-
- typedef ACE_Unbounded_Set <ACE_QoS_Session *> ACE_QOS_SESSION_SET;
-
- ACE_QOS_SESSION_SET qos_session_set (void);
- // Get the QoS session set.
-
-private:
-
- ACE_QOS_SESSION_SET qos_session_set_;
- // Set of QoS sessions that this socket has joined.
-};
-
-#include "ace/post.h"
-#endif /* ACE_QOS_MANAGER_H */
-
-
-
-
diff --git a/ace/QoS_Session.h b/ace/QoS_Session.h
deleted file mode 100644
index 0e145c432c4..00000000000
--- a/ace/QoS_Session.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ===========================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// QoS_Session.h
-//
-// = AUTHOR
-// Vishal Kachroo <vishal@cs.wustl.edu>
-//
-// ===========================================================================
-
-#ifndef ACE_QOS_SESSION_H
-#define ACE_QOS_SESSION_H
-#include "ace/pre.h"
-
-#include "ace/INET_Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_SOCK;
-class ACE_QoS_Manager;
-
-typedef int ACE_Protocol_ID;
-// IPPROTO_UDP or IPPROTO_TCP.
-
-class ACE_Export ACE_QoS_Session
-{
- // = TITLE
- // A QoS Session object.
- //
- // = DESCRIPTION
- // This class defines the interface for a QoS Session. It abstracts the
- // notion of QoS on different platforms and presents a simple, easy-to-use
- // API. Current [RAPI,GQoS] and future implementations will conform to this
- // interface.
-
-public:
-
- enum ACE_End_Point_Type
- {
- ACE_QOS_SENDER,
- ACE_QOS_RECEIVER,
- ACE_QOS_BOTH
- };
- // A flag to indicate if this endpoint is a sender or a receiver or both.
-
- virtual ~ACE_QoS_Session (void) {};
- // to shutup g++.
-
- virtual int open (ACE_INET_Addr dest_addr,
- ACE_Protocol_ID protocol_id) = 0;
- // Open a QoS session [dest IP, dest port, Protocol ID].
-
- virtual int close (void) = 0;
- // Close the QoS Session.
-
- virtual ACE_QoS qos (void) const = 0;
- // Returns the QoS in the current session.
-
- virtual int qos (ACE_SOCK *socket,
- ACE_QoS_Manager *qos_manager,
- const ACE_QoS &ace_qos) = 0;
- // Set QoS for the current session. The socket parameter is used to confirm if
- // this QoS session was subscribed to by the socket.
-
- virtual void qos (const ACE_QoS &ace_qos) = 0;
- // Sets the QoS for this session object to ace_qos. Does not interfere with the
- // QoS in the underlying socket. This call is useful to update the QoS object
- // when the underlying socket QoS is being set through a mechanism other than
- // the previous qos () method e.g. inside the dgram_mcast.subscribe () where the
- // QoS for the socket is set through ACE_OS::join_leaf ().
-
- virtual int update_qos (void) = 0;
- // This is called from handle_qos () method of the the QoS Event Handler.
- // Invoking this method is an indication of a QoS event occurring, that may have
- // resulted in a change of QoS for the underlying session. This method updates
- // the QoS object associated with this session.
-
- virtual ACE_End_Point_Type flags (void) const = 0;
- virtual void flags (const ACE_End_Point_Type flags) = 0;
- // Get/Set methods for the flags_.
-
- virtual int session_id (void) const = 0;
- // Get the session id.
-
- virtual void session_id (const int session_id) = 0;
- // Set the session id.
-
- virtual ACE_INET_Addr dest_addr (void) const = 0;
- // Get the destination address for this session.
-
- virtual void dest_addr (const ACE_INET_Addr &dest_addr) = 0;
- // Set the destination address for this session.
-
- virtual int version (void) = 0;
- // Returns the version of the underlying RSVP implementation. Is
- // meaningful only when the underlying implementation has versioning.
-
-protected:
-
- int session_id_;
- // session id for the session.
-
- ACE_INET_Addr dest_addr_;
- // Destination address for this session.
-
- ACE_Protocol_ID protocol_id_;
- // Is this a TCP or a UDP session.
-
- ACE_QoS qos_;
- // QoS for this session.
-
- ACE_End_Point_Type flags_;
- // Specifies if this is a sending/receiving/both session.
-
-};
-
-#include "ace/post.h"
-#endif /* ACE_QOS_SESSION_H */
-
-
-
-
-
-
-
-
-
diff --git a/ace/QoS_Session_Factory.cpp b/ace/QoS_Session_Factory.cpp
deleted file mode 100644
index 4913b800050..00000000000
--- a/ace/QoS_Session_Factory.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-// QoS_Session_Factory.cpp
-// $Id$
-
-#include "ace/QoS_Session_Factory.h"
-#include "ace/QoS_Session_Impl.h"
-
-ACE_RCSID(ace, QoS_Session_Factory, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_QoS_Session_Factory)
-
-ACE_QoS_Session_Factory::ACE_QoS_Session_Factory (void)
-{
- ACE_TRACE ("ACE_QoS_Session_Factory::ACE_QoS_Session_Factory");
-}
-
-ACE_QoS_Session_Factory::~ACE_QoS_Session_Factory (void)
-{
- ACE_TRACE ("ACE_QoS_Session_Factory::~ACE_QoS_Session_Factory");
-}
-
-// Create a QoS session of the given type (RAPI or GQoS).
-ACE_QoS_Session *
-ACE_QoS_Session_Factory::create_session (ACE_QoS_Session_Type qos_session_type)
-{
-
- ACE_QoS_Session * qos_session = 0;
-
-#if defined (ACE_HAS_RAPI)
- if (qos_session_type == ACE_RAPI_SESSION)
- ACE_NEW_RETURN (qos_session,
- ACE_RAPI_Session,
- 0);
-#endif /* ACE_HAS_RAPI */
-
- if (qos_session_type == ACE_GQOS_SESSION)
- ACE_NEW_RETURN (qos_session,
- ACE_GQoS_Session,
- 0);
-
- if (this->add_session (qos_session) == -1)
- {
- delete qos_session;
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Error in adding session\n")),
- 0);
- }
-
- return qos_session;
-}
-
-// Destroy the QoS Session.
-int
-ACE_QoS_Session_Factory::destroy_session (ACE_QoS_Session *qos_session)
-{
-
- if ((qos_session != 0) && (this->remove_session (qos_session) == -1))
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Error in destroying session\n")),
- -1);
-
- return 0;
-}
-
-// Add a session to the set of sessions created by this factory. This is a
-// private method called by the create_session ().
-int
-ACE_QoS_Session_Factory::add_session (ACE_QoS_Session *qos_session)
-{
- if (this->qos_session_set_.insert (qos_session) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Error in adding a new session")
- ACE_TEXT ("to the session set\n")),
- -1);
-
- return 0;
-}
-
-// Remove a session from the set of sessions created by this factory. This is
-// a private method called by the destroy_session ().
-int
-ACE_QoS_Session_Factory::remove_session (ACE_QoS_Session *qos_session)
-{
- if (this->qos_session_set_.remove (qos_session) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Error in removing a session")
- ACE_TEXT ("from the session set\n")),
- -1);
-
- return 0;
-}
-
-
-
-
-
-
diff --git a/ace/QoS_Session_Factory.h b/ace/QoS_Session_Factory.h
deleted file mode 100644
index f4c18336f58..00000000000
--- a/ace/QoS_Session_Factory.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ===========================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// QoS_Session_Factory.h
-//
-// = AUTHOR
-// Vishal Kachroo <vishal@cs.wustl.edu>
-//
-// ===========================================================================
-
-#ifndef ACE_QOS_SESSION_FACTORY_H
-#define ACE_QOS_SESSION_FACTORY_H
-#include "ace/pre.h"
-
-#include "ace/QoS_Session.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Containers_T.h"
-
-class ACE_QoS_Session;
-// Forward declare this, so the factory uses only references to this.
-
-class ACE_Export ACE_QoS_Session_Factory
-{
- // = TITLE
- // Concrete factory for the QoS Session objects.
- //
- // = DESCRIPTION
- // This class manages the life cycle of QoS Session objects. These
- // objects are currently either RAPI session objects or GQoS session
- // objects. It stores the sessions in an unbounded set.
-
-public :
-
- // = Initialization and termination methods.
- ACE_QoS_Session_Factory (void);
- // Default constructor.
-
- ~ACE_QoS_Session_Factory (void);
- // Default destructor.
-
- enum ACE_QoS_Session_Type
- {
- ACE_RAPI_SESSION,
- ACE_GQOS_SESSION
- };
- // Types of sessions for this factory to manage.
-
- ACE_QoS_Session * create_session (ACE_QoS_Session_Type qos_session_type);
- // Create a QoS session of the given type (RAPI or GQoS).
-
- int destroy_session (ACE_QoS_Session *qos_session);
- // Destroy the QoS Session.
-
-private:
-
- int add_session (ACE_QoS_Session *qos_session);
- // Used by the create_session () to add new sessions to the
- // set of sessions created by this factory.
-
- int remove_session (ACE_QoS_Session *qos_session);
- // Used by the destroy_session () to remove a session from the set
- // of sessions created by this factory.
-
- typedef ACE_Unbounded_Set <ACE_QoS_Session *> QOS_SESSION_SET;
- QOS_SESSION_SET qos_session_set_;
- // Unordered set of QoS Sessions.
-
-};
-
-#include "ace/post.h"
-#endif /* ACE_QOS_SESSION_FACTORY_H */
-
-
-
-
-
-
-
-
-
diff --git a/ace/QoS_Session_Impl.cpp b/ace/QoS_Session_Impl.cpp
deleted file mode 100644
index 849c16b6cc4..00000000000
--- a/ace/QoS_Session_Impl.cpp
+++ /dev/null
@@ -1,543 +0,0 @@
-// QoS_Session_Impl.cpp
-// $Id$
-
-#include "ace/SOCK.h"
-#include "ace/QoS_Manager.h"
-#include "ace/QoS_Session_Impl.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/QoS_Session_Impl.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, QoS_Session_Impl, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_QoS_Session_Impl)
-
-#if defined (ACE_HAS_RAPI)
-#include "rapi_err.h"
-
-int ACE_RAPI_Session::rsvp_error = 0;
-
-// Call back function used by RAPI to report RSVP events. This function translates
-// the RAPI QoS parameters into the more generic ACE_QoS parameters for the
-// underlying RAPI session.
-int
-rsvp_callback (rapi_sid_t sid,
- rapi_eventinfo_t eventype,
- int style_id,
- int errcode,
- int errvalue,
- sockaddr * errnode,
- u_char errflags,
- int filter_spec_no,
- rapi_filter_t *filter_spec_list,
- int flow_spec_no,
- rapi_flowspec_t *flow_spec_list,
- int ad_spec_no,
- rapi_adspec_t *ad_spec_list,
- void *args
- )
-{
-
- ACE_QoS_Session * qos_session = (ACE_QoS_Session *) args;
-
- // Extended Legacy format.
- qos_flowspecx_t *csxp = &flow_spec_list->specbody_qosx;
-
- ACE_Flow_Spec sending_fs (csxp->xspec_r,
- csxp->xspec_b,
- csxp->xspec_p,
- 0,
- 0,
- 0,
- csxp->xspec_M,
- csxp->xspec_m,
- 25,
- 0);
-
- switch(eventype)
- {
- case RAPI_PATH_EVENT:
- ACE_DEBUG ((LM_DEBUG,
- "RSVP PATH Event received\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "No. of TSpecs received : %d\n",
- flow_spec_no));
-
- // Set the sending flowspec QoS of the given session.
- qos_session->qos ().sending_flowspec (sending_fs);
-
- break;
-
- case RAPI_RESV_EVENT:
- ACE_DEBUG ((LM_DEBUG,
- "RSVP RESV Event received\n"));
-
- ACE_DEBUG ((LM_DEBUG,
- "No. of FlowSpecs received : %d\n",
- flow_spec_no));
-
- // Choose based on the service type : [QOS_GUARANTEEDX/QOS_CNTR_LOAD].
- switch (csxp->spec_type)
- {
- case QOS_GUARANTEEDX:
- // Slack term in MICROSECONDS
- qos_session->qos ().receiving_flowspec ().delay_variation (csxp->xspec_S);
-
- // @@How does the guaranteed rate parameter map to the ACE_Flow_Spec.
- // Note there is no break !!
-
- case QOS_CNTR_LOAD:
-
- // qos_service_type.
- qos_session->qos ().receiving_flowspec ().service_type (csxp->spec_type);
- // Token Bucket Average Rate (B/s)
- qos_session->qos ().receiving_flowspec ().token_rate (csxp->xspec_r);
- // Token Bucket Rate (B)
- qos_session->qos ().receiving_flowspec ().token_bucket_size (csxp->xspec_b);
- // Peak Data Rate (B/s)
- qos_session->qos ().receiving_flowspec ().peak_bandwidth (csxp->xspec_p);
- // Minimum Policed Unit (B)
- qos_session->qos ().receiving_flowspec ().minimum_policed_size (csxp->xspec_m);
- // Max Packet Size (B)
- qos_session->qos ().receiving_flowspec ().max_sdu_size (csxp->xspec_M);
-
- break;
-
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unknown flowspec type.\n"),
- 0);
- };
-
- break;
-
- case RAPI_PATH_ERROR:
- ACE_DEBUG ((LM_DEBUG,
- "PATH ERROR Event received\n"
- "Code=%d Val=%d Node= %s\n",
- errcode,
- errvalue,
- ACE_OS::inet_ntoa(((sockaddr_in *)errnode)->sin_addr)));
-
- break;
-
- case RAPI_RESV_ERROR:
- ACE_DEBUG ((LM_DEBUG,
- "RESV ERROR Event received\n"
- "Code=%d Val=%d Node= %s\n",
- errcode,
- errvalue,
- ACE_OS::inet_ntoa(((sockaddr_in *)errnode)->sin_addr)));
- break;
-
- case RAPI_RESV_CONFIRM:
- ACE_DEBUG ((LM_DEBUG,
- "RESV CONFIRM Event received\n"));
- break;
-
- }
-
-}
-
-// Constructor.
-ACE_RAPI_Session::ACE_RAPI_Session (void)
-{
- ACE_TRACE ("ACE_RAPI_Session::ACE_RAPI_Session");
-}
-
-// Open a RAPI QoS session [dest IP, dest port, Protocol ID].
-int
-ACE_RAPI_Session::open (ACE_INET_Addr dest_addr,
- ACE_Protocol_ID protocol_id)
-{
- this->dest_addr_ = dest_addr;
- this->protocol_id_ = protocol_id;
-
- rapi_eventinfo_t RSVP_arg; /*RSVP callback argument*/
-
- // Open a RAPI session. Note "this" is being passed as an argument to
- // the callback function. The callback function uses this argument to
- // update the QoS of this session based on the RSVP event it receives.
-
- if ((this->session_id_ = rapi_session((struct sockaddr *) dest_addr.get_addr (),
- protocol_id,
- 0,
- rsvp_callback,
- //(void *) this,
- (void *) &RSVP_arg,
- &rsvp_error)) == NULL_SID)
- ACE_ERROR_RETURN ((LM_ERROR,
- "rapi_session () call fails. Error\n"),
- -1);
- else
- ACE_DEBUG ((LM_DEBUG,
- "rapi_session () call succeeds\n"
- "Session ID = %d\n",
- this->session_id_));
-
- return 0;
-}
-
-// Close the RAPI QoS Session.
-int
-ACE_RAPI_Session::close (void)
-{
- if (rsvp_error = rapi_release(this->session_id_))
- ACE_ERROR_RETURN ((LM_ERROR,
- "Can't release RSVP session:\n\t%s\n",
- rapi_errlist[rsvp_error]),
- -1);
- else
- ACE_DEBUG ((LM_DEBUG,
- "rapi session with id %d released successfully.\n",
- this->session_id_));
- return 0;
-}
-
-int
-ACE_RAPI_Session::qos (ACE_SOCK *socket,
- ACE_QoS_Manager *qos_manager,
- const ACE_QoS &ace_qos)
-{
- ACE_UNUSED_ARG (socket);
- ACE_UNUSED_ARG (qos_manager);
-
- // If sender : call sending_qos ()
- // If receiver : call receiving_qos ()
- // If both : call sending_qos () and receiving_qos ()
-
- if (this->flags_ != ACE_QOS_RECEIVER)
- return this->sending_qos (ace_qos);
-
- if (this->flags_ != ACE_QOS_SENDER)
- return this->receiving_qos (ace_qos);
-
- return 0;
-}
-
-// Set sending QoS for this RAPI session.
-int
-ACE_RAPI_Session::sending_qos (const ACE_QoS &ace_qos)
-{
-
- ACE_Flow_Spec sending_flowspec = ace_qos.sending_flowspec ();
- rapi_tspec_t *t_spec = this->init_tspec_simplified (sending_flowspec);
-
- if (t_spec == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error in translating from ACE Flow Spec to"
- " RAPI TSpec\n"),
- -1);
-
- char buffer[BUFSIZ];
-
- // This formats the t_spec in a visually intuitive char * that can
- // be printed.
-
- (void) rapi_fmt_tspec(t_spec, buffer, sizeof(buffer));
- ACE_DEBUG ((LM_DEBUG,
- "\nSender TSpec : %s\n",
- buffer));
-
- // Print out all the fields separately.
- ACE_DEBUG ((LM_DEBUG,
- "\nTSpec :\n"
- "\t Spec Type = %d\n"
- "\t Rate = %f\n"
- "\t Bucket = %f\n"
- "\t Peak = %f\n"
- "\t MPU = %d\n"
- "\t MDU = %d\n"
- "\t\t TTL = %d\n",
- t_spec->tspecbody_qosx.spec_type,
- t_spec->tspecbody_qosx.xtspec_r,
- t_spec->tspecbody_qosx.xtspec_b,
- t_spec->tspecbody_qosx.xtspec_p,
- t_spec->tspecbody_qosx.xtspec_m,
- t_spec->tspecbody_qosx.xtspec_M,
- sending_flowspec.ttl ()));
-
- // @@Hardcoded port. This should be changed later.
- ACE_INET_Addr sender_addr (9090);
-
- ACE_DEBUG ((LM_DEBUG,
- "Making the rapi_sender () call\n"));
-
- // Set the Sender TSpec for this QoS session.
- if(rapi_sender(this->session_id_,
- 0,
- (sockaddr *) sender_addr.get_addr (),
- NULL,
- t_spec,
- NULL,
- NULL,
- sending_flowspec.ttl ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "rapi_sender error:\n\tPATH Generation can't be started\n"),
- -1);
- else
- ACE_DEBUG ((LM_DEBUG,
- "rapi_sender () call succeeds ! \n"));
- return 0;
-}
-
-// Set receiving QoS for this RAPI session.
-int
-ACE_RAPI_Session::receiving_qos (const ACE_QoS &ace_qos)
-{
-
- ACE_Flow_Spec receiving_flowspec = ace_qos.receiving_flowspec ();
- rapi_flowspec_t *flow_spec = init_flowspec_simplified (receiving_flowspec);
-
- if (flow_spec == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error in translating from ACE Flow Spec to"
- " RAPI FlowSpec\n"),
- -1);
-
- char buffer[BUFSIZ];
-
- // This formats the flow_spec in a visually intuitive char * that can
- // be printed.
- (void)rapi_fmt_flowspec(flow_spec, buffer, sizeof(buffer));
- ACE_DEBUG ((LM_DEBUG,
- "\nReceiver FlowSpec : %s\n",
- buffer));
-
- // Print out all the fields separately.
- ACE_DEBUG ((LM_DEBUG,
- "\nFlowSpec :\n"
- "\t Spec Type = %d\n"
- "\t Rate = %f\n"
- "\t Bucket = %f\n"
- "\t Peak = %f\n"
- "\t MPU = %d\n"
- "\t MDU = %d\n",
- flow_spec->specbody_qosx.spec_type,
- flow_spec->specbody_qosx.xspec_r,
- flow_spec->specbody_qosx.xspec_b,
- flow_spec->specbody_qosx.xspec_p,
- flow_spec->specbody_qosx.xspec_m,
- flow_spec->specbody_qosx.xspec_M));
-
- // @@Hardcoded port. This should be changed later.
- // ACE_INET_Addr receiver_addr (8002);
-
- // ACE_INET_Addr receiver_addr;
-
- sockaddr_in Receiver_host;
-
- Receiver_host.sin_addr.s_addr = INADDR_ANY;
-
- // Set the Receiver FlowSpec for this QoS session.
- // @@The filter style is hardcoded to WildCard. This can be changed later.
- if (rapi_reserve(this->session_id_,
- RAPI_REQ_CONFIRM,
- // Setting the RAPI_REQ_CONFIRM flag requests confirmation
- // of the resevation, by means of a confirmation upcall of
- // type RAPI_RESV_CONFIRM.
- // (sockaddr *)receiver_addr.get_addr (),
- (sockaddr *)&Receiver_host,
- RAPI_RSTYLE_WILDCARD,
- // This applies the flowspec to all the senders. Given this,
- // @@I am passing the filter_spec to be null, hoping this will work.
- NULL,
- NULL,
- 0,
- NULL,
- // The filter spec is NULL. This should work since the RSTYLE is
- // WILDCARD.
- 1,
- flow_spec) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "rapi_reserve () error:\n\tRESV Generation can't be started\n"),
- -1);
- else
- ACE_DEBUG ((LM_DEBUG,
- "rapi_reserve () call succeeds \n"));
-
- return 0;
-}
-
-int
-ACE_RAPI_Session::update_qos (void)
-{
- if ((rsvp_error = rapi_dispatch ()) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Error in rapi_dispatch () : %s\n",
- rapi_errlist[rsvp_error]),
- -1);
- return 0;
-}
-
-// Construct a simplified RAPI Sender TSpec object
-// from an ACE_Flow_Spec. Note the form of the TSpec is
-// simplified as against the full bodied IntServ version.
-
-rapi_tspec_t *
-ACE_RAPI_Session::init_tspec_simplified (const ACE_Flow_Spec &flow_spec)
-{
- rapi_tspec_t *t_spec;
-
- ACE_NEW_RETURN (t_spec,
- rapi_tspec_t,
- 0);
-
- qos_tspecx_t *ctxp = &(t_spec->tspecbody_qosx);
-
- // There may be some type incompatibility here.
- // Note the types of the LHS are float32_t, uint32_t etc.
-
- ctxp->spec_type = QOS_TSPEC;
- ctxp->xtspec_r = flow_spec.token_rate (); // Token Rate (B/s)
- ctxp->xtspec_b = flow_spec.token_bucket_size (); // Token Bucket Depth (B)
- ctxp->xtspec_p = flow_spec.peak_bandwidth (); // Peak Data Rate (B/s)
- ctxp->xtspec_m = flow_spec.minimum_policed_size (); // Minimum policed unit.
-
- // @@Hardcoded for the time being.
- ctxp->xtspec_M = 1024; // Maximum SDU size.
-
- t_spec->len = sizeof(rapi_hdr_t) + sizeof(qos_tspecx_t);
- t_spec->form = RAPI_TSPECTYPE_Simplified;
-
- return (t_spec);
-}
-
-
-// Construct a simplified RAPI flowspec object from ACE_Flow_Spec.
-// Note the form of the FlowSpec is simplified as against the
-// full bodied IntServ version.
-
-rapi_flowspec_t *
-ACE_RAPI_Session::init_flowspec_simplified(const ACE_Flow_Spec &flow_spec)
-{
- rapi_flowspec_t *flowsp;
- ACE_NEW_RETURN (flowsp,
- rapi_flowspec_t,
- 0);
-
- // Extended Legacy format.
- qos_flowspecx_t *csxp = &flowsp->specbody_qosx;
-
- // Choose based on the service type : [QOS_GUARANTEEDX/QOS_CNTR_LOAD].
- switch (flow_spec.service_type ())
- {
- case QOS_GUARANTEEDX:
- csxp->xspec_R = 0 ; // Guaranteed Rate B/s. @@How does this map to the
- // ACE Flow Spec Parameters.
-
- csxp->xspec_S = flow_spec.delay_variation () ; // Slack term in MICROSECONDS
-
- // Note there is no break !!
-
- case QOS_CNTR_LOAD:
- ACE_DEBUG ((LM_DEBUG,
- "QOS_CONTROLLED_LOAD\n"));
- csxp->spec_type = flow_spec.service_type (); // qos_service_type
- csxp->xspec_r = flow_spec.token_rate (); // Token Bucket Average Rate (B/s)
- csxp->xspec_b = flow_spec.token_bucket_size (); // Token Bucket Rate (B)
- csxp->xspec_p = flow_spec.peak_bandwidth (); // Peak Data Rate (B/s)
- csxp->xspec_m = flow_spec.minimum_policed_size (); // Minimum Policed Unit (B)
-
- // @@Hardcoded Max. Pkt. size.
- csxp->xspec_M = 65535; // Max Packet Size (B)
-
- flowsp->form = RAPI_FLOWSTYPE_Simplified;
- break;
-
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unknown flowspec type.\n"),
- 0);
- }
-
- flowsp->len = sizeof(rapi_flowspec_t);
- return flowsp;
-}
-
-#endif /* ACE_HAS_RAPI */
-
-// This is a GQoS session ID generator.
-int ACE_GQoS_Session::GQoS_session_id = 0;
-
-// Constructor.
-ACE_GQoS_Session::ACE_GQoS_Session (void)
-{
- ACE_TRACE ("ACE_GQoS_Session::ACE_GQoS_Session");
-}
-
-// Open a GQoS session [dest IP, dest port, Protocol ID].
-int
-ACE_GQoS_Session::open (ACE_INET_Addr dest_addr,
- ACE_Protocol_ID protocol_id)
-{
- this->dest_addr_ = dest_addr;
- this->protocol_id_ = protocol_id;
-
- this->session_id_ = GQoS_session_id++;
-
- return 0;
-}
-
-// Close the GQoS Session.
-int
-ACE_GQoS_Session::close (void)
-{
- // TBD.
- return 0;
-}
-
-// Set the QoS for this GQoS session.
-int
-ACE_GQoS_Session::qos (ACE_SOCK *socket,
- ACE_QoS_Manager *qos_manager,
- const ACE_QoS &ace_qos)
-{
-
- // Confirm if the current session is one of the QoS sessions
- // subscribed to by the given socket.
-
- //if (socket->qos_session_set ().find (this) == -1)
-
- // @@Vishal : Need to relate the below to the socket (as above)
- // instead of the QoS Manager.
-
- if (qos_manager->qos_session_set ().find (this) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("This QoS session was not subscribed to")
- ACE_TEXT (" by the socket\n")),
- -1);
-
- // Set the QOS according to the supplied ACE_QoS. The I/O control
- // code used under the hood is SIO_SET_QOS.
-
- u_long ret_bytes = 0;
-
- ACE_QoS qos = ace_qos;
- if (ACE_OS::ioctl (socket->get_handle (),
- ACE_SIO_SET_QOS,
- qos,
- &ret_bytes) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Error in Qos set ACE_OS::ioctl() %d\n"),
- ret_bytes),
- -1);
- else
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Setting QoS with ACE_OS::ioctl () succeeds \n")));
-
- return 0;
-}
-
-int
-ACE_GQoS_Session::update_qos (void)
-{
- // WSAIoctl (GET_QOS) call goes here...
- return 0;
-}
-
-
-
-
diff --git a/ace/QoS_Session_Impl.h b/ace/QoS_Session_Impl.h
deleted file mode 100644
index 698ae478f82..00000000000
--- a/ace/QoS_Session_Impl.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ===========================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// QoS_Session_Impl.h
-//
-// = AUTHOR
-// Vishal Kachroo <vishal@cs.wustl.edu>
-//
-// ===========================================================================
-
-#ifndef ACE_QOS_SESSION_IMPL_H
-#define ACE_QOS_SESSION_IMPL_H
-#include "ace/pre.h"
-
-#include "ace/QoS_Session.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-#if defined (ACE_HAS_RAPI)
-#include "rapi_lib.h"
-
-class ACE_Export ACE_RAPI_Session : public ACE_QoS_Session
-{
- // = TITLE
- // A RAPI QoS session object.
- //
- // = DESCRIPTION
- // This class is a RAPI (RSVP API, an implementation of RSVP on UNIX)
- // implementation of the ACE_QoS_Session interface.
-
-public:
-
- ~ACE_RAPI_Session (void);
- // Default destructor.
-
- static int rsvp_error;
- // Error handling for RSVP callback
-
- virtual int open (ACE_INET_Addr dest_addr,
- ACE_Protocol_ID protocol_id);
- // Open a RAPI QoS session [dest IP, dest port, Protocol ID].
-
- virtual int close (void);
- // Close the RAPI QoS Session.
-
- virtual ACE_QoS qos (void) const;
- // Returns the QoS for this RAPI session.
-
- virtual int qos (ACE_SOCK *socket,
- ACE_QoS_Manager *qos_manager,
- const ACE_QoS &ace_qos);
- // Set QoS for this RAPI session. The socket parameter is used to confirm if
- // this QoS session was subscribed to by the socket.
-
- virtual void qos (const ACE_QoS &ace_qos);
- // Sets the QoS for this session object to ace_qos. Does not interfere with the
- // QoS in the underlying socket. This call is useful to update the QoS object
- // when the underlying socket QoS is being set through a mechanism other than
- // the previous qos () method e.g. inside the dgram_mcast.subscribe () where the
- // QoS for the socket is set through ACE_OS::join_leaf ().
-
- virtual int update_qos (void);
- // Calls rapi_dispatch () that further triggers the call back function.
- // It is a mechanism of updating the QoS for this session asynchronously, as
- // RSVP events occur.
-
- virtual ACE_End_Point_Type flags (void) const;
- virtual void flags (const ACE_End_Point_Type flags);
- // Get/Set methods for the flags_.
-
- virtual int session_id (void) const;
- // Get the RAPI session id.
-
- virtual void session_id (const int session_id);
- // Set the RAPI session id.
-
- virtual ACE_INET_Addr dest_addr (void) const;
- // Get the destination address for this RAPI session.
-
- virtual void dest_addr (const ACE_INET_Addr &dest_addr);
- // Set the destination address for this RAPI session.
-
- virtual int version ();
- // RAPI version. Returned value = 100 * major-version + minor-version.
-
- friend class ACE_QoS_Session_Factory;
- // The factory is a friend so it can create this object through
- // the only private constructor.
-
-private:
-
- ACE_RAPI_Session (void);
- // Default constuctor. Constructor is defined private so that only
- // the friend factory can instantiate this class.
-
- rapi_tspec_t *init_tspec_simplified (const ACE_Flow_Spec &flow_spec);
- // Construct a simplified RAPI Sender TSpec object
- // from an ACE_Flow_Spec object. Used internally by this class.
-
- rapi_flowspec_t *init_flowspec_simplified(const ACE_Flow_Spec &flow_spec);
- // Construct a simplified RAPI Receiver FlowSpec object
- // from an ACE_Flow_Spec object. Used internally by the class.
-
- int sending_qos (const ACE_QoS &ace_qos);
- // Set sending QoS for this RAPI session.
-
- int receiving_qos (const ACE_QoS &ace_qos);
- // Set receiving QoS for this RAPI session.
-
-};
-
-#endif /* ACE_HAS_RAPI */
-
-class ACE_Export ACE_GQoS_Session : public ACE_QoS_Session
-{
- // = TITLE
- // A GQoS session object.
- //
- // = DESCRIPTION
- // This class is a GQoS (Generic QoS, an implementation of RSVP on
- // Win2K) implementation of the ACE_QoS_Session interface.
-
-public:
-
- ~ACE_GQoS_Session (void);
- // Default destructor.
-
- static int GQoS_session_id;
- // This is a session ID generator. It does a lot more than expected
- // from an int!.
-
- virtual int open (ACE_INET_Addr dest_addr,
- ACE_Protocol_ID protocol_id);
- // Open a GQoS session [dest IP, dest port, Protocol ID].
-
- virtual int close (void);
- // Close the GQoS Session.
-
- virtual ACE_QoS qos (void) const;
- // Returns the QoS for this GQoS session.
-
- virtual int qos (ACE_SOCK *socket,
- ACE_QoS_Manager *qos_manager,
- const ACE_QoS &ace_qos);
- // Set QoS for this GQoS session. The socket parameter is used to confirm if
- // this QoS session was subscribed to by the socket.
-
- virtual void qos (const ACE_QoS &ace_qos);
- // Sets the QoS for this session object to ace_qos. Does not interfere with the
- // QoS in the underlying socket. This call is useful to update the QoS object
- // when the underlying socket QoS is being set through a mechanism other than
- // the previous qos () method e.g. inside the dgram_mcast.subscribe () where the
- // QoS for the socket is set through ACE_OS::join_leaf ().
-
- virtual int update_qos (void);
- // Calls the ioctl (ACE_SIO_GET_QOS). It is a mechanism of updating the
- // QoS for this session asynchronously, as RSVP events occur.
-
- virtual ACE_End_Point_Type flags (void) const;
- virtual void flags (const ACE_End_Point_Type flags);
- // Get/Set methods for the flags_.
-
- virtual ACE_INET_Addr dest_addr (void) const;
- // Get the destination address for this GQoS session.
-
- virtual void dest_addr (const ACE_INET_Addr &dest_addr);
- // Set the destination address for this GQoS session.
-
- virtual int session_id (void) const;
- // Get the GQoS session id.
-
- virtual void session_id (const int session_id);
- // Set the GQoS session id.
-
- virtual int version ();
- // GQoS version.
-
- friend class ACE_QoS_Session_Factory;
- // The factory is a friend so it can create this object through
- // the only private constructor.
-
-private:
-
- ACE_GQoS_Session (void);
- // Default constructor. Constructor is defined private so that only
- // the friend factory can instantiate this class.
-
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/QoS_Session_Impl.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_QOS_SESSION_IMPL_H */
-
-
diff --git a/ace/QoS_Session_Impl.i b/ace/QoS_Session_Impl.i
deleted file mode 100644
index 72021154d23..00000000000
--- a/ace/QoS_Session_Impl.i
+++ /dev/null
@@ -1,149 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// QoS_Session_Impl.i
-
-#if defined (ACE_HAS_RAPI)
-
-ACE_INLINE
-ACE_RAPI_Session::~ACE_RAPI_Session (void)
-{
- ACE_TRACE ("ACE_RAPI_Session::~ACE_RAPI_Session");
-}
-
-// Returns the QoS for this RAPI session.
-ACE_INLINE ACE_QoS
-ACE_RAPI_Session::qos (void) const
-{
- return this->qos_;
-}
-
-// Overloaded method to set the QoS for this session object. Does not
-// interfere with the underlying socket QoS.
-ACE_INLINE void
-ACE_RAPI_Session::qos (const ACE_QoS &ace_qos)
-{
- this->qos_ = ace_qos;
-}
-
-// Get the RAPI session id.
-ACE_INLINE int
-ACE_RAPI_Session::session_id (void) const
-{
- return this->session_id_;
-}
-
-// Set the RAPI session id.
-ACE_INLINE void
-ACE_RAPI_Session::session_id (const int session_id)
-{
- this->session_id_ = session_id;
-}
-
-// Get the End Point Type (Sender/Receiver/Both).
-ACE_INLINE ACE_End_Point_Type
-ACE_RAPI_Session::flags (void) const
-{
- return this->flags_;
-}
-
-// Set the End Point Type (Sender/Receiver/Both).
-ACE_INLINE void
-ACE_RAPI_Session::flags (const ACE_End_Point_Type flags)
-{
- this->flags_ = flags;
-}
-
-
-// Get the destination address for this RAPI session.
-ACE_INLINE ACE_INET_Addr
-ACE_RAPI_Session::dest_addr (void) const
-{
- return this->dest_addr_;
-}
-
-// Set the destination address for this RAPI session.
-ACE_INLINE void
-ACE_RAPI_Session::dest_addr (const ACE_INET_Addr &dest_addr)
-{
- this->dest_addr_ = dest_addr;
-}
-
-// RAPI version. Returned value = 100 * major-version + minor-version.
-ACE_INLINE int
-ACE_RAPI_Session::version (void)
-{
- return 0;
-}
-
-#endif /* ACE_HAS_RAPI */
-
-ACE_INLINE
-ACE_GQoS_Session::~ACE_GQoS_Session (void)
-{
- ACE_TRACE ("ACE_GQoS_Session::~ACE_GQoS_Session");
-}
-
-// Returns the QoS for this GQoS session.
-ACE_INLINE ACE_QoS
-ACE_GQoS_Session::qos (void) const
-{
- return this->qos_;
-}
-
-// Overloaded method to set the QoS for this session object. Does not
-// interfere with the underlying socket QoS.
-ACE_INLINE void
-ACE_GQoS_Session::qos (const ACE_QoS &ace_qos)
-{
- this->qos_ = ace_qos;
-}
-
-// Get the GQoS session id.
-ACE_INLINE int
-ACE_GQoS_Session::session_id (void) const
-{
- return this->session_id_;
-}
-
-// Set the GQoS session id.
-ACE_INLINE void
-ACE_GQoS_Session::session_id (const int session_id)
-{
- this->session_id_ = session_id;
-}
-
-// Get the End Point Type (Sender/Receiver/Both).
-ACE_INLINE ACE_QoS_Session::ACE_End_Point_Type
-ACE_GQoS_Session::flags (void) const
-{
- return this->flags_;
-}
-
-// Set the End Point Type (Sender/Receiver/Both).
-ACE_INLINE void
-ACE_GQoS_Session::flags (const ACE_End_Point_Type flags)
-{
- this->flags_ = flags;
-}
-
-// Get the destination address for this GQoS session.
-ACE_INLINE ACE_INET_Addr
-ACE_GQoS_Session::dest_addr (void) const
-{
- return this->dest_addr_;
-}
-
-// Set the destination address for this GQoS session.
-ACE_INLINE void
-ACE_GQoS_Session::dest_addr (const ACE_INET_Addr &dest_addr)
-{
- this->dest_addr_ = dest_addr;
-}
-
-// GQoS version.
-ACE_INLINE int
-ACE_GQoS_Session::version (void)
-{
- return 0;
-}
diff --git a/ace/QtReactor.cpp b/ace/QtReactor.cpp
deleted file mode 100644
index 15d6a7d3acc..00000000000
--- a/ace/QtReactor.cpp
+++ /dev/null
@@ -1,430 +0,0 @@
-//$Id$
-#include "ace/QtReactor.h"
-
-#if defined (ACE_HAS_QT)
-
-ACE_ALLOC_HOOK_DEFINE (ACE_QtReactor)
-
-// Must be called with lock held
-ACE_QtReactor::ACE_QtReactor (QApplication *qapp,
- size_t size,
- int restart,
- ACE_Sig_Handler *handler)
- : ACE_Select_Reactor(size, restart, handler),
- qapp_(qapp),
- qtime_ (0)
-
-{
- // When the ACE_Select_Reactor is constructed it creates the notify
- // pipe and registers it with the register_handler_i() method. The
- // QtReactor overloads this method BUT because the
- // register_handler_i occurs when constructing the base class
- // ACE_Select_Reactor, the ACE_Select_Reactor register_handler_i()
- // is called not the QtReactor register_handler_i(). This means
- // that the notify pipe is registered with the ACE_Select_Reactor
- // event handling code not the QtReactor and so notfications don't
- // work. To get around this we simply close and re-opened the
- // notification handler in the constructor of the QtReactor.
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- this->notify_handler_->close ();
- this->notify_handler_->open (this, 0);
-#endif /* ACE_MT_SAFE */
-}
-
-ACE_QtReactor::~ACE_QtReactor (void)
-{
- //no-op
-}
-
-void
-ACE_QtReactor::qapplication (QApplication *qapp)
-{
- qapp_ = qapp ;
-}
-
-int
-ACE_QtReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set,
- ACE_Time_Value *max_wait_time)
-{
- ACE_TRACE( "ACE_QtReactor::wait_for_multiple_events" );
-
- int nfound = 0;
- do
- {
- max_wait_time = this->timer_queue_->calculate_timeout (max_wait_time);
- size_t width = this->handler_rep_.max_handlep1 ();
- handle_set.rd_mask_ = this->wait_set_.rd_mask_;
- handle_set.wr_mask_ = this->wait_set_.wr_mask_;
- handle_set.ex_mask_ = this->wait_set_.ex_mask_;
-
- nfound = QtWaitForMultipleEvents (width,
- handle_set,
- max_wait_time);
-
- } while( nfound == -1 && this->handle_error () > 0 );
-
- if (nfound > 0)
- {
-#if !defined (ACE_WIN32)
- handle_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ());
- handle_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ());
- handle_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ());
-#endif /* ACE_WIN32 */
- }
-
- return nfound;
- // Timed out or input available
-}
-
-void
-ACE_QtReactor::timeout_event (void)
-{
- // Deal with any timer events
- ACE_Select_Reactor_Handle_Set handle_set;
- this->dispatch (0, handle_set );
-
- // Set next timeout signal
- this->reset_timeout ();
-}
-
-void
-ACE_QtReactor::read_event (int handle)
-{
- // Send read event
- ACE_Select_Reactor_Handle_Set dispatch_set;
-
- dispatch_set.rd_mask_.set_bit (handle);
- this->dispatch (1, dispatch_set);
-}
-
-void
-ACE_QtReactor::write_event (int handle)
-{
- // Send write event
- ACE_Select_Reactor_Handle_Set dispatch_set;
-
- dispatch_set.wr_mask_.set_bit (handle);
- this->dispatch (1, dispatch_set);
-}
-
-void
-ACE_QtReactor::exception_event (int handle)
-{
- // Send exception event
- ACE_Select_Reactor_Handle_Set dispatch_set;
-
- dispatch_set.ex_mask_.set_bit(handle);
- dispatch (1, dispatch_set);
-}
-
-int
-ACE_QtReactor::QtWaitForMultipleEvents (int width,
- ACE_Select_Reactor_Handle_Set &wait_set,
- ACE_Time_Value */*max_wait_time*/)
-{
- // Check to make sure our handle's are all usable.
- ACE_Select_Reactor_Handle_Set temp_set = wait_set;
-
- if (ACE_OS::select (width,
- temp_set.rd_mask_,
- temp_set.wr_mask_,
- temp_set.ex_mask_,
- (ACE_Time_Value *) &ACE_Time_Value::zero ) == -1)
- return -1; // Bad file arguments...
-
- // Qt processing.
- this->qapp_->processOneEvent () ;
-
- // Reset the width, in case it changed during the upcalls.
- width = handler_rep_.max_handlep1 ();
-
- // Now actually read the result needed by the <Select_Reactor> using
- // <select>.
- return ACE_OS::select(width,
- wait_set.rd_mask_,
- wait_set.wr_mask_,
- wait_set.ex_mask_,
- (ACE_Time_Value *) &ACE_Time_Value::zero);
-}
-
-int
-ACE_QtReactor::register_handler_i (ACE_HANDLE handle ,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_QtReactor::register_handler_i");
-
- int result;
- if ((result = ACE_Select_Reactor::register_handler_i(handle,
- handler,
- mask ))
- == -1)
- return -1;
-
- if (ACE_BIT_ENABLED(mask, ACE_Event_Handler::READ_MASK) ||
- ACE_BIT_ENABLED( mask, ACE_Event_Handler::ACCEPT_MASK))
- {
- // We check for any unused handles.
- MAP::ITERATOR read_iter = this->read_notifier_.end ();
- QSocketNotifier *qsock_read_notifier = 0;
-
- // We check whether we have a data against the present
- // handle. If so we need to unbind the data.
- if ((this->read_notifier_.find (handle,
- qsock_read_notifier) != -1))
- {
- if (qsock_read_notifier != (*read_iter).int_id_)
- {
- this->read_notifier_.unbind (handle,
- qsock_read_notifier);
- delete qsock_read_notifier;
- }
- }
-
- ACE_NEW_RETURN (qsock_read_notifier,
- QSocketNotifier (handle, QSocketNotifier::Read),
- -1);
-
- this->read_notifier_.bind (handle,
- qsock_read_notifier);
-
- QObject::connect (qsock_read_notifier,
- SIGNAL (activated (int)),
- this,
- SLOT (read_event (int))) ;
- }
-
- if (ACE_BIT_ENABLED( mask, ACE_Event_Handler::WRITE_MASK) ||
- ACE_BIT_ENABLED( mask, ACE_Event_Handler::ACCEPT_MASK) ||
- ACE_BIT_ENABLED( mask, ACE_Event_Handler::CONNECT_MASK))
- {
- // We check for any unused handles.
- MAP::ITERATOR write_iter = this->write_notifier_.end ();
- QSocketNotifier *qsock_write_notifier = 0;
-
- // We check whether we have a data against the present
- // handle. If so we need to unbind the data.
- if ((this->write_notifier_.find (handle,
- qsock_write_notifier) != -1))
- {
- if (qsock_write_notifier != (*write_iter).int_id_)
- {
- this->write_notifier_.unbind (handle,
- qsock_write_notifier);
- delete qsock_write_notifier;
- }
- }
-
- ACE_NEW_RETURN (qsock_write_notifier,
- QSocketNotifier (handle, QSocketNotifier::Write),
- -1);
-
- this->write_notifier_.bind (handle,
- qsock_write_notifier);
-
- QObject::connect (qsock_write_notifier,
- SIGNAL (activated (int)),
- this,
- SLOT (write_event (int)));
- }
-
- if (ACE_BIT_ENABLED( mask,
- ACE_Event_Handler::EXCEPT_MASK))
- {
- // We check for any unused handles.
- MAP::ITERATOR excpt_iter = this->exception_notifier_.end ();
- QSocketNotifier *qsock_excpt_notifier = 0;
-
- // We check whether we have a data against the present
- // handle. If so we need to unbind the data.
- if ((this->exception_notifier_.find (handle,
- qsock_excpt_notifier) != -1))
- {
- if (qsock_excpt_notifier != (*excpt_iter).int_id_)
- {
- this->exception_notifier_.unbind (handle,
- qsock_excpt_notifier);
- delete qsock_excpt_notifier;
- }
- }
-
- ACE_NEW_RETURN (qsock_excpt_notifier,
- QSocketNotifier (handle, QSocketNotifier::Exception),
- -1);
-
- this->exception_notifier_.bind (handle,
- qsock_excpt_notifier);
-
- QObject::connect (qsock_excpt_notifier,
- SIGNAL (activated (int)),
- this,
- SLOT (exception_event (int))) ;
- }
-
- return 0;
-}
-
-int
-ACE_QtReactor::register_handler_i (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- return ACE_Select_Reactor::register_handler_i(handles,
- handler,
- mask);
-}
-
-int ACE_QtReactor::remove_handler_i (ACE_HANDLE handle ,
- ACE_Reactor_Mask mask )
-{
- ACE_TRACE ("ACE_XtReactor::remove_handler_i");
-
- QSocketNotifier *qsock_notifier = 0;
-
- // Looks for the handle in the maps and removes them.
- MAP::ITERATOR iter = this->read_notifier_.end ();
-
- if ((this->read_notifier_.find (handle,
- qsock_notifier) != -1))
- {
- this->read_notifier_.unbind (handle,
- qsock_notifier);
- delete qsock_notifier;
- }
-
- iter = this->write_notifier_.end ();
- if ((this->write_notifier_.find (handle,
- qsock_notifier) != -1))
- {
- this->write_notifier_.unbind (handle,
- qsock_notifier);
- delete qsock_notifier;
- }
-
- iter = this->exception_notifier_.end ();
- if ((this->exception_notifier_.find (handle,
- qsock_notifier) != -1))
- {
- this->exception_notifier_.unbind (handle,
- qsock_notifier);
- delete qsock_notifier;
- }
-
- // Now let the reactor do its work.
- return ACE_Select_Reactor::remove_handler_i (handle, mask);
-}
-
-
-int
-ACE_QtReactor::remove_handler_i (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask mask)
-{
- return ACE_Select_Reactor::remove_handler_i (handles,
- mask);
-}
-
-// The following functions ensure that there is an Qt timeout for the
-// first timeout in the Reactor's Timer_Queue.
-
-void
-ACE_QtReactor::reset_timeout (void)
-{
- if (this->qtime_ != 0)
- {
- delete this->qtime_;
- this->qtime_ = 0;
- }
-
- ACE_Time_Value *max_wait_time =
- this->timer_queue_->calculate_timeout (0) ;
-
- if (max_wait_time)
- {
- ACE_NEW (this->qtime_,
- QTimer);
-
- QObject::connect (qtime_,
- SIGNAL (timeout ()),
- this,
- SLOT (timeout_event ()));
-
- qtime_->start(max_wait_time->msec(), 1);
- }
-
-}
-
-
-long
-ACE_QtReactor::schedule_timer (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_XtReactor::schedule_timer");
- ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token,
- ace_mon,
- this->token_,
- -1));
-
- long result;
- if ((result = ACE_Select_Reactor::schedule_timer(handler,
- arg,
- delta_time,
- interval)) == -1 )
- return -1;
- else
- {
- this->reset_timeout ();
- return result;
- }
-}
-
-int
-ACE_QtReactor::cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_XtReactor::cancel_timer");
-
- if (ACE_Select_Reactor::cancel_timer (handler,
- dont_call_handle_close ) == -1 )
- return -1 ;
- else
- {
- this->reset_timeout( ) ;
- return 0 ;
- }
-}
-
-int ACE_QtReactor::cancel_timer (long timer_id,
- const void **arg,
- int dont_call_handle_close )
-{
- ACE_TRACE( "ACE_XtReactor::cancel_timer" ) ;
-
- if (ACE_Select_Reactor::cancel_timer (timer_id,
- arg,
- dont_call_handle_close ) == -1 )
- return -1 ;
- else
- {
- this->reset_timeout( ) ;
- return 0 ;
- }
-}
-
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Map_Entry<ACE_HANDLE, QSocketNotifier *>;
-template class ACE_Map_Manager<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Map_Entry<ACE_HANDLE, QSocketNotifier *>
-#pragma instantiate ACE_Map_Manager<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-#endif /*ACE_HAS_QT */
diff --git a/ace/QtReactor.h b/ace/QtReactor.h
deleted file mode 100644
index e2afc998db0..00000000000
--- a/ace/QtReactor.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// QtReactor.h
-//
-// = AUTHOR
-// Hamish Friedlander <ullexco@wave.co.nz>
-// integrated in to ACE by Balachandran Natarajan <bala@cs.wustl.edu>
-// ============================================================================
-#ifndef ACE_QTREACTOR_H
-#define ACE_QTREACTOR_H
-#include "ace/pre.h"
-
-
-#include "ace/Select_Reactor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_QT)
-#include "ace/Map_Manager.h"
-
-// Qttoolkit specific includes.
-#include <qapplication.h>
-#include <qobject.h>
-#include <qsocketnotifier.h>
-#include <qtimer.h>
-
-class ACE_Export ACE_QtReactor : public QObject, public ACE_Select_Reactor
-{
- // = TITLE
- // An object-oriented event demultiplexor and event handler
- // dispatcher that uses the Qt Library. This class declaration
- // also uses the extnsion facilities provided by the Qt. So,
- // readers of the class declaration should not be upset with
- // the appearence of the Keywords like Q_OBJECT, private slots
- // etc. They are specific to Qt which uses these as a call back
- // methods implementation mechanism.
-
- Q_OBJECT
-
- public:
- // = Initialization and termination methods.
- ACE_QtReactor (QApplication *qapp = NULL,
- size_t size = DEFAULT_SIZE,
- int restart = 0,
- ACE_Sig_Handler *handler = 0);
-
- virtual ~ACE_QtReactor (void);
-
- void qapplication (QApplication *qapp);
-
- // = Timer operations.
- virtual long schedule_timer (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval);
-
- virtual int cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close = 1);
-
- virtual int cancel_timer (long timer_id,
- const void **arg = 0,
- int dont_call_handle_close = 1);
-
- protected:
-
- // = Register timers/handles with Qt
-
- virtual int register_handler_i (ACE_HANDLE handle,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask);
- // Register a single <handler>.
-
- virtual int register_handler_i (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask);
- // Register a set of <handlers> with Qt.
-
-
- virtual int remove_handler_i (ACE_HANDLE handle,
- ACE_Reactor_Mask mask);
- // Remove the <handler> associated with this <handle>.
-
- virtual int remove_handler_i (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask mask);
- // Remove a set of <handles>.
-
- virtual int wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set,
- ACE_Time_Value *max_wait_time);
- // Wait for events to occur.
-
- virtual int QtWaitForMultipleEvents (int width,
- ACE_Select_Reactor_Handle_Set &wait_set,
- ACE_Time_Value *max_wait_time);
-
- // Wait for Qt events to occur
-
- QApplication *qapp_ ;
- // Some Qt stuff that we need to have
-
- typedef ACE_Map_Manager<ACE_HANDLE, QSocketNotifier *, ACE_Null_Mutex> MAP;
- // Typedef of a map.
-
- MAP read_notifier_;
- // A notifier for a read
-
- MAP write_notifier_;
- // A write notifier
-
- MAP exception_notifier_;
- // An exception notifier
-
- QTimer *qtime_ ;
- // The timer class that would provide timer-sgnals & single-shot timers
-
- private:
- void reset_timeout (void);
- // This method ensures there's an Qt timeout for the first timeout
- // in the Reactor's Timer_Queue.
-
- ACE_QtReactor (const ACE_QtReactor &);
- ACE_QtReactor &operator= (const ACE_QtReactor &);
- // Deny access since member-wise won't work...
-
- private slots:
-
- // These are all part of the communication mechanism adopted in Qt.
- void read_event (int FD);
- // Dispatch a Read Event
-
- void write_event (int FD);
- // Dispatch a Write Event
-
- void exception_event (int FD);
- // Dispatch an exception event
-
- void timeout_event (void);
- // Dispach a timeout event
-};
-
-#endif /*ACE_HAS_QT */
-
-#include "ace/post.h"
-#endif /* ACE_QTREACTOR_H */
diff --git a/ace/RB_Tree.cpp b/ace/RB_Tree.cpp
deleted file mode 100644
index 7a95a277662..00000000000
--- a/ace/RB_Tree.cpp
+++ /dev/null
@@ -1,932 +0,0 @@
-// $Id$
-
-// RB_Tree.cpp
-
-#ifndef ACE_RB_TREE_C
-#define ACE_RB_TREE_C
-
-#include "ace/RB_Tree.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/RB_Tree.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, RB_Tree, "$Id$")
-
-// Constructor.
-
-template <class EXT_ID, class INT_ID>
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::ACE_RB_Tree_Node (const EXT_ID &k, const INT_ID &t)
- : k_ (k),
- t_ (t),
- color_ (RED),
- parent_ (0),
- left_ (0),
- right_ (0)
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::ACE_RB_Tree_Node (const EXT_ID &k, const INT_ID &t)");
-}
-
-
-// Destructor.
-
-template <class EXT_ID, class INT_ID>
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::~ACE_RB_Tree_Node (void)
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::~ACE_RB_Tree_Node");
-
- // Delete left sub-tree.
- delete left_;
-
- // Delete right sub_tree.
- delete right_;
-}
-
-// Constructor.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree (ACE_Allocator *alloc)
- : allocator_ (alloc),
- root_ (0),
- current_size_ (0)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "ACE_RB_Tree (ACE_Allocator *alloc)");
- if (this->open (alloc) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_RB_Tree::ACE_RB_Tree\n")));
-}
-
-// Copy constructor.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt)
- : allocator_ (rbt.allocator_),
- root_ (0),
- current_size_ (0)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "ACE_RB_Tree (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt)");
- ACE_WRITE_GUARD (ACE_LOCK, ace_mon, this->lock_);
-
- // Make a deep copy of the passed tree.
- ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> iter(rbt);
-
- for (iter.first ();
-
- iter.is_done () == 0; iter.next ())
- insert_i (*(iter.key ()),
- *(iter.item ()));
-}
-
-// Destructor.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree ()
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree");
-
- // Use the locked public method, to be totally safe, as the class
- // can be used with an allocator and placement new.
- this->close ();
-}
-
-// Assignment operator.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> void
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator = (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator =");
- ACE_WRITE_GUARD (ACE_LOCK, ace_mon, this->lock_);
-
- // Clear out the existing tree.
- close_i ();
-
- // Make a deep copy of the passed tree.
- ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> iter(rbt);
-
- for (iter.first ();
- iter.is_done () == 0;
- iter.next ())
- insert_i (*(iter.key ()),
- *(iter.item ()));
-
- // Use the same allocator as the rhs.
- allocator_ = rbt.allocator_;
-}
-
-// Less than comparison function for keys, default functor
-// implementation returns 1 if k1 < k2, 0 otherwise.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::lessthan (const EXT_ID &k1, const EXT_ID &k2)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::lessthan");
- return this->compare_keys_ (k1, k2);
-}
-
-// Method for right rotation of the tree about a given node.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> void
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_rotate_right (ACE_RB_Tree_Node<EXT_ID, INT_ID> * x)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_rotate_right");
-
- if (! x)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("\nerror: x is a null pointer in ")
- ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_right\n")));
- else if (! (x->left()))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("\nerror: x->left () is a null pointer in ")
- ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_right\n")));
- else
- {
- ACE_RB_Tree_Node<EXT_ID, INT_ID> * y;
- y = x->left ();
- x->left (y->right ());
- if (y->right ())
- y->right ()->parent (x);
- y->parent (x->parent ());
- if (x->parent ())
- {
- if (x == x->parent ()->right ())
- x->parent ()->right (y);
- else
- x->parent ()->left (y);
- }
- else
- root_ = y;
- y->right (x);
- x->parent (y);
- }
-}
-
-// Method for left rotation of the tree about a given node.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> void
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_rotate_left (ACE_RB_Tree_Node<EXT_ID, INT_ID> * x)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_rotate_left");
-
- if (! x)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("\nerror: x is a null pointer in ")
- ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_left\n")));
- else if (! (x->right()))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("\nerror: x->right () is a null pointer ")
- ACE_TEXT ("in ACE_RB_Tree<EXT_ID, INT_ID>::RB_rotate_left\n")));
- else
- {
- ACE_RB_Tree_Node<EXT_ID, INT_ID> * y;
- y = x->right ();
- x->right (y->left ());
- if (y->left ())
- y->left ()->parent (x);
- y->parent (x->parent ());
- if (x->parent ())
- {
- if (x == x->parent ()->left ())
- x->parent ()->left (y);
- else
- x->parent ()->right (y);
- }
- else
- root_ = y;
- y->left (x);
- x->parent (y);
- }
-}
-
-// Method for restoring Red-Black properties after deletion.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> void
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_delete_fixup (ACE_RB_Tree_Node<EXT_ID, INT_ID> *x)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_delete_fixup");
-
- while (x != 0
- && x->parent ()
- && x->color () == ACE_RB_Tree_Node_Base::BLACK)
- {
- if (x == x->parent ()->left ())
- {
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *w = x->parent ()->right ();
- if (w && w->color () == ACE_RB_Tree_Node_Base::RED)
- {
- w->color (ACE_RB_Tree_Node_Base::BLACK);
- x->parent ()->color (ACE_RB_Tree_Node_Base::RED);
- RB_rotate_left (x->parent ());
- w = x->parent ()->right ();
- }
- // CLR pp. 263 says that nil nodes are implicitly colored BLACK
- if ((w) &&
- (!w->left ()
- || w->left ()->color () == ACE_RB_Tree_Node_Base::BLACK)
- && (!w->right ()
- || w->right ()->color () == ACE_RB_Tree_Node_Base::BLACK))
- {
- w->color (ACE_RB_Tree_Node_Base::RED);
- x = x->parent ();
- }
- else
- {
- // CLR pp. 263 says that nil nodes are implicitly colored BLACK
- if (w &&
- (!w->right ()
- || w->right ()->color () == ACE_RB_Tree_Node_Base::BLACK))
- {
- if (w->left ())
- w->left ()->color (ACE_RB_Tree_Node_Base::BLACK);
- w->color (ACE_RB_Tree_Node_Base::RED);
- RB_rotate_right (w);
- w = x->parent ()->right ();
- }
- if (w)
- {
- w->color (x->parent ()->color ());
- if (w->right ())
- w->right ()->color (ACE_RB_Tree_Node_Base::BLACK);
- }
- x->parent ()->color (ACE_RB_Tree_Node_Base::BLACK);
- RB_rotate_left (x->parent ());
- x = root_;
- }
- }
- else
- {
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *w = x->parent ()->left ();
- if (w && w->color () == ACE_RB_Tree_Node_Base::RED)
- {
- w->color (ACE_RB_Tree_Node_Base::BLACK);
- x->parent ()->color (ACE_RB_Tree_Node_Base::RED);
- RB_rotate_right (x->parent ());
- w = x->parent ()->left ();
- }
- // CLR pp. 263 says that nil nodes are implicitly colored BLACK
- if (w &&
- (!w->left ()
- || w->left ()->color () == ACE_RB_Tree_Node_Base::BLACK)
- && (!w->right ()
- || w->right ()->color () == ACE_RB_Tree_Node_Base::BLACK))
- {
- w->color (ACE_RB_Tree_Node_Base::RED);
- x = x->parent ();
- }
- else
- {
- // CLR pp. 263 says that nil nodes are implicitly colored BLACK
- if (w &&
- (!w->left ()
- || w->left ()->color () == ACE_RB_Tree_Node_Base::BLACK))
- {
- w->color (ACE_RB_Tree_Node_Base::RED);
- if (w->right ())
- w->right ()->color (ACE_RB_Tree_Node_Base::BLACK);
- RB_rotate_left (w);
- w = x->parent ()->left ();
- }
- if (w)
- {
- w->color (x->parent ()->color ());
- if (w->left ())
- w->left ()->color (ACE_RB_Tree_Node_Base::BLACK);
- }
- x->parent ()->color (ACE_RB_Tree_Node_Base::BLACK);
- RB_rotate_right (x->parent ());
- x = root_;
- }
- }
- }
-
- if (x)
- x->color (ACE_RB_Tree_Node_Base::BLACK);
-}
-
-// Return a pointer to a matching node if there is one, a pointer to
-// the node under which to insert the item if the tree is not empty
-// and there is no such match, or 0 if the tree is empty.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> ACE_RB_Tree_Node<EXT_ID, INT_ID> *
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find_node (const EXT_ID &k, ACE_RB_Tree_Base::RB_SearchResult &result)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find_node");
-
- // Start at the root.
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *current = root_;
-
- while (current)
- {
- // While there are more nodes to examine.
- if (this->lessthan (current->key (), k))
- {
- // If the search key is greater than the current node's key.
- if (current->right ())
- // If the right subtree is not empty, search to the right.
- current = current->right ();
- else
- {
- // If the right subtree is empty, we're done searching,
- // and are positioned to the left of the insertion point.
- result = LEFT;
- break;
- }
- }
- else if (this->lessthan (k, current->key ()))
- {
- // Else if the search key is less than the current node's key.
- if (current->left ())
- // If the left subtree is not empty, search to the left.
- current = current->left ();
- else
- {
- // If the left subtree is empty, we're done searching,
- // and are positioned to the right of the insertion point.
- result = RIGHT;
- break;
- }
- }
- else
- {
- // If the keys match exactly, we're done as well.
- result = EXACT;
- break;
- }
- }
-
- return current;
-}
-
-// Rebalance the tree after insertion of a node.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> void
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_rebalance (ACE_RB_Tree_Node<EXT_ID, INT_ID> * x)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_rebalance");
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *y = 0;
-
- while (x &&
- x->parent ()
- && x->parent ()->color () == ACE_RB_Tree_Node_Base::RED)
- {
- if (! x->parent ()->parent ())
- {
- // If we got here, something is drastically wrong!
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("\nerror: parent's parent is null in ")
- ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::RB_rebalance\n")));
- return;
- }
-
- if (x->parent () == x->parent ()->parent ()->left ())
- {
- y = x->parent ()->parent ()->right ();
- if (y && y->color () == ACE_RB_Tree_Node_Base::RED)
- {
- // Handle case 1 (see CLR book, pp. 269).
- x->parent ()->color (ACE_RB_Tree_Node_Base::BLACK);
- y->color (ACE_RB_Tree_Node_Base::BLACK);
- x->parent ()->parent ()->color (ACE_RB_Tree_Node_Base::RED);
- x = x->parent ()->parent ();
- }
- else
- {
- if (x == x->parent ()->right ())
- {
- // Transform case 2 into case 3 (see CLR book, pp. 269).
- x = x->parent ();
- RB_rotate_left (x);
- }
-
- // Handle case 3 (see CLR book, pp. 269).
- x->parent ()->color (ACE_RB_Tree_Node_Base::BLACK);
- x->parent ()->parent ()->color (ACE_RB_Tree_Node_Base::RED);
- RB_rotate_right (x->parent ()->parent ());
- }
- }
- else
- {
- y = x->parent ()->parent ()->left ();
- if (y && y->color () == ACE_RB_Tree_Node_Base::RED)
- {
- // Handle case 1 (see CLR book, pp. 269).
- x->parent ()->color (ACE_RB_Tree_Node_Base::BLACK);
- y->color (ACE_RB_Tree_Node_Base::BLACK);
- x->parent ()->parent ()->color (ACE_RB_Tree_Node_Base::RED);
- x = x->parent ()->parent ();
- }
- else
- {
- if (x == x->parent ()->left ())
- {
- // Transform case 2 into case 3 (see CLR book, pp. 269).
- x = x->parent ();
- RB_rotate_right (x);
- }
-
- // Handle case 3 (see CLR book, pp. 269).
- x->parent ()->color (ACE_RB_Tree_Node_Base::BLACK);
- x->parent ()->parent ()->color (ACE_RB_Tree_Node_Base::RED);
- RB_rotate_left (x->parent ()->parent ());
- }
- }
- }
-}
-
-// Method to find the successor node of the given node in the tree.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> ACE_RB_Tree_Node<EXT_ID, INT_ID> *
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_tree_successor (ACE_RB_Tree_Node<EXT_ID, INT_ID> *x) const
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_tree_successor");
-
- if (x->right ())
- return RB_tree_minimum (x->right ());
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *y = x->parent ();
- while ((y) && (x == y->right ()))
- {
- x = y;
- y = y->parent ();
- }
-
- return y;
-}
-
-// Method to find the predecessor node of the given node in the tree.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> ACE_RB_Tree_Node<EXT_ID, INT_ID> *
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_tree_predecessor (ACE_RB_Tree_Node<EXT_ID, INT_ID> *x) const
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_tree_predecessor");
-
- if (x->left ())
- return RB_tree_maximum (x->left ());
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *y = x->parent ();
-
- while ((y) && (x == y->left ()))
- {
- x = y;
- y = y->parent ();
- }
-
- return y;
-}
-
-// Method to find the minimum node of the subtree rooted at the given node.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> ACE_RB_Tree_Node<EXT_ID, INT_ID> *
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_tree_minimum (ACE_RB_Tree_Node<EXT_ID, INT_ID> *x) const
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_tree_minimum");
-
- while ((x) && (x->left ()))
- x = x->left ();
-
- return x;
-}
-
-// Method to find the maximum node of the subtree rooted at the given node.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> ACE_RB_Tree_Node<EXT_ID, INT_ID> *
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_tree_maximum (ACE_RB_Tree_Node<EXT_ID, INT_ID> *x) const
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_tree_maximum");
-
- while ((x) && (x->right ()))
- x = x->right ();
-
- return x;
-}
-
-// Close down an RB_Tree. this method should only be called with
-// locks already held.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close_i ()
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close_i");
-
- delete root_;
- current_size_ = 0;
- root_ = 0;
-
- return 0;
-}
-
-// Returns a pointer to the item corresponding to the given key, or 0
-// if it cannot find the key in the tree. This method should only be
-// called with locks already held.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find_i (const EXT_ID &k,
- ACE_RB_Tree_Node<EXT_ID, INT_ID>* &entry)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find_i");
-
- // Try to find a match.
- RB_SearchResult result = LEFT;
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *current = find_node (k, result);
-
- if (current && result == EXACT)
- {
- // Found an exact match: return a pointer to the node.
- entry = current;
- return 0;
- }
- else
- // The node is not there.
- return -1;
-}
-
-// Inserts a *copy* of the key and the item into the tree: both the
-// key type EXT_ID and the item type INT_ID must have well defined
-// semantics for copy construction and < comparison. This method
-// returns a pointer to the inserted item copy, or 0 if an error
-// occurred. NOTE: if an identical key already exists in the tree, no
-// new item is created, and the returned pointer addresses the
-// existing item associated with the existing key. This method should
-// only be called with locks already held.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> INT_ID *
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k, const INT_ID &t)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k, const INT_ID &t)");
-
- // Find the closest matching node, if there is one.
- RB_SearchResult result = LEFT;
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *current = find_node (k, result);
- if (current)
- {
- // If the keys match, just return a pointer to the node's item.
- if (result == EXACT)
- return &current->item ();
-
- // Otherwise if we're to the left of the insertion point, insert
- // into the right subtree.
- else if (result == LEFT)
- {
- if (current->right ())
- // If there is already a right subtree, complain.
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("\nright subtree already present in ")
- ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
- 0);
- else
- {
- // The right subtree is empty: insert new node there.
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *tmp = 0;
-
- ACE_NEW_RETURN (tmp,
- (ACE_RB_Tree_Node<EXT_ID, INT_ID>) (k, t),
- 0);
- current->right (tmp);
-
- // If the node was successfully inserted, set its
- // parent, rebalance the tree, color the root black, and
- // return a pointer to the inserted item.
- INT_ID *item = &(current->right ()->item ());
- current->right ()->parent (current);
- RB_rebalance (current->right ());
- root_->color (ACE_RB_Tree_Node_Base::BLACK);
- ++current_size_;
- return item;
- }
- }
- // Otherwise, we're to the right of the insertion point, so
- // insert into the left subtree.
- else // (result == RIGHT)
- {
- if (current->left ())
- // If there is already a left subtree, complain.
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("\nleft subtree already present in ")
- ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
- 0);
- else
- {
- // The left subtree is empty: insert new node there.
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *tmp = 0;
- ACE_NEW_RETURN (tmp,
- (ACE_RB_Tree_Node<EXT_ID, INT_ID>) (k, t),
- 0);
- current->left (tmp);
-
- // If the node was successfully inserted, set its
- // parent, rebalance the tree, color the root black, and
- // return a pointer to the inserted item.
- INT_ID *item = &current->left ()->item ();
- current->left ()->parent (current);
- RB_rebalance (current->left ());
- root_->color (ACE_RB_Tree_Node_Base::BLACK);
- ++current_size_;
- return item;
- }
- }
- }
- else
- {
- // The tree is empty: insert at the root and color the root
- // black.
- ACE_NEW_RETURN (root_,
- (ACE_RB_Tree_Node<EXT_ID, INT_ID>) (k, t),
- 0);
- if (root_)
- {
- root_->color (ACE_RB_Tree_Node_Base::BLACK);
- ++current_size_;
- return &root_->item ();
- }
- }
- return 0;
-}
-
-// Inserts a *copy* of the key and the item into the tree: both the
-// key type EXT_ID and the item type INT_ID must have well defined
-// semantics for copy construction. The default implementation also
-// requires that the key type support well defined < semantics. This
-// method passes back a pointer to the inserted (or existing) node,
-// and the search status. If the node already exists, the method
-// returns 1. If the node does not exist, and a new one is
-// successfully created, and the method returns 0. If there was an
-// error, the method returns -1.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k,
- const INT_ID &t,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k, const INT_ID &t, "
- "ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
-
- // Find the closest matching node, if there is one.
- RB_SearchResult result = LEFT;
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *current = find_node (k, result);
- if (current)
- {
- // If the keys match, just return a pointer to the node's item.
- if (result == EXACT)
- {
- entry = current;
- return 1;
- }
- // Otherwise if we're to the left of the insertion
- // point, insert into the right subtree.
- else if (result == LEFT)
- {
- if (current->right ())
- {
- // If there is already a right subtree, complain.
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("\nright subtree already present in ")
- ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
- -1);
- }
- else
- {
- // The right subtree is empty: insert new node there.
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *tmp = 0;
- ACE_NEW_RETURN (tmp,
- (ACE_RB_Tree_Node<EXT_ID, INT_ID>) (k, t),
- -1);
- current->right (tmp);
-
- // If the node was successfully inserted, set its parent, rebalance
- // the tree, color the root black, and return a pointer to the
- // inserted item.
- entry = current->right ();
- current->right ()->parent (current);
- RB_rebalance (current->right ());
- root_->color (ACE_RB_Tree_Node_Base::BLACK);
- ++current_size_;
- return 0;
- }
- }
- // Otherwise, we're to the right of the insertion point, so
- // insert into the left subtree.
- else // (result == RIGHT)
- {
- if (current->left ())
- // If there is already a left subtree, complain.
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("\nleft subtree already present in ")
- ACE_TEXT ("ACE_RB_Tree<EXT_ID, INT_ID>::insert_i\n")),
- -1);
- else
- {
- // The left subtree is empty: insert new node there.
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *tmp = 0;
- ACE_NEW_RETURN (tmp,
- (ACE_RB_Tree_Node<EXT_ID, INT_ID>) (k, t),
- -1);
- current->left (tmp);
- // If the node was successfully inserted, set its
- // parent, rebalance the tree, color the root black, and
- // return a pointer to the inserted item.
- entry = current->left ();
- current->left ()->parent (current);
- RB_rebalance (current->left ());
- root_->color (ACE_RB_Tree_Node_Base::BLACK);
- ++current_size_;
- return 0;
- }
- }
- }
- else
- {
- // The tree is empty: insert at the root and color the root black.
- ACE_NEW_RETURN (root_,
- (ACE_RB_Tree_Node<EXT_ID, INT_ID>) (k, t),
- -1);
- root_->color (ACE_RB_Tree_Node_Base::BLACK);
- ++current_size_;
- entry = root_;
- return 0;
- }
-}
-
-// Removes the item associated with the given key from the tree and
-// destroys it. Returns 1 if it found the item and successfully
-// destroyed it, 0 if it did not find the item, or -1 if an error
-// occurred. This method should only be called with locks already
-// held.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove_i (const EXT_ID &k, INT_ID &i)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove_i (const EXT_ID &k, INT_ID &i)");
-
- // Find a matching node, if there is one.
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *z;
- RB_SearchResult result = LEFT;
- z = find_node (k, result);
-
- // If there is a matching node: remove and destroy it.
- if (z && result == EXACT)
- {
- // Return the internal id stored in the deleted node.
- i = z->item ();
- return -1 == this->remove_i (z) ? -1 : 1;
- }
- else
- {
- // No matching node was found: return 0.
- return 0;
- }
-}
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove_i (ACE_RB_Tree_Node<EXT_ID, INT_ID> *z)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove_i (ACE_RB_Tree_Node<EXT_ID, INT_ID> *z)");
-
- // Delete the node and reorganize the tree to satisfy the Red-Black
- // properties.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *x;
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *y;
-
- if (z->left () && z->right ())
- y = RB_tree_successor (z);
- else
- y = z;
-
- if (y->left ())
- x = y->left ();
- else
- x = y->right ();
-
- if (x)
- x->parent (y->parent ());
-
- if (y->parent ())
- {
- if (y == y->parent ()->left ())
- y->parent ()->left (x);
- else
- y->parent ()->right (x);
- }
- else
- root_ = x;
-
- if (y != z)
- {
- // Copy the elements of y into z.
- z->key () = y->key ();
- z->item () = y->item ();
- }
-
- // CLR pp. 263 says that nil nodes are implicitly colored BLACK
- if (!y || y->color () == ACE_RB_Tree_Node_Base::BLACK)
- RB_delete_fixup (x);
-
- y->parent (0);
- y->right (0);
- y->left (0);
- delete y;
- --current_size_;
-
- return 0;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_RB_Tree_Iterator_Base)
-
-// Constructor.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &tree, int set_first)
- : tree_ (&tree), node_ (0)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (ACE_RB_Tree, int)");
-
- // Position the iterator at the first (or last) node in the tree.
- if (set_first)
- node_ = tree_->RB_tree_minimum (tree_->root_);
- else
- node_ = tree_->RB_tree_maximum (tree_->root_);
-}
-
-// Copy constructor.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &iter)
- : tree_ (iter.tree_),
- node_ (iter.node_)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (ACE_RB_Tree_Iterator_Base)");
-}
-
-// Assignment operator.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> void
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator= (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &iter)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator=");
- tree_ = iter.tree_;
- node_ = iter.node_;
-}
-
-// Destructor.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree_Iterator_Base ()
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree_Iterator_Base");
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_RB_Tree_Iterator)
-
-// Constructor.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &tree,
- int set_first)
- : ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (tree, set_first)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator");
-}
-
-// Destructor.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree_Iterator ()
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree_Iterator");
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_RB_Tree_Reverse_Iterator)
-
-// Constructor.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &tree, int set_last)
- : ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (tree, set_last ? 0 : 1)
-{
- ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator");
-}
-
-// Destructor.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree_Reverse_Iterator ()
-{
- ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree_Reverse_Iterator");
-}
-
-#endif /* !defined (ACE_RB_TREE_C) */
diff --git a/ace/RB_Tree.h b/ace/RB_Tree.h
deleted file mode 100644
index d42b92d1da6..00000000000
--- a/ace/RB_Tree.h
+++ /dev/null
@@ -1,710 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// RB_Tree.h
-//
-// = AUTHOR
-// Chris Gill
-//
-// ============================================================================
-
-#ifndef ACE_RB_TREE_H
-#define ACE_RB_TREE_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-#include "ace/Functor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Forward decl.
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_RB_Tree_Iterator_Base;
-
-// Forward decl.
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_RB_Tree_Iterator;
-
-// Forward decl.
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_RB_Tree_Reverse_Iterator;
-
-// Forward decl.
-class ACE_Allocator;
-
-class ACE_RB_Tree_Node_Base
-{
-public:
- enum RB_Tree_Node_Color {RED, BLACK};
-};
-
-template <class EXT_ID, class INT_ID>
-class ACE_RB_Tree_Node : public ACE_RB_Tree_Node_Base
-{
- // = TITLE
- // Implements a node in a Red-Black Tree ADT.
- //
-public:
- // = Initialization and termination methods.
-
- ACE_RB_Tree_Node (const EXT_ID &k, const INT_ID &t);
- // Constructor.
-
- ~ACE_RB_Tree_Node (void);
- // Destructor.
-
- EXT_ID &key (void);
- // Key accessor.
-
- INT_ID &item (void);
- // Item accessor.
-
- void color (RB_Tree_Node_Color c);
- // Set color of the node.
-
- RB_Tree_Node_Color color (void);
- // Get color of the node.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *parent (void);
- // Accessor for node's parent pointer.
-
- void parent (ACE_RB_Tree_Node<EXT_ID, INT_ID> * p);
- // Mutator for node's parent pointer.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *left (void);
- // Accessor for node's left child pointer.
-
- void left (ACE_RB_Tree_Node<EXT_ID, INT_ID> *l);
- // Mutator for node's left child pointer.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *right (void);
- // Accessor for node's right child pointer.
-
- void right (ACE_RB_Tree_Node<EXT_ID, INT_ID> * r);
- // Mutator for node's right child pointer
-
-private:
-
- EXT_ID k_;
- // The key.
-
- INT_ID t_;
- // The item.
-
- RB_Tree_Node_Color color_;
- // Color of the node.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *parent_;
- // Pointer to node's parent.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *left_;
- // Pointer to node's left child.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *right_;
- // Pointer to node's right child.
-};
-
-class ACE_RB_Tree_Base
-{
-public:
- // = Search result enumeration.
- enum RB_SearchResult {LEFT, EXACT, RIGHT};
-};
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_RB_Tree : public ACE_RB_Tree_Base
-{
- // = TITLE
- // Implements a Red-Black Tree ADT, according to T. H. Corman,
- // C. E. Leiserson, and R. L. Rivest, "Introduction to Algorithms"
- // 1990, MIT, chapter 14.
- //
- // = Description
- // A number of Changes have been made to this class template
- // in order to conform to the ACE_Hash_Map_Manager_Ex
- // interface. All previously supported public methods are
- // still part of this class. However, these are marked as
- // DEPRECATED and will be removed from this class in
- // a future version of ACE. Please migrate your code
- // to the appropriate public methods indicated in the
- // method deprecation comments.
- //
- // This class uses an <ACE_Allocator> to allocate memory. The
- // user can make this a persistent class by providing an
- // <ACE_Allocator> with a persistable memory pool.
-
-public:
- friend class ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>;
- friend class ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>;
- friend class ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>;
-
- typedef EXT_ID KEY;
- typedef INT_ID VALUE;
- typedef ACE_RB_Tree_Node<EXT_ID, INT_ID> ENTRY;
-
- // = ACE-style iterator typedefs.
- typedef ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ITERATOR;
- typedef ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> REVERSE_ITERATOR;
-
- // = STL-style iterator typedefs.
- typedef ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> iterator;
- typedef ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> reverse_iterator;
-
- // = Initialization and termination methods.
-
- ACE_RB_Tree (ACE_Allocator *alloc = 0);
- // Constructor.
-
- ACE_RB_Tree (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt);
- // Copy constructor.
-
- int open (ACE_Allocator *alloc = 0);
- // Initialize an RB Tree.
-
- int close (void);
- // Close down an RB_Tree and release dynamically allocated
- // resources.
-
- virtual ~ACE_RB_Tree (void);
- // Destructor.
-
- // = insertion, removal, and search methods.
-
- int bind (const EXT_ID &item,
- const INT_ID &int_id);
- // Associate <ext_id> with <int_id>. If <ext_id> is already in the
- // tree then the <ACE_RB_Tree_Node> is not changed. Returns 0 if a
- // new entry is bound successfully, returns 1 if an attempt is made
- // to bind an existing entry, and returns -1 if failures occur.
-
- int bind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry);
- // Same as a normal bind, except the tree entry is also passed back
- // to the caller. The entry in this case will either be the newly
- // created entry, or the existing one.
-
-
- int trybind (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Associate <ext_id> with <int_id> if and only if <ext_id> is not
- // in the tree. If <ext_id> is already in the tree then the <int_id>
- // parameter is assigned the existing value in the tree. Returns 0
- // if a new entry is bound successfully, returns 1 if an attempt is
- // made to bind an existing entry, and returns -1 if failures occur.
-
- int trybind (const EXT_ID &ext_id,
- INT_ID &int_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry);
- // Same as a normal trybind, except the tree entry is also passed
- // back to the caller. The entry in this case will either be the
- // newly created entry, or the existing one.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id);
- // Reassociate <ext_id> with <int_id>. If <ext_id> is not in the
- // tree then behaves just like <bind>. Returns 0 if a new entry is
- // bound successfully, returns 1 if an existing entry was rebound,
- // and returns -1 if failures occur.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry);
- // Same as a normal rebind, except the tree entry is also passed back
- // to the caller. The entry in this case will either be the newly
- // created entry, or the existing one.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id);
- // Associate <ext_id> with <int_id>. If <ext_id> is not in the tree
- // then behaves just like <bind>. Otherwise, store the old value of
- // <int_id> into the "out" parameter and rebind the new parameters.
- // Returns 0 if a new entry is bound successfully, returns 1 if an
- // existing entry was rebound, and returns -1 if failures occur.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry);
- // Same as a normal rebind, except the tree entry is also passed back
- // to the caller. The entry in this case will either be the newly
- // created entry, or the existing one.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id);
- // Associate <ext_id> with <int_id>. If <ext_id> is not in the tree
- // then behaves just like <bind>. Otherwise, store the old values
- // of <ext_id> and <int_id> into the "out" parameters and rebind the
- // new parameters. This is very useful if you need to have an
- // atomic way of updating <ACE_RB_Tree_Nodes> and you also need
- // full control over memory allocation. Returns 0 if a new entry is
- // bound successfully, returns 1 if an existing entry was rebound,
- // and returns -1 if failures occur.
-
- int rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry);
- // Same as a normal rebind, except the tree entry is also passed back
- // to the caller. The entry in this case will either be the newly
- // created entry, or the existing one.
-
- int find (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Locate <ext_id> and pass out parameter via <int_id>. If found,
- // return 0, returns -1 if not found.
-
- int find (const EXT_ID &ext_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry);
- // Locate <ext_id> and pass out parameter via <entry>. If found,
- // return 0, returns -1 if not found.
-
- int unbind (const EXT_ID &ext_id);
- // Unbind (remove) the <ext_id> from the tree. Don't return the
- // <int_id> to the caller (this is useful for collections where the
- // <int_id>s are *not* dynamically allocated...)
-
- int unbind (const EXT_ID &ext_id,
- INT_ID &int_id);
- // Break any association of <ext_id>. Returns the value of <int_id>
- // in case the caller needs to deallocate memory.
-
- int unbind (ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry);
- // Remove entry from tree. This method should be used with *extreme*
- // caution, and only for optimization purposes. The node being passed
- // in had better have been allocated by the tree that is unbinding it.
-
- // = Public helper methods.
-
- size_t current_size (void) const;
- // Returns the current number of nodes in the tree.
-
- void operator= (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt);
- // Assignment operator.
-
- virtual int lessthan (const EXT_ID &k1, const EXT_ID &k2);
- // Less than comparison function for keys, using comparison functor.
-
- ACE_LOCK &mutex (void);
- // Returns a reference to the underlying <ACE_LOCK>. This makes it
- // possible to acquire the lock explicitly, which can be useful in
- // some cases if you instantiate the <ACE_Atomic_Op> with an
- // <ACE_Recursive_Mutex> or <ACE_Process_Mutex>, or if you need to
- // guard the state of an iterator. NOTE: the right name would be
- // <lock>, but HP/C++ will choke on that!
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL styled iterator factory functions.
-
- ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> begin (void);
- // Return forward iterator positioned at first node in tree.
-
- ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> end (void);
- // Return forward iterator positioned at last node in tree.
-
- ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> rbegin (void);
- // Return reverse iterator positioned at last node in tree.
-
- ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> rend (void);
- // Return reverse iterator positioned at first node in tree.
-
- // = DEPRECATED methods. Please migrate your code to use the new methods instead
-
- INT_ID* find (const EXT_ID &k);
- // Returns a pointer to the item corresponding to the
- // given key, or 0 if it cannot find the key in the tree.
- //
- // DEPRECATED: signature will change to become
- // int find (const EXT_ID &ext_id); which will return
- // 0 if the <ext_id> is in the tree, otherwise -1.
-
-
-
- INT_ID* insert (const EXT_ID &k, const INT_ID &t);
- // Inserts a *copy* of the key and the item into the tree: both the
- // key type EXT_ID and the item type INT_ID must have well defined semantics
- // for copy construction. The default implementation also requires that
- // the key type support well defined < semantics. This method returns a
- // pointer to the inserted item copy, or 0 if an error occurred.
- // NOTE: if an identical key already exists in the tree, no new item
- // is created, and the returned pointer addresses the existing item
- // associated with the existing key.
- // DEPRECATED
-
- int remove (const EXT_ID &k);
- // Removes the item associated with the given key from the tree and
- // destroys it. Returns 1 if it found the item and successfully
- // destroyed it, 0 if it did not find the item, or -1 if an error
- // occurred.
- // DEPRECATED
-
- void clear (void);
- // Destroys all nodes and sets the root pointer null.
- // DEPRECATED
-
-protected:
-
- // = Protected methods. These should only be called with locks held.
-
- void RB_rotate_right (ACE_RB_Tree_Node<EXT_ID, INT_ID> * x);
- // Method for right rotation of the tree about a given node.
-
- void RB_rotate_left (ACE_RB_Tree_Node<EXT_ID, INT_ID> * x);
- // Method for left rotation of the tree about a given node.
-
- void RB_delete_fixup (ACE_RB_Tree_Node<EXT_ID, INT_ID> * x);
- // Method for restoring Red-Black properties after deletion.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *
- RB_tree_successor (ACE_RB_Tree_Node<EXT_ID, INT_ID> *x) const;
- // Method to find the successor node of the given node in the tree.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *
- RB_tree_predecessor (ACE_RB_Tree_Node<EXT_ID, INT_ID> *x) const;
- // Method to find the predecessor node of the given node in the
- // tree.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *
- RB_tree_minimum (ACE_RB_Tree_Node<EXT_ID, INT_ID> *x) const;
- // Method to find the minimum node of the subtree rooted at the
- // given node.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *
- RB_tree_maximum (ACE_RB_Tree_Node<EXT_ID, INT_ID> *x) const;
- // Method to find the maximum node of the subtree rooted at the
- // given node.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *
- find_node (const EXT_ID &k, RB_SearchResult &result);
- // Returns a pointer to a matching node if there is one, a pointer
- // to the node under which to insert the item if the tree is not
- // empty and there is no such match, or 0 if the tree is empty.
- // It stores the result of the search in the result argument:
- // LEFT if the node is to the left of the node to be inserted,
- // RIGHT if the node is to the right of the node to be inserted,
- // or EXACT if an exactly matching node already exists.
-
- void RB_rebalance (ACE_RB_Tree_Node<EXT_ID, INT_ID> * x);
- // Rebalance the tree after insertion of a node.
-
- int close_i (void);
- // Close down an RB_Tree. this method should
- // only be called with locks already held.
-
- int find_i (const EXT_ID &ext_id, ACE_RB_Tree_Node<EXT_ID, INT_ID>* &entry);
- // Retrieves a pointer to the item corresponding to the
- // given key. Returns 0 for success, or -1 if it cannot find the key
- // in the tree.
-
- INT_ID* insert_i (const EXT_ID &k, const INT_ID &t);
- // Inserts a *copy* of the key and the item into the tree: both the
- // key type EXT_ID and the item type INT_ID must have well defined semantics
- // for copy construction. The default implementation also requires that
- // the key type support well defined < semantics. This method returns a
- // pointer to the inserted item copy, or 0 if an error occurred.
- // NOTE: if an identical key already exists in the tree, no new item
- // is created, and the returned pointer addresses the existing item
- // associated with the existing key.
-
- int insert_i (const EXT_ID &k, const INT_ID &t,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry);
- // Inserts a *copy* of the key and the item into the tree: both the
- // key type EXT_ID and the item type INT_ID must have well defined semantics
- // for copy construction. The default implementation also requires that
- // the key type support well defined < semantics. This method passes back
- // a pointer to the inserted (or existing) node, and the search status. If
- // the node already exists, the method returns 1. If the node does not
- // exist, and a new one is successfully created, and the method returns 0.
- // If there was an error, the method returns -1.
-
- int remove_i (const EXT_ID &k, INT_ID &i);
- // Removes the item associated with the given key from the tree and
- // destroys it. Returns 1 if it found the item and successfully
- // destroyed it, 0 if it did not find the item, or -1 if an error
- // occurred. Returns the stored internal id in the second argument.
-
- int remove_i (ACE_RB_Tree_Node<EXT_ID, INT_ID> *z);
- // Removes the item associated with the given key from the tree and
- // destroys it.
-
-private:
-
- // = Private members.
-
- ACE_Allocator *allocator_;
- // Pointer to a memory allocator.
-
- ACE_LOCK lock_;
- // Synchronization variable for the MT_SAFE <ACE_RB_Tree>.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *root_;
- // The root of the tree.
-
- COMPARE_KEYS compare_keys_;
- // Comparison functor for comparing nodes in the tree.
-
- size_t current_size_;
- // The current number of nodes in the tree.
-};
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_RB_Tree_Iterator_Base
-{
- // = TITLE
- // Implements a common base class for iterators for a Red-Black Tree ADT.
-
-public:
-
- void operator= (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &iter);
- // Assignment operator: copies both the tree reference and the position in the tree.
-
- // = Iteration methods.
-
- int done (void) const;
- // Returns 1 when the iteration has completed, otherwise 0.
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> & operator* (void) const;
- // STL-like iterator dereference operator: returns a reference
- // to the node underneath the iterator.
-
- const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &tree (void);
- // Returns a const reference to the tree over which we're iterating.
-
- int operator== (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &) const;
- // Comparison operator: returns 1 if both iterators point to the same position, otherwise 0.
-
- int operator!= (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &) const;
- // Comparison operator: returns 1 if the iterators point to different positions, otherwise 0.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
-
- // = Initialization and termination methods.
-
- ACE_RB_Tree_Iterator_Base (void);
- // Create the singular iterator. No valid iterator can be equal to
- // it, it is illegal to dereference a singular iterator, etc. etc.
-
- ACE_RB_Tree_Iterator_Base (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &tree,
- int set_first);
- // Constructor. Takes an ACE_RB_Tree over which to iterate, and
- // an integer indicating (if non-zero) to position the iterator
- // at the first element in the tree (if this integer is 0, the
- // iterator is positioned at the last element in the tree).
-
- ACE_RB_Tree_Iterator_Base (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &iter);
- // Copy constructor.
-
- ~ACE_RB_Tree_Iterator_Base (void);
- // Destructor.
-
- // = Internal methods
-
- int forward_i (void);
- // Move forward by one element in the tree. Returns 0 when
- // there are no more elements in the tree, otherwise 1.
-
- int reverse_i (void);
- // Move back by one element in the tree. Returns 0 when
- // there are no more elements in the tree, otherwise 1.
-
- void dump_i (void) const;
- // Dump the state of an object.
-
- // = Protected members.
-
- const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> *tree_;
- // Reference to the ACE_RB_Tree over which we're iterating.
-
- ACE_RB_Tree_Node <EXT_ID, INT_ID> *node_;
- // Pointer to the node currently under the iterator.
-
-};
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_RB_Tree_Iterator : public ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
-{
- // = TITLE
- // Implements an iterator for a Red-Black Tree ADT.
-
-public:
-
- // = Initialization and termination methods.
- ACE_RB_Tree_Iterator (void);
- // Create the singular iterator.
- // It is illegal to deference the iterator, no valid iterator is
- // equal to a singular iterator, etc. etc.
-
- ACE_RB_Tree_Iterator (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &tree,
- int set_first = 1);
- // Constructor. Takes an ACE_RB_Tree over which to iterate, and
- // an integer indicating (if non-zero) to position the iterator
- // at the first element in the tree (if this integer is 0, the
- // iterator is positioned at the last element in the tree).
-
- ~ACE_RB_Tree_Iterator (void);
- // Destructor.
-
- // = ACE-style iteration methods.
-
- int advance (void);
- // Move forward by one element in the tree. Returns
- // 0 when all elements have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL-style iteration methods.
-
- ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> & operator++ (void);
- // Prefix advance.
-
- ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator++ (int);
- // Postfix advance.
-
- ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> & operator-- (void);
- // Prefix reverse.
-
- ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator-- (int);
- // Postfix reverse.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- int next (ACE_RB_Tree_Node<EXT_ID, INT_ID> *&next_entry) const;
- // Passes back the <entry> under the iterator. Returns 0 if
- // the iteration has completed, otherwise 1. This method must
- // be declared and defined in both the derived forward and
- // reverse iterator classes rather than in the base iterator
- // class because of a method signature resolution problem
- // caused by the existence of the deprecated next (void)
- // method in the derived forward iterator class. When that
- // deprecated method is removed, this method should be removed
- // from the derived classes and placed in the base class.
-
- // = DEPRECATED methods. Please migrate your code to use the new methods instead
-
- EXT_ID *key (void);
- // Accessor for key of node under iterator (if any).
- // DEPRECATED
-
- INT_ID *item (void);
- // Accessor for item of node under iterator (if any).
- // DEPRECATED
-
- int first (void);
- // Move to the first item in the iteration (and in the tree).
- // DEPRECATED
-
- int last (void);
- // Move to the last item in the iteration (and in the tree).
- // DEPRECATED
-
- int next (void);
- // Move to the next item in the iteration (and in the tree).
- // DEPRECATED
-
- int previous (void);
- // Move to the previous item in the iteration (and in the tree).
- // DEPRECATED
-
- int is_done (void);
- // Returns 0 if the iterator is positioned over a valid ACE_RB_Tree
- // node, returns 1 if not.
- // DEPRECATED: use the base class <done> method instead.
-
-};
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-class ACE_RB_Tree_Reverse_Iterator : public ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
-{
- // = TITLE
- // Implements a reverse iterator for a Red-Black Tree ADT.
-
-public:
-
- // = Initialization and termination methods.
- ACE_RB_Tree_Reverse_Iterator (void);
- // Create the singular iterator.
- // It is illegal to deference the iterator, no valid iterator is
- // equal to a singular iterator, etc. etc.
-
- ACE_RB_Tree_Reverse_Iterator (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &tree,
- int set_last = 1);
- // Constructor. Takes an ACE_RB_Tree over which to iterate, and
- // an integer indicating (if non-zero) to position the iterator
- // at the last element in the tree (if this integer is 0, the
- // iterator is positioned at the first element in the tree).
-
- ~ACE_RB_Tree_Reverse_Iterator (void);
- // Destructor.
-
- // = ACE-style iteration methods.
-
- int advance (void);
- // Move forward by one element in the tree. Returns
- // 0 when all elements have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // = STL-style iteration methods.
-
- ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> & operator++ (void);
- // Prefix advance.
-
- ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator++ (int);
- // Postfix advance.
-
- ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> & operator-- (void);
- // Prefix reverse.
-
- ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator-- (int);
- // Postfix reverse.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- int next (ACE_RB_Tree_Node<EXT_ID, INT_ID> *&next_entry) const;
- // Passes back the <entry> under the iterator. Returns 0 if
- // the iteration has completed, otherwise 1. This method must
- // be declared and defined in both the derived forward and
- // reverse iterator classes rather than in the base iterator
- // class because of a method signature resolution problem
- // caused by the existence of the deprecated next (void)
- // method in the derived forward iterator class. When that
- // deprecated method is removed, this method should be removed
- // from the derived classes and placed in the base class.
-
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/RB_Tree.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/RB_Tree.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("RB_Tree.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ! defined (ACE_RB_TREE_H) */
diff --git a/ace/RB_Tree.i b/ace/RB_Tree.i
deleted file mode 100644
index 23014a4ffc3..00000000000
--- a/ace/RB_Tree.i
+++ /dev/null
@@ -1,1153 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/Synch.h"
-#include "ace/Malloc.h"
-
-/////////////////////////////////////////////////////
-// template class ACE_RB_Tree_Node<EXT_ID, INT_ID> //
-/////////////////////////////////////////////////////
-
-// Key accessor.
-
-template <class EXT_ID, class INT_ID>
-ACE_INLINE EXT_ID &
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::key ()
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::key");
- return k_;
-}
-
-
-// Item accessor.
-
-template <class EXT_ID, class INT_ID>
-ACE_INLINE INT_ID &
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::item ()
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>:item");
- return t_;
-}
-
-
-// Set color of the node.
-
-template <class EXT_ID, class INT_ID>
-ACE_INLINE void
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::color (ACE_RB_Tree_Node_Base::RB_Tree_Node_Color c)
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::color mutator");
- color_ = c;
-}
-
-
-// Get color of the node.
-
-template <class EXT_ID, class INT_ID>
-ACE_INLINE ACE_RB_Tree_Node_Base::RB_Tree_Node_Color
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::color ()
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::color accessor");
- return color_;
-}
-
-
-// Accessor for node's parent pointer.
-
-template <class EXT_ID, class INT_ID>
-ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent ()
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent accessor");
- return parent_;
-}
-
-
-// Mutator for node's parent pointer.
-
-template <class EXT_ID, class INT_ID>
-ACE_INLINE void
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent (ACE_RB_Tree_Node<EXT_ID, INT_ID> * p)
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent mutator");
- parent_ = p;
-}
-
-
-
-// Accessor for node's left child pointer.
-
-template <class EXT_ID, class INT_ID>
-ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::left ()
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::left accessor");
- return left_;
-}
-
-
-// Mutator for node's left child pointer.
-
-template <class EXT_ID, class INT_ID>
-ACE_INLINE void
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::left (ACE_RB_Tree_Node<EXT_ID, INT_ID> * l)
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::left mutator");
- left_ = l;
-}
-
-
-// Accessor for node's right child pointer.
-
-template <class EXT_ID, class INT_ID>
-ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::right ()
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::right accessor");
- return right_;
-}
-
-
-// Mutator for node's right child pointer.
-
-template <class EXT_ID, class INT_ID>
-ACE_INLINE void
-ACE_RB_Tree_Node<EXT_ID, INT_ID>::right (ACE_RB_Tree_Node<EXT_ID, INT_ID> * r)
-{
- ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::right mutator");
- right_ = r;
-}
-
-
-
-////////////////////////////////////////////////////////////////////////
-// template class ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
-////////////////////////////////////////////////////////////////////////
-
-
-// Initialize an RB Tree.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::open (ACE_Allocator *alloc)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::open");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- // Calling this->close_i () ensures we release previously allocated
- // memory before allocating new memory.
- this->close_i ();
-
- // If we were passed an allocator use it,
- // otherwise use the default instance.
-
- if (alloc == 0)
- alloc = ACE_Allocator::instance ();
-
- this->allocator_ = alloc;
-
- return 0;
-}
-
-// Close down an RB_Tree and release dynamically allocated
-// resources.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close (void)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->close_i ();
-}
-
-
-// Associate <ext_id> with <int_id>. If <ext_id> is already in the
-// tree then the <ACE_RB_Tree_Node> is not changed. Returns 0 if a
-// new entry is bound successfully, returns 1 if an attempt is made
-// to bind an existing entry, and returns -1 if failures occur.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &item, const INT_ID &int_id)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
- return this->insert_i (ext_id, int_id, entry);
-}
-
-
-// Same as a normal bind, except the tree entry is also passed back
-// to the caller. The entry in this case will either be the newly
-// created entry, or the existing one.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>"
- "::bind (const EXT_ID &ext_id, const INT_ID &int_id, "
- "ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->insert_i (ext_id, int_id, entry);
-}
-
-
-// Associate <ext_id> with <int_id> if and only if <ext_id> is not
-// in the tree. If <ext_id> is already in the tree then the <int_id>
-// parameter is assigned the existing value in the tree. Returns 0
-// if a new entry is bound successfully, returns 1 if an attempt is
-// made to bind an existing entry, and returns -1 if failures occur.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "trybind (const EXT_ID &ext_id, INT_ID &int_id)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
- int result = this->insert_i (ext_id, int_id, entry);
-
- if (result == 1)
- {
- int_id = entry->item ();
- }
-
- return result;
-}
-
-
-// Same as a normal trybind, except the tree entry is also passed
-// back to the caller. The entry in this case will either be the
-// newly created entry, or the existing one.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_id,
- INT_ID &int_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "trybind (const EXT_ID &ext_id, INT_ID &int_id, "
- "ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- int result = this->insert_i (ext_id, int_id, entry);
-
- if (result == 1)
- {
- int_id = entry->item ();
- }
-
-
- return result;
-}
-
-
-// Reassociate <ext_id> with <int_id>. If <ext_id> is not in the
-// tree then behaves just like <bind>. Returns 0 if a new entry is
-// bound successfully, returns 1 if an existing entry was rebound,
-// and returns -1 if failures occur.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "rebind (const EXT_ID &ext_id, const INT_ID &int_id)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
- int result = this->insert_i (ext_id, int_id, entry);
-
- if (result == 1)
- {
- entry->key () = ext_id;
- entry->item () = int_id;
- }
-
- return result;
-}
-
-
-// Same as a normal rebind, except the tree entry is also passed back
-// to the caller. The entry in this case will either be the newly
-// created entry, or the existing one.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "rebind (const EXT_ID &ext_id, const INT_ID &int_id, "
- "ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- int result = this->insert_i (ext_id, int_id, entry);
-
- if (result == 1)
- {
- entry->key () = ext_id;
- entry->item () = int_id;
- }
-
- return result;
-}
-
-
-// Associate <ext_id> with <int_id>. If <ext_id> is not in the tree
-// then behaves just like <bind>. Otherwise, store the old value of
-// <int_id> into the "out" parameter and rebind the new parameters.
-// Returns 0 if a new entry is bound successfully, returns 1 if an
-// existing entry was rebound, and returns -1 if failures occur.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "rebind (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
- int result = this->insert_i (ext_id, int_id, entry);
-
- if (result == 1)
- {
- old_int_id = entry->item ();
- entry->key () = ext_id;
- entry->item () = int_id;
- }
-
- return result;
-}
-
-
-// Same as a normal rebind, except the tree entry is also passed back
-// to the caller. The entry in this case will either be the newly
-// created entry, or the existing one.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- INT_ID &old_int_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "rebind (const EXT_ID &ext_id, const INT_ID &int_id,"
- "INT_ID &old_int_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- int result = this->insert_i (ext_id, int_id, entry);
-
- if (result == 1)
- {
- old_int_id = entry->item ();
- entry->key () = ext_id;
- entry->item () = int_id;
- }
-
- return result;
-}
-
-
-// Associate <ext_id> with <int_id>. If <ext_id> is not in the tree
-// then behaves just like <bind>. Otherwise, store the old values
-// of <ext_id> and <int_id> into the "out" parameters and rebind the
-// new parameters. This is very useful if you need to have an
-// atomic way of updating <ACE_RB_Tree_Nodes> and you also need
-// full control over memory allocation. Returns 0 if a new entry is
-// bound successfully, returns 1 if an existing entry was rebound,
-// and returns -1 if failures occur.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "rebind (const EXT_ID &ext_id, const INT_ID &int_id,"
- "EXT_ID &old_ext_id, INT_ID &old_int_id)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
- int result = this->insert_i (ext_id, int_id, entry);
-
- if (result == 1)
- {
- old_ext_id = entry->key ();
- old_int_id = entry->item ();
- entry->key () = ext_id;
- entry->item () = int_id;
- }
-
- return result;
-}
-
-
-// Same as a normal rebind, except the tree entry is also passed back
-// to the caller. The entry in this case will either be the newly
-// created entry, or the existing one.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
- const INT_ID &int_id,
- EXT_ID &old_ext_id,
- INT_ID &old_int_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "rebind (const EXT_ID &ext_id, const INT_ID &int_id, "
- "EXT_ID &old_ext_id, INT_ID &old_int_id, "
- "ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- int result = this->insert_i (ext_id, int_id, entry);
-
- if (result == 1)
- {
- old_ext_id = entry->key ();
- old_int_id = entry->item ();
- entry->key () = ext_id;
- entry->item () = int_id;
- }
-
- return result;
-}
-
-
-// Locate <ext_id> and pass out parameter via <int_id>. If found,
-// return 0, returns -1 if not found.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "find (const EXT_ID &ext_id, INT_ID &int_id)");
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry = 0;
-
- int result = this->find_i (ext_id, entry);
- if (result == 0)
- {
- int_id = entry->item ();
- }
-
- return result;
-}
-
-// Locate <ext_id> and pass out parameter via <entry>. If found,
-// return 0, returns -1 if not found.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "find (const EXT_ID &ext_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->find_i (ext_id, entry);
-}
-
-
-// Unbind (remove) the <ext_id> from the tree. Don't return the
-// <int_id> to the caller (this is useful for collections where the
-// <int_id>s are *not* dynamically allocated...).
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- INT_ID int_id;
- int result = this->remove_i (ext_id, int_id);
-
- // Remap the return codes from the internal method: this
- // is maintained this way in support of deprecated methods,
- // and will be cleaned up when these methods are removed.
- switch (result)
- {
- case 1:
- // If the node was found and deleted, return success.
- return 0;
- case 0:
- // If nothing was found, set errno and break.
- errno = ENOENT;
- break;
- case -1:
- // If an error happened, just break.
- break;
- }
-
- // Return an error if we didn't already return success.
- return -1;
-}
-
-
-// Break any association of <ext_id>. Returns the value of <int_id>
-// in case the caller needs to deallocate memory.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id,
- INT_ID &int_id)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
- "unbind (const EXT_ID &ext_id, INT_ID &int_id)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- int result = this->remove_i (ext_id, int_id);
-
- // Remap the return codes from the internal method: this
- // is maintained this way in support of deprecated methods,
- // and will be cleaned up when these methods are removed.
- switch (result)
- {
- case 1:
- // If the node was found and deleted, return success.
- return 0;
- case 0:
- // If nothing was found, set errno and break.
- errno = ENOENT;
- break;
- case -1:
- // If an error happened, just break.
- break;
- }
-
- // Return an error if we didn't already return success.
- return -1;
-}
-
-
-// Remove entry from the tree. This method should be used with *extreme*
-// caution, and only for optimization purposes. The node being passed
-// in had better have been allocated by the tree that is unbinding it.
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- return this->remove_i (entry);
-}
-
-
-// Returns a reference to the underlying <ACE_LOCK>. This makes it
-// possible to acquire the lock explicitly, which can be useful in
-// some cases if you instantiate the <ACE_Atomic_Op> with an
-// <ACE_Recursive_Mutex> or <ACE_Process_Mutex>, or if you need to
-// guard the state of an iterator. NOTE: the right name would be
-// <lock>, but HP/C++ will choke on that!
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_LOCK &
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::mutex (void)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::mutex");
- return this->lock_;
-}
-
-
-// Dump the state of an object.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE void
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncurrent_size_ = %d"), this->current_size_));
- this->allocator_->dump ();
- this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-
-// Return forward iterator positioned at first node in tree.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::begin (void)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::begin");
-
- return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (*this);
-}
-
-
-// Return forward iterator positioned at last node in tree.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::end (void)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::end");
-
- return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ();
-}
-
-
-// Return reverse iterator positioned at last node in tree.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rbegin (void)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rbegin");
-
- return ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (*this);
-}
-
-
-// Return reverse iterator positioned at first node in tree.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rend (void)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rend");
-
- return ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ();
-}
-
-
-// Returns a pointer to the item corresponding to the given key,
-// or 0 if it cannot find the key in the tree. DEPRECATED.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE INT_ID*
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &k)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &k)");
-
- // The reinterpret cast is to ensure that when this deprecated method is removed, and
- // is replaced (as planned) by a find method that takes the same argument signature
- // but returns an int, that the compiler will cough if this return macro is not
- // changed to just return an int (whose value will be -1). Please leave this as is.
- ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, ACE_reinterpret_cast(INT_ID*, 0L));
-
- ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
- int result = this->find_i (k, entry);
- return (result == 0) ? &(entry->item ()) : 0;
-}
-
-// Inserts a *copy* of the key and the item into the tree:
-// both the key type EXT_ID and the item type INT_ID must have well
-// defined semantics for copy construction and < comparison.
-// This method returns a pointer to the inserted item copy,
-// or 0 if an error occurred. NOTE: if an identical key
-// already exists in the tree, no new item is created, and
-// the returned pointer addresses the existing item
-// associated with the existing key. DEPRECATED.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE INT_ID*
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert (const EXT_ID &k, const INT_ID &t)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, ACE_reinterpret_cast(INT_ID*, 0L));
-
- return this->insert_i (k, t);
-}
-
-
-// Removes the item associated with the given key from the
-// tree and destroys it. Returns 1 if it found the item
-// and successfully destroyed it, 0 if it did not find the
-// item, or -1 if an error occurred. DEPRECATED.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove (const EXT_ID &k)
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- INT_ID i;
- return this->remove_i (k, i);
-}
-
-
-// Destroys all nodes and sets the root pointer null. DEPRECATED
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE void
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::clear ()
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::clear");
- ACE_WRITE_GUARD (ACE_LOCK, ace_mon, this->lock_);
-
- this->close_i ();
-}
-
-// Returns the current number of nodes in the tree.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE size_t
-ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::current_size () const
-{
- ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::current_size");
- return current_size_;
-}
-
-
-///////////////////////////////////////////////////////////////////////
-// template class //
-// ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
-///////////////////////////////////////////////////////////////////////
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (void)
- : tree_ (0), node_ (0)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (void)");
-}
-
-// Returns 1 when the iteration has completed, otherwise 0.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::done (void) const
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::done");
-
- return node_ ? 0 : 1;
-}
-
-
-// STL-like iterator dereference operator: returns a reference
-// to the node underneath the iterator.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> &
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator* (void) const
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator*");
- return *(this->node_);
-}
-
-
-// Returns a reference to the tree over which we're iterating.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>ACE_INLINE const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree (void)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree");
- return *tree_;
-}
-
-
-// Comparison operator: returns 1 if both iterators point to the same position, otherwise 0.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==
- (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt) const
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==");
- return (this->node_ == rbt.node_) ? 1 : 0;
-}
-
-
-// Comparison operator: returns 1 if the iterators point to different positions, otherwise 0.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=
- (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt) const
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=");
- return (this->node_ == rbt.node_) ? 0 : 1;
-}
-
-
-// Move forward by one element in the tree. Returns 0 when
-// there are no more elements in the tree, otherwise 1.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::forward_i (void)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::forward_i");
-
- node_ = tree_->RB_tree_successor (node_);
- return node_ ? 1 : 0;
-}
-
-
-// Move back by one element in the tree. Returns 0 when
-// there are no more elements in the tree, otherwise 1.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::reverse_i (void)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::reverse_i");
-
- node_ = tree_->RB_tree_predecessor (node_);
- return node_ ? 1 : 0;
-}
-
-
-// Dump the state of an object.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE void
-ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump_i (void) const
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump_i");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("node_ = %x"), this->node_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-
-//////////////////////////////////////////////////////////////////
-// template class //
-// ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
-//////////////////////////////////////////////////////////////////
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator (void)
- : ACE_RB_Tree_Iterator_Base<EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK> ()
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator (void)");
-}
-
-// Move forward by one element in the tree. Returns
-// 0 when all elements have been seen, else 1.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance (void)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance");
-
- return this->forward_i ();
-}
-
-
-// Dump the state of an object.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE void
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
-
- this->dump_i ();
-}
-
-
-// Prefix advance.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (void)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator++ (void)");
-
- this->forward_i ();
- return *this;
-}
-
-
-// Postfix advance.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator++ (int)");
-
- ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
- this->forward_i ();
- return retv;
-}
-
-
-// Prefix reverse.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (void)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator-- (void)");
-
- this->reverse_i ();
- return *this;
-}
-
-
-// Postfix reverse.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator-- (int)");
-
- ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
- this->reverse_i ();
- return retv;
-}
-
-
-// Passes back the <entry> under the iterator. Returns 0 if
-// the iteration has completed, otherwise 1. This method must
-// be declared and defined in both the derived forward and
-// reverse iterator classes rather than in the base iterator
-// class because of a method signature resolution problem
-// caused by the existence of the deprecated next (void)
-// method in the derived forward iterator class. When that
-// deprecated method is removed, this method should be removed
-// from the derived classes and placed in the base class.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next (ACE_RB_Tree_Node<EXT_ID, INT_ID> *&next_entry) const
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
-
- if (this->node_)
- {
- next_entry = this->node_;
- return 1;
- }
-
- return 0;
-}
-
-
-// Accessor for key of node under iterator (if any). DEPRECATED.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE EXT_ID *
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::key ()
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::key");
- return this->node_ ? (&(this->node_->key ())) : 0;
-}
-
-
-// Accessor for item of node under iterator (if any). DEPRECATED.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE INT_ID *
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item ()
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item");
- return this->node_ ? (&(this->node_->item ())) : 0;
-}
-
-
-// Move to the first item in the tree. DEPRECATED.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first ()
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first");
- this->node_ = this->tree_->RB_tree_minimum (this->tree_->root_);
- return this->node_ ? 1 : 0;
-}
-
-
-// Move to the last item in the tree. DEPRECATED.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last ()
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last");
- this->node_ = this->tree_->RB_tree_maximum (this->tree_->root_);
- return this->node_ ? 1 : 0;
-}
-
-
-// Moves to the next item in the tree,
-// returns 1 if there is a next item, 0 otherwise. DEPRECATED.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next ()
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
- this->node_ = this->tree_->RB_tree_successor (this->node_);
- return this->node_ ? 1 : 0;
-}
-
-
-// Moves to the previous item in the tree,
-// returns 1 if there is a previous item, 0 otherwise. DEPRECATED.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous ()
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous");
- this->node_ = this->tree_->RB_tree_predecessor (this->node_);
- return this->node_ ? 1 : 0;
-}
-
-
-// Returns 0 if the iterator is positioned over a valid ACE_RB_Tree
-// node, returns 1 if not. DEPRECATED.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done ()
-{
- ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done");
- return this->node_ ? 0 : 1;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-// template class //
-// ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
-//////////////////////////////////////////////////////////////////////////
-
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE
-ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator (void)
- : ACE_RB_Tree_Iterator_Base<EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK> ()
-{
- ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator (void)");
-}
-
-// Move forward by one element in the tree. Returns
-// 0 when all elements have been seen, else 1.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance (void)
-{
- ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance");
-
- return this->reverse_i ();
-}
-
-
-// Dump the state of an object.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE void
-ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
-{
- ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
-
- this->dump_i ();
-}
-
-
-// Prefix advance.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
-ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (void)
-{
- ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (void)");
-
- this->reverse_i ();
- return *this;
-}
-
-
-// Postfix advance.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
-ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
-{
- ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)");
-
- ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
- this->reverse_i ();
- return retv;
-}
-
-
-// Prefix reverse.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
-ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (void)
-{
- ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (void)");
-
- this->forward_i ();
- return *this;
-}
-
-
-// Postfix reverse.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
-ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
-{
- ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)");
-
- ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
- this->forward_i ();
- return retv;
-}
-
-
-// Passes back the <entry> under the iterator. Returns 0 if
-// the iteration has completed, otherwise 1. This method must
-// be declared and defined in both the derived forward and
-// reverse iterator classes rather than in the base iterator
-// class because of a method signature resolution problem
-// caused by the existence of the deprecated next (void)
-// method in the derived forward iterator class. When that
-// deprecated method is removed, this method should be removed
-// from the derived classes and placed in the base class.
-
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
-ACE_INLINE int
-ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next (ACE_RB_Tree_Node<EXT_ID, INT_ID> *&next_entry) const
-{
- ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
-
- if (this->node_)
- {
- next_entry = this->node_;
- return 1;
- }
-
- return 0;
-}
diff --git a/ace/README b/ace/README
deleted file mode 100644
index b72397313ed..00000000000
--- a/ace/README
+++ /dev/null
@@ -1,1510 +0,0 @@
-// $Id$
-
-ACE Portability Macros
-----------------------
-
-The following describes the meaning of the C++ compiler macros that
-can be set in the config*.h file. When you port ACE to a new platform
-and/or C++ compiler, make sure that you check to see which of these
-need to be defined. It's helpful to check the various config*.h files
-in this directory to see what's already been defined. If you need to
-add new macros, please send them to me and I'll add them to this file.
-
-Eventually, most of this information should be auto-discovered via GNU
-autoconf, which Ossama Othman is working on, at
-http://www.cs.wustl.edu/~othman/aceconf/.
-
-Macro Description
------ -----------
-
-ACE_CAST_CONST Used to work around broken
- SunCC ANSI casts that require
- an extra const.
-ACE_DEFINES_DEFAULT_WIN32_SECURITY_ATTRIBUTES
- Win32 only. Users want to use
- a predefined security
- attributes defined in
- ACE_OS::default_win32_security_attributes
- as the default security
- object.
-ACE_DISABLE_DEBUG_DLL_CHECK Define this if you don't want
- debug version ACE search for
- debug version DLLs first
- before looking for the DLL
- names specified.
-ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER
- Application will allocate its
- own object manager. This
- implicitly defines
- ACE_HAS_NONSTATIC_OBJECT_MANAGER.
- Usually used with MFC
- applications.
-ACE_MAIN Renames "main (int, char *[])",
- for platforms such as g++/VxWorks
- that don't allow "main". Requires
- the use of
- ACE_HAS_NONSTATIC_OBJECT_MANAGER.
-ACE_MT_SAFE Compile using multi-thread libraries
-ACE_NDEBUG Turns off debugging features
-ACE_NEW_THROWS_EXCEPTIONS Compiler's 'new' throws exception on
- failure (ANSI C++ behavior).
-ACE_NLOGGING Turns off the LM_DEBUG and
- LM_ERROR logging macros...
-ACE_NTRACE Turns off the tracing feature.
-ACE_PAGE_SIZE Defines the page size of the
- system (not used on Win32 or
- with ACE_HAS_GETPAGESIZE).
-ACE_REDEFINES_XTI_FUNCTIONS Platform redefines the t_... names (UnixWare)
-ACE_SELECT_USES_INT Platform uses int for select()
- rather than fd_set
-ACE_TEMPLATES_REQUIRE_PRAGMA Compiler's template mechanism
- must use a pragma This is used
- for AIX's C++ compiler.
-ACE_TEMPLATES_REQUIRE_SOURCE Compiler's template mechanim
- must see source code (i.e.,
- .cpp files). This is used for
- GNU G++.
-ACE_TIMER_SKEW If a timed ::select () can return
- early, then ACE_TIMER_SKEW is the
- maximum adjustment, in microseconds,
- that ACE_Timer_Queue uses to
- compensate for the early return.
-ACE_TLI_TCP_DEVICE Device the platform uses for TCP on
- TLI. Only needed if not /dev/tcp.
-ACE_USE_POLL The OS platform supports the
- poll() event demultiplexor
-ACE_USES_ASM_SYMBOL_IN_DLSYM Platform uses assembly symbols
- instead of C symbols in
- dlsym()
-ACE_USES_STATIC_MFC When linking MFC as a static library is desired
-ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB Platform has its standard c++
- library in the namespace std.
-ACE_WSOCK_VERSION A parameter list indicating
- the version of WinSock (e.g.,
- "1, 1" is version 1.1).
-
-ACE_HAS_AIO_CALLS Platform supports POSIX aio* calls.
-ACE_HAS_ALT_CUSERID Use ACE's alternate cuserid()
- implementation since a system
- cuserid() may not exist, or it
- is not desirable to use it.
- The implementation requires
- ACE_LACKS_PWD_FUNCTIONS to be
- undefined and that the
- geteuid() system call exists.
-ACE_HAS_ANSI_CASTS Platform supports new C++
- style casts (dynamic_cast,
- static_cast, reinterpret_cast
- and const_cast)
-ACE_DEFAULT_THREAD_KEYS Number of TSS keys, with
- ACE_HAS_TSS_EMULATION _only_.
- Defaults to 64.
-ACE_DEFAULT_LD_SEARCH_PATH Specify the platform default search
- paths. This macro should only be
- defined on platforms that don't
- support environment variables at all
- (i.e., Windows CE.)
-ACE_THREADS_DONT_INHERIT_LOG_MSG Specify this if you don't want
- threads to inherit parent
- thread's ACE_Log_Msg
- properties.
-ACE_THREAD_MANAGER_USES_SAFE_SPAWN Disable the "check before lock" feature
- in ACE_Thread_Manager. Defining this
- macro avoids a potential race condition
- on platforms with aggressive read/write
- reordering.
-ACE_HAS_GNUG_PRE_2_8 Compiling with g++ prior to
- version 2.8.0.
-ACE_HAS_ONE_DEFINITION_RULE Compiler enforces C++ One
- Definition Rule
-ACE_HAS_PRIOCNTL OS has priocntl (2).
-ACE_HAS_RECURSIVE_MUTEXES Mutexes are inherently recursive (e.g., Win32)
-ACE_HAS_RECV_TIMEDWAIT Platform has the MIT pthreads
- APIs for
-ACE_HAS_RECVFROM_TIMEDWAIT timed send/recv operations
-ACE_HAS_RECVMSG_TIMEDWAIT
-ACE_HAS_RLIMIT_RESOURCE_ENUM Platform has enum instead of
- int for first argument to
- ::{get,set}rlimit (). The
- value of this macro is the
- enum definition, e.g., enum
- __rlimit_resource, for Linux
- glibc 2.0.
-ACE_HAS_RUSAGE_WHO_ENUM Platform has enum instead of
- int for first argument to
- ::getrusage (). The value of
- this macro is the enum
- definition, e.g., enum
- __rusage_who, for Linux glibc
- 2.0.
-ACE_HAS_SEND_TIMEDWAIT
-ACE_HAS_SENDTO_TIMEDWAIT
-ACE_HAS_SENDMSG_TIMEDWAIT
-ACE_HAS_STDARG_THR_DEST Platform has void (*)(...)
- prototype for
- pthread_key_create()
- destructor (e.g., LynxOS).
-ACE_HAS_STL_MAP_CONFLICT Used when users want to
- compile ACE with STL and STL
- map class conflicts with
- <net/if.h> map struct.
-ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS Platform/compiler supports
- Win32 structural exceptions
-ACE_HAS_READ_TIMEDWAIT
-ACE_HAS_READV_TIMEDWAIT
-ACE_HAS_WRITE_TIMEDWAIT
-ACE_HAS_WRITEV_TIMEDWAIT
-ACE_HAS_4_4BSD_SENDMSG_RECVMSG Platform has BSD 4.4
- sendmsg()/recvmsg() APIs.
-ACE_HAS_P_READ_WRITE Platform has pread() and
- pwrite() support
-ACE_HAS_64BIT_LONGS Platform has 64bit longs and
- 32bit ints. NOTE: this macro
- is deprecated. Instead, use
- ACE_SIZEOF_LONG == 8.
-ACE_HAS_AIX_BROKEN_SOCKET_HEADER Platform, such as AIX4, needs
- to wrap #include of
- sys/socket.h with
- #undef/#define of
- __cplusplus.
-ACE_HAS_AIX_HI_RES_TIMER Platform has AIX4
- ::read_real_time ()
-ACE_HAS_ALLOCA Compiler/platform supports
- alloca()
-ACE_HAS_ALLOCA_H Compiler/platform has
- <alloca.h>
-ACE_HAS_ALPHA_TIMER CPU is an Alpha, with the rpcc
- instruction to read the tick timer.
- Limited to 32 bits, so not recommended.
-ACE_HAS_AUTOMATIC_INIT_FINI Compiler/platform correctly
- calls init()/fini() for shared
- libraries
-ACE_HAS_BIG_FD_SET Compiler/platform has typedef
- u_long fdmask (e.g., Linux and
- SCO).
-ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR
- Compiler handles explicit calling of
- template destructor correctly. See
- "ace/OS.h" for details.
-ACE_HAS_BROKEN_ACCEPT_ADDR Platform can't correctly deal
- with a NULL addr to accept()
- (e.g, VxWorks).
-ACE_HAS_BROKEN_NAMESPACES Compiler/platform doesn't
- support namespaces (or the
- support is not fully
- implemented.)
-ACE_HAS_BROKEN_BITSHIFT Compiler has integer overflow
- problem with bit-shift
- operations.
-ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS Compiler can't handle const char *
- as rvalue in conditional operator.
-ACE_HAS_BROKEN_CONVERSIONS Compiler can't handle calls
- like foo->operator T *()
-ACE_HAS_BROKEN_CTIME Compiler/platform uses macro
- for ctime (e.g., MVS)
-ACE_HAS_BROKEN_DGRAM_SENDV Platform sendv() does not work
- properly with datagrams,
- i.e. it fails when the iovec
- size is IOV_MAX.
-ACE_HAS_BROKEN_ENUMS Compiler can't handle large
- enums (e.g., HP/UX C++)
-ACE_HAS_BROKEN_HPUX_TEMPLATES Earlier versions of HP/UX C++
- are damned...
-ACE_HAS_BROKEN_MAP_FAILED Platform doesn't cast MAP_FAILED
- to a void *.
-ACE_HAS_BROKEN_MSG_H Platform headers don't support
- <msg.h> prototypes
-ACE_HAS_BROKEN_MMAP_H HP/UX does not wrap the
- mmap(2) header files with
- extern "C".
-ACE_HAS_BROKEN_NESTED_TEMPLATES MSVC has trouble with defining
- STL containers for nested
- structs and classes
-ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS Platform has a bug with
- non-blocking connects (e.g.,
- WinNT 4.0)
-ACE_HAS_BROKEN_POSIX_TIME Platform defines struct
- timespec in <sys/timers.h>
-ACE_HAS_BROKEN_RANDR OS/compiler's header files are
- inconsistent with libC
- definition of rand_r().
-ACE_HAS_BROKEN_READV() OS/Compiler's header files are
- not consistent with readv()
- definition.
-ACE_HAS_BROKEN_SAP_ANY Compiler can't handle the
- static ACE_Addr::sap_any
- construct.
-ACE_HAS_BROKEN_SENDMSG OS/compiler omits the const
- from the sendmsg() prototype.
-ACE_HAS_BROKEN_SETRLIMIT OS/compiler omits the const
- from the rlimit parameter in
- the setrlimit() prototype.
-ACE_HAS_BROKEN_T_ERROR Compiler/platform has the wrong
- prototype for t_error(), i.e.,
- t_error(char *) rather than
- t_error(const char *).
-ACE_HAS_BROKEN_TIMESPEC_MEMBERS platform define struct
- timespec members as ts_sec and
- ts_nsec instead of tv_sec and
- tv_nsec. This is highly
- non-portable. Currently only
- FreeBSD 2.1.x uses it.
-ACE_HAS_BROKEN_WRITEV OS/compiler omits the const
- from the iovec parameter in
- the writev() prototype.
-ACE_HAS_BROKEN_XTI_MACROS OS header files have some
- problems with XTI (HP/UX 11).
-ACE_HAS_BSTRING Platform has <bstring.h>
- (which contains bzero()
- prototype)
-ACE_HAS_BYTESEX_H Platform has <bytesex.h>.
-ACE_HAS_CANCEL_IO Platform supports the Win32
- CancelIO() function (WinNT 4.0
- and beyond).
-ACE_HAS_CHARPTR_DL OS/platform uses char * for
- dlopen/dlsym args, rather than
- const char *.
-ACE_HAS_CHARPTR_SOCKOPT OS/platform uses char * for
- sockopt, rather than const
- char *
-ACE_HAS_CHARPTR_SPRINTF sprintf() returns char *
- rather than int (e.g., SunOS
- 4.x)
-ACE_HAS_CLOCK_GETTIME Platform supports POSIX 1.b
- clock_gettime ()
-ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES Prototypes for both signal()
- and struct sigaction are
- consistent.
-ACE_HAS_CPLUSPLUS_HEADERS Compiler/platform has
- correctly prototyped header
- files
-ACE_HAS_CYGWIN32_SOCKET_H Platform has cygwin32 socket.h
-ACE_HAS_DIRENT Compiler/platform has Dirent
- iterator functions
-ACE_HAS_DLFCN_H_BROKEN_EXTERN_C For platforms, e.g., RedHat
- 4.2/Linux 2.0.30/Alpha, that
- don't declare dl* functions as
- extern "C" in dlfcn.h.
-ACE_HAS_DLL Build ACE using the frigging
- PC DLL nonsense...
-ACE_HAS_EXCEPTIONS Compiler supports C++
- exception handling
-ACE_HAS_EXPLICIT_KEYWORD Compiler support explicit constructors.
-ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION Compiler's template
- instantiation mechanism
- supports the use of explicit
- C++ specializations for all
- used templates. This is also
- used for GNU G++ if you don't
- use the "repo" patches.
-ACE_HAS_GETPAGESIZE Platform supports
- getpagesize() call (otherwise,
- ACE_PAGE_SIZE must be defined,
- except on Win32)
-ACE_HAS_GETRUSAGE Platform supports the
- getrusage() system call.
-ACE_HAS_GETRUSAGE_PROTO Platform has a getrusage ()
- prototype in sys/resource.h
- that differs from the one in
- ace/OS.i.
-ACE_HAS_GNUC_BROKEN_TEMPLATE_INLINE_FUNCTIONS GNUC 2.7.3 mistakenly
- takes the template definition
- as the place where an inline
- function of an argument class
- is first used.
-ACE_HAS_BROKEN_EXTENDED_TEMPLATES GNU CC < 2.8 is broken for
- template classes. This label
- shortens the template parameter
- list by removing the iterator
- functionality in the
- Cache_Map_Manager class.
-ACE_HAS_GNU_CSTRING_H Denotes that GNU has cstring.h
- as standard which redefines
- memchr()
-ACE_HAS_GPERF The GPERF utility is compiled
- for this platform
-ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT Optimize
- ACE_Handle_Set::count_bits for
- select() operations (common
- case)
-ACE_HAS_LLSEEK Platform supports llseek.
-ACE_HAS_HI_RES_TIMER Compiler/platform supports
- SunOS high resolution timers
-ACE_HAS_IDTYPE_T Compiler/platform supports
- idtype_t.
-ACE_HAS_INLINED_OSCALLS Inline all the static class OS
- methods to remove call
- overhead
-ACE_HAS_IP_MULTICAST Platform supports IP multicast
-ACE_HAS_IP6 Platform supports IPv6.
-ACE_HAS_IRIX62_THREADS Platform supports the very odd
- IRIX 6.2 threads...
-ACE_HAS_NONSTATIC_OBJECT_MANAGER Causes the ACE_Object_Manager
- instance to be created in main
- (int, char *[]), instead of as
- a static (global) instance.
-ACE_HAS_THR_KEYDELETE Platform supports
- thr_keydelete (e.g,. UNIXWARE)
-ACE_HAS_THR_MINSTACK Platform calls thr_minstack()
- rather than thr_min_stack()
- (e.g., Tandem).
-ACE_HAS_LIMITED_RUSAGE_T The rusage_t structure has
- only two fields.
-ACE_HAS_LIMITED_SELECT The select is unable to deal with
- large file descriptors.
-ACE_HAS_LONG_MAP_FAILED Platform defines MAP_FAILED as
- a long constant.
-ACE_HAS_MALLOC_STATS Enabled malloc statistics
- collection.
-ACE_HAS_MEMCHR Use native implementation of memchr.
-ACE_HAS_MINIMAL_ACE_OS Disables some #includes in ace/OS.*.
-ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION Avoid #including ace/streams.h
- in OS.h. Users must include
- ace/streams.h, <iostream>, or
- <iostream.h> explicitly in
- their code. Some platforms,
- such as g++/VxWorks, have
- trouble compiling templates
- and iostreams header because
- of static variables in the
- stream headers. This flag
- will also avoid extra
- compilation and runtime
- overheads on some platforms.
-ACE_HAS_MFC Platform supports Microsoft
- Foundation Classes
-ACE_HAS_MSG Platform supports recvmsg and
- sendmsg
-ACE_HAS_MT_SAFE_MKTIME Platform supports MT safe
- mktime() call (do any of
- them?)
-ACE_HAS_MUTABLE_KEYWORD Compiler supports mutable.
-ACE_HAS_NONCONST_GETBY Platform uses non-const char *
- in calls to gethostbyaddr,
- gethostbyname, getservbyname
-ACE_HAS_NONCONST_MSGSND Platform has a non-const
- parameter to msgsend() (e.g.,
- SCO).
-ACE_HAS_NONCONST_SELECT_TIMEVAL Platform's select() uses
- non-const timeval* (only found
- on Linux right now)
-ACE_HAS_OLD_MALLOC Compiler/platform uses old
- malloc()/free() prototypes
- (ugh)
-ACE_HAS_ONLY_SCHED_OTHER Platform, e.g., Solaris 2.5,
- only supports SCHED_OTHER
- POSIX scheduling policy.
-ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R Uses ctime_r & asctime_r with
- only two parameters
- vs. three.
-ACE_HAS_OPTIMIZED_MESSAGE_QUEUE Use the semaphore
- implementation of
- ACE_Message_Queue rather than
- the emulated condition
- variable (NT and VxWorks).
-ACE_HAS_ORBIX Platform has Orbix CORBA
- implementation
-ACE_HAS_OSF_TIMOD_H Platform supports the OSF TLI
- timod STREAMS module
-ACE_HAS_PENTIUM Platform is an Intel Pentium
- microprocessor.
-ACE_HAS_POLL Platform contains <poll.h>
-ACE_HAS_POSITION_INDEPENDENT_POINTERS Platform supports
- "position-independent" features
- provided by ACE_Based_Pointer<>.
-ACE_HAS_POSIX_NONBLOCK Platform supports POSIX
- O_NONBLOCK semantics
-ACE_HAS_POSIX_SEM Platform supports POSIX
- real-time semaphores (e.g.,
- VxWorks and Solaris)
-ACE_HAS_POSIX_TIME Platform supports the POSIX
- struct timespec type
-ACE_HAS_PROC_FS Platform supports the /proc
- file system and defines tid_t
- in <sys/procfs.h>
-ACE_HAS_POWERPC_TIMER Platform supports PowerPC
- time-base register.
-ACE_HAS_PRUSAGE_T Platform supports the
- prusage_t struct
-ACE_HAS_PTHREADS Platform supports POSIX
- Pthreads, of one form or
- another. This macro says the
- platform has a pthreads
- variety - should also define
- one of the below to say which
- one. Also may need some
- ACE_HAS_... thing for
- extensions.
-ACE_HAS_PTHREADS_DRAFT4 Platform's 'Pthreads' is .4a draft 4
-ACE_HAS_PTHREADS_DRAFT6 Platform's 'Pthreads' is .4a draft 6
-ACE_HAS_PTHREADS_DRAFT7 Platform's 'Pthreads' is .1c draft 7
-ACE_HAS_PTHREADS_STD Platform supports POSIX.1c-1995 threads
- (This is the final standard
- Pthreads).
-ACE_HAS_PTHREADS_UNIX98_EXT Platform has the UNIX98 extensions to
- Pthreads (susp/cont, rwlocks)
-ACE_HAS_PTHREAD_CONDATTR_SETKIND_NP Platform has pthread_condattr_setkind_np().
-ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP Platform has
- pthread_mutexattr_setkind_np().
-ACE_HAS_PTHREAD_PROCESS_ENUM pthread.h declares an enum with
- PTHREAD_PROCESS_PRIVATE and
- PTHREAD_PROCESS_SHARED values.
-ACE_HAS_PURIFY Purify'ing. Set by wrapper_macros.GNU.
-ACE_HAS_QUANTIFY Quantify'ing. Set by wrapper_macros.GNU.
-ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS Platform will recurse
- infinitely on thread exits
- from TSS cleanup routines
- (e.g., AIX).
-ACE_HAS_REENTRANT_FUNCTIONS Platform supports reentrant
- functions (i.e., all the POSIX
- *_r functions).
-ACE_HAS_XPG4_MULTIBYTE_CHAR Platform has support for
- multi-byte character support
- compliant with the XPG4
- Worldwide Portability
- Interface wide-character
- classification.
-ACE_HAS_REGEX Platform supports the POSIX
- regular expression library
-ACE_HAS_SELECT_H Platform has special header for select().
-ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL For Win32: Use Select_Reactor
- as default implementation of
- Reactor instead of
- WFMO_Reactor.
-ACE_HAS_SEMUN Compiler/platform defines a
- union semun for SysV shared
- memory
-ACE_HAS_SET_T_ERRNO Platform has a function to set
- t_errno (e.g., Tandem).
-ACE_HAS_SIGINFO_T Platform supports SVR4
- extended signals
-ACE_HAS_SIGSUSPEND Platform supports sigsuspend()
-ACE_HAS_SIGISMEMBER_BUG Platform has bug with
- sigismember() (HP/UX 11).
-ACE_HAS_SIG_MACROS Platform/compiler has macros
- for sig{empty,fill,add,del}set
- (e.g., SCO and FreeBSD)
-ACE_HAS_SIGNAL_OBJECT_AND_WAIT Platform supports the Win32
- SignalObjectAndWait() function
- (WinNT 4.0 and beyond).
-ACE_HAS_SIGNAL_SAFE_OS_CALLS Automatically restart OS
- system calls when EINTR occurs
-ACE_HAS_SIGWAIT Platform/compiler has the
- sigwait(2) prototype
-ACE_HAS_SIG_ATOMIC_T Compiler/platform defines the
- sig_atomic_t typedef
-ACE_HAS_SIG_C_FUNC Compiler requires extern "C"
- functions for signals.
-ACE_HAS_SIN_LEN Platform supports new BSD
- inet_addr len field.
-ACE_HAS_SIZET_SOCKET_LEN OS/compiler uses size_t *
- rather than int * for socket
- lengths
-ACE_HAS_SOCKADDR_MSG_NAME Platform requires (struct
- sockaddr *) for msg_name field
- of struct msghdr.
-ACE_HAS_SOCKIO_H Compiler/platform provides the
- sockio.h file
-ACE_HAS_SOCKLEN_T Platform provides socklen_t
- type, such as Linux with
- glibc2.
-ACE_HAS_SPARCWORKS_401_SIGNALS Compiler has brain-damaged
- SPARCwork SunOS 4.x signal
- prototype...
-ACE_HAS_SSIZE_T Compiler supports the ssize_t
- typedef
-ACE_HAS_STRPTIME Enables ACE_OS::strptime ().
-ACE_HAS_STHREADS Platform supports Solaris
- threads
-ACE_HAS_STANDARD_CPP_LIBRARY Platform/compiler supports
- Standard C++ Library
-ACE_HAS_STRBUF_T Compiler/platform supports
- struct strbuf
-ACE_HAS_STRDUP_EMULATION Platform/compiler lacks
- strdup() (e.g., VxWorks,
- Chorus, WinCE)
-ACE_HAS_STREAMS Platform supports STREAMS
-ACE_HAS_STREAM_PIPES Platform supports STREAM pipes
-ACE_HAS_STRERROR Compiler/platform supports strerror ()
-ACE_HAS_STRICT Use the STRICT compilation mode on Win32.
-ACE_HAS_STRING_CLASS Platform/Compiler supports a
- String class (e.g., GNU or
- Win32).
-ACE_HAS_STRUCT_NETDB_DATA Compiler/platform has strange
- hostent API for socket *_r()
- calls
-ACE_HAS_SUNOS4_GETTIMEOFDAY SunOS 4 style prototype.
-ACE_HAS_SUNOS4_SIGNAL_T Compiler has horrible SunOS
- 4.x signal handlers...
-ACE_HAS_SVR4_DYNAMIC_LINKING Compiler/platform supports
- SVR4 dynamic linking semantics
-ACE_HAS_SVR4_GETTIMEOFDAY Compiler/platform supports
- SVR4 gettimeofday() prototype
-ACE_HAS_SVR4_SIGNAL_T Compiler/platform supports
- SVR4 signal typedef
-ACE_HAS_SVR4_TLI Compiler/platform supports
- SVR4 TLI (in particular,
- T_GETNAME stuff)...
-ACE_HAS_SYSCALL_GETRUSAGE HP/UX has an undefined syscall
- for GETRUSAGE...
-ACE_HAS_SYSCALL_H Compiler/platform contains the
- <sys/syscall.h> file.
-ACE_HAS_SYSENT_H Platform provides <sysent.h>
- header
-ACE_HAS_SYSINFO Platform supports system
- configuration information
-ACE_HAS_SYSV_IPC Platform supports System V IPC
- (most versions of UNIX, but
- not Win32)
-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_TEMPLATE_INSTANTIATION_PRAGMA Compiler's template
- instantiation mechanism
- supports the use of "#pragma
- instantiate". Edison Design
- Group compilers, e.g., SGI C++
- and Green Hills 1.8.8 and
- later, support this.
-ACE_HAS_TEMPLATE_SPECIALIZATION Compiler implements template
- specialization
-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_LAZY_MAP_MANAGER ACE supports lazy Map Managers
- that allow deletion of entries
- during active iteration.
-ACE_HAS_THREADS Platform supports threads
-ACE_HAS_THREAD_SAFE_ACCEPT Platform allows multiple
- threads to call accept() on
- the same port (e.g., WinNT).
-ACE_HAS_THREAD_SELF Platform has thread_self()
- rather than pthread_self()
- (e.g., DCETHREADS and AIX)
-ACE_HAS_THREAD_SPECIFIC_STORAGE Compiler/platform has
- thread-specific storage
-ACE_HAS_THR_C_DEST The pthread_keycreate()
- routine *must* take extern C
- functions.
-ACE_HAS_THR_C_FUNC The pthread_create() routine
- *must* take extern C
- functions.
-ACE_HAS_TIMEZONE_GETTIMEOFDAY Platform/compiler supports
- timezone * as second parameter
- to gettimeofday()
-ACE_HAS_TIMOD_H Platform supports TLI timod
- STREAMS module
-ACE_HAS_TIUSER_H Platform supports TLI tiuser
- header
-ACE_HAS_TLI Platform supports TLI. Also
- see ACE_TLI_TCP_DEVICE.
-ACE_HAS_TLI_PROTOTYPES Platform provides TLI function
- prototypes
-ACE_HAS_TSS_EMULATION ACE provides TSS emulation.
- See also
- ACE_DEFAULT_THREAD_KEYS.
-ACE_HAS_UALARM Platform supports ualarm()
-ACE_HAS_UCONTEXT_T Platform supports ucontext_t
- (which is used in the extended
- signal API).
-ACE_HAS_UNION_WAIT The wait() system call takes a
- (union wait *) rather than int
- *
-ACE_HAS_UNIXWARE_SVR4_SIGNAL_T Has inconsistent SVR4 signal
- stuff, but not the same as the
- other platforms
-ACE_HAS_USING_KEYWORD Compiler supports the new
- using keyword for C++
- namespaces.
-ACE_HAS_VERBOSE_NOTSUP Prints out console message in
- ACE_NOTSUP. Useful for
- tracking down origin of
- ACE_NOTSUP.
-ACE_HAS_VOIDPTR_MMAP Platform requires void * for
- mmap().
-ACE_HAS_VOIDPTR_SOCKOPT OS/compiler uses void * arg 4
- setsockopt() rather than const
- char *
-ACE_HAS_WIN32_TRYLOCK The Win32 platform support
- TryEnterCriticalSection()
- (WinNT 4.0 and beyond)
-ACE_HAS_WINSOCK2 The Win32 platform supports
- WinSock 2.0
-ACE_HAS_XLI Platform has the XLI version
- of TLI
-ACE_HAS_XT Platform has Xt and Motif
-ACE_HAS_XTI Platform has XTI
- (X/Open-standardized superset
- of TLI). Implies ACE_HAS_TLI
- but uses a different header
- file.
-ACE_LACKS_ACCESS Platform lacks access() (e.g.,
- VxWorks and Chorus)
-ACE_LACKS_ACE_IOSTREAM Platform can not build
- ace/IOStream{,_T}.cpp. This
- does not necessarily mean that
- the platform does not support
- iostreams.
-ACE_LACKS_AUTO_MMAP_REPLACEMENT No system support for replacing any
- previous mappings.
-ACE_LACKS_BSEARCH Compiler/platform lacks the
- standard C library bsearch()
- function
-ACE_LACKS_CMSG_DATA_MACRO Platform has
- ACE_HAS_4_4BSD_SENDMSG_RECVMSG but does
- not define CMSG_DATA (cmsg) macro.
-ACE_LACKS_CMSG_DATA_MEMBER Platform has
- ACE_HAS_4_4BSD_SENDMSG_RECVMSG but its
- cmsghdr structure does not contain
- an 'unsigned char cmsg_data[0]'
- member. (This may be
- 'unsigned char __cmsg_data[0]' on some
- platforms, in which case we need
- another macro.)
-ACE_LACKS_COND_TIMEDWAIT_RESET pthread_cond_timedwait does
- *not* reset the time argument
- when the lock is acquired.
-ACE_LACKS_CONST_STRBUF_PTR Platform uses struct strbuf *
- rather than const struct
- strbuf * (e.g., HP/UX 10.x)
-ACE_LACKS_CONST_TIMESPEC_PTR Platform forgot const in
- cond_timewait (e.g., HP/UX).
-ACE_LACKS_COND_T Platform lacks condition
- variables (e.g., Win32 and
- VxWorks)
-ACE_LACKS_CONDATTR_PSHARED Platform has no implementation
- of
- pthread_condattr_setpshared(),
- even though it supports
- pthreads!
-ACE_LACKS_DIFFTIME Platform lacks difftime() implementation
-ACE_LACKS_FCNTL Platform lacks POSIX-style fcntl ().
-ACE_LACKS_FSYNC Platform lacks fsync().
-ACE_LACKS_INLINE_FUNCTIONS Platform can't handle "inline"
- keyword correctly.
-ACE_LACKS_EXEC Platform lacks the exec()
- family of system calls (e.g.,
- Win32, VxWorks, Chorus)
-ACE_LACKS_FILELOCKS Platform lacks file locking
- mechanism
-ACE_LACKS_FLOATING_POINT Platform does not support
- floating point operations
- (e.g., certain Chorus hardware
- platforms)
-ACE_LACKS_FORK Platform lacks the fork()
- system call (e.g., Win32,
- VxWorks, Chorus)
-ACE_LACKS_GETOPT_PROTO Platform lacks the getopt()
- prototype (e.g., LynxOS)
-ACE_LACKS_GETPGID Platform lacks getpgid() call
- (e.g., Win32, Chorus, and
- FreeBSD).
-ACE_LACKS_GETSERVBYNAME Platforms lacks
- getservbyname() (e.g., VxWorks
- and Chorus).
-ACE_LACKS_IOSTREAMS_TOTALLY Iostreams are not supported
- adequately on the given platform.
-ACE_LACKS_IOSTREAM_FX iostream header does not
- declare ipfx (), opfx (),
- etc.
-ACE_LACKS_KEY_T Platform lacks key_t (e.g.,
- Chorus, VxWorks, Win32)
-ACE_LACKS_LINEBUFFERED_STREAMBUF Platform lacks streambuf
- "linebuffered ()".
-ACE_LACKS_LONGLONG_T Compiler/platform does no
- supports the unsigned long
- long datatype.
-ACE_LACKS_LSTAT Platform lacks the lstat() function.
-ACE_LACKS_MADVISE Platform lacks madvise()
- (e.g., Linux)
-ACE_LACKS_MALLOC_H Platform lacks malloc.h
-ACE_LACKS_MEMORY_H Platform lacks memory.h (e.g.,
- VxWorks and Chorus)
-ACE_LACKS_MKFIFO Platform lacks mkfifo() e.g.,
- VxWorks, Chorus, pSoS, and WinNT.
-ACE_LACKS_MKTEMP ACE has no mktemp()
-ACE_LACKS_MMAP The platform doesn't have
- mmap(2) (e.g., SCO UNIX).
-ACE_LACKS_MODE_MASKS Platform/compiler doesn't have
- open() mode masks.
-ACE_LACKS_MPROTECT The platform doesn't have
- mprotect(2) (e.g., EPLX real
- time OS from CDC (based on
- LYNX))
-ACE_LACKS_MSG_ACCRIGHTS Platform defines ACE_HAS_MSG,
- but lacks msg_accrights{,len}.
-ACE_LACKS_MSG_WFMO Platform lacks
- MsgWaitForMultipleObjects
- (only needs to be defined when
- ACE_WIN32 is also defined).
-ACE_LACKS_MSGBUF_T Platform lacks struct msgbuf
- (e.g., NT and MSV).
-ACE_LACKS_MSYNC Platform lacks msync() (e.g.,
- Linux)
-ACE_LACKS_MUTEXATTR_PSHARED Platform lacks
- pthread_mutexattr_setpshared().
-ACE_LACKS_NAMED_POSIX_SEM Platform lacks named POSIX
- semaphores (e.g., Chorus)
-ACE_LACKS_NETDB_REENTRANT_FUNCTIONS Platform does not support
- reentrant netdb functions
- (getprotobyname_r,
- getprotobynumber_r,
- gethostbyaddr_r,
- gethostbyname_r,
- getservbyname_r).
-ACE_LACKS_NEW_H OS doesn't have, or we don't want to
- use, new.h.
-ACE_LACKS_NULL_PTHREAD_STATUS OS requires non-null status pointer
- for ::pthread_join ().
-ACE_LACKS_PARAM_H Platform lacks <sys/param.h>
- (e.g., MVS)
-ACE_LACKS_POSIX_PROTOTYPES Platform lacks POSIX
- prototypes for certain System
- V functions like shared memory
- and message queues.
-ACE_LACKS_PRAGMA_ONCE Compiler complains about #pragma once
-ACE_LACKS_PRI_T Platform lacks pri_t (e.g.,
- Tandem NonStop UNIX).
-ACE_LACKS_PTHREAD_CANCEL Platform lacks
- pthread_cancel().
-ACE_LACKS_PTHREAD_SIGMASK Platform lacks pthread_sigmask ().
-ACE_LACKS_PTHREAD_THR_SIGSETMASK Platform lacks
- pthread_thr_sigsetmask (e.g.,
- MVS, HP/UX, and OSF/1 3.2)
-ACE_LACKS_PWD_REENTRANT_FUNCTIONS Platform lacks getpwnam_r()
- methods (e.g., SGI 6.2).
-ACE_LACKS_QSORT Compiler/platform lacks the
- standard C library qsort()
- function
-ACE_LACKS_RAND_REENTRANT_FUNCTIONS Platform lacks rand_r()
-ACE_LACKS_READLINK Platform lacks the readlink() function.
-ACE_LACKS_READV Platform doesn't define readv,
- so use our own
-ACE_LACKS_RENAME Platform lacks rename().
-ACE_LACKS_RLIMIT Platform/compiler lacks
- {get,set}rlimit() function
- (e.g., VxWorks, Chorus, and
- SCO UNIX)
-ACE_LACKS_RLIMIT_PROTOTYPE Platform/compiler lacks
- {get,set}rlimit() prototypes
- (e.g., Tandem)
-ACE_LACKS_RTTI Compiler does not support
- dynamic_cast. Usually used
- with ACE_HAS_ANSI_CASTS.
-ACE_LACKS_READDIR_R Platform uses ACE_HAS_DIRENT
- but does not have readdir_r
- ().
-ACE_LACKS_RECVMSG Platform lacks recvmsg()
- (e.g., Linux)
-ACE_LACKS_RWLOCK_T Platform lacks readers/writer
- locks.
-ACE_LACKS_SBRK Platform lacks a working
- sbrk() (e.g., Win32 and
- VxWorks)
-ACE_LACKS_SEEKDIR Platform uses ACE_HAS_DIRENT
- but does not have seekdir ().
-ACE_LACKS_SEMBUF_T Platform lacks struct sembuf
- (e.g., Win32 and VxWorks)
-ACE_LACKS_SETDETACH Platform lacks
- pthread_attr_setdetachstate()
- (e.g., HP/UX 10.x)
-ACE_LACKS_SETSCHED Platform lacks
- pthread_attr_setsched()
- (e.g. MVS)
-ACE_LACKS_SIGACTION Platform lacks struct
- sigaction (e.g., Win32 and
- Chorus)
-ACE_LACKS_SIGNED_CHAR Platform lacks "signed char"
- type (broken!)
-ACE_LACKS_SIGSET Platform lacks signal sets
- (e.g., Chorus and Win32)
-ACE_LACKS_SOME_POSIX_PROTOTYPES Platform lacks POSIX
- prototypes for certain System
- V functions like shared memory
- and message queues.
-ACE_LACKS_NATIVE_STRPTIME Platform/compiler lacks the strptime()
- function.
-ACE_LACKS_STRRCHR Platform/compiler lacks
- strrchr () function.
-ACE_LACKS_WCSRCHR Platform/compiler lacks wcsrchr ()
- function
-ACE_LACKS_SYS_NERR Platforms/compiler lacks the
- sys_nerr variable (e.g.,
- VxWorks and MVS).
-ACE_LACKS_SYSTIME_H <time.h> doesn't automatically
- #include /**/ <sys/time.h>
-ACE_LACKS_SYSV_MSG_H Platform lacks sys/msg.h
- (e.g., Chorus and VxWorks)
-ACE_LACKS_SENDMSG Platform lacks sendmsg()
- (e.g., Linux)
-ACE_LACKS_SI_ADDR Platform lacks the si_addr
- field of siginfo_t (e.g.,
- VxWorks and HP/UX 10.x)
-ACE_LACKS_SYSV_SHMEM Platform lacks System V shared
- memory (e.g., Win32 and
- VxWorks)
-ACE_LACKS_SIGINFO_H Platform lacks the siginfo.h
- include file (e.g., MVS)
-ACE_LACKS_SOCKET_BUFSIZ Platform doesn't support
- SO_SNDBUF/SO_RCVBUF
-ACE_LACKS_SOCKETPAIR Platform lacks the
- socketpair() call (e.g., SCO
- UNIX)
-ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES Compiler doesn't support
- static data member templates
-ACE_LACKS_STRCASECMP Compiler/platform lacks
- strcasecmp() (e.g., DG/UX,
- UNIXWARE, VXWORKS)
-ACE_LACKS_STRRECVFD Platform doesn't define struct
- strrecvfd.
-ACE_LACKS_SYSCALL Platform doesn't have
- syscall() prototype
-ACE_LACKS_T_ERRNO Header files lack t_errno for
- TLI
-ACE_LACKS_TCP_H Platform doesn't have
- netinet/tcp.h
-ACE_LACKS_TCP_NODELAY OS does not support TCP_NODELAY.
-ACE_LACKS_TELLDIR Platform uses ACE_HAS_DIRENT
- but does not have telldir ().
-ACE_LACKS_THREAD_STACK_SIZE Platform lacks
- pthread_attr_setstacksize()
- (e.g., Linux pthreads)
-ACE_LACKS_TIMEDWAIT_PROTOTYPES MIT pthreads platform lacks
- the timedwait prototypes
-ACE_LACKS_TIMESPEC_T Platform does not define
- timepec_t as a typedef for
- struct timespec.
-ACE_LACKS_TRUNCATE Platform doesn't have truncate()
- (e.g., vxworks)
-ACE_LACKS_U_LONGLONG_T Platform does not have
- u_longlong_t typedef, and
- "sun" is defined.
-ACE_LACKS_UALARM_PROTOTYPE Platform/compiler lacks the
- ualarm() prototype (e.g.,
- Solaris)
-ACE_LACKS_CHAR_RIGHT_SHIFTS Compiler does not have any istream
- operator>> for chars, u_chars, or
- signed chars.
-ACE_LACKS_CHAR_STAR_RIGHT_SHIFTS Compiler does not have
- operator>> (istream &, u_char *) or
- operator>> (istream &, signed char *)
-ACE_LACKS_UCONTEXT_H Platform lacks the ucontext.h
- file
-ACE_LACKS_UNBUFFERED_STREAMBUF Platform lacks streambuf
- "unbuffered ()".
-ACE_LACKS_UNISTD_H Platform lacks the unistd.h
- file (e.g., VxWorks and Win32)
-ACE_LACKS_UNIX_DOMAIN_SOCKETS ACE platform has no UNIX
- domain sockets
-ACE_LACKS_UNIX_SIGNALS Platform lacks full signal
- support (e.g., Win32 and
- Chorus).
-ACE_LACKS_UTSNAME_T Platform lacks struct utsname
- (e.g., Win32 and VxWorks)
-ACE_LACKS_WILDCARD_BIND The bind() call will not
- select the port if it's 0.
-
-ACE_LACKS_WRITEV Platform doesn't define
- writev, so use our own
-
-ACE_NEEDS_DEV_IO_CONVERSION Necessary with some compilers
- to pass ACE_TTY_IO as
- parameter to DEV_Connector.
-ACE_NEEDS_FUNC_DEFINITIONS Compiler requires a definition
- for a "hidden" function, e.g.,
- a private, unimplemented copy
- constructor or assignment
- operator. The SGI C++
- compiler needs this, in
- template classes, with
- ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA.
-ACE_NEEDS_HUGE_THREAD_STACKSIZE Required by platforms with small default stacks.
-ACE_NEEDS_LWP_PRIO_SET OS has LWPs, and when the
- priority of a bound thread is
- set, then the LWP priority
- must be set also.
-ACE_NEEDS_SCHED_H Platform needs to #include
- <sched.h>
- to get thread scheduling
- defs.
-ACE_WSTRING_HAS_USHORT_SUPPORT If a platform has wchar_t as a separate type,
- then ACE_WString doesn't have a constructor that
- understands an ACE_USHORT16 string. So this
- macro enables one. (mostly used my ACE Name Space).
-----------------------------------------
-
-The following is a partial list of where some of these macros are used
-in the code. This list was originally compiled by Jam Hamidi
-(jh1@core01.osi.com). It is now hopelessly out of date. Hopefully,
-someone will come along and update it....
-
-ACE_HAS_ALLOCA:
----------------
-
- Used in:
- libsrc/IPC_SAP/SOCK_SAP/SOCK_Connect.C
- for allocation of iovp
-A
- libsrc/IPC_SAP/SPIPE_SAP/SPIPE_Msg.C
- for alocation of iovp
-
- In solaris:
- alloca() allocates size bytes of space in the stack frame of
- the caller, and returns a pointer to the allocated block.
- This temporary space is automatically freed when the caller
- returns. Note: if the allocated block is beyond the current
- stack limit, the resulting behavior is undefined.
-
- In HPUX:
- no equivalent.
-
- Notes:
- in HPUX it has to do new and delete. Affects performance.
-
-
-ACE_HAS_AUTOMATIC_INIT_FINI:
-----------------------------
-
- Used in:
- libsrc/Service_Configurator/Service_Repository.i
- libsrc/Service_Configurator/Parse_Node.i
- include/Parse_Node.i
- include/Service_Repository.i
-
- In solaris:
- _init() initializes a loadable module. It is called before
- any other routine in a loadable module.
- _info() returns information about a loadable module.
- _fini() should return the return value from mod_remove(9F).
- This flag if set, doesn't do anything. If not set, forces
- _init() and _fini() to be executed as is:
- dlsym ((char *) handle, "_fini").
-
- In HPUX:
- don't set.
- Maybe have to look into shl_load( ), shl_definesym( ),
- shl_findsym( ), shl_gethandle( ), shl_getsymbols( ),
- shl_unload( ), shl_get( )(3X) - explicit load of shared libraries
- Means Service Configurator won't be available.
- TBA.
-
-
-ACE_HAS_CPLUSPLUS_HEADERS:
---------------------------
-
- Used In:
- ace/OS.h
-
- HPUX:
- set it.
-
- Notes:
- If this is not defined, libc.h and osfcn.h get included.
- Only needed for older compiler/OS platforms that don't
- provide standard C++ header files in /usr/include.
-
-ACE_HAS_HI_RES_TIMER:
----------------------
-
- Used In:
- libsrc/Misc/High_Res_Timer.h
- libsrc/Misc/High_Res_Timer.C
- include/High_Res_Timer.h
-
- In Solaris,
- C++ wrapper around gethrtime(), which returns a long long.
- gethrtime() returns the current high-resolution real time.
- Time is expressed as nanoseconds since some arbitrary time
- in the past; it is not correlated in any way to the time of
- day, and thus is not subject to resetting, drifting, etc.
-
- In HPUX
- look into: getclock(), reltimer(), getitimer()
- maybe even vtimes structure vm_utime, vm_stime ?
-
- Notes:
- TBA
-
-
-ACE_LACKS_T_ERRNO:
--------------------
-
- Used In:
- ace/OS.h
-
- HPUX:
- set it.
-
- Notes:
- if set, adds:
- extern int t_errno;
-
-
-ACE_HAS_POSIX_NONBLOCK:
------------------------
-
- Used in:
- ace/OS.h
-
- HPUX:
- set it.
-
- Notes:
- if defined, sets ACE_NONBLOCK and O_NONBLOCK
- O_NONBLOCK is used in libsrc/Misc/misc.C to do a
- fcntl (fd, F_SETFL, opt)
- ACE_NONBLOCK is used in libsrc/IPC_SAP/FIFO_SAP/FIFO_Recv.C in the
- disable member function and options passed to the open function
- in libsrc/IPC_SAP/FIFO_SAP/FIFO.C
-
-
-ACE_HAS_PROC_FS:
-----------------
-
- Used in:
- ace/OS.h
- libsrc/Misc/Profile_Timer.i
-
- Notes:
- if set, includes <sys/procfs.h>
- the PIOCUSAGE define is used in Profile_Timer.
-
- Solaris:
- procfs.h defines things for the prpsinfo structure (basically to
- do a "ps" from inside a program).
-
- HPUX:
- don't set: obviously a different mechanism.
- Look into /usr/include/sys/proc.h. The structure is proc. The
- pointer to the kernel's proc table may be obtained by
- extern struct proc *proc, *procNPROC;
- extern int nproc;
-
-
-ACE_HAS_PRUSAGE_T:
-------------------
-
- Used in:
- libsrc/Misc/Profile_Timer.h
- libsrc/Misc/Profile_Timer.C
-
- Notes:
- If defined, declares the Profile_Timer class that does start(),
- stop() and basically gets real_time, user_time, system_time for
- an interval.
- This stuff is highly non-portable.
-
- HPUX:
- don't set
-
-
-ACE_HAS_SEMUN:
---------------
-
- Used in:
- libsrc/Semaphores/Semaphore_Simple.h
-
- Notes:
- if not defined, defines semun as:
- union semun {
- int val; /* value for SETVAL */
- struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
- ushort *array; /* array for GETALL & SETALL */
- };
-
- HPUX:
- don't set.
- in /usr/include/sem.h:
- /* The fourth argument to semctl() varies depending on the value of
- its first argument. If desired, "union semun" can be declared
- by the user, but this is not necessary since the individual
- member can just be passed as the argument. */
-
-
-ACE_HAS_SIG_ATOMIC_T:
----------------------
-
- Used in:
- ace/OS.h
-
- Notes:
- if not defined, does a:
- typedef int sig_atomic_t;
- This is used in the Reactor and service configurator.
-
- HPUX:
- set it.
- in /usr/include/sys/signal.h:
- typedef unsigned int sig_atomic_t;
-
-
-ACE_HAS_SSIZE_T:
-----------------
-
- Used in:
- ace/OS.h
-
- Notes:
- if not defined, does a
- typedef int ssize_t;
- used mostly in IPC_SAP. (don't confuse with size_t).
-
- HPUX:
- set it.
- in /usr/include/sys/types.h
-
-
-ACE_HAS_STRBUF_T:
------------------
-
- Used in:
- include/Str_Buf.h
-
- Notes:
- if not defined, declares the strbuf structure as:
- struct strbuf
- {
- int maxlen; /* no. of bytes in buffer */
- int len; /* no. of bytes returned */
- void *buf; /* pointer to data */
- };
-
- Solaris:
- defined in /usr/include/sys/stropts.h
- Sys V.4 Streams.
- uses strbuf as parameter to putmsg, putpmsg:
- int putmsg(int fildes, const struct strbuf *ctlptr,
- const struct strbuf *dataptr, int flags);
-
- HPUX:
- don't set.
- no SYS V.4 streams.
-
-
-ACE_HAS_STREAMS:
-----------------
-
- Used In:
- ace/OS.h
- libsrc/IPC_SAP/SOCK_SAP/LSOCK.C
-
- Notes:
- if defined, includes <stropts.h>
-
- HPUX:
- don't set.
- no SYS V.4 streams.
-
-
-ACE_HAS_STREAM_PIPES:
----------------------
-
- Used in:
- libsrc/IPC_SAP/SPIPE_SAP/SPIPE_Msg.h
- libsrc/IPC_SAP/SPIPE_SAP/SPIPE_Msg.C
- libsrc/IPC_SAP/SPIPE_SAP/SPIPE_Listener.h
- libsrc/IPC_SAP/SPIPE_SAP/SPIPE_Listener.C
- libsrc/IPC_SAP/SPIPE_SAP/SPIPE.h
- libsrc/IPC_SAP/SPIPE_SAP/SPIPE.C
- libsrc/IPC_SAP/FIFO_SAP/FIFO_Send_Msg.h
- libsrc/IPC_SAP/FIFO_SAP/FIFO_Send_Msg.C
- libsrc/IPC_SAP/FIFO_SAP/FIFO_Send_Msg.i
- libsrc/IPC_SAP/FIFO_SAP/FIFO_Recv_Msg.h
- libsrc/IPC_SAP/FIFO_SAP/FIFO_Recv_Msg.C
- libsrc/IPC_SAP/FIFO_SAP/FIFO_Recv_Msg.i
-
- Notes:
- if not set, won't be able to use the SPIPE class (IPC_SAP) with
- rendezvous handles.
-
- HPUX:
- don't set.
- No sysV.4 streams.
-
-
-ACE_HAS_STRERROR:
------------------
-
- Used in:
- ace/OS.h
-
- Notes:
- if not defined, does a:
- #define strerror(err) sys_errlist[err]
-
- Solaris:
- /usr/include/string.h
-
- HPUX:
- set it.
- in /usr/include/sys/errno.h and string.h
- extern char *strerror (int);
-
-
-ACE_HAS_SVR4_DYNAMIC_LINKING:
------------------------------
-
- Used in:
- ace/OS.h
- tests/Service_Configurator/CCM_App.C
-
- Notes:
- if defined, includes <dlfcn.h>
- with dlopen(), dlsym(), etc..
-
- HPUX:
- don't set.
- has its own:
- shl_findsym( ), shl_gethandle( ), shl_getsymbols( ),
- shl_unload( ), shl_get( )(3X) - explicit load of shared libraries
-
-
-ACE_HAS_SVR4_GETTIMEOFDAY:
---------------------------
-
- Used in:
- ace/OS.h
- libsrc/Reactor/Timer_Queue.i
-
- Notes:
- has to do with gettimeofday ().
-
- Solaris:
- gettimeofday (struct timeval *tp)
-
- HPUX:
- don't set.
- it has gettimeofday (struct timeval *tp, struct timezone *tzp);
- most calls do a:
- #if defined (ACE_HAS_SVR4_GETTIMEOFDAY)
- ::gettimeofday (&cur_time);
- #else
- ::gettimeofday (&cur_time, 0);
- #endif /* ACE_HAS_SVR4_GETTIMEOFDAY */
-
-
-ACE_HAS_POLL:
-------------
- Used in:
- ace/OS.h
-
- Notes:
- #if defined (ACE_HAS_POLL)
- #include /**/ <poll.h>
- #endif /* ACE_HAS_POLL */
-
-ACE_USE_POLL_IMPLEMENTATION:
-------------------
-
- Used in:
- ace/OS.h
-
- Notes:
- Use the poll() event demultiplexor rather than select().
-
- HPUX:
- set it.
-
-
-ACE_HAS_SVR4_SIGNAL_T:
-----------------------
-
- Used in:
- ace/OS.h
-
- Notes:
- #if defined (ACE_HAS_SVR4_SIGNAL_T)
- typedef void (*SignalHandler)(int);
- typedef void (*SignalHandlerV)(void);
- #elif defined (ACE_HAS_SIGNALHANDLERV_INT_ARG)
- typedef void (*SignalHandler)(int);
- typedef void (*SignalHandlerV)(int);
- #else
- #define SignalHandler SIG_PF
- typedef void (*SignalHandlerV)(...);
- #endif /* ACE_HAS_SVR4_SIGNAL_T */
-
- HPUX:
- set it.
-
-
-ACE_HAS_SVR4_TLI:
------------------
-
- Used in:
- libsrc/IPC_SAP/TLI_SAP/TLI.C
- libsrc/IPC_SAP/TLI_SAP/TLI.h
- libsrc/IPC_SAP/TLI_SAP/TLI_Stream.C
-
- Notes:
- TLI is the transport layer calls as in: t_bind(), t_open(), t_unbind(),
- t_optmgmt(), ... in SunOS and Solaris.
-
- HPUX:
- don't set.
- Not supported.
-
-
-ACE_HAS_SYS_FILIO_H:
---------------------
-
- Used in:
- ace/OS.h
-
- Notes:
- if not defined, includes <sys/filio.h>.
- didn't find any reference to anything in this file in the ACE code.
-
- Solaris:
- filio.h defines FIOCLEX, FIOASYNC, ... as _IO('f', 1), ..
- for FIOLFS,.. solaris has this to say:
- /*
- * ioctl's for Online: DiskSuite.
- * WARNING - the support for these ioctls may be withdrawn
- * in the future OS releases.
- */
-
- HPUX:
- <sys/ioctl.h> defines FIOASYNC and some other ones,
- <sgtty.h> defines some like FIOCLEX.
- some are never defined.
- use #ifdef HP-UX to modify sysincludes.h
-
-
-ACE_HAS_SYS_SIGLIST:
---------------------
-
- Used in:
- ace/OS.h
- libsrc/Log_Msg/Log_Msg.C
-
- Notes:
- if not defined, does a:
- extern const char **_sys_siglist;
-
- Solaris:
- This is an array holding signal descriptions.
-
- HPUX:
- don't set.
- Some additional work is required. In libsrc/Log_Msg/Log_Msg.C,
- sys_siglist is used regardless of ACE_HAS_SYS_SIGLIST.
- have to add #ifdefs to remove them.
-
-
-ACE_HAS_TEMPLATE_TYPEDEFS:
---------------------------
-
- Used in:
- libsrc/ASX/*.[Chi]
-
- Notes:
- cfront-based C++ compilers don't implement templates that support
- classes with typedefs of other types as formal arguments. This
- typedef uses the C++ preprocessor to work around this problem.
-
-ACE_HAS_THREADS:
-----------------
-
- Used in:
- libsrc/Service_Configurator/Svc_Conf.y.C
- libsrc/Service_Configurator/Thread_Spawn.i
- libsrc/Threads/Synch.C
- libsrc/Threads/Synch.i
- libsrc/Threads/Thr_Manager.i
- libsrc/ASX/STREAM.C
- libsrc/ASX/Queue.C
- libsrc/ASX/Module.C
- libsrc/ASX/Stream_Modules.C
- libsrc/ASX/Multiplexor.C
- libsrc/ASX/Message_List.C
- include/Message_List.h
- include/Module.h
- include/Multiplexor.h
- include/Queue.h
- include/STREAM.h
- include/Stream_Modules.h
- include/Service_Types.h
- include/Thread_Spawn.h
- include/Synch.h
- include/Thr_Manager.h
-
- Notes:
- We use Message_List.h even in a non-threaded environment.
- our XOMessageList.h does this by #ifdefs around Threaded things.
-
- HPUX:
- not until 10.0.
-
-
-ACE_HAS_THREAD_T:
------------------
-
- Used in:
- ace/OS.h
-
- Notes:
- #if !defined (ACE_HAS_THREAD_T)
- typedef int thread_t;
- #endif /* !ACE_HAS_THREAD_T */
-
- HPUX:
- don't set.
-
-
-ACE_HAS_TIMOD_H:
-----------------
-
- Used in:
- ace/OS.h
-
- Notes:
- if defined, include <sys/timod.h>
-
- Solaris:
- timod is a STREAMS module for use with the Transport Inter-
- face (TI) functions of the Network Services library. The
- timod module converts a set of ioctl(2) calls into STREAMS
- messages that may be consumed by a transport protocol pro-
- vider that supports the Transport Interface. This allows a
- user to initiate certain TI functions as atomic operations.
-
- HPUX:
- don't set.
-
-
-ACE_HAS_TIUSER_H:
------------------
-
- Used in:
- ace/OS.h
-
- Notes:
- if set, includes <tiuser.h>
-
- Solaris:
- in conjunction with t_bind, t_accept, etc.. transport layer.
-
- HPUX:
- don't set.
-
-
-ACE_USE_POLL_IMPLEMENTATION:
-----------------------------
-
- Used in:
- libsrc/Reactor/Reactor.i
- include/Event_Handler.h
- ace/OS.h
- include/Reactor.h
-
- Notes:
- in the reactor, use poll instead of select. In general,
- good thing to have set.
diff --git a/ace/Reactor.cpp b/ace/Reactor.cpp
deleted file mode 100644
index 9f897fa08dd..00000000000
--- a/ace/Reactor.cpp
+++ /dev/null
@@ -1,258 +0,0 @@
-// $Id$
-
-#include "ace/Reactor.h"
-#include "ace/Reactor_Impl.h"
-#include "ace/Handle_Set.h"
-#if !defined (ACE_HAS_WINCE)
-# if !defined (ACE_LACKS_ACE_SVCCONF)
-# include "ace/Service_Config.h"
-# endif /* !ACE_LACKS_ACE_SVCCONF */
-# include "ace/WFMO_Reactor.h"
-# include "ace/Msg_WFMO_Reactor.h"
-#endif /* ! ACE_HAS_WINCE */
-#include "ace/Select_Reactor.h"
-#include "ace/TP_Reactor.h"
-#include "ace/Object_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Reactor.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Reactor, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Reactor)
-
-ACE_Reactor::ACE_Reactor (ACE_Reactor_Impl *impl,
- int delete_implementation)
- : implementation_ (0),
- delete_implementation_ (delete_implementation)
-{
- this->implementation (impl);
-
- if (this->implementation () == 0)
- {
-#if !defined (ACE_WIN32) \
- || !defined (ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2 == 0) \
- || defined (ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL) \
- || defined (ACE_USE_TP_REACTOR_FOR_REACTOR_IMPL)
- #if defined (ACE_USE_TP_REACTOR_FOR_REACTOR_IMPL)
- ACE_NEW (impl,
- ACE_TP_Reactor);
- #else
- ACE_NEW (impl,
- ACE_Select_Reactor);
- #endif /* ACE_USE_TP_REACTOR_FOR_REACTOR_IMPL */
-#else /* We are on Win32 and we have winsock and ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL is not defined */
- #if defined (ACE_USE_MSG_WFMO_REACTOR_FOR_REACTOR_IMPL)
- ACE_NEW (impl,
- ACE_Msg_WFMO_Reactor);
- #else
- ACE_NEW (impl,
- ACE_WFMO_Reactor);
- #endif /* ACE_USE_MSG_WFMO_REACTOR_FOR_REACTOR_IMPL */
-#endif /* !defined (ACE_WIN32) || !defined (ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2 == 0) || defined (ACE_USE_SELECT_REACTOR_FOR_REACTOR_IMPL) */
- this->implementation (impl);
- this->delete_implementation_ = 1;
- }
-}
-
-ACE_Reactor::~ACE_Reactor (void)
-{
- if (this->delete_implementation_)
- delete this->implementation ();
-}
-
-// Process-wide ACE_Reactor.
-ACE_Reactor *ACE_Reactor::reactor_ = 0;
-
-// Controls whether the Reactor is deleted when we shut down (we can
-// only delete it safely if we created it!)
-int ACE_Reactor::delete_reactor_ = 0;
-
-ACE_Reactor *
-ACE_Reactor::instance (void)
-{
- ACE_TRACE ("ACE_Reactor::instance");
-
- if (ACE_Reactor::reactor_ == 0)
- {
- // Perform Double-Checked Locking Optimization.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
-
- if (ACE_Reactor::reactor_ == 0)
- {
- ACE_NEW_RETURN (ACE_Reactor::reactor_,
- ACE_Reactor,
- 0);
- ACE_Reactor::delete_reactor_ = 1;
- }
- }
- return ACE_Reactor::reactor_;
-}
-
-ACE_Reactor *
-ACE_Reactor::instance (ACE_Reactor *r,
- int delete_reactor)
-{
- ACE_TRACE ("ACE_Reactor::instance");
-
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
- ACE_Reactor *t = ACE_Reactor::reactor_;
- if (delete_reactor != 0)
- ACE_Reactor::delete_reactor_ = 1;
- else
- // We can't safely delete it since we don't know who created it!
- ACE_Reactor::delete_reactor_ = 0;
-
- ACE_Reactor::reactor_ = r;
- return t;
-}
-
-void
-ACE_Reactor::close_singleton (void)
-{
- ACE_TRACE ("ACE_Reactor::close_singleton");
-
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance ()));
-
- if (ACE_Reactor::delete_reactor_)
- {
- delete ACE_Reactor::reactor_;
- ACE_Reactor::reactor_ = 0;
- ACE_Reactor::delete_reactor_ = 0;
- }
-}
-
-int
-ACE_Reactor::check_reconfiguration (void *)
-{
-#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_SVCCONF)
- if (ACE_Service_Config::reconfig_occurred ())
- {
- ACE_Service_Config::reconfigure ();
- return 1;
- }
-#endif /* ! ACE_HAS_WINCE || ! ACE_LACKS_ACE_SVCCONF */
- return 0;
-}
-
-int
-ACE_Reactor::run_reactor_event_loop (REACTOR_EVENT_HOOK eh)
-{
- ACE_TRACE ("ACE_Reactor::run_reactor_event_loop");
-
- while (1)
- {
- int result = this->implementation_->handle_events ();
-
- if (eh != 0 && (*eh)(0))
- continue;
- else if (result == -1 && this->implementation_->deactivated ())
- return 0;
- else if (result == -1)
- return -1;
- }
-
- ACE_NOTREACHED (return 0;)
-}
-
-int
-ACE_Reactor::run_alertable_reactor_event_loop (REACTOR_EVENT_HOOK eh)
-{
- ACE_TRACE ("ACE_Reactor::run_alertable_reactor_event_loop");
-
- while (1)
- {
- int result = this->implementation_->alertable_handle_events ();
-
- if (eh != 0 && (*eh)(0))
- continue;
- else if (result == -1 && this->implementation_->deactivated ())
- return 0;
- else if (result == -1)
- return -1;
- }
-
- ACE_NOTREACHED (return 0;)
-}
-
-int
-ACE_Reactor::run_reactor_event_loop (ACE_Time_Value &tv,
- REACTOR_EVENT_HOOK eh)
-{
- ACE_TRACE ("ACE_Reactor::run_reactor_event_loop");
-
- while (1)
- {
- int result = this->implementation_->handle_events (tv);
-
- if (eh != 0 && (*eh)(0))
- continue;
- else if (result == -1 && this->implementation_->deactivated ())
- return 0;
- else if (result <= 0)
- return result;
- }
-
- ACE_NOTREACHED (return 0;)
-}
-
-int
-ACE_Reactor::run_alertable_reactor_event_loop (ACE_Time_Value &tv,
- REACTOR_EVENT_HOOK eh)
-{
- ACE_TRACE ("ACE_Reactor::run_alertable_reactor_event_loop");
-
- while (1)
- {
- int result = this->implementation_->alertable_handle_events (tv);
-
- if (eh != 0 && (*eh)(0))
- continue;
- else if (result == -1 && this->implementation_->deactivated ())
- return 0;
- else if (result <= 0)
- return result;
- }
-
- ACE_NOTREACHED (return 0;)
-}
-
-int
-ACE_Reactor::end_reactor_event_loop (void)
-{
- ACE_TRACE ("ACE_Reactor::end_reactor_event_loop");
-
- this->implementation_->deactivate (1);
-
- return 0;
-}
-
-int
-ACE_Reactor::reactor_event_loop_done (void)
-{
- ACE_TRACE ("ACE_Reactor::reactor_event_loop_done");
- return this->implementation_->deactivated ();
-}
- // Report if the <ACE_Reactor::instance>'s event loop is finished.
-
-void
-ACE_Reactor::reset_reactor_event_loop (void)
-{
- ACE_TRACE ("ACE_Reactor::reset_event_loop");
-
- this->implementation_->deactivate (0);
-}
- // Resets the <ACE_Reactor::end_event_loop_> static so that the
- // <run_event_loop> method can be restarted.
-
-void
-ACE_Reactor::dump (void) const
-{
- ACE_TRACE ("ACE_Reactor::dump");
-
- implementation_->dump ();
-}
diff --git a/ace/Reactor.h b/ace/Reactor.h
deleted file mode 100644
index 5eeaa1655e1..00000000000
--- a/ace/Reactor.h
+++ /dev/null
@@ -1,563 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Reactor.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_REACTOR_H
-#define ACE_REACTOR_H
-#include "ace/pre.h"
-
-class ACE_Reactor_Impl;
-
-// Need the class def for ACE_Handle_Set to compile references to it in
-// programs.
-#include "ace/Handle_Set.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Timer Queue is a complicated template class. A simple forward
-// declaration will not work
-#include "ace/Timer_Queue.h"
-
-// Event_Handler.h contains the definition of ACE_Reactor_Mask
-#include "ace/Event_Handler.h"
-
-// We are using 4 or 5 signal classes, we could forward declare
-// them.... But Timer_Queue_T.h includes Signal.h, so I don't think
-// forward declaration will be useful here
-#include "ace/Signal.h"
-
-class ACE_Export ACE_Reactor
-{
- // = TITLE
- // The resposiblility of this class is to forward all methods to
- // its delegation/implementation class, e.g.,
- // <ACE_Select_Reactor> or <ACE_WFMO_Reactor>.
-public:
- enum
- {
- // = Operations on the "ready" mask and the "dispatch" mask.
- GET_MASK = 1,
- // Retrieve current value of the the "ready" mask or the
- // "dispatch" mask.
- SET_MASK = 2,
- // Set value of bits to new mask (changes the entire mask).
- ADD_MASK = 3,
- // Bitwise "or" the value into the mask (only changes enabled
- // bits).
- CLR_MASK = 4
- // Bitwise "and" the negation of the value out of the mask (only
- // changes enabled bits).
- };
-
- typedef int (*REACTOR_EVENT_HOOK)(void*);
- // You can add a hook to various run_event methods and the hook will
- // be called after handling every reactor event. If this function
- // returns 0, run_reactor_event_loop will check for the return value of
- // handle_event. If it is -1, the the run_reactor_event_loop will return
- // (pre-maturely.)
-
- static ACE_Reactor *instance (void);
- // Get pointer to a process-wide <ACE_Reactor>.
-
- static ACE_Reactor *instance (ACE_Reactor *,
- int delete_reactor = 0);
- // Set pointer to a process-wide <ACE_Reactor> and return existing
- // pointer. If <delete_reactor> != 0 then we'll delete the Reactor
- // at destruction time.
-
- static void close_singleton (void);
- // Delete the dynamically allocated Singleton
-
- // = Singleton reactor event loop management methods.
-
- // Note that these method ONLY work on the "Singleton Reactor,"
- // i.e., the one returned from <ACE_Reactor::instance>.
- static int run_event_loop (void);
- static int run_alertable_event_loop (void);
- // Run the event loop until the
- // <ACE_Reactor::handle_events/ACE_Reactor::alertable_handle_events>
- // method returns -1 or the <end_event_loop> method is invoked.
- // Note that this method can only be used by the singleton
- // <ACE_Reactor::instance>. Thus, to run another reactor use
- // <ACE_Reactor::run_reactor_event_loop>.
-
- static int run_event_loop (ACE_Time_Value &tv);
- static int run_alertable_event_loop (ACE_Time_Value &tv);
- // Run the event loop until the <ACE_Reactor::handle_events> or
- // <ACE_Reactor::alertable_handle_events> methods returns -1, the
- // <end_event_loop> method is invoked, or the <ACE_Time_Value>
- // expires. Note that this method can only be used by the singleton
- // <ACE_Reactor::instance>. Thus, to run another reactor use
- // <ACE_Reactor::run_reactor_event_loop>.
-
- static int end_event_loop (void);
- // Instruct the <ACE_Reactor::instance> to terminate its event loop
- // and notifies the <ACE_Reactor::instance> so that it can wake up
- // and close down gracefully. Note that this method can only be
- // used by the singleton <ACE_Reactor::instance>. Thus, to
- // terminate another reactor, use
- // <ACE_Reactor::end_reactor_event_loop>.
-
- static int event_loop_done (void);
- // Report if the <ACE_Reactor::instance>'s event loop is finished.
- // Note that this method can only be used by the singleton
- // <ACE_Reactor::instance>. Thus, to check another reactor use
- // <ACE_Reactor::reactor_event_loop_done>.
-
- static void reset_event_loop (void);
- // Resets the <ACE_Reactor::end_event_loop_> static so that the
- // <run_event_loop> method can be restarted. Note that this method
- // can only be used by the singleton <ACE_Reactor::instance>. Thus,
- // to reset another reactor use
- // <ACE_Reactor::reset_reactor_event_loop>.
-
- static int check_reconfiguration (void *);
- // The singleton reactor is used by the <ACE_Service_Config>.
- // Therefore, we must check for the reconfiguration request and
- // handle it after handling an event.
-
- // = Reactor event loop management methods.
-
- // These methods work with an instance of a reactor.
- virtual int run_reactor_event_loop (REACTOR_EVENT_HOOK = 0);
- virtual int run_alertable_reactor_event_loop (REACTOR_EVENT_HOOK = 0);
- // Run the event loop until the
- // <ACE_Reactor::handle_events/ACE_Reactor::alertable_handle_events>
- // method returns -1 or the <end_event_loop> method is invoked.
-
- virtual int run_reactor_event_loop (ACE_Time_Value &tv,
- REACTOR_EVENT_HOOK = 0);
- virtual int run_alertable_reactor_event_loop (ACE_Time_Value &tv,
- REACTOR_EVENT_HOOK = 0);
- // Run the event loop until the <ACE_Reactor::handle_events> or
- // <ACE_Reactor::alertable_handle_events> methods returns -1, the
- // <end_event_loop> method is invoked, or the <ACE_Time_Value>
- // expires.
-
- virtual int end_reactor_event_loop (void);
- // Instruct the <ACE_Reactor::instance> to terminate its event loop
- // and notifies the <ACE_Reactor::instance> so that it can wake up
- // and close down gracefully.
-
- virtual int reactor_event_loop_done (void);
- // Report if the <ACE_Reactor::instance>'s event loop is finished.
-
- virtual void reset_reactor_event_loop (void);
- // Resets the <ACE_Reactor::end_event_loop_> static so that the
- // <run_event_loop> method can be restarted.
-
- ACE_Reactor (ACE_Reactor_Impl *implementation = 0,
- int delete_implementation = 0);
- // Create the Reactor using <implementation>. The flag
- // <delete_implementation> tells the Reactor whether or not to
- // delete the <implementation> on destruction.
-
- virtual ~ACE_Reactor (void);
- // Close down and release all resources.
-
- virtual int open (size_t max_number_of_handles,
- int restart = 0,
- ACE_Sig_Handler *signal_handler = 0,
- ACE_Timer_Queue *timer_queue = 0);
- // Initialize the <ACE_Reactor> to manage <max_number_of_handles>.
- // If <restart> is non-0 then the <ACE_Reactor>'s <handle_events>
- // method will be restarted automatically when <EINTR> occurs. If
- // <signal_handler> or <timer_queue> are non-0 they are used as the
- // signal handler and timer queue, respectively.
-
- virtual int set_sig_handler (ACE_Sig_Handler *signal_handler);
- // Use a user specified signal handler instead.
-
- virtual int set_timer_queue (ACE_Timer_Queue *timer_queue);
- // Use a user specified timer queue instead.
- // Notice that I don't think you should mess with timer queue
- // once the Reactor is up and running.
-
- virtual int close (void);
- // Close down and release all resources.
-
- // = Event loop drivers.
-
- virtual int work_pending (const ACE_Time_Value &max_wait_time = ACE_Time_Value::zero);
- // Returns non-zero if there are I/O events "ready" for dispatching,
- // but does not actually dispatch the event handlers. By default,
- // don't block while checking this, i.e., "poll".
-
- virtual int handle_events (ACE_Time_Value *max_wait_time = 0);
- virtual int alertable_handle_events (ACE_Time_Value *max_wait_time = 0);
- // This event loop driver blocks for up to <max_wait_time> before
- // returning. It will return earlier if events occur. Note that
- // <max_wait_time> can be 0, in which case this method blocks
- // indefinitely until events occur.
- //
- // <max_wait_time> is decremented to reflect how much time this call
- // took. For instance, if a time value of 3 seconds is passed to
- // handle_events and an event occurs after 2 seconds,
- // <max_wait_time> will equal 1 second. This can be used if an
- // application wishes to handle events for some fixed amount of
- // time.
- //
- // Returns the total number of timers and I/O <ACE_Event_Handler>s
- // that were dispatched, 0 if the <max_wait_time> elapsed without
- // dispatching any handlers, or -1 if an error occurs.
- //
- // The only difference between <alertable_handle_events> and
- // <handle_events> is that in the alertable case, the eventloop will
- // return when the system queues an I/O completion routine or an
- // Asynchronous Procedure Call.
-
- virtual int handle_events (ACE_Time_Value &max_wait_time);
- virtual int alertable_handle_events (ACE_Time_Value &max_wait_time);
- // This method is just like the one above, except the
- // <max_wait_time> value is a reference and can therefore never be
- // NULL.
- //
- // The only difference between <alertable_handle_events> and
- // <handle_events> is that in the alertable case, the eventloop will
- // return when the system queues an I/O completion routine or an
- // Asynchronous Procedure Call.
-
- // = Register and remove Handlers.
-
- virtual int register_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // Register <event_handler> with <mask>. The I/O handle will always
- // come from <get_handle> on the <event_handler>.
-
- virtual int register_handler (ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // Register <event_handler> with <mask>. The I/O handle is provided
- // through the <io_handle> parameter.
-
-#if defined (ACE_WIN32)
- virtual int register_handler (ACE_Event_Handler *event_handler,
- ACE_HANDLE event_handle = ACE_INVALID_HANDLE);
- // Register an <event_handler> that will be notified when
- // <event_handle> is signaled. Since no event mask is passed
- // through this interface, it is assumed that the <event_handle>
- // being passed in is an event handle and not an I/O handle.
- //
- // Originally this interface was available for all platforms, but
- // because ACE_HANDLE is an int on non-Win32 platforms, compilers
- // are not able to tell the difference between
- // register_handler(ACE_Event_Handler*,ACE_Reactor_Mask) and
- // register_handler(ACE_Event_Handler*,ACE_HANDLE). Therefore, we
- // have restricted this method to Win32 only.
-#endif /* ACE_WIN32 */
-
- virtual int register_handler (ACE_HANDLE event_handle,
- ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // Register an <event_handler> that will be notified when
- // <event_handle> is signaled. <mask> specifies the network events
- // that the <event_handler> is interested in.
-
- virtual int register_handler (const ACE_Handle_Set &handles,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // Register <event_handler> with all the <handles> in the <Handle_Set>.
-
- virtual int register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0,
- ACE_Event_Handler **old_sh = 0,
- ACE_Sig_Action *old_disp = 0);
- // Register <new_sh> to handle the signal <signum> using the
- // <new_disp>. Returns the <old_sh> that was previously registered
- // (if any), along with the <old_disp> of the signal handler.
-
- virtual int register_handler (const ACE_Sig_Set &sigset,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0);
- // Registers <new_sh> to handle a set of signals <sigset> using the
- // <new_disp>.
-
- virtual int remove_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // Removes <event_handler>. Note that the I/O handle will be
- // obtained using <get_handle> method of <event_handler> . If
- // <mask> == <ACE_Event_Handler::DONT_CALL> then the <handle_close>
- // method of the <event_handler> is not invoked.
-
- virtual int remove_handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask);
- // Removes <handle>. If <mask> == <ACE_Event_Handler::DONT_CALL>
- // then the <handle_close> method of the associated <event_handler>
- // is not invoked.
-
- virtual int remove_handler (const ACE_Handle_Set &handle_set,
- ACE_Reactor_Mask mask);
- // Removes all handles in <handle_set>. If <mask> ==
- // <ACE_Event_Handler::DONT_CALL> then the <handle_close> method of
- // the associated <event_handler>s is not invoked.
-
- virtual int remove_handler (int signum,
- ACE_Sig_Action *new_disp,
- ACE_Sig_Action *old_disp = 0,
- int sigkey = -1);
- // Remove the ACE_Event_Handler currently associated with <signum>.
- // Install the new disposition (if given) and return the previous
- // disposition (if desired by the caller). Returns 0 on success and
- // -1 if <signum> is invalid.
-
- virtual int remove_handler (const ACE_Sig_Set &sigset);
- // Calls <remove_handler> for every signal in <sigset>.
-
- // = Suspend and resume Handlers.
-
- virtual int suspend_handler (ACE_Event_Handler *event_handler);
- // Suspend <event_handler> temporarily. Use
- // <ACE_Event_Handler::get_handle> to get the handle.
-
- virtual int suspend_handler (ACE_HANDLE handle);
- // Suspend <handle> temporarily.
-
- virtual int suspend_handler (const ACE_Handle_Set &handles);
- // Suspend all <handles> in handle set temporarily.
-
- virtual int suspend_handlers (void);
- // Suspend all <handles> temporarily.
-
- virtual int resume_handler (ACE_Event_Handler *event_handler);
- // Resume <event_handler>. Use <ACE_Event_Handler::get_handle> to
- // get the handle.
-
- virtual int resume_handler (ACE_HANDLE handle);
- // Resume <handle>.
-
- virtual int resume_handler (const ACE_Handle_Set &handles);
- // Resume all <handles> in handle set.
-
- virtual int resume_handlers (void);
- // Resume all <handles>.
-
- // = Timer management.
-
- virtual long schedule_timer (ACE_Event_Handler *event_handler,
- const void *arg,
- const ACE_Time_Value &delta,
- const ACE_Time_Value &interval = ACE_Time_Value::zero);
- // Schedule an <event_handler> that will expire after <delay> amount
- // of time, which is specified as relative time to the current
- // <gettimeofday>. If it expires then <arg> is passed in as the
- // value to the <event_handler>'s <handle_timeout> callback method.
- // If <interval> is != to <ACE_Time_Value::zero> then it is used to
- // reschedule the <event_handler> automatically, also specified
- // using relative time. This method returns a <timer_id> that
- // uniquely identifies the <event_handler> in an internal list.
- // This <timer_id> can be used to cancel an <event_handler> before
- // it expires. The cancellation ensures that <timer_ids> are unique
- // up to values of greater than 2 billion timers. As long as timers
- // don't stay around longer than this there should be no problems
- // with accidentally deleting the wrong timer. Returns -1 on
- // failure (which is guaranteed never to be a valid <timer_id>.
-
- virtual int reset_timer_interval (long timer_id,
- const ACE_Time_Value &interval);
- // Resets the interval of the timer represented by <timer_id> to
- // <interval>, which is specified in relative time to the current
- // <gettimeofday>. If <interval> is equal to
- // <ACE_Time_Value::zero>, the timer will become a non-rescheduling
- // timer. Returns 0 if successful, -1 if not.
-
- virtual int cancel_timer (ACE_Event_Handler *event_handler,
- int dont_call_handle_close = 1);
- // Cancel all <Event_Handler>s that match the address of
- // <event_handler>. Returns number of handlers cancelled.
-
- virtual int cancel_timer (long timer_id,
- const void **arg = 0,
- int dont_call_handle_close = 1);
- // Cancel the single <Event_Handler> that matches the <timer_id>
- // value, which was returned from the schedule method. If arg is
- // non-NULL then it will be set to point to the ``magic cookie''
- // argument passed in when the Event_Handler was registered. This
- // makes it possible to free up the memory and avoid memory leaks.
- // Returns 1 if cancellation succeeded and 0 if the <timer_id>
- // wasn't found.
-
- // = High-level Event_Handler scheduling operations
-
- virtual int schedule_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_added);
- // Add <masks_to_be_added> to the <event_handler>'s entry.
- // <event_handler> must already have been registered.
-
- virtual int schedule_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask masks_to_be_added);
- // Add <masks_to_be_added> to the <handle>'s entry. <event_handler>
- // associated with <handle> must already have been registered.
-
- virtual int cancel_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_cleared);
- // Clear <masks_to_be_cleared> from the <event_handler>'s entry.
-
- virtual int cancel_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask masks_to_be_cleared);
- // Clear <masks_to_be_cleared> from the <handle>'s entry.
-
- // = Notification methods.
-
- virtual int notify (ACE_Event_Handler *event_handler = 0,
- ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK,
- ACE_Time_Value *tv = 0);
- // Notify <event_handler> of <mask> event. The <ACE_Time_Value>
- // indicates how long to blocking trying to notify. If <timeout> ==
- // 0, the caller will block until action is possible, else will wait
- // until the relative time specified in <timeout> elapses).
-
- virtual void max_notify_iterations (int iterations);
- // Set the maximum number of times that ACE_Reactor will
- // iterate and dispatch the <ACE_Event_Handlers> that are passed in
- // via the notify queue before breaking out of its
- // <ACE_Message_Queue::dequeue> loop. By default, this is set to
- // -1, which means "iterate until the queue is empty." Setting this
- // to a value like "1 or 2" will increase "fairness" (and thus
- // prevent starvation) at the expense of slightly higher dispatching
- // overhead.
-
- virtual int max_notify_iterations (void);
- // Get the maximum number of times that the ACE_Reactor will
- // iterate and dispatch the <ACE_Event_Handlers> that are passed in
- // via the notify queue before breaking out of its
- // <ACE_Message_Queue::dequeue> loop.
-
- // = Assorted helper methods.
-
- virtual int handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Event_Handler **event_handler = 0);
- // Check to see if <handle> is associated with a valid Event_Handler
- // bound to <mask>. Return the <event_handler> associated with this
- // <handler> if <event_handler> != 0.
-
- virtual int handler (int signum,
- ACE_Event_Handler **event_handler = 0);
- // Check to see if <signum> is associated with a valid Event_Handler
- // bound to a signal. Return the <event_handler> associated with
- // this <handler> if <event_handler> != 0.
-
- virtual int initialized (void);
- // Returns true if Reactor has been successfully initialized, else
- // false.
-
- virtual size_t size (void);
- // Returns the current size of the Reactor's internal descriptor
- // table.
-
- virtual ACE_Lock &lock (void);
- // Returns a reference to the Reactor's internal lock.
-
- virtual void wakeup_all_threads (void);
- // Wake up all threads in waiting in the event loop
-
- virtual int owner (ACE_thread_t new_owner,
- ACE_thread_t *old_owner = 0);
- // Transfers ownership of Reactor to the <new_owner>.
-
- virtual int owner (ACE_thread_t *owner);
- // Return the ID of the "owner" thread.
-
- virtual void requeue_position (int position);
- // Set position of the owner thread.
-
- virtual int requeue_position (void);
- // Get position of the owner thread.
-
- virtual int restart (void);
- // Get the existing restart value.
-
- virtual int restart (int r);
- // Set a new value for restart and return the original value.
-
- // = Low-level wait_set mask manipulation methods.
-
- virtual int mask_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int ops);
- // GET/SET/ADD/CLR the dispatch mask "bit" bound with the
- // <event_handler> and <mask>.
-
- virtual int mask_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops);
- // GET/SET/ADD/CLR the dispatch MASK "bit" bound with the <handle>
- // and <mask>.
-
- // = Low-level ready_set mask manipulation methods.
- virtual int ready_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int ops);
- // GET/SET/ADD/CLR the ready "bit" bound with the <event_handler>
- // and <mask>.
-
- virtual int ready_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops);
- // GET/SET/ADD/CLR the ready "bit" bound with the <handle> and <mask>.
-
- virtual ACE_Reactor_Impl *implementation (void);
- // Get the implementation class
-
- virtual int current_info (ACE_HANDLE handle,
- size_t &msg_size);
- // Returns 0, if the size of the current message has been put in
- // <size> returns -1, if not. ACE_HANDLE allows the reactor to
- // check if the caller is valid. Used for CLASSIX Reactor
- // implementation.
-
- virtual int uses_event_associations (void);
- // Return 1 if we any event associations were made by the reactor
- // for the handles that it waits on, 0 otherwise.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- void dump (void) const;
- // Dump the state of the object.
-
-protected:
- virtual void implementation (ACE_Reactor_Impl *implementation);
- // Set the implementation class.
-
- ACE_Reactor_Impl *implementation_;
- // Delegation/implementation class that all methods will be
- // forwarded to.
-
- int delete_implementation_;
- // Flag used to indicate whether we are responsible for cleaning up
- // the implementation instance
-
- static ACE_Reactor *reactor_;
- // Pointer to a process-wide <ACE_Reactor> singleton.
-
- static int delete_reactor_;
- // Must delete the <reactor_> singleton if non-0.
-
- ACE_Reactor (const ACE_Reactor &);
- ACE_Reactor &operator = (const ACE_Reactor &);
- // Deny access since member-wise won't work...
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Reactor.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_REACTOR_H */
diff --git a/ace/Reactor.i b/ace/Reactor.i
deleted file mode 100644
index bc7d5ab59d9..00000000000
--- a/ace/Reactor.i
+++ /dev/null
@@ -1,634 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/Reactor_Impl.h"
-#include "ace/Handle_Set.h"
-
-ACE_INLINE ACE_Reactor_Impl *
-ACE_Reactor::implementation (void)
-{
- return this->implementation_;
-}
-
-ACE_INLINE void
-ACE_Reactor::implementation (ACE_Reactor_Impl *impl)
-{
- this->implementation_ = impl;
-}
-
-ACE_INLINE int
-ACE_Reactor::current_info (ACE_HANDLE handle,
- size_t &size)
-{
- return this->implementation ()->current_info (handle, size);
-}
-
-// Run the event loop until the <ACE_Reactor::handle_events> method
-// returns -1 or the <end_event_loop> method is invoked.
-
-ACE_INLINE int
-ACE_Reactor::run_event_loop (void)
-{
- ACE_TRACE ("ACE_Reactor::run_event_loop");
-
- return
- ACE_Reactor::instance ()
- ->run_reactor_event_loop (ACE_Reactor::check_reconfiguration);
-}
-
-// Run the event loop until the <ACE_Reactor::handle_events>
-// method returns -1, the <end_event_loop> method
-// is invoked, or the <ACE_Time_Value> expires.
-
-ACE_INLINE int
-ACE_Reactor::run_event_loop (ACE_Time_Value &tv)
-{
- ACE_TRACE ("ACE_Reactor::run_event_loop");
-
- return
- ACE_Reactor::instance ()
- ->run_reactor_event_loop (tv,
- ACE_Reactor::check_reconfiguration);
-}
-
-// Run the event loop until the <ACE_Reactor::alertable_handle_events> method
-// returns -1 or the <end_event_loop> method is invoked.
-
-ACE_INLINE int
-ACE_Reactor::run_alertable_event_loop (void)
-{
- ACE_TRACE ("ACE_Reactor::run_alertable_event_loop");
-
- return
- ACE_Reactor::instance ()
- ->run_alertable_reactor_event_loop (ACE_Reactor::check_reconfiguration);
-}
-
-// Run the event loop until the <ACE_Reactor::alertable_handle_events>
-// method returns -1, the <end_event_loop> method
-// is invoked, or the <ACE_Time_Value> expires.
-
-ACE_INLINE int
-ACE_Reactor::run_alertable_event_loop (ACE_Time_Value &tv)
-{
- ACE_TRACE ("ACE_Reactor::run_alertable_event_loop");
-
- return
- ACE_Reactor::instance ()
- ->run_alertable_reactor_event_loop (tv,
- ACE_Reactor::check_reconfiguration);
-}
-
-ACE_INLINE void
-ACE_Reactor::reset_event_loop (void)
-{
- ACE_TRACE ("ACE_Reactor::reset_event_loop");
-
- ACE_Reactor::instance ()->reset_reactor_event_loop ();
-}
-
-ACE_INLINE int
-ACE_Reactor::end_event_loop (void)
-{
- ACE_TRACE ("ACE_Reactor::end_event_loop");
- ACE_Reactor::instance ()->end_reactor_event_loop ();
-
- return 0;
-}
-
-ACE_INLINE int
-ACE_Reactor::event_loop_done (void)
-{
- ACE_TRACE ("ACE_Reactor::event_loop_done");
- return ACE_Reactor::instance ()->reactor_event_loop_done ();
-}
-
-ACE_INLINE int
-ACE_Reactor::open (size_t size,
- int restart,
- ACE_Sig_Handler *signal_handler,
- ACE_Timer_Queue *timer_queue)
-{
- return this->implementation ()->open (size,
- restart,
- signal_handler,
- timer_queue);
-}
-ACE_INLINE int
-ACE_Reactor::set_sig_handler (ACE_Sig_Handler *signal_handler)
-{
- return this->implementation ()->set_sig_handler (signal_handler);
-}
-
-ACE_INLINE int
-ACE_Reactor::set_timer_queue (ACE_Timer_Queue *timer_queue)
-{
- return this->implementation ()->set_timer_queue (timer_queue);
-}
-
-ACE_INLINE int
-ACE_Reactor::close (void)
-{
- return this->implementation ()->close ();
-}
-
-ACE_INLINE int
-ACE_Reactor::work_pending (const ACE_Time_Value &max_wait_time)
-{
- return this->implementation ()->work_pending (max_wait_time);
-}
-
-ACE_INLINE int
-ACE_Reactor::handle_events (ACE_Time_Value *max_wait_time)
-{
- return this->implementation ()->handle_events (max_wait_time);
-}
-
-ACE_INLINE int
-ACE_Reactor::alertable_handle_events (ACE_Time_Value *max_wait_time)
-{
- return this->implementation ()->alertable_handle_events (max_wait_time);
-}
-
-ACE_INLINE int
-ACE_Reactor::handle_events (ACE_Time_Value &max_wait_time)
-{
- return this->implementation ()->handle_events (max_wait_time);
-}
-
-ACE_INLINE int
-ACE_Reactor::alertable_handle_events (ACE_Time_Value &max_wait_time)
-{
- return this->implementation ()->alertable_handle_events (max_wait_time);
-}
-
-
-ACE_INLINE int
-ACE_Reactor::register_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- // Remember the old reactor.
- ACE_Reactor *old_reactor = event_handler->reactor ();
-
- // Assign *this* <Reactor> to the <Event_Handler>.
- event_handler->reactor (this);
-
- int result = this->implementation ()->register_handler (event_handler,
- mask);
- if (result == -1)
- // Reset the old reactor in case of failures.
- event_handler->reactor (old_reactor);
-
- return result;
-}
-
-ACE_INLINE int
-ACE_Reactor::register_handler (ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- // Remember the old reactor.
- ACE_Reactor *old_reactor = event_handler->reactor ();
-
- // Assign *this* <Reactor> to the <Event_Handler>.
- event_handler->reactor (this);
-
- int result = this->implementation ()->register_handler (io_handle,
- event_handler,
- mask);
- if (result == -1)
- // Reset the old reactor in case of failures.
- event_handler->reactor (old_reactor);
-
- return result;
-}
-
-#if defined (ACE_WIN32)
-
-ACE_INLINE int
-ACE_Reactor::register_handler (ACE_Event_Handler *event_handler,
- ACE_HANDLE event_handle)
-{
- // Remember the old reactor.
- ACE_Reactor *old_reactor = event_handler->reactor ();
-
- // Assign *this* <Reactor> to the <Event_Handler>.
- event_handler->reactor (this);
-
- int result = this->implementation ()->register_handler (event_handler,
- event_handle);
- if (result == -1)
- // Reset the old reactor in case of failures.
- event_handler->reactor (old_reactor);
-
- return result;
-}
-
-#endif /* ACE_WIN32 */
-
-ACE_INLINE int
-ACE_Reactor::register_handler (ACE_HANDLE event_handle,
- ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- // Remember the old reactor.
- ACE_Reactor *old_reactor = event_handler->reactor ();
-
- // Assign *this* <Reactor> to the <Event_Handler>.
- event_handler->reactor (this);
-
- int result = this->implementation ()->register_handler (event_handle,
- io_handle,
- event_handler,
- mask);
- if (result == -1)
- // Reset the old reactor in case of failures.
- event_handler->reactor (old_reactor);
-
- return result;
-}
-
-ACE_INLINE int
-ACE_Reactor::register_handler (const ACE_Handle_Set &handles,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- // Remember the old reactor.
- ACE_Reactor *old_reactor = event_handler->reactor ();
-
- // Assign *this* <Reactor> to the <Event_Handler>.
- event_handler->reactor (this);
-
- int result = this->implementation ()->register_handler (handles,
- event_handler,
- mask);
- if (result == -1)
- // Reset the old reactor in case of failures.
- event_handler->reactor (old_reactor);
-
- return result;
-}
-
-ACE_INLINE int
-ACE_Reactor::register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp,
- ACE_Event_Handler **old_sh,
- ACE_Sig_Action *old_disp)
-{
- return this->implementation ()->register_handler (signum,
- new_sh,
- new_disp,
- old_sh,
- old_disp);
-}
-
-ACE_INLINE int
-ACE_Reactor::register_handler (const ACE_Sig_Set &sigset,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp)
-{
- return this->implementation ()->register_handler (sigset,
- new_sh,
- new_disp);
-}
-
-ACE_INLINE int
-ACE_Reactor::remove_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- return this->implementation ()->remove_handler (event_handler,
- mask);
-}
-
-ACE_INLINE int
-ACE_Reactor::remove_handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- return this->implementation ()->remove_handler (handle,
- mask);
-}
-
-ACE_INLINE int
-ACE_Reactor::remove_handler (const ACE_Handle_Set &handle_set,
- ACE_Reactor_Mask mask)
-{
- return this->implementation ()->remove_handler (handle_set,
- mask);
-}
-
-ACE_INLINE int
-ACE_Reactor::remove_handler (int signum,
- ACE_Sig_Action *new_disp,
- ACE_Sig_Action *old_disp,
- int sigkey)
-{
- return this->implementation ()->remove_handler (signum,
- new_disp,
- old_disp,
- sigkey);
-}
-
-ACE_INLINE int
-ACE_Reactor::remove_handler (const ACE_Sig_Set &sigset)
-{
- return this->implementation ()->remove_handler (sigset);
-}
-
-
-ACE_INLINE int
-ACE_Reactor::suspend_handler (ACE_Event_Handler *event_handler)
-{
- return this->implementation ()->suspend_handler (event_handler);
-}
-
-ACE_INLINE int
-ACE_Reactor::suspend_handler (ACE_HANDLE handle)
-{
- return this->implementation ()->suspend_handler (handle);
-}
-
-ACE_INLINE int
-ACE_Reactor::suspend_handler (const ACE_Handle_Set &handles)
-{
- return this->implementation ()->suspend_handler (handles);
-}
-
-ACE_INLINE int
-ACE_Reactor::suspend_handlers (void)
-{
- return this->implementation ()->suspend_handlers ();
-}
-
-ACE_INLINE int
-ACE_Reactor::resume_handler (ACE_Event_Handler *event_handler)
-{
- return this->implementation ()->resume_handler (event_handler);
-}
-
-ACE_INLINE int
-ACE_Reactor::resume_handler (ACE_HANDLE handle)
-{
- return this->implementation ()->resume_handler (handle);
-}
-
-ACE_INLINE int
-ACE_Reactor::resume_handler (const ACE_Handle_Set &handles)
-{
- return this->implementation ()->resume_handler (handles);
-}
-
-ACE_INLINE int
-ACE_Reactor::resume_handlers (void)
-{
- return this->implementation ()->resume_handlers ();
-}
-
-
-ACE_INLINE int
-ACE_Reactor::reset_timer_interval
- (long timer_id,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Reactor::reset_timer_interval");
-
- return this->implementation ()->reset_timer_interval
- (timer_id,
- interval);
-}
-
-ACE_INLINE long
-ACE_Reactor::schedule_timer (ACE_Event_Handler *event_handler,
- const void *arg,
- const ACE_Time_Value &delta,
- const ACE_Time_Value &interval)
-{
- // Remember the old reactor.
- ACE_Reactor *old_reactor = event_handler->reactor ();
-
- // Assign *this* <Reactor> to the <Event_Handler>.
- event_handler->reactor (this);
-
- int result = this->implementation ()->schedule_timer (event_handler,
- arg,
- delta,
- interval);
- if (result == -1)
- // Reset the old reactor in case of failures.
- event_handler->reactor (old_reactor);
-
- return result;
-}
-
-ACE_INLINE int
-ACE_Reactor::cancel_timer (ACE_Event_Handler *event_handler,
- int dont_call_handle_close)
-{
- return this->implementation ()->cancel_timer (event_handler,
- dont_call_handle_close);
-}
-
-ACE_INLINE int
-ACE_Reactor::cancel_timer (long timer_id,
- const void **arg,
- int dont_call_handle_close)
-{
- return this->implementation ()->cancel_timer (timer_id,
- arg,
- dont_call_handle_close);
-}
-
-
-ACE_INLINE int
-ACE_Reactor::schedule_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_added)
-{
- // Remember the old reactor.
- ACE_Reactor *old_reactor = event_handler->reactor ();
-
- // Assign *this* <Reactor> to the <Event_Handler>.
- event_handler->reactor (this);
-
- int result = this->implementation ()->schedule_wakeup (event_handler,
- masks_to_be_added);
- if (result == -1)
- // Reset the old reactor in case of failures.
- event_handler->reactor (old_reactor);
-
- return result;
-}
-
-ACE_INLINE int
-ACE_Reactor::schedule_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask masks_to_be_added)
-{
- return implementation ()->schedule_wakeup (handle,
- masks_to_be_added);
-}
-
-ACE_INLINE int
-ACE_Reactor::cancel_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_cleared)
-{
- return this->implementation ()->cancel_wakeup (event_handler,
- masks_to_be_cleared);
-}
-
-ACE_INLINE int
-ACE_Reactor::cancel_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask masks_to_be_cleared)
-{
- return this->implementation ()->cancel_wakeup (handle,
- masks_to_be_cleared);
-}
-
-
-ACE_INLINE int
-ACE_Reactor::notify (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- ACE_Time_Value *tv)
-{
- return this->implementation ()->notify (event_handler,
- mask,
- tv);
-}
-
-ACE_INLINE void
-ACE_Reactor::max_notify_iterations (int iterations)
-{
- this->implementation ()->max_notify_iterations (iterations);
-}
-
-ACE_INLINE int
-ACE_Reactor::max_notify_iterations (void)
-{
- return this->implementation ()->max_notify_iterations ();
-}
-
-ACE_INLINE int
-ACE_Reactor::handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Event_Handler **event_handler)
-{
- return this->implementation ()->handler (handle,
- mask,
- event_handler);
-}
-
-ACE_INLINE int
-ACE_Reactor::handler (int signum,
- ACE_Event_Handler **event_handler)
-{
- return this->implementation ()->handler (signum,
- event_handler);
-}
-
-ACE_INLINE int
-ACE_Reactor::initialized (void)
-{
- return this->implementation ()->initialized ();
-}
-
-ACE_INLINE ACE_Lock &
-ACE_Reactor::lock (void)
-{
- return this->implementation ()->lock ();
-}
-
-ACE_INLINE void
-ACE_Reactor::wakeup_all_threads (void)
-{
- this->implementation ()->wakeup_all_threads ();
-}
-
-ACE_INLINE int
-ACE_Reactor::owner (ACE_thread_t new_owner,
- ACE_thread_t *old_owner)
-{
- return this->implementation ()->owner (new_owner,
- old_owner);
-}
-
-ACE_INLINE int
-ACE_Reactor::owner (ACE_thread_t *owner)
-{
- return this->implementation ()->owner (owner);
-}
-
-ACE_INLINE int
-ACE_Reactor::restart (void)
-{
- return this->implementation ()->restart ();
-}
-
-ACE_INLINE int
-ACE_Reactor::restart (int r)
-{
- return this->implementation ()->restart (r);
-}
-
-ACE_INLINE void
-ACE_Reactor::requeue_position (int position)
-{
- this->implementation ()->requeue_position (position);
-}
-
-ACE_INLINE int
-ACE_Reactor::requeue_position (void)
-{
- return this->implementation ()->requeue_position ();
-}
-
-
-ACE_INLINE int
-ACE_Reactor::mask_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int ops)
-{
- return this->implementation ()->mask_ops (event_handler,
- mask,
- ops);
-}
-
-ACE_INLINE int
-ACE_Reactor::mask_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops)
-{
- return this->implementation ()->mask_ops (handle,
- mask,
- ops);
-}
-
-ACE_INLINE int
-ACE_Reactor::ready_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int ops)
-{
- return this->implementation ()->ready_ops (event_handler,
- mask,
- ops);
-}
-
-ACE_INLINE int
-ACE_Reactor::ready_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops)
-{
- return this->implementation ()->ready_ops (handle,
- mask,
- ops);
-}
-
-ACE_INLINE size_t
-ACE_Reactor::size (void)
-{
- return this->implementation ()->size ();
-}
-
-ACE_INLINE int
-ACE_Reactor::uses_event_associations (void)
-{
- return this->implementation ()->uses_event_associations ();
-}
diff --git a/ace/Reactor_Impl.h b/ace/Reactor_Impl.h
deleted file mode 100644
index 2f84a748d12..00000000000
--- a/ace/Reactor_Impl.h
+++ /dev/null
@@ -1,465 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Reactor_Impl.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_REACTOR_IMPL_H
-#define ACE_REACTOR_IMPL_H
-#include "ace/pre.h"
-
-// Timer Queue is a complicated template class. A simple forward
-// declaration will not work
-#include "ace/Timer_Queue.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Event_Handler.h contains the definition of ACE_Reactor_Mask
-#include "ace/Event_Handler.h"
-
-// We are using 4 or 5 signal classes, we could forward declare
-// them.... But Timer_Queue_T.h includes Signal.h, so I don't think
-// forward declaration will be useful here
-#include "ace/Signal.h"
-
-// Forward decls
-class ACE_Handle_Set;
-class ACE_Reactor_Impl;
-
-class ACE_Export ACE_Reactor_Notify : public ACE_Event_Handler
-{
- // = TITLE
- // Abstract class for unblocking an <ACE_Reactor_Impl> from its
- // event loop.
-public:
- // = Initialization and termination methods.
- virtual int open (ACE_Reactor_Impl *,
- ACE_Timer_Queue *timer_queue = 0,
- int disable_notify = 0) = 0;
- virtual int close (void) = 0;
-
- virtual ssize_t notify (ACE_Event_Handler * = 0,
- ACE_Reactor_Mask = ACE_Event_Handler::EXCEPT_MASK,
- ACE_Time_Value * = 0) = 0;
- // Called by a thread when it wants to unblock the <Reactor_Impl>.
- // This wakeups the <Reactor_Impl> if currently blocked. Pass over
- // both the <Event_Handler> *and* the <mask> to allow the caller to
- // dictate which <Event_Handler> method the <Reactor_Impl> will
- // invoke. The <ACE_Time_Value> indicates how long to blocking
- // trying to notify the <Reactor_Impl>. If <timeout> == 0, the
- // caller will block until action is possible, else will wait until
- // the relative time specified in *<timeout> elapses).
-
- virtual int dispatch_notifications (int &number_of_active_handles,
- ACE_Handle_Set &rd_mask) = 0;
- // Handles pending threads (if any) that are waiting to unblock the
- // <Reactor_Impl>.
-
- virtual void max_notify_iterations (int) = 0;
- // Set the maximum number of times that the <handle_input> method
- // will iterate and dispatch the <ACE_Event_Handlers> that are
- // passed in via the notify queue before breaking out of the event
- // loop. By default, this is set to -1, which means "iterate until
- // the queue is empty." Setting this to a value like "1 or 2" will
- // increase "fairness" (and thus prevent starvation) at the expense
- // of slightly higher dispatching overhead.
-
- virtual int max_notify_iterations (void) = 0;
- // Get the maximum number of times that the <handle_input> method
- // will iterate and dispatch the <ACE_Event_Handlers> that are
- // passed in via the notify queue before breaking out of its event
- // loop.
-
- virtual void dump (void) const = 0;
- // Dump the state of an object.
-};
-
-class ACE_Export ACE_Reactor_Impl
-{
- // = TITLE
- // An abstract class for implementing the Reactor Pattern.
-public:
- virtual ~ACE_Reactor_Impl (void) {}
- // Close down and release all resources.
-
- virtual int open (size_t size,
- int restart = 0,
- ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0,
- int disable_notify_pipe = 0,
- ACE_Reactor_Notify * = 0) = 0;
- // Initialization.
-
- virtual int current_info (ACE_HANDLE, size_t & /* size */) = 0;
- // Returns 0, if the size of the current message has been put in
- // <size> Returns -1, if not. ACE_HANDLE allows the reactor to
- // check if the caller is valid.
-
- virtual int set_sig_handler (ACE_Sig_Handler *signal_handler) = 0;
- // Use a user specified signal handler instead.
-
- virtual int set_timer_queue (ACE_Timer_Queue *timer_queue) = 0;
- // Use a user specified timer queue instead.
-
- virtual int close (void) = 0;
- // Close down and release all resources.
-
- // = Event loop drivers.
- virtual int work_pending (const ACE_Time_Value &max_wait_time = ACE_Time_Value::zero) = 0;
- // Returns non-zero if there are I/O events "ready" for dispatching,
- // but does not actually dispatch the event handlers. By default,
- // don't block while checking this, i.e., "poll".
-
- virtual int handle_events (ACE_Time_Value *max_wait_time = 0) = 0;
- virtual int alertable_handle_events (ACE_Time_Value *max_wait_time = 0) = 0;
- // This event loop driver blocks for up to <max_wait_time> before
- // returning. It will return earlier if events occur. Note that
- // <max_wait_time> can be 0, in which case this method blocks
- // indefinitely until events occur.
- //
- // <max_wait_time> is decremented to reflect how much time this call
- // took. For instance, if a time value of 3 seconds is passed to
- // handle_events and an event occurs after 2 seconds,
- // <max_wait_time> will equal 1 second. This can be used if an
- // application wishes to handle events for some fixed amount of
- // time.
- //
- // Returns the total number of <ACE_Event_Handler>s that were
- // dispatched, 0 if the <max_wait_time> elapsed without dispatching
- // any handlers, or -1 if an error occurs.
- //
- // The only difference between <alertable_handle_events> and
- // <handle_events> is that in the alertable case, the eventloop will
- // return when the system queues an I/O completion routine or an
- // Asynchronous Procedure Call.
-
- virtual int handle_events (ACE_Time_Value &max_wait_time) = 0;
- virtual int alertable_handle_events (ACE_Time_Value &max_wait_time) = 0;
- // This method is just like the one above, except the
- // <max_wait_time> value is a reference and can therefore never be
- // NULL.
- //
- // The only difference between <alertable_handle_events> and
- // <handle_events> is that in the alertable case, the eventloop will
- // return when the system queues an I/O completion routine or an
- // Asynchronous Procedure Call.
-
- // = Event handling control.
-
- virtual int deactivated (void) = 0;
- // Return the status of Reactor. If this function returns 0, the reactor is
- // actively handling events. If it returns non-zero, <handling_events> and
- // <handle_alertable_events> return -1 immediately.
-
- virtual void deactivate (int do_stop) = 0;
- // Control whether the Reactor will handle any more incoming events or not.
- // If <do_stop> == 1, the Reactor will be disabled. By default, a reactor
- // is in active state and can be deactivated/reactived as wish.
-
- // = Register and remove Handlers.
-
- virtual int register_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask) = 0;
- // Register <event_handler> with <mask>. The I/O handle will always
- // come from <get_handle> on the <event_handler>.
-
- virtual int register_handler (ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask) = 0;
- // Register <event_handler> with <mask>. The I/O handle is provided
- // through the <io_handle> parameter.
-
-#if defined (ACE_WIN32)
-
- // Originally this interface was available for all platforms, but
- // because ACE_HANDLE is an int on non-Win32 platforms, compilers
- // are not able to tell the difference between
- // register_handler(ACE_Event_Handler*,ACE_Reactor_Mask) and
- // register_handler(ACE_Event_Handler*,ACE_HANDLE). Therefore, we
- // have restricted this method to Win32 only.
-
- virtual int register_handler (ACE_Event_Handler *event_handler,
- ACE_HANDLE event_handle = ACE_INVALID_HANDLE) = 0;
- // Register an <event_handler> that will be notified when
- // <event_handle> is signaled. Since no event mask is passed
- // through this interface, it is assumed that the <event_handle>
- // being passed in is an event handle and not an I/O handle.
-
-#endif /* ACE_WIN32 */
-
- virtual int register_handler (ACE_HANDLE event_handle,
- ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask) = 0;
- // Register an <event_handler> that will be notified when
- // <event_handle> is signaled. <mask> specifies the network events
- // that the <event_handler> is interested in.
-
- virtual int register_handler (const ACE_Handle_Set &handles,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask) = 0;
- // Register <event_handler> with all the <handles> in the <Handle_Set>.
-
- virtual int register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0,
- ACE_Event_Handler **old_sh = 0,
- ACE_Sig_Action *old_disp = 0) = 0;
- // Register <new_sh> to handle the signal <signum> using the
- // <new_disp>. Returns the <old_sh> that was previously registered
- // (if any), along with the <old_disp> of the signal handler.
-
- virtual int register_handler (const ACE_Sig_Set &sigset,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0) = 0;
- // Registers <new_sh> to handle a set of signals <sigset> using the
- // <new_disp>.
-
- virtual int remove_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask) = 0;
- // Removes <event_handler>. Note that the I/O handle will be
- // obtained using <get_handle> method of <event_handler> . If
- // <mask> == <ACE_Event_Handler::DONT_CALL> then the <handle_close>
- // method of the <event_handler> is not invoked.
-
- virtual int remove_handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask) = 0;
- // Removes <handle>. If <mask> == <ACE_Event_Handler::DONT_CALL>
- // then the <handle_close> method of the associated <event_handler>
- // is not invoked.
-
- virtual int remove_handler (const ACE_Handle_Set &handle_set,
- ACE_Reactor_Mask mask) = 0;
- // Removes all handles in <handle_set>. If <mask> ==
- // <ACE_Event_Handler::DONT_CALL> then the <handle_close> method of
- // the associated <event_handler>s is not invoked.
-
- virtual int remove_handler (int signum,
- ACE_Sig_Action *new_disp,
- ACE_Sig_Action *old_disp = 0,
- int sigkey = -1) = 0;
- // Remove the ACE_Event_Handler currently associated with <signum>.
- // Install the new disposition (if given) and return the previous
- // disposition (if desired by the caller). Returns 0 on success and
- // -1 if <signum> is invalid.
-
- virtual int remove_handler (const ACE_Sig_Set &sigset) = 0;
- // Calls <remove_handler> for every signal in <sigset>.
-
- // = Suspend and resume Handlers.
-
- virtual int suspend_handler (ACE_Event_Handler *event_handler) = 0;
- // Suspend <event_handler> temporarily. Use
- // <ACE_Event_Handler::get_handle> to get the handle.
-
- virtual int suspend_handler (ACE_HANDLE handle) = 0;
- // Suspend <handle> temporarily.
-
- virtual int suspend_handler (const ACE_Handle_Set &handles) = 0;
- // Suspend all <handles> in handle set temporarily.
-
- virtual int suspend_handlers (void) = 0;
- // Suspend all <handles> temporarily.
-
- virtual int resume_handler (ACE_Event_Handler *event_handler) = 0;
- // Resume <event_handler>. Use <ACE_Event_Handler::get_handle> to
- // get the handle.
-
- virtual int resume_handler (ACE_HANDLE handle) = 0;
- // Resume <handle>.
-
- virtual int resume_handler (const ACE_Handle_Set &handles) = 0;
- // Resume all <handles> in handle set.
-
- virtual int resume_handlers (void) = 0;
- // Resume all <handles>.
-
- virtual int uses_event_associations (void) = 0;
- // Return 1 if we any event associations were made by the reactor
- // for the handles that it waits on, 0 otherwise.
-
- // If we need to reset handles returned from accept/connect.
-
- // = Timer management.
-
- virtual long schedule_timer (ACE_Event_Handler *event_handler,
- const void *arg,
- const ACE_Time_Value &delta,
- const ACE_Time_Value &interval = ACE_Time_Value::zero) = 0;
- // Schedule an <event_handler> that will expire after <delay> amount
- // of time, which is specified as relative time to the current
- // <gettimeofday>. If it expires then <arg> is passed in as the
- // value to the <event_handler>'s <handle_timeout> callback method.
- // If <interval> is != to <ACE_Time_Value::zero> then it is used to
- // reschedule the <event_handler> automatically, also using relative
- // time. This method returns a <timer_id> that uniquely identifies
- // the <event_handler> in an internal list. This <timer_id> can be
- // used to cancel an <event_handler> before it expires. The
- // cancellation ensures that <timer_ids> are unique up to values of
- // greater than 2 billion timers. As long as timers don't stay
- // around longer than this there should be no problems with
- // accidentally deleting the wrong timer. Returns -1 on failure
- // (which is guaranteed never to be a valid <timer_id>.
-
- virtual int reset_timer_interval (long timer_id,
- const ACE_Time_Value &interval) = 0;
- // Resets the interval of the timer represented by <timer_id> to
- // <interval>, which is specified in relative time to the current
- // <gettimeofday>. If <interval> is equal to
- // <ACE_Time_Value::zero>, the timer will become a non-rescheduling
- // timer. Returns 0 if successful, -1 if not.
-
- virtual int cancel_timer (ACE_Event_Handler *event_handler,
- int dont_call_handle_close = 1) = 0;
- // Cancel all Event_Handlers that match the address of
- // <event_handler>. Returns number of handlers cancelled.
-
- virtual int cancel_timer (long timer_id,
- const void **arg = 0,
- int dont_call_handle_close = 1) = 0;
- // Cancel the single Event_Handler that matches the <timer_id> value
- // (which was returned from the schedule method). If arg is
- // non-NULL then it will be set to point to the ``magic cookie''
- // argument passed in when the Event_Handler was registered. This
- // makes it possible to free up the memory and avoid memory leaks.
- // Returns 1 if cancellation succeeded and 0 if the <timer_id>
- // wasn't found.
-
- // = High-level Event_Handler scheduling operations
-
- virtual int schedule_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_added) = 0;
- // Add <masks_to_be_added> to the <event_handler>'s entry.
- // <event_handler> must already have been registered.
-
- virtual int schedule_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask masks_to_be_added) = 0;
- // Add <masks_to_be_added> to the <handle>'s entry. <event_handler>
- // associated with <handle> must already have been registered.
-
- virtual int cancel_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_cleared) = 0;
- // Clear <masks_to_be_cleared> from the <event_handler>'s entry.
-
- virtual int cancel_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask masks_to_be_cleared) = 0;
- // Clear <masks_to_be_cleared> from the <handle>'s entry.
-
- // = Notification methods.
-
- virtual int notify (ACE_Event_Handler *event_handler = 0,
- ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK,
- ACE_Time_Value * = 0) = 0;
- // Notify <event_handler> of <mask> event. The <ACE_Time_Value>
- // indicates how long to blocking trying to notify. If <timeout> ==
- // 0, the caller will block until action is possible, else will wait
- // until the relative time specified in <timeout> elapses).
-
- virtual void max_notify_iterations (int) = 0;
- // Set the maximum number of times that ACE_Reactor_Impl will
- // iterate and dispatch the <ACE_Event_Handlers> that are passed in
- // via the notify queue before breaking out of its
- // <ACE_Message_Queue::dequeue> loop. By default, this is set to
- // -1, which means "iterate until the queue is empty." Setting this
- // to a value like "1 or 2" will increase "fairness" (and thus
- // prevent starvation) at the expense of slightly higher dispatching
- // overhead.
-
- virtual int max_notify_iterations (void) = 0;
- // Get the maximum number of times that the ACE_Reactor_Impl will
- // iterate and dispatch the <ACE_Event_Handlers> that are passed in
- // via the notify queue before breaking out of its
- // <ACE_Message_Queue::dequeue> loop.
-
- virtual int handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Event_Handler **event_handler = 0) = 0;
- // Check to see if <handle> is associated with a valid Event_Handler
- // bound to <mask>. Return the <event_handler> associated with this
- // <handler> if <event_handler> != 0.
-
- virtual int handler (int signum,
- ACE_Event_Handler ** = 0) = 0;
- // Check to see if <signum> is associated with a valid Event_Handler
- // bound to a signal. Return the <event_handler> associated with
- // this <handler> if <event_handler> != 0.
-
- virtual int initialized (void) = 0;
- // Returns true if Reactor has been successfully initialized, else
- // false.
-
- virtual size_t size (void) = 0;
- // Returns the current size of the Reactor's internal descriptor
- // table.
-
- virtual ACE_Lock &lock (void) = 0;
- // Returns a reference to the Reactor's internal lock.
-
- virtual void wakeup_all_threads (void) = 0;
- // Wake up all threads in waiting in the event loop
-
- virtual int owner (ACE_thread_t new_owner, ACE_thread_t *old_owner = 0) = 0;
- // Transfers ownership of Reactor_Impl to the <new_owner>.
-
- virtual int owner (ACE_thread_t *owner) = 0;
- // Return the ID of the "owner" thread.
-
- virtual int restart (void) = 0;
- // Get the existing restart value.
-
- virtual int restart (int r) = 0;
- // Set a new value for restart and return the original value.
-
- virtual void requeue_position (int) = 0;
- // Set position of the owner thread.
-
- virtual int requeue_position (void) = 0;
- // Get position of the owner thread.
-
- // = Low-level wait_set mask manipulation methods.
-
- virtual int mask_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int ops) = 0;
- // GET/SET/ADD/CLR the dispatch mask "bit" bound with the
- // <event_handler> and <mask>.
-
- virtual int mask_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops) = 0;
- // GET/SET/ADD/CLR the dispatch MASK "bit" bound with the <handle>
- // and <mask>.
-
- // = Low-level ready_set mask manipulation methods.
- virtual int ready_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int ops) = 0;
- // GET/SET/ADD/CLR the ready "bit" bound with the <event_handler>
- // and <mask>.
-
- virtual int ready_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask,
- int ops) = 0;
- // GET/SET/ADD/CLR the ready "bit" bound with the <handle> and <mask>.
-
- virtual void dump (void) const = 0;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#include "ace/post.h"
-#endif /* ACE_REACTOR_IMPL_H */
diff --git a/ace/Read_Buffer.cpp b/ace/Read_Buffer.cpp
deleted file mode 100644
index 1c599c31404..00000000000
--- a/ace/Read_Buffer.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-// $Id$
-
-#include "ace/Read_Buffer.h"
-#include "ace/Service_Config.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Read_Buffer.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Read_Buffer, "$Id$")
-
-void
-ACE_Read_Buffer::dump (void) const
-{
- ACE_TRACE ("ACE_Read_Buffer::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("size_ = %d"), this->size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\noccurrences_ = %d"), this->occurrences_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nstream_ = %x"), this->stream_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nallocator_ = %x"), this->allocator_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Read_Buffer::ACE_Read_Buffer (FILE *fp,
- int close_on_delete,
- ACE_Allocator *alloc)
- : stream_ (fp),
- close_on_delete_ (close_on_delete),
- allocator_ (alloc)
-{
- ACE_TRACE ("ACE_Read_Buffer::ACE_Read_Buffer");
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-}
-
-ACE_Read_Buffer::ACE_Read_Buffer (ACE_HANDLE handle,
- int close_on_delete,
- ACE_Allocator *alloc)
- : stream_ (ACE_OS::fdopen (handle, ACE_TEXT ("r"))),
- close_on_delete_ (close_on_delete),
- allocator_ (alloc)
-{
- ACE_TRACE ("ACE_Read_Buffer::ACE_Read_Buffer");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-}
-
-ACE_Read_Buffer::~ACE_Read_Buffer (void)
-{
- ACE_TRACE ("ACE_Read_Buffer::~ACE_Read_Buffer");
-
- if (this->close_on_delete_)
- ACE_OS::fclose (this->stream_);
-}
-
-// Input: term the character to terminate on
-// search the character to search for
-// replace the character with which to replace search
-// Output: a buffer containing the contents of stream
-// Method: call the recursive helper function read_helper
-
-char *
-ACE_Read_Buffer::read (int term, int search, int replace)
-{
- ACE_TRACE ("ACE_Read_Buffer::read");
- this->occurrences_ = 0;
- this->size_ = 0;
- return this->rec_read (term, search, replace);
-}
-
-// Input: term the termination character
-// search the character to search for
-// replace the character with which to replace search
-// Purpose: read in a file to a buffer using only a single dynamic
-// allocation.
-// Method: read until the local buffer is full and then recurse.
-// Must continue until the termination character is reached.
-// Allocate the final buffer based on the number of local
-// buffers read and as the recursive calls bottom out,
-// copy them in reverse order into the allocated buffer.
-
-char *
-ACE_Read_Buffer::rec_read (int term, int search, int replace)
-{
- ACE_TRACE ("ACE_Read_Buffer::rec_read");
- // This is our temporary workspace.
- char buf[BUFSIZ];
-
- int c = EOF;
- size_t slot = 0;
- int done = 0;
-
- // Read in the file char by char
- while (slot < BUFSIZ)
- {
- c = getc (this->stream_);
-
- // Don't insert EOF into the buffer...
- if (c == EOF)
- {
- if (slot == 0)
- return 0;
- else
- {
- ungetc (c, this->stream_);
- break;
- }
- }
- else if (c == term)
- done = 1;
-
- // Check for possible substitutions.
- if (c == search)
- {
- this->occurrences_++;
-
- if (replace >= 0)
- c = replace;
- }
-
- buf[slot++] = (char) c;
-
- // Substitutions must be made before checking for termination.
- if (done)
- break;
- }
-
- // Increment the number of bytes.
- this->size_ += slot;
-
- char *result;
-
- // Recurse, when the recursion bottoms out, allocate the result
- // buffer.
- if (done || c == EOF)
- {
- // Use the allocator to acquire the memory. The + 1 allows
- // space for the null terminator.
- result = (char *) this->allocator_->malloc (this->size_ + 1);
-
- if (result == 0)
- {
- errno = ENOMEM;
- return 0;
- }
- result += this->size_;
-
- // Null terminate the buffer.
- *result = '\0';
- }
- else if ((result = this->rec_read (term, search, replace)) == 0)
- return 0;
-
-
- // Copy buf into the appropriate location starting from end of
- // buffer. Peter says this is confusing and that we should use
- // memcpy() ;-)
- for (size_t j = slot; j > 0; j--)
- *--result = buf[j - 1];
-
- return result;
-}
diff --git a/ace/Read_Buffer.h b/ace/Read_Buffer.h
deleted file mode 100644
index 84688f9bc0c..00000000000
--- a/ace/Read_Buffer.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Read_Buffer.h
-//
-// = AUTHOR
-// Doug Schmidt and Seth Widoff
-//
-// ============================================================================
-
-#ifndef ACE_READ_BUFFER_H
-#define ACE_READ_BUFFER_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Malloc.h"
-
-class ACE_Export ACE_Read_Buffer
-{
- // = TITLE
- // Efficiently reads an artibrarily large buffer from an input
- // stream up to and including a termination character. Also
- // performs search/replace on single occurrences a character in
- // the buffer using the principles of Integrated Layer
- // Processing.
- //
- // = DESCRIPTION
- // This implementation is optimized to do a single dynamic
- // allocation and make only one copy of the data. It uses
- // recursion and the run-time stack to accomplish this
- // efficiently.
-public:
- // = Initialization and termination methods.
- ACE_Read_Buffer (FILE *fp,
- int close_on_delete = 0,
- ACE_Allocator * = 0);
- // Read from a FILE *.
-
- ACE_Read_Buffer (ACE_HANDLE handle,
- int close_on_delete = 0,
- ACE_Allocator * = 0);
- // Read from an open HANDLE.
-
- ~ACE_Read_Buffer (void);
- // Closes the FILE *.
-
- char *read (int terminator = EOF,
- int search = '\n',
- int replace = '\0');
- // Returns a pointer dynamically allocated with
- // <ACE_Allocator::malloc> to data from the input stream up to (and
- // including) the <terminator>. If <search> is >= 0 then all
- // occurrences of the <search> value are substituted with the
- // <replace> value. The last of the byte of data is a 0, so that
- // <strlen> can be used on it. The caller is responsible for
- // freeing the pointer returned from this method using the
- // <ACE_Allocator::free>.
-
- size_t replaced (void) const;
- // Returns the number of characters replaced during a <read>.
-
- size_t size (void) const;
- // Returns the size of the allocated buffer obtained during a
- // <read>, not including the null terminator.
-
- ACE_Allocator *alloc (void) const;
- // Returns a pointer to its allocator.
-
- void dump (void) const;
- // Dump the state of the object.
-
-private:
- char *rec_read (int term, int search, int replace);
- // Recursive helper method that does the work...
-
- size_t size_;
- // The total number of characters in the buffer.
-
- size_t occurrences_;
- // The total number of characters replaced.
-
- FILE *stream_;
- // The stream we are reading from.
-
- int close_on_delete_;
- // Keeps track of whether we should close the FILE in the
- // destructor.
-
- ACE_Allocator *allocator_;
- // Pointer to the allocator.
-
- // = Disallow copying and assignment...
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Read_Buffer &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Read_Buffer (const ACE_Read_Buffer &))
-};
-
-#if defined (__ACE_INLINE__)
-# include "ace/Read_Buffer.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_READ_BUFFER_H */
diff --git a/ace/Read_Buffer.i b/ace/Read_Buffer.i
deleted file mode 100644
index 3534c62db2e..00000000000
--- a/ace/Read_Buffer.i
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Accessor to the number of bytes in the buffer.
-
-ACE_INLINE size_t
-ACE_Read_Buffer::size (void) const
-{
- ACE_TRACE ("ACE_Read_Buffer::size");
- return this->size_;
-}
-
-// The total number of characters replaced.
-
-ACE_INLINE size_t
-ACE_Read_Buffer::replaced (void) const
-{
- ACE_TRACE ("ACE_Read_Buffer::replaced");
- return this->occurrences_;
-}
-
-ACE_INLINE ACE_Allocator *
-ACE_Read_Buffer::alloc (void) const
-{
- ACE_TRACE ("ACE_Read_Buffer::alloc");
- return this->allocator_;
-}
-
diff --git a/ace/Registry.cpp b/ace/Registry.cpp
deleted file mode 100644
index aa8e79ec7e7..00000000000
--- a/ace/Registry.cpp
+++ /dev/null
@@ -1,1126 +0,0 @@
-// $Id$
-
-#include "ace/Registry.h"
-
-ACE_RCSID(ace, Registry, "$Id$")
-
-#if defined (ACE_WIN32)
-
-// Funky macro to deal with strange error passing semantics
-// of Win32 Reg*() functions
-#define ACE_REGISTRY_CALL_RETURN(X) \
- do { \
- if (X != ERROR_SUCCESS) \
- { \
- errno = X; \
- return -1; \
- } \
- else \
- return 0; \
- } while (0)
-
-
-// Separator for components in a name
-/* static */
-const ACE_TCHAR *ACE_Registry::STRING_SEPARATOR = ACE_TEXT ("\\");
-
-int
-ACE_Registry::Name_Component::operator== (const Name_Component &rhs) const
-{
- return
- rhs.id_ == this->id_ &&
- rhs.kind_ == this->kind_;
-}
-
-int
-ACE_Registry::Name_Component::operator!= (const Name_Component &rhs) const
-{
- return !this->operator== (rhs);
-}
-
-// Simple binding constructor
-ACE_Registry::Binding::Binding ()
- : name_ (),
- type_ (INVALID)
-{
-}
-
-
-// Binding constructor
-// (Name version)
-ACE_Registry::Binding::Binding (const Name &name,
- Binding_Type type)
- : name_ (ACE_Registry::make_string (name)),
- type_ (type)
-{
-}
-
-
-// Binding constructor
-// (String version)
-ACE_Registry::Binding::Binding (const ACE_TString &name,
- Binding_Type type)
- : name_ (name),
- type_ (type)
-{
-}
-
-
-int
-ACE_Registry::Binding::operator== (const Binding &rhs) const
-{
- return
- rhs.name_ == this->name_ &&
- rhs.type_ == this->type_;
-}
-
-int
-ACE_Registry::Binding::operator!= (const Binding &rhs) const
-{
- return !this->operator== (rhs);
-}
-
-// Name accessor
-// (Name version)
-void
-ACE_Registry::Binding::name (Name &name)
-{
- name = ACE_Registry::make_name (this->name_);
-}
-
-
-// Name accessors
-// (String version)
-void
-ACE_Registry::Binding::name (ACE_TString &name)
-{
- name = this->name_;
-}
-
-
-// Name accessors
-// (String version)
-ACE_TString
-ACE_Registry::Binding::name (void)
-{
- return this->name_;
-}
-
-
-// Type accessor
-ACE_Registry::Binding_Type
-ACE_Registry::Binding::type (void)
-{
- return this->type_;
-}
-
-
-// Simple object constructor
-ACE_Registry::Object::Object (void *data,
- u_long size,
- u_long type)
- : data_ (data),
- size_ (size),
- type_ (type)
-{
-}
-
-// Object accessors and set methods
-void
-ACE_Registry::Object::data (void *data)
-{
- this->data_ = data;
-}
-
-
-void *
-ACE_Registry::Object::data (void) const
-{
- return this->data_;
-}
-
-
-void
-ACE_Registry::Object::size (u_long size)
-{
- this->size_ = size;
-}
-
-
-u_long
-ACE_Registry::Object::size (void) const
-{
- return this->size_;
-}
-
-
-void
-ACE_Registry::Object::type (u_long type)
-{
- this->type_ = type;
-}
-
-
-u_long
-ACE_Registry::Object::type (void) const
-{
- return this->type_;
-}
-
-
-// Simple context constructor
-ACE_Registry::Naming_Context::Naming_Context (void)
- : key_ ((HKEY) 0),
- parent_key_ ((HKEY) 0),
- name_ ()
-{
-}
-
-
-// Context constructor
-ACE_Registry::Naming_Context::Naming_Context (const HKEY &key)
- : key_ (key),
- parent_key_ ((HKEY) 0),
- name_ ()
-{
-}
-
-
-ACE_Registry::Naming_Context::Naming_Context (const Naming_Context &rhs)
- : key_ (rhs.key_),
- parent_key_ (rhs.parent_key_),
- name_ (rhs.name_)
-{
- // This is incorrect.
- // Rather than copying key, we should call ::DuplicateHandle()
- // But since this is private (and not used), I don't care much
-}
-
-
-const ACE_Registry::Naming_Context &
-ACE_Registry::Naming_Context::operator= (const Naming_Context &rhs)
-{
- ACE_UNUSED_ARG(rhs);
-
- // Not implemented
- return *this;
-}
-
-
-// Destructor
-ACE_Registry::Naming_Context::~Naming_Context ()
-{
- this->close ();
-}
-
-
-// Insert <object> with <name> into <this> context
-// (Name version)
-int
-ACE_Registry::Naming_Context::bind_new (const Name &name,
- const Object &object)
-{
- return this->bind_new (ACE_Registry::make_string (name), object);
-}
-
-
-// Insert <object> with <name> into <this> context
-// (String version)
-int
-ACE_Registry::Naming_Context::bind_new (const ACE_TString &name,
- const Object &object)
-{
- // temporary object
- Object temp;
- long result = this->resolve (name, temp);
- if (result == 0)
- // resolve succeeded
- result = -1;
- else
- // resolve failed
- result = this->bind (name, object);
- return result;
-}
-
-
-// Insert or update <object> with <name> into <this> context
-// (Name version)
-int
-ACE_Registry::Naming_Context::bind (const Name &name,
- const Object &object)
-{
- return this->bind (ACE_Registry::make_string (name), object);
-}
-
-
-// Insert or update <object> with <name> into <this> context
-// (String version)
-int
-ACE_Registry::Naming_Context::bind (const ACE_TString &name,
- const Object &object)
-{
- long result = ACE_TEXT_RegSetValueEx (this->key_,
- name.c_str (),
- 0,
- object.type (),
- (const BYTE *) object.data (),
- object.size ());
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-
-// Update <object> with <name> in <this> context
-// (Name version)
-int
-ACE_Registry::Naming_Context::rebind (const Name &name,
- const Object &new_object)
-{
- return this->rebind (ACE_Registry::make_string (name), new_object);
-}
-
-
-// Update <object> with <name> in <this> context
-// (String version)
-int
-ACE_Registry::Naming_Context::rebind (const ACE_TString &name,
- const Object &new_object)
-{
- Object old_object;
- // find the old one first
- long result = this->resolve (name, old_object);
- if (result == 0)
- // no need to delete first
- result = this->bind (name, new_object);
- return result;
-}
-
-
-// Find <object> with <name> in <this> context
-// (Name version)
-int
-ACE_Registry::Naming_Context::resolve (const Name &name,
- Object &object)
-{
- return this->resolve (ACE_Registry::make_string (name), object);
-}
-
-
-// Find <object> with <name> in <this> context
-// (String version)
-int
-ACE_Registry::Naming_Context::resolve (const ACE_TString &name,
- Object &object)
-{
- // Get object state
- u_long type;
- void *data = object.data ();
- u_long size = object.size ();
-
- long result = ACE_TEXT_RegQueryValueEx (this->key_,
- name.c_str (),
- 0,
- &type,
- (BYTE *)data,
- &size);
- if (result == ERROR_SUCCESS)
- {
- // Reset object state
- // No need to set object.data()
- object.type (type);
- object.size (size);
- }
-
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-
-// Remove object with <name> in <this> context
-// (Name version)
-int
-ACE_Registry::Naming_Context::unbind (const Name &name)
-{
- return this->unbind (ACE_Registry::make_string (name));
-}
-
-
-// Remove object with <name> in <this> context
-// (String version)
-int
-ACE_Registry::Naming_Context::unbind (const ACE_TString &name)
-{
- long result = ACE_TEXT_RegDeleteValue (this->key_,
- name.c_str ());
-
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-
-// Create new <naming_context> relative to <this> context
-// This method may not mean a lot in this implementation
-int
-ACE_Registry::Naming_Context::new_context (Naming_Context &naming_context)
-{
- // Make sure that we reset the state and close keys
- return naming_context.close ();
-}
-
-
-// Insert <naming_context> with <name> relative to <this> context
-// (Name version)
-int
-ACE_Registry::Naming_Context::bind_new_context (const Name &name,
- Naming_Context &naming_context,
- u_long persistence,
- u_long security_access,
- LPSECURITY_ATTRIBUTES security_attributes)
-{
- return this->bind_new_context (ACE_Registry::make_string (name),
- naming_context,
- persistence,
- security_access,
- security_attributes);
-}
-
-
-// Insert <naming_context> with <name> relative to <this> context
-// (String version)
-int
-ACE_Registry::Naming_Context::bind_new_context (const ACE_TString &name,
- Naming_Context &naming_context,
- u_long persistence,
- u_long security_access,
- LPSECURITY_ATTRIBUTES security_attributes)
-{
- u_long reason;
-
- long result = ACE_TEXT_RegCreateKeyEx (this->key_,
- name.c_str (),
- 0,
- 0,
- persistence,
- security_access,
- security_attributes,
- &naming_context.key_,
- &reason);
- if (result == ERROR_SUCCESS)
- // If create succeeds
- {
- if (reason == REG_CREATED_NEW_KEY)
- // If new key: success
- {
- // Set the correct parent
- naming_context.parent (this->key_);
- // Set the correct name
- naming_context.name (name);
- }
- else
- // reason == REG_OPENED_EXISTING_KEY
- // Failed to make new key
- {
- // reset result to failure
- result = -1;
- // Close the key first
- ::RegCloseKey (naming_context.key_);
- // Reset key
- naming_context.key_ = (HKEY) 0;
- }
- }
-
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-
-// Insert or update <naming_context> with <name> relative to <this> context
-// (Name version)
-int
-ACE_Registry::Naming_Context::bind_context (const Name &name,
- /* const */ Naming_Context &naming_context,
- u_long persistence,
- u_long security_access,
- LPSECURITY_ATTRIBUTES security_attributes)
-{
- return this->bind_context (ACE_Registry::make_string (name),
- naming_context,
- persistence,
- security_access,
- security_attributes);
-}
-
-
-// Insert or update <naming_context> with <name> relative to <this> context
-// (String version)
-int
-ACE_Registry::Naming_Context::bind_context (const ACE_TString &name,
- /* const */ Naming_Context &naming_context,
- u_long persistence,
- u_long security_access,
- LPSECURITY_ATTRIBUTES security_attributes)
-{
- u_long reason;
-
- long result = ACE_TEXT_RegCreateKeyEx (this->key_,
- name.c_str (),
- 0,
- 0,
- persistence,
- security_access,
- security_attributes,
- &naming_context.key_,
- &reason);
- if (result == ERROR_SUCCESS)
- {
- // Set the correct parent
- naming_context.parent (this->key_);
- // Set the correct name
- naming_context.name (name);
- }
-
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-
-// Rename <naming_context> to <name>
-// (Name version)
-int
-ACE_Registry::Naming_Context::rebind_context (const Name &name,
- /* const */ Naming_Context &new_naming_context)
-{
- return this->rebind_context (ACE_Registry::make_string (name),
- new_naming_context);
-}
-
-
-// Rename <naming_context> to <name>
-// (String version)
-int
-ACE_Registry::Naming_Context::rebind_context (const ACE_TString &name,
- /* const */ Naming_Context &new_naming_context)
-{
- Naming_Context old_naming_context;
- // find the old one first
- long result = this->resolve_context (name,
- old_naming_context);
- if (result == 0)
- {
- // naming_context is found: delete entry
- result = this->unbind_context (name);
- if (result == 0)
- {
- // successful deletion; rebind
- // beware of race conditions here
- // (lets resolve this later)
- result = this->bind_new_context (name, new_naming_context);
- }
- }
- return result;
-}
-
-
-// Remove naming_context with <name> from <this> context
-// (Name version)
-int
-ACE_Registry::Naming_Context::unbind_context (const Name &name)
-{
- return this->unbind_context (ACE_Registry::make_string (name));
-}
-
-
-// Remove naming_context with <name> from <this> context
-// (String version)
-int
-ACE_Registry::Naming_Context::unbind_context (const ACE_TString &name)
-{
- long result = ACE_TEXT_RegDeleteKey (this->key_,
- name.c_str ());
-
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-
-// Find <naming_context> with <name> in <this> context
-// (Name version)
-int
-ACE_Registry::Naming_Context::resolve_context (const Name &name,
- Naming_Context &naming_context,
- u_long security_access)
-{
- return this->resolve_context (ACE_Registry::make_string (name),
- naming_context,
- security_access);
-}
-
-
-// Find <naming_context> with <name> in <this> context
-// (String version)
-int
-ACE_Registry::Naming_Context::resolve_context (const ACE_TString &name,
- Naming_Context &naming_context,
- u_long security_access)
-{
- long result = ACE_TEXT_RegOpenKeyEx (this->key_,
- name.c_str (),
- 0,
- security_access,
- &naming_context.key_);
- if (result == ERROR_SUCCESS)
- {
- // set the correct parent
- naming_context.parent (this->key_);
- // set the correct name
- naming_context.name (name);
- }
-
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-
-// Same as unbind_context() with <this> as naming_context
-int
-ACE_Registry::Naming_Context::destroy (void)
-{
- // hopefully the parent_key_ is still open
- long result = ACE_TEXT_RegDeleteKey (this->parent_key_,
- this->name_.c_str ());
-
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-
-// Sync content of context to disk
-int
-ACE_Registry::Naming_Context::flush (void)
-{
- long result = ::RegFlushKey (this->key_);
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-
-// Close the handle of the context
-int
-ACE_Registry::Naming_Context::close (void)
-{
- long result = this->key_ ? ::RegCloseKey (this->key_) : ERROR_SUCCESS;
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-
-// Convert a <name> to a <string>
-ACE_TString
-ACE_Registry::make_string (const Name &const_name)
-{
- ACE_TString string;
- Name &name = ACE_const_cast (Name &, const_name);
-
- // Iterator through the components of name
- for (Name::iterator iterator = name.begin ();
- iterator != name.end ();
- iterator++)
- {
- if (iterator != name.begin ())
- // If this is not the first component, we will add separators
- string += ACE_Registry::STRING_SEPARATOR;
- const Name_Component &component = *iterator;
- // Add to string
- string += component.id_;
- }
-
- return string;
-}
-
-
-// Convert a <string> to a <name>
-ACE_Registry::Name
-ACE_Registry::make_name (const ACE_TString &string)
-{
- int new_position = 0;
- int last_position = 0;
- Name name;
-
- // Rememeber: NPOS is -1
- while (new_position != ACE_TString::npos)
- {
- Name_Component component;
- // Find the separator
- new_position = string.find (ACE_Registry::STRING_SEPARATOR, new_position);
- if (new_position != ACE_TString::npos)
- // If we have not gone past the end
- {
- // Get the substring
- component.id_ = string.substr (last_position,
- new_position - last_position);
- // Skip past the seperator
- new_position += ACE_OS::strlen (ACE_Registry::STRING_SEPARATOR);
- }
- else
- {
- // Get the last substring
- component.id_ = string.substr (last_position);
- }
- // Update positions
- last_position = new_position;
- // Insert component into name
- name.insert (component);
- }
-
- return name;
-}
-
-
-// Set key
-void
-ACE_Registry::Naming_Context::key (HKEY key)
-{
- this->key_ = key;
-}
-
-
-// Get key
-HKEY
-ACE_Registry::Naming_Context::key (void)
-{
- return this->key_;
-}
-
-
-// Set parent
-void
-ACE_Registry::Naming_Context::parent (HKEY parent)
-{
- this->parent_key_ = parent;
-}
-
-
-// Get parent
-HKEY
-ACE_Registry::Naming_Context::parent (void)
-{
- return this->parent_key_;
-}
-
-
-// Set name
-// (Name version)
-void
-ACE_Registry::Naming_Context::name (const Name &name)
-{
- this->name_ = ACE_Registry::make_string (name);
-}
-
-
-// Get name
-// (Name version)
-void
-ACE_Registry::Naming_Context::name (Name &name)
-{
- name = ACE_Registry::make_name (this->name_);
-}
-
-
-// Set name
-// (String version)
-void
-ACE_Registry::Naming_Context::name (const ACE_TString &name)
-{
- this->name_ = name;
-}
-
-
-// Get name
-// (String version)
-ACE_TString
-ACE_Registry::Naming_Context::name (void)
-{
- return this->name_;
-}
-
-
-// Get name
-// (String version)
-void
-ACE_Registry::Naming_Context::name (ACE_TString &name)
-{
- name = this->name_;
-}
-
-
-// listing function: iterator creator
-// This is useful when there are many objects and contexts
-// in <this> context and you only want to look at a few entries
-// at a time
-int
-ACE_Registry::Naming_Context::list (u_long how_many,
- Binding_List &list,
- Binding_Iterator &iter)
-{
- // Empty list
- static const ACE_Registry::Binding_List empty_list;
- // Make sure that the list is empty
- list = empty_list;
-
- // Correctly initalize the iterator
- iter.reset ();
-
- // Make sure that the iterator uses <this> naming context
- iter.naming_context (*this);
-
- // Start iterations from the objects
- iter.current_enumeration (iter.object_iteration_);
-
- // Get the next <how_many> values
- long result = iter.next_n (how_many,
- list);
- return result;
-}
-
-
-// listing function: iterator creator
-// This gives back a listing of all entries in <this> context.
-int
-ACE_Registry::Naming_Context::list (Binding_List &list)
-{
- // Empty list
- static const ACE_Registry::Binding_List empty_list;
- // Make sure that the list is empty
- list = empty_list;
-
- // Create an iterator
- ACE_Registry::Binding_Iterator iterator;
-
- // Make sure that the iterator uses <this> naming context
- iterator.naming_context (*this);
-
- // Start iterations from the objects
- iterator.current_enumeration (iterator.object_iteration_);
-
- long result = 0;
- while (1)
- {
- ACE_Registry::Binding binding;
- result = iterator.next_one (binding);
- if (result == 0)
- list.insert (binding);
- else
- break;
- }
- return 0;
-}
-
-
-// Default constructor
-ACE_Registry::Binding_Iterator::Binding_Iterator ()
- : iteration_complete_ (*this),
- object_iteration_ (*this),
- context_iteration_ (*this)
-{
- this->reset ();
-}
-
-
-void
-ACE_Registry::Binding_Iterator::reset ()
-{
- this->current_enumeration_ = &this->iteration_complete_;
- this->iteration_complete_.reset ();
- this->object_iteration_.reset ();
- this->context_iteration_.reset ();
-}
-
-
-void
-ACE_Registry::Binding_Iterator::Iteration_State::reset ()
-{
- this->index_ = 0;
-}
-
-
-ACE_Registry::Binding_Iterator::Iteration_State::Iteration_State (Binding_Iterator &iter)
- : parent_ (&iter),
- index_ (0)
-{
-}
-
-
-ACE_Registry::Binding_Iterator::Object_Iteration::Object_Iteration (Binding_Iterator &iter)
- : Iteration_State (iter)
-{
-}
-
-
-ACE_Registry::Binding_Iterator::Context_Iteration::Context_Iteration (Binding_Iterator &iter)
- : Iteration_State (iter)
-{
-}
-
-
-ACE_Registry::Binding_Iterator::Iteration_Complete::Iteration_Complete (Binding_Iterator &iter)
- : Iteration_State (iter)
-{
-}
-
-
-// Next entry
-int
-ACE_Registry::Binding_Iterator::next_one (Binding &binding)
-{
- u_long how_many = 1;
- Binding_List list;
-
- // Get next n (where n is one)
- long result = this->next_n (how_many, list);
-
- if (result == 0)
- // Success
- binding = (*list.begin ());
-
- return result;
-}
-
-
-// Next <how_many> entries
-int
-ACE_Registry::Binding_Iterator::next_n (u_long how_many,
- Binding_List &list)
-{
- // Empty list
- static const ACE_Registry::Binding_List empty_list;
- // Make sure that the list is empty
- list = empty_list;
-
- return this->current_enumeration_->next_n (how_many, list);
-}
-
-
-// Destroy iterator
-int
-ACE_Registry::Binding_Iterator::destroy (void)
-{
- this->reset ();
- return 0;
-}
-
-
-// Set/Get naming_context
-void
-ACE_Registry::Binding_Iterator::naming_context (Naming_Context &naming_context)
-{
- this->naming_context_ = &naming_context;
-}
-
-
-ACE_Registry::Naming_Context &
-ACE_Registry::Binding_Iterator::naming_context (void)
-{
- return *this->naming_context_;
-}
-
-
-// Set/Get current enumeration
-void
-ACE_Registry::Binding_Iterator::current_enumeration (Iteration_State &current_enumeration)
-{
- this->current_enumeration_ = &current_enumeration;
-}
-
-
-ACE_Registry::Binding_Iterator::Iteration_State &
-ACE_Registry::Binding_Iterator::current_enumeration (void)
-{
- return *this->current_enumeration_;
-}
-
-
-int
-ACE_Registry::Binding_Iterator::Object_Iteration::next_n (u_long how_many,
- Binding_List &list)
-{
- // Make a copy
- u_long requested = how_many;
-
- // While there are more entries to be added to the list
- while (how_many > 0)
- {
- ACE_TCHAR string [ACE_Registry::Naming_Context::MAX_OBJECT_NAME_SIZE];
- u_long size = sizeof string / sizeof (ACE_TCHAR);
- long result = ACE_TEXT_RegEnumValue (this->parent_->naming_context ().key (),
- this->index_,
- string,
- &size,
- 0,
- 0,
- 0,
- 0);
- switch (result)
- {
- case ERROR_SUCCESS:
- // Object found
- {
- // Readjust counters
- this->index_++;
- how_many--;
-
- // Add to list
- // Create binding
- Binding binding (string, OBJECT);
- // Add to binding list
- list.insert (binding);
- }
- // Continue to add to list
- break;
-
- case ERROR_NO_MORE_ITEMS:
- // Enumeration of objects complete
- // Reset index
- this->index_ = 0;
-
- // Current enumeration will become CONTEXTS
- this->parent_->current_enumeration (this->parent_->context_iteration_);
- result = this->parent_->current_enumeration ().next_n (how_many,
- list);
- // If we were able to add objects
- if (requested != how_many)
- return 0;
- else
- return result;
-
- default:
- // Strange error
- // Reset index
- this->index_ = 0;
- // Current enumeration will become COMPLETE
- this->parent_->current_enumeration (this->parent_->iteration_complete_);
- // strange error
- return -1;
- }
- }
- // If we reach here, all of <how_many> pairs were added to the list
- // Since more entries may be available
- // current enumeration will remain OBJECTS
- return 0;
-}
-
-
-int
-ACE_Registry::Binding_Iterator::Context_Iteration::next_n (u_long how_many,
- Binding_List &list)
-{
- // Make a copy
- u_long requested = how_many;
-
- // While there are more entries to be added to the list
- while (how_many > 0)
- {
- ACE_TCHAR string [ACE_Registry::Naming_Context::MAX_CONTEXT_NAME_SIZE];
- u_long size = sizeof string / sizeof (ACE_TCHAR);
- long result = ACE_TEXT_RegEnumKeyEx (this->parent_->naming_context (). key (),
- this->index_,
- string,
- &size,
- 0,
- 0,
- 0,
- 0);
- switch (result)
- {
- case ERROR_SUCCESS:
- // Object found
- {
- // Readjust counters
- this->index_++;
- how_many--;
-
- // Add to list
- // Create binding
- Binding binding (string, CONTEXT);
- // Add to binding list
- list.insert (binding);
- }
- // Continue to add to list
- break;
-
- case ERROR_NO_MORE_ITEMS:
- // Enumeration of objects complete
-
- /* FALL THROUGH */
-
- default:
- // Strange error
-
- // Reset index
- this->index_ = 0;
- // Current enumeration will become CONTEXTS
- this->parent_->current_enumeration (this->parent_->iteration_complete_);
-
- // If we were able to add contexts
- if (requested != how_many)
- return 0;
- else
- return -1;
- }
- }
- // If we reach here, all of <how_many> pairs were added to the list
- // Since more entries may be available
- // current enumeration will remain CONTEXTS
- return 0;
-}
-
-
-int
-ACE_Registry::Binding_Iterator::Iteration_Complete::next_n (u_long how_many,
- Binding_List &list)
-{
- ACE_UNUSED_ARG(list);
- ACE_UNUSED_ARG(how_many);
-
- // No more values
- return -1;
-}
-
-
-// Factory method to connect to predefined registries
-// This method works for both remote and local machines
-// However, for remote machines CLASSES_ROOT and CURRENT_USER
-// types are not allowed
-/* static */
-int
-ACE_Predefined_Naming_Contexts::connect (ACE_Registry::Naming_Context &naming_context,
- HKEY predefined,
- const ACE_TCHAR *machine_name)
-{
- long result = -1;
-
- if (machine_name != 0 && ACE_OS::strcmp (ACE_TEXT ("localhost"), machine_name) == 0)
- machine_name = 0;
-
- if (predefined == HKEY_LOCAL_MACHINE || predefined == HKEY_USERS)
- result = ACE_TEXT_RegConnectRegistry (machine_name,
- predefined,
- &naming_context.key_);
- if (predefined == HKEY_CURRENT_USER || predefined == HKEY_CLASSES_ROOT)
- // Make sure that for these types, the machine is local
- if (machine_name == 0 ||
- ACE_Predefined_Naming_Contexts::is_local_host (machine_name))
- {
- naming_context.key_ = predefined;
- result = 0;
- }
- else
- result = -1;
-
- ACE_REGISTRY_CALL_RETURN (result);
-}
-
-// Check if <machine_name> is the local host
-/* static */
-int
-ACE_Predefined_Naming_Contexts::is_local_host (const ACE_TCHAR *machine_name)
-{
- ACE_TCHAR local_host[MAXHOSTNAMELEN];
- int result = ACE_OS::hostname (local_host, sizeof local_host / sizeof (ACE_TCHAR));
- if (result == 0)
- result = !ACE_OS::strcmp (local_host, machine_name);
- else
- result = 0;
- return result;
-}
-
-#endif /* ACE_WIN32 */
diff --git a/ace/Registry.h b/ace/Registry.h
deleted file mode 100644
index 8bb0aa4cab8..00000000000
--- a/ace/Registry.h
+++ /dev/null
@@ -1,524 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Registry.h
-//
-// = AUTHOR
-// Irfan Pyarali (irfan@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_REGISTRY_H
-#define ACE_REGISTRY_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_WIN32)
-// This only works on Win32 platforms
-
-#include "ace/Containers.h"
-#include "ace/SString.h"
-
-class ACE_Export ACE_Registry
-{
- // = TITLE
- // A Name Server implementation
- //
- // = DESCRIPTION
- // The registry interface is inspired by the interface
- // specified in the CORBA Naming Service Specification.
- // The implementation is done through Win32 <Reg*> functions.
- // Other than providing an OO wrapper for the Win32 <Reg*>
- // functions, ACE_Registry provides an abstraction for iteration
- // over the elements of the Registry.
-public:
-
-// International string
- struct ACE_Export Name_Component
- {
- ACE_TString id_;
- ACE_TString kind_;
-
- int operator== (const Name_Component &rhs) const;
- int operator!= (const Name_Component &rhs) const;
- // Comparison
- };
- // The <id_> field is used,
- // but the <kind_> field is currently ignored
-
- // A Name is an ordered collections of components (ids)
- typedef ACE_Unbounded_Set<Name_Component> Name;
-
- static const ACE_TCHAR *STRING_SEPARATOR;
- // Separator for components in a name
-
- static ACE_TString make_string (const Name &name);
- // Convert a <name> to a <string>
-
- static Name make_name (const ACE_TString &string);
- // Convert a <string> to a <name>
-
- enum Binding_Type {INVALID, OBJECT, CONTEXT};
- // There are two types of bindings
-
- struct ACE_Export Binding
- {
- Binding (void);
- // Empty (default) constructor
-
- Binding (const Name &binding_name,
- Binding_Type binding_type);
- // Constructor
- // (Name version)
-
- Binding (const ACE_TString &binding_name,
- Binding_Type binding_type);
- // Constructor
- // (String version)
-
- int operator== (const Binding &rhs) const;
- int operator!= (const Binding &rhs) const;
- // Comparison
-
- void name (Name &name);
- // Name accessor
- // (Name version)
-
- void name (ACE_TString &name);
- ACE_TString name (void);
- // Name accessors
- // (String version)
-
- Binding_Type type (void);
- // Type accessor
-
- private:
- ACE_TString name_;
- Binding_Type type_;
- // A binding has a name and a type
- };
-
- // A list of bindings
- typedef ACE_Unbounded_Set<Binding> Binding_List;
-
- class Binding_Iterator;
- // Forward declaration of iterator
-
- class ACE_Export Object
- {
- // = TITLE
- // An object representation
- //
- // = DESCRIPTION
- // In CORBA, all objects inherit from (CORBA::Object).
- // For the registry, this is used as a wrapper for an
- // instance of a built-in data type.
- // Think about an object as being similar to a file
- // in a file system.
- public:
- Object (void *data = 0,
- u_long size = 0,
- u_long type = REG_NONE);
- // Default constructor
-
- void data (void *data);
- void *data (void) const;
- // Set/Get data
-
- void size (u_long size);
- u_long size (void) const;
- // Set/Get size
-
- void type (u_long type);
- u_long type (void) const;
- // Set/Get type
-
- private:
- void *data_;
- // Pointer to data
-
- u_long size_;
- // Size of the data
-
- u_long type_;
- // Type of data
- };
-
- class ACE_Export Naming_Context
- {
- // = TITLE
- // An context representation
- //
- // = DESCRIPTION
- // Think about a context as being similar to a directory
- // in a file system.
- public:
- friend class ACE_Predefined_Naming_Contexts;
- // Friend factory
-
- enum { MAX_OBJECT_NAME_SIZE = BUFSIZ,
- MAX_CONTEXT_NAME_SIZE = MAXPATHLEN + 1 };
- // Max sizes of names
- // (Not too sure about this value)
-
- Naming_Context (void);
- // Empty constructor: keys will be NULL
-
- Naming_Context (const HKEY &key);
- // Constructor: key_ will be set to <key>
-
- ~Naming_Context (void);
- // Destructor will call <Naming_Context::close>.
-
- // The following interfaces are for objects
-
- int bind_new (const Name &name,
- const Object &object);
- // Insert <object> with <name> into <this> context
- // This will fail if <name> already exists
- // (Name version)
-
- int bind_new (const ACE_TString &name,
- const Object &object);
- // Insert <object> with <name> into <this> context
- // This will fail if <name> already exists
- // (String version)
-
- int bind (const Name &name,
- const Object &object);
- // Insert or update <object> with <name> into <this> context
- // This will not fail if <name> already exists
- // (Name version)
-
- int bind (const ACE_TString &name,
- const Object &object);
- // Insert or update <object> with <name> into <this> context
- // This will not fail if <name> already exists
- // (String version)
-
- int rebind (const Name &name,
- const Object &object);
- // Update <object> with <name> in <this> context
- // (Name version)
-
- int rebind (const ACE_TString &name,
- const Object &object);
- // Update <object> with <name> in <this> context
-
- int resolve (const Name &name,
- Object &object);
- // Find <object> with <name> in <this> context
- // (Name version)
-
- int resolve (const ACE_TString &name,
- Object &object);
- // Find <object> with <name> in <this> context
-
- int unbind (const Name &name);
- // Delete object with <name> in <this> context
- // (Name version)
-
- int unbind (const ACE_TString &name);
- // Delete object with <name> in <this> context
-
-
- // The following interfaces are for Naming Context
-
- int new_context (Naming_Context &naming_context);
- // Create new <naming_context>
-
- int bind_new_context (const Name &name,
- Naming_Context &naming_context,
- u_long persistence = REG_OPTION_NON_VOLATILE,
- u_long security_access = KEY_ALL_ACCESS,
- LPSECURITY_ATTRIBUTES security_attributes = 0);
- // Insert <naming_context> with <name> relative to <this> context
- // This will fail if <name> already exists
- // (Name version)
-
- int bind_new_context (const ACE_TString &name,
- Naming_Context &naming_context,
- u_long persistence = REG_OPTION_NON_VOLATILE,
- u_long security_access = KEY_ALL_ACCESS,
- LPSECURITY_ATTRIBUTES security_attributes = 0);
- // Insert <naming_context> with <name> relative to <this> context
- // This will fail if <name> already exists
-
- int bind_context (const Name &name,
- /* const */ Naming_Context &naming_context,
- u_long persistence = REG_OPTION_NON_VOLATILE,
- u_long security_access = KEY_ALL_ACCESS,
- LPSECURITY_ATTRIBUTES security_attributes = 0);
- // Insert or update <naming_context> with <name> relative to <this> context
- // This will not fail if <name> already exists
- // (Name version)
-
- int bind_context (const ACE_TString &name,
- /* const */ Naming_Context &naming_context,
- u_long persistence = REG_OPTION_NON_VOLATILE,
- u_long security_access = KEY_ALL_ACCESS,
- LPSECURITY_ATTRIBUTES security_attributes = 0);
- // Insert or update <naming_context> with <name> relative to <this> context
- // This will not fail if <name> already exists
-
- int rebind_context (const Name &name,
- /* const */ Naming_Context &naming_context);
- // Rename <naming_context> to <name>
- // (Name version)
-
- int rebind_context (const ACE_TString &name,
- /* const */ Naming_Context &naming_context);
- // Rename <naming_context> to <name>
-
- int resolve_context (const Name &name,
- Naming_Context &naming_context,
- u_long security_access = KEY_ALL_ACCESS);
- // Find <naming_context> with <name> in <this> context
- // (Name version)
-
- int resolve_context (const ACE_TString &name,
- Naming_Context &naming_context,
- u_long security_access = KEY_ALL_ACCESS);
- // Find <naming_context> with <name> in <this> context
-
- int unbind_context (const Name &name);
- // Remove naming_context with <name> from <this> context
- // (Name version)
-
- int unbind_context (const ACE_TString &name);
- // Remove naming_context with <name> from <this> context
-
- int destroy (void);
- // Same as <unbind_context> with <this> as naming_context
-
- int list (u_long how_many,
- Binding_List &list,
- Binding_Iterator &iterator);
- // listing function: iterator creator
- // This is useful when there are many objects and contexts
- // in <this> context and you only want to look at a few entries
- // at a time
-
- int list (Binding_List &list);
- // listing function: iterator creator
- // This gives back a listing of all entries in <this> context.
-
-
- // Some other necessary functions which are
- // not part of the CORBA interface
-
- int flush (void);
- // Sync content of context to disk
-
- int close (void);
- // Close the handle of the context
- // Note: <close> does not call <flush>
-
-
- // Accessors
-
- HKEY key (void);
- // Get key
-
- // void parent (HKEY parent);
- HKEY parent (void);
- // Get parent
-
- void name (Name &name);
- // Get name
- // (Name version)
-
- void name (ACE_TString &name);
- ACE_TString name (void);
- // Get name
- // (String version)
-
- protected:
- void key (HKEY key);
- // Set key
-
- void parent (HKEY parent);
- // Set parent
-
- void name (const Name &name);
- // Set name
- // (Name version)
-
- void name (const ACE_TString &name);
- // Set name
- // (String version)
-
- private:
- Naming_Context (const Naming_Context &rhs);
- // Disallow copy constructors
-
- const Naming_Context &operator= (const Naming_Context &rhs);
- // Disallow assignment
-
- HKEY key_;
- // Key for self
-
- HKEY parent_key_;
- // Key for parent
-
- ACE_TString name_;
- // Name of self
- };
-
- class ACE_Export Binding_Iterator
- {
- // = TITLE
- // An iterator
- //
- // = DESCRIPTION
- // Useful when iteratorating over a few entries at a time
- public:
- friend class Naming_Context;
- // Friend factory
-
- Binding_Iterator (void);
- // Default constructor
-
- int next_one (Binding &binding);
- // Next entry
-
- int next_n (u_long how_many,
- Binding_List &list);
- // Next <how_many> entries
-
- int destroy (void);
- // Cleanup
-
- void reset (void);
- // Reset the internal state of the iterator
-
- Naming_Context &naming_context (void);
- // Get naming_context that the iterator is iterating over
-
- private:
-
- void naming_context (Naming_Context& naming_context);
- // Set naming_context that the iterator is iterating over
-
- Naming_Context *naming_context_;
- // Reference to context
-
- public:
- // This should really be private
- // But the compiler is broken
-
- class ACE_Export Iteration_State
- // Base class for state
- {
- public:
- Iteration_State (Binding_Iterator &iterator);
-
- virtual int next_n (u_long how_many,
- Binding_List &list) = 0;
- // Next <how_many> entries
-
- void reset (void);
- // Reset state
-
- protected:
- Binding_Iterator *parent_;
- // Pointer to parent iterator
-
- u_long index_;
- };
-
- private:
- class ACE_Export Object_Iteration : public Iteration_State
- {
- public:
- Object_Iteration (Binding_Iterator &iterator);
-
- int next_n (u_long how_many,
- Binding_List &list);
- // Next <how_many> entries
- };
-
- class ACE_Export Context_Iteration : public Iteration_State
- {
- public:
- Context_Iteration (Binding_Iterator &iterator);
-
- int next_n (u_long how_many,
- Binding_List &list);
- // Next <how_many> entries
- };
-
- class ACE_Export Iteration_Complete : public Iteration_State
- {
- public:
- Iteration_Complete (Binding_Iterator &iterator);
-
- int next_n (u_long how_many,
- Binding_List &list);
- // Next <how_many> entries
- };
-
- friend class Iteration_State;
- friend class Object_Iteration;
- friend class Context_Iteration;
- friend class Iteration_Complete;
- // Friend states
-
- Object_Iteration object_iteration_;
- Context_Iteration context_iteration_;
- Iteration_Complete iteration_complete_;
- // Instances of all states
-
- Iteration_State *current_enumeration_;
- // Pointer to current state
-
- void current_enumeration (Iteration_State& current_enumeration);
- Iteration_State &current_enumeration (void);
- // Set/Get current_enumeration
- };
-};
-
-class ACE_Export ACE_Predefined_Naming_Contexts
-{
- // = TITLE
- // A factory for predefined registries, which exist by default
- // on Win32 platforms
- //
- // = DESCRIPTION
- // This factory can connect to both local and remote
- // predefined registries.
-public:
- static int connect (ACE_Registry::Naming_Context &naming_context,
- HKEY predefined = HKEY_LOCAL_MACHINE,
- const ACE_TCHAR *machine_name = 0);
- // Factory method for connecting to predefined registries. This
- // method works for both remote and local machines. However, for
- // remote machines, HKEY_CLASSES_ROOT and HKEY_CURRENT_USER types
- // are not allowed
-
-private:
- static int is_local_host (const ACE_TCHAR *machine_name);
- // Check if <machine_name> is the local host
-};
-
-// Fix me! Shouldn't have to define this stuff
-
-#if defined (ACE_HAS_BROKEN_NESTED_TEMPLATES)
- typedef ACE_Registry::Name_Component Name_Component;
- typedef ACE_Registry::Binding Binding;
-#endif /* ACE_HAS_BROKEN_NESTED_TEMPLATES */
-
-#endif /* ACE_WIN32 */
-#include "ace/post.h"
-#endif /* ACE_REGISTRY_H */
diff --git a/ace/Registry_Name_Space.cpp b/ace/Registry_Name_Space.cpp
deleted file mode 100644
index a16c972691b..00000000000
--- a/ace/Registry_Name_Space.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-// $Id$
-
-#include "ace/Registry_Name_Space.h"
-
-ACE_RCSID(ace, Registry_Name_Space, "$Id$")
-
-#if (defined (ACE_WIN32) && defined (UNICODE))
-// This only works on Win32 platforms when UNICODE is turned on
-
-ACE_Registry_Name_Space::ACE_Registry_Name_Space (void)
-{
-}
-
-ACE_Registry_Name_Space::ACE_Registry_Name_Space (ACE_Name_Options *name_options)
-{
- if (this->open (name_options) != 0)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Registry_Name_Space::open")));
-}
-
-
-ACE_Registry_Name_Space::~ACE_Registry_Name_Space (void)
-{
-}
-
-
-int
-ACE_Registry_Name_Space::open (ACE_Name_Options *name_options)
-{
- const ACE_TCHAR *host = name_options->nameserver_host ();
- ACE_Registry::Naming_Context predefined;
-
- int result = ACE_Predefined_Naming_Contexts::connect (predefined,
- HKEY_LOCAL_MACHINE,
- host);
- if (result != 0)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Predefined_Naming_Context::connect")),
- result);
- else
- {
- // Directory
- ACE_TString name = name_options->namespace_dir ();
- // Separator
- name += ACE_Registry::STRING_SEPARATOR;
- // Filename
- name += name_options->database ();
-
- // Create new context or bind to existing one
- result = predefined.bind_context (name,
- this->context_);
- if (result != 0)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Registry::Naming_Context::bind_context")), result);
- }
- return 0;
-}
-
-
-int
-ACE_Registry_Name_Space::bind (const ACE_WString &name,
- const ACE_WString &value,
- const char *type)
-{
- // Pointer to data
- const ACE_USHORT16 *data = value.fast_rep ();
-
- // Size
- u_long size = value.length () * sizeof (ACE_USHORT16);
-
- // Represent value as an ACE_Registry::Object
- ACE_Registry::Object object ((void *) data,
- size,
- REG_SZ);
- // Add new <key>/<value> pair
- return this->context_.bind (name.fast_rep(),
- object);
-}
-
-
-int
-ACE_Registry_Name_Space::rebind (const ACE_WString &name,
- const ACE_WString &value,
- const char *type)
-{
- // Pointer to data
- const ACE_USHORT16 *data = value.fast_rep ();
-
- // Size
- u_long size = value.length () * sizeof (ACE_USHORT16);
-
- // Represent value as an ACE_Registry::Object
- ACE_Registry::Object object ((void *) data,
- size,
- REG_SZ);
- // Add new <key>/<value> pair
- return this->context_.rebind (name.fast_rep (),
- object);
-}
-
-
-int
-ACE_Registry_Name_Space::unbind (const ACE_WString &name)
-{
- return this->context_.unbind (name.fast_rep ());
-}
-
-
-int
-ACE_Registry_Name_Space::resolve (const ACE_WString &name,
- ACE_WString &value,
- char *&type)
-{
- // This object will be used to query the size of the data.
- // Note: The query_object.data will be null for this invocation.
- ACE_Registry::Object query_object;
- int result = this->context_.resolve (name.fast_rep (), query_object);
- if (result != 0)
- return result;
-
- // Resize the value passed by the user
- // Note: -1 is used because the size includes the null terminator
- value.resize ((query_object.size () - 1) / sizeof (ACE_USHORT16));
-
- // Represent new space as an ACE_Registry::Object
- ACE_Registry::Object object ((void *) value.fast_rep (),
- query_object.size (),
- REG_SZ);
-
- result = this->context_.resolve (name.fast_rep (), object);
- if (object.size () != query_object.size ())
- return -1;
- if (result != 0)
- return result;
-
- return 0;
-}
-
-
-int
-ACE_Registry_Name_Space:: list_names (ACE_WSTRING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_BINDING_SET binding_set;
- int result = this->list_name_entries (binding_set,
- pattern);
- if (result != 0)
- return result;
-
- ACE_BINDING_ITERATOR iterator (binding_set);
-
- for (ACE_Name_Binding *entry = 0;
- iterator.next (entry) !=0;
- iterator.advance())
- {
- set.insert (entry->name_);
- }
- return 0;
-}
-
-
-int
-ACE_Registry_Name_Space::list_values (ACE_WSTRING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_BINDING_SET binding_set;
- int result = this->list_name_entries (binding_set,
- pattern);
- if (result != 0)
- return result;
-
- ACE_BINDING_ITERATOR iterator (binding_set);
-
- for (ACE_Name_Binding *entry = 0;
- iterator.next (entry) !=0;
- iterator.advance())
- {
- set.insert (entry->value_);
- }
- return 0;
-}
-
-
-int
-ACE_Registry_Name_Space::list_types (ACE_WSTRING_SET &set,
- const ACE_WString &pattern)
-{
- return 0;
-}
-
-
-int
-ACE_Registry_Name_Space::list_name_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_Registry::Binding_List list;
- int result = this->context_.list (list);
- if (result != 0)
- return result;
-
- // Iterator through all entries
- for (ACE_Registry::Binding_List::iterator i = list.begin ();
- i != list.end ();
- i++)
- {
- // Yeeesss! STL rules!
- ACE_Registry::Binding &binding = *i;
-
- if (binding.type () == ACE_Registry::OBJECT)
- {
- // Key
- ACE_TString string = binding.name ();
- ACE_WString key (string.c_str ());
-
- // Value
- ACE_WString value;
- char *type = 0;
- result = this->resolve (key,
- value,
- type);
- if (result != 0)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Registry::Naming_Context::resolve")), result);
-
- // Complete binding
- ACE_Name_Binding binding (key, value, type);
- set.insert (binding);
- }
- }
- return 0;
-}
-
-
-int
-ACE_Registry_Name_Space::list_value_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- return this->list_name_entries (set, pattern);
-}
-
-
-int
-ACE_Registry_Name_Space::list_type_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- return this->list_name_entries (set, pattern);
-}
-
-
-void
-ACE_Registry_Name_Space::dump (void) const
-{
-}
-
-
-#endif /* ACE_WIN32 && UNICODE */
diff --git a/ace/Registry_Name_Space.h b/ace/Registry_Name_Space.h
deleted file mode 100644
index 2c1458a7aa8..00000000000
--- a/ace/Registry_Name_Space.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*-*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Registry_Name_Space.h
-//
-// = AUTHOR
-// Irfan Pyarali (irfan@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_REGISTRY_NAME_SPACE_H
-#define ACE_REGISTRY_NAME_SPACE_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if (defined (ACE_WIN32) && defined (UNICODE))
-// This only works on Win32 platforms when UNICODE is turned on
-
-#include "ace/Registry.h"
-#include "ace/Naming_Context.h"
-#include "ace/Name_Space.h"
-
-class ACE_Export ACE_Registry_Name_Space : public ACE_Name_Space
-{
- // = TITLE
- // Interface to a Name Server Database which is maintained by
- // the Win32 Registry. Allows to add, change, remove and
- // resolve NameBindings.
- //
- // = DESCRIPTION
- // Manages a Naming Service for a registry name space which
- // includes bindings for all contexts. All strings are stored in
- // wide character format. A Name Binding consists of a name
- // (that's the key), a value string. There is no type string
- // support in this Name Space.
-public:
-
- ACE_Registry_Name_Space (void);
- // Constructor
-
- ACE_Registry_Name_Space (ACE_Name_Options *name_options);
- // Contacts and opens the registry on the specified server
-
- ~ACE_Registry_Name_Space (void);
- // Destructor
-
- int open (ACE_Name_Options *name_options);
- // Contacts and opens the registry on the specified server
-
- int bind (const ACE_WString &name_in,
- const ACE_WString &value_in,
- const char *type_in = "");
- // Bind a new name to a naming context (Wide character strings).
-
- int rebind (const ACE_WString &name_in,
- const ACE_WString &value_in,
- const char *type_in = "");
- // Overwrite the value or type of an existing name in a
- // ACE_Name_Space or bind a new name to the context, if it didn't
- // exist yet. (Wide charcter strings interface).
-
- int unbind (const ACE_WString &name_in);
- // Delete a name from a ACE_Name_Space (Wide charcter strings
- // Interface).
-
- int resolve (const ACE_WString &name_in,
- ACE_WString &value_out,
- char *&type_out);
- // Get value and type of a given name binding (Wide chars). The
- // caller is responsible for deleting both <value_out> and <type_out>!
-
- int list_names (ACE_WSTRING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string.
-
- int list_values (ACE_WSTRING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string.
-
- int list_types (ACE_WSTRING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string.
-
- int list_name_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- int list_value_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- int list_type_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- void dump (void) const;
- // Dump the state of the object
-
-private:
-
- ACE_Registry::Naming_Context context_;
- // current context
-};
-
-#endif /* ACE_WIN32 && UNICODE */
-#include "ace/post.h"
-#endif /* ACE_REGISTRY_NAME_SPACE_H */
diff --git a/ace/Remote_Name_Space.cpp b/ace/Remote_Name_Space.cpp
deleted file mode 100644
index 5eba140a92a..00000000000
--- a/ace/Remote_Name_Space.cpp
+++ /dev/null
@@ -1,351 +0,0 @@
-// Remote_Name_Space.cpp
-// $Id$
-
-#include "ace/Remote_Name_Space.h"
-#include "ace/Auto_Ptr.h"
-
-ACE_RCSID(ace, Remote_Name_Space, "$Id$")
-
-int
-ACE_Remote_Name_Space::open (const ACE_TCHAR *servername, u_short port)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::open");
- ACE_INET_Addr servaddr;
-
- // Initialize Addr
- if (servaddr.set (port, servername) == -1)
- return -1;
-
- // Connect to Name Server process.
- if (this->ns_proxy_.open (servaddr) == -1)
- return -1;
-
- return 0;
-}
-
-ACE_Remote_Name_Space::ACE_Remote_Name_Space (void)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::ACE_Remote_Name_Space");
-}
-
-ACE_Remote_Name_Space::ACE_Remote_Name_Space (const ACE_TCHAR *hostname,
- u_short port)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::ACE_Remote_Name_Space");
- if (this->open (hostname, port) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Remote_Name_Space::ACE_Remote_Name_Space")));
-}
-
-int
-ACE_Remote_Name_Space::bind (const ACE_WString &name,
- const ACE_WString &value,
- const char *type)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::bind");
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> name_urep (name.ushort_rep ());
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> value_urep (value.ushort_rep ());
- ACE_Name_Request request (ACE_Name_Request::BIND,
- name_urep.get (),
- name.length () * sizeof (ACE_USHORT16),
- value_urep.get (),
- value.length () * sizeof (ACE_USHORT16),
- type,
- ACE_OS::strlen (type));
- return this->ns_proxy_.request_reply (request);
-}
-
-int
-ACE_Remote_Name_Space::rebind (const ACE_WString &name,
- const ACE_WString &value,
- const char *type)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::rebind");
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> name_urep (name.ushort_rep ());
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> value_urep (value.ushort_rep ());
- ACE_Name_Request request (ACE_Name_Request::REBIND,
- name_urep.get (),
- name.length () * sizeof (ACE_USHORT16),
- value_urep.get (),
- value.length () * sizeof (ACE_USHORT16),
- type,
- ACE_OS::strlen (type));
- return this->ns_proxy_.request_reply (request);
-}
-
-int
-ACE_Remote_Name_Space::resolve (const ACE_WString &name,
- ACE_WString &value,
- char *&type)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::resolve");
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> name_urep (name.ushort_rep ());
- ACE_Name_Request request (ACE_Name_Request::RESOLVE,
- name_urep.get (),
- name.length () * sizeof (ACE_USHORT16),
- 0, 0, 0, 0);
-
- if (this->ns_proxy_.send_request (request) == -1)
- return -1;
-
- ACE_Name_Request reply;
-
- if (this->ns_proxy_.recv_reply (reply) == -1)
- return -1;
-
- ACE_WString temp (reply.value (), reply.value_len () / sizeof (ACE_USHORT16));
- value = temp;
- ACE_NEW_RETURN (type,
- char[reply.type_len () + 1],
- -1);
- ACE_OS::strcpy (type, reply.type ());
- return 0;
-}
-
-int
-ACE_Remote_Name_Space::unbind (const ACE_WString &name)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::unbind");
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> name_urep (name.ushort_rep ());
- ACE_Name_Request request (ACE_Name_Request::UNBIND,
- name_urep.get (),
- name.length () * sizeof (ACE_USHORT16),
- 0, 0, 0, 0);
- return this->ns_proxy_.request_reply (request);
-}
-
-int
-ACE_Remote_Name_Space::list_names (ACE_WSTRING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::list_names");
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> pattern_urep (pattern.ushort_rep ());
- ACE_Name_Request request (ACE_Name_Request::LIST_NAMES,
- pattern_urep.get (),
- pattern.length () * sizeof (ACE_USHORT16),
- 0, 0, 0, 0);
- if (this->ns_proxy_.send_request (request) == -1)
- return -1;
-
- ACE_Name_Request reply (0, 0, 0, 0, 0, 0, 0, 0);
-
- while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- if (this->ns_proxy_.recv_reply (reply) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Remote_Name_Space::list_names")),
- -1);
- if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- ACE_WString name (reply.name (),
- reply.name_len () / sizeof (ACE_USHORT16));
- set.insert (name);
- }
- }
- return 0;
-}
-
-int
-ACE_Remote_Name_Space::list_values (ACE_WSTRING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::list_values");
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> pattern_urep (pattern.ushort_rep ());
- ACE_Name_Request request (ACE_Name_Request::LIST_VALUES,
- pattern_urep.get (),
- pattern.length () * sizeof (ACE_USHORT16),
- 0, 0, 0, 0);
- if (this->ns_proxy_.send_request (request) == -1)
- return -1;
-
- ACE_Name_Request reply (0, 0, 0, 0, 0, 0, 0, 0);
-
- while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- if (this->ns_proxy_.recv_reply (reply) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Remote_Name_Space::list_values")),
- -1);
- if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- ACE_WString value (reply.value (),
- reply.value_len () / sizeof (ACE_USHORT16));
- set.insert (value);
- }
- }
-
- return 0;
-}
-
-int
-ACE_Remote_Name_Space::list_types (ACE_WSTRING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::list_types");
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> pattern_urep (pattern.ushort_rep ());
- ACE_Name_Request request (ACE_Name_Request::LIST_TYPES,
- pattern_urep.get (),
- pattern.length () * sizeof (ACE_USHORT16),
- 0, 0, 0, 0);
-
- if (this->ns_proxy_.send_request (request) == -1)
- return -1;
-
- ACE_Name_Request reply (0, 0, 0, 0, 0, 0, 0, 0);
-
- while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- if (this->ns_proxy_.recv_reply (reply) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Remote_Name_Space::list_values")),
- -1);
- if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- ACE_WString type (reply.type ());
- set.insert (type);
- }
- }
-
- return 0;
-}
-
-int
-ACE_Remote_Name_Space::list_name_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::list_names");
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> pattern_urep (pattern.ushort_rep ());
- ACE_Name_Request request (ACE_Name_Request::LIST_NAME_ENTRIES,
- pattern_urep.get (),
- pattern.length () * sizeof (ACE_USHORT16),
- 0, 0, 0, 0);
-
- if (this->ns_proxy_.send_request (request) == -1)
- return -1;
-
- ACE_Name_Request reply (0, 0, 0, 0, 0, 0, 0, 0);
-
- while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- if (this->ns_proxy_.recv_reply (reply) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Remote_Name_Space::list_names")),
- -1);
- if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- ACE_WString name (reply.name (),
- reply.name_len () / sizeof (ACE_USHORT16));
- ACE_WString value (reply.value (),
- reply.value_len () / sizeof (ACE_USHORT16));
- ACE_Name_Binding entry (name,
- value,
- reply.type ());
- if (set.insert (entry) == -1)
- return -1;
- }
- }
- return 0;
-}
-
-int
-ACE_Remote_Name_Space::list_value_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::list_values");
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> pattern_urep (pattern.ushort_rep ());
- ACE_Name_Request request (ACE_Name_Request::LIST_VALUE_ENTRIES,
- pattern_urep.get (),
- pattern.length () * sizeof (ACE_USHORT16),
- 0, 0, 0, 0);
-
- if (this->ns_proxy_.send_request (request) == -1)
- return -1;
-
- ACE_Name_Request reply (0, 0, 0, 0, 0, 0, 0, 0);
-
- while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- if (this->ns_proxy_.recv_reply (reply) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Remote_Name_Space::list_values")),
- -1);
- if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- ACE_WString name (reply.name (),
- reply.name_len () / sizeof (ACE_USHORT16));
- ACE_WString value (reply.value (),
- reply.value_len () / sizeof (ACE_USHORT16));
- ACE_Name_Binding entry (name,
- value,
- reply.type());
- if (set.insert (entry) == -1)
- return -1;
- }
- }
- return 0;
-}
-
-int
-ACE_Remote_Name_Space::list_type_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::list_types");
- ACE_Auto_Basic_Array_Ptr<ACE_USHORT16> pattern_urep (pattern.ushort_rep ());
- ACE_Name_Request request (ACE_Name_Request::LIST_TYPE_ENTRIES,
- pattern_urep.get (),
- pattern.length () * sizeof (ACE_USHORT16),
- 0, 0, 0, 0);
-
- if (this->ns_proxy_.send_request (request) == -1)
- return -1;
-
- ACE_Name_Request reply (0, 0, 0, 0, 0, 0, 0, 0);
-
- while (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- if (this->ns_proxy_.recv_reply (reply) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Remote_Name_Space::list_values")),
- -1);
- if (reply.msg_type () != ACE_Name_Request::MAX_ENUM)
- {
- ACE_WString name (reply.name (),
- reply.name_len () / sizeof (ACE_USHORT16));
- ACE_WString value (reply.value (),
- reply.value_len () / sizeof (ACE_USHORT16));
- ACE_Name_Binding entry (name,
- value,
- reply.type ());
- if (set.insert (entry) == -1)
- return -1;
- }
- }
- return 0;
-}
-
-ACE_Remote_Name_Space::~ACE_Remote_Name_Space (void)
-{
- ACE_TRACE ("ACE_Remote_Name_Space::~ACE_Remote_Name_Space");
-}
-
-void
-ACE_Remote_Name_Space::dump (void) const
-{
- ACE_TRACE ("ACE_Remote_Name_Space::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->ns_proxy_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Auto_Basic_Array_Ptr<ACE_USHORT16>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Auto_Basic_Array_Ptr<ACE_USHORT16>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
diff --git a/ace/Remote_Name_Space.h b/ace/Remote_Name_Space.h
deleted file mode 100644
index 2e44e7dd9f9..00000000000
--- a/ace/Remote_Name_Space.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Remote_Name_Space.h
-//
-// = AUTHOR
-// Prashant Jain
-//
-// ============================================================================
-
-#ifndef ACE_REMOTE_NAME_SPACE_H
-#define ACE_REMOTE_NAME_SPACE_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SString.h"
-#include "ace/Containers.h"
-#include "ace/Name_Proxy.h"
-#include "ace/Name_Space.h"
-
-typedef ACE_Unbounded_Set<ACE_WString> ACE_WSTRING_SET;
-
-class ACE_Export ACE_Remote_Name_Space : public ACE_Name_Space
-{
- // = TITLE
- // Maintaining accesses Remote Name Server Database. Allows to
- // add NameBindings, change them, remove them and resolve
- // NameBindings.
- //
- // = DESCRIPTION
- // Manages a Naming Service for a remote name space which
- // includes bindings for net_local naming context. All strings
- // are stored in wide character format. A Name Binding consists
- // of a name (that's the key), a value string and an optional
- // type string (no wide chars).
-public:
- // = Initialization and termination methods.
- ACE_Remote_Name_Space (void);
- // "Do-nothing" constructor.
-
- ACE_Remote_Name_Space (const ACE_TCHAR *hostname, u_short port);
- // Specifies the scope of this namespace, opens and memory-maps the
- // associated file (if accessible) or contacts the dedicated name
- // server process for NET_LOCAL namespace.
-
- int open (const ACE_TCHAR *servername, u_short port);
- // Specifies the scope of this namespace, opens and memory-maps the
- // associated file (if accessible) or contacts the dedicated name
- // server process for NET_LOCAL namespace.
-
- ~ACE_Remote_Name_Space (void);
- // destructor, do some cleanup :TBD: last dtor should "compress"
- // file
-
- virtual int bind (const ACE_WString &name_in,
- const ACE_WString &value_in,
- const char *type_in = "");
- // Bind a new name to a naming context (Wide character strings).
-
- virtual int rebind (const ACE_WString &name_in,
- const ACE_WString &value_in,
- const char *type_in = "");
- // Overwrite the value or type of an existing name in a
- // ACE_Remote_Name_Space or bind a new name to the context, if it
- // didn't exist yet. (Wide charcter strings interface).
-
- virtual int unbind (const ACE_WString &name_in);
- // Delete a name from a ACE_Remote_Name_Space (Wide charcter strings
- // Interface).
-
- virtual int resolve (const ACE_WString &name_in,
- ACE_WString &value_out,
- char *&type_out);
- // Get value and type of a given name binding (Wide chars). The
- // caller is responsible for deleting both <value_out> and <type_out>!
-
- virtual int list_names (ACE_WSTRING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string.
-
- virtual int list_values (ACE_WSTRING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string.
-
- virtual int list_types (ACE_WSTRING_SET &set_out,
- const ACE_WString &pattern_in);
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string.
-
- virtual int list_name_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- // Get a set of names matching a specified pattern (wchars). Matching
- // means the names must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_value_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- // Get a set of values matching a specified pattern (wchars). Matching
- // means the values must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual int list_type_entries (ACE_BINDING_SET &set,
- const ACE_WString &pattern);
- // Get a set of types matching a specified pattern (wchars). Matching
- // means the types must begin with the pattern string. Returns the
- // complete binding associated each pattern match.
-
- virtual void dump (void) const;
- // Dump the state of the object.
-
-private:
- ACE_Name_Proxy ns_proxy_;
- // Interface to Name server process for NET_LOCAL namespace.
-};
-
-#include "ace/post.h"
-#endif /* ACE_REMOTE_NAME_SPACE_H */
diff --git a/ace/Remote_Tokens.cpp b/ace/Remote_Tokens.cpp
deleted file mode 100644
index e5e53cd62a5..00000000000
--- a/ace/Remote_Tokens.cpp
+++ /dev/null
@@ -1,435 +0,0 @@
-// Remote_Tokens.cpp
-// $Id$
-
-#include "ace/Remote_Tokens.h"
-#include "ace/Singleton.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Remote_Tokens.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Remote_Tokens, "$Id$")
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-#define ACE_TSS_CONNECTION_MUTEX ACE_Thread_Mutex
-#else
-#define ACE_TSS_CONNECTION_MUTEX ACE_Null_Mutex
-#endif /* ACE_MT_SAFE */
-
-// Make a typedef to simplify access to the Singleton below.
-typedef ACE_Singleton<ACE_TSS_Connection, ACE_TSS_CONNECTION_MUTEX>
- ACE_Token_Connections;
-
-// Initialize the statics from ACE_TSS_Connection;
-ACE_INET_Addr ACE_TSS_Connection::server_address_;
-
-// ************************************************************
-
-void
-ACE_TSS_Connection::set_server_address (const ACE_INET_Addr &server_address)
-{
- ACE_TRACE ("ACE_TSS_Connection::set_server_address");
- server_address_ = server_address;
-}
-
-// Necessary to make some compilers work...
-ACE_TSS_Connection::ACE_TSS_Connection (void)
-{
- ACE_TRACE ("ACE_TSS_Connection::ACE_TSS_Connection");
-}
-
-ACE_TSS_Connection::~ACE_TSS_Connection (void)
-{
- ACE_TRACE ("ACE_TSS_Connection::~ACE_TSS_Connection");
-}
-
-ACE_SOCK_Stream *
-ACE_TSS_Connection::get_connection (void)
-{
- return ACE_TSS<ACE_SOCK_Stream>::operator-> ();
-}
-
-ACE_SOCK_Stream *
-ACE_TSS_Connection::make_TSS_TYPE (void) const
-{
- ACE_TRACE ("ACE_TSS_Connection::make_TSS_TYPE");
-
- ACE_SOCK_Connector connector;
- ACE_SOCK_Stream *stream = 0;
-
- ACE_NEW_RETURN (stream,
- ACE_SOCK_Stream,
- 0);
-
- if (connector.connect (*stream, server_address_) == -1)
- {
- delete stream;
- errno = ECONNREFUSED;
- return 0;
- }
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TSS_Connection new connection\n")));
- return stream;
-}
-
-ACE_TSS_Connection::operator ACE_SOCK_Stream *(void)
-{
- return this->get_connection ();
-}
-
-void
-ACE_TSS_Connection::dump (void) const
-{
- ACE_TRACE ("ACE_TSS_Connection::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TSS_Connection::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("server_address_\n")));
- server_address_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
- ACE_TSS<ACE_SOCK_Stream>::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Remote_Token_Proxy::ACE_Remote_Token_Proxy (void)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::ACE_Remote_Token_Proxy");
-}
-
-ACE_Remote_Token_Proxy::~ACE_Remote_Token_Proxy (void)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::~ACE_Remote_Token_Proxy");
-}
-
-int
-ACE_Remote_Token_Proxy::open (const ACE_TCHAR *name,
- int ignore_deadlock,
- int debug)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::open");
- ignore_shadow_deadlock_ = ignore_deadlock;
- return ACE_Token_Proxy::open (name, 0, debug);
-}
-
-void
-ACE_Remote_Token_Proxy::set_server_address (const ACE_INET_Addr &server_address)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::set_server_address");
- ACE_Token_Connections::instance ()->set_server_address (server_address);
-}
-
-int
-ACE_Remote_Token_Proxy::initiate_connection (void)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::initiate_connection");
- if (token_ == 0)
- {
- errno = ENOENT;
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("ACE_Remote_Token_Proxy not open.\n")), -1);
- }
-
- ACE_SOCK_Stream *peer = ACE_Token_Connections::instance ()->get_connection ();
- return peer == 0 ? 0 : 1;
-}
-
-// Do the work of sending a request and getting a reply.
-
-int
-ACE_Remote_Token_Proxy::request_reply (ACE_Token_Request &request,
- ACE_Synch_Options &)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::request_reply");
- void *buffer;
- ssize_t length;
-
- if ((length = request.encode (buffer)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("encode failed")), -1);
-
- ACE_SOCK_Stream *peer = ACE_Token_Connections::instance ()->get_connection ();
-
- if (peer == 0)
- return -1;
-
- // Transmit request via a blocking send.
-
- if (peer->send_n (buffer, length) != length)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("send_n failed")), -1);
- else
- {
- ACE_Token_Reply reply;
-
- // Receive reply via blocking read.
-
- if (peer->recv (&reply, sizeof reply) != sizeof reply)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("recv failed")), -1);
-
- if (reply.decode () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("decode failed")), -1);
-
- errno = int (reply.errnum ());
- if (errno != 0)
- ACE_RETURN (-1);
- else
- return 0;
- }
-}
-
-int
-ACE_Remote_Token_Proxy::acquire (int notify,
- void (*sleep_hook)(void *),
- ACE_Synch_Options &options)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::acquire");
-
- // First grab the local shadow mutex.
- if (ACE_Token_Proxy::acquire (notify,
- sleep_hook,
- ACE_Synch_Options::asynch) == -1)
- {
- // Acquire failed, deal with it...
- switch (errno)
- {
- case EWOULDBLOCK :
- // Whoah, we detected wouldblock via the shadow mutex!
- if (debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) shadow: acquire will block, owner is %s\n"),
- this->token_->owner_id ()));
- // No error, but would block,
- break;
-
- case EDEADLK :
- if (debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) shadow: deadlock detected\n")));
-
- if (ignore_shadow_deadlock_)
- break;
- else
- {
- errno = EDEADLK;
- ACE_RETURN (-1);
- }
-
- default :
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%t) %p shadow acquire failed\n"),
- ACE_TEXT ("ACE_Remote_Token_Proxy")),
- -1);
- }
- }
-
- ACE_Token_Request request (token_->type (),
- this->type (),
- ACE_Token_Request::ACQUIRE,
- this->name (),
- this->client_id (),
- options);
-
- request.notify (notify);
-
- int result = this->request_reply (request, options);
-
- if (result == -1)
- {
- // Update the local shadow copy.
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("error on remote acquire, releasing shadow mutex.\n")));
- ACE_Token_Proxy::release ();
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) acquired %s remotely.\n"), this->name ()));
- // Our shadow call may have failed. However, it's still a race
- // to the remote server. If we beat the client which holds the
- // local token, we need to fix things locally to reflect the
- // actual ownership. All that should happen is that our waiter
- // is moved to the front of the waiter list.
- token_->make_owner (waiter_);
- }
-
- return result;
-}
-
-int
-ACE_Remote_Token_Proxy::tryacquire (void (*sleep_hook)(void *))
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::tryacquire");
-
- // If we can detect locally that the tryacquire will fail, there is
- // no need to go remote.
- if (ACE_Token_Proxy::tryacquire (sleep_hook) == -1)
- {
- if (debug_)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("shadow try acquire failed\n")));
- }
-
- return -1;
- }
-
- ACE_Token_Request request (token_->type (),
- this->type (),
- ACE_Token_Request::TRY_ACQUIRE,
- this->name (),
- this->client_id (),
- ACE_Synch_Options::synch);
-
- return this->request_reply (request,
- ACE_Synch_Options::synch);
-}
-
-int
-ACE_Remote_Token_Proxy::renew (int requeue_position,
- ACE_Synch_Options &options)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::renew");
-
- if (ACE_Token_Proxy::renew (requeue_position,
- ACE_Synch_Options::asynch) == -1)
- {
- // Check for error.
- if (errno != EWOULDBLOCK)
- return -1;
- else if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%t) shadow: renew would block. owner %s.\n"),
- this->token_->owner_id ()));
- }
-
- ACE_Token_Request request (token_->type (),
- this->type (),
- ACE_Token_Request::RENEW,
- this->name (),
- this->client_id (),
- options);
-
- request.requeue_position (requeue_position);
-
- int result = this->request_reply (request, options);
-
- if (result == -1)
- {
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- ACE_Token_Proxy::release ();
- }
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p error on remote renew, releasing shadow mutex.\n"),
- ACE_TEXT ("ACE_Remote_Token_Proxy")), -1);
- }
- else
- {
- if (debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) renewed %s remotely.\n"), this->name ()));
- // Make sure that the local shadow reflects our new ownership.
- token_->make_owner (waiter_);
- return result;
- }
-}
-
-int
-ACE_Remote_Token_Proxy::release (ACE_Synch_Options &options)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::release");
-
- ACE_Token_Request request (token_->type (),
- this->type (),
- ACE_Token_Request::RELEASE,
- this->name (),
- this->client_id (),
- options);
-
- int result = this->request_reply (request, options);
- if (result == 0)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) released %s remotely.\n"), this->name ()));
-
- // whether success or failure, we're going to release the shadow.
- // If race conditions exist such that we are no longer the owner,
- // this release will perform a remove.
- if (ACE_Token_Proxy::release () == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) shadow: release failed\n")));
-
- return result;
-}
-
-int
-ACE_Remote_Token_Proxy::remove (ACE_Synch_Options &)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::remove");
- return 0;
-}
-
-void
-ACE_Remote_Token_Proxy::token_acquired (ACE_TPQ_Entry *)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::token_acquired");
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) shadow token %s acquired\n"),
- this->client_id (),
- this->name ()));
- // ACE_Token_Proxy::token_acquired (vp);
-}
-
-const ACE_TCHAR*
-ACE_Remote_Token_Proxy::owner_id (void)
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::owner_id");
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("owner_id called\n")));
- // @@ special operation
- return 0;
-}
-
-void
-ACE_Remote_Token_Proxy::dump (void) const
-{
- ACE_TRACE ("ACE_Remote_Token_Proxy::owner_id");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Tokens::dump:\n")
- ACE_TEXT (" ignore_shadow_deadlock_ = %d\n"),
- ignore_shadow_deadlock_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
- ACE_Token_Proxy::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Remote_Mutex::dump (void) const
-{
- ACE_TRACE ("ACE_Remote_Mutex::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Remote_Mutex::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
- ACE_Remote_Token_Proxy::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Remote_RLock::dump (void) const
-{
- ACE_TRACE ("ACE_Remote_RLock::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Remote_RLock::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
- ACE_Remote_Token_Proxy::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Remote_WLock::dump (void) const
-{
- ACE_TRACE ("ACE_Remote_WLock::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Remote_WLock::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
- ACE_Remote_Token_Proxy::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_TSS <ACE_SOCK_Stream>;
-template class ACE_Singleton <ACE_TSS_Connection, ACE_TSS_CONNECTION_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_TSS <ACE_SOCK_Stream>
-#pragma instantiate ACE_Singleton <ACE_TSS_Connection, ACE_TSS_CONNECTION_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Remote_Tokens.h b/ace/Remote_Tokens.h
deleted file mode 100644
index c0e2fb041f8..00000000000
--- a/ace/Remote_Tokens.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Remote_Tokens.h
-//
-// = AUTHOR
-// Douglas C. Schmidt (schmidt@cs.wustl.edu) and
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_REMOTE_MUTEX_H
-#define ACE_REMOTE_MUTEX_H
-#include "ace/pre.h"
-
-#include "ace/INET_Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SOCK_Connector.h"
-#include "ace/SOCK_Stream.h"
-#include "ace/Synch_Options.h"
-#include "ace/Local_Tokens.h"
-#include "ace/Token_Request_Reply.h"
-
-class ACE_Export ACE_Remote_Token_Proxy : public ACE_Token_Proxy
-{
- // = TITLE
- // Proxy for acquiring, renewing, and releasing a distributed
- // synchronization token.
- //
- // = DESCRIPTION
- // The Remote_Token_Proxy class implements the mechanisms for
- // distributed token operations. It is similar to the
- // ACE_Token_Proxy.
- //
- // = BUGS
- // Distributed sleep_hooks have not been implemented. <owner_id>
- // is not implemented.
-public:
- ACE_Remote_Token_Proxy (void);
- // Null construction.
-
- virtual ~ACE_Remote_Token_Proxy (void);
- // Death.
-
- int open (const ACE_TCHAR *name,
- int ignore_deadlock = 0,
- int debug = 0);
- // Same as Token_Proxy. <name> is the string uniquely identifying
- // the token. <ignore_deadlock> can be 1 to disable deadlock
- // notifications. <debug> prints debug messages.
-
-
- int initiate_connection (void);
- // Open a connection with the token server. This only need be used
- // when the user wishes to explicitly open a connection to check if
- // the server exists. Connections are stored in the
- // ACE_Token_Connections singleton as thread-specific data. That
- // is, every thread has only one connection that is used for all
- // remote tokens.
-
- virtual int acquire (int notify = 0,
- void (*sleep_hook)(void *) = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::synch);
- // Acquire the distributed token. If notify is specified and the
- // token is already held, the owner is notified. options contains
- // the timeout value for the acquire call. The timer is kept at the
- // token server. Asynchronous operations are not supported.
- // Returns 0 on success, -1 on failure with <errno> == problem.
-
- virtual int tryacquire (void (*sleep_hook)(void *) = 0);
- // Try to acquire the distributed token. If the token is already
- // held, the call returns without queueing the caller as a waiter.
- // Returns 0 on success (the token was acquired), and -1 with
- // EWOULDBLOCK if the token was already held.
-
- virtual int renew (int requeue_position = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::synch);
- // Renew the token by offering to release it if there are any other
- // waiters, otherwise get the token back immediately. This renew
- // has the same semantics as ACE_Local_Mutex release. It is
- // semantically equivalent to <release> followed by <acquire>, but
- // it is faster. options contains the timeout value used if renew
- // blocks. As with acquire, the timer is maintained at the token
- // server. If there are waiters and requeue_position == -1, the
- // caller is queued at the rear of the waiter list. Otherwise,
- // requeue_position specifies the number of waiters to "let by"
- // before reacquiring the token (effectively, the position in the
- // waiter list.)
-
- virtual int release (ACE_Synch_Options &options =
- ACE_Synch_Options::synch);
- // Release the distributed token. Similar to ACE_Local_Mutex, if the
- // caller is not the owner, it is removed from the waiter list (if
- // applicable.) Returns 0 on success, -1 on failure with <errno> ==
- // problem.
-
- virtual int remove (ACE_Synch_Options &options =
- ACE_Synch_Options::synch);
- // Become interface compliant for ACE_Guard<>. This has no
- // functionality.
-
- virtual void token_acquired (ACE_TPQ_Entry *);
- // Override the default to do nothing.
-
- virtual const ACE_TCHAR* owner_id (void);
- // the client id of the current token holder
-
- static void set_server_address (const ACE_INET_Addr &server_address);
- // sets the server address for all instances of ACE_Remote_Token_Proxy
- // If this isn't called, the environment variable TOKEN_SERVER is
- // checked for the server address. If that is not specified, all
- // ACE_Remote_** operations will fail.
-
- void dump (void) const;
- // Dump the state of the class.
-
-protected:
-
- int ignore_shadow_deadlock_;
- // if shadows report deadlock, go remote anyway
-
- int request_reply (ACE_Token_Request &request,
- ACE_Synch_Options &options);
- // Perform the request and wait for the reply.
-};
-
-class ACE_Export ACE_Remote_Mutex : public ACE_Remote_Token_Proxy
-{
- // = TITLE
- // Proxy for acquiring, renewing, and releasing a distributed
- // mutex.
- //
- // = DESCRIPTION
- // This is the remote equivalent to ACE_Local_Mutex. The
- // Remote_Mutex class offers methods for acquiring, renewing, and
- // releasing a distributed synchronization mutex. Similar to
- // ACE_Local_Mutex, ACE_Remote_Token_Proxy offers recursive
- // acquisition, FIFO waiter ordering, and deadlock detection. It
- // depends on the Token Server for its distributed synchronization
- // semantics.
-public:
- ACE_Remote_Mutex (void);
- // Null creation. Remote_Token_Proxy::open must be called.
-
- ACE_Remote_Mutex (const ACE_TCHAR *token_name,
- int ignore_deadlock = 0,
- int debug = 0);
- // Calls Remote_Token_Proxy::open for you.
-
- void dump (void) const;
- // Dump the state of the class.
-
- virtual ACE_Token_Proxy *clone (void) const;
- // Return deep copy.
-
-protected:
- virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
- // Make the correct type of ACE_Tokens. This is called by the Token
- // Manager.
-};
-
-class ACE_Export ACE_Remote_RLock : public ACE_Remote_Token_Proxy
-{
- // = TITLE
- // Proxy for acquiring, renewing, and releasing a distributed
- // readers lock.
- //
- // = DESCRIPTION
- // This is the remote equivalent to ACE_Local_RLock. Multiple
- // readers can hold the lock simultaneously when no writers have
- // the lock. Alternatively, when a writer holds the lock, no other
- // participants (readers or writers) may hold the lock.
- // ACE_Remote_RLock depends on the ACE Token Server for its
- // distributed synchronization semantics.
-public:
- ACE_Remote_RLock (void);
-
- ACE_Remote_RLock (const ACE_TCHAR *token_name,
- int ignore_deadlock = 0,
- int debug = 0);
-
- ACE_Remote_RLock (const ACE_Remote_RLock &mutex);
-
- void dump (void) const;
- // Dump the state of the class.
-
- virtual int type (void) const;
- // Returns ACE_RW_Token::RLOCK;
-
- virtual ACE_Token_Proxy *clone (void) const;
- // Return deep copy.
-
-protected:
- virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
- // Make the correct type of ACE_Tokens. This is called by the Token
- // Manager.
-};
-
-class ACE_Export ACE_Remote_WLock : public ACE_Remote_Token_Proxy
-{
- // = TITLE
- // Proxy for acquiring, renewing, and releasing a distributed
- // writers lock.
- //
- // = DESCRIPTION
- // Shields applications from details of interacting with the
- // ACE_Token_Server. The token_name_ is just the string that the
- // Token Server uses to identify the token. The client_id_ (also
- // used by the Token Server,) identifies the owner of the token and
- // is used for deadlock detection.
-public:
- ACE_Remote_WLock (void);
-
- ACE_Remote_WLock (const ACE_TCHAR *token_name,
- int ignore_deadlock = 0,
- int debug = 0);
-
- ACE_Remote_WLock (const ACE_Remote_WLock &mutex);
-
- void dump (void) const;
- // Dump the state of the class.
-
- virtual int type (void) const;
- // Returns ACE_RW_Token::WLOCK;
-
- virtual ACE_Token_Proxy *clone (void) const;
- // Return deep copy.
-
-protected:
- virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
- // Make the correct type of ACE_Tokens. This is called by the Token
- // Manager.
-};
-
-class ACE_Export ACE_TSS_Connection : public ACE_TSS<ACE_SOCK_Stream>
-{
- // = TITLE
- // Class for providing a connection per thread.
- //
- // = DESCRIPTION
- // ACE_TSS_Connection provides a single access point for all
- // threads to access thread-specific connections. This prevents
- // resource-sharing problems such as thread serialization.
-public:
- // Necessary to make some compilers work...
- ACE_TSS_Connection (void);
- ~ACE_TSS_Connection (void);
-
- ACE_SOCK_Stream *get_connection (void);
- // retrieve the thread's connection
-
- virtual ACE_SOCK_Stream *make_TSS_TYPE (void) const;
- // Factory Method that creates a new SOCK Stream.
-
- operator ACE_SOCK_Stream *(void);
- // inheritence and operator overloading don't mix. Redefine this
- // from ACE_TSS so that we can use it.
-
- static void set_server_address (const ACE_INET_Addr &server_address);
- // Set the server address.
-
- void dump (void) const;
- // Dump the state of the class.
-
-protected:
- static ACE_INET_Addr server_address_;
- // The address of the Token Server used by all instances of
- // Token_Proxy.
-
-private:
- ACE_TSS_Connection (const ACE_TSS_Connection &);
- void operator= (const ACE_TSS_Connection &);
- // Private: should not be used
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Remote_Tokens.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_REMOTE_TOKEN_H */
diff --git a/ace/Remote_Tokens.i b/ace/Remote_Tokens.i
deleted file mode 100644
index bbd2b2613e7..00000000000
--- a/ace/Remote_Tokens.i
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Remote_Tokens.i
-
-ACE_INLINE
-ACE_Remote_Mutex::ACE_Remote_Mutex (void)
-{
- ACE_TRACE ("ACE_Remote_Mutex::ACE_Remote_Mutex");
-}
-
-ACE_INLINE
-ACE_Remote_Mutex::ACE_Remote_Mutex (const ACE_TCHAR *token_name,
- int ignore_deadlock,
- int debug)
-{
- ACE_TRACE ("ACE_Remote_Mutex::ACE_Remote_Mutex");
- this->open (token_name, ignore_deadlock, debug);
-}
-
-ACE_INLINE ACE_Token_Proxy *
-ACE_Remote_Mutex::clone (void) const
-{
- return new ACE_Remote_Mutex (this->name (),
- ignore_deadlock_,
- debug_);
-}
-
-ACE_INLINE ACE_Tokens *
-ACE_Remote_Mutex::create_token (const ACE_TCHAR *name)
-{
- return new ACE_Mutex_Token (name);
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_Remote_RLock::ACE_Remote_RLock (const ACE_TCHAR *token_name,
- int ignore_deadlock,
- int debug)
-{
- ACE_TRACE ("ACE_Remote_RLock::ACE_Remote_RLock");
- this->open (token_name, ignore_deadlock, debug);
-}
-
-ACE_INLINE ACE_Tokens *
-ACE_Remote_RLock::create_token (const ACE_TCHAR *name)
-{
- return new ACE_RW_Token (name);
-}
-
-ACE_INLINE int
-ACE_Remote_RLock::type (void) const
-{
- return ACE_RW_Token::READER;
-}
-
-ACE_INLINE ACE_Token_Proxy *
-ACE_Remote_RLock::clone (void) const
-{
- return new ACE_Remote_RLock (this->name (),
- ignore_deadlock_,
- debug_);
-}
-
-// ************************************************************
-
-ACE_INLINE
-ACE_Remote_WLock::ACE_Remote_WLock (const ACE_TCHAR *token_name,
- int ignore_deadlock,
- int debug)
-{
- ACE_TRACE ("ACE_Remote_WLock::ACE_Remote_WLock");
- this->open (token_name, ignore_deadlock, debug);
-}
-
-
-ACE_INLINE ACE_Tokens *
-ACE_Remote_WLock::create_token (const ACE_TCHAR *name)
-{
- return new ACE_RW_Token (name);
-}
-
-ACE_INLINE int
-ACE_Remote_WLock::type (void) const
-{
- return ACE_RW_Token::WRITER;
-}
-
-ACE_INLINE ACE_Token_Proxy *
-ACE_Remote_WLock::clone (void) const
-{
- return new ACE_Remote_WLock (this->name (),
- ignore_deadlock_,
- debug_);
-}
diff --git a/ace/SOCK.cpp b/ace/SOCK.cpp
deleted file mode 100644
index 00f5be3f259..00000000000
--- a/ace/SOCK.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-// SOCK.cpp
-// $Id$
-
-#include "ace/SOCK.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK.i"
-#endif
-
-ACE_RCSID(ace, SOCK, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK)
-
-void
-ACE_SOCK::dump (void) const
-{
- ACE_TRACE ("ACE_SOCK::dump");
-}
-
-ACE_SOCK::ACE_SOCK (void)
-{
- // ACE_TRACE ("ACE_SOCK::ACE_SOCK");
-}
-
-// Returns information about the remote peer endpoint (if there is
-// one).
-
-int
-ACE_SOCK::get_remote_addr (ACE_Addr &sa) const
-{
- ACE_TRACE ("ACE_SOCK::get_remote_addr");
-
- int len = sa.get_size ();
- sockaddr *addr = ACE_reinterpret_cast (sockaddr *,
- sa.get_addr ());
-
- if (ACE_OS::getpeername (this->get_handle (),
- addr,
- &len) == -1)
- return -1;
-
- sa.set_size (len);
- return 0;
-}
-
-int
-ACE_SOCK::get_local_addr (ACE_Addr &sa) const
-{
- ACE_TRACE ("ACE_SOCK::get_local_addr");
-
- int len = sa.get_size ();
- sockaddr *addr = ACE_reinterpret_cast (sockaddr *,
- sa.get_addr ());
-
- if (ACE_OS::getsockname (this->get_handle (),
- addr,
- &len) == -1)
- return -1;
-
- sa.set_size (len);
- return 0;
-}
-
-// Close down a ACE_SOCK.
-
-int
-ACE_SOCK::close (void)
-{
- ACE_TRACE ("ACE_SOCK::close");
- int result = 0;
-
- if (this->get_handle () != ACE_INVALID_HANDLE)
- {
- result = ACE_OS::closesocket (this->get_handle ());
- this->set_handle (ACE_INVALID_HANDLE);
- }
- return result;
-}
-
-int
-ACE_SOCK::open (int type,
- int protocol_family,
- int protocol,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK::open");
- int one = 1;
-
- this->set_handle (ACE_OS::socket (protocol_family,
- type,
- protocol));
-
- if (this->get_handle () == ACE_INVALID_HANDLE)
- return -1;
- else if (protocol_family != PF_UNIX
- && reuse_addr
- && this->set_option (SOL_SOCKET,
- SO_REUSEADDR,
- &one,
- sizeof one) == -1)
- {
- this->close ();
- return -1;
- }
- return 0;
-}
-
-// General purpose constructor for performing server ACE_SOCK
-// creation.
-
-ACE_SOCK::ACE_SOCK (int type,
- int protocol_family,
- int protocol,
- int reuse_addr)
-{
- // ACE_TRACE ("ACE_SOCK::ACE_SOCK");
- if (this->open (type,
- protocol_family,
- protocol,
- reuse_addr) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SOCK::ACE_SOCK")));
-}
-
-int
-ACE_SOCK::open (int type,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK::open");
-
- this->set_handle (ACE_OS::socket (protocol_family,
- type,
- protocol,
- protocolinfo,
- g,
- flags));
- int one = 1;
-
- if (this->get_handle () == ACE_INVALID_HANDLE)
- return -1;
- else if (reuse_addr
- && this->set_option (SOL_SOCKET,
- SO_REUSEADDR,
- &one,
- sizeof one) == -1)
- {
- this->close ();
- return -1;
- }
- else
- return 0;
-}
-
-ACE_SOCK::ACE_SOCK (int type,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr)
-{
- // ACE_TRACE ("ACE_SOCK::ACE_SOCK");
- if (this->open (type,
- protocol_family,
- protocol,
- protocolinfo,
- g,
- flags,
- reuse_addr) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SOCK::ACE_SOCK")));
-}
diff --git a/ace/SOCK.h b/ace/SOCK.h
deleted file mode 100644
index 4c02306a523..00000000000
--- a/ace/SOCK.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-//============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-//============================================================================
-
-#ifndef ACE_SOCK_H
-#define ACE_SOCK_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Addr.h"
-#include "ace/IPC_SAP.h"
-#include "ace/QoS_Session.h"
-
-class ACE_Export ACE_SOCK : public ACE_IPC_SAP
-{
- // = TITLE
- // An abstract class that forms the basis for more specific
- // classes, such as <ACE_SOCK_Acceptor> and <ACE_SOCK_Stream>.
- // Do not instantiate this class.
- //
- // = DESCRIPTION
- // This class provides functions that are common to all of the
- // <ACE_SOCK_*> classes. <ACE_SOCK> provides the ability to get
- // and set socket options, get the local and remote addresses,
- // and close the socket.
-public:
- ~ACE_SOCK (void);
- // Default ctor/dtor.
-
- int set_option (int level,
- int option,
- void *optval,
- int optlen) const;
- // Wrapper around the <setsockopt> system call.
-
- int get_option (int level,
- int option,
- void *optval,
- int *optlen) const;
- // Wrapper around the <getsockopt> system call.
-
- int close (void);
- // Close down the socket.
-
- int get_local_addr (ACE_Addr &) const;
- // Return the local endpoint address in the referenced <ACE_Addr>.
- // Returns 0 if successful, else -1.
-
- int get_remote_addr (ACE_Addr &) const;
- // Return the address of the remotely connected peer (if there is
- // one), in the referenced <ACE_Addr>. Returns 0 if successful, else
- // -1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- int open (int type,
- int protocol_family,
- int protocol,
- int reuse_addr);
- // Wrapper around the BSD-style <socket> system call (no QoS).
-
- int open (int type,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr);
- // Wrapper around the QoS-enabled <WSASocket> function.
-
-protected:
- ACE_SOCK (int type,
- int protocol_family,
- int protocol = 0,
- int reuse_addr = 0);
- // Constructor with arguments to call the BSD-style <socket> system
- // call (no QoS).
-
- ACE_SOCK (int type,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr);
- // Constructor with arguments to call the QoS-enabled <WSASocket>
- // function.
-
- ACE_SOCK (void);
- // Default constructor is private to prevent instances of this class
- // from being defined.
-
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_H */
-
-
-
-
diff --git a/ace/SOCK.i b/ace/SOCK.i
deleted file mode 100644
index 78b17d3e36e..00000000000
--- a/ace/SOCK.i
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SOCK.i
-
-ASYS_INLINE
-ACE_SOCK::~ACE_SOCK (void)
-{
- // ACE_TRACE ("ACE_SOCK::~ACE_SOCK");
-}
-
-ASYS_INLINE int
-ACE_SOCK::set_option (int level,
- int option,
- void *optval,
- int optlen) const
-{
- ACE_TRACE ("ACE_SOCK::set_option");
- return ACE_OS::setsockopt (this->get_handle (), level,
- option, (char *) optval, optlen);
-}
-
-// Provides access to the ACE_OS::getsockopt system call.
-
-ASYS_INLINE int
-ACE_SOCK::get_option (int level,
- int option,
- void *optval,
- int *optlen) const
-{
- ACE_TRACE ("ACE_SOCK::get_option");
- return ACE_OS::getsockopt (this->get_handle (), level,
- option, (char *) optval, optlen);
-}
diff --git a/ace/SOCK_Acceptor.cpp b/ace/SOCK_Acceptor.cpp
deleted file mode 100644
index 4587e17a687..00000000000
--- a/ace/SOCK_Acceptor.cpp
+++ /dev/null
@@ -1,343 +0,0 @@
-// SOCK_Acceptor.cpp
-// $Id$
-
-#include "ace/SOCK_Acceptor.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Acceptor.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/Synch.h"
-
-ACE_RCSID(ace, SOCK_Acceptor, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Acceptor)
-
-// Do nothing routine for constructor.
-
-ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (void)
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::ACE_SOCK_Acceptor");
-}
-
-// Performs the timed accept operation.
-
-int
-ACE_SOCK_Acceptor::shared_accept_start (ACE_Time_Value *timeout,
- int restart,
- int &in_blocking_mode) const
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::shared_accept_start");
-
- ACE_HANDLE handle = this->get_handle ();
-
- // Handle the case where we're doing a timed <accept>.
- if (timeout != 0)
- {
- if (ACE::handle_timed_accept (handle,
- timeout,
- restart) == -1)
- return -1;
- else
- {
- in_blocking_mode = ACE_BIT_DISABLED (ACE::get_flags (handle),
- ACE_NONBLOCK);
- // Set the handle into non-blocking mode if it's not already
- // in it.
- if (in_blocking_mode
- && ACE::set_flags (handle,
- ACE_NONBLOCK) == -1)
- return -1;
- }
- }
-
- return 0;
-}
-
-int
-ACE_SOCK_Acceptor::shared_accept_finish (ACE_SOCK_Stream new_stream,
- int in_blocking_mode,
- int reset_new_handle) const
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::shared_accept_finish ()");
-
- ACE_HANDLE new_handle = new_stream.get_handle ();
-
- // Check to see if we were originally in blocking mode, and if so,
- // set the <new_stream>'s handle and <this> handle to be in blocking
- // mode.
- if (in_blocking_mode)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
-
- // Only disable ACE_NONBLOCK if we weren't in non-blocking mode
- // originally.
- ACE::clr_flags (this->get_handle (),
- ACE_NONBLOCK);
- ACE::clr_flags (new_handle,
- ACE_NONBLOCK);
- }
-
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- if (reset_new_handle)
- // Reset the event association inherited by the new handle.
- ::WSAEventSelect ((SOCKET) new_handle, 0, 0);
-#else
- ACE_UNUSED_ARG (reset_new_handle);
-#endif /* ACE_WIN32 */
-
- return new_handle == ACE_INVALID_HANDLE ? -1 : 0;
-}
-
-// General purpose routine for accepting new connections.
-
-int
-ACE_SOCK_Acceptor::accept (ACE_SOCK_Stream &new_stream,
- ACE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle) const
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::accept");
-
- int in_blocking_mode = 0;
- if (this->shared_accept_start (timeout,
- restart,
- in_blocking_mode) == -1)
- return -1;
- else
- {
- // On Win32 the third parameter to <accept> must be a NULL
- // pointer if we want to ignore the client's address.
- int *len_ptr = 0;
- sockaddr *addr = 0;
- int len = 0;
-
- if (remote_addr != 0)
- {
- len = remote_addr->get_size ();
- len_ptr = &len;
- addr = (sockaddr *) remote_addr->get_addr ();
- }
-
- do
- new_stream.set_handle (ACE_OS::accept (this->get_handle (),
- addr,
- len_ptr));
- while (new_stream.get_handle () == ACE_INVALID_HANDLE
- && restart != 0
- && errno == EINTR
- && timeout == 0);
-
- // Reset the size of the addr, which is only necessary for UNIX
- // domain sockets.
- if (new_stream.get_handle () != ACE_INVALID_HANDLE
- && remote_addr != 0)
- remote_addr->set_size (len);
- }
-
- return this->shared_accept_finish (new_stream,
- in_blocking_mode,
- reset_new_handle);
-}
-
-int
-ACE_SOCK_Acceptor::accept (ACE_SOCK_Stream &new_stream,
- ACE_Accept_QoS_Params qos_params,
- ACE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle) const
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::accept");
-
- int in_blocking_mode = 0;
- if (this->shared_accept_start (timeout,
- restart,
- in_blocking_mode) == -1)
- return -1;
- else
- {
- // On Win32 the third parameter to <accept> must be a NULL
- // pointer if we want to ignore the client's address.
- int *len_ptr = 0;
- int len = 0;
- sockaddr *addr = 0;
-
- if (remote_addr != 0)
- {
- len = remote_addr->get_size ();
- len_ptr = &len;
- addr = (sockaddr *) remote_addr->get_addr ();
- }
-
- do
- new_stream.set_handle (ACE_OS::accept (this->get_handle (),
- addr,
- len_ptr,
- qos_params));
- while (new_stream.get_handle () == ACE_INVALID_HANDLE
- && restart != 0
- && errno == EINTR
- && timeout == 0);
-
- // Reset the size of the addr, which is only necessary for UNIX
- // domain sockets.
- if (new_stream.get_handle () != ACE_INVALID_HANDLE
- && remote_addr != 0)
- remote_addr->set_size (len);
- }
-
- return this->shared_accept_finish (new_stream,
- in_blocking_mode,
- reset_new_handle);
-}
-
-void
-ACE_SOCK_Acceptor::dump (void) const
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::dump");
-}
-
-int
-ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap,
- int protocol_family,
- int backlog)
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::shared_open");
- int error = 0;
-
- if (protocol_family == PF_INET)
- {
- sockaddr_in local_inet_addr;
- ACE_OS::memset (ACE_reinterpret_cast (void *,
- &local_inet_addr),
- 0,
- sizeof local_inet_addr);
-
- if (local_sap == ACE_Addr::sap_any)
- {
- local_inet_addr.sin_port = 0;
- local_inet_addr.sin_addr.s_addr = htonl (INADDR_ANY);
- }
- else
- local_inet_addr = *ACE_reinterpret_cast (sockaddr_in *,
- local_sap.get_addr ());
- if (local_inet_addr.sin_port == 0)
- {
- if (ACE::bind_port (this->get_handle (),
- local_inet_addr.sin_addr.s_addr) == -1)
- error = 1;
- }
- else if (ACE_OS::bind (this->get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- &local_inet_addr),
- sizeof local_inet_addr) == -1)
- error = 1;
- }
- else if (ACE_OS::bind (this->get_handle (),
- (sockaddr *) local_sap.get_addr (),
- local_sap.get_size ()) == -1)
- error = 1;
-
- if (error != 0
- || ACE_OS::listen (this->get_handle (),
- backlog) == -1)
- {
- error = 1;
- this->close ();
- }
-
- return error ? -1 : 0;
-}
-
-int
-ACE_SOCK_Acceptor::open (const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::open");
-
- if (ACE_SOCK::open (SOCK_STREAM,
- protocol_family,
- protocol,
- protocolinfo,
- g,
- flags,
- reuse_addr) == -1)
- return -1;
- else
- return this->shared_open (local_sap,
- protocol_family,
- backlog);
-}
-
-ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::ACE_SOCK_Acceptor");
- if (this->open (local_sap,
- protocolinfo,
- g,
- flags,
- reuse_addr,
- protocol_family,
- backlog,
- protocol) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SOCK_Acceptor")));
-}
-
-// General purpose routine for performing server ACE_SOCK creation.
-
-int
-ACE_SOCK_Acceptor::open (const ACE_Addr &local_sap,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::open");
-
- if (ACE_SOCK::open (SOCK_STREAM,
- protocol_family,
- protocol,
- reuse_addr) == -1)
- return -1;
- else
- return this->shared_open (local_sap,
- protocol_family,
- backlog);
-}
-
-// General purpose routine for performing server ACE_SOCK creation.
-
-ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::ACE_SOCK_Acceptor");
- if (this->open (local_sap,
- reuse_addr,
- protocol_family,
- backlog,
- protocol) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SOCK_Acceptor")));
-}
diff --git a/ace/SOCK_Acceptor.h b/ace/SOCK_Acceptor.h
deleted file mode 100644
index b4871f328c8..00000000000
--- a/ace/SOCK_Acceptor.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK_Acceptor.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SOCK_ACCEPTOR_H
-#define ACE_SOCK_ACCEPTOR_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Time_Value.h"
-
-class ACE_Export ACE_SOCK_Acceptor : public ACE_SOCK
-{
- // = TITLE
- // Defines a factory that creates new <ACE_Stream>s passively.
- //
- // = DESCRIPTION
- // The <ACE_SOCK_Acceptor> has its own "passive-mode" socket.
- // This serves as a factory to create so-called "data-mode"
- // sockets, which are what the <ACE_SOCK_Stream> encapsulates.
- // Therefore, by inheriting from <ACE_SOCK>, <ACE_SOCK_Acceptor>
- // gets its very own socket.
-public:
- // = Initialization and termination methods.
- ACE_SOCK_Acceptor (void);
- // Default constructor.
-
- ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
- int reuse_addr = 0,
- int protocol_family = PF_INET,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initialize a passive-mode BSD-style acceptor socket (no QoS).
- // <local_sap> is the address that we're going to listen for
- // connections on. If <reuse_addr> is 1 then we'll use the
- // <SO_REUSEADDR> to reuse this address.
-
- ACE_SOCK_Acceptor (const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int protocol_family,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initialize a passive-mode QoS-enabled acceptor socket. Returns 0
- // on success and -1 on failure.
-
- int open (const ACE_Addr &local_sap,
- int reuse_addr = 0,
- int protocol_family = PF_INET,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initialize a passive-mode BSD-style acceptor socket (no QoS).
- // <local_sap> is the address that we're going to listen for
- // connections on. If <reuse_addr> is 1 then we'll use the
- // <SO_REUSEADDR> to reuse this address. Returns 0 on success and
- // -1 on failure.
-
- int open (const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int protocol_family,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initialize a passive-mode QoS-enabled acceptor socket. Returns 0
- // on success and -1 on failure.
-
- ~ACE_SOCK_Acceptor (void);
- // Default dtor.
-
- // = Passive connection <accept> methods.
- int accept (ACE_SOCK_Stream &new_stream,
- ACE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0) const;
- // Accept a new <ACE_SOCK_Stream> connection. A <timeout> of 0
- // means block forever, a <timeout> of {0, 0} means poll. <restart>
- // == 1 means "restart if interrupted," i.e., if errno == EINTR.
- // Note that <new_stream> inherits the "blocking mode" of <this>
- // <ACE_SOCK_Acceptor>, i.e., if <this> acceptor factory is in
- // non-blocking mode, the <net_stream> will be in non-blocking mode
- // and vice versa.
-
- int accept (ACE_SOCK_Stream &new_stream,
- ACE_Accept_QoS_Params qos_params,
- ACE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0) const;
- // Accept a new <ACE_SOCK_Stream> connection using the QoS
- // information in <qos_params>. A <timeout> of 0 means block
- // forever, a <timeout> of {0, 0} means poll. <restart> == 1 means
- // "restart if interrupted," i.e., if errno == EINTR. Note that
- // <new_stream> inherits the "blocking mode" of <this>
- // <ACE_SOCK_Acceptor>, i.e., if <this> acceptor factory is in
- // non-blocking mode, the <net_stream> will be in non-blocking mode
- // and vice versa.
-
- // = Meta-type info
- typedef ACE_INET_Addr PEER_ADDR;
- typedef ACE_SOCK_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- int shared_accept_start (ACE_Time_Value *timeout,
- int restart,
- int &in_blocking_mode) const;
- // Perform operations that must occur before <ACE_OS::accept> is
- // called.
-
- int shared_accept_finish (ACE_SOCK_Stream new_stream,
- int in_blocking_mode,
- int reset_new_handle) const;
- // Perform operations that must occur after <ACE_OS::accept> is
- // called.
-
- int shared_open (const ACE_Addr &local_sap,
- int protocol_family,
- int backlog);
- // This method factors out the common <open> code and is called by
- // both the QoS-enabled <open> method and the BSD-style <open>
- // method.
-
-private:
- int get_remote_addr (ACE_Addr &) const;
- // Do not allow this function to percolate up to this interface...
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Acceptor.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_ACCEPTOR_H */
diff --git a/ace/SOCK_Acceptor.i b/ace/SOCK_Acceptor.i
deleted file mode 100644
index 0ba44700809..00000000000
--- a/ace/SOCK_Acceptor.i
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SOCK_Acceptor.i
-
-ASYS_INLINE
-ACE_SOCK_Acceptor::~ACE_SOCK_Acceptor (void)
-{
- ACE_TRACE ("ACE_SOCK_Acceptor::~ACE_SOCK_Acceptor");
-}
-
-
diff --git a/ace/SOCK_CODgram.cpp b/ace/SOCK_CODgram.cpp
deleted file mode 100644
index a0b21dc0694..00000000000
--- a/ace/SOCK_CODgram.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// SOCK_CODgram.cpp
-// $Id$
-
-#include "ace/SOCK_CODgram.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_CODgram.i"
-#endif
-
-ACE_RCSID(ace, SOCK_CODgram, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_CODgram)
-
-void
-ACE_SOCK_CODgram::dump (void) const
-{
- ACE_TRACE ("ACE_SOCK_CODgram::dump");
-}
-
-// Here's the general-purpose constructor.
-
-ACE_SOCK_CODgram::ACE_SOCK_CODgram (const ACE_Addr &remote, const ACE_Addr &local,
- int protocol_family, int protocol,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK_CODgram::ACE_SOCK_CODgram");
- if (this->open (remote, local,
- protocol_family, protocol, reuse_addr) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_SOCK_CODgram")));
-}
-
-/* This is the general-purpose open routine. Note that it performs
- a different set of functions depending on the LOCAL and REMOTE
- addresses passed to it. Here's the basic logic:
-
- 1. remote == ACE_Addr::sap_any && local == ACE_Addr::sap_any
- if protocol_family == PF_INET then
- bind the local address to a randomly generated port number...
-
- 2. remote == ACE_Addr::sap_any && local != ACE_Addr::sap_any
- we are just binding the local address
- (used primarily by servers)
-
- 3. remote != ACE_Addr::sap_any && local == ACE_Addr::sap_any
- we are connecting to the remote address
- (used primarily by clients)
-
- 4. remote != ACE_Addr::sap_any && local != ACE_Addr::sap_any
- we are binding to the local address
- and connecting to the remote address
-*/
-
-int
-ACE_SOCK_CODgram::open (const ACE_Addr &remote, const ACE_Addr &local,
- int protocol_family, int protocol,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK_CODgram::open");
- if (ACE_SOCK::open (SOCK_DGRAM, protocol_family,
- protocol, reuse_addr) == -1)
- return -1;
- else
- {
- int error = 0;
-
- if (local == ACE_Addr::sap_any && remote == ACE_Addr::sap_any)
- {
- // Assign an arbitrary port number from the transient range!!
-
- if (protocol_family == PF_INET
- && ACE::bind_port (this->get_handle ()) == -1)
- error = 1;
- }
- // We are binding just the local address.
- else if (local != ACE_Addr::sap_any && remote == ACE_Addr::sap_any)
- {
- if (ACE_OS::bind (this->get_handle (), (sockaddr *) local.get_addr (),
- local.get_size ()) == -1)
- error = 1;
- }
- // We are connecting to the remote address.
- else if (local == ACE_Addr::sap_any && remote != ACE_Addr::sap_any)
- {
- if (ACE_OS::connect (this->get_handle (), (sockaddr *) remote.get_addr (),
- remote.get_size ()) == -1)
- error = 1;
- }
- // We are binding to the local address and connecting to the
- // remote addresses.
- else
- {
- if (ACE_OS::bind (this->get_handle (), (sockaddr *) local.get_addr (),
- local.get_size ()) == -1
- || ACE_OS::connect (this->get_handle (), (sockaddr *) remote.get_addr (),
- remote.get_size ()) == -1)
- error = 1;
- }
- if (error)
- {
- this->close ();
- this->set_handle (ACE_INVALID_HANDLE);
- }
- return error ? -1 : 0;
- }
-}
diff --git a/ace/SOCK_CODgram.h b/ace/SOCK_CODgram.h
deleted file mode 100644
index a865b8075ce..00000000000
--- a/ace/SOCK_CODgram.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK_CODgram.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SOCK_CODGRAM_H
-#define ACE_SOCK_CODGRAM_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_IO.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Addr.h"
-
-class ACE_Export ACE_SOCK_CODgram : public ACE_SOCK_IO
-{
- // = TITLE
- // Defines the member functions for the ACE_SOCK connected
- // datagram abstraction.
-public:
- // = Initialization methods.
- ACE_SOCK_CODgram (void);
- // Default constructor.
-
- ACE_SOCK_CODgram (const ACE_Addr &remote_sap,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int protocol_family = PF_INET,
- int protocol = 0,
- int reuse_addr = 0);
-
- ~ACE_SOCK_CODgram (void);
- // Default dtor.
-
- // Initiate a connected dgram.
-
- int open (const ACE_Addr &remote_sap,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int protocol_family = PF_INET,
- int protocol = 0,
- int reuse_addr = 0);
- // Initiate a connected dgram.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_CODgram.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_CODGRAM_H */
diff --git a/ace/SOCK_CODgram.i b/ace/SOCK_CODgram.i
deleted file mode 100644
index 7dd5b40a1d6..00000000000
--- a/ace/SOCK_CODgram.i
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SOCK_CODgram.i
-
-ASYS_INLINE
-ACE_SOCK_CODgram::ACE_SOCK_CODgram (void)
-{
- ACE_TRACE ("ACE_SOCK_CODgram::ACE_SOCK_CODgram");
-}
-
-ASYS_INLINE
-ACE_SOCK_CODgram::~ACE_SOCK_CODgram (void)
-{
- ACE_TRACE ("ACE_SOCK_CODgram::~ACE_SOCK_CODgram");
-}
-
-
diff --git a/ace/SOCK_Connector.cpp b/ace/SOCK_Connector.cpp
deleted file mode 100644
index 68e03648bd0..00000000000
--- a/ace/SOCK_Connector.cpp
+++ /dev/null
@@ -1,315 +0,0 @@
-// SOCK_Connector.cpp
-// $Id$
-
-#include "ace/SOCK_Connector.h"
-#include "ace/INET_Addr.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Connector.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-ACE_RCSID(ace, SOCK_Connector, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Connector)
-
-void
-ACE_SOCK_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_SOCK_Connector::dump");
-}
-
-int
-ACE_SOCK_Connector::shared_open (ACE_SOCK_Stream &new_stream,
- int protocol_family,
- int protocol,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK_Connector::shared_open");
-
- // Only open a new socket if we don't already have a valid handle.
- if (new_stream.get_handle () == ACE_INVALID_HANDLE
- && new_stream.open (SOCK_STREAM,
- protocol_family,
- protocol,
- reuse_addr) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_SOCK_Connector::shared_open (ACE_SOCK_Stream &new_stream,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK_Connector::shared_open");
-
- // Only open a new socket if we don't already have a valid handle.
- if (new_stream.get_handle () == ACE_INVALID_HANDLE
- && new_stream.open (SOCK_STREAM,
- protocol_family,
- protocol,
- protocolinfo,
- g,
- flags,
- reuse_addr) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_SOCK_Connector::shared_connect_start (ACE_SOCK_Stream &new_stream,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap)
-{
- ACE_TRACE ("ACE_SOCK_Connector::shared_connect_start");
-
- if (local_sap != ACE_Addr::sap_any)
- {
- sockaddr *laddr = ACE_reinterpret_cast (sockaddr *,
- local_sap.get_addr ());
- size_t size = local_sap.get_size ();
-
- if (ACE_OS::bind (new_stream.get_handle (),
- laddr,
- size) == -1)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- new_stream.close ();
- return -1;
- }
- }
-
- // Enable non-blocking, if required.
- if (timeout != 0
- && new_stream.enable (ACE_NONBLOCK) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_SOCK_Connector::shared_connect_finish (ACE_SOCK_Stream &new_stream,
- ACE_Time_Value *timeout,
- int result)
-{
- ACE_TRACE ("ACE_SOCK_Connector::shared_connect_finish");
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
-
- if (result == -1 && timeout != 0)
- {
- // Check whether the connection is in progress.
- if (error == EINPROGRESS || error == EWOULDBLOCK)
- {
- // This expression checks if we were polling.
- if (timeout->sec () == 0
- && timeout->usec () == 0)
- error = EWOULDBLOCK;
- // Wait synchronously using timeout.
- else if (this->complete (new_stream,
- 0,
- timeout) == -1)
- error = errno;
- else
- return 0;
- }
- }
-
- // EISCONN is treated specially since this routine may be used to
- // check if we are already connected.
- if (result != -1 || error == EISCONN)
- // Start out with non-blocking disabled on the <new_stream>.
- new_stream.disable (ACE_NONBLOCK);
- else if (!(error == EWOULDBLOCK || error == ETIMEDOUT))
- new_stream.close ();
-
- return result;
-}
-
-// Actively connect and produce a new ACE_SOCK_Stream if things go well...
-
-int
-ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int /* flags */,
- int /* perms */,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Connector::connect");
- if (this->shared_open (new_stream,
- protocol_family,
- protocol,
- reuse_addr) == -1)
- return -1;
- else if (this->shared_connect_start (new_stream,
- timeout,
- local_sap) == -1)
- return -1;
-
- int result = ACE_OS::connect (new_stream.get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- remote_sap.get_addr ()),
- remote_sap.get_size ());
-
- return this->shared_connect_finish (new_stream,
- timeout,
- result);
-}
-
-int
-ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_QoS_Params qos_params,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- ACE_Protocol_Info * protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int /* perms */,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Connector::connect");
- if (this->shared_open (new_stream,
- protocol_family,
- protocol,
- protocolinfo,
- g,
- flags,
- reuse_addr) == -1)
- return -1;
- else if (this->shared_connect_start (new_stream,
- timeout,
- local_sap) == -1)
- return -1;
-
- int result = ACE_OS::connect (new_stream.get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- remote_sap.get_addr ()),
- remote_sap.get_size (),
- qos_params);
-
- return this->shared_connect_finish (new_stream,
- timeout,
- result);
-}
-
-// Try to complete a non-blocking connection.
-
-int
-ACE_SOCK_Connector::complete (ACE_SOCK_Stream &new_stream,
- ACE_Addr *remote_sap,
- ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_SOCK_Connector::complete");
-#if defined (ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS)
- // Win32 has a timing problem - if you check to see if the
- // connection has completed too fast, it will fail - so wait
- // <ACE_NON_BLOCKING_BUG_DELAY> microseconds to let it catch up.
- ACE_Time_Value time (0, ACE_NON_BLOCKING_BUG_DELAY);
- ACE_OS::sleep (time);
-#endif /* ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS */
- ACE_HANDLE h = ACE::handle_timed_complete (new_stream.get_handle (),
- tv);
- // We failed to get connected.
- if (h == ACE_INVALID_HANDLE)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- new_stream.close ();
- return -1;
- }
- else if (remote_sap != 0)
- {
- int len = remote_sap->get_size ();
- sockaddr *addr = ACE_reinterpret_cast (sockaddr *,
- remote_sap->get_addr ());
- if (ACE_OS::getpeername (h,
- addr,
- &len) == -1)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- new_stream.close ();
- return -1;
- }
- }
-
- // Start out with non-blocking disabled on the <new_stream>.
- new_stream.disable (ACE_NONBLOCK);
- return 0;
-}
-
-ACE_SOCK_Connector::ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Connector::ACE_SOCK_Connector");
-
- if (this->connect (new_stream,
- remote_sap,
- timeout,
- local_sap,
- reuse_addr,
- flags,
- perms,
- protocol_family,
- protocol) == -1
- && timeout != 0
- && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SOCK_Connector::ACE_SOCK_Connector")));
-}
-
-ACE_SOCK_Connector::ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_QoS_Params qos_params,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int perms,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Connector::ACE_SOCK_Connector");
-
- if (this->connect (new_stream,
- remote_sap,
- qos_params,
- timeout,
- local_sap,
- protocolinfo,
- g,
- flags,
- reuse_addr,
- perms,
- protocol_family,
- protocol) == -1
- && timeout != 0
- && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SOCK_Connector::ACE_SOCK_Connector")));
-}
diff --git a/ace/SOCK_Connector.h b/ace/SOCK_Connector.h
deleted file mode 100644
index ddf7381b84e..00000000000
--- a/ace/SOCK_Connector.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK_Connector.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SOCK_CONNECTOR_H
-#define ACE_SOCK_CONNECTOR_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Time_Value.h"
-
-class ACE_Export ACE_SOCK_Connector
-{
- // = TITLE
- // Defines a factory that creates new <ACE_Stream>s actively.
- //
- // = DESCRIPTION
- // The <ACE_SOCK_Connector> doesn't have a socket of its own,
- // i.e., it simply "borrows" the one from the ACE_SOCK_Stream
- // that's being connected. The reason for this is that the
- // underlying socket API doesn't use a "factory" socket to connect
- // "data-mode" sockets. Therefore, there's no need to inherit
- // <ACE_SOCK_Connector> from <ACE_SOCK>. A nice side-effect of
- // this is that <ACE_SOCK_Connector>'s do not store state so they
- // can be used reentrantly in multi-threaded programs.
-public:
- // = Initialization and termination methods.
- ACE_SOCK_Connector (void);
- // Default constructor.
-
- ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- ACE_SOCK_Connector (ACE_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_QoS_Params qos_params,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- ACE_Protocol_Info *protocolinfo = 0,
- ACE_SOCK_GROUP g = 0,
- u_long flags = 0,
- int reuse_addr = 0,
- int perms = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <qos_params> contains QoS parameters that are passed
- // to the IntServ (RSVP) and DiffServ protocols. The <timeout> is
- // the amount of time to wait to connect. If it's 0 then we block
- // indefinitely. If *timeout == {0, 0} then the connection is done
- // using non-blocking mode. In this case, if the connection can't
- // be made immediately the value of -1 is returned with <errno ==
- // EWOULDBLOCK>. If *timeout > {0, 0} then this is the amount of
- // time to wait before timing out. If the time expires before the
- // connection is made <errno == ETIME>. The <local_sap> is the
- // value of local address to bind to. If it's the default value of
- // <ACE_Addr::sap_any> then the user is letting the OS do the
- // binding. If <reuse_addr> == 1 then the <local_addr> is reused,
- // even if it hasn't been cleanedup yet.
-
- int connect (ACE_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
- // Note that the <new_stream> always starts out in blocking mode.
-
- int connect (ACE_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_QoS_Params qos_params,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- ACE_Protocol_Info *protocolinfo = 0,
- ACE_SOCK_GROUP g = 0,
- u_long flags = 0,
- int reuse_addr = 0,
- int perms = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <qos_params> contains QoS parameters that are passed
- // to the IntServ (RSVP) and DiffServ protocols. The <timeout> is
- // the amount of time to wait to connect. If it's 0 then we block
- // indefinitely. If *timeout == {0, 0} then the connection is done
- // using non-blocking mode. In this case, if the connection can't
- // be made immediately the value of -1 is returned with <errno ==
- // EWOULDBLOCK>. If *timeout > {0, 0} then this is the amount of
- // time to wait before timing out. If the time expires before the
- // connection is made <errno == ETIME>. The <local_sap> is the
- // value of local address to bind to. If it's the default value of
- // <ACE_Addr::sap_any> then the user is letting the OS do the
- // binding. If <reuse_addr> == 1 then the <local_addr> is reused,
- // even if it hasn't been cleanedup yet.
-
- ~ACE_SOCK_Connector (void);
- // Default dtor.
-
- // = Completion routine.
- int complete (ACE_SOCK_Stream &new_stream,
- ACE_Addr *remote_sap = 0,
- ACE_Time_Value *timeout = 0);
- // Try to complete a non-blocking connection.
- // If connection completion is successful then <new_stream> contains
- // the connected ACE_SOCK_Stream. If <remote_sap> is non-NULL then it
- // will contain the address of the connected peer.
-
- int reset_new_handle (ACE_HANDLE handle);
- // Resets any event associations on this handle
-
- // = Meta-type info
- typedef ACE_INET_Addr PEER_ADDR;
- typedef ACE_SOCK_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- int shared_open (ACE_SOCK_Stream &new_stream,
- int protocol_family,
- int protocol,
- int reuse_addr);
- // Perform operations that ensure the socket is opened using
- // BSD-style semantics (no QoS).
-
- int shared_open (ACE_SOCK_Stream &new_stream,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr);
- // Perform operations that ensure the socket is opened using
- // QoS-enabled semantics.
-
- int shared_connect_start (ACE_SOCK_Stream &new_stream,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap);
- // Perform operations that must be called before <ACE_OS::connect>.
-
- int shared_connect_finish (ACE_SOCK_Stream &new_stream,
- ACE_Time_Value *timeout,
- int result);
- // Perform operations that must be called after <ACE_OS::connect>.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Connector.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_CONNECTOR_H */
diff --git a/ace/SOCK_Connector.i b/ace/SOCK_Connector.i
deleted file mode 100644
index c4801c01cf0..00000000000
--- a/ace/SOCK_Connector.i
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SOCK_Connector.i
-
-// This constructor is used by a client when it wants to connect to
-// the specified REMOTE_SAP address using a blocking open.
-
-ASYS_INLINE
-ACE_SOCK_Connector::~ACE_SOCK_Connector (void)
-{
- ACE_TRACE ("ACE_SOCK_Connector::~ACE_SOCK_Connector");
-}
-
-// Do-nothing constructor...
-
-ASYS_INLINE
-ACE_SOCK_Connector::ACE_SOCK_Connector (void)
-{
- ACE_TRACE ("ACE_SOCK_Connector::ACE_SOCK_Connector");
-}
-
-ASYS_INLINE int
-ACE_SOCK_Connector::reset_new_handle (ACE_HANDLE handle)
-{
- ACE_UNUSED_ARG (handle);
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- // Reset the event association
- return ::WSAEventSelect ((SOCKET) handle,
- NULL,
- 0);
-#else /* !defined ACE_HAS_WINSOCK2 */
- return 0;
-#endif /* ACE_WIN32 */
-}
-
diff --git a/ace/SOCK_Dgram.cpp b/ace/SOCK_Dgram.cpp
deleted file mode 100644
index 7a53f45ae97..00000000000
--- a/ace/SOCK_Dgram.cpp
+++ /dev/null
@@ -1,450 +0,0 @@
-// SOCK_Dgram.cpp
-// $Id$
-
-#include "ace/SOCK_Dgram.h"
-#include "ace/Handle_Set.h"
-#include "ace/Synch.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram.i"
-#endif
-
-ACE_RCSID(ace, SOCK_Dgram, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Dgram)
-
-void
-ACE_SOCK_Dgram::dump (void) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::dump");
-}
-
-// Allows a client to read from a socket without having to provide a
-// buffer to read. This method determines how much data is in the
-// socket, allocates a buffer of this size, reads in the data, and
-// returns the number of bytes read.
-
-ssize_t
-ACE_SOCK_Dgram::recv (iovec io_vec[],
- ACE_Addr &addr,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::recv");
-#if defined (FIONREAD)
- ACE_Handle_Set handle_set;
- handle_set.reset ();
- handle_set.set_bit (this->get_handle ());
-
- // Check the status of the current socket to make sure there's data
- // to recv (or time out).
- switch (ACE_OS::select (int (this->get_handle ()) + 1,
- handle_set,
- 0, 0,
- timeout))
- {
- case -1:
- return -1;
- /* NOTREACHED */
- case 0:
- errno = ETIME;
- return -1;
- /* NOTREACHED */
- default:
- // Goes fine, fallthrough to get data
- break;
- }
-
- sockaddr *saddr = (sockaddr *) addr.get_addr ();
- int addr_len = addr.get_size ();
- u_long inlen;
-
- if (ACE_OS::ioctl (this->get_handle (),
- FIONREAD, (u_long *) &inlen) == -1)
- return -1;
- else if (inlen > 0)
- {
- ACE_NEW_RETURN (io_vec->iov_base,
- char[inlen],
- -1);
- io_vec->iov_len = ACE_OS::recvfrom (this->get_handle (),
- (char *) io_vec->iov_base,
- inlen,
- flags,
- (sockaddr *) saddr,
- &addr_len);
- addr.set_size (addr_len);
- return io_vec->iov_len;
- }
- else
- return 0;
-#else
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (addr);
- ACE_UNUSED_ARG (io_vec);
- ACE_UNUSED_ARG (timeout);
- ACE_NOTSUP_RETURN (-1);
-#endif /* FIONREAD */
-}
-
-// Here's the shared open function. Note that if we are using the
-// PF_INET protocol family and the address of LOCAL == the address of
-// the special variable SAP_ANY then we are going to arbitrarily bind
-// to a portnumber.
-
-int
-ACE_SOCK_Dgram::shared_open (const ACE_Addr &local,
- int protocol_family)
-{
- ACE_TRACE ("ACE_SOCK_Dgram::shared_open");
- int error = 0;
-
- if (local == ACE_Addr::sap_any
- && protocol_family == PF_INET)
- {
- if (ACE::bind_port (this->get_handle ()) == -1)
- error = 1;
- }
- else if (ACE_OS::bind (this->get_handle (),
- ACE_reinterpret_cast (sockaddr *,
- local.get_addr ()),
- local.get_size ()) == -1)
- error = 1;
-
- if (error != 0)
- this->close ();
-
- return error ? -1 : 0;
-}
-
-int
-ACE_SOCK_Dgram::open (const ACE_Addr &local,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr)
-{
- if (ACE_SOCK::open (SOCK_DGRAM,
- protocol_family,
- protocol,
- protocolinfo,
- g,
- flags,
- reuse_addr) == -1)
- return -1;
- else if (this->shared_open (local,
- protocol_family) == -1)
- return -1;
- else
- return 0;
-}
-
-// Here's the general-purpose open routine.
-
-int
-ACE_SOCK_Dgram::open (const ACE_Addr &local,
- int protocol_family,
- int protocol,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK_Dgram::open");
- if (ACE_SOCK::open (SOCK_DGRAM,
- protocol_family,
- protocol,
- reuse_addr) == -1)
- return -1;
- else
- return this->shared_open (local,
- protocol_family);
-}
-
-// Here's the general-purpose constructor used by a connectionless
-// datagram ``server''...
-
-ACE_SOCK_Dgram::ACE_SOCK_Dgram (const ACE_Addr &local,
- int protocol_family,
- int protocol,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK_Dgram::ACE_SOCK_Dgram");
-
- if (this->open (local,
- protocol_family,
- protocol,
- reuse_addr) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SOCK_Dgram")));
-}
-
-ACE_SOCK_Dgram::ACE_SOCK_Dgram (const ACE_Addr &local,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK_Dgram::ACE_SOCK_Dgram");
- if (this->open (local,
- protocol_family,
- protocol,
- protocolinfo,
- g,
- flags,
- reuse_addr) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SOCK_Dgram")));
-}
-
-#if defined (ACE_HAS_MSG)
-// Send an iovec of size N to ADDR as a datagram (connectionless
-// version).
-
-ssize_t
-ACE_SOCK_Dgram::send (const iovec iov[],
- size_t n,
- const ACE_Addr &addr,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::send");
- msghdr send_msg;
-
- send_msg.msg_iov = (iovec *) iov;
- send_msg.msg_iovlen = n;
-#if defined (ACE_HAS_SOCKADDR_MSG_NAME)
- send_msg.msg_name = (struct sockaddr *) addr.get_addr ();
-#else
- send_msg.msg_name = (char *) addr.get_addr ();
-#endif /* ACE_HAS_SOCKADDR_MSG_NAME */
- send_msg.msg_namelen = addr.get_size ();
-
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- send_msg.msg_control = 0;
- send_msg.msg_controllen = 0;
- send_msg.msg_flags = 0;
-#else
- send_msg.msg_accrights = 0;
- send_msg.msg_accrightslen = 0;
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
- return ACE_OS::sendmsg (this->get_handle (),
- &send_msg,
- flags);
-}
-
-// Recv an iovec of size N to ADDR as a datagram (connectionless
-// version).
-
-ssize_t
-ACE_SOCK_Dgram::recv (iovec iov[],
- size_t n,
- ACE_Addr &addr,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::recv");
- msghdr recv_msg;
-
- recv_msg.msg_iov = (iovec *) iov;
- recv_msg.msg_iovlen = n;
-#if defined (ACE_HAS_SOCKADDR_MSG_NAME)
- recv_msg.msg_name = (struct sockaddr *) addr.get_addr ();
-#else
- recv_msg.msg_name = (char *) addr.get_addr ();
-#endif /* ACE_HAS_SOCKADDR_MSG_NAME */
- recv_msg.msg_namelen = addr.get_size ();
-
-#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
- recv_msg.msg_control = 0 ;
- recv_msg.msg_controllen = 0 ;
-#else
- recv_msg.msg_accrights = 0;
- recv_msg.msg_accrightslen = 0;
-#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */
-
- ssize_t status = ACE_OS::recvmsg (this->get_handle (),
- &recv_msg,
- flags);
- addr.set_size (recv_msg.msg_namelen);
- return status;
-}
-
-#else /* ACE_HAS_MSG */
-
-// Send an iovec of size N to ADDR as a datagram (connectionless
-// version).
-
-ssize_t
-ACE_SOCK_Dgram::send (const iovec iov[],
- size_t n,
- const ACE_Addr &addr,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::send");
-
- size_t length = 0;
- size_t i;
-
- // Determine the total length of all the buffers in <iov>.
- for (i = 0; i < n; i++)
-#if ! (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0530))
- // The iov_len is unsigned in Borland. If we go ahead and try the
- // if, it will emit a warning.
- if (iov[i].iov_len < 0)
- return -1;
- else
-#endif
- length += iov[i].iov_len;
-
- char *buf;
-
-#if defined (ACE_HAS_ALLOCA)
- buf = alloca (length);
-#else
- ACE_NEW_RETURN (buf,
- char[length],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- char *ptr = buf;
-
- for (i = 0; i < n; i++)
- {
- ACE_OS::memcpy (ptr, iov[i].iov_base, iov[i].iov_len);
- ptr += iov[i].iov_len;
- }
-
- ssize_t result = ACE_SOCK_Dgram::send (buf, length, addr, flags);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] buf;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- return result;
-}
-
-// Recv an iovec of size N to ADDR as a datagram (connectionless
-// version).
-
-ssize_t
-ACE_SOCK_Dgram::recv (iovec iov[],
- size_t n,
- ACE_Addr &addr,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::recv");
-
- ssize_t length = 0;
- size_t i;
-
- for (i = 0; i < n; i++)
-#if ! (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0530))
- // The iov_len is unsigned in Borland. If we go ahead and try the
- // if, it will emit a warning.
- if (iov[i].iov_len < 0)
- return -1;
- else
-#endif
- length += iov[i].iov_len;
-
- char *buf;
-
-#if defined (ACE_HAS_ALLOCA)
- buf = alloca (length);
-#else
- ACE_NEW_RETURN (buf,
- char[length],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- length = ACE_SOCK_Dgram::recv (buf, length, addr, flags);
-
- if (length != -1)
- {
- char *ptr = buf;
- int copyn = length;
-
- for (i = 0;
- i < n && copyn > 0;
- i++)
- {
- ACE_OS::memcpy (iov[i].iov_base, ptr,
- // iov_len is int on some platforms, size_t on others
- copyn > (int) iov[i].iov_len
- ? (size_t) iov[i].iov_len
- : (size_t) copyn);
- ptr += iov[i].iov_len;
- copyn -= iov[i].iov_len;
- }
- }
-
-#if !defined (ACE_HAS_ALLOCA)
- delete [] buf;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- return length;
-}
-
-#endif /* ACE_HAS_MSG */
-
-ssize_t
-ACE_SOCK_Dgram::recv (void *buf,
- size_t n,
- ACE_Addr &addr,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_Handle_Set handle_set;
- handle_set.reset ();
- handle_set.set_bit (this->get_handle ());
-
- // Check the status of the current socket.
- switch (ACE_OS::select (int (this->get_handle ()) + 1,
- handle_set,
- 0,
- 0,
- timeout))
- {
- case -1:
- return -1;
- /* NOTREACHED */
- case 0:
- errno = ETIME;
- return -1;
- /* NOTREACHED */
- default:
- // Goes fine, call <recv> to get data
- return this->recv (buf, n, addr, flags);
- }
-}
-
-ssize_t
-ACE_SOCK_Dgram::send (const void *buf,
- size_t n,
- ACE_Addr &addr,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_Handle_Set handle_set;
- handle_set.reset ();
- handle_set.set_bit (this->get_handle ());
-
- // Check the status of the current socket.
- switch (ACE_OS::select (int (this->get_handle ()) + 1,
- 0,
- handle_set,
- 0,
- timeout))
- {
- case -1:
- return -1;
- /* NOTREACHED */
- case 0:
- errno = ETIME;
- return -1;
- /* NOTREACHED */
- default:
- // Goes fine, call <send> to get data
- return this->send (buf, n, addr, flags);
- }
-}
diff --git a/ace/SOCK_Dgram.h b/ace/SOCK_Dgram.h
deleted file mode 100644
index 567d5d34142..00000000000
--- a/ace/SOCK_Dgram.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ===========================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK_Dgram.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ===========================================================================
-
-#ifndef ACE_SOCK_DGRAM_H
-#define ACE_SOCK_DGRAM_H
-#include "ace/pre.h"
-
-#include "ace/SOCK.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Addr.h"
-
-class ACE_Export ACE_SOCK_Dgram : public ACE_SOCK
-{
- // = TITLE
- // Defines the member functions for the ACE_SOCK datagram
- // abstraction.
-public:
- // = Initialization and termination methods.
- ACE_SOCK_Dgram (void);
- // Default constructor.
-
- ACE_SOCK_Dgram (const ACE_Addr &local,
- int protocol_family = PF_INET,
- int protocol = 0,
- int reuse_addr = 0);
- // This is a BSD-style method (i.e., no QoS) for initiating a socket
- // dgram that will accept datagrams at the <local> address.
-
- ACE_SOCK_Dgram (const ACE_Addr &local,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g = 0,
- u_long flags = 0,
- int reuse_addr = 0);
- // This is a QoS-enabed method for initiating a socket dgram that
- // will accept datagrams at the <local> address. The <qos_params>
- // are passed to <ACE_OS::join_leaf>.
-
- int open (const ACE_Addr &local,
- int protocol_family = PF_INET,
- int protocol = 0,
- int reuse_addr = 0);
- // This is a BSD-style method (i.e., no QoS) for initiating a socket
- // dgram that will accept datagrams at the <local> address.
-
- int open (const ACE_Addr &local,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g = 0,
- u_long flags = 0,
- int reuse_addr = 0);
- // This is a QoS-enabed method for initiating a socket dgram that
- // will accept datagrams at the <local> address. The <qos_params>
- // are passed to <ACE_OS::join_leaf>.
-
- ~ACE_SOCK_Dgram (void);
- // Default dtor.
-
- // = Data transfer routines.
- ssize_t send (const void *buf,
- size_t n,
- const ACE_Addr &addr,
- int flags = 0) const;
- // Send an <n> byte <buf> to the datagram socket (uses <sendto(3)>).
-
- ssize_t recv (void *buf,
- size_t n,
- ACE_Addr &addr,
- int flags = 0) const;
- // Receive an <n> byte <buf> from the datagram socket (uses
- // <recvfrom(3)>).
-
- ssize_t recv (iovec *io_vec,
- ACE_Addr &addr,
- int flags = 0,
- const ACE_Time_Value *timeout = 0) const;
- // Allows a client to read from a socket without having to provide a
- // buffer to read. This method determines how much data is in the
- // socket, allocates a buffer of this size, reads in the data, and
- // returns the number of bytes read. The caller is responsible for
- // deleting the member in the <iov_base> field of <io_vec> using the
- // ``delete []'' syntax.
-
- ssize_t send (const iovec iov[],
- size_t n,
- const ACE_Addr &addr,
- int flags = 0) const;
- // Send an <iovec> of size <n> to the datagram socket (uses
- // <sendmsg(3)>).
-
- ssize_t recv (iovec iov[],
- size_t n,
- ACE_Addr &addr,
- int flags = 0) const;
- // Recv an <iovec> of size <n> to the datagram socket (uses
- // <recvmsg(3)>).
-
- ssize_t recv (void *buf,
- size_t n,
- ACE_Addr &addr,
- int flags,
- const ACE_Time_Value *timeout) const;
- // Wait up to <timeout> amount of time to receive a datagram into
- // <buf>. The <ACE_Time_Value> indicates how long to blocking
- // trying to receive. If <timeout> == 0, the caller will block
- // until action is possible, else will wait until the relative time
- // specified in *<timeout> elapses). If <recv> times out a -1 is
- // returned with <errno == ETIME>. If it succeeds the number of
- // bytes received is returned.
-
- ssize_t send (const void *buf,
- size_t n,
- ACE_Addr &addr,
- int flags,
- const ACE_Time_Value *timeout) const;
- // Wait up to <timeout> amount of time to receive a datagram into
- // <buf>. The <ACE_Time_Value> indicates how long to blocking
- // trying to receive. If <timeout> == 0, the caller will block
- // until action is possible, else will wait until the relative time
- // specified in *<timeout> elapses). If <send> times out a -1 is
- // returned with <errno == ETIME>. If it succeeds the number of
- // bytes received is returned.
-
- ssize_t send (const iovec buffers[],
- int buffer_count,
- size_t &number_of_bytes_sent,
- int flags,
- const ACE_Addr &addr,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const;
- // Send <buffer_count> worth of <buffers> to <addr> using overlapped
- // I/O (uses <WSASentTo>). Returns 0 on success.
-
- ssize_t recv (iovec buffers[],
- int buffer_count,
- size_t &number_of_bytes_recvd,
- int &flags,
- ACE_Addr &addr,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const;
- // Recv <buffer_count> worth of <buffers> from <addr> using
- // overlapped I/O (uses <WSARecvFrom>). Returns 0 on success.
-
- ssize_t send (const void *buf,
- size_t n,
- const ACE_Addr &addr,
- int flags,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const;
- // Send an <n> byte <buf> to the datagram socket (uses <WSASentTo>).
-
- ssize_t recv (void *buf,
- size_t n,
- ACE_Addr &addr,
- int flags,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const;
- // Receive an <n> byte <buf> from the datagram socket (uses
- // <WSARecvFrom>).
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- int shared_open (const ACE_Addr &local,
- int protocol_family);
- // Open is shared by this and by <LSOCK_Dgram>.
-
-private:
- int get_remote_addr (ACE_Addr &) const;
- // Do not allow this function to percolate up to this interface...
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_DGRAM_H */
diff --git a/ace/SOCK_Dgram.i b/ace/SOCK_Dgram.i
deleted file mode 100644
index 723a3d3b9d8..00000000000
--- a/ace/SOCK_Dgram.i
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SOCK_Dgram.i
-
-// Here's the simple-minded constructor.
-
-ASYS_INLINE
-ACE_SOCK_Dgram::ACE_SOCK_Dgram (void)
-{
- ACE_TRACE ("ACE_SOCK_Dgram::ACE_SOCK_Dgram");
-}
-
-ASYS_INLINE
-ACE_SOCK_Dgram::~ACE_SOCK_Dgram (void)
-{
- ACE_TRACE ("ACE_SOCK_Dgram::~ACE_SOCK_Dgram");
-}
-
-// <sendto> an N byte datagram to <addr> (connectionless version).
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram::send (const void *buf,
- size_t n,
- const ACE_Addr &addr,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::send");
- sockaddr *saddr = (sockaddr *) addr.get_addr ();
- size_t len = addr.get_size ();
- return ACE_OS::sendto (this->get_handle (),
- (const char *) buf,
- n,
- flags,
- (struct sockaddr *) saddr,
- len);
-}
-
-// <recvfrom> an n byte datagram (connectionless version).
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram::recv (void *buf,
- size_t n,
- ACE_Addr &addr,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::recv");
- sockaddr *saddr = (sockaddr *) addr.get_addr ();
- int addr_len = addr.get_size ();
-
- ssize_t status = ACE_OS::recvfrom (this->get_handle (),
- (char *) buf,
- n,
- flags,
- (sockaddr *) saddr,
- &addr_len);
- addr.set_size (addr_len);
- return status;
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram::send (const iovec buffers[],
- int buffer_count,
- size_t &number_of_bytes_sent,
- int flags,
- const ACE_Addr &addr,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::send");
- sockaddr *saddr = (sockaddr *) addr.get_addr ();
- size_t len = addr.get_size ();
- return ACE_OS::sendto (this->get_handle (),
- buffers,
- buffer_count,
- number_of_bytes_sent,
- flags,
- (const sockaddr *) saddr,
- len,
- overlapped,
- func);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram::recv (iovec buffers[],
- int buffer_count,
- size_t &number_of_bytes_recvd,
- int &flags,
- ACE_Addr &addr,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const
-{
- ACE_TRACE ("ACE_SOCK_IO::recv");
- sockaddr *saddr = (sockaddr *) addr.get_addr ();
- int addr_len = addr.get_size ();
-
- ssize_t status = ACE_OS::recvfrom (this->get_handle (),
- buffers,
- buffer_count,
- number_of_bytes_recvd,
- flags,
- (sockaddr *) saddr,
- &addr_len,
- overlapped,
- func);
- addr.set_size (addr_len);
- return status;
-}
-
-// <sendto> an N byte datagram to <addr> (connectionless version).
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram::send (const void *buf,
- size_t n,
- const ACE_Addr &addr,
- int flags,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::send");
-
- iovec buffer[1];
- buffer[0].iov_len = n;
- buffer[0].iov_base = (char *) buf;
- size_t number_of_bytes_sent = 0;
- return this->send (buffer,
- 1,
- number_of_bytes_sent,
- flags,
- addr,
- overlapped,
- func);
-}
-
-// <recvfrom> an n byte datagram (connectionless version).
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram::recv (void *buf,
- size_t n,
- ACE_Addr &addr,
- int flags,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram::recv");
-
- iovec buffer[1];
- buffer[0].iov_len = n;
- buffer[0].iov_base = (char *) buf;
- size_t number_of_bytes_recvd = 0;
- return this->recv (buffer,
- 1,
- number_of_bytes_recvd,
- flags,
- addr,
- overlapped,
- func);
-}
diff --git a/ace/SOCK_Dgram_Bcast.cpp b/ace/SOCK_Dgram_Bcast.cpp
deleted file mode 100644
index eb1f3fb49f8..00000000000
--- a/ace/SOCK_Dgram_Bcast.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-// $Id$
-
-#include "ace/SOCK_Dgram_Bcast.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram_Bcast.i"
-#endif
-
-ACE_RCSID(ace, SOCK_Dgram_Bcast, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Dgram_Bcast)
-
-ACE_Bcast_Node::ACE_Bcast_Node (ACE_INET_Addr &addr,
- ACE_Bcast_Node *next)
- : bcast_addr_ (addr),
- next_ (next)
-{
- ACE_TRACE ("ACE_Bcast_Node::ACE_Bcast_Node");
-}
-
-void
-ACE_SOCK_Dgram_Bcast::dump (void) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::dump");
-}
-
-// Close up and release resources.
-
-int
-ACE_SOCK_Dgram_Bcast::close (void)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::close");
-
- ACE_Bcast_Node *temp = this->if_list_;
-
- // Release the dynamically allocated memory.
-
- while (temp != 0)
- {
- ACE_Bcast_Node *hold = temp->next_;
- delete temp;
- temp = hold;
- }
-
- // Shut down the descriptor.
- return ACE_SOCK::close ();
-}
-
-// Here's the simple-minded constructor.
-
-ACE_SOCK_Dgram_Bcast::ACE_SOCK_Dgram_Bcast (void)
- : if_list_ (0)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::ACE_SOCK_Dgram_Bcast");
-}
-
-// Here's the general-purpose constructor used by a connectionless
-// datagram ``server''...
-
-ACE_SOCK_Dgram_Bcast::ACE_SOCK_Dgram_Bcast (const ACE_Addr &local,
- int protocol_family,
- int protocol,
- int reuse_addr,
- const ACE_TCHAR *host_name)
- : ACE_SOCK_Dgram (local, protocol_family, protocol, reuse_addr),
- if_list_ (0)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::ACE_SOCK_Dgram_Bcast");
-
- if (this->mk_broadcast (host_name) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SOCK_Dgram_Bcast")));
-}
-
-// Here's the general-purpose open routine.
-
-int
-ACE_SOCK_Dgram_Bcast::open (const ACE_Addr &local,
- int protocol_family,
- int protocol,
- int reuse_addr,
- const ACE_TCHAR *host_name)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::open");
-
- if (this->ACE_SOCK_Dgram::open (local, protocol_family,
- protocol, reuse_addr) == -1)
- return -1;
-
- return this->mk_broadcast (host_name);
-}
-
-// Make broadcast available for Datagram socket.
-
-int
-ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::mk_broadcast");
-
- int one = 1;
-
- if (ACE_OS::setsockopt (this->get_handle (),
- SOL_SOCKET,
- SO_BROADCAST,
- (char *) &one,
- sizeof one) == -1)
- return -1;
-
-#if !defined (ACE_WIN32)
- ACE_HANDLE s = this->get_handle ();
-
- char buf[BUFSIZ];
- struct ifconf ifc;
-
- ifc.ifc_len = sizeof buf;
- ifc.ifc_buf = buf;
-
- // Get interface structure and initialize the addresses using UNIX
- // techniques.
- if (ACE_OS::ioctl (s,
- SIOCGIFCONF,
- (char *) &ifc) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n",
- "ACE_SOCK_Dgram_Bcast::mk_broadcast: ioctl (get interface configuration)"),
- ACE_INVALID_HANDLE);
-
- struct ifreq *ifr = ifc.ifc_req;
-
- struct sockaddr_in host_addr;
-
- //Get host ip address
- if (host_name)
- {
- hostent *hp = ACE_OS::gethostbyname (host_name);
-
- if (hp == 0)
- return -1;
- else
-#if defined(_UNICOS)
- {
- ACE_UINT64 haddr; // a place to put the address
- char * haddrp = (char *) &haddr; // convert to char pointer
- ACE_OS::memcpy(haddrp,(char *) hp->h_addr,hp->h_length);
- host_addr.sin_addr.s_addr = haddr;
- }
-#else /* ! _UNICOS */
- ACE_OS::memcpy ((char *) &host_addr.sin_addr.s_addr,
- (char *) hp->h_addr,
- hp->h_length);
-#endif /* ! _UNICOS */
- }
-
- for (int n = ifc.ifc_len / sizeof (struct ifreq) ; n > 0; n--, ifr++)
- {
- // Compare host ip address with interface ip address.
- if (host_name)
- {
- struct sockaddr_in if_addr;
-
- ACE_OS::memcpy (&if_addr,
- &ifr->ifr_addr,
- sizeof if_addr);
-
- if (host_addr.sin_addr.s_addr != if_addr.sin_addr.s_addr)
- continue;
- }
-
- if (ifr->ifr_addr.sa_family != AF_INET)
- {
- // Note that some systems seem to generate 0 (AF_UNDEF) for
- // the sa_family, even when there are no errors! Thus, we
- // only print an error if this is not the case, or if we're
- // in "debugging" mode.
- if (ifr->ifr_addr.sa_family != 0
- || ACE::debug () > 0)
- ACE_DEBUG ((LM_DEBUG,
- "warning %p: sa_family: %d\n",
- "ACE_SOCK_Dgram_Bcast::mk_broadcast: Not AF_INET",
- ifr->ifr_addr.sa_family));
- continue;
- }
-
- struct ifreq flags = *ifr;
- struct ifreq if_req = *ifr;
-
- if (ACE_OS::ioctl (s,
- SIOCGIFFLAGS,
- (char *) &flags) == -1)
- {
- ACE_ERROR ((LM_ERROR, "%p\n",
- "ACE_SOCK_Dgram_Bcast::mk_broadcast: ioctl (get interface flags)"));
- continue;
- }
-
- if (ACE_BIT_ENABLED (flags.ifr_flags,
- IFF_UP) == 0)
- {
- ACE_ERROR ((LM_ERROR, "%p\n",
- "ACE_SOCK_Dgram_Bcast::mk_broadcast: Network interface is not up"));
- continue;
- }
-
- if (ACE_BIT_ENABLED (flags.ifr_flags,
- IFF_LOOPBACK))
- continue;
-
- if (ACE_BIT_ENABLED (flags.ifr_flags,
- IFF_BROADCAST))
- {
- if (ACE_OS::ioctl (s,
- SIOCGIFBRDADDR,
- (char *) &if_req) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n",
- "ACE_SOCK_Dgram_Bcast::mk_broadcast: ioctl (get broadaddr)"));
- else
- {
- ACE_INET_Addr addr (ACE_reinterpret_cast (sockaddr_in *,
- &if_req.ifr_broadaddr),
- sizeof if_req.ifr_broadaddr);
- ACE_NEW_RETURN (this->if_list_,
- ACE_Bcast_Node (addr,
- this->if_list_),
- -1);
- }
- }
- else
- ACE_ERROR ((LM_ERROR, "%p\n",
- "ACE_SOCK_Dgram_Bcast::mk_broadcast: Broadcast is not enable for this interface."));
- }
-#else
- ACE_UNUSED_ARG (host_name);
-
- ACE_INET_Addr addr (u_short (0),
- ACE_UINT32 (INADDR_BROADCAST));
- ACE_NEW_RETURN (this->if_list_,
- ACE_Bcast_Node (addr,
- this->if_list_),
- -1);
-#endif /* !ACE_WIN32 */
- return this->if_list_ == 0 ? -1 : 0;
-}
-
-// Broadcast the datagram to every interface. Returns the average
-// number of bytes sent.
-
-ssize_t
-ACE_SOCK_Dgram_Bcast::send (const void *buf,
- size_t n,
- u_short port_number,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::send");
- size_t iterations = 0;
- ssize_t total_bytes = 0;
-
- if (this->if_list_ == 0)
- return -1;
-
- for (ACE_Bcast_Node *temp = this->if_list_;
- temp != 0;
- temp = temp->next_)
- {
- temp->bcast_addr_.set_port_number (port_number);
-
- ssize_t bytes_sent = ACE_SOCK_Dgram::send (buf,
- n,
- temp->bcast_addr_,
- flags);
-
- if (bytes_sent == -1)
- return -1;
- else
- total_bytes += bytes_sent;
-
- iterations++;
- }
-
- return iterations == 0 ? 0 : total_bytes / iterations;
-}
-
-#if defined (ACE_HAS_MSG)
-// Broadcast datagram to every interfaces.
-
-ssize_t
-ACE_SOCK_Dgram_Bcast::send (const iovec iov[],
- size_t n,
- u_short /* port_number */,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::send");
-
- if (this->if_list_ == 0)
- return -1;
-
- // Send the message to every interface.
-
- for (ACE_Bcast_Node *temp = this->if_list_;
- temp != 0;
- temp++)
- if (ACE_SOCK_Dgram::send (iov,
- n,
- temp->bcast_addr_,
- flags) == -1)
- return -1;
-
- return 0;
-}
-
-// Broadcast an iovec of size N to ADDR as a datagram (note that addr
-// must be preassigned to the broadcast address of the subnet...).
-
-ssize_t
-ACE_SOCK_Dgram_Bcast::send (const iovec iov[],
- size_t n,
- const ACE_Addr &addr,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::send");
-
- return ACE_SOCK_Dgram::send (iov, n, addr, flags);
-}
-#endif /* ACE_HAS_MSG */
diff --git a/ace/SOCK_Dgram_Bcast.h b/ace/SOCK_Dgram_Bcast.h
deleted file mode 100644
index e509a7bf712..00000000000
--- a/ace/SOCK_Dgram_Bcast.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK_Dgram_Bcast.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SOCK_DGRAM_BCAST_H
-#define ACE_SOCK_DGRAM_BCAST_H
-#include "ace/pre.h"
-
-#include "ace/INET_Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SOCK_Dgram.h"
-
-class ACE_Export ACE_Bcast_Node
-{
- // = TITLE
- // Linked list of broadcast interfaces.
-public:
- ACE_Bcast_Node (ACE_INET_Addr &,
- ACE_Bcast_Node *);
- ~ACE_Bcast_Node (void);
- // Default dtor.
-
- ACE_INET_Addr bcast_addr_;
- // Broadcast address for the interface.
-
- ACE_Bcast_Node *next_;
- // Pointer to the next interface in the chain.
-};
-
-class ACE_Export ACE_SOCK_Dgram_Bcast : public ACE_SOCK_Dgram
-{
- // = TITLE
- // Defines the member functions for the ACE_SOCK datagram
- // abstraction.
-public:
- // = Initialization and termination methods.
- ACE_SOCK_Dgram_Bcast (void);
- // Default constructor.
-
- ACE_SOCK_Dgram_Bcast (const ACE_Addr &local,
- int protocol_family = PF_INET,
- int protocol = 0,
- int reuse_addr = 0,
- const ACE_TCHAR *host_name = 0);
-
- ~ACE_SOCK_Dgram_Bcast (void);
- // Default dtor.
-
- // Initiate a connectionless datagram broadcast endpoint.
-
- int open (const ACE_Addr &local,
- int protocol_family = PF_INET,
- int protocol = 0,
- int reuse_addr = 0,
- const ACE_TCHAR *host_name = 0);
- // Initiate a connectionless datagram broadcast endpoint.
-
- int close (void);
- // Close up and release dynamically allocated resources.
-
- ssize_t send (const void *buf,
- size_t n,
- u_short portnum,
- int flags = 0) const;
- // Broadcast the datagram to every interface. Returns the average
- // number of bytes sent.
-
- ssize_t send (const iovec iov[],
- size_t n,
- u_short portnum,
- int flags = 0) const;
- // Broadcast the <iovec> datagrams to every interface. Returns the
- // average number of bytes sent.
-
- ssize_t send (const void *buf,
- size_t n,
- const ACE_Addr &addr,
- int flags = 0) const;
- // Broadcast an N byte datagram to ADDR (note that addr must be
- // preassigned to the broadcast address of the subnet...).
-
- ssize_t send (const iovec iov[],
- size_t n,
- const ACE_Addr &addr,
- int flags = 0) const;
- // Broadcast an <iovec> of size <n> to <addr> as a datagram (note
- // that addr must be preassigned to the broadcast address of the
- // subnet...) */
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int mk_broadcast (const ACE_TCHAR *host_name);
- // Make broadcast available for Datagram socket.
-
- ACE_Bcast_Node *if_list_;
- // Points to the head of the list of broadcast interfaces.
-
- int get_remote_addr (ACE_Addr &) const;
- // Do not allow this function to percolate up to this interface...
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram_Bcast.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_DGRAM_BCAST_H */
diff --git a/ace/SOCK_Dgram_Bcast.i b/ace/SOCK_Dgram_Bcast.i
deleted file mode 100644
index 9304ba1d933..00000000000
--- a/ace/SOCK_Dgram_Bcast.i
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SOCK_Dgram_Bcast.i
-
-ASYS_INLINE
-ACE_Bcast_Node::~ACE_Bcast_Node (void)
-{
-}
-
-ASYS_INLINE
-ACE_SOCK_Dgram_Bcast::~ACE_SOCK_Dgram_Bcast (void)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::~ACE_SOCK_Dgram_Bcast");
-}
-
-// Broadcast an N byte datagram to ADDR (note that addr must be
-// preassigned to the broadcast address of the subnet...)
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram_Bcast::send (const void *buf,
- size_t n,
- const ACE_Addr &addr,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Bcast::send");
-
- sockaddr *saddr = (sockaddr *) addr.get_addr ();
- size_t len = addr.get_size ();
- return ACE_OS::sendto (this->get_handle (), (const char *) buf, n, flags,
- (struct sockaddr *) saddr, len);
-}
-
-
diff --git a/ace/SOCK_Dgram_Mcast.cpp b/ace/SOCK_Dgram_Mcast.cpp
deleted file mode 100644
index b0ab087cc30..00000000000
--- a/ace/SOCK_Dgram_Mcast.cpp
+++ /dev/null
@@ -1,400 +0,0 @@
-// $Id$
-
-#include "ace/SOCK_Dgram_Mcast.h"
-#include "ace/INET_Addr.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram_Mcast.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-// This is a workaround for platforms with non-standard
-// definitions of the ip_mreq structure
-#if ! defined (IMR_MULTIADDR)
-#define IMR_MULTIADDR imr_multiaddr
-#endif /* ! defined (IMR_MULTIADDR) */
-
-ACE_RCSID(ace, SOCK_Dgram_Mcast, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Dgram_Mcast)
-
-void
-ACE_SOCK_Dgram_Mcast::dump (void) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::dump");
-}
-
-// Dummy default constructor...
-
-ACE_SOCK_Dgram_Mcast::ACE_SOCK_Dgram_Mcast (void)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::ACE_SOCK_Dgram_Mcast");
-}
-
-int
-ACE_SOCK_Dgram_Mcast::open (const ACE_Addr &mcast_addr,
- int protocol_family,
- int protocol,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::open");
-
- // Make a copy of address to use in the <send> methods.
- // Note: Sun C++ 4.2 needs the useless const_cast.
- this->mcast_addr_.set (ACE_reinterpret_cast (const ACE_INET_Addr &,
- ACE_const_cast (ACE_Addr &,
- mcast_addr)));
-
- // Only perform the <open> initialization if we haven't been opened
- // earlier.
- if (this->get_handle () == ACE_INVALID_HANDLE)
- {
- if (ACE_SOCK::open (SOCK_DGRAM,
- protocol_family,
- protocol,
- reuse_addr) == -1)
- return -1;
-
- int one = 1;
- if (reuse_addr
- && this->ACE_SOCK::set_option (SOL_SOCKET,
- SO_REUSEADDR,
- &one,
- sizeof one) == -1)
- return -1;
-#if defined (SO_REUSEPORT)
- else if (this->ACE_SOCK::set_option (SOL_SOCKET,
- SO_REUSEPORT,
- &one,
- sizeof one) == -1)
- return -1;
-#endif /* SO_REUSEPORT */
-
- // Create an address to bind the socket to.
- ACE_INET_Addr local;
-
- if (local.set (this->mcast_addr_.get_port_number ()) == -1)
- return -1;
- else if (ACE_SOCK_Dgram::shared_open (local,
- protocol_family) == -1)
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
- const ACE_TCHAR *net_if,
- int protocol_family,
- int protocol,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::subscribe_ifs");
-#if defined (ACE_WIN32)
- // Windows NT's winsock has trouble with multicast subscribes in the
- // presence of multiple network interfaces when the IP address is
- // given as INADDR_ANY. It will pick the first interface and only
- // accept mcast there. So, to work around this, cycle through all
- // of the interfaces known and subscribe to all the non-loopback
- // ones.
- //
- // Note that this only needs to be done on NT, but there's no way to
- // tell at this point if the code will be running on NT - only if it
- // is compiled for NT-only or for NT/95, and that doesn't really
- // help us. It doesn't hurt to do this on Win95, it's just a little
- // slower than it normally would be.
- //
- // NOTE - <ACE::get_ip_interfaces> doesn't always get all of the
- // interfaces. In particular, it may not get a PPP interface. This
- // is a limitation of the way <ACE::get_ip_interfaces> works with
- // MSVC. The reliable way of getting the interface list is
- // available only with MSVC 5.
-
- if (net_if == 0)
- {
- ACE_INET_Addr *if_addrs = 0;
- size_t if_cnt;
-
- if (ACE::get_ip_interfaces (if_cnt,
- if_addrs) != 0)
- return -1;
-
- size_t nr_subscribed = 0;
-
- if (if_cnt < 2)
- {
- if (this->subscribe (mcast_addr,
- reuse_addr,
- ACE_TEXT ("0.0.0.0"),
- protocol_family,
- protocol) == 0)
- ++nr_subscribed;
- }
- else
- // Iterate through all the interfaces, figure out which ones
- // offer multicast service, and subscribe to them.
- while (if_cnt > 0)
- {
- --if_cnt;
-
- // Convert to 0-based for indexing, next loop check.
- if (if_addrs[if_cnt].get_ip_address() == INADDR_LOOPBACK)
- continue;
- if (this->subscribe (mcast_addr,
- reuse_addr,
- if_addrs[if_cnt].get_host_addr(),
- protocol_family,
- protocol) == 0)
- ++nr_subscribed;
- }
-
- delete [] if_addrs;
-
- if (nr_subscribed == 0)
- {
- errno = ENODEV;
- return -1;
- }
- else
- // 1 indicates a "short-circuit" return. This handles the
- // rather bizarre semantics of checking all the interfaces on
- // NT.
- return 1;
- }
-#else
- ACE_UNUSED_ARG (mcast_addr);
- ACE_UNUSED_ARG (protocol_family);
- ACE_UNUSED_ARG (protocol);
- ACE_UNUSED_ARG (reuse_addr);
-#endif /* ACE_WIN32 */
- // Otherwise, do it like everyone else...
-
- // Create multicast request.
- if (this->make_multicast_address (this->mcast_addr_,
- net_if) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_SOCK_Dgram_Mcast::subscribe (const ACE_INET_Addr &mcast_addr,
- int reuse_addr,
- const ACE_TCHAR *net_if,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::subscribe");
-
- if (this->open (mcast_addr,
- protocol_family,
- protocol,
- reuse_addr) == -1)
- return -1;
-
- int result = this->subscribe_ifs (mcast_addr,
- net_if,
- protocol_family,
- protocol,
- reuse_addr);
- // Check for the "short-circuit" return value of 1 (for NT). This
- // handles the rather bizarre semantics of checking all the
- // interfaces on NT.
- if (result != 0)
- return result;
-
- // Create multicast request.
- else if (this->make_multicast_address (this->mcast_addr_,
- net_if) == -1)
- return -1;
-
- // Tell network device driver to read datagrams with a
- // multicast_address IP interface.
- else if (this->ACE_SOCK::set_option (IPPROTO_IP,
- IP_ADD_MEMBERSHIP,
- &this->mcast_request_if_,
- sizeof this->mcast_request_if_) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
- const ACE_TCHAR *net_if,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::unsubscribe_ifs");
-#if defined (ACE_WIN32)
- // Windows NT's winsock has trouble with multicast subscribes in the
- // presence of multiple network interfaces when the IP address is
- // given as INADDR_ANY. It will pick the first interface and only
- // accept mcast there. So, to work around this, cycle through all
- // of the interfaces known and subscribe to all the non-loopback
- // ones.
- //
- // Note that this only needs to be done on NT, but there's no way to
- // tell at this point if the code will be running on NT - only if it
- // is compiled for NT-only or for NT/95, and that doesn't really
- // help us. It doesn't hurt to do this on Win95, it's just a little
- // slower than it normally would be.
- //
- // NOTE - <ACE::get_ip_interfaces> doesn't always get all of the
- // interfaces. In particular, it may not get a PPP interface. This
- // is a limitation of the way <ACE::get_ip_interfaces> works with
- // MSVC. The reliable way of getting the interface list is
- // available only with MSVC 5.
-
- if (net_if == 0)
- {
- ACE_INET_Addr *if_addrs = 0;
- size_t if_cnt;
-
- if (ACE::get_ip_interfaces (if_cnt,
- if_addrs) != 0)
- return -1;
-
- size_t nr_unsubscribed = 0;
-
- if (if_cnt < 2)
- {
- if (this->unsubscribe (mcast_addr,
- ACE_TEXT ("0.0.0.0"),
- protocol_family,
- protocol) == 0)
- ++nr_unsubscribed;
- }
- else
- while (if_cnt > 0)
- {
- --if_cnt;
- // Convert to 0-based for indexing, next loop check
- if (if_addrs[if_cnt].get_ip_address() == INADDR_LOOPBACK)
- continue;
- if (this->unsubscribe (mcast_addr,
- if_addrs[if_cnt].get_host_addr(),
- protocol_family,
- protocol) == 0)
- ++nr_unsubscribed;
- }
-
- delete [] if_addrs;
-
- if (nr_unsubscribed == 0)
- {
- errno = ENODEV;
- return -1;
- }
-
- return 1;
- }
-#else
- ACE_UNUSED_ARG (protocol_family);
- ACE_UNUSED_ARG (protocol);
-#endif /* ACE_WIN32 */
- // Otherwise, do it like everyone else.
-
- ip_mreq multicast_address;
-
- // Create multicast request.
- if (this->make_multicast_address_i (mcast_addr,
- multicast_address,
- net_if) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_SOCK_Dgram_Mcast::unsubscribe (const ACE_INET_Addr &mcast_addr,
- const ACE_TCHAR *net_if,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::unsubscribe");
- int result = this->unsubscribe_ifs (mcast_addr,
- net_if,
- protocol_family,
- protocol);
-
- // Check for the "short-circuit" return value of 1 (for NT).
- if (result != 0)
- return result;
-
- // Tell network device driver to stop reading datagrams with the
- // <mcast_addr>.
- else if (ACE_SOCK::set_option (IPPROTO_IP,
- IP_DROP_MEMBERSHIP,
- &this->mcast_request_if_,
- sizeof this->mcast_request_if_) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_SOCK_Dgram_Mcast::unsubscribe (void)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::unsubscribe");
- return this->ACE_SOCK::set_option (IPPROTO_IP,
- IP_DROP_MEMBERSHIP,
- &this->mcast_request_if_,
- sizeof this->mcast_request_if_);
-}
-
-int
-ACE_SOCK_Dgram_Mcast::make_multicast_address_i (const ACE_INET_Addr &mcast_addr,
- ip_mreq &multicast_address ,
- const ACE_TCHAR *net_if)
-{
- if (net_if != 0)
- {
-#if defined (ACE_WIN32)
- // This port number is not necessary, just convenient
- ACE_INET_Addr interface_addr;
- if (interface_addr.set (mcast_addr.get_port_number (),
- net_if) == -1)
- return -1;
- multicast_address.imr_interface.s_addr =
- htonl (interface_addr.get_ip_address ());
-#else
- ifreq if_address;
-
-#if defined (ACE_PSOS)
- // Look up the interface by number, not name.
- if_address.ifr_ifno = ACE_OS::atoi (net_if);
-#else
- ACE_OS::strcpy (if_address.ifr_name, net_if);
-#endif /* defined (ACE_PSOS) */
-
- if (ACE_OS::ioctl (this->get_handle (),
- SIOCGIFADDR,
- &if_address) == -1)
- return -1;
-
- sockaddr_in *socket_address;
- socket_address = ACE_reinterpret_cast(sockaddr_in *,
- &if_address.ifr_addr);
- multicast_address.imr_interface.s_addr = socket_address->sin_addr.s_addr;
-#endif /* ACE_WIN32 */
- }
- else
- multicast_address.imr_interface.s_addr = INADDR_ANY;
-
- multicast_address.IMR_MULTIADDR.s_addr = htonl (mcast_addr.get_ip_address ());
- return 0;
-}
-
-int
-ACE_SOCK_Dgram_Mcast::make_multicast_address (const ACE_INET_Addr &mcast_addr,
- const ACE_TCHAR *net_if)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::make_multicast_address");
-
- return this->make_multicast_address_i (mcast_addr,
- this->mcast_request_if_,
- net_if );
-}
-
-
diff --git a/ace/SOCK_Dgram_Mcast.h b/ace/SOCK_Dgram_Mcast.h
deleted file mode 100644
index a9a824e84ea..00000000000
--- a/ace/SOCK_Dgram_Mcast.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK_Dgram_Mcast.h
-//
-// = AUTHORS
-// Irfan Pyrali <irfan@cs.wustl.edu>,
-// Tim Harrison <harrison@cs.wustl.edu>, and
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_SOCK_DGRAM_MCAST_H
-#define ACE_SOCK_DGRAM_MCAST_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Dgram.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/INET_Addr.h"
-
-class ACE_Export ACE_SOCK_Dgram_Mcast : public ACE_SOCK_Dgram
-{
- // = TITLE
- // Defines the member functions for the ACE socket wrapper
- // for UDP/IP multicast.
-public:
- // = Initialization routine.
- ACE_SOCK_Dgram_Mcast (void);
- // Note that there is no public <open> method. Therefore, this
- // class cannot be used unless you <subscribe> to a multicast group.
- // If you just want to send (and not listen) to a multicast group,
- // use <ACE_SOCK_Dgram> or <ACE_SOCK_CODgram> instead.
-
- ~ACE_SOCK_Dgram_Mcast (void);
- // Default dtor.
-
- // = Multicast group management routines.
-
- int subscribe (const ACE_INET_Addr &mcast_addr,
- int reuse_addr = 1,
- const ACE_TCHAR *net_if = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // This is a BSD-style method (i.e., no QoS) for joining a multicast
- // group. The network interface device driver is instructed to
- // accept datagrams with <mcast_addr> multicast addresses. If the
- // socket has already been opened, <subscribe> closes the socket and
- // opens a new socket bound to the <mcast_addr>.
- //
- // The <net_if> interface is hardware specific, e.g., use "netstat
- // -i" to find whether your interface is, such as "le0" or something
- // else. If net_if == 0, <subscribe> uses the default mcast
- // interface. Returns: -1 if the call fails.
- //
- // Note that some platforms, such as pSoS, support only number, not
- // names, for network interfaces. For these platforms, just give
- // these numbers in alphanumeric form and <subscribe> will convert
- // them into numbers via <ACE_OS::atoi>.
-
- int unsubscribe (const ACE_INET_Addr &mcast_addr,
- const ACE_TCHAR *net_if = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // Leave a multicast group identified by <mcast_addr>. The <net_if>
- // interface is hardware specific. Use something like "netstat -i"
- // to find whether your interface is, such as "le0" or something
- // else. If <net_if> == 0, <subscribe> uses the default mcast
- // interface. Returns: -1 if the call fails.
- //
- // Note that some platforms, such as pSoS, support only number, not
- // names, for network interfaces. For these platforms, just give
- // these numbers in alphanumeric form and <subscribe> will convert
- // them into numbers via <ACE_OS::atoi>.
-
- int unsubscribe (void);
- // Unsubscribe from a multicast group. Returns -1 if the call
- // fails.
-
- // = Data transfer routines.
- ssize_t send (const void *buf,
- size_t n,
- int flags = 0) const;
- // Send <n> bytes in <buf>.
-
- ssize_t send (const iovec iov[],
- size_t n,
- int flags = 0) const;
- // Send <n> <iovecs>.
-
- // = Options.
- int set_option (int option,
- char optval);
- // Set an ip option that takes a char as input, such as
- // <IP_MULTICAST_LOOP> or <IP_MULTICAST_TTL>. This is just a more
- // concise nice interface to a subset of possible
- // <ACE_SOCK::set_option> calls. Returns 0 on success, -1 on
- // failure.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- // = Disable public <open> method to ensure class used properly.
-
- int open (const ACE_Addr &mcast_addr,
- int protocol_family = PF_INET,
- int protocol = 0,
- int reuse_addr = 0);
- // Not publically visible.
-
- int open (const ACE_Addr &mcast_addr,
- const ACE_QoS_Params &qos_params,
- int protocol_family = PF_INET,
- int protocol = 0,
- ACE_Protocol_Info *protocolinfo = 0,
- ACE_SOCK_GROUP g = 0,
- u_long flags = 0,
- int reuse_addr = 0);
- // Not publically visible.
-
- int subscribe_ifs (const ACE_INET_Addr &mcast_addr,
- const ACE_TCHAR *net_if,
- int protocol_family,
- int protocol,
- int reuse_addr);
- // Subscribe to the multicast interface using BSD-style semantics
- // (no QoS).
-
- int unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
- const ACE_TCHAR *net_if = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // Unsubscribe to multicast interfaces subscribed to previously by
- // <subscribe_ifs>.
-
- // = Disable public use of <ACE_SOCK_Dgram::send>s
-
- // This forces <ACE_SOCK_Dgram_Mcast::send>s inline.
- ssize_t send (const void *buf,
- size_t n,
- const ACE_Addr &addr,
- int flags = 0) const;
- ssize_t send (const iovec iov[],
- size_t n,
- const ACE_Addr &addr,
- int flags = 0) const;
-
-protected:
- int make_multicast_address (const ACE_INET_Addr &mcast_addr,
- const ACE_TCHAR *net_if = ACE_TEXT ("le0"));
- // Initialize the <multicast_address_> IP address.
-
- int make_multicast_address_i (const ACE_INET_Addr &mcast_addr,
- ip_mreq& multicast_address,
- const ACE_TCHAR *net_if = ACE_TEXT ("le0"));
- // Initialize a multicast address. This method factors out common
- // code called by <make_multicast_address> and <subscribe>.
-
- ACE_INET_Addr mcast_addr_;
- // A copy of the address that we use to <send> multicasts.
-
- ip_mreq mcast_request_if_;
- // IP address of the interface upon which we're receiving
- // multicasts.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram_Mcast.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_DGRAM_MCAST_H */
-
diff --git a/ace/SOCK_Dgram_Mcast.i b/ace/SOCK_Dgram_Mcast.i
deleted file mode 100644
index b7a9ca06abe..00000000000
--- a/ace/SOCK_Dgram_Mcast.i
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ASYS_INLINE
-ACE_SOCK_Dgram_Mcast::~ACE_SOCK_Dgram_Mcast (void)
-{
-}
-
-ASYS_INLINE int
-ACE_SOCK_Dgram_Mcast::set_option (int option,
- char optval)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::set_option");
-#if defined (ACE_WIN32)
- int sock_opt = optval;
- return this->ACE_SOCK::set_option (IPPROTO_IP,
- option,
- &sock_opt,
- sizeof (sock_opt));
-#else
- return this->ACE_SOCK::set_option (IPPROTO_IP,
- option,
- &optval,
- sizeof (optval));
-#endif /* !ACE_WIN32 */
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram_Mcast::send (const void *buf,
- size_t n,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::send");
- return this->ACE_SOCK_Dgram::send (buf,
- n,
- this->mcast_addr_,
- flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram_Mcast::send (const iovec iov[],
- size_t n,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::send");
- return this->ACE_SOCK_Dgram::send (iov,
- n,
- this->mcast_addr_,
- flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram_Mcast::send (const void *buf,
- size_t n,
- const ACE_Addr &addr,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::send");
- return this->ACE_SOCK_Dgram::send (buf,
- n,
- addr,
- flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram_Mcast::send (const iovec iov[],
- size_t n,
- const ACE_Addr &addr,
- int flags) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::send");
- return this->ACE_SOCK_Dgram::send (iov,
- n,
- addr,
- flags);
-}
-
-
diff --git a/ace/SOCK_Dgram_Mcast_QoS.cpp b/ace/SOCK_Dgram_Mcast_QoS.cpp
deleted file mode 100644
index 628664c864a..00000000000
--- a/ace/SOCK_Dgram_Mcast_QoS.cpp
+++ /dev/null
@@ -1,280 +0,0 @@
-// $Id$
-
-#include "ace/SOCK_Dgram_Mcast_QoS.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram_Mcast_QoS.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-// This is a workaround for platforms with non-standard
-// definitions of the ip_mreq structure
-#if ! defined (IMR_MULTIADDR)
-#define IMR_MULTIADDR imr_multiaddr
-#endif /* ! defined (IMR_MULTIADDR) */
-
-ACE_RCSID(ace, SOCK_Dgram_Mcast_QoS, "$Id $")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Dgram_Mcast_QoS)
-
-// Dummy default constructor...
-
-ACE_SOCK_Dgram_Mcast_QoS::ACE_SOCK_Dgram_Mcast_QoS (void)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast_QoS::ACE_SOCK_Dgram_Mcast_QoS");
-}
-
-int
-ACE_SOCK_Dgram_Mcast_QoS::open (const ACE_Addr &mcast_addr,
- const ACE_QoS_Params &qos_params,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast_QoS::open");
-
- ACE_UNUSED_ARG (qos_params);
-
- // Make a copy of address to use in the <send> methods.
- // Note: Sun C++ 4.2 needs the useless const_cast.
- this->mcast_addr_.set (ACE_reinterpret_cast (const ACE_INET_Addr &,
- ACE_const_cast (ACE_Addr &,
- mcast_addr)));
-
- // Only perform the <open> initialization if we haven't been opened
- // earlier.
- if (this->get_handle () == ACE_INVALID_HANDLE)
- {
- if (ACE_SOCK::open (SOCK_DGRAM,
- protocol_family,
- protocol,
- protocolinfo,
- g,
- flags,
- reuse_addr) == -1)
- return -1;
-
- int one = 1;
- if (reuse_addr
- && this->ACE_SOCK::set_option (SOL_SOCKET,
- SO_REUSEADDR,
- &one,
- sizeof one) == -1)
- return -1;
-#if defined (SO_REUSEPORT)
- else if (this->ACE_SOCK::set_option (SOL_SOCKET,
- SO_REUSEPORT,
- &one,
- sizeof one) == -1)
- return -1;
-#endif /* SO_REUSEPORT */
-
- // Create an address to bind the socket to.
- ACE_INET_Addr local;
-
- if (local.set (this->mcast_addr_.get_port_number ()) == -1)
- return -1;
- else if (ACE_SOCK_Dgram::shared_open (local,
- protocol_family) == -1)
- return -1;
- }
-
- return 0;
-}
-
-
-int
-ACE_SOCK_Dgram_Mcast_QoS::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
- const ACE_QoS_Params &qos_params,
- const ACE_TCHAR *net_if,
- int protocol_family,
- int protocol,
- int reuse_addr,
- ACE_Protocol_Info *protocolinfo)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::subscribe_ifs");
-#if defined (ACE_WIN32)
- // Windows NT's winsock has trouble with multicast subscribes in the
- // presence of multiple network interfaces when the IP address is
- // given as INADDR_ANY. It will pick the first interface and only
- // accept mcast there. So, to work around this, cycle through all
- // of the interfaces known and subscribe to all the non-loopback
- // ones.
- //
- // Note that this only needs to be done on NT, but there's no way to
- // tell at this point if the code will be running on NT - only if it
- // is compiled for NT-only or for NT/95, and that doesn't really
- // help us. It doesn't hurt to do this on Win95, it's just a little
- // slower than it normally would be.
- //
- // NOTE - <ACE::get_ip_interfaces> doesn't always get all of the
- // interfaces. In particular, it may not get a PPP interface. This
- // is a limitation of the way <ACE::get_ip_interfaces> works with
- // MSVC. The reliable way of getting the interface list is
- // available only with MSVC 5.
-
- if (net_if == 0)
- {
- ACE_INET_Addr *if_addrs = 0;
- size_t if_cnt;
-
- if (ACE::get_ip_interfaces (if_cnt,
- if_addrs) != 0)
- return -1;
-
- size_t nr_subscribed = 0;
-
- if (if_cnt < 2)
- {
- if (this->subscribe (mcast_addr,
- qos_params,
- reuse_addr,
- ACE_TEXT ("0.0.0.0"),
- protocol_family,
- protocol,
- protocolinfo) == 0)
- ++nr_subscribed;
- }
- else
- // Iterate through all the interfaces, figure out which ones
- // offer multicast service, and subscribe to them.
- while (if_cnt > 0)
- {
- --if_cnt;
-
- // Convert to 0-based for indexing, next loop check.
- if (if_addrs[if_cnt].get_ip_address() == INADDR_LOOPBACK)
- continue;
- if (this->subscribe (mcast_addr,
- qos_params,
- reuse_addr,
- if_addrs[if_cnt].get_host_addr(),
- protocol_family,
- protocol,
- protocolinfo) == 0)
- ++nr_subscribed;
- }
-
- delete [] if_addrs;
-
- if (nr_subscribed == 0)
- {
- errno = ENODEV;
- return -1;
- }
- else
- // 1 indicates a "short-circuit" return. This handles the
- // rather bizarre semantics of checking all the interfaces on
- // NT.
- return 1;
- }
-#else
- ACE_UNUSED_ARG (mcast_addr);
- ACE_UNUSED_ARG (qos_params);
- ACE_UNUSED_ARG (protocol_family);
- ACE_UNUSED_ARG (protocol);
- ACE_UNUSED_ARG (reuse_addr);
- ACE_UNUSED_ARG (protocolinfo);
-#endif /* ACE_WIN32 */
- // Otherwise, do it like everyone else...
-
- // Create multicast request.
- if (this->make_multicast_address (this->mcast_addr_,
- net_if) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_SOCK_Dgram_Mcast_QoS::subscribe (const ACE_INET_Addr &mcast_addr,
- const ACE_QoS_Params &qos_params,
- int reuse_addr,
- const ACE_TCHAR *net_if,
- int protocol_family,
- int protocol,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- ACE_QoS_Manager *qos_manager,
- ACE_QoS_Session *qos_session)
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast::subscribe");
-
- if (this->open (mcast_addr,
- qos_params,
- protocol_family,
- protocol,
- protocolinfo,
- g,
- flags,
- reuse_addr) == -1)
- return -1;
-
- // The following method call only applies to Win32 currently.
- int result = this->subscribe_ifs (mcast_addr,
- qos_params,
- net_if,
- protocol_family,
- protocol,
- reuse_addr,
- protocolinfo);
- // Check for the "short-circuit" return value of 1 (for NT).
- if (result != 0)
- return result;
-
- // Tell network device driver to read datagrams with a
- // <mcast_request_if_> IP interface.
- else
- {
- // Check if the mcast_addr passed into this method is the
- // same as the QoS session address.
- if (mcast_addr == qos_session->dest_addr ())
- {
-
- // Subscribe to the QoS session.
- ACE_UNUSED_ARG (qos_manager);
-#if 0
- if (qos_manager->join_qos_session (qos_session) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to join QoS Session\n"),
- -1);
-#endif
-
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Dest Addr in the QoS Session does")
- ACE_TEXT (" not match the address passed into")
- ACE_TEXT (" subscribe\n")),
- -1);
- }
-
- sockaddr_in mult_addr;
-
- if (protocol_family == ACE_FROM_PROTOCOL_INFO)
- mult_addr.sin_family = protocolinfo->iAddressFamily;
- else
- mult_addr.sin_family = protocol_family;
-
- mult_addr.sin_port = ACE_HTONS (mcast_addr.get_port_number ());
-
- mult_addr.sin_addr = this->mcast_request_if_.IMR_MULTIADDR;
-
- // XX This is windows stuff only. fredk
- if (ACE_OS::join_leaf (this->get_handle (),
- ACE_reinterpret_cast (const sockaddr *,
- &mult_addr),
- sizeof mult_addr,
- qos_params) == ACE_INVALID_HANDLE
- && errno != ENOTSUP)
- return -1;
- else
- qos_session->qos (*(qos_params.socket_qos ()));
-
- return 0;
- }
-}
diff --git a/ace/SOCK_Dgram_Mcast_QoS.h b/ace/SOCK_Dgram_Mcast_QoS.h
deleted file mode 100644
index 9ed2d63ea87..00000000000
--- a/ace/SOCK_Dgram_Mcast_QoS.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK_Dgram_Mcast_QoS.h
-//
-// = AUTHORS
-// Vishal Kachroo <vishal@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_SOCK_DGRAM_MCAST_QOS_H
-#define ACE_SOCK_DGRAM_MCAST_QOS_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Dgram_Mcast.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_SOCK_Dgram_Mcast_QoS : public ACE_SOCK_Dgram_Mcast
-{
- // = TITLE
- // Defines the member functions for the ACE QoS enabled socket
- // wrapper for UDP/IP multicast.
-
-public:
- // = Initialization routine.
- ACE_SOCK_Dgram_Mcast_QoS (void);
-
- // Note that there is no public <open> method. Therefore, this
- // class cannot be used unless you <subscribe> to a multicast group.
- // If you just want to send (and not listen) to a multicast group,
- // use <ACE_SOCK_Dgram> or <ACE_SOCK_CODgram> instead.
-
- ~ACE_SOCK_Dgram_Mcast_QoS (void);
- // Default dtor.
-
- // = Multicast group management routines.
- int subscribe (const ACE_INET_Addr &mcast_addr,
- const ACE_QoS_Params &qos_params,
- int reuse_addr = 1,
- const ACE_TCHAR *net_if = 0,
- int protocol_family = PF_INET,
- int protocol = 0,
- ACE_Protocol_Info *protocolinfo = 0,
- ACE_SOCK_GROUP g = 0,
- u_long flags = 0,
- ACE_QoS_Manager *qos_manager = 0,
- ACE_QoS_Session *qos_session = 0);
- // This is a QoS-enabled method for joining a multicast group, which
- // passes <qos_params> via <ACE_OS::join_leaf>. The network
- // interface device driver is instructed to accept datagrams with
- // <mcast_addr> multicast addresses. If the socket has already been
- // opened, <subscribe> closes the socket and opens a new socket
- // bound to the <mcast_addr>. The session object specifies the QoS
- // session that the socket wants to subscribe to. A socket may
- // subscribe to multiple QoS sessions by calling this method multiple
- // times with different session objects.
- //
- // The <net_if> interface is hardware specific, e.g., use "netstat
- // -i" to find whether your interface is, such as "le0" or something
- // else. If net_if == 0, <subscribe> uses the default mcast
- // interface. Returns: -1 if the call fails.
- //
- // Note that some platforms, such as pSoS, support only number, not
- // names, for network interfaces. For these platforms, just give
- // these numbers in alphanumeric form and <subscribe> will convert
- // them into numbers via <ACE_OS::atoi>.
-
- // = Data transfer routines.
-
- ssize_t send (const iovec buffers[],
- int buffer_count,
- size_t &number_of_bytes_sent,
- int flags,
- const ACE_Addr &addr,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const;
- // Send <buffer_count> worth of <buffers> to <addr> using overlapped
- // I/O (uses <WSASentTo>). Returns 0 on success.
-
- ssize_t send (const void *buf,
- size_t n,
- const ACE_Addr &addr,
- int flags,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const;
- // Send an <n> byte <buf> to the datagram socket (uses <WSASentTo>).
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- // = Disable public <open> method to ensure class used properly.
-
- int open (const ACE_Addr &mcast_addr,
- const ACE_QoS_Params &qos_params,
- int protocol_family = PF_INET,
- int protocol = 0,
- ACE_Protocol_Info *protocolinfo = 0,
- ACE_SOCK_GROUP g = 0,
- u_long flags = 0,
- int reuse_addr = 0);
- // Not publically visible.
-
- int subscribe_ifs (const ACE_INET_Addr &mcast_addr,
- const ACE_QoS_Params &qos_params,
- const ACE_TCHAR *net_if,
- int protocol_family,
- int protocol,
- int reuse_addr,
- ACE_Protocol_Info *protocolinfo);
- // Subscribe to the multicast interface using QoS-enabled semantics.
-
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Dgram_Mcast_QoS.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_DGRAM_MCAST_QOS_H */
-
-
diff --git a/ace/SOCK_Dgram_Mcast_QoS.i b/ace/SOCK_Dgram_Mcast_QoS.i
deleted file mode 100644
index 879f50d51fd..00000000000
--- a/ace/SOCK_Dgram_Mcast_QoS.i
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ASYS_INLINE
-ACE_SOCK_Dgram_Mcast_QoS::~ACE_SOCK_Dgram_Mcast_QoS (void)
-{
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram_Mcast_QoS::send (const iovec buffers[],
- int buffer_count,
- size_t &number_of_bytes_sent,
- int flags,
- const ACE_Addr &addr,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast_QoS::send");
-
- return ACE_SOCK_Dgram::send (buffers,
- buffer_count,
- number_of_bytes_sent,
- flags,
- addr,
- overlapped,
- func);
-
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Dgram_Mcast_QoS::send (const void *buf,
- size_t n,
- const ACE_Addr &addr,
- int flags,
- ACE_OVERLAPPED *overlapped,
- ACE_OVERLAPPED_COMPLETION_FUNC func) const
-{
- ACE_TRACE ("ACE_SOCK_Dgram_Mcast_QoS::send");
-
- return ACE_SOCK_Dgram::send (buf,
- n,
- addr,
- flags,
- overlapped,
- func);
-}
-
diff --git a/ace/SOCK_IO.cpp b/ace/SOCK_IO.cpp
deleted file mode 100644
index 1f233aa88db..00000000000
--- a/ace/SOCK_IO.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-// SOCK_IO.cpp
-// $Id$
-
-#include "ace/SOCK_IO.h"
-#include "ace/Handle_Set.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_IO.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-ACE_RCSID(ace, SOCK_IO, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_IO)
-
-void
-ACE_SOCK_IO::dump (void) const
-{
- ACE_TRACE ("ACE_SOCK_IO::dump");
-}
-
-// Allows a client to read from a socket without having to provide
-// a buffer to read. This method determines how much data is in the
-// socket, allocates a buffer of this size, reads in the data, and
-// returns the number of bytes read.
-
-ssize_t
-ACE_SOCK_IO::recvv (iovec *io_vec,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_IO::recvv");
-#if defined (FIONREAD)
- ACE_Handle_Set handle_set;
- handle_set.reset ();
- handle_set.set_bit (this->get_handle ());
-
- io_vec->iov_base = 0;
-
- // Check the status of the current socket.
- switch (ACE_OS::select (int (this->get_handle ()) + 1,
- handle_set,
- 0, 0,
- timeout))
- {
- case -1:
- return -1;
- /* NOTREACHED */
- case 0:
- errno = ETIME;
- return -1;
- /* NOTREACHED */
- default:
- // Goes fine, fallthrough to get data
- break;
- }
-
- u_long inlen;
-
- if (ACE_OS::ioctl (this->get_handle (),
- FIONREAD,
- (u_long *) &inlen) == -1)
- return -1;
- else if (inlen > 0)
- {
- ACE_NEW_RETURN (io_vec->iov_base,
- char[inlen],
- -1);
- io_vec->iov_len = this->recv (io_vec->iov_base,
- inlen);
- return io_vec->iov_len;
- }
- else
- return 0;
-#else
- ACE_UNUSED_ARG (io_vec);
- ACE_UNUSED_ARG (timeout);
- ACE_NOTSUP_RETURN (-1);
-#endif /* FIONREAD */
-}
-
-// Send N char *ptrs and int lengths. Note that the char *'s precede
-// the ints (basically, an varargs version of writev). The count N is
-// the *total* number of trailing arguments, *not* a couple of the
-// number of tuple pairs!
-
-ssize_t
-ACE_SOCK_IO::send (size_t n, ...) const
-{
- ACE_TRACE ("ACE_SOCK_IO::send");
-
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, ssize_t);
- }
-
- ssize_t result = ACE_OS::sendv (this->get_handle (),
- iovp,
- total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-
-// This is basically an interface to ACE_OS::readv, that doesn't use
-// the struct iovec_Base explicitly. The ... can be passed as an arbitrary
-// number of (char *ptr, int len) tuples. However, the count N is the
-// *total* number of trailing arguments, *not* a couple of the number
-// of tuple pairs!
-
-ssize_t
-ACE_SOCK_IO::recv (size_t n, ...) const
-{
- ACE_TRACE ("ACE_SOCK_IO::recv");
-
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, ssize_t);
- }
-
- ssize_t result = ACE_OS::recvv (this->get_handle (),
- iovp,
- total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
diff --git a/ace/SOCK_IO.h b/ace/SOCK_IO.h
deleted file mode 100644
index 0ad3ef62682..00000000000
--- a/ace/SOCK_IO.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK_IO.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SOCK_IO_H
-#define ACE_SOCK_IO_H
-#include "ace/pre.h"
-
-#include "ace/SOCK.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_SOCK_IO : public ACE_SOCK
-{
- // = TITLE
- // Defines the methods for the ACE socket wrapper I/O routines
- // (e.g., send/recv).
- //
- // = NOTES
- //
- // If <timeout> == 0, then the call behaves as a normal
- // send/recv call, i.e., for blocking sockets, the call will
- // block until action is possible; for non-blocking sockets,
- // EWOULDBLOCK will be returned if no action is immediately
- // possible.
- //
- // If <timeout> != 0, the call will wait until the relative time
- // specified in *<timeout> elapses.
- //
- // Errors are reported by -1 and 0 return values. If the
- // operation times out, -1 is returned with <errno == ETIME>.
- // If it succeeds the number of bytes transferred is returned.
- //
- // Methods with the extra <flags> argument will always result in
- // <send> getting called. Methods without the extra <flags>
- // argument will result in <send> getting called on Win32
- // platforms, and <write> getting called on non-Win32 platforms.
- //
-public:
- // = Initialization and termination methods.
-
- ACE_SOCK_IO (void);
- // Constructor.
-
- ~ACE_SOCK_IO (void);
- // Destructor.
-
- ssize_t recv (void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout = 0) const;
- // Recv an <n> byte buffer from the connected socket.
-
- ssize_t recv (void *buf,
- size_t n,
- const ACE_Time_Value *timeout = 0) const;
- // Recv an <n> byte buffer from the connected socket.
-
- ssize_t recvv (iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout = 0) const;
- // Recv an <iovec> of size <n> from the connected socket.
-
- ssize_t recv (iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout = 0) const;
- // Same as above. Deprecated.
-
- ssize_t recvv (iovec *io_vec,
- const ACE_Time_Value *timeout = 0) const;
- // Allows a client to read from a socket without having to provide a
- // buffer to read. This method determines how much data is in the
- // socket, allocates a buffer of this size, reads in the data, and
- // returns the number of bytes read. The caller is responsible for
- // deleting the member in the <iov_base> field of <io_vec> using
- // delete [] io_vec->iov_base.
-
- ssize_t recv (iovec *io_vec,
- const ACE_Time_Value *timeout = 0) const;
- // Same as above. Deprecated.
-
- ssize_t recv (size_t n,
- ...) const;
- // Recv <n> varargs messages to the connected socket.
-
- ssize_t recv (void *buf,
- size_t n,
- ACE_OVERLAPPED *overlapped) const;
- // Recv <n> bytes via Win32 <ReadFile> using overlapped I/O.
-
- ssize_t send (const void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout = 0) const;
- // Send an <n> byte buffer to the connected socket.
-
- ssize_t send (const void *buf,
- size_t n,
- const ACE_Time_Value *timeout = 0) const;
- // Send an <n> byte buffer to the connected socket.
-
- ssize_t sendv (const iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout = 0) const;
- // Send an <iovec> of size <n> to the connected socket.
-
- ssize_t send (const iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout = 0) const;
- // Same as above. Deprecated.
-
- ssize_t send (size_t n,
- ...) const;
- // Send <n> varargs messages to the connected socket.
-
- ssize_t send (const void *buf,
- size_t n,
- ACE_OVERLAPPED *overlapped) const;
- // Send <n> bytes via Win32 <WriteFile> using overlapped I/O.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_IO.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_IO_H */
diff --git a/ace/SOCK_IO.i b/ace/SOCK_IO.i
deleted file mode 100644
index d46ca3c188f..00000000000
--- a/ace/SOCK_IO.i
+++ /dev/null
@@ -1,149 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SOCK_IO.i
-
-// Send an n byte message to the connected socket.
-
-ASYS_INLINE
-ACE_SOCK_IO::ACE_SOCK_IO (void)
-{
- // ACE_TRACE ("ACE_SOCK_IO::ACE_SOCK_IO");
-}
-
-ASYS_INLINE
-ACE_SOCK_IO::~ACE_SOCK_IO (void)
-{
- // ACE_TRACE ("ACE_SOCK_IO::~ACE_SOCK_IO");
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::recv (void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_IO::recv");
- return ACE::recv (this->get_handle (),
- buf,
- len,
- flags,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::recv (void *buf,
- size_t len,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_IO::recv");
- return ACE::recv (this->get_handle (),
- buf,
- len,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::recvv (iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_IO::recvv");
- return ACE::recvv (this->get_handle (),
- iov,
- n,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::recv (iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_IO::recv");
- return this->recvv (iov,
- n,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::recv (iovec *io_vec,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_IO::recv");
- return this->recvv (io_vec,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::recv (void *buf,
- size_t n,
- ACE_OVERLAPPED *overlapped) const
-{
- ACE_TRACE ("ACE_SOCK_IO::recv");
- return ACE_OS::read (this->get_handle (),
- (char *) buf,
- n,
- overlapped);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::send (const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_IO::send");
- return ACE::send (this->get_handle (),
- buf,
- len,
- flags,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::send (const void *buf,
- size_t len,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_IO::send");
- return ACE::send (this->get_handle (),
- buf,
- len,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::sendv (const iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_IO::sendv");
- return ACE::sendv (this->get_handle (),
- iov,
- n,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::send (const iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_IO::send");
- return this->sendv (iov,
- n,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_IO::send (const void *buf,
- size_t n,
- ACE_OVERLAPPED *overlapped) const
-{
- ACE_TRACE ("ACE_SOCK_IO::send");
- return ACE_OS::write (this->get_handle (),
- (const char *) buf,
- n,
- overlapped);
-}
diff --git a/ace/SOCK_Stream.cpp b/ace/SOCK_Stream.cpp
deleted file mode 100644
index cd9be127aaa..00000000000
--- a/ace/SOCK_Stream.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// SOCK_Stream.cpp
-// $Id$
-
-#include "ace/SOCK_Stream.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Stream.i"
-#endif
-
-ACE_RCSID(ace, SOCK_Stream, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK_Stream)
-
-void
-ACE_SOCK_Stream::dump (void) const
-{
- ACE_TRACE ("ACE_SOCK_Stream::dump");
-}
-
-int
-ACE_SOCK_Stream::close (void)
-{
-#if defined (ACE_WIN32)
- // We need the following call to make things work correctly on
- // Win32, which requires use to do a <close_writer> before doing the
- // close in order to avoid losing data. Note that we don't need to
- // do this on UNIX since it doesn't have this "feature". Moreover,
- // this will cause subtle problems on UNIX due to the way that
- // fork() works.
- this->close_writer ();
-#endif /* ACE_WIN32 */
- // Close down the socket.
- return ACE_SOCK::close ();
-}
-
diff --git a/ace/SOCK_Stream.h b/ace/SOCK_Stream.h
deleted file mode 100644
index 6562ca36817..00000000000
--- a/ace/SOCK_Stream.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SOCK_Stream.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SOCK_STREAM_H
-#define ACE_SOCK_STREAM_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_IO.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/INET_Addr.h"
-
-class ACE_Export ACE_SOCK_Stream : public ACE_SOCK_IO
-{
- // = TITLE
- // Defines the methods in the <ACE_SOCK_Stream> abstraction.
- //
- // = DESCRIPTION
- // This adds additional wrapper methods atop the <ACE_SOCK_IO>
- // class.
- //
- // = NOTES
- //
- // The "_n" I/O methods keep looping until all the data has been
- // transferred. These methods also work for sockets in
- // non-blocking mode i.e., they keep looping on EWOULDBLOCK.
- // <timeout> is used to make sure we keep making progress, i.e.,
- // the same timeout value is used for every I/O operation in the
- // loop and the timeout is not counted down. If the transfer
- // times out, the number of bytes transferred so far are
- // returned.
- //
- // Errors are reported by -1 and 0 return values.
- //
- // Methods with the extra <flags> argument will always result in
- // <send> getting called. Methods without the extra <flags>
- // argument will result in <send> getting called on Win32
- // platforms, and <write> getting called on non-Win32 platforms.
- //
-public:
- // Initialization and termination methods.
- ACE_SOCK_Stream (void);
- // Constructor.
-
- ACE_SOCK_Stream (ACE_HANDLE h);
- // Constructor (sets the underlying <ACE_HANDLE> with <h>).
-
- ~ACE_SOCK_Stream (void);
- // Destructor.
-
- // = I/O functions.
-
- ssize_t recv_n (void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0) const;
- // Try to recv exactly <len> bytes into <buf> from <handle>.
-
- ssize_t recv_n (void *buf,
- size_t len,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0) const;
- // Try to recv exactly <len> bytes into <buf> from <handle>.
-
- ssize_t recvv_n (iovec iov[],
- size_t iovcnt,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0) const;
- // Receive an <iovec> of size <iovcnt> to the connected socket.
-
- ssize_t send_n (const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0) const;
- // Try to send exactly <len> bytes into <buf> from <handle>.
-
- ssize_t send_n (const void *buf,
- size_t len,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0) const;
- // Try to send exactly <len> bytes into <buf> from <handle>.
-
- ssize_t sendv_n (const iovec iov[],
- size_t iovcnt,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0) const;
- // Send an <iovec> of size <iovcnt> to the connected socket.
-
- // = Send/receive ``urgent'' data (see TCP specs...).
- ssize_t send_urg (const void *ptr,
- size_t len = sizeof (char),
- const ACE_Time_Value *timeout = 0) const;
-
- ssize_t recv_urg (void *ptr,
- size_t len = sizeof (char),
- const ACE_Time_Value *timeout = 0) const;
-
- // = Selectively close endpoints.
- int close_reader (void);
- // Close down the reader.
- int close_writer (void);
- // Close down the writer.
-
- int close (void);
- // Close down the socket (we need this to make things work correctly
- // on Win32, which requires use to do a <close_writer> before doing
- // the close to avoid losing data).
-
- // = Meta-type info
- typedef ACE_INET_Addr PEER_ADDR;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK_Stream.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SOCK_STREAM_H */
diff --git a/ace/SOCK_Stream.i b/ace/SOCK_Stream.i
deleted file mode 100644
index b20a07b6e56..00000000000
--- a/ace/SOCK_Stream.i
+++ /dev/null
@@ -1,159 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/SOCK_Stream.h"
-
-ASYS_INLINE
-ACE_SOCK_Stream::ACE_SOCK_Stream (void)
-{
- // ACE_TRACE ("ACE_SOCK_Stream::ACE_SOCK_Stream");
-}
-
-ASYS_INLINE
-ACE_SOCK_Stream::ACE_SOCK_Stream (ACE_HANDLE h)
-{
- // ACE_TRACE ("ACE_SOCK_Stream::ACE_SOCK_Stream");
- this->set_handle (h);
-}
-
-ASYS_INLINE
-ACE_SOCK_Stream::~ACE_SOCK_Stream (void)
-{
- // ACE_TRACE ("ACE_SOCK_Stream::~ACE_SOCK_Stream");
-}
-
-ASYS_INLINE int
-ACE_SOCK_Stream::close_reader (void)
-{
- ACE_TRACE ("ACE_SOCK_Stream::close_reader");
- if (this->get_handle () != ACE_INVALID_HANDLE)
- return ACE_OS::shutdown (this->get_handle (), 0);
- else
- return 0;
-}
-
-// Shut down just the writing end of a ACE_SOCK.
-
-ASYS_INLINE int
-ACE_SOCK_Stream::close_writer (void)
-{
- ACE_TRACE ("ACE_SOCK_Stream::close_writer");
- if (this->get_handle () != ACE_INVALID_HANDLE)
- return ACE_OS::shutdown (this->get_handle (), 1);
- else
- return 0;
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Stream::recv_n (void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred) const
-{
- ACE_TRACE ("ACE_SOCK_Stream::recv_n");
- return ACE::recv_n (this->get_handle (),
- buf,
- len,
- flags,
- timeout,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Stream::recv_n (void *buf,
- size_t len,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred) const
-{
- ACE_TRACE ("ACE_SOCK_Stream::recv_n");
- return ACE::recv_n (this->get_handle (),
- buf,
- len,
- timeout,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Stream::recvv_n (iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred) const
-{
- ACE_TRACE ("ACE_SOCK_Stream::recvv_n");
- return ACE::recvv_n (this->get_handle (),
- iov,
- n,
- timeout,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Stream::send_n (const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred) const
-{
- ACE_TRACE ("ACE_SOCK_Stream::send_n");
- return ACE::send_n (this->get_handle (),
- buf,
- len,
- flags,
- timeout,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Stream::send_n (const void *buf,
- size_t len,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred) const
-{
- ACE_TRACE ("ACE_SOCK_Stream::send_n");
- return ACE::send_n (this->get_handle (),
- buf,
- len,
- timeout,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Stream::sendv_n (const iovec iov[],
- size_t n,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred) const
-{
- ACE_TRACE ("ACE_SOCK_Stream::sendv_n");
- return ACE::sendv_n (this->get_handle (),
- iov,
- n,
- timeout,
- bytes_transferred);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Stream::send_urg (const void *ptr,
- size_t len,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_Stream::send_urg");
- return ACE::send (this->get_handle (),
- ptr,
- len,
- MSG_OOB,
- timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SOCK_Stream::recv_urg (void *ptr,
- size_t len,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SOCK_Stream::recv_urg");
- return ACE::recv (this->get_handle (),
- ptr,
- len,
- MSG_OOB,
- timeout);
-}
diff --git a/ace/SPIPE.cpp b/ace/SPIPE.cpp
deleted file mode 100644
index 0f2be4cc65d..00000000000
--- a/ace/SPIPE.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// SPIPE.cpp
-// $Id$
-
-#include "ace/SPIPE.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SPIPE.i"
-#endif
-
-ACE_RCSID(ace, SPIPE, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE)
-
-// This is the do-nothing constructor.
-
-ACE_SPIPE::ACE_SPIPE (void)
-{
- // ACE_TRACE ("ACE_SPIPE::ACE_SPIPE");
-}
-
-void
-ACE_SPIPE::dump (void) const
-{
- ACE_TRACE ("ACE_SPIPE::dump");
-}
-
-// Close down a ACE_SPIPE.
-
-int
-ACE_SPIPE::get_local_addr (ACE_SPIPE_Addr &local_sap) const
-{
- ACE_TRACE ("ACE_SPIPE::get_local_addr");
- local_sap = this->local_addr_;
- return 0;
-}
-
-// Close down the STREAM pipe without removing the rendezvous point.
-
-int
-ACE_SPIPE::close (void)
-{
- ACE_TRACE ("ACE_SPIPE::close");
- int result = 0;
-
- if (this->get_handle () != ACE_INVALID_HANDLE)
- {
- result = ACE_OS::close (this->get_handle ());
- this->set_handle (ACE_INVALID_HANDLE);
- }
- return result;
-}
-
-// Close down the STREAM pipe and remove the rendezvous point from the
-// file system.
-
-int
-ACE_SPIPE::remove (void)
-{
- ACE_TRACE ("ACE_SPIPE::remove");
- int result = this->close ();
- return ACE_OS::unlink (this->local_addr_.get_path_name ()) == -1 || result == -1 ? -1 : 0;
-}
-
diff --git a/ace/SPIPE.h b/ace/SPIPE.h
deleted file mode 100644
index a9fcfe334e5..00000000000
--- a/ace/SPIPE.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SPIPE.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SPIPE_H
-#define ACE_SPIPE_H
-#include "ace/pre.h"
-
-#include "ace/IPC_SAP.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SPIPE_Addr.h"
-
-class ACE_Export ACE_SPIPE : public ACE_IPC_SAP
-{
- // = TITLE
- // Defines the member functions for the base class of the
- // ACE_SPIPE abstraction.
-public:
- int close (void);
- // Close down the STREAM pipe without removing the rendezvous point.
-
- int remove (void);
- // Close down the STREAM pipe and remove the rendezvous point from
- // the file system.
-
- int get_local_addr (ACE_SPIPE_Addr &) const;
- // Return the local address of this endpoint.
-
- int disable (int signum) const ;
- // Disable signal <signum>
- // This is here to prevent Win32 from
- // disabling SPIPE using socket calls
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_SPIPE (void);
- // Ensure that this class is an abstract base class
-
- ACE_SPIPE_Addr local_addr_;
- // Our local address.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SPIPE.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SPIPE_H */
diff --git a/ace/SPIPE.i b/ace/SPIPE.i
deleted file mode 100644
index fd205ab76df..00000000000
--- a/ace/SPIPE.i
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SPIPE.i
-
-ASYS_INLINE int
-ACE_SPIPE::disable (int signum) const
-{
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG (signum) ;
- return 0 ;
-#else /* ACE_WIN32 */
- return ACE_IPC_SAP::disable (signum) ;
-#endif /* ACE_WIN32 */
-}
-
diff --git a/ace/SPIPE_Acceptor.cpp b/ace/SPIPE_Acceptor.cpp
deleted file mode 100644
index a87510de58b..00000000000
--- a/ace/SPIPE_Acceptor.cpp
+++ /dev/null
@@ -1,261 +0,0 @@
-// SPIPE_Acceptor.cpp
-// $Id$
-
-#include "ace/SPIPE_Acceptor.h"
-
-ACE_RCSID(ace, SPIPE_Acceptor, "$Id$")
-
-ACE_SPIPE_Acceptor::ACE_SPIPE_Acceptor (void)
-{
- ACE_TRACE ("ACE_SPIPE_Acceptor::ACE_SPIPE_Acceptor");
-}
-
-int
-ACE_SPIPE_Acceptor::remove (void)
-{
- ACE_TRACE ("ACE_SPIPE_Acceptor::remove");
-#if defined (ACE_HAS_STREAM_PIPES)
- int result = this->close ();
-
- // Remove the underlying file.
- return ACE_OS::unlink (this->local_addr_.get_path_name ()) == -1
- || result == -1 ? -1 : 0;
-#else
- this->close ();
- return 0;
-#endif
-}
-
-ACE_ALLOC_HOOK_DEFINE (ACE_SPIPE_Acceptor)
-
-void
-ACE_SPIPE_Acceptor::dump (void) const
-{
- ACE_TRACE ("ACE_SPIPE_Acceptor::dump");
-}
-
-// General purpose routine for performing server ACE_SPIPE creation.
-
-int
-ACE_SPIPE_Acceptor::open (const ACE_SPIPE_Addr &local_sap,
- int /* reuse_addr */,
- int perms)
-{
- ACE_TRACE ("ACE_SPIPE_Acceptor::open");
-
- this->local_addr_ = local_sap;
- this->set_handle (ACE_INVALID_HANDLE);
-
- return this->create_new_instance (perms);
-}
-
-int
-ACE_SPIPE_Acceptor::create_new_instance (int perms)
-{
-#if defined (ACE_HAS_STREAM_PIPES)
- ACE_HANDLE spipe[2];
- char module[] = "connld";
-
- ACE_HANDLE handle = ACE_OS::creat (this->local_addr_.get_path_name (),
- perms);
- if (handle == ACE_INVALID_HANDLE)
- return -1;
- else if (ACE_OS::close (handle) == -1)
- return -1;
- else if (ACE_OS::pipe (spipe) == -1)
- return -1;
- else if (ACE_OS::ioctl (spipe[0],
- I_PUSH,
- module) == -1)
- return -1;
- else if (ACE_OS::fattach (spipe[0],
- this->local_addr_.get_path_name ()) == -1)
- return -1;
-
- this->set_handle (spipe[1]);
- return 0;
-
-#elif (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
-
- // Create a new instance of the Named Pipe (WIN32). A new instance
- // of the named pipe must be created for every client process. If
- // an instance of the named pipe that is already connected to a
- // client process is reused with a new client process,
- // ::ConnectNamedPipe () would fail.
-
- ACE_UNUSED_ARG (perms);
- ACE_TRACE ("ACE_SPIPE_Acceptor::create_new_instance");
- int status;
-
- // Create a new instance of the named pipe
- ACE_HANDLE handle =
-#if defined (ACE_USES_WCHAR)
- ::CreateNamedPipeW (
-#else /* ACE_USES_WCHAR */
- ::CreateNamedPipeA (
-#endif /* ACE_USES_WCHAR */
- this->local_addr_.get_path_name (),
- PIPE_ACCESS_DUPLEX
- | FILE_FLAG_OVERLAPPED,
- PIPE_TYPE_MESSAGE
- | PIPE_READMODE_MESSAGE,
- PIPE_UNLIMITED_INSTANCES,
- 1024 * 10,
- 1024 * 10,
- ACE_DEFAULT_TIMEOUT,
- NULL);
-
-
- if (handle == ACE_INVALID_HANDLE)
- {
- return -1;
- }
- else
- {
- // Start the Connect (analogous to listen () for a socket). Completion
- // is noted by the event being signalled. If a client connects
- // before this call, the error status will be ERROR_PIPE_CONNECTED, in
- // which case that fact is remembered via already_connected_ and noted
- // when the user calls accept ().
- // Else the error status should be ERROR_IO_PENDING and the OS will
- // signal the event when it's done.
- this->already_connected_ = FALSE;
- this->set_handle (handle);
- this->overlapped_.hEvent = this->event_.handle ();
- this->event_.reset ();
-
- BOOL result = ::ConnectNamedPipe (handle, &this->overlapped_);
- ACE_ASSERT (result == FALSE);
- ACE_UNUSED_ARG (result);
-
- status = ::GetLastError ();
- if (status == ERROR_PIPE_CONNECTED)
- this->already_connected_ = TRUE;
- else if (status != ERROR_IO_PENDING)
- this->close (); // Sets handle to ACE_INVALID_HANDLE
- }
- return (this->get_handle () == ACE_INVALID_HANDLE ? -1 : 0);
-#else
- ACE_UNUSED_ARG (perms);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-int
-ACE_SPIPE_Acceptor::close (void)
-{
- ACE_TRACE ("ACE_SPIPE_Acceptor::close");
-
- // This behavior is shared by UNIX and Win32...
- int result = this->ACE_SPIPE::close ();
- this->set_handle (ACE_INVALID_HANDLE);
-
-#if defined (ACE_HAS_STREAM_PIPES)
- ACE_OS::fdetach (this->local_addr_.get_path_name ());
-#endif /* ACE_HAS_STREAM_PIPES */
- return result;
-}
-
-ACE_SPIPE_Acceptor::ACE_SPIPE_Acceptor (const ACE_SPIPE_Addr &local_sap,
- int reuse_addr,
- int perms)
-{
- ACE_TRACE ("ACE_SPIPE_Acceptor::ACE_SPIPE_Acceptor");
-
- if (this->open (local_sap, reuse_addr, perms) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SPIPE_Acceptor")));
-}
-
-// General purpose routine for accepting new connections.
-
-int
-ACE_SPIPE_Acceptor::accept (ACE_SPIPE_Stream &new_io,
- ACE_SPIPE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle)
-{
- ACE_TRACE ("ACE_SPIPE_Acceptor::accept");
- ACE_UNUSED_ARG (reset_new_handle);
-
-#if defined (ACE_HAS_STREAM_PIPES)
- strrecvfd r_handle;
-
- // Note that if THIS->MILLI_SECOND_DELAY == -1 we block on
- // ACE_OS::ioctl (). Otherwise, we will wait for the desired number
- // of milli seconds using ACE_OS::poll.
-
- if (timeout != 0 &&
- ACE::handle_timed_accept (this->get_handle (),
- timeout,
- restart) == -1)
- return -1;
- else if (ACE_OS::ioctl (this->get_handle (),
- I_RECVFD,
- &r_handle) == -1)
- return -1;
-
- new_io.set_handle (r_handle.fd);
- new_io.local_addr_ = this->local_addr_;
- new_io.remote_addr_.set_size (sizeof r_handle.gid + sizeof r_handle.uid);
- new_io.remote_addr_.group_id (r_handle.gid);
- new_io.remote_addr_.user_id (r_handle.uid);
-
- // This is for compatibility with ACE_SOCK_Acceptor and
- // ACE_TLI_Acceptor.
- if (remote_addr != 0)
- *remote_addr = new_io.remote_addr_;
-
- return 0;
-#elif (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
- ACE_UNUSED_ARG (restart);
- ACE_UNUSED_ARG (remote_addr);
-
- // Check to see if we have a valid pipe
- if (this->get_handle () == ACE_INVALID_HANDLE)
- return -1;
-
- // open () started the Connect in asynchronous mode. Wait for the event
- // in the OVERLAPPED structure to be signalled, then grab the status.
- if (this->already_connected_ == FALSE)
- {
- if (timeout != 0)
- {
- ACE_Time_Value abstime (ACE_OS::gettimeofday () + *timeout);
- if (this->event_.wait (&abstime) == -1)
- return -1;
- }
- else
- if (this->event_.wait () == -1)
- return -1;
-
- // Should be here with the ConnectNamedPipe operation complete.
- // Steal the already_connected_ flag to record the results.
- DWORD unused;
- this->already_connected_ = ::GetOverlappedResult (this->get_handle (),
- &this->overlapped_,
- &unused,
- FALSE);
- }
-
- if (this->already_connected_)
- {
- new_io.set_handle (this->get_handle ());
- this->set_handle (ACE_INVALID_HANDLE);
- new_io.local_addr_ = this->local_addr_;
-
- // Create a new instance of the pipe for the next connection.
- this->create_new_instance ();
- return 0;
- }
- return -1;
-#else
- ACE_UNUSED_ARG (restart);
- ACE_UNUSED_ARG (timeout);
- ACE_UNUSED_ARG (remote_addr);
- ACE_UNUSED_ARG (new_io);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
diff --git a/ace/SPIPE_Acceptor.h b/ace/SPIPE_Acceptor.h
deleted file mode 100644
index 2e4d08fa338..00000000000
--- a/ace/SPIPE_Acceptor.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SPIPE_Acceptor.h
-//
-// = AUTHOR
-// Doug Schmidt and Prashant Jain
-//
-// ============================================================================
-
-#ifndef ACE_SPIPE_ACCEPTOR_H
-#define ACE_SPIPE_ACCEPTOR_H
-#include "ace/pre.h"
-
-#include "ace/SPIPE_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_WIN32)
-#include "ace/Synch.h"
-#endif /* ACE_WIN32 */
-
-class ACE_Export ACE_SPIPE_Acceptor : public ACE_SPIPE
-{
- // = TITLE
- // Defines the format and interface for the listener side of the
- // ACE_SPIPE_Stream.
-public:
- // = Initialization and termination methods.
- ACE_SPIPE_Acceptor (void);
- // Default constructor.
-
- ACE_SPIPE_Acceptor (const ACE_SPIPE_Addr &local_sap,
- int reuse_addr = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
- // Initiate a passive-mode STREAM pipe listener.
-
- int open (const ACE_SPIPE_Addr &local_sap,
- int reuse_addr = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
- // Initiate a passive-mode STREAM pipe listener.
-
- int close (void);
- // Close down the passive-mode STREAM pipe listener.
-
- int remove (void);
- // Remove the underlying mounted pipe from the file system.
-
- // = Passive connection acceptance method.
- int accept (ACE_SPIPE_Stream &ipc_sap_spipe,
- ACE_SPIPE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0);
- // Accept a new data transfer connection. A <timeout> of 0 means
- // block forever, a <timeout> of {0, 0} means poll. <restart> == 1
- // means "restart if interrupted."
-
- // = Meta-type info
- typedef ACE_SPIPE_Addr PEER_ADDR;
- typedef ACE_SPIPE_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int create_new_instance (int perms = 0);
- // Create a new instance of an SPIPE.
-
-#if (defined (ACE_WIN32) && defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
- ACE_OVERLAPPED overlapped_;
- ACE_Manual_Event event_;
- char already_connected_;
-#endif /* ACE_WIN32 */
-
-};
-
-#include "ace/post.h"
-#endif /* ACE_SPIPE_ACCEPTOR_H */
diff --git a/ace/SPIPE_Addr.cpp b/ace/SPIPE_Addr.cpp
deleted file mode 100644
index 566597a7d9e..00000000000
--- a/ace/SPIPE_Addr.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-// SPIPE_Addr.cpp
-// $Id$
-
-#include "ace/SPIPE_Addr.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/SPIPE_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, SPIPE_Addr, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE_Addr)
-
-void
-ACE_SPIPE_Addr::dump (void) const
-{
-}
-
-// Set a pointer to the address.
-void
-ACE_SPIPE_Addr::set_addr (void *addr, int len)
-{
- ACE_TRACE ("ACE_SPIPE_Addr::set_addr");
-
- this->ACE_Addr::base_set (AF_SPIPE, len);
- ACE_OS::memcpy ((void *) &this->SPIPE_addr_,
- (void *) addr,
- len);
-}
-
-// Do nothing constructor.
-
-ACE_SPIPE_Addr::ACE_SPIPE_Addr (void)
- : ACE_Addr (AF_SPIPE, sizeof this->SPIPE_addr_)
-{
- (void) ACE_OS::memset ((void *) &this->SPIPE_addr_,
- 0,
- sizeof this->SPIPE_addr_);
-}
-
-// Transform the string into the current addressing format.
-
-int
-ACE_SPIPE_Addr::string_to_addr (const ACE_TCHAR *addr)
-{
- return this->set (addr);
-}
-
-int
-ACE_SPIPE_Addr::set (const ACE_SPIPE_Addr &sa)
-{
- this->base_set (sa.get_type (), sa.get_size ());
-
- if (sa.get_type () == AF_ANY)
- (void) ACE_OS::memset ((void *) &this->SPIPE_addr_,
- 0,
- sizeof this->SPIPE_addr_);
- else
- (void) ACE_OS::memcpy ((void *) &this->SPIPE_addr_, (void *)
- &sa.SPIPE_addr_,
- sa.get_size ());
- return 0;
-}
-
-// Copy constructor.
-
-ACE_SPIPE_Addr::ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa)
- : ACE_Addr (AF_SPIPE, sizeof this->SPIPE_addr_)
-{
- this->set (sa);
-}
-
-int
-ACE_SPIPE_Addr::set (const ACE_TCHAR *addr,
- gid_t gid,
- uid_t uid)
-{
- int len = sizeof (this->SPIPE_addr_.uid_);
- len += sizeof (this->SPIPE_addr_.gid_);
-
-#if defined (ACE_WIN32)
- const ACE_TCHAR *colonp = ACE_OS::strchr (addr, ':');
- ACE_TCHAR temp[BUFSIZ];
-
- if (colonp == 0) // Assume it's a local name.
- {
- ACE_OS::strcpy (temp, ACE_TEXT ( "\\\\.\\pipe\\"));
- ACE_OS::strcat (temp, addr);
- }
- else
- {
-
- if (ACE_OS::strncmp (addr,
- ACE_TEXT ("localhost"),
- ACE_OS::strlen ("localhost")) == 0)
- // change "localhost" to "."
- ACE_OS::strcpy (temp, ACE_TEXT ("\\\\."));
- else
- {
- ACE_OS::strcpy (temp, ACE_TEXT ("\\\\"));
-
- ACE_TCHAR *t;
-
- // We need to allocate a duplicate so that we can write a
- // NUL character into it.
- ACE_ALLOCATOR_RETURN (t, ACE_OS::strdup (addr), -1);
-
- t[colonp - addr] = ACE_TEXT ('\0');
- ACE_OS::strcpy (temp, t);
-
- ACE_OS::free (t);
- }
-
- ACE_OS::strcat (temp, ACE_TEXT ("\\pipe\\"));
- ACE_OS::strcat (temp, colonp + 1);
- }
- this->ACE_Addr::base_set (AF_SPIPE,
- ACE_OS::strlen (temp) + len);
-
- ACE_OS::strcpy (this->SPIPE_addr_.rendezvous_, temp);
-#else
- this->ACE_Addr::base_set (AF_SPIPE,
- ACE_OS::strlen (addr) + len);
- ACE_OS::strncpy (this->SPIPE_addr_.rendezvous_,
- addr,
- sizeof this->SPIPE_addr_.rendezvous_);
-#endif /* ACE_WIN32 */
- this->SPIPE_addr_.gid_ = gid == 0 ? ACE_OS::getgid () : gid;
- this->SPIPE_addr_.uid_ = uid == 0 ? ACE_OS::getuid () : uid;
- return 0;
-}
-
-// Create a ACE_Addr from a ACE_SPIPE pathname.
-
-ACE_SPIPE_Addr::ACE_SPIPE_Addr (const ACE_TCHAR *addr,
- gid_t gid,
- uid_t uid)
- : ACE_Addr (AF_SPIPE, sizeof this->SPIPE_addr_)
-{
- this->set (addr, gid, uid);
-}
-
diff --git a/ace/SPIPE_Addr.h b/ace/SPIPE_Addr.h
deleted file mode 100644
index 063c2382315..00000000000
--- a/ace/SPIPE_Addr.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SPIPE_Addr.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SPIPE_ADDR_H
-#define ACE_SPIPE_ADDR_H
-#include "ace/pre.h"
-
-#include "ace/Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/ACE.h"
-
-class ACE_Export ACE_SPIPE_Addr : public ACE_Addr
-{
- // = TITLE
- // Defines the SVR4 STREAM pipe address family address format.
-public:
- // = Initialization methods.
- ACE_SPIPE_Addr (void);
- // Default constructor.
-
- ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa);
- // Copy constructor.
-
- ACE_SPIPE_Addr (const ACE_TCHAR *rendezvous_point, gid_t = 0, uid_t = 0);
- // Create a ACE_SPIPE_Addr from a rendezvous point in the file
- // system.
-
- int set (const ACE_SPIPE_Addr &sa);
- // Acts like a copy constructor...
-
- int set (const ACE_TCHAR *rendezvous_point, gid_t = 0, uid_t = 0);
- // Create a ACE_SPIPE_Addr from a rendezvous point in the file
- // system.
-
- virtual void *get_addr (void) const;
- // Return a pointer to the address.
-
- virtual void set_addr (void *addr, int len);
- // Set a pointer to the underlying network address.
-
- virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
- // Transform the current address into string format.
-
- virtual int string_to_addr (const ACE_TCHAR *addr);
- // Transform the string into the current addressing format.
-
- // = Equality/inequality tests
- int operator == (const ACE_SPIPE_Addr &SAP) const;
- // Check for equality.
-
- int operator != (const ACE_SPIPE_Addr &SAP) const;
- // Check for inequality
-
- // = SPIPE-specific address operations
- const ACE_TCHAR *get_path_name (void) const;
- // Pathname of rendezvous point in file system.
-
- uid_t user_id (void) const;
- // Get user id.
- void user_id (uid_t uid);
- // Set user id.
-
- void group_id (gid_t gid);
- // Set group ids.
- gid_t group_id (void) const;
- // Get group ids.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- struct SPIPE_Addr
- {
- // = TITLE
- // Contains security attributes.
-
- gid_t gid_;
- // Group id.
-
- uid_t uid_;
- // User id.
-
- ACE_TCHAR rendezvous_[MAXNAMLEN + 1];
- // Pathname in the file system.
-
- } SPIPE_addr_;
- // Contents of an SPIPE address.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/SPIPE_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SPIPE_ADDR_H */
diff --git a/ace/SPIPE_Addr.i b/ace/SPIPE_Addr.i
deleted file mode 100644
index d7947515c24..00000000000
--- a/ace/SPIPE_Addr.i
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SPIPE_Addr.i
-
-#include "ace/SString.h"
-
-// Transform the current address into string format.
-
-ACE_INLINE int
-ACE_SPIPE_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const
-{
- ACE_OS::strncpy (s,
- this->SPIPE_addr_.rendezvous_,
- len);
- return 0;
-}
-
-// Return the address.
-
-ACE_INLINE void *
-ACE_SPIPE_Addr::get_addr (void) const
-{
- return (void *) &this->SPIPE_addr_;
-}
-
-// Compare two addresses for equality.
-
-ACE_INLINE int
-ACE_SPIPE_Addr::operator == (const ACE_SPIPE_Addr &sap) const
-{
- return ACE_OS::strcmp (this->SPIPE_addr_.rendezvous_,
- sap.SPIPE_addr_.rendezvous_ ) == 0;
-}
-
-// Compare two addresses for inequality.
-
-ACE_INLINE int
-ACE_SPIPE_Addr::operator != (const ACE_SPIPE_Addr &sap) const
-{
- return !((*this) == sap); // This is lazy, of course... ;-)
-}
-
-// Return the path name used for the rendezvous point.
-
-ACE_INLINE const ACE_TCHAR *
-ACE_SPIPE_Addr::get_path_name (void) const
-{
- return this->SPIPE_addr_.rendezvous_;
-}
-
-ACE_INLINE uid_t
-ACE_SPIPE_Addr::user_id (void) const
-{
- return this->SPIPE_addr_.uid_;
-}
-
-ACE_INLINE void
-ACE_SPIPE_Addr::user_id (uid_t uid)
-{
- this->SPIPE_addr_.uid_ = uid;
-}
-
-ACE_INLINE gid_t
-ACE_SPIPE_Addr::group_id (void) const
-{
- return this->SPIPE_addr_.gid_;
-}
-
-ACE_INLINE void
-ACE_SPIPE_Addr::group_id (gid_t gid)
-{
- this->SPIPE_addr_.gid_ = gid;
-}
diff --git a/ace/SPIPE_Connector.cpp b/ace/SPIPE_Connector.cpp
deleted file mode 100644
index 3ea8f5aa617..00000000000
--- a/ace/SPIPE_Connector.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// SPIPE_Connector.cpp
-// $Id$
-
-#include "ace/SPIPE_Connector.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SPIPE_Connector.i"
-#endif
-
-ACE_RCSID(ace, SPIPE_Connector, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE_Connector)
-
-// Creates a Local ACE_SPIPE.
-
-ACE_SPIPE_Connector::ACE_SPIPE_Connector (ACE_SPIPE_Stream &new_io,
- const ACE_SPIPE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr & local_sap,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_SPIPE_Connector::ACE_SPIPE_Connector");
- if (this->connect (new_io, remote_sap, timeout, local_sap,
- reuse_addr, flags, perms) == -1
- && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("address %s, %p\n"),
- remote_sap.get_path_name (), ACE_TEXT ("ACE_SPIPE_Connector")));
-}
-
-void
-ACE_SPIPE_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_SPIPE_Connector::dump");
-}
-
-ACE_SPIPE_Connector::ACE_SPIPE_Connector (void)
-{
- ACE_TRACE ("ACE_SPIPE_Connector::ACE_SPIPE_Connector");
-}
-
-int
-ACE_SPIPE_Connector::connect (ACE_SPIPE_Stream &new_io,
- const ACE_SPIPE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr & /* local_sap */,
- int /* reuse_addr */,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_SPIPE_Connector::connect");
-
- // Make darn sure that the O_CREAT flag is not set!
-#if ! defined (ACE_PSOS_DIAB_MIPS)
- ACE_CLR_BITS (flags, O_CREAT);
-# endif /* !ACE_PSOS_DIAB_MIPS */
- ACE_HANDLE handle = ACE::handle_timed_open (timeout,
- remote_sap.get_path_name (),
- flags, perms);
- new_io.set_handle (handle);
- new_io.remote_addr_ = remote_sap; // class copy.
-
-#if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP)
- DWORD pipe_mode = PIPE_READMODE_MESSAGE | PIPE_WAIT;
-
- // Set named pipe mode and buffering characteristics.
- if (handle != ACE_INVALID_HANDLE)
- return ::SetNamedPipeHandleState (handle,
- &pipe_mode,
- NULL,
- NULL);
-#endif
- return handle == ACE_INVALID_HANDLE ? -1 : 0;
-}
diff --git a/ace/SPIPE_Connector.h b/ace/SPIPE_Connector.h
deleted file mode 100644
index 9bc38a1f7c7..00000000000
--- a/ace/SPIPE_Connector.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SPIPE_Connector.h
-//
-// = AUTHOR
-// Doug Schmidt and Prashant Jain
-//
-// ============================================================================
-
-#ifndef ACE_SPIPE_CONNECTOR_H
-#define ACE_SPIPE_CONNECTOR_H
-#include "ace/pre.h"
-
-#include "ace/SPIPE_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_SPIPE_Connector
-{
- // = TITLE
- // Defines an active connection factory for the STREAM pipe
- // wrappers.
-public:
- // = Initialization method.
- ACE_SPIPE_Connector (void);
- // Default constructor.
-
- ACE_SPIPE_Connector (ACE_SPIPE_Stream &new_io,
- const ACE_SPIPE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
- // The <flags> and <perms> arguments are passed down to the <open>
- // method.
-
- int connect (ACE_SPIPE_Stream &new_io,
- const ACE_SPIPE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
- // The <flags> and <perms> arguments are passed down to the <open>
- // method.
-
- int reset_new_handle (ACE_HANDLE handle);
- // Resets any event associations on this handle
-
- // = Meta-type info
- typedef ACE_SPIPE_Addr PEER_ADDR;
- typedef ACE_SPIPE_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SPIPE_Connector.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SPIPE_CONNECTOR_H */
diff --git a/ace/SPIPE_Connector.i b/ace/SPIPE_Connector.i
deleted file mode 100644
index 9ce4c1a7855..00000000000
--- a/ace/SPIPE_Connector.i
+++ /dev/null
@@ -1,13 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SPIPE_Connector.i
-
-ASYS_INLINE int
-ACE_SPIPE_Connector::reset_new_handle (ACE_HANDLE handle)
-{
- ACE_UNUSED_ARG (handle);
- // Nothing to do here since the handle is not a socket
- return 0;
-}
-
diff --git a/ace/SPIPE_Stream.cpp b/ace/SPIPE_Stream.cpp
deleted file mode 100644
index 9488d8dcdc0..00000000000
--- a/ace/SPIPE_Stream.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// SPIPE_Stream.cpp
-// $Id$
-
-#include "ace/SPIPE_Stream.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SPIPE_Stream.i"
-#endif
-
-ACE_RCSID(ace, SPIPE_Stream, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SPIPE_Stream)
-
-void
-ACE_SPIPE_Stream::dump (void) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::dump");
-}
-
-// Simple-minded do nothing constructor.
-
-ACE_SPIPE_Stream::ACE_SPIPE_Stream (void)
-{
- // ACE_TRACE ("ACE_SPIPE_Stream::ACE_SPIPE_Stream");
-}
-
-// Send N char *ptrs and int lengths. Note that the char *'s precede
-// the ints (basically, an varargs version of writev). The count N is
-// the *total* number of trailing arguments, *not* a couple of the
-// number of tuple pairs!
-
-ssize_t
-ACE_SPIPE_Stream::send (size_t n, ...) const
-{
- // ACE_TRACE ("ACE_SPIPE_Stream::send");
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, int);
- }
-
- ssize_t result = ACE_OS::writev (this->get_handle (), iovp, total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-
-// This is basically an interface to ACE_OS::readv, that doesn't use
-// the struct iovec explicitly. The ... can be passed as an arbitrary
-// number of (char *ptr, int len) tuples. However, the count N is the
-// *total* number of trailing arguments, *not* a couple of the number
-// of tuple pairs!
-
-ssize_t
-ACE_SPIPE_Stream::recv (size_t n, ...) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::recv");
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, int);
- }
-
- ssize_t result = ACE_OS::readv (this->get_handle (), iovp, total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
diff --git a/ace/SPIPE_Stream.h b/ace/SPIPE_Stream.h
deleted file mode 100644
index 60fd3ac2bb3..00000000000
--- a/ace/SPIPE_Stream.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SPIPE_Stream.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SPIPE_STREAM_H
-#define ACE_SPIPE_STREAM_H
-#include "ace/pre.h"
-
-#include "ace/SPIPE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SPIPE_Addr.h"
-
-class ACE_Export ACE_SPIPE_Stream : public ACE_SPIPE
-{
- // = TITLE
- // Define an ACE_SPIPE_Stream.
-public:
- friend class ACE_SPIPE_Acceptor;
- friend class ACE_SPIPE_Connector;
-
- // = Initialization method.
- ACE_SPIPE_Stream (void);
- // Default constructor.
-
- int get_remote_addr (ACE_SPIPE_Addr &remote_sap) const;
- // Obtain the address of whom we are connected with.
-
- int send_handle (ACE_HANDLE handle) const;
- // Send an open FD to another process.
-
- int recv_handle (ACE_HANDLE &handle) const;
- // Recv an open FD from another process.
-
- int recv_handle (strrecvfd &recvfd) const;
- // Recv an open FD from another process.
-
- ssize_t send_n (const void *buf, size_t n) const;
- // Send n bytes, keep trying until n are sent.
-
- ssize_t recv_n (void *buf, size_t n) const;
- // Recv n bytes, keep trying until n are received.
-
- ssize_t send (const void *buf, size_t n) const;
- // Send bytes via STREAM pipes using "band" mode.
-
- ssize_t recv (void *buf, size_t n) const;
- // Recv bytes via STREAM pipes using "band" mode.
-
- ssize_t send (const ACE_Str_Buf *cntl,
- const ACE_Str_Buf *data,
- int flags = 0) const;
- // Send <cntl> and <data> via STREAM pipes.
-
- ssize_t recv (ACE_Str_Buf *cntl,
- ACE_Str_Buf *data,
- int *flags) const;
- // Recv <cntl> and <data> via STREAM pipes.
-
- ssize_t send (const ACE_Str_Buf *cntl,
- const ACE_Str_Buf *data,
- int band,
- int flags) const;
- // Send bytes via STREAM pipes using "band" mode.
-
- ssize_t recv (ACE_Str_Buf *cntl,
- ACE_Str_Buf *data,
- int *band,
- int *flags) const;
- // Recv bytes via STREAM pipes using "band" mode.
-
- ssize_t send (const iovec iov[], size_t n) const;
- // Send iovecs via <::writev>.
-
- ssize_t recv (iovec iov[], size_t n) const;
- // Recv iovecs via <::readv>.
-
- ssize_t send (size_t n, ...) const;
- // Send N char *ptrs and int lengths. Note that the char *'s
- // precede the ints (basically, an varargs version of writev). The
- // count N is the *total* number of trailing arguments, *not* a
- // couple of the number of tuple pairs!
-
- ssize_t recv (size_t n, ...) const;
- // This is an interface to ::readv, that doesn't use the struct
- // iovec explicitly. The ... can be passed as an arbitrary number
- // of (char *ptr, int len) tuples. However, the count N is the
- // *total* number of trailing arguments, *not* a couple of the
- // number of tuple pairs!
-
- ssize_t send (const void *buf, size_t n, ACE_OVERLAPPED *overlapped) const;
- // Send <n> bytes via Win32 WriteFile using overlapped I/O.
-
- ssize_t recv (void *buf, size_t n, ACE_OVERLAPPED *overlapped) const;
- // Recv <n> bytes via Win32 ReadFile using overlapped I/O.
-
- ssize_t sendv (const iovec iov[],
- size_t n) const;
- // Send an <iovec> of size <n> to the stream.
-
- ssize_t sendv_n (const iovec iov[],
- size_t n) const;
- // Send an <iovec> of size <n> to the stream. Will block until all
- // bytes are sent or an error occurs.
-
- ssize_t recvv_n (iovec iov[],
- size_t n) const;
- // Receive an <iovec> of size <n> to the stream.
-
- // = Meta-type info
- typedef ACE_SPIPE_Addr PEER_ADDR;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_SPIPE_Addr remote_addr_;
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SPIPE_Stream.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SPIPE_STREAM_H */
diff --git a/ace/SPIPE_Stream.i b/ace/SPIPE_Stream.i
deleted file mode 100644
index 4733a628815..00000000000
--- a/ace/SPIPE_Stream.i
+++ /dev/null
@@ -1,198 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SPIPE_Stream.i
-
-// Create an ACE_SPIPE_Stream.
-
-ASYS_INLINE int
-ACE_SPIPE_Stream::get_remote_addr (ACE_SPIPE_Addr &remote_sap) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::get_remote_addr");
- remote_sap = this->remote_addr_;
- return 0;
-}
-
-// Send exactly N bytes from BUF to this socket. Keeping trying until
-// this many bytes are sent.
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::send_n (const void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::send_n");
- return ACE::write_n (this->get_handle (), buf, n);
-}
-
-// Receive exactly N bytes from this socket into BUF. Keep trying
-// until this many bytes are received.
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::recv_n (void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::recv_n");
- return ACE::read_n (this->get_handle (), buf, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::send (const void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::send");
- return ACE_OS::write (this->get_handle (), (const char *) buf, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::recv (void *buf, size_t n) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::recv");
- return ACE_OS::read (this->get_handle (), (char *) buf, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int flags) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::send");
- return ACE_OS::putmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *flags) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::recv");
- return ACE_OS::getmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int band, int flags) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::send");
- return ACE_OS::putpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *band, int *flags) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::recv");
- return ACE_OS::getpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags);
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::send (const iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::send");
- return ACE_OS::writev (this->get_handle (), iov, n);
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::recv (iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::recv");
- return ACE_OS::readv (this->get_handle (), iov, n);
-}
-
-// This routine sends an open file descriptor to this socket.
-
-ASYS_INLINE int
-ACE_SPIPE_Stream::send_handle (ACE_HANDLE handle) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::send_handle");
-#if defined (ACE_HAS_STREAM_PIPES)
- return ACE_OS::ioctl (this->get_handle (), I_SENDFD, (void *) handle);
-#else
- handle = handle;
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-// This file receives an open file descriptor from this socket.
-
-ASYS_INLINE int
-ACE_SPIPE_Stream::recv_handle (ACE_HANDLE &handle) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::recv_handle");
-#if defined (ACE_HAS_STREAM_PIPES)
- strrecvfd recvfd;
-
- if (ACE_OS::ioctl (this->get_handle (), I_RECVFD, (void *) &recvfd) == -1)
- return -1;
- else
- {
- handle = recvfd.fd;
- return 0;
- }
-#else
- handle = handle;
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-// This file receives an open file descriptor from this socket and
-// also passes back the information about the address...
-
-ASYS_INLINE int
-ACE_SPIPE_Stream::recv_handle (strrecvfd &recvfd) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::recv_handle");
-#if defined (ACE_HAS_STREAM_PIPES)
- return ACE_OS::ioctl (this->get_handle (), I_RECVFD, (void *) &recvfd);
-#else
- ACE_UNUSED_ARG (recvfd);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_STREAM_PIPES */
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::send (const void *buf, size_t n,
- ACE_OVERLAPPED *overlapped) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::send");
- return ACE_OS::write (this->get_handle (),
- (const char *) buf, n,
- overlapped);
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::recv (void *buf, size_t n,
- ACE_OVERLAPPED *overlapped) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::recv");
- return ACE_OS::read (this->get_handle (),
- (char *) buf, n,
- overlapped);
-}
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::sendv_n (const iovec iov[],
- size_t n) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::sendv_n");
- return ACE::writev_n (this->get_handle (),
- iov,
- n);
-}
-
-// Recv an n byte message from the Stream.
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::recvv_n (iovec iov[],
- size_t n) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::recvv_n");
- // @@ Carlos, can you please update this to call the
- // new ACE::recvv_n() method that you write?
- return ACE_OS::readv (this->get_handle (),
- iov,
- n);
-}
-
-// Send an <iovec> of size <n> to the Stream.
-
-ASYS_INLINE ssize_t
-ACE_SPIPE_Stream::sendv (const iovec iov[],
- size_t n) const
-{
- ACE_TRACE ("ACE_SPIPE_Stream::sendv");
- return ACE_OS::writev (this->get_handle (),
- iov,
- n);
-}
-
diff --git a/ace/SSL/ACE_SSL.dsp b/ace/SSL/ACE_SSL.dsp
deleted file mode 100644
index 44fc347e40c..00000000000
--- a/ace/SSL/ACE_SSL.dsp
+++ /dev/null
@@ -1,166 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ACE_SSL" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=ACE_SSL - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ACE_SSL.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ACE_SSL.mak" CFG="ACE_SSL - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ACE_SSL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ACE_SSL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "ACE_SSL - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\DLL\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACE_SSL_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\ACE_wrappers" /I "..\..\OpenSSL\openssl-0.9.5\inc32" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "ACE_HAS_SSL" /D "ACE_SSL_BUILD_DLL" /FD /c
-# SUBTRACT CPP /X /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 ace.lib libeay32.lib ssleay32.lib /nologo /dll /pdb:none /machine:I386 /libpath:"..\..\ACE_wrappers\ace" /libpath:"..\..\ACE_wrappers\TAO\tao" /libpath:"..\..\OpenSSL\openssl-0.9.5\out32dll"
-
-!ELSEIF "$(CFG)" == "ACE_SSL - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\DLL\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACE_SSL_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Gy /I "..\..\ACE_wrappers" /I "..\..\OpenSSL\openssl-0.9.5\inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ACE_HAS_SSL" /D "ACE_SSL_BUILD_DLL" /FD /GZ /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib libeay32.lib ssleay32.lib /nologo /dll /debug /machine:I386 /out:"ACE_SSLd.dll" /libpath:"..\..\ACE_wrappers\ace" /libpath:"..\..\ACE_wrappers\TAO\tao" /libpath:"..\..\OpenSSL\openssl-0.9.5\out32dll"
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF
-
-# Begin Target
-
-# Name "ACE_SSL - Win32 Release"
-# Name "ACE_SSL - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\SSL_Context.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK_Acceptor.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK_Connector.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK_Stream.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\SSL_Context.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\sslconf.h
-# End Source File
-# End Group
-# Begin Group "Inline Files"
-
-# PROP Default_Filter "i"
-# Begin Source File
-
-SOURCE=.\SSL_Context.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SSL_SOCK_Stream.i
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/ace/SSL/SSL_Context.cpp b/ace/SSL/SSL_Context.cpp
deleted file mode 100644
index e4e91d991f5..00000000000
--- a/ace/SSL/SSL_Context.cpp
+++ /dev/null
@@ -1,407 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ==========================================================================
-//
-// = LIBRARY
-// ACE_SSL
-//
-// = FILENAME
-// SSL_Context.cpp
-//
-// = AUTHOR
-// Chris Zimman
-// Carlos O'Ryan <coryan@ece.uci.edu>
-// Ossama Othman <ossama@ece.uci.edu>
-//
-// ==========================================================================
-
-#if defined (ACE_HAS_SSL)
-
-#include "SSL_Context.h"
-#include "sslconf.h"
-
-#if !defined(__ACE_INLINE__)
-#include "SSL_Context.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Synch.h"
-#include "ace/Object_Manager.h"
-
-#include <openssl/x509.h>
-#include <openssl/err.h>
-#include <openssl/rand.h>
-
-
-#ifdef ACE_HAS_THREADS
-ACE_mutex_t * ACE_SSL_Context::lock_ = 0;
-#endif /* ACE_HAS_THREADS */
-
-
-int ACE_SSL_Context::library_init_count_ = 0;
-
-ACE_SSL_Context::ACE_SSL_Context (void)
- : context_ (0),
- mode_ (-1),
- default_verify_mode_ (SSL_VERIFY_NONE)
-{
- ACE_SSL_Context::ssl_library_init ();
-}
-
-ACE_SSL_Context::~ACE_SSL_Context (void)
-{
- if (this->context_)
- {
- ::SSL_CTX_free (this->context_);
- this->context_ = 0;
- }
-
- ACE_SSL_Context::ssl_library_fini ();
-}
-
-void
-ACE_SSL_Context::ssl_library_init (void)
-{
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex,
- ace_ssl_mon,
- *ACE_Static_Object_Lock::instance ()));
-
- if (ACE_SSL_Context::library_init_count_ == 0)
- {
- ::SSL_library_init ();
- ::SSL_load_error_strings ();
- ::SSLeay_add_ssl_algorithms ();
-
- // Seed the random number generator. Note that the random
- // number generator can be seeded more than once to "stir" its
- // state.
-
-#ifdef WIN32
- // Seed the random number generator by sampling the screen.
- ::RAND_screen ();
-#endif /* WIN32 */
-
-#if OPENSSL_VERSION_NUMBER >= 0x00905100L
- // OpenSSL < 0.9.5 doesn't have EGD support.
-
- const char *egd_socket_file =
- ACE_OS::getenv (ACE_SSL_CERT_FILE_ENV);
-
- if (egd_file != 0)
- (void) this->egd_file (egd_socket_file);
-#endif /* OPENSSL_VERSION_NUMBER */
-
- const char *rand_file =
- ACE_OS::getenv (ACE_SSL_RAND_FILE_ENV);
-
- if (rand_file != 0)
- (void) this->seed_file (rand_file);
-
- // Initialize the mutexes that will be used by the crypto
- // library.
-
-#ifdef ACE_HAS_THREADS
- int num_locks = ::CRYPTO_num_locks ();
-
- ACE_NEW (ACE_SSL_Context::lock_,
- ACE_mutex_t[num_locks]);
-
- for (int i = 0; i < num_locks; ++i)
- {
- // rwlock_init(&(ACE_SSL_Context::lock_[i]), USYNC_THREAD,
- // 0);
- if (ACE_OS::mutex_init(&(ACE_SSL_Context::lock_[i]),
- USYNC_THREAD,
- 0) != 0)
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ACE_SSL_Context::ssl_library_init - %p\n",
- "mutex_init"));
- }
-
-# if !defined (WIN32)
- // This call isn't necessary on some platforms. See the CRYPTO
- // library's threads(3) man page for details.
- ::CRYPTO_set_id_callback (ACE_SSL_thread_id);
-# endif /* WIN32 */
- ::CRYPTO_set_locking_callback (ACE_SSL_locking_callback);
-#endif /* ACE_HAS_THREADS */
- }
- ACE_SSL_Context::library_init_count_++;
-}
-
-void
-ACE_SSL_Context::ssl_library_fini (void)
-{
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex,
- ace_ssl_mon,
- *ACE_Static_Object_Lock::instance ()));
-
- ACE_SSL_Context::library_init_count_--;
- if (ACE_SSL_Context::library_init_count_ == 0)
- {
-#ifdef ACE_HAS_THREADS
- int num_locks = ::CRYPTO_num_locks ();
-
- ::CRYPTO_set_locking_callback (0);
- for (int i = 0; i < num_locks; ++i)
- ACE_OS::mutex_destroy (&(ACE_SSL_Context::lock_[i]));
-
- delete [] ACE_SSL_Context::lock_;
-#endif /* ACE_HAS_THREADS */
-
- ::ERR_free_strings ();
- ::EVP_cleanup ();
- }
-}
-
-int
-ACE_SSL_Context::set_mode (int mode)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex,
- ace_ssl_mon,
- *ACE_Static_Object_Lock::instance (),
- -1));
-
- if (this->context_ != 0)
- return -1;
-
- SSL_METHOD *method = 0;
-
- switch (mode)
- {
- case ACE_SSL_Context::SSLv2_client:
- method = ::SSLv2_client_method ();
- break;
- case ACE_SSL_Context::SSLv2_server:
- method = ::SSLv2_server_method ();
- break;
- case ACE_SSL_Context::SSLv2:
- method = ::SSLv2_method ();
- break;
- case ACE_SSL_Context::SSLv3_client:
- method = ::SSLv3_client_method ();
- break;
- case ACE_SSL_Context::SSLv3_server:
- method = ::SSLv3_server_method ();
- break;
- case ACE_SSL_Context::SSLv3:
- method = ::SSLv3_method ();
- break;
- case ACE_SSL_Context::SSLv23_client:
- method = ::SSLv23_client_method ();
- break;
- case ACE_SSL_Context::SSLv23_server:
- method = ::SSLv23_server_method ();
- break;
- case ACE_SSL_Context::SSLv23:
- method = ::SSLv23_method ();
- break;
- case ACE_SSL_Context::TLSv1_client:
- method = ::TLSv1_client_method ();
- break;
- case ACE_SSL_Context::TLSv1_server:
- method = ::TLSv1_server_method ();
- break;
- case ACE_SSL_Context::TLSv1:
- method = ::TLSv1_method ();
- break;
- default:
- method = ::SSLv3_method ();
- break;
- }
-
- this->context_ = ::SSL_CTX_new (method);
- if (this->context_ == 0)
- {
- ::ERR_print_errors_fp (stderr);
- return -1;
- }
-
- this->mode_ = mode;
-
- if (this->certificate_.type () == -1)
- {
- const char *cert_file = ACE_OS::getenv (ACE_SSL_CERT_FILE_ENV);
- if (cert_file == 0)
- cert_file = ACE_DEFAULT_SSL_CERT_FILE;
- const char *cert_dir = ACE_OS::getenv (ACE_SSL_CERT_DIR_ENV);
- if (cert_dir == 0)
- cert_dir = ACE_DEFAULT_SSL_CERT_DIR;
-
- ::SSL_CTX_load_verify_locations (this->context_,
- cert_file,
- cert_dir);
- ::ERR_print_errors_fp (stderr);
- }
-
- if (this->certificate_.type () != -1
- && ::SSL_CTX_use_certificate_file (this->context_,
- this->certificate_.file_name (),
- this->certificate_.type ()) <= 0)
- {
- // ERR_print_errors_fp (stderr);
- return -1;
- }
- if (this->private_key_.type () != -1
- && SSL_CTX_use_PrivateKey_file (this->context_,
- this->private_key_.file_name (),
- this->private_key_.type ()) <= 0)
- {
- // ERR_print_errors_fp (stderr);
- return -1;
- }
-
- if (!::SSL_CTX_check_private_key (this->context_))
- {
- // ACE_ERROR ((LM_ERROR, "Mismatch in key/certificate\n"));
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_SSL_Context::get_mode (void) const
-{
- return this->mode_;
-}
-
-int
-ACE_SSL_Context::private_key (const char *file_name,
- int type)
-{
- if (this->private_key_.type () != -1)
- return 0;
-
- this->private_key_ = ACE_SSL_Data_File (file_name, type);
-
- if (this->context_ == 0)
- return 0;
-
- int status =
- ::SSL_CTX_use_PrivateKey_file (this->context_,
- this->private_key_.file_name (),
- this->private_key_.type ());
- return status;
-}
-
-int
-ACE_SSL_Context::verify_private_key (void)
-{
- this->check_context ();
-
- return ::SSL_CTX_check_private_key (this->context_);
-}
-
-int
-ACE_SSL_Context::certificate (const char *file_name,
- int type)
-{
- if (this->certificate_.type () != -1)
- return 0;
-
- this->certificate_ = ACE_SSL_Data_File (file_name, type);
-
- if (this->context_ == 0)
- return 0;
-
- int status =
- ::SSL_CTX_use_certificate_file (this->context_,
- this->certificate_.file_name (),
- this->certificate_.type ());
- return status;
-}
-
-int
-ACE_SSL_Context::random_seed (const char * seed)
-{
- ::RAND_seed (seed, ACE_OS::strlen (seed));
-
-#if OPENSSL_VERSION_NUMBER >= 0x00905100L
- // RAND_status() returns 1 if the PRNG has enough entropy.
- return (::RAND_status () == 1 ? 0 : -1);
-#else
- return 0; // Ugly, but OpenSSL <= 0.9.4 doesn't have RAND_status().
-#endif /* OPENSSL_VERSION_NUMBER >= 0x00905100L */
-}
-
-int
-ACE_SSL_Context::egd_file (const char * socket_file)
-{
-#if OPENSSL_VERSION_NUMBER < 0x00905100L
- // OpenSSL < 0.9.5 doesn't have EGD support.
- ACE_UNUSED_ARG (socket_file);
- ACE_NOTSUP_RETURN (-1);
-#else
- // RAND_egd() returns the amount of entropy used to seed the random
- // number generator. The actually value should be greater than 16,
- // i.e. 128 bits.
- if (::RAND_egd (socket_file) > 0)
- return 0;
- else
- return -1;
-#endif /* OPENSSL_VERSION_NUMBER >= 0x00905100L */
-}
-
-int
-ACE_SSL_Context::seed_file (const char * seed_file, long bytes)
-{
- // RAND_load_file() returns the number of bytes used to seed the
- // random number generator.
- if (::RAND_load_file (seed_file, bytes) > 0)
- return 0;
- else
- return -1;
-}
-
-
-// ****************************************************************
-
-#ifdef ACE_HAS_THREADS
-
-void
-ACE_SSL_locking_callback (int mode,
- int type,
- const char * /* file */,
- int /* line */)
-{
- // #ifdef undef
- // fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n",
- // CRYPTO_thread_id(),
- // (mode&CRYPTO_LOCK)?"l":"u",
- // (type&CRYPTO_READ)?"r":"w",file,line);
- // #endif
- // /*
- // if (CRYPTO_LOCK_SSL_CERT == type)
- // fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n",
- // CRYPTO_thread_id(),
- // mode,file,line);
- // */
- if (mode & CRYPTO_LOCK)
- ACE_OS::mutex_lock (&(ACE_SSL_Context::lock_[type]));
- else
- ACE_OS::mutex_unlock (&(ACE_SSL_Context::lock_[type]));
-}
-
-unsigned long
-ACE_SSL_thread_id (void)
-{
- return (unsigned long) ACE_OS::thr_self ();
-}
-#endif /* ACE_HAS_THREADS */
-
-// ****************************************************************
-
-
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-template class ACE_Singleton<ACE_SSL_Context,ACE_SYNCH_MUTEX>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Singleton<ACE_SSL_Context,ACE_SYNCH_MUTEX>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-#endif /* ACE_HAS_SSL */
diff --git a/ace/SSL/SSL_Context.h b/ace/SSL/SSL_Context.h
deleted file mode 100644
index 78d3022139b..00000000000
--- a/ace/SSL/SSL_Context.h
+++ /dev/null
@@ -1,242 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE_SSL
-//
-// = FILENAME
-// SSL_Context.h
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef ACE_SSL_CONTEXT_H
-#define ACE_SSL_CONTEXT_H
-
-#include "ace/pre.h"
-
-#include "ace/SString.h"
-
-#if defined (ACE_HAS_SSL)
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Singleton.h"
-#include "ace/Synch.h"
-
-#include <openssl/ssl.h>
-
-#include "SSL_Export.h"
-
-#ifdef ACE_HAS_THREADS
-extern "C"
-{
- void ACE_SSL_locking_callback (int mode,
- int type,
- const char * file,
- int line);
- // Mutex locking/unlocking callback for OpenSSL multithread support.
-
- unsigned long ACE_SSL_thread_id (void);
- // Return the current thread ID. OpenSSL uses this on platforms
- // that need it.
-}
-#endif /* ACE_HAS_THREADS */
-
-
-class ACE_SSL_Export ACE_SSL_Data_File
-{
-public:
- ACE_SSL_Data_File (void);
- // Default constructor
-
- ACE_SSL_Data_File (const char *file_name,
- int type = SSL_FILETYPE_PEM);
- // Contructor from a file name and the file type.
-
- // Default dtor, cpy ctor and operator=
-
- const char *file_name (void) const;
- // The file name
-
- int type (void) const;
- // The type
-
-private:
- ACE_CString file_name_;
- // The file name
-
- int type_;
- // The type, used by the SSL library to parse the file contents.
-};
-
-// ****************************************************************
-
-class ACE_SSL_Export ACE_SSL_Context
-{
- friend void ACE_SSL_locking_callback (int, int, const char *, int);
-
- // = TITLE
- // A wrapper for the ACE_SSL_Context class.
- //
- // = DESCRIPTION
- // This class provides a wrapper for the SSL_CTX data structure.
- // Since most applications have a single SSL_CTX structure, this
- // class can be used as a singleton.
-
-public:
-
- enum {
- INVALID_METHOD = -1,
- SSLv2_client = 1,
- SSLv2_server,
- SSLv2,
- SSLv3_client,
- SSLv3_server,
- SSLv3,
- SSLv23_client,
- SSLv23_server,
- SSLv23,
- TLSv1_client,
- TLSv1_server,
- TLSv1
- };
-
- ACE_SSL_Context (void);
- // Constructor
-
- ~ACE_SSL_Context (void);
- // Destructor
-
- static ACE_SSL_Context *instance (void);
- // The Singleton context, the SSL components use the singleton if
- // nothing else is available.
-
- int set_mode (int mode = ACE_SSL_Context::SSLv3);
- // Set the CTX mode. The mode can be set only once, afterwards the
- // function has no effect and returns -1.
- // Once the mode is set the underlying SSL_CTX is initialized and
- // the class can be used.
- // If the mode is not set, then the class automatically initializes
- // itself to the default mode.
-
- int get_mode (void) const;
- // @@ John, you need to document each function or at least each
- // group of functions. Also remember to follow the ACE guidelines,
- // this includes:
- // - a space between the function name and the '(' starting its
- // argument list.
- // - a single space after the return value
- // - Using const where appropriate
- //
- // You may not like the style (i don't) but it is more important
- // that we all use the same than keeping each one of us happy.
-
- SSL_CTX *context (void);
- // Get the SSL context
-
- int private_key_type (void) const;
- const char *private_key_file_name (void) const;
- // Get the file name and file format used for the private key
-
- int private_key (const char *file_name,
- int type = SSL_FILETYPE_PEM);
- // Set the private key file.
-
- int verify_private_key (void);
- // Verify if the private key is valid
-
- int certificate_type (void) const;
- const char *certificate_file_name (void) const;
- // Get the file name and file format used for the certificate file
-
- int certificate (const char *file_name,
- int type = SSL_FILETYPE_PEM);
- // Set the certificate file.
-
- void default_verify_mode (int mode);
- int default_verify_mode (void) const;
- // Set and query the default verify mode for this context, it is
- // inherited by all the ACE_SSL objects created using the context.
- // It can be overriden on a per-ACE_SSL object.
-
-
- // = Random number generator seed related methods. These methods
- // can be called more than once.
-
- int random_seed (const char * seed);
- // Seed the underlying random number generator. This value should
- // have at least 128 bits of entropy.
-
- int egd_file (const char * socket_file);
- // Set the Entropy Gathering Daemon (EGD) UNIX domain socket file to
- // read random seed values from.
-
- int seed_file (const char * seed_file, long bytes = -1);
- // Set the file that contains the random seed value state, and the
- // amount of bytes to read. "-1" bytes causes the entire file to be
- // read.
-
-private:
- void check_context (void);
- // Verify if the context has been initialized or not.
-
- void ssl_library_init ();
- void ssl_library_fini ();
- // @@ More to document
-
- // = Prevent assignment and initialization.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_SSL_Context &))
- ACE_UNIMPLEMENTED_FUNC (ACE_SSL_Context (const ACE_SSL_Context &))
-
-private:
- // @@ Carlos, I protected this variable with an ACE_GUARD, just like
- // what we do for the orb_init_count_ variable in
- // tao/ORB.cpp. The code isn't pretty but it should suffice
- // until the SSL context is stored in a Singleton.
- // -Ossama
-
- SSL_CTX *context_;
- // The SSL_CTX structure
-
- int mode_;
- // Cache the mode so we can answer fast
-
- ACE_SSL_Data_File private_key_;
- ACE_SSL_Data_File certificate_;
- // The private key and certificate file
-
- int default_verify_mode_;
- // The default verify mode.
-
- static int library_init_count_;
- // Reference count of the number of times the ACE_SSL_Context was
- // initialized.
-
- // @@ This should also be done with a singleton, otherwise it is not
- // thread safe and/or portable to some weird platforms...
-
-#ifdef ACE_HAS_THREADS
- static ACE_mutex_t * lock_;
- // Array of mutexes used internally by OpenSSL when the SSL
- // application is multithreaded.
-
- // @@ This should also be managed by a singleton.
-#endif
-};
-
-#if defined(__ACE_INLINE__)
-#include "SSL_Context.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_SSL */
-
-#include "ace/post.h"
-
-#endif /* ACE_SSL_CONTEXT_H */
diff --git a/ace/SSL/SSL_Context.i b/ace/SSL/SSL_Context.i
deleted file mode 100644
index b7068ff110e..00000000000
--- a/ace/SSL/SSL_Context.i
+++ /dev/null
@@ -1,87 +0,0 @@
-// -*- C++ -*-
-// $Id$
-//
-
-ACE_INLINE
-ACE_SSL_Data_File::ACE_SSL_Data_File (void)
- : type_ (-1)
-{
-}
-
-ACE_INLINE
-ACE_SSL_Data_File::ACE_SSL_Data_File (const char *file_name,
- int type)
- : file_name_ (file_name),
- type_ (type)
-{
-}
-
-ACE_INLINE const char*
-ACE_SSL_Data_File::file_name (void) const
-{
- return this->file_name_.c_str ();
-}
-
-ACE_INLINE int
-ACE_SSL_Data_File::type (void) const
-{
- return this->type_;
-}
-
-// ****************************************************************
-
-ACE_INLINE ACE_SSL_Context*
-ACE_SSL_Context::instance (void)
-{
- return ACE_Singleton<ACE_SSL_Context,ACE_SYNCH_MUTEX>::instance ();
-}
-
-ACE_INLINE void
-ACE_SSL_Context::check_context (void)
-{
- if (this->context_ == 0)
- this->set_mode ();
-}
-
-ACE_INLINE SSL_CTX *
-ACE_SSL_Context::context (void)
-{
- this->check_context ();
- return this->context_;
-}
-
-ACE_INLINE int
-ACE_SSL_Context::private_key_type (void) const
-{
- return this->private_key_.type ();
-}
-
-ACE_INLINE const char*
-ACE_SSL_Context::private_key_file_name (void) const
-{
- return this->private_key_.file_name ();
-}
-
-ACE_INLINE int
-ACE_SSL_Context::certificate_type (void) const
-{
- return this->certificate_.type ();
-}
-
-ACE_INLINE const char*
-ACE_SSL_Context::certificate_file_name (void) const
-{
- return this->certificate_.file_name ();
-}
-
-ACE_INLINE void
-ACE_SSL_Context::default_verify_mode (int mode)
-{
- this->default_verify_mode_ = mode;
-}
-
-ACE_INLINE int
-ACE_SSL_Context::default_verify_mode (void) const
-{
- return this->default_verify_mode_;
-}
diff --git a/ace/SSL/SSL_Context.inl b/ace/SSL/SSL_Context.inl
deleted file mode 100644
index b7068ff110e..00000000000
--- a/ace/SSL/SSL_Context.inl
+++ /dev/null
@@ -1,87 +0,0 @@
-// -*- C++ -*-
-// $Id$
-//
-
-ACE_INLINE
-ACE_SSL_Data_File::ACE_SSL_Data_File (void)
- : type_ (-1)
-{
-}
-
-ACE_INLINE
-ACE_SSL_Data_File::ACE_SSL_Data_File (const char *file_name,
- int type)
- : file_name_ (file_name),
- type_ (type)
-{
-}
-
-ACE_INLINE const char*
-ACE_SSL_Data_File::file_name (void) const
-{
- return this->file_name_.c_str ();
-}
-
-ACE_INLINE int
-ACE_SSL_Data_File::type (void) const
-{
- return this->type_;
-}
-
-// ****************************************************************
-
-ACE_INLINE ACE_SSL_Context*
-ACE_SSL_Context::instance (void)
-{
- return ACE_Singleton<ACE_SSL_Context,ACE_SYNCH_MUTEX>::instance ();
-}
-
-ACE_INLINE void
-ACE_SSL_Context::check_context (void)
-{
- if (this->context_ == 0)
- this->set_mode ();
-}
-
-ACE_INLINE SSL_CTX *
-ACE_SSL_Context::context (void)
-{
- this->check_context ();
- return this->context_;
-}
-
-ACE_INLINE int
-ACE_SSL_Context::private_key_type (void) const
-{
- return this->private_key_.type ();
-}
-
-ACE_INLINE const char*
-ACE_SSL_Context::private_key_file_name (void) const
-{
- return this->private_key_.file_name ();
-}
-
-ACE_INLINE int
-ACE_SSL_Context::certificate_type (void) const
-{
- return this->certificate_.type ();
-}
-
-ACE_INLINE const char*
-ACE_SSL_Context::certificate_file_name (void) const
-{
- return this->certificate_.file_name ();
-}
-
-ACE_INLINE void
-ACE_SSL_Context::default_verify_mode (int mode)
-{
- this->default_verify_mode_ = mode;
-}
-
-ACE_INLINE int
-ACE_SSL_Context::default_verify_mode (void) const
-{
- return this->default_verify_mode_;
-}
diff --git a/ace/SSL/SSL_Export.h b/ace/SSL/SSL_Export.h
deleted file mode 100644
index 143b5182034..00000000000
--- a/ace/SSL/SSL_Export.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by
-// ${ACE_ROOT}/GenExportH.BAT
-// ------------------------------
-#ifndef ACE_SSL_EXPORT_H
-#define ACE_SSL_EXPORT_H
-
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_SSL_HAS_DLL)
-#define ACE_SSL_HAS_DLL 1
-#endif /* ! ACE_SSL_HAS_DLL */
-
-#if defined (ACE_SSL_HAS_DLL)
-# if (ACE_SSL_HAS_DLL == 1)
-# if defined (ACE_SSL_BUILD_DLL)
-# define ACE_SSL_Export ACE_Proper_Export_Flag
-# define ACE_SSL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# else
-# define ACE_SSL_Export ACE_Proper_Import_Flag
-# define ACE_SSL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# endif /* ACE_SSL_BUILD_DLL */
-# else
-# define ACE_SSL_Export
-# define ACE_SSL_SINGLETON_DECLARATION(T)
-# endif /* ! ACE_SSL_HAS_DLL == 1 */
-#else
-# define ACE_SSL_Export
-# define ACE_SSL_SINGLETON_DECLARATION(T)
-#endif /* ACE_SSL_HAS_DLL */
-
-#include "ace/post.h"
-
-#endif /* ACE_SSL_EXPORT_H */
-
-// End of auto generated file.
diff --git a/ace/SSL/SSL_SOCK.cpp b/ace/SSL/SSL_SOCK.cpp
deleted file mode 100644
index f6b1f9a48b8..00000000000
--- a/ace/SSL/SSL_SOCK.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-
-#include "SSL_SOCK.h"
-
-#if defined (ACE_HAS_SSL)
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "SSL_SOCK.i"
-#endif
-
-ACE_RCSID(ACE_SSL, SSL_SOCK, "$Id$")
-
-
-ACE_SSL_SOCK::ACE_SSL_SOCK (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK::ACE_SSL_SOCK");
-}
-
-ACE_SSL_SOCK::~ACE_SSL_SOCK (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK::~ACE_SSL_SOCK");
-}
-
-int
-ACE_SSL_SOCK::enable (int value) const
-{
- ACE_TRACE ("ACE_SSL_SOCK::enable");
-
- switch (value)
- {
-#ifdef SIGURG
- case SIGURG:
- case ACE_SIGURG:
-#endif /* SIGURG */
- case SIGIO:
- case ACE_SIGIO:
- case ACE_CLOEXEC:
- ACE_NOTSUP_RETURN (-1);
- case ACE_NONBLOCK:
- return ACE_IPC_SAP::enable (value);
- default:
- return -1;
- }
- return 0;
-}
-
-int
-ACE_SSL_SOCK::disable (int value) const
-{
- ACE_TRACE("ACE_SSL_SOCK::disable");
- switch (value)
- {
-#ifdef SIGURG
- case SIGURG:
- case ACE_SIGURG:
-#endif /* SIGURG */
- case SIGIO:
- case ACE_SIGIO:
- case ACE_CLOEXEC:
- ACE_NOTSUP_RETURN (-1);
- case ACE_NONBLOCK:
- return ACE_IPC_SAP::disable (value);
- default:
- return -1;
- }
- return 0;
-}
-
-
-#endif /* ACE_HAS_SSL */
diff --git a/ace/SSL/SSL_SOCK.h b/ace/SSL/SSL_SOCK.h
deleted file mode 100644
index 07ddaa86e2c..00000000000
--- a/ace/SSL/SSL_SOCK.h
+++ /dev/null
@@ -1,93 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-//============================================================================
-//
-// = LIBRARY
-// ACE_SSL
-//
-// = FILENAME
-// SSL_SOCK.h
-//
-// = AUTHOR
-// Ossama Othman <ossama@ece.uci.edu>
-//
-//============================================================================
-
-#ifndef ACE_SSL_SOCK_H
-#define ACE_SSL_SOCK_H
-
-#include "ace/pre.h"
-
-#include "ace/SOCK.h"
-
-#include "SSL_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
-# define ACE_SSL_SOCK_ACCEPTOR ACE_SSL_SOCK_Acceptor
-# define ACE_SSL_SOCK_CONNECTOR ACE_SSL_SOCK_Connector
-# define ACE_SSL_SOCK_STREAM ACE_SSL_SOCK_Stream
-#else
-# define ACE_SSL_SOCK_ACCEPTOR ACE_SSL_SOCK_Acceptor, ACE_INET_Addr
-# define ACE_SSL_SOCK_CONNECTOR ACE_SSL_SOCK_Connector, ACE_INET_Addr
-# define ACE_SSL_SOCK_STREAM ACE_SSL_SOCK_Stream, ACE_INET_Addr
-#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
-
-class ACE_SSL_Export ACE_SSL_SOCK : public ACE_SOCK
-{
- // = TITLE
- // An abstract class that forms the basis for more specific
- // classes, such as <ACE_SSL_SOCK_Acceptor> and
- // <ACE_SSL_SOCK_Stream>.
- // Do not instantiate this class.
- //
- // = DESCRIPTION
- // This class provides functions that are common to all of the
- // <ACE_SSL_SOCK_*> classes. <ACE_SSL_SOCK> provides the ability
- // to get and set socket options, get the local and remote
- // addresses, and close the socket.
-public:
-
- ~ACE_SSL_SOCK (void);
- // Default destructor.
-
- // Override ACE_SOCK base class implementations with these SSL
- // specific ones.
-
- int set_option (int level,
- int option,
- void *optval,
- int optlen) const;
- int get_option (int level,
- int option,
- void *optval,
- int *optlen) const;
- int enable (int value) const;
- int disable (int value) const;
- void set_handle (ACE_HANDLE);
- ACE_HANDLE get_handle (void) const;
- int control (int cmd, void *arg) const;
-
-protected:
-
- ACE_SSL_SOCK (void);
- // Default constructor is private to prevent instances of this class
- // from being defined.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "SSL_SOCK.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#include "ace/post.h"
-
-#endif /* ACE_SSL_SOCK_H */
-
-
-
-
diff --git a/ace/SSL/SSL_SOCK.i b/ace/SSL/SSL_SOCK.i
deleted file mode 100644
index dc21bfbdba1..00000000000
--- a/ace/SSL/SSL_SOCK.i
+++ /dev/null
@@ -1,64 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-ASYS_INLINE void
-ACE_SSL_SOCK::set_handle (ACE_HANDLE fd)
-{
- this->ACE_SOCK::set_handle (fd);
-}
-
-ASYS_INLINE ACE_HANDLE
-ACE_SSL_SOCK::get_handle (void) const
-{
- // return this->ssl_ ? (ACE_HANDLE) ::SSL_get_fd (this->ssl_) : ACE_INVALID_HANDLE;
- return this->ACE_SOCK::get_handle ();
-}
-
-
-ASYS_INLINE int
-ACE_SSL_SOCK::control (int cmd, void *arg) const
-{
- return ACE_OS::ioctl (this->get_handle (), cmd, arg);
-}
-
-ASYS_INLINE int
-ACE_SSL_SOCK::set_option (int level,
- int option,
- void *optval,
- int optlen) const
-{
-// switch (option)
-// {
-// case SO_SNDBUF:
-// return ::BIO_set_write_buffer_size (this->io_bio_, *((int *) optval));
-// case SO_RCVCBUF:
-// return ::BIO_set_read_buffer_size (this->io_bio_, *((int *) optval));
-// default:
- return ACE_OS::setsockopt (this->get_handle (),
- level,
- option, (char *) optval,
- optlen);
-// }
-}
-
-// Provides access to the ACE_OS::getsockopt system call.
-
-ASYS_INLINE int
-ACE_SSL_SOCK::get_option (int level,
- int option,
- void *optval,
- int *optlen) const
-{
-// switch (option)
-// {
-// case SO_SNDBUF:
-// return ::BIO_get_write_buffer_size (this->io_bio_, *((int *) optval));
-// case SO_RCVCBUF:
-// return ::BIO_get_read_buffer_size (this->io_bio_, *((int *) optval));
-// default:
- return ACE_OS::getsockopt (this->get_handle (),
- level,
- option, (char *) optval,
- optlen);
-// }
-}
diff --git a/ace/SSL/SSL_SOCK_Acceptor.cpp b/ace/SSL/SSL_SOCK_Acceptor.cpp
deleted file mode 100644
index 3d87e859930..00000000000
--- a/ace/SSL/SSL_SOCK_Acceptor.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-// -*- C++ -*-
-// $Id$
-//
-
-#include "SSL_SOCK_Acceptor.h"
-
-#if defined (ACE_HAS_SSL)
-
-#include <openssl/err.h>
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SSL_SOCK_Acceptor)
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "SSL_SOCK_Acceptor.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-int
-ACE_SSL_SOCK_Acceptor::shared_accept_start (ACE_Time_Value *timeout,
- int restart,
- int &in_blocking_mode) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Acceptor::shared_accept_start");
-
- ACE_HANDLE handle = this->get_handle ();
-
- // Handle the case where we're doing a timed <accept>.
- if (timeout != 0)
- {
- if (ACE::handle_timed_accept (handle,
- timeout,
- restart) == -1)
- return -1;
- else
- {
- in_blocking_mode = ACE_BIT_DISABLED (ACE::get_flags (handle),
- ACE_NONBLOCK);
- // Set the handle into non-blocking mode if it's not already
- // in it.
- if (in_blocking_mode
- && ACE::set_flags (handle,
- ACE_NONBLOCK) == -1)
- return -1;
- }
- }
-
- return 0;
-}
-
-int
-ACE_SSL_SOCK_Acceptor::shared_accept_finish (ACE_SSL_SOCK_Stream& new_stream,
- int in_blocking_mode,
- int reset_new_handle) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Acceptor::shared_accept_finish ()");
-
- ACE_HANDLE new_handle = new_stream.get_handle ();
-
- // Check to see if we were originally in blocking mode, and if so,
- // set the <new_stream>'s handle and <this> handle to be in blocking
- // mode.
- if (in_blocking_mode)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
-
- // Only disable ACE_NONBLOCK if we weren't in non-blocking mode
- // originally.
- ACE::clr_flags (this->get_handle (),
- ACE_NONBLOCK);
- ACE::clr_flags (new_handle,
- ACE_NONBLOCK);
- }
-
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
- if (reset_new_handle)
- // Reset the event association inherited by the new handle.
- ::WSAEventSelect ((SOCKET) new_handle, 0, 0);
-#else
- ACE_UNUSED_ARG (reset_new_handle);
-#endif /* ACE_WIN32 */
-
- if (new_handle == ACE_INVALID_HANDLE)
- return -1;
-
- return this->ssl_accept (new_stream);
-}
-
-int
-ACE_SSL_SOCK_Acceptor::ssl_accept (ACE_SSL_SOCK_Stream &new_stream) const
-{
- if (SSL_is_init_finished (new_stream.ssl ()))
- return 0;
-
- ::SSL_set_accept_state (new_stream.ssl ());
-
- int status = ::SSL_accept (new_stream.ssl ());
- if (status <= 0)
- {
- if (::BIO_sock_should_retry (status))
- {
- switch (::SSL_get_error (new_stream.ssl (), status))
- {
- case SSL_ERROR_WANT_WRITE:
- case SSL_ERROR_WANT_READ:
- case SSL_ERROR_WANT_X509_LOOKUP:
- // If blocked, try again.
- errno = EWOULDBLOCK;
- break;
- default:
- ERR_print_errors_fp (stderr);
- break;
- }
- }
- else
- ERR_print_errors_fp (stderr);
-
- return -1;
- }
-
- return 0;
-}
-
-// General purpose routine for accepting new connections.
-int
-ACE_SSL_SOCK_Acceptor::accept (ACE_SSL_SOCK_Stream &new_stream,
- ACE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Acceptor::accept");
-
- int in_blocking_mode = 0;
- if (this->shared_accept_start (timeout,
- restart,
- in_blocking_mode) == -1)
- return -1;
- else
- {
- // On Win32 the third parameter to <accept> must be a NULL
- // pointer if we want to ignore the client's address.
- int *len_ptr = 0;
- sockaddr *addr = 0;
- int len = 0;
-
- if (remote_addr != 0)
- {
- len = remote_addr->get_size ();
- len_ptr = &len;
- addr = (sockaddr *) remote_addr->get_addr ();
- }
-
- do
- new_stream.set_handle (ACE_OS::accept (this->get_handle (),
- addr,
- len_ptr));
- while (new_stream.get_handle () == ACE_INVALID_HANDLE
- && restart != 0
- && errno == EINTR
- && timeout == 0);
-
- // Reset the size of the addr, which is only necessary for UNIX
- // domain sockets.
- if (new_stream.get_handle () != ACE_INVALID_HANDLE
- && remote_addr != 0)
- remote_addr->set_size (len);
- }
-
- return this->shared_accept_finish (new_stream,
- in_blocking_mode,
- reset_new_handle);
-}
-
-int
-ACE_SSL_SOCK_Acceptor::accept (ACE_SSL_SOCK_Stream &new_stream,
- ACE_Accept_QoS_Params qos_params,
- ACE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Acceptor::accept");
-
- int in_blocking_mode = 0;
- if (this->shared_accept_start (timeout,
- restart,
- in_blocking_mode) == -1)
- return -1;
- else
- {
- // On Win32 the third parameter to <accept> must be a NULL
- // pointer if we want to ignore the client's address.
- int *len_ptr = 0;
- sockaddr *addr = 0;
- int len = 0;
-
- if (remote_addr != 0)
- {
- len = remote_addr->get_size ();
- len_ptr = &len;
- addr = (sockaddr *) remote_addr->get_addr ();
- }
-
- do
- new_stream.set_handle (ACE_OS::accept (this->get_handle (),
- addr,
- len_ptr,
- qos_params));
- while (new_stream.get_handle () == ACE_INVALID_HANDLE
- && restart != 0
- && errno == EINTR
- && timeout == 0);
-
- // Reset the size of the addr, which is only necessary for UNIX
- // domain sockets.
- if (new_stream.get_handle () != ACE_INVALID_HANDLE
- && remote_addr != 0)
- remote_addr->set_size (len);
- }
-
- return this->shared_accept_finish (new_stream,
- in_blocking_mode,
- reset_new_handle);
-}
-
-#endif /* ACE_HAS_SSL */
diff --git a/ace/SSL/SSL_SOCK_Acceptor.h b/ace/SSL/SSL_SOCK_Acceptor.h
deleted file mode 100644
index 5aece2a9e2f..00000000000
--- a/ace/SSL/SSL_SOCK_Acceptor.h
+++ /dev/null
@@ -1,141 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE_SSL
-//
-// = FILENAME
-// SSL_SOCK_Acceptor.h
-//
-// = AUTHOR
-// John Heitmann and Chris Zimman
-// Ossama Othman <ossama@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef ACE_SSL_SOCK_ACCEPTOR_H
-#define ACE_SSL_SOCK_ACCEPTOR_H
-
-#include "ace/pre.h"
-
-#include "ace/SOCK_Acceptor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_SSL)
-
-#include "SSL_SOCK_Stream.h"
-
-class ACE_SSL_Export ACE_SSL_SOCK_Acceptor : public ACE_SSL_SOCK
-{
- // = TITLE
- // Defines a factory that creates new <ACE_SSL_SOCK_Stream>s
- // passively.
- //
- // = DESCRIPTION
- // The <ACE_SSL_SOCK_Acceptor> has its own <ACE_SOCK_Acceptor>
- // which handles virtually all of the socket acceptance. This
- // class is a wrapper which only adds the SSL acceptance.
-public:
- // = Initialization and termination methods.
- ACE_SSL_SOCK_Acceptor (void);
- // Default constructor.
-
- ACE_SSL_SOCK_Acceptor (const ACE_Addr &local_sap,
- int reuse_addr = 0,
- int protocol_family = PF_INET,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initiate a passive mode ssl/BSD-style acceptor socket.
- // <local_sap> is the address that we-re going to listen for
- // connections on.
-
- ACE_SSL_SOCK_Acceptor (const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int protocol_family,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initialize a passive-mode QoS-enabled acceptor socket. Returns 0
- // on success and -1 on failure.
-
- int open (const ACE_Addr &local_sap,
- int reuse_addr = 0,
- int protocol_family = PF_INET,
- int backlog = ACE_DEFAULT_BACKLOG,
- int protocol = 0);
- // Initiate a passive mode SSL/BSD-style acceptor socket.
- // <local_sap> is the address that we-re going to listen for
- // connections on.
-
- int close (void);
-
- ~ACE_SSL_SOCK_Acceptor (void);
- // Default dtor.
-
- // = Passive connection <accept> methods.
- int accept (ACE_SSL_SOCK_Stream &new_stream,
- ACE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0) const;
- // Accept a new <ACE_SSL_SOCK_Stream> connection. A <timeout> of 0
- // means block forever, a <timeout> of {0, 0} means poll. <restart>
- // == 1 means "restart if interrupted," i.e., if errno == EINTR.
-
- int accept (ACE_SSL_SOCK_Stream &new_stream,
- ACE_Accept_QoS_Params qos_params,
- ACE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0) const;
- // Accept a new <ACE_SSL_SOCK_Stream> connection using the RVSP QoS
- // information in <qos_params>. A <timeout> of 0 means block
- // forever, a <timeout> of {0, 0} means poll. <restart> == 1 means
- // "restart if interrupted," i.e., if errno == EINTR.
-
- // = Meta-type info
- typedef ACE_INET_Addr PEER_ADDR;
- typedef ACE_SSL_SOCK_Stream PEER_STREAM;
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
-
- int shared_accept_start (ACE_Time_Value *timeout,
- int restart,
- int &in_blocking_mode) const;
- // Perform operations that must occur before <ACE_OS::accept> is
- // called.
-
- int shared_accept_finish (ACE_SSL_SOCK_Stream &new_stream,
- int in_blocking_mode,
- int reset_new_handle) const;
- // Perform operations that must occur after <ACE_OS::accept> is
- // called.
-
- int ssl_accept (ACE_SSL_SOCK_Stream &new_stream) const;
- // Complete SSL passive connection establishment.
-
-private:
- ACE_SOCK_Acceptor acceptor_;
- // The BSD-socket workhorse
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "SSL_SOCK_Acceptor.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#endif /* ACE_HAS_SSL */
-
-#include "ace/post.h"
-
-#endif /* ACE_SSL_SOCK_ACCEPTOR_H */
-
diff --git a/ace/SSL/SSL_SOCK_Acceptor.i b/ace/SSL/SSL_SOCK_Acceptor.i
deleted file mode 100644
index c0939202685..00000000000
--- a/ace/SSL/SSL_SOCK_Acceptor.i
+++ /dev/null
@@ -1,82 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// SSL_SOCK_Acceptor.i
-
-
-// Do nothing routine for constructor.
-
-ASYS_INLINE
-ACE_SSL_SOCK_Acceptor::ACE_SSL_SOCK_Acceptor (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Acceptor::ACE_SSL_SOCK_Acceptor");
-}
-
-ASYS_INLINE
-ACE_SSL_SOCK_Acceptor::ACE_SSL_SOCK_Acceptor (const ACE_Addr &local_sap,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol)
- : acceptor_ (local_sap,
- reuse_addr,
- protocol_family,
- backlog,
- protocol)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Acceptor::ACE_SSL_SOCK_Acceptor");
-}
-
-ASYS_INLINE
-ACE_SSL_SOCK_Acceptor::ACE_SSL_SOCK_Acceptor (const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol)
- : acceptor_ (local_sap,
- protocolinfo,
- g,
- flags,
- reuse_addr,
- protocol_family,
- backlog,
- protocol)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Acceptor::ACE_SSL_SOCK_Acceptor");
-}
-
-ASYS_INLINE int
-ACE_SSL_SOCK_Acceptor::open (const ACE_Addr &local_sap,
- int reuse_addr,
- int protocol_family,
- int backlog,
- int protocol)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Acceptor::open");
- if (this->acceptor_.open (local_sap,
- reuse_addr,
- protocol_family,
- backlog,
- protocol) != 0)
- return -1;
- else
- this->set_handle (this->acceptor_.get_handle ());
-
- return 0;
-}
-
-ASYS_INLINE int
-ACE_SSL_SOCK_Acceptor::close (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Acceptor::close ()");
- return this->acceptor_.close ();
-}
-
-ASYS_INLINE
-ACE_SSL_SOCK_Acceptor::~ACE_SSL_SOCK_Acceptor (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Acceptor::~ACE_SSL_SOCK_Acceptor");
-}
diff --git a/ace/SSL/SSL_SOCK_Connector.cpp b/ace/SSL/SSL_SOCK_Connector.cpp
deleted file mode 100644
index 903b6847d4a..00000000000
--- a/ace/SSL/SSL_SOCK_Connector.cpp
+++ /dev/null
@@ -1,306 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-
-#include "SSL_SOCK_Connector.h"
-
-#if defined (ACE_HAS_SSL)
-
-#include "ace/INET_Addr.h"
-
-#include <openssl/err.h>
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "SSL_SOCK_Connector.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SSL_SOCK_Connector)
-
-int
-ACE_SSL_SOCK_Connector::shared_connect_start (ACE_SSL_SOCK_Stream &new_stream,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::shared_connect_start");
-
- if (local_sap != ACE_Addr::sap_any)
- {
- sockaddr *laddr = ACE_reinterpret_cast (sockaddr *,
- local_sap.get_addr ());
- size_t size = local_sap.get_size ();
-
- if (ACE_OS::bind (new_stream.get_handle (),
- laddr,
- size) == -1)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- new_stream.close ();
- return -1;
- }
- }
-
- // Enable non-blocking, if required.
- if (timeout != 0 && new_stream.disable (ACE_NONBLOCK) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_SSL_SOCK_Connector::shared_connect_finish (ACE_SSL_SOCK_Stream &new_stream,
- ACE_Time_Value *timeout,
- int result)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::shared_connect_finish");
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
-
- if (result == -1 && timeout != 0)
- {
- // Check whether the connection is in progress.
- if (error == EINPROGRESS || error == EWOULDBLOCK)
- {
- // This expression checks if we were polling.
- if (timeout->sec () == 0
- && timeout->usec () == 0)
- error = EWOULDBLOCK;
- // Wait synchronously using timeout.
- else if (this->complete (new_stream,
- 0,
- timeout) == -1)
- error = errno;
- else
- return 0;
- }
- }
-
- // EISCONN is treated specially since this routine may be used to
- // check if we are already connected.
- if (result != -1 || error == EISCONN)
- // Start out with non-blocking disabled on the <new_stream>.
- new_stream.disable (ACE_NONBLOCK);
- else if (!(error == EWOULDBLOCK || error == ETIMEDOUT))
- new_stream.close ();
-
- return result;
-
-}
-
-int
-ACE_SSL_SOCK_Connector::ssl_connect (ACE_SSL_SOCK_Stream &new_stream)
-{
- if (SSL_is_init_finished (new_stream.ssl ()))
- return 0;
-
- ::SSL_set_connect_state (new_stream.ssl ());
-
- int status = ::SSL_connect (new_stream.ssl ());
- if (status <= 0)
- {
- if (::BIO_sock_should_retry (status))
- {
- switch (::SSL_get_error (new_stream.ssl (), status))
- {
- case SSL_ERROR_WANT_WRITE:
- case SSL_ERROR_WANT_READ:
- case SSL_ERROR_WANT_X509_LOOKUP:
- // If blocked, try again.
- errno = EWOULDBLOCK;
- break;
- default:
- ERR_print_errors_fp (stderr);
- break;
- }
- }
- else
- ERR_print_errors_fp (stderr);
-
- return -1;
- }
-
- // Start out with non-blocking disabled on the <new_stream>.
- new_stream.disable (ACE_NONBLOCK);
-
- return 0;
-}
-
-int
-ACE_SSL_SOCK_Connector::connect (ACE_SSL_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::connect");
-
- // @@ FIXME: Not thread safe!
-
- if (this->non_ssl_connect_done_ == 0)
- {
- if (this->connector_.connect (new_stream.peer (),
- remote_sap,
- timeout,
- local_sap,
- reuse_addr,
- flags,
- perms,
- protocol_family,
- protocol) == -1)
- return -1;
- else
- {
- new_stream.set_handle (new_stream.peer ().get_handle ());
- this->non_ssl_connect_done_ = 1;
- }
- }
-
- return this->ssl_connect (new_stream);
-}
-
-int
-ACE_SSL_SOCK_Connector::connect (ACE_SSL_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_QoS_Params qos_params,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int perms,
- int protocol_family,
- int protocol)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::connect");
-
- // @@ FIXME: Not thread safe!
-
- if (this->non_ssl_connect_done_ == 0)
- {
- if (this->connector_.connect (new_stream.peer (),
- remote_sap,
- qos_params,
- timeout,
- local_sap,
- protocolinfo,
- g,
- flags,
- reuse_addr,
- perms,
- protocol_family,
- protocol) == -1)
- return -1;
- else
- {
- new_stream.set_handle (new_stream.peer ().get_handle ());
- this->non_ssl_connect_done_ = 1;
- }
- }
-
- return this->ssl_connect (new_stream);
-}
-
-// Try to complete a non-blocking connection.
-
-int
-ACE_SSL_SOCK_Connector::complete (ACE_SSL_SOCK_Stream &new_stream,
- ACE_Addr *remote_sap,
- ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::complete");
-
- // @@ FIXME: Not thread safe!
-
- if (this->non_ssl_connect_done_ == 0)
- {
- if (this->connector_.complete (new_stream.peer (),
- remote_sap,
- tv) == -1)
- return -1;
- else
- {
- new_stream.set_handle (new_stream.peer ().get_handle ());
- this->non_ssl_connect_done_ = 1;
- }
- }
-
- return this->ssl_connect (new_stream);
-}
-
-
-ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector (
- ACE_SSL_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- int protocol_family,
- int protocol)
- : non_ssl_connect_done_ (0)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector");
- if (this->connect (new_stream,
- remote_sap,
- timeout,
- local_sap,
- reuse_addr,
- flags,
- perms,
- protocol_family,
- protocol) == -1
- && timeout != 0
- && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT (
- "ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector"
- )));
-}
-
-ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector (
- ACE_SSL_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_QoS_Params qos_params,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- ACE_Protocol_Info *protocolinfo,
- ACE_SOCK_GROUP g,
- u_long flags,
- int reuse_addr,
- int perms,
- int protocol_family,
- int protocol)
- : non_ssl_connect_done_ (0)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector");
-
- if (this->connect (new_stream,
- remote_sap,
- qos_params,
- timeout,
- local_sap,
- protocolinfo,
- g,
- flags,
- reuse_addr,
- perms,
- protocol_family,
- protocol) == -1
- && timeout != 0
- && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT (
- "ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector"
- )));
-}
-
-#endif /* ACE_HAS_SSL */
diff --git a/ace/SSL/SSL_SOCK_Connector.h b/ace/SSL/SSL_SOCK_Connector.h
deleted file mode 100644
index 7bab2a4cd36..00000000000
--- a/ace/SSL/SSL_SOCK_Connector.h
+++ /dev/null
@@ -1,207 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE_SSL
-//
-// = FILENAME
-// SSL_SOCK_Connector.h
-//
-// = AUTHOR
-// John Heitmann
-// Chris Zimman
-// Carlos O'Ryan <coryan@ece.uci.edu>
-// Ossama Othman <othman@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef ACE_SSL_SOCK_CONNECTOR_H
-#define ACE_SSL_SOCK_CONNECTOR_H
-
-#include "ace/pre.h"
-
-#include "SSL_SOCK_Stream.h"
-#include "ace/SOCK_Connector.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_SSL)
-
-class ACE_SSL_Export ACE_SSL_SOCK_Connector
-{
- // = TITLE
- // Defines a factory that creates new <ACE_Stream>s actively.
- //
- // = DESCRIPTION
- // The <ACE_SSL_SOCK_Connector> doesn't have a socket of its own,
- // i.e., it simply "borrows" the one from the ACE_SSL_SOCK_Stream
- // that's being connected. The reason for this is that the
- // underlying socket API doesn't use a "factory" socket to connect
- // "data-mode" sockets. Therefore, there's no need to inherit
- // <ACE_SSL_SOCK_Connector> from <ACE_SSL_SOCK>.
-
-public:
- // = Initialization and termination methods.
- ACE_SSL_SOCK_Connector (void);
- // Default constructor.
-
- ACE_SSL_SOCK_Connector (ACE_SSL_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- ACE_SSL_SOCK_Connector (ACE_SSL_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_QoS_Params qos_params,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- ACE_Protocol_Info *protocolinfo = 0,
- ACE_SOCK_GROUP g = 0,
- u_long flags = 0,
- int reuse_addr = 0,
- int perms = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <qos_params> contains QoS parameters that are passed
- // to RSVP. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- int connect (ACE_SSL_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = 0,
- int perms = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- int connect (ACE_SSL_SOCK_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_QoS_Params qos_params,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- ACE_Protocol_Info *protocolinfo = 0,
- ACE_SOCK_GROUP g = 0,
- u_long flags = 0,
- int reuse_addr = 0,
- int perms = 0,
- int protocol_family = PF_INET,
- int protocol = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <qos_params> contains QoS parameters that are passed
- // to RSVP. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- ~ACE_SSL_SOCK_Connector (void);
- // Default dtor.
-
- // = Completion routine.
- int complete (ACE_SSL_SOCK_Stream &new_stream,
- ACE_Addr *remote_sap = 0,
- ACE_Time_Value *timeout = 0);
- // Try to complete a non-blocking connection.
- // If connection completion is successful then <new_stream> contains
- // the connected ACE_SOCK_Stream. If <remote_sap> is non-NULL then it
- // will contain the address of the connected peer.
-
- int reset_new_handle (ACE_HANDLE handle);
- // Resets any event associations on this handle
-
- // = Meta-type info
- typedef ACE_INET_Addr PEER_ADDR;
- typedef ACE_SSL_SOCK_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- int shared_connect_start(ACE_SSL_SOCK_Stream &new_stream,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = 0);
-
- int shared_connect_finish(ACE_SSL_SOCK_Stream &new_stream,
- ACE_Time_Value *timeout = 0,
- int result = 0);
-
- int ssl_connect (ACE_SSL_SOCK_Stream &new_stream);
- // Complete SSL active connection establishment.
-
-private:
- ACE_SOCK_Connector connector_;
- // The class that does all of the non-secure socket connection.
- // It is default contructed, and subsequently used by connect().
-
- int non_ssl_connect_done_;
- // Set to 1 once basic connection (i.e. prior to SSL handshake) is
- // done. This is used primarily during non-blocking connects.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "SSL_SOCK_Connector.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#endif /* ACE_SSL_SOCK_CONNECTOR_H */
-
-#include "ace/post.h"
-
-#endif /* ACE_HAS_SSL */
diff --git a/ace/SSL/SSL_SOCK_Connector.i b/ace/SSL/SSL_SOCK_Connector.i
deleted file mode 100644
index a7bd94ee422..00000000000
--- a/ace/SSL/SSL_SOCK_Connector.i
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SSL_SOCK_Connector.i
-
-#if defined (ACE_HAS_SSL)
-
-ASYS_INLINE
-ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector (void)
- : non_ssl_connect_done_ (0)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::ACE_SSL_SOCK_Connector");
-}
-
-ASYS_INLINE
-ACE_SSL_SOCK_Connector::~ACE_SSL_SOCK_Connector (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::~ACE_SSL_SOCK_Connector");
-}
-
-ASYS_INLINE int
-ACE_SSL_SOCK_Connector::reset_new_handle (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::reset_new_handle");
- return this->connector_.reset_new_handle (handle);
-}
-
-ASYS_INLINE void
-ACE_SSL_SOCK_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Connector::dump");
-}
-
-#endif /* ACE_HAS_SSL */
diff --git a/ace/SSL/SSL_SOCK_Stream.cpp b/ace/SSL/SSL_SOCK_Stream.cpp
deleted file mode 100644
index 75b1410c870..00000000000
--- a/ace/SSL/SSL_SOCK_Stream.cpp
+++ /dev/null
@@ -1,482 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-#include "ace/Handle_Set.h"
-
-#if defined (ACE_HAS_SSL)
-
-#include <openssl/err.h>
-
-#include "SSL_SOCK_Stream.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "SSL_SOCK_Stream.i"
-#endif
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SSL_SOCK_Stream)
-
-ssize_t
-ACE_SSL_SOCK_Stream::sendv (const iovec iov[],
- size_t n) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::sendv");
-
- // Mimics ACE_OS::sendv.
- int result = 0;
- ssize_t bytes_sent = 0;
- for (size_t i = 0; i < n && result != -1; i++)
- {
- result = this->send (iov[i].iov_base,
- iov[i].iov_len);
- bytes_sent += iov[i].iov_len; // Gets ignored on error anyway
- }
-
- if (result == -1)
- bytes_sent = -1;
-
- return bytes_sent;
-}
-
-ssize_t
-ACE_SSL_SOCK_Stream::recvv (iovec *io_vec,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::recvv");
-
- // From <ACE_SOCK_IO::recvv>.
-#if defined (FIONREAD)
- ACE_Handle_Set handle_set;
- handle_set.reset ();
- handle_set.set_bit (this->get_handle ());
-
- io_vec->iov_base = 0;
-
- // Check the status of the current socket.
- switch (ACE_OS::select (int (this->get_handle ()) + 1,
- handle_set,
- 0, 0,
- timeout))
- {
- case -1:
- return -1;
- /* NOTREACHED */
- case 0:
- errno = ETIME;
- return -1;
- /* NOTREACHED */
- default:
- // Goes fine, fallthrough to get data
- break;
- }
-
- u_long inlen;
-
-
- if (ACE_OS::ioctl (this->get_handle (),
- FIONREAD,
- (u_long *) &inlen) == -1)
- return -1;
- else if (inlen > 0)
- {
- ACE_NEW_RETURN (io_vec->iov_base,
- char[inlen],
- -1);
- io_vec->iov_len = this->recv (io_vec->iov_base,
- inlen);
- return io_vec->iov_len;
- }
- else
- return 0;
-#else
- ACE_UNUSED_ARG (io_vec);
- ACE_UNUSED_ARG (timeout);
- ACE_NOTSUP_RETURN (-1);
-#endif /* FIONREAD */
-}
-
-ssize_t
-ACE_SSL_SOCK_Stream::send (const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::send");
-
- if (flags)
- ACE_NOTSUP_RETURN (-1);
-
- // Mimics <ACE::send>.
- if (timeout == 0)
- return this->send (buf, len);
-
- int val = 0;
- if (ACE::enter_send_timedwait (this->get_handle (),
- timeout,
- val) == -1)
- return -1;
- else
- {
- ssize_t bytes_transferred = this->send (buf, len);
- ACE::restore_non_blocking_mode (this->get_handle (), val);
- return bytes_transferred;
- }
-}
-
-ssize_t
-ACE_SSL_SOCK_Stream::recv (void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::recv");
-
- // Mimics code in <ACE::recv>.
- int peek = 0;
-
- if (flags)
- {
- if ((flags | MSG_PEEK) == MSG_PEEK)
- peek = 1;
- else
- ACE_NOTSUP_RETURN (-1);
- }
-
- if (timeout == 0)
- return this->recv (buf, n, flags);
- {
- int val = 0;
- if (ACE::enter_recv_timedwait (this->get_handle (),
- timeout,
- val) == -1)
- return -1;
- else
- {
- ssize_t bytes_transferred = this->recv (buf, n, flags);
- ACE::restore_non_blocking_mode (this->get_handle (), val);
- return bytes_transferred;
- }
- }
-}
-
-
-ssize_t
-ACE_SSL_SOCK_Stream::send (size_t n,
- ...) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::send");
-
- // Mimics <ACE_SOCK_IO::send (...)>.
- va_list argp;
- size_t total_tuples = n / 2;
- iovec *iovp;
-#if defined (ACE_HAS_ALLOCA)
- iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
-#else
- ACE_NEW_RETURN (iovp,
- iovec[total_tuples],
- -1);
-#endif /* !defined (ACE_HAS_ALLOCA) */
-
- va_start (argp, n);
-
- for (size_t i = 0; i < total_tuples; i++)
- {
- iovp[i].iov_base = va_arg (argp, char *);
- iovp[i].iov_len = va_arg (argp, ssize_t);
- }
-
- ssize_t result = this->sendv (iovp,
- total_tuples);
-#if !defined (ACE_HAS_ALLOCA)
- delete [] iovp;
-#endif /* !defined (ACE_HAS_ALLOCA) */
- va_end (argp);
- return result;
-}
-
-ssize_t
-ACE_SSL_SOCK_Stream::recv (size_t n,
- ...) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::recv");
- size_t total_tuples = n / 2;
- va_list argp;
- va_start (argp, n);
-
- ssize_t result = 0;
- ssize_t bytes_recv = 0;
- for (size_t i = 0; i < total_tuples; i++)
- {
- result = this->recv_n (va_arg (argp, char *), va_arg (argp, ssize_t));
- if (result == -1)
- return -1;
- bytes_recv += result;
- }
-
- va_end (argp);
- return bytes_recv;
-}
-
-ssize_t
-ACE_SSL_SOCK_Stream::send_n (const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::send_n");
-
- //no support for send flags in SSL
- if (flags != 0)
- ACE_NOTSUP_RETURN (-1);
-
- /* This code mimics ACE::send_n */
- // Total number of bytes written.
- size_t bytes_transferred = 0;
-
- // Actual number of bytes written in each <send> attempt
- ssize_t n = 0;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = this->send ((const char*) buf + bytes_transferred,
- len - bytes_transferred,
- flags,
- timeout);
-
- if (n < 0)
- {
- if (errno == EWOULDBLOCK)
- {
- // If blocked, try again.
- n = 0;
- continue;
- }
- else
- return -1;
- }
- else if (n == 0)
- break;
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE_SSL_SOCK_Stream::recv_n (void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::recv_n");
-
- if (flags != 0)
- {
- if ((flags | MSG_PEEK) != MSG_PEEK)
- ACE_NOTSUP_RETURN (-1);
- }
-
- size_t bytes_transferred = 0;
- ssize_t n = 0;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = this->recv ((char*) buf + bytes_transferred,
- len - bytes_transferred,
- flags,
- timeout);
-
- if (n < 0)
- {
- if (errno == EWOULDBLOCK)
- {
- // If blocked, try again.
- n = 0;
- continue;
- }
- else
- return -1;
- }
- else if (n == 0)
- break;
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE_SSL_SOCK_Stream::recv_n (void *buf, int len, int flags) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::recv_n");
-
- if (flags != 0)
- {
- if ((flags | MSG_PEEK) != MSG_PEEK)
- ACE_NOTSUP_RETURN (-1);
- }
-
- ssize_t bytes_transferred = 0;
- ssize_t n = 0;
-
- for (bytes_transferred = 0;
- bytes_transferred < len;
- bytes_transferred += n)
- {
- n = this->recv ((char*) buf + bytes_transferred,
- len - bytes_transferred,
- flags);
-
- if (n < 0)
- {
- if (errno == EWOULDBLOCK)
- {
- // If blocked, try again.
- n = 0;
- continue;
- }
- else
- return -1;
- }
- else if (n == 0)
- break;
- }
-
- return bytes_transferred;
-}
-
-ssize_t
-ACE_SSL_SOCK_Stream::send_n (const void *buf, int len, int flags) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::send_n");
-
- // Send flags are unsupported in SSL
- if (flags != 0)
- ACE_NOTSUP_RETURN (-1);
-
- /* The following code mimics <ACE::send_n> */
- size_t bytes_transferred = 0;
- ssize_t n = 0;
-
- for (bytes_transferred = 0;
- bytes_transferred < (size_t) len;
- bytes_transferred += n)
- {
- n = this->send ((const char*) buf + bytes_transferred,
- len - bytes_transferred,
- flags);
-
- if (n < 0)
- {
- if (errno == EWOULDBLOCK)
- {
- // If blocked, try again.
- n = 0;
- continue;
- }
- else
- return -1;
- }
- else if (n == 0)
- break;
- }
-
- return bytes_transferred;
-}
-
-
-//Taken from OS.cpp, writev ()
-ssize_t
-ACE_SSL_SOCK_Stream::sendv_n (const iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::sendv_n");
- size_t length = 0;
- size_t i;
-
- // Determine the total length of all the buffers in <iov>.
- for (i = 0; i < n; i++)
- if (ACE_static_cast (const int, iov[i].iov_len) < 0)
- return -1;
- else
- length += iov[i].iov_len;
-
- char *buf;
-
-# if defined (ACE_HAS_ALLOCA)
- buf = (char *) alloca (length);
-# else
- ACE_NEW_RETURN (buf,
- char[length],
- -1);
-# endif /* !defined (ACE_HAS_ALLOCA) */
-
- char *ptr = buf;
-
- for (i = 0; i < n; i++)
- {
- ACE_OS::memcpy (ptr, iov[i].iov_base, iov[i].iov_len);
- ptr += iov[i].iov_len;
- }
-
- ssize_t result = this->send_n (buf, length);
-# if !defined (ACE_HAS_ALLOCA)
- delete [] buf;
-# endif /* !defined (ACE_HAS_ALLOCA) */
- return result;
-}
-
-// Taken straight from OS.cpp, readv ()
-ssize_t
-ACE_SSL_SOCK_Stream::recvv_n (iovec iov[], size_t n) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::recvv_n");
- ssize_t length = 0;
- size_t i;
-
- for (i = 0; i < n; i++)
- if (ACE_static_cast (int, iov[i].iov_len) < 0)
- return -1;
- else
- length += iov[i].iov_len;
-
- char *buf;
-# if defined (ACE_HAS_ALLOCA)
- buf = (char *) alloca (length);
-# else
- ACE_NEW_RETURN (buf,
- char[length],
- -1);
-# endif /* !defined (ACE_HAS_ALLOCA) */
-
- length = this->recv_n (buf, length);
-
- if (length != -1)
- {
- char *ptr = buf;
- int copyn = length;
-
- for (i = 0;
- i < n && copyn > 0;
- i++)
- {
- ACE_OS::memcpy (iov[i].iov_base, ptr,
- // iov_len is int on some platforms, size_t
- // on others
- copyn > (int) iov[i].iov_len
- ? (size_t) iov[i].iov_len
- : (size_t) copyn);
- ptr += iov[i].iov_len;
- copyn -= iov[i].iov_len;
- }
- }
-
-# if !defined (ACE_HAS_ALLOCA)
- delete [] buf;
-# endif /* !defined (ACE_HAS_ALLOCA) */
- return length;
-}
-
-
-#endif /* ACE_HAS_SSL */
diff --git a/ace/SSL/SSL_SOCK_Stream.h b/ace/SSL/SSL_SOCK_Stream.h
deleted file mode 100644
index b509b176d3d..00000000000
--- a/ace/SSL/SSL_SOCK_Stream.h
+++ /dev/null
@@ -1,252 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE_SSL
-//
-// = FILENAME
-// SSL_SOCK_Stream.h
-//
-// = AUTHOR
-// John Heitmann
-// Carlos O'Ryan <coryan@ece.uci.edu>
-// Ossama Othman <ossama@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef ACE_SSL_SOCK_STREAM_H
-#define ACE_SSL_SOCK_STREAM_H
-
-#include "ace/pre.h"
-
-#include "ace/SOCK_Stream.h"
-
-#if defined (ACE_HAS_SSL)
-
-#include <openssl/err.h>
-
-#include "ace/Synch_T.h"
-
-#include "SSL_SOCK.h"
-#include "SSL_Context.h"
-
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_SSL_Export ACE_SSL_SOCK_Stream : public ACE_SSL_SOCK
-{
- // = TITLE
- // Defines methods in the <ACE_SSL_SOCK_Stream> abstraction.
- //
- // = DESCRIPTION
- // This adds SSL functionality to an <ACE_SOCK_IO> interface by
- // wrapping around an <ACE_SSL_SOCK_Stream> implementation.
- //
-
- friend class ACE_SSL_SOCK_Connector;
- friend class ACE_SSL_SOCK_Acceptor;
-
-public:
- // = Initialization and termination functions.
-
- ACE_SSL_SOCK_Stream (ACE_SSL_Context *context =
- ACE_SSL_Context::instance ());
- // Constructor
-
- // @@ The user must currently ensure that assignment or copy
- // operations are atomic!
-
- void operator= (const ACE_SSL_SOCK_Stream &);
- // Assignment operator
-
- ACE_SSL_SOCK_Stream (const ACE_SSL_SOCK_Stream &);
- // Copy constructor
-
- ~ACE_SSL_SOCK_Stream (void);
- // Destructor
-
- ssize_t send (const void *buf,
- size_t n,
- int flags) const;
- // Send an <n> byte buffer to the ssl socket using
- // the semantics of <send(3n)>. ACE+SSL supports no
- // flags for sending at this time.
-
- ssize_t recv (void *buf,
- size_t n,
- int flags) const;
- // Recv an <n> byte buffer from the ssl socket using
- // the semantics of <recv(3n)>. ACE+SSL supports MSG_PEEK,
- // but no other flags at this time.
-
-
- ssize_t send (const void *buf,
- size_t n) const;
- // Send an <n> byte buffer to the ssl socket using
- // the semantics of <write(2)>.
-
- ssize_t recv (void *buf,
- size_t n) const;
- // Recv an <n> byte buffer from the ssl socket using
- // the semantics of <read(2)>.
-
- ssize_t sendv (const iovec iov[],
- size_t n) const;
- // Send an <iovec> of size <n> to the ssl socket.
-
-
- ssize_t recvv (iovec *io_vec,
- const ACE_Time_Value *timeout = 0) const;
- // Allows a client to read from a socket without having to provide a
- // buffer to read. This method determines how much data is in the
- // socket, allocates a buffer of this size, reads in the data, and
- // returns the number of bytes read. The caller is responsible for
- // deleting the member in the <iov_base> field of <io_vec> using
- // delete [] io_vec->iov_base.
-
-
- ssize_t send (const void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout) const;
- // Wait to to <timeout> amount of time to send up to <n> bytes into
- // <buf> (uses the <send> call). If <send> times out
- // a -1 is returned with <errno == ETIME>. If it succeeds the
- // number of bytes sent is returned. No flags are supported.
-
- ssize_t recv (void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout) const;
- // Wait up to <timeout> amount of time to receive up to <n> bytes
- // into <buf> (uses the <recv> call). If <recv> times
- // out a -1 is returned with <errno == ETIME>. If it succeeds the
- // number of bytes received is returned. MSG_PEEK is the only
- // supported flag.
-
- ssize_t send (const void *buf,
- size_t n,
- const ACE_Time_Value *timeout) const;
- // Wait to to <timeout> amount of time to send up to <n> bytes into
- // <buf> (uses the <send> call). If <send> times out
- // a -1 is returned with <errno == ETIME>. If it succeeds the
- // number of bytes sent is returned.
-
- ssize_t recv (void *buf,
- size_t n,
- const ACE_Time_Value *timeout) const;
- // Wait up to <timeout> amount of time to receive up to <n> bytes
- // into <buf> (uses the <recv> call). If <recv> times
- // out a -1 is returned with <errno == ETIME>. If it succeeds the
- // number of bytes received is returned.
-
- ssize_t send (size_t n,
- ...) const;
- // Send <n> varargs messages to the connected ssl socket.
-
- ssize_t recv (size_t n,
- ...) const;
- // Recv <n> varargs messages to the connected ssl socket.
-
- ssize_t send_n (const void *buf, int n) const;
- // Send <n> bytes, keep trying until <n> are sent.
-
- ssize_t recv_n (void *buf, int n) const;
- // Recv <n> bytes, keep trying until <n> are received.
-
- // = In the following four methods, only MSG_PEEK is supported
- // for recv_n, and no flags are supported for send_n.
- ssize_t send_n (const void *buf, int n, int flags) const;
- // Send <n> bytes, keep trying until <n> are sent.
-
- ssize_t recv_n (void *buf, int n, int flags) const;
- // Recv <n> bytes, keep trying until <n> are sent.
-
- ssize_t send_n (const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout) const;
- // Try to send exactly <len> bytes into <buf> (uses
- // the <send> call). If <send> blocks for longer than <timeout> the
- // number of bytes actually sent is returned with <errno == ETIME>.
- // If a timeout does not occur, <send_n> return <len> (i.e., the
- // number of bytes requested to be sent).
-
- ssize_t recv_n (void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout) const;
- // Try to recv exactly <len> bytes into <buf> (uses
- // the <recv> call). The <ACE_Time_Value> indicates how long
- // to blocking trying to receive. If <timeout> == 0, the caller
- // will block until action is possible, else will wait until the
- // relative time specified in *<timeout> elapses). If <recv> blocks
- // for longer than <timeout> the number of bytes actually read is
- // returned with <errno == ETIME>. If a timeout does not occur,
- // <recv_n> return <len> (i.e., the number of bytes requested to be
- // read).
-
- ssize_t sendv_n (const iovec iov[],
- size_t n) const;
- // Send an <iovec> of size <n> to the connected socket.
- // Will block until all bytes are sent or an error
- // occurs.
-
- ssize_t recvv_n (iovec iov[],
- size_t n) const;
- // Receive an <iovec> of size <n> to the connected socket.
-
-
- // = Selectively close endpoints.
- int close_reader (void);
- // Close down the reader.
-
- int close_writer (void);
- // Close down the writer.
-
- int close (void);
- //Close down the socket.
-
- // = Meta-type info
- typedef ACE_INET_Addr PEER_ADDR;
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- void set_handle (ACE_HANDLE fd);
- // Overridden set_handle() method.
- //
- // Only an ACE_SSL_SOCK_Acceptor or ACE_SSL_SOCK_Connector should
- // access this method since some state in the underlying <ssl_> data
- // structure is set during SSL connection establishment.
-
-protected:
-
- SSL *ssl (void) const;
- // Return a pointer to the underlying SSL structure.
-
- ACE_SOCK_Stream & peer (void);
- // Return the underlying <ACE_SOCK_Stream> which SSL runs atop of.
-
-protected:
-
- SSL *ssl_;
- // The SSL session.
-
- ACE_SOCK_Stream stream_;
- // The stream which works under the ssl connection.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "SSL_SOCK_Stream.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#endif /* ACE_SSL_SOCK_STREAM_H */
-
-#include "ace/post.h"
-
-#endif /* ACE_HAS_SSL */
diff --git a/ace/SSL/SSL_SOCK_Stream.i b/ace/SSL/SSL_SOCK_Stream.i
deleted file mode 100644
index 8881fdde781..00000000000
--- a/ace/SSL/SSL_SOCK_Stream.i
+++ /dev/null
@@ -1,302 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// SOCK_Stream.i
-
-#if defined (ACE_HAS_SSL)
-
-ASYS_INLINE void
-ACE_SSL_SOCK_Stream::set_handle (ACE_HANDLE fd)
-{
- if (this->ssl_ == 0 || fd == ACE_INVALID_HANDLE)
- {
- this->ACE_SSL_SOCK::set_handle (ACE_INVALID_HANDLE);
- return;
- }
- else
- {
- (void) ::SSL_set_fd (this->ssl_, (int) fd);
- this->ACE_SSL_SOCK::set_handle (fd);
- this->stream_.set_handle (fd);
- }
-}
-
-ASYS_INLINE
-ACE_SSL_SOCK_Stream::ACE_SSL_SOCK_Stream (ACE_SSL_Context *context)
- : ssl_ (0),
- stream_ ()
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::ACE_SSL_SOCK_Stream");
-
- ACE_SSL_Context * ctx =
- (context == 0 ? ACE_SSL_Context::instance () : context);
-
- this->ssl_ = ::SSL_new (ctx->context ());
-
- if (this->ssl_ == 0)
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) ACE_SSL_SOCK_Stream - cannot allocate new "
- "SSL structure%p\n",
- ""));
-
- ::SSL_set_verify (this->ssl_,
- ctx->default_verify_mode (),
- 0);
-}
-
-ASYS_INLINE void
-ACE_SSL_SOCK_Stream::operator= (const ACE_SSL_SOCK_Stream &stream)
-{
- // NOT thread safe!
-
- ::SSL_free (this->ssl_);
-
- // @@ What do we do if SSL_dup() fails, i.e. returns NULL?
- this->ssl_ = ::SSL_dup (stream.ssl_);
-
- this->set_handle (stream.get_handle ());
-}
-
-ASYS_INLINE
-ACE_SSL_SOCK_Stream::ACE_SSL_SOCK_Stream (const ACE_SSL_SOCK_Stream &stream)
- : ACE_SSL_SOCK ()
-{
- // NOT thread safe!
-
- *this = stream;
-}
-
-
-ASYS_INLINE
-ACE_SSL_SOCK_Stream::~ACE_SSL_SOCK_Stream (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::~ACE_SSL_SOCK_Stream");
-
- ::SSL_free (this->ssl_);
- this->ssl_ = 0;
-
- // @@ Question: should we reference count the Context object or
- // leave that to the application developer? We do not reference
- // count reactors (for example) and following some simple rules
- // seems to work fine!
-}
-
-ASYS_INLINE ssize_t
-ACE_SSL_SOCK_Stream::send (const void *buf,
- size_t n,
- int flags) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::send");
-
- // @@ FIXME: Not thread safe!
-
- // No send flags are supported in SSL.
- if (flags != 0)
- ACE_NOTSUP_RETURN (-1);
-
- int status = ::SSL_write (this->ssl_,
- ACE_static_cast (const char*, buf),
- n);
-
- if (status <= 0)
- {
- switch (::SSL_get_error (this->ssl_, n))
- {
- case SSL_ERROR_WANT_WRITE:
- case SSL_ERROR_WANT_READ:
- case SSL_ERROR_WANT_X509_LOOKUP:
- errno = EWOULDBLOCK;
- break;
- default:
- ERR_print_errors_fp (stderr);
- break;
- }
- }
-
- return status;
-}
-
-ASYS_INLINE ssize_t
-ACE_SSL_SOCK_Stream::recv (void *buf,
- size_t n,
- int flags) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::recv");
-
- // @@ FIXME: Not thread safe!
-
- if (flags)
- {
- if (ACE_BIT_ENABLED (flags, MSG_PEEK))
- return ::SSL_peek (this->ssl_,
- ACE_static_cast (char*, buf),
- n);
- else
- ACE_NOTSUP_RETURN (-1);
- }
-
- int status = ::SSL_read (this->ssl_,
- ACE_static_cast (char *, buf),
- n);
- if (status <= 0)
- {
- switch (::SSL_get_error (this->ssl_, n))
- {
- case SSL_ERROR_WANT_WRITE:
- case SSL_ERROR_WANT_READ:
- case SSL_ERROR_WANT_X509_LOOKUP:
- errno = EWOULDBLOCK;
- break;
- default:
- ERR_print_errors_fp (stderr);
- break;
- }
- }
-
- return status;
-}
-
-ASYS_INLINE ssize_t
-ACE_SSL_SOCK_Stream::send (const void *buf,
- size_t n) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::send");
-
- // @@ FIXME: Not thread safe!
-
- int status = ::SSL_write (this->ssl_,
- ACE_static_cast (const char *, buf),
- n);
-
- if (status <= 0)
- {
- switch (::SSL_get_error (this->ssl_, n))
- {
- case SSL_ERROR_WANT_WRITE:
- case SSL_ERROR_WANT_READ:
- case SSL_ERROR_WANT_X509_LOOKUP:
- errno = EWOULDBLOCK;
- break;
- default:
- ERR_print_errors_fp (stderr);
- break;
- }
- }
-
- return status;
-}
-
-ASYS_INLINE ssize_t
-ACE_SSL_SOCK_Stream::recv (void *buf,
- size_t n) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::recv");
-
- // @@ FIXME: Not thread safe!
-
- int status = ::SSL_read (this->ssl_,
- ACE_static_cast (char*, buf),
- n);
-
- if (status <= 0)
- {
- switch (::SSL_get_error (this->ssl_, n))
- {
- case SSL_ERROR_WANT_WRITE:
- case SSL_ERROR_WANT_READ:
- case SSL_ERROR_WANT_X509_LOOKUP:
- errno = EWOULDBLOCK;
- break;
- default:
- ERR_print_errors_fp (stderr);
- break;
- }
- }
-
- return status;
-}
-
-ASYS_INLINE ssize_t
-ACE_SSL_SOCK_Stream::send (const void *buf,
- size_t len,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::send");
- return this->send (buf, len, 0, timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SSL_SOCK_Stream::recv (void *buf,
- size_t n,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::recv");
- return this->recv (buf, n, 0, timeout);
-}
-
-ASYS_INLINE ssize_t
-ACE_SSL_SOCK_Stream::recv_n (void *buf, int buf_size) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::recv_n");
- return this->recv_n (buf, buf_size, 0);
-}
-
-ASYS_INLINE ssize_t
-ACE_SSL_SOCK_Stream::send_n (const void *buf, int len) const
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::send_n");
- return this->send_n (buf, len, 0);
-}
-
-ASYS_INLINE int
-ACE_SSL_SOCK_Stream::close_reader (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::close_reader");
- return this->stream_.close_reader ();
-}
-
-ASYS_INLINE int
-ACE_SSL_SOCK_Stream::close_writer (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::close_writer");
- return this->stream_.close_writer ();
-}
-
-ASYS_INLINE int
-ACE_SSL_SOCK_Stream::close (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::close");
-
- if (this->ssl_ == 0)
- return -1;
-
- // SSL_shutdown() returns 1 on successful shutdown of the SSL
- // connection, not 0.
- if (::SSL_shutdown (this->ssl_) != 1)
- {
- // Save/restore errno
- ACE_Errno_Guard error (errno);
- (void) this->stream_.close ();
-
- return -1;
- }
-
- return this->stream_.close ();
-}
-
-ASYS_INLINE ACE_SOCK_Stream &
-ACE_SSL_SOCK_Stream::peer (void)
-{
- ACE_TRACE ("ACE_SSL_SOCK_Stream::peer");
- return this->stream_;
-}
-
-ASYS_INLINE SSL *
-ACE_SSL_SOCK_Stream::ssl (void) const
-{
- return this->ssl_;
-}
-
-
-
-#endif /* ACE_HAS_SSL */
diff --git a/ace/SSL/sslconf.h b/ace/SSL/sslconf.h
deleted file mode 100644
index ac241d3b647..00000000000
--- a/ace/SSL/sslconf.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// -*- C++ -*-
-// $Id$
-// ============================================================================
-//
-// = LIBRARY
-// ACE_SSL
-//
-// = FILENAME
-// sslconf.h
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@ece.uci.edu>
-//
-// ============================================================================
-
-
-#ifndef ACE_SSLCONF_H
-#define ACE_SSLCONF_H
-
-#include "ace/pre.h"
-
-#if !defined (ACE_DEFAULT_SSL_CERT_FILE)
-#define ACE_DEFAULT_SSL_CERT_FILE "/etc/ssl/cert.pem"
-#endif /* ACE_DEFAULT_SSL_CERT_FILE */
-
-#if !defined (ACE_DEFAULT_SSL_CERT_DIR)
-#define ACE_DEFAULT_SSL_CERT_DIR "/etc/ssl/certs"
-#endif /* ACE_DEFAULT_SSL_CERT_DIR */
-
-#if !defined (ACE_SSL_CERT_FILE_ENV)
-#define ACE_SSL_CERT_FILE_ENV "SSL_CERT_FILE"
-#endif /* ACE_SSL_CERT_FILE_ENV */
-
-#if !defined (ACE_SSL_CERT_DIR_ENV)
-#define ACE_SSL_CERT_DIR_ENV "SSL_CERT_DIR"
-#endif /* ACE_SSL_CERT_DIR_ENV */
-
-#if !defined (ACE_SSL_EGD_FILE_ENV)
-#define ACE_SSL_EGD_FILE_ENV "SSL_EGD_FILE"
-#endif /* ACE_SSL_EGD_FILE_ENV */
-
-#if !defined (ACE_SSL_RAND_FILE_ENV)
-#define ACE_SSL_RAND_FILE_ENV "SSL_RAND_FILE"
-#endif /* ACE_SSL_RAND_FILE_ENV */
-
-#include "ace/post.h"
-
-#endif /* ACE_SSLCONF_H */
-
diff --git a/ace/SString.cpp b/ace/SString.cpp
deleted file mode 100644
index a59e5f32de3..00000000000
--- a/ace/SString.cpp
+++ /dev/null
@@ -1,1042 +0,0 @@
-// $Id$
-
-#include "ace/Malloc.h"
-#if !defined (ACE_HAS_WINCE)
-# include "ace/Service_Config.h"
-#endif /* !ACE_HAS_WINCE */
-#include "ace/SString.h"
-#include "ace/Auto_Ptr.h"
-
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
-# include "ace/streams.h"
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/SString.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, SString, "$Id$")
-
-ACE_Tokenizer::ACE_Tokenizer (ACE_TCHAR *buffer)
- : buffer_ (buffer),
- index_ (0),
- preserves_index_ (0),
- delimiter_index_ (0)
-{
-}
-
-int
-ACE_Tokenizer::delimiter (ACE_TCHAR d)
-{
- if (delimiter_index_ == MAX_DELIMITERS)
- return -1;
-
- delimiters_[delimiter_index_].delimiter_ = d;
- delimiters_[delimiter_index_].replace_ = 0;
- delimiter_index_++;
- return 0;
-}
-
-int
-ACE_Tokenizer::delimiter_replace (ACE_TCHAR d,
- ACE_TCHAR replacement)
-{
- // Make it possible to replace delimiters on-the-fly, e.g., parse
- // string until certain token count and then copy rest of the
- // original string.
- for (int i = 0; i < delimiter_index_; i++)
- if (delimiters_[i].delimiter_ == d)
- {
- delimiters_[i].replacement_ = replacement;
- delimiters_[i].replace_ = 1;
- return 0;
- }
-
- if (delimiter_index_ >= MAX_DELIMITERS)
- return -1;
-
- delimiters_[delimiter_index_].delimiter_ = d;
- delimiters_[delimiter_index_].replacement_ = replacement;
- delimiters_[delimiter_index_].replace_ = 1;
- delimiter_index_++;
- return 0;
-}
-
-int
-ACE_Tokenizer::preserve_designators (ACE_TCHAR start,
- ACE_TCHAR stop,
- int strip)
-{
- if (preserves_index_ == MAX_PRESERVES)
- return -1;
-
- preserves_[preserves_index_].start_ = start;
- preserves_[preserves_index_].stop_ = stop;
- preserves_[preserves_index_].strip_ = strip;
- preserves_index_++;
- return 0;
-}
-
-int
-ACE_Tokenizer::is_delimiter (ACE_TCHAR d,
- int &replace,
- ACE_TCHAR &r)
-{
- replace = 0;
-
- for (int x = 0; x < delimiter_index_; x++)
- if (delimiters_[x].delimiter_ == d)
- {
- if (delimiters_[x].replace_)
- {
- r = delimiters_[x].replacement_;
- replace = 1;
- }
- return 1;
- }
-
- return 0;
-}
-
-int
-ACE_Tokenizer::is_preserve_designator (ACE_TCHAR start,
- ACE_TCHAR &stop,
- int &strip)
-{
- for (int x = 0; x < preserves_index_; x++)
- if (preserves_[x].start_ == start)
- {
- stop = preserves_[x].stop_;
- strip = preserves_[x].strip_;
- return 1;
- }
-
- return 0;
-}
-
-ACE_TCHAR *
-ACE_Tokenizer::next (void)
-{
- // Check if the previous pass was the last one in the buffer.
- if (index_ == -1)
- {
- index_ = 0;
- return 0;
- }
-
- ACE_TCHAR replacement;
- int replace;
- ACE_TCHAR *next_token;
-
- // Skip all leading delimiters.
- for (;;)
- {
- // Check for end of string.
- if (buffer_[index_] == '\0')
- {
- // If we hit EOS at the start, return 0.
- index_ = 0;
- return 0;
- }
-
- if (this->is_delimiter (buffer_[index_],
- replace,
- replacement))
- index_++;
- else
- break;
- }
-
- // When we reach this point, buffer_[index_] is a non-delimiter and
- // not EOS - the start of our next_token.
- next_token = buffer_ + index_;
-
- // A preserved region is it's own token.
- ACE_TCHAR stop;
- int strip;
- if (this->is_preserve_designator (buffer_[index_],
- stop,
- strip))
- {
- while (++index_)
- {
- if (buffer_[index_] == '\0')
- {
- index_ = -1;
- goto EXIT_LABEL;
- }
-
- if (buffer_[index_] == stop)
- break;
- }
-
- if (strip)
- {
- // Skip start preserve designator.
- next_token += 1;
- // Zap the stop preserve designator.
- buffer_[index_] = '\0';
- // Increment to the next token.
- index_++;
- }
-
- goto EXIT_LABEL;
- }
-
- // Step through finding the next delimiter or EOS.
- for (;;)
- {
- // Advance pointer.
- index_++;
-
- // Check for delimiter.
- if (this->is_delimiter (buffer_[index_],
- replace,
- replacement))
- {
- // Replace the delimiter.
- if (replace != 0)
- buffer_[index_] = replacement;
-
- // Move the pointer up and return.
- index_++;
- goto EXIT_LABEL;
- }
-
- // A preserve designator signifies the end of this token.
- if (this->is_preserve_designator (buffer_[index_],
- stop,
- strip))
- goto EXIT_LABEL;
-
- // Check for end of string.
- if (buffer_[index_] == '\0')
- {
- index_ = -1;
- goto EXIT_LABEL;
- }
- }
-
-EXIT_LABEL:
- return next_token;
-}
-
-// ************************************************************
-
-ACE_ALLOC_HOOK_DEFINE(ACE_CString)
-
-char ACE_CString::NULL_CString_ = '\0';
-const int ACE_CString::npos = -1;
-const int ACE_SString::npos = -1;
-const int ACE_WString::npos = -1;
-
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
-ostream &
-operator<< (ostream &os, const ACE_CString &cs)
-{
- if (cs.fast_rep () != 0)
- os << cs.fast_rep ();
- return os;
-}
-
-ostream &
-operator<< (ostream &os, const ACE_WString &ws)
-{
- if (ws.fast_rep () != 0)
- {
- ACE_Auto_Basic_Array_Ptr<char> char_string(ws.char_rep ());
- os << char_string.get ();
- }
- return os;
-}
-
-ostream &
-operator<< (ostream &os, const ACE_SString &ss)
-{
- if (ss.fast_rep () != 0)
- os << ss.fast_rep ();
- return os;
-}
-#endif /* !ACE_LACKS_IOSTREAM_TOTALLY */
-
-// Constructor that copies <s> into dynamically allocated memory.
-// Probable loss of data. Please use with care.
-
-ACE_CString::ACE_CString (const ACE_WSTRING_TYPE *s,
- ACE_Allocator *alloc)
- : allocator_ (alloc ? alloc : ACE_Allocator::instance ()),
- len_ (0),
- buf_len_ (0),
- rep_ (0),
- release_ (0)
-{
- ACE_TRACE ("ACE_CString::ACE_CString");
-
- if (s == 0 || s[0] == (ACE_WSTRING_TYPE) '\0')
- {
- this->release_ = 0;
- this->len_ = 0;
- this->rep_ = &ACE_CString::NULL_CString_;
- }
- else
- {
- this->release_ = 1;
-
- size_t len = ACE_WString::strlen (s);
- ACE_ALLOCATOR (this->rep_,
- (char *) this->allocator_->malloc (len + 1));
- this->len_ = len;
- this->buf_len_ = len + 1;
-
- // Copy the ACE_WSTRING_TYPE * string byte-by-byte into the char *
- // string.
- for (size_t i = 0; i < this->len_; i++)
- this->rep_[i] = char (s[i]);
-
- this->rep_[this->len_] = '\0';
- }
-}
-
-// this method might benefit from a little restructuring.
-void
-ACE_CString::set (const char *s,
- size_t len,
- int release)
-{
- // Case 1. Going from memory to more memory
- size_t new_buf_len = len + 1;
- if (s != 0 && len != 0 && s[0] != '\0' && release
- && this->buf_len_ < new_buf_len)
- {
- char *temp;
- ACE_ALLOCATOR (temp,
- (char *) this->allocator_->malloc (new_buf_len));
-
- if (this->release_)
- this->allocator_->free (this->rep_);
-
- this->rep_ = temp;
- this->buf_len_ = new_buf_len;
- this->release_ = 1;
- this->len_ = len;
- ACE_OS::memcpy (this->rep_, s, len);
- // NUL terminate.
- this->rep_[len] = '\0';
- }
-
- // Case 2. No memory allocation is necessary.
- else
- {
- // Free memory if necessary and figure out future ownership
- if (!release || s == 0 || s[0] == '\0' || len == 0)
- if (this->release_)
- {
- this->allocator_->free (this->rep_);
- this->release_ = 0;
- }
- // else - stay with whatever value for release_ we have.
-
- // Populate data.
- if (s == 0 || s[0] == '\0' || len == 0)
- {
- this->buf_len_ = 0;
- this->len_ = 0;
- this->rep_ = &ACE_CString::NULL_CString_;
- }
- else if (!release)
- {
- this->buf_len_ = len;
- this->len_ = len;
- this->rep_ = (char *) s;
- }
- else
- {
- ACE_OS::memcpy (this->rep_, s, len);
- // NUL terminate.
- this->rep_[len] = 0;
- this->len_ = len;
- }
- }
-}
-
-// Return substring.
-ACE_CString
-ACE_CString::substring (size_t offset,
- ssize_t length) const
-{
- ACE_CString nil;
- size_t count = length;
-
- // case 1. empty string
- if (this->len_ == 0)
- return nil;
-
- // case 2. start pos past our end
- if (offset >= this->len_)
- return nil;
- // No length == empty string.
- else if (length == 0)
- return nil;
- // Get all remaining bytes.
- else if (length == -1)
- count = this->len_ - offset;
-
- return ACE_CString (&this->rep_[offset],
- count,
- this->allocator_);
-}
-
-// Concat operator (does copy memory).
-
-ACE_CString &
-ACE_CString::operator+= (const ACE_CString &s)
-{
- ACE_TRACE ("ACE_CString::operator+=");
-
- if (s.len_ > 0)
- {
- size_t new_buf_len = this->len_ + s.len_ + 1;
-
- // case 1. No memory allocation needed.
- if (this->buf_len_ >= new_buf_len)
- // Copy in data from new string.
- ACE_OS::memcpy (this->rep_ + this->len_,
- s.rep_,
- s.len_);
-
- // case 2. Memory reallocation is needed
- else
- {
- char *t = 0;
-
- ACE_ALLOCATOR_RETURN (t,
- (char *) this->allocator_->malloc (new_buf_len),
- *this);
-
- // Copy memory from old string into new string.
- ACE_OS::memcpy (t,
- this->rep_,
- this->len_);
-
- ACE_OS::memcpy (t + this->len_,
- s.rep_,
- s.len_);
-
- if (this->release_)
- this->allocator_->free (this->rep_);
-
- this->release_ = 1;
- this->rep_ = t;
- this->buf_len_ = new_buf_len;
- }
-
- this->len_ += s.len_;
- this->rep_[this->len_] = '\0';
- }
-
- return *this;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SString)
-
-void
-ACE_SString::dump (void) const
-{
- ACE_TRACE ("ACE_SString::dump");
-}
-
-// Copy constructor.
-
-ACE_SString::ACE_SString (const ACE_SString &s)
- : allocator_ (s.allocator_),
- len_ (s.len_)
-{
- ACE_TRACE ("ACE_SString::ACE_SString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- this->rep_ = (char *) this->allocator_->malloc (s.len_ + 1);
- ACE_OS::memcpy ((void *) this->rep_,
- (const void *) s.rep_,
- this->len_);
- this->rep_[this->len_] = '\0';
-}
-
-// Default constructor.
-
-ACE_SString::ACE_SString (ACE_Allocator *alloc)
- : allocator_ (alloc),
- len_ (0),
- rep_ (0)
-
-{
- ACE_TRACE ("ACE_SString::ACE_SString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- this->len_ = 0;
- this->rep_ = (char *) this->allocator_->malloc (this->len_ + 1);
- this->rep_[this->len_] = '\0';
-}
-
-// Set the underlying pointer (does not copy memory).
-
-void
-ACE_SString::rep (char *s)
-{
- ACE_TRACE ("ACE_SString::rep");
-
- this->rep_ = s;
-
- if (s == 0)
- this->len_ = 0;
- else
- this->len_ = ACE_OS::strlen (s);
-}
-
-// Constructor that actually copies memory.
-
-ACE_SString::ACE_SString (const char *s,
- ACE_Allocator *alloc)
- : allocator_ (alloc)
-{
- ACE_TRACE ("ACE_SString::ACE_SString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- if (s == 0)
- {
- this->len_ = 0;
- this->rep_ = (char *) this->allocator_->malloc (this->len_ + 1);
- this->rep_[this->len_] = '\0';
- }
- else
- {
- this->len_ = ACE_OS::strlen (s);
- this->rep_ = (char *) this->allocator_->malloc (this->len_ + 1);
- ACE_OS::strcpy (this->rep_, s);
- }
-}
-
-ACE_SString::ACE_SString (char c,
- ACE_Allocator *alloc)
- : allocator_ (alloc)
-{
- ACE_TRACE ("ACE_SString::ACE_SString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- this->len_ = 1;
- this->rep_ = (char *) this->allocator_->malloc (this->len_ + 1);
- this->rep_[0] = c;
- this->rep_[this->len_] = '\0';
-}
-
-// Constructor that actually copies memory.
-
-ACE_SString::ACE_SString (const char *s,
- size_t len,
- ACE_Allocator *alloc)
- : allocator_ (alloc)
-{
- ACE_TRACE ("ACE_SString::ACE_SString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- if (s == 0)
- {
- this->len_ = 0;
- this->rep_ = (char *) this->allocator_->malloc (this->len_ + 1);
- this->rep_[this->len_] = '\0';
- }
- else
- {
- this->len_ = len;
- this->rep_ = (char *) this->allocator_->malloc (this->len_ + 1);
- ACE_OS::memcpy (this->rep_, s, len);
- this->rep_[len] = '\0'; // Make sure to NUL terminate this!
- }
-}
-
-// Assignment operator (does copy memory).
-
-ACE_SString &
-ACE_SString::operator= (const ACE_SString &s)
-{
- ACE_TRACE ("ACE_SString::operator=");
- // Check for identify.
-
- if (this != &s)
- {
- // Only reallocate if we don't have enough space...
- if (this->len_ < s.len_)
- {
- this->allocator_->free (this->rep_);
- this->rep_ = (char *) this->allocator_->malloc (s.len_ + 1);
- }
- this->len_ = s.len_;
- ACE_OS::strcpy (this->rep_, s.rep_);
- }
-
- return *this;
-}
-
-// Return substring.
-ACE_SString
-ACE_SString::substring (size_t offset,
- ssize_t length) const
-{
- ACE_SString nil;
- size_t count = length;
-
- // case 1. empty string
- if (len_ == 0)
- return nil;
-
- // case 2. start pos l
- if (offset >= len_)
- return nil;
-
- // get all remaining bytes
- if (length == -1)
- count = len_ - offset;
-
- return ACE_SString (&rep_[offset], count, this->allocator_);
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_WString)
-
-void
-ACE_WString::dump (void) const
-{
- ACE_TRACE ("ACE_WString::dump");
-}
-
-// Default constructor.
-
-ACE_WString::ACE_WString (ACE_Allocator *alloc)
- : allocator_ (alloc),
- len_ (0),
- rep_ (0)
-{
- ACE_TRACE ("ACE_WString::ACE_WString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- this->len_ = 0;
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
- this->rep_[this->len_] = 0;
-}
-
-/* static */
-size_t
-ACE_WString::strlen (const ACE_WSTRING_TYPE *s)
-{
- ACE_TRACE ("ACE_WString::strlen");
-
-#if defined (ACE_HAS_WCHAR)
- return ACE_OS::strlen (s);
-#else /* ACE_HAS_WCHAR */
- size_t len = 0;
-
- while (*s++ != 0)
- ++len;
-
- return len;
-#endif /* ACE_HAS_WCHAR */
-}
-
-// Get the underlying pointer as an ASCII char.
-
-char *
-ACE_WString::char_rep (void) const
-{
- ACE_TRACE ("ACE_WString::char_rep");
- if (this->len_ <= 0)
- return 0;
- else
- {
- char *t;
-
- ACE_NEW_RETURN (t,
- char[this->len_ + 1],
- 0);
-
- for (size_t i = 0; i < this->len_; i++)
- // Note that this cast may lose data if wide chars are
- // actually used!
- t[i] = char (this->rep_[i]);
-
- t[this->len_] = '\0';
- return t;
- }
-}
-
-// Get the underlying pointer as an ASCII char.
-
-ACE_USHORT16 *
-ACE_WString::ushort_rep (void) const
-{
- ACE_TRACE ("ACE_WString::char_rep");
- if (this->len_ <= 0)
- return 0;
- else
- {
- ACE_USHORT16 *t;
-
- ACE_NEW_RETURN (t,
- ACE_USHORT16[this->len_ + 1],
- 0);
-
- for (size_t i = 0; i < this->len_; i++)
- // Note that this cast may lose data if wide chars are
- // actually used!
- t[i] = (ACE_USHORT16)this->rep_[i];
-
- t[this->len_] = 0;
- return t;
- }
-}
-
-// Constructor that actually copies memory.
-
-ACE_WString::ACE_WString (const char *s,
- ACE_Allocator *alloc)
- : allocator_ (alloc)
-{
- ACE_TRACE ("ACE_WString::ACE_WString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- if (s == 0)
- {
- this->len_ = 0;
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
- this->rep_[this->len_] = 0;
- }
- else
- {
- this->len_ = ACE_OS::strlen (s);
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
-
- // Copy the char * string byte-by-byte into the ACE_WSTRING_TYPE *
- // string.
- for (size_t i = 0; i < this->len_; i++)
- this->rep_[i] = s[i];
-
- // null terminate
- this->rep_[this->len_] = 0;
- }
-}
-
-// Constructor that actually copies memory.
-
-ACE_WString::ACE_WString (const ACE_WSTRING_TYPE *s,
- ACE_Allocator *alloc)
- : allocator_ (alloc)
-{
- ACE_TRACE ("ACE_WString::ACE_WString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- if (s == 0)
- {
- this->len_ = 0;
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
- this->rep_[this->len_] = 0;
- }
- else
- {
- this->len_ = ACE_WString::strlen (s);
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
-
- ACE_OS::memcpy (this->rep_,
- s,
- this->len_ * sizeof (ACE_WSTRING_TYPE));
-
- // null terminate
- this->rep_[this->len_] = 0;
- }
-}
-
-ACE_WString::ACE_WString (ACE_WSTRING_TYPE c,
- ACE_Allocator *alloc)
- : allocator_ (alloc)
-{
- ACE_TRACE ("ACE_WString::ACE_WString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- this->len_ = 1;
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
- this->rep_[0] = c;
- this->rep_[this->len_] = 0;
-}
-
-// Constructor that actually copies memory.
-
-ACE_WString::ACE_WString (const ACE_WSTRING_TYPE *s,
- size_t len,
- ACE_Allocator *alloc)
- : allocator_ (alloc)
-{
- ACE_TRACE ("ACE_WString::ACE_WString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- if (s == 0)
- {
- this->len_ = 0;
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
- this->rep_[this->len_] = 0;
- }
- else
- {
- this->len_ = len;
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
-
- ACE_OS::memcpy (this->rep_,
- s,
- len * sizeof (ACE_WSTRING_TYPE));
-
- // null terminate
- this->rep_[this->len_] = 0;
- }
-}
-
-#if defined (ACE_WSTRING_HAS_USHORT_SUPPORT)
-ACE_WString::ACE_WString (const ACE_USHORT16 *s,
- size_t len,
- ACE_Allocator *alloc)
- : allocator_ (alloc)
-{
- ACE_TRACE ("ACE_WString::ACE_WString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- if (s == 0)
- {
- this->len_ = 0;
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
- this->rep_[this->len_] = 0;
- }
- else
- {
- this->len_ = len;
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
-
- for (size_t i = 0; i <= len; ++i)
- this->rep_[i] = (const ACE_WSTRING_TYPE) s[i];
-
- // null terminate
- this->rep_[this->len_] = 0;
- }
-}
-#endif /* ACE_WSTRING_HAS_USHORT_SUPPORT */
-
-// Constructor that allocates empty memory
-
-ACE_WString::ACE_WString (size_t len,
- ACE_Allocator *alloc)
- : allocator_ (alloc)
-{
- ACE_TRACE ("ACE_WString::ACE_WString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- this->len_ = len;
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + 1) * sizeof (ACE_WSTRING_TYPE));
-
- ACE_OS::memset (this->rep_,
- 0,
- len * sizeof (ACE_WSTRING_TYPE));
- // NUL terminate.
- this->rep_[this->len_] = 0;
-}
-
-// Copy constructor.
-
-ACE_WString::ACE_WString (const ACE_WString &s)
- : allocator_ (s.allocator_),
- len_ (s.len_)
-{
- ACE_TRACE ("ACE_WString::ACE_WString");
-
- if (this->allocator_ == 0)
- this->allocator_ = ACE_Allocator::instance ();
-
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((s.len_ + 1) * sizeof (ACE_WSTRING_TYPE));
- ACE_OS::memcpy ((void *) this->rep_,
- (const void *) s.rep_,
- this->len_ * sizeof (ACE_WSTRING_TYPE));
- this->rep_[this->len_] = 0;
-}
-
-// Assignment operator (does copy memory).
-
-ACE_WString &
-ACE_WString::operator= (const ACE_WString &s)
-{
- ACE_TRACE ("ACE_WString::operator=");
- // Check for identify.
-
- if (this != &s)
- this->set (s.rep_, s.len_);
-
- return *this;
-}
-
-void
-ACE_WString::set (const ACE_WSTRING_TYPE *s)
-{
- this->set (s, ACE_WString::strlen (s));
-}
-
-void
-ACE_WString::set (const ACE_WSTRING_TYPE *s, size_t len)
-{
- // Only reallocate if we don't have enough space...
- if (this->len_ < len)
- {
- this->allocator_->free (this->rep_);
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((len + 1) * sizeof (ACE_WSTRING_TYPE));
- }
-
- this->len_ = len;
- ACE_OS::memcpy (this->rep_,
- s,
- len * sizeof (ACE_WSTRING_TYPE));
- // NUL terminate.
- this->rep_[len] = 0;
-}
-
-// return substring
-ACE_WString
-ACE_WString::substring (size_t offset,
- ssize_t length) const
-{
- ACE_WString nil;
- size_t count = length;
-
- // case 1. empty string
- if (len_ == 0)
- return nil;
-
- // case 2. start pos l
- if (offset >= len_)
- return nil;
-
- // get all remaining bytes
- if (length == -1)
- count = len_ - offset;
-
- return ACE_WString (&rep_[offset],
- count,
- this->allocator_);
-}
-
-void
-ACE_WString::resize (size_t len)
-{
- ACE_TRACE ("ACE_WString::resize");
-
- // Only reallocate if we don't have enough space...
- if (this->len_ < len)
- {
- this->allocator_->free (this->rep_);
- this->rep_ = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((len + 1) * sizeof (ACE_WSTRING_TYPE));
- }
-
- this->len_ = len;
- ACE_OS::memset (this->rep_,
- 0,
- this->len_ * sizeof (ACE_WSTRING_TYPE));
- this->rep_[this->len_] = 0;
-}
-
-// Concat operator (does copy memory).
-
-ACE_WString &
-ACE_WString::operator+= (const ACE_WString &s)
-{
- ACE_TRACE ("ACE_WString::operator+=");
- ACE_WSTRING_TYPE *t = (ACE_WSTRING_TYPE *) this->allocator_->malloc
- ((this->len_ + s.len_ + 1) * sizeof (ACE_WSTRING_TYPE));
-
- ACE_OS::memcpy ((void *) t,
- (const void *) this->rep_,
- this->len_ * sizeof (ACE_WSTRING_TYPE));
- ACE_OS::memcpy ((void *) (t + this->len_),
- (const void *) s.rep_,
- s.len_ * sizeof (ACE_WSTRING_TYPE));
- this->len_ += s.len_;
-
- // NUL terminate.
- t[this->len_] = 0;
-
- this->allocator_->free (this->rep_);
- this->rep_ = t;
-
- return *this;
-}
-
-ACE_WString::~ACE_WString (void)
-{
- ACE_TRACE ("ACE_WString::~ACE_WString");
- this->allocator_->free (this->rep_);
-}
-
-/* static */
-const ACE_WSTRING_TYPE *
-ACE_WString::strstr (const ACE_WSTRING_TYPE *s1,
- const ACE_WSTRING_TYPE *s2)
-{
- ACE_TRACE ("ACE_WString::strstr");
-
- // Original string length
- size_t len1 = ACE_WString::strlen (s1);
- // Substring length
- size_t len2 = ACE_WString::strlen (s2);
-
- // Check if the substring is longer than the string being searched.
- if (len2 > len1)
- return 0;
-
- // Go upto <len>
- size_t len = len1 - len2;
-
- for (size_t i = 0; i <= len; i++)
- {
- if (ACE_OS::memcmp (s1 + i, s2, len2 * sizeof (ACE_WSTRING_TYPE)) == 0)
- // Found a match! Return the index.
- return s1 + i;
- }
-
- return 0;
-}
diff --git a/ace/SString.h b/ace/SString.h
deleted file mode 100644
index 7fd0cda8fab..00000000000
--- a/ace/SString.h
+++ /dev/null
@@ -1,672 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SString.h
-//
-// = AUTHOR
-// Douglas C. Schmidt (schmidt@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_SSTRING_H
-#define ACE_SSTRING_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_WCHAR)
-typedef wchar_t ACE_WSTRING_TYPE;
-#else /* ACE_HAS_WCHAR */
-typedef ACE_USHORT16 ACE_WSTRING_TYPE;
-#endif /* ACE_HAS_WCHAR */
-
-// Forward decl.
-class ACE_Allocator;
-
-class ACE_Export ACE_CString
-{
- // = TITLE
- // This class provides a wrapper facade for C strings.
- //
- // = DESCRIPTION
- // This class uses an <ACE_Allocator> to allocate memory. The
- // user can make this a persistant class by providing an
- // ACE_Allocator with a persistable memory pool. This class is
- // optimized for efficiency, so it doesn't provide any internal
- // locking.
- //
- // NOTE: if an instance of this class is constructed from or
- // assigned an empty string (with first element of '\0'), then it
- // is _not_ allocated new space. Instead, its internal
- // representation is set equal to a global empty string.
- //
- // CAUTION: in cases when ACE_CString is constructed from a
- // provided buffer with the release parameter set to 0,
- // ACE_CString is not guaranteed to be '\0' terminated.
-
-public:
- static const int npos;
- // No position constant
-
- ACE_CString (ACE_Allocator *alloc = 0);
- // Default constructor.
-
- ACE_CString (const char *s,
- ACE_Allocator *alloc = 0,
- int release = 1);
- // Constructor that copies <s> into dynamically allocated memory.
- // If <release> is non-0 then the <ACE_allocator> is responsible for
- // freeing this memory. Memory is _not_ allocated/freed if <release>
- // is 0.
-
- ACE_CString (const char *s,
- size_t len,
- ACE_Allocator *alloc = 0,
- int release = 1);
- // Constructor that copies <len> chars of <s> into dynamically
- // allocated memory (will NUL terminate the result). If <release>
- // is non-0 then the <ACE_allocator> is responsible for freeing this
- // memory. Memory is _not_ allocated/freed if <release> is 0.
-
- ACE_CString (const ACE_CString &);
- // Copy constructor.
-
- ACE_CString (const ACE_WSTRING_TYPE *s,
- ACE_Allocator *alloc = 0);
- // Constructor that copies <s> into dynamically allocated memory.
- // Probable loss of data. Please use with care.
-
- ACE_CString (char c, ACE_Allocator *alloc = 0);
- // Constructor that copies <c> into dynamically allocated memory.
-
- ~ACE_CString (void);
- // Deletes the memory...
-
- const char &operator [] (size_t slot) const;
- // Return the <slot'th> character in the string (doesn't perform
- // bounds checking).
-
- char &operator [] (size_t slot);
- // Return the <slot'th> character by reference in the string
- // (doesn't perform bounds checking).
-
- ACE_CString &operator = (const ACE_CString &);
- // Assignment operator (does copy memory).
-
- void set (const char *s, int release = 1);
- // Copy <s> into this <ACE_CString>. Memory is _not_
- // allocated/freed if <release> is 0.
-
- void set (const char *s,
- size_t len,
- int release);
- // Copy <len> bytes of <s> (will NUL terminate the result).
- // Memory is _not_ allocated/freed if <release> is 0.
-
- ACE_CString substring (size_t offset, ssize_t length = -1) const;
- // Return a substring given an offset and length, if length == -1
- // use rest of str. Return empty substring if offset or
- // offset/length are invalid.
-
- ACE_CString substr (size_t offset, ssize_t length = -1) const;
- // Same as <substring>.
-
- ACE_CString &operator += (const ACE_CString &);
- // Concat operator (copies memory).
-
- u_long hash (void) const;
- // Returns a hash value for this string.
-
- size_t length (void) const;
- // Return the length of the string.
-
- char *rep (void) const;
- // Get a copy of the underlying pointer.
-
- const char *fast_rep (void) const;
- // Get at the underlying representation directly!
- // _Don't_ even think about casting the result to (char *) and modifying it,
- // if it has length 0!
-
- const char *c_str (void) const;
- // Same as STL String's <c_str> and <fast_rep>.
-
- int strstr (const ACE_CString &s) const;
- // Comparison operator that will match substrings. Returns the
- // slot of the first location that matches, else -1.
-
- int find (const ACE_CString &str, int pos = 0) const;
- // Find <str> starting at pos. Returns the slot of the first
- // location that matches, else npos.
-
- int find (const char *s, int pos = 0) const;
- // Find <s> starting at pos. Returns the slot of the first
- // location that matches, else npos.
-
- int find (char c, int pos = 0) const;
- // Find <c> starting at pos. Returns the slot of the first
- // location that matches, else npos.
-
- int rfind (char c, int pos = npos) const;
- // Find <c> starting at pos (counting from the end). Returns the
- // slot of the first location that matches, else npos.
-
- int operator == (const ACE_CString &s) const;
- // Equality comparison operator (must match entire string).
-
- int operator < (const ACE_CString &s) const;
- // Less than comparison operator.
-
- int operator > (const ACE_CString &s) const;
- // Greater than comparison operator.
-
- int operator != (const ACE_CString &s) const;
- // Inequality comparison operator.
-
- int compare (const ACE_CString &s) const;
- // Performs a <strcmp>-style comparison.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Allocator *allocator_;
- // Pointer to a memory allocator.
-
- size_t len_;
- // Length of the ACE_CString data (not counting the trailing '\0').
-
- size_t buf_len_;
- // Length of the ACE_CString data buffer. Keeping track of the
- // length allows to avoid unnecessary dynamic allocations.
-
- char *rep_;
- // Pointer to data.
-
- int release_;
- // Flag that indicates if we own the memory
-
- static char NULL_CString_;
- // Represents the "NULL" string to simplify the internal logic.
-};
-
-ACE_Export ACE_INLINE ACE_CString operator + (const ACE_CString &,
- const ACE_CString &);
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
-ACE_Export ostream &operator << (ostream &, const ACE_CString &);
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-
-class ACE_Export ACE_WString
-{
- // = TITLE
- // This class provides a wrapper facade for C wide strings.
- //
- // = DESCRIPTION
- // This class uses an <ACE_Allocator> to allocate memory. The
- // user can make this a persistant class by providing an
- // <ACE_Allocator> with a persistable memory pool. This class is
- // optimized for efficiency, so it doesn't provide any internal
- // locking.
-public:
- static const int npos;
- // No position constant
-
- ACE_WString (ACE_Allocator *alloc = 0);
- // Default constructor.
-
- ACE_WString (const char *s,
- ACE_Allocator *alloc = 0);
- // Constructor that copies <s> into dynamically allocated memory.
-
- ACE_WString (const ACE_WSTRING_TYPE *s,
- ACE_Allocator *alloc = 0);
- // Constructor that copies <s> into dynamically allocated memory.
-
-#if defined (ACE_WSTRING_HAS_USHORT_SUPPORT)
- ACE_WString (const ACE_USHORT16 *s,
- size_t len,
- ACE_Allocator *alloc = 0);
- // Constructor that takes in a ushort16 string (mainly used by the
- // ACE Name_Space classes)
-#endif /* ACE_WSTRING_HAS_USHORT_SUPPORT */
-
- ACE_WString (const ACE_WSTRING_TYPE *s,
- size_t len,
- ACE_Allocator *alloc = 0);
- // Constructor that copies <len> ACE_WSTRING_TYPE's of <s> into dynamically
- // allocated memory (will NUL terminate the result).
-
- ACE_WString (size_t len, ACE_Allocator *alloc = 0);
- // Constructor that dynamically allocates memory for <len> + 1
- // ACE_WSTRING_TYPE characters. The newly created memory is set memset to 0.
-
- ACE_WString (const ACE_WString &s);
- // Copy constructor.
-
- ACE_WString (ACE_WSTRING_TYPE c, ACE_Allocator *alloc = 0);
- // Constructor that copies <c> into dynamically allocated memory.
-
- ~ACE_WString (void);
- // Deletes the memory...
-
- ACE_WSTRING_TYPE operator [] (size_t slot) const;
- // Return the <slot'th> character in the string (doesn't perform
- // bounds checking).
-
- ACE_WSTRING_TYPE &operator [] (size_t slot);
- // Return the <slot'th> character by reference in the string
- // (doesn't perform bounds checking).
-
- ACE_WString &operator = (const ACE_WString &);
- // Assignment operator (does copy memory).
-
- void set (const ACE_WSTRING_TYPE *s);
- // Copy <s>
-
- void set (const ACE_WSTRING_TYPE *s,
- size_t len);
- // Copy <len> bytes of <s> (will NUL terminate the result)
-
- ACE_WString substring (size_t offset, ssize_t length = -1) const;
- // Return a substring given an offset and length, if length == -1
- // use rest of str return empty substring if offset or offset/length
- // are invalid.
-
- ACE_WString substr (size_t offset, ssize_t length = -1) const;
- // Same as substring
-
- ACE_WString &operator += (const ACE_WString &);
- // Concat operator (does copy memory).
-
- u_long hash (void) const;
- // Returns a hash value for this string.
-
- size_t length (void) const;
- // Return the length of the string.
-
- ACE_WSTRING_TYPE *rep (void) const;
- // Gets a copy of the underlying pointer.
-
- char *char_rep (void) const;
- // Transform into a copy of the ASCII character representation.
- // (caller must delete)
-
- ACE_USHORT16 *ushort_rep (void) const;
- // Transform into a copy of a USHORT16 representation (caller must
- // delete). Note, behavior is undefined when sizeof (wchar_t) != 2.
-
- const ACE_WSTRING_TYPE *fast_rep (void) const;
- // Get at the underlying representation directly!
-
- const ACE_WSTRING_TYPE *c_str (void) const;
- // Same as STL String's <c_str> and <fast_rep>.
-
- int strstr (const ACE_WString &s) const;
- // Comparison operator that will match substrings. Returns the
- // slot of the first location that matches, else -1.
-
- int find (const ACE_WString &str, int pos = 0) const;
- // Find <str> starting at pos. Returns the slot of the first
- // location that matches, else npos.
-
- int find (const ACE_WSTRING_TYPE *s, int pos = 0) const;
- // Find <s> starting at pos. Returns the slot of the first
- // location that matches, else npos.
-
- int find (ACE_WSTRING_TYPE c, int pos = 0) const;
- // Find <c> starting at pos. Returns the slot of the first
- // location that matches, else npos.
-
- int rfind (ACE_WSTRING_TYPE c, int pos = npos) const;
- // Find <c> starting at pos (counting from the end). Returns the
- // slot of the first location that matches, else npos.
-
- int operator == (const ACE_WString &s) const;
- // Equality comparison operator (must match entire string).
-
- int operator < (const ACE_WString &s) const;
- // Less than comparison operator.
-
- int operator > (const ACE_WString &s) const;
- // Greater than comparison operator.
-
- int operator != (const ACE_WString &s) const;
- // Inequality comparison operator.
-
- int compare (const ACE_WString &s) const;
- // Performs a <strcmp>-style comparison.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- static size_t strlen (const ACE_WSTRING_TYPE *);
- // Computes the length of a "0" terminated ACE_WSTRING_TYPE *.
-
- static const ACE_WSTRING_TYPE *strstr (const ACE_WSTRING_TYPE *s1,
- const ACE_WSTRING_TYPE *s2);
- // Traditional style strstr
-
- void resize (size_t len);
- // This method is designed for high-performance. Please use with
- // care ;-) If the current size of the string is less than <len>,
- // the string is resized to the new length. The data is is zero'd
- // out after this operation.
-
-private:
- ACE_Allocator *allocator_;
- // Pointer to a memory allocator.
-
- size_t len_;
- // Length of the ACE_WString.
-
- ACE_WSTRING_TYPE *rep_;
- // Pointer to data.
-};
-
-ACE_Export ACE_INLINE ACE_WString operator+ (const ACE_WString &,
- const ACE_WString &);
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
-ACE_Export ostream &operator << (ostream &, const ACE_WString &);
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-
-class ACE_Export ACE_SString
-{
- // = TITLE
- // A very Simple String <ACE_SString> class. This is not a
- // general-purpose string class, and you should probably consider
- // using <ACE_CString> is you don't understand why this class
- // exists...
- //
- // = DESCRIPTION
- // This class is optimized for efficiency, so it doesn't provide
- // any internal locking.
- //
- // CAUTION: This class is only intended for use with applications
- // that understand how it works. In particular, its destructor
- // does not deallocate its memory when it is destroyed... We need
- // this class since the <ACE_Map_Manager> requires an object that
- // supports the operator == and operator !=. This class uses an
- // <ACE_Allocator> to allocate memory. The user can make this a
- // persistant class by providing an <ACE_Allocator> with a
- // persistable memory pool.
-public:
- static const int npos;
- // No position constant
-
- ACE_SString (ACE_Allocator *alloc = 0);
- // Default constructor.
-
- ACE_SString (const char *s, ACE_Allocator *alloc = 0);
- // Constructor that copies <s> into dynamically allocated memory.
-
- ACE_SString (const char *s, size_t len, ACE_Allocator *alloc = 0);
- // Constructor that copies <len> chars of <s> into dynamically
- // allocated memory (will NUL terminate the result).
-
- ACE_SString (const ACE_SString &);
- // Copy constructor.
-
- ACE_SString (char c, ACE_Allocator *alloc = 0);
- // Constructor that copies <c> into dynamically allocated memory.
-
- ~ACE_SString (void);
- // Default dtor.
-
- char operator [] (size_t slot) const;
- // Return the <slot'th> character in the string (doesn't perform
- // bounds checking).
-
- char &operator [] (size_t slot);
- // Return the <slot'th> character by reference in the string
- // (doesn't perform bounds checking).
-
- ACE_SString &operator = (const ACE_SString &);
- // Assignment operator (does copy memory).
-
- ACE_SString substring (size_t offset, ssize_t length = -1) const;
- // Return a substring given an offset and length, if length == -1
- // use rest of str return empty substring if offset or offset/length
- // are invalid
-
- ACE_SString substr (size_t offset, ssize_t length = -1) const;
- // Same as substring
-
- u_long hash (void) const;
- // Returns a hash value for this string.
-
- size_t length (void) const;
- // Return the length of the string.
-
- void rep (char *s);
- // Set the underlying pointer. Since this does not copy memory or
- // delete existing memory use with extreme caution!!!
-
- const char *rep (void) const;
- // Get the underlying pointer.
-
- const char *fast_rep (void) const;
- // Get the underlying pointer.
-
- const char *c_str (void) const;
- // Same as STL String's <c_str> and <fast_rep>.
-
- int strstr (const ACE_SString &s) const;
- // Comparison operator that will match substrings. Returns the
- // slot of the first location that matches, else -1.
-
- int find (const ACE_SString &str, int pos = 0) const;
- // Find <str> starting at pos. Returns the slot of the first
- // location that matches, else npos.
-
- int find (const char *s, int pos = 0) const;
- // Find <s> starting at pos. Returns the slot of the first
- // location that matches, else npos.
-
- int find (char c, int pos = 0) const;
- // Find <c> starting at pos. Returns the slot of the first
- // location that matches, else npos.
-
- int rfind (char c, int pos = npos) const;
- // Find <c> starting at pos (counting from the end). Returns the
- // slot of the first location that matches, else npos.
-
- int operator == (const ACE_SString &s) const;
- // Equality comparison operator (must match entire string).
-
- int operator < (const ACE_SString &s) const;
- // Less than comparison operator.
-
- int operator > (const ACE_SString &s) const;
- // Greater than comparison operator.
-
- int operator != (const ACE_SString &s) const;
- // Inequality comparison operator.
-
- int compare (const ACE_SString &s) const;
- // Performs a <strcmp>-style comparison.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Allocator *allocator_;
- // Pointer to a memory allocator.
-
- size_t len_;
- // Length of the ACE_SString (not counting the trailing '\0').
-
- char *rep_;
- // Pointer to data.
-};
-
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
-ACE_Export ostream &operator << (ostream &, const ACE_SString &);
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-
-// This allows one to use W or C String based on the Unicode
-// setting
-#if defined (ACE_USES_WCHAR)
-# define ACE_TString ACE_WString
-#else /* ACE_USES_WCHAR */
-# define ACE_TString ACE_CString
-#endif /* ACE_USES_WCHAR */
-
-
-// ************************************************************
-
-class ACE_Export ACE_Tokenizer
-{
- // = TITLE
- // Tokenizer
- //
- // = DESCRIPTION
- // Tokenizes a buffer. Allows application to set delimiters and
- // preserve designators. Does not allow special characters, yet
- // (e.g., printf ("\"like a quoted string\"")).
-public:
- ACE_Tokenizer (ACE_TCHAR *buffer);
- // <buffer> will be parsed.
-
- int delimiter (ACE_TCHAR d);
- // <d> is a delimiter. Returns 0 on success, -1 if there is no
- // memory left.
-
- int delimiter_replace (ACE_TCHAR d, ACE_TCHAR replacement);
- // <d> is a delimiter and, when found, will be replaced by
- // <replacement>. Returns 0 on success, -1 if there is no memory
- // left.
-
- int preserve_designators (ACE_TCHAR start, ACE_TCHAR stop, int strip=1);
- // For instance, quotes, or '(' and ')'. Returns 0 on success, -1
- // if there is no memory left. If <strip> == 1, then the preserve
- // designators will be stripped from the tokens returned by next.
-
- ACE_TCHAR *next (void);
- // Returns the next token.
-
- enum {
- MAX_DELIMITERS=16,
- MAX_PRESERVES=16
- };
-
-protected:
- int is_delimiter (ACE_TCHAR d, int &replace, ACE_TCHAR &r);
- // Returns 1 if <d> is a delimiter, 0 otherwise. If <d> should be
- // replaced with <r>, <replace> is set to 1, otherwise 0.
-
- int is_preserve_designator (ACE_TCHAR start, ACE_TCHAR &stop, int &strip);
- // If <start> is a start preserve designator, returns 1 and sets
- // <stop> to the stop designator. Returns 0 if <start> is not a
- // preserve designator.
-
-private:
- ACE_TCHAR *buffer_;
- int index_;
-
- class Preserve_Entry
- {
- // = TITLE
- // Preserve Entry
- //
- // = DESCRIPTION
- // Defines a set of characters that designate an area that
- // should not be parsed, but should be treated as a complete
- // token. For instance, in: (this is a preserve region), start
- // would be a left paren -(- and stop would be a right paren
- // -)-. The strip determines whether the designators should be
- // removed from the token.
- public:
- ACE_TCHAR start_;
- // E.g., "(".
- ACE_TCHAR stop_;
- // E.g., ")".
- int strip_;
- // Whether the designators should be removed from the token.
- };
-
- Preserve_Entry preserves_[MAX_PRESERVES];
- // The application can specify MAX_PRESERVES preserve designators.
-
- int preserves_index_;
- // Pointer to the next free spot in preserves_.
-
- class Delimiter_Entry
- {
- // = TITLE
- // Delimiter Entry
- //
- // = DESCRIPTION
- // Describes a delimiter for the tokenizer.
- public:
- ACE_TCHAR delimiter_;
- // Most commonly a space ' '.
- ACE_TCHAR replacement_;
- // What occurrences of delimiter_ should be replaced with.
- int replace_;
- // Whether replacement_ should be used. This should be replaced
- // with a technique that sets replacement_ = delimiter by
- // default. I'll do that next iteration.
- };
-
- Delimiter_Entry delimiters_[MAX_DELIMITERS];
- // The tokenizer allows MAX_DELIMITERS number of delimiters.
-
- int delimiter_index_;
- // Pointer to the next free space in delimiters_.
-};
-
-// ****************************************************************
-
-class ACE_Export ACE_Auto_String_Free
-{
- // = TITLE
- // Simple class to automatically de-allocate strings
- //
- // = DESCRIPTION
- // Keeps a pointer to a string and deallocates it (using
- // <ACE_OS::free>) on its destructor.
- // If you need to delete using "delete[]" the
- // ACE_Auto_Array_Ptr<char*> is your choice.
- // The class plays the same role as auto_ptr<>
- //
-public:
- ACE_EXPLICIT ACE_Auto_String_Free (char* p = 0);
- ACE_Auto_String_Free (ACE_Auto_String_Free &rhs);
- ACE_Auto_String_Free& operator= (ACE_Auto_String_Free &rhs);
- ~ACE_Auto_String_Free (void);
-
- char* operator* () const;
- char operator[] (int i) const;
- char* get (void) const;
- char* release (void);
- void reset (char* p = 0);
-
-private:
- char* p_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/SString.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SSTRING_H */
diff --git a/ace/SString.i b/ace/SString.i
deleted file mode 100644
index f93f6ac1660..00000000000
--- a/ace/SString.i
+++ /dev/null
@@ -1,757 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/Malloc_Base.h"
-
-// Default constructor.
-
-ACE_INLINE
-ACE_CString::ACE_CString (ACE_Allocator *alloc)
- : allocator_ (alloc ? alloc : ACE_Allocator::instance ()),
- len_ (0),
- buf_len_ (0),
- rep_ (&ACE_CString::NULL_CString_),
- release_ (0)
-{
- ACE_TRACE ("ACE_CString::ACE_CString");
-}
-
-// Constructor that actually copies memory.
-
-ACE_INLINE
-ACE_CString::ACE_CString (const char *s,
- ACE_Allocator *alloc,
- int release)
- : allocator_ (alloc ? alloc : ACE_Allocator::instance ()),
- len_ (0),
- buf_len_ (0),
- rep_ (0),
- release_ (0)
-{
- ACE_TRACE ("ACE_CString::ACE_CString");
-
- size_t length;
- if (s != 0)
- length = ACE_OS::strlen (s);
- else
- length = 0;
-
- this->set (s, length, release);
-}
-
-ACE_INLINE
-ACE_CString::ACE_CString (char c,
- ACE_Allocator *alloc)
- : allocator_ (alloc ? alloc : ACE_Allocator::instance ()),
- len_ (0),
- buf_len_ (0),
- rep_ (0),
- release_ (0)
-{
- ACE_TRACE ("ACE_CString::ACE_CString");
-
- this->set (&c, 1, 1);
-}
-
-// Constructor that actually copies memory.
-
-ACE_INLINE
-ACE_CString::ACE_CString (const char *s,
- size_t len,
- ACE_Allocator *alloc,
- int release)
- : allocator_ (alloc ? alloc : ACE_Allocator::instance ()),
- len_ (0),
- buf_len_ (0),
- rep_ (0),
- release_ (0)
-{
- ACE_TRACE ("ACE_CString::ACE_CString");
-
- this->set (s, len, release);
-}
-
-// Copy constructor.
-
-ACE_INLINE
-ACE_CString::ACE_CString (const ACE_CString &s)
- : allocator_ (s.allocator_ ? s.allocator_ : ACE_Allocator::instance ()),
- len_ (0),
- buf_len_ (0),
- rep_ (0),
- release_ (0)
-{
- ACE_TRACE ("ACE_CString::ACE_CString");
-
- this->set (s.rep_, s.len_, 1);
-}
-
-ACE_INLINE
-ACE_CString::~ACE_CString (void)
-{
- ACE_TRACE ("ACE_CString::~ACE_CString");
-
- this->set (0, 0, 0);
-}
-
-ACE_INLINE void
-ACE_CString::dump (void) const
-{
- ACE_TRACE ("ACE_CString::dump");
-}
-
-// Assignment operator (does copy memory).
-
-ACE_INLINE ACE_CString &
-ACE_CString::operator= (const ACE_CString &s)
-{
- ACE_TRACE ("ACE_CString::operator=");
-
- // Check for identify.
- if (this != &s)
- this->set (s.rep_, s.len_, 1);
-
- return *this;
-}
-
-ACE_INLINE void
-ACE_CString::set (const char *s, int release)
-{
- size_t length;
- if (s != 0)
- length = ACE_OS::strlen (s);
- else
- length = 0;
-
- this->set (s, length, release);
-}
-
-ACE_INLINE size_t
-ACE_CString::length (void) const
-{
- ACE_TRACE ("ACE_CString::length");
- return this->len_;
-}
-
-ACE_INLINE ACE_CString
-ACE_CString::substr (size_t offset,
- ssize_t length) const
-{
- return this->substring (offset, length);
-}
-
-// Return the <slot'th> character in the string.
-
-ACE_INLINE const char &
-ACE_CString::operator[] (size_t slot) const
-{
- ACE_TRACE ("ACE_CString::operator[]");
- return this->rep_[slot];
-}
-
-// Return the <slot'th> character in the string by reference.
-
-ACE_INLINE char &
-ACE_CString::operator[] (size_t slot)
-{
- ACE_TRACE ("ACE_CString::operator[]");
- return this->rep_[slot];
-}
-
-// Get a copy of the underlying representation.
-
-ACE_INLINE char *
-ACE_CString::rep (void) const
-{
- ACE_TRACE ("ACE_CString::rep");
-
- char *new_string;
- ACE_NEW_RETURN (new_string, char[this->len_ + 1], 0);
- ACE_OS::strncpy (new_string, this->rep_, this->len_);
- new_string[this->len_] = '\0';
-
- return new_string;
-}
-
-ACE_INLINE const char *
-ACE_CString::fast_rep (void) const
-{
- return this->rep_;
-}
-
-ACE_INLINE const char *
-ACE_CString::c_str (void) const
-{
- return this->rep_;
-}
-
-// Comparison operator.
-
-ACE_INLINE int
-ACE_CString::operator== (const ACE_CString &s) const
-{
- ACE_TRACE ("ACE_CString::operator==");
-
- return this->len_ == s.len_
- && ACE_OS::strncmp (this->rep_, s.rep_, this->len_) == 0;
-}
-
-// Less than comparison operator.
-
-ACE_INLINE int
-ACE_CString::operator < (const ACE_CString &s) const
-{
- ACE_TRACE ("ACE_CString::operator <");
-
- return (this->rep_ && s.rep_)
- ? ACE_OS::strcmp (this->rep_, s.rep_) < 0
- : ((s.rep_) ? 1 : 0 );
-}
-
-// Greater than comparison operator.
-
-ACE_INLINE int
-ACE_CString::operator > (const ACE_CString &s) const
-{
- ACE_TRACE ("ACE_CString::operator >");
-
- return (this->rep_ && s.rep_)
- ? ACE_OS::strcmp (this->rep_, s.rep_) > 0
- : ((this->rep_) ? 1 : 0 );
-}
-
-
-// Comparison operator.
-
-ACE_INLINE int
-ACE_CString::operator!= (const ACE_CString &s) const
-{
- ACE_TRACE ("ACE_CString::operator!=");
- return !(*this == s);
-}
-
-ACE_INLINE int
-ACE_CString::compare (const ACE_CString &s) const
-{
- ACE_TRACE ("ACE_CString::compare");
-
- // We can't just pass both strings to strcmp, since they are not
- // guaranteed to be null-terminated.
-
- // Pick smaller of the two lengths and perform the comparison.
- int smaller_length = (this->len_ < s.len_) ? this->len_ : s.len_;
- int result = ACE_OS::strncmp (this->rep_,
- s.rep_,
- smaller_length);
-
- if (result != 0 || s.len_ == this->len_)
- return result;
-
- else
- // we need to differentiate based on length
- if (this->len_ > s.len_)
- return (this->rep_[smaller_length] - '\0');
-
- else
- return ('\0' - s.rep_[smaller_length]);
-}
-
-ACE_INLINE int
-ACE_CString::find (const char *s, int pos) const
-{
- char *substr = this->rep_ + pos;
- size_t len = ACE_OS::strlen (s);
- char *pointer = ACE_OS::strnstr (substr, s, len);
- if (pointer == 0)
- return ACE_CString::npos;
- else
- return pointer - substr;
-}
-
-ACE_INLINE int
-ACE_CString::find (char c, int pos) const
-{
- char *substr = this->rep_ + pos;
- char *pointer = ACE_OS::strnchr (substr, c, this->len_ - pos);
- if (pointer == 0)
- return ACE_CString::npos;
- else
- return pointer - substr;
-}
-
-ACE_INLINE int
-ACE_CString::find (const ACE_CString &str, int pos) const
-{
- return this->find (str.rep_, pos);
-}
-
-ACE_INLINE int
-ACE_CString::strstr (const ACE_CString &s) const
-{
- ACE_TRACE ("ACE_CString::strstr");
-
- return this->find (s.rep_);
-}
-
-ACE_INLINE int
-ACE_CString::rfind (char c, int pos) const
-{
- if (pos == ACE_CString::npos)
- pos = this->len_;
-
- for (int i = pos - 1; i >= 0; i--)
- if (this->rep_[i] == c)
- return i;
-
- return ACE_CString::npos;
-}
-
-ACE_INLINE u_long
-ACE_CString::hash (void) const
-{
- return ACE::hash_pjw (this->rep_, this->len_);
-}
-
-ACE_INLINE ACE_WString
-operator+ (const ACE_WString &s,
- const ACE_WString &t)
-{
- ACE_WString temp (s);
- temp += t;
- return temp;
-}
-
-ACE_INLINE ACE_CString
-operator+ (const ACE_CString &s, const ACE_CString &t)
-{
- ACE_CString temp (s);
- temp += t;
- return temp;
-}
-
-ACE_INLINE
-ACE_SString::~ACE_SString (void)
-{
-}
-
-ACE_INLINE ACE_SString
-ACE_SString::substr (size_t offset,
- ssize_t length) const
-{
- return this->substring (offset, length);
-}
-
-// Return the <slot'th> character in the string.
-
-ACE_INLINE char
-ACE_SString::operator[] (size_t slot) const
-{
- ACE_TRACE ("ACE_SString::operator[]");
- return this->rep_[slot];
-}
-
-// Return the <slot'th> character in the string by reference.
-
-ACE_INLINE char &
-ACE_SString::operator[] (size_t slot)
-{
- ACE_TRACE ("ACE_SString::operator[]");
- return this->rep_[slot];
-}
-
-// Get the underlying pointer (does not make a copy, so beware!).
-
-ACE_INLINE const char *
-ACE_SString::rep (void) const
-{
- ACE_TRACE ("ACE_SString::rep");
- return this->rep_;
-}
-
-// Get the underlying pointer (does not make a copy, so beware!).
-
-ACE_INLINE const char *
-ACE_SString::fast_rep (void) const
-{
- ACE_TRACE ("ACE_SString::fast_rep");
- return this->rep_;
-}
-
-// Get the underlying pointer (does not make a copy, so beware!).
-
-ACE_INLINE const char *
-ACE_SString::c_str (void) const
-{
- ACE_TRACE ("ACE_SString::c_str");
- return this->rep_;
-}
-
-// Comparison operator.
-
-ACE_INLINE int
-ACE_SString::operator== (const ACE_SString &s) const
-{
- ACE_TRACE ("ACE_SString::operator==");
- return this->len_ == s.len_
- && ACE_OS::strcmp (this->rep_, s.rep_) == 0;
-}
-
-// Less than comparison operator.
-
-ACE_INLINE int
-ACE_SString::operator < (const ACE_SString &s) const
-{
- ACE_TRACE ("ACE_SString::operator <");
-
- return (this->rep_ && s.rep_)
- ? ACE_OS::strcmp (this->rep_, s.rep_) < 0
- : ((s.rep_) ? 1 : 0 );
-}
-
-// Greater than comparison operator.
-
-ACE_INLINE int
-ACE_SString::operator > (const ACE_SString &s) const
-{
- ACE_TRACE ("ACE_SString::operator >");
-
- return (this->rep_ && s.rep_)
- ? ACE_OS::strcmp (this->rep_, s.rep_) > 0
- : ((this->rep_) ? 1 : 0 );
-}
-
-// Comparison operator.
-
-ACE_INLINE int
-ACE_SString::operator!= (const ACE_SString &s) const
-{
- ACE_TRACE ("ACE_SString::operator!=");
- return !(*this == s);
-}
-
-ACE_INLINE int
-ACE_SString::compare (const ACE_SString &s) const
-{
- ACE_TRACE ("ACE_SString::compare");
- return ACE_OS::strcmp (this->rep_, s.rep_);
-}
-
-ACE_INLINE int
-ACE_SString::find (const char *s, int pos) const
-{
- char *substr = this->rep_ + pos;
- char *pointer = ACE_OS::strstr (substr, s);
- if (pointer == 0)
- return ACE_SString::npos;
- else
- return pointer - substr;
-}
-
-ACE_INLINE int
-ACE_SString::find (char c, int pos) const
-{
- char *substr = this->rep_ + pos;
- char *pointer = ACE_OS::strchr (substr, c);
- if (pointer == 0)
- return ACE_SString::npos;
- else
- return pointer - substr;
-}
-
-ACE_INLINE int
-ACE_SString::strstr (const ACE_SString &s) const
-{
- ACE_TRACE ("ACE_SString::strstr");
-
- return this->find (s.rep_);
-}
-
-ACE_INLINE int
-ACE_SString::find (const ACE_SString &str, int pos) const
-{
- return this->find (str.rep_, pos);
-}
-
-ACE_INLINE int
-ACE_SString::rfind (char c, int pos) const
-{
- if (pos == ACE_SString::npos)
- pos = this->len_;
-
- for (int i = pos - 1; i >= 0; i--)
- {
- if (this->rep_[i] == c)
- return i;
- }
-
- return ACE_SString::npos;
-}
-
-ACE_INLINE u_long
-ACE_SString::hash (void) const
-{
- return ACE::hash_pjw (this->rep_);
-}
-
-ACE_INLINE size_t
-ACE_SString::length (void) const
-{
- ACE_TRACE ("ACE_SString::length");
- return this->len_;
-}
-
-
-
-ACE_INLINE ACE_WString
-ACE_WString::substr (size_t offset,
- ssize_t length) const
-{
- return this->substring (offset, length);
-}
-
-// Get a copy of the underlying representation.
-
-ACE_INLINE ACE_WSTRING_TYPE *
-ACE_WString::rep (void) const
-{
- ACE_TRACE ("ACE_WString::rep");
- if (this->len_ <= 0)
- return 0;
- else
- {
- ACE_WSTRING_TYPE *t;
- ACE_NEW_RETURN (t, ACE_WSTRING_TYPE[this->len_ + 1], 0);
- ACE_OS::memcpy (t, this->rep_, this->len_ * sizeof (ACE_WSTRING_TYPE));
-
- // 0 terminate
- t[this->len_] = 0;
-
- return t;
- }
-}
-
-// Get at the underlying representation directly!
-
-ACE_INLINE const ACE_WSTRING_TYPE *
-ACE_WString::fast_rep (void) const
-{
- return this->rep_;
-}
-
-ACE_INLINE const ACE_WSTRING_TYPE *
-ACE_WString::c_str (void) const
-{
- return this->rep_;
-}
-
-// Comparison operator.
-
-ACE_INLINE int
-ACE_WString::operator== (const ACE_WString &s) const
-{
- ACE_TRACE ("ACE_WString::operator==");
- return this->len_ == s.len_
- && ACE_OS::memcmp ((const void *) this->rep_,
- (const void *) s.rep_,
- this->len_ * sizeof (ACE_WSTRING_TYPE)) == 0;
-}
-
-// Less than comparison operator.
-
-ACE_INLINE int
-ACE_WString::operator < (const ACE_WString &s) const
-{
- ACE_TRACE ("ACE_WString::operator <");
- return (this->len_ < s.len_)
- ? (ACE_OS::memcmp ((const void *) this->rep_,
- (const void *) s.rep_,
- this->len_ * sizeof (ACE_WSTRING_TYPE)) <= 0)
- : (ACE_OS::memcmp ((const void *) this->rep_,
- (const void *) s.rep_,
- s.len_ * sizeof (ACE_WSTRING_TYPE)) < 0);
-}
-
-// Greater than comparison operator.
-
-ACE_INLINE int
-ACE_WString::operator > (const ACE_WString &s) const
-{
- ACE_TRACE ("ACE_WString::operator >");
- return (this->len_ <= s.len_)
- ? (ACE_OS::memcmp ((const void *) this->rep_,
- (const void *) s.rep_,
- this->len_ * sizeof (ACE_WSTRING_TYPE)) > 0)
- : (ACE_OS::memcmp ((const void *) this->rep_,
- (const void *) s.rep_,
- s.len_ * sizeof (ACE_WSTRING_TYPE)) >= 0);
-}
-
-
-// Comparison operator.
-
-ACE_INLINE int
-ACE_WString::operator!= (const ACE_WString &s) const
-{
- ACE_TRACE ("ACE_WString::operator!=");
- return !(*this == s);
-}
-
-ACE_INLINE int
-ACE_WString::compare (const ACE_WString &s) const
-{
- ACE_TRACE ("ACE_WString::compare");
-
- return ACE_OS::memcmp ((const void *) this->rep_,
- (const void *) s.rep_,
- this->len_ * sizeof (ACE_WSTRING_TYPE));
-}
-
-// Return the <slot'th> character in the string.
-
-ACE_INLINE ACE_WSTRING_TYPE
-ACE_WString::operator[] (size_t slot) const
-{
- ACE_TRACE ("ACE_WString::operator[]");
- return this->rep_[slot];
-}
-
-// Return the <slot'th> character in the string.
-
-ACE_INLINE ACE_WSTRING_TYPE &
-ACE_WString::operator[] (size_t slot)
-{
- ACE_TRACE ("ACE_WString::operator[]");
- return this->rep_[slot];
-}
-
-ACE_INLINE int
-ACE_WString::find (const ACE_WSTRING_TYPE *s, int pos) const
-{
- ACE_WSTRING_TYPE *substr = this->rep_ + pos;
- const ACE_WSTRING_TYPE *pointer = ACE_WString::strstr (substr, s);
- if (pointer == 0)
- return ACE_WString::npos;
- else
- return pointer - substr;
-}
-
-ACE_INLINE int
-ACE_WString::find (ACE_WSTRING_TYPE c, int pos) const
-{
- if (pos == ACE_WString::npos)
- pos = this->len_;
-
- for (size_t i = pos; i < this->len_; i++)
- if (this->rep_[i] == c)
- return ACE_static_cast (int, i);
-
- return ACE_WString::npos;
-}
-
-ACE_INLINE int
-ACE_WString::strstr (const ACE_WString &s) const
-{
- ACE_TRACE ("ACE_WString::strstr");
-
- return this->find (s.rep_);
-}
-
-ACE_INLINE int
-ACE_WString::find (const ACE_WString &str, int pos) const
-{
- return this->find (str.rep_, pos);
-}
-
-ACE_INLINE int
-ACE_WString::rfind (ACE_WSTRING_TYPE c, int pos) const
-{
- if (pos == ACE_WString::npos)
- pos = this->len_;
-
- for (int i = pos - 1; i >= 0; i--)
- if (this->rep_[i] == c)
- return i;
-
- return ACE_WString::npos;
-}
-
-ACE_INLINE size_t
-ACE_WString::length (void) const
-{
- ACE_TRACE ("ACE_WString::length");
- return this->len_;
-}
-
-ACE_INLINE u_long
-ACE_WString::hash (void) const
-{
- return ACE::hash_pjw
- (ACE_reinterpret_cast (char *, ACE_const_cast (ACE_WSTRING_TYPE *,
- this->rep_)),
- this->len_ * sizeof (ACE_WSTRING_TYPE));
-}
-
-
-ACE_INLINE
-ACE_Auto_String_Free::ACE_Auto_String_Free (char* p)
- : p_ (p)
-{
-}
-
-ACE_INLINE
-ACE_Auto_String_Free::ACE_Auto_String_Free (ACE_Auto_String_Free& rhs)
- : p_ (rhs.p_)
-{
- rhs.p_ = 0;
-}
-
-ACE_INLINE void
-ACE_Auto_String_Free::reset (char* p)
-{
- if (this->p_ != 0)
- ACE_OS::free (this->p_);
- this->p_ = p;
-}
-
-ACE_INLINE ACE_Auto_String_Free&
-ACE_Auto_String_Free::operator= (ACE_Auto_String_Free& rhs)
-{
- if (this != &rhs)
- {
- this->reset (rhs.p_);
- rhs.p_ = 0;
- }
- return *this;
-}
-
-ACE_INLINE
-ACE_Auto_String_Free::~ACE_Auto_String_Free (void)
-{
- this->reset (0);
-}
-
-ACE_INLINE char*
-ACE_Auto_String_Free::operator* (void) const
-{
- return this->p_;
-}
-
-ACE_INLINE char
-ACE_Auto_String_Free::operator[] (int i) const
-{
- return this->p_[i];
-}
-
-ACE_INLINE char*
-ACE_Auto_String_Free::get (void) const
-{
- return this->p_;
-}
-
-ACE_INLINE char*
-ACE_Auto_String_Free::release (void)
-{
- char* p = this->p_;
- this->p_ = 0;
- return p;
-}
diff --git a/ace/SV_Message.cpp b/ace/SV_Message.cpp
deleted file mode 100644
index fef83458651..00000000000
--- a/ace/SV_Message.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// SV_Message.cpp
-// $Id$
-
-#include "ace/SV_Message.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/SV_Message.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, SV_Message, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SV_Message)
-
-void
-ACE_SV_Message::dump (void) const
-{
- ACE_TRACE ("ACE_SV_Message::dump");
-}
-
diff --git a/ace/SV_Message.h b/ace/SV_Message.h
deleted file mode 100644
index 64d36b235a6..00000000000
--- a/ace/SV_Message.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SV_Message.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SV_MESSAGE_H
-#define ACE_SV_MESSAGE_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_SV_Message
-{
- // = TITLE
- // Defines the header file for the C++ wrapper for message queues. */
-public:
- // = Initialization and termination methods.
- ACE_SV_Message (long type = 0);
- ~ACE_SV_Message (void);
-
- // = Get/set the message type.
- long type (void) const;
- void type (long);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- long type_;
- // Type of the message.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/SV_Message.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SV_MESSAGE_H */
diff --git a/ace/SV_Message.i b/ace/SV_Message.i
deleted file mode 100644
index 8c08e41d151..00000000000
--- a/ace/SV_Message.i
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SV_Message.i
-
-ACE_INLINE
-ACE_SV_Message::ACE_SV_Message (long t)
- : type_ (t)
-{
- ACE_TRACE ("ACE_SV_Message::ACE_SV_Message");
-}
-
-ACE_INLINE
-ACE_SV_Message::~ACE_SV_Message (void)
-{
- ACE_TRACE ("ACE_SV_Message::~ACE_SV_Message");
-}
-
-ACE_INLINE long
-ACE_SV_Message::type (void) const
-{
- ACE_TRACE ("ACE_SV_Message::type");
- return this->type_;
-}
-
-ACE_INLINE void
-ACE_SV_Message::type (long t)
-{
- ACE_TRACE ("ACE_SV_Message::type");
- this->type_ = t;
-}
diff --git a/ace/SV_Message_Queue.cpp b/ace/SV_Message_Queue.cpp
deleted file mode 100644
index b1090c1c3f8..00000000000
--- a/ace/SV_Message_Queue.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// SV_Message_Queue.cpp
-// $Id$
-
-#include "ace/SV_Message_Queue.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SV_Message_Queue.i"
-#endif
-
-ACE_RCSID(ace, SV_Message_Queue, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SV_Message_Queue)
-
-void
-ACE_SV_Message_Queue::dump (void) const
-{
- ACE_TRACE ("ACE_SV_Message_Queue::dump");
-}
-
-ACE_SV_Message_Queue::ACE_SV_Message_Queue (void)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::ACE_SV_Message_Queue");
-}
-
-ACE_SV_Message_Queue::~ACE_SV_Message_Queue (void)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::~ACE_SV_Message_Queue");
-}
-
-ACE_SV_Message_Queue::ACE_SV_Message_Queue (key_t external_id,
- int create,
- int perms)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::ACE_SV_Message_Queue");
- if (this->open (external_id, create, perms) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SV_Message_Queue::ACE_SV_Message_Queue")));
-}
diff --git a/ace/SV_Message_Queue.h b/ace/SV_Message_Queue.h
deleted file mode 100644
index a06139e6aa1..00000000000
--- a/ace/SV_Message_Queue.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SV_Message_Queue.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SV_MESSAGE_QUEUE_H
-#define ACE_SV_MESSAGE_QUEUE_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SV_Message.h"
-
-class ACE_Export ACE_SV_Message_Queue
-{
- // = TITLE
- // Defines the header file for the C++ wrapper for System V IPC
- // message queues.
-public:
- // = Useful symbolic constants.
- enum
- {
- ACE_CREATE = IPC_CREAT,
- ACE_OPEN = 0,
- ACE_NOWAIT = IPC_NOWAIT
- };
-
- // = Initialization and termination methods.
- ACE_SV_Message_Queue (void);
- ACE_SV_Message_Queue (key_t external_id,
- int create = ACE_SV_Message_Queue::ACE_OPEN,
- int perms = ACE_DEFAULT_FILE_PERMS);
- int open (key_t external_id,
- int create = ACE_SV_Message_Queue::ACE_OPEN,
- int perms = ACE_DEFAULT_FILE_PERMS);
- // Open a message queue using the <external_id>.
-
- ~ACE_SV_Message_Queue (void);
-
- int close (void);
- // Close down this instance of the message queue without removing it
- // from the system.
-
- int remove (void);
- // Close down and remove the message queue from the system.
-
-
- // = Message transfer methods.
- int recv (ACE_SV_Message &mb,
- int length,
- long mtype = 0,
- int mflags = 0);
-
- int send (const ACE_SV_Message &mb,
- int length,
- int mflags = 0);
-
- int control (int option, void *arg = 0);
- // Access the underlying control operations.
-
- // = Get/set the underly internal id.
- int get_id (void);
- void set_id (int);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- int internal_id_;
- // Returned from the underlying <msgget> system call.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SV_Message_Queue.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SV_MESSAGE_QUEUE_H */
diff --git a/ace/SV_Message_Queue.i b/ace/SV_Message_Queue.i
deleted file mode 100644
index 45fd1f4efcc..00000000000
--- a/ace/SV_Message_Queue.i
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SV_Message_Queue.i
-
-#include "ace/SV_Message_Queue.h"
-
-// Open a message queue using the <external_id>.
-
-ASYS_INLINE int
-ACE_SV_Message_Queue::open (key_t external_id, int create, int perms)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::open");
- return this->internal_id_ = ACE_OS::msgget (external_id, create | perms);
-}
-
-// What does it mean to close a message queue?!
-
-ASYS_INLINE int
-ACE_SV_Message_Queue::close (void)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::close");
- this->internal_id_ = -1;
- return 1;
-}
-
-ASYS_INLINE int
-ACE_SV_Message_Queue::control (int option, void *arg)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::control");
- return ACE_OS::msgctl (this->internal_id_, option,
- (msqid_ds *) arg);
-}
-
-ASYS_INLINE int
-ACE_SV_Message_Queue::remove (void)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::remove");
- int result = this->control (IPC_RMID);
- this->internal_id_ = -1;
- return result;
-}
-
-ASYS_INLINE int
-ACE_SV_Message_Queue::get_id (void)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::get_id");
- return this->internal_id_;
-}
-
-ASYS_INLINE void
-ACE_SV_Message_Queue::set_id (int id)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::set_id");
- this->internal_id_ = id;
-}
-
-ASYS_INLINE int
-ACE_SV_Message_Queue::recv (ACE_SV_Message &mb,
- int length,
- long type,
- int mflags)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::recv");
- return ACE_OS::msgrcv (this->internal_id_, (void *) &mb,
- length, type, mflags);
-}
-
-ASYS_INLINE int
-ACE_SV_Message_Queue::send (const ACE_SV_Message &mb,
- int length,
- int mflags)
-{
- ACE_TRACE ("ACE_SV_Message_Queue::send");
- return ACE_OS::msgsnd (this->internal_id_, (void *) &mb,
- length, mflags);
-}
-
diff --git a/ace/SV_Semaphore_Complex.cpp b/ace/SV_Semaphore_Complex.cpp
deleted file mode 100644
index 401157b20f0..00000000000
--- a/ace/SV_Semaphore_Complex.cpp
+++ /dev/null
@@ -1,253 +0,0 @@
-// SV_Semaphore_Complex.cpp
-// $Id$
-
-/* -*- C++ -*- */
-
-#include "ace/SV_Semaphore_Complex.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SV_Semaphore_Complex.i"
-#endif
-
-ACE_RCSID(ace, SV_Semaphore_Complex, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SV_Semaphore_Complex)
-
-void
-ACE_SV_Semaphore_Complex::dump (void) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::dump");
-}
-
-// initial value of process
-const int ACE_SV_Semaphore_Complex::BIGCOUNT_ = 10000;
-
-// Define the ACE_SV_Semaphore operation arrays for the semop() calls.
-sembuf ACE_SV_Semaphore_Complex::op_lock_[2] =
-{
- {0, 0, 0}, // Wait for [0] (lock) to equal 0
- {0, 1, SEM_UNDO}, // then increment [0] to 1 - this locks it.
- // UNDO to release the lock if processes exit
- // before explicitly unlocking.
-};
-
-sembuf ACE_SV_Semaphore_Complex::op_endcreate_[2] =
-{
- {1, -1, SEM_UNDO}, // Decrement [1] (proc counter) with undo on
- // exit, UNDO to adjust proc counter if
- // process exits before explicitly calling close()
- {0, -1, SEM_UNDO}, // the decrement [0] (lock) back to 0
-};
-
-sembuf ACE_SV_Semaphore_Complex::op_open_[1] =
-{
- {1, -1, SEM_UNDO}, // Decrement [1] (proc counter) with undo on
- // exit.
-};
-
-sembuf ACE_SV_Semaphore_Complex::op_close_[3] =
-{
- {0, 0, 0}, // Wait for [0] (lock) to equal 0
- {0, 1, SEM_UNDO}, // then increment [0] to 1 - this lock it
- {1, 1, SEM_UNDO}, // then increment [1] (proc counter)
-};
-
-sembuf ACE_SV_Semaphore_Complex::op_unlock_[1] =
-{
- {0, -1, SEM_UNDO}, // Decrement [0] (lock) back to 0
-};
-
-// Open or create an array of SV_Semaphores. We return 0 if all is OK, else -1.
-
-int
-ACE_SV_Semaphore_Complex::open (key_t k,
- int create,
- int initial_value,
- u_short nsems,
- int perms)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::open");
- if (k == IPC_PRIVATE)
- return -1;
-
- this->key_ = k;
-
- // Must include a count for the 2 additional semaphores we use
- // internally.
- this->sem_number_ = nsems + 2;
-
- if (create == ACE_SV_Semaphore_Complex::ACE_CREATE)
- {
- int result;
-
- do
- {
- this->internal_id_ = ACE_OS::semget
- (this->key_,
- (u_short) 2 + nsems,
- perms | ACE_SV_Semaphore_Complex::ACE_CREATE);
-
- if (this->internal_id_ == -1)
- return -1; // permission problem or tables full
-
- // When the <ACE_SV_Semaphore_Complex> is created, we know
- // that the value of all 3 members is 0. Get a lock on the
- // <ACE_SV_Semaphore_Complex> by waiting for [0] to equal 0,
- // then increment it.
-
- // There is a race condition here. There is the possibility
- // that between the <semget> above and the <semop> below,
- // another process can call out <close> function which can
- // remove the <ACE_SV_Semaphore> if that process is the last
- // one using it. Therefor we handle the error condition of
- // an invalid <ACE_SV_Semaphore> ID specifically below, and
- // if it does happen, we just go back and create it again.
- result = ACE_OS::semop (this->internal_id_,
- &ACE_SV_Semaphore_Complex::op_lock_[0],
- 2);
- }
- while (result == -1 && (errno == EINVAL || errno == EIDRM));
-
- if (result == -1)
- return -1;
-
- // Get the value of the process counter. If it equals 0, then no
- // one has initialized the ACE_SV_Semaphore yet.
-
- int semval = ACE_SV_Semaphore_Simple::control (GETVAL, 0, 1);
-
- if (semval == -1)
- return this->init ();
- else if (semval == 0)
- {
- // We should initialize by doing a SETALL, but that would
- // clear the adjust value that we set when we locked the
- // ACE_SV_Semaphore above. Instead we do system calls to
- // initialize [1], as well as all the nsems SV_Semaphores.
-
- if (ACE_SV_Semaphore_Simple::control (SETVAL,
- ACE_SV_Semaphore_Complex::BIGCOUNT_,
- 1) == -1)
- return -1;
- else
- for (int i = 0; i < nsems; i++)
- if (this->control (SETVAL, initial_value, i) == -1)
- return -1;
- }
-
- // Decrement the process counter and then release the lock.
- return ACE_OS::semop (this->internal_id_,
- &ACE_SV_Semaphore_Complex::op_endcreate_[0],
- 2);
- }
- else
- {
- this->internal_id_ = ACE_OS::semget (this->key_, 2 + nsems, 0);
- if (this->internal_id_ == -1)
- return -1; // doesn't exist or tables full
-
- // Decrement the process counter. We don't need a lock to do this.
- if (ACE_OS::semop (this->internal_id_,
- &ACE_SV_Semaphore_Complex::op_open_[0], 1) < 0)
- return this->init ();
- return 0;
- }
-}
-
-int
-ACE_SV_Semaphore_Complex::open (const char *name,
- int flags,
- int initial_value,
- u_short nsems,
- int perms)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::open");
- return this->open (ACE_SV_Semaphore_Simple::name_2_key (name),
- flags, initial_value, nsems, perms);
-}
-
-// Close a ACE_SV_Semaphore. Unlike the remove above, this function
-// is for a process to call before it exits, when it is done with the
-// ACE_SV_Semaphore. We "decrement" the counter of processes using
-// the ACE_SV_Semaphore, and if this was the last one, we can remove
-// the ACE_SV_Semaphore.
-
-int
-ACE_SV_Semaphore_Complex::close (void)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::close");
- int semval;
-
- if (this->key_ == (key_t) - 1 || this->internal_id_ == -1)
- return -1;
-
- // The following semop() first gets a lock on the ACE_SV_Semaphore,
- // then increments [1] - the process number.
-
- if (ACE_OS::semop (this->internal_id_,
- &ACE_SV_Semaphore_Complex::op_close_[0],
- 3) == -1)
- return -1;
-
- // Now that we have a lock, read the value of the process counter to
- // see if this is the last reference to the ACE_SV_Semaphore. There
- // is a race condition here - see the comments in create ().
-
- if ((semval = ACE_SV_Semaphore_Simple::control (GETVAL, 0, 1)) == -1)
- return -1;
-
- if (semval > ACE_SV_Semaphore_Complex::BIGCOUNT_)
- return -1;
- else if (semval == ACE_SV_Semaphore_Complex::BIGCOUNT_)
- return this->remove ();
- else
- {
- int result = ACE_OS::semop (this->internal_id_,
- &ACE_SV_Semaphore_Complex::op_unlock_[0], 1);
- this->init ();
- return result;
- }
-}
-
-ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (key_t k,
- int flags,
- int initial_value,
- u_short nsems,
- int perms)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex");
- if (this->open (k, flags, initial_value, nsems, perms) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_SV_Semaphore_Complex")));
-}
-
-ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (const char *name,
- int flags,
- int initial_value,
- u_short nsems,
- int perms)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex");
-
- key_t key;
-
- if (name == 0)
- key = ACE_DEFAULT_SEM_KEY;
- else
- key = this->name_2_key (name);
-
- if (this->open (key, flags, initial_value, nsems, perms) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_SV_Semaphore_Complex")));
-}
-
-ACE_SV_Semaphore_Complex::~ACE_SV_Semaphore_Complex (void)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::~ACE_SV_Semaphore_Complex");
- if (this->internal_id_ >= 0)
- this->close ();
-}
-
-ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (void)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex");
- this->init ();
-}
diff --git a/ace/SV_Semaphore_Complex.h b/ace/SV_Semaphore_Complex.h
deleted file mode 100644
index 6d3cbd81dc6..00000000000
--- a/ace/SV_Semaphore_Complex.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ACE_SV_Semaphore_Complex.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SV_SEMAPHORE_COMPLEX_H
-#define ACE_SV_SEMAPHORE_COMPLEX_H
-#include "ace/pre.h"
-
-#include "ace/SV_Semaphore_Simple.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_SV_Semaphore_Complex : private ACE_SV_Semaphore_Simple
-{
- // = TITLE
- // This is a more complex semaphore wrapper that handles race
- // conditions for initialization correctly...
- //
- // = DESCRIPTION
- // This code is a port to C++, inspired by: W. Richard Stevens
- // from his book: UNIX Network Programming (Prentice Hall, ISBN
- // 0-13-949876-1 - 1990). We provide a simpler and easier to
- // understand interface to the System V Semaphore system calls.
- // We create and use a 2 + n-member set for the requested
- // <ACE_SV_Semaphore_Complex>. The first member, [0], is a
- // counter used to know when all processes have finished with
- // the <ACE_SV_Semaphore_Complex>. The counter is initialized
- // to a large number, decremented on every create or open and
- // incremented on every close. This way we can use the "adjust"
- // feature provided by System V so that any process that exit's
- // without calling <close> is accounted for. It doesn't help us
- // if the last process does this (as we have no way of getting
- // control to remove the <ACE_SV_Semaphore_Complex>) but it
- // will work if any process other than the last does an exit
- // (intentional or unintentional).
- //
- // The second member, [1], of the semaphore is used as a lock
- // variable to avoid any race conditions in the <create> and
- // <close> functions.
- //
- // The members beyond [1] are actual semaphore values in the
- // array of semaphores, which may be sized by the user in the
- // constructor.
-public:
- enum
- {
- ACE_CREATE = IPC_CREAT,
- ACE_OPEN = 0
- };
-
- // = Initialization and termination methods.
- ACE_SV_Semaphore_Complex (void);
- ACE_SV_Semaphore_Complex (key_t key,
- int create = ACE_SV_Semaphore_Complex::ACE_CREATE,
- int initial_value = 1,
- u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
- ACE_SV_Semaphore_Complex (const char *name,
- int create = ACE_SV_Semaphore_Complex::ACE_CREATE,
- int initial_value = 1,
- u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
- ~ACE_SV_Semaphore_Complex (void);
-
- int open (const char *name,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
- int initial_value = 1,
- u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
- // Open or create an array of SV_Semaphores. We return 0 if all is
- // OK, else -1.
-
- int open (key_t key,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
- int initial_value = 1,
- u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
- // Open or create an array of SV_Semaphores. We return 0 if all is
- // OK, else -1.
-
- int close (void);
- // Close an ACE_SV_Semaphore. Unlike the <remove> method, this
- // method is for a process to call before it exits, when it is done
- // with the ACE_SV_Semaphore. We "decrement" the counter of
- // processes using the ACE_SV_Semaphore, and if this was the last
- // one, we can remove the ACE_SV_Semaphore.
-
- // = Semaphore acquire and release methods.
-
- int acquire (u_short n = 0, int flags = 0) const;
- // Acquire the semaphore.
-
- int acquire_read (u_short n = 0, int flags = 0) const;
- // Acquire a semaphore for reading.
-
- int acquire_write (u_short n = 0, int flags = 0) const;
- // Acquire a semaphore for writing
-
- int tryacquire (u_short n = 0, int flags = 0) const;
- // Try to acquire the semaphore.
-
- int tryacquire_read (u_short n = 0, int flags = 0) const;
- // Try to acquire the semaphore for reading.
-
- int tryacquire_write (u_short n = 0, int flags = 0) const;
- // Try to acquire the semaphore for writing.
-
- int release (u_short n = 0, int flags = 0) const;
- // Release the semaphore.
-
- // = Semaphore operation methods.
- int op (int val, u_short n = 0, int flags = 0) const;
- int op (sembuf op_vec[], u_short n) const;
-
- // = Semaphore control methods.
- int control (int cmd, semun arg, u_short n = 0) const;
- int control (int cmd, int value = 0, u_short n = 0) const;
-
- // = Upgrade access control...
- ACE_USING ACE_SV_Semaphore_Simple::get_id;
- ACE_USING ACE_SV_Semaphore_Simple::remove;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- static const int BIGCOUNT_;
- static sembuf op_lock_[2];
- static sembuf op_endcreate_[2];
- static sembuf op_open_[1];
- static sembuf op_close_[3];
- static sembuf op_unlock_[1];
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SV_Semaphore_Complex.i"
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_SV_SEMAPHORE_COMPLEX_H */
diff --git a/ace/SV_Semaphore_Complex.i b/ace/SV_Semaphore_Complex.i
deleted file mode 100644
index 82ce23bbbef..00000000000
--- a/ace/SV_Semaphore_Complex.i
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SV_Semaphore_Complex.i
-
-#include "ace/Trace.h"
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::acquire (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::acquire");
- return ACE_SV_Semaphore_Simple::acquire ((u_short) n + 2, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::acquire_read (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::acquire_read");
- return this->acquire (n, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::acquire_write (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::acquire_write");
- return this->acquire (n, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::tryacquire (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::tryacquire");
- return ACE_SV_Semaphore_Simple::tryacquire ((u_short) n + 2, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::tryacquire_read (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::tryacquire_read");
- return this->tryacquire (n, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::tryacquire_write (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::tryacquire_write");
- return this->tryacquire (n, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::release (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::release");
- return ACE_SV_Semaphore_Simple::release ((u_short) n + 2, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::op (int val, u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::op");
- return ACE_SV_Semaphore_Simple::op (val, (u_short) n + 2, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::op (sembuf op_vec[], u_short n) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::op");
- return ACE_SV_Semaphore_Simple::op (op_vec, (u_short) n + 2);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::control (int cmd, semun arg, u_short n) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::control");
- return ACE_SV_Semaphore_Simple::control (cmd, arg, (u_short) n + 2);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Complex::control (int cmd, int value, u_short n) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Complex::control");
- return ACE_SV_Semaphore_Simple::control (cmd, value, (u_short) n + 2);
-}
diff --git a/ace/SV_Semaphore_Simple.cpp b/ace/SV_Semaphore_Simple.cpp
deleted file mode 100644
index 176c06d2bb8..00000000000
--- a/ace/SV_Semaphore_Simple.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-// $Id$
-
-/* -*- C++ -*- */
-
-#include "ace/SV_Semaphore_Simple.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SV_Semaphore_Simple.i"
-#endif
-
-ACE_RCSID(ace, SV_Semaphore_Simple, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SV_Semaphore_Simple)
-
-void
-ACE_SV_Semaphore_Simple::dump (void) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::dump");
-}
-
-int
-ACE_SV_Semaphore_Simple::control (int cmd,
- int value,
- u_short semnum) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::control");
- if (this->internal_id_ == -1)
- return -1;
- else
- {
- semun semctl_arg;
-
- semctl_arg.val = value;
- return ACE_OS::semctl (this->internal_id_,
- semnum,
- cmd,
- semctl_arg);
- }
-}
-
-int
-ACE_SV_Semaphore_Simple::init (key_t k, int i)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::init");
- this->key_ = k;
- this->internal_id_ = i;
- return 0;
-}
-
-// General ACE_SV_Semaphore operation. Increment or decrement by a
-// specific amount (positive or negative; amount can`t be zero).
-
-int
-ACE_SV_Semaphore_Simple::op (int val, u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::op");
- sembuf op_op;
-
- op_op.sem_num = n;
- op_op.sem_flg = flags;
-
- if (this->internal_id_ == -1)
- return -1;
- else if ((op_op.sem_op = val) == 0)
- return -1;
- else
- return ACE_OS::semop (this->internal_id_, &op_op, 1);
-}
-
-// Open or create one or more SV_Semaphores. We return 0 if all is
-// OK, else -1.
-
-int
-ACE_SV_Semaphore_Simple::open (key_t k,
- int flags,
- int initial_value,
- u_short n,
- int perms)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::open");
- union semun ivalue;
-
- if (k == IPC_PRIVATE || k == ACE_static_cast (key_t, ACE_INVALID_SEM_KEY))
- return -1;
-
- ivalue.val = initial_value;
- this->key_ = k;
- this->sem_number_ = n;
-
- this->internal_id_ = ACE_OS::semget (this->key_, n, perms | flags);
-
- if (this->internal_id_ == -1)
- return -1;
-
- if (ACE_BIT_ENABLED (flags, IPC_CREAT))
- for (int i = 0; i < n; i++)
- if (ACE_OS::semctl (this->internal_id_, i, SETVAL, ivalue) == -1)
- return -1;
-
- return 0;
-}
-
-ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple (key_t k,
- int flags,
- int initial_value,
- u_short n,
- int perms)
- : key_ (k)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple");
- if (this->open (k, flags, initial_value, n, perms) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_SV_Semaphore::ACE_SV_Semaphore")));
-}
-
-// Convert name to key. This function is used internally to create keys
-// for the semaphores.
-//
-// The method for generating names is a 32 bit CRC, but still we
-// measured close to collition ratio of nearly 0.1% for
-// ACE::unique_name()-like strings.
-
-key_t
-ACE_SV_Semaphore_Simple::name_2_key (const char *name)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::name_2_key");
-
- if (name == 0)
- {
- errno = EINVAL;
- return ACE_static_cast (key_t, ACE_INVALID_SEM_KEY);
- }
-
- // Basically "hash" the values in the <name>. This won't
- // necessarily guarantee uniqueness of all keys.
- // But (IMHO) CRC32 is good enough for most purposes (Carlos)
- return (key_t) ACE::crc32 (name);
-}
-
-// Open or create a ACE_SV_Semaphore. We return 1 if all is OK, else
-// 0.
-
-int
-ACE_SV_Semaphore_Simple::open (const char *name,
- int flags,
- int initial_value,
- u_short n,
- int perms)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::open");
-
- key_t key;
-
- if (name == 0)
- key = ACE_DEFAULT_SEM_KEY;
- else
- key = this->name_2_key (name);
-
- return this->open (key, flags, initial_value, n, perms);
-}
-
-ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple (const char *name,
- int flags,
- int initial_value,
- u_short n,
- int perms)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple");
- if (this->open (name,
- flags,
- initial_value,
- n,
- perms) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple")));
-}
-
-ACE_SV_Semaphore_Simple::~ACE_SV_Semaphore_Simple (void)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::~ACE_SV_Semaphore_Simple");
- this->close ();
-}
-
-ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple (void)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple");
- this->init ();
-}
-
-// Remove all SV_Semaphores associated with a particular key. This
-// call is intended to be called from a server, for example, when it
-// is being shut down, as we do an IPC_RMID on the ACE_SV_Semaphore,
-// regardless of whether other processes may be using it or not. Most
-// other processes should use close() below.
-
-int
-ACE_SV_Semaphore_Simple::remove (void) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::remove");
- int result = this->control (IPC_RMID);
- ((ACE_SV_Semaphore_Simple *) this)->init ();
- return result;
-}
diff --git a/ace/SV_Semaphore_Simple.h b/ace/SV_Semaphore_Simple.h
deleted file mode 100644
index 9350fb8cd7b..00000000000
--- a/ace/SV_Semaphore_Simple.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SV_Semaphore_Simple.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_SV_SEMAPHORE_SIMPLE_H
-#define ACE_SV_SEMAPHORE_SIMPLE_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_SV_Semaphore_Simple
-{
- // = TITLE
- // This is a simple semaphore package that assumes there are
- // no race conditions for initialization (i.e., the order of
- // process startup must be well defined).
-public:
- enum
- {
- ACE_CREATE = IPC_CREAT,
- ACE_EXCL = IPC_EXCL,
- ACE_OPEN = 0
- };
-
- // = Initialization and termination methods.
- ACE_SV_Semaphore_Simple (void);
- ACE_SV_Semaphore_Simple (key_t key,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
- int initial_value = 1,
- u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
- ACE_SV_Semaphore_Simple (const char *name,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
- int initial_value = 1,
- u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
- ~ACE_SV_Semaphore_Simple (void);
-
- int open (const char *name,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
- int initial_value = 1,
- u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
-
- int open (key_t key,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
- int initial_value = 1,
- u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
- // Open or create one or more SV_Semaphores. We return 0 if all is
- // OK, else -1.
-
- int close (void);
- // Close a ACE_SV_Semaphore, marking it as invalid for subsequent
- // operations...
-
- int remove (void) const;
- // Remove all SV_Semaphores associated with a particular key. This
- // call is intended to be called from a server, for example, when it
- // is being shut down, as we do an IPC_RMID on the ACE_SV_Semaphore,
- // regardless of whether other processes may be using it or not.
- // Most other processes should use <close> below.
-
- // = Semaphore acquire and release methods.
- int acquire (u_short n = 0, int flags = 0) const;
- // Wait until a ACE_SV_Semaphore's value is greater than 0, the
- // decrement it by 1 and return. Dijkstra's P operation, Tannenbaums
- // DOWN operation.
-
- int acquire_read (u_short n = 0, int flags = 0) const;
- // Acquire a semaphore for reading.
-
- int acquire_write (u_short n = 0, int flags = 0) const;
- // Acquire a semaphore for writing
-
- int tryacquire (u_short n = 0, int flags = 0) const;
- // Non-blocking version of <acquire>.
-
- int tryacquire_read (u_short n = 0, int flags = 0) const;
- // Try to acquire the semaphore for reading.
-
- int tryacquire_write (u_short n = 0, int flags = 0) const;
- // Try to acquire the semaphore for writing.
-
- int release (u_short n = 0, int flags = 0) const;
- // Increment ACE_SV_Semaphore by one. Dijkstra's V operation,
- // Tannenbaums UP operation.
-
- // = Semaphore operation methods.
- int op (int val, u_short semnum = 0, int flags = SEM_UNDO) const;
- // General ACE_SV_Semaphore operation. Increment or decrement by a
- // specific amount (positive or negative; amount can`t be zero).
-
- int op (sembuf op_vec[], u_short nsems) const;
- // General ACE_SV_Semaphore operation on an array of SV_Semaphores.
-
- // = Semaphore control methods.
- int control (int cmd, semun arg, u_short n = 0) const;
- int control (int cmd, int value = 0, u_short n = 0) const;
-
- int get_id (void) const;
- // Get underlying internal id.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- key_t key_;
- // Semaphore key.
-
- int internal_id_;
- // Internal ID to identify the semaphore group within this process.
-
- int sem_number_;
- // Number of semaphores we're creating.
-
- int init (key_t k = ACE_static_cast (key_t, ACE_INVALID_SEM_KEY),
- int i = -1);
- key_t name_2_key (const char *name);
- // Convert name to key This function is used internally to create
- // keys for the semaphores. A valid name contains letters and
- // digits only and MUST start with a letter.
- //
- // The method for generating names is not very sophisticated, so
- // caller should not pass strings which match each other for the first
- // LUSED characters when he wants to get a different key.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SV_Semaphore_Simple.i"
-#endif
-
-#include "ace/post.h"
-#endif /* _SV_SEMAPHORE_SIMPLE_H */
diff --git a/ace/SV_Semaphore_Simple.i b/ace/SV_Semaphore_Simple.i
deleted file mode 100644
index e18acd95a84..00000000000
--- a/ace/SV_Semaphore_Simple.i
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SV_Semaphore_Simple.i
-
-#include "ace/Trace.h"
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::control (int cmd,
- semun arg,
- u_short n) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::control");
- return this->internal_id_ == -1 ?
- -1 : ACE_OS::semctl (this->internal_id_, n, cmd, arg);
-}
-
-// Close a ACE_SV_Semaphore, marking it as invalid for subsequent
-// operations...
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::close (void)
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::close");
- return this->init ();
-}
-
-// General ACE_SV_Semaphore operation on an array of SV_Semaphores.
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::op (sembuf op_vec[], u_short n) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::op");
- return this->internal_id_ == -1
- ? -1 : ACE_OS::semop (this->internal_id_, op_vec, n);
-}
-
-// Wait until a ACE_SV_Semaphore's value is greater than 0, the
-// decrement it by 1 and return. Dijkstra's P operation, Tannenbaums
-// DOWN operation.
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::acquire (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::acquire");
- return this->op (-1, n, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::acquire_read (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::acquire_read");
- return this->acquire (n, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::acquire_write (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::acquire_write");
- return this->acquire (n, flags);
-}
-
-// Non-blocking version of acquire().
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::tryacquire (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::tryacquire");
- return this->op (-1, n, flags | IPC_NOWAIT);
-}
-
-// Non-blocking version of acquire().
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::tryacquire_read (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::tryacquire_read");
- return this->tryacquire (n, flags);
-}
-
-// Non-blocking version of acquire().
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::tryacquire_write (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::tryacquire_write");
- return this->tryacquire (n, flags);
-}
-
-// Increment ACE_SV_Semaphore by one. Dijkstra's V operation,
-// Tannenbaums UP operation.
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::release (u_short n, int flags) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::release");
- return this->op (1, n, flags);
-}
-
-ASYS_INLINE int
-ACE_SV_Semaphore_Simple::get_id (void) const
-{
- ACE_TRACE ("ACE_SV_Semaphore_Simple::get_id");
- return this->internal_id_;
-}
-
diff --git a/ace/SV_Shared_Memory.cpp b/ace/SV_Shared_Memory.cpp
deleted file mode 100644
index a0b0ebedca5..00000000000
--- a/ace/SV_Shared_Memory.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// SV_Shared_Memory.cpp
-// $Id$
-
-#include "ace/SV_Shared_Memory.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/SV_Shared_Memory.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, SV_Shared_Memory, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SV_Shared_Memory)
-
-void
-ACE_SV_Shared_Memory::dump (void) const
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::dump");
-}
-
-// Creates a shared memory segment of SIZE bytes and *does* attach to
-// this segment.
-
-int
-ACE_SV_Shared_Memory::open_and_attach (key_t external_id,
- size_t sz,
- int create,
- int perms,
- void *virtual_addr,
- int flags)
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::open_and_attach");
- if (this->open (external_id, sz, create, perms) == -1)
- return -1;
- else if (this->attach (virtual_addr, flags) == -1)
- return -1;
- else
- return 0;
-}
-
-// Constructor interface to this->open_and_attach () member function.
-
-ACE_SV_Shared_Memory::ACE_SV_Shared_Memory (key_t external_id,
- size_t sz,
- int create,
- int perms,
- void *virtual_addr,
- int flags)
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory");
- if (this->open_and_attach (external_id, sz, create,
- perms, virtual_addr, flags) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory")));
-}
-
-// The "do nothing" constructor.
-
-ACE_SV_Shared_Memory::ACE_SV_Shared_Memory (void)
- : internal_id_ (0),
- size_ (0),
- segment_ptr_ (0)
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory");
-}
-
-// Added this constructor to accept an internal id, the one generated
-// when a server constructs with the key IPC_PRIVATE. The client can
-// be passed ACE_SV_Shared_Memory::internal_id via a socket and call
-// this construtor to attach the existing segment. This prevents
-// having to hard-code a key in advance. Courtesy of Marvin Wolfthal
-// (maw@fsg.com).
-
-ACE_SV_Shared_Memory::ACE_SV_Shared_Memory (ACE_HANDLE int_id,
- int flags)
- : internal_id_ (int_id),
- size_ (0)
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory");
- if (this->attach (0, flags) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory")));
-}
diff --git a/ace/SV_Shared_Memory.h b/ace/SV_Shared_Memory.h
deleted file mode 100644
index 73b33d75c0b..00000000000
--- a/ace/SV_Shared_Memory.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// SV_Shared_Memory.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SV_SHARED_MEMORY_H
-#define ACE_SV_SHARED_MEMORY_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_SV_Shared_Memory
-{
- // = TITLE
- // This is a wrapper for System V shared memory.
-public:
- enum
- {
- ACE_CREATE = IPC_CREAT,
- ACE_OPEN = 0
- };
-
- // = Initialization and termination methods.
- ACE_SV_Shared_Memory (void);
- ACE_SV_Shared_Memory (key_t external_id,
- size_t size,
- int create,
- int perms = ACE_DEFAULT_FILE_PERMS,
- void *virtual_addr = 0,
- int flags = 0);
-
- ACE_SV_Shared_Memory (ACE_HANDLE internal_id,
- int flags = 0);
-
- int open (key_t external_id,
- size_t size,
- int create = ACE_SV_Shared_Memory::ACE_OPEN,
- int perms = ACE_DEFAULT_FILE_PERMS);
-
- int open_and_attach (key_t external_id,
- size_t size,
- int create = ACE_SV_Shared_Memory::ACE_OPEN,
- int perms = ACE_DEFAULT_FILE_PERMS,
- void *virtual_addr = 0,
- int flags = 0);
-
- int attach (void *virtual_addr = 0,
- int flags =0);
- // Attach this shared memory segment.
-
- int detach (void);
- // Detach this shared memory segment.
-
- int remove (void);
- // Remove this shared memory segment.
-
- int control (int cmd, void *buf);
- // Forward to underlying System V <shmctl>.
-
- // = Segment-related info.
- void *get_segment_ptr (void) const;
- int get_segment_size (void) const;
-
- ACE_HANDLE get_id (void) const;
- // Return the ID of the shared memory segment (i.e., an ACE_HANDLE).
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- enum
- {
- ALIGN_WORDB = 8 // Most restrictive alignment.
- };
-
- ACE_HANDLE internal_id_;
- // Internal identifier.
-
- int size_;
- // Size of the mapped segment.
-
- void *segment_ptr_;
- // Pointer to the beginning of the segment.
-
- int round_up (size_t len);
- // Round up to an appropriate page size.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/SV_Shared_Memory.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SV_SHARED_MEMORY_H */
diff --git a/ace/SV_Shared_Memory.i b/ace/SV_Shared_Memory.i
deleted file mode 100644
index 9fd4083ff95..00000000000
--- a/ace/SV_Shared_Memory.i
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// SV_Shared_Memory.i
-
-#include "ace/SV_Shared_Memory.h"
-
-ACE_INLINE int
-ACE_SV_Shared_Memory::round_up (size_t len)
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::round_up");
- return (len + ACE_SV_Shared_Memory::ALIGN_WORDB - 1) & ~(ACE_SV_Shared_Memory::ALIGN_WORDB - 1);
-}
-
-// Creates a shared memory segment of SIZE bytes. Does *not* attach
-// this memory segment...
-
-ACE_INLINE int
-ACE_SV_Shared_Memory::open (key_t external_id, size_t sz, int create, int perms)
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::open");
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG(perms);
- ACE_UNUSED_ARG(create);
- ACE_UNUSED_ARG(sz);
- ACE_UNUSED_ARG(external_id);
- ACE_NOTSUP_RETURN (-1);
-#else
- this->segment_ptr_ = 0;
- this->size_ = sz;
-
- this->internal_id_ = ACE_OS::shmget (external_id, sz, create | perms);
-
- return this->internal_id_ == -1 ? -1 : 0;
-#endif /* ACE_WIN32 */
-}
-
-// Attachs to the shared memory segment.
-
-ACE_INLINE int
-ACE_SV_Shared_Memory::attach (void *virtual_addr, int flags)
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::attach");
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG(flags);
- ACE_UNUSED_ARG(virtual_addr);
- ACE_NOTSUP_RETURN (-1);
-#else
- this->segment_ptr_ = ACE_OS::shmat (this->internal_id_, virtual_addr, flags);
- return this->segment_ptr_ == (void *) -1 ? -1 : 0;
-#endif /* ACE_WIN32 */
-}
-
-// Interface to the underlying shared memory control function.
-
-ACE_INLINE int
-ACE_SV_Shared_Memory::control (int cmd, void *buf)
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::control");
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG(cmd);
- ACE_UNUSED_ARG(buf);
-
- ACE_NOTSUP_RETURN (-1);
-#else
- return ACE_OS::shmctl (this->internal_id_, cmd, (struct shmid_ds *) buf);
-#endif /* ACE_WIN32 */
-}
-
-// The overall size of the segment.
-
-ACE_INLINE int
-ACE_SV_Shared_Memory::get_segment_size (void) const
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::get_segment_size");
- return this->size_;
-}
-
-// Removes the shared memory segment.
-
-ACE_INLINE int
-ACE_SV_Shared_Memory::remove (void)
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::remove");
-#if defined (ACE_WIN32)
- ACE_NOTSUP_RETURN (-1);
-#else
- return ACE_OS::shmctl (this->internal_id_, IPC_RMID, 0);
-#endif /* ACE_WIN32 */
-}
-
-// Detach the current binding between this->segment_ptr and the shared
-// memory segment.
-
-ACE_INLINE int
-ACE_SV_Shared_Memory::detach (void)
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::detach");
- return ACE_OS::shmdt (this->segment_ptr_);
-}
-
-ACE_INLINE void *
-ACE_SV_Shared_Memory::get_segment_ptr (void) const
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::get_segment_ptr");
- return this->segment_ptr_;
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_SV_Shared_Memory::get_id (void) const
-{
- ACE_TRACE ("ACE_SV_Shared_Memory::get_id");
- return this->internal_id_;
-}
diff --git a/ace/Sched_Params.cpp b/ace/Sched_Params.cpp
deleted file mode 100644
index e590119681c..00000000000
--- a/ace/Sched_Params.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Sched_Params.cpp
-//
-// = CREATION DATE
-// 28 January 1997
-//
-// = AUTHOR
-// David Levine
-//
-// ============================================================================
-
-#include "ace/Sched_Params.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Sched_Params.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Sched_Params, "$Id$")
-
-int
-ACE_Sched_Params::priority_min (const Policy policy,
- const int scope)
-{
-#if defined (ACE_HAS_PRIOCNTL) && defined (ACE_HAS_STHREADS)
- ACE_UNUSED_ARG (scope);
-
- // Assume that ACE_SCHED_OTHER indicates TS class, and that other
- // policies indicate RT class.
-
- if (policy == ACE_SCHED_OTHER)
- {
- // Get the priority class ID and attributes.
- pcinfo_t pcinfo;
- // The following is just to avoid Purify warnings about unitialized
- // memory reads.
- ACE_OS::memset (&pcinfo, 0, sizeof pcinfo);
- ACE_OS::strcpy (pcinfo.pc_clname, "TS");
-
- if (ACE_OS::priority_control (P_ALL /* ignored */,
- P_MYID /* ignored */,
- PC_GETCID,
- (char *) &pcinfo) == -1)
- // Just hope that priority range wasn't configured from -1
- // .. 1
- return -1;
-
- // OK, now we've got the class ID in pcinfo.pc_cid. In
- // addition, the maximum configured time-share priority is in
- // ((tsinfo_t *) pcinfo.pc_clinfo)->ts_maxupri. The minimum
- // priority is just the negative of that.
-
- return -((tsinfo_t *) pcinfo.pc_clinfo)->ts_maxupri;
- }
- else
- return 0;
-#elif defined (ACE_HAS_PTHREADS) && !defined(ACE_LACKS_SETSCHED)
-
- switch (scope)
- {
- case ACE_SCOPE_THREAD:
- switch (policy)
- {
- case ACE_SCHED_FIFO:
- return ACE_THR_PRI_FIFO_MIN;
- case ACE_SCHED_RR:
- return ACE_THR_PRI_RR_MIN;
-#if !defined (CHORUS) // SCHED_OTHRE and SCHED_RR have same value
- case ACE_SCHED_OTHER:
-#endif /* CHORUS */
- default:
- return ACE_THR_PRI_OTHER_MIN;
- }
-
- case ACE_SCOPE_PROCESS:
- default:
- switch (policy)
- {
- case ACE_SCHED_FIFO:
- return ACE_PROC_PRI_FIFO_MIN;
- case ACE_SCHED_RR:
- return ACE_PROC_PRI_RR_MIN;
-#if !defined (CHORUS) // SCHED_OTHRE and SCHED_RR have same value
- case ACE_SCHED_OTHER:
-#endif /* CHORUS */
- default:
- return ACE_PROC_PRI_OTHER_MIN;
- }
- }
-
-#elif defined (ACE_HAS_WTHREADS)
- ACE_UNUSED_ARG (policy);
- ACE_UNUSED_ARG (scope);
- return THREAD_PRIORITY_IDLE;
-#elif defined (VXWORKS)
- ACE_UNUSED_ARG (policy);
- ACE_UNUSED_ARG (scope);
- return 255;
-#else
- ACE_UNUSED_ARG (policy);
- ACE_UNUSED_ARG (scope);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_PRIOCNTL && defined (ACE_HAS_STHREADS) */
-}
-
-int
-ACE_Sched_Params::priority_max (const Policy policy,
- const int scope)
-{
-#if defined (ACE_HAS_PRIOCNTL) && defined (ACE_HAS_STHREADS)
- ACE_UNUSED_ARG (scope);
-
- // Assume that ACE_SCHED_OTHER indicates TS class, and that other
- // policies indicate RT class.
-
- // Get the priority class ID and attributes.
- pcinfo_t pcinfo;
- // The following is just to avoid Purify warnings about unitialized
- // memory reads.
- ACE_OS::memset (&pcinfo, 0, sizeof pcinfo);
- ACE_OS::strcpy (pcinfo.pc_clname,
- policy == ACE_SCHED_OTHER ? "TS" : "RT");
-
- if (ACE_OS::priority_control (P_ALL /* ignored */,
- P_MYID /* ignored */,
- PC_GETCID,
- (char *) &pcinfo) == -1)
- return -1;
-
- // OK, now we've got the class ID in pcinfo.pc_cid. In addition,
- // the maximum configured real-time priority is in ((rtinfo_t *)
- // pcinfo.pc_clinfo)->rt_maxpri, or similarly for the TS class.
-
- return policy == ACE_SCHED_OTHER
- ? ((tsinfo_t *) pcinfo.pc_clinfo)->ts_maxupri
- : ((rtinfo_t *) pcinfo.pc_clinfo)->rt_maxpri;
-#elif defined(ACE_HAS_PTHREADS) && !defined(ACE_LACKS_SETSCHED)
-
- switch (scope)
- {
- case ACE_SCOPE_THREAD:
- switch (policy)
- {
- case ACE_SCHED_FIFO:
- return ACE_THR_PRI_FIFO_MAX;
- case ACE_SCHED_RR:
- return ACE_THR_PRI_RR_MAX;
-#if !defined (CHORUS) // SCHED_OTHRE and SCHED_RR have same value
- case ACE_SCHED_OTHER:
-#endif /* CHORUS */
- default:
- return ACE_THR_PRI_OTHER_MAX;
- }
-
- case ACE_SCOPE_PROCESS:
- default:
- switch (policy)
- {
- case ACE_SCHED_FIFO:
- return ACE_PROC_PRI_FIFO_MAX;
- case ACE_SCHED_RR:
- return ACE_PROC_PRI_RR_MAX;
-#if !defined (CHORUS) // SCHED_OTHRE and SCHED_RR have same value
- case ACE_SCHED_OTHER:
-#endif /* CHORUS */
- default:
- return ACE_PROC_PRI_OTHER_MAX;
- }
- }
-
-#elif defined (ACE_HAS_WTHREADS)
- ACE_UNUSED_ARG (policy);
- ACE_UNUSED_ARG (scope);
- return THREAD_PRIORITY_TIME_CRITICAL;
-#elif defined (VXWORKS)
- ACE_UNUSED_ARG (policy);
- ACE_UNUSED_ARG (scope);
- return 0;
-#else
- ACE_UNUSED_ARG (policy);
- ACE_UNUSED_ARG (scope);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_PRIOCNTL && defined (ACE_HAS_STHREADS) */
-}
-
-int
-ACE_Sched_Params::next_priority (const Policy policy,
- const int priority,
- const int scope)
-{
-#if defined (VXWORKS)
- return priority > priority_max (policy, scope)
- ? priority - 1
- : priority_max (policy, scope);
-#elif defined (ACE_HAS_WTHREADS)
- ACE_UNUSED_ARG (policy);
- ACE_UNUSED_ARG (scope);
- switch (priority)
- {
- case THREAD_PRIORITY_IDLE:
- return THREAD_PRIORITY_LOWEST;
- case THREAD_PRIORITY_LOWEST:
- return THREAD_PRIORITY_BELOW_NORMAL;
- case THREAD_PRIORITY_BELOW_NORMAL:
- return THREAD_PRIORITY_NORMAL;
- case THREAD_PRIORITY_NORMAL:
- return THREAD_PRIORITY_ABOVE_NORMAL;
- case THREAD_PRIORITY_ABOVE_NORMAL:
- return THREAD_PRIORITY_HIGHEST;
- case THREAD_PRIORITY_HIGHEST:
- return THREAD_PRIORITY_TIME_CRITICAL;
- case THREAD_PRIORITY_TIME_CRITICAL:
- return THREAD_PRIORITY_TIME_CRITICAL;
- default:
- return priority; // unknown priority: should never get here
- }
-#elif defined(ACE_HAS_THREADS) && !defined(ACE_LACKS_SETSCHED)
- // including STHREADS, and PTHREADS
- const int max = priority_max (policy, scope);
- return priority < max ? priority + 1 : max;
-#else
- ACE_UNUSED_ARG (policy);
- ACE_UNUSED_ARG (scope);
- ACE_UNUSED_ARG (priority);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
-
-int
-ACE_Sched_Params::previous_priority (const Policy policy,
- const int priority,
- const int scope)
-{
-#if defined (VXWORKS)
- return priority < priority_min (policy, scope)
- ? priority + 1
- : priority_min (policy, scope);
-#elif defined (ACE_HAS_WTHREADS)
- ACE_UNUSED_ARG (policy);
- ACE_UNUSED_ARG (scope);
- switch (priority)
- {
- case THREAD_PRIORITY_IDLE:
- return THREAD_PRIORITY_IDLE;
- case THREAD_PRIORITY_LOWEST:
- return THREAD_PRIORITY_IDLE;
- case THREAD_PRIORITY_BELOW_NORMAL:
- return THREAD_PRIORITY_LOWEST;
- case THREAD_PRIORITY_NORMAL:
- return THREAD_PRIORITY_BELOW_NORMAL;
- case THREAD_PRIORITY_ABOVE_NORMAL:
- return THREAD_PRIORITY_NORMAL;
- case THREAD_PRIORITY_HIGHEST:
- return THREAD_PRIORITY_ABOVE_NORMAL;
- case THREAD_PRIORITY_TIME_CRITICAL:
- return THREAD_PRIORITY_HIGHEST;
- default:
- return priority; // unknown priority: should never get here
- }
-#elif defined (ACE_HAS_THREADS) && !defined(ACE_LACKS_SETSCHED)
- // including STHREADS and PTHREADS
- const int min = priority_min (policy, scope);
-
- return priority > min ? priority - 1 : min;
-#else
- ACE_UNUSED_ARG (policy);
- ACE_UNUSED_ARG (scope);
- ACE_UNUSED_ARG (priority);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_THREADS */
-}
diff --git a/ace/Sched_Params.h b/ace/Sched_Params.h
deleted file mode 100644
index c8f2a3a5f84..00000000000
--- a/ace/Sched_Params.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Sched_Params.h
-//
-// = CREATION DATE
-// 28 January 1997
-//
-// = AUTHOR
-// David Levine and Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef ACE_SCHED_PARAMS_H
-#define ACE_SCHED_PARAMS_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Sched_Params
-{
- // = TITLE
- // Container for scheduling-related parameters.
- //
- // = DESCRIPTION
- // ACE_Sched_Params are passed via <ACE_OS::sched_params> to the
- // OS to specify scheduling parameters. These parameters include
- // scheduling policy, such as FIFO (ACE_SCHED_FIFO), round-robin
- // (ACE_SCHED_RR), or an implementation-defined "OTHER"
- // (ACE_SCHED_OTHER), to which many systems default; priority;
- // and a time-slice quantum for round-robin scheduling. A
- // "scope" parameter specifies whether the ACE_Sched_Params
- // applies to the current process, current lightweight process
- // (LWP) (on Solaris), or current thread. Please see the "NOTE"
- // below about not all combinations of parameters being legal on
- // a particular platform.
- //
- // For the case of thread priorities, it is intended that
- // <ACE_OS::sched_params> usually be called from <main> before
- // any threads have been spawned. If spawned threads inherit
- // their parent's priority (I think that's the default behavior
- // for all of our platforms), then this sets the default base
- // priority. Individual thread priorities can be adjusted as
- // usual using <ACE_OS::thr_prio> or via the ACE_Thread
- // interface. See the parameter descriptions in the private:
- // section below.
- //
- // NOTE: this class does not do any checking of parameters. It
- // is just a container class. If it is constructed with values
- // that are not supported on a platform, the call to
- // <ACE_OS::sched_params> will fail by returning -1 with EINVAL
- // (available through <ACE_OS::last_error>).
-
- // NOTE: Solaris 2.5.x threads in the RT class must set the
- // priority of their LWP. The only way to do that through ACE is
- // for the RT thread itself to call <ACE_OS::thr_setprio> with
- // it's own priority.
-
- // OS Scheduling parameters are complicated and often confusing.
- // Many thanks to Thilo Kielmann
- // <kielmann@informatik.uni-siegen.de> for his careful review of
- // this class design, thoughtful comments, and assistance with
- // implementation, especially for PTHREADS platforms. Please
- // send any comments or corrections to the ACE developers.
-public:
- typedef int Policy;
-
- // = Initialization and termination methods.
- ACE_Sched_Params (const Policy policy,
- const ACE_Sched_Priority priority,
- const int scope = ACE_SCOPE_THREAD,
- const ACE_Time_Value &quantum = ACE_Time_Value::zero);
- // Constructor.
-
- ~ACE_Sched_Params (void);
- // Termination.
-
- // = Get/Set methods:
-
- // = Get/Set policy
- Policy policy (void) const;
- void policy (const Policy);
-
- // = Get/Set priority.
- ACE_Sched_Priority priority (void) const;
- void priority (const ACE_Sched_Priority);
-
- // = Get/Set scope.
- int scope (void) const;
- void scope(const int);
-
- // = Get/Set quantum.
- const ACE_Time_Value &quantum (void) const;
- void quantum (const ACE_Time_Value &);
-
- // = Accessors for OS-specific priorities.
- // These return priority values for ACE_SCHED_OTHER if the Policy value
- // is invalid.
- static int priority_min (const Policy,
- const int scope = ACE_SCOPE_THREAD);
- static int priority_max (const Policy,
- const int scope = ACE_SCOPE_THREAD);
-
- static int next_priority (const Policy,
- const int priority,
- const int scope = ACE_SCOPE_THREAD);
- // The next higher priority. "Higher" refers to scheduling priority,
- // not to the priority value itself. (On some platforms, higher scheduling
- // priority is indicated by a lower priority value.) If "priority" is
- // already the highest priority (for the specified policy), then it is
- // returned.
-
- static int previous_priority (const Policy,
- const int priority,
- const int scope = ACE_SCOPE_THREAD);
- // The previous, lower priority. "Lower" refers to scheduling priority,
- // not to the priority value itself. (On some platforms, lower scheduling
- // priority is indicated by a higher priority value.) If "priority" is
- // already the lowest priority (for the specified policy), then it is
- // returned.
-
-private:
- Policy policy_;
- // Scheduling policy.
-
- ACE_Sched_Priority priority_;
- // Default <priority_>: for setting the priority for the process, LWP,
- // or thread, as indicated by the scope_ parameter.
-
- int scope_;
- // <scope_> must be one of the following:
- // ACE_SCOPE_PROCESS: sets the scheduling policy for the
- // process, and the process priority. On some platforms,
- // such as Win32, the scheduling policy can _only_ be
- // set at process scope.
- // ACE_SCOPE_LWP: lightweight process scope, only used with
- // Solaris threads.
- // ACE_SCOPE_THREAD: sets the scheduling policy for the thread,
- // if the OS supports it, such as with Posix threads, and the
- // thread priority.
- // NOTE: I don't think that these are the same as POSIX
- // contention scope. POSIX users who are interested in,
- // and understand, contention scope will have to set it
- // by using system calls outside of ACE.
-
- ACE_Time_Value quantum_;
- // The <quantum_> is for time slicing. An ACE_Time_Value of 0 has
- // special significance: it means time-slicing is disabled; with
- // that, a thread that is running on a CPU will continue to run
- // until it blocks or is preempted. Currently ignored if the OS
- // doesn't directly support time slicing, such as on VxWorks, or
- // setting the quantum (can that be done on Win32?).
-};
-
-class ACE_Export ACE_Sched_Priority_Iterator
- // = TITLE
- // An iterator over the OS-defined scheduling priorities.
- //
- // = DESCRIPTION
- // The order of priorities (numeric value vs. importance) is OS
- // dependant, it can be the case that the priorities are not even
- // contigous. This class permits iteration over priorities using
- // the iterator pattern.
-{
-public:
- ACE_Sched_Priority_Iterator (const ACE_Sched_Params::Policy &policy,
- int scope = ACE_SCOPE_THREAD);
- // Initialize the iterator, the arguments define the scheduling
- // policy and scope for the priorities (see ACE_Sched_Param).
-
- ~ACE_Sched_Priority_Iterator (void);
- // Default dtor.
-
- int more (void) const;
- // Check if there are more priorities.
-
- int priority (void) const;
- // Return the current priority.
-
- void next (void);
- // Move to the next priority.
- // The iteration is from lowest to highest importance.
-
- const ACE_Sched_Params::Policy &policy (void) const;
- // Accessor for the scheduling policy over which we are iterating.
-
- int scope (void) const;
- // Accessor for the scheduling
-
-private:
- ACE_Sched_Params::Policy policy_;
- int scope_;
- // The Scheduling policy (FIFO, RR, etc.) and scheduling scope
- // (PROCESS, SYSTEM) we are iterating on.
-
- int priority_;
- // The current priority.
-
- int done_;
- // This is set to 1 when there are no more priorities. Cannot easily
- // compare against the highest priority on platforms were priorities
- // are non-contigous or descending.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Sched_Params.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SCHED_PARAMS_H */
diff --git a/ace/Sched_Params.i b/ace/Sched_Params.i
deleted file mode 100644
index 041f9cb1648..00000000000
--- a/ace/Sched_Params.i
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Sched_Params.i
-//
-// = CREATION DATE
-// 28 January 1997
-//
-// = AUTHOR
-// David Levine
-//
-// ============================================================================
-
-ACE_INLINE
-ACE_Sched_Params::ACE_Sched_Params (
- const Policy policy,
- const ACE_Sched_Priority priority,
- const int scope,
- const ACE_Time_Value &quantum)
- : policy_ (policy),
- priority_ (priority),
- scope_ (scope),
- quantum_ (quantum)
-{
-}
-
-ACE_INLINE ACE_Sched_Params::~ACE_Sched_Params (void)
-{
-}
-
-ACE_INLINE ACE_Sched_Params::Policy
-ACE_Sched_Params::policy (void) const
-{
- return this->policy_;
-}
-
-ACE_INLINE void
-ACE_Sched_Params::policy (const ACE_Sched_Params::Policy policy)
-{
- this->policy_ = policy;
-}
-
-ACE_INLINE ACE_Sched_Priority
-ACE_Sched_Params::priority (void) const
-{
- return this->priority_;
-}
-
-ACE_INLINE void
-ACE_Sched_Params::priority (const ACE_Sched_Priority priority)
-{
- this->priority_ = priority;
-}
-
-ACE_INLINE int
-ACE_Sched_Params::scope (void) const
-{
- return this->scope_;
-}
-
-ACE_INLINE void
-ACE_Sched_Params::scope (const int scope)
-{
- this->scope_ = scope;
-}
-
-ACE_INLINE const ACE_Time_Value &
-ACE_Sched_Params::quantum (void) const
-{
- return this->quantum_;
-}
-
-ACE_INLINE void
-ACE_Sched_Params::quantum (const ACE_Time_Value &quant)
-{
- this->quantum_ = quant;
-}
-
-ACE_INLINE const ACE_Sched_Params::Policy &
-ACE_Sched_Priority_Iterator::policy (void) const
-{
- return this->policy_;
-}
-
-ACE_INLINE int
-ACE_Sched_Priority_Iterator::scope (void) const
-{
- return this->scope_;
-}
-
-ACE_INLINE
-ACE_Sched_Priority_Iterator::ACE_Sched_Priority_Iterator (const ACE_Sched_Params::Policy &policy,
- int scope)
- : policy_ (policy),
- scope_ (scope),
- priority_ (0),
- done_ (0)
-{
- priority_ = ACE_Sched_Params::priority_min (this->policy (), this->scope ());
-}
-
-ACE_INLINE
-ACE_Sched_Priority_Iterator::~ACE_Sched_Priority_Iterator (void)
-{
-}
-
-ACE_INLINE int
-ACE_Sched_Priority_Iterator::more (void) const
-{
- return !this->done_;
-}
-
-ACE_INLINE int
-ACE_Sched_Priority_Iterator::priority (void) const
-{
- return this->priority_;
-}
-
-ACE_INLINE void
-ACE_Sched_Priority_Iterator::next (void)
-{
- if (this->done_)
- return;
-
- int old_priority = this->priority_;
- priority_ = ACE_Sched_Params::next_priority (this->policy (),
- this->priority (),
- this->scope ());
- this->done_ = old_priority == priority_;
-}
diff --git a/ace/Select_Reactor.cpp b/ace/Select_Reactor.cpp
deleted file mode 100644
index fe5be69789f..00000000000
--- a/ace/Select_Reactor.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id$
-
-#include "ace/Select_Reactor.h"
-
-ACE_RCSID(ace, Select_Reactor, "$Id$")
-
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# if defined (ACE_SELECT_REACTOR_HAS_DEADLOCK_DETECTION)
-template class ACE_Select_Reactor_Token_T<ACE_Local_Mutex>;
-template class ACE_Select_Reactor_T< ACE_Select_Reactor_Token_T<ACE_Local_Mutex> >;
-template class ACE_Lock_Adapter< ACE_Select_Reactor_Token_T<ACE_Local_Mutex> >;
-template class ACE_Guard< ACE_Select_Reactor_Token_T<ACE_Local_Mutex> >;
-# else
-template class ACE_Select_Reactor_Token_T<ACE_Token>;
-template class ACE_Select_Reactor_T< ACE_Select_Reactor_Token_T<ACE_Token> >;
-template class ACE_Lock_Adapter< ACE_Select_Reactor_Token_T<ACE_Token> >;
-template class ACE_Guard< ACE_Select_Reactor_Token_T<ACE_Token> >;
-# endif /* ACE_SELECT_REACTOR_HAS_DEADLOCK_DETECTION */
-# else
-template class ACE_Select_Reactor_Token_T<ACE_Noop_Token>;
-template class ACE_Select_Reactor_T< ACE_Select_Reactor_Token_T<ACE_Noop_Token> >;
-template class ACE_Lock_Adapter< ACE_Select_Reactor_Token_T<ACE_Noop_Token> >;
-# endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-# if defined (ACE_SELECT_REACTOR_HAS_DEADLOCK_DETECTION)
-# pragma instantiate ACE_Select_Reactor_Token_T<ACE_Local_Mutex>
-# pragma instantiate ACE_Select_Reactor_T< ACE_Select_Reactor_Token_T<ACE_Local_Mutex> >
-# pragma instantiate ACE_Lock_Adapter< ACE_Select_Reactor_Token_T<ACE_Local_Mutex> >
-# pragma instantiate ACE_Guard< ACE_Select_Reactor_Token_T<ACE_Local_Mutex> >
-# else
-# pragma instantiate ACE_Select_Reactor_Token_T<ACE_Token>
-# pragma instantiate ACE_Select_Reactor_T< ACE_Select_Reactor_Token_T<ACE_Token> >
-# pragma instantiate ACE_Lock_Adapter< ACE_Select_Reactor_Token_T<ACE_Token> >
-# pragma instantiate ACE_Guard< ACE_Select_Reactor_Token_T<ACE_Token> >
-# endif /* ACE_SELECT_REACTOR_HAS_DEADLOCK_DETECTION */
-# else
-# pragma instantiate ACE_Select_Reactor_Token_T<ACE_Noop_Token>
-# pragma instantiate ACE_Select_Reactor_T< ACE_Select_Reactor_Token_T<ACE_Noop_Token> >
-# pragma instantiate ACE_Lock_Adapter< ACE_Select_Reactor_Token_T<ACE_Noop_Token> >
-# endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Select_Reactor.h b/ace/Select_Reactor.h
deleted file mode 100644
index 8d9e00576ae..00000000000
--- a/ace/Select_Reactor.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Select_Reactor.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SELECT_REACTOR_H
-#define ACE_SELECT_REACTOR_H
-#include "ace/pre.h"
-
-#include "ace/Select_Reactor_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-#if defined (ACE_SELECT_REACTOR_HAS_DEADLOCK_DETECTION)
-#include "ace/Local_Tokens.h"
-typedef ACE_Select_Reactor_Token_T<ACE_Local_Mutex> ACE_Select_Reactor_Token;
-#else
-typedef ACE_Select_Reactor_Token_T<ACE_Token> ACE_Select_Reactor_Token;
-#endif /* ACE_SELECT_REACTOR_HAS_DEADLOCK_DETECTION */
-#else
-typedef ACE_Select_Reactor_Token_T<ACE_Noop_Token> ACE_Select_Reactor_Token;
-#endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */
-
-typedef ACE_Select_Reactor_T<ACE_Select_Reactor_Token> ACE_Select_Reactor;
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Guard< ACE_Select_Reactor_Token_T<ACE_Noop_Token> >
-{
- // = TITLE
- // Template specialization of <ACE_Guard> for the
- // <ACE_Null_Mutex>.
- //
- // = DESCRIPTION
- // This specialization is useful since it helps to speedup
- // performance of the "Null_Mutex" considerably.
-public:
- // = Initialization and termination methods.
- ACE_Guard (ACE_Select_Reactor_Token_T<ACE_Noop_Token> &) {}
- ACE_Guard (ACE_Select_Reactor_Token_T<ACE_Noop_Token> &, int) {}
- ~ACE_Guard (void) {}
-
- int acquire (void) { return 0; }
- int tryacquire (void) { return 0; }
- int release (void) { return 0; }
- int locked (void) { return 1; }
- int remove (void) { return 0; }
- void dump (void) const {}
-
-private:
- // = Prevent assignment and initialization.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Guard< ACE_Select_Reactor_Token_T<ACE_Noop_Token> > &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Guard (const ACE_Guard< ACE_Select_Reactor_Token_T<ACE_Noop_Token> > &))
-};
-
-#include "ace/post.h"
-#endif /* ACE_SELECT_REACTOR_H */
diff --git a/ace/Select_Reactor_Base.cpp b/ace/Select_Reactor_Base.cpp
deleted file mode 100644
index baca4ca60f3..00000000000
--- a/ace/Select_Reactor_Base.cpp
+++ /dev/null
@@ -1,944 +0,0 @@
-// $Id$
-
-#include "ace/Select_Reactor_Base.h"
-#include "ace/Reactor.h"
-#include "ace/Thread.h"
-#include "ace/Synch_T.h"
-#include "ace/SOCK_Acceptor.h"
-#include "ace/SOCK_Connector.h"
-#include "ace/Timer_Heap.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Select_Reactor_Base.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Select_Reactor_Base, "$Id$")
-
-#if defined (ACE_WIN32)
-#define ACE_SELECT_REACTOR_HANDLE(H) (this->event_handlers_[(H)].handle_)
-#define ACE_SELECT_REACTOR_EVENT_HANDLER(THIS,H) ((THIS)->event_handlers_[(H)].event_handler_)
-#else
-#define ACE_SELECT_REACTOR_HANDLE(H) (H)
-#define ACE_SELECT_REACTOR_EVENT_HANDLER(THIS,H) ((THIS)->event_handlers_[(H)])
-#endif /* ACE_WIN32 */
-
-// Performs sanity checking on the ACE_HANDLE.
-
-int
-ACE_Select_Reactor_Handler_Repository::invalid_handle (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::invalid_handle");
-#if defined (ACE_WIN32)
- // It's too expensive to perform more exhaustive validity checks on
- // Win32 due to the way that they implement SOCKET HANDLEs.
- if (handle == ACE_INVALID_HANDLE)
-#else /* !ACE_WIN32 */
- if (handle < 0 || handle >= this->max_size_)
-#endif /* ACE_WIN32 */
- {
- errno = EINVAL;
- return 1;
- }
- else
- return 0;
-}
-
-// Performs sanity checking on the ACE_HANDLE.
-
-int
-ACE_Select_Reactor_Handler_Repository::handle_in_range (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::handle_in_range");
-#if defined (ACE_WIN32)
- // It's too expensive to perform more exhaustive validity checks on
- // Win32 due to the way that they implement SOCKET HANDLEs.
- if (handle != ACE_INVALID_HANDLE)
-#else /* !ACE_WIN32 */
- if (handle >= 0 && handle < this->max_handlep1_)
-#endif /* ACE_WIN32 */
- return 1;
- else
- {
- errno = EINVAL;
- return 0;
- }
-}
-
-size_t
-ACE_Select_Reactor_Handler_Repository::max_handlep1 (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::max_handlep1");
-
- return this->max_handlep1_;
-}
-
-int
-ACE_Select_Reactor_Handler_Repository::open (size_t size)
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::open");
- this->max_size_ = size;
- this->max_handlep1_ = 0;
-
-#if defined (ACE_WIN32)
- // Try to allocate the memory.
- ACE_NEW_RETURN (this->event_handlers_,
- ACE_Event_Tuple[size],
- -1);
-
- // Initialize the ACE_Event_Handler * to { ACE_INVALID_HANDLE, 0 }.
- for (size_t h = 0; h < size; h++)
- {
- ACE_SELECT_REACTOR_HANDLE (h) = ACE_INVALID_HANDLE;
- ACE_SELECT_REACTOR_EVENT_HANDLER (this, h) = 0;
- }
-#else
- // Try to allocate the memory.
- ACE_NEW_RETURN (this->event_handlers_,
- ACE_Event_Handler *[size],
- -1);
-
- // Initialize the ACE_Event_Handler * to NULL.
- for (size_t h = 0; h < size; h++)
- ACE_SELECT_REACTOR_EVENT_HANDLER (this, h) = 0;
-#endif /* ACE_WIN32 */
-
- // Check to see if the user is asking for too much and fail in this
- // case.
- if (size > FD_SETSIZE)
- {
- errno = ERANGE;
- return -1;
- }
- else
- {
- // Try to increase the number of handles if <size> is greater than
- // the current limit. We ignore the return value here because this
- // is more of a "warning" not an error.
- (void) ACE::set_handle_limit (size);
- return 0;
- }
-}
-
-// Initialize a repository of the appropriate <size>.
-
-ACE_Select_Reactor_Handler_Repository::ACE_Select_Reactor_Handler_Repository (ACE_Select_Reactor_Impl &select_reactor)
- : select_reactor_ (select_reactor),
- max_size_ (0),
- max_handlep1_ (0),
- event_handlers_ (0)
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::ACE_Select_Reactor_Handler_Repository");
-}
-
-int
-ACE_Select_Reactor_Handler_Repository::unbind_all (void)
-{
- // Unbind all of the <handle, ACE_Event_Handler>s.
- for (int handle = 0;
- handle < this->max_handlep1_;
- handle++)
- this->unbind (ACE_SELECT_REACTOR_HANDLE (handle),
- ACE_Event_Handler::ALL_EVENTS_MASK);
-
- return 0;
-}
-
-int
-ACE_Select_Reactor_Handler_Repository::close (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::close");
-
- if (this->event_handlers_ != 0)
- {
- this->unbind_all ();
-
- delete [] this->event_handlers_;
- this->event_handlers_ = 0;
- }
- return 0;
-}
-
-// Return the <ACE_Event_Handler *> associated with the <handle>.
-
-ACE_Event_Handler *
-ACE_Select_Reactor_Handler_Repository::find (ACE_HANDLE handle,
- size_t *index_p)
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::find");
-
- ACE_Event_Handler *eh = 0;
- ssize_t i;
-
- // Only bother to search for the <handle> if it's in range.
- if (this->handle_in_range (handle))
- {
-#if defined (ACE_WIN32)
- i = 0;
-
- for (; i < this->max_handlep1_; i++)
- if (ACE_SELECT_REACTOR_HANDLE (i) == handle)
- {
- eh = ACE_SELECT_REACTOR_EVENT_HANDLER (this, i);
- break;
- }
-#else
- i = handle;
-
- eh = ACE_SELECT_REACTOR_EVENT_HANDLER (this, handle);
-#endif /* ACE_WIN32 */
- }
- else
- // g++ can't figure out that <i> won't be used below if the handle
- // is out of range, so keep it happy by defining <i> here . . .
- i = 0;
-
- if (eh != 0)
- {
- if (index_p != 0)
- *index_p = i;
- }
- else
- errno = ENOENT;
-
- return eh;
-}
-
-// Bind the <ACE_Event_Handler *> to the <ACE_HANDLE>.
-
-int
-ACE_Select_Reactor_Handler_Repository::bind (ACE_HANDLE handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::bind");
-
- if (handle == ACE_INVALID_HANDLE)
- handle = event_handler->get_handle ();
-
- if (this->invalid_handle (handle))
- return -1;
-
-#if defined (ACE_WIN32)
- int assigned_slot = -1;
-
- for (ssize_t i = 0; i < this->max_handlep1_; i++)
- {
- // Found it, so let's just reuse this location.
- if (ACE_SELECT_REACTOR_HANDLE (i) == handle)
- {
- assigned_slot = i;
- break;
- }
- // Here's the first free slot, so let's take it.
- else if (ACE_SELECT_REACTOR_HANDLE (i) == ACE_INVALID_HANDLE
- && assigned_slot == -1)
- assigned_slot = i;
- }
-
- if (assigned_slot > -1)
- // We found a free spot, let's reuse it.
- {
- ACE_SELECT_REACTOR_HANDLE (assigned_slot) = handle;
- ACE_SELECT_REACTOR_EVENT_HANDLER (this, assigned_slot) = event_handler;
- }
- else if (this->max_handlep1_ < this->max_size_)
- {
- // Insert at the end of the active portion.
- ACE_SELECT_REACTOR_HANDLE (this->max_handlep1_) = handle;
- ACE_SELECT_REACTOR_EVENT_HANDLER (this, this->max_handlep1_) = event_handler;
- this->max_handlep1_++;
- }
- else
- {
- // No more room at the inn!
- errno = ENOMEM;
- return -1;
- }
-#else
- ACE_SELECT_REACTOR_EVENT_HANDLER (this, handle) = event_handler;
-
- if (this->max_handlep1_ < handle + 1)
- this->max_handlep1_ = handle + 1;
-#endif /* ACE_WIN32 */
-
- // Add the <mask> for this <handle> in the Select_Reactor's wait_set.
- this->select_reactor_.bit_ops (handle,
- mask,
- this->select_reactor_.wait_set_,
- ACE_Reactor::ADD_MASK);
-
- // Note the fact that we've changed the state of the <wait_set_>,
- // which is used by the dispatching loop to determine whether it can
- // keep going or if it needs to reconsult select().
- this->select_reactor_.state_changed_ = 1;
-
- return 0;
-}
-
-// Remove the binding of <ACE_HANDLE>.
-
-int
-ACE_Select_Reactor_Handler_Repository::unbind (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::unbind");
-
- size_t slot;
- ACE_Event_Handler *eh = this->find (handle, &slot);
-
- if (eh == 0)
- return -1;
-
- // Clear out the <mask> bits in the Select_Reactor's wait_set.
- this->select_reactor_.bit_ops (handle,
- mask,
- this->select_reactor_.wait_set_,
- ACE_Reactor::CLR_MASK);
-
- // And suspend_set.
- this->select_reactor_.bit_ops (handle,
- mask,
- this->select_reactor_.suspend_set_,
- ACE_Reactor::CLR_MASK);
-
- // Note the fact that we've changed the state of the <wait_set_>,
- // which is used by the dispatching loop to determine whether it can
- // keep going or if it needs to reconsult select().
- this->select_reactor_.state_changed_ = 1;
-
- // Close down the <Event_Handler> unless we've been instructed not
- // to.
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::DONT_CALL) == 0)
- eh->handle_close (handle, mask);
-
- // If there are no longer any outstanding events on this <handle>
- // then we can totally shut down the Event_Handler.
- if (this->select_reactor_.wait_set_.rd_mask_.is_set (handle) == 0
- && this->select_reactor_.wait_set_.wr_mask_.is_set (handle) == 0
- && this->select_reactor_.wait_set_.ex_mask_.is_set (handle) == 0)
-#if defined (ACE_WIN32)
- {
- ACE_SELECT_REACTOR_HANDLE (slot) = ACE_INVALID_HANDLE;
- ACE_SELECT_REACTOR_EVENT_HANDLER (this, slot) = 0;
-
- if (this->max_handlep1_ == (int) slot + 1)
- {
- // We've deleted the last entry (i.e., i + 1 == the current
- // size of the array), so we need to figure out the last
- // valid place in the array that we should consider in
- // subsequent searches.
-
- int i;
-
- for (i = this->max_handlep1_ - 1;
- i >= 0 && ACE_SELECT_REACTOR_HANDLE (i) == ACE_INVALID_HANDLE;
- i--)
- continue;
-
- this->max_handlep1_ = i + 1;
- }
- }
-#else
- {
- ACE_SELECT_REACTOR_EVENT_HANDLER (this, handle) = 0;
-
- if (this->max_handlep1_ == handle + 1)
- {
- // We've deleted the last entry, so we need to figure out
- // the last valid place in the array that is worth looking
- // at.
- ACE_HANDLE wait_rd_max = this->select_reactor_.wait_set_.rd_mask_.max_set ();
- ACE_HANDLE wait_wr_max = this->select_reactor_.wait_set_.wr_mask_.max_set ();
- ACE_HANDLE wait_ex_max = this->select_reactor_.wait_set_.ex_mask_.max_set ();
-
- ACE_HANDLE suspend_rd_max = this->select_reactor_.suspend_set_.rd_mask_.max_set ();
- ACE_HANDLE suspend_wr_max = this->select_reactor_.suspend_set_.wr_mask_.max_set ();
- ACE_HANDLE suspend_ex_max = this->select_reactor_.suspend_set_.ex_mask_.max_set ();
-
- // Compute the maximum of six values.
- this->max_handlep1_ = wait_rd_max;
- if (this->max_handlep1_ < wait_wr_max)
- this->max_handlep1_ = wait_wr_max;
- if (this->max_handlep1_ < wait_ex_max)
- this->max_handlep1_ = wait_ex_max;
-
- if (this->max_handlep1_ < suspend_rd_max)
- this->max_handlep1_ = suspend_rd_max;
- if (this->max_handlep1_ < suspend_wr_max)
- this->max_handlep1_ = suspend_wr_max;
- if (this->max_handlep1_ < suspend_ex_max)
- this->max_handlep1_ = suspend_ex_max;
-
- this->max_handlep1_++;
- }
- }
-#endif /* ACE_WIN32 */
-
- return 0;
-}
-
-ACE_Select_Reactor_Handler_Repository_Iterator::ACE_Select_Reactor_Handler_Repository_Iterator
- (const ACE_Select_Reactor_Handler_Repository *s)
- : rep_ (s),
- current_ (-1)
-{
- this->advance ();
-}
-
-// Pass back the <next_item> that hasn't been seen in the Set.
-// Returns 0 when all items have been seen, else 1.
-
-int
-ACE_Select_Reactor_Handler_Repository_Iterator::next (ACE_Event_Handler *&next_item)
-{
- int result = 1;
-
- if (this->current_ >= this->rep_->max_handlep1_)
- result = 0;
- else
- next_item = ACE_SELECT_REACTOR_EVENT_HANDLER (this->rep_,
- this->current_);
- return result;
-}
-
-int
-ACE_Select_Reactor_Handler_Repository_Iterator::done (void) const
-{
- return this->current_ >= this->rep_->max_handlep1_;
-}
-
-// Move forward by one element in the set.
-
-int
-ACE_Select_Reactor_Handler_Repository_Iterator::advance (void)
-{
- if (this->current_ < this->rep_->max_handlep1_)
- this->current_++;
-
- while (this->current_ < this->rep_->max_handlep1_)
- if (ACE_SELECT_REACTOR_EVENT_HANDLER (this->rep_, this->current_) != 0)
- return 1;
- else
- this->current_++;
-
- return this->current_ < this->rep_->max_handlep1_;
-}
-
-// Dump the state of an object.
-
-void
-ACE_Select_Reactor_Handler_Repository_Iterator::dump (void) const
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository_Iterator::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("rep_ = %u"), this->rep_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("current_ = %d"), this->current_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_Select_Reactor_Handler_Repository::dump (void) const
-{
- ACE_TRACE ("ACE_Select_Reactor_Handler_Repository::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%t) max_handlep1_ = %d, max_size_ = %d\n"),
- this->max_handlep1_, this->max_size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("[")));
-
- ACE_Event_Handler *eh = 0;
-
- for (ACE_Select_Reactor_Handler_Repository_Iterator iter (this);
- iter.next (eh) != 0;
- iter.advance ())
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" (eh = %x, eh->handle_ = %d)"),
- eh, eh->get_handle ()));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" ]")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Select_Reactor_Handler_Repository_Iterator)
-
-ACE_Select_Reactor_Notify::ACE_Select_Reactor_Notify (void)
- : max_notify_iterations_ (-1)
-{
-}
-
-void
-ACE_Select_Reactor_Notify::max_notify_iterations (int iterations)
-{
- // Must always be > 0 or < 0 to optimize the loop exit condition.
- if (iterations == 0)
- iterations = 1;
-
- this->max_notify_iterations_ = iterations;
-}
-
-int
-ACE_Select_Reactor_Notify::max_notify_iterations (void)
-{
- return this->max_notify_iterations_;
-}
-
-void
-ACE_Select_Reactor_Notify::dump (void) const
-{
- ACE_TRACE ("ACE_Select_Reactor_Notify::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("select_reactor_ = %x"), this->select_reactor_));
- this->notification_pipe_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-int
-ACE_Select_Reactor_Notify::open (ACE_Reactor_Impl *r,
- ACE_Timer_Queue *,
- int disable_notify_pipe)
-{
- ACE_TRACE ("ACE_Select_Reactor_Notify::open");
-
- if (disable_notify_pipe == 0)
- {
- this->select_reactor_ =
- ACE_dynamic_cast (ACE_Select_Reactor_Impl *, r);
-
- if (select_reactor_ == 0)
- {
- errno = EINVAL;
- return -1;
- }
-
- if (this->notification_pipe_.open () == -1)
- return -1;
-#if defined (F_SETFD)
- ACE_OS::fcntl (this->notification_pipe_.read_handle (), F_SETFD, 1);
- ACE_OS::fcntl (this->notification_pipe_.write_handle (), F_SETFD, 1);
-#endif /* F_SETFD */
-
-#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE)
- ACE_Notification_Buffer *temp;
-
- ACE_NEW_RETURN (temp,
- ACE_Notification_Buffer[ACE_REACTOR_NOTIFICATION_ARRAY_SIZE],
- -1);
-
- if (this->alloc_queue_.enqueue_head (temp) == -1)
- return -1;
-
- for (size_t i = 0; i < ACE_REACTOR_NOTIFICATION_ARRAY_SIZE; i++)
- if (free_queue_.enqueue_head (temp + i) == -1)
- return -1;
-
-#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */
-
- // There seems to be a Win32 bug with this... Set this into
- // non-blocking mode.
- if (ACE::set_flags (this->notification_pipe_.read_handle (),
- ACE_NONBLOCK) == -1)
- return -1;
- else
- return this->select_reactor_->register_handler
- (this->notification_pipe_.read_handle (),
- this,
- ACE_Event_Handler::READ_MASK);
- }
- else
- {
- this->select_reactor_ = 0;
- return 0;
- }
-}
-
-int
-ACE_Select_Reactor_Notify::close (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_Notify::close");
-
-#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE)
- // Free up the dynamically allocated resources.
- ACE_Notification_Buffer **b;
-
- for (ACE_Unbounded_Queue_Iterator<ACE_Notification_Buffer *> alloc_iter (this->alloc_queue_);
- alloc_iter.next (b) != 0;
- alloc_iter.advance ())
- {
- delete [] *b;
- *b = 0;
- }
-
- this->alloc_queue_.reset ();
- this->notify_queue_.reset ();
- this->free_queue_.reset ();
-#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */
-
- return this->notification_pipe_.close ();
-}
-
-ssize_t
-ACE_Select_Reactor_Notify::notify (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Select_Reactor_Notify::notify");
-
- // Just consider this method a "no-op" if there's no
- // <ACE_Select_Reactor> configured.
- if (this->select_reactor_ == 0)
- return 0;
- else
- {
-#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE)
- ACE_Notification_Buffer buffer (eh, mask);
- int notification_required = 0;
-
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->notify_queue_lock_, -1);
-
- // No pending notifications.
- if (this->notify_queue_.is_empty ())
- notification_required = 1;
-
- ACE_Notification_Buffer *temp = 0;
-
- if (free_queue_.dequeue_head (temp) == -1)
- {
- // Grow the queue of available buffers.
- ACE_Notification_Buffer *temp1;
-
- ACE_NEW_RETURN (temp1,
- ACE_Notification_Buffer[ACE_REACTOR_NOTIFICATION_ARRAY_SIZE],
- -1);
-
- if (this->alloc_queue_.enqueue_head (temp1) == -1)
- return -1;
-
- // Start at 1 and enqueue only
- // (ACE_REACTOR_NOTIFICATION_ARRAY_SIZE - 1) elements since
- // the first one will be used right now.
- for (size_t i = 1;
- i < ACE_REACTOR_NOTIFICATION_ARRAY_SIZE;
- i++)
- this->free_queue_.enqueue_head (temp1 + i);
-
- temp = temp1;
- }
-
- ACE_ASSERT (temp != 0);
- *temp = buffer;
-
- if (notify_queue_.enqueue_tail (temp) == -1)
- return -1;
-
- if (notification_required)
- {
- ssize_t n = ACE::send (this->notification_pipe_.write_handle (),
- (char *) &buffer,
- sizeof buffer,
- timeout);
- if (n == -1)
- return -1;
- }
- return 0;
-#else
- ACE_Notification_Buffer buffer (eh, mask);
-
- ssize_t n = ACE::send (this->notification_pipe_.write_handle (),
- (char *) &buffer,
- sizeof buffer,
- timeout);
- if (n == -1)
- return -1;
- else
- return 0;
-#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */
- }
-}
-
-// Handles pending threads (if any) that are waiting to unblock the
-// Select_Reactor.
-
-int
-ACE_Select_Reactor_Notify::dispatch_notifications (int &number_of_active_handles,
- ACE_Handle_Set &rd_mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_Notify::handle_notification");
-
- ACE_HANDLE read_handle =
- this->notification_pipe_.read_handle ();
-
- if (read_handle != ACE_INVALID_HANDLE
- && rd_mask.is_set (read_handle))
- {
- number_of_active_handles--;
- rd_mask.clr_bit (read_handle);
- return this->handle_input (read_handle);
- }
- else
- return 0;
-}
-
-// Special trick to unblock <select> when updates occur in somewhere
-// other than the main <ACE_Select_Reactor> thread. All we do is
-// write data to a pipe that the <ACE_Select_Reactor> is listening on.
-// Thanks to Paul Stephenson for suggesting this approach.
-
-int
-ACE_Select_Reactor_Notify::handle_input (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_Select_Reactor_Notify::handle_input");
- // Precondition: this->select_reactor_.token_.current_owner () ==
- // ACE_Thread::self ();
-
- ACE_Notification_Buffer buffer;
- ssize_t n;
- int number_dispatched = 0;
-
- while ((n = ACE::recv (handle, (char *) &buffer, sizeof buffer)) > 0)
- {
- // Check to see if we've got a short read.
- if (n != sizeof buffer)
- {
- ssize_t remainder = sizeof buffer - n;
-
- // If so, try to recover by reading the remainder. If this
- // doesn't work we're in big trouble since the input stream
- // won't be aligned correctly. I'm not sure quite what to
- // do at this point. It's probably best just to return -1.
- if (ACE::recv (handle,
- ((char *) &buffer) + n,
- remainder) != remainder)
- return -1;
- }
-
-#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE)
- // Dispatch all messages that are in the <notify_queue_>.
- for (;;)
- {
- {
- // We acquire the lock in a block to make sure we're not
- // holding the lock while delivering callbacks...
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->notify_queue_lock_, -1);
-
- ACE_Notification_Buffer *temp;
-
- if (notify_queue_.is_empty ())
- break;
- else if (notify_queue_.dequeue_head (temp) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("dequeue_head")),
- -1);
- buffer = *temp;
- if (free_queue_.enqueue_head (temp) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("enqueue_head")),
- -1);
- }
-
- // If eh == 0 then another thread is unblocking the
- // <ACE_Select_Reactor> to update the <ACE_Select_Reactor>'s
- // internal structures. Otherwise, we need to dispatch the
- // appropriate handle_* method on the <ACE_Event_Handler>
- // pointer we've been passed.
- if (buffer.eh_ != 0)
- {
- int result = 0;
-
- switch (buffer.mask_)
- {
- case ACE_Event_Handler::READ_MASK:
- case ACE_Event_Handler::ACCEPT_MASK:
- result = buffer.eh_->handle_input (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::WRITE_MASK:
- result = buffer.eh_->handle_output (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::EXCEPT_MASK:
- result = buffer.eh_->handle_exception (ACE_INVALID_HANDLE);
- break;
- default:
- // Should we bail out if we get an invalid mask?
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("invalid mask = %d\n"), buffer.mask_));
- }
- if (result == -1)
- buffer.eh_->handle_close (ACE_INVALID_HANDLE,
- ACE_Event_Handler::EXCEPT_MASK);
- }
- }
-#else
- // If eh == 0 then another thread is unblocking the
- // <ACE_Select_Reactor> to update the <ACE_Select_Reactor>'s
- // internal structures. Otherwise, we need to dispatch the
- // appropriate handle_* method on the <ACE_Event_Handler>
- // pointer we've been passed.
- if (buffer.eh_ != 0)
- {
- int result = 0;
-
- switch (buffer.mask_)
- {
- case ACE_Event_Handler::READ_MASK:
- case ACE_Event_Handler::ACCEPT_MASK:
- result = buffer.eh_->handle_input (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::WRITE_MASK:
- result = buffer.eh_->handle_output (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::EXCEPT_MASK:
- result = buffer.eh_->handle_exception (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::QOS_MASK:
- result = buffer.eh_->handle_qos (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::GROUP_QOS_MASK:
- result = buffer.eh_->handle_group_qos (ACE_INVALID_HANDLE);
- break;
- default:
- // Should we bail out if we get an invalid mask?
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("invalid mask = %d\n"),
- buffer.mask_));
- }
- if (result == -1)
- buffer.eh_->handle_close (ACE_INVALID_HANDLE,
- ACE_Event_Handler::EXCEPT_MASK);
- }
-
-#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */
- number_dispatched++;
-
- // Bail out if we've reached the <notify_threshold_>. Note that
- // by default <notify_threshold_> is -1, so we'll loop until all
- // the notifications in the pipe have been dispatched.
- if (number_dispatched == this->max_notify_iterations_)
- break;
- }
-
- // Reassign number_dispatched to -1 if things have gone seriously
- // wrong.
- if (n <= 0 && (errno != EWOULDBLOCK && errno != EAGAIN))
- number_dispatched = -1;
-
- // Enqueue ourselves into the list of waiting threads. When we
- // reacquire the token we'll be off and running again with ownership
- // of the token. The postcondition of this call is that
- // <select_reactor_.token_.current_owner> == <ACE_Thread::self>.
- this->select_reactor_->renew ();
- return number_dispatched;
-}
-
-// Perform GET, CLR, SET, and ADD operations on the Handle_Sets.
-//
-// GET = 1, Retrieve current value
-// SET = 2, Set value of bits to new mask (changes the entire mask)
-// ADD = 3, Bitwise "or" the value into the mask (only changes
-// enabled bits)
-// CLR = 4 Bitwise "and" the negation of the value out of the mask
-// (only changes enabled bits)
-//
-// Returns the original mask. Must be called with locks held.
-
-int
-ACE_Select_Reactor_Impl::bit_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Select_Reactor_Handle_Set &handle_set,
- int ops)
-{
- ACE_TRACE ("ACE_Select_Reactor_Impl::bit_ops");
- if (this->handler_rep_.handle_in_range (handle) == 0)
- return -1;
-
-#if !defined (ACE_WIN32)
- ACE_Sig_Guard sb; // Block out all signals until method returns.
-#endif /* ACE_WIN32 */
-
- ACE_FDS_PTMF ptmf = &ACE_Handle_Set::set_bit;
- u_long omask = ACE_Event_Handler::NULL_MASK;
-
- // Find the old reactor masks. This automatically does the work of
- // the GET_MASK operation.
- if (handle_set.rd_mask_.is_set (handle))
- ACE_SET_BITS (omask, ACE_Event_Handler::READ_MASK);
- if (handle_set.wr_mask_.is_set (handle))
- ACE_SET_BITS (omask, ACE_Event_Handler::WRITE_MASK);
- if (handle_set.ex_mask_.is_set (handle))
- ACE_SET_BITS (omask, ACE_Event_Handler::EXCEPT_MASK);
-
- switch (ops)
- {
- case ACE_Reactor::GET_MASK:
- // The work for this operation is done in all cases at the
- // begining of the function.
- break;
- case ACE_Reactor::CLR_MASK:
- ptmf = &ACE_Handle_Set::clr_bit;
- /* FALLTHRU */
- case ACE_Reactor::SET_MASK:
- /* FALLTHRU */
- case ACE_Reactor::ADD_MASK:
-
- // The following code is rather subtle... Note that if we are
- // doing a ACE_Reactor::SET_MASK then if the bit is not enabled
- // in the mask we need to clear the bit from the ACE_Handle_Set.
- // On the other hand, if we are doing a ACE_Reactor::CLR_MASK or
- // a ACE_Reactor::ADD_MASK we just carry out the operations
- // specified by the mask.
-
- // READ, ACCEPT, and CONNECT flag will place the handle in the
- // read set.
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK)
- || ACE_BIT_ENABLED (mask, ACE_Event_Handler::ACCEPT_MASK)
- || ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK))
- {
- (handle_set.rd_mask_.*ptmf) (handle);
- }
- else if (ops == ACE_Reactor::SET_MASK)
- handle_set.rd_mask_.clr_bit (handle);
-
- // WRITE and CONNECT flag will place the handle in the write set
- if (ACE_BIT_ENABLED (mask,
- ACE_Event_Handler::WRITE_MASK)
- || ACE_BIT_ENABLED (mask,
- ACE_Event_Handler::CONNECT_MASK))
- {
- (handle_set.wr_mask_.*ptmf) (handle);
- }
- else if (ops == ACE_Reactor::SET_MASK)
- handle_set.wr_mask_.clr_bit (handle);
-
- // EXCEPT (and CONNECT on Win32) flag will place the handle in
- // the except set.
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::EXCEPT_MASK)
-#if defined (ACE_WIN32)
- || ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK)
-#endif /* ACE_WIN32 */
- )
- {
- (handle_set.ex_mask_.*ptmf) (handle);
- }
- else if (ops == ACE_Reactor::SET_MASK)
- handle_set.ex_mask_.clr_bit (handle);
- break;
- default:
- return -1;
- }
- return omask;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE)
-template class ACE_Unbounded_Queue <ACE_Notification_Buffer *>;
-template class ACE_Unbounded_Queue_Iterator <ACE_Notification_Buffer *>;
-template class ACE_Node <ACE_Notification_Buffer *>;
-#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE)
-#pragma instantiate ACE_Unbounded_Queue <ACE_Notification_Buffer *>
-#pragma instantiate ACE_Unbounded_Queue_Iterator <ACE_Notification_Buffer *>
-#pragma instantiate ACE_Node <ACE_Notification_Buffer *>
-#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Select_Reactor_Base.h b/ace/Select_Reactor_Base.h
deleted file mode 100644
index 10da5893a13..00000000000
--- a/ace/Select_Reactor_Base.h
+++ /dev/null
@@ -1,444 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Select_Reactor_Base.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SELECT_REACTOR_BASE_H
-#define ACE_SELECT_REACTOR_BASE_H
-#include "ace/pre.h"
-
-#include "ace/Signal.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Timer_Queue.h"
-#include "ace/Event_Handler.h"
-#include "ace/Handle_Set.h"
-#include "ace/Token.h"
-#include "ace/Pipe.h"
-#include "ace/Reactor_Impl.h"
-
-// Add useful typedefs to simplify the following code.
-typedef void (ACE_Handle_Set::*ACE_FDS_PTMF) (ACE_HANDLE);
-typedef int (ACE_Event_Handler::*ACE_EH_PTMF) (ACE_HANDLE);
-
-// Forward declaration.
-class ACE_Select_Reactor_Impl;
-
-class ACE_Export ACE_Select_Reactor_Handle_Set
-{
- // = TITLE
- // Track handles we are interested for various events.
-public:
- ACE_Handle_Set rd_mask_;
- // Read events (e.g., input pending, accept pending).
-
- ACE_Handle_Set wr_mask_;
- // Write events (e.g., flow control abated, non-blocking connection
- // complete).
-
- ACE_Handle_Set ex_mask_;
- // Exception events (e.g., SIG_URG).
-};
-
-class ACE_Export ACE_Event_Tuple
-{
- // = TITLE
- // An ACE_Event_Handler and its associated ACE_HANDLE.
- //
- // = DESCRIPTION
- // One <ACE_Event_Handler> is registered for one or more
- // <ACE_HANDLE>. At various points, this information must be
- // stored explicitly. This class provides a lightweight
- // mechanism to do so.
-public:
- ACE_Event_Tuple (void);
- // Default constructor.
-
- ACE_Event_Tuple (ACE_Event_Handler *eh,
- ACE_HANDLE h);
- // Constructor.
-
- ~ACE_Event_Tuple (void);
- // Destructor.
-
- int operator== (const ACE_Event_Tuple &rhs) const;
- // Equality operator.
-
- int operator!= (const ACE_Event_Tuple &rhs) const;
- // Inequality operator.
-
- ACE_HANDLE handle_;
- // Handle.
-
- ACE_Event_Handler *event_handler_;
- // <ACE_Event_Handler> associated with the <ACE_HANDLE>.
-};
-
-class ACE_Export ACE_Select_Reactor_Notify : public ACE_Reactor_Notify
-{
- // = TITLE
- // Unblock the <ACE_Select_Reactor> from its event loop.
- //
- // = DESCRIPTION
- // This implementation is necessary for cases where the
- // <ACE_Select_Reactor> is run in a multi-threaded program. In
- // this case, we need to be able to unblock <select> or <poll>
- // when updates occur other than in the main
- // <ACE_Select_Reactor> thread. To do this, we signal an
- // auto-reset event the <ACE_Select_Reactor> is listening on.
- // If an <ACE_Event_Handler> and <ACE_Select_Reactor_Mask> is
- // passed to <notify>, the appropriate <handle_*> method is
- // dispatched in the context of the <ACE_Select_Reactor> thread.
-public:
- ACE_Select_Reactor_Notify (void);
- ~ACE_Select_Reactor_Notify (void);
- // Default dtor.
-
- // = Initialization and termination methods.
- virtual int open (ACE_Reactor_Impl *,
- ACE_Timer_Queue * = 0,
- int disable_notify_pipe = 0);
- // Initialize.
-
- virtual int close (void);
- // Destroy.
-
- virtual ssize_t notify (ACE_Event_Handler * = 0,
- ACE_Reactor_Mask = ACE_Event_Handler::EXCEPT_MASK,
- ACE_Time_Value * = 0);
- // Called by a thread when it wants to unblock the
- // <ACE_Select_Reactor>. This wakeups the <ACE_Select_Reactor> if
- // currently blocked in <select>/<poll>. Pass over both the
- // <Event_Handler> *and* the <mask> to allow the caller to dictate
- // which <Event_Handler> method the <ACE_Select_Reactor> will
- // invoke. The <ACE_Time_Value> indicates how long to blocking
- // trying to notify the <ACE_Select_Reactor>. If <timeout> == 0,
- // the caller will block until action is possible, else will wait
- // until the relative time specified in *<timeout> elapses).
-
- virtual int dispatch_notifications (int &number_of_active_handles,
- ACE_Handle_Set &rd_mask);
- // Handles pending threads (if any) that are waiting to unblock the
- // <ACE_Select_Reactor>.
-
- virtual int handle_input (ACE_HANDLE handle);
- // Called back by the <ACE_Select_Reactor> when a thread wants to
- // unblock us.
-
- virtual void max_notify_iterations (int);
- // Set the maximum number of times that the
- // <ACE_Select_Reactor_Notify::handle_input> method will iterate and
- // dispatch the <ACE_Event_Handlers> that are passed in via the
- // notify pipe before breaking out of its <recv> loop. By default,
- // this is set to -1, which means "iterate until the pipe is empty."
- // Setting this to a value like "1 or 2" will increase "fairness"
- // (and thus prevent starvation) at the expense of slightly higher
- // dispatching overhead.
-
- virtual int max_notify_iterations (void);
- // Get the maximum number of times that the
- // <ACE_Select_Reactor_Notify::handle_input> method will iterate and
- // dispatch the <ACE_Event_Handlers> that are passed in via the
- // notify pipe before breaking out of its <recv> loop.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Select_Reactor_Impl *select_reactor_;
- // Keep a back pointer to the <ACE_Select_Reactor>. If this value
- // if NULL then the <ACE_Select_Reactor> has been initialized with
- // <disable_notify_pipe>.
-
- ACE_Pipe notification_pipe_;
- // Contains the <ACE_HANDLE> the <ACE_Select_Reactor> is listening
- // on, as well as the <ACE_HANDLE> that threads wanting the
- // attention of the <ACE_Select_Reactor> will write to.
-
- int max_notify_iterations_;
- // Keeps track of the maximum number of times that the
- // <ACE_Select_Reactor_Notify::handle_input> method will iterate and
- // dispatch the <ACE_Event_Handlers> that are passed in via the
- // notify pipe before breaking out of its <recv> loop. By default,
- // this is set to -1, which means "iterate until the pipe is empty."
-
-#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE)
- ACE_Unbounded_Queue <ACE_Notification_Buffer *> alloc_queue_;
- // Keeps track of allocated arrays of type
- // <ACE_Notification_Buffer>.
-
- ACE_Unbounded_Queue <ACE_Notification_Buffer *> notify_queue_;
- // Keeps track of all pending notifications.
-
- ACE_Unbounded_Queue <ACE_Notification_Buffer *> free_queue_;
- // Keeps track of all free buffers.
-
- ACE_SYNCH_MUTEX notify_queue_lock_;
- // synchronization for handling of queues
-#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */
-};
-
-class ACE_Export ACE_Select_Reactor_Handler_Repository
-{
- // = TITLE
- // Used to map <ACE_HANDLE>s onto the appropriate
- // <ACE_Event_Handler> *.
- //
- // = DESCRIPTION
- // This class is necessary to shield differences between UNIX
- // and Win32. In UNIX, <ACE_HANDLE> is an int, whereas in Win32
- // it's a void *. This class hides all these details from the
- // bulk of the <ACE_Select_Reactor> code. All of these methods
- // are called with the main <Select_Reactor> token lock held.
-public:
- friend class ACE_Select_Reactor_Handler_Repository_Iterator;
-
- // = Initialization and termination methods.
- ACE_Select_Reactor_Handler_Repository (ACE_Select_Reactor_Impl &);
- // Default "do-nothing" constructor.
-
- ~ACE_Select_Reactor_Handler_Repository (void);
- // dtor.
-
- int open (size_t size);
- // Initialize a repository of the appropriate <size>.
-
- int close (void);
- // Close down the repository.
-
- // = Search structure operations.
-
- ACE_Event_Handler *find (ACE_HANDLE handle, size_t *index_p = 0);
- // Return the <ACE_Event_Handler *> associated with <ACE_HANDLE>.
- // If <index_p> is non-0, then return the index location of the
- // <handle>, if found.
-
- int bind (ACE_HANDLE,
- ACE_Event_Handler *,
- ACE_Reactor_Mask);
- // Bind the <ACE_Event_Handler *> to the <ACE_HANDLE> with the
- // appropriate <ACE_Reactor_Mask> settings.
-
- int unbind (ACE_HANDLE,
- ACE_Reactor_Mask mask);
- // Remove the binding of <ACE_HANDLE> in accordance with the <mask>.
-
- int unbind_all (void);
- // Remove all the <ACE_HANDLE, ACE_Event_Handler> tuples.
-
- // = Sanity checking.
-
- // Check the <handle> to make sure it's a valid ACE_HANDLE that
- // within the range of legal handles (i.e., >= 0 && < max_size_).
- int invalid_handle (ACE_HANDLE handle);
-
- // Check the <handle> to make sure it's a valid ACE_HANDLE that
- // within the range of currently registered handles (i.e., >= 0 && <
- // max_handlep1_).
- int handle_in_range (ACE_HANDLE handle);
-
- // = Accessors.
- size_t size (void);
- // Returns the current table size.
-
- size_t max_handlep1 (void);
- // Maximum ACE_HANDLE value, plus 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Select_Reactor_Impl &select_reactor_;
- // Reference to our <Select_Reactor>.
-
- ssize_t max_size_;
- // Maximum number of handles.
-
- int max_handlep1_;
- // The highest currently active handle, plus 1 (ranges between 0 and
- // <max_size_>.
-
-#if defined (ACE_WIN32)
- // = The mapping from <HANDLES> to <Event_Handlers>.
-
- ACE_Event_Tuple *event_handlers_;
- // The NT version implements this via a dynamically allocated
- // array of <ACE_Event_Tuple *>. Since NT implements ACE_HANDLE
- // as a void * we can't directly index into this array. Therefore,
- // we just do a linear search (for now). Next, we'll modify
- // things to use hashing or something faster...
-#else
- ACE_Event_Handler **event_handlers_;
- // The UNIX version implements this via a dynamically allocated
- // array of <ACE_Event_Handler *> that is indexed directly using
- // the ACE_HANDLE value.
-#endif /* ACE_WIN32 */
-};
-
-class ACE_Export ACE_Select_Reactor_Handler_Repository_Iterator
-{
- // = TITLE
- // Iterate through the <ACE_Select_Reactor_Handler_Repository>.
-public:
- // = Initialization method.
- ACE_Select_Reactor_Handler_Repository_Iterator (const ACE_Select_Reactor_Handler_Repository *s);
-
- ~ACE_Select_Reactor_Handler_Repository_Iterator (void);
- // dtor.
-
- // = Iteration methods.
-
- int next (ACE_Event_Handler *&next_item);
- // Pass back the <next_item> that hasn't been seen in the Set.
- // Returns 0 when all items have been seen, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const ACE_Select_Reactor_Handler_Repository *rep_;
- // Reference to the Handler_Repository we are iterating over.
-
- ssize_t current_;
- // Pointer to the current iteration level.
-};
-
-class ACE_Export ACE_Select_Reactor_Impl : public ACE_Reactor_Impl
-{
- // = TITLE
- // This class simply defines how Select_Reactor's basic interface
- // functions should look like and provides a common base class for
- // <Select_Reactor> using various locking mechanism.
-public:
- enum
- {
- DEFAULT_SIZE = ACE_DEFAULT_SELECT_REACTOR_SIZE
- // Default size of the Select_Reactor's handle table.
- };
-
- ACE_Select_Reactor_Impl (void);
- // Constructor.
-
- friend class ACE_Select_Reactor_Notify;
- friend class ACE_Select_Reactor_Handler_Repository;
-
-protected:
- virtual int bit_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Select_Reactor_Handle_Set &wait_Set,
- int ops);
- // Allow manipulation of the <wait_set_> mask and <ready_set_> mask.
-
- virtual void renew (void) = 0;
- // Enqueue ourselves into the list of waiting threads at the
- // appropriate point specified by <requeue_position_>.
-
- ACE_Select_Reactor_Handler_Repository handler_rep_;
- // Table that maps <ACE_HANDLEs> to <ACE_Event_Handler *>'s.
-
- ACE_Select_Reactor_Handle_Set wait_set_;
- // Tracks handles that are waited for by <select>.
-
- ACE_Select_Reactor_Handle_Set suspend_set_;
- // Tracks handles that are currently suspended.
-
- ACE_Select_Reactor_Handle_Set ready_set_;
- // Track HANDLES we are interested in for various events that must
- // be dispatched *without* going through <select>.
-
- ACE_Timer_Queue *timer_queue_;
- // Defined as a pointer to allow overriding by derived classes...
-
- int delete_timer_queue_;
- // Keeps track of whether we should delete the timer queue (if we
- // didn't create it, then we don't delete it).
-
- ACE_Sig_Handler *signal_handler_;
- // Handle signals without requiring global/static variables.
-
- int delete_signal_handler_;
- // Keeps track of whether we should delete the signal handler (if we
- // didn't create it, then we don't delete it).
-
- ACE_Reactor_Notify *notify_handler_;
- // Callback object that unblocks the <ACE_Select_Reactor> if it's
- // sleeping.
-
- int delete_notify_handler_;
- // Keeps track of whether we need to delete the notify handler (if
- // we didn't create it, then we don't delete it).
-
- int restart_;
- // Restart the <handle_events> event-loop method automatically when
- // <select> is interrupted via <EINTR>.
-
- int requeue_position_;
- // Position that the main ACE_Select_Reactor thread is requeued in
- // the list of waiters during a <notify> callback. If this value ==
- // -1 we are requeued at the end of the list. Else if it's 0 then
- // we are requeued at the front of the list. Else if it's > 1 then
- // that indicates the number of waiters to skip over.
-
- int initialized_;
- // True if we've been initialized yet...
-
- ACE_thread_t owner_;
- // The original thread that created this Select_Reactor.
-
- int state_changed_;
- // True if state has changed during dispatching of
- // <ACE_Event_Handlers>, else false. This is used to determine
- // whether we need to make another trip through the
- // <Select_Reactor>'s <wait_for_multiple_events> loop.
-
- int supress_notify_renew (void);
- void supress_notify_renew (int sr);
- // Controls/access whether the notify handler should renew the
- // Select_Reactor's token or not.
-
-private:
- int supress_renew_;
- // Determine whether we should renew Select_Reactor's token after handling
- // the notification message.
-
- ACE_Select_Reactor_Impl (const ACE_Select_Reactor_Impl &);
- ACE_Select_Reactor_Impl &operator = (const ACE_Select_Reactor_Impl &);
- // Deny access since member-wise won't work...
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Select_Reactor_Base.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SELECT_REACTOR_BASE_H */
diff --git a/ace/Select_Reactor_Base.i b/ace/Select_Reactor_Base.i
deleted file mode 100644
index 001a19fb753..00000000000
--- a/ace/Select_Reactor_Base.i
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/Reactor.h"
-
-ACE_INLINE
-ACE_Event_Tuple::~ACE_Event_Tuple (void)
-{
-}
-
-ACE_INLINE
-ACE_Select_Reactor_Notify::~ACE_Select_Reactor_Notify (void)
-{
-}
-
-ACE_INLINE
-ACE_Select_Reactor_Handler_Repository::~ACE_Select_Reactor_Handler_Repository (void)
-{
-}
-
-ACE_INLINE
-ACE_Select_Reactor_Handler_Repository_Iterator::~ACE_Select_Reactor_Handler_Repository_Iterator (void)
-{
-}
-
-ACE_INLINE size_t
-ACE_Select_Reactor_Handler_Repository::size (void)
-{
- return this->max_size_;
-}
-
-ACE_INLINE
-ACE_Event_Tuple::ACE_Event_Tuple (void)
-: handle_ (ACE_INVALID_HANDLE),
- event_handler_ (0)
-{
-}
-
-ACE_INLINE
-ACE_Event_Tuple::ACE_Event_Tuple (ACE_Event_Handler* eh,
- ACE_HANDLE h)
-: handle_ (h),
- event_handler_ (eh)
-{
-}
-
-ACE_INLINE int
-ACE_Event_Tuple::operator== (const ACE_Event_Tuple &rhs) const
-{
- return this->handle_ == rhs.handle_;
-}
-
-ACE_INLINE int
-ACE_Event_Tuple::operator!= (const ACE_Event_Tuple &rhs) const
-{
- return !(*this == rhs);
-}
-
-ACE_INLINE
-ACE_Select_Reactor_Impl::ACE_Select_Reactor_Impl ()
- : handler_rep_ (*this),
- timer_queue_ (0),
- delete_timer_queue_ (0),
- delete_signal_handler_ (0),
- delete_notify_handler_ (0),
- requeue_position_ (-1), // Requeue at end of waiters by default.
- initialized_ (0),
- state_changed_ (0),
- supress_renew_ (0)
-{
-}
-
-ACE_INLINE int
-ACE_Select_Reactor_Impl::supress_notify_renew (void)
-{
- return this->supress_renew_;
-}
-
-ACE_INLINE void
-ACE_Select_Reactor_Impl::supress_notify_renew (int sr)
-{
- this->supress_renew_ = sr;
-}
diff --git a/ace/Select_Reactor_T.cpp b/ace/Select_Reactor_T.cpp
deleted file mode 100644
index a643a325cbc..00000000000
--- a/ace/Select_Reactor_T.cpp
+++ /dev/null
@@ -1,1365 +0,0 @@
-// $Id$
-
-#ifndef ACE_SELECT_REACTOR_T_C
-#define ACE_SELECT_REACTOR_T_C
-
-#include "ace/Select_Reactor_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Thread.h"
-#include "ace/Timer_Heap.h"
-
-// @@ The latest version of SunCC can't grok the code if we put inline
-// function here. Therefore, we temporarily disable the code here.
-// We shall turn this back on once we know the problem gets fixed.
-#if 1 // !defined (__ACE_INLINE__)
-#include "ace/Select_Reactor_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Select_Reactor_T, "$Id$")
-
- ACE_ALLOC_HOOK_DEFINE(ACE_Select_Reactor_T)
-
-#if defined (ACE_WIN32)
-#define ACE_SELECT_REACTOR_HANDLE(H) (this->event_handlers_[(H)].handle_)
-#define ACE_SELECT_REACTOR_EVENT_HANDLER(THIS,H) ((THIS)->event_handlers_[(H)].event_handler_)
-#else
-#define ACE_SELECT_REACTOR_HANDLE(H) (H)
-#define ACE_SELECT_REACTOR_EVENT_HANDLER(THIS,H) ((THIS)->event_handlers_[(H)])
-#endif /* ACE_WIN32 */
-
- template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::any_ready
- (ACE_Select_Reactor_Handle_Set &wait_set)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::any_ready");
-
- if (this->mask_signals_)
- {
-#if !defined (ACE_WIN32)
- // Make this call signal safe.
- ACE_Sig_Guard sb;
-#endif /* ACE_WIN32 */
-
- return this->any_ready_i (wait_set);
- }
- return this->any_ready_i (wait_set);
-}
-
- template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::any_ready_i
- (ACE_Select_Reactor_Handle_Set &wait_set)
-{
- int number_ready = this->ready_set_.rd_mask_.num_set ()
- + this->ready_set_.wr_mask_.num_set ()
- + this->ready_set_.ex_mask_.num_set ();
-
- if (number_ready > 0)
- {
- wait_set.rd_mask_ = this->ready_set_.rd_mask_;
- wait_set.wr_mask_ = this->ready_set_.wr_mask_;
- wait_set.ex_mask_ = this->ready_set_.ex_mask_;
-
- this->ready_set_.rd_mask_.reset ();
- this->ready_set_.wr_mask_.reset ();
- this->ready_set_.ex_mask_.reset ();
- }
-
- return number_ready;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::handler_i (int signum,
- ACE_Event_Handler **eh)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::handler_i");
- ACE_Event_Handler *handler = this->signal_handler_->handler (signum);
-
- if (handler == 0)
- return -1;
- else if (eh != 0 && *eh != 0)
- *eh = handler;
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::initialized (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::initialized");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, 0));
- return this->initialized_;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::owner (ACE_thread_t tid,
- ACE_thread_t *o_id)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::owner");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
-
- if (o_id)
- *o_id = this->owner_;
-
- this->owner_ = tid;
-
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::owner (ACE_thread_t *t_id)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::owner");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- *t_id = this->owner_;
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::restart (void)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->restart_;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::restart (int r)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- int current_value = this->restart_;
- this->restart_ = r;
- return current_value;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> void
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::requeue_position (int rp)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::requeue_position");
- ACE_MT (ACE_GUARD (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_));
-#if defined (ACE_WIN32)
- ACE_UNUSED_ARG (rp);
- // Must always requeue ourselves "next" on Win32.
- this->requeue_position_ = 0;
-#else
- this->requeue_position_ = rp;
-#endif /* ACE_WIN32 */
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::requeue_position (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::requeue_position");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->requeue_position_;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> void
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::max_notify_iterations (int iterations)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::max_notify_iterations");
- ACE_MT (ACE_GUARD (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_));
-
- this->notify_handler_->max_notify_iterations (iterations);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::max_notify_iterations (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::max_notify_iterations");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->notify_handler_->max_notify_iterations ();
-}
-
-// Enqueue ourselves into the list of waiting threads.
-template <class ACE_SELECT_REACTOR_TOKEN> void
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::renew (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::renew");
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- if (this->supress_notify_renew () == 0)
- this->token_.renew (this->requeue_position_);
-#endif /* defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) */
-}
-
-template <class ACE_SELECT_REACTOR_MUTEX> void
-ACE_Select_Reactor_Token_T<ACE_SELECT_REACTOR_MUTEX>::dump (void) const
-{
- ACE_TRACE ("ACE_Select_Reactor_Token::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class ACE_SELECT_REACTOR_MUTEX>
-ACE_Select_Reactor_Token_T<ACE_SELECT_REACTOR_MUTEX>::ACE_Select_Reactor_Token_T
- (ACE_Select_Reactor_Impl &r)
- : select_reactor_ (&r)
-{
- ACE_TRACE ("ACE_Select_Reactor_Token::ACE_Select_Reactor_Token");
-}
-
-template <class ACE_SELECT_REACTOR_MUTEX>
-ACE_Select_Reactor_Token_T<ACE_SELECT_REACTOR_MUTEX>::ACE_Select_Reactor_Token_T (void)
- : select_reactor_ (0)
-{
- ACE_TRACE ("ACE_Select_Reactor_Token::ACE_Select_Reactor_Token");
-}
-
-template <class ACE_SELECT_REACTOR_MUTEX>
-ACE_Select_Reactor_Token_T<ACE_SELECT_REACTOR_MUTEX>::~ACE_Select_Reactor_Token_T (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_Token::~ACE_Select_Reactor_Token");
-}
-
-template <class ACE_SELECT_REACTOR_MUTEX> ACE_Select_Reactor_Impl &
-ACE_Select_Reactor_Token_T<ACE_SELECT_REACTOR_MUTEX>::select_reactor (void)
-{
- return *this->select_reactor_;
-}
-
-template <class ACE_SELECT_REACTOR_MUTEX> void
-ACE_Select_Reactor_Token_T<ACE_SELECT_REACTOR_MUTEX>::select_reactor
- (ACE_Select_Reactor_Impl &select_reactor)
-{
- this->select_reactor_ = &select_reactor;
-}
-
-// Used to wakeup the Select_Reactor.
-
-template <class ACE_SELECT_REACTOR_MUTEX> void
-ACE_Select_Reactor_Token_T<ACE_SELECT_REACTOR_MUTEX>::sleep_hook (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_Token::sleep_hook");
- if (this->select_reactor_->notify () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("sleep_hook failed")));
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::notify (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::notify");
-
- ssize_t n = 0;
-
- // Pass over both the Event_Handler *and* the mask to allow the
- // caller to dictate which Event_Handler method the receiver
- // invokes. Note that this call can timeout.
-
- n = this->notify_handler_->notify (eh, mask, timeout);
- return n == -1 ? -1 : 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::resume_handler (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::resume_handler");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->resume_i (handle);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::suspend_handler (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::suspend_handler");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->suspend_i (handle);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::suspend_handlers (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::suspend_handlers");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
-
- ACE_Event_Handler *eh = 0;
-
- for (ACE_Select_Reactor_Handler_Repository_Iterator iter (&this->handler_rep_);
- iter.next (eh) != 0;
- iter.advance ())
- this->suspend_i (eh->get_handle ());
-
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::resume_handlers (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::resume_handlers");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
-
- ACE_Event_Handler *eh = 0;
-
- for (ACE_Select_Reactor_Handler_Repository_Iterator iter (&this->handler_rep_);
- iter.next (eh) != 0;
- iter.advance ())
- this->resume_i (eh->get_handle ());
-
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::register_handler
- (ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::register_handler");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->register_handler_i (handler->get_handle (), handler, mask);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::register_handler
- (ACE_HANDLE handle,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::register_handler");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->register_handler_i (handle, handler, mask);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::register_handler
- (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::register_handler");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->register_handler_i (handles, handler, mask);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::handler
- (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Event_Handler **handler)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::handler");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->handler_i (handle, mask, handler);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::remove_handler
- (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::remove_handler");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->remove_handler_i (handles, mask);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::remove_handler
- (ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::remove_handler");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->remove_handler_i (handler->get_handle (), mask);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::remove_handler
- (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::remove_handler");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->remove_handler_i (handle, mask);
-}
-
-// Performs operations on the "ready" bits.
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::ready_ops
- (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::ready_ops");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->bit_ops (handle,
- mask,
- this->ready_set_,
- ops);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::open
- (size_t size,
- int restart,
- ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq,
- int disable_notify_pipe,
- ACE_Reactor_Notify *notify)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::open");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
-
- // Can't initialize ourselves more than once.
- if (this->initialized_ > 0)
- return -1;
-
- this->owner_ = ACE_Thread::self ();
- this->restart_ = restart;
- this->signal_handler_ = sh;
- this->timer_queue_ = tq;
- this->notify_handler_ = notify;
-
- int result = 0;
-
- // Allows the signal handler to be overridden.
- if (this->signal_handler_ == 0)
- {
- ACE_NEW_RETURN (this->signal_handler_,
- ACE_Sig_Handler,
- -1);
-
- if (this->signal_handler_ == 0)
- result = -1;
- else
- this->delete_signal_handler_ = 1;
- }
-
- // Allows the timer queue to be overridden.
- if (result != -1 && this->timer_queue_ == 0)
- {
- ACE_NEW_RETURN (this->timer_queue_,
- ACE_Timer_Heap,
- -1);
-
- if (this->timer_queue_ == 0)
- result = -1;
- else
- this->delete_timer_queue_ = 1;
- }
-
- // Allows the Notify_Handler to be overridden.
- if (result != -1 && this->notify_handler_ == 0)
- {
- ACE_NEW_RETURN (this->notify_handler_,
- ACE_Select_Reactor_Notify,
- -1);
-
- if (this->notify_handler_ == 0)
- result = -1;
- else
- this->delete_notify_handler_ = 1;
- }
-
- if (result != -1 && this->handler_rep_.open (size) == -1)
- result = -1;
- else if (this->notify_handler_->open (this,
- 0,
- disable_notify_pipe) == -1)
- result = -1;
-
- if (result != -1)
- // We're all set to go.
- this->initialized_ = 1;
- else
- // This will close down all the allocated resources properly.
- this->close ();
-
- return result;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::set_sig_handler
- (ACE_Sig_Handler *signal_handler)
-{
- if (this->signal_handler_ != 0 && this->delete_signal_handler_ != 0)
- delete this->signal_handler_;
- this->signal_handler_ = signal_handler;
- this->delete_signal_handler_ = 0;
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::set_timer_queue
- (ACE_Timer_Queue *timer_queue)
-{
- if (this->timer_queue_ != 0 && this->delete_timer_queue_ != 0)
- delete this->timer_queue_;
- this->timer_queue_ = timer_queue;
- this->delete_timer_queue_ = 0;
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN>
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::ACE_Select_Reactor_T
- (ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq,
- int disable_notify_pipe,
- ACE_Reactor_Notify *notify,
- int mask_signals)
- : token_ (*this),
- lock_adapter_ (token_),
- deactivated_ (0),
- mask_signals_ (mask_signals)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::ACE_Select_Reactor_T");
-
- if (this->open (ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::DEFAULT_SIZE,
- 0,
- sh,
- tq,
- disable_notify_pipe,
- notify) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Select_Reactor_T::open ")
- ACE_TEXT ("failed inside ACE_Select_Reactor_T::CTOR")));
-}
-
-// Initialize ACE_Select_Reactor_T.
-
-template <class ACE_SELECT_REACTOR_TOKEN>
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::ACE_Select_Reactor_T
- (size_t size,
- int rs,
- ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq,
- int disable_notify_pipe,
- ACE_Reactor_Notify *notify,
- int mask_signals)
- : token_ (*this),
- lock_adapter_ (token_),
- deactivated_ (0),
- mask_signals_ (mask_signals)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::ACE_Select_Reactor_T");
-
- if (this->open (size,
- rs,
- sh,
- tq,
- disable_notify_pipe,
- notify) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Select_Reactor_T::open ")
- ACE_TEXT ("failed inside ACE_Select_Reactor_T::CTOR")));
-}
-
-// Close down the ACE_Select_Reactor_T instance, detaching any
-// remaining Event_Handers. This had better be called from the main
-// event loop thread...
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::close (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::close");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
-
- if (this->delete_signal_handler_)
- {
- delete this->signal_handler_;
- this->signal_handler_ = 0;
- this->delete_signal_handler_ = 0;
- }
-
- this->handler_rep_.close ();
-
- if (this->delete_timer_queue_)
- {
- delete this->timer_queue_;
- this->timer_queue_ = 0;
- this->delete_timer_queue_ = 0;
- }
-
- if (this->notify_handler_ != 0)
- this->notify_handler_->close ();
-
- if (this->delete_notify_handler_)
- {
- delete this->notify_handler_;
- this->notify_handler_ = 0;
- this->delete_notify_handler_ = 0;
- }
-
- this->initialized_ = 0;
-
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::current_info
- (ACE_HANDLE, size_t &)
-{
- return -1;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN>
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::~ACE_Select_Reactor_T (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::~ACE_Select_Reactor_T");
- this->close ();
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::remove_handler_i
- (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::remove_handler_i");
- ACE_HANDLE h;
-
- ACE_Handle_Set_Iterator handle_iter (handles);
-
- while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
- if (this->remove_handler_i (h, mask) == -1)
- return -1;
-
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::register_handler_i
- (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::register_handler_i");
- ACE_HANDLE h;
-
- ACE_Handle_Set_Iterator handle_iter (handles);
- while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
- if (this->register_handler_i (h, handler, mask) == -1)
- return -1;
-
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::register_handler
- (const ACE_Sig_Set &sigset,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::register_handler");
-
- int result = 0;
-
-#if (ACE_NSIG > 0) && !defined (CHORUS)
- for (int s = 1; s < ACE_NSIG; s++)
- if (sigset.is_member (s)
- && this->signal_handler_->register_handler (s,
- new_sh,
- new_disp) == -1)
- result = -1;
-#else /* ACE_NSIG <= 0 || CHORUS */
- ACE_UNUSED_ARG (sigset);
- ACE_UNUSED_ARG (new_sh);
- ACE_UNUSED_ARG (new_disp);
-#endif /* ACE_NSIG <= 0 || CHORUS */
- return result;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::remove_handler
- (const ACE_Sig_Set &sigset)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::remove_handler");
- int result = 0;
-
-#if (ACE_NSIG > 0) && !defined (CHORUS)
- for (int s = 1; s < ACE_NSIG; s++)
- if (sigset.is_member (s)
- && this->signal_handler_->remove_handler (s) == -1)
- result = -1;
-#else /* ACE_NSIG <= 0 || CHORUS */
- ACE_UNUSED_ARG (sigset);
-#endif /* ACE_NSIG <= 0 || CHORUS */
-
- return result;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> long
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::schedule_timer
- (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::schedule_timer");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
-
- return this->timer_queue_->schedule
- (handler,
- arg,
- timer_queue_->gettimeofday () + delta_time,
- interval);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::reset_timer_interval
- (long timer_id,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::reset_timer_interval");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
-
- return this->timer_queue_->reset_interval
- (timer_id,
- interval);
-}
-
-// Main event loop driver that blocks for <max_wait_time> before
-// returning (will return earlier if I/O or signal events occur).
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::handle_events
- (ACE_Time_Value &max_wait_time)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::handle_events");
-
- return this->handle_events (&max_wait_time);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::handle_error (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::handle_error");
- if (errno == EINTR)
- return this->restart_;
-#if defined (__MVS__) || defined (ACE_WIN32)
- // On MVS Open Edition and Win32, there can be a number of failure
- // codes on a bad socket, so check_handles on anything other than
- // EINTR.
- else
- return this->check_handles ();
-#else
- else if (errno == EBADF)
- return this->check_handles ();
- else
- return -1;
-#endif /* __MVS__ */
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> void
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::notify_handle
- (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Handle_Set &ready_mask,
- ACE_Event_Handler *event_handler,
- ACE_EH_PTMF ptmf)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::notify_handle");
- // Check for removed handlers.
- if (event_handler == 0)
- return;
-
- int status = (event_handler->*ptmf) (handle);
-
- if (status < 0)
- this->remove_handler_i (handle, mask);
- else if (status > 0)
- ready_mask.set_bit (handle);
-}
-
-// Perform GET, CLR, SET, and ADD operations on the select()
-// Handle_Sets.
-//
-// GET = 1, Retrieve current value
-// SET = 2, Set value of bits to new mask (changes the entire mask)
-// ADD = 3, Bitwise "or" the value into the mask (only changes
-// enabled bits)
-// CLR = 4 Bitwise "and" the negation of the value out of the mask
-// (only changes enabled bits)
-//
-// Returns the original mask.
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::mask_ops
- (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::mask_ops");
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
- return this->bit_ops (handle, mask,
- this->wait_set_,
- ops);
-}
-
-// Must be called with locks held.
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::handler_i
- (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Event_Handler **handler)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::handler_i");
- ACE_Event_Handler *h = this->handler_rep_.find (handle);
-
- if (h == 0)
- return -1;
- else
- {
- if ((ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK)
- || ACE_BIT_ENABLED (mask, ACE_Event_Handler::ACCEPT_MASK))
- && this->wait_set_.rd_mask_.is_set (handle) == 0)
- return -1;
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::WRITE_MASK)
- && this->wait_set_.wr_mask_.is_set (handle) == 0)
- return -1;
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::EXCEPT_MASK)
- && this->wait_set_.ex_mask_.is_set (handle) == 0)
- return -1;
- }
-
- if (handler != 0)
- *handler = h;
- return 0;
-}
-
-// Must be called with locks held
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::resume_i (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::resume");
- if (this->handler_rep_.find (handle) == 0)
- return -1;
-
- if (this->suspend_set_.rd_mask_.is_set (handle))
- {
- this->wait_set_.rd_mask_.set_bit (handle);
- this->suspend_set_.rd_mask_.clr_bit (handle);
- }
- if (this->suspend_set_.wr_mask_.is_set (handle))
- {
- this->wait_set_.wr_mask_.set_bit (handle);
- this->suspend_set_.wr_mask_.clr_bit (handle);
- }
- if (this->suspend_set_.ex_mask_.is_set (handle))
- {
- this->wait_set_.ex_mask_.set_bit (handle);
- this->suspend_set_.ex_mask_.clr_bit (handle);
- }
- return 0;
-}
-
-// Must be called with locks held
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::suspend_i (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::suspend");
- if (this->handler_rep_.find (handle) == 0)
- return -1;
-
- if (this->wait_set_.rd_mask_.is_set (handle))
- {
- this->suspend_set_.rd_mask_.set_bit (handle);
- this->wait_set_.rd_mask_.clr_bit (handle);
- }
- if (this->wait_set_.wr_mask_.is_set (handle))
- {
- this->suspend_set_.wr_mask_.set_bit (handle);
- this->wait_set_.wr_mask_.clr_bit (handle);
- }
- if (this->wait_set_.ex_mask_.is_set (handle))
- {
- this->suspend_set_.ex_mask_.set_bit (handle);
- this->wait_set_.ex_mask_.clr_bit (handle);
- }
- return 0;
-}
-
-// Must be called with locks held
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::register_handler_i
- (ACE_HANDLE handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::register_handler_i");
-
- // Insert the <handle, event_handle> tuple into the Handler
- // Repository.
- return this->handler_rep_.bind (handle, event_handler, mask);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::remove_handler_i
- (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::remove_handler_i");
-
- // Unbind this handle.
- return this->handler_rep_.unbind (handle, mask);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::work_pending (const ACE_Time_Value &timeout)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
-
- u_long width = (u_long) this->handler_rep_.max_handlep1 ();
-
- ACE_Select_Reactor_Handle_Set fd_set;
- fd_set.rd_mask_ = this->wait_set_.rd_mask_;
- fd_set.wr_mask_ = this->wait_set_.wr_mask_;
- fd_set.ex_mask_ = this->wait_set_.ex_mask_;
-
- return ACE_OS::select (int (width),
- fd_set.rd_mask_,
- fd_set.wr_mask_,
- fd_set.ex_mask_,
- timeout);
-}
-
-// Must be called with lock held.
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::wait_for_multiple_events
- (ACE_Select_Reactor_Handle_Set &dispatch_set,
- ACE_Time_Value *max_wait_time)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::wait_for_multiple_events");
- u_long width = 0;
- ACE_Time_Value timer_buf (0);
- ACE_Time_Value *this_timeout = &timer_buf;
-
- int number_of_active_handles = this->any_ready (dispatch_set);
-
- // If there are any bits enabled in the <ready_set_> then we'll
- // handle those first, otherwise we'll block in <select>.
-
- if (number_of_active_handles == 0)
- {
- do
- {
- if (this->timer_queue_->calculate_timeout (max_wait_time,
- this_timeout) == 0)
- this_timeout = 0;
-
- width = (u_long) this->handler_rep_.max_handlep1 ();
-
- dispatch_set.rd_mask_ = this->wait_set_.rd_mask_;
- dispatch_set.wr_mask_ = this->wait_set_.wr_mask_;
- dispatch_set.ex_mask_ = this->wait_set_.ex_mask_;
-
- number_of_active_handles = ACE_OS::select (int (width),
- dispatch_set.rd_mask_,
- dispatch_set.wr_mask_,
- dispatch_set.ex_mask_,
- this_timeout);
- }
- while (number_of_active_handles == -1 && this->handle_error () > 0);
-
- if (number_of_active_handles > 0)
- {
-#if !defined (ACE_WIN32)
- // Resynchronize the fd_sets so their "max" is set properly.
- dispatch_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ());
- dispatch_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ());
- dispatch_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ());
-#endif /* ACE_WIN32 */
- }
- }
-
- // Return the number of events to dispatch.
- return number_of_active_handles;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch_timer_handlers
- (int &number_of_handlers_dispatched)
-{
- number_of_handlers_dispatched += this->timer_queue_->expire ();
- if (this->state_changed_)
- return -1;
- else
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch_notification_handlers
- (ACE_Select_Reactor_Handle_Set &dispatch_set,
- int &number_of_active_handles,
- int &number_of_handlers_dispatched)
-{
- // Check to see if the ACE_HANDLE associated with the
- // Select_Reactor's notify hook is enabled. If so, it means that
- // one or more other threads are trying to update the
- // ACE_Select_Reactor_T's internal tables or the notify pipe is
- // enabled. We'll handle all these threads and notifications, and
- // then break out to continue the event loop.
-
- number_of_handlers_dispatched +=
- this->notify_handler_->dispatch_notifications (number_of_active_handles,
- dispatch_set.rd_mask_);
- return this->state_changed_ ? -1 : 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch_io_set
- (int number_of_active_handles,
- int &number_of_handlers_dispatched,
- int mask,
- ACE_Handle_Set &dispatch_mask,
- ACE_Handle_Set &ready_mask,
- ACE_EH_PTMF callback)
-{
- ACE_HANDLE handle;
-
- ACE_Handle_Set_Iterator handle_iter (dispatch_mask);
-
- while ((handle = handle_iter ()) != ACE_INVALID_HANDLE
- && number_of_handlers_dispatched < number_of_active_handles
- && this->state_changed_ == 0)
- {
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Select_Reactor_T::dispatching\n")));
- number_of_handlers_dispatched++;
- this->notify_handle (handle,
- mask,
- ready_mask,
- this->handler_rep_.find (handle),
- callback);
- }
-
- if (number_of_handlers_dispatched > 0 && this->state_changed_)
- return -1;
-
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch_io_handlers
- (ACE_Select_Reactor_Handle_Set &dispatch_set,
- int &number_of_active_handles,
- int &number_of_handlers_dispatched)
-{
- // Handle output events (this code needs to come first to handle the
- // obscure case of piggy-backed data coming along with the final
- // handshake message of a nonblocking connection).
-
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Select_Reactor_T::dispatch - WRITE\n")));
- if (this->dispatch_io_set (number_of_active_handles,
- number_of_handlers_dispatched,
- ACE_Event_Handler::WRITE_MASK,
- dispatch_set.wr_mask_,
- this->ready_set_.wr_mask_,
- &ACE_Event_Handler::handle_output) == -1)
- {
- number_of_active_handles -= number_of_handlers_dispatched;
- return -1;
- }
-
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Select_Reactor_T::dispatch - EXCEPT\n")));
- if (this->dispatch_io_set (number_of_active_handles,
- number_of_handlers_dispatched,
- ACE_Event_Handler::EXCEPT_MASK,
- dispatch_set.ex_mask_,
- this->ready_set_.ex_mask_,
- &ACE_Event_Handler::handle_exception) == -1)
- {
- number_of_active_handles -= number_of_handlers_dispatched;
- return -1;
- }
-
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Select_Reactor_T::dispatch - READ\n")));
- if (this->dispatch_io_set (number_of_active_handles,
- number_of_handlers_dispatched,
- ACE_Event_Handler::READ_MASK,
- dispatch_set.rd_mask_,
- this->ready_set_.rd_mask_,
- &ACE_Event_Handler::handle_input) == -1)
- {
- number_of_active_handles -= number_of_handlers_dispatched;
- return -1;
- }
-
- number_of_active_handles -= number_of_handlers_dispatched;
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dispatch
- (int active_handle_count,
- ACE_Select_Reactor_Handle_Set &dispatch_set)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::dispatch");
-
- int io_handlers_dispatched = 0;
- int other_handlers_dispatched = 0;
- int signal_occurred = 0;
- // The following do/while loop keeps dispatching as long as there
- // are still active handles. Note that the only way we should ever
- // iterate more than once through this loop is if signals occur
- // while we're dispatching other handlers.
-
- do
- {
- // Note that we keep track of changes to our state. If any of
- // the dispatch_*() methods below return -1 it means that the
- // <wait_set_> state has changed as the result of an
- // <ACE_Event_Handler> being dispatched. This means that we
- // need to bail out and rerun the select() loop since our
- // existing notion of handles in <dispatch_set> may no longer be
- // correct.
- //
- // In the beginning, our state starts out unchanged. After
- // every iteration (i.e., due to signals), our state starts out
- // unchanged again.
-
- this->state_changed_ = 0;
-
- // Perform the Template Method for dispatching all the handlers.
-
- // First check for interrupts.
- if (active_handle_count == -1)
- {
- // Bail out -- we got here since <select> was interrupted.
- if (ACE_Sig_Handler::sig_pending () != 0)
- {
- ACE_Sig_Handler::sig_pending (0);
-
- // If any HANDLES in the <ready_set_> are activated as a
- // result of signals they should be dispatched since
- // they may be time critical...
- active_handle_count = this->any_ready (dispatch_set);
-
- // Record the fact that the Reactor has dispatched a
- // handle_signal() method. We need this to return the
- // appropriate count below.
- signal_occurred = 1;
- }
- else
- return -1;
- }
-
- // Handle timers early since they may have higher latency
- // constraints than I/O handlers. Ideally, the order of
- // dispatching should be a strategy...
- else if (this->dispatch_timer_handlers (other_handlers_dispatched) == -1)
- // State has changed or timer queue has failed, exit loop.
- break;
-
- // Check to see if there are no more I/O handles left to
- // dispatch AFTER we've handled the timers...
- else if (active_handle_count == 0)
- return io_handlers_dispatched
- + other_handlers_dispatched
- + signal_occurred;
-
- // Next dispatch the notification handlers (if there are any to
- // dispatch). These are required to handle multi-threads that
- // are trying to update the <Reactor>.
-
- else if (this->dispatch_notification_handlers
- (dispatch_set,
- active_handle_count,
- other_handlers_dispatched) == -1)
- break; // State has changed, exit loop.
-
- // Finally, dispatch the I/O handlers.
- else if (this->dispatch_io_handlers
- (dispatch_set,
- active_handle_count,
- io_handlers_dispatched) == -1)
- // State has changed, so exit loop.
- break;
- }
- while (active_handle_count > 0);
-
- return io_handlers_dispatched + other_handlers_dispatched+signal_occurred;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::release_token (void)
-{
-#if defined (ACE_WIN32)
- this->token_.release ();
- return (int) EXCEPTION_CONTINUE_SEARCH;
-#else
- return 0;
-#endif /* ACE_WIN32 */
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::handle_events
- (ACE_Time_Value *max_wait_time)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::handle_events");
-
- // Stash the current time -- the destructor of this object will
- // automatically compute how much time elpased since this method was
- // called.
- ACE_Countdown_Time countdown (max_wait_time);
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1);
-
- if (ACE_OS::thr_equal (ACE_Thread::self (),
- this->owner_) == 0 || this->deactivated_)
- return -1;
-
- // Update the countdown to reflect time waiting for the mutex.
- countdown.update ();
-#else
- if (this->deactivated_)
- return -1;
-#endif /* ACE_MT_SAFE */
-
- return this->handle_events_i (max_wait_time);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::handle_events_i
- (ACE_Time_Value *max_wait_time)
-{
- int result = -1;
-
- ACE_SEH_TRY
- {
- ACE_Select_Reactor_Handle_Set dispatch_set;
-
- int number_of_active_handles =
- this->wait_for_multiple_events (dispatch_set,
- max_wait_time);
-
- result = this->dispatch (number_of_active_handles,
- dispatch_set);
- }
- ACE_SEH_EXCEPT (this->release_token ())
- {
- // As it stands now, we catch and then rethrow all Win32
- // structured exceptions so that we can make sure to release the
- // <token_> lock correctly.
- }
-
- this->state_changed_ = 1;
-
- return result;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::check_handles (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::check_handles");
-
-#if defined (ACE_WIN32) || defined (__MVS__)
- ACE_Time_Value time_poll = ACE_Time_Value::zero;
- ACE_Handle_Set rd_mask;
-#endif /* ACE_WIN32 || MVS */
-
- ACE_Event_Handler *eh = 0;
- int result = 0;
-
- for (ACE_Select_Reactor_Handler_Repository_Iterator iter (&this->handler_rep_);
- iter.next (eh) != 0;
- iter.advance ())
- {
- ACE_HANDLE handle = eh->get_handle ();
-
- // Skip back to the beginning of the loop if the HANDLE is
- // invalid.
- if (handle == ACE_INVALID_HANDLE)
- continue;
-
-#if defined (ACE_WIN32) || defined (__MVS__)
- // Win32 needs to do the check this way because fstat won't work on
- // a socket handle. MVS Open Edition needs to do it this way because,
- // even though the docs say to check a handle with either select or
- // fstat, the fstat method always says the handle is ok.
- rd_mask.set_bit (handle);
-
- if (ACE_OS::select (int (handle) + 1,
- rd_mask, 0, 0,
- &time_poll) < 0)
- {
- result = 1;
- this->remove_handler_i (handle,
- ACE_Event_Handler::ALL_EVENTS_MASK);
- }
- rd_mask.clr_bit (handle);
-#else /* !ACE_WIN32 && !MVS */
- struct stat temp;
-
- if (ACE_OS::fstat (handle, &temp) == -1)
- {
- result = 1;
- this->remove_handler_i (handle,
- ACE_Event_Handler::ALL_EVENTS_MASK);
- }
-#endif /* ACE_WIN32 || MVS */
- }
-
- return result;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> void
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::dump (void) const
-{
- ACE_TRACE ("ACE_Select_Reactor_T::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- this->timer_queue_->dump ();
- this->handler_rep_.dump ();
- this->signal_handler_->dump ();
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("delete_signal_handler_ = %d\n"),
- this->delete_signal_handler_));
-
- ACE_HANDLE h;
-
- for (ACE_Handle_Set_Iterator handle_iter_wr (this->wait_set_.wr_mask_);
- (h = handle_iter_wr ()) != ACE_INVALID_HANDLE;
- ++handle_iter_wr)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("write_handle = %d\n"), h));
-
- for (ACE_Handle_Set_Iterator handle_iter_rd (this->wait_set_.rd_mask_);
- (h = handle_iter_rd ()) != ACE_INVALID_HANDLE;
- ++handle_iter_rd)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("read_handle = %d\n"), h));
-
- for (ACE_Handle_Set_Iterator handle_iter_ex (this->wait_set_.ex_mask_);
- (h = handle_iter_ex ()) != ACE_INVALID_HANDLE;
- ++handle_iter_ex)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("except_handle = %d\n"), h));
-
- for (ACE_Handle_Set_Iterator handle_iter_wr_ready (this->ready_set_.wr_mask_);
- (h = handle_iter_wr_ready ()) != ACE_INVALID_HANDLE;
- ++handle_iter_wr_ready)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("write_handle_ready = %d\n"), h));
-
- for (ACE_Handle_Set_Iterator handle_iter_rd_ready (this->ready_set_.rd_mask_);
- (h = handle_iter_rd_ready ()) != ACE_INVALID_HANDLE;
- ++handle_iter_rd_ready)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("read_handle_ready = %d\n"), h));
-
- for (ACE_Handle_Set_Iterator handle_iter_ex_ready (this->ready_set_.ex_mask_);
- (h = handle_iter_ex_ready ()) != ACE_INVALID_HANDLE;
- ++handle_iter_ex_ready)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("except_handle_ready = %d\n"), h));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("restart_ = %d\n"), this->restart_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nrequeue_position_ = %d\n"), this->requeue_position_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ninitialized_ = %d\n"), this->initialized_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nowner_ = %d\n"), this->owner_));
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- this->notify_handler_->dump ();
- this->token_.dump ();
-#endif /* ACE_MT_SAFE */
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-#endif /* ACE_SELECT_REACTOR_T_C */
diff --git a/ace/Select_Reactor_T.h b/ace/Select_Reactor_T.h
deleted file mode 100644
index 120516c0aa0..00000000000
--- a/ace/Select_Reactor_T.h
+++ /dev/null
@@ -1,671 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Select_Reactor_T.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SELECT_REACTOR_T_H
-#define ACE_SELECT_REACTOR_T_H
-#include "ace/pre.h"
-
-#include "ace/Select_Reactor_Base.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class ACE_SELECT_REACTOR_MUTEX>
-class ACE_Select_Reactor_Token_T : public ACE_SELECT_REACTOR_MUTEX
-{
- // = TITLE
- // Used as a synchronization mechanism to coordinate concurrent
- // access to a Select_Reactor object.
- //
- // = DESCRIPTION
- // This class is used to make the <ACE_Select_Reactor>
- // thread-safe. By default, the thread that runs the
- // <handle_events> loop holds the token, even when it is blocked
- // in the <select> call. Whenever another thread wants to
- // access the <ACE_Reactor> via its <register_handler>,
- // <remove_handler>, etc. methods) it must ask the token owner
- // for temporary release of the token. To accomplish this, the
- // owner of a token must define a <sleep_hook> through which it
- // can be notified to temporarily release the token if the
- // current situation permits this.
- //
- // The owner of the token is responsible for deciding which
- // request for the token can be granted. By using the
- // <ACE_Token::renew> API, the thread that releases the token
- // temporarily can specify to get the token back right after the
- // other thread has completed using the token. Thus, there is a
- // dedicated thread that owns the token ``by default.'' This
- // thread grants other threads access to the token by ensuring
- // that whenever somebody else has finished using the token the
- // ``default owner'' first holds the token again, i.e., the
- // owner has the chance to schedule other threads.
- //
- // The thread that most likely needs the token most of the time
- // is the thread running the dispatch loop. Typically the token
- // gets released prior to entering the <select> call and gets
- // ``re-acquired'' as soon as the <select> call returns, which
- // results probably in many calls to <release>/<acquire> that
- // are not really needed since no other thread would need the
- // token in the meantime. That's why the dispatcher thread is
- // chosen to be the owner of the token.
- //
- // In case the token would have been released while in <select>
- // there would be a good chance that the <fd_set> could have
- // been modified while the <select> returns from blocking and
- // trying to re-acquire the lock. Through the token mechanism
- // it is ensured that while another thread is holding the token,
- // the dispatcher thread is blocked in the <renew> call and not
- // in <select>. Thus, it is not critical to change the
- // <fd_set>. The implementation of the <sleep_hook> mechanism
- // provided by the <ACE_Select_Reactor_Token> enables the
- // default owner to be the thread that executes the dispatch
- // loop.
-public:
- ACE_Select_Reactor_Token_T (ACE_Select_Reactor_Impl &r);
- ACE_Select_Reactor_Token_T (void);
- virtual ~ACE_Select_Reactor_Token_T (void);
-
- virtual void sleep_hook (void);
- // Called just before the ACE_Event_Handler goes to sleep.
-
- ACE_Select_Reactor_Impl &select_reactor (void);
- void select_reactor (ACE_Select_Reactor_Impl &);
- // Set/Get methods
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Select_Reactor_Impl *select_reactor_;
-};
-
-template <class ACE_SELECT_REACTOR_TOKEN>
-class ACE_Select_Reactor_T : public ACE_Select_Reactor_Impl
-{
- // = TITLE
- // An object oriented event demultiplexor and event handler
- // dispatcher.
- //
- // = DESCRIPTION
- // The <ACE_Select_Reactor> is an object-oriented event
- // demultiplexor and event handler dispatcher. The sources of
- // events that the <ACE_Select_Reactor> waits for and dispatches
- // includes I/O events, signals, and timer events. All public
- // methods acquire the main <ACE_Select_Reactor_Token> lock and
- // call down to private or protected methods, which assume that
- // the lock is held and so therefore don't (re)acquire the lock.
-public:
- // = Initialization and termination methods.
-
- ACE_Select_Reactor_T (ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0,
- int disable_notify_pipe = 0,
- ACE_Reactor_Notify *notify = 0,
- int mask_signals = 1);
- // Initialize <ACE_Select_Reactor> with the default size.
-
- ACE_Select_Reactor_T (size_t size,
- int restart = 0,
- ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0,
- int disable_notify_pipe = 0,
- ACE_Reactor_Notify *notify = 0,
- int mask_signals = 1);
- // Initialize <ACE_Select_Reactor> with size <size>.
-
- virtual int open (size_t max_number_of_handles = DEFAULT_SIZE,
- int restart = 0,
- ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0,
- int disable_notify_pipe = 0,
- ACE_Reactor_Notify * = 0);
- // Initialize the <ACE_Select_Reactor> to manage
- // <max_number_of_handles>. If <restart> is non-0 then the
- // <ACE_Reactor>'s <handle_events> method will be restarted
- // automatically when <EINTR> occurs. If <signal_handler> or
- // <timer_queue> are non-0 they are used as the signal handler and
- // timer queue, respectively. If <disable_notify_pipe> is non-0 the
- // notification pipe is not created, thereby saving two I/O handles.
-
- virtual int current_info (ACE_HANDLE, size_t & /* size */);
- // Returns -1 (not used in this implementation);
-
- virtual int set_sig_handler (ACE_Sig_Handler *signal_handler);
- // Use a user specified signal handler instead.
-
- virtual int set_timer_queue (ACE_Timer_Queue *timer_queue);
- // Use a user specified timer queue instead.
-
- virtual int close (void);
- // Close down the select_reactor and release all of its resources.
-
- virtual ~ACE_Select_Reactor_T (void);
- // Close down the select_reactor and release all of its resources.
-
- // = Event loop drivers.
-
- virtual int work_pending (const ACE_Time_Value &max_wait_time = ACE_Time_Value::zero);
- // Returns non-zero if there are I/O events "ready" for dispatching,
- // but does not actually dispatch the event handlers. By default,
- // don't block while checking this, i.e., "poll".
-
- virtual int handle_events (ACE_Time_Value *max_wait_time = 0);
- virtual int alertable_handle_events (ACE_Time_Value *max_wait_time = 0);
- // This event loop driver that blocks for <max_wait_time> before
- // returning. It will return earlier if timer events, I/O events,
- // or signal events occur. Note that <max_wait_time> can be 0, in
- // which case this method blocks indefinitely until events occur.
- //
- // <max_wait_time> is decremented to reflect how much time this call
- // took. For instance, if a time value of 3 seconds is passed to
- // handle_events and an event occurs after 2 seconds,
- // <max_wait_time> will equal 1 second. This can be used if an
- // application wishes to handle events for some fixed amount of
- // time.
- //
- // Returns the total number of I/O and Timer <ACE_Event_Handler>s
- // that were dispatched, 0 if the <max_wait_time> elapsed without
- // dispatching any handlers, or -1 if something goes wrong.
- //
- // Current <alertable_handle_events> is identical to
- // <handle_events>.
-
- virtual int handle_events (ACE_Time_Value &max_wait_time);
- virtual int alertable_handle_events (ACE_Time_Value &max_wait_time);
- // This method is just like the one above, except the
- // <max_wait_time> value is a reference and can therefore never be
- // NULL.
- //
- // Current <alertable_handle_events> is identical to
- // <handle_events>.
-
- // = Event handling control.
-
- virtual int deactivated (void);
- // Return the status of Reactor. If this function returns 0, the reactor is
- // actively handling events. If it returns non-zero, <handling_events> and
- // <handle_alertable_events> return -1 immediately.
-
- virtual void deactivate (int do_stop);
- // Control whether the Reactor will handle any more incoming events or not.
- // If <do_stop> == 1, the Reactor will be disabled. By default, a reactor
- // is in active state and can be deactivated/reactived as wish.
-
- // = Register and remove <ACE_Event_Handler>s.
- virtual int register_handler (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask);
- // Register a <eh> with a particular <mask>. Note that the
- // <Select_Reactor> will call <ACE_Event_Handler::get_handle> to
- // extract the underlying I/O handle.
-
- virtual int register_handler (ACE_HANDLE handle,
- ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask);
- // Register a <eh> with a particular <mask>. Note that since the
- // <handle> is given the Select_Reactor will *not* call
- // <ACE_Event_Handler::get_handle> to extract the underlying I/O
- // handle.
-
-#if defined (ACE_WIN32)
-
- // Originally this interface was available for all platforms, but
- // because ACE_HANDLE is an int on non-Win32 platforms, compilers
- // are not able to tell the difference between
- // register_handler(ACE_Event_Handler*,ACE_Reactor_Mask) and
- // register_handler(ACE_Event_Handler*,ACE_HANDLE). Therefore, we
- // have restricted this method to Win32 only.
-
- virtual int register_handler (ACE_Event_Handler *event_handler,
- ACE_HANDLE event_handle = ACE_INVALID_HANDLE);
- // Not implemented.
-
-#endif /* ACE_WIN32 */
-
- virtual int register_handler (ACE_HANDLE event_handle,
- ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // Not implemented.
-
- virtual int register_handler (const ACE_Handle_Set &handles,
- ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask);
- // Register <eh> with all the <handles> in the <Handle_Set>.
-
- virtual int register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0,
- ACE_Event_Handler **old_sh = 0,
- ACE_Sig_Action *old_disp = 0);
- // Register <new_sh> to handle the signal <signum> using the
- // <new_disp>. Returns the <old_sh> that was previously registered
- // (if any), along with the <old_disp> of the signal handler.
-
- virtual int register_handler (const ACE_Sig_Set &sigset,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0);
- // Registers <new_sh> to handle a set of signals <sigset> using the
- // <new_disp>.
-
- virtual int remove_handler (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask);
- // Removes the <mask> binding of <eh> from the Select_Reactor. If
- // there are no more bindings for this <eh> then it is removed from
- // the Select_Reactor. Note that the Select_Reactor will call
- // <ACE_Event_Handler::get_handle> to extract the underlying I/O
- // handle.
-
- virtual int remove_handler (ACE_HANDLE handle,
- ACE_Reactor_Mask);
- // Removes the <mask> bind of <Event_Handler> whose handle is
- // <handle> from the Select_Reactor. If there are no more bindings
- // for this <eh> then it is removed from the Select_Reactor.
-
- virtual int remove_handler (const ACE_Handle_Set &handle_set,
- ACE_Reactor_Mask);
- // Removes all the <mask> bindings for handles in the <handle_set>
- // bind of <Event_Handler>. If there are no more bindings for any
- // of these handlers then they are removed from the Select_Reactor.
-
- virtual int remove_handler (int signum,
- ACE_Sig_Action *new_disp,
- ACE_Sig_Action *old_disp = 0,
- int sigkey = -1);
- // Remove the ACE_Event_Handler currently associated with <signum>.
- // <sigkey> is ignored in this implementation since there is only
- // one instance of a signal handler. Install the new disposition
- // (if given) and return the previous disposition (if desired by the
- // caller). Returns 0 on success and -1 if <signum> is invalid.
-
- virtual int remove_handler (const ACE_Sig_Set &sigset);
- // Calls <remove_handler> for every signal in <sigset>.
-
- // = Suspend and resume Handlers.
-
- virtual int suspend_handler (ACE_Event_Handler *eh);
- // Temporarily suspend the <Event_Handler> associated with <eh>.
-
- virtual int suspend_handler (ACE_HANDLE handle);
- // Temporarily suspend the <Event_Handler> associated with <handle>.
-
- virtual int suspend_handler (const ACE_Handle_Set &handles);
- // Suspend all <handles> in handle set temporarily.
-
- virtual int suspend_handlers (void);
- // Suspend all the <Event_Handlers> in the Select_Reactor.
-
- virtual int resume_handler (ACE_Event_Handler *eh);
- // Resume a temporarily suspend <Event_Handler> associated with
- // <eh>.
-
- virtual int resume_handler (ACE_HANDLE handle);
- // Resume a temporarily suspended <Event_Handler> associated with
- // <handle>.
-
- virtual int resume_handler (const ACE_Handle_Set &handles);
- // Resume all <handles> in handle set.
-
- virtual int resume_handlers (void);
- // Resume all the <Event_Handlers> in the Select_Reactor.
-
- virtual int uses_event_associations (void);
- // Return 1 if we any event associations were made by the reactor
- // for the handles that it waits on, 0 otherwise. Since the
- // Select_Reactor does not do any event associations, this function
- // always return 0.
-
- // = Timer management.
- virtual long schedule_timer (ACE_Event_Handler *,
- const void *arg,
- const ACE_Time_Value &delta,
- const ACE_Time_Value &interval = ACE_Time_Value::zero);
- // Schedule an <event_handler> that will expire after <delta> amount
- // of time, which is specified as relative time to the current
- // <gettimeofday>. If it expires then <arg> is passed in as the
- // value to the <event_handler>'s <handle_timeout> callback method.
- // If <interval> is != to <ACE_Time_Value::zero> then it is used to
- // reschedule the <event_handler> automatically, which is also
- // specified using relative time. This method returns a <timer_id>
- // that uniquely identifies the <event_handler> in an internal list.
- // This <timer_id> can be used to cancel an <event_handler> before
- // it expires. The cancellation ensures that <timer_ids> are unique
- // up to values of greater than 2 billion timers. As long as timers
- // don't stay around longer than this there should be no problems
- // with accidentally deleting the wrong timer. Returns -1 on
- // failure (which is guaranteed never to be a valid <timer_id>.
-
- virtual int reset_timer_interval (long timer_id,
- const ACE_Time_Value &interval);
- // Resets the interval of the timer represented by <timer_id> to
- // <interval>, which is specified in relative time to the current
- // <gettimeofday>. If <interval> is equal to
- // <ACE_Time_Value::zero>, the timer will become a non-rescheduling
- // timer. Returns 0 if successful, -1 if not.
-
- virtual int cancel_timer (ACE_Event_Handler *event_handler,
- int dont_call_handle_close = 1);
- // Cancel all <event_handlers> that match the address of
- // <event_handler>. If <dont_call_handle_close> is 0 then the
- // <handle_close> method of <event_handler> will be invoked.
- // Returns number of handler's cancelled.
-
- virtual int cancel_timer (long timer_id,
- const void **arg = 0,
- int dont_call_handle_close = 1);
- // Cancel the single <ACE_Event_Handler> that matches the <timer_id>
- // value (which was returned from the <schedule> method). If arg is
- // non-NULL then it will be set to point to the ``magic cookie''
- // argument passed in when the <Event_Handler> was registered. This
- // makes it possible to free up the memory and avoid memory leaks.
- // If <dont_call_handle_close> is 0 then the <handle_close> method
- // of <event_handler> will be invoked. Returns 1 if cancellation
- // succeeded and 0 if the <timer_id> wasn't found.
-
- // = High-level Event_Handler scheduling operations
-
- virtual int schedule_wakeup (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask);
- // ADD the dispatch MASK "bit" bound with the <eh> and the <mask>.
-
- virtual int schedule_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask mask);
- // ADD the dispatch MASK "bit" bound with the <handle> and the <mask>.
-
- virtual int cancel_wakeup (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask);
- // CLR the dispatch MASK "bit" bound with the <eh> and the <mask>.
-
- virtual int cancel_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask mask);
- // CLR the dispatch MASK "bit" bound with the <handle> and the <mask>.
-
- // = Notification methods.
- virtual int notify (ACE_Event_Handler * = 0,
- ACE_Reactor_Mask = ACE_Event_Handler::EXCEPT_MASK,
- ACE_Time_Value * = 0);
- // Called by a thread when it wants to unblock the Select_Reactor.
- // This wakeups the <ACE_Select_Reactor> if currently blocked in
- // <select>/<poll>. Pass over both the <Event_Handler> *and* the
- // <mask> to allow the caller to dictate which <Event_Handler>
- // method the <Select_Reactor> will invoke. The <ACE_Time_Value>
- // indicates how long to blocking trying to notify the
- // <Select_Reactor>. If <timeout> == 0, the caller will block until
- // action is possible, else will wait until the relative time
- // specified in *<timeout> elapses).
-
- virtual void max_notify_iterations (int);
- // Set the maximum number of times that the
- // <ACE_Select_Reactor_Notify::handle_input> method will iterate and
- // dispatch the <ACE_Event_Handlers> that are passed in via the
- // notify pipe before breaking out of its <recv> loop. By default,
- // this is set to -1, which means "iterate until the pipe is empty."
- // Setting this to a value like "1 or 2" will increase "fairness"
- // (and thus prevent starvation) at the expense of slightly higher
- // dispatching overhead.
-
- virtual int max_notify_iterations (void);
- // Get the maximum number of times that the
- // <ACE_Select_Reactor_Notify::handle_input> method will iterate and
- // dispatch the <ACE_Event_Handlers> that are passed in via the
- // notify pipe before breaking out of its <recv> loop.
-
- virtual int restart (void);
- // Get the existing restart value.
-
- virtual int restart (int r);
- // Set a new value for restart and return the original value.
-
- virtual void requeue_position (int);
- // Set position that the main ACE_Select_Reactor thread is requeued in the
- // list of waiters during a <notify> callback.
-
- virtual int requeue_position (void);
- // Get position that the main ACE_Select_Reactor thread is requeued in the
- // list of waiters during a <notify> callback.
-
- // = Low-level wait_set mask manipulation methods.
- virtual int mask_ops (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask,
- int ops);
- // GET/SET/ADD/CLR the dispatch mask "bit" bound with the <eh> and
- // <mask>.
-
- virtual int mask_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops);
- // GET/SET/ADD/CLR the dispatch MASK "bit" bound with the <handle>
- // and <mask>.
-
- // = Low-level ready_set mask manipulation methods.
- virtual int ready_ops (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask,
- int ops);
- // GET/SET/ADD/CLR the ready "bit" bound with the <eh> and <mask>.
-
- virtual int ready_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask,
- int ops);
- // GET/SET/ADD/CLR the ready "bit" bound with the <handle> and <mask>.
-
- virtual void wakeup_all_threads (void);
- // Wake up all threads in waiting in the event loop
-
- // = Only the owner thread that can perform a <handle_events>.
-
- virtual int owner (ACE_thread_t n_id, ACE_thread_t *o_id = 0);
- // Set the new owner of the thread and return the old owner.
-
- virtual int owner (ACE_thread_t *);
- // Return the current owner of the thread.
-
- // = Miscellaneous Handler operations.
- virtual int handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Event_Handler **eh = 0);
- // Check to see if <handle> is associated with a valid Event_Handler
- // bound to <mask>. Return the <eh> associated with this <handler>
- // if <eh> != 0.
-
- virtual int handler (int signum,
- ACE_Event_Handler ** = 0);
- // Check to see if <signum> is associated with a valid Event_Handler
- // bound to a signal. Return the <eh> associated with this
- // <handler> if <eh> != 0.
-
- virtual int initialized (void);
- // Returns true if we've been successfully initialized, else false.
-
- virtual size_t size (void);
- // Returns the current size of the Reactor's internal descriptor
- // table.
-
- virtual ACE_Lock &lock (void);
- // Returns a reference to the <ACE_Select_Reactor_Token> that is
- // used to serialize the internal Select_Reactor's processing logic.
- // This can be useful for situations where you need to avoid
- // deadlock efficiently when <ACE_Event_Handlers> are used in
- // multiple threads.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Internal methods that do the actual work.
-
- // All of these methods assume that the <Select_Reactor>'s token
- // lock is held by the public methods that call down to them.
-
- virtual int register_handler_i (ACE_HANDLE handle,
- ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask);
- // Do the work of actually binding the <handle> and <eh> with the
- // <mask>.
-
- virtual int register_handler_i (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask);
- // Register a set of <handles>.
-
- virtual int remove_handler_i (ACE_HANDLE handle,
- ACE_Reactor_Mask);
- // Do the work of actually unbinding the <handle> and <eh> with the
- // <mask>.
-
- virtual int remove_handler_i (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask);
- // Remove a set of <handles>.
-
- virtual int suspend_i (ACE_HANDLE handle);
- // Suspend the <Event_Handler> associated with <handle>
-
- virtual int resume_i (ACE_HANDLE handle);
- // Resume the <Event_Handler> associated with <handle>
-
- virtual int handler_i (ACE_HANDLE handle,
- ACE_Reactor_Mask,
- ACE_Event_Handler ** = 0);
- // Implement the public <handler> method.
-
- virtual int handler_i (int signum, ACE_Event_Handler ** = 0);
- // Implement the public <handler> method.
-
- virtual int any_ready (ACE_Select_Reactor_Handle_Set &handle_set);
- // Check if there are any HANDLEs enabled in the <ready_set_>, and
- // if so, update the <handle_set> and return the number ready. If
- // there aren't any HANDLEs enabled return 0.
-
- virtual int any_ready_i (ACE_Select_Reactor_Handle_Set &handle_set);
- // Implement the <any_ready> method, assuming that the Sig_Guard is
- // beign held
-
- virtual int handle_error (void);
- // Take corrective action when errors occur.
-
- virtual int check_handles (void);
- // Make sure the handles are all valid.
-
- virtual int wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &,
- ACE_Time_Value *);
- // Wait for events to occur.
-
- // = Dispatching methods.
-
- virtual int dispatch (int nfound,
- ACE_Select_Reactor_Handle_Set &);
- // Template Method that dispatches <ACE_Event_Handler>s for time
- // events, I/O events, and signal events. Returns the total number
- // of <ACE_Event_Handler>s that were dispatched or -1 if something
- // goes wrong.
-
- virtual int dispatch_timer_handlers (int &number_dispatched);
- // Dispatch all timer handlers that have expired. Returns -1 if the
- // state of the <wait_set_> has changed, else 0.
- // <number_dispatched> is set to the number of timer handlers
- // dispatched.
-
- virtual int dispatch_notification_handlers (ACE_Select_Reactor_Handle_Set &dispatch_set,
- int &number_of_active_handles,
- int &number_of_handlers_dispatched);
- // Dispatch any notification handlers. Returns -1 if the state of
- // the <wait_set_> has changed, else returns number of handlers
- // notified.
-
- virtual int dispatch_io_handlers (ACE_Select_Reactor_Handle_Set &dispatch_set,
- int &number_of_active_handles,
- int &number_of_handlers_dispatched);
- // Dispatch all the input/output/except handlers that are enabled in
- // the <dispatch_set>. Updates <number_of_active_handles> and
- // <number_of_handlers_dispatched> according to the behavior of the
- // number Returns -1 if the state of the <wait_set_> has changed,
- // else 0.
-
- virtual int dispatch_io_set (int number_of_active_handles,
- int &number_of_handlers_dispatched,
- int mask,
- ACE_Handle_Set& dispatch_mask,
- ACE_Handle_Set& ready_mask,
- ACE_EH_PTMF callback);
- // Factors the dispatching of an io handle set (each WRITE, EXCEPT
- // or READ set of handles). It updates the
- // <number_of_handlers_dispatched> and invokes this->notify_handle
- // for all the handles in <dispatch_set> using the <mask>,
- // <ready_set> and <callback> parameters. Must return -1 if
- // this->state_changed otherwise it must return 0.
-
- virtual void notify_handle (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Handle_Set &,
- ACE_Event_Handler *eh,
- ACE_EH_PTMF callback);
- // Notify the appropriate <callback> in the context of the <eh>
- // associated with <handle> that a particular event has occurred.
-
- virtual void renew (void);
- // Enqueue ourselves into the list of waiting threads at the
- // appropriate point specified by <requeue_position_>.
-
- ACE_SELECT_REACTOR_TOKEN token_;
- // Synchronization token for the MT_SAFE ACE_Select_Reactor.
-
- ACE_Lock_Adapter<ACE_SELECT_REACTOR_TOKEN> lock_adapter_;
- // Adapter used to return internal lock to outside world.
-
- int release_token (void);
- // Release the token lock when a Win32 structured exception occurs.
-
- int handle_events_i (ACE_Time_Value *max_wait_time = 0);
- // Stops the VC++ compiler from bitching about exceptions and destructors
-
- sig_atomic_t deactivated_;
- // This flag is used to keep track of whether we are actively handling
- // events or not.
-
- int mask_signals_;
- // If 0 then the Reactor will not mask the signals during the event
- // dispatching. This is useful for applications that do not
- // register any signal handlers and want to reduce the overhead
- // introduce by the kernel level locks required to change the mask.
-
-private:
- ACE_UNIMPLEMENTED_FUNC (ACE_Select_Reactor_T (const ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN> &operator= (const ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN> &) )
- // Deny access since member-wise won't work...
-};
-
-// @@ The latest version of SunCC can't grok the code if we put inline
-// function here. Therefore, we temporarily disable the code here.
-// We shall turn this back on once we know the problem gets fixed.
-#if 0 // defined (__ACE_INLINE__)
-#include "ace/Select_Reactor_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Select_Reactor_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Select_Reactor_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_SELECT_REACTOR_T_H */
diff --git a/ace/Select_Reactor_T.i b/ace/Select_Reactor_T.i
deleted file mode 100644
index 9c447a5d50b..00000000000
--- a/ace/Select_Reactor_T.i
+++ /dev/null
@@ -1,239 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/Reactor.h"
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::resume_handler (ACE_Event_Handler *h)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::resume_handler");
- return this->resume_handler (h->get_handle ());
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::resume_handler (const ACE_Handle_Set &handles)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::resume_handler");
- ACE_Handle_Set_Iterator handle_iter (handles);
- ACE_HANDLE h;
-
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
-
- while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
- if (this->resume_i (h) == -1)
- return -1;
-
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::suspend_handler (ACE_Event_Handler *h)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::suspend_handler");
- return this->suspend_handler (h->get_handle ());
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::suspend_handler (const ACE_Handle_Set &handles)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::suspend_handler");
- ACE_Handle_Set_Iterator handle_iter (handles);
- ACE_HANDLE h;
-
- ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
-
- while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
- if (this->suspend_i (h) == -1)
- return -1;
-
- return 0;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp,
- ACE_Event_Handler **old_sh,
- ACE_Sig_Action *old_disp)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::register_handler");
- return this->signal_handler_->register_handler (signum,
- new_sh, new_disp,
- old_sh, old_disp);
-}
-
-#if defined (ACE_WIN32)
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::register_handler (ACE_Event_Handler *event_handler,
- ACE_HANDLE event_handle)
-{
- // Don't have an implementation for this yet...
- ACE_UNUSED_ARG (event_handler);
- ACE_UNUSED_ARG (event_handle);
- ACE_NOTSUP_RETURN (-1);
-}
-
-#endif /* ACE_WIN32 */
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::register_handler (ACE_HANDLE event_handle,
- ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- // Don't have an implementation for this yet...
- ACE_UNUSED_ARG (event_handle);
- ACE_UNUSED_ARG (io_handle);
- ACE_UNUSED_ARG (event_handler);
- ACE_UNUSED_ARG (mask);
- ACE_NOTSUP_RETURN (-1);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::handler (int signum, ACE_Event_Handler **handler)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::handler");
- return this->handler_i (signum, handler);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::remove_handler (int signum,
- ACE_Sig_Action *new_disp,
- ACE_Sig_Action *old_disp,
- int sigkey)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::remove_handler");
- return this->signal_handler_->remove_handler (signum, new_disp, old_disp, sigkey);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::uses_event_associations (void)
-{
- // Since the Select_Reactor does not do any event associations, this
- // function always return 0.
- return 0;
-}
-
-// = The remaining methods in this file must be called with locks
-// held. Note the queue handles its own locking.
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::cancel_timer");
- return this->timer_queue_ != 0 &&
- this->timer_queue_->cancel (handler, dont_call_handle_close);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::cancel_timer (long timer_id,
- const void **arg,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::cancel_timer");
- return this->timer_queue_->cancel (timer_id,
- arg,
- dont_call_handle_close);
-}
-
-// Performs operations on the "ready" bits.
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::ready_ops (ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask,
- int ops)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::ready_ops");
- return this->ready_ops (handler->get_handle (), mask, ops);
-}
-
-// Performs operations on the "dispatch" masks.
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::mask_ops (ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask,
- int ops)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::mask_ops");
- return this->mask_ops (handler->get_handle (), mask, ops);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::schedule_wakeup (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::schedule_wakeup");
- return this->mask_ops (eh->get_handle (), mask, ACE_Reactor::ADD_MASK);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::cancel_wakeup (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::cancel_wakeup");
- return this->mask_ops (eh->get_handle (), mask, ACE_Reactor::CLR_MASK);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::schedule_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::schedule_wakeup");
- return this->mask_ops (handle, mask, ACE_Reactor::ADD_MASK);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::cancel_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::cancel_wakeup");
- return this->mask_ops (handle, mask, ACE_Reactor::CLR_MASK);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ ACE_Lock &
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::lock (void)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::lock");
- return this->lock_adapter_;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ void
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::wakeup_all_threads (void)
-{
- // Send a notification, but don't block if there's no one to receive
- // it.
- this->notify (0, ACE_Event_Handler::NULL_MASK, (ACE_Time_Value *) &ACE_Time_Value::zero);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::alertable_handle_events (ACE_Time_Value *max_wait_time)
-{
- return this->handle_events (max_wait_time);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::alertable_handle_events (ACE_Time_Value &max_wait_time)
-{
- return this->handle_events (max_wait_time);
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::deactivated (void)
-{
- return this->deactivated_;
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ void
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::deactivate (int do_stop)
-{
- this->deactivated_ = do_stop;
- this->wakeup_all_threads ();
-}
-
-template <class ACE_SELECT_REACTOR_TOKEN> /* ACE_INLINE */ size_t
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::size (void)
-{
- return this->handler_rep_.size ();
-}
diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp
deleted file mode 100644
index bbbe1a51d4f..00000000000
--- a/ace/Service_Config.cpp
+++ /dev/null
@@ -1,894 +0,0 @@
-// $Id$
-
-#include "ace/Svc_Conf.h"
-#include "ace/Get_Opt.h"
-#include "ace/ARGV.h"
-#include "ace/Malloc.h"
-#include "ace/Service_Manager.h"
-#include "ace/Service_Repository.h"
-#include "ace/Service_Types.h"
-#include "ace/Containers.h"
-#include "ace/Auto_Ptr.h"
-#if !defined (ACE_HAS_WINCE)
-# include "ace/Proactor.h"
-#endif /* !ACE_HAS_WINCE */
-#include "ace/Reactor.h"
-#include "ace/Thread_Manager.h"
-
-#include "ace/Service_Config.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Service_Config.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Service_Config, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Service_Config)
-
-void
-ACE_Service_Config::dump (void) const
-{
- ACE_TRACE ("ACE_Service_Config::dump");
-}
-
-// All the factory functions that allocate default statically linked
-// services should be placed below.
-
-// Allocate a Service Manager.
-
-ACE_FACTORY_DEFINE (ACE, ACE_Service_Manager)
-
-// ----------------------------------------
-
-// Set the signal handler to point to the handle_signal() function.
-ACE_Sig_Adapter *ACE_Service_Config::signal_handler_ = 0;
-
-// Trigger a reconfiguration.
-sig_atomic_t ACE_Service_Config::reconfig_occurred_ = 0;
-
- // = Set by command-line options.
-char ACE_Service_Config::be_a_daemon_ = 0;
-char ACE_Service_Config::no_static_svcs_ = 1;
-
-// Number of the signal used to trigger reconfiguration.
-int ACE_Service_Config::signum_ = SIGHUP;
-
-// Indicates where to write the logging output. This is typically
-// either a STREAM pipe or a socket address.
-const ACE_TCHAR *ACE_Service_Config::logger_key_ = ACE_DEFAULT_LOGGER_KEY;
-
-// The ACE_Service_Manager static service object is now defined by the
-// ACE_Object_Manager, in Object_Manager.cpp.
-
-// Are we initialized already?
-int ACE_Service_Config::is_initialized_ = 0;
-
-// List of statically configured services.
-
-ACE_STATIC_SVCS *ACE_Service_Config::static_svcs_ = 0;
-ACE_SVC_QUEUE *ACE_Service_Config::svc_queue_ = 0;
-ACE_SVC_QUEUE *ACE_Service_Config::svc_conf_file_queue_ = 0;
-
-ACE_STATIC_SVCS *
-ACE_Service_Config::static_svcs (void)
-{
- if (ACE_Service_Config::static_svcs_ == 0)
- ACE_NEW_RETURN (ACE_Service_Config::static_svcs_,
- ACE_STATIC_SVCS,
- 0);
- return ACE_Service_Config::static_svcs_;
-}
-
-ACE_Allocator *
-ACE_Service_Config::alloc (void)
-{
- ACE_TRACE ("ACE_Service_Config::allocator");
- return ACE_Allocator::instance ();
-}
-
-ACE_Allocator *
-ACE_Service_Config::alloc (ACE_Allocator *r)
-{
- ACE_TRACE ("ACE_Service_Config::allocator");
- return ACE_Allocator::instance (r);
-}
-
-ACE_Reactor *
-ACE_Service_Config::reactor (void)
-{
- ACE_TRACE ("ACE_Service_Config::reactor");
- return ACE_Reactor::instance ();
-}
-
-ACE_Reactor *
-ACE_Service_Config::reactor (ACE_Reactor *r)
-{
- ACE_TRACE ("ACE_Service_Config::reactor");
- return ACE_Reactor::instance (r);
-}
-
-ACE_Service_Repository *
-ACE_Service_Config::svc_rep ()
-{
- ACE_TRACE ("ACE_Service_Config::svc_rep");
- return ACE_Service_Repository::instance ();
-}
-
-ACE_Service_Repository *
-ACE_Service_Config::svc_rep (ACE_Service_Repository *s)
-{
- ACE_TRACE ("ACE_Service_Config::svc_rep");
- return ACE_Service_Repository::instance (s);
-}
-
-ACE_Thread_Manager *
-ACE_Service_Config::thr_mgr (void)
-{
- ACE_TRACE ("ACE_Service_Config::thr_mgr");
-
-#if defined (ACE_THREAD_MANAGER_LACKS_STATICS)
- return ACE_THREAD_MANAGER_SINGLETON::instance ();
-#else /* ! ACE_THREAD_MANAGER_LACKS_STATICS */
- return ACE_Thread_Manager::instance ();
-#endif /* ACE_THREAD_MANAGER_LACKS_STATICS */
-}
-
-#if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS)
-ACE_Thread_Manager *
-ACE_Service_Config::thr_mgr (ACE_Thread_Manager *tm)
-{
- ACE_TRACE ("ACE_Service_Config::thr_mgr");
- return ACE_Thread_Manager::instance (tm);
-}
-#endif /* ! ACE_THREAD_MANAGER_LACKS_STATICS */
-
-// Totally remove <svc_name> from the daemon by removing it from the
-// ACE_Reactor, and unlinking it if necessary.
-
-int
-ACE_Service_Config::remove (const ACE_TCHAR svc_name[])
-{
- ACE_TRACE ("ACE_Service_Config::remove");
- return ACE_Service_Repository::instance ()->remove (svc_name);
-}
-
-// Suspend <svc_name>. Note that this will not unlink the service
-// from the daemon if it was dynamically linked, it will mark it as
-// being suspended in the Service Repository and call the <suspend>
-// member function on the appropriate <ACE_Service_Object>. A service
-// can be resumed later on by calling the <resume> method...
-
-int
-ACE_Service_Config::suspend (const ACE_TCHAR svc_name[])
-{
- ACE_TRACE ("ACE_Service_Config::suspend");
- return ACE_Service_Repository::instance ()->suspend (svc_name);
-}
-
-// Resume a SVC_NAME that was previously suspended or has not yet
-// been resumed (e.g., a static service).
-
-int
-ACE_Service_Config::resume (const ACE_TCHAR svc_name[])
-{
- ACE_TRACE ("ACE_Service_Config::resume");
- return ACE_Service_Repository::instance ()->resume (svc_name);
-}
-
-// Initialize the Service Repository. Note that this *must* be
-// performed in the constructor (rather than <open>) since otherwise
-// the repository will not be properly initialized to allow static
-// configuration of services...
-
-ACE_Service_Config::ACE_Service_Config (int ignore_static_svcs,
- size_t size,
- int signum)
-{
- ACE_TRACE ("ACE_Service_Config::ACE_Service_Config");
- ACE_Service_Config::no_static_svcs_ = (char) ignore_static_svcs;
- ACE_Service_Config::signum_ = signum;
-
- // Initialize the Service Repository.
- ACE_Service_Repository::instance (size);
-
- // Initialize the ACE_Reactor (the ACE_Reactor should be the same
- // size as the ACE_Service_Repository).
- ACE_Reactor::instance ();
-}
-
-int
-ACE_Service_Config::init_svc_conf_file_queue (void)
-{
- if (ACE_Service_Config::svc_conf_file_queue_ == 0)
- ACE_NEW_RETURN (ACE_Service_Config::svc_conf_file_queue_,
- ACE_SVC_QUEUE,
- -1);
- return 0;
-}
-
-// Handle the command-line options intended for the
-// ACE_Service_Config.
-
-int
-ACE_Service_Config::parse_args (int argc, ACE_TCHAR *argv[])
-{
- ACE_TRACE ("ACE_Service_Config::parse_args");
- ACE_Get_Opt getopt (argc,
- argv,
- ACE_TEXT ("bdf:k:nys:S:"),
- 1); // Start at argv[1].
-
- if (ACE_Service_Config::init_svc_conf_file_queue () == -1)
- return -1;
-
- for (int c; (c = getopt ()) != -1; )
- switch (c)
- {
- case 'b':
- ACE_Service_Config::be_a_daemon_ = 1;
- break;
- case 'd':
- ACE::debug (1);
- break;
- case 'f':
- if (ACE_Service_Config::svc_conf_file_queue_->enqueue_tail
- (ACE_TString (getopt.optarg)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- "enqueue_tail"),
- -1);
- break;
- case 'k':
- ACE_Service_Config::logger_key_ = getopt.optarg;
- break;
- case 'n':
- ACE_Service_Config::no_static_svcs_ = 1;
- break;
- case 'y':
- ACE_Service_Config::no_static_svcs_ = 0;
- break;
- case 's':
- {
- // There's no point in dealing with this on NT since it
- // doesn't really support signals very well...
-#if !defined (ACE_LACKS_UNIX_SIGNALS)
- ACE_Service_Config::signum_ =
- ACE_OS::atoi (getopt.optarg);
-
- if (ACE_Reactor::instance ()->register_handler
- (ACE_Service_Config::signum_,
- ACE_Service_Config::signal_handler_) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("cannot obtain signal handler\n")),
- -1);
-#endif /* ACE_LACKS_UNIX_SIGNALS */
- break;
- }
- case 'S':
- if (ACE_Service_Config::svc_queue_ == 0)
- ACE_NEW_RETURN (ACE_Service_Config::svc_queue_,
- ACE_SVC_QUEUE,
- -1);
- if (ACE_Service_Config::svc_queue_->enqueue_tail
- (ACE_TString (getopt.optarg)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- "enqueue_tail"),
- -1);
- break;
- default:
- if (ACE::debug () > 0)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%c is not a ACE_Service_Config option\n"),
- c));
- }
-
- return 0;
-}
-
-// Initialize and activate a statically linked service.
-
-int
-ACE_Service_Config::initialize (const ACE_TCHAR svc_name[],
- ACE_TCHAR *parameters)
-{
- ACE_TRACE ("ACE_Service_Config::initialize");
- ACE_ARGV args (parameters);
- ACE_Service_Type *srp = 0;
-
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("opening static service %s\n"),
- svc_name));
-
- if (ACE_Service_Repository::instance ()->find
- (svc_name,
- (const ACE_Service_Type **) &srp) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%s not found\n"),
- svc_name),
- -1);
- else if (srp->type ()->init (args.argc (),
- args.argv ()) == -1)
- {
- // Remove this entry.
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("static initialization failed, %p\n"),
- svc_name));
- ACE_Service_Repository::instance ()->remove (svc_name);
- return -1;
- }
- else
- {
- srp->active (1);
- return 0;
- }
-}
-
-// Dynamically link the shared object file and retrieve a pointer to
-// the designated shared object in this file.
-
-int
-ACE_Service_Config::initialize (const ACE_Service_Type *sr,
- ACE_TCHAR parameters[])
-{
- ACE_TRACE ("ACE_Service_Config::initialize");
- ACE_ARGV args (parameters);
-
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("opening dynamic service %s\n"),
- sr->name ()));
-
- if (ACE_Service_Repository::instance ()->insert (sr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("insertion failed, %p\n"),
- sr->name ()),
- -1);
- else if (sr->type ()->init (args.argc (),
- args.argv ()) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("dynamic initialization failed for %s\n"),
- sr->name ()));
- ACE_Service_Repository::instance ()->remove (sr->name ());
- return -1;
- }
- else
- return 0;
-}
-
-int
-ACE_Service_Config::process_directives_i (void)
-{
- // AC 970827 Skip the heap check because yacc allocates a buffer
- // here which will be reported as a memory leak for some reason.
- ACE_NO_HEAP_CHECK
-
- // The fact that these are all global variables means that we really
- // can't be doing this processing in multiple threads
- // simultaneously...
- ace_yyerrno = 0;
- ace_yylineno = 1;
-
- ACE_Obstack *oldstack = ace_obstack;
-
- ACE_NEW_RETURN (ace_obstack,
- ACE_Obstack,
- -1);
-
- ace_yyparse ();
-
- delete ace_obstack;
- ace_obstack = oldstack;
-
- if (ace_yyerrno > 0)
- {
- // This is a hack, better errors should be provided...
- errno = EINVAL;
- return ace_yyerrno;
- }
- else
- return 0;
-}
-
-int
-ACE_Service_Config::process_directive (const ACE_TCHAR directive[])
-{
- ACE_TRACE ("ACE_Service_Config::process_directives");
- ACE_UNUSED_ARG (directive);
-
- ace_yyrestart (0);
-
- // Place <directive> into a buffer that the YY_INPUT macro knows how
- // to process correctly.
- ace_yydirective = directive;
-
- int result = ACE_Service_Config::process_directives_i ();
-
- // Reset to 0 to avoid confusing the YY_INPUT macro on subsequent
- // requests.
- ace_yydirective = 0;
- return result;
-}
-
-// Process service configuration requests as indicated in the queue of
-// svc.conf files.
-
-int
-ACE_Service_Config::process_directives (void)
-{
- ACE_TRACE ("ACE_Service_Config::process_directives");
-
- int result = 0;
-
- if (ACE_Service_Config::svc_conf_file_queue_ != 0)
- {
- ACE_TString *sptr = 0;
- ACE_SVC_QUEUE &queue = *ACE_Service_Config::svc_conf_file_queue_;
-
- // Iterate through all the svc.conf files.
- for (ACE_SVC_QUEUE_ITERATOR iter (queue);
- iter.next (sptr) != 0;
- iter.advance ())
- {
- FILE *fp = ACE_OS::fopen (sptr->fast_rep (),
- ACE_TEXT ("r"));
- if (fp == 0)
- {
- // Invalid svc.conf file. We'll report it here and
- // break out of the method.
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%p\n"),
- sptr->fast_rep ()));
- errno = ENOENT;
- result = -1;
- break;
- }
- else
- {
- ace_yyrestart (fp);
- // Keep track of the number of errors.
- result += ACE_Service_Config::process_directives_i ();
- }
- ACE_OS::fclose (fp);
- }
- }
-
- return result;
-}
-
-int
-ACE_Service_Config::process_commandline_directives (void)
-{
- int result = 0;
-
- if (ACE_Service_Config::svc_queue_ != 0)
- {
- ACE_TString *sptr = 0;
- ACE_SVC_QUEUE &queue = *ACE_Service_Config::svc_queue_;
-
- for (ACE_SVC_QUEUE_ITERATOR iter (queue);
- iter.next (sptr) != 0;
- iter.advance ())
- {
- // Process just a single directive.
- if (ACE_Service_Config::process_directive
- (sptr->fast_rep ()) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("process_directive")));
- result = -1;
- }
- }
-
- delete ACE_Service_Config::svc_queue_;
- ACE_Service_Config::svc_queue_ = 0;
- }
-
- return result;
-}
-
-// Add the default statically-linked services to the Service
-// Repository.
-
-int
-ACE_Service_Config::load_static_svcs (void)
-{
- ACE_TRACE ("ACE_Service_Config::load_static_svcs");
-
- ACE_Static_Svc_Descriptor **ssdp = 0;
- ACE_STATIC_SVCS &svcs = *ACE_Service_Config::static_svcs ();
-
- for (ACE_STATIC_SVCS_ITERATOR iter (svcs);
- iter.next (ssdp) != 0;
- iter.advance ())
- {
- ACE_Static_Svc_Descriptor *ssd = *ssdp;
-
- ACE_Service_Object_Exterminator gobbler;
- void *sym = (*ssd->alloc_)(&gobbler);
-
- ACE_Service_Type_Impl *stp =
- ace_create_service_type (ssd->name_,
- ssd->type_,
- sym,
- ssd->flags_,
- gobbler);
- if (stp == 0)
- continue;
-
- ACE_Service_Type *sr;
-
- ACE_NEW_RETURN (sr,
- ACE_Service_Type (ssd->name_,
- stp,
- 0,
- ssd->active_),
- -1);
- if (ACE_Service_Repository::instance ()->insert (sr) == -1)
- return -1;
- }
- return 0;
-}
-
-// Performs an open without parsing command-line arguments.
-
-int
-ACE_Service_Config::open_i (const ACE_TCHAR program_name[],
- const ACE_TCHAR *logger_key,
- int ignore_default_svc_conf_file,
- int ignore_debug_flag)
-{
- int result = 0;
- ACE_TRACE ("ACE_Service_Config::open_i");
- ACE_Log_Msg *log_msg = ACE_LOG_MSG;
-
- // Record the current log setting upon entering this thread.
- int debugging_enabled =
- log_msg->log_priority_enabled (LM_DEBUG);
-
- if (ACE_Service_Config::is_initialized_ != 0)
- // Guard against reentrant processing!
- return 0;
- else
- ACE_Service_Config::is_initialized_++;
-
- if (ACE_Service_Config::init_svc_conf_file_queue () == -1)
- return -1;
- else if (!ignore_default_svc_conf_file
- && ACE_Service_Config::svc_conf_file_queue_->is_empty ()
- // Load the default "svc.conf" entry here if there weren't
- // overriding -f arguments in <parse_args>.
- && ACE_Service_Config::svc_conf_file_queue_->enqueue_tail
- (ACE_TString (ACE_DEFAULT_SVC_CONF)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- "enqueue_tail"),
- -1);
-
- if (ignore_debug_flag == 0)
- {
- // If -d was included as a startup parameter, the user wants debug
- // information printed during service initialization.
- if (ACE::debug ())
- ACE_Log_Msg::enable_debug_messages ();
- else
- // The user has requested no debugging info.
- ACE_Log_Msg::disable_debug_messages ();
- }
-
- // Become a daemon before doing anything else.
- if (ACE_Service_Config::be_a_daemon_)
- ACE_Service_Config::start_daemon ();
-
- u_long flags = log_msg->flags ();
-
- if (flags == 0)
- // Only use STDERR if the caller hasn't already set the flags.
- flags = (u_long) ACE_Log_Msg::STDERR;
-
- const ACE_TCHAR *key = logger_key;
-
- if (key == 0 || ACE_OS::strcmp (key, ACE_DEFAULT_LOGGER_KEY) == 0)
- // Only use the static <logger_key_> if the caller doesn't
- // override it in the parameter list or if the key supplied is
- // equal to the default static logger key.
- key = ACE_Service_Config::logger_key_;
-
- if (log_msg->open (program_name,
- flags,
- key) == -1)
- result = -1;
- else
- {
- if (ACE::debug ())
- ACE_DEBUG ((LM_STARTUP,
- ACE_TEXT ("starting up daemon %n\n")));
-
- // Initialize the Service Repository (this will still work if
- // user forgets to define an object of type ACE_Service_Config).
- ACE_Service_Repository::instance (ACE_Service_Config::MAX_SERVICES);
-
- // Initialize the ACE_Reactor (the ACE_Reactor should be the
- // same size as the ACE_Service_Repository).
- ACE_Reactor::instance ();
-
- // There's no point in dealing with this on NT since it doesn't
- // really support signals very well...
-#if !defined (ACE_LACKS_UNIX_SIGNALS)
- // @@ This really ought to be a Singleton.
- if (ACE_Reactor::instance ()->register_handler
- (ACE_Service_Config::signum_,
- ACE_Service_Config::signal_handler_) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("can't register signal handler\n")));
-#endif /* ACE_LACKS_UNIX_SIGNALS */
-
- // See if we need to load the static services.
- if (ACE_Service_Config::no_static_svcs_ == 0
- && ACE_Service_Config::load_static_svcs () == -1)
- result = -1;
- else
- {
- if (ACE_Service_Config::process_commandline_directives () == -1)
- result = -1;
- else
- result = ACE_Service_Config::process_directives ();
- }
- }
-
- {
- // Make sure to save/restore errno properly.
- ACE_Errno_Guard error (errno);
-
- ace_yy_delete_parse_buffer ();
-
- if (ignore_debug_flag == 0)
- {
- // Reset debugging back to the way it was when we came into
- // into <open_i>.
- if (debugging_enabled)
- ACE_Log_Msg::enable_debug_messages ();
- else
- // Debugging was off when we entered <open_i>.
- ACE_Log_Msg::disable_debug_messages ();
- }
- }
-
- return result;
-}
-
-ACE_Service_Config::ACE_Service_Config (const ACE_TCHAR program_name[],
- const ACE_TCHAR *logger_key)
-{
- ACE_TRACE ("ACE_Service_Config::ACE_Service_Config");
-
- if (this->open (program_name,
- logger_key) == -1
- && errno != ENOENT)
- // Only print out an error if it wasn't the svc.conf file that was
- // missing.
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- program_name));
-}
-
-// Signal handling API to trigger dynamic reconfiguration.
-
-void
-ACE_Service_Config::handle_signal (int sig,
- siginfo_t *,
- ucontext_t *)
-{
-#if defined (ACE_NDEBUG)
- ACE_UNUSED_ARG (sig);
-#else /* ! ACE_NDEBUG */
- ACE_ASSERT (ACE_Service_Config::signum_ == sig);
-#endif /* ! ACE_NDEBUG */
-
- ACE_Service_Config::reconfig_occurred_ = 1;
-}
-
-// Trigger the reconfiguration process.
-
-void
-ACE_Service_Config::reconfigure (void)
-{
- ACE_TRACE ("ACE_Service_Config::reconfigure");
-
- ACE_Service_Config::reconfig_occurred_ = 0;
-
- if (ACE::debug ())
- {
-#if !defined (ACE_NLOGGING)
- time_t t = ACE_OS::time (0);
-#endif /* ! ACE_NLOGGING */
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("beginning reconfiguration at %s"),
- ACE_OS::ctime (&t)));
- }
- if (ACE_Service_Config::process_directives () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("process_directives")));
-}
-
-// Run the event loop until the <ACE_Reactor::handle_events>
-// method returns -1 or the <end_reactor_event_loop> method
-// is invoked.
-
-int
-ACE_Service_Config::run_reactor_event_loop (void)
-{
- ACE_TRACE ("ACE_Service_Config::run_reactor_event_loop");
-
- return ACE_Reactor::run_event_loop ();
-}
-
-// Run the event loop until the <ACE_Reactor::handle_events> method
-// returns -1, the <end_reactor_event_loop> method is invoked, or the
-// <ACE_Time_Value> expires.
-
-int
-ACE_Service_Config::run_reactor_event_loop (ACE_Time_Value &tv)
-{
- ACE_TRACE ("ACE_Service_Config::run_reactor_event_loop");
-
- return ACE_Reactor::run_event_loop (tv);
-}
-
-/* static */
-int
-ACE_Service_Config::end_reactor_event_loop (void)
-{
- ACE_TRACE ("ACE_Service_Config::end_reactor_event_loop");
- return ACE_Reactor::end_event_loop ();
-}
-
-/* static */
-int
-ACE_Service_Config::reactor_event_loop_done (void)
-{
- ACE_TRACE ("ACE_Service_Config::reactor_event_loop_done");
- return ACE_Reactor::event_loop_done ();
-}
-
-// Tidy up and perform last rites on a terminating ACE_Service_Config.
-int
-ACE_Service_Config::close (void)
-{
- ACE_TRACE ("ACE_Service_Config::close");
-
- ACE_Service_Config::is_initialized_--;
- if (ACE_Service_Config::is_initialized_ > 0)
- return 0;
-
- // Delete the service repository. All the objects inside the
- // service repository should already have been finalized.
- ACE_Service_Config::close_svcs ();
-
- // Delete the list fo svc.conf files
- delete ACE_Service_Config::svc_conf_file_queue_;
- ACE_Service_Config::svc_conf_file_queue_ = 0;
-
- // Delete the dynamically allocated static_svcs instance.
- delete ACE_Service_Config::static_svcs_;
- ACE_Service_Config::static_svcs_ = 0;
-
- // We've prepared a buffer that we no longer need. Delete it.
- ace_yy_delete_parse_buffer ();
-
- return 0;
-}
-
-int
-ACE_Service_Config::close_svcs (void)
-{
- ACE_TRACE ("ACE_Service_Config::close_svcs");
-
- ACE_Service_Repository::close_singleton ();
-
- return 0;
-}
-
-int
-ACE_Service_Config::fini_svcs (void)
-{
- ACE_TRACE ("ACE_Service_Config::fini_svcs");
-
- // Clear the LM_DEBUG bit from log messages if appropriate
- if (ACE::debug ())
- ACE_Log_Msg::disable_debug_messages ();
-
- int result = 0;
- if (ACE_Service_Repository::instance () != 0)
- result = ACE_Service_Repository::instance ()->fini ();
-
- // Since the fini() method of the objects inside the service
- // repository may reference the ACE singletons, they must be
- // destroyed after the objects have been finalized.
- ACE_Service_Config::close_singletons ();
-
- if (ACE::debug ())
- ACE_Log_Msg::enable_debug_messages ();
-
- return result;
-}
-
-int
-ACE_Service_Config::close_singletons (void)
-{
- ACE_TRACE ("ACE_Service_Config::close_singletons");
-
- ACE_Reactor::close_singleton ();
-#if (((defined (ACE_HAS_WINNT)) && (ACE_HAS_WINNT == 1)) || (defined (ACE_HAS_AIO_CALLS)))
- ACE_Proactor::close_singleton ();
-#endif /* (((defined (ACE_HAS_WINNT)) && (ACE_HAS_WINNT == 1)) || (defined (ACE_HAS_AIO_CALLS))) */
-#if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS)
- ACE_Thread_Manager::close_singleton ();
-#endif /* ! ACE_THREAD_MANAGER_LACKS_STATICS */
-
- return 0;
-}
-
-// Perform user-specified close activities and remove dynamic memory.
-
-ACE_Service_Config::~ACE_Service_Config (void)
-{
- ACE_TRACE ("ACE_Service_Config::~ACE_Service_Config");
-}
-
-// ************************************************************
-
-/* static */
-int
-ACE_Service_Config::reconfig_occurred (void)
-{
- ACE_TRACE ("ACE_Service_Config::reconfig_occurred");
- return ACE_Service_Config::reconfig_occurred_ != 0;
-}
-
-void
-ACE_Service_Config::reconfig_occurred (int config_occurred)
-{
- ACE_TRACE ("ACE_Service_Config::reconfig_occurred");
- ACE_Service_Config::reconfig_occurred_ = config_occurred;
-}
-
-// Become a daemon (i.e., run as a "background" process).
-
-int
-ACE_Service_Config::start_daemon (void)
-{
- ACE_TRACE ("ACE_Service_Config::start_daemon");
- return ACE::daemonize ();
-}
-
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Node<ACE_Static_Svc_Descriptor *>;
-template class ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *>;
-template class ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *>;
-template class ACE_Node<ACE_TString>;
-template class ACE_Unbounded_Queue<ACE_TString>;
-template class ACE_Unbounded_Queue_Iterator<ACE_TString>;
-template class ACE_Unbounded_Set<ACE_TString>;
-template class ACE_Unbounded_Set_Iterator<ACE_TString>;
-template class auto_ptr<ACE_Obstack>;
-template class ACE_Auto_Basic_Ptr<ACE_Obstack>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Node<ACE_Static_Svc_Descriptor *>
-#pragma instantiate ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *>
-#pragma instantiate ACE_Node<ACE_TString>
-#pragma instantiate ACE_Unbounded_Queue<ACE_TString>
-#pragma instantiate ACE_Unbounded_Queue_Iterator<ACE_TString>
-#pragma instantiate ACE_Unbounded_Set<ACE_TString>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_TString>
-#pragma instantiate auto_ptr<ACE_Obstack>
-#pragma instantiate ACE_Auto_Basic_Ptr<ACE_Obstack>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Service_Config.h b/ace/Service_Config.h
deleted file mode 100644
index 372c677ff06..00000000000
--- a/ace/Service_Config.h
+++ /dev/null
@@ -1,452 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Service_Config.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SERVICE_CONFIG_H
-#define ACE_SERVICE_CONFIG_H
-#include "ace/pre.h"
-
-#include "ace/Service_Object.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Signal.h"
-#include "ace/Containers.h"
-#include "ace/SString.h"
-
-// Forward decl.
-class ACE_Service_Repository;
-class ACE_Service_Type;
-class ACE_Allocator;
-class ACE_Reactor;
-class ACE_Thread_Manager;
-
-extern "C"
-{
- typedef ACE_Service_Object *(*ACE_SERVICE_ALLOCATOR) (ACE_Service_Object_Exterminator *);
-}
-
-class ACE_Static_Svc_Descriptor
-{
- // = TITLE
- // Holds the information necessary to describe a statically linked
- // Svc.
-public:
- const ACE_TCHAR *name_;
- // Name of the service.
-
- int type_;
- // Type of service.
-
- ACE_SERVICE_ALLOCATOR alloc_;
- // Factory function that allocates the service.
-
- u_int flags_;
- // Bitmask flags indicating how the framework should delete memory.
-
- int active_;
- // Flag indicating whether the service starts out active.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-public:
- int operator== (ACE_Static_Svc_Descriptor &) const;
- // Compare two service descriptors for equality.
-};
-
-// Maintain a set of the statically linked service descriptors.
-typedef ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *>
- ACE_STATIC_SVCS;
-typedef ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *>
- ACE_STATIC_SVCS_ITERATOR;
-
-// Maintain a queue of services to be configured from the
-// command-line.
-typedef ACE_Unbounded_Queue<ACE_TString>
- ACE_SVC_QUEUE;
-typedef ACE_Unbounded_Queue_Iterator<ACE_TString>
- ACE_SVC_QUEUE_ITERATOR;
-
-class ACE_Export ACE_Service_Config
-{
- // = TITLE
- // Supplies common server operations for dynamic and static
- // configuration of services.
- //
- // = DESCRIPTION
- // The <ACE_Service_Config> uses the Monostate pattern. Therefore,
- // you can only have one of these instantiated per-process.
- //
- // NOTE: the signal_handler_ static member is allocated by the
- // <ACE_Object_Manager>. The <ACE_Service_Config> constructor
- // uses signal_handler_. Therefore, if the program has any
- // static <ACE_Service_Config> objects, there might be
- // initialization order problems. They can be minimized, but
- // not eliminated, by _not_ #defining
- // <ACE_HAS_NONSTATIC_OBJECT_MANAGER>.
-public:
- enum
- {
- MAX_SERVICES = ACE_DEFAULT_SERVICE_REPOSITORY_SIZE
- };
-
- // = Initialization and termination methods.
-
- ACE_Service_Config (int ignore_static_svcs = 1,
- size_t size = ACE_Service_Config::MAX_SERVICES,
- int signum = SIGHUP);
- // Initialize the Service Repository.
-
- ACE_Service_Config (const ACE_TCHAR program_name[],
- const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY);
- // Performs an open without parsing command-line arguments. The
- // <logger_key> indicates where to write the logging output, which
- // is typically either a STREAM pipe or a socket address.
-
- static int open_i (const ACE_TCHAR program_name[],
- const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
- int ignore_default_svc_conf_file = 0,
- int ignore_debug_flag = 0);
- // Performs an open without parsing command-line arguments. The
- // <logger_key> indicates where to write the logging output, which
- // is typically either a STREAM pipe or a socket address. If
- // <ignore_default_svc_conf_file> is non-0 then the "svc.conf" file
- // will be ignored. If <ignore_debug_flag> is non-0 then the
- // application is responsible for setting the
- // <ACE_Log_Msg::priority_mask> appropriately. Returns number of
- // errors that occurred on failure and 0 otherwise.
-
- static int open (const ACE_TCHAR program_name[],
- const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
- int ignore_static_svcs = 1,
- int ignore_default_svc_conf_file = 0,
- int ignore_debug_flag = 0);
- // Performs an open without parsing command-line arguments. The
- // <logger_key> indicates where to write the logging output, which
- // is typically either a STREAM pipe or a socket address. If
- // <ignore_static_svcs> is 1 then static services are not loaded,
- // otherwise, they are loaded. If <ignore_default_svc_conf_file> is
- // non-0 then the <svc.conf> configuration file will be ignored.
- // Returns zero upon success, -1 if the file is not found or cannot
- // be opened (errno is set accordingly), otherwise returns the
- // number of errors encountered loading the services in the
- // specified svc.conf configuration file. If <ignore_debug_flag> is
- // non-0 then the application is responsible for setting the
- // <ACE_Log_Msg::priority_mask> appropriately.
-
- static int open (int argc,
- ACE_TCHAR *argv[],
- const ACE_TCHAR *logger_key = ACE_DEFAULT_LOGGER_KEY,
- int ignore_static_svcs = 1,
- int ignore_default_svc_conf = 0,
- int ignore_debug_flag = 0);
- // This is the primary entry point into the ACE_Service_Config (the
- // constructor just handles simple initializations). It parses
- // arguments passed in from <argc> and <argv> parameters. The
- // arguments that are valid in a call to this method include:
- //
- // '-b' - Option to indicate that we should be a daemon
- // '-d' - Turn on debugging mode
- // '-f' - Option to read in the list of svc.conf file names
- // '-k' - Option to read a wide string where in the logger output can
- // be written
- // '-y' - Option required to use statically linked services.
- // A static service repostory will be constructed if the flag
- // is used. Use this flag to override the default
- // <ignore_static_svcs> flag at run-time.
- // '-n' - Option to avoid using any statically linked services, which
- // eliminates the need to construct the static service repository.
- // '-S' - Option to read in the list of services on the command-line
- // Please observe the difference between options '-f' that looks
- // for a list of files and here a list of services.
- //
- // Returns number of errors that occurred on failure and 0
- // otherwise.
- //
- // The <logger_key> indicates where to write the logging output,
- // which is typically either a STREAM pipe or a socket address. If
- // <ignore_static_svcs> is 1 then static services are not loaded,
- // otherwise, they are loaded. If <ignore_default_svc_conf_file> is
- // non-0 then the <svc.conf> configuration file will be ignored.
- // Returns zero upon success, -1 if the file is not found or cannot
- // be opened (errno is set accordingly), otherwise returns the
- // number of errors encountered loading the services in the
- // specified svc.conf configuration file. If <ignore_debug_flag> is
- // non-0 then the application is responsible for setting the
- // <ACE_Log_Msg::priority_mask> appropriately.
-
- virtual ~ACE_Service_Config (void);
- // Perform user-specified close activities and remove dynamic
- // memory.
-
- static int close (void);
- // Tidy up and perform last rites when ACE_Service_Config is shut
- // down. This method calls <close_svcs>. Returns 0.
-
- static int fini_svcs (void);
- // Perform user-specified close hooks and possibly delete all of the
- // configured services in the <Service_Repository>.
-
- static int close_svcs (void);
- // Perform user-specified close hooks on all of the configured
- // services in the <Service_Repository>, then delete the
- // <Service_Repository> itself. Returns 0.
-
- static int close_singletons (void);
- // Delete the dynamically allocated Singletons (i.e., the <Reactor>,
- // <Proactor>, <ReactorEx>, and <Thread_Manager>.
- // Returns 0.
-
- // = Reactor event loop management methods.
- static int run_reactor_event_loop (void);
- // Run the event loop until the <ACE_Reactor::handle_events> method
- // returns -1 or the <end_reactor_event_loop> method is invoked.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use <ACE_Reactor::run_event_loop> instead.
-
- static int run_reactor_event_loop (ACE_Time_Value &tv);
- // Run the event loop until the <ACE_Reactor::handle_events> method
- // returns -1, the <end_reactor_event_loop> method is invoked, or the
- // <ACE_Time_Value> expires.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // <Use ACE_Reactor::run_event_loop> instead.
-
- static int end_reactor_event_loop (void);
- // Instruct the <ACE_Service_Config> to terminate its event loop and
- // notifies the <ACE_Reactor::instance> so that it can wake up
- // and close down gracefully.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use <ACE_Reactor::end_event_loop> instead.
-
- static int reactor_event_loop_done (void);
- // Report if the Reactor's event loop is finished.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use <ACE_Reactor::event_loop_done> instead.
-
- static int reconfig_occurred (void);
- // True if reconfiguration occurred.
-
- static void reconfig_occurred (int);
- // Indicate that reconfiguration occurred.
-
- static void reconfigure (void);
- // Perform the reconfiguration process.
-
- // = The following methods are static in order to enforce Singleton
- // semantics for the Reactor, Service_Repository, Thread_Manager,
- // and Acceptor/Connector Strategy factory. Other portions of the
- // system may need to access them at some point or another...
-
- // = Accessors and mutators for process-wide Singletons.
-
- static ACE_STATIC_SVCS *static_svcs (void);
- // Returns a pointer to the list of statically linked services.
-
- static ACE_Reactor *reactor (void);
- // Get pointer to a process-wide <ACE_Reactor>.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use <ACE_Reactor::instance> instead.
-
- static ACE_Reactor *reactor (ACE_Reactor *);
- // Set pointer to a process-wide <ACE_Reactor> and return existing
- // pointer.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use <ACE_Reactor::instance> instead.
-
- static ACE_Service_Repository *svc_rep (void);
- // Get pointer to a process-wide <ACE_Service_Repository>.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use <ACE_Service_Repository::instance> instead.
-
- static ACE_Service_Repository *svc_rep (ACE_Service_Repository *);
- // Set pointer to a process-wide <ACE_Service_Repository> and return
- // existing pointer.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use <ACE_Service_Repository::instance> instead.
-
- static ACE_Thread_Manager *thr_mgr (void);
- // Get pointer to a process-wide <ACE_Thread_Manager>.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use <ACE_Thread_Manager::instance> instead.
-
-#if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS)
- static ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *);
- // Set pointer to a process-wide <ACE_Thread_Manager> and return
- // existing pointer.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use ACE_Thread_Manager::instance() instead.
-#endif /* ! defined (ACE_THREAD_MANAGER_LACKS_STATICS) */
-
- static ACE_Allocator *alloc (void);
- // Get pointer to a default <ACE_Allocator>.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use <ACE_Allocator::instance> instead.
-
- static ACE_Allocator *alloc (ACE_Allocator *);
- // Set pointer to a process-wide <ACE_Allocator> and return existing
- // pointer.
- // DO NOT USE THIS METHOD. It may be unsupported in future releases.
- // Use <ACE_Allocator::instance> instead.
-
- // = Utility methods.
- static int initialize (const ACE_Service_Type *,
- ACE_TCHAR parameters[]);
- // Dynamically link the shared object file and retrieve a pointer to
- // the designated shared object in this file.
-
- static int initialize (const ACE_TCHAR svc_name[],
- ACE_TCHAR parameters[]);
- // Initialize and activate a statically <svc_name> service.
-
- static int resume (const ACE_TCHAR svc_name[]);
- // Resume a <svc_name> that was previously suspended or has not yet
- // been resumed (e.g., a static service).
-
- static int suspend (const ACE_TCHAR svc_name[]);
- // Suspend <svc_name>. Note that this will not unlink the service
- // from the daemon if it was dynamically linked, it will mark it as
- // being suspended in the Service Repository and call the <suspend>
- // member function on the appropriate <ACE_Service_Object>. A
- // service can be resumed later on by calling the <RESUME> member
- // function...
-
- static int remove (const ACE_TCHAR svc_name[]);
- // Totally remove <svc_name> from the daemon by removing it
- // from the ACE_Reactor, and unlinking it if necessary.
-
-#if defined (ACE_HAS_WINCE)
- // We must provide these function to bridge the <Svc_Conf> parser
- // with ACE.
- static int initialize (const ACE_Service_Type *, char parameters[]);
- static int initialize (const char svc_name[], char parameters[]);
- static int resume (const char svc_name[]);
- static int suspend (const char svc_name[]);
- static int remove (const char svc_name[]);
-#endif /* ACE_HAS_WINCE */
-
- void dump (void) const;
- // Dump the state of an object.
-
- static ACE_INLINE void signal_handler (ACE_Sig_Adapter *);
- // Set the signal_handler;for internal use by ACE_Object_Manager only.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- static int process_directive (const ACE_TCHAR directive[]);
- // Process one service configuration <directive>, which is passed as
- // a string. Returns the number of errors that occurred.
-
- static int process_directives (void);
- // Process (or re-process) service configuration requests that are
- // provided in the svc.conf file(s). Returns the number of errors
- // that occurred.
-
- static void handle_signal (int sig, siginfo_t *, ucontext_t *);
- // Handles signals to trigger reconfigurations.
-
-protected:
- static int process_commandline_directives (void);
- // Process service configuration requests that were provided on the
- // command-line. Returns the number of errors that occurred.
-
- static int process_directives_i (void);
- // This is the implementation function that <process_directives> and
- // <process_directive> both call. Returns the number of errors that
- // occurred.
-
- static int parse_args (int, ACE_TCHAR *argv[]);
- // Handle the command-line options intended for the
- // <ACE_Service_Config>. Note that <argv[0]> is assumed to be the
- // program name.
- // The arguments that are valid in a call to this method are
- // '-b' - Option to indicate that we should be a daemon
- // '-d' - Turn on debugging mode
- // '-f' - Option to read in the list of svc.conf file names
- // '-k' - Option to read a wide string where in the logger output can
- // be written
- // '-y' - Turn on the flag for a repository of statically
- // linked services
- // '-n' - Need not have a repository of statically linked services
- // '-S' - Option to read in the list of services on the command-line
- // Please observe the difference between options '-f' that looks
- // for a list of files and here a list of services.
-
- static int start_daemon (void);
- // Become a daemon.
-
- static int load_static_svcs (void);
- // Add the default statically-linked services to the
- // <ACE_Service_Repository>.
-
-private:
- static const ACE_TCHAR *logger_key_;
- // Indicates where to write the logging output. This is typically
- // either a STREAM pipe or a socket address.
-
- static ACE_STATIC_SVCS *static_svcs_;
- // Singleton repository of statically linked services.
-
- static ACE_SVC_QUEUE *svc_queue_;
- // Queue of services specified on the command-line.
-
- static ACE_SVC_QUEUE *svc_conf_file_queue_;
- // Queue of svc.conf files specified on the command-line.
- // @@ This should probably be made to handle unicode filenames...
-
- static int init_svc_conf_file_queue (void);
- // Initialize the <svc_conf_file_queue_> if necessary.
-
- static sig_atomic_t reconfig_occurred_;
- // True if reconfiguration occurred.
-
- // = Set by command-line options.
- static char be_a_daemon_;
- // Shall we become a daemon process?
-
- static char no_static_svcs_;
- // Should we avoid loading the static services?
-
- static int signum_;
- // Number of the signal used to trigger reconfiguration.
-
- static ACE_Sig_Adapter *signal_handler_;
- // Handles the reconfiguration signals.
-
- static int is_initialized_;
- // Keep track of whether the <ACE_Service_Config> is already
- // initialized. If so, we can't allow <yyparse> to be called since
- // it's not reentrant. This variable is incremented by the
- // <ACE_Service_Config::open> method and decremented by the
- // <ACE_Service_Config::close> method.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Service_Config.i"
-#endif /* __ACE_INLINE__ */
-
-// These must go here to avoid circular includes... (only left here
-// for to not break applications which rely on this - no real need any
-// longer)
-#include "ace/Reactor.h"
-#include "ace/Svc_Conf_Tokens.h"
-#include "ace/post.h"
-#endif /* ACE_SERVICE_CONFIG_H */
diff --git a/ace/Service_Config.i b/ace/Service_Config.i
deleted file mode 100644
index 5ed6f3dd09f..00000000000
--- a/ace/Service_Config.i
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Service_Config.i
-
-// This is the primary entry point into the ACE_Service_Config (the
-// constructor just handles simple initializations).
-
-ACE_INLINE int
-ACE_Service_Config::open (const ACE_TCHAR program_name[],
- const ACE_TCHAR *logger_key,
- int ignore_static_svcs,
- int ignore_default_svc_conf,
- int ignore_debug_flag)
-{
- ACE_TRACE ("ACE_Service_Config::open");
- ACE_Service_Config::no_static_svcs_ = ignore_static_svcs;
-
- return ACE_Service_Config::open_i (program_name,
- logger_key,
- ignore_default_svc_conf,
- ignore_debug_flag);
-}
-
-ACE_INLINE int
-ACE_Service_Config::open (int argc,
- ACE_TCHAR *argv[],
- const ACE_TCHAR *logger_key,
- int ignore_static_svcs,
- int ignore_default_svc_conf,
- int ignore_debug_flag)
-{
- ACE_TRACE ("ACE_Service_Config::open");
- ACE_Service_Config::no_static_svcs_ = ignore_static_svcs;
-
- if (ACE_Service_Config::parse_args (argc,
- argv) == -1)
- return -1;
- else
- return ACE_Service_Config::open_i (argv[0],
- logger_key,
- ignore_default_svc_conf,
- ignore_debug_flag);
-}
-
-// Compare two service descriptors for equality.
-
-ACE_INLINE int
-ACE_Static_Svc_Descriptor::operator== (ACE_Static_Svc_Descriptor &d) const
-{
- return ACE_OS::strcmp (name_, d.name_) == 0;
-}
-
-ACE_INLINE void
-ACE_Service_Config::signal_handler (ACE_Sig_Adapter *signal_handler)
-{
- signal_handler_ = signal_handler;
-}
-
-#if defined (ACE_HAS_WINCE)
- // We must provide these function to bridge Svc_Conf parser with ACE.
-
-ACE_INLINE int
-ACE_Service_Config::initialize (const ACE_Service_Type *sp, char parameters[])
-{
- return ACE_Service_Config::initialize (sp, parameters);
-}
-
-ACE_INLINE int
-ACE_Service_Config::initialize (const char svc_name[], char parameters[])
-{
- return ACE_Service_Config::initialize (ACE_TEXT_CHAR_TO_TCHAR (svc_name),
- ACE_TEXT_CHAR_TO_TCHAR (parameters));
-}
-
-ACE_INLINE int
-ACE_Service_Config::resume (const char svc_name[])
-{
- return ACE_Service_Config::resume (svc_name);
-}
-
-ACE_INLINE int
-ACE_Service_Config::suspend (const char svc_name[])
-{
- return ACE_Service_Config::suspend (svc_name);
-}
-
-ACE_INLINE int
-ACE_Service_Config::remove (const char svc_name[])
-{
- return ACE_Service_Config::remove (svc_name);
-}
-#endif /* ACE_HAS_WINCE */
diff --git a/ace/Service_Manager.cpp b/ace/Service_Manager.cpp
deleted file mode 100644
index 40425194e9c..00000000000
--- a/ace/Service_Manager.cpp
+++ /dev/null
@@ -1,315 +0,0 @@
-// $Id$
-
-#include "ace/Get_Opt.h"
-#include "ace/Service_Repository.h"
-#include "ace/Service_Config.h"
-#include "ace/Service_Manager.h"
-#include "ace/Reactor.h"
-#include "ace/WFMO_Reactor.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Service_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Service_Manager, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Service_Manager)
-
-void
-ACE_Service_Manager::dump (void) const
-{
- ACE_TRACE ("ACE_Service_Manager::dump");
-}
-
-// Static variables.
-
-u_short ACE_Service_Manager::DEFAULT_PORT_ = 10000;
-
-ACE_Service_Manager::ACE_Service_Manager (void)
- : debug_ (0),
- signum_ (SIGHUP)
-{
- ACE_TRACE ("ACE_Service_Manager::ACE_Service_Manager");
-}
-
-int
-ACE_Service_Manager::suspend (void)
-{
- ACE_TRACE ("ACE_Service_Manager::suspend");
- return ACE_Reactor::instance ()->suspend_handler (this);
-}
-
-int
-ACE_Service_Manager::resume (void)
-{
- ACE_TRACE ("ACE_Service_Manager::resume");
- return ACE_Reactor::instance ()->resume_handler (this);
-}
-
-int
-ACE_Service_Manager::open (const ACE_INET_Addr &sia)
-{
- ACE_TRACE ("ACE_Service_Manager::open");
-
- // Reuse the listening address, even if it's already in use!
- if (this->acceptor_.open (sia, 1) == -1)
- return -1;
- return 0;
-}
-
-int
-ACE_Service_Manager::info (ACE_TCHAR **strp, size_t length) const
-{
- ACE_TRACE ("ACE_Service_Manager::info");
- ACE_INET_Addr sa;
- ACE_TCHAR buf[BUFSIZ];
-
- if (this->acceptor_.get_local_addr (sa) == -1)
- return -1;
-
- ACE_OS::sprintf (buf,
- ACE_TEXT ("%d/%s %s"),
- sa.get_port_number (),
- ACE_TEXT ("tcp"),
- ACE_TEXT ("# lists all services in the daemon\n"));
- if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*strp, buf, length);
- return ACE_OS::strlen (buf);
-}
-
-int
-ACE_Service_Manager::init (int argc, ACE_TCHAR *argv[])
-{
- ACE_TRACE ("ACE_Service_Manager::init");
- ACE_INET_Addr local_addr (ACE_Service_Manager::DEFAULT_PORT_);
- ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("dp:s:"), 0); // Start at argv[0]
-
- for (int c; (c = getopt ()) != -1; )
- switch (c)
- {
- case 'd':
- this->debug_ = 1;
- break;
- case 'p':
- local_addr.set ((u_short) ACE_OS::atoi (getopt.optarg));
- break;
- case 's':
- this->signum_ = ACE_OS::atoi (getopt.optarg);
- break;
- default:
- break;
- }
-
- if (this->get_handle () == ACE_INVALID_HANDLE &&
- this->open (local_addr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("open")), -1);
- else if (ACE_Reactor::instance ()->register_handler
- (this,
- ACE_Event_Handler::ACCEPT_MASK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("registering service with ACE_Reactor\n")),
- -1);
- return 0;
-}
-
-int
-ACE_Service_Manager::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
-{
- ACE_TRACE ("ACE_Service_Manager::handle_close");
- return this->acceptor_.close ();
-}
-
-int
-ACE_Service_Manager::fini (void)
-{
- ACE_TRACE ("ACE_Service_Manager::fini");
-
- int retv = 0;
- if (this->get_handle () != ACE_INVALID_HANDLE)
- {
- retv = ACE_Reactor::instance ()->remove_handler
- (this,
- ACE_Event_Handler::ACCEPT_MASK |
- ACE_Event_Handler::DONT_CALL);
- this->handle_close (ACE_INVALID_HANDLE,
- ACE_Event_Handler::NULL_MASK);
- }
- return retv;
-}
-
-ACE_HANDLE
-ACE_Service_Manager::get_handle (void) const
-{
- ACE_TRACE ("ACE_Service_Manager::get_handle");
- return this->acceptor_.get_handle ();
-}
-
-int
-ACE_Service_Manager::handle_signal (int, siginfo_t *, ucontext_t *)
-{
- return 0;
-}
-
-// Determine all the services offered by this daemon and return the
-// information back to the client.
-
-int
-ACE_Service_Manager::list_services (void)
-{
- ACE_TRACE ("ACE_Service_Manager::list_services");
- ACE_Service_Repository_Iterator sri (*ACE_Service_Repository::instance ());
-
- for (const ACE_Service_Type *sr;
- sri.next (sr) != 0;
- sri.advance ())
- {
- int len = ACE_OS::strlen (sr->name ()) + 1;
- ACE_TCHAR buf[BUFSIZ];
- ACE_TCHAR *p = buf + len;
-
- ACE_OS::strcpy (buf, sr->name ());
-
- p[-1] = ' ';
- p[0] = '\0';
-
- len += sr->type ()->info (&p, sizeof buf - len);
-
- if (this->debug_)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("len = %d, info = %s%s"),
- len,
- buf,
- buf[len - 1] == '\n' ? ACE_TEXT ("") : ACE_TEXT ("\n")));
-
- if (len > 0)
- {
- ssize_t n = this->client_stream_.send_n (buf,
- len);
-
- if (n != len || (n == -1 && errno != EPIPE))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("send_n")));
- }
- }
-
- return 0;
-}
-
-// Trigger a remote reconfiguration of the Service Configurator.
-
-int
-ACE_Service_Manager::reconfigure_services (void)
-{
- ACE_TRACE ("ACE_Service_Manager::reconfigure_services");
-
-#if 0
-// Send ourselves a signal! ACE_OS::kill (ACE_OS::getpid (),
-// this->signum_);
-#endif /* 0 */
-
- // Flag the main event loop that a reconfiguration should occur.
- // The next trip through the <ACE_Reactor::run_event_loop> should
- // pick this up and cause a reconfiguration. Note that we can't
- // trigger the reconfiguration automatically since that might "pull
- // the rug" out from underneath the existing services in a
- // problematic way.
- ACE_Service_Config::reconfig_occurred ((sig_atomic_t) 1);
- return this->client_stream_.send_n ("done\n",
- sizeof ("done\n"));
-}
-
-// Accept new connection from client and carry out the service they
-// request.
-
-int
-ACE_Service_Manager::handle_input (ACE_HANDLE)
-{
- ACE_TRACE ("ACE_Service_Manager::handle_input");
-
- // Try to find out if the implementation of the reactor that we are
- // using requires us to reset the event association for the newly
- // created handle. This is because the newly created handle will
- // inherit the properties of the listen handle, including its event
- // associations.
- int reset_new_handle =
- ACE_Reactor::instance ()->uses_event_associations ();
-
- if (this->acceptor_.accept (this->client_stream_, // stream
- 0, // remote address
- 0, // timeout
- 1, // restart
- reset_new_handle // reset new handler
- ) == -1)
- return -1;
-
- if (this->debug_)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("client_stream fd = %d\n"),
- this->client_stream_.get_handle ()));
- ACE_INET_Addr sa;
- if (this->client_stream_.get_remote_addr (sa) == -1)
- return -1;
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("accepted from host %s at port %d\n"),
- sa.get_host_name (),
- sa.get_port_number ()));
- }
-
- char request[BUFSIZ];
-
- // Read service request from client.
-
- switch (client_stream_.recv (request, sizeof request))
- {
- case -1:
- if (this->debug_)
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("recv")));
- break;
- case 0:
- return 0;
- /* NOTREACHED */
- default:
- {
- char *p;
-
- // Kill trailing newlines.
- for (p = request;
- (*p != '\0') && (*p != '\r') && (*p != '\n');
- p++)
- continue;
-
- *p = '\0';
-
- ACE_Event_Handler *old_signal_handler = 0;
- ACE_Reactor::instance ()->register_handler (SIGPIPE,
- this,
- 0,
- &old_signal_handler);
- if (ACE_OS::strcmp (request, "help") == 0)
- this->list_services ();
- else if (ACE_OS::strcmp (request, "reconfigure") == 0)
- this->reconfigure_services ();
-
- // Additional management services may be handled here...
-
- // Restore existing SIGPIPE handler
- ACE_Reactor::instance ()->register_handler (SIGPIPE,
- old_signal_handler);
- }
- }
-
- if (this->client_stream_.close () == -1 && this->debug_)
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("close")));
- return 0;
-}
diff --git a/ace/Service_Manager.h b/ace/Service_Manager.h
deleted file mode 100644
index f628b65c413..00000000000
--- a/ace/Service_Manager.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Service_Manager.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SERVICE_MANAGER_H
-#define ACE_SERVICE_MANAGER_H
-#include "ace/pre.h"
-
-#include "ace/SOCK_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SOCK_Acceptor.h"
-#include "ace/INET_Addr.h"
-#include "ace/Service_Object.h"
-
-class ACE_Export ACE_Service_Manager : public ACE_Service_Object
-{
- // = TITLE
- // Provide a standard ACE service for managing all the services
- // configured in an <ACE_Service_Repository>.
- //
- // = DESCRIPTION
- // This implementation is very simple. It just handles each
- // client request one at a time. Each request is associated
- // with a new connection, which is closed when the request is
- // processed. In addition, you must be using the singleton
- // <ACE_Reactor::instance> in order to trigger reconfigurations.
- // This scheme can certainly be improved.
-public:
- // = Initialization and termination hooks.
- ACE_Service_Manager (void);
- // Constructor.
-
- ~ACE_Service_Manager (void);
- // Destructor.
-
-protected:
- // = Perform the various meta-services.
- virtual int reconfigure_services (void);
- // Trigger a remote reconfiguration of the Service Configurator.
-
- virtual int list_services (void);
- // Determine all the services offered by this daemon and return the
- // information back to the client.
-
- // = Dynamic linking hooks.
- virtual int init (int argc, ACE_TCHAR *argv[]);
- virtual int info (ACE_TCHAR **info_string, size_t length) const;
- virtual int fini (void);
-
- // = Scheduling hooks.
- virtual int suspend (void);
- virtual int resume (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int open (const ACE_INET_Addr &sia);
-
- // = Demultiplexing hooks.
- virtual ACE_HANDLE get_handle (void) const;
- virtual int handle_input (ACE_HANDLE fd);
- virtual int handle_close (ACE_HANDLE fd, ACE_Reactor_Mask);
- virtual int handle_signal (int signum, siginfo_t *, ucontext_t *);
-
- ACE_SOCK_Stream client_stream_;
- // Connection to the client (we only support one client connection
- // at a time).
-
- ACE_SOCK_Acceptor acceptor_;
- // Acceptor instance.
-
- int debug_;
- // Keep track of the debugging level.
-
- int signum_;
- // The signal used to trigger reconfiguration.
-
- static u_short DEFAULT_PORT_;
- // Default port for the Acceptor to listen on.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Service_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* _SERVICE_MANAGER_H */
diff --git a/ace/Service_Manager.i b/ace/Service_Manager.i
deleted file mode 100644
index a040265d05f..00000000000
--- a/ace/Service_Manager.i
+++ /dev/null
@@ -1,10 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Service_Manager.i
-
-ACE_INLINE
-ACE_Service_Manager::~ACE_Service_Manager (void)
-{
- ACE_TRACE ("ACE_Service_Manager::~ACE_Service_Manager");
-}
diff --git a/ace/Service_Object.cpp b/ace/Service_Object.cpp
deleted file mode 100644
index e768ebee113..00000000000
--- a/ace/Service_Object.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// $Id$
-
-// Service_Object.cpp
-
-#include "ace/Service_Types.h"
-#include "ace/Service_Object.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Service_Object.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Service_Object, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Service_Object)
-ACE_ALLOC_HOOK_DEFINE(ACE_Service_Type)
-
-void
-ACE_Service_Type::dump (void) const
-{
- ACE_TRACE ("ACE_Service_Type::dump");
-}
-
-ACE_Service_Type::ACE_Service_Type (const ACE_TCHAR *n,
- ACE_Service_Type_Impl *t,
- const ACE_SHLIB_HANDLE h,
- int active)
- : name_ (0),
- type_ (t),
- handle_ (h),
- active_ (active),
- fini_already_called_ (0)
-{
- ACE_TRACE ("ACE_Service_Type::ACE_Service_Type");
- this->name (n);
-}
-
-ACE_Service_Type::~ACE_Service_Type (void)
-{
- ACE_TRACE ("ACE_Service_Type::~ACE_Service_Type");
-
- this->fini ();
-
- if (this->handle_ != 0)
- ACE_OS::dlclose ((ACE_SHLIB_HANDLE) this->handle_);
-
- delete [] (ACE_TCHAR *) this->name_;
-}
-
-void
-ACE_Service_Type::fini (void)
-{
- if (!this->fini_already_called_)
- {
- this->type_->fini ();
- this->fini_already_called_ = 1;
- }
-}
-
-void
-ACE_Service_Type::suspend (void) const
-{
- ACE_TRACE ("ACE_Service_Type::suspend");
- ((ACE_Service_Type *) this)->active_ = 0;
- this->type_->suspend ();
-}
-
-void
-ACE_Service_Type::resume (void) const
-{
- ACE_TRACE ("ACE_Service_Type::resume");
- ((ACE_Service_Type *) this)->active_ = 1;
- this->type_->resume ();
-}
-
-ACE_Service_Object::ACE_Service_Object (ACE_Reactor *r)
- : ACE_Event_Handler (r)
-{
- ACE_TRACE ("ACE_Service_Object::ACE_Service_Object");
-}
-
-ACE_Service_Object::~ACE_Service_Object (void)
-{
- ACE_TRACE ("ACE_Service_Object::~ACE_Service_Object");
-}
-
-int
-ACE_Service_Object::suspend (void)
-{
- ACE_TRACE ("ACE_Service_Object::suspend");
- return 0;
-}
-
-int
-ACE_Service_Object::resume (void)
-{
- ACE_TRACE ("ACE_Service_Object::resume");
- return 0;
-}
diff --git a/ace/Service_Object.h b/ace/Service_Object.h
deleted file mode 100644
index edafff19e47..00000000000
--- a/ace/Service_Object.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Service_Object.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SERVICE_OBJECT_H
-#define ACE_SERVICE_OBJECT_H
-#include "ace/pre.h"
-
-#include "ace/Shared_Object.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Event_Handler.h"
-
-class ACE_Export ACE_Service_Object : public ACE_Event_Handler, public ACE_Shared_Object
-{
- // = TITLE
- // Provide the abstract base class common to all service
- // implementations.
- //
- // = DESCRIPTION
- // Classes that inherit from <ACE_Service_Objects> are capable
- // of being registered with the <ACE_Reactor> (due to the
- // <ACE_Event_Handler>, as well as being dynamically linked by
- // the <ACE_Service_Config> (due to the <ACE_Shared_Object>).
-public:
- // = Initialization and termination methods.
- ACE_Service_Object (ACE_Reactor * = 0);
- // Constructor.
-
- virtual ~ACE_Service_Object (void);
- // Destructor.
-
- virtual int suspend (void);
- // Temporarily disable a service without removing it completely.
-
- virtual int resume (void);
- // Re-enable a previously suspended service.
-};
-
-// Forward decl.
-class ACE_Service_Type_Impl;
-
-class ACE_Export ACE_Service_Type
-{
- // = TITLE
- // Keeps track of information related to the various
- // <ACE_Service_Type_Impl> subclasses.
- //
- // = DESCRIPTION
- // This class acts as the interface of the "Bridge" pattern.
-public:
- enum
- {
- DELETE_OBJ = 1,
- // Delete the payload object.
-
- DELETE_THIS = 2
- // Delete the enclosing object.
- };
-
- // = Initialization and termination methods.
- ACE_Service_Type (const ACE_TCHAR *n,
- ACE_Service_Type_Impl *o,
- const ACE_SHLIB_HANDLE handle,
- int active);
- ~ACE_Service_Type (void);
-
- const ACE_TCHAR *name (void) const;
- void name (const ACE_TCHAR *);
-
- const ACE_Service_Type_Impl *type (void) const;
- void type (const ACE_Service_Type_Impl *,
- int active = 1);
-
- ACE_SHLIB_HANDLE handle (void) const;
- void handle (const ACE_SHLIB_HANDLE);
-
- void suspend (void) const;
- void resume (void) const;
- int active (void) const;
- void active (int);
-
- void fini (void);
- // Calls <fini> on <type_>
-
- int fini_called (void) const;
- // Check if the service has been fini'ed.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const ACE_TCHAR *name_;
- // Humanly readible name of svc.
-
- const ACE_Service_Type_Impl *type_;
- // Pointer to C++ object that implements the svc.
-
- ACE_SHLIB_HANDLE handle_;
- // Handle to shared object file (non-zero if dynamically linked).
-
- int active_;
- // 1 if svc is currently active, otherwise 0.
-
- int fini_already_called_;
- // 1 if <fini> on <type_> has already been called, otherwise 0.
-};
-
-class ACE_Export ACE_Service_Object_Ptr
-{
- // = TITLE
- // This is a smart pointer that holds onto the associated
- // <ACE_Service_Object> * until the current scope is left, at
- // which point the object's <fini> hook is called and the
- // service_object_ gets deleted.
- //
- // = DESCRIPTION
- // This class is similar to the Standard C++ Library class
- // <auto_ptr>. It is used in conjunction with statically linked
- // <ACE_Service_Objects>, as shown in the
- // ./netsvcs/server/main.cpp example.
-public:
- // = Initialization and termination methods.
- ACE_Service_Object_Ptr (ACE_Service_Object *so);
- // Acquire ownership of the <so>.
-
- ~ACE_Service_Object_Ptr (void);
- // Release the held <ACE_Service_Object> by calling its <fini> hook.
-
- ACE_Service_Object *operator-> ();
- // Smart pointer to access the underlying <ACE_Service_Object>.
-
-private:
- ACE_Service_Object *service_object_;
- // Holds the service object until we're done.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Service_Object.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SERVICE_OBJECT_H */
diff --git a/ace/Service_Object.i b/ace/Service_Object.i
deleted file mode 100644
index 85e4d64278f..00000000000
--- a/ace/Service_Object.i
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Service_Object.i
-
-ACE_INLINE ACE_Service_Object_Ptr::ACE_Service_Object_Ptr (ACE_Service_Object *so)
- : service_object_ (so)
-{
-}
-
-ACE_INLINE ACE_Service_Object_Ptr::~ACE_Service_Object_Ptr (void)
-{
- this->service_object_->fini ();
- delete this->service_object_;
-}
-
-ACE_INLINE ACE_Service_Object *
-ACE_Service_Object_Ptr::operator-> ()
-{
- return this->service_object_;
-}
-
-ACE_INLINE const ACE_TCHAR *
-ACE_Service_Type::name (void) const
-{
- ACE_TRACE ("ACE_Service_Type::name");
- return this->name_;
-}
-
-ACE_INLINE const ACE_Service_Type_Impl *
-ACE_Service_Type::type (void) const
-{
- ACE_TRACE ("ACE_Service_Type::type");
- return this->type_;
-}
-
-ACE_INLINE ACE_SHLIB_HANDLE
-ACE_Service_Type::handle (void) const
-{
- ACE_TRACE ("ACE_Service_Type::handle");
- return this->handle_;
-}
-
-ACE_INLINE void
-ACE_Service_Type::name (const ACE_TCHAR *n)
-{
- ACE_TRACE ("ACE_Service_Type::name");
-
- delete [] (ACE_TCHAR *) this->name_;
- this->name_ = ACE::strnew (n);
-}
-
-ACE_INLINE void
-ACE_Service_Type::type (const ACE_Service_Type_Impl *o, int enabled)
-{
- ACE_TRACE ("ACE_Service_Type::type");
- this->type_ = o;
- ((ACE_Service_Type *) this)->active_ = enabled;
-}
-
-ACE_INLINE void
-ACE_Service_Type::handle (const ACE_SHLIB_HANDLE h)
-{
- ACE_TRACE ("ACE_Service_Type::handle");
- this->handle_ = h;
-}
-
-ACE_INLINE int
-ACE_Service_Type::active (void) const
-{
- ACE_TRACE ("ACE_Service_Type::active");
- return this->active_ != 0;
-}
-
-ACE_INLINE void
-ACE_Service_Type::active (int turnon)
-{
- ACE_TRACE ("ACE_Service_Type::active");
- this->active_ = turnon;
-}
-
-ACE_INLINE int
-ACE_Service_Type::fini_called (void) const
-{
- ACE_TRACE ("ACE_Service_TYpe::fini_called");
- return this->fini_already_called_;
-}
diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp
deleted file mode 100644
index da76851e663..00000000000
--- a/ace/Service_Repository.cpp
+++ /dev/null
@@ -1,413 +0,0 @@
-// Service_Repository.cpp
-// $Id$
-
-#include "ace/Service_Repository.h"
-#include "ace/Object_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Service_Repository.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Service_Repository, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Service_Repository)
-
-// Process-wide Service Repository.
-ACE_Service_Repository *ACE_Service_Repository::svc_rep_ = 0;
-
-// Controls whether the Service_Repository is deleted when we shut
-// down (we can only delete it safely if we created it)!
-int ACE_Service_Repository::delete_svc_rep_ = 0;
-
-void
-ACE_Service_Repository::dump (void) const
-{
- ACE_TRACE ("ACE_Service_Repository::dump");
-}
-
-ACE_Service_Repository::ACE_Service_Repository (void)
- : service_vector_ (0),
- current_size_ (0),
- total_size_ (0)
-{
- ACE_TRACE ("ACE_Service_Repository::ACE_Service_Repository");
-}
-
-ACE_Service_Repository *
-ACE_Service_Repository::instance (int size /* = ACE_Service_Repository::DEFAULT_SIZE */)
-{
- ACE_TRACE ("ACE_Service_Config::instance");
-
- if (ACE_Service_Repository::svc_rep_ == 0)
- {
- // Perform Double-Checked Locking Optimization.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
- if (ACE_Service_Repository::svc_rep_ == 0 &&
- !ACE_Object_Manager::shutting_down ())
- {
- ACE_NEW_RETURN (ACE_Service_Repository::svc_rep_,
- ACE_Service_Repository (size),
- 0);
- ACE_Service_Repository::delete_svc_rep_ = 1;
- }
- }
-
- return ACE_Service_Repository::svc_rep_;
-}
-
-ACE_Service_Repository *
-ACE_Service_Repository::instance (ACE_Service_Repository *s)
-{
- ACE_TRACE ("ACE_Service_Repository::instance");
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
-
- ACE_Service_Repository *t = ACE_Service_Repository::svc_rep_;
- // We can't safely delete it since we don't know who created it!
- ACE_Service_Repository::delete_svc_rep_ = 0;
-
- ACE_Service_Repository::svc_rep_ = s;
- return t;
-}
-
-void
-ACE_Service_Repository::close_singleton (void)
-{
- ACE_TRACE ("ACE_Service_Repository::close_singleton");
-
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance ()));
-
- if (ACE_Service_Repository::delete_svc_rep_)
- {
- delete ACE_Service_Repository::svc_rep_;
- ACE_Service_Repository::svc_rep_ = 0;
- ACE_Service_Repository::delete_svc_rep_ = 0;
- }
-}
-
-// Initialize the Repository to a clean slate.
-
-int
-ACE_Service_Repository::open (int size)
-{
- ACE_TRACE ("ACE_Service_Repository::open");
-
- ACE_Service_Type **temp;
-
- ACE_NEW_RETURN (temp,
- ACE_Service_Type *[size],
- -1);
-
- this->service_vector_ = ACE_const_cast (const ACE_Service_Type **,
- temp);
- this->total_size_ = size;
- return 0;
-}
-
-ACE_Service_Repository::ACE_Service_Repository (int size)
- : current_size_ (0)
-{
- ACE_TRACE ("ACE_Service_Repository::ACE_Service_Repository");
-
- if (this->open (size) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Service_Repository")));
-}
-
-// Finalize (call <fini> and possibly delete) all the services.
-
-int
-ACE_Service_Repository::fini (void)
-{
- ACE_TRACE ("ACE_Service_Repository::fini");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- if (this->service_vector_ != 0)
- {
- // <fini> the services in reverse order. Note that if services
- // were removed from the middle of the repository the order
- // won't necessarily be maintained since the <remove> method
- // performs compaction. However, the common case is not to
- // remove services, so typically they are deleted in reverse
- // order.
-
- for (int i = this->current_size_ - 1; i >= 0; i--)
- {
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("finalizing %s\n"),
- this->service_vector_[i]->name ()));
- ACE_Service_Type *s =
- ACE_const_cast (ACE_Service_Type *,
- this->service_vector_[i]);
- s->fini ();
- }
- }
-
- return 0;
-}
-
-// Close down all the services.
-
-int
-ACE_Service_Repository::close (void)
-{
- ACE_TRACE ("ACE_Service_Repository::close");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- if (this->service_vector_ != 0)
- {
- // Delete services in reverse order. Note that if services were
- // removed from the middle of the repository the order won't
- // necessarily be maintained since the <remove> method performs
- // compaction. However, the common case is not to remove
- // services, so typically they are deleted in reverse order.
-
- for (int i = this->current_size_ - 1; i >= 0; i--)
- {
- ACE_Service_Type *s = ACE_const_cast (ACE_Service_Type *,
- this->service_vector_[i]);
- delete s;
- --this->current_size_;
- }
-
- delete [] this->service_vector_;
- this->service_vector_ = 0;
- this->current_size_ = 0;
- }
-
- return 0;
-}
-
-ACE_Service_Repository::~ACE_Service_Repository (void)
-{
- ACE_TRACE ("ACE_Service_Repository::~ACE_Service_Repository");
- this->close ();
-}
-
-// Locate an entry with <name> in the table. If <ignore_suspended> is
-// set then only consider services marked as resumed. If the caller
-// wants the located entry, pass back a pointer to the located entry
-// via <srp>. If <name> is not found -1 is returned. If <name> is
-// found, but it is suspended and the caller wants to ignore suspended
-// services a -2 is returned. Must be called with locks held.
-
-int
-ACE_Service_Repository::find_i (const ACE_TCHAR name[],
- const ACE_Service_Type **srp,
- int ignore_suspended)
-{
- ACE_TRACE ("ACE_Service_Repository::find_i");
- int i;
-
- for (i = 0; i < this->current_size_; i++)
- if (ACE_OS::strcmp (name,
- this->service_vector_[i]->name ()) == 0)
- break;
-
- if (i < this->current_size_)
- {
- if (this->service_vector_[i]->fini_called ())
- {
- if (srp != 0)
- *srp = 0;
- return -1;
- }
-
- if (srp != 0)
- *srp = this->service_vector_[i];
- if (ignore_suspended
- && this->service_vector_[i]->active () == 0)
- return -2;
- return i;
- }
- else
- return -1;
-}
-
-int
-ACE_Service_Repository::find (const ACE_TCHAR name[],
- const ACE_Service_Type **srp,
- int ignore_suspended)
-{
- ACE_TRACE ("ACE_Service_Repository::find");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- return this->find_i (name, srp, ignore_suspended);
-}
-
-
-// Insert the ACE_Service_Type SR into the repository. Note that
-// services may be inserted either resumed or suspended.
-
-int
-ACE_Service_Repository::insert (const ACE_Service_Type *sr)
-{
- ACE_TRACE ("ACE_Service_Repository::insert");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
- int i;
-
- // Check to see if this is a duplicate.
- for (i = 0; i < this->current_size_; i++)
- if (ACE_OS::strcmp (sr->name (),
- this->service_vector_[i]->name ()) == 0)
- break;
-
- // Replacing an existing entry
- if (i < this->current_size_)
- {
- // Check for self-assignment...
- if (sr == this->service_vector_[i])
- return 0;
- ACE_Service_Type *s = ACE_const_cast (ACE_Service_Type *,
- this->service_vector_[i]);
- delete s;
- this->service_vector_[i] = sr;
- return 0;
- }
- // Adding a new entry.
- else if (i < this->total_size_)
- {
- this->service_vector_[i] = sr;
- this->current_size_++;
- return 0;
- }
- else
- return -1;
-}
-
-// Re-resume a service that was previously suspended.
-
-int
-ACE_Service_Repository::resume (const ACE_TCHAR name[],
- const ACE_Service_Type **srp)
-{
- ACE_TRACE ("ACE_Service_Repository::resume");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- int i = this->find_i (name, srp, 0);
-
- if (i == -1)
- return -1;
-
- this->service_vector_[i]->resume ();
- return 0;
-}
-
-// Suspend a service so that it will not be considered active under
-// most circumstances by other portions of the ACE_Service_Repository.
-
-int
-ACE_Service_Repository::suspend (const ACE_TCHAR name[],
- const ACE_Service_Type **srp)
-{
- ACE_TRACE ("ACE_Service_Repository::suspend");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
- int i = this->find_i (name, srp, 0);
-
- if (i == -1)
- return -1;
-
- this->service_vector_[i]->suspend ();
- return 0;
-}
-
-// Completely remove a <name> entry from the Repository and
-// dynamically unlink it if it was originally dynamically linked.
-// Since the order of services in the Respository does not matter, we
-// simply overwrite the entry being deleted with the final entry in
-// the array and decrement the <current_size> by 1.
-
-int
-ACE_Service_Repository::remove (const ACE_TCHAR name[])
-{
- ACE_TRACE ("ACE_Service_Repository::remove");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- int i = this->find_i (name, 0, 0);
-
- if (i == -1)
- return -1;
- else
- {
- ACE_Service_Type *s = ACE_const_cast (ACE_Service_Type *,
- this->service_vector_[i]);
- delete s;
-
- --this->current_size_;
-
- if (this->current_size_ >= 1)
- this->service_vector_[i]
- = this->service_vector_[this->current_size_];
- return 0;
- }
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Service_Repository_Iterator)
-
-void
-ACE_Service_Repository_Iterator::dump (void) const
-{
- ACE_TRACE ("ACE_Service_Repository_Iterator::dump");
-}
-
-// Initializes the iterator and skips over any suspended entries at
-// the beginning of the table, if necessary. Note, you must not
-// perform destructive operations on elements during this iteration...
-
-ACE_Service_Repository_Iterator::ACE_Service_Repository_Iterator
- (ACE_Service_Repository &sr,
- int ignr_suspended)
- : svc_rep_ (sr),
- next_ (-1),
- ignore_suspended_ (ignr_suspended)
-{
- this->advance ();
-}
-
-// Obtains a pointer to the next valid service in the table. If there
-// are no more entries, returns 0, else 1.
-
-int
-ACE_Service_Repository_Iterator::next (const ACE_Service_Type *&sr)
-{
- ACE_TRACE ("ACE_Service_Repository_Iterator::next");
- if (this->next_ < this->svc_rep_.current_size_)
- {
- sr = this->svc_rep_.service_vector_[this->next_];
- return 1;
- }
- else
- return 0;
-}
-
-int
-ACE_Service_Repository_Iterator::done (void) const
-{
- ACE_TRACE ("ACE_Service_Repository_Iterator::done");
-
- return this->next_ >= this->svc_rep_.current_size_;
-}
-
-// Advance the iterator by the proper amount. If we are ignoring
-// suspended entries and the current entry is suspended, then we must
-// skip over this entry. Otherwise, we must advance the NEXT index to
-// reference the next valid service entry.
-
-int
-ACE_Service_Repository_Iterator::advance (void)
-{
- ACE_TRACE ("ACE_Service_Repository_Iterator::advance");
-
- for (++this->next_;
- this->next_ < this->svc_rep_.current_size_
- && this->ignore_suspended_
- && this->svc_rep_.service_vector_[this->next_]->active () == 0;
- this->next_++)
- continue;
-
- return this->next_ < this->svc_rep_.current_size_;
-}
diff --git a/ace/Service_Repository.h b/ace/Service_Repository.h
deleted file mode 100644
index 26ba6b3fbd0..00000000000
--- a/ace/Service_Repository.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Service_Repository.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SERVICE_REPOSITORY_H
-#define ACE_SERVICE_REPOSITORY_H
-#include "ace/pre.h"
-
-#include "ace/Service_Types.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Service_Repository
-{
- // = TITLE
- // Contains all the services offered by a Service
- // Configurator-based application.
- //
- // = DESCRIPTION
- // This class contains a vector of <ACE_Service_Types> *'s and
- // allows an administrative entity to centrally manage and
- // control the behavior of application services. Note that if
- // services are removed from the middle of the repository the
- // order won't necessarily be maintained since the <remove>
- // method performs compaction. However, the common case is not
- // to remove services, so typically they are deleted in the
- // reverse order that they were added originally.
-public:
- friend class ACE_Service_Repository_Iterator;
-
- enum
- {
- DEFAULT_SIZE = ACE_DEFAULT_SERVICE_REPOSITORY_SIZE
- };
-
- // = Initialization and termination methods.
- ACE_Service_Repository (void);
- // Initialize the repository.
-
- ACE_Service_Repository (int size);
- // Initialize the repository.
-
- int open (int size = DEFAULT_SIZE);
- // Initialize the repository.
-
- ~ACE_Service_Repository (void);
- // Close down the repository and free up dynamically allocated
- // resources.
-
- int close (void);
- // Close down the repository and free up dynamically allocated
- // resources.
-
- int fini (void);
- // Finalize all the services by calling <fini> and deleteing
- // dynamically allocated services.
-
- static ACE_Service_Repository *instance (int size = ACE_Service_Repository::DEFAULT_SIZE);
- // Get pointer to a process-wide <ACE_Service_Repository>.
-
- static ACE_Service_Repository *instance (ACE_Service_Repository *);
- // Set pointer to a process-wide <ACE_Service_Repository> and return
- // existing pointer.
-
- static void close_singleton (void);
- // Delete the dynamically allocated Singleton.
-
- // = Search structure operations (all acquire locks as necessary).
-
- int insert (const ACE_Service_Type *);
- // Insert a new service record.
-
- int find (const ACE_TCHAR name[],
- const ACE_Service_Type **srp = 0,
- int ignore_suspended = 1);
- // Locate an entry with <name> in the table. If <ignore_suspended>
- // is set then only consider services marked as resumed. If the
- // caller wants the located entry, pass back a pointer to the
- // located entry via <srp>. If <name> is not found, -1 is returned.
- // If <name> is found, but it is suspended and the caller wants to
- // ignore suspended services a -2 is returned.
-
- int remove (const ACE_TCHAR[]);
- // Remove an existing service record.
-
- // = Liveness control
- int resume (const ACE_TCHAR[], const ACE_Service_Type ** = 0);
- // Resume a service record.
-
- int suspend (const ACE_TCHAR[], const ACE_Service_Type ** = 0);
- // Suspend a service record.
-
- int current_size (void);
- // Return the current size of the repository.
-
- int total_size (void);
- // Return the total size of the repository.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int find_i (const ACE_TCHAR service_name[],
- const ACE_Service_Type ** = 0,
- int ignore_suspended = 1);
- // Locates <service_name>. Must be called without locks being
- // held...
-
- const ACE_Service_Type **service_vector_;
- // Contains all the configured services.
-
- int current_size_;
- // Current number of services.
-
- int total_size_;
- // Maximum number of services.
-
- static ACE_Service_Repository *svc_rep_;
- // Pointer to a process-wide <ACE_Service_Repository>.
-
- static int delete_svc_rep_;
- // Must delete the <svc_rep_> if non-0.
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_Thread_Mutex lock_;
- // Synchronization variable for the MT_SAFE Repository
-#endif /* ACE_MT_SAFE */
-};
-
-class ACE_Export ACE_Service_Repository_Iterator
-{
- // = TITLE
- // Iterate through the <ACE_Service_Repository>.
- //
- // = DESCRIPTION
- // Make sure not to delete entries as the iteration is going on
- // since this class is not designed as a robust iterator.
-public:
- // = Initialization and termination methods.
- ACE_Service_Repository_Iterator (ACE_Service_Repository &sr,
- int ignored_suspended = 1);
- // Constructor.
-
- ~ACE_Service_Repository_Iterator (void);
- // Destructor.
-
- // = Iteration methods.
-
- int next (const ACE_Service_Type *&next_item);
- // Pass back the <next_item> that hasn't been seen in the set.
- // Returns 0 when all items have been seen, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Service_Repository &svc_rep_;
- // Reference to the Service Repository we are iterating over.
-
- int next_;
- // Next index location that we haven't yet seen.
-
- int ignore_suspended_;
- // Are we ignoring suspended services?
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Service_Repository.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* _SERVICE_REPOSITORY_H */
diff --git a/ace/Service_Repository.i b/ace/Service_Repository.i
deleted file mode 100644
index 5ba6a04e0fe..00000000000
--- a/ace/Service_Repository.i
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Service_Repository.i
-
-// Returns a count of the number of currently valid entries (counting
-// both resumed and suspended entries).
-
-ACE_INLINE int
-ACE_Service_Repository::current_size (void)
-{
- ACE_TRACE ("ACE_Service_Repository::current_size");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
- return this->current_size_;
-}
-
-// Returns a count of the total number of possible entries in the
-// table.
-
-ACE_INLINE int
-ACE_Service_Repository::total_size (void)
-{
- ACE_TRACE ("ACE_Service_Repository::total_size");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
- return this->total_size_;
-}
-
-ACE_INLINE
-ACE_Service_Repository_Iterator::~ACE_Service_Repository_Iterator (void)
-{
-}
diff --git a/ace/Service_Types.cpp b/ace/Service_Types.cpp
deleted file mode 100644
index d5f7fdfe36d..00000000000
--- a/ace/Service_Types.cpp
+++ /dev/null
@@ -1,453 +0,0 @@
-// $Id$
-
-#include "ace/Service_Types.h"
-#include "ace/Stream_Modules.h"
-#include "ace/Stream.h"
-
-ACE_RCSID(ace, Service_Types, "$Id$")
-
-typedef ACE_Stream<ACE_SYNCH> MT_Stream;
-typedef ACE_Module<ACE_SYNCH> MT_Module;
-typedef ACE_Task<ACE_SYNCH> MT_Task;
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Service_Types.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Service_Type_Impl)
-
-void
-ACE_Service_Type_Impl::dump (void) const
-{
- ACE_TRACE ("ACE_Service_Type_Impl::dump");
-}
-
-ACE_Service_Type_Impl::ACE_Service_Type_Impl (void *so,
- const ACE_TCHAR *s_name,
- u_int f,
- ACE_Service_Object_Exterminator gobbler)
- : name_ (0),
- obj_ (so),
- gobbler_ (gobbler),
- flags_ (f)
-{
- ACE_TRACE ("ACE_Service_Type_Impl::ACE_Service_Type_Impl");
- this->name (s_name);
-}
-
-ACE_Service_Type_Impl::~ACE_Service_Type_Impl (void)
-{
- ACE_TRACE ("ACE_Service_Type_Impl::~ACE_Service_Type_Impl");
-
- // It's ok to call this, even though we may have already deleted it
- // in the fini() method since it would then be NULL.
- delete [] (ACE_TCHAR *) this->name_;
-}
-
-int
-ACE_Service_Type_Impl::fini (void) const
-{
- ACE_TRACE ("ACE_Service_Type_Impl::fini");
- if (ACE::debug ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("destroying %s, flags = %d\n"),
- this->name_,
- this->flags_));
-
- delete [] (ACE_TCHAR *) this->name_;
- ((ACE_Service_Type_Impl *) this)->name_ = 0;
-
- if (ACE_BIT_ENABLED (this->flags_,
- ACE_Service_Type::DELETE_OBJ))
- {
- if (gobbler_ != 0)
- gobbler_ (this->object ());
- else
- // Cast to remove const-ness.
- operator delete ((void *) this->object ());
- }
-
- if (ACE_BIT_ENABLED (this->flags_,
- ACE_Service_Type::DELETE_THIS))
- delete (ACE_Service_Type_Impl *) this;
-
- return 0;
-}
-
-ACE_Service_Object_Type::ACE_Service_Object_Type (void *so,
- const ACE_TCHAR *s_name,
- u_int f,
- ACE_Service_Object_Exterminator gobbler)
- : ACE_Service_Type_Impl (so, s_name, f, gobbler)
-{
- ACE_TRACE ("ACE_Service_Object_Type::ACE_Service_Object_Type");
-}
-
-int
-ACE_Service_Object_Type::init (int argc, ACE_TCHAR *argv[]) const
-{
- ACE_TRACE ("ACE_Service_Object_Type::init");
-
- void *obj = this->object ();
- ACE_Service_Object *so = (ACE_Service_Object *) obj;
-
- if (so == 0)
- return -1;
- else
- return so->init (argc, argv);
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Module_Type)
-
-void
-ACE_Module_Type::dump (void) const
-{
- ACE_TRACE ("ACE_Module_Type::dump");
-}
-
-ACE_Module_Type::ACE_Module_Type (void *m,
- const ACE_TCHAR *m_name,
- u_int f)
- : ACE_Service_Type_Impl (m, m_name, f)
-{
- ACE_TRACE ("ACE_Module_Type::ACE_Module_Type");
-}
-
-int
-ACE_Module_Type::init (int argc, ACE_TCHAR *argv[]) const
-{
- ACE_TRACE ("ACE_Module_Type::init");
- void *obj = this->object ();
- MT_Module *mod = (MT_Module *) obj;
- MT_Task *reader = mod->reader ();
- MT_Task *writer = mod->writer ();
-
- if (reader->init (argc, argv) == -1
- || writer->init (argc, argv) == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_Module_Type::suspend (void) const
-{
- ACE_TRACE ("ACE_Module_Type::suspend");
- void *obj = this->object ();
- MT_Module *mod = (MT_Module *) obj;
- MT_Task *reader = mod->reader ();
- MT_Task *writer = mod->writer ();
-
- if (reader->suspend () == -1
- || writer->suspend () == -1)
- return -1;
- else
- return 0;
-}
-
-int
-ACE_Module_Type::resume (void) const
-{
- ACE_TRACE ("ACE_Module_Type::resume");
- void *obj = this->object ();
- MT_Module *mod = (MT_Module *) obj;
- MT_Task *reader = mod->reader ();
- MT_Task *writer = mod->writer ();
-
- if (reader->resume () == -1
- || writer->resume () == -1)
- return -1;
- else
- return 0;
-}
-
-// Note, these operations are somewhat too familiar with the
-// implementation of ACE_Module and ACE_Module::close...
-
-int
-ACE_Module_Type::fini (void) const
-{
- ACE_TRACE ("ACE_Module_Type::fini");
-
- void *obj = this->object ();
- MT_Module *mod = (MT_Module *) obj;
- MT_Task *reader = mod->reader ();
- MT_Task *writer = mod->writer ();
-
- if (reader != 0)
- reader->fini ();
-
- if (writer != 0)
- writer->fini ();
-
- // Close the module and delete the memory.
- mod->close (MT_Module::M_DELETE);
- return ACE_Service_Type_Impl::fini ();
-}
-
-int
-ACE_Module_Type::info (ACE_TCHAR **str, size_t len) const
-{
- ACE_TRACE ("ACE_Module_Type::info");
- ACE_TCHAR buf[BUFSIZ];
-
- ACE_OS::sprintf (buf,
- ACE_TEXT ("%s\t %s"),
- this->name (),
- ACE_TEXT ("# ACE_Module\n"));
-
- if (*str == 0 && (*str = ACE_OS::strdup (buf)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*str, buf, len);
- return ACE_OS::strlen (buf);
-}
-
-void
-ACE_Module_Type::link (ACE_Module_Type *n)
-{
- ACE_TRACE ("ACE_Module_Type::link");
- this->link_ = n;
-}
-
-ACE_Module_Type *
-ACE_Module_Type::link (void) const
-{
- ACE_TRACE ("ACE_Module_Type::link");
- return this->link_;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Type)
-
-void
-ACE_Stream_Type::dump (void) const
-{
- ACE_TRACE ("ACE_Stream_Type::dump");
-}
-
-int
-ACE_Stream_Type::init (int, ACE_TCHAR *[]) const
-{
- ACE_TRACE ("ACE_Stream_Type::init");
- return 0;
-}
-
-int
-ACE_Stream_Type::suspend (void) const
-{
- ACE_TRACE ("ACE_Stream_Type::suspend");
-
- for (ACE_Module_Type *m = this->head_;
- m != 0;
- m = m->link ())
- m->suspend ();
-
- return 0;
-}
-
-int
-ACE_Stream_Type::resume (void) const
-{
- ACE_TRACE ("ACE_Stream_Type::resume");
-
- for (ACE_Module_Type *m = this->head_;
- m != 0;
- m = m->link ())
- m->resume ();
-
- return 0;
-}
-
-ACE_Stream_Type::ACE_Stream_Type (void *s,
- const ACE_TCHAR *s_name,
- u_int f)
- : ACE_Service_Type_Impl (s, s_name, f),
- head_ (0)
-{
- ACE_TRACE ("ACE_Stream_Type::ACE_Stream_Type");
-}
-
-int
-ACE_Stream_Type::info (ACE_TCHAR **str, size_t len) const
-{
- ACE_TRACE ("ACE_Stream_Type::info");
- ACE_TCHAR buf[BUFSIZ];
-
- ACE_OS::sprintf (buf,
- ACE_TEXT ("%s\t %s"),
- this->name (),
- ACE_TEXT ("# STREAM\n"));
-
- if (*str == 0 && (*str = ACE_OS::strdup (buf)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*str, buf, len);
- return ACE_OS::strlen (buf);
-}
-
-int
-ACE_Stream_Type::fini (void) const
-{
- ACE_TRACE ("ACE_Stream_Type::fini");
- void *obj = this->object ();
- MT_Stream *str = (MT_Stream *) obj;
-
- for (ACE_Module_Type *m = this->head_; m != 0; )
- {
- ACE_Module_Type *t = m->link ();
-
- // Final arg is an indication to *not* delete the Module.
- str->remove (m->name (),
- MT_Module::M_DELETE_NONE);
-
- // Finalize the Module (this may delete it, but we don't really
- // care since we don't access it again).
- m->fini ();
- m = t;
- }
-
- str->close ();
- return ACE_Service_Type_Impl::fini ();
-}
-
-// Locate and remove <mod_name> from the ACE_Stream.
-
-int
-ACE_Stream_Type::remove (ACE_Module_Type *mod)
-{
- ACE_TRACE ("ACE_Stream_Type::remove");
-
- ACE_Module_Type *prev = 0;
- void *obj = this->object ();
- MT_Stream *str = (MT_Stream *) obj;
- int result = 0;
-
- for (ACE_Module_Type *m = this->head_; m != 0; )
- {
- // We need to do this first so we don't bomb out if we delete m!
- ACE_Module_Type *link = m->link ();
-
- if (m == mod)
- {
- if (prev == 0)
- this->head_ = link;
- else
- prev->link (link);
-
- // Final arg is an indication to *not* delete the Module.
- if (str->remove (m->name (),
- MT_Module::M_DELETE_NONE) == -1)
- result = -1;
-
- // This call may end up deleting m, which is ok since we
- // don't access it again!
- m->fini ();
- }
- else
- prev = m;
-
- m = link;
- }
-
- return result;
-}
-
-int
-ACE_Stream_Type::push (ACE_Module_Type *new_module)
-{
- ACE_TRACE ("ACE_Stream_Type::push");
- void *obj = this->object ();
- MT_Stream *str = (MT_Stream *) obj;
-
- new_module->link (this->head_);
- this->head_ = new_module;
- obj = new_module->object ();
- return str->push ((MT_Module *) obj);
-}
-
-ACE_Module_Type *
-ACE_Stream_Type::find (const ACE_TCHAR *mod_name) const
-{
- ACE_TRACE ("ACE_Stream_Type::find");
-
- for (ACE_Module_Type *m = this->head_;
- m != 0;
- m = m->link ())
- if (ACE_OS::strcmp (m->name (), mod_name) == 0)
- return m;
-
- return 0;
-}
-
-int
-ACE_Service_Object_Type::fini (void) const
-{
- ACE_TRACE ("ACE_Service_Object_Type::fini");
-
- void *obj = this->object ();
-
- ACE_Service_Object *so = (ACE_Service_Object *) obj;
-
- if (so)
- {
- so->fini ();
-
-#if 0
- if (ACE_BIT_ENABLED (this->flags_,
- ACE_Service_Type::DELETE_OBJ))
- delete so;
-#endif /* 1 */
- }
-
- return ACE_Service_Type_Impl::fini ();
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Message_Queue<ACE_SYNCH>;
-template class ACE_Message_Queue_Iterator<ACE_SYNCH>;
-template class ACE_Message_Queue_Reverse_Iterator<ACE_SYNCH>;
-template class ACE_Message_Queue_Factory<ACE_SYNCH>;
-template class ACE_Dynamic_Message_Queue<ACE_SYNCH>;
-template class ACE_Module<ACE_SYNCH>;
-template class ACE_Stream<ACE_SYNCH>;
-template class ACE_Stream_Head<ACE_SYNCH>;
-template class ACE_Stream_Tail<ACE_SYNCH>;
-template class ACE_Task<ACE_SYNCH>;
-template class ACE_Thru_Task<ACE_SYNCH>;
-
-// Even with threads, these ACE_NULL_SYNCH specializations are necessary.
-#if defined (ACE_HAS_THREADS)
- template class ACE_Message_Queue<ACE_NULL_SYNCH>;
- template class ACE_Message_Queue_Iterator<ACE_NULL_SYNCH>;
- template class ACE_Message_Queue_Reverse_Iterator<ACE_NULL_SYNCH>;
- template class ACE_Message_Queue_Factory<ACE_NULL_SYNCH>;
- template class ACE_Dynamic_Message_Queue<ACE_NULL_SYNCH>;
- template class ACE_Module<ACE_NULL_SYNCH>;
- template class ACE_Task<ACE_NULL_SYNCH>;
- template class ACE_Thru_Task<ACE_NULL_SYNCH>;
-#endif /* ACE_HAS_THREADS */
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Message_Queue<ACE_SYNCH>
-#pragma instantiate ACE_Message_Queue_Iterator<ACE_SYNCH>
-#pragma instantiate ACE_Message_Queue_Reverse_Iterator<ACE_SYNCH>
-#pragma instantiate ACE_Message_Queue_Factory<ACE_SYNCH>
-#pragma instantiate ACE_Dynamic_Message_Queue<ACE_SYNCH>
-#pragma instantiate ACE_Module<ACE_SYNCH>
-#pragma instantiate ACE_Stream<ACE_SYNCH>
-#pragma instantiate ACE_Stream_Head<ACE_SYNCH>
-#pragma instantiate ACE_Stream_Tail<ACE_SYNCH>
-#pragma instantiate ACE_Task<ACE_SYNCH>
-#pragma instantiate ACE_Thru_Task<ACE_SYNCH>
-// Even with threads, these ACE_NULL_SYNCH specializations are necessary.
-#if defined (ACE_HAS_THREADS)
- #pragma instantiate ACE_Message_Queue<ACE_NULL_SYNCH>
- #pragma instantiate ACE_Message_Queue_Iterator<ACE_NULL_SYNCH>
- #pragma instantiate ACE_Message_Queue_Reverse_Iterator<ACE_NULL_SYNCH>
- #pragma instantiate ACE_Message_Queue_Factory<ACE_NULL_SYNCH>
- #pragma instantiate ACE_Dynamic_Message_Queue<ACE_NULL_SYNCH>
- #pragma instantiate ACE_Module<ACE_NULL_SYNCH>
- #pragma instantiate ACE_Task<ACE_NULL_SYNCH>
- #pragma instantiate ACE_Thru_Task<ACE_NULL_SYNCH>
-#endif /* ACE_HAS_THREADS */
-#else
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Service_Types.h b/ace/Service_Types.h
deleted file mode 100644
index c70a8ffdd3e..00000000000
--- a/ace/Service_Types.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Service_Types.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SERVICE_TYPE_H
-#define ACE_SERVICE_TYPE_H
-#include "ace/pre.h"
-
-#include "ace/Service_Object.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch.h"
-
-class ACE_Export ACE_Service_Type_Impl
-{
- // = TITLE
- // The abstract base class of the hierarchy that defines the
- // contents of the <ACE_Service_Repository>. The subclasses of
- // this class allow the configuration of <ACE_Service_Objects>,
- // <ACE_Modules>, and <ACE_Streams>.
- //
- // = DESCRIPTION
- // This class provides the root of the implementation hierarchy
- // of the "Bridge" pattern. It maintains a pointer to the
- // appropriate type of service implementation, i.e.,
- // <ACE_Service_Object>, <ACE_Module>, or <ACE_Stream>.
-public:
- // = Initialization and termination methods.
- ACE_Service_Type_Impl (void *object,
- const ACE_TCHAR *s_name,
- u_int flags = 0,
- ACE_Service_Object_Exterminator gobbler = 0);
- virtual ~ACE_Service_Type_Impl (void);
-
- // = Pure virtual interface (must be defined by the subclass).
- virtual int suspend (void) const = 0;
- virtual int resume (void) const = 0;
- virtual int init (int argc, ACE_TCHAR *argv[]) const = 0;
- virtual int fini (void) const;
- virtual int info (ACE_TCHAR **str, size_t len) const = 0;
-
- void *object (void) const;
- // The pointer to the service.
-
- const ACE_TCHAR *name (void) const;
- // Get the name of the service.
-
- void name (const ACE_TCHAR *);
- // Set the name of the service.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- const ACE_TCHAR *name_;
- // Name of the service.
-
- void *obj_;
- // Pointer to object that implements the service. This actually
- // points to an <ACE_Service_Object>, <ACE_Module>, or <ACE_Stream>.
-
- ACE_Service_Object_Exterminator gobbler_;
- // Destroy function to deallocate obj_.
-
- u_int flags_;
- // Flags that control serivce behavior (particularly deletion).
-};
-
-class ACE_Export ACE_Service_Object_Type : public ACE_Service_Type_Impl
-{
- // = TITLE
- // Define the methods for handling the configuration of
- // <ACE_Service_Objects>.
-public:
- // = Initialization method.
- ACE_Service_Object_Type (void *so,
- const ACE_TCHAR *name,
- u_int flags = 0,
- ACE_Service_Object_Exterminator gobbler = 0);
-
- ~ACE_Service_Object_Type (void);
-
- // = Implement the hooks for <ACE_Service_Objects>.
- virtual int suspend (void) const;
- virtual int resume (void) const;
- virtual int init (int argc, ACE_TCHAR *argv[]) const;
- virtual int fini (void) const;
- virtual int info (ACE_TCHAR **str, size_t len) const;
-};
-
-class ACE_Export ACE_Module_Type : public ACE_Service_Type_Impl
-{
- // = TITLE
- // Define the methods for handling the configuration of
- // <ACE_Modules>.
-public:
- // = Initialization method.
- ACE_Module_Type (void *m, // Really an <ACE_Module> *.
- const ACE_TCHAR *identifier,
- u_int flags = 0);
-
- ~ACE_Module_Type (void);
-
- // = Implement the hooks for <ACE_Modules>.
- virtual int suspend (void) const;
- virtual int resume (void) const;
- virtual int init (int argc, ACE_TCHAR *argv[]) const;
- virtual int fini (void) const;
- virtual int info (ACE_TCHAR **str, size_t len) const;
-
- // Get/set the link pointer.
- ACE_Module_Type *link (void) const;
- void link (ACE_Module_Type *);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Module_Type *link_;
- // Pointer to the next <ACE_Module_Type> in an <ACE_Stream_Type>.
-};
-
-class ACE_Export ACE_Stream_Type : public ACE_Service_Type_Impl
-{
- // = TITLE
- // Define the methods for handling the configuration of
- // <ACE_Streams>.
-public:
- // = Initialization method.
- ACE_Stream_Type (void *s, // Really an <ACE_Stream> *.
- const ACE_TCHAR *identifier,
- u_int flags = 0);
-
- ~ACE_Stream_Type (void);
-
- // = Implement the hooks for <ACE_Streams>.
- virtual int suspend (void) const;
- virtual int resume (void) const;
- virtual int init (int argc, ACE_TCHAR *argv[]) const;
- virtual int fini (void) const;
- virtual int info (ACE_TCHAR **str, size_t len) const;
-
- int push (ACE_Module_Type *new_module);
- // Add a new <ACE_Module> to the top of the <ACE_Stream>.
-
- int remove (ACE_Module_Type *module);
- // Search for <module> and remove it from the <ACE_Stream>.
-
- ACE_Module_Type *find (const ACE_TCHAR *mod_name) const;
- // Locate the <ACE_Module> with <mod_name>.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Module_Type *head_;
- // Pointer to the head of the <ACE_Module> list.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Service_Types.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* _SERVICE_TYPE_H */
diff --git a/ace/Service_Types.i b/ace/Service_Types.i
deleted file mode 100644
index 78eb127cbfc..00000000000
--- a/ace/Service_Types.i
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE void *
-ACE_Service_Type_Impl::object (void) const
-{
- ACE_TRACE ("ACE_Service_Type_Impl::object");
- return this->obj_;
-}
-
-ACE_INLINE const ACE_TCHAR *
-ACE_Service_Type_Impl::name (void) const
-{
- ACE_TRACE ("ACE_Service_Type_Impl::name");
- return this->name_;
-}
-
-ACE_INLINE void
-ACE_Service_Type_Impl::name (const ACE_TCHAR *n)
-{
- ACE_TRACE ("ACE_Service_Type_Impl::name");
-
- delete [] (ACE_TCHAR *) this->name_;
- this->name_ = ACE::strnew (n);
-}
-
-ACE_INLINE
-ACE_Service_Object_Type::~ACE_Service_Object_Type (void)
-{
- ACE_TRACE ("ACE_Service_Object_Type::~ACE_Service_Object_Type");
-}
-
-ACE_INLINE int
-ACE_Service_Object_Type::suspend (void) const
-{
- ACE_TRACE ("ACE_Service_Object_Type::suspend");
- return ((ACE_Service_Object *) this->object ())->suspend ();
-}
-
-ACE_INLINE int
-ACE_Service_Object_Type::resume (void) const
-{
- ACE_TRACE ("ACE_Service_Object_Type::resume");
- return ((ACE_Service_Object *) this->object ())->resume ();
-}
-
-ACE_INLINE int
-ACE_Service_Object_Type::info (ACE_TCHAR **str, size_t len) const
-{
- ACE_TRACE ("ACE_Service_Object_Type::info");
- return ((ACE_Service_Object *) this->object ())->info (str, len);
-}
-
-ACE_INLINE
-ACE_Module_Type::~ACE_Module_Type (void)
-{
- ACE_TRACE ("ACE_Module_Type::~ACE_Module_Type");
-}
-
-ACE_INLINE
-ACE_Stream_Type::~ACE_Stream_Type (void)
-{
- ACE_TRACE ("ACE_Stream_Type::~ACE_Stream_Type");
-}
diff --git a/ace/Shared_Memory.cpp b/ace/Shared_Memory.cpp
deleted file mode 100644
index 5e4447075ee..00000000000
--- a/ace/Shared_Memory.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// $Id$
-
-#include "ace/Shared_Memory.h"
-
-ACE_RCSID(ace, Shared_Memory, "$Id$")
-
-ACE_Shared_Memory::~ACE_Shared_Memory (void)
-{
-}
diff --git a/ace/Shared_Memory.h b/ace/Shared_Memory.h
deleted file mode 100644
index 2faf3a94d1f..00000000000
--- a/ace/Shared_Memory.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Shared_Memory.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SHARED_MEMORY_H
-#define ACE_SHARED_MEMORY_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Shared_Memory
-{
- // = TITLE
- // This base class adapts both System V shared memory and "BSD"
- // mmap to a common API.
- //
- // = DESCRIPTION
- // This is a very simple-minded wrapper, i.e., it really is only
- // useful for allocating large contiguous chunks of shared
- // memory. For a much more sophisticated version, please check
- // out the <ACE_Malloc> class.
-public:
- virtual ~ACE_Shared_Memory (void);
-
- // = Note that all the following methods are pure virtual.
- virtual int close (void) = 0;
- virtual int remove (void) = 0;
- virtual void *malloc (size_t = 0) = 0;
- virtual int free (void *p) = 0;
- virtual int get_segment_size (void) const = 0;
- virtual ACE_HANDLE get_id (void) const = 0;
-};
-#include "ace/post.h"
-#endif /* ACE_SHARED_MEMORY_H */
diff --git a/ace/Shared_Memory_MM.cpp b/ace/Shared_Memory_MM.cpp
deleted file mode 100644
index 85778fbdf07..00000000000
--- a/ace/Shared_Memory_MM.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// Shared_Memory_MM.cpp
-// $Id$
-
-#include "ace/Shared_Memory_MM.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Shared_Memory_MM.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Shared_Memory_MM, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Shared_Memory_MM)
-
-void
-ACE_Shared_Memory_MM::dump (void) const
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::dump");
-}
-
-// Creates a shared memory segment of SIZE bytes.
-
-ACE_Shared_Memory_MM::ACE_Shared_Memory_MM (ACE_HANDLE handle,
- int length,
- int prot,
- int share,
- char *addr,
- off_t pos)
- : shared_memory_ (handle, length, prot, share, addr, pos)
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::ACE_Shared_Memory_MM");
-}
-
-ACE_Shared_Memory_MM::ACE_Shared_Memory_MM (const ACE_TCHAR *file_name,
- int len,
- int flags,
- int mode,
- int prot,
- int share,
- char *addr,
- off_t pos)
- : shared_memory_ (file_name, len, flags, mode,
- prot, share, addr, pos)
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::ACE_Shared_Memory_MM");
-}
-
-// The "do-nothing" constructor.
-
-ACE_Shared_Memory_MM::ACE_Shared_Memory_MM (void)
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::ACE_Shared_Memory_MM");
-}
diff --git a/ace/Shared_Memory_MM.h b/ace/Shared_Memory_MM.h
deleted file mode 100644
index 85062dbc3e6..00000000000
--- a/ace/Shared_Memory_MM.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Shared_Memory_MM.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SHARED_MALLOC_MM_H
-#define ACE_SHARED_MALLOC_MM_H
-#include "ace/pre.h"
-
-#include "ace/Shared_Memory.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Mem_Map.h"
-
-class ACE_Export ACE_Shared_Memory_MM : public ACE_Shared_Memory
-{
- // = TITLE
- // Shared memory wrapper based on MMAP.
- //
- // = DESCRIPTION
- // This class provides a very simple-minded shared memory
- // manager. For more a powerful memory allocator please see
- // <ACE_Malloc>.
-public:
- // = Initialization and termination methods.
- ACE_Shared_Memory_MM (void);
- // Default constructor.
-
- ACE_Shared_Memory_MM (ACE_HANDLE handle,
- int length = -1,
- int prot = PROT_RDWR,
- int share = ACE_MAP_PRIVATE,
- char *addr = 0,
- off_t pos = 0);
- // Constructor.
-
- ACE_Shared_Memory_MM (const ACE_TCHAR *file_name,
- int len = -1,
- int flags = O_RDWR | O_CREAT,
- int mode = ACE_DEFAULT_FILE_PERMS,
- int prot = PROT_RDWR,
- int share = ACE_MAP_SHARED,
- char *addr = 0, off_t pos = 0);
- // Constructor.
-
- int open (ACE_HANDLE handle,
- int length = -1,
- int prot = PROT_RDWR,
- int share = ACE_MAP_PRIVATE,
- char *addr = 0,
- off_t pos = 0);
- // Open method.
-
- int open (const ACE_TCHAR *file_name,
- int len = -1,
- int flags = O_RDWR | O_CREAT,
- int mode = ACE_DEFAULT_FILE_PERMS,
- int prot = PROT_RDWR,
- int share = ACE_MAP_SHARED,
- char *addr = 0,
- off_t pos = 0);
- // Open method.
-
- const ACE_TCHAR *filename (void) const;
- // Return the name of file that is mapped (if any).
-
- virtual int close (void);
- // Close down the shared memory segment.
-
- virtual int remove (void);
- // Remove the shared memory segment and the underlying file.
-
- // = Allocation and deallocation methods.
- virtual void *malloc (size_t size = 0);
- // Create a new chuck of memory containing <size> bytes.
-
- virtual int free (void *p);
- // Free a chuck of memory allocated by
- // <ACE_Shared_Memory_MM::malloc>.
-
- virtual int get_segment_size (void) const;
- // Return the size of the shared memory segment.
-
- virtual ACE_HANDLE get_id (void) const;
- // Return the ID of the shared memory segment (i.e., an ACE_HANDLE).
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Mem_Map shared_memory_;
- // This version is implemented with memory-mapped files.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Shared_Memory_MM.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SHARED_MALLOC_MM_H */
diff --git a/ace/Shared_Memory_MM.i b/ace/Shared_Memory_MM.i
deleted file mode 100644
index 6a92d7677c8..00000000000
--- a/ace/Shared_Memory_MM.i
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Shared_Memory_MM.i
-
-// Return the name of file that is mapped (if any).
-
-ACE_INLINE const ACE_TCHAR *
-ACE_Shared_Memory_MM::filename (void) const
-{
- return this->shared_memory_.filename ();
-}
-
-ACE_INLINE int
-ACE_Shared_Memory_MM::open (ACE_HANDLE handle,
- int length,
- int prot,
- int share,
- char *addr,
- off_t pos)
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::open");
- return shared_memory_.map (handle, length, prot, share, addr, pos);
-}
-
-ACE_INLINE int
-ACE_Shared_Memory_MM::open (const ACE_TCHAR *file_name,
- int len,
- int flags,
- int mode,
- int prot,
- int share,
- char *addr,
- off_t pos)
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::open");
- return shared_memory_.map (file_name, len, flags, mode,
- prot, share, addr, pos);
-}
-
-// The overall size of the segment.
-
-ACE_INLINE int
-ACE_Shared_Memory_MM::get_segment_size (void) const
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::get_segment_size");
- return this->shared_memory_.size ();
-}
-
-// Unmaps the shared memory segment.
-
-ACE_INLINE int
-ACE_Shared_Memory_MM::remove (void)
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::remove");
- return shared_memory_.remove ();
-}
-
-// Closes (unmaps) the shared memory segment.
-
-ACE_INLINE int
-ACE_Shared_Memory_MM::close (void)
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::close");
- return shared_memory_.unmap ();
-}
-
-ACE_INLINE void *
-ACE_Shared_Memory_MM::malloc (size_t)
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::malloc");
- void *addr;
-
- return this->shared_memory_ (addr) == -1 ? 0 : addr;
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_Shared_Memory_MM::get_id (void) const
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::get_id");
- return this->shared_memory_.handle ();
-}
-
-ACE_INLINE int
-ACE_Shared_Memory_MM::free (void *p)
-{
- ACE_TRACE ("ACE_Shared_Memory_MM::free");
- return p != 0;
-}
diff --git a/ace/Shared_Memory_SV.cpp b/ace/Shared_Memory_SV.cpp
deleted file mode 100644
index bd8dba00a8a..00000000000
--- a/ace/Shared_Memory_SV.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// Shared_Memory_SV.cpp
-// $Id$
-
-#include "ace/Shared_Memory_SV.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Shared_Memory_SV.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Shared_Memory_SV, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Shared_Memory_SV)
-
-void
-ACE_Shared_Memory_SV::dump (void) const
-{
- ACE_TRACE ("ACE_Shared_Memory_SV::dump");
-}
-
-ACE_Shared_Memory_SV::ACE_Shared_Memory_SV (key_t id,
- int length,
- int create,
- int perms,
- void *addr,
- int flags)
- : shared_memory_ (id, length, create, perms, addr, flags)
-{
- ACE_TRACE ("ACE_Shared_Memory_SV::ACE_Shared_Memory_SV");
-}
-
diff --git a/ace/Shared_Memory_SV.h b/ace/Shared_Memory_SV.h
deleted file mode 100644
index bf7fd7d36cb..00000000000
--- a/ace/Shared_Memory_SV.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Shared_Memory_SV.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SHARED_MALLOC_SV_H
-#define ACE_SHARED_MALLOC_SV_H
-#include "ace/pre.h"
-
-#include "ace/Shared_Memory.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SV_Shared_Memory.h"
-
-class ACE_Export ACE_Shared_Memory_SV : public ACE_Shared_Memory
-{
- // = TITLE
- // Shared memory wrapper based on System V shared memory.
- //
- // = DESCRIPTION
- // This class provides a very simple-minded shared memory
- // manager. For more a powerful memory allocator please see
- // <ACE_Malloc>.
-public:
- enum
- {
- ACE_CREATE = IPC_CREAT,
- ACE_OPEN = 0
- };
-
- // = Initialization and termination methods.
- ACE_Shared_Memory_SV (void);
- ACE_Shared_Memory_SV (key_t id,
- int length,
- int create = ACE_Shared_Memory_SV::ACE_OPEN,
- int perms = ACE_DEFAULT_FILE_PERMS,
- void *addr = 0,
- int flags = 0);
-
- int open (key_t id,
- int length,
- int create = ACE_Shared_Memory_SV::ACE_OPEN,
- int perms = ACE_DEFAULT_FILE_PERMS,
- void *addr = 0,
- int flags = 0);
-
- virtual int close (void);
- // Close down the shared memory segment.
-
- virtual int remove (void);
- // Remove the underlying shared memory segment.
-
- // = Allocation and deallocation methods.
- virtual void *malloc (size_t = 0);
- // Create a new chuck of memory containing <size> bytes.
-
- virtual int free (void *p);
- // Free a chuck of memory allocated by <ACE_Shared_Memory_SV::malloc>.
-
- virtual int get_segment_size (void) const;
- // Return the size of the shared memory segment.
-
- virtual ACE_HANDLE get_id (void) const;
- // Return the ID of the shared memory segment (i.e., a System V
- // shared memory internal id).
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_SV_Shared_Memory shared_memory_;
- // This version is implemented with System V shared memory
- // segments.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Shared_Memory_SV.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SHARED_MALLOC_SV_H */
diff --git a/ace/Shared_Memory_SV.i b/ace/Shared_Memory_SV.i
deleted file mode 100644
index 400d9e63201..00000000000
--- a/ace/Shared_Memory_SV.i
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- 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;
-}
diff --git a/ace/Shared_Object.cpp b/ace/Shared_Object.cpp
deleted file mode 100644
index b7237bfb1a3..00000000000
--- a/ace/Shared_Object.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// Shared_Object.cpp
-// $Id$
-
-#include "ace/Shared_Object.h"
-/* Provide the abstract base class used to access dynamic linking
- facilities */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Shared_Object.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Shared_Object, "$Id$")
-
-// Initializes object when dynamic linking occurs.
-
-int
-ACE_Shared_Object::init (int, ACE_TCHAR *[])
-{
- ACE_TRACE ("ACE_Shared_Object::init");
- return 0;
-}
-
-// Terminates object when dynamic unlinking occurs.
-
-int
-ACE_Shared_Object::fini (void)
-{
- ACE_TRACE ("ACE_Shared_Object::fini");
- return 0;
-}
-
-// Returns information on active object.
-
-int
-ACE_Shared_Object::info (ACE_TCHAR **, size_t) const
-{
- ACE_TRACE ("ACE_Shared_Object::info");
- return 0;
-}
-
-// Need to give a default implementation.
-
-ACE_Shared_Object::~ACE_Shared_Object (void)
-{
- ACE_TRACE ("ACE_Shared_Object::~ACE_Shared_Object");
-}
diff --git a/ace/Shared_Object.h b/ace/Shared_Object.h
deleted file mode 100644
index e4082203255..00000000000
--- a/ace/Shared_Object.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Shared_Object.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SHARED_OBJECT_H
-#define ACE_SHARED_OBJECT_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Shared_Object
-{
- // = TITLE
- // Provide the abstract base class used to access dynamic
- // linking facilities.
-public:
- ACE_Shared_Object (void);
-
- virtual int init (int argc, ACE_TCHAR *argv[]);
- // Initializes object when dynamic linking occurs.
-
- virtual int fini (void);
- // Terminates object when dynamic unlinking occurs.
-
- virtual int info (ACE_TCHAR **info_string, size_t length = 0) const;
- // Returns information on active object.
-
- virtual ~ACE_Shared_Object (void);
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Shared_Object.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SHARED_OBJECT_H */
diff --git a/ace/Shared_Object.i b/ace/Shared_Object.i
deleted file mode 100644
index 97ca0090c6d..00000000000
--- a/ace/Shared_Object.i
+++ /dev/null
@@ -1,9 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Shared_Object.i
-
-ACE_INLINE
-ACE_Shared_Object::ACE_Shared_Object (void)
-{
-}
diff --git a/ace/Signal.cpp b/ace/Signal.cpp
deleted file mode 100644
index 0c8f21f4471..00000000000
--- a/ace/Signal.cpp
+++ /dev/null
@@ -1,862 +0,0 @@
-// $Id$
-
-#include "ace/Synch_T.h"
-#include "ace/Signal.h"
-#include "ace/Object_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Signal.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Signal, "$Id$")
-
-// Static definitions.
-
-#if defined (ACE_HAS_SIG_C_FUNC)
-
-extern "C" void
-ace_sig_handler_dispatch (int signum, siginfo_t *info, ucontext_t *context)
-{
- ACE_TRACE ("ace_signal_handler_dispatch");
- ACE_Sig_Handler::dispatch (signum, info, context);
-}
-
-static ACE_SignalHandler ace_signal_handler_dispatcher = ACE_SignalHandler (ace_sig_handler_dispatch);
-
-#if !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-extern "C" void
-ace_sig_handlers_dispatch (int signum, siginfo_t *info, ucontext_t *context)
-{
- ACE_TRACE ("ace_signal_handlers_dispatch");
- ACE_Sig_Handlers::dispatch (signum, info, context);
-}
-
-static ACE_SignalHandler ace_signal_handlers_dispatcher = ACE_SignalHandler (ace_sig_handlers_dispatch);
-#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-#else
-static ACE_SignalHandler ace_signal_handler_dispatcher = ACE_SignalHandler (ACE_Sig_Handler::dispatch);
-
-#if !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-static ACE_SignalHandler ace_signal_handlers_dispatcher = ACE_SignalHandler (ACE_Sig_Handlers::dispatch);
-#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */
-#endif /* ACE_HAS_SIG_C_FUNC */
-
-// Array of Event_Handlers that will handle the signals.
-ACE_Event_Handler *ACE_Sig_Handler::signal_handlers_[ACE_NSIG];
-
-// Remembers if a signal has occurred.
-sig_atomic_t ACE_Sig_Handler::sig_pending_ = 0;
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Sig_Action)
-
-void
-ACE_Sig_Action::dump (void) const
-{
- ACE_TRACE ("ACE_Sig_Action::dump");
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Sig_Set)
-
-void
-ACE_Sig_Set::dump (void) const
-{
- ACE_TRACE ("ACE_Sig_Set::dump");
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Sig_Guard)
-
-void
-ACE_Sig_Guard::dump (void) const
-{
- ACE_TRACE ("ACE_Sig_Guard::dump");
-}
-
-ACE_Sig_Action::ACE_Sig_Action (void)
-{
- // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
- this->sa_.sa_flags = 0;
-
- // Since Service_Config::signal_handler_ is static and has an
- // ACE_Sig_Action instance, Win32 will get errno set unless this is
- // commented out.
-#if !defined (ACE_WIN32)
- ACE_OS::sigemptyset (&this->sa_.sa_mask);
-#endif /* ACE_WIN32 */
- this->sa_.sa_handler = 0;
-}
-
-ACE_Sig_Action::ACE_Sig_Action (ACE_SignalHandler sig_handler,
- sigset_t *sig_mask,
- int sig_flags)
-{
- // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
- this->sa_.sa_flags = sig_flags;
-
- if (sig_mask == 0)
- ACE_OS::sigemptyset (&this->sa_.sa_mask);
- else
- this->sa_.sa_mask = *sig_mask; // Structure assignment...
-
-#if !defined(ACE_HAS_TANDEM_SIGNALS)
- this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
-#else
- this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
-#endif /* !ACE_HAS_TANDEM_SIGNALS */
-}
-
-ACE_Sig_Action::ACE_Sig_Action (ACE_SignalHandler sig_handler,
- const ACE_Sig_Set &sig_mask,
- int sig_flags)
-{
- // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
- this->sa_.sa_flags = sig_flags;
-
- // Structure assignment...
- this->sa_.sa_mask = sig_mask.sigset ();
-
-#if !defined(ACE_HAS_TANDEM_SIGNALS)
- this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
-#else
- this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
-#endif /* !ACE_HAS_TANDEM_SIGNALS */
-}
-
-ACE_Sig_Action::ACE_Sig_Action (ACE_SignalHandler sig_handler,
- int signum,
- sigset_t *sig_mask,
- int sig_flags)
-{
- // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
- this->sa_.sa_flags = sig_flags;
-
- if (sig_mask == 0)
- ACE_OS::sigemptyset (&this->sa_.sa_mask);
- else
- this->sa_.sa_mask = *sig_mask; // Structure assignment...
-
-#if !defined(ACE_HAS_TANDEM_SIGNALS)
- this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
-#else
- this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
-#endif /* !ACE_HAS_TANDEM_SIGNALS */
- ACE_OS::sigaction (signum, &this->sa_, 0);
-}
-
-ACE_Sig_Action::ACE_Sig_Action (ACE_SignalHandler sig_handler,
- int signum,
- const ACE_Sig_Set &sig_mask,
- int sig_flags)
-{
- // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
- this->sa_.sa_flags = sig_flags;
-
- // Structure assignment...
- this->sa_.sa_mask = sig_mask.sigset ();
-
-#if !defined(ACE_HAS_TANDEM_SIGNALS)
- this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
-#else
- this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
-#endif /* !ACE_HAS_TANDEM_SIGNALS */
- ACE_OS::sigaction (signum, &this->sa_, 0);
-}
-
-ACE_Sig_Action::ACE_Sig_Action (const ACE_Sig_Set &signals,
- ACE_SignalHandler sig_handler,
- const ACE_Sig_Set &sig_mask,
- int sig_flags)
-{
- // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
- this->sa_.sa_flags = sig_flags;
-
- // Structure assignment...
- this->sa_.sa_mask = sig_mask.sigset ();
-
-#if !defined(ACE_HAS_TANDEM_SIGNALS)
- this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
-#else
- this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
-#endif /* !ACE_HAS_TANDEM_SIGNALS */
-
-#if (ACE_NSIG > 0) && !defined (CHORUS)
- for (int s = 1; s < ACE_NSIG; s++)
- if (signals.is_member (s)
- && ACE_OS::sigaction (s, &this->sa_, 0) == -1)
- break;
-#else /* ACE_NSIG <= 0 || CHORUS */
- ACE_UNUSED_ARG (signals);
-#endif /* ACE_NSIG <= 0 || CHORUS */
-}
-
-ACE_Sig_Action::ACE_Sig_Action (const ACE_Sig_Set &signals,
- ACE_SignalHandler sig_handler,
- sigset_t *sig_mask,
- int sig_flags)
-{
- // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
- this->sa_.sa_flags = sig_flags;
-
- if (sig_mask == 0)
- ACE_OS::sigemptyset (&this->sa_.sa_mask);
- else
- this->sa_.sa_mask = *sig_mask; // Structure assignment...
-
-#if !defined(ACE_HAS_TANDEM_SIGNALS)
- this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
-#else
- this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
-#endif /* !ACE_HAS_TANDEM_SIGNALS */
-
-#if (ACE_NSIG > 0) && !defined (CHORUS)
- for (int s = 1; s < ACE_NSIG; s++)
- if (signals.is_member (s)
- && ACE_OS::sigaction (s, &this->sa_, 0) == -1)
- break;
-#else /* ACE_NSIG <= 0 || CHORUS */
- ACE_UNUSED_ARG (signals);
-#endif /* ACE_NSIG <= 0 || CHORUS */
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Sig_Handler)
-
-void
-ACE_Sig_Handler::dump (void) const
-{
- ACE_TRACE ("ACE_Sig_Handler::dump");
-}
-
-int
-ACE_Sig_Handler::sig_pending (void)
-{
- ACE_TRACE ("ACE_Sig_Handler::sig_pending");
- ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
- return ACE_Sig_Handler::sig_pending_ != 0;
-}
-
-void
-ACE_Sig_Handler::sig_pending (int pending)
-{
- ACE_TRACE ("ACE_Sig_Handler::sig_pending");
-
- ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
- ACE_Sig_Handler::sig_pending_ = pending;
-}
-
-ACE_Event_Handler *
-ACE_Sig_Handler::handler (int signum)
-{
- ACE_TRACE ("ACE_Sig_Handler::handler");
- ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
-
- if (ACE_Sig_Handler::in_range (signum))
- return ACE_Sig_Handler::signal_handlers_[signum];
- else
- return 0;
-}
-
-ACE_Event_Handler *
-ACE_Sig_Handler::handler_i (int signum,
- ACE_Event_Handler *new_sh)
-{
- ACE_TRACE ("ACE_Sig_Handler::handler_i");
-
- if (ACE_Sig_Handler::in_range (signum))
- {
- ACE_Event_Handler *sh = ACE_Sig_Handler::signal_handlers_[signum];
-
- ACE_Sig_Handler::signal_handlers_[signum] = new_sh;
- return sh;
- }
- else
- return 0;
-}
-
-ACE_Event_Handler *
-ACE_Sig_Handler::handler (int signum,
- ACE_Event_Handler *new_sh)
-{
- ACE_TRACE ("ACE_Sig_Handler::handler");
- ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
-
- return ACE_Sig_Handler::handler_i (signum, new_sh);
-}
-
-// Register an ACE_Event_Handler along with the corresponding SIGNUM.
-// This method does NOT acquire any locks, so it can be called from a
-// signal handler.
-
-int
-ACE_Sig_Handler::register_handler_i (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp,
- ACE_Event_Handler **old_sh,
- ACE_Sig_Action *old_disp)
-{
- ACE_TRACE ("ACE_Sig_Handler::register_handler_i");
-
- if (ACE_Sig_Handler::in_range (signum))
- {
- ACE_Sig_Action sa; // Define a "null" action.
- ACE_Event_Handler *sh = ACE_Sig_Handler::handler_i (signum,
- new_sh);
-
- // Return a pointer to the old <ACE_Sig_Handler> if the user
- // asks for this.
- if (old_sh != 0)
- *old_sh = sh;
-
- // Make sure that <new_disp> points to a valid location if the
- // user doesn't care...
- if (new_disp == 0)
- new_disp = &sa;
-
- new_disp->handler (ace_signal_handler_dispatcher);
-#if !defined (ACE_HAS_LYNXOS_SIGNALS)
- new_disp->flags (new_disp->flags () | SA_SIGINFO);
-#endif /* ACE_HAS_LYNXOS_SIGNALS */
- return new_disp->register_action (signum, old_disp);
- }
- else
- return -1;
-}
-
-// Register an ACE_Event_Handler along with the corresponding SIGNUM.
-// This method acquires a lock, so it can't be called from a signal
-// handler, e.g., <dispatch>.
-
-int
-ACE_Sig_Handler::register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp,
- ACE_Event_Handler **old_sh,
- ACE_Sig_Action *old_disp)
-{
- ACE_TRACE ("ACE_Sig_Handler::register_handler");
- ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
-
- return ACE_Sig_Handler::register_handler_i (signum,
- new_sh,
- new_disp,
- old_sh,
- old_disp);
-}
-
-// Remove an ACE_Event_Handler.
-
-int
-ACE_Sig_Handler::remove_handler (int signum,
- ACE_Sig_Action *new_disp,
- ACE_Sig_Action *old_disp,
- int)
-{
- ACE_TRACE ("ACE_Sig_Handler::remove_handler");
- ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
-
- if (ACE_Sig_Handler::in_range (signum))
- {
- ACE_Sig_Action sa (SIG_DFL, (sigset_t *) 0); // Define the default disposition.
-
- if (new_disp == 0)
- new_disp = &sa;
-
- ACE_Sig_Handler::signal_handlers_[signum] = 0;
-
- // Register either the new disposition or restore the default.
- return new_disp->register_action (signum, old_disp);
- }
- else
- return -1;
-}
-
-// Master dispatcher function that gets called by a signal handler and
-// dispatches one handler...
-
-void
-ACE_Sig_Handler::dispatch (int signum,
- siginfo_t *siginfo,
- ucontext_t *ucontext)
-{
- ACE_TRACE ("ACE_Sig_Handler::dispatch");
-
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
-
- // We can't use the <sig_pending> call here because that acquires
- // the lock, which is non-portable...
- ACE_Sig_Handler::sig_pending_ = 1;
-
- // Darn well better be in range since the OS dispatched this...
- ACE_ASSERT (ACE_Sig_Handler::in_range (signum));
-
- ACE_Event_Handler *eh = ACE_Sig_Handler::signal_handlers_[signum];
-
- if (eh != 0)
- {
- if (eh->handle_signal (signum, siginfo, ucontext) == -1)
- {
- // Define the default disposition.
- ACE_Sig_Action sa (SIG_DFL, (sigset_t *) 0);
-
- ACE_Sig_Handler::signal_handlers_[signum] = 0;
-
- // Remove the current disposition by registering the default
- // disposition.
- sa.register_action (signum);
-
- // Allow the event handler to close down if necessary.
- eh->handle_close (ACE_INVALID_HANDLE,
- ACE_Event_Handler::SIGNAL_MASK);
- }
-#if defined (ACE_WIN32)
- else
- // Win32 is weird in the sense that it resets the signal
- // disposition to SIG_DFL after a signal handler is
- // dispatched. Therefore, to workaround this "feature" we
- // must re-register the <ACE_Event_Handler> with <signum>
- // explicitly.
- ACE_Sig_Handler::register_handler_i (signum,
- eh);
-#endif /* ACE_WIN32*/
- }
-}
-
-ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Sig_Action &sa, int sigkey)
- : sigkey_ (sigkey),
- type_ (SIG_ACTION),
- sa_ (sa)
-{
- // ACE_TRACE ("ACE_Sig_Adapter::ACE_Sig_Adapter");
-}
-
-ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Event_Handler *eh,
- int sigkey)
- : sigkey_ (sigkey),
- type_ (ACE_HANDLER),
- eh_ (eh)
-{
- // ACE_TRACE ("ACE_Sig_Adapter::ACE_Sig_Adapter");
-}
-
-ACE_Sig_Adapter::ACE_Sig_Adapter (ACE_Sig_Handler_Ex sig_func,
- int sigkey)
- : sigkey_ (sigkey),
- type_ (C_FUNCTION),
- sig_func_ (sig_func)
-{
- // ACE_TRACE ("ACE_Sig_Adapter::ACE_Sig_Adapter");
-}
-
-int
-ACE_Sig_Adapter::sigkey (void)
-{
- ACE_TRACE ("ACE_Sig_Adapter::sigkey");
- return this->sigkey_;
-}
-
-int
-ACE_Sig_Adapter::handle_signal (int signum,
- siginfo_t *siginfo,
- ucontext_t *ucontext)
-{
- ACE_TRACE ("ACE_Sig_Adapter::handle_signal");
-
- switch (this->type_)
- {
- case SIG_ACTION:
- {
- // We have to dispatch a handler that was registered by a
- // third-party library.
-
- ACE_Sig_Action old_disp;
-
- // Make sure this handler executes in the context it was
- // expecting...
- this->sa_.register_action (signum, &old_disp);
-
- ACE_Sig_Handler_Ex sig_func = ACE_Sig_Handler_Ex (this->sa_.handler ());
-
- (*sig_func) (signum, siginfo, ucontext);
- // Restore the original disposition.
- old_disp.register_action (signum);
- break;
- }
- case ACE_HANDLER:
- this->eh_->handle_signal (signum, siginfo, ucontext);
- break;
- case C_FUNCTION:
- (*this->sig_func_) (signum, siginfo, ucontext);
- break;
- }
- return 0;
-}
-
-// ----------------------------------------
-// The following classes are local to this file.
-
-// There are bugs with HP/UX's C++ compiler that prevents this stuff
-// from compiling...
-#if !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#define ACE_MAX_SIGNAL_HANDLERS ((size_t) 20)
-
-// Keeps track of the id that uniquely identifies each registered
-// signal handler. This id can be used to cancel a timer via the
-// <remove_handler> method.
-int ACE_Sig_Handlers::sigkey_ = 0;
-
-// If this is > 0 then a 3rd party library has registered a
-// handler...
-int ACE_Sig_Handlers::third_party_sig_handler_ = 0;
-
-// Make life easier by defining typedefs...
-typedef ACE_Fixed_Set <ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>
- ACE_SIG_HANDLERS_SET;
-typedef ACE_Fixed_Set_Iterator <ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>
- ACE_SIG_HANDLERS_ITERATOR;
-
-class ACE_Sig_Handlers_Set
-{
-public:
- static ACE_SIG_HANDLERS_SET *instance (int signum);
-
-private:
- static ACE_SIG_HANDLERS_SET *sig_handlers_[ACE_NSIG];
-};
-
-/* static */
-ACE_SIG_HANDLERS_SET *ACE_Sig_Handlers_Set::sig_handlers_[ACE_NSIG];
-
-/* static */
-ACE_SIG_HANDLERS_SET *
-ACE_Sig_Handlers_Set::instance (int signum)
-{
- if (signum <= 0 || signum >= ACE_NSIG)
- return 0; // This will cause problems...
- else if (ACE_Sig_Handlers_Set::sig_handlers_[signum] == 0)
- ACE_NEW_RETURN (ACE_Sig_Handlers_Set::sig_handlers_[signum],
- ACE_SIG_HANDLERS_SET,
- 0);
- return ACE_Sig_Handlers_Set::sig_handlers_[signum];
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Sig_Handlers)
-
-void
-ACE_Sig_Handlers::dump (void) const
-{
- ACE_TRACE ("ACE_Sig_Handlers::dump");
-}
-
-// This is the method that does all the dirty work... The basic
-// structure of this method was devised by Detlef Becker
-// (beckerd@erlh.siemens.de).
-
-int
-ACE_Sig_Handlers::register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp,
- ACE_Event_Handler **,
- ACE_Sig_Action *old_disp)
-{
- ACE_TRACE ("ACE_Sig_Handlers::register_handler");
- ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
-
- if (ACE_Sig_Handler::in_range (signum))
- {
- ACE_Sig_Adapter *ace_sig_adapter = 0; // Our signal handler.
- ACE_Sig_Adapter *extern_sh = 0; // An external signal handler.
- ACE_Sig_Action sa;
-
- // Get current signal disposition.
- sa.retrieve_action (signum);
-
- // Check whether we are already in control of the signal
- // handling disposition...
-
- if (!(sa.handler () == ace_signal_handlers_dispatcher
- || sa.handler () == ACE_SignalHandler (SIG_IGN)
- || sa.handler () == ACE_SignalHandler (SIG_DFL)))
- {
- // Drat, a 3rd party library has already installed a signal ;-(
-
- // Upto here we never disabled RESTART_MODE. Thus,
- // RESTART_MODE can only be changed by 3rd party libraries.
-
- if (ACE_BIT_DISABLED (sa.flags (), SA_RESTART)
- && ACE_Sig_Handlers::third_party_sig_handler_)
- // Toggling is disallowed since we might break 3rd party
- // code.
- return -1;
-
- // Note that we've seen a 3rd party handler...
- ACE_Sig_Handlers::third_party_sig_handler_ = 1;
-
- // Create a new 3rd party disposition, remembering its
- // preferred signal blocking etc...;
- ACE_NEW_RETURN (extern_sh,
- ACE_Sig_Adapter (sa,
- ++ACE_Sig_Handlers::sigkey_),
- -1);
- // Add the external signal handler to the set of handlers
- // for this signal.
- if (ACE_Sig_Handlers_Set::instance (signum)->insert (extern_sh) == -1)
- {
- delete extern_sh;
- return -1;
- }
- }
- // Add our new handler at this point.
- ACE_NEW_RETURN (ace_sig_adapter,
- ACE_Sig_Adapter (new_sh,
- ++ACE_Sig_Handlers::sigkey_),
- -1);
- // Add the ACE signal handler to the set of handlers for this
- // signal (make sure it goes before the external one if there is
- // one of these).
- if (ACE_Sig_Handlers_Set::instance (signum)->insert (ace_sig_adapter) == -1)
- {
- // We couldn't reinstall our handler, so let's pretend like
- // none of this happened...
- if (extern_sh)
- {
- ACE_Sig_Handlers_Set::instance (signum)->remove (extern_sh);
- delete extern_sh;
- }
- delete ace_sig_adapter;
- return -1;
- }
- // If ACE_Sig_Handlers::dispatch() was set we're done.
- else if (sa.handler () == ace_signal_handlers_dispatcher)
- return ace_sig_adapter->sigkey ();
-
- // Otherwise, we need to register our handler function so that
- // all signals will be dispatched through ACE.
- else
- {
- // Make sure that new_disp points to a valid location if the
- // user doesn't care...
- if (new_disp == 0)
- new_disp = &sa;
-
- new_disp->handler (ace_signal_handlers_dispatcher);
-
- // Default is to restart signal handlers.
- new_disp->flags (new_disp->flags () | SA_RESTART);
- new_disp->flags (new_disp->flags () | SA_SIGINFO);
-
- // Finally install (possibly reinstall) the ACE signal
- // handler disposition with the SA_RESTART mode enabled.
- if (new_disp->register_action (signum, old_disp) == -1)
- {
- // Yikes, lots of roll back at this point...
- ACE_Sig_Handlers_Set::instance (signum)->remove (ace_sig_adapter);
- delete ace_sig_adapter;
-
- if (extern_sh)
- {
- ACE_Sig_Handlers_Set::instance (signum)->remove (extern_sh);
- delete extern_sh;
- }
- return -1;
- }
- else // Return the signal key so that programs can cancel this
- // handler if they want!
- return ace_sig_adapter->sigkey ();
- }
- }
- else
- return -1;
-}
-
-// Remove the ACE_Event_Handler currently associated with <signum>.
-// Install the new disposition (if given) and return the previous
-// disposition (if desired by the caller). Returns 0 on success and
-// -1 if <signum> is invalid.
-
-int
-ACE_Sig_Handlers::remove_handler (int signum,
- ACE_Sig_Action *new_disp,
- ACE_Sig_Action *old_disp,
- int sigkey)
-{
- ACE_TRACE ("ACE_Sig_Handlers::remove_handler");
- ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
-
- if (ACE_Sig_Handler::in_range (signum))
- {
- ACE_SIG_HANDLERS_SET *handler_set =
- ACE_Sig_Handlers_Set::instance (signum);
-
- ACE_SIG_HANDLERS_ITERATOR handler_iterator (*handler_set);
-
- // Iterate through the set of handlers for this signal.
-
- for (ACE_Event_Handler **eh;
- handler_iterator.next (eh) != 0;
- handler_iterator.advance ())
- {
- // Type-safe downcast would be nice here...
- ACE_Sig_Adapter *sh = (ACE_Sig_Adapter *) *eh;
-
- // Remove the handler if (1) it's key matches the key we've
- // been told to remove or (2) if we've been told to remove
- // *all* handlers (i.e., <sigkey> == -1).
-
- if (sh->sigkey () == sigkey || sigkey == -1)
- {
- handler_set->remove (*eh);
- delete *eh;
- }
- }
-
- if (handler_set->size () == 0)
- {
- // If there are no more handlers left for a signal then
- // register the new disposition or restore the default
- // disposition.
-
- ACE_Sig_Action sa (SIG_DFL, (sigset_t *) 0);
-
- if (new_disp == 0)
- new_disp = &sa;
-
- return new_disp->register_action (signum, old_disp);
- }
- return 0;
- }
- else
- return -1;
-}
-
-// Master dispatcher function that gets called by a signal handler and
-// dispatches *all* the handlers...
-
-void
-ACE_Sig_Handlers::dispatch (int signum,
- siginfo_t *siginfo,
- ucontext_t *ucontext)
-{
- ACE_TRACE ("ACE_Sig_Handlers::dispatch");
- // The following is #ifdef'd out because it's entirely non-portable
- // to acquire a mutex in a signal handler...
-#if 0
- ACE_MT (ACE_Recursive_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Recursive_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_SIG_HANDLER_LOCK);
- ACE_TSS_Guard<ACE_Recursive_Thread_Mutex> m (*lock));
-#endif /* 0 */
-
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
-
- ACE_Sig_Handler::sig_pending_ = 1;
-
- // Darn well better be in range since the OS dispatched this...
- ACE_ASSERT (ACE_Sig_Handler::in_range (signum));
-
- ACE_SIG_HANDLERS_SET *handler_set =
- ACE_Sig_Handlers_Set::instance (signum);
-
- ACE_SIG_HANDLERS_ITERATOR handler_iterator (*handler_set);
-
- for (ACE_Event_Handler **eh = 0;
- handler_iterator.next (eh) != 0;
- handler_iterator.advance ())
- {
- if ((*eh)->handle_signal (signum, siginfo, ucontext) == -1)
- {
- handler_set->remove (*eh);
- delete *eh;
- }
- }
-}
-
-// Return the first item in the list of handlers. Note that this will
-// trivially provide the same behavior as the ACE_Sig_Handler
-// version if there is only 1 handler registered!
-
-ACE_Event_Handler *
-ACE_Sig_Handlers::handler (int signum)
-{
- ACE_TRACE ("ACE_Sig_Handlers::handler");
- ACE_SIG_HANDLERS_SET *handler_set =
- ACE_Sig_Handlers_Set::instance (signum);
- ACE_SIG_HANDLERS_ITERATOR handler_iterator (*handler_set);
- ACE_Event_Handler **eh = 0;
- handler_iterator.next (eh);
- return *eh;
-}
-
-// The following is a strange bit of logic that tries to give the same
-// semantics as what happens in ACE_Sig_Handler when we replace the
-// current signal handler with a new one. Note that if there is only
-// one signal handler the behavior will be identical. If there is
-// more than one handler then things get weird...
-
-ACE_Event_Handler *
-ACE_Sig_Handlers::handler (int signum, ACE_Event_Handler *new_sh)
-{
- ACE_TRACE ("ACE_Sig_Handlers::handler");
- ACE_SIG_HANDLERS_SET *handler_set =
- ACE_Sig_Handlers_Set::instance (signum);
- ACE_SIG_HANDLERS_ITERATOR handler_iterator (*handler_set);
- ACE_Event_Handler **eh = 0;
-
- // Find the first handler...
- handler_iterator.next (eh);
-
- // ... then remove it from the set ...
- handler_set->remove (*eh);
-
- // ... and then insert the new signal handler into the beginning of
- // the set (note, this is a bit too tied up in the implementation of
- // ACE_Unbounded_Set...).
- ACE_Sig_Adapter *temp;
-
- ACE_NEW_RETURN (temp,
- ACE_Sig_Adapter (new_sh,
- ++ACE_Sig_Handlers::sigkey_),
- 0);
- handler_set->insert (temp);
- return *eh;
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-ACE_MT (template class ACE_TSS_Guard<ACE_Recursive_Thread_Mutex>);
-ACE_MT (template class ACE_Guard<ACE_Recursive_Thread_Mutex>);
-template class ACE_Fixed_Set<ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>;
-template class ACE_Fixed_Set_Iterator<ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-#pragma instantiate ACE_TSS_Guard<ACE_Recursive_Thread_Mutex>
-#pragma instantiate ACE_Guard<ACE_Recursive_Thread_Mutex>
-#endif /* ACE_MT_SAFE */
-#pragma instantiate ACE_Fixed_Set<ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>
-#pragma instantiate ACE_Fixed_Set_Iterator<ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */
diff --git a/ace/Signal.h b/ace/Signal.h
deleted file mode 100644
index e1489c380b1..00000000000
--- a/ace/Signal.h
+++ /dev/null
@@ -1,458 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Signal.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SIGNAL_HANDLER_H
-#define ACE_SIGNAL_HANDLER_H
-#include "ace/pre.h"
-
-#if defined (ACE_DONT_INCLUDE_ACE_SIGNAL_H)
-# error ace/Signal.h was #included instead of signal.h by ace/OS.h: fix!!!!
-#endif /* ACE_DONT_INCLUDE_ACE_SIGNAL_H */
-
-#include "ace/Synch.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Event_Handler.h"
-
-// This worksaround a horrible bug with HP/UX C++...
-typedef struct sigaction ACE_SIGACTION;
-
-class ACE_Export ACE_Sig_Set
-{
- // = TITLE
- // Provide a C++ wrapper for the C sigset_t interface.
- //
- // = DESCRIPTION
- // Handle signals via a more elegant C++ interface (e.g.,
- // doesn't require the use of global variables or global
- // functions in an application).
-public:
- // = Initialization and termination methods.
- ACE_Sig_Set (sigset_t *sigset);
- // Initialize <sigset_> with <sigset>. If <sigset> == 0 then fill
- // the set.
-
- ACE_Sig_Set (ACE_Sig_Set *sigset);
- // Initialize <sigset_> with <sigset>. If <sigset> == 0 then fill
- // the set.
-
- ACE_Sig_Set (int fill = 0);
- // If <fill> == 0 then initialize the <sigset_> to be empty, else
- // full.
-
- ~ACE_Sig_Set (void);
-
- int empty_set (void);
- // Create a set that excludes all signals defined by the system.
-
- int fill_set (void);
- // Create a set that includes all signals defined by the system.
-
- int sig_add (int signo);
- // Adds the individual signal specified by <signo> to the set.
-
- int sig_del (int signo);
- // Deletes the individual signal specified by <signo> from the set.
-
- int is_member (int signo) const;
- // Checks whether the signal specified by <signo> is in the set.
-
- operator sigset_t *();
- // Returns a pointer to the underlying <sigset_t>.
-
- sigset_t sigset (void) const;
- // Returns a copy of the underlying <sigset_t>.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- sigset_t sigset_;
- // Set of signals.
-};
-
-class ACE_Export ACE_Sig_Action
-{
- // = TITLE
- // C++ wrapper facade for the <sigaction> struct.
-public:
- // = Initialization methods.
- ACE_Sig_Action (void);
- // Default constructor. Initializes everything to 0.
-
- ACE_Sig_Action (ACE_SignalHandler handler,
- sigset_t *sigmask = 0,
- int flags = 0);
- // Assigns the various fields of a <sigaction> struct but doesn't
- // register for signal handling via the <sigaction> function.
-
- ACE_Sig_Action (ACE_SignalHandler handler,
- const ACE_Sig_Set &sigmask,
- int flags = 0);
- // Assigns the various fields of a <sigaction> struct but doesn't
- // register for signal handling via the <sigaction> function.
-
- ACE_Sig_Action (ACE_SignalHandler handler,
- int signum,
- sigset_t *sigmask = 0,
- int flags = 0);
- // Assigns the various fields of a <sigaction> struct and registers
- // the <handler> to process signal <signum> via the <sigaction>
- // function.
-
- ACE_Sig_Action (ACE_SignalHandler handler,
- int signum,
- const ACE_Sig_Set &sigmask,
- int flags = 0);
- // Assigns the various fields of a <sigaction> struct and registers
- // the <handler> to process signal <signum> via the <sigaction>
- // function.
-
-
- // @@ The next two methods have a parameter as "signalss". Please do
- // not change the argument name as "signals". This causes the
- // following problem as reported by
- // <James.Briggs@dsto.defence.gov.au>.
-
-
- // In the file Signal.h two of the functions have and argument name
- // of signals. signals is a Qt macro (to do with their meta object
- // stuff.
- // We could as well have it as "signal", but I am nost sure whether
- // that would cause a problem with something else - Bala <bala@cs>
-
- ACE_Sig_Action (const ACE_Sig_Set &signalss,
- ACE_SignalHandler handler,
- const ACE_Sig_Set &sigmask,
- int flags = 0);
- // Assigns the various fields of a <sigaction> struct and registers
- // the <handler> to process all <signals> via the <sigaction>
- // function.
-
- ACE_Sig_Action (const ACE_Sig_Set &signalss,
- ACE_SignalHandler handler,
- sigset_t *sigmask = 0,
- int flags = 0);
- // Assigns the various fields of a <sigaction> struct and registers
- // the <handler> to process all <signals> via the <sigaction>
- // function.
-
- ACE_Sig_Action (const ACE_Sig_Action &s);
- // Copy constructor.
-
- ~ACE_Sig_Action (void);
- // Default dtor.
-
- // = Signal action management.
- int register_action (int signum,
- ACE_Sig_Action *oaction = 0);
- // Register <this> as the current disposition and store old
- // disposition into <oaction> if it is non-NULL.
-
- int restore_action (int signum,
- ACE_Sig_Action &oaction);
- // Assign the value of <oaction> to <this> and make it become the
- // new signal disposition.
-
- int retrieve_action (int signum);
- // Retrieve the current disposition into <this>.
-
- // = Set/get current signal action.
- void set (struct sigaction *);
- struct sigaction *get (void);
- operator ACE_SIGACTION *();
-
- // = Set/get current signal flags.
- void flags (int);
- int flags (void);
-
- // = Set/get current signal mask.
- void mask (sigset_t *);
- void mask (ACE_Sig_Set &);
- sigset_t *mask (void);
-
- // = Set/get current signal handler (pointer to function).
- void handler (ACE_SignalHandler);
- ACE_SignalHandler handler (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- struct sigaction sa_;
- // Controls signal behavior.
-};
-
-class ACE_Export ACE_Sig_Guard
-{
- // = TITLE
- // Hold signals in MASK for duration of a C++ statement block.
- // Note that a "0" for mask causes all signals to be held.
-public:
- // = Initialization and termination methods.
- ACE_Sig_Guard (ACE_Sig_Set *mask = 0);
- // Block out signals in <mask>. Default is to block all signals!
-
- ~ACE_Sig_Guard (void);
- // Restore blocked signals.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Sig_Set omask_;
- // Original signal mask.
-};
-
-class ACE_Export ACE_Sig_Handler
-{
- // = TITLE
- // This is the main dispatcher of signals for ACE. It improves
- // the existing UNIX signal handling mechanism by allowing C++
- // objects to handle signals in a way that avoids the use of
- // global/static variables and functions.
- //
- // = DESCRIPTION
- // Using this class a program can register an <ACE_Event_Handler>
- // with the <ACE_Sig_Handler> in order to handle a designated
- // <signum>. When a signal occurs that corresponds to this
- // <signum>, the <handle_signal> method of the registered
- // <ACE_Event_Handler> is invoked automatically.
-public:
-#if defined (ACE_HAS_WINCE)
- ACE_Sig_Handler (void);
- virtual ~ACE_Sig_Handler (void);
- // Default ctor/dtor.
-#endif /* ACE_HAS_WINCE */
-
- // = Registration and removal methods.
- virtual int register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0,
- ACE_Event_Handler **old_sh = 0,
- ACE_Sig_Action *old_disp = 0);
- // Add a new <ACE_Event_Handler> and a new sigaction associated with
- // <signum>. Passes back the existing <ACE_Event_Handler> and its
- // sigaction if pointers are non-zero. Returns -1 on failure and >=
- // 0 on success.
-
- virtual int remove_handler (int signum,
- ACE_Sig_Action *new_disp = 0,
- ACE_Sig_Action *old_disp = 0,
- int sigkey = -1);
- // Remove the <ACE_Event_Handler> currently associated with
- // <signum>. <sigkey> is ignored in this implementation since there
- // is only one instance of a signal handler. Install the new
- // disposition (if given) and return the previous disposition (if
- // desired by the caller). Returns 0 on success and -1 if <signum>
- // is invalid.
-
- // Set/get signal status.
- static int sig_pending (void);
- // True if there is a pending signal.
-
- static void sig_pending (int);
- // Reset the value of <sig_pending_> so that no signal is pending.
-
- // = Set/get the handler associated with a particular signal.
-
- virtual ACE_Event_Handler *handler (int signum);
- // Return the <ACE_Sig_Handler> associated with <signum>.
-
- virtual ACE_Event_Handler *handler (int signum,
- ACE_Event_Handler *);
- // Set a new <ACE_Event_Handler> that is associated with <signum>.
- // Return the existing handler.
-
- static void dispatch (int, siginfo_t *,
- ucontext_t *);
- // Callback routine registered with sigaction(2) that dispatches the
- // <handle_signal> method of the appropriate pre-registered
- // ACE_Event_Handler.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = These methods and data members are shared by derived classes.
-
- static ACE_Event_Handler *handler_i (int signum,
- ACE_Event_Handler *);
- // Set a new <ACE_Event_Handler> that is associated with <signum>.
- // Return the existing handler. Does not acquire any locks so that
- // it can be called from a signal handler, such as <dispatch>.
-
- static int register_handler_i (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0,
- ACE_Event_Handler **old_sh = 0,
- ACE_Sig_Action *old_disp = 0);
- // This implementation method is called by <register_handler> and
- // <dispatch>. It doesn't do any locking so that it can be called
- // within a signal handler, such as <dispatch>. It adds a new
- // <ACE_Event_Handler> and a new sigaction associated with <signum>.
- // Passes back the existing <ACE_Event_Handler> and its sigaction if
- // pointers are non-zero. Returns -1 on failure and >= 0 on
- // success.
-
- static int in_range (int signum);
- // Check whether the SIGNUM is within the legal range of signals.
-
- static sig_atomic_t sig_pending_;
- // Keeps track of whether a signal is pending.
-
-private:
- static ACE_Event_Handler *signal_handlers_[ACE_NSIG];
- // Array used to store one user-defined Event_Handler for every
- // signal.
-};
-
-class ACE_Export ACE_Sig_Adapter : public ACE_Event_Handler
-{
- // = TITLE
- // Provide an adapter that transforms various types of signal
- // handlers into the scheme used by the <ACE_Reactor>.
-public:
- ACE_Sig_Adapter (ACE_Sig_Action &, int sigkey);
- ACE_Sig_Adapter (ACE_Event_Handler *, int sigkey);
- ACE_Sig_Adapter (ACE_Sig_Handler_Ex, int sigkey = 0);
- ~ACE_Sig_Adapter (void);
-
- int sigkey (void);
- // Returns this signal key that's used to remove this from the
- // <ACE_Reactor>'s internal table.
-
- virtual int handle_signal (int, siginfo_t *, ucontext_t *);
- // Called by the <Reactor> to dispatch the signal handler.
-
-private:
- int sigkey_;
- // Key for this signal handler (used to remove it).
-
- enum
- {
- ACE_HANDLER, // We're just wrapping an ACE_Event_Handler.
- SIG_ACTION, // An ACE_Sig_Action.
- C_FUNCTION // A normal C function.
- } type_;
- // Is this an external handler or an ACE handler?
-
- // = This should be a union, but C++ won't allow that because the
- // <ACE_Sig_Action> has a constructor.
- ACE_Sig_Action sa_;
- // This is an external handler (ugh).
-
- ACE_Event_Handler *eh_;
- // This is an ACE hander.
-
- ACE_Sig_Handler_Ex sig_func_;
- // This is a normal C function.
-};
-
-#if !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-class ACE_Export ACE_Sig_Handlers : public ACE_Sig_Handler
-{
- // = TITLE
- // This is an alternative signal handling dispatcher for ACE. It
- // allows a list of signal handlers to be registered for each
- // signal. It also makes SA_RESTART the default mode.
- //
- // = DESCRIPTION
- // Using this class a program can register one or more
- // ACE_Event_Handler with the ACE_Sig_Handler in order to
- // handle a designated <signum>. When a signal occurs that
- // corresponds to this <signum>, the <handle_signal> methods of
- // all the registered ACE_Event_Handlers are invoked
- // automatically.
-public:
- // = Registration and removal methods.
- virtual int register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0,
- ACE_Event_Handler **old_sh = 0,
- ACE_Sig_Action *old_disp = 0);
- // Add a new ACE_Event_Handler and a new sigaction associated with
- // <signum>. Passes back the existing ACE_Event_Handler and its
- // sigaction if pointers are non-zero. Returns -1 on failure and
- // a <sigkey> that is >= 0 on success.
-
- virtual int remove_handler (int signum,
- ACE_Sig_Action *new_disp = 0,
- ACE_Sig_Action *old_disp = 0,
- int sigkey = -1);
- // Remove the ACE_Event_Handler currently associated with <signum>.
- // Install the new disposition (if given) and return the previous
- // disposition (if desired by the caller). Returns 0 on success and
- // -1 if <signum> is invalid.
-
- // = Set/get the handler associated with a particular signal.
-
- virtual ACE_Event_Handler *handler (int signum);
- // Return the head of the list of <ACE_Sig_Handler>s associated with
- // SIGNUM.
-
- virtual ACE_Event_Handler *handler (int signum,
- ACE_Event_Handler *);
- // Set a new <ACE_Event_Handler> that is associated with SIGNUM at
- // the head of the list of signals. Return the existing handler
- // that was at the head.
-
- static void dispatch (int signum, siginfo_t *, ucontext_t *);
- // Callback routine registered with sigaction(2) that dispatches the
- // <handle_signal> method of all the pre-registered
- // ACE_Event_Handlers for <signum>
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- static int sigkey_;
- // Keeps track of the id that uniquely identifies each registered
- // signal handler. This id can be used to cancel a timer via the
- // <remove_handler> method.
-
- static int third_party_sig_handler_;
- // If this is > 0 then a 3rd party library has registered a
- // handler...
-};
-#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-#include "ace/Containers.h"
-
-#if defined (__ACE_INLINE__)
-#include "ace/Signal.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SIGNAL_HANDLER_H */
diff --git a/ace/Signal.i b/ace/Signal.i
deleted file mode 100644
index b6384ee630e..00000000000
--- a/ace/Signal.i
+++ /dev/null
@@ -1,302 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_Sig_Set::ACE_Sig_Set (sigset_t *ss)
- // : sigset_ ()
-{
- ACE_TRACE ("ACE_Sig_Set::ACE_Sig_Set");
-
- if (ss == 0)
- ACE_OS::sigfillset (&this->sigset_);
- else
- // Structure assignment.
- this->sigset_ = *ss;
-}
-
-ACE_INLINE
-ACE_Sig_Set::ACE_Sig_Set (int fill)
- // : sigset_ ()
-{
- ACE_TRACE ("ACE_Sig_Set::ACE_Sig_Set");
-
- if (fill)
- ACE_OS::sigfillset (&this->sigset_);
- else
- ACE_OS::sigemptyset (&this->sigset_);
-}
-
-ACE_INLINE
-ACE_Sig_Set::ACE_Sig_Set (ACE_Sig_Set *ss)
- // : sigset_ ()
-{
- ACE_TRACE ("ACE_Sig_Set::ACE_Sig_Set");
-
- if (ss == 0)
- ACE_OS::sigfillset (&this->sigset_);
- else
- this->sigset_ = ss->sigset_;
-}
-
-ACE_INLINE
-ACE_Sig_Set::~ACE_Sig_Set (void)
-{
- ACE_TRACE ("ACE_Sig_Set::~ACE_Sig_Set");
- ACE_OS::sigemptyset (&this->sigset_);
-}
-
-ACE_INLINE int
-ACE_Sig_Set::empty_set (void)
-{
- ACE_TRACE ("ACE_Sig_Set::empty_set");
- return ACE_OS::sigemptyset (&this->sigset_);
-}
-
-ACE_INLINE int
-ACE_Sig_Set::fill_set (void)
-{
- ACE_TRACE ("ACE_Sig_Set::fill_set");
- return ACE_OS::sigfillset (&this->sigset_);
-}
-
-ACE_INLINE int
-ACE_Sig_Set::sig_add (int signo)
-{
- ACE_TRACE ("ACE_Sig_Set::sig_add");
- return ACE_OS::sigaddset (&this->sigset_, signo);
-}
-
-ACE_INLINE int
-ACE_Sig_Set::sig_del (int signo)
-{
- ACE_TRACE ("ACE_Sig_Set::sig_del");
- return ACE_OS::sigdelset (&this->sigset_, signo);
-}
-
-ACE_INLINE int
-ACE_Sig_Set::is_member (int signo) const
-{
- ACE_TRACE ("ACE_Sig_Set::is_member");
- return ACE_OS::sigismember (ACE_const_cast (sigset_t *, &this->sigset_), signo);
-}
-
-ACE_INLINE
-ACE_Sig_Set::operator sigset_t *(void)
-{
- ACE_TRACE ("ACE_Sig_Set::operator sigset_t *");
- return &this->sigset_;
-}
-
-ACE_INLINE sigset_t
-ACE_Sig_Set::sigset (void) const
-{
- ACE_TRACE ("ACE_Sig_Set::sigset");
- return this->sigset_;
-}
-
-ACE_INLINE
-ACE_Sig_Action::~ACE_Sig_Action (void)
-{
- ACE_TRACE ("ACE_Sig_Action::~ACE_Sig_Action");
-}
-
-ACE_INLINE int
-ACE_Sig_Action::flags (void)
-{
- ACE_TRACE ("ACE_Sig_Action::flags");
- return this->sa_.sa_flags;
-}
-
-ACE_INLINE void
-ACE_Sig_Action::flags (int flags)
-{
- ACE_TRACE ("ACE_Sig_Action::flags");
- this->sa_.sa_flags = flags;
-}
-
-ACE_INLINE sigset_t *
-ACE_Sig_Action::mask (void)
-{
- ACE_TRACE ("ACE_Sig_Action::mask");
- return &this->sa_.sa_mask;
-}
-
-ACE_INLINE void
-ACE_Sig_Action::mask (sigset_t *ss)
-{
- ACE_TRACE ("ACE_Sig_Action::mask");
- if (ss != 0)
- this->sa_.sa_mask = *ss; // Structure assignment
-}
-
-ACE_INLINE void
-ACE_Sig_Action::mask (ACE_Sig_Set &ss)
-{
- ACE_TRACE ("ACE_Sig_Action::mask");
- this->sa_.sa_mask = ss.sigset (); // Structure assignment
-}
-
-ACE_INLINE ACE_SignalHandler
-ACE_Sig_Action::handler (void)
-{
- ACE_TRACE ("ACE_Sig_Action::handler");
- return ACE_SignalHandler (this->sa_.sa_handler);
-}
-
-ACE_INLINE void
-ACE_Sig_Action::handler (ACE_SignalHandler handler)
-{
- ACE_TRACE ("ACE_Sig_Action::handler");
-#if !defined(ACE_HAS_TANDEM_SIGNALS)
- this->sa_.sa_handler = ACE_SignalHandlerV (handler);
-#else
- this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (handler);
-#endif /* !ACE_HAS_TANDEM_SIGNALS */
-}
-
-#if 0
-ACE_INLINE ACE_SignalHandler
-ACE_Sig_Action::sigaction (void)
-{
- ACE_TRACE ("ACE_Sig_Action::sigaction");
- return ACE_SignalHandler (this->sa_.sa_sigaction);
-}
-
-ACE_INLINE void
-ACE_Sig_Action::sigaction (ACE_SignalHandler handler)
-{
- ACE_TRACE ("ACE_Sig_Action::handler");
- this->sa_.sa_sigaction = (void (*)()) ACE_SignalHandlerV (handler);
-}
-#endif /* 0 */
-
-ACE_INLINE void
-ACE_Sig_Action::set (struct sigaction *sa)
-{
- ACE_TRACE ("ACE_Sig_Action::set");
- this->sa_ = *sa; // Structure assignment.
-}
-
-ACE_INLINE struct sigaction *
-ACE_Sig_Action::get (void)
-{
- ACE_TRACE ("ACE_Sig_Action::get");
- return &this->sa_;
-}
-
-ACE_INLINE
-ACE_Sig_Action::operator ACE_SIGACTION * ()
-{
- ACE_TRACE ("ACE_Sig_Action::operator ACE_SIGACTION *");
- return &this->sa_;
-}
-
-ACE_INLINE
-ACE_Sig_Action::ACE_Sig_Action (const ACE_Sig_Action &s)
- // : sa_ ()
-{
- ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
- *this = s; // structure copy.
-}
-
-ACE_INLINE int
-ACE_Sig_Action::register_action (int signum, ACE_Sig_Action *oaction)
-{
- ACE_TRACE ("ACE_Sig_Action::register_action");
- struct sigaction *sa = oaction == 0 ? 0 : oaction->get ();
-
- return ACE_OS::sigaction (signum, &this->sa_, sa);
-}
-
-ACE_INLINE int
-ACE_Sig_Action::retrieve_action (int signum)
-{
- ACE_TRACE ("ACE_Sig_Action::retrieve_action");
- return ACE_OS::sigaction (signum, 0, &this->sa_);
-}
-
-ACE_INLINE int
-ACE_Sig_Action::restore_action (int signum, ACE_Sig_Action &oaction)
-{
- ACE_TRACE ("ACE_Sig_Action::restore_action");
- this->sa_ = *oaction.get (); // Structure assignment
- return ACE_OS::sigaction (signum, &this->sa_, 0);
-}
-
-// Block out the signal MASK until the destructor is called.
-
-ACE_INLINE
-ACE_Sig_Guard::ACE_Sig_Guard (ACE_Sig_Set *mask)
- : omask_ ()
-{
- //ACE_TRACE ("ACE_Sig_Guard::ACE_Sig_Guard");
-
- // If MASK is 0 then block all signals!
- if (mask == 0)
- {
-#if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK)
- ACE_OS::sigprocmask (SIG_BLOCK,
- ACE_OS_Object_Manager::default_mask (),
- (sigset_t *) this->omask_);
-#else
- ACE_OS::thr_sigsetmask (SIG_BLOCK,
- ACE_OS_Object_Manager::default_mask (),
- (sigset_t *) this->omask_);
-#endif /* ACE_LACKS_PTHREAD_THR_SIGSETMASK */
- }
- else
-#if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK)
- ACE_OS::sigprocmask (SIG_BLOCK,
- (sigset_t *) *mask,
- (sigset_t *)
- this->omask_);
-#else
- ACE_OS::thr_sigsetmask (SIG_BLOCK,
- (sigset_t *) *mask,
- (sigset_t *)
- this->omask_);
-#endif /* ACE_LACKS_PTHREAD_THR_SIGSETMASK */
-}
-
-// Restore the signal mask.
-
-ACE_INLINE
-ACE_Sig_Guard::~ACE_Sig_Guard (void)
-{
- //ACE_TRACE ("ACE_Sig_Guard::~ACE_Sig_Guard");
-#if !defined (ACE_LACKS_UNIX_SIGNALS)
-#if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK)
- ACE_OS::sigprocmask (SIG_SETMASK,
- (sigset_t *) this->omask_,
- 0);
-#else
- ACE_OS::thr_sigsetmask (SIG_SETMASK,
- (sigset_t *) this->omask_,
- 0);
-#endif /* ACE_LACKS_PTHREAD_THR_SIGSETMASK */
-#endif /* !ACE_LACKS_UNIX_SIGNALS */
-}
-
-#if defined (ACE_HAS_WINCE)
-ACE_INLINE
-ACE_Sig_Handler::ACE_Sig_Handler (void)
-{
-}
-
-ACE_INLINE
-ACE_Sig_Handler::~ACE_Sig_Handler (void)
-{
-}
-#endif /* ACE_HAS_WINCE */
-
-ACE_INLINE int
-ACE_Sig_Handler::in_range (int signum)
-{
- ACE_TRACE ("ACE_Sig_Handler::in_range");
- return signum > 0 && signum < ACE_NSIG;
-}
-
-ACE_INLINE
-ACE_Sig_Adapter::~ACE_Sig_Adapter (void)
-{
-}
diff --git a/ace/Singleton.cpp b/ace/Singleton.cpp
deleted file mode 100644
index f977f02400c..00000000000
--- a/ace/Singleton.cpp
+++ /dev/null
@@ -1,384 +0,0 @@
-// $Id$
-
-#ifndef ACE_SINGLETON_C
-#define ACE_SINGLETON_C
-
-#include "ace/Singleton.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch_T.h"
-#include "ace/Object_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Singleton.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Singleton, "$Id$")
-
-template <class TYPE, class ACE_LOCK> void
-ACE_Singleton<TYPE, ACE_LOCK>::dump (void)
-{
- ACE_TRACE ("ACE_Singleton<TYPE, ACE_LOCK>::dump");
-
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"),
- ACE_Singleton<TYPE, ACE_LOCK>::instance_i ()));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-}
-
-template <class TYPE, class ACE_LOCK> ACE_Singleton<TYPE, ACE_LOCK> *&
-ACE_Singleton<TYPE, ACE_LOCK>::instance_i (void)
-{
-#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- // Pointer to the Singleton instance. This works around a bug with
- // G++ and it's (mis-)handling of templates and statics...
- static ACE_Singleton<TYPE, ACE_LOCK> *singleton_ = 0;
-
- return singleton_;
-#else
- return ACE_Singleton<TYPE, ACE_LOCK>::singleton_;
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-}
-
-template <class TYPE, class ACE_LOCK> TYPE *
-ACE_Singleton<TYPE, ACE_LOCK>::instance (void)
-{
- ACE_TRACE ("ACE_Singleton<TYPE, ACE_LOCK>::instance");
-
- ACE_Singleton<TYPE, ACE_LOCK> *&singleton =
- ACE_Singleton<TYPE, ACE_LOCK>::instance_i ();
-
- // Perform the Double-Check pattern...
- if (singleton == 0)
- {
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- if (ACE_Object_Manager::starting_up () ||
- ACE_Object_Manager::shutting_down ())
- {
- // The program is still starting up, and therefore assumed
- // to be single threaded. There's no need to double-check.
- // Or, the ACE_Object_Manager instance has been destroyed,
- // so the preallocated lock is not available. Either way,
- // don't register for destruction with the
- // ACE_Object_Manager: we'll have to leak this instance.
-#endif /* ACE_MT_SAFE */
-
- ACE_NEW_RETURN (singleton, (ACE_Singleton<TYPE, ACE_LOCK>), 0);
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- }
- else
- {
- // Obtain a lock from the ACE_Object_Manager. The pointer
- // is static, so we only obtain one per ACE_Singleton
- // instantiation.
- static ACE_LOCK *lock = 0;
- if (ACE_Object_Manager::get_singleton_lock (lock) != 0)
- // Failed to acquire the lock!
- return 0;
-
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, *lock, 0);
-
- if (singleton == 0)
- {
- ACE_NEW_RETURN (singleton, (ACE_Singleton<TYPE, ACE_LOCK>), 0);
-
- // Register for destruction with ACE_Object_Manager.
- ACE_Object_Manager::at_exit (singleton);
- }
- }
-#endif /* ACE_MT_SAFE */
- }
-
- return &singleton->instance_;
-}
-
-template <class TYPE, class ACE_LOCK> void
-ACE_Singleton<TYPE, ACE_LOCK>::cleanup (void *)
-{
- delete this;
- ACE_Singleton<TYPE, ACE_LOCK>::instance_i () = 0;
-}
-
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
-// Pointer to the Singleton instance.
-template <class TYPE, class ACE_LOCK> ACE_Singleton<TYPE, ACE_LOCK> *
-ACE_Singleton<TYPE, ACE_LOCK>::singleton_ = 0;
-
-template <class TYPE, class ACE_LOCK> ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *
-ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::singleton_ = 0;
-#endif /* !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) */
-
-template <class TYPE, class ACE_LOCK> void
-ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::dump (void)
-{
- ACE_TRACE ("ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::dump");
-
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"),
- ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::instance_i ()));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-}
-
-template <class TYPE, class ACE_LOCK>
-ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *&
-ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::instance_i (void)
-{
-#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- // Pointer to the Singleton instance. This works around a bug with
- // G++ and it's (mis-)handling of templates and statics...
- static ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *singleton_ = 0;
-
- return singleton_;
-#else
- return ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::singleton_;
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-}
-
-template <class TYPE, class ACE_LOCK> TYPE *
-ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::instance (void)
-{
- ACE_TRACE ("ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::instance");
-
- ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *&singleton =
- ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::instance_i ();
-
- // Perform the Double-Check pattern...
- if (singleton == 0)
- {
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- if (ACE_Object_Manager::starting_up () ||
- ACE_Object_Manager::shutting_down ())
- {
- // The program is still starting up, and therefore assumed
- // to be single threaded. There's no need to double-check.
- // Or, the ACE_Object_Manager instance has been destroyed,
- // so the preallocated lock is not available. Either way,
- // don't register for destruction with the
- // ACE_Object_Manager: we'll have to leak this instance.
-#endif /* ACE_MT_SAFE */
-
- ACE_NEW_RETURN (singleton, (ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>),
- 0);
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- }
- else
- {
- // Obtain a lock from the ACE_Object_Manager. The pointer
- // is static, so we only obtain one per
- // ACE_Unmanaged_Singleton instantiation.
- static ACE_LOCK *lock = 0;
- if (ACE_Object_Manager::get_singleton_lock (lock) != 0)
- // Failed to acquire the lock!
- return 0;
-
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, *lock, 0);
-
- if (singleton == 0)
- ACE_NEW_RETURN (singleton,
- (ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>),
- 0);
- }
-#endif /* ACE_MT_SAFE */
- }
-
- return &singleton->instance_;
-}
-
-template <class TYPE, class ACE_LOCK> void
-ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::close (void)
-{
- ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *&singleton =
- ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::instance_i ();
-
- if (singleton)
- singleton->cleanup ();
-}
-
-template <class TYPE, class ACE_LOCK> void
-ACE_TSS_Singleton<TYPE, ACE_LOCK>::dump (void)
-{
- ACE_TRACE ("ACE_TSS_Singleton<TYPE, ACE_LOCK>::dump");
-
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"),
- ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ()));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-}
-
-template <class TYPE, class ACE_LOCK> ACE_TSS_Singleton<TYPE, ACE_LOCK> *&
-ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance_i (void)
-{
-#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- // Pointer to the Singleton instance. This works around a bug with
- // G++ and it's (mis-)handling of templates and statics...
- static ACE_TSS_Singleton<TYPE, ACE_LOCK> *singleton_ = 0;
-
- return singleton_;
-#else
- return ACE_TSS_Singleton<TYPE, ACE_LOCK>::singleton_;
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-}
-
-template <class TYPE, class ACE_LOCK> TYPE *
-ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance (void)
-{
- ACE_TRACE ("ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance");
-
- ACE_TSS_Singleton<TYPE, ACE_LOCK> *&singleton =
- ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ();
-
- // Perform the Double-Check pattern...
- if (singleton == 0)
- {
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- if (ACE_Object_Manager::starting_up () ||
- ACE_Object_Manager::shutting_down ())
- {
- // The program is still starting up, and therefore assumed
- // to be single threaded. There's no need to double-check.
- // Or, the ACE_Object_Manager instance has been destroyed,
- // so the preallocated lock is not available. Either way,
- // don't register for destruction with the
- // ACE_Object_Manager: we'll have to leak this instance.
-#endif /* ACE_MT_SAFE */
-
- ACE_NEW_RETURN (singleton, (ACE_TSS_Singleton<TYPE, ACE_LOCK>), 0);
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- }
- else
- {
- // Obtain a lock from the ACE_Object_Manager. The pointer
- // is static, so we only obtain one per ACE_Singleton instantiation.
- static ACE_LOCK *lock = 0;
- if (ACE_Object_Manager::get_singleton_lock (lock) != 0)
- // Failed to acquire the lock!
- return 0;
-
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, *lock, 0);
-
- if (singleton == 0)
- {
- ACE_NEW_RETURN (singleton, (ACE_TSS_Singleton<TYPE, ACE_LOCK>),
- 0);
-
- // Register for destruction with ACE_Object_Manager.
- ACE_Object_Manager::at_exit (singleton);
- }
- }
-#endif /* ACE_MT_SAFE */
- }
-
- return ACE_TSS_GET (&singleton->instance_, TYPE);
-}
-
-template <class TYPE, class ACE_LOCK> void
-ACE_TSS_Singleton<TYPE, ACE_LOCK>::cleanup (void *)
-{
- delete this;
- ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance_i () = 0;
-}
-
-template <class TYPE, class ACE_LOCK> void
-ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::dump (void)
-{
- ACE_TRACE ("ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::dump");
-
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"),
- ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ()));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-}
-
-template <class TYPE, class ACE_LOCK>
-ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *&
-ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::instance_i (void)
-{
-#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- // Pointer to the Singleton instance. This works around a bug with
- // G++ and it's (mis-)handling of templates and statics...
- static ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *singleton_ = 0;
-
- return singleton_;
-#else
- return ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::singleton_;
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-}
-
-template <class TYPE, class ACE_LOCK> TYPE *
-ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::instance (void)
-{
- ACE_TRACE ("ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::instance");
-
- ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *&singleton =
- ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ();
-
- // Perform the Double-Check pattern...
- if (singleton == 0)
- {
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- if (ACE_Object_Manager::starting_up () ||
- ACE_Object_Manager::shutting_down ())
- {
- // The program is still starting up, and therefore assumed
- // to be single threaded. There's no need to double-check.
- // Or, the ACE_Object_Manager instance has been destroyed,
- // so the preallocated lock is not available. Either way,
- // don't register for destruction with the
- // ACE_Object_Manager: we'll have to leak this instance.
-#endif /* ACE_MT_SAFE */
- ACE_NEW_RETURN (singleton,
- (ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>),
- 0);
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- }
- else
- {
- // Obtain a lock from the ACE_Object_Manager. The pointer
- // is static, so we only obtain one per
- // ACE_Unmanaged_Singleton instantiation.
- static ACE_LOCK *lock = 0;
- if (ACE_Object_Manager::get_singleton_lock (lock) != 0)
- // Failed to acquire the lock!
- return 0;
-
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, *lock, 0);
-
- if (singleton == 0)
- ACE_NEW_RETURN (singleton,
- (ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>),
- 0);
- }
-#endif /* ACE_MT_SAFE */
- }
-
- return ACE_TSS_GET (&singleton->instance_, TYPE);
-}
-
-template <class TYPE, class ACE_LOCK> void
-ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::close (void)
-{
- ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *&singleton =
- ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ();
-
- if (singleton)
- singleton->cleanup ();
-}
-
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
-// Pointer to the Singleton instance.
-template <class TYPE, class ACE_LOCK> ACE_TSS_Singleton <TYPE, ACE_LOCK> *
-ACE_TSS_Singleton<TYPE, ACE_LOCK>::singleton_ = 0;
-
-template <class TYPE, class ACE_LOCK>
-ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *
-ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::singleton_ = 0;
-#endif /* !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) */
-
-#endif /* ACE_SINGLETON_C */
diff --git a/ace/Singleton.h b/ace/Singleton.h
deleted file mode 100644
index bbef2cd335e..00000000000
--- a/ace/Singleton.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Singleton.h
-//
-// = DESCRIPTION
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu), Douglas C. Schmidt, Chris
-// Lahey, Rich Christy, and David Levine.
-//
-// ============================================================================
-
-#ifndef ACE_SINGLETON_H
-#define ACE_SINGLETON_H
-#include "ace/pre.h"
-
-#include "ace/Synch.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class TYPE, class ACE_LOCK>
-class ACE_Singleton : public ACE_Cleanup
-{
- // = TITLE
- // A Singleton Adapter uses the Adapter pattern to turn ordinary
- // classes into Singletons optimized with the Double-Checked
- // Locking optimization pattern.
- //
- // = DESCRIPTION
- // This implementation is a slight variation on the GoF
- // Singleton pattern. In particular, a single
- // <ACE_Singleton<TYPE, ACE_LOCK> > instance is allocated here,
- // not a <TYPE> instance. The reason for this is to allow
- // registration with the <ACE_Object_Manager>, so that the
- // Singleton can be cleaned up when the process exits. For this
- // scheme to work, a (static) <cleanup> function must be
- // provided. <ACE_Singleton> provides one so that TYPE doesn't
- // need to.
- //
- // If you want to make sure that only the singleton instance of
- // <T> is created, and that users cannot create their own
- // instances of <T>, do the following to class <T>:
- //
- // (a) Make the constructor of <T> private (or protected)
- // (b) Make Singleton a friend of <T>
- //
- // Here is an example:
- //
- // class foo
- // {
- // friend class ACE_Singleton<foo, ACE_Null_Mutex>;
- // private:
- // foo () { cout << "foo constructed" << endl; }
- // ~foo () { cout << "foo destroyed" << endl; }
- // };
- //
- // typedef ACE_Singleton<foo, ACE_Null_Mutex> FOO;
- //
- // NOTE: the best types to use for ACE_LOCK are
- // ACE_Recursive_Thread_Mutex and ACE_Null_Mutex.
- // ACE_Recursive_Thread_Mutex should be used in multi-threaded
- // programs in which it is possible for more than one thread to
- // access the <ACE_Singleton<TYPE, ACE_LOCK>> instance.
- // ACE_Null_Mutex can be used otherwise. The reason that these
- // types of locks are best has to do with their allocation by
- // the ACE_Object_Manager. Single ACE_Recursive_Thread_Mutex
- // and ACE_Null_Mutex instances are used for all ACE_Singleton
- // instantiations. However, other types of locks are allocated
- // per ACE_Singleton instantiation.
- //
-public:
- static TYPE *instance (void);
- // Global access point to the Singleton.
-
- virtual void cleanup (void *param = 0);
- // Cleanup method, used by <ace_cleanup_destroyer> to destroy the
- // <ACE_Singleton>.
-
- static void dump (void);
- // Dump the state of the object.
-
-protected:
- ACE_Singleton (void);
- // Default constructor.
-
- TYPE instance_;
- // Contained instance.
-
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- static ACE_Singleton<TYPE, ACE_LOCK> *singleton_;
- // Pointer to the Singleton (ACE_Cleanup) instance.
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-
- static ACE_Singleton<TYPE, ACE_LOCK> *&instance_i (void);
- // Get pointer to the Singleton instance.
-};
-
-template <class TYPE, class ACE_LOCK>
-class ACE_Unmanaged_Singleton : public ACE_Singleton <TYPE, ACE_LOCK>
-{
- // = TITLE
- // Same as <ACE_Singleton>, except does _not_ register with
- // <ACE_Object_Manager> for destruction.
- //
- // = DESCRIPTION
- // This version of <ACE_Singleton> can be used if, for example,
- // its DLL will be unloaded before the <ACE_Object_Manager>
- // destroys the instance. Unlike with <ACE_Singleton>, the
- // application is responsible for explicitly destroying the
- // instance after it is no longer needed (if it wants to avoid
- // memory leaks, at least). The <close> static member function
- // must be used to explicitly destroy the Singleton.
- // Usage is the same as for ACE_Singleton, but note that if you
- // you declare a friend, the friend class must still be an
- // *ACE_Singleton*<T, [ACE_LOCK]>, not an ACE_Unmanaged_Singleton.
- //
-public:
- static TYPE *instance (void);
- // Global access point to the Singleton.
-
- static void close (void);
- // Explicitly delete the Singleton instance.
-
- static void dump (void);
- // Dump the state of the object.
-
-protected:
- ACE_Unmanaged_Singleton (void);
- // Default constructor.
-
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- static ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *singleton_;
- // Pointer to the Singleton (ACE_Cleanup) instance.
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-
- static ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *&instance_i (void);
- // Get pointer to the Singleton instance.
-};
-
-template <class TYPE, class ACE_LOCK>
-class ACE_TSS_Singleton : public ACE_Cleanup
-{
- // = TITLE
- // This class uses the Adapter pattern to turn ordinary classes
- // into Thread-specific Singletons optimized with the
- // Double-Checked Locking optimization pattern.
- //
- // = DESCRIPTION
- // This implementation is another variation on the GoF Singleton
- // pattern. In this case, a single <ACE_TSS_Singleton<TYPE,
- // LOCK> > instance is allocated here, not a <TYPE> instance.
- // Each call to the <instance> static method returns a Singleton
- // whose pointer resides in thread-specific storage. As with
- // <ACE_Singleton>, we use the <ACE_Object_Manager> so that the
- // Singleton can be cleaned up when the process exits. For this
- // scheme to work, a (static) <cleanup> function must be
- // provided. <ACE_Singleton> provides one so that TYPE doesn't
- // need to.
-public:
- static TYPE *instance (void);
- // Global access point to the Singleton.
-
- virtual void cleanup (void *param = 0);
- // Cleanup method, used by <ace_cleanup_destroyer> to destroy the
- // singleton.
-
- static void dump (void);
- // Dump the state of the object.
-
-protected:
- ACE_TSS_Singleton (void);
- // Default constructor.
-
- ACE_TSS_TYPE (TYPE) instance_;
- // Contained instance.
-
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- static ACE_TSS_Singleton<TYPE, ACE_LOCK> *singleton_;
- // Pointer to the Singleton (ACE_Cleanup) instance.
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-
- static ACE_TSS_Singleton<TYPE, ACE_LOCK> *&instance_i (void);
- // Get pointer to the TSS Singleton instance.
-};
-
-template <class TYPE, class ACE_LOCK>
-class ACE_Unmanaged_TSS_Singleton : public ACE_TSS_Singleton <TYPE, ACE_LOCK>
-{
- // = TITLE
- // Same as <ACE_TSS_Singleton>, except does _not_ register with
- // <ACE_Object_Manager> for destruction.
- //
- // = DESCRIPTION
- // This version of <ACE_TSS_Singleton> can be used if, for
- // example, its DLL will be unloaded before the
- // <ACE_Object_Manager> destroys the instance. Unlike with
- // <ACE_Singleton>, the application is responsible for
- // explicitly destroying the instance after it is no longer
- // needed (if it wants to avoid memory leaks, at least). The
- // <close> static member function must be used to explicitly
- // destroy the Singleton.
- //
-public:
- static TYPE *instance (void);
- // Global access point to the Singleton.
-
- static void close (void);
- // Explicitly delete the Singleton instance.
-
- static void dump (void);
- // Dump the state of the object.
-
-protected:
- ACE_Unmanaged_TSS_Singleton (void);
- // Default constructor.
-
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- static ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *singleton_;
- // Pointer to the Singleton (ACE_Cleanup) instance.
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
-
- static ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *&instance_i (void);
- // Get pointer to the Singleton instance.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Singleton.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Singleton.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Singleton.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_SINGLETON_H */
diff --git a/ace/Singleton.i b/ace/Singleton.i
deleted file mode 100644
index 38e37fc3d7c..00000000000
--- a/ace/Singleton.i
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Default constructors.
-//
-// Note: don't explicitly initialize "instance_", because TYPE may not
-// have a default constructor. Let the compiler figure it out . . .
-
-template <class TYPE, class ACE_LOCK> ACE_INLINE
-ACE_Singleton<TYPE, ACE_LOCK>::ACE_Singleton (void)
-{
-}
-
-template <class TYPE, class ACE_LOCK> ACE_INLINE
-ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::ACE_Unmanaged_Singleton (void)
-{
-}
-
-template <class TYPE, class ACE_LOCK> ACE_INLINE
-ACE_TSS_Singleton<TYPE, ACE_LOCK>::ACE_TSS_Singleton (void)
-{
-}
-
-template <class TYPE, class ACE_LOCK> ACE_INLINE
-ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::ACE_Unmanaged_TSS_Singleton (void)
-{
-}
diff --git a/ace/Stats.cpp b/ace/Stats.cpp
deleted file mode 100644
index 8cd4e6b46ca..00000000000
--- a/ace/Stats.cpp
+++ /dev/null
@@ -1,660 +0,0 @@
-// $Id$
-
-#include "ace/Stats.h"
-
-#if !defined (__ACE_INLINE__)
-# include "ace/Stats.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Stats, "$Id$")
-
-ACE_UINT32
-ACE_Stats_Value::fractional_field (void) const
-{
- if (precision () == 0)
- {
- return 1;
- }
- else
- {
- ACE_UINT32 field = 10;
- for (u_int i = 0; i < precision () - 1; ++i)
- {
- field *= 10;
- }
-
- return field;
- }
-}
-
-int
-ACE_Stats::sample (const ACE_INT32 value)
-{
- if (samples_.enqueue_tail (value) == 0)
- {
- ++number_of_samples_;
- if (number_of_samples_ == 0)
- {
- // That's a lot of samples :-)
- overflow_ = EFAULT;
- return -1;
- }
-
- if (value < min_)
- min_ = value;
-
- if (value > max_)
- max_ = value;
-
- return 0;
- }
- else
- {
- // Probably failed due to running out of memory when trying to
- // enqueue the new value.
- overflow_ = errno;
- return -1;
- }
-}
-
-void
-ACE_Stats::mean (ACE_Stats_Value &m,
- const ACE_UINT32 scale_factor)
-{
- if (number_of_samples_ > 0)
- {
-#if defined ACE_LACKS_LONGLONG_T
- // If ACE_LACKS_LONGLONG_T, then ACE_UINT64 is a user-defined class.
- // To prevent having to construct a static of that class, declare it
- // on the stack, and construct it, in each function that needs it.
- const ACE_U_LongLong ACE_STATS_INTERNAL_OFFSET (0, 8);
-#else /* ! ACE_LACKS_LONGLONG_T */
- const ACE_UINT64 ACE_STATS_INTERNAL_OFFSET =
- ACE_UINT64_LITERAL (0x100000000);
-#endif /* ! ACE_LACKS_LONGLONG_T */
-
- ACE_UINT64 sum = ACE_STATS_INTERNAL_OFFSET;
- ACE_Unbounded_Queue_Iterator<ACE_INT32> i (samples_);
- while (! i.done ())
- {
- ACE_INT32 *sample;
- if (i.next (sample))
- {
- sum += *sample;
- i.advance ();
- }
- }
-
- // sum_ was initialized with ACE_STATS_INTERNAL_OFFSET, so
- // subtract that off here.
- quotient (sum - ACE_STATS_INTERNAL_OFFSET,
- number_of_samples_ * scale_factor,
- m);
- }
- else
- {
- m.whole (0);
- m.fractional (0);
- }
-}
-
-int
-ACE_Stats::std_dev (ACE_Stats_Value &std_dev,
- const ACE_UINT32 scale_factor)
-{
- if (number_of_samples_ <= 1)
- {
- std_dev.whole (0);
- std_dev.fractional (0);
- }
- else
- {
- const ACE_UINT32 field = std_dev.fractional_field ();
-
- // The sample standard deviation is:
- //
- // sqrt (sum (sample_i - mean)^2 / (number_of_samples_ - 1))
-
- ACE_UINT64 mean_scaled;
- // Calculate the mean, scaled, so that we don't lose its
- // precision.
- ACE_Stats_Value avg (std_dev.precision ());
- mean (avg, 1u);
- avg.scaled_value (mean_scaled);
-
- // Calculate the summation term, of squared differences from the
- // mean.
- ACE_UINT64 sum_of_squares = 0;
- ACE_Unbounded_Queue_Iterator<ACE_INT32> i (samples_);
- while (! i.done ())
- {
- ACE_INT32 *sample;
- if (i.next (sample))
- {
- const ACE_UINT64 original_sum_of_squares = sum_of_squares;
-
- // Scale up by field width so that we don't lose the
- // precision of the mean. Carefully . . .
- const ACE_UINT64 product (*sample * field);
-
- ACE_UINT64 difference;
- // NOTE: please do not reformat this code! It //
- // works with the Diab compiler the way it is! //
- if (product >= mean_scaled) //
- { //
- difference = product - mean_scaled; //
- } //
- else //
- { //
- difference = mean_scaled - product; //
- } //
- // NOTE: please do not reformat this code! It //
- // works with the Diab compiler the way it is! //
-
- // Square using 64-bit arithmetic.
- sum_of_squares += difference * ACE_U64_TO_U32 (difference);
- i.advance ();
-
- if (sum_of_squares < original_sum_of_squares)
- {
- overflow_ = ENOSPC;
- return -1;
- }
- }
- }
-
- // Divide the summation by (number_of_samples_ - 1), to get the
- // variance. In addition, scale the variance down to undo the
- // mean scaling above. Otherwise, it can get too big.
- ACE_Stats_Value variance (std_dev.precision ());
- quotient (sum_of_squares,
- (number_of_samples_ - 1) * field * field,
- variance);
-
- // Take the square root of the variance to get the standard
- // deviation. First, scale up . . .
- ACE_UINT64 scaled_variance;
- variance.scaled_value (scaled_variance);
-
- // And scale up, once more, because we'll be taking the square
- // root.
- scaled_variance *= field;
- ACE_Stats_Value unscaled_standard_deviation (std_dev.precision ());
- square_root (scaled_variance,
- unscaled_standard_deviation);
-
- // Unscale.
- quotient (unscaled_standard_deviation,
- scale_factor * field,
- std_dev);
- }
-
- return 0;
-}
-
-
-void
-ACE_Stats::reset (void)
-{
- overflow_ = 0u;
- number_of_samples_ = 0u;
- min_ = 0x7FFFFFFF;
- max_ = -0x8000 * 0x10000;
- samples_.reset ();
-}
-
-int
-ACE_Stats::print_summary (const u_int precision,
- const ACE_UINT32 scale_factor,
- FILE *file) const
-{
- ACE_TCHAR mean_string [128];
- ACE_TCHAR std_dev_string [128];
- ACE_TCHAR min_string [128];
- ACE_TCHAR max_string [128];
- int success = 0;
-
- for (int tmp_precision = precision;
- ! overflow_ && ! success && tmp_precision >= 0;
- --tmp_precision)
- {
- // Build a format string, in case the C library doesn't support %*u.
- ACE_TCHAR format[32];
- if (tmp_precision == 0)
- ACE_OS::sprintf (format, ACE_TEXT ("%%%d"), tmp_precision);
- else
- ACE_OS::sprintf (format, ACE_TEXT ("%%d.%%0%du"), tmp_precision);
-
- ACE_Stats_Value u (tmp_precision);
- ((ACE_Stats *) this)->mean (u, scale_factor);
- ACE_OS::sprintf (mean_string, format, u.whole (), u.fractional ());
-
- ACE_Stats_Value sd (tmp_precision);
- if (((ACE_Stats *) this)->std_dev (sd, scale_factor))
- {
- success = 0;
- continue;
- }
- else
- {
- success = 1;
- }
- ACE_OS::sprintf (std_dev_string, format, sd.whole (), sd.fractional ());
-
- ACE_Stats_Value minimum (tmp_precision), maximum (tmp_precision);
- if (min_ != 0)
- {
- const ACE_UINT64 m (min_);
- quotient (m, scale_factor, minimum);
- }
- if (max_ != 0)
- {
- const ACE_UINT64 m (max_);
- quotient (m, scale_factor, maximum);
- }
- ACE_OS::sprintf (min_string, format,
- minimum.whole (), minimum.fractional ());
- ACE_OS::sprintf (max_string, format,
- maximum.whole (), maximum.fractional ());
- }
-
- if (success == 1)
- {
- ACE_OS::fprintf (file, ACE_TEXT ("samples: %u (%s - %s); mean: ")
- ACE_TEXT ("%s; std dev: %s\n"),
- samples (), min_string, max_string,
- mean_string, std_dev_string);
- return 0;
- }
- else
- {
-#if !defined (ACE_HAS_WINCE)
- ACE_OS::fprintf (file,
- ACE_TEXT ("ACE_Stats::print_summary: OVERFLOW: %s\n"),
- strerror (overflow_));
-#else
- // WinCE doesn't have strerror ;(
- ACE_OS::fprintf (file,
- ACE_TEXT ("ACE_Stats::print_summary: OVERFLOW\n"));
-#endif /* ACE_HAS_WINCE */
- return -1;
- }
-}
-
-void
-ACE_Stats::quotient (const ACE_UINT64 dividend,
- const ACE_UINT32 divisor,
- ACE_Stats_Value &quotient)
-{
- // The whole part of the division comes from simple integer division.
- quotient.whole (ACE_static_cast (ACE_UINT32,
- divisor == 0 ? 0 : dividend / divisor));
-
- if (quotient.precision () > 0 || divisor == 0)
- {
- const ACE_UINT32 field = quotient.fractional_field ();
-
- // Fractional = (dividend % divisor) * 10^precision / divisor
-
- // It would be nice to add round-up term:
- // Fractional = (dividend % divisor) * 10^precision / divisor +
- // 10^precision/2 / 10^precision
- // = ((dividend % divisor) * 10^precision + divisor) /
- // divisor
- quotient.fractional (ACE_static_cast (ACE_UINT32,
- dividend % divisor * field / divisor));
- }
- else
- {
- // No fractional portion is requested, so don't bother
- // calculating it.
- quotient.fractional (0);
- }
-}
-
-void
-ACE_Stats::quotient (const ACE_Stats_Value &dividend,
- const ACE_UINT32 divisor,
- ACE_Stats_Value &quotient)
-{
- // The whole part of the division comes from simple integer division.
- quotient.whole (divisor == 0 ? 0 : dividend.whole () / divisor);
-
- if (quotient.precision () > 0 || divisor == 0)
- {
- const ACE_UINT32 field = quotient.fractional_field ();
-
- // Fractional = (dividend % divisor) * 10^precision / divisor.
- quotient.fractional (dividend.whole () % divisor * field / divisor +
- dividend.fractional () / divisor);
- }
- else
- {
- // No fractional portion is requested, so don't bother
- // calculating it.
- quotient.fractional (0);
- }
-}
-
-void
-ACE_Stats::square_root (const ACE_UINT64 n,
- ACE_Stats_Value &square_root)
-{
- ACE_UINT32 floor = 0;
- ACE_UINT32 ceiling = 0xFFFFFFFFu;
- ACE_UINT32 mid = 0;
- u_int i;
-
- // The maximum number of iterations is log_2 (2^64) == 64.
- for (i = 0; i < 64; ++i)
- {
- mid = (ceiling - floor) / 2 + floor;
- if (floor == mid)
- // Can't divide the interval any further.
- break;
- else
- {
- // Multiply carefully to avoid overflow.
- ACE_UINT64 mid_squared = mid; mid_squared *= mid;
- if (mid_squared == n)
- break;
- else if (mid_squared < n)
- floor = mid;
- else
- ceiling = mid;
- }
- }
-
- square_root.whole (mid);
- ACE_UINT64 mid_squared = mid; mid_squared *= mid;
-
- if (square_root.precision () && mid_squared < n)
- {
- // (mid * 10^precision + fractional)^2 ==
- // n^2 * 10^(precision * 2)
-
- const ACE_UINT32 field = square_root.fractional_field ();
-
- floor = 0;
- ceiling = field;
- mid = 0;
-
- // Do the 64-bit arithmetic carefully to avoid overflow.
- ACE_UINT64 target = n;
- target *= field;
- target *= field;
-
- ACE_UINT64 difference = 0;
-
- for (i = 0; i < square_root.precision (); ++i)
- {
- mid = (ceiling - floor) / 2 + floor;
-
- ACE_UINT64 current = square_root.whole () * field + mid;
- current *= square_root.whole () * field + mid;
-
- if (floor == mid)
- {
- difference = target - current;
- break;
- }
- else if (current <= target)
- floor = mid;
- else
- ceiling = mid;
- }
-
- // Check to see if the fractional part should be one greater.
- ACE_UINT64 next = square_root.whole () * field + mid + 1;
- next *= square_root.whole () * field + mid + 1;
-
- square_root.fractional (next - target < difference ? mid + 1 : mid);
- }
- else
- {
- // No fractional portion is requested, so don't bother
- // calculating it.
- square_root.fractional (0);
- }
-}
-
-// ****************************************************************
-
-ACE_Throughput_Stats::ACE_Throughput_Stats (void)
- : samples_count_ (0),
- latency_min_ (0),
- latency_min_at_ (0),
- latency_max_ (0),
- latency_max_at_ (0),
- latency_sum_ (0),
- latency_sum2_ (0),
- throughput_last_ (0),
- throughput_sum_x_ (0),
- throughput_sum_x2_ (0),
- throughput_sum_y_ (0),
- throughput_sum_y2_ (0),
- throughput_sum_xy_ (0)
-{
-}
-
-void
-ACE_Throughput_Stats::sample (ACE_UINT64 throughput,
- ACE_UINT64 latency)
-{
- ++this->samples_count_;
-
- if (this->samples_count_ == 1u)
- {
- this->latency_min_ = latency;
- this->latency_min_at_ = ACE_U64_TO_U32 (this->samples_count_);
- this->latency_max_ = latency;
- this->latency_max_at_ = ACE_U64_TO_U32 (this->samples_count_);
- this->latency_sum_ = latency;
-#if defined ACE_LACKS_LONGLONG_T
- this->latency_sum2_ = latency * ACE_U64_TO_U32 (latency);
-#else /* ! ACE_LACKS_LONGLONG_T */
- this->latency_sum2_ = latency * latency;
-#endif /* ! ACE_LACKS_LONGLONG_T */
-
- this->throughput_last_ = throughput;
-#if 0
- this->throughput_sum_y_ = this->samples_count_;
- this->throughput_sum_y2_ = this->samples_count_ * this->samples_count_;
- this->throughput_sum_x_ = throughput;
- this->throughput_sum_x2_ = throughput * throughput;
- this->throughput_sum_xy_ = throughput * this->samples_count_;
-
- printf ("%f %qu\n", throughput / 400000000.0, this->samples_count_);
-#endif /* 0 */
- }
- else
- {
- if (this->latency_min_ > latency)
- {
- this->latency_min_ = latency;
- this->latency_min_at_ = ACE_U64_TO_U32 (this->samples_count_);
- }
- if (this->latency_max_ < latency)
- {
- this->latency_max_ = latency;
- this->latency_max_at_ = ACE_U64_TO_U32 (this->samples_count_);
- }
-
- this->latency_sum_ += latency;
-#if defined ACE_LACKS_LONGLONG_T
- this->latency_sum2_ += latency * ACE_U64_TO_U32 (latency);
-#else /* ! ACE_LACKS_LONGLONG_T */
- this->latency_sum2_ += latency * latency;
-#endif /* ! ACE_LACKS_LONGLONG_T */
-
- this->throughput_last_ = throughput;
-
-#if 0
- this->throughput_sum_y_ += this->samples_count_;
- this->throughput_sum_y2_ += this->samples_count_ * this->samples_count_;
- this->throughput_sum_x_ += throughput;
- this->throughput_sum_x2_ += throughput * throughput;
- this->throughput_sum_xy_ += throughput * this->samples_count_;
-
- printf ("%f %qu\n", throughput / 400000000.0, this->samples_count_);
-#endif /* 0 */
- }
-}
-
-void
-ACE_Throughput_Stats::accumulate (const ACE_Throughput_Stats &rhs)
-{
- if (rhs.samples_count_ == 0)
- return;
-
- if (this->samples_count_ == 0u)
- {
- this->samples_count_ = rhs.samples_count_;
-
- this->latency_min_ = rhs.latency_min_;
- this->latency_max_ = rhs.latency_max_;
- this->latency_sum_ = rhs.latency_sum_;
- this->latency_sum2_ = rhs.latency_sum2_;
-
- this->throughput_last_ = rhs.throughput_last_;
-#if 0
- this->throughput_sum_x_ = rhs.throughput_sum_x_;
- this->throughput_sum_x2_ = rhs.throughput_sum_x2_;
- this->throughput_sum_y_ = rhs.throughput_sum_y_;
- this->throughput_sum_y2_ = rhs.throughput_sum_y2_;
- this->throughput_sum_xy_ = rhs.throughput_sum_xy_;
-#endif /* 0 */
-
- return;
- }
-
- this->samples_count_ += rhs.samples_count_;
-
- if (this->latency_min_ > rhs.latency_min_)
- this->latency_min_ = rhs.latency_min_;
- if (this->latency_max_ < rhs.latency_max_)
- this->latency_max_ = rhs.latency_max_;
-
- this->latency_sum_ += rhs.latency_sum_;
- this->latency_sum2_ += rhs.latency_sum2_;
-
- if (this->throughput_last_ < rhs.throughput_last_)
- this->throughput_last_ = rhs.throughput_last_;
-
-#if 0
- this->throughput_sum_x_ += rhs.throughput_sum_x_;
- this->throughput_sum_x2_ += rhs.throughput_sum_x2_;
- this->throughput_sum_y_ += rhs.throughput_sum_y_;
- this->throughput_sum_y2_ += rhs.throughput_sum_y2_;
- this->throughput_sum_xy_ += rhs.throughput_sum_xy_;
-#endif /* 0 */
-}
-
-void
-ACE_Throughput_Stats::dump_results (const ACE_TCHAR* msg,
- ACE_UINT32 sf)
-{
- if (this->samples_count_ == 0u)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s : no data collected\n"), msg));
- return;
- }
-
- ACE_UINT64 latency_avg = this->latency_sum_ /
-#if defined ACE_LACKS_LONGLONG_T
- ACE_U64_TO_U32 (this->samples_count_);
-#else /* ! ACE_LACKS_LONGLONG_T */
- this->samples_count_;
-#endif /* ! ACE_LACKS_LONGLONG_T */
- ACE_UINT64 latency_dev =
-#if defined ACE_LACKS_LONGLONG_T
- ACE_static_cast (ACE_U_LongLong,
- this->latency_sum2_ / ACE_U64_TO_U32(this->samples_count_)) -
- latency_avg * ACE_U64_TO_U32(latency_avg);
-#else /* ! ACE_LACKS_LONGLONG_T */
- this->latency_sum2_ / this->samples_count_ - latency_avg * latency_avg;
-#endif /* ! ACE_LACKS_LONGLONG_T */
-
- double l_min = ACE_CU64_TO_CU32 (this->latency_min_) / sf;
- double l_max = ACE_CU64_TO_CU32 (this->latency_max_) / sf;
- double l_avg = ACE_CU64_TO_CU32 (latency_avg) / sf;
- double l_dev = ACE_CU64_TO_CU32 (latency_dev) / (sf * sf);
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s latency : %.2f[%d]/%.2f/%.2f[%d]/%.2f (min/avg/max/var^2)\n"),
- msg,
- l_min, this->latency_min_at_,
- l_avg,
- l_max, this->latency_max_at_,
- l_dev));
-
- double seconds =
-#if defined ACE_LACKS_LONGLONG_T
- this->throughput_last_ / sf;
-#else /* ! ACE_LACKS_LONGLONG_T */
- ACE_static_cast (double,
- ACE_UINT64_DBLCAST_ADAPTER(this->throughput_last_ / sf));
-#endif /* ! ACE_LACKS_LONGLONG_T */
- seconds /= 1000000.0;
- double t_avg = ACE_CU64_TO_CU32 (this->samples_count_) / seconds;
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s throughput: %.2f (events/second)\n"),
- msg, t_avg));
-
-#if 0
- double t_sum_x =
- ACE_CU64_TO_CU32 (this->throughput_sum_x_);// / sf);
- //t_sum_x /= 1000000.0;
- double t_sum_y =
- ACE_CU64_TO_CU32 (this->throughput_sum_y_);
- double t_sum_x2 =
- ACE_CU64_TO_CU32 (this->throughput_sum_x2_);// / (sf*sf));
- //t_sum_x2 /= 1000000.0;
- //t_sum_x2 /= 1000000.0;
- double t_sum_y2 =
- ACE_CU64_TO_CU32 (this->throughput_sum_y2_);
- double t_sum_xy =
- ACE_CU64_TO_CU32 (this->throughput_sum_xy_);// / sf);
- //t_sum_xy /= 1000000.0;
- double t_avgx = t_sum_x / this->samples_count_;
- double t_avgy = t_sum_y / this->samples_count_;
-
- double t_a =
- (this->samples_count_ * t_sum_xy - t_sum_x * t_sum_y)
- / (this->samples_count_ * t_sum_x2 - t_sum_x * t_sum_x);
- double t_b = (t_avgy - t_a * t_avgx);
-
- t_a *= 1000000.0;
-
- double d_r =
- (t_sum_xy - t_avgx * t_sum_y - t_avgy * t_sum_x
- + this->samples_count_ * t_avgx * t_avgy);
- double n_r =
- (t_sum_x2
- - this->samples_count_ * t_avgx * t_avgx)
- * (t_sum_y2
- - this->samples_count_ * t_avgy * t_avgy);
- double t_r = d_r * d_r / n_r;
-
- // ACE_DEBUG ((LM_DEBUG,
- // "%s throughput: %.2f/%.2f/%.2f/%.6f/%.2f (avg/a/b/r/elapsed)\n",
- // msg, t_avg, t_a, t_b, t_r, seconds));
- // ACE_DEBUG ((LM_DEBUG,
- // "%s data: %.2f/%.2f/%.2f/%.6f/%.2f (x/x2/y/y2/xy)\n",
- // msg, t_sum_x, t_sum_x2, t_sum_y, t_sum_y2, t_sum_xy));
-#endif
-}
-
-// ****************************************************************
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Node <ACE_INT32>;
-template class ACE_Unbounded_Queue <ACE_INT32>;
-template class ACE_Unbounded_Queue_Iterator <ACE_INT32>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Node <ACE_INT32>
-#pragma instantiate ACE_Unbounded_Queue <ACE_INT32>
-#pragma instantiate ACE_Unbounded_Queue_Iterator <ACE_INT32>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Stats.h b/ace/Stats.h
deleted file mode 100644
index 59ee3a54799..00000000000
--- a/ace/Stats.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Stats.h
-//
-// = AUTHORS
-// David L. Levine
-//
-// ============================================================================
-
-#ifndef ACE_STATS_H
-#define ACE_STATS_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Containers.h"
-
-class ACE_Export ACE_Stats_Value
-{
- // = TITLE
- // Helper class for ACE_Stats.
- //
- // = DESCRIPTION
- // Container struct for 64-bit signed quantity and its
- // precision. It would be nicer to use a fixed-point class, but
- // this is sufficient. Users typically don't need to use this
- // class directly; see ACE_Stats below.
-public:
- ACE_Stats_Value (const u_int precision);
- // Constructor, which requires precision in terms of number of
- // decimal digits. The more variation in the data, and the greater
- // the data values, the smaller the precision must be to avoid
- // overflow in the standard deviation calculation. 3 might be a
- // good value, or maybe 4. 5 will probably be too large for
- // non-trivial data sets.
-
- u_int precision (void) const;
- // Accessor for precision.
-
- void whole (const ACE_UINT32);
- // Set the whole_ field.
-
- ACE_UINT32 whole (void) const;
- // Accessor for the whole_ field.
-
- void fractional (const ACE_UINT32);
- // Set the fractional_ field.
-
- ACE_UINT32 fractional (void) const;
- // Accessor for the fractional_ field.
-
- ACE_UINT32 fractional_field (void) const;
- // Calculates the maximum value of the fractional portion, given its
- // precision.
-
- void scaled_value (ACE_UINT64 &) const;
- // Access the value as an _unsigned_ 64 bit quantity. It scales the
- // value up by <precision> decimal digits, so that no precision will
- // be lost. It assumes that <whole_> is >= 0.
-
- void dump (void) const;
- // Print to stdout.
-
-private:
- ACE_UINT32 whole_;
- // The integer portion of the value.
-
- ACE_UINT32 fractional_;
- // The fractional portion of the value.
-
- u_int precision_;
- // The number of decimal digits of precision represented by
- // <fractional_>. Not declared const, so the only way to change it
- // is via the assignment operator.
-
- ACE_UNIMPLEMENTED_FUNC (ACE_Stats_Value (void))
-};
-
-class ACE_Export ACE_Stats
-{
- // = TITLE
- // Provides simple statistical analysis.
- //
- // = DESCRIPTION
- // Simple statistical analysis package. Prominent features are:
- // 1) It does not use any floating point arithmetic.
- // 2) It handles positive and/or negative sample values. The
- // sample value type is ACE_INT32.
- // 3) It uses 64 bit unsigned, but not 64 bit signed, quantities
- // internally.
- // 4) It checks for overflow of internal state.
- // 5) It has no static variables of other than built-in types.
- //
- // Example usage:
- // ACE_Stats stats;
- // for (u_int i = 0; i < n; ++i)
- // {
- // const ACE_UINT32 sample = /* ... */;
- // stats.sample (sample);
- // }
- // stats.print_summary (3);
-public:
- ACE_Stats (void);
- // Default constructor.
-
- int sample (const ACE_INT32 value);
- // Provide a new sample. Returns 0 on success, -1 if it fails due
- // to running out of memory, or to rolling over of the sample count.
-
- ACE_UINT32 samples (void) const;
- // Access the number of samples provided so far.
-
- ACE_INT32 min_value (void) const;
- // Value of the minimum sample provided so far.
-
- ACE_INT32 max_value (void) const;
- // Value of the maximum sample provided so far.
-
- void mean (ACE_Stats_Value &mean,
- const ACE_UINT32 scale_factor = 1);
- // Access the mean of all samples provided so far. The fractional
- // part is to the specified number of digits. E.g., 3 fractional
- // digits specifies that the fractional part is in thousandths.
-
- int std_dev (ACE_Stats_Value &std_dev,
- const ACE_UINT32 scale_factor = 1);
- // Access the standard deviation, whole and fractional parts. See
- // description of <mean> method for argument descriptions.
-
- int print_summary (const u_int precision,
- const ACE_UINT32 scale_factor = 1,
- FILE * = stdout) const;
- // Print summary statistics. If scale_factor is not 1, then the
- // results are divided by it, i.e., each of the samples is scaled
- // down by it. If internal overflow is reached with the specified
- // scale factor, it successively tries to reduce it. Returns -1 if
- // there is overflow even with a 0 scale factor.
-
- void reset (void);
- // Initialize internal state.
-
- static void quotient (const ACE_UINT64 dividend,
- const ACE_UINT32 divisor,
- ACE_Stats_Value &quotient);
- // Utility division function, for ACE_UINT64 dividend.
-
- static void quotient (const ACE_Stats_Value &dividend,
- const ACE_UINT32 divisor,
- ACE_Stats_Value &quotient);
- // Utility division function, for ACE_Stats_Value dividend.
-
- static void square_root (const ACE_UINT64 n,
- ACE_Stats_Value &square_root);
- // Sqrt function, which uses an oversimplified version of Newton's
- // method. It's not fast, but it doesn't require floating point
- // support.
-
- void dump (void) const;
- // Print summary statistics to stdout.
-
-private:
- u_int overflow_;
- // Internal indication of whether there has been overflow. Contains
- // the errno corresponding to the cause of overflow.
-
- ACE_UINT32 number_of_samples_;
- // Number of samples.
-
- ACE_INT32 min_;
- // Minimum sample value.
-
- ACE_INT32 max_;
- // Maximum sample value.
-
- ACE_Unbounded_Queue <ACE_INT32> samples_;
- // The samples.
-};
-
-// ****************************************************************
-
-class ACE_Export ACE_Throughput_Stats
-{
- // = TITLE
- // A simple class to make throughput and latency analysis.
- //
- // = DESCRIPTION
- // Keep the relevant information to perform throughput and latency
- // analysis, including:
- // 1) Minimum, Average and Maximum latency
- // 2) Jitter for the latency
- // 3) Linear regression for throughput
- // 4) Accumulate results from several samples to obtain aggregated
- // results, across several threads or experiments.
- //
-public:
- ACE_Throughput_Stats (void);
- // Default constructor.
-
- void sample (ACE_UINT64 throughput, ACE_UINT64 latency);
- // Store one sample
-
- void accumulate (const ACE_Throughput_Stats &throughput);
- // Update the values to reflect the stats in <throughput>
-
- void dump_results (const ACE_TCHAR* msg, ACE_UINT32 scale_factor);
- // Print down the stats
-
-private:
- ACE_UINT64 samples_count_;
- // The number of samples
-
- ACE_UINT64 latency_min_;
- ACE_UINT32 latency_min_at_;
- ACE_UINT64 latency_max_;
- ACE_UINT32 latency_max_at_;
- ACE_UINT64 latency_sum_;
- ACE_UINT64 latency_sum2_;
- // The stadigraphs for latency computation
-
- ACE_UINT64 throughput_last_;
- ACE_UINT64 throughput_sum_x_;
- ACE_UINT64 throughput_sum_x2_;
- ACE_UINT64 throughput_sum_y_;
- ACE_UINT64 throughput_sum_y2_;
- ACE_UINT64 throughput_sum_xy_;
- // The stadigraphs for throughput computation
-};
-
-
-#if defined (__ACE_INLINE__)
-# include "ace/Stats.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ! ACE_STATS_H */
diff --git a/ace/Stats.i b/ace/Stats.i
deleted file mode 100644
index bbac9fd33f3..00000000000
--- a/ace/Stats.i
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_Stats_Value::ACE_Stats_Value (const u_int precision)
- : whole_ (0),
- fractional_ (0),
- precision_ (precision)
-{
-}
-
-ACE_INLINE
-u_int
-ACE_Stats_Value::precision (void) const
-{
- return precision_;
-}
-
-ACE_INLINE
-void
-ACE_Stats_Value::whole (const ACE_UINT32 value)
-{
- whole_ = value;
-}
-
-ACE_INLINE
-ACE_UINT32
-ACE_Stats_Value::whole (void) const
-{
- return whole_;
-}
-
-ACE_INLINE
-void
-ACE_Stats_Value::fractional (const ACE_UINT32 value)
-{
- fractional_ = value;
-}
-
-ACE_INLINE
-ACE_UINT32
-ACE_Stats_Value::fractional (void) const
-{
- return fractional_;
-}
-
-ACE_INLINE
-void
-ACE_Stats_Value::scaled_value (ACE_UINT64 &sv) const
-{
- sv = whole () * fractional_field () + fractional ();
-}
-
-ACE_INLINE
-void
-ACE_Stats_Value::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("precision: %u digits; whole: %u, fractional: %u\n"),
- precision_, whole_, fractional_));
-}
-
-ACE_INLINE
-ACE_Stats::ACE_Stats (void)
-{
- reset ();
-}
-
-ACE_INLINE
-ACE_UINT32
-ACE_Stats::samples (void) const
-{
- return number_of_samples_;
-}
-
-ACE_INLINE
-ACE_INT32
-ACE_Stats::min_value (void) const
-{
- return min_;
-}
-
-ACE_INLINE
-ACE_INT32
-ACE_Stats::max_value (void) const
-{
- return max_;
-}
-
-ACE_INLINE
-void
-ACE_Stats::dump (void) const
-{
- print_summary (3u);
-}
diff --git a/ace/Strategies.cpp b/ace/Strategies.cpp
deleted file mode 100644
index c43d61939f6..00000000000
--- a/ace/Strategies.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-// Strategies.cpp
-// $Id$
-
-#if !defined (ACE_STRATEGIES_C)
-#define ACE_STRATEGIES_C
-
-#include "ace/Reactor.h"
-#include "ace/Strategies.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Strategies.i"
-#endif /* __ACE_INLINE __ */
-
-ACE_RCSID(ace, Strategies, "$Id$")
-
-ACE_Notification_Strategy::ACE_Notification_Strategy (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask)
- : eh_ (eh),
- mask_ (mask)
-{
-}
-
-ACE_Notification_Strategy::~ACE_Notification_Strategy (void)
-{
-}
-
-ACE_Event_Handler *
-ACE_Notification_Strategy::event_handler (void)
-{
- return eh_;
-}
-
-void
-ACE_Notification_Strategy::event_handler (ACE_Event_Handler *eh)
-{
- this->eh_ = eh;
-}
-
-ACE_Reactor_Mask
-ACE_Notification_Strategy::mask (void)
-{
- return mask_;
-}
-
-void
-ACE_Notification_Strategy::mask (ACE_Reactor_Mask m)
-{
- this->mask_ = m;
-}
-
-ACE_Reactor_Notification_Strategy::ACE_Reactor_Notification_Strategy (ACE_Reactor *reactor,
- ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask)
- : ACE_Notification_Strategy (eh, mask),
- reactor_ (reactor)
-{
-}
-
-int
-ACE_Reactor_Notification_Strategy::notify (void)
-{
- return this->reactor_->notify (this->eh_, this->mask_);
-}
-
-int
-ACE_Reactor_Notification_Strategy::notify (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask)
-{
- return this->reactor_->notify (eh, mask);
-}
-
-ACE_Reactor *
-ACE_Reactor_Notification_Strategy::reactor (void)
-{
- return this->reactor_;
-}
-
-void
-ACE_Reactor_Notification_Strategy::reactor (ACE_Reactor *r)
-{
- this->reactor_ = r;
-}
-
-ACE_Connection_Recycling_Strategy::~ACE_Connection_Recycling_Strategy (void)
-{
-}
-
-#endif /* ACE_STRATEGIES_C */
diff --git a/ace/Strategies.h b/ace/Strategies.h
deleted file mode 100644
index 856fc3a3458..00000000000
--- a/ace/Strategies.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Strategies.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_STRATEGIES_H
-#define ACE_STRATEGIES_H
-#include "ace/pre.h"
-
-#include "ace/Event_Handler.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Forward decls.
-class ACE_Reactor;
-
-class ACE_Export ACE_Notification_Strategy
-{
- // = TITLE
- // Abstract class used for notifing an interested party
- //
- // = DESCRIPTION
- // A vehicle for extending the behavior of ACE_Message_Queue wrt
- // notification *without subclassing*. Thus, it's an example of
- // the Bridge/Strategy patterns.
-public:
- ACE_Notification_Strategy (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask);
- virtual ~ACE_Notification_Strategy (void);
-
- virtual int notify (void) = 0;
- virtual int notify (ACE_Event_Handler *,
- ACE_Reactor_Mask mask) = 0;
-
- // Get/Set the event handler
- ACE_Event_Handler *event_handler (void);
- void event_handler (ACE_Event_Handler *eh);
-
- // Get/Set the reactor mask
- ACE_Reactor_Mask mask (void);
- void mask (ACE_Reactor_Mask m);
-
-protected:
- ACE_Event_Handler *eh_;
- ACE_Reactor_Mask mask_;
-};
-
-class ACE_Export ACE_Reactor_Notification_Strategy : public ACE_Notification_Strategy
-{
- // = TITLE
- // Used to notify an ACE_Reactor
- //
- // = DESCRIPTION
- // Integrates the <ACE_Message_Queue> notification into the
- // <ACE_Reactor::notify> method.
-public:
- ACE_Reactor_Notification_Strategy (ACE_Reactor *reactor,
- ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask);
-
- virtual ~ACE_Reactor_Notification_Strategy (void);
- // Default dtor.
-
- virtual int notify (void);
-
- virtual int notify (ACE_Event_Handler *,
- ACE_Reactor_Mask mask);
-
- // Get/Set the reactor
- ACE_Reactor *reactor (void);
- void reactor (ACE_Reactor *r);
-
-protected:
- ACE_Reactor *reactor_;
-};
-
-class ACE_Export ACE_Connection_Recycling_Strategy
-{
- // = TITLE
- // Defines the interface for a connection recycler.
-public:
- virtual ~ACE_Connection_Recycling_Strategy (void);
- // Virtual Destructor
-
- virtual int purge (const void *recycling_act) = 0;
- // Remove from cache.
-
- virtual int cache (const void *recycling_act) = 0;
- // Add to cache.
-
- virtual int recycle_state (const void *recycling_act,
- ACE_Recyclable_State new_state) = 0;
-
- virtual ACE_Recyclable_State recycle_state (const void *recycling_act) const = 0;
- // Get/Set <recycle_state>.
-
- virtual int mark_as_closed (const void *recycling_act) = 0;
- // Mark as closed.
-
- virtual int mark_as_closed_i (const void *recycling_act) = 0;
- // Mark as closed.(non-locking version)
-
- virtual int cleanup_hint (const void *recycling_act,
- void **act_holder = 0) = 0;
- // Cleanup hint and reset <*act_holder> to zero if <act_holder != 0>.
-
-protected:
- ACE_Connection_Recycling_Strategy (void);
- // Default ctor.
-};
-
-class ACE_Export ACE_Recyclable
-{
-public:
- virtual ~ACE_Recyclable (void);
- // Destructor.
-
- // = Set/Get the recyclable bit
- ACE_Recyclable_State recycle_state (void) const;
- void recycle_state (ACE_Recyclable_State new_state);
-
-protected:
- ACE_Recyclable (ACE_Recyclable_State initial_state);
- // Protected constructor.
-
- ACE_Recyclable_State recycle_state_;
- // Our state.
-};
-
-class ACE_Export ACE_Hashable
-{
-public:
- virtual ~ACE_Hashable (void);
- // Destructor.
-
- virtual u_long hash (void) const;
- // Computes and returns hash value. This "caches" the hash value to
- // improve performance.
-
-protected:
- ACE_Hashable (void);
- // Protected constructor.
-
- virtual u_long hash_i (void) const = 0;
- // This is the method that actually performs the non-cached hash
- // computation.
-
- u_long hash_value_;
- // Pre-computed hash-value.
-
-};
-
-class ACE_Export ACE_Refcountable
-{
-public:
- virtual ~ACE_Refcountable (void);
- // Destructor.
-
- // = Increment/Decrement refcount
- int increment (void);
- int decrement (void);
-
- int refcount (void) const;
- // Returns the current refcount.
-
-protected:
- ACE_Refcountable (int refcount);
- // Protected constructor.
-
- int refcount_;
- // Current refcount.
-};
-
-// This needs to come here to avoid circular dependencies.
-#include "ace/Strategies_T.h"
-
-#if defined (__ACE_INLINE__)
-#include "ace/Strategies.i"
-#endif /* __ACE_INLINE __ */
-
-#include "ace/post.h"
-#endif /* ACE_STRATEGIES_H */
diff --git a/ace/Strategies.i b/ace/Strategies.i
deleted file mode 100644
index 5cdcb51c92e..00000000000
--- a/ace/Strategies.i
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Strategies.i
-
-ACE_INLINE
-ACE_Reactor_Notification_Strategy::~ACE_Reactor_Notification_Strategy (void)
-{
-}
-
-ACE_INLINE
-ACE_Connection_Recycling_Strategy::ACE_Connection_Recycling_Strategy (void)
-{
-}
-
-ACE_INLINE
-ACE_Recyclable::ACE_Recyclable (ACE_Recyclable_State initial_state)
- : recycle_state_ (initial_state)
-{
-}
-
-ACE_INLINE
-ACE_Recyclable::~ACE_Recyclable (void)
-{
-}
-
-ACE_INLINE ACE_Recyclable_State
-ACE_Recyclable::recycle_state (void) const
-{
- return this->recycle_state_;
-}
-
-ACE_INLINE void
-ACE_Recyclable::recycle_state (ACE_Recyclable_State new_state)
-{
- if (this->recycle_state_ == ACE_RECYCLABLE_CLOSED)
- return;
-
- this->recycle_state_ = new_state;
-}
-
-ACE_INLINE
-ACE_Hashable::ACE_Hashable (void)
- : hash_value_ (0)
-{
-}
-
-ACE_INLINE
-ACE_Hashable::~ACE_Hashable (void)
-{
-}
-
-ACE_INLINE u_long
-ACE_Hashable::hash (void) const
-{
- // In doing the check below, we take chance of paying a performance
- // price when the hash value is zero. But, that will (hopefully)
- // happen far less often than a non-zero value, so this caching
- // strategy should pay off, esp. if hash computation is expensive
- // relative to the simple comparison.
-
- if (this->hash_value_ == 0)
- ((ACE_Hashable *) this)->hash_value_ = this->hash_i ();
-
- return this->hash_value_;
-}
-
-ACE_INLINE
-ACE_Refcountable::ACE_Refcountable (int refcount)
- : refcount_ (refcount)
-{
-}
-
-ACE_INLINE
-ACE_Refcountable::~ACE_Refcountable (void)
-{
-}
-
-ACE_INLINE int
-ACE_Refcountable::increment (void)
-{
- return ++this->refcount_;
-}
-
-ACE_INLINE int
-ACE_Refcountable::decrement (void)
-{
- return --this->refcount_;
-}
-
-ACE_INLINE int
-ACE_Refcountable::refcount (void) const
-{
- return this->refcount_;
-}
diff --git a/ace/Strategies_T.cpp b/ace/Strategies_T.cpp
deleted file mode 100644
index 033de722d0d..00000000000
--- a/ace/Strategies_T.cpp
+++ /dev/null
@@ -1,1206 +0,0 @@
-// $Id$
-
-#ifndef ACE_STRATEGIES_T_C
-#define ACE_STRATEGIES_T_C
-
-#include "ace/Strategies_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Service_Repository.h"
-#include "ace/Synch.h"
-#include "ace/Service_Types.h"
-#include "ace/Thread_Manager.h"
-#include "ace/WFMO_Reactor.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/Strategies_T.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-ACE_RCSID(ace, Strategies_T, "$Id$")
-
-template <class SVC_HANDLER> int
-ACE_Singleton_Strategy<SVC_HANDLER>::open (SVC_HANDLER *sh,
- ACE_Thread_Manager *)
-{
- ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::open");
-
- if (this->delete_svc_handler_
- && this->svc_handler_ != 0)
- delete this->svc_handler_;
-
- // If <sh> is NULL then create a new <SVC_HANDLER>.
- if (sh == 0)
- {
- ACE_NEW_RETURN (this->svc_handler_,
- SVC_HANDLER,
- -1);
- this->delete_svc_handler_ = 1;
- }
- else
- {
- this->svc_handler_ = sh;
- this->delete_svc_handler_ = 0;
- }
-
- return 0;
-}
-
-template <class SVC_HANDLER> int
-ACE_DLL_Strategy<SVC_HANDLER>::open (const char dll_name[],
- const char factory_function[],
- const char svc_name[],
- ACE_Service_Repository *svc_rep,
- ACE_Thread_Manager *thr_mgr)
-{
- ACE_TRACE ("ACE_DLL_Strategy<SVC_HANDLER>::open");
- this->inherited::open (thr_mgr);
- ACE_OS::strncpy (this->dll_name_, dll_name);
- ACE_OS::strncpy (this->factory_function_, factory_function);
- ACE_OS::strncpy (this->svc_name_, svc_name);
- this->svc_rep_ = svc_rep;
- return 0;
-}
-
-// Create a SVC_HANDLER by dynamically linking it from a DLL.
-
-template <class SVC_HANDLER> int
-ACE_DLL_Strategy<SVC_HANDLER>::make_svc_handler (SVC_HANDLER *&sh)
-{
- ACE_TRACE ("ACE_DLL_Strategy<SVC_HANDLER>::make_svc_handler");
-
- // Open the shared library.
- ACE_SHLIB_HANDLE handle = ACE_OS::dlopen (this->shared_library_);
-
- // Extract the factory function.
- SVC_HANDLER *(*factory)(void) =
- (SVC_HANDLER *(*)(void)) ACE_OS::dlsym (handle,
- this->factory_function_);
-
- // Call the factory function to obtain the new SVC_Handler (should
- // use RTTI here when it becomes available...)
- SVC_HANDLER *svc_handler;
-
- ACE_ALLOCATOR_RETURN (svc_handler, (*factory)(), -1);
-
- if (svc_handler != 0)
- {
- // Create an ACE_Service_Type containing the SVC_Handler and
- // insert into this->svc_rep_;
-
- ACE_Service_Type_Impl *stp;
- ACE_NEW_RETURN (stp,
- ACE_Service_Object_Type (svc_handler,
- this->svc_name_),
- -1);
-
- ACE_Service_Type *srp =
- new ACE_Service_Type (this->svc_name_,
- stp,
- handle,
- 1);
- if (srp == 0)
- {
- delete stp;
- errno = ENOMEM;
- return -1;
- }
-
- if (this->svc_rep_->insert (srp) == -1)
- return -1;
- // @@ Somehow, we need to deal with this->thr_mgr_...
- }
-
- sh = svc_handler;
- return 0;
-}
-
-// Default behavior is to activate the SVC_HANDLER by calling it's
-// open() method, which allows the SVC_HANDLER to determine its own
-// concurrency strategy.
-
-template <class SVC_HANDLER> int
-ACE_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handler,
- void *arg)
-{
- ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler");
-
- int result = 0;
-
- // See if we should enable non-blocking I/O on the <svc_handler>'s
- // peer.
- if (ACE_BIT_ENABLED (this->flags_, ACE_NONBLOCK) != 0)
- {
- if (svc_handler->peer ().enable (ACE_NONBLOCK) == -1)
- result = -1;
- }
- // Otherwise, make sure it's disabled by default.
- else if (svc_handler->peer ().disable (ACE_NONBLOCK) == -1)
- result = -1;
-
- if (result == 0 && svc_handler->open (arg) == -1)
- result = -1;
-
- if (result == -1)
- svc_handler->close (0);
-
- return result;
-}
-
-template <class SVC_HANDLER> int
-ACE_Reactive_Strategy<SVC_HANDLER>::open (ACE_Reactor *reactor,
- ACE_Reactor_Mask mask,
- int flags)
-{
- ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::open");
- this->reactor_ = reactor;
- this->mask_ = mask;
- this->flags_ = flags;
-
- // Must have a <Reactor>
- if (this->reactor_ == 0)
- return -1;
- else
- return 0;
-}
-
-template <class SVC_HANDLER> int
-ACE_Reactive_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handler,
- void *arg)
-{
- ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::activate_svc_handler");
-
- int result = 0;
-
- if (this->reactor_ == 0)
- result = -1;
-
- // Register with the Reactor with the appropriate <mask>.
- else if (this->reactor_->register_handler (svc_handler, this->mask_) == -1)
- result = -1;
-
- // If the implementation of the reactor uses event associations
- else if (this->reactor_->uses_event_associations ())
- {
- // If we don't have non-block on, it won't work with
- // WFMO_Reactor
- // This maybe too harsh
- // if (!ACE_BIT_ENABLED (this->flags_, ACE_NONBLOCK))
- // goto failure;
- if (svc_handler->open (arg) != -1)
- return 0;
- else
- result = -1;
- }
- else
- // Call up to our parent to do the SVC_HANDLER initialization.
- return this->inherited::activate_svc_handler (svc_handler, arg);
-
- if (result == -1)
- svc_handler->close (0);
-
- return result;
-}
-
-template <class SVC_HANDLER> int
-ACE_Thread_Strategy<SVC_HANDLER>::open (ACE_Thread_Manager *thr_mgr,
- long thr_flags,
- size_t n_threads,
- int flags)
-{
- ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::open");
- this->thr_mgr_ = thr_mgr;
- this->n_threads_ = n_threads;
- this->thr_flags_ = thr_flags;
- this->flags_ = flags;
-
- // Must have a thread manager!
- if (this->thr_mgr_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("error: must have a non-NULL thread manager\n")),
- -1);
- else
- return 0;
-}
-
-template <class SVC_HANDLER> int
-ACE_Thread_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handler,
- void *arg)
-{
- ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::activate_svc_handler");
- // Call up to our parent to do the SVC_HANDLER initialization.
- if (this->inherited::activate_svc_handler (svc_handler,
- arg) == -1)
- return -1;
- else
- // Turn the <svc_handler> into an active object (if it isn't
- // already one as a result of the first activation...)
- return svc_handler->activate (this->thr_flags_,
- this->n_threads_);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy
- (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
- int restart,
- ACE_Reactor *reactor)
- : reactor_ (reactor)
-{
- ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy");
-
- if (this->open (local_addr, restart) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("open")));
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
-ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler
-(SVC_HANDLER *svc_handler)
-{
- ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler");
-
- // Try to find out if the implementation of the reactor that we are
- // using requires us to reset the event association for the newly
- // created handle. This is because the newly created handle will
- // inherit the properties of the listen handle, including its event
- // associations.
- int reset_new_handle = this->reactor_->uses_event_associations ();
-
- if (this->acceptor_.accept (svc_handler->peer (), // stream
- 0, // remote address
- 0, // timeout
- 1, // restart
- reset_new_handle // reset new handler
- ) == -1)
- {
- // Close down handler to avoid memory leaks.
- svc_handler->close (0);
- return -1;
- }
- else
- return 0;
-}
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1> int
-ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::connect_svc_handler
-(SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::connect_svc_handler");
-
- return this->connector_.connect (sh->peer (),
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms);
-}
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1> int
-ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::connect_svc_handler
-(SVC_HANDLER *&sh,
- SVC_HANDLER *&sh_copy,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::connect_svc_handler");
-
- int result =
- this->connector_.connect (sh->peer (),
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms);
- sh_copy = sh;
- return result;
-}
-
-template <class SVC_HANDLER> int
-ACE_Process_Strategy<SVC_HANDLER>::open (size_t n_processes,
- ACE_Event_Handler *acceptor,
- ACE_Reactor *reactor,
- int avoid_zombies)
-{
- ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::open");
- this->n_processes_ = n_processes;
- this->acceptor_ = acceptor;
- this->reactor_ = reactor;
- this->flags_ = avoid_zombies;
-
- return 0;
-}
-
-template <class SVC_HANDLER> int
-ACE_Process_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handler,
- void *arg)
-{
- ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::activate_svc_handler");
-
- // If <flags_> is non-0 then we won't create zombies.
- switch (ACE::fork (ACE_TEXT ("child"), this->flags_))
- {
- case -1:
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("fork")),
- -1);
- /* NOTREACHED */
- case 0: // In child process.
-
- // Close down the SOCK_Acceptor's handle since we don't need to
- // keep it open.
- if (this->acceptor_ != 0)
- // Ignore the return value here...
- (void) this->reactor_->remove_handler (this->acceptor_,
- ACE_Event_Handler::ACCEPT_MASK);
-
- // Call up to our ancestor in the inheritance to do the
- // SVC_HANDLER initialization.
- return this->inherited::activate_svc_handler (svc_handler, arg);
- /* NOTREACHED */
- default: // In parent process.
- // We need to close down the <SVC_HANDLER> here because it's
- // running in the child.
- svc_handler->destroy ();
- return 0;
- }
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX>
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::ACE_Cached_Connect_Strategy
-(ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
- ACE_Recycling_Strategy<SVC_HANDLER> *rec_s,
- MUTEX *lock,
- int delete_lock)
- : lock_ (lock),
- delete_lock_ (delete_lock),
- reverse_lock_ (0),
- creation_strategy_ (0),
- delete_creation_strategy_ (0),
- concurrency_strategy_ (0),
- delete_concurrency_strategy_ (0),
- recycling_strategy_ (0),
- delete_recycling_strategy_ (0)
-{
- // Create a new lock if necessary.
- if (this->lock_ == 0)
- {
- ACE_NEW (this->lock_,
- MUTEX);
-
- this->delete_lock_ = 1;
- }
-
- ACE_NEW (this->reverse_lock_,
- REVERSE_MUTEX (*this->lock_));
-
- if (this->open (cre_s,
- con_s,
- rec_s) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Cached_Connect_Strategy::ACE_Cached_Connect_Strategy")));
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX>
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::~ACE_Cached_Connect_Strategy (void)
-{
- if (this->delete_lock_)
- delete this->lock_;
-
- delete this->reverse_lock_;
-
- if (this->delete_creation_strategy_)
- delete this->creation_strategy_;
- this->delete_creation_strategy_ = 0;
- this->creation_strategy_ = 0;
-
- if (this->delete_concurrency_strategy_)
- delete this->concurrency_strategy_;
- this->delete_concurrency_strategy_ = 0;
- this->concurrency_strategy_ = 0;
-
- if (this->delete_recycling_strategy_)
- delete this->recycling_strategy_;
- this->delete_recycling_strategy_ = 0;
- this->recycling_strategy_ = 0;
-
- // Close down all cached service handlers.
- CONNECTION_MAP_ENTRY *entry;
- for (CONNECTION_MAP_ITERATOR iterator (connection_map_);
- iterator.next (entry);
- iterator.advance ())
- {
- entry->int_id_->recycler (0, 0);
- entry->int_id_->close ();
- }
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::open
-(ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
- ACE_Recycling_Strategy<SVC_HANDLER> *rec_s)
-{
- // Initialize the creation strategy.
-
- // First we decide if we need to clean up.
- if (this->creation_strategy_ != 0 &&
- this->delete_creation_strategy_ != 0 &&
- cre_s != 0)
- {
- delete this->creation_strategy_;
- this->creation_strategy_ = 0;
- this->delete_creation_strategy_ = 0;
- }
-
- if (cre_s != 0)
- this->creation_strategy_ = cre_s;
- else if (this->creation_strategy_ == 0)
- {
- ACE_NEW_RETURN (this->creation_strategy_,
- CREATION_STRATEGY, -1);
- this->delete_creation_strategy_ = 1;
- }
-
- // Initialize the concurrency strategy.
-
- if (this->concurrency_strategy_ != 0 &&
- this->delete_concurrency_strategy_ != 0 &&
- con_s != 0)
- {
- delete this->concurrency_strategy_;
- this->concurrency_strategy_ = 0;
- this->delete_concurrency_strategy_ = 0;
- }
-
- if (con_s != 0)
- this->concurrency_strategy_ = con_s;
- else if (this->concurrency_strategy_ == 0)
- {
- ACE_NEW_RETURN (this->concurrency_strategy_,
- CONCURRENCY_STRATEGY, -1);
- this->delete_concurrency_strategy_ = 1;
- }
-
- // Initialize the recycling strategy.
-
- if (this->recycling_strategy_ != 0 &&
- this->delete_recycling_strategy_ != 0 &&
- rec_s != 0)
- {
- delete this->recycling_strategy_;
- this->recycling_strategy_ = 0;
- this->delete_recycling_strategy_ = 0;
- }
-
- if (rec_s != 0)
- this->recycling_strategy_ = rec_s;
- else if (this->recycling_strategy_ == 0)
- {
- ACE_NEW_RETURN (this->recycling_strategy_,
- RECYCLING_STRATEGY, -1);
- this->delete_recycling_strategy_ = 1;
- }
-
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::check_hint_i
-(SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, SVC_HANDLER *> *&entry,
- int &found)
-{
- ACE_UNUSED_ARG (remote_addr);
- ACE_UNUSED_ARG (timeout);
- ACE_UNUSED_ARG (local_addr);
- ACE_UNUSED_ARG (reuse_addr);
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (perms);
-
- found = 0;
-
- // Get the recycling act for the svc_handler
- CONNECTION_MAP_ENTRY *possible_entry = (CONNECTION_MAP_ENTRY *) sh->recycling_act ();
-
- // Check to see if the hint svc_handler has been closed down
- if (possible_entry->ext_id_.recycle_state () == ACE_RECYCLABLE_CLOSED)
- {
- // If close, decrement refcount
- if (possible_entry->ext_id_.decrement () == 0)
- {
- // If refcount goes to zero, close down the svc_handler
- possible_entry->int_id_->recycler (0, 0);
- possible_entry->int_id_->close ();
- this->purge_i (possible_entry);
- }
-
- // Hint not successful
- found = 0;
-
- // Reset hint
- sh = 0;
- }
-
- // If hint is not closed, see if it is connected to the correct
- // address and is recyclable
- else if ((possible_entry->ext_id_.recycle_state () == ACE_RECYCLABLE_IDLE_AND_PURGABLE ||
- possible_entry->ext_id_.recycle_state () == ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE) &&
- possible_entry->ext_id_.subject () == remote_addr)
- {
- // Hint successful
- found = 1;
-
- // Tell the <svc_handler> that it should prepare itself for
- // being recycled.
- this->prepare_for_recycling (sh);
- }
- else
- {
- // This hint will not be used.
- possible_entry->ext_id_.decrement ();
-
- // Hint not successful
- found = 0;
-
- // If <sh> is not connected to the correct address or is busy,
- // we will not use it.
- sh = 0;
- }
-
- if (found)
- entry = possible_entry;
-
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::find_or_create_svc_handler_i
-(SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, SVC_HANDLER *> *&entry,
- int &found)
-{
- // Explicit type conversion
- REFCOUNTED_HASH_RECYCLABLE_ADDRESS search_addr (remote_addr);
-
- // Try to find the address in the cache. Only if we don't find it
- // do we create a new <SVC_HANDLER> and connect it with the server.
- if (this->find (search_addr, entry) == -1)
- {
- // Set the flag
- found = 0;
-
- // We need to use a temporary variable here since we are not
- // allowed to change <sh> because other threads may use this
- // when we let go of the lock during the OS level connect.
- //
- // Note that making a new svc_handler, connecting remotely,
- // binding to the map, and assigning of the hint and recycler
- // should be atomic to the outside world.
- SVC_HANDLER *potential_handler = 0;
-
- // Create a new svc_handler
- if (this->make_svc_handler (potential_handler) == -1)
- return -1;
-
- // Actively establish the connection. This is a timed blocking
- // connect.
- if (this->new_connection (potential_handler,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms) == -1)
- {
- // If connect() failed because of timeouts, we have to
- // reject the connection entirely. This is necessary since
- // currently there is no way for the non-blocking connects
- // to complete and for the <Connector> to notify the cache
- // of the completion of connect().
- if (errno == EWOULDBLOCK)
- errno = ENOTSUP;
-
- // Close the svc handler.
- potential_handler->close (0);
-
- return -1;
- }
- else
- {
- // Insert the new SVC_HANDLER instance into the cache.
- if (this->connection_map_.bind (search_addr,
- potential_handler,
- entry) == -1)
- {
- // Close the svc handler.
- potential_handler->close (0);
-
- return -1;
- }
-
- // Everything succeeded as planned. Assign <sh> to <potential_handler>.
- sh = potential_handler;
-
- // Set the recycler and the recycling act
- this->assign_recycler (sh, this, entry);
- }
- }
- else
- // We found a cached svc_handler.
- {
- // Set the flag
- found = 1;
-
- // Get the cached <svc_handler>
- sh = entry->int_id_;
-
- // Tell the <svc_handler> that it should prepare itself for
- // being recycled.
- this->prepare_for_recycling (sh);
- }
-
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::new_connection
-(SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- // Yow, Reverse Guard! Let go of the lock for the duration of the
- // actual connect. This will allow other threads to hack on the
- // connection cache while this thread creates the new connection.
- ACE_GUARD_RETURN (REVERSE_MUTEX, ace_mon, *this->reverse_lock_, -1);
-
- return this->CONNECT_STRATEGY::connect_svc_handler (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::connect_svc_handler
-(SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- int found = 0;
-
- // This artificial scope is required since we need to let go of the
- // lock *before* registering the newly created handler with the
- // Reactor.
- {
- // Synchronization is required here as the setting of the
- // recyclable state must be done atomically with the finding and
- // binding of the service handler in the cache.
- ACE_GUARD_RETURN (MUTEX, ace_mon, *this->lock_, -1);
-
- int result = this->connect_svc_handler_i (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms,
- found);
- if (result != 0)
- return result;
-
- }
-
- // If it is a new connection, activate it.
- //
- // Note: This activation is outside the scope of the lock of the
- // cached connector. This is necessary to avoid subtle deadlock
- // conditions with this lock and the Reactor lock.
-
- if (!found)
- {
- if (this->activate_svc_handler (sh) == -1)
- {
- // If an error occurs while activating the handler, the
- // <activate_svc_handler> method will close the handler.
- // This in turn will remove this entry from the internal
- // table.
-
- // Synchronization is required here as the setting of the
- // handler to zero must be done atomically with the users of
- // the cache.
- ACE_GUARD_RETURN (MUTEX, ace_mon, *this->lock_, -1);
-
- // Reset handler.
- sh = 0;
-
- return -1;
- }
- }
-
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::connect_svc_handler
-(SVC_HANDLER *&sh,
- SVC_HANDLER *&sh_copy,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms)
-{
- int found = 0;
-
- // This artificial scope is required since we need to let go of the
- // lock *before* registering the newly created handler with the
- // Reactor.
- {
- // Synchronization is required here as the setting of the
- // recyclable state must be done atomically with the finding and
- // binding of the service handler in the cache.
- ACE_GUARD_RETURN (MUTEX, ace_mon, *this->lock_, -1);
-
- int result = this->connect_svc_handler_i (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms,
- found);
- sh_copy = sh;
-
- if (result != 0)
- return result;
-
- }
-
- // If it is a new connection, activate it.
- //
- // Note: This activation is outside the scope of the lock of the
- // cached connector. This is necessary to avoid subtle deadlock
- // conditions with this lock and the Reactor lock.
-
- if (!found)
- {
- if (this->activate_svc_handler (sh_copy) == -1)
- {
- // If an error occurs while activating the handler, the
- // <activate_svc_handler> method will close the handler.
- // This in turn will remove this entry from the internal
- // table.
-
- // Synchronization is required here as the setting of the
- // handler to zero must be done atomically with the users of
- // the cache.
- ACE_GUARD_RETURN (MUTEX, ace_mon, *this->lock_, -1);
-
- // Reset handler.
- sh = 0;
- sh_copy = 0;
-
- return -1;
- }
- }
-
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::connect_svc_handler_i
-(SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- int& found)
-{
- CONNECTION_MAP_ENTRY *entry = 0;
-
- // Check if the user passed a hint svc_handler
- if (sh != 0)
- {
- int result = this->check_hint_i (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms,
- entry,
- found);
- if (result != 0)
- return result;
- }
-
- // If not found
- if (!found)
- {
- int result = this->find_or_create_svc_handler_i (sh,
- remote_addr,
- timeout,
- local_addr,
- reuse_addr,
- flags,
- perms,
- entry,
- found);
- if (result != 0)
- return result;
- }
-
- // For all successful cases: mark the <svc_handler> in the cache
- // as being <in_use>. Therefore recyclable is BUSY.
- entry->ext_id_.recycle_state (ACE_RECYCLABLE_BUSY);
-
- // And increment the refcount
- entry->ext_id_.increment ();
-
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::cache (const void *recycling_act)
-{
- // Synchronization is required here as the setting of the recyclable
- // state must be done atomically with respect to other threads that
- // are querying the cache.
- ACE_GUARD_RETURN (MUTEX, ace_mon, *this->lock_, -1);
-
- return this->cache_i (recycling_act);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::cache_i (const void *recycling_act)
-{
- // The wonders and perils of ACT
- CONNECTION_MAP_ENTRY *entry = (CONNECTION_MAP_ENTRY *) recycling_act;
-
- // Mark the <svc_handler> in the cache as not being <in_use>.
- // Therefore recyclable is IDLE.
- entry->ext_id_.recycle_state (ACE_RECYCLABLE_IDLE_AND_PURGABLE);
-
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::recycle_state (const void *recycling_act,
- ACE_Recyclable_State new_state)
-{
- // Synchronization is required here as the setting of the recyclable
- // state must be done atomically with respect to other threads that
- // are querying the cache.
- ACE_GUARD_RETURN (MUTEX, ace_mon, *this->lock_, -1);
-
- return this->recycle_state_i (recycling_act,
- new_state);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::recycle_state_i (const void *recycling_act,
- ACE_Recyclable_State new_state)
-{
- // The wonders and perils of ACT
- CONNECTION_MAP_ENTRY *entry = (CONNECTION_MAP_ENTRY *) recycling_act;
-
- // Mark the <svc_handler> in the cache as not being <in_use>.
- // Therefore recyclable is IDLE.
- entry->ext_id_.recycle_state (new_state);
-
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> ACE_Recyclable_State
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::recycle_state (const void *recycling_act) const
-{
- // Const cast.
- SELF *fake_this = ACE_const_cast (SELF *, this);
-
- // Synchronization is required here.
- ACE_GUARD_RETURN (MUTEX, ace_mon, *fake_this->lock_, ACE_RECYCLABLE_UNKNOWN);
-
- return this->recycle_state_i (recycling_act);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> ACE_Recyclable_State
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::recycle_state_i (const void *recycling_act) const
-{
- // The wonders and perils of ACT
- CONNECTION_MAP_ENTRY *entry = (CONNECTION_MAP_ENTRY *) recycling_act;
-
- // Mark the <svc_handler> in the cache as not being <in_use>.
- // Therefore recyclable is IDLE.
- return entry->ext_id_.recycle_state ();
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::purge (const void *recycling_act)
-{
- // Excluded other threads from changing cache while we take this
- // entry out.
- ACE_GUARD_RETURN (MUTEX, ace_mon, *this->lock_, -1);
-
- return this->purge_i (recycling_act);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::purge_i (const void *recycling_act)
-{
- // The wonders and perils of ACT
- CONNECTION_MAP_ENTRY *entry = (CONNECTION_MAP_ENTRY *) recycling_act;
-
- return this->connection_map_.unbind (entry);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::mark_as_closed (const void *recycling_act)
-{
- // Excluded other threads from changing cache while we take this
- // entry out.
- ACE_GUARD_RETURN (MUTEX, ace_mon, *this->lock_, -1);
-
- return this->mark_as_closed_i (recycling_act);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::mark_as_closed_i (const void *recycling_act)
-{
- // The wonders and perils of ACT
- CONNECTION_MAP_ENTRY *entry = (CONNECTION_MAP_ENTRY *) recycling_act;
-
- // Mark the <svc_handler> in the cache as CLOSED.
- entry->ext_id_.recycle_state (ACE_RECYCLABLE_CLOSED);
-
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::cleanup_hint (const void *recycling_act,
- void **act_holder)
-{
- // Excluded other threads from changing cache while we take this
- // entry out.
- ACE_GUARD_RETURN (MUTEX, ace_mon, *this->lock_, -1);
-
- return this->cleanup_hint_i (recycling_act,
- act_holder);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::cleanup_hint_i (const void *recycling_act,
- void **act_holder)
-{
- // Reset the <*act_holder> in the confines and protection of the
- // lock.
- if (act_holder)
- *act_holder = 0;
-
- // The wonders and perils of ACT
- CONNECTION_MAP_ENTRY *entry = (CONNECTION_MAP_ENTRY *) recycling_act;
-
- // Decrement the refcount on the <svc_handler>.
- int refcount = entry->ext_id_.decrement ();
-
- // If the svc_handler state is closed and the refcount == 0, call
- // close() on svc_handler.
- if (entry->ext_id_.recycle_state () == ACE_RECYCLABLE_CLOSED &&
- refcount == 0)
- {
- entry->int_id_->recycler (0, 0);
- entry->int_id_->close ();
- this->purge_i (entry);
- }
-
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> ACE_Creation_Strategy<SVC_HANDLER> *
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::creation_strategy (void) const
-{
- return this->creation_strategy_;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> ACE_Recycling_Strategy<SVC_HANDLER> *
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::recycling_strategy (void) const
-{
- return this->recycling_strategy_;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> ACE_Concurrency_Strategy<SVC_HANDLER> *
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::concurrency_strategy (void) const
-{
- return this->concurrency_strategy_;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::find (ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR> &search_addr,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, SVC_HANDLER *> *&entry)
-{
- typedef ACE_Hash_Map_Bucket_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDRESS,
- SVC_HANDLER *,
- ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>,
- ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>,
- ACE_Null_Mutex>
- CONNECTION_MAP_BUCKET_ITERATOR;
-
- CONNECTION_MAP_BUCKET_ITERATOR iterator (this->connection_map_,
- search_addr);
-
- CONNECTION_MAP_BUCKET_ITERATOR end (this->connection_map_,
- search_addr,
- 1);
-
- for (;
- iterator != end;
- ++iterator)
- {
- REFCOUNTED_HASH_RECYCLABLE_ADDRESS &addr = (*iterator).ext_id_;
-
- if (addr.recycle_state () != ACE_RECYCLABLE_IDLE_AND_PURGABLE &&
- addr.recycle_state () != ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE)
- continue;
-
- if (addr.subject () != search_addr.subject ())
- continue;
-
- entry = &(*iterator);
- return 0;
- }
-
- return -1;
-}
-
-template <class SVC_HANDLER> void
-ACE_DLL_Strategy<SVC_HANDLER>::dump (void) const
-{
- ACE_TRACE ("ACE_DLL_Strategy<SVC_HANDLER>::dump");
-}
-
-template <class SVC_HANDLER> void
-ACE_Concurrency_Strategy<SVC_HANDLER>::dump (void) const
-{
- ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::dump");
-}
-
-template <class SVC_HANDLER> void
-ACE_Reactive_Strategy<SVC_HANDLER>::dump (void) const
-{
- ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::dump");
-}
-
-template <class SVC_HANDLER> void
-ACE_Thread_Strategy<SVC_HANDLER>::dump (void) const
-{
- ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::dump");
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void
-ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump (void) const
-{
- ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump");
-}
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1> void
-ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::dump (void) const
-{
- ACE_TRACE ("ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::dump");
-}
-
-template <class SVC_HANDLER> void
-ACE_Process_Strategy<SVC_HANDLER>::dump (void) const
-{
- ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::dump");
-}
-
-template <class SVC_HANDLER> void
-ACE_Scheduling_Strategy<SVC_HANDLER>::dump (void) const
-{
- ACE_TRACE ("ACE_Scheduling_Strategy<SVC_HANDLER>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class SVC_HANDLER> void
-ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::dump (void) const
-{
- ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::dump");
-
- ACE_Scheduling_Strategy<SVC_HANDLER>::dump ();
-}
-
-template <class SVC_HANDLER> void
-ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::dump (void) const
-{
- ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::dump");
-
- ACE_Scheduling_Strategy<SVC_HANDLER>::dump ();
-}
-
-template <class SVC_HANDLER> ACE_INLINE void
-ACE_Singleton_Strategy<SVC_HANDLER>::dump (void) const
-{
- ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::dump");
-}
-
-template <class SVC_HANDLER> void
-ACE_Creation_Strategy<SVC_HANDLER>::dump (void) const
-{
- ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::dump");
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Creation_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_Singleton_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_DLL_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_Concurrency_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_Connect_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_Process_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_Accept_Strategy)
-ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Strategy)
-
-#endif /* ACE_STRATEGIES_T_C */
diff --git a/ace/Strategies_T.h b/ace/Strategies_T.h
deleted file mode 100644
index 2f3e2669fbf..00000000000
--- a/ace/Strategies_T.h
+++ /dev/null
@@ -1,914 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ACE_Strategies_T.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_STRATEGIES_T_H
-#define ACE_STRATEGIES_T_H
-#include "ace/pre.h"
-
-#include "ace/Strategies.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Service_Config.h"
-#include "ace/Reactor.h"
-#include "ace/Synch_Options.h"
-#include "ace/Thread_Manager.h"
-#include "ace/Hash_Map_Manager.h"
-
-// Needed for broken linkers that can't grok long symbols.
-#define ACE_Refcounted_Hash_Recyclable ARHR
-
-template<class SVC_HANDLER>
-class ACE_Recycling_Strategy
-{
- // = TITLE
- // Defines the interface (and default implementation) for
- // specifying a recycling strategy for a SVC_HANDLER.
- //
- // = DESCRIPTION
- // Acts as a consular to the Svc_Handler, preparing it for the
- // tough times ahead when the Svc_Handler will be recycled.
-public:
- virtual ~ACE_Recycling_Strategy (void);
- // Virtual Destructor
-
- virtual int assign_recycler (SVC_HANDLER *svc_handler,
- ACE_Connection_Recycling_Strategy *recycler,
- const void *recycling_act);
- // Tell the Svc_Handler something about the recycler, so that it can
- // reach the recycler when necessary.
-
- virtual int prepare_for_recycling (SVC_HANDLER *svc_handler);
- // This allows us to prepare the svc_handler for recycling.
-};
-
-template <class SVC_HANDLER>
-class ACE_Creation_Strategy
-{
- // = TITLE
- // Defines the interface for specifying a creation strategy for
- // a SVC_HANDLER.
- //
- // = DESCRIPTION
- // The default behavior is to make a new SVC_HANDLER. However,
- // subclasses can override this strategy to perform SVC_HANDLER
- // creation in any way that they like (such as creating subclass
- // instances of SVC_HANDLER, using a singleton, dynamically
- // linking the handler, etc.).
-public:
- // = Initialization and termination methods.
-
- ACE_Creation_Strategy (ACE_Thread_Manager * = 0);
- // Default constructor.
-
- int open (ACE_Thread_Manager * = 0);
- // A <Thread_Manager> is useful when creating active objects.
-
- virtual ~ACE_Creation_Strategy (void);
-
- // = Factory method.
- virtual int make_svc_handler (SVC_HANDLER *&sh);
- // Create a SVC_HANDLER with the appropriate creation strategy. The
- // default behavior of this method is to make a new <SVC_HANDLER> if
- // <sh> == 0 (passing in the <Thread_Manager>), else <sh> is
- // unchanged. Returns -1 on failure, else 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_Thread_Manager *thr_mgr_;
- // Pointer to a thread manager.
-};
-
-template <class SVC_HANDLER>
-class ACE_Singleton_Strategy : public ACE_Creation_Strategy<SVC_HANDLER>
-{
- // = TITLE
- // Defines the interface for specifying a creation strategy for
- // a <SVC_HANDLER> that always returns the same <SVC_HANDLER> (i.e.,
- // it's a Singleton).
- //
- // = DESCRIPTION
- // Note that this class takes over the ownership of the
- // SVC_HANDLER passed into it as a parameter and it becomes
- // responsible for deleting this object.
-public:
- // = Initialization and termination methods.
- ACE_Singleton_Strategy (SVC_HANDLER * = 0,
- ACE_Thread_Manager * = 0);
- int open (SVC_HANDLER *,
- ACE_Thread_Manager * = 0);
- virtual ~ACE_Singleton_Strategy (void);
-
- // = Factory method.
- virtual int make_svc_handler (SVC_HANDLER *&);
- // Create a Singleton SVC_HANDLER by always returning the same
- // SVC_HANDLER. Returns -1 on failure, else 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- SVC_HANDLER *svc_handler_;
- // Pointer to the Singleton svc_handler.
-
- int delete_svc_handler_;
- // Keep track of whether we need to delete the <SVC_HANDLER>.
-};
-
-template <class SVC_HANDLER>
-class ACE_DLL_Strategy : public ACE_Creation_Strategy<SVC_HANDLER>
-{
- // = TITLE
- // Defines the interface for specifying a creation strategy for
- // a SVC_HANDLER based on dynamic linking of the SVC_HANDLER.
-public:
- // = Intialization and termination methods.
-
- ACE_DLL_Strategy (void);
- // "Do-nothing" constructor.
-
- ACE_DLL_Strategy (const char dll_name[],
- const char factory_function[],
- const char svc_name[],
- ACE_Service_Repository *,
- ACE_Thread_Manager * = 0);
- // Initialize the DLL strategy based upon the service's DLL
- // information contained in the <svc_dll_info> string.
-
- int open (const char dll_name[],
- const char factory_function[],
- const char svc_name[],
- ACE_Service_Repository *,
- ACE_Thread_Manager * = 0);
- // Initialize the DLL strategy based upon the service's DLL
- // information contained in the <svc_dll_info> string.
-
- // = Factory method.
- virtual int make_svc_handler (SVC_HANDLER *&);
- // Create a SVC_HANDLER by dynamically linking it from a DLL.
- // Returns -1 on failure, else 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- typedef ACE_Creation_Strategy<SVC_HANDLER> inherited;
-
- char dll_name_[MAXPATHLEN + 1];
- // Name of the DLL to dynamically link.
-
- char factory_function_[MAXPATHLEN + 1];
- // Name of the factory function in the shared library to use to
- // obtain a pointer to the new SVC_HANDLER.
-
- char svc_name_[MAXNAMELEN + 1];
- // Name of the service.
-
- ACE_Service_Repository *svc_rep_;
- // Pointer to the <Service_Repository>.
-};
-
-template <class SVC_HANDLER>
-class ACE_Concurrency_Strategy
-{
- // = TITLE
- // Defines the interface for specifying a concurrency strategy
- // for a SVC_HANDLER.
- //
- // = DESCRIPTION
- // Default behavior is to activate the SVC_HANDLER by calling
- // its <open> method (which allows the SVC_HANDLER to define its
- // own concurrency strategy). However, subclasses can override
- // this default strategy to do more sophisticated concurrency
- // activations (such as creating the SVC_HANDLER as an active
- // object via multi-threading or multi-processing).
-public:
- ACE_Concurrency_Strategy (int flags = 0);
- // Constructor
-
- // = Factory method.
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler,
- void *arg = 0);
- // Activate the <svc_handler> with an appropriate concurrency
- // strategy. The default behavior of this method is to activate the
- // SVC_HANDLER by calling its <open> method (which allows the
- // SVC_HANDLER to define its own concurrency strategy).
-
- virtual ~ACE_Concurrency_Strategy (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
-
- int flags_;
- // Flags that are parsed to set options for the connected
- // <SVC_HANDLER>.
-};
-
-template <class SVC_HANDLER>
-class ACE_Reactive_Strategy : public ACE_Concurrency_Strategy <SVC_HANDLER>
-{
- // = TITLE
- // Defines the interface for specifying a Reactive concurrency
- // strategy for a SVC_HANDLER.
- //
- // = DESCRIPTION
- // This class provides a strategy that registers the
- // <SVC_HANDLER> with a <Reactor>.
-public:
- // = Intialization and termination methods.
- ACE_Reactive_Strategy (int flags = 0);
- // "Do-nothing constructor"
-
- ACE_Reactive_Strategy (ACE_Reactor *reactor,
- ACE_Reactor_Mask = ACE_Event_Handler::READ_MASK,
- int flags = 0);
- // Initialize the strategy.
-
- virtual int open (ACE_Reactor *reactor,
- ACE_Reactor_Mask = ACE_Event_Handler::READ_MASK,
- int flags = 0);
- // Initialize the strategy.
-
- virtual ~ACE_Reactive_Strategy (void);
- // Destructor.
-
- // = Factory method.
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler,
- void *arg = 0);
- // Activate the <svc_handler> by registering it with the <Reactor>
- // and then calling it's <open> hook.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- typedef ACE_Concurrency_Strategy<SVC_HANDLER> inherited;
-
- ACE_Reactor *reactor_;
- // Pointer to the Reactor we'll use to register the <SVC_HANDLER>.
-
- ACE_Reactor_Mask mask_;
- // The mask that we pass to the <Reactor> when we register the
- // <SVC_HANDLER>.
-};
-
-template <class SVC_HANDLER>
-class ACE_Thread_Strategy : public ACE_Concurrency_Strategy<SVC_HANDLER>
-{
- // = TITLE
- // Defines the interface for specifying a concurrency strategy
- // for a <SVC_HANDLER> based on multithreading.
- //
- // = DESCRIPTION
- // This class provides a strategy that manages the creation of
- // threads to handle requests from clients concurrently. It
- // behaves as a "thread factory", spawning threads "on-demand"
- // to run the service specified by a user-supplied
- // <SVC_HANDLER>.
-public:
- // = Intialization and termination methods.
- ACE_Thread_Strategy (int flags = 0);
- // "Do-nothing constructor"
-
- ACE_Thread_Strategy (ACE_Thread_Manager *tm,
- long thr_flags,
- size_t n_threads = 1,
- int flags = 0);
- // Initialize the strategy.
-
- virtual int open (ACE_Thread_Manager *tm,
- long thr_flags,
- size_t n_threads = 1,
- int flags = 0);
- // Initialize the strategy.
-
- virtual ~ACE_Thread_Strategy (void);
-
- // = Factory method.
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler,
- void *arg = 0);
- // Activate the <svc_handler> with an appropriate concurrency
- // strategy. This method activates the SVC_HANDLER by first calling
- // its <open> method and then calling its <activate> method to turn
- // it into an active object.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- typedef ACE_Concurrency_Strategy<SVC_HANDLER> inherited;
-
- ACE_Thread_Manager *thr_mgr_;
- // Thread manager for this class (must be provided).
-
- long thr_flags_;
- // Flags to pass into the <SVC_HANDLER::activate> method.
-
- size_t n_threads_;
- // Number of threads to spawn.
-};
-
-template <class SVC_HANDLER>
-class ACE_Process_Strategy : public ACE_Concurrency_Strategy<SVC_HANDLER>
-{
- // = TITLE
- // Defines the interface for specifying a concurrency strategy
- // for a <SVC_HANDLER> based on multiprocessing.
- //
- // = DESCRIPTION
- // This class provides a strategy that manages the creation of
- // processes to handle requests from clients concurrently. It
- // behaves as a "process factory", using <ACE::fork> to fork
- // threads "on-demand" to run the service specified by a
- // user-supplied <SVC_HANDLER> in a separate process.
-public:
- // = Intialization and termination methods.
-
- ACE_Process_Strategy (size_t n_processes = 1,
- ACE_Event_Handler *acceptor = 0,
- ACE_Reactor * = 0,
- int avoid_zombies = 0);
- // Initialize the strategy. If <avoid_zombies> is non-0 then set a
- // flag to <ACE::fork> to avoid zombies.
-
- virtual int open (size_t n_processes = 1,
- ACE_Event_Handler *acceptor = 0,
- ACE_Reactor * = 0,
- int avoid_zombies = 0);
- // Initialize the strategy. If <avoid_zombies> is non-0 then set a
- // flag to <ACE::fork> to avoid zombies.
-
- virtual ~ACE_Process_Strategy (void);
-
- // = Factory method.
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler,
- void *arg = 0);
- // Activate the <svc_handler> with an appropriate concurrency
- // strategy. This method activates the SVC_HANDLER by first forking
- // and then calling the <open> method of the SVC_HANDLER in the
- // child.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- typedef ACE_Concurrency_Strategy<SVC_HANDLER> inherited;
-
- size_t n_processes_;
- // Number of processes to spawn.
-
- ACE_Event_Handler *acceptor_;
- // This is the <Acceptor> in the parent is listening on. We need to
- // make sure that we remove it from the Reactor and close it down in
- // the child.
-
- ACE_Reactor *reactor_;
- // This is the <Reactor> the child is using in conjunction with the
- // <Acceptor>. We need to remove the <Acceptor> from this <Reactor>
- // in the child.
-};
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
-class ACE_Accept_Strategy
-{
- // = TITLE
- // Defines the interface for specifying a passive connection
- // acceptance strategy for a SVC_HANDLER.
- //
- // = DESCRIPTION
- // This class provides a strategy that manages passive
- // connection acceptance of a client.
-public:
- // = Initialization and termination methods.
- ACE_Accept_Strategy (ACE_Reactor *reactor = ACE_Reactor::instance ());
- // Default constructor.
-
- ACE_Accept_Strategy (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
- int restart = 0,
- ACE_Reactor *reactor = ACE_Reactor::instance ());
- // Initialize the <peer_acceptor_> with <local_addr>.
-
- virtual int open (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
- int restart = 0);
- // Initialize the <peer_acceptor_> with <local_addr>.
-
- virtual ACE_HANDLE get_handle (void) const;
- // Return the underlying ACE_HANDLE of the <peer_acceptor_>.
-
- virtual ACE_PEER_ACCEPTOR &acceptor (void) const;
- // Return a reference to the <peer_acceptor_>.
-
- virtual ~ACE_Accept_Strategy (void);
-
- // = Factory method.
- virtual int accept_svc_handler (SVC_HANDLER *);
- // The default behavior delegates to the <accept> method of the
- // PEER_ACCEPTOR.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_PEER_ACCEPTOR acceptor_;
- // Factory that establishes connections passively.
-
- ACE_Reactor *reactor_;
- // Pointer to the reactor used by the Acceptor.
-};
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1>
-class ACE_Connect_Strategy
-{
- // = TITLE
- // Defines the interface for specifying an active
- // connection establishment strategy for a SVC_HANDLER.
- //
- // = DESCRIPTION
- // This class provides a strategy that manages active
- // connection establishment to a server.
-public:
- // = Initialization and termination methods.
- ACE_Connect_Strategy (void);
- // Default constructor.
-
- virtual ACE_PEER_CONNECTOR &connector (void) const;
- // Return a reference to the <peer_connector_>.
-
- virtual ~ACE_Connect_Strategy (void);
-
- // = Factory method.
- virtual int connect_svc_handler (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- // The default behavior delegates to the <connect> method of the
- // <PEER_CONNECTOR::connect>.
-
- virtual int connect_svc_handler (SVC_HANDLER *&sh,
- SVC_HANDLER *&sh_copy,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- // The default behavior delegates to the <connect> method of the
- // <PEER_CONNECTOR::connect>.
- // Please check the documentation in Connector.h for more details.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_PEER_CONNECTOR connector_;
- // Factory that establishes connections actively.
-};
-
-template <class SVC_HANDLER>
-class ACE_Scheduling_Strategy
-{
- // = TITLE
- // Defines the interface for specifying how to suspend and
- // resume a service .
- //
- // = DESCRIPTION
- // This class provides a strategy that allows arbitrarily
- // sophisticated service suspension and resumption. The default
- // behavior is to do nothing...
-public:
- // = Initialization and termination methods.
-
- ACE_Scheduling_Strategy (SVC_HANDLER * = 0);
- // Constructor
-
- virtual ~ACE_Scheduling_Strategy (void);
- // Destructor
-
- // = Scheduling methods
-
- virtual int suspend (void);
- // Suspend hook.
-
- virtual int resume (void);
- // Resume hook.
-
- virtual void dump (void) const;
- // Dump the state of the object.
-};
-
-template <class SVC_HANDLER>
-class ACE_Schedule_All_Reactive_Strategy : public ACE_Scheduling_Strategy<SVC_HANDLER>
-{
- // = TITLE
- // Defines the interface for specifying how to suspend and
- // resume a single-threaded reactive service .
- //
- // = DESCRIPTION
- // This class provides a strategy that suspends and resumes all
- // the Event_Handlers in a Reactor in one fell swoop.
-public:
- // = Initialization and termination methods.
- ACE_Schedule_All_Reactive_Strategy (SVC_HANDLER * = 0);
- // Constructor
-
- // = Scheduling methods
-
- virtual int suspend (void);
- // Suspend hook.
-
- virtual int resume (void);
- // Resume hook.
-
- virtual void dump (void) const;
- // Dump the state of the object.
-
-protected:
-
- ACE_Reactor *reactor_;
- // Thread Manager
-};
-
-template <class SVC_HANDLER>
-class ACE_Schedule_All_Threaded_Strategy : public ACE_Scheduling_Strategy<SVC_HANDLER>
-{
- // = TITLE
- // Defines the interface for specifying how to suspend and
- // resume a multithreaded service .
- //
- // = DESCRIPTION
- // This class provides a strategy that suspends and resumes all
- // the Event_Handlers controlled by a Thread_Manager in one fell swoop.
-public:
- // = Initialization and termination methods.
- ACE_Schedule_All_Threaded_Strategy (SVC_HANDLER * = 0);
- // Constructor
-
- // = Scheduling methods
-
- virtual int suspend (void);
- // Suspend hook.
-
- virtual int resume (void);
- // Resume hook.
-
- virtual void dump (void) const;
- // Dump the state of the object.
-
-protected:
-
- ACE_Thread_Manager *thr_mgr_;
- // Thread Manager
-};
-
-template <class SVC_HANDLER>
-class ACE_NOOP_Creation_Strategy : public ACE_Creation_Strategy<SVC_HANDLER>
-{
- // = TITLE
- // Implements a no-op creation strategy in order to defer
- // decisions regarding creation to some later point in time, such
- // as in connect or accept strategy.
- //
- // = DESCRIPTION
- // An example of the use of this is in the
- // <ACE_Cached_Connect_Strategy>, which only returns a single
- // connection for a given endpoint.
-public:
- virtual int make_svc_handler (SVC_HANDLER *&);
- // This is a no-op.
-};
-
-template <class SVC_HANDLER>
-class ACE_NOOP_Concurrency_Strategy : public ACE_Concurrency_Strategy<SVC_HANDLER>
-{
- // = TITLE
- // Implements a no-op activation strategy in order to avoid
- // calling open on a svc_handler multiple times.
- //
- // = DESCRIPTION
- // An example of the use of this is in the
- // <ACE_Cached_Connect_Strategy>, which reuses svc_handlers.
- // Therefore we don't want to call open on the recycled
- // svc_handler more than once.
-public:
- // = Factory method.
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler,
- void *arg = 0);
- // This is a no-op.
-};
-
-template <class T>
-class ACE_Refcounted_Hash_Recyclable : public ACE_Refcountable,
- public ACE_Hashable,
- public ACE_Recyclable
-{
-public:
- ACE_Refcounted_Hash_Recyclable (void);
- // Default constructor.
-
- ACE_Refcounted_Hash_Recyclable (const T &t,
- int refcount = 0,
- ACE_Recyclable_State state = ACE_RECYCLABLE_UNKNOWN);
- // Constructor.
-
- virtual ~ACE_Refcounted_Hash_Recyclable (void);
- // Destructor
-
- int operator== (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const;
- int operator!= (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const;
- // Compares two instances.
-
- T &subject ();
-
-protected:
- u_long hash_i (void) const;
- // Computes and returns hash value.
-
- T t_;
-};
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX>
-class ACE_Cached_Connect_Strategy : public ACE_Connection_Recycling_Strategy, public ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
-{
- // = TITLE
- // A connection strategy which caches connections to peers
- // (represented by <SVC_HANDLER> instances), thereby allowing
- // subsequent re-use of unused, but available, connections.
- //
- // = DESCRIPTION
- // <ACE_Cached_Connect_Strategy> is intended to be used as a
- // plug-in connection strategy for <ACE_Strategy_Connector>.
- // It's added value is re-use of established connections.
-public:
-
- typedef ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX> SELF;
-
- ACE_Cached_Connect_Strategy (ACE_Creation_Strategy<SVC_HANDLER> *cre_s = 0,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s = 0,
- ACE_Recycling_Strategy<SVC_HANDLER> *rec_s = 0,
- MUTEX *mutex = 0,
- int delete_mutex = 0);
- // Constructor
-
- virtual ~ACE_Cached_Connect_Strategy (void);
- // Destructor
-
- virtual int open (ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
- ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
- ACE_Recycling_Strategy<SVC_HANDLER> *rec_s);
- // This methods allow you to change the strategies used by the
- // cached connector.
-
- virtual int make_svc_handler (SVC_HANDLER *&sh);
- // Template method for making a new <svc_handler>
-
- virtual int activate_svc_handler (SVC_HANDLER *svc_handler);
- // Template method for activating a new <svc_handler>
-
- virtual int assign_recycler (SVC_HANDLER *svc_handler,
- ACE_Connection_Recycling_Strategy *recycler,
- const void *recycling_act);
- // Template method for setting the recycler information of the
- // svc_handler.
-
- virtual int prepare_for_recycling (SVC_HANDLER *svc_handler);
- // Template method for preparing the svc_handler for recycling.
-
- virtual int connect_svc_handler (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- virtual int connect_svc_handler (SVC_HANDLER *&sh,
- SVC_HANDLER *&sh_copy,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- // Checks to see if there is already a <SVC_HANDLER> in the cache
- // connected to the <remote_addr>. If so, we return this pointer.
- // Otherwise we establish the connection, put it into the cache, and
- // return the <SVC_HANDLER> pointer. <[NOTE]>: the <{reuse_addr}>
- // argument does NOT control re-use of addresses in the cache.
- // Rather, if the underlying protocol requires a "dead time" prior
- // to re-use of its addresses (TCP is a classic example of this),
- // <{and}> the protocol provides a means by which to defeat the dead
- // time, setting this argument to non-zero will defeat the dead-time
- // requirement. <{Dev. Note: We might want to consider enhancing
- // the interface at some point so that this also controls re-use of
- // the cache.}>
-
- virtual int purge (const void *recycling_act);
- // Remove from cache.
-
- virtual int cache (const void *recycling_act);
- // Add to cache.
-
- virtual int recycle_state (const void *recycling_act,
- ACE_Recyclable_State new_state);
- virtual ACE_Recyclable_State recycle_state (const void *recycling_act) const;
- // Get/Set <recycle_state>.
-
- virtual int mark_as_closed (const void *recycling_act);
- // Mark as closed.
-
- virtual int mark_as_closed_i (const void *recycling_act);
- // Mark as closed (non-locking version). This method needs to be public
- // as it is used in the cleanup of handlers where teh locked version causes
- // a deadlock.
-
- virtual int cleanup_hint (const void *recycling_act,
- void **act_holder = 0);
- // Cleanup hint and reset <*act_holder> to zero if <act_holder != 0>.
-
- // = Define some useful typedefs.
- typedef ACE_Creation_Strategy<SVC_HANDLER>
- CREATION_STRATEGY;
- typedef ACE_Concurrency_Strategy<SVC_HANDLER>
- CONCURRENCY_STRATEGY;
- typedef ACE_Recycling_Strategy<SVC_HANDLER>
- RECYCLING_STRATEGY;
-
- // = Super class
- typedef ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>
- CONNECT_STRATEGY;
-
- // = Typedefs for managing the map
- typedef ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>
- REFCOUNTED_HASH_RECYCLABLE_ADDRESS;
- typedef ACE_Hash_Map_Manager<REFCOUNTED_HASH_RECYCLABLE_ADDRESS, SVC_HANDLER *, ACE_Null_Mutex>
- CONNECTION_MAP;
- typedef ACE_Hash_Map_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDRESS, SVC_HANDLER *, ACE_Null_Mutex>
- CONNECTION_MAP_ITERATOR;
- typedef ACE_Hash_Map_Entry<REFCOUNTED_HASH_RECYCLABLE_ADDRESS, SVC_HANDLER *>
- CONNECTION_MAP_ENTRY;
-
- typedef ACE_Reverse_Lock<MUTEX> REVERSE_MUTEX;
-
- // = Strategy accessors
- virtual ACE_Creation_Strategy<SVC_HANDLER> *creation_strategy (void) const;
- virtual ACE_Recycling_Strategy<SVC_HANDLER> *recycling_strategy (void) const;
- virtual ACE_Concurrency_Strategy<SVC_HANDLER> *concurrency_strategy (void) const;
-
-protected:
-
- virtual int new_connection (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms);
- // Creates a new connection.
-
- int find (ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR> &search_addr,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, SVC_HANDLER *> *&entry);
- // Find an idle handle.
-
- virtual int purge_i (const void *recycling_act);
- // Remove from cache (non-locking version).
-
- virtual int cache_i (const void *recycling_act);
- // Add to cache (non-locking version).
-
- virtual int recycle_state_i (const void *recycling_act,
- ACE_Recyclable_State new_state);
- virtual ACE_Recyclable_State recycle_state_i (const void *recycling_act) const;
- // Get/Set <recycle_state> (non-locking version).
-
- virtual int cleanup_hint_i (const void *recycling_act,
- void **act_holder);
- // Cleanup hint and reset <*act_holder> to zero if <act_holder != 0>.
-
- // = Helpers
- int check_hint_i (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, SVC_HANDLER *> *&entry,
- int &found);
-
- int find_or_create_svc_handler_i (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, SVC_HANDLER *> *&entry,
- int &found);
-
- virtual int connect_svc_handler_i (SVC_HANDLER *&sh,
- const ACE_PEER_CONNECTOR_ADDR &remote_addr,
- ACE_Time_Value *timeout,
- const ACE_PEER_CONNECTOR_ADDR &local_addr,
- int reuse_addr,
- int flags,
- int perms,
- int &found);
-
- CONNECTION_MAP connection_map_;
- // Table that maintains the cache of connected <SVC_HANDLER>s.
-
- MUTEX *lock_;
- // Mutual exclusion for this object.
-
- int delete_lock_;
- // Mutual exclusion for this object.
-
- REVERSE_MUTEX *reverse_lock_;
- // Reverse lock.
-
- // = Strategy objects.
-
- CREATION_STRATEGY *creation_strategy_;
- // Creation strategy for an <Connector>.
-
- int delete_creation_strategy_;
- // 1 if <Connector> created the creation strategy and thus should
- // delete it, else 0.
-
- CONCURRENCY_STRATEGY *concurrency_strategy_;
- // Concurrency strategy for an <Connector>.
-
- int delete_concurrency_strategy_;
- // 1 if <Connector> created the concurrency strategy and thus should
- // delete it, else 0.
-
- RECYCLING_STRATEGY *recycling_strategy_;
- // Recycling strategy for an <Connector>.
-
- int delete_recycling_strategy_;
- // 1 if <Connector> created the recycling strategy and thus should
- // delete it, else 0.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/Strategies_T.i"
-#endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Strategies_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Strategies_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_STRATEGIES_T_H */
diff --git a/ace/Strategies_T.i b/ace/Strategies_T.i
deleted file mode 100644
index 4816e2565bc..00000000000
--- a/ace/Strategies_T.i
+++ /dev/null
@@ -1,447 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-template<class SVC_HANDLER> ASYS_INLINE
-ACE_Recycling_Strategy<SVC_HANDLER>::~ACE_Recycling_Strategy (void)
-{
-}
-
-template<class SVC_HANDLER> ASYS_INLINE int
-ACE_Recycling_Strategy<SVC_HANDLER>::assign_recycler (SVC_HANDLER *svc_handler,
- ACE_Connection_Recycling_Strategy *recycler,
- const void *recycling_act)
-{
- svc_handler->recycler (recycler, recycling_act);
- return 0;
-}
-
-template<class SVC_HANDLER> ASYS_INLINE int
-ACE_Recycling_Strategy<SVC_HANDLER>::prepare_for_recycling (SVC_HANDLER *svc_handler)
-{
- return svc_handler->recycle ();
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Singleton_Strategy<SVC_HANDLER>::ACE_Singleton_Strategy (SVC_HANDLER *sh,
- ACE_Thread_Manager *tm)
- : svc_handler_ (0),
- delete_svc_handler_ (1)
-{
- ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::ACE_Singleton_Strategy");
- if (this->open (sh, tm) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Singleton_Strategy")));
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Singleton_Strategy<SVC_HANDLER>::~ACE_Singleton_Strategy (void)
-{
- ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::~ACE_Singleton_Strategy");
- if (this->delete_svc_handler_ != 0)
- delete this->svc_handler_;
-}
-
-// Create a Singleton SVC_HANDLER by always returning the same
-// SVC_HANDLER.
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_Singleton_Strategy<SVC_HANDLER>::make_svc_handler (SVC_HANDLER *&sh)
-{
- ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::make_svc_handler");
- sh = this->svc_handler_;
- return 0;
-}
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_Creation_Strategy<SVC_HANDLER>::open (ACE_Thread_Manager *thr_mgr)
-{
- ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::open");
- this->thr_mgr_ = thr_mgr;
- return 0;
-}
-
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Creation_Strategy<SVC_HANDLER>::ACE_Creation_Strategy (ACE_Thread_Manager *thr_mgr)
-{
- ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::ACE_Creation_Strategy");
- if (this->open (thr_mgr) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Creation_Strategy")));
-}
-
-// Default behavior is to make a new SVC_HANDLER, passing in the
-// Thread_Manager (if any).
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_Creation_Strategy<SVC_HANDLER>::make_svc_handler (SVC_HANDLER *&sh)
-{
- ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::make_svc_handler");
-
- if (sh == 0)
- ACE_NEW_RETURN (sh, SVC_HANDLER (this->thr_mgr_), -1);
- return 0;
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Creation_Strategy<SVC_HANDLER>::~ACE_Creation_Strategy (void)
-{
- ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::~ACE_Creation_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_DLL_Strategy<SVC_HANDLER>::ACE_DLL_Strategy (const char dll_name[],
- const char factory_function[],
- const char svc_name[],
- ACE_Service_Repository *svc_rep,
- ACE_Thread_Manager *thr_mgr)
-{
- ACE_TRACE ("ACE_DLL_Strategy<SVC_HANDLER>::ACE_DLL_Strategy");
- if (this->open (dll_name,
- factory_function,
- svc_name,
- svc_rep,
- thr_mgr) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("open")));
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_DLL_Strategy<SVC_HANDLER>::ACE_DLL_Strategy (void)
-{
- ACE_TRACE ("ACE_DLL_Strategy<SVC_HANDLER>::ACE_DLL_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Concurrency_Strategy<SVC_HANDLER>::ACE_Concurrency_Strategy (int flags)
- : flags_ (flags)
-{
- ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::~ACE_Concurrency_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Concurrency_Strategy<SVC_HANDLER>::~ACE_Concurrency_Strategy (void)
-{
- ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::~ACE_Concurrency_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy (ACE_Reactor *reactor,
- ACE_Reactor_Mask mask,
- int flags)
-{
- ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy");
-
- if (this->open (reactor,
- mask,
- flags) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy")));
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy (int flags)
- : ACE_Concurrency_Strategy<SVC_HANDLER> (flags),
- reactor_ (0),
- mask_ (ACE_Event_Handler::NULL_MASK)
-{
- ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Reactive_Strategy<SVC_HANDLER>::~ACE_Reactive_Strategy (void)
-{
- ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::~ACE_Reactive_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy (ACE_Thread_Manager *thr_mgr,
- long thr_flags,
- size_t n_threads,
- int flags)
-{
- ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy");
-
- if (this->open (thr_mgr,
- thr_flags,
- n_threads,
- flags) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy")));
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy (int flags)
- : ACE_Concurrency_Strategy<SVC_HANDLER> (flags),
- thr_mgr_ (0),
- thr_flags_ (0),
- n_threads_ (1)
-{
- ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Thread_Strategy<SVC_HANDLER>::~ACE_Thread_Strategy (void)
-{
- ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::~ACE_Thread_Strategy");
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ASYS_INLINE int
-ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
- (const ACE_PEER_ACCEPTOR_ADDR &local_addr, int restart)
-{
- return this->acceptor_.open (local_addr, restart);
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ASYS_INLINE
-ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy (ACE_Reactor *reactor)
- : reactor_ (reactor)
-{
- ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy");
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ASYS_INLINE ACE_HANDLE
-ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle (void) const
-{
- ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle");
- return this->acceptor_.get_handle ();
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ASYS_INLINE ACE_PEER_ACCEPTOR &
-ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor (void) const
-{
- ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor");
- return (ACE_PEER_ACCEPTOR &) this->acceptor_;
-}
-
-template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ASYS_INLINE
-ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Accept_Strategy (void)
-{
- ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Accept_Strategy");
-
- if (this->acceptor_.close () == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("close")));
-}
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1> ASYS_INLINE ACE_PEER_CONNECTOR &
-ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::connector (void) const
-{
- ACE_TRACE ("ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::connector");
- return (ACE_PEER_CONNECTOR &) this->connector_;
-}
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1> ASYS_INLINE
-ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::ACE_Connect_Strategy (void)
-{
- ACE_TRACE ("ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::ACE_Connect_Strategy");
-}
-
-template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1> ASYS_INLINE
-ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::~ACE_Connect_Strategy (void)
-{
- ACE_TRACE ("ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::~ACE_Connect_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Process_Strategy<SVC_HANDLER>::ACE_Process_Strategy (size_t n_processes,
- ACE_Event_Handler *acceptor,
- ACE_Reactor *reactor,
- int avoid_zombies)
-{
- ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::ACE_Process_Strategy");
- if (this->open (n_processes,
- acceptor,
- reactor,
- avoid_zombies) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Process_Strategy")));
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Process_Strategy<SVC_HANDLER>::~ACE_Process_Strategy (void)
-{
- ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::~ACE_Process_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Scheduling_Strategy<SVC_HANDLER>::ACE_Scheduling_Strategy (SVC_HANDLER *)
-{
- ACE_TRACE ("ACE_Scheduling_Strategy<SVC_HANDLER>::ACE_Scheduling_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Scheduling_Strategy<SVC_HANDLER>::~ACE_Scheduling_Strategy (void)
-{
- ACE_TRACE ("ACE_Scheduling_Strategy<SVC_HANDLER>::~ACE_Scheduling_Strategy");
-}
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_Scheduling_Strategy<SVC_HANDLER>::suspend (void)
-{
- ACE_TRACE ("ACE_Scheduling_Strategy<SVC_HANDLER>::suspend");
- return -1;
-}
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_Scheduling_Strategy<SVC_HANDLER>::resume (void)
-{
- ACE_TRACE ("ACE_Scheduling_Strategy<SVC_HANDLER>::resume");
- return -1;
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::ACE_Schedule_All_Reactive_Strategy
- (SVC_HANDLER *scheduler)
- : ACE_Scheduling_Strategy<SVC_HANDLER> (scheduler)
-{
- ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::ACE_Schedule_All_Reactive_Strategy");
-
- if (scheduler == 0 || scheduler->reactor () == 0)
- this->reactor_ = ACE_Reactor::instance ();
- else
- this->reactor_ = scheduler->reactor ();
-}
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::suspend (void)
-{
- ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::suspend");
- return this->reactor_->suspend_handlers ();
-}
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::resume (void)
-{
- ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::resume");
- return this->reactor_->resume_handlers ();
-}
-
-template <class SVC_HANDLER> ASYS_INLINE
-ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::ACE_Schedule_All_Threaded_Strategy
- (SVC_HANDLER *scheduler)
- : ACE_Scheduling_Strategy<SVC_HANDLER> (scheduler)
-{
- ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::ACE_Schedule_All_Threaded_Strategy");
-
- if (scheduler == 0 || scheduler->thr_mgr () == 0)
- this->thr_mgr_ = ACE_Thread_Manager::instance ();
- else
- this->thr_mgr_ = scheduler->thr_mgr ();
-}
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::suspend (void)
-{
- ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::suspend");
- return this->thr_mgr_->suspend_all ();
-}
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::resume (void)
-{
- ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::resume");
- return this->thr_mgr_->resume_all ();
-}
-
-template <class T> ASYS_INLINE
-ACE_Refcounted_Hash_Recyclable<T>::ACE_Refcounted_Hash_Recyclable (void)
- : ACE_Refcountable (0),
- ACE_Hashable (),
- ACE_Recyclable (ACE_RECYCLABLE_UNKNOWN),
- t_ ()
-{
-}
-
-template <class T> ASYS_INLINE
-ACE_Refcounted_Hash_Recyclable<T>::ACE_Refcounted_Hash_Recyclable (const T &t,
- int refcount,
- ACE_Recyclable_State state)
- : ACE_Refcountable (refcount),
- ACE_Hashable (),
- ACE_Recyclable (state),
- t_ (t)
-{
-}
-
-template <class T> ASYS_INLINE
-ACE_Refcounted_Hash_Recyclable<T>::~ACE_Refcounted_Hash_Recyclable (void)
-{
-}
-
-template <class T> ASYS_INLINE u_long
-ACE_Refcounted_Hash_Recyclable<T>::hash_i (void) const
-{
- return this->t_.hash ();
-}
-
-template <class T> ASYS_INLINE T &
-ACE_Refcounted_Hash_Recyclable<T>::subject (void)
-{
- return this->t_;
-}
-
-template <class T> ASYS_INLINE int
-ACE_Refcounted_Hash_Recyclable<T>::operator== (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const
-{
- return this->recycle_state () == rhs.recycle_state () &&
- this->t_ == rhs.t_;
-}
-
-template <class T> ASYS_INLINE int
-ACE_Refcounted_Hash_Recyclable<T>::operator!= (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const
-{
- return !this->operator== (rhs);
-}
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_NOOP_Creation_Strategy<SVC_HANDLER>::make_svc_handler (SVC_HANDLER *&)
-{
- ACE_TRACE ("ACE_NOOP_Creation_Strategy<SVC_HANDLER>::make_svc_handler");
- return 0;
-}
-
-template <class SVC_HANDLER> ASYS_INLINE int
-ACE_NOOP_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *,
- void *)
-{
- ACE_TRACE ("ACE_NOOP_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler");
- return 0;
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> ASYS_INLINE int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::make_svc_handler
- (SVC_HANDLER *&sh)
-{
- return this->creation_strategy_->make_svc_handler (sh);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> ASYS_INLINE int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::activate_svc_handler
- (SVC_HANDLER *svc_handler)
-{
- return this->concurrency_strategy_->activate_svc_handler (svc_handler);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> ASYS_INLINE int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::assign_recycler
- (SVC_HANDLER *svc_handler,
- ACE_Connection_Recycling_Strategy *recycler,
- const void *recycling_act)
-{
- return this->recycling_strategy_->assign_recycler (svc_handler,
- recycler,
- recycling_act);
-}
-
-template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class MUTEX> ASYS_INLINE int
-ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX>::prepare_for_recycling
- (SVC_HANDLER *svc_handler)
-{
- return this->recycling_strategy_->prepare_for_recycling (svc_handler);
-}
diff --git a/ace/Stream.cpp b/ace/Stream.cpp
deleted file mode 100644
index 3e5b138a98a..00000000000
--- a/ace/Stream.cpp
+++ /dev/null
@@ -1,512 +0,0 @@
-// Stream.cpp
-// $Id$
-
-#ifndef ACE_STREAM_C
-#define ACE_STREAM_C
-
-//#include "ace/Module.h"
-#include "ace/Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Stream_Modules.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Stream.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Stream, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Stream)
-
-// Give some idea of what the heck is going on in a stream!
-
-template <ACE_SYNCH_DECL> void
-ACE_Stream<ACE_SYNCH_USE>::dump (void) const
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------- module links --------\n")));
-
- for (ACE_Module<ACE_SYNCH_USE> *mp = this->stream_head_;
- ;
- mp = mp->next ())
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("module name = %s\n"), mp->name ()));
- if (mp == this->stream_tail_)
- break;
- }
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------- writer links --------\n")));
-
- ACE_Task<ACE_SYNCH_USE> *tp;
-
- for (tp = this->stream_head_->writer ();
- ;
- tp = tp->next ())
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("writer queue name = %s\n"), tp->name ()));
- tp->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------\n")));
- if (tp == this->stream_tail_->writer ()
- || (this->linked_us_
- && tp == this->linked_us_->stream_head_->reader ()))
- break;
- }
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------- reader links --------\n")));
- for (tp = this->stream_tail_->reader (); ; tp = tp->next ())
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("reader queue name = %s\n"), tp->name ()));
- tp->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("-------\n")));
- if (tp == this->stream_head_->reader ()
- || (this->linked_us_
- && tp == this->linked_us_->stream_head_->writer ()))
- break;
- }
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::push (ACE_Module<ACE_SYNCH_USE> *new_top)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::push");
- if (this->push_module (new_top,
- this->stream_head_->next (),
- this->stream_head_) == -1)
- return -1;
- else
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::put (ACE_Message_Block *mb, ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::put");
- return this->stream_head_->writer ()->put (mb, tv);
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::get (ACE_Message_Block *&mb, ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::get");
- return this->stream_head_->reader ()->getq (mb, tv);
-}
-
-// Return the "top" ACE_Module in a ACE_Stream, skipping over the
-// stream_head.
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::top (ACE_Module<ACE_SYNCH_USE> *&m)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::top");
- if (this->stream_head_->next () == this->stream_tail_)
- return -1;
- else
- {
- m = this->stream_head_->next ();
- return 0;
- }
-}
-
-// Remove the "top" ACE_Module in a ACE_Stream, skipping over the
-// stream_head.
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::pop (int flags)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::pop");
- if (this->stream_head_->next () == this->stream_tail_)
- return -1;
- else
- {
- // Skip over the ACE_Stream head.
- ACE_Module<ACE_SYNCH_USE> *top_mod = this->stream_head_->next ();
- ACE_Module<ACE_SYNCH_USE> *new_top = top_mod->next ();
-
- this->stream_head_->next (new_top);
-
- // Close the top ACE_Module.
-
- top_mod->close (flags);
-
- // Don't delete the Module unless the flags request this.
- if (flags != ACE_Module<ACE_SYNCH_USE>::M_DELETE_NONE)
- delete top_mod;
-
- this->stream_head_->writer ()->next (new_top->writer ());
- new_top->reader ()->next (this->stream_head_->reader ());
- return 0;
- }
-}
-
-// Remove a named ACE_Module from an arbitrary place in the
-// ACE_Stream.
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::remove (const ACE_TCHAR *name,
- int flags)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::remove");
- ACE_Module<ACE_SYNCH_USE> *prev = 0;
-
- for (ACE_Module<ACE_SYNCH_USE> *mod = this->stream_head_;
- mod != 0;
- mod = mod->next ())
- if (ACE_OS::strcmp (mod->name (), name) == 0)
- {
- if (prev == 0) // Deleting ACE_Stream Head
- this->stream_head_->link (mod->next ());
- else
- prev->link (mod->next ());
-
- // Don't delete the Module unless the flags request this.
- if (flags != ACE_Module<ACE_SYNCH_USE>::M_DELETE_NONE)
- {
- // Close down the module and release the memory.
- mod->close (flags);
- delete mod;
- }
-
- return 0;
- }
- else
- prev = mod;
-
- return -1;
-}
-
-template <ACE_SYNCH_DECL> ACE_Module<ACE_SYNCH_USE> *
-ACE_Stream<ACE_SYNCH_USE>::find (const ACE_TCHAR *name)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::find");
- for (ACE_Module<ACE_SYNCH_USE> *mod = this->stream_head_;
- mod != 0;
- mod = mod->next ())
- if (ACE_OS::strcmp (mod->name (), name) == 0)
- return mod;
-
- return 0;
-}
-
-// Actually push a module onto the stack...
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::push_module (ACE_Module<ACE_SYNCH_USE> *new_top,
- ACE_Module<ACE_SYNCH_USE> *current_top,
- ACE_Module<ACE_SYNCH_USE> *head)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::push_module");
- ACE_Task<ACE_SYNCH_USE> *nt_reader = new_top->reader ();
- ACE_Task<ACE_SYNCH_USE> *nt_writer = new_top->writer ();
- ACE_Task<ACE_SYNCH_USE> *ct_reader = 0;
- ACE_Task<ACE_SYNCH_USE> *ct_writer = 0;
-
- if (current_top)
- {
- ct_reader = current_top->reader ();
- ct_writer = current_top->writer ();
- ct_reader->next (nt_reader);
- }
-
- nt_writer->next (ct_writer);
-
- if (head)
- {
- if (head != new_top)
- head->link (new_top);
- }
- else
- nt_reader->next (0);
-
- new_top->next (current_top);
-
- if (nt_reader->open (new_top->arg ()) == -1)
- return -1;
-
- if (nt_writer->open (new_top->arg ()) == -1)
- return -1;
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::open (void *a,
- ACE_Module<ACE_SYNCH_USE> *head,
- ACE_Module<ACE_SYNCH_USE> *tail)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::open");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- ACE_Task<ACE_SYNCH_USE> *h1 = 0, *h2 = 0;
- ACE_Task<ACE_SYNCH_USE> *t1 = 0, *t2 = 0;
-
- if (head == 0)
- {
- h1 = new ACE_Stream_Head<ACE_SYNCH_USE>;
- h2 = new ACE_Stream_Head<ACE_SYNCH_USE>;
- head = new ACE_Module<ACE_SYNCH_USE> (ACE_TEXT ("ACE_Stream_Head"),
- h1, h2,
- a,
- M_DELETE);
- }
-
- if (tail == 0)
- {
- t1 = new ACE_Stream_Tail<ACE_SYNCH_USE>;
- t2 = new ACE_Stream_Tail<ACE_SYNCH_USE>;
- tail = new ACE_Module<ACE_SYNCH_USE> (ACE_TEXT ("ACE_Stream_Tail"),
- t1, t2,
- a,
- M_DELETE);
- }
-
- // Make sure *all* the allocation succeeded!
- if (head == 0 && (h1 == 0 || h2 == 0)
- || tail == 0 && (t1 == 0 || t2 == 0))
- {
- delete h1;
- delete h2;
- delete t1;
- delete t2;
- delete head;
- delete tail;
- errno = ENOMEM;
- return -1;
- }
-
- this->stream_head_ = head;
- this->stream_tail_ = tail;
-
- if (this->push_module (this->stream_tail_) == -1)
- return -1;
- else if (this->push_module (this->stream_head_,
- this->stream_tail_,
- this->stream_head_) == -1)
- return -1;
- else
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::close (int flags)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::close");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- if (this->stream_head_ != 0
- && this->stream_tail_ != 0)
- {
- // Don't bother checking return value here.
- this->unlink_i ();
-
- int result = 0;
-
- // Remove and cleanup all the intermediate modules.
-
- while (this->stream_head_->next () != this->stream_tail_)
- if (this->pop (flags) == -1)
- result = -1;
-
- // Clean up the head and tail of the stream.
- if (this->stream_head_->close (flags) == -1)
- result = -1;
- if (this->stream_tail_->close (flags) == -1)
- result = -1;
-
- // Cleanup the memory.
- delete this->stream_head_;
- delete this->stream_tail_;
-
- this->stream_head_ = 0;
- this->stream_tail_ = 0;
-
- // Tell all threads waiting on the close that we are done.
- this->final_close_.broadcast ();
- return result;
- }
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::control (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd,
- void *a)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::control");
- ACE_IO_Cntl_Msg ioc (cmd);
-
- ACE_Message_Block *db;
-
- // Try to create a data block that contains the user-supplied data.
- ACE_NEW_RETURN (db,
- ACE_Message_Block (sizeof (int),
- ACE_Message_Block::MB_IOCTL,
- 0,
- (char *) a),
- -1);
- // Try to create a control block <cb> that contains the control
- // field and a pointer to the data block <db> in <cb>'s continuation
- // field.
- ACE_Message_Block *cb =
- new ACE_Message_Block (sizeof ioc,
- ACE_Message_Block::MB_IOCTL,
- db,
- (char *) &ioc);
-
- // If we can't allocate <cb> then we need to delete db and return
- // -1.
- if (cb == 0)
- {
- db->release ();
- errno = ENOMEM;
- return -1;
- }
-
- int result;
-
- if (this->stream_head_->writer ()->put (cb) == -1)
- result = -1;
- else if (this->stream_head_->reader ()->getq (cb) == -1)
- result = -1;
- else
- result = ((ACE_IO_Cntl_Msg *) cb->rd_ptr ())->rval ();
-
- // This will also release db if it's reference count == 0.
- cb->release ();
-
- return result;
-}
-
-// Link two streams together at their bottom-most Modules (i.e., the
-// one just above the Stream tail). Note that all of this is premised
-// on the fact that the Stream head and Stream tail are non-NULL...
-// This must be called with locks held.
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::link_i (ACE_Stream<ACE_SYNCH_USE> &us)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::link_i");
- this->linked_us_ = &us;
- // Make sure the other side is also linked to us!
- us.linked_us_ = this;
-
- ACE_Module<ACE_SYNCH_USE> *my_tail = this->stream_head_;
-
- if (my_tail == 0)
- return -1;
-
- // Locate the module just above our Stream tail.
- while (my_tail->next () != this->stream_tail_)
- my_tail = my_tail->next ();
-
- ACE_Module<ACE_SYNCH_USE> *other_tail = us.stream_head_;
-
- if (other_tail == 0)
- return -1;
-
- // Locate the module just above the other Stream's tail.
- while (other_tail->next () != us.stream_tail_)
- other_tail = other_tail->next ();
-
- // Reattach the pointers so that the two streams are linked!
- my_tail->writer ()->next (other_tail->reader ());
- other_tail->writer ()->next (my_tail->reader ());
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::link (ACE_Stream<ACE_SYNCH_USE> &us)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::link");
-
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
-
- return this->link_i (us);
-}
-
-// Must be called with locks held...
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::unlink_i (void)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::unlink_i");
-
- // Only try to unlink if we are in fact still linked!
-
- if (this->linked_us_ != 0)
- {
- ACE_Module<ACE_SYNCH_USE> *my_tail = this->stream_head_;
-
- // Only relink if we still exist!
- if (my_tail)
- {
- // Find the module that's just before our stream tail.
- while (my_tail->next () != this->stream_tail_)
- my_tail = my_tail->next ();
-
- // Restore the writer's next() link to our tail.
- my_tail->writer ()->next (this->stream_tail_->writer ());
- }
-
- ACE_Module<ACE_SYNCH_USE> *other_tail =
- this->linked_us_->stream_head_;
-
- // Only fiddle with the other side if it in fact still remains.
- if (other_tail != 0)
- {
- while (other_tail->next () != this->linked_us_->stream_tail_)
- other_tail = other_tail->next ();
-
- other_tail->writer ()->next (this->linked_us_->stream_tail_->writer ());
-
- }
-
- // Make sure the other side is also aware that it's been unlinked!
- this->linked_us_->linked_us_ = 0;
-
- this->linked_us_ = 0;
- return 0;
- }
- else
- return -1;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream<ACE_SYNCH_USE>::unlink (void)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::unlink");
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);
- return this->unlink_i ();
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Stream<ACE_SYNCH_USE>::ACE_Stream (void * a,
- ACE_Module<ACE_SYNCH_USE> *head,
- ACE_Module<ACE_SYNCH_USE> *tail)
- : linked_us_ (0),
- final_close_ (this->lock_)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::ACE_Stream");
- if (this->open (a, head, tail) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_Stream<ACE_SYNCH_USE>::open (%s, %s)\n"),
- head->name (), tail->name ()));
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Stream<ACE_SYNCH_USE>::~ACE_Stream (void)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::~ACE_Stream");
-
- if (this->stream_head_ != 0)
- this->close ();
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Stream_Iterator<ACE_SYNCH_USE>::ACE_Stream_Iterator (const ACE_Stream<ACE_SYNCH_USE> &sr)
- : next_ (sr.stream_head_)
-{
- ACE_TRACE ("ACE_Stream_Iterator<ACE_SYNCH_USE>::ACE_Stream_Iterator");
-}
-
-#endif /* ACE_STREAM_C */
diff --git a/ace/Stream.h b/ace/Stream.h
deleted file mode 100644
index a2839fb11be..00000000000
--- a/ace/Stream.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Stream.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_STREAM_H
-#define ACE_STREAM_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/IO_Cntl_Msg.h"
-#include "ace/Message_Block.h"
-#include "ace/Time_Value.h"
-#include "ace/Module.h"
-
-// Forward decls.
-template<ACE_SYNCH_DECL> class ACE_Stream_Iterator;
-
-template <ACE_SYNCH_DECL>
-class ACE_Stream
-{
- // = TITLE
- // This class is the primary abstraction for the ASX framework.
- // It is moduled after System V Stream.
- //
- // = DESCRIPTION
- // A Stream consists of a stack of <ACE_Modules>, each of which
- // contains two <ACE_Tasks>. Even though the methods in this
- // class are virtual, this class isn't really intended for
- // subclassing unless you know what you are doing. In
- // particular, the <ACE_Stream> destructor calls <close>, which
- // won't be overridden properly unless you call it in a subclass
- // destructor.
-public:
- friend class ACE_Stream_Iterator<ACE_SYNCH_USE>;
-
- enum
- {
- M_DELETE = 3
- // Indicates that <close> deletes the Tasks. Don't change this
- // value without updating the same enum in class ACE_Module...
- };
-
- // = Initializatation and termination methods.
- ACE_Stream (void *arg = 0,
- ACE_Module<ACE_SYNCH_USE> *head = 0,
- ACE_Module<ACE_SYNCH_USE> *tail = 0);
- // Create a Stream consisting of <head> and <tail> as the Stream
- // head and Stream tail, respectively. If these are 0 then the
- // <ACE_Stream_Head> and <ACE_Stream_Tail> are used, respectively.
- // <arg> is the value past in to the <open> methods of the tasks.
-
- virtual int open (void *arg,
- ACE_Module<ACE_SYNCH_USE> *head = 0,
- ACE_Module<ACE_SYNCH_USE> *tail = 0);
- // Create a Stream consisting of <head> and <tail> as the Stream
- // head and Stream tail, respectively. If these are 0 then the
- // <ACE_Stream_Head> and <ACE_Stream_Tail> are used, respectively.
- // <arg> is the value past in to the <open> methods of the tasks.
-
- virtual int close (int flags = M_DELETE);
- // Close down the stream and release all the resources.
-
- virtual ~ACE_Stream (void);
- // Close down the stream and release all the resources.
-
- // = ACE_Stream plumbing operations
-
- virtual int push (ACE_Module<ACE_SYNCH_USE> *mod);
- // Add a new module <mod> right below the Stream head.
-
- virtual int pop (int flags = M_DELETE);
- // Remove the <mod> right below the Stream head and close it down.
-
- virtual int top (ACE_Module<ACE_SYNCH_USE> *&mod);
- // Return the top module on the stream (right below the stream
- // head).
-
- virtual int remove (const ACE_TCHAR *mod,
- int flags = M_DELETE);
- // Remove the named module <mod> from the stream. This bypasses the
- // strict LIFO ordering of <push> and <pop>.
-
- virtual ACE_Module<ACE_SYNCH_USE> *head (void);
- // Return current stream head.
-
- virtual ACE_Module<ACE_SYNCH_USE> *tail (void);
- // Return current stream tail.
-
- virtual ACE_Module<ACE_SYNCH_USE> *find (const ACE_TCHAR *mod);
- // Find a particular ACE_Module.
-
- virtual int link (ACE_Stream<ACE_SYNCH_USE> &);
- // Create a pipe between two Streams.
-
- virtual int unlink (void);
- // Remove a pipe formed between two Streams.
-
- // = Blocking data transfer operations
- virtual int put (ACE_Message_Block *mb,
- ACE_Time_Value *timeout = 0);
- // Send the message <mb> down the stream, starting at the Module
- // below the Stream head. Wait for upto <timeout> amount of time
- // for the operation to complete (or block forever if <timeout> ==
- // 0).
-
- virtual int get (ACE_Message_Block *&mb,
- ACE_Time_Value *timeout = 0);
- // Read the message <mb> that is stored in the the stream head.
- // Wait for upto <timeout> amount of time for the operation to
- // complete (or block forever if <timeout> == 0).
-
- virtual int control (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd,
- void *args);
- // Send control message down the stream.
-
- virtual int wait (void);
- // Synchronize with the final close of the stream.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int unlink_i (void);
- // Actually perform the unlinking of two Streams (must be called
- // with locks held).
-
- int link_i (ACE_Stream<ACE_SYNCH_USE> &);
- // Actually perform the linking of two Streams (must be called with
- // locks held).
-
- int push_module (ACE_Module<ACE_SYNCH_USE> *,
- ACE_Module<ACE_SYNCH_USE> * = 0,
- ACE_Module<ACE_SYNCH_USE> * = 0);
- // Must a new module onto the Stream.
-
- ACE_Module<ACE_SYNCH_USE> *stream_head_;
- // Pointer to the head of the stream.
-
- ACE_Module<ACE_SYNCH_USE> *stream_tail_;
- // Pointer to the tail of the stream.
-
- ACE_Stream<ACE_SYNCH_USE> *linked_us_;
- // Pointer to an adjoining linked stream.
-
- // = Synchronization objects used for thread-safe streams.
- ACE_SYNCH_MUTEX_T lock_;
- // Protect the stream against race conditions.
-
- ACE_SYNCH_CONDITION_T final_close_;
- // Use to tell all threads waiting on the close that we are done.
-};
-
-template <ACE_SYNCH_DECL>
-class ACE_Stream_Iterator
-{
- // = TITLE
- // Iterate through an <ACE_Stream>.
-public:
- // = Initialization method.
- ACE_Stream_Iterator (const ACE_Stream<ACE_SYNCH_USE> &sr);
-
- // = Iteration methods.
-
- int next (const ACE_Module<ACE_SYNCH_USE> *&next_item);
- // Pass back the <next_item> that hasn't been seen in the set.
- // Returns 0 when all items have been seen, else 1.
-
- int done (void) const;
- // Returns 1 when all items have been seen, else 0.
-
- int advance (void);
- // Move forward by one element in the set. Returns 0 when all the
- // items in the set have been seen, else 1.
-
-private:
- ACE_Module<ACE_SYNCH_USE> *next_;
- // Next <Module> that we haven't yet seen.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Stream.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Stream.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Stream.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_STREAM_H */
diff --git a/ace/Stream.i b/ace/Stream.i
deleted file mode 100644
index 42a4989eff0..00000000000
--- a/ace/Stream.i
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Stream.i
-
-template <ACE_SYNCH_DECL> ACE_INLINE ACE_Module<ACE_SYNCH_USE> *
-ACE_Stream<ACE_SYNCH_USE>::head (void)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::head");
- return this->stream_head_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE ACE_Module<ACE_SYNCH_USE> *
-ACE_Stream<ACE_SYNCH_USE>::tail (void)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::tail");
- return this->stream_tail_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Stream<ACE_SYNCH_USE>::wait (void)
-{
- ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE>::wait");
- return this->final_close_.wait ();
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Stream_Iterator<ACE_SYNCH_USE>::next (const ACE_Module<ACE_SYNCH_USE> *&mod)
-{
- ACE_TRACE ("ACE_Stream_Iterator<ACE_SYNCH_USE>::next");
- mod = this->next_;
- return this->next_ != 0;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Stream_Iterator<ACE_SYNCH_USE>::done (void) const
-{
- ACE_TRACE ("ACE_Stream_Iterator<ACE_SYNCH_USE>::done");
- return this->next_ == 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Iterator<ACE_SYNCH_USE>::advance (void)
-{
- ACE_TRACE ("ACE_Stream_Iterator<ACE_SYNCH_USE>::advance");
- this->next_ = this->next_->next ();
- return this->next_ != 0;
-}
-
diff --git a/ace/Stream_Modules.cpp b/ace/Stream_Modules.cpp
deleted file mode 100644
index 5927820d9cc..00000000000
--- a/ace/Stream_Modules.cpp
+++ /dev/null
@@ -1,369 +0,0 @@
-// Stream_Modules.cpp
-// $Id$
-
-#ifndef ACE_STREAM_MODULES_C
-#define ACE_STREAM_MODULES_C
-
-#include "ace/Stream_Modules.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID(ace, Stream_Modules, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Head)
-
-template <ACE_SYNCH_DECL>
-ACE_Stream_Head<ACE_SYNCH_USE>::ACE_Stream_Head (void)
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::ACE_Stream_Head");
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Stream_Head<ACE_SYNCH_USE>::~ACE_Stream_Head (void)
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::~ACE_Stream_Head");
-}
-
-template <ACE_SYNCH_DECL> void
-ACE_Stream_Head<ACE_SYNCH_USE>::dump (void) const
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::dump");
-}
-
-// ACE_Module that act as the head and tail of a Stream.
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::open (void *)
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::open");
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::close (u_long)
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::close");
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::svc (void)
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::svc");
- return -1;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::control (ACE_Message_Block *mb)
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::control");
- ACE_IO_Cntl_Msg *ioc = (ACE_IO_Cntl_Msg *) mb->rd_ptr ();
- ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd;
-
- switch (cmd = ioc->cmd ())
- {
- case ACE_IO_Cntl_Msg::SET_LWM:
- case ACE_IO_Cntl_Msg::SET_HWM:
- this->water_marks (cmd, *(size_t *) mb->cont ()->rd_ptr ());
- ioc->rval (0);
- break;
- default:
- return 0;
- }
- return ioc->rval ();
-}
-
-// Performs canonical flushing at the ACE_Stream Head.
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::canonical_flush (ACE_Message_Block *mb)
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::canonical_flush");
- char *cp = mb->rd_ptr ();
-
- if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHR))
- {
- this->flush (ACE_Task_Flags::ACE_FLUSHALL);
- ACE_CLR_BITS (*cp, ACE_Task_Flags::ACE_FLUSHR);
- }
-
- if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHW))
- return this->reply (mb);
- else
- mb->release ();
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::put (ACE_Message_Block *mb,
- ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::put");
- int res = 0;
-
- if (mb->msg_type () == ACE_Message_Block::MB_IOCTL
- && (res = this->control (mb)) == -1)
- return res;
-
- if (this->is_writer ())
- return this->put_next (mb, tv);
- else // this->is_reader ()
- {
- switch (mb->msg_type ())
- {
- case ACE_Message_Block::MB_FLUSH:
- return this->canonical_flush (mb);
- default:
- break;
- }
-
- return this->putq (mb, tv);
- }
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::init (int, ACE_TCHAR *[])
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::init");
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::info (ACE_TCHAR **strp, size_t length) const
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::info");
- const ACE_TCHAR *name = this->name ();
-
- if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*strp, name, length);
- return ACE_OS::strlen (name);
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Head<ACE_SYNCH_USE>::fini (void)
-{
- ACE_TRACE ("ACE_Stream_Head<ACE_SYNCH_USE>::fini");
- return 0;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Tail)
-
-template <ACE_SYNCH_DECL>
-ACE_Stream_Tail<ACE_SYNCH_USE>::ACE_Stream_Tail (void)
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::ACE_Stream_Tail");
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Stream_Tail<ACE_SYNCH_USE>::~ACE_Stream_Tail (void)
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::~ACE_Stream_Tail");
-}
-
-template <ACE_SYNCH_DECL> void
-ACE_Stream_Tail<ACE_SYNCH_USE>::dump (void) const
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::dump");
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::open (void *)
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::open");
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::close (u_long)
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::close");
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::svc (void)
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::svc");
- return -1;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::control (ACE_Message_Block *mb)
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::control");
- ACE_IO_Cntl_Msg *ioc = (ACE_IO_Cntl_Msg *) mb->rd_ptr ();
- ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd;
-
- switch (cmd = ioc->cmd ())
- {
- case ACE_IO_Cntl_Msg::SET_LWM:
- case ACE_IO_Cntl_Msg::SET_HWM:
- {
- size_t wm_size = *(size_t *) mb->cont ()->rd_ptr ();
-
- this->water_marks (cmd, wm_size);
- this->sibling ()->water_marks (cmd, wm_size);
- ioc->rval (0);
- break;
- }
- default:
- mb->msg_type (ACE_Message_Block::MB_IOCNAK);
- }
- return this->reply (mb);
-}
-
-// Perform flush algorithm as though we were the driver.
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::canonical_flush (ACE_Message_Block *mb)
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::canonical_flush");
- char *cp = mb->rd_ptr ();
-
- if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHW))
- {
- this->flush (ACE_Task_Flags::ACE_FLUSHALL);
- ACE_CLR_BITS (*cp, ACE_Task_Flags::ACE_FLUSHW);
- }
-
- if (ACE_BIT_ENABLED (*cp, ACE_Task_Flags::ACE_FLUSHR))
- {
- this->sibling ()->flush (ACE_Task_Flags::ACE_FLUSHALL);
- return this->reply (mb);
- }
- else
- mb->release ();
-
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::put (ACE_Message_Block *mb,
- ACE_Time_Value *)
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::put");
-
- if (this->is_writer ())
- {
- switch (mb->msg_type ())
- {
- case ACE_Message_Block::MB_IOCTL:
- return this->control (mb);
- /* NOTREACHED */
- default:
- mb->release ();
- }
- }
-
- return -1;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::init (int, ACE_TCHAR *[])
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::init");
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::info (ACE_TCHAR **strp, size_t length) const
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::info");
- const ACE_TCHAR *name = this->name ();
-
- if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*strp, name, length);
- return ACE_OS::strlen (name);
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Stream_Tail<ACE_SYNCH_USE>::fini (void)
-{
- ACE_TRACE ("ACE_Stream_Tail<ACE_SYNCH_USE>::fini");
- return 0;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Thru_Task)
-
-template <ACE_SYNCH_DECL>
-ACE_Thru_Task<ACE_SYNCH_USE>::ACE_Thru_Task (void)
-{
- ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::ACE_Thru_Task");
-}
-
-template <ACE_SYNCH_DECL>
-ACE_Thru_Task<ACE_SYNCH_USE>::~ACE_Thru_Task (void)
-{
- ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::~ACE_Thru_Task");
-}
-
-template <ACE_SYNCH_DECL> void
-ACE_Thru_Task<ACE_SYNCH_USE>::dump (void) const
-{
- ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::dump");
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Thru_Task<ACE_SYNCH_USE>::open (void *)
-{
- ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::open");
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Thru_Task<ACE_SYNCH_USE>::close (u_long)
-{
- ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::close");
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Thru_Task<ACE_SYNCH_USE>::svc (void)
-{
- ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::svc");
- return -1;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Thru_Task<ACE_SYNCH_USE>::put (ACE_Message_Block *msg,
- ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::put");
- return this->put_next (msg, tv);
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Thru_Task<ACE_SYNCH_USE>::init (int, ACE_TCHAR *[])
-{
- ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::init");
- return 0;
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Thru_Task<ACE_SYNCH_USE>::info (ACE_TCHAR **strp,
- size_t length) const
-{
- ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::info");
- const ACE_TCHAR *name = this->name ();
-
- if (*strp == 0 && (*strp = ACE_OS::strdup (name)) == 0)
- return -1;
- else
- ACE_OS::strncpy (*strp, name, length);
- return ACE_OS::strlen (name);
-}
-
-template <ACE_SYNCH_DECL> int
-ACE_Thru_Task<ACE_SYNCH_USE>::fini (void)
-{
- ACE_TRACE ("ACE_Thru_Task<ACE_SYNCH_USE>::fini");
- return 0;
-}
-
-#endif /* ACE_STREAM_MODULES_C */
diff --git a/ace/Stream_Modules.h b/ace/Stream_Modules.h
deleted file mode 100644
index 9489bac1975..00000000000
--- a/ace/Stream_Modules.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Stream_Modules.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-// This needs to go outside of the #if !defined() block. Don't ask...
-#include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#ifndef ACE_STREAM_MODULES
-#define ACE_STREAM_MODULES
-#include "ace/pre.h"
-
-template <ACE_SYNCH_DECL>
-class ACE_Stream_Head : public ACE_Task<ACE_SYNCH_USE>
-{
- // = TITLE
- // Standard module that acts as the head of a ustream.
-public:
- ACE_Stream_Head (void);
- // Construction
-
- ~ACE_Stream_Head (void);
- // Destruction
-
- // = ACE_Task hooks
- virtual int open (void *a = 0);
- virtual int close (u_long flags = 0);
- virtual int put (ACE_Message_Block *msg, ACE_Time_Value * = 0);
- virtual int svc (void);
-
- // = Dynamic linking hooks
- virtual int init (int argc, ACE_TCHAR *argv[]);
- virtual int info (ACE_TCHAR **info_string, size_t length) const;
- virtual int fini (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int control (ACE_Message_Block *);
- int canonical_flush (ACE_Message_Block *);
- // Performs canonical flushing at the ACE_Stream Head.
-};
-
-template <ACE_SYNCH_DECL>
-class ACE_Stream_Tail : public ACE_Task<ACE_SYNCH_USE>
-{
- // = TITLE
- // Standard module that acts as the head of a ustream.
-public:
- ACE_Stream_Tail (void);
- // Construction
-
- ~ACE_Stream_Tail (void);
- // Destruction
-
- // = ACE_Task hooks
- virtual int open (void *a = 0);
- virtual int close (u_long flags = 0);
- virtual int put (ACE_Message_Block *msg, ACE_Time_Value * = 0);
- virtual int svc (void);
-
- // = Dynamic linking hooks
- virtual int init (int argc, ACE_TCHAR *argv[]);
- virtual int info (ACE_TCHAR **info_string, size_t length) const;
- virtual int fini (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int control (ACE_Message_Block *);
- int canonical_flush (ACE_Message_Block *);
- // Performs canonical flushing at the ACE_Stream tail.
-};
-
-template <ACE_SYNCH_DECL>
-class ACE_Thru_Task : public ACE_Task<ACE_SYNCH_USE>
-{
- // = TITLE
- // Standard module that acts as a "no op", simply passing on all
- // data to its adjacent neighbor.
-public:
- ACE_Thru_Task (void);
- // Construction
-
- ~ACE_Thru_Task (void);
- // Destruction
-
- // = ACE_Task hooks
- virtual int open (void *a = 0);
- virtual int close (u_long flags = 0);
- virtual int put (ACE_Message_Block *msg, ACE_Time_Value * = 0);
- virtual int svc (void);
-
- // = Dynamic linking hooks
- virtual int init (int argc, ACE_TCHAR *argv[]);
- virtual int info (ACE_TCHAR **info_string, size_t length) const;
- virtual int fini (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Stream_Modules.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Stream_Modules.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_STREAM_MODULES */
diff --git a/ace/Svc_Conf.h b/ace/Svc_Conf.h
deleted file mode 100644
index d6b58298231..00000000000
--- a/ace/Svc_Conf.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Svc_Conf.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SVC_CONF_H
-#define ACE_SVC_CONF_H
-#include "ace/pre.h"
-
-// Globally visible macros, type decls, and extern var decls for
-// Service Configurator utility.
-
-#include "ace/Obstack.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Service_Config.h"
-#include "ace/Parse_Node.h"
-
-#if defined (DEBUGGING)
-#if defined (ACE_YY_DECL)
-#undef ACE_YY_DECL
-#endif /* ACE_YY_DECL */
-#define ACE_YY_DECL extern "C" char *ace_yylex (void)
-#else
-#define ACE_YY_DECL extern "C" int ace_yylex (void)
-#endif /* DEBUGGING */
-
-void ace_yyrestart (FILE *);
-// Restart input file parsing
-
-void ace_yy_delete_parse_buffer (void);
-// Delete the lexer's parse buffer
-
-int ace_yyparse (void);
-// Performs the parsing
-
-ACE_YY_DECL;
-// Performs the lexical analysis
-
-extern FILE *ace_yyin;
-// Name of input stream
-
-#define ACE_YY_INPUT(buf,result,max_size) \
- if (ace_yydirective != 0) \
- { \
- int c = *ace_yydirective++; \
- result = c == '\0' ? 0 : 1; \
- buf[0] = (char) c; \
- } \
- else if ( ace_yy_current_buffer->ace_yy_is_interactive ) \
- { \
- int c = getc( ace_yyin ); \
- result = c == EOF ? 0 : 1; \
- buf[0] = (char) c; \
- } \
- else if ( ((result = fread( buf, 1, max_size, ace_yyin )) == 0) \
- && ferror( ace_yyin ) ) \
- ACE_YY_FATAL_ERROR( ACE_TEXT ("input in flex scanner failed") );
-
-void ace_yyerror (const ACE_TCHAR *);
-// Error handling routine required by YACC or BISON
-
-extern int ace_yylineno;
-// Keeps track of the current line number for error-handling routine
-
-extern int ace_yyerrno;
-// Keeps track of the number of errors encountered so far
-
-extern const ACE_TCHAR *ace_yydirective;
-// Used to parse service configurator directives from a string rather
-// than from a svc.conf file.
-
-extern ACE_TCHAR *ace_yytext;
-// Holds the lexeme for the current token
-
-extern int ace_yyleng;
-// Holds the length of the lexeme for the current token
-
-extern ACE_Obstack *ace_obstack;
-// Efficient memory allocation technique
-
-ACE_Service_Type_Impl *ace_create_service_type (const ACE_TCHAR *, int,
- void *, unsigned int,
- ACE_Service_Object_Exterminator = 0);
-// Factory that creates a new ACE_Service_Type_Impl.
-
-typedef union
-{
- int type_;
- ACE_Location_Node *location_node_;
- ACE_Parse_Node *parse_node_;
- ACE_Static_Node *static_node_;
- ACE_Service_Type *svc_record_;
- ACE_TCHAR *ident_;
-} ACE_YYSTYPE;
-extern ACE_YYSTYPE ace_yylval;
-#include "ace/post.h"
-#endif /* ACE_SVC_CONF_H */
diff --git a/ace/Svc_Conf.l b/ace/Svc_Conf.l
deleted file mode 100644
index 135db466159..00000000000
--- a/ace/Svc_Conf.l
+++ /dev/null
@@ -1,114 +0,0 @@
-%{
-// $Id$
-// Sample lexical analysis for regular expression subset. Must be
-// compiled with FLEX and an ANSI C++ compiler.
-
-// Lexical tokens values defined by YACC.
-#include "ace/Svc_Conf.h"
-#include "ace/Svc_Conf_Tokens.h"
-
-ACE_RCSID(ace, Svc_Conf_l, "$Id$")
-
-// Keeps track of the current line for debugging output.
-int yylineno = 1;
-
-// Keeps track of the number of errors encountered so far.
-int yyerrno = 0;
-
-// Used to parse service configurator directives from a string rather
-// than from a svc.conf file.
-const ACE_TCHAR *yydirective = 0;
-
-#define token(x) x
-%}
-
-%s PARAMETERS
-%s NORMAL
-
-letter [a-zA-Z_]
-letter_or_digit [a-zA-Z_0-9]
-digit [0-9]
-ident {letter}{letter_or_digit}*
-pathname ([A-Za-z\%]:)?[a-zA-Z_0-9/\%\.\\-]+
-symbol [ -~]
-string (\"{symbol}*\"|\'{symbol}*\')
-white_space [ \t]
-newline \n
-other .
-
-%%
-
-^#{other}*$ ; /* EMPTY */
-dynamic { return token (ACE_DYNAMIC); }
-static { return token (ACE_STATIC); }
-suspend { return token (ACE_SUSPEND); }
-resume { return token (ACE_RESUME); }
-remove { return token (ACE_REMOVE); }
-stream { return token (ACE_USTREAM); }
-Module { return token (ACE_MODULE_T); }
-Service_Object { return token (ACE_SVC_OBJ_T); }
-STREAM { return token (ACE_STREAM_T); }
-active { return token (ACE_ACTIVE); }
-inactive { return token (ACE_INACTIVE); }
-":" { return token (ACE_COLON); }
-"*" { return token (ACE_STAR); }
-"(" { return token (ACE_LPAREN); }
-")" { return token (ACE_RPAREN); }
-"{" { return token (ACE_LBRACE); }
-"}" { return token (ACE_RBRACE); }
-{string} { // Check for first type of string, i.e.,
- // "double quotes" delimited.
- char *s = strrchr (yytext, '"');
- if (s == 0)
- // Check for second type of string, i.e.,
- // 'single quotes' delimited.
- s = strrchr (yytext, '\'');
-
- ACE_ASSERT (s != 0);
- // Eliminate the opening and closing double or
- // single quotes.
- *s = '\0';
- yyleng -= 1;
- yylval.ident_ = ace_obstack->copy (yytext + 1, yyleng);
- return token (ACE_STRING); }
-{ident} {
- yylval.ident_ = ace_obstack->copy (yytext, yyleng);
- return token (ACE_IDENT);
- }
-{pathname} {
- yylval.ident_ = ace_obstack->copy (yytext, yyleng);
- return token (ACE_PATHNAME);
- }
-{white_space}+ ; /* EMPTY */
-{newline} { yylineno++; }
-{other} { ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("unknown character = (%d"),
- *yytext));
- if (ACE_OS::ace_isprint (*yytext))
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("|%c"), *yytext));
- ACE_ERROR ((LM_ERROR, ACE_TEXT (")\n")));
- }
-<<EOF>> { YY_NEW_FILE; yyterminate(); }
-%%
-int
-yywrap (void)
-{
- ::fflush (yyin);
- yytext[0] = '#';
- yyleng = 0;
-
- // This needs to be freed to prevent a memory leak.
- yy_delete_parse_buffer ();
-
- return 1;
-}
-
-void
-yy_delete_parse_buffer (void)
-{
- if (yy_current_buffer != 0)
- {
- yy_delete_buffer (yy_current_buffer);
- yy_current_buffer = 0;
- }
-}
diff --git a/ace/Svc_Conf.y b/ace/Svc_Conf.y
deleted file mode 100644
index 76c1689b2e6..00000000000
--- a/ace/Svc_Conf.y
+++ /dev/null
@@ -1,458 +0,0 @@
-%{
-// $Id$
-#include "ace/ARGV.h"
-#include "ace/Svc_Conf.h"
-#include "ace/Module.h"
-#include "ace/Stream.h"
-
-ACE_RCSID(ace, Svc_Conf_y, "$Id$")
-
-// Prototypes.
-static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
- ACE_Static_Node *svc_type);
-static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
- const ACE_TCHAR *svc_name);
-
-#define YYDEBUG_LEXER_TEXT (yytext[yyleng] = '\0', yytext)
-
-// Force the pretty debugging code to compile.
-// #define YYDEBUG 1
-
-// Efficient memory allocation technique.
-ACE_Obstack *ace_obstack;
-
-%}
-%token ACE_DYNAMIC ACE_STATIC ACE_SUSPEND ACE_RESUME ACE_REMOVE ACE_USTREAM
-%token ACE_MODULE_T ACE_STREAM_T ACE_SVC_OBJ_T ACE_ACTIVE ACE_INACTIVE
-%token ACE_PATHNAME ACE_IDENT ACE_STRING
-%token ACE_LPAREN ACE_RPAREN ACE_LBRACE ACE_RBRACE ACE_STAR ACE_COLON
-
-%start svc_config_entries
-
-%type <ident_> ACE_IDENT ACE_STRING ACE_PATHNAME pathname parameters_opt
-%type <type_> type status
-%type <parse_node_> dynamic static suspend resume remove module_list stream
-%type <parse_node_> stream_modules module svc_config_entry
-%type <static_node_> stream_ops
-%type <svc_record_> svc_location
-%type <location_node_> svc_initializer
-
-%%
-
-svc_config_entries
- : svc_config_entries svc_config_entry
- {
- if ($2 != 0)
- {
- $2->apply (); delete $2;
- }
- ace_obstack->release ();
- }
- | svc_config_entries error
- {
- ace_obstack->release ();
- }
- | /* EMPTY */
- ;
-
-svc_config_entry
- : dynamic
- | static
- | suspend
- | resume
- | remove
- | stream
- ;
-
-dynamic
- : ACE_DYNAMIC svc_location parameters_opt
- {
- if ($2 != 0)
- $$ = new ACE_Dynamic_Node ($2, $3);
- else
- $$ = 0;
- }
- ;
-
-static
- : ACE_STATIC ACE_IDENT parameters_opt
- {
- $$ = new ACE_Static_Node ($2, $3);
- }
- ;
-
-suspend
- : ACE_SUSPEND ACE_IDENT
- {
- $$ = new ACE_Suspend_Node ($2);
- }
- ;
-
-resume
- : ACE_RESUME ACE_IDENT
- {
- $$ = new ACE_Resume_Node ($2);
- }
- ;
-
-remove
- : ACE_REMOVE ACE_IDENT
- {
- $$ = new ACE_Remove_Node ($2);
- }
- ;
-
-stream
- : ACE_USTREAM stream_ops stream_modules
- {
- $$ = new ACE_Stream_Node ($2, $3);
- }
- | ACE_USTREAM ACE_IDENT { $<static_node_>$ = new ACE_Static_Node ($2); } stream_modules
- {
- $$ = new ACE_Dummy_Node ($<static_node_>3, $4);
- }
- ;
-
-stream_ops
- : dynamic
- {
- }
- | static
- {
- }
- ;
-
-stream_modules
- : ACE_LBRACE
- {
- // Initialize left context...
- $<static_node_>$ = $<static_node_>0;
- }
- module_list ACE_RBRACE
- {
- $$ = $3;
- }
- | /* EMPTY */ { $$ = 0; }
- ;
-
-module_list
- : module_list module
- {
- if ($2 != 0)
- {
- $2->link ($1);
- $$ = $2;
- }
- }
- | /* EMPTY */ { $$ = 0; }
- ;
-
-module
- : dynamic
- {
- ACE_Static_Node *svc_type = $<static_node_>1;
-
- if (svc_type != 0)
- {
- ACE_Static_Node *module = $<static_node_>-1;
-
- ACE_ARGV args (svc_type->parameters ());
- ACE_Module_Type *mt = ace_get_module (module,
- svc_type);
- ACE_Stream_Type *st =
- ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- module->record ()->type ()));
-
- if (mt->init (args.argc (), args.argv ()) == -1
- || st->push (mt) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("dynamic initialization failed for Module %s\n"),
- svc_type->name ()));
- yyerrno++;
- }
- }
- }
- | static
- {
- ACE_Module_Type *mt = ace_get_module ($<static_node_>-1, $<static_node_>1->name ());
-
- if (((ACE_Stream_Type *) ($<static_node_>-1)->record ()->type ())->push (mt) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Problem with static\n")));
- yyerrno++;
- }
- }
- | suspend
- {
- ACE_Module_Type *mt = ace_get_module ($<static_node_>-1,
- $<static_node_>1->name ());
- if (mt != 0)
- mt->suspend ();
- }
- | resume
- {
- ACE_Module_Type *mt = ace_get_module ($<static_node_>-1,
- $<static_node_>1->name ());
- if (mt != 0)
- mt->resume ();
- }
- | remove
- {
- ACE_Static_Node *stream = $<static_node_>-1;
- ACE_Static_Node *module = $<static_node_>1;
- ACE_Module_Type *mt = ace_get_module (stream,
- module->name ());
-
- ACE_Stream_Type *st =
- ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- stream->record ()->type ()));
- if (mt != 0 && st->remove (mt) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"),
- module->name (),
- stream->name ()));
- yyerrno++;
- }
- }
- ;
-
-svc_location
- : ACE_IDENT type svc_initializer status
- {
- u_int flags
- = ACE_Service_Type::DELETE_THIS
- | ($3->dispose () == 0 ? 0 : ACE_Service_Type::DELETE_OBJ);
- ACE_Service_Object_Exterminator gobbler = 0;
- void *sym = $3->symbol (&gobbler);
-
- if (sym != 0)
- {
- ACE_Service_Type_Impl *stp
- = ace_create_service_type ($1,
- $2,
- sym,
- flags,
- gobbler);
- $$ = new ACE_Service_Type ($1,
- stp,
- $3->handle (),
- $4);
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Unable to find service: %s\n"),
- $1));
- ++yyerrno;
- $$ = 0;
- }
- delete $3;
- }
- ;
-
-status
- : ACE_ACTIVE
- {
- $$ = 1;
- }
- | ACE_INACTIVE
- {
- $$ = 0;
- }
- | /* EMPTY */
- {
- $$ = 1;
- }
- ;
-
-svc_initializer
- : pathname ACE_COLON ACE_IDENT
- {
- $$ = new ACE_Object_Node ($1, $3);
- }
- | pathname ACE_COLON ACE_IDENT ACE_LPAREN ACE_RPAREN
- {
- $$ = new ACE_Function_Node ($1, $3);
- }
- | ACE_COLON ACE_IDENT ACE_LPAREN ACE_RPAREN
- {
- $$ = new ACE_Static_Function_Node ($2);
- }
- ;
-
-type
- : ACE_MODULE_T ACE_STAR
- {
- $$ = ACE_MODULE_T;
- }
- | ACE_SVC_OBJ_T ACE_STAR
- {
- $$ = ACE_SVC_OBJ_T;
- }
- | ACE_STREAM_T ACE_STAR
- {
- $$ = ACE_STREAM_T;
- }
- ;
-
-parameters_opt
- : ACE_STRING
- | /* EMPTY */ { $$ = 0; }
- ;
-
-pathname
- : ACE_PATHNAME
- | ACE_IDENT
- ;
-
-%%
-// Prints the error string to standard output. Cleans up the error
-// messages.
-
-void
-yyerror (const ACE_TCHAR *s)
-{
-#if defined (ACE_NLOGGING)
- ACE_UNUSED_ARG (s);
-#endif /* ACE_NLOGGING */
-
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("[error %d] on line %d: %s\n"),
- ++yyerrno,
- yylineno,
- s));
-}
-
-// Note that SRC_REC represents left context, which is the STREAM *
-// record.
-
-static ACE_Module_Type *
-ace_get_module (ACE_Static_Node *str_rec,
- const ACE_TCHAR *svc_name)
-{
- const ACE_Service_Type *sr = str_rec->record ();
- const ACE_Service_Type_Impl *type = sr->type ();
- ACE_Stream_Type *st = sr == 0
- ? 0
- : ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- type));
- ACE_Module_Type *mt = st == 0 ? 0 : st->find (svc_name);
-
- if (sr == 0 || st == 0 || mt == 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("cannot locate Module_Type %s in STREAM_Type %s\n"),
- svc_name,
- str_rec->name ()));
- yyerrno++;
- }
-
- return mt;
-}
-
-static ACE_Module_Type *
-ace_get_module (ACE_Static_Node *str_rec,
- ACE_Static_Node *svc_type)
-{
- const ACE_Service_Type *sr = str_rec->record ();
- const ACE_Service_Type_Impl *type = sr->type ();
- ACE_Stream_Type *st = sr == 0 ? 0 : (ACE_Stream_Type *) type;
- const ACE_Service_Type *sv = svc_type->record ();
- type = sv->type ();
- ACE_Module_Type *mt = (ACE_Module_Type *) type;
- const ACE_TCHAR *module_type_name = svc_type->name ();
-
- if (sr == 0 || st == 0 || mt == 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"),
- module_type_name,
- str_rec->name ()));
- yyerrno++;
- }
-
- // Make sure that the Module has the same name as the
- // Module_Type object from the svc.conf file.
- ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object ();
-
- if (ACE_OS::strcmp (mp->name (), module_type_name) != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"),
- module_type_name,
- mp->name ()));
- mp->name (module_type_name);
- }
-
- return mt;
-}
-
-ACE_Service_Type_Impl *
-ace_create_service_type (const ACE_TCHAR *name,
- int type,
- void *symbol,
- u_int flags,
- ACE_Service_Object_Exterminator gobbler)
-{
- ACE_Service_Type_Impl *stp = 0;
-
- // Note, the only place we need to put a case statement. This is
- // also the place where we'd put the RTTI tests, if the compiler
- // actually supported them!
-
- switch (type)
- {
- case ACE_SVC_OBJ_T:
- ACE_NEW_RETURN (stp,
- ACE_Service_Object_Type ((ACE_Service_Object *) symbol,
- name, flags,
- gobbler),
- 0);
- break;
- case ACE_MODULE_T:
- ACE_NEW_RETURN (stp,
- ACE_Module_Type (symbol, name, flags),
- 0);
- break;
- case ACE_STREAM_T:
- ACE_NEW_RETURN (stp,
- ACE_Stream_Type (symbol, name, flags),
- 0);
- break;
- default:
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("unknown case\n")));
- yyerrno++;
- break;
- }
- return stp;
-}
-
-#if defined (DEBUGGING)
-// Current line number.
-int yylineno = 1;
-
-// Name given on the command-line to envoke the program.
-ACE_TCHAR *program_name;
-
-// Main driver program.
-
-int
-main (int argc, char *argv[])
-{
- yyin = stdin;
- ace_obstack = new ACE_Obstack;
-
- // Try to reopen any filename argument to use YYIN.
- if (argc > 1 && (yyin = freopen (argv[1], "r", stdin)) == 0)
- (void) ::fprintf (stderr, "usage: %s [file]\n", argv[0]), exit (1);
-
- return yyparse ();
-}
-#endif /* DEBUGGING */
diff --git a/ace/Svc_Conf_Tokens.h b/ace/Svc_Conf_Tokens.h
deleted file mode 100644
index 98a63ac0e53..00000000000
--- a/ace/Svc_Conf_Tokens.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// $Id$
-
-#ifndef SVC_CONF_TOKENS_H
-#define SVC_CONF_TOKENS_H
-#include "ace/pre.h"
-
-#define ACE_DYNAMIC 257
-#define ACE_STATIC 258
-#define ACE_SUSPEND 259
-#define ACE_RESUME 260
-#define ACE_REMOVE 261
-#define ACE_USTREAM 262
-#define ACE_MODULE_T 263
-#define ACE_STREAM_T 264
-#define ACE_SVC_OBJ_T 265
-#define ACE_ACTIVE 266
-#define ACE_INACTIVE 267
-#define ACE_PATHNAME 268
-#define ACE_IDENT 269
-#define ACE_STRING 270
-#define ACE_LPAREN 271
-#define ACE_RPAREN 272
-#define ACE_LBRACE 273
-#define ACE_RBRACE 274
-#define ACE_STAR 275
-#define ACE_COLON 276
-
-#include "ace/post.h"
-#endif //SVC_CONF_TOKENS_H
diff --git a/ace/Svc_Conf_l.cpp b/ace/Svc_Conf_l.cpp
deleted file mode 100644
index 30dfda25396..00000000000
--- a/ace/Svc_Conf_l.cpp
+++ /dev/null
@@ -1,1839 +0,0 @@
-/* A lexical scanner generated by flex */
-#define ACE_YY_NO_UNPUT
-
-/* Scanner skeleton version:
- * $Header$
- */
-
-#define FLEX_SCANNER
-#define ACE_YY_FLEX_MAJOR_VERSION 2
-#define ACE_YY_FLEX_MINOR_VERSION 5
-
-#include "ace/OS.h"
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include /**/ <stdlib.h>
-#include "ace/OS.h"
-
-/* Use prototypes in function declarations. */
-#define ACE_YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define ACE_YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-#if __STDC__
-
-#define ACE_YY_USE_PROTOS
-#define ACE_YY_USE_CONST
-
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include /**/ <io.h>
-#include /**/ <stdlib.h>
-#define ACE_YY_USE_CONST
-#define ACE_YY_USE_PROTOS
-#endif
-
-#ifdef ACE_YY_USE_CONST
-#define ace_yyconst const
-#else
-#define ace_yyconst
-#endif
-
-
-#ifdef ACE_YY_USE_PROTOS
-#define ACE_YY_PROTO(proto) proto
-#else
-#define ACE_YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define ACE_YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed ACE_TCHAR to an unsigned
- * integer for use as an array index. If the signed ACE_TCHAR is negative,
- * we want to instead treat it as an 8-bit unsigned ACE_TCHAR, hence the
- * double cast.
- */
-#define ACE_YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN ace_yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state. The ACE_YYSTATE alias is for lex
- * compatibility.
- */
-#define ACE_YY_START ((ace_yy_start - 1) / 2)
-#define ACE_YYSTATE ACE_YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define ACE_YY_STATE_EOF(state) (ACE_YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define ACE_YY_NEW_FILE ace_yyrestart( ace_yyin )
-
-#define ACE_YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define ACE_YY_BUF_SIZE 16384
-
-typedef struct ace_yy_buffer_state *ACE_YY_BUFFER_STATE;
-
-extern int ace_yyleng;
-extern FILE *ace_yyin, *ace_yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * ace_yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the ace_yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define ace_yyless(n) \
- do \
- { \
- /* Undo effects of setting up ace_yytext. */ \
- *ace_yy_cp = ace_yy_hold_char; \
- ACE_YY_RESTORE_ACE_YY_MORE_OFFSET \
- ace_yy_c_buf_p = ace_yy_cp = ace_yy_bp + n - ACE_YY_MORE_ADJ; \
- ACE_YY_DO_BEFORE_ACTION; /* set up ace_yytext again */ \
- } \
- while ( 0 )
-
-#if 0
-#define unput(c) ace_yyunput( c, ace_yytext_ptr )
-#endif /* 0 */
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int ace_yy_size_t;
-
-
-struct ace_yy_buffer_state
- {
- FILE *ace_yy_input_file;
-
- ACE_TCHAR *ace_yy_ch_buf; /* input buffer */
- ACE_TCHAR *ace_yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- ace_yy_size_t ace_yy_buf_size;
-
- /* Number of characters read into ace_yy_ch_buf, not including EOB
- * characters.
- */
- int ace_yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int ace_yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int ace_yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int ace_yy_at_bol;
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int ace_yy_fill_buffer;
-
- int ace_yy_buffer_status;
-#define ACE_YY_BUFFER_NEW 0
-#define ACE_YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as ACE_YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via ace_yyrestart()), so that the user can continue scanning by
- * just pointing ace_yyin at a new input file.
- */
-#define ACE_YY_BUFFER_EOF_PENDING 2
- };
-
-static ACE_YY_BUFFER_STATE ace_yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define ACE_YY_CURRENT_BUFFER ace_yy_current_buffer
-
-
-/* ace_yy_hold_char holds the character lost when ace_yytext is formed. */
-static ACE_TCHAR ace_yy_hold_char;
-
-static int ace_yy_n_chars; /* number of characters read into ace_yy_ch_buf */
-
-
-int ace_yyleng;
-
-/* Points to current character in buffer. */
-static ACE_TCHAR *ace_yy_c_buf_p = (ACE_TCHAR *) 0;
-static int ace_yy_init = 1; /* whether we need to initialize */
-static int ace_yy_start = 0; /* start state number */
-
-/* Flag which is used to allow ace_yywrap()'s to do buffer switches
- * instead of setting up a fresh ace_yyin. A bit of a hack ...
- */
-static int ace_yy_did_buffer_switch_on_eof;
-
-void ace_yyrestart ACE_YY_PROTO(( FILE *input_file ));
-
-void ace_yy_switch_to_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE new_buffer ));
-void ace_yy_load_buffer_state ACE_YY_PROTO(( void ));
-ACE_YY_BUFFER_STATE ace_yy_create_buffer ACE_YY_PROTO(( FILE *file, int size ));
-void ace_yy_delete_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE b ));
-void ace_yy_init_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE b, FILE *file ));
-void ace_yy_flush_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE b ));
-#define ACE_YY_FLUSH_BUFFER ace_yy_flush_buffer( ace_yy_current_buffer )
-
-ACE_YY_BUFFER_STATE ace_yy_scan_buffer ACE_YY_PROTO(( ACE_TCHAR *base, ace_yy_size_t size ));
-ACE_YY_BUFFER_STATE ace_yy_scan_string ACE_YY_PROTO(( ace_yyconst ACE_TCHAR *ace_yy_str ));
-ACE_YY_BUFFER_STATE ace_yy_scan_bytes ACE_YY_PROTO(( ace_yyconst ACE_TCHAR *bytes, int len ));
-
-static void *ace_yy_flex_alloc ACE_YY_PROTO(( ace_yy_size_t ));
-static void *ace_yy_flex_realloc ACE_YY_PROTO(( void *, ace_yy_size_t ));
-static void ace_yy_flex_free ACE_YY_PROTO(( void * ));
-
-#define ace_yy_new_buffer ace_yy_create_buffer
-
-#define ace_yy_set_interactive(is_interactive) \
- { \
- if ( ! ace_yy_current_buffer ) \
- ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); \
- ace_yy_current_buffer->ace_yy_is_interactive = is_interactive; \
- }
-
-#define ace_yy_set_bol(at_bol) \
- { \
- if ( ! ace_yy_current_buffer ) \
- ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); \
- ace_yy_current_buffer->ace_yy_at_bol = at_bol; \
- }
-
-#define ACE_YY_AT_BOL() (ace_yy_current_buffer->ace_yy_at_bol)
-
-typedef ACE_TCHAR ACE_YY_CHAR;
-FILE *ace_yyin = (FILE *) 0, *ace_yyout = (FILE *) 0;
-typedef int ace_yy_state_type;
-extern ACE_TCHAR *ace_yytext;
-#define ace_yytext_ptr ace_yytext
-
-static ace_yy_state_type ace_yy_get_previous_state ACE_YY_PROTO(( void ));
-static ace_yy_state_type ace_yy_try_NUL_trans ACE_YY_PROTO(( ace_yy_state_type current_state ));
-static int ace_yy_get_next_buffer ACE_YY_PROTO(( void ));
-static void ace_yy_fatal_error ACE_YY_PROTO(( ace_yyconst ACE_TCHAR msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up ace_yytext.
- */
-#define ACE_YY_DO_BEFORE_ACTION \
- ace_yytext_ptr = ace_yy_bp; \
- ace_yyleng = (int) (ace_yy_cp - ace_yy_bp); \
- ace_yy_hold_char = *ace_yy_cp; \
- *ace_yy_cp = '\0'; \
- ace_yy_c_buf_p = ace_yy_cp;
-
-#define ACE_YY_NUM_RULES 25
-#define ACE_YY_END_OF_BUFFER 26
-static ace_yyconst short int ace_yy_accept[107] =
- { 0,
- 0, 0, 0, 0, 0, 0, 26, 24, 22, 23,
- 24, 21, 24, 15, 16, 14, 21, 13, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 17, 18, 24,
- 22, 0, 19, 21, 0, 0, 19, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 0, 1, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 8, 10, 20, 11, 20, 20, 6, 5,
- 3, 7, 20, 20, 2, 20, 4, 20, 12, 20,
-
- 20, 20, 20, 20, 9, 0
- } ;
-
-static ace_yyconst int ace_yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 5, 6, 7, 5, 8, 5, 9, 10,
- 11, 12, 5, 5, 13, 13, 13, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 15, 5, 5,
- 5, 5, 5, 5, 16, 17, 17, 17, 18, 17,
- 17, 17, 17, 17, 17, 17, 19, 17, 20, 17,
- 17, 21, 22, 23, 17, 17, 17, 17, 17, 17,
- 5, 13, 5, 5, 24, 5, 25, 26, 27, 28,
-
- 29, 17, 17, 17, 30, 31, 17, 32, 33, 34,
- 35, 36, 17, 37, 38, 39, 40, 41, 17, 17,
- 42, 17, 43, 5, 44, 5, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static ace_yyconst int ace_yy_meta[45] =
- { 0,
- 1, 1, 1, 2, 2, 2, 2, 3, 2, 2,
- 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 2, 2
- } ;
-
-static ace_yyconst short int ace_yy_base[112] =
- { 0,
- 0, 132, 0, 127, 0, 123, 129, 437, 43, 437,
- 122, 112, 109, 437, 437, 437, 102, 437, 38, 41,
- 42, 51, 54, 55, 64, 65, 74, 437, 437, 104,
- 56, 93, 86, 70, 69, 66, 65, 75, 78, 87,
- 88, 96, 97, 107, 108, 111, 125, 58, 437, 129,
- 137, 141, 145, 149, 153, 157, 163, 171, 175, 181,
- 187, 193, 199, 203, 207, 213, 217, 223, 233, 234,
- 242, 252, 253, 261, 262, 265, 271, 274, 277, 285,
- 289, 300, 301, 310, 311, 320, 323, 324, 333, 334,
- 343, 344, 347, 353, 356, 359, 365, 371, 368, 374,
-
- 377, 386, 389, 390, 398, 437, 428, 49, 430, 45,
- 433
- } ;
-
-static ace_yyconst short int ace_yy_def[112] =
- { 0,
- 106, 1, 1, 1, 1, 1, 106, 106, 106, 106,
- 107, 108, 109, 106, 106, 106, 108, 106, 110, 110,
- 110, 110, 110, 110, 110, 110, 110, 106, 106, 111,
- 106, 107, 107, 108, 108, 109, 109, 110, 110, 110,
- 110, 110, 110, 110, 110, 110, 110, 111, 106, 110,
- 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
- 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
- 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
- 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
- 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
-
- 110, 110, 110, 110, 110, 0, 106, 106, 106, 106,
- 106
- } ;
-
-static ace_yyconst short int ace_yy_nxt[482] =
- { 0,
- 8, 9, 10, 9, 8, 11, 8, 12, 13, 14,
- 15, 16, 17, 17, 18, 19, 19, 19, 20, 19,
- 19, 21, 19, 22, 23, 19, 19, 24, 19, 25,
- 19, 19, 19, 19, 19, 19, 26, 27, 19, 19,
- 19, 19, 28, 29, 31, 34, 31, 38, 34, 34,
- 34, 34, 35, 34, 34, 35, 35, 31, 34, 31,
- 49, 34, 34, 34, 40, 106, 34, 34, 35, 35,
- 41, 34, 34, 37, 37, 39, 34, 34, 35, 35,
- 42, 34, 34, 106, 106, 34, 34, 34, 35, 106,
- 34, 33, 106, 45, 34, 34, 43, 44, 33, 34,
-
- 34, 106, 106, 34, 34, 50, 49, 51, 34, 34,
- 106, 106, 46, 47, 34, 34, 106, 37, 34, 34,
- 34, 106, 106, 34, 52, 106, 35, 33, 106, 30,
- 54, 55, 34, 30, 53, 58, 34, 34, 30, 106,
- 56, 34, 106, 106, 34, 57, 106, 59, 34, 34,
- 106, 106, 34, 34, 62, 106, 34, 34, 106, 106,
- 34, 34, 60, 106, 34, 34, 106, 106, 61, 34,
- 34, 106, 106, 65, 64, 34, 106, 106, 34, 66,
- 106, 63, 34, 34, 106, 106, 106, 34, 34, 106,
- 106, 67, 106, 34, 34, 106, 106, 106, 106, 34,
-
- 34, 106, 68, 70, 106, 34, 34, 106, 73, 69,
- 34, 34, 106, 106, 34, 34, 71, 106, 72, 34,
- 34, 106, 106, 106, 34, 34, 106, 106, 74, 34,
- 34, 106, 106, 106, 106, 34, 106, 106, 106, 76,
- 34, 34, 106, 75, 106, 34, 34, 106, 106, 34,
- 106, 77, 106, 106, 34, 79, 106, 78, 81, 34,
- 34, 106, 80, 106, 34, 34, 106, 106, 34, 34,
- 82, 84, 34, 34, 34, 106, 106, 34, 34, 106,
- 83, 34, 106, 34, 34, 106, 34, 85, 106, 34,
- 86, 106, 34, 106, 87, 106, 34, 34, 106, 106,
-
- 88, 34, 89, 106, 106, 90, 106, 34, 34, 106,
- 106, 91, 34, 34, 106, 106, 106, 34, 34, 106,
- 106, 92, 34, 34, 106, 106, 106, 34, 106, 106,
- 34, 34, 34, 93, 106, 34, 34, 106, 106, 94,
- 34, 34, 106, 106, 106, 34, 34, 106, 106, 95,
- 34, 34, 106, 106, 34, 34, 34, 106, 106, 34,
- 34, 106, 106, 34, 96, 34, 34, 106, 34, 106,
- 106, 34, 34, 106, 97, 34, 98, 34, 34, 106,
- 34, 34, 106, 34, 34, 106, 34, 99, 106, 34,
- 100, 106, 106, 34, 106, 106, 34, 34, 34, 101,
-
- 106, 34, 34, 106, 106, 34, 106, 102, 106, 106,
- 34, 106, 106, 106, 103, 104, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 105, 32,
- 32, 36, 36, 48, 48, 48, 7, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106
- } ;
-
-static ace_yyconst short int ace_yy_chk[482] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 9, 19, 9, 110, 20, 21,
- 19, 108, 19, 20, 21, 20, 21, 31, 22, 31,
- 48, 23, 24, 22, 21, 22, 23, 24, 23, 24,
- 21, 25, 26, 37, 36, 20, 25, 26, 25, 26,
- 23, 27, 38, 35, 34, 39, 27, 38, 27, 38,
- 39, 33, 39, 26, 40, 41, 24, 25, 32, 40,
-
- 41, 40, 41, 42, 43, 39, 30, 40, 42, 43,
- 42, 43, 27, 27, 44, 45, 17, 13, 46, 44,
- 45, 44, 45, 46, 41, 46, 12, 11, 7, 6,
- 43, 44, 47, 4, 42, 46, 50, 47, 2, 47,
- 45, 50, 0, 50, 51, 45, 0, 46, 52, 51,
- 0, 51, 53, 52, 51, 52, 54, 53, 0, 53,
- 55, 54, 47, 54, 56, 55, 0, 55, 50, 56,
- 57, 56, 0, 54, 53, 57, 0, 57, 58, 55,
- 0, 52, 59, 58, 0, 58, 0, 59, 60, 59,
- 0, 56, 0, 60, 61, 60, 0, 0, 0, 61,
-
- 62, 61, 57, 59, 0, 62, 63, 62, 62, 58,
- 64, 63, 0, 63, 65, 64, 60, 64, 61, 65,
- 66, 65, 0, 0, 67, 66, 0, 66, 63, 67,
- 68, 67, 0, 0, 0, 68, 0, 68, 0, 65,
- 69, 70, 0, 64, 0, 69, 70, 69, 70, 71,
- 0, 66, 0, 0, 71, 68, 71, 67, 70, 72,
- 73, 0, 69, 0, 72, 73, 72, 73, 74, 75,
- 71, 73, 76, 74, 75, 74, 75, 76, 77, 76,
- 72, 78, 0, 77, 79, 77, 78, 74, 78, 79,
- 75, 79, 80, 0, 76, 0, 81, 80, 0, 80,
-
- 77, 81, 78, 81, 0, 79, 0, 82, 83, 0,
- 0, 80, 82, 83, 82, 83, 0, 84, 85, 0,
- 0, 81, 84, 85, 84, 85, 0, 86, 0, 0,
- 87, 88, 86, 82, 86, 87, 88, 87, 88, 85,
- 89, 90, 0, 0, 0, 89, 90, 89, 90, 87,
- 91, 92, 0, 0, 93, 91, 92, 91, 92, 93,
- 94, 93, 0, 95, 88, 94, 96, 94, 95, 0,
- 95, 96, 97, 96, 93, 99, 94, 97, 98, 97,
- 99, 100, 99, 98, 101, 98, 100, 96, 100, 101,
- 98, 101, 0, 102, 0, 0, 103, 104, 102, 100,
-
- 102, 103, 104, 103, 104, 105, 0, 101, 0, 0,
- 105, 0, 105, 0, 102, 103, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 104, 107,
- 107, 109, 109, 111, 111, 111, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106
- } ;
-
-static ace_yy_state_type ace_yy_last_accepting_state;
-static ACE_TCHAR *ace_yy_last_accepting_cpos;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define ace_yymore() ace_yymore_used_but_not_detected
-#define ACE_YY_MORE_ADJ 0
-#define ACE_YY_RESTORE_ACE_YY_MORE_OFFSET
-ACE_TCHAR *ace_yytext;
-#line 1 "Svc_Conf.l"
-#define INITIAL 0
-#line 2 "Svc_Conf.l"
-// $Id$
-// Sample lexical analysis for regular expression subset. Must be
-// compiled with FLEX and an ANSI C++ compiler.
-
-// Lexical tokens values defined by YACC.
-#include "ace/Svc_Conf.h"
-#include "ace/Svc_Conf_Tokens.h"
-
-ACE_RCSID(ace, Svc_Conf_l, "$Id$")
-
-// Keeps track of the current line for debugging output.
-int ace_yylineno = 1;
-
-// Keeps track of the number of errors encountered so far.
-int ace_yyerrno = 0;
-
-// Used to parse service configurator directives from a string rather
-// than from a svc.conf file.
-const ACE_TCHAR *ace_yydirective = 0;
-
-#define token(x) x
-#define PARAMETERS 1
-
-#define NORMAL 2
-
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef ACE_YY_SKIP_ACE_YYWRAP
-#ifdef __cplusplus
-extern "C" int ace_yywrap ACE_YY_PROTO(( void ));
-#else
-extern int ace_yywrap ACE_YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef ACE_YY_NO_UNPUT
-static void ace_yyunput ACE_YY_PROTO(( int c, ACE_TCHAR *buf_ptr ));
-#endif
-
-#ifndef ace_yytext_ptr
-static void ace_yy_flex_strncpy ACE_YY_PROTO(( ACE_TCHAR *, ace_yyconst ACE_TCHAR *, int ));
-#endif
-
-#ifdef ACE_YY_NEED_STRLEN
-static int ace_yy_flex_strlen ACE_YY_PROTO(( ace_yyconst ACE_TCHAR * ));
-#endif
-
-#ifndef ACE_YY_NO_INPUT
-#ifdef __cplusplus
-static int ace_yyinput ACE_YY_PROTO(( void ));
-#else
-static int input ACE_YY_PROTO(( void ));
-#endif
-#endif
-
-#if ACE_YY_STACK_USED
-static int ace_yy_start_stack_ptr = 0;
-static int ace_yy_start_stack_depth = 0;
-static int *ace_yy_start_stack = 0;
-#ifndef ACE_YY_NO_PUSH_STATE
-static void ace_yy_push_state ACE_YY_PROTO(( int new_state ));
-#endif
-#ifndef ACE_YY_NO_POP_STATE
-static void ace_yy_pop_state ACE_YY_PROTO(( void ));
-#endif
-#ifndef ACE_YY_NO_TOP_STATE
-static int ace_yy_top_state ACE_YY_PROTO(( void ));
-#endif
-
-#else
-#define ACE_YY_NO_PUSH_STATE 1
-#define ACE_YY_NO_POP_STATE 1
-#define ACE_YY_NO_TOP_STATE 1
-#endif
-
-#ifdef ACE_YY_MALLOC_DECL
-ACE_YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include /**/ <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef ACE_YY_READ_BUF_SIZE
-#define ACE_YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ACE_SVC_CONF_ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ACE_SVC_CONF_ECHO (void) fwrite( ace_yytext, ace_yyleng, 1, ace_yyout )
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or ACE_YY_NULL,
- * is returned in "result".
- */
-#ifndef ACE_YY_INPUT
-#define ACE_YY_INPUT(buf,result,max_size) \
- if ( ace_yy_current_buffer->ace_yy_is_interactive ) \
- { \
- int c = '*', n; \
- for ( n = 0; n < max_size && \
- (c = getc( ace_yyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (ACE_TCHAR) c; \
- if ( c == '\n' ) \
- buf[n++] = (ACE_TCHAR) c; \
- if ( c == EOF && ferror( ace_yyin ) ) \
- ACE_YY_FATAL_ERROR( "input in flex scanner failed" ); \
- result = n; \
- } \
- else if ( ((result = fread( buf, 1, max_size, ace_yyin )) == 0) \
- && ferror( ace_yyin ) ) \
- ACE_YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "ace_yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef ace_yyterminate
-#define ace_yyterminate() return ACE_YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef ACE_YY_START_STACK_INCR
-#define ACE_YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef ACE_YY_FATAL_ERROR
-#define ACE_YY_FATAL_ERROR(msg) ace_yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef ACE_YY_DECL
-#define ACE_YY_DECL int ace_yylex ACE_YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after ace_yytext and ace_yyleng
- * have been set up.
- */
-#ifndef ACE_YY_USER_ACTION
-#define ACE_YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef ACE_YY_BREAK
-#define ACE_YY_BREAK break;
-#endif
-
-#define ACE_YY_RULE_SETUP \
- if ( ace_yyleng > 0 ) \
- ace_yy_current_buffer->ace_yy_at_bol = \
- (ace_yytext[ace_yyleng - 1] == '\n'); \
- ACE_YY_USER_ACTION
-
-ACE_YY_DECL
- {
- register ace_yy_state_type ace_yy_current_state;
- register ACE_TCHAR *ace_yy_cp = 0, *ace_yy_bp = 0;
- register int ace_yy_act;
-
-#line 39 "Svc_Conf.l"
-
-
-
- if ( ace_yy_init )
- {
- ace_yy_init = 0;
-
-#ifdef ACE_YY_USER_INIT
- ACE_YY_USER_INIT;
-#endif
-
- if ( ! ace_yy_start )
- ace_yy_start = 1; /* first start state */
-
- if ( ! ace_yyin )
- ace_yyin = stdin;
-
- if ( ! ace_yyout )
- ace_yyout = stdout;
-
- if ( ! ace_yy_current_buffer )
- ace_yy_current_buffer =
- ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE );
-
- ace_yy_load_buffer_state();
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
- ace_yy_cp = ace_yy_c_buf_p;
-
- /* Support of ace_yytext. */
- *ace_yy_cp = ace_yy_hold_char;
-
- /* ace_yy_bp points to the position in ace_yy_ch_buf of the start of
- * the current run.
- */
- ace_yy_bp = ace_yy_cp;
-
- ace_yy_current_state = ace_yy_start;
- ace_yy_current_state += ACE_YY_AT_BOL();
-ace_yy_match:
- do
- {
- register ACE_YY_CHAR ace_yy_c = ace_yy_ec[ACE_YY_SC_TO_UI(*ace_yy_cp)];
- if ( ace_yy_accept[ace_yy_current_state] )
- {
- ace_yy_last_accepting_state = ace_yy_current_state;
- ace_yy_last_accepting_cpos = ace_yy_cp;
- }
- while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state )
- {
- ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state];
- if ( ace_yy_current_state >= 107 )
- ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c];
- }
- ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c];
- ++ace_yy_cp;
- }
- while ( ace_yy_base[ace_yy_current_state] != 437 );
-
-ace_yy_find_action:
- ace_yy_act = ace_yy_accept[ace_yy_current_state];
- if ( ace_yy_act == 0 )
- { /* have to back up */
- ace_yy_cp = ace_yy_last_accepting_cpos;
- ace_yy_current_state = ace_yy_last_accepting_state;
- ace_yy_act = ace_yy_accept[ace_yy_current_state];
- }
-
- ACE_YY_DO_BEFORE_ACTION;
-
-
-do_action: /* This label is used only to access EOF actions. */
-
-
- switch ( ace_yy_act )
- { /* beginning of action switch */
- case 0: /* must back up */
- /* undo the effects of ACE_YY_DO_BEFORE_ACTION */
- *ace_yy_cp = ace_yy_hold_char;
- ace_yy_cp = ace_yy_last_accepting_cpos;
- ace_yy_current_state = ace_yy_last_accepting_state;
- goto ace_yy_find_action;
-
-case 1:
-*ace_yy_cp = ace_yy_hold_char; /* undo effects of setting up ace_yytext */
-ace_yy_c_buf_p = ace_yy_cp -= 1;
-ACE_YY_DO_BEFORE_ACTION; /* set up ace_yytext again */
-ACE_YY_RULE_SETUP
-#line 41 "Svc_Conf.l"
-; /* EMPTY */
- ACE_YY_BREAK
-case 2:
-ACE_YY_RULE_SETUP
-#line 42 "Svc_Conf.l"
-{ return token (ACE_DYNAMIC); }
- // ACE_YY_BREAK
-case 3:
-ACE_YY_RULE_SETUP
-#line 43 "Svc_Conf.l"
-{ return token (ACE_STATIC); }
-// ACE_YY_BREAK
-case 4:
-ACE_YY_RULE_SETUP
-#line 44 "Svc_Conf.l"
-{ return token (ACE_SUSPEND); }
-// ACE_YY_BREAK
-case 5:
-ACE_YY_RULE_SETUP
-#line 45 "Svc_Conf.l"
-{ return token (ACE_RESUME); }
-// ACE_YY_BREAK
-case 6:
-ACE_YY_RULE_SETUP
-#line 46 "Svc_Conf.l"
-{ return token (ACE_REMOVE); }
-// ACE_YY_BREAK
-case 7:
-ACE_YY_RULE_SETUP
-#line 47 "Svc_Conf.l"
-{ return token (ACE_USTREAM); }
-// ACE_YY_BREAK
-case 8:
-ACE_YY_RULE_SETUP
-#line 48 "Svc_Conf.l"
-{ return token (ACE_MODULE_T); }
-// ACE_YY_BREAK
-case 9:
-ACE_YY_RULE_SETUP
-#line 49 "Svc_Conf.l"
-{ return token (ACE_SVC_OBJ_T); }
-// ACE_YY_BREAK
-case 10:
-ACE_YY_RULE_SETUP
-#line 50 "Svc_Conf.l"
-{ return token (ACE_STREAM_T); }
-// ACE_YY_BREAK
-case 11:
-ACE_YY_RULE_SETUP
-#line 51 "Svc_Conf.l"
-{ return token (ACE_ACTIVE); }
-// ACE_YY_BREAK
-case 12:
-ACE_YY_RULE_SETUP
-#line 52 "Svc_Conf.l"
-{ return token (ACE_INACTIVE); }
-// ACE_YY_BREAK
-case 13:
-ACE_YY_RULE_SETUP
-#line 53 "Svc_Conf.l"
-{ return token (ACE_COLON); }
-// ACE_YY_BREAK
-case 14:
-ACE_YY_RULE_SETUP
-#line 54 "Svc_Conf.l"
-{ return token (ACE_STAR); }
-// ACE_YY_BREAK
-case 15:
-ACE_YY_RULE_SETUP
-#line 55 "Svc_Conf.l"
-{ return token (ACE_LPAREN); }
-// ACE_YY_BREAK
-case 16:
-ACE_YY_RULE_SETUP
-#line 56 "Svc_Conf.l"
-{ return token (ACE_RPAREN); }
-// ACE_YY_BREAK
-case 17:
-ACE_YY_RULE_SETUP
-#line 57 "Svc_Conf.l"
-{ return token (ACE_LBRACE); }
-// ACE_YY_BREAK
-case 18:
-ACE_YY_RULE_SETUP
-#line 58 "Svc_Conf.l"
-{ return token (ACE_RBRACE); }
-// ACE_YY_BREAK
-case 19:
-ACE_YY_RULE_SETUP
-#line 59 "Svc_Conf.l"
-{ // Check for first type of string, i.e.,
- // "double quotes" delimited.
- ACE_TCHAR *s = ACE_OS::strrchr (ace_yytext, '"');
- if (s == 0)
- // Check for second type of string, i.e.,
- // 'single quotes' delimited.
- s = ACE_OS::strrchr (ace_yytext, '\'');
-
- ACE_ASSERT (s != 0);
- // Eliminate the opening and closing double or
- // single quotes.
- *s = '\0';
- ace_yyleng -= 1;
- ace_yylval.ident_ = ace_obstack->copy (ace_yytext + 1, ace_yyleng);
- return token (ACE_STRING); }
-// ACE_YY_BREAK
-case 20:
-ACE_YY_RULE_SETUP
-#line 74 "Svc_Conf.l"
-{
- ace_yylval.ident_ = ace_obstack->copy (ace_yytext, ace_yyleng);
- return token (ACE_IDENT);
- }
-// ACE_YY_BREAK
-case 21:
-ACE_YY_RULE_SETUP
-#line 78 "Svc_Conf.l"
-{
- ace_yylval.ident_ = ace_obstack->copy (ace_yytext, ace_yyleng);
- return token (ACE_PATHNAME);
- }
-// ACE_YY_BREAK
-case 22:
-ACE_YY_RULE_SETUP
-#line 82 "Svc_Conf.l"
-; /* EMPTY */
- ACE_YY_BREAK
-case 23:
-ACE_YY_RULE_SETUP
-#line 83 "Svc_Conf.l"
-{ ace_yylineno++; }
- ACE_YY_BREAK
-case 24:
-ACE_YY_RULE_SETUP
-#line 84 "Svc_Conf.l"
-{ ACE_ERROR ((LM_ERROR, ACE_TEXT ("unknown character = (%d"), *ace_yytext));
- if (ACE_OS::ace_isprint (*ace_yytext))
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("|%c"), *ace_yytext));
- ACE_ERROR ((LM_ERROR, ACE_TEXT (")\n")));
- }
- ACE_YY_BREAK
-case ACE_YY_STATE_EOF(INITIAL):
-case ACE_YY_STATE_EOF(PARAMETERS):
-case ACE_YY_STATE_EOF(NORMAL):
-#line 89 "Svc_Conf.l"
-{ ACE_YY_NEW_FILE; ace_yyterminate(); }
-// ACE_YY_BREAK
-case 25:
-ACE_YY_RULE_SETUP
-#line 90 "Svc_Conf.l"
-ACE_SVC_CONF_ECHO;
- ACE_YY_BREAK
-
- case ACE_YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB ACE_TCHAR. */
- int ace_yy_amount_of_matched_text = (int) (ace_yy_cp - ace_yytext_ptr) - 1;
-
- /* Undo the effects of ACE_YY_DO_BEFORE_ACTION. */
- *ace_yy_cp = ace_yy_hold_char;
- ACE_YY_RESTORE_ACE_YY_MORE_OFFSET
-
- if ( ace_yy_current_buffer->ace_yy_buffer_status == ACE_YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed ace_yyin at a new source and called
- * ace_yylex(). If so, then we have to assure
- * consistency between ace_yy_current_buffer and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- ace_yy_n_chars = ace_yy_current_buffer->ace_yy_n_chars;
- ace_yy_current_buffer->ace_yy_input_file = ace_yyin;
- ace_yy_current_buffer->ace_yy_buffer_status = ACE_YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for ace_yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since ace_yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( ace_yy_c_buf_p <= &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars] )
- { /* This was really a NUL. */
- ace_yy_state_type ace_yy_next_state;
-
- ace_yy_c_buf_p = ace_yytext_ptr + ace_yy_amount_of_matched_text;
-
- ace_yy_current_state = ace_yy_get_previous_state();
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * ace_yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- ace_yy_next_state = ace_yy_try_NUL_trans( ace_yy_current_state );
-
- ace_yy_bp = ace_yytext_ptr + ACE_YY_MORE_ADJ;
-
- if ( ace_yy_next_state )
- {
- /* Consume the NUL. */
- ace_yy_cp = ++ace_yy_c_buf_p;
- ace_yy_current_state = ace_yy_next_state;
- goto ace_yy_match;
- }
-
- else
- {
- ace_yy_cp = ace_yy_c_buf_p;
- goto ace_yy_find_action;
- }
- }
-
- else switch ( ace_yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- ace_yy_did_buffer_switch_on_eof = 0;
-
- if ( ace_yywrap() )
- {
- /* Note: because we've taken care in
- * ace_yy_get_next_buffer() to have set up
- * ace_yytext, we can now set up
- * ace_yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * ACE_YY_NULL, it'll still work - another
- * ACE_YY_NULL will get returned.
- */
- ace_yy_c_buf_p = ace_yytext_ptr + ACE_YY_MORE_ADJ;
-
- ace_yy_act = ACE_YY_STATE_EOF(ACE_YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! ace_yy_did_buffer_switch_on_eof )
- ACE_YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- ace_yy_c_buf_p =
- ace_yytext_ptr + ace_yy_amount_of_matched_text;
-
- ace_yy_current_state = ace_yy_get_previous_state();
-
- ace_yy_cp = ace_yy_c_buf_p;
- ace_yy_bp = ace_yytext_ptr + ACE_YY_MORE_ADJ;
- goto ace_yy_match;
-
- case EOB_ACT_LAST_MATCH:
- ace_yy_c_buf_p =
- &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars];
-
- ace_yy_current_state = ace_yy_get_previous_state();
-
- ace_yy_cp = ace_yy_c_buf_p;
- ace_yy_bp = ace_yytext_ptr + ACE_YY_MORE_ADJ;
- goto ace_yy_find_action;
- }
- break;
- }
-
- default:
- ACE_YY_FATAL_ERROR(
- ACE_TEXT ("fatal flex scanner internal error--no action found" ));
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of ace_yylex */
-
-
-/* ace_yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-
-static int ace_yy_get_next_buffer()
- {
- register ACE_TCHAR *dest = ace_yy_current_buffer->ace_yy_ch_buf;
- register ACE_TCHAR *source = ace_yytext_ptr;
- register int number_to_move, i;
- int ret_val;
-
- if ( ace_yy_c_buf_p > &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars + 1] )
- ACE_YY_FATAL_ERROR(
- ACE_TEXT ("fatal flex scanner internal error--end of buffer missed" ));
-
- if ( ace_yy_current_buffer->ace_yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( ace_yy_c_buf_p - ace_yytext_ptr - ACE_YY_MORE_ADJ == 1 )
- {
- /* We matched a single character, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = (int) (ace_yy_c_buf_p - ace_yytext_ptr) - 1;
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( ace_yy_current_buffer->ace_yy_buffer_status == ACE_YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars = 0;
-
- else
- {
- int num_to_read =
- ace_yy_current_buffer->ace_yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-#ifdef ACE_YY_USES_REJECT
- ACE_YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
- /* just a shorter name for the current buffer */
- ACE_YY_BUFFER_STATE b = ace_yy_current_buffer;
-
- int ace_yy_c_buf_p_offset =
- (int) (ace_yy_c_buf_p - b->ace_yy_ch_buf);
-
- if ( b->ace_yy_is_our_buffer )
- {
- int new_size = b->ace_yy_buf_size * 2;
-
- if ( new_size <= 0 )
- b->ace_yy_buf_size += b->ace_yy_buf_size / 8;
- else
- b->ace_yy_buf_size *= 2;
-
- b->ace_yy_ch_buf = (ACE_TCHAR *)
- /* Include room in for 2 EOB chars. */
- ace_yy_flex_realloc( (void *) b->ace_yy_ch_buf,
- b->ace_yy_buf_size + 2 );
- }
- else
- /* Can't grow it, we don't own it. */
- b->ace_yy_ch_buf = 0;
-
- if ( ! b->ace_yy_ch_buf )
- ACE_YY_FATAL_ERROR(
- ACE_TEXT ("fatal error - scanner input buffer overflow") );
-
- ace_yy_c_buf_p = &b->ace_yy_ch_buf[ace_yy_c_buf_p_offset];
-
- num_to_read = ace_yy_current_buffer->ace_yy_buf_size -
- number_to_move - 1;
-#endif
- }
-
- if ( num_to_read > ACE_YY_READ_BUF_SIZE )
- num_to_read = ACE_YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- ACE_YY_INPUT( (&ace_yy_current_buffer->ace_yy_ch_buf[number_to_move]),
- ace_yy_n_chars, num_to_read );
-
- ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars;
- }
-
- if ( ace_yy_n_chars == 0 )
- {
- if ( number_to_move == ACE_YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- ace_yyrestart( ace_yyin );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- ace_yy_current_buffer->ace_yy_buffer_status =
- ACE_YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- ace_yy_n_chars += number_to_move;
- ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars] = ACE_YY_END_OF_BUFFER_CHAR;
- ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars + 1] = ACE_YY_END_OF_BUFFER_CHAR;
-
- ace_yytext_ptr = &ace_yy_current_buffer->ace_yy_ch_buf[0];
-
- return ret_val;
- }
-
-
-/* ace_yy_get_previous_state - get the state just before the EOB ACE_TCHAR was reached */
-
-static ace_yy_state_type ace_yy_get_previous_state()
- {
- register ace_yy_state_type ace_yy_current_state;
- register ACE_TCHAR *ace_yy_cp;
-
- ace_yy_current_state = ace_yy_start;
- ace_yy_current_state += ACE_YY_AT_BOL();
-
- for ( ace_yy_cp = ace_yytext_ptr + ACE_YY_MORE_ADJ; ace_yy_cp < ace_yy_c_buf_p; ++ace_yy_cp )
- {
- register ACE_YY_CHAR ace_yy_c = (*ace_yy_cp ? ace_yy_ec[ACE_YY_SC_TO_UI(*ace_yy_cp)] : 1);
- if ( ace_yy_accept[ace_yy_current_state] )
- {
- ace_yy_last_accepting_state = ace_yy_current_state;
- ace_yy_last_accepting_cpos = ace_yy_cp;
- }
- while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state )
- {
- ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state];
- if ( ace_yy_current_state >= 107 )
- ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c];
- }
- ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c];
- }
-
- return ace_yy_current_state;
- }
-
-
-/* ace_yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = ace_yy_try_NUL_trans( current_state );
- */
-
-#ifdef ACE_YY_USE_PROTOS
-static ace_yy_state_type ace_yy_try_NUL_trans( ace_yy_state_type ace_yy_current_state )
-#else
-static ace_yy_state_type ace_yy_try_NUL_trans( ace_yy_current_state )
-ace_yy_state_type ace_yy_current_state;
-#endif
- {
- register int ace_yy_is_jam;
- register ACE_TCHAR *ace_yy_cp = ace_yy_c_buf_p;
-
- register ACE_YY_CHAR ace_yy_c = 1;
- if ( ace_yy_accept[ace_yy_current_state] )
- {
- ace_yy_last_accepting_state = ace_yy_current_state;
- ace_yy_last_accepting_cpos = ace_yy_cp;
- }
- while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state )
- {
- ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state];
- if ( ace_yy_current_state >= 107 )
- ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c];
- }
- ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c];
- ace_yy_is_jam = (ace_yy_current_state == 106);
-
- return ace_yy_is_jam ? 0 : ace_yy_current_state;
- }
-
-
-#ifndef ACE_YY_NO_UNPUT
-#ifdef ACE_YY_USE_PROTOS
-static void ace_yyunput( int c, register ACE_TCHAR *ace_yy_bp )
-#else
-static void ace_yyunput( c, ace_yy_bp )
-int c;
-register ACE_TCHAR *ace_yy_bp;
-#endif
- {
- register ACE_TCHAR *ace_yy_cp = ace_yy_c_buf_p;
-
- /* undo effects of setting up ace_yytext */
- *ace_yy_cp = ace_yy_hold_char;
-
- if ( ace_yy_cp < ace_yy_current_buffer->ace_yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register int number_to_move = ace_yy_n_chars + 2;
- register ACE_TCHAR *dest = &ace_yy_current_buffer->ace_yy_ch_buf[
- ace_yy_current_buffer->ace_yy_buf_size + 2];
- register ACE_TCHAR *source =
- &ace_yy_current_buffer->ace_yy_ch_buf[number_to_move];
-
- while ( source > ace_yy_current_buffer->ace_yy_ch_buf )
- *--dest = *--source;
-
- ace_yy_cp += (int) (dest - source);
- ace_yy_bp += (int) (dest - source);
- ace_yy_current_buffer->ace_yy_n_chars =
- ace_yy_n_chars = ace_yy_current_buffer->ace_yy_buf_size;
-
- if ( ace_yy_cp < ace_yy_current_buffer->ace_yy_ch_buf + 2 )
- ACE_YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--ace_yy_cp = (ACE_TCHAR) c;
-
-
- ace_yytext_ptr = ace_yy_bp;
- ace_yy_hold_char = *ace_yy_cp;
- ace_yy_c_buf_p = ace_yy_cp;
- }
-#endif /* ifndef ACE_YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int ace_yyinput()
-#else
-static int input()
-#endif
- {
- int c;
-
- *ace_yy_c_buf_p = ace_yy_hold_char;
-
- if ( *ace_yy_c_buf_p == ACE_YY_END_OF_BUFFER_CHAR )
- {
- /* ace_yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( ace_yy_c_buf_p < &ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars] )
- /* This was really a NUL. */
- *ace_yy_c_buf_p = '\0';
-
- else
- { /* need more input */
- int offset = ace_yy_c_buf_p - ace_yytext_ptr;
- ++ace_yy_c_buf_p;
-
- switch ( ace_yy_get_next_buffer() )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because ace_yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- ace_yyrestart( ace_yyin );
-
- /* fall through */
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( ace_yywrap() )
- return EOF;
-
- if ( ! ace_yy_did_buffer_switch_on_eof )
- ACE_YY_NEW_FILE;
-#ifdef __cplusplus
- return ace_yyinput();
-#else
- return input();
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- ace_yy_c_buf_p = ace_yytext_ptr + offset;
- break;
- }
- }
- }
-
- c = *(unsigned char *) ace_yy_c_buf_p; /* cast for 8-bit char's */
- *ace_yy_c_buf_p = '\0'; /* preserve ace_yytext */
- ace_yy_hold_char = *++ace_yy_c_buf_p;
-
- ace_yy_current_buffer->ace_yy_at_bol = (c == '\n');
-
- return c;
- }
-
-
-#ifdef ACE_YY_USE_PROTOS
-void ace_yyrestart( FILE *input_file )
-#else
-void ace_yyrestart( input_file )
-FILE *input_file;
-#endif
- {
- if ( ! ace_yy_current_buffer )
- ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE );
-
- ace_yy_init_buffer( ace_yy_current_buffer, input_file );
- ace_yy_load_buffer_state();
- }
-
-
-#ifdef ACE_YY_USE_PROTOS
-void ace_yy_switch_to_buffer( ACE_YY_BUFFER_STATE new_buffer )
-#else
-void ace_yy_switch_to_buffer( new_buffer )
-ACE_YY_BUFFER_STATE new_buffer;
-#endif
- {
- if ( ace_yy_current_buffer == new_buffer )
- return;
-
- if ( ace_yy_current_buffer )
- {
- /* Flush out information for old buffer. */
- *ace_yy_c_buf_p = ace_yy_hold_char;
- ace_yy_current_buffer->ace_yy_buf_pos = ace_yy_c_buf_p;
- ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars;
- }
-
- ace_yy_current_buffer = new_buffer;
- ace_yy_load_buffer_state();
-
- /* We don't actually know whether we did this switch during
- * EOF (ace_yywrap()) processing, but the only time this flag
- * is looked at is after ace_yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- ace_yy_did_buffer_switch_on_eof = 1;
- }
-
-
-#ifdef ACE_YY_USE_PROTOS
-void ace_yy_load_buffer_state( void )
-#else
-void ace_yy_load_buffer_state()
-#endif
- {
- ace_yy_n_chars = ace_yy_current_buffer->ace_yy_n_chars;
- ace_yytext_ptr = ace_yy_c_buf_p = ace_yy_current_buffer->ace_yy_buf_pos;
- ace_yyin = ace_yy_current_buffer->ace_yy_input_file;
- ace_yy_hold_char = *ace_yy_c_buf_p;
- }
-
-
-#ifdef ACE_YY_USE_PROTOS
-ACE_YY_BUFFER_STATE ace_yy_create_buffer( FILE *file, int size )
-#else
-ACE_YY_BUFFER_STATE ace_yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
- {
- ACE_YY_BUFFER_STATE b;
-
- b = (ACE_YY_BUFFER_STATE) ace_yy_flex_alloc( sizeof( struct ace_yy_buffer_state ) );
- if ( ! b )
- ACE_YY_FATAL_ERROR( ACE_TEXT ("out of dynamic memory in ace_yy_create_buffer()") );
-
- b->ace_yy_buf_size = size;
-
- /* ace_yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->ace_yy_ch_buf = (ACE_TCHAR *) ace_yy_flex_alloc( b->ace_yy_buf_size + 2 );
- if ( ! b->ace_yy_ch_buf )
- ACE_YY_FATAL_ERROR( ACE_TEXT ("out of dynamic memory in ace_yy_create_buffer()") );
-
- b->ace_yy_is_our_buffer = 1;
-
- ace_yy_init_buffer( b, file );
-
- return b;
- }
-
-
-#ifdef ACE_YY_USE_PROTOS
-void ace_yy_delete_buffer( ACE_YY_BUFFER_STATE b )
-#else
-void ace_yy_delete_buffer( b )
-ACE_YY_BUFFER_STATE b;
-#endif
- {
- if ( ! b )
- return;
-
- if ( b == ace_yy_current_buffer )
- ace_yy_current_buffer = (ACE_YY_BUFFER_STATE) 0;
-
- if ( b->ace_yy_is_our_buffer )
- ace_yy_flex_free( (void *) b->ace_yy_ch_buf );
-
- ace_yy_flex_free( (void *) b );
- }
-
-
-#ifndef ACE_YY_ALWAYS_INTERACTIVE
-#ifndef ACE_YY_NEVER_INTERACTIVE
-extern int nop_isatty ACE_YY_PROTO(( int ));
-#endif
-#endif
-
-#ifdef ACE_YY_USE_PROTOS
-void ace_yy_init_buffer( ACE_YY_BUFFER_STATE b, FILE *file )
-#else
-void ace_yy_init_buffer( b, file )
-ACE_YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
- {
- ace_yy_flush_buffer( b );
-
- b->ace_yy_input_file = file;
- b->ace_yy_fill_buffer = 1;
-
-#if ACE_YY_ALWAYS_INTERACTIVE
- b->ace_yy_is_interactive = 1;
-#else
-#if ACE_YY_NEVER_INTERACTIVE
- b->ace_yy_is_interactive = 0;
-#else
- b->ace_yy_is_interactive = file ? (ACE_OS::isatty( fileno (file) ) > 0) : 0;
-#endif
-#endif
- }
-
-
-#ifdef ACE_YY_USE_PROTOS
-void ace_yy_flush_buffer( ACE_YY_BUFFER_STATE b )
-#else
-void ace_yy_flush_buffer( b )
-ACE_YY_BUFFER_STATE b;
-#endif
-
- {
- if ( ! b )
- return;
-
- b->ace_yy_n_chars = 0;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->ace_yy_ch_buf[0] = ACE_YY_END_OF_BUFFER_CHAR;
- b->ace_yy_ch_buf[1] = ACE_YY_END_OF_BUFFER_CHAR;
-
- b->ace_yy_buf_pos = &b->ace_yy_ch_buf[0];
-
- b->ace_yy_at_bol = 1;
- b->ace_yy_buffer_status = ACE_YY_BUFFER_NEW;
-
- if ( b == ace_yy_current_buffer )
- ace_yy_load_buffer_state();
- }
-
-
-#ifndef ACE_YY_NO_SCAN_BUFFER
-#ifdef ACE_YY_USE_PROTOS
-ACE_YY_BUFFER_STATE ace_yy_scan_buffer( ACE_TCHAR *base, ace_yy_size_t size )
-#else
-ACE_YY_BUFFER_STATE ace_yy_scan_buffer( base, size )
-ACE_TCHAR *base;
-ace_yy_size_t size;
-#endif
- {
- ACE_YY_BUFFER_STATE b;
-
- if ( size < 2 ||
- base[size-2] != ACE_YY_END_OF_BUFFER_CHAR ||
- base[size-1] != ACE_YY_END_OF_BUFFER_CHAR )
- /* They forgot to leave room for the EOB's. */
- return 0;
-
- b = (ACE_YY_BUFFER_STATE) ace_yy_flex_alloc( sizeof( struct ace_yy_buffer_state ) );
- if ( ! b )
- ACE_YY_FATAL_ERROR( ACE_TEXT ("out of dynamic memory in ace_yy_scan_buffer()") );
-
- b->ace_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- b->ace_yy_buf_pos = b->ace_yy_ch_buf = base;
- b->ace_yy_is_our_buffer = 0;
- b->ace_yy_input_file = 0;
- b->ace_yy_n_chars = b->ace_yy_buf_size;
- b->ace_yy_is_interactive = 0;
- b->ace_yy_at_bol = 1;
- b->ace_yy_fill_buffer = 0;
- b->ace_yy_buffer_status = ACE_YY_BUFFER_NEW;
-
- ace_yy_switch_to_buffer( b );
-
- return b;
- }
-#endif
-
-
-#ifndef ACE_YY_NO_SCAN_STRING
-#ifdef ACE_YY_USE_PROTOS
-ACE_YY_BUFFER_STATE ace_yy_scan_string( ace_yyconst ACE_TCHAR *ace_yy_str )
-#else
-ACE_YY_BUFFER_STATE ace_yy_scan_string( ace_yy_str )
-ace_yyconst ACE_TCHAR *ace_yy_str;
-#endif
- {
- int len;
- for ( len = 0; ace_yy_str[len]; ++len )
- ;
-
- return ace_yy_scan_bytes( ace_yy_str, len );
- }
-#endif
-
-
-#ifndef ACE_YY_NO_SCAN_BYTES
-#ifdef ACE_YY_USE_PROTOS
-ACE_YY_BUFFER_STATE ace_yy_scan_bytes( ace_yyconst ACE_TCHAR *bytes, int len )
-#else
-ACE_YY_BUFFER_STATE ace_yy_scan_bytes( bytes, len )
-ace_yyconst ACE_TCHAR *bytes;
-int len;
-#endif
- {
- ACE_YY_BUFFER_STATE b;
- ACE_TCHAR *buf;
- ace_yy_size_t n;
- int i;
-
- /* Get memory for full buffer, including space for trailing EOB's. */
- n = len + 2;
- buf = (ACE_TCHAR *) ace_yy_flex_alloc( n );
- if ( ! buf )
- ACE_YY_FATAL_ERROR( ACE_TEXT ("out of dynamic memory in ace_yy_scan_bytes()") );
-
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
-
- buf[len] = buf[len+1] = ACE_YY_END_OF_BUFFER_CHAR;
-
- b = ace_yy_scan_buffer( buf, n );
- if ( ! b )
- ACE_YY_FATAL_ERROR( ACE_TEXT ("bad buffer in ace_yy_scan_bytes()") );
-
- /* It's okay to grow etc. this buffer, and we should throw it
- * away when we're done.
- */
- b->ace_yy_is_our_buffer = 1;
-
- return b;
- }
-#endif
-
-
-#ifndef ACE_YY_NO_PUSH_STATE
-#ifdef ACE_YY_USE_PROTOS
-static void ace_yy_push_state( int new_state )
-#else
-static void ace_yy_push_state( new_state )
-int new_state;
-#endif
- {
- if ( ace_yy_start_stack_ptr >= ace_yy_start_stack_depth )
- {
- ace_yy_size_t new_size;
-
- ace_yy_start_stack_depth += ACE_YY_START_STACK_INCR;
- new_size = ace_yy_start_stack_depth * sizeof( int );
-
- if ( ! ace_yy_start_stack )
- ace_yy_start_stack = (int *) ace_yy_flex_alloc( new_size );
-
- else
- ace_yy_start_stack = (int *) ace_yy_flex_realloc(
- (void *) ace_yy_start_stack, new_size );
-
- if ( ! ace_yy_start_stack )
- ACE_YY_FATAL_ERROR(
- ACE_TEXT ("out of memory expanding start-condition stack") );
- }
-
- ace_yy_start_stack[ace_yy_start_stack_ptr++] = ACE_YY_START;
-
- BEGIN(new_state);
- }
-#endif
-
-
-#ifndef ACE_YY_NO_POP_STATE
-static void ace_yy_pop_state()
- {
- if ( --ace_yy_start_stack_ptr < 0 )
- ACE_YY_FATAL_ERROR( ACE_TEXT ("start-condition stack underflow") );
-
- BEGIN(ace_yy_start_stack[ace_yy_start_stack_ptr]);
- }
-#endif
-
-
-#ifndef ACE_YY_NO_TOP_STATE
-static int ace_yy_top_state()
- {
- return ace_yy_start_stack[ace_yy_start_stack_ptr - 1];
- }
-#endif
-
-#ifndef ACE_YY_EXIT_FAILURE
-#define ACE_YY_EXIT_FAILURE 2
-#endif
-
-#ifdef ACE_YY_USE_PROTOS
-static void ace_yy_fatal_error( ace_yyconst ACE_TCHAR msg[] )
-#else
-static void ace_yy_fatal_error( msg )
-ACE_TCHAR msg[];
-#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( ACE_YY_EXIT_FAILURE );
- }
-
-
-
-/* Redefine ace_yyless() so it works in section 3 code. */
-
-#undef ace_yyless
-#define ace_yyless(n) \
- do \
- { \
- /* Undo effects of setting up ace_yytext. */ \
- ace_yytext[ace_yyleng] = ace_yy_hold_char; \
- ace_yy_c_buf_p = ace_yytext + n; \
- ace_yy_hold_char = *ace_yy_c_buf_p; \
- *ace_yy_c_buf_p = '\0'; \
- ace_yyleng = n; \
- } \
- while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef ace_yytext_ptr
-#ifdef ACE_YY_USE_PROTOS
-static void ace_yy_flex_strncpy( ACE_TCHAR *s1, ace_yyconst ACE_TCHAR *s2, int n )
-#else
-static void ace_yy_flex_strncpy( s1, s2, n )
-ACE_TCHAR *s1;
-ace_yyconst ACE_TCHAR *s2;
-int n;
-#endif
- {
- register int i;
- for ( i = 0; i < n; ++i )
- s1[i] = s2[i];
- }
-#endif
-
-#ifdef ACE_YY_NEED_STRLEN
-#ifdef ACE_YY_USE_PROTOS
-static int ace_yy_flex_strlen( ace_yyconst ACE_TCHAR *s )
-#else
-static int ace_yy_flex_strlen( s )
-ace_yyconst ACE_TCHAR *s;
-#endif
- {
- register int n;
- for ( n = 0; s[n]; ++n )
- ;
-
- return n;
- }
-#endif
-
-
-#ifdef ACE_YY_USE_PROTOS
-static void *ace_yy_flex_alloc( ace_yy_size_t size )
-#else
-static void *ace_yy_flex_alloc( size )
-ace_yy_size_t size;
-#endif
- {
- return (void *) malloc( size );
- }
-
-#ifdef ACE_YY_USE_PROTOS
-static void *ace_yy_flex_realloc( void *ptr, ace_yy_size_t size )
-#else
-static void *ace_yy_flex_realloc( ptr, size )
-void *ptr;
-ace_yy_size_t size;
-#endif
- {
- /* The cast to (ACE_TCHAR *) in the following accommodates both
- * implementations that use ACE_TCHAR* generic pointers, and those
- * that use void* generic pointers. It works with the latter
- * because both ANSI C and C++ allow castless assignment from
- * any pointer type to void*, and deal with argument conversions
- * as though doing an assignment.
- */
- return (void *) realloc( (ACE_TCHAR *) ptr, size );
- }
-
-#ifdef ACE_YY_USE_PROTOS
-static void ace_yy_flex_free( void *ptr )
-#else
-static void ace_yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ACE_MALLOC_T (ptr) );
- }
-
-#if ACE_YY_MAIN
-int main()
- {
- ace_yylex();
- return 0;
- }
-#endif
-#line 90 "Svc_Conf.l"
-
-int
-ace_yywrap (void)
-{
- ::fflush (ace_yyin);
- ace_yytext[0] = '#';
- ace_yyleng = 0;
-
- // This needs to be freed to prevent a memory leak.
- ace_yy_delete_parse_buffer ();
-
- return 1;
-}
-
-void
-ace_yy_delete_parse_buffer (void)
-{
- if (ace_yy_current_buffer != 0)
- {
- ace_yy_delete_buffer (ace_yy_current_buffer);
- ace_yy_current_buffer = 0;
- }
-}
diff --git a/ace/Svc_Conf_y.cpp b/ace/Svc_Conf_y.cpp
deleted file mode 100644
index 59b4426e0fa..00000000000
--- a/ace/Svc_Conf_y.cpp
+++ /dev/null
@@ -1,1041 +0,0 @@
-#ifndef lint
-char ace_yysccsid[] = "@(#)yaccpar 1.4 (Berkeley) 02/25/90 \n\
- Modified 5/2/90 by J. Roskind to support graphic debugging modes";
-#endif
-#line 2 "Svc_Conf.y"
-/* $Id$*/
-#include "ace/ARGV.h"
-#include "ace/Svc_Conf.h"
-#include "ace/Module.h"
-#include "ace/Stream.h"
-
-ACE_RCSID(ace, Svc_Conf_y, "$Id$")
-
-/* Prototypes.*/
-static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
- ACE_Static_Node *svc_type);
-static ACE_Module_Type *ace_get_module (ACE_Static_Node *str_rec,
- const ACE_TCHAR *svc_name);
-
-#define ACE_YYDEBUG_LEXER_TEXT (ace_yytext[ace_yyleng] = ACE_TEXT ('\0'), ace_yytext)
-
-/* Force the pretty debugging code to compile.*/
-/* #define ACE_YYDEBUG 1*/
-
-/* Efficient memory allocation technique.*/
-ACE_Obstack *ace_obstack;
-
-#line 30 "Svc_Conf_y.cpp"
-#define ACE_DYNAMIC 257
-#define ACE_STATIC 258
-#define ACE_SUSPEND 259
-#define ACE_RESUME 260
-#define ACE_REMOVE 261
-#define ACE_USTREAM 262
-#define ACE_MODULE_T 263
-#define ACE_STREAM_T 264
-#define ACE_SVC_OBJ_T 265
-#define ACE_ACTIVE 266
-#define ACE_INACTIVE 267
-#define ACE_PATHNAME 268
-#define ACE_IDENT 269
-#define ACE_STRING 270
-#define ACE_LPAREN 271
-#define ACE_RPAREN 272
-#define ACE_LBRACE 273
-#define ACE_RBRACE 274
-#define ACE_STAR 275
-#define ACE_COLON 276
-#define ACE_YYERRCODE 256
-short ace_yylhs[] = { -1,
- 0, 0, 0, 14, 14, 14, 14, 14, 14, 5,
- 6, 7, 8, 9, 11, 18, 11, 15, 15, 19,
- 12, 12, 10, 10, 13, 13, 13, 13, 13, 16,
- 4, 4, 4, 17, 17, 17, 3, 3, 3, 2,
- 2, 1, 1,
-};
-short ace_yylen[] = { 2,
- 2, 2, 0, 1, 1, 1, 1, 1, 1, 3,
- 3, 2, 2, 2, 3, 0, 4, 1, 1, 0,
- 4, 0, 2, 0, 1, 1, 1, 1, 1, 4,
- 1, 1, 0, 3, 5, 4, 2, 2, 2, 1,
- 0, 1, 1,
-};
-short ace_yydefred[] = { 3,
- 0, 2, 0, 0, 0, 0, 0, 0, 4, 5,
- 6, 7, 8, 9, 1, 0, 0, 0, 12, 13,
- 14, 16, 18, 19, 0, 0, 0, 0, 0, 40,
- 10, 11, 0, 20, 15, 37, 39, 38, 42, 43,
- 0, 0, 0, 17, 24, 0, 0, 31, 32, 30,
- 0, 0, 0, 21, 25, 26, 27, 28, 29, 23,
- 36, 0, 35,
-};
-short ace_yydgoto[] = { 1,
- 42, 31, 29, 50, 9, 10, 11, 12, 13, 51,
- 14, 35, 60, 15, 25, 17, 43, 33, 45,
-};
-short ace_yysindex[] = { 0,
- -228, 0, -266, -260, -254, -246, -244, -247, 0, 0,
- 0, 0, 0, 0, 0, -251, -235, -235, 0, 0,
- 0, 0, 0, 0, -237, -249, -238, -236, -252, 0,
- 0, 0, -237, 0, 0, 0, 0, 0, 0, 0,
- -231, -234, -248, 0, 0, -230, -229, 0, 0, 0,
- -253, -225, -227, 0, 0, 0, 0, 0, 0, 0,
- 0, -224, 0,
-};
-short ace_yyrindex[] = { 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 27, 27, 0, 0,
- 0, 0, 0, 0, 46, 0, 0, 0, 0, 0,
- 0, 0, 46, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 20, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,
-};
-short ace_yygindex[] = { 0,
- 0, 31, 0, 0, -8, -6, -1, 2, 3, 0,
- 0, 18, 0, 0, 0, 0, 0, 0, 0,
-};
-#define ACE_YYTABLESIZE 308
-short ace_yytable[] = { 23,
- 34, 24, 16, 3, 4, 5, 6, 7, 18, 3,
- 4, 26, 27, 28, 19, 39, 40, 48, 49, 33,
- 54, 22, 20, 41, 21, 36, 41, 2, 3, 4,
- 5, 6, 7, 8, 30, 34, 37, 46, 38, 53,
- 52, 47, 55, 62, 56, 22, 61, 63, 32, 57,
- 44, 0, 58, 59, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 34, 34, 34, 34,
- 34, 34, 34, 0, 0, 0, 34, 34, 0, 0,
- 34, 0, 0, 34, 34, 33, 33, 33, 33, 33,
- 33, 33, 41, 41, 41, 41, 41, 41, 41, 33,
- 0, 0, 33, 33, 0, 0, 0, 0, 0, 41,
- 41, 22, 22, 22, 22, 22, 22, 22,
-};
-short ace_yycheck[] = { 8,
- 0, 8, 269, 257, 258, 259, 260, 261, 269, 257,
- 258, 263, 264, 265, 269, 268, 269, 266, 267, 0,
- 274, 269, 269, 276, 269, 275, 0, 256, 257, 258,
- 259, 260, 261, 262, 270, 273, 275, 269, 275, 269,
- 271, 276, 51, 271, 51, 0, 272, 272, 18, 51,
- 33, -1, 51, 51, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 256, 257, 258, 259,
- 260, 261, 262, -1, -1, -1, 266, 267, -1, -1,
- 270, -1, -1, 273, 274, 256, 257, 258, 259, 260,
- 261, 262, 256, 257, 258, 259, 260, 261, 262, 270,
- -1, -1, 273, 274, -1, -1, -1, -1, -1, 273,
- 274, 256, 257, 258, 259, 260, 261, 262,
-};
-#define ACE_YYFINAL 1
-#ifndef ACE_YYDEBUG
-#define ACE_YYDEBUG 0
-#endif
-#define ACE_YYMAXTOKEN 276
-#if ACE_YYDEBUG
-const char *ace_yyname[] = {
-"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"ACE_DYNAMIC","ACE_STATIC",
-"ACE_SUSPEND","ACE_RESUME","ACE_REMOVE","ACE_USTREAM","ACE_MODULE_T",
-"ACE_STREAM_T","ACE_SVC_OBJ_T","ACE_ACTIVE","ACE_INACTIVE","ACE_PATHNAME",
-"ACE_IDENT","ACE_STRING","ACE_LPAREN","ACE_RPAREN","ACE_LBRACE","ACE_RBRACE",
-"ACE_STAR","ACE_COLON",
-};
-const char *ace_yyrule[] = {
-"$accept : svc_config_entries",
-"svc_config_entries : svc_config_entries svc_config_entry",
-"svc_config_entries : svc_config_entries error",
-"svc_config_entries :",
-"svc_config_entry : dynamic",
-"svc_config_entry : static",
-"svc_config_entry : suspend",
-"svc_config_entry : resume",
-"svc_config_entry : remove",
-"svc_config_entry : stream",
-"dynamic : ACE_DYNAMIC svc_location parameters_opt",
-"static : ACE_STATIC ACE_IDENT parameters_opt",
-"suspend : ACE_SUSPEND ACE_IDENT",
-"resume : ACE_RESUME ACE_IDENT",
-"remove : ACE_REMOVE ACE_IDENT",
-"stream : ACE_USTREAM stream_ops stream_modules",
-"$$1 :",
-"stream : ACE_USTREAM ACE_IDENT $$1 stream_modules",
-"stream_ops : dynamic",
-"stream_ops : static",
-"$$2 :",
-"stream_modules : ACE_LBRACE $$2 module_list ACE_RBRACE",
-"stream_modules :",
-"module_list : module_list module",
-"module_list :",
-"module : dynamic",
-"module : static",
-"module : suspend",
-"module : resume",
-"module : remove",
-"svc_location : ACE_IDENT type svc_initializer status",
-"status : ACE_ACTIVE",
-"status : ACE_INACTIVE",
-"status :",
-"svc_initializer : pathname ACE_COLON ACE_IDENT",
-"svc_initializer : pathname ACE_COLON ACE_IDENT ACE_LPAREN ACE_RPAREN",
-"svc_initializer : ACE_COLON ACE_IDENT ACE_LPAREN ACE_RPAREN",
-"type : ACE_MODULE_T ACE_STAR",
-"type : ACE_SVC_OBJ_T ACE_STAR",
-"type : ACE_STREAM_T ACE_STAR",
-"parameters_opt : ACE_STRING",
-"parameters_opt :",
-"pathname : ACE_PATHNAME",
-"pathname : ACE_IDENT",
-};
-#endif
-#define ace_yyclearin (ace_yychar=(-1))
-#define ace_yyerrok (ace_yyerrflag=0)
-#ifndef ACE_YYSTACKSIZE
-#ifdef ACE_YYMAXDEPTH
-#define ACE_YYSTACKSIZE ACE_YYMAXDEPTH
-#else
-#define ACE_YYSTACKSIZE 300
-#endif
-#endif
-int ace_yydebug;
-int ace_yynerrs;
-int ace_yyerrflag;
-int ace_yychar;
-short *ace_yyssp;
-ACE_YYSTYPE *ace_yyvsp;
-ACE_YYSTYPE ace_yyval;
-ACE_YYSTYPE ace_yylval;
-#define ace_yystacksize ACE_YYSTACKSIZE
-short ace_yyss[ACE_YYSTACKSIZE];
-ACE_YYSTYPE ace_yyvs[ACE_YYSTACKSIZE];
-#line 315 "Svc_Conf.y"
-// Prints the error string to standard output. Cleans up the error
-// messages.
-
-void
-ace_yyerror (const ACE_TCHAR *s)
-{
-#if defined (ACE_NLOGGING)
- ACE_UNUSED_ARG (s);
-#endif /* ACE_NLOGGING */
-
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("[error %d] on line %d: %s\n"),
- ++ace_yyerrno,
- ace_yylineno,
- s));
-}
-
-// Note that SRC_REC represents left context, which is the STREAM *
-// record.
-
-static ACE_Module_Type *
-ace_get_module (ACE_Static_Node *str_rec,
- const ACE_TCHAR *svc_name)
-{
- const ACE_Service_Type *sr = str_rec->record ();
- const ACE_Service_Type_Impl *type = sr->type ();
- ACE_Stream_Type *st = sr == 0
- ? 0
- : ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- type));
- ACE_Module_Type *mt = st == 0 ? 0 : st->find (svc_name);
-
- if (sr == 0 || st == 0 || mt == 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("cannot locate Module_Type %s in STREAM_Type %s\n"),
- svc_name,
- str_rec->name ()));
- ace_yyerrno++;
- }
-
- return mt;
-}
-
-static ACE_Module_Type *
-ace_get_module (ACE_Static_Node *str_rec,
- ACE_Static_Node *svc_type)
-{
- const ACE_Service_Type *sr = str_rec->record ();
- const ACE_Service_Type_Impl *type = sr->type ();
- ACE_Stream_Type *st = sr == 0 ? 0 : (ACE_Stream_Type *) type;
- const ACE_Service_Type *sv = svc_type->record ();
- type = sv->type ();
- ACE_Module_Type *mt = (ACE_Module_Type *) type;
- const ACE_TCHAR *module_type_name = svc_type->name ();
-
- if (sr == 0 || st == 0 || mt == 0)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("cannot locate Module_Type %s or STREAM_Type %s\n"),
- module_type_name,
- str_rec->name ()));
- ace_yyerrno++;
- }
-
- // Make sure that the Module has the same name as the
- // Module_Type object from the svc.conf file.
- ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object ();
-
- if (ACE_OS::strcmp (mp->name (), module_type_name) != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("warning: assigning Module_Type name %s to Module %s since names differ\n"),
- module_type_name,
- mp->name ()));
- mp->name (module_type_name);
- }
-
- return mt;
-}
-
-ACE_Service_Type_Impl *
-ace_create_service_type (const ACE_TCHAR *name,
- int type,
- void *symbol,
- u_int flags,
- ACE_Service_Object_Exterminator gobbler)
-{
- ACE_Service_Type_Impl *stp = 0;
-
- // Note, the only place we need to put a case statement. This is
- // also the place where we'd put the RTTI tests, if the compiler
- // actually supported them!
-
- switch (type)
- {
- case ACE_SVC_OBJ_T:
- ACE_NEW_RETURN (stp,
- ACE_Service_Object_Type ((ACE_Service_Object *) symbol,
- name, flags,
- gobbler),
- 0);
- break;
- case ACE_MODULE_T:
- ACE_NEW_RETURN (stp,
- ACE_Module_Type (symbol, name, flags),
- 0);
- break;
- case ACE_STREAM_T:
- ACE_NEW_RETURN (stp,
- ACE_Stream_Type (symbol, name, flags),
- 0);
- break;
- default:
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("unknown case\n")));
- ace_yyerrno++;
- break;
- }
- return stp;
-}
-
-#if defined (DEBUGGING)
-// Current line number.
-int ace_yylineno = 1;
-
-// Name given on the command-line to envoke the program.
-ACE_TCHAR *program_name;
-
-// Main driver program.
-
-int
-main (int argc, char *argv[])
-{
- ace_yyin = stdin;
- ace_obstack = new ACE_Obstack;
-
- // Try to reopen any filename argument to use ACE_YYIN.
- if (argc > 1 && (ace_yyin = freopen (argv[1], "r", stdin)) == 0)
- (void) ::fprintf (stderr, "usage: %s [file]\n", argv[0]), exit (1);
-
- return ace_yyparse ();
-}
-#endif /* DEBUGGING */
-#line 400 "Svc_Conf_y.cpp"
-#define ACE_YYABORT goto ace_yyabort
-#define ACE_YYACCEPT goto ace_yyaccept
-#define ACE_YYERROR goto ace_yyerrlab
-#ifdef ACE_YYDEBUG
-#ifndef ACE_YYDEBUG_LEXER_TEXT /* pointer to the text isolated by the lexer*/
-#define ACE_YYDEBUG_LEXER_TEXT "ACE_YYDEBUG_LEXER_TEXT not defined"
-#endif
-#ifndef ACE_YYDEBUG_INDENT_STRING
-#define ACE_YYDEBUG_INDENT_STRING "| "
-#endif
-#ifndef ACE_YYDEBUG_REDUCE_STRING
-#define ACE_YYDEBUG_REDUCE_STRING "+-------"
-#endif
-#ifndef ACE_YYDEBUG_INDENT
-#ifdef __cplusplus
-void ACE_YYDEBUG_INDENT(int ace_yyindent)
-#else
-ACE_YYDEBUG_INDENT(ace_yyindent)
-int ace_yyindent;
-#endif
-{
- while(ace_yyindent-- > 0)
- printf("%s", ACE_YYDEBUG_INDENT_STRING);
-}
-#endif /* ACE_YYDEBUG_INDENT */
-#ifndef ACE_YYDEBUG_REDUCE
-#ifdef __cplusplus
-void ACE_YYDEBUG_REDUCE(int /* ace_yynew_state */, int /* ace_yyrule_num */, const char *ace_yyrule_string, int ace_yynew_indent, int ace_yyrhs_count)
-#else
-ACE_YYDEBUG_REDUCE(ace_yynew_state, ace_yyrule_num, ace_yyrule_string, ace_yynew_indent, ace_yyrhs_count)
-int ace_yynew_state;
-int ace_yyrule_num;
-char * ace_yyrule_string;
-int ace_yynew_indent;
-int ace_yyrhs_count;
-#endif
-{
- if (1 < ace_yyrhs_count)
- { /* draw the graphics for the reduction */
- ACE_YYDEBUG_INDENT(ace_yynew_indent);
- while(1 < ace_yyrhs_count--)
- printf("%s", ACE_YYDEBUG_REDUCE_STRING);
- putchar('+'); /* left rotated L would look nice */
- putchar('\n');
- ACE_YYDEBUG_INDENT(ace_yynew_indent);
- putchar('|'); /* down arrow would look nice */
- putchar('\n');
- }
- ACE_YYDEBUG_INDENT(ace_yynew_indent);
- /* Only print the resulting token name */
- while (*ace_yyrule_string)
- putchar(*ace_yyrule_string++);
- putchar('\n');
-}
-#endif /* ACE_YYDEBUG_REDUCE */
-#ifndef ACE_YYDEBUG_SHIFT_LEXEME
-#ifdef __cplusplus
-void ACE_YYDEBUG_SHIFT_LEXEME(int /* ace_yyold_state */, int /* ace_yynew_state*/, const char *ace_yytoken_string, int ace_yynew_indent)
-#else
-ACE_YYDEBUG_SHIFT_LEXEME(ace_yyold_state, ace_yynew_state, ace_yytoken_string, ace_yynew_indent)
-int ace_yyold_state;
-int ace_yynew_state;
-char * ace_yytoken_string;
-int ace_yynew_indent;
-#endif
-{
- ACE_YYDEBUG_INDENT(ace_yynew_indent);
- printf("%s <-- `%s'\n", ace_yytoken_string, ACE_YYDEBUG_LEXER_TEXT);
-}
-#endif /* ACE_YYDEBUG_SHIFT_LEXEME */
-#ifndef ACE_YYDEBUG_LOOK_AHEAD
-#ifdef __cplusplus
-void ACE_YYDEBUG_LOOK_AHEAD(int /* ace_yynew_state */, int ace_yytoken_num, const char *ace_yytoken_string, int ace_yyindent)
-#else
-ACE_YYDEBUG_LOOK_AHEAD(ace_yynew_state, ace_yytoken_num, ace_yytoken_string, ace_yyindent)
-int ace_yynew_state;
-int ace_yytoken_num;
-char * ace_yytoken_string;
-int ace_yyindent;
-#endif
-{
- ACE_YYDEBUG_INDENT(ace_yyindent);
- printf(" .... look ahead at %s `%s'\n",
- ace_yytoken_string,
- (0 == ace_yytoken_num) ? ACE_TEXT ("\0") : ACE_YYDEBUG_LEXER_TEXT);
-}
-#endif /* ACE_YYDEBUG_LOOK_AHEAD */
-#ifndef ACE_YYDEBUG_DISCARD_STATE
-#ifdef __cplusplus
-void ACE_YYDEBUG_DISCARD_STATE(int /* ace_yynew_state */, int ace_yyindent)
-#else
-ACE_YYDEBUG_DISCARD_STATE(ace_yynew_state, ace_yyindent)
-int ace_yynew_state;
-int ace_yyindent;
-#endif
-{
- if (0 < ace_yyindent)
- { /* draw the graphics for the reduction */
- ACE_YYDEBUG_INDENT(ace_yyindent-1);
- printf("%s", ACE_YYDEBUG_REDUCE_STRING);
- putchar('+'); /* left rotated L would look nice */
- printf(" discarding state\n");
- ACE_YYDEBUG_INDENT(ace_yyindent-1);
- putchar('|'); /* down arrow would look nice */
- putchar('\n');
- }
- else
- {
- if (0 == ace_yyindent)
- printf("discarding state\n");
- else
- printf("no more states to discard: parser will abort\n");
- }
-}
-#endif /* ACE_YYDEBUG_DISCARD_STATE */
-#ifndef ACE_YYDEBUG_DISCARD_TOKEN
-#ifdef __cplusplus
-void ACE_YYDEBUG_DISCARD_TOKEN(int /* ace_yynew_state */, int /* ace_yytoken_num */, const char *ace_yytoken_string, int ace_yyindent)
-#else
-ACE_YYDEBUG_DISCARD_TOKEN(ace_yynew_state, ace_yytoken_num, ace_yytoken_string, ace_yyindent)
-int ace_yynew_state;
-int ace_yytoken_num;
-char * ace_yytoken_string;
-int ace_yyindent;
-#endif
-{
- ACE_YYDEBUG_INDENT(ace_yyindent);
- printf("discarding token %s\n", ace_yytoken_string);
-}
-#endif /* ACE_YYDEBUG_DISCARD_TOKEN */
-#ifndef ACE_YYDEBUG_SHIFT_ERROR_LEXEME
-#ifdef __cplusplus
-void ACE_YYDEBUG_SHIFT_ERROR_LEXEME(int /* ace_yyold_state */, int /* ace_yynew_state */, int ace_yyindent)
-#else
-ACE_YYDEBUG_SHIFT_ERROR_LEXEME(ace_yyold_state, ace_yynew_state, ace_yyindent)
-int ace_yyold_state;
-int ace_yynew_state;
-int ace_yyindent;
-#endif
-{
- ACE_YYDEBUG_INDENT(ace_yyindent);
- printf("error\n");
-}
-#endif /* ACE_YYDEBUG_SHIFT_ERROR_LEXEME */
-#endif /* ACE_YYDEBUG */
-#ifdef __cplusplus
-extern "C" { extern char *ace_foo(const char *); }
-#endif
-int
-ace_yyparse()
-{
- register int ace_yym, ace_yyn, ace_yystate;
-#if ACE_YYDEBUG
- register const char *ace_yys;
-#ifndef __cplusplus
- extern char *ace_foo();
-#endif
-
- if ((ace_yys = ACE_OS::getenv("ACE_YYDEBUG")))
- {
- ace_yyn = *ace_yys;
- if (ace_yyn >= '0' && ace_yyn <= '9')
- ace_yydebug = ace_yyn - '0';
- }
-#endif
-
- ace_yynerrs = 0;
- ace_yyerrflag = 0;
- ace_yychar = (-1);
-
- ace_yyssp = ace_yyss;
- ace_yyvsp = ace_yyvs;
- *ace_yyssp = ace_yystate = 0;
-
-ace_yyloop:
- if ((ace_yyn = ace_yydefred[ace_yystate])) goto ace_yyreduce;
- if (ace_yychar < 0)
- {
- if ((ace_yychar = ace_yylex()) < 0) ace_yychar = 0;
-#if ACE_YYDEBUG
- if (ace_yydebug)
- {
- ace_yys = 0;
- if (ace_yychar <= ACE_YYMAXTOKEN) ace_yys = ace_yyname[ace_yychar];
- if (!ace_yys) ace_yys = "illegal-symbol";
- if (5 < ace_yydebug)
- printf("ace_yydebug: state %d, reading %d (%s)\n", ace_yystate,
- ace_yychar, ace_yys);
- else
- ACE_YYDEBUG_LOOK_AHEAD(ace_yystate, ace_yychar, ace_yys, ace_yyssp-ace_yyss);
- }
-#endif
- }
- if ((ace_yyn = ace_yysindex[ace_yystate]) && (ace_yyn += ace_yychar) >= 0 &&
- ace_yyn <= ACE_YYTABLESIZE && ace_yycheck[ace_yyn] == ace_yychar)
- {
-#if ACE_YYDEBUG
- if (ace_yydebug)
- if (5 < ace_yydebug)
- printf("ace_yydebug: state %d, shifting to state %d\n",
- ace_yystate, ace_yytable[ace_yyn]);
- else
- ACE_YYDEBUG_SHIFT_LEXEME(ace_yystate, ace_yytable[ace_yyn], ace_yys, ace_yyssp-ace_yyss);
-#endif
- if (ace_yyssp >= ace_yyss + ace_yystacksize - 1)
- {
- goto ace_yyoverflow;
- }
- *++ace_yyssp = ace_yystate = ace_yytable[ace_yyn];
- *++ace_yyvsp = ace_yylval;
- ace_yychar = (-1);
- if (ace_yyerrflag > 0) --ace_yyerrflag;
- goto ace_yyloop;
- }
- if ((ace_yyn = ace_yyrindex[ace_yystate]) && (ace_yyn += ace_yychar) >= 0 &&
- ace_yyn <= ACE_YYTABLESIZE && ace_yycheck[ace_yyn] == ace_yychar)
- {
- ace_yyn = ace_yytable[ace_yyn];
- goto ace_yyreduce;
- }
- if (ace_yyerrflag) goto ace_yyinrecovery;
-#ifdef lint
- goto ace_yynewerror;
-#endif
-
- ace_yyerror(ACE_TEXT ("syntax error"));
-#ifdef lint
- goto ace_yyerrlab;
-#endif
-
- ++ace_yynerrs;
-ace_yyinrecovery:
- if (ace_yyerrflag < 3)
- {
- ace_yyerrflag = 3;
- for (;;)
- {
- if ((ace_yyn = ace_yysindex[*ace_yyssp]) && (ace_yyn += ACE_YYERRCODE) >= 0 &&
- ace_yyn <= ACE_YYTABLESIZE && ace_yycheck[ace_yyn] == ACE_YYERRCODE)
- {
-#if ACE_YYDEBUG
- if (ace_yydebug)
- if (5 < ace_yydebug)
- printf("ace_yydebug: state %d, error recovery shifting\
- to state %d\n", *ace_yyssp, ace_yytable[ace_yyn]);
- else
- ACE_YYDEBUG_SHIFT_ERROR_LEXEME(*ace_yyssp, ace_yytable[ace_yyn], ace_yyssp-ace_yyss);
-#endif
- if (ace_yyssp >= ace_yyss + ace_yystacksize - 1)
- {
- goto ace_yyoverflow;
- }
- *++ace_yyssp = ace_yystate = ace_yytable[ace_yyn];
- *++ace_yyvsp = ace_yylval;
- goto ace_yyloop;
- }
- else
- {
-#if ACE_YYDEBUG
- if (ace_yydebug)
- if (5 < ace_yydebug)
- printf("ace_yydebug: error recovery discarding state %d\
-",
- *ace_yyssp);
- else
- ACE_YYDEBUG_DISCARD_STATE(*ace_yyssp, ace_yyssp-ace_yyss-1);
-#endif
- if (ace_yyssp <= ace_yyss) goto ace_yyabort;
- --ace_yyssp;
- --ace_yyvsp;
- }
- }
- }
- else
- {
- if (ace_yychar == 0) goto ace_yyabort;
-#if ACE_YYDEBUG
- if (ace_yydebug)
- {
- ace_yys = 0;
- if (ace_yychar <= ACE_YYMAXTOKEN) ace_yys = ace_yyname[ace_yychar];
- if (!ace_yys) ace_yys = "illegal-symbol";
- if (5 < ace_yydebug)
- printf("ace_yydebug: state %d, error recovery discards token %d (%s)\n",
- ace_yystate, ace_yychar, ace_yys);
- else
- ACE_YYDEBUG_DISCARD_TOKEN(ace_yystate, ace_yychar, ace_yys, ace_yyssp-ace_yyss);
- }
-#endif
- ace_yychar = (-1);
- goto ace_yyloop;
- }
-ace_yyreduce:
- ace_yym = ace_yylen[ace_yyn];
- ace_yyval = ace_yyvsp[1-ace_yym];
-#if ACE_YYDEBUG
- if (ace_yydebug)
- if (5 < ace_yydebug)
- printf("ace_yydebug: state %d, reducing by rule %d (%s)\n",
- ace_yystate, ace_yyn, ace_yyrule[ace_yyn]);
- else
- ACE_YYDEBUG_REDUCE(ace_yystate, ace_yyn, ace_yyrule[ace_yyn], ace_yyssp-ace_yyss-ace_yym, ace_yym);
-#endif
- switch (ace_yyn)
- {
-case 1:
-#line 45 "Svc_Conf.y"
-{
- if (ace_yyvsp[0].parse_node_ != 0)
- {
- ace_yyvsp[0].parse_node_->apply (); delete ace_yyvsp[0].parse_node_;
- }
- ace_obstack->release ();
- }
-break;
-case 2:
-#line 53 "Svc_Conf.y"
-{
- ace_obstack->release ();
- }
-break;
-case 10:
-#line 70 "Svc_Conf.y"
-{
- if (ace_yyvsp[-1].svc_record_ != 0)
- ace_yyval.parse_node_ = new ACE_Dynamic_Node (ace_yyvsp[-1].svc_record_, ace_yyvsp[0].ident_);
- else
- ace_yyval.parse_node_ = 0;
- }
-break;
-case 11:
-#line 80 "Svc_Conf.y"
-{
- ace_yyval.parse_node_ = new ACE_Static_Node (ace_yyvsp[-1].ident_, ace_yyvsp[0].ident_);
- }
-break;
-case 12:
-#line 87 "Svc_Conf.y"
-{
- ace_yyval.parse_node_ = new ACE_Suspend_Node (ace_yyvsp[0].ident_);
- }
-break;
-case 13:
-#line 94 "Svc_Conf.y"
-{
- ace_yyval.parse_node_ = new ACE_Resume_Node (ace_yyvsp[0].ident_);
- }
-break;
-case 14:
-#line 101 "Svc_Conf.y"
-{
- ace_yyval.parse_node_ = new ACE_Remove_Node (ace_yyvsp[0].ident_);
- }
-break;
-case 15:
-#line 108 "Svc_Conf.y"
-{
- ace_yyval.parse_node_ = new ACE_Stream_Node (ace_yyvsp[-1].static_node_, ace_yyvsp[0].parse_node_);
- }
-break;
-case 16:
-#line 111 "Svc_Conf.y"
-{ ace_yyval.static_node_ = new ACE_Static_Node (ace_yyvsp[0].ident_); }
-break;
-case 17:
-#line 112 "Svc_Conf.y"
-{
- ace_yyval.parse_node_ = new ACE_Dummy_Node (ace_yyvsp[-1].static_node_, ace_yyvsp[0].parse_node_);
- }
-break;
-case 18:
-#line 119 "Svc_Conf.y"
-{
- }
-break;
-case 19:
-#line 122 "Svc_Conf.y"
-{
- }
-break;
-case 20:
-#line 128 "Svc_Conf.y"
-{
- /* Initialize left context...*/
- ace_yyval.static_node_ = ace_yyvsp[-1].static_node_;
- }
-break;
-case 21:
-#line 133 "Svc_Conf.y"
-{
- ace_yyval.parse_node_ = ace_yyvsp[-1].parse_node_;
- }
-break;
-case 22:
-#line 136 "Svc_Conf.y"
-{ ace_yyval.parse_node_ = 0; }
-break;
-case 23:
-#line 141 "Svc_Conf.y"
-{
- if (ace_yyvsp[0].parse_node_ != 0)
- {
- ace_yyvsp[0].parse_node_->link (ace_yyvsp[-1].parse_node_);
- ace_yyval.parse_node_ = ace_yyvsp[0].parse_node_;
- }
- }
-break;
-case 24:
-#line 148 "Svc_Conf.y"
-{ ace_yyval.parse_node_ = 0; }
-break;
-case 25:
-#line 153 "Svc_Conf.y"
-{
- ACE_Static_Node *svc_type = ace_yyvsp[0].static_node_;
-
- if (svc_type != 0)
- {
- ACE_Static_Node *module = ace_yyvsp[-2].static_node_;
-
- ACE_ARGV args (svc_type->parameters ());
- ACE_Module_Type *mt = ace_get_module (module,
- svc_type);
- ACE_Stream_Type *st =
- ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- module->record ()->type ()));
-
- if (mt->init (args.argc (), args.argv ()) == -1
- || st->push (mt) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("dynamic initialization failed for Module %s\n"),
- svc_type->name ()));
- ace_yyerrno++;
- }
- }
- }
-break;
-case 26:
-#line 179 "Svc_Conf.y"
-{
- ACE_Module_Type *mt = ace_get_module (ace_yyvsp[-2].static_node_, ace_yyvsp[0].static_node_->name ());
-
- if (((ACE_Stream_Type *) (ace_yyvsp[-2].static_node_)->record ()->type ())->push (mt) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Problem with static\n")));
- ace_yyerrno++;
- }
- }
-break;
-case 27:
-#line 190 "Svc_Conf.y"
-{
- ACE_Module_Type *mt = ace_get_module (ace_yyvsp[-2].static_node_,
- ace_yyvsp[0].static_node_->name ());
- if (mt != 0)
- mt->suspend ();
- }
-break;
-case 28:
-#line 197 "Svc_Conf.y"
-{
- ACE_Module_Type *mt = ace_get_module (ace_yyvsp[-2].static_node_,
- ace_yyvsp[0].static_node_->name ());
- if (mt != 0)
- mt->resume ();
- }
-break;
-case 29:
-#line 204 "Svc_Conf.y"
-{
- ACE_Static_Node *stream = ace_yyvsp[-2].static_node_;
- ACE_Static_Node *module = ace_yyvsp[0].static_node_;
- ACE_Module_Type *mt = ace_get_module (stream,
- module->name ());
-
- ACE_Stream_Type *st =
- ACE_dynamic_cast (ACE_Stream_Type *,
- ACE_const_cast (ACE_Service_Type_Impl *,
- stream->record ()->type ()));
- if (mt != 0 && st->remove (mt) == -1)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("cannot remove Module_Type %s from STREAM_Type %s\n"),
- module->name (),
- stream->name ()));
- ace_yyerrno++;
- }
- }
-break;
-case 30:
-#line 227 "Svc_Conf.y"
-{
- u_int flags
- = ACE_Service_Type::DELETE_THIS
- | (ace_yyvsp[-1].location_node_->dispose () == 0 ? 0 : ACE_Service_Type::DELETE_OBJ);
- ACE_Service_Object_Exterminator gobbler = 0;
- void *sym = ace_yyvsp[-1].location_node_->symbol (&gobbler);
-
- if (sym != 0)
- {
- ACE_Service_Type_Impl *stp
- = ace_create_service_type (ace_yyvsp[-3].ident_,
- ace_yyvsp[-2].type_,
- sym,
- flags,
- gobbler);
- ace_yyval.svc_record_ = new ACE_Service_Type (ace_yyvsp[-3].ident_,
- stp,
- ace_yyvsp[-1].location_node_->handle (),
- ace_yyvsp[0].type_);
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Unable to find service: %s\n"),
- ace_yyvsp[-3].ident_));
- ++ace_yyerrno;
- ace_yyval.svc_record_ = 0;
- }
- delete ace_yyvsp[-1].location_node_;
- }
-break;
-case 31:
-#line 261 "Svc_Conf.y"
-{
- ace_yyval.type_ = 1;
- }
-break;
-case 32:
-#line 265 "Svc_Conf.y"
-{
- ace_yyval.type_ = 0;
- }
-break;
-case 33:
-#line 269 "Svc_Conf.y"
-{
- ace_yyval.type_ = 1;
- }
-break;
-case 34:
-#line 276 "Svc_Conf.y"
-{
- ace_yyval.location_node_ = new ACE_Object_Node (ace_yyvsp[-2].ident_, ace_yyvsp[0].ident_);
- }
-break;
-case 35:
-#line 280 "Svc_Conf.y"
-{
- ace_yyval.location_node_ = new ACE_Function_Node (ace_yyvsp[-4].ident_, ace_yyvsp[-2].ident_);
- }
-break;
-case 36:
-#line 284 "Svc_Conf.y"
-{
- ace_yyval.location_node_ = new ACE_Static_Function_Node (ace_yyvsp[-2].ident_);
- }
-break;
-case 37:
-#line 291 "Svc_Conf.y"
-{
- ace_yyval.type_ = ACE_MODULE_T;
- }
-break;
-case 38:
-#line 295 "Svc_Conf.y"
-{
- ace_yyval.type_ = ACE_SVC_OBJ_T;
- }
-break;
-case 39:
-#line 299 "Svc_Conf.y"
-{
- ace_yyval.type_ = ACE_STREAM_T;
- }
-break;
-case 41:
-#line 306 "Svc_Conf.y"
-{ ace_yyval.ident_ = 0; }
-break;
-#line 983 "Svc_Conf_y.cpp"
- }
- ace_yyssp -= ace_yym;
- ace_yystate = *ace_yyssp;
- ace_yyvsp -= ace_yym;
- ace_yym = ace_yylhs[ace_yyn];
- if (ace_yystate == 0 && ace_yym == 0)
- {
-#ifdef ACE_YYDEBUG
- if (5 < ace_yydebug)
- printf("ace_yydebug: after reduction, shifting from state 0 to\
- state %d\n", ACE_YYFINAL);
-#endif
- ace_yystate = ACE_YYFINAL;
- *++ace_yyssp = ACE_YYFINAL;
- *++ace_yyvsp = ace_yyval;
- if (ace_yychar < 0)
- {
- if ((ace_yychar = ace_yylex()) < 0) ace_yychar = 0;
-#if ACE_YYDEBUG
- if (ace_yydebug)
- {
- ace_yys = 0;
- if (ace_yychar <= ACE_YYMAXTOKEN) ace_yys = ace_yyname[ace_yychar];
- if (!ace_yys) ace_yys = "illegal-symbol";
- if (5 < ace_yydebug)
- printf("ace_yydebug: state %d, reading %d (%s)\n",
- ACE_YYFINAL, ace_yychar, ace_yys);
- else
- ACE_YYDEBUG_LOOK_AHEAD(ACE_YYFINAL, ace_yychar, ace_yys, ace_yyssp-ace_yyss);
- }
-#endif
- }
- if (ace_yychar == 0) goto ace_yyaccept;
- goto ace_yyloop;
- }
- if ((ace_yyn = ace_yygindex[ace_yym]) && (ace_yyn += ace_yystate) >= 0 &&
- ace_yyn <= ACE_YYTABLESIZE && ace_yycheck[ace_yyn] == ace_yystate)
- ace_yystate = ace_yytable[ace_yyn];
- else
- ace_yystate = ace_yydgoto[ace_yym];
-#ifdef ACE_YYDEBUG
- if (5 < ace_yydebug)
- printf("ace_yydebug: after reduction, shifting from state %d \
-to state %d\n", *ace_yyssp, ace_yystate);
-#endif
- if (ace_yyssp >= ace_yyss + ace_yystacksize - 1)
- {
- goto ace_yyoverflow;
- }
- *++ace_yyssp = ace_yystate;
- *++ace_yyvsp = ace_yyval;
- goto ace_yyloop;
-ace_yyoverflow:
- ace_yyerror(ACE_TEXT ("yacc stack overflow"));
-ace_yyabort:
- return (1);
-ace_yyaccept:
- return (0);
-}
diff --git a/ace/Svc_Handler.cpp b/ace/Svc_Handler.cpp
deleted file mode 100644
index 8fdced1ef9e..00000000000
--- a/ace/Svc_Handler.cpp
+++ /dev/null
@@ -1,529 +0,0 @@
-// $Id$
-
-#ifndef ACE_SVC_HANDLER_C
-#define ACE_SVC_HANDLER_C
-
-#include "ace/Svc_Handler.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Object_Manager.h"
-#include "ace/Strategies.h"
-
-#include "ace/Dynamic.h"
-
-ACE_RCSID(ace, Svc_Handler, "$Id$")
-
-#define PR_ST_1 ACE_PEER_STREAM_1
-#define PR_ST_2 ACE_PEER_STREAM_2
-
-template <PR_ST_1, ACE_SYNCH_DECL> void *
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator new (size_t,
- void *p)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator new (NOOP, 2 parameters)");
- return p;
-}
-
-#if !defined (ACE_LACKS_PLACEMENT_OPERATOR_DELETE)
-template <PR_ST_1, ACE_SYNCH_DECL> void
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator delete (void *,
- void *)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::delete (NOOP, 2 parameters)");
- return;
-}
-#endif /* ACE_LACKS_PLACEMENT_OPERATOR_DELETE */
-
-template <PR_ST_1, ACE_SYNCH_DECL> void *
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator new (size_t n)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator new");
-
- ACE_Dynamic *const dynamic_instance = ACE_Dynamic::instance ();
-
- if (dynamic_instance == 0)
- {
- // If this ACE_ASSERT fails, it may be due to running of out TSS
- // keys. Try using ACE_HAS_TSS_EMULATION, or increasing
- // ACE_DEFAULT_THREAD_KEYS if already using TSS emulation.
- ACE_ASSERT (dynamic_instance != 0);
-
- ACE_throw_bad_alloc;
- }
- else
- {
- // Allocate the memory and store it (usually in thread-specific
- // storage, depending on config flags).
- dynamic_instance->set ();
-
- return ::new char[n];
- }
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> void
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::destroy (void)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::destroy");
-
- // Only delete ourselves if we're not owned by a module and have
- // been allocated dynamically.
- if (this->mod_ == 0 && this->dynamic_ && this->closing_ == 0)
- // Will call the destructor, which automatically calls <shutdown>.
- // Note that if we are *not* allocated dynamically then the
- // destructor will call <shutdown> automatically when it gets run
- // during cleanup.
- delete this;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> void
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator delete (void *obj)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::delete");
- // You cannot delete a 'void*' (X3J16/95-0087 5.3.5.3), but we know
- // the pointer was created using new char[] (see operator new code),
- // so we use a cast:
- char *tmp = (char *) obj;
- ::delete [] tmp;
-}
-
-// Default constructor.
-
-template <PR_ST_1, ACE_SYNCH_DECL>
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::ACE_Svc_Handler (ACE_Thread_Manager *tm,
- ACE_Message_Queue<ACE_SYNCH_USE> *mq,
- ACE_Reactor *reactor)
- : ACE_Task<ACE_SYNCH_USE> (tm, mq),
- closing_ (0),
- recycler_ (0),
- recycling_act_ (0)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::ACE_Svc_Handler");
-
- this->reactor (reactor);
-
- // This clever idiom transparently checks if we were allocated
- // dynamically. This information is used by the <destroy> method to
- // decide if we need to delete <this>... The idiom is based on a
- // paper by Michael van Rooyen (mrooyen@cellnet.co.uk) that appeared
- // in the April '96 issue of the C++ Report. We've spruced it up to
- // work correctly in multi-threaded programs by using our ACE_TSS
- // class.
- this->dynamic_ = ACE_Dynamic::instance ()->is_dynamic ();
-
- if (this->dynamic_ != 0)
- // Make sure to reset the flag.
- ACE_Dynamic::instance ()->reset ();
-}
-
-// Default behavior for a ACE_Svc_Handler object is to be registered
-// with the ACE_Reactor (thereby ensuring single threading).
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::open (void *)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::open");
-#if defined (ACE_DEBUGGING)
- ACE_TCHAR buf[BUFSIZ];
- ACE_PEER_STREAM_ADDR client_addr;
-
- if (this->peer_.get_remote_addr (client_addr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("get_remote_addr")),
- -1);
- else if (client_addr.addr_to_string (buf, sizeof buf) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("can't obtain peer's address")),
- -1);
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("connected to %s on fd %d\n"),
- buf,
- this->peer_.get_handle ()));
-#endif /* ACE_DEBUGGING */
- if (this->reactor ()
- && this->reactor ()->register_handler
- (this,
- ACE_Event_Handler::READ_MASK) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("unable to register client handler")),
- -1);
- return 0;
-}
-
-// Perform termination activities.
-
-template <PR_ST_1, ACE_SYNCH_DECL> void
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::shutdown (void)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::shutdown");
-
- // Deregister this handler with the ACE_Reactor.
- if (this->reactor ())
- {
- ACE_Reactor_Mask mask = ACE_Event_Handler::ALL_EVENTS_MASK |
- ACE_Event_Handler::DONT_CALL;
-
- // Make sure there are no timers.
- this->reactor ()->cancel_timer (this);
-
- if (this->peer ().get_handle () != ACE_INVALID_HANDLE)
- // Remove self from reactor.
- this->reactor ()->remove_handler (this, mask);
- }
-
- // Remove self from the recycler.
- if (this->recycler ())
- this->recycler ()->purge (this->recycling_act_);
-
- this->peer ().close ();
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> void
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::cleanup_hint (void **act_holder)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::cleanup_hint");
-
- // Remove as hint.
- if (this->recycler ())
- this->recycler ()->cleanup_hint (this->recycling_act_,
- act_holder);
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> void
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::dump (void) const
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::dump");
-
- this->peer_.dump ();
- ACE_DEBUG ((LM_DEBUG,
- "dynamic_ = %d\n",
- this->dynamic_));
- ACE_DEBUG ((LM_DEBUG,
- "closing_ = %d\n",
- this->closing_));
- ACE_DEBUG ((LM_DEBUG,
- "recycler_ = %d\n",
- this->recycler_));
- ACE_DEBUG ((LM_DEBUG,
- "recycling_act_ = %d\n",
- this->recycling_act_));
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> ACE_PEER_STREAM &
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::peer (void) const
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::peer");
- return (ACE_PEER_STREAM &) this->peer_;
-}
-
-// Extract the underlying I/O descriptor.
-
-template <PR_ST_1, ACE_SYNCH_DECL> ACE_HANDLE
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::get_handle (void) const
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::get_handle");
- return this->peer_.get_handle ();
-}
-
-// Set the underlying I/O descriptor.
-
-template <PR_ST_1, ACE_SYNCH_DECL> void
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::set_handle (ACE_HANDLE h)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::set_handle");
- this->peer_.set_handle (h);
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL>
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::~ACE_Svc_Handler (void)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::~ACE_Svc_Handler");
-
- if (this->closing_ == 0)
- {
- // We're closing down now, so make sure not to call ourselves
- // recursively via other calls to handle_close() (e.g., from the
- // Timer_Queue).
- this->closing_ = 1;
-
- this->shutdown ();
- }
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::handle_close (ACE_HANDLE,
- ACE_Reactor_Mask)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::handle_close");
-
- this->destroy ();
- return 0;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::handle_timeout (const ACE_Time_Value &,
- const void *)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::handle_timeout");
- return this->handle_close ();
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::close (unsigned long)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::close");
- return this->handle_close ();
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::init (int argc, ACE_TCHAR *argv[])
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::init");
- ACE_UNUSED_ARG (argc);
- ACE_UNUSED_ARG (argv);
- return -1;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::fini (void)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::fini");
- return -1;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::info (ACE_TCHAR **, size_t) const
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::info");
- return -1;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::idle (u_long flags)
-{
- if (this->recycler ())
- return this->recycler ()->cache (this->recycling_act_);
- else
- return this->close (flags);
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::recycle_state (ACE_Recyclable_State new_state)
-{
- if (this->recycler ())
- return this->recycler ()->recycle_state (this->recycling_act_,
- new_state);
-
- return 0;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> ACE_Recyclable_State
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::recycle_state (void) const
-{
- if (this->recycler ())
- return this->recycler ()->recycle_state (this->recycling_act_);
-
- return ACE_RECYCLABLE_UNKNOWN;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> void
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::recycler (ACE_Connection_Recycling_Strategy *recycler,
- const void *recycling_act)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::recycler");
- this->recycler_ = recycler;
- this->recycling_act_ = recycling_act;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> ACE_Connection_Recycling_Strategy *
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::recycler (void) const
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::recycler");
- return this->recycler_;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> const void *
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::recycling_act (void) const
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::recycling_act");
- return this->recycling_act_;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::recycle (void *)
-{
- ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::recycle");
- // By default, the object is ready and willing to be recycled.
- return 0;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL>
-ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::~ACE_Buffered_Svc_Handler (void)
-{
- this->flush ();
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL>
-ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::ACE_Buffered_Svc_Handler (ACE_Thread_Manager *tm,
- ACE_Message_Queue<ACE_SYNCH_USE> *mq,
- ACE_Reactor *reactor,
- size_t maximum_buffer_size,
- ACE_Time_Value *timeout)
- : ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE> (tm, mq, reactor),
- maximum_buffer_size_ (maximum_buffer_size),
- current_buffer_size_ (0),
- timeoutp_ (timeout)
-{
- ACE_TRACE ("ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::ACE_Buffered_Svc_Handler");
-
- if (this->timeoutp_ != 0)
- {
- this->interval_ = *timeout;
- this->next_timeout_ = ACE_OS::gettimeofday () + this->interval_;
- }
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::put (ACE_Message_Block *mb,
- ACE_Time_Value *tv)
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->msg_queue ()->lock (), -1);
-
- // Enqueue <mb> onto the message queue.
- if (this->putq (mb, tv) == -1)
- return -1;
- else
- {
- // Update the current number of bytes on the queue.
- this->current_buffer_size_ += mb->total_size ();
-
- // Flush the buffer when the number of bytes exceeds the maximum
- // buffer size or when the timeout period has elapsed.
- if (this->current_buffer_size_ >= this->maximum_buffer_size_
- || (this->timeoutp_ != 0
- && this->next_timeout_ <= ACE_OS::gettimeofday ()))
- return this->flush ();
- else
- return 0;
- }
-}
-
-// Flush the buffer.
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::flush (void)
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, m, this->msg_queue ()->lock (), -1);
- ACE_Message_Block *entry = 0;
- iovec iov[IOV_MAX];
- size_t i = 0;
- int result = 0;
-
- // Iterate over all the <ACE_Message_Block>s in the
- // <ACE_Message_Queue> and prepare them to be written out.
- for (ACE_Message_Queue_Iterator<ACE_SYNCH_USE> iterator (*this->msg_queue ());
- iterator.next (entry) != 0
- && result == 0;
- iterator.advance ())
- {
- // Iterate over all the <Message_Block>s in a chain, including
- // continuations.
- for (ACE_Message_Block *temp = entry;
- temp != 0;
- temp = temp->cont ())
- {
- iov[i].iov_len = temp->length ();
- iov[i].iov_base = temp->rd_ptr ();
-
- i++;
-
- // Flush the <iovec>s when we've reached the maximum size
- // for the platform.
- if (i == IOV_MAX)
- {
-#if defined (ACE_DEBUGGING)
- ACE_DEBUG ((LM_DEBUG,
- "sending data (inside loop, i = %d)\n",
- i));
-#endif /* ACE_DEBUGGING */
- // Send off the data.
- if (this->peer ().sendv_n (iov,
- i) == -1)
- {
- result = -1;
- break;
- }
- i = 0;
- }
- }
- }
-
- // Take care of any remaining <iovec>s.
- if (i > 0 && result != -1)
- {
- if (this->peer ().sendv_n (iov, i) == -1)
- result = -1;
-#if defined (ACE_DEBUGGING)
- ACE_DEBUG ((LM_DEBUG,
- "sending data (final flush, i = %d)\n",
- i));
-#endif /* ACE_DEBUGGING */
- }
-
- // Remove all the <ACE_Message_Block>s in the <ACE_Message_Queue>
- // and <release> their memory.
- while (this->msg_queue ()->is_empty () == 0)
- {
- if (this->msg_queue ()->dequeue_head (entry) == -1)
- break;
-
- entry->release ();
- }
-
- if (this->timeoutp_ != 0)
- // Update the next timeout period by adding the interval.
- this->next_timeout_ += this->interval_;
-
- this->current_buffer_size_ = 0;
-
- return result;
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> void
-ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::dump (void) const
-{
- ACE_TRACE ("ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::dump");
-
- ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::dump ();
- ACE_DEBUG ((LM_DEBUG,
- "maximum_buffer_size_ = %d\n",
- this->maximum_buffer_size_));
- ACE_DEBUG ((LM_DEBUG,
- "current_buffer_size_ = %d\n",
- this->current_buffer_size_));
- if (this->timeoutp_ != 0)
- ACE_DEBUG ((LM_DEBUG,
- "next_timeout_.sec = %d, next_timeout_.usec = %d\n",
- this->next_timeout_.sec (),
- this->next_timeout_.usec ()));
- else
- ACE_DEBUG ((LM_DEBUG,
- "timeoutp_ == NULL"));
-}
-
-template <PR_ST_1, ACE_SYNCH_DECL> int
-ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::handle_timeout (const ACE_Time_Value &,
- const void *)
-{
- ACE_TRACE ("ACE_Buffered_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::handle_timeout");
- return 0;
-}
-
-#undef PR_ST_1
-#undef PR_ST_2
-#endif /* ACE_SVC_HANDLER_C */
diff --git a/ace/Svc_Handler.h b/ace/Svc_Handler.h
deleted file mode 100644
index 163f8be7f06..00000000000
--- a/ace/Svc_Handler.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Svc_Handler.h
-//
-// = AUTHOR
-// Doug Schmidt and Irfan Pyrarli.
-//
-// ============================================================================
-
-#ifndef ACE_SVC_HANDLER_H
-#define ACE_SVC_HANDLER_H
-#include "ace/pre.h"
-
-// Forward decls.
-class ACE_Connection_Recycling_Strategy;
-
-#include "ace/Synch_Options.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Task.h"
-#include "ace/Service_Config.h"
-
-template <ACE_PEER_STREAM_1, ACE_SYNCH_DECL>
-class ACE_Svc_Handler : public ACE_Task<ACE_SYNCH_USE>
-{
- // = TITLE
- // Defines the interface for a service that exchanges data with
- // its connected peer.
- //
- // = DESCRIPTION
- // This class provides a well-defined interface that the
- // Acceptor and Connector pattern factories use as their target.
- // Typically, client applications will subclass ACE_Svc_Handler
- // and do all the interesting work in the subclass. One thing
- // that the ACE_Svc_Handler does contain is a PEER_STREAM
- // endpoint that is initialized by an ACE_Acceptor or
- // ACE_Connector when a connection is established successfully.
- // This endpoint is used to exchange data between a
- // ACE_Svc_Handler and the peer it is connected with.
-public:
- // = Initialization and termination methods.
- ACE_Svc_Handler (ACE_Thread_Manager *thr_mgr = 0,
- ACE_Message_Queue<ACE_SYNCH_USE> *mq = 0,
- ACE_Reactor *reactor = ACE_Reactor::instance ());
- // Constructor initializes the <thr_mgr> and <mq> by passing them
- // down to the <ACE_Task> base class. The <reactor> is passed to
- // the <ACE_Event_Handler>.
-
- virtual ~ACE_Svc_Handler (void);
- // Destructor.
-
- virtual int open (void * = 0);
- // Activate the client handler. This is typically called by the
- // <ACE_Acceptor> or <ACE_Connector>.
-
- virtual int close (u_long flags = 0);
- // Object termination hook -- application-specific cleanup code goes
- // here.
-
- virtual int idle (u_long flags = 0);
- // Call this method if you want to recycling the <Svc_Handler>
- // instead of closing it. If the object does not have a recycler,
- // it will be closed.
-
- virtual ACE_Recyclable_State recycle_state (void) const;
- virtual int recycle_state (ACE_Recyclable_State new_state);
- // Call this method if you want to get/set the state of the
- // <Svc_Handler>. If the object does not have a recycler, this call
- // will have no effect (and the accessor will return
- // ACE_RECYCLABLE_UNKNOWN).
-
- virtual void cleanup_hint (void **act_holder = 0);
- // When the svc_handle is no longer needed around as a hint, call
- // this method. In addition, reset <*act_holder> to zero if
- // <act_holder != 0>.
-
- // = Dynamic linking hooks.
- virtual int init (int argc, ACE_TCHAR *argv[]);
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
- virtual int fini (void);
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
- virtual int info (ACE_TCHAR **info_string, size_t length) const;
- // Default version does no work and returns -1. Must be overloaded
- // by application developer to do anything meaningful.
-
- // = Demultiplexing hooks.
-
- virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK);
- // Perform termination activities on the SVC_HANDLER. The default
- // behavior is to close down the <peer_> (to avoid descriptor leaks)
- // and to <destroy> this object (to avoid memory leaks)! If you
- // don't want this behavior make sure you override this method...
-
- virtual int handle_timeout (const ACE_Time_Value &time,
- const void *);
- // Default behavior when timeouts occur is to close down the
- // <Svc_Handler> by calling <handle_close>.
-
- virtual ACE_HANDLE get_handle (void) const;
- // Get the underlying handle associated with the <peer_>.
-
- virtual void set_handle (ACE_HANDLE);
- // Set the underlying handle associated with the <peer_>.
-
- ACE_PEER_STREAM &peer (void) const;
- // Returns the underlying PEER_STREAM. Used by
- // <ACE_Acceptor::accept> and <ACE_Connector::connect> factories
-
- void *operator new (size_t n);
- // Overloaded new operator. This method unobtrusively records if a
- // <Svc_Handler> is allocated dynamically.
-
- void * operator new (size_t n,
- void *p);
- // This operator permits "placement new" on a per-object basis.
-
- virtual void destroy (void);
- // Call this to free up dynamically allocated <Svc_Handlers>
- // (otherwise you will get memory leaks). In general, you should
- // call this method rather than <delete> since this method knows
- // whether or not the object was allocated dynamically, and can act
- // accordingly (i.e., deleting it if it was allocated dynamically).
-
- void operator delete (void *);
- // This really should be private so that users are forced to call
- // <destroy>. Unfortunately, the C++ standard doesn't allow there
- // to be a public new and a private delete. It is a bad idea to
- // call this method directly, so use <destroy> instead, unless you
- // know for sure that you've allocated the object dynamically.
-
-#if !defined (ACE_LACKS_PLACEMENT_OPERATOR_DELETE)
- void operator delete (void *, void *);
- // This operator is necessary to complement the class-specific
- // operator new above. Unfortunately, it's not portable to all C++
- // compilers...
-#endif /* ACE_LACKS_PLACEMENT_OPERATOR_DELETE */
-
- void shutdown (void);
- // Close down the descriptor and unregister from the Reactor
-
- void dump (void) const;
- // Dump the state of an object.
-
-public:
-
- // = The following methods are not suppose to be public.
-
- // Because friendship is *not* inherited in C++, these methods have
- // to be public.
-
- // = Accessors to set/get the connection recycler.
-
- virtual void recycler (ACE_Connection_Recycling_Strategy *recycler,
- const void *recycling_act);
- // Set the recycler and the <recycling_act> that is used during
- // purging and caching.
-
- virtual ACE_Connection_Recycling_Strategy *recycler (void) const;
- // Get the recycler.
-
- virtual const void *recycling_act (void) const;
- // Get the recycling act.
-
- virtual int recycle (void * = 0);
- // Upcall made by the recycler when it is about to recycle the
- // connection. This gives the object a chance to prepare itself for
- // recycling. Return 0 if the object is ready for recycling, -1 on
- // failures.
-
-protected:
- ACE_PEER_STREAM peer_;
- // Maintain connection with client.
-
- int dynamic_;
- // Have we been dynamically created?
-
- char closing_;
- // Keeps track of whether we are in the process of closing (required
- // to avoid circular calls to <handle_close>).
-
- ACE_Connection_Recycling_Strategy *recycler_;
- // Pointer to the connection recycler.
-
- const void *recycling_act_;
- // Asynchronous Completion Token (ACT) to be used to when talking to
- // the recycler.
-};
-
-template <ACE_PEER_STREAM_1, ACE_SYNCH_DECL>
-class ACE_Buffered_Svc_Handler : public ACE_Svc_Handler<ACE_PEER_STREAM_2, ACE_SYNCH_USE>
-{
- // = TITLE
- // Defines the interface for a service that exchanges data with
- // its connected peer and supports buffering.
- //
- // = DESCRIPTION
- // The buffering feature makes it possible to queue up
- // <ACE_Message_Blocks> in an <ACE_Message_Queue> until (1) the
- // queue is "full" or (2) a period of time elapses, at which
- // point the queue is "flushed" via <sendv_n> to the peer.
-public:
- // = Initialization and termination methods.
- ACE_Buffered_Svc_Handler (ACE_Thread_Manager *thr_mgr = 0,
- ACE_Message_Queue<ACE_SYNCH_USE> *mq = 0,
- ACE_Reactor *reactor = ACE_Reactor::instance (),
- size_t max_buffer_size = 0,
- ACE_Time_Value *relative_timeout = 0);
- // Constructor initializes the <thr_mgr> and <mq> by passing them
- // down to the <ACE_Task> base class. The <reactor> is passed to
- // the <ACE_Event_Handler>. The <max_buffer_size> and
- // <relative_timeout> are used to determine at what point to flush
- // the <mq>. By default, there's no buffering at all. The
- // <relative_timeout> value is interpreted to be in a unit that's
- // relative to the current time returned by <ACE_OS::gettimeofday>.
-
- virtual ~ACE_Buffered_Svc_Handler (void);
- // Destructor, which calls <flush>.
-
- virtual int put (ACE_Message_Block *message_block,
- ACE_Time_Value *timeout = 0);
- // Insert the <ACE_Message_Block> chain rooted at <message_block>
- // into the <ACE_Message_Queue> with the designated <timeout>. The
- // <flush> method will be called if this <put> causes the number of
- // bytes to exceed the maximum buffer size or if the timeout period
- // has elapsed.
-
- virtual int flush (void);
- // Flush the <ACE_Message_Queue>, which writes all the queued
- // <ACE_Message_Block>s to the <PEER_STREAM>.
-
- virtual int handle_timeout (const ACE_Time_Value &time,
- const void *);
- // This method is not currently implemented -- this is where the
- // integration with the <Reactor> would occur.
-
- void dump (void) const;
- // Dump the state of an object.
-
-protected:
- size_t maximum_buffer_size_;
- // Maximum size the <Message_Queue> can be before we have to flush
- // the buffer.
-
- size_t current_buffer_size_;
- // Current size in bytes of the <Message_Queue> contents.
-
- ACE_Time_Value next_timeout_;
- // Timeout value used to control when the buffer is flushed.
-
- ACE_Time_Value interval_;
- // Interval of the timeout.
-
- ACE_Time_Value *timeoutp_;
- // Timeout pointer.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Svc_Handler.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Svc_Handler.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_SVC_HANDLER_H */
diff --git a/ace/Synch.cpp b/ace/Synch.cpp
deleted file mode 100644
index 33d5710acb0..00000000000
--- a/ace/Synch.cpp
+++ /dev/null
@@ -1,1049 +0,0 @@
-// $Id$
-
-#ifndef ACE_SYNCH_C
-#define ACE_SYNCH_C
-
-#include "ace/Thread.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch_T.h"
-#include "ace/Synch.h"
-
-ACE_RCSID(ace, Synch, "$Id$")
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Synch.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Null_Mutex)
-ACE_ALLOC_HOOK_DEFINE(ACE_File_Lock)
-ACE_ALLOC_HOOK_DEFINE(ACE_RW_Process_Mutex)
-ACE_ALLOC_HOOK_DEFINE(ACE_Process_Mutex)
-
-ACE_Lock::~ACE_Lock (void)
-{
-}
-
-ACE_Adaptive_Lock::ACE_Adaptive_Lock (void)
- : lock_ (0)
-{
-}
-
-ACE_Adaptive_Lock::~ACE_Adaptive_Lock (void)
-{
-}
-
-int
-ACE_Adaptive_Lock::remove (void)
-{
- return this->lock_->remove ();
-}
-
-int
-ACE_Adaptive_Lock::acquire (void)
-{
- return this->lock_->acquire ();
-}
-
-int
-ACE_Adaptive_Lock::tryacquire (void)
-{
- return this->lock_->tryacquire ();
-}
-
-int
-ACE_Adaptive_Lock::release (void)
-{
- return this->lock_->release ();
-}
-
-int
-ACE_Adaptive_Lock::acquire_read (void)
-{
- return this->lock_->acquire_read ();
-}
-
-int
-ACE_Adaptive_Lock::acquire_write (void)
-{
- return this->lock_->acquire_write ();
-}
-
-int
-ACE_Adaptive_Lock::tryacquire_read (void)
-{
- return this->lock_->tryacquire_read ();
-}
-
-int
-ACE_Adaptive_Lock::tryacquire_write (void)
-{
- return this->lock_->tryacquire_write ();
-}
-
-void
-ACE_Adaptive_Lock::dump (void) const
-{
- // return this->lock_->dump ();
-}
-
-ACE_TSS_Adapter::ACE_TSS_Adapter (void *object, ACE_THR_DEST f)
- : ts_obj_ (object),
- func_ (f)
-{
- // ACE_TRACE ("ACE_TSS_Adapter::ACE_TSS_Adapter");
-}
-
-void
-ACE_TSS_Adapter::cleanup (void)
-{
- // ACE_TRACE ("ACE_TSS_Adapter::cleanup");
- (*this->func_)(this->ts_obj_); // call cleanup routine for ts_obj_
-}
-
-extern "C" void
-ACE_TSS_C_cleanup (void *object)
-{
- // ACE_TRACE ("ACE_TSS_C_cleanup");
- if (object != 0)
- {
- ACE_TSS_Adapter *tss_adapter = (ACE_TSS_Adapter *) object;
- // Perform cleanup on the real TS object.
- tss_adapter->cleanup ();
- // Delete the adapter object.
- delete tss_adapter;
- }
-}
-
-void
-ACE_Process_Mutex::dump (void) const
-{
-// ACE_TRACE ("ACE_Process_Mutex::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if !defined (ACE_WIN32) && !defined (ACE_HAS_POSIX_SEM)
-const ACE_TCHAR *
-ACE_Process_Mutex::unique_name (void)
-{
- // For all platforms other than Win32, we are going to create a
- // machine wide unquie name if one is not provided by the user. On
- // Win32, unnamed synchronization objects are acceptable.
- ACE::unique_name (this, this->name_, ACE_UNIQUE_NAME_LEN);
- return this->name_;
-}
-#endif /* !ACE_WIN32 && !ACE_HAS_POSIX_SEM */
-
-ACE_Process_Mutex::ACE_Process_Mutex (const ACE_TCHAR *name, void *arg)
-#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
- : lock_ (USYNC_PROCESS, name, (ACE_mutexattr_t *) arg)
-#else
- : lock_ (name ? name : ACE_Process_Mutex::unique_name ())
-#endif /* ACE_WIN32 || ACE_HAS_POSIX_SEM */
-{
-#if !defined (ACE_WIN32) && !defined (ACE_HAS_POSIX_SEM)
- ACE_UNUSED_ARG (arg);
-#endif /* !ACE_WIN32 && !ACE_HAS_POSIX_SEM */
-}
-
-ACE_Process_Mutex::~ACE_Process_Mutex (void)
-{
-}
-
-ACE_RW_Process_Mutex::ACE_RW_Process_Mutex (const ACE_TCHAR *name,
- int flags)
- : lock_ (name, flags
-#if defined (ACE_WIN32)
- )
-#else
- , S_IRUSR | S_IWUSR)
-#endif /* ACE_WIN32 */
-{
-// ACE_TRACE ("ACE_RW_Process_Mutex::ACE_RW_Process_Mutex");
-}
-
-ACE_RW_Process_Mutex::~ACE_RW_Process_Mutex (void)
-{
-// ACE_TRACE ("ACE_RW_Process_Mutex::ACE_RW_Process_Mutex");
-}
-
-void
-ACE_RW_Process_Mutex::dump (void) const
-{
-// ACE_TRACE ("ACE_RW_Process_Mutex::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_RW_Mutex::dump (void) const
-{
-// ACE_TRACE ("ACE_RW_Mutex::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_RW_Mutex::ACE_RW_Mutex (int type, const ACE_TCHAR *name, void *arg)
- : removed_ (0)
-{
-// ACE_TRACE ("ACE_RW_Mutex::ACE_RW_Mutex");
- if (ACE_OS::rwlock_init (&this->lock_, type, name, arg) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT("%p\n"),
- ACE_TEXT("ACE_RW_Mutex::ACE_RW_Mutex")));
-}
-
-ACE_RW_Mutex::~ACE_RW_Mutex (void)
-{
-// ACE_TRACE ("ACE_RW_Mutex::~ACE_RW_Mutex");
- this->remove ();
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Semaphore)
-
-void
-ACE_Semaphore::dump (void) const
-{
-// ACE_TRACE ("ACE_Semaphore::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Semaphore::ACE_Semaphore (u_int count,
- int type,
- const ACE_TCHAR *name,
- void *arg,
- int max)
- : removed_ (0)
-{
-// ACE_TRACE ("ACE_Semaphore::ACE_Semaphore");
- if (ACE_OS::sema_init (&this->semaphore_, count, type,
- name, arg, max) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT("%p\n"),
- ACE_TEXT("ACE_Semaphore::ACE_Semaphore")));
-}
-
-ACE_Semaphore::~ACE_Semaphore (void)
-{
-// ACE_TRACE ("ACE_Semaphore::~ACE_Semaphore");
-
- this->remove ();
-}
-
-void
-ACE_File_Lock::dump (void) const
-{
-// ACE_TRACE ("ACE_File_Lock::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_File_Lock::ACE_File_Lock (ACE_HANDLE h)
- : removed_ (0)
-{
-// ACE_TRACE ("ACE_File_Lock::ACE_File_Lock");
- if (ACE_OS::flock_init (&this->lock_) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_File_Lock::ACE_File_Lock")));
- this->set_handle (h);
-}
-
-ACE_File_Lock::ACE_File_Lock (const ACE_TCHAR *name,
- int flags,
- mode_t perms)
-{
-// ACE_TRACE ("ACE_File_Lock::ACE_File_Lock");
-
- if (this->open (name, flags, perms) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p %s\n"),
- ACE_TEXT ("ACE_File_Lock::ACE_File_Lock"),
- name));
-}
-
-int
-ACE_File_Lock::open (const ACE_TCHAR *name,
- int flags,
- mode_t perms)
-{
-// ACE_TRACE ("ACE_File_Lock::open");
- this->removed_ = 0;
- return ACE_OS::flock_init (&this->lock_, flags, name, perms);
-}
-
-ACE_File_Lock::~ACE_File_Lock (void)
-{
-// ACE_TRACE ("ACE_File_Lock::~ACE_File_Lock");
- this->remove ();
-}
-
-void
-ACE_Process_Semaphore::dump (void) const
-{
-// ACE_TRACE ("ACE_Process_Semaphore::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Process_Semaphore::ACE_Process_Semaphore (u_int count,
- const ACE_TCHAR *name,
- void *arg,
- int max)
-#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
- : lock_ (count, USYNC_PROCESS, name, arg, max)
-#else
- : lock_ (name, ACE_SV_Semaphore_Complex::ACE_CREATE, count)
-#endif /* ACE_WIN32 || ACE_HAS_POSIX_SEM */
-{
- arg = arg;
- max = max;
-// ACE_TRACE ("ACE_Process_Semaphore::ACE_Process_Semaphore");
-}
-
-ACE_Process_Semaphore::~ACE_Process_Semaphore (void)
-{
- // ACE_TRACE ("ACE_Process_Semaphore::~ACE_Process_Semaphore");
-}
-
-// Explicitly destroy the semaphore.
-
-int
-ACE_Process_Semaphore::remove (void)
-{
-// ACE_TRACE ("ACE_Process_Semaphore::remove");
- return this->lock_.remove ();
-}
-
-// Block the thread until the semaphore count becomes
-// greater than 0, then decrement it.
-
-int
-ACE_Process_Semaphore::acquire (void)
-{
-// ACE_TRACE ("ACE_Process_Semaphore::acquire");
- return this->lock_.acquire ();
-}
-
-// Conditionally decrement the semaphore if count is greater
-// than 0 (i.e., won't block).
-
-int
-ACE_Process_Semaphore::tryacquire (void)
-{
-// ACE_TRACE ("ACE_Process_Semaphore::tryacquire");
- return this->lock_.tryacquire ();
-}
-
-// Increment the semaphore, potentially unblocking
-// a waiting thread.
-
-int
-ACE_Process_Semaphore::release (void)
-{
-// ACE_TRACE ("ACE_Process_Semaphore::release");
- return this->lock_.release ();
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Mutex)
-
-void
-ACE_Mutex::dump (void) const
-{
-// ACE_TRACE ("ACE_Mutex::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-#if defined (CHORUS)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("lockname_ = %s\n"), this->lockname_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("process_lock_ = %x\n"), this->process_lock_));
-#endif /* CHORUS */
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Mutex::ACE_Mutex (int type, const ACE_TCHAR *name, ACE_mutexattr_t *arg)
- :
-#if defined (CHORUS)
- process_lock_ (0),
- lockname_ (0),
-#endif /* CHORUS */
- removed_ (0)
-{
- // ACE_TRACE ("ACE_Mutex::ACE_Mutex");
-
-#if defined(CHORUS)
- if (type == USYNC_PROCESS)
- {
- // Let's see if the shared memory entity already exists.
- ACE_HANDLE fd = ACE_OS::shm_open (name,
- O_RDWR | O_CREAT | O_EXCL,
- ACE_DEFAULT_FILE_PERMS);
- if (fd == ACE_INVALID_HANDLE)
- {
- if (errno == EEXIST)
- fd = ACE_OS::shm_open (name,
- O_RDWR | O_CREAT,
- ACE_DEFAULT_FILE_PERMS);
- else
- return;
- }
- else
- {
- // We own this shared memory object! Let's set its size.
- if (ACE_OS::ftruncate (fd,
- sizeof (ACE_mutex_t)) == -1)
- {
- ACE_OS::close (fd);
- return;
- }
- this->lockname_ = ACE_OS::strdup (name);
- if (this->lockname_ == 0)
- {
- ACE_OS::close (fd);
- return;
- }
- }
-
- this->process_lock_ =
- (ACE_mutex_t *) ACE_OS::mmap (0,
- sizeof (ACE_mutex_t),
- PROT_RDWR,
- MAP_SHARED,
- fd,
- 0);
- ACE_OS::close (fd);
- if (this->process_lock_ == MAP_FAILED)
- return;
-
- if (this->lockname_
- && ACE_OS::mutex_init (this->process_lock_,
- type,
- name,
- arg) != 0)
- return;
- }
- // It is ok to fall through into the <mutex_init> below if the
- // USYNC_PROCESS flag is not enabled.
-#endif /* CHORUS */
- if (ACE_OS::mutex_init (&this->lock_,
- type,
- name,
- arg) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Mutex::ACE_Mutex")));
-}
-
-ACE_Mutex::~ACE_Mutex (void)
-{
-// ACE_TRACE ("ACE_Mutex::~ACE_Mutex");
- this->remove ();
-}
-
-ACE_Event::ACE_Event (int manual_reset,
- int initial_state,
- int type,
- const ACE_TCHAR *name,
- void *arg)
- : removed_ (0)
-{
- if (ACE_OS::event_init (&this->handle_,
- manual_reset,
- initial_state,
- type,
- name,
- arg) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT("%p\n"),
- ACE_TEXT("ACE_Event::ACE_Event")));
-}
-
-ACE_Event::~ACE_Event (void)
-{
- this->remove ();
-}
-
-int
-ACE_Event::remove (void)
-{
- int result = 0;
- if (this->removed_ == 0)
- {
- this->removed_ = 1;
- result = ACE_OS::event_destroy (&this->handle_);
- }
- return result;
-}
-
-ACE_event_t
-ACE_Event::handle (void) const
-{
- return this->handle_;
-}
-
-void
-ACE_Event::handle (ACE_event_t new_handle)
-{
- this->handle_ = new_handle;
-}
-
-int
-ACE_Event::wait (void)
-{
- return ACE_OS::event_wait (&this->handle_);
-}
-
-int
-ACE_Event::wait (const ACE_Time_Value *abstime)
-{
- return ACE_OS::event_timedwait (&this->handle_,
- (ACE_Time_Value *) abstime);
-}
-
-int
-ACE_Event::signal (void)
-{
- return ACE_OS::event_signal (&this->handle_);
-}
-
-int
-ACE_Event::pulse (void)
-{
- return ACE_OS::event_pulse (&this->handle_);
-}
-
-int
-ACE_Event::reset (void)
-{
- return ACE_OS::event_reset (&this->handle_);
-}
-
-void
-ACE_Event::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Manual_Event::ACE_Manual_Event (int initial_state,
- int type,
- const ACE_TCHAR *name,
- void *arg)
- : ACE_Event (1,
- initial_state,
- type,
- name,
- arg)
-{
-}
-
-void
-ACE_Manual_Event::dump (void) const
-{
- ACE_Event::dump ();
-}
-
-ACE_Auto_Event::ACE_Auto_Event (int initial_state,
- int type,
- const ACE_TCHAR *name,
- void *arg)
- : ACE_Event (0,
- initial_state,
- type,
- name,
- arg)
-{
-}
-
-void
-ACE_Auto_Event::dump (void) const
-{
- ACE_Event::dump ();
-}
-
-#if defined (ACE_HAS_THREADS)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Mutex_Guard)
-
-void
-ACE_Thread_Semaphore::dump (void) const
-{
-// ACE_TRACE ("ACE_Thread_Semaphore::dump");
-
- ACE_Semaphore::dump ();
-}
-
-ACE_Thread_Semaphore::ACE_Thread_Semaphore (u_int count,
- const ACE_TCHAR *name,
- void *arg,
- int max)
- : ACE_Semaphore (count, USYNC_THREAD, name, arg, max)
-{
-// ACE_TRACE ("ACE_Thread_Semaphore::ACE_Thread_Semaphore");
-}
-
-#if defined (ACE_USES_OBSOLETE_GUARD_CLASSES)
-void
-ACE_Thread_Mutex_Guard::dump (void) const
-{
-// ACE_TRACE ("ACE_Thread_Mutex_Guard::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-#endif /* ACE_USES_OBSOLETE_GUARD_CLASSES */
-
-ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex (const ACE_TCHAR *name,
- ACE_mutexattr_t *arg)
- : removed_ (0)
-{
- // ACE_TRACE ("ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex");
-#if defined (ACE_HAS_FSU_PTHREADS) && ! defined (ACE_WIN32)
- // Initialize FSU pthreads package. If called more than once,
- // pthread_init does nothing and so does no harm.
- pthread_init ();
-#endif /* ACE_HAS_FSU_PTHREADS && ! ACE_WIN32 */
- if (ACE_OS::recursive_mutex_init (&this->recursive_mutex_,
- name,
- arg) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("recursive_mutex_init")));
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Recursive_Thread_Mutex)
-
-ACE_Recursive_Thread_Mutex::~ACE_Recursive_Thread_Mutex (void)
-{
- // ACE_TRACE ("ACE_Recursive_Thread_Mutex::~ACE_Recursive_Thread_Mutex");
- this->remove ();
-}
-
-int
-ACE_Recursive_Thread_Mutex::remove (void)
-{
-// ACE_TRACE ("ACE_Recursive_Thread_Mutex::remove");
- int result = 0;
- if (this->removed_ == 0)
- {
- this->removed_ = 1;
- result = ACE_OS::recursive_mutex_destroy (&this->recursive_mutex_);
- }
- return result;
-}
-
-// The counter part of the following two functions for Win32 are
-// located in file Synch.i
-ACE_thread_t
-ACE_Recursive_Thread_Mutex::get_thread_id (void)
-{
- // ACE_TRACE ("ACE_Recursive_Thread_Mutex::get_thread_id");
-#if defined (ACE_HAS_RECURSIVE_MUTEXES)
- // @@ The structure CriticalSection in Win32 doesn't hold the thread
- // handle of the thread that owns the lock. However it is still not
- // clear at this point how to translate a thread handle to its
- // corresponding thread id.
- errno = ENOTSUP;
- return ACE_OS::NULL_thread;
-#else
- ACE_thread_t owner_id;
- ACE_OS::mutex_lock (&this->recursive_mutex_.nesting_mutex_);
- owner_id = this->recursive_mutex_.owner_id_;
- ACE_OS::mutex_unlock (&this->recursive_mutex_.nesting_mutex_);
- return owner_id;
-#endif /* ACE_WIN32 */
-}
-
-int
-ACE_Recursive_Thread_Mutex::get_nesting_level (void)
-{
- // ACE_TRACE ("ACE_Recursive_Thread_Mutex::get_nesting_level");
-#if defined (ACE_HAS_WINCE) || defined (VXWORKS) || defined (ACE_PSOS)
- ACE_NOTSUP_RETURN (-1);
-#elif defined (ACE_HAS_RECURSIVE_MUTEXES)
- // This is really a Win32-ism...
- return this->recursive_mutex_.RecursionCount;
-#else
- int nesting_level = 0;
- ACE_OS::mutex_lock (&this->recursive_mutex_.nesting_mutex_);
- nesting_level = this->recursive_mutex_.nesting_level_;
- ACE_OS::mutex_unlock (&this->recursive_mutex_.nesting_mutex_);
- return nesting_level;
-#endif /* !ACE_HAS_WINCE */
-}
-
-ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex (const ACE_Recursive_Thread_Mutex &)
-{
-}
-
-int
-ACE_Recursive_Thread_Mutex::acquire (void)
-{
- return ACE_OS::recursive_mutex_lock (&this->recursive_mutex_);
-}
-
-int
-ACE_Recursive_Thread_Mutex::release (void)
-{
- return ACE_OS::recursive_mutex_unlock (&this->recursive_mutex_);
-}
-
-int
-ACE_Recursive_Thread_Mutex::tryacquire (void)
-{
- return ACE_OS::recursive_mutex_trylock (&this->recursive_mutex_);
-}
-
-void
-ACE_Recursive_Thread_Mutex::dump (void) const
-{
-// ACE_TRACE ("ACE_Recursive_Thread_Mutex::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Condition_Thread_Mutex)
-
-void
-ACE_Condition_Thread_Mutex::dump (void) const
-{
-// ACE_TRACE ("ACE_Condition_Thread_Mutex::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
-#if defined (ACE_WIN32)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("waiters = %d\n"),
- this->cond_.waiters ()));
-#endif /* ACE_WIN32 */
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &m,
- const ACE_TCHAR *name,
- void *arg)
- : mutex_ ((ACE_Thread_Mutex &) m),
- removed_ (0)
-{
-#if defined (ACE_HAS_FSU_PTHREADS)
-// Initialize FSU pthreads package.
-// If called more than once, pthread_init does nothing
-// and so does no harm.
- pthread_init ();
-#endif /* ACE_HAS_FSU_PTHREADS */
-
-// ACE_TRACE ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex");
- if (ACE_OS::cond_init (&this->cond_,
- (short) USYNC_THREAD,
- name,
- arg) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex")));
-}
-
-ACE_Condition_Thread_Mutex::
-ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &m,
- ACE_Condition_Attributes &attributes,
- const ACE_TCHAR *name,
- void *arg)
- : mutex_ ((ACE_Thread_Mutex &) m),
- removed_ (0)
-{
-#if defined (ACE_HAS_FSU_PTHREADS)
-// Initialize FSU pthreads package.
-// If called more than once, pthread_init does nothing
-// and so does no harm.
- pthread_init ();
-#endif /* ACE_HAS_FSU_PTHREADS */
-
-// ACE_TRACE ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex");
- if (ACE_OS::cond_init (&this->cond_, attributes.attributes_,
- name, arg) != 0)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex")));
-}
-
-ACE_Condition_Thread_Mutex::~ACE_Condition_Thread_Mutex (void)
-{
-// ACE_TRACE ("ACE_Condition_Thread_Mutex::~ACE_Condition_Thread_Mutex");
- this->remove ();
-}
-
-// Peform an "alertable" timed wait. If the argument <abstime> == 0
-// then we do a regular <cond_wait>, else we do a timed wait for up to
-// <abstime> using the <cond_timedwait> function.
-
-int
-ACE_Condition_Thread_Mutex::wait (void)
-{
-// ACE_TRACE ("ACE_Condition_Thread_Mutex::wait");
- return ACE_OS::cond_wait (&this->cond_, &this->mutex_.lock_);
-}
-
-int
-ACE_Condition_Thread_Mutex::wait (ACE_Thread_Mutex &mutex,
- const ACE_Time_Value *abstime)
-{
-// ACE_TRACE ("ACE_Condition<MUTEX>::wait");
- return ACE_OS::cond_timedwait (&this->cond_,
- &mutex.lock_,
- (ACE_Time_Value *) abstime);
-}
-
-int
-ACE_Condition_Thread_Mutex::wait (const ACE_Time_Value *abstime)
-{
-// ACE_TRACE ("ACE_Condition_Thread_Mutex::wait");
- return this->wait (this->mutex_, abstime);
-}
-
-int
-ACE_Condition_Thread_Mutex::signal (void)
-{
-// ACE_TRACE ("ACE_Condition_Thread_Mutex::signal");
- return ACE_OS::cond_signal (&this->cond_);
-}
-
-int
-ACE_Condition_Thread_Mutex::broadcast (void)
-{
-// ACE_TRACE ("ACE_Condition_Thread_Mutex::broadcast");
- return ACE_OS::cond_broadcast (&this->cond_);
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Sub_Barrier)
-
-void
-ACE_Sub_Barrier::dump (void) const
-{
-// ACE_TRACE ("ACE_Sub_Barrier::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->barrier_finished_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("running_threads_ = %d"), this->running_threads_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Sub_Barrier::ACE_Sub_Barrier (u_int count,
- ACE_Thread_Mutex &lock,
- const ACE_TCHAR *name,
- void *arg)
- : barrier_finished_ (lock, name, arg),
- running_threads_ (count)
-{
-// ACE_TRACE ("ACE_Sub_Barrier::ACE_Sub_Barrier");
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Barrier)
-ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Barrier)
-ACE_ALLOC_HOOK_DEFINE(ACE_Process_Barrier)
-
-void
-ACE_Barrier::dump (void) const
-{
-// ACE_TRACE ("ACE_Barrier::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("current_generation_ = %d"), this->current_generation_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\ncount_ = %d"), this->count_));
- this->sub_barrier_1_.dump ();
- this->sub_barrier_2_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Barrier::ACE_Barrier (u_int count,
- const ACE_TCHAR *name,
- void *arg)
- : lock_ (name, (ACE_mutexattr_t *) arg),
- current_generation_ (0),
- count_ (count),
- sub_barrier_1_ (count, lock_, name, arg),
- sub_barrier_2_ (count, lock_, name, arg)
-{
-// ACE_TRACE ("ACE_Barrier::ACE_Barrier");
- this->sub_barrier_[0] = &this->sub_barrier_1_;
- this->sub_barrier_[1] = &this->sub_barrier_2_;
-}
-
-int
-ACE_Barrier::wait (void)
-{
-// ACE_TRACE ("ACE_Barrier::wait");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
-
- ACE_Sub_Barrier *sbp =
- this->sub_barrier_[this->current_generation_];
-
- // Check for shutdown...
- if (sbp == 0)
- return -1;
-
- if (sbp->running_threads_ == 1)
- {
- // We're the last running thread, so swap generations and tell
- // all the threads waiting on the barrier to continue on their
- // way.
-
- sbp->running_threads_ = this->count_;
- // Swap generations.
- this->current_generation_ = 1 - this->current_generation_;
- sbp->barrier_finished_.broadcast ();
- }
- else
- {
- --sbp->running_threads_;
-
- // Block until all the other threads wait().
- while (sbp->running_threads_ != this->count_)
- sbp->barrier_finished_.wait ();
- }
-
- return 0;
-}
-
-ACE_Thread_Barrier::ACE_Thread_Barrier (u_int count, const ACE_TCHAR *name)
- : ACE_Barrier (count, name)
-{
-// ACE_TRACE ("ACE_Thread_Barrier::ACE_Thread_Barrier");
-}
-
-void
-ACE_Thread_Barrier::dump (void) const
-{
-// ACE_TRACE ("ACE_Thread_Barrier::dump");
- ACE_Barrier::dump ();
-}
-
-#if 0
-ACE_Process_Barrier::ACE_Process_Barrier (u_int count, const ACE_TCHAR *name)
- : ACE_Barrier (count, USYNC_PROCESS, name)
-{
-// ACE_TRACE ("ACE_Process_Barrier::ACE_Process_Barrier");
-}
-
-void
-ACE_Process_Barrier::dump (void) const
-{
-// ACE_TRACE ("ACE_Process_Barrier::dump");
- ACE_Barrier::dump ();
-}
-
-template <class MUTEX> void
-ACE_Process_Condition<MUTEX>::dump (void) const
-{
-// ACE_TRACE ("ACE_Process_Condition<MUTEX>::dump");
-
- ACE_Condition<MUTEX>::dump ();
-}
-
-template <class MUTEX>
-ACE_Process_Condition<MUTEX>::ACE_Process_Condition (MUTEX &m,
- const ACE_TCHAR *name,
- void *arg)
- : ACE_Condition<MUTEX> (m, USYNC_PROCESS, name, arg)
-{
-// ACE_TRACE ("ACE_Process_Condition<MUTEX>::ACE_Process_Condition");
-}
-#endif /* 0 */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Mutex)
-
-void
-ACE_Thread_Mutex::dump (void) const
-{
-// ACE_TRACE ("ACE_Thread_Mutex::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Thread_Mutex::~ACE_Thread_Mutex (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex::~ACE_Thread_Mutex");
- this->remove ();
-}
-
-ACE_Thread_Mutex::ACE_Thread_Mutex (const ACE_TCHAR *name, ACE_mutexattr_t *arg)
- : removed_ (0)
-{
-// ACE_TRACE ("ACE_Thread_Mutex::ACE_Thread_Mutex");
-
- if (ACE_OS::thread_mutex_init (&this->lock_,
- USYNC_THREAD,
- name,
- arg) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Thread_Mutex::ACE_Thread_Mutex")));
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_RW_Thread_Mutex)
-
-ACE_RW_Thread_Mutex::ACE_RW_Thread_Mutex (const ACE_TCHAR *name,
- void *arg)
- : ACE_RW_Mutex (USYNC_THREAD, name, arg)
-{
-// ACE_TRACE ("ACE_RW_Thread_Mutex::ACE_RW_Thread_Mutex");
-}
-
-void
-ACE_RW_Thread_Mutex::dump (void) const
-{
-// ACE_TRACE ("ACE_RW_Thread_Mutex::dump");
- ACE_RW_Mutex::dump ();
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-// These are only instantiated with ACE_HAS_THREADS.
-template class ACE_Guard<ACE_Thread_Mutex>;
-template class ACE_Guard<ACE_RW_Thread_Mutex>;
-template class ACE_Read_Guard<ACE_RW_Thread_Mutex>;
-template class ACE_Read_Guard<ACE_Thread_Mutex>;
-template class ACE_Write_Guard<ACE_RW_Thread_Mutex>;
-template class ACE_Write_Guard<ACE_Thread_Mutex>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-// These are only instantiated with ACE_HAS_THREADS.
-#pragma instantiate ACE_Guard<ACE_Thread_Mutex>
-#pragma instantiate ACE_Guard<ACE_RW_Thread_Mutex>
-#pragma instantiate ACE_Read_Guard<ACE_RW_Thread_Mutex>
-#pragma instantiate ACE_Read_Guard<ACE_Thread_Mutex>
-#pragma instantiate ACE_Write_Guard<ACE_RW_Thread_Mutex>
-#pragma instantiate ACE_Write_Guard<ACE_Thread_Mutex>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-#endif /* ACE_HAS_THREADS */
-
-//
-// These are instantiated both with and without ACE_HAS_THREADS.
-//
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-template class ACE_Guard<ACE_Process_Mutex>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Guard<ACE_Process_Mutex>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-#endif /* ACE_SYNCH_C */
diff --git a/ace/Synch.h b/ace/Synch.h
deleted file mode 100644
index 1257575285f..00000000000
--- a/ace/Synch.h
+++ /dev/null
@@ -1,1703 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Synch.h
-//
-// = DESCRIPTION
-// Wrappers for various synchronization routines.
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SYNCH_H
-#define ACE_SYNCH_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !(defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM))
-#include "ace/SV_Semaphore_Complex.h"
-#endif /* !(defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)) */
-
-// Forward declarations.
-class ACE_Time_Value;
-// template <class ACE_COND_MUTEX> class ACE_Condition;
-
-class ACE_Export ACE_Lock
-{
- // = TITLE
- // This is the abstract base class that contains the uniform
- // locking API that is supported by all the ACE synchronization
- // mechanisms.
- //
- // = DESCRIPTION
- // This class is typically used in conjunction with the
- // <ACE_Lock_Adapter> in order to provide a polymorphic
- // interface to the ACE synchronization mechanisms (e.g.,
- // <ACE_Mutex>, <ACE_Semaphore>, <ACE_RW_Mutex>, etc). Note that
- // the reason that all of ACE doesn't use polymorphic locks is
- // that (1) they add ~20% extra overhead for virtual function
- // calls and (2) objects with virtual functions can't be placed
- // into shared memory.
-public:
- ACE_Lock (void);
- // CE needs a default ctor here.
-
- virtual ~ACE_Lock (void);
- // Noop virtual destructor
-
- virtual int remove (void) = 0;
- // Explicitly destroy the lock. Note that only one thread should
- // call this method since it doesn't protect against race
- // conditions.
-
- virtual int acquire (void) = 0;
- // Block the thread until the lock is acquired. Returns -1 on
- // failure.
-
- virtual int tryacquire (void) = 0;
- // Conditionally acquire the lock (i.e., won't block). Returns -1
- // on failure. If we "failed" because someone else already had the
- // lock, <errno> is set to <EBUSY>.
-
- virtual int release (void) = 0;
- // Release the lock. Returns -1 on failure.
-
- virtual int acquire_read (void) = 0;
- // Block until the thread acquires a read lock. If the locking
- // mechanism doesn't support read locks then this just calls
- // <acquire>. Returns -1 on failure.
-
- virtual int acquire_write (void) = 0;
- // Block until the thread acquires a write lock. If the locking
- // mechanism doesn't support read locks then this just calls
- // <acquire>. Returns -1 on failure.
-
- virtual int tryacquire_read (void) = 0;
- // Conditionally acquire a read lock. If the locking mechanism
- // doesn't support read locks then this just calls <acquire>.
- // Returns -1 on failure. If we "failed" because someone else
- // already had the lock, <errno> is set to <EBUSY>.
-
- virtual int tryacquire_write (void) = 0;
- // Conditionally acquire a write lock. If the locking mechanism
- // doesn't support read locks then this just calls <acquire>.
- // Returns -1 on failure. If we "failed" because someone else
- // already had the lock, <errno> is set to <EBUSY>.
-};
-
-class ACE_Export ACE_Adaptive_Lock : public ACE_Lock
-{
- // = TITLE
- // An adaptive general locking class that defers the decision of
- // lock type to run time.
- //
- // = DESCRIPTION
- // This class, as ACE_Lock, provide a set of general locking APIs.
- // However, it defers our decision of what kind of lock to use
- // to the run time and delegates all locking operations to the actual
- // lock. Users must define a constructor in their subclass to
- // initialize <lock_>.
-public:
- virtual ~ACE_Adaptive_Lock (void);
- // You must also override the destructor function to match with how
- // you construct the underneath <lock_>.
-
- // = Lock/unlock operations.
-
- virtual int remove (void);
- virtual int acquire (void);
- virtual int tryacquire (void);
- virtual int release (void);
- virtual int acquire_read (void);
- virtual int acquire_write (void);
- virtual int tryacquire_read (void);
- virtual int tryacquire_write (void);
- void dump (void) const;
-
-protected:
- ACE_Adaptive_Lock (void);
- // Create and initialize create the actual lcok used in the class.
- // The default constructor simply set the <lock_> to 0 (null). You
- // must overwrite this method for this class to work.
-
- ACE_Lock *lock_;
-};
-
-class ACE_Export ACE_File_Lock
-{
- // = TITLE
- // A wrapper around the UNIX file locking mechanism.
- //
- // = DESCRIPTION
- // Allows us to "adapt" the UNIX file locking mechanisms to work
- // with all of our Guard stuff...
-public:
- ACE_File_Lock (ACE_HANDLE handle = ACE_INVALID_HANDLE);
- // Set the <handle_> of the File_Lock to <handle>. Note that this
- // constructor assumes ownership of the <handle> and will close it
- // down in <remove>. If you want the <handle> stays open when
- // <remove> is called make sure to call <dup> on the <handle> before
- // closing it.
-
- ACE_File_Lock (const ACE_TCHAR *filename, int flags, mode_t mode = 0);
- // Open the <filename> with <flags> and <mode> and set the result to
- // <handle_>.
-
- int open (const ACE_TCHAR *filename, int flags, mode_t mode = 0);
- // Open the <filename> with <flags> and <mode> and set the result to
- // <handle_>.
-
- ~ACE_File_Lock (void);
- // Remove a File lock by releasing it and closing down the <handle_>.
-
- int remove (int unlink_file = 1);
- // Remove a File lock by releasing it and closing down the
- // <handle_>. If <unlink_file> is non-0 then we unlink the file.
-
- int acquire (short whence = 0, off_t start = 0, off_t len = 1);
- // Note, for interface uniformity with other synchronization
- // wrappers we include the <acquire> method. This is implemented as
- // a write-lock to be on the safe-side...
-
- int tryacquire (short whence = 0, off_t start = 0, off_t len = 1);
- // Note, for interface uniformity with other synchronization
- // wrappers we include the <tryacquire> method. This is implemented
- // as a write-lock to be on the safe-side... Returns -1 on failure.
- // If we "failed" because someone else already had the lock, <errno>
- // is set to <EBUSY>.
-
- int release (short whence = 0, off_t start = 0, off_t len = 1);
- // Unlock a readers/writer lock.
-
- int acquire_write (short whence = 0, off_t start = 0, off_t len = 1);
- // Acquire a write lock, but block if any readers or a
- // writer hold the lock.
-
- int tryacquire_write (short whence = 0, off_t start = 0, off_t len = 1);
- // Conditionally acquire a write lock (i.e., won't block). Returns
- // -1 on failure. If we "failed" because someone else already had
- // the lock, <errno> is set to <EBUSY>.
-
- int acquire_read (short whence = 0, off_t start = 0, off_t len = 1);
- // Acquire a read lock, but block if a writer hold the lock.
- // Returns -1 on failure. If we "failed" because someone else
- // already had the lock, <errno> is set to <EBUSY>.
-
- int tryacquire_read (short whence = 0, off_t start = 0, off_t len = 1);
- // Conditionally acquire a read lock (i.e., won't block). Returns
- // -1 on failure. If we "failed" because someone else already had
- // the lock, <errno> is set to <EBUSY>.
-
- ACE_HANDLE get_handle (void);
- // Get underlying <ACE_HANDLE> for the file.
-
- void set_handle (ACE_HANDLE);
- // Set underlying <ACE_HANDLE>. Note that this method assumes
- // ownership of the <handle> and will close it down in <remove>. If
- // you want the <handle> to stay open when <remove> is called make
- // sure to call <dup> on the <handle> before closing it. You are
- // responsible for the closing the existing <handle> before
- // overwriting it.
-
- void dump (void) const;
- // Dump state of the object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_OS::ace_flock_t lock_;
- // Locking structure for OS record locks.
-
- int removed_;
- // Keeps track of whether <remove> has been called yet to avoid
- // multiple <remove> calls, e.g., explicitly and implicitly in the
- // destructor. This flag isn't protected by a lock, so make sure
- // that you don't have multiple threads simultaneously calling
- // <remove> on the same object, which is a bad idea anyway...
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_File_Lock &);
- ACE_File_Lock (const ACE_File_Lock &);
-};
-
-class ACE_Export ACE_Semaphore
-{
- // = TITLE
- // Wrapper for Dijkstra style general semaphores.
-public:
- // = Initialization and termination.
- ACE_Semaphore (u_int count = 1, // By default make this unlocked.
- int type = USYNC_THREAD,
- const ACE_TCHAR *name = 0,
- void * = 0,
- int max = 0x7fffffff);
- // Initialize the semaphore, with initial value of "count".
-
- ~ACE_Semaphore (void);
- // Implicitly destroy the semaphore.
-
- int remove (void);
- // Explicitly destroy the semaphore. Note that only one thread
- // should call this method since it doesn't protect against race
- // conditions.
-
- int acquire (void);
- // Block the thread until the semaphore count becomes
- // greater than 0, then decrement it.
-
- int acquire (ACE_Time_Value &tv);
- // Block the thread until <tv> times out or until the semaphore
- // count becomes greater than 0 (at which point it is decremented).
- // Note that <tv> is assumed to be in "absolute" rather than
- // "relative" time. The value of <tv> is updated upon return to
- // show the actual (absolute) acquisition time.
- //
- // NOTE: Solaris threads do not support timed semaphores.
- // Therefore, if you're running on Solaris you might want to
- // consider using the ACE POSIX pthreads implementation instead,
- // which can be enabled by compiling ACE with
- // -D_POSIX_PTHREAD_SEMANTICS.
-
- int tryacquire (void);
- // Conditionally decrement the semaphore if count is greater than 0
- // (i.e., won't block). Returns -1 on failure. If we "failed"
- // because someone else already had the lock, <errno> is set to
- // <EBUSY>.
-
- int release (void);
- // Increment the semaphore by 1, potentially unblocking a waiting
- // thread.
-
- int release (size_t release_count);
- // Increment the semaphore by <release_count>, potentially
- // unblocking waiting threads.
-
- int acquire_read (void);
- // Acquire semaphore ownership. This calls <acquire> and is only
- // here to make the <ACE_Semaphore> interface consistent with the
- // other synchronization APIs.
-
- int acquire_write (void);
- // Acquire semaphore ownership. This calls <acquire> and is only
- // here to make the <ACE_Semaphore> interface consistent with the
- // other synchronization APIs.
-
- int tryacquire_read (void);
- // Conditionally acquire semaphore (i.e., won't block). This calls
- // <tryacquire> and is only here to make the <ACE_Semaphore>
- // interface consistent with the other synchronization APIs.
- // Returns -1 on failure. If we "failed" because someone else
- // already had the lock, <errno> is set to <EBUSY>.
-
- int tryacquire_write (void);
- // Conditionally acquire semaphore (i.e., won't block). This calls
- // <tryacquire> and is only here to make the <ACE_Semaphore>
- // interface consistent with the other synchronization APIs.
- // Returns -1 on failure. If we "failed" because someone else
- // already had the lock, <errno> is set to <EBUSY>.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- const ACE_sema_t &lock (void) const;
- // Return the underlying lock.
-
-protected:
- ACE_sema_t semaphore_;
-
- int removed_;
- // Keeps track of whether <remove> has been called yet to avoid
- // multiple <remove> calls, e.g., explicitly and implicitly in the
- // destructor. This flag isn't protected by a lock, so make sure
- // that you don't have multiple threads simultaneously calling
- // <remove> on the same object, which is a bad idea anyway...
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Semaphore &);
- ACE_Semaphore (const ACE_Semaphore &);
-};
-
-class ACE_Export ACE_Process_Semaphore
-{
- // = TITLE
- // Wrapper for Dijkstra style general semaphores that work
- // across processes.
-public:
- ACE_Process_Semaphore (u_int count = 1, // By default make this unlocked.
- const ACE_TCHAR *name = 0,
- void * = 0,
- int max = 0x7FFFFFFF);
- // Initialize the semaphore, with an initial value of <count> and a
- // maximum value of <max>.
-
- ~ACE_Process_Semaphore (void);
- // This method is a no-op, i.e., it doesn't remove the semaphore.
- // If you want to remove the semaphore, you must call the <remove>
- // method explicitly.
-
- int remove (void);
- // Explicitly destroy the semaphore. Note that only one thread
- // should call this method since it doesn't protect against race
- // conditions.
-
- int acquire (void);
- // Block the thread until the semaphore count becomes greater than
- // 0, then decrement it.
-
- int tryacquire (void);
- // Conditionally decrement the semaphore if count is greater than 0
- // (i.e., won't block). Returns -1 on failure. If we "failed"
- // because someone else already had the lock, <errno> is set to
- // <EBUSY>.
-
- int release (void);
- // Increment the semaphore, potentially unblocking a waiting thread.
-
- int acquire_read (void);
- // Acquire semaphore ownership. This calls <acquire> and is only
- // here to make the <ACE_Process_Semaphore> interface consistent
- // with the other synchronization APIs.
-
- int acquire_write (void);
- // Acquire semaphore ownership. This calls <acquire> and is only
- // here to make the <ACE_Process_Semaphore> interface consistent
- // with the other synchronization APIs.
-
- int tryacquire_read (void);
- // Conditionally acquire semaphore (i.e., won't block). This calls
- // <tryacquire> and is only here to make the <ACE_Process_Semaphore>
- // interface consistent with the other synchronization APIs.
- // Returns -1 on failure. If we "failed" because someone else
- // already had the lock, <errno> is set to <EBUSY>.
-
- int tryacquire_write (void);
- // Conditionally acquire semaphore (i.e., won't block). This calls
- // <tryacquire> and is only here to make the <ACE_Process_Semaphore>
- // interface consistent with the other synchronization APIs.
- // Returns -1 on failure. If we "failed" because someone else
- // already had the lock, <errno> is set to <EBUSY>.
-
-#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
- const ACE_sema_t &lock (void) const;
- // Return the underlying lock.
-#endif /* ACE_WIN32 */
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
-#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
- ACE_Semaphore lock_;
-#else
- ACE_SV_Semaphore_Complex lock_;
- // We need this to get the right semantics...
-#endif /* ACE_WIN32 */
-};
-
-class ACE_Export ACE_Null_Semaphore
-{
- // = TITLE
- // Implement a do nothing <ACE_Semaphore>, i.e., all the methods are
- // no ops.
-public:
- ACE_Null_Semaphore (u_int count = 1, // By default make this unlocked.
- int type = USYNC_THREAD,
- const ACE_TCHAR *name = 0,
- void * = 0,
- int max = 0x7fffffff);
- ~ACE_Null_Semaphore (void);
- int remove (void);
-
- int acquire (ACE_Time_Value &);
- int acquire (void);
- int tryacquire (void);
- int release (void);
- int release (size_t);
- int acquire_write (void);
- int tryacquire_write (void);
- int acquire_read (void);
- int tryacquire_read (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-class ACE_Export ACE_RW_Mutex
-{
- // = TITLE
- // Wrapper for readers/writer locks.
- //
- // = DESCRIPTION
- // These are most useful for applications that have many more
- // parallel readers than writers...
-public:
- ACE_RW_Mutex (int type = USYNC_THREAD,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
- // Initialize a readers/writer lock.
-
- ~ACE_RW_Mutex (void);
- // Implicitly destroy a readers/writer lock
-
- int remove (void);
- // Explicitly destroy a readers/writer lock. Note that only one
- // thread should call this method since it doesn't protect against
- // race conditions.
-
- int acquire_read (void);
- // Acquire a read lock, but block if a writer hold the lock.
-
- int acquire_write (void);
- // Acquire a write lock, but block if any readers or a
- // writer hold the lock.
-
- int tryacquire_read (void);
- // Conditionally acquire a read lock (i.e., won't block). Returns
- // -1 on failure. If we "failed" because someone else already had
- // the lock, <errno> is set to <EBUSY>.
-
- int tryacquire_write (void);
- // Conditionally acquire a write lock (i.e., won't block).
-
- int acquire (void);
- // Note, for interface uniformity with other synchronization
- // wrappers we include the <acquire> method. This is implemented as
- // a write-lock to safe...
-
- int tryacquire (void);
- // Note, for interface uniformity with other synchronization
- // wrappers we include the <tryacquire> method. This is implemented
- // as a write-lock to be safe... Returns -1 on failure. If we
- // "failed" because someone else already had the lock, <errno> is
- // set to <EBUSY>.
-
- int release (void);
- // Unlock a readers/writer lock.
-
- const ACE_rwlock_t &lock (void) const;
- // Return the underlying lock.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_rwlock_t lock_;
- // Readers/writer lock.
-
- int removed_;
- // Keeps track of whether <remove> has been called yet to avoid
- // multiple <remove> calls, e.g., explicitly and implicitly in the
- // destructor. This flag isn't protected by a lock, so make sure
- // that you don't have multiple threads simultaneously calling
- // <remove> on the same object, which is a bad idea anyway...
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_RW_Mutex &);
- ACE_RW_Mutex (const ACE_RW_Mutex &);
-};
-
-class ACE_Export ACE_Mutex
-{
- // = TITLE
- // <ACE_Mutex> wrapper (valid in same process or across
- // processes (depending on TYPE flag)).
-public:
- ACE_Mutex (int type = USYNC_THREAD,
- const ACE_TCHAR *name = 0,
- ACE_mutexattr_t *arg = 0);
- // Initialize the mutex.
-
- ~ACE_Mutex (void);
- // Implicitly destroy the mutex.
-
- int remove (void);
- // Explicitly destroy the mutex. Note that only one thread should
- // call this method since it doesn't protect against race
- // conditions.
-
- int acquire (void);
- // Acquire lock ownership (wait on queue if necessary).
-
- int tryacquire (void);
- // Conditionally acquire lock (i.e., don't wait on queue). Returns
- // -1 on failure. If we "failed" because someone else already had
- // the lock, <errno> is set to <EBUSY>.
-
- int release (void);
- // Release lock and unblock a thread at head of queue.
-
- int acquire_read (void);
- // Acquire mutex ownership. This calls <acquire> and is only
- // here to make the <ACE_Mutex> interface consistent with the
- // other synchronization APIs.
-
- int acquire_write (void);
- // Acquire mutex ownership. This calls <acquire> and is only
- // here to make the <ACE_Mutex> interface consistent with the
- // other synchronization APIs.
-
- int tryacquire_read (void);
- // Conditionally acquire mutex (i.e., won't block). This calls
- // <tryacquire> and is only here to make the <ACE_Mutex> interface
- // consistent with the other synchronization APIs. Returns -1 on
- // failure. If we "failed" because someone else already had the
- // lock, <errno> is set to <EBUSY>.
-
- int tryacquire_write (void);
- // Conditionally acquire mutex (i.e., won't block). This calls
- // <tryacquire> and is only here to make the <ACE_Mutex> interface
- // consistent with the other synchronization APIs. Returns -1 on
- // failure. If we "failed" because someone else already had the
- // lock, <errno> is set to <EBUSY>.
-
- const ACE_mutex_t &lock (void) const;
- // Return the underlying mutex.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- // = This should be protected but some C++ compilers complain...
-public:
-#if defined (CHORUS)
- ACE_mutex_t *process_lock_;
- // This lock resides in shared memory.
-
- const ACE_TCHAR *lockname_;
- // Remember the name of the mutex if we created it so we can unlink
- // it when we go away (only the actor that initialized the memory
- // can destroy it).
-#endif /* CHORUS */
-
- ACE_mutex_t lock_;
- // Mutex type supported by the OS.
-
- int removed_;
- // Keeps track of whether <remove> has been called yet to avoid
- // multiple <remove> calls, e.g., explicitly and implicitly in the
- // destructor. This flag isn't protected by a lock, so make sure
- // that you don't have multiple threads simultaneously calling
- // <remove> on the same object, which is a bad idea anyway...
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Mutex &);
- ACE_Mutex (const ACE_Mutex &);
-};
-
-class ACE_Export ACE_Process_Mutex
-{
- // = TITLE
- // A wrapper for mutexes that can be used across processes on
- // the same host machine, as well as within a process, of
- // course.
-public:
- ACE_Process_Mutex (const ACE_TCHAR *name = 0,
- void *arg = 0);
- // Create a Process_Mutex, passing in the optional <name>.
-
- ~ACE_Process_Mutex (void);
-
- int remove (void);
- // Explicitly destroy the mutex. Note that only one thread should
- // call this method since it doesn't protect against race
- // conditions.
-
- int acquire (void);
- // Acquire lock ownership (wait on queue if necessary).
-
- int tryacquire (void);
- // Conditionally acquire lock (i.e., don't wait on queue). Returns
- // -1 on failure. If we "failed" because someone else already had
- // the lock, <errno> is set to <EBUSY>.
-
- int release (void);
- // Release lock and unblock a thread at head of queue.
-
- int acquire_read (void);
- // Acquire lock ownership (wait on queue if necessary).
-
- int acquire_write (void);
- // Acquire lock ownership (wait on queue if necessary).
-
- int tryacquire_read (void);
- // Conditionally acquire a lock (i.e., won't block). Returns -1 on
- // failure. If we "failed" because someone else already had the
- // lock, <errno> is set to <EBUSY>.
-
- int tryacquire_write (void);
- // Conditionally acquire a lock (i.e., won't block). Returns -1 on
- // failure. If we "failed" because someone else already had the
- // lock, <errno> is set to <EBUSY>.
-
-#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
- const ACE_mutex_t &lock (void) const;
- // Return the underlying mutex.
-#endif /* ACE_WIN32 */
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
-#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
- ACE_Mutex lock_;
-#else
- ACE_TCHAR name_[ACE_UNIQUE_NAME_LEN];
- // If the user does not provide a name we generate a unique name in
- // this buffer.
-
- const ACE_TCHAR *unique_name (void);
- // Create and return the unique name.
-
- ACE_SV_Semaphore_Complex lock_;
- // We need this to get the right semantics...
-#endif /* ACE_WIN32 */
-};
-
-class ACE_Export ACE_RW_Process_Mutex
-{
- // = TITLE
- // Wrapper for readers/writer locks that exist across processes.
- //
- // = DESCRIPTION
- // Note that because this class uses the
- // <ACE_File_Lock> as its implementation it only can be reliably
- // used between separate processes, rather than threads in the
- // same process. This isn't a limitation of ACE, it's simply
- // the file lock semantics on UNIX and Win32.
-public:
- ACE_RW_Process_Mutex (const ACE_TCHAR *name = 0,
- int flags = O_CREAT|O_RDWR);
- // Create a readers/writer <Process_Mutex>, passing in the optional
- // <name>.
-
- ~ACE_RW_Process_Mutex (void);
-
- int remove (void);
- // Explicitly destroy the mutex. Note that only one thread should
- // call this method since it doesn't protect against race
- // conditions.
-
- int acquire (void);
- // Acquire lock ownership (wait on queue if necessary).
-
- int tryacquire (void);
- // Conditionally acquire lock (i.e., don't wait on queue). Returns
- // -1 on failure. If we "failed" because someone else already had
- // the lock, <errno> is set to <EBUSY>.
-
- int release (void);
- // Release lock and unblock a thread at head of queue.
-
- int acquire_read (void);
- // Acquire lock ownership (wait on queue if necessary).
-
- int acquire_write (void);
- // Acquire lock ownership (wait on queue if necessary).
-
- int tryacquire_read (void);
- // Conditionally acquire a lock (i.e., won't block). Returns -1 on
- // failure. If we "failed" because someone else already had the
- // lock, <errno> is set to <EBUSY>.
-
- int tryacquire_write (void);
- // Conditionally acquire a lock (i.e., won't block). Returns -1 on
- // failure. If we "failed" because someone else already had the
- // lock, <errno> is set to <EBUSY>.
-
- const ACE_File_Lock &lock (void) const;
- // Return the underlying lock.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_File_Lock lock_;
- // We need this to get the readers/writer semantics...
-};
-
-class ACE_Export ACE_Null_Barrier
-{
- // = TITLE
- // Implements "NULL barrier synchronization".
-public:
- ACE_Null_Barrier (u_int,
- const char * = 0,
- void * = 0);
- // Initialize the barrier to synchronize <count> threads.
-
- ~ACE_Null_Barrier (void);
- // Default dtor.
-
- int wait (void);
- // Block the caller until all <count> threads have called <wait> and
- // then allow all the caller threads to continue in parallel.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Null_Barrier &);
- ACE_Null_Barrier (const ACE_Null_Barrier &);
-};
-
-class ACE_Export ACE_Null_Mutex
-{
- // = TITLE
- // Implement a do nothing <ACE_Mutex>, i.e., all the methods are
- // no ops.
-public:
- ACE_Null_Mutex (const ACE_TCHAR * = 0);
- ~ACE_Null_Mutex (void);
- int remove (void);
-
- int acquire (void);
- int tryacquire (void);
- int release (void);
- int acquire_write (void);
- int tryacquire_write (void);
- int acquire_read (void);
- int tryacquire_read (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-class ACE_Export ACE_Noop_Token : public ACE_Null_Mutex
-{
-public:
- int renew (int = 0, ACE_Time_Value * =0);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-class ACE_Export ACE_Null_Condition
-{
- // = TITLE
- // Implement a do nothing <ACE_Condition> variable wrapper,
- // i.e., all methods are no ops. This class is necessary since
- // some C++ compilers are *very* lame...
-public:
- ACE_Null_Condition (const ACE_Null_Mutex &m,
- const ACE_TCHAR * = 0,
- void * = 0);
- ~ACE_Null_Condition (void);
- int remove (void);
- int wait (ACE_Time_Value * = 0);
- int signal (void);
- int broadcast (void);
- ACE_Null_Mutex &mutex (void);
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_Null_Mutex &mutex_; // Reference to mutex lock.
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Null_Condition &);
- ACE_Null_Condition (const ACE_Null_Condition &);
-};
-
-#if defined (ACE_USES_OBSOLETE_GUARD_CLASSES)
-class ACE_Export ACE_Null_Mutex_Guard
-{
- // = TITLE
- // This data structure is meant to be used within a method or
- // function... It performs automatic aquisition and release of
- // an ACE_Null_Mutex.
- //
- // = DESCRIPTION
- // This class is obsolete and should be replaced by
- // ACE_Guard<ACE_Null_Mutex>.
-public:
- ACE_Null_Mutex_Guard (ACE_Null_Mutex &);
- ~ACE_Null_Mutex_Guard (void);
- int remove (void);
- int locked (void);
- int acquire (void);
- int tryacquire (void);
- int release (void);
- void dump (void) const;
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Null_Mutex_Guard &);
- ACE_Null_Mutex_Guard (const ACE_Null_Mutex_Guard &);
-};
-#endif /* ACE_USES_OBSOLETE_GUARD_CLASSES */
-
-class ACE_Export ACE_TSS_Adapter
-{
- // = TITLE
- // This class encapsulates a TSS object and its associated
- // C++ destructor function. It is used by the ACE_TSS...
- // methods (in Synch_T.cpp) in order to allow an extern
- // "C" cleanup routine to be used. Needed by the "frigging"
- // MVS C++ compiler.
- //
- // = DESCRIPTION
- // Objects of this class are stored in thread specific
- // storage. ts_obj_ points to the "real" object and
- // func_ is a pointer to the C++ cleanup function for ts_obj_.
- //
-public:
- ACE_TSS_Adapter (void *object, ACE_THR_DEST f);
- // Initialize the adapter.
-
- ~ACE_TSS_Adapter (void);
- // Default dtor.
-
- void cleanup (void);
- // Perform the cleanup operation.
-
-//private:
-
- void *ts_obj_;
- // The real TS object.
-
- ACE_THR_DEST func_;
- // The real cleanup routine for ts_obj;
-};
-
-class ACE_Export ACE_Event
-{
- // = TITLE
- // A wrapper around the Win32 event locking mechanism.
- //
- // = DESCRIPTION
- // Portable implementation of an Event mechanism, which is
- // native to Win32, but must be emulated on UNIX.
-public:
- ACE_Event (int manual_reset = 0,
- int initial_state = 0,
- int type = USYNC_THREAD,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
- // Constructor which will create event.
-
- ~ACE_Event (void);
- // Implicitly destroy the event variable.
-
- int remove (void);
- // Explicitly destroy the event variable. Note that only one thread
- // should call this method since it doesn't protect against race
- // conditions.
-
- ACE_event_t handle (void) const;
- // Underlying handle to event.
-
- void handle (ACE_event_t new_handle);
- // Set the underlying handle to event. Note that this method assumes
- // ownership of the <handle> and will close it down in <remove>. If
- // you want the <handle> to stay open when <remove> is called make
- // sure to call <dup> on the <handle> before closing it. You are
- // responsible for the closing the existing <handle> before
- // overwriting it.
-
- int wait (void);
- // if MANUAL reset
- // sleep till the event becomes signaled
- // event remains signaled after wait() completes.
- // else AUTO reset
- // sleep till the event becomes signaled
- // event resets wait() completes.
-
- int wait (const ACE_Time_Value *abstime);
- // Same as wait() above, but this one can be timed
- // <abstime> is absolute time-of-day.
-
- int signal (void);
- // if MANUAL reset
- // wake up all waiting threads
- // set to signaled state
- // else AUTO reset
- // if no thread is waiting, set to signaled state
- // if thread(s) are waiting, wake up one waiting thread and
- // reset event
-
- int pulse (void);
- // if MANUAL reset
- // wakeup all waiting threads and
- // reset event
- // else AUTO reset
- // wakeup one waiting thread (if present) and
- // reset event
-
- int reset (void);
- // Set to nonsignaled state.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks
-
-protected:
- ACE_event_t handle_;
- // The underlying handle.
-
- int removed_;
- // Keeps track of whether <remove> has been called yet to avoid
- // multiple <remove> calls, e.g., explicitly and implicitly in the
- // destructor. This flag isn't protected by a lock, so make sure
- // that you don't have multiple threads simultaneously calling
- // <remove> on the same object, which is a bad idea anyway...
-
-private:
- // = Prevent copying.
- ACE_Event (const ACE_Event& event);
- const ACE_Event &operator= (const ACE_Event &rhs);
-};
-
-class ACE_Export ACE_Manual_Event : public ACE_Event
-{
- // = TITLE
- // Manual Events.
- //
- // = DESCRIPTION
- // Specialization of Event mechanism which wakes up all waiting
- // threads on signal()
-public:
- ACE_Manual_Event (int initial_state = 0,
- int type = USYNC_THREAD,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
- // constructor which will create manual event
-
- ~ACE_Manual_Event (void);
- // Default dtor.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks
-};
-
-class ACE_Export ACE_Auto_Event : public ACE_Event
-{
- // = TITLE
- // Auto Events.
- //
- // = DESCRIPTION
- // Specialization of Event mechanism which wakes up one waiting
- // thread on signal()
-public:
- ACE_Auto_Event (int initial_state = 0,
- int type = USYNC_THREAD,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
- // constructor which will create auto event
-
- ~ACE_Auto_Event (void);
- // Default dtor.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks
-};
-
-// ACE platform supports some form of threading.
-#if !defined (ACE_HAS_THREADS)
-class ACE_Barrier
-{
- // = TITLE
- // This is a no-op to make ACE "syntactically consistent."
-public:
- ACE_Barrier (u_int, const ACE_TCHAR * = 0, void * = 0) {}
- ~ACE_Barrier (void) {}
- int wait (void) { ACE_NOTSUP_RETURN (-1); }
- void dump (void) const {}
-};
-#else
-class ACE_Export ACE_Thread_Mutex
-{
- // = TITLE
- // ACE_Thread_Mutex wrapper (only valid for threads in the same
- // process).
- //
- // = DESCRIPTION
- // This implementation is optimized for locking threads that are
- // in the same process. It maps to <CRITICAL_SECTION>s on NT
- // and <ACE_mutex_t> with <type> set to <USYNC_THREAD> on UNIX.
- //
- // ACE_Thread_Mutex is recursive on some platforms (like
- // Win32). However, on most platforms (like Solaris) it is not
- // recursive. To be totally safe and portable, developers
- // should use <ACE_Recursive_Thread_Mutex> when they need a
- // recursive mutex.
- friend class ACE_Condition_Thread_Mutex;
-public:
- ACE_Thread_Mutex (const ACE_TCHAR *name = 0,
- ACE_mutexattr_t *attributes = 0);
- // Constructor.
-
- ~ACE_Thread_Mutex (void);
- // Implicitly destroy the mutex.
-
- int remove (void);
- // Explicitly destroy the mutex. Note that only one thread should
- // call this method since it doesn't protect against race
- // conditions.
-
- int acquire (void);
- // Acquire lock ownership (wait on queue if necessary).
-
- int tryacquire (void);
- // Conditionally acquire lock (i.e., don't wait on queue). Returns
- // -1 on failure. If we "failed" because someone else already had
- // the lock, <errno> is set to <EBUSY>.
-
- int release (void);
- // Release lock and unblock a thread at head of queue.
-
- int acquire_read (void);
- // Acquire mutex ownership. This calls <acquire> and is only here
- // to make the <ACE_Thread_Mutex> interface consistent with the
- // other synchronization APIs.
-
- int acquire_write (void);
- // Acquire mutex ownership. This calls <acquire> and is only here
- // to make the <ACE_Thread_Mutex> interface consistent with the
- // other synchronization APIs.
-
- int tryacquire_read (void);
- // Conditionally acquire mutex (i.e., won't block). This calls
- // <tryacquire> and is only here to make the <ACE_Thread_Mutex>
- // interface consistent with the other synchronization APIs.
- // Returns -1 on failure. If we "failed" because someone else
- // already had the lock, <errno> is set to <EBUSY>.
-
- int tryacquire_write (void);
- // Conditionally acquire mutex (i.e., won't block). This calls
- // <tryacquire> and is only here to make the <ACE_Thread_Mutex>
- // interface consistent with the other synchronization APIs.
- // Returns -1 on failure. If we "failed" because someone else
- // already had the lock, <errno> is set to <EBUSY>.
-
- const ACE_thread_mutex_t &lock (void) const;
- // Return the underlying mutex.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- // protected:
- ACE_thread_mutex_t lock_;
- // Mutex type that supports single-process locking efficiently.
-
- int removed_;
- // Keeps track of whether <remove> has been called yet to avoid
- // multiple <remove> calls, e.g., explicitly and implicitly in the
- // destructor. This flag isn't protected by a lock, so make sure
- // that you don't have multiple threads simultaneously calling
- // <remove> on the same object, which is a bad idea anyway...
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Thread_Mutex &);
- ACE_Thread_Mutex (const ACE_Thread_Mutex &);
-};
-
-#if defined (ACE_USES_OBSOLETE_GUARD_CLASSES)
-class ACE_Export ACE_Thread_Mutex_Guard
-{
- // = TITLE
- // This data structure is meant to be used within a method or
- // function... It performs automatic aquisition and release of
- // an <ACE_Thread_Mutex>.
- //
- // = DESCRIPTION
- // This class is obsolete and should be replaced by
- // ACE_Guard<ACE_Thread_Mutex>.
-public:
- ACE_Thread_Mutex_Guard (ACE_Thread_Mutex &m, int block = 1);
- // Implicitly and automatically acquire the lock.
-
- ~ACE_Thread_Mutex_Guard (void);
- // Implicitly release the lock.
-
- int locked (void);
- // 1 if locked, 0 if couldn't acquire the lock (errno will contain
- // the reason for this).
-
- int remove (void);
- // Explicitly release the lock. Note that only one thread should
- // call this method since it doesn't protect against race
- // conditions.
-
- int acquire (void);
- // Explicitly acquire the lock.
-
- int tryacquire (void);
- // Conditionally acquire the lock (i.e., won't block). Returns -1
- // on failure. If we "failed" because someone else already had the
- // lock, <errno> is set to <EBUSY>.
-
- int release (void);
- // Explicitly release the lock.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_Thread_Mutex &lock_;
- // Reference to the mutex.
-
- int owner_;
- // Keeps track of whether we acquired the lock or failed.
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Thread_Mutex_Guard &);
- ACE_Thread_Mutex_Guard (const ACE_Thread_Mutex_Guard &);
-};
-#endif /* ACE_USES_OBSOLETE_GUARD_CLASSES */
-
-class ACE_Export ACE_Condition_Attributes
-{
-public:
- ACE_Condition_Attributes (int type = ACE_DEFAULT_SYNCH_TYPE);
- // Constructor
-
- ~ACE_Condition_Attributes (void);
- // Destructor
-
-private:
- friend class ACE_Condition_Thread_Mutex;
-
- ACE_condattr_t attributes_;
- // The attributes
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Condition_Attributes &);
- ACE_Condition_Attributes (const ACE_Condition_Attributes &);
-};
-
-class ACE_Export ACE_Condition_Thread_Mutex
-{
- // = TITLE
- // ACE_Condition variable wrapper written using ACE_Mutexes This
- // allows threads to block until shared data changes state.
- //
- // A condition variable enables threads to atomically block and
- // test the condition under the protection of a mutual exclu-
- // sion lock (mutex) until the condition is satisfied. That is,
- // the mutex must have been held by the thread before calling
- // wait or signal on the condition. If the condition is false,
- // a thread blocks on a condition variable and atomically
- // releases the mutex that is waiting for the condition to
- // change. If another thread changes the condition, it may wake
- // up waiting threads by signaling the associated condition
- // variable. The waiting threads, upon awakening, reacquire the
- // mutex and re-evaluate the condition.
- //
- // = DESCRIPTION
- // This should be an instantiation of ACE_Condition but problems
- // with compilers precludes this...
-public:
- ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &m,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
- // Initialize the condition variable.
-
- ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &m,
- ACE_Condition_Attributes &attributes,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
- // Initialize the condition variable.
-
- ~ACE_Condition_Thread_Mutex (void);
- // Implicitly destroy the condition variable.
-
- int remove (void);
- // Explicitly destroy the condition variable. Note that only one
- // thread should call this method since it doesn't protect against
- // race conditions.
-
- int wait (const ACE_Time_Value *abstime);
- // Block on condition, or until absolute time-of-day has passed. If
- // abstime == 0 use "blocking" <wait> semantics. Else, if <abstime>
- // != 0 and the call times out before the condition is signaled
- // <wait> returns -1 and sets errno to ETIME.
-
- int wait (void);
- // Block on condition.
-
- int wait (ACE_Thread_Mutex &mutex, const ACE_Time_Value *abstime = 0);
- // Block on condition or until absolute time-of-day has passed. If
- // abstime == 0 use "blocking" wait() semantics on the <mutex>
- // passed as a parameter (this is useful if you need to store the
- // <Condition> in shared memory). Else, if <abstime> != 0 and the
- // call times out before the condition is signaled <wait> returns -1
- // and sets errno to ETIME.
-
- int signal (void);
- // Signal one waiting thread.
-
- int broadcast (void);
- // Signal *all* waiting threads.
-
- ACE_Thread_Mutex &mutex (void);
- // Returns a reference to the underlying mutex_;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_cond_t cond_;
- // Condition variable.
-
- ACE_Thread_Mutex &mutex_;
- // Reference to mutex lock.
-
- int removed_;
- // Keeps track of whether <remove> has been called yet to avoid
- // multiple <remove> calls, e.g., explicitly and implicitly in the
- // destructor. This flag isn't protected by a lock, so make sure
- // that you don't have multiple threads simultaneously calling
- // <remove> on the same object, which is a bad idea anyway...
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Condition_Thread_Mutex &);
- ACE_Condition_Thread_Mutex (const ACE_Condition_Thread_Mutex &);
-};
-
-class ACE_Export ACE_Recursive_Thread_Mutex
-{
- // = TITLE
- // Implement a C++ wrapper that allows nested acquisition and
- // release of a mutex that occurs in the same thread.
-public:
- ACE_Recursive_Thread_Mutex (const ACE_TCHAR *name = 0,
- ACE_mutexattr_t *arg = 0);
- // Initialize a recursive mutex.
-
- ~ACE_Recursive_Thread_Mutex (void);
- // Implicitly release a recursive mutex.
-
- int remove (void);
- // Implicitly release a recursive mutex. Note that only one thread
- // should call this method since it doesn't protect against race
- // conditions.
-
- int acquire (void);
- // Acquire a recursive mutex (will increment the nesting level and
- // not deadmutex if the owner of the mutex calls this method more
- // than once).
-
- int tryacquire (void);
- // Conditionally acquire a recursive mutex (i.e., won't block).
- // Returns -1 on failure. If we "failed" because someone else
- // already had the lock, <errno> is set to <EBUSY>.
-
- int acquire_read (void);
- // Acquire mutex ownership. This calls <acquire> and is only
- // here to make the <ACE_Recusive_Thread_Mutex> interface consistent
- // with the other synchronization APIs.
-
- int acquire_write (void);
- // Acquire mutex ownership. This calls <acquire> and is only
- // here to make the <ACE_Recusive_Thread_Mutex> interface consistent
- // with the other synchronization APIs.
-
- int tryacquire_read (void);
- // Conditionally acquire mutex (i.e., won't block). This calls
- // <tryacquire> and is only here to make the
- // <ACE_Recusive_Thread_Mutex> interface consistent with the other
- // synchronization APIs. Returns -1 on failure. If we "failed"
- // because someone else already had the lock, <errno> is set to
- // <EBUSY>.
-
- int tryacquire_write (void);
- // Conditionally acquire mutex (i.e., won't block). This calls
- // <tryacquire> and is only here to make the
- // <ACE_Recusive_Thread_Mutex> interface consistent with the other
- // synchronization APIs. Returns -1 on failure. If we "failed"
- // because someone else already had the lock, <errno> is set to
- // <EBUSY>.
-
- int release (void);
- // Releases a recursive mutex (will not release mutex until all the
- // nesting level drops to 0, which means the mutex is no longer
- // held).
-
- ACE_thread_t get_thread_id (void);
- // Return the id of the thread that currently owns the mutex.
-
- int get_nesting_level (void);
- // Return the nesting level of the recursion. When a thread has
- // acquired the mutex for the first time, the nesting level == 1.
- // The nesting level is incremented every time the thread acquires
- // the mutex recursively.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = This method should *not* be public (they hold no locks...)
- void set_thread_id (ACE_thread_t t);
-
- ACE_recursive_thread_mutex_t recursive_mutex_;
- // Recursive mutex.
-
- int removed_;
- // Keeps track of whether <remove> has been called yet to avoid
- // multiple <remove> calls, e.g., explicitly and implicitly in the
- // destructor. This flag isn't protected by a lock, so make sure
- // that you don't have multiple threads simultaneously calling
- // <remove> on the same object, which is a bad idea anyway...
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Recursive_Thread_Mutex &);
- ACE_Recursive_Thread_Mutex (const ACE_Recursive_Thread_Mutex &);
-};
-
-class ACE_Export ACE_RW_Thread_Mutex : public ACE_RW_Mutex
-{
- // = TITLE
- // Wrapper for readers/writer locks that exist within a process.
-public:
- ACE_RW_Thread_Mutex (const ACE_TCHAR *name = 0,
- void *arg = 0);
-
- ~ACE_RW_Thread_Mutex (void);
- // Default dtor.
-
- int tryacquire_write_upgrade (void);
- // Conditionally upgrade a read lock to a write lock. This only
- // works if there are no other readers present, in which case the
- // method returns 0. Otherwise, the method returns -1 and sets
- // <errno> to <EBUSY>. Note that the caller of this method *must*
- // already possess this lock as a read lock (but this condition is
- // not checked by the current implementation).
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-class ACE_Export ACE_Thread_Semaphore : public ACE_Semaphore
-{
- // = TITLE
- // Wrapper for Dijkstra style general semaphores that work
- // only within one process.
-public:
- ACE_Thread_Semaphore (u_int count = 1, // By default make this unlocked.
- const ACE_TCHAR *name = 0,
- void * = 0,
- int max = 0x7FFFFFFF);
- // Initialize the semaphore, with an initial value of <count>,
- // maximum value of <max>, and unlocked by default.
-
- ~ACE_Thread_Semaphore (void);
- // Default dtor.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-struct ACE_Export ACE_Sub_Barrier
-{
- // = Initialization.
- ACE_Sub_Barrier (u_int count,
- ACE_Thread_Mutex &lock,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
-
- ~ACE_Sub_Barrier (void);
-
- ACE_Condition_Thread_Mutex barrier_finished_;
- // True if this generation of the barrier is done.
-
- int running_threads_;
- // Number of threads that are still running.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-class ACE_Export ACE_Barrier
-{
- // = TITLE
- // Implements "barrier synchronization".
- //
- // = DESCRIPTION
- // This class allows <count> number of threads to synchronize
- // their completion of (one round of) a task, which is known as
- // "barrier synchronization". The implementation uses a
- // "sub-barrier generation numbering" scheme to avoid overhead
- // and to ensure that all threads wait to leave the barrier
- // correct. This code is based on an article from SunOpsis
- // Vol. 4, No. 1 by Richard Marejka
- // (Richard.Marejka@canada.sun.com).
-public:
- ACE_Barrier (u_int count,
- const ACE_TCHAR *name = 0,
- void *arg = 0);
- // Initialize the barrier to synchronize <count> threads.
-
- ~ACE_Barrier (void);
- // Default dtor.
-
- int wait (void);
- // Block the caller until all <count> threads have called <wait> and
- // then allow all the caller threads to continue in parallel.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_Thread_Mutex lock_;
- // Serialize access to the barrier state.
-
- int current_generation_;
- // Either 0 or 1, depending on whether we are the first generation
- // of waiters or the next generation of waiters.
-
- int count_;
- // Total number of threads that can be waiting at any one time.
-
- ACE_Sub_Barrier sub_barrier_1_;
- ACE_Sub_Barrier sub_barrier_2_;
- ACE_Sub_Barrier *sub_barrier_[2];
- // We keep two <sub_barriers>, one for the first "generation" of
- // waiters, and one for the next "generation" of waiters. This
- // efficiently solves the problem of what to do if all the first
- // generation waiters don't leave the barrier before one of the
- // threads calls wait() again (i.e., starts up the next generation
- // barrier).
-
-private:
- // = Prevent assignment and initialization.
- void operator= (const ACE_Barrier &);
- ACE_Barrier (const ACE_Barrier &);
-};
-
-#if 0
-// The following two classes are commented out since there doesn't
-// appear to be a portable and robust means of implementing this
-// functionality across platforms. If you know of a portable and
-// robust way to implement this functionality please let us know.
-
-class ACE_Export ACE_Process_Condition
-{
- // = TITLE
- // ACE_Condition variable wrapper that works across processes.
-public:
- ACE_Process_Condition (MUTEX &m, const ACE_TCHAR *name = 0, void *arg = 0);
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-#endif /* 0 */
-
-#if 0
-class ACE_Export ACE_Process_Barrier : public ACE_Barrier
-{
- // = TITLE
- // Implements "barrier synchronization" using ACE_Process_Mutexes!
- //
- // = DESCRIPTION
- // This class is just a simple wrapper for ACE_Barrier that
- // selects the USYNC_PROCESS variant for the locks.
-public:
- ACE_Process_Barrier (u_int count, const ACE_TCHAR *name = 0);
- // Create a Process_Barrier, passing in the optional <name>.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-#endif /* 0 */
-
-class ACE_Export ACE_Thread_Barrier : public ACE_Barrier
-{
- // = TITLE
- // Implements "barrier synchronization" using ACE_Thread_Mutexes!
- //
- // = DESCRIPTION
- // This class is just a simple wrapper for ACE_Barrier that
- // selects the USYNC_THREAD variant for the locks.
-public:
- ACE_Thread_Barrier (u_int count, const ACE_TCHAR *name = 0);
- // Create a Thread_Barrier, passing in the optional <name>.
-
- ~ACE_Thread_Barrier (void);
- // Default dtor.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-#endif /* ACE_HAS_THREADS */
-
-#if defined (__ACE_INLINE__)
-#include "ace/Synch.i"
-#endif /* __ACE_INLINE__ */
-
-// Include the templates here.
-#include "ace/Synch_T.h"
-
-template <class ACE_LOCK>
-class ACE_Guard;
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Guard<ACE_Null_Mutex>
-{
- // = TITLE
- // Template specialization of <ACE_Guard> for the
- // <ACE_Null_Mutex>.
- //
- // = DESCRIPTION
- // This specialization is useful since it helps to speedup
- // performance of the "Null_Mutex" considerably.
-public:
- // = Initialization and termination methods.
- ACE_Guard (ACE_Null_Mutex &) {}
- ACE_Guard (ACE_Null_Mutex &, int) {}
-#if defined (ACE_WIN32)
- ~ACE_Guard (void) {}
-#endif /* ACE_WIN32 */
-
- int acquire (void) { return 0; }
- int tryacquire (void) { return 0; }
- int release (void) { return 0; }
- int locked (void) { return 1; }
- int remove (void) { return 0; }
- void dump (void) const {}
-
-private:
- // = Prevent assignment and initialization.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Guard<ACE_Null_Mutex> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Guard (const ACE_Guard<ACE_Null_Mutex> &))
-};
-
-template <class ACE_LOCK>
-class ACE_Write_Guard;
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Write_Guard<ACE_Null_Mutex> : public ACE_Guard<ACE_Null_Mutex>
-{
- // = TITLE
-public:
- ACE_Write_Guard (ACE_Null_Mutex &m)
- : ACE_Guard<ACE_Null_Mutex> (m) {}
- ACE_Write_Guard (ACE_Null_Mutex &m, int blocked)
- : ACE_Guard<ACE_Null_Mutex> (m, blocked) {}
-
- int acquire_write (void) { return 0; }
- int acquire (void) { return 0; }
- int tryacquire_write (void) { return 0; }
- int tryacquire (void) { return 0; }
- void dump (void) const {}
-};
-
-template <class ACE_LOCK>
-class ACE_Read_Guard;
-
-ACE_TEMPLATE_SPECIALIZATION
-class ACE_Export ACE_Read_Guard<ACE_Null_Mutex> : public ACE_Guard<ACE_Null_Mutex>
-{
- // = TITLE
-public:
- ACE_Read_Guard (ACE_Null_Mutex &m)
- : ACE_Guard<ACE_Null_Mutex> (m) {}
- ACE_Read_Guard (ACE_Null_Mutex &m, int blocked)
- : ACE_Guard<ACE_Null_Mutex> (m, blocked) {}
-
- int acquire_write (void) { return 0; }
- int acquire (void) { return 0; }
- int tryacquire_write (void) { return 0; }
- int tryacquire (void) { return 0; }
- void dump (void) const {}
-};
-
-#include "ace/post.h"
-#endif /* ACE_SYNCH_H */
diff --git a/ace/Synch.i b/ace/Synch.i
deleted file mode 100644
index 9bfe502ccae..00000000000
--- a/ace/Synch.i
+++ /dev/null
@@ -1,1109 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE
-ACE_Lock::ACE_Lock (void)
-{
-}
-
-ACE_INLINE int
-ACE_File_Lock::acquire_read (short whence, off_t start, off_t len)
-{
-// ACE_TRACE ("ACE_File_Lock::acquire_read");
- return ACE_OS::flock_rdlock (&this->lock_, whence, start, len);
-}
-
-ACE_INLINE int
-ACE_File_Lock::tryacquire_read (short whence, off_t start, off_t len)
-{
-// ACE_TRACE ("ACE_File_Lock::tryacquire_read");
- return ACE_OS::flock_tryrdlock (&this->lock_, whence, start, len);
-}
-
-ACE_INLINE int
-ACE_File_Lock::tryacquire_write (short whence, off_t start, off_t len)
-{
-// ACE_TRACE ("ACE_File_Lock::tryacquire_write");
- return ACE_OS::flock_trywrlock (&this->lock_, whence, start, len);
-}
-
-ACE_INLINE int
-ACE_File_Lock::tryacquire (short whence, off_t start, off_t len)
-{
-// ACE_TRACE ("ACE_File_Lock::tryacquire");
- return this->tryacquire_write (whence, start, len);
-}
-
-ACE_INLINE int
-ACE_File_Lock::acquire_write (short whence, off_t start, off_t len)
-{
-// ACE_TRACE ("ACE_File_Lock::acquire_write");
- return ACE_OS::flock_wrlock (&this->lock_, whence, start, len);
-}
-
-ACE_INLINE int
-ACE_File_Lock::acquire (short whence, off_t start, off_t len)
-{
-// ACE_TRACE ("ACE_File_Lock::acquire");
- return this->acquire_write (whence, start, len);
-}
-
-ACE_INLINE int
-ACE_File_Lock::release (short whence, off_t start, off_t len)
-{
-// ACE_TRACE ("ACE_File_Lock::release");
- return ACE_OS::flock_unlock (&this->lock_, whence, start, len);
-}
-
-ACE_INLINE int
-ACE_File_Lock::remove (int unlink_file)
-{
-// ACE_TRACE ("ACE_File_Lock::remove");
-
- int result = 0;
-
- if (this->removed_ == 0)
- {
- this->removed_ = 1;
- result = ACE_OS::flock_destroy (&this->lock_,
- unlink_file);
- }
- return result;
-}
-
-ACE_INLINE ACE_HANDLE
-ACE_File_Lock::get_handle (void)
-{
-// ACE_TRACE ("ACE_File_Lock::get_handle");
- return this->lock_.handle_;
-}
-
-ACE_INLINE void
-ACE_File_Lock::set_handle (ACE_HANDLE h)
-{
-// ACE_TRACE ("ACE_File_Lock::set_handle");
- this->lock_.handle_ = h;
- this->removed_ = 0;
-}
-
-ACE_INLINE const ACE_rwlock_t &
-ACE_RW_Mutex::lock (void) const
-{
-// ACE_TRACE ("ACE_RW_Mutex::lock");
- return this->lock_;
-}
-
-ACE_INLINE int
-ACE_RW_Mutex::remove (void)
-{
-// ACE_TRACE ("ACE_RW_Mutex::remove");
- int result = 0;
- if (this->removed_ == 0)
- {
- this->removed_ = 1;
- result = ACE_OS::rwlock_destroy (&this->lock_);
- }
- return result;
-}
-
-ACE_INLINE int
-ACE_RW_Mutex::acquire_read (void)
-{
-// ACE_TRACE ("ACE_RW_Mutex::acquire_read");
- return ACE_OS::rw_rdlock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_RW_Mutex::acquire_write (void)
-{
-// ACE_TRACE ("ACE_RW_Mutex::acquire_write");
- return ACE_OS::rw_wrlock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_RW_Mutex::acquire (void)
-{
-// ACE_TRACE ("ACE_RW_Mutex::acquire");
- return ACE_OS::rw_wrlock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_RW_Mutex::tryacquire_read (void)
-{
-// ACE_TRACE ("ACE_RW_Mutex::tryacquire_read");
- return ACE_OS::rw_tryrdlock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_RW_Mutex::tryacquire_write (void)
-{
-// ACE_TRACE ("ACE_RW_Mutex::tryacquire_write");
- return ACE_OS::rw_trywrlock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_RW_Mutex::tryacquire (void)
-{
-// ACE_TRACE ("ACE_RW_Mutex::tryacquire");
- return this->tryacquire_write ();
-}
-
-ACE_INLINE int
-ACE_RW_Mutex::release (void)
-{
-// ACE_TRACE ("ACE_RW_Mutex::release");
- return ACE_OS::rw_unlock (&this->lock_);
-}
-
-#if defined (ACE_HAS_THREADS)
-ACE_INLINE int
-ACE_RW_Thread_Mutex::tryacquire_write_upgrade (void)
-{
-// ACE_TRACE ("ACE_RW_Thread_Mutex::tryacquire_write_upgrade");
- return ACE_OS::rw_trywrlock_upgrade (&this->lock_);
-}
-#endif /* ACE_HAS_THREADS */
-
-ACE_INLINE int
-ACE_Mutex::acquire_read (void)
-{
-// ACE_TRACE ("ACE_Mutex::acquire_read");
-#if defined (CHORUS)
- if (this->process_lock_)
- return ACE_OS::mutex_lock (this->process_lock_);
-#endif /* CHORUS */
- return ACE_OS::mutex_lock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Mutex::acquire_write (void)
-{
-// ACE_TRACE ("ACE_Mutex::acquire_write");
-#if defined (CHORUS)
- if (this->process_lock_)
- return ACE_OS::mutex_lock (this->process_lock_);
-#endif /* CHORUS */
- return ACE_OS::mutex_lock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Mutex::tryacquire_read (void)
-{
-// ACE_TRACE ("ACE_Mutex::tryacquire_read");
-#if defined (CHORUS)
- if (this->process_lock_)
- return ACE_OS::mutex_trylock (this->process_lock_);
-#endif /* CHORUS */
- return ACE_OS::mutex_trylock (&this->lock_);
-}
-
-ACE_INLINE const ACE_mutex_t &
-ACE_Mutex::lock (void) const
-{
-// ACE_TRACE ("ACE_Mutex::lock");
-#if defined (CHORUS)
- if (this->process_lock_)
- return *this->process_lock_;
-#endif /* CHORUS */
- return this->lock_;
-}
-
-ACE_INLINE int
-ACE_Mutex::tryacquire_write (void)
-{
-// ACE_TRACE ("ACE_Mutex::tryacquire_write");
-#if defined (CHORUS)
- if (this->process_lock_)
- return ACE_OS::mutex_trylock (this->process_lock_);
-#endif /* CHORUS */
- return ACE_OS::mutex_trylock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Mutex::acquire (void)
-{
-// ACE_TRACE ("ACE_Mutex::acquire");
-#if defined (CHORUS)
- if (this->process_lock_)
- return ACE_OS::mutex_lock (this->process_lock_);
-#endif /* CHORUS */
- return ACE_OS::mutex_lock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Mutex::tryacquire (void)
-{
-// ACE_TRACE ("ACE_Mutex::tryacquire");
-#if defined (CHORUS)
- if (this->process_lock_)
- return ACE_OS::mutex_trylock (this->process_lock_);
-#endif /* CHORUS */
- return ACE_OS::mutex_trylock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Mutex::release (void)
-{
-// ACE_TRACE ("ACE_Mutex::release");
-#if defined (CHORUS)
- if (this->process_lock_)
- return ACE_OS::mutex_unlock (this->process_lock_);
-#endif /* CHORUS */
- return ACE_OS::mutex_unlock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Mutex::remove (void)
-{
-// ACE_TRACE ("ACE_Mutex::remove");
-#if defined (CHORUS)
- int result = 0;
- // Are we the owner?
- if (this->process_lock_ && this->lockname_)
- {
- if (this->removed_ == 0)
- {
- this->removed_ = 1;
-
- // Only destroy the lock if we're the ones who initialized
- // it.
- result = ACE_OS::mutex_destroy (this->process_lock_);
- ACE_OS::munmap (this->process_lock_,
- sizeof (ACE_mutex_t));
- ACE_OS::shm_unlink (this->lockname_);
- ACE_OS::free (ACE_static_cast (void *,
- ACE_const_cast (ACE_TCHAR *,
- this->lockname_)));
- }
- }
- else if (this->process_lock_)
- {
- ACE_OS::munmap (this->process_lock_,
- sizeof (ACE_mutex_t));
- result = 0;
- }
- return result;
-#else /* !CHORUS */
- int result = 0;
- if (this->removed_ == 0)
- {
- this->removed_ = 1;
- result = ACE_OS::mutex_destroy (&this->lock_);
- }
- return result;
-#endif /* CHORUS */
-}
-
-ACE_INLINE const ACE_sema_t &
-ACE_Semaphore::lock (void) const
-{
-// ACE_TRACE ("ACE_Semaphore::lock");
- return this->semaphore_;
-}
-
-ACE_INLINE int
-ACE_Semaphore::remove (void)
-{
-// ACE_TRACE ("ACE_Semaphore::remove");
- int result = 0;
- if (this->removed_ == 0)
- {
- this->removed_ = 1;
- result = ACE_OS::sema_destroy (&this->semaphore_);
- }
- return result;
-}
-
-ACE_INLINE int
-ACE_Semaphore::acquire (void)
-{
-// ACE_TRACE ("ACE_Semaphore::acquire");
- return ACE_OS::sema_wait (&this->semaphore_);
-}
-
-ACE_INLINE int
-ACE_Semaphore::acquire (ACE_Time_Value &tv)
-{
-// ACE_TRACE ("ACE_Semaphore::acquire");
- return ACE_OS::sema_wait (&this->semaphore_, tv);
-}
-
-ACE_INLINE int
-ACE_Semaphore::tryacquire (void)
-{
-// ACE_TRACE ("ACE_Semaphore::tryacquire");
- return ACE_OS::sema_trywait (&this->semaphore_);
-}
-
-ACE_INLINE int
-ACE_Semaphore::release (void)
-{
-// ACE_TRACE ("ACE_Semaphore::release");
- return ACE_OS::sema_post (&this->semaphore_);
-}
-
-ACE_INLINE int
-ACE_Semaphore::release (size_t release_count)
-{
-// ACE_TRACE ("ACE_Semaphore::release");
- return ACE_OS::sema_post (&this->semaphore_, release_count);
-}
-
-// Acquire semaphore ownership. This calls <acquire> and is only
-// here to make the <ACE_Semaphore> interface consistent with the
-// other synchronization APIs.
-
-ACE_INLINE int
-ACE_Semaphore::acquire_read (void)
-{
- return this->acquire ();
-}
-
-// Acquire semaphore ownership. This calls <acquire> and is only
-// here to make the <ACE_Semaphore> interface consistent with the
-// other synchronization APIs.
-
-ACE_INLINE int
-ACE_Semaphore::acquire_write (void)
-{
- return this->acquire ();
-}
-
-// Conditionally acquire semaphore (i.e., won't block). This calls
-// <tryacquire> and is only here to make the <ACE_Semaphore>
-// interface consistent with the other synchronization APIs.
-
-ACE_INLINE int
-ACE_Semaphore::tryacquire_read (void)
-{
- return this->tryacquire ();
-}
-
-// Conditionally acquire semaphore (i.e., won't block). This calls
-// <tryacquire> and is only here to make the <ACE_Semaphore>
-// interface consistent with the other synchronization APIs.
-
-ACE_INLINE int
-ACE_Semaphore::tryacquire_write (void)
-{
- return this->tryacquire ();
-}
-
-#if defined (ACE_WIN32) || defined (ACE_HAS_POSIX_SEM)
-ACE_INLINE const ACE_mutex_t &
-ACE_Process_Mutex::lock (void) const
-{
-// ACE_TRACE ("ACE_Process_Mutex::lock");
- return this->lock_.lock ();
-}
-
-ACE_INLINE const ACE_sema_t &
-ACE_Process_Semaphore::lock (void) const
-{
-// ACE_TRACE ("ACE_Process_Semaphore::lock");
- return this->lock_.lock ();
-}
-#endif /* ACE_WIN32 */
-
-// Acquire semaphore ownership. This calls <acquire> and is only here
-// to make the <ACE_Process_Semaphore> interface consistent with the
-// other synchronization APIs.
-
-ACE_INLINE int
-ACE_Process_Semaphore::acquire_read (void)
-{
- return this->acquire ();
-}
-
-// Acquire semaphore ownership. This calls <acquire> and is only here
-// to make the <ACE_Process_Semaphore> interface consistent with the
-// other synchronization APIs.
-
-ACE_INLINE int
-ACE_Process_Semaphore::acquire_write (void)
-{
- return this->acquire ();
-}
-
-// Conditionally acquire semaphore (i.e., won't block). This calls
-// <tryacquire> and is only here to make the <ACE_Process_Semaphore>
-// interface consistent with the other synchronization APIs.
-
-ACE_INLINE int
-ACE_Process_Semaphore::tryacquire_read (void)
-{
- return this->tryacquire ();
-}
-
-// Conditionally acquire semaphore (i.e., won't block). This calls
-// <tryacquire> and is only here to make the <ACE_Process_Semaphore>
-// interface consistent with the other synchronization APIs.
-
-ACE_INLINE int
-ACE_Process_Semaphore::tryacquire_write (void)
-{
- return this->tryacquire ();
-}
-
-// Null ACE_Semaphore implementation
-
-ACE_INLINE
-ACE_Null_Semaphore::ACE_Null_Semaphore (u_int,
- int,
- const ACE_TCHAR *,
- void *,
- int)
-{
-}
-
-ACE_INLINE
-ACE_Null_Semaphore::~ACE_Null_Semaphore (void)
-{
-}
-
-ACE_INLINE int
-ACE_Null_Semaphore::remove (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Semaphore::acquire (ACE_Time_Value &)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Semaphore::acquire (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Semaphore::tryacquire (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Semaphore::release (size_t)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Semaphore::release (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Semaphore::acquire_write (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Semaphore::tryacquire_write (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Semaphore::acquire_read (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Semaphore::tryacquire_read (void)
-{
- return 0;
-}
-
-ACE_INLINE void
-ACE_Null_Semaphore::dump (void) const
-{
-}
-
-#if defined (ACE_HAS_THREADS)
-
-ACE_INLINE const ACE_thread_mutex_t &
-ACE_Thread_Mutex::lock (void) const
-{
-// ACE_TRACE ("ACE_Thread_Mutex::lock");
- return this->lock_;
-}
-
-ACE_INLINE int
-ACE_Thread_Mutex::acquire_read (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex::acquire_read");
- return ACE_OS::thread_mutex_lock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Thread_Mutex::acquire_write (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex::acquire_write");
- return ACE_OS::thread_mutex_lock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Thread_Mutex::tryacquire_read (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex::tryacquire_read");
- return ACE_OS::thread_mutex_trylock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Thread_Mutex::tryacquire_write (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex::tryacquire_write");
- return ACE_OS::thread_mutex_trylock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Thread_Mutex::acquire (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex::acquire");
- return ACE_OS::thread_mutex_lock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Thread_Mutex::tryacquire (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex::tryacquire");
- return ACE_OS::thread_mutex_trylock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Thread_Mutex::release (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex::release");
- return ACE_OS::thread_mutex_unlock (&this->lock_);
-}
-
-ACE_INLINE int
-ACE_Thread_Mutex::remove (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex::remove");
- int result = 0;
- if (this->removed_ == 0)
- {
- this->removed_ = 1;
- result = ACE_OS::thread_mutex_destroy (&this->lock_);
- }
- return result;
-}
-
-#if defined (ACE_USES_OBSOLETE_GUARD_CLASSES)
-ACE_INLINE int
-ACE_Thread_Mutex_Guard::locked (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex_Guard::locked");
- return this->owner_ != -1;
-}
-
-// Explicitly acquire the lock.
-
-ACE_INLINE int
-ACE_Thread_Mutex_Guard::acquire (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex_Guard::acquire");
- return this->owner_ = this->lock_.acquire ();
-}
-
-// Conditionally acquire the lock (i.e., won't block).
-
-ACE_INLINE int
-ACE_Thread_Mutex_Guard::tryacquire (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex_Guard::tryacquire");
- return this->owner_ = this->lock_.tryacquire ();
-}
-
-// Implicitly and automatically acquire the lock.
-
-ACE_INLINE
-ACE_Thread_Mutex_Guard::ACE_Thread_Mutex_Guard (ACE_Thread_Mutex &m,
- int block)
- : lock_ (m)
-{
-// ACE_TRACE ("ACE_Thread_Mutex_Guard::ACE_Thread_Mutex_Guard");
- if (block)
- this->acquire ();
- else
- this->tryacquire ();
-}
-
-// Explicitly release the lock.
-
-ACE_INLINE int
-ACE_Thread_Mutex_Guard::release (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex_Guard::release");
- if (this->owner_ != -1)
- {
- this->owner_ = -1;
- return this->lock_.release ();
- }
- else
- return 0;
-}
-
-// Implicitly release the lock.
-
-ACE_INLINE
-ACE_Thread_Mutex_Guard::~ACE_Thread_Mutex_Guard (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex_Guard::~ACE_Thread_Mutex_Guard");
- this->release ();
-}
-
-// Explicitly release the lock.
-
-ACE_INLINE int
-ACE_Thread_Mutex_Guard::remove (void)
-{
-// ACE_TRACE ("ACE_Thread_Mutex_Guard::remove");
- this->owner_ = -1;
- return this->release ();
-}
-#endif /* ACE_USES_OBSOLETE_GUARD_CLASSES */
-
-ACE_INLINE
-ACE_Condition_Attributes::ACE_Condition_Attributes (int type)
-{
- (void) ACE_OS::condattr_init (this->attributes_, type);
-}
-
-ACE_INLINE
-ACE_Condition_Attributes::~ACE_Condition_Attributes (void)
-{
- ACE_OS::condattr_destroy (this->attributes_);
-}
-
-ACE_INLINE int
-ACE_Condition_Thread_Mutex::remove (void)
-{
-// ACE_TRACE ("ACE_Condition_Thread_Mutex::remove");
-
- // <cond_destroy> is called in a loop if the condition variable is
- // BUSY. This avoids a condition where a condition is signaled and
- // because of some timing problem, the thread that is to be signaled
- // has called the cond_wait routine after the signal call. Since
- // the condition signal is not queued in any way, deadlock occurs.
-
- int result = 0;
-
- if (this->removed_ == 0)
- {
- this->removed_ = 1;
-
- while ((result = ACE_OS::cond_destroy (&this->cond_)) == -1
- && errno == EBUSY)
- {
- ACE_OS::cond_broadcast (&this->cond_);
- ACE_OS::thr_yield ();
- }
- }
- return result;
-}
-
-ACE_INLINE ACE_Thread_Mutex &
-ACE_Condition_Thread_Mutex::mutex (void)
-{
-// ACE_TRACE ("ACE_Condition_Thread_Mutex::mutex");
- return this->mutex_;
-}
-
-ACE_INLINE void
-ACE_Recursive_Thread_Mutex::set_thread_id (ACE_thread_t t)
-{
-// ACE_TRACE ("ACE_Recursive_Thread_Mutex::set_thread_id");
-#if defined (ACE_HAS_RECURSIVE_MUTEXES)
- ACE_UNUSED_ARG (t);
-#else /* ! ACE_HAS_RECURSIVE_MUTEXES */
- this->recursive_mutex_.owner_id_ = t;
-#endif /* ! ACE_HAS_RECURSIVE_MUTEXES */
-}
-
-ACE_INLINE int
-ACE_Recursive_Thread_Mutex::acquire_read (void)
-{
- return this->acquire ();
-}
-
-ACE_INLINE int
-ACE_Recursive_Thread_Mutex::acquire_write (void)
-{
- return this->acquire ();
-}
-
-ACE_INLINE int
-ACE_Recursive_Thread_Mutex::tryacquire_read (void)
-{
- return this->tryacquire ();
-}
-
-ACE_INLINE int
-ACE_Recursive_Thread_Mutex::tryacquire_write (void)
-{
- return this->tryacquire ();
-}
-
-#endif /* ACE_HAS_THREADS */
-
-// Explicitly destroy the mutex.
-ACE_INLINE int
-ACE_Process_Mutex::remove (void)
-{
- return this->lock_.remove ();
-}
-
-// Acquire lock ownership (wait on priority queue if necessary).
-ACE_INLINE int
-ACE_Process_Mutex::acquire (void)
-{
- return this->lock_.acquire ();
-}
-
-// Conditionally acquire lock (i.e., don't wait on queue).
-ACE_INLINE int
-ACE_Process_Mutex::tryacquire (void)
-{
- return this->lock_.tryacquire ();
-}
-
-// Release lock and unblock a thread at head of priority queue.
-ACE_INLINE int
-ACE_Process_Mutex::release (void)
-{
- return this->lock_.release ();
-}
-
-// Acquire lock ownership (wait on priority queue if necessary).
-ACE_INLINE int
-ACE_Process_Mutex::acquire_read (void)
-{
- return this->lock_.acquire_read ();
-}
-
-// Acquire lock ownership (wait on priority queue if necessary).
-ACE_INLINE int
-ACE_Process_Mutex::acquire_write (void)
-{
- return this->lock_.acquire_write ();
-}
-
-// Conditionally acquire a lock (i.e., won't block).
-ACE_INLINE int
-ACE_Process_Mutex::tryacquire_read (void)
-{
- return this->lock_.tryacquire_read ();
-}
-
-// Conditionally acquire a lock (i.e., won't block).
-ACE_INLINE int
-ACE_Process_Mutex::tryacquire_write (void)
-{
- return this->lock_.tryacquire_write ();
-}
-
-// Explicitly destroy the mutex.
-ACE_INLINE int
-ACE_RW_Process_Mutex::remove (void)
-{
- return this->lock_.remove ();
-}
-
-// Acquire lock ownership (wait on priority queue if necessary).
-ACE_INLINE int
-ACE_RW_Process_Mutex::acquire (void)
-{
- return this->lock_.acquire ();
-}
-
-// Conditionally acquire lock (i.e., don't wait on queue).
-ACE_INLINE int
-ACE_RW_Process_Mutex::tryacquire (void)
-{
- return this->lock_.tryacquire ();
-}
-
-// Release lock and unblock a thread at head of priority queue.
-ACE_INLINE int
-ACE_RW_Process_Mutex::release (void)
-{
- return this->lock_.release ();
-}
-
-// Acquire lock ownership (wait on priority queue if necessary).
-ACE_INLINE int
-ACE_RW_Process_Mutex::acquire_read (void)
-{
- return this->lock_.acquire_read ();
-}
-
-// Acquire lock ownership (wait on priority queue if necessary).
-ACE_INLINE int
-ACE_RW_Process_Mutex::acquire_write (void)
-{
- return this->lock_.acquire_write ();
-}
-
-// Conditionally acquire a lock (i.e., won't block).
-ACE_INLINE int
-ACE_RW_Process_Mutex::tryacquire_read (void)
-{
- return this->lock_.tryacquire_read ();
-}
-
-// Conditionally acquire a lock (i.e., won't block).
-ACE_INLINE int
-ACE_RW_Process_Mutex::tryacquire_write (void)
-{
- return this->lock_.tryacquire_write ();
-}
-
-ACE_INLINE const ACE_File_Lock &
-ACE_RW_Process_Mutex::lock (void) const
-{
-// ACE_TRACE ("ACE_RW_Process_Mutex::lock");
- return this->lock_;
-}
-
-ACE_INLINE
-ACE_Null_Barrier::ACE_Null_Barrier (u_int,
- const char *,
- void *)
-{
-}
-
-ACE_INLINE
-ACE_Null_Barrier::~ACE_Null_Barrier (void)
-{
-}
-
-ACE_INLINE int
-ACE_Null_Barrier::wait (void)
-{
- return 0;
-}
-
-ACE_INLINE void
-ACE_Null_Barrier::dump (void) const
-{
-}
-
-ACE_INLINE
-ACE_Null_Mutex::ACE_Null_Mutex (const ACE_TCHAR *)
-{
-}
-
-ACE_INLINE
-ACE_Null_Mutex::~ACE_Null_Mutex (void)
-{
-}
-
-ACE_INLINE int
-ACE_Null_Mutex::remove (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex::acquire (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex::tryacquire (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex::release (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex::acquire_write (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex::tryacquire_write (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex::acquire_read (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex::tryacquire_read (void)
-{
- return 0;
-}
-
-ACE_INLINE void
-ACE_Null_Mutex::dump (void) const
-{
-}
-
-ACE_INLINE int
-ACE_Noop_Token::renew (int, ACE_Time_Value *)
-{
- return 0;
-}
-
-ACE_INLINE void
-ACE_Noop_Token::dump (void) const
-{
-}
-
-
-ACE_INLINE
-ACE_Null_Condition::ACE_Null_Condition (const ACE_Null_Mutex &m,
- const ACE_TCHAR *,
- void*)
- : mutex_ ((ACE_Null_Mutex &) m)
-{
-}
-
-ACE_INLINE ACE_Null_Condition::~ACE_Null_Condition (void)
-{
-}
-
-ACE_INLINE int ACE_Null_Condition::remove (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Condition::wait (ACE_Time_Value *)
-{
- errno = ETIME;
- return -1;
-}
-
-ACE_INLINE int
-ACE_Null_Condition::signal (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Condition::broadcast (void)
-{
- return 0;
-}
-
-ACE_INLINE ACE_Null_Mutex &
-ACE_Null_Condition::mutex (void)
-{
- return this->mutex_;
-}
-
-ACE_INLINE void
-ACE_Null_Condition::dump (void) const
-{
-}
-
-#if defined (ACE_USES_OBSOLETE_GUARD_CLASSES)
-ACE_INLINE
-ACE_Null_Mutex_Guard::ACE_Null_Mutex_Guard (ACE_Null_Mutex &)
-{
-}
-
-ACE_INLINE
-ACE_Null_Mutex_Guard::~ACE_Null_Mutex_Guard (void)
-{
-}
-
-ACE_INLINE int
-ACE_Null_Mutex_Guard::remove (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex_Guard::locked (void)
-{
- return 1;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex_Guard::acquire (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex_Guard::tryacquire (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_Null_Mutex_Guard::release (void)
-{
- return 0;
-}
-
-ACE_INLINE void
-ACE_Null_Mutex_Guard::dump (void) const
-{
-}
-#endif /* ACE_USES_OBSOLETE_GUARD_CLASSES */
-
-ACE_INLINE
-ACE_TSS_Adapter::~ACE_TSS_Adapter (void)
-{
-}
-
-ACE_INLINE
-ACE_Manual_Event::~ACE_Manual_Event (void)
-{
-}
-
-ACE_INLINE
-ACE_Auto_Event::~ACE_Auto_Event (void)
-{
-}
-
-#if defined (ACE_HAS_THREADS)
-ACE_INLINE
-ACE_RW_Thread_Mutex::~ACE_RW_Thread_Mutex (void)
-{
-}
-
-ACE_INLINE
-ACE_Thread_Semaphore::~ACE_Thread_Semaphore (void)
-{
-}
-
-ACE_INLINE
-ACE_Sub_Barrier::~ACE_Sub_Barrier (void)
-{
-}
-
-ACE_INLINE
-ACE_Barrier::~ACE_Barrier (void)
-{
-}
-
-ACE_INLINE
-ACE_Thread_Barrier::~ACE_Thread_Barrier (void)
-{
-}
-#endif /* ACE_HAS_THREADS */
diff --git a/ace/Synch_Options.cpp b/ace/Synch_Options.cpp
deleted file mode 100644
index 0febeccfb29..00000000000
--- a/ace/Synch_Options.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// $Id$
-
-#include "ace/Synch_Options.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Synch_Options.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Synch_Options, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Synch_Options)
-
-void
-ACE_Synch_Options::dump (void) const
-{
- ACE_TRACE ("ACE_Synch_Options::dump");
-}
-
-// Static initialization.
-// Note: these three objects require static construction and destruction.
-
-/* static */
-ACE_Synch_Options ACE_Synch_Options::defaults;
-
-/* static */
-ACE_Synch_Options ACE_Synch_Options::synch;
-
-/* static */
-ACE_Synch_Options ACE_Synch_Options::asynch (ACE_Synch_Options::USE_REACTOR);
-
-ACE_Synch_Options::ACE_Synch_Options (u_long options,
- const ACE_Time_Value &timeout,
- const void *arg)
-{
- // ACE_TRACE ("ACE_Synch_Options::ACE_Synch_Options");
- this->set (options, timeout, arg);
-}
-
-void
-ACE_Synch_Options::set (u_long options,
- const ACE_Time_Value &timeout,
- const void *arg)
-{
- // ACE_TRACE ("ACE_Synch_Options::set");
- this->options_ = options;
- this->timeout_ = (ACE_Time_Value &) timeout;
-
- // Whoa, possible dependence on static initialization here. This
- // function is called during initialization of the statics above.
- // But, ACE_Time_Value::zero is a static object. Very fortunately,
- // its bits have a value of 0.
- if (this->timeout_ != ACE_Time_Value::zero)
- ACE_SET_BITS (this->options_, ACE_Synch_Options::USE_TIMEOUT);
-
- this->arg_ = arg;
-}
-
-int
-ACE_Synch_Options::operator[] (u_long option) const
-{
- ACE_TRACE ("ACE_Synch_Options::operator[]");
- return (this->options_ & option) != 0;
-}
-
-void
-ACE_Synch_Options::operator= (u_long option)
-{
- ACE_TRACE ("ACE_Synch_Options::operator=");
- this->options_ |= option;
-}
-
-const ACE_Time_Value &
-ACE_Synch_Options::timeout (void) const
-{
- ACE_TRACE ("ACE_Synch_Options::timeout");
- return this->timeout_;
-}
-
-void
-ACE_Synch_Options::timeout (const ACE_Time_Value &tv)
-{
- ACE_TRACE ("ACE_Synch_Options::timeout");
- this->timeout_ = tv;
-}
-
-const ACE_Time_Value *
-ACE_Synch_Options::time_value (void) const
-{
- ACE_TRACE ("ACE_Synch_Options::time_value");
- return (*this)[USE_TIMEOUT] ? &this->timeout_ : 0;
-}
-
-const void *
-ACE_Synch_Options::arg (void) const
-{
- ACE_TRACE ("ACE_Synch_Options::arg");
- return this->arg_;
-}
-
-void
-ACE_Synch_Options::arg (const void *a)
-{
- ACE_TRACE ("ACE_Synch_Options::arg");
- this->arg_ = a;
-}
diff --git a/ace/Synch_Options.h b/ace/Synch_Options.h
deleted file mode 100644
index 5ce8d3f9b96..00000000000
--- a/ace/Synch_Options.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// ACE_Synch_Options.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SYNCH_OPTIONS_H
-#define ACE_SYNCH_OPTIONS_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Synch_Options
-{
- // = TITLE
- // Contains the values of options used to determine the
- // synchronous and asynchronous behavior.
- //
- // = DESCRIPTION
- // Values support the following behavior (TV == "timeout"
- // and UR == "use ACE_Reactor"):
- //
- // = BEGIN<CODE>
- // Parameters | Description
- // |
- // TV | UR |
- // -----|----------|-------------------------------
- // | |
- // NULL | yes | infinite timeout (using ACE_Reactor)
- // | |
- // time | yes | try asynch transaction for
- // | | the specified time (using ACE_Reactor)
- // | |
- // 0,0 | yes | poll; try, if EWOULDBLOCK,
- // | | then return immediately
- // | | (using ACE_Reactor)
- // | |
- // NULL | no | block forever (don't use ACE_Reactor)
- // | |
- // time | no | do a blocking transaction
- // | | for the specified time
- // | | (don't use ACE_Reactor)
- // | |
- // 0,0 | no | poll; but do not initiate a
- // | | nonblocking transaction
- // | | (don't use ACE_Reactor)
- // = END<CODE>
-public:
- // = Options flags for controlling synchronization. Note that these
- // flags can be bit-wise "or'd" together if both options are
- // desired.
- enum
- {
- USE_REACTOR = 01,
- // Use the Reactor.
- USE_TIMEOUT = 02
- // Interprete the Time_Value.
- };
-
- // = Initialization methods.
- ACE_Synch_Options (u_long options = 0,
- const ACE_Time_Value &timeout = ACE_Time_Value::zero,
- const void *arg = 0);
- // Initialize the Synch_Options based on parameters.
-
- ~ACE_Synch_Options (void);
- // Default dtor.
-
- void set (u_long options = 0,
- const ACE_Time_Value &timeout = ACE_Time_Value::zero,
- const void *arg = 0);
- // Initialize the Synch_Options based on parameters.
-
- int operator[] (u_long option) const;
- // Get method for determining which options are enabled.
-
- void operator= (u_long option);
- // Set method for enabling certain options.
-
- const void *arg (void) const;
- // Returns the "magic cookie" argument.
-
- void arg (const void *);
- // Set the "magic cookie" argument.
-
- const ACE_Time_Value &timeout (void) const;
- // Returns a reference to the <Time_Value>. This value only makes
- // sense if (*this)[USE_TIMEOUT] is true.
-
- void timeout (const ACE_Time_Value &tv);
- // Set the <Time_Value>.
-
- const ACE_Time_Value *time_value (void) const;
- // Returns the address of the timeout <Time_Value> if
- // (*this)[USE_TIMEOUT] is true, else 0. This should be used with
- // care, e.g., the timeout pointer should not be stored in a manner
- // that will lead to dangling pointers...
-
- // = Static data members (singletons)
-
- static ACE_Synch_Options defaults;
- // This is the default setting for options, which will block
- // synchronously.
-
- static ACE_Synch_Options synch;
- // This is the default synchronous setting.
-
- static ACE_Synch_Options asynch;
- // This is the default asynchronous setting.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- u_long options_;
- // Keeps track of the enabled options.
-
- ACE_Time_Value timeout_;
- // Amount of time to wait for timeouts.
-
- const void *arg_;
- // "Magic cookie" always passed in as an argument to the ACE_Reactor's
- // <schedule_timer> method. Used to communicate values for
- // asynchronous programming.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Synch_Options.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_SYNCH_OPTIONS_H */
diff --git a/ace/Synch_Options.i b/ace/Synch_Options.i
deleted file mode 100644
index 3c16b199ac8..00000000000
--- a/ace/Synch_Options.i
+++ /dev/null
@@ -1,9 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Synch_Options.i
-
-ACE_INLINE
-ACE_Synch_Options::~ACE_Synch_Options (void)
-{
-}
diff --git a/ace/Synch_T.cpp b/ace/Synch_T.cpp
deleted file mode 100644
index 86f97cb6cea..00000000000
--- a/ace/Synch_T.cpp
+++ /dev/null
@@ -1,960 +0,0 @@
-// $Id$
-
-#ifndef ACE_SYNCH_T_C
-#define ACE_SYNCH_T_C
-
-#include "ace/Thread.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch_T.h"
-#include "ace/Log_Msg.h"
-
-ACE_RCSID(ace, Synch_T, "$Id$")
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Synch_T.i"
-// On non-Win32 platforms, this code will be treated as normal code.
-#if !defined (ACE_WIN32)
-#include "ace/Atomic_Op.i"
-#endif /* !ACE_WIN32 */
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op)
-
-// This constructor isn't inlined, because SunPRO C++ 4.2 + patch
-// 104631-07 has trouble compiling TAO with it inline.
-template <class ACE_LOCKING_MECHANISM>
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::ACE_Lock_Adapter (void)
- : lock_ (0),
- delete_lock_ (1)
-{
- ACE_NEW (this->lock_,
- ACE_LOCKING_MECHANISM);
-}
-
-template <class ACE_LOCKING_MECHANISM>
-ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::~ACE_Reverse_Lock (void)
-{
-}
-
-template <class ACE_LOCK, class TYPE>
-ACE_Test_and_Set<ACE_LOCK, TYPE>::ACE_Test_and_Set (TYPE initial_value)
- : is_set_ (initial_value)
-{
-}
-
-// Returns true if we are done, else false.
-template <class ACE_LOCK, class TYPE> TYPE
-ACE_Test_and_Set<ACE_LOCK, TYPE>::is_set (void) const
-{
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->lock_, this->is_set_);
- return this->is_set_;
-}
-
-// Sets the <is_set_> status.
-template <class ACE_LOCK, class TYPE> TYPE
-ACE_Test_and_Set<ACE_LOCK, TYPE>::set (TYPE status)
-{
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, this->is_set_);
- TYPE o_status = this->is_set_;
- this->is_set_ = status;
- return o_status;
-}
-
-template <class ACE_LOCK, class TYPE> int
-ACE_Test_and_Set<ACE_LOCK, TYPE>::handle_signal (int, siginfo_t *, ucontext_t *)
-{
- // By setting this to 1, we are "signaling" to anyone calling
- // <is_set> or or <set> that the "test and set" object is in the
- // "signaled" state, i.e., it's "available" to be set back to 0.
- this->set (1);
- return 0;
-}
-
-template <class ACE_LOCK, class TYPE> ACE_LOCK &
-ACE_Atomic_Op<ACE_LOCK, TYPE>::mutex (void)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::lock");
- return this->mutex_;
-}
-
-template <class ACE_LOCK, class TYPE> void
-ACE_Atomic_Op<ACE_LOCK, TYPE>::dump (void) const
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->mutex_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class ACE_LOCK, class TYPE>
-ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op (void)
- : value_ (0)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op");
-}
-
-template <class ACE_LOCK, class TYPE>
-ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op (const TYPE &c)
- : value_ (c)
-{
-// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op");
-}
-
-// ****************************************************************
-// ACE_ALLOC_HOOK_DEFINE(ACE_Guard)
-
-template <class ACE_LOCK> void
-ACE_Guard<ACE_LOCK>::dump (void) const
-{
-// ACE_TRACE ("ACE_Guard<ACE_LOCK>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("mutex_ = %x\n"), this->lock_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("owner_ = %d\n"), this->owner_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// ACE_ALLOC_HOOK_DEFINE(ACE_Write_Guard)
-
-template <class ACE_LOCK> void
-ACE_Write_Guard<ACE_LOCK>::dump (void) const
-{
-// ACE_TRACE ("ACE_Write_Guard<ACE_LOCK>::dump");
- ACE_Guard<ACE_LOCK>::dump ();
-}
-
-// ACE_ALLOC_HOOK_DEFINE(ACE_Read_Guard)
-
-template <class ACE_LOCK> void
-ACE_Read_Guard<ACE_LOCK>::dump (void) const
-{
-// ACE_TRACE ("ACE_Read_Guard<ACE_LOCK>::dump");
- ACE_Guard<ACE_LOCK>::dump ();
-}
-
-#if defined (ACE_HAS_THREADS)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Condition)
-
-template <class MUTEX> void
-ACE_Condition<MUTEX>::dump (void) const
-{
-// ACE_TRACE ("ACE_Condition<MUTEX>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-#if defined (CHORUS)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("condname_ = %s\n"), this->condname_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("process_cond_ = %x\n"), this->process_cond_));
-#endif /* CHORUS */
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class MUTEX>
-ACE_Thread_Condition<MUTEX>::ACE_Thread_Condition (MUTEX &m,
- const ACE_TCHAR *name,
- void *arg)
- : ACE_Condition<MUTEX> (m, USYNC_THREAD, name, arg)
-{
-// ACE_TRACE ("ACE_Thread_Condition<MUTEX>::ACE_Thread_Condition");
-}
-
-template <class MUTEX> void
-ACE_Thread_Condition<MUTEX>::dump (void) const
-{
-// ACE_TRACE ("ACE_Thread_Condition<MUTEX>::dump");
-
- ACE_Condition<MUTEX>::dump ();
-}
-
-template <class MUTEX>
-ACE_Condition<MUTEX>::ACE_Condition (MUTEX &m,
- int type,
- const ACE_TCHAR *name,
- void *arg)
- :
-#if defined (CHORUS)
- process_cond_(0),
- condname_ (0),
-#endif /* CHORUS */
- mutex_ (m)
-{
-
-#if defined(CHORUS)
- if (type == USYNC_PROCESS)
- {
- // Let's see if the shared memory entity already exists.
- ACE_HANDLE fd = ACE_OS::shm_open (name,
- O_RDWR | O_CREAT | O_EXCL,
- ACE_DEFAULT_FILE_PERMS);
- if (fd == ACE_INVALID_HANDLE)
- {
- if (errno == EEXIST)
- fd = ACE_OS::shm_open (name,
- O_RDWR | O_CREAT,
- ACE_DEFAULT_FILE_PERMS);
- else
- return;
- }
- else
- {
- // We own this shared memory object! Let's set its size.
- if (ACE_OS::ftruncate (fd,
- sizeof (ACE_mutex_t)) == -1)
- {
- ACE_OS::close (fd);
- return;
- }
- this->condname_ = ACE_OS::strdup (name);
- if (this->condname_ == 0)
- {
- ACE_OS::close (fd);
- return;
- }
- }
-
- this->process_cond_ =
- (ACE_cond_t *) ACE_OS::mmap (0,
- sizeof (ACE_cond_t),
- PROT_RDWR,
- MAP_SHARED,
- fd,
- 0);
- ACE_OS::close (fd);
- if (this->process_cond_ == MAP_FAILED)
- return;
-
- if (this->condname_
- && ACE_OS::cond_init (this->process_cond_,
- type,
- name,
- arg) != 0)
- return;
- }
- // It is ok to fall through into the <cond_init> below if the
- // USYNC_PROCESS flag is not enabled.
-#endif /* CHORUS */
-
- // ACE_TRACE ("ACE_Condition<MUTEX>::ACE_Condition");
-
- if (ACE_OS::cond_init (&this->cond_,
- (short) type,
- name,
- arg) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Condition::ACE_Condition")));
-}
-
-template <class MUTEX>
-ACE_Condition<MUTEX>::~ACE_Condition (void)
-{
- // ACE_TRACE ("ACE_Condition<MUTEX>::~ACE_Condition");
-
- if (this->remove () == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Condition::~ACE_Condition")));
-}
-
-template <class MUTEX> int
-ACE_Condition<MUTEX>::wait (void)
-{
- // ACE_TRACE ("ACE_Condition<MUTEX>::wait");
-#if defined (CHORUS)
- if (this->process_cond_ != 0)
- return ACE_OS::cond_wait (this->process_cond_,
- &this->mutex_.lock_);
-#endif /* CHORUS */
- return ACE_OS::cond_wait (&this->cond_,
- &this->mutex_.lock_);
-}
-
-template <class MUTEX> int
-ACE_Condition<MUTEX>::wait (MUTEX &mutex,
- const ACE_Time_Value *abstime)
-{
-// ACE_TRACE ("ACE_Condition<MUTEX>::wait");
- if (abstime == 0)
- return this->wait ();
- else
- {
-#if defined (CHORUS)
- if (this->process_cond_ != 0)
- return ACE_OS::cond_timedwait (this->process_cond_,
- &mutex_.lock_,
- (ACE_Time_Value *) abstime);
-#endif /* CHORUS */
- return ACE_OS::cond_timedwait (&this->cond_,
- &mutex.lock_,
- (ACE_Time_Value *) abstime);
- }
-}
-
-// Peform an "alertable" timed wait. If the argument ABSTIME == 0
-// then we do a regular cond_wait(), else we do a timed wait for up to
-// ABSTIME using the Solaris cond_timedwait() function.
-
-template <class MUTEX> int
-ACE_Condition<MUTEX>::wait (const ACE_Time_Value *abstime)
-{
-// ACE_TRACE ("ACE_Condition<MUTEX>::wait");
- return this->wait (this->mutex_, abstime);
-}
-#endif /* ACE_HAS_THREADS */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_TSS)
-
-template <class TYPE>
-ACE_TSS<TYPE>::~ACE_TSS (void)
-{
- // We can't call <ACE_OS::thr_keyfree> until *all* of the threads
- // that are using that key have done an <ACE_OS::thr_key_detach>.
- // Otherwise, we'll end up with "dangling TSS pointers."
- ACE_OS::thr_key_detach (this);
-}
-
-template <class TYPE> TYPE *
-ACE_TSS<TYPE>::operator-> () const
-{
- return this->ts_get ();
-}
-
-template <class TYPE>
-ACE_TSS<TYPE>::operator TYPE *(void) const
-{
- return this->ts_get ();
-}
-
-template <class TYPE> TYPE *
-ACE_TSS<TYPE>::make_TSS_TYPE (void) const
-{
- return new TYPE;
-}
-
-template <class TYPE> void
-ACE_TSS<TYPE>::dump (void) const
-{
-// ACE_TRACE ("ACE_TSS<TYPE>::dump");
-#if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->keylock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("key_ = %d\n"), this->key_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nonce_ = %d"), this->once_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-#endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) */
-}
-
-#if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))
-#if defined (ACE_HAS_THR_C_DEST)
-extern "C" void ACE_TSS_C_cleanup(void *); // defined in Synch.cpp
-#endif /* ACE_HAS_THR_C_DEST */
-
-template <class TYPE> void
-ACE_TSS<TYPE>::cleanup (void *ptr)
-{
- // Cast this to the concrete TYPE * so the destructor gets called.
- delete (TYPE *) ptr;
-}
-
-template <class TYPE> int
-ACE_TSS<TYPE>::ts_init (void) const
-{
- // Insure that we are serialized!
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, (ACE_Thread_Mutex &) this->keylock_, 0);
-
- // Use the Double-Check pattern to make sure we only create the key
- // once!
- if (this->once_ == 0)
- {
- if (ACE_Thread::keycreate (ACE_const_cast (ACE_thread_key_t *, &this->key_),
-#if defined (ACE_HAS_THR_C_DEST)
- &ACE_TSS_C_cleanup,
-#else
- &ACE_TSS<TYPE>::cleanup,
-#endif /* ACE_HAS_THR_C_DEST */
- (void *) this) != 0)
- return -1; // Major problems, this should *never* happen!
- else
- {
- // This *must* come last to avoid race conditions! Note that
- // we need to "cast away const..."
- * ACE_const_cast (int*, &this->once_) = 1;
- return 0;
- }
- }
- else
- return -1;
-}
-
-template <class TYPE>
-ACE_TSS<TYPE>::ACE_TSS (TYPE *ts_obj)
- : once_ (0),
- key_ (ACE_OS::NULL_key)
-{
- // If caller has passed us a non-NULL TYPE *, then we'll just use
- // this to initialize the thread-specific value. Thus, subsequent
- // calls to operator->() will return this value. This is useful
- // since it enables us to assign objects to thread-specific data
- // that have arbitrarily complex constructors!
-
- if (ts_obj != 0)
- {
- if (this->ts_init () == -1)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- // What should we do if this call fails?!
-#if defined (ACE_HAS_WINCE)
- ::MessageBox (NULL,
- L"ACE_Thread::keycreate() failed!",
- L"ACE_TSS::ACE_TSS",
- MB_OK);
-#else
- ACE_OS::fprintf (stderr,
- "ACE_Thread::keycreate() failed!");
-#endif /* ACE_HAS_WINCE */
- return;
- }
-
-#if defined (ACE_HAS_THR_C_DEST)
- // Encapsulate a ts_obj and it's destructor in an
- // ACE_TSS_Adapter.
- ACE_TSS_Adapter *tss_adapter;
- ACE_NEW (tss_adapter,
- ACE_TSS_Adapter ((void *) ts_obj,
- ACE_TSS<TYPE>::cleanup));
-
- // Put the adapter in thread specific storage
- if (ACE_Thread::setspecific (this->key_,
- (void *) tss_adapter) != 0)
- {
- delete tss_adapter;
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Thread::setspecific() failed!")));
- }
-#else
- if (ACE_Thread::setspecific (this->key_,
- (void *) ts_obj) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_Thread::setspecific() failed!")));
-#endif /* ACE_HAS_THR_C_DEST */
- }
-}
-
-template <class TYPE> TYPE *
-ACE_TSS<TYPE>::ts_get (void) const
-{
- if (this->once_ == 0)
- // Create and initialize thread-specific ts_obj.
- this->ts_init ();
-
- TYPE *ts_obj = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
-
- // Get the adapter from thread-specific storage
- if (ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter) == -1)
- return 0; // This should not happen!
-
- // Check to see if this is the first time in for this thread.
- if (tss_adapter == 0)
-#else
- // Get the ts_obj from thread-specific storage. Note that no locks
- // are required here...
- if (ACE_Thread::getspecific (this->key_,
- (void **) &ts_obj) == -1)
- return 0; // This should not happen!
-
- // Check to see if this is the first time in for this thread.
- if (ts_obj == 0)
-#endif /* ACE_HAS_THR_C_DEST */
- {
- // Allocate memory off the heap and store it in a pointer in
- // thread-specific storage (on the stack...).
-
- ts_obj = this->make_TSS_TYPE ();
-
- if (ts_obj == 0)
- return 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- // Encapsulate a ts_obj and it's destructor in an
- // ACE_TSS_Adapter.
- ACE_NEW_RETURN (tss_adapter,
- ACE_TSS_Adapter (ts_obj,
- ACE_TSS<TYPE>::cleanup), 0);
-
- // Put the adapter in thread specific storage
- if (ACE_Thread::setspecific (this->key_,
- (void *) tss_adapter) != 0)
- {
- delete tss_adapter;
- delete ts_obj;
- return 0; // Major problems, this should *never* happen!
- }
-#else
- // Store the dynamically allocated pointer in thread-specific
- // storage.
- if (ACE_Thread::setspecific (this->key_,
- (void *) ts_obj) != 0)
- {
- delete ts_obj;
- return 0; // Major problems, this should *never* happen!
- }
-#endif /* ACE_HAS_THR_C_DEST */
- }
-
-#if defined (ACE_HAS_THR_C_DEST)
- // Return the underlying ts object.
- return (TYPE *) tss_adapter->ts_obj_;
-#else
- return ts_obj;
-#endif /* ACE_HAS_THR_C_DEST */
-}
-
-// Get the thread-specific object for the key associated with this
-// object. Returns 0 if the ts_obj has never been initialized,
-// otherwise returns a pointer to the ts_obj.
-
-template <class TYPE> TYPE *
-ACE_TSS<TYPE>::ts_object (void) const
-{
- // Ensure that we are serialized!
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, (ACE_Thread_Mutex &) this->keylock_, 0);
-
- if (this->once_ == 0) // Return 0 if we've never been initialized.
- return 0;
- else
- {
- TYPE *ts_obj = 0;
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
-
- // Get the tss adapter from thread-specific storage
- if (ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter) == -1)
- return 0; // This should not happen!
- else if (tss_adapter != 0)
- // Extract the real TS object.
- ts_obj = (TYPE *) tss_adapter->ts_obj_;
-#else
- if (ACE_Thread::getspecific (this->key_,
- (void **) &ts_obj) == -1)
- return 0; // This should not happen!
-#endif /* ACE_HAS_THR_C_DEST */
- return ts_obj;
- }
-}
-
-template <class TYPE> TYPE *
-ACE_TSS<TYPE>::ts_object (TYPE *new_ts_obj)
-{
- // Note, we shouldn't hold the keylock at this point because
- // <ts_init> does it for us and we'll end up with deadlock
- // otherwise...
- if (this->once_ == 0)
- // Create and initialize thread-specific ts_obj.
- this->ts_init ();
-
- // Ensure that we are serialized!
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->keylock_, 0);
-
- TYPE *ts_obj = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
-
- if (ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter) == -1)
- return 0; // This should not happen!
-
- if (tss_adapter != 0)
- {
- ts_obj = (TYPE *) tss_adapter->ts_obj_;
- delete tss_adapter; // don't need this anymore
- }
-
- ACE_NEW_RETURN (tss_adapter,
- ACE_TSS_Adapter ((void *) new_ts_obj,
- ACE_TSS<TYPE>::cleanup),
- 0);
-
- if (ACE_Thread::setspecific (this->key_,
- (void *) tss_adapter) == -1)
- {
- delete tss_adapter;
- return ts_obj; // This should not happen!
- }
-#else
- if (ACE_Thread::getspecific (this->key_,
- (void **) &ts_obj) == -1)
- return 0; // This should not happen!
- if (ACE_Thread::setspecific (this->key_,
- (void *) new_ts_obj) == -1)
- return ts_obj; // This should not happen!
-#endif /* ACE_HAS_THR_C_DEST */
- else
- return ts_obj;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_TSS_Guard)
-
-template <class ACE_LOCK> void
-ACE_TSS_Guard<ACE_LOCK>::dump (void) const
-{
-// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("key_ = %d"), this->key_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class ACE_LOCK> void
-ACE_TSS_Guard<ACE_LOCK>::init_key (void)
-{
-// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::init_key");
-
- this->key_ = ACE_OS::NULL_key;
- ACE_Thread::keycreate (&this->key_,
-#if defined (ACE_HAS_THR_C_DEST)
- &ACE_TSS_C_cleanup,
-#else
- &ACE_TSS_Guard<ACE_LOCK>::cleanup,
-#endif /* ACE_HAS_THR_C_DEST */
- (void *) this);
-}
-
-template <class ACE_LOCK>
-ACE_TSS_Guard<ACE_LOCK>::ACE_TSS_Guard (void)
-{
-// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::ACE_TSS_Guard");
- this->init_key ();
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Guard<ACE_LOCK>::release (void)
-{
-// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::release");
-
- ACE_Guard<ACE_LOCK> *guard = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
- ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter);
- guard = (ACE_Guard<ACE_LOCK> *)tss_adapter->ts_obj_;
-#else
- ACE_Thread::getspecific (this->key_,
- (void **) &guard);
-#endif /* ACE_HAS_THR_C_DEST */
-
- return guard->release ();
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Guard<ACE_LOCK>::remove (void)
-{
-// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::remove");
-
- ACE_Guard<ACE_LOCK> *guard = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
- ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter);
- guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_;
-#else
- ACE_Thread::getspecific (this->key_,
- (void **) &guard);
-#endif /* ACE_HAS_THR_C_DEST */
-
- return guard->remove ();
-}
-
-template <class ACE_LOCK>
-ACE_TSS_Guard<ACE_LOCK>::~ACE_TSS_Guard (void)
-{
-// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::~ACE_TSS_Guard");
-
- ACE_Guard<ACE_LOCK> *guard = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
- ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter);
- guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_;
-#else
- ACE_Thread::getspecific (this->key_,
- (void **) &guard);
-#endif /* ACE_HAS_THR_C_DEST */
-
- // Make sure that this pointer is NULL when we shut down...
- ACE_Thread::setspecific (this->key_, 0);
- ACE_Thread::keyfree (this->key_);
- // Destructor releases lock.
- delete guard;
-}
-
-template <class ACE_LOCK> void
-ACE_TSS_Guard<ACE_LOCK>::cleanup (void *ptr)
-{
-// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::dump");
-
- // Destructor releases lock.
- delete (ACE_Guard<ACE_LOCK> *) ptr;
-}
-
-template <class ACE_LOCK>
-ACE_TSS_Guard<ACE_LOCK>::ACE_TSS_Guard (ACE_LOCK &lock, int block)
-{
-// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::ACE_TSS_Guard");
-
- this->init_key ();
- ACE_Guard<ACE_LOCK> *guard;
- ACE_NEW (guard,
- ACE_Guard<ACE_LOCK> (lock,
- block));
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter;
- ACE_NEW (tss_adapter,
- ACE_TSS_Adapter ((void *) guard,
- ACE_TSS_Guard<ACE_LOCK>::cleanup));
- ACE_Thread::setspecific (this->key_,
- (void *) tss_adapter);
-#else
- ACE_Thread::setspecific (this->key_,
- (void *) guard);
-#endif /* ACE_HAS_THR_C_DEST */
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Guard<ACE_LOCK>::acquire (void)
-{
-// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::acquire");
-
- ACE_Guard<ACE_LOCK> *guard = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
- ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter);
- guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_;
-#else
- ACE_Thread::getspecific (this->key_,
- (void **) &guard);
-#endif /* ACE_HAS_THR_C_DEST */
-
- return guard->acquire ();
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Guard<ACE_LOCK>::tryacquire (void)
-{
-// ACE_TRACE ("ACE_TSS_Guard<ACE_LOCK>::tryacquire");
-
- ACE_Guard<ACE_LOCK> *guard = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
- ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter);
- guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_;
-#else
- ACE_Thread::getspecific (this->key_,
- (void **) &guard);
-#endif /* ACE_HAS_THR_C_DEST */
-
- return guard->tryacquire ();
-}
-
-template <class ACE_LOCK>
-ACE_TSS_Write_Guard<ACE_LOCK>::ACE_TSS_Write_Guard (ACE_LOCK &lock,
- int block)
-{
-// ACE_TRACE ("ACE_TSS_Write_Guard<ACE_LOCK>::ACE_TSS_Write_Guard");
-
- this->init_key ();
- ACE_Guard<ACE_LOCK> *guard;
- ACE_NEW (guard,
- ACE_Write_Guard<ACE_LOCK> (lock,
- block));
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter;
- ACE_NEW (tss_adapter,
- ACE_TSS_Adapter ((void *) guard,
- ACE_TSS_Guard<ACE_LOCK>::cleanup));
- ACE_Thread::setspecific (this->key_,
- (void *) tss_adapter);
-#else
- ACE_Thread::setspecific (this->key_,
- (void *) guard);
-#endif /* ACE_HAS_THR_C_DEST */
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Write_Guard<ACE_LOCK>::acquire (void)
-{
-// ACE_TRACE ("ACE_TSS_Write_Guard<ACE_LOCK>::acquire");
-
- ACE_Write_Guard<ACE_LOCK> *guard = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
- ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter);
- guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_;
-#else
- ACE_Thread::getspecific (this->key_,
- (void **) &guard);
-#endif /* ACE_HAS_THR_C_DEST */
-
- return guard->acquire_write ();
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Write_Guard<ACE_LOCK>::tryacquire (void)
-{
-// ACE_TRACE ("ACE_TSS_Write_Guard<ACE_LOCK>::tryacquire");
-
- ACE_Write_Guard<ACE_LOCK> *guard = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
- ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter);
- guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_;
-#else
- ACE_Thread::getspecific (this->key_,
- (void **) &guard);
-#endif /* ACE_HAS_THR_C_DEST */
-
- return guard->tryacquire_write ();
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Write_Guard<ACE_LOCK>::acquire_write (void)
-{
-// ACE_TRACE ("ACE_TSS_Write_Guard<ACE_LOCK>::acquire_write");
-
- return this->acquire ();
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Write_Guard<ACE_LOCK>::tryacquire_write (void)
-{
-// ACE_TRACE ("ACE_TSS_Write_Guard<ACE_LOCK>::tryacquire_write");
-
- return this->tryacquire ();
-}
-
-template <class ACE_LOCK> void
-ACE_TSS_Write_Guard<ACE_LOCK>::dump (void) const
-{
-// ACE_TRACE ("ACE_TSS_Write_Guard<ACE_LOCK>::dump");
- ACE_TSS_Guard<ACE_LOCK>::dump ();
-}
-
-template <class ACE_LOCK>
-ACE_TSS_Read_Guard<ACE_LOCK>::ACE_TSS_Read_Guard (ACE_LOCK &lock, int block)
-{
-// ACE_TRACE ("ACE_TSS_Read_Guard<ACE_LOCK>::ACE_TSS_Read_Guard");
-
- this->init_key ();
- ACE_Guard<ACE_LOCK> *guard;
- ACE_NEW (guard,
- ACE_Read_Guard<ACE_LOCK> (lock,
- block));
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter;
- ACE_NEW (tss_adapter,
- ACE_TSS_Adapter ((void *)guard,
- ACE_TSS_Guard<ACE_LOCK>::cleanup));
- ACE_Thread::setspecific (this->key_,
- (void *) tss_adapter);
-#else
- ACE_Thread::setspecific (this->key_,
- (void *) guard);
-#endif /* ACE_HAS_THR_C_DEST */
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Read_Guard<ACE_LOCK>::acquire (void)
-{
-// ACE_TRACE ("ACE_TSS_Read_Guard<ACE_LOCK>::acquire");
-
- ACE_Read_Guard<ACE_LOCK> *guard = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
- ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter);
- guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_;
-#else
- ACE_Thread::getspecific (this->key_,
- (void **) &guard);
-#endif /* ACE_HAS_THR_C_DEST */
-
- return guard->acquire_read ();
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Read_Guard<ACE_LOCK>::tryacquire (void)
-{
-// ACE_TRACE ("ACE_TSS_Read_Guard<ACE_LOCK>::tryacquire");
-
- ACE_Read_Guard<ACE_LOCK> *guard = 0;
-
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_TSS_Adapter *tss_adapter = 0;
- ACE_Thread::getspecific (this->key_,
- (void **) &tss_adapter);
- guard = (ACE_Guard<ACE_LOCK> *) tss_adapter->ts_obj_;
-#else
- ACE_Thread::getspecific (this->key_,
- (void **) &guard);
-#endif /* ACE_HAS_THR_C_DEST */
-
- return guard->tryacquire_read ();
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Read_Guard<ACE_LOCK>::acquire_read (void)
-{
-// ACE_TRACE ("ACE_TSS_Read_Guard<ACE_LOCK>::acquire_read");
-
- return this->acquire ();
-}
-
-template <class ACE_LOCK> int
-ACE_TSS_Read_Guard<ACE_LOCK>::tryacquire_read (void)
-{
-// ACE_TRACE ("ACE_TSS_Read_Guard<ACE_LOCK>::tryacquire_read");
-
- return this->tryacquire ();
-}
-
-template <class ACE_LOCK> void
-ACE_TSS_Read_Guard<ACE_LOCK>::dump (void) const
-{
-// ACE_TRACE ("ACE_TSS_Read_Guard<ACE_LOCK>::dump");
- ACE_TSS_Guard<ACE_LOCK>::dump ();
-}
-
-
-#endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) */
-
-#endif /* ACE_SYNCH_T_C */
diff --git a/ace/Synch_T.h b/ace/Synch_T.h
deleted file mode 100644
index edd88feddf4..00000000000
--- a/ace/Synch_T.h
+++ /dev/null
@@ -1,968 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Synch_T.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@uci.edu>
-//
-// ============================================================================
-
-#ifndef ACE_SYNCH_T_H
-#define ACE_SYNCH_T_H
-#include "ace/pre.h"
-
-#include "ace/Event_Handler.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch.h"
-
-// Forward decl
-class ACE_Time_Value;
-
-template <class ACE_LOCKING_MECHANISM>
-class ACE_Lock_Adapter : public ACE_Lock
-{
- // = TITLE
- // This is an adapter that allows applications to transparently
- // combine the <ACE_Lock> abstract base class (which contains
- // pure virtual methods) with any of the other concrete ACE
- // synchronization classes (e.g., <ACE_Mutex>, <ACE_Semaphore>,
- // <ACE_RW_Mutex>, etc.).
- //
- // = DESCRIPTION
- // This class uses a form of the Adapter pattern.
-public:
- typedef ACE_LOCKING_MECHANISM ACE_LOCK;
-
- // = Initialization/Finalization methods.
-
- ACE_Lock_Adapter (ACE_LOCKING_MECHANISM &lock);
- // Constructor. All locking requests will be forwarded to <lock>.
-
- ACE_Lock_Adapter (void);
- // Constructor. Since no lock is provided by the user, one will be
- // created internally.
-
- virtual ~ACE_Lock_Adapter (void);
- // Destructor. If <lock_> was not passed in by the user, it will be
- // deleted.
-
- // = Lock accessors.
- virtual int acquire (void);
- // Block the thread until the lock is acquired.
-
- virtual int tryacquire (void);
- // Conditionally acquire the lock (i.e., won't block).
-
- virtual int release (void);
- // Release the lock.
-
- virtual int acquire_read (void);
- // Block until the thread acquires a read lock. If the locking
- // mechanism doesn't support read locks then this just calls
- // <acquire>.
-
- virtual int acquire_write (void);
- // Block until the thread acquires a write lock. If the locking
- // mechanism doesn't support read locks then this just calls
- // <acquire>.
-
- virtual int tryacquire_read (void);
- // Conditionally acquire a read lock. If the locking mechanism
- // doesn't support read locks then this just calls <acquire>.
-
- virtual int tryacquire_write (void);
- // Conditionally acquire a write lock. If the locking mechanism
- // doesn't support read locks then this just calls <acquire>.
-
- virtual int remove (void);
- // Explicitly destroy the lock.
-
-private:
- ACE_LOCKING_MECHANISM *lock_;
- // The concrete locking mechanism that all the methods delegate to.
-
- int delete_lock_;
- // This flag keep track of whether we are responsible for deleting
- // the lock
-};
-
-template <class ACE_LOCKING_MECHANISM>
-class ACE_Reverse_Lock : public ACE_Lock
-{
- // = TITLE
- // A reverse (or anti) lock.
- //
- // = DESCRIPTION
- // This is an interesting adapter class that changes a lock into
- // a reverse lock, i.e., <acquire> on this class calls <release>
- // on the lock, and <release> on this class calls <acquire> on
- // the lock.
- //
- // One motivation for this class is when we temporarily want to
- // release a lock (which we have already acquired) but then
- // reaquire it soon after. An alternative design would be to
- // add a Anti_Guard or Reverse_Guard class which would <release>
- // on construction and <acquire> destruction. However, there
- // are *many* varieties of the Guard class and this design
- // choice would lead to at least 6 new classes. One new
- // ACE_Reverse_Lock class seemed more reasonable.
-public:
- typedef ACE_LOCKING_MECHANISM ACE_LOCK;
-
- // = Initialization/Finalization methods.
-
- ACE_Reverse_Lock (ACE_LOCKING_MECHANISM &lock);
- // Constructor. All locking requests will be forwarded to <lock>.
-
- virtual ~ACE_Reverse_Lock (void);
- // Destructor. If <lock_> was not passed in by the user, it will be
- // deleted.
-
- // = Lock accessors.
- virtual int acquire (void);
- // Release the lock.
-
- virtual int tryacquire (void);
- // Release the lock.
-
- virtual int release (void);
- // Acquire the lock.
-
- virtual int acquire_read (void);
- // Release the lock.
-
- virtual int acquire_write (void);
- // Release the lock.
-
- virtual int tryacquire_read (void);
- // Release the lock.
-
- virtual int tryacquire_write (void);
- // Release the lock.
-
- virtual int remove (void);
- // Explicitly destroy the lock.
-
-private:
- ACE_LOCKING_MECHANISM &lock_;
- // The concrete locking mechanism that all the methods delegate to.
-};
-
-template <class ACE_LOCK, class TYPE>
-class ACE_Test_and_Set : public ACE_Event_Handler
-{
-public:
- // = TITLE
- // Implements the classic ``test and set'' operation.
- //
- // = DESCRIPTION
- // This class keeps track of the status of <is_set_>, which can
- // be set based on various events (such as receipt of a
- // signal). This class is derived from <ACE_Event_Handler> so
- // that it can be "signaled" by a Reactor when a signal occurs.
- // We assume that <TYPE> is a data type that can be assigned the
- // value 0 or 1.
- ACE_Test_and_Set (TYPE initial_value = 0);
-
- TYPE is_set (void) const;
- // Returns true if we are set, else false.
-
- TYPE set (TYPE);
- // Sets the <is_set_> status, returning the original value of
- // <is_set_>.
-
- virtual int handle_signal (int signum,
- siginfo_t * = 0,
- ucontext_t * = 0);
- // Called when object is signaled by OS (either via UNIX signals or
- // when a Win32 object becomes signaled).
-
-private:
- TYPE is_set_;
- // Keeps track of our state.
-
- ACE_LOCK lock_;
- // Protect the state from race conditions.
-};
-
-template <class ACE_LOCK, class TYPE>
-class ACE_Atomic_Op
-{
- // = TITLE
- // Transparently parameterizes synchronization into basic
- // arithmetic operations.
- //
- // = DESCRIPTION
- // This class is described in an article in the July/August 1994
- // issue of the C++ Report magazine. It implements a
- // templatized version of the Decorator pattern from the GoF book.
-public:
- // = Initialization methods.
-
- ACE_Atomic_Op (void);
- // Initialize <value_> to 0.
-
- ACE_Atomic_Op (const TYPE &c);
- // Initialize <value_> to c.
-
- // = Accessors.
-
- TYPE operator++ (void);
- // Atomically pre-increment <value_>.
-
- TYPE operator++ (int);
- // Atomically post-increment <value_>.
-
- TYPE operator+= (const TYPE &i);
- // Atomically increment <value_> by i.
-
- TYPE operator-- (void);
- // Atomically pre-decrement <value_>.
-
- TYPE operator-- (int);
- // Atomically post-decrement <value_>.
-
- TYPE operator-= (const TYPE &i);
- // Atomically decrement <value_> by i.
-
- int operator== (const TYPE &i) const;
- // Atomically compare <value_> with i.
-
- int operator!= (const TYPE &i) const;
- // Atomically compare <value_> with i.
-
- int operator>= (const TYPE &i) const;
- // Atomically check if <value_> greater than or equal to i.
-
- int operator> (const TYPE &rhs) const;
- // Atomically check if <value_> greater than i.
-
- int operator<= (const TYPE &rhs) const;
- // Atomically check if <value_> less than or equal to i.
-
- int operator< (const TYPE &rhs) const;
- // Atomically check if <value_> less than i.
-
- void operator= (const TYPE &i);
- // Atomically assign i to <value_>.
-
- void operator= (const ACE_Atomic_Op<ACE_LOCK, TYPE> &rhs);
- // Atomically assign <rhs> to <value_>.
-
- TYPE value (void) const;
- // Explicitly return <value_>.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- ACE_Atomic_Op (const ACE_Atomic_Op<ACE_LOCK, TYPE> &);
- // Manage copying...
-
- ACE_LOCK &mutex (void);
- // Returns a reference to the underlying <ACE_LOCK>. This makes it
- // possible to acquire the lock explicitly, which can be useful in
- // some cases if you instantiate the <ACE_Atomic_Op> with an
- // <ACE_Recursive_Mutex> or <ACE_Process_Mutex>. NOTE: the right
- // name would be lock_, but HP/C++ will choke on that!
-
- TYPE &value_i (void);
- // Explicitly return <value_> (by reference). This gives the user
- // full, unrestricted access to the underlying value. This method
- // will usually be used in conjunction with explicit access to the
- // lock. Use with care ;-)
-
-private:
- ACE_LOCK mutex_;
- // Type of synchronization mechanism.
-
- TYPE value_;
- // Current object decorated by the atomic op.
-};
-
-template <class TYPE>
-class ACE_TSS
-{
- // = TITLE
- // Allows objects that are "physically" in thread specific
- // storage (i.e., private to a thread) to be accessed as though
- // they were "logically" global to a program.
- //
- // = DESCRIPTION
- // This class is a wrapper around the OS thread library
- // thread-specific functions. It uses the <C++ operator->> to
- // shield applications from the details of accessing
- // thread-specific storage.
- //
- // NOTE: TYPE cannot be a built-in type, but instead must be a
- // user-defined class. (Some compilers will allow a built-in
- // type, but shouldn't. Sun C++ won't, properly detecting the
- // improper return type from <operator->>.) See template class
- // ACE_TSS_Type_Adapter, below, for adapting built-in types to
- // work with ACE_TSS.
-public:
- // = Initialization and termination methods.
-
- ACE_TSS (TYPE *ts_obj = 0);
- // If caller has passed us a non-NULL ts_obj *, then we'll just use
- // this to initialize the thread-specific value (but only for the
- // calling thread). Thus, subsequent calls to <operator->> in this
- // thread will return this value. This is useful since it enables
- // us to assign objects to thread-specific data that have
- // arbitrarily complex constructors.
-
- virtual ~ACE_TSS (void);
- // Deregister with thread-key administration.
-
- // = Accessors.
-
- TYPE *ts_object (void) const;
- // Get the thread-specific object for the key associated with this
- // object. Returns 0 if the data has never been initialized,
- // otherwise returns a pointer to the data.
-
- TYPE *ts_object (TYPE *);
- // Set the thread-specific object for the key associated with this
- // object.
-
- TYPE *operator-> () const;
- // Use a "smart pointer" to get the thread-specific object
- // associated with the <key_>.
-
- operator TYPE *(void) const;
- // Return or create and return the calling threads TYPE object.
-
- virtual TYPE *make_TSS_TYPE (void) const;
- // Hook for construction parameters.
-
- // = Utility methods.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- TYPE *ts_get (void) const;
- // Actually implements the code that retrieves the object from
- // thread-specific storage.
-
- int ts_init (void) const;
- // Factors out common code for initializing TSS. This must NOT be
- // called with the lock held...
-
-#if !(defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)))
- TYPE *type_;
- // This implementation only works for non-threading systems...
-#else
- ACE_Thread_Mutex keylock_;
- // Avoid race conditions during initialization.
-
- int once_;
- // "First time in" flag.
-
- ACE_thread_key_t key_;
- // Key for the thread-specific error data.
-
- static void cleanup (void *ptr);
- // "Destructor" that deletes internal TYPE * when thread exits.
-#endif /* defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)) */
- // = Disallow copying...
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_TSS<TYPE> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_TSS (const ACE_TSS<TYPE> &))
-};
-
-template <class TYPE>
-class ACE_TSS_Type_Adapter
-{
- // = TITLE
- // Adapter that allows built-in types to be used with ACE_TSS.
- //
- // = DESCRIPTION
- // Wraps a value of a built-in type, providing conversions to
- // and from the type. Example use with ACE_TSS:
- //
- // ACE_TSS<ACE_TSS_Type_Adapter<int> > i;
- // *i = 37;
- // ACE_OS::fprintf (stderr, "%d\n", *i);
- //
- // Unfortunately, though, some compilers have trouble with the
- // implicit type conversions. This seems to work better:
- //
- // ACE_TSS<ACE_TSS_Type_Adapter<int> > i;
- // i->operator int & () = 37;
- // ACE_OS::fprintf (stderr, "%d\n", i->operator int ());
-public:
- ACE_TSS_Type_Adapter (const TYPE value = 0): value_ (value) {}
- // Constructor. Inlined here so that it should _always_ be inlined.
-
- operator TYPE () const { return value_; };
- // TYPE conversion. Inlined here so that it should _always_ be
- // inlined.
-
- operator TYPE &() { return value_; };
- // TYPE & conversion. Inlined here so that it should _always_ be
- // inlined.
-
-private:
- TYPE value_;
- // The wrapped value.
-};
-
-template <class ACE_LOCK>
-class ACE_Guard
-{
- // = TITLE
- // This data structure is meant to be used within a method or
- // function... It performs automatic aquisition and release of
- // a parameterized synchronization object <ACE_LOCK>.
- //
- // = DESCRIPTION
- // The <ACE_LOCK> class given as an actual parameter must provide at
- // the very least the <acquire>, <tryacquire>, <release>, and
- // <remove> methods.
-public:
-
- // = Initialization and termination methods.
- ACE_Guard (ACE_LOCK &l);
-
- ACE_Guard (ACE_LOCK &l, int block);
- // Implicitly and automatically acquire (or try to acquire) the
- // lock.
-
- ~ACE_Guard (void);
- // Implicitly release the lock.
-
- // = Lock accessors.
-
- int acquire (void);
- // Explicitly acquire the lock.
-
- int tryacquire (void);
- // Conditionally acquire the lock (i.e., won't block).
-
- int release (void);
- // Explicitly release the lock, but only if it is held!
-
- // = Utility methods.
- int locked (void);
- // 1 if locked, 0 if couldn't acquire the lock
- // (errno will contain the reason for this).
-
- int remove (void);
- // Explicitly remove the lock.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
-
- ACE_Guard (ACE_LOCK *lock): lock_ (lock) {}
- // Helper, meant for subclass only.
-
- ACE_LOCK *lock_;
- // Pointer to the ACE_LOCK we're guarding.
-
- int owner_;
- // Keeps track of whether we acquired the lock or failed.
-
-private:
- // = Prevent assignment and initialization.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Guard<ACE_LOCK> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Guard (const ACE_Guard<ACE_LOCK> &))
-};
-
-template <class ACE_LOCK>
-class ACE_Write_Guard : public ACE_Guard<ACE_LOCK>
-{
- // = TITLE
- // This class is similar to class <ACE_Guard>, though it
- // acquires/releases a write lock automatically (naturally, the
- // <ACE_LOCK> it is instantiated with must support the appropriate
- // API).
-public:
- // = Initialization method.
-
- ACE_Write_Guard (ACE_LOCK &m);
- // Implicitly and automatically acquire a write lock.
-
- ACE_Write_Guard (ACE_LOCK &m, int block);
- // Implicitly and automatically acquire (or try to acquire) a write
- // lock.
-
- // = Lock accessors.
-
- int acquire_write (void);
- // Explicitly acquire the write lock.
-
- int acquire (void);
- // Explicitly acquire the write lock.
-
- int tryacquire_write (void);
- // Conditionally acquire the write lock (i.e., won't block).
-
- int tryacquire (void);
- // Conditionally acquire the write lock (i.e., won't block).
-
- // = Utility methods.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-template <class ACE_LOCK>
-class ACE_Read_Guard : public ACE_Guard<ACE_LOCK>
-{
- // = TITLE
- // This class is similar to class <ACE_Guard>, though it
- // acquires/releases a read lock automatically (naturally, the
- // <ACE_LOCK> it is instantiated with must support the appropriate
- // API).
-public:
- // = Initialization methods.
-
- ACE_Read_Guard (ACE_LOCK& m);
- // Implicitly and automatically acquire a read lock.
-
- ACE_Read_Guard (ACE_LOCK &m, int block);
- // Implicitly and automatically acquire (or try to acquire) a read
- // lock.
-
- // = Lock accessors.
-
- int acquire_read (void);
- // Explicitly acquire the read lock.
-
- int acquire (void);
- // Explicitly acquire the read lock.
-
- int tryacquire_read (void);
- // Conditionally acquire the read lock (i.e., won't block).
-
- int tryacquire (void);
- // Conditionally acquire the read lock (i.e., won't block).
-
- // = Utility methods.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !(defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)))
-
-#define ACE_TSS_Guard ACE_Guard
-#define ACE_TSS_Write_GUARD ACE_Write_Guard
-#define ACE_TSS_Read_GUARD ACE_Read_Guard
-
-#else
- /* ACE platform supports some form of threading and
- thread-specific storage. */
-
-template <class ACE_LOCK>
-class ACE_TSS_Guard
-{
- // = TITLE
- // This data structure is meant to be used within a method or
- // function... It performs automatic aquisition and release of
- // a synchronization object. Moreover, it ensures that the lock
- // is released even if a thread exits via <thr_exit>!
-public:
- // = Initialization and termination methods.
-
- ACE_TSS_Guard (ACE_LOCK &lock, int block = 1);
- // Implicitly and automatically acquire the thread-specific lock.
-
- ~ACE_TSS_Guard (void);
- // Implicitly release the thread-specific lock.
-
- // = Lock accessors.
-
- int acquire (void);
- // Explicitly acquire the thread-specific lock.
-
- int tryacquire (void);
- // Conditionally acquire the thread-specific lock (i.e., won't
- // block).
-
- int release (void);
- // Explicitly release the thread-specific lock.
-
- // = Utility methods.
- int remove (void);
- // Explicitly release the thread-specific lock.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- ACE_TSS_Guard (void);
- // Helper, meant for subclass only.
-
- void init_key (void);
- // Initialize the key.
-
- static void cleanup (void *ptr);
- // Called when thread exits to clean up the lock.
-
- ACE_thread_key_t key_;
- // Thread-specific key...
-
-private:
- // = Prevent assignment and initialization.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_TSS_Guard<ACE_LOCK> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_TSS_Guard (const ACE_TSS_Guard<ACE_LOCK> &))
-};
-
-template <class ACE_LOCK>
-class ACE_TSS_Write_Guard : public ACE_TSS_Guard<ACE_LOCK>
-{
- // = TITLE
- // This class is similar to class ACE_TSS_Guard, though it
- // acquires/releases a write-lock automatically (naturally, the
- // ACE_LOCK it is instantiated with must support the appropriate
- // API).
-public:
- // = Initialization method.
-
- ACE_TSS_Write_Guard (ACE_LOCK &lock, int block = 1);
- // Implicitly and automatically acquire the thread-specific write lock.
-
- // = Lock accessors.
-
- int acquire_write (void);
- // Explicitly acquire the thread-specific write lock.
-
- int acquire (void);
- // Explicitly acquire the thread-specific write lock.
-
- int tryacquire_write (void);
- // Conditionally acquire the thread-specific write lock (i.e., won't block).
-
- int tryacquire (void);
- // Conditionally acquire the thread-specific write lock (i.e., won't block).
-
- // = Utility methods.
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-template <class ACE_LOCK>
-class ACE_TSS_Read_Guard : public ACE_TSS_Guard<ACE_LOCK>
-{
- // = TITLE
- // This class is similar to class <ACE_TSS_Guard>, though it
- // acquires/releases a read lock automatically (naturally, the
- // <ACE_LOCK> it is instantiated with must support the
- // appropriate API).
-public:
- // = Initialization method.
- ACE_TSS_Read_Guard (ACE_LOCK &lock, int block = 1);
- // Implicitly and automatically acquire the thread-specific read lock.
-
- // = Lock accessors.
- int acquire_read (void);
- // Explicitly acquire the thread-specific read lock.
-
- int acquire (void);
- // Explicitly acquire the thread-specific read lock.
-
- int tryacquire_read (void);
- // Conditionally acquire the thread-specific read lock (i.e., won't
- // block).
-
- int tryacquire (void);
- // Conditionally acquire the thread-specific read lock (i.e., won't
- // block).
-
- // = Utility methods.
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-#endif /* !(defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))) */
-
-#if defined (ACE_HAS_THREADS) /* ACE platform supports some form of threading. */
-
-template <class MUTEX>
-class ACE_Condition
-{
- // = TITLE
- // ACE_Condition variable wrapper, which allows threads to block
- // until shared data changes state.
- //
- // = DESCRIPTION
- // A condition variable enables threads to atomically block and
- // test the condition under the protection of a mutual exclu-
- // sion lock (mutex) until the condition is satisfied. That is,
- // the mutex must have been held by the thread before calling
- // wait or signal on the condition. If the condition is false,
- // a thread blocks on a condition variable and atomically
- // releases the mutex that is waiting for the condition to
- // change. If another thread changes the condition, it may wake
- // up waiting threads by signaling the associated condition
- // variable. The waiting threads, upon awakening, reacquire the
- // mutex and re-evaluate the condition.
- //
- // Note, you can only parameterize <ACE_Condition> with
- // <ACE_Thread_Mutex> or <ACE_Null_Mutex>.
-public:
- // = Initialiation and termination methods.
- ACE_Condition (MUTEX &m, int type = USYNC_THREAD,
- const ACE_TCHAR *name = 0, void *arg = 0);
- // Initialize the condition variable.
-
- ~ACE_Condition (void);
- // Implicitly destroy the condition variable.
-
- // = Lock accessors.
- int wait (const ACE_Time_Value *abstime);
- // Block on condition, or until absolute time-of-day has passed. If
- // abstime == 0 use "blocking" <wait> semantics. Else, if <abstime>
- // != 0 and the call times out before the condition is signaled
- // <wait> returns -1 and sets errno to ETIME.
-
- int wait (void);
- // Block on condition.
-
- int wait (MUTEX &mutex, const ACE_Time_Value *abstime = 0);
- // Block on condition or until absolute time-of-day has passed. If
- // abstime == 0 use "blocking" wait() semantics on the <mutex>
- // passed as a parameter (this is useful if you need to store the
- // <Condition> in shared memory). Else, if <abstime> != 0 and the
- // call times out before the condition is signaled <wait> returns -1
- // and sets errno to ETIME.
-
- int signal (void);
- // Signal one waiting thread.
-
- int broadcast (void);
- // Signal *all* waiting threads.
-
- // = Utility methods.
- int remove (void);
- // Explicitly destroy the condition variable.
-
- MUTEX &mutex (void);
- // Returns a reference to the underlying mutex_;
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
-#if defined (CHORUS)
- ACE_cond_t *process_cond_;
- // This condition resides in shared memory.
-
- const ACE_TCHAR *condname_;
- // Remember the name of the condition if we created it so we can
- // unlink it when we go away (only the actor that initialized the
- // memory can destroy it).
-#endif /* CHORUS */
-
- ACE_cond_t cond_;
- // Condition variable.
-
- MUTEX &mutex_;
- // Reference to mutex lock.
-
-private:
- // = Prevent assignment and initialization.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Condition<MUTEX> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Condition (const ACE_Condition<MUTEX> &))
-};
-
-template <class MUTEX>
-class ACE_Thread_Condition : public ACE_Condition<MUTEX>
-{
- // = TITLE
- // ACE_Condition variable wrapper that works within processes.
- //
- // = DESCRIPTION
- // A condition variable enables threads to atomically block and
- // test the condition under the protection of a mutual exclu-
- // sion lock (mutex) until the condition is satisfied. That is,
- // the mutex must have been held by the thread before calling
- // wait or signal on the condition. If the condition is false,
- // a thread blocks on a condition variable and atomically
- // releases the mutex that is waiting for the condition to
- // change. If another thread changes the condition, it may wake
- // up waiting threads by signaling the associated condition
- // variable. The waiting threads, upon awakening, reacquire the
- // mutex and re-evaluate the condition.
-public:
- // = Initialization method.
- ACE_Thread_Condition (MUTEX &m, const ACE_TCHAR *name = 0, void *arg = 0);
-
- void dump (void) const;
- // Dump the state of an object.
-
- // ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#endif /* ACE_HAS_THREADS */
-
-#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
-
-class ACE_Export ACE_NULL_SYNCH
-{
- // = TITLE
- // Implement a do nothing Synchronization wrapper that
- // typedefs the <ACE_Condition> and <ACE_Mutex> to the Null* versions.
-public:
- typedef ACE_Null_Mutex MUTEX;
- typedef ACE_Null_Mutex NULL_MUTEX;
- typedef ACE_Null_Mutex PROCESS_MUTEX;
- typedef ACE_Null_Mutex RECURSIVE_MUTEX;
- typedef ACE_Null_Mutex RW_MUTEX;
- typedef ACE_Null_Condition CONDITION;
- typedef ACE_Null_Semaphore SEMAPHORE;
- typedef ACE_Null_Mutex NULL_SEMAPHORE;
-};
-
-#if defined (ACE_HAS_THREADS)
-
-class ACE_Export ACE_MT_SYNCH
-{
- // = TITLE
- // Implement a default thread safe synchronization wrapper that
- // typedefs the <ACE_Condition> and <ACE_Mutex> to the
- // <ACE_Condition> and <ACE_Mutex> versions. Note that this
- // should be a template, but SunC++ 4.0.1 complains about
- // this...
-public:
- typedef ACE_Thread_Mutex MUTEX;
- typedef ACE_Null_Mutex NULL_MUTEX;
- typedef ACE_Process_Mutex PROCESS_MUTEX;
- typedef ACE_Recursive_Thread_Mutex RECURSIVE_MUTEX;
- typedef ACE_RW_Thread_Mutex RW_MUTEX;
- typedef ACE_Condition_Thread_Mutex CONDITION;
- typedef ACE_Thread_Semaphore SEMAPHORE;
- typedef ACE_Null_Semaphore NULL_SEMAPHORE;
-};
-
-#endif /* ACE_HAS_THREADS */
-
-#define ACE_SYNCH_MUTEX ACE_SYNCH::MUTEX
-#define ACE_SYNCH_NULL_MUTEX ACE_SYNCH::NULL_MUTEX
-#define ACE_SYNCH_RECURSIVE_MUTEX ACE_SYNCH::RECURSIVE_MUTEX
-#define ACE_SYNCH_RW_MUTEX ACE_SYNCH::RW_MUTEX
-#define ACE_SYNCH_CONDITION ACE_SYNCH::CONDITION
-#define ACE_SYNCH_NULL_SEMAPHORE ACE_SYNCH::NULL_SEMAPHORE
-#define ACE_SYNCH_SEMAPHORE ACE_SYNCH::SEMAPHORE
-
-#else /* !ACE_HAS_TEMPLATE_TYPEDEFS */
-
-#if defined (ACE_HAS_OPTIMIZED_MESSAGE_QUEUE)
-#define ACE_NULL_SYNCH ACE_Null_Mutex, ACE_Null_Condition, ACE_Null_Mutex
-#define ACE_MT_SYNCH ACE_Thread_Mutex, ACE_Condition_Thread_Mutex, ACE_Thread_Semaphore
-#else
-#define ACE_NULL_SYNCH ACE_Null_Mutex, ACE_Null_Condition
-#define ACE_MT_SYNCH ACE_Thread_Mutex, ACE_Condition_Thread_Mutex
-#endif /* ACE_HAS_OPTIMIZED_MESSAGE_QUEUE */
-
-#if defined (ACE_HAS_THREADS)
-
-#define ACE_SYNCH_MUTEX ACE_Thread_Mutex
-#define ACE_SYNCH_NULL_MUTEX ACE_Null_Mutex
-#define ACE_SYNCH_RECURSIVE_MUTEX ACE_Recursive_Thread_Mutex
-#define ACE_SYNCH_RW_MUTEX ACE_RW_Thread_Mutex
-#define ACE_SYNCH_CONDITION ACE_Condition_Thread_Mutex
-#define ACE_SYNCH_SEMAPHORE ACE_Thread_Semaphore
-#define ACE_SYNCH_NULL_SEMAPHORE ACE_Null_Semaphore
-
-#else /* ACE_HAS_THREADS */
-
-#define ACE_SYNCH_MUTEX ACE_Null_Mutex
-#define ACE_SYNCH_NULL_MUTEX ACE_Null_Mutex
-#define ACE_SYNCH_RECURSIVE_MUTEX ACE_Null_Mutex
-#define ACE_SYNCH_RW_MUTEX ACE_Null_Mutex
-#define ACE_SYNCH_CONDITION ACE_Null_Condition
-#define ACE_SYNCH_SEMAPHORE ACE_Null_Semaphore
-#define ACE_SYNCH_NULL_SEMAPHORE ACE_Null_Mutex
-
-#endif /* ACE_HAS_THREADS */
-#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
-
-// These are available on *all* platforms
-#define ACE_SYNCH_PROCESS_SEMAPHORE ACE_Process_Semaphore
-#define ACE_SYNCH_PROCESS_MUTEX ACE_Process_Mutex
-
-#if defined (ACE_HAS_THREADS)
-#define ACE_SYNCH ACE_MT_SYNCH
-#else /* ACE_HAS_THREADS */
-#define ACE_SYNCH ACE_NULL_SYNCH
-#endif /* ACE_HAS_THREADS */
-
-#if defined (__ACE_INLINE__)
-#include "ace/Synch_T.i"
-// On non-Win32 platforms, this code will be inlined
-#if !defined (ACE_WIN32)
-#include "ace/Atomic_Op.i"
-#endif /* !ACE_WIN32 */
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Synch_T.cpp"
-// On Win32 platforms, this code will be included as template source
-// code and will not be inlined. Therefore, we first turn off
-// ACE_INLINE, set it to be nothing, include the code, and then turn
-// ACE_INLINE back to its original setting. All this nonsense is
-// necessary, since the generic template code that needs to be
-// specialized cannot be inlined, else the compiler will ignore the
-// specialization code. Also, the specialization code *must* be
-// inlined or the compiler will ignore the specializations.
-#if defined (ACE_WIN32)
-#undef ACE_INLINE
-#define ACE_INLINE
-#include "ace/Atomic_Op.i"
-#undef ACE_INLINE
-#if defined (__ACE_INLINE__)
-#define ACE_INLINE inline
-#else
-#define ACE_INLINE
-#endif /* __ACE_INLINE__ */
-#endif /* ACE_WIN32 */
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Synch_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_SYNCH_T_H */
diff --git a/ace/Synch_T.i b/ace/Synch_T.i
deleted file mode 100644
index e7c55c500e0..00000000000
--- a/ace/Synch_T.i
+++ /dev/null
@@ -1,414 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/Thread.h"
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Guard<ACE_LOCK>::acquire (void)
-{
- return this->owner_ = this->lock_->acquire ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Guard<ACE_LOCK>::tryacquire (void)
-{
- return this->owner_ = this->lock_->tryacquire ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Guard<ACE_LOCK>::release (void)
-{
- if (this->owner_ != -1)
- {
- this->owner_ = -1;
- return this->lock_->release ();
- }
- else
- return 0;
-}
-
-template <class ACE_LOCK> ACE_INLINE
-ACE_Guard<ACE_LOCK>::ACE_Guard (ACE_LOCK &l)
- : lock_ (&l),
- owner_ (0)
-{
- this->acquire ();
-}
-
-template <class ACE_LOCK> ACE_INLINE
-ACE_Guard<ACE_LOCK>::ACE_Guard (ACE_LOCK &l, int block)
- : lock_ (&l),
- owner_ (0)
-{
- if (block)
- this->acquire ();
- else
- this->tryacquire ();
-}
-
-// Implicitly and automatically acquire (or try to acquire) the
-// lock.
-
-template <class ACE_LOCK> ACE_INLINE
-ACE_Guard<ACE_LOCK>::~ACE_Guard (void)
-{
- this->release ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Guard<ACE_LOCK>::locked (void)
-{
- return this->owner_ != -1;
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Guard<ACE_LOCK>::remove (void)
-{
- return this->lock_->remove ();
-}
-
-template <class ACE_LOCK> ACE_INLINE
-ACE_Write_Guard<ACE_LOCK>::ACE_Write_Guard (ACE_LOCK &m)
- : ACE_Guard<ACE_LOCK> (&m)
-{
- this->acquire_write ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Write_Guard<ACE_LOCK>::acquire_write (void)
-{
- return this->owner_ = this->lock_->acquire_write ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Write_Guard<ACE_LOCK>::acquire (void)
-{
- return this->owner_ = this->lock_->acquire_write ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Write_Guard<ACE_LOCK>::tryacquire_write (void)
-{
- return this->owner_ = this->lock_->tryacquire_write ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Write_Guard<ACE_LOCK>::tryacquire (void)
-{
- return this->owner_ = this->lock_->tryacquire_write ();
-}
-
-template <class ACE_LOCK> ACE_INLINE
-ACE_Write_Guard<ACE_LOCK>::ACE_Write_Guard (ACE_LOCK &m,
- int block)
- : ACE_Guard<ACE_LOCK> (&m)
-{
- if (block)
- this->acquire_write ();
- else
- this->tryacquire_write ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Read_Guard<ACE_LOCK>::acquire_read (void)
-{
- return this->owner_ = this->lock_->acquire_read ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Read_Guard<ACE_LOCK>::acquire (void)
-{
- return this->owner_ = this->lock_->acquire_read ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Read_Guard<ACE_LOCK>::tryacquire_read (void)
-{
- return this->owner_ = this->lock_->tryacquire_read ();
-}
-
-template <class ACE_LOCK> ACE_INLINE int
-ACE_Read_Guard<ACE_LOCK>::tryacquire (void)
-{
- return this->owner_ = this->lock_->tryacquire_read ();
-}
-
-template <class ACE_LOCK> ACE_INLINE
-ACE_Read_Guard<ACE_LOCK>::ACE_Read_Guard (ACE_LOCK &m)
- : ACE_Guard<ACE_LOCK> (&m)
-{
- this->acquire_read ();
-}
-
-template <class ACE_LOCK> ACE_INLINE
-ACE_Read_Guard<ACE_LOCK>::ACE_Read_Guard (ACE_LOCK &m,
- int block)
- : ACE_Guard<ACE_LOCK> (&m)
-{
- if (block)
- this->acquire_read ();
- else
- this->tryacquire_read ();
-}
-
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::ACE_Lock_Adapter (ACE_LOCKING_MECHANISM &lock)
- : lock_ (&lock),
- delete_lock_ (0)
-{
-}
-
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::~ACE_Lock_Adapter (void)
-{
- if (this->delete_lock_)
- delete this->lock_;
-}
-
-// Explicitly destroy the lock.
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::remove (void)
-{
- return this->lock_->remove ();
-}
-
-// Block the thread until the lock is acquired.
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::acquire (void)
-{
- return this->lock_->acquire ();
-}
-
-// Conditionally acquire the lock (i.e., won't block).
-
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::tryacquire (void)
-{
- return this->lock_->tryacquire ();
-}
-
-// Release the lock.
-
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::release (void)
-{
- return this->lock_->release ();
-}
-
-// Block until the thread acquires a read lock. If the locking
-// mechanism doesn't support read locks then this just calls
-// <acquire>.
-
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::acquire_read (void)
-{
- return this->lock_->acquire_read ();
-}
-
-// Block until the thread acquires a write lock. If the locking
-// mechanism doesn't support read locks then this just calls
-// <acquire>.
-
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::acquire_write (void)
-{
- return this->lock_->acquire_write ();
-}
-
-// Conditionally acquire a read lock. If the locking mechanism
-// doesn't support read locks then this just calls <acquire>.
-
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::tryacquire_read (void)
-{
- return this->lock_->tryacquire_read ();
-}
-
-// Conditionally acquire a write lock. If the locking mechanism
-// doesn't support write locks then this just calls <acquire>.
-
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::tryacquire_write (void)
-{
- return this->lock_->tryacquire_write ();
-}
-
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE
-ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::ACE_Reverse_Lock (ACE_LOCKING_MECHANISM &lock)
- : lock_ (lock)
-{
-}
-
-// Explicitly destroy the lock.
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::remove (void)
-{
- return this->lock_.remove ();
-}
-
-// Release the lock.
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::acquire (void)
-{
- return this->lock_.release ();
-}
-
-// Release the lock.
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire (void)
-{
- return this->lock_.tryacquire ();
-}
-
-// Acquire the lock.
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::release (void)
-{
- return this->lock_.acquire ();
-}
-
-// Release the lock.
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::acquire_read (void)
-{
- return this->lock_.acquire_read ();
-}
-
-// Release the lock.
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::acquire_write (void)
-{
- return this->lock_.acquire_write ();
-}
-
-// Release the lock.
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire_read (void)
-{
- return this->lock_.tryacquire_read ();
-}
-
-// Release the lock.
-template <class ACE_LOCKING_MECHANISM> ACE_INLINE int
-ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire_write (void)
-{
- return this->lock_.tryacquire_write ();
-}
-
-#if defined (ACE_HAS_THREADS)
-
-template<class MUTEX> ACE_INLINE int
-ACE_Condition<MUTEX>::remove (void)
-{
- // ACE_TRACE ("ACE_Condition<MUTEX>::remove");
-
- // cond_destroy() is called in a loop if the condition variable is
- // BUSY. This avoids a condition where a condition is signaled and
- // because of some timing problem, the thread that is to be signaled
- // has called the cond_wait routine after the signal call. Since
- // the condition signal is not queued in any way, deadlock occurs.
-
- int result = 0;
-
-#if defined (CHORUS)
- // Are we the owner?
- if (this->process_cond_ && this->condname_)
- {
- // Only destroy the condition if we're the ones who initialized
- // it.
- while ((result = ACE_OS::cond_destroy (this->process_cond_)) == -1
- && errno == EBUSY)
- {
- ACE_OS::cond_broadcast (this->process_cond_);
- ACE_OS::thr_yield ();
- }
- ACE_OS::munmap (this->process_cond_,
- sizeof (ACE_cond_t));
- ACE_OS::shm_unlink (this->condname_);
- ACE_OS::free (ACE_static_cast (void *,
- ACE_const_cast (ACE_TCHAR *,
- this->condname_)));
- }
- else if (this->process_cond_)
- {
- ACE_OS::munmap (this->process_cond_,
- sizeof (ACE_cond_t));
- result = 0;
- }
- else
-#endif /* CHORUS */
-
- while ((result = ACE_OS::cond_destroy (&this->cond_)) == -1
- && errno == EBUSY)
- {
- ACE_OS::cond_broadcast (&this->cond_);
- ACE_OS::thr_yield ();
- }
-
- return result;
-}
-
-template<class MUTEX> ACE_INLINE MUTEX &
-ACE_Condition<MUTEX>::mutex (void)
-{
- // ACE_TRACE ("ACE_Condition<MUTEX>::mutex");
- return this->mutex_;
-}
-
-template <class MUTEX> ACE_INLINE int
-ACE_Condition<MUTEX>::signal (void)
-{
-// ACE_TRACE ("ACE_Condition<MUTEX>::signal");
-#if defined (CHORUS)
- if (this->process_cond_ != 0)
- return ACE_OS::cond_signal (this->process_cond_);
-#endif /* CHORUS */
- return ACE_OS::cond_signal (&this->cond_);
-}
-
-template <class MUTEX> ACE_INLINE int
-ACE_Condition<MUTEX>::broadcast (void)
-{
-// ACE_TRACE ("ACE_Condition<MUTEX>::broadcast");
-#if defined (CHORUS)
- if (this->process_cond_ != 0)
- return ACE_OS::cond_broadcast (this->process_cond_);
-#endif /* CHORUS */
- return ACE_OS::cond_broadcast (&this->cond_);
-}
-
-#endif /* ACE_HAS_THREADS */
-
-#if !(defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)))
-template <class TYPE> ACE_INLINE
-ACE_TSS<TYPE>::ACE_TSS (TYPE *type)
- : type_ (type)
-{
-}
-
-template <class TYPE> ACE_INLINE int
-ACE_TSS<TYPE>::ts_init (void) const
-{
- return 0;
-}
-
-template <class TYPE> ACE_INLINE TYPE *
-ACE_TSS<TYPE>::ts_object (void) const
-{
- return this->type_;
-}
-
-template <class TYPE> ACE_INLINE TYPE *
-ACE_TSS<TYPE>::ts_object (TYPE *type)
-{
- this->type_ = type;
- return this->type_;
-}
-
-template <class TYPE> ACE_INLINE TYPE *
-ACE_TSS<TYPE>::ts_get (void) const
-{
- return this->type_;
-}
-
-#endif /* ! (defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION))) */
diff --git a/ace/System_Time.cpp b/ace/System_Time.cpp
deleted file mode 100644
index 192fe6cdcfb..00000000000
--- a/ace/System_Time.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-// System_Time.cpp
-// $Id$
-
-#include "ace/System_Time.h"
-
-ACE_RCSID(ace, System_Time, "$Id$")
-
-ACE_System_Time::ACE_System_Time (const ACE_TCHAR *poolname)
- : delta_time_ (0)
-{
- ACE_TRACE ("ACE_System_Time::ACE_System_Time");
-
- // Only create a new unique filename for the memory pool file
- // if the user didn't supply one...
- if (poolname == 0)
- {
-#if defined (ACE_DEFAULT_BACKING_STORE)
- // Create a temporary file.
- ACE_OS::strcpy (this->poolname_,
- ACE_DEFAULT_BACKING_STORE);
-#else /* ACE_DEFAULT_BACKING_STORE */
- if (ACE::get_temp_dir (this->poolname_,
- MAXPATHLEN - 17) == -1) // -17 for ace-malloc-XXXXXX
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Temporary path too long, ")
- ACE_TEXT ("defaulting to current directory\n")));
- this->poolname_[0] = 0;
- }
-
- // Add the filename to the end
- ACE_OS::strcat (this->poolname_, ACE_TEXT ("ace-malloc-XXXXXX"));
-
-#endif /* ACE_DEFAULT_BACKING_STORE */
- }
- else
- ACE_OS::strncpy (this->poolname_,
- poolname,
- (sizeof this->poolname_ / sizeof (ACE_TCHAR)));
-
-
- ACE_NEW (this->shmem_,
- ALLOCATOR (this->poolname_));
-}
-
-ACE_System_Time::~ACE_System_Time (void)
-{
- ACE_TRACE ("ACE_System_Time::~ACE_System_Time");
- delete this->shmem_;
-}
-
-// Get the local system time.
-
-int
-ACE_System_Time::get_local_system_time (ACE_UINT32 &time_out)
-{
- ACE_TRACE ("ACE_System_Time::get_local_system_time");
- time_out = ACE_OS::time (0);
- return 0;
-}
-
-int
-ACE_System_Time::get_local_system_time (ACE_Time_Value &time_out)
-{
- ACE_TRACE ("ACE_System_Time::get_local_system_time");
- time_out.sec (ACE_OS::time (0));
- return 0;
-}
-
-// Get the system time of the central time server.
-
-int
-ACE_System_Time::get_master_system_time (ACE_UINT32 &time_out)
-{
- ACE_TRACE ("ACE_System_Time::get_master_system_time");
-
- if (this->delta_time_ == 0)
- {
- // Try to find it
- void * temp;
- if (this->shmem_->find (ACE_DEFAULT_TIME_SERVER_STR, temp) == -1)
- {
- // No time entry in shared memory (meaning no Clerk exists)
- // so return the local time of the host.
- return this->get_local_system_time (time_out);
- }
- else
- // Extract the delta time.
- this->delta_time_ = (long *) temp;
- }
-
- ACE_UINT32 local_time;
-
- // If delta_time is positive, it means that the system clock is
- // ahead of our local clock so add delta to the local time to get an
- // approximation of the system time. Else if delta time is negative,
- // it means that our local clock is ahead of the system clock, so
- // return the last local time stored (to avoid time conflicts).
- if (*this->delta_time_ >=0 )
- {
- this->get_local_system_time (local_time);
- time_out = local_time + (ACE_UINT32) *this->delta_time_;
- }
- else
- // Return the last local time. Note that this is stored as the
- // second field in shared memory.
- time_out = *(this->delta_time_ + 1);
- return 0;
-}
-
-int
-ACE_System_Time::get_master_system_time (ACE_Time_Value &time_out)
-{
- ACE_TRACE ("ACE_System_Time::get_master_system_time");
- ACE_UINT32 to;
- if (this->get_master_system_time (to) == -1)
- return -1;
- time_out.sec (to);
- return 0;
-}
-
-// Synchronize local system time with the central time server using
-// specified mode (currently unimplemented).
-
-int
-ACE_System_Time::sync_local_system_time (ACE_System_Time::Sync_Mode)
-{
- ACE_TRACE ("ACE_System_Time::sync_local_system_time");
- ACE_NOTSUP_RETURN (-1);
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex, ACE_Control_Block>;
-template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>;
-template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> >;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex, ACE_Control_Block>
-#pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>
-#pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> >
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
diff --git a/ace/System_Time.h b/ace/System_Time.h
deleted file mode 100644
index ca3afa1a7a7..00000000000
--- a/ace/System_Time.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// System_Time.h
-//
-// = AUTHOR
-// Prashant Jain, Tim H. Harrison and Douglas C. Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_SYSTEM_TIME_H
-#define ACE_SYSTEM_TIME_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Memory_Pool.h"
-#include "ace/Malloc_T.h"
-
-class ACE_Export ACE_System_Time
-{
- // = TITLE
- // Defines the timer services of the OS interface to access the
- // system time either on the local host or on the central time
- // server in the network.
-public:
- enum Sync_Mode { Jump, Adjust };
- // enumeration types to specify mode of synchronization with master
- // clock. Jump will set local system time directly (thus possibly
- // producing time gaps or ambiguous local system times. Adjust will
- // smoothly slow down or speed up the local system clock to reach
- // the system time of the master clock.
-
- ACE_System_Time (const ACE_TCHAR *poolname = 0);
- // Default constructor.
-
- ~ACE_System_Time (void);
- // Default destructor.
-
- static int get_local_system_time (ACE_UINT32 &time_out);
- // Get the local system time, i.e., the value returned by
- // <ACE_OS::time>.
-
- static int get_local_system_time (ACE_Time_Value &time_out);
- // Get the local system time, i.e., the value returned by
- // <ACE_OS::time>.
-
- int get_master_system_time (ACE_UINT32 &time_out);
- // Get the system time of the central time server.
-
- int get_master_system_time (ACE_Time_Value &time_out);
- // Get the system time of the central time server.
-
- int sync_local_system_time (ACE_System_Time::Sync_Mode mode);
- // synchronize local system time with the central time server using
- // specified mode.
-
-private:
- typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> MALLOC;
- typedef ACE_Allocator_Adapter<MALLOC> ALLOCATOR;
-
- ALLOCATOR *shmem_;
- // Our allocator (used for obtaining system time from shared memory).
-
- ACE_TCHAR poolname_[MAXPATHLEN + 1];
- // The name of the pool used by the allocator.
-
- long *delta_time_;
- // Pointer to delta time kept in shared memory.
-};
-
-#include "ace/post.h"
-#endif /* ACE_SYSTEM_TIME_H */
diff --git a/ace/TLI.cpp b/ace/TLI.cpp
deleted file mode 100644
index 4441ef666ca..00000000000
--- a/ace/TLI.cpp
+++ /dev/null
@@ -1,189 +0,0 @@
-// $Id$
-
-// Defines the member functions for the base class of the ACE_TLI
-// abstraction.
-
-#include "ace/TLI.h"
-
-ACE_RCSID(ace, TLI, "$Id$")
-
-#if defined (ACE_HAS_TLI)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_TLI)
-
-void
-ACE_TLI::dump (void) const
-{
- ACE_TRACE ("ACE_TLI::dump");
-}
-
-ACE_TLI::ACE_TLI (void)
-{
- ACE_TRACE ("ACE_TLI::ACE_TLI");
-#if defined (ACE_HAS_SVR4_TLI)
-// Solaris 2.4 ACE_TLI option handling is broken. Thus, we must do
-// the memory allocation ourselves... Thanks to John P. Hearn
-// (jph@ccrl.nj.nec.com) for the help.
-
- this->so_opt_req.opt.maxlen = sizeof (opthdr) + sizeof (long);
- ACE_NEW (this->so_opt_req.opt.buf,
- char[this->so_opt_req.opt.maxlen]);
-
- this->so_opt_ret.opt.maxlen = sizeof (opthdr) + sizeof (long);
- this->so_opt_ret.opt.buf = new char[this->so_opt_ret.opt.maxlen];
-
- if (this->so_opt_ret.opt.buf == 0)
- {
- delete [] this->so_opt_req.opt.buf;
- this->so_opt_req.opt.buf = 0;
- return;
- }
-#endif /* ACE_HAS_SVR4_TLI */
-}
-
-ACE_HANDLE
-ACE_TLI::open (const char device[], int oflag, struct t_info *info)
-{
- ACE_TRACE ("ACE_TLI::open");
- if (oflag == 0)
- oflag = O_RDWR;
- this->set_handle (ACE_OS::t_open ((char *) device, oflag, info));
-
- return this->get_handle ();
-}
-
-ACE_TLI::~ACE_TLI (void)
-{
- ACE_TRACE ("ACE_TLI::~ACE_TLI");
-#if defined (ACE_HAS_SVR4_TLI)
- if (this->so_opt_req.opt.buf)
- {
- delete [] this->so_opt_req.opt.buf;
- delete [] this->so_opt_ret.opt.buf;
- this->so_opt_req.opt.buf = 0;
- this->so_opt_ret.opt.buf = 0;
- }
-#endif /* ACE_HAS_SVR4_TLI */
-}
-
-ACE_TLI::ACE_TLI (const char device[], int oflag, struct t_info *info)
-{
- ACE_TRACE ("ACE_TLI::ACE_TLI");
- if (this->open (device, oflag, info) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_TLI::ACE_TLI")));
-}
-
-int
-ACE_TLI::get_local_addr (ACE_Addr &sa) const
-{
- ACE_TRACE ("ACE_TLI::get_local_addr");
-#if defined (ACE_HAS_SVR4_TLI)
- struct netbuf name;
-
- name.maxlen = sa.get_size ();
- name.buf = (char *) sa.get_addr ();
-
- if (ACE_OS::ioctl (this->get_handle (), TI_GETMYNAME, &name) == -1)
-/* if (ACE_OS::t_getname (this->get_handle (), &name, LOCALNAME) == -1) */
- return -1;
- else
- return 0;
-#else /* SunOS4 */
- ACE_UNUSED_ARG (sa);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SVR4_TLI */
-}
-
-int
-ACE_TLI::close (void)
-{
- ACE_TRACE ("ACE_TLI::close");
- ACE_HANDLE result = 0;
-
- if (this->get_handle () != ACE_INVALID_HANDLE)
- {
- result = ACE_OS::t_close (this->get_handle ());
- this->set_handle (ACE_INVALID_HANDLE);
- }
- return result;
-}
-
-int
-ACE_TLI::set_option (int level, int option, void *optval, int optlen)
-{
- ACE_TRACE ("ACE_TLI::set_option");
-#if defined (ACE_HAS_SVR4_TLI)
- /* Set up options for ACE_TLI */
-
- struct opthdr *opthdr = 0; /* See <sys/socket.h> for details on this format */
-
- this->so_opt_req.flags = T_NEGOTIATE;
- this->so_opt_req.opt.len = sizeof *opthdr + OPTLEN (optlen);
-
- if (this->so_opt_req.opt.len > this->so_opt_req.opt.maxlen)
- {
-#if !defined (ACE_HAS_SET_T_ERRNO)
- t_errno = TBUFOVFLW;
-#else
- set_t_errno (TBUFOVFLW);
-#endif /* ACE_HAS_SET_T_ERRNO */
- return -1;
- }
-
- opthdr = (struct opthdr *) this->so_opt_req.opt.buf;
- opthdr->level = level;
- opthdr->name = option;
- opthdr->len = OPTLEN (optlen);
- ACE_OS::memcpy (OPTVAL (opthdr), optval, optlen);
-
- return ACE_OS::t_optmgmt (this->get_handle (), &this->so_opt_req, &this->so_opt_ret);
-#else
- ACE_UNUSED_ARG (level);
- ACE_UNUSED_ARG (option);
- ACE_UNUSED_ARG (optval);
- ACE_UNUSED_ARG (optlen);
- return -1;
-#endif /* ACE_HAS_SVR4_TLI */
-}
-
-int
-ACE_TLI::get_option (int level, int option, void *optval, int &optlen)
-{
- ACE_TRACE ("ACE_TLI::get_option");
-#if defined (ACE_HAS_SVR4_TLI)
- struct opthdr *opthdr = 0; /* See <sys/socket.h> for details on this format */
-
- this->so_opt_req.flags = T_CHECK;
- this->so_opt_ret.opt.len = sizeof *opthdr + OPTLEN (optlen);
-
- if (this->so_opt_ret.opt.len > this->so_opt_ret.opt.maxlen)
- {
-#if !defined (ACE_HAS_SET_T_ERRNO)
- t_errno = TBUFOVFLW;
-#else
- set_t_errno (TBUFOVFLW);
-#endif /* ACE_HAS_SET_T_ERRNO */
- return -1;
- }
-
- opthdr = (struct opthdr *) this->so_opt_req.opt.buf;
- opthdr->level = level;
- opthdr->name = option;
- opthdr->len = OPTLEN (optlen);
- if (ACE_OS::t_optmgmt (this->get_handle (), &this->so_opt_req, &this->so_opt_ret) == -1)
- return -1;
- else
- {
- ACE_OS::memcpy (optval, OPTVAL (opthdr), optlen);
- return 0;
- }
-#else
- ACE_UNUSED_ARG (level);
- ACE_UNUSED_ARG (option);
- ACE_UNUSED_ARG (optval);
- ACE_UNUSED_ARG (optlen);
- return -1;
-#endif /* ACE_HAS_SVR4_TLI */
-}
-
-#endif /* ACE_HAS_TLI */
diff --git a/ace/TLI.h b/ace/TLI.h
deleted file mode 100644
index 852804bd594..00000000000
--- a/ace/TLI.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// TLI.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TLI_H
-#define ACE_TLI_H
-#include "ace/pre.h"
-
-#include "ace/IPC_SAP.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Addr.h"
-
-#if defined (ACE_HAS_TLI)
-
-// There's not a universal device name for TLI devices. If the platform
-// needs something other than /dev/tcp, it needs to be set up in the config.h
-// file as ACE_TLI_TCP_DEVICE.
-#ifndef ACE_TLI_TCP_DEVICE
-#define ACE_TLI_TCP_DEVICE "/dev/tcp"
-#endif
-
-// There's not a universal device name for XTI/ATM devices. If the platform
-// needs something other than /dev/xtisvc0, it needs to be set up in the
-// config.h file as ACE_XTI_ATM_DEVICE. This may be FORE vendor specific and
-// there may be no good default.
-#ifndef ACE_XTI_ATM_DEVICE
-#define ACE_XTI_ATM_DEVICE "/dev/xtisvc0"
-#endif
-
-class ACE_Export ACE_TLI : public ACE_IPC_SAP
-{
- // = TITLE
- // Defines the member functions for the base class of the
- // ACE_TLI abstraction.
-public:
- // = Initialization and termination methods.
- ACE_HANDLE open (const char device[],
- int oflag = O_RDWR,
- struct t_info *info = 0);
- // Initialize a TLI endpoint.
-
- int close (void);
- // Close a TLI endpoint and release resources.
-
- int set_option (int level, int option, void *optval, int optlen);
- // Set underlying protocol options.
-
- int get_option (int level, int option, void *optval, int &optlen);
- // Get underlying protocol options.
-
- // = Calls to underlying TLI operations.
- int look (void) const;
- int rcvdis (struct t_discon * = 0) const;
- int snddis (struct t_call * = 0) const;
- int sndrel (void) const;
- int rcvrel (void) const;
-
- int get_local_addr (ACE_Addr &) const;
- // Return our local endpoint address.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Ensure we are an abstract class.
- ACE_TLI (void);
- // Default constructor.
- ~ACE_TLI (void);
- // Destructor.
-
- ACE_TLI (const char device[], int oflag = O_RDWR, struct t_info *info = 0);
- // Initialize a TLI endpoint.
-
-private:
-#if defined (ACE_HAS_SVR4_TLI)
- // Insane TLI option management.
- struct t_optmgmt so_opt_req;
- struct t_optmgmt so_opt_ret;
-#endif /* ACE_HAS_SVR4_TLI */
-};
-
-#include "ace/TLI.i"
-
-#endif /* ACE_HAS_TLI */
-#include "ace/post.h"
-#endif /* ACE_TLI_H */
diff --git a/ace/TLI.i b/ace/TLI.i
deleted file mode 100644
index 349f9d1fc74..00000000000
--- a/ace/TLI.i
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// TLI.i
-
-#include "ace/TLI.h"
-
-inline int
-ACE_TLI::look (void) const
-{
- ACE_TRACE ("ACE_TLI::look");
- return ACE_OS::t_look (this->get_handle ());
-}
-
-inline int
-ACE_TLI::rcvdis (struct t_discon *discon) const
-{
- ACE_TRACE ("ACE_TLI::rcvdis");
- return ACE_OS::t_rcvdis (this->get_handle (), discon);
-}
-
-inline int
-ACE_TLI::snddis (struct t_call *call) const
-{
- ACE_TRACE ("ACE_TLI::snddis");
- return ACE_OS::t_snddis (this->get_handle (), call);
-}
-
-inline int
-ACE_TLI::rcvrel (void) const
-{
- ACE_TRACE ("ACE_TLI::rcvrel");
- return ACE_OS::t_rcvrel (this->get_handle ());
-}
-
-inline int
-ACE_TLI::sndrel (void) const
-{
- ACE_TRACE ("ACE_TLI::sndrel");
- return ACE_OS::t_sndrel (this->get_handle ());
-}
diff --git a/ace/TLI_Acceptor.cpp b/ace/TLI_Acceptor.cpp
deleted file mode 100644
index 92dd0c930ea..00000000000
--- a/ace/TLI_Acceptor.cpp
+++ /dev/null
@@ -1,522 +0,0 @@
-// $Id$
-
-#include "ace/TLI_Acceptor.h"
-
-ACE_RCSID(ace, TLI_Acceptor, "$Id$")
-
-#if defined (ACE_HAS_TLI)
-
-// Put the actual definitions of the ACE_TLI_Request and
-// ACE_TLI_Request_Queue classes here to hide them from clients...
-
-struct ACE_TLI_Request
-{
- struct t_call *callp_;
- ACE_HANDLE handle_;
- ACE_TLI_Request *next_;
-};
-
-class ACE_TLI_Request_Queue
-{
-public:
- ACE_TLI_Request_Queue (void);
-
- int open (int fd, int size);
- int close (void);
-
- int enqueue (const char device[], int restart, int rwflag);
- int dequeue (ACE_TLI_Request *&ptr);
- int remove (int sequence_number);
-
- int is_empty (void) const;
- int is_full (void) const;
-
- ACE_TLI_Request *alloc (void);
- void free (ACE_TLI_Request *node);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int handle_;
- int size_;
- int current_count_;
- ACE_TLI_Request *base_;
- ACE_TLI_Request *tail_;
- ACE_TLI_Request *free_list_;
-};
-
-ACE_ALLOC_HOOK_DEFINE(ACE_TLI_Request_Queue)
-
-void
-ACE_TLI_Request_Queue::dump (void) const
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::dump");
-}
-
-int
-ACE_TLI_Request_Queue::is_empty (void) const
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::is_empty");
- return this->current_count_ == 0;
-}
-
-int
-ACE_TLI_Request_Queue::is_full (void) const
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::is_full");
- return this->current_count_ + 1 == this->size_; // Add 1 for the dummy.
-}
-
-// Add a node to the free list stack.
-
-void
-ACE_TLI_Request_Queue::free (ACE_TLI_Request *node)
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::free");
- node->next_ = this->free_list_;
- this->free_list_ = node;
-}
-
-// Remove a node from the free list stack.
-
-ACE_TLI_Request *
-ACE_TLI_Request_Queue::alloc (void)
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::alloc");
- ACE_TLI_Request *temp = this->free_list_;
- this->free_list_ = this->free_list_->next_;
- return temp;
-}
-
-ACE_ALLOC_HOOK_DEFINE(ACE_TLI_Acceptor)
-
-void
-ACE_TLI_Acceptor::dump (void) const
-{
- ACE_TRACE ("ACE_TLI_Acceptor::dump");
-}
-
-ACE_TLI_Acceptor::ACE_TLI_Acceptor (void)
- : queue_ (0)
-{
- ACE_TRACE ("ACE_TLI_Acceptor::ACE_TLI_Acceptor");
-}
-
-int
-ACE_TLI_Request_Queue::dequeue (ACE_TLI_Request *&ptr)
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::dequeue");
- ptr = this->tail_->next_;
- this->tail_->next_ = ptr->next_;
- this->current_count_--;
- return 0;
-}
-
-// This is hideous...
-
-static ACE_HANDLE
-open_new_endpoint (ACE_HANDLE listen_handle,
- const char dev[],
- struct t_call *callp,
- int rwf)
-{
- ACE_TRACE ("open_new_endpoint");
-#if defined (ACE_PSOS)
- ACE_HANDLE fd = ACE_OS::t_open ((char *) dev,
- S_IRUSR | S_IWUSR,
- 0);
-#else
- ACE_HANDLE fd = ACE_OS::t_open ((char *) dev,
- O_RDWR,
- 0);
-#endif /* ACE_PSOS */
-
- if (fd == ACE_INVALID_HANDLE
- || ACE_OS::t_bind (fd, 0, 0) == ACE_INVALID_HANDLE)
- fd = ACE_INVALID_HANDLE;
-#if defined (I_PUSH) && !defined (ACE_HAS_FORE_ATM_XTI)
- else if (rwf != 0 && ACE_OS::ioctl (fd,
- I_PUSH,
- ACE_const_cast (char *, "tirdwr"))
- == ACE_INVALID_HANDLE)
- fd = ACE_INVALID_HANDLE;
-#endif /* I_PUSH */
-
- if (fd == ACE_INVALID_HANDLE)
- ACE_OS::t_snddis (listen_handle,
- callp);
- return fd;
-}
-
-// Close down the acceptor and release resources.
-
-int
-ACE_TLI_Request_Queue::close (void)
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::close");
- int res = 0;
-
- for (int i = 0; i < this->size_; i++)
- {
- ACE_TLI_Request &item = this->base_[i];
-
- item.handle_ = ACE_INVALID_HANDLE;
- if (ACE_OS::t_free ((char *) item.callp_,
- T_CALL) != 0)
- res = ACE_INVALID_HANDLE;
- }
-
- delete [] this->base_;
- this->base_ = 0;
- return res;
-}
-
-ACE_HANDLE
-ACE_TLI_Request_Queue::open (ACE_HANDLE f, int sz)
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::open");
- this->handle_ = f;
- this->size_ = sz + 1; // Add one more for the dummy node.
-
- ACE_NEW_RETURN (this->base_,
- ACE_TLI_Request[this->size_],
- ACE_INVALID_HANDLE);
-
- // Initialize the ACE_Queue and the free list.
-
- for (int i = 0; i < this->size_; i++)
- {
- ACE_TLI_Request *item = &this->base_[i];
- this->free (item);
-
- item->handle_ = ACE_INVALID_HANDLE;
- item->callp_ = (t_call *) ACE_OS::t_alloc (this->handle_,
- T_CALL,
- T_ALL);
- if (item->callp_ == 0)
- return ACE_INVALID_HANDLE;
- }
-
- this->tail_ = this->alloc ();
- this->tail_->next_ = this->tail_;
- return 0;
-}
-
-ACE_TLI_Request_Queue::ACE_TLI_Request_Queue (void)
- : size_ (0),
- current_count_ (0),
- base_ (0),
- tail_ (0),
- free_list_ (0)
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::ACE_TLI_Request_Queue");
-}
-
-// Listen for a new connection request and allocate appropriate data
-// structures when one arrives.
-
-int
-ACE_TLI_Request_Queue::enqueue (const char device[],
- int restart, int rwflag)
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::enqueue");
- ACE_TLI_Request *temp = this->alloc ();
- ACE_TLI_Request &req = *this->tail_;
- int res;
-
- do
- res = ACE_OS::t_listen (this->handle_, req.callp_);
- while (res == ACE_INVALID_HANDLE
- && restart
- && t_errno == TSYSERR
- && errno == EINTR);
-
- if (res != ACE_INVALID_HANDLE)
- {
- req.handle_ = open_new_endpoint (this->handle_,
- device,
- req.callp_,
- rwflag);
- if (req.handle_ != ACE_INVALID_HANDLE)
- {
- temp->next_ = this->tail_->next_;
- this->tail_->next_ = temp;
- this->tail_ = temp;
- this->current_count_++;
- return 0;
- }
- }
-
- // Something must have gone wrong, so free up allocated space.
- this->free (temp);
- return ACE_INVALID_HANDLE;
-}
-
-// Locate and remove SEQUENCE_NUMBER from the list of pending
-// connections.
-
-int
-ACE_TLI_Request_Queue::remove (int sequence_number)
-{
- ACE_TRACE ("ACE_TLI_Request_Queue::remove");
- ACE_TLI_Request *prev = this->tail_;
-
- // Put the sequence # in the dummy node to simply the search...
- prev->callp_->sequence = sequence_number;
-
- ACE_TLI_Request *temp;
-
- for (temp = this->tail_->next_;
- temp->callp_->sequence != sequence_number;
- temp = temp->next_)
- prev = temp;
-
- if (temp == this->tail_)
- // Sequence # was not found, since we're back at the dummy node!
- return -1;
- else
- {
- prev->next_ = temp->next_;
- ACE_OS::t_close (temp->handle_);
- this->current_count_--;
- this->free (temp);
- return 0;
- }
-}
-
-ACE_HANDLE
-ACE_TLI_Acceptor::open (const ACE_Addr &remote_sap,
- int reuse_addr,
- int oflag,
- struct t_info *info,
- int qlen,
- const char dev[])
-{
- ACE_TRACE ("ACE_TLI_Acceptor::open");
- int res = 0;
- int one = 1;
-
- this->disp_ = 0;
-
- ACE_ALLOCATOR_RETURN (this->device_,
- ACE_OS::strdup (dev),
- ACE_INVALID_HANDLE);
- if (this->ACE_TLI::open (dev,
- oflag,
- info) == ACE_INVALID_HANDLE)
- res = ACE_INVALID_HANDLE;
-#if !defined (ACE_HAS_FORE_ATM_XTI)
- // Reusing the address causes problems with FORE's API. The issue
- // may be that t_optmgmt isn't fully supported by FORE. t_errno is
- // TBADOPT after the t_optmgmt call so maybe options are configured
- // differently for XTI than for TLI (at least for FORE's
- // implementation - XTI is supposed to be a superset of TLI).
- else if (reuse_addr
- && this->set_option (SOL_SOCKET,
- SO_REUSEADDR,
- &one,
- sizeof one) == ACE_INVALID_HANDLE)
- res = ACE_INVALID_HANDLE;
-#endif /* ACE_HAS_FORE_ATM_XTI */
- else if ((this->disp_ =
- (struct t_discon *) ACE_OS::t_alloc (this->get_handle (),
- T_DIS,
- T_ALL)) == 0)
- res = ACE_INVALID_HANDLE;
- else
- {
- struct t_bind req;
-
-#if defined (ACE_HAS_FORE_ATM_XTI)
- // Not sure why but FORE's t_bind call won't work if t_bind.qlen
- // != 1 Adjust the backlog accordingly.
- this->backlog_ = 1;
- req.qlen = 1;
-#else
- this->backlog_ = qlen;
- req.qlen = qlen;
-#endif /* ACE_HAS_FORE_ATM_XTI */
- req.addr.maxlen = remote_sap.get_size ();
-
- if (remote_sap == ACE_Addr::sap_any)
- // Note that if addr.len == 0 then ACE_TLI selects the port
- // number.
- req.addr.len = 0;
- else
- {
- req.addr.len = remote_sap.get_size ();
- req.addr.buf = (char *) remote_sap.get_addr ();
- }
-
- res = ACE_OS::t_bind (this->get_handle (),
- &req,
- 0);
- if (res != ACE_INVALID_HANDLE)
- {
- ACE_NEW_RETURN (this->queue_,
- ACE_TLI_Request_Queue,
- -1);
- res = this->queue_->open (this->get_handle (),
- this->backlog_);
- }
- }
- if (res == ACE_INVALID_HANDLE)
- this->close ();
- return this->get_handle ();
-}
-
-ACE_TLI_Acceptor::ACE_TLI_Acceptor (const ACE_Addr &remote_sap,
- int reuse_addr,
- int oflag,
- struct t_info *info,
- int back,
- const char dev[])
-{
- ACE_TRACE ("ACE_TLI_Acceptor::ACE_TLI_Acceptor");
- if (this->open (remote_sap,
- reuse_addr,
- oflag,
- info,
- back,
- dev) == ACE_INVALID_HANDLE)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_TLI_Acceptor::ACE_TLI_Acceptor")));
-}
-
-int
-ACE_TLI_Acceptor::close (void)
-{
- ACE_TRACE ("ACE_TLI_Acceptor::close");
- if (this->device_ != 0)
- {
- if (this->queue_ != 0)
- {
- this->queue_->close ();
- delete this->queue_;
- }
-
- ACE_OS::t_free ((char *) this->disp_, T_DIS);
- ACE_OS::free (ACE_MALLOC_T (this->device_));
- this->disp_ = 0;
- this->device_ = 0;
- return this->ACE_TLI::close ();
- }
- return 0;
-}
-
-// Perform the logic required to handle the arrival of asynchronous
-// events while we are trying to accept a new connection request.
-
-int
-ACE_TLI_Acceptor::handle_async_event (int restart, int rwf)
-{
- ACE_TRACE ("ACE_TLI_Acceptor::handle_async_event");
- int event = this->look ();
-
- switch (event)
- {
- case T_DISCONNECT:
- this->rcvdis (this->disp_);
- this->queue_->remove (this->disp_->sequence);
- break;
- case T_LISTEN:
- this->queue_->enqueue (this->device_,
- restart,
- rwf);
- break;
- default:
- return -1;
- }
- return 0;
-}
-
-int
-ACE_TLI_Acceptor::accept (ACE_TLI_Stream &new_tli_sap,
- ACE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle,
- int rwf,
- netbuf *udata,
- netbuf *opt)
-{
- ACE_TRACE ("ACE_TLI_Acceptor::accept");
- ACE_UNUSED_ARG (reset_new_handle);
-
- ACE_TLI_Request *req = 0;
- int res = 0;
-
- if (timeout != 0
- && ACE::handle_timed_accept (this->get_handle (),
- timeout,
- restart) == -1)
- return -1;
- else if (this->queue_->is_empty ())
- {
- req = this->queue_->alloc ();
-
- do
- res = ACE_OS::t_listen (this->get_handle (),
- req->callp_);
- while (res == ACE_INVALID_HANDLE
- && restart
- && errno == EINTR);
-
- if (res != ACE_INVALID_HANDLE)
- res = req->handle_ = open_new_endpoint (this->get_handle (),
- this->device_,
- req->callp_,
- rwf);
- }
- else
- res = this->queue_->dequeue (req);
-
- if (udata != 0)
- ACE_OS::memcpy ((void *) &req->callp_->udata,
- (void *) udata,
- sizeof *udata);
- if (opt != 0)
- ACE_OS::memcpy ((void *) &req->callp_->opt,
- (void *) opt,
- sizeof *opt);
-
- while (res != ACE_INVALID_HANDLE)
- if ((res = ACE_OS::t_accept (this->get_handle (),
- req->handle_,
- req->callp_)) != ACE_INVALID_HANDLE)
- break; // Got one!
- else if (t_errno == TLOOK)
- res = this->handle_async_event (restart, rwf);
- else if (restart && t_errno == TSYSERR && errno == EINTR)
- res = 0;
-
- if (res == ACE_INVALID_HANDLE)
- {
- if (errno != EWOULDBLOCK)
- {
- new_tli_sap.set_handle (ACE_INVALID_HANDLE);
- if (req->handle_ != ACE_INVALID_HANDLE)
- ACE_OS::t_close (req->handle_);
- }
- }
- else
- {
- new_tli_sap.set_handle (req->handle_);
-
- if (remote_addr != 0)
- remote_addr->set_addr ((void *) req->callp_->addr.buf,
- req->callp_->addr.len);
- }
-
- req->handle_ = ACE_INVALID_HANDLE;
- this->queue_->free (req);
- new_tli_sap.set_rwflag (rwf);
- return new_tli_sap.get_handle () == ACE_INVALID_HANDLE ? -1 : 0;
-}
-
-#endif /* ACE_HAS_TLI */
diff --git a/ace/TLI_Acceptor.h b/ace/TLI_Acceptor.h
deleted file mode 100644
index 83dbec0f3b7..00000000000
--- a/ace/TLI_Acceptor.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// TLI_Acceptor.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TLI_ACCEPTOR_H
-#define ACE_TLI_ACCEPTOR_H
-#include "ace/pre.h"
-
-#include "ace/TLI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Time_Value.h"
-#include "ace/TLI_Stream.h"
-
-#if defined (ACE_HAS_TLI)
-
-// Forward reference...
-class ACE_TLI_Request_Queue;
-
-class ACE_Export ACE_TLI_Acceptor : public ACE_TLI
-{
- // = TITLE
- // Defines the member functions for ACE_TLI_Acceptor abstraction.
- //
- // = DESCRIPTION
- // This class implements the algorithm described in Steve Rago's
- // book on System V UNIX network programming. It basically
- // makes TLI look like the C++ SOCK_SAP socket wrappers with
- // respect to establishing passive-mode listener endpoints.
-public:
- friend class ACE_Request_Queue;
-
- // = Initialization and termination methods.
- ACE_TLI_Acceptor (void);
- // Default constructor.
-
- ACE_TLI_Acceptor (const ACE_Addr &remote_sap,
- int reuse_addr = 0,
- int oflag = O_RDWR,
- struct t_info *info = 0,
- int backlog = ACE_DEFAULT_BACKLOG,
- const char device[] = ACE_TLI_TCP_DEVICE);
- // Initiate a passive mode socket.
-
- ACE_HANDLE open (const ACE_Addr &remote_sap,
- int reuse_addr = 0,
- int oflag = O_RDWR,
- struct t_info *info = 0,
- int backlog = ACE_DEFAULT_BACKLOG,
- const char device[] = ACE_TLI_TCP_DEVICE);
- // Initiate a passive mode socket.
-
- int close (void);
- // Close down the acceptor and release resources.
-
- // = Passive connection acceptance method.
-
- int accept (ACE_TLI_Stream &new_tli_sap,
- ACE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0,
- int rwflag = 1,
- netbuf *udata = 0,
- netbuf *opt = 0);
- // Accept a new data transfer connection. A <timeout> of 0 means
- // block forever, a <timeout> of {0, 0} means poll. <restart> == 1
- // means "restart if interrupted."
-
- // = Meta-type info
- typedef ACE_INET_Addr PEER_ADDR;
- typedef ACE_TLI_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- const char *device_;
- // Network "device" we are using.
-
- int backlog_;
- // Number of connections to queue.
-
- int rwflag_;
- // Are we using "tirdwr" mod?
-
- int handle_async_event (int restart, int rwflag);
- // Handle TLI accept insanity...
-
- ACE_TLI_Request_Queue *queue_;
- // Used for queueing up pending requests.
-
- struct t_discon *disp_;
- // Used for handling disconnects
-};
-
-#endif /* ACE_HAS_TLI */
-#include "ace/post.h"
-#endif /* ACE_TLI_ACCEPTOR_H */
diff --git a/ace/TLI_Connector.cpp b/ace/TLI_Connector.cpp
deleted file mode 100644
index 8cd144a5a16..00000000000
--- a/ace/TLI_Connector.cpp
+++ /dev/null
@@ -1,232 +0,0 @@
-// TLI_Connector.cpp
-// $Id$
-
-#include "ace/Handle_Set.h"
-#include "ace/TLI_Connector.h"
-
-ACE_RCSID(ace, TLI_Connector, "$Id$")
-
-#if defined (ACE_HAS_TLI)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_TLI_Connector)
-
-void
-ACE_TLI_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_TLI_Connector::dump");
-}
-
-ACE_TLI_Connector::ACE_TLI_Connector (void)
-{
- ACE_TRACE ("ACE_TLI_Connector::ACE_TLI_Connector");
-}
-
-// Connect the <new_stream> to the <remote_sap>, waiting up to
-// <timeout> amount of time if necessary. It's amazing how
-// complicated this is to do in TLI...
-
-int
-ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int /* perms */,
- const char device[],
- struct t_info *info,
- int rwf,
- netbuf *udata,
- netbuf *opt)
-{
- ACE_TRACE ("ACE_TLI_Connector::connect");
- int result = 0;
-
- // Only open a new endpoint if we don't already have a valid handle.
-
- if (new_stream.get_handle () == ACE_INVALID_HANDLE)
- if (new_stream.open (device, flags, info) == -1)
- return -1;
-
- if (local_sap != ACE_Addr::sap_any)
- {
- // Bind the local endpoint to a specific addr.
-
- struct t_bind *localaddr;
-
- localaddr = (struct t_bind *)
- ACE_OS::t_alloc (new_stream.get_handle (), T_BIND, T_ADDR);
-
- if (localaddr == 0)
- result = -1;
- else
- {
- int one = 1;
-#if !defined (ACE_HAS_FORE_ATM_XTI)
- // Reusing the address causes problems with FORE's API. The
- // issue may be that t_optmgmt isn't fully supported by
- // FORE. t_errno is TBADOPT after the t_optmgmt call so
- // maybe options are configured differently for XTI than for
- // TLI (at least for FORE's implementation - XTI is supposed
- // to be a superset of TLI).
- if (reuse_addr
- && new_stream.set_option (SOL_SOCKET,
- SO_REUSEADDR,
- &one,
- sizeof one) == -1)
- result = -1;
- else
-#endif /* ACE_HAS_FORE_ATM_XTI */
- {
- // localaddr->glen = 0;
- //localaddr->addr.maxlen = local_sap.get_size ();
- localaddr->addr.len = local_sap.get_size ();
- ACE_OS::memcpy(localaddr->addr.buf,
- local_sap.get_addr (),
- localaddr->addr.len);
- //localaddr->addr.buf = (char *) local_sap.get_addr ();
-
- if (ACE_OS::t_bind (new_stream.get_handle (),
- localaddr,
- localaddr) == -1)
- result = -1;
-
- ACE_OS::t_free ((char *) localaddr,
- T_BIND);
- }
- }
-
- if (result == -1)
- {
- new_stream.close ();
- return -1;
- }
- }
- // Let TLI select the local endpoint addr.
- else if (ACE_OS::t_bind (new_stream.get_handle (), 0, 0) == -1)
- return -1;
-
- struct t_call *callptr = 0;
-
- callptr = (struct t_call *)
- ACE_OS::t_alloc (new_stream.get_handle (), T_CALL, T_ADDR);
-
- if (callptr == 0)
- {
- new_stream.close ();
- return -1;
- }
- //callptr->addr.maxlen = remote_sap.get_size ();
- callptr->addr.len = remote_sap.get_size ();
- ACE_OS::memcpy(callptr->addr.buf,
- remote_sap.get_addr (),
- callptr->addr.len);
- //callptr->addr.buf = (char *) remote_sap.get_addr ();
-
- if (udata != 0)
- ACE_OS::memcpy ((void *) &callptr->udata, (void *) udata, sizeof *udata);
- if (opt != 0)
- ACE_OS::memcpy ((void *) &callptr->opt, (void *) opt, sizeof *opt);
-
- // Connect to remote endpoint.
-#if defined (ACE_HAS_FORE_ATM_XTI)
- // FORE's XTI/ATM driver has problems with ioctl/fcntl calls so (at least
- // for now) always have blocking calls.
- timeout = 0;
-#endif /* ACE_HAS_FORE_ATM_XTI */
-
- if (timeout != 0) // Enable non-blocking, if required.
- {
- if (new_stream.enable (ACE_NONBLOCK) == -1)
- result = -1;
-
- // Do a non-blocking connect.
- if (ACE_OS::t_connect (new_stream.get_handle (), callptr, 0) == -1)
- {
- result = -1;
-
- // Check to see if we simply haven't connected yet on a
- // non-blocking handle or whether there's really an error.
- if (t_errno == TNODATA)
- {
- if (timeout->sec () == 0 && timeout->usec () == 0)
- errno = EWOULDBLOCK;
- else
- result = this->complete (new_stream, 0, timeout);
- }
- else if (t_errno == TLOOK && new_stream.look () == T_DISCONNECT)
- new_stream.rcvdis ();
- }
- }
- // Do a blocking connect to the server.
- else if (ACE_OS::t_connect (new_stream.get_handle (), callptr, 0) == -1)
- result = -1;
-
- if (result != -1)
- {
- new_stream.set_rwflag (rwf);
-#if defined (I_PUSH) && !defined (ACE_HAS_FORE_ATM_XTI)
- if (new_stream.get_rwflag ())
- result = ACE_OS::ioctl (new_stream.get_handle (),
- I_PUSH,
- ACE_const_cast (char *, "tirdwr"));
-#endif /* I_PUSH */
- }
- else if (!(errno == EWOULDBLOCK || errno == ETIME))
- {
- // If things have gone wrong, close down and return an error.
- new_stream.close ();
- new_stream.set_handle (ACE_INVALID_HANDLE);
- }
-
- if (ACE_OS::t_free ((char *) callptr, T_CALL) == -1)
- return -1;
- return result;
-}
-
-// Try to complete a non-blocking connection.
-
-int
-ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream,
- ACE_Addr *remote_sap,
- ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_TLI_Connector::complete");
- ACE_HANDLE h = ACE::handle_timed_complete (new_stream.get_handle (),
- tv,
- 1);
- if (h == ACE_INVALID_HANDLE)
- {
- new_stream.close ();
- return -1;
- }
- else // We've successfully connected!
- {
- if (remote_sap != 0)
- {
-#if defined (ACE_HAS_SVR4_TLI)
- struct netbuf name;
-
- name.maxlen = remote_sap->get_size ();
- name.buf = (char *) remote_sap->get_addr ();
-
- if (ACE_OS::ioctl (new_stream.get_handle (),
- TI_GETPEERNAME,
- &name) == -1)
-#else /* SunOS4 */
- if (0)
-#endif /* ACE_HAS_SVR4_TLI */
- {
- new_stream.close ();
- return -1;
- }
- }
-
- // Start out with non-blocking disabled on the <new_stream>.
- new_stream.disable (ACE_NONBLOCK);
-
- return 0;
- }
-}
-
-#endif /* ACE_HAS_TLI */
diff --git a/ace/TLI_Connector.h b/ace/TLI_Connector.h
deleted file mode 100644
index b514bf54614..00000000000
--- a/ace/TLI_Connector.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// TLI_Connector.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TLI_CONNECTOR_H
-#define ACE_TLI_CONNECTOR_H
-#include "ace/pre.h"
-
-#include "ace/TLI_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_TLI)
-
-class ACE_Export ACE_TLI_Connector
-{
- // = TITLE
- // Defines an active connection factory for the ACE_TLI C++
- // wrappers.
-public:
- // = Initialization methods.
- ACE_TLI_Connector (void);
- // Default constructor.
-
- ACE_TLI_Connector (ACE_TLI_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0,
- const char device[] = ACE_TLI_TCP_DEVICE,
- struct t_info *info = 0,
- int rw_flag = 1,
- struct netbuf *udata = 0,
- struct netbuf *opt = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- int connect (ACE_TLI_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0,
- const char device[] = ACE_TLI_TCP_DEVICE,
- struct t_info *info = 0,
- int rw_flag = 1,
- struct netbuf *udata = 0,
- struct netbuf *opt = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- int complete (ACE_TLI_Stream &new_stream,
- ACE_Addr *remote_sap,
- ACE_Time_Value *tv);
- // Try to complete a non-blocking connection.
- // If connection completion is successful then <new_stream> contains
- // the connected ACE_SOCK_Stream. If <remote_sap> is non-NULL then it
- // will contain the address of the connected peer.
-
- int reset_new_handle (ACE_HANDLE handle);
- // Resets any event associations on this handle
-
- // = Meta-type info
- typedef ACE_INET_Addr PEER_ADDR;
- typedef ACE_TLI_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#include "ace/TLI_Connector.i"
-
-#endif /* ACE_HAS_TLI */
-#include "ace/post.h"
-#endif /* ACE_TLI_CONNECTOR_H */
diff --git a/ace/TLI_Connector.i b/ace/TLI_Connector.i
deleted file mode 100644
index 3d56fada2c2..00000000000
--- a/ace/TLI_Connector.i
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// TLI_Connector.i
-
-inline
-ACE_TLI_Connector::ACE_TLI_Connector (ACE_TLI_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- const char device[],
- struct t_info *info,
- int rwf,
- netbuf *udata,
- netbuf *opt)
-{
- ACE_TRACE ("ACE_TLI_Connector::ACE_TLI_Connector");
- if (this->connect (new_stream,
- remote_sap,
- timeout,
- local_sap,
- reuse_addr,
- flags,
- perms,
- device,
- info,
- rwf,
- udata,
- opt) == ACE_INVALID_HANDLE
- && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_TLI_Stream::ACE_TLI_Stream")));
-}
-
-inline int
-ACE_TLI_Connector::reset_new_handle (ACE_HANDLE handle)
-{
- ACE_UNUSED_ARG (handle);
- // Nothing to do here since the handle is not a socket
- return 0;
-}
-
diff --git a/ace/TLI_Stream.cpp b/ace/TLI_Stream.cpp
deleted file mode 100644
index 4c82b1b9e85..00000000000
--- a/ace/TLI_Stream.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-// $Id$
-
-/* Defines the member functions for the base class of the ACE_TLI_Stream
- abstraction. */
-
-#include "ace/TLI_Stream.h"
-
-ACE_RCSID(ace, TLI_Stream, "$Id$")
-
-#if defined (ACE_HAS_TLI)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_TLI_Stream)
-
-void
-ACE_TLI_Stream::dump (void) const
-{
- ACE_TRACE ("ACE_TLI_Stream::dump");
-}
-
-ACE_TLI_Stream::ACE_TLI_Stream (void)
- : rwflag_ (0)
-{
- ACE_TRACE ("ACE_TLI_Stream::ACE_TLI_Stream");
-}
-
-int
-ACE_TLI_Stream::get_remote_addr (ACE_Addr &sa) const
-{
- ACE_TRACE ("ACE_TLI_Stream::get_remote_addr");
-
-#if defined (ACE_HAS_SVR4_TLI)
- struct netbuf name;
- name.maxlen = sa.get_size ();
- name.buf = (char *) sa.get_addr ();
-
- // if (ACE_OS::t_getname (this->get_handle (), &name, REMOTENAME) == -1)
- if (ACE_OS::ioctl (this->get_handle (),
- TI_GETPEERNAME,
- &name) == -1)
- return -1;
- else
- return 0;
-#else /* SunOS4 */
- ACE_UNUSED_ARG (sa);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_SVR4_TLI */
-}
-
-// Send a release and then await the release from the other side.
-
-int
-ACE_TLI_Stream::active_close (void)
-{
- ACE_TRACE ("ACE_TLI_Stream::active_close");
- char buf;
-
- if (this->sndrel () == ACE_INVALID_HANDLE)
- return ACE_INVALID_HANDLE;
- if (this->recv (&buf, sizeof buf) == ACE_INVALID_HANDLE)
- {
- if (t_errno == TLOOK && this->look () == T_ORDREL)
- {
- if (this->rcvrel () == ACE_INVALID_HANDLE)
- return ACE_INVALID_HANDLE;
- }
- else
- return ACE_INVALID_HANDLE;
- }
- return this->close ();
-}
-
-// Acknowledge the release from the other side and then send the
-// release to the other side.
-
-int
-ACE_TLI_Stream::passive_close (void)
-{
- ACE_TRACE ("ACE_TLI_Stream::passive_close");
- if (this->rcvrel () == ACE_INVALID_HANDLE)
- return ACE_INVALID_HANDLE;
- if (this->sndrel () == ACE_INVALID_HANDLE)
- return ACE_INVALID_HANDLE;
- return this->close ();
-}
-
-int
-ACE_TLI_Stream::close (void)
-{
- ACE_TRACE ("ACE_TLI_Stream::close");
- int fd = this->get_handle ();
-
- this->set_handle (ACE_INVALID_HANDLE);
-
- if (this->rwflag_)
- return ACE_OS::close (fd);
- else
- return ACE_OS::t_close (fd);
-}
-
-#endif /* ACE_HAS_TLI */
diff --git a/ace/TLI_Stream.h b/ace/TLI_Stream.h
deleted file mode 100644
index 24a63223c96..00000000000
--- a/ace/TLI_Stream.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// TLI_Stream.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TLI_STREAM_H
-#define ACE_TLI_STREAM_H
-#include "ace/pre.h"
-
-#include "ace/TLI.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/INET_Addr.h"
-
-#if defined (ACE_HAS_TLI)
-
-class ACE_Export ACE_TLI_Stream : public ACE_TLI
-{
- // = TITLE
- // Defines the member functions for ACE_TLI_Stream abstraction.
-public:
- friend class ACE_TLI_Acceptor;
- friend class ACE_TLI_Connector;
-
- // = Initialization and termination methods.
- ACE_TLI_Stream (void);
- // Default constructor.
-
- // = TLI-specific shutdown operations.
- int close (void);
- // Close down and release resources.
-
- int active_close (void);
- // Send a release and then await the release from the other side.
-
- int passive_close (void);
- // Acknowledge the release from the other side and then send the
- // release to the other side.
-
- int get_remote_addr (ACE_Addr &) const;
- // Return address of remotely connected peer.
-
- // = timod bindings
- ssize_t send (const void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout = 0) const;
- // Send an n byte buffer to the connected socket (uses t_snd(3)).
- ssize_t recv (void *buf,
- size_t n,
- int *flags,
- const ACE_Time_Value *timeout = 0) const;
- // Recv an n byte buffer from the connected socket (uses t_rcv(3)).
-
- ssize_t send_n (const void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0) const;
- // Send exactly n bytes to the connected socket (uses t_snd(3)).
- ssize_t recv_n (void *buf,
- size_t n,
- int *flags,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0) const;
- // Recv exactly n bytes from the connected socket (uses t_rcv(3)).
-
- // = tirdwr bindings
- ssize_t send (const void *buf,
- size_t n,
- const ACE_Time_Value *timeout = 0) const;
- // Send an n byte buffer to the connected socket (uses write(2)).
-
- ssize_t recv (void *buf,
- size_t n,
- const ACE_Time_Value *timeout = 0) const;
- // Recv an n byte buffer from the connected socket (uses read(2)).
-
- ssize_t send_n (const void *buf,
- size_t n,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0) const;
- // Send n bytes, keep trying until n are sent (uses write(2)).
-
- ssize_t recv_n (void *buf,
- size_t n,
- const ACE_Time_Value *timeout = 0,
- size_t *bytes_transferred = 0) const;
- // Recv n bytes, keep trying until n are received (uses read (2)).
-
- // = Meta-type info
- typedef ACE_INET_Addr PEER_ADDR;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- int rwflag_;
- // Indicates whether the tirdwr module should be pushed
-
- // = Get/set rwflag
- int get_rwflag (void);
- void set_rwflag (int);
-};
-
-#include "ace/TLI_Stream.i"
-
-#endif /* ACE_HAS_TLI */
-#include "ace/post.h"
-#endif /* ACE_TLI_STREAM_H */
diff --git a/ace/TLI_Stream.i b/ace/TLI_Stream.i
deleted file mode 100644
index 60c1158ca5a..00000000000
--- a/ace/TLI_Stream.i
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// TLI_Stream.i
-
-#include "ace/TLI_Stream.h"
-
-inline ssize_t
-ACE_TLI_Stream::send (const void *buf,
- size_t n,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_TLI_Stream::send");
- return ACE::send (this->get_handle (),
- buf,
- n,
- timeout);
-}
-
-inline ssize_t
-ACE_TLI_Stream::send (const void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_TLI_Stream::send");
- return ACE::t_snd (this->get_handle (),
- buf,
- n,
- flags,
- timeout);
-}
-
-inline ssize_t
-ACE_TLI_Stream::recv (void *buf,
- size_t n,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_TLI_Stream::recv");
- return ACE::recv (this->get_handle (),
- buf,
- n,
- timeout);
-}
-
-inline ssize_t
-ACE_TLI_Stream::recv (void *buf,
- size_t n,
- int *flags,
- const ACE_Time_Value *timeout) const
-{
- ACE_TRACE ("ACE_TLI_Stream::recv");
- int f = 0;
-
- if (flags == 0)
- flags = &f;
-
- return ACE::t_rcv (this->get_handle (),
- buf,
- n,
- flags,
- timeout);
-}
-
-inline ssize_t
-ACE_TLI_Stream::send_n (const void *buf,
- size_t n,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred) const
-{
- ACE_TRACE ("ACE_TLI_Stream::send_n");
- return ACE::send_n (this->get_handle (),
- buf,
- n,
- timeout,
- bytes_transferred);
-}
-
-inline ssize_t
-ACE_TLI_Stream::send_n (const void *buf,
- size_t n,
- int flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred) const
-{
- ACE_TRACE ("ACE_TLI_Stream::send_n");
-
- return ACE::t_snd_n (this->get_handle (),
- buf,
- n,
- flags,
- timeout,
- bytes_transferred);
-}
-
-inline ssize_t
-ACE_TLI_Stream::recv_n (void *buf,
- size_t n,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred) const
-{
- ACE_TRACE ("ACE_TLI_Stream::recv_n");
- return ACE::recv_n (this->get_handle (),
- buf,
- n,
- timeout,
- bytes_transferred);
-}
-
-inline ssize_t
-ACE_TLI_Stream::recv_n (void *buf,
- size_t n,
- int *flags,
- const ACE_Time_Value *timeout,
- size_t *bytes_transferred) const
-{
- ACE_TRACE ("ACE_TLI_Stream::recv_n");
-
- return ACE::t_rcv_n (this->get_handle (),
- buf,
- n,
- flags,
- timeout,
- bytes_transferred);
-}
-
-inline void
-ACE_TLI_Stream::set_rwflag (int value)
-{
- ACE_TRACE ("ACE_TLI_Stream::set_rwflag");
- this->rwflag_ = value;
-}
-
-inline int
-ACE_TLI_Stream::get_rwflag (void)
-{
- ACE_TRACE ("ACE_TLI_Stream::get_rwflag");
- return this->rwflag_;
-}
diff --git a/ace/TP_Reactor.cpp b/ace/TP_Reactor.cpp
deleted file mode 100644
index 202c4cd845a..00000000000
--- a/ace/TP_Reactor.cpp
+++ /dev/null
@@ -1,278 +0,0 @@
-// $Id$
-
-#include "ace/TP_Reactor.h"
-#include "ace/Reactor.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/TP_Reactor.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, TP_Reactor, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE (ACE_TP_Reactor)
-
-ACE_TP_Reactor::ACE_TP_Reactor (ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq,
- int mask_signals)
- : ACE_Select_Reactor (sh, tq, 0, 0, mask_signals)
-{
- ACE_TRACE ("ACE_TP_Reactor::ACE_TP_Reactor");
- this->supress_notify_renew (1);
-}
-
-ACE_TP_Reactor::ACE_TP_Reactor (size_t size,
- int rs,
- ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq,
- int mask_signals)
- : ACE_Select_Reactor (size, rs, sh, tq, 0, 0, mask_signals)
-{
- ACE_TRACE ("ACE_TP_Reactor::ACE_TP_Reactor");
- this->supress_notify_renew (1);
-}
-
-// Dispatches a single event handler
-int
-ACE_TP_Reactor::notify_handle (ACE_EH_Dispatch_Info &dispatch_info)
-{
- ACE_TRACE ("ACE_TP_Reactor::notify_handle");
-
- ACE_HANDLE handle = dispatch_info.handle_;
- ACE_Event_Handler *event_handler = dispatch_info.event_handler_;
- ACE_Reactor_Mask mask = dispatch_info.mask_;
- ACE_EH_PTMF callback = dispatch_info.callback_;
-
- // Check for removed handlers.
- if (event_handler == 0)
- return -1;
-
- // Upcall
- int status = (event_handler->*callback) (handle);
-
- // If negative, remove from Reactor
- if (status < 0)
- return this->remove_handler (handle, mask);
-
- // If positive, reschedule in Reactor
- else if (status > 0)
- this->ready_ops (handle,
- mask,
- ACE_Reactor::SET_MASK);
- // assert (status >= 0);
- // resume in Reactor
- return (event_handler != this->notify_handler_ ?
- this->resume_handler (handle) : 0);
-}
-
-// Overwrites ACE_Select_Reactor::dispatch_io_set() to *not* dispatch
-// any event handlers. The information of one activated event handler
-// is stored away, so that the event handler can be dispatch later.
-int
-ACE_TP_Reactor::dispatch_io_set (int number_of_active_handles,
- int& number_dispatched,
- int mask,
- ACE_Handle_Set& dispatch_mask,
- ACE_Handle_Set& ready_mask,
- ACE_EH_PTMF callback)
-{
- ACE_UNUSED_ARG (ready_mask);
-
- ACE_HANDLE handle;
-
- ACE_Handle_Set_Iterator handle_iter (dispatch_mask);
-
- while ((handle = handle_iter ()) != ACE_INVALID_HANDLE
- && number_dispatched < number_of_active_handles
- && this->state_changed_ == 0)
- {
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TP_Reactor::dispatching\n")));
- number_dispatched++;
-
- // Remember this info
- this->dispatch_info_.set (handle,
- this->handler_rep_.find (handle),
- mask,
- callback);
-
- // One is enough
- break;
- }
-
- if (number_dispatched > 0 && this->state_changed_)
- {
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_TP_Reactor::handle_events (ACE_Time_Value *max_wait_time)
-{
- ACE_TRACE ("ACE_TP_Reactor::handle_events");
-
- // Stash the current time -- the destructor of this object will
- // automatically compute how much time elpased since this method was
- // called.
- ACE_Countdown_Time countdown (max_wait_time);
-
- // The order of these events is very subtle, modify with care.
-
- // Try to grab the lock. If someone if already there, don't wake
- // them up, just queue up in the thread pool.
- int result = 0;
-
- if (max_wait_time)
- {
- ACE_Time_Value tv = ACE_OS::gettimeofday ();
- tv += *max_wait_time;
-
- ACE_MT (result = this->token_.acquire_read (&ACE_TP_Reactor::no_op_sleep_hook,
- 0,
- &tv));
- }
- else
- {
- ACE_MT (result = this->token_.acquire_read (&ACE_TP_Reactor::no_op_sleep_hook));
- }
-
- // Update the countdown to reflect time waiting for the token.
- countdown.update ();
-
- switch (result)
- {
- case 2:
- ACE_MT (this->token_.release ());
- return 0;
- case -1:
- if (errno == ETIME)
- return 0;
- return -1;
- }
-
- // After acquiring the lock, check if we have been deactivated.
- if (this->deactivated_)
- {
- ACE_MT (this->token_.release ());
- return -1;
- }
-
- // We got the lock, lets handle some events. Note: this method will
- // *not* dispatch any handlers. It will dispatch timeouts and
- // signals.
- result = this->handle_events_i (max_wait_time);
- if (result == -1)
- {
- ACE_MT (this->token_.release ());
- return -1;
- }
-
- // If there is any event handler that is ready to be dispatched, the
- // dispatch information is recorded in this->dispatch_info_.
- ACE_EH_Dispatch_Info dispatch_info;
- if (this->dispatch_info_.dispatch ())
- {
- // Copy dispatch_info_ to the stack, as other threads can change
- // dispatch_info_ after we release the lock.
- dispatch_info = this->dispatch_info_;
-
- // Reset dispatch_info_ so that we don't trip over it again.
- this->dispatch_info_.reset ();
-
- if (dispatch_info.event_handler_ == this->notify_handler_)
- {
- // Make sure we never suspend the notify_handler_ without holding the
- // lock.
- // @@ Actually, we don't even need to suspend the notify_handler_
- // here. But let me get it to work first.
- int retv = this->notify_handle (dispatch_info);
- ACE_MT (this->token_.release ());
- return retv;
- }
- else
- // Suspend the handler so that other thread don't start
- // dispatching it.
- result = this->suspend_i (dispatch_info.handle_);
- }
-
- // Release the lock. Others threads can start waiting.
- ACE_MT (this->token_.release ());
-
- // If there was an event handler ready, dispatch it.
- if (dispatch_info.dispatch ())
- return this->notify_handle (dispatch_info);
- else
- return result;
-}
-
-int
-ACE_TP_Reactor::mask_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops)
-{
- ACE_TRACE ("ACE_Select_Reactor_T::mask_ops");
- ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token,
- ace_mon, this->token_, -1));
-
- int result = 0;
-
- // If it looks like the handle isn't suspended, then
- // set the ops on the wait_set_, otherwise set the suspend_set_.
-
- if (this->suspend_set_.rd_mask_.is_set (handle) == 0
- && this->suspend_set_.wr_mask_.is_set (handle) == 0
- && this->suspend_set_.ex_mask_.is_set (handle) == 0)
-
- result = this->bit_ops (handle, mask,
- this->wait_set_,
- ops);
- else
-
- result = this->bit_ops (handle, mask,
- this->suspend_set_,
- ops);
-
- return result;
-}
-
-void
-ACE_TP_Reactor::no_op_sleep_hook (void *)
-{
-}
-
-
-ACE_EH_Dispatch_Info::ACE_EH_Dispatch_Info (void)
-{
- this->reset ();
-}
-
-void
-ACE_EH_Dispatch_Info::set (ACE_HANDLE handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- ACE_EH_PTMF callback)
-{
- this->dispatch_ = 1;
-
- this->handle_ = handle;
- this->event_handler_ = event_handler;
- this->mask_ = mask;
- this->callback_ = callback;
-}
-
-void
-ACE_EH_Dispatch_Info::reset (void)
-{
- this->dispatch_ = 0;
-
- this->handle_ = ACE_INVALID_HANDLE;
- this->event_handler_ = 0;
- this->mask_ = ACE_Event_Handler::NULL_MASK;
- this->callback_ = 0;
-}
-
-int
-ACE_EH_Dispatch_Info::dispatch (void) const
-{
- return this->dispatch_;
-}
diff --git a/ace/TP_Reactor.h b/ace/TP_Reactor.h
deleted file mode 100644
index 81bfdd69382..00000000000
--- a/ace/TP_Reactor.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// TP_Reactor.h
-//
-// = DESCRIPTION
-// The <ACE_TP_Reactor> (aka, Thread Pool Reactor) uses the
-// Leader/Followers pattern to demultiplex events among a pool of
-// threads. When using a thread pool reactor, an application
-// pre-spawns a _fixed_ number of threads. When these threads
-// invoke the <ACE_TP_Reactor>'s <handle_events> method, one thread
-// will become the leader and wait for an event. The other
-// follower threads will queue up waiting for their turn to become
-// the leader. When an event occurs, the leader will pick a
-// follower to become the leader and go on to handle the event.
-// The consequence of using <ACE_TP_Reactor> is the amortization of
-// the costs used to creating threads. The context switching cost
-// will also reduce. More over, the total resources used by
-// threads are bounded because there are a fixed number of threads.
-//
-// = AUTHOR
-// Irfan Pyarali <irfan@cs.wustl.edu> and Nanbor Wang <nanbor@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_TP_REACTOR_H
-#define ACE_TP_REACTOR_H
-#include "ace/pre.h"
-
-#include "ace/Select_Reactor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_EH_Dispatch_Info
-{
- // = TITLE
- //
- // This structure contains information of the activated event
- // handler.
-public:
-
- ACE_EH_Dispatch_Info (void);
-
- void set (ACE_HANDLE handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- ACE_EH_PTMF callback);
-
- void reset (void);
-
- int dispatch (void) const;
-
- ACE_HANDLE handle_;
- ACE_Event_Handler *event_handler_;
- ACE_Reactor_Mask mask_;
- ACE_EH_PTMF callback_;
-
- int dispatch_;
-};
-
-class ACE_Export ACE_TP_Reactor : public ACE_Select_Reactor
-{
- // = TITLE
- // Specialization of Select Reactor to support thread-pool based
- // event dispatching.
- //
- // = DESCRIPTION
- // One of the short comings of the Select_Reactor in ACE is that
- // it did not support a thread pool based event dispatching
- // model, similar to the one in WFMO_Reactor. In
- // Select_Reactor, only thread can be blocked in <handle_events>
- // at any given time.
- //
- // A new Reactor has been added to ACE that removes this
- // short-coming. TP_Reactor is a specialization of Select
- // Reactor to support thread-pool based event dispatching. This
- // Reactor takes advantage of the fact that events reported by
- // <select> are persistent if not acted upon immediately. It
- // works by remembering the event handler that just got
- // activated, releasing the internal lock (so that some other
- // thread can start waiting in the event loop) and then
- // dispatching the event handler outside the context of the
- // Reactor lock.
- //
- // This Reactor is best suited for situations when the callbacks
- // to event handlers can take arbitrarily long and/or a number
- // of threads are available to run the event loops.
- //
- // Note that callback code in Event Handlers
- // (e.g. Event_Handler::handle_input) does not have to be
- // modified or made thread-safe for this Reactor. This is
- // because an activated Event Handler is suspended in the
- // Reactor before the upcall is made and resumed after the
- // upcall completes. Therefore, one Event Handler cannot be
- // called by multiple threads simultaneously.
-public:
-
- // = Initialization and termination methods.
-
- ACE_TP_Reactor (ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0,
- int mask_signals = 1);
- // Initialize <ACE_TP_Reactor> with the default size.
-
- ACE_TP_Reactor (size_t max_number_of_handles,
- int restart = 0,
- ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0,
- int mask_signals = 1);
- // Initialize the <ACE_TP_Reactor> to manage
- // <max_number_of_handles>. If <restart> is non-0 then the
- // <ACE_Reactor>'s <handle_events> method will be restarted
- // automatically when <EINTR> occurs. If <signal_handler> or
- // <timer_queue> are non-0 they are used as the signal handler and
- // timer queue, respectively.
-
- // = Event loop drivers.
-
- virtual int handle_events (ACE_Time_Value *max_wait_time = 0);
- // This event loop driver that blocks for <max_wait_time> before
- // returning. It will return earlier if timer events, I/O events,
- // or signal events occur. Note that <max_wait_time> can be 0, in
- // which case this method blocks indefinitely until events occur.
- //
- // <max_wait_time> is decremented to reflect how much time this call
- // took. For instance, if a time value of 3 seconds is passed to
- // handle_events and an event occurs after 2 seconds,
- // <max_wait_time> will equal 1 second. This can be used if an
- // application wishes to handle events for some fixed amount of
- // time.
- //
- // Returns the total number of <ACE_Event_Handler>s that were
- // dispatched, 0 if the <max_wait_time> elapsed without dispatching
- // any handlers, or -1 if something goes wrong.
-
- virtual int handle_events (ACE_Time_Value &max_wait_time);
-
- virtual int mask_ops (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask,
- int ops);
- // GET/SET/ADD/CLR the dispatch mask "bit" bound with the <eh> and
- // <mask>.
-
- virtual int mask_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int ops);
- // GET/SET/ADD/CLR the dispatch mask "bit" bound with the <handle>
- // and <mask>.
-
- static void no_op_sleep_hook (void *);
- // Called from handle events
-
- virtual void wakeup_all_threads (void);
- // Wake up all threads in waiting in the event loop
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- // = Internal methods that do the actual work.
-
- virtual int dispatch_io_set (int number_of_active_handles,
- int& number_dispatched,
- int mask,
- ACE_Handle_Set& dispatch_mask,
- ACE_Handle_Set& ready_mask,
- ACE_EH_PTMF callback);
- // Overwrites <ACE_Select_Reactor::dispatch_io_set> to *not*
- // dispatch any event handlers. The information of one activated
- // event handler is stored away, so that the event handler can be
- // dispatch later.
-
- virtual void notify_handle (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Handle_Set &,
- ACE_Event_Handler *eh,
- ACE_EH_PTMF callback);
- // This method shouldn't get called.
-
- virtual int notify_handle (ACE_EH_Dispatch_Info &dispatch_info);
- // Notify the appropriate <callback> in the context of the <eh>
- // associated with <handle> that a particular event has occurred.
-
- ACE_EH_Dispatch_Info dispatch_info_;
- // Dispatch information of the activated event handler
-
-private:
- ACE_TP_Reactor (const ACE_TP_Reactor &);
- ACE_TP_Reactor &operator = (const ACE_TP_Reactor &);
- // Deny access since member-wise won't work...
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/TP_Reactor.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_TP_REACTOR_H */
diff --git a/ace/TP_Reactor.i b/ace/TP_Reactor.i
deleted file mode 100644
index 969a7fdaf02..00000000000
--- a/ace/TP_Reactor.i
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-ACE_INLINE int
-ACE_TP_Reactor::handle_events (ACE_Time_Value &max_wait_time)
-{
- return ACE_Select_Reactor::handle_events (max_wait_time);
-}
-
-ACE_INLINE int
-ACE_TP_Reactor::mask_ops (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask,
- int ops)
-{
- return this->mask_ops (eh->get_handle (), mask, ops);
-}
-
-ACE_INLINE void
-ACE_TP_Reactor::wakeup_all_threads (void)
-{
- ACE_MT (this->token_.signal_all_threads (););
-
- // Send a notification, but don't block if there's no one to receive
- // it.
- this->notify (0,
- ACE_Event_Handler::NULL_MASK,
- (ACE_Time_Value *) &ACE_Time_Value::zero);
-}
-
-ACE_INLINE void
-ACE_TP_Reactor::notify_handle (ACE_HANDLE,
- ACE_Reactor_Mask,
- ACE_Handle_Set &,
- ACE_Event_Handler *,
- ACE_EH_PTMF)
-{
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_TP_Reactor::notify_handle: Wrong version of notify_handle() gets called")));
-}
diff --git a/ace/TTY_IO.cpp b/ace/TTY_IO.cpp
deleted file mode 100644
index 0e7c2e98419..00000000000
--- a/ace/TTY_IO.cpp
+++ /dev/null
@@ -1,286 +0,0 @@
-// $Id$
-
-#include "ace/TTY_IO.h"
-
-ACE_RCSID(ace, TTY_IO, "$Id$")
-
-// Interface for reading/writing serial device parameters
-
-int
-ACE_TTY_IO::control (Control_Mode cmd,
- Serial_Params *arg) const
-{
-#if defined (ACE_HAS_TERM_IOCTLS)
-#if defined(TCGETS)
- struct termios devpar;
-#elif defined(TCGETA)
- struct termio devpar;
-#else
- errno = ENOSYS;
- return -1;
-#endif
- u_long c_iflag;
- u_long c_oflag;
- u_long c_cflag;
- u_long c_lflag;
- // u_long c_line;
- u_char ivmin_cc4;
- u_char ivtime_cc5;
-
- c_iflag=0;
- c_oflag=0;
- c_cflag=0;
- c_lflag=0;
- // c_line=0;
-
- // Get default device parameters.
-
-#if defined (TCGETS)
- if (this->ACE_IO_SAP::control (ACE_static_cast (int, TCGETS),
- (void *) &devpar) == -1)
-#elif defined (TCGETA)
- if (this->ACE_IO_SAP::control (TCGETA, (void *) &devpar) == -1)
-#else
- errno = ENOSYS;
-#endif /* TCGETS */
- return -1;
-
- u_int newbaudrate = 0;
-
- switch (cmd)
- {
- case SETPARAMS:
- switch (arg->baudrate)
- {
- case 300:
- newbaudrate = B300;
- break;
- case 600:
- newbaudrate = B600;
- break;
- case 1200:
- newbaudrate = B1200;
- break;
- case 2400:
- newbaudrate = B2400;
- break;
- case 4800:
- newbaudrate = B4800;
- break;
- case 9600:
- newbaudrate = B9600;
- break;
- case 19200:
- newbaudrate = B19200;
- break;
- case 38400:
- newbaudrate = B38400;
- break;
-#if defined (ACE_USES_HIGH_BAUD_RATES)
-// case 56000:
-// newbaudrate = B56000;
-// break;
- case 57600:
- newbaudrate = B57600;
- break;
- case 115200:
- newbaudrate = B115200;
- break;
-// case 128000:
-// newbaudrate = B128000;
-// break;
-// case 256000:
-// newbaudrate = B256000;
-// break;
-#endif /* ACE_USES_HIGH_BAUD_RATES */
- default:
- return -1;
- }
-
-#if defined(ACE_USES_OLD_TERMIOS_STRUCT)
- // @@ Can you really have different input and output baud
- // rates?!
- devpar.c_ispeed = newbaudrate;
- devpar.c_ospeed = newbaudrate;
-#else
- c_cflag |= newbaudrate;
-#endif /* ACE_USES_OLD_TERMIOS_STRUCT */
-
- switch (arg->databits)
- {
- case 5:
- c_cflag |= CS5;
- break;
- case 6:
- c_cflag |= CS6;
- break;
- case 7:
- c_cflag |= CS7;
- break;
- case 8:
- c_cflag |= CS8;
- break;
- default:
- return -1;
- }
- switch (arg->stopbits)
- {
- case 1:
- break;
- case 2:
- c_cflag |= CSTOPB;
- break;
- default:
- return -1;
- }
- if (arg->parityenb)
- {
- c_cflag |= PARENB;
- if (ACE_OS::strcmp ((char *) arg->paritymode, "ODD") == 0
- || ACE_OS::strcmp ((char *) arg->paritymode, "odd") == 0)
- c_cflag |= PARODD;
- }
-#if defined (CRTSCTS)
- if (arg->ctsenb) /* enable CTS/RTS protocoll */
- c_cflag |= CRTSCTS;
-#endif /* CRTSCTS */
-#if defined (CREAD)
- if (arg->rcvenb) /* enable receiver */
- c_cflag |= CREAD;
-#endif /* CREAD */
-
- c_oflag = 0;
- c_iflag = IGNPAR | INPCK;
- if (arg->databits < 8)
- c_iflag |= ISTRIP;
- c_lflag = 0;
-
- ivmin_cc4 = (u_char) 0;
- ivtime_cc5= (u_char) (arg->readtimeoutmsec / 100);
- devpar.c_iflag = c_iflag;
- devpar.c_oflag = c_oflag;
- devpar.c_cflag = c_cflag;
- devpar.c_lflag = c_lflag;
- devpar.c_cc[4] = ivmin_cc4;
- devpar.c_cc[5] = ivtime_cc5;
-
-#if defined(TCSETS)
- return this->ACE_IO_SAP::control (ACE_static_cast (int, TCSETS),
- (void *) &devpar);
-#elif defined(TCSETA)
- return this->ACE_IO_SAP::control (TCSETA,
- (void *) &devpar);
-#else
- errno = ENOSYS;
- return -1;
-#endif
- case GETPARAMS:
- return -1; // Not yet implemented.
- default:
- return -1; // Wrong cmd.
- }
-#elif defined (ACE_WIN32)
- switch (cmd)
- {
- case SETPARAMS:
- DCB dcb ;
- dcb.DCBlength = sizeof dcb ;
- ::GetCommState (this->get_handle (), &dcb);
-
- switch (arg->baudrate)
- {
- case 300: dcb.BaudRate = CBR_300; break;
- case 600: dcb.BaudRate = CBR_600; break;
- case 1200: dcb.BaudRate = CBR_1200; break;
- case 2400: dcb.BaudRate = CBR_2400; break;
- case 4800: dcb.BaudRate = CBR_4800; break;
- case 9600: dcb.BaudRate = CBR_9600; break;
- case 19200: dcb.BaudRate = CBR_19200; break;
- case 38400: dcb.BaudRate = CBR_38400; break;
-// case 56000: dcb.BaudRate = CBR_56000; break;
- case 57600: dcb.BaudRate = CBR_57600; break;
- case 115200: dcb.BaudRate = CBR_115200; break;
-// case 128000: dcb.BaudRate = CBR_128000; break;
-// case 256000: dcb.BaudRate = CBR_256000; break;
- default: return -1;
- }
-
- switch (arg->databits)
- {
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- dcb.ByteSize = u_char (arg->databits);
- break;
- default:
- return -1;
- }
-
- switch (arg->stopbits)
- {
- case 1:
- dcb.StopBits = ONESTOPBIT;
- break ;
- case 2:
- dcb.StopBits = TWOSTOPBITS;
- break ;
- default:
- return -1;
- }
-
- if (arg->parityenb)
- {
- dcb.fParity = TRUE ;
- if (ACE_OS::strcmp ((char *) arg->paritymode, "ODD") == 0
- || ACE_OS::strcmp ((char *) arg->paritymode, "odd") == 0)
- dcb.Parity = ODDPARITY ;
- else if (ACE_OS::strcmp ((char *) arg->paritymode, "EVEN") == 0
- || ACE_OS::strcmp ((char *) arg->paritymode, "even") == 0)
- dcb.Parity = EVENPARITY ;
- }
- else
- {
- dcb.fParity = FALSE ;
- dcb.Parity = NOPARITY ;
- }
-
- if (arg->ctsenb) // enable CTS/RTS protocol.
- {
- dcb.fOutxCtsFlow = TRUE ;
- dcb.fRtsControl = RTS_CONTROL_HANDSHAKE ;
- }
- else
- {
- dcb.fOutxCtsFlow = FALSE ;
- dcb.fRtsControl = RTS_CONTROL_DISABLE ;
- }
- dcb.fBinary = TRUE ;
- ::SetCommState (this->get_handle (), &dcb);
-
- // 2/13/97 BWF added drop out timer
- COMMTIMEOUTS timeouts;
- ::GetCommTimeouts (this->get_handle(), &timeouts) ;
- timeouts.ReadIntervalTimeout = arg->readtimeoutmsec ;
- return ::SetCommTimeouts (this->get_handle (), &timeouts) ;
-
- case GETPARAMS:
- ACE_NOTSUP_RETURN (-1); // Not yet implemented.
- default:
- return -1; // Wrong cmd.
-
- } // arg switch
-#else
- ACE_UNUSED_ARG (cmd);
- ACE_UNUSED_ARG (arg);
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_TERM_IOCTLS */
-}
-
-#if defined (ACE_NEEDS_DEV_IO_CONVERSION)
-ACE_TTY_IO::operator ACE_DEV_IO &()
-{
- return (ACE_DEV_IO &) *this;
-}
-#endif /* ACE_NEEDS_DEV_IO_CONVERSION */
diff --git a/ace/TTY_IO.h b/ace/TTY_IO.h
deleted file mode 100644
index 4c0e768a78d..00000000000
--- a/ace/TTY_IO.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// TTY_IO.h
-//
-// = DESCRIPTION
-//
-// = AUTHOR
-// Douglas C. Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TTY_IO_H
-#define ACE_TTY_IO_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/DEV_Addr.h"
-#include "ace/DEV_Connector.h"
-#include "ace/DEV_IO.h"
-
-class ACE_Export ACE_TTY_IO : public ACE_DEV_IO
-{
- // = TITLE
- // Class definitions for platform specific TTY features.
- //
- // = DESCRIPTION
- // This class represents an example interface for a specific
- // device (a serial line) It extends the capability of the
- // underlying DEV_IO class by adding a control method that takes
- // a special structure (Serial_Params) as argument to allow a
- // comfortable user interface (away from that annoying termios
- // structure, which is very specific to UNIX).
-public:
- enum Control_Mode
- {
- SETPARAMS, // Set control parameters.
- GETPARAMS // Get control parameters.
- };
-
- struct Serial_Params
- {
- int baudrate;
- int parityenb;
- const char *paritymode;
- int databits;
- int stopbits;
- int readtimeoutmsec;
- int ctsenb;
- int rcvenb;
- };
-
- int control (Control_Mode cmd,
- Serial_Params *arg) const;
- // Interface for reading/writing serial device parameters.
-
-#if defined (ACE_NEEDS_DEV_IO_CONVERSION)
- operator ACE_DEV_IO &();
- // This is necessary to pass ACE_TTY_IO as parameter to DEV_Connector.
-#endif /* ACE_NEEDS_DEV_IO_CONVERSION */
-};
-
-#include "ace/post.h"
-#endif /* ACE_TTY_IO_H */
diff --git a/ace/Task.cpp b/ace/Task.cpp
deleted file mode 100644
index 6342b37441e..00000000000
--- a/ace/Task.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-// $Id$
-
-#include "ace/Task.h"
-#include "ace/Module.h"
-#if !defined (ACE_HAS_WINCE)
-#include "ace/Service_Config.h"
-#endif /* !ACE_HAS_WINCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Task.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Task, "$Id$")
-
-ACE_Task_Base::~ACE_Task_Base (void)
-{
-}
-
-ACE_Task_Base::ACE_Task_Base (ACE_Thread_Manager *thr_man)
- : thr_count_ (0),
- thr_mgr_ (thr_man),
- flags_ (0),
- grp_id_ (-1)
-{
-}
-
-// Wait for all threads running in a task to exit.
-
-int
-ACE_Task_Base::wait (void)
-{
- ACE_TRACE ("ACE_Task_Base::wait");
-
- // If we don't have a thread manager, we probably were never
- // activated.
- if (this->thr_mgr () != 0)
- return this->thr_mgr ()->wait_task (this);
- else
- return 0;
-}
-
-// Suspend a task.
-int
-ACE_Task_Base::suspend (void)
-{
- ACE_TRACE ("ACE_Task_Base::suspend");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
- if (this->thr_count_ > 0)
- return this->thr_mgr_->suspend_task (this);
- else
- return 0;
-}
-
-// Resume a suspended task.
-int
-ACE_Task_Base::resume (void)
-{
- ACE_TRACE ("ACE_Task_Base::resume");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
- if (this->thr_count_ > 0)
- return this->thr_mgr_->resume_task (this);
- else
- return 0;
-}
-
-int
-ACE_Task_Base::activate (long flags,
- int n_threads,
- int force_active,
- long priority,
- int grp_id,
- ACE_Task_Base *task,
- ACE_hthread_t thread_handles[],
- void *stack[],
- size_t stack_size[],
- ACE_thread_t thread_ids[])
-{
- ACE_TRACE ("ACE_Task_Base::activate");
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
-
- // If the task passed in is zero, we will use <this>
- if (task == 0)
- task = this;
-
- if (this->thr_count_ > 0 && force_active == 0)
- return 1; // Already active.
- else
- {
- if (this->thr_count_ > 0 && grp_id != -1)
- // If we're joining an existing group of threads then make
- // sure to use its group id.
- grp_id = this->grp_id_;
- this->thr_count_ += n_threads;
- }
-
- // Use the ACE_Thread_Manager singleton if we're running as an
- // active object and the caller didn't supply us with a
- // Thread_Manager.
- if (this->thr_mgr_ == 0)
-# if defined (ACE_THREAD_MANAGER_LACKS_STATICS)
- this->thr_mgr_ = ACE_THREAD_MANAGER_SINGLETON::instance ();
-# else /* ! ACE_THREAD_MANAGER_LACKS_STATICS */
- this->thr_mgr_ = ACE_Thread_Manager::instance ();
-# endif /* ACE_THREAD_MANAGER_LACKS_STATICS */
-
- int grp_spawned = -1;
- if (thread_ids == 0)
- // Thread Ids were not specified
- grp_spawned =
- this->thr_mgr_->spawn_n (n_threads,
- ACE_THR_FUNC (&ACE_Task_Base::svc_run),
- (void *) this,
- flags,
- priority,
- grp_id,
- task,
- thread_handles,
- stack,
- stack_size);
- else
- // thread names were specified
- grp_spawned =
- this->thr_mgr_->spawn_n (thread_ids,
- n_threads,
- ACE_THR_FUNC (&ACE_Task_Base::svc_run),
- (void *) this,
- flags,
- priority,
- grp_id,
- stack,
- stack_size,
- thread_handles);
- if (grp_spawned == -1)
- {
- // If spawn_n fails, restore original thread count.
- this->thr_count_ -= n_threads;
- return -1;
- }
- else
- {
- if (this->grp_id_ == -1)
- this->grp_id_ = grp_spawned;
- return 0;
- }
-#else
- {
- // Keep the compiler from complaining.
- ACE_UNUSED_ARG (flags);
- ACE_UNUSED_ARG (n_threads);
- ACE_UNUSED_ARG (force_active);
- ACE_UNUSED_ARG (priority);
- ACE_UNUSED_ARG (grp_id);
- ACE_UNUSED_ARG (task);
- ACE_UNUSED_ARG (thread_handles);
- ACE_UNUSED_ARG (stack);
- ACE_UNUSED_ARG (stack_size);
- ACE_UNUSED_ARG (thread_ids);
- ACE_NOTSUP_RETURN (-1);
- }
-#endif /* ACE_MT_SAFE */
-}
-
-void
-ACE_Task_Base::cleanup (void *object, void *)
-{
- ACE_Task_Base *t = (ACE_Task_Base *) object;
-
- // The thread count must be decremented first in case the <close>
- // hook does something crazy like "delete this".
- t->thr_count_dec ();
- // @@ Is it possible to pass in the exit status somehow?
- t->close ();
-}
-
-#if defined (ACE_HAS_SIG_C_FUNC)
-extern "C" void
-ACE_Task_Base_cleanup (void *object, void *)
-{
- ACE_Task_Base::cleanup (object, 0);
-}
-#endif /* ACE_HAS_SIG_C_FUNC */
-
-void *
-ACE_Task_Base::svc_run (void *args)
-{
- ACE_TRACE ("ACE_Task_Base::svc_run");
-
- ACE_Task_Base *t = (ACE_Task_Base *) args;
-
- // Register ourself with our <Thread_Manager>'s thread exit hook
- // mechanism so that our close() hook will be sure to get invoked
- // when this thread exits.
-
-#if defined ACE_HAS_SIG_C_FUNC
- t->thr_mgr ()->at_exit (t, ACE_Task_Base_cleanup, 0);
-#else
- t->thr_mgr ()->at_exit (t, ACE_Task_Base::cleanup, 0);
-#endif /* ACE_HAS_SIG_C_FUNC */
-
- // Call the Task's svc() hook method.
- void * status = (void *) t->svc ();
-
-// If we changed this zero change the other if in OS.cpp Thread_Adapter::invoke
-#if 1
- // Call the <Task->close> hook.
- ACE_Thread_Manager *thr_mgr_ptr = t->thr_mgr ();
-
- // This calls the Task->close () hook.
- t->cleanup (t, 0);
-
- // This prevents a second invocation of the cleanup code
- // (called later by <ACE_Thread_Manager::exit>.
- thr_mgr_ptr->at_exit (t, 0, 0);
-#endif
- return status;
-}
-
-// Forward the call to close() so that existing applications don't
-// break.
-
-int
-ACE_Task_Base::module_closed (void)
-{
- return this->close (1);
-}
diff --git a/ace/Task.h b/ace/Task.h
deleted file mode 100644
index 0dcb6a7811c..00000000000
--- a/ace/Task.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Task.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_TASK_H
-#define ACE_TASK_H
-#include "ace/pre.h"
-
-#include "ace/Service_Object.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Thread_Manager.h"
-
-class ACE_Export ACE_Task_Flags
-{
-public:
- // = TITLE
- // These flags are used within the ACE_Task.
- //
- // = DESCRIPTION
- // These flags should be hidden within ACE_Task. Unfortunately, the
- // HP/UX C++ compiler can't grok this... Fortunately, there's no
- // code defined here, so we don't have to worry about multiple
- // definitions.
- enum
- {
- ACE_READER = 01, // Identifies a Task as being the "reader" in a Module.
- ACE_FLUSHDATA = 02, // Just flush data messages in the queue.
- ACE_FLUSHALL = 04, // Flush all messages in the Queue.
- ACE_FLUSHR = 010, // flush read queue
- ACE_FLUSHW = 020, // flush write queue
- ACE_FLUSHRW = 030 // flush both queues
- };
-};
-
-class ACE_Export ACE_Task_Base : public ACE_Service_Object
-{
- // = TITLE
- // Direct base class for the ACE_Task template.
- //
- // = DESCRIPTION
- // This class factors out the non-template code in order to
- // reduce template bloat, as well as to make it possible for the
- // <ACE_Thread_Manager> to store <ACE_Task_Base> *'s
- // polymorphically.
-public:
- // = Initialization and termination methods.
- ACE_Task_Base (ACE_Thread_Manager * = 0);
- // Constructor.
-
- virtual ~ACE_Task_Base (void);
- // Destructor.
-
- // = Initialization and termination hooks.
-
- // These methods should be overridden by subclasses if you'd like to
- // provide <Task>-specific initialization and termination behavior.
-
- virtual int open (void *args = 0);
- // Hook called to open a Task. <args> can be used to pass arbitrary
- // information into <open>.
-
- virtual int close (u_long flags = 0);
- // Hook called from <ACE_Thread_Exit> when during thread exit and from
- // the default implemenation of <module_closed>. In general, this
- // method shouldn't be called directly by an application,
- // particularly if the <Task> is running as an Active Object.
- // Instead, a special message should be passed into the <Task> via
- // the <put> method defined below, and the <svc> method should
- // interpret this as a flag to shut down the <Task>.
-
- virtual int module_closed (void);
- // Hook called during <ACE_Module::close>. The default
- // implementation calls forwards the call to close(1). Please
- // notice the changed value of the default argument of <close>.
- // This allows tasks to differ between the call has been originated
- // from <ACE_Thread_Exit> or from <module_closed>. Be aware that
- // close(0) will be also called when a thread associated with the
- // ACE_Task instance exits.
-
- // = Immediate and deferred processing methods, respectively.
-
- // These methods should be overridden by subclasses if you'd like to
- // provide <Task>-specific message processing behavior.
-
- virtual int put (ACE_Message_Block *, ACE_Time_Value * = 0);
- // Transfer msg into the queue to handle immediate processing.
-
- virtual int svc (void);
- // Run by a daemon thread to handle deferred processing.
-
- // = Active object activation method.
- virtual int activate (long flags = THR_NEW_LWP | THR_JOINABLE,
- int n_threads = 1,
- int force_active = 0,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- int grp_id = -1,
- ACE_Task_Base *task = 0,
- ACE_hthread_t thread_handles[] = 0,
- void *stack[] = 0,
- size_t stack_size[] = 0,
- ACE_thread_t thread_ids[] = 0);
- // Turn the task into an active object, i.e., having <n_threads> of
- // control, all running at the <priority> level (see below) with the
- // same <grp_id>, all of which invoke <Task::svc>. Returns -1 if
- // failure occurs, returns 1 if Task is already an active object and
- // <force_active> is false (i.e., do *not* create a new thread in
- // this case), and returns 0 if Task was not already an active
- // object and a thread is created successfully or thread is an
- // active object and <force_active> is true. Note that if
- // <force_active> is true and there are already threads spawned in
- // this <Task>, the <grp_id> parameter is ignored and the <grp_id>
- // of any newly activated thread(s) will inherit the existing
- // <grp_id> of the existing thread(s) in the <Task>.
- //
- // The <{flags}> are a bitwise-OR of the following:
- // = BEGIN<INDENT>
- // THR_CANCEL_DISABLE, THR_CANCEL_ENABLE, THR_CANCEL_DEFERRED,
- // THR_CANCEL_ASYNCHRONOUS, THR_BOUND, THR_NEW_LWP, THR_DETACHED,
- // THR_SUSPENDED, THR_DAEMON, THR_JOINABLE, THR_SCHED_FIFO,
- // THR_SCHED_RR, THR_SCHED_DEFAULT
- // = END<INDENT>
- //
- // By default, or if <{priority}> is set to
- // ACE_DEFAULT_THREAD_PRIORITY, an "appropriate" priority value for
- // the given scheduling policy (specified in <{flags}>, e.g.,
- // <THR_SCHED_DEFAULT>) is used. This value is calculated
- // dynamically, and is the median value between the minimum and
- // maximum priority values for the given policy. If an explicit
- // value is given, it is used. Note that actual priority values are
- // EXTREMEMLY implementation-dependent, and are probably best
- // avoided.
- //
- // If <thread_handles> != 0 it is assumed to be an array of <n>
- // thread_handles that will be assigned the values of the thread
- // handles being spawned. Returns -1 on failure (<errno> will
- // explain...), otherwise returns the group id of the threads.
- //
- // If <stack> != 0 it is assumed to be an array of <n> pointers to
- // the base of the stacks to use for the threads being spawned.
- // Likewise, if <stack_size> != 0 it is assumed to be an array of
- // <n> values indicating how big each of the corresponding <stack>s
- // are.
-
- virtual int wait (void);
- // Wait for all threads running in this task to exit.
-
- // = Suspend/resume a Task.
-
- // Note that these methods are not portable and should be avoided
- // since they are inherently error-prone to use. They are only here
- // for (the rare) applications that know how to use them correctly.
- virtual int suspend (void);
- // Suspend a task.
- virtual int resume (void);
- // Resume a suspended task.
-
- int grp_id (void) const;
- // Get the current group id.
-
- void grp_id (int);
- // Set the current group id.
-
- ACE_Thread_Manager *thr_mgr (void) const;
- // Gets the thread manager associated with this Task.
-
- void thr_mgr (ACE_Thread_Manager *);
- // Set the thread manager associated with this Task.
-
- int is_reader (void) const;
- // True if queue is a reader, else false.
-
- int is_writer (void) const;
- // True if queue is a writer, else false.
-
- size_t thr_count (void) const;
- // Returns the number of threads currently running within a task.
- // If we're a passive object this value is 0, else it's greater than
- // 0.
-
- void thr_count_dec (void);
- // Atomically decrement the thread count by 1. This should only be
- // called by the <ACE_Thread_Exit> class destructor.
-
- static void *svc_run (void *);
- // Routine that runs the service routine as a daemon thread.
-
- static void cleanup (void *object, void *params);
- // Cleanup hook that is called when a thread exits to gracefully
- // shutdown an <ACE_Task>.
-
- // = Internal data (should be private...).
-// private:
-
- size_t thr_count_;
- // Count of the number of threads running within the task. If this
- // value is great than 0 then we're an active object and the value
- // of <thr_count_> is the number of active threads at this instant.
- // If the value == 0, then we're a passive object.
-
- ACE_Thread_Manager *thr_mgr_;
- // Multi-threading manager.
-
- u_long flags_;
- // ACE_Task flags.
-
- int grp_id_;
- // This maintains the group id of the Task.
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_Thread_Mutex lock_;
- // Protect the state of a Task during concurrent operations, but
- // only if we're configured as MT safe...
-#endif /* ACE_MT_SAFE */
-
-private:
-
- // = Disallow these operations.
- ACE_Task_Base &operator= (const ACE_Task_Base &);
- ACE_Task_Base (const ACE_Task_Base &);
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Task.i"
-#endif /* __ACE_INLINE__ */
-
-// Include the ACE_Task templates classes at this point.
-#include "ace/Task_T.h"
-
-#include "ace/post.h"
-#endif /* ACE_TASK_H */
diff --git a/ace/Task.i b/ace/Task.i
deleted file mode 100644
index fd9f992579b..00000000000
--- a/ace/Task.i
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Task.i
-
-ACE_INLINE ACE_Thread_Manager *
-ACE_Task_Base::thr_mgr (void) const
-{
- ACE_TRACE ("ACE_Task_Base::thr_mgr");
- return this->thr_mgr_;
-}
-
-ACE_INLINE void
-ACE_Task_Base::thr_mgr (ACE_Thread_Manager *thr_mgr)
-{
- ACE_TRACE ("ACE_Task_Base::thr_mgr");
- this->thr_mgr_ = thr_mgr;
-}
-
-// Return the count of the current number of threads.
-ACE_INLINE size_t
-ACE_Task_Base::thr_count (void) const
-{
- ACE_TRACE ("ACE_Task_Base::thr_count");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, (ACE_Thread_Mutex &) this->lock_, 0));
-
- return this->thr_count_;
-}
-
-// Decrement the count of the active threads by 1.
-
-ACE_INLINE void
-ACE_Task_Base::thr_count_dec (void)
-{
- ACE_TRACE ("ACE_Task_Base::thr_count_dec");
- ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon, this->lock_));
-
- this->thr_count_--;
-}
-
-ACE_INLINE int
-ACE_Task_Base::is_reader (void) const
-{
- ACE_TRACE ("ACE_Task_Base::is_reader");
- return (ACE_BIT_ENABLED (this->flags_, ACE_Task_Flags::ACE_READER));
-}
-
-ACE_INLINE int
-ACE_Task_Base::is_writer (void) const
-{
- ACE_TRACE ("ACE_Task_Base::is_writer");
- return (ACE_BIT_DISABLED (this->flags_, ACE_Task_Flags::ACE_READER));
-}
-
-// Default ACE_Task service routine
-
-ACE_INLINE int
-ACE_Task_Base::svc (void)
-{
- ACE_TRACE ("ACE_Task_Base::svc");
- return 0;
-}
-
-// Default ACE_Task open routine
-
-ACE_INLINE int
-ACE_Task_Base::open (void *)
-{
- ACE_TRACE ("ACE_Task_Base::open");
- return 0;
-}
-
-// Default ACE_Task close routine
-
-ACE_INLINE int
-ACE_Task_Base::close (u_long)
-{
- ACE_TRACE ("ACE_Task_Base::close");
- return 0;
-}
-
-// Default ACE_Task put routine.
-
-ACE_INLINE int
-ACE_Task_Base::put (ACE_Message_Block *, ACE_Time_Value *)
-{
- ACE_TRACE ("ACE_Task_Base::put");
- return 0;
-}
-
-// Get the current group id.
-ACE_INLINE int
-ACE_Task_Base::grp_id (void) const
-{
- ACE_TRACE ("ACE_Task_Base::grp_id");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, (ACE_Thread_Mutex &) this->lock_, -1));
- return this->grp_id_;
-}
-
-// Set the current group id.
-
-ACE_INLINE void
-ACE_Task_Base::grp_id (int id)
-{
- ACE_TRACE ("ACE_Task_Base::grp_id");
- ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon, this->lock_));
-
- // Cache the group id in the task and then set it in the
- // Thread_Manager, if there is one.
- this->grp_id_ = id;
- if (this->thr_mgr ())
- this->thr_mgr ()->set_grp (this, id);
-}
-
diff --git a/ace/Task_T.cpp b/ace/Task_T.cpp
deleted file mode 100644
index 0d2be69edbd..00000000000
--- a/ace/Task_T.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// Task.cpp
-// $Id$
-
-#ifndef ACE_TASK_T_C
-#define ACE_TASK_T_C
-
-#include "ace/Task_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Module.h"
-#include "ace/Service_Config.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Task_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Task_T, "$Id$")
-
-template <ACE_SYNCH_DECL> void
-ACE_Task<ACE_SYNCH_USE>::dump (void) const
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_mgr_ = %x"), this->thr_mgr_));
- this->msg_queue_->dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_msg_queue_ = %d\n"), this->delete_msg_queue_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags = %x"), this->flags_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmod_ = %x"), this->mod_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_ = %x"), this->next_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_count_ = %d"), this->thr_count_));
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- this->lock_.dump ();
-#endif /* ACE_MT_SAFE */
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// If the user doesn't supply a ACE_Message_Queue pointer then we'll
-// allocate one dynamically. Otherwise, we'll use the one they give.
-
-template<ACE_SYNCH_DECL>
-ACE_Task<ACE_SYNCH_USE>::ACE_Task (ACE_Thread_Manager *thr_man,
- ACE_Message_Queue<ACE_SYNCH_USE> *mq)
- : ACE_Task_Base (thr_man),
- msg_queue_ (0),
- delete_msg_queue_ (0),
- mod_ (0),
- next_ (0)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::ACE_Task");
-
- if (mq == 0)
- {
- ACE_NEW (mq,
- ACE_Message_Queue<ACE_SYNCH_USE>);
- this->delete_msg_queue_ = 1;
- }
-
- this->msg_queue_ = mq;
-}
-
-template<ACE_SYNCH_DECL>
-ACE_Task<ACE_SYNCH_USE>::~ACE_Task (void)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::~ACE_Task");
- if (this->delete_msg_queue_)
- delete this->msg_queue_;
-
- // These assignments aren't strickly necessary but they help guard
- // against odd race conditions...
- this->delete_msg_queue_ = 0;
-}
-
-template<ACE_SYNCH_DECL> ACE_Task<ACE_SYNCH_USE> *
-ACE_Task<ACE_SYNCH_USE>::sibling (void)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::sibling");
- if (this->mod_ == 0)
- return 0;
- else
- return this->mod_->sibling (this);
-}
-
-template<ACE_SYNCH_DECL> const ACE_TCHAR *
-ACE_Task<ACE_SYNCH_USE>::name (void) const
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::name");
- if (this->mod_ == 0)
- return 0;
- else
- return this->mod_->name ();
-}
-
-template<ACE_SYNCH_DECL> ACE_Module<ACE_SYNCH_USE> *
-ACE_Task<ACE_SYNCH_USE>::module (void) const
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::module");
- return this->mod_;
-}
-
-#endif /* ACE_TASK_T_C */
diff --git a/ace/Task_T.h b/ace/Task_T.h
deleted file mode 100644
index 3374fb6d42a..00000000000
--- a/ace/Task_T.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Task_T.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_TASK_T_H
-#define ACE_TASK_T_H
-#include "ace/pre.h"
-
-#include "ace/Message_Queue.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch_T.h"
-#include "ace/Task.h"
-
-// Forward decls...
-template <ACE_SYNCH_DECL> class ACE_Module;
-
-template <ACE_SYNCH_DECL>
-class ACE_Task : public ACE_Task_Base
-{
- // = TITLE
- // Primary interface for application message processing, as well
- // as input and output message queueing.
- //
- // = DESCRIPTION
- // This class serves as the basis for passive and active objects
- // in ACE.
-public:
- friend class ACE_Module<ACE_SYNCH_USE>;
- friend class ACE_Module_Type;
-
- // = Initialization/termination methods.
- ACE_Task (ACE_Thread_Manager *thr_mgr = 0,
- ACE_Message_Queue<ACE_SYNCH_USE> *mq = 0);
- // Initialize a Task, supplying a thread manager and a message
- // queue. If the user doesn't supply a ACE_Message_Queue pointer
- // then we'll allocate one dynamically. Otherwise, we'll use the
- // one passed as a parameter.
-
- virtual ~ACE_Task (void);
- // Destructor.
-
- ACE_Message_Queue<ACE_SYNCH_USE> *msg_queue (void);
- // Gets the message queue associated with this task.
-
- void msg_queue (ACE_Message_Queue<ACE_SYNCH_USE> *);
- // Sets the message queue associated with this task.
-
-public: // Should be protected:
- // = Message queue manipulation methods.
-
- // = Enqueue and dequeue methods.
-
- // For the following five method if <timeout> == 0, the caller will
- // block until action is possible, else will wait until the
- // <{absolute}> time specified in *<timeout> elapses). These calls
- // will return, however, when queue is closed, deactivated, when a
- // signal occurs, or if the time specified in timeout elapses, (in
- // which case errno = EWOULDBLOCK).
-
- int putq (ACE_Message_Block *, ACE_Time_Value *timeout = 0);
- // Insert message into the message queue. Note that <timeout> uses
- // <{absolute}> time rather than <{relative}> time.
-
- int getq (ACE_Message_Block *&mb, ACE_Time_Value *timeout = 0);
- // Extract the first message from the queue (blocking). Note that
- // <timeout> uses <{absolute}> time rather than <{relative}> time.
-
- int ungetq (ACE_Message_Block *, ACE_Time_Value *timeout = 0);
- // Return a message to the queue. Note that <timeout> uses
- // <{absolute}> time rather than <{relative}> time.
-
- int reply (ACE_Message_Block *, ACE_Time_Value *timeout = 0);
- // Turn the message around and send it back down the Stream. Note
- // that <timeout> uses <{absolute}> time rather than <{relative}>
- // time.
-
- int put_next (ACE_Message_Block *msg, ACE_Time_Value *timeout = 0);
- // Transfer message to the adjacent ACE_Task in a ACE_Stream. Note
- // that <timeout> uses <{absolute}> time rather than <{relative}>
- // time.
-
- int can_put (ACE_Message_Block *);
- // Tests whether we can enqueue a message without blocking.
-
- // = ACE_Task utility routines to identify names et al.
- const ACE_TCHAR *name (void) const;
- // Return the name of the enclosing Module if there's one associated
- // with the Task, else returns 0.
-
- // = Pointers to next ACE_Task_Base (if ACE is part of an ACE_Stream).
- ACE_Task<ACE_SYNCH_USE> *next (void);
- // Get next Task pointer.
- void next (ACE_Task<ACE_SYNCH_USE> *);
- // Set next Task pointer.
-
- ACE_Task<ACE_SYNCH_USE> *sibling (void);
- // Return the Task's sibling if there's one associated with the
- // Task's Module, else returns 0.
-
- ACE_Module<ACE_SYNCH_USE> *module (void) const;
- // Return the Task's Module if there is one, else returns 0.
-
- int flush (u_long flag = ACE_Task_Flags::ACE_FLUSHALL);
- // Flush the queue. Note that if this conflicts with the C++
- // iostream <flush> function, just rewrite the iostream function as
- // ::<flush>.
-
- // = Special routines corresponding to certain message types.
-
- void water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds, size_t);
- // Manipulate watermarks.
-
- ACE_Message_Queue<ACE_SYNCH_USE> *msg_queue_;
- // Queue of messages on the ACE_Task..
-
- int delete_msg_queue_;
- // 1 if should delete Message_Queue, 0 otherwise.
-
- ACE_Module<ACE_SYNCH_USE> *mod_;
- // Back-pointer to the enclosing module.
-
- ACE_Task<ACE_SYNCH_USE> *next_;
- // Pointer to adjacent ACE_Task.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
-
- // = Disallow these operations.
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Task<ACE_SYNCH_USE> &))
- ACE_UNIMPLEMENTED_FUNC (ACE_Task (const ACE_Task<ACE_SYNCH_USE> &))
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Task_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Task_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Task_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_TASK_T_H */
diff --git a/ace/Task_T.i b/ace/Task_T.i
deleted file mode 100644
index 1a78650279f..00000000000
--- a/ace/Task_T.i
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Task_T.i
-
-template <ACE_SYNCH_DECL> ACE_INLINE void
-ACE_Task<ACE_SYNCH_USE>::water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd,
- size_t wm_size)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::water_marks");
- if (cmd == ACE_IO_Cntl_Msg::SET_LWM)
- this->msg_queue_->low_water_mark (wm_size);
- else /* cmd == ACE_IO_Cntl_Msg::SET_HWM */
- this->msg_queue_->high_water_mark (wm_size);
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Task<ACE_SYNCH_USE>::getq (ACE_Message_Block *&mb, ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::getq");
- return this->msg_queue_->dequeue_head (mb, tv);
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Task<ACE_SYNCH_USE>::can_put (ACE_Message_Block *)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::can_put");
- assert (!"not implemented");
- return -1;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Task<ACE_SYNCH_USE>::putq (ACE_Message_Block *mb, ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::putq");
- return this->msg_queue_->enqueue_tail (mb, tv);
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Task<ACE_SYNCH_USE>::ungetq (ACE_Message_Block *mb, ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::ungetq");
- return this->msg_queue_->enqueue_head (mb, tv);
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Task<ACE_SYNCH_USE>::flush (u_long flag)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::flush");
- if (ACE_BIT_ENABLED (flag, ACE_Task_Flags::ACE_FLUSHALL))
- return this->msg_queue_ != 0 && this->msg_queue_->close ();
- else
- return -1; // Note, need to be more careful about what we free...
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE void
-ACE_Task<ACE_SYNCH_USE>::msg_queue (ACE_Message_Queue<ACE_SYNCH_USE> *mq)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::msg_queue");
- if (this->delete_msg_queue_)
- {
- delete this->msg_queue_;
- this->delete_msg_queue_ = 0;
- }
- this->msg_queue_ = mq;
-}
-
-template <ACE_SYNCH_DECL> ACE_Message_Queue<ACE_SYNCH_USE> *
-ACE_Task<ACE_SYNCH_USE>::msg_queue (void)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::msg_queue");
- return this->msg_queue_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Task<ACE_SYNCH_USE>::reply (ACE_Message_Block *mb, ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::reply");
- return this->sibling ()->put_next (mb, tv);
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE ACE_Task<ACE_SYNCH_USE> *
-ACE_Task<ACE_SYNCH_USE>::next (void)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::next");
- return this->next_;
-}
-
-template <ACE_SYNCH_DECL> ACE_INLINE void
-ACE_Task<ACE_SYNCH_USE>::next (ACE_Task<ACE_SYNCH_USE> *q)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::next");
- this->next_ = q;
-}
-
-// Transfer msg to the next ACE_Task.
-
-template <ACE_SYNCH_DECL> ACE_INLINE int
-ACE_Task<ACE_SYNCH_USE>::put_next (ACE_Message_Block *msg, ACE_Time_Value *tv)
-{
- ACE_TRACE ("ACE_Task<ACE_SYNCH_USE>::put_next");
- return this->next_ == 0 ? -1 : this->next_->put (msg, tv);
-}
diff --git a/ace/Template_Instantiations.cpp b/ace/Template_Instantiations.cpp
deleted file mode 100644
index 0aa01515cc5..00000000000
--- a/ace/Template_Instantiations.cpp
+++ /dev/null
@@ -1,365 +0,0 @@
-// $Id$
-
-// Note: this file has been created through concatenation of ALL
-// explicit template instantiations in ACE, and only those that
-// interfered with the multithreaded port of ACE to pSOS using the
-// Diab D-C++ 4.1a compiler have been wrapped with the appropriate
-// preprocesor directives for conditional compilation. If you are
-// trying to use this file, you will need to ensure that any
-// additional preprocessor directives needed are added. Also, if you
-// wish to extend this technique to instantiation pragmas, you will
-// need to modify the preprocesor directives below
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_FILE)
-
-// header files that are not already included
-#include "ace/Local_Tokens.h"
-#include "ace/Token.h"
-#include "ace/Containers.h"
-#include "ace/Obstack.h"
-#include "ace/Select_Reactor.h"
-#include "ace/Message_Queue.h"
-#include "ace/Module.h"
-#include "ace/Name_Space.h"
-#include "ace/Stream.h"
-#include "ace/Stream_Modules.h"
-#include "ace/Dynamic.h"
-#include "ace/Local_Name_Space_T.h"
-#include "ace/Filecache.h"
-#include "ace/Token_Invariants.h"
-#include "ace/Remote_Tokens.h"
-#include "ace/Singleton.h"
-#include "ace/Timer_Hash.h"
-#include "ace/Timer_Wheel_T.h"
-#include "ace/Auto_Ptr.h"
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#error ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_FILE may not be used with ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION or ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA
-#endif /* defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) */
-
-// D E P T H = 0
-// Templates with nesting depth 0 (no dependencies on
-// other templates), ordered by number of template arguments
-
-ACE_MT (template class ACE_Guard<ACE_Recursive_Thread_Mutex>);
-
-// ACE_MT (template class ACE_Guard<ACE_SELECT_REACTOR_MUTEX>);
-ACE_MT (template class ACE_Guard<ACE_Local_Mutex>);
-ACE_MT (template class ACE_Guard<ACE_Token>);
-
-ACE_MT (template class ACE_Guard<ACE_Thread_Mutex>);
-
-template class ACE_Guard<ACE_Lock>;
-template class ACE_Guard<ACE_Null_Mutex>;
-template class ACE_Guard<ACE_Process_Mutex>;
-template class ACE_Guard<ACE_RW_Process_Mutex>;
-template class ACE_Guard<ACE_RW_Thread_Mutex>;
-
-ACE_MT (template class ACE_TSS_Guard<ACE_Recursive_Thread_Mutex>);
-
-template class ACE_Array<ACE_Mutex *>;
-template class ACE_Array_Base<ACE_Mutex *>;
-template class ACE_Array<ACE_RW_Thread_Mutex *>;
-template class ACE_Array_Base<ACE_RW_Thread_Mutex *>;
-template class ACE_Array<ACE_TSS_Info>;
-template class ACE_Array_Base<ACE_TSS_Info>;
-template class ACE_Array<ACE_Thread_Mutex *>;
-template class ACE_Array_Base<ACE_Thread_Mutex *>;
-template class ACE_Array_Iterator<ACE_TSS_Info>;
-
-// ACE_PROCESS_MUTEX is defined in Malloc.h,
-// depending on whether ACE_HAS_THREADS is defined
-#if defined (ACE_HAS_MALLOC_STATS)
-template class ACE_Atomic_Op<ACE_PROCESS_MUTEX, int>;
-#endif /* ACE_HAS_MALLOC_STATS */
-
-template class ACE_Auto_Array_Ptr<struct ifreq>;
-template class ACE_Auto_Basic_Array_Ptr<struct ifreq>;
-template class ACE_Auto_Basic_Ptr<ACE_Obstack>;
-
-template class ACE_Cleanup_Adapter<ACE_Log_Msg>;
-template class ACE_Cleanup_Adapter<ACE_Mutex>;
-template class ACE_Cleanup_Adapter<ACE_Null_Mutex>;
-template class ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex>;
-
-// ACE_SYNCH_RW_MUTEX is defined in Synch_T.h
-template class ACE_Cleanup_Adapter<ACE_SYNCH_RW_MUTEX>;
-
-template class ACE_Cleanup_Adapter<ACE_Thread_Mutex>;
-template class ACE_Double_Linked_List<ACE_Thread_Descriptor>;
-template class ACE_Double_Linked_List_Iterator_Base<ACE_Thread_Descriptor>;
-template class ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor>;
-template class ACE_Double_Linked_List_Reverse_Iterator<ACE_Thread_Descriptor>;
-// ACE_SYNCH_RECURSIVE_MUTEX is defined in Synch_T.h
-template class ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>;
-
-template class ACE_Lock_Adapter<ACE_Select_Reactor_Token>;
-
-template class ACE_Managed_Object<ACE_Mutex>;
-template class ACE_Managed_Object<ACE_Null_Mutex>;
-template class ACE_Managed_Object<ACE_Recursive_Thread_Mutex>;
-
-// ACE_SYNCH_RW_MUTEX is defined in Synch_T.h
-template class ACE_Managed_Object<ACE_SYNCH_RW_MUTEX>;
-template class ACE_Managed_Object<ACE_SYNCH_RW_MUTEX>;
-
-template class ACE_Managed_Object<ACE_Thread_Mutex>;
-
-// ACE_NULL_SYNCH is defined in Synch_T.h
-template class ACE_Message_Queue<ACE_NULL_SYNCH>;
-
-// ACE_SYNCH is defined in Synch_T.h
-template class ACE_Message_Queue<ACE_SYNCH>;
-
-// ACE_NULL_SYNCH is defined in Synch_T.h
-template class ACE_Module<ACE_NULL_SYNCH>;
-
-// ACE_SYNCH is defined in Synch_T.h
-template class ACE_Module<ACE_SYNCH>;
-
-template class ACE_Node <ACE_TPQ_Entry *>;
-template class ACE_Node<ACE_Cleanup_Info>;
-template class ACE_Node<ACE_Event_Tuple>;
-template class ACE_Node<ACE_Name_Binding>;
-template class ACE_Node<ACE_Static_Svc_Descriptor *>;
-template class ACE_Node<ACE_TSS_Ref>;
-template class ACE_Node<ACE_Thread_Descriptor*>;
-template class ACE_Node<ACE_Thread_Descriptor>;
-
-template class ACE_Node<ACE_WString>;
-
-// ACE_TCHAR is defined in OS.h
-template class ACE_Node<ACE_TCHAR *>;
-
-template class ACE_Read_Guard<ACE_Null_Mutex>;
-template class ACE_Read_Guard<ACE_RW_Process_Mutex>;
-template class ACE_Read_Guard<ACE_RW_Thread_Mutex>;
-
-// ACE_SYNCH is defined in Synch_T.h
-template class ACE_Stream<ACE_SYNCH>;
-template class ACE_Stream_Head<ACE_SYNCH>;
-template class ACE_Stream_Tail<ACE_SYNCH>;
-
-template class ACE_TSS <ACE_SOCK_Stream>;
-template class ACE_TSS <ACE_TPQ_Entry>;
-template class ACE_TSS<ACE_Dynamic>;
-template class ACE_TSS<ACE_TSS_Keys>;
-template class ACE_TSS<ACE_Thread_Exit>;
-
-// ACE_NULL_SYNCH is defined in Synch_T.h
-template class ACE_Task<ACE_NULL_SYNCH>;
-
-// ACE_SYNCH is defined in Synch_T.h
-template class ACE_Task<ACE_SYNCH>;
-
-// ACE_NULL_SYNCH is defined in Synch_T.h
-template class ACE_Thru_Task<ACE_NULL_SYNCH>;
-
-// ACE_SYNCH is defined in Synch_T.h
-template class ACE_Thru_Task<ACE_SYNCH>;
-
-template class ACE_Timer_Node_T<ACE_Event_Handler *>;
-template class ACE_Unbounded_Queue<ACE_Cleanup_Info>;
-template class ACE_Unbounded_Queue<ACE_Event_Tuple>;
-template class ACE_Unbounded_Queue<ACE_Thread_Descriptor*>;
-template class ACE_Unbounded_Queue<ACE_Thread_Descriptor>;
-
-// ACE_TCHAR is defined in OS.h
-template class ACE_Unbounded_Queue<ACE_TCHAR *>;
-
-template class ACE_Unbounded_Queue_Iterator<ACE_Cleanup_Info>;
-template class ACE_Unbounded_Queue_Iterator<ACE_Event_Tuple>;
-template class ACE_Unbounded_Queue_Iterator<ACE_Thread_Descriptor*>;
-template class ACE_Unbounded_Queue_Iterator<ACE_Thread_Descriptor>;
-
-// ACE_TCHAR is defined in OS.h
-template class ACE_Unbounded_Queue_Iterator<ACE_TCHAR *>;
-
-template class ACE_Unbounded_Set<ACE_Name_Binding>;
-template class ACE_Unbounded_Set<ACE_Static_Svc_Descriptor *>;
-template class ACE_Unbounded_Set<ACE_WString>;
-template class ACE_Unbounded_Set_Iterator<ACE_Name_Binding>;
-template class ACE_Unbounded_Set_Iterator<ACE_Static_Svc_Descriptor *>;
-template class ACE_Unbounded_Set_Iterator<ACE_WString>;
-template class ACE_Unbounded_Stack <ACE_TPQ_Entry *>;
-template class ACE_Write_Guard<ACE_Null_Mutex>;
-template class ACE_Write_Guard<ACE_RW_Process_Mutex>;
-template class ACE_Write_Guard<ACE_RW_Thread_Mutex>;
-
-// ACE_SYNCH_RW_MUTEX is defined in Synch_T.h
-template class ACE_Write_Guard<ACE_SYNCH_RW_MUTEX>;
-
-template class auto_ptr<ACE_Obstack>;
-
-// from Signal.cpp
-#if !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#define ACE_MAX_SIGNAL_HANDLERS ((size_t) 20)
-template class ACE_Fixed_Set<ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>;
-template class ACE_Fixed_Set_Iterator<ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>;
-#endif /* !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES) */
-
-// ACE_LOCAL_MEMORY_POOL, ACE_MMAP_MEMORY_POOL, and
-// ACE_LITE_MMAP_MEMORY_POOL are all defined in OS.h
-
-template class ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
-template class ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
-template class ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
-template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>;
-template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex>;
-template class ACE_Malloc_T<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex, ACE_Control_Block>;
-template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex, ACE_Control_Block>;
-template class ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex, ACE_Control_Block>;
-template class ACE_Allocator_Adapter<ACE_Malloc<ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >;
-
-template class ACE_Map_Entry <ACE_Token_Name, ACE_Tokens *>;
-template class ACE_Map_Entry<ACE_Token_Name, ACE_Mutex_Invariants *>;
-template class ACE_Map_Entry<ACE_Token_Name, ACE_RWLock_Invariants *>;
-template class ACE_Map_Entry<ACE_Token_Name, ACE_Token_Proxy *>;
-template class ACE_Module<ACE_Thread_Mutex, ACE_Condition_Thread_Mutex>;
-
-// from Remote_Tokens.cpp
-template class ACE_Singleton <ACE_TSS_Connection, ACE_SYNCH_MUTEX>;
-
-template class ACE_TSS_Singleton<ACE_Dynamic, ACE_Null_Mutex>;
-
-// from Local_Name_Space.cpp
-#if (1)
-template class ACE_Hash_Map_Entry<ACE_NS_String, ACE_NS_Internal>;
-template class ACE_Hash<ACE_NS_String>;
-template class ACE_Equal_To<ACE_NS_String>;
-template class ACE_Hash_Map_Manager<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_NS_String, ACE_NS_Internal, ACE_Hash<ACE_NS_String>, ACE_Equal_To<ACE_NS_String>, ACE_Null_Mutex>;
-#else
-template class ACE_Map_Entry<ACE_NS_String, ACE_NS_Internal>;
-template class ACE_Map_Manager<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
-#endif
-
-// from Filecache.cpp
-#if defined (ACE_HAS_TEMPLATE_SPECIALIZATION)
-template class ACE_Hash_Map_Entry<const char *, ACE_Filecache_Object *>;
-template class ACE_Hash_Map_Manager<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<const char *, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<const char *, ACE_Filecache_Object *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>;
-#else
-template class ACE_Hash_Map_Entry<ACE_TString, ACE_Filecache_Object *>;
-template class ACE_Hash<ACE_TString>;
-template class ACE_Equal_To<ACE_TString>;
-template class ACE_Hash_Map_Manager<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<ACE_TString, ACE_Filecache_Object *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString, ACE_Filecache_Object *, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_Null_Mutex>;
-#endif /* ACE_HAS_TEMPLATE_SPECIALIZATION */
-
-template class ACE_Map_Iterator<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>;
-template class ACE_Map_Manager <ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>;
-template class ACE_Map_Manager<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Manager<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Manager<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>;
-
-// D E P T H = 1
-// Templates with nesting depth 1 (dependencies on other templates 1
-// level deep), ordered by number of template arguments at top level
-
-
-// ACE_MMAP_MEMORY_POOL is defined in OS.h
-
-template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> >;
-template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> >;
-
-template class ACE_Node<ACE_Timer_Node_T<ACE_Event_Handler *> *>;
-
-// ACE_SYNCH_NULL_MUTEX is defined in Synch_T.h
-template class ACE_Cached_Allocator<ACE_Node<ACE_Event_Tuple>, ACE_SYNCH_NULL_MUTEX>;
-
-template class ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> >;
-template class ACE_Free_List<ACE_Timer_Node_T<ACE_Event_Handler *> >;
-
-// ACE_SYNCH_RECURSIVE_MUTEX is defined in Synch_T.h
-template class ACE_Timer_Heap_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Heap_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_List_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_List_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Queue_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Queue_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Wheel_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Wheel_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-
-template class ACE_Unbounded_Set<ACE_Timer_Node_T<ACE_Event_Handler *> *>;
-template class ACE_Unbounded_Set_Iterator<ACE_Timer_Node_T<ACE_Event_Handler *> *>;
-template class ACE_Locked_Free_List<ACE_Timer_Node_T<ACE_Event_Handler *>, ACE_Null_Mutex>;
-
-template class ACE_Timer_Hash_Upcall<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>, ACE_Null_Mutex>;
-
-// ACE_SYNCH_RECURSIVE_MUTEX is defined in Synch_T.h
-template class ACE_Timer_Hash_Upcall <ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Hash_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX, ACE_Hash_Timer_List>;
-template class ACE_Timer_Hash_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX, ACE_Hash_Timer_List>;
-template class ACE_Timer_Hash_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX, ACE_Hash_Timer_Heap>;
-template class ACE_Timer_Hash_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX, ACE_Hash_Timer_Heap>;
-
-// D E P T H = 2
-// Templates with nesting depth 2 (dependencies on other templates 2
-// levels deep), ordered by number of template arguments at top level
-
-template class ACE_Timer_Queue_T <ACE_Event_Handler *, ACE_Hash_Upcall, ACE_Null_Mutex>;
-
-template class ACE_Timer_Queue_Iterator_T <ACE_Event_Handler *, ACE_Hash_Upcall, ACE_Null_Mutex>;
-
-template class ACE_Timer_List_T <ACE_Event_Handler *, ACE_Hash_Upcall, ACE_Null_Mutex>;
-
-template class ACE_Timer_List_Iterator_T <ACE_Event_Handler *, ACE_Hash_Upcall, ACE_Null_Mutex>;
-
-template class ACE_Timer_Heap_T <ACE_Event_Handler *, ACE_Hash_Upcall, ACE_Null_Mutex>;
-
-template class ACE_Timer_Heap_Iterator_T <ACE_Event_Handler *, ACE_Hash_Upcall, ACE_Null_Mutex>;
-
-// ACE_MMAP_MEMORY_POOL and ACE_LITE_MMAP_MEMORY_POOL are defined in OS.h
-
-template class ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >;
-template class ACE_Name_Space_Map <ACE_Allocator_Adapter <ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> > >;
-
-template class ACE_Free_List<ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> > >;
-
-// ACE_SYNCH_NULL_MUTEX is defined in Synch_T.h
-template class ACE_Locked_Free_List<ACE_Cached_Mem_Pool_Node<ACE_Node<ACE_Event_Tuple> >, ACE_SYNCH_NULL_MUTEX>;
-
-template class ACE_Timer_Heap_T<ACE_Event_Handler*, ACE_Timer_Hash_Upcall<ACE_Event_Handler*, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>, ACE_Null_Mutex>, ACE_Null_Mutex>;
-
-template class ACE_Timer_Heap_Iterator_T<ACE_Event_Handler*, ACE_Timer_Hash_Upcall<ACE_Event_Handler*, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>, ACE_Null_Mutex>, ACE_Null_Mutex>;
-
-template class ACE_Timer_List_T<ACE_Event_Handler*, ACE_Timer_Hash_Upcall<ACE_Event_Handler*, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>, ACE_Null_Mutex>, ACE_Null_Mutex>;
-
-template class ACE_Timer_List_Iterator_T<ACE_Event_Handler*, ACE_Timer_Hash_Upcall<ACE_Event_Handler*, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>, ACE_Null_Mutex>, ACE_Null_Mutex>;
-
-template class ACE_Timer_Queue_T<ACE_Event_Handler*, ACE_Timer_Hash_Upcall<ACE_Event_Handler*, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>, ACE_Null_Mutex>, ACE_Null_Mutex>;
-
-template class ACE_Timer_Queue_Iterator_T<ACE_Event_Handler*, ACE_Timer_Hash_Upcall<ACE_Event_Handler*, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>, ACE_Null_Mutex>, ACE_Null_Mutex>;
-
-
-#endif /* defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_FILE) */
diff --git a/ace/Thread.cpp b/ace/Thread.cpp
deleted file mode 100644
index 7fa156c2488..00000000000
--- a/ace/Thread.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// Thread.cpp
-// $Id$
-
-#include "ace/Thread.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Thread.i"
-#endif /* !defined (__ACE_INLINE__) */
-
-ACE_RCSID(ace, Thread, "$Id$")
-
-#if defined (ACE_HAS_THREADS)
-
-int
-ACE_Thread::spawn_n (size_t n,
- ACE_THR_FUNC func,
- void *arg,
- long flags,
- long priority,
- void *stack[],
- size_t stack_size[],
- ACE_Thread_Adapter *thread_adapter)
-{
- ACE_TRACE ("ACE_Thread::spawn_n");
- ACE_thread_t t_id;
- size_t i;
-
- for (i = 0; i < n; i++)
- // Bail out if error occurs.
- if (ACE_OS::thr_create (func,
- arg,
- flags,
- &t_id,
- 0,
- priority,
- stack == 0 ? 0 : stack[i],
- stack_size == 0 ? 0 : stack_size[i],
- thread_adapter) != 0)
- break;
-
- return i;
-}
-
-int
-ACE_Thread::spawn_n (ACE_thread_t thread_ids[],
- size_t n,
- ACE_THR_FUNC func,
- void *arg,
- long flags,
- long priority,
- void *stack[],
- size_t stack_size[],
- ACE_hthread_t thread_handles[],
- ACE_Thread_Adapter *thread_adapter)
-{
- ACE_TRACE ("ACE_Thread::spawn_n");
- size_t i;
-
- for (i = 0; i < n; i++)
- {
- ACE_thread_t t_id;
- ACE_hthread_t t_handle;
-
- int result =
- ACE_OS::thr_create (func,
- arg,
- flags,
- &t_id,
- &t_handle,
- priority,
- stack == 0 ? 0 : stack[i],
- stack_size == 0 ? 0 : stack_size[i],
- thread_adapter);
-
- if (result == 0)
- {
- if (thread_ids != 0)
- thread_ids[i] = t_id;
- if (thread_handles != 0)
- thread_handles[i] = t_handle;
- }
- else
- // Bail out if error occurs.
- break;
- }
-
- return i;
-}
-
-#endif /* ACE_HAS_THREADS */
diff --git a/ace/Thread.h b/ace/Thread.h
deleted file mode 100644
index 8948ebda2c1..00000000000
--- a/ace/Thread.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Thread.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_THREAD_H
-#define ACE_THREAD_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class ACE_Export ACE_Thread
-{
- // = TITLE
- // Provides a wrapper for threads.
- //
- // = DESCRIPTION
- // This class provides a common interface that is mapped onto
- // POSIX Pthreads, Solaris threads, Win32 threads, VxWorks
- // threads, or pSoS threads. Note, however, that it is
- // generally a better idea to use the <ACE_Thread_Manager>
- // programming API rather than the <ACE_Thread> API since the
- // thread manager is more powerful.
-public:
- static int spawn (ACE_THR_FUNC func,
- void *arg = 0,
- long flags = THR_NEW_LWP | THR_JOINABLE,
- ACE_thread_t *t_id = 0,
- ACE_hthread_t *t_handle = 0,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- void *stack = 0,
- size_t stack_size = 0,
- ACE_Thread_Adapter *thread_adapter = 0);
- // Creates a new thread having <flags> attributes and running <func>
- // with <args> (if <thread_adapter> is non-0 then <func> and <args>
- // are ignored and are obtained from <thread_adapter>). <thr_id>
- // and <t_handle> are set to the thread's ID and handle (?),
- // respectively. The thread runs at <priority> priority (see
- // below).
- //
- // The <flags> are a bitwise-OR of the following:
- // = BEGIN<INDENT>
- // THR_CANCEL_DISABLE, THR_CANCEL_ENABLE, THR_CANCEL_DEFERRED,
- // THR_CANCEL_ASYNCHRONOUS, THR_BOUND, THR_NEW_LWP, THR_DETACHED,
- // THR_SUSPENDED, THR_DAEMON, THR_JOINABLE, THR_SCHED_FIFO,
- // THR_SCHED_RR, THR_SCHED_DEFAULT
- // = END<INDENT>
- //
- // By default, or if <priority> is set to
- // ACE_DEFAULT_THREAD_PRIORITY, an "appropriate" priority value for
- // the given scheduling policy (specified in <flags}>, e.g.,
- // <THR_SCHED_DEFAULT>) is used. This value is calculated
- // dynamically, and is the median value between the minimum and
- // maximum priority values for the given policy. If an explicit
- // value is given, it is used. Note that actual priority values are
- // EXTREMEMLY implementation-dependent, and are probably best
- // avoided.
- //
- // Note that <thread_adapter> is always deleted by <thr_create>,
- // therefore it must be allocated with global operator new.
-
- static int spawn_n (size_t n,
- ACE_THR_FUNC func,
- void *arg = 0,
- long flags = THR_NEW_LWP | THR_JOINABLE,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- void *stack[] = 0,
- size_t stack_size[] = 0,
- ACE_Thread_Adapter *thread_adapter = 0);
- // Spawn N new threads, which execute <func> with argument <arg> (if
- // <thread_adapter> is non-0 then <func> and <args> are ignored and
- // are obtained from <thread_adapter>). If <stack> != 0 it is
- // assumed to be an array of <n> pointers to the base of the stacks
- // to use for the threads being spawned. Likewise, if <stack_size>
- // != 0 it is assumed to be an array of <n> values indicating how
- // big each of the corresponding <stack>s are. Returns the number
- // of threads actually spawned (if this doesn't equal the number
- // requested then something has gone wrong and <errno> will
- // explain...).
- //
- // See also <spawn>.
-
- static int spawn_n (ACE_thread_t thread_ids[],
- size_t n,
- ACE_THR_FUNC func,
- void *arg,
- long flags,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- void *stack[] = 0,
- size_t stack_size[] = 0,
- ACE_hthread_t thread_handles[] = 0,
- ACE_Thread_Adapter *thread_adapter = 0);
- // Spawn <n> new threads, which execute <func> with argument <arg>
- // (if <thread_adapter> is non-0 then <func> and <args> are ignored
- // and are obtained from <thread_adapter>). The thread_ids of
- // successfully spawned threads will be placed into the <thread_ids>
- // buffer (which must be the same size as <n>). If <stack> != 0 it
- // is assumed to be an array of <n> pointers to the base of the
- // stacks to use for the threads being spawned. If <stack_size> !=
- // 0 it is assumed to be an array of <n> values indicating how big
- // each of the corresponding <stack>s are. If <thread_handles> != 0
- // it is assumed to be an array of <n> thread_handles that will be
- // assigned the values of the thread handles being spawned. Returns
- // the number of threads actually spawned (if this doesn't equal the
- // number requested then something has gone wrong and <errno> will
- // explain...).
- //
- // See also <spawn>.
-
- static int join (ACE_thread_t,
- ACE_thread_t *,
- void **status = 0);
- // Wait for one or more threads to exit.
-
- static int join (ACE_hthread_t,
- void ** = 0);
- // Wait for one thread to exit.
-
- static int resume (ACE_hthread_t);
- // Continue the execution of a previously suspended thread.
-
- static int suspend (ACE_hthread_t);
- // Suspend the execution of a particular thread.
-
- static int getprio (ACE_hthread_t, int &prio);
- // Get the priority of a particular thread.
-
- static int setprio (ACE_hthread_t, int prio);
- // Set the priority of a particular thread.
-
- static int kill (ACE_thread_t, int signum);
- // Send a signal to the thread.
-
- static void yield (void);
- // Yield the thread to another.
-
- static void self (ACE_hthread_t &t_handle);
- // Return the unique kernel handle of the thread. Note that on
- // Win32 this is actually a pseudohandle, which cannot be shared
- // with other processes or waited on by threads. To locate the real
- // handle, please use the <ACE_Thread_Manager::thr_self> method.
-
- static ACE_thread_t self (void);
- // Return the unique ID of the thread.
-
- static void exit (void *status = 0);
- // Exit the current thread and return "status".
- // Should _not_ be called by main thread.
-
- static int getconcurrency (void);
- // Get the LWP concurrency level of the process.
-
- static int setconcurrency (int new_level);
- // Set the LWP concurrency level of the process.
-
- static int sigsetmask (int how,
- const sigset_t *sigset,
- sigset_t *osigset = 0);
- // Change and/or examine calling thread's signal mask.
-
- static int keycreate (ACE_thread_key_t *keyp,
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_THR_C_DEST destructor,
-#else
- ACE_THR_DEST destructor,
-#endif /* ACE_HAS_THR_C_DEST */
- void * = 0);
- // Allocates a <keyp> that is used to identify data that is specific
- // to each thread in the process. The key is global to all threads
- // in the process.
-
- static int keyfree (ACE_thread_key_t key);
- // Free up the key so that other threads can reuse it.
-
- static int setspecific (ACE_thread_key_t key,
- void *value);
- // Bind value to the thread-specific data key, <key>, for the calling
- // thread.
-
- static int getspecific (ACE_thread_key_t key,
- void **valuep);
- // Stores the current value bound to <key> for the calling thread
- // into the location pointed to by <valuep>.
-
- static int disablecancel (struct cancel_state *old_state);
- // Disable thread cancellation.
-
- static int enablecancel (struct cancel_state *old_state,
- int flag);
- // Enable thread cancellation.
-
- static int setcancelstate (struct cancel_state &new_state,
- struct cancel_state *old_state);
- // Set the cancellation state.
-
- static int cancel (ACE_thread_t t_id);
- // Cancel a thread. Note that this method is only portable on
- // platforms, such as POSIX pthreads, that support thread
- // cancellation.
-
- static void testcancel (void);
- // Test the cancel.
-
-private:
- ACE_Thread (void);
- // Ensure that we don't get instantiated.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Thread.i"
-#endif /* __ACE_INLINE__ */
-#include "ace/post.h"
-#endif /* ACE_THREAD_H */
diff --git a/ace/Thread.i b/ace/Thread.i
deleted file mode 100644
index 610b84f1ad0..00000000000
--- a/ace/Thread.i
+++ /dev/null
@@ -1,272 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Thread.i
-
-// Allocates a <keyp> that is used to identify data that is specific
-// to each thread in the process. The key is global to all threads in
-// the process.
-
-ACE_INLINE int
-ACE_Thread::keycreate (ACE_thread_key_t *keyp,
-#if defined (ACE_HAS_THR_C_DEST)
- ACE_THR_C_DEST destructor,
-#else
- ACE_THR_DEST destructor,
-#endif /* ACE_HAS_THR_C_DEST */
- void *inst)
-{
- // ACE_TRACE ("ACE_Thread::keycreate");
- return ACE_OS::thr_keycreate (keyp, destructor, inst);
-}
-
-// Free up the key so that other threads can reuse it.
-
-ACE_INLINE int
-ACE_Thread::keyfree (ACE_thread_key_t key)
-{
- ACE_TRACE ("ACE_Thread::keyfree");
- return ACE_OS::thr_keyfree (key);
-}
-
-// Bind value to the thread-specific data key, <key>, for the calling
-// thread.
-
-ACE_INLINE int
-ACE_Thread::setspecific (ACE_thread_key_t key, void *value)
-{
- // ACE_TRACE ("ACE_Thread::setspecific");
- return ACE_OS::thr_setspecific (key, value);
-}
-
-// Stores the current value bound to <key> for the calling thread
-// into the location pointed to by <valuep>.
-
-ACE_INLINE int
-ACE_Thread::getspecific (ACE_thread_key_t key, void **valuep)
-{
- // ACE_TRACE ("ACE_Thread::getspecific");
- return ACE_OS::thr_getspecific (key, valuep);
-}
-
-ACE_INLINE ACE_thread_t
-ACE_Thread::self (void)
-{
-// ACE_TRACE ("ACE_Thread::self");
- return ACE_OS::thr_self ();
-}
-
-ACE_INLINE void
-ACE_Thread::exit (void *status)
-{
- ACE_TRACE ("ACE_Thread::exit");
- ACE_OS::thr_exit (status);
-}
-
-ACE_INLINE void
-ACE_Thread::yield (void)
-{
- ACE_TRACE ("ACE_Thread::yield");
- ACE_OS::thr_yield ();
-}
-
-ACE_INLINE int
-ACE_Thread::spawn (ACE_THR_FUNC func,
- void *arg,
- long flags,
- ACE_thread_t *t_id,
- ACE_hthread_t *t_handle,
- long priority,
- void *thr_stack,
- size_t thr_stack_size,
- ACE_Thread_Adapter *thread_adapter)
-{
- ACE_TRACE ("ACE_Thread::spawn");
-
- return ACE_OS::thr_create (func,
- arg,
- flags,
- t_id,
- t_handle,
- priority,
- thr_stack,
- thr_stack_size,
- thread_adapter);
-}
-
-ACE_INLINE int
-ACE_Thread::resume (ACE_hthread_t t_id)
-{
- ACE_TRACE ("ACE_Thread::resume");
- return ACE_OS::thr_continue (t_id);
-}
-
-ACE_INLINE int
-ACE_Thread::suspend (ACE_hthread_t t_id)
-{
- ACE_TRACE ("ACE_Thread::suspend");
- return ACE_OS::thr_suspend (t_id);
-}
-
-ACE_INLINE int
-ACE_Thread::kill (ACE_thread_t t_id, int signum)
-{
- ACE_TRACE ("ACE_Thread::kill");
- return ACE_OS::thr_kill (t_id, signum);
-}
-
-ACE_INLINE int
-ACE_Thread::join (ACE_thread_t wait_for,
- ACE_thread_t *departed,
- void **status)
-{
- ACE_TRACE ("ACE_Thread::join");
- return ACE_OS::thr_join (wait_for, departed, status);
-}
-
-ACE_INLINE int
-ACE_Thread::join (ACE_hthread_t wait_for,
- void **status)
-{
- ACE_TRACE ("ACE_Thread::join");
- return ACE_OS::thr_join (wait_for, status);
-}
-
-ACE_INLINE int
-ACE_Thread::getconcurrency (void)
-{
- ACE_TRACE ("ACE_Thread::getconcurrency");
- return ACE_OS::thr_getconcurrency ();
-}
-
-ACE_INLINE int
-ACE_Thread::setconcurrency (int new_level)
-{
- ACE_TRACE ("ACE_Thread::setconcurrency");
- return ACE_OS::thr_setconcurrency (new_level);
-}
-
-ACE_INLINE int
-ACE_Thread::sigsetmask (int how,
- const sigset_t *sigset,
- sigset_t *osigset)
-{
- ACE_TRACE ("ACE_Thread::sigsetmask");
- return ACE_OS::thr_sigsetmask (how, sigset, osigset);
-}
-
-ACE_INLINE int
-ACE_Thread::disablecancel (struct cancel_state *old_state)
-{
- ACE_TRACE ("ACE_Thread::disablecancel");
- int old_cstate = 0;
- int result = ACE_OS::thr_setcancelstate (THR_CANCEL_DISABLE,
- &old_cstate);
- if (result == 0 && old_state != 0)
- {
- ACE_OS::memset (old_state,
- 0,
- sizeof (old_state));
- old_state->cancelstate = old_cstate;
- }
-
- return result;
-}
-
-ACE_INLINE int
-ACE_Thread::enablecancel (struct cancel_state *old_state,
- int flag)
-{
- ACE_TRACE ("ACE_Thread::enablecancel");
- int old_cstate = 0;
- int old_ctype = 0;
- int result;
-
- result = ACE_OS::thr_setcancelstate (THR_CANCEL_ENABLE,
- &old_cstate);
- if (result != 0)
- return result;
-
- result = ACE_OS::thr_setcanceltype (flag,
- &old_ctype);
- if (result != 0)
- return result;
-
- if (old_state != 0)
- {
- old_state->cancelstate = old_cstate;
- old_state->canceltype = old_ctype;
- }
-
- return 0;
-}
-
-ACE_INLINE int
-ACE_Thread::setcancelstate (struct cancel_state &new_state,
- struct cancel_state *old_state)
-{
- ACE_TRACE ("ACE_Thread::setcancelstate");
- int old_cstate = 0;
- int old_ctype = 0;
-
- if (new_state.cancelstate != 0
- && ACE_OS::thr_setcancelstate (new_state.cancelstate,
- &old_cstate) != 0)
- return -1;
-
- if (new_state.canceltype != 0
- && ACE_OS::thr_setcanceltype (new_state.canceltype,
- &old_ctype) != 0)
- {
- int o_cstate;
-
- ACE_OS::thr_setcancelstate (old_cstate,
- &o_cstate);
- return -1;
- }
-
- if (old_state != 0)
- {
- old_state->cancelstate = old_cstate;
- old_state->canceltype = old_ctype;
- }
-
- return 0;
-}
-
-ACE_INLINE int
-ACE_Thread::cancel (ACE_thread_t t_id)
-{
- ACE_TRACE ("ACE_Thread::cancel");
-
- return ACE_OS::thr_cancel (t_id);
-}
-
-ACE_INLINE void
-ACE_Thread::testcancel (void)
-{
- ACE_TRACE ("ACE_Thread::testcancel");
-
- ACE_OS::thr_testcancel ();
-}
-
-ACE_INLINE void
-ACE_Thread::self (ACE_hthread_t &t_id)
-{
-// ACE_TRACE ("ACE_Thread::self");
- ACE_OS::thr_self (t_id);
-}
-
-ACE_INLINE int
-ACE_Thread::getprio (ACE_hthread_t t_id, int &prio)
-{
- ACE_TRACE ("ACE_Thread::getprio");
- return ACE_OS::thr_getprio (t_id, prio);
-}
-
-ACE_INLINE int
-ACE_Thread::setprio (ACE_hthread_t t_id, int prio)
-{
- ACE_TRACE ("ACE_Thread::setprio");
- return ACE_OS::thr_setprio (t_id, prio);
-}
diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp
deleted file mode 100644
index a243c754f01..00000000000
--- a/ace/Thread_Manager.cpp
+++ /dev/null
@@ -1,2415 +0,0 @@
-// $Id$
-
-#include "ace/Synch_T.h"
-#include "ace/Thread_Manager.h"
-#include "ace/Dynamic.h"
-#include "ace/Object_Manager.h"
-#include "ace/Singleton.h"
-#include "ace/Auto_Ptr.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Thread_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Thread_Manager, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Control)
-ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Manager)
-
-#if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS)
-// Process-wide Thread Manager.
-ACE_Thread_Manager *ACE_Thread_Manager::thr_mgr_ = 0;
-
-// Controls whether the Thread_Manager is deleted when we shut down
-// (we can only delete it safely if we created it!)
-int ACE_Thread_Manager::delete_thr_mgr_ = 0;
-#endif /* ! defined (ACE_THREAD_MANAGER_LACKS_STATICS) */
-
-void
-ACE_Thread_Manager::dump (void)
-{
- ACE_TRACE ("ACE_Thread_Manager::dump");
- // Cast away const-ness of this in order to use its non-const lock_.
- ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon,
- ((ACE_Thread_Manager *) this)->lock_));
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncurrent_count_ = %d"), this->thr_list_.size ()));
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- iter.next ()->dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Thread_Descriptor::~ACE_Thread_Descriptor (void)
-{
- delete this->sync_;
-}
-
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
-void ACE_Thread_Descriptor::at_pop (int apply)
-
-{
- ACE_TRACE ("ACE_Thread_Descriptor::at_pop");
- // Get first at from at_exit_list
- ACE_At_Thread_Exit* at = this->at_exit_list_;
- // Remove at from at_exit list
- this->at_exit_list_ = at->next_;
- // Apply if required
- if (apply)
- {
- at->apply ();
- // Do the apply method
- at->was_applied (1);
- // Mark at has been applied to avoid double apply from
- // at destructor
- }
- // If at is not owner delete at.
- if (!at->is_owner ())
- delete at;
-}
-
-void
-ACE_Thread_Descriptor::at_push (ACE_At_Thread_Exit* cleanup, int is_owner)
-
-{
- ACE_TRACE ("ACE_Thread_Descriptor::at_push");
- cleanup->is_owner (is_owner);
- cleanup->td_ = this;
- cleanup->next_ = at_exit_list_;
- at_exit_list_ = cleanup;
-}
-
-int
-ACE_Thread_Descriptor::at_exit (ACE_At_Thread_Exit& cleanup)
-
-{
- ACE_TRACE ("ACE_Thread_Descriptor::at_exit");
- at_push (&cleanup, 1);
- return 0;
-}
-
-int
-ACE_Thread_Descriptor::at_exit (ACE_At_Thread_Exit* cleanup)
-
-{
- ACE_TRACE ("ACE_Thread_Descriptor::at_exit");
- if (cleanup==0)
- return -1;
- else
- {
- this->at_push (cleanup);
- return 0;
- }
-}
-
-void
-ACE_Thread_Descriptor::do_at_exit ()
-
-{
- ACE_TRACE ("ACE_Thread_Descriptor::at_exit");
- while (at_exit_list_!=0)
- this->at_pop ();
-}
-
-void
-ACE_Thread_Descriptor::terminate ()
-
-{
- ACE_TRACE ("ACE_Thread_Descriptor::terminate");
-
- if (!terminated_)
- {
- terminated_ = 1;
- // Run at_exit hooks
- this->do_at_exit ();
- // We must remove Thread_Descriptor from Thread_Manager list
- if (this->tm_ != 0)
- {
- int close_handle = 0;
-
-#if !defined (VXWORKS)
- // Threads created with THR_DAEMON shouldn't exist here, but
- // just to be safe, let's put it here.
-
- if (ACE_BIT_DISABLED (this->thr_state_, ACE_Thread_Manager::ACE_THR_JOINING))
- {
- if (ACE_BIT_DISABLED (this->flags_, THR_DETACHED | THR_DAEMON)
- || ACE_BIT_ENABLED (this->flags_, THR_JOINABLE))
- {
- // Mark thread as terminated.
- ACE_SET_BITS (this->thr_state_, ACE_Thread_Manager::ACE_THR_TERMINATED);
- tm_->register_as_terminated (this);
- // Must copy the information here because td will be
- // "freed" below.
- }
-#if defined (ACE_WIN32)
- else
- {
- close_handle = 1;
- }
-#endif /* ACE_WIN32 */
- }
-#endif /* ! VXWORKS */
-
- // Remove thread descriptor from the table.
- if (this->tm_ != 0)
- tm_->remove_thr (this, close_handle);
- }
-
- // Check if we need delete ACE_Log_Msg instance
- ACE_Log_Msg* log_msg = this->log_msg_;
- // If ACE_TSS_cleanup was not executed first log_msg == 0
- if (log_msg == 0)
- {
- // Only inform to ACE_TSS_cleanup that it must delete the log instance
- // setting ACE_LOG_MSG thr_desc to 0.
- ACE_LOG_MSG->thr_desc (0);
- }
- else
- {
- // Thread_Descriptor is the owner of the Log_Msg instance!!
- // deleted.
- this->log_msg_ = 0;
- delete log_msg;
- }
- }
-}
-
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
-int
-ACE_Thread_Descriptor::at_exit (void *object,
- ACE_CLEANUP_FUNC cleanup_hook,
- void *param)
-{
- ACE_TRACE ("ACE_Thread_Descriptor::at_exit");
-#if defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- this->cleanup_info_.cleanup_hook_ = cleanup_hook;
- this->cleanup_info_.object_ = object;
- this->cleanup_info_.param_ = param;
-#else
- // To keep compatibility, when cleanup_hook is null really is a at_pop
- // without apply.
- if (cleanup_hook == 0)
- {
- if (this->at_exit_list_!= 0)
- this->at_pop(0);
- }
- else
- {
- ACE_At_Thread_Exit* cleanup;
- ACE_NEW_RETURN (cleanup,
- ACE_At_Thread_Exit_Func (object,
- cleanup_hook,
- param),
- -1);
- this->at_push (cleanup);
- }
-#endif /* ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
- return 0;
-}
-
-void
-ACE_Thread_Descriptor::dump (void) const
-{
- ACE_TRACE ("ACE_Thread_Descriptor::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_id_ = %d"), this->thr_id_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_handle_ = %d"), this->thr_handle_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_state_ = %d"), this->thr_state_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncleanup_info_.cleanup_hook_ = %x"), this->cleanup_info_.cleanup_hook_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags_ = %x\n"), this->flags_));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Thread_Descriptor::ACE_Thread_Descriptor (void)
- :
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- log_msg_ (0),
- at_exit_list_ (0),
- terminated_ (0)
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-{
- ACE_TRACE ("ACE_Thread_Descriptor::ACE_Thread_Descriptor");
- ACE_NEW (this->sync_,
- ACE_DEFAULT_THREAD_MANAGER_LOCK);
-}
-
-void
-ACE_Thread_Descriptor::acquire_release (void)
-{
- // Just try to acquire the lock then release it.
-#if defined (ACE_THREAD_MANAGER_USES_SAFE_SPAWN)
- if (ACE_BIT_DISABLED (this->thr_state_, ACE_Thread_Manager::ACE_THR_SPAWNED))
-#endif /* ACE_THREAD_MANAGER_USES_SAFE_SPAWN */
- {
- this->sync_->acquire ();
- // Acquire the lock before removing <td> from the thread table. If
- // this thread is in the table already, it should simply acquire the
- // lock easily.
-
- // Once we get the lock, we must have registered.
- ACE_ASSERT (ACE_BIT_ENABLED (this->thr_state_, ACE_Thread_Manager::ACE_THR_SPAWNED));
-
- this->sync_->release ();
- // Release the lock before putting it back to freelist.
- }
-}
-
-// The following macro simplifies subsequence code.
-#define ACE_FIND(OP,INDEX) \
- ACE_Thread_Descriptor *INDEX = OP; \
-
-ACE_Thread_Descriptor *
-ACE_Thread_Manager::thread_descriptor (ACE_thread_t thr_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::thread_descriptor");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0));
-
- ACE_FIND (this->find_thread (thr_id), ptr);
- return ptr;
-}
-
-ACE_Thread_Descriptor *
-ACE_Thread_Manager::hthread_descriptor (ACE_hthread_t thr_handle)
-{
- ACE_TRACE ("ACE_Thread_Manager::hthread_descriptor");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0));
-
- ACE_FIND (this->find_hthread (thr_handle), ptr);
- return ptr;
-}
-
-// Return the thread descriptor (indexed by ACE_hthread_t).
-
-int
-ACE_Thread_Manager::thr_self (ACE_hthread_t &self)
-{
- ACE_TRACE ("ACE_Thread_Manager::thr_self");
-
- ACE_Thread_Descriptor *desc =
- this->thread_desc_self ();
-
- if (desc == 0)
- return -1;
- else
- desc->self (self);
-
- return 0;
-}
-
-// Initialize the synchronization variables.
-
-ACE_Thread_Manager::ACE_Thread_Manager (size_t prealloc,
- size_t lwm,
- size_t inc,
- size_t hwm)
- : grp_id_ (1),
- automatic_wait_ (1)
-#if defined (ACE_HAS_THREADS)
- , zero_cond_ (lock_)
-#endif /* ACE_HAS_THREADS */
- , thread_desc_freelist_ (ACE_FREE_LIST_WITH_POOL,
- prealloc, lwm, hwm, inc)
-{
- ACE_TRACE ("ACE_Thread_Manager::ACE_Thread_Manager");
-}
-
-#if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS)
-ACE_Thread_Manager *
-ACE_Thread_Manager::instance (void)
-{
- ACE_TRACE ("ACE_Thread_Manager::instance");
-
- if (ACE_Thread_Manager::thr_mgr_ == 0)
- {
- // Perform Double-Checked Locking Optimization.
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
-
- if (ACE_Thread_Manager::thr_mgr_ == 0)
- {
- ACE_NEW_RETURN (ACE_Thread_Manager::thr_mgr_,
- ACE_Thread_Manager,
- 0);
- ACE_Thread_Manager::delete_thr_mgr_ = 1;
- }
- }
-
- return ACE_Thread_Manager::thr_mgr_;
-}
-
-ACE_Thread_Manager *
-ACE_Thread_Manager::instance (ACE_Thread_Manager *tm)
-{
- ACE_TRACE ("ACE_Thread_Manager::instance");
- ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance (), 0));
-
- ACE_Thread_Manager *t = ACE_Thread_Manager::thr_mgr_;
- // We can't safely delete it since we don't know who created it!
- ACE_Thread_Manager::delete_thr_mgr_ = 0;
-
- ACE_Thread_Manager::thr_mgr_ = tm;
- return t;
-}
-
-void
-ACE_Thread_Manager::close_singleton (void)
-{
- ACE_TRACE ("ACE_Thread_Manager::close_singleton");
-
- ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon,
- *ACE_Static_Object_Lock::instance ()));
-
- if (ACE_Thread_Manager::delete_thr_mgr_)
- {
- // First, we clean up the thread descriptor list.
- ACE_Thread_Manager::thr_mgr_->close ();
- delete ACE_Thread_Manager::thr_mgr_;
- ACE_Thread_Manager::thr_mgr_ = 0;
- ACE_Thread_Manager::delete_thr_mgr_ = 0;
- }
-}
-#endif /* ! defined (ACE_THREAD_MANAGER_LACKS_STATICS) */
-
-// Close up and release all resources.
-
-int
-ACE_Thread_Manager::close ()
-{
- ACE_TRACE ("ACE_Thread_Manager::close");
-
- // Clean up the thread descriptor list.
- if (this->automatic_wait_)
- this->wait (0, 1);
- else
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- this->remove_thr_all ();
- }
-
- return 0;
-}
-
-ACE_Thread_Manager::~ACE_Thread_Manager (void)
-{
- ACE_TRACE ("ACE_Thread_Manager::~ACE_Thread_Manager");
- this->close ();
-}
-
-#if defined (ACE_HAS_SIG_C_FUNC)
-extern "C" void
-ACE_Thread_Exit_cleanup (void *instance, void *)
-{
- ACE_TRACE ("ACE_Thread_Exit_cleanup");
-
- delete (ACE_TSS_TYPE (ACE_Thread_Exit) *) instance;
-}
-#else
-void
-ACE_Thread_Exit::cleanup (void *instance, void *)
-{
- ACE_TRACE ("ACE_Thread_Exit::cleanup");
-
- delete (ACE_TSS_TYPE (ACE_Thread_Exit) *) instance;
-}
-#endif /* ACE_HAS_SIG_C_FUNC */
-
-// NOTE: this preprocessor directive should match the one in
-// ACE_Task_Base::svc_run () below. This prevents the two statics
-// from being defined.
-
-ACE_Thread_Exit *
-ACE_Thread_Exit::instance (void)
-{
-#if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)
- ACE_TRACE ("ACE_Thread_Exit::instance");
-
- // Determines if we were dynamically allocated.
- static ACE_TSS_TYPE (ACE_Thread_Exit) *instance_;
-
- // Implement the Double Check pattern.
-
- if (ACE_Thread_Exit::is_constructed_ == 0)
- {
- ACE_MT (ACE_Thread_Mutex *lock =
- ACE_Managed_Object<ACE_Thread_Mutex>::get_preallocated_object
- (ACE_Object_Manager::ACE_THREAD_EXIT_LOCK);
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *lock, 0));
-
- if (ACE_Thread_Exit::is_constructed_ == 0)
- {
- ACE_NEW_RETURN (instance_,
- ACE_TSS_TYPE (ACE_Thread_Exit),
- 0);
-
- ACE_Thread_Exit::is_constructed_ = 1;
-
- // Register for destruction with ACE_Object_Manager.
-#if defined ACE_HAS_SIG_C_FUNC
- ACE_Object_Manager::at_exit (instance_,
- ACE_Thread_Exit_cleanup,
- 0);
-#else
- ACE_Object_Manager::at_exit (instance_,
- ACE_Thread_Exit::cleanup,
- 0);
-#endif /* ACE_HAS_SIG_C_FUNC */
- }
- }
-
- return ACE_TSS_GET (instance_, ACE_Thread_Exit);
-#else
- return 0;
-#endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */
-}
-
-// Grab hold of the Task * so that we can close() it in the
-// destructor.
-
-ACE_Thread_Exit::ACE_Thread_Exit (void)
-{
- ACE_TRACE ("ACE_Thread_Exit::ACE_Thread_Exit");
-}
-
-// Set the this pointer...
-
-void
-ACE_Thread_Exit::thr_mgr (ACE_Thread_Manager *tm)
-{
- ACE_TRACE ("ACE_Thread_Exit::thr_mgr");
-
- if (tm != 0)
- this->thread_control_.insert (tm, 0);
-}
-
-// When this object is destroyed the Task is automatically closed
-// down!
-
-ACE_Thread_Exit::~ACE_Thread_Exit (void)
-{
- ACE_TRACE ("ACE_Thread_Exit::~ACE_Thread_Exit");
-
- ACE_Thread_Exit::is_constructed_ = 0;
-}
-
-// Run the entry point for thread spawned under the control of the
-// <ACE_Thread_Manager>. This must be an extern "C" to make certain
-// compilers happy...
-//
-// The interaction with <ACE_Thread_Exit> and
-// <ace_thread_manager_adapter> works like this, with
-// ACE_HAS_THREAD_SPECIFIC_STORAGE or ACE_HAS_TSS_EMULATION:
-//
-// o Every thread in the <ACE_Thread_Manager> is run with
-// <ace_thread_manager_adapter>.
-//
-// o <ace_thread_manager_adapter> retrieves the singleton
-// <ACE_Thread_Exit> instance from <ACE_Thread_Exit::instance>.
-// The singleton gets created in thread-specific storage
-// in the first call to that function. The key point is that the
-// instance is in thread-specific storage.
-//
-// o A thread can exit by various means, such as <ACE_Thread::exit>, C++
-// or Win32 exception, "falling off the end" of the thread entry
-// point function, etc.
-//
-// o If you follow this so far, now it gets really fun . . .
-// When the thread-specific storage (for the thread that
-// is being destroyed) is cleaned up, the OS threads package (or
-// the ACE emulation of thread-specific storage) will destroy any
-// objects that are in thread-specific storage. It has a list of
-// them, and just walks down the list and destroys each one.
-//
-// o That's where the ACE_Thread_Exit destructor gets called.
-
-#if defined(ACE_USE_THREAD_MANAGER_ADAPTER)
-extern "C" void *
-ace_thread_manager_adapter (void *args)
-{
-#if defined (ACE_HAS_TSS_EMULATION)
- // As early as we can in the execution of the new thread, allocate
- // its local TS storage. Allocate it on the stack, to save dynamic
- // allocation/dealloction.
- void *ts_storage[ACE_TSS_Emulation::ACE_TSS_THREAD_KEYS_MAX];
- ACE_TSS_Emulation::tss_open (ts_storage);
-#endif /* ACE_HAS_TSS_EMULATION */
-
- ACE_Thread_Adapter *thread_args = (ACE_Thread_Adapter *) args;
-
- // NOTE: this preprocessor directive should match the one in above
- // ACE_Thread_Exit::instance (). With the Xavier Pthreads package,
- // the exit_hook in TSS causes a seg fault. So, this works around
- // that by creating exit_hook on the stack.
-#if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)
- // Obtain our thread-specific exit hook and make sure that it knows
- // how to clean us up! Note that we never use this pointer directly
- // (it's stored in thread-specific storage), so it's ok to
- // dereference it here and only store it as a reference.
- ACE_Thread_Exit &exit_hook = *ACE_Thread_Exit::instance ();
-#else
- // Without TSS, create an <ACE_Thread_Exit> instance. When this
- // function returns, its destructor will be called because the
- // object goes out of scope. The drawback with this appraoch is
- // that the destructor _won't_ get called if <thr_exit> is called.
- // So, threads shouldn't exit that way. Instead, they should return
- // from <svc>.
- ACE_Thread_Exit exit_hook;
-#endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */
-
- // Keep track of the <Thread_Manager> that's associated with this
- // <exit_hook>.
- exit_hook.thr_mgr (thread_args->thr_mgr ());
-
- // Invoke the user-supplied function with the args.
- void *status = thread_args->invoke ();
-
- return status;
-}
-#endif
-
-// Call the appropriate OS routine to spawn a thread. Should *not* be
-// called with the lock_ held...
-
-int
-ACE_Thread_Manager::spawn_i (ACE_THR_FUNC func,
- void *args,
- long flags,
- ACE_thread_t *t_id,
- ACE_hthread_t *t_handle,
- long priority,
- int grp_id,
- void *stack,
- size_t stack_size,
- ACE_Task_Base *task)
-{
- // First, threads created by Thread Manager should not be daemon threads.
- // Using assertion is probably a bit too strong. However, it helps
- // finding this kind of error as early as possible. Perhaps we can replace
- // assertion by returning error.
- ACE_ASSERT (ACE_BIT_DISABLED (flags, THR_DAEMON));
-
- // Create a new thread running <func>. *Must* be called with the
- // <lock_> held...
- // Get a "new" Thread Descriptor from the freelist.
- auto_ptr<ACE_Thread_Descriptor> new_thr_desc (this->thread_desc_freelist_.remove ());
-
- // Reset thread descriptor status
- new_thr_desc->reset (this);
-
- ACE_Thread_Adapter *thread_args = 0;
-# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
- ACE_NEW_RETURN (thread_args,
- ACE_Thread_Adapter (func,
- args,
- (ACE_THR_C_FUNC) ace_thread_adapter,
- this,
- new_thr_desc.get (),
- ACE_LOG_MSG->seh_except_selector(),
- ACE_LOG_MSG->seh_except_handler()),
- -1);
-#else
- ACE_NEW_RETURN (thread_args,
- ACE_Thread_Adapter (func,
- args,
- (ACE_THR_C_FUNC) ace_thread_adapter,
- this,
- new_thr_desc.get ()),
- -1);
-# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
-
- ACE_TRACE ("ACE_Thread_Manager::spawn_i");
- ACE_hthread_t thr_handle;
-
-#if defined (VXWORKS)
- // On VxWorks, ACE_thread_t is char *. If t_id is 0, allocate space
- // for ACE_OS::thr_create () to store the task name. If t_id is not
- // 0, and it doesn't point to a 0 char *, then the non-zero char *
- // will be used for the task name in ACE_OS::thr_create (). If t_id
- // is not 0, but does point to a 0 char *, the t_id will be set to
- // point to the task name in the TCB in ACE_OS::thr_create ().
- if (t_id == 0)
- {
- char *thr_id;
- ACE_NEW_RETURN (thr_id,
- char[16],
- -1);
- // Mark the thread ID to show that the ACE_Thread_Manager
- // allocated it.
- thr_id[0] = ACE_THR_ID_ALLOCATED;
- thr_id[1] = '\0';
- t_id = &thr_id;
- }
-#else /* ! VXWORKS */
- ACE_thread_t thr_id;
- if (t_id == 0)
- t_id = &thr_id;
-#endif /* ! VXWORKS */
-
- new_thr_desc->sync_->acquire ();
- // Acquire the <sync_> lock to block the spawned thread from
- // removing this Thread Descriptor before it gets put into our
- // thread table.
-
- int result = ACE_Thread::spawn (func,
- args,
- flags,
- t_id,
- &thr_handle,
- priority,
- stack,
- stack_size,
- thread_args);
-
- if (result != 0)
- {
- // _Don't_ clobber errno here! result is either 0 or -1, and
- // ACE_OS::thr_create () already set errno! D. Levine 28 Mar 1997
- // errno = result;
- ACE_Errno_Guard guard (errno); // Lock release may smash errno
- new_thr_desc->sync_->release ();
- return -1;
- }
- else
- {
-#if defined (ACE_HAS_WTHREADS)
- // Have to duplicate handle if client asks for it.
- // @@ How are thread handles implemented on AIX? Do they
- // also need to be duplicated?
- if (t_handle != 0)
-# if defined (ACE_HAS_WINCE)
- *t_handle = thr_handle;
-# else /* ! ACE_HAS_WINCE */
- (void) ::DuplicateHandle (::GetCurrentProcess (),
- thr_handle,
- ::GetCurrentProcess (),
- t_handle,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS);
-# endif /* ! ACE_HAS_WINCE */
-#elif defined (VXWORKS)
- if (t_handle != 0)
- *t_handle = thr_handle;
-#else /* ! ACE_HAS_WTHREADS && ! VXWORKS */
- ACE_UNUSED_ARG (t_handle);
-#endif /* ! ACE_HAS_WTHREADS && ! VXWORKS */
-
- // append_thr also put the <new_thr_desc> into Thread_Manager's
- // double-linked list. Only after this point, can we manipulate
- // double-linked list from a spawned thread's context.
- return this->append_thr (*t_id,
- thr_handle,
- ACE_THR_SPAWNED,
- grp_id,
- task,
- flags,
- new_thr_desc.release ());
- }
-}
-
-int
-ACE_Thread_Manager::spawn (ACE_THR_FUNC func,
- void *args,
- long flags,
- ACE_thread_t *t_id,
- ACE_hthread_t *t_handle,
- long priority,
- int grp_id,
- void *stack,
- size_t stack_size)
-{
- ACE_TRACE ("ACE_Thread_Manager::spawn");
-
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- if (grp_id == -1)
- grp_id = this->grp_id_++; // Increment the group id.
-
- if (this->spawn_i (func, args, flags, t_id, t_handle,
- priority, grp_id, stack, stack_size) == -1)
- return -1;
- else
- return grp_id;
-}
-
-// Create N new threads running FUNC.
-
-int
-ACE_Thread_Manager::spawn_n (size_t n,
- ACE_THR_FUNC func,
- void *args,
- long flags,
- long priority,
- int grp_id,
- ACE_Task_Base *task,
- ACE_hthread_t thread_handles[],
- void *stack[],
- size_t stack_size[])
-{
- ACE_TRACE ("ACE_Thread_Manager::spawn_n");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- if (grp_id == -1)
- grp_id = this->grp_id_++; // Increment the group id.
-
- for (size_t i = 0; i < n; i++)
- {
- // @@ What should happen if this fails?! e.g., should we try to
- // cancel the other threads that we've already spawned or what?
- if (this->spawn_i (func,
- args,
- flags,
- 0,
- thread_handles == 0 ? 0 : &thread_handles[i],
- priority,
- grp_id,
- stack == 0 ? 0 : stack[i],
- stack_size == 0 ? 0 : stack_size[i],
- task) == -1)
- return -1;
- }
-
- return grp_id;
-}
-
-// Create N new threads running FUNC.
-
-int
-ACE_Thread_Manager::spawn_n (ACE_thread_t thread_ids[],
- size_t n,
- ACE_THR_FUNC func,
- void *args,
- long flags,
- long priority,
- int grp_id,
- void *stack[],
- size_t stack_size[],
- ACE_hthread_t thread_handles[])
-{
- ACE_TRACE ("ACE_Thread_Manager::spawn_n");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- if (grp_id == -1)
- grp_id = this->grp_id_++; // Increment the group id.
-
- for (size_t i = 0; i < n; i++)
- {
- // @@ What should happen if this fails?! e.g., should we try to
- // cancel the other threads that we've already spawned or what?
- if (this->spawn_i (func,
- args,
- flags,
- thread_ids == 0 ? 0 : &thread_ids[i],
- thread_handles == 0 ? 0 : &thread_handles[i],
- priority,
- grp_id,
- stack == 0 ? 0 : stack[i],
- stack_size == 0 ? 0 : stack_size[i]) == -1)
- return -1;
- }
-
- return grp_id;
-}
-
-// Append a thread into the pool (does not check for duplicates).
-// Must be called with locks held.
-
-int
-ACE_Thread_Manager::append_thr (ACE_thread_t t_id,
- ACE_hthread_t t_handle,
- ACE_UINT32 thr_state,
- int grp_id,
- ACE_Task_Base *task,
- long flags,
- ACE_Thread_Descriptor *td)
-{
- ACE_TRACE ("ACE_Thread_Manager::append_thr");
- ACE_Thread_Descriptor *thr_desc;
-
- if (td == 0)
- {
- ACE_NEW_RETURN (thr_desc,
- ACE_Thread_Descriptor,
- -1);
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- thr_desc->tm_ = this;
- // Setup the Thread_Manager.
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
- }
- else
- thr_desc = td;
-
- thr_desc->thr_id_ = t_id;
- thr_desc->thr_handle_ = t_handle;
- thr_desc->grp_id_ = grp_id;
- thr_desc->task_ = task;
- thr_desc->flags_ = flags;
-
- this->thr_list_.insert_head (thr_desc);
- ACE_SET_BITS (thr_desc->thr_state_, thr_state);
- thr_desc->sync_->release ();
-
- return 0;
-}
-
-// Return the thread descriptor (indexed by ACE_hthread_t).
-
-ACE_Thread_Descriptor *
-ACE_Thread_Manager::find_hthread (ACE_hthread_t h_id)
-{
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- if (ACE_OS::thr_cmp (iter.next ()->thr_handle_, h_id))
- return iter.next ();
-
- return 0;
-}
-
-// Locate the index in the table associated with <t_id>. Must be
-// called with the lock held.
-
-ACE_Thread_Descriptor *
-ACE_Thread_Manager::find_thread (ACE_thread_t t_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::find_thread");
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- if (ACE_OS::thr_equal (iter.next ()->thr_id_, t_id))
- return iter.next ();
- return 0;
-}
-
-// Insert a thread into the pool (checks for duplicates and doesn't
-// allow them to be inserted twice).
-
-int
-ACE_Thread_Manager::insert_thr (ACE_thread_t t_id,
- ACE_hthread_t t_handle,
- int grp_id,
- long flags)
-{
- ACE_TRACE ("ACE_Thread_Manager::insert_thr");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- // Check for duplicates and bail out if we're already registered...
-#if defined (VXWORKS)
- if (this->find_hthread (t_handle) != 0 )
- return -1;
-#else /* ! VXWORKS */
- if (this->find_thread (t_id) != 0 )
- return -1;
-#endif /* ! VXWORKS */
-
- if (grp_id == -1)
- grp_id = this->grp_id_++;
-
- if (this->append_thr (t_id,
- t_handle,
- ACE_THR_SPAWNED,
- grp_id,
- 0,
- flags) == -1)
- return -1;
- else
- return grp_id;
-}
-
-// Run the registered hooks when the thread exits.
-
-void
-ACE_Thread_Manager::run_thread_exit_hooks (int i)
-{
-#if 0 // currently unused!
- ACE_TRACE ("ACE_Thread_Manager::run_thread_exit_hooks");
-
- // @@ Currently, we have just one hook. This should clearly be
- // generalized to support an arbitrary number of hooks.
-
- ACE_Thread_Descriptor *td = this->thread_desc_self ();
- if (td != 0 && td->cleanup_info.cleanup_hook_ != 0)
- {
- (*td->cleanup_info_.cleanup_hook_)
- (td->cleanup_info_.object_,
- td->cleanup_info_.param_);
-
- td->cleanup_info_.cleanup_hook_ = 0;
- }
- ACE_UNUSED_ARG (i);
-#else
- ACE_UNUSED_ARG (i);
-#endif /* 0 */
-}
-
-// Remove a thread from the pool. Must be called with locks held.
-
-void
-ACE_Thread_Manager::remove_thr (ACE_Thread_Descriptor *td,
- int close_handler)
-{
- ACE_TRACE ("ACE_Thread_Manager::remove_thr");
-
-#if defined (VXWORKS)
- ACE_thread_t tid = td->self ();
-#endif /* VXWORKS */
-
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- td->tm_ = 0;
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
- this->thr_list_.remove (td);
-
-#if defined (VXWORKS)
- // Delete the thread ID, if the ACE_Thread_Manager allocated it.
- if (tid && tid[0] == ACE_THR_ID_ALLOCATED)
- {
- delete [] tid;
- }
-#endif /* VXWORKS */
-
-#if defined (ACE_WIN32)
- if (close_handler != 0)
- ::CloseHandle (td->thr_handle_);
-#else
- ACE_UNUSED_ARG (close_handler);
-#endif /* ACE_WIN32 */
-
-#if 1
-
- this->thread_desc_freelist_.add (td);
-#else
- delete td;
-#endif /* 1 */
-
-#if defined (ACE_HAS_THREADS)
- // Tell all waiters when there are no more threads left in the pool.
- if (this->thr_list_.size () == 0)
- this->zero_cond_.broadcast ();
-#endif /* ACE_HAS_THREADS */
-}
-
-// Repeatedly call remove_thr on all table entries until there
-// is no thread left. Must be called with lock held.
-
-void
-ACE_Thread_Manager::remove_thr_all (void)
-{
- ACE_Thread_Descriptor *td;
-
- while ((td = this->thr_list_.delete_head ()) != 0)
- {
-#if defined (ACE_WIN32)
- // We need to let go handles if we want to let the threads
- // run wild.
- // @@ Do we need to close down AIX thread handles too?
- ::CloseHandle (td->thr_handle_);
-#endif /* ACE_WIN32 */
- delete td;
- }
-
-}
-
-// ------------------------------------------------------------------
-// Factor out some common behavior to simplify the following methods.
-#define ACE_THR_OP(OP,STATE) \
- int result = OP (td->thr_handle_); \
- if (result == -1) { \
- if (errno != ENOTSUP) \
- this->thr_to_be_removed_.enqueue_tail (td); \
- return -1; \
- } \
- else { \
- ACE_SET_BITS (td->thr_state_, STATE); \
- return 0; \
- }
-
-int
-ACE_Thread_Manager::join_thr (ACE_Thread_Descriptor *td, int)
-{
- ACE_TRACE ("ACE_Thread_Manager::join_thr");
-
- int result = ACE_Thread::join (td->thr_handle_);
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4) && defined (ACE_LACKS_SETDETACH)
-# if defined (HPUX_10)
- // HP-UX DCE threads' pthread_detach will smash thr_id if it's just given
- // as an argument. Since the id is still needed, give pthread_detach
- // a junker to scribble on.
- ACE_thread_t junker;
- cma_handle_assign(&td->thr_handle_, &junker);
- ::pthread_detach (&junker);
-# else
- ::pthread_detach (&td->thr_handle_);
-# endif /* HPUX_10 */
-# endif /* ACE_HAS_PTHREADS_DRAFT4 && ACE_LACKS_SETDETACH */
-
- if (result != 0)
- {
- // Since the thread are being joined, we should
- // let it remove itself from the list.
-
- // this->remove_thr (td);
- errno = result;
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_Thread_Manager::suspend_thr (ACE_Thread_Descriptor *td, int)
-{
- ACE_TRACE ("ACE_Thread_Manager::suspend_thr");
-
- int result = ACE_Thread::suspend (td->thr_handle_);
- if (result == -1) {
- if (errno != ENOTSUP)
- this->thr_to_be_removed_.enqueue_tail (td);
- return -1;
- }
- else {
- ACE_SET_BITS (td->thr_state_, ACE_THR_SUSPENDED);
- return 0;
- }
-}
-
-int
-ACE_Thread_Manager::resume_thr (ACE_Thread_Descriptor *td, int)
-{
- ACE_TRACE ("ACE_Thread_Manager::resume_thr");
-
- int result = ACE_Thread::resume (td->thr_handle_);
- if (result == -1) {
- if (errno != ENOTSUP)
- this->thr_to_be_removed_.enqueue_tail (td);
- return -1;
- }
- else {
- ACE_CLR_BITS (td->thr_state_, ACE_THR_SUSPENDED);
- return 0;
- }
-}
-
-int
-ACE_Thread_Manager::cancel_thr (ACE_Thread_Descriptor *td, int async_cancel)
-{
- ACE_TRACE ("ACE_Thread_Manager::cancel_thr");
- // Must set the state first and then try to cancel the thread.
- ACE_SET_BITS (td->thr_state_, ACE_THR_CANCELLED);
-
- if (async_cancel != 0)
- // Note that this call only does something relevant if the OS
- // platform supports asynchronous thread cancellation. Otherwise,
- // it's a no-op.
- return ACE_Thread::cancel (td->thr_id_);
-
- return 0;
-}
-
-int
-ACE_Thread_Manager::kill_thr (ACE_Thread_Descriptor *td, int signum)
-{
- ACE_TRACE ("ACE_Thread_Manager::kill_thr");
-
- ACE_thread_t tid = td->thr_id_;
-#if defined (VXWORKS)
- // Skip over the ID-allocated marker, if present.
- tid += tid[0] == ACE_THR_ID_ALLOCATED ? 1 : 0;
-#endif /* VXWORKS */
-
- int result = ACE_Thread::kill (tid, signum);
-
- if (result != 0)
- {
- // Only remove a thread from us when there is a "real" error.
- if (errno != ENOTSUP)
- this->thr_to_be_removed_.enqueue_tail (td);
-
- return -1;
- }
-#if defined (CHORUS)
- else if (signum == SIGTHREADKILL)
- this->thr_to_be_removed_.enqueue_tail (td);
-#endif /* CHORUS */
-
- return 0;
-}
-
-// ------------------------------------------------------------------
-// Factor out some common behavior to simplify the following methods.
-#define ACE_EXECUTE_OP(OP, ARG) \
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1)); \
- ACE_ASSERT (this->thr_to_be_removed_.is_empty ()); \
- ACE_FIND (this->find_thread (t_id), ptr); \
- if (ptr == 0) \
- { \
- errno = ENOENT; \
- return -1; \
- } \
- int result = OP (ptr, ARG); \
- ACE_Errno_Guard error (errno); \
- while (! this->thr_to_be_removed_.is_empty ()) { \
- ACE_Thread_Descriptor *td; \
- this->thr_to_be_removed_.dequeue_head (td); \
- this->remove_thr (td, 1); \
- } \
- return result
-
-// Suspend a single thread.
-
-int
-ACE_Thread_Manager::suspend (ACE_thread_t t_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::suspend");
- ACE_EXECUTE_OP (this->suspend_thr, 0);
-}
-
-// Resume a single thread.
-
-int
-ACE_Thread_Manager::resume (ACE_thread_t t_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::resume");
- ACE_EXECUTE_OP (this->resume_thr, 0);
-}
-
-// Cancel a single thread.
-
-int
-ACE_Thread_Manager::cancel (ACE_thread_t t_id, int async_cancel)
-{
- ACE_TRACE ("ACE_Thread_Manager::cancel");
- ACE_EXECUTE_OP (this->cancel_thr, async_cancel);
-}
-
-// Send a signal to a single thread.
-
-int
-ACE_Thread_Manager::kill (ACE_thread_t t_id, int signum)
-{
- ACE_TRACE ("ACE_Thread_Manager::kill");
- ACE_EXECUTE_OP (this->kill_thr, signum);
-}
-
-int
-ACE_Thread_Manager::check_state (ACE_UINT32 state,
- ACE_thread_t id,
- int enable)
-{
- ACE_TRACE ("ACE_Thread_Manager::check_state");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- ACE_UINT32 thr_state;
-
- int self_check = ACE_OS::thr_equal (id, ACE_OS::thr_self ());
-
- // If we're checking the state of our thread, try to get the cached
- // value out of TSS to avoid lookup.
- if (self_check)
- thr_state = this->thread_desc_self ()->thr_state_;
- else
- {
- // Not calling from self, have to look it up from the list.
- ACE_FIND (this->find_thread (id), ptr);
- if (ptr == 0)
- return 0;
- thr_state = ptr->thr_state_;
- }
- if (enable)
- return ACE_BIT_ENABLED (thr_state, state);
- else
- return ACE_BIT_DISABLED (thr_state, state);
-}
-
-// Test if a single thread is suspended.
-
-int
-ACE_Thread_Manager::testsuspend (ACE_thread_t t_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::testsuspend");
- return this->check_state (ACE_THR_SUSPENDED, t_id);
-}
-
-// Test if a single thread is active (i.e., resumed).
-
-int
-ACE_Thread_Manager::testresume (ACE_thread_t t_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::testresume");
- return this->check_state (ACE_THR_SUSPENDED, t_id, 0);
-}
-
-// Test if a single thread is cancelled.
-
-int
-ACE_Thread_Manager::testcancel (ACE_thread_t t_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::testcancel");
- return this->check_state (ACE_THR_CANCELLED, t_id);
-}
-
-// Thread information query functions.
-
-int
-ACE_Thread_Manager::hthread_within (ACE_hthread_t handle)
-{
- ACE_TRACE ("ACE_Thread_Manager::hthread_within");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_monx, this->lock_, -1));
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- if (ACE_OS::thr_cmp(iter.next ()->thr_handle_, handle))
- return 1;
-
- return 0;
-}
-
-int
-ACE_Thread_Manager::thread_within (ACE_thread_t tid)
-{
- ACE_TRACE ("ACE_Thread_Manager::thread_within");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_monx, this->lock_, -1));
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- if (ACE_OS::thr_equal (iter.next ()->thr_id_, tid))
- return 1;
-
- return 0;
-}
-
-// Get group ids for a particular thread id.
-
-int
-ACE_Thread_Manager::get_grp (ACE_thread_t t_id, int &grp_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::get_grp");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- ACE_FIND (this->find_thread (t_id), ptr);
-
- if (ptr)
- grp_id = ptr->grp_id_;
- else
- return -1;
- return 0;
-}
-
-// Set group ids for a particular thread id.
-
-int
-ACE_Thread_Manager::set_grp (ACE_thread_t t_id, int grp_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::set_grp");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- ACE_FIND (this->find_thread (t_id), ptr);
- if (ptr)
- ptr->grp_id_ = grp_id;
- else
- return -1;
- return 0;
-}
-
-// Suspend a group of threads.
-
-int
-ACE_Thread_Manager::apply_grp (int grp_id,
- ACE_THR_MEMBER_FUNC func,
- int arg)
-{
- ACE_TRACE ("ACE_Thread_Manager::apply_grp");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_monx, this->lock_, -1));
- ACE_ASSERT (this->thr_to_be_removed_.is_empty ());
-
- int result = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- if (iter.next ()->grp_id_ == grp_id)
- if ((this->*func) (iter.next (), arg) == -1)
- result = -1;
-
- // Must remove threads after we have traversed the thr_list_ to
- // prevent clobber thr_list_'s integrity.
-
- if (! this->thr_to_be_removed_.is_empty ())
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
-
- for (ACE_Thread_Descriptor *td;
- this->thr_to_be_removed_.dequeue_head (td) != -1;
- )
- this->remove_thr (td, 1);
- }
-
- return result;
-}
-
-int
-ACE_Thread_Manager::suspend_grp (int grp_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::suspend_grp");
- return this->apply_grp (grp_id,
- ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::suspend_thr));
-}
-
-// Resume a group of threads.
-
-int
-ACE_Thread_Manager::resume_grp (int grp_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::resume_grp");
- return this->apply_grp (grp_id,
- ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::resume_thr));
-}
-
-// Kill a group of threads.
-
-int
-ACE_Thread_Manager::kill_grp (int grp_id, int signum)
-{
- ACE_TRACE ("ACE_Thread_Manager::kill_grp");
- return this->apply_grp (grp_id,
- ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::kill_thr), signum);
-}
-
-// Cancel a group of threads.
-
-int
-ACE_Thread_Manager::cancel_grp (int grp_id, int async_cancel)
-{
- ACE_TRACE ("ACE_Thread_Manager::resume_grp");
- return this->apply_grp (grp_id,
- ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::cancel_thr),
- async_cancel);
-}
-
-int
-ACE_Thread_Manager::apply_all (ACE_THR_MEMBER_FUNC func, int arg)
-{
- ACE_TRACE ("ACE_Thread_Manager::apply_all");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
- ACE_ASSERT (this->thr_to_be_removed_.is_empty ());
-
- int result = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- if ((this->*func)(iter.next (), arg) == -1)
- result = -1;
-
- // Must remove threads after we have traversed the thr_list_ to
- // prevent clobber thr_list_'s integrity.
-
- if (! this->thr_to_be_removed_.is_empty ())
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
-
- for (ACE_Thread_Descriptor *td;
- this->thr_to_be_removed_.dequeue_head (td) != -1;
- )
- this->remove_thr (td, 1);
- }
-
- return result;
-}
-
-// Resume all threads that are suspended.
-
-int
-ACE_Thread_Manager::resume_all (void)
-{
- ACE_TRACE ("ACE_Thread_Manager::resume_all");
- return this->apply_all (ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::resume_thr));
-}
-
-int
-ACE_Thread_Manager::suspend_all (void)
-{
- ACE_TRACE ("ACE_Thread_Manager::suspend_all");
- return this->apply_all (ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::suspend_thr));
-}
-
-int
-ACE_Thread_Manager::kill_all (int sig)
-{
- ACE_TRACE ("ACE_Thread_Manager::kill_all");
- return this->apply_all (&ACE_Thread_Manager::kill_thr, sig);
-}
-
-int
-ACE_Thread_Manager::cancel_all (int async_cancel)
-{
- ACE_TRACE ("ACE_Thread_Manager::cancel_all");
- return this->apply_all (ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::cancel_thr),
- async_cancel);
-}
-
-int
-ACE_Thread_Manager::join (ACE_thread_t tid, void **status)
-{
- ACE_TRACE ("ACE_Thread_Manager::join");
-
- ACE_Thread_Descriptor_Base tdb;
- int found = 0;
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
-#if !defined (VXWORKS)
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor_Base> biter (this->terminated_thr_list_);
- !biter.done ();
- biter.advance ())
- if (ACE_OS::thr_equal (biter.next ()->thr_id_, tid))
- {
- ACE_Thread_Descriptor_Base *tdb = biter.advance_and_remove (0);
- if (ACE_Thread::join (tdb->thr_handle_) == -1)
- return -1;
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4) && defined (ACE_LACKS_SETDETACH)
- // Must explicitly detach threads. Threads without THR_DETACHED
- // were detached in ACE_OS::thr_create ().
- ::pthread_detach (&tdb->thr_handle_);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 && ACE_LACKS_SETDETACH */
-
- delete tdb;
- return 0;
- // return immediately if we've found the thread we want to join.
- }
-#endif /* !VXWORKS */
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- // If threads are created as THR_DETACHED or THR_DAEMON, we
- // can't help much.
- if (ACE_OS::thr_equal (iter.next ()->thr_id_,tid) &&
- (ACE_BIT_DISABLED (iter.next ()->flags_, THR_DETACHED | THR_DAEMON)
- || ACE_BIT_ENABLED (iter.next ()->flags_, THR_JOINABLE)))
- {
- tdb = *iter.next ();
- ACE_SET_BITS (tdb.thr_state_, ACE_THR_JOINING);
- found = 1;
- break;
- }
-
- if (!found)
- return -1;
- // Didn't find the thread we want or the thread is not joinable.
- }
-
-# if defined (_AIX)
- // The AIX xlC compiler does not match the proper function here - it
- // confuses ACE_Thread::join(ACE_thread_t, ACE_thread_t *, void **=0) and
- // ACE_Thread::join(ACE_hthread_t, void **=0). At least at 3.1.4.7 and .8.
- // The 2nd arg is ignored for pthreads anyway.
-
- // And, g++ on AIX needs the three-arg thr_join, also, to pick up the
- // proper version from the AIX libraries.
- if (ACE_Thread::join (tdb.thr_handle_, &tdb.thr_handle_, status) == -1)
-# else /* ! _AIX */
- if (ACE_Thread::join (tdb.thr_handle_, status) == -1)
-# endif /* ! _AIX */
- return -1;
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4) && defined (ACE_LACKS_SETDETACH)
- // Must explicitly detach threads. Threads without THR_DETACHED
- // were detached in ACE_OS::thr_create ().
-
-# if defined (HPUX_10)
- // HP-UX DCE threads' pthread_detach will smash thr_id if it's just given
- // as an argument. Since the thread handle is still needed, give
- // pthread_detach a junker to scribble on.
- ACE_thread_t junker;
- cma_handle_assign(&tdb.thr_handle_, &junker);
- ::pthread_detach (&junker);
-# else
- ::pthread_detach (&tdb.thr_handle_);
- #endif /* HPUX_10 */
-# endif /* ACE_HAS_PTHREADS_DRAFT4 && ACE_LACKS_SETDETACH */
- return 0;
-}
-
-// Wait for group of threads
-
-int
-ACE_Thread_Manager::wait_grp (int grp_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::wait_grp");
-
- int copy_count = 0;
- ACE_Thread_Descriptor_Base *copy_table = 0;
-
- // We have to make sure that while we wait for these threads to
- // exit, we do not have the lock. Therefore we make a copy of all
- // interesting entries and let go of the lock.
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
-#if !defined (VXWORKS)
- ACE_NEW_RETURN (copy_table,
- ACE_Thread_Descriptor_Base [this->thr_list_.size ()
- + this->terminated_thr_list_.size ()],
- -1);
-#else
- ACE_NEW_RETURN (copy_table,
- ACE_Thread_Descriptor_Base [this->thr_list_.size ()],
- -1);
-#endif /* VXWORKS */
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- // If threads are created as THR_DETACHED or THR_DAEMON, we
- // can't help much.
- if (iter.next ()->grp_id_ == grp_id &&
- (ACE_BIT_DISABLED (iter.next ()->flags_, THR_DETACHED | THR_DAEMON)
- || ACE_BIT_ENABLED (iter.next ()->flags_, THR_JOINABLE)))
- {
- ACE_SET_BITS (iter.next ()->thr_state_, ACE_THR_JOINING);
- copy_table[copy_count++] = *iter.next ();
- }
-
-#if !defined (VXWORKS)
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor_Base> biter (this->terminated_thr_list_);
- !biter.done ();
- biter.advance ())
- // If threads are created as THR_DETACHED or THR_DAEMON, we
- // can't help much.
- if (biter.next ()->grp_id_ == grp_id)
- {
- ACE_Thread_Descriptor_Base *tdb = biter.advance_and_remove (0);
- copy_table[copy_count++] = *tdb;
- delete tdb;
- }
-#endif /* !VXWORKS */
- }
-
- // Now actually join() with all the threads in this group.
- int result = 0;
-
- for (int i = 0;
- i < copy_count && result != -1;
- i++)
- {
- if (ACE_Thread::join (copy_table[i].thr_handle_) == -1)
- result = -1;
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4) && defined (ACE_LACKS_SETDETACH)
- // Must explicitly detach threads. Threads without THR_DETACHED
- // were detached in ACE_OS::thr_create ().
- ::pthread_detach (&copy_table[i].thr_handle_);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 && ACE_LACKS_SETDETACH */
- }
-
- delete [] copy_table;
-
- return result;
-}
-
-// Must be called when thread goes out of scope to clean up its table
-// slot.
-
-void *
-ACE_Thread_Manager::exit (void *status, int do_thr_exit)
-{
- ACE_TRACE ("ACE_Thread_Manager::exit");
-#if defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- int close_handle = 0;
-#endif /* ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
-#if defined (ACE_WIN32)
- // Remove detached thread handle.
-
- if (do_thr_exit)
- {
-#if 0
- // @@ This callback is now taken care of by TSS_Cleanup. Do we
- // need it anymore?
-
- // On Win32, if we really wants to exit from a thread, we must
- // first clean up the thread specific storage. By doing so,
- // ACE_Thread_Manager::exit will be called again with
- // do_thr_exit = 0 and cleaning up the ACE_Cleanup_Info (but not
- // exiting the thread.) After the following call returns, we
- // are safe to exit this thread.
- delete ACE_Thread_Exit::instance ();
-#endif /* 0 */
- ACE_Thread::exit (status);
- }
-#endif /* ACE_WIN32 */
-
-#if defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- ACE_Cleanup_Info cleanup_info;
-
- // Just hold onto the guard while finding this thread's id and
- // copying the exit hook.
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0));
-
- // Find the thread id, but don't use the cache. It might have been
- // deleted already.
-#if defined (VXWORKS)
- ACE_hthread_t id;
- ACE_OS::thr_self (id);
- ACE_Thread_Descriptor *td = this->find_hthread (id);
-#else /* ! VXWORKS */
- ACE_thread_t id = ACE_OS::thr_self ();
- ACE_Thread_Descriptor *td = this->find_thread (id);
-#endif /* ! VXWORKS */
-
- // Locate thread id.
- if (td != 0)
- {
- // @@ Currently, we have just one hook. This should clearly
- // be generalized to support an arbitrary number of hooks.
-
- if (td->cleanup_info_.cleanup_hook_ != 0)
- {
- // Copy the hook so that we can call it after releasing
- // the guard.
- cleanup_info = td->cleanup_info_;
- td->cleanup_info_.cleanup_hook_ = 0;
- }
-
-#if !defined (VXWORKS)
- // Threads created with THR_DAEMON shouldn't exist here, but
- // just to be safe, let's put it here.
-
- if (ACE_BIT_DISABLED (td->thr_state_, ACE_THR_JOINING))
- if (ACE_BIT_DISABLED (td->flags_, THR_DETACHED | THR_DAEMON)
- || ACE_BIT_ENABLED (td->flags_, THR_JOINABLE))
- {
- // Mark thread as terminated.
- ACE_SET_BITS (td->thr_state_, ACE_THR_TERMINATED);
- this->register_as_terminated (td);
- // Must copy the information here because td will be "freed" below.
- }
-#if defined (ACE_WIN32)
- else
- {
- close_handle = 1;
- }
-#endif /* ACE_WIN32 */
-#endif /* ! VXWORKS */
-
- // Remove thread descriptor from the table.
- this->remove_thr (td, close_handle);
- }
- // Release the guard.
- }
-
- // Call the cleanup hook.
- if (cleanup_info.cleanup_hook_ != 0)
- (*cleanup_info.cleanup_hook_) (cleanup_info.object_,
- cleanup_info.param_);
-#else /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
- // Just hold onto the guard while finding this thread's id and
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0));
-
- // Find the thread id, but don't use the cache. It might have been
- // deleted already.
-#if defined (VXWORKS)
- ACE_hthread_t id;
- ACE_OS::thr_self (id);
- ACE_Thread_Descriptor* td = this->find_hthread (id);
-#else /* ! VXWORKS */
- ACE_thread_t id = ACE_OS::thr_self ();
- ACE_Thread_Descriptor* td = this->find_thread (id);
-#endif /* ! VXWORKS */
- if (td != 0)
- {
- // @@ We call Thread_Descriptor terminate this realize the cleanup
- // process itself.
- td->terminate();
- }
- }
-
-
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
- if (do_thr_exit)
- {
- ACE_Thread::exit (status);
- // On reasonable systems <ACE_Thread::exit> should not return.
- // However, due to horrible semantics with Win32 thread-specific
- // storage this call can return (don't ask...).
- }
-
- return 0;
-}
-
-// Wait for all the threads to exit.
-
-int
-ACE_Thread_Manager::wait (const ACE_Time_Value *timeout,
- int abandon_detached_threads)
-{
- ACE_TRACE ("ACE_Thread_Manager::wait");
-
-#if defined (ACE_HAS_THREADS)
- {
- // Just hold onto the guard while waiting.
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- if (ACE_Object_Manager::shutting_down () != 1)
- {
- // Program is not shutting down. Perform a normal wait on threads.
- if (abandon_detached_threads != 0)
- {
- ACE_ASSERT (this->thr_to_be_removed_.is_empty ());
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor>
- iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- if (ACE_BIT_ENABLED (iter.next ()->flags_,
- THR_DETACHED | THR_DAEMON)
- && ACE_BIT_DISABLED (iter.next ()->flags_, THR_JOINABLE))
- {
- this->thr_to_be_removed_.enqueue_tail (iter.next ());
- ACE_SET_BITS (iter.next ()->thr_state_, ACE_THR_JOINING);
- }
-
- if (! this->thr_to_be_removed_.is_empty ())
- {
- ACE_Thread_Descriptor *td;
- while (this->thr_to_be_removed_.dequeue_head (td) != -1)
- this->remove_thr (td, 1);
- }
- }
-
- while (this->thr_list_.size () > 0)
- if (this->zero_cond_.wait (timeout) == -1)
- return -1;
- }
- else
- // Program is shutting down, no chance to wait on threads.
- // Therefore, we'll just remove threads from the list.
- this->remove_thr_all ();
- // Release the guard, giving other threads a chance to run.
- }
-
-#if !defined (VXWORKS)
- // @@ VxWorks doesn't support thr_join (yet.) We are working
- //on our implementation. Chorus'es thr_join seems broken.
- ACE_Thread_Descriptor_Base *item;
-
-#if defined (CHORUS)
- if (ACE_Object_Manager::shutting_down () != 1)
- {
-#endif /* CHORUS */
- while ((item = this->terminated_thr_list_.delete_head ()) != 0)
- {
- if (ACE_BIT_DISABLED (item->flags_, THR_DETACHED | THR_DAEMON)
- || ACE_BIT_ENABLED (item->flags_, THR_JOINABLE))
- // Detached handles shouldn't reached here.
- ACE_Thread::join (item->thr_handle_);
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4) && defined (ACE_LACKS_SETDETACH)
- // Must explicitly detach threads. Threads without
- // THR_DETACHED were detached in ACE_OS::thr_create ().
- ::pthread_detach (&item->thr_handle_);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 && ACE_LACKS_SETDETACH */
- delete item;
- }
-#if defined (CHORUS)
- }
-#endif /* CHORUS */
-
-#endif /* ! VXWORKS */
-#else
- ACE_UNUSED_ARG (timeout);
- ACE_UNUSED_ARG (abandon_detached_threads);
-#endif /* ACE_HAS_THREADS */
-
- return 0;
-}
-
-int
-ACE_Thread_Manager::apply_task (ACE_Task_Base *task,
- ACE_THR_MEMBER_FUNC func,
- int arg)
-{
- ACE_TRACE ("ACE_Thread_Manager::apply_task");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
- ACE_ASSERT (this->thr_to_be_removed_.is_empty ());
-
- int result = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- if (iter.next ()->task_ == task
- && (this->*func) (iter.next (), arg) == -1)
- result = -1;
-
- // Must remove threads after we have traversed the thr_list_ to
- // prevent clobber thr_list_'s integrity.
-
- if (! this->thr_to_be_removed_.is_empty ())
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
-
- for (ACE_Thread_Descriptor *td;
- this->thr_to_be_removed_.dequeue_head (td) != -1;
- )
- this->remove_thr (td, 1);
- }
-
- return result;
-}
-
-// Wait for all threads to exit a task.
-
-int
-ACE_Thread_Manager::wait_task (ACE_Task_Base *task)
-{
- int copy_count = 0;
- ACE_Thread_Descriptor_Base *copy_table = 0;
-
- // We have to make sure that while we wait for these threads to
- // exit, we do not have the lock. Therefore we make a copy of all
- // interesting entries and let go of the lock.
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
-#if !defined (VXWORKS)
- ACE_NEW_RETURN (copy_table,
- ACE_Thread_Descriptor_Base [this->thr_list_.size ()
- + this->terminated_thr_list_.size ()],
- -1);
-#else
- ACE_NEW_RETURN (copy_table,
- ACE_Thread_Descriptor_Base [this->thr_list_.size ()],
- -1);
-#endif /* VXWORKS */
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- // If threads are created as THR_DETACHED or THR_DAEMON, we
- // can't wait on them here.
- if (iter.next ()->task_ == task &&
- (ACE_BIT_DISABLED (iter.next ()->flags_,
- THR_DETACHED | THR_DAEMON)
- || ACE_BIT_ENABLED (iter.next ()->flags_,
- THR_JOINABLE)))
- {
- ACE_SET_BITS (iter.next ()->thr_state_,
- ACE_THR_JOINING);
- copy_table[copy_count++] = *iter.next ();
- }
-
-#if !defined (VXWORKS)
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor_Base> titer (this->terminated_thr_list_);
- !titer.done ();
- titer.advance ())
- // If threads are created as THR_DETACHED or THR_DAEMON, we can't help much here.
- if (titer.next ()->task_ == task)
- {
- ACE_Thread_Descriptor_Base *tdb =
- titer.advance_and_remove (0);
- copy_table[copy_count++] = *tdb;
- delete tdb;
- }
-#endif /* VXWORKS */
- }
-
- // Now to do the actual work
- int result = 0;
-
- for (int i = 0;
- i < copy_count && result != -1;
- i++)
- {
- if (ACE_Thread::join (copy_table[i].thr_handle_) == -1)
- result = -1;
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4) && defined (ACE_LACKS_SETDETACH)
- // Must explicitly detach threads. Threads without THR_DETACHED
- // were detached in ACE_OS::thr_create ().
- ::pthread_detach (&copy_table[i].thr_handle_);
-# endif /* ACE_HAS_PTHREADS_DRAFT4 && ACE_LACKS_SETDETACH */
- }
-
- delete [] copy_table;
-
- return result;
-}
-
-// Suspend a task
-
-int
-ACE_Thread_Manager::suspend_task (ACE_Task_Base *task)
-{
- ACE_TRACE ("ACE_Thread_Manager::suspend_task");
- return this->apply_task (task,
- ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::suspend_thr));
-}
-
-// Resume a task.
-int
-ACE_Thread_Manager::resume_task (ACE_Task_Base *task)
-{
- ACE_TRACE ("ACE_Thread_Manager::resume_task");
- return this->apply_task (task,
- ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::resume_thr));
-}
-
-// Kill a task.
-
-int
-ACE_Thread_Manager::kill_task (ACE_Task_Base *task, int /* signum */)
-{
- ACE_TRACE ("ACE_Thread_Manager::kill_task");
- return this->apply_task (task,
- ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::kill_thr));
-}
-
-// Cancel a task.
-int
-ACE_Thread_Manager::cancel_task (ACE_Task_Base *task,
- int async_cancel)
-{
- ACE_TRACE ("ACE_Thread_Manager::cancel_task");
- return this->apply_task (task,
- ACE_THR_MEMBER_FUNC (&ACE_Thread_Manager::cancel_thr),
- async_cancel);
-}
-
-// Locate the index in the table associated with <task> from the
-// beginning of the table up to an index. Must be called with the
-// lock held.
-
-ACE_Thread_Descriptor *
-ACE_Thread_Manager::find_task (ACE_Task_Base *task, int slot)
-{
- ACE_TRACE ("ACE_Thread_Manager::find_task");
-
- int i = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- {
- if (i >= slot)
- break;
-
- if (task == iter.next ()->task_)
- return iter.next ();
-
- i++;
- }
-
- return 0;
-}
-
-// Returns the number of ACE_Task in a group.
-
-int
-ACE_Thread_Manager::num_tasks_in_group (int grp_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::num_tasks_in_group");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- int tasks_count = 0;
- size_t i = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- {
- if (iter.next ()->grp_id_ == grp_id
- && this->find_task (iter.next ()->task_, i) == 0
- && iter.next ()->task_ != 0)
- tasks_count++;
-
- i++;
- }
- return tasks_count;
-}
-
-// Returns the number of threads in an ACE_Task.
-
-int
-ACE_Thread_Manager::num_threads_in_task (ACE_Task_Base *task)
-{
- ACE_TRACE ("ACE_Thread_Manager::num_threads_in_task");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- int threads_count = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- if (iter.next ()->task_ == task)
- threads_count++;
-
- return threads_count;
-}
-
-// Returns in task_list a list of ACE_Tasks registered with ACE_Thread_Manager.
-
-int
-ACE_Thread_Manager::task_all_list (ACE_Task_Base *task_list[],
- size_t n)
-{
- ACE_TRACE ("ACE_Thread_Manager::task_all_list");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- ACE_Task_Base **task_list_iterator = task_list;
- size_t task_list_count = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- {
- if (task_list_count >= n)
- break;
-
- if ( iter.next ()->task_ )
- {
- task_list_iterator[task_list_count] = iter.next ()->task_;
- task_list_count++;
- }
- }
-
- return task_list_count;
-}
-
-// Returns in thread_list a list of all thread ids
-
-int
-ACE_Thread_Manager::thread_all_list ( ACE_thread_t thread_list[],
- size_t n)
-{
- ACE_TRACE ("ACE_Thread_Manager::thread_all_list");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- size_t thread_count = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- {
- if (thread_count >= n)
- break;
-
- thread_list[thread_count] = iter.next ()->thr_id_;
- thread_count ++;
- }
-
- return thread_count;
-}
-
-// Returns in task_list a list of ACE_Tasks in a group.
-
-int
-ACE_Thread_Manager::task_list (int grp_id,
- ACE_Task_Base *task_list[],
- size_t n)
-{
- ACE_TRACE ("ACE_Thread_Manager::task_list");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- ACE_Task_Base **task_list_iterator = task_list;
- size_t task_list_count = 0;
- size_t i = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- {
- if (task_list_count >= n)
- break;
-
- if (iter.next ()->grp_id_ == grp_id
- && this->find_task (iter.next ()->task_, i) == 0)
- {
- task_list_iterator[task_list_count] = iter.next ()->task_;
- task_list_count++;
- }
-
- i++;
- }
-
- return task_list_count;
-}
-
-// Returns in thread_list a list of thread ids in an ACE_Task.
-
-int
-ACE_Thread_Manager::thread_list (ACE_Task_Base *task,
- ACE_thread_t thread_list[],
- size_t n)
-{
- ACE_TRACE ("ACE_Thread_Manager::thread_list");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- size_t thread_count = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- {
- if (thread_count >= n)
- break;
-
- if (iter.next ()->task_ == task)
- {
- thread_list[thread_count] = iter.next ()->thr_id_;
- thread_count++;
- }
- }
-
- return thread_count;
-}
-
-// Returns in thread_list a list of thread handles in an ACE_Task.
-
-int
-ACE_Thread_Manager::hthread_list (ACE_Task_Base *task,
- ACE_hthread_t hthread_list[],
- size_t n)
-{
- ACE_TRACE ("ACE_Thread_Manager::hthread_list");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- size_t hthread_count = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- {
- if (hthread_count >= n)
- break;
-
- if (iter.next ()->task_ == task)
- {
- hthread_list[hthread_count] = iter.next ()->thr_handle_;
- hthread_count++;
- }
- }
-
- return hthread_count;
-}
-
-int
-ACE_Thread_Manager::thread_grp_list (int grp_id,
- ACE_thread_t thread_list[],
- size_t n)
-{
- ACE_TRACE ("ACE_Thread_Manager::thread_grp_list");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- size_t thread_count = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- {
- if (thread_count >= n)
- break;
-
- if (iter.next ()->grp_id_ == grp_id)
- {
- thread_list[thread_count] = iter.next ()->thr_id_;
- thread_count++;
- }
- }
-
- return thread_count;
-}
-
-// Returns in thread_list a list of thread handles in an ACE_Task.
-
-int
-ACE_Thread_Manager::hthread_grp_list (int grp_id,
- ACE_hthread_t hthread_list[],
- size_t n)
-{
- ACE_TRACE ("ACE_Thread_Manager::hthread_list");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- size_t hthread_count = 0;
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- {
- if (hthread_count >= n)
- break;
-
- if (iter.next ()->grp_id_ == grp_id)
- {
- hthread_list[hthread_count] = iter.next ()->thr_handle_;
- hthread_count++;
- }
- }
-
- return hthread_count;
-}
-
-int
-ACE_Thread_Manager::set_grp (ACE_Task_Base *task, int grp_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::set_grp");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_);
- !iter.done ();
- iter.advance ())
- if (iter.next ()->task_ == task)
- iter.next ()->grp_id_ = grp_id;
-
- return 0;
-}
-
-int
-ACE_Thread_Manager::get_grp (ACE_Task_Base *task, int &grp_id)
-{
- ACE_TRACE ("ACE_Thread_Manager::get_grp");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- ACE_FIND (this->find_task (task), ptr);
- grp_id = ptr->grp_id_;
- return 0;
-}
-
-void
-ACE_Thread_Control::dump (void) const
-{
- ACE_TRACE ("ACE_Thread_Control::dump");
-}
-
-int
-ACE_Thread_Control::insert (ACE_Thread_Manager *tm, int insert)
-{
- ACE_TRACE ("ACE_Thread_Control::insert");
-
- ACE_hthread_t t_id;
- ACE_Thread::self (t_id);
- this->tm_ = tm;
-
- if (insert)
- return this->tm_->insert_thr (ACE_Thread::self (), t_id);
- else
- return 0;
-}
-
-// Initialize the thread controller.
-
-ACE_Thread_Control::ACE_Thread_Control (ACE_Thread_Manager *t,
- int insert)
- : tm_ (t),
- status_ (0)
-{
- ACE_TRACE ("ACE_Thread_Control::ACE_Thread_Control");
-
- if (this->tm_ != 0 && insert)
- {
- ACE_hthread_t t_id;
- ACE_Thread::self (t_id);
- this->tm_->insert_thr (ACE_Thread::self (), t_id);
- }
-}
-
-// Automatically kill thread on exit.
-
-ACE_Thread_Control::~ACE_Thread_Control (void)
-{
- ACE_TRACE ("ACE_Thread_Control::~ACE_Thread_Control");
-
-#if defined (ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS) || defined (ACE_HAS_TSS_EMULATION) || defined (ACE_WIN32)
- this->exit (this->status_, 0);
-#else
- this->exit (this->status_, 1);
-#endif /* ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS */
-}
-
-// Exit from thread (but clean up first).
-
-void *
-ACE_Thread_Control::exit (void *exit_status, int do_thr_exit)
-{
- ACE_TRACE ("ACE_Thread_Control::exit");
-
- if (this->tm_ != 0)
- return this->tm_->exit (exit_status, do_thr_exit);
- else
- {
-#if !defined (ACE_HAS_TSS_EMULATION)
- // With ACE_HAS_TSS_EMULATION, we let ACE_Thread_Adapter::invoke ()
- // exit the thread after cleaning up TSS.
- ACE_Thread::exit (exit_status);
-#endif /* ! ACE_HAS_TSS_EMULATION */
- return 0;
- }
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-# if defined (ACE_THREAD_MANAGER_LACKS_STATICS)
- template class ACE_Singleton<ACE_Thread_Manager, ACE_SYNCH_MUTEX>;
-# endif /* defined (ACE_THREAD_MANAGER_LACKS_STATICS) */
- template class ACE_Auto_Basic_Ptr<ACE_Thread_Descriptor>;
- template class auto_ptr<ACE_Thread_Descriptor>;
- template class ACE_Double_Linked_List<ACE_Thread_Descriptor_Base>;
- template class ACE_Double_Linked_List_Iterator_Base<ACE_Thread_Descriptor_Base>;
- template class ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor_Base>;
- template class ACE_Double_Linked_List<ACE_Thread_Descriptor>;
- template class ACE_Double_Linked_List_Iterator_Base<ACE_Thread_Descriptor>;
- template class ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor>;
- template class ACE_Node<ACE_Thread_Descriptor*>;
- template class ACE_Unbounded_Queue<ACE_Thread_Descriptor*>;
- template class ACE_Unbounded_Queue_Iterator<ACE_Thread_Descriptor*>;
- template class ACE_Free_List<ACE_Thread_Descriptor>;
- template class ACE_Locked_Free_List<ACE_Thread_Descriptor, ACE_DEFAULT_THREAD_MANAGER_LOCK>;
-# if (defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)))
- // These don't necessarily belong here, but it's a convenient place for them.
- template class ACE_TSS<ACE_Dynamic>;
- template class ACE_TSS<ACE_Thread_Exit>;
-# endif /* ACE_HAS_THREADS && (ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION) */
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# if defined (ACE_THREAD_MANAGER_LACKS_STATICS)
- #pragma instantiate ACE_Singleton<ACE_Thread_Manager, ACE_SYNCH_MUTEX>
-# endif /* defined (ACE_THREAD_MANAGER_LACKS_STATICS) */
- #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Thread_Descriptor>
- #pragma instantiate auto_ptr<ACE_Thread_Descriptor>
- #pragma instantiate ACE_Double_Linked_List<ACE_Thread_Descriptor_Base>
- #pragma instantiate ACE_Double_Linked_List_Iterator_Base<ACE_Thread_Descriptor_Base>
- #pragma instantiate ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor_Base>
- #pragma instantiate ACE_Double_Linked_List<ACE_Thread_Descriptor>
- #pragma instantiate ACE_Double_Linked_List_Iterator_Base<ACE_Thread_Descriptor>
- #pragma instantiate ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor>
- #pragma instantiate ACE_Node<ACE_Thread_Descriptor*>
- #pragma instantiate ACE_Unbounded_Queue<ACE_Thread_Descriptor*>
- #pragma instantiate ACE_Unbounded_Queue_Iterator<ACE_Thread_Descriptor*>
- #pragma instantiate ACE_Free_List<ACE_Thread_Descriptor>
- #pragma instantiate ACE_Locked_Free_List<ACE_Thread_Descriptor, ACE_DEFAULT_THREAD_MANAGER_LOCK>
-# if (defined (ACE_HAS_THREADS) && (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || defined (ACE_HAS_TSS_EMULATION)))
- // These don't necessarily belong here, but it's a convenient place for them.
- #pragma instantiate ACE_TSS<ACE_Dynamic>
- #pragma instantiate ACE_TSS<ACE_Thread_Exit>
-# endif /* ACE_HAS_THREADS && (ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION) */
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Thread_Manager.h b/ace/Thread_Manager.h
deleted file mode 100644
index ba4c443f742..00000000000
--- a/ace/Thread_Manager.h
+++ /dev/null
@@ -1,911 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Thread_Manager.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_THREAD_MANAGER_H
-#define ACE_THREAD_MANAGER_H
-#include "ace/pre.h"
-
-#include "ace/Thread.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch.h"
-#include "ace/Containers.h"
-#include "ace/Free_List.h"
-#include "ace/Singleton.h"
-
-// The following macros control how a Thread Manager manages a pool of
-// Thread_Descriptor. Currently, the default behavior is not to
-// preallocate any thread descriptor and never (well, almost never)
-// free up any thread descriptor until the Thread Manager gets
-// destructed. Which means, once your system is stable, you rarely
-// need to pay the price of memory allocation. On a deterministic
-// system, which means, the number of threads spawned can be
-// determined before hand, you can either redefine the memory pool
-// size macros to suit your need or constructed the Thread_Manager
-// accordingly. That way, you don't pay the price of memory
-// allocation when the system is really doing its job. OTOH, on
-// system with resources constraint, you may want to lower the size of
-// ACE_DEFAULT_THREAD_MANAGER_HWM to avoid unused memory hanging
-// around.
-
-#if !defined (ACE_DEFAULT_THREAD_MANAGER_PREALLOC)
-# define ACE_DEFAULT_THREAD_MANAGER_PREALLOC 0
-#endif /* ACE_DEFAULT_THREAD_MANAGER_PREALLOC */
-
-#if !defined (ACE_DEFAULT_THREAD_MANAGER_LWM)
-# define ACE_DEFAULT_THREAD_MANAGER_LWM 1
-#endif /* ACE_DEFAULT_THREAD_MANAGER_LWM */
-
-#if !defined (ACE_DEFAULT_THREAD_MANAGER_INC)
-# define ACE_DEFAULT_THREAD_MANAGER_INC 1
-#endif /* ACE_DEFAULT_THREAD_MANAGER_INC */
-
-#if !defined (ACE_DEFAULT_THREAD_MANAGER_HWM)
-# define ACE_DEFAULT_THREAD_MANAGER_HWM ACE_DEFAULT_FREE_LIST_HWM
-// this is a big number
-#endif /* ACE_DEFAULT_THREAD_MANAGER_HWM */
-
-// This is the synchronization mechanism used to prevent a thread
-// descriptor gets removed from the Thread_Manager before it gets
-// stash into it. If you want to disable this feature (and risk of
-// corrupting the freelist,) you define the lock as ACE_Null_Mutex.
-// Usually, if you can be sure that your threads will run for an
-// extended period of time, you can safely disable the lock.
-
-#if !defined (ACE_DEFAULT_THREAD_MANAGER_LOCK)
-# define ACE_DEFAULT_THREAD_MANAGER_LOCK ACE_SYNCH_MUTEX
-#endif /* ACE_DEFAULT_THREAD_MANAGER_LOCK */
-
-// Forward declarations.
-class ACE_Task_Base;
-class ACE_Thread_Manager;
-class ACE_Thread_Descriptor;
-
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
-class ACE_Export ACE_At_Thread_Exit
-{
- // = TITLE
- // Contains a method to be applied when a thread is terminated.
- friend class ACE_Thread_Descriptor;
- friend class ACE_Thread_Manager;
-public:
- // Default constructor
- ACE_At_Thread_Exit (void);
-
- // The destructor
- virtual ~ACE_At_Thread_Exit (void);
-
- // <At_Thread_Exit> has the ownership?
- int is_owner (void) const;
-
- // Set the ownership of the <At_Thread_Exit>.
- int is_owner (int owner);
-
- // This <At_Thread_Exit> was applied?
- int was_applied (void) const;
-
- // Set applied state of <At_Thread_Exit>.
- int was_applied (int applied);
-
-protected:
- ACE_At_Thread_Exit *next_;
- // The next <At_Thread_Exit> hook in the list.
-
- // Do the apply if necessary
- void do_apply (void);
-
- virtual void apply (void) = 0;
- // The apply method.
-
- ACE_Thread_Descriptor* td_;
- // The Thread_Descriptor where this at is registered.
-
- int was_applied_;
- // The at was applied?
-
- int is_owner_;
- // The at has the ownership of this?
-};
-
-class ACE_Export ACE_At_Thread_Exit_Func : public ACE_At_Thread_Exit
-{
-public:
- // Constructor
- ACE_At_Thread_Exit_Func (void *object,
- ACE_CLEANUP_FUNC func,
- void *param = 0);
-
- virtual ~ACE_At_Thread_Exit_Func (void);
-
-protected:
- void *object_;
- // The object to be cleanup
-
- ACE_CLEANUP_FUNC func_;
- // The cleanup func
-
- void *param_;
- // A param if required
-
- // The apply method
- void apply (void);
-};
-
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
-class ACE_Export ACE_Thread_Descriptor_Base : public ACE_OS_Thread_Descriptor
-{
- // = TITLE
- // Basic information for thread descriptors. These information
- // gets extracted out because we need it after a thread is
- // terminated.
-
- friend class ACE_Thread_Manager;
- friend class ACE_Double_Linked_List<ACE_Thread_Descriptor_Base>;
- friend class ACE_Double_Linked_List_Iterator_Base<ACE_Thread_Descriptor_Base>;
- friend class ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor_Base>;
- friend class ACE_Double_Linked_List<ACE_Thread_Descriptor>;
- friend class ACE_Double_Linked_List_Iterator_Base<ACE_Thread_Descriptor>;
- friend class ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor>;
-public:
- ACE_Thread_Descriptor_Base (void);
- ~ACE_Thread_Descriptor_Base (void);
-
- // = We need the following operators to make Borland happy.
-
- int operator== (const ACE_Thread_Descriptor_Base &rhs) const;
- // Equality operator.
-
- int operator!= (const ACE_Thread_Descriptor_Base &rhs) const;
- // Inequality operator.
-
- int grp_id (void);
- // Group ID.
-
- ACE_UINT32 state (void);
- // Current state of the thread.
-
- ACE_Task_Base *task (void);
- // Return the pointer to an <ACE_Task_Base> or NULL if there's no
- // <ACE_Task_Base> associated with this thread.;
-
-protected:
- void reset (void);
- // Reset this base thread descriptor.
-
- ACE_thread_t thr_id_;
- // Unique thread ID.
-
- ACE_hthread_t thr_handle_;
- // Unique handle to thread (used by Win32 and AIX).
-
- int grp_id_;
- // Group ID.
-
- ACE_UINT32 thr_state_;
- // Current state of the thread.
-
- ACE_Task_Base *task_;
- // Pointer to an <ACE_Task_Base> or NULL if there's no
- // <ACE_Task_Base>.
-
- ACE_Thread_Descriptor_Base *next_;
- ACE_Thread_Descriptor_Base *prev_;
- // We need these pointers to maintain the double-linked list in a
- // thread managers.
-};
-
-class ACE_Export ACE_Thread_Descriptor : public ACE_Thread_Descriptor_Base
-{
- // = TITLE
- // Information for controlling threads that run under the control
- // of the <Thread_Manager>.
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- friend class ACE_At_Thread_Exit;
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
- friend class ACE_Thread_Manager;
- friend class ACE_Double_Linked_List<ACE_Thread_Descriptor>;
- friend class ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor>;
-public:
- // = Initialization method.
- ACE_Thread_Descriptor (void);
-
- // = Accessor methods.
- ACE_thread_t self (void);
- // Unique thread id.
-
- void self (ACE_hthread_t &);
- // Unique handle to thread (used by Win32 and AIX).
-
- void dump (void) const;
- // Dump the state of an object.
-
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- void log_msg_cleanup(ACE_Log_Msg* log_msg);
- // This cleanup function must be called only for ACE_TSS_cleanup.
- // The ACE_TSS_cleanup delegate Log_Msg instance destruction when
- // Log_Msg cleanup is called before terminate.
-
- int at_exit (ACE_At_Thread_Exit* cleanup);
- // Register an At_Thread_Exit hook and the ownership is acquire by
- // Thread_Descriptor, this is the usual case when the AT is dynamically
- // allocated.
-
- int at_exit (ACE_At_Thread_Exit& cleanup);
- // Register an At_Thread_Exit hook and the ownership is retained for the
- // caller. Normally used when the at_exit hook is created in stack.
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
- int at_exit (void *object,
- ACE_CLEANUP_FUNC cleanup_hook,
- void *param);
- // Register an object (or array) for cleanup at thread termination.
- // "cleanup_hook" points to a (global, or static member) function
- // that is called for the object or array when it to be destroyed.
- // It may perform any necessary cleanup specific for that object or
- // its class. "param" is passed as the second parameter to the
- // "cleanup_hook" function; the first parameter is the object (or
- // array) to be destroyed. Returns 0 on success, non-zero on
- // failure: -1 if virtual memory is exhausted or 1 if the object (or
- // arrayt) had already been registered.
-
- ~ACE_Thread_Descriptor (void);
- // Do nothing destructor to keep some compilers happy
-
- void acquire_release (void);
- // Do nothing but to acquire the thread descriptor's lock and
- // release. This will first check if the thread is registered or
- // not. If it is already registered, there's no need to reacquire
- // the lock again. This is used mainly to get newly spawned thread
- // in synch with thread manager and prevent it from accessing its
- // thread descriptor before it gets fully built. This function is
- // only called from ACE_Log_Msg::thr_desc.
-
- ACE_INLINE_FOR_GNUC void set_next (ACE_Thread_Descriptor *td);
- ACE_INLINE_FOR_GNUC ACE_Thread_Descriptor *get_next (void);
- // Set/get the <next_> pointer. These are required by the
- // ACE_Free_List. ACE_INLINE is specified here because one version
- // of g++ couldn't grok this code without it.
-
-private:
- void reset (ACE_Thread_Manager *tm);
- // Reset this thread descriptor.
-
-#if !defined (ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- void at_pop (int apply = 1);
- // Pop an At_Thread_Exit from at thread termination list, apply the at
- // if apply is true.
-
- void at_push (ACE_At_Thread_Exit* cleanup,
- int is_owner = 0);
- // Push an At_Thread_Exit to at thread termination list and set the
- // ownership of at.
-
- void do_at_exit (void);
- // Run the AT_Thread_Exit hooks.
-
- void terminate (void);
- // terminate realize the cleanup process to thread termination
-
- ACE_Log_Msg *log_msg_;
- // Thread_Descriptor is the ownership of ACE_Log_Msg if log_msg_!=0
- // This can occur because ACE_TSS_cleanup was executed before terminate.
-
- ACE_At_Thread_Exit *at_exit_list_;
- // The AT_Thread_Exit list
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
- ACE_Cleanup_Info cleanup_info_;
- // Stores the cleanup info for a thread.
- // @@ Note, this should be generalized to be a stack of
- // <ACE_Cleanup_Info>s.
-
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- ACE_Thread_Manager* tm_;
- // Pointer to an <ACE_Thread_Manager> or NULL if there's no
- // <ACE_Thread_Manager>.
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
- ACE_DEFAULT_THREAD_MANAGER_LOCK *sync_;
- // Registration lock to prevent premature removal of thread descriptor.
-
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- int terminated_;
- // Keep track of termination status.
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-};
-
-// Forward declaration.
-class ACE_Thread_Control;
-
-// This typedef should be (and used to be) inside the
-// ACE_Thread_Manager declaration. But, it caused compilation
-// problems on g++/VxWorks/i960 with -g. Note that
-// ACE_Thread_Manager::THR_FUNC is only used internally in
-// ACE_Thread_Manager, so it's not useful for anyone else.
-// It also caused problems on IRIX5 with g++.
-#if defined (__GNUG__)
-typedef int (ACE_Thread_Manager::*ACE_THR_MEMBER_FUNC)(ACE_Thread_Descriptor *, int);
-#endif /* __GNUG__ */
-
-class ACE_Export ACE_Thread_Manager
-{
- // = TITLE
- // Manages a pool of threads.
- //
- // = DESCRIPTION
- // This class allows operations on groups of threads atomically.
- // The default behavior of thread manager is to wait on
- // all threads under it's management when it gets destructed.
- // Therefore, remember to remove a thread from thread manager if
- // you don't want it to wait for the thread. There are also
- // function to disable this default wait-on-exit behavior.
- // However, if your program depends on turning this off to run
- // correctly, you are probably doing something wrong. Rule of
- // thumb, use ACE_Thread to manage your daemon threads.
- //
- // Notice that if there're threads live beyond the scope of
- // <main>, you are sure to have resource leaks in your program.
- // Remember to wait on threads before exiting <main> if that
- // could happen in your programs.
-public:
- friend class ACE_Thread_Control;
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- friend class ACE_Thread_Descriptor;
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
-#if !defined (__GNUG__)
- typedef int (ACE_Thread_Manager::*ACE_THR_MEMBER_FUNC)(ACE_Thread_Descriptor *, int);
-#endif /* !__GNUG__ */
-
- // These are the various states a thread managed by the
- // <Thread_Manager> can be in.
- enum
- {
- ACE_THR_IDLE = 0x00000000,
- // Uninitialized.
-
- ACE_THR_SPAWNED = 0x00000001,
- // Created but not yet running.
-
- ACE_THR_RUNNING = 0x00000002,
- // Thread is active (naturally, we don't know if it's actually
- // *running* because we aren't the scheduler...).
-
- ACE_THR_SUSPENDED = 0x00000004,
- // Thread is suspended.
-
- ACE_THR_CANCELLED = 0x00000008,
- // Thread has been cancelled (which is an indiction that it needs to
- // terminate...).
-
- ACE_THR_TERMINATED = 0x00000010,
- // Thread has shutdown, but the slot in the thread manager hasn't
- // been reclaimed yet.
-
- ACE_THR_JOINING = 0x10000000
- // Join operation has been invoked on the thread by thread manager.
- };
-
- // = Initialization and termination methods.
- ACE_Thread_Manager (size_t preaolloc = 0,
- size_t lwm = ACE_DEFAULT_THREAD_MANAGER_LWM,
- size_t inc = ACE_DEFAULT_THREAD_MANAGER_INC,
- size_t hwm = ACE_DEFAULT_THREAD_MANAGER_HWM);
- virtual ~ACE_Thread_Manager (void);
-
-#if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS)
- static ACE_Thread_Manager *instance (void);
- // Get pointer to a process-wide <ACE_Thread_Manager>.
-
- static ACE_Thread_Manager *instance (ACE_Thread_Manager *);
- // Set pointer to a process-wide <ACE_Thread_Manager> and return
- // existing pointer.
-
- static void close_singleton (void);
- // Delete the dynamically allocated Singleton
-#endif /* ! defined (ACE_THREAD_MANAGER_LACKS_STATICS) */
-
- int open (size_t size = 0);
- // No-op. Currently unused.
-
- int close (void);
- // Release all resources.
- // By default, this method will wait till all threads
- // exit. However, when called from <close_singleton>, most global resources
- // are destroyed and thus, we don't try to wait but just clean up the thread
- // descriptor list.
-
- // The <ACE_thread_t> * argument to each of the <spawn> family member
- // functions is interpreted and used as shown in the following
- // table. NOTE: the final option, to provide task names, is _only_
- // supported on VxWorks!
- //
- // Value of ACE_thread_t * argument Use Platforms
- // ================================ ========================== =========
- // 0 Not used. All
- // non-0 (and points to 0 char * The task name is passed All
- // on VxWorks) back in the char *.
- // non-0, points to non-0 char * The char * is used as VxWorks only
- // the task name. The
- // argument is not modified.
-
- int spawn (ACE_THR_FUNC func,
- void *args = 0,
- long flags = THR_NEW_LWP | THR_JOINABLE,
- ACE_thread_t * = 0,
- ACE_hthread_t *t_handle = 0,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- int grp_id = -1,
- void *stack = 0,
- size_t stack_size = 0);
- // Create a new thread, which executes <func>.
- // Returns: on success a unique group id that can be used to control
- // other threads added to the same group. On failure, returns -1.
-
- int spawn_n (size_t n,
- ACE_THR_FUNC func,
- void *args = 0,
- long flags = THR_NEW_LWP | THR_JOINABLE,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- int grp_id = -1,
- ACE_Task_Base *task = 0,
- ACE_hthread_t thread_handles[] = 0,
- void *stack[] = 0,
- size_t stack_size[] = 0);
- // Create N new threads, all of which execute <func>.
- // Returns: on success a unique group id that can be used to control
- // all of the threads in the same group. On failure, returns -1.
-
- int spawn_n (ACE_thread_t thread_ids[],
- size_t n,
- ACE_THR_FUNC func,
- void *args,
- long flags,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- int grp_id = -1,
- void *stack[] = 0,
- size_t stack_size[] = 0,
- ACE_hthread_t thread_handles[] = 0);
- // Spawn N new threads, which execute <func> with argument <arg>.
- // If <thread_ids> != 0 the thread_ids of successfully spawned
- // threads will be placed into the <thread_ids> buffer (which must
- // be the same size as <n>). If <stack> != 0 it is assumed to be an
- // array of <n> pointers to the base of the stacks to use for the
- // threads being spawned. If <stack_size> != 0 it is assumed to be
- // an array of <n> values indicating how big each of the
- // corresponding <stack>s are. If <thread_handles> != 0 it is
- // assumed to be an array of <n> thread_handles that will be
- // assigned the values of the thread handles being spawned. Returns
- // -1 on failure (<errno> will explain...), otherwise returns the
- // group id of the threads.
-
- void *exit (void *status = 0,
- int do_thread_exit = 1);
- // Called to clean up when a thread exits. If <do_thread_exit> is
- // non-0 then <ACE_Thread::exit> is called to exit the thread, in
- // which case <status> is passed as the exit value of the thread.
- // Should _not_ be called by main thread.
-
- int wait (const ACE_Time_Value *timeout = 0,
- int abandon_detached_threads = 0);
- // Block until there are no more threads running in the
- // <Thread_Manager> or <timeout> expires. Note that <timeout> is
- // treated as "absolute" time. Returns 0 on success and -1 on
- // failure. If <abandon_detached_threads> is set, wait will first
- // check thru its thread list for threads with THR_DETACHED or
- // THR_DAEMON flags set and remove these threads. Notice that
- // unlike other wait_* function, by default, <wait> does wait on
- // all thread spawned by this thread_manager no matter the detached
- // flags are set or not unless it is called with
- // <abandon_detached_threads> flag set.
- // NOTE that if this function is called while the ACE_Object_Manager
- // is shutting down (as a result of program rundown via ACE::fini),
- // it will not wait for any threads to complete. If you must wait for
- // threads spawned by this thread manager to complete and you are in a
- // ACE rundown situation (such as your object is being destroyed by the
- // ACE_Object_Manager) you can use wait_grp instead.
-
- int join (ACE_thread_t tid, void **status = 0);
- // Join a thread specified by <tid>. Do not wait on a detached thread.
-
- int wait_grp (int grp_id);
- // Block until there are no more threads running in a group.
- // Returns 0 on success and -1 on failure. Notice that wait_grp
- // will not wait on detached threads.
-
- // = Accessors for ACE_Thread_Descriptors.
- ACE_Thread_Descriptor *thread_desc_self (void);
- // Get a pointer to the calling thread's own thread_descriptor.
- // This must be called from a spawn thread. This function will
- // fetch the info from TSS.
-
- ACE_Thread_Descriptor *thread_descriptor (ACE_thread_t);
- // Return a pointer to the thread's Thread_Descriptor,
- // 0 if fail.
-
- ACE_Thread_Descriptor *hthread_descriptor (ACE_hthread_t);
- // Return a pointer to the thread's Thread_Descriptor,
- // 0 if fail.
-
- int thr_self (ACE_hthread_t &);
- // Return the "real" handle to the calling thread, caching it if
- // necessary in TSS to speed up subsequent lookups. This is
- // necessary since on some platforms (e.g., Win32) we can't get this
- // handle via direct method calls. Notice that you should *not*
- // close the handle passed back from this method. It is used
- // internally by Thread Manager. On the other hand, you *have to*
- // use this internal thread handle when working on Thread_Manager.
- // Return -1 if fail.
-
- ACE_thread_t thr_self (void);
- // Return the unique ID of the thread. This is not strictly
- // necessary (because a thread can always just call
- // <ACE_Thread::self>). However, we put it here to be complete.
-
- ACE_Task_Base *task (void);
- // Returns a pointer to the current <ACE_Task_Base> we're executing
- // in if this thread is indeed running in an <ACE_Task_Base>, else
- // return 0.
-
- // = Suspend methods, which isn't supported on POSIX pthreads (will not block).
- int suspend_all (void);
- // Suspend all threads
- int suspend (ACE_thread_t);
- // Suspend a single thread.
- int suspend_grp (int grp_id);
- // Suspend a group of threads.
- int testsuspend (ACE_thread_t t_id);
- // True if <t_id> is inactive (i.e., suspended), else false.
-
- // = Resume methods, which isn't supported on POSIX pthreads (will not block).
- int resume_all (void);
- // Resume all stopped threads
- int resume (ACE_thread_t);
- // Resume a single thread.
- int resume_grp (int grp_id);
- // Resume a group of threads.
- int testresume (ACE_thread_t t_id);
- // True if <t_id> is active (i.e., resumed), else false.
-
- // = Kill methods, send signals -- which isn't supported on Win32 (will not block).
- int kill_all (int signum);
- // Send signum to all stopped threads
- int kill (ACE_thread_t,
- int signum);
- // Kill a single thread.
- int kill_grp (int grp_id,
- int signum);
- // Kill a group of threads.
-
- // = Cancel methods, which provides a cooperative thread-termination mechanism (will not block).
- int cancel_all (int async_cancel = 0);
- // Cancel's all the threads.
- int cancel (ACE_thread_t, int async_cancel = 0);
- // Cancel a single thread.
- int cancel_grp (int grp_id, int async_cancel = 0);
- // Cancel a group of threads.
- int testcancel (ACE_thread_t t_id);
- // True if <t_id> is cancelled, else false.
-
- // = Set/get group ids for a particular thread id.
- int set_grp (ACE_thread_t,
- int grp_id);
- int get_grp (ACE_thread_t,
- int &grp_id);
-
- // = The following methods are new methods which resemble current
- // methods in <ACE_Thread Manager>. For example, the <apply_task>
- // method resembles the <apply_thr> method, and <suspend_task>
- // resembles <suspend_thr>.
-
- // = Operations on ACE_Tasks.
-
- int wait_task (ACE_Task_Base *task);
- // Block until there are no more threads running in <task>. Returns
- // 0 on success and -1 on failure. Note that <wait_task> will not
- // wait on detached threads.
- int suspend_task (ACE_Task_Base *task);
- // Suspend all threads in an ACE_Task.
- int resume_task (ACE_Task_Base *task);
- // Resume all threads in an ACE_Task.
- int kill_task (ACE_Task_Base *task,
- int signum);
- // Send a signal <signum> to all threads in an <ACE_Task>.
-
- int cancel_task (ACE_Task_Base *task, int async_cancel = 0);
- // Cancel all threads in an <ACE_Task>. If <async_cancel> is non-0,
- // then asynchronously cancel these threads if the OS platform
- // supports cancellation. Otherwise, perform a "cooperative"
- // cancellation.
-
- // = Collect thread handles in the thread manager. Notice that
- // the collected information is just a snapshot.
- int hthread_within (ACE_hthread_t handle);
- int thread_within (ACE_thread_t tid);
- // Check if the thread is managed by the thread manager. Return true if
- // the thread is found, false otherwise.
-
- int num_tasks_in_group (int grp_id);
- // Returns the number of <ACE_Task_Base> in a group.
-
- int num_threads_in_task (ACE_Task_Base *task);
- // Returns the number of threads in an <ACE_Task_Base>.
-
- int task_list (int grp_id,
- ACE_Task_Base *task_list[],
- size_t n);
- // Returns in <task_list> a list of up to <n> <ACE_Tasks> in a
- // group. The caller must allocate the memory for <task_list>. In
- // case of an error, -1 is returned. If no requested values are
- // found, 0 is returned, otherwise correct number of retrieved
- // values are returned.
-
- int thread_list (ACE_Task_Base *task,
- ACE_thread_t thread_list[],
- size_t n);
- // Returns in <thread_list> a list of up to <n> thread ids in an
- // <ACE_Task_Base>. The caller must allocate the memory for
- // <thread_list>. In case of an error, -1 is returned. If no
- // requested values are found, 0 is returned, otherwise correct
- // number of retrieved values are returned.
-
- int hthread_list (ACE_Task_Base *task,
- ACE_hthread_t hthread_list[],
- size_t n);
- // Returns in <hthread_list> a list of up to <n> thread handles in
- // an <ACE_Task_Base>. The caller must allocate memory for
- // <hthread_list>. In case of an error, -1 is returned. If no
- // requested values are found, 0 is returned, otherwise correct
- // number of retrieved values are returned.
-
- int thread_grp_list (int grp_id,
- ACE_thread_t thread_list[],
- size_t n);
- // Returns in <thread_list> a list of up to <n> thread ids in a
- // group <grp_id>. The caller must allocate the memory for
- // <thread_list>. In case of an error, -1 is returned. If no
- // requested values are found, 0 is returned, otherwise correct
- // number of retrieved values are returned.
-
- int hthread_grp_list (int grp_id,
- ACE_hthread_t hthread_list[],
- size_t n);
- // Returns in <hthread_list> a list of up to <n> thread handles in
- // a group <grp_id>. The caller must allocate memory for
- // <hthread_list>.
-
- int task_all_list (ACE_Task_Base *task_list[],
- size_t n);
- // Returns in <task_list> a list of up to <n> <ACE_Tasks>. The
- // caller must allocate the memory for <task_list>. In case of an
- // error, -1 is returned. If no requested values are found, 0 is
- // returned, otherwise correct number of retrieved values are
- // returned.
-
- int thread_all_list (ACE_thread_t thread_list[],
- size_t n);
- // Returns in <thread_list> a list of up to <n> thread ids. The
- // caller must allocate the memory for <thread_list>. In case of an
- // error, -1 is returned. If no requested values are found, 0 is
- // returned, otherwise correct number of retrieved values are
- // returned.
-
- // = Set/get group ids for a particular task.
- int set_grp (ACE_Task_Base *task, int grp_id);
- int get_grp (ACE_Task_Base *task, int &grp_id);
-
- int count_threads (void) const;
- // Return a count of the current number of threads active in the
- // <Thread_Manager>.
-
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- int at_exit (ACE_At_Thread_Exit* cleanup);
- // Register an At_Thread_Exit hook and the ownership is acquire by
- // Thread_Descriptor, this is the usual case when the AT is dynamically
- // allocated.
-
- int at_exit (ACE_At_Thread_Exit& cleanup);
- // Register an At_Thread_Exit hook and the ownership is retained for the
- // caller. Normally used when the at_exit hook is created in stack.
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
- int at_exit (void *object,
- ACE_CLEANUP_FUNC cleanup_hook,
- void *param);
- // *** This function is deprecated. Please use the previous two
- // *** at_exit method. Notice that you should avoid mixing this method
- // *** with the previous two at_exit methods.
- //
- // Register an object (or array) for cleanup at
- // thread termination. "cleanup_hook" points to a (global, or
- // static member) function that is called for the object or array
- // when it to be destroyed. It may perform any necessary cleanup
- // specific for that object or its class. "param" is passed as the
- // second parameter to the "cleanup_hook" function; the first
- // parameter is the object (or array) to be destroyed.
- // "cleanup_hook", for example, may delete the object (or array).
- // If <cleanup_hook> == 0, the <object> will _NOT_ get cleanup at
- // thread exit. You can use this to cancel the previously added
- // at_exit.
-
- void wait_on_exit (int dowait);
- int wait_on_exit (void);
- // Access function to determine whether the Thread_Manager will
- // wait for its thread to exit or not when being closing down.
-
- void dump (void);
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-protected:
- virtual int spawn_i (ACE_THR_FUNC func,
- void *args,
- long flags,
- ACE_thread_t * = 0,
- ACE_hthread_t *t_handle = 0,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- int grp_id = -1,
- void *stack = 0,
- size_t stack_size = 0,
- ACE_Task_Base *task = 0);
- // Create a new thread (must be called with locks held).
-
- void run_thread_exit_hooks (int i);
- // Run the registered hooks when the thread exits.
-
- ACE_Thread_Descriptor *find_thread (ACE_thread_t t_id);
- // Locate the index of the table slot occupied by <t_id>. Returns
- // -1 if <t_id> is not in the table doesn't contain <t_id>.
-
- ACE_Thread_Descriptor *find_hthread (ACE_hthread_t h_id);
- // Locate the index of the table slot occupied by <h_id>. Returns
- // -1 if <h_id> is not in the table doesn't contain <h_id>.
-
- ACE_Thread_Descriptor *find_task (ACE_Task_Base *task,
- int slot = -1);
- // Locate the thread descriptor address of the list occupied by
- // <task>. Returns 0 if <task> is not in the table doesn't contain
- // <task>.
-
- int insert_thr (ACE_thread_t t_id,
- ACE_hthread_t,
- int grp_id = -1,
- long flags = 0);
- // Insert a thread in the table (checks for duplicates).
-
- int append_thr (ACE_thread_t t_id, ACE_hthread_t,
- ACE_UINT32,
- int grp_id,
- ACE_Task_Base *task = 0,
- long flags = 0,
- ACE_Thread_Descriptor *td = 0);
- // Append a thread in the table (adds at the end, growing the table
- // if necessary).
-
- void remove_thr (ACE_Thread_Descriptor *td,
- int close_handler);
- // Remove thread from the table.
-
- void remove_thr_all (void);
- // Remove all threads from the table.
-
- // = The following four methods implement a simple scheme for
- // operating on a collection of threads atomically.
-
- int check_state (ACE_UINT32 state,
- ACE_thread_t thread,
- int enable = 1);
- // Efficiently check whether <thread> is in a particular <state>.
- // This call updates the TSS cache if possible to speed up
- // subsequent searches.
-
- int apply_task (ACE_Task_Base *task,
- ACE_THR_MEMBER_FUNC,
- int = 0);
- // Apply <func> to all members of the table that match the <task>
-
- int apply_grp (int grp_id,
- ACE_THR_MEMBER_FUNC func,
- int arg = 0);
- // Apply <func> to all members of the table that match the <grp_id>.
-
- int apply_all (ACE_THR_MEMBER_FUNC,
- int = 0);
- // Apply <func> to all members of the table.
-
- int join_thr (ACE_Thread_Descriptor *td,
- int = 0);
- // Join the thread described in <tda>.
-
- int resume_thr (ACE_Thread_Descriptor *td,
- int = 0);
- // Resume the thread described in <tda>.
-
- int suspend_thr (ACE_Thread_Descriptor *td,
- int = 0);
- // Suspend the thread described in <tda>.
-
- int kill_thr (ACE_Thread_Descriptor *td,
- int signum);
- // Send signal <signum> to the thread described in <tda>.
-
- int cancel_thr (ACE_Thread_Descriptor *td,
- int async_cancel = 0);
- // Set the cancellation flag for the thread described in <tda>.
-
- int register_as_terminated (ACE_Thread_Descriptor *td);
- // Register a thread as terminated and put it into the <terminated_thr_list_>.
-
- ACE_Double_Linked_List<ACE_Thread_Descriptor> thr_list_;
- // Keeping a list of thread descriptors within the thread manager.
- // Double-linked list enables us to cache the entries in TSS
- // and adding/removing thread descriptor entries without
- // affecting other thread's descriptor entries.
-
-#if !defined (VXWORKS)
- ACE_Double_Linked_List<ACE_Thread_Descriptor_Base> terminated_thr_list_;
- // Collect terminated but not yet joined thread entries.
-#endif /* VXWORKS */
-
- ACE_Unbounded_Queue<ACE_Thread_Descriptor*> thr_to_be_removed_;
- // Collect pointers to thread descriptors of threads to be removed later.
-
- int grp_id_;
- // Keeps track of the next group id to assign.
-
- int automatic_wait_;
- // Set if we want the Thread_Manager to wait on all threads before
- // being closed, reset otherwise.
-
- // = ACE_Thread_Mutex and condition variable for synchronizing termination.
-#if defined (ACE_HAS_THREADS)
- ACE_Thread_Mutex lock_;
- // Serialize access to the <zero_cond_>.
-
- ACE_Condition_Thread_Mutex zero_cond_;
- // Keep track of when there are no more threads.
-#endif /* ACE_HAS_THREADS */
-
-private:
- ACE_Locked_Free_List<ACE_Thread_Descriptor, ACE_SYNCH_MUTEX> thread_desc_freelist_;
-
-#if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS)
- static ACE_Thread_Manager *thr_mgr_;
- // Pointer to a process-wide <ACE_Thread_Manager>.
-
- static int delete_thr_mgr_;
- // Must delete the <thr_mgr_> if non-0.
-#endif /* ! defined (ACE_THREAD_MANAGER_LACKS_STATICS) */
-};
-
-#if defined (ACE_THREAD_MANAGER_LACKS_STATICS)
-#define ACE_THREAD_MANAGER_SINGLETON_DEFINE \
- ACE_Singleton<ACE_Thread_Manager, ACE_SYNCH_MUTEX>;
-typedef ACE_Singleton<ACE_Thread_Manager, ACE_SYNCH_MUTEX> ACE_THREAD_MANAGER_SINGLETON;
-#endif /* defined (ACE_THREAD_MANAGER_LACKS_STATICS) */
-
-#if defined (__ACE_INLINE__)
-#include "ace/Thread_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_THREAD_MANAGER_H */
diff --git a/ace/Thread_Manager.i b/ace/Thread_Manager.i
deleted file mode 100644
index c1017f816bc..00000000000
--- a/ace/Thread_Manager.i
+++ /dev/null
@@ -1,372 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Thread_Manager.i
-
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
-ACE_INLINE
-ACE_At_Thread_Exit::ACE_At_Thread_Exit()
- : next_ (0),
- td_ (0),
- was_applied_ (0),
- is_owner_ (1)
-{
-}
-
-ACE_INLINE int
-ACE_At_Thread_Exit::was_applied() const
-
-{
- return was_applied_;
-}
-
-ACE_INLINE int
-ACE_At_Thread_Exit::was_applied(int applied)
-
-{
- was_applied_ = applied;
- if (was_applied_)
- td_ = 0;
- return was_applied_;
-}
-
-ACE_INLINE int
-ACE_At_Thread_Exit::is_owner() const
-
-{
- return is_owner_;
-}
-
-ACE_INLINE int
-ACE_At_Thread_Exit::is_owner(int owner)
-
-{
- is_owner_ = owner;
- return is_owner_;
-}
-
-ACE_INLINE void
-ACE_At_Thread_Exit::do_apply()
-
-{
- if (!this->was_applied_ && this->is_owner_)
- {
- td_->at_pop();
- }
-}
-
-ACE_INLINE
-ACE_At_Thread_Exit::~ACE_At_Thread_Exit()
-
-{
- this->do_apply();
-}
-
-ACE_INLINE
-ACE_At_Thread_Exit_Func::ACE_At_Thread_Exit_Func (
- void* object,
- ACE_CLEANUP_FUNC func,
- void* param
-)
- : object_(object),
- func_(func),
- param_(param)
-
-{
-}
-
-ACE_INLINE
-ACE_At_Thread_Exit_Func::~ACE_At_Thread_Exit_Func()
-
-{
- this->do_apply();
-}
-
-ACE_INLINE void
-ACE_At_Thread_Exit_Func::apply()
-
-{
- func_(object_, param_);
-}
-#endif /* ! ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
-ACE_INLINE
-ACE_Thread_Descriptor_Base::ACE_Thread_Descriptor_Base (void)
- : ACE_OS_Thread_Descriptor (),
- thr_id_ (ACE_OS::NULL_thread),
- thr_handle_ (ACE_OS::NULL_hthread),
- grp_id_ (0),
- thr_state_ (ACE_Thread_Manager::ACE_THR_IDLE),
- task_ (0),
- next_ (0),
- prev_ (0)
-{
-}
-
-ACE_INLINE
-ACE_Thread_Descriptor_Base::~ACE_Thread_Descriptor_Base (void)
-{
-}
-
-ACE_INLINE int
-ACE_Thread_Descriptor_Base::operator==(const ACE_Thread_Descriptor_Base &rhs) const
-{
- return ACE_OS::thr_cmp (this->thr_handle_, rhs.thr_handle_) == 0
- && ACE_OS::thr_equal (this->thr_id_, rhs.thr_id_) == 0;
-}
-
-ACE_INLINE int
-ACE_Thread_Descriptor_Base::operator!=(const ACE_Thread_Descriptor_Base &rhs) const
-{
- return !(*this == rhs);
-}
-
-ACE_INLINE ACE_Task_Base *
-ACE_Thread_Descriptor_Base::task (void)
-{
- ACE_TRACE ("ACE_Thread_Descriptor_Base::task");
- return this->task_;
-}
-
-// Group ID.
-
-ACE_INLINE int
-ACE_Thread_Descriptor_Base::grp_id (void)
-{
- ACE_TRACE ("ACE_Thread_Descriptor_Base::grp_id");
- return grp_id_;
-}
-
-// Current state of the thread.
-ACE_INLINE ACE_UINT32
-ACE_Thread_Descriptor_Base::state (void)
-{
- ACE_TRACE ("ACE_Thread_Descriptor_Base::state");
- return thr_state_;
-}
-
-// Reset this base descriptor.
-ACE_INLINE void
-ACE_Thread_Descriptor_Base::reset (void)
-{
- ACE_TRACE ("ACE_Thread_Descriptor_Base::reset");
- this->thr_id_ = ACE_OS::NULL_thread;
- this->thr_handle_ = ACE_OS::NULL_hthread;
- this->grp_id_ = 0;
- this->thr_state_ = ACE_Thread_Manager::ACE_THR_IDLE;
- this->task_ = 0;
- this->flags_ = 0;
-}
-
-// Unique thread id.
-ACE_INLINE ACE_thread_t
-ACE_Thread_Descriptor::self (void)
-{
- ACE_TRACE ("ACE_Thread_Descriptor::self");
- return this->thr_id_;
-}
-
-// Unique kernel-level thread handle.
-
-ACE_INLINE void
-ACE_Thread_Descriptor::self (ACE_hthread_t &handle)
-{
- ACE_TRACE ("ACE_Thread_Descriptor::self");
- handle = this->thr_handle_;
-}
-
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
-ACE_INLINE void
-ACE_Thread_Descriptor::log_msg_cleanup(ACE_Log_Msg* log_msg)
-
-{
- log_msg_ = log_msg;
-}
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
-// Set the <next_> pointer
-ACE_INLINE void
-ACE_Thread_Descriptor::set_next (ACE_Thread_Descriptor *td)
-{
- ACE_TRACE ("ACE_Thread_Descriptor::set_next");
- this->next_ = td;
-}
-
-// Get the <next_> pointer
-ACE_INLINE ACE_Thread_Descriptor *
-ACE_Thread_Descriptor::get_next (void)
-{
- ACE_TRACE ("ACE_Thread_Descriptor::get_next");
- return ACE_static_cast (ACE_Thread_Descriptor *, this->next_);
-}
-
-// Reset this thread descriptor
-ACE_INLINE void
-ACE_Thread_Descriptor::reset (ACE_Thread_Manager *tm)
-{
- ACE_TRACE ("ACE_Thread_Descriptor::reset");
- this->ACE_Thread_Descriptor_Base::reset ();
-#if defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
- this->cleanup_info_.cleanup_hook_ = 0;
- this->cleanup_info_.object_ = 0;
- this->cleanup_info_.param_ = 0;
-#else /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
- this->at_exit_list_ = 0;
- // Start the at_exit hook list.
- this->tm_ = tm;
- // Setup the Thread_Manager.
- this->log_msg_ = 0;
- this->terminated_ = 0;
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-}
-
-// Set the exit status.
-
-ACE_INLINE void *
-ACE_Thread_Control::status (void *s)
-{
- ACE_TRACE ("ACE_Thread_Control::status");
- return this->status_ = s;
-}
-
-// Get the exit status.
-
-ACE_INLINE void *
-ACE_Thread_Control::status (void)
-{
- ACE_TRACE ("ACE_Thread_Control::status");
- return this->status_;
-}
-
-// Returns the current <Thread_Manager>.
-
-ACE_INLINE ACE_Thread_Manager *
-ACE_Thread_Control::thr_mgr (void)
-{
- ACE_TRACE ("ACE_Thread_Control::thr_mgr");
- return this->tm_;
-}
-
-// Atomically set a new <Thread_Manager> and return the old
-// <Thread_Manager>.
-
-ACE_INLINE ACE_Thread_Manager *
-ACE_Thread_Control::thr_mgr (ACE_Thread_Manager *tm)
-{
- ACE_TRACE ("ACE_Thread_Control::thr_mgr");
- ACE_Thread_Manager *o_tm = this->tm_;
- this->tm_ = tm;
- return o_tm;
-}
-
-ACE_INLINE ACE_Thread_Descriptor *
-ACE_Thread_Manager::thread_desc_self (void)
-{
- // This method must be called with lock held.
-
- // Try to get it from cache.
- ACE_Thread_Descriptor *desc = ACE_LOG_MSG->thr_desc ();
-
-#if 1
- ACE_ASSERT (desc != 0);
- // Thread descriptor should always get cached.
-#else
- if (desc == 0)
- {
- ACE_thread_t id = ACE_OS::thr_self ();
-
- desc = this->find_thread (id);
-
- // Thread descriptor adapter might not have been put into the
- // list yet.
- if (desc != 0)
- // Update the TSS cache.
- ACE_LOG_MSG->thr_desc (desc);
- }
-#endif
- return desc;
-}
-
-// Return the unique ID of the thread.
-
-ACE_INLINE ACE_thread_t
-ACE_Thread_Manager::thr_self (void)
-{
- ACE_TRACE ("ACE_Thread_Manager::thr_self");
- return ACE_Thread::self ();
-}
-
-ACE_INLINE ACE_Task_Base *
-ACE_Thread_Manager::task (void)
-{
- ACE_TRACE ("ACE_Thread_Manager::task");
-
- ACE_Thread_Descriptor *td = this->thread_desc_self () ;
-
- if (td == 0)
- return 0;
- else
- return td->task ();
-}
-
-ACE_INLINE int
-ACE_Thread_Manager::open (size_t)
-{
- // Currently no-op.
- return 0;
-}
-
-#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT)
-ACE_INLINE int
-ACE_Thread_Manager::at_exit (ACE_At_Thread_Exit* at)
-{
- return this->thread_desc_self ()->at_exit (at);
-}
-
-ACE_INLINE int
-ACE_Thread_Manager::at_exit (ACE_At_Thread_Exit& at)
-{
- return this->thread_desc_self ()->at_exit (at);
-}
-#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
-
-ACE_INLINE int
-ACE_Thread_Manager::at_exit (void *object,
- ACE_CLEANUP_FUNC cleanup_hook,
- void *param)
-{
- return this->thread_desc_self ()->at_exit (object,
- cleanup_hook,
- param);
-}
-
-ACE_INLINE void
-ACE_Thread_Manager::wait_on_exit (int do_wait)
-{
- this->automatic_wait_ = do_wait;
-}
-
-ACE_INLINE int
-ACE_Thread_Manager::wait_on_exit (void)
-{
- return this->automatic_wait_;
-}
-
-ACE_INLINE int
-ACE_Thread_Manager::register_as_terminated (ACE_Thread_Descriptor *td)
-{
-#if defined (VXWORKS)
- ACE_UNUSED_ARG (td);
-#else /* ! VXWORKS */
- ACE_Thread_Descriptor_Base *tdb;
- ACE_NEW_RETURN (tdb, ACE_Thread_Descriptor_Base (*td), -1);
- this->terminated_thr_list_.insert_tail (tdb);
-#endif /* ! VXWORKS */
- return 0;
-}
-
-ACE_INLINE int
-ACE_Thread_Manager::count_threads (void) const
-{
- return this->thr_list_.size ();
-}
diff --git a/ace/Time_Request_Reply.cpp b/ace/Time_Request_Reply.cpp
deleted file mode 100644
index e9d63a58ad3..00000000000
--- a/ace/Time_Request_Reply.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-// $Id$
-
-#include "ace/Time_Request_Reply.h"
-
-ACE_RCSID(ace, Time_Request_Reply, "$Id$")
-
-// Default "do nothing" constructor.
-
-ACE_Time_Request::ACE_Time_Request (void)
-{
- ACE_TRACE ("ACE_Time_Request::ACE_Time_Request");
-}
-
-// Create a ACE_Time_Request message.
-
-ACE_Time_Request::ACE_Time_Request (ACE_INT32 t, // Type of request.
- const ACE_UINT32 time,
- ACE_Time_Value *timeout) // Max time waiting for request.
-{
- ACE_TRACE ("ACE_Time_Request::ACE_Time_Request");
- this->msg_type (t);
-
- // If timeout is a NULL pointer, then block forever...
- if (timeout == 0)
- {
- this->transfer_.block_forever_ = 1;
- this->transfer_.sec_timeout_ = 0;
- this->transfer_.usec_timeout_ = 0;
- }
- else // Do a "timed wait."
- {
- this->block_forever (0);
- // Keep track of how long client is willing to wait.
- this->transfer_.sec_timeout_ = timeout->sec ();
- this->transfer_.usec_timeout_ = timeout->usec ();
- }
-
- // Copy time into request
- this->time_ = this->transfer_.time_ = time;
-}
-
-// Initialize length_ in order to avoid problems with byte-ordering
-void
-ACE_Time_Request::init (void)
-{
- ACE_TRACE ("ACE_Time_Request::init");
-// this->length (sizeof this->transfer_);
-}
-
-// Get the fixed size of message
-ssize_t
-ACE_Time_Request::size (void) const
-{
- ACE_TRACE ("ACE_Time_Request::size");
- return sizeof (this->transfer_);
-}
-
-// = Set/get the type of the message.
-ACE_INT32
-ACE_Time_Request::msg_type (void) const
-{
- ACE_TRACE ("ACE_Time_Request::msg_type");
- return this->transfer_.msg_type_;
-}
-
-void
-ACE_Time_Request::msg_type (ACE_INT32 t)
-{
- ACE_TRACE ("ACE_Time_Request::msg_type");
- this->transfer_.msg_type_ = t;
-}
-
-// = Set/get the blocking semantics.
-ACE_UINT32
-ACE_Time_Request::block_forever (void) const
-{
- ACE_TRACE ("ACE_Time_Request::block_forever");
- return this->transfer_.block_forever_;
-}
-
-void
-ACE_Time_Request::block_forever (ACE_UINT32 bs)
-{
- ACE_TRACE ("ACE_Time_Request::block_forever");
- this->transfer_.block_forever_ = bs;
-}
-
-// = Set/get the timeout.
-ACE_Time_Value
-ACE_Time_Request::timeout (void) const
-{
- ACE_TRACE ("ACE_Time_Request::timeout");
- return ACE_Time_Value (this->transfer_.sec_timeout_, this->transfer_.usec_timeout_);
-}
-
-void
-ACE_Time_Request::timeout (const ACE_Time_Value timeout)
-{
- ACE_TRACE ("ACE_Time_Request::timeout");
- this->transfer_.sec_timeout_ = timeout.sec ();
- this->transfer_.usec_timeout_ = timeout.usec ();
-}
-
-// = Set/get the time
-ACE_UINT32
-ACE_Time_Request::time (void) const
-{
- ACE_TRACE ("ACE_Time_Request::time");
- return this->time_;
-}
-
-void
-ACE_Time_Request::time (ACE_UINT32 t)
-{
- ACE_TRACE ("ACE_Time_Request::time");
- this->time_ = t;
-}
-
-// Encode the transfer buffer into network byte order
-// so that it can be sent to the server.
-int
-ACE_Time_Request::encode (void *&buf)
-{
- ACE_TRACE ("ACE_Time_Request::encode");
- // Compute the length *before* doing the marshaling.
-
- buf = (void *) &this->transfer_;
- this->transfer_.block_forever_ = htonl (this->transfer_.block_forever_);
- this->transfer_.usec_timeout_ = htonl (this->transfer_.usec_timeout_);
- this->transfer_.sec_timeout_ = htonl (this->transfer_.sec_timeout_);
- this->transfer_.msg_type_ = htonl (this->transfer_.msg_type_);
- this->transfer_.time_ = htonl (this->transfer_.time_);
-
- return this->size (); // Always fixed
-}
-
-// Decode the transfer buffer into host byte byte order
-// so that it can be used by the server.
-int
-ACE_Time_Request::decode (void)
-{
- ACE_TRACE ("ACE_Time_Request::decode");
- // Decode
- this->transfer_.block_forever_ = ntohl (this->transfer_.block_forever_);
- this->transfer_.usec_timeout_ = ntohl (this->transfer_.usec_timeout_);
- this->transfer_.sec_timeout_ = ntohl (this->transfer_.sec_timeout_);
- this->transfer_.msg_type_ = ntohl (this->transfer_.msg_type_);
- this->transfer_.time_ = ntohl (this->transfer_.time_);
-
- this->time_ = this->transfer_.time_;
- return 0;
-}
-
-// Print out the current values of the ACE_Time_Request.
-
-void
-ACE_Time_Request::dump (void) const
-{
- ACE_TRACE ("ACE_Time_Request::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("*******\nlength = %d\n"),
- this->size ()));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("message-type = ")));
-
- switch (this->msg_type ())
- {
- case ACE_Time_Request::TIME_UPDATE:
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TIME_UPDATE\n")));
- break;
- default:
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("<unknown type> = %d\n"), this->msg_type ()));
- break;
- }
-
- if (this->block_forever ())
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("blocking forever\n")));
- else
- {
-#if !defined (ACE_NLOGGING)
- ACE_Time_Value tv = this->timeout ();
-#endif /* ! ACE_NLOGGING */
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("waiting for %d secs and %d usecs\n"),
- tv.sec (), tv.usec ()));
- }
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("*******\ntime = %d\n"),
- this->time ()));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("+++++++\n")));
-}
diff --git a/ace/Time_Request_Reply.h b/ace/Time_Request_Reply.h
deleted file mode 100644
index ed7022e0dc8..00000000000
--- a/ace/Time_Request_Reply.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// ACE_Time_Request_Reply.h
-//
-// = DESCRIPTION
-// Define the format used to exchange messages between the
-// ACE_Time_Server and clerks.
-//
-// = AUTHOR
-// Prashant Jain
-//
-// ============================================================================
-
-#ifndef ACE_TIME_REQUEST_REPLY_H
-#define ACE_TIME_REQUEST_REPLY_H
-#include "ace/pre.h"
-
-#include "ace/Time_Value.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/SString.h"
-
-class ACE_Export ACE_Time_Request
-{
- // = TITLE
- // Message format for delivering requests to the ACE_Time Server.
- //
- // = DESCRIPTION
- // This class is implemented to minimize data copying.
- // In particular, all marshaling is done in situ...
-public:
- enum Constants
- {
- // Request message types.
- TIME_UPDATE = 01,
-
- // Class-specific constant values.
- MAX_TIME_LEN = MAXPATHLEN + 1
- };
-
- ACE_Time_Request (void);
- // Default constructor.
-
- ACE_Time_Request (ACE_INT32 msg_type, // Type of request.
- const ACE_UINT32 time,
- ACE_Time_Value *timeout = 0); // Max time waiting for request.
- // Create a <ACE_Time_Request> message.
-
- void init (void);
- // Initialize length_ in order to ensure correct byte ordering
- // before a request is sent.
-
- // Get the fixed size of message
- ssize_t size (void) const;
-
- // = Set/get the type of the message.
- ACE_INT32 msg_type (void) const;
- void msg_type (ACE_INT32);
-
- // = Set/get the time
- ACE_UINT32 time (void) const;
- void time (ACE_UINT32 t);
-
- // = Set/get the blocking semantics.
- ACE_UINT32 block_forever (void) const;
- void block_forever (ACE_UINT32);
-
- // = Set/get the timeout.
- ACE_Time_Value timeout (void) const;
- void timeout (const ACE_Time_Value timeout);
-
- int encode (void *&);
- // Encode the message before transmission.
-
- int decode (void);
- // Decode message after reception.
-
- void dump (void) const;
- // Print out the values of the message for debugging purposes.
-
-private:
- // = The 5 fields in the <Transfer> struct are transmitted to the server.
- // The remaining 2 fields are not tranferred -- they are used only on
- // the server-side to simplify lookups.
-
- struct Transfer
- {
- ACE_INT32 msg_type_;
- // Type of the request (i.e., <TIME_UPDATE>)
-
- ACE_UINT32 block_forever_;
- // Indicates if we should block forever. If 0, then <secTimeout_>
- // and <usecTimeout_> indicates how long we should wait.
-
- ACE_UINT32 sec_timeout_;
- // Max seconds willing to wait for name if not blocking forever.
-
- ACE_UINT32 usec_timeout_;
- // Max micro seconds to wait for name if not blocking forever.
-
- ACE_UINT32 time_;
- // The data portion contains <time_>
- };
-
- Transfer transfer_;
- // Transfer buffer.
-
- ACE_UINT32 time_;
- // Time
-};
-
-
-#include "ace/post.h"
-#endif /* ACE_TIME_REQUEST_REPLY_H */
diff --git a/ace/Time_Value.h b/ace/Time_Value.h
deleted file mode 100644
index 4ac2bed868d..00000000000
--- a/ace/Time_Value.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Time_Value.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TIME_VALUE_H
-#define ACE_TIME_VALUE_H
-#include "ace/pre.h"
-
-// This file is no longer used and is only here due to backwards
-// compatibility. All the functionality has been merged into OS.h.
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/post.h"
-#endif /* ACE_TIME_VALUE */
diff --git a/ace/Timeprobe.cpp b/ace/Timeprobe.cpp
deleted file mode 100644
index cdfdb116913..00000000000
--- a/ace/Timeprobe.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id$
-
-#include "ace/OS.h"
-
-ACE_RCSID(ace, Timeprobe, "$Id$")
-
-#if defined (ACE_COMPILE_TIMEPROBES)
-
-#include "ace/Timeprobe.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Timeprobe.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Timeprobe<ACE_TIMEPROBE_MUTEX>;
-template class ACE_Function_Timeprobe<ACE_Timeprobe<ACE_TIMEPROBE_MUTEX> >;
-template class ACE_Unbounded_Set_Iterator<ACE_Event_Descriptions>;
-template class ACE_Unbounded_Set<ACE_Event_Descriptions>;
-template class ACE_Node<ACE_Event_Descriptions>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Timeprobe<ACE_TIMEPROBE_MUTEX>
-#pragma instantiate ACE_Function_Timeprobe<ACE_Timeprobe<ACE_TIMEPROBE_MUTEX> >
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Event_Descriptions>
-#pragma instantiate ACE_Unbounded_Set<ACE_Event_Descriptions>
-#pragma instantiate ACE_Node<ACE_Event_Descriptions>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-# if defined (ACE_TSS_TIMEPROBES)
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_TSS_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_NULL_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_TSS_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_NULL_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-# else /* ACE_TSS_TIMEPROBES */
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-# endif /* ACE_TSS_TIMEPROBES */
-
-#endif /* ACE_COMPILE_TIMEPROBES */
-
diff --git a/ace/Timeprobe.h b/ace/Timeprobe.h
deleted file mode 100644
index 5070a863a14..00000000000
--- a/ace/Timeprobe.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timeprobe.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// = ADDITIONAL COMMENTS
-//
-// If users want to use time probes, the ACE_COMPILE_TIMEPROBES
-// flag must be defined when compiling ACE. This can be achieved
-// by doing one of the following:
-//
-// . Use make probe = 1, if you are using the make utility.
-//
-// . Define ACE_COMPILE_TIMEPROBES in config.h
-//
-// . Define ACE_COMPILE_TIMEPROBES in the VC project file.
-//
-// . Other regular methods will also work.
-//
-// It is not necessary to define ACE_COMPILE_TIMEPROBES when using
-// time probes, you simply need ACE_ENABLE_TIMEPROBES. You can use
-// the ACE_TIMEPROBE_* macros to program the time probes, and use
-// the ACE_ENABLE_TIMEPROBE to enable the time probes. If you
-// define ACE_ENABLE_TIMEPROBE in your code, but forget to compile
-// ACE with ACE_COMPILE_TIMEPROBES, you will end up with linker
-// errors.
-//
-// Remember that ACE_COMPILE_TIMEPROBES means that the ACE library
-// will contain code for time probes. This is only useful when
-// compiling ACE. ACE_ENABLE_TIMEPROBES means that the
-// ACE_TIMEPROBE_* macros should spring to life.
-//
-// ============================================================================
-
-#ifndef ACE_TIMEPROBE_H
-#define ACE_TIMEPROBE_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_ENABLE_TIMEPROBES)
- #if !defined (ACE_COMPILE_TIMEPROBES)
- #define ACE_COMPILE_TIMEPROBES
- #endif /* ACE_COMPILE_TIMEPROBES */
-#endif /* ACE_ENABLE_TIMEPROBES */
-
-#if defined (ACE_COMPILE_TIMEPROBES)
-
-class ACE_Export ACE_Event_Descriptions
-{
- // = TITLE
- // Event Descriptions.
-public:
- const char **descriptions_;
- // Event descriptions
-
- u_long minimum_id_;
- // Minimum id of this description set
-
- int operator== (const ACE_Event_Descriptions &rhs) const;
- // Comparison
-};
-
-class ACE_Export ACE_timeprobe_t
-{
- // = TITLE
- // Time probe record.
-public:
- // = Events are record as strings or numbers.
- union event
- {
- u_long event_number_;
- const char *event_description_;
- };
-
- // = Type of event.
- enum event_type
- {
- NUMBER,
- STRING
- };
-
- event event_;
- // Event.
-
- event_type event_type_;
- // Type of event.
-
- ACE_hrtime_t time_;
- // Timestamp.
-
- ACE_thread_t thread_;
- // Id of thread posting the time probe.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Timeprobe.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/Timeprobe_T.h"
-#include "ace/Synch.h"
-#include "ace/Singleton.h"
-
-// If ACE_MT_TIMEPROBES is defined, use a Thread_Mutex to lock the
-// internal state of ACE_Timerprobe. This allows multiple threads to
-// use the same ACE_Timerprobe.
-# if defined (ACE_MT_TIMEPROBES)
-typedef ACE_SYNCH_MUTEX ACE_TIMEPROBE_MUTEX;
-# else /* ACE_MT_TIMEPROBES */
-typedef ACE_SYNCH_NULL_MUTEX ACE_TIMEPROBE_MUTEX;
-# endif /* ACE_MT_TIMEPROBES */
-
-typedef ACE_Timeprobe<ACE_TIMEPROBE_MUTEX>
- ACE_TIMEPROBE_WITH_LOCKING;
-
-// If ACE_TSS_TIMEPROBES is defined, store the ACE_Timeprobe singleton
-// in thread specific storage. This allows multiple threads to use
-// their own instance of ACE_Timerprobe, without interfering with each
-// other.
-# if defined (ACE_TSS_TIMEPROBES)
-#define ACE_TIMEPROBE_SINGLETON_DEFINE \
- ACE_TSS_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_NULL_MUTEX>;
-typedef ACE_TSS_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_NULL_MUTEX>
- ACE_TIMEPROBE_SINGLETON;
-# else /* ACE_TSS_TIMEPROBES */
-#define ACE_TIMEPROBE_SINGLETON_DEFINE \
- ACE_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_MUTEX>;
-typedef ACE_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_MUTEX>
- ACE_TIMEPROBE_SINGLETON;
-# endif /* ACE_TSS_TIMEPROBES */
-
-#if defined (_MSC_VER)
-// Disable warning of using Microsoft Extension.
-#pragma warning(disable:4231)
-#endif /* _MSC_VER */
-
-ACE_SINGLETON_DECLARATION (ACE_TIMEPROBE_SINGLETON_DEFINE);
-
-#if defined (_MSC_VER)
-// Default back the warning of using Microsoft Extension.
-#pragma warning(default:4231)
-#endif /* _MSC_VER */
-
-#endif /* ACE_COMPILE_TIMEPROBES */
-
-// If ACE_ENABLE_TIMEPROBES is defined, the macros below will
-// work. Otherwise, they just vanish. Using this macro, you can
-// control which files/libraries are probed.
-#if defined (ACE_ENABLE_TIMEPROBES) && defined (ACE_COMPILE_TIMEPROBES)
-
-# define ACE_TIMEPROBE_RESET ACE_TIMEPROBE_SINGLETON::instance ()->reset ()
-# define ACE_TIMEPROBE(id) ACE_TIMEPROBE_SINGLETON::instance ()->timeprobe (id)
-# define ACE_TIMEPROBE_PRINT ACE_TIMEPROBE_SINGLETON::instance ()->print_times ()
-# define ACE_TIMEPROBE_PRINT_ABSOLUTE ACE_TIMEPROBE_SINGLETON::instance ()->print_absolute_times ()
-# define ACE_TIMEPROBE_EVENT_DESCRIPTIONS(descriptions, minimum_id) static int ace_timeprobe_##descriptions##_return = ACE_TIMEPROBE_SINGLETON::instance ()->event_descriptions (descriptions, minimum_id)
-# define ACE_FUNCTION_TIMEPROBE(X) ACE_Function_Timeprobe<ACE_TIMEPROBE_WITH_LOCKING> function_timeprobe (*ACE_TIMEPROBE_SINGLETON::instance (), X)
-
-#else /* ACE_ENABLE_TIMEPROBES && ACE_COMPILE_TIMEPROBES */
-
-# define ACE_TIMEPROBE_RESET
-# define ACE_TIMEPROBE(id)
-# define ACE_TIMEPROBE_PRINT
-# define ACE_TIMEPROBE_PRINT_ABSOLUTE
-# define ACE_TIMEPROBE_EVENT_DESCRIPTIONS(descriptions, minimum_id)
-# define ACE_FUNCTION_TIMEPROBE(X)
-
-#endif /* ACE_ENABLE_TIMEPROBES && ACE_COMPILE_TIMEPROBES */
-#include "ace/post.h"
-#endif /* ACE_TIMEPROBE_H */
diff --git a/ace/Timeprobe.i b/ace/Timeprobe.i
deleted file mode 100644
index 31f022f77b4..00000000000
--- a/ace/Timeprobe.i
+++ /dev/null
@@ -1,8 +0,0 @@
-// $Id$
-
-ACE_INLINE int
-ACE_Event_Descriptions::operator== (const ACE_Event_Descriptions &rhs) const
-{
- return this->minimum_id_ == rhs.minimum_id_ &&
- this->descriptions_ == rhs.descriptions_;
-}
diff --git a/ace/Timeprobe_T.cpp b/ace/Timeprobe_T.cpp
deleted file mode 100644
index 395ebbceb3f..00000000000
--- a/ace/Timeprobe_T.cpp
+++ /dev/null
@@ -1,300 +0,0 @@
-// $Id$
-
-#ifndef ACE_TIMEPROBE_T_C
-#define ACE_TIMEPROBE_T_C
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID(ace, Timeprobe_T, "$Id$")
-
-#if defined (ACE_COMPILE_TIMEPROBES)
-
-#include "ace/Timeprobe.h"
-#include "ace/High_Res_Timer.h"
-
-template <class ACE_LOCK>
-ACE_Timeprobe<ACE_LOCK>::ACE_Timeprobe (u_long size)
- : timeprobes_ (0),
- lock_ (),
- max_size_ (size),
- current_size_ (0)
-{
- ACE_NEW (this->timeprobes_,
- ACE_timeprobe_t[this->max_size_]);
-
-#if defined (VXWORKS)
- if (sysProcNumGet () == 0)
- this->current_slot_vme_address_ = (u_int *) 0xDa010000;
- else
- this->current_slot_vme_address_ = (u_int *) 0xD8010000;
-#endif /* VXWORKS */
-}
-
-template <class ACE_LOCK>
-ACE_Timeprobe<ACE_LOCK>::ACE_Timeprobe (const ACE_Timeprobe<ACE_LOCK> &)
-{
- //
- // Stupid MSVC is forcing me to define this; please don't use it.
- //
-
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_NOTSUP: %s, line %d\n"), __FILE__, __LINE__));
- errno = ENOTSUP;
-}
-
-template <class ACE_LOCK>
-ACE_Timeprobe<ACE_LOCK>::~ACE_Timeprobe (void)
-{
- delete [] this->timeprobes_;
-}
-
-template <class ACE_LOCK> void
-ACE_Timeprobe<ACE_LOCK>::timeprobe (u_long event)
-{
- ACE_GUARD (ACE_LOCK, ace_mon, this->lock_);
-
- ACE_ASSERT (this->current_size_ < this->max_size_);
-
- this->timeprobes_[this->current_size_].event_.event_number_ = event;
- this->timeprobes_[this->current_size_].event_type_ = ACE_timeprobe_t::NUMBER;
- this->timeprobes_[this->current_size_].time_ = ACE_OS::gethrtime ();
- this->timeprobes_[this->current_size_].thread_ = ACE_OS::thr_self ();
-
- this->current_size_++;
-
-#if defined (VMETRO_TIME_TEST) && (VXWORKS)
- // If we are using the VMETRO board to get time samples, then write
- // to the other boards VME address.
- *this->current_slot_vme_address_ = event;
-#endif /* VMETRO_TIME_TEST && VXWORKS */
-}
-
-template <class ACE_LOCK> void
-ACE_Timeprobe<ACE_LOCK>::timeprobe (const char *event)
-{
- ACE_GUARD (ACE_LOCK, ace_mon, this->lock_);
-
- ACE_ASSERT (this->current_size_ < this->max_size_);
-
- this->timeprobes_[this->current_size_].event_.event_description_ = event;
- this->timeprobes_[this->current_size_].event_type_ = ACE_timeprobe_t::STRING;
- this->timeprobes_[this->current_size_].time_ = ACE_OS::gethrtime ();
- this->timeprobes_[this->current_size_].thread_ = ACE_OS::thr_self ();
-
- this->current_size_++;
-}
-
-template <class ACE_LOCK> void
-ACE_Timeprobe<ACE_LOCK>::reset (void)
-{
- ACE_GUARD (ACE_LOCK, ace_mon, this->lock_);
-
- this->current_size_ = 0;
-}
-
-template <class ACE_LOCK> ACE_Unbounded_Set<ACE_Event_Descriptions> &
-ACE_Timeprobe<ACE_LOCK>::event_descriptions (void)
-{
- return this->event_descriptions_;
-}
-
-template <class ACE_LOCK> ACE_Unbounded_Set<ACE_Event_Descriptions> &
-ACE_Timeprobe<ACE_LOCK>::sorted_event_descriptions (void)
-{
- return this->sorted_event_descriptions_;
-}
-
-template <class ACE_LOCK> u_int *
-ACE_Timeprobe<ACE_LOCK>::current_slot_vme_address (void)
-{
- return this->current_slot_vme_address_;
-}
-
-template <class ACE_LOCK> ACE_timeprobe_t *
-ACE_Timeprobe<ACE_LOCK>::timeprobes (void)
-{
- return this->timeprobes_;
-}
-
-template <class ACE_LOCK> ACE_LOCK &
-ACE_Timeprobe<ACE_LOCK>::lock (void)
-{
- return this->lock_;
-}
-
-template <class ACE_LOCK> u_long
-ACE_Timeprobe<ACE_LOCK>::max_size (void)
-{
- return this->max_size_;
-}
-
-template <class ACE_LOCK> u_long
-ACE_Timeprobe<ACE_LOCK>::current_size (void)
-{
- return this->current_size_;
-}
-
-template <class ACE_LOCK> int
-ACE_Timeprobe<ACE_LOCK>::event_descriptions (const char **descriptions,
- u_long minimum_id)
-{
- ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
-
- ACE_Event_Descriptions events;
- events.descriptions_ = descriptions;
- events.minimum_id_ = minimum_id;
-
- this->event_descriptions_.insert (events);
-
- return 0;
-}
-
-template <class ACE_LOCK> void
-ACE_Timeprobe<ACE_LOCK>::print_times (void)
-{
- ACE_GUARD (ACE_LOCK, ace_mon, this->lock_);
-
- // Sort the event descriptions
- this->sort_event_descriptions_i ();
-
- ACE_DEBUG ((LM_DEBUG,
- "\nACE_Timeprobe; %d timestamps were recorded:\n",
- this->current_size_));
-
- if (this->current_size_ == 0)
- return;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n%-50.50s %8.8s %13.13s\n\n",
- "Event",
- "thread",
- "usec"));
-
- ACE_DEBUG ((LM_DEBUG,
- "%-50.50s %8.8x %13.13s\n",
- this->find_description_i (0),
- this->timeprobes_[0].thread_,
- "START"));
-
- ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor ();
- for (u_long i = 1; i < this->current_size_; i++)
- {
- ACE_hrtime_t time_difference =
- this->timeprobes_[i].time_ - this->timeprobes_[i-1].time_;
-
- ACE_UINT32 elapsed_time_in_micro_seconds =
- (ACE_UINT32) (time_difference / gsf);
- ACE_UINT32 remainder =
- (ACE_UINT32) (time_difference % gsf);
- // Convert to the fractional part in microseconds, with 3 digits
- // of precision (hence the 1000).
- ACE_UINT32 fractional = remainder * 1000 / gsf;
-
- ACE_DEBUG ((LM_DEBUG,
- "%-50.50s %8.8x %10u.%03.3u\n",
- this->find_description_i (i),
- this->timeprobes_[i].thread_,
- (unsigned int) elapsed_time_in_micro_seconds,
- (unsigned int) fractional));
- }
-}
-
-template <class ACE_LOCK> void
-ACE_Timeprobe<ACE_LOCK>::print_absolute_times (void)
-{
- ACE_GUARD (ACE_LOCK, ace_mon, this->lock_);
-
- // Sort the event descriptions
- this->sort_event_descriptions_i ();
-
- ACE_DEBUG ((LM_DEBUG,
- "\nACE_Timeprobe; %d timestamps were recorded:\n",
- this->current_size_));
-
- if (this->current_size_ == 0)
- return;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n%-50.50s %8.8s %13.13s\n\n",
- "Event",
- "thread",
- "stamp"));
-
- for (u_long i = 0; i < this->current_size_; i++)
- {
- char buf[64];
- ACE_OS::sprintf (buf, "%llu", this->timeprobes_[i].time_);
- ACE_DEBUG ((LM_DEBUG,
- "%-50.50s %8.8x %13.13s\n",
- this->find_description_i (i),
- this->timeprobes_[i].thread_,
- buf));
- }
-}
-
-template <class ACE_LOCK> const char *
-ACE_Timeprobe<ACE_LOCK>::find_description_i (u_long i)
-{
- if (this->timeprobes_[i].event_type_ == ACE_timeprobe_t::STRING)
- return this->timeprobes_[i].event_.event_description_;
- else
- {
- EVENT_DESCRIPTIONS::iterator iterator = this->sorted_event_descriptions_.begin ();
- for (u_long j = 0;
- j < this->sorted_event_descriptions_.size () - 1;
- iterator++, j++)
- {
- EVENT_DESCRIPTIONS::iterator next_event_descriptions = iterator;
- next_event_descriptions++;
-
- if (this->timeprobes_[i].event_.event_number_ < (*next_event_descriptions).minimum_id_)
- break;
- }
- return (*iterator).descriptions_[this->timeprobes_[i].event_.event_number_ - (*iterator).minimum_id_];
- }
-}
-
-template <class ACE_LOCK> void
-ACE_Timeprobe<ACE_LOCK>::sort_event_descriptions_i (void)
-{
- size_t total_elements = this->event_descriptions_.size ();
-
- for (size_t i = 0;
- i < total_elements;
- i++)
- {
- EVENT_DESCRIPTIONS::iterator iterator = this->event_descriptions_.begin ();
- ACE_Event_Descriptions min_entry = *iterator;
-
- for (;
- iterator != this->event_descriptions_.end ();
- iterator++)
- if ((*iterator).minimum_id_ < min_entry.minimum_id_)
- min_entry = *iterator;
-
- this->sorted_event_descriptions_.insert (min_entry);
- this->event_descriptions_.remove (min_entry);
- }
-}
-
-template <class Timeprobe>
-ACE_Function_Timeprobe<Timeprobe>::ACE_Function_Timeprobe (Timeprobe &timeprobe,
- u_long event)
- : timeprobe_ (timeprobe),
- event_ (event)
-{
- this->timeprobe_.timeprobe (this->event_);
-}
-
-template <class Timeprobe>
-ACE_Function_Timeprobe<Timeprobe>::~ACE_Function_Timeprobe (void)
-{
- this->timeprobe_.timeprobe (this->event_ + 1);
-}
-
-#endif /* ACE_COMPILE_TIMEPROBES */
-#endif /* ACE_TIMEPROBE_T_C */
diff --git a/ace/Timeprobe_T.h b/ace/Timeprobe_T.h
deleted file mode 100644
index 3850020415a..00000000000
--- a/ace/Timeprobe_T.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef ACE_TIMEPROBE_T_H
-#define ACE_TIMEPROBE_T_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_COMPILE_TIMEPROBES)
-
-#include "ace/Containers.h"
-
-template <class ACE_LOCK>
-class ACE_Timeprobe
-{
- // = TITLE
- // This class is used to instrument code. This is accomplished
- // by inserting time probes at different location in the code.
- // ACE_Timeprobe then measures the time difference between two
- // time probes.
- //
- // = DESCRIPTION
- // This class provides a lightweight implementation for
- // measuring the time required to execute code between two time
- // probes. When a time probe executes, it records the time, the
- // id of the calling thread, and an event description. The
- // event description can either be an unsigned long or a string
- // (char *). If string are used, care must be taken cause only
- // pointer copies are done and the string data is *not* copied.
- //
- // The recorded time probes can then be printed by calling
- // <print_times>. If you have used unsigned longs as event
- // descriptions in any of your time probes, you must have
- // provided an event description table that maps the unsigned
- // longs to readable strings. This map is a simple array of
- // strings, and the event number is used as the index into the
- // array when looking for the event description. If you have
- // only used strings for the event description, this map is not
- // necessary.
- //
- // Multiple maps can also be used to chunk up the time probes.
- // Each one can be added by calling <event_descriptions>.
- // Different tables are used internally by consulting the
- // minimum_id for each table. It is up to the user to make sure
- // that multiple tables do not share the same event id range.
-public:
-
- typedef ACE_Timeprobe<ACE_LOCK>
- SELF;
- // Self
-
- typedef ACE_Unbounded_Set<ACE_Event_Descriptions>
- EVENT_DESCRIPTIONS;
- // We can hold multiple event description tables.
-
- ACE_Timeprobe (u_long size = ACE_DEFAULT_TIMEPROBE_TABLE_SIZE);
- // Create Timeprobes with <size> slots
-
- ~ACE_Timeprobe (void);
- // Destructor.
-
- void timeprobe (u_long event);
- // Record a time. <event> is used to describe this time probe.
-
- void timeprobe (const char *id);
- // Record a time. <id> is used to describe this time probe.
-
- int event_descriptions (const char **descriptions,
- u_long minimum_id);
- // Record event descriptions.
-
- void print_times (void);
- // Print the time probes.
-
- void print_absolute_times (void);
- // Print the time probes.
-
- void reset (void);
- // Reset the slots. All old time probes will be lost.
-
- ACE_Timeprobe (const ACE_Timeprobe<ACE_LOCK> &);
- // Not implemented (stupid MSVC won't let it be protected).
-
- // = (Somewhat private) Accessors
-
- ACE_Unbounded_Set<ACE_Event_Descriptions> &event_descriptions (void);
- // Event Descriptions
-
- ACE_Unbounded_Set<ACE_Event_Descriptions> &sorted_event_descriptions (void);
- // Sorted Event Descriptions.
-
- u_int *current_slot_vme_address (void);
- // VME slot address.
-
- const char *find_description_i (u_long i);
- // Find description of event <i>
-
- void sort_event_descriptions_i (void);
- // Sort event descriptions
-
- ACE_timeprobe_t *timeprobes (void);
- // Time probe slots
-
- ACE_LOCK &lock (void);
- // Synchronization variable.
-
- u_long max_size (void);
- // Max size of timestamp table
-
- u_long current_size (void);
- // Current size of timestamp table
-
-protected:
-
- EVENT_DESCRIPTIONS event_descriptions_;
- // Event Descriptions
-
- EVENT_DESCRIPTIONS sorted_event_descriptions_;
- // Sorted Event Descriptions.
-
- u_int *current_slot_vme_address_;
- // Added sections below here to make compatible with the VMETRO
- // board test.
-
- ACE_timeprobe_t *timeprobes_;
- // Time probe slots
-
- ACE_LOCK lock_;
- // Synchronization variable.
-
- u_long max_size_;
- // Max size of timestamp table
-
- u_long current_size_;
- // Current size of timestamp table
-};
-
-template <class Timeprobe>
-class ACE_Function_Timeprobe
-{
- // = TITLE
- // Auto pointer like time probes. It will record <event> on
- // construction and <event + 1> on destruction.
-public:
- ACE_Function_Timeprobe (Timeprobe &timeprobe,
- u_long event);
- // Constructor.
-
- ~ACE_Function_Timeprobe (void);
- // Destructor.
-
-protected:
- Timeprobe &timeprobe_;
- // Reference to timeprobe.
-
- u_long event_;
- // Event.
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Timeprobe_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Timeprobe_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#endif /* ACE_COMPILE_TIMEPROBES */
-#include "ace/post.h"
-#endif /* ACE_TIMEPROBE_T_H */
diff --git a/ace/Timer_Hash.cpp b/ace/Timer_Hash.cpp
deleted file mode 100644
index a37df2e2fb4..00000000000
--- a/ace/Timer_Hash.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-// $Id$
-
-// Timer_Hash.cpp
-
-#if !defined (ACE_TIMER_HASH_C)
-#define ACE_TIMER_HASH_C
-
-#include "ace/Timer_Hash.h"
-
-#if defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#include "ace/Timer_Hash_T.cpp"
-#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-ACE_RCSID(ace, Timer_Hash, "$Id$")
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Free_List<ACE_Timer_Node_T<ACE_Event_Handler *> >;
-template class ACE_Locked_Free_List<ACE_Timer_Node_T<ACE_Event_Handler *>,
- ACE_Null_Mutex>;
-template class ACE_Timer_Hash_Upcall <ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX>;
-
-template class ACE_Timer_Queue_T <ACE_Event_Handler *,
- ACE_Hash_Upcall,
- ACE_Null_Mutex>;
-
-template class ACE_Timer_Queue_Iterator_T <ACE_Event_Handler *,
- ACE_Hash_Upcall,
- ACE_Null_Mutex>;
-
-template class ACE_Timer_List_T <ACE_Event_Handler *,
- ACE_Hash_Upcall,
- ACE_Null_Mutex>;
-
-template class ACE_Timer_List_Iterator_T <ACE_Event_Handler *,
- ACE_Hash_Upcall,
- ACE_Null_Mutex>;
-
-template class ACE_Timer_Heap_T <ACE_Event_Handler *,
- ACE_Hash_Upcall,
- ACE_Null_Mutex>;
-
-template class ACE_Timer_Heap_Iterator_T <ACE_Event_Handler *,
- ACE_Hash_Upcall,
- ACE_Null_Mutex>;
-
-template class ACE_Timer_Hash_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX,
- ACE_Hash_Timer_List>;
-
-template class ACE_Timer_Hash_Iterator_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX,
- ACE_Hash_Timer_List>;
-
-template class ACE_Timer_Hash_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX,
- ACE_Hash_Timer_Heap>;
-
-template class ACE_Timer_Hash_Iterator_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX,
- ACE_Hash_Timer_Heap>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Free_List<ACE_Timer_Node_T<ACE_Event_Handler *> >
-#pragma instantiate ACE_Locked_Free_List<ACE_Timer_Node_T<ACE_Event_Handler *>, \
- ACE_Null_Mutex>
-#pragma instantiate ACE_Timer_Hash_Upcall <ACE_Event_Handler *, \
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, \
- ACE_SYNCH_RECURSIVE_MUTEX>
-
-#pragma instantiate ACE_Timer_Queue_T <ACE_Event_Handler *, \
- ACE_Hash_Upcall, \
- ACE_Null_Mutex>
-
-#pragma instantiate ACE_Timer_Queue_Iterator_T <ACE_Event_Handler *, \
- ACE_Hash_Upcall, \
- ACE_Null_Mutex>
-
-#pragma instantiate ACE_Timer_List_T <ACE_Event_Handler *, \
- ACE_Hash_Upcall, \
- ACE_Null_Mutex>
-
-#pragma instantiate ACE_Timer_List_Iterator_T <ACE_Event_Handler *, \
- ACE_Hash_Upcall, \
- ACE_Null_Mutex>
-
-#pragma instantiate ACE_Timer_Heap_T <ACE_Event_Handler *, \
- ACE_Hash_Upcall, \
- ACE_Null_Mutex>
-
-#pragma instantiate ACE_Timer_Heap_Iterator_T <ACE_Event_Handler *, \
- ACE_Hash_Upcall, \
- ACE_Null_Mutex>
-
-#pragma instantiate ACE_Timer_Hash_T<ACE_Event_Handler *, \
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, \
- ACE_SYNCH_RECURSIVE_MUTEX, \
- ACE_Hash_Timer_List>
-
-#pragma instantiate ACE_Timer_Hash_Iterator_T<ACE_Event_Handler *, \
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, \
- ACE_SYNCH_RECURSIVE_MUTEX, \
- ACE_Hash_Timer_List>
-
-#pragma instantiate ACE_Timer_Hash_T<ACE_Event_Handler *, \
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, \
- ACE_SYNCH_RECURSIVE_MUTEX, \
- ACE_Hash_Timer_Heap>
-
-#pragma instantiate ACE_Timer_Hash_Iterator_T<ACE_Event_Handler *, \
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, \
- ACE_SYNCH_RECURSIVE_MUTEX, \
- ACE_Hash_Timer_Heap>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-
-#endif /* ACE_TIMER_HASH_C */
diff --git a/ace/Timer_Hash.h b/ace/Timer_Hash.h
deleted file mode 100644
index c86d3bd1730..00000000000
--- a/ace/Timer_Hash.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_Hash.h
-//
-// = AUTHOR
-// Darrell Brunsch <brunsch@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_HASH_H
-#define ACE_TIMER_HASH_H
-#include "ace/pre.h"
-
-#include "ace/Timer_Hash_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Timer_Heap_T.h"
-#include "ace/Timer_List_T.h"
-
-// The following typedef are here for ease of use
-
-typedef ACE_Timer_Hash_Upcall <ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX>
- ACE_Hash_Upcall;
-
-typedef ACE_Timer_List_T <ACE_Event_Handler *,
- ACE_Hash_Upcall,
- ACE_Null_Mutex>
- ACE_Hash_Timer_List;
-
-typedef ACE_Timer_Heap_T <ACE_Event_Handler *,
- ACE_Hash_Upcall,
- ACE_Null_Mutex>
- ACE_Hash_Timer_Heap;
-
-
-typedef ACE_Timer_Hash_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX,
- ACE_Hash_Timer_List>
-
- ACE_Timer_Hash;
-
-typedef ACE_Timer_Hash_Iterator_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX,
- ACE_Hash_Timer_List>
- ACE_Timer_Hash_Iterator;
-
-typedef ACE_Timer_Hash_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX,
- ACE_Hash_Timer_Heap>
- ACE_Timer_Hash_Heap;
-
-typedef ACE_Timer_Hash_Iterator_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX,
- ACE_Hash_Timer_Heap>
- ACE_Timer_Hash_Heap_Iterator;
-
-#include "ace/post.h"
-#endif /* ACE_TIMER_HASH_H */
diff --git a/ace/Timer_Hash_T.cpp b/ace/Timer_Hash_T.cpp
deleted file mode 100644
index 85134f9f779..00000000000
--- a/ace/Timer_Hash_T.cpp
+++ /dev/null
@@ -1,609 +0,0 @@
-// $Id$
-
-#ifndef ACE_TIMER_HASH_T_C
-#define ACE_TIMER_HASH_T_C
-
-#include "ace/Timer_Hash_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/High_Res_Timer.h"
-
-ACE_RCSID(ace, Timer_Hash_T, "$Id$")
-
-struct Hash_Token
-{
- Hash_Token (const void *act,
- size_t pos,
- long orig_id)
- : act_ (act),
- pos_ (pos),
- orig_id_ (orig_id)
- {}
-
- const void *act_;
- size_t pos_;
- long orig_id_;
-};
-
-// Default constructor
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Hash_Upcall (void)
- : timer_hash_ (0)
-{
- // Nothing
-}
-
-// Constructor that specifies a Timer_Hash to call up to
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Hash_Upcall (ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> *timer_hash)
- : timer_hash_ (timer_hash)
-{
- // Nothing
-}
-
-// Calls up to timer_hash's upcall functor
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>::timeout (ACE_Timer_Queue_T<ACE_Event_Handler *,
- ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>,
- ACE_Null_Mutex> &timer_queue,
- ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &cur_time)
-{
- ACE_UNUSED_ARG (timer_queue);
-
- Hash_Token *h = ACE_reinterpret_cast (Hash_Token *,
- ACE_const_cast (void *,
- arg));
- int result =
- this->timer_hash_->upcall_functor ().timeout (*this->timer_hash_,
- handler,
- h->act_,
- cur_time);
- delete h;
- return result;
-}
-
-
-// Calls up to timer_hash's upcall functor
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>::cancellation (ACE_Timer_Queue_T<ACE_Event_Handler *,
- ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>,
- ACE_Null_Mutex> &timer_queue,
- ACE_Event_Handler *handler)
-{
- ACE_UNUSED_ARG (timer_queue);
- return this->timer_hash_->upcall_functor ().cancellation (*this->timer_hash_,
- handler);
-}
-
-
-// Calls up to timer_hash's upcall functor
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>::deletion (ACE_Timer_Queue_T<ACE_Event_Handler *,
- ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>,
- ACE_Null_Mutex> &timer_queue,
- ACE_Event_Handler *handler,
- const void *arg)
-{
- ACE_UNUSED_ARG (timer_queue);
-
- Hash_Token *h = ACE_reinterpret_cast (Hash_Token *,
- ACE_const_cast (void *,
- arg));
- int result =
- this->timer_hash_->upcall_functor ().deletion (*this->timer_hash_,
- handler,
- h->act_);
- delete h;
- return result;
-}
-
-
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET>
-ACE_Timer_Hash_Iterator_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::ACE_Timer_Hash_Iterator_T (ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET> &hash)
- : timer_hash_ (hash)
-{
- this->first ();
- // Nothing
-}
-
-// Positions the iterator at the first node in the timing hash table
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> void
-ACE_Timer_Hash_Iterator_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::first (void)
-{
- for (this->position_ = 0;
- this->position_ < this->timer_hash_.table_size_;
- this->position_++)
- {
- // Check for an empty entry
- if (!this->timer_hash_.table_[this->position_]->is_empty ())
- {
- this->iter_ = &this->timer_hash_.table_[this->position_]->iter ();
- this->iter_->first ();
- return;
- }
- }
-
- // Didn't find any
- this->iter_ = 0;
-}
-
-// Positions the iterator at the next node in the bucket or goes to the next
-// bucket
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> void
-ACE_Timer_Hash_Iterator_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::next (void)
-{
- if (this->isdone ())
- return;
-
- // If there is no more in the current bucket, go to the next
- if (this->iter_->isdone ())
- {
- for (this->position_++;
- this->position_ < this->timer_hash_.table_size_;
- this->position_++)
- {
- // Check for an empty entry
- if (!this->timer_hash_.table_[this->position_]->is_empty ())
- {
- this->iter_ = &this->timer_hash_.table_[this->position_]->iter ();
- this->iter_->first ();
- return;
- }
- }
-
- // Didn't find any.
- this->iter_ = 0;
- }
- else
- this->iter_->next ();
-}
-
-// Returns true when we are at the end (when bucket_item_ == 0)
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> int
-ACE_Timer_Hash_Iterator_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::isdone (void)
-{
- return this->iter_ == 0;
-}
-
-// Returns the node at the current position in the sequence
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Hash_Iterator_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::item (void)
-{
- if (this->isdone ())
- return 0;
-
- return this->iter_->item ();
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> &
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::iter (void)
-{
- this->iterator_->first ();
- return *this->iterator_;
-}
-
-// Create an empty queue.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET>
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::ACE_Timer_Hash_T (size_t table_size,
- FUNCTOR *upcall_functor,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist)
- : ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> (upcall_functor, freelist),
- size_ (0),
- table_ (new BUCKET *[table_size]),
- table_size_ (table_size),
- table_functor_ (this),
- earliest_position_ (0)
-{
- ACE_TRACE ("ACE_Timer_Hash_T::ACE_Timer_Hash_T");
-
- this->gettimeofday (ACE_OS::gettimeofday);
-
- for (size_t i = 0;
- i < table_size;
- i++)
- {
- ACE_NEW (this->table_[i],
- BUCKET (&this->table_functor_,
- this->free_list_));
- this->table_[i]->gettimeofday (ACE_OS::gettimeofday);
- }
-
- ACE_NEW (iterator_,
- HASH_ITERATOR (*this));
-}
-
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET>
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::ACE_Timer_Hash_T (FUNCTOR *upcall_functor,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist)
- : ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> (upcall_functor, freelist),
- size_ (0),
- table_ (new BUCKET *[ACE_DEFAULT_TIMER_HASH_TABLE_SIZE]),
- table_size_ (ACE_DEFAULT_TIMER_HASH_TABLE_SIZE),
- table_functor_ (this),
- earliest_position_ (0)
-{
- ACE_TRACE ("ACE_Timer_Hash_T::ACE_Timer_Hash_T");
-
- this->gettimeofday (ACE_OS::gettimeofday);
-
- for (size_t i = 0;
- i < this->table_size_;
- i++)
- {
- ACE_NEW (this->table_[i],
- BUCKET (&this->table_functor_,
- this->free_list_));
- this->table_[i]->gettimeofday (ACE_OS::gettimeofday);
- }
-
- ACE_NEW (iterator_,
- HASH_ITERATOR (*this));
-}
-
-// Remove all remaining items in the Queue.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET>
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::~ACE_Timer_Hash_T (void)
-{
- ACE_TRACE ("ACE_Timer_Hash_T::~ACE_Timer_Hash_T");
- ACE_MT (ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_));
-
- delete iterator_;
-
- for (size_t i = 0;
- i < this->table_size_;
- i++)
- delete this->table_[i];
-
- delete [] this->table_;
-}
-
-// Checks if queue is empty.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> int
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::is_empty (void) const
-{
- ACE_TRACE ("ACE_Timer_Hash_T::is_empty");
- return this->table_[this->earliest_position_]->is_empty ();
-}
-
-// Returns earliest time in a non-empty bucket
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> const ACE_Time_Value &
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::earliest_time (void) const
-{
- ACE_TRACE ("ACE_Timer_Hash_T::earliest_time");
- return this->table_[this->earliest_position_]->earliest_time ();
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> void
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::dump (void) const
-{
- ACE_TRACE ("ACE_Timer_Hash_T::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntable_size_ = %d"), this->table_size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nearliest_position_ = %d"), this->earliest_position_));
-
- for (size_t i = 0; i < this->table_size_; i++)
- if (!this->table_[i]->is_empty ())
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nBucket %d contains nodes"), i));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Reschedule a periodic timer. This function must be called with the
-// mutex lock held.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> void
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::reschedule (ACE_Timer_Node_T<TYPE> *expired)
-{
- ACE_TRACE ("ACE_Timer_Hash_T::reschedule");
-
- size_t position =
- expired->get_timer_value ().usec () % this->table_size_;
-
- Hash_Token *h = ACE_reinterpret_cast (Hash_Token *,
- ACE_const_cast (void *,
- expired->get_act ()));
-
- h->orig_id_ = this->table_[position]->schedule (expired->get_type (),
- h,
- expired->get_timer_value (),
- expired->get_interval ());
-
- if (this->table_[this->earliest_position_]->is_empty ()
- || this->table_[position]->earliest_time ()
- < this->table_[this->earliest_position_]->earliest_time ())
- this->earliest_position_ = position;
-}
-
-// Insert a new handler that expires at time future_time; if interval
-// is > 0, the handler will be reinvoked periodically.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> long
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::schedule (const TYPE &type,
- const void *act,
- const ACE_Time_Value &future_time,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Timer_Hash_T::schedule");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- size_t position =
- future_time.usec () % this->table_size_;
-
- Hash_Token *h;
-
- ACE_NEW_RETURN (h,
- Hash_Token (act,
- position,
- 0),
- -1);
-
- h->orig_id_ = this->table_[position]->schedule (type,
- h,
- future_time,
- interval);
-
- if (this->table_[this->earliest_position_]->is_empty ()
- || this->table_[position]->earliest_time ()
- < this->table_[this->earliest_position_]->earliest_time ())
- this->earliest_position_ = position;
-
- ++this->size_;
-
- return ACE_reinterpret_cast (long,
- h);
-}
-
-// Locate and update the inteval on the timer_id
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> int
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::reset_interval (long timer_id,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Timer_Hash_T::reset_interval");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- // Make sure we are getting a valid <timer_id>, not an error
- // returned by <schedule>.
- if (timer_id == -1)
- return -1;
-
- Hash_Token *h = ACE_reinterpret_cast (Hash_Token *,
- timer_id);
-
- return this->table_[h->pos_]->reset_interval (h->orig_id_,
- interval);
-}
-
-// Locate and remove the single <ACE_Event_Handler> with a value of
-// <timer_id> from the correct table timer queue.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> int
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::cancel (long timer_id,
- const void **act,
- int dont_call)
-{
- ACE_TRACE ("ACE_Timer_Hash_T::cancel");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- // Make sure we are getting a valid <timer_id>, not an error
- // returned by <schedule>.
- if (timer_id == -1)
- return 0;
-
- Hash_Token *h = ACE_reinterpret_cast (Hash_Token *,
- timer_id);
-
- int result = this->table_[h->pos_]->cancel (h->orig_id_,
- act,
- dont_call);
-
- if (h->pos_ == this->earliest_position_)
- this->find_new_earliest ();
-
- if (act != 0)
- *act = h->act_;
-
- delete h;
-
- --this->size_;
-
- return result;
-}
-
-// Locate and remove all values of <type> from the timer queue.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> int
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::cancel (const TYPE &type,
- int dont_call)
-{
- ACE_TRACE ("ACE_Timer_Hash_T::cancel");
-
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- size_t i; // loop variable.
-
- Hash_Token **timer_ids;
-
- ACE_NEW_RETURN (timer_ids,
- Hash_Token *[this->size_],
- -1);
- size_t pos = 0;
-
- for (i = 0;
- i < this->table_size_;
- i++)
- {
- ACE_Timer_Queue_Iterator_T<TYPE,
- ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>,
- ACE_Null_Mutex> &iter =
- this->table_[i]->iter ();
-
- for (iter.first ();
- !iter.isdone ();
- iter.next ())
- if (iter.item ()->get_type () == type)
- timer_ids[pos++] =
- ACE_reinterpret_cast (Hash_Token *,
- ACE_const_cast (void *,
- iter.item ()->get_act ()));
- }
-
- if (pos > this->size_)
- return -1;
-
- for (i = 0; i < pos; i++)
- {
- this->table_[timer_ids[i]->pos_]->cancel (timer_ids[i]->orig_id_,
- 0,
- 1);
- delete timer_ids[i];
- --this->size_;
- }
-
- delete [] timer_ids;
-
- if (dont_call == 0)
- this->upcall_functor ().cancellation (*this,
- type);
- this->find_new_earliest ();
-
- return pos;
-}
-
-// Removes the earliest node and finds the new earliest position
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::remove_first (void)
-{
- if (this->is_empty ())
- return 0;
-
- ACE_Timer_Node_T<TYPE> *temp =
- this->table_[this->earliest_position_]->remove_first ();
-
- this->find_new_earliest ();
-
- --this->size_;
-
- return temp;
-}
-
-// Finds a new earliest position
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> void
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::find_new_earliest (void)
-{
- for (size_t i = 0; i < this->table_size_; i++)
- if (!this->table_[i]->is_empty ())
- if (this->table_[this->earliest_position_]->is_empty ()
- || this->earliest_time () == ACE_Time_Value::zero
- || this->table_[i]->earliest_time () <= this->earliest_time ())
- this->earliest_position_ = i;
-}
-
-// Returns the earliest node without removing it
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::get_first (void)
-{
- ACE_TRACE ("ACE_Timer_Hash_T::get_first");
-
- if (this->is_empty ())
- return 0;
-
- return this->table_[this->earliest_position_]->get_first ();
-}
-
-// Dummy version of expire to get rid of warnings in Sun CC 4.2
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> int
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::expire ()
-{
- return ACE_Timer_Queue_T<TYPE,FUNCTOR,ACE_LOCK>::expire();
-}
-
-// Specialized expire for Timer Hash
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> int
-ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::expire (const ACE_Time_Value &cur_time)
-{
- ACE_TRACE ("ACE_Timer_Hash_T::expire");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- int number_of_timers_expired = 0;
-
- ACE_Timer_Node_T<TYPE> *expired;
-
- // Go through the table and expire anything that can be expired
-
- for (size_t i = 0;
- i < this->table_size_;
- i++)
- {
- while (!this->table_[i]->is_empty ()
- && this->table_[i]->earliest_time () <= cur_time)
- {
- expired = this->table_[i]->remove_first ();
- --this->size_;
- TYPE &type = expired->get_type ();
- const void *act = expired->get_act ();
- int reclaim = 1;
-
- // Check if this is an interval timer.
- if (expired->get_interval () > ACE_Time_Value::zero)
- {
- // Make sure that we skip past values that have already
- // "expired".
- do
- expired->set_timer_value (expired->get_timer_value ()
- + expired->get_interval ());
- while (expired->get_timer_value () <= cur_time);
-
- // Since this is an interval timer, we need to
- // reschedule it.
- this->reschedule (expired);
- reclaim = 0;
- }
-
- Hash_Token *h = ACE_reinterpret_cast (Hash_Token *,
- ACE_const_cast (void *,
- act));
- // Call the functor.
- this->upcall (type,
- h->act_,
- cur_time);
- if (reclaim)
- {
- // Free up the node and the token
- this->free_node (expired);
- delete h;
- }
- number_of_timers_expired++;
- }
- }
-
- return number_of_timers_expired;
-}
-
-#endif /* ACE_TIMER_HASH_T_C */
diff --git a/ace/Timer_Hash_T.h b/ace/Timer_Hash_T.h
deleted file mode 100644
index a35ff3cc2da..00000000000
--- a/ace/Timer_Hash_T.h
+++ /dev/null
@@ -1,264 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_Hash_T.h
-//
-// = AUTHOR
-// Darrell Brunsch <brunsch@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_HASH_T_H
-#define ACE_TIMER_HASH_T_H
-#include "ace/pre.h"
-
-#include "ace/Timer_Queue_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Free_List.h"
-
-// Forward declaration.
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET>
-class ACE_Timer_Hash_T;
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_Hash_Upcall
-{
- // = TITLE
- // Functor for Timer_Hash
- //
- // = DESCRIPTION
- // This class calls up to the Timer Hash's functor from the
- // timer queues in the hash table
-public:
- typedef ACE_Timer_Queue_T<ACE_Event_Handler *,
- ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>,
- ACE_Null_Mutex>
- TIMER_QUEUE;
-
- ACE_Timer_Hash_Upcall (void);
- // Default constructor (creates an invalid object, but needs to be here
- // so timer queues using this functor can be constructed)
-
- ACE_Timer_Hash_Upcall (ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> *timer_hash);
- // Constructor that specifies a Timer_Hash to call up to
-
- int timeout (TIMER_QUEUE &timer_queue,
- ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &cur_time);
- // This method is called when the timer expires
-
- int cancellation (TIMER_QUEUE &timer_queue,
- ACE_Event_Handler *handler);
- // This method is called when the timer is canceled
-
- int deletion (TIMER_QUEUE &timer_queue,
- ACE_Event_Handler *handler,
- const void *arg);
- // This method is called when the timer queue is destroyed and
- // the timer is still contained in it
-
-private:
- ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> *timer_hash_;
- // Timer Queue to do the calling up to
-
- // = Don't allow these operations for now.
- ACE_UNIMPLEMENTED_FUNC (ACE_Timer_Hash_Upcall (const ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK> &))
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK> &))
-};
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET>
-class ACE_Timer_Hash_Iterator_T : public ACE_Timer_Queue_Iterator_T <TYPE, FUNCTOR, ACE_LOCK>
-{
- // = TITLE
- // Iterates over an <ACE_Timer_Hash>.
- //
- // = DESCRIPTION
- // This is a generic iterator that can be used to visit every
- // node of a timer queue. Be aware that it doesn't transverse
- // in the order of timeout values.
-public:
- ACE_Timer_Hash_Iterator_T (ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET> &);
- // Constructor.
-
- virtual void first (void);
- // Positions the iterator at the earliest node in the Timer Queue
-
- virtual void next (void);
- // Positions the iterator at the next node in the Timer Queue
-
- virtual int isdone (void);
- // Returns true when there are no more nodes in the sequence
-
- virtual ACE_Timer_Node_T<TYPE> *item (void);
- // Returns the node at the current position in the sequence
-
-protected:
- ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET> &timer_hash_;
- // Pointer to the <ACE_Timer_Hash> that we are iterating over.
-
- size_t position_;
- // Current position in <timer_hash_>'s table
-
- ACE_Timer_Queue_Iterator_T<TYPE, ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK>, ACE_Null_Mutex> *iter_;
- // Current iterator used on <position>'s bucket
-};
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET>
-class ACE_Timer_Hash_T : public ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>
-{
- // = TITLE
- // Provides a hash table of <BUCKET>s as an implementation for
- // a timer queue.
- //
- // = DESCRIPTION
- // This implementation uses a hash table of BUCKETs. The hash
- // is based on the time_value of the event. Unlike other Timer
- // Queues, ACE_Timer_Hash does not expire events in order.
-public:
- typedef ACE_Timer_Hash_Iterator_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>
- HASH_ITERATOR;
- // Type of iterator
-
- friend class ACE_Timer_Hash_Iterator_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>;
- // Iterator is a friend
-
- typedef ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> INHERITED;
- // Type inherited from
-
- // = Initialization and termination methods.
- ACE_Timer_Hash_T (size_t table_size,
- FUNCTOR *upcall_functor = 0,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist = 0);
- // Default constructor. <table_size> determines the size of the
- // hash table. <upcall_functor> is the instance of the FUNCTOR
- // to be used by the buckets. If <upcall_functor> is 0, a default
- // FUNCTOR will be created.
-
- ACE_Timer_Hash_T (FUNCTOR *upcall_functor = 0, ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist = 0);
- // Default constructor. <upcall_functor> is the instance of the
- // FUNCTOR to be used by the queue. If <upcall_functor> is 0, Timer
- // Hash will create a default FUNCTOR. <freelist> the freelist of
- // timer nodes. If 0, then a default freelist will be created. The default
- // size will be ACE_DEFAULT_TIMERS and there will be no preallocation.
-
- virtual ~ACE_Timer_Hash_T (void);
- // Destructor
-
- virtual int is_empty (void) const;
- // True if queue is empty, else false.
-
- virtual const ACE_Time_Value &earliest_time (void) const;
- // Returns the time of the earlier node in the <ACE_Timer_Hash>.
-
- virtual long schedule (const TYPE &type,
- const void *act,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval = ACE_Time_Value::zero);
- // Schedule <type> that will expire after <delay> amount of time,
- // which is specified in absolute time. If it expires then <act> is
- // passed in as the value to the <functor>. If <interval> is != to
- // <ACE_Time_Value::zero> then it is used to reschedule the <type>
- // automatically, using relative time to the current <gettimeofday>.
- // This method returns a <timer_id> that is a pointer to a token
- // which stores information about the event. This <timer_id> can be
- // used to cancel the timer before it expires. Returns -1 on
- // failure.
-
- virtual int reset_interval (long timer_id,
- const ACE_Time_Value &interval);
- // Resets the interval of the timer represented by <timer_id> to
- // <interval>, which is specified in relative time to the current
- // <gettimeofday>. If <interval> is equal to
- // <ACE_Time_Value::zero>, the timer will become a non-rescheduling
- // timer. Returns 0 if successful, -1 if not.
-
- virtual int cancel (const TYPE &type,
- int dont_call_handle_close = 1);
- // Cancel all timer associated with <type>. If <dont_call> is 0
- // then the <functor> will be invoked. Returns number of timers
- // cancelled.
-
- virtual int cancel (long timer_id,
- const void **act = 0,
- int dont_call_handle_close = 1);
- // Cancel the single timer that matches the <timer_id> value (which
- // was returned from the <schedule> method). If act is non-NULL
- // then it will be set to point to the ``magic cookie'' argument
- // passed in when the timer was registered. This makes it possible
- // to free up the memory and avoid memory leaks. If <dont_call> is
- // 0 then the <functor> will be invoked. Returns 1 if cancellation
- // succeeded and 0 if the <timer_id> wasn't found.
-
- virtual int expire (void);
- // Run the <functor> for all timers whose values are <=
- // <ACE_OS::gettimeofday>. Also accounts for <timer_skew>. Returns
- // the number of timers canceled.
-
- virtual int expire (const ACE_Time_Value &current_time);
- // Run the <functor> for all timers whose values are <= <cur_time>.
- // This does not account for <timer_skew>. Returns the number of
- // timers canceled.
-
- virtual ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> &iter (void);
- // Returns a pointer to this <ACE_Timer_Queue>'s iterator.
-
- virtual ACE_Timer_Node_T<TYPE> *remove_first (void);
- // Removes the earliest node from the queue and returns it
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- virtual ACE_Timer_Node_T<TYPE> *get_first (void);
- // Reads the earliest node from the queue and returns it.
-
-private:
- virtual void reschedule (ACE_Timer_Node_T<TYPE> *);
- // Reschedule an "interval" <ACE_Timer_Node>.
-
- void find_new_earliest (void);
- // Finds the earliest node
-
- size_t size_;
- // Keeps track of the size of the queue
-
- BUCKET **table_;
- // Table of BUCKETS
-
- size_t table_size_;
- // Keeps track of the size of <table>
-
- ACE_Timer_Hash_Upcall<TYPE, FUNCTOR, ACE_LOCK> table_functor_;
- // Functor used for the table's timer queues
-
- size_t earliest_position_;
- // Index to the position with the earliest entry
-
- HASH_ITERATOR *iterator_;
- // Iterator used to expire timers.
-
- // = Don't allow these operations for now.
- ACE_UNIMPLEMENTED_FUNC (ACE_Timer_Hash_T (const ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET> &))
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET> &))
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) && !defined(ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#include "ace/Timer_Hash_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE && !ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Timer_Hash_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_TIMER_HASH_T_H */
diff --git a/ace/Timer_Heap.cpp b/ace/Timer_Heap.cpp
deleted file mode 100644
index 8132c874f10..00000000000
--- a/ace/Timer_Heap.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id$
-
-#if !defined (ACE_TIMER_HEAP_C)
-#define ACE_TIMER_HEAP_C
-
-#include "ace/Timer_Heap.h"
-
-ACE_RCSID(ace, Timer_Heap, "$Id$")
-
-#if defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#include "ace/Timer_Hash.h"
-#include "ace/Timer_Heap_T.cpp"
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class
- ACE_Timer_Heap_T<
- ACE_Event_Handler*,
- ACE_Timer_Hash_Upcall<
- ACE_Event_Handler*,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>,
- ACE_Null_Mutex>,
- ACE_Null_Mutex>;
-
-template class
- ACE_Timer_Heap_Iterator_T<
- ACE_Event_Handler*,
- ACE_Timer_Hash_Upcall<
- ACE_Event_Handler*,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>,
- ACE_Null_Mutex>,
- ACE_Null_Mutex>;
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Timer_Heap_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Heap_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Timer_Heap_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_Heap_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-
-#endif /* ACE_TIMER_HEAP_C */
diff --git a/ace/Timer_Heap.h b/ace/Timer_Heap.h
deleted file mode 100644
index dcaabc00051..00000000000
--- a/ace/Timer_Heap.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_Heap.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_HEAP_H
-#define ACE_TIMER_HEAP_H
-#include "ace/pre.h"
-
-#include "ace/Timer_Heap_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// The following typedef are here for ease of use and backward
-// compatibility.
-
-typedef ACE_Timer_Heap_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX>
- ACE_Timer_Heap;
-
-typedef ACE_Timer_Heap_Iterator_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX>
- ACE_Timer_Heap_Iterator;
-
-#include "ace/post.h"
-#endif /* ACE_TIMER_HEAP_H */
diff --git a/ace/Timer_Heap_T.cpp b/ace/Timer_Heap_T.cpp
deleted file mode 100644
index 199fcef1cab..00000000000
--- a/ace/Timer_Heap_T.cpp
+++ /dev/null
@@ -1,732 +0,0 @@
-// $Id$
-
-#ifndef ACE_TIMER_HEAP_T_C
-#define ACE_TIMER_HEAP_T_C
-
-#include "ace/Timer_Heap_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID(ace, Timer_Heap_T, "$Id$")
-
-// Define some simple macros to clarify the code.
-#define ACE_HEAP_PARENT(X) (X == 0 ? 0 : (((X) - 1) / 2))
-#define ACE_HEAP_LCHILD(X) (((X)+(X))+1)
-
-// Constructor that takes in an <ACE_Timer_Heap_T> to iterate over.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Heap_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Heap_Iterator_T (ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> &heap)
- : timer_heap_ (heap)
-{
- ACE_TRACE ("ACE_Timer_Heap_Iterator::ACE_Timer_Heap_Iterator");
- this->first();
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Heap_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::~ACE_Timer_Heap_Iterator_T (void)
-{
-}
-
-// Positions the iterator at the first node in the heap array
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::first (void)
-{
- this->position_ = 0;
-}
-
-// Positions the iterator at the next node in the heap array
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::next (void)
-{
- if (this->position_ != this->timer_heap_.cur_size_)
- this->position_++;
-}
-
-// Returns true the <position_> is at the end of the heap array
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Heap_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::isdone (void)
-{
- return this->position_ == this->timer_heap_.cur_size_;
-}
-
-// Returns the node at the current position in the heap or 0 if at the end
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Heap_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::item (void)
-{
- if (this->position_ != this->timer_heap_.cur_size_)
- return this->timer_heap_.heap_[this->position_];
- return 0;
-}
-
-// Constructor
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Heap_T (size_t size,
- int preallocate,
- FUNCTOR *upcall_functor,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist)
- : ACE_Timer_Queue_T<TYPE,FUNCTOR,ACE_LOCK> (upcall_functor, freelist),
- max_size_ (size),
- cur_size_ (0),
- timer_ids_freelist_ (1),
- preallocated_nodes_ (0),
- preallocated_nodes_freelist_ (0)
-{
- ACE_TRACE ("ACE_Timer_Heap_T::ACE_Timer_Heap_T");
-
- // Create the heap array.
- ACE_NEW (this->heap_,
- ACE_Timer_Node_T<TYPE> *[size]);
-
- // Create the parallel
- ACE_NEW (this->timer_ids_,
- long[size]);
-
- // Initialize the "freelist," which uses negative values to
- // distinguish freelist elements from "pointers" into the <heap_>
- // array.
- for (size_t i = 0; i < size; i++)
- this->timer_ids_[i] = -((long) (i + 1));
-
- if (preallocate)
- {
- ACE_NEW (this->preallocated_nodes_,
- ACE_Timer_Node_T<TYPE>[size]);
-
- // Add allocated array to set of such arrays for deletion on
- // cleanup.
- this->preallocated_node_set_.insert (this->preallocated_nodes_);
-
- // Form the freelist by linking the next_ pointers together.
- for (size_t j = 1; j < size; j++)
- this->preallocated_nodes_[j - 1].set_next (&this->preallocated_nodes_[j]);
-
- // NULL-terminate the freelist.
- this->preallocated_nodes_[size - 1].set_next (0);
-
- // Assign the freelist pointer to the front of the list.
- this->preallocated_nodes_freelist_ =
- &this->preallocated_nodes_[0];
- }
-
- ACE_NEW (iterator_,
- HEAP_ITERATOR (*this));
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Heap_T (FUNCTOR *upcall_functor,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist)
- : ACE_Timer_Queue_T<TYPE,FUNCTOR,ACE_LOCK> (upcall_functor, freelist),
- max_size_ (ACE_DEFAULT_TIMERS),
- cur_size_ (0),
- timer_ids_freelist_ (1),
- preallocated_nodes_ (0),
- preallocated_nodes_freelist_ (0)
-{
- ACE_TRACE ("ACE_Timer_Heap_T::ACE_Timer_Heap_T");
-
- // Create the heap array.
-#if defined (__IBMCPP__) && (__IBMCPP__ >= 400) && defined (_WINDOWS)
- ACE_NEW (this->heap_,
- ACE_Timer_Node_T<TYPE> *[ACE_DEFAULT_TIMERS]);
-#else
- ACE_NEW (this->heap_,
- ACE_Timer_Node_T<TYPE> *[this->max_size_]);
-#endif /* defined (__IBMCPP__) && (__IBMCPP__ >= 400) && defined (_WINDOWS) */
-
- // Create the parallel array.
- ACE_NEW (this->timer_ids_,
- long[this->max_size_]);
-
- // Initialize the "freelist," which uses negative values to
- // distinguish freelist elements from "pointers" into the <heap_>
- // array.
- for (size_t i = 0;
- i < this->max_size_;
- i++)
- this->timer_ids_[i] = -((long) (i + 1));
-
- ACE_NEW (iterator_,
- HEAP_ITERATOR (*this));
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::~ACE_Timer_Heap_T (void)
-{
- ACE_TRACE ("ACE_Timer_Heap::~ACE_Timer_Heap");
-
- delete iterator_;
-
- // Clean up all the nodes still in the queue
- for (size_t i = 0; i < this->cur_size_; i++)
- {
- this->upcall_functor ().deletion (*this,
- this->heap_[i]->get_type (),
- this->heap_[i]->get_act ());
- this->free_node (this->heap_[i]);
- }
-
- delete [] this->heap_;
- delete [] this->timer_ids_;
-
- // clean up any preallocated timer nodes
- if (preallocated_nodes_ != 0)
- {
- ACE_Unbounded_Set_Iterator<ACE_Timer_Node_T<TYPE> *>
- set_iterator (this->preallocated_node_set_);
-
- for (ACE_Timer_Node_T<TYPE> **entry = 0;
- set_iterator.next (entry) !=0;
- set_iterator.advance ())
- delete [] *entry;
- }
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::pop_freelist (void)
-{
- ACE_TRACE ("ACE_Timer_Heap::pop_freelist");
-
- // We need to truncate this to <int> for backwards compatibility.
- int new_id = ACE_static_cast (int,
- this->timer_ids_freelist_);
-
- // The freelist values in the <timer_ids_> are negative, so we need
- // to negate them to get the next freelist "pointer."
- this->timer_ids_freelist_ =
- -this->timer_ids_[this->timer_ids_freelist_];
-
- return new_id;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::push_freelist (int old_id)
-{
- ACE_TRACE ("ACE_Timer_Heap::push_freelist");
-
- // The freelist values in the <timer_ids_> are negative, so we need
- // to negate them to get the next freelist "pointer."
- this->timer_ids_[old_id] = -this->timer_ids_freelist_;
- this->timer_ids_freelist_ = old_id;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::timer_id (void)
-{
- ACE_TRACE ("ACE_Timer_Heap::timer_id");
-
- // Return the next item off the freelist and use it as the timer id.
- return this->pop_freelist ();
-}
-
-// Checks if queue is empty.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::is_empty (void) const
-{
- ACE_TRACE ("ACE_Timer_Heap::is_empty");
- return this->cur_size_ == 0;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> &
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::iter (void)
-{
- this->iterator_->first ();
- return *this->iterator_;
-}
-
-// Returns earliest time in a non-empty queue.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> const ACE_Time_Value &
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::earliest_time (void) const
-{
- ACE_TRACE ("ACE_Timer_Heap::earliest_time");
- return this->heap_[0]->get_timer_value ();
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::dump (void) const
-{
- ACE_TRACE ("ACE_Timer_Heap::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmax_size_ = %d"), this->max_size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d"), this->cur_size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nheap_ = \n")));
-
- for (size_t i = 0; i < this->cur_size_; i++)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%d\n"),
- i));
- this->heap_[i]->dump ();
- }
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntimer_ids_ = \n")));
-
- for (size_t j = 0; j < this->cur_size_; j++)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%d\t%d\n"),
- j,
- this->timer_ids_[j]));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::copy (int slot,
- ACE_Timer_Node_T<TYPE> *moved_node)
-{
- // Insert <moved_node> into its new location in the heap.
- this->heap_[slot] = moved_node;
-
- ACE_ASSERT (moved_node->get_timer_id () >= 0
- && moved_node->get_timer_id () < (int) this->max_size_);
-
- // Update the corresponding slot in the parallel <timer_ids_> array.
- this->timer_ids_[moved_node->get_timer_id ()] = slot;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::remove (size_t slot)
-{
- ACE_Timer_Node_T<TYPE> *removed_node =
- this->heap_[slot];
-
- // Return this timer id to the freelist.
- this->push_freelist (removed_node->get_timer_id ());
-
- // Decrement the size of the heap by one since we're removing the
- // "slot"th node.
- this->cur_size_--;
-
- // Only try to reheapify if we're not deleting the last entry.
-
- if (slot < this->cur_size_)
- {
- ACE_Timer_Node_T<TYPE> *moved_node =
- this->heap_[this->cur_size_];
-
- // Move the end node to the location being removed and update
- // the corresponding slot in the parallel <timer_ids> array.
- this->copy (slot, moved_node);
-
- // If the <moved_node->time_value_> is great than or equal its
- // parent it needs be moved down the heap.
- size_t parent = ACE_HEAP_PARENT (slot);
-
- if (moved_node->get_timer_value ()
- >= this->heap_[parent]->get_timer_value ())
- this->reheap_down (moved_node,
- slot,
- ACE_HEAP_LCHILD (slot));
- else
- this->reheap_up (moved_node,
- slot,
- parent);
- }
-
- return removed_node;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::reheap_down (ACE_Timer_Node_T<TYPE> *moved_node,
- size_t slot,
- size_t child)
-{
- // Restore the heap property after a deletion.
-
- while (child < this->cur_size_)
- {
- // Choose the smaller of the two children.
- if (child + 1 < this->cur_size_
- && this->heap_[child + 1]->get_timer_value ()
- < this->heap_[child]->get_timer_value ())
- child++;
-
- // Perform a <copy> if the child has a larger timeout value than
- // the <moved_node>.
- if (this->heap_[child]->get_timer_value ()
- < moved_node->get_timer_value ())
- {
- this->copy (slot,
- this->heap_[child]);
- slot = child;
- child = ACE_HEAP_LCHILD (child);
- }
- else
- // We've found our location in the heap.
- break;
- }
-
- this->copy (slot, moved_node);
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::reheap_up (ACE_Timer_Node_T<TYPE> *moved_node,
- size_t slot,
- size_t parent)
-{
- // Restore the heap property after an insertion.
-
- while (slot > 0)
- {
- // If the parent node is greater than the <moved_node> we need
- // to copy it down.
- if (moved_node->get_timer_value ()
- < this->heap_[parent]->get_timer_value ())
- {
- this->copy (slot, this->heap_[parent]);
- slot = parent;
- parent = ACE_HEAP_PARENT (slot);
- }
- else
- break;
- }
-
- // Insert the new node into its proper resting place in the heap and
- // update the corresponding slot in the parallel <timer_ids> array.
- this->copy (slot,
- moved_node);
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::insert (ACE_Timer_Node_T<TYPE> *new_node)
-{
- if (this->cur_size_ + 2 >= max_size_)
- this->grow_heap ();
-
- this->reheap_up (new_node,
- this->cur_size_,
- ACE_HEAP_PARENT (this->cur_size_));
- this->cur_size_++;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::grow_heap (void)
-{
- // All the containers will double in size from max_size_
- size_t new_size = max_size_ * 2;
-
- // First grow the heap itself.
-
- ACE_Timer_Node_T<TYPE> **new_heap = 0;
-
-#if defined (__IBMCPP__) && (__IBMCPP__ >= 400) && defined (_WINDOWS)
- ACE_NEW (new_heap,
- ACE_Timer_Node_T<TYPE> *[1024]);
-#else
- ACE_NEW (new_heap,
- ACE_Timer_Node_T<TYPE> *[new_size]);
-#endif /* defined (__IBMCPP__) && (__IBMCPP__ >= 400) && defined (_WINDOWS) */
- ACE_OS::memcpy (new_heap,
- this->heap_,
- max_size_ * sizeof *new_heap);
- delete [] this->heap_;
- this->heap_ = new_heap;
-
- // Grow the array of timer ids.
-
- long *new_timer_ids = 0;
-
- ACE_NEW (new_timer_ids,
- long[new_size]);
-
- ACE_OS::memcpy (new_timer_ids,
- this->timer_ids_,
- max_size_ * sizeof (long));
-
- delete [] timer_ids_;
- this->timer_ids_ = new_timer_ids;
-
- // And add the new elements to the end of the "freelist".
- for (size_t i = this->max_size_; i < new_size; i++)
- this->timer_ids_[i] = -((long) (i + 1));
-
- // Grow the preallocation array (if using preallocation)
- if (this->preallocated_nodes_ != 0)
- {
- // Create a new array with max_size elements to link in to
- // existing list.
-#if defined (__IBMCPP__) && (__IBMCPP__ >= 400) && defined (_WINDOWS)
- ACE_NEW (this->preallocated_nodes_,
- ACE_Timer_Node_T<TYPE>[88]);
-#else
- ACE_NEW (this->preallocated_nodes_,
- ACE_Timer_Node_T<TYPE>[this->max_size_]);
-#endif /* defined (__IBMCPP__) && (__IBMCPP__ >= 400) && defined (_WINDOWS) */
-
- // Add it to the set for later deletion
- this->preallocated_node_set_.insert (this->preallocated_nodes_);
-
- // Link new nodes together (as for original list).
- for (size_t k = 1; k < this->max_size_; k++)
- this->preallocated_nodes_[k - 1].set_next (&this->preallocated_nodes_[k]);
-
- // NULL-terminate the new list.
- this->preallocated_nodes_[this->max_size_ - 1].set_next (0);
-
- // Link new array to the end of the existling list.
- if (this->preallocated_nodes_freelist_ == 0)
- this->preallocated_nodes_freelist_ =
- &preallocated_nodes_[0];
- else
- {
- ACE_Timer_Node_T<TYPE> *previous =
- this->preallocated_nodes_freelist_;
-
- for (ACE_Timer_Node_T<TYPE> *current = this->preallocated_nodes_freelist_->get_next ();
- current != 0;
- current = current->get_next ())
- previous = current;
-
- previous->set_next (&this->preallocated_nodes_[0]);
- }
- }
-
- this->max_size_ = new_size;
-}
-
-// Reschedule a periodic timer. This function must be called with the
-// mutex lock held.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::reschedule (ACE_Timer_Node_T<TYPE> *expired)
-{
- ACE_TRACE ("ACE_Timer_Heap::reschedule");
-
- // If we are rescheduling then we have freed our timer id so we need
- // to reacquire it. NOTE: we rely on the fact that we will get the
- // same timer id we just freed.
-# if !defined (ACE_NDEBUG)
- int timerId =
-# endif /* ACE_NDEBUG */
- this->timer_id ();
-
- // Just to be safe...
- ACE_ASSERT (timerId == expired->get_timer_id ());
-
- // Restore the heap property.
- this->insert (expired);
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::alloc_node (void)
-{
- ACE_Timer_Node_T<TYPE> *temp = 0;
-
- // Only allocate a node if we are *not* using the preallocated heap.
- if (this->preallocated_nodes_ == 0)
- ACE_NEW_RETURN (temp,
- ACE_Timer_Node_T<TYPE>,
- 0);
- else
- {
- // check to see if the heap needs to grow
- if (this->preallocated_nodes_freelist_ == 0)
- this->grow_heap ();
-
- temp = this->preallocated_nodes_freelist_;
-
- // Remove the first element from the freelist.
- this->preallocated_nodes_freelist_ =
- this->preallocated_nodes_freelist_->get_next ();
- }
- return temp;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::free_node (ACE_Timer_Node_T<TYPE> *node)
-{
- // Only free up a node if we are *not* using the preallocated heap.
- if (this->preallocated_nodes_ == 0)
- delete node;
- else
- {
- node->set_next (this->preallocated_nodes_freelist_);
- this->preallocated_nodes_freelist_ = node;
- }
-}
-
-// Insert a new timer that expires at time future_time; if interval is
-// > 0, the handler will be reinvoked periodically.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> long
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::schedule (const TYPE &type,
- const void *act,
- const ACE_Time_Value &future_time,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Timer_Heap::schedule");
-
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- if (this->cur_size_ < this->max_size_)
- {
- // Obtain the next unique sequence number.
- int timer_id = this->timer_id ();
-
- // Obtain the memory to the new node.
- ACE_Timer_Node_T<TYPE> *temp = 0;
-
- ACE_ALLOCATOR_RETURN (temp,
- this->alloc_node (),
- -1);
- temp->set (type,
- act,
- future_time,
- interval,
- 0,
- timer_id);
-
- this->insert (temp);
- return timer_id;
- }
- else
- return -1;
-}
-
-// Locate and remove the single timer with a value of <timer_id> from
-// the timer queue.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::cancel (long timer_id,
- const void **act,
- int dont_call)
-{
- ACE_TRACE ("ACE_Timer_Heap::cancel");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- // Locate the ACE_Timer_Node that corresponds to the timer_id.
-
- // Check to see if the timer_id is out of range
- if (timer_id < 0
- || (size_t) timer_id > this->max_size_)
- return 0;
-
- long timer_node_slot = this->timer_ids_[timer_id];
-
- // Check to see if timer_id is still valid.
- if (timer_node_slot < 0)
- return 0;
-
- if (timer_id != this->heap_[timer_node_slot]->get_timer_id ())
- {
- ACE_ASSERT (timer_id == this->heap_[timer_node_slot]->get_timer_id ());
- return 0;
- }
- else
- {
- ACE_Timer_Node_T<TYPE> *temp =
- this->remove (timer_node_slot);
-
- if (dont_call == 0)
- // Call the close hook.
- this->upcall_functor ().cancellation (*this,
- temp->get_type ());
-
- if (act != 0)
- *act = temp->get_act ();
-
- this->free_node (temp);
- return 1;
- }
-}
-
-// Locate and update the inteval on the timer_id
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::reset_interval (long timer_id,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Timer_Heap_T::reset_interval");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- // Locate the ACE_Timer_Node that corresponds to the timer_id.
-
- // Check to see if the timer_id is out of range
- if (timer_id < 0
- || (size_t) timer_id > this->max_size_)
- return -1;
-
- long timer_node_slot = this->timer_ids_[timer_id];
-
- // Check to see if timer_id is still valid.
- if (timer_node_slot < 0)
- return -1;
-
- if (timer_id != this->heap_[timer_node_slot]->get_timer_id ())
- {
- ACE_ASSERT (timer_id == this->heap_[timer_node_slot]->get_timer_id ());
- return -1;
- }
- else
- {
- // Reset the timer interval
- this->heap_[timer_node_slot]->set_interval (interval);
- return 0;
- }
-}
-
-// Locate and remove all values of <type> from the timer queue.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::cancel (const TYPE &type,
- int dont_call)
-{
- ACE_TRACE ("ACE_Timer_Heap::cancel");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- int number_of_cancellations = 0;
-
- // Try to locate the ACE_Timer_Node that matches the timer_id.
-
- for (size_t i = 0; i < this->cur_size_; )
- {
- if (this->heap_[i]->get_type () == type)
- {
- ACE_Timer_Node_T<TYPE> *temp = this->remove (i);
-
- number_of_cancellations++;
-
- this->free_node (temp);
- }
- else
- i++;
- }
-
- if (dont_call == 0)
- this->upcall_functor ().cancellation (*this, type);
-
- return number_of_cancellations;
-}
-
-// Returns the earliest node or returns 0 if the heap is empty.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T <TYPE> *
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::remove_first (void)
-{
- ACE_TRACE ("ACE_Timer_Heap_T::remove_first");
-
- if (this->cur_size_ == 0)
- return 0;
-
- return this->remove (0);
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T <TYPE> *
-ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK>::get_first (void)
-{
- ACE_TRACE ("ACE_Timer_Heap_T::get_first");
-
- return this->cur_size_ == 0 ? 0 : this->heap_[0];
-}
-
-#endif /* ACE_TIMER_HEAP_T_C */
diff --git a/ace/Timer_Heap_T.h b/ace/Timer_Heap_T.h
deleted file mode 100644
index 54b74e660ba..00000000000
--- a/ace/Timer_Heap_T.h
+++ /dev/null
@@ -1,285 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_Heap_T.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_HEAP_T_H
-#define ACE_TIMER_HEAP_T_H
-#include "ace/pre.h"
-
-#include "ace/Timer_Queue_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Free_List.h"
-#include "ace/Containers.h"
-
-// Forward declaration
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_Heap_T;
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_Heap_Iterator_T : public ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>
-{
- // = TITLE
- // Iterates over an <ACE_Timer_Heap_T>.
- //
- // = DESCRIPTION
- // This is a generic iterator that can be used to visit every
- // node of a timer queue. Be aware that it doesn't transverse
- // in the order of timeout values.
-public:
- ACE_Timer_Heap_Iterator_T (ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> &);
- // Constructor.
-
- ~ACE_Timer_Heap_Iterator_T (void);
- // Destructor.
-
- virtual void first (void);
- // Positions the iterator at the earliest node in the Timer Queue
-
- virtual void next (void);
- // Positions the iterator at the next node in the Timer Queue
-
- virtual int isdone (void);
- // Returns true when there are no more nodes in the sequence
-
- virtual ACE_Timer_Node_T<TYPE> *item (void);
- // Returns the node at the current position in the sequence
-
-protected:
- ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> &timer_heap_;
- // Pointer to the <ACE_Timer_Heap> that we are iterating over.
-
- size_t position_;
- // Position in the array where the iterator is at
-};
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_Heap_T : public ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>
-{
- // = TITLE
- // Provides a very fast and predictable timer implementation.
- //
- // = DESCRIPTION
- // This implementation uses a heap-based callout queue of
- // absolute times. Therefore, in the average and worst case,
- // scheduling, canceling, and expiring timers is O(log N) (where
- // N is the total number of timers). In addition, we can also
- // preallocate as many <ACE_Timer_Nodes> as there are slots in
- // the heap. This allows us to completely remove the need for
- // dynamic memory allocation, which is important for real-time
- // systems.
-public:
- typedef ACE_Timer_Heap_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> HEAP_ITERATOR;
- friend class ACE_Timer_Heap_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>;
-
- typedef ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> INHERITED;
-
- // = Initialization and termination methods.
- ACE_Timer_Heap_T (size_t size,
- int preallocated = 0,
- FUNCTOR *upcall_functor = 0,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist = 0);
- // The Constructor creates a heap with <size> elements. If
- // <preallocated> is non-0 then we'll pre-allocate all the memory
- // for the <ACE_Timer_Nodes>. This saves time and is more
- // predictable (though it requires more space). Otherwise, we'll
- // just allocate the nodes as we need them. This can also take in a
- // upcall functor and freelist (if 0, then defaults will be created)
-
- ACE_Timer_Heap_T (FUNCTOR *upcall_functor = 0,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist = 0);
- // Default constructor. <upcall_functor> is the instance of the
- // FUNCTOR to be used by the queue. If <upcall_functor> is 0, Timer
- // Heap will create a default FUNCTOR. <freelist> the freelist of
- // timer nodes. If 0, then a default freelist will be created. The default
- // size will be ACE_DEFAULT_TIMERS and there will be no preallocation.
-
- virtual ~ACE_Timer_Heap_T (void);
- // Destructor.
-
- virtual int is_empty (void) const;
- // True if heap is empty, else false.
-
- virtual const ACE_Time_Value &earliest_time (void) const;
- // Returns the time of the earlier node in the Timer_Queue.
-
- virtual long schedule (const TYPE &type,
- const void *act,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval = ACE_Time_Value::zero);
- // Schedule <type> that will expire after <delay> amount of time,
- // which is specified in absolute time. If it expires then <act> is
- // passed in as the value to the <functor>. If <interval> is != to
- // <ACE_Time_Value::zero> then it is used to reschedule the <type>
- // automatically, using relative time to the current <gettimeofday>.
- // This method returns a <timer_id> that uniquely identifies the the
- // <type> entry in an internal list. This <timer_id> can be used to
- // cancel the timer before it expires. The cancellation ensures
- // that <timer_ids> are unique up to values of greater than 2
- // billion timers. As long as timers don't stay around longer than
- // this there should be no problems with accidentally deleting the
- // wrong timer. Returns -1 on failure (which is guaranteed never to
- // be a valid <timer_id>).
-
- virtual int reset_interval (long timer_id,
- const ACE_Time_Value &interval);
- // Resets the interval of the timer represented by <timer_id> to
- // <interval>, which is specified in relative time to the current
- // <gettimeofday>. If <interval> is equal to
- // <ACE_Time_Value::zero>, the timer will become a non-rescheduling
- // timer. Returns 0 if successful, -1 if not.
-
- virtual int cancel (const TYPE &type,
- int dont_call_handle_close = 1);
- // Cancel all timer associated with <type>. If <dont_call> is 0
- // then the <functor> will be invoked. Returns number of timers
- // cancelled.
-
- virtual int cancel (long timer_id,
- const void **act = 0,
- int dont_call_handle_close = 1);
- // Cancel the single timer that matches the <timer_id> value (which
- // was returned from the <schedule> method). If act is non-NULL
- // then it will be set to point to the ``magic cookie'' argument
- // passed in when the timer was registered. This makes it possible
- // to free up the memory and avoid memory leaks. If <dont_call> is
- // 0 then the <functor> will be invoked. Returns 1 if cancellation
- // succeeded and 0 if the <timer_id> wasn't found.
-
- virtual ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> &iter (void);
- // Returns a pointer to this <ACE_Timer_Queue>'s iterator.
-
- ACE_Timer_Node_T <TYPE> *remove_first (void);
- // Removes the earliest node from the queue and returns it
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- virtual ACE_Timer_Node_T<TYPE> *get_first (void);
- // Reads the earliest node from the queue and returns it.
-
-protected:
- virtual void reschedule (ACE_Timer_Node_T<TYPE> *);
- // Reschedule an "interval" <ACE_Timer_Node>.
-
- virtual ACE_Timer_Node_T<TYPE> *alloc_node (void);
- // Factory method that allocates a new node (uses operator new if
- // we're *not* preallocating, otherwise uses an internal freelist).
-
- virtual void free_node (ACE_Timer_Node_T<TYPE> *);
- // Factory method that frees a previously allocated node (uses
- // operatord delete if we're *not* preallocating, otherwise uses an
- // internal freelist).
-
-private:
- ACE_Timer_Node_T<TYPE> *remove (size_t slot);
- // Remove and return the <slot>th <ACE_Timer_Node> and restore the
- // heap property.
-
- void insert (ACE_Timer_Node_T<TYPE> *new_node);
- // Insert <new_node> into the heap and restore the heap property.
-
- void grow_heap (void);
- // Doubles the size of the heap and the corresponding timer_ids array.
- // If preallocation is used, will also double the size of the
- // preallocated array of ACE_Timer_Nodes.
-
- void reheap_up (ACE_Timer_Node_T<TYPE> *new_node,
- size_t slot,
- size_t parent);
- // Restore the heap property, starting at <slot>.
-
- void reheap_down (ACE_Timer_Node_T<TYPE> *moved_node,
- size_t slot,
- size_t child);
- // Restore the heap property, starting at <slot>.
-
- void copy (int slot, ACE_Timer_Node_T<TYPE> *moved_node);
- // Copy <moved_node> into the <slot> slot of <heap_> and move
- // <slot> into the corresponding slot in the <timer_id_> array.
-
- int timer_id (void);
- // Returns a timer id that uniquely identifies this timer. This id
- // can be used to cancel a timer via the <cancel (int)> method. The
- // timer id returned from this method will never == -1 to avoid
- // conflicts with other failure return values.
-
- int pop_freelist (void);
- // Pops and returns a new timer id from the freelist.
-
- void push_freelist (int old_id);
- // Pushes <old_id> onto the freelist.
-
- size_t max_size_;
- // Maximum size of the heap.
-
- size_t cur_size_;
- // Current size of the heap.
-
- HEAP_ITERATOR *iterator_;
- // Iterator used to expire timers.
-
- ACE_Timer_Node_T<TYPE> **heap_;
- // Current contents of the Heap, which is organized as a "heap" of
- // <ACE_Timer_Node> *'s. In this context, a heap is a "partially
- // ordered, almost complete" binary tree, which is stored in an
- // array.
-
- long *timer_ids_;
- // An array of "pointers" that allows each <ACE_Timer_Node> in the
- // <heap_> to be located in O(1) time. Basically, <timer_id_[i]>
- // contains the slot in the <heap_> array where an <ACE_Timer_Node>
- // * with timer id <i> resides. Thus, the timer id passed back from
- // <schedule> is really an slot into the <timer_ids> array. The
- // <timer_ids_> array serves two purposes: negative values are
- // treated as "pointers" for the <freelist_>, whereas positive
- // values are treated as "pointers" into the <heap_> array.
-
- long timer_ids_freelist_;
- // "Pointer" to the first element in the freelist contained within
- // the <timer_ids_> array, which is organized as a stack.
-
- ACE_Timer_Node_T<TYPE> *preallocated_nodes_;
- // If this is non-0, then we preallocate <max_size_> number of
- // <ACE_Timer_Node> objects in order to reduce dynamic allocation
- // costs. In auto-growing implementation, this points to the
- // last array of nodes allocated.
-
- ACE_Timer_Node_T<TYPE> *preallocated_nodes_freelist_;
- // This points to the head of the <preallocated_nodes_> freelist,
- // which is organized as a stack.
-
- ACE_Unbounded_Set<ACE_Timer_Node_T<TYPE> *> preallocated_node_set_;
- // Set of pointers to the arrays of preallocated timer nodes.
- // Used to delete the allocated memory when required.
-
- // = Don't allow these operations for now.
- ACE_UNIMPLEMENTED_FUNC (ACE_Timer_Heap_T (const ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> &))
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Timer_Heap_T<TYPE, FUNCTOR, ACE_LOCK> &))
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) && !defined(ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#include "ace/Timer_Heap_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE && !ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Timer_Heap_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_TIMER_HEAP_T_H */
diff --git a/ace/Timer_List.cpp b/ace/Timer_List.cpp
deleted file mode 100644
index 3834178a0b0..00000000000
--- a/ace/Timer_List.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id$
-
-#if !defined (ACE_TIMER_LIST_C)
-#define ACE_TIMER_LIST_C
-
-#include "ace/Timer_List.h"
-
-ACE_RCSID(ace, Timer_List, "$Id$")
-
-#if defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#include "ace/Timer_Hash.h"
-#include "ace/Timer_List_T.cpp"
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class
- ACE_Timer_List_T<
- ACE_Event_Handler*,
- ACE_Timer_Hash_Upcall<
- ACE_Event_Handler*,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>,
- ACE_Null_Mutex>,
- ACE_Null_Mutex>;
-
-template class
-ACE_Timer_List_Iterator_T<
- ACE_Event_Handler*,
- ACE_Timer_Hash_Upcall<
- ACE_Event_Handler*,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>,
- ACE_Null_Mutex>,
- ACE_Null_Mutex>;
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Timer_List_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_List_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Timer_List_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_List_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-
-#endif /* ACE_TIMER_LIST_C */
diff --git a/ace/Timer_List.h b/ace/Timer_List.h
deleted file mode 100644
index 3f9c6b462b3..00000000000
--- a/ace/Timer_List.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_List.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_LIST_H
-#define ACE_TIMER_LIST_H
-#include "ace/pre.h"
-
-#include "ace/Timer_List_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// The following typedef are here for ease of use and backward
-// compatibility.
-
-typedef ACE_Timer_List_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX>
- ACE_Timer_List;
-
-typedef ACE_Timer_List_Iterator_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX>
- ACE_Timer_List_Iterator;
-
-#include "ace/post.h"
-#endif /* ACE_TIMER_LIST_H */
diff --git a/ace/Timer_List_T.cpp b/ace/Timer_List_T.cpp
deleted file mode 100644
index 8902d1fcb1f..00000000000
--- a/ace/Timer_List_T.cpp
+++ /dev/null
@@ -1,341 +0,0 @@
-// $Id$
-
-#ifndef ACE_TIMER_LIST_T_C
-#define ACE_TIMER_LIST_T_C
-
-#include "ace/Timer_List_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-ACE_RCSID(ace, Timer_List_T, "$Id$")
-
-// Default Constructor
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_List_Iterator_T (ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK> &timer_list)
- : timer_list_ (timer_list)
-{
- this->first();
- // Nothing
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::~ACE_Timer_List_Iterator_T (void)
-{
-}
-
-// Positions the iterator at the node right after the dummy node
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::first (void)
-{
- this->position_ = this->timer_list_.head_->get_next ();
-}
-
-// Positions the iterator at the next node in the Timer Queue
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::next (void)
-{
- // Make sure that if we are at the end, we don't wrap around
- if (this->position_ != this->timer_list_.head_)
- this->position_ = this->position_->get_next ();
-}
-
-// Returns true when we are at <head_>
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::isdone (void)
-{
- return this->position_ == this->timer_list_.head_;
-}
-
-// Returns the node at <position_> or 0 if we are at the end
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::item (void)
-{
- if (this->position_ != this->timer_list_.head_)
- return this->position_;
- return 0;
-}
-
-// Return our instance of the iterator
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> &
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::iter (void)
-{
- this->iterator_->first ();
- return *this->iterator_;
-}
-
-// Create an empty list.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_List_T (FUNCTOR *upcall_functor,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist)
- : ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> (upcall_functor, freelist),
- head_ (new ACE_Timer_Node_T<TYPE>),
- timer_id_ (0)
-{
- ACE_TRACE ("ACE_Timer_List_T::ACE_Timer_List");
-
- this->head_->set_next (this->head_);
- this->head_->set_prev (this->head_);
-
- ACE_NEW (iterator_,
- LIST_ITERATOR (*this));
-}
-
-
-// Checks if list is empty.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::is_empty (void) const
-{
- ACE_TRACE ("ACE_Timer_List_T::is_empty");
- return this->head_->get_next () == this->head_;
-}
-
-
-// Returns earliest time in a non-empty list.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> const ACE_Time_Value &
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::earliest_time (void) const
-{
- ACE_TRACE ("ACE_Timer_List_T::earliest_time");
- return this->head_->get_next ()->get_timer_value ();
-}
-
-
-// Remove all remaining items in the list.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::~ACE_Timer_List_T (void)
-{
- ACE_TRACE ("ACE_Timer_List_T::~ACE_Timer_List_T");
- ACE_MT (ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_));
-
- delete iterator_;
-
- for (ACE_Timer_Node_T<TYPE> *curr = this->head_->get_next ();
- curr != this->head_;
- )
- {
- ACE_Timer_Node_T<TYPE> *next = curr->get_next ();
- this->upcall_functor ().deletion (*this,
- next->get_type (),
- next->get_act ());
- this->free_node (curr);
- curr = next;
- }
-
- // delete the dummy node
- delete this->head_;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::dump (void) const
-{
- ACE_TRACE ("ACE_Timer_List_T::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- size_t count = 0;
-
- for (ACE_Timer_Node_T<TYPE> *curr = this->head_->get_next ();
- curr != this->head_;
- curr = curr->get_next ())
- count++;
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsize_ = %d"), count));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntimer_id_ = %d"), this->timer_id_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-
-// Reschedule a periodic timer. This function must be called with the
-// lock held.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::reschedule (ACE_Timer_Node_T<TYPE> *expired)
-{
- ACE_TRACE ("ACE_Timer_List_T::reschedule");
-
- ACE_Timer_Node_T<TYPE> *after = this->head_->get_next ();
-
- // Locate the proper position in the queue.
-
- while (after != this->head_
- && expired->get_timer_value () > after->get_timer_value ())
- after = after->get_next ();
-
- expired->set_next (after);
- expired->set_prev (after->get_prev ());
- after->get_prev ()->set_next (expired);
- after->set_prev (expired);
-}
-
-
-// Insert a new handler that expires at time future_time; if interval
-// is > 0, the handler will be reinvoked periodically.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> long
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::schedule (const TYPE &type,
- const void *act,
- const ACE_Time_Value &future_time,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Timer_List_T::schedule");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- // Place in the middle of the list where it belongs (i.e., sorted in
- // ascending order of absolute time to expire).
- ACE_Timer_Node_T<TYPE> *after = this->head_->get_next ();
-
- while (after != this->head_
- && future_time > after->get_timer_value ())
- after = after->get_next ();
-
- ACE_Timer_Node_T<TYPE> *temp = this->alloc_node ();
-
- temp->set (type,
- act,
- future_time,
- interval,
- after->get_prev (),
- after,
- (long) temp);
-
- after->get_prev ()->set_next (temp);
- after->set_prev (temp);
-
- return ACE_reinterpret_cast (long, temp);
-}
-
-// Locate and update the inteval on the timer_id
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::reset_interval (long timer_id,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Timer_List_T::reset_interval");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- // Make sure we are getting a valid <timer_id>, not an error
- // returned by <schedule>.
- if (timer_id == -1)
- return -1;
-
- ACE_Timer_Node_T<TYPE> *node =
- ACE_reinterpret_cast (ACE_Timer_Node_T<TYPE> *,
- timer_id);
-
- node->set_interval (interval);
-
- return 0;
-}
-
-// Locate and remove the single <ACE_Event_Handler> with a value of
-// <timer_id> from the timer queue.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::cancel (long timer_id,
- const void **act,
- int dont_call)
-{
- ACE_TRACE ("ACE_Timer_List_T::cancel");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- // Make sure we are getting a valid <timer_id>, not an error
- // returned by schedule ()
- if (timer_id == -1)
- return 0;
-
- ACE_Timer_Node_T<TYPE> *node =
- ACE_reinterpret_cast (ACE_Timer_Node_T<TYPE> *,
- timer_id);
-
- // Check to see if the node looks like a true ACE_Timer_Node_T<TYPE>
- if (timer_id == node->get_timer_id ())
- {
- node->get_next ()->set_prev (node->get_prev ());
- node->get_prev ()->set_next (node->get_next ());
-
- if (act != 0)
- *act = node->get_act ();
-
- if (dont_call == 0)
- this->upcall_functor ().cancellation (*this,
- node->get_type ());
- this->free_node (node);
- return 1;
- }
-
- // Wasn't valid
- return 0;
-}
-
-
-// Locate and remove all values of <handler> from the timer queue.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::cancel (const TYPE &type,
- int dont_call)
-{
- ACE_TRACE ("ACE_Timer_List_T::cancel");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- int number_of_cancellations = 0;
-
- for (ACE_Timer_Node_T<TYPE> *curr = this->head_->get_next ();
- curr != this->head_;
- )
- {
- if (curr->get_type () == type)
- {
- number_of_cancellations++;
-
- curr->get_prev ()->set_next (curr->get_next ());
- curr->get_next ()->set_prev (curr->get_prev ());
- ACE_Timer_Node_T<TYPE> *temp = curr;
- curr = curr->get_next ();
- this->free_node (temp);
- }
- else
- curr = curr->get_next ();
- }
-
- if (dont_call == 0)
- this->upcall_functor ().cancellation (*this, type);
-
- return number_of_cancellations;
-}
-
-// Reads the first node on the list and returns it.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::get_first (void)
-{
- ACE_TRACE ("ACE_Timer_List_T::get_first");
-
- return this->head_->get_next ();
-}
-
-// Removes the first node on the list and returns it.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK>::remove_first (void)
-{
- ACE_TRACE ("ACE_Timer_List_T::remove_first");
-
- // remove the node and fix the pointers
- ACE_Timer_Node_T<TYPE> *temp = this->head_->get_next ();
- this->head_->set_next (temp->get_next ());
- temp->get_next ()->set_prev (this->head_);
-
- return temp;
-}
-
-#endif /* ACE_TIMER_LIST_T_C */
diff --git a/ace/Timer_List_T.h b/ace/Timer_List_T.h
deleted file mode 100644
index d8e1970f8c2..00000000000
--- a/ace/Timer_List_T.h
+++ /dev/null
@@ -1,205 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_List_T.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_LIST_T_H
-#define ACE_TIMER_LIST_T_H
-#include "ace/pre.h"
-
-#include "ace/Timer_Queue_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Forward declaration.
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_List_T;
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_List_Iterator_T : public ACE_Timer_Queue_Iterator_T <TYPE, FUNCTOR, ACE_LOCK>
-{
- // = TITLE
- // Iterates over an <ACE_Timer_List>.
- //
- // = DESCRIPTION
- // This is a generic iterator that can be used to visit every
- // node of a timer queue.
-public:
- ACE_Timer_List_Iterator_T (ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK> &);
- // Constructor.
-
- ~ACE_Timer_List_Iterator_T (void);
- // Destructor.
-
- virtual void first (void);
- // Positions the iterator at the earliest node in the Timer Queue
-
- virtual void next (void);
- // Positions the iterator at the next node in the Timer Queue
-
- virtual int isdone (void);
- // Returns true when there are no more nodes in the sequence
-
- virtual ACE_Timer_Node_T<TYPE> *item (void);
- // Returns the node at the current position in the sequence
-
-protected:
- ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK> &timer_list_;
- // Pointer to the <ACE_Timer_List> that we are iterating over.
-
- ACE_Timer_Node_T<TYPE> *position_;
-};
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_List_T : public ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>
-{
- // = TITLE
- // Provides a simple implementation of timers.
- //
- // = DESCRIPTION
- // This implementation uses a linked list of absolute times.
- // Therefore, in the average case, scheduling and canceling
- // timers is O(N) (where N is the total number of timers) and
- // expiring timers is O(K) (where K is the total number of timers
- // that are < the current time of day).
- //
- // More clever implementations could use a delta-list, a heap,
- // or timing wheels, etc. For instance, <ACE_Timer_Heap>
- // is a subclass of <ACE_Timer_List> that implements a
- // heap-based callout queue. For most applications, the
- // <ACE_Timer_Heap> will perform substantially faster than the
- // <ACE_Timer_List>.
-public:
- typedef ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> LIST_ITERATOR;
- // Type of iterator
-
- friend class ACE_Timer_List_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>;
- // Iterator is a friend
-
- typedef ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> INHERITED;
- // Type inherited from
-
- // = Initialization and termination methods.
- ACE_Timer_List_T (FUNCTOR *upcall_functor = 0,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist = 0);
- // Default constructor. <upcall_functor> is the instance of the
- // FUNCTOR to be used by the list. If <upcall_functor> is 0, a
- // default FUNCTOR will be created. <freelist> the freelist of
- // timer nodes. If 0, then a default freelist will be created.
-
- virtual ~ACE_Timer_List_T (void);
- // Destructor
-
- virtual int is_empty (void) const;
- // True if queue is empty, else false.
-
- virtual const ACE_Time_Value &earliest_time (void) const;
- // Returns the time of the earlier node in the <ACE_Timer_List>.
-
- virtual long schedule (const TYPE &type,
- const void *act,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval = ACE_Time_Value::zero);
- // Schedule <type> that will expire after <delay> amount of time,
- // which is specified in absolute time. If it expires then <act> is
- // passed in as the value to the <functor>. If <interval> is != to
- // <ACE_Time_Value::zero> then it is used to reschedule the <type>
- // automatically, using relative time to the current <gettimeofday>.
- // This method returns a <timer_id> that uniquely identifies the the
- // <type> entry in an internal list. This <timer_id> can be used to
- // cancel the timer before it expires. The cancellation ensures
- // that <timer_ids> are unique up to values of greater than 2
- // billion timers. As long as timers don't stay around longer than
- // this there should be no problems with accidentally deleting the
- // wrong timer. Returns -1 on failure (which is guaranteed never to
- // be a valid <timer_id>).
-
- virtual int reset_interval (long timer_id,
- const ACE_Time_Value &interval);
- // Resets the interval of the timer represented by <timer_id> to
- // <interval>, which is specified in relative time to the current
- // <gettimeofday>. If <interval> is equal to
- // <ACE_Time_Value::zero>, the timer will become a non-rescheduling
- // timer. Returns 0 if successful, -1 if not.
-
- virtual int cancel (const TYPE &type,
- int dont_call_handle_close = 1);
- // Cancel all timer associated with <type>. If <dont_call> is 0
- // then the <functor> will be invoked. Returns number of timers
- // cancelled.
-
- virtual int cancel (long timer_id,
- const void **act = 0,
- int dont_call_handle_close = 1);
- // Cancel the single timer that matches the <timer_id> value (which
- // was returned from the <schedule> method). If act is non-NULL
- // then it will be set to point to the ``magic cookie'' argument
- // passed in when the timer was registered. This makes it possible
- // to free up the memory and avoid memory leaks. If <dont_call> is
- // 0 then the <functor> will be invoked. Returns 1 if cancellation
- // succeeded and 0 if the <timer_id> wasn't found.
-
- virtual ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> &iter (void);
- // Returns a pointer to this <ACE_Timer_Queue>'s iterator.
-
- virtual ACE_Timer_Node_T<TYPE> *remove_first (void);
- // Removes the earliest node from the queue and returns it
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- virtual void reschedule (ACE_Timer_Node_T<TYPE> *);
- // Reschedule an "interval" <ACE_Timer_Node>. This should be private
- // but for now it needs to be public for <ACE_Timer_Hash_T>
-
- virtual ACE_Timer_Node_T<TYPE> *get_first (void);
- // Reads the earliest node from the queue and returns it.
-
-protected:
-/* virtual ACE_Timer_Node_T<TYPE> *alloc_node (void);
- // Factory method that allocates a new node (uses operator new).
-
- virtual void free_node (ACE_Timer_Node_T<TYPE> *);
- // Factory method that frees a previously allocated node (uses
- // operator delete).
-*/
-private:
- ACE_Timer_Node_T<TYPE> *head_;
- // Pointer to linked list of <ACE_Timer_Handles>.
-
- LIST_ITERATOR *iterator_;
- // Iterator used to expire timers.
-
- long timer_id_;
- // Keeps track of the timer id that uniquely identifies each timer.
- // This id can be used to cancel a timer via the <cancel (int)>
- // method.
-
- // = Don't allow these operations for now.
- ACE_UNIMPLEMENTED_FUNC (ACE_Timer_List_T (const ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK> &))
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK> &))
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) && !defined(ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#include "ace/Timer_List_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE && !ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Timer_List_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_TIMER_LIST_T_H */
diff --git a/ace/Timer_Queue.cpp b/ace/Timer_Queue.cpp
deleted file mode 100644
index 931da8697e0..00000000000
--- a/ace/Timer_Queue.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// $Id$
-
-#if !defined (ACE_TIMER_QUEUE_C)
-#define ACE_TIMER_QUEUE_C
-
-#include "ace/Containers.h"
-#include "ace/Timer_Queue.h"
-
-ACE_RCSID(ace, Timer_Queue, "$Id$")
-
-#if defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#include "ace/Timer_Hash.h"
-#include "ace/Timer_Queue_T.cpp"
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class
- ACE_Timer_Queue_T<
- ACE_Event_Handler*,
- ACE_Timer_Hash_Upcall<
- ACE_Event_Handler*,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>,
- ACE_Null_Mutex>,
- ACE_Null_Mutex>;
-
-template class
- ACE_Timer_Queue_Iterator_T<
- ACE_Event_Handler*,
- ACE_Timer_Hash_Upcall<
- ACE_Event_Handler*,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_Null_Mutex>,
- ACE_Null_Mutex>,
- ACE_Null_Mutex>;
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Unbounded_Set<ACE_Timer_Node_T<ACE_Event_Handler *> *>;
-template class ACE_Node<ACE_Timer_Node_T<ACE_Event_Handler *> *>;
-template class ACE_Unbounded_Set_Iterator<ACE_Timer_Node_T<ACE_Event_Handler *> *>;
-template class ACE_Timer_Node_T<ACE_Event_Handler *>;
-template class ACE_Timer_Queue_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Queue_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Unbounded_Set<ACE_Timer_Node_T<ACE_Event_Handler *> *>
-#pragma instantiate ACE_Node<ACE_Timer_Node_T<ACE_Event_Handler *> *>
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Timer_Node_T<ACE_Event_Handler *> *>
-#pragma instantiate ACE_Timer_Node_T<ACE_Event_Handler *>
-#pragma instantiate ACE_Timer_Queue_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_Queue_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-
-#endif /* ACE_TIMER_QUEUE_C */
diff --git a/ace/Timer_Queue.h b/ace/Timer_Queue.h
deleted file mode 100644
index e754cd60f96..00000000000
--- a/ace/Timer_Queue.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// $Id$
-/* -*- C++ -*- */
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_Queue.h
-//
-// = AUTHOR
-// Doug Schmidt and Irfan Pyarali
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_QUEUE_H
-#define ACE_TIMER_QUEUE_H
-#include "ace/pre.h"
-
-#include "ace/Synch.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Timer_Queue_T.h"
-
-// The following typedef are here for ease of use and backward
-// compatibility.
-
-typedef ACE_Timer_Node_T<ACE_Event_Handler *>
- ACE_Timer_Node;
-
-typedef ACE_Timer_Queue_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX>
- ACE_Timer_Queue;
-
-typedef ACE_Timer_Queue_Iterator_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX>
- ACE_Timer_Queue_Iterator;
-
-#include "ace/post.h"
-#endif /* ACE_TIMER_QUEUE_H */
diff --git a/ace/Timer_Queue.i b/ace/Timer_Queue.i
deleted file mode 100644
index 41e4324e61e..00000000000
--- a/ace/Timer_Queue.i
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- C++ -*- */
-
-template <class TYPE, class FUNCTOR> ACE_INLINE void
-ACE_Timer_Queue_T<TYPE, FUNCTOR>::timer_skew (const ACE_Time_Value &skew)
-{
- timer_skew_ = skew;
-}
-
-template <class TYPE, class FUNCTOR> ACE_INLINE const ACE_Time_Value &
-ACE_Timer_Queue_T<TYPE, FUNCTOR>::timer_skew (void) const
-{
- return timer_skew_;
-}
-
-template <class TYPE, class FUNCTOR> ACE_INLINE int
-ACE_Timer_Queue_T<TYPE, FUNCTOR>::expire (void)
-{
- if (!this->is_empty ())
- return this->expire (this->gettimeofday () + timer_skew_);
- else
- return 0;
-}
diff --git a/ace/Timer_Queue_Adapters.cpp b/ace/Timer_Queue_Adapters.cpp
deleted file mode 100644
index c98b0b6c70b..00000000000
--- a/ace/Timer_Queue_Adapters.cpp
+++ /dev/null
@@ -1,309 +0,0 @@
-// $Id$
-
-#include "ace/Timer_Queue_Adapters.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#ifndef ACE_TIMER_QUEUE_ADAPTERS_C
-# define ACE_TIMER_QUEUE_ADAPTERS_C
-
-ACE_RCSID(ace, Timer_Queue_Adapters, "$Id$")
-
-# if !defined (__ACE_INLINE__)
-# include "ace/Timer_Queue_Adapters.i"
-# endif /* __ACE_INLINE__ */
-
-template <class TQ> TQ &
-ACE_Async_Timer_Queue_Adapter<TQ>::timer_queue (void)
-{
- return this->timer_queue_;
-}
-
-template <class TQ> int
-ACE_Async_Timer_Queue_Adapter<TQ>::cancel (long timer_id,
- const void **act)
-{
- // Block designated signals.
- ACE_Sig_Guard sg (&this->mask_);
- ACE_UNUSED_ARG (sg);
-
- return this->timer_queue_.cancel (timer_id, act);
-}
-
-template <class TQ> int
-ACE_Async_Timer_Queue_Adapter<TQ>::expire (void)
-{
- // Block designated signals.
- ACE_Sig_Guard sg (&this->mask_);
- ACE_UNUSED_ARG (sg);
-
- return this->timer_queue_.expire ();
-}
-
-template <class TQ> int
-ACE_Async_Timer_Queue_Adapter<TQ>::schedule_ualarm (void)
-{
- ACE_Time_Value tv = this->timer_queue_.earliest_time ()
- - ACE_OS::gettimeofday ();
-
- // Beware of negative times and zero times (which cause problems for
- // <ualarm>).
- if (tv < ACE_Time_Value::zero)
- tv = ACE_Time_Value (0, 1);
-
- // @@ This code should be clever enough to avoid updating the
- // <ualarm> if we haven't actually changed the earliest time.
- // Schedule a new timer.
- ACE_OS::ualarm (tv);
- return 0;
-}
-
-template <class TQ> long
-ACE_Async_Timer_Queue_Adapter<TQ>::schedule (ACE_Event_Handler *eh,
- const void *act,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval)
-{
- ACE_UNUSED_ARG (act);
- ACE_UNUSED_ARG (interval);
-
- // Block designated signals.
- ACE_Sig_Guard sg (&this->mask_);
- ACE_UNUSED_ARG (sg);
-
- // @@ We still need to implement interval timers...
- long tid = this->timer_queue_.schedule (eh, act, delay);
-
- if (tid == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("schedule_timer")),
- -1);
-
- if (this->schedule_ualarm () == -1)
- return 0;
- else
- return tid;
-}
-
-template <class TQ>
-ACE_Async_Timer_Queue_Adapter<TQ>::ACE_Async_Timer_Queue_Adapter (ACE_Sig_Set *mask)
- // If <mask> == 0, block *all* signals when the SIGARLM handler is
- // running, else just block those in the mask.
- : mask_ (mask)
-{
- // The following code is necessary to selectively "block" certain
- // signals when SIGALRM is running. Also, we always restart system
- // calls that are interrupted by the signals.
-
- ACE_Sig_Action sa ((ACE_SignalHandler) 0,
- this->mask_,
- SA_RESTART);
-
- if (this->sig_handler_.register_handler (SIGALRM, this, &sa) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("register_handler")));
-}
-
-// This is the signal handler function for the asynchronous timer
-// list. It gets invoked asynchronously when the SIGALRM signal
-// occurs.
-
-template <class TQ> int
-ACE_Async_Timer_Queue_Adapter<TQ>::handle_signal (int signum,
- siginfo_t *,
- ucontext_t *)
-{
- switch (signum)
- {
- case SIGALRM:
- {
- // Expire the pending timers.
-
- // @@ We need to figure out how to implement interval
- // timers...
- this->timer_queue_.expire ();
-
- // Only schedule a new timer if there is one in the list.
-
- // @@ This code should also become smarter to avoid
- // unnecessary calls to ualarm().
- if (this->timer_queue_.is_empty () == 0)
- return this->schedule_ualarm ();
- else
- return 0;
- /* NOTREACHED */
- }
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "unexpected signal %S\n",
- signum),
- -1);
- /* NOTREACHED */
- }
-}
-
-template<class TQ>
-ACE_Thread_Timer_Queue_Adapter<TQ>::ACE_Thread_Timer_Queue_Adapter (ACE_Thread_Manager *tm)
- : ACE_Task_Base (tm),
- condition_ (mutex_),
- active_ (1), // Assume that we start in active mode.
- thr_id_ (ACE_OS::NULL_thread)
-{
-}
-
-template<class TQ> ACE_SYNCH_MUTEX &
-ACE_Thread_Timer_Queue_Adapter<TQ>::mutex (void)
-{
- return this->mutex_;
-}
-
-template<class TQ> long
-ACE_Thread_Timer_Queue_Adapter<TQ>::schedule
- (ACE_Event_Handler* handler,
- const void *act,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval)
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, -1);
-
- long result = this->timer_queue_.schedule (handler, act, delay, interval);
- this->condition_.signal ();
- return result;
-}
-
-template<class TQ> int
-ACE_Thread_Timer_Queue_Adapter<TQ>::cancel (long timer_id,
- const void **act)
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, -1);
-
- int result = this->timer_queue_.cancel (timer_id, act);
- condition_.signal ();
- return result;
-}
-
-template<class TQ> void
-ACE_Thread_Timer_Queue_Adapter<TQ>::deactivate (void)
-{
- ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->mutex_);
-
- this->active_ = 0;
- this->condition_.signal ();
-}
-
-template<class TQ> int
-ACE_Thread_Timer_Queue_Adapter<TQ>::svc (void)
-{
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, -1);
-
- this->thr_id_ = ACE_Thread::self ();
-
- // Thread cancellation point, if ACE supports it.
-# if !defined (ACE_LACKS_PTHREAD_CANCEL)
- ACE_PTHREAD_CLEANUP_PUSH (&this->condition_.mutex ());
-# endif /* ACE_LACKS_PTHREAD_CANCEL */
-
- while (this->active_)
- {
-# if defined (ACE_HAS_DEFERRED_TIMER_COMMANDS)
-
- // Temporarily suspend ownership of the timer queue mutex in
- // order to dispatch deferred execution commands. These commands
- // are to be treated as executing in a context "external" to the
- // timer queue adapter, and thus must compete separately for this lock.
- mutex_.release ();
- this->dispatch_commands ();
-
- // Re-acquire ownership of the timer queue mutex in order
- // to restore the "internal" timer queue adapter context
- mutex_.acquire ();
-
-
-# endif /* ACE_HAS_DEFERRED_TIMER_COMMANDS */
-
- // If the queue is empty, sleep until there is a change on it.
- if (this->timer_queue_.is_empty ())
- {
- this->condition_.wait ();
- }
- else
- {
- // Compute the remaining time, being careful not to sleep
- // for "negative" amounts of time.
- ACE_Time_Value tv = this->timer_queue_.earliest_time ();
-
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("waiting until %u.%3.3u secs\n"),
- // tv.sec(), tv.msec()));
- this->condition_.wait (&tv);
- }
-
- // Expire timers anyway, at worst this is a no-op.
- this->timer_queue_.expire ();
- }
-
- // Thread cancellation point, if ACE supports it.
-# if !defined (ACE_LACKS_PTHREAD_CANCEL)
- ACE_PTHREAD_CLEANUP_POP (0);
-# endif /* ACE_LACKS_PTHREAD_CANCEL */
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("terminating dispatching thread\n")));
- return 0;
-}
-
-
-# if defined (ACE_HAS_DEFERRED_TIMER_COMMANDS)
-
-// Enqueues a command object for execution just before waiting on the next
-// timer event. This allows deferred execution of commands that cannot
-// be performed in the timer event handler context, such as registering
-// or cancelling timers on platforms where the timer queue mutex is not
-// recursive.
-
-template<class TQ> int
-ACE_Thread_Timer_Queue_Adapter<TQ>::enqueue_command (ACE_Command_Base *cmd,
- COMMAND_ENQUEUE_POSITION pos)
-{
- // Serialize access to the command queue.
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon,
- this->command_mutex_, -1);
-
- if (pos == ACE_Thread_Timer_Queue_Adapter<TQ>::TAIL)
- {
- return command_queue_.enqueue_tail (cmd);
- }
- else
- {
- return command_queue_.enqueue_head (cmd);
- }
-}
-
-
-// Dispatches all command objects enqueued in the most
-// recent event handler context.
-
-template<class TQ> int
-ACE_Thread_Timer_Queue_Adapter<TQ>::dispatch_commands (void)
-{
- // Serialize access to the command queue.
- ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon,
- this->command_mutex_, -1);
-
- // loop through the enqueued commands
- ACE_Command_Base *cmd = 0;
- while (command_queue_.dequeue_head (cmd) == 0)
- if (cmd)
- {
- cmd->execute ();
- delete cmd;
- }
-
- return 0;
-}
-
-# endif /* ACE_HAS_DEFERRED_TIMER_COMMANDS */
-
-#endif /* ACE_TIMER_QUEUE_ADAPTERS_C*/
diff --git a/ace/Timer_Queue_Adapters.h b/ace/Timer_Queue_Adapters.h
deleted file mode 100644
index cb43e9d894d..00000000000
--- a/ace/Timer_Queue_Adapters.h
+++ /dev/null
@@ -1,217 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_Queue_Adapters.h
-//
-// = AUTHOR
-// Douglas C. Schmidt and Carlos O'Ryan
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_QUEUE_ADAPTERS_H
-# define ACE_TIMER_QUEUE_ADAPTERS_H
-# include "ace/pre.h"
-
-# include "ace/Task.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-# include "ace/Signal.h"
-
-template <class TQ>
-class ACE_Export ACE_Async_Timer_Queue_Adapter : public ACE_Event_Handler
-{
- // = TITLE
- // Adapts a <TQ> to be run asynchronously.
- //
- // = DESCRIPTION
- // This implementation uses the <ualarm> call, which generates
- // the SIGARLM signal that is caught by this class.
-public:
- typedef TQ TIMER_QUEUE;
-
- ACE_Async_Timer_Queue_Adapter (ACE_Sig_Set *mask = 0);
- // Register the SIGALRM handler. If <mask> == 0 then block all
- // signals when <SIGALRM> is run. Otherwise, just block the signals
- // indicated in <mask>.
-
- long schedule (ACE_Event_Handler *type,
- const void *act,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval = ACE_Time_Value::zero);
- // Schedule the timer according to the semantics of the
- // <ACE_Timer_List>. However, this timer gets dispatched via a
- // signal, rather than by a user calling <expire>. Note that
- // interval timers are not implemented yet.
-
- int cancel (long timer_id, const void **act = 0);
- // Cancel the <timer_id> and pass back the <act> if an address is
- // passed in.
-
- int expire (void);
- // Dispatch all timers whose values are <= <cur_time>. Returns the
- // number of timers canceled.
-
- TQ &timer_queue (void);
- // Access the underlying <TIMER_QUEUE>.
-
-private:
- virtual int schedule_ualarm (void);
- // Perform the logic to compute the new ualarm(2) setting.
-
- virtual int handle_signal (int signum, siginfo_t *, ucontext_t *);
- // Called back by <SIGALRM> handler.
-
- ACE_Sig_Handler sig_handler_;
- // Handler for the <SIGALRM> signal, so that we can access our state
- // without requiring any global variables.
-
- TQ timer_queue_;
- // Implementation of the timer queue (e.g., <ACE_Timer_List>,
- // <ACE_Timer_Heap>, etc.).
-
- ACE_Sig_Set mask_;
- // Mask of signals to be blocked when we're servicing <SIGALRM>.
-};
-
-template <class TQ>
-class ACE_Export ACE_Thread_Timer_Queue_Adapter : public ACE_Task_Base
-{
- // = TITLE
- // Adapts a Timer_Queue using a separate thread for dispatching.
- //
- // = DESCRIPTION
- // This implementation of a Timer_Queue uses a separate thread to
- // dispatch the timers. The base queue need not be thread safe,
- // this class takes all the necessary locks.
- //
- // = NOTE
- // This is a case were template parameters will be useful, but
- // (IMHO) the effort and portability problems discourage their
- // use.
-public:
-
- typedef TQ TIMER_QUEUE;
- // Trait for the underlying queue type.
-
-# if defined (ACE_HAS_DEFERRED_TIMER_COMMANDS)
-
- enum COMMAND_ENQUEUE_POSITION {HEAD, TAIL};
- // Typedef for the position at which to enqueue a deferred execution command.
-
-# endif /* ACE_HAS_DEFERRED_TIMER_COMMANDS */
-
- ACE_Thread_Timer_Queue_Adapter (ACE_Thread_Manager * = ACE_Thread_Manager::instance ());
- // Creates the timer queue. Activation of the task is the user's
- // responsibility.
-
- long schedule (ACE_Event_Handler* handler,
- const void *act,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval = ACE_Time_Value::zero);
- // Schedule the timer according to the semantics of the <TQ>; wakes
- // up the dispatching thread.
-
- int cancel (long timer_id, const void **act = 0);
- // Cancel the <timer_id> add return the <act> parameter if an
- // address is passed in. Also wakes up the dispatching thread.
-
- virtual int svc (void);
- // Runs the dispatching thread.
-
- virtual void deactivate (void);
- // Inform the dispatching thread that it should terminate.
-
- ACE_SYNCH_MUTEX &mutex (void);
- // Access the locking mechanism, useful for iteration.
-
- TQ &timer_queue (void);
- // Access the implementation queue, useful for iteration.
-
- ACE_thread_t thr_id (void);
- // Return the thread id of our active object.
-
- virtual int activate (long flags = THR_NEW_LWP | THR_JOINABLE,
- int n_threads = 1,
- int force_active = 0,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- int grp_id = -1,
- ACE_Task_Base *task = 0,
- ACE_hthread_t thread_handles[] = 0,
- void *stack[] = 0,
- size_t stack_size[] = 0,
- ACE_thread_t thread_names[] = 0);
- // We override the default <activate> method so that we can ensure
- // that only a single thread is ever spawned. Otherwise, too many
- // weird things can happen...
-
-# if defined (ACE_HAS_DEFERRED_TIMER_COMMANDS)
-
- int enqueue_command (ACE_Command_Base *command_,
- COMMAND_ENQUEUE_POSITION pos = TAIL);
- // Enqueues a command object for execution just before waiting on the next
- // timer event. This allows deferred execution of commands that cannot
- // be performed in the timer event handler context, such as registering
- // or cancelling timers on platforms where the timer queue mutex is not
- // recursive.
-
-# endif /* ACE_HAS_DEFERRED_TIMER_COMMANDS */
-
-private:
-
-# if defined (ACE_HAS_DEFERRED_TIMER_COMMANDS)
-
- int dispatch_commands (void);
- // Dispatches all command objects enqueued in the most
- // recent event handler context.
-
- ACE_Unbounded_Queue<ACE_Command_Base *> command_queue_;
- // Queue of commands for deferred execution.
-
- ACE_SYNCH_MUTEX command_mutex_;
- // The mutual exclusion mechanism for the command queue.
-
-# endif /* ACE_HAS_DEFERRED_TIMER_COMMANDS */
-
- TQ timer_queue_;
- // The underlying Timer_Queue.
-
- ACE_SYNCH_CONDITION condition_;
- // The dispatching thread sleeps on this condition while waiting to
- // dispatch the next timer; it is used to wake it up if there is a
- // change on the timer queue.
-
- ACE_SYNCH_MUTEX mutex_;
- // The mutual exclusion mechanism which is required to use the
- // <condition_>.
-
- int active_;
- // When deactivate is called this variable turns to false and the
- // dispatching thread is signalled, to terminate its main loop.
-
- ACE_thread_t thr_id_;
- // Thread id of our active object task.
-};
-
-# if defined (__ACE_INLINE__)
-# include "ace/Timer_Queue_Adapters.i"
-# endif /* __ACE_INLINE__ */
-
-# if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-# include "ace/Timer_Queue_Adapters.cpp"
-# endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-# if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-# pragma implementation ("Timer_Queue_Adapters.cpp")
-# endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-# include "ace/post.h"
-#endif /* ACE_TIMER_QUEUE_ADAPTERS_H */
diff --git a/ace/Timer_Queue_Adapters.i b/ace/Timer_Queue_Adapters.i
deleted file mode 100644
index 621c9c08ef8..00000000000
--- a/ace/Timer_Queue_Adapters.i
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-template<class TQ> ACE_INLINE TQ &
-ACE_Thread_Timer_Queue_Adapter<TQ>::timer_queue (void)
-{
- return this->timer_queue_;
-}
-
-template<class TQ> ACE_INLINE ACE_thread_t
-ACE_Thread_Timer_Queue_Adapter<TQ>::thr_id (void)
-{
- return this->thr_id_;
-}
-
-template<class TQ> ACE_INLINE int
-ACE_Thread_Timer_Queue_Adapter<TQ>::activate (long flags,
- int n_threads,
- int force_active,
- long priority,
- int grp_id,
- ACE_Task_Base *task,
- ACE_hthread_t thread_handles[],
- void *stack[],
- size_t stack_size[],
- ACE_thread_t thread_names[])
-{
- // Macros to avoid "warning: unused parameter" type warning.
- ACE_UNUSED_ARG (n_threads);
- ACE_UNUSED_ARG (force_active);
- ACE_UNUSED_ARG (thread_handles);
-
- // Make sure that we only allow a single thread to be spawned for
- // our adapter. Otherwise, too many weird things can happen.
- return ACE_Task_Base::activate (flags, 1, 0, priority, grp_id, task, 0,
- stack, stack_size, thread_names);
-}
diff --git a/ace/Timer_Queue_T.cpp b/ace/Timer_Queue_T.cpp
deleted file mode 100644
index 002319070d8..00000000000
--- a/ace/Timer_Queue_T.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-// $Id$
-
-#ifndef ACE_TIMER_QUEUE_T_C
-#define ACE_TIMER_QUEUE_T_C
-
-#include "ace/Synch.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Signal.h"
-#include "ace/Timer_Queue_T.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Timer_Queue_T.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Timer_Queue_T, "$Id$")
-
-template <class TYPE> void
-ACE_Timer_Node_T<TYPE>::dump (void) const
-{
- ACE_TRACE ("ACE_Timer_Node_T::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nact_ = %x"), this->act_));
- this->timer_value_.dump ();
- this->interval_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nprev_ = %x"), this->prev_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnext_ = %x"), this->next_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntimer_id_ = %d\n"), this->timer_id_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class TYPE>
-ACE_Timer_Node_T<TYPE>::ACE_Timer_Node_T (void)
-{
- ACE_TRACE ("ACE_Timer_Node_T::ACE_Timer_Node_T");
-}
-
-template <class TYPE>
-ACE_Timer_Node_T<TYPE>::~ACE_Timer_Node_T (void)
-{
- ACE_TRACE ("ACE_Timer_Node_T::~ACE_Timer_Node_T");
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Queue_Iterator_T (void)
-{
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::~ACE_Timer_Queue_Iterator_T (void)
-{
-}
-
-// Determines the minimum amount of time that the Reactor must wait
-// before timing out. This is computed as the smaller of (1) the
-// amount the caller requested when calling handle_events() and (2)
-// the earliest time registered in the Timer Queue (if any). Must be
-// called with an external lock held since it returns a pointer to a
-// Time_Value type stored in the Timer_Queue type itself. If some
-// external lock isn't held we'll have reentrancy problems!
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Time_Value *
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::calculate_timeout (ACE_Time_Value *max_wait_time)
-{
- ACE_TRACE ("ACE_Timer_Queue_T::calculate_timeout");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, max_wait_time));
-
- if (this->is_empty ())
- // Nothing on the Timer_Queue, so use whatever the caller gave us.
- return max_wait_time;
- else
- {
- ACE_Time_Value cur_time = this->gettimeofday ();
-
- if (this->earliest_time () > cur_time)
- {
- // The earliest item on the Timer_Queue is still in the
- // future. Therefore, use the smaller of (1) caller's wait
- // time or (2) the delta time between now and the earliest
- // time on the Timer_Queue.
-
- this->timeout_ = this->earliest_time () - cur_time;
- if (max_wait_time == 0 || *max_wait_time > timeout_)
- return &this->timeout_;
- else
- return max_wait_time;
- }
- else
- {
- // The earliest item on the Timer_Queue is now in the past.
- // Therefore, we've got to "poll" the Reactor, i.e., it must
- // just check the descriptors and then dispatch timers, etc.
- this->timeout_ = ACE_Time_Value::zero;
- return &this->timeout_;
- }
- }
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Time_Value *
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::calculate_timeout (ACE_Time_Value *max_wait_time,
- ACE_Time_Value *the_timeout)
-{
- ACE_TRACE ("ACE_Timer_Queue_T::calculate_timeout");
-
- if (the_timeout == 0)
- return 0;
-
- if (this->is_empty ())
- {
- // Nothing on the Timer_Queue, so use whatever the caller gave us.
- if (max_wait_time)
- *the_timeout = *max_wait_time;
- else
- return 0;
- }
- else
- {
- ACE_Time_Value cur_time = this->gettimeofday ();
-
- if (this->earliest_time () > cur_time)
- {
- // The earliest item on the Timer_Queue is still in the
- // future. Therefore, use the smaller of (1) caller's wait
- // time or (2) the delta time between now and the earliest
- // time on the Timer_Queue.
-
- *the_timeout = this->earliest_time () - cur_time;
- if (!(max_wait_time == 0 || *max_wait_time > *the_timeout))
- *the_timeout = *max_wait_time;
- }
- else
- {
- // The earliest item on the Timer_Queue is now in the past.
- // Therefore, we've got to "poll" the Reactor, i.e., it must
- // just check the descriptors and then dispatch timers, etc.
- *the_timeout = ACE_Time_Value::zero;
- }
- }
- return the_timeout;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::dump (void) const
-{
- ACE_TRACE ("ACE_Timer_Queue_T::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->timeout_.dump ();
- this->timer_skew_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Queue_T (FUNCTOR *upcall_functor,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist)
- : free_list_ (freelist == 0 ? new ACE_Locked_Free_List<ACE_Timer_Node_T <TYPE>, ACE_Null_Mutex> : freelist),
- gettimeofday_ (ACE_OS::gettimeofday),
- upcall_functor_ (upcall_functor == 0 ? new FUNCTOR : upcall_functor),
- delete_upcall_functor_ (upcall_functor == 0),
- delete_free_list_ (freelist == 0),
- timer_skew_ (0, ACE_TIMER_SKEW)
-{
- ACE_TRACE ("ACE_Timer_Queue_T::ACE_Timer_Queue_T");
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::~ACE_Timer_Queue_T (void)
-{
- ACE_TRACE ("ACE_Timer_Queue_T::~ACE_Timer_Queue_T");
-
- // Cleanup the functor and free_list on the way out
- if (this->delete_upcall_functor_)
- delete this->upcall_functor_;
-
- if (this->delete_free_list_)
- delete this->free_list_;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::alloc_node (void)
-{
- return this->free_list_->remove ();
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::free_node (ACE_Timer_Node_T<TYPE> *node)
-{
- this->free_list_->add (node);
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_LOCK &
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::mutex (void)
-{
- return this->mutex_;
-}
-
-// Run the <handle_timeout> method for all Timers whose values are <=
-// <cur_time>.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::expire (const ACE_Time_Value &cur_time)
-{
- ACE_TRACE ("ACE_Timer_Queue_T::expire");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- int number_of_timers_expired = 0;
-
- ACE_Timer_Node_T<TYPE> *expired;
-
- // Keep looping while there are timers remaining and the earliest
- // timer is <= the <cur_time> passed in to the method.
-
- if (this->is_empty ())
- return 0;
-
- while (this->earliest_time () <= cur_time)
- {
- expired = this->remove_first ();
- TYPE &type = expired->get_type ();
- const void *act = expired->get_act ();
- int reclaim = 1;
-
- // Check if this is an interval timer.
- if (expired->get_interval () > ACE_Time_Value::zero)
- {
- // Make sure that we skip past values that have already
- // "expired".
- do
- expired->set_timer_value (expired->get_timer_value () + expired->get_interval ());
- while (expired->get_timer_value () <= cur_time);
-
- // Since this is an interval timer, we need to reschedule
- // it.
- this->reschedule (expired);
- reclaim = 0;
- }
-
- // call the functor
- this->upcall (type, act, cur_time);
-
- if (reclaim)
- // Call the factory method to free up the node.
- this->free_node (expired);
-
- number_of_timers_expired++;
-
- if (this->is_empty ())
- break;
- }
-
- return number_of_timers_expired;
-}
-
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::return_node (ACE_Timer_Node_T<TYPE> *node)
-{
- ACE_MT (ACE_GUARD (ACE_LOCK, ace_mon, this->mutex_));
- this->free_node (node);
-}
-
-
-template <class ACE_LOCK>
-ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>::ACE_Event_Handler_Handle_Timeout_Upcall (void)
-{
-}
-
-template <class ACE_LOCK>
-ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>::~ACE_Event_Handler_Handle_Timeout_Upcall (void)
-{
-}
-
-template <class ACE_LOCK> int
-ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>::timeout (ACE_Timer_Queue_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>,
- ACE_LOCK> &timer_queue,
- ACE_Event_Handler *handler,
- const void *act,
- const ACE_Time_Value &cur_time)
-{
- // Upcall to the <handler>s handle_timeout method.
- if (handler->handle_timeout (cur_time, act) == -1)
- timer_queue.cancel (handler, 0); // 0 means "call handle_close()".
-
- return 0;
-}
-
-template <class ACE_LOCK> int
-ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>::cancellation (ACE_Timer_Queue_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>,
- ACE_LOCK> &timer_queue,
- ACE_Event_Handler *handler)
-{
- ACE_UNUSED_ARG (timer_queue);
-
- // Upcall to the <handler>s handle_close method
- handler->handle_close (ACE_INVALID_HANDLE,
- ACE_Event_Handler::TIMER_MASK);
- return 0;
-}
-
-template <class ACE_LOCK> int
-ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>::deletion (ACE_Timer_Queue_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>,
- ACE_LOCK> &timer_queue,
- ACE_Event_Handler *handler,
- const void *arg)
-{
- ACE_UNUSED_ARG (timer_queue);
- ACE_UNUSED_ARG (handler);
- ACE_UNUSED_ARG (arg);
-
- // Does nothing
-
- return 0;
-}
-
-#endif /* ACE_TIMER_QUEUE_T_C*/
diff --git a/ace/Timer_Queue_T.h b/ace/Timer_Queue_T.h
deleted file mode 100644
index fa624572013..00000000000
--- a/ace/Timer_Queue_T.h
+++ /dev/null
@@ -1,393 +0,0 @@
-/* -*- C++ -*- */
-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_Queue_T.h
-//
-// = AUTHOR
-// Doug Schmidt, Irfan Pyarali, and Darrell Brunsch
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_QUEUE_T_H
-#define ACE_TIMER_QUEUE_T_H
-#include "ace/pre.h"
-
-#include "ace/Free_List.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class TYPE>
-class ACE_Timer_Node_T
-{
- // = TITLE
- // Maintains the state associated with a Timer entry.
-public:
- ACE_Timer_Node_T (void);
- // Default constructor
-
- ~ACE_Timer_Node_T (void);
- // Dtor.
-
- void set (const TYPE &type,
- const void *a,
- const ACE_Time_Value &t,
- const ACE_Time_Value &i,
- ACE_Timer_Node_T<TYPE> *n,
- long timer_id);
- // singly linked list
-
- void set (const TYPE &type,
- const void *a,
- const ACE_Time_Value &t,
- const ACE_Time_Value &i,
- ACE_Timer_Node_T<TYPE> *p,
- ACE_Timer_Node_T<TYPE> *n,
- long timer_id);
- // doubly linked list version
-
- // = Accessors
-
- TYPE &get_type (void);
- // Get the type.
-
- void set_type (TYPE &type);
- // Set the type.
-
- const void *get_act (void);
- // Get the asynchronous completion token.
-
- void set_act (void *act);
- // set the asynchronous completion token.
-
- ACE_Time_Value &get_timer_value (void);
- // get the timer value.
-
- void set_timer_value (ACE_Time_Value timer_value);
- // set the timer value.
-
- ACE_Time_Value &get_interval (void);
- // get the timer interval.
-
- void set_interval (ACE_Time_Value interval);
- // Set the timer interval.
-
- ACE_Timer_Node_T<TYPE> *get_prev (void);
- // get the previous pointer.
-
- void set_prev (ACE_Timer_Node_T<TYPE> *prev);
- // set the previous pointer.
-
- ACE_Timer_Node_T<TYPE> *get_next (void);
- // get the next pointer.
-
- void set_next (ACE_Timer_Node_T<TYPE> *next);
- // set the next pointer.
-
- long get_timer_id (void);
- // get the timer_id.
-
- void set_timer_id (long timer_id);
- // set the timer_id.
-
- void dump (void) const;
- // Dump the state of an TYPE.
-
-private:
- TYPE type_;
- // Type of object stored in the Queue
-
- const void *act_;
- // Asynchronous completion token associated with the timer.
-
- ACE_Time_Value timer_value_;
- // Time until the timer expires.
-
- ACE_Time_Value interval_;
- // If this is a periodic timer this holds the time until the next
- // timeout.
-
- ACE_Timer_Node_T<TYPE> *prev_;
- // Pointer to previous timer.
-
- ACE_Timer_Node_T<TYPE> *next_;
- // Pointer to next timer.
-
- long timer_id_;
- // Id of this timer (used to cancel timers before they expire).
-};
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_Queue_Iterator_T
-{
- // = TITLE
- // Generic interface for iterating over a subclass of
- // <ACE_Timer_Queue>.
- //
- // = DESCRIPTION
- // This is a generic iterator that can be used to visit every
- // node of a timer queue. Be aware that it isn't guaranteed
- // that the transversal will be in order of timeout values.
-public:
- // = Initialization and termination methods.
- ACE_Timer_Queue_Iterator_T (void);
- // Constructor.
-
- virtual ~ACE_Timer_Queue_Iterator_T (void);
- // Destructor.
-
- virtual void first (void) = 0;
- // Positions the iterator at the earliest node in the Timer Queue
-
- virtual void next (void) = 0;
- // Positions the iterator at the next node in the Timer Queue
-
- virtual int isdone (void) = 0;
- // Returns true when there are no more nodes in the sequence
-
- virtual ACE_Timer_Node_T<TYPE> *item (void) = 0;
- // Returns the node at the current position in the sequence
-};
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_Queue_T
-{
- // = TITLE
- // Provides an interface to timers.
- //
- // = DESCRIPTION
- // This is an abstract base class that provides hook for
- // implementing specialized policies such as <ACE_Timer_List>
- // and <ACE_Timer_Heap>.
-public:
- typedef ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> ITERATOR;
- // Type of Iterator.
-
- // = Initialization and termination methods.
- ACE_Timer_Queue_T (FUNCTOR *upcall_functor = 0,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist = 0);
- // Default constructor. <upcall_functor> is the instance of the
- // FUNCTOR to be used by the queue. If <upcall_functor> is 0, Timer
- // Queue will create a default FUNCTOR. <freelist> the freelist of
- // timer nodes. If 0, then a default freelist will be created.
-
- virtual ~ACE_Timer_Queue_T (void);
- // Destructor - make virtual for proper destruction of inherited
- // classes.
-
- virtual int is_empty (void) const = 0;
- // True if queue is empty, else false.
-
- virtual const ACE_Time_Value &earliest_time (void) const = 0;
- // Returns the time of the earlier node in the Timer_Queue.
-
- virtual long schedule (const TYPE &type,
- const void *act,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval = ACE_Time_Value::zero) = 0;
- // Schedule <type> that will expire after <delay> amount of time,
- // which is specified in absolute time. If it expires then <act> is
- // passed in as the value to the <functor>. If <interval> is != to
- // <ACE_Time_Value::zero> then it is used to reschedule the <type>
- // automatically, using relative time to the current <gettimeofday>.
- // This method returns a <timer_id> that uniquely identifies the the
- // <type> entry in an internal list. This <timer_id> can be used to
- // cancel the timer before it expires. The cancellation ensures
- // that <timer_ids> are unique up to values of greater than 2
- // billion timers. As long as timers don't stay around longer than
- // this there should be no problems with accidentally deleting the
- // wrong timer. Returns -1 on failure (which is guaranteed never to
- // be a valid <timer_id>).
-
- virtual int reset_interval (long timer_id,
- const ACE_Time_Value &interval) = 0;
- // Resets the interval of the timer represented by <timer_id> to
- // <interval>, which is specified in relative time to the current
- // <gettimeofday>. If <interval> is equal to
- // <ACE_Time_Value::zero>, the timer will become a non-rescheduling
- // timer. Returns 0 if successful, -1 if not.
-
- virtual int cancel (const TYPE &type,
- int dont_call_handle_close = 1) = 0;
- // Cancel all timer associated with <type>. If
- // <dont_call_handle_close> is 0 then the <functor> will be invoked,
- // which typically invokes the <handle_close> hook. Returns number
- // of timers cancelled.
-
- virtual int cancel (long timer_id,
- const void **act = 0,
- int dont_call_handle_close = 1) = 0;
- // Cancel the single timer that matches the <timer_id> value (which
- // was returned from the <schedule> method). If act is non-NULL
- // then it will be set to point to the ``magic cookie'' argument
- // passed in when the timer was registered. This makes it possible
- // to free up the memory and avoid memory leaks. If
- // <dont_call_handle_close> is 0 then the <functor> will be invoked,
- // which typically calls the <handle_close> hook. Returns 1 if
- // cancellation succeeded and 0 if the <timer_id> wasn't found.
-
- virtual int expire (const ACE_Time_Value &current_time);
- // Run the <functor> for all timers whose values are <= <cur_time>.
- // This does not account for <timer_skew>. Returns the number of
- // timers canceled.
-
- /* virtual */ int expire (void);
- // Run the <functor> for all timers whose values are <=
- // <ACE_OS::gettimeofday>. Also accounts for <timer_skew>. Returns
- // the number of timers canceled.
-
- /* virtual */ ACE_Time_Value gettimeofday (void);
- // Returns the current time of day. This allows different
- // implementations of the timer queue to use special high resolution
- // timers.
-
- void gettimeofday (ACE_Time_Value (*gettimeofday)(void));
- // Allows applications to control how the timer queue gets the time
- // of day.
-
- virtual ACE_Time_Value *calculate_timeout (ACE_Time_Value *max);
- // Determine the next event to timeout. Returns <max> if there are
- // no pending timers or if all pending timers are longer than max.
-
- virtual ACE_Time_Value *calculate_timeout (ACE_Time_Value *max,
- ACE_Time_Value *the_timeout);
- // Determine the next event to timeout. Returns <max> if there are
- // no pending timers or if all pending timers are longer than max.
- // <the_timeout> should be a pointer to storage for the timeout value,
- // and this value is also returned.
-
- // = Set/get the timer skew for the Timer_Queue.
- void timer_skew (const ACE_Time_Value &skew);
- const ACE_Time_Value &timer_skew (void) const;
-
- ACE_LOCK &mutex (void);
- // Synchronization variable used by the queue
-
- FUNCTOR &upcall_functor (void);
- // Accessor to the upcall functor
-
- virtual ITERATOR &iter (void) = 0;
- // Returns a pointer to this <ACE_Timer_Queue>'s iterator.
-
- virtual ACE_Timer_Node_T<TYPE> *remove_first (void) = 0;
- // Removes the earliest node from the queue and returns it
-
- virtual void dump (void) const;
- // Dump the state of a object.
-
- virtual ACE_Timer_Node_T<TYPE> *get_first (void) = 0;
- // Reads the earliest node from the queue and returns it.
-
- virtual void return_node (ACE_Timer_Node_T<TYPE> *);
- // Method used to return a timer node to the queue's ownership
- // after it is returned by a method like <remove_first>.
-
-protected:
- /* virtual */ void upcall (TYPE &type,
- const void *act,
- const ACE_Time_Value &cur_time);
- // This method will call the <functor> with the <type>, <act> and
- // <time>
-
- virtual void reschedule (ACE_Timer_Node_T<TYPE> *) = 0;
- // Reschedule an "interval" <ACE_Timer_Node>.
-
- virtual ACE_Timer_Node_T<TYPE> *alloc_node (void);
- // Factory method that allocates a new node.
-
- virtual void free_node (ACE_Timer_Node_T<TYPE> *);
- // Factory method that frees a previously allocated node.
-
- ACE_LOCK mutex_;
- // Synchronization variable for <ACE_Timer_Queue>.
- // NOTE: the right name would be lock_, but HP/C++ will choke on that!
-
- ACE_Free_List<ACE_Timer_Node_T<TYPE> > *free_list_;
- // Class that implements a free list
-
- ACE_Time_Value (*gettimeofday_)(void);
- // Pointer to function that returns the current time of day.
-
- FUNCTOR *upcall_functor_;
- // Upcall functor
-
- int delete_upcall_functor_;
- // To delete or not to delete is the question?
-
- int delete_free_list_;
- // Flag to delete only if the class created the <free_list_>
-
-private:
-
- ACE_Time_Value timeout_;
- // Returned by <calculate_timeout>.
-
- ACE_Time_Value timer_skew_;
- // Adjusts for timer skew in various clocks.
-
- // = Don't allow these operations for now.
- ACE_UNIMPLEMENTED_FUNC (ACE_Timer_Queue_T (const ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> &))
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> &))
-};
-
-template <class ACE_LOCK>
-class ACE_Event_Handler_Handle_Timeout_Upcall
-{
- // = TITLE
- // Functor for Timer_Queues.
- //
- // = DESCRIPTION
- // This class implements the functor required by the Timer
- // Queue to call <handle_timeout> on ACE_Event_Handlers.
-public:
- typedef ACE_Timer_Queue_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_LOCK>,
- ACE_LOCK>
- TIMER_QUEUE;
-
- // = Initialization and termination methods.
- ACE_Event_Handler_Handle_Timeout_Upcall (void);
- // Constructor.
-
- ~ACE_Event_Handler_Handle_Timeout_Upcall (void);
- // Destructor.
-
- int timeout (TIMER_QUEUE &timer_queue,
- ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &cur_time);
- // This method is called when the timer expires
-
- int cancellation (TIMER_QUEUE &timer_queue,
- ACE_Event_Handler *handler);
- // This method is called when the timer is canceled
-
- int deletion (TIMER_QUEUE &timer_queue,
- ACE_Event_Handler *handler,
- const void *arg);
- // This method is called when the timer queue is destroyed and
- // the timer is still contained in it
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Timer_Queue_T.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) && !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#include "ace/Timer_Queue_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE && !ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Timer_Queue_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_TIMER_QUEUE_T_H */
diff --git a/ace/Timer_Queue_T.i b/ace/Timer_Queue_T.i
deleted file mode 100644
index d2c62fcec1f..00000000000
--- a/ace/Timer_Queue_T.i
+++ /dev/null
@@ -1,171 +0,0 @@
-// $Id$
-
-/* -*- C++ -*- */
-
-template <class TYPE> ACE_INLINE void
-ACE_Timer_Node_T<TYPE>::set (const TYPE &type,
- const void *a,
- const ACE_Time_Value &t,
- const ACE_Time_Value &i,
- ACE_Timer_Node_T<TYPE> *n,
- long timer_id)
-{
- this->type_ = type;
- this->act_ = a;
- this->timer_value_ = t;
- this->interval_ = i;
- this->next_ = n;
- this->timer_id_ = timer_id;
-}
-
-template <class TYPE> ACE_INLINE void
-ACE_Timer_Node_T<TYPE>::set (const TYPE &type,
- const void *a,
- const ACE_Time_Value &t,
- const ACE_Time_Value &i,
- ACE_Timer_Node_T<TYPE> *p,
- ACE_Timer_Node_T<TYPE> *n,
- long timer_id)
-{
- this->type_ = type;
- this->act_ = a;
- this->timer_value_ = t;
- this->interval_ = i;
- this->prev_ = p;
- this->next_ = n;
- this->timer_id_ = timer_id;
-}
-
-template <class TYPE> ACE_INLINE TYPE &
-ACE_Timer_Node_T<TYPE>::get_type (void)
-{
- return this->type_;
-}
-
-template <class TYPE> ACE_INLINE void
-ACE_Timer_Node_T<TYPE>::set_type (TYPE &type)
-{
- this->type_ = type;
-}
-
-template <class TYPE> ACE_INLINE const void *
-ACE_Timer_Node_T<TYPE>::get_act (void)
-{
- return this->act_;
-}
-
-template <class TYPE> ACE_INLINE void
-ACE_Timer_Node_T<TYPE>::set_act (void *act)
-{
- this->act_ = act;
-}
-
-template <class TYPE> ACE_INLINE ACE_Time_Value &
-ACE_Timer_Node_T<TYPE>::get_timer_value (void)
-{
- return this->timer_value_;
-}
-
-template <class TYPE> ACE_INLINE void
-ACE_Timer_Node_T<TYPE>::set_timer_value (ACE_Time_Value timer_value)
-{
- this->timer_value_ = timer_value;
-}
-
-template <class TYPE> ACE_INLINE ACE_Time_Value &
-ACE_Timer_Node_T<TYPE>::get_interval (void)
-{
- return this->interval_;
-}
-
-template <class TYPE> ACE_INLINE void
-ACE_Timer_Node_T<TYPE>::set_interval (ACE_Time_Value interval)
-{
- this->interval_ = interval;
-}
-
-template <class TYPE> ACE_INLINE ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Node_T<TYPE>::get_prev (void)
-{
- return this->prev_;
-}
-
-template <class TYPE> ACE_INLINE void
-ACE_Timer_Node_T<TYPE>::set_prev (ACE_Timer_Node_T<TYPE> *prev)
-{
- this->prev_ = prev;
-}
-
-template <class TYPE> ACE_INLINE ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Node_T<TYPE>::get_next (void)
-{
- return this->next_;
-}
-
-template <class TYPE> ACE_INLINE void
-ACE_Timer_Node_T<TYPE>::set_next (ACE_Timer_Node_T<TYPE> *next)
-{
- this->next_ = next;
-}
-
-template <class TYPE> ACE_INLINE long
-ACE_Timer_Node_T<TYPE>::get_timer_id (void)
-{
- return this->timer_id_;
-}
-
-template <class TYPE> ACE_INLINE void
-ACE_Timer_Node_T<TYPE>::set_timer_id (long timer_id)
-{
- this->timer_id_ = timer_id;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_INLINE void
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::timer_skew (const ACE_Time_Value &skew)
-{
- timer_skew_ = skew;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_INLINE const ACE_Time_Value &
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::timer_skew (void) const
-{
- return timer_skew_;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_INLINE int
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::expire (void)
-{
- if (!this->is_empty ())
- return this->expire (this->gettimeofday () + timer_skew_);
- else
- return 0;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_INLINE void
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::upcall (TYPE &type,
- const void *act,
- const ACE_Time_Value &cur_time)
-{
- this->upcall_functor ().timeout (*this, type, act, cur_time);
-}
-
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_INLINE ACE_Time_Value
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::gettimeofday (void)
-{
- // Invoke gettimeofday via pointer to function.
- return this->gettimeofday_ ();
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_INLINE void
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::gettimeofday (ACE_Time_Value (*gettimeofday)(void))
-{
- this->gettimeofday_ = gettimeofday;
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_INLINE FUNCTOR &
-ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::upcall_functor (void)
-{
- return *this->upcall_functor_;
-}
-
diff --git a/ace/Timer_Wheel.cpp b/ace/Timer_Wheel.cpp
deleted file mode 100644
index de72afccb18..00000000000
--- a/ace/Timer_Wheel.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// $Id$
-
-#if !defined (ACE_TIMER_WHEEL_C)
-#define ACE_TIMER_WHEEL_C
-
-#include "ace/Timer_Wheel.h"
-
-#if defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#include "ace/Timer_Wheel_T.cpp"
-#endif /* ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-ACE_RCSID(ace, Timer_Wheel, "$Id$")
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Timer_Wheel_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-template class ACE_Timer_Wheel_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Timer_Wheel_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>
-#pragma instantiate ACE_Timer_Wheel_Iterator_T<ACE_Event_Handler *, ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>, ACE_SYNCH_RECURSIVE_MUTEX>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-
-#endif /* ACE_TIMER_WHEEL_C */
diff --git a/ace/Timer_Wheel.h b/ace/Timer_Wheel.h
deleted file mode 100644
index 0aeae495b40..00000000000
--- a/ace/Timer_Wheel.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-/* -*- C++ -*- */
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_Wheel.h
-//
-// = AUTHOR
-// Darrell Brunsch (brunsch@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_WHEEL_H
-#define ACE_TIMER_WHEEL_H
-#include "ace/pre.h"
-
-#include "ace/Timer_Wheel_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// The following typedef are here for ease of use and backward
-// compatibility.
-
-typedef ACE_Timer_Wheel_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX>
- ACE_Timer_Wheel;
-
-typedef ACE_Timer_Wheel_Iterator_T<ACE_Event_Handler *,
- ACE_Event_Handler_Handle_Timeout_Upcall<ACE_SYNCH_RECURSIVE_MUTEX>,
- ACE_SYNCH_RECURSIVE_MUTEX>
- ACE_Timer_Wheel_Iterator;
-
-#include "ace/post.h"
-#endif /* ACE_TIMER_WHEEL_H */
diff --git a/ace/Timer_Wheel_T.cpp b/ace/Timer_Wheel_T.cpp
deleted file mode 100644
index 77acdbd7b42..00000000000
--- a/ace/Timer_Wheel_T.cpp
+++ /dev/null
@@ -1,668 +0,0 @@
-// $Id$
-
-#ifndef ACE_TIMER_WHEEL_T_C
-#define ACE_TIMER_WHEEL_T_C
-
-#include "ace/Timer_Wheel_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/High_Res_Timer.h"
-
-ACE_RCSID(ace, Timer_Wheel_T, "$Id$")
-
-// Constructor that takes in a <wheel>, a reference to the timer queue
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Wheel_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Wheel_Iterator_T (ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK> &wheel)
- : timer_wheel_ (wheel)
-{
- this->first();
- // Nothing
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Wheel_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::~ACE_Timer_Wheel_Iterator_T (void)
-{
-}
-
-// Positions the iterator at the first node in the timing wheel
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Wheel_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::first (void)
-{
- for (this->pos_ = 0;
- this->pos_ < this->timer_wheel_.wheel_size_;
- this->pos_++)
- {
- // Skip over empty entries
- if (this->timer_wheel_.wheel_[this->pos_]->get_next ()
- != this->timer_wheel_.wheel_[this->pos_])
- {
- this->list_item_ =
- this->timer_wheel_.wheel_[this->pos_]->get_next ();
- return;
- }
- }
-
- // The queue is empty if we are here
- this->list_item_ = 0;
-}
-
-// Positions the iterator at the next node in list or goes to the next
-// list
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Wheel_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::next (void)
-{
- if (this->isdone ())
- return;
-
- this->list_item_ =
- this->list_item_->get_next ();
-
- // If there is no more in the current list, go to the next
- if (this->list_item_ == this->timer_wheel_.wheel_[this->pos_])
- {
- for (this->pos_++;
- this->pos_ < this->timer_wheel_.wheel_size_;
- this->pos_++)
- {
- // Check for an empty entry
- if (this->timer_wheel_.wheel_[this->pos_]->get_next ()
- != this->timer_wheel_.wheel_[this->pos_])
- {
- this->list_item_ =
- this->timer_wheel_.wheel_[this->pos_]->get_next ();
- return;
- }
- }
-
- this->list_item_ = 0;
- }
-}
-
-// Returns true when we are at the end (when list_item_ == 0)
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Wheel_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::isdone (void)
-{
- return this->list_item_ == 0;
-}
-
-// Returns the node at the current position in the sequence
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Wheel_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>::item (void)
-{
- if (this->isdone ())
- return 0;
-
- return this->list_item_;
-}
-
-// Constructor that sets up the timing wheel and also may preallocate
-// some nodes on the free list
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Wheel_T (size_t wheelsize,
- size_t resolution,
- size_t prealloc,
- FUNCTOR *upcall_functor,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist)
- : ACE_Timer_Queue_T<TYPE,FUNCTOR,ACE_LOCK> (upcall_functor, freelist),
- wheel_size_ (wheelsize),
- resolution_ (resolution),
- earliest_pos_ (0)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::ACE_Timer_Wheel_T");
- size_t i;
-
- this->gettimeofday (ACE_OS::gettimeofday);
-
- // Create the timing wheel
- ACE_NEW (this->wheel_,
- ACE_Timer_Node_T<TYPE> *[wheelsize]);
-
- // Create the dummy nodes
- for (i = 0; i < wheelsize; i++)
- {
- ACE_Timer_Node_T<TYPE> *tempnode =
- this->alloc_node ();
- tempnode->set_next (tempnode);
- tempnode->set_prev (tempnode);
- this->wheel_[i] = tempnode;
- }
-
- // Do the preallocation
- this->free_list_->resize (prealloc);
-
- ACE_NEW (iterator_,
- WHEEL_ITERATOR (*this));
-}
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::ACE_Timer_Wheel_T (FUNCTOR *upcall_functor,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist)
- : ACE_Timer_Queue_T<TYPE,FUNCTOR,ACE_LOCK> (upcall_functor, freelist),
- wheel_size_ (ACE_DEFAULT_TIMER_WHEEL_SIZE),
- resolution_ (ACE_DEFAULT_TIMER_WHEEL_RESOLUTION),
- earliest_pos_ (0)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::ACE_Timer_Wheel_T");
- size_t i;
-
- this->gettimeofday (ACE_OS::gettimeofday);
-
- // Create the timing wheel
- ACE_NEW (this->wheel_,
- ACE_Timer_Node_T<TYPE> *[this->wheel_size_]);
-
- // Create the dummy nodes
- for (i = 0;
- i < this->wheel_size_;
- i++)
- {
- ACE_Timer_Node_T<TYPE> *tempnode = this->alloc_node ();
- tempnode->set_next (tempnode);
- tempnode->set_prev (tempnode);
- this->wheel_[i] = tempnode;
- }
-
- ACE_NEW (iterator_,
- WHEEL_ITERATOR (*this));
-}
-
-// Destructor just cleans up its memory
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::~ACE_Timer_Wheel_T (void)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::~ACE_Timer_Wheel_T");
-
- delete iterator_;
-
- for (size_t i = 0;
- i < this->wheel_size_;
- i++)
- {
- // delete nodes until only the dummy node is left
- while (this->wheel_[i]->get_next () != this->wheel_[i])
- {
- ACE_Timer_Node_T<TYPE> *next =
- this->wheel_[i]->get_next ();
- this->wheel_[i]->set_next (next->get_next ());
- next->get_next ()->set_prev (this->wheel_[i]);
- this->upcall_functor ().deletion (*this,
- next->get_type (),
- next->get_act ());
- this->free_node (next);
- }
-
- // and now delete the dummy node
- delete this->wheel_[i];
- }
-
- // finally delete the wheel
- delete [] this->wheel_;
-}
-
-// Checks to see if <earliest_pos> points to a empty list (then it is empty)
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::is_empty (void) const
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::is_empty");
-
- return this->wheel_[this->earliest_pos_]->get_next () == this->wheel_[this->earliest_pos_];
-}
-
-// Returns the first (earliest) node in the <wheel_>'s <earliest_pos_> list
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> const ACE_Time_Value &
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::earliest_time (void) const
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::earliest_time");
-
- if (this->is_empty ())
- return ACE_Time_Value::zero;
- else
- return this->wheel_[this->earliest_pos_]->get_next ()->get_timer_value ();
-}
-
-// Create the node and pass it to reschedule. Also check to see if
-// the <earliest_pos> should be changed.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> long
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::schedule (const TYPE &type,
- const void *act,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::schedule");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- ACE_Timer_Node_T<TYPE> *tempnode = this->alloc_node ();
-
- if (tempnode)
- {
- // Note that the timer_id is actually the pointer to the node
-
- // Set the details of the node
- tempnode->set (type,
- act,
- delay,
- interval,
- 0,
- 0,
- (long) tempnode);
-
- // Reschedule will insert it into the correct position
- this->reschedule (tempnode);
-
- return tempnode->get_timer_id ();
- }
-
- // Failure return
- errno = ENOMEM;
- return -1;
-}
-
-// Locate and update the inteval on the timer_id
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::reset_interval (long timer_id,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::reset_interval");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- // Make sure we are getting a valid <timer_id>, not an error
- // returned by <schedule>.
- if (timer_id == -1)
- return -1;
-
- ACE_Timer_Node_T<TYPE> *node =
- ACE_reinterpret_cast (ACE_Timer_Node_T<TYPE> *,
- timer_id);
-
- // Check to see if the node looks like a true
- // ACE_Timer_Node_T<TYPE>.
- if (timer_id != node->get_timer_id ())
- return -1;
-
- node->set_interval (interval);
- return 0;
-}
-
-// Goes through every list in the wheel and if it finds a node with <type>
-// then it removes the node and continues on looking for other nodes
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::cancel (const TYPE &type,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::cancel");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- int number_of_cancellations = 0;
- size_t i;
-
- // Walk through the wheel
- for (i = 0;
- i < this->wheel_size_;
- i++)
- {
-
- // Walk through the list.
- for (ACE_Timer_Node_T<TYPE> *curr =
- this->wheel_[i]->get_next ();
- curr != this->wheel_[i];
- )
- {
- if (curr->get_type () == type)
- {
- // Cancel it and remove it.
- number_of_cancellations++;
-
- // Detach it from the list
- ACE_Timer_Node_T<TYPE> *tempnode = curr;
- curr->get_prev ()->set_next (curr->get_next ());
- curr->get_next ()->set_prev (curr->get_prev ());
-
- // Go on to the next and delete the detached node
- curr = curr->get_next ();
- this->free_node (tempnode);
- }
- else
- curr = curr->get_next ();
- }
- }
-
- // Look for a new earliest time
-
- // Defaults to zero.
- ACE_Time_Value earliest_time;
-
- // Check every entry in the table
- for (i = 0; i < this->wheel_size_; i++)
- {
- // Skip empty entries
- if (this->wheel_[i]->get_next () != this->wheel_[i])
- {
- // if initialization or if the time is earlier
- if (earliest_time == ACE_Time_Value::zero
- || this->wheel_[i]->get_timer_value () < earliest_time)
- {
- earliest_time =
- this->wheel_[i]->get_next ()->get_timer_value ();
- this->earliest_pos_ = i;
- }
- }
- }
-
- if (dont_call_handle_close == 0)
- this->upcall_functor ().cancellation (*this,
- type);
- return number_of_cancellations;
-}
-
-// Takes the <timer_id> and casts it to a pointer. Then it removes it
-// from its neighbors
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::cancel (long timer_id,
- const void **act,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::cancel");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- // Make sure we are getting a valid <timer_id>, not an error
- // returned by <schedule>.
- if (timer_id == -1)
- return 0;
-
- ACE_Timer_Node_T<TYPE> *node =
- ACE_reinterpret_cast (ACE_Timer_Node_T<TYPE> *,
- timer_id);
-
- // Check to see if the node looks like a true ACE_Timer_Node_T<TYPE>.
- if (timer_id == node->get_timer_id ())
- {
- node->get_next ()->set_prev (node->get_prev ());
- node->get_prev ()->set_next (node->get_next ());
-
- if (act != 0)
- *act = node->get_act ();
-
- if (dont_call_handle_close == 0)
- this->upcall_functor ().cancellation (*this,
- node->get_type ());
-
- // Find out what position it is in.
- size_t pos = (node->get_timer_value ().usec () / this->resolution_) % this->wheel_size_;
-
- this->free_node (node);
-
- // Get the new earliest time if we have to
-
- if (pos == this->earliest_pos_)
- {
- ACE_Time_Value earliest_time; // defaults to zero
-
- // Check every entry in the table
- for (size_t i = 0; i < this->wheel_size_; i++)
- {
- // Skip empty entries
- if (this->wheel_[i]->get_next () != this->wheel_[i])
- {
- // if initialization or if the time is earlier
- if (earliest_time == ACE_Time_Value::zero
- || this->wheel_[i]->get_timer_value () < earliest_time)
- {
- earliest_time =
- this->wheel_[i]->get_next ()->get_timer_value ();
- this->earliest_pos_ = i;
- }
- }
- }
- }
-
- return 1;
- }
-
- // Didn't find it if we are here
- return 0;
-}
-
-// Dumps out some properties of this object
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::dump (void) const
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nwheel_size_ = %d"), this->wheel_size_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nresolution_ = %d"), this->resolution_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nwheel_ = \n")));
-
- for (size_t i = 0; i < this->wheel_size_; i++)
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d\n"), i));
- ACE_Timer_Node_T<TYPE> *temp = this->wheel_[i]->get_next ();
- while (temp != this->wheel_[i])
- {
- temp->dump ();
- temp = temp->get_next ();
- }
- }
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// Removes the earliest node and then find the new <earliest_pos_>
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::remove_first (void)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::remove_first");
-
- // Remove the item
- ACE_Timer_Node_T<TYPE> *temp =
- this->wheel_[this->earliest_pos_]->get_next ();
- temp->get_prev ()->set_next (temp->get_next ());
- temp->get_next ()->set_prev (temp->get_prev ());
-
- ACE_Time_Value earliest_time;
-
- // Check every entry in the table for the new earliest item
- for (size_t i = 0;
- i < this->wheel_size_;
- i++)
- {
- // Check for an empty entry
- if (this->wheel_[i]->get_next () != this->wheel_[i])
- {
- // if initialization or if the time is earlier
- if (earliest_time == ACE_Time_Value::zero
- || this->wheel_[i]->get_timer_value () < earliest_time)
- {
- earliest_time =
- this->wheel_[i]->get_next ()->get_timer_value ();
- this->earliest_pos_ = i;
- }
- }
- }
-
- return temp;
-}
-
-// Returns the earliest node without removing it
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Node_T<TYPE> *
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::get_first (void)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::get_first");
-
- return this->wheel_[this->earliest_pos_]->get_next ();
-}
-
-// Takes an ACE_Timer_Node and inserts it into the correct position in
-// the correct list.
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> void
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::reschedule (ACE_Timer_Node_T<TYPE> *expired)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::reschedule");
-
- size_t pos =
- (expired->get_timer_value ().usec () / this->resolution_) % this->wheel_size_;
-
- // See if we need to update the earliest time
- if (this->earliest_time () == ACE_Time_Value::zero
- || expired->get_timer_value () < this->earliest_time ())
- this->earliest_pos_ = pos;
-
- // Insert time into dummy node.
- this->wheel_[pos]->set_timer_value (expired->get_timer_value ());
- ACE_Timer_Node_T<TYPE> *cursor =
- this->wheel_[pos]->get_next ();
-
- // Find position to insert
- while (cursor->get_timer_value () < expired->get_timer_value ())
- cursor = cursor->get_next ();
-
- // Insert
- expired->set_prev (cursor->get_prev ());
- expired->set_next (cursor);
- cursor->set_prev (expired);
- expired->get_prev ()->set_next (expired);
-}
-
-// Just return the iterator
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> &
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::iter (void)
-{
- this->iterator_->first ();
- return *this->iterator_;
-}
-
-// Dummy version of expire to get rid of warnings in Sun CC 4.2
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::expire ()
-{
- return ACE_Timer_Queue_T<TYPE,FUNCTOR,ACE_LOCK>::expire ();
-}
-
-// Specialized expire which expires in total order. It is optimized
-// by keeping track of the list with the earliest element and the next
-// earliest list. It then goes through the earliest list until it can
-// switch to the second list. it keeps going until it finishes with
-// everything before the <cur_time>
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK> int
-ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK>::expire (const ACE_Time_Value &cur_time)
-{
- ACE_TRACE ("ACE_Timer_Wheel_T::expire");
- ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1));
-
- int number_of_timers_expired = 0;
- size_t i;
- size_t earliest = this->wheel_size_;
- ACE_Time_Value earliest_time = cur_time;
- size_t next_earliest = this->wheel_size_;
- ACE_Time_Value next_earliest_time;
-
- // Find the earliest time
- for (i = 0; i < this->wheel_size_; i++)
- {
- if (this->wheel_[i]->get_next () != this->wheel_[i]
- && this->wheel_[i]->get_next ()->get_timer_value () <= earliest_time)
- {
- earliest = i;
- earliest_time = this->wheel_[i]->get_next ()->get_timer_value ();
- }
- }
-
- // Check to see if there is nothing to expire
- if (earliest == this->wheel_size_)
- return 0;
-
- do
- {
- next_earliest_time = cur_time;
- next_earliest = this->wheel_size_;
-
- // Find 2nd earliest position
- for (i = 0; i < this->wheel_size_; i++)
- {
- if (i != earliest
- && this->wheel_[i]->get_next () != this->wheel_[i]
- && this->wheel_[i]->get_next ()->get_timer_value () <= next_earliest_time)
- {
- next_earliest = i;
- next_earliest_time = this->wheel_[i]->get_next ()->get_timer_value ();
- }
- }
-
- while (this->wheel_[earliest]->get_next ()
- != this->wheel_[earliest]
- && this->wheel_[earliest]->get_next ()->get_timer_value ()
- <= next_earliest_time)
- {
- // Remove the first node in the earliest position
- ACE_Timer_Node_T<TYPE> *expired =
- this->wheel_[earliest]->get_next ();
- this->wheel_[earliest]->set_next (expired->get_next ());
- expired->get_next ()->set_prev (this->wheel_[earliest]);
-
- TYPE &type = expired->get_type ();
- const void *act = expired->get_act ();
- int reclaim = 1;
-
- // Check if this is an interval timer.
- if (expired->get_interval () > ACE_Time_Value::zero)
- {
- // Make sure that we skip past values that have already
- // "expired".
- do
- expired->set_timer_value (expired->get_timer_value () + expired->get_interval ());
- while (expired->get_timer_value () <= cur_time);
-
- // Since this is an interval timer, we need to
- // reschedule it.
- this->reschedule (expired);
- reclaim = 0;
- }
-
- // Call the functor.
- this->upcall (type, act, cur_time);
-
- if (reclaim)
- // Free up the node and the token.
- this->free_node (expired);
-
- ++number_of_timers_expired;
-
- // Check to see if we are empty.
- if (this->wheel_[earliest]->get_next () == this->wheel_[earliest])
- break;
- }
-
- if (next_earliest_time == this->wheel_size_)
- break;
-
- earliest = next_earliest;
- }
- while (next_earliest != this->wheel_size_);
-
- return number_of_timers_expired;
-}
-
-#endif /* ACE_TIMER_WHEEL_T_C */
diff --git a/ace/Timer_Wheel_T.h b/ace/Timer_Wheel_T.h
deleted file mode 100644
index 5736c28effa..00000000000
--- a/ace/Timer_Wheel_T.h
+++ /dev/null
@@ -1,229 +0,0 @@
-// $Id$
-
-/* -*- C++ -*- */
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Timer_Wheel.h
-//
-// = AUTHOR
-// Darrell Brunsch <brunsch@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_TIMER_WHEEL_T_H
-#define ACE_TIMER_WHEEL_T_H
-#include "ace/pre.h"
-
-#include "ace/Timer_Queue_T.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// Forward declaration
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_Wheel_T;
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_Wheel_Iterator_T : public ACE_Timer_Queue_Iterator_T <TYPE, FUNCTOR, ACE_LOCK>
-{
- // = TITLE
- // Iterates over an <ACE_Timer_Wheel>.
- //
- // = DESCRIPTION
- // This is a generic iterator that can be used to visit every
- // node of a timer queue. Be aware that it doesn't transverse
- // in the order of timeout values.
-public:
- ACE_Timer_Wheel_Iterator_T (ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK> &);
- // Constructor
-
- ~ACE_Timer_Wheel_Iterator_T (void);
- // Destructor
-
- virtual void first (void);
- // Positions the iterator at the earliest node in the Timer Queue
-
- virtual void next (void);
- // Positions the iterator at the next node in the Timer Queue
-
- virtual int isdone (void);
- // Returns true when there are no more nodes in the sequence
-
- virtual ACE_Timer_Node_T<TYPE> *item (void);
- // Returns the node at the current position in the sequence
-
-protected:
- ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK> &timer_wheel_;
- // Pointer to the <ACE_Timer_List> that we are iterating over.
-
- size_t pos_;
- // Current position in the timing wheel
-
- ACE_Timer_Node_T<TYPE> *list_item_;
- // Pointer to the position in the the <pos_>th list
-};
-
-template <class TYPE, class FUNCTOR, class ACE_LOCK>
-class ACE_Timer_Wheel_T : public ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>
-{
- // = TITLE
- // Provides a Timing Wheel version of Timer Queue
- //
- // = DESCRIPTION
- // This implementation uses a hash table of ordered doubly-
- // linked lists of absolute times. The other enhancements
- // to Timer List include using the pointer to the node as the
- // timer id (to speed up removing), adding a free list and
- // the ability to preallocate nodes. Timer Wheel is based on
- // the timing wheel implementation used in Adam M. Costello and
- // George Varghese's paper "Redesigning the BSD Callout and
- // Timer Facilities"
- // (http://dworkin.wustl.edu/~varghese/PAPERS/newbsd.ps.Z)
-public:
- typedef ACE_Timer_Wheel_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> WHEEL_ITERATOR;
- // Type of iterator
-
- friend class ACE_Timer_Wheel_Iterator_T<TYPE, FUNCTOR, ACE_LOCK>;
- // Iterator is a friend
-
- typedef ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK> INHERITED;
- // Type inherited from
-
- // = Initialization and termination methods
-
- ACE_Timer_Wheel_T (size_t wheelsize,
- size_t resolution,
- size_t prealloc = 0,
- FUNCTOR *upcall_functor = 0,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist = 0);
- // Constructor that takes in <wheelsize> - size of the timing wheel,
- // <resolution> - resolution of time values the hashing function uses,
- // and <upcall_functor> - a functor that will be used instead of creating
- // a default functor. Also, when the freelist is created, <prealloc> nodes
- // will be allocated. This can also take in a upcall functor and freelist
- // (if 0, then defaults will be created)
-
- ACE_Timer_Wheel_T (FUNCTOR *upcall_functor = 0,
- ACE_Free_List<ACE_Timer_Node_T <TYPE> > *freelist = 0);
- // Default constructor. <upcall_functor> is the instance of the
- // FUNCTOR to be used by the queue. If <upcall_functor> is 0, Timer
- // Queue will create a default FUNCTOR. <freelist> the freelist of
- // timer nodes. If 0, then a default freelist will be created. The
- // defaults will be used for size and resolution and no preallocation
- // (ACE_DEFAULT_TIMER_WHEEL_SIZE, ACE_DEFAULT_TIMER_WHEEL_RESOLUTION)
-
- virtual ~ACE_Timer_Wheel_T (void);
- // Destructor
-
- virtual int is_empty (void) const;
- // True if queue is empty, else false.
-
- virtual const ACE_Time_Value &earliest_time (void) const;
- // Returns the time of the earlier node in the <ACE_Timer_Wheel>.
-
- virtual long schedule (const TYPE &type,
- const void *act,
- const ACE_Time_Value &delay,
- const ACE_Time_Value &interval = ACE_Time_Value::zero);
- // Schedule <type> that will expire after <delay> amount of time,
- // which is specified in absolute time. If it expires then <act> is
- // passed in as the value to the <functor>. If <interval> is != to
- // <ACE_Time_Value::zero> then it is used to reschedule the <type>
- // automatically, using relative time to the current <gettimeofday>.
- // This method returns a <timer_id> that uniquely identifies the the
- // timer. This <timer_id> can be used to cancel the timer before it
- // expires. Returns -1 on failure.
-
- virtual int reset_interval (long timer_id,
- const ACE_Time_Value &interval);
- // Resets the interval of the timer represented by <timer_id> to
- // <interval>, which is specified in relative time to the current
- // <gettimeofday>. If <interval> is equal to
- // <ACE_Time_Value::zero>, the timer will become a non-rescheduling
- // timer. Returns 0 if successful, -1 if not.
-
- virtual int cancel (const TYPE &type,
- int dont_call_handle_close = 1);
- // Cancel all timer associated with <type>. If <dont_call> is 0
- // then the <functor> will be invoked. Returns number of timers
- // cancelled.
-
- virtual int cancel (long timer_id,
- const void **act = 0,
- int dont_call_handle_close = 1);
- // Cancel the single timer that matches the <timer_id> value (which
- // was returned from the <schedule> method). If act is non-NULL
- // then it will be set to point to the ``magic cookie'' argument
- // passed in when the timer was registered. This makes it possible
- // to free up the memory and avoid memory leaks. If <dont_call> is
- // 0 then the <functor> will be invoked. Returns 1 if cancellation
- // succeeded and 0 if the <timer_id> wasn't found.
-
- virtual int expire (void);
- // Run the <functor> for all timers whose values are <=
- // <ACE_OS::gettimeofday>. Also accounts for <timer_skew>. Returns
- // the number of timers canceled.
-
- int expire (const ACE_Time_Value &);
- // Run the <functor> for all timers whose values are <= <cur_time>.
- // This does not account for <timer_skew>. Returns the number of
- // timers canceled.
-
- virtual ACE_Timer_Queue_Iterator_T<TYPE, FUNCTOR, ACE_LOCK> &iter (void);
- // Returns a pointer to this <ACE_Timer_Queue_T>'s iterator.
-
- virtual ACE_Timer_Node_T<TYPE> *remove_first (void);
- // Removes the earliest node from the queue and returns it
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
- virtual ACE_Timer_Node_T<TYPE> *get_first (void);
- // Reads the earliest node from the queue and returns it.
-
-private:
- virtual void reschedule (ACE_Timer_Node_T<TYPE> *);
- // Reschedule an "interval" node
-
- ACE_Timer_Node_T<TYPE> **wheel_;
- // Timing Wheel.
-
- size_t wheel_size_;
- // Size of the timing wheel.
-
- size_t resolution_;
- // Resolution (in microsoconds) of the timing wheel.
-
- size_t earliest_pos_;
- // Index of the list with the earliest time
-
- long size_;
- // Keeps track of the size of the queue
-
- WHEEL_ITERATOR *iterator_;
- // Iterator used to expire timers.
-
- ACE_Timer_Node_T<TYPE> *freelist_;
- // Pointer to the freelist of <ACE_Timer_Node_T<TYPE>>.
-
- // = Don't allow these operations for now.
- ACE_UNIMPLEMENTED_FUNC (ACE_Timer_Wheel_T (const ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK> &))
- ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK> &))
-};
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) && !defined (ACE_HAS_BROKEN_HPUX_TEMPLATES)
-#include "ace/Timer_Wheel_T.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE && !ACE_HAS_BROKEN_HPUX_TEMPLATES */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Timer_Wheel_T.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_TIMER_WHEEL_T_H */
diff --git a/ace/TkReactor.cpp b/ace/TkReactor.cpp
deleted file mode 100644
index adc3ff9922a..00000000000
--- a/ace/TkReactor.cpp
+++ /dev/null
@@ -1,435 +0,0 @@
-#include "ace/Synch_T.h"
-#include "ace/SOCK_Acceptor.h"
-#include "ace/SOCK_Connector.h"
-#include "ace/TkReactor.h"
-
-ACE_RCSID(ace, TkReactor, "$Id$")
-
-#if defined (ACE_HAS_TK)
-
-ACE_ALLOC_HOOK_DEFINE (ACE_TkReactor)
-
-// Must be called with lock held
-ACE_TkReactor::ACE_TkReactor (size_t size,
- int restart,
- ACE_Sig_Handler *h)
- : ACE_Select_Reactor (size, restart, h),
- ids_ (0),
- timeout_ (0)
-{
- // When the ACE_Select_Reactor is constructed it creates the notify
- // pipe and registers it with the register_handler_i() method. The
- // TkReactor overloads this method BUT because the
- // register_handler_i occurs when constructing the base class
- // ACE_Select_Reactor, the ACE_Select_Reactor register_handler_i()
- // is called not the TkReactor register_handler_i(). This means
- // that the notify pipe is registered with the ACE_Select_Reactor
- // event handling code not the TkReactor and so notfications don't
- // work. To get around this we simply close and re-opened the
- // notification handler in the constructor of the TkReactor.
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- this->notify_handler_->close ();
- this->notify_handler_->open (this, 0);
-#endif /* ACE_MT_SAFE */
-}
-
-ACE_TkReactor::~ACE_TkReactor (void)
-{
- // Delete the remaining items in the linked list.
-
- while (this->ids_)
- {
- ACE_TkReactorID *TkID = this->ids_->next_;
- delete this->ids_;
- this->ids_ = TkID;
- }
-}
-
-// This is just the <wait_for_multiple_events> from ace/Reactor.cpp
-// but we use the Tk functions to wait for an event, not <select>
-
-int
-ACE_TkReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set,
- ACE_Time_Value *max_wait_time)
-{
- ACE_TRACE ("ACE_TkReactor::wait_for_multiple_events");
- int nfound;
-
- do
- {
- max_wait_time = this->timer_queue_->calculate_timeout (max_wait_time);
-
- size_t width = this->handler_rep_.max_handlep1 ();
- handle_set.rd_mask_ = this->wait_set_.rd_mask_;
- handle_set.wr_mask_ = this->wait_set_.wr_mask_;
- handle_set.ex_mask_ = this->wait_set_.ex_mask_;
- nfound = TkWaitForMultipleEvents (width,
- handle_set,
- max_wait_time);
-
- } while (nfound == -1 && this->handle_error () > 0);
-
- if (nfound > 0)
- {
-#if !defined (ACE_WIN32)
- handle_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ());
- handle_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ());
- handle_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ());
-#endif /* ACE_WIN32 */
- }
- return nfound; // Timed out or input available
-}
-
-void
-ACE_TkReactor::TimerCallbackProc (ClientData cd)
-{
- ACE_TkReactor *self = (ACE_TkReactor *) cd;
- self->timeout_ = 0;
-
- // Deal with any timer events
- ACE_Select_Reactor_Handle_Set handle_set;
- self->dispatch (0, handle_set);
- self->reset_timeout ();
-}
-
-// This could be made shorter if we know which *kind* of event we were
-// about to get. Here we use <select> to find out which one might be
-// available.
-
-void
-ACE_TkReactor::InputCallbackProc (ClientData cd,
- int mask)
-{
- ACE_TkReactor_Input_Callback *callback = (ACE_TkReactor_Input_Callback *) cd;
- ACE_TkReactor *self = callback->reactor_;
- ACE_HANDLE handle = callback->handle_;
-
- // my copy isn't const.
- ACE_Time_Value zero = ACE_Time_Value::zero;
-
- ACE_Select_Reactor_Handle_Set wait_set;
-
- // Deal with one file event.
-
- // - read which kind of event
- if (self->wait_set_.rd_mask_.is_set (handle))
- wait_set.rd_mask_.set_bit (handle);
- if (self->wait_set_.wr_mask_.is_set (handle))
- wait_set.wr_mask_.set_bit (handle);
- if (self->wait_set_.ex_mask_.is_set (handle))
- wait_set.ex_mask_.set_bit (handle);
-
- int result = ACE_OS::select (handle + 1,
- wait_set.rd_mask_,
- wait_set.wr_mask_,
- wait_set.ex_mask_, &zero);
-
- ACE_Select_Reactor_Handle_Set dispatch_set;
-
- // - Use only that one file event (removes events for other files).
- if (result > 0)
- {
- if (wait_set.rd_mask_.is_set (handle))
- dispatch_set.rd_mask_.set_bit (handle);
- if (wait_set.wr_mask_.is_set (handle))
- dispatch_set.wr_mask_.set_bit (handle);
- if (wait_set.ex_mask_.is_set (handle))
- dispatch_set.ex_mask_.set_bit (handle);
-
- self->dispatch (1, dispatch_set);
- }
-}
-
-int
-ACE_TkReactor::TkWaitForMultipleEvents (int width,
- ACE_Select_Reactor_Handle_Set &wait_set,
- ACE_Time_Value *)
-{
- // Check to make sure our handle's are all usable.
- ACE_Select_Reactor_Handle_Set temp_set = wait_set;
-
- if (ACE_OS::select (width,
- temp_set.rd_mask_,
- temp_set.wr_mask_,
- temp_set.ex_mask_,
- (ACE_Time_Value *) &ACE_Time_Value::zero) == -1)
- return -1; // Bad file arguments...
-
- // Instead of waiting using <select>, just use the Tk mechanism to
- // wait for a single event.
-
- // Wait for something to happen.
- ::Tcl_DoOneEvent (0);
-
- // Reset the width, in case it changed during the upcalls.
- width = this->handler_rep_.max_handlep1 ();
-
- // Now actually read the result needed by the <Select_Reactor> using
- // <select>.
- return ACE_OS::select (width,
- wait_set.rd_mask_,
- wait_set.wr_mask_,
- wait_set.ex_mask_,
- (ACE_Time_Value *) &ACE_Time_Value::zero);
-}
-
-int
-ACE_TkReactor::register_handler_i (ACE_HANDLE handle,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_TkReactor::register_handler_i");
-
- int result = ACE_Select_Reactor::register_handler_i (handle,
- handler, mask);
- if (result == -1)
- return -1;
-
- int condition = 0;
-
-#if !defined ACE_WIN32
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK))
- ACE_SET_BITS (condition, TK_READABLE);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::WRITE_MASK))
- ACE_SET_BITS (condition, TK_WRITABLE);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::EXCEPT_MASK))
- ACE_SET_BITS (condition, TK_EXCEPTION);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::ACCEPT_MASK))
- ACE_SET_BITS (condition, TK_READABLE);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK)){
- ACE_SET_BITS (condition, TK_READABLE); // connected, you may write
- ACE_SET_BITS (condition, TK_WRITABLE); // connected, you have data/err
- }
-#else
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK))
- ACE_SET_BITS (condition, TK_READABLE);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::WRITE_MASK))
- ACE_SET_BITS (condition, TK_WRITABLE);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::EXCEPT_MASK))
- ACE_NOTSUP_RETURN(-1);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::ACCEPT_MASK))
- ACE_SET_BITS (condition, TK_READABLE);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK)){
- ACE_SET_BITS (condition, TK_READABLE); // connected, you may write
- ACE_SET_BITS (condition, TK_WRITABLE); // connected, you have data/err
- }
-#endif /* !ACE_WIN32 */
-
- if (condition != 0)
- {
- ACE_TkReactorID *TkID = this->ids_;
-
- while(TkID)
- {
- if (TkID->handle_ == handle)
- {
- ::Tk_DeleteFileHandler (TkID->handle_);
-
- ACE_TkReactor_Input_Callback *callback;
- ACE_NEW_RETURN (callback,
- ACE_TkReactor_Input_Callback,
- -1);
- callback->reactor_ = this;
- callback->handle_ = handle;
- ::Tk_CreateFileHandler ((int) handle,
- condition,
- InputCallbackProc,
- (ClientData) callback);
- return 0;
- }
- else
- TkID = TkID->next_;
- }
-
- ACE_NEW_RETURN (TkID,
- ACE_TkReactorID,
- -1);
- TkID->next_ = this->ids_;
- TkID->handle_ = handle;
- ACE_TkReactor_Input_Callback *callback;
- ACE_NEW_RETURN (callback,
- ACE_TkReactor_Input_Callback,
- -1);
- callback->reactor_ = this;
- callback->handle_ = handle;
-
- ::Tk_CreateFileHandler ((int) handle,
- condition,
- InputCallbackProc,
- (ClientData) callback);
- this->ids_ = TkID;
- }
- return 0;
-}
-
-int
-ACE_TkReactor::register_handler_i (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- return ACE_Select_Reactor::register_handler_i (handles,
- handler,
- mask);
-}
-
-int
-ACE_TkReactor::remove_handler_i (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_TkReactor::remove_handler_i");
-
- // In the registration phase we registered first with
- // ACE_Select_Reactor and then with X. Now we are now doing things
- // in reverse order.
-
- // First clean up the corresponding X11Input.
- this->remove_TkFileHandler (handle);
-
- // Now let the reactor do its work.
- return ACE_Select_Reactor::remove_handler_i (handle,
- mask);
-}
-
-void
-ACE_TkReactor::remove_TkFileHandler (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_TkReactor::remove_TkInput");
-
- ACE_TkReactorID *TkID = this->ids_;
-
- if (TkID)
- {
- if (TkID->handle_ == handle)
- {
- ::Tk_DeleteFileHandler (TkID->handle_);
- this->ids_ = TkID->next_;
- delete TkID;
- return;
- }
-
- ACE_TkReactorID *NextID = TkID->next_;
-
- while (NextID)
- {
- if (NextID->handle_ == handle)
- {
- ::Tk_DeleteFileHandler (NextID->handle_);
- TkID->next_ = NextID->next_;
- delete NextID;
- return;
- }
- else
- {
- TkID = NextID;
- NextID = NextID->next_;
- }
- }
- }
-}
-
-int
-ACE_TkReactor::remove_handler_i (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask mask)
-{
- return ACE_Select_Reactor::remove_handler_i (handles,
- mask);
-}
-
-// The following functions ensure that there is an Tk timeout for the
-// first timeout in the Reactor's Timer_Queue.
-
-void
-ACE_TkReactor::reset_timeout (void)
-{
- if (this->timeout_)
- ::Tk_DeleteTimerHandler (this->timeout_);
- timeout_ = 0;
-
- ACE_Time_Value *max_wait_time =
- this->timer_queue_->calculate_timeout (0);
-
- if (max_wait_time)
- timeout_ = ::Tk_CreateTimerHandler (max_wait_time->msec (),
- TimerCallbackProc,
- (ClientData) this);
-}
-
-int
-ACE_TkReactor::reset_timer_interval
- (long timer_id,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_TkReactor::reset_timer_interval");
- ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token, ace_mon, this->token_, -1));
-
- int result = ACE_Select_Reactor::timer_queue_->reset_interval
- (timer_id,
- interval);
-
- if (result == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return result;
- }
-}
-
-long
-ACE_TkReactor::schedule_timer (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_TkReactor::schedule_timer");
- ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token, ace_mon, this->token_, -1));
-
- long result = ACE_Select_Reactor::schedule_timer (handler,
- arg,
- delta_time,
- interval);
- if (result == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return result;
- }
-}
-
-int
-ACE_TkReactor::cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_TkReactor::cancel_timer");
-
- if (ACE_Select_Reactor::cancel_timer (handler,
- dont_call_handle_close) == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return 0;
- }
-}
-
-int
-ACE_TkReactor::cancel_timer (long timer_id,
- const void **arg,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_TkReactor::cancel_timer");
-
- if (ACE_Select_Reactor::cancel_timer (timer_id,
- arg,
- dont_call_handle_close) == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return 0;
- }
-}
-
-#endif /* ACE_HAS_TK */
diff --git a/ace/TkReactor.h b/ace/TkReactor.h
deleted file mode 100644
index 2c0cca41f52..00000000000
--- a/ace/TkReactor.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// TkReactor.h
-//
-// = AUTHOR
-// Nagarajan Surendran <naga@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_TKREACTOR_H
-#define ACE_TKREACTOR_H
-#include "ace/pre.h"
-
-#include "ace/Select_Reactor.h"
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_TK)
-#include <tk.h>
-
-class ACE_Export ACE_TkReactorID
-{
- // = TITLE
- // This little class is necessary due to the way that Microsoft
- // implements sockets to be pointers rather than indices.
-public:
- ACE_HANDLE handle_;
- // Underlying handle.
-
- ACE_TkReactorID *next_;
- // Pointer to next node in the linked list.
-};
-
-class ACE_TkReactor;
-
-class ACE_Export ACE_TkReactor_Input_Callback
-{
-public:
- ACE_TkReactor *reactor_;
- ACE_HANDLE handle_;
-};
-
-class ACE_Export ACE_TkReactor : public ACE_Select_Reactor
-{
- // = TITLE
- // An object-oriented event demultiplexor and event handler
- // dispatcher that uses the Tk functions.
-public:
- // = Initialization and termination methods.
- ACE_TkReactor (size_t size = DEFAULT_SIZE,
- int restart = 0,
- ACE_Sig_Handler * = 0);
-
- virtual ~ACE_TkReactor (void);
-
- // = Timer operations.
- virtual long schedule_timer (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval);
- virtual int reset_timer_interval (long timer_id,
- const ACE_Time_Value &interval);
- virtual int cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close = 1);
- virtual int cancel_timer (long timer_id,
- const void **arg = 0,
- int dont_call_handle_close = 1);
-
-protected:
- // = Register timers/handles with Tk.
- virtual int register_handler_i (ACE_HANDLE handle,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask);
- // Register a single <handler>.
-
- virtual int register_handler_i (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask);
- // Register a set of <handlers>.
-
- virtual int remove_handler_i (ACE_HANDLE handle,
- ACE_Reactor_Mask mask);
- // Remove the <handler> associated with this <handle>.
-
- virtual int remove_handler_i (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask);
- // Remove a set of <handles>.
-
- virtual void remove_TkFileHandler (ACE_HANDLE handle);
- // Removes an Tk FileHandler.
-
- virtual int wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &,
- ACE_Time_Value *);
- // Wait for events to occur.
-
- virtual int TkWaitForMultipleEvents (int,
- ACE_Select_Reactor_Handle_Set &,
- ACE_Time_Value *);
- //Wait for Tk events to occur.
-
- ACE_TkReactorID *ids_;
- Tk_TimerToken timeout_;
-
-private:
- void reset_timeout (void);
- // This method ensures there's a Tk timeout for the first timeout in
- // the Reactor's Timer_Queue.
-
- // = Integrate with the X callback function mechanism.
- static void TimerCallbackProc (ClientData cd);
- static void InputCallbackProc (ClientData cd,int mask);
-
- ACE_TkReactor (const ACE_TkReactor &);
- ACE_TkReactor &operator = (const ACE_TkReactor &);
- // Deny access since member-wise won't work...
-};
-
-#endif /* ACE_HAS_TK */
-#include "ace/post.h"
-#endif /* ACE_TK_REACTOR_H */
diff --git a/ace/Token.cpp b/ace/Token.cpp
deleted file mode 100644
index 80234f0491d..00000000000
--- a/ace/Token.cpp
+++ /dev/null
@@ -1,571 +0,0 @@
-// $Id$
-
-#include "ace/Thread.h"
-#include "ace/Token.h"
-
-#if defined (DEBUGGING)
-#include "ace/streams.h"
-#endif /* DEBUGGING */
-
-ACE_RCSID(ace, Token, "$Id$")
-
-#if defined (ACE_HAS_THREADS)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Synch_T.h"
-#include "ace/Token.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Token)
-
-
-void
-ACE_Token::dump (void) const
-{
- ACE_TRACE ("ACE_Token::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthread = %d"), ACE_Thread::self ()));
- // @@ Is there a portable way to do this?
- // ACE_DEBUG ((LM_DEBUG, "\nowner_ = %l", (long) this->owner_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nowner_ addr = %x"), &this->owner_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nwaiters_ = %d"), this->waiters_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nin_use_ = %d"), this->in_use_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nnesting level = %d"), this->nesting_level_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-ACE_Token::ACE_Token_Queue_Entry::ACE_Token_Queue_Entry (ACE_Thread_Mutex &m,
- ACE_thread_t t_id)
- : next_ (0),
- thread_id_ (t_id),
-#if defined (ACE_TOKEN_USES_SEMAPHORE)
- cv_ (0),
-#else
- cv_ (m),
-#endif /* ACE_TOKEN_USES_SEMAPHORE */
- runable_ (0)
-{
-#if defined (ACE_TOKEN_USES_SEMAPHORE)
- ACE_UNUSED_ARG (m);
-#endif /* ACE_TOKEN_USES_SEMAPHORE */
-
- ACE_TRACE ("ACE_Token::ACE_Token_Queue_Entry::ACE_Token_Queue_Entry");
-}
-
-ACE_Token::ACE_Token_Queue_Entry::ACE_Token_Queue_Entry (ACE_Thread_Mutex &m,
- ACE_thread_t t_id,
- ACE_Condition_Attributes &attributes)
- : next_ (0),
- thread_id_ (t_id),
-#if defined (ACE_TOKEN_USES_SEMAPHORE)
- cv_ (0),
-#else
- cv_ (m, attributes),
-#endif /* ACE_TOKEN_USES_SEMAPHORE */
- runable_ (0)
-{
-#if defined (ACE_TOKEN_USES_SEMAPHORE)
- ACE_UNUSED_ARG (m);
- ACE_UNUSED_ARG (attributes);
-#endif /* ACE_TOKEN_USES_SEMAPHORE */
-
- ACE_TRACE ("ACE_Token::ACE_Token_Queue_Entry::ACE_Token_Queue_Entry");
-}
-
-ACE_Token::ACE_Token_Queue::ACE_Token_Queue (void)
- : head_ (0),
- tail_ (0)
-{
- ACE_TRACE ("ACE_Token::ACE_Token_Queue::ACE_Token_Queue");
-}
-
-//
-// Remove an entry from the list. Must be called with locks held.
-//
-void
-ACE_Token::ACE_Token_Queue::remove_entry (ACE_Token::ACE_Token_Queue_Entry *entry)
-{
- ACE_TRACE ("ACE_Token::remove_entry");
- ACE_Token_Queue_Entry *curr = 0;
- ACE_Token_Queue_Entry *prev = 0;
-
- if (this->head_ == 0)
- return;
-
- for (curr = this->head_;
- curr != 0 && curr != entry;
- curr = curr->next_)
- prev = curr;
-
- if (curr == 0)
- // Didn't find the entry...
- return;
- else if (prev == 0)
- // Delete at the head.
- this->head_ = this->head_->next_;
- else
- // Delete in the middle.
- prev->next_ = curr->next_;
-
- // We need to update the tail of the list if we've deleted the last
- // entry.
- if (curr->next_ == 0)
- this->tail_ = prev;
-}
-
-//
-// Add an entry into the list. Must be called with locks held.
-//
-void
-ACE_Token::ACE_Token_Queue::insert_entry (ACE_Token::ACE_Token_Queue_Entry &entry,
- int requeue_position)
-{
- if (this->head_ == 0)
- {
- // No other threads - just add me
- this->head_ = &entry;
- this->tail_ = &entry;
- }
- else if (requeue_position == -1)
- {
- // Insert at the end of the queue.
- this->tail_->next_ = &entry;
- this->tail_ = &entry;
- }
- else if (requeue_position == 0)
- {
- // Insert at head of queue.
- entry.next_ = this->head_;
- this->head_ = &entry;
- }
- else
- // Insert in the middle of the queue somewhere.
- {
- // Determine where our thread should go in the queue of waiters.
-
- ACE_Token::ACE_Token_Queue_Entry *insert_after = this->head_;
- while (requeue_position-- && insert_after->next_ != 0)
- insert_after = insert_after->next_;
-
- entry.next_ = insert_after->next_;
-
- if (entry.next_ == 0)
- this->tail_ = &entry;
-
- insert_after->next_ = &entry;
- }
-}
-
-ACE_Token::ACE_Token (const ACE_TCHAR *name, void *any)
- : lock_ (name, (ACE_mutexattr_t *) any),
- owner_ (ACE_OS::NULL_thread),
- in_use_ (0),
- waiters_ (0),
- nesting_level_ (0),
- signal_all_threads_ (0),
- attributes_ (USYNC_THREAD)
-{
-// ACE_TRACE ("ACE_Token::ACE_Token");
-}
-
-ACE_Token::~ACE_Token (void)
-{
- ACE_TRACE ("ACE_Token::~ACE_Token");
-}
-
-int
-ACE_Token::shared_acquire (void (*sleep_hook_func)(void *),
- void *arg,
- ACE_Time_Value *timeout,
- ACE_Token_Op_Type op_type)
-{
- ACE_TRACE ("ACE_Token::shared_acquire");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
-
-#if defined (DEBUGGING)
- this->dump ();
-#endif /* DEBUGGING */
-
- ACE_thread_t thr_id = ACE_Thread::self ();
-
- // Nobody holds the token.
- if (!this->in_use_)
- {
- // Its mine!
- this->in_use_ = op_type;
- this->owner_ = thr_id;
- return 0;
- }
-
- //
- // Someone already holds the token.
- //
-
- // Check if it is us.
- if (ACE_OS::thr_equal (thr_id, this->owner_))
- {
- this->nesting_level_++;
- return 0;
- }
-
- // Do a quick check for "polling" behavior.
- if (timeout != 0 && timeout->sec () == 0 && timeout->usec () == 0)
- {
- errno = ETIME;
- return -1;
- }
-
- //
- // We've got to sleep until we get the token.
- //
-
- // Which queue we should end up in...
- ACE_Token_Queue *queue = (op_type == ACE_Token::READ_TOKEN
- ? &this->readers_
- : &this->writers_);
-
- // Allocate queue entry on stack. This works since we don't exit
- // this method's activation record until we've got the token.
- ACE_Token::ACE_Token_Queue_Entry my_entry (this->lock_,
- thr_id,
- this->attributes_);
- queue->insert_entry (my_entry);
- this->waiters_++;
-
- // Execute appropriate <sleep_hook> callback. (@@ should these
- // methods return a success/failure status, and if so, what should
- // we do with it?)
- int ret = 0;
- if (sleep_hook_func)
- {
- (*sleep_hook_func) (arg);
- ret++;
- }
- else
- {
- // Execute virtual method.
- this->sleep_hook ();
- ret++;
- }
-
- int timed_out = 0;
- int error = 0;
-
- // Sleep until we've got the token (ignore signals).
- do
- {
- int result = my_entry.wait (timeout,
- this->lock_);
-
- if (result == -1)
- {
- // Note, this should obey whatever thread-specific interrupt
- // policy is currently in place...
- if (errno == EINTR)
- continue;
-
-#if defined (DEBUGGING)
- cerr << '(' << ACE_Thread::self () << ')'
- << " acquire: "
- << (errno == ETIME ? "timed out" : "error occurred")
- << endl;
-#endif /* DEBUGGING */
-
- // We come here if a timeout occurs or some serious
- // ACE_Condition object error.
- if (errno == ETIME)
- timed_out = 1;
- else
- error = 1;
-
- // Stop the loop.
- break;
- }
- }
- while (!ACE_OS::thr_equal (thr_id, this->owner_));
-
- // Do this always and irrespective of the result of wait().
- this->waiters_--;
- queue->remove_entry (&my_entry);
-
-#if defined (DEBUGGING)
- cerr << '(' << ACE_Thread::self () << ')'
- << " acquire (UNBLOCKED)" << endl;
-#endif /* DEBUGGING */
-
- // If timeout occured
- if (timed_out)
- {
- // This thread was still selected to own the token.
- if (my_entry.runable_)
- {
- // Wakeup next waiter since this thread timed out.
- this->wakeup_next_waiter ();
- }
-
- // Return error.
- return -1;
- }
- else if (error)
- {
- // Return error.
- return -1;
- }
- else
- {
- // If this is a normal wakeup, this thread should be runnable.
- ACE_ASSERT (my_entry.runable_);
-
- if (this->signal_all_threads_ != 0)
- return 2;
- else
- return ret;
- }
-}
-
-// By default this is a no-op.
-
-/* virtual */
-void
-ACE_Token::sleep_hook (void)
-{
- ACE_TRACE ("ACE_Token::sleep_hook");
-}
-
-int
-ACE_Token::acquire (ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Token::acquire");
- return this->shared_acquire (0, 0, timeout, ACE_Token::WRITE_TOKEN);
-}
-
-// Acquire the token, sleeping until it is obtained or until <timeout>
-// expires.
-
-int
-ACE_Token::acquire (void (*sleep_hook_func)(void *),
- void *arg,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Token::acquire");
- return this->shared_acquire (sleep_hook_func, arg, timeout, ACE_Token::WRITE_TOKEN);
-}
-
-// Try to renew the token.
-
-int
-ACE_Token::renew (int requeue_position,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Token::renew");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
-
-#if defined (DEBUGGING)
- this->dump ();
-#endif /* DEBUGGING */
- // ACE_ASSERT (ACE_OS::thr_equal (ACE_Thread::self (), this->owner_));
-
- //
- // Check to see if there are any waiters worth giving up the lock
- // for.
- //
-
- // If no writers and either we are a writer or there are no readers.
- if (this->writers_.head_ == 0 &&
- (this->in_use_ == ACE_Token::WRITE_TOKEN &&
- this->readers_.head_ == 0))
- // Immediate return.
- return 0;
-
- //
- // We've got to sleep until we get the token again.
- //
-
- // Determine which queue should this thread go to.
- ACE_Token::ACE_Token_Queue *this_threads_queue =
- this->in_use_ == ACE_Token::READ_TOKEN ?
- &this->readers_ : &this->writers_;
-
- ACE_Token::ACE_Token_Queue_Entry my_entry (this->lock_,
- this->owner_);
-
- this_threads_queue->insert_entry (my_entry,
- requeue_position);
- this->waiters_++;
-
- // Remember nesting level...
- int save_nesting_level_ = this->nesting_level_;
-
- // Reset state for new owner.
- this->nesting_level_ = 0;
-
- // Wakeup waiter.
- this->wakeup_next_waiter ();
-
- int timed_out = 0;
- int error = 0;
-
- // Sleep until we've got the token (ignore signals).
- do
- {
- int result = my_entry.wait (timeout,
- this->lock_);
-
- if (result == -1)
- {
- // Note, this should obey whatever thread-specific interrupt
- // policy is currently in place...
- if (errno == EINTR)
- continue;
-
-#if defined (DEBUGGING)
- cerr << '(' << ACE_Thread::self () << ')'
- << " renew: "
- << (errno == ETIME ? "timed out" : "error occurred")
- << endl;
-#endif /* DEBUGGING */
-
- // We come here if a timeout occurs or some serious
- // ACE_Condition object error.
- if (errno == ETIME)
- timed_out = 1;
- else
- error = 1;
-
- // Stop the loop.
- break;
- }
- }
- while (!ACE_OS::thr_equal (my_entry.thread_id_, this->owner_));
-
- // Do this always and irrespective of the result of wait().
- this->waiters_--;
- this_threads_queue->remove_entry (&my_entry);
-
-#if defined (DEBUGGING)
- cerr << '(' << ACE_Thread::self () << ')'
- << " acquire (UNBLOCKED)" << endl;
-#endif /* DEBUGGING */
-
- // If timeout occured
- if (timed_out)
- {
- // This thread was still selected to own the token.
- if (my_entry.runable_)
- {
- // Wakeup next waiter since this thread timed out.
- this->wakeup_next_waiter ();
- }
-
- // Return error.
- return -1;
- }
- else if (error)
- {
- // Return error.
- return -1;
- }
- else
- {
- // If this is a normal wakeup, this thread should be runnable.
- ACE_ASSERT (my_entry.runable_);
-
- // Reinstate nesting level.
- this->nesting_level_ = save_nesting_level_;
-
- if (this->signal_all_threads_ != 0)
- return 2;
- else
- return 0;
- }
-}
-
-// Release the current holder of the token (which had
-// better be the caller's thread!).
-
-int
-ACE_Token::release (void)
-{
- ACE_TRACE ("ACE_Token::release");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
-
- // ACE_ASSERT (ACE_OS::thr_equal (ACE_Thread::self (), this->owner_));
-
-#if defined (DEBUGGING)
- this->dump ();
-#endif /* DEBUGGING */
-
- // Nested release...
- if (this->nesting_level_ > 0)
- --this->nesting_level_;
- else
- {
- //
- // Regular release...
- //
-
- // Wakeup waiter.
- this->wakeup_next_waiter ();
- }
-
- return 0;
-}
-
-void
-ACE_Token::wakeup_next_waiter (void)
-{
- ACE_TRACE ("ACE_Token::wakeup_next_waiter");
-
- // Reset state for new owner.
- this->owner_ = ACE_OS::NULL_thread;
- this->in_use_ = 0;
-
- // Any waiters...
- if (this->writers_.head_ == 0 &&
- this->readers_.head_ == 0)
- {
- // No more waiters...
- this->signal_all_threads_ = 0;
- return;
- }
-
- // Wakeup next waiter.
- ACE_Token_Queue *queue;
-
- // Writer threads get priority to run first.
- if (this->writers_.head_ != 0)
- {
- this->in_use_ = ACE_Token::WRITE_TOKEN;
- queue = &this->writers_;
- }
- else
- {
- this->in_use_ = ACE_Token::READ_TOKEN;
- queue = &this->readers_;
- }
-
- // Wake up waiter and make it runable.
- queue->head_->runable_ = 1;
- queue->head_->signal ();
-
- this->owner_ = queue->head_->thread_id_;
-}
-
-int
-ACE_Token::signal_all_threads (void)
-{
- ACE_TRACE ("ACE_Token::release");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
-
- if (this->waiters_ != 0)
- this->signal_all_threads_ = 1;
- return this->waiters_;
-}
-
-#endif /* ACE_HAS_THREADS */
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Token.h b/ace/Token.h
deleted file mode 100644
index 23fe558cade..00000000000
--- a/ace/Token.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Token.h
-//
-// = AUTHOR
-// Original author -- Karl-Heinz Dorn (kdorn@erlh.siemens.de)
-// Ported to ACE by Douglas C. Schmidt (schmidt@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_TOKEN_H
-#define ACE_TOKEN_H
-#include "ace/pre.h"
-
-#include "ace/Synch.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_THREADS)
-
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || defined (VXWORKS) || defined (ACE_PSOS)
-// If platforms support semaphores with timed wait, then we use semaphores instead of c.v.
-# define ACE_TOKEN_USES_SEMAPHORE
-#endif /* (ACE_WIN32 && !ACE_HAS_WINCE) || VXWORKS || ACE_PSOS */
-
-class ACE_Export ACE_Token
-{
- // = TITLE
- // Class that acquires, renews, and releases a synchronization
- // token that is serviced in strict FIFO ordering and that also
- // supports (1) recursion and (2) readers/writer semantics.
- //
- // = DESCRIPTION This class is a more general-purpose
- // synchronization mechanism than SunOS 5.x mutexes. For example,
- // it implements "recursive mutex" semantics, where a thread that
- // owns the token can reacquire it without deadlocking. If the same
- // thread calls <acquire> multiple times, however, it must call
- // <release> an equal number of times before the token is actually
- // released.
- //
- // Threads that are blocked awaiting the token are serviced in
- // strict FIFO order as other threads release the token (Solaris and
- // Pthread mutexes don't strictly enforce an acquisition order).
- // There are two FIFO lists within the class. Write acquires always
- // have higher priority over read acquires. Which means, if you use
- // both write/read operations, care must be taken to avoid
- // starvation on the readers. Notice that the read/write acquire
- // operations do not have the usual semantic of reader/writer locks.
- // Only one reader can acquire the token at a time (which is
- // different from the usual reader/writer locks where several
- // readers can acquire a lock at the same time as long as there is
- // no writer waiting for the lock.) We choose the names 1.) to
- // borrow the semantic to give writers higher priority, and, 2.) to
- // support a common interface over all locking classes in ACE.
-public:
- // = Initialization and termination.
-
- ACE_Token (const ACE_TCHAR *name = 0, void * = 0);
- virtual ~ACE_Token (void);
-
- // = Synchronization operations.
-
- int acquire (void (*sleep_hook)(void *),
- void *arg = 0,
- ACE_Time_Value *timeout = 0);
- // Acquire the token, sleeping until it is obtained or until the
- // expiration of <timeout>, which is treated as "absolute" time. If
- // some other thread currently holds the token then <sleep_hook> is
- // called before our thread goes to sleep. This <sleep_hook> can be
- // used by the requesting thread to unblock a token-holder that is
- // sleeping, e.g., by means of writing to a pipe (the ACE
- // ACE_Reactor uses this functionality). Return values: 0 if
- // acquires without calling <sleep_hook> 1 if <sleep_hook> is
- // called. 2 if the token is signaled. -1 if failure or timeout
- // occurs (if timeout occurs errno == ETIME) If <timeout> ==
- // <&ACE_Time_Value::zero> then acquire has polling semantics (and
- // does *not* call <sleep_hook>).
-
- int acquire (ACE_Time_Value *timeout = 0);
- // This behaves just like the previous <acquire> method, except that
- // it invokes the virtual function called <sleep_hook> that can be
- // overridden by a subclass of ACE_Token.
-
- virtual void sleep_hook (void);
- // This should be overridden by a subclass to define the appropriate
- // behavior before <acquire> goes to sleep. By default, this is a
- // no-op...
-
- int renew (int requeue_position = 0,
- ACE_Time_Value *timeout = 0);
- // An optimized method that efficiently reacquires the token if no
- // other threads are waiting. This is useful for situations where
- // you don't want to degrad the quality of service if there are
- // other threads waiting to get the token. If <requeue_position> ==
- // -1 and there are other threads waiting to obtain the token we are
- // queued at the end of the list of waiters. If <requeue_position>
- // > -1 then it indicates how many entries to skip over before
- // inserting our thread into the list of waiters (e.g.,
- // <requeue_position> == 0 means "insert at front of the queue").
- // Renew has the rather odd semantics such that if there are other
- // waiting threads it will give up the token even if the
- // nesting_level_ > 1. I'm not sure if this is really the right
- // thing to do (since it makes it possible for shared data to be
- // changed unexpectedly) so use with caution... This method
- // maintians the original token priority. As in <acquire>, the
- // <timeout> value is an absolute time.
-
- int tryacquire (void);
- // Become interface-compliant with other lock mechanisms (implements
- // a non-blocking <acquire>).
-
- int remove (void);
- // Shuts down the ACE_Token instance.
-
- int release (void);
- // Relinquish the token. If there are any waiters then the next one
- // in line gets it.
-
- int acquire_read (void);
- // Behave like acquire but in a lower priority. It should probably
- // be called acquire_yield.
-
- int acquire_read (void (*sleep_hook)(void *),
- void *arg = 0,
- ACE_Time_Value *timeout = 0);
- // More sophisticate version of acquire_read.
-
- int acquire_write (void);
- // Just calls <acquire>.
-
- int acquire_write (void (*sleep_hook)(void *),
- void *arg = 0,
- ACE_Time_Value *timeout = 0);
- // More sophisticate version of acquire_write.
-
- int tryacquire_read (void);
- // Lower priority try_acquire.
-
- int tryacquire_write (void);
- // Just calls <tryacquire>.
-
- // = Accessor methods.
-
- int waiters (void);
- // Return the number of threads that are currently waiting to get
- // the token.
-
- ACE_thread_t current_owner (void);
- // Return the id of the current thread that owns the token.
-
- int signal_all_threads (void);
- // Force all threads waiting to acquire the token to return one by
- // one. The method sets the <signal_all_thread_> to non-zero if
- // there're threads waiting, and returns the number of threads
- // waiting. If there's no thread waiting for the token, the call
- // returns 0 and doesn't do anything. The last thread releases the
- // token also reset the <singal_all_thread_> flag to 0. This means,
- // any threads that try to acquire the token after the call is
- // issued will also get "signaled" and the number of threads waiting
- // the token is only a snapshot.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- // = The following structure implements a ACE_FIFO of waiter threads
- // that are asleep waiting to obtain the token.
-
- struct ACE_Token_Queue_Entry
- {
- ACE_Token_Queue_Entry (ACE_Thread_Mutex &m,
- ACE_thread_t t_id);
- // Constructor
-
- ACE_Token_Queue_Entry (ACE_Thread_Mutex &m,
- ACE_thread_t t_id,
- ACE_Condition_Attributes &attributes);
- // Constructor using a pre-allocated attributes
-
- int wait (ACE_Time_Value *timeout, ACE_Thread_Mutex &lock);
- // Entry blocks on the token.
-
- int signal (void);
- // Notify (unblock) the entry.
-
- ACE_Token_Queue_Entry *next_;
- // Pointer to next waiter.
-
- ACE_thread_t thread_id_;
- // ACE_Thread id of this waiter.
-
-#if defined (ACE_TOKEN_USES_SEMAPHORE)
- ACE_Semaphore cv_;
- // ACE_Semaphore object used to wake up waiter when it can run again.
-#else
- ACE_Condition_Thread_Mutex cv_;
- // ACE_Condition object used to wake up waiter when it can run again.
-#endif /* ACE_TOKEN_USES_SEMAPHORE */
-
- int runable_;
- // Ok to run.
- };
-
-private:
- enum ACE_Token_Op_Type
- {
- READ_TOKEN = 1,
- WRITE_TOKEN
- };
-
- struct ACE_Token_Queue
- {
- ACE_Token_Queue (void);
-
- void remove_entry (ACE_Token_Queue_Entry *);
- // Remove a waiter from the queue.
-
- void insert_entry (ACE_Token_Queue_Entry &entry,
- int requeue_position = -1);
- // Insert a waiter into the queue.
-
- ACE_Token_Queue_Entry *head_;
- // Head of the list of waiting threads.
-
- ACE_Token_Queue_Entry *tail_;
- // Tail of the list of waiting threads.
- };
-
- int shared_acquire (void (*sleep_hook_func)(void *),
- void *arg,
- ACE_Time_Value *timeout,
- ACE_Token_Op_Type op_type);
- // Implements the <acquire> and <tryacquire> methods above.
-
- void wakeup_next_waiter (void);
- // Wake next in line for ownership.
-
- ACE_Token_Queue writers_;
- // A queue of writer threads.
-
- ACE_Token_Queue readers_;
- // A queue of reader threads.
-
- ACE_Thread_Mutex lock_;
- // ACE_Thread_Mutex used to lock internal data structures.
-
- ACE_thread_t owner_;
- // Current owner of the token.
-
- int in_use_;
- // Some thread (i.e., <owner_>) is using the token. We need this
- // extra variable to deal with POSIX pthreads madness...
-
- int waiters_;
- // Number of waiters.
-
- int nesting_level_;
- // Current nesting level.
-
- int signal_all_threads_;
- // Whether we are "signaling" all threads or not.
-
- ACE_Condition_Attributes attributes_;
- // The attributes for the condition variables, optimizes lock time.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Synch_T.h"
-#include "ace/Token.i"
-#endif /* __ACE_INLINE__ */
-#else
-class ACE_Export ACE_Token
-{
-public:
- int acquire (ACE_Time_Value * = 0) { ACE_NOTSUP_RETURN (-1); }
- int tryacquire (void) { ACE_NOTSUP_RETURN (-1); }
- int remove (void) { ACE_NOTSUP_RETURN (-1); }
- int release (void) { ACE_NOTSUP_RETURN (-1); }
-};
-#endif /* ACE_HAS_THREADS */
-#include "ace/post.h"
-#endif /* ACE_TOKEN_H */
diff --git a/ace/Token.i b/ace/Token.i
deleted file mode 100644
index e67e447fffa..00000000000
--- a/ace/Token.i
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Token.i
-
-ACE_INLINE int
-ACE_Token::remove (void)
-{
- ACE_TRACE ("ACE_Token::remove");
- // Don't have an implementation for this yet...
- ACE_NOTSUP_RETURN (-1);
-}
-
-ACE_INLINE int
-ACE_Token::tryacquire (void)
-{
- ACE_TRACE ("ACE_Token::tryacquire");
- return this->shared_acquire
- (0, 0, (ACE_Time_Value *) &ACE_Time_Value::zero, ACE_Token::WRITE_TOKEN);
-}
-
-ACE_INLINE int
-ACE_Token::waiters (void)
-{
- ACE_TRACE ("ACE_Token::waiters");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1);
-
- int ret = this->waiters_;
- return ret;
-}
-
-ACE_INLINE ACE_thread_t
-ACE_Token::current_owner (void)
-{
- ACE_TRACE ("ACE_Token::current_owner");
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, this->owner_);
-
- return this->owner_;
-}
-
-ACE_INLINE int
-ACE_Token::acquire_read (void)
-{
- ACE_TRACE ("ACE_Token::acquire_read");
- return this->shared_acquire
- (0, 0, 0, ACE_Token::READ_TOKEN);
-}
-
-ACE_INLINE int
-ACE_Token::acquire_write (void)
-{
- ACE_TRACE ("ACE_Token::acquire_write");
- return this->shared_acquire
- (0, 0, 0, ACE_Token::WRITE_TOKEN);
-}
-
-ACE_INLINE int
-ACE_Token::tryacquire_read (void)
-{
- ACE_TRACE ("ACE_Token::tryacquire_read");
- return this->shared_acquire
- (0, 0, (ACE_Time_Value *) &ACE_Time_Value::zero, ACE_Token::READ_TOKEN);
-}
-
-ACE_INLINE int
-ACE_Token::acquire_read (void (*sleep_hook_func)(void *),
- void *arg,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Token::acquire_read");
- return this->shared_acquire (sleep_hook_func, arg, timeout, ACE_Token::READ_TOKEN);
-}
-
-ACE_INLINE int
-ACE_Token::tryacquire_write (void)
-{
- ACE_TRACE ("ACE_Token::tryacquire_write");
- return this->shared_acquire
- (0, 0, (ACE_Time_Value *) &ACE_Time_Value::zero, ACE_Token::WRITE_TOKEN);
-}
-
-ACE_INLINE int
-ACE_Token::acquire_write (void (*sleep_hook_func)(void *),
- void *arg,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_Token::acquire_write");
- return this->shared_acquire (sleep_hook_func, arg, timeout, ACE_Token::WRITE_TOKEN);
-}
-
-ACE_INLINE int
-ACE_Token::ACE_Token_Queue_Entry::wait (ACE_Time_Value *timeout, ACE_Thread_Mutex &lock)
-{
-#if defined (ACE_TOKEN_USES_SEMAPHORE)
- lock.release ();
- int retv = (timeout == 0 ?
- this->cv_.acquire () :
- this->cv_.acquire (*timeout));
- lock.acquire ();
- return retv;
-#else
- ACE_UNUSED_ARG (lock);
- return this->cv_.wait (timeout);
-#endif /* ACE_TOKEN_USES_SEMAPHORE */
-}
-
-ACE_INLINE int
-ACE_Token::ACE_Token_Queue_Entry::signal (void)
-{
- return
-#if defined (ACE_TOKEN_USES_SEMAPHORE)
- this->cv_.release ();
-#else
- this->cv_.signal ();
-#endif /* ACE_TOKEN_USES_SEMAPHORE */
-}
diff --git a/ace/Token_Collection.cpp b/ace/Token_Collection.cpp
deleted file mode 100644
index 56eab4f134d..00000000000
--- a/ace/Token_Collection.cpp
+++ /dev/null
@@ -1,302 +0,0 @@
-// Token_Collection.cpp
-// $Id$
-
-#include "ace/Token_Collection.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Token_Collection.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Token_Collection, "$Id$")
-
-ACE_Token_Collection::ACE_Token_Collection (int debug,
- const ACE_TCHAR *name)
-: debug_ (debug)
-{
- ACE_TRACE ("ACE_Token_Collection::ACE_Token_Collection");
-
- if (name == 0)
- name = ACE_TEXT ("no name");
-
- int n = ACE_OS::strlen (name) + 1;
-
- if (n >= ACE_MAXTOKENNAMELEN)
- n = ACE_MAXTOKENNAMELEN - 1;
-
- ACE_OS::strncpy (this->name_, ACE_const_cast (ACE_TCHAR*, name), n);
- this->name_[ACE_MAXTOKENNAMELEN - 1] = '\0';
-}
-
-int
-ACE_Token_Collection::insert (ACE_Token_Proxy &new_token)
-{
- ACE_TRACE ("ACE_Token_Collection::insert");
-
- TOKEN_NAME name (new_token.name ());
-
- // Check if the new_proxy is already in the list.
- if (collection_.find (name) == 1)
- // One already exists, so fail.
- return -1;
-
- // Clone the new token.
- ACE_Token_Proxy *temp = new_token.clone ();
-
- if (collection_.bind (name, temp) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("bind failed\n")), -1);
- return 0;
-}
-
-int
-ACE_Token_Collection::extract (const ACE_TCHAR *token_name, ACE_Token_Proxy *&proxy)
-{
- ACE_TRACE ("ACE_Token_Collection::extract");
- TOKEN_NAME name (token_name);
- return collection_.unbind (token_name, proxy);
-}
-
-ACE_Token_Proxy *
-ACE_Token_Collection::is_member (const ACE_TCHAR *token_name)
-{
- ACE_TRACE ("ACE_Token_Collection::is_member");
- TOKEN_NAME name (token_name);
- ACE_Token_Proxy *temp;
- // Get the token from the collection.
- return collection_.find (name, temp) == -1 ? 0 : temp;
-}
-
-int
-ACE_Token_Collection::is_member (const ACE_Token_Proxy &token)
-{
- ACE_TRACE ("ACE_Token_Collection::is_member");
- TOKEN_NAME token_name (token.name ());
- return collection_.find (token_name) == 0;
-}
-
-int
-ACE_Token_Collection::acquire (int notify,
- void (*sleep_hook)(void *),
- ACE_Synch_Options &options)
-{
- ACE_TRACE ("ACE_Token_Collection::acquire");
-
- COLLECTION_ITERATOR iterator (collection_);
-
- for (COLLECTION_ENTRY *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- if (debug_)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("collection acquiring %s\n"),
- temp->int_id_->name ()));
- if (temp->int_id_->acquire (notify,
- sleep_hook,
- options) == -1)
- {
- // Save/restore errno.
- ACE_Errno_Guard error (errno);
- this->release ();
- ACE_RETURN (-1);
- }
- }
-
- return 0;
-}
-
-int
-ACE_Token_Collection::acquire (const ACE_TCHAR *token_name,
- int notify,
- void (*sleep_hook)(void *),
- ACE_Synch_Options &options)
-{
- ACE_TRACE ("ACE_Token_Collection::acquire");
- TOKEN_NAME name (token_name);
- ACE_Token_Proxy *temp;
- // Get the token from the collection.
- int result = collection_.find (name, temp);
- // did we find it?
- if (result == -1)
- return result;
- // perform the operation
- return temp->acquire (notify, sleep_hook, options);
-}
-
-
-int
-ACE_Token_Collection::tryacquire (const ACE_TCHAR *token_name,
- void (*sleep_hook)(void *))
-{
- ACE_TRACE ("ACE_Token_Collection::tryacquire");
- TOKEN_NAME name (token_name);
- ACE_Token_Proxy *temp;
- // Get the token from the collection.
- int result = collection_.find (name, temp);
- // did we find it?
- if (result == -1)
- return result;
-
- // perform the operation
- return temp->tryacquire (sleep_hook);
-}
-
-int
-ACE_Token_Collection::tryacquire (void (*sleep_hook)(void *))
-{
- ACE_TRACE ("ACE_Token_Collection::tryacquire");
-
- COLLECTION_ITERATOR iterator (collection_);
-
- for (COLLECTION_ENTRY *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- if (debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("collection acquiring %s\n"),
- temp->int_id_->name ()));
- // We will fail if _any_ token is not free.
- if (temp->int_id_->tryacquire (sleep_hook) == -1)
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_Token_Collection::renew (int requeue_position,
- ACE_Synch_Options &options)
-{
- ACE_TRACE ("ACE_Token_Collection::renew");
-
- COLLECTION_ITERATOR iterator (collection_);
-
- for (COLLECTION_ENTRY *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- if (debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("collection renewing %s\n"),
- temp->int_id_->name ()));
- if (temp->int_id_->renew (requeue_position, options) == -1)
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_Token_Collection::renew (const ACE_TCHAR *token_name,
- int requeue_position,
- ACE_Synch_Options &options)
-{
- ACE_TRACE ("ACE_Token_Collection::renew");
- TOKEN_NAME name (token_name);
- ACE_Token_Proxy *temp;
-
- // Get the token from the collection.
- int result = collection_.find (name, temp);
-
- // Did we find it?
- if (result == -1)
- ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT ("%p %s\n"),
- ACE_TEXT ("not in collection "),
- token_name), -1);
- // perform the operation
- return temp->renew (requeue_position, options);
-}
-
-int
-ACE_Token_Collection::release (ACE_Synch_Options &)
-
-{
- ACE_TRACE ("ACE_Token_Collection::release");
- COLLECTION_ITERATOR iterator (collection_);
-
- for (COLLECTION_ENTRY *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- if (debug_)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("collection releasing %s\n"),
- temp->int_id_->name ()));
- temp->int_id_->release ();
- }
-
- return 0;
-}
-
-int
-ACE_Token_Collection::release (const ACE_TCHAR *token_name,
- ACE_Synch_Options &options)
-{
- ACE_TRACE ("ACE_Token_Collection::release");
- TOKEN_NAME name (token_name);
- ACE_Token_Proxy *temp;
- // get the token from the collection
- int result = collection_.find (name, temp);
- // did we find it?
- if (result != 0)
- return result;
- // perform the operation
- return temp->release (options);
-}
-
-ACE_Token_Collection::~ACE_Token_Collection (void)
-{
- ACE_TRACE ("ACE_Token_Collection::~ACE_Token_Collection");
- COLLECTION_ITERATOR iterator (collection_);
-
- for (COLLECTION_ENTRY *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- delete temp->int_id_;
- // The ext_id_'s delete themselves when the array of
- // COLLECTION_ENTRYs goes away.
- }
-}
-
-
-// This method doesn't mean anything for a collection.
-ACE_Token_Proxy *
-ACE_Token_Collection::clone (void) const
-{
- ACE_TRACE ("ACE_Token_Collection::clone");
- return (ACE_Token_Proxy *) 0;
-}
-
-// This method doesn't mean anything for a collection.
-ACE_Tokens *
-ACE_Token_Collection::create_token (const ACE_TCHAR *)
-{
- ACE_TRACE ("ACE_Token_Collection::create_token");
- return (ACE_Tokens *) 0;
-}
-
-void
-ACE_Token_Collection::dump (void) const
-{
- ACE_TRACE ("ACE_Token_Collection::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Collection::dump:\n")
- ACE_TEXT (" debug_ = %d\n"), debug_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("collection_\n")));
- collection_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n")));
- ACE_Token_Proxy::dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Map_Manager<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>;
-template class ACE_Map_Entry<ACE_Token_Name, ACE_Token_Proxy *>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Map_Manager<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_Token_Proxy *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Entry<ACE_Token_Name, ACE_Token_Proxy *>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Token_Collection.h b/ace/Token_Collection.h
deleted file mode 100644
index 247dec47cd1..00000000000
--- a/ace/Token_Collection.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Token_Collection.h
-//
-// = DESCRIPTION
-// The ACE_Token class offers methods for acquiring, renewing,
-// and releasing a synchronization token on a per-token basis. The
-// ACE_Token_Collection offers an interface for performing
-// operations on groups of tokens as a whole, or on a single token
-// within the collection.
-//
-// The atomic group operations are not yet implemented.
-//
-// = AUTHOR
-// Douglas C. Schmidt (schmidt@cs.wustl.edu) and
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_TOKEN_COLLECTION_H
-#define ACE_TOKEN_COLLECTION_H
-#include "ace/pre.h"
-
-#include "ace/Map_Manager.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Local_Tokens.h"
-#include "ace/SString.h"
-
-class ACE_Export ACE_Token_Collection : public ACE_Token_Proxy
-{
- // = TITLE
- // Allows atomic token group operations AND
- // provides a ACE_Token manager interface.
- //
- // = DESCRIPTION
- // There are two types of operations offered by
- // ACE_Token_Collection. The first is atomic operations on
- // collections of Token_Proxies. In this respect, the
- // ACE_Token_Collection can be thought of as a single token
- // consisting of multiple Token_Proxies. The second role of the
- // ACE_Token_Collection is as a ACE_Token manager.
- // ACE_Token_Collection allows individual operations on single
- // members of a collection of Token_Proxies. This provides a
- // single access point for operations on multiple tokens.
-
- // = BUGS
- // Although ACE_Token_Collection inherits from ACE_Token_Proxy, it
- // can not be including in a collection. This is because <clone>
- // returns zero for now.
-public:
- ACE_Token_Collection (int debug = 0,
- const ACE_TCHAR *name = 0);
- // <debug> print out verbose debugging messages. <name> will give a
- // name to the collection. Collections don't really need names, but
- // are sometimes useful for debugging.
-
-// Collection Management operations
-
- int insert (ACE_Token_Proxy &token);
-
- // Insert a Token into the collection. All ACE_Token type
- // operations performed on the collection will also be performed on
- // the new_proxy until it is removed. Note that no operations
- // performed prior to the insertion will be performed. Returns: 0
- // on success, -1 on failure with <errno> == problem. If a token
- // proxy already exists in the collection with the same name, the
- // insertion will fail. Also, <token> is copied. Note that during
- // the copy, client_id's are *not* inherited. The client ID of the
- // thread using the collection will be used. Client ID's can be
- // changed explicity on each proxy using is_member.
-
- int extract (const ACE_TCHAR *token_name, ACE_Token_Proxy *&proxy);
- // removes the ACE_Token matching the given token_name from the
- // collection. On success, extract returns 0. On failure
- // (token_name was not in the collection,) extract returns -1. On
- // success, the state of the token found is copied into proxy.
- // The returned ACE_Token_Proxy* must be deleted by the user.
-
- ACE_Token_Proxy *is_member (const ACE_TCHAR *token_name);
- // returns the proxy if true. 0 otherwise.
-
- int is_member (const ACE_Token_Proxy &token);
- // Is the specified token in the collection?
- // 1, yes.
- // 0, no.
-
-// = Collective operation semantics.
-
-// For acquire, renew, and release, there are two interfaces. Once
-// interface allows an operation on a single token in the
-// collection. The collective interfaces perform atomic operations
-// on the entire collection. For instance, a collective acquire
-// will perform an acquire for each and every token in the
-// collection or the operation will fail. Currently, these
-// operations are performed with no ordering heuristics. That is,
-// the Collection steps through the tokens in the order they were
-// inserted. For each one it performs the operation (acquire,
-// renew, or release).
-
- virtual int acquire (int notify = 0,
- void (*sleep_hook)(void *) = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Acquire "atomically" all resources in the collection. This is
- // only successfull if all tokens in the collection could be
- // acquired. options contains the blocking semantics, timeout
- // value, etc. Returns: 0 on success, -1 on failure with <errno> ==
- // problem. If and error or deadlock occurs for one of the tokens,
- // all the tokens will be released and the method will return -1.
- // Note that returning on detection of deadlock prevents livelock
- // between competing collections. If a collection returns after
- // detecting deadlock, it is the application's responsibility to not
- // to blindly loop on the collection::acquire operation. In other
- // words, once the collection reports deadlock, it is out of our
- // hands.
-
- virtual int acquire (const ACE_TCHAR *token_name,
- int notify = 0,
- void (*sleep_hook)(void *) = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Acquire the token corresponding to <token_name>. The other
- // parameters are passed to <token>::acquire.
-
- virtual int tryacquire (void (*sleep_hook)(void *) = 0);
- // Try to acquire all tokens in collection.
-
- virtual int tryacquire (const ACE_TCHAR *token_name,
- void (*sleep_hook)(void *) = 0);
- // Try to acquire <token_name>.
-
- virtual int renew (int requeue_position = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Renews "atomically" all resources in the collection. This is
- // only successfull if all tokens in the collection could be
- // renewed. options contains the blocking semantics, timeout
- // value, etc. Returns: 0 on success, -1 on failure with <errno> ==
- // problem.
-
-
- virtual int renew (const ACE_TCHAR *token_name,
- int requeue_position = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Renew the token corresponding to <token_name>. The other
- // parameters are passed to <token>::renew.
-
- virtual int release (ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Releases "atomically" all resources in the collection. This is
- // only successfull if all tokens in the collection could be
- // released. options contains the blocking semantics, timeout
- // value, etc. Returns: 0 on success, -1 on failure with <errno> ==
- // problem.
-
-
- virtual int release (const ACE_TCHAR *token_name,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
- // Release the token corresponding to <token_name>. The other
- // parameters are passed to <token>::release.
-
- ~ACE_Token_Collection (void);
-
- void dump (void) const;
- // Dump the state of the class.
-
- virtual const ACE_TCHAR *name (void) const;
- // Return the name of the collection. Not very functionally
- // important, but sometimes a useful debugging tool.
-
-protected:
-
- typedef ACE_Token_Name TOKEN_NAME;
-
- typedef ACE_Map_Manager<TOKEN_NAME, ACE_Token_Proxy *, ACE_Null_Mutex>
- COLLECTION;
- // COLLECTION maintains a mapping from token names to ACE_Tokens*
-
- typedef ACE_Map_Iterator<TOKEN_NAME, ACE_Token_Proxy *, ACE_Null_Mutex>
- COLLECTION_ITERATOR;
- // Allows iterations through collection_
-
- typedef ACE_Map_Entry<TOKEN_NAME, ACE_Token_Proxy *>
- COLLECTION_ENTRY;
- // Allows iterations through collection_
-
- COLLECTION collection_;
- // COLLECTION maintains a mapping from token names to ACE_Tokens*.
-
- int debug_;
- // Whether to print out debug messages or not.
-
- ACE_TCHAR name_[ACE_MAXTOKENNAMELEN];
- // Name of the collection.
-
- // = I'm not sure what these mean, but they have to be defined since they're
- // pure virtual in ACE_Token_Proxy.
- virtual ACE_Token_Proxy *clone (void) const;
- virtual ACE_Tokens *create_token (const ACE_TCHAR *name);
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Token_Collection.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_TOKEN_COLLECTION_H */
diff --git a/ace/Token_Collection.i b/ace/Token_Collection.i
deleted file mode 100644
index e5f83852713..00000000000
--- a/ace/Token_Collection.i
+++ /dev/null
@@ -1,10 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Token_Collection.i
-
-ACE_INLINE const ACE_TCHAR *
-ACE_Token_Collection::name (void) const
-{
- return name_;
-}
diff --git a/ace/Token_Invariants.cpp b/ace/Token_Invariants.cpp
deleted file mode 100644
index 6c7c9d421bd..00000000000
--- a/ace/Token_Invariants.cpp
+++ /dev/null
@@ -1,365 +0,0 @@
-// Token_Invariants.cpp
-// $Id$
-
-#include "ace/Token_Invariants.h"
-#include "ace/Object_Manager.h"
-
-ACE_RCSID(ace, Token_Invariants, "$Id$")
-
-ACE_Token_Invariant_Manager *ACE_Token_Invariant_Manager::instance_ = 0;
-
-ACE_Token_Invariant_Manager *
-ACE_Token_Invariant_Manager::instance (void)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::instance");
-
- // Perform the Double-Check pattern...
- if (instance_ == 0)
- {
- ACE_MT (ACE_TOKEN_CONST::MUTEX *lock =
- ACE_Managed_Object<ACE_TOKEN_CONST::MUTEX>::get_preallocated_object
- (ACE_Object_Manager::ACE_TOKEN_INVARIANTS_CREATION_LOCK);
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, *lock, 0));
-
- if (instance_ == 0)
- {
- ACE_NEW_RETURN (instance_,
- ACE_Token_Invariant_Manager,
- 0);
- // Register for destruction with ACE_Object_Manager.
- ACE_Object_Manager::at_exit (instance_);
- }
- }
-
- return instance_;
-}
-
-ACE_Token_Invariant_Manager::ACE_Token_Invariant_Manager (void)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::ACE_Token_Invariant_Manager");
-}
-
-int
-ACE_Token_Invariant_Manager::mutex_acquired (const ACE_TCHAR *token_name)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::mutex_acquired");
-
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1);
-
- ACE_Mutex_Invariants *inv = 0;
- if (this->get_mutex (token_name, inv) == -1)
- return -1;
- else
- return inv->acquired ();
-}
-
-int
-ACE_Token_Invariant_Manager::acquired (const ACE_Token_Proxy *proxy)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::acquired");
-
- // Reach into the proxy to find the token type.
- if (proxy->token_->type () == ACE_Tokens::MUTEX)
- return this->mutex_acquired (proxy->name ());
- else // ACE_Tokens::RWLOCK.
- {
- if (proxy->type () == ACE_RW_Token::READER)
- return this->reader_acquired (proxy->name ());
- else // ACE_RW_Token::WRITER.
- return this->writer_acquired (proxy->name ());
- }
-}
-
-void
-ACE_Token_Invariant_Manager::releasing (const ACE_Token_Proxy *proxy)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::releasing");
-
- // Reach into the proxy to find the token type.
- if (proxy->token_->type () == ACE_Tokens::MUTEX)
- this->mutex_releasing (proxy->name ());
- else // ACE_Tokens::RWLOCK.
- this->rwlock_releasing (proxy->name ());
-}
-
-void
-ACE_Token_Invariant_Manager::mutex_releasing (const ACE_TCHAR *token_name)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::mutex_releasing");
- ACE_GUARD (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_);
-
- ACE_Mutex_Invariants *inv = 0;
- if (this->get_mutex (token_name, inv) == 0)
- inv->releasing ();
-}
-
-int
-ACE_Token_Invariant_Manager::reader_acquired (const ACE_TCHAR *token_name)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::reader_acquired");
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1);
-
- ACE_RWLock_Invariants *inv = 0;
- if (this->get_rwlock (token_name, inv) == -1)
- return -1;
- else
- return inv->reader_acquired ();
-}
-
-int
-ACE_Token_Invariant_Manager::writer_acquired (const ACE_TCHAR *token_name)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::writer_acquired");
-
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1);
-
- ACE_RWLock_Invariants *inv = 0;
- if (this->get_rwlock (token_name, inv) == -1)
- return -1;
- else
- return inv->writer_acquired ();
-}
-
-void
-ACE_Token_Invariant_Manager::rwlock_releasing (const ACE_TCHAR *token_name)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::rwlock_releasing");
-
- ACE_GUARD (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_);
-
- ACE_RWLock_Invariants *inv = 0;
- if (this->get_rwlock (token_name, inv) == 0)
- inv->releasing ();
-}
-
-void
-ACE_Token_Invariant_Manager::dump (void) const
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("mutex_collection_:\n")));
- mutex_collection_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("rwlock_collection_:\n")));
- rwlock_collection_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-
-int
-ACE_Token_Invariant_Manager::get_mutex (const ACE_TCHAR *token_name,
- ACE_Mutex_Invariants *&inv)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::get_mutex");
- TOKEN_NAME name (token_name);
- if (mutex_collection_.find (name, inv) == -1)
- // We did not find one in the collection.
- {
- ACE_Mutex_Invariants *new_invariant;
-
- ACE_NEW_RETURN (new_invariant,
- ACE_Mutex_Invariants,
- -1);
- if (mutex_collection_.bind (name, new_invariant) == -1)
- {
- delete new_invariant;
- return -1;
- }
-
- if (mutex_collection_.find (name, inv) == -1)
- // We did not find one in the collection.
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_Token_Invariant_Manager::get_rwlock (const ACE_TCHAR *token_name,
- ACE_RWLock_Invariants *&inv)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::get_rwlock");
- TOKEN_NAME name (token_name);
- if (rwlock_collection_.find (name, inv) == -1)
- // We did not find one in the collection.
- {
- ACE_RWLock_Invariants *new_invariant;
-
- ACE_NEW_RETURN (new_invariant,
- ACE_RWLock_Invariants,
- -1);
- if (rwlock_collection_.bind (name, new_invariant) == -1)
- return -1;
-
- if (rwlock_collection_.find (name, inv) == -1)
- // We did not find one in the collection.
- return -1;
- }
-
- return 0;
-}
-
-
-ACE_Token_Invariant_Manager::~ACE_Token_Invariant_Manager (void)
-{
- ACE_TRACE ("ACE_Token_Invariant_Manager::~ACE_Token_Invariant_Manager");
- MUTEX_COLLECTION_ITERATOR iterator (mutex_collection_);
-
- for (MUTEX_COLLECTION_ENTRY *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- delete temp->int_id_;
-
- RWLOCK_COLLECTION_ITERATOR iterator2 (rwlock_collection_);
-
- for (RWLOCK_COLLECTION_ENTRY *temp2 = 0;
- iterator2.next (temp2) != 0;
- iterator2.advance ())
- delete temp2->int_id_;
-}
-
-// **************************************************
-// **************************************************
-// **************************************************
-
-ACE_Mutex_Invariants::ACE_Mutex_Invariants (void)
-: owners_ (0)
-{
-}
-
-int
-ACE_Mutex_Invariants::acquired (void)
-{
- if (++owners_ > 1)
- {
- owners_ = 42;
- return 0;
- }
- else
- return 1;
-}
-
-void
-ACE_Mutex_Invariants::releasing (void)
-{
- if (owners_ == 1)
- --owners_;
-}
-
-ACE_Mutex_Invariants::ACE_Mutex_Invariants (const ACE_Mutex_Invariants &rhs)
-: owners_ (rhs.owners_)
-{
-}
-
-void
-ACE_Mutex_Invariants::operator= (const ACE_Mutex_Invariants &rhs)
-{
- owners_ = rhs.owners_;
-}
-
-void
-ACE_Mutex_Invariants::dump (void) const
-{
- ACE_TRACE ("ACE_Mutex_Invariants::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("owners_ = %d\n"), owners_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// **************************************************
-// **************************************************
-// **************************************************
-
-ACE_RWLock_Invariants::ACE_RWLock_Invariants (void)
-: writers_ (0),
- readers_ (0)
-{
-}
-
-int
-ACE_RWLock_Invariants::writer_acquired (void)
-{
- if (readers_ > 0)
- {
- writers_ = readers_ = 42;
- return 0;
- }
- else if (++writers_ > 1)
- {
- writers_ = readers_ = 42;
- return 0;
- }
- else
- return 1;
-}
-
-int
-ACE_RWLock_Invariants::reader_acquired (void)
-{
- if (writers_ > 0)
- {
- writers_ = readers_ = 42;
- return 0;
- }
- else
- {
- ++readers_;
- return 1;
- }
-}
-
-void
-ACE_RWLock_Invariants::releasing (void)
-{
- if (writers_ == 1)
- writers_ = 0;
- else if (readers_ > 0)
- --readers_;
-}
-
-ACE_RWLock_Invariants::ACE_RWLock_Invariants (const ACE_RWLock_Invariants &rhs)
-: writers_ (rhs.writers_),
- readers_ (rhs.readers_)
-{
-}
-
-void
-ACE_RWLock_Invariants::operator= (const ACE_RWLock_Invariants &rhs)
-{
- writers_ = rhs.writers_;
- readers_ = rhs.readers_;
-}
-
-void
-ACE_RWLock_Invariants::dump (void) const
-{
- ACE_TRACE ("ACE_RWLock_Invariants::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("writers_ = %d\n"),
- "readers_ = %d\n",
- writers_, readers_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Map_Manager<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Entry<ACE_Token_Name, ACE_Mutex_Invariants *>;
-template class ACE_Map_Manager<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>;
-template class ACE_Map_Entry<ACE_Token_Name, ACE_RWLock_Invariants *>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Map_Manager<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_Mutex_Invariants *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Entry<ACE_Token_Name, ACE_Mutex_Invariants *>
-#pragma instantiate ACE_Map_Manager<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_RWLock_Invariants *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Entry<ACE_Token_Name, ACE_RWLock_Invariants *>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Token_Invariants.h b/ace/Token_Invariants.h
deleted file mode 100644
index 3bda6f2b572..00000000000
--- a/ace/Token_Invariants.h
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Token_Invariants.h
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// = DESCRIPTION
-// Allows applications to test that invariants are always
-// satisfied. Can test mutexes and readers/writer locks. Does
-// not test recursive acquisition.
-//
-// ============================================================================
-
-#ifndef ACE_TOKEN_INVARIANTS_H
-#define ACE_TOKEN_INVARIANTS_H
-#include "ace/pre.h"
-
-#include "ace/Synch.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Map_Manager.h"
-#include "ace/Local_Tokens.h"
-
-class ACE_Export ACE_Mutex_Invariants
-{
- // = TITLE
- // Mutex Invariants
- //
- // = INVARIANTS
- // 1. Only one owner at a time.
-public:
- ACE_Mutex_Invariants (void);
- // Default construction.
-
- int acquired (void);
- // Returns 1 on success, 0 when an invariant has been violated and
- // -1 on error.
-
- void releasing (void);
- // Updates internal database.
-
- // = Map_Manager operations.
-
- ACE_Mutex_Invariants (const ACE_Mutex_Invariants &rhs);
- // Copy construction.
-
- void operator= (const ACE_Mutex_Invariants &rhs);
- // Copy.
-
- void dump (void) const;
- // Dump the state of the class.
-
-private:
- int owners_;
- // Number of owners. This had better be 0 >= owners_ <= 1;
-};
-
-class ACE_Export ACE_RWLock_Invariants
-{
- // = TITLE
- // RWLock Invariants
- //
- // = INVARIANTS
- // 1. Only one writer at a time.
- // 2. If there is an owning writer, there are no owning readers.
-public:
- ACE_RWLock_Invariants (void);
- // Default construction.
-
- int writer_acquired (void);
- // Returns 1 on success, 0 when an invariant has been violated and
- // -1 on error.
-
- int reader_acquired (void);
- // Returns 1 on success, 0 when an invariant has been violated and
- // -1 on error.
-
- void releasing (void);
- // Updates internal database.
-
- // = Map_Manager operations.
-
- ACE_RWLock_Invariants (const ACE_RWLock_Invariants &rhs);
- // Copy construction.
-
- void operator= (const ACE_RWLock_Invariants &rhs);
- // Copy.
-
- void dump (void) const;
- // Dump the state of the class.
-
-private:
- int writers_;
- // Number of owning writers.
-
- int readers_;
- // Number of owning readers.
-};
-
-class ACE_Export ACE_Token_Invariant_Manager : public ACE_Cleanup
-{
- // = TITLE
- // Token Invariants
- //
- // = DESCRIPTION
- // The Token Invariant Manager allows applications to test that
- // invariants are always satisfied. Currently, Token_Invariants
- // can test mutexes and readers/writer locks. Does not test
- // recursive acquisition.
- //
- // Note that this class does not ever clean its database. Until
- // destroyed, it's size will forever increase.
-public:
-
- static ACE_Token_Invariant_Manager *instance (void);
- // Singleton access point.
-
- // = Polymorphic methods. Just pass in the proxy and the method
- // figures out the type of the token.
-
- int acquired (const ACE_Token_Proxy *proxy);
- // Returns 1 on success, 0 when an invariant has been violated and
- // -1 on error.
-
- void releasing (const ACE_Token_Proxy *proxy);
- // Updates internal database.
-
- // = Explicit methods. These to not require actual proxies in order
- // to test a scenario.
-
- int mutex_acquired (const ACE_TCHAR *token_name);
- // Returns 1 on success, 0 when an invariant has been violated and
- // -1 on error.
-
- void mutex_releasing (const ACE_TCHAR *token_name);
- // Updates internal database.
-
- int reader_acquired (const ACE_TCHAR *token_name);
- // Returns 1 on success, 0 when an invariant has been violated and
- // -1 on error.
-
- int writer_acquired (const ACE_TCHAR *token_name);
- // Returns 1 on success, 0 when an invariant has been violated and
- // -1 on error.
-
- void rwlock_releasing (const ACE_TCHAR *token_name);
- // Updates internal database.
-
- void dump (void) const;
- // Dump the state of the class.
-
- // = The following two method should be in the protected part of the
- // class. Bugs with certain compilers preclude this.
- ACE_Token_Invariant_Manager (void);
- // Prevent non-singleton construction.
-
- virtual ~ACE_Token_Invariant_Manager (void);
- // Destruction.
-
-protected:
- int get_mutex (const ACE_TCHAR *token_name,
- ACE_Mutex_Invariants *&inv);
- // Return or create.
-
- int get_rwlock (const ACE_TCHAR *token_name,
- ACE_RWLock_Invariants *&inv);
- // Return or create.
-
- ACE_TOKEN_CONST::MUTEX lock_;
- // ACE_Mutex_Token used to lock internal data structures.
-
- typedef ACE_Token_Name TOKEN_NAME;
- // This may be changed to a template type.
-
- typedef ACE_Map_Manager<TOKEN_NAME, ACE_Mutex_Invariants *, ACE_Null_Mutex>
- MUTEX_COLLECTION;
- // COLLECTION maintains a mapping from token names to mutexes.
-
- typedef ACE_Map_Iterator<TOKEN_NAME, ACE_Mutex_Invariants *, ACE_Null_Mutex>
- MUTEX_COLLECTION_ITERATOR;
- // Allows iterations through collection.
-
- typedef ACE_Map_Entry<TOKEN_NAME, ACE_Mutex_Invariants *>
- MUTEX_COLLECTION_ENTRY;
- // Allows iterations through collection.
-
- MUTEX_COLLECTION mutex_collection_;
- // MUTEX_COLLECTION maintains a mapping from token names to mutexes.
-
- typedef ACE_Map_Manager<TOKEN_NAME, ACE_RWLock_Invariants *, ACE_Null_Mutex>
- RWLOCK_COLLECTION;
- // COLLECTION maintains a mapping from token names to mutexes.
-
- typedef ACE_Map_Iterator<TOKEN_NAME, ACE_RWLock_Invariants *, ACE_Null_Mutex>
- RWLOCK_COLLECTION_ITERATOR;
- // Allows iterations through collection.
-
- typedef ACE_Map_Entry<TOKEN_NAME, ACE_RWLock_Invariants *>
- RWLOCK_COLLECTION_ENTRY;
- // Allows iterations through collection.
-
- RWLOCK_COLLECTION rwlock_collection_;
- // MUTEX_COLLECTION maintains a mapping from token names to mutexes.
-
- static ACE_Token_Invariant_Manager *instance_;
- // Singleton pointer.
-};
-
-#include "ace/post.h"
-#endif /* ACE_TOKEN_INVARIANTS_H */
diff --git a/ace/Token_Manager.cpp b/ace/Token_Manager.cpp
deleted file mode 100644
index 019dcb2e921..00000000000
--- a/ace/Token_Manager.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-// Token_Manager.cpp
-// $Id$
-
-#include "ace/Token_Manager.h"
-#include "ace/Object_Manager.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Token_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Token_Manager, "$Id$")
-
-// singleton token manager
-ACE_Token_Manager *ACE_Token_Manager::token_manager_ = 0;
-
-ACE_Token_Manager::ACE_Token_Manager ()
-{
- ACE_TRACE ("ACE_Token_Manager::ACE_Token_Manager");
-}
-
-ACE_Token_Manager::~ACE_Token_Manager ()
-{
- ACE_TRACE ("ACE_Token_Manager::~ACE_Token_Manager");
-
- COLLECTION_ITERATOR iterator (collection_);
-
- for (COLLECTION_ENTRY *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- // @ should I be doing an unbind here?
- delete temp->int_id_;
- // The ext_id_'s delete themselves when the array of
- // COLLECTION_ENTRYs goes away.
- }
-}
-
-ACE_Token_Manager *
-ACE_Token_Manager::instance (void)
-{
- ACE_TRACE ("ACE_Token_Manager::token_manager");
-
- // This first check is to avoid acquiring the mutex in the common
- // case. Double-Check pattern rules.
- if (token_manager_ == 0)
- {
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_TOKEN_CONST::MUTEX *lock =
- ACE_Managed_Object<ACE_TOKEN_CONST::MUTEX>::get_preallocated_object
- (ACE_Object_Manager::ACE_TOKEN_MANAGER_CREATION_LOCK);
- ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, *lock, 0);
-#endif /* ACE_MT_SAFE */
-
- if (token_manager_ == 0)
- {
- ACE_NEW_RETURN (token_manager_,
- ACE_Token_Manager,
- 0);
- // Register for destruction with ACE_Object_Manager.
- ACE_Object_Manager::at_exit (token_manager_);
- }
- }
-
- return token_manager_;
-}
-
-void
-ACE_Token_Manager::get_token (ACE_Token_Proxy *proxy,
- const ACE_TCHAR *token_name)
-{
- ACE_TRACE ("ACE_Token_Manager::get");
- // Hmm. I think this makes sense. We perform our own locking here
- // (see safe_acquire.) We have to make sure that only one thread
- // uses the collection at a time.
-
- ACE_GUARD (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_);
-
- TOKEN_NAME name (token_name);
-
- if (collection_.find (name, proxy->token_) == -1)
- // We did not find one in the collection.
- {
- // Make one.
- proxy->token_ = proxy->create_token (token_name);
-
- // Put it in the collection.
- if (collection_.bind (name, proxy->token_) == -1)
- {
- delete proxy->token_;
- proxy->token_ = 0;
- }
- }
-
- if (proxy->token_ != 0)
- proxy->token_->inc_reference ();
-
- // We may be returning proxy->token_ == 0 if new failed, caller must
- // check.
-}
-
-// 0. check_deadlock (TOKEN)
-// 1. if TOKEN->visited (), return 0.
-// 2. mark TOKEN visited.
-// 3. get ALL_OWNERS
-// 4. if CLIENT in ALL_OWNERS, return *DEADLOCK*.
-// 5. for each OWNER in ALL_OWNERS,
-// 6. if OWNER is not waiting for a NEW_TOKEN, continue.
-// 7. else, if check_deadlock (NEW_TOKEN) == 1, return *DEADLOCK*
-// 8. return 0.
-
-int
-ACE_Token_Manager::check_deadlock (ACE_Token_Proxy *proxy)
-{
- ACE_TRACE ("ACE_Token_Manager::check_deadlock");
-
- // Start the recursive deadlock detection algorithm.
- int result = this->check_deadlock (proxy->token_, proxy);
-
- // Whether or not we detect deadlock, we have to unmark all tokens
- // for the next time.
- COLLECTION_ITERATOR iterator (collection_);
- for (COLLECTION_ENTRY *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- temp->int_id_->visit (0);
-
- return result;
-}
-
-int
-ACE_Token_Manager::check_deadlock (ACE_Tokens *token, ACE_Token_Proxy *proxy)
-{
- ACE_TRACE ("ACE_Token_Manager::check_deadlock");
-
- if (token->visited ())
- return 0;
-
- token->visit (1);
-
- ACE_Tokens::OWNER_STACK owners;
-
- int is_owner = token->owners (owners, proxy->client_id ());
-
- switch (is_owner)
- {
- case -1:
- // Error.
- return -1;
- case 1:
- // The caller is an owner, so we have a deadlock situation.
- if (debug_)
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) Deadlock detected.\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%s owns %s and is waiting for %s.\n"),
- proxy->client_id (),
- token->name (),
- proxy->token_->name ()));
- }
-
- return 1;
- case 0:
- default:
- // Recurse on each owner.
- while (!owners.is_empty ())
- {
- ACE_TPQ_Entry *e;
- owners.pop (e);
- // If the owner is waiting on another token, recurse.
- ACE_Tokens *twf = this->token_waiting_for (e->client_id ());
- if ((twf != 0) &&
- (this->check_deadlock (twf, proxy) == 1))
- {
- if (debug_)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%s owns %s and is waiting for %s.\n"),
- e->client_id (),
- token->name (),
- twf->name ()));
- }
- return 1;
- }
- // else, check the next owner.
- }
-
- // We've checked all the owners and found no deadlock.
- return 0;
- }
-}
-
-
-ACE_Tokens *
-ACE_Token_Manager::token_waiting_for (const ACE_TCHAR *client_id)
-{
- COLLECTION_ITERATOR iterator (collection_);
- for (COLLECTION_ENTRY *temp = 0;
- iterator.next (temp) != 0;
- iterator.advance ())
- {
- if (temp->int_id_->is_waiting_for (client_id))
- return temp->int_id_;
- }
-
- // nothing was found, return NULL.
- return 0;
-}
-
-// Notify the token manager that a token is has been released. If
-// as a result, there is no owner of the token, the token is
-// deleted.
-void
-ACE_Token_Manager::release_token (ACE_Tokens *&token)
-{
- ACE_TRACE ("ACE_Token_Manager::release");
- // again, let's perform our own locking here.
-
- ACE_GUARD (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_);
-
- if (token->dec_reference () == 0)
- {
- // No one has the token, so we can delete it and remove it from
- // our collection. First, let's get it from the collection.
- TOKEN_NAME token_name (token->name ());
-
- ACE_Tokens *temp;
-
- if (collection_.unbind (token_name, temp) == -1)
- // we did not find one in the collection
- {
- errno = ENOENT;
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("Token Manager could not release %s:%d\n"),
- token->name (), token->type ()));
- // @@ bad
- }
- else
- // we found it
- {
- // sanity pointer comparison. The token referenced by the
- // proxy better be the one we found in the list.
- ACE_ASSERT (token == temp);
- delete token; // or delete temp
- // we set their token to zero. if the calling proxy is
- // still going to be used, it had better check it's token
- // value before calling a method on it!
- token = 0;
- }
- }
- // else
- // someone is still interested in the token, so keep it around.
-}
-
-void
-ACE_Token_Manager::dump (void) const
-{
- ACE_TRACE ("ACE_Token_Manager::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Manager::dump:\n")));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("lock_\n")));
- lock_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("collection_\n")));
- collection_.dump ();
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Map_Manager <ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator_Base<ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>;
-template class ACE_Map_Iterator<ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>;
-template class ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>;
-template class ACE_Map_Entry <ACE_Token_Name, ACE_Tokens *>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Map_Manager <ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Iterator<ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_Token_Name, ACE_Tokens *, ACE_Null_Mutex>
-#pragma instantiate ACE_Map_Entry <ACE_Token_Name, ACE_Tokens *>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/ace/Token_Manager.h b/ace/Token_Manager.h
deleted file mode 100644
index 79e37935d95..00000000000
--- a/ace/Token_Manager.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Token_Manager.h
-//
-// = AUTHOR
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_TOKEN_MANAGER_H
-#define ACE_TOKEN_MANAGER_H
-#include "ace/pre.h"
-
-#include "ace/Synch.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Map_Manager.h"
-#include "ace/Local_Tokens.h"
-
-class ACE_Local_Mutex;
-class ACE_Mutex_Token;
-
-class ACE_Export ACE_Token_Manager : public ACE_Cleanup
-{
- // = TITLE
- // Manages all tokens in a process space.
- //
- // = DESCRIPTION
- // Factory: Proxies use the token manager to obtain token
- // references. This allows multiple proxies to reference the same
- // logical token.
- // Deadlock detection: Tokens use the manager to check for
- // deadlock situations during acquires.
-
- // To add a new type of token (e.g. semaphore), do the following
- // steps: 1. Create a new derivation of ACE_Token. This class
- // defines the semantics of the new Token. 2. Create a
- // derivation of ACE_Token_Manager. You will only need to
- // redefine make_mutex.
-public:
- ACE_Token_Manager (void);
- virtual ~ACE_Token_Manager (void);
-
- // Set/get a pointer to token manager singleton.
- static ACE_Token_Manager *instance (void);
- void instance (ACE_Token_Manager *);
-
- void get_token (ACE_Token_Proxy *, const ACE_TCHAR *token_name);
- // The Token manager uses ACE_Token_Proxy::token_id_ to look for
- // an existing token. If none is found, the Token Manager calls
- // ACE_Token_Proxy::create_token to create a new one. When
- // finished, sets ACE_Token_Proxy::token_. <token_name> uniquely
- // id's the token name.
-
- int check_deadlock (ACE_Token_Proxy *proxy);
- int check_deadlock (ACE_Tokens *token, ACE_Token_Proxy *proxy);
- // returns 1 if the acquire will _not_ cause deadlock.
- // returns 0 if the acquire _will_ cause deadlock.
- // this method ignores recursive acquisition. That is, it will not
- // report deadlock if the client holding the token requests the
- // token again. Thus, it assumes recursive mutexes.
-
- void release_token (ACE_Tokens *&token);
- // notify the token manager that a token has been released. If as a
- // result, there is no owner of the token, the token is deleted.
-
- ACE_TOKEN_CONST::MUTEX &mutex (void);
- // This is to allow Tokens to perform atomic transactions. The
- // typical usage is to acquire this mutex, check for a safe_acquire,
- // perform some queueing (if need be) and then release the lock.
- // This is necessary since safe_acquire is implemented in terms of
- // the Token queues.
-
- void dump (void) const;
- // Dump the state of the class.
-
- void debug (int d);
- // Turn debug mode on/off.
-
-private:
- int debug_;
- // Whether to print debug messages or not.
-
- static ACE_Token_Manager *token_manager_;
- // pointer to singleton token manager.
-
- ACE_Tokens *token_waiting_for (const ACE_TCHAR *client_id);
- // return the token that the given client_id is waiting for, if any
-
- ACE_TOKEN_CONST::MUTEX lock_;
- // ACE_Mutex_Token used to lock internal data structures.
-
- typedef ACE_Token_Name TOKEN_NAME;
- // This may be changed to a template type.
-
- typedef ACE_Map_Manager<TOKEN_NAME, ACE_Tokens *, ACE_Null_Mutex>
- COLLECTION;
- // COLLECTION maintains a mapping from token names to ACE_Tokens*
-
- typedef ACE_Map_Iterator<TOKEN_NAME, ACE_Tokens *, ACE_Null_Mutex>
- COLLECTION_ITERATOR;
- // Allows iterations through collection_
-
- typedef ACE_Map_Entry<TOKEN_NAME, ACE_Tokens *>
- COLLECTION_ENTRY;
- // Allows iterations through collection_
-
- COLLECTION collection_;
- // COLLECTION maintains a mapping from token names to ACE_Tokens*.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Token_Manager.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_TOKEN_MANAGER_H */
diff --git a/ace/Token_Manager.i b/ace/Token_Manager.i
deleted file mode 100644
index 572d439f289..00000000000
--- a/ace/Token_Manager.i
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Token_Manager.i
-
-ACE_INLINE ACE_TOKEN_CONST::MUTEX &
-ACE_Token_Manager::mutex (void)
-{
- ACE_TRACE ("ACE_Token_Manager::mutex");
- return lock_;
-}
-
-ACE_INLINE void
-ACE_Token_Manager::debug (int d)
-{
- ACE_TRACE ("ACE_Token_Manager::debug");
- debug_ = d;
-}
-
diff --git a/ace/Token_Request_Reply.cpp b/ace/Token_Request_Reply.cpp
deleted file mode 100644
index 3333f88bf28..00000000000
--- a/ace/Token_Request_Reply.cpp
+++ /dev/null
@@ -1,175 +0,0 @@
-// Token_Request_Reply.cpp
-// $Id$
-
-#include "ace/Token_Request_Reply.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Token_Request_Reply.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Token_Request_Reply, "$Id$")
-
-// Default "do nothing" constructor.
-
-ACE_Token_Request::ACE_Token_Request (void)
- : token_name_ (0),
- client_id_ (0)
-{
-}
-
-// Create a ACE_Token_Request message.
-
-ACE_Token_Request::ACE_Token_Request (int token_type,
- int proxy_type,
- ACE_UINT32 operation_type,
- const ACE_TCHAR token_name[],
- const ACE_TCHAR client_id[],
- const ACE_Synch_Options &options)
-{
- this->token_type (token_type);
- this->proxy_type (proxy_type);
- this->operation_type (operation_type);
- this->requeue_position (0); // to avoid Purify UMR
- this->notify (0); // to avoid Purify UMR
- transfer_.arg_ = 0; // to avoid Purify UMR
- ACE_OS::memset (transfer_.data_, 0, sizeof transfer_.data_); // to avoid Purify UMR
- this->token_name (token_name, client_id);
- this->options (options);
-}
-
-// Encode the transfer buffer into network byte order
-// so that it can be sent to the server.
-
-int
-ACE_Token_Request::encode (void *&buf)
-{
- buf = (void *) &this->transfer_;
- return this->length ();
-}
-
-// Decode the transfer buffer into host byte byte order
-// so that it can be used by the server.
-
-int
-ACE_Token_Request::decode (void)
-{
- this->token_name_ = this->transfer_.data_;
-
- options_.set (transfer_.use_timeout_ == 1 ? ACE_Synch_Options::USE_TIMEOUT : 0,
- ACE_Time_Value (transfer_.sec_, transfer_.usec_),
- (void *) transfer_.arg_);
-
- // Decode the variable-sized portion.
- int token_len = ACE_OS::strlen (this->token_name_);
-
- // Check to make sure this->tokenName_ isn't too long!
- if (token_len >= ACE_MAXTOKENNAMELEN)
- {
- errno = ENAMETOOLONG;
- return -1;
- }
- else // Skip this->tokenName_ + '\0' + ':'.
- this->client_id_ =
- &this->token_name_[(token_len + 2) * sizeof (ACE_TCHAR)];
-
- // Fixed size header
- // token_name_ plus '\0'
- // ':'
- // client_id_ plus '\0'
- size_t data_size = ACE_TOKEN_REQUEST_HEADER_SIZE
- + ACE_OS::strlen (this->token_name_) + 1
- + ACE_OS::strlen (this->client_id_) + 1
- + 1;
-
- // Make sure the message was correctly received and framed.
- return this->length () == data_size ? 0 : -1;
-}
-
-// Print out the current values of the ACE_Token_Request.
-
-void
-ACE_Token_Request::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("*******\nlength = %d\ntoken name = %s\nclient id = %s\n"),
- this->length (), this->token_name (), this->client_id ()));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("type = ")));
-
- if (this->token_type () == ACE_Tokens::MUTEX)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("MUTEX\n")));
- else // == ACE_Tokens::RWLOCK
- {
- if (this->proxy_type () == ACE_RW_Token::READER)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("RLOCK\n")));
- else // == WRITER
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("WLOCK\n")));
- }
-
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("operation = ")));
- switch (this->operation_type ())
- {
- case ACE_Token_Request::ACQUIRE:
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("ACQUIRE\n")));
- break;
- case ACE_Token_Request::RELEASE:
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("RELEASE\n")));
- break;
- case ACE_Token_Request::RENEW:
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("RENEW\n")));
- break;
- default:
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("<unknown operation type> = %d\n"), this->operation_type ()));
- break;
- }
-
- if (this->options ()[ACE_Synch_Options::USE_TIMEOUT] == 0)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("blocking forever\n")));
- else
- {
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("waiting for %d secs and %d usecs\n"),
- this->options ().timeout ().sec (), this->options ().timeout ().usec ()));
- }
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-// ************************************************************
-// ************************************************************
-// ************************************************************
-
-// Create a ACE_Token_Reply message.
-
-ACE_Token_Reply::ACE_Token_Reply (void) // Type of reply.
-{
- this->arg (0);
- this->errnum (0);
- this->length (sizeof (Transfer));
-}
-
-// Encode the transfer buffer into network byte order
-// so that it can be sent to the client.
-
-int
-ACE_Token_Reply::encode (void *&buf)
-{
- buf = (void *) &this->transfer_;
- return this->length ();
-}
-
-// Decode the transfer buffer into host byte order
-// so that it can be used by the client.
-
-int
-ACE_Token_Reply::decode (void)
-{
- return 0;
-}
-
-// Print out current values of the ACE_Token_Reply object.
-
-void
-ACE_Token_Reply::dump (void) const
-{
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("*******\nlength = %d\nerrnum = %d"),
- this->length (), this->errnum ()));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("arg = %d"), this->arg ()));
-}
diff --git a/ace/Token_Request_Reply.h b/ace/Token_Request_Reply.h
deleted file mode 100644
index 3391df69f53..00000000000
--- a/ace/Token_Request_Reply.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE
-//
-// = FILENAME
-// Token_Request_Reply.h
-//
-// = DESCRIPTION
-// Define the format used to exchange messages between the
-// ACE_Token Server and its clients.
-//
-// = AUTHOR
-// Douglas C. Schmidt (schmidt@cs.wustl.edu)
-// Tim Harrison (harrison@cs.wustl.edu)
-//
-// ============================================================================
-
-#ifndef ACE_TOKEN_REQUEST_REPLY_H
-#define ACE_TOKEN_REQUEST_REPLY_H
-#include "ace/pre.h"
-
-#include "ace/Local_Tokens.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Time_Value.h"
-
-// Specifies the size of the fixed length portion of
-// the Transfer structure in ACE_Token_Request
-#define ACE_TOKEN_REQUEST_HEADER_SIZE 40
-
-class ACE_Export ACE_Token_Request
-{
- // = TITLE
- // Message format for delivering requests to the ACE_Token Server.
- //
- // = DESCRIPTION
- // This class is implemented to minimize data copying.
- // In particular, all marshaling is done in situ...
-public:
- enum OPERATION
- {
- // Operation types.
- ACQUIRE, // Acquire the token.
- RELEASE, // Release the token.
- RENEW, // Renew the token.
- REMOVE, // Remove the token.
- TRY_ACQUIRE
- };
-
- ACE_Token_Request (void);
- // Default constructor.
-
- ACE_Token_Request (int token_type,
- int proxy_type,
- ACE_UINT32 operation,
- const ACE_TCHAR token_name[],
- const ACE_TCHAR client_id[],
- const ACE_Synch_Options &options);
- // token_type - MUTEX, RWLOCK
- // proxy_type - MUTEX, RLOCK, WLOCK (acquires mean different things)
- // operation - method
- // token_name
- // client_id
- // options - we check USE_TIMEOUT and use the arg.
-
- // = Set/get the length of the encoded/decoded message.
- ACE_UINT32 length (void) const;
- void length (ACE_UINT32);
-
- // = Set/get the type of proxy
- int proxy_type (void) const;
- void proxy_type (int proxy_type);
-
- // = Set/get the type of token
- int token_type (void) const;
- void token_type (int token_type);
-
- // = Set/get the type of the operation.
- ACE_UINT32 operation_type (void) const;
- void operation_type (ACE_UINT32);
-
- // = Set/get the requeue position. These should be used when renew
- // is the operation type.
- ACE_UINT32 requeue_position (void) const;
- void requeue_position (ACE_UINT32);
-
- // = Set/get notify. These should be used when acquire is the operation type.
- ACE_UINT32 notify (void) const;
- void notify (ACE_UINT32);
-
- // = Set/get the timeout.
- ACE_Synch_Options &options (void) const;
- void options (const ACE_Synch_Options &options);
-
- // = Set/get the name of the token and the client id. The set
- // method is combined to make it easier on us. We're copying the
- // names as a contiguous buffer.
- ACE_TCHAR *token_name (void) const;
- ACE_TCHAR *client_id (void) const;
- void token_name (const ACE_TCHAR *token_name, const ACE_TCHAR *client_id);
-
- int encode (void *&);
- // Encode the message before transmission.
-
- int decode (void);
- // Decode message after reception. This must be called to set the
- // internal options.
-
- void dump (void) const;
- // Print out the values of the message for debugging purposes.
-
-private:
- // = The 5 fields in the <Transfer> struct are transmitted to the server.
- // The remaining 2 fields are not tranferred -- they are used only on
- // the server-side to simplify lookups.
-
- struct Transfer
- {
- ACE_UINT32 length_;
- // Length of entire request.
-
- ACE_UINT32 token_type_;
- // Type of the request (i.e., MUTEX, RLOCK, WLOCK...
-
- ACE_UINT32 proxy_type_;
- // Type of the request (i.e., MUTEX, RLOCK, WLOCK...
-
- ACE_UINT32 operation_type_;
- // Type of the request (i.e., <ACQUIRE>, <RELEASE>, <RENEW>, and <REMOVE>).
-
- ACE_UINT32 requeue_position_;
- // this only makes sense when operation type is renew
-
- ACE_UINT32 notify_;
- // this only makes sense when operation type is renew
-
- // = ACE_Synch_Options stuff
-
- ACE_UINT32 use_timeout_;
- // Indicates if we should block forever. If 1, then <secTimeout_>
- // and <usecTimeout_> indicates how long we should wait. If 0,
- // then we block forever.
-
- ACE_UINT32 sec_;
- // Max seconds willing to wait for token if not blocking forever.
-
- ACE_UINT32 usec_;
- // Max micro seconds to wait for token if not blocking forever.
-
- ACE_UINT32 arg_;
- // value returned in <Token_Reply::arg>;
-
- ACE_TCHAR data_[ACE_MAXTOKENNAMELEN + ACE_MAXCLIENTIDLEN + 3];
- // The data portion contains the <tokenName_> including a 0 terminator,
- // a ':', then the <clientId> including a 0 terminator
- } transfer_;
-
- ACE_TCHAR *token_name_;
- // Pointer to the beginning of the token name in this->data_.
-
- ACE_TCHAR *client_id_;
- // Pointer to the beginning of the client id in this->data_;
-
- ACE_Synch_Options options_;
- // Holds arg, sec, usec, etc.
-};
-
-class ACE_Export ACE_Token_Reply
-{
- // = TITLE
- // Message format for delivering replies from the ACE_Token Server.
- //
- // = DESCRIPTION
- // This class is implemented to minimize data copying.
- // In particular, all marshaling is done in situ...
-public:
- ACE_Token_Reply (void);
- // Default constructor.
-
- // = Set/get the length of the encoded/decoded message.
- ACE_UINT32 length (void) const;
- void length (ACE_UINT32);
-
- // = Set/get the errno of a reply.
- ACE_UINT32 errnum (void) const;
- void errnum (ACE_UINT32);
-
- // = Set/get the arg of a reply.
- ACE_UINT32 arg (void) const;
- void arg (ACE_UINT32);
-
- int encode (void *&);
- // Encode the message before transfer.
-
- int decode (void);
- // Decode a message after reception.
-
- void dump (void) const;
- // Print out the values of the message for debugging purposes.
-
-private:
- // = The 2 fields in the <Transfer> struct are transmitted to the server.
-
- struct Transfer
- {
- ACE_UINT32 length_;
- // Length of entire reply.
-
- ACE_UINT32 errno_;
- // Indicates why error occurred if <this->type_> == <FAILURE>.
- // Typical reasons include:
- // <EWOULDBLOCK> (if client requested a non-blocking check for the token).
- // <ETIME> (if the client timed out after waiting for the token).
- // <ENOLCK> (if the token lock was removed out from underneath a waiter).
- // <EACCES> (attempt to renew a token that isn't owned by the client).
-
- ACE_UINT32 arg_;
- // magic cookie
-
- } transfer_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Token_Request_Reply.i"
-#endif /* __ACE_INLINE__ */
-
-#include "ace/post.h"
-#endif /* ACE_TOKEN_REQUEST_REPLY_H */
diff --git a/ace/Token_Request_Reply.i b/ace/Token_Request_Reply.i
deleted file mode 100644
index 506068a3106..00000000000
--- a/ace/Token_Request_Reply.i
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Token_Request_Reply.i
-
-// = Set/get the length of the encoded/decoded message.
-
-ACE_INLINE ACE_UINT32
-ACE_Token_Request::length (void) const
-{
- return ntohl (this->transfer_.length_);
-}
-
-ACE_INLINE void
-ACE_Token_Request::length (ACE_UINT32 l)
-{
- this->transfer_.length_ = htonl (l);
-}
-
-// = Set/get the type of the message.
-ACE_INLINE int
-ACE_Token_Request::token_type (void) const
-{
- return (int) ntohl (this->transfer_.token_type_);
-}
-
-ACE_INLINE void
-ACE_Token_Request::token_type (int t)
-{
- this->transfer_.token_type_ = htonl ((ACE_UINT32) t);
-}
-
-// = Set/get the type of the message.
-ACE_INLINE int
-ACE_Token_Request::proxy_type (void) const
-{
- return (int) ntohl (this->transfer_.proxy_type_);
-}
-
-ACE_INLINE void
-ACE_Token_Request::proxy_type (int t)
-{
- this->transfer_.proxy_type_ = htonl ((ACE_UINT32) t);
-}
-
-// = Set/get the type of the message.
-ACE_INLINE ACE_UINT32
-ACE_Token_Request::operation_type (void) const
-{
- return ntohl (this->transfer_.operation_type_);
-}
-
-ACE_INLINE void
-ACE_Token_Request::operation_type (ACE_UINT32 t)
-{
- this->transfer_.operation_type_ = htonl (t);
-}
-
-// = Set/get the requeue position
-ACE_INLINE ACE_UINT32
-ACE_Token_Request::requeue_position (void) const
-{
- return ntohl (this->transfer_.requeue_position_);
-}
-
-ACE_INLINE void
-ACE_Token_Request::requeue_position (ACE_UINT32 rq)
-{
- this->transfer_.requeue_position_ = htonl (rq);
-}
-
-// = Set/get the requeue position
-ACE_INLINE ACE_UINT32
-ACE_Token_Request::notify (void) const
-{
- return ntohl (this->transfer_.notify_);
-}
-
-ACE_INLINE void
-ACE_Token_Request::notify (ACE_UINT32 rq)
-{
- this->transfer_.notify_ = htonl (rq);
-}
-
-// = Set/get the blocking semantics.
-ACE_INLINE ACE_Synch_Options &
-ACE_Token_Request::options (void) const
-{
- return (ACE_Synch_Options &) options_;
-}
-
-ACE_INLINE void
-ACE_Token_Request::options (const ACE_Synch_Options &opt)
-{
- // fight the friggin const from hell
- ACE_Synch_Options *options = (ACE_Synch_Options *) &opt;
-
- transfer_.use_timeout_ = options->operator[](ACE_Synch_Options::USE_TIMEOUT);
- if (transfer_.use_timeout_ == 1)
- {
- transfer_.usec_ = options->timeout ().usec ();
- transfer_.sec_ = options->timeout ().sec ();
- }
- else
- {
- transfer_.usec_ = 0;
- transfer_.sec_ = 0;
- }
-}
-
-// = Set/get the name of the token.
-ACE_INLINE ACE_TCHAR *
-ACE_Token_Request::token_name (void) const
-{
- return token_name_;
-}
-
-ACE_INLINE void
-ACE_Token_Request::token_name (const ACE_TCHAR *token_name,
- const ACE_TCHAR *client_id)
-{
- size_t token_name_length = ACE_OS::strlen (token_name) + 1; // Add 1 for '\0'.
- size_t client_id_length = ACE_OS::strlen (client_id) + 1; // Add 1 for '\0'.
-
- // Set up pointers and copy token_name and client_id into request.
- token_name_ = this->transfer_.data_;
- client_id_ = &this->token_name_[token_name_length + 1]; // Add 1 for ':';
- client_id_[-1] = ACE_TEXT (':'); // Insert the ':' before this->clientId_.
-
- (void) ACE_OS::memcpy (this->token_name_,
- token_name,
- token_name_length * sizeof (ACE_TCHAR));
- (void) ACE_OS::memcpy (this->client_id_,
- client_id,
- client_id_length * sizeof (ACE_TCHAR));
-
- // Fixed length header size
- size_t len = ACE_TOKEN_REQUEST_HEADER_SIZE;
-
- // ... then add in the amount of the variable-sized portion.
- len += token_name_length + client_id_length + 1;
-
- this->length (len);
-}
-
-// = Set/get the id of the client.
-ACE_INLINE ACE_TCHAR *
-ACE_Token_Request::client_id (void) const
-{
- return this->client_id_;
-}
-
-// ************************************************************
-// ************************************************************
-// ************************************************************
-
-// = Set/get the length of the encoded/decoded message.
-ACE_INLINE ACE_UINT32
-ACE_Token_Reply::length (void) const
-{
- return ntohl (this->transfer_.length_);
-}
-
-ACE_INLINE void
-ACE_Token_Reply::length (ACE_UINT32 l)
-{
- this->transfer_.length_ = htonl (l);
-}
-
-// = Set/get the errno of a failed reply.
-ACE_INLINE ACE_UINT32
-ACE_Token_Reply::errnum (void) const
-{
- return ntohl (this->transfer_.errno_);
-}
-
-ACE_INLINE void
-ACE_Token_Reply::errnum (ACE_UINT32 e)
-{
- this->transfer_.errno_ = htonl (e);
-}
-
-// = Set/get the length of the encoded/decoded message.
-ACE_INLINE ACE_UINT32
-ACE_Token_Reply::arg (void) const
-{
- return ntohl (this->transfer_.arg_);
-}
-
-ACE_INLINE void
-ACE_Token_Reply::arg (ACE_UINT32 arg)
-{
- this->transfer_.arg_ = htonl (arg);
-}
-
diff --git a/ace/Trace.cpp b/ace/Trace.cpp
deleted file mode 100644
index 605129557dc..00000000000
--- a/ace/Trace.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-// $Id$
-
-// We need this to get the status of ACE_NTRACE...
-
-#include "ace/config-all.h"
-
-ACE_RCSID(ace, Trace, "$Id$")
-
-// Turn off tracing for the duration of this file.
-#if defined (ACE_NTRACE)
-#undef ACE_NTRACE
-#endif /* ACE_NTRACE */
-#define ACE_NTRACE 1
-
-#include "ace/Trace.h"
-
-// = Static initialization.
-
-// Keeps track of how far to indent per trace call.
-int ACE_Trace::nesting_indent_ = ACE_Trace::DEFAULT_INDENT;
-
-// Is tracing enabled?
-int ACE_Trace::enable_tracing_ = ACE_Trace::DEFAULT_TRACING;
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Trace)
-
-void
-ACE_Trace::dump (void) const
-{
-}
-
-// Determine whether or not tracing is enabled
-
-int
-ACE_Trace::is_tracing (void)
-{
- return ACE_Trace::enable_tracing_;
-}
-
-// Enable the tracing facility.
-
-void
-ACE_Trace::start_tracing (void)
-{
- ACE_Trace::enable_tracing_ = 1;
-}
-
-// Disable the tracing facility.
-
-void
-ACE_Trace::stop_tracing (void)
-{
- ACE_Trace::enable_tracing_ = 0;
-}
-
-// Change the nesting indentation level.
-
-void
-ACE_Trace::set_nesting_indent (int indent)
-{
- ACE_Trace::nesting_indent_ = indent;
-}
-
-// Perform the first part of the trace, which prints out the string N,
-// the LINE, and the ACE_FILE as the function is entered.
-
-ACE_Trace::ACE_Trace (const ACE_TCHAR *n,
- int line,
- const ACE_TCHAR *file)
-{
-#if defined (ACE_NLOGGING)
- ACE_UNUSED_ARG (line);
- ACE_UNUSED_ARG (file);
-#endif /* ACE_NLOGGING */
-
- this->name_ = n;
-
- if (ACE_Trace::enable_tracing_)
- {
- ACE_Log_Msg *lm = ACE_LOG_MSG;
- if (lm->tracing_enabled ()
- && lm->trace_active () == 0)
- {
- lm->trace_active (1);
- ACE_DEBUG ((LM_TRACE,
- ACE_TEXT ("%*s(%t) calling %s in file `%s' on line %d\n"),
- ACE_Trace::nesting_indent_ * lm->inc (),
- ACE_TEXT (""),
- this->name_,
- file,
- line));
- lm->trace_active (0);
- }
- }
-}
-
-// Perform the second part of the trace, which prints out the NAME as
-// the function is exited.
-
-ACE_Trace::~ACE_Trace (void)
-{
- if (ACE_Trace::enable_tracing_)
- {
- ACE_Log_Msg *lm = ACE_LOG_MSG;
- if (lm->tracing_enabled ()
- && lm->trace_active () == 0)
- {
- lm->trace_active (1);
- ACE_DEBUG ((LM_TRACE,
- ACE_TEXT ("%*s(%t) leaving %s\n"),
- ACE_Trace::nesting_indent_ * lm->dec (),
- ACE_TEXT (""),
- this->name_));
- lm->trace_active (0);
- }
- }
-}
diff --git a/ace/Trace.h b/ace/Trace.h
deleted file mode 100644
index 8cfc8abb627..00000000000
--- a/ace/Trace.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Trace.h
-//
-// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-
-#ifndef ACE_TRACE_H
-#define ACE_TRACE_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-class ACE_Export ACE_Trace
-{
- // = TITLE
- // A C++ trace facility that keeps track of which methods are
- // entered and exited.
- //
- // = DESCRIPTION
- // This class uses C++ constructors and destructors to automate
- // the ACE_Trace nesting. In addition, thread-specific storage
- // is used to enable multiple threads to work correctly.
-public:
- // = Initialization and termination methods.
-
- ACE_Trace (const ACE_TCHAR *n,
- int line = 0,
- const ACE_TCHAR *file = ACE_TEXT (""));
- // Perform the first part of the trace, which prints out the string
- // N, the LINE, and the ACE_FILE as the function is entered.
-
- ~ACE_Trace (void);
- // Perform the second part of the trace, which prints out the NAME
- // as the function is exited.
-
- // = Control the tracing level.
- static int is_tracing(void);
- // Determine if tracing is enabled (return == 1) or not (== 0)
-
- static void start_tracing (void);
- // Enable the tracing facility.
-
- static void stop_tracing (void);
- // Disable the tracing facility.
-
- static void set_nesting_indent (int indent);
- // Change the nesting indentation level.
-
- void dump (void) const;
- // Dump the state of an object.
-
-private:
- // Keeps track of how deeply the call stack is nested (this is
- // maintained in thread-specific storage to ensure correctness in
- // multiple threads of control.
-
- const ACE_TCHAR *name_;
- // Name of the method we are in.
-
- static int nesting_indent_;
- // Keeps track of how far to indent per trace call.
-
- static int enable_tracing_;
- // Is tracing enabled?
-
- // Default values.
- enum
- {
- DEFAULT_INDENT = 3,
- DEFAULT_TRACING = 1
- };
-};
-
-#include "ace/post.h"
-#endif /* ACE_TRACE_H */
diff --git a/ace/Typed_SV_Message.cpp b/ace/Typed_SV_Message.cpp
deleted file mode 100644
index 6b4ae9024b0..00000000000
--- a/ace/Typed_SV_Message.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// Typed_SV_Message.cpp
-// $Id$
-
-#ifndef ACE_TYPED_SV_MESSAGE_C
-#define ACE_TYPED_SV_MESSAGE_C
-#include "ace/Typed_SV_Message.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Typed_SV_Message.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Typed_SV_Message, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Typed_SV_Message)
-
-template <class T> void
-ACE_Typed_SV_Message<T>::dump (void) const
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::dump");
-}
-
-#endif /* ACE_TYPED_SV_MESSAGE_C */
diff --git a/ace/Typed_SV_Message.h b/ace/Typed_SV_Message.h
deleted file mode 100644
index 01e72802ee2..00000000000
--- a/ace/Typed_SV_Message.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Typed_SV_Message.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TYPED_SV_MESSAGE_H
-#define ACE_TYPED_SV_MESSAGE_H
-#include "ace/pre.h"
-
-#include "ace/ACE.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-template <class T>
-class ACE_Typed_SV_Message
-{
- // = TITLE
- // Defines the header file for the C++ wrapper for System V
- // message queues.
-public:
- // = Initialization and termination methods.
- ACE_Typed_SV_Message (long type = 0,
- int length = sizeof (T),
- int max_size = sizeof (T));
- ACE_Typed_SV_Message (const T &data,
- long type = 0,
- int length = sizeof (T),
- int max_size = sizeof (T));
- ~ACE_Typed_SV_Message (void);
-
- // = Get/set the type of the message.
- long type (void) const;
- void type (long type);
-
- // = Get/set the length of the message.
- int length (void) const;
- void length (int l);
-
- // = Get/set the maximum size of the message.
- int max_size (void) const;
- void max_size (int m);
-
- // = Get/set a pointer to the data in the message.
- T &data (void);
- void data (const T &data);
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- long type_;
- // Type of message.
-
- int length_;
- // Length of this message.
-
- int max_;
- // Maximum length of any message.
-
- T data_;
- // Data stored in a message.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Typed_SV_Message.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Typed_SV_Message.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Typed_SV_Message.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_TYPED_SV_MESSAGE_H */
diff --git a/ace/Typed_SV_Message.i b/ace/Typed_SV_Message.i
deleted file mode 100644
index 4d74a14f5dd..00000000000
--- a/ace/Typed_SV_Message.i
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Typed_SV_Message.i
-
-template <class T> ACE_INLINE
-ACE_Typed_SV_Message<T>::ACE_Typed_SV_Message (long t,
- int l,
- int m)
- : type_ (t)
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::ACE_Typed_SV_Message");
- this->length (l);
- this->max_size (m);
-}
-
-template <class T> ACE_INLINE
-ACE_Typed_SV_Message<T>::ACE_Typed_SV_Message (const T &d,
- long t,
- int l,
- int m)
- : type_ (t),
- data_ (d)
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::ACE_Typed_SV_Message");
- this->length (l);
- this->max_size (m);
-}
-
-template <class T> ACE_INLINE
-ACE_Typed_SV_Message<T>::~ACE_Typed_SV_Message (void)
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::~ACE_Typed_SV_Message");
-}
-
-template <class T> ACE_INLINE long
-ACE_Typed_SV_Message<T>::type (void) const
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::type");
- return this->type_;
-}
-
-template <class T> ACE_INLINE void
-ACE_Typed_SV_Message<T>::type (long t)
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::type");
- this->type_ = t;
-}
-
-template <class T> ACE_INLINE int
-ACE_Typed_SV_Message<T>::length (void) const
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::length");
- return this->length_;
-}
-
-template <class T> ACE_INLINE void
-ACE_Typed_SV_Message<T>::length (int len)
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::length");
- this->length_ = len + (sizeof *this - (sizeof this->type_ + sizeof this->data_));
-}
-
-template <class T> ACE_INLINE int
-ACE_Typed_SV_Message<T>::max_size (void) const
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::max_size");
- return this->max_;
-}
-
-template <class T> ACE_INLINE void
-ACE_Typed_SV_Message<T>::max_size (int m)
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::max_size");
- this->max_ = m + (sizeof *this - (sizeof this->type_ + sizeof this->data_));
-}
-
-template <class T> T &
-ACE_Typed_SV_Message<T>::data (void)
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::data");
- return this->data_;
-}
-
-template <class T> void
-ACE_Typed_SV_Message<T>::data (const T &d)
-{
- ACE_TRACE ("ACE_Typed_SV_Message<T>::data");
- this->data_ = d;
-}
-
diff --git a/ace/Typed_SV_Message_Queue.cpp b/ace/Typed_SV_Message_Queue.cpp
deleted file mode 100644
index 57a861555f0..00000000000
--- a/ace/Typed_SV_Message_Queue.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// Typed_SV_Message_Queue.cpp
-// $Id$
-
-#ifndef ACE_TYPED_SV_MESSAGE_QUEUE_C
-#define ACE_TYPED_SV_MESSAGE_QUEUE_C
-
-#include "ace/Typed_SV_Message.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Typed_SV_Message_Queue.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/Typed_SV_Message_Queue.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, Typed_SV_Message_Queue, "$Id$")
-
-ACE_ALLOC_HOOK_DEFINE(ACE_Typed_SV_Message_Queue)
-
-template <class T> void
-ACE_Typed_SV_Message_Queue<T>::dump (void) const
-{
- ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::dump");
-}
-
-template <class T>
-ACE_Typed_SV_Message_Queue<T>::ACE_Typed_SV_Message_Queue (void)
-{
- ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::ACE_Typed_SV_Message_Queue");
-}
-
-template <class T>
-ACE_Typed_SV_Message_Queue<T>::ACE_Typed_SV_Message_Queue (key_t external_id,
- int create,
- int perms)
-{
- ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::ACE_Typed_SV_Message_Queue");
- if (this->open (external_id, create, perms) == -1)
- ACE_ERROR ((LM_ERROR,
- "ACE_Typed_SV_Message_Queue::ACE_Typed_SV_Message_Queue"));
-}
-
-template <class T>
-ACE_Typed_SV_Message_Queue<T>::~ACE_Typed_SV_Message_Queue (void)
-{
- ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::~ACE_Typed_SV_Message_Queue");
-}
-
-#endif /* ACE_TYPED_SV_MESSAGE_QUEUE_C */
diff --git a/ace/Typed_SV_Message_Queue.h b/ace/Typed_SV_Message_Queue.h
deleted file mode 100644
index 09752d33d65..00000000000
--- a/ace/Typed_SV_Message_Queue.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Typed_SV_Message_Queue.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_TYPED_MESSAGE_QUEUE_H
-#define ACE_TYPED_MESSAGE_QUEUE_H
-#include "ace/pre.h"
-
-#include "ace/SV_Message_Queue.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Typed_SV_Message.h"
-
-template <class T>
-class ACE_Typed_SV_Message_Queue
-{
- // = TITLE
- // Defines the header file for the C++ wrapper for message queues.
-public:
- enum
- {
- ACE_CREATE = IPC_CREAT,
- ACE_OPEN = 0,
- ACE_NOWAIT = IPC_NOWAIT
- };
-
- // = Initialization and termination operations.
- ACE_Typed_SV_Message_Queue (void);
- ACE_Typed_SV_Message_Queue (key_t external_id,
- int create = ACE_OPEN,
- int perms = ACE_DEFAULT_FILE_PERMS);
- int open (key_t external_id,
- int create = ACE_OPEN,
- int perms = ACE_DEFAULT_FILE_PERMS);
- int close (void);
- int remove (void);
- ~ACE_Typed_SV_Message_Queue (void);
-
- // = Send and recv methods.
- int send (const ACE_Typed_SV_Message<T> &mb, int mflags = 0);
- int recv (ACE_Typed_SV_Message<T> &mb, int mflags = 0);
-
- int control (int option, void *arg = 0);
- // Control the underlying message queue.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_SV_Message_Queue message_queue_;
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/Typed_SV_Message_Queue.i"
-#endif /* __ACE_INLINE__ */
-
-#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
-#include "ace/Typed_SV_Message_Queue.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
-#pragma implementation ("Typed_SV_Message_Queue.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include "ace/post.h"
-#endif /* ACE_TYPED_MESSAGE_QUEUE_H */
diff --git a/ace/Typed_SV_Message_Queue.i b/ace/Typed_SV_Message_Queue.i
deleted file mode 100644
index 41d44a64fed..00000000000
--- a/ace/Typed_SV_Message_Queue.i
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Typed_SV_Message_Queue.i
-
-#include "ace/SV_Message_Queue.h"
-
-template <class T> ACE_INLINE int
-ACE_Typed_SV_Message_Queue<T>::open (key_t external_id,
- int create,
- int perms)
-{
- ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::open");
- return this->message_queue_.open (external_id, create, perms);
-}
-
-// What does it mean to close a message queue?!
-
-template <class T> ACE_INLINE int
-ACE_Typed_SV_Message_Queue<T>::close (void)
-{
- ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::close");
- return 1;
-}
-
-template <class T> ACE_INLINE int
-ACE_Typed_SV_Message_Queue<T>::recv (ACE_Typed_SV_Message<T> &mb,
- int mflags)
-{
- ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::recv");
-
- int length = this->message_queue_.recv (ACE_reinterpret_cast (ACE_SV_Message &,
- mb),
- mb.max_size (),
- mb.type (),
- mflags);
- if (length != -1)
- mb.length (length);
-
- return length;
-}
-
-template <class T> ACE_INLINE int
-ACE_Typed_SV_Message_Queue<T>::send (const ACE_Typed_SV_Message<T> &mb,
- int mflags)
-{
- ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::send");
- return this->message_queue_.
- send (ACE_reinterpret_cast (ACE_SV_Message &,
- ACE_const_cast (ACE_Typed_SV_Message<T> &,
- mb)),
- mb.length (),
- mflags);
-}
-
-template <class T> ACE_INLINE int
-ACE_Typed_SV_Message_Queue<T>::remove (void)
-{
- ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::remove");
-
- return this->message_queue_.remove ();
-}
-
-template <class T> ACE_INLINE int
-ACE_Typed_SV_Message_Queue<T>::control (int option,
- void *arg)
-{
- ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::control");
-
- return this->message_queue_.control (option, arg);
-}
diff --git a/ace/UNIX_Addr.cpp b/ace/UNIX_Addr.cpp
deleted file mode 100644
index 5b580cff1ce..00000000000
--- a/ace/UNIX_Addr.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-// UNIX_Addr.cpp
-// $Id$
-
-#include "ace/UNIX_Addr.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/UNIX_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, UNIX_Addr, "$Id$")
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-ACE_ALLOC_HOOK_DEFINE(ACE_UNIX_Addr)
-
-// Set a pointer to the address.
-void
-ACE_UNIX_Addr::set_addr (void *addr, int len)
-{
- ACE_TRACE ("ACE_UNIX_Addr::set_addr");
-
- this->ACE_Addr::base_set (AF_UNIX, len);
- ACE_OS::memcpy ((void *) &this->unix_addr_,
- (void *) addr,
- len);
-}
-
-void
-ACE_UNIX_Addr::dump (void) const
-{
-}
-
-// Do nothing constructor.
-
-ACE_UNIX_Addr::ACE_UNIX_Addr (void)
- : ACE_Addr (AF_UNIX, sizeof this->unix_addr_)
-{
- (void) ACE_OS::memset ((void *) &this->unix_addr_,
- 0,
- sizeof this->unix_addr_);
-
- this->unix_addr_.sun_family = AF_UNIX;
-}
-
-int
-ACE_UNIX_Addr::set (const ACE_UNIX_Addr &sa)
-{
- if (sa.get_type () == AF_ANY)
- (void) ACE_OS::memset ((void *) &this->unix_addr_,
- 0,
- sizeof this->unix_addr_);
- else
- ACE_OS::strcpy (this->unix_addr_.sun_path,
- sa.unix_addr_.sun_path);
-
- this->unix_addr_.sun_family = AF_UNIX;
- this->base_set (sa.get_type (), sa.get_size ());
-
- return 0;
-}
-
-// Copy constructor.
-
-ACE_UNIX_Addr::ACE_UNIX_Addr (const ACE_UNIX_Addr &sa)
- : ACE_Addr (AF_UNIX, sa.get_size ())
-{
- this->set (sa);
-}
-
-int
-ACE_UNIX_Addr::set (const sockaddr_un *un, int len)
-{
- (void) ACE_OS::memset ((void *) &this->unix_addr_, 0,
- sizeof this->unix_addr_);
- this->unix_addr_.sun_family = AF_UNIX;
- ACE_OS::strcpy (this->unix_addr_.sun_path, un->sun_path);
- this->base_set (AF_UNIX, len);
- return 0;
-}
-
-ACE_UNIX_Addr::ACE_UNIX_Addr (const sockaddr_un *un, int len)
-{
- this->set (un, len);
-}
-
-int
-ACE_UNIX_Addr::set (const char rendezvous_point[])
-{
- (void) ACE_OS::memset ((void *) &this->unix_addr_,
- 0,
- sizeof this->unix_addr_);
- this->unix_addr_.sun_family = AF_UNIX;
- size_t len = ACE_OS::strlen (rendezvous_point);
- size_t maxlen = sizeof this->unix_addr_.sun_path;
-
- (void) ACE_OS::memcpy (this->unix_addr_.sun_path,
- rendezvous_point,
- len >= maxlen ? maxlen - 1 : len);
-
- this->ACE_Addr::base_set (AF_UNIX,
- sizeof this->unix_addr_ -
- sizeof (this->unix_addr_.sun_path) +
- ACE_OS::strlen (this->unix_addr_.sun_path));
- return 0;
-}
-
-// Create a ACE_Addr from a UNIX pathname.
-
-ACE_UNIX_Addr::ACE_UNIX_Addr (const char rendezvous_point[])
-{
- this->set (rendezvous_point);
-}
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
diff --git a/ace/UNIX_Addr.h b/ace/UNIX_Addr.h
deleted file mode 100644
index af00161b766..00000000000
--- a/ace/UNIX_Addr.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// UNIX_Addr.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_UNIX_ADDR_H
-#define ACE_UNIX_ADDR_H
-#include "ace/pre.h"
-
-#include "ace/Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-class ACE_Export ACE_UNIX_Addr : public ACE_Addr
-{
- // = TITLE
- // Defines the ``UNIX domain address family'' address format.
-public:
- // = Initialization methods.
- ACE_UNIX_Addr (void);
- // Default constructor.
-
- ACE_UNIX_Addr (const ACE_UNIX_Addr &sa);
- // Copy constructor.
-
- ACE_UNIX_Addr (const char rendezvous_point[]);
- // Creates an ACE_UNIX_Addr from a string.
-
- ACE_UNIX_Addr (const sockaddr_un *, int len);
- // Creates an ACE_INET_Addr from a sockaddr_un structure.
-
- int set (const ACE_UNIX_Addr &sa);
- // Creates an ACE_UNIX_Addr from another <ACE_UNIX_Addr>.
-
- int set (const char rendezvous_point[]);
- // Creates an ACE_UNIX_Addr from a string.
-
- int set (const sockaddr_un *, int len);
- // Creates an ACE_UNIX_Addr from a sockaddr_un structure.
-
- virtual void *get_addr (void) const;
- // Return a pointer to the underlying network address.
-
- virtual void set_addr (void *addr, int len);
- // Set a pointer to the underlying network address.
-
- virtual int addr_to_string (char addr[], size_t) const;
- // Transform the current address into string format.
-
- virtual int string_to_addr (const char addr[]);
- // Transform the string into the current addressing format.
-
- int operator == (const ACE_UNIX_Addr &SAP) const;
- // Compare two addresses for equality.
-
- int operator != (const ACE_UNIX_Addr &SAP) const;
- // Compare two addresses for inequality.
-
- const char *get_path_name (void) const;
- // Return the path name of the underlying rendezvous point.
-
- virtual u_long hash (void) const;
- // Computes and returns hash value.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- sockaddr_un unix_addr_;
- // Underlying socket address.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/UNIX_Addr.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
-#include "ace/post.h"
-#endif /* ACE_UNIX_ADDR_H */
diff --git a/ace/UNIX_Addr.i b/ace/UNIX_Addr.i
deleted file mode 100644
index af6014b6489..00000000000
--- a/ace/UNIX_Addr.i
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// UNIX_Addr.i
-
-#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-
-// Return a pointer to the underlying address.
-
-ACE_INLINE void *
-ACE_UNIX_Addr::get_addr (void) const
-{
- return (void *) &this->unix_addr_;
-}
-
-// Transform the string into the current addressing format.
-
-ACE_INLINE int
-ACE_UNIX_Addr::string_to_addr (const char addr[])
-{
- ACE_OS::strncpy (this->unix_addr_.sun_path, addr,
- sizeof this->unix_addr_.sun_path);
- return 0;
-}
-
-// Transform the current address into string format.
-
-ACE_INLINE int
-ACE_UNIX_Addr::addr_to_string (char s[], size_t len) const
-{
- ACE_OS::strncpy (s, this->unix_addr_.sun_path, len);
- return 0;
-}
-
-// Compare two addresses for equality.
-
-ACE_INLINE int
-ACE_UNIX_Addr::operator == (const ACE_UNIX_Addr &sap) const
-{
- return ACE_OS::strncmp (this->unix_addr_.sun_path,
- sap.unix_addr_.sun_path,
- sizeof this->unix_addr_.sun_path) == 0;
-}
-
-// Compare two addresses for inequality.
-
-ACE_INLINE int
-ACE_UNIX_Addr::operator != (const ACE_UNIX_Addr &sap) const
-{
- return !((*this) == sap); // This is lazy, of course... ;-)
-}
-
-// Return the path name used for the rendezvous point.
-
-ACE_INLINE const char *
-ACE_UNIX_Addr::get_path_name (void) const
-{
- return this->unix_addr_.sun_path;
-}
-
-ACE_INLINE u_long
-ACE_UNIX_Addr::hash (void) const
-{
- return ACE::hash_pjw (this->unix_addr_.sun_path);
-}
-
-#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
diff --git a/ace/UPIPE_Acceptor.cpp b/ace/UPIPE_Acceptor.cpp
deleted file mode 100644
index 63a217d56c0..00000000000
--- a/ace/UPIPE_Acceptor.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-// UPIPE_Acceptor.cpp
-// $Id$
-
-#include "ace/UPIPE_Acceptor.h"
-
-ACE_RCSID(ace, UPIPE_Acceptor, "$Id$")
-
-#if defined (ACE_HAS_THREADS)
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/UPIPE_Acceptor.i"
-#endif
-
-ACE_ALLOC_HOOK_DEFINE(ACE_UPIPE_Acceptor)
-
-void
-ACE_UPIPE_Acceptor::dump (void) const
-{
- ACE_TRACE ("ACE_UPIPE_Acceptor::dump");
-}
-
-/* Do nothing routine for constructor. */
-
-ACE_UPIPE_Acceptor::ACE_UPIPE_Acceptor (void)
- : mb_ (sizeof (ACE_UPIPE_Stream *))
-{
- ACE_TRACE ("ACE_UPIPE_Acceptor::ACE_UPIPE_Acceptor");
-}
-
-ACE_UPIPE_Acceptor::~ACE_UPIPE_Acceptor (void)
-{
- ACE_TRACE ("ACE_UPIPE_Acceptor::~ACE_UPIPE_Acceptor");
-}
-
-// General purpose routine for performing server ACE_UPIPE.
-
-int
-ACE_UPIPE_Acceptor::open (const ACE_UPIPE_Addr &local_addr,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_UPIPE_Acceptor::open");
- return this->ACE_SPIPE_Acceptor::open (local_addr, reuse_addr);
-}
-
-int
-ACE_UPIPE_Acceptor::close (void)
-{
- ACE_TRACE ("ACE_UPIPE_Acceptor::close");
- return this->ACE_SPIPE_Acceptor::close ();
-}
-
-// General purpose routine for accepting new connections.
-
-ACE_UPIPE_Acceptor::ACE_UPIPE_Acceptor (const ACE_UPIPE_Addr &local_addr,
- int reuse_addr)
- : mb_ (sizeof (ACE_UPIPE_Stream *))
-{
- ACE_TRACE ("ACE_UPIPE_Acceptor::ACE_UPIPE_Acceptor");
-
- if (this->open (local_addr, reuse_addr) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_UPIPE_Acceptor")));
-}
-
-int
-ACE_UPIPE_Acceptor::accept (ACE_UPIPE_Stream &new_stream,
- ACE_UPIPE_Addr *remote_addr,
- ACE_Time_Value *timeout,
- int restart,
- int reset_new_handle)
-{
- ACE_TRACE ("ACE_UPIPE_Acceptor::accept");
- ACE_UNUSED_ARG (reset_new_handle);
-
- ACE_SPIPE_Stream new_io;
-
- if (this->ACE_SPIPE_Acceptor::accept (new_io, remote_addr,
- timeout, restart) == -1)
- return -1;
- else
- {
- ACE_UPIPE_Stream *remote_stream = 0;
-
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, new_stream.lock_, -1));
-
- new_stream.set_handle (new_io.get_handle ());
- new_stream.reference_count_++;
-
- // Transfer address ownership.
- new_io.get_local_addr (new_stream.local_addr_);
- new_io.get_remote_addr (new_stream.remote_addr_);
-
- // Now that we got the handle, we'll read the address of the
- // connector-side ACE_UPIPE_Stream out of the pipe and link that
- // ACE_UPIPE_Stream to our ACE_UPIPE_Stream.
-
- if (ACE_OS::read (new_stream.get_handle (),
- (char *) &remote_stream,
- sizeof remote_stream) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_UPIPE_Acceptor: %p\n"),
- ACE_TEXT ("read stream address failed")));
- else if (new_stream.stream_.link (remote_stream->stream_) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_UPIPE_Acceptor: %p\n"),
- ACE_TEXT ("link streams failed")));
- // Send a message over the new streampipe to confirm acceptance.
- else if (new_stream.send (&mb_, 0) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_UPIPE_Acceptor: %p\n"),
- ACE_TEXT ("linked stream.put failed")));
-
- // Close down the new_stream at this point in order to conserve
- // handles. Note that we don't need the SPIPE connection
- // anymore since we're now linked via the <Message_Queue>.
- new_stream.ACE_SPIPE::close ();
- return 0;
- }
-}
-
-#endif /* ACE_HAS_THREADS */
diff --git a/ace/UPIPE_Acceptor.h b/ace/UPIPE_Acceptor.h
deleted file mode 100644
index fcad01e71d3..00000000000
--- a/ace/UPIPE_Acceptor.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// UPIPE_Acceptor.h
-//
-// = AUTHOR
-// Gerhard Lenzer and Douglas C. Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_UPIPE_ACCEPTOR_H
-#define ACE_UPIPE_ACCEPTOR_H
-#include "ace/pre.h"
-
-#include "ace/UPIPE_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch.h"
-#include "ace/SPIPE_Acceptor.h"
-#include "ace/Thread_Manager.h"
-
-#if defined (ACE_HAS_THREADS)
-
-class ACE_Export ACE_UPIPE_Acceptor : public ACE_SPIPE_Acceptor
-{
- // = TITLE
- // Defines the format and interface for the listener side of the
- // ACE_UPIPE_Stream.
-public:
- // = Initialization and termination.
- ACE_UPIPE_Acceptor (void);
- // Default constructor.
-
- ACE_UPIPE_Acceptor (const ACE_UPIPE_Addr &local_sap,
- int reuse_addr = 0);
- // Initialize passive endpoint.
-
- int open (const ACE_UPIPE_Addr &local_sap,
- int reuse_addr = 0);
- // Initialize passive endpoint.
-
- ~ACE_UPIPE_Acceptor (void);
- // Close down and release resources.
-
- int close (void);
- // Close down and release resources.
-
- int remove (void);
- // Close down and release resources and remove the underlying SPIPE
- // rendezvous point.
-
- // = Passive connection acceptance method.
- int accept (ACE_UPIPE_Stream &server_stream,
- ACE_UPIPE_Addr *remote_addr = 0,
- ACE_Time_Value *timeout = 0,
- int restart = 1,
- int reset_new_handle = 0);
- // Accept a new data transfer connection. A <timeout> of 0 means
- // block forever, a <timeout> of {0, 0} means poll. <restart> == 1
- // means "restart if interrupted."
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Thread_Manager tm;
- // Manage threads.
-
- ACE_Message_Block mb_;
- // To confirm connection establishment.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/UPIPE_Acceptor.i"
-#endif
-
-#endif /* ACE_HAS_THREADS */
-#include "ace/post.h"
-#endif /* ACE_UPIPE_ACCEPTOR_H */
diff --git a/ace/UPIPE_Acceptor.i b/ace/UPIPE_Acceptor.i
deleted file mode 100644
index d47cf593242..00000000000
--- a/ace/UPIPE_Acceptor.i
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// UPIPE_Acceptor.i
-
-ASYS_INLINE int
-ACE_UPIPE_Acceptor::remove (void)
-{
- ACE_TRACE ("ACE_UPIPE_Acceptor::remove");
- return this->ACE_SPIPE_Acceptor::remove ();
-}
diff --git a/ace/UPIPE_Addr.h b/ace/UPIPE_Addr.h
deleted file mode 100644
index d0b37436555..00000000000
--- a/ace/UPIPE_Addr.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// UPIPE_Addr.h
-//
-// = AUTHOR
-// Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_UPIPE_ADDR_H
-#define ACE_UPIPE_ADDR_H
-#include "ace/pre.h"
-
-#include "ace/SPIPE_Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-typedef ACE_SPIPE_Addr ACE_UPIPE_Addr;
-
-#if 0
-// We need this "class" to make the class2man documentation utility
-// happy.
-class ACE_Export ACE_UPIPE_Addr
-{
- // = TITLE
- // Defines the ACE "user pipe" address family address format.
- //
- // = DESCRIPTION
- // This class has an identical interface to the <ACE_SPIPE_Addr>
- // class. In fact, it's simply a typedef!
-public:
- // = Same interface as <ACE_SPIPE_Addr>.
-};
-#endif /* 0 */
-#include "ace/post.h"
-#endif /* ACE_UPIPE_ADDR_H */
diff --git a/ace/UPIPE_Connector.cpp b/ace/UPIPE_Connector.cpp
deleted file mode 100644
index 51db226f879..00000000000
--- a/ace/UPIPE_Connector.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-// UPIPE_Connector.cpp
-// $Id$
-
-#include "ace/UPIPE_Connector.h"
-
-ACE_RCSID(ace, UPIPE_Connector, "$Id$")
-
-#if defined (ACE_HAS_THREADS)
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/UPIPE_Connector.i"
-#endif
-
-ACE_ALLOC_HOOK_DEFINE(ACE_UPIPE_Connector)
-
-void
-ACE_UPIPE_Connector::dump (void) const
-{
- ACE_TRACE ("ACE_UPIPE_Connector::dump");
-}
-
-ACE_UPIPE_Connector::ACE_UPIPE_Connector (void)
-{
- ACE_TRACE ("ACE_UPIPE_Connector::ACE_UPIPE_Connector");
-}
-
-int
-ACE_UPIPE_Connector::connect (ACE_UPIPE_Stream &new_stream,
- const ACE_UPIPE_Addr &addr,
- ACE_Time_Value *timeout,
- const ACE_Addr & /* local_sap */,
- int /* reuse_addr */,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_UPIPE_Connector::connect");
- ACE_ASSERT (new_stream.get_handle () == ACE_INVALID_HANDLE);
-
- ACE_HANDLE handle = ACE::handle_timed_open (timeout,
- addr.get_path_name (),
- flags, perms);
-
- if (handle == ACE_INVALID_HANDLE)
- return -1;
-#if !defined (ACE_WIN32)
- else if (ACE_OS::isastream (handle) != 1)
- return -1;
-#endif
- else // We're connected!
- {
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, new_stream.lock_, -1));
-
- ACE_UPIPE_Stream *ustream = &new_stream;
-
- new_stream.set_handle (handle);
- new_stream.remote_addr_ = addr; // class copy.
- new_stream.reference_count_++;
-
- // Now send the address of our ACE_UPIPE_Stream over this pipe
- // to our corresponding ACE_UPIPE_Acceptor, so he may link the
- // two streams.
- ssize_t result = ACE_OS::write (handle,
- (const char *) &ustream,
- sizeof ustream);
- if (result == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_UPIPE_Connector %p\n"),
- ACE_TEXT ("write to pipe failed")));
-
- // Wait for confirmation of stream linking.
- ACE_Message_Block *mb_p = 0;
-
- // Our part is done, wait for server to confirm connection.
- result = new_stream.recv (mb_p, 0);
-
- // Do *not* coalesce the following two checks for result == -1.
- // They perform different checks and cannot be merged.
- if (result == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("ACE_UPIPE_Connector %p\n"),
- ACE_TEXT ("no confirmation from server")));
- else
- // Close down the new_stream at this point in order to
- // conserve handles. Note that we don't need the SPIPE
- // connection anymore since we're linked via the Message_Queue
- // now.
- new_stream.ACE_SPIPE::close ();
- return result;
- }
-}
-#endif /* ACE_HAS_THREADS */
diff --git a/ace/UPIPE_Connector.h b/ace/UPIPE_Connector.h
deleted file mode 100644
index b4132f5d6d8..00000000000
--- a/ace/UPIPE_Connector.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// UPIPE_Connector.h
-//
-// = AUTHOR
-// Gerhard Lenzer and Douglas C. Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_UPIPE_CONNECTOR_H
-#define ACE_UPIPE_CONNECTOR_H
-#include "ace/pre.h"
-
-#include "ace/UPIPE_Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch.h"
-#include "ace/SPIPE_Stream.h"
-
-#if defined (ACE_HAS_THREADS)
-
-class ACE_Export ACE_UPIPE_Connector
-{
- // = TITLE
- // Defines an active connection factory for the
- // <ACE_UPIPE_STREAM> wrappers.
-public:
- // = Initialization methods.
- ACE_UPIPE_Connector (void);
- // Default constructor.
-
- ACE_UPIPE_Connector (ACE_UPIPE_Stream &new_stream,
- const ACE_UPIPE_Addr &addr,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
- // The <flags> and <perms> arguments are passed down to the <open>
- // method.
-
- int connect (ACE_UPIPE_Stream &new_stream,
- const ACE_UPIPE_Addr &addr,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
- // The <flags> and <perms> arguments are passed down to the <open>
- // method.
-
- int reset_new_handle (ACE_HANDLE handle);
- // Resets any event associations on this handle
-
- // = Meta-type info
- typedef ACE_UPIPE_Addr PEER_ADDR;
- typedef ACE_UPIPE_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/UPIPE_Connector.i"
-#endif
-
-#endif /* ACE_HAS_THREADS */
-#include "ace/post.h"
-#endif /* ACE_UPIPE_CONNECTOR_H */
diff --git a/ace/UPIPE_Connector.i b/ace/UPIPE_Connector.i
deleted file mode 100644
index cc7c580b8f8..00000000000
--- a/ace/UPIPE_Connector.i
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// UPIPE_Connector.i
-
-// Creates a Local ACE_UPIPE.
-
-ASYS_INLINE
-ACE_UPIPE_Connector::ACE_UPIPE_Connector (ACE_UPIPE_Stream &new_stream,
- const ACE_UPIPE_Addr &addr,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms)
-{
- ACE_TRACE ("ACE_UPIPE_Connector::ACE_UPIPE_Connector");
- if (this->connect (new_stream, addr, timeout, local_sap,
- reuse_addr, flags, perms) == -1
- && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("address %s, %p\n"),
- addr.get_path_name (),
- ACE_TEXT ("ACE_UPIPE_Connector")));
-}
-
-ASYS_INLINE int
-ACE_UPIPE_Connector::reset_new_handle (ACE_HANDLE handle)
-{
- ACE_UNUSED_ARG (handle);
- // Nothing to do here since the handle is not a socket
- return 0;
-}
diff --git a/ace/UPIPE_Stream.cpp b/ace/UPIPE_Stream.cpp
deleted file mode 100644
index dd1aca73cc3..00000000000
--- a/ace/UPIPE_Stream.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-// UPIPE_Stream.cpp
-// $Id$
-
-#include "ace/UPIPE_Stream.h"
-
-ACE_RCSID(ace, UPIPE_Stream, "$Id$")
-
-#if defined (ACE_HAS_THREADS)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/UPIPE_Stream.i"
-#endif /* __ACE_INLINE__ */
-
-
-ACE_ALLOC_HOOK_DEFINE(ACE_UPIPE_Stream)
-
-ACE_UPIPE_Stream::ACE_UPIPE_Stream (void)
- : mb_last_ (0),
- remaining_ (0),
- reference_count_ (0)
-{
- ACE_TRACE ("ACE_UPIPE_Stream::ACE_UPIPE_STREAM");
-}
-
-ACE_UPIPE_Stream::~ACE_UPIPE_Stream (void)
-{
- if (this->mb_last_ != 0)
- this->mb_last_->release ();
-}
-
-int
-ACE_UPIPE_Stream::control (int cmd,
- void * val) const
-{
- ACE_TRACE ("ACE_UPIPE_Stream::control");
-
- return ((ACE_UPIPE_Stream *) this)->stream_.control
- ((ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds) cmd, val);
-}
-
-void
-ACE_UPIPE_Stream::dump (void) const
-{
- ACE_TRACE ("ACE_UPIPE_Stream::dump");
-}
-
-int
-ACE_UPIPE_Stream::close (void)
-{
- ACE_TRACE ("ACE_UPIPE_Stream::close");
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1));
-
- this->reference_count_--;
-
- if (this->reference_count_ == 0)
- {
- // Since the UPIPE should have been closed earlier we won't bother
- // checking to see if closing it now fails.
-
- if (this->ACE_SPIPE::get_handle () != ACE_INVALID_HANDLE)
- this->ACE_SPIPE::close ();
-
- // Close down the ACE_stream.
- return this->stream_.close ();
- }
- return 0;
-}
-
-int
-ACE_UPIPE_Stream::get_remote_addr (ACE_UPIPE_Addr &remote_sap) const
-{
- ACE_TRACE ("ACE_UPIPE_Stream::get_remote_addr");
- remote_sap = this->remote_addr_;
- return 0;
-}
-
-int
-ACE_UPIPE_Stream::send (ACE_Message_Block *mb_p,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_UPIPE_Stream::send_msg");
- return this->stream_.put (mb_p, timeout) == -1 ? -1 : 0;
-}
-
-int ACE_UPIPE_Stream::recv (ACE_Message_Block *& mb_p,
- ACE_Time_Value *timeout)
-{
- return this->stream_.get (mb_p, timeout) == -1 ? -1 : 0;
-}
-
-// Send a buffer.
-
-int
-ACE_UPIPE_Stream::send (const char *buffer,
- size_t n,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_UPIPE_Stream::send");
-
- ACE_Message_Block *mb_p;
- ACE_NEW_RETURN (mb_p,
- ACE_Message_Block (n),
- -1);
- mb_p->copy (buffer, n);
- return this->stream_.put (mb_p, timeout) == -1 ? -1 : (int) n;
-}
-
-// Receive a buffer.
-
-int
-ACE_UPIPE_Stream::recv (char *buffer,
- size_t n,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_UPIPE_Stream::recv");
- // Index in buffer.
- size_t bytes_read = 0;
-
- while (bytes_read < n)
- if (this->mb_last_ != 0)
- {
- // We have remaining data in our last read Message_Buffer.
-
- if (this->remaining_ < n)
- {
- // The remaining data is not enough.
-
- ACE_OS::memcpy ((void *) &buffer[bytes_read],
- this->mb_last_->rd_ptr (),
- this->remaining_);
- bytes_read += this->remaining_;
- this->remaining_ = 0;
- this->mb_last_ = this->mb_last_->release ();
- return bytes_read;
- }
- else
- {
- // The remaining data is at least enough. If there's
- // more, we'll get it the next time through.
-
- ACE_OS::memcpy (&buffer[bytes_read],
- this->mb_last_->rd_ptr (),
- n);
- bytes_read += n;
-
- // Advance rd_ptr.
- this->mb_last_->rd_ptr (n);
- this->remaining_ -= n;
-
- if (this->remaining_ == 0)
- // Now the Message_Buffer is empty.
-
- this->mb_last_ = this->mb_last_->release ();
- }
- }
- else
- {
- // We have to get a new Message_Buffer from our stream.
-
- int result = this->stream_.get (this->mb_last_, timeout);
-
- if (result == -1)
- {
- if (errno == EWOULDBLOCK && bytes_read > 0)
- // Return the number of bytes read before we timed out.
- return bytes_read;
- else
- return -1;
- }
- this->remaining_ = this->mb_last_->size ();
- }
-
- return bytes_read;
-}
-
-int
-ACE_UPIPE_Stream::send_n (const char *buf,
- size_t n,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_UPIPE_Stream::send_n");
-
- size_t bytes_written;
- ssize_t len = 0;
-
- for (bytes_written = 0;
- bytes_written < n;
- bytes_written += len)
- {
- len = this->send (buf + bytes_written,
- n - bytes_written,
- timeout);
-
- if (len == -1)
- return -1;
- }
-
- return bytes_written;
-}
-
-int
-ACE_UPIPE_Stream::recv_n (char *buf,
- size_t n,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_UPIPE_Stream::recv_n");
- size_t bytes_read;
- ssize_t len = 0;
-
- for (bytes_read = 0;
- bytes_read < n;
- bytes_read += len)
- {
- len = this->recv (buf + bytes_read,
- n - bytes_read,
- timeout);
- if (len == -1)
- return -1;
- else if (len == 0)
- break;
- }
-
- return bytes_read;
-}
-
-
-#endif /* ACE_HAS_THREADS */
diff --git a/ace/UPIPE_Stream.h b/ace/UPIPE_Stream.h
deleted file mode 100644
index ce7ba6e0e00..00000000000
--- a/ace/UPIPE_Stream.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// UPIPE_Stream.h
-//
-// = AUTHOR
-// Gerhard Lenzer and Douglas C. Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_UPIPE_STREAM_H
-#define ACE_UPIPE_STREAM_H
-#include "ace/pre.h"
-
-#include "ace/Stream.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Synch.h"
-#include "ace/SPIPE.h"
-#include "ace/Message_Queue.h"
-#include "ace/UPIPE_Addr.h"
-
-#if defined (ACE_HAS_THREADS)
-
-// Use a typedef to make life easier later on.
-typedef ACE_Stream<ACE_SYNCH> MT_Stream;
-
-class ACE_Export ACE_UPIPE_Stream : public ACE_SPIPE
-{
- // = TITLE
- // Defines the method that transfer data on a UPIPE.
-public:
- friend class ACE_UPIPE_Acceptor;
- friend class ACE_UPIPE_Connector;
-
- // = Initialization and Termination.
-
- ACE_UPIPE_Stream (void);
-
- virtual ~ACE_UPIPE_Stream (void);
-
- int close (void);
- // Shut down the UPIPE and release resources.
-
- ACE_HANDLE get_handle (void) const;
- // Return the underlying I/O handle.
-
- // = Send/recv ACE Message_Blocks.
- int send (ACE_Message_Block *mb_p,
- ACE_Time_Value *timeout = 0);
- // Send a message through the message queue. Returns -1 on error,
- // else 0.
-
- int recv (ACE_Message_Block *&mb_p,
- ACE_Time_Value *timeout = 0);
- // Recv a message from the message queue. Returns -1 on error, else
- // 0.
-
- // = Send/recv char buffers.
- int send (const char *buffer,
- size_t n,
- ACE_Time_Value *timeout = 0);
- // Send a buffer of <n> bytes through the message queue. Returns -1
- // on error, else number of bytes sent.
-
- int recv (char *buffer,
- size_t n,
- ACE_Time_Value *timeout = 0);
- // Recv a buffer of upto <n> bytes from the message queue. Returns
- // -1 on error, else number of bytes read.
-
- int send_n (const char *buffer,
- size_t n,
- ACE_Time_Value *timeout = 0);
- // Send a buffer of exactly <n> bytes to the message queue. Returns
- // -1 on error, else number of bytes written (which should == n).
-
- int recv_n (char *buffer,
- size_t n,
- ACE_Time_Value *timeout = 0);
- // Recv a buffer of exactly <n> bytes from the message queue.
- // Returns -1 on error, else the number of bytes read.
-
- int control (int cmd, void *val) const;
- // Perform control operations on the UPIPE_Stream.
-
- int get_remote_addr (ACE_UPIPE_Addr &remote_sap) const;
- // Return the remote address we are connected to.
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
-private:
- ACE_Message_Block *mb_last_;
- // To hold the last ACE_Message_Block read out of the stream. Thus
- // allowing subsequent reads from one ACE_Message_Block
-
- size_t remaining_;
- // Holds the number of bytes that are still available in mb_last_.
-
- ACE_UPIPE_Addr remote_addr_;
- // Address of who we are connected to.
-
- MT_Stream stream_;
- // Stream component used by the <UPIPE_Acceptor> and
- // <UPIPE_Connector> to link together two UPIPE_Streams.
-
- int reference_count_;
- // Keep track of whether the sender and receiver have both shut
- // down.
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- ACE_Thread_Mutex lock_;
- // Ensure that we are thread-safe.
-#endif /* ACE_MT_SAFE */
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/UPIPE_Stream.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_THREADS */
-#include "ace/post.h"
-#endif /*ACE_UPIPE_STREAM_H */
diff --git a/ace/UPIPE_Stream.i b/ace/UPIPE_Stream.i
deleted file mode 100644
index c2297fcffce..00000000000
--- a/ace/UPIPE_Stream.i
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// UPIPE_Stream.i
-
-ACE_INLINE ACE_HANDLE
-ACE_UPIPE_Stream::get_handle (void) const
-{
- ACE_TRACE ("ACE_UPIPE_Stream::get_handle");
- return this->ACE_SPIPE::get_handle ();
-}
-
diff --git a/ace/Version.h b/ace/Version.h
deleted file mode 100644
index 2dcee21d71e..00000000000
--- a/ace/Version.h
+++ /dev/null
@@ -1,7 +0,0 @@
-// $Id$
-// This is an automatically generated file.
-
-#define ACE_MAJOR_VERSION 5
-#define ACE_MINOR_VERSION 1
-#define ACE_BETA_VERSION 3
-#define ACE_VERSION "5.1.3"
diff --git a/ace/WFMO_Reactor.cpp b/ace/WFMO_Reactor.cpp
deleted file mode 100644
index c5ec97b0a7d..00000000000
--- a/ace/WFMO_Reactor.cpp
+++ /dev/null
@@ -1,2334 +0,0 @@
-// $Id$
-
-#include "ace/WFMO_Reactor.h"
-
-#include "ace/Handle_Set.h"
-#include "ace/Timer_Heap.h"
-#include "ace/Thread.h"
-
-#if !defined (__ACE_INLINE__)
-#include "ace/WFMO_Reactor.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(ace, WFMO_Reactor, "$Id$")
-
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
-
-#include "ace/Auto_Ptr.h"
-
-ACE_WFMO_Reactor_Handler_Repository::ACE_WFMO_Reactor_Handler_Repository (ACE_WFMO_Reactor &wfmo_reactor)
- : wfmo_reactor_ (wfmo_reactor)
-{
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::open (size_t size)
-{
- if (size > MAXIMUM_WAIT_OBJECTS)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%d exceeds MAXIMUM_WAIT_OBJECTS (%d)\n"),
- size,
- MAXIMUM_WAIT_OBJECTS),
- -1);
-
- // Dynamic allocation
- ACE_NEW_RETURN (this->current_handles_,
- ACE_HANDLE[size],
- -1);
- ACE_NEW_RETURN (this->current_info_,
- Current_Info[size],
- -1);
- ACE_NEW_RETURN (this->current_suspended_info_,
- Suspended_Info[size],
- -1);
- ACE_NEW_RETURN (this->to_be_added_info_,
- To_Be_Added_Info[size],
- -1);
-
- // Initialization
- this->max_size_ = size;
- this->max_handlep1_ = 0;
- this->suspended_handles_ = 0;
- this->handles_to_be_added_ = 0;
- this->handles_to_be_deleted_ = 0;
- this->handles_to_be_suspended_ = 0;
- this->handles_to_be_resumed_ = 0;
-
- for (size_t i = 0; i < size; i++)
- this->current_handles_[i] = ACE_INVALID_HANDLE;
-
- return 0;
-}
-
-ACE_WFMO_Reactor_Handler_Repository::~ACE_WFMO_Reactor_Handler_Repository (void)
-{
- // Free up dynamically allocated space
- delete [] this->current_handles_;
- delete [] this->current_info_;
- delete [] this->current_suspended_info_;
- delete [] this->to_be_added_info_;
-}
-
-ACE_Reactor_Mask
-ACE_WFMO_Reactor_Handler_Repository::bit_ops (long &existing_masks,
- ACE_Reactor_Mask change_masks,
- int operation)
-{
- // Find the old reactor masks. This automatically does the work of
- // the GET_MASK operation.
-
- ACE_Reactor_Mask old_masks = ACE_Event_Handler::NULL_MASK;
-
- if (ACE_BIT_ENABLED (existing_masks, FD_READ)
- || ACE_BIT_ENABLED (existing_masks, FD_CLOSE))
- ACE_SET_BITS (old_masks, ACE_Event_Handler::READ_MASK);
-
- if (ACE_BIT_ENABLED (existing_masks, FD_WRITE))
- ACE_SET_BITS (old_masks, ACE_Event_Handler::WRITE_MASK);
-
- if (ACE_BIT_ENABLED (existing_masks, FD_OOB))
- ACE_SET_BITS (old_masks, ACE_Event_Handler::EXCEPT_MASK);
-
- if (ACE_BIT_ENABLED (existing_masks, FD_ACCEPT))
- ACE_SET_BITS (old_masks, ACE_Event_Handler::ACCEPT_MASK);
-
- if (ACE_BIT_ENABLED (existing_masks, FD_CONNECT))
- ACE_SET_BITS (old_masks, ACE_Event_Handler::CONNECT_MASK);
-
- if (ACE_BIT_ENABLED (existing_masks, FD_QOS))
- ACE_SET_BITS (old_masks, ACE_Event_Handler::QOS_MASK);
-
- if (ACE_BIT_ENABLED (existing_masks, FD_GROUP_QOS))
- ACE_SET_BITS (old_masks, ACE_Event_Handler::GROUP_QOS_MASK);
-
- switch (operation)
- {
- case ACE_Reactor::CLR_MASK:
- // For the CLR_MASK operation, clear only the specific masks.
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::READ_MASK))
- {
- ACE_CLR_BITS (existing_masks, FD_READ);
- ACE_CLR_BITS (existing_masks, FD_CLOSE);
- }
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::WRITE_MASK))
- ACE_CLR_BITS (existing_masks, FD_WRITE);
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::EXCEPT_MASK))
- ACE_CLR_BITS (existing_masks, FD_OOB);
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::ACCEPT_MASK))
- ACE_CLR_BITS (existing_masks, FD_ACCEPT);
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::CONNECT_MASK))
- ACE_CLR_BITS (existing_masks, FD_CONNECT);
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::QOS_MASK))
- ACE_CLR_BITS (existing_masks, FD_QOS);
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::GROUP_QOS_MASK))
- ACE_CLR_BITS (existing_masks, FD_GROUP_QOS);
-
- break;
-
- case ACE_Reactor::SET_MASK:
- // If the operation is a set, first reset any existing masks
-
- existing_masks = 0;
- /* FALLTHRU */
-
- case ACE_Reactor::ADD_MASK:
- // For the ADD_MASK and the SET_MASK operation, add only the
- // specific masks.
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::READ_MASK))
- {
- ACE_SET_BITS (existing_masks, FD_READ);
- ACE_SET_BITS (existing_masks, FD_CLOSE);
- }
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::WRITE_MASK))
- ACE_SET_BITS (existing_masks, FD_WRITE);
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::EXCEPT_MASK))
- ACE_SET_BITS (existing_masks, FD_OOB);
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::ACCEPT_MASK))
- ACE_SET_BITS (existing_masks, FD_ACCEPT);
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::CONNECT_MASK))
- ACE_SET_BITS (existing_masks, FD_CONNECT);
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::QOS_MASK))
- ACE_SET_BITS (existing_masks, FD_QOS);
-
- if (ACE_BIT_ENABLED (change_masks, ACE_Event_Handler::GROUP_QOS_MASK))
- ACE_SET_BITS (existing_masks, FD_GROUP_QOS);
-
- break;
-
- case ACE_Reactor::GET_MASK:
-
- // The work for this operation is done in all cases at the
- // begining of the function.
-
- ACE_UNUSED_ARG (change_masks);
-
- break;
- }
-
- return old_masks;
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::unbind_i (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- int &changes_required)
-{
- int error = 0;
-
- // Remember this value; only if it changes do we need to wakeup
- // the other threads
- size_t original_handle_count = this->handles_to_be_deleted_;
- int result = 0;
- size_t i;
-
- // Go through all the handles looking for <handle>. Even if we find
- // it, we continue through the rest of the list since <handle> could
- // appear multiple times. All handles are checked.
-
- // First check the current entries
- for (i = 0; i < this->max_handlep1_ && error == 0; i++)
- // Since the handle can either be the event or the I/O handle,
- // we have to check both
- if ((this->current_handles_[i] == handle
- || this->current_info_[i].io_handle_ == handle)
- && // Make sure that it is not already marked for deleted
- !this->current_info_[i].delete_entry_)
- {
- result = this->remove_handler_i (i,
- mask);
- if (result == -1)
- error = 1;
- }
-
- // Then check the suspended entries
- for (i = 0; i < this->suspended_handles_ && error == 0; i++)
- // Since the handle can either be the event or the I/O handle, we
- // have to check both
- if ((this->current_suspended_info_[i].io_handle_ == handle
- || this->current_suspended_info_[i].event_handle_ == handle)
- &&
- // Make sure that it is not already marked for deleted
- !this->current_suspended_info_[i].delete_entry_)
- {
- result = this->remove_suspended_handler_i (i,
- mask);
- if (result == -1)
- error = 1;
- }
-
- // Then check the to_be_added entries
- for (i = 0; i < this->handles_to_be_added_ && error == 0; i++)
- // Since the handle can either be the event or the I/O handle,
- // we have to check both
- if ((this->to_be_added_info_[i].io_handle_ == handle
- || this->to_be_added_info_[i].event_handle_ == handle)
- &&
- // Make sure that it is not already marked for deleted
- !this->to_be_added_info_[i].delete_entry_)
- {
- result = this->remove_to_be_added_handler_i (i,
- mask);
- if (result == -1)
- error = 1;
- }
-
- // Only if the number of handlers to be deleted changes do we need
- // to wakeup the other threads
- if (original_handle_count < this->handles_to_be_deleted_)
- changes_required = 1;
-
- return error ? -1 : 0;
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::remove_handler_i (size_t slot,
- ACE_Reactor_Mask to_be_removed_masks)
-{
- // I/O entries
- if (this->current_info_[slot].io_entry_)
- {
- // See if there are other events that the <Event_Handler> is
- // interested in
- this->bit_ops (this->current_info_[slot].network_events_,
- to_be_removed_masks,
- ACE_Reactor::CLR_MASK);
-
- // Disassociate/Reassociate the event from/with the I/O handle.
- // This will depend on the value of remaining set of network
- // events that the <event_handler> is interested in. I don't
- // think we can do anything about errors here, so I will not
- // check this.
- ::WSAEventSelect ((SOCKET) this->current_info_[slot].io_handle_,
- this->current_handles_[slot],
- this->current_info_[slot].network_events_);
- }
- // Normal event entries.
- else if (ACE_BIT_ENABLED (to_be_removed_masks, ACE_Event_Handler::DONT_CALL))
- // Preserve DONT_CALL
- to_be_removed_masks = ACE_Event_Handler::DONT_CALL;
- else
- // Make sure that the <to_be_removed_masks> is the NULL_MASK
- to_be_removed_masks = ACE_Event_Handler::NULL_MASK;
-
- // If there are no more events that the <Event_Handler> is
- // interested in, or this is a non-I/O entry, schedule the
- // <Event_Handler> for removal
- if (this->current_info_[slot].network_events_ == 0)
- {
- // Mark to be deleted
- this->current_info_[slot].delete_entry_ = 1;
- // Remember the mask
- this->current_info_[slot].close_masks_ = to_be_removed_masks;
- // Increment the handle count
- this->handles_to_be_deleted_++;
- }
-
- // Since it is not a complete removal, we'll call handle_close
- // for all the masks that were removed. This does not change
- // the internal state of the reactor.
- //
- // Note: this condition only applies to I/O entries
- else if (ACE_BIT_ENABLED (to_be_removed_masks, ACE_Event_Handler::DONT_CALL) == 0)
- {
- ACE_HANDLE handle = this->current_info_[slot].io_handle_;
- this->current_info_[slot].event_handler_->handle_close (handle,
- to_be_removed_masks);
- }
-
- return 0;
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::remove_suspended_handler_i (size_t slot,
- ACE_Reactor_Mask to_be_removed_masks)
-{
- // I/O entries
- if (this->current_suspended_info_[slot].io_entry_)
- {
- // See if there are other events that the <Event_Handler> is
- // interested in
- this->bit_ops (this->current_suspended_info_[slot].network_events_,
- to_be_removed_masks,
- ACE_Reactor::CLR_MASK);
-
- // Disassociate/Reassociate the event from/with the I/O handle.
- // This will depend on the value of remaining set of network
- // events that the <event_handler> is interested in. I don't
- // think we can do anything about errors here, so I will not
- // check this.
- ::WSAEventSelect ((SOCKET) this->current_suspended_info_[slot].io_handle_,
- this->current_suspended_info_[slot].event_handle_,
- this->current_suspended_info_[slot].network_events_);
- }
- // Normal event entries.
- else if (ACE_BIT_ENABLED (to_be_removed_masks, ACE_Event_Handler::DONT_CALL))
- // Preserve DONT_CALL
- to_be_removed_masks = ACE_Event_Handler::DONT_CALL;
- else
- // Make sure that the <to_be_removed_masks> is the NULL_MASK
- to_be_removed_masks = ACE_Event_Handler::NULL_MASK;
-
- // If there are no more events that the <Event_Handler> is
- // interested in, or this is a non-I/O entry, schedule the
- // <Event_Handler> for removal
- if (this->current_suspended_info_[slot].network_events_ == 0)
- {
- // Mark to be deleted
- this->current_suspended_info_[slot].delete_entry_ = 1;
- // Remember the mask
- this->current_suspended_info_[slot].close_masks_ = to_be_removed_masks;
- // Increment the handle count
- this->handles_to_be_deleted_++;
- }
- // Since it is not a complete removal, we'll call handle_close for
- // all the masks that were removed. This does not change the
- // internal state of the reactor.
- //
- // Note: this condition only applies to I/O entries
- else if (ACE_BIT_ENABLED (to_be_removed_masks, ACE_Event_Handler::DONT_CALL) == 0)
- {
- ACE_HANDLE handle = this->current_suspended_info_[slot].io_handle_;
- this->current_suspended_info_[slot].event_handler_->handle_close (handle,
- to_be_removed_masks);
- }
-
- return 0;
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::remove_to_be_added_handler_i (size_t slot,
- ACE_Reactor_Mask to_be_removed_masks)
-{
- // I/O entries
- if (this->to_be_added_info_[slot].io_entry_)
- {
- // See if there are other events that the <Event_Handler> is
- // interested in
- this->bit_ops (this->to_be_added_info_[slot].network_events_,
- to_be_removed_masks,
- ACE_Reactor::CLR_MASK);
-
- // Disassociate/Reassociate the event from/with the I/O handle.
- // This will depend on the value of remaining set of network
- // events that the <event_handler> is interested in. I don't
- // think we can do anything about errors here, so I will not
- // check this.
- ::WSAEventSelect ((SOCKET) this->to_be_added_info_[slot].io_handle_,
- this->to_be_added_info_[slot].event_handle_,
- this->to_be_added_info_[slot].network_events_);
- }
- // Normal event entries.
- else if (ACE_BIT_ENABLED (to_be_removed_masks, ACE_Event_Handler::DONT_CALL))
- // Preserve DONT_CALL
- to_be_removed_masks = ACE_Event_Handler::DONT_CALL;
- else
- // Make sure that the <to_be_removed_masks> is the NULL_MASK
- to_be_removed_masks = ACE_Event_Handler::NULL_MASK;
-
- // If there are no more events that the <Event_Handler> is
- // interested in, or this is a non-I/O entry, schedule the
- // <Event_Handler> for removal
- if (this->to_be_added_info_[slot].network_events_ == 0)
- {
- // Mark to be deleted
- this->to_be_added_info_[slot].delete_entry_ = 1;
- // Remember the mask
- this->to_be_added_info_[slot].close_masks_ = to_be_removed_masks;
- // Increment the handle count
- this->handles_to_be_deleted_++;
- }
- // Since it is not a complete removal, we'll call handle_close
- // for all the masks that were removed. This does not change
- // the internal state of the reactor.
- //
- // Note: this condition only applies to I/O entries
- else if (ACE_BIT_ENABLED (to_be_removed_masks, ACE_Event_Handler::DONT_CALL) == 0)
- {
- ACE_HANDLE handle = this->to_be_added_info_[slot].io_handle_;
- this->to_be_added_info_[slot].event_handler_->handle_close (handle,
- to_be_removed_masks);
- }
-
- return 0;
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::suspend_handler_i (ACE_HANDLE handle,
- int &changes_required)
-{
- size_t i = 0;
-
- // Go through all the handles looking for <handle>. Even if we find
- // it, we continue through the rest of the list since <handle> could
- // appear multiple times. All handles are checked.
-
- // Check the current entries first.
- for (i = 0; i < this->max_handlep1_; i++)
- // Since the handle can either be the event or the I/O handle,
- // we have to check both
- if ((this->current_handles_[i] == handle ||
- this->current_info_[i].io_handle_ == handle) &&
- // Make sure that it is not already marked for suspension
- !this->current_info_[i].suspend_entry_)
- {
- // Mark to be suspended
- this->current_info_[i].suspend_entry_ = 1;
- // Increment the handle count
- this->handles_to_be_suspended_++;
- // Changes will be required
- changes_required = 1;
- }
-
- // Then check the suspended entries.
- for (i = 0; i < this->suspended_handles_; i++)
- // Since the handle can either be the event or the I/O handle,
- // we have to check both
- if ((this->current_suspended_info_[i].event_handle_ == handle ||
- this->current_suspended_info_[i].io_handle_ == handle) &&
- // Make sure that the resumption is not already undone
- this->current_suspended_info_[i].resume_entry_)
- {
- // Undo resumption
- this->current_suspended_info_[i].resume_entry_ = 0;
- // Decrement the handle count
- this->handles_to_be_resumed_--;
- // Changes will be required
- changes_required = 1;
- }
-
- // Then check the to_be_added entries.
- for (i = 0; i < this->handles_to_be_added_; i++)
- // Since the handle can either be the event or the I/O handle,
- // we have to check both
- if ((this->to_be_added_info_[i].io_handle_ == handle ||
- this->to_be_added_info_[i].event_handle_ == handle) &&
- // Make sure that it is not already marked for suspension
- !this->to_be_added_info_[i].suspend_entry_)
- {
- // Mark to be suspended
- this->to_be_added_info_[i].suspend_entry_ = 1;
- // Increment the handle count
- this->handles_to_be_suspended_++;
- // Changes will be required
- changes_required = 1;
- }
-
- return 0;
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::resume_handler_i (ACE_HANDLE handle,
- int &changes_required)
-{
- size_t i = 0;
-
- // Go through all the handles looking for <handle>. Even if we find
- // it, we continue through the rest of the list since <handle> could
- // appear multiple times. All handles are checked.
-
- // Check the current entries first.
- for (i = 0; i < this->max_handlep1_; i++)
- // Since the handle can either be the event or the I/O handle,
- // we have to check both
- if ((this->current_handles_[i] == handle ||
- this->current_info_[i].io_handle_ == handle) &&
- // Make sure that the suspension is not already undone
- this->current_info_[i].suspend_entry_)
- {
- // Undo suspension
- this->current_info_[i].suspend_entry_ = 0;
- // Decrement the handle count
- this->handles_to_be_suspended_--;
- // Changes will be required
- changes_required = 1;
- }
-
- // Then check the suspended entries.
- for (i = 0; i < this->suspended_handles_; i++)
- // Since the handle can either be the event or the I/O handle,
- // we have to check both
- if ((this->current_suspended_info_[i].event_handle_ == handle ||
- this->current_suspended_info_[i].io_handle_ == handle) &&
- // Make sure that it is not already marked for resumption
- !this->current_suspended_info_[i].resume_entry_)
- {
- // Mark to be resumed
- this->current_suspended_info_[i].resume_entry_ = 1;
- // Increment the handle count
- this->handles_to_be_resumed_++;
- // Changes will be required
- changes_required = 1;
- }
-
- // Then check the to_be_added entries.
- for (i = 0; i < this->handles_to_be_added_; i++)
- // Since the handle can either be the event or the I/O handle,
- // we have to check both
- if ((this->to_be_added_info_[i].io_handle_ == handle ||
- this->to_be_added_info_[i].event_handle_ == handle) &&
- // Make sure that the suspension is not already undone
- this->to_be_added_info_[i].suspend_entry_)
- {
- // Undo suspension
- this->to_be_added_info_[i].suspend_entry_ = 0;
- // Decrement the handle count
- this->handles_to_be_suspended_--;
- // Changes will be required
- changes_required = 1;
- }
-
- return 0;
-}
-
-void
-ACE_WFMO_Reactor_Handler_Repository::unbind_all (void)
-{
- {
- ACE_GUARD (ACE_Process_Mutex, ace_mon, this->wfmo_reactor_.lock_);
-
- int dummy;
- size_t i;
-
- // Remove all the current handlers
- for (i = 0; i < this->max_handlep1_; i++)
- this->unbind_i (this->current_handles_[i],
- ACE_Event_Handler::ALL_EVENTS_MASK,
- dummy);
-
- // Remove all the suspended handlers
- for (i = 0; i < this->suspended_handles_; i++)
- this->unbind_i (this->current_suspended_info_[i].event_handle_,
- ACE_Event_Handler::ALL_EVENTS_MASK,
- dummy);
-
- // Remove all the to_be_added handlers
- for (i = 0; i < this->handles_to_be_added_; i++)
- this->unbind_i (this->to_be_added_info_[i].event_handle_,
- ACE_Event_Handler::ALL_EVENTS_MASK,
- dummy);
-
- }
-
- // The guard is released here
-
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
- this->wfmo_reactor_.wakeup_all_threads ();
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::bind_i (int io_entry,
- ACE_Event_Handler *event_handler,
- long network_events,
- ACE_HANDLE io_handle,
- ACE_HANDLE event_handle,
- int delete_event)
-{
- // Make sure that the <handle> is valid
- if (event_handle == ACE_INVALID_HANDLE)
- event_handle = event_handler->get_handle ();
- if (this->invalid_handle (event_handle))
- return -1;
-
- size_t current_size = this->max_handlep1_ +
- this->handles_to_be_added_ -
- this->handles_to_be_deleted_ +
- this->suspended_handles_;
-
- // Make sure that there's room in the table.
- if (current_size < this->max_size_)
- {
- // Cache this set into the <to_be_added_info_>, till we come
- // around to actually adding this to the <current_info_>
- this->to_be_added_info_[this->handles_to_be_added_].set (event_handle,
- io_entry,
- event_handler,
- io_handle,
- network_events,
- delete_event);
-
- this->handles_to_be_added_++;
-
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
- this->wfmo_reactor_.wakeup_all_threads ();
- }
- else
- {
- errno = EMFILE; // File descriptor table is full (better than nothing)
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::make_changes_in_current_infos (void)
-{
- // Go through the entire valid array and check for all handles that
- // have been schedule for deletion
- if (this->handles_to_be_deleted_ > 0 || this->handles_to_be_suspended_ > 0)
- {
- // This will help us in keeping track of the last valid slot in the
- // handle arrays
- int last_valid_slot = this->max_handlep1_ - 1;
-
- for (int i = last_valid_slot; i >= 0; i--)
- {
- // This stuff is necessary here, since we should not make
- // the upcall until all the internal data structures have
- // been updated. This is to protect against upcalls that
- // try to deregister again.
- ACE_HANDLE handle = ACE_INVALID_HANDLE;
- ACE_Reactor_Mask masks = ACE_Event_Handler::NULL_MASK;
- ACE_Event_Handler *event_handler = 0;
-
- // See if this entry is scheduled for deletion
- if (this->current_info_[i].delete_entry_)
- {
- // Calling the <handle_close> method here will ensure that we
- // will only call it once per deregistering <Event_Handler>.
- // This is essential in the case when the <Event_Handler> will
- // do something like delete itself and we have multiple
- // threads in WFMO_Reactor.
- //
- // Make sure that the DONT_CALL mask is not set
- masks = this->current_info_[i].close_masks_;
- if (ACE_BIT_ENABLED (masks, ACE_Event_Handler::DONT_CALL) == 0)
- {
- // Grab the correct handle depending on the type entry
- if (this->current_info_[i].io_entry_)
- handle = this->current_info_[i].io_handle_;
- else
- handle = this->current_handles_[i];
-
- // Event handler
- event_handler = this->current_info_[i].event_handler_;
- }
-
- // If <WFMO_Reactor> created the event, we need to clean it up
- if (this->current_info_[i].delete_event_)
- ACE_OS::event_destroy (&this->current_handles_[i]);
-
- // Reduce count by one
- this->handles_to_be_deleted_--;
- }
-
- // See if this entry is scheduled for suspension
- else if (this->current_info_[i].suspend_entry_)
- {
- this->current_suspended_info_ [this->suspended_handles_].set (this->current_handles_[i],
- this->current_info_[i]);
- // Increase number of suspended handles
- this->suspended_handles_++;
-
- // Reduce count by one
- this->handles_to_be_suspended_--;
- }
-
- // See if this entry is scheduled for deletion or suspension
- // If so we need to clean up
- if (this->current_info_[i].delete_entry_ || this->current_info_[i].suspend_entry_)
- {
- if (i == last_valid_slot)
- // If this is the last handle in the set, no need to swap
- // places. Simply remove it.
- {
- // Reset the info in this slot
- this->current_info_[i].reset ();
- this->current_handles_[i] = ACE_INVALID_HANDLE;
- }
- else
- // Swap this handle with the last valid handle
- {
- // Struct copy
- this->current_info_[i] = this->current_info_[last_valid_slot];
- this->current_handles_[i] = this->current_handles_[last_valid_slot];
- // Reset the info in the last slot
- this->current_info_[last_valid_slot].reset ();
- this->current_handles_[last_valid_slot] = ACE_INVALID_HANDLE;
- }
- // Reset the last valid slot and clean up the entry in the
- // <to_be_deleted_set_>
- last_valid_slot--;
- }
-
- // Now that all internal structures have been updated, make
- // the upcall.
- if (event_handler != 0)
- event_handler->handle_close (handle, masks);
- }
- // Reset <this->max_handlep1_>
- this->max_handlep1_ = last_valid_slot + 1;
- }
-
- return 0;
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::make_changes_in_suspension_infos (void)
-{
- int i;
-
- // Go through the <suspended_handle> array
- if (this->handles_to_be_deleted_ > 0 || this->handles_to_be_resumed_ > 0)
- {
- int last_valid_slot = this->suspended_handles_ - 1;
- for (i = last_valid_slot; i >= 0; i--)
- {
- // This stuff is necessary here, since we should not make
- // the upcall until all the internal data structures have
- // been updated. This is to protect against upcalls that
- // try to deregister again.
- ACE_HANDLE handle = ACE_INVALID_HANDLE;
- ACE_Reactor_Mask masks = ACE_Event_Handler::NULL_MASK;
- ACE_Event_Handler *event_handler = 0;
-
- // See if this entry is scheduled for deletion
- if (this->current_suspended_info_[i].delete_entry_)
- {
- // Calling the <handle_close> method here will ensure that we
- // will only call it once per deregistering <Event_Handler>.
- // This is essential in the case when the <Event_Handler> will
- // do something like delete itself and we have multiple
- // threads in WFMO_Reactor.
- //
- // Make sure that the DONT_CALL mask is not set
- masks = this->current_suspended_info_[i].close_masks_;
- if (ACE_BIT_ENABLED (masks, ACE_Event_Handler::DONT_CALL) == 0)
- {
- // Grab the correct handle depending on the type entry
- if (this->current_suspended_info_[i].io_entry_)
- handle = this->current_suspended_info_[i].io_handle_;
- else
- handle = this->current_suspended_info_[i].event_handle_;
-
- // Upcall
- event_handler = this->current_suspended_info_[i].event_handler_;
- }
-
- // If <WFMO_Reactor> created the event, we need to clean it up
- if (this->current_suspended_info_[i].delete_event_)
- ACE_OS::event_destroy (&this->current_suspended_info_[i].event_handle_);
-
- // Reduce count by one
- this->handles_to_be_deleted_--;
- }
-
- else if (this->current_suspended_info_[i].resume_entry_)
- {
- // Add to the end of the current handles set
- this->current_handles_[this->max_handlep1_] = this->current_suspended_info_[i].event_handle_;
- // Struct copy
- this->current_info_[this->max_handlep1_].set (this->current_suspended_info_[i]);
- this->max_handlep1_++;
-
- // Reduce count by one
- this->handles_to_be_resumed_--;
- }
-
- if (this->current_suspended_info_[i].resume_entry_ ||
- this->current_suspended_info_[i].delete_entry_)
- {
- // Is this the last entry
- if (i == last_valid_slot)
- // Reset the <suspended> arrays entries
- this->current_suspended_info_[i].reset ();
- else
- {
- // Struct copy
- this->current_suspended_info_[i] = this->current_suspended_info_[last_valid_slot];
- this->current_suspended_info_[last_valid_slot].reset ();
- }
- // Reduce the number of suspended handles
- last_valid_slot--;
- }
-
- // Now that all internal structures have been updated, make
- // the upcall.
- if (event_handler != 0)
- event_handler->handle_close (handle, masks);
- }
-
- // Reset <this->suspended_handles_>
- this->suspended_handles_ = last_valid_slot + 1;
- }
-
- return 0;
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::make_changes_in_to_be_added_infos (void)
-{
- int i;
-
- // Go through the <to_be_added_*> arrays
- for (i = 0; i < (int) this->handles_to_be_added_; i++)
- {
- // This stuff is necessary here, since we should not make
- // the upcall until all the internal data structures have
- // been updated. This is to protect against upcalls that
- // try to deregister again.
- ACE_HANDLE handle = ACE_INVALID_HANDLE;
- ACE_Reactor_Mask masks = ACE_Event_Handler::NULL_MASK;
- ACE_Event_Handler *event_handler = 0;
-
- // See if this entry is scheduled for deletion
- if (this->to_be_added_info_[i].delete_entry_)
- {
- // Calling the <handle_close> method here will ensure that we
- // will only call it once per deregistering <Event_Handler>.
- // This is essential in the case when the <Event_Handler> will
- // do something like delete itself and we have multiple
- // threads in WFMO_Reactor.
- //
- // Make sure that the DONT_CALL mask is not set
- masks = this->to_be_added_info_[i].close_masks_;
- if (ACE_BIT_ENABLED (masks, ACE_Event_Handler::DONT_CALL) == 0)
- {
- // Grab the correct handle depending on the type entry
- if (this->to_be_added_info_[i].io_entry_)
- handle = this->to_be_added_info_[i].io_handle_;
- else
- handle = this->to_be_added_info_[i].event_handle_;
-
- // Upcall
- event_handler = this->to_be_added_info_[i].event_handler_;
- }
-
- // If <WFMO_Reactor> created the event, we need to clean it up
- if (this->to_be_added_info_[i].delete_event_)
- ACE_OS::event_destroy (&this->to_be_added_info_[i].event_handle_);
-
- // Reduce count by one
- this->handles_to_be_deleted_--;
- }
-
- // See if this entry is scheduled for suspension
- else if (this->to_be_added_info_[i].suspend_entry_)
- {
- this->current_suspended_info_ [this->suspended_handles_].set (this->to_be_added_info_[i].event_handle_,
- this->to_be_added_info_[i]);
- // Increase number of suspended handles
- this->suspended_handles_++;
-
- // Reduce count by one
- this->handles_to_be_suspended_--;
- }
-
- // If neither of the two flags are on, add to current
- else
- {
- // Add to the end of the current handles set
- this->current_handles_[this->max_handlep1_] = this->to_be_added_info_[i].event_handle_;
- // Struct copy
- this->current_info_[this->max_handlep1_].set (this->to_be_added_info_[i]);
- this->max_handlep1_++;
- }
-
- // Reset the <to_be_added_info_>
- this->to_be_added_info_[i].reset ();
-
- // Now that all internal structures have been updated, make the
- // upcall.
- if (event_handler != 0)
- event_handler->handle_close (handle, masks);
- }
-
- // Since all to be added handles have been taken care of, reset the
- // counter
- this->handles_to_be_added_ = 0;
-
- return 0;
-}
-
-void
-ACE_WFMO_Reactor_Handler_Repository::dump (void) const
-{
- size_t i = 0;
-
- ACE_TRACE ("ACE_WFMO_Reactor_Handler_Repository::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Max size = %d\n"),
- this->max_size_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Current info table\n\n")));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\tSize = %d\n"),
- this->max_handlep1_));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\tHandles to be suspended = %d\n"),
- this->handles_to_be_suspended_));
-
- for (i = 0; i < this->max_handlep1_; i++)
- this->current_info_[i].dump (this->current_handles_[i]);
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\n")));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("To-be-added info table\n\n")));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\tSize = %d\n"),
- this->handles_to_be_added_));
-
- for (i = 0; i < this->handles_to_be_added_; i++)
- this->to_be_added_info_[i].dump ();
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\n")));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Suspended info table\n\n")));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\tSize = %d\n"),
- this->suspended_handles_));
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\tHandles to be resumed = %d\n"),
- this->handles_to_be_resumed_));
-
- for (i = 0; i < this->suspended_handles_; i++)
- this->current_suspended_info_[i].dump ();
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("\n")));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Total handles to be deleted = %d\n"),
- this->handles_to_be_deleted_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_END_DUMP));
-}
-
-/************************************************************/
-
-int
-ACE_WFMO_Reactor::work_pending (const ACE_Time_Value &)
-{
- ACE_NOTSUP_RETURN (-1);
-}
-
-ACE_WFMO_Reactor::ACE_WFMO_Reactor (ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq)
- : signal_handler_ (0),
- delete_signal_handler_ (0),
- timer_queue_ (0),
- delete_timer_queue_ (0),
- handler_rep_ (*this),
- delete_handler_rep_ (0),
- delete_notify_handler_ (0),
- lock_adapter_ (lock_),
- // this event is initially signaled
- ok_to_wait_ (1),
- // this event is initially unsignaled
- wakeup_all_threads_ (0),
- // this event is initially unsignaled
- waiting_to_change_state_ (0),
- new_owner_ (0),
- active_threads_ (0),
- owner_ (ACE_Thread::self ()),
- change_state_thread_ (0),
- open_for_business_ (0),
- deactivated_ (0)
-{
- if (this->open (ACE_WFMO_Reactor::DEFAULT_SIZE, 0, sh, tq) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("WFMO_Reactor")));
-}
-
-ACE_WFMO_Reactor::ACE_WFMO_Reactor (size_t size,
- int unused,
- ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq)
- : signal_handler_ (0),
- delete_signal_handler_ (0),
- timer_queue_ (0),
- delete_timer_queue_ (0),
- handler_rep_ (*this),
- delete_handler_rep_ (0),
- delete_notify_handler_ (0),
- lock_adapter_ (lock_),
- // this event is initially signaled
- ok_to_wait_ (1),
- // this event is initially unsignaled
- wakeup_all_threads_ (0),
- // this event is initially unsignaled
- waiting_to_change_state_ (0),
- new_owner_ (0),
- active_threads_ (0),
- owner_ (ACE_Thread::self ()),
- change_state_thread_ (0),
- open_for_business_ (0),
- deactivated_ (0)
-{
- ACE_UNUSED_ARG (unused);
-
- if (this->open (size, 0, sh, tq) == -1)
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("WFMO_Reactor")));
-}
-
-int
-ACE_WFMO_Reactor::current_info (ACE_HANDLE, size_t &)
-{
- return -1;
-}
-
-int
-ACE_WFMO_Reactor::open (size_t size,
- int unused,
- ACE_Sig_Handler *sh,
- ACE_Timer_Queue *tq,
- int disable_notify_pipe,
- ACE_Reactor_Notify *notify)
-{
- ACE_UNUSED_ARG (unused);
- ACE_UNUSED_ARG (sh);
-
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- // If we are already open, return -1
- if (this->open_for_business_)
- return -1;
-
- // Timer Queue
- if (this->delete_timer_queue_)
- delete this->timer_queue_;
-
- if (tq == 0)
- {
- ACE_NEW_RETURN (this->timer_queue_,
- ACE_Timer_Heap,
- -1);
- this->delete_timer_queue_ = 1;
- }
- else
- {
- this->timer_queue_ = tq;
- this->delete_timer_queue_ = 0;
- }
-
- // Signal Handler
- if (this->delete_signal_handler_)
- delete this->signal_handler_;
-
- if (sh == 0)
- {
- ACE_NEW_RETURN (this->signal_handler_,
- ACE_Sig_Handler,
- -1);
- this->delete_signal_handler_ = 1;
- }
- else
- {
- this->signal_handler_ = sh;
- this->delete_signal_handler_ = 0;
- }
-
- // Setup the atomic wait array (used later in <handle_events>)
- this->atomic_wait_array_[0] = this->lock_.lock ().proc_mutex_;
- this->atomic_wait_array_[1] = this->ok_to_wait_.handle ();
-
- // This is to guard against reopens of WFMO_Reactor
- if (this->delete_handler_rep_)
- this->handler_rep_.~ACE_WFMO_Reactor_Handler_Repository ();
-
- // Open the handle repository. Two additional handles for internal
- // purposes
- if (this->handler_rep_.open (size + 2) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
- ACE_TEXT ("opening handler repository")),
- -1);
- else
- this->delete_handler_rep_ = 1;
-
- this->notify_handler_ = notify;
-
- if (this->notify_handler_ == 0)
- {
- ACE_NEW_RETURN (this->notify_handler_,
- ACE_WFMO_Reactor_Notify,
- -1);
-
- if (this->notify_handler_ == 0)
- return -1;
- else
- this->delete_notify_handler_ = 1;
- }
-
- /* NOTE */
- // The order of the following two registrations is very important
-
- // Open the notification handler
- if (this->notify_handler_->open (this, this->timer_queue_) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("opening notify handler ")),
- -1);
-
- // Register for <wakeup_all_threads> event
- if (this->register_handler (&this->wakeup_all_threads_handler_,
- this->wakeup_all_threads_.handle ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("registering thread wakeup handler")),
- -1);
-
- // Since we have added two handles into the handler repository,
- // update the <handler_repository_>
- if (this->handler_rep_.changes_required ())
- {
- // Make necessary changes to the handler repository
- this->handler_rep_.make_changes ();
- // Turn off <wakeup_all_threads_> since all necessary changes
- // have completed
- this->wakeup_all_threads_.reset ();
- }
-
- // We are open for business
- this->open_for_business_ = 1;
-
- return 0;
-}
-
-int
-ACE_WFMO_Reactor::set_sig_handler (ACE_Sig_Handler *signal_handler)
-{
- if (this->signal_handler_ != 0 && this->delete_signal_handler_ != 0)
- delete this->signal_handler_;
- this->signal_handler_ = signal_handler;
- this->delete_signal_handler_ = 0;
- return 0;
-}
-
-int
-ACE_WFMO_Reactor::set_timer_queue (ACE_Timer_Queue *timer_queue)
-{
- if (this->timer_queue_ != 0 && this->delete_timer_queue_ != 0)
- delete this->timer_queue_;
- this->timer_queue_ = timer_queue;
- this->delete_timer_queue_ = 0;
- return 0;
-}
-
-int
-ACE_WFMO_Reactor::close (void)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- // If we are already closed, return error
- if (!this->open_for_business_)
- return -1;
-
- // We are now closed
- this->open_for_business_ = 0;
- // This will unregister all handles
- this->handler_rep_.close ();
-
- return 0;
-}
-
-ACE_WFMO_Reactor::~ACE_WFMO_Reactor (void)
-{
- // Assumption: No threads are left in the Reactor when this method
- // is called (i.e., active_threads_ == 0)
-
- // Close down
- this->close ();
-
- // Make necessary changes to the handler repository that we caused
- // by <close>.
- this->handler_rep_.make_changes ();
-
- if (this->delete_timer_queue_)
- {
- delete this->timer_queue_;
- this->timer_queue_ = 0;
- this->delete_timer_queue_ = 0;
- }
-
- if (this->delete_signal_handler_)
- {
- delete this->signal_handler_;
- this->signal_handler_ = 0;
- this->delete_signal_handler_ = 0;
- }
-
- if (this->delete_notify_handler_)
- {
- delete this->notify_handler_;
- this->notify_handler_ = 0;
- this->delete_notify_handler_ = 0;
- }
-}
-
-int
-ACE_WFMO_Reactor::register_handler_i (ACE_HANDLE event_handle,
- ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask new_masks)
-{
- // If this is a Winsock 1 system, the underlying event assignment will
- // not work, so don't try. Winsock 1 must use ACE_Select_Reactor for
- // reacting to socket activity.
-#if !defined (ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2 == 0)
- ACE_UNUSED_ARG (event_handle);
- ACE_UNUSED_ARG (io_handle);
- ACE_UNUSED_ARG (event_handler);
- ACE_UNUSED_ARG (new_masks);
- ACE_NOTSUP_RETURN (-1);
-#else
-
- // Make sure that the <handle> is valid
- if (io_handle == ACE_INVALID_HANDLE)
- io_handle = event_handler->get_handle ();
-
- if (this->handler_rep_.invalid_handle (io_handle))
- return -1;
-
- long new_network_events = 0;
- int delete_event = 0;
- auto_ptr <ACE_Auto_Event> event;
-
- // Look up the repository to see if the <event_handler> is already
- // there.
- ACE_Reactor_Mask old_masks;
- int found = this->handler_rep_.modify_network_events_i (io_handle,
- new_masks,
- old_masks,
- new_network_events,
- event_handle,
- delete_event,
- ACE_Reactor::ADD_MASK);
-
- // Check to see if the user passed us a valid event; If not then we
- // need to create one
- if (event_handle == ACE_INVALID_HANDLE)
- {
- // Note: don't change this since some C++ compilers have
- // <auto_ptr>s that don't work properly...
- auto_ptr<ACE_Auto_Event> tmp (new ACE_Auto_Event);
- event = tmp;
- event_handle = event->handle ();
- delete_event = 1;
- }
-
- int result = ::WSAEventSelect ((SOCKET) io_handle,
- event_handle,
- new_network_events);
- // If we had found the <Event_Handler> there is nothing more to do
- if (found)
- return result;
- else if (result != SOCKET_ERROR &&
- this->handler_rep_.bind_i (1,
- event_handler,
- new_network_events,
- io_handle,
- event_handle,
- delete_event) != -1)
- {
- // The <event_handler> was not found in the repository, add to
- // the repository.
- if (delete_event)
- event->handle (ACE_INVALID_HANDLE);
- return 0;
- }
- else
- return -1;
-#endif /* ACE_HAS_PHARLAP */
-}
-
-int
-ACE_WFMO_Reactor::mask_ops_i (ACE_HANDLE io_handle,
- ACE_Reactor_Mask new_masks,
- int operation)
-{
- // Make sure that the <handle> is valid
- if (this->handler_rep_.invalid_handle (io_handle))
- return -1;
-
- long new_network_events = 0;
- int delete_event = 0;
- ACE_HANDLE event_handle = ACE_INVALID_HANDLE;
-
- // Look up the repository to see if the <Event_Handler> is already
- // there.
- ACE_Reactor_Mask old_masks;
- int found = this->handler_rep_.modify_network_events_i (io_handle,
- new_masks,
- old_masks,
- new_network_events,
- event_handle,
- delete_event,
- operation);
- if (found)
- {
- int result = ::WSAEventSelect ((SOCKET) io_handle,
- event_handle,
- new_network_events);
- if (result == 0)
- return old_masks;
- else
- return result;
- }
- else
- return -1;
-}
-
-
-
-int
-ACE_WFMO_Reactor_Handler_Repository::modify_network_events_i (ACE_HANDLE io_handle,
- ACE_Reactor_Mask new_masks,
- ACE_Reactor_Mask &old_masks,
- long &new_network_events,
- ACE_HANDLE &event_handle,
- int &delete_event,
- int operation)
-{
- long *modified_network_events = &new_network_events;
- int found = 0;
- size_t i;
-
- // First go through the current entries
- //
- // Look for all entries in the current handles for matching handle
- // (except those that have been scheduled for deletion)
- for (i = 0; i < this->max_handlep1_ && !found; i++)
- if (io_handle == this->current_info_[i].io_handle_ &&
- !this->current_info_[i].delete_entry_)
- {
- found = 1;
- modified_network_events = &this->current_info_[i].network_events_;
- delete_event = this->current_info_[i].delete_event_;
- event_handle = this->current_handles_[i];
- }
-
- // Then pass through the suspended handles
- //
- // Look for all entries in the suspended handles for matching handle
- // (except those that have been scheduled for deletion)
- for (i = 0; i < this->suspended_handles_ && !found; i++)
- if (io_handle == this->current_suspended_info_[i].io_handle_ &&
- !this->current_suspended_info_[i].delete_entry_)
- {
- found = 1;
- modified_network_events = &this->current_suspended_info_[i].network_events_;
- delete_event = this->current_suspended_info_[i].delete_event_;
- event_handle = this->current_suspended_info_[i].event_handle_;
- }
-
- // Then check the to_be_added handles
- //
- // Look for all entries in the to_be_added handles for matching
- // handle (except those that have been scheduled for deletion)
- for (i = 0; i < this->handles_to_be_added_ && !found; i++)
- if (io_handle == this->to_be_added_info_[i].io_handle_ &&
- !this->to_be_added_info_[i].delete_entry_)
- {
- found = 1;
- modified_network_events = &this->to_be_added_info_[i].network_events_;
- delete_event = this->to_be_added_info_[i].delete_event_;
- event_handle = this->to_be_added_info_[i].event_handle_;
- }
-
- old_masks = this->bit_ops (*modified_network_events,
- new_masks,
- operation);
-
- new_network_events = *modified_network_events;
-
- return found;
-}
-
-int
-ACE_WFMO_Reactor_Handler_Repository::handler (ACE_HANDLE handle,
- ACE_Reactor_Mask user_masks,
- ACE_Event_Handler **user_event_handler)
-{
- int found = 0;
- size_t i = 0;
- ACE_Event_Handler *event_handler = 0;
- long existing_masks;
-
- //
- // Look for the handle first
- //
-
- // First go through the current entries
- //
- // Look for all entries in the current handles for matching handle
- // (except those that have been scheduled for deletion)
- for (i = 0; i < this->max_handlep1_ && !found; i++)
- if ((handle == this->current_info_[i].io_handle_ ||
- handle == this->current_handles_[i]) &&
- !this->current_info_[i].delete_entry_)
- {
- found = 1;
- event_handler = this->current_info_[i].event_handler_;
- existing_masks = this->current_info_[i].network_events_;
- }
-
- // Then pass through the suspended handles
- //
- // Look for all entries in the suspended handles for matching handle
- // (except those that have been scheduled for deletion)
- for (i = 0; i < this->suspended_handles_ && !found; i++)
- if ((handle == this->current_suspended_info_[i].io_handle_ ||
- handle == this->current_suspended_info_[i].event_handle_) &&
- !this->current_suspended_info_[i].delete_entry_)
- {
- found = 1;
- event_handler = this->current_suspended_info_[i].event_handler_;
- existing_masks = this->current_suspended_info_[i].network_events_;
- }
-
- // Then check the to_be_added handles
- //
- // Look for all entries in the to_be_added handles for matching
- // handle (except those that have been scheduled for deletion)
- for (i = 0; i < this->handles_to_be_added_ && !found; i++)
- if ((handle == this->to_be_added_info_[i].io_handle_ ||
- handle == this->to_be_added_info_[i].event_handle_) &&
- !this->to_be_added_info_[i].delete_entry_)
- {
- found = 1;
- event_handler = this->to_be_added_info_[i].event_handler_;
- existing_masks = this->to_be_added_info_[i].network_events_;
- }
-
- // If the handle is not found, return failure.
- if (!found)
- return -1;
-
- // Otherwise, make sure that the masks that the user is looking for
- // are on.
- if (found &&
- ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::READ_MASK))
- if (!ACE_BIT_ENABLED (existing_masks, FD_READ)
- && !ACE_BIT_ENABLED (existing_masks, FD_CLOSE))
- found = 0;
-
- if (found &&
- ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::WRITE_MASK))
- if (!ACE_BIT_ENABLED (existing_masks, FD_WRITE))
- found = 0;
-
- if (found &&
- ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::EXCEPT_MASK))
- if (!ACE_BIT_ENABLED (existing_masks, FD_OOB))
- found = 0;
-
- if (found &&
- ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::ACCEPT_MASK))
- if (!ACE_BIT_ENABLED (existing_masks, FD_ACCEPT))
- found = 0;
-
- if (found &&
- ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::CONNECT_MASK))
- if (!ACE_BIT_ENABLED (existing_masks, FD_CONNECT))
- found = 0;
-
- if (found &&
- ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::QOS_MASK))
- if (!ACE_BIT_ENABLED (existing_masks, FD_QOS))
- found = 0;
-
- if (found &&
- ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::GROUP_QOS_MASK))
- if (!ACE_BIT_ENABLED (existing_masks, FD_GROUP_QOS))
- found = 0;
-
- if (found &&
- user_event_handler)
- *user_event_handler = event_handler;
-
- if (found)
- return 0;
- else
- return -1;
-}
-
-// Waits for and dispatches all events. Returns -1 on error, 0 if
-// max_wait_time expired, or the number of events that were dispatched.
-int
-ACE_WFMO_Reactor::event_handling (ACE_Time_Value *max_wait_time,
- int alertable)
-{
- ACE_TRACE ("ACE_WFMO_Reactor::event_handling");
-
- // Make sure we are not closed
- if (!this->open_for_business_ || this->deactivated_)
- return -1;
-
- // Stash the current time -- the destructor of this object will
- // automatically compute how much time elapsed since this method was
- // called.
- ACE_Countdown_Time countdown (max_wait_time);
-
- // Check to see if it is ok to enter ::WaitForMultipleObjects
- // This will acquire <this->lock_> on success
- // On failure, the lock will not be acquired
- int result = this->ok_to_wait (max_wait_time, alertable);
- if (result != 1)
- return result;
-
- // Increment the number of active threads
- this->active_threads_++;
-
- // Release the <lock_>
- this->lock_.release ();
-
- // Update the countdown to reflect time waiting to play with the
- // mut and event.
- countdown.update ();
-
- // Calculate timeout
- int timeout = this->calculate_timeout (max_wait_time);
-
- // Wait for event to happen
- int wait_status = this->wait_for_multiple_events (timeout,
- alertable);
-
- // Upcall
- result = this->safe_dispatch (wait_status);
-
- return result;
-}
-
-int
-ACE_WFMO_Reactor::ok_to_wait (ACE_Time_Value *max_wait_time,
- int alertable)
-{
- // Calculate the max time we should spend here
- //
- // Note: There is really no need to involve the <timer_queue_> here
- // because even if a timeout in the <timer_queue_> does expire we
- // will not be able to dispatch it
- int timeout = max_wait_time == 0 ? INFINITE : max_wait_time->msec ();
-
- // Atomically wait for both the <lock_> and <ok_to_wait_> event
- int result = 0;
- while (1)
- {
-#if defined (ACE_HAS_PHARLAP)
- // PharLap doesn't implement WaitForMultipleObjectsEx, and doesn't
- // do async I/O, so it's not needed in this case anyway.
- result = ::WaitForMultipleObjects (sizeof this->atomic_wait_array_ / sizeof (ACE_HANDLE),
- this->atomic_wait_array_,
- TRUE,
- timeout);
-#else
- result = ::WaitForMultipleObjectsEx (sizeof this->atomic_wait_array_ / sizeof (ACE_HANDLE),
- this->atomic_wait_array_,
- TRUE,
- timeout,
- alertable);
-#endif /* ACE_HAS_PHARLAP */
-
- if (result != WAIT_IO_COMPLETION)
- break;
- }
-
- switch (result)
- {
- case WAIT_TIMEOUT:
- errno = ETIME;
- return 0;
- case WAIT_FAILED:
- case WAIT_ABANDONED_0:
- ACE_OS::set_errno_to_last_error ();
- return -1;
- default:
- break;
- }
-
- // It is ok to enter ::WaitForMultipleObjects
- return 1;
-}
-
-int
-ACE_WFMO_Reactor::wait_for_multiple_events (int timeout,
- int alertable)
-{
- // Wait for any of handles_ to be active, or until timeout expires.
- // If <alertable> is enabled allow asynchronous completion of
- // ReadFile and WriteFile operations.
-#if defined (ACE_HAS_PHARLAP)
- // PharLap doesn't do async I/O and doesn't implement
- // WaitForMultipleObjectsEx, so use WaitForMultipleObjects.
- ACE_UNUSED_ARG (alertable);
- return ::WaitForMultipleObjects (this->handler_rep_.max_handlep1 (),
- this->handler_rep_.handles (),
- FALSE,
- timeout);
-#else
- return ::WaitForMultipleObjectsEx (this->handler_rep_.max_handlep1 (),
- this->handler_rep_.handles (),
- FALSE,
- timeout,
- alertable);
-#endif /* ACE_HAS_PHARLAP */
-}
-
-DWORD
-ACE_WFMO_Reactor::poll_remaining_handles (size_t slot)
-{
- return ::WaitForMultipleObjects (this->handler_rep_.max_handlep1 () - slot,
- this->handler_rep_.handles () + slot,
- FALSE,
- 0);
-}
-
-int
-ACE_WFMO_Reactor::calculate_timeout (ACE_Time_Value *max_wait_time)
-{
- ACE_Time_Value *time = 0;
- if (this->owner_ == ACE_Thread::self ())
- time = this->timer_queue_->calculate_timeout (max_wait_time);
- else
- time = max_wait_time;
-
- if (time == 0)
- return INFINITE;
- else
- return time->msec ();
-}
-
-
-int
-ACE_WFMO_Reactor::expire_timers (void)
-{
- // If "owner" thread
- if (ACE_Thread::self () == this->owner_)
- // expire all pending timers.
- return this->timer_queue_->expire ();
-
- else
- // Nothing to expire
- return 0;
-}
-
-int
-ACE_WFMO_Reactor::dispatch (int wait_status)
-{
- int handlers_dispatched = 0;
-
- // Expire timers
- handlers_dispatched += this->expire_timers ();
-
- switch (wait_status)
- {
- case WAIT_FAILED: // Failure.
- ACE_OS::set_errno_to_last_error ();
- return -1;
-
- case WAIT_TIMEOUT: // Timeout.
- errno = ETIME;
- return handlers_dispatched;
-
- case WAIT_IO_COMPLETION: // APC.
- return handlers_dispatched;
-
- default: // Dispatch.
- // We'll let dispatch worry about abandoned mutes.
- handlers_dispatched += this->dispatch_handles (wait_status);
- return handlers_dispatched;
- }
-}
-
-// Dispatches any active handles from <handles_[slot]> to
-// <handles_[max_handlep1_]>, polling through our handle set looking
-// for active handles.
-int
-ACE_WFMO_Reactor::dispatch_handles (size_t wait_status)
-{
- // dispatch_slot is the absolute slot. Only += is used to
- // increment it.
- size_t dispatch_slot = 0;
-
- // Cache this value, this is the absolute value.
- size_t max_handlep1 = this->handler_rep_.max_handlep1 ();
-
- // nCount starts off at <max_handlep1>, this is a transient count of
- // handles last waited on.
- size_t nCount = max_handlep1;
-
- for (int number_of_handlers_dispatched = 1;
- ;
- number_of_handlers_dispatched++)
- {
- bool ok = (
-#if ! (defined(__BORLANDC__) && (__BORLANDC__ >= 0x0530))
- // wait_status is unsigned in Borland;
- // This >= is always true, with a warning.
- wait_status >= WAIT_OBJECT_0 &&
-#endif
- wait_status <= (WAIT_OBJECT_0 + nCount));
- if (ok)
- dispatch_slot += wait_status - WAIT_OBJECT_0;
- else
- // Otherwise, a handle was abandoned.
- dispatch_slot += wait_status - WAIT_ABANDONED_0;
-
- // Dispatch handler
- if (this->dispatch_handler (dispatch_slot, max_handlep1) == -1)
- return -1;
-
- // Increment slot
- dispatch_slot++;
-
- // We're done.
- if (dispatch_slot >= max_handlep1)
- return number_of_handlers_dispatched;
-
- // Readjust nCount
- nCount = max_handlep1 - dispatch_slot;
-
- // Check the remaining handles
- wait_status = this->poll_remaining_handles (dispatch_slot);
- switch (wait_status)
- {
- case WAIT_FAILED: // Failure.
- ACE_OS::set_errno_to_last_error ();
- /* FALLTHRU */
- case WAIT_TIMEOUT:
- // There are no more handles ready, we can return.
- return number_of_handlers_dispatched;
- }
- }
-}
-
-int
-ACE_WFMO_Reactor::dispatch_handler (size_t slot,
- size_t max_handlep1)
-{
- // Check if there are window messages that need to be dispatched
- if (slot == max_handlep1)
- return this->dispatch_window_messages ();
-
- // Dispatch the handler if it has not been scheduled for deletion.
- // Note that this is a very week test if there are multiple threads
- // dispatching this slot as no locks are held here. Generally, you
- // do not want to do something like deleting the this pointer in
- // handle_close() if you have registered multiple times and there is
- // more than one thread in WFMO_Reactor->handle_events().
- else if (!this->handler_rep_.scheduled_for_deletion (slot))
- {
- ACE_HANDLE event_handle = *(this->handler_rep_.handles () + slot);
-
- if (this->handler_rep_.current_info ()[slot].io_entry_)
- return this->complex_dispatch_handler (slot,
- event_handle);
- else
- return this->simple_dispatch_handler (slot,
- event_handle);
- }
- else
- // The handle was scheduled for deletion, so we will skip it.
- return 0;
-}
-
-int
-ACE_WFMO_Reactor::simple_dispatch_handler (int slot,
- ACE_HANDLE event_handle)
-{
- // This dispatch is used for non-I/O entires
-
- // Assign the ``signaled'' HANDLE so that callers can get it.
- siginfo_t sig (event_handle);
-
- ACE_Event_Handler *eh =
- this->handler_rep_.current_info ()[slot].event_handler_;
-
- // Upcall
- if (eh->handle_signal (0, &sig) == -1)
- this->handler_rep_.unbind (event_handle,
- ACE_Event_Handler::NULL_MASK);
-
- return 0;
-}
-
-int
-ACE_WFMO_Reactor::complex_dispatch_handler (int slot,
- ACE_HANDLE event_handle)
-{
- // This dispatch is used for I/O entires.
-
- ACE_WFMO_Reactor_Handler_Repository::Current_Info &current_info =
- this->handler_rep_.current_info ()[slot];
-
- WSANETWORKEVENTS events;
- ACE_Reactor_Mask problems = ACE_Event_Handler::NULL_MASK;
- if (::WSAEnumNetworkEvents ((SOCKET) current_info.io_handle_,
- event_handle,
- &events) == SOCKET_ERROR)
- problems = ACE_Event_Handler::ALL_EVENTS_MASK;
- else
- {
- // Prepare for upcalls. Clear the bits from <events> representing
- // events the handler is not interested in. If there are any left,
- // do the upcall(s). upcall will replace events.lNetworkEvents
- // with bits representing any functions that requested a repeat
- // callback before checking handles again. In this case, continue
- // to call back unless the handler is unregistered as a result of
- // one of the upcalls. The way this is written, the upcalls will
- // keep being done even if one or more upcalls reported problems.
- // In practice this may turn out not so good, but let's see. If any
- // problems, please notify Steve Huston <shuston@riverace.com>
- // before or after you change this code.
- events.lNetworkEvents &= current_info.network_events_;
- while (events.lNetworkEvents != 0)
- {
- // Upcall
- problems |= this->upcall (current_info.event_handler_,
- current_info.io_handle_,
- events);
- if (this->handler_rep_.scheduled_for_deletion (slot))
- break;
- }
- }
-
- if (problems != ACE_Event_Handler::NULL_MASK
- && !this->handler_rep_.scheduled_for_deletion (slot) )
- this->handler_rep_.unbind (event_handle, problems);
-
- return 0;
-}
-
-ACE_Reactor_Mask
-ACE_WFMO_Reactor::upcall (ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- WSANETWORKEVENTS &events)
-{
- // This method figures out what exactly has happened to the socket
- // and then calls appropriate methods.
- ACE_Reactor_Mask problems = ACE_Event_Handler::NULL_MASK;
-
- // Go through the events and do the indicated upcalls. If the handler
- // doesn't want to be called back, clear the bit for that event.
- // At the end, set the bits back to <events> to request a repeat call.
-
- long actual_events = events.lNetworkEvents;
- int action;
-
- if (actual_events & FD_READ)
- {
- action = event_handler->handle_input (io_handle);
- if (action <= 0)
- {
- ACE_CLR_BITS (actual_events, FD_READ);
- if (action == -1)
- ACE_SET_BITS (problems, ACE_Event_Handler::READ_MASK);
- }
- }
-
- if ((actual_events & FD_CLOSE)
- && !ACE_BIT_ENABLED (problems, ACE_Event_Handler::READ_MASK))
- {
- action = event_handler->handle_input (io_handle);
- if (action <= 0)
- {
- ACE_CLR_BITS (actual_events, FD_CLOSE);
- if (action == -1)
- ACE_SET_BITS (problems, ACE_Event_Handler::READ_MASK);
- }
- }
-
- if (actual_events & FD_ACCEPT)
- {
- action = event_handler->handle_input (io_handle);
- if (action <= 0)
- {
- ACE_CLR_BITS (actual_events, FD_ACCEPT);
- if (action == -1)
- ACE_SET_BITS (problems, ACE_Event_Handler::ACCEPT_MASK);
- }
- }
-
- if (actual_events & FD_WRITE)
- {
- action = event_handler->handle_output (io_handle);
- if (action <= 0)
- {
- ACE_CLR_BITS (actual_events, FD_WRITE);
- if (action == -1)
- ACE_SET_BITS (problems, ACE_Event_Handler::WRITE_MASK);
- }
- }
-
- if (actual_events & FD_CONNECT)
- {
- if (events.iErrorCode[FD_CONNECT_BIT] == 0)
- {
- // Successful connect
- action = event_handler->handle_output (io_handle);
- if (action <= 0)
- {
- ACE_CLR_BITS (actual_events, FD_CONNECT);
- if (action == -1)
- ACE_SET_BITS (problems,
- ACE_Event_Handler::CONNECT_MASK);
- }
- }
- // Unsuccessful connect
- else
- {
- action = event_handler->handle_input (io_handle);
- if (action <= 0)
- {
- ACE_CLR_BITS (actual_events, FD_CONNECT);
- if (action == -1)
- ACE_SET_BITS (problems,
- ACE_Event_Handler::CONNECT_MASK);
- }
- }
- }
-
- if (actual_events & FD_OOB)
- {
- action = event_handler->handle_exception (io_handle);
- if (action <= 0)
- {
- ACE_CLR_BITS (actual_events, FD_OOB);
- if (action == -1)
- ACE_SET_BITS (problems, ACE_Event_Handler::EXCEPT_MASK);
- }
- }
-
- if (actual_events & FD_QOS)
- {
- action = event_handler->handle_qos (io_handle);
- if (action <= 0)
- {
- ACE_CLR_BITS (actual_events, FD_QOS);
- if (action == -1)
- ACE_SET_BITS (problems, ACE_Event_Handler::QOS_MASK);
- }
- }
-
- if (actual_events & FD_GROUP_QOS)
- {
- action = event_handler->handle_group_qos (io_handle);
- if (action <= 0)
- {
- ACE_CLR_BITS (actual_events, FD_GROUP_QOS);
- if (action == -1)
- ACE_SET_BITS (problems, ACE_Event_Handler::GROUP_QOS_MASK);
- }
- }
-
- events.lNetworkEvents = actual_events;
- return problems;
-}
-
-
-int
-ACE_WFMO_Reactor::update_state (void)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, monitor, this->lock_, -1);
-
- // Decrement active threads
- this->active_threads_--;
-
- // Check if the state of the handler repository has changed or new
- // owner has to be set
- if (this->handler_rep_.changes_required () || this->new_owner ())
- {
- if (this->change_state_thread_ == 0)
- // Try to become the thread which will be responsible for the
- // changes
- {
- this->change_state_thread_ = ACE_Thread::self ();
- // Make sure no new threads are allowed to enter
- this->ok_to_wait_.reset ();
-
- if (this->active_threads_ > 0)
- // Check for other active threads
- {
- // Wake up all other threads
- this->wakeup_all_threads_.signal ();
- // Release <lock_>
- monitor.release ();
- // Go to sleep waiting for all other threads to get done
- this->waiting_to_change_state_.wait ();
- // Re-acquire <lock_> again
- monitor.acquire ();
- }
-
- // Note that make_changes() calls into user code which can
- // request other changes. So keep looping until all
- // requested changes are completed.
- while (this->handler_rep_.changes_required ())
- // Make necessary changes to the handler repository
- this->handler_rep_.make_changes ();
- if (this->new_owner ())
- // Update the owner
- this->change_owner ();
- // Turn off <wakeup_all_threads_>
- this->wakeup_all_threads_.reset ();
- // Let everyone know that it is ok to go ahead
- this->ok_to_wait_.signal ();
- // Reset this flag
- this->change_state_thread_ = 0;
- }
- else if (this->active_threads_ == 0)
- // This thread did not get a chance to become the change
- // thread. If it is the last one out, it will wakeup the
- // change thread
- this->waiting_to_change_state_.signal ();
- }
- // This is if we were woken up explicitily by the user and there are
- // no state changes required.
- else if (this->active_threads_ == 0)
- // Turn off <wakeup_all_threads_>
- this->wakeup_all_threads_.reset ();
-
- return 0;
-}
-
-void
-ACE_WFMO_Reactor::dump (void) const
-{
- ACE_TRACE ("ACE_WFMO_Reactor::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Count of currently active threads = %d\n"),
- this->active_threads_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ID of owner thread = %d\n"),
- this->owner_));
-
- this->handler_rep_.dump ();
- this->signal_handler_->dump ();
- this->timer_queue_->dump ();
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-int
-ACE_WFMO_Reactor_Notify::dispatch_notifications (int &number_of_active_handles,
- ACE_Handle_Set &rd_mask)
-{
- return -1;
-}
-
-int
-ACE_WFMO_Reactor_Notify::close (void)
-{
- return -1;
-}
-
-ACE_WFMO_Reactor_Notify::ACE_WFMO_Reactor_Notify (void)
- : max_notify_iterations_ (-1),
- timer_queue_ (0)
-{
-}
-
-int
-ACE_WFMO_Reactor_Notify::open (ACE_Reactor_Impl *wfmo_reactor,
- ACE_Timer_Queue *timer_queue,
- int ignore_notify)
-{
- timer_queue_ = timer_queue;
- return wfmo_reactor->register_handler (this);
-}
-
-ACE_HANDLE
-ACE_WFMO_Reactor_Notify::get_handle (void) const
-{
- return this->wakeup_one_thread_.handle ();
-}
-
-// Handle all pending notifications.
-
-int
-ACE_WFMO_Reactor_Notify::handle_signal (int signum,
- siginfo_t *siginfo,
- ucontext_t *)
-{
- ACE_UNUSED_ARG (signum);
-
- // Just check for sanity...
- if (siginfo->si_handle_ != this->wakeup_one_thread_.handle ())
- return -1;
-
- // This will get called when <WFMO_Reactor->wakeup_one_thread_> event
- // is signaled.
- // ACE_DEBUG ((LM_DEBUG,
- // ACE_TEXT ("(%t) waking up to handle internal notifications\n")));
-
- for (int i = 1; ; i++)
- {
- ACE_Message_Block *mb = 0;
-
- if (this->message_queue_.dequeue_head
- (mb, (ACE_Time_Value *) &ACE_Time_Value::zero) == -1)
- {
- if (errno == EWOULDBLOCK)
- // We've reached the end of the processing, return
- // normally.
- return 0;
- else
- return -1; // Something weird happened...
- }
- else
- {
- ACE_Notification_Buffer *buffer =
- (ACE_Notification_Buffer *) mb->base ();
-
- // If eh == 0 then we've got major problems! Otherwise, we
- // need to dispatch the appropriate handle_* method on the
- // ACE_Event_Handler pointer we've been passed.
-
- if (buffer->eh_ != 0)
- {
- int result = 0;
-
- switch (buffer->mask_)
- {
- case ACE_Event_Handler::READ_MASK:
- case ACE_Event_Handler::ACCEPT_MASK:
- result = buffer->eh_->handle_input (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::WRITE_MASK:
- result = buffer->eh_->handle_output (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::EXCEPT_MASK:
- result = buffer->eh_->handle_exception (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::QOS_MASK:
- result = buffer->eh_->handle_qos (ACE_INVALID_HANDLE);
- break;
- case ACE_Event_Handler::GROUP_QOS_MASK:
- result = buffer->eh_->handle_group_qos (ACE_INVALID_HANDLE);
- break;
- default:
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("invalid mask = %d\n"),
- buffer->mask_));
- break;
- }
- if (result == -1)
- buffer->eh_->handle_close (ACE_INVALID_HANDLE,
- ACE_Event_Handler::EXCEPT_MASK);
- }
-
- // Make sure to delete the memory regardless of success or
- // failure!
- mb->release ();
-
- // Bail out if we've reached the <max_notify_iterations_>.
- // Note that by default <max_notify_iterations_> is -1, so
- // we'll loop until we're done.
- if (i == this->max_notify_iterations_)
- {
- // If there are still notification in the queue, we need
- // to wake up again
- if (!this->message_queue_.is_empty ())
- this->wakeup_one_thread_.signal ();
-
- // Break the loop as we have reached max_notify_iterations_
- return 0;
- }
- }
- }
-}
-
-// Notify the WFMO_Reactor, potentially enqueueing the
-// <ACE_Event_Handler> for subsequent processing in the WFMO_Reactor
-// thread of control.
-
-int
-ACE_WFMO_Reactor_Notify::notify (ACE_Event_Handler *eh,
- ACE_Reactor_Mask mask,
- ACE_Time_Value *timeout)
-{
- if (eh != 0)
- {
- ACE_Message_Block *mb = 0;
- ACE_NEW_RETURN (mb,
- ACE_Message_Block (sizeof (ACE_Notification_Buffer)),
- -1);
-
- ACE_Notification_Buffer *buffer =
- (ACE_Notification_Buffer *) mb->base ();
- buffer->eh_ = eh;
- buffer->mask_ = mask;
-
- // Convert from relative time to absolute time by adding the
- // current time of day. This is what <ACE_Message_Queue>
- // expects.
- if (timeout != 0)
- *timeout += timer_queue_->gettimeofday ();
-
- if (this->message_queue_.enqueue_tail
- (mb, timeout) == -1)
- {
- mb->release ();
- return -1;
- }
- }
-
- return this->wakeup_one_thread_.signal ();
-}
-
-void
-ACE_WFMO_Reactor_Notify::max_notify_iterations (int iterations)
-{
- ACE_TRACE ("ACE_WFMO_Reactor_Notify::max_notify_iterations");
- // Must always be > 0 or < 0 to optimize the loop exit condition.
- if (iterations == 0)
- iterations = 1;
-
- this->max_notify_iterations_ = iterations;
-}
-
-int
-ACE_WFMO_Reactor_Notify::max_notify_iterations (void)
-{
- ACE_TRACE ("ACE_WFMO_Reactor_Notify::max_notify_iterations");
- return this->max_notify_iterations_;
-}
-
-void
-ACE_WFMO_Reactor_Notify::dump (void) const
-{
- ACE_TRACE ("ACE_WFMO_Reactor_Notify::dump");
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- this->timer_queue_->dump ();
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Max. iteration: %d\n"),
- this->max_notify_iterations_));
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-void
-ACE_WFMO_Reactor::max_notify_iterations (int iterations)
-{
- ACE_TRACE ("ACE_WFMO_Reactor::max_notify_iterations");
- ACE_GUARD (ACE_Process_Mutex, monitor, this->lock_);
-
- // Must always be > 0 or < 0 to optimize the loop exit condition.
- this->notify_handler_->max_notify_iterations (iterations);
-}
-
-int
-ACE_WFMO_Reactor::max_notify_iterations (void)
-{
- ACE_TRACE ("ACE_WFMO_Reactor::max_notify_iterations");
- ACE_GUARD_RETURN (ACE_Process_Mutex, monitor, this->lock_, -1);
-
- return this->notify_handler_->max_notify_iterations ();
-}
-
-// No-op WinSOCK2 methods to help WFMO_Reactor compile
-#if !defined (ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2 == 0)
-int
-WSAEventSelect (SOCKET s,
- WSAEVENT hEventObject,
- long lNetworkEvents)
-{
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (hEventObject);
- ACE_UNUSED_ARG (lNetworkEvents);
-
- return -1;
-}
-
-int
-WSAEnumNetworkEvents (SOCKET s,
- WSAEVENT hEventObject,
- LPWSANETWORKEVENTS lpNetworkEvents)
-{
- ACE_UNUSED_ARG (s);
- ACE_UNUSED_ARG (hEventObject);
- ACE_UNUSED_ARG (lpNetworkEvents);
-
- return -1;
-}
-#endif /* !defined ACE_HAS_WINSOCK2 */
-
-#endif /* ACE_WIN32 */
diff --git a/ace/WFMO_Reactor.h b/ace/WFMO_Reactor.h
deleted file mode 100644
index 9515a166ae7..00000000000
--- a/ace/WFMO_Reactor.h
+++ /dev/null
@@ -1,1168 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// WFMO_Reactor.h
-//
-// = AUTHOR
-// Irfan Pyarali, Tim Harrison, and Doug Schmidt
-//
-// ============================================================================
-
-#ifndef ACE_WFMO_REACTOR_H
-#define ACE_WFMO_REACTOR_H
-#include "ace/pre.h"
-
-#include "ace/Signal.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ace/Timer_Queue.h"
-#include "ace/Event_Handler.h"
-#include "ace/Synch.h"
-#include "ace/Reactor_Impl.h"
-#include "ace/Message_Queue.h"
-
-// Forward decl.
-class ACE_WFMO_Reactor;
-class ACE_Handle_Set;
-
-class ACE_Export ACE_Wakeup_All_Threads_Handler : public ACE_Event_Handler
-{
- // = TITLE
- //
- // This is a helper class whose sole purpose is to handle events
- // on <ACE_WFMO_Reactor->wakeup_all_threads_>
- //
-public:
- virtual int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0);
- // Called when the <ACE_WFMO_Reactor->wakeup_all_threads_>
-};
-
-class ACE_Export ACE_WFMO_Reactor_Handler_Repository
-{
- // = TITLE
- //
- // Used to map <ACE_HANDLE>s onto the appropriate
- // <ACE_Event_Handler> * and other information.
- //
-public:
- friend class ACE_WFMO_Reactor;
-
- class Common_Info
- {
- // = TITLE
- //
- // This struct contains the necessary information for every
- // <Event_Handler> entry. The reason the event is not in this
- // structure is because we need to pass an event array into
- // WaitForMultipleObjects and therefore keeping the events
- // seperate makes sense.
- //
- public:
- int io_entry_;
- // This indicates whether this entry is for I/O or for a regular
- // event
-
- ACE_Event_Handler *event_handler_;
- // The assosiated <Event_Handler>
-
- ACE_HANDLE io_handle_;
- // The I/O handle related to the <Event_Handler>. This entry is
- // only valid if the <io_entry_> flag is true.
-
- long network_events_;
- // This is the set of events that the <Event_Handler> is
- // interested in This entry is only valid if the <io_entry_> flag
- // is true.
-
- int delete_event_;
- // This flag indicates that <WFMO_Reactor> created the event on
- // behalf of the user. Therefore we need to clean this up when the
- // <Event_Handler> removes itself from <WFMO_Reactor>. This entry
- // is only valid if the <io_entry_> flag is true.
-
- int delete_entry_;
- // This is set when the entry needed to be deleted.
-
- ACE_Reactor_Mask close_masks_;
- // These are the masks related to <handle_close> for the
- // <Event_Handler>. This is only valid when <delete_entry_> is
- // set.
-
- Common_Info (void);
- // Constructor used for initializing the structure
-
- void reset (void);
- // Reset the state of the structure
-
- void set (int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event,
- int delete_entry,
- ACE_Reactor_Mask close_masks);
- // Set the structure to these new values
-
- void set (Common_Info &common_info);
- // Set the structure to these new values
-
- void dump (void) const;
- // Dump the state of an object.
- };
-
- class Current_Info : public Common_Info
- {
- // = TITLE
- //
- // This structure inherits from the common structure to add
- // information for current entries.
- //
- public:
- int suspend_entry_;
- // This is set when the entry needed to be suspended.
-
- Current_Info (void);
- // Default constructor
-
- void reset (void);
- // Reset the state of the structure
-
- void set (int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event,
- int delete_entry = 0,
- ACE_Reactor_Mask close_masks = ACE_Event_Handler::NULL_MASK,
- int suspend_entry = 0);
- // Set the structure to these new values
-
- void set (Common_Info &common_info,
- int suspend_entry = 0);
- // Set the structure to these new values
-
- void dump (ACE_HANDLE event_handle) const;
- // Dump the state of an object.
- };
-
- class To_Be_Added_Info : public Common_Info
- {
- // = TITLE
- //
- // This structure inherits from the common structure to add
- // information for <to_be_added> entries.
- //
- public:
- ACE_HANDLE event_handle_;
- // Handle for the event
-
- int suspend_entry_;
- // This is set when the entry needed to be suspended.
-
- To_Be_Added_Info (void);
- // Default constructor
-
- void reset (void);
- // Reset the state of the structure
-
- void set (ACE_HANDLE event_handle,
- int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event,
- int delete_entry = 0,
- ACE_Reactor_Mask close_masks = ACE_Event_Handler::NULL_MASK,
- int suspend_entry = 0);
- // Set the structure to these new values
-
- void set (ACE_HANDLE event_handle,
- Common_Info &common_info,
- int suspend_entry = 0);
- // Set the structure to these new values
-
- void dump (void) const;
- // Dump the state of an object.
- };
-
- class Suspended_Info : public Common_Info
- {
- // = TITLE
- //
- // This structure inherits from the common structure to add
- // information for suspended entries.
- //
- public:
- ACE_HANDLE event_handle_;
- // Handle for the event
-
- int resume_entry_;
- // This is set when the entry needed to be resumed.
-
- Suspended_Info (void);
- // Constructor used for initializing the structure
-
- void reset (void);
- // Reset the state of the structure
-
- void set (ACE_HANDLE event_handle,
- int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event,
- int delete_entry = 0,
- ACE_Reactor_Mask close_masks = 0,
- int resume_entry = 0);
- // Set the structure to these new values
-
- void set (ACE_HANDLE event_handle,
- Common_Info &common_info,
- int resume_entry = 0);
- // Set the structure to these new values
-
- void dump (void) const;
- // Dump the state of an object.
- };
-
- ACE_WFMO_Reactor_Handler_Repository (ACE_WFMO_Reactor &wfmo_reactor);
- // Constructor.
-
- virtual ~ACE_WFMO_Reactor_Handler_Repository (void);
- // Destructor.
-
- int open (size_t size);
- // Initialize the repository of the approriate <size>.
-
- int close (void);
- // Close down the handler repository.
-
- // = Search structure operations.
-
- int bind (ACE_HANDLE, ACE_Event_Handler *);
- // Bind the <ACE_Event_Handler *> to the <ACE_HANDLE>. This is for
- // the simple event entry.
-
- int bind_i (int io_entry,
- ACE_Event_Handler *event_handler,
- long network_events,
- ACE_HANDLE io_handle,
- ACE_HANDLE event_handle,
- int delete_event);
- // Insert I/O <Event_Handler> entry into the system. This method
- // assumes that the lock are head *before* this method is invoked.
-
- int unbind (ACE_HANDLE,
- ACE_Reactor_Mask mask);
- // Remove the binding of <ACE_HANDLE> in accordance with the <mask>.
-
- int unbind_i (ACE_HANDLE,
- ACE_Reactor_Mask mask,
- int &changes_required);
- // Non-lock-grabbing version of <unbind>
-
- void unbind_all (void);
- // Remove all bindings of <ACE_HANDLE, ACE_Event_Handler> tuples.
-
- // = Sanity checking.
-
- // Check the <handle> to make sure it's a valid ACE_HANDLE
- int invalid_handle (ACE_HANDLE handle) const;
-
- // = Accessors.
- size_t max_handlep1 (void) const;
- // Maximum ACE_HANDLE value, plus 1.
-
- ACE_HANDLE *handles (void) const;
- // Pointer to the beginning of the current array of <ACE_HANDLE>
- // *'s.
-
- Current_Info *current_info (void) const;
- // Pointer to the beginning of the current array of
- // <ACE_Event_Handler> *'s.
-
- virtual int changes_required (void);
- // Check if changes to the handle set are required.
-
- virtual int make_changes (void);
- // Make changes to the handle set
-
- int scheduled_for_deletion (size_t slot) const;
- // Check to see if <slot> has been scheduled for deletion
-
- int modify_network_events_i (ACE_HANDLE io_handle,
- ACE_Reactor_Mask new_masks,
- ACE_Reactor_Mask &old_masks,
- long &new_network_events,
- ACE_HANDLE &event_handle,
- int &delete_event,
- int operation);
- // This method is used to calculate the network mask after a mask_op
- // request to <WFMO_Reactor>. Note that because the <Event_Handler>
- // may already be in the handler repository, we may have to find the
- // old event and the old network events
-
- ACE_Reactor_Mask bit_ops (long &existing_masks,
- ACE_Reactor_Mask to_be_removed_masks,
- int operation);
- // This method is used to change the network mask left (if any)
- // after a remove request to <WFMO_Reactor>
-
- int suspend_handler_i (ACE_HANDLE handle,
- int &changes_required);
- // Temporarily suspend entry
-
- int resume_handler_i (ACE_HANDLE handle,
- int &changes_required);
- // Resume suspended entry
-
- int make_changes_in_current_infos (void);
- // Deletions and suspensions in current_info_
-
- int make_changes_in_suspension_infos (void);
- // Deletions and resumptions in current_suspended_info_
-
- int make_changes_in_to_be_added_infos (void);
- // Deletions in to_be_added_info_, or transfers to current_info_ or
- // current_suspended_info_ from to_be_added_info_
-
- int remove_handler_i (size_t slot,
- ACE_Reactor_Mask mask);
- // Removes the <ACE_Event_Handler> at <slot> from the table.
-
- int remove_suspended_handler_i (size_t slot,
- ACE_Reactor_Mask mask);
- // Removes the <ACE_Event_Handler> at <slot> from the table.
-
- int remove_to_be_added_handler_i (size_t slot,
- ACE_Reactor_Mask to_be_removed_masks);
- // Removes the <ACE_Event_Handler> at <slot> from the table.
-
- int handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Event_Handler **event_handler = 0);
- // Check to see if <handle> is associated with a valid Event_Handler
- // bound to <mask>. Return the <event_handler> associated with this
- // <handler> if <event_handler> != 0.
-
- void dump (void) const;
- // Dump the state of an object.
-
-protected:
- ACE_WFMO_Reactor &wfmo_reactor_;
- // Reference to our <WFMO_Reactor>.
-
- size_t max_size_;
- // Maximum number of handles.
-
- ACE_HANDLE *current_handles_;
- // Array of <ACE_HANDLEs> passed to <WaitForMultipleObjects>. This
- // is not part of the structure as the handle array needs to be
- // passed directly to <WaitForMultipleObjects>.
-
- Current_Info *current_info_;
- // Array of current entries in the table
-
- size_t max_handlep1_;
- // A count of the number of active handles.
-
- To_Be_Added_Info *to_be_added_info_;
- // Information for entries to be added
-
- size_t handles_to_be_added_;
- // Number of records to be added
-
- Suspended_Info *current_suspended_info_;
- // Currently suspended handles
-
- size_t suspended_handles_;
- // Number of currently suspended handles
-
- size_t handles_to_be_suspended_;
- // Number of records to be suspended
-
- size_t handles_to_be_resumed_;
- // Number of records to be resumed
-
- size_t handles_to_be_deleted_;
- // Number of records to be deleted
-
-};
-
-class ACE_Export ACE_WFMO_Reactor_Notify : public ACE_Reactor_Notify
-{
- // = TITLE
- // Unblock the <ACE_WFMO_Reactor> from its event loop, passing
- // it an optional <ACE_Event_Handler> to dispatch.
- //
- // = DESCRIPTION
- // This implementation is necessary for cases where the
- // <ACE_WFMO_Reactor> is run in a multi-threaded program. In
- // this case, we need to be able to unblock
- // <WaitForMultipleObjects> when updates occur other than in the
- // main <ACE_WFMO_Reactor> thread. To do this, we signal an
- // auto-reset event the <ACE_WFMO_Reactor> is listening on. If
- // an <ACE_Event_Handler> and <ACE_Reactor_Mask> is passed to
- // <notify>, the appropriate <handle_*> method is dispatched.
-public:
- ACE_WFMO_Reactor_Notify (void);
- // Constructor
-
- virtual int open (ACE_Reactor_Impl *wfmo_reactor,
- ACE_Timer_Queue *timer_queue,
- int disable_notify = 0);
- // Initialization. <timer_queue> is stored to call <gettimeofday>.
-
- virtual int close (void);
- // No-op.
-
- ssize_t notify (ACE_Event_Handler *event_handler = 0,
- ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK,
- ACE_Time_Value *timeout = 0);
- // Special trick to unblock <WaitForMultipleObjects> when updates
- // occur. All we do is enqueue <event_handler> and <mask> onto the
- // <ACE_Message_Queue> and wakeup the <WFMO_Reactor> by signaling
- // its <ACE_Event> handle. The <ACE_Time_Value> indicates how long
- // to blocking trying to notify the <WFMO_Reactor>. If <timeout> ==
- // 0, the caller will block until action is possible, else will wait
- // until the relative time specified in <timeout> elapses).
-
- virtual int dispatch_notifications (int &number_of_active_handles,
- ACE_Handle_Set &rd_mask);
- // No-op.
-
- virtual ACE_HANDLE get_handle (void) const;
- // Returns a handle to the <ACE_Auto_Event>.
-
- void max_notify_iterations (int);
- // Set the maximum number of times that the
- // <ACE_WFMO_Reactor_Notify::handle_input> method will iterate and
- // dispatch the <ACE_Event_Handlers> that are passed in via the
- // notify queue before breaking out of its
- // <ACE_Message_Queue::dequeue> loop. By default, this is set to
- // -1, which means "iterate until the queue is empty." Setting this
- // to a value like "1 or 2" will increase "fairness" (and thus
- // prevent starvation) at the expense of slightly higher dispatching
- // overhead.
-
- int max_notify_iterations (void);
- // Get the maximum number of times that the
- // <ACE_WFMO_Reactor_Notify::handle_input> method will iterate and
- // dispatch the <ACE_Event_Handlers> that are passed in via the
- // notify queue before breaking out of its
- // <ACE_Message_Queue::dequeue> loop.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
-private:
- ACE_Timer_Queue *timer_queue_;
- // Pointer to the wfmo_reactor's timer queue.
-
- virtual int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0);
- // Called when the notification event waited on by
- // <ACE_WFMO_Reactor> is signaled. This dequeues all pending
- // <ACE_Event_Handlers> and dispatches them.
-
- ACE_Auto_Event wakeup_one_thread_;
- // An auto event is used so that we can <signal> it to wakeup one
- // thread up (e.g., when the <notify> method is called).
-
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
-// because Sun C++ 4.1 can't cope with this declaration:
- ACE_Message_Queue<ACE_MT_SYNCH> message_queue_;
-#endif /* ACE_WIN32 */
- // Message queue that keeps track of pending <ACE_Event_Handlers>.
- // This queue must be thread-safe because it can be called by
- // multiple threads of control.
-
- int max_notify_iterations_;
- // Keeps track of the maximum number of times that the
- // <ACE_WFMO_Reactor_Notify::handle_input> method will iterate and
- // dispatch the <ACE_Event_Handlers> that are passed in via the
- // notify queue before breaking out of its
- // <ACE_Message_Queue::dequeue> loop. By default, this is set to
- // -1, which means "iterate until the queue is empty."
-};
-
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
-class ACE_Export ACE_WFMO_Reactor : public ACE_Reactor_Impl
-{
- // = TITLE
- // An object oriented event demultiplexor and event handler
- // WFMO_Reactor for Win32 WaitForMultipleObjects
- //
- // = DESCRIPTION
- // The ACE_WFMO_Reactor is an object-oriented event
- // demultiplexor and event handler Reactor. The sources of
- // events that the ACE_WFMO_Reactor waits for and dispatches
- // includes I/O events, general Win32 synchronization events
- // (such as mutexes, semaphores, threads, etc.) and timer
- // events.
- //
- // Note that changes to the state of WFMO_Reactor are not
- // instantaneous. Most changes (registration, removal,
- // suspension, and resumption of handles, and changes in
- // ownership) are made when the WFMO_Reactor reaches a stable
- // state. Users should be careful, specially when removing
- // handlers. This is because the WFMO_Reactor will call
- // handle_close on the handler when it is finally removed and
- // not when remove_handler is called. If the handler is not
- // going to be around when the WFMO_Reactor calls
- // <ACE_Event_Handler::handle_close>, use the DONT_CALL flag
- // with <remove_handler>. Or else, dynamically allocate the
- // handler, and then call "delete this" inside
- // <ACE_Event_Handler::handle_close>.
-public:
- friend class ACE_WFMO_Reactor_Handler_Repository;
- friend class ACE_WFMO_Reactor_Test;
-
- enum
- {
- DEFAULT_SIZE = MAXIMUM_WAIT_OBJECTS - 2
- // Default size of the WFMO_Reactor's handle table. Two slots will
- // be added to the <size> parameter in the constructor and open
- // methods which will store handles used for internal management
- // purposes.
- };
-
- // = Initialization and termination methods.
-
- ACE_WFMO_Reactor (ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0);
- // Initialize <ACE_WFMO_Reactor> with the default size.
-
- ACE_WFMO_Reactor (size_t size,
- int unused = 0,
- ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0);
- // Initialize <ACE_WFMO_Reactor> with size <size>. <size> should
- // not exceed <ACE_WFMO_Reactor::DEFAULT_SIZE>. Two slots will be
- // added to the <size> parameter which will store handles used for
- // internal management purposes.
-
- virtual int open (size_t size = ACE_WFMO_Reactor::DEFAULT_SIZE,
- int restart = 0,
- ACE_Sig_Handler * = 0,
- ACE_Timer_Queue * = 0,
- int disable_notify_pipe = 0,
- ACE_Reactor_Notify * = 0);
- // Initialize <ACE_WFMO_Reactor> with size <size>. <size> should
- // not exceed <ACE_WFMO_Reactor::DEFAULT_SIZE>. Two slots will be
- // added to the <size> parameter which will store handles used for
- // internal management purposes.
-
- virtual int current_info (ACE_HANDLE, size_t & /* size */);
- // Returns -1 (not used in this implementation);
-
- virtual int set_sig_handler (ACE_Sig_Handler *signal_handler);
- // Use a user specified signal handler instead.
-
- virtual int set_timer_queue (ACE_Timer_Queue *timer_queue);
- // Use a user specified timer queue instead.
-
- virtual int close (void);
- // Close down the WFMO_Reactor and release all of its resources.
-
- virtual ~ACE_WFMO_Reactor (void);
- // Close down the WFMO_Reactor and release all of its resources.
-
- // = Event loop drivers.
-
- virtual int work_pending (const ACE_Time_Value &max_wait_time = ACE_Time_Value::zero);
- // Returns non-zero if there are I/O events "ready" for dispatching,
- // but does not actually dispatch the event handlers. By default,
- // don't block while checking this, i.e., "poll".
-
- virtual int handle_events (ACE_Time_Value *max_wait_time = 0);
- virtual int alertable_handle_events (ACE_Time_Value *max_wait_time = 0);
- // This event loop driver blocks for up to <max_wait_time> before
- // returning. It will return earlier if timer events, I/O events,
- // or signal events occur. Note that <max_wait_time> can be 0, in
- // which case this method blocks indefinitely until events occur.
- //
- // <max_wait_time> is decremented to reflect how much time this call
- // took. For instance, if a time value of 3 seconds is passed to
- // handle_events and an event occurs after 2 seconds,
- // <max_wait_time> will equal 1 second. This can be used if an
- // application wishes to handle events for some fixed amount of
- // time.
- //
- // <WaitForMultipleObjects> is used as the demultiplexing call
- //
- // Returns the total number of I/O and timer <ACE_Event_Handler>s
- // that were dispatched, 0 if the <max_wait_time> elapsed without
- // dispatching any handlers, or -1 if an error occurs.
- //
- // The only difference between <alertable_handle_events> and
- // <handle_events> is that in the alertable case, TRUE is passed to
- // <WaitForMultipleObjects> for the <bAlertable> option.
-
- virtual int handle_events (ACE_Time_Value &max_wait_time);
- virtual int alertable_handle_events (ACE_Time_Value &max_wait_time);
- // This method is just like the one above, except the
- // <max_wait_time> value is a reference and can therefore never be
- // NULL.
- //
- // The only difference between <alertable_handle_events> and
- // <handle_events> is that in the alertable case, TRUE is passed to
- // <WaitForMultipleObjects> for the <bAlertable> option.
-
-
- // = Event handling control.
-
- virtual int deactivated (void);
- // Return the status of Reactor. If this function returns 0, the reactor is
- // actively handling events. If it returns non-zero, <handling_events> and
- // <handle_alertable_events> return -1 immediately.
-
- virtual void deactivate (int do_stop);
- // Control whether the Reactor will handle any more incoming events or not.
- // If <do_stop> == 1, the Reactor will be disabled. By default, a reactor
- // is in active state and can be deactivated/reactived as wish.
-
- // = Register and remove Handlers.
-
- virtual int register_handler (ACE_Event_Handler *event_handler,
- ACE_HANDLE event_handle = ACE_INVALID_HANDLE);
- // Register an <ACE_Event_Handler> <event_handler>. Since no Event
- // Mask is passed through this interface, it is assumed that the
- // <handle> being passed in is an event handle and when the event
- // becomes signaled, <WFMO_Reactor> will call handle_signal on
- // <event_handler>. If <handle> == <ACE_INVALID_HANDLE> the
- // <ACE_WFMO_Reactor> will call the <get_handle> method of
- // <event_handler> to extract the underlying event handle.
-
- virtual int register_handler (ACE_HANDLE event_handle,
- ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // Register an <ACE_Event_Handler> <event_handle>. <mask> specifies
- // the network events that the <event_handler> is interested in. If
- // <io_handle> == <ACE_INVALID_HANDLE> the <ACE_WFMO_Reactor> will
- // call the <get_handle> method of <event_handler> to extract the
- // underlying I/O handle. If the <event_handle> ==
- // <ACE_INVALID_HANDLE>, WFMO_Reactor will create an event for
- // associating it with the I/O handle. When the <event_handle> is
- // signalled, the appropriate <handle_*> callback will be invoked on
- // the <Event_Handler>
-
- virtual int register_handler (ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // This is a simple version of the above <register_handler> method
- // where the I/O handle is passed in and the event handle will
- // always be created by <WFMO_Reactor>
-
- virtual int register_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // This is a simple version of the above <register_handler> method
- // where the I/O handle will always come from <get_handle> on the
- // <Event_Handler> and the event handle will always be created by
- // <WFMO_Reactor>
-
- virtual int register_handler (const ACE_Handle_Set &handles,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // Register <event_handler> with all the <handles> in the
- // <Handle_Set>.
-
- virtual int register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0,
- ACE_Event_Handler **old_sh = 0,
- ACE_Sig_Action *old_disp = 0);
- // Register <new_sh> to handle the signal <signum> using the
- // <new_disp>. Returns the <old_sh> that was previously registered
- // (if any), along with the <old_disp> of the signal handler.
-
- virtual int register_handler (const ACE_Sig_Set &sigset,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp = 0);
- // Registers <new_sh> to handle a set of signals <sigset> using the
- // <new_disp>.
-
- virtual int remove_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // Removes <event_handler> from the <ACE_WFMO_Reactor>. Note that
- // the <ACE_WFMO_Reactor> will call the <get_handle> method of
- // <event_handler> to extract the underlying handle. If <mask> ==
- // <ACE_Event_Handler::DONT_CALL> then the <handle_close> method of
- // the <event_handler> is not invoked. Note that the <handle> can
- // either be the <event_handle> or the <io_handle>
-
- virtual int remove_handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask);
- // Removes <handle> from the <ACE_WFMO_Reactor>. If <mask> ==
- // <ACE_Event_Handler::DONT_CALL> then the <handle_close> method of
- // the <event_handler> is not invoked. Note that the <handle> can
- // either be the <event_handle> or the <io_handle>
- //
- // For the case of I/O entries, this removes the <mask> binding of
- // <Event_Handler> whose handle is <handle> from <WFMO_Reactor>. If
- // there are no more bindings for this <event_handler> then it is
- // removed from the WFMO_Reactor. For simple event entries, mask is
- // mostly ignored and the <Event_Handler> is always removed from
- // <WFMO_Reactor>
-
- virtual int remove_handler (const ACE_Handle_Set &handle_set,
- ACE_Reactor_Mask);
- // Removes all the <mask> bindings for handles in the <handle_set>
- // bind of <Event_Handler>. If there are no more bindings for any
- // of these handles then they are removed from WFMO_Reactor.
-
- virtual int remove_handler (int signum,
- ACE_Sig_Action *new_disp,
- ACE_Sig_Action *old_disp = 0,
- int sigkey = -1);
- // Remove the ACE_Event_Handler currently associated with <signum>.
- // <sigkey> is ignored in this implementation since there is only
- // one instance of a signal handler. Install the new disposition
- // (if given) and return the previous disposition (if desired by the
- // caller). Returns 0 on success and -1 if <signum> is invalid.
-
- virtual int remove_handler (const ACE_Sig_Set &sigset);
- // Calls <remove_handler> for every signal in <sigset>.
-
- // = Suspend and resume Handlers.
-
- virtual int suspend_handler (ACE_Event_Handler *event_handler);
- // Suspend <event_handler> temporarily. Use
- // <ACE_Event_Handler::get_handle> to get the handle.
-
- virtual int suspend_handler (ACE_HANDLE handle);
- // Suspend <handle> temporarily.
-
- virtual int suspend_handler (const ACE_Handle_Set &handles);
- // Suspend all <handles> in handle set temporarily.
-
- virtual int suspend_handlers (void);
- // Suspend all <handles> temporarily.
-
- virtual int resume_handler (ACE_Event_Handler *event_handler);
- // Resume <event_handler>. Use <ACE_Event_Handler::get_handle> to
- // get the handle.
-
- virtual int resume_handler (ACE_HANDLE handle);
- // Resume <handle>.
-
- virtual int resume_handler (const ACE_Handle_Set &handles);
- // Resume all <handles> in handle set.
-
- virtual int resume_handlers (void);
- // Resume all <handles>.
-
- virtual int uses_event_associations (void);
- // Return 1 if we any event associations were made by the reactor
- // for the handles that it waits on, 0 otherwise. Since the
- // WFMO_Reactor does use event associations, this function always
- // return 1.
-
- // Timer management.
-
- virtual long schedule_timer (ACE_Event_Handler *event_handler,
- const void *arg,
- const ACE_Time_Value &delta,
- const ACE_Time_Value &interval = ACE_Time_Value::zero);
- // Schedule an <event_handler> that will expire after <delay> amount
- // of time, which is specified using relative time to the current
- // <gettimeofday>. If it expires then <arg> is passed in as the
- // value to the <event_handler>'s <handle_timeout> callback method.
- // If <interval> is != to <ACE_Time_Value::zero> then it is used to
- // reschedule the <event_handler> automatically, which is also
- // specified using relative time. This method returns a <timer_id>
- // that uniquely identifies the <event_handler> in an internal list.
- // This <timer_id> can be used to cancel an <event_handler> before
- // it expires. The cancellation ensures that <timer_ids> are unique
- // up to values of greater than 2 billion timers. As long as timers
- // don't stay around longer than this there should be no problems
- // with accidentally deleting the wrong timer. Returns -1 on
- // failure (which is guaranteed never to be a valid <timer_id>.
-
- virtual int reset_timer_interval (long timer_id,
- const ACE_Time_Value &interval);
- // Resets the interval of the timer represented by <timer_id> to
- // <interval>, which is specified in relative time to the current
- // <gettimeofday>. If <interval> is equal to
- // <ACE_Time_Value::zero>, the timer will become a non-rescheduling
- // timer. Returns 0 if successful, -1 if not.
-
- virtual int cancel_timer (ACE_Event_Handler *event_handler,
- int dont_call_handle_close = 1);
- // Cancel all Event_Handlers that match the address of
- // <event_handler>. Returns number of handler's cancelled.
-
- virtual int cancel_timer (long timer_id,
- const void **arg = 0,
- int dont_call_handle_close = 1);
- // Cancel the single Event_Handler that matches the <timer_id> value
- // (which was returned from the schedule method). If arg is
- // non-NULL then it will be set to point to the ``magic cookie''
- // argument passed in when the Event_Handler was registered. This
- // makes it possible to free up the memory and avoid memory leaks.
- // Returns 1 if cancellation succeeded and 0 if the <timer_id>
- // wasn't found.
-
- // = High-level Event_Handler scheduling operations
-
- virtual int schedule_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_added);
- // Add <masks_to_be_added> to the <event_handler>'s entry in
- // WFMO_Reactor. <event_handler> must already have been registered
- // with WFMO_Reactor.
-
- virtual int schedule_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask masks_to_be_added);
- // Add <masks_to_be_added> to the <handle>'s entry in WFMO_Reactor.
- // The Event_Handler associated with <handle> must already have been
- // registered with WFMO_Reactor.
-
- virtual int cancel_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_deleted);
- // Remove <masks_to_be_deleted> to the <handle>'s entry in
- // WFMO_Reactor. The Event_Handler associated with <handle> must
- // already have been registered with WFMO_Reactor.
-
- virtual int cancel_wakeup (ACE_HANDLE handle,
- ACE_Reactor_Mask masks_to_be_deleted);
- // Remove <masks_to_be_deleted> to the <handle>'s entry in
- // WFMO_Reactor. The Event_Handler associated with <handle> must
- // already have been registered with WFMO_Reactor.
-
- // = Notification methods.
-
- virtual int notify (ACE_Event_Handler * = 0,
- ACE_Reactor_Mask = ACE_Event_Handler::EXCEPT_MASK,
- ACE_Time_Value * = 0);
- // Wakeup one <ACE_WFMO_Reactor> thread if it is currently blocked
- // in <WaitForMultipleObjects>. The <ACE_Time_Value> indicates how
- // long to blocking trying to notify the <WFMO_Reactor>. If
- // <timeout> == 0, the caller will block until action is possible,
- // else will wait until the relative time specified in <timeout>
- // elapses).
-
- virtual void max_notify_iterations (int);
- // Set the maximum number of times that the
- // <ACE_WFMO_Reactor_Notify::handle_input> method will iterate and
- // dispatch the <ACE_Event_Handlers> that are passed in via the
- // notify queue before breaking out of its
- // <ACE_Message_Queue::dequeue> loop. By default, this is set to
- // -1, which means "iterate until the queue is empty." Setting this
- // to a value like "1 or 2" will increase "fairness" (and thus
- // prevent starvation) at the expense of slightly higher dispatching
- // overhead.
-
- virtual int max_notify_iterations (void);
- // Get the maximum number of times that the
- // <ACE_WFMO_Reactor_Notify::handle_input> method will iterate and
- // dispatch the <ACE_Event_Handlers> that are passed in via the
- // notify queue before breaking out of its
- // <ACE_Message_Queue::dequeue> loop.
-
- // = Assorted helper methods.
-
- virtual int handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Event_Handler **event_handler = 0);
- // Check to see if <handle> is associated with a valid Event_Handler
- // bound to <mask>. Return the <event_handler> associated with this
- // <handler> if <event_handler> != 0.
-
- virtual int handler (int signum,
- ACE_Event_Handler ** = 0);
- // Check to see if <signum> is associated with a valid Event_Handler
- // bound to a signal. Return the <event_handler> associated with
- // this <handler> if <event_handler> != 0.
-
- virtual int initialized (void);
- // Returns true if WFMO_Reactor has been successfully initialized, else
- // false.
-
- virtual size_t size (void);
- // Returns the current size of the WFMO_Reactor's internal
- // descriptor table.
-
- virtual ACE_Lock &lock (void);
- // Returns a reference to the WFMO_Reactor's internal lock.
-
- virtual void wakeup_all_threads (void);
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
-
- virtual int owner (ACE_thread_t new_owner, ACE_thread_t *old_owner = 0);
- // Transfers ownership of the WFMO_Reactor to the <new_owner>. The
- // transfer will not complete until all threads are ready (just like
- // the handle set).
-
- virtual int owner (ACE_thread_t *owner);
- // Return the ID of the "owner" thread.
-
- virtual int restart (void);
- // Get the existing restart value.
-
- virtual int restart (int r);
- // Set a new value for restart and return the original value.
-
- virtual void requeue_position (int);
- // Not implemented
-
- virtual int requeue_position (void);
- // Not implemented
-
- // = Low-level wait_set mask manipulation methods.
-
- virtual int mask_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks,
- int operation);
- // Modify <masks> of the <event_handler>'s entry in WFMO_Reactor
- // depending upon <operation>. <event_handler> must already have
- // been registered with WFMO_Reactor.
-
- virtual int mask_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask masks,
- int ops);
- // Modify <masks> of the <handle>'s entry in WFMO_Reactor depending
- // upon <operation>. <handle> must already have been registered
- // with WFMO_Reactor.
-
- // = Low-level ready_set mask manipulation methods.
-
- virtual int ready_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int ops);
- // Not implemented
-
- virtual int ready_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask,
- int ops);
- // Not implemented
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-
- virtual void dump (void) const;
- // Dump the state of an object.
-
-protected:
- virtual int register_handler_i (ACE_HANDLE event_handle,
- ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask);
- // Registration workhorse
-
- virtual int event_handling (ACE_Time_Value *max_wait_time = 0,
- int alertable = 0);
- // Event handling workhorse
-
- virtual int mask_ops_i (ACE_HANDLE io_handle,
- ACE_Reactor_Mask masks,
- int operation);
- // Bit masking workhorse
-
- virtual ACE_thread_t owner_i (void);
- // Return the ID of the "owner" thread. Does not do any locking.
-
- virtual int ok_to_wait (ACE_Time_Value *max_wait_time,
- int alertable);
- // Check to see if it is ok to enter <::WaitForMultipleObjects>.
-
- virtual int wait_for_multiple_events (int timeout,
- int alertable);
- // Wait for timer and I/O events to occur.
-
- virtual DWORD poll_remaining_handles (size_t slot);
- // Check for activity on remaining handles.
-
- virtual int expire_timers (void);
- // Expire timers. Only the owner thread does useful stuff in this
- // function.
-
- virtual int dispatch (int wait_status);
- // Dispatches the timers and I/O handlers.
-
- virtual int safe_dispatch (int wait_status);
- // Protect against structured exceptions caused by user code when
- // dispatching handles
-
- virtual int dispatch_handles (size_t slot);
- // Dispatches any active handles from handles_[<slot>] to
- // handles_[active_handles_] using <WaitForMultipleObjects> to poll
- // through our handle set looking for active handles.
-
- virtual int dispatch_handler (size_t slot,
- size_t max_handlep1);
- // Dispatches a single handler. Returns 0 on success, -1 if the
- // handler was removed.
-
- virtual int simple_dispatch_handler (int slot,
- ACE_HANDLE event_handle);
- // Dispatches a single handler. Returns 0 on success, -1 if the
- // handler was removed.
-
- virtual int complex_dispatch_handler (int slot,
- ACE_HANDLE event_handle);
- // Dispatches a single handler. Returns 0 on success, -1 if the
- // handler was removed.
-
- virtual int dispatch_window_messages (void);
- // Dispatches window messages. Noop for WFMO_Reactor.
-
- virtual ACE_Reactor_Mask upcall (ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- WSANETWORKEVENTS &events);
-
- virtual int calculate_timeout (ACE_Time_Value *time);
- // Used to caluculate the next timeout
-
- virtual int update_state (void);
- // Update the state of the handler repository
-
- virtual int new_owner (void);
- // Check to see if we have a new owner
-
- virtual int change_owner (void);
- // Set owner to new owner
-
- ACE_Sig_Handler *signal_handler_;
- // Handle signals without requiring global/static variables.
-
- int delete_signal_handler_;
- // Keeps track of whether we should delete the signal handler (if we
- // didn't create it, then we don't delete it).
-
- ACE_Timer_Queue *timer_queue_;
- // Defined as a pointer to allow overriding by derived classes...
-
- int delete_timer_queue_;
- // Keeps track of whether we should delete the timer queue (if we
- // didn't create it, then we don't delete it).
-
- int delete_handler_rep_;
- // Keeps track of whether we should delete the handler repository
-
- ACE_Reactor_Notify *notify_handler_;
- // Used when <notify> is called.
-
- int delete_notify_handler_;
- // Keeps track of whether we should delete the notify handler.
-
- ACE_Process_Mutex lock_;
- // Synchronization for the ACE_WFMO_Reactor.
- //
- // A Process Mutex is used here because of two reasons:
- // (a) The implementation of ACE_Thread_Mutex uses CriticalSections
- // CriticalSections are not waitable using ::WaitForMultipleObjects
- // (b) This is really not a process mutex because it is not
- // named. No other process can use this mutex.
-
- ACE_Lock_Adapter<ACE_Process_Mutex> lock_adapter_;
- // Adapter used to return internal lock to outside world.
-
- ACE_WFMO_Reactor_Handler_Repository handler_rep_;
- // Table that maps <ACE_HANDLEs> to <ACE_Event_Handler *>'s.
-
- ACE_Manual_Event ok_to_wait_;
- // A manual event used to block threads from proceeding into
- // WaitForMultipleObjects
-
- ACE_Manual_Event wakeup_all_threads_;
- // A manual event is used so that we can wake everyone up (e.g.,
- // when <ACE_Event_Handlers> are bounded and unbound from the
- // handler repository).
-
- ACE_Wakeup_All_Threads_Handler wakeup_all_threads_handler_;
- // Used when <wakeup_all_threads_> is signaled
-
- ACE_Auto_Event waiting_to_change_state_;
- // The changing thread waits on this event, till all threads are not
- // active anymore
-
- size_t active_threads_;
- // Count of currently active threads
-
- ACE_thread_t owner_;
- // The thread which is "owner" of the WFMO_Reactor. The owner
- // concept is used because we don't want multiple threads to try to
- // expire timers. Therefore the "owner" thread is the only one
- // allowed to expire timers. Also, the owner thread is the only
- // thread which waits on the notify handle. Note that the ownership
- // can be transferred.
-
- ACE_thread_t new_owner_;
- // The owner to be of the WFMO_Reactor
-
- ACE_thread_t change_state_thread_;
- // This is the thread which is responsible for the changing the
- // state of the <WFMO_Reactor> handle set
-
- ACE_HANDLE atomic_wait_array_ [2];
- // This is an array of ACE_HANDLEs which keep track of the <lock_>
- // and <ok_to_wait_> handles
-
- int open_for_business_;
- // This flag is used to keep track of whether we are already closed.
-
- sig_atomic_t deactivated_;
- // This flag is used to keep track of whether we are actively handling
- // events or not.
-
-private:
- ACE_WFMO_Reactor (const ACE_WFMO_Reactor &);
- ACE_WFMO_Reactor &operator = (const ACE_WFMO_Reactor &);
- // Deny access since member-wise won't work...
-};
-
-// If we don't have WinSOCK2, we need these defined
-#if !defined (ACE_HAS_WINSOCK2) || (ACE_HAS_WINSOCK2 == 0)
-/*
- * WinSock 2 extension -- bit values and indices for FD_XXX network events
- */
-#define FD_READ_BIT 0
-#define FD_WRITE_BIT 1
-#define FD_OOB_BIT 2
-#define FD_ACCEPT_BIT 3
-#define FD_CONNECT_BIT 4
-#define FD_CLOSE_BIT 5
-#define FD_QOS_BIT 6
-#define FD_GROUP_QOS_BIT 7
-
-#define FD_QOS (1 << FD_QOS_BIT)
-#define FD_GROUP_QOS (1 << FD_GROUP_QOS_BIT)
-
-#define FD_MAX_EVENTS 8
-#define FD_ALL_EVENTS ((1 << FD_MAX_EVENTS) - 1)
-
-#define WSAEVENT HANDLE
-
-typedef struct _WSANETWORKEVENTS
-{
- long lNetworkEvents;
- int iErrorCode[FD_MAX_EVENTS];
-} WSANETWORKEVENTS, FAR * LPWSANETWORKEVENTS;
-
-int WSAEventSelect (SOCKET s,
- WSAEVENT hEventObject,
- long lNetworkEvents);
-
-int WSAEnumNetworkEvents (SOCKET s,
- WSAEVENT hEventObject,
- LPWSANETWORKEVENTS lpNetworkEvents);
-
-#endif /* !defined ACE_HAS_WINSOCK2 */
-
-#endif /* ACE_WIN32 */
-
-#if defined (__ACE_INLINE__)
-#include "ace/WFMO_Reactor.i"
-#endif /* __ACE_INLINE__ */
-#include "ace/post.h"
-#endif /* ACE_WFMO_REACTOR_H */
diff --git a/ace/WFMO_Reactor.i b/ace/WFMO_Reactor.i
deleted file mode 100644
index 2aa56f2c08d..00000000000
--- a/ace/WFMO_Reactor.i
+++ /dev/null
@@ -1,1126 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/Handle_Set.h"
-
-/************************************************************/
-
-ACE_INLINE int
-ACE_Wakeup_All_Threads_Handler::handle_signal (int signum,
- siginfo_t *siginfo,
- ucontext_t *)
-{
- ACE_UNUSED_ARG (signum);
- ACE_UNUSED_ARG (siginfo);
-
- // This will get called when <WFMO_Reactor->wakeup_all_threads_> event
- // is signaled. There is nothing to be done here.
- // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) waking up to get updated handle set info\n")));
- return 0;
-}
-
-#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
-
-/************************************************************/
-
-ACE_INLINE
-ACE_WFMO_Reactor_Handler_Repository::Common_Info::Common_Info (void)
- : io_entry_ (0),
- event_handler_ (0),
- io_handle_ (ACE_INVALID_HANDLE),
- network_events_ (0),
- delete_event_ (0),
- delete_entry_ (0),
- close_masks_ (ACE_Event_Handler::NULL_MASK)
-{
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Common_Info::reset (void)
-{
- this->event_handler_ = 0;
- this->io_entry_ = 0;
- this->io_handle_ = ACE_INVALID_HANDLE;
- this->network_events_ = 0;
- this->delete_event_ = 0;
- this->delete_entry_ = 0;
- this->close_masks_ = ACE_Event_Handler::NULL_MASK;
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Common_Info::set (int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event,
- int delete_entry,
- ACE_Reactor_Mask close_masks)
-{
- this->event_handler_ = event_handler;
- this->io_entry_ = io_entry;
- this->io_handle_ = io_handle;
- this->network_events_ = network_events;
- this->delete_event_ = delete_event;
- this->delete_entry_ = delete_entry;
- this->close_masks_ = close_masks;
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Common_Info::set (Common_Info &common_info)
-{
- *this = common_info;
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Common_Info::dump (void) const
-{
- ACE_TRACE ("ACE_WFMO_Reactor_Handler_Repository::Common_Info::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("I/O Entry = %d\n"),
- this->io_entry_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Event Handler = %d\n"),
- this->event_handler_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("I/O Handle = %d\n"),
- this->io_handle_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Network Events = %d\n"),
- this->network_events_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Delete Event = %d\n"),
- this->delete_event_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Delete Entry = %d\n"),
- this->delete_entry_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Close Masks = %d\n"),
- this->close_masks_));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-/************************************************************/
-
-ACE_INLINE
-ACE_WFMO_Reactor_Handler_Repository::Current_Info::Current_Info (void)
- : suspend_entry_ (0)
-{
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Current_Info::set (int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event,
- int delete_entry,
- ACE_Reactor_Mask close_masks,
- int suspend_entry)
-{
- this->suspend_entry_ = suspend_entry;
- Common_Info::set (io_entry,
- event_handler,
- io_handle,
- network_events,
- delete_event,
- delete_entry,
- close_masks);
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Current_Info::set (Common_Info &common_info,
- int suspend_entry)
-{
- this->suspend_entry_ = suspend_entry;
- Common_Info::set (common_info);
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Current_Info::reset (void)
-{
- this->suspend_entry_ = 0;
- Common_Info::reset ();
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Current_Info::dump (ACE_HANDLE event_handle) const
-{
- ACE_TRACE ("ACE_WFMO_Reactor_Handler_Repository::Current_Info::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- Common_Info::dump ();
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Event Handle = %d\n"),
- event_handle));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Suspend Entry = %d\n"),
- this->suspend_entry_));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-/************************************************************/
-
-ACE_INLINE
-ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::To_Be_Added_Info (void)
- : event_handle_ (ACE_INVALID_HANDLE),
- suspend_entry_ (0)
-{
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::set (ACE_HANDLE event_handle,
- int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event,
- int delete_entry,
- ACE_Reactor_Mask close_masks,
- int suspend_entry)
-{
- this->event_handle_ = event_handle;
- this->suspend_entry_ = suspend_entry;
- Common_Info::set (io_entry,
- event_handler,
- io_handle,
- network_events,
- delete_event,
- delete_entry,
- close_masks);
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::set (ACE_HANDLE event_handle,
- Common_Info &common_info,
- int suspend_entry)
-{
- this->event_handle_ = event_handle;
- this->suspend_entry_ = suspend_entry;
- Common_Info::set (common_info);
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::reset (void)
-{
- this->event_handle_ = ACE_INVALID_HANDLE;
- this->suspend_entry_ = 0;
- Common_Info::reset ();
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::dump (void) const
-{
- ACE_TRACE ("ACE_WFMO_Reactor_Handler_Repository::To_Be_Added_Info::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- Common_Info::dump ();
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Event Handle = %d\n"),
- this->event_handle_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Suspend Entry = %d\n"),
- this->suspend_entry_));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-/************************************************************/
-
-ACE_INLINE
-ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::Suspended_Info (void)
- : event_handle_ (ACE_INVALID_HANDLE),
- resume_entry_ (0)
-{
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::reset (void)
-{
- this->event_handle_ = ACE_INVALID_HANDLE;
- this->resume_entry_ = 0;
- Common_Info::reset ();
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::set (ACE_HANDLE event_handle,
- int io_entry,
- ACE_Event_Handler *event_handler,
- ACE_HANDLE io_handle,
- long network_events,
- int delete_event,
- int delete_entry,
- ACE_Reactor_Mask close_masks,
- int resume_entry)
-{
- this->event_handle_ = event_handle;
- this->resume_entry_ = resume_entry;
- Common_Info::set (io_entry,
- event_handler,
- io_handle,
- network_events,
- delete_event,
- delete_entry,
- close_masks);
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::set (ACE_HANDLE event_handle,
- Common_Info &common_info,
- int resume_entry)
-{
- this->event_handle_ = event_handle;
- this->resume_entry_ = resume_entry;
- Common_Info::set (common_info);
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::dump (void) const
-{
- ACE_TRACE ("ACE_WFMO_Reactor_Handler_Repository::Suspended_Info::dump");
-
- ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
-
- Common_Info::dump ();
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Event Handle = %d\n"),
- this->event_handle_));
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Resume Entry = %d\n"),
- this->resume_entry_));
-
- ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-}
-
-/************************************************************/
-
-ACE_INLINE int
-ACE_WFMO_Reactor_Handler_Repository::close (void)
-{
- // Let all the handlers know that the <WFMO_Reactor> is closing down
- this->unbind_all ();
-
- return 0;
-}
-
-ACE_INLINE ACE_HANDLE *
-ACE_WFMO_Reactor_Handler_Repository::handles (void) const
-{
- // This code is probably too subtle to be useful in the long run...
- // The basic idea is that all threads wait on all user handles plus
- // the <wakeup_all_threads_> handle. The owner thread additional
- // waits on the <notify_> handle. This is to ensure that only the
- // <owner_> thread get to expire timers and handle event on the
- // notify pipe.
- if (ACE_Thread::self () == this->wfmo_reactor_.owner_i ())
- return this->current_handles_;
- else
- return this->current_handles_ + 1;
-}
-
-ACE_INLINE ACE_WFMO_Reactor_Handler_Repository::Current_Info *
-ACE_WFMO_Reactor_Handler_Repository::current_info (void) const
-{
- if (ACE_Thread::self () == this->wfmo_reactor_.owner_i ())
- return this->current_info_;
- else
- return this->current_info_ + 1;
-}
-
-ACE_INLINE size_t
-ACE_WFMO_Reactor_Handler_Repository::max_handlep1 (void) const
-{
- if (ACE_Thread::self () == this->wfmo_reactor_.owner_i ())
- return this->max_handlep1_;
- else
- return this->max_handlep1_ - 1;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor_Handler_Repository::scheduled_for_deletion (size_t slot) const
-{
- if (ACE_Thread::self () == this->wfmo_reactor_.owner_i ())
- return this->current_info_[slot].delete_entry_ == 1;
- else
- return this->current_info_[slot + 1].delete_entry_ == 1;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor_Handler_Repository::invalid_handle (ACE_HANDLE handle) const
-{
- ACE_TRACE ("ACE_WFMO_Reactor_Handler_Repository::invalid_handle");
- // It's too expensive to perform more exhaustive validity checks on
- // Win32 due to the way that they implement SOCKET HANDLEs.
- if (handle == ACE_INVALID_HANDLE)
- {
- errno = EINVAL;
- return 1;
- }
- else
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor_Handler_Repository::changes_required (void)
-{
- // Check if handles have be scheduled for additions or removal
- return this->handles_to_be_added_ > 0
- || this->handles_to_be_deleted_ > 0
- || this->handles_to_be_suspended_ > 0
- || this->handles_to_be_resumed_ > 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor_Handler_Repository::make_changes (void)
-{
- // This method must ONLY be called by the
- // <WFMO_Reactor->change_state_thread_>. We therefore assume that
- // there will be no contention for this method and hence no guards
- // are neccessary.
-
- // Deletions and suspensions in current_info_
- this->make_changes_in_current_infos ();
-
- // Deletions and resumptions in current_suspended_info_
- this->make_changes_in_suspension_infos ();
-
- // Deletions in to_be_added_info_, or transfers to current_info_ or
- // current_suspended_info_ from to_be_added_info_
- this->make_changes_in_to_be_added_infos ();
-
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor_Handler_Repository::unbind (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- if (this->invalid_handle (handle))
- return -1;
-
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->wfmo_reactor_.lock_, -1);
-
- int changes_required = 0;
- int result = this->unbind_i (handle,
- mask,
- changes_required);
-
- if (changes_required)
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
- this->wfmo_reactor_.wakeup_all_threads ();
-
- return result;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::reset_timer_interval
- (long timer_id,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_WFMO_Reactor::reset_timer_interval");
-
- long result = this->timer_queue_->reset_interval
- (timer_id,
- interval);
-
- // Wakeup the owner thread so that it gets the latest timer values
- this->notify ();
-
- return result;
-}
-
-ACE_INLINE long
-ACE_WFMO_Reactor::schedule_timer (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_WFMO_Reactor::schedule_timer");
-
- long result = this->timer_queue_->schedule
- (handler,
- arg,
- timer_queue_->gettimeofday () + delta_time,
- interval);
-
- // Wakeup the owner thread so that it gets the latest timer values
- this->notify ();
-
- return result;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_WFMO_Reactor::cancel_timer");
- return this->timer_queue_->cancel (handler, dont_call_handle_close);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::cancel_timer (long timer_id,
- const void **arg,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_WFMO_Reactor::cancel_timer");
- return this->timer_queue_->cancel (timer_id, arg, dont_call_handle_close);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::register_handler (ACE_Event_Handler *event_handler,
- ACE_HANDLE event_handle)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- return this->handler_rep_.bind_i (0,
- event_handler,
- 0,
- ACE_INVALID_HANDLE,
- event_handle,
- 0);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::register_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- return this->register_handler_i (ACE_INVALID_HANDLE,
- ACE_INVALID_HANDLE,
- event_handler,
- mask);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::register_handler (ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- return this->register_handler_i (ACE_INVALID_HANDLE,
- io_handle,
- event_handler,
- mask);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::register_handler (ACE_HANDLE event_handle,
- ACE_HANDLE io_handle,
- ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- return this->register_handler_i (event_handle,
- io_handle,
- event_handler,
- mask);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::register_handler (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- ACE_Handle_Set_Iterator handle_iter (handles);
- ACE_HANDLE h;
-
- while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
- if (this->register_handler_i (h,
- ACE_INVALID_HANDLE,
- handler,
- mask) == -1)
- return -1;
-
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::schedule_wakeup (ACE_HANDLE io_handle,
- ACE_Reactor_Mask masks_to_be_added)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- return this->mask_ops_i (io_handle,
- masks_to_be_added,
- ACE_Reactor::ADD_MASK);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::schedule_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_added)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- return this->mask_ops_i (event_handler->get_handle (),
- masks_to_be_added,
- ACE_Reactor::ADD_MASK);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::cancel_wakeup (ACE_HANDLE io_handle,
- ACE_Reactor_Mask masks_to_be_removed)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- return this->mask_ops_i (io_handle,
- masks_to_be_removed,
- ACE_Reactor::CLR_MASK);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::cancel_wakeup (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask masks_to_be_removed)
-{
- // This GUARD is necessary since we are updating shared state.
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- return this->mask_ops_i (event_handler->get_handle (),
- masks_to_be_removed,
- ACE_Reactor::CLR_MASK);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::remove_handler (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask)
-{
- return this->handler_rep_.unbind (event_handler->get_handle (),
- mask);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::remove_handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- return this->handler_rep_.unbind (handle,
- mask);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::remove_handler (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask mask)
-{
- ACE_Handle_Set_Iterator handle_iter (handles);
- ACE_HANDLE h;
- int changes_required = 0;
-
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
- if (this->handler_rep_.unbind_i (h,
- mask,
- changes_required) == -1)
- return -1;
-
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
- this->wakeup_all_threads ();
-
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::suspend_handler (ACE_HANDLE handle)
-{
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- int changes_required = 0;
- int result =
- this->handler_rep_.suspend_handler_i (handle,
- changes_required);
-
- if (changes_required)
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
- this->wakeup_all_threads ();
-
- return result;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::suspend_handler (ACE_Event_Handler *event_handler)
-{
- return this->suspend_handler (event_handler->get_handle ());
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::suspend_handler (const ACE_Handle_Set &handles)
-{
- ACE_Handle_Set_Iterator handle_iter (handles);
- ACE_HANDLE h;
- int changes_required = 0;
-
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
- if (this->handler_rep_.suspend_handler_i (h,
- changes_required) == -1)
- return -1;
-
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
- this->wakeup_all_threads ();
-
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::suspend_handlers (void)
-{
- int error = 0;
- int result = 0;
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- // First suspend all current handles
- int changes_required = 0;
-
- for (size_t i = 0;
- i < this->handler_rep_.max_handlep1_ && error == 0;
- i++)
- {
- result =
- this->handler_rep_.suspend_handler_i (this->handler_rep_.current_handles_[i],
- changes_required);
- if (result == -1)
- error = 1;
- }
-
- if (!error)
- // Then suspend all to_be_added_handles
- for (size_t i = 0;
- i < this->handler_rep_.handles_to_be_added_;
- i++)
- this->handler_rep_.to_be_added_info_[i].suspend_entry_ = 1;
-
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
- this->wakeup_all_threads ();
-
- return error ? -1 : 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::resume_handler (ACE_HANDLE handle)
-{
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- int changes_required = 0;
- int result =
- this->handler_rep_.resume_handler_i (handle,
- changes_required);
-
- if (changes_required)
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
- this->wakeup_all_threads ();
-
- return result;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::resume_handler (ACE_Event_Handler *event_handler)
-{
- return this->resume_handler (event_handler->get_handle ());
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::resume_handler (const ACE_Handle_Set &handles)
-{
- ACE_Handle_Set_Iterator handle_iter (handles);
- ACE_HANDLE h;
- int changes_required = 0;
-
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- while ((h = handle_iter ()) != ACE_INVALID_HANDLE)
- if (this->handler_rep_.resume_handler_i (h,
- changes_required) == -1)
- return -1;
-
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
- this->wakeup_all_threads ();
-
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::resume_handlers (void)
-{
- int error = 0;
- int result = 0;
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
-
- int changes_required = 0;
- for (size_t i = 0;
- i < this->handler_rep_.suspended_handles_ && error == 0;
- i++)
- {
- result =
- this->handler_rep_.resume_handler_i (this->handler_rep_.current_suspended_info_[i].event_handle_,
- changes_required);
- if (result == -1)
- error = 1;
- }
-
- if (!error)
- // Then resume all to_be_added_handles
- for (size_t i = 0;
- i < this->handler_rep_.handles_to_be_added_;
- i++)
- this->handler_rep_.to_be_added_info_[i].suspend_entry_ = 0;
-
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the handle set
- this->wakeup_all_threads ();
-
- return error ? -1 : 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::uses_event_associations (void)
-{
- // Since the WFMO_Reactor does use event associations, this function
- // always return 1.
- return 1;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::handle_events (ACE_Time_Value &how_long)
-{
- return this->event_handling (&how_long, FALSE);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::alertable_handle_events (ACE_Time_Value &how_long)
-{
- return this->event_handling (&how_long, TRUE);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::handle_events (ACE_Time_Value *how_long)
-{
- return this->event_handling (how_long, FALSE);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::alertable_handle_events (ACE_Time_Value *how_long)
-{
- return this->event_handling (how_long, TRUE);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::deactivated (void)
-{
- return this->deactivated_;
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor::deactivate (int do_stop)
-{
- this->deactivated_ = do_stop;
- this->wakeup_all_threads ();
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::owner (ACE_thread_t *t)
-{
- ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1);
- *t = this->owner_i ();
- return 0;
-}
-
-ACE_INLINE ACE_thread_t
-ACE_WFMO_Reactor::owner_i (void)
-{
- return this->owner_;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::owner (ACE_thread_t new_owner, ACE_thread_t *old_owner)
-{
- ACE_GUARD_RETURN (ACE_Process_Mutex, monitor, this->lock_, -1);
- this->new_owner_ = new_owner;
-
- if (old_owner != 0)
- *old_owner = this->owner_i ();
-
- // Wake up all threads in WaitForMultipleObjects so that they can
- // reconsult the new owner responsibilities
- this->wakeup_all_threads ();
-
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::new_owner (void)
-{
- return this->new_owner_ != ACE_thread_t (0);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::change_owner (void)
-{
- this->owner_ = this->new_owner_;
- this->new_owner_ = ACE_thread_t (0);
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::safe_dispatch (int wait_status)
-{
- int result = -1;
- ACE_SEH_TRY
- {
- result = this->dispatch (wait_status);
- }
- ACE_SEH_FINALLY
- {
- this->update_state ();
- }
-
- return result;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::dispatch_window_messages (void)
-{
- return 0;
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor::wakeup_all_threads (void)
-{
- this->wakeup_all_threads_.signal ();
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::notify (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- ACE_Time_Value *timeout)
-{
- return this->notify_handler_->notify (event_handler, mask, timeout);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::register_handler (int signum,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp,
- ACE_Event_Handler **old_sh,
- ACE_Sig_Action *old_disp)
-{
- return this->signal_handler_->register_handler (signum,
- new_sh, new_disp,
- old_sh, old_disp);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::register_handler (const ACE_Sig_Set &sigset,
- ACE_Event_Handler *new_sh,
- ACE_Sig_Action *new_disp)
-{
- int result = 0;
-
-#if (ACE_NSIG > 0)
- for (int s = 1; s < ACE_NSIG; s++)
- if (sigset.is_member (s)
- && this->signal_handler_->register_handler (s,
- new_sh,
- new_disp) == -1)
- result = -1;
-#else
- ACE_UNUSED_ARG (sigset);
- ACE_UNUSED_ARG (new_sh);
- ACE_UNUSED_ARG (new_disp);
-#endif /* ACE_NSIG */
-
- return result;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::remove_handler (int signum,
- ACE_Sig_Action *new_disp,
- ACE_Sig_Action *old_disp,
- int sigkey)
-{
- return this->signal_handler_->remove_handler (signum,
- new_disp,
- old_disp,
- sigkey);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::remove_handler (const ACE_Sig_Set &sigset)
-{
- int result = 0;
-
-#if (ACE_NSIG > 0)
- for (int s = 1; s < ACE_NSIG; s++)
- if (sigset.is_member (s)
- && this->signal_handler_->remove_handler (s) == -1)
- result = -1;
-#else
- ACE_UNUSED_ARG (sigset);
-#endif /* ACE_NSIG */
-
- return result;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::handler (int signum, ACE_Event_Handler **eh)
-{
- ACE_Event_Handler *handler =
- this->signal_handler_->handler (signum);
-
- if (handler == 0)
- return -1;
- else if (eh != 0 && *eh != 0)
- *eh = handler;
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::mask_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int operation)
-{
- ACE_GUARD_RETURN (ACE_Process_Mutex, monitor, this->lock_, -1);
-
- return this->mask_ops_i (event_handler->get_handle (),
- mask,
- operation);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::mask_ops (ACE_HANDLE io_handle,
- ACE_Reactor_Mask mask,
- int operation)
-{
- ACE_GUARD_RETURN (ACE_Process_Mutex, monitor, this->lock_, -1);
-
- return this->mask_ops_i (io_handle,
- mask,
- operation);
-}
-
-ACE_INLINE void
-ACE_WFMO_Reactor::requeue_position (int)
-{
- // Not implemented
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::requeue_position (void)
-{
- // Don't have an implementation for this yet...
- ACE_NOTSUP_RETURN (-1);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::restart (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::restart (int)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::ready_ops (ACE_Event_Handler *event_handler,
- ACE_Reactor_Mask mask,
- int ops)
-{
- // Don't have an implementation for this yet...
- ACE_NOTSUP_RETURN (-1);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::ready_ops (ACE_HANDLE handle,
- ACE_Reactor_Mask,
- int ops)
-{
- // Don't have an implementation for this yet...
- ACE_NOTSUP_RETURN (-1);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::handler (ACE_HANDLE handle,
- ACE_Reactor_Mask mask,
- ACE_Event_Handler **event_handler)
-{
- return this->handler_rep_.handler (handle,
- mask,
- event_handler);
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor::initialized (void)
-{
- return this->open_for_business_;
-}
-
-ACE_INLINE ACE_Lock &
-ACE_WFMO_Reactor::lock (void)
-{
- return this->lock_adapter_;
-}
-
-ACE_INLINE size_t
-ACE_WFMO_Reactor::size (void)
-{
- // Size of repository minus the 2 used for internal purposes
- return this->handler_rep_.max_size_ - 2;
-}
-#else
-ACE_INLINE int
-ACE_WFMO_Reactor_Handler_Repository::changes_required (void)
-{
- return 0;
-}
-
-ACE_INLINE int
-ACE_WFMO_Reactor_Handler_Repository::make_changes (void)
-{
- return 0;
-}
-
-ACE_INLINE
-ACE_WFMO_Reactor_Handler_Repository::~ACE_WFMO_Reactor_Handler_Repository (void)
-{
-}
-
-#endif /* ACE_WIN32 */
diff --git a/ace/WIN32_Asynch_IO.cpp b/ace/WIN32_Asynch_IO.cpp
deleted file mode 100644
index be177137a20..00000000000
--- a/ace/WIN32_Asynch_IO.cpp
+++ /dev/null
@@ -1,1695 +0,0 @@
-// $Id$
-
-#include "ace/WIN32_Asynch_IO.h"
-
-// ACE_RCSID(ace, Asynch_IO, "$Id$")
-
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
-
-#include "ace/WIN32_Proactor.h"
-#include "ace/Message_Block.h"
-#include "ace/Service_Config.h"
-#include "ace/INET_Addr.h"
-#include "ace/Task_T.h"
-
-u_long
-ACE_WIN32_Asynch_Result::bytes_transferred (void) const
-{
- return this->bytes_transferred_;
-}
-
-const void *
-ACE_WIN32_Asynch_Result::act (void) const
-{
- return this->act_;
-}
-
-int
-ACE_WIN32_Asynch_Result::success (void) const
-{
- return this->success_;
-}
-
-const void *
-ACE_WIN32_Asynch_Result::completion_key (void) const
-{
- return this->completion_key_;
-}
-
-u_long
-ACE_WIN32_Asynch_Result::error (void) const
-{
- return this->error_;
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Result::event (void) const
-{
- return this->hEvent;
-}
-
-u_long
-ACE_WIN32_Asynch_Result::offset (void) const
-{
- return this->Offset;
-}
-
-u_long
-ACE_WIN32_Asynch_Result::offset_high (void) const
-{
- return this->OffsetHigh;
-}
-
-int
-ACE_WIN32_Asynch_Result::priority (void) const
-{
- ACE_NOTSUP_RETURN (0);
-}
-
-int
-ACE_WIN32_Asynch_Result::signal_number (void) const
-{
- ACE_NOTSUP_RETURN (0);
-}
-
-int
-ACE_WIN32_Asynch_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- // Get to the platform specific implementation.
- ACE_WIN32_Proactor *win32_proactor = ACE_dynamic_cast (ACE_WIN32_Proactor *,
- proactor);
-
- if (win32_proactor == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Dynamic cast to WIN32 Proactor failed\n")),
- -1);
-
- // Post myself.
- return win32_proactor->post_completion (this);
-}
-
-ACE_WIN32_Asynch_Result::~ACE_WIN32_Asynch_Result (void)
-{
-}
-
-ACE_WIN32_Asynch_Result::ACE_WIN32_Asynch_Result (ACE_Handler &handler,
- const void* act,
- ACE_HANDLE event,
- u_long offset,
- u_long offset_high,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- OVERLAPPED (),
- handler_ (handler),
- act_ (act),
- bytes_transferred_ (0),
- success_ (0),
- completion_key_ (0),
- error_ (0)
-{
- // Set the ACE_OVERLAPPED structure
- this->Internal = 0;
- this->InternalHigh = 0;
- this->Offset = offset;
- this->OffsetHigh = offset_high;
- this->hEvent = event;
-
- ACE_UNUSED_ARG (priority);
- ACE_UNUSED_ARG (signal_number);
-}
-
-int
-ACE_WIN32_Asynch_Operation::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- this->proactor_ = proactor;
- this->handler_ = &handler;
- this->handle_ = handle;
-
- // Grab the handle from the <handler> if <handle> is invalid
- if (this->handle_ == ACE_INVALID_HANDLE)
- this->handle_ = this->handler_->handle ();
- if (this->handle_ == ACE_INVALID_HANDLE)
- return -1;
-
- // Register with the <proactor>.
- return this->win32_proactor_->register_handle (this->handle_,
- completion_key);
-}
-
-int
-ACE_WIN32_Asynch_Operation::cancel (void)
-{
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) \
- && ( (defined (_MSC_VER) && (_MSC_VER > 1020)) \
- || (defined (__BORLANDC__) && (__BORLANDC__ >= 0x530)))
- // All I/O operations that are canceled will complete with the error
- // ERROR_OPERATION_ABORTED. All completion notifications for the I/O
- // operations will occur normally.
-
- // @@ This API returns 0 on failure. So, I am returning -1 in that
- // case. Is that right? (Alex).
-
- int result = (int) ::CancelIo (this->handle_);
-
- if (result == 0)
- // Couldnt cancel the operations.
- return 2;
-
- // result is non-zero. All the operations are cancelled then.
- return 0;
-
-#else /* Not ACE_HAS_WINNT4 && ACE_HAS_WINNT4!=0 && _MSC... */
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_AIO_CALLS */
-}
-
-ACE_Proactor *
-ACE_WIN32_Asynch_Operation::proactor (void) const
-{
- return this->proactor_;
-}
-
-ACE_WIN32_Asynch_Operation::ACE_WIN32_Asynch_Operation (ACE_WIN32_Proactor *win32_proactor)
- : ACE_Asynch_Operation_Impl (),
- win32_proactor_ (win32_proactor),
- proactor_ (0),
- handler_ (0),
- handle_ (ACE_INVALID_HANDLE)
-{
-}
-
-ACE_WIN32_Asynch_Operation::~ACE_WIN32_Asynch_Operation (void)
-{
-}
-
-// ************************************************************
-
-u_long
-ACE_WIN32_Asynch_Read_Stream_Result::bytes_to_read (void) const
-{
- return this->bytes_to_read_;
-}
-
-ACE_Message_Block &
-ACE_WIN32_Asynch_Read_Stream_Result::message_block (void) const
-{
- return this->message_block_;
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Read_Stream_Result::handle (void) const
-{
- return this->handle_;
-}
-
-ACE_WIN32_Asynch_Read_Stream_Result::ACE_WIN32_Asynch_Read_Stream_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Read_Stream_Result_Impl (),
- ACE_WIN32_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
- bytes_to_read_ (bytes_to_read),
- message_block_ (message_block),
- handle_ (handle)
-{
-}
-
-void
-ACE_WIN32_Asynch_Read_Stream_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Copy the data which was returned by GetQueuedCompletionStatus
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // Appropriately move the pointers in the message block.
- this->message_block_.wr_ptr (bytes_transferred);
-
- // Create the interface result class.
- ACE_Asynch_Read_Stream::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_read_stream (result);
-}
-
-ACE_WIN32_Asynch_Read_Stream_Result::~ACE_WIN32_Asynch_Read_Stream_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_WIN32_Asynch_Read_Stream_Result::bytes_transferred (void) const
-{
- return ACE_WIN32_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_WIN32_Asynch_Read_Stream_Result::act (void) const
-{
- return ACE_WIN32_Asynch_Result::act ();
-}
-
-int
-ACE_WIN32_Asynch_Read_Stream_Result::success (void) const
-{
- return ACE_WIN32_Asynch_Result::success ();
-}
-
-const void *
-ACE_WIN32_Asynch_Read_Stream_Result::completion_key (void) const
-{
- return ACE_WIN32_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_WIN32_Asynch_Read_Stream_Result::error (void) const
-{
- return ACE_WIN32_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Read_Stream_Result::event (void) const
-{
- return ACE_WIN32_Asynch_Result::event ();
-}
-
-u_long
-ACE_WIN32_Asynch_Read_Stream_Result::offset (void) const
-{
- return ACE_WIN32_Asynch_Result::offset ();
-}
-
-u_long
-ACE_WIN32_Asynch_Read_Stream_Result::offset_high (void) const
-{
- return ACE_WIN32_Asynch_Result::offset_high ();
-}
-
-int
-ACE_WIN32_Asynch_Read_Stream_Result::priority (void) const
-{
- return ACE_WIN32_Asynch_Result::priority ();
-}
-
-int
-ACE_WIN32_Asynch_Read_Stream_Result::signal_number (void) const
-{
- return ACE_WIN32_Asynch_Result::signal_number ();
-}
-
-int
-ACE_WIN32_Asynch_Read_Stream_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_WIN32_Asynch_Result::post_completion (proactor);
-}
-
-ACE_WIN32_Asynch_Read_Stream::ACE_WIN32_Asynch_Read_Stream (ACE_WIN32_Proactor *win32_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Read_Stream_Impl (),
- ACE_WIN32_Asynch_Operation (win32_proactor)
-{
-}
-
-int
-ACE_WIN32_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number)
-{
- // Create the Asynch_Result.
- ACE_WIN32_Asynch_Read_Stream_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_WIN32_Asynch_Read_Stream_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_read,
- act,
- this->win32_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- // Shared read
- ssize_t return_val = this->shared_read (result);
-
- // Upon errors
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_WIN32_Asynch_Read_Stream::~ACE_WIN32_Asynch_Read_Stream (void)
-{
-}
-
-int
-ACE_WIN32_Asynch_Read_Stream::shared_read (ACE_WIN32_Asynch_Read_Stream_Result *result)
-{
- u_long bytes_read;
-
- // Initiate the read
- int initiate_result = ::ReadFile (result->handle (),
- result->message_block ().wr_ptr (),
- result->bytes_to_read (),
- &bytes_read,
- result);
- if (initiate_result == 1)
- // Immediate success: the OVERLAPPED will still get queued.
- return 1;
-
- // If initiate failed, check for a bad error.
- ACE_OS::set_errno_to_last_error ();
- switch (errno)
- {
- case ERROR_IO_PENDING:
- // The IO will complete proactively: the OVERLAPPED will still
- // get queued.
- return 0;
-
- default:
- // Something else went wrong: the OVERLAPPED will not get
- // queued.
-
- if (ACE::debug ())
- {
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ReadFile")));
- }
-
- return -1;
- }
-}
-
-// Methods belong to ACE_WIN32_Asynch_Operation base class. These
-// methods are defined here to avoid VC++ warnings. They route the
-// call to the ACE_WIN32_Asynch_Operation base class.
-
-int
-ACE_WIN32_Asynch_Read_Stream::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_WIN32_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_WIN32_Asynch_Read_Stream::cancel (void)
-{
- return ACE_WIN32_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_WIN32_Asynch_Read_Stream::proactor (void) const
-{
- return ACE_WIN32_Asynch_Operation::proactor ();
-}
-
-u_long
-ACE_WIN32_Asynch_Write_Stream_Result::bytes_to_write (void) const
-{
- return this->bytes_to_write_;
-}
-
-ACE_Message_Block &
-ACE_WIN32_Asynch_Write_Stream_Result::message_block (void) const
-{
- return this->message_block_;
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Write_Stream_Result::handle (void) const
-{
- return this->handle_;
-}
-
-ACE_WIN32_Asynch_Write_Stream_Result::ACE_WIN32_Asynch_Write_Stream_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Write_Stream_Result_Impl (),
- ACE_WIN32_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
- bytes_to_write_ (bytes_to_write),
- message_block_ (message_block),
- handle_ (handle)
-{
-}
-
-void
-ACE_WIN32_Asynch_Write_Stream_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Copy the data which was returned by <GetQueuedCompletionStatus>.
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // Appropriately move the pointers in the message block.
- this->message_block_.rd_ptr (bytes_transferred);
-
- // Create the interface result class.
- ACE_Asynch_Write_Stream::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_write_stream (result);
-}
-
-ACE_WIN32_Asynch_Write_Stream_Result::~ACE_WIN32_Asynch_Write_Stream_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_WIN32_Asynch_Write_Stream_Result::bytes_transferred (void) const
-{
- return ACE_WIN32_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_WIN32_Asynch_Write_Stream_Result::act (void) const
-{
- return ACE_WIN32_Asynch_Result::act ();
-}
-
-int
-ACE_WIN32_Asynch_Write_Stream_Result::success (void) const
-{
- return ACE_WIN32_Asynch_Result::success ();
-}
-
-const void *
-ACE_WIN32_Asynch_Write_Stream_Result::completion_key (void) const
-{
- return ACE_WIN32_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_WIN32_Asynch_Write_Stream_Result::error (void) const
-{
- return ACE_WIN32_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Write_Stream_Result::event (void) const
-{
- return ACE_WIN32_Asynch_Result::event ();
-}
-
-u_long
-ACE_WIN32_Asynch_Write_Stream_Result::offset (void) const
-{
- return ACE_WIN32_Asynch_Result::offset ();
-}
-
-u_long
-ACE_WIN32_Asynch_Write_Stream_Result::offset_high (void) const
-{
- return ACE_WIN32_Asynch_Result::offset_high ();
-}
-
-int
-ACE_WIN32_Asynch_Write_Stream_Result::priority (void) const
-{
- return ACE_WIN32_Asynch_Result::priority ();
-}
-
-int
-ACE_WIN32_Asynch_Write_Stream_Result::signal_number (void) const
-{
- return ACE_WIN32_Asynch_Result::signal_number ();
-}
-
-int
-ACE_WIN32_Asynch_Write_Stream_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_WIN32_Asynch_Result::post_completion (proactor);
-}
-
-ACE_WIN32_Asynch_Write_Stream::ACE_WIN32_Asynch_Write_Stream (ACE_WIN32_Proactor *win32_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Write_Stream_Impl (),
- ACE_WIN32_Asynch_Operation (win32_proactor)
-{
-}
-
-int
-ACE_WIN32_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number)
-{
- ACE_WIN32_Asynch_Write_Stream_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_WIN32_Asynch_Write_Stream_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_write,
- act,
- this->win32_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- // Shared write
- ssize_t return_val = this->shared_write (result);
-
- // Upon errors
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_WIN32_Asynch_Write_Stream::~ACE_WIN32_Asynch_Write_Stream (void)
-{
-}
-
-int
-ACE_WIN32_Asynch_Write_Stream::shared_write (ACE_WIN32_Asynch_Write_Stream_Result *result)
-{
- u_long bytes_written;
-
- // Initiate the write
- int initiate_result = ::WriteFile (result->handle (),
- result->message_block ().rd_ptr (),
- result->bytes_to_write (),
- &bytes_written,
- result);
- if (initiate_result == 1)
- // Immediate success: the OVERLAPPED will still get queued.
- return 1;
-
- // If initiate failed, check for a bad error.
- ACE_OS::set_errno_to_last_error ();
- switch (errno)
- {
- case ERROR_IO_PENDING:
- // The IO will complete proactively: the OVERLAPPED will still
- // get queued.
- return 0;
-
- default:
- // Something else went wrong: the OVERLAPPED will not get
- // queued.
-
- if (ACE::debug ())
- {
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("WriteFile")));
- }
- return -1;
- }
-}
-
-// Methods belong to ACE_WIN32_Asynch_Operation base class. These
-// methods are defined here to avoid VC++ warnings. They route the
-// call to the ACE_WIN32_Asynch_Operation base class.
-
-int
-ACE_WIN32_Asynch_Write_Stream::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_WIN32_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_WIN32_Asynch_Write_Stream::cancel (void)
-{
- return ACE_WIN32_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_WIN32_Asynch_Write_Stream::proactor (void) const
-{
- return ACE_WIN32_Asynch_Operation::proactor ();
-}
-
-ACE_WIN32_Asynch_Read_File_Result::ACE_WIN32_Asynch_Read_File_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Read_Stream_Result_Impl (),
- ACE_Asynch_Read_File_Result_Impl (),
- ACE_WIN32_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
- ACE_WIN32_Asynch_Read_Stream_Result (handler,
- handle,
- message_block,
- bytes_to_read,
- act,
- event,
- priority,
- signal_number)
-{
- this->Offset = offset;
- this->OffsetHigh = offset_high;
-}
-
-void
-ACE_WIN32_Asynch_Read_File_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Copy the data which was returned by GetQueuedCompletionStatus.
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // Appropriately move the pointers in the message block.
- this->message_block_.wr_ptr (bytes_transferred);
-
- // Create the interface result class.
- ACE_Asynch_Read_File::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_read_file (result);
-}
-
-ACE_WIN32_Asynch_Read_File_Result::~ACE_WIN32_Asynch_Read_File_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_WIN32_Asynch_Read_File_Result::bytes_transferred (void) const
-{
- return ACE_WIN32_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_WIN32_Asynch_Read_File_Result::act (void) const
-{
- return ACE_WIN32_Asynch_Result::act ();
-}
-
-int
-ACE_WIN32_Asynch_Read_File_Result::success (void) const
-{
- return ACE_WIN32_Asynch_Result::success ();
-}
-
-const void *
-ACE_WIN32_Asynch_Read_File_Result::completion_key (void) const
-{
- return ACE_WIN32_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_WIN32_Asynch_Read_File_Result::error (void) const
-{
- return ACE_WIN32_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Read_File_Result::event (void) const
-{
- return ACE_WIN32_Asynch_Result::event ();
-}
-
-u_long
-ACE_WIN32_Asynch_Read_File_Result::offset (void) const
-{
- return ACE_WIN32_Asynch_Result::offset ();
-}
-
-u_long
-ACE_WIN32_Asynch_Read_File_Result::offset_high (void) const
-{
- return ACE_WIN32_Asynch_Result::offset_high ();
-}
-
-int
-ACE_WIN32_Asynch_Read_File_Result::priority (void) const
-{
- return ACE_WIN32_Asynch_Result::priority ();
-}
-
-int
-ACE_WIN32_Asynch_Read_File_Result::signal_number (void) const
-{
- return ACE_WIN32_Asynch_Result::signal_number ();
-}
-
-// The following methods belong to
-// ACE_WIN32_Asynch_Read_Stream_Result. They are here to avoid VC++
-// warnings. These methods route their call to the
-// ACE_WIN32_Asynch_Read_Stream_Result base class.
-
-u_long
-ACE_WIN32_Asynch_Read_File_Result::bytes_to_read (void) const
-{
- return ACE_WIN32_Asynch_Read_Stream_Result::bytes_to_read ();
-}
-
-ACE_Message_Block &
-ACE_WIN32_Asynch_Read_File_Result::message_block (void) const
-{
- return ACE_WIN32_Asynch_Read_Stream_Result::message_block ();
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Read_File_Result::handle (void) const
-{
- return ACE_WIN32_Asynch_Read_Stream_Result::handle ();
-}
-
-int
-ACE_WIN32_Asynch_Read_File_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_WIN32_Asynch_Result::post_completion (proactor);
-}
-
-// ************************************************************
-
-ACE_WIN32_Asynch_Read_File::ACE_WIN32_Asynch_Read_File (ACE_WIN32_Proactor *win32_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Read_Stream_Impl (),
- ACE_Asynch_Read_File_Impl (),
- ACE_WIN32_Asynch_Read_Stream (win32_proactor)
-{
-}
-
-int
-ACE_WIN32_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number)
-{
- ACE_WIN32_Asynch_Read_File_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_WIN32_Asynch_Read_File_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_read,
- act,
- offset,
- offset_high,
- this->win32_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- // Shared read
- ssize_t return_val = this->shared_read (result);
-
- // Upon errors
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_WIN32_Asynch_Read_File::~ACE_WIN32_Asynch_Read_File (void)
-{
-}
-
-int
-ACE_WIN32_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number)
-{
- return ACE_WIN32_Asynch_Read_Stream::read (message_block,
- bytes_to_read,
- act,
- priority,
- signal_number);
-}
-
-// Methods belong to ACE_WIN32_Asynch_Operation base class. These
-// methods are defined here to avoid VC++ warnings. They route the
-// call to the ACE_WIN32_Asynch_Operation base class.
-
-int
-ACE_WIN32_Asynch_Read_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_WIN32_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_WIN32_Asynch_Read_File::cancel (void)
-{
- return ACE_WIN32_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_WIN32_Asynch_Read_File::proactor (void) const
-{
- return ACE_WIN32_Asynch_Operation::proactor ();
-}
-
-ACE_WIN32_Asynch_Write_File_Result::ACE_WIN32_Asynch_Write_File_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Write_Stream_Result_Impl (),
- ACE_Asynch_Write_File_Result_Impl (),
- ACE_WIN32_Asynch_Write_Stream_Result (handler,
- handle,
- message_block,
- bytes_to_write,
- act,
- event,
- priority,
- signal_number)
-{
- this->Offset = offset;
- this->OffsetHigh = offset_high;
-}
-
-void
-ACE_WIN32_Asynch_Write_File_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Copy the data which was returned by GetQueuedCompletionStatus
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // Appropriately move the pointers in the message block.
- this->message_block_.rd_ptr (bytes_transferred);
-
- // Create the interface result class.
- ACE_Asynch_Write_File::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_write_file (result);
-}
-
-ACE_WIN32_Asynch_Write_File_Result::~ACE_WIN32_Asynch_Write_File_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_WIN32_Asynch_Write_File_Result::bytes_transferred (void) const
-{
- return ACE_WIN32_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_WIN32_Asynch_Write_File_Result::act (void) const
-{
- return ACE_WIN32_Asynch_Result::act ();
-}
-
-int
-ACE_WIN32_Asynch_Write_File_Result::success (void) const
-{
- return ACE_WIN32_Asynch_Result::success ();
-}
-
-const void *
-ACE_WIN32_Asynch_Write_File_Result::completion_key (void) const
-{
- return ACE_WIN32_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_WIN32_Asynch_Write_File_Result::error (void) const
-{
- return ACE_WIN32_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Write_File_Result::event (void) const
-{
- return ACE_WIN32_Asynch_Result::event ();
-}
-
-u_long
-ACE_WIN32_Asynch_Write_File_Result::offset (void) const
-{
- return ACE_WIN32_Asynch_Result::offset ();
-}
-
-u_long
-ACE_WIN32_Asynch_Write_File_Result::offset_high (void) const
-{
- return ACE_WIN32_Asynch_Result::offset_high ();
-}
-
-int
-ACE_WIN32_Asynch_Write_File_Result::priority (void) const
-{
- return ACE_WIN32_Asynch_Result::priority ();
-}
-
-int
-ACE_WIN32_Asynch_Write_File_Result::signal_number (void) const
-{
- return ACE_WIN32_Asynch_Result::signal_number ();
-}
-
-// The following methods belong to
-// ACE_WIN32_Asynch_Write_Stream_Result. They are here to avoid VC++
-// warnings. These methods route their call to the
-// ACE_WIN32_Asynch_Write_Stream_Result base class.
-
-u_long
-ACE_WIN32_Asynch_Write_File_Result::bytes_to_write (void) const
-{
- return ACE_WIN32_Asynch_Write_Stream_Result::bytes_to_write ();
-}
-
-ACE_Message_Block &
-ACE_WIN32_Asynch_Write_File_Result::message_block (void) const
-{
- return ACE_WIN32_Asynch_Write_Stream_Result::message_block ();
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Write_File_Result::handle (void) const
-{
- return ACE_WIN32_Asynch_Write_Stream_Result::handle ();
-}
-
-int
-ACE_WIN32_Asynch_Write_File_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_WIN32_Asynch_Result::post_completion (proactor);
-}
-
-ACE_WIN32_Asynch_Write_File::ACE_WIN32_Asynch_Write_File (ACE_WIN32_Proactor *win32_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Write_Stream_Impl (),
- ACE_Asynch_Write_File_Impl (),
- ACE_WIN32_Asynch_Write_Stream (win32_proactor)
-{
-}
-
-int
-ACE_WIN32_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number)
-{
- ACE_WIN32_Asynch_Write_File_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_WIN32_Asynch_Write_File_Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_write,
- act,
- offset,
- offset_high,
- this->win32_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- // Shared write
- ssize_t return_val = this->shared_write (result);
-
- // Upon errors
- if (return_val == -1)
- delete result;
-
- return return_val;
-}
-
-ACE_WIN32_Asynch_Write_File::~ACE_WIN32_Asynch_Write_File (void)
-{
-}
-
-int
-ACE_WIN32_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number)
-{
- return ACE_WIN32_Asynch_Write_Stream::write (message_block,
- bytes_to_write,
- act,
- priority,
- signal_number);
-}
-
-// Methods belong to ACE_WIN32_Asynch_Operation base class. These
-// methods are defined here to avoid VC++ warnings. They route the
-// call to the ACE_WIN32_Asynch_Operation base class.
-
-int
-ACE_WIN32_Asynch_Write_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_WIN32_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_WIN32_Asynch_Write_File::cancel (void)
-{
- return ACE_WIN32_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_WIN32_Asynch_Write_File::proactor (void) const
-{
- return ACE_WIN32_Asynch_Operation::proactor ();
-}
-
-u_long
-ACE_WIN32_Asynch_Accept_Result::bytes_to_read (void) const
-{
- return this->bytes_to_read_;
-}
-
-ACE_Message_Block &
-ACE_WIN32_Asynch_Accept_Result::message_block (void) const
-{
- return this->message_block_;
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Accept_Result::listen_handle (void) const
-{
- return this->listen_handle_;
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Accept_Result::accept_handle (void) const
-{
- return this->accept_handle_;
-}
-
-ACE_WIN32_Asynch_Accept_Result::ACE_WIN32_Asynch_Accept_Result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Accept_Result_Impl (),
- ACE_WIN32_Asynch_Result (handler, act, event, 0, 0, priority, signal_number),
- bytes_to_read_ (bytes_to_read),
- message_block_ (message_block),
- listen_handle_ (listen_handle),
- accept_handle_ (accept_handle)
-{
-}
-
-void
-ACE_WIN32_Asynch_Accept_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Copy the data which was returned by GetQueuedCompletionStatus
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // Appropriately move the pointers in the message block.
- this->message_block_.wr_ptr (bytes_transferred);
-
- // Create the interface result class.
- ACE_Asynch_Accept::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_accept (result);
-}
-
-ACE_WIN32_Asynch_Accept_Result::~ACE_WIN32_Asynch_Accept_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_WIN32_Asynch_Accept_Result::bytes_transferred (void) const
-{
- return ACE_WIN32_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_WIN32_Asynch_Accept_Result::act (void) const
-{
- return ACE_WIN32_Asynch_Result::act ();
-}
-
-int
-ACE_WIN32_Asynch_Accept_Result::success (void) const
-{
- return ACE_WIN32_Asynch_Result::success ();
-}
-
-const void *
-ACE_WIN32_Asynch_Accept_Result::completion_key (void) const
-{
- return ACE_WIN32_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_WIN32_Asynch_Accept_Result::error (void) const
-{
- return ACE_WIN32_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Accept_Result::event (void) const
-{
- return ACE_WIN32_Asynch_Result::event ();
-}
-
-u_long
-ACE_WIN32_Asynch_Accept_Result::offset (void) const
-{
- return ACE_WIN32_Asynch_Result::offset ();
-}
-
-u_long
-ACE_WIN32_Asynch_Accept_Result::offset_high (void) const
-{
- return ACE_WIN32_Asynch_Result::offset_high ();
-}
-
-int
-ACE_WIN32_Asynch_Accept_Result::priority (void) const
-{
- return ACE_WIN32_Asynch_Result::priority ();
-}
-
-int
-ACE_WIN32_Asynch_Accept_Result::signal_number (void) const
-{
- return ACE_WIN32_Asynch_Result::signal_number ();
-}
-
-int
-ACE_WIN32_Asynch_Accept_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_WIN32_Asynch_Result::post_completion (proactor);
-}
-
-ACE_WIN32_Asynch_Accept::ACE_WIN32_Asynch_Accept (ACE_WIN32_Proactor *win32_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Accept_Impl (),
- ACE_WIN32_Asynch_Operation (win32_proactor)
-{
-}
-
-int
-ACE_WIN32_Asynch_Accept::accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle,
- const void *act,
- int priority,
- int signal_number)
-{
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
- // Sanity check: make sure that enough space has been allocated by
- // the caller.
- size_t address_size = sizeof (sockaddr_in) + sizeof (sockaddr);
- size_t space_in_use = message_block.wr_ptr () - message_block.base ();
- size_t total_size = message_block.size ();
- size_t available_space = total_size - space_in_use;
- size_t space_needed = bytes_to_read + 2 * address_size;
- if (available_space < space_needed)
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Buffer too small\n")), -1);
-
- // WIN Specific.
-
- int close_accept_handle = 0;
- // If the <accept_handle> is invalid, we will create a new socket.
- if (accept_handle == ACE_INVALID_HANDLE)
- {
- accept_handle = ACE_OS::socket (PF_INET,
- SOCK_STREAM,
- 0);
- if (accept_handle == ACE_INVALID_HANDLE)
- {
- if (ACE::debug ())
- {
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE_OS::socket")));
- }
- return -1;
- }
- else
- // Remember to close the socket down if failures occur.
- close_accept_handle = 1;
- }
-
- // Common code for both WIN and POSIX.
- ACE_WIN32_Asynch_Accept_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_WIN32_Asynch_Accept_Result (*this->handler_,
- this->handle_,
- accept_handle,
- message_block,
- bytes_to_read,
- act,
- this->win32_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- u_long bytes_read;
-
- // Initiate the accept.
- int initiate_result = ::AcceptEx ((SOCKET) result->listen_handle (),
- (SOCKET) result->accept_handle (),
- result->message_block ().wr_ptr (),
- result->bytes_to_read (),
- address_size,
- address_size,
- &bytes_read,
- result);
- if (initiate_result == 1)
- // Immediate success: the OVERLAPPED will still get queued.
- return 1;
-
- // If initiate failed, check for a bad error.
- ACE_OS::set_errno_to_last_error ();
- switch (errno)
- {
- case ERROR_IO_PENDING:
- // The IO will complete proactively: the OVERLAPPED will still
- // get queued.
- return 0;
-
- default:
- // Something else went wrong: the OVERLAPPED will not get
- // queued.
-
- if (close_accept_handle == 1)
- // Close the newly created socket
- ACE_OS::closesocket (accept_handle);
-
- // Cleanup dynamically allocated Asynch_Result.
- delete result;
-
- if (ACE::debug ())
- {
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ReadFile")));
- }
- return -1;
- }
-#else /* ACE_HAS_WINNT4 .......|| ACE_HAS_AIO_CALLS */
- ACE_NOTSUP_RETURN (-1);
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) || (defined (ACE_HAS_AIO_CALLS) */
-}
-
-ACE_WIN32_Asynch_Accept::~ACE_WIN32_Asynch_Accept (void)
-{
-}
-
-// Methods belong to ACE_WIN32_Asynch_Operation base class. These
-// methods are defined here to avoid VC++ warnings. They route the
-// call to the ACE_WIN32_Asynch_Operation base class.
-
-int
-ACE_WIN32_Asynch_Accept::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_WIN32_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_WIN32_Asynch_Accept::cancel (void)
-{
- return ACE_WIN32_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_WIN32_Asynch_Accept::proactor (void) const
-{
- return ACE_WIN32_Asynch_Operation::proactor ();
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Transmit_File_Result::socket (void) const
-{
- return this->socket_;
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Transmit_File_Result::file (void) const
-{
- return this->file_;
-}
-
-ACE_Asynch_Transmit_File::Header_And_Trailer *
-ACE_WIN32_Asynch_Transmit_File_Result::header_and_trailer (void) const
-{
- return this->header_and_trailer_;
-}
-
-u_long
-ACE_WIN32_Asynch_Transmit_File_Result::bytes_to_write (void) const
-{
- return this->bytes_to_write_;
-}
-
-u_long
-ACE_WIN32_Asynch_Transmit_File_Result::bytes_per_send (void) const
-{
- return this->bytes_per_send_;
-}
-
-u_long
-ACE_WIN32_Asynch_Transmit_File_Result::flags (void) const
-{
- return this->flags_;
-}
-
-ACE_WIN32_Asynch_Transmit_File_Result::ACE_WIN32_Asynch_Transmit_File_Result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_Asynch_Transmit_File_Result_Impl (),
- ACE_WIN32_Asynch_Result (handler, act, event, offset, offset_high, priority, signal_number),
- socket_ (socket),
- file_ (file),
- header_and_trailer_ (header_and_trailer),
- bytes_to_write_ (bytes_to_write),
- bytes_per_send_ (bytes_per_send),
- flags_ (flags)
-{
-}
-
-void
-ACE_WIN32_Asynch_Transmit_File_Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- // Copy the data which was returned by GetQueuedCompletionStatus
- this->bytes_transferred_ = bytes_transferred;
- this->success_ = success;
- this->completion_key_ = completion_key;
- this->error_ = error;
-
- // We will not do this because (a) the header and trailer blocks may
- // be the same message_blocks and (b) in cases of failures we have
- // no idea how much of what (header, data, trailer) was sent.
- /*
- if (this->success_ && this->header_and_trailer_ != 0)
- {
- ACE_Message_Block *header = this->header_and_trailer_->header ();
- if (header != 0)
- header->rd_ptr (this->header_and_trailer_->header_bytes ());
-
- ACE_Message_Block *trailer = this->header_and_trailer_->trailer ();
- if (trailer != 0)
- trailer->rd_ptr (this->header_and_trailer_->trailer_bytes ());
- }
- */
-
- // Create the interface result class.
- ACE_Asynch_Transmit_File::Result result (this);
-
- // Call the application handler.
- this->handler_.handle_transmit_file (result);
-}
-
-ACE_WIN32_Asynch_Transmit_File_Result::~ACE_WIN32_Asynch_Transmit_File_Result (void)
-{
-}
-
-// Base class operations. These operations are here to kill dominance
-// warnings. These methods call the base class methods.
-
-u_long
-ACE_WIN32_Asynch_Transmit_File_Result::bytes_transferred (void) const
-{
- return ACE_WIN32_Asynch_Result::bytes_transferred ();
-}
-
-const void *
-ACE_WIN32_Asynch_Transmit_File_Result::act (void) const
-{
- return ACE_WIN32_Asynch_Result::act ();
-}
-
-int
-ACE_WIN32_Asynch_Transmit_File_Result::success (void) const
-{
- return ACE_WIN32_Asynch_Result::success ();
-}
-
-const void *
-ACE_WIN32_Asynch_Transmit_File_Result::completion_key (void) const
-{
- return ACE_WIN32_Asynch_Result::completion_key ();
-}
-
-u_long
-ACE_WIN32_Asynch_Transmit_File_Result::error (void) const
-{
- return ACE_WIN32_Asynch_Result::error ();
-}
-
-ACE_HANDLE
-ACE_WIN32_Asynch_Transmit_File_Result::event (void) const
-{
- return ACE_WIN32_Asynch_Result::event ();
-}
-
-u_long
-ACE_WIN32_Asynch_Transmit_File_Result::offset (void) const
-{
- return ACE_WIN32_Asynch_Result::offset ();
-}
-
-u_long
-ACE_WIN32_Asynch_Transmit_File_Result::offset_high (void) const
-{
- return ACE_WIN32_Asynch_Result::offset_high ();
-}
-
-int
-ACE_WIN32_Asynch_Transmit_File_Result::priority (void) const
-{
- return ACE_WIN32_Asynch_Result::priority ();
-}
-
-int
-ACE_WIN32_Asynch_Transmit_File_Result::signal_number (void) const
-{
- return ACE_WIN32_Asynch_Result::signal_number ();
-}
-
-int
-ACE_WIN32_Asynch_Transmit_File_Result::post_completion (ACE_Proactor_Impl *proactor)
-{
- return ACE_WIN32_Asynch_Result::post_completion (proactor);
-}
-
-ACE_WIN32_Asynch_Transmit_File::ACE_WIN32_Asynch_Transmit_File (ACE_WIN32_Proactor *win32_proactor)
- : ACE_Asynch_Operation_Impl (),
- ACE_Asynch_Transmit_File_Impl (),
- ACE_WIN32_Asynch_Operation (win32_proactor)
-{
-}
-
-int
-ACE_WIN32_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- int priority,
- int signal_number)
-{
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
- ACE_WIN32_Asynch_Transmit_File_Result *result = 0;
- ACE_NEW_RETURN (result,
- ACE_WIN32_Asynch_Transmit_File_Result (*this->handler_,
- this->handle_,
- file,
- header_and_trailer,
- bytes_to_write,
- offset,
- offset_high,
- bytes_per_send,
- flags,
- act,
- this->win32_proactor_->get_handle (),
- priority,
- signal_number),
- -1);
-
- ACE_LPTRANSMIT_FILE_BUFFERS transmit_buffers = 0;
- if (result->header_and_trailer () != 0)
- transmit_buffers = result->header_and_trailer ()->transmit_buffers ();
-
- // Initiate the transmit file
- int initiate_result = ::TransmitFile ((SOCKET) result->socket (),
- result->file (),
- result->bytes_to_write (),
- result->bytes_per_send (),
- result,
- transmit_buffers,
- result->flags ());
- if (initiate_result == 1)
- // Immediate success: the OVERLAPPED will still get queued.
- return 1;
-
- // If initiate failed, check for a bad error.
- ACE_OS::set_errno_to_last_error ();
- switch (errno)
- {
- case ERROR_IO_PENDING:
- // The IO will complete proactively: the OVERLAPPED will still
- // get queued.
- return 0;
-
- default:
- // Something else went wrong: the OVERLAPPED will not get
- // queued.
-
- // Cleanup dynamically allocated Asynch_Result
- delete result;
-
- if (ACE::debug ())
- {
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("TransmitFile")));
- }
- return -1;
- }
-#else /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) */
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_HAS_AIO_CALLS */
-}
-
-ACE_WIN32_Asynch_Transmit_File::~ACE_WIN32_Asynch_Transmit_File (void)
-{
-}
-
-// Methods belong to ACE_WIN32_Asynch_Operation base class. These
-// methods are defined here to avoid VC++ warnings. They route the
-// call to the ACE_WIN32_Asynch_Operation base class.
-
-int
-ACE_WIN32_Asynch_Transmit_File::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
-{
- return ACE_WIN32_Asynch_Operation::open (handler,
- handle,
- completion_key,
- proactor);
-}
-
-int
-ACE_WIN32_Asynch_Transmit_File::cancel (void)
-{
- return ACE_WIN32_Asynch_Operation::cancel ();
-}
-
-ACE_Proactor *
-ACE_WIN32_Asynch_Transmit_File::proactor (void) const
-{
- return ACE_WIN32_Asynch_Operation::proactor ();
-}
-
-#endif /* ACE_WIN32 || ACE_HAS_WINCE */
diff --git a/ace/WIN32_Asynch_IO.h b/ace/WIN32_Asynch_IO.h
deleted file mode 100644
index 11e04507955..00000000000
--- a/ace/WIN32_Asynch_IO.h
+++ /dev/null
@@ -1,1210 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-//
-// ace
-//
-// = FILENAME
-//
-// WIN32_Asynch_IO.h
-//
-// = DESCRIPTION
-//
-// These classes only works on Win32 platforms.
-//
-// The implementation of <ACE_Asynch_Transmit_File> and
-// <ACE_Asynch_Accept> are only supported if ACE_HAS_WINSOCK2 is
-// defined or you are on WinNT 4.0 or higher.
-//
-// = AUTHOR
-//
-// Irfan Pyarali (irfan@cs.wustl.edu),
-// Tim Harrison (harrison@cs.wustl.edu) and
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_WIN32_ASYNCH_IO_H
-#define ACE_WIN32_ASYNCH_IO_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
-
-#include "ace/Asynch_IO_Impl.h"
-
-// Forward declaration
-class ACE_WIN32_Proactor;
-
-class ACE_Export ACE_WIN32_Asynch_Result : public virtual ACE_Asynch_Result_Impl,
- public OVERLAPPED
-{
- // = TITLE
- //
- // An abstract class which adds information to the OVERLAPPED
- // structure to make it more useful.
- //
- // = DESCRIPTION
- //
- // An abstract base class from which you can obtain some basic
- // information like the number of bytes transferred, the ACT
- // associated with the asynchronous operation, indication of
- // success or failure, etc. Subclasses may want to store more
- // information that is particular to the asynchronous operation
- // it represents.
-
- friend class ACE_WIN32_Asynch_Accept;
- // Factory class has special permissions.
-
- friend class ACE_WIN32_Proactor;
- // Proactor class has special permission.
-
-public:
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This returns the ACT associated with the handle when it was
- // registered with the I/O completion port. This ACT is not the
- // same as the ACT associated with the asynchronous operation.
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // Event associated with the OVERLAPPED structure.
-
- u_long offset (void) const;
- // This really make sense only when doing file I/O.
-
- u_long offset_high (void) const;
- // Offset_high associated with the OVERLAPPED structure.
-
- int priority (void) const;
- // The priority of the asynchronous operation. Currently, this is
- // not supported on Win32.
-
- int signal_number (void) const;
- // Returns 0.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor's completion port.
-
- virtual ~ACE_WIN32_Asynch_Result (void);
- // Destructor.
-
-protected:
- ACE_WIN32_Asynch_Result (ACE_Handler &handler,
- const void* act,
- ACE_HANDLE event,
- u_long offset,
- u_long offset_high,
- int priority,
- int signal_number = 0);
- // Constructor.
-
- ACE_Handler &handler_;
- // Handler that will be called back.
-
- const void *act_;
- // ACT for this operation.
-
- u_long bytes_transferred_;
- // Bytes transferred by this operation.
-
- int success_;
- // Success indicator.
-
- const void *completion_key_;
- // ACT associated with handle.
-
- u_long error_;
- // Error if operation failed.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Operation : public virtual ACE_Asynch_Operation_Impl
-{
- // = TITLE
- //
- // This class abstracts out the common things needed for
- // implementing Asynch_Operation for WIN32 platform.
- //
- // = DESCRIPTION
- //
-public:
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- // This cancels all pending accepts operations that were issued by
- // the calling thread. The function does not cancel asynchronous
- // operations issued by other threads.
-
- // = Access methods.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-protected:
- ACE_WIN32_Asynch_Operation (ACE_WIN32_Proactor *win32_proactor);
- // Constructor.
-
- virtual ~ACE_WIN32_Asynch_Operation (void);
- // Destructor.
-
- ACE_WIN32_Proactor *win32_proactor_;
- // WIn32 Proactor.
-
- ACE_Proactor *proactor_;
- // Proactor that this asynch IO is registered with.
-
- ACE_Handler *handler_;
- // Handler that will receive the callback.
-
- ACE_HANDLE handle_;
- // I/O handle used for reading.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Read_Stream_Result : public virtual ACE_Asynch_Read_Stream_Result_Impl,
- public virtual ACE_WIN32_Asynch_Result
-{
- // = TITLE
- //
- // This is class provides concrete implementation for
- // ACE_Asynch_Read_Stream::Result class.
- //
- // = DESCRIPTION
- //
-
- friend class ACE_WIN32_Asynch_Read_Stream;
- // Factory class will have special permissions.
-
- friend class ACE_WIN32_Proactor;
- // Proactor class has special permission.
-
-public:
- u_long bytes_to_read (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous read.
-
- ACE_Message_Block &message_block (void) const;
- // Message block which contains the read data.
-
- ACE_HANDLE handle (void) const;
- // I/O handle used for reading.
-
- // Base class operations. These operations are here to kill
- // dominance warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This returns the ACT associated with the handle when it was
- // registered with the I/O completion port. This ACT is not the
- // same as the ACT associated with the asynchronous operation.
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // Event associated with the OVERLAPPED structure.
-
- u_long offset (void) const;
- // This really make sense only when doing file I/O.
-
- u_long offset_high (void) const;
- // Offset_high associated with the OVERLAPPED structure.
-
- int priority (void) const;
- // The priority of the asynchronous operation. Currently, this is
- // not supported on Win32.
-
- int signal_number (void) const;
- // No-op. Returns 0.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor's completion port.
-
-protected:
- ACE_WIN32_Asynch_Read_Stream_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Read_Stream factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // Proactor will call this method when the read completes.
-
- virtual ~ACE_WIN32_Asynch_Read_Stream_Result (void);
- // Destructor.
-
- u_long bytes_to_read_;
- // Bytes requested when the asynchronous read was initiated.
-
- ACE_Message_Block &message_block_;
- // Message block for reading the data into.
-
- ACE_HANDLE handle_;
- // I/O handle used for reading.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Read_Stream : public virtual ACE_Asynch_Read_Stream_Impl,
- public ACE_WIN32_Asynch_Operation
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous reads
- // on a stream.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <read>s can
- // started using this class. An ACE_Asynch_Read_Stream::Result
- // will be passed back to the <handler> when the asynchronous
- // reads completes through the <ACE_Handler::handle_read_stream>
- // callback.
-
-public:
- ACE_WIN32_Asynch_Read_Stream (ACE_WIN32_Proactor *win32_proactor);
- // Constructor.
-
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>.
-
- virtual ~ACE_WIN32_Asynch_Read_Stream (void);
- // Destructor.
-
- // Methods belong to ACE_WIN32_Asynch_Operation base class. These
- // methods are defined here to avoid VC++ warnings. They route the
- // call to the ACE_WIN32_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- // This cancels all pending accepts operations that were issued by
- // the calling thread. The function does not cancel asynchronous
- // operations issued by other threads.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-protected:
- int shared_read (ACE_WIN32_Asynch_Read_Stream_Result *result);
- // This is the method which does the real work and is there so that
- // the ACE_Asynch_Read_File class can use it too.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Write_Stream_Result : public virtual ACE_Asynch_Write_Stream_Result_Impl,
- public ACE_WIN32_Asynch_Result
-{
- // = TITLE
- //
- // This is class provides concrete implementation for
- // ACE_Asynch_Write_Stream::Result class.
- //
- // = DESCRIPTION
- //
-
- friend class ACE_WIN32_Asynch_Write_Stream;
- // Factory class willl have special permissions.
-
- friend class ACE_WIN32_Proactor;
- // Proactor class has special permission.
-
-public:
- u_long bytes_to_write (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous write.
-
- ACE_Message_Block &message_block (void) const;
- // Message block that contains the data to be written.
-
- ACE_HANDLE handle (void) const;
- // I/O handle used for writing.
-
- // = Base class operations. These operations are here to kill some
- // warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This returns the ACT associated with the handle when it was
- // registered with the I/O completion port. This ACT is not the
- // same as the ACT associated with the asynchronous operation.
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // Event associated with the OVERLAPPED structure.
-
- u_long offset (void) const;
- // This really make sense only when doing file I/O.
-
- u_long offset_high (void) const;
- // Offset_high associated with the OVERLAPPED structure.
-
- int priority (void) const;
- // The priority of the asynchronous operation. Currently, this is
- // not supported on Win32.
-
- int signal_number (void) const;
- // No-op. Returns 0.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor's completion port.
-
-protected:
- ACE_WIN32_Asynch_Write_Stream_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Write_Stream factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // ACE_Proactor will call this method when the write completes.
-
- virtual ~ACE_WIN32_Asynch_Write_Stream_Result (void);
- // Destructor.
-
- u_long bytes_to_write_;
- // The number of bytes which were requested at the start of the
- // asynchronous write.
-
- ACE_Message_Block &message_block_;
- // Message block that contains the data to be written.
-
- ACE_HANDLE handle_;
- // I/O handle used for writing.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Write_Stream : public virtual ACE_Asynch_Write_Stream_Impl,
- public ACE_WIN32_Asynch_Operation
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous writes
- // on a stream.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <writes>s can
- // started using this class. A ACE_Asynch_Write_Stream::Result
- // will be passed back to the <handler> when the asynchronous
- // write completes through the
- // <ACE_Handler::handle_write_stream> callback.
-
-public:
- ACE_WIN32_Asynch_Write_Stream (ACE_WIN32_Proactor *win32_proactor);
- // Constructor.
-
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be written from the <message_block>.
-
- virtual ~ACE_WIN32_Asynch_Write_Stream (void);
- // Destructor.
-
- // = Methods belonging to <ACE_WIN32_Asynch_Operation> base class.
-
- // These methods are defined here to avoid VC++ warnings. They route
- // the call to the <ACE_WIN32_Asynch_Operation> base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- // This cancels all pending accepts operations that were issued by
- // the calling thread. The function does not cancel asynchronous
- // operations issued by other threads.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-protected:
- int shared_write (ACE_WIN32_Asynch_Write_Stream_Result *result);
- // This is the method which does the real work and is there so that
- // the ACE_Asynch_Write_File class can use it too.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Read_File_Result : public virtual ACE_Asynch_Read_File_Result_Impl,
- public ACE_WIN32_Asynch_Read_Stream_Result
-{
- // = TITLE
- //
- // This is class provides concrete implementation for
- // ACE_Asynch_Read_File::Result class.
- //
- // = DESCRIPTION
- //
-
- friend class ACE_WIN32_Asynch_Read_File;
- // Factory class will have special permissions.
-
- friend class ACE_WIN32_Proactor;
- // Proactor class has special permission.
-
-public:
- // = These methods belong to ACE_WIN32_Asynch_Result class base
- // class. These operations are here to kill some warnings. These
- // methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This returns the ACT associated with the handle when it was
- // registered with the I/O completion port. This ACT is not the
- // same as the ACT associated with the asynchronous operation.
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // Event associated with the OVERLAPPED structure.
-
- u_long offset (void) const;
- // This really make sense only when doing file I/O.
-
- u_long offset_high (void) const;
- // Offset_high associated with the OVERLAPPED structure.
-
- int priority (void) const;
- // The priority of the asynchronous operation. Currently, this is
- // not supported on Win32.
-
- int signal_number (void) const;
- // No-op. Returns 0.
-
- // The following methods belong to
- // ACE_WIN32_Asynch_Read_Stream_Result. They are here to avoid VC++
- // dominance warnings. These methods route their call to the
- // ACE_WIN32_Asynch_Read_Stream_Result base class.
-
- u_long bytes_to_read (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous read.
-
- ACE_Message_Block &message_block (void) const;
- // Message block which contains the read data.
-
- ACE_HANDLE handle (void) const;
- // I/O handle used for reading.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor's completion port.
-
-protected:
- ACE_WIN32_Asynch_Read_File_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Read_File factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // ACE_Proactor will call this method when the read completes.
-
- virtual ~ACE_WIN32_Asynch_Read_File_Result (void);
- // Destructor.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Read_File : public virtual ACE_Asynch_Read_File_Impl,
- public ACE_WIN32_Asynch_Read_Stream
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous reads
- // on a file.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <read>s can
- // started using this class. A ACE_Asynch_Read_File::Result
- // will be passed back to the <handler> when the asynchronous
- // reads completes through the <ACE_Handler::handle_read_file>
- // callback.
- //
- // This class differs slightly from ACE_Asynch_Read_Stream as it
- // allows the user to specify an offset for the read.
-
-public:
- ACE_WIN32_Asynch_Read_File (ACE_WIN32_Proactor *win32_proactor);
- // Constructor.
-
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous read. Upto <bytes_to_read> will
- // be read and stored in the <message_block>. The read will start
- // at <offset> from the beginning of the file.
-
- virtual ~ACE_WIN32_Asynch_Read_File (void);
- // Destructor.
-
- // = Methods belong to ACE_WIN32_Asynch_Operation base class. These
- // methods are defined here to avoid VC++ warnings. They route the
- // call to the ACE_WIN32_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- // This cancels all pending accepts operations that were issued by
- // the calling thread. The function does not cancel asynchronous
- // operations issued by other threads.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-private:
- int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act,
- int priority,
- int signal_number = 0);
- // This method belongs to ACE_WIN32_Asynch_Read_Stream. It is here
- // to avoid the compiler warnings. We forward this call to the
- // ACE_WIN32_Asynch_Read_Stream class.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Write_File_Result : public virtual ACE_Asynch_Write_File_Result_Impl,
- public ACE_WIN32_Asynch_Write_Stream_Result
-{
- // = TITLE
- //
- // This class provides implementation for
- // ACE_Asynch_Write_File_Result for WIN32 platforms.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous write.
- //
- // This class differs slightly from
- // ACE_Asynch_Write_Stream::Result as it calls back
- // <ACE_Handler::handle_write_file> on the <handler> instead
- // of <ACE_Handler::handle_write_stream>. No additional state
- // is required by this class as ACE_Asynch_Result can store
- // the <offset>.
-
- friend class ACE_WIN32_Asynch_Write_File;
- // Factory class will have special permission.
-
- friend class ACE_WIN32_Proactor;
- // Proactor class has special permission.
-
-public:
- // = Base class operations. These operations are here to kill some
- // warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This returns the ACT associated with the handle when it was
- // registered with the I/O completion port. This ACT is not the
- // same as the ACT associated with the asynchronous operation.
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // Event associated with the OVERLAPPED structure.
-
- u_long offset (void) const;
- // This really make sense only when doing file I/O.
-
- u_long offset_high (void) const;
- // Offset_high associated with the OVERLAPPED structure.
-
- int priority (void) const;
- // The priority of the asynchronous operation. Currently, this is
- // not supported on Win32.
-
- int signal_number (void) const;
- // No-op. Returns 0.
-
- // The following methods belong to
- // ACE_WIN32_Asynch_Read_Stream_Result. They are here to avoid VC++
- // warnings. These methods route their call to the
- // ACE_WIN32_Asynch_Read_Stream_Result base class.
-
- u_long bytes_to_write (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous write.
-
- ACE_Message_Block &message_block (void) const;
- // Message block that contains the data to be written.
-
- ACE_HANDLE handle (void) const;
- // I/O handle used for writing.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor's completion port.
-
-protected:
- ACE_WIN32_Asynch_Write_File_Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Write_File factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // ACE_Proactor will call this method when the write completes.
-
- virtual ~ACE_WIN32_Asynch_Write_File_Result (void);
- // Destructor.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Write_File : public virtual ACE_Asynch_Write_File_Impl,
- public ACE_WIN32_Asynch_Write_Stream
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous writes
- // on a file.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <write>s can be
- // started using this class. A ACE_Asynch_Write_File::Result
- // will be passed back to the <handler> when the asynchronous
- // writes completes through the <ACE_Handler::handle_write_file>
- // callback.
-
-public:
- ACE_WIN32_Asynch_Write_File (ACE_WIN32_Proactor *win32_proactor);
- // Constructor.
-
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous write. Upto <bytes_to_write>
- // will be write and stored in the <message_block>. The write will
- // start at <offset> from the beginning of the file.
-
- virtual ~ACE_WIN32_Asynch_Write_File (void);
- // Destrcutor.
-
- // = Methods belong to ACE_WIN32_Asynch_Operation base class. These
- // methods are defined here to avoid VC++ warnings. They route the
- // call to the ACE_WIN32_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- // This cancels all pending accepts operations that were issued by
- // the calling thread. The function does not cancel asynchronous
- // operations issued by other threads.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-
-private:
- int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act,
- int priority,
- int signal_number = 0);
- // This method belongs to ACE_WIN32_Asynch_Write_Stream. It is here
- // to avoid compiler warnings. This method is forwarded to the
- // ACE_WIN32_Asynch_Write_Stream class.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Accept_Result : public virtual ACE_Asynch_Accept_Result_Impl,
- public ACE_WIN32_Asynch_Result
-{
- // = TITLE
- //
- // This class implements ACE_Asynch_Accept::Result for WIN32
- // platform.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous accept.
-
- friend class ACE_WIN32_Asynch_Accept;
- // Factory will have special permission.
-
- friend class ACE_WIN32_Proactor;
- // Proactor class has special permission.
-
-public:
- u_long bytes_to_read (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous accept.
-
- ACE_Message_Block &message_block (void) const;
- // Message block which contains the read data.
-
- ACE_HANDLE listen_handle (void) const;
- // I/O handle used for accepting new connections.
-
- ACE_HANDLE accept_handle (void) const;
- // I/O handle for the new connection.
-
- // = Base class operations. These operations are here to kill some
- // warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This returns the ACT associated with the handle when it was
- // registered with the I/O completion port. This ACT is not the
- // same as the ACT associated with the asynchronous operation.
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // Event associated with the OVERLAPPED structure.
-
- u_long offset (void) const;
- // This really make sense only when doing file I/O.
-
- u_long offset_high (void) const;
- // Offset_high associated with the OVERLAPPED structure.
-
- int priority (void) const;
- // The priority of the asynchronous operation. Currently, this is
- // not supported on Win32.
-
- int signal_number (void) const;
- // No-op. Returns 0.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor's completion port.
-
-protected:
- ACE_WIN32_Asynch_Accept_Result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Accept factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // ACE_Proactor will call this method when the accept completes.
-
- virtual ~ACE_WIN32_Asynch_Accept_Result (void);
- // Destructor.
-
- u_long bytes_to_read_;
- // Bytes requested when the asynchronous read was initiated.
-
- ACE_Message_Block &message_block_;
- // Message block for reading the data into.
-
- ACE_HANDLE listen_handle_;
- // I/O handle used for accepting new connections.
-
- ACE_HANDLE accept_handle_;
- // I/O handle for the new connection.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Accept : public virtual ACE_Asynch_Accept_Impl,
- public ACE_WIN32_Asynch_Operation
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous accepts
- // on a listen handle.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <accept>s can
- // started using this class. A ACE_Asynch_Accept::Result will
- // be passed back to the <handler> when the asynchronous accept
- // completes through the <ACE_Handler::handle_accept>
- // callback.
-
-public:
- ACE_WIN32_Asynch_Accept (ACE_WIN32_Proactor *win32_proactor);
- // Constructor.
-
- int accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous accept. The asynchronous accept
- // call also allows any initial data to be returned to the
- // <handler>. Upto <bytes_to_read> will be read and stored in the
- // <message_block>. The <accept_handle> will be used for the
- // <accept> call. If (<accept_handle> == INVALID_HANDLE), a new
- // handle will be created.
- //
- // <message_block> must be specified. This is because the address of
- // the new connection is placed at the end of this buffer.
-
- ~ACE_WIN32_Asynch_Accept (void);
- // Destructor.
-
- // Methods belong to ACE_WIN32_Asynch_Operation base class. These
- // methods are defined here to avoid VC++ warnings. They route the
- // call to the ACE_WIN32_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- // This cancels all pending accepts operations that were issued by
- // the calling thread. The function does not cancel asynchronous
- // operations issued by other threads.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Transmit_File_Result : public virtual ACE_Asynch_Transmit_File_Result_Impl,
- public ACE_WIN32_Asynch_Result
-{
- // = TITLE
- //
- // This class implements ACE_Asynch_Transmit_File::Result for
- // WIN32 platforms.
- //
- // = DESCRIPTION
- //
- // This class has all the information necessary for the
- // <handler> to uniquiely identify the completion of the
- // asynchronous transmit file.
-
- friend class ACE_WIN32_Asynch_Transmit_File;
- // Factory class will have special permission.
-
- friend class ACE_WIN32_Proactor;
- // Proactor class has special permission.
-
-public:
- ACE_HANDLE socket (void) const;
- // Socket used for transmitting the file.
-
- ACE_HANDLE file (void) const;
- // File from which the data is read.
-
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer (void) const;
- // Header and trailer data associated with this transmit file.
-
- u_long bytes_to_write (void) const;
- // The number of bytes which were requested at the start of the
- // asynchronous transmit file.
-
- u_long bytes_per_send (void) const;
- // Number of bytes per send requested at the start of the transmit
- // file.
-
- u_long flags (void) const;
- // Flags which were passed into transmit file.
-
- // Base class operations. These operations are here to kill some
- // warnings. These methods call the base class methods.
-
- u_long bytes_transferred (void) const;
- // Number of bytes transferred by the operation.
-
- const void *act (void) const;
- // ACT associated with the operation.
-
- int success (void) const;
- // Did the operation succeed?
-
- const void *completion_key (void) const;
- // This returns the ACT associated with the handle when it was
- // registered with the I/O completion port. This ACT is not the
- // same as the ACT associated with the asynchronous operation.
-
- u_long error (void) const;
- // Error value if the operation fail.
-
- ACE_HANDLE event (void) const;
- // Event associated with the OVERLAPPED structure.
-
- u_long offset (void) const;
- // This really make sense only when doing file I/O.
-
- u_long offset_high (void) const;
- // Offset_high associated with the OVERLAPPED structure.
-
- int priority (void) const;
- // The priority of the asynchronous operation. Currently, this is
- // not supported on Win32.
-
- int signal_number (void) const;
- // No-op. Returns 0.
-
- int post_completion (ACE_Proactor_Impl *proactor);
- // Post <this> to the Proactor's completion port.
-
-protected:
- ACE_WIN32_Asynch_Transmit_File_Result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
- // Constructor is protected since creation is limited to
- // ACE_Asynch_Transmit_File factory.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // Proactor will call this method when the write completes.
-
- virtual ~ACE_WIN32_Asynch_Transmit_File_Result (void);
- // Destructor.
-
- ACE_HANDLE socket_;
- // Network I/O handle.
-
- ACE_HANDLE file_;
- // File I/O handle.
-
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer_;
- // Header and trailer data associated with this transmit file.
-
- u_long bytes_to_write_;
- // The number of bytes which were requested at the start of the
- // asynchronous transmit file.
-
- u_long bytes_per_send_;
- // Number of bytes per send requested at the start of the transmit
- // file.
-
- u_long flags_;
- // Flags which were passed into transmit file.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Transmit_File : public virtual ACE_Asynch_Transmit_File_Impl,
- public ACE_WIN32_Asynch_Operation
-{
- // = TITLE
- //
- // This class is a factory for starting off asynchronous
- // transmit files on a stream.
- //
- // = DESCRIPTION
- //
- // Once <open> is called, multiple asynchronous <transmit_file>s
- // can started using this class. A
- // ACE_Asynch_Transmit_File::Result will be passed back to the
- // <handler> when the asynchronous transmit file completes
- // through the <ACE_Handler::handle_transmit_file> callback.
- //
- // The transmit_file function transmits file data over a
- // connected network connection. The function uses the operating
- // system's cache manager to retrieve the file data. This
- // function provides high-performance file data transfer over
- // network connections. This function would be of great use in
- // a Web Server, Image Server, etc.
-
-public:
- ACE_WIN32_Asynch_Transmit_File (ACE_WIN32_Proactor *win32_proactor);
- // Constructor.
-
- int transmit_file (ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- int priority,
- int signal_number = 0);
- // This starts off an asynchronous transmit file. The <file> is a
- // handle to an open file. <header_and_trailer> is a pointer to a
- // data structure that contains pointers to data to send before and
- // after the file data is sent. Set this parameter to 0 if you only
- // want to transmit the file data. Upto <bytes_to_write> will be
- // written to the <socket>. If you want to send the entire file,
- // let <bytes_to_write> = 0. <bytes_per_send> is the size of each
- // block of data sent per send operation. Please read the Win32
- // documentation on what the flags should be.
-
- ~ACE_WIN32_Asynch_Transmit_File (void);
- // Destructor.
-
- // Methods belong to ACE_WIN32_Asynch_Operation base class. These
- // methods are defined here to avoid VC++ warnings. They route the
- // call to the ACE_WIN32_Asynch_Operation base class.
-
- int open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor);
- // Initializes the factory with information which will be used with
- // each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
- // <ACE_Handler::handle> will be called on the <handler> to get the
- // correct handle.
-
- int cancel (void);
- // This cancels all pending accepts operations that were issued by
- // the calling thread. The function does not cancel asynchronous
- // operations issued by other threads.
-
- ACE_Proactor* proactor (void) const;
- // Return the underlying proactor.
-};
-
-#endif /* ACE_WIN32 && !ACE_HAS_WINCE */
-#include "ace/post.h"
-#endif /* ACE_WIN32_ASYNCH_IO_H */
diff --git a/ace/WIN32_Proactor.cpp b/ace/WIN32_Proactor.cpp
deleted file mode 100644
index 846bf1571ac..00000000000
--- a/ace/WIN32_Proactor.cpp
+++ /dev/null
@@ -1,603 +0,0 @@
-// $Id$
-
-// ACE_RCSID(ace, Proactor, "$Id$")
-
-#include "ace/WIN32_Proactor.h"
-
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
-// WIN implemenatation of the Proactor.
-
-#include "ace/Log_Msg.h"
-#include "ace/Object_Manager.h"
-
-class ACE_Export ACE_WIN32_Wakeup_Completion : public ACE_WIN32_Asynch_Result
-{
- // = TITLE
- // This is result object is used by the <end_event_loop> of the
- // ACE_Proactor interface to wake up all the threads blocking
- // for completions.
-
-public:
- ACE_WIN32_Wakeup_Completion (ACE_Handler &handler,
- const void *act = 0,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = ACE_SIGRTMIN);
- // Constructor.
-
- virtual ~ACE_WIN32_Wakeup_Completion (void);
- // Destructor.
-
-
- virtual void complete (u_long bytes_transferred = 0,
- int success = 1,
- const void *completion_key = 0,
- u_long error = 0);
- // This method calls the <handler>'s <handle_wakeup> method.
-};
-
-ACE_WIN32_Proactor::ACE_WIN32_Proactor (size_t number_of_threads,
- int used_with_reactor_event_loop)
- : completion_port_ (0),
- // This *MUST* be 0, *NOT* ACE_INVALID_HANDLE !!!
- number_of_threads_ (number_of_threads),
- used_with_reactor_event_loop_ (used_with_reactor_event_loop)
-{
- // Create the completion port.
- this->completion_port_ = ::CreateIoCompletionPort (INVALID_HANDLE_VALUE,
- 0,
- 0,
- this->number_of_threads_);
- if (this->completion_port_ == 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("CreateIoCompletionPort")));
-}
-
-ACE_WIN32_Proactor::~ACE_WIN32_Proactor (void)
-{
- this->close ();
-}
-
-int
-ACE_WIN32_Proactor::close (void)
-{
- // Close the completion port
- if (this->completion_port_ != 0)
- {
- int result = ACE_OS::close (this->completion_port_);
- this->completion_port_ = 0;
- return result;
- }
-
- return 0;
-}
-
-int
-ACE_WIN32_Proactor::register_handle (ACE_HANDLE handle,
- const void *completion_key)
-{
- // No locking is needed here as no state changes.
- ACE_HANDLE cp = ::CreateIoCompletionPort (handle,
- this->completion_port_,
- (u_long) completion_key,
- this->number_of_threads_);
- if (cp == 0)
- {
- ACE_OS::set_errno_to_last_error ();
- // If errno == ERROR_INVALID_PARAMETER, then this handle was
- // already registered.
- if (errno != ERROR_INVALID_PARAMETER)
- {
- if (ACE::debug ())
- {
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("CreateIoCompletionPort")));
- }
- return -1;
- }
- }
- return 0;
-}
-
-ACE_Asynch_Read_Stream_Impl *
-ACE_WIN32_Proactor::create_asynch_read_stream (void)
-{
- ACE_Asynch_Read_Stream_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Read_Stream (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Write_Stream_Impl *
-ACE_WIN32_Proactor::create_asynch_write_stream (void)
-{
- ACE_Asynch_Write_Stream_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Write_Stream (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Read_File_Impl *
-ACE_WIN32_Proactor::create_asynch_read_file (void)
-{
- ACE_Asynch_Read_File_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Read_File (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Write_File_Impl *
-ACE_WIN32_Proactor::create_asynch_write_file (void)
-{
- ACE_Asynch_Write_File_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Write_File (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Accept_Impl *
-ACE_WIN32_Proactor::create_asynch_accept (void)
-{
- ACE_Asynch_Accept_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Accept (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Transmit_File_Impl *
-ACE_WIN32_Proactor::create_asynch_transmit_file (void)
-{
- ACE_Asynch_Transmit_File_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Transmit_File (this),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Read_Stream_Result_Impl *
-ACE_WIN32_Proactor::create_asynch_read_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Read_Stream_Result_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Read_Stream_Result (handler,
- handle,
- message_block,
- bytes_to_read,
- act,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Write_Stream_Result_Impl *
-ACE_WIN32_Proactor::create_asynch_write_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Write_Stream_Result_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Write_Stream_Result (handler,
- handle,
- message_block,
- bytes_to_write,
- act,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Read_File_Result_Impl *
-ACE_WIN32_Proactor::create_asynch_read_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Read_File_Result_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Read_File_Result (handler,
- handle,
- message_block,
- bytes_to_read,
- act,
- offset,
- offset_high,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Write_File_Result_Impl *
-ACE_WIN32_Proactor::create_asynch_write_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Write_File_Result_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Write_File_Result (handler,
- handle,
- message_block,
- bytes_to_write,
- act,
- offset,
- offset_high,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Accept_Result_Impl *
-ACE_WIN32_Proactor::create_asynch_accept_result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Accept_Result_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Accept_Result (handler,
- listen_handle,
- accept_handle,
- message_block,
- bytes_to_read,
- act,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Transmit_File_Result_Impl *
-ACE_WIN32_Proactor::create_asynch_transmit_file_result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Transmit_File_Result_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Transmit_File_Result (handler,
- socket,
- file,
- header_and_trailer,
- bytes_to_write,
- offset,
- offset_high,
- bytes_per_send,
- flags,
- act,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-ACE_Asynch_Result_Impl *
-ACE_WIN32_Proactor::create_asynch_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event,
- int priority,
- int signal_number)
-{
- ACE_Asynch_Result_Impl *implementation = 0;
- ACE_NEW_RETURN (implementation,
- ACE_WIN32_Asynch_Timer (handler,
- act,
- tv,
- event,
- priority,
- signal_number),
- 0);
- return implementation;
-}
-
-int
-ACE_WIN32_Proactor::handle_signal (int, siginfo_t *, ucontext_t *)
-{
- // Perform a non-blocking "poll" for all the I/O events that have
- // completed in the I/O completion queue.
-
- int result = 0;
-
- for (ACE_Time_Value timeout (0, 0);
- ;
- )
- {
- result = this->handle_events (timeout);
-
- if (result != 0 || errno == ETIME)
- break;
- }
-
- // If our handle_events failed, we'll report a failure to the
- // Reactor.
- return result == -1 ? -1 : 0;
-}
-
-int
-ACE_WIN32_Proactor::handle_close (ACE_HANDLE handle,
- ACE_Reactor_Mask close_mask)
-{
- ACE_UNUSED_ARG (close_mask);
- ACE_UNUSED_ARG (handle);
-
- return this->close ();
-}
-
-ACE_HANDLE
-ACE_WIN32_Proactor::get_handle (void) const
-{
- if (this->used_with_reactor_event_loop_)
- return this->event_.handle ();
- else
- return 0;
-}
-
-int
-ACE_WIN32_Proactor::handle_events (ACE_Time_Value &wait_time)
-{
- // Decrement <wait_time> with the amount of time spent in the method
- ACE_Countdown_Time countdown (&wait_time);
- return this->handle_events (wait_time.msec ());
-}
-
-int
-ACE_WIN32_Proactor::handle_events (void)
-{
- return this->handle_events (ACE_INFINITE);
-}
-
-int
-ACE_WIN32_Proactor::handle_events (unsigned long milli_seconds)
-{
- ACE_OVERLAPPED *overlapped = 0;
- u_long bytes_transferred = 0;
- u_long completion_key = 0;
-
- // Get the next asynchronous operation that completes
- BOOL result = ::GetQueuedCompletionStatus (this->completion_port_,
- &bytes_transferred,
- &completion_key,
- &overlapped,
- milli_seconds);
- if (result == FALSE && overlapped == 0)
- {
- ACE_OS::set_errno_to_last_error ();
-
- if (errno == WAIT_TIMEOUT)
- {
- errno = ETIME;
- return 0;
- }
- else
- {
- if (ACE::debug ())
- {
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("GetQueuedCompletionStatus")));
- }
- return -1;
- }
- }
- else
- {
- // Narrow the result.
- ACE_WIN32_Asynch_Result *asynch_result = (ACE_WIN32_Asynch_Result *) overlapped;
-
- // If errors happen, grab the error.
- if (result == FALSE)
- ACE_OS::set_errno_to_last_error ();
- else
- errno = 0;
-
- this->application_specific_code (asynch_result,
- bytes_transferred,
- result,
- (void *) completion_key,
- errno);
- }
- return 1;
-}
-
-void
-ACE_WIN32_Proactor::application_specific_code (ACE_WIN32_Asynch_Result *asynch_result,
- u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- ACE_SEH_TRY
- {
- // Call completion hook
- asynch_result->complete (bytes_transferred,
- success,
- (void *) completion_key,
- error);
- }
- ACE_SEH_FINALLY
- {
- // This is crucial to prevent memory leaks
- delete asynch_result;
- }
-}
-
-int
-ACE_WIN32_Proactor::post_completion (ACE_WIN32_Asynch_Result *result)
-{
- // Grab the event associated with the Proactor
- HANDLE handle = this->get_handle ();
-
- // If Proactor event is valid, signal it
- if (handle != ACE_INVALID_HANDLE &&
- handle != 0)
- ACE_OS::event_signal (&handle);
-
- // Post a completion
- if (::PostQueuedCompletionStatus (this->completion_port_, // completion port
- 0, // number of bytes tranferred
- 0, // completion key
- result // overlapped
- ) == FALSE)
- {
- delete result;
-
- if (ACE::debug ())
- {
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("PostQueuedCompletionStatus failed")));
- }
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_WIN32_Proactor::post_wakeup_completions (int how_many)
-{
- ACE_WIN32_Wakeup_Completion *wakeup_completion = 0;
-
- for (ssize_t ci = 0; ci < how_many; ci++)
- {
- ACE_NEW_RETURN (wakeup_completion,
- ACE_WIN32_Wakeup_Completion (this->wakeup_handler_),
- -1);
-
- if (wakeup_completion->post_completion (this) == -1)
- return -1;
- }
-
- return 0;
-}
-
-int
-ACE_WIN32_Proactor::wake_up_dispatch_threads (void)
-{
- return 0;
-}
-
-int
-ACE_WIN32_Proactor::close_dispatch_threads (int)
-{
- return 0;
-}
-
-size_t
-ACE_WIN32_Proactor::number_of_threads (void) const
-{
- return this->number_of_threads_;
-}
-
-void
-ACE_WIN32_Proactor::number_of_threads (size_t threads)
-{
- this->number_of_threads_ = threads;
-}
-
-ACE_WIN32_Asynch_Timer::ACE_WIN32_Asynch_Timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_WIN32_Asynch_Result (handler, act, event, 0, 0, priority,
- signal_number),
- time_ (tv)
-{
-}
-
-void
-ACE_WIN32_Asynch_Timer::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
-{
- ACE_UNUSED_ARG (error);
- ACE_UNUSED_ARG (completion_key);
- ACE_UNUSED_ARG (success);
- ACE_UNUSED_ARG (bytes_transferred);
-
- this->handler_.handle_time_out (this->time_, this->act ());
-}
-
-ACE_WIN32_Wakeup_Completion::ACE_WIN32_Wakeup_Completion (ACE_Handler &handler,
- const void *act,
- ACE_HANDLE event,
- int priority,
- int signal_number)
- : ACE_Asynch_Result_Impl (),
- ACE_WIN32_Asynch_Result (handler, act, event, 0, 0, priority, signal_number)
-{
-}
-
-ACE_WIN32_Wakeup_Completion::~ACE_WIN32_Wakeup_Completion (void)
-{
-}
-
-void
-ACE_WIN32_Wakeup_Completion::complete (u_long /* bytes_transferred */,
- int /* success */,
- const void * /* completion_key */,
- u_long /* error */)
-{
- this->handler_.handle_wakeup ();
-}
-
-#endif /* ACE_WIN32 */
diff --git a/ace/WIN32_Proactor.h b/ace/WIN32_Proactor.h
deleted file mode 100644
index 5170f5129cf..00000000000
--- a/ace/WIN32_Proactor.h
+++ /dev/null
@@ -1,264 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// WIN_Proactor.h
-//
-// = AUTHOR
-// Irfan Pyarali (irfan@cs.wustl.edu),
-// Tim Harrison (harrison@cs.wustl.edu) and
-// Alexander Babu Arulanthu <alex@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_WIN32_PROACTOR_H
-#define ACE_WIN32_PROACTOR_H
-#include "ace/pre.h"
-
-#include "ace/OS.h"
-#include "ace/WIN32_Asynch_IO.h"
-#include "ace/Event_Handler.h"
-
-#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
-// WIN32 implementation of the Proactor.
-
-#include "ace/Proactor_Impl.h"
-
-// Forward declarations.
-class ACE_WIN32_Asynch_Result;
-class ACE_WIN32_Proactor_Timer_Handler;
-
-class ACE_Export ACE_WIN32_Proactor : public ACE_Proactor_Impl
-{
- // = TITLE
- // A manager for asynchronous event demultiplexing.
- //
- // = DESCRIPTION
- // See the Proactor pattern description at
- // http://www.cs.wustl.edu/~schmidt/proactor.ps.gz for more
- // details.
-public:
- ACE_WIN32_Proactor (size_t number_of_threads = 0,
- int used_with_reactor_event_loop = 0);
- // A do nothing constructor.
-
- virtual ~ACE_WIN32_Proactor (void);
- // Virtual destruction.
-
- virtual int close (void);
- // Close the IO completion port.
-
- virtual int register_handle (ACE_HANDLE handle,
- const void *completion_key);
- // This method adds the <handle> to the I/O completion port. This
- // function is a no-op function for Unix systems.
-
- virtual int handle_events (ACE_Time_Value &wait_time);
- // Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return 0. Return 1 on success i.e., when a
- // completion is dispatched, non-zero (-1) on errors and errno is
- // set accordingly.
-
- virtual int handle_events (void);
- // Block indefinitely until at least one event is dispatched.
- // Dispatch a single set of events. If <wait_time> elapses before
- // any events occur, return 0. Return 1 on success i.e., when a
- // completion is dispatched, non-zero (-1) on errors and errno is
- // set accordingly.
-
- virtual int post_completion (ACE_WIN32_Asynch_Result *result);
- // Post a result to the completion port of the Proactor. If errors
- // occur, the result will be deleted by this method. If successful,
- // the result will be deleted by the Proactor when the result is
- // removed from the completion port. Therefore, the result should
- // have been dynamically allocated and should be orphaned by the
- // user once this method is called.
-
- int wake_up_dispatch_threads (void);
- // Add wakeup dispatch threads (reinit).
-
- int close_dispatch_threads (int wait);
- // Close all dispatch threads.
-
- size_t number_of_threads (void) const;
- void number_of_threads (size_t threads);
- // Number of thread used as a parameter to CreatIoCompletionPort.
-
- virtual ACE_HANDLE get_handle (void) const;
- // Get the event handle.
-
- virtual ACE_Asynch_Read_Stream_Impl *create_asynch_read_stream (void);
-
- virtual ACE_Asynch_Write_Stream_Impl *create_asynch_write_stream (void);
-
- virtual ACE_Asynch_Read_File_Impl *create_asynch_read_file (void);
-
- virtual ACE_Asynch_Write_File_Impl *create_asynch_write_file (void);
-
- virtual ACE_Asynch_Accept_Impl *create_asynch_accept (void);
-
- virtual ACE_Asynch_Transmit_File_Impl *create_asynch_transmit_file (void);
-
- // Methods used to create Asynch_IO_Result objects. We create the right
- // objects here in these methods.
-
- virtual ACE_Asynch_Read_Stream_Result_Impl *create_asynch_read_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
-
- virtual ACE_Asynch_Write_Stream_Result_Impl *create_asynch_write_stream_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
-
- virtual ACE_Asynch_Read_File_Result_Impl *create_asynch_read_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
-
- virtual ACE_Asynch_Write_File_Result_Impl *create_asynch_write_file_result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
-
- virtual ACE_Asynch_Accept_Result_Impl *create_asynch_accept_result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
-
- virtual ACE_Asynch_Transmit_File_Result_Impl *create_asynch_transmit_file_result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
-
- virtual ACE_Asynch_Result_Impl *create_asynch_timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event,
- int priority,
- int signal_number = 0);
- // Create a timer result object which can be used with the Timer
- // mechanism of the Proactor.
-
-protected:
- virtual int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0);
- // Called when object is signaled by OS (either via UNIX signals or
- // when a Win32 object becomes signaled).
-
- virtual int handle_close (ACE_HANDLE handle,
- ACE_Reactor_Mask close_mask);
- // Called when object is removed from the ACE_Reactor.
-
- virtual int handle_events (unsigned long milli_seconds);
- // Dispatch a single set of events. If <milli_seconds> elapses
- // before any events occur, return 0. Return 1 if a completion is
- // dispatched. Return -1 on errors.
-
- void application_specific_code (ACE_WIN32_Asynch_Result *asynch_result,
- u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error);
- // Protect against structured exceptions caused by user code when
- // dispatching handles.
-
- virtual int post_wakeup_completions (int how_many);
- // Post <how_many> completions to the completion port so that all
- // threads can wake up. This is used in conjunction with the
- // <run_event_loop>.
-
- ACE_HANDLE completion_port_;
- // Handle for the completion port. Unix doesnt have completion
- // ports.
-
- size_t number_of_threads_;
- // This number is passed to the <CreatIOCompletionPort> system
- // call.
-
- ACE_Auto_Event event_;
- // This event is used in conjunction with Reactor when we try to
- // integrate the event loops of Reactor and the Proactor.
-
- int used_with_reactor_event_loop_;
- // Flag that indicates whether we are used in conjunction with
- // Reactor.
-
- ACE_Handler wakeup_handler_;
- // Handler to handle the wakeups. This works in conjunction with the
- // <ACE_Proactor::run_event_loop>.
-};
-
-class ACE_Export ACE_WIN32_Asynch_Timer : public ACE_WIN32_Asynch_Result
-{
- // = TITLE
- // This class is posted to the completion port when a timer
- // expires. When the complete method of this object is
- // called, the <handler>'s handle_timeout method will be
- // called.
-
- friend class ACE_WIN32_Proactor;
- // The factory method for this class is with the POSIX_Proactor
- // class.
-
-protected:
- ACE_WIN32_Asynch_Timer (ACE_Handler &handler,
- const void *act,
- const ACE_Time_Value &tv,
- ACE_HANDLE event = ACE_INVALID_HANDLE,
- int priority = 0,
- int signal_number = 0);
- // Constructor.
-
- virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error = 0);
- // This method calls the <handler>'s handle_timeout method.
-
- ACE_Time_Value time_;
- // Time value requested by caller
-};
-
-#endif /* ACE_WIN32 */
-#include "ace/post.h"
-#endif /* ACE_PROACTOR_H */
diff --git a/ace/XTI_ATM_Mcast.cpp b/ace/XTI_ATM_Mcast.cpp
deleted file mode 100644
index 0892672635e..00000000000
--- a/ace/XTI_ATM_Mcast.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// XTI_ATM_Mcast.cpp
-// $Id$
-
-#include "ace/XTI_ATM_Mcast.h"
-
-ACE_RCSID(ace, XTI_ATM_Mcast, "$Id$")
-
-#if defined (ACE_HAS_XTI_ATM)
-
-#if !defined (__ACE_INLINE__)
-#include "ace/XTI_ATM_Mcast.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_ALLOC_HOOK_DEFINE(ACE_XTI_ATM_Mcast)
-
-void
-ACE_XTI_ATM_Mcast::dump (void) const
-{
- ACE_TRACE ("ACE_XTI_ATM_Mcast::dump");
-}
-
-ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast (void)
-{
- ACE_TRACE ("ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast");
-}
-
-// Add a leaf to the current connection (i.e., multicast).
-
-int
-ACE_XTI_ATM_Mcast::add_leaf (ACE_TLI_Stream &current_stream,
- const ACE_Addr &remote_sap,
- ACE_INT32 leaf_id,
- ACE_Time_Value *timeout)
-{
- ACE_TRACE ("ACE_XTI_ATM_Mcast::add_leaf");
-
- struct netbuf call_req;
- memset(&call_req, 0, sizeof(call_req));
- call_req.len = remote_sap.get_size ();
- call_req.buf = (char *)remote_sap.get_addr ();
-
- if (::t_addleaf(current_stream.get_handle(),
- leaf_id,
- &call_req) < 0)
- {
- // Check for asynchronous event
- if (t_errno == TLOOK)
- {
- int event;
- event = ACE_OS::t_look(current_stream.get_handle());
- if (event != TNODATA && event != T_DATA)
- return -1;
- else
- // If this doesn't work for asynchronous calls we need to call
- // the XTI/ATM t_rcvleafchange() function to check for t_addleaf
- // completion.
- return complete (current_stream, 0, timeout);
- }
- else
- return -1;
- }
-
- return 0;
-}
-
-#endif /* ACE_HAS_XTI_ATM */
diff --git a/ace/XTI_ATM_Mcast.h b/ace/XTI_ATM_Mcast.h
deleted file mode 100644
index d7589668055..00000000000
--- a/ace/XTI_ATM_Mcast.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// XTI_ATM_Mcast.h
-//
-// = AUTHOR
-// Joe Hoffert
-//
-// ============================================================================
-
-#ifndef ACE_XTI_ATM_MCAST_H
-#define ACE_XTI_ATM_MCAST_H
-#include "ace/pre.h"
-
-#include "ace/TLI_Connector.h"
-#include "ace/ATM_Addr.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_XTI_ATM)
-
-class ACE_Export ACE_XTI_ATM_Mcast : public ACE_TLI_Connector
-{
- // = TITLE
- // Defines an active connection factory for the ACE_TLI C++
- // wrappers to support XTI/ATM multicast.
-public:
- // = Initialization methods.
- ACE_XTI_ATM_Mcast (void);
- // Default constructor.
-
- ACE_XTI_ATM_Mcast (ACE_TLI_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0,
- const char device[] = ACE_XTI_ATM_DEVICE,
- struct t_info *info = 0,
- int rw_flag = 1,
- struct netbuf *udata = 0,
- struct netbuf *opt = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- int connect (ACE_TLI_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout = 0,
- const ACE_Addr &local_sap = ACE_Addr::sap_any,
- int reuse_addr = 0,
- int flags = O_RDWR,
- int perms = 0,
- const char device[] = ACE_XTI_ATM_DEVICE,
- struct t_info *info = 0,
- int rw_flag = 1,
- struct netbuf *udata = 0,
- struct netbuf *opt = 0);
- // Actively connect and produce a <new_stream> if things go well.
- // The <remote_sap> is the address that we are trying to connect
- // with. The <timeout> is the amount of time to wait to connect.
- // If it's 0 then we block indefinitely. If *timeout == {0, 0} then
- // the connection is done using non-blocking mode. In this case, if
- // the connection can't be made immediately the value of -1 is
- // returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then
- // this is the amount of time to wait before timing out. If the
- // time expires before the connection is made <errno == ETIME>. The
- // <local_sap> is the value of local address to bind to. If it's
- // the default value of <ACE_Addr::sap_any> then the user is letting
- // the OS do the binding. If <reuse_addr> == 1 then the
- // <local_addr> is reused, even if it hasn't been cleanedup yet.
-
- int add_leaf (ACE_TLI_Stream &current_stream,
- const ACE_Addr &remote_sap,
- ACE_INT32 leaf_id,
- ACE_Time_Value *timeout = 0);
- // Actively add a leaf to the currently connected stream (i.e.,
- // multicast). The <remote_sap> is the address of the leaf that we
- // are trying to add. The <timeout> is the amount of time to wait to
- // connect. If it's 0 then we block indefinitely. If *timeout ==
- // {0, 0} then the connection is done using non-blocking mode. In
- // this case, if the connection can't be made immediately the value
- // of -1 is returned with <errno == EWOULDBLOCK>. If *timeout >
- // {0, 0} then this is the amount of time to wait before timing out.
- // If the time expires before the connection is made <errno == ETIME>.
-
- // = Meta-type info
- typedef ACE_ATM_Addr PEER_ADDR;
- typedef ACE_TLI_Stream PEER_STREAM;
-
- void dump (void) const;
- // Dump the state of an object.
-
- ACE_ALLOC_HOOK_DECLARE;
- // Declare the dynamic allocation hooks.
-};
-
-#if defined (__ACE_INLINE__)
-#include "ace/XTI_ATM_Mcast.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* ACE_HAS_XTI_ATM */
-#include "ace/post.h"
-#endif /* ACE_XTI_ATM_MCAST_H */
diff --git a/ace/XTI_ATM_Mcast.i b/ace/XTI_ATM_Mcast.i
deleted file mode 100644
index 93c22ac15c9..00000000000
--- a/ace/XTI_ATM_Mcast.i
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// XTI_ATM_Mcast.i
-
-ACE_INLINE
-ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast (ACE_TLI_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- const char device[],
- struct t_info *info,
- int rwf,
- netbuf *udata,
- netbuf *opt)
-{
- ACE_TRACE ("ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast");
- if (this->connect (new_stream, remote_sap, timeout, local_sap, reuse_addr,
- flags, perms, device,
- info, rwf,
- udata, opt) == ACE_INVALID_HANDLE
- && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
- ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_TLI_Stream::ACE_TLI_Stream")));
-}
-
-// Connect the <new_stream> to the <remote_sap>, waiting up to
-// <timeout> amount of time if necessary. This is simple a pass-
-// through function to ACE_TLI_Connector::connect(). It is over-
-// ridden to change the default device from TCP to XTI/ATM.
-
-ACE_INLINE
-int
-ACE_XTI_ATM_Mcast::connect (ACE_TLI_Stream &new_stream,
- const ACE_Addr &remote_sap,
- ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
- int flags,
- int perms,
- const char device[],
- struct t_info *info,
- int rw_flag,
- netbuf *udata,
- netbuf *opt)
-{
- ACE_TRACE ("ACE_XTI_ATM_Mcast::connect");
- return ACE_TLI_Connector::connect(new_stream,
- remote_sap,
- timeout,
- local_sap,
- reuse_addr,
- flags,
- perms,
- device,
- info,
- rw_flag,
- udata,
- opt);
-}
diff --git a/ace/XtReactor.cpp b/ace/XtReactor.cpp
deleted file mode 100644
index 5808026d872..00000000000
--- a/ace/XtReactor.cpp
+++ /dev/null
@@ -1,450 +0,0 @@
-// $Id$
-
-#include "ace/Synch_T.h"
-#include "ace/SOCK_Acceptor.h"
-#include "ace/SOCK_Connector.h"
-#include "ace/XtReactor.h"
-
-ACE_RCSID(ace, XtReactor, "$Id$")
-
-#if defined (ACE_HAS_XT)
-
-ACE_ALLOC_HOOK_DEFINE (ACE_XtReactor)
-
-// Must be called with lock held
-ACE_XtReactor::ACE_XtReactor (XtAppContext context,
- size_t size,
- int restart,
- ACE_Sig_Handler *h)
- : ACE_Select_Reactor (size, restart, h),
- context_ (context),
- ids_ (0),
- timeout_ (0)
-{
- // When the ACE_Select_Reactor is constructed it creates the notify
- // pipe and registers it with the register_handler_i() method. The
- // XtReactor overloads this method BUT because the
- // register_handler_i occurs when constructing the base class
- // ACE_Select_Reactor, the ACE_Select_Reactor register_handler_i()
- // is called not the XtReactor register_handler_i(). This means
- // that the notify pipe is registered with the ACE_Select_Reactor
- // event handling code not the XtReactor and so notfications don't
- // work. To get around this we simply close and re-opened the
- // notification handler in the constructor of the XtReactor.
-
-#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
- this->notify_handler_->close ();
- this->notify_handler_->open (this, 0);
-#endif /* ACE_MT_SAFE */
-}
-
-ACE_XtReactor::~ACE_XtReactor (void)
-{
- // Delete the remaining items in the linked list.
-
- while (this->ids_)
- {
- ACE_XtReactorID *XtID = this->ids_->next_;
- delete this->ids_;
- this->ids_ = XtID;
- }
-}
-
-// This is just the <wait_for_multiple_events> from ace/Reactor.cpp
-// but we use the Xt functions to wait for an event, not <select>
-
-int
-ACE_XtReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set,
- ACE_Time_Value *max_wait_time)
-{
- ACE_TRACE ("ACE_XtReactor::wait_for_multiple_events");
- int nfound;
-
- do
- {
- max_wait_time = this->timer_queue_->calculate_timeout (max_wait_time);
-
- size_t width = this->handler_rep_.max_handlep1 ();
- handle_set.rd_mask_ = this->wait_set_.rd_mask_;
- handle_set.wr_mask_ = this->wait_set_.wr_mask_;
- handle_set.ex_mask_ = this->wait_set_.ex_mask_;
- nfound = XtWaitForMultipleEvents (width,
- handle_set,
- max_wait_time);
-
- } while (nfound == -1 && this->handle_error () > 0);
-
- if (nfound > 0)
- {
-#if !defined (ACE_WIN32)
- handle_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ());
- handle_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ());
- handle_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ());
-#endif /* ACE_WIN32 */
- }
- return nfound; // Timed out or input available
-}
-
-void
-ACE_XtReactor::TimerCallbackProc (XtPointer closure, XtIntervalId * /* id */)
-{
- ACE_XtReactor *self = (ACE_XtReactor *) closure;
- self->timeout_ = 0;
-
- // Deal with any timer events
- ACE_Select_Reactor_Handle_Set handle_set;
- self->dispatch (0, handle_set);
- self->reset_timeout ();
-}
-
-// This could be made shorter if we know which *kind* of event we were
-// about to get. Here we use <select> to find out which one might be
-// available.
-
-void
-ACE_XtReactor::InputCallbackProc (XtPointer closure,
- int *source,
- XtInputId *)
-{
- ACE_XtReactor *self = (ACE_XtReactor *) closure;
- ACE_HANDLE handle = (ACE_HANDLE) *source;
-
- // my copy isn't const.
- ACE_Time_Value zero = ACE_Time_Value::zero;
-
- ACE_Select_Reactor_Handle_Set wait_set;
-
- // Deal with one file event.
-
- // - read which kind of event
- if (self->wait_set_.rd_mask_.is_set (handle))
- wait_set.rd_mask_.set_bit (handle);
- if (self->wait_set_.wr_mask_.is_set (handle))
- wait_set.wr_mask_.set_bit (handle);
- if (self->wait_set_.ex_mask_.is_set (handle))
- wait_set.ex_mask_.set_bit (handle);
-
- int result = ACE_OS::select (*source + 1,
- wait_set.rd_mask_,
- wait_set.wr_mask_,
- wait_set.ex_mask_, &zero);
-
- ACE_Select_Reactor_Handle_Set dispatch_set;
-
- // - Use only that one file event (removes events for other files).
- if (result > 0)
- {
- if (wait_set.rd_mask_.is_set (handle))
- dispatch_set.rd_mask_.set_bit (handle);
- if (wait_set.wr_mask_.is_set (handle))
- dispatch_set.wr_mask_.set_bit (handle);
- if (wait_set.ex_mask_.is_set (handle))
- dispatch_set.ex_mask_.set_bit (handle);
-
- self->dispatch (1, dispatch_set);
- }
-}
-
-int
-ACE_XtReactor::XtWaitForMultipleEvents (int width,
- ACE_Select_Reactor_Handle_Set &wait_set,
- ACE_Time_Value *)
-{
- // Make sure we have a valid context
- ACE_ASSERT (this->context_ != 0);
-
- // Check to make sure our handle's are all usable.
- ACE_Select_Reactor_Handle_Set temp_set = wait_set;
-
- if (ACE_OS::select (width,
- temp_set.rd_mask_,
- temp_set.wr_mask_,
- temp_set.ex_mask_,
- (ACE_Time_Value *) &ACE_Time_Value::zero) == -1)
- return -1; // Bad file arguments...
-
- // Instead of waiting using <select>, just use the Xt mechanism to
- // wait for a single event.
-
- // Wait for something to happen.
- ::XtAppProcessEvent (this->context_, XtIMAll);
-
- // Reset the width, in case it changed during the upcalls.
- width = this->handler_rep_.max_handlep1 ();
-
- // Now actually read the result needed by the <Select_Reactor> using
- // <select>.
- return ACE_OS::select (width,
- wait_set.rd_mask_,
- wait_set.wr_mask_,
- wait_set.ex_mask_,
- (ACE_Time_Value *) &ACE_Time_Value::zero);
-}
-
-XtAppContext
-ACE_XtReactor::context (void) const
-{
- return this->context_;
-}
-
-void
-ACE_XtReactor::context (XtAppContext context)
-{
- this->context_ = context;
-}
-
-int
-ACE_XtReactor::register_handler_i (ACE_HANDLE handle,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_XtReactor::register_handler_i");
-
- // Make sure we have a valid context
- ACE_ASSERT (this->context_ != 0);
-
- int result = ACE_Select_Reactor::register_handler_i (handle,
- handler, mask);
- if (result == -1)
- return -1;
-
- int condition = 0;
-
-#if !defined ACE_WIN32
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK))
- ACE_SET_BITS (condition, XtInputReadMask);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::WRITE_MASK))
- ACE_SET_BITS (condition, XtInputWriteMask);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::EXCEPT_MASK))
- ACE_SET_BITS (condition, XtInputExceptMask);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::ACCEPT_MASK))
- ACE_SET_BITS (condition, XtInputReadMask);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK)){
- ACE_SET_BITS (condition, XtInputWriteMask); // connected, you may write
- ACE_SET_BITS (condition, XtInputReadMask); // connected, you have data/err
- }
-#else
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK))
- ACE_SET_BITS (condition, XtInputReadWinsock);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::WRITE_MASK))
- ACE_SET_BITS (condition, XtInputWriteWinsock);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::EXCEPT_MASK))
- ACE_NOTSUP_RETURN(-1);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::ACCEPT_MASK))
- ACE_SET_BITS (condition, XtInputReadWinsock);
- if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK)){
- ACE_SET_BITS (condition, XtInputWriteWinsock); // connected, you may write
- ACE_SET_BITS (condition, XtInputReadWinsock); // connected, you have data/err
- }
-#endif /* !ACE_WIN32 */
-
- if (condition != 0)
- {
- ACE_XtReactorID *XtID = this->ids_;
-
- while(XtID)
- {
- if (XtID->handle_ == handle)
- {
- ::XtRemoveInput (XtID->id_);
-
- XtID->id_ = ::XtAppAddInput (this->context_,
- (int) handle,
- (XtPointer) condition,
- InputCallbackProc,
- (XtPointer) this);
- return 0;
- }
- else
- XtID = XtID->next_;
- }
-
- ACE_NEW_RETURN (XtID,
- ACE_XtReactorID,
- -1);
- XtID->next_ = this->ids_;
- XtID->handle_ = handle;
- XtID->id_ = ::XtAppAddInput (this->context_,
- (int) handle,
- (XtPointer) condition,
- InputCallbackProc,
- (XtPointer) this);
- this->ids_ = XtID;
- }
- return 0;
-}
-
-int
-ACE_XtReactor::register_handler_i (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask)
-{
- return ACE_Select_Reactor::register_handler_i (handles,
- handler,
- mask);
-}
-
-int
-ACE_XtReactor::remove_handler_i (ACE_HANDLE handle,
- ACE_Reactor_Mask mask)
-{
- ACE_TRACE ("ACE_XtReactor::remove_handler_i");
-
- // In the registration phase we registered first with
- // ACE_Select_Reactor and then with X. Now we are now doing things
- // in reverse order.
-
- // First clean up the corresponding X11Input.
- this->remove_XtInput (handle);
-
- // Now let the reactor do its work.
- return ACE_Select_Reactor::remove_handler_i (handle,
- mask);
-}
-
-void
-ACE_XtReactor::remove_XtInput (ACE_HANDLE handle)
-{
- ACE_TRACE ("ACE_XtReactor::remove_XtInput");
-
- ACE_XtReactorID *XtID = this->ids_;
-
- if (XtID)
- {
- if (XtID->handle_ == handle)
- {
- ::XtRemoveInput (XtID->id_);
- this->ids_ = XtID->next_;
- delete XtID;
- return;
- }
-
- ACE_XtReactorID *NextID = XtID->next_;
-
- while (NextID)
- {
- if (NextID->handle_ == handle)
- {
- ::XtRemoveInput(NextID->id_);
- XtID->next_ = NextID->next_;
- delete NextID;
- return;
- }
- else
- {
- XtID = NextID;
- NextID = NextID->next_;
- }
- }
- }
-}
-
-int
-ACE_XtReactor::remove_handler_i (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask mask)
-{
- return ACE_Select_Reactor::remove_handler_i (handles,
- mask);
-}
-
-// The following functions ensure that there is an Xt timeout for the
-// first timeout in the Reactor's Timer_Queue.
-
-void
-ACE_XtReactor::reset_timeout (void)
-{
- // Make sure we have a valid context
- ACE_ASSERT (this->context_ != 0);
-
- if (timeout_)
- ::XtRemoveTimeOut (timeout_);
- timeout_ = 0;
-
- ACE_Time_Value *max_wait_time =
- this->timer_queue_->calculate_timeout (0);
-
- if (max_wait_time)
- timeout_ = ::XtAppAddTimeOut (this->context_,
- max_wait_time->msec (),
- TimerCallbackProc,
- (XtPointer) this);
-}
-
-int
-ACE_XtReactor::reset_timer_interval
- (long timer_id,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_XtReactor::reset_timer_interval");
- ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token, ace_mon, this->token_, -1));
-
- int result = ACE_Select_Reactor::timer_queue_->reset_interval
- (timer_id,
- interval);
-
- if (result == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return result;
- }
-}
-
-long
-ACE_XtReactor::schedule_timer (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval)
-{
- ACE_TRACE ("ACE_XtReactor::schedule_timer");
- ACE_MT (ACE_GUARD_RETURN (ACE_Select_Reactor_Token, ace_mon, this->token_, -1));
-
- long result = ACE_Select_Reactor::schedule_timer (handler,
- arg,
- delta_time,
- interval);
- if (result == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return result;
- }
-}
-
-int
-ACE_XtReactor::cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_XtReactor::cancel_timer");
-
- if (ACE_Select_Reactor::cancel_timer (handler,
- dont_call_handle_close) == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return 0;
- }
-}
-
-int
-ACE_XtReactor::cancel_timer (long timer_id,
- const void **arg,
- int dont_call_handle_close)
-{
- ACE_TRACE ("ACE_XtReactor::cancel_timer");
-
- if (ACE_Select_Reactor::cancel_timer (timer_id,
- arg,
- dont_call_handle_close) == -1)
- return -1;
- else
- {
- this->reset_timeout ();
- return 0;
- }
-}
-
-#endif /* ACE_HAS_XT */
diff --git a/ace/XtReactor.h b/ace/XtReactor.h
deleted file mode 100644
index 6dc3f57ae25..00000000000
--- a/ace/XtReactor.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// XtReactor.h
-//
-// = AUTHOR
-// Eric C. Newton's <ecn@clark.net>,
-// Kirill Rybaltchenko <Kirill.Rybaltchenko@cern.ch>, and
-// Douglas C. Schmidt <schmidt@cs.wustl.edu>
-//
-// ============================================================================
-
-#ifndef ACE_XTREACTOR_H
-#define ACE_XTREACTOR_H
-#include "ace/pre.h"
-
-#include "ace/Select_Reactor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_XT)
-
-//#define String XtString
-#include /**/ <X11/Intrinsic.h>
-//#undef String
-
-class ACE_Export ACE_XtReactorID
-{
- // = TITLE
- // This little class is necessary due to the way that Microsoft
- // implements sockets to be pointers rather than indices.
-public:
- XtInputId id_;
- // Magic cookie.
-
- ACE_HANDLE handle_;
- // Underlying handle.
-
- ACE_XtReactorID *next_;
- // Pointer to next node in the linked list.
-};
-
-class ACE_Export ACE_XtReactor : public ACE_Select_Reactor
-{
- // = TITLE
- // An object-oriented event demultiplexor and event handler
- // dispatcher that uses the X Toolkit functions.
-public:
- // = Initialization and termination methods.
- ACE_XtReactor (XtAppContext context = 0,
- size_t size = DEFAULT_SIZE,
- int restart = 0,
- ACE_Sig_Handler * = 0);
- virtual ~ACE_XtReactor (void);
-
- XtAppContext context (void) const;
- void context (XtAppContext);
-
- // = Timer operations.
- virtual long schedule_timer (ACE_Event_Handler *handler,
- const void *arg,
- const ACE_Time_Value &delta_time,
- const ACE_Time_Value &interval);
- virtual int reset_timer_interval (long timer_id,
- const ACE_Time_Value &interval);
- virtual int cancel_timer (ACE_Event_Handler *handler,
- int dont_call_handle_close = 1);
-
- virtual int cancel_timer (long timer_id,
- const void **arg = 0,
- int dont_call_handle_close = 1);
-
-protected:
- // = Register timers/handles with Xt.
- virtual int register_handler_i (ACE_HANDLE handle,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask);
- // Register a single <handler>.
-
- virtual int register_handler_i (const ACE_Handle_Set &handles,
- ACE_Event_Handler *handler,
- ACE_Reactor_Mask mask);
- // Register a set of <handlers>.
-
- virtual int remove_handler_i (ACE_HANDLE handle,
- ACE_Reactor_Mask mask);
- // Remove the <handler> associated with this <handle>.
-
- virtual int remove_handler_i (const ACE_Handle_Set &handles,
- ACE_Reactor_Mask);
- // Remove a set of <handles>.
-
- virtual void remove_XtInput (ACE_HANDLE handle);
- // Removes an Xt handle.
-
- virtual int wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &,
- ACE_Time_Value *);
- // Wait for events to occur.
-
- virtual int XtWaitForMultipleEvents (int,
- ACE_Select_Reactor_Handle_Set &,
- ACE_Time_Value *);
- //Wait for Xt events to occur.
-
- XtAppContext context_;
- ACE_XtReactorID *ids_;
- XtIntervalId timeout_;
-
-private:
- void reset_timeout (void);
- // This method ensures there's an Xt timeout for the first timeout
- // in the Reactor's Timer_Queue.
-
- // = Integrate with the X callback function mechanism.
- static void TimerCallbackProc (XtPointer closure, XtIntervalId *id);
- static void InputCallbackProc (XtPointer closure, int* source, XtInputId *id);
-
- ACE_XtReactor (const ACE_XtReactor &);
- ACE_XtReactor &operator = (const ACE_XtReactor &);
- // Deny access since member-wise won't work...
-};
-#endif /* ACE_HAS_XT */
-
-#include "ace/post.h"
-#endif /* ACE_XTREACTOR_H */
diff --git a/ace/ace-dll.icc b/ace/ace-dll.icc
deleted file mode 100644
index ca866da88a1..00000000000
--- a/ace/ace-dll.icc
+++ /dev/null
@@ -1,468 +0,0 @@
-// $Id$
-//
-// Configuration file to build ACE shared library (aka DLL) on both Win32
-// and AIX using Visual Age C++ 4 (or later)
-
-if $__TOS_WIN__ {
- option PlatformOptions =
- define ("ACE_HAS_DLL","0"),
- define ("ACE_HAS_WINSOCK2","1"),
- define ("ACE_HAS_WCHAR_TYPEDEFS_CHAR","1"),
- define ("_stricmp", "stricmp"),
- define ("_strnicmp", "strnicmp"),
- define ("_O_TEMPORARY", 0x08),
- define ("_O_CREAT", "O_CREAT"),
- define ("_O_TRUNC", "O_TRUNC"),
- define ("_O_EXCL", "O_EXCL"),
- define ("WIN32","1"),
- define ("_WINDOWS","1")
- TargetType = "dll"
- TargetName = "aced.dll"
-}
-if $__TOS_AIX__ {
- option PlatformOptions =
- defaults(xlC_r),
- gen(check,bounds,no),
- link(typecheck,yes),
- opt(level, 3),
- gen(enumsize, small),
- report (disable, "CPPC1125")
- TargetType = "shr"
- TargetName = "libACE.o"
- run after targets("libACE.o") "ar -r -u libACE.a libACE.o"
- run cleanup targets("libACE.o") "rm -rf libACE.a libACE.o"
-}
-
-option
- PlatformOptions,
- link(exportAll),
- link(linkwithsharedlib),
- link(linkWithMultiThreadLib,yes),
- incl(searchpath, "..")
- {
- target type ( TargetType ) TargetName
- {
- option macros(global)
- {
- source type(hpp) 'wchar.h'
- source type(hpp) 'wcstr.h'
- if $__TOS_WIN__ {
- source type(hpp)
- 'config-visualage.h',
- 'config-win32-common.h',
- 'config-win32-visualage.h',
- 'config-win32.h',
- 'ws2tcpip.h'
- }
-
- source type(hpp)
- 'Acceptor.h',
- 'ACE.h',
- 'Activation_Queue.h',
- 'Active_Map_Manager.h',
- 'Active_Map_Manager_T.h',
- 'Addr.h',
- 'ARGV.h',
- 'Arg_Shifter.h',
- 'Array.h',
- 'Asynch_Acceptor.h',
- 'Asynch_IO.h',
- 'Asynch_IO_Impl.h',
- 'ATM_Addr.h',
- 'Auto_Ptr.h',
- 'Based_Pointer_Repository.h',
- 'Basic_Types.h',
- 'Cached_Connect_Strategy_T.h',
- 'Cache_Map_Manager_T.h',
- 'Caching_Strategies_T.h',
- 'Caching_Utility_T.h',
- 'Capabilities.h',
- 'CDR_Stream.h',
- 'Cleanup_Strategies_T.h',
- 'Codeset_IBM1047.h',
- 'config.h',
- 'Connector.h',
- 'Containers.h',
- 'Containers_T.h',
- 'CORBA_Handler.h',
- 'CORBA_macros.h',
- 'CORBA_Ref.h',
- 'Date_Time.h',
- 'DEV.h',
- 'DEV_Addr.h',
- 'DEV_Connector.h',
- 'DEV_IO.h',
- 'Dirent.h',
- 'DLL.h',
- 'Dump.h',
- 'Dump_T.h',
- 'Dynamic.h',
- 'Dynamic_Service.h',
- 'Env_Value_T.h',
- 'Event_Handler.h',
- 'Event_Handler_T.h',
- 'FIFO.h',
- 'FIFO_Recv.h',
- 'FIFO_Recv_Msg.h',
- 'FIFO_Send.h',
- 'FIFO_Send_Msg.h',
- 'FILE.h',
- 'Filecache.h',
- 'FILE_Addr.h',
- 'FILE_Connector.h',
- 'FILE_IO.h',
- 'FlReactor.h',
- 'Free_List.h',
- 'Functor.h',
- 'Functor_T.h',
- 'Future.h',
- 'Future_Set.h',
- 'Get_Opt.h',
- 'Handle_Gobbler.h',
- 'Handle_Set.h',
- 'Hash_Cache_Map_Manager_T.h',
- 'Hash_Map_Manager.h',
- 'Hash_Map_Manager_T.h',
- 'Hash_Map_With_Allocator_T.h',
- 'High_Res_Timer.h',
- 'config-all.h',
- 'INET_Addr.h',
- 'iosfwd.h',
- 'IOStream.h',
- 'IOStream_T.h',
- 'IO_Cntl_Msg.h',
- 'IO_SAP.h',
- 'IPC_SAP.h',
- 'Local_Name_Space.h',
- 'Local_Name_Space_T.h',
- 'Local_Tokens.h',
- 'LOCK_SOCK_Acceptor.h',
- 'Log_Msg.h',
- 'Log_Priority.h',
- 'Log_Record.h',
- 'LSOCK.h',
- 'LSOCK_Acceptor.h',
- 'LSOCK_CODgram.h',
- 'LSOCK_Connector.h',
- 'LSOCK_Dgram.h',
- 'LSOCK_Stream.h',
- 'Malloc.h',
- 'Malloc_Base.h',
- 'Malloc_T.h',
- 'Managed_Object.h',
- 'Map.h',
- 'Map_Manager.h',
- 'Map_T.h',
- 'Memory_Pool.h',
- 'Mem_Map.h',
- 'Message_Block.h',
- 'Message_Block_T.h',
- 'Message_Queue.h',
- 'Message_Queue_T.h',
- 'Method_Object.h',
- 'Method_Request.h',
- 'Module.h',
- 'Msg_WFMO_Reactor.h',
- 'Name_Proxy.h',
- 'Name_Request_Reply.h',
- 'Name_Space.h',
- 'Naming_Context.h',
- 'NT_Service.h',
- 'Object_Manager.h',
- 'Obstack.h',
- 'OS.h',
- 'OS_Dirent.h',
- 'Pair.h',
- 'Pair_T.h',
- 'Parse_Node.h',
- 'Pipe.h',
- 'POSIX_Asynch_IO.h',
- 'POSIX_Proactor.h',
- 'Priority_Reactor.h',
- 'Proactor.h',
- 'Proactor_Impl.h',
- 'Process.h',
- 'Process_Manager.h',
- 'Profile_Timer.h',
- 'RB_Tree.h',
- 'Reactor.h',
- 'Reactor_Impl.h',
- 'Read_Buffer.h',
- 'Registry.h',
- 'Registry_Name_Space.h',
- 'Remote_Name_Space.h',
- 'Remote_Tokens.h',
- 'Sched_Params.h',
- 'Select_Reactor.h',
- 'Select_Reactor_Base.h',
- 'Select_Reactor_T.h',
- 'Service_Config.h',
- 'Service_Manager.h',
- 'Service_Object.h',
- 'Service_Repository.h',
- 'Service_Types.h',
- 'Shared_Memory.h',
- 'Shared_Memory_MM.h',
- 'Shared_Memory_SV.h',
- 'Shared_Object.h',
- 'Signal.h',
- 'Singleton.h',
- 'SOCK.h',
- 'SOCK_Acceptor.h',
- 'SOCK_CODgram.h',
- 'SOCK_Connector.h',
- 'SOCK_Dgram.h',
- 'SOCK_Dgram_Bcast.h',
- 'SOCK_Dgram_Mcast.h',
- 'SOCK_IO.h',
- 'SOCK_Stream.h',
- 'SPIPE.h',
- 'SPIPE_Acceptor.h',
- 'SPIPE_Addr.h',
- 'SPIPE_Connector.h',
- 'SPIPE_Stream.h',
- 'SString.h',
- 'Stats.h',
- 'Strategies.h',
- 'Strategies_T.h',
- 'Stream.h',
- 'streams.h',
- 'Stream_Modules.h',
- 'Svc_Conf.h',
- 'Svc_Conf_Tokens.h',
- 'Svc_Handler.h',
- 'SV_Message.h',
- 'SV_Message_Queue.h',
- 'SV_Semaphore_Complex.h',
- 'SV_Semaphore_Simple.h',
- 'SV_Shared_Memory.h',
- 'Synch.h',
- 'Synch_Options.h',
- 'Synch_T.h',
- 'System_Time.h',
- 'Task.h',
- 'Task_T.h',
- 'Thread.h',
- 'Thread_Manager.h',
- 'Timeprobe.h',
- 'Timeprobe_T.h',
- 'Timer_Hash.h',
- 'Timer_Hash_T.h',
- 'Timer_Heap.h',
- 'Timer_Heap_T.h',
- 'Timer_List.h',
- 'Timer_List_T.h',
- 'Timer_Queue.h',
- 'Timer_Queue_Adapters.h',
- 'Timer_Queue_T.h',
- 'Timer_Wheel.h',
- 'Timer_Wheel_T.h',
- 'Time_Request_Reply.h',
- 'Time_Value.h',
- 'TkReactor.h',
- 'TLI.h',
- 'TLI_Acceptor.h',
- 'TLI_Connector.h',
- 'TLI_Stream.h',
- 'Token.h',
- 'Token_Collection.h',
- 'Token_Invariants.h',
- 'Token_Manager.h',
- 'Token_Request_Reply.h',
- 'TP_Reactor.h',
- 'Trace.h',
- 'TTY_IO.h',
- 'Typed_SV_Message.h',
- 'Typed_SV_Message_Queue.h',
- 'UNIX_Addr.h',
- 'UPIPE_Acceptor.h',
- 'UPIPE_Addr.h',
- 'UPIPE_Connector.h',
- 'UPIPE_Stream.h',
- 'Version.h',
- 'WFMO_Reactor.h',
- 'WIN32_Asynch_IO.h',
- 'WIN32_Proactor.h',
- 'XtReactor.h'
- }
- source type(cpp) "Log_Msg.cpp"
- source type(cpp) "ACE.cpp"
- source type(cpp) "Activation_Queue.cpp"
- source type(cpp) "Active_Map_Manager.cpp"
- source type(cpp) "Addr.cpp"
- source type(cpp) "Arg_Shifter.cpp"
- source type(cpp) "ARGV.cpp"
- source type(cpp) "Asynch_IO.cpp"
- source type(cpp) "Asynch_IO_Impl.cpp"
- source type(cpp) "Based_Pointer_Repository.cpp"
- source type(cpp) "Basic_Types.cpp"
- source type(cpp) "Capabilities.cpp"
- source type(cpp) "CDR_Stream.cpp"
- source type(cpp) "Containers.cpp"
- source type(cpp) "CORBA_Handler.cpp"
- source type(cpp) "CORBA_Ref.cpp"
- source type(cpp) "Date_Time.cpp"
- source type(cpp) "DEV.cpp"
- source type(cpp) "DEV_Addr.cpp"
- source type(cpp) "DEV_Connector.cpp"
- source type(cpp) "DEV_IO.cpp"
- source type(cpp) "Dirent.cpp"
- source type(cpp) "DLL.cpp"
- source type(cpp) "Dump.cpp"
- source type(cpp) "Dynamic.cpp"
- source type(cpp) "Dynamic_Service.cpp"
- source type(cpp) "Event_Handler.cpp"
- source type(cpp) "FIFO.cpp"
- source type(cpp) "FIFO_Recv.cpp"
- source type(cpp) "FIFO_Recv_Msg.cpp"
- source type(cpp) "FIFO_Send.cpp"
- source type(cpp) "FIFO_Send_Msg.cpp"
- source type(cpp) "FILE.cpp"
- source type(cpp) "FILE_Addr.cpp"
- source type(cpp) "FILE_Connector.cpp"
- source type(cpp) "FILE_IO.cpp"
- source type(cpp) "Filecache.cpp"
- source type(cpp) "Functor.cpp"
- source type(cpp) "Future.cpp"
- source type(cpp) "Get_Opt.cpp"
- source type(cpp) "Handle_Set.cpp"
- source type(cpp) "Hash_Map_Manager.cpp"
- source type(cpp) "High_Res_Timer.cpp"
- source type(cpp) "INET_Addr.cpp"
- source type(cpp) "IO_Cntl_Msg.cpp"
- source type(cpp) "IO_SAP.cpp"
- source type(cpp) "IOStream.cpp"
- source type(cpp) "IPC_SAP.cpp"
- source type(cpp) "Local_Name_Space.cpp"
- source type(cpp) "Local_Tokens.cpp"
- source type(cpp) "Log_Record.cpp"
- source type(cpp) "LSOCK.cpp"
- source type(cpp) "LSOCK_Acceptor.cpp"
- source type(cpp) "LSOCK_CODgram.cpp"
- source type(cpp) "LSOCK_Connector.cpp"
- source type(cpp) "LSOCK_Dgram.cpp"
- source type(cpp) "LSOCK_Stream.cpp"
- source type(cpp) "Malloc.cpp"
- source type(cpp) "Map.cpp"
- source type(cpp) "Mem_Map.cpp"
- source type(cpp) "Memory_Pool.cpp"
- source type(cpp) "Message_Block.cpp"
- source type(cpp) "Message_Queue.cpp"
- source type(cpp) "Method_Request.cpp"
- source type(cpp) "Msg_WFMO_Reactor.cpp"
- source type(cpp) "Name_Proxy.cpp"
- source type(cpp) "Name_Request_Reply.cpp"
- source type(cpp) "Name_Space.cpp"
- source type(cpp) "Naming_Context.cpp"
- source type(cpp) "NT_Service.cpp"
- source type(cpp) "Object_Manager.cpp"
- source type(cpp) "Obstack.cpp"
- source type(cpp) "OS.cpp"
- source type(cpp) "OS_Dirent.cpp"
- source type(cpp) "Pair.cpp"
- source type(cpp) "Parse_Node.cpp"
- source type(cpp) "Pipe.cpp"
- source type(cpp) "Priority_Reactor.cpp"
- source type(cpp) "Proactor.cpp"
- source type(cpp) "Process.cpp"
- source type(cpp) "Process_Manager.cpp"
- source type(cpp) "Profile_Timer.cpp"
- source type(cpp) "RB_Tree.cpp"
- source type(cpp) "Reactor.cpp"
- source type(cpp) "Read_Buffer.cpp"
- source type(cpp) "Registry.cpp"
- source type(cpp) "Registry_Name_Space.cpp"
- source type(cpp) "Remote_Name_Space.cpp"
- source type(cpp) "Remote_Tokens.cpp"
- source type(cpp) "Sched_Params.cpp"
- source type(cpp) "Select_Reactor.cpp"
- source type(cpp) "Select_Reactor_Base.cpp"
- source type(cpp) "Service_Config.cpp"
- source type(cpp) "Service_Manager.cpp"
- source type(cpp) "Service_Object.cpp"
- source type(cpp) "Service_Repository.cpp"
- source type(cpp) "Service_Types.cpp"
- source type(cpp) "Shared_Memory.cpp"
- source type(cpp) "Shared_Memory_MM.cpp"
- source type(cpp) "Shared_Memory_SV.cpp"
- source type(cpp) "Shared_Object.cpp"
- source type(cpp) "Signal.cpp"
- source type(cpp) "SOCK.cpp"
- source type(cpp) "SOCK_Acceptor.cpp"
- source type(cpp) "SOCK_CODgram.cpp"
- source type(cpp) "SOCK_Connector.cpp"
- source type(cpp) "SOCK_Dgram.cpp"
- source type(cpp) "SOCK_Dgram_Bcast.cpp"
- source type(cpp) "SOCK_Dgram_Mcast.cpp"
- source type(cpp) "SOCK_IO.cpp"
- source type(cpp) "SOCK_Stream.cpp"
- source type(cpp) "SPIPE.cpp"
- source type(cpp) "SPIPE_Acceptor.cpp"
- source type(cpp) "SPIPE_Addr.cpp"
- source type(cpp) "SPIPE_Connector.cpp"
- source type(cpp) "SPIPE_Stream.cpp"
- source type(cpp) "SString.cpp"
- source type(cpp) "Stats.cpp"
- source type(cpp) "Strategies.cpp"
- source type(cpp) "SV_Message.cpp"
- source type(cpp) "SV_Message_Queue.cpp"
- source type(cpp) "SV_Semaphore_Complex.cpp"
- source type(cpp) "SV_Semaphore_Simple.cpp"
- source type(cpp) "SV_Shared_Memory.cpp"
- source type(cpp) "Svc_Conf_l.cpp"
- source type(cpp) "Svc_Conf_y.cpp"
- source type(cpp) "Synch.cpp"
- source type(cpp) "Synch_Options.cpp"
- source type(cpp) "System_Time.cpp"
- source type(cpp) "Task.cpp"
- source type(cpp) "Thread.cpp"
- source type(cpp) "Thread_Manager.cpp"
- source type(cpp) "Time_Request_Reply.cpp"
- source type(cpp) "Timeprobe.cpp"
- source type(cpp) "Timer_Hash.cpp"
- source type(cpp) "Timer_Heap.cpp"
- source type(cpp) "Timer_List.cpp"
- source type(cpp) "Timer_Queue.cpp"
- source type(cpp) "Timer_Queue_Adapters.cpp"
- source type(cpp) "Timer_Wheel.cpp"
- source type(cpp) "TLI.cpp"
- source type(cpp) "TLI_Acceptor.cpp"
- source type(cpp) "TLI_Connector.cpp"
- source type(cpp) "TLI_Stream.cpp"
- source type(cpp) "Token.cpp"
- source type(cpp) "Token_Collection.cpp"
- source type(cpp) "Token_Invariants.cpp"
- source type(cpp) "Token_Manager.cpp"
- source type(cpp) "Token_Request_Reply.cpp"
- source type(cpp) "TP_Reactor.cpp"
- source type(cpp) "Trace.cpp"
- source type(cpp) "TTY_IO.cpp"
- source type(cpp) "Typed_SV_Message.cpp"
- source type(cpp) "Typed_SV_Message_Queue.cpp"
- source type(cpp) "UNIX_Addr.cpp"
- source type(cpp) "UPIPE_Acceptor.cpp"
- source type(cpp) "UPIPE_Connector.cpp"
- source type(cpp) "UPIPE_Stream.cpp"
- source type(cpp) "WFMO_Reactor.cpp"
- source type(cpp) "WIN32_Asynch_IO.cpp"
- source type(cpp) "WIN32_Proactor.cpp"
- source type(cpp) "XtReactor.cpp"
-
- // Libraries needed during linking
- if $__TOS_WIN__ {
- source type (lib) "advapi32.lib"
- source type (lib) "user32.lib"
- source type (lib) "ws2_32.lib"
- source type (lib) "wsock32.lib"
- source type (lib) "mswsock.lib"
- }
- if $__TOS_AIX__ {
- source type (lib) "libtli_r.a"
- source type (lib) "libpthreads.a"
- source type (lib) "libc_r.a"
- source type (lib) "libdl.a"
- // Imports
- source type (imp) "pse.exp"
- }
- }
-}
diff --git a/ace/ace-lib.icc b/ace/ace-lib.icc
deleted file mode 100644
index 2ea385283fb..00000000000
--- a/ace/ace-lib.icc
+++ /dev/null
@@ -1,273 +0,0 @@
-if $__TOS_WIN__ {
- option PlatformOptions = define ("ACE_HAS_WINSOCK2","1"),
- define ("WIN32","1"),
- define ("_WINDOWS","1")
- TARG = "aced.lib"
-}
-if $__TOS_AIX__ {
- option PlatformOptions = null
- TARG = "libACE.a"
-}
-
-option
- PlatformOptions,
- incl(searchPath,'..'),
- define ("__ACE_INLINE__","0"),
- define("ACE_HAS_DLL","0"),
- link(exportAll),
- link(linkwithsharedlib),
- link(linkWithMultiThreadLib,yes)
- {
- target type (lib) TARG
- {
- option macros(global)
- {
- source type(cpp) "OS.h"
- }
- source type(cpp) "Log_Msg.cpp"
- source type(cpp) "ACE.cpp"
- source type(cpp) "Activation_Queue.cpp"
- source type(cpp) "Active_Map_Manager.cpp"
- source type(cpp) "Addr.cpp"
- source type(cpp) "Arg_Shifter.cpp"
- source type(cpp) "ARGV.cpp"
- source type(cpp) "Asynch_IO.cpp"
- source type(cpp) "Asynch_IO_Impl.cpp"
- source type(cpp) "Basic_Types.cpp"
- source type(cpp) "CDR_Stream.cpp"
- source type(cpp) "Containers.cpp"
- source type(cpp) "CORBA_Handler.cpp"
- source type(cpp) "CORBA_Ref.cpp"
- source type(cpp) "Date_Time.cpp"
- source type(cpp) "DEV.cpp"
- source type(cpp) "DEV_Addr.cpp"
- source type(cpp) "DEV_Connector.cpp"
- source type(cpp) "DEV_IO.cpp"
- source type(cpp) "Dirent.cpp"
- source type(cpp) "DLL.cpp"
- source type(cpp) "Dump.cpp"
- source type(cpp) "Dynamic.cpp"
- source type(cpp) "Dynamic_Service.cpp"
- source type(cpp) "Event_Handler.cpp"
- source type(cpp) "Event_Handler_T.cpp"
- source type(cpp) "FIFO.cpp"
- source type(cpp) "FIFO_Recv.cpp"
- source type(cpp) "FIFO_Recv_Msg.cpp"
- source type(cpp) "FIFO_Send.cpp"
- source type(cpp) "FIFO_Send_Msg.cpp"
- source type(cpp) "FILE.cpp"
- source type(cpp) "FILE_Addr.cpp"
- source type(cpp) "FILE_Connector.cpp"
- source type(cpp) "FILE_IO.cpp"
- source type(cpp) "Filecache.cpp"
- source type(cpp) "Functor.cpp"
- source type(cpp) "Future.cpp"
- source type(cpp) "Get_Opt.cpp"
- source type(cpp) "Handle_Set.cpp"
- source type(cpp) "Hash_Map_Manager.cpp"
- source type(cpp) "High_Res_Timer.cpp"
- source type(cpp) "INET_Addr.cpp"
- source type(cpp) "IO_Cntl_Msg.cpp"
- source type(cpp) "IO_SAP.cpp"
- source type(cpp) "IOStream.cpp"
- source type(cpp) "IPC_SAP.cpp"
- source type(cpp) "Local_Name_Space.cpp"
- source type(cpp) "Local_Tokens.cpp"
- source type(cpp) "Log_Record.cpp"
- source type(cpp) "LSOCK.cpp"
- source type(cpp) "LSOCK_Acceptor.cpp"
- source type(cpp) "LSOCK_CODgram.cpp"
- source type(cpp) "LSOCK_Connector.cpp"
- source type(cpp) "LSOCK_Dgram.cpp"
- source type(cpp) "LSOCK_Stream.cpp"
- source type(cpp) "Malloc.cpp"
- source type(cpp) "Map.cpp"
- source type(cpp) "Mem_Map.cpp"
- source type(cpp) "Memory_Pool.cpp"
- source type(cpp) "Message_Block.cpp"
- source type(cpp) "Message_Queue.cpp"
- source type(cpp) "Method_Request.cpp"
- source type(cpp) "Msg_WFMO_Reactor.cpp"
- source type(cpp) "Multiplexor.cpp"
- source type(cpp) "Name_Proxy.cpp"
- source type(cpp) "Name_Request_Reply.cpp"
- source type(cpp) "Name_Space.cpp"
- source type(cpp) "Naming_Context.cpp"
- source type(cpp) "NT_Service.cpp"
- source type(cpp) "Object_Manager.cpp"
- source type(cpp) "Obstack.cpp"
- source type(cpp) "OS.cpp"
- source type(cpp) "OS_Dirent.cpp"
- source type(cpp) "Pair.cpp"
- source type(cpp) "Parse_Node.cpp"
- source type(cpp) "Pipe.cpp"
- source type(cpp) "Priority_Reactor.cpp"
- source type(cpp) "Proactor.cpp"
- source type(cpp) "Process.cpp"
- source type(cpp) "Process_Manager.cpp"
- source type(cpp) "Profile_Timer.cpp"
- source type(cpp) "RB_Tree.cpp"
- source type(cpp) "Reactor.cpp"
- source type(cpp) "Read_Buffer.cpp"
- source type(cpp) "Registry.cpp"
- source type(cpp) "Registry_Name_Space.cpp"
- source type(cpp) "Remote_Name_Space.cpp"
- source type(cpp) "Remote_Tokens.cpp"
- source type(cpp) "Sched_Params.cpp"
- source type(cpp) "Select_Reactor.cpp"
- source type(cpp) "Select_Reactor_Base.cpp"
- source type(cpp) "Service_Config.cpp"
- source type(cpp) "Service_Manager.cpp"
- source type(cpp) "Service_Object.cpp"
- source type(cpp) "Service_Repository.cpp"
- source type(cpp) "Service_Types.cpp"
- source type(cpp) "Shared_Memory.cpp"
- source type(cpp) "Shared_Memory_MM.cpp"
- source type(cpp) "Shared_Memory_SV.cpp"
- source type(cpp) "Shared_Object.cpp"
- source type(cpp) "Signal.cpp"
- source type(cpp) "SOCK.cpp"
- source type(cpp) "SOCK_Acceptor.cpp"
- source type(cpp) "SOCK_CODgram.cpp"
- source type(cpp) "SOCK_Connector.cpp"
- source type(cpp) "SOCK_Dgram.cpp"
- source type(cpp) "SOCK_Dgram_Bcast.cpp"
- source type(cpp) "SOCK_Dgram_Mcast.cpp"
- source type(cpp) "SOCK_IO.cpp"
- source type(cpp) "SOCK_Stream.cpp"
- source type(cpp) "SPIPE.cpp"
- source type(cpp) "SPIPE_Acceptor.cpp"
- source type(cpp) "SPIPE_Addr.cpp"
- source type(cpp) "SPIPE_Connector.cpp"
- source type(cpp) "SPIPE_Stream.cpp"
- source type(cpp) "SString.cpp"
- source type(cpp) "Stats.cpp"
- source type(cpp) "Strategies.cpp"
- source type(cpp) "SV_Message.cpp"
- source type(cpp) "SV_Message_Queue.cpp"
- source type(cpp) "SV_Semaphore_Complex.cpp"
- source type(cpp) "SV_Semaphore_Simple.cpp"
- source type(cpp) "SV_Shared_Memory.cpp"
- source type(cpp) "Svc_Conf_l.cpp"
- source type(cpp) "Svc_Conf_y.cpp"
- source type(cpp) "Svc_Handler.cpp"
- source type(cpp) "Synch.cpp"
- source type(cpp) "Synch_Options.cpp"
- source type(cpp) "System_Time.cpp"
- source type(cpp) "Task.cpp"
- source type(cpp) "Thread.cpp"
- source type(cpp) "Thread_Manager.cpp"
- source type(cpp) "Time_Request_Reply.cpp"
- source type(cpp) "Timeprobe.cpp"
- source type(cpp) "Timer_Hash.cpp"
- source type(cpp) "Timer_Heap.cpp"
- source type(cpp) "Timer_List.cpp"
- source type(cpp) "Timer_Queue.cpp"
- source type(cpp) "Timer_Queue_Adapters.cpp"
- source type(cpp) "Timer_Wheel.cpp"
- source type(cpp) "TLI.cpp"
- source type(cpp) "TLI_Acceptor.cpp"
- source type(cpp) "TLI_Connector.cpp"
- source type(cpp) "TLI_Stream.cpp"
- source type(cpp) "Token.cpp"
- source type(cpp) "Token_Collection.cpp"
- source type(cpp) "Token_Invariants.cpp"
- source type(cpp) "Token_Manager.cpp"
- source type(cpp) "Token_Request_Reply.cpp"
- source type(cpp) "TP_Reactor.cpp"
- source type(cpp) "Trace.cpp"
- source type(cpp) "TTY_IO.cpp"
- source type(cpp) "Typed_SV_Message.cpp"
- source type(cpp) "Typed_SV_Message_Queue.cpp"
- source type(cpp) "UNIX_Addr.cpp"
- source type(cpp) "UPIPE_Acceptor.cpp"
- source type(cpp) "UPIPE_Connector.cpp"
- source type(cpp) "UPIPE_Stream.cpp"
- source type(cpp) "WFMO_Reactor.cpp"
- source type(cpp) "WIN32_Asynch_IO.cpp"
- source type(cpp) "WIN32_Proactor.cpp"
- source type(cpp) "XtReactor.cpp"
- source type(cpp) "Active_Map_Manager_T.cpp"
- source type(cpp) "Containers_T.cpp"
- source type(cpp) "Dump_T.cpp"
- source type(cpp) "Env_Value_T.cpp"
- source type(cpp) "Event_Handler_T.cpp"
- source type(cpp) "Functor_T.cpp"
- source type(cpp) "Hash_Map_Manager_T.cpp"
- source type(cpp) "IOStream_T.cpp"
- source type(cpp) "Local_Name_Space_T.cpp"
- source type(cpp) "Malloc_T.cpp"
- source type(cpp) "Map_T.cpp"
- source type(cpp) "Message_Block_T.cpp"
- source type(cpp) "Message_Queue_T.cpp"
- source type(cpp) "Pair_T.cpp"
- source type(cpp) "Select_Reactor_T.cpp"
- source type(cpp) "Strategies_T.cpp"
- source type(cpp) "Synch_T.cpp"
- source type(cpp) "Task_T.cpp"
- source type(cpp) "Timeprobe_T.cpp"
- source type(cpp) "Timer_Hash_T.cpp"
- source type(cpp) "Timer_Heap_T.cpp"
- source type(cpp) "Timer_List_T.cpp"
- source type(cpp) "Timer_Queue_T.cpp"
- source type(cpp) "Timer_Wheel_T.cpp"
- // Template implementation files (#pragma implementation)
- source type (cpp) "Acceptor.cpp"
- source type (cpp) "Active_Map_Manager_T.cpp"
- source type (cpp) "Containers.cpp"
- source type (cpp) "Asynch_Acceptor.cpp"
- source type (cpp) "Auto_Ptr.cpp"
- source type (cpp) "CORBA_Ref.cpp"
- source type (cpp) "Connector.cpp"
- source type (cpp) "Containers_T.cpp"
- source type (cpp) "Dump_T.cpp"
- source type (cpp) "Env_Value_T.cpp"
- source type (cpp) "Event_Handler_T.cpp"
- source type (cpp) "Free_List.cpp"
- source type (cpp) "Functor_T.cpp"
- source type (cpp) "Future.cpp"
- source type (cpp) "Hash_Map_Manager_T.cpp"
- source type (cpp) "IOStream_T.cpp"
- source type (cpp) "LOCK_SOCK_Acceptor.cpp"
- source type (cpp) "Local_Name_Space_T.cpp"
- source type (cpp) "Malloc_T.cpp"
- source type (cpp) "Managed_Object.cpp"
- source type (cpp) "Map_Manager.cpp"
- source type (cpp) "Map_T.cpp"
- source type (cpp) "Message_Block_T.cpp"
- source type (cpp) "Message_Queue_T.cpp"
- source type (cpp) "Module.cpp"
- source type (cpp) "Pair_T.cpp"
- source type (cpp) "RB_Tree.cpp"
- source type (cpp) "Select_Reactor_T.cpp"
- source type (cpp) "Singleton.cpp"
- source type (cpp) "Strategies_T.cpp"
- source type (cpp) "Stream.cpp"
- source type (cpp) "Stream_Modules.cpp"
- source type (cpp) "Svc_Handler.cpp"
- source type (cpp) "Synch_T.cpp"
- source type (cpp) "Task_T.cpp"
- source type (cpp) "Timeprobe_T.cpp"
- source type (cpp) "Timer_Hash_T.cpp"
- source type (cpp) "Timer_Heap_T.cpp"
- source type (cpp) "Timer_List_T.cpp"
- source type (cpp) "Timer_Queue_T.cpp"
- source type (cpp) "Timer_Wheel_T.cpp"
- source type (cpp) "Typed_SV_Message.cpp"
- source type (cpp) "Typed_SV_Message_Queue.cpp"
-
- // Libraries needed during linking
- if $__TOS_WIN__ {
- source type (lib) "advapi32.lib"
- source type (lib) "user32.lib"
- source type (lib) "ws2_32.lib"
- source type (lib) "wsock32.lib"
- source type (lib) "mswsock.lib"
- }
- if $__TOS_AIX__ {
- source type (lib) "libtli_r.a"
- source type (lib) "libpthreads.a"
- source type (lib) "libc_r.a"
- }
- }
-}
diff --git a/ace/ace.dsw b/ace/ace.dsw
deleted file mode 100644
index 9ae12b376b0..00000000000
--- a/ace/ace.dsw
+++ /dev/null
@@ -1,41 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "ACE dynamic library"=.\ace_dll.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "ACE static library"=.\ace_lib.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/ace/ace.icc b/ace/ace.icc
deleted file mode 100755
index e967955170e..00000000000
--- a/ace/ace.icc
+++ /dev/null
@@ -1,184 +0,0 @@
-// Optimized configuration file to generate the ACE shared library
-option
- defaults(xlC_r),
- gen(check,bounds,no),
- link(typecheck,yes),
- opt(level, 3),
- gen(enumsize, small),
- link(linkwithmultithreadlib),
- link(exportAll),
- link(linkwithsharedlib, yes)
- {
- // Initially create a temporary shared object
- target type (shr) "libAceShr.a"
- {
- option
- opt(level,3),
- macros(global)
- {
- source type(cpp) "pthread.h"
- source type(cpp) "ACE.h"
- source type(cpp) "OS.h"
- }
- source type (cpp) "Log_Msg.cpp"
- source type (cpp) "ACE.cpp"
- source type (cpp) "Activation_Queue.cpp"
- source type (cpp) "Addr.cpp"
- source type (cpp) "ARGV.cpp"
- source type (cpp) "Asynch_IO.cpp"
- source type (cpp) "Basic_Types.cpp"
- source type (cpp) "CORBA_Handler.cpp"
- source type (cpp) "CORBA_Ref.cpp"
- source type (cpp) "DEV.cpp"
- source type (cpp) "DEV_Addr.cpp"
- source type (cpp) "DEV_Connector.cpp"
- source type (cpp) "DEV_IO.cpp"
- source type (cpp) "Dump.cpp"
- source type (cpp) "Dynamic.cpp"
- source type (cpp) "Event_Handler.cpp"
- source type (cpp) "Filecache.cpp"
- source type (cpp) "FIFO.cpp"
- source type (cpp) "FIFO_Recv.cpp"
- source type (cpp) "FIFO_Recv_Msg.cpp"
- source type (cpp) "FIFO_Send.cpp"
- source type (cpp) "FIFO_Send_Msg.cpp"
- source type (cpp) "FILE.cpp"
- source type (cpp) "FILE_Addr.cpp"
- source type (cpp) "FILE_Connector.cpp"
- source type (cpp) "FILE_IO.cpp"
- source type (cpp) "Get_Opt.cpp"
- source type (cpp) "Handle_Set.cpp"
- source type (cpp) "High_Res_Timer.cpp"
- source type (cpp) "INET_Addr.cpp"
- source type (cpp) "IOStream.cpp"
- source type (cpp) "IO_Cntl_Msg.cpp"
- source type (cpp) "IO_SAP.cpp"
- source type (cpp) "IPC_SAP.cpp"
- source type (cpp) "Local_Name_Space.cpp"
- source type (cpp) "Local_Tokens.cpp"
- source type (cpp) "LSOCK.cpp"
- source type (cpp) "LSOCK_Acceptor.cpp"
- source type (cpp) "LSOCK_CODgram.cpp"
- source type (cpp) "LSOCK_Connector.cpp"
- source type (cpp) "LSOCK_Dgram.cpp"
- source type (cpp) "LSOCK_Stream.cpp"
- source type (cpp) "Log_Record.cpp"
- source type (cpp) "Malloc.cpp"
- source type (cpp) "Mem_Map.cpp"
- source type (cpp) "Memory_Pool.cpp"
- source type (cpp) "Message_Block.cpp"
- source type (cpp) "Method_Object.cpp"
- source type (cpp) "Msg_WFMO_Reactor.cpp"
- source type (cpp) "Name_Proxy.cpp"
- source type (cpp) "Name_Request_Reply.cpp"
- source type (cpp) "Name_Space.cpp"
- source type (cpp) "Naming_Context.cpp"
- source type (cpp) "Object_Manager.cpp"
- source type (cpp) "Obstack.cpp"
- source type (cpp) "OS.cpp"
- source type (cpp) "OS_Dirent.cpp"
- source type (cpp) "Parse_Node.cpp"
- source type (cpp) "Pipe.cpp"
- source type (cpp) "Proactor.cpp"
- source type (cpp) "Process.cpp"
- source type (cpp) "Process_Manager.cpp"
- source type (cpp) "Profile_Timer.cpp"
- source type (cpp) "Reactor.cpp"
- source type (cpp) "Read_Buffer.cpp"
- source type (cpp) "Registry.cpp"
- source type (cpp) "Registry_Name_Space.cpp"
- source type (cpp) "Remote_Name_Space.cpp"
- source type (cpp) "Remote_Tokens.cpp"
- source type (cpp) "SOCK.cpp"
- source type (cpp) "SOCK_Acceptor.cpp"
- source type (cpp) "SOCK_CODgram.cpp"
- source type (cpp) "SOCK_Connector.cpp"
- source type (cpp) "SOCK_Dgram.cpp"
- source type (cpp) "SOCK_Dgram_Bcast.cpp"
- source type (cpp) "SOCK_IO.cpp"
- source type (cpp) "SOCK_Dgram_Mcast.cpp"
- source type (cpp) "SOCK_Stream.cpp"
- source type (cpp) "SPIPE.cpp"
- source type (cpp) "SPIPE_Acceptor.cpp"
- source type (cpp) "SPIPE_Addr.cpp"
- source type (cpp) "SPIPE_Connector.cpp"
- source type (cpp) "SPIPE_Stream.cpp"
- source type (cpp) "SString.cpp"
- source type (cpp) "Sched_Params.cpp"
- source type (cpp) "Select_Reactor.cpp"
- source type (cpp) "Shared_Memory.cpp"
- source type (cpp) "Priority_Reactor.cpp"
- source type (cpp) "Service_Config.cpp"
- source type (cpp) "Service_Manager.cpp"
- source type (cpp) "Service_Object.cpp"
- source type (cpp) "Service_Types.cpp"
- source type (cpp) "Service_Repository.cpp"
- source type (cpp) "Shared_Memory_MM.cpp"
- source type (cpp) "Shared_Memory_SV.cpp"
- source type (cpp) "Shared_Object.cpp"
- source type (cpp) "Signal.cpp"
- source type (cpp) "Strategies.cpp"
- source type (cpp) "SV_Message.cpp"
- source type (cpp) "SV_Message_Queue.cpp"
- source type (cpp) "SV_Semaphore_Complex.cpp"
- source type (cpp) "SV_Semaphore_Simple.cpp"
- source type (cpp) "SV_Shared_Memory.cpp"
- source type (cpp) "Synch.cpp"
- source type (cpp) "Synch_Options.cpp"
- source type (cpp) "System_Time.cpp"
- source type (cpp) "Task.cpp"
- source type (cpp) "Timer_Hash.cpp"
- source type (cpp) "Timer_Heap.cpp"
- source type (cpp) "Timer_List.cpp"
- source type (cpp) "Timer_Queue.cpp"
- source type (cpp) "Timer_Wheel.cpp"
- source type (cpp) "TLI.cpp"
- source type (cpp) "TLI_Acceptor.cpp"
- source type (cpp) "TLI_Connector.cpp"
- source type (cpp) "TLI_Stream.cpp"
- source type (cpp) "Thread.cpp"
- source type (cpp) "Thread_Manager.cpp"
- source type (cpp) "Time_Request_Reply.cpp"
- source type (cpp) "Token.cpp"
- source type (cpp) "Token_Collection.cpp"
- source type (cpp) "Token_Invariants.cpp"
- source type (cpp) "Token_Manager.cpp"
- source type (cpp) "Token_Request_Reply.cpp"
- source type (cpp) "Trace.cpp"
- source type (cpp) "TTY_IO.cpp"
- source type (cpp) "UNIX_Addr.cpp"
- source type (cpp) "UPIPE_Acceptor.cpp"
- source type (cpp) "UPIPE_Connector.cpp"
- source type (cpp) "UPIPE_Stream.cpp"
- source type (cpp) "WFMO_Reactor.cpp"
- source type (cpp) "XtReactor.cpp"
- source type (cpp) "Svc_Conf_l.cpp"
- source type (cpp) "Svc_Conf_y.cpp"
- source type (cpp) "Array.cpp"
- source type (cpp) "Auto_Ptr.cpp"
- source type (cpp) "Containers.cpp"
- source type (cpp) "Free_List.cpp"
- source type (cpp) "Hash_Map_Manager.cpp"
- source type (cpp) "Local_Name_Space_T.cpp"
- source type (cpp) "Malloc_T.cpp"
- source type (cpp) "Managed_Object.cpp"
- source type (cpp) "Map_Manager.cpp"
- source type (cpp) "Message_Queue.cpp"
- source type (cpp) "Module.cpp"
- source type (cpp) "Singleton.cpp"
- source type (cpp) "Stream.cpp"
- source type (cpp) "Stream_Modules.cpp"
- source type (cpp) "Synch_T.cpp"
- source type (cpp) "Task_T.cpp"
- source type (cpp) "Timer_Heap_T.cpp"
- source type (cpp) "Timer_Queue_T.cpp"
-
- // Link libraries
- source type (lib) "libtli_r.a"
- source type (lib) "libdl.a"
- source type (lib) "libpthreads.a"
- source type (lib) "libc_r.a"
- // Imports
- source type (imp) "pse.exp"
- }
-}
diff --git a/ace/ace.rc b/ace/ace.rc
deleted file mode 100644
index ede20b12cdf..00000000000
--- a/ace/ace.rc
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "Version.h"
-
-1 VERSIONINFO
- FILEVERSION ACE_MAJOR_VERSION,ACE_MINOR_VERSION,ACE_BETA_VERSION,0
- PRODUCTVERSION ACE_MAJOR_VERSION,ACE_MINOR_VERSION,ACE_BETA_VERSION,0
- FILEFLAGSMASK 0x3fL
- FILEFLAGS 0x0L
- FILEOS 0x4L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904B0"
- BEGIN
- VALUE "FileDescription", "ACE\0"
- VALUE "FileVersion", ACE_VERSION "\0"
- VALUE "InternalName", "ACEDLL\0"
- VALUE "LegalCopyright", "\0"
- VALUE "LegalTrademarks", "\0"
- VALUE "OriginalFilename", "ACE.DLL\0"
- VALUE "ProductName", "ACE\0"
- VALUE "ProductVersion", ACE_VERSION "\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
diff --git a/ace/ace_ce.dsw b/ace/ace_ce.dsw
deleted file mode 100644
index 51d98e25343..00000000000
--- a/ace/ace_ce.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "ace_dll_ce"=.\ace_dll_ce.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/ace/ace_ce_dll.cfg b/ace/ace_ce_dll.cfg
deleted file mode 100644
index 80c479b3205..00000000000
--- a/ace/ace_ce_dll.cfg
+++ /dev/null
@@ -1 +0,0 @@
-WCE_CFG=WCE200; \ No newline at end of file
diff --git a/ace/ace_dll.dsp b/ace/ace_dll.dsp
deleted file mode 100644
index 0ab738009d3..00000000000
--- a/ace/ace_dll.dsp
+++ /dev/null
@@ -1,5616 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ACE DLL" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-# TARGTYPE "Win32 (ALPHA) Dynamic-Link Library" 0x0602
-
-CFG=ACE DLL - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ace_dll.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ace_dll.mak" CFG="ACE DLL - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ACE DLL - Win32 Alpha Release" (based on "Win32 (ALPHA) Dynamic-Link Library")
-!MESSAGE "ACE DLL - Win32 Alpha Debug" (based on "Win32 (ALPHA) Dynamic-Link Library")
-!MESSAGE "ACE DLL - Win32 MFC Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ACE DLL - Win32 MFC Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ACE DLL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "ACE DLL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath "Desktop"
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ""
-# PROP BASE Intermediate_Dir "DLL\Release"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "DLL\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /Gt0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D ACE_HAS_DLL=1 /FD /nologo /MT /Gt0 /W3 /GX /O2 /Ob2 /I "../" /c
-# ADD CPP /nologo /MD /Gt0 /W3 /GX /O2 /Ob2 /I "../" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D ACE_HAS_DLL=1 /FD /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /o /win32 "NUL" "NUL"
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /o /win32 "NUL" "NUL"
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo /o".\ace.bsc"
-# ADD BSC32 /nologo /o".\ace.bsc"
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /pdb:".\ace-r.pdb" /machine:ALPHA /out:"..\bin\ace.dll"
-# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /pdb:".\ace.pdb" /machine:ALPHA /out:"..\bin\ace.dll"
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ""
-# PROP BASE Intermediate_Dir ".\DLL\Debug"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\DLL\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /Gt0 /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D ACE_HAS_DLL=1 /FD /MTd /nologo /Gt0 /W3 /GX /Zi /Od /Gy /I "../" /c
-# ADD CPP /nologo /Gt0 /W3 /GX /Zi /Od /Gy /I "../" /D /"WIN32" /D "_WINDOWS" /D ACE_HAS_DLL=1 /D "_DEBUG" /FD /MDd /c
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /o /win32 "NUL" "NUL"
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /o /win32 "NUL" "NUL"
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo /o".\ace.bsc"
-# ADD BSC32 /nologo /o".\ace.bsc"
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /version:4.4 /subsystem:windows /dll /pdb:".\ace.pdb" /debug /machine:ALPHA /out:"..\bin\aced.dll" /pdbtype:sept
-# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /version:4.4 /subsystem:windows /dll /pdb:".\aced.pdb" /debug /machine:ALPHA /out:"..\bin\aced.dll" /pdbtype:sept
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ACE_DLL___Win32_MFC_Release"
-# PROP BASE Intermediate_Dir "ACE_DLL___Win32_MFC_Release"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "DLL\MFC_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "../" /D ACE_HAS_DLL=1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "../" /D "NDEBUG" /D ACE_HAS_MFC=1 /D ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER=1 /D "WIN32" /D "_WINDOWS" /D ACE_ACE_HAS_DLL=1 /D "ACE_BUILD_DLL" /FR /FD /c
-# SUBTRACT CPP /YX
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo /o".\ace.bsc"
-# ADD BSC32 /nologo /o".\ace.bsc"
-LINK32=link.exe
-# ADD BASE LINK32 advapi32.lib user32.lib /nologo /subsystem:windows /dll /pdb:".\ace-r.pdb" /machine:I386 /out:"..\bin\ace.dll"
-# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 advapi32.lib user32.lib /nologo /subsystem:windows /dll /pdb:".\acemfc.pdb" /machine:I386 /out:"..\bin\acemfc.dll"
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "ACE_DLL___Win32_MFC_Debug"
-# PROP BASE Intermediate_Dir "ACE_DLL___Win32_MFC_Debug"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "DLL\MFC_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Gy /I "../" /D ACE_HAS_DLL=1 /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Gy /I "../" /D "_DEBUG" /D ACE_HAS_MFC=1 /D ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER=1 /D "WIN32" /D "_WINDOWS" /D ACE_ACE_HAS_DLL=1 /D "ACE_BUILD_DLL" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo /o".\ace.bsc"
-# ADD BSC32 /nologo /o".\ace.bsc"
-LINK32=link.exe
-# ADD BASE LINK32 advapi32.lib user32.lib /nologo /version:4.4 /subsystem:windows /dll /pdb:".\ace.pdb" /debug /machine:I386 /out:"..\bin\aced.dll" /pdbtype:sept
-# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 advapi32.lib user32.lib /nologo /version:4.4 /subsystem:windows /dll /pdb:".\acemfcd.pdb" /debug /machine:I386 /out:"..\bin\acemfcd.dll" /pdbtype:sept
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\DLL\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "../" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D ACE_ACE_HAS_DLL=1 /D "ACE_BUILD_DLL" /FD /c
-# SUBTRACT CPP /YX
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
-RSC=rc.exe
-# ADD BASE RSC /l 0x407 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo /o".\ace.bsc"
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 advapi32.lib user32.lib /nologo /subsystem:windows /dll /pdb:".\ace.pdb" /machine:I386 /out:"..\bin\ace.dll"
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ""
-# PROP BASE Intermediate_Dir ".\DLL\Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\DLL\Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Gy /I "../" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D ACE_ACE_HAS_DLL=1 /D "ACE_BUILD_DLL" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
-RSC=rc.exe
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo /o".\ace.bsc"
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 advapi32.lib user32.lib /nologo /version:4.4 /subsystem:windows /dll /pdb:".\aced.pdb" /debug /machine:I386 /out:"..\bin\aced.dll" /pdbtype:sept
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF
-
-# Begin Target
-
-# Name "ACE DLL - Win32 Alpha Release"
-# Name "ACE DLL - Win32 Alpha Debug"
-# Name "ACE DLL - Win32 MFC Release"
-# Name "ACE DLL - Win32 MFC Debug"
-# Name "ACE DLL - Win32 Release"
-# Name "ACE DLL - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp"
-# Begin Source File
-
-SOURCE=.\ACE.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Activation_Queue.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Addr.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Arg_Shifter.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ARGV.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO_Impl.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Addr.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Connector.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Params.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_QoS.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Stream.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_Repository.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Basic_Types.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Capabilities.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\CDR_Stream.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Configuration.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Handler.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Ref.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Date_Time.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Addr.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Connector.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_IO.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dirent.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DLL.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dump.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic_Service.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler_T.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv_Msg.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send_Msg.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Addr.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Connector.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_IO.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Filecache.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Get_Opt.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Handle_Set.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\High_Res_Timer.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\INET_Addr.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_Cntl_Msg.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_SAP.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IPC_SAP.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Name_Space.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Tokens.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Msg.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Record.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_CODgram.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Connector.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Dgram.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Stream.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Addr.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Connector.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_IO.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Mem_Map.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_SAP.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Stream.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Memory_Pool.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Method_Request.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Msg_WFMO_Reactor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Multiplexor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Proxy.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Request_Reply.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Space.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Naming_Context.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\NT_Service.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Object_Manager.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Obstack.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS_Dirent.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pair.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Parse_Node.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pipe.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Priority_Reactor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Proactor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process_Manager.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Profile_Timer.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Manager.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session_Factory.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session_Impl.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Reactor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Read_Buffer.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Registry.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Registry_Name_Space.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remote_Name_Space.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remote_Tokens.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sched_Params.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_Base.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Config.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Manager.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Object.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Repository.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Types.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_MM.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_SV.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Object.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Signal.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_CODgram.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Connector.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Bcast.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast_QoS.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_IO.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Stream.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Addr.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Connector.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Stream.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SString.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stats.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message_Queue.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Complex.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Simple.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Shared_Memory.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Conf_l.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Conf_y.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Handler.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_Options.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\System_Time.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Template_Instantiations.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread_Manager.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Time_Request_Reply.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timeprobe.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Hash.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Heap.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_List.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_Adapters.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Wheel.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Connector.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Stream.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Collection.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Invariants.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Manager.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Request_Reply.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TP_Reactor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Trace.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TTY_IO.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message_Queue.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\UNIX_Addr.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Connector.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Stream.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\WFMO_Reactor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\WIN32_Asynch_IO.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\WIN32_Proactor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\XtReactor.cpp
-
-!IF "$(CFG)" == "ACE DLL - Win32 Alpha Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Alpha Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 MFC Debug"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Release"
-
-!ELSEIF "$(CFG)" == "ACE DLL - Win32 Debug"
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h"
-# Begin Source File
-
-SOURCE=.\Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ACE.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ACE_export.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ace_wchar.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Activation_Queue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Arg_Shifter.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ARGV.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO_Impl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Params.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_QoS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Auto_Ptr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Base_Pointer_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_Repository.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Basic_Types.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cache_Map_Manager_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cached_Connect_Strategy_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Strategies_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Strategy_Utility_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Capabilities.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\CDR_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cleanup_Strategies_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=".\config-all.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\config-all.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\config-win32-common.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\config-win32-msvc.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\config-win32.h"
-# End Source File
-# Begin Source File
-
-SOURCE=.\config.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Configuration.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Ref.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Date_Time.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dirent.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DLL.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dump.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dump_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic_Service.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv_Msg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send_Msg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Filecache.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Free_List.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Future.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Get_Opt.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Handle_Set.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Cache_Map_Manager_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_With_Allocator_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\High_Res_Timer.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\INET_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_Cntl_Msg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_SAP.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\IPC_SAP.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Name_Space.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Name_Space_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Tokens.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Msg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Priority.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Record.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_CODgram.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Dgram.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc_Base.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Managed_Object.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Mem_Map.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_SAP.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Memory_Pool.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Method_Request.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Min_Max.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Module.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Msg_WFMO_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Multiplexor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Proxy.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Request_Reply.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Space.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Naming_Context.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\NT_Service.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Object_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Obstack.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS_Dirent.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pair.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pair_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Parse_Node.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pipe.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\post.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\pre.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Priority_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Proactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Proactor_Impl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Profile_Timer.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session_Factory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session_Impl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\RB_Tree.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Reactor_Impl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReactorEx.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Read_Buffer.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Registry.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Registry_Name_Space.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remote_Name_Space.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remote_Tokens.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sched_Params.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_Base.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Config.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Object.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Repository.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Types.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_MM.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_SV.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Object.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Signal.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Singleton.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_CODgram.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Bcast.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast_QoS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SString.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stats.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\stdcpp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream_Modules.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\streams.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message_Queue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Complex.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Simple.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Shared_Memory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Conf.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Conf_Tokens.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\svc_export.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_Options.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\System_Time.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Time_Request_Reply.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Time_Value.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timeprobe.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Hash.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Hash_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Heap.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Heap_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_List.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_List_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_Adapters.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Wheel.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Wheel_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Collection.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Invariants.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Request_Reply.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TP_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Trace.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TTY_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message_Queue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\UNIX_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Version.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\WFMO_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\WIN32_Asynch_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\WIN32_Proactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ws2tcpip.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\XtReactor.h
-# End Source File
-# End Group
-# Begin Group "Inline Files"
-
-# PROP Default_Filter "i;inl"
-# Begin Source File
-
-SOURCE=.\Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ACE.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Activation_Queue.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ARGV.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO_Impl.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Params.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_QoS.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Atomic_Op.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Auto_Ptr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Basic_Types.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cache_Map_Manager_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cached_Connect_Strategy_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Strategies_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Strategy_Utility_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Capabilities.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\CDR_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cleanup_Strategies_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Handler.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Ref.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Date_Time.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_IO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dirent.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv_Msg.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send_Msg.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_IO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Free_List.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Get_Opt.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Handle_Set.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Cache_Map_Manager_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_With_Allocator_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\High_Res_Timer.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\INET_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_SAP.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\IPC_SAP.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Tokens.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Record.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_CODgram.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Dgram.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Managed_Object.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_IO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Mem_Map.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_SAP.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Memory_Pool.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Module.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Msg_WFMO_Reactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Multiplexor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\NT_Service.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Object_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Obstack.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS_Dirent.inl
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pair_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Parse_Node.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pipe.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Priority_Reactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Proactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Profile_Timer.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session_Impl.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\RB_Tree.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Reactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReactorEx.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Read_Buffer.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remote_Tokens.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sched_Params.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_Base.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Config.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Object.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Repository.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Types.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_MM.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_SV.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Object.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Signal.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Singleton.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_CODgram.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Bcast.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast_QoS.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_IO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SString.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stats.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream_Modules.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message_Queue.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Complex.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Simple.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Shared_Memory.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_Options.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_Adapters.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Collection.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Invariants.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Request_Reply.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\TP_Reactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Trace.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message_Queue.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\UNIX_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\WFMO_Reactor.i
-# End Source File
-# End Group
-# Begin Group "Template Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Acceptor.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_Acceptor.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Auto_Ptr.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cache_Map_Manager_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cached_Connect_Strategy_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Strategies_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Utility_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cleanup_Strategies_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Connector.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dump_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Free_List.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Future.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Cache_Map_Manager_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_With_Allocator_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Name_Space_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Managed_Object.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_Manager.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Module.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pair_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\RB_Tree.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Singleton.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream_Modules.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Hash_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Heap_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_List_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Wheel_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# End Group
-# Begin Group "Documentation"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Readme
-# End Source File
-# Begin Source File
-
-SOURCE=..\Version
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\ace.rc
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/ace/ace_dll_ce.dsp b/ace/ace_dll_ce.dsp
deleted file mode 100644
index 8e1c0368eeb..00000000000
--- a/ace/ace_dll_ce.dsp
+++ /dev/null
@@ -1,697 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ace_dll_ce" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (WCE x86em) Dynamic-Link Library" 0x7f02
-# TARGTYPE "Win32 (WCE SH3) Dynamic-Link Library" 0x8102
-# TARGTYPE "Win32 (WCE MIPS) Dynamic-Link Library" 0x8202
-
-CFG=ace_dll_ce - Win32 (WCE SH3) Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ace_dll_ce.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ace_dll_ce.mak" CFG="ace_dll_ce - Win32 (WCE SH3) Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ace_dll_ce - Win32 (WCE SH3) Release" (based on "Win32 (WCE SH3) Dynamic-Link Library")
-!MESSAGE "ace_dll_ce - Win32 (WCE SH3) Debug" (based on "Win32 (WCE SH3) Dynamic-Link Library")
-!MESSAGE "ace_dll_ce - Win32 (WCE MIPS) Release" (based on "Win32 (WCE MIPS) Dynamic-Link Library")
-!MESSAGE "ace_dll_ce - Win32 (WCE MIPS) Debug" (based on "Win32 (WCE MIPS) Dynamic-Link Library")
-!MESSAGE "ace_dll_ce - Win32 (WCE x86em) Release" (based on "Win32 (WCE x86em) Dynamic-Link Library")
-!MESSAGE "ace_dll_ce - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath "H/PC Ver. 2.00"
-# PROP WCE_FormatVersion "6.0"
-
-!IF "$(CFG)" == "ace_dll_ce - Win32 (WCE SH3) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "WCESH3Rel"
-# PROP BASE Intermediate_Dir "WCESH3Rel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "DLL\Release\SH3"
-# PROP Intermediate_Dir "DLL\Release\SH3"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-PFILE=pfile.exe
-CPP=shcl.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ACE_DLL_CE_EXPORTS" /YX /c
-# ADD CPP /nologo /M$(CECrtMT) /W3 /O2 /I "../" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "ACE_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x409 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /out:"DLL\Release\SH3\ace.dll" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF "$(CFG)" == "ace_dll_ce - Win32 (WCE SH3) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "WCESH3Dbg"
-# PROP BASE Intermediate_Dir "WCESH3Dbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "DLL\Debug\SH3"
-# PROP Intermediate_Dir "DLL\Debug\SH3"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-PFILE=pfile.exe
-CPP=shcl.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_MBCS" /D "_USRDLL" /D "ACE_DLL_CE_EXPORTS" /YX /c
-# ADD CPP /nologo /M$(CECrtMTDebug) /W3 /Zi /Od /I "../" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "ACE_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x409 /r /d "SHx" /d "SH3" /d "_SH3_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /dll /debug /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib winsock.lib corelibc.lib /nologo /dll /debug /machine:SH3 /nodefaultlib:"$(CENoDefaultLib)" /out:"DLL\Debug\SH3\aced.dll" /subsystem:$(CESubsystem) /STACK:65536,4096
-# SUBTRACT LINK32 /pdb:none /nodefaultlib
-
-!ELSEIF "$(CFG)" == "ace_dll_ce - Win32 (WCE MIPS) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ace_dll_ce___Win32__WCE_MIPS__Release"
-# PROP BASE Intermediate_Dir "ace_dll_ce___Win32__WCE_MIPS__Release"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "DLL\Release\MIPS"
-# PROP Intermediate_Dir "DLL\Release\MIPS"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /M$(CECrt) /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "ACE_BUILD_DLL" /YX /QMRWCE /c
-# ADD CPP /nologo /M$(CECrt) /W3 /O2 /I "../" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "ACE_BUILD_DLL" /QMRWCE /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-# ADD RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /dll /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 commctrl.lib coredll.lib /nologo /dll /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /out:"DLL\Release\MIPS\ace.dll" /subsystem:$(CESubsystem)
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "ace_dll_ce - Win32 (WCE MIPS) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "ace_dll_ce___Win32__WCE_MIPS__Debug"
-# PROP BASE Intermediate_Dir "ace_dll_ce___Win32__WCE_MIPS__Debug"
-# PROP BASE Ignore_Export_Lib 0
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "DLL\Debug\MIPS"
-# PROP Intermediate_Dir "DLL\Debug\MIPS"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=clmips.exe
-# ADD BASE CPP /nologo /M$(CECrtDebug) /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "ACE_BUILD_DLL" /YX /QMRWCE /c
-# ADD CPP /nologo /M$(CECrtMTDebug) /W3 /Zi /Od /I "../" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "ACE_BUILD_DLL" /QMRWCE /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-# ADD RSC /l 0x409 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) winsock.lib commctrl.lib coredll.lib /nologo /dll /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
-# ADD LINK32 winsock.lib commctrl.lib coredll.lib /nologo /dll /debug /machine:MIPS /nodefaultlib:"$(CENoDefaultLib)" /out:"DLL\Debug\MIPS\aced.dll" /subsystem:$(CESubsystem)
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF "$(CFG)" == "ace_dll_ce - Win32 (WCE x86em) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "x86emRel"
-# PROP BASE Intermediate_Dir "x86emRel"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "DLL\Release\x86\"
-# PROP Intermediate_Dir "DLL\Release\x86\"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-EMPFILE=empfile.exe
-CPP=cl.exe
-# ADD BASE CPP /nologo /ML /W3 /O2 /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "STRICT" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "NDEBUG" /D "x86" /D "i486" /D "_x86_" /D "_MBCS" /D "_USRDLL" /D "ACE_DLL_CE_EXPORTS" /YX /c
-# ADD CPP /nologo /W3 /O2 /I "../" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "STRICT" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "NDEBUG" /D "x86" /D "i486" /D "_x86_" /D "ACE_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "NDEBUG"
-# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "NDEBUG"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib winsock.lib /nologo /stack:0x10000,0x1000 /dll /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /nodefaultlib /out:"DLL\Release\x86\ace.dll" /windowsce:emulation
-
-!ELSEIF "$(CFG)" == "ace_dll_ce - Win32 (WCE x86em) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "x86emDbg"
-# PROP BASE Intermediate_Dir "x86emDbg"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "DLL\Debug\x86"
-# PROP Intermediate_Dir "DLL\Debug\x86"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-EMPFILE=empfile.exe
-CPP=cl.exe
-# ADD BASE CPP /nologo /MLd /W3 /Gm /Zi /Od /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "STRICT" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "_DEBUG" /D "x86" /D "i486" /D "_x86_" /D "_MBCS" /D "_USRDLL" /D "ACE_DLL_CE_EXPORTS" /YX /c
-# ADD CPP /nologo /W3 /Gm /Zi /Od /I "../" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "STRICT" /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "_DEBUG" /D "x86" /D "i486" /D "_x86_" /D "ACE_BUILD_DLL" /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "_DEBUG" /d "x86" /d "i486" /d "_x86_"
-# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "WIN32" /d "STRICT" /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "_WIN32_WCE_EMULATION" /d "INTERNATIONAL" /d "USA" /d "INTLMSG_CODEPAGE" /d "_DEBUG" /d "x86" /d "i486" /d "_x86_"
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /debug /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /windowsce:emulation
-# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib winsock.lib /nologo /stack:0x10000,0x1000 /dll /debug /machine:I386 /nodefaultlib:"$(CENoDefaultLib)" /nodefaultlib /out:"DLL\Debug\x86\aced.dll" /windowsce:emulation
-
-!ENDIF
-
-# Begin Target
-
-# Name "ace_dll_ce - Win32 (WCE SH3) Release"
-# Name "ace_dll_ce - Win32 (WCE SH3) Debug"
-# Name "ace_dll_ce - Win32 (WCE MIPS) Release"
-# Name "ace_dll_ce - Win32 (WCE MIPS) Debug"
-# Name "ace_dll_ce - Win32 (WCE x86em) Release"
-# Name "ace_dll_ce - Win32 (WCE x86em) Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\ACE.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Activation_Queue.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Addr.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ARGV.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_Repository.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Basic_Types.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DLL.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dump.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Get_Opt.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Handle_Set.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\High_Res_Timer.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\INET_Addr.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_Cntl_Msg.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_SAP.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IPC_SAP.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Msg.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Record.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Mem_Map.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Memory_Pool.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Method_Request.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Object_Manager.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Obstack.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS_Dirent.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Parse_Node.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pipe.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process_Manager.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Profile_Timer.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Reactor.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sched_Params.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_Base.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Config.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Manager.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Object.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Repository.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Types.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Object.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Signal.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Acceptor.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_CODgram.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Connector.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Bcast.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_IO.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Stream.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SString.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stats.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Conf_l.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Conf_y.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_Options.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\System_Time.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread_Manager.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TP_Reactor.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Trace.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\WFMO_Reactor.cpp
-
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\XtReactor.cpp
-
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/ace/ace_lib.dsp b/ace/ace_lib.dsp
deleted file mode 100644
index 2eae774f2ef..00000000000
--- a/ace/ace_lib.dsp
+++ /dev/null
@@ -1,5591 +0,0 @@
-# Microsoft Developer Studio Project File - Name="ACE LIB" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (ALPHA) Static Library" 0x0604
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=ACE LIB - Win32 Static Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "ace_lib.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ace_lib.mak" CFG="ACE LIB - Win32 Static Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ACE LIB - Win32 Alpha Static Release" (based on "Win32 (ALPHA) Static Library")
-!MESSAGE "ACE LIB - Win32 Alpha Static Debug" (based on "Win32 (ALPHA) Static Library")
-!MESSAGE "ACE LIB - Win32 Pharlap ETS Static Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "ACE LIB - Win32 Pharlap ETS Static Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE "ACE LIB - Win32 Static Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "ACE LIB - Win32 Static Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath "Desktop"
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ACE_stat"
-# PROP BASE Intermediate_Dir "ACE_stat"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Lib\Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /Gt0 /W3 /GX /O1 /I "../" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /FD /c
-# ADD CPP /nologo /MT /Gt0 /W3 /GX /O1 /I "../" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D ACE_HAS_DLL=0 /D "ACE_NO_INLINE" /FD /c
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo /o".\ace.bsc"
-# ADD BSC32 /nologo /o".\ace.bsc"
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:".\aces.lib"
-# ADD LIB32 /nologo /out:".\aces.lib"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "ACE_stat"
-# PROP BASE Intermediate_Dir "ACE_stat"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Lib\Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP nologo Gt0 W3 GX Zi Od Gy I "../" D "_DEBUG" D "WIN32" D "_WINDOWS" D ACE_HAS_DLL=0 D "ACE_NO_INLINE" FD c
-# ADD CPP nologo Gt0 W3 GX Zi Od Gy I "../" D "_DEBUG" D "WIN32" D "_WINDOWS" D ACE_HAS_DLL=0 FD MTd c
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo /o".\ace.bsc"
-# ADD BSC32 /nologo /o".\ace.bsc"
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:".\acesd.lib"
-# ADD LIB32 /nologo /out:".\acesd.lib"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ACE_LIB___Win32_PharLap_ETS_Release"
-# PROP BASE Intermediate_Dir "ACE_LIB___Win32_PharLap_ETS_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\LIB\Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /GX /O1 /I "../" /D ACE_HAS_DLL=0 /D "ACE_NO_INLINE" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MT /W3 /GX /O1 /I "../" /D ACE_HAS_DLL=0 /D "ACE_NO_INLINE" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /FD /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x409
-# ADD RSC /l 0x409
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo /o".\ace.bsc"
-# ADD BSC32 /nologo /o".\ace.bsc"
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:".\aces.lib"
-# ADD LIB32 /nologo /out:".\aces.lib"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "ACE_LIB___Win32_PharLap_ETS_Debug"
-# PROP BASE Intermediate_Dir "ACE_LIB___Win32_PharLap_ETS_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\LIB\Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Gy /I "../" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D ACE_HAS_DLL=0 /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /Gy /I "../" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D ACE_HAS_DLL=0 /FD /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x409
-# ADD RSC /l 0x409
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo /o".\ace.bsc"
-# ADD BSC32 /nologo /o".\ace.bsc"
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:".\acesd.lib"
-# ADD LIB32 /nologo /out:".\acesd.lib"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\LIB\Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /G5 /MT /W3 /GX /O1 /I "../" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D ACE_HAS_DLL=0 /D "ACE_NO_INLINE" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O1 /I "../" /D ACE_HAS_DLL=0 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /FD /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x409
-# ADD RSC /l 0x409
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo /o"ace.bsc"
-# ADD BSC32 /nologo /o".\ace.bsc"
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:".\libace-r.lib"
-# ADD LIB32 /nologo /out:".\aces.lib"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ".\LIB\Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /GX /Zi /Od /Gy /I "../" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D ACE_HAS_DLL=0 /D "ACE_NO_INLINE" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /Gy /I "../" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D ACE_HAS_DLL=0 /FD /c
-# SUBTRACT CPP /YX
-RSC=rc.exe
-# ADD BASE RSC /l 0x409
-# ADD RSC /l 0x409
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo /o"ace.bsc"
-# ADD BSC32 /nologo /o".\ace.bsc"
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:".\libace.lib"
-# ADD LIB32 /nologo /out:".\acesd.lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "ACE LIB - Win32 Alpha Static Release"
-# Name "ACE LIB - Win32 Alpha Static Debug"
-# Name "ACE LIB - Win32 Pharlap ETS Static Release"
-# Name "ACE LIB - Win32 Pharlap ETS Static Debug"
-# Name "ACE LIB - Win32 Static Release"
-# Name "ACE LIB - Win32 Static Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp"
-# Begin Source File
-
-SOURCE=.\ACE.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Activation_Queue.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Addr.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Arg_Shifter.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ARGV.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO_Impl.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Addr.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Connector.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Params.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_QoS.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Stream.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_Repository.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Basic_Types.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Capabilities.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\CDR_Stream.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Configuration.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Handler.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Ref.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Date_Time.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Addr.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Connector.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_IO.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dirent.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\DLL.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dump.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic_Service.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler_T.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv_Msg.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send_Msg.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Addr.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Connector.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_IO.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Filecache.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Get_Opt.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Handle_Set.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\High_Res_Timer.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\INET_Addr.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_Cntl_Msg.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_SAP.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\IPC_SAP.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Name_Space.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Tokens.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Msg.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Record.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_CODgram.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Connector.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Dgram.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Stream.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Addr.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Connector.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_IO.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Mem_Map.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_SAP.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Stream.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Memory_Pool.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Method_Request.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Msg_WFMO_Reactor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Multiplexor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Proxy.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Request_Reply.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Space.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Naming_Context.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\NT_Service.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Object_Manager.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Obstack.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS_Dirent.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pair.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Parse_Node.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pipe.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Priority_Reactor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Proactor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process_Manager.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Profile_Timer.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Manager.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session_Factory.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session_Impl.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Reactor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Read_Buffer.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Registry.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Registry_Name_Space.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remote_Name_Space.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remote_Tokens.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sched_Params.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_Base.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Config.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Manager.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Object.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Repository.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Types.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_MM.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_SV.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Object.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Signal.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_CODgram.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Connector.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Bcast.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast_QoS.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_IO.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Stream.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Addr.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Connector.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Stream.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SString.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stats.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message_Queue.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Complex.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Simple.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Shared_Memory.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Conf_l.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Conf_y.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Handler.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_Options.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\System_Time.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Template_Instantiations.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread_Manager.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Time_Request_Reply.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timeprobe.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Hash.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Heap.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_List.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_Adapters.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Wheel.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Connector.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Stream.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Collection.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Invariants.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Manager.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Request_Reply.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TP_Reactor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Trace.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\TTY_IO.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message_Queue.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\UNIX_Addr.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Acceptor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Connector.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Stream.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\WFMO_Reactor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\WIN32_Asynch_IO.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\WIN32_Proactor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\XtReactor.cpp
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h"
-# Begin Source File
-
-SOURCE=.\Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ACE.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ACE_export.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ace_wchar.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Activation_Queue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Arg_Shifter.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ARGV.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO_Impl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Params.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_QoS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Auto_Ptr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Base_Pointer_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_Repository.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Basic_Types.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cache_Map_Manager_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cached_Connect_Strategy_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Strategies_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Strategy_Utility_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Capabilities.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\CDR_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cleanup_Strategies_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=".\config-all.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\config-all.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\config-win32-common.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\config-win32-msvc.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\config-win32.h"
-# End Source File
-# Begin Source File
-
-SOURCE=.\config.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Configuration.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Ref.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Date_Time.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dirent.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\DLL.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dump.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dump_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic_Service.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv_Msg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send_Msg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Filecache.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Free_List.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Future.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Get_Opt.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Handle_Set.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Cache_Map_Manager_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_With_Allocator_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\High_Res_Timer.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\INET_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_Cntl_Msg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_SAP.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\IPC_SAP.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Name_Space.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Name_Space_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Tokens.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Msg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Priority.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Record.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_CODgram.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Dgram.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc_Base.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Managed_Object.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Mem_Map.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_SAP.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Memory_Pool.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Method_Request.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Min_Max.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Module.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Msg_WFMO_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Multiplexor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Proxy.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Request_Reply.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Name_Space.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Naming_Context.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\NT_Service.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Object_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Obstack.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS_Dirent.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pair.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pair_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Parse_Node.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pipe.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\post.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\pre.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Priority_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Proactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Proactor_Impl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Profile_Timer.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session_Factory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session_Impl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\RB_Tree.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Reactor_Impl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReactorEx.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Read_Buffer.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Registry.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Registry_Name_Space.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remote_Name_Space.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remote_Tokens.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sched_Params.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_Base.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Config.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Object.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Repository.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Types.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_MM.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_SV.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Object.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Signal.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Singleton.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_CODgram.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Bcast.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast_QoS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SString.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stats.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\stdcpp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream_Modules.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\streams.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message_Queue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Complex.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Simple.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Shared_Memory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Conf.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Conf_Tokens.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\svc_export.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Svc_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_Options.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\System_Time.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Time_Request_Reply.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Time_Value.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timeprobe.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Hash.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Hash_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Heap.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Heap_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_List.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_List_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_Adapters.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Wheel.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Wheel_T.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Collection.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Invariants.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Manager.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Request_Reply.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TP_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Trace.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\TTY_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message_Queue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\UNIX_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Acceptor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Addr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Connector.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Stream.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Version.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\WFMO_Reactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\WIN32_Asynch_IO.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\WIN32_Proactor.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ws2tcpip.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\XtReactor.h
-# End Source File
-# End Group
-# Begin Group "Inline Files"
-
-# PROP Default_Filter "i;inl"
-# Begin Source File
-
-SOURCE=.\Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ACE.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Activation_Queue.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ARGV.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_IO_Impl.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Params.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_QoS.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ATM_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Atomic_Op.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Auto_Ptr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Basic_Types.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cache_Map_Manager_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cached_Connect_Strategy_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Strategies_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Strategy_Utility_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Capabilities.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\CDR_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cleanup_Strategies_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Configuration.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Handler.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\CORBA_Ref.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Date_Time.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\DEV_IO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dirent.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dynamic.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Event_Handler.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Recv_Msg.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FIFO_Send_Msg.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\FILE_IO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Free_List.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Get_Opt.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Handle_Set.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Cache_Map_Manager_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_With_Allocator_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\High_Res_Timer.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\INET_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\IO_SAP.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\IPC_SAP.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Tokens.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Log_Record.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_CODgram.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Dgram.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\LSOCK_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Managed_Object.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_IO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Mem_Map.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_SAP.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\MEM_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Memory_Pool.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Module.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Msg_WFMO_Reactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Multiplexor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\NT_Service.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Object_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Obstack.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\OS_Dirent.inl
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pair_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Parse_Node.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pipe.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Priority_Reactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Proactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Process_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Profile_Timer.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Session_Impl.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\RB_Tree.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Reactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReactorEx.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Read_Buffer.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Remote_Tokens.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sched_Params.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_Base.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Config.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Object.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Repository.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Service_Types.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_MM.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Memory_SV.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Shared_Object.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Signal.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Singleton.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_CODgram.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Bcast.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Dgram_Mcast_QoS.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_IO.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SOCK_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SPIPE_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SString.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stats.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream_Modules.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Message_Queue.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Complex.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Semaphore_Simple.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\SV_Shared_Memory.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_Options.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Thread_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_Adapters.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_T.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\TLI_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Collection.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Invariants.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Manager.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Token_Request_Reply.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\TP_Reactor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Trace.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\Typed_SV_Message_Queue.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\UNIX_Addr.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Acceptor.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Connector.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\UPIPE_Stream.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\WFMO_Reactor.i
-# End Source File
-# End Group
-# Begin Group "Template Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Acceptor.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Active_Map_Manager_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Asynch_Acceptor.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Auto_Ptr.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Based_Pointer_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cache_Map_Manager_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cached_Connect_Strategy_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Strategies_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Caching_Utility_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Cleanup_Strategies_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Connector.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Containers_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Dump_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Free_List.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Functor_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Future.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Cache_Map_Manager_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_Manager_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Hash_Map_With_Allocator_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\IOStream_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Local_Name_Space_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Malloc_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Managed_Object.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_Manager.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Map_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Block_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Message_Queue_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Module.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Pair_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\RB_Tree.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Select_Reactor_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Singleton.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Strategies_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Stream_Modules.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Synch_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Task_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Hash_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Heap_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_List_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Queue_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\Timer_Wheel_T.cpp
-# PROP Exclude_From_Build 1
-# End Source File
-# End Group
-# Begin Group "Documentation"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Readme
-# End Source File
-# Begin Source File
-
-SOURCE=..\Version
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\ace.rc
-
-!IF "$(CFG)" == "ACE LIB - Win32 Alpha Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Alpha Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Pharlap ETS Static Debug"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Release"
-
-!ELSEIF "$(CFG)" == "ACE LIB - Win32 Static Debug"
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/ace/ace_wchar.h b/ace/ace_wchar.h
deleted file mode 100644
index 3a54012b45c..00000000000
--- a/ace/ace_wchar.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// unicode.h
-//
-// = AUTHOR
-// Darrell Brunsch
-//
-// ============================================================================
-
-#ifndef ACE_WCHAR_H
-#define ACE_WCHAR_H
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// These macros have been deprecated and should be replaced by their
-// ACE_TEXT_* equivalents. These macros are just hacks and may not
-// completely provide the old functionality.
-#if !defined (ACE_ONLY_LATEST_AND_GREATEST)
-// Convert the old unicode indicators
-# if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
-# define ACE_USES_WCHAR
-# endif /* ACE_HAS_MOSTLY_UNICODE_APIS */
-# if defined (ACE_HAS_UNICODE)
-# define ACE_HAS_WCHAR
-# endif /* ACE_HAS_UNICODE */
-
-// These are defined to get older stuff to compile
-# define ASYS_TCHAR ACE_TCHAR
-# define ASYS_TEXT ACE_TEXT
-# define ASYS_ONLY_MULTIBYTE_STRING ACE_TEXT_ALWAYS_CHAR
-# define ASYS_MULTIBYTE_STRING ACE_TEXT_CHAR_TO_TCHAR
-# define ASYS_WIDE_STRING ACE_TEXT_CHAR_TO_TCHAR
-# define ACE_WIDE_STRING ACE_TEXT_CHAR_TO_TCHAR
-# define ACE_DIRECTORY_SEPARATOR_CHAR_A ACE_DIRECTORY_SEPARATOR_CHAR
-
-# if defined (ACE_USES_WCHAR)
-# define ASYS_ONLY_WIDE_STRING(STRING) STRING
-# else /* ACE_USES_WCHAR */
-# define ASYS_ONLY_WIDE_STRING(STRING) ACE_Ascii_To_Wide (STRING).wchar_rep ()
-# endif /* ACE_USES_WCHAR */
-
-# define ACE_TEXT_STRING ACE_TString
-
-# if !defined (ACE_WIN32)
-# if (defined (ACE_HAS_UNICODE) && (defined (UNICODE)))
-typedef const wchar_t *LPCTSTR;
-typedef wchar_t *LPTSTR;
-typedef wchar_t TCHAR;
-# else
-typedef const char *LPCTSTR;
-typedef char *LPTSTR;
-typedef char TCHAR;
-# endif /* ACE_HAS_UNICODE && UNICODE */
-# endif /* ACE_WIN32 */
-
-#endif /* ACE_ONLY_LATEST_AND_GREATEST */
-
-#if defined (ACE_HAS_WCHAR)
-# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && \
- (ACE_HAS_STANDARD_CPP_LIBRARY != 0)
-# include /**/ <cwchar>
-# elif !defined (__BORLANDC__) && !defined (ACE_HAS_WINCE)
-# include /**/ <wchar.h>
-# endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
-#elif defined (ACE_HAS_XPG4_MULTIBYTE_CHAR)
-# include /**/ <wchar.h>
-#endif
-
-
-// Define the unicode/wchar related macros correctly
-
-#if defined (ACE_USES_WCHAR)
-typedef wchar_t ACE_TCHAR;
-# define ACE_TEXT(STRING) L##STRING
-# define ACE_TEXT_ALWAYS_CHAR(STRING) ACE_Wide_To_Ascii (STRING).char_rep ()
-# define ACE_TEXT_CHAR_TO_TCHAR(STRING) ACE_Ascii_To_Wide (STRING).wchar_rep ()
-#else /* ACE_USES_WCHAR */
-typedef char ACE_TCHAR;
-# define ACE_TEXT(STRING) STRING
-# define ACE_TEXT_ALWAYS_CHAR(STRING) STRING
-# define ACE_TEXT_CHAR_TO_TCHAR(STRING) STRING
-#endif /* ACE_USES_WCHAR */
-
-#if defined ACE_HAS_WCHAR
-class ACE_Wide_To_Ascii
-{
- // = TITLE
- // A lightweight wchar* to char* string conversion class.
- //
- // = DESCRIPTION
- // The purpose of this class is to perform conversion from
- // wchar* to char* strings. It is not intended for general
- // purpose use.
-public:
- ACE_Wide_To_Ascii (const wchar_t *s) : s_ (ACE_Wide_To_Ascii::convert (s)) {}
- // Ctor must take a wchar string.
-
- ~ACE_Wide_To_Ascii (void) { delete [] this->s_; }
- // Dtor will free up the memory.
-
- char *char_rep (void) { return this->s_; }
- // Return the internal char* representation.
-
- static char *convert (const wchar_t *wstr)
- // Converts an wchar_t string to ascii and returns a new string.
- {
-# if defined (ACE_WIN32)
- size_t len = ::WideCharToMultiByte (CP_OEMCP, 0, wstr, -1,
- NULL, 0, NULL, NULL);
-# else
- size_t len = ::wcslen (wstr) + 1;
-# endif
-
- char *str = new char[len];
-
-# if defined (ACE_WIN32)
- ::WideCharToMultiByte (CP_OEMCP, 0, wstr, -1, str, len, NULL, NULL);
-# else /* ACE_WIN32 */
- for (size_t i = 0; i < len; i++)
- {
- wchar_t *t = ACE_const_cast (wchar_t *, wstr);
- str[i] = ACE_static_cast (char, *(t + i));
- }
-# endif /* ACE_WIN32 */
- return str;
- }
-
-private:
- char *s_;
- // Internal pointer to the converted string.
-
- ACE_Wide_To_Ascii (void);
- ACE_Wide_To_Ascii (ACE_Wide_To_Ascii &);
- ACE_Wide_To_Ascii& operator= (ACE_Wide_To_Ascii &);
- // Disallow these operation.
-};
-
-class ACE_Ascii_To_Wide
-{
- // = TITLE
- // A lightweight char* to wchar* string conversion class.
- //
- // = DESCRIPTION
- // The purpose of this class is to perform conversion from
- // char* to wchar* strings. It is not intended for general
- // purpose use.
-public:
- ACE_Ascii_To_Wide (const char *s) : s_ (ACE_Ascii_To_Wide::convert (s)) {}
- // Ctor must take a wchar string.
-
- ~ACE_Ascii_To_Wide (void) { delete [] this->s_; }
- // Dtor will free up the memory.
-
- wchar_t *wchar_rep (void) { return this->s_; }
- // Return the internal wchar* representation.
-
- static wchar_t *convert (const char *str)
- // Converts an char string to unicode/wide and returns a new string.
- {
-# if defined (ACE_WIN32)
- size_t len = ::MultiByteToWideChar (CP_OEMCP, 0, str, -1, NULL, 0);
-# else /* ACE_WIN32 */
- size_t len = strlen (str) + 1;
-# endif /* ACE_WIN32 */
-
- wchar_t *wstr = new wchar_t[len];
-
-# if defined (ACE_WIN32)
- ::MultiByteToWideChar (CP_OEMCP, 0, str, -1, wstr, len);
-# else /* ACE_WIN32 */
- for (size_t i = 0; i < len; i++)
- {
- char *t = ACE_const_cast (char *, str);
- wstr[i] = ACE_static_cast (wchar_t, *(t + i));
- }
-# endif /* ACE_WIN32 */
- return wstr;
- }
-private:
- wchar_t *s_;
- // Internal pointer to the converted string.
-
- ACE_Ascii_To_Wide (void);
- ACE_Ascii_To_Wide (ACE_Ascii_To_Wide &);
- ACE_Ascii_To_Wide operator= (ACE_Ascii_To_Wide &);
- // Disallow these operation.
-};
-
-#endif /* ACE_HAS_WCHAR */
-
-#if defined (ACE_WIN32)
-#if defined (ACE_USES_WCHAR)
-#define ACE_TEXT_STARTUPINFO STARTUPINFOW
-#define ACE_TEXT_WIN32_FIND_DATA WIN32_FIND_DATAW
-
-#define ACE_TEXT_CreateEvent ::CreateEventW
-#define ACE_TEXT_CreateFile ::CreateFileW
-#define ACE_TEXT_CreateFileMapping ::CreateFileMappingW
-#define ACE_TEXT_CreateMutex ::CreateMutexW
-#define ACE_TEXT_CreateProcess ::CreateProcessW
-#define ACE_TEXT_CreateSemaphore ::CreateSemaphoreW
-#define ACE_TEXT_CreateService ::CreateServiceW
-#define ACE_TEXT_ExpandEnvironmentStrings ::ExpandEnvironmentStringsW
-#define ACE_TEXT_FindFirstFile ::FindFirstFileW
-#define ACE_TEXT_FindNextFile ::FindNextFileW
-#define ACE_TEXT_FormatMessage ::FormatMessageW
-#define ACE_TEXT_FreeEnvironmentStrings ::FreeEnvironmentStringsW
-#define ACE_TEXT_GetComputerName ::GetComputerNameW
-#define ACE_TEXT_GetModuleFileName ::GetModuleFileNameW
-#define ACE_TEXT_GetTempPath ::GetTempPathW
-#define ACE_TEXT_GetUserName ::GetUserNameW
-#define ACE_TEXT_LoadLibrary ::LoadLibraryW
-#define ACE_TEXT_OpenSCManager ::OpenSCManagerW
-#define ACE_TEXT_OpenService ::OpenServiceW
-#define ACE_TEXT_RegConnectRegistry ::RegConnectRegistryW
-#define ACE_TEXT_RegCreateKeyEx ::RegCreateKeyExW
-#define ACE_TEXT_RegDeleteKey ::RegDeleteKeyW
-#define ACE_TEXT_RegDeleteValue ::RegDeleteValueW
-#define ACE_TEXT_RegEnumKeyEx ::RegEnumKeyExW
-#define ACE_TEXT_RegEnumValue ::RegEnumValueW
-#define ACE_TEXT_RegOpenKey ::RegOpenKeyW
-#define ACE_TEXT_RegOpenKeyEx ::RegOpenKeyExW
-#define ACE_TEXT_RegQueryValueEx ::RegQueryValueExW
-#define ACE_TEXT_RegSetValueEx ::RegSetValueExW
-#define ACE_TEXT_StartService ::StartServiceW
-
-#else /* ACE_USES_WCHAR */
-#define ACE_TEXT_STARTUPINFO STARTUPINFOA
-#define ACE_TEXT_WIN32_FIND_DATA WIN32_FIND_DATAA
-
-#define ACE_TEXT_CreateEvent ::CreateEventA
-#define ACE_TEXT_CreateFile ::CreateFileA
-#define ACE_TEXT_CreateFileMapping ::CreateFileMappingA
-#define ACE_TEXT_CreateMutex ::CreateMutexA
-#define ACE_TEXT_CreateProcess ::CreateProcessA
-#define ACE_TEXT_CreateSemaphore ::CreateSemaphoreA
-#define ACE_TEXT_CreateService ::CreateServiceA
-#define ACE_TEXT_ExpandEnvironmentStrings ::ExpandEnvironmentStringsA
-#define ACE_TEXT_FindFirstFile ::FindFirstFileA
-#define ACE_TEXT_FindNextFile ::FindNextFileA
-#define ACE_TEXT_FormatMessage ::FormatMessageA
-#define ACE_TEXT_FreeEnvironmentStrings ::FreeEnvironmentStringsA
-#define ACE_TEXT_GetComputerName ::GetComputerNameA
-#define ACE_TEXT_GetModuleFileName ::GetModuleFileNameA
-#define ACE_TEXT_GetTempPath ::GetTempPathA
-#define ACE_TEXT_GetUserName ::GetUserNameA
-#define ACE_TEXT_LoadLibrary ::LoadLibraryA
-#define ACE_TEXT_OpenSCManager ::OpenSCManagerA
-#define ACE_TEXT_OpenService ::OpenServiceA
-#define ACE_TEXT_RegConnectRegistry ::RegConnectRegistryA
-#define ACE_TEXT_RegCreateKeyEx ::RegCreateKeyExA
-#define ACE_TEXT_RegDeleteKey ::RegDeleteKeyA
-#define ACE_TEXT_RegDeleteValue ::RegDeleteValueA
-#define ACE_TEXT_RegEnumKeyEx ::RegEnumKeyExA
-#define ACE_TEXT_RegEnumValue ::RegEnumValueA
-#define ACE_TEXT_RegOpenKey ::RegOpenKeyA
-#define ACE_TEXT_RegOpenKeyEx ::RegOpenKeyExA
-#define ACE_TEXT_RegQueryValueEx ::RegQueryValueExA
-#define ACE_TEXT_RegSetValueEx ::RegSetValueExA
-#define ACE_TEXT_StartService ::StartServiceA
-#endif /* ACE_USES_WCHAR */
-#endif /* ACE_WIN32 */
-
-#endif /* ACE_WCHAR_H */
diff --git a/ace/config-WinCE.h b/ace/config-WinCE.h
deleted file mode 100644
index 22adbb0a658..00000000000
--- a/ace/config-WinCE.h
+++ /dev/null
@@ -1,201 +0,0 @@
-// $Id$
-
-#ifndef ACE_CONFIG_WINCE_H
-#define ACE_CONFIG_WINCE_H
-#include "ace/pre.h"
-
-#if !defined (ACE_HAS_WINCE)
-#define ACE_HAS_WINCE 1
-#endif
-
-// Only DLL version is supported on CE.
-#if defined (ACE_HAS_DLL)
-# undef ACE_HAS_DLL
-#endif /* ACE_HAS_DLL */
-#define ACE_HAS_DLL 1
-
-// Need to define LD search path explicitly on CE because
-// CE doesn't have environment variables and we can't get
-// the information using getenv.
-#define ACE_DEFAULT_LD_SEARCH_PATH ACE_TEXT (".\\;\\windows")
-
-// CE is not NT.
-#if defined (ACE_HAS_WINNT4)
-# undef ACE_HAS_WINNT4
-#endif /* ACE_HAS_WINNT4 */
-#define ACE_HAS_WINNT4 0
-
-#define ACE_LACKS_ACE_TOKEN
-#define ACE_LACKS_ACE_OTHER
-#define ACE_LACKS_MSG_WFMO
-
-// You must use MFC with ACE on CE.
-//#if defined (ACE_HAS_MFC) && (ACE_HAS_MFC != 0)
-//# undef ACE_HAS_MFC
-//#endif /* ACE_HAS_MFC */
-//#define ACE_HAS_MFC 1
-
-#define ACE_HAS_WCHAR
-
-#if !defined (ACE_USES_WCHAR)
-#define ACE_USES_WCHAR
-#endif /* ACE_USES_WCHAR */
-
-#define ACE_USES_WINCE_SEMA_SIMULATION
-
-#define ACE_LACKS_IOSTREAM_TOTALLY
-
-#if defined (ACE_HAS_STRICT)
-# undef ACE_HAS_STRICT
-#endif /* ACE_HAS_STRICT */
-#define ACE_HAS_STRICT 1
-
-#define ACE_HAS_NONSTATIC_OBJECT_MANAGER 1
-
-// FILE stuff isn't always defined in CE
-#ifndef _FILE_DEFINED
-typedef void FILE;
-#define _FILE_DEFINED
-#endif /* _FILE_DEFINED */
-
-// This was defined in previous versions of CE, but not 2.11
-#define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
-
-// We need to rename program entry name "main" with ace_ce_main here
-// so that we can call it from CE's bridge class.
-#define ACE_MAIN ace_ce_main
-#define ACE_MAIN_OBJECT_MANAGER
-
-// SH3 cross-compiler can't handle inline functions correctly
-// (along with other bugs.)
-#if defined (SH3) && defined (DEBUG)
-#define ACE_LACKS_INLINE_FUNCTIONS
-#endif /* SH3 && _DEBUG */
-
-#ifndef ACE_DEFAULT_SERVER_HOST
-# define ACE_DEFAULT_SERVER_HOST L"localhost"
-#endif /* ACE_DEFAULT_SERVER_HOST */
-
-// @@ Need to remap every function that uses any of these flags to
-// Win32 API. These are for ANSI styled function and are not
-// available on WinCE.
-
-#define _O_RDONLY 0x0000 /* open for reading only */
-#define _O_WRONLY 0x0001 /* open for writing only */
-#define _O_RDWR 0x0002 /* open for reading and writing */
-#define _O_APPEND 0x0008 /* writes done at eof */
-
-#define _O_CREAT 0x0100 /* create and open file */
-#define _O_TRUNC 0x0200 /* open and truncate */
-#define _O_EXCL 0x0400 /* open only if file doesn't already exist */
-
-/* O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s,
-** and <lf> sequences translated to <cr><lf> on write()'s
-*/
-
-#define _O_TEXT 0x4000 /* file mode is text (translated) */
-#define _O_BINARY 0x8000 /* file mode is binary (untranslated) */
-
-/* macro to translate the C 2.0 name used to force binary mode for files */
-
-//#define _O_RAW _O_BINARY
-
-/* Open handle inherit bit */
-
-//#define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */
-
-/* Temporary file bit - file is deleted when last handle is closed */
-
-#define _O_TEMPORARY 0x0040 /* temporary file bit */
-
-/* temporary access hint */
-
-//#define _O_SHORT_LIVED 0x1000 /* temporary storage file, try not to flush */
-
-/* sequential/random access hints */
-
-//#define _O_SEQUENTIAL 0x0020 /* file access is primarily sequential */
-//#define _O_RANDOM 0x0010 /* file access is primarily random */
-
-
-// Non-ANSI names
-#define O_RDONLY _O_RDONLY
-#define O_WRONLY _O_WRONLY
-#define O_RDWR _O_RDWR
-#define O_APPEND _O_APPEND
-#define O_CREAT _O_CREAT
-#define O_TRUNC _O_TRUNC
-#define O_EXCL _O_EXCL
-#define O_TEXT _O_TEXT
-#define O_BINARY _O_BINARY
-//#define O_RAW _O_BINARY
-#define O_TEMPORARY _O_TEMPORARY
-//#define O_NOINHERIT _O_NOINHERIT
-//#define O_SEQUENTIAL _O_SEQUENTIAL
-//#define O_RANDOM _O_RANDOM
-
-
-// @@ NSIG value. This is definitely not correct.
-#define NSIG 23
-
-
-// @@ For some reason, WinCE forgot to define this.
-// Need to find out what it is. (Used in MapViewOfFile ().)
-#define FILE_MAP_COPY 0
-
-
-#define ACE_LACKS_STRCASECMP // WinCE doesn't support _stricmp
-#define ACE_LACKS_GETSERVBYNAME
-#define ACE_LACKS_ACCESS
-#define ACE_LACKS_FILELOCKS
-#define ACE_LACKS_EXEC
-#define ACE_LACKS_MKTEMP
-#define ACE_LACKS_STRRCHR
-#define ACE_LACKS_BSEARCH
-#define ACE_LACKS_SOCKET_BUFSIZ
-#define ACE_LACKS_ISATTY
-
-// @@ Followings are used to keep existing programs happy.
-
-#define ostream FILE
-#if !defined (BUFSIZ)
-# define BUFSIZ 1024
-#endif /* BUFSIZ */
-
-typedef void (*__sighandler_t)(int); // keep Signal compilation happy
-typedef long off_t;
-
-#if defined (UNDER_CE) && (UNDER_CE > 200)
-#define EMFILE WSAEMFILE
-#define EINTR WSAEINTR
-#define EACCES ERROR_ACCESS_DENIED
-#define ENOSPC ERROR_HANDLE_DISK_FULL
-#define EEXIST ERROR_FILE_EXISTS
-#define EPIPE ERROR_BROKEN_PIPE
-#define EFAULT WSAEFAULT
-#define ENOENT WSAEINVAL
-#define EINVAL WSAEINVAL
-#define ERANGE WSAEINVAL
-#define EAGAIN WSAEWOULDBLOCK
-#define ENOMEM ERROR_OUTOFMEMORY
-#define ENODEV ERROR_BAD_DEVICE
-#define ACE_LACKS_MALLOC_H // We do have malloc.h, but don't use it.
-#endif /* UNDER_CE && UNDER_CE > 201 */
-
-#if defined (UNDER_CE) && (UNDER_CE >= 211)
-#define ACE_HAS_WINCE_BROKEN_ERRNO
-#define _MAX_FNAME 255
-#endif /* UNDER_CE && UNDER_CE >= 211 */
-
-#define ACE_HAS_STRDUP_EMULATION
-
-// @@ This needs to be defined and initialized as a static. (Singleton?)
-#define ACE_DEFAULT_LOG_STREAM 0
-
-// If you don't use MFC, this doesn't get defined
-#if !defined (ACE_HAS_MFC)
-inline void *operator new (unsigned int, void *p) { return p; }
-#endif /* ACE_HAS_MFC */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_WINCE_H */
diff --git a/ace/config-aix-3.2.5.h b/ace/config-aix-3.2.5.h
deleted file mode 100644
index f6fd6be24db..00000000000
--- a/ace/config-aix-3.2.5.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for AIX 3.2.5
-// with xlC. Thanks to Bob Olson <olson@mcs.anl.gov> for this.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-/*#define ACE_HAS_PTHREADS*/
-
-#define MAXNAMELEN 1024
-
-#define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#define ACE_HAS_TEMPLATE_TYPEDEFS
-#define ACE_HAS_STRERROR
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_SSIZE_T
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_POLL
-#define ACE_HAS_POSIX_NONBLOCK
-#define ACE_HAS_AIX_GETTIMEOFDAY
-#define ACE_HAS_NO_SYSCALL_H
-#define ACE_NEEDS_DEV_IO_CONVERSION
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Compiler/platform uses old malloc()/free() prototypes (ugh).
-#define ACE_HAS_OLD_MALLOC
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports struct strbuf
-#define ACE_HAS_STRBUF_T
-
-// Platform supports STREAMS.
-/*#define ACE_HAS_STREAMS*/
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-aix-4.1.x.h b/ace/config-aix-4.1.x.h
deleted file mode 100644
index 9c2baafd739..00000000000
--- a/ace/config-aix-4.1.x.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef ACE_AIX_MAJOR_VERS
-# define ACE_AIX_MAJOR_VERS 4
-#endif
-#if !defined (ACE_AIX_MINOR_VERS)
-# define ACE_AIX_MINOR_VERS 1
-#endif
-
-#include "ace/config-aix-4.x.h"
diff --git a/ace/config-aix-4.2.x.h b/ace/config-aix-4.2.x.h
deleted file mode 100644
index dbf51bbb06c..00000000000
--- a/ace/config-aix-4.2.x.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef ACE_AIX_MAJOR_VERS
-# define ACE_AIX_MAJOR_VERS 4
-#endif
-#if !defined (ACE_AIX_MINOR_VERS)
-# define ACE_AIX_MINOR_VERS 2
-#endif
-
-#include "ace/config-aix-4.x.h"
diff --git a/ace/config-aix-4.3.x.h b/ace/config-aix-4.3.x.h
deleted file mode 100644
index 55b3818809a..00000000000
--- a/ace/config-aix-4.3.x.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef ACE_AIX_MAJOR_VERS
-# define ACE_AIX_MAJOR_VERS 4
-#endif
-#if !defined (ACE_AIX_MINOR_VERS)
-# define ACE_AIX_MINOR_VERS 3
-#endif
-
-#include "ace/config-aix-4.x.h"
diff --git a/ace/config-aix-4.x.h b/ace/config-aix-4.x.h
deleted file mode 100644
index 6668f0ba156..00000000000
--- a/ace/config-aix-4.x.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for OS
-// platforms running AIX 4.x using the IBM C++ compiler (xlC) or
-// g++/egcs.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if defined (__xlC__) || (__IBMCPP__)
- // AIX xlC, IBM C/C++, and Visual Age C++ compilers
- //********************************************************************
- //
- // Compiler-related definitions. These are set for C Set ++ V3
-# define ACE_HAS_EXCEPTIONS
- // Compiler supports the ssize_t typedef.
-# define ACE_HAS_SSIZE_T
-
-// When using the preprocessor, Ignore info msg; invalid #pragma
-# if defined (__IBMCPP__) && (__IBMCPP__ < 400) // IBM C++ 3.6
-# define ACE_CC_PREPROCESSOR_ARGS "-E -qflag=w:w"
-# endif /* (__IBMCPP__) && (__IBMCPP__ < 400) */
-
- // Keep an eye on this as the compiler and standards converge...
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF
-# define ACE_LACKS_PRAGMA_ONCE
-
- // C Set++ 3.1 and IBM C/C++ 3.6
-# if defined (__xlC__)
-# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
-# define ACE_TEMPLATES_REQUIRE_PRAGMA
- // If compiling without thread support, turn off ACE's thread capability.
-# if !defined (_THREAD_SAFE)
-# define ACE_HAS_THREADS 0
-# endif /* _THREAD_SAFE */
-# endif
-
- // These are for Visual Age C++ only
-# if defined (__IBMCPP__) && (__IBMCPP__ >= 400)
-# define ACE_TEMPLATES_REQUIRE_SOURCE
-# define ACE_HAS_STD_TEMPLATE_SPECIALIZATION
-# define ACE_HAS_TYPENAME_KEYWORD
-# undef WIFEXITED
-# undef WEXITSTATUS
-# endif /* __IBMCPP__ */
-
-#elif defined (__GNUG__)
- // config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
- // this must appear before its #include.
-# define ACE_HAS_STRING_CLASS
-
-# include "ace/config-g++-common.h"
- // Denotes that GNU has cstring.h as standard, to redefine memchr().
-# define ACE_HAS_GNU_CSTRING_H
-# define ACE_HAS_SSIZE_T
-
-# if !defined (ACE_MT_SAFE) || ACE_MT_SAFE != 0
- // ACE_MT_SAFE is #defined below, for all compilers.
-# if !defined (_REENTRANT)
-# define _REENTRANT
-# endif /* _REENTRANT */
-# endif /* !ACE_MT_SAFE */
-
-#else /* ! __xlC__ && ! __GNUG__ */
-# error unsupported compiler in ace/config-aix-4.x.h
-#endif /* ! __xlC__ && ! __GNUG__ */
-
-
-// Compiling for AIX.
-#ifndef AIX
-# define AIX
-#endif /* AIX */
-
-// Use BSD 4.4 socket definitions for pre-AIX 4.2. The _BSD setting also
-// controls the data type used for waitpid(), wait(), and wait3().
-#if (ACE_AIX_MINOR_VERS < 2)
-# define _BSD 44
-# define ACE_HAS_UNION_WAIT
-#endif /* ACE_AIX_MINOR_VERS < 3 */
-
-// This environment requires this thing, pre-AIX 4.3
-#if (ACE_AIX_MINOR_VERS < 3)
-# define _BSD_INCLUDES
-#endif /* ACE_AIX_MINOR_VERS < 3 */
-
-#define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-
-// ACE_HAS_AIX_BROKEN_SOCKET_HEADER may be required if your OS patches are
-// not up to date. On up-to-date 4.2+ systems, it should not be required.
-// 4.2+ has 4.4 BSD sendmsg/recvmsg
-#if (ACE_AIX_MINOR_VERS < 2)
-# define ACE_HAS_AIX_BROKEN_SOCKET_HEADER
-#else
-# define ACE_HAS_SIZET_SOCKET_LEN
-# define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-#endif /* ACE_AIX_MINOR_VERS < 2 */
-
-#define ACE_HAS_AIX_HI_RES_TIMER
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#if (ACE_AIX_MINOR_VERS < 3)
-# define ACE_HAS_CHARPTR_DL
-#endif /* ACE_AIX_MINOR_VERS < 3 */
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// OS has readdir and friends.
-#define ACE_HAS_DIRENT
-
-// OS supports the getrusage() system call
-#define ACE_HAS_GETRUSAGE
-
-#define ACE_HAS_GPERF
-
-#define ACE_HAS_H_ERRNO
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_IP_MULTICAST
-#define ACE_HAS_MSG
-#if (ACE_AIX_MINOR_VERS < 2)
-# define ACE_LACKS_MSG_ACCRIGHTS
-# define ACE_LACKS_RLIMIT
-#endif
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-#define ACE_HAS_POSIX_TIME
-// ... but needs to include another header for it on 4.2+
-#if (ACE_AIX_MINOR_VERS >= 2)
-# define ACE_HAS_BROKEN_POSIX_TIME
-#endif /* ACE_AIX_MINOR_VERS > 2 */
-// ... and needs another typedef
-#define ACE_LACKS_TIMESPEC_T
-#define ACE_HAS_SELECT_H
-
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-// Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-#if (ACE_AIX_MINOR_VERS >= 2)
-# define ACE_HAS_SIGINFO_T
-# define ACE_LACKS_SIGINFO_H
-#endif /* ACE_AIX_MINOR_VERS >=2 */
-#define ACE_HAS_SIGWAIT
-#if (ACE_AIX_MINOR_VERS >= 3)
-# define ACE_HAS_SIGTIMEDWAIT
-#endif /* ACE_AIX_MINOR_VERS >= 3 */
-#define ACE_HAS_SIN_LEN
-#define ACE_HAS_STRBUF_T
-
-// Compiler supports stropts.h
-#define ACE_HAS_STREAMS
-// #define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// AIX bzero()
-#define ACE_HAS_STRINGS
-
-#define ACE_HAS_STRUCT_NETDB_DATA
-
-// Dynamic linking is in good shape on newer OS/patch levels. If you have
-// trouble with the dynamic linking parts of ACE, and can't patch your OS
-// up to latest levels, comment this out.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-// This is tightly related to dynamic linking...
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-#define ACE_HAS_SVR4_GETTIMEOFDAY
-
-#define ACE_HAS_SYSV_IPC
-#define ACE_HAS_TIMOD_H
-#define ACE_HAS_TIUSER_H
-#define ACE_HAS_TLI
-#define ACE_HAS_BROKEN_T_ERROR
-#define ACE_HAS_TLI_PROTOTYPES
-#define ACE_TLI_TCP_DEVICE "/dev/xti/tcp"
-
-#define ACE_HAS_UALARM
-
-#if (ACE_AIX_MINOR_VERS >= 2)
-# define ACE_HAS_UCONTEXT_T
-#endif /* ACE_AIX_MINOR_VERS >= 2 */
-
-#define ACE_HAS_UTIME
-
-// Platform has XPG4 wide character type and functions
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-#define ACE_LACKS_TCP_H
-
-// AIX uses LIBPATH to search for libraries
-#define ACE_LD_SEARCH_PATH "LIBPATH"
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-//**************************************************************
-//
-// Threads related definitions.
-//
-// The threads on AIX are generally POSIX P1003.1c (ACE_HAS_PTHREADS).
-// However, there is also a kernel thread ID (tid_t) that is used in
-// ACE_Log_Msg (printing the thread ID). The tid_t is not the same as
-// pthread_t, and can't derive one from the other - thread_self() gets
-// the tid_t (kernel thread ID) if called from a thread.
-// Thanks very much to Chris Lahey for straightening this out.
-
-// Unless threads are specifically turned off, build with them enabled.
-#if !defined (ACE_HAS_THREADS)
-# define ACE_HAS_THREADS 1
-#endif
-
-#if (ACE_HAS_THREADS != 0)
-# if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-# endif
-
-# define ACE_HAS_PTHREADS
-// 4.3 and up has 1003.1c standard; 4.2 has draft 7
-# if (ACE_AIX_MINOR_VERS >= 3)
-# define ACE_HAS_PTHREADS_STD
-# define ACE_HAS_PTHREADS_UNIX98_EXT
-// ACE_LACKS_SETSCHED should not be needed, but the OS.* doesn't fine tune
-// this enough - it's too overloaded. Fix after ACE 5 is done.
-# define ACE_LACKS_SETSCHED
-# else
-# define ACE_HAS_PTHREADS_DRAFT7
-# define ACE_LACKS_RWLOCK_T
-# define ACE_LACKS_THREAD_STACK_ADDR
-// If ACE doesn't compile due to the lack of these methods, please
-// send email to ace-users@cs.wustl.edu reporting this.
-// #define ACE_LACKS_CONDATTR_PSHARED
-// #define ACE_LACKS_MUTEXATTR_PSHARED
-# define ACE_LACKS_SETSCHED
-# endif /* ACE_AIX_MINOR_VERS >= 3 */
-
-# define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
-# define ACE_HAS_SIGTHREADMASK
-# define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-# define ACE_LACKS_THREAD_PROCESS_SCOPING
-#else
-# undef ACE_HAS_THREADS
-#endif /* ACE_HAS_THREADS != 0 */
-
-#define ACE_MALLOC_ALIGN 8
-
-// By default, tracing code is not compiled. To compile it in, cause
-// ACE_NTRACE to not be defined, and rebuild ACE.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-all.h b/ace/config-all.h
deleted file mode 100644
index daf1fc0ac1f..00000000000
--- a/ace/config-all.h
+++ /dev/null
@@ -1,497 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// config-all.h
-//
-// = AUTHOR
-// (Originally in OS.h)
-// Doug Schmidt <schmidt@cs.wustl.edu>, Jesper S. M|ller
-// <stophph@diku.dk>, and a cast of thousands...
-//
-// ============================================================================
-
-#ifndef ACE_CONFIG_ALL_H
-#define ACE_CONFIG_ALL_H
-#include "ace/pre.h"
-
-#include "ace/config.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-// ============================================================================
-// RCSID Macros
-// ============================================================================
-
-// By default, DO include RCS Id strings in object code.
-#if ! defined (ACE_USE_RCSID)
-# define ACE_USE_RCSID 1
-#endif /* #if ! defined (ACE_USE_RCSID) */
-
-#if (defined (ACE_USE_RCSID) && (ACE_USE_RCSID != 0))
-# if ! defined (ACE_RCSID)
-
- // This hack has the following purposes:
- // 1. To define the RCS id string variable as a static char*, so
- // that there won't be any duplicate extern symbols at link
- // time.
- // 2. To have a RCS id string variable with a unique name for each
- // file.
- // 3. To avoid warnings of the type "variable declared and never
- // used".
-
-# define ACE_RCSID(path, file, id) \
- inline const char* get_rcsid_ ## path ## _ ## file (const char*) \
- { \
- return id ; \
- } \
- static const char* rcsid_ ## path ## _ ## file = \
- get_rcsid_ ## path ## _ ## file ( rcsid_ ## path ## _ ## file ) ;
-
-# endif /* #if ! defined (ACE_RCSID) */
-#else
-
- // RCS id strings are not wanted.
-# if defined (ACE_RCSID)
-# undef ACE_RCSID
-# endif /* #if defined (ACE_RCSID) */
-# define ACE_RCSID(path, file, id) /* noop */
-#endif /* #if (defined (ACE_USE_RCSID) && (ACE_USE_RCSID != 0)) */
-
-// ============================================================================
-// INLINE macros
-//
-// These macros handle all the inlining of code via the .i or .inl files
-// ============================================================================
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS) && !defined (ACE_NO_INLINE)
-# define ACE_NO_INLINE
-#endif /* defined (ACE_LACKS_INLINE_FUNCTIONS) && !defined (ACE_NO_INLINE) */
-
-// ACE inlining has been explicitly disabled. Implement
-// internally within ACE by undefining __ACE_INLINE__.
-#if defined (ACE_NO_INLINE)
-# undef __ACE_INLINE__
-#endif /* ! ACE_NO_INLINE */
-
-#if defined (__ACE_INLINE__)
-# define ACE_INLINE inline
-# if !defined (ACE_HAS_INLINED_OSCALLS)
-# define ACE_HAS_INLINED_OSCALLS
-# endif /* !ACE_HAS_INLINED_OSCALLS */
-#else
-# define ACE_INLINE
-#endif /* __ACE_INLINE__ */
-
-# if defined (ACE_HAS_GNUC_BROKEN_TEMPLATE_INLINE_FUNCTIONS)
-# define ACE_INLINE_FOR_GNUC ACE_INLINE
-# else
-# define ACE_INLINE_FOR_GNUC
-# endif /* ACE_HAS_GNUC_BROKEN_TEMPLATE_INLINE_FUNCTIONS */
-
-// Some ACE classes always use inline functions to maintain high
-// performance, but some platforms have buggy inline function support.
-// In this case, we don't use inline with them.
-# if defined (ACE_LACKS_INLINE_FUNCTIONS)
-# if defined (ASYS_INLINE)
-# undef ASYS_INLINE
-# endif /* ASYS_INLINE */
-# define ASYS_INLINE
-# if defined (ACE_HAS_INLINED_OSCALLS)
-# undef ACE_HAS_INLINED_OSCALLS
-# endif /* ACE_HAS_INLINED_OSCALLS */
-# else
-# define ASYS_INLINE inline
-# endif /* ACE_LACKS_INLINE_FUNCTIONS */
-
-// ============================================================================
-// UNICODE macros (to be added later)
-// ============================================================================
-
-// Get the unicode (i.e. ACE_TCHAR) defines
-# include "ace/ace_wchar.h"
-
-
-// ============================================================================
-// EXPORT macros
-//
-// Since Win32 DLL's do not export all symbols by default, they must be
-// explicitly exported (which is done by *_Export macros).
-// ============================================================================
-
-// Win32 should have already defined the macros in config-win32-common.h
-#if !defined (ACE_HAS_CUSTOM_EXPORT_MACROS)
-# define ACE_Proper_Export_Flag
-# define ACE_Proper_Import_Flag
-# define ACE_EXPORT_SINGLETON_DECLARATION(T)
-# define ACE_IMPORT_SINGLETON_DECLARATION(T)
-# define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* ACE_HAS_CUSTOM_EXPORT_MACROS */
-
-#include "ace/ACE_export.h"
-#include "ace/svc_export.h"
-
-// This is a whim of mine -- that instead of annotating a class with
-// ACE_Export in its declaration, we make the declaration near the TOP
-// of the file with ACE_DECLARE_EXPORT.
-// TS = type specifier (e.g., class, struct, int, etc.)
-// ID = identifier
-// So, how do you use it? Most of the time, just use ...
-// ACE_DECLARE_EXPORT(class, someobject);
-// If there are global functions to be exported, then use ...
-// ACE_DECLARE_EXPORT(void, globalfunction) (int, ...);
-// Someday, when template libraries are supported, we made need ...
-// ACE_DECLARE_EXPORT(template class, sometemplate) <class TYPE, class LOCK>;
-# define ACE_DECLARE_EXPORT(TS,ID) TS ACE_Export ID
-
-// ============================================================================
-// Cast macros
-//
-// These macros are used to choose between the old cast style and the new
-// *_cast<> operators
-// ============================================================================
-
-# if defined (ACE_HAS_ANSI_CASTS)
-
-# define ACE_sap_any_cast(TYPE) reinterpret_cast<TYPE> (const_cast<ACE_Addr &> (ACE_Addr::sap_any))
-
-# define ACE_static_cast(TYPE, EXPR) static_cast<TYPE> (EXPR)
-# define ACE_static_cast_1_ptr(TYPE, T1, EXPR) static_cast<TYPE<T1> *> (EXPR)
-# define ACE_static_cast_2_ptr(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> *> (EXPR)
-# define ACE_static_cast_3_ptr(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> *> (EXPR)
-# define ACE_static_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
-# define ACE_static_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
-# define ACE_static_cast_1_ref(TYPE, T1, EXPR) static_cast<TYPE<T1> &> (EXPR)
-# define ACE_static_cast_2_ref(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> &> (EXPR)
-# define ACE_static_cast_3_ref(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> &> (EXPR)
-# define ACE_static_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
-# define ACE_static_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
-
-# define ACE_const_cast(TYPE, EXPR) const_cast<TYPE> (EXPR)
-# define ACE_const_cast_1_ptr(TYPE, T1, EXPR) const_cast<TYPE<T1> *> (EXPR)
-# define ACE_const_cast_2_ptr(TYPE, T1, T2, EXPR) const_cast<TYPE<T1, T2> *> (EXPR)
-# define ACE_const_cast_3_ptr(TYPE, T1, T2, T3, EXPR) const_cast<TYPE<T1, T2, T3> *> (EXPR)
-# define ACE_const_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) const_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
-# define ACE_const_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) const_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
-# define ACE_const_cast_1_ref(TYPE, T1, EXPR) const_cast<TYPE<T1> &> (EXPR)
-# define ACE_const_cast_2_ref(TYPE, T1, T2, EXPR) const_cast<TYPE<T1, T2> &> (EXPR)
-# define ACE_const_cast_3_ref(TYPE, T1, T2, T3, EXPR) const_cast<TYPE<T1, T2, T3> &> (EXPR)
-# define ACE_const_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) const_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
-# define ACE_const_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) const_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
-
-# define ACE_reinterpret_cast(TYPE, EXPR) reinterpret_cast<TYPE> (EXPR)
-# define ACE_reinterpret_cast_1_ptr(TYPE, T1, EXPR) reinterpret_cast<TYPE<T1> *> (EXPR)
-# define ACE_reinterpret_cast_2_ptr(TYPE, T1, T2, EXPR) reinterpret_cast<TYPE<T1, T2> *> (EXPR)
-# define ACE_reinterpret_cast_3_ptr(TYPE, T1, T2, T3, EXPR) reinterpret_cast<TYPE<T1, T2, T3> *> (EXPR)
-# define ACE_reinterpret_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
-# define ACE_reinterpret_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
-# define ACE_reinterpret_cast_1_ref(TYPE, T1, EXPR) reinterpret_cast<TYPE<T1> &> (EXPR)
-# define ACE_reinterpret_cast_2_ref(TYPE, T1, T2, EXPR) reinterpret_cast<TYPE<T1, T2> &> (EXPR)
-# define ACE_reinterpret_cast_3_ref(TYPE, T1, T2, T3, EXPR) reinterpret_cast<TYPE<T1, T2, T3> &> (EXPR)
-# define ACE_reinterpret_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
-# define ACE_reinterpret_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) reinterpret_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
-
-# if defined (ACE_LACKS_RTTI)
-# define ACE_dynamic_cast(TYPE, EXPR) static_cast<TYPE> (EXPR)
-# define ACE_dynamic_cast_1_ptr(TYPE, T1, EXPR) static_cast<TYPE<T1> *> (EXPR)
-# define ACE_dynamic_cast_2_ptr(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> *> (EXPR)
-# define ACE_dynamic_cast_3_ptr(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> *> (EXPR)
-# define ACE_dynamic_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
-# define ACE_dynamic_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
-# define ACE_dynamic_cast_1_ref(TYPE, T1, EXPR) static_cast<TYPE<T1> &> (EXPR)
-# define ACE_dynamic_cast_2_ref(TYPE, T1, T2, EXPR) static_cast<TYPE<T1, T2> &> (EXPR)
-# define ACE_dynamic_cast_3_ref(TYPE, T1, T2, T3, EXPR) static_cast<TYPE<T1, T2, T3> &> (EXPR)
-# define ACE_dynamic_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) static_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
-# define ACE_dynamic_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) static_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
-# else /* ! ACE_LACKS_RTTI */
-# define ACE_dynamic_cast(TYPE, EXPR) dynamic_cast<TYPE> (EXPR)
-# define ACE_dynamic_cast_1_ptr(TYPE, T1, EXPR) dynamic_cast<TYPE<T1> *> (EXPR)
-# define ACE_dynamic_cast_2_ptr(TYPE, T1, T2, EXPR) dynamic_cast<TYPE<T1, T2> *> (EXPR)
-# define ACE_dynamic_cast_3_ptr(TYPE, T1, T2, T3, EXPR) dynamic_cast<TYPE<T1, T2, T3> *> (EXPR)
-# define ACE_dynamic_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4> *> (EXPR)
-# define ACE_dynamic_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4, T5> *> (EXPR)
-# define ACE_dynamic_cast_1_ref(TYPE, T1, EXPR) dynamic_cast<TYPE<T1> &> (EXPR)
-# define ACE_dynamic_cast_2_ref(TYPE, T1, T2, EXPR) dynamic_cast<TYPE<T1, T2> &> (EXPR)
-# define ACE_dynamic_cast_3_ref(TYPE, T1, T2, T3, EXPR) dynamic_cast<TYPE<T1, T2, T3> &> (EXPR)
-# define ACE_dynamic_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4> &> (EXPR)
-# define ACE_dynamic_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) dynamic_cast<TYPE<T1, T2, T3, T4, T5> &> (EXPR)
-# endif /* ! ACE_LACKS_RTTI */
-
-# else
-
-# define ACE_sap_any_cast(TYPE) ((TYPE) (ACE_Addr::sap_any))
-
-# define ACE_static_cast(TYPE, EXPR) ((TYPE) (EXPR))
-# define ACE_static_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
-# define ACE_static_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
-# define ACE_static_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
-# define ACE_static_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
-# define ACE_static_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
-# define ACE_static_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
-# define ACE_static_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
-# define ACE_static_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
-# define ACE_static_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
-# define ACE_static_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
-
-# define ACE_const_cast(TYPE, EXPR) ((TYPE) (EXPR))
-# define ACE_const_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
-# define ACE_const_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
-# define ACE_const_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
-# define ACE_const_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
-# define ACE_const_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
-# define ACE_const_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
-# define ACE_const_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
-# define ACE_const_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
-# define ACE_const_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
-# define ACE_const_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
-
-# define ACE_reinterpret_cast(TYPE, EXPR) ((TYPE) (EXPR))
-# define ACE_reinterpret_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
-# define ACE_reinterpret_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
-# define ACE_reinterpret_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
-# define ACE_reinterpret_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
-# define ACE_reinterpret_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
-# define ACE_reinterpret_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
-# define ACE_reinterpret_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
-# define ACE_reinterpret_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
-# define ACE_reinterpret_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
-# define ACE_reinterpret_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
-
-# define ACE_dynamic_cast(TYPE, EXPR) ((TYPE) (EXPR))
-# define ACE_dynamic_cast_1_ptr(TYPE, T1, EXPR) ((TYPE<T1> *) (EXPR))
-# define ACE_dynamic_cast_2_ptr(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> *) (EXPR))
-# define ACE_dynamic_cast_3_ptr(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> *) (EXPR))
-# define ACE_dynamic_cast_4_ptr(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> *) (EXPR))
-# define ACE_dynamic_cast_5_ptr(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> *) (EXPR))
-# define ACE_dynamic_cast_1_ref(TYPE, T1, EXPR) ((TYPE<T1> &) (EXPR))
-# define ACE_dynamic_cast_2_ref(TYPE, T1, T2, EXPR) ((TYPE<T1, T2> &) (EXPR))
-# define ACE_dynamic_cast_3_ref(TYPE, T1, T2, T3, EXPR) ((TYPE<T1, T2, T3> &) (EXPR))
-# define ACE_dynamic_cast_4_ref(TYPE, T1, T2, T3, T4, EXPR) ((TYPE<T1, T2, T3, T4> &) (EXPR))
-# define ACE_dynamic_cast_5_ref(TYPE, T1, T2, T3, T4, T5, EXPR) ((TYPE<T1, T2, T3, T4, T5> &) (EXPR))
-# endif /* ACE_HAS_ANSI_CASTS */
-
-# if !defined (ACE_CAST_CONST)
- // Sun CC 4.2, for example, requires const in reinterpret casts of
- // data members in const member functions. But, other compilers
- // complain about the useless const. This keeps everyone happy.
-# if defined (__SUNPRO_CC)
-# define ACE_CAST_CONST const
-# else /* ! __SUNPRO_CC */
-# define ACE_CAST_CONST
-# endif /* ! __SUNPRO_CC */
-# endif /* ! ACE_CAST_CONST */
-
-// ============================================================================
-// Compiler Silencing macros
-//
-// Some compilers complain about parameters that are not used. This macro
-// should keep them quiet.
-// ============================================================================
-
-#if defined (ghs) || defined (__GNUC__) || defined (__hpux) || defined (__sgi) || defined (__DECCXX) || defined (__KCC) || defined (__rational__) || (__USLC__)
-// Some compilers complain about "statement with no effect" with (a).
-// This eliminates the warnings, and no code is generated for the null
-// conditional statement. NOTE: that may only be true if -O is enabled,
-// such as with GreenHills (ghs) 1.8.8.
-# define ACE_UNUSED_ARG(a) {if (&a) /* null */ ;}
-#else /* ghs || __GNUC__ || ..... */
-# define ACE_UNUSED_ARG(a) (a)
-#endif /* ghs || __GNUC__ || ..... */
-
-#if defined (__sgi) || defined (ghs) || defined (__DECCXX) || defined(__BORLANDC__) || defined (__KCC)
-# define ACE_NOTREACHED(a)
-#else /* __sgi || ghs || ..... */
-# define ACE_NOTREACHED(a) a
-#endif /* __sgi || ghs || ..... */
-
-// ============================================================================
-// errno stuff
-// ============================================================================
-
-#if defined (ACE_HAS_H_ERRNO)
-void herror (const char *str);
-#endif /* ACE_HAS_H_ERRNO */
-
-#if !defined (ACE_HAS_WINCE)
-# include /**/ <errno.h>
-#endif /* ACE_HAS_WINCE */
-
-#if !defined (ACE_WIN32) && !defined (ACE_PSOS) && defined (ACE_LACKS_T_ERRNO)
-extern int t_errno;
-#endif /* ACE_WIN32 && !ACE_PSOS && ACE_LACKS_T_ERRNO */
-
-// ============================================================================
-// ACE_NEW macros
-//
-// A useful abstraction for expressions involving operator new since
-// we can change memory allocation error handling policies (e.g.,
-// depending on whether ANSI/ISO exception handling semantics are
-// being used).
-// ============================================================================
-
-#if defined (ACE_NEW_THROWS_EXCEPTIONS)
-# if (__SUNPRO_CC)
-# if (__SUNPRO_CC < 0x500) || ((__SUNPRO_CC == 0x500 && __SUNPRO_CC_COMPAT == 4))
-# include /**/ <exception.h>
- // Note: we catch ::xalloc rather than just xalloc because of
- // a name clash with unsafe_ios::xalloc()
-# define ACE_bad_alloc ::xalloc
-# define ACE_throw_bad_alloc throw ACE_bad_alloc ("no more memory")
-# else
-# include /**/ <new>
-# define ACE_bad_alloc std::bad_alloc
-# define ACE_throw_bad_alloc throw ACE_bad_alloc ()
-# endif /* __SUNPRO_CC < 0x500 */
-# else
- // I know this works for HP aC++... if <stdexcept> is used, it
- // introduces other stuff that breaks things, like <memory>, which
- // screws up auto_ptr.
-# include /**/ <new>
-# if (defined (__HP_aCC) && !defined (RWSTD_NO_NAMESPACE)) \
- || defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
-# define ACE_bad_alloc std::bad_alloc
-# else
-# define ACE_bad_alloc bad_alloc
-# endif /* RWSTD_NO_NAMESPACE */
-# define ACE_throw_bad_alloc throw ACE_bad_alloc ()
-# endif /* __SUNPRO_CC */
-
-# define ACE_NEW_RETURN(POINTER,CONSTRUCTOR,RET_VAL) \
- do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { errno = ENOMEM; return RET_VAL; } \
- } while (0)
-
-# define ACE_NEW(POINTER,CONSTRUCTOR) \
- do { try { POINTER = new CONSTRUCTOR; } \
- catch (ACE_bad_alloc) { errno = ENOMEM; return; } \
- } while (0)
-
-#else /* ACE_NEW_THROWS_EXCEPTIONS */
-
-# define ACE_NEW_RETURN(POINTER,CONSTRUCTOR,RET_VAL) \
- do { POINTER = new CONSTRUCTOR; \
- if (POINTER == 0) { errno = ENOMEM; return RET_VAL; } \
- } while (0)
-# define ACE_NEW(POINTER,CONSTRUCTOR) \
- do { POINTER = new CONSTRUCTOR; \
- if (POINTER == 0) { errno = ENOMEM; return; } \
- } while (0)
-
-# define ACE_throw_bad_alloc \
- void* gcc_will_complain_if_literal_0_is_returned = 0; \
- return gcc_will_complain_if_literal_0_is_returned
-
-#endif /* ACE_NEW_THROWS_EXCEPTIONS */
-
-// ============================================================================
-// ACE_OSCALL_* macros
-//
-// The following two macros ensure that system calls are properly
-// restarted (if necessary) when interrupts occur.
-// ============================================================================
-
-#if defined (ACE_HAS_SIGNAL_SAFE_OS_CALLS)
-# define ACE_OSCALL(OP,TYPE,FAILVALUE,RESULT) \
- do \
- RESULT = (TYPE) OP; \
- while (RESULT == FAILVALUE && errno == EINTR && ACE_LOG_MSG->restart ())
-# define ACE_OSCALL_RETURN(OP,TYPE,FAILVALUE) \
- do { \
- TYPE ace_result_; \
- do \
- ace_result_ = (TYPE) OP; \
- while (ace_result_ == FAILVALUE && errno == EINTR && ACE_LOG_MSG->restart ()); \
- return ace_result_; \
- } while (0)
-# elif defined (ACE_WIN32)
-# define ACE_OSCALL_RETURN(X,TYPE,FAILVALUE) \
- do \
- return (TYPE) X; \
- while (0)
-# define ACE_OSCALL(X,TYPE,FAILVALUE,RESULT) \
- do \
- RESULT = (TYPE) X; \
- while (0)
-# if defined (__BORLANDC__) && (__BORLANDC__ <= 0x550)
-# define ACE_WIN32CALL_RETURN(X,TYPE,FAILVALUE) \
- do { \
- TYPE ace_result_; \
- TYPE ace_local_result_ = (TYPE) X; \
- ace_result_ = ace_local_result_; \
- if (ace_result_ == FAILVALUE) \
- ACE_OS::set_errno_to_last_error (); \
- return ace_result_; \
- } while (0)
-# else
-# define ACE_WIN32CALL_RETURN(X,TYPE,FAILVALUE) \
- do { \
- TYPE ace_result_; \
- ace_result_ = (TYPE) X; \
- if (ace_result_ == FAILVALUE) \
- ACE_OS::set_errno_to_last_error (); \
- return ace_result_; \
- } while (0)
-# endif /* defined (__BORLANDC__) && (__BORLANDC__ <= 0x550) */
-# define ACE_WIN32CALL(X,TYPE,FAILVALUE,RESULT) \
- do { \
- RESULT = (TYPE) X; \
- if (RESULT == FAILVALUE) \
- ACE_OS::set_errno_to_last_error (); \
- } while (0)
-#else /* ACE_HAS_SIGNAL_SAFE_OS_CALLS */
-# define ACE_OSCALL_RETURN(OP,TYPE,FAILVALUE) do { TYPE ace_result_ = FAILVALUE; ace_result_ = ace_result_; return OP; } while (0)
-# define ACE_OSCALL(OP,TYPE,FAILVALUE,RESULT) do { RESULT = (TYPE) OP; } while (0)
-#endif /* ACE_HAS_SIGNAL_SAFE_OS_CALLS */
-
-// ============================================================================
-// at_exit declarations
-// ============================================================================
-
-// Marker for cleanup, used by ACE_Exit_Info.
-extern int ace_exit_hook_marker;
-
-// For use by <ACE_OS::exit>.
-extern "C"
-{
- typedef void (*ACE_EXIT_HOOK) (void);
-}
-
-// ============================================================================
-// Miscellaneous macros
-// ============================================================================
-
-# if !defined (ENOSYS)
-# define ENOSYS EFAULT /* Operation not supported or unknown error. */
-# endif /* !ENOSYS */
-
-#if !defined (ENOTSUP)
-# define ENOTSUP ENOSYS /* Operation not supported. */
-#endif /* !ENOTSUP */
-
-// This is used to indicate that a platform doesn't support a
-// particular feature.
-#if defined ACE_HAS_VERBOSE_NOTSUP
- // Print a console message with the file and line number of the
- // unsupported function.
-# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0)
-# include /**/ <cstdio>
-# else
-# include /**/ <stdio.h>
-# endif
-# define ACE_NOTSUP_RETURN(FAILVALUE) do { errno = ENOTSUP; fprintf (stderr, ACE_TEXT ("ACE_NOTSUP: %s, line %d\n"), __FILE__, __LINE__); return FAILVALUE; } while (0)
-# define ACE_NOTSUP do { errno = ENOTSUP; fprintf (stderr, ACE_TEXT ("ACE_NOTSUP: %s, line %d\n"), __FILE__, __LINE__); return; } while (0)
-#else /* ! ACE_HAS_VERBOSE_NOTSUP */
-# define ACE_NOTSUP_RETURN(FAILVALUE) do { errno = ENOTSUP ; return FAILVALUE; } while (0)
-# define ACE_NOTSUP do { errno = ENOTSUP; return; } while (0)
-#endif /* ! ACE_HAS_VERBOSE_NOTSUP */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_ALL_H */
diff --git a/ace/config-chorus.h b/ace/config-chorus.h
deleted file mode 100644
index 4e69705bb73..00000000000
--- a/ace/config-chorus.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for Chorus
-// platforms using one of these compilers:
-// * GNU g++
-// * GreenHills
-// It uses the Chorus POSIX threads interface.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define CHORUS 3.1b
-#if defined (linux)
- // This shouldn't be necessary.
-# undef linux
-#endif /* linux */
-
-// Compiler-specific configuration.
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-# undef ACE_HAS_ANSI_CASTS
-# define ACE_LACKS_CHAR_STAR_RIGHT_SHIFTS
-#elif defined (ghs)
-# define ACE_CONFIG_INCLUDE_GHS_COMMON
-# include "ace/config-ghs-common.h"
-
-# define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-# define ACE_HAS_TANDEM_SIGNALS
-# define ACE_HAS_TEMPLATE_SPECIALIZATION
-# define ACE_LACKS_ACE_IOSTREAM /* MVME lacks signed and unsigned char */
-# define ACE_LACKS_FLOATING_POINT
-#else /* ! __GNUG__ && ! ghs */
-# error unsupported compiler for ACE on Chorus
-#endif /* ! __GNUG__ && ! ghs */
-
-// OS-specific configuration
-
-// Chorus cannot grow shared memory, so this is the default size for a
-// local name space
-#define ACE_CHORUS_LOCAL_NAME_SPACE_T_SIZE 128000
-// Used in OS.i to map an actor id into a KnCap.
-#define ACE_CHORUS_MAX_ACTORS 64
-
-// This is not needed when compiling for PPC. It is necessary
-// for certain methods in ACE.cpp.
-#if defined(sparc) && !defined(__unix)
-# define __unix
-#endif
-
-#if defined(CHORUS_4)
-# define ACE_CHORUS_DEFAULT_MIN_STACK_SIZE 0x8000
-# define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-# define ACE_HAS_TIMEZONE_GETTIMEOFDAY
-#else
-# define ACE_CHORUS_DEFAULT_MIN_STACK_SIZE 0x2000
-# define ACE_LACKS_KEY_T
-# define ACE_LACKS_ACCESS
-# define ACE_LACKS_FSYNC
-# define ACE_LACKS_GETSERVBYNAME
-# define ACE_LACKS_MKFIFO
-# define ACE_LACKS_READLINK
-# define ACE_LACKS_TRUNCATE
-#endif
-
-#define ACE_HAS_BROKEN_READV
-#define ACE_HAS_CLOCK_GETTIME
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_DIRENT
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_IP_MULTICAST
-#define ACE_HAS_LONG_MAP_FAILED
-#define ACE_HAS_MSG
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_POSIX_SEM
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SSIZE_T
-#define ACE_HAS_STRDUP_EMULATION
-#define ACE_HAS_STRERROR
-#define ACE_HAS_TSS_EMULATION
-#define ACE_LACKS_CONDATTR_PSHARED
-#define ACE_LACKS_FORK
-#define ACE_LACKS_GETHOSTENT
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-#define ACE_LACKS_LONGLONG_T
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_MALLOC_H
-#define ACE_LACKS_MEMORY_H
-#define ACE_LACKS_MPROTECT
-#define ACE_LACKS_MSYNC
-#define ACE_LACKS_NAMED_POSIX_SEM
-#define ACE_LACKS_PARAM_H
-#define ACE_LACKS_READDIR_R
-#define ACE_LACKS_READV
-#define ACE_LACKS_RLIMIT
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_SBRK
-#define ACE_LACKS_SEMBUF_T
-#define ACE_LACKS_SIGSET
-#define ACE_LACKS_STRRECVFD
-#define ACE_LACKS_SYSV_MSG_H
-#define ACE_LACKS_SYSV_SHMEM
-#define ACE_LACKS_UNIX_SIGNALS
-#define ACE_LACKS_UTSNAME_T
-#define ACE_LACKS_WRITEV
-#define ACE_PAGE_SIZE 4096
-
-// Yes, we do have threads.
-#define ACE_HAS_THREADS
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-// And they're even POSIX pthreads
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_STD
-#define ACE_HAS_PTHREAD_PROCESS_ENUM
-#define ACE_LACKS_PTHREAD_CANCEL
-#define ACE_LACKS_PTHREAD_CLEANUP
-#define ACE_LACKS_PTHREAD_SIGMASK
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-#if !defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// By default, don't include RCS Id strings in object code.
-#if !defined (ACE_USE_RCSID)
-# define ACE_USE_RCSID 0
-#endif /* #if !defined (ACE_USE_RCSID) */
-
-// Needed to wait for "processes" to exit.
-#include <am/await.h>
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-cray.h b/ace/config-cray.h
deleted file mode 100644
index 20d66fa333b..00000000000
--- a/ace/config-cray.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef ACE_CONFIG_CRAY_H
-#define ACE_CONFIG_CRAY_H
-#include "ace/pre.h"
-
-/*
- The following predefined macros are used within ACE ifdefs.
- These are defined when using the Cray compilers. _CRAYMPP
- is defined, for example, if you are running on a Cray T3E
- massively parallel machine. Moreover, in the case of the T3E,
- _CRAYT3E will be defined. This is used to determine the
- ACE_SIZEOF defines for primitive types.
-
- _UNICOS is defined as either the major version of UNICOS being run,
- e.g. 9 or 10 on the vector machines (e.g. C90, T90, J90, YMP, ...)
- or the major+minor+level UNICOS/mk version, e.g. 2.0.3 => 203,
- being run on an MPP machine.
-
- Summary:
-
- _CRAYMPP (defined only if running on MPP machine, e.g. T3E, UNICOS/mk)
- _CRAYT3E (defined specifically if compiling on a Cray T3E)
- _UNICOS (defined if running UNICOS or UNICOS/mk)
-
- Tested on UNICOS 10.0.0.5, UNICOS/mk 2.0.4.57
- Compiles on UNICOS 9.0.2.8, but some tests deadlock
-
- Contributed by Doug Anderson <dla@home.com>
-*/
-
-#if defined (_UNICOS) && !defined (MAXPATHLEN)
-#define MAXPATHLEN 1023
-#endif /* _UNICOS */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_DEFAULT_CLOSE_ALL_HANDLES 0
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// using cray's autoinstantiation gives C++ prelinker: error: instantiation loop
-#define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
-
-#define ACE_HAS_TEMPLATE_SPECIALIZATION
-
-#define ACE_HAS_ANSI_CASTS
-
-#define ACE_HAS_USING_KEYWORD
-
-#define ACE_HAS_SSIZE_T
-
-#define ACE_HAS_SYSV_IPC
-
-#define ACE_MT_SAFE 1
-
-#define ACE_HAS_THREADS
-
-#define ACE_HAS_PTHREADS
-
-// UNICOS 10 and UNICOS/mk implement a small subset of POSIX Threads,
-// but the prototypes follow the POSIX.1c-1995 definitions. Earlier
-// UNICOS versions sport Draft 7 threads.
-
-#if _UNICOS > 9
-# define ACE_HAS_PTHREADS_STD
-#else
-# define ACE_HAS_PTHREADS_DRAFT7
-# define ACE_LACKS_THREAD_STACK_SIZE
-# define ACE_LACKS_THREAD_STACK_ADDR
- // UNICOS 9 doesn't have this, nor sched.h
-# define SCHED_OTHER 0
-# define SCHED_FIFO 1
-# define SCHED_RR 2
-#endif
-
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-#define ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP
-
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-
-#define ACE_HAS_POSIX_TIME
-
-#define ACE_HAS_TIMEZONE_GETTIMEOFDAY
-
-#define ACE_HAS_POSIX_NONBLOCK
-
-#define ACE_HAS_TERM_IOCTLS
-
-#define ACE_HAS_DIRENT
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_IP_MULTICAST
-
-#define ACE_HAS_SIN_LEN
-
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-
-#define ACE_HAS_NONCONST_READLINK
-
-#define ACE_HAS_CHARPTR_SOCKOPT
-
-#define ACE_HAS_NONCONST_GETBY
-
-// has man pages, but links with missing symbols and I can't find lib yet
-/* #define ACE_HAS_REGEX */
-
-#define ACE_HAS_SIG_MACROS
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-#if _UNICOS > 9
-# define ACE_HAS_SIGWAIT
-#endif
-
-#define ACE_HAS_SIG_ATOMIC_T
-
-#define ACE_HAS_SIGISMEMBER_BUG
-
-#define ACE_HAS_MSG
-
-#define ACE_HAS_STRERROR
-
-#define ACE_HAS_GPERF
-
-// Special modifications that apply to UNICOS/mk
-#if defined(_CRAYMPP)
-
-# define ACE_HAS_SIGINFO_T
-# define ACE_HAS_UCONTEXT_T
-
-#endif
-
-// The Cray T90 supposedly supports SYSV SHMEM, but I was unable to get it
-// working. Of course, all other Cray PVP and MPP systems do NOT support it,
-// so it's probably good to just define like this for consistency
-#define ACE_LACKS_SYSV_SHMEM
-#define ACE_LACKS_MMAP
-#define ACE_LACKS_CONST_TIMESPEC_PTR
-#define ACE_LACKS_SYSCALL
-#define ACE_LACKS_STRRECVFD
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-#define ACE_LACKS_PTHREAD_CLEANUP
-#define ACE_LACKS_CONDATTR_PSHARED
-#define ACE_LACKS_THREAD_PROCESS_SCOPING
-
-#if !defined(_CRAYMPP)
-
-#define ACE_LACKS_PTHREAD_CANCEL
-#define ACE_LACKS_PTHREAD_KILL
-
-#endif
-
-#define ACE_LACKS_MUTEXATTR_PSHARED
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_PRI_T
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-#define ACE_LACKS_MPROTECT
-#define ACE_LACKS_MSYNC
-#define ACE_LACKS_READV
-#define ACE_LACKS_RLIMIT
-
-// we probably want to fake not having this, since Cray memory mgmt is different
-#define ACE_LACKS_SBRK
-
-#define ACE_LACKS_SETSCHED
-
-#define ACE_LACKS_SIGINFO_H
-
-#define ACE_LACKS_TIMESPEC_T
-
-#define ACE_LACKS_WRITEV
-
-// Cray vector machines are "word" oriented, and modern ones are hard 64-bit.
-// "char" is somewhat of a special case. Most problems arise when code thinks
-// it can address 32-bit quantities and the like. MPP crays are typically
-// byte oriented, e.g. T3E uses Alpha processors, so we don't need as much
-// special treatment.
-
-#ifndef _CRAYMPP
-
-# define ACE_SIZEOF_CHAR 1
-# define ACE_SIZEOF_SHORT 8
-# define ACE_SIZEOF_INT 8
-# define ACE_SIZEOF_LONG 8
-# define ACE_SIZEOF_LONG_LONG 8
-# define ACE_SIZEOF_FLOAT 8
-# define ACE_SIZEOF_DOUBLE 8
-# define ACE_SIZEOF_LONG_DOUBLE 16
-# define ACE_SIZEOF_VOID_P 8
-
-#elif defined(_CRAYT3E)
-
-# define ACE_SIZEOF_CHAR 1
-# define ACE_SIZEOF_SHORT 4
-# define ACE_SIZEOF_INT 8
-# define ACE_SIZEOF_LONG 8
-# define ACE_SIZEOF_LONG_LONG 8
-# define ACE_SIZEOF_FLOAT 4
-# define ACE_SIZEOF_DOUBLE 8
-# define ACE_SIZEOF_LONG_DOUBLE 8
-# define ACE_SIZEOF_VOID_P 8
-
-#endif
-
-// Ones to check out at some point
-
-/* #define ACE_HAS_SYS_SIGLIST */
-
-// C++ Compiler stuff to verify
-/* #define ACE_NEW_THROWS_EXCEPTIONS */
-/* #define ACE_HAS_TEMPLATE_TYPEDEFS */
-
-// thread issues to check out
-/* #define ACE_LACKS_TIMEDWAIT_PROTOTYPES */
-
-// Cray does seem to support it, in -lnsl and has tiuser.h header
-/* #define ACE_HAS_TLI */
-/* #define ACE_HAS_TIUSER_H */
-/* #define ACE_HAS_TLI_PROTOTYPES */
-/* #define ACE_LACKS_T_ERRNO */
-
-/* #define ACE_LACKS_NAMED_POSIX_SEM */
-
-/* #define ACE_HAS_SYS_ERRLIST */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_CRAY_H */
diff --git a/ace/config-cxx-common.h b/ace/config-cxx-common.h
deleted file mode 100644
index ed17af5c8a4..00000000000
--- a/ace/config-cxx-common.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// $Id$
-
-#ifndef ACE_CXX_COMMON_H
-#define ACE_CXX_COMMON_H
-#include "ace/pre.h"
-
-#if !defined (ACE_CONFIG_INCLUDE_CXX_COMMON)
-# error ace/config-cxx-common.h: ACE configuration error! Do not #include this file directly!
-#endif
-
-#if defined (__DECCXX)
-# define ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF
-# define ACE_LACKS_SIGNED_CHAR
-# if defined (linux)
-# define ACE_HAS_STANDARD_CPP_LIBRARY 1
-# define ACE_HAS_CPLUSPLUS_HEADERS
-# else /* ! linux */
-# define ACE_HAS_STRING_CLASS
-# if (__DECCXX_VER >= 60090010)
-# define ACE_HAS_STDCPP_STL_INCLUDES
-# endif /* __DECCXX_VER < 60090010 */
-# endif /* ! linux */
-# define DEC_CXX
-# if (__DECCXX_VER >= 60090010)
- // DEC CXX 6.0 supports exceptions, etc., by default. Exceptions
- // are enabled by platform_osf1_4.0.GNU/wrapper_macros.GNU.
-# if defined (ACE_HAS_EXCEPTIONS)
-# define ACE_NEW_THROWS_EXCEPTIONS
-# endif /* ACE_HAS_EXCEPTIONS */
-# define ACE_HAS_ANSI_CASTS
-# if !defined (__RTTI)
-# define ACE_LACKS_RTTI
-# endif
-# define ACE_HAS_TEMPLATE_SPECIALIZATION
-# define ACE_HAS_TEMPLATE_TYPEDEFS
-# define ACE_HAS_TYPENAME_KEYWORD
-# define ACE_HAS_USING_KEYWORD
-
-# define ACE_ENDLESS_LOOP \
- unsigned int ace_endless_loop____ = 0; if (ace_endless_loop____) break;
-
-# if defined (__USE_STD_IOSTREAM)
-# define ACE_LACKS_CHAR_RIGHT_SHIFTS
-# define ACE_LACKS_IOSTREAM_FX
-# define ACE_LACKS_UNBUFFERED_STREAMBUF
-# else /* ! __USE_STD_IOSTREAM */
-# define ACE_USES_OLD_IOSTREAMS
-# endif /* ! __USE_STD_IOSTREAM */
-
-// 9: nested comment not allowed. (/usr/include/pdsc.h!) (nestcomment)
-// 177: variable was declared but never referenced (declbutnotref)
-// 193: zero used for undefined preprocessing identifier (undpreid)
-// 236: controlling expression is constant (boolexprconst)
-// 401: base_class_with_nonvirtual_dtor (basclsnondto)
-// 1016: expected type is incompatible with declared type of int (incint)
-// 1136: conversion to smaller size integer could lose data (intconlosbit)
-
-# pragma message disable basclsnondto
-# pragma message disable boolexprconst
-# pragma message disable undpreid
-
-# if (__DECCXX_VER >= 60190029)
- // 6.1-029 and later support msg 1136. Disable it because it
- // causes warnings from ACE and/or TAO.
-# pragma message disable intconlosbit
-# endif /* __DECCXX_VER >= 60190029 */
-
-# if defined (DIGITAL_UNIX) && DIGITAL_UNIX >= 0x40F
- // variable "PTHREAD_THIS_CATCH_NP" was declared but never referenced
-# pragma message disable declbutnotref
-# endif /* DIGITAL_UNIX >= 4.0f */
-
-# else /* __DECCXX_VER < 60090010 */
-# define ACE_LACKS_PRAGMA_ONCE
-# endif /* __DECCXX_VER < 60090010 */
-#else /* ! __DECCXX */
-# error ace/config-cxx-common.h can only be used with Compaq CXX!
-#endif /* ! __DECCXX */
-
-#include "ace/post.h"
-#endif /* ACE_CXX_COMMON_H */
diff --git a/ace/config-cygwin32-common.h b/ace/config-cygwin32-common.h
deleted file mode 100644
index f288b544339..00000000000
--- a/ace/config-cygwin32-common.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This configuration file is designed to be included by another,
-// specific configuration file. It provides config information common
-// to all CygWin platforms. It automatically determines the CPU
-// architecture, compiler (g++ or egcs), and libc (libc5 or glibc),
-// and configures based on those.
-
-#ifndef ACE_CYGWIN32_COMMON_H
-#define ACE_CYGWIN32_COMMON_H
-#include "ace/pre.h"
-
-#define CYGWIN32
-
-#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
-#define ACE_LACKS_SYSV_MSG_H
-#define ACE_HAS_SIG_MACROS
-#define ACE_LACKS_SYSTIME_H
-#define ACE_LACKS_TELLDIR
-#define ACE_LACKS_SYSV_SHMEM
-#define ACE_LACKS_SEMBUF_T
-#define ACE_LACKS_NAMED_POSIX_SEM
-#define ACE_LACKS_SENDMSG
-#define ACE_LACKS_RECVMSG
-#define ACE_LACKS_READDIR_R
-#define ACE_LACKS_RLIMIT
-#define ACE_LACKS_SOCKETPAIR
-#define ACE_LACKS_SEEKDIR
-#define ACE_LACKS_TEMPNAM
-#define ACE_LACKS_MKTEMP
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// Needed to differentiate between libc 5 and libc 6 (aka glibc).
-// It's there on all libc 5 systems I checked.
-#include <features.h>
-
-
-// First the machine specific part
-#define ACE_HAS_CYGWIN32_SOCKET_H
-#define ACE_LACKS_TCP_H
-
-// Then glibc/libc5 specific parts
-
-#if defined(__GLIBC__)
-# define ACE_HAS_BROKEN_SETRLIMIT
-# define ACE_HAS_RUSAGE_WHO_ENUM enum __rusage_who
-# define ACE_HAS_RLIMIT_RESOURCE_ENUM enum __rlimit_resource
-# define ACE_HAS_SOCKLEN_T
-
- // To avoid the strangeness with Linux's ::select (), which modifies
- // its timeout argument, use ::poll () instead.
-# define ACE_HAS_POLL
-
- // NOTE: the following defines are necessary with glibc 2.0 (0.961212-5)
- // on Alpha. I assume that they're necessary on Intel as well,
- // but that may depend on the version of glibc that is used.
-# define ACE_HAS_DLFCN_H_BROKEN_EXTERN_C
-# define ACE_HAS_VOIDPTR_SOCKOPT
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-# define ACE_LACKS_GETPGID
- // The strtok_r declaration is protected in string.h.
- extern "C" char *strtok_r __P ((char *__s, __const char *__delim,
- char **__save_ptr));
- // NOTE: end of glibc 2.0 (0.961212-5)-specific configuration.
-
-# if __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1
-# undef ACE_HAS_BYTESEX_H
-# define ACE_HAS_SIGINFO_T
-# define ACE_LACKS_SIGINFO_H
-# define ACE_HAS_UCONTEXT_T
-# endif /* __GLIBC__ 2.1+ */
- // Changes above were suggested by Robert Hanzlik <robi@codalan.cz>
- // to get ACE to compile on Linux using glibc 2.1 and libg++/gcc 2.8
-
-#endif /* __GLIBC__ */
-
-
-// Then the compiler specific parts
-
-// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
-// this must appear before its #include.
-#define ACE_HAS_STRING_CLASS
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#elif defined (__KCC)
-# include "ace/config-kcc-common.h"
-#else /* ! __GNUG__ && ! __KCC */
-# error unsupported compiler in ace/config-linux-common.h
-#endif /* ! __GNUG__ && ! __KCC */
-
-
-// Completely common part :-)
-
-// Platform/compiler has the sigwait(2) prototype
-#define ACE_HAS_SIGWAIT
-
-# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-
-// Compiler/platform supports alloca().
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-#define ACE_HAS_GETRUSAGE_PROTO
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// ONLY define this if you have config'd multicast into a 2.x kernel.
-// If you do anything else, we've never tested it!
-#if !defined(ACE_HAS_IP_MULTICAST)
-# define ACE_HAS_IP_MULTICAST
-#endif /* #if ! defined(ACE_HAS_IP_MULTICAST) */
-
-#define ACE_HAS_BIG_FD_SET
-
-// Linux defines struct msghdr in /usr/include/socket.h
-#define ACE_HAS_MSG
-
-// Linux "improved" the interface to select() so that it modifies
-// the struct timeval to reflect the amount of time not slept
-// (see NOTES in Linux's select(2) man page).
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-
-#define ACE_HAS_TERM_IOCTLS
-
-#define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65535
-
-#define ACE_DEFAULT_SELECT_REACTOR_SIZE 256
-
-#define ACE_HAS_GETPAGESIZE 1
-
-// Platform lacks POSIX prototypes for certain System V functions
-// like shared memory and message queues.
-#define ACE_LACKS_SOME_POSIX_PROTOTYPES
-
-
-#define ACE_LACKS_STRRECVFD
-
-#define ACE_LACKS_MSYNC
-#define ACE_LACKS_MADVISE
-
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-#define ACE_HAS_GPERF
-
-#define ACE_HAS_DIRENT
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_LACKS_MKFIFO
-
-#include "ace/post.h"
-#endif /* ACE_LINUX_COMMON_H */
diff --git a/ace/config-cygwin32.h b/ace/config-cygwin32.h
deleted file mode 100644
index ec433dc1e17..00000000000
--- a/ace/config-cygwin32.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for CygWin
-// platforms using GNU C++.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#include "ace/config-cygwin32-common.h"
-
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-dgux-4.11-epc.h b/ace/config-dgux-4.11-epc.h
deleted file mode 100644
index b19d56cf7f1..00000000000
--- a/ace/config-dgux-4.11-epc.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for DG/UX
-// 4.11 platforms using the EPC compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define ACE_DGUX
-
-// Platform requires (struct sockaddr *) for msg_name field of struct
-// msghdr.
-#define ACE_HAS_SOCKADDR_MSG_NAME
-
-// Platform lacks strcasecmp().
-#define ACE_LACKS_STRCASECMP
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Platform supports system configuration information.
-#define ACE_HAS_SYSINFO
-
-// Platform supports the POSIX regular expression library.
-#define ACE_HAS_REGEX
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-// #define ACE_HAS_SYSCALL_H
-
-// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-// Platform has terminal ioctl flags like TCGETS and TCSETS.
-#define ACE_HAS_TERM_IOCTLS
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform supports SunOS high resolution timers.
-// #define ACE_HAS_HI_RES_TIMER
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Compiler/platform supports alloca()
-// #define ACE_HAS_ALLOCA
-
-// Compiler/platform has <alloca.h>
-// #define ACE_HAS_ALLOCA_H
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// Platform supports the /proc file system.
-#define ACE_HAS_PROC_FS
-
-// Platform supports the prusage_t struct.
-// #define ACE_HAS_PRUSAGE_T
-#define ACE_HAS_GETRUSAGE
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes.
-#define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-// #define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform supports SVR4 gettimeofday() prototype.
-// #define ACE_HAS_SVR4_GETTIMEOFDAY
-
-// DG/UX uses the same gettimeofday() prototype as OSF/1.
-#define ACE_HAS_OSF1_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_SVR4_SIGNAL_T
-
-// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
-#define ACE_HAS_SVR4_TLI
-
-// Platform provides <sys/filio.h> header.
-// #define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform supports sys_siglist array.
-#define ACE_HAS_SYS_SIGLIST
-
-/* Turn off the following four defines if you want to disable threading. */
-// Compile using multi-thread libraries.
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 0
-#endif
-
-// Platform supports threads.
-// #define ACE_HAS_THREADS
-
-// Platform supports POSIX pthreads *and* Solaris threads!
-// #define ACE_HAS_STHREADS
-// #define ACE_HAS_PTHREADS
-#define ACE_HAS_SIGWAIT
-// If ACE doesn't compile due to the lack of these methods, please
-// send email to schmidt@cs.wustl.edu reporting this.
-// #define ACE_LACKS_CONDATTR_PSHARED
-// #define ACE_LACKS_MUTEXATTR_PSHARED
-
-// Compiler/platform has thread-specific storage
-//
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// Reactor detects deadlock
-// #define ACE_REACTOR_HAS_DEADLOCK_DETECTION
-
-// Platform supports ACE_TLI timod STREAMS module.
-#define ACE_HAS_TIMOD_H
-
-// Platform supports ACE_TLI tiuser header.
-#define ACE_HAS_TIUSER_H
-
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-
-// Platform supports ACE_TLI.
-#define ACE_HAS_TLI
-
-// Use the poll() event demultiplexor rather than select().
-//#define ACE_USE_POLL
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// #define _USING_POSIX4A_DRAFT6
-#define _POSIX_SOURCE
-#define _DGUX_SOURCE
-// #define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
-#define ACE_HAS_UCONTEXT_T
-#define ACE_LACKS_SYSTIME_H
-#define ACE_HAS_NONCONST_GETBY
-#define ACE_LACKS_MADVISE
-
-#if !defined (IP_ADD_MEMBERSHIP)
-# define IP_ADD_MEMBERSHIP 0x13
-#endif
-
-#if !defined (IP_DROP_MEMBERSHIP)
-# define IP_DROP_MEMBERSHIP 0x14
-#endif
-
-// Header files lack t_errno for ACE_TLI.
-#define ACE_LACKS_T_ERRNO
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_IDTYPE_T
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-dgux-4.x-ghs.h b/ace/config-dgux-4.x-ghs.h
deleted file mode 100644
index b53126b59ed..00000000000
--- a/ace/config-dgux-4.x-ghs.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for DG/UX
-// 4.x platforms using the Green Hills Multi C++ compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define ACE_DGUX
-
-# define ACE_CONFIG_INCLUDE_GHS_COMMON
-# include "ace/config-ghs-common.h"
-
-// Static objects do not get initialized correctly, so this is needed.
-#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-
-// Platform requires (struct sockaddr *) for msg_name field of struct
-// msghdr.
-#define ACE_HAS_SOCKADDR_MSG_NAME
-
-// Platform lacks strcasecmp().
-#define ACE_LACKS_STRCASECMP
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Platform supports system configuration information.
-#define ACE_HAS_SYSINFO
-
-// Platform supports the POSIX regular expression library.
-#define ACE_HAS_REGEX
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
-//#define ACE_HAS_REENTRANT_FUNCTIONS
-
-// Platform has terminal ioctl flags like TCGETS and TCSETS.
-#define ACE_HAS_TERM_IOCTLS
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform supports SunOS high resolution timers.
-// #define ACE_HAS_HI_RES_TIMER
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Green Hills doesn't give a preprocessor symbol for long double
-#define ACE_SIZEOF_LONG_DOUBLE 8
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// Platform supports the /proc file system.
-#define ACE_HAS_PROC_FS
-
-// Platform supports the prusage_t struct.
-// #define ACE_HAS_PRUSAGE_T
-#define ACE_HAS_GETRUSAGE
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes.
-#define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-// ... but redefines the entrypoint names with a leading underscore
-#define dlopen _dlopen
-#define dlclose _dlclose
-#define dlerror _dlerror
-#define dlsym _dlsym
-// ... and uses 'char *' rather than 'const char *'
-#define ACE_HAS_CHARPTR_DL
-
-// DG/UX uses the same gettimeofday() prototype as OSF/1.
-#define ACE_HAS_OSF1_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_SVR4_SIGNAL_T
-
-// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
-#define ACE_HAS_SVR4_TLI
-
-// Compiler/platform supports sys_siglist array.
-// On DG/UX this is only done if the /usr/include/sys/_int_dg_features.h
-// file determines it should be turned on. It will take some work to
-// figure out the magic options to turn it on reliably, so it'll have to
-// be delayed for now.
-//#define _TARGETTING_DGUXELF 1
-//#define _IX86_DG 1
-//#define _DGUX_TARGET 1
-//#define ACE_HAS_SYS_SIGLIST
-
-/* Turn off the following four defines if you want to disable threading. */
-// Compile using multi-thread libraries.
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-// Platform supports threads.
-#define ACE_HAS_THREADS
-#define ACE_HAS_PTHREADS
-// DG/UX claims to implement draft 10 of the pthreads standard (which became
-// (with editorial change only) the final standard. To get the behavior, some
-// further macros need to be defined which are specific to DG/UX.
-// _POSIX4A_DRAFT10_SOURCE turns on the draft 10 variant of threads.
-// _POSIX4A_DRAFT_SOURCE turns on sched_yield().
-#define _POSIX4A_DRAFT10_SOURCE
-#define ACE_HAS_PTHREADS_STD
-#define _POSIX4_DRAFT_SOURCE
-// Well, here are some from the standard they don't have...
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-#define ACE_HAS_SIGWAIT
-#define ACE_LACKS_CONDATTR_PSHARED
-#define ACE_LACKS_THREAD_PROCESS_SCOPING
-// The default thread stacksize on DG/UX 4.x is 4096. This needs to be bumped
-// up to do anything real in ACE.
-#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 65536
-
-// Need to #include <sched.h>
-#define ACE_NEEDS_SCHED_H
-
-// Compiler/platform has thread-specific storage
-//
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// Platform supports ACE_TLI timod STREAMS module.
-#define ACE_HAS_TIMOD_H
-
-// Platform supports ACE_TLI tiuser header.
-#define ACE_HAS_TIUSER_H
-
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-
-// Platform supports ACE_TLI.
-#define ACE_HAS_TLI
-
-// Platform doesn't have read-write locks natively.
-#define ACE_LACKS_RWLOCK_T
-
-// Platform doesn't have timespec_t data type.
-#define ACE_LACKS_TIMESPEC_T
-
-// Use the poll() event demultiplexor rather than select().
-//#define ACE_USE_POLL
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-#define ACE_TEMPLATES_REQUIRE_SOURCE
-
-#define ACE_HAS_UCONTEXT_T
-#define ACE_LACKS_SYSTIME_H
-#define ACE_HAS_NONCONST_GETBY
-#define ACE_LACKS_MADVISE
-
-#if !defined (IP_ADD_MEMBERSHIP)
-#define IP_ADD_MEMBERSHIP 0x13
-#endif
-
-#if !defined (IP_DROP_MEMBERSHIP)
-# define IP_DROP_MEMBERSHIP 0x14
-#endif
-
-// Header files lack t_errno for ACE_TLI.
-#define ACE_LACKS_T_ERRNO
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-freebsd-pthread.h b/ace/config-freebsd-pthread.h
deleted file mode 100644
index add350fb008..00000000000
--- a/ace/config-freebsd-pthread.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for FreeBSD
-// platforms with GNU C++ and the POSIX (pthread) threads package.
-
-// Notice that the threaded version of ACE is only supported for -current.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#include <osreldate.h>
-// Make sure we source in the OS version.
-
-#if ! defined (__ACE_INLINE__)
-#define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#if (__FreeBSD_version < 220000)
-#error Threads are not supported.
-#endif /* __FreeBSD_version < 220000 */
-
-#define ACE_SIZEOF_LONG_DOUBLE 12
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#endif /* __GNUG__ */
-
-#if defined (ACE_HAS_PENTIUM)
-# undef ACE_HAS_PENTIUM
-#endif /* ACE_HAS_PENTIUM */
-
-// Platform specific directives
-// gcc defines __FreeBSD__ automatically for us.
-#if !defined (_THREAD_SAFE)
-#define _THREAD_SAFE
-#endif /* _THREAD_SAFE */
-
-#define ACE_HAS_GPERF
-
-#define ACE_HAS_ALT_CUSERID
-#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_READDIR_R
-#define ACE_HAS_SIG_MACROS
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_CHARPTR_DL
-//#define ACE_USES_ASM_SYMBOL_IN_DLSYM
-#define ACE_LACKS_SIGSET
-#define ACE_NEEDS_SCHED_H
-
-// Use of <malloc.h> is deprecated.
-#define ACE_LACKS_MALLOC_H
-
-// sched.h still not fully support on FreeBSD ?
-// this is taken from /usr/src/lib/libc_r/uthread/pthread-private.h
-enum schedparam_policy {
- SCHED_RR,
- SCHED_IO,
- SCHED_FIFO,
- SCHED_OTHER
-};
-
-// This won't be necessary after it is fixed in the system include headers.
-extern "C" { char * cuserid (char *s); }
-
-// Platform supports POSIX timers via struct timespec.
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_UALARM
-
-// Platform defines struct timespec but not timespec_t
-#define ACE_LACKS_TIMESPEC_T
-
-#define ACE_LACKS_SYSTIME_H
-
-#define ACE_LACKS_STRRECVFD
-
-#define ACE_HAS_SIN_LEN
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-#if (__FreeBSD_version >= 300000)
-#define ACE_HAS_SIGINFO_T
-#endif /* __FreeBSD_version >= 300000 */
-
-#if (__FreeBSD_version >= 320000)
-#define ACE_HAS_REENTRANT_FUNCTIONS
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-#define ACE_LACKS_PWD_REENTRANT_FUNCTIONS
-#define ACE_LACKS_RAND_REENTRANT_FUNCTIONS
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-#endif /* __FreeBSD_version >= 320000 */
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#define ACE_LACKS_SIGINFO_H
-#define ACE_LACKS_UCONTEXT_H
-#define ACE_LACKS_SI_ADDR
-
-// Compiler/platform supports SVR4 signal typedef
-#define ACE_HAS_SVR4_SIGNAL_T
-
-// Compiler/platform supports alloca().
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform supports SVR4 dynamic linking semantics..
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Explicit dynamic linking permits "lazy" symbol resolution
-#define ACE_HAS_RTLD_LAZY_V
-
-// platform supports POSIX O_NONBLOCK semantics
-#define ACE_HAS_POSIX_NONBLOCK
-
-// platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Compiler/platform has <alloca.h>
-//#define ACE_HAS_ALLOCA_H
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Compiler/platform supports sys_siglist array.
-// *** This refers to (_sys_siglist) instead of (sys_siglist)
-// #define ACE_HAS_SYS_SIGLIST
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform supports SVR4 gettimeofday() prototype
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-// #define ACE_HAS_TIMEZONE_GETTIMEOFDAY
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_HAS_MSG
-#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-#define ACE_HAS_NONCONST_MSGSND
-
-// Thread specific settings
-// Yes, we do have threads.
-#define ACE_HAS_THREADS
-// And they're even POSIX pthreads
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif /* ! ACE_MT_SAFE */
-#define ACE_HAS_PTHREADS
-#define ACE_LACKS_SETSCHED
-#define ACE_LACKS_PTHREAD_CANCEL
-#define ACE_LACKS_THREAD_PROCESS_SCOPING
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-#define ACE_LACKS_CONDATTR_PSHARED
-#define ACE_LACKS_MUTEXATTR_PSHARED
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_HAS_DIRENT
-
-#define ACE_HAS_SIGWAIT
-
-#define ACE_HAS_TERM_IOCTLS
-#define ACE_USES_OLD_TERMIOS_STRUCT
-#define ACE_USES_HIGH_BAUD_RATES
-#define TCGETS TIOCGETA
-#define TCSETS TIOCSETA
-
-#if (__FreeBSD_version > 400000)
-#undef ACE_LACKS_SIGSET
-#define ACE_HAS_UCONTEXT_T
-#define ACE_HAS_SOCKLEN_T
-#endif
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-freebsd.h b/ace/config-freebsd.h
deleted file mode 100644
index d6bb6cff6ff..00000000000
--- a/ace/config-freebsd.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ***** This configuration file is still under testing. *****
-
-// The following configuration file is designed to work for FreeBSD
-// platforms using GNU C++ but without the POSIX (pthread) threads package
-
-#ifndef ACE_CONFIG_FREEBSD_H
-#define ACE_CONFIG_FREEBSD_H
-#include "ace/pre.h"
-
-#include <osreldate.h>
-// Make sure we source in the OS version.
-
-#if ! defined (__ACE_INLINE__)
-#define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#if (__FreeBSD_version < 220000) && defined (_THREAD_SAFE)
-#error Threads are not supported.
-#endif /* __FreeBSD_version < 220000 */
-
-#define ACE_SIZEOF_LONG_DOUBLE 12
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#endif /* __GNUG__ */
-
-#define ACE_HAS_GPERF
-
-// Platform specific directives
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_READDIR_R
-#define ACE_HAS_SIG_MACROS
-#define ACE_HAS_CHARPTR_DL
-#define ACE_HAS_DIRENT
-#define ACE_USES_ASM_SYMBOL_IN_DLSYM
-#define ACE_LACKS_SIGSET
-#define ACE_LACKS_SIGINFO_H
-#define ACE_LACKS_UCONTEXT_H
-#define ACE_LACKS_SI_ADDR
-
-#if (__FreeBSD__ > 2)
-#define ACE_HAS_SIGINFO_T
-#endif /* __FreeBSD__ > 2 */
-
-// Use of <malloc.h> is deprecated.
-#define ACE_LACKS_MALLOC_H
-
-// This is for 2.1.x only. By default, gcc defines __FreeBSD__ automatically
-#if (__FreeBSD_version < 220000)
-
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// This is to fix the nested struct if_data definition on FreeBSD 2.1.x
-#include <sys/types.h>
-#include <sys/time.h>
-struct if_data {
-/* generic interface information */
- u_char ifi_type; /* ethernet, tokenring, etc */
- u_char ifi_physical; /* e.g., AUI, Thinnet, 10base-T, etc */
- u_char ifi_addrlen; /* media address length */
- u_char ifi_hdrlen; /* media header length */
- u_long ifi_mtu; /* maximum transmission unit */
- u_long ifi_metric; /* routing metric (external only) */
- u_long ifi_baudrate; /* linespeed */
-/* volatile statistics */
- u_long ifi_ipackets; /* packets received on interface */
- u_long ifi_ierrors; /* input errors on interface */
- u_long ifi_opackets; /* packets sent on interface */
- u_long ifi_oerrors; /* output errors on interface */
- u_long ifi_collisions; /* collisions on csma interfaces */
- u_long ifi_ibytes; /* total number of octets received */
- u_long ifi_obytes; /* total number of octets sent */
- u_long ifi_imcasts; /* packets received via multicast */
- u_long ifi_omcasts; /* packets sent via multicast */
- u_long ifi_iqdrops; /* dropped on input, this interface */
- u_long ifi_noproto; /* destined for unsupported protocol */
- struct timeval ifi_lastchange;/* time of last administrative ch
-ange */
-} ;
-
-// this is a hack, but since this only occured in FreeBSD 2.1.x,
-// I guess it is ok.
-#define ACE_HAS_BROKEN_TIMESPEC_MEMBERS
-
-#endif /* __FreeBSD_version < 220000 */
-
-// Platform supports POSIX timers via struct timespec.
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_UALARM
-
-// Platform defines struct timespec but not timespec_t
-#define ACE_LACKS_TIMESPEC_T
-
-#define ACE_LACKS_SYSTIME_H
-
-#define ACE_LACKS_STRRECVFD
-
-#define ACE_HAS_SIN_LEN
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-#if !defined(FreeBSD_2_1)
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#endif /* defined FreeBSD_2_1 */
-
-// Compiler/platform supports SVR4 signal typedef
-#define ACE_HAS_SVR4_SIGNAL_T
-
-// Compiler/platform supports alloca().
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform supports SVR4 dynamic linking semantics..
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Explicit dynamic linking permits "lazy" symbol resolution
-#define ACE_HAS_RTLD_LAZY_V
-
-// platform supports POSIX O_NONBLOCK semantics
-#define ACE_HAS_POSIX_NONBLOCK
-
-// platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Compiler/platform has <alloca.h>
-//#define ACE_HAS_ALLOCA_H
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Compiler/platform supports sys_siglist array.
-// *** This refers to (_sys_siglist) instead of (sys_siglist)
-// #define ACE_HAS_SYS_SIGLIST
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform supports SVR4 gettimeofday() prototype
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-// #define ACE_HAS_TIMEZONE_GETTIMEOFDAY
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_HAS_MSG
-#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-#define ACE_HAS_NONCONST_MSGSND
-
-#if (__FreeBSD_version >= 228000)
-#define ACE_HAS_SIGWAIT
-#endif /* __FreeBSD_version >= 22800 */
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-
-#define ACE_HAS_TERM_IOCTLS
-#define ACE_USES_OLD_TERMIOS_STRUCT
-#define ACE_USES_HIGH_BAUD_RATES
-#define TCGETS TIOCGETA
-#define TCSETS TIOCSETA
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_FREEBSD_H */
diff --git a/ace/config-fsu-pthread.h b/ace/config-fsu-pthread.h
deleted file mode 100644
index 4ce0c5fa4e3..00000000000
--- a/ace/config-fsu-pthread.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// $Id$
-
-#ifndef ACE_CONFIG_FSU_PTHREAD_H
-#define ACE_CONFIG_FSU_PTHREAD_H
-#include "ace/pre.h"
-
-#define ACE_LACKS_CONST_TIMESPEC_PTR
-
-// Threads
-#define ACE_HAS_THREADS
-#if !defined(ACE_MT_SAFE)
-#define ACE_MT_SAFE 1
-#endif
-
-/*
-** FSU implements 1003.4a draft 6 threads - the ACE_HAS_FSU_PTHREADS def
-** is needed for some peculiarities with this particular implementation.
-*/
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_DRAFT6
-#define ACE_HAS_FSU_PTHREADS
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_PTHREAD_YIELD_VOID_PTR
-#define ACE_HAS_PTHREAD_ATTR_INIT
-#define ACE_HAS_PTHREAD_ATTR_DESTROY
-#define ACE_LACKS_THREAD_STACK_ADDR
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-#define ACE_LACKS_CONDATTR_PSHARED
-#define ACE_LACKS_MUTEXATTR_PSHARED
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_SETSCHED
-#if defined(M_UNIX)
-#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
-#endif
-
-#if !defined(ACE_HAS_POSIX_TIME)
-#define ACE_HAS_POSIX_TIME
-#define ACE_LACKS_TIMESPEC_T
-#endif
-
-#include <pthread.h>
-
-#if !defined(PTHREAD_STACK_MIN)
-#define PTHREAD_STACK_MIN (1024*10)
-#endif
-
-#define ACE_LACKS_THREAD_PROCESS_SCOPING
-
-#undef PTHREAD_INHERIT_SCHED
-
-struct sched_param
-{
- int sched_priority;
- int prio;
-};
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_FSU_PTHREAD_H */
diff --git a/ace/config-g++-common.h b/ace/config-g++-common.h
deleted file mode 100644
index bb70a3aa8d1..00000000000
--- a/ace/config-g++-common.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This configuration file is designed to be included by another,
-// specific configuration file. It provides config information common
-// to all g++ platforms, including egcs.
-
-#ifndef ACE_GNUG_COMMON_H
-#define ACE_GNUG_COMMON_H
-#include "ace/pre.h"
-
-#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 8) || \
- (defined (ACE_VXWORKS) && ACE_VXWORKS >= 0x540)
- // egcs or g++ >= 2.8.0
-
-# define ACE_HAS_ANSI_CASTS
-# define ACE_HAS_CPLUSPLUS_HEADERS
-# define ACE_HAS_EXPLICIT_KEYWORD
-# define ACE_HAS_MUTABLE_KEYWORD
-# define ACE_HAS_STDCPP_STL_INCLUDES
-# define ACE_HAS_TEMPLATE_TYPEDEFS
-# define ACE_HAS_TYPENAME_KEYWORD
-# define ACE_HAS_STD_TEMPLATE_SPECIALIZATION
-# define ACE_HAS_STANDARD_CPP_LIBRARY 1
-# define ACE_USES_OLD_IOSTREAMS
-// For some reason EGCS doesn't define this in its stdlib.
-# define ACE_LACKS_AUTO_PTR
-
-# if __GNUC__ == 2 && __GNUC_MINOR__ >= 91
-# define ACE_HAS_USING_KEYWORD
- // This is only needed with egcs 1.1 (egcs-2.91.57). It can't be
- // used with older versions.
-# define ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR
-# else /* This is for gcc 2.8.x */
-# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
-# endif /* __GNUC__ >= 2.91 */
-
-# if __GNUC__ == 2 && __GNUC_MINOR__ != 9 && __GNUC_MINOR__ != 91
-# // g++ 2.9 and egcs 2.91 apparently have a bug with this . . .
-# define ACE_HAS_TEMPLATE_SPECIALIZATION
-# endif /* __GNUC__ != 2.9 && __GNUC__ != 2.91*/
-
- // Some versions of egcs, e.g., egcs-2.90.27 980315 (egcs-1.0.2 release),
- // have bugs with static data members in template classes.
-# define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
-
- // __EXCEPTIONS is defined with -fexceptions, the egcs default. It
- // is not defined with -fno-exceptions, the ACE default for g++.
- // ACE_HAS_EXCEPTIONS is defined in
- // include/makeinclude/wrapper_macros.GNU, so this really isn't
- // necessary. Just in case . . .
-# if defined (__EXCEPTIONS) && !defined (ACE_HAS_EXCEPTIONS)
-# define ACE_HAS_EXCEPTIONS
-# endif /* __EXCEPTIONS && ! ACE_HAS_EXCEPTIONS */
-
-# if defined (ACE_HAS_EXCEPTIONS)
-# define ACE_NEW_THROWS_EXCEPTIONS
-# endif /* ACE_HAS_EXCEPTIONS */
-
-#else /* ! egcs */
- // Plain old g++.
-# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
-# define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
-# define ACE_HAS_GNUG_PRE_2_8
-# define ACE_HAS_TEMPLATE_SPECIALIZATION
-# define ACE_LACKS_MIN_MAX_TEMPLATES
-#endif /* ! egcs */
-
-#if (defined (i386) || defined (__i386__)) && !defined (ACE_SIZEOF_LONG_DOUBLE)
-# define ACE_SIZEOF_LONG_DOUBLE 12
-#endif /* i386 */
-
-#if defined (i386) || defined (__i386__)
- // If running an Intel, assume that it's a Pentium so that
- // ACE_OS::gethrtime () can use the RDTSC instruction. If running a
- // 486 or lower, be sure to comment this out. (If not running an
- // Intel CPU, this #define will not be seen because of the i386
- // protection, so it can be ignored.)
-# define ACE_HAS_PENTIUM
-#endif /* i386 */
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
- // We define it with a -D with make depend.
-# define ACE_LACKS_PRAGMA_ONCE
-#endif /* ! ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_GNU_REPO)
- // -frepo causes unresolved symbols of basic_string left- and
- // right-shift operators with ACE_HAS_STRING_CLASS.
-# if defined (ACE_HAS_STRING_CLASS)
-# undef ACE_HAS_STRING_CLASS
-# endif /* ACE_HAS_STRING_CLASS */
-#else /* ! ACE_HAS_GNU_REPO */
-# define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
-#endif /* ! ACE_HAS_GNU_REPO */
-#define ACE_HAS_GNUC_BROKEN_TEMPLATE_INLINE_FUNCTIONS
-#define ACE_TEMPLATES_REQUIRE_SOURCE
-
-#include "ace/post.h"
-#endif /* ACE_GNUG_COMMON_H */
diff --git a/ace/config-ghs-common.h b/ace/config-ghs-common.h
deleted file mode 100644
index 673a7c5ec15..00000000000
--- a/ace/config-ghs-common.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This configuration file is designed to be included by another,
-// specific configuration file. It provides config information common
-// to all Green Hills platforms.
-
-#ifndef ACE_GHS_COMMON_H
-#define ACE_GHS_COMMON_H
-#include "ace/pre.h"
-
-#if !defined (ACE_CONFIG_INCLUDE_GHS_COMMON)
-# error ace/config-ghs-common.h: ACE configuration error! Do not #include this file directly!
-#endif
-
-#if defined (ghs)
-
-# if defined (sun)
- // Need nonstatic Object_Manager on Solaris to prevent seg fault
- // on startup.
-# define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-# endif /* sun */
-
-# if defined (__STANDARD_CXX)
- // Green Hills 1.8.9, but not 1.8.8.
-# define ACE_HAS_STANDARD_CPP_LIBRARY 1
-# define ACE_LACKS_AUTO_PTR
-# define ACE_LACKS_CHAR_RIGHT_SHIFTS
-# define ACE_LACKS_UNBUFFERED_STREAMBUF
-# define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
-# else
-# define ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA
-# endif /* __STANDARD_CXX */
-
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF
-# define ACE_LACKS_LONGLONG_T
-# define ACE_LACKS_SIGNED_CHAR
-
-#else /* ! ghs */
-# error ace/config-ghs-common.h can only be used with Green Hills compilers!
-#endif /* ! ghs */
-
-#include "ace/post.h"
-#endif /* ACE_GHS_COMMON_H */
diff --git a/ace/config-hpux-10.x-g++.h b/ace/config-hpux-10.x-g++.h
deleted file mode 100644
index 239e63e43a0..00000000000
--- a/ace/config-hpux-10.x-g++.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for HP
-// platforms running HP/UX 10.x using G++.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
-// this must appear before its #include.
-#define ACE_HAS_STRING_CLASS
-
-#include "ace/config-g++-common.h"
-
-// These are apparantly some things which are special to g++ on HP? They are
-// compiler-related settings, but not in config-g++-common.h
-
-#define ACE_HAS_BROKEN_CONVERSIONS
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-#define _CLOCKID_T
-
-#include "ace/config-hpux-10.x.h"
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-hpux-10.x-hpc++.h b/ace/config-hpux-10.x-hpc++.h
deleted file mode 100644
index dfb63912c15..00000000000
--- a/ace/config-hpux-10.x-hpc++.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for HP
-// platforms running HP/UX 10.x with either of the HP C++ compilers.
-// This file contains compiler-specific settings, and uses the common
-// HP-UX file (config-hpux-10.x.h) for the platform information.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// There are 2 compiler-specific sections, plus a 3rd for common to both.
-// First is the HP C++ section...
-#if __cplusplus < 199707L
-
-// To use HP/C++ you need some patches, the following set
-//
-// PHSS_9855
-// PHSS_9096
-// PHSS_10261
-// PHSS_9062
-// PHSS_7505
-// PHSS_8490
-//
-// worked for me (Carlos O'Ryan), but you should check by yourself.
-// The most important one is PHSS_9855, but in depends on some of the
-// others.
-
-# define ACE_HAS_BROKEN_HPUX_TEMPLATES
-
-// Compiler can't handle calls like foo->operator T *()
-# define ACE_HAS_BROKEN_CONVERSIONS
-
-// Necessary with some compilers to pass ACE_TTY_IO as parameter to
-// DEV_Connector.
-# define ACE_NEEDS_DEV_IO_CONVERSION
-
-// Compiler's template mechanism must see source code (i.e., .C files).
-# define ACE_TEMPLATES_REQUIRE_SOURCE
-
-// Compiler's template mechanism requires the use of explicit C++
-// specializations for all used templates.
-# define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
-
-// The HP/UX compiler doesn't support volatile!!!!
-# define volatile
-
-#else // aC++ definitions
-
-// Parts of TAO (at least) use __HP_aCC to detect this compiler, but the
-// macro is not set until A.01.18. If it's not set, set it - it won't be an
-// HP-advertised value, but we don't check the value/version - just whether
-// it's set or not.
-# if !defined (__HP_aCC)
-# define __HP_aCC
-# endif /* __HP_aCC */
-
-// Compiler doesn't support the operator placement delete.
-# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
-
-// Precompiler needs extra flags to ignore "invalid #pragma directive"
-# define ACE_CC_PREPROCESSOR_ARGS "-E +W 67"
-
-// Compiler supports to-be-ANSI casts
-# define ACE_HAS_ANSI_CASTS
-
-// Compiler can't handle calls like foo->operator T *()
-# define ACE_HAS_BROKEN_CONVERSIONS
-
-// Compiler supports C++ exception handling
-# define ACE_HAS_EXCEPTIONS
-
-// Compiler enforces the "One Definition Rule"
-# define ACE_HAS_ONE_DEFINITION_RULE
-
-// Compiler enforces need for 'template<>" when specializing template
-// classes.
-# define ACE_HAS_STD_TEMPLATE_SPECIALIZATION
-
-// Compiler enforces proper use of 'typename'
-# define ACE_HAS_TYPENAME_KEYWORD
-
-// Compiler implements templates that support typedefs inside of classes
-// used as formal arguments to a template class.
-# define ACE_HAS_TEMPLATE_TYPEDEFS
-
-// Compiler supports the 'typename' qualifier.
-# define ACE_HAS_TYPENAME_KEYWORD
-
-// This is legit for A.01.12 and probably at least as far back as A.01.07.
-// Before that, not sure. But you shouldn't be there anyway ;-)
-# define ACE_HAS_USING_KEYWORD
-
-// Platform lacks streambuf "linebuffered ()".
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF
-
-// Compiler's template mechanism must see source code (i.e., .C files).
-# define ACE_TEMPLATES_REQUIRE_SOURCE
-
-// Compiler supports template specialization.
-# define ACE_HAS_TEMPLATE_SPECIALIZATION
-
-// Compiler's runtime new throws bad_alloc on out-of-memory condition.
-# define ACE_NEW_THROWS_EXCEPTIONS
-
-#endif /* __cplusplus < 199707L */
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-#define ACE_HAS_UALARM
-
-#define ACE_HAS_GPERF
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Compiler doesn't handle 'signed char' correctly (used in ace/IOStream.h)
-#define ACE_LACKS_SIGNED_CHAR
-
-#include "ace/config-hpux-10.x.h" /* OS information */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-hpux-10.x.h b/ace/config-hpux-10.x.h
deleted file mode 100644
index 6970104f83f..00000000000
--- a/ace/config-hpux-10.x.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for HP
-// platforms running HP/UX 10.x. It includes all of the ACE information
-// needed for HP-UX 10.x itself. The compiler-specific information is in
-// config-hpux-10.x-<compiler>.h - they include this file.
-
-#ifndef ACE_CONFIG_H
-#error "You need to use a compiler-specific .h file - they include this file"
-#endif
-
-// Compiling for HPUX.
-#if !defined (HPUX)
-#define HPUX
-#endif /* HPUX */
-#define HPUX_10
-
-#ifndef _HPUX_SOURCE
-#define _HPUX_SOURCE
-#include "ace/pre.h"
-#endif
-
-// Some things are different for 10.10 vs. 10.20 vs. 10.30
-// If the version number wasn't set up by the compiler command line,
-// set up as if it was 10.20.
-#if !defined (HPUX_VERS)
-#define HPUX_VERS 1020
-#endif
-
-#if (HPUX_VERS < 1020) // 10.10
-# define ACE_HAS_BROKEN_MMAP_H
-# define ACE_LACKS_T_ERRNO
-# define ACE_LACKS_TIMESPEC_T
-#elif (HPUX_VERS < 1030) // 10.20
-
- // Platform supports reentrant functions (all the POSIX *_r functions).
-# define ACE_HAS_REENTRANT_FUNCTIONS
- // But this one is not like other platforms
-# define ACE_CTIME_R_RETURNS_INT
- // And _REENTRANT must be set, even if not using threads.
-# if !defined (_REENTRANT)
-# define _REENTRANT
-# endif /* _REENTRANT */
-
-#else // 10.30
-// Don't know yet... probably will be 10.20 but with some different thread
-// settings.
-#endif /* HPUX_VERS tests */
-
-#include /**/ <sys/stdsyms.h>
-#include /**/ <sched.h> /* pthread.h doesn't include this */
-
-extern int h_errno; /* This isn't declared in a header file on HP-UX */
-
-
-////////////////////////////////////////////////////////////////////////////
-//
-// General OS information - see README for more details on what they mean
-//
-///////////////////////////////////////////////////////////////////////////
-
-// HP/UX needs to have these addresses in a special range.
-#define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-// But doesn't have a prototype for syscall()
-#define ACE_LACKS_SYSCALL
-
-// Platform supports POSIX 1.b clock_gettime ()
-#define ACE_HAS_CLOCK_GETTIME
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform has Dirent iterator functions.
-#define ACE_HAS_DIRENT
-
-// Platform supports getpagesize() call
-#define ACE_HAS_GETPAGESIZE
-// But we define this just to be safe
-#define ACE_PAGE_SIZE 4096
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// select's timeval arg is non-const
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Platform supports the POSIX struct timespec type
-#define ACE_HAS_POSIX_TIME
-
-// Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals
-#define ACE_HAS_SIGINFO_T
-
-// Platform doesn't detect a signal out of range unless it's way out of range.
-#define ACE_HAS_SIGISMEMBER_BUG
-
-// Platform supports ucontext_t (which is used in the extended signal API).
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// SunOS 4 style prototype for gettimeofday
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// HP/UX has an undefined syscall for GETRUSAGE...
-#define ACE_HAS_SYSCALL_GETRUSAGE
-// Note, this only works if the flag is set above!
-#define ACE_HAS_GETRUSAGE
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-#define ACE_HAS_UALARM
-
-// Platform has XPG4 wide character support
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-// Platform lacks readers/writer locks.
-#define ACE_LACKS_RWLOCK_T
-
-// Shared library path/search components
-#define ACE_DLL_SUFFIX ".sl"
-#define ACE_LD_SEARCH_PATH "SHLIB_PATH"
-
-//////////////////////////////////////////////////////////////////////////
-//
-// STREAMS information
-//
-//////////////////////////////////////////////////////////////////////////
-
-// Platform supports STREAMS
-#define ACE_HAS_STREAMS
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-// But the putmsg signature doesn't have it as const...
-#define ACE_LACKS_CONST_STRBUF_PTR
-
-// Platform supports STREAM pipes
-// This is possible, but not by default - need to rebuild the kernel to
-// get them enabled - see pipe(2) and "STREAMS/UX for the HP 9000"
-// #define ACE_HAS_STREAM_PIPES
-
-/////////////////////////////////////////////////////////////////////////
-//
-// TLI information
-//
-////////////////////////////////////////////////////////////////////////
-
-// Platform supports ACE_TLI, including SVR4 facilities.
-#define ACE_HAS_TLI
-
-// t_error's arg is char *, not const char *
-#define ACE_HAS_BROKEN_T_ERROR
-// ACE_HAS_SVR4_TLI should work on HP-UX, but doesn't yet. Riverace
-// problem ID P27.
-//#define ACE_HAS_SVR4_TLI
-// Platform supports ACE_TLI tiuser header.
-#define ACE_HAS_TIUSER_H
-// But it has _terrno() outside the extern "C" stuff.
-#define ACE_HAS_TIUSER_H_BROKEN_EXTERN_C
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-// Platform uses a TCP TLI device other than /dev/tcp. Uses XTI only.
-#define ACE_TLI_TCP_DEVICE "/dev/inet_cots"
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Threads information.
-// Threads definitions are controlled by the threads setting in the
-// include/makeinclude/platform_hpux_aCC.GNU file - see that for details.
-// If you build with threads support, the DCE Core subset must be installed
-// from the core OS CD.
-//
-////////////////////////////////////////////////////////////////////////
-
-#ifdef ACE_HAS_THREADS
-# if !defined (ACE_MT_SAFE)
- #define ACE_MT_SAFE 1
-# endif
-
-# define ACE_HAS_PTHREADS
-# define ACE_HAS_PTHREADS_DRAFT4
-// POSIX real-time semaphore definitions are in the header files, and it
-// will compile and link with this in place, but will not run. HP says
-// the functions are not implemented.
-//# define ACE_HAS_POSIX_SEM
-
-# define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// They forgot a const in the prototype of pthread_cond_timedwait
-# define ACE_LACKS_CONST_TIMESPEC_PTR
-
-// Platform lacks pthread_thr_sigsetmask
-# define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-// Platform has no implementation of pthread_condattr_setpshared()
-# define ACE_LACKS_CONDATTR_PSHARED
-
-// Platform lacks pthread_attr_setdetachstate()
-# define ACE_LACKS_SETDETACH
-
-// Platform lacks pthread_attr_setscope
-# define ACE_LACKS_THREAD_PROCESS_SCOPING
-
-// Platform lacks pthread_attr_setstackaddr
-# define ACE_LACKS_THREAD_STACK_ADDR
-
-// If this is not turned on, the CMA wrappers will redefine a bunch of
-// system calls with wrappers - one being select() and it only defines
-// select with int arguments (not fd_set). So, as long as _CMA_NOWRAPPERS_
-// is set, the regular fd_set arg types are used for select().
-// Without threads being compiled in, the fd_set/int thing is not an issue.
-# define _CMA_NOWRAPPERS_
-
-#else
-// If threading is disabled, then timespec_t does not get defined.
-# ifndef ACE_LACKS_TIMESPEC_T
-# define ACE_LACKS_TIMESPEC_T
-# endif
-#endif /* ACE_HAS_THREADS */
-
-// Manually tweaking malloc paddings.
-#define ACE_MALLOC_PADDING 16
-#define ACE_MALLOC_ALIGN 8
-#define ACE_CONTROL_BLOCK_ALIGN_LONGS 0
-#define ACE_PI_CONTROL_BLOCK_ALIGN_LONGS 2
-
-// Turns off the tracing feature.
-// To build with tracing enabled, make sure ACE_NTRACE is not defined
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#include "ace/post.h"
-#endif /* ACE_NTRACE */
diff --git a/ace/config-hpux-11.00.h b/ace/config-hpux-11.00.h
deleted file mode 100644
index 27d33c8135f..00000000000
--- a/ace/config-hpux-11.00.h
+++ /dev/null
@@ -1,399 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for HP
-// platforms running HP-UX 11.00 using aC++, CC, or gcc (2.95 and up).
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if defined (__GNUG__)
-
-// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
-// this must appear before its #include.
-# define ACE_HAS_STRING_CLASS
-
-# include "ace/config-g++-common.h"
-
-// gcc 2.95.2 supplies the ssize_t typedef.
-# define ACE_HAS_SSIZE_T
-
-# include "ace/config-hpux11.h"
-
-#else
-
-// The following configuration section is designed to work for HP
-// platforms running HP/UX 11.x with either of the HP C++ compilers.
-// There isn't a predefined macro for all cases of the compilers that
-// can be used to tell them apart from other compilers (e.g. __KCC, etc.)
-// only to tell C++ from aC++, using the value of __cplusplus.
-//
-// NOTE - HP advises people on 11.x to use aC++ since the older C++ doesn't
-// support 64-bit or kernel threads. So, though this file has the C++ info
-// in it, it's copied from the 10.x file and hasn't been verified.
-
-// There are 2 compiler-specific sections, plus a 3rd for common to both.
-// First is the HP C++ section...
-# if __cplusplus < 199707L
-
-# define ACE_HAS_BROKEN_HPUX_TEMPLATES
-
-// Compiler can't handle calls like foo->operator T *()
-# define ACE_HAS_BROKEN_CONVERSIONS
-
-// Necessary with some compilers to pass ACE_TTY_IO as parameter to
-// DEV_Connector.
-# define ACE_NEEDS_DEV_IO_CONVERSION
-
-// Compiler's template mechanism must see source code (i.e., .C files).
-# define ACE_TEMPLATES_REQUIRE_SOURCE
-
-// Compiler's template mechanism requires the use of explicit C++
-// specializations for all used templates.
-# define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
-
-// The HP/UX compiler doesn't support volatile!!!!
-# define volatile
-
-#else // aC++ definitions
-
-// Parts of TAO (at least) use __HP_aCC to detect this compiler, but the
-// macro is not set until A.03.13. If it's not set, set it - it won't be an
-// HP-advertised value, but we don't check the value/version - just whether
-// it's set or not.
-# if !defined (__HP_aCC)
-# define __HP_aCC
-# endif /* __HP_aCC */
-
-// Precompiler needs extra flags to ignore "invalid #pragma directive"
-# define ACE_CC_PREPROCESSOR_ARGS "-E +W 67"
-
-// Compiler supports ANSI casts
-# define ACE_HAS_ANSI_CASTS
-
-// Compiler can't handle calls like foo->operator T *()
-# define ACE_HAS_BROKEN_CONVERSIONS
-
-// Compiler supports C++ exception handling
-# define ACE_HAS_EXCEPTIONS 1
-
-// Compiler enforces the "One Definition Rule"
-# define ACE_HAS_ONE_DEFINITION_RULE
-
-# define ACE_HAS_TYPENAME_KEYWORD
-
-// Compiler implements templates that support typedefs inside of classes
-// used as formal arguments to a template class.
-# define ACE_HAS_TEMPLATE_TYPEDEFS
-
-// This is legit for A.03.05 - not sure A.03.04, but it should be.
-# define ACE_HAS_USING_KEYWORD
-
-// Platform lacks streambuf "linebuffered ()".
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF 1
-
-// Lack of (and broken) support for placement operator delete is a known
-// bug by HP, at least as of aC++ A.03.10. It may be fixed later, and if so
-// this would change to be a #if against an appropriate value of __HP_aCC
-# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
-
-// Compiler's 'new' throws exceptions on failure.
-# define ACE_NEW_THROWS_EXCEPTIONS
-
-// Compiler's template mechanism must see source code (i.e., .C files).
-# define ACE_TEMPLATES_REQUIRE_SOURCE
-
-// Compiler supports template specialization.
-# define ACE_HAS_TEMPLATE_SPECIALIZATION
-// ... and uses the template<> syntax
-# define ACE_HAS_STD_TEMPLATE_SPECIALIZATION
-# define ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION
-
-// Preprocessor needs some help with data types
-# if defined (__LP64__)
-# define ACE_SIZEOF_LONG 8
-# else
-# define ACE_SIZEOF_LONG 4
-# endif
-
-# endif /* __cplusplus < 199707L */
-
-// Compiler supports the ssize_t typedef.
-# define ACE_HAS_SSIZE_T
-
-// Compiler doesn't handle 'signed char' correctly (used in ace/IOStream.h)
-# define ACE_LACKS_SIGNED_CHAR
-
-#endif /* __GNUG__, HP */
-
-// KCC Specific Section
-#if defined(__KCC)
-# include "ace/config-kcc-common.h"
-# undef ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION
-# undef ACE_CC_PREPROCESSOR_ARGS
-#endif
-
-//*********************************************************************
-//
-// From here down is the compiler-INdependent OS settings.
-//
-//*********************************************************************
-
-// Compiling for HPUX.
-#if !defined (HPUX)
-#define HPUX
-#endif /* HPUX */
-#define HPUX_11
-
-#ifndef _HPUX_SOURCE
-#define _HPUX_SOURCE
-#endif
-
-#include /**/ <sys/stdsyms.h>
-
-////////////////////////////////////////////////////////////////////////////
-//
-// General OS information - see README for more details on what they mean
-//
-///////////////////////////////////////////////////////////////////////////
-
-// HP/UX needs to have these addresses in a special range.
-// If this is on a 64-bit model, the default is to use 64-bit addressing.
-// It can also be set so that the mapped region is shareable with 32-bit
-// programs. To enable the 32/64 sharing, comment out the first definition
-// of ACE_DEFAULT_BASE_ADDR and uncomment the two lines after it.
-// Note - there's a compiler bug on aC++ A.03.04 in 64-bit mode which prevents
-// these from working as-is. So, there's some hackery in Naming_Context.cpp
-// and Memory_Pool.cpp which works around it. It requires the
-// ACE_DEFAULT_BASE_ADDRL definition below - make sure it has the same
-// value as what you use for ACE_DEFAULT_BASE_ADDR. This is allegedly fixed
-// in A.03.10 on the June Applications CD.
-#if defined (__LP64__)
-# define ACE_DEFAULT_BASE_ADDR ((char *) 0x0000001100000000)
-//# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-//# define ACE_OS_EXTRA_MMAP_FLAGS MAP_ADDR32
-
-# define ACE_DEFAULT_BASE_ADDRL (0x0000001100000000)
-//# define ACE_DEFAULT_BASE_ADDRL (0x80000000)
-#else
-# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-#endif /* __LP64__ */
-
-// Platform can do async I/O (aio_*)
-#define ACE_HAS_AIO_CALLS
-// ... but seems to require this in order to keep from hanging. Needs some
-// investigation, maybe with HP. John Mulhern determined this value
-// empirically. YMMV. If it does vary, set it up in your own config.h which
-// then includes the ACE-supplied config.
-#if !defined (ACE_INFINITE)
-# define ACE_INFINITE 10000000
-#endif
-
-// Manually tweak the malloc control block paddings to properly align
-// things.
-#define ACE_PI_CONTROL_BLOCK_ALIGN_LONGS 2
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-// But doesn't have a prototype for syscall()
-#define ACE_LACKS_SYSCALL
-
-// Platform supports POSIX 1.b clock_gettime ()
-#define ACE_HAS_CLOCK_GETTIME
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform has Dirent iterator functions.
-#define ACE_HAS_DIRENT
-
-// Platform supports getpagesize() call
-#define ACE_HAS_GETPAGESIZE
-// But we define this just to be safe
-#define ACE_PAGE_SIZE 4096
-
-// Can run gperf on this platform (needed for TAO)
-# define ACE_HAS_GPERF
-
-// Optimize ACE_Handle_Set for select().
-# define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Platform's select() has non-const timeval argument
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Platform supports the POSIX struct timespec type
-#define ACE_HAS_POSIX_TIME
-
-// Platform supports reentrant functions (all the POSIX *_r functions).
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-// HP-UX 11 has reentrant netdb functions. The catch is that the old
-// functions (gethostbyname, etc.) are thread-safe and the _r versions are
-// not used and will be removed at some point. So, define things so
-// the _r versions are not used. This will slow things down a bit due to
-// the extra mutex lock in the ACE_NETDBCALL_RETURN macro, and will be fixed
-// in the future (problem ID P64).
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-
-// Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals
-#define ACE_HAS_SIGINFO_T
-
-// Platform doesn't detect a signal out of range unless it's way out of range.
-#define ACE_HAS_SIGISMEMBER_BUG
-
-#define ACE_HAS_UALARM
-
-// Platform supports ucontext_t (which is used in the extended signal API).
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// SunOS 4 style prototype for gettimeofday
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// Platform supports SVR4 dynamic linking semantics, in 64-bit mode only.
-// When used, this requires -ldl on the ACE library link line.
-#ifdef __LP64__
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#endif
-
-// HP/UX has an undefined syscall for GETRUSAGE...
-#define ACE_HAS_SYSCALL_GETRUSAGE
-// Note, this only works if the flag is set above!
-#define ACE_HAS_GETRUSAGE
-
-// Platform has the sigwait function in a header file
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SIGTIMEDWAIT
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// accept() is thread-safe
-#define ACE_HAS_THREAD_SAFE_ACCEPT
-
-// Platform has XPG4 wide character support
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-// Platform lacks a typedef for timespec_t, but has struct timespec
-#define ACE_LACKS_TIMESPEC_T
-
-// Platform needs a timer skew value. It *may* vary by processor, but this
-// one works. You can override it in your config.h file if needed.
-// It's in units of microseconds. This value is 10 msec.
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-// Shared library name/path components
-#define ACE_DLL_SUFFIX ".sl"
-#if defined (__LP64__)
-# define ACE_LD_SEARCH_PATH "LD_LIBRARY_PATH"
-#else
-# define ACE_LD_SEARCH_PATH "SHLIB_PATH"
-#endif /* __LP64__ */
-
-//////////////////////////////////////////////////////////////////////////
-//
-// STREAMS information
-//
-//////////////////////////////////////////////////////////////////////////
-
-// Platform supports STREAMS
-#define ACE_HAS_STREAMS
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-// But the putmsg signature doesn't have it as const...
-// Well, it really does, but it depends on preprocessor defines.
-#define ACE_LACKS_CONST_STRBUF_PTR
-
-// Platform supports STREAM pipes
-// This is possible, but not by default - need to rebuild the kernel to
-// get them enabled - see pipe(2) and "STREAMS/UX for the HP 9000"
-// #define ACE_HAS_STREAM_PIPES
-
-/////////////////////////////////////////////////////////////////////////
-//
-// TLI/XTI information
-//
-////////////////////////////////////////////////////////////////////////
-
-// Platform supports XTI (includes TLI), including SVR4 facilities.
-#define ACE_HAS_TLI
-// ACE_HAS_SVR4_TLI should work on HP-UX, but doesn't yet. Riverace
-// problem ID P27.
-//#define ACE_HAS_SVR4_TLI
-// Platform uses <xti.h>, not tiuser.h
-#define ACE_HAS_XTI
-// But it has _terrno() outside the extern "C" stuff.
-#define ACE_HAS_TIUSER_H_BROKEN_EXTERN_C
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-// HP-UX 11.00 (at least at initial releases) has some busted macro defs
-#define ACE_HAS_BROKEN_XTI_MACROS
-// HP-UX 11 conforms to the XPG4 spec, which ACE calls broken for the
-// errmsg not being const...
-#define ACE_HAS_BROKEN_T_ERROR
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Threads information.
-//
-// Use of threads is controlled by the 'threads' argument to make. See
-// include/makeinclude/platform_hpux_aCC.GNU for details. If it's not set,
-// the default is to enable it, since kernel threads are always available
-// on HP-UX 11, as opposed to 10.x where it was optional software.
-//
-////////////////////////////////////////////////////////////////////////
-
-#if defined (ACE_HAS_THREADS)
-# if (ACE_HAS_THREADS == 0)
-# undef ACE_HAS_THREADS
-# endif /* ACE_HAS_THREADS == 0 */
-#else
-# define ACE_HAS_THREADS
-#endif /* ACE_HAS_THREADS */
-
-#if defined (ACE_HAS_THREADS)
-
-# if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-# endif
-
-# define ACE_HAS_PTHREADS
-# define ACE_HAS_PTHREADS_STD
-# define ACE_HAS_PTHREADS_UNIX98_EXT
-
-# define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#endif /* ACE_HAS_THREADS */
-
-#define ACE_HAS_POSIX_SEM
-
-// Turns off the tracing feature.
-// To build with tracing enabled, make sure ACE_NTRACE is not defined
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-hpux-11.x-hpc++.h b/ace/config-hpux-11.x-hpc++.h
deleted file mode 100644
index 116b59bfc23..00000000000
--- a/ace/config-hpux-11.x-hpc++.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This config file is obsolete and will disappear with the ACE 5.1 release.
-// use config-hpux-11.00.h instead, regardless of the compiler you use.
-
-#error "Use config-hpux-11.00.h instead"
diff --git a/ace/config-hpux-9.x-orbix.h b/ace/config-hpux-9.x-orbix.h
deleted file mode 100644
index e81e1ceed89..00000000000
--- a/ace/config-hpux-9.x-orbix.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for HP
-// platforms running HP/UX 9.x. Dave added Orbix stuff
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// Compiling for HPUX.
-#if !defined (HPUX)
-#define HPUX
-#endif /* HPUX */
-
-#if __cplusplus < 199707L
-#define ACE_HAS_BROKEN_HPUX_TEMPLATES
-#endif /* __cplusplus < 199707L */
-
-#define ACE_HAS_BROKEN_CONVERSIONS
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// They forgot a const in the prototype of const_timewait...
-#define ACE_LACKS_CONST_TIMESPEC_PTR
-
-// ************* HERE IS THE ORBIX STUFF - Dave 4/2/96
-#define ACE_HAS_ORBIX 1
-
-#define ACE_LACKS_SYSCALL
-#define ACE_LACKS_STRRECVFD
-
-// Compiler doesn't support static data member templates.
-#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Fixes a problem with HP/UX not wrapping the mmap(2) header files
-// with extern "C".
-#define ACE_HAS_BROKEN_MMAP_H
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Header files lack t_errno for ACE_TLI.
-#define ACE_LACKS_T_ERRNO
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// ???
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// HP/UX has an undefined syscall for GETRUSAGE...
-#define ACE_HAS_SYSCALL_GETRUSAGE
-
-// Note, this only works if the flag is set above!
-#define ACE_HAS_GETRUSAGE
-
-// Platform uses int for select() rather than fd_set.
-// Dave 4/2/96 took this out. It appears that HP -can- use fd_set for int
-// But time.h has a prototype defined so that int must be used ! so it goes
-// back in
-#define ACE_SELECT_USES_INT
-
-// Platform has prototypes for ACE_TLI.
-//#define ACE_HAS_TLI_PROTOTYPES
-// Platform has the XLI version of ACE_TLI.
-// #define ACE_HAS_XLI
-
-#define ACE_LACKS_ACE_IOSTREAM
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-hpux-9.x.h b/ace/config-hpux-9.x.h
deleted file mode 100644
index 7b919ed5948..00000000000
--- a/ace/config-hpux-9.x.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work
-// for HP platforms running HP/UX 9.x.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// Compiling for HPUX.
-#if !defined (HPUX)
-#define HPUX
-#endif /* HPUX */
-
-#if __cplusplus < 199707L
-#define ACE_HAS_BROKEN_HPUX_TEMPLATES
-#endif /* __cplusplus < 199707L */
-
-#define ACE_HAS_IP_MULTICAST
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-#define ACE_HAS_BROKEN_CONVERSIONS
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// They forgot a const in the prototype of const_timewait...
-#define ACE_LACKS_CONST_TIMESPEC_PTR
-
-#define ACE_LACKS_SYSCALL
-#define ACE_LACKS_STRRECVFD
-
-// Compiler doesn't support static data member templates.
-#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Fixes a problem with HP/UX not wrapping the mmap(2) header files
-// with extern "C".
-#define ACE_HAS_BROKEN_MMAP_H
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Header files lack t_errno for ACE_TLI.
-#define ACE_LACKS_T_ERRNO
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// ???
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// HP/UX has an undefined syscall for GETRUSAGE...
-#define ACE_HAS_SYSCALL_GETRUSAGE
-
-// Note, this only works if the flag is set above!
-#define ACE_HAS_GETRUSAGE
-
-// Platform uses int for select() rather than fd_set.
-#define ACE_SELECT_USES_INT
-
-// Platform has prototypes for ACE_TLI.
-//#define ACE_HAS_TLI_PROTOTYPES
-// Platform has the XLI version of ACE_TLI.
-// #define ACE_HAS_XLI
-
-#define ACE_LACKS_ACE_IOSTREAM
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-hpux11.h b/ace/config-hpux11.h
deleted file mode 100644
index b449d59a5b1..00000000000
--- a/ace/config-hpux11.h
+++ /dev/null
@@ -1,257 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for HP
-// platforms running HP/UX 11.x. It includes all of the ACE information
-// needed for HP-UX 11.x itself. The compiler-specific information is in
-// config-hpux-11.x-<compiler>.h - they include this file.
-
-#ifndef ACE_CONFIG_H
-#error "You need to use a compiler-specific .h file - they include this file"
-#endif
-
-// Compiling for HPUX.
-#if !defined (HPUX)
-#define HPUX
-#endif /* HPUX */
-#define HPUX_11
-
-#ifndef _HPUX_SOURCE
-#define _HPUX_SOURCE
-#include "ace/pre.h"
-#endif
-
-#include /**/ <sys/stdsyms.h>
-
-////////////////////////////////////////////////////////////////////////////
-//
-// General OS information - see README for more details on what they mean
-//
-///////////////////////////////////////////////////////////////////////////
-
-// HP/UX needs to have these addresses in a special range.
-// If this is on a 64-bit model, the default is to use 64-bit addressing.
-// It can also be set so that the mapped region is shareable with 32-bit
-// programs. To enable the 32/64 sharing, comment out the first definition
-// of ACE_DEFAULT_BASE_ADDR and uncomment the two lines after it.
-// Note - there's a compiler bug on aC++ A.03.04 in 64-bit mode which prevents
-// these from working as-is. So, there's some hackery in Naming_Context.cpp
-// and Memory_Pool.cpp which works around it. It requires the
-// ACE_DEFAULT_BASE_ADDRL definition below - make sure it has the same
-// value as what you use for ACE_DEFAULT_BASE_ADDR. This is allegedly fixed
-// in A.03.10 on the June Applications CD.
-#if defined (__LP64__)
-# define ACE_DEFAULT_BASE_ADDR ((char *) 0x0000001100000000)
-//# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-//# define ACE_OS_EXTRA_MMAP_FLAGS MAP_ADDR32
-
-# define ACE_DEFAULT_BASE_ADDRL (0x0000001100000000)
-//# define ACE_DEFAULT_BASE_ADDRL (0x80000000)
-#else
-# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-#endif /* __LP64__ */
-
-// Platform can do async I/O (aio_*)
-#define ACE_HAS_AIO_CALLS
-// ... but seems to require this in order to keep from hanging. Needs some
-// investigation, maybe with HP. John Mulhern determined this value
-// empirically. YMMV. If it does vary, set it up in your own config.h which
-// then includes the ACE-supplied config.
-#if !defined (ACE_INFINITE)
-# define ACE_INFINITE 10000000
-#endif
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-// But doesn't have a prototype for syscall()
-#define ACE_LACKS_SYSCALL
-
-// Platform supports POSIX 1.b clock_gettime ()
-#define ACE_HAS_CLOCK_GETTIME
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform has Dirent iterator functions.
-#define ACE_HAS_DIRENT
-
-// Platform supports getpagesize() call
-#define ACE_HAS_GETPAGESIZE
-// But we define this just to be safe
-#define ACE_PAGE_SIZE 4096
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Platform's select() has non-const timeval argument
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Platform supports the POSIX struct timespec type
-#define ACE_HAS_POSIX_TIME
-
-// Platform supports reentrant functions (all the POSIX *_r functions).
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-// HP-UX 11 has reentrant netdb functions. The catch is that the old
-// functions (gethostbyname, etc.) are thread-safe and the _r versions are
-// not used and will be removed at some point. So, define things so
-// the _r versions are not used. This will slow things down a bit due to
-// the extra mutex lock in the ACE_NETDBCALL_RETURN macro, and will be fixed
-// in the future (problem ID P64).
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-
-// Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals
-#define ACE_HAS_SIGINFO_T
-
-// Platform doesn't detect a signal out of range unless it's way out of range.
-#define ACE_HAS_SIGISMEMBER_BUG
-
-#define ACE_HAS_UALARM
-
-// Platform supports ucontext_t (which is used in the extended signal API).
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// SunOS 4 style prototype for gettimeofday
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// Platform supports SVR4 dynamic linking semantics, in 64-bit mode only.
-// When used, this requires -ldl on the ACE library link line.
-#ifdef __LP64__
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#endif
-
-// HP/UX has an undefined syscall for GETRUSAGE...
-#define ACE_HAS_SYSCALL_GETRUSAGE
-// Note, this only works if the flag is set above!
-#define ACE_HAS_GETRUSAGE
-
-// Platform has the sigwait function in a header file
-#define ACE_HAS_SIGWAIT
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// accept() is thread-safe
-#define ACE_HAS_THREAD_SAFE_ACCEPT
-
-// Platform has XPG4 wide character support
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-// Platform lacks a typedef for timespec_t, but has struct timespec
-#define ACE_LACKS_TIMESPEC_T
-
-// Platform needs a timer skew value. It *may* vary by processor, but this
-// one works. You can override it in your config.h file if needed.
-// It's in units of microseconds. This value is 10 msec.
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-// Shared library name/path components
-#define ACE_DLL_SUFFIX ".sl"
-#if defined (__LP64__)
-# define ACE_LD_SEARCH_PATH "LD_LIBRARY_PATH"
-#else
-# define ACE_LD_SEARCH_PATH "SHLIB_PATH"
-#endif /* __LP64__ */
-
-//////////////////////////////////////////////////////////////////////////
-//
-// STREAMS information
-//
-//////////////////////////////////////////////////////////////////////////
-
-// Platform supports STREAMS
-#define ACE_HAS_STREAMS
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-// But the putmsg signature doesn't have it as const...
-// Well, it really does, but it depends on preprocessor defines.
-#define ACE_LACKS_CONST_STRBUF_PTR
-
-// Platform supports STREAM pipes
-// This is possible, but not by default - need to rebuild the kernel to
-// get them enabled - see pipe(2) and "STREAMS/UX for the HP 9000"
-// #define ACE_HAS_STREAM_PIPES
-
-/////////////////////////////////////////////////////////////////////////
-//
-// TLI/XTI information
-//
-////////////////////////////////////////////////////////////////////////
-
-// Platform supports XTI (includes TLI), including SVR4 facilities.
-#define ACE_HAS_TLI
-// ACE_HAS_SVR4_TLI should work on HP-UX, but doesn't yet. Riverace
-// problem ID P27.
-//#define ACE_HAS_SVR4_TLI
-// Platform uses <xti.h>, not tiuser.h
-#define ACE_HAS_XTI
-// But it has _terrno() outside the extern "C" stuff.
-#define ACE_HAS_TIUSER_H_BROKEN_EXTERN_C
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-// HP-UX 11.00 (at least at initial releases) has some busted macro defs
-#define ACE_HAS_BROKEN_XTI_MACROS
-// HP-UX 11 conforms to the XPG4 spec, which ACE calls broken for the
-// errmsg not being const...
-#define ACE_HAS_BROKEN_T_ERROR
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Threads information.
-//
-// Use of threads is controlled by the 'threads' argument to make. See
-// include/makeinclude/platform_hpux_aCC.GNU for details. If it's not set,
-// the default is to enable it, since kernel threads are always available
-// on HP-UX 11, as opposed to 10.x where it was optional software.
-//
-////////////////////////////////////////////////////////////////////////
-
-#if defined (ACE_HAS_THREADS)
-# if (ACE_HAS_THREADS == 0)
-# undef ACE_HAS_THREADS
-# endif /* ACE_HAS_THREADS == 0 */
-#else
-# define ACE_HAS_THREADS
-#endif /* ACE_HAS_THREADS */
-
-#if defined (ACE_HAS_THREADS)
-
-# if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-# endif
-
-# define ACE_HAS_PTHREADS
-# define ACE_HAS_PTHREADS_STD
-# define ACE_HAS_PTHREADS_UNIX98_EXT
-
-# define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#endif /* ACE_HAS_THREADS */
-
-#define ACE_HAS_POSIX_SEM
-
-// Turns off the tracing feature.
-// To build with tracing enabled, make sure ACE_NTRACE is not defined
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#include "ace/post.h"
-#endif /* ACE_NTRACE */
diff --git a/ace/config-irix5.2.h b/ace/config-irix5.2.h
deleted file mode 100644
index 35098a8170c..00000000000
--- a/ace/config-irix5.2.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for the SGI
-// Indigo2EX running Irix 5.2 platform using the gcc v2.6.x compiler
-// and libg++ v2.6.x.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// Platform supports STREAM pipes (note that this is disabled by
-// default, see the manual page on pipe(2) to find out how to enable
-// it).
-//#define ACE_HAS_STREAM_PIPES
-
-// Platform supports getpagesize() call.
-#define ACE_HAS_GETPAGESIZE
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_SIGWAIT
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform requires void * for mmap().
-#define ACE_HAS_VOIDPTR_MMAP
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-#define ACE_SIZEOF_LONG_DOUBLE 8
-
-#define IRIX5
-#define ACE_HAS_ALLOCA
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-#define ACE_HAS_BSTRING
-#define ACE_HAS_GETRUSAGE
-#define ACE_HAS_POSIX_NONBLOCK
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_POLL
-#define ACE_HAS_PROC_FS
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-#define ACE_HAS_STREAMS
-#define ACE_HAS_SSIZE_T
-#define ACE_HAS_STRERROR
-#define ACE_HAS_STRBUF_T
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#define ACE_HAS_SVR4_SIGNAL_T
-#define ACE_HAS_SYS_SIGLIST
-#define ACE_HAS_SYS_FILIO_H
-#define ACE_HAS_SEMUN
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-irix5.3-g++.h b/ace/config-irix5.3-g++.h
deleted file mode 100644
index 554167e9ec3..00000000000
--- a/ace/config-irix5.3-g++.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for the SGI
-// Indigo2EX running Irix 5.3 platform using the GNU C++ Compiler
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
-// this must appear before its #include.
-#define ACE_HAS_STRING_CLASS
-
-#include "ace/config-g++-common.h"
-
-#define ACE_SIZEOF_LONG_DOUBLE 8
-
-#define ACE_LACKS_SYSTIME_H
-// Platform supports getpagesize() call.
-#define ACE_HAS_GETPAGESIZE
-#define IRIX5
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_DIRENT
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform requires void * for mmap().
-#define ACE_HAS_VOIDPTR_MMAP
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Compiler/platform supports alloca()
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-
-// IRIX5 needs to define bzero() in this odd file <bstring.h>
-#define ACE_HAS_BSTRING
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Denotes that GNU has cstring.h as standard
-// which redefines memchr()
-#define ACE_HAS_GNU_CSTRING_H
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// Platform supports the /proc file system.
-#define ACE_HAS_PROC_FS
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes (note that this is disabled by
-// default, see the manual page on pipe(2) to find out how to enable
-// it).
-// #define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_IRIX_53_SIGNALS
-
-// Compiler/platform supports sys_siglist array.
-// #define ACE_HAS_SYS_SIGLIST
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-irix5.3-sgic++.h b/ace/config-irix5.3-sgic++.h
deleted file mode 100644
index 269bab43bb6..00000000000
--- a/ace/config-irix5.3-sgic++.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work
-// for the SGI Indigo2EX running Irix 5.3 platform using
-// the SGI C++ Compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define IRIX5
-
-#include <sys/bsd_types.h>
-#define _BSD_TYPES
-
-#define ACE_SIZEOF_LONG_DOUBLE 8
-
-#define ACE_LACKS_SYSTIME_H
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Platform supports getpagesize() call.
-#define ACE_HAS_GETPAGESIZE
-
-#define ACE_LACKS_SYSTIME_H
-#define ACE_HAS_SIGWAIT
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform requires void * for mmap().
-#define ACE_HAS_VOIDPTR_MMAP
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Compiler/platform supports alloca()
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-
-// IRIX5 needs to define bzero() in this odd file <bstring.h>
-#define ACE_HAS_BSTRING
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// No multi-threading so use poll() call
-// - for easier debugging, if nothing else
-// #define ACE_USE_POLL
-
-// Platform supports the /proc file system.
-// #define ACE_HAS_PROC_FS
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-// #define ACE_HAS_UCONTEXT_T
-#define ACE_LACKS_UCONTEXT_H
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes (note that this is disabled by
-// default, see the manual page on pipe(2) to find out how to enable
-// it).
-// #define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_IRIX_53_SIGNALS
-
-// Compiler/platform supports sys_siglist array.
-// #define ACE_HAS_SYS_SIGLIST
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-irix6.x-common.h b/ace/config-irix6.x-common.h
deleted file mode 100644
index 36fb8442be1..00000000000
--- a/ace/config-irix6.x-common.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/* -*- C++ -*- */
-//
-// $Id$
-//
-// This file contains the common configuration options for both
-// SGI/MIPSPro C++ and g++ under IRIX 6.X
-//
-#ifndef ACE_CONFIG_IRIX6X_COMMON_H
-
-#if !(defined(ACE_CONFIG_H) || defined(ACE_CONFIG_IRIX6X_NTHR_H))
-#error "This file may only be included via config.h or config-irix6.x-nothreads.h"
-#endif
-
-#if (defined(ACE_CONFIG_H) && defined(ACE_CONFIG_IRIX6X_NTHR_H))
-#error "May only be included via config.h *OR* config-irix6.x-nothreads.h, not both!"
-#endif
-
-// The Irix 6.x float.h doesn't allow us to distinguish between a
-// double and a long double. So, we have to hard-code this. Thanks
-// to Bob Laferriere <laferrie@gsao.med.ge.com> for figuring it out.
-#if defined (_MIPS_SIM) /* 6.X System */
-# include <sgidefs.h>
-# if defined (_MIPS_SIM_NABI32) && (_MIPS_SIM == _MIPS_SIM_NABI32)
-# define ACE_SIZEOF_LONG_DOUBLE 16
-# elif defined (_MIPS_SIM_ABI32) && (_MIPS_SIM == _MIPS_SIM_ABI32)
-# define ACE_SIZEOF_LONG_DOUBLE 8
-# elif defined (_MIPS_SIM_ABI64) && (_MIPS_SIM == _MIPS_SIM_ABI64)
-# define ACE_SIZEOF_LONG_DOUBLE 16
-# elif !defined (ACE_SIZEOF_LONG_DOUBLE)
-# define ACE_SIZEOF_LONG_DOUBLE 8
-# endif
-#else
-# define ACE_SIZEOF_LONG_DOUBLE 8 /* 5.3 System */
-#endif
-
-// petern, Next part of it:
-
-// Platform supports getpagesize() call.
-#define ACE_HAS_GETPAGESIZE
-
-// Platform has no implementation of pthread_condattr_setpshared(),
-// even though it supports pthreads! (like Irix 6.2)
-#define ACE_LACKS_CONDATTR_PSHARED
-#define ACE_LACKS_MUTEXATTR_PSHARED
-
-// Platform/compiler has the sigwait(2) prototype
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SIGTIMEDWAIT
-#define ACE_HAS_SIGSUSPEND
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform requires void * for mmap().
-#define ACE_HAS_VOIDPTR_MMAP
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Compiler/platform supports alloca()
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-
-// Irix needs to define bzero() in this odd file <bstring.h>
-#define ACE_HAS_BSTRING
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// No multi-threading so use poll() call
-// - for easier debugging, if nothing else
-// #define ACE_USE_POLL
-
-// Platform supports the /proc file system.
-#define ACE_HAS_PROC_FS
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes (note that this is disabled by
-// default, see the manual page on pipe(2) to find out how to enable
-// it).
-// #define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-#define ACE_HAS_STRPTIME
-
-//**************************************************************
-// Not so sure how next lines should look like
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-#define ACE_LACKS_SYSTIME_H
-
-//**************************************************************
-
-// IRIX 6.4 and below do not support reentrant netdb functions
-// (getprotobyname_r, getprotobynumber_r, gethostbyaddr_r,
-// gethostbyname_r, getservbyname_r).
-#if ACE_IRIX_VERS <= 64 && !defined (ACE_HAS_NETDB_REENTRANT_FUNCTIONS)
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-#endif /* ACE_HAS_NETDB_REENTRANT_FUNCTIONS */
-
-#define ACE_HAS_DIRENT
-// Unless the thread enabled version is used the readdir_r interface
-// does not get defined in IRIX 6.2
-#define ACE_LACKS_READDIR_R
-#define ACE_LACKS_RWLOCK_T
-
-#define ACE_HAS_GPERF
-
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_BROKEN_DGRAM_SENDV
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
-#define ACE_PI_CONTROL_BLOCK_ALIGN_LONGS 2
-
-#endif /* ACE_CONFIG_IRIX6X_COMMON_H */
diff --git a/ace/config-irix6.x-g++.h b/ace/config-irix6.x-g++.h
deleted file mode 100644
index 1317197244e..00000000000
--- a/ace/config-irix6.x-g++.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for the SGI
-// Indigo2EX running Irix 6.2 platform using the GNU C++ Compiler
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
-// this must appear before its #include.
-#define ACE_HAS_STRING_CLASS
-
-#include "ace/config-g++-common.h"
-
-// Platform supports the very odd IRIX 6.2 threads...
-#define ACE_HAS_THREADS
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif /* !ACE_MT_SAFE */
-#define ACE_HAS_IRIX62_THREADS
-
-// IRIX 6.2 supports a variant of POSIX Pthreads, supposedly POSIX 1c
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_STD
-
-#include "ace/config-irix6.x-common.h"
-
-// Needed for the threading stuff?
-#include /**/ <sched.h>
-#include /**/ <task.h>
-
-#define PTHREAD_MIN_PRIORITY PX_PRIO_MIN
-#define PTHREAD_MAX_PRIORITY PX_PRIO_MAX
-
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-#define IRIX6
-
-// Denotes that GNU has cstring.h as standard
-// which redefines memchr()
-#define ACE_HAS_GNU_CSTRING_H
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_IRIX_53_SIGNALS
-
-// Compiler/platform supports sys_siglist array.
-//#define ACE_HAS_SYS_SIGLIST
-
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-irix6.x-kcc.h b/ace/config-irix6.x-kcc.h
deleted file mode 100644
index e14b2cd8f97..00000000000
--- a/ace/config-irix6.x-kcc.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for the SGI
-// Indigo2EX running Irix 6.5 platform using the KAI C++ compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#include "ace/config-kcc-common.h"
-
-
-// Platform supports the very odd IRIX 6.2 threads...
-#define ACE_HAS_THREADS
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif /* !ACE_MT_SAFE */
-#define ACE_HAS_IRIX62_THREADS
-
-// IRIX 6.2 supports a variant of POSIX Pthreads, supposedly POSIX 1c
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_STD
-
-#include "ace/config-irix6.x-common.h"
-
-// Needed for the threading stuff?
-#include /**/ <sched.h>
-#include /**/ <task.h>
-
-#define PTHREAD_MIN_PRIORITY PX_PRIO_MIN
-#define PTHREAD_MAX_PRIORITY PX_PRIO_MAX
-
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// The pthread_cond_timedwait call does not reset the timer.
-#define ACE_LACKS_COND_TIMEDWAIT_RESET 1
-
-#define ACE_HAS_STRING_CLASS
-#ifndef IRIX6
-# define IRIX6
-#endif
-
-// Denotes that GNU has cstring.h as standard
-// which redefines memchr()
-#define ACE_HAS_GNU_CSTRING_H
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_IRIX_53_SIGNALS
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Compiler/platform supports sys_siglist array.
-//#define ACE_HAS_SYS_SIGLIST
-
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-irix6.x-sgic++-nothreads.h b/ace/config-irix6.x-sgic++-nothreads.h
deleted file mode 100644
index 08f9fb59176..00000000000
--- a/ace/config-irix6.x-sgic++-nothreads.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This is the config file for IRIX 6.2, 6.4 and hopefully 6.3, using
-// the SGI C++ compiler (7.1 or higher).
-
-// For IRIX 6.2 there are several patches that should be applied to
-// get reliable operation with multi-threading and exceptions.
-// Specifically you should get a reasonable current IRIX, Compiler
-// and POSIX patch-sets.
-
-// For IRIX 6.[34] it's less critical, but it's still recommended
-// that you apply the applicable patch-sets (IRIX and Compiler I believe).
-
-// These patches are updated frequently, so you should ask your support
-// contact or search SGI's web site (http://www.sgi.com) for the latest
-// version.
-
-// Since this files gets included from config-irix6.x-sgic++.h we
-// cannot use ACE_CONFIG_H here.
-#ifndef ACE_CONFIG_IRIX6X_NTHR_H
-#define ACE_CONFIG_IRIX6X_NTHR_H
-#include "ace/pre.h"
-
-// Include this file to set the _MIPS_SIM*ABI* macros.
-#include /**/ <sgidefs.h>
-#include "ace/config-irix6.x-common.h"
-
-#define ACE_HAS_SGIDLADD
-#define ACE_HAS_P_READ_WRITE
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-#define ACE_HAS_SETOWN
-#define ACE_HAS_SYSENT_H
-#define ACE_HAS_SYSINFO
-#define ACE_HAS_UALARM
-
-// Platform has support for multi-byte character support compliant
-// with the XPG4 Worldwide Portability Interface wide-character
-// classification.
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-// We need to setup a very high address or Naming_Test won't run.
-#define ACE_DEFAULT_BASE_ADDR ((char *) (1024U * 1024 * 1024))
-
-#define ACE_LACKS_SIGNED_CHAR
-
-// Platform supports reentrant functions (i.e., all the POSIX *_r
-// functions).
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Platform has terminal ioctl flags like TCGETS and TCSETS.
-#define ACE_HAS_TERM_IOCTLS
-
-// Platform does not support reentrant password file accessor functiions.
-#define ACE_LACKS_PWD_REENTRANT_FUNCTIONS
-
-// uses ctime_r & asctime_r with only two parameters vs. three
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-
-// The following three should be enabled/disabled together.
-#if _COMPILER_VERSION >= 720
-#define ACE_HAS_TEMPLATE_SPECIALIZATION
-#define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
-#define ACE_HAS_USING_KEYWORD
-#else
-#define ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA
-#endif /* _COMPILER_VERSION >= 720 */
-#define ACE_TEMPLATES_REQUIRE_SOURCE
-#define ACE_NEEDS_FUNC_DEFINITIONS
-
-// Platform supports exceptions. Under 6.2 this requires an extra flag
-// for the compiler, don't worry is already there in
-// platform_irix6.x.GNU
-#define ACE_HAS_EXCEPTIONS
-
-// Platform supports STREAM pipes (note that this is disabled by
-// default, see the manual page on pipe(2) to find out how to enable
-// it).
-// #define ACE_HAS_STREAM_PIPES
-
-#if defined (_COMPILER_VERSION)
-# define ACE_CC_NAME "SGI/MIPSPro"
-# define ACE_CC_MAJOR_VERSION (_COMPILER_VERSION / 100)
-# define ACE_CC_MINOR_VERSION (_COMPILER_VERSION % 100)
-# define ACE_CC_BETA_VERSION (0)
-#endif /* _COMPILER_VERSION */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_IRIX6X_NTHR_H */
diff --git a/ace/config-irix6.x-sgic++.h b/ace/config-irix6.x-sgic++.h
deleted file mode 100644
index 4a80f49f6ba..00000000000
--- a/ace/config-irix6.x-sgic++.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Use this file for IRIX 6.[234] if you have the pthreads patches
-// installed.
-
-#ifndef ACE_CONFIG_IRIX6X_H
-#define ACE_CONFIG_IRIX6X_H
-#include "ace/pre.h"
-
-// Include basic (non-threaded) configuration
-#include "ace/config-irix6.x-sgic++-nothreads.h"
-
-// Add threading support
-
-#define ACE_HAS_IRIX62_THREADS
-#define ACE_HAS_UALARM
-
-// Needed for the threading stuff?
-#include /**/ <task.h>
-#define PTHREAD_MIN_PRIORITY PX_PRIO_MIN
-#define PTHREAD_MAX_PRIORITY PX_PRIO_MAX
-
-// ACE supports threads.
-#define ACE_HAS_THREADS
-
-// Platform has no implementation of pthread_condattr_setpshared(),
-// even though it supports pthreads! (like Irix 6.2)
-#define ACE_LACKS_CONDATTR_PSHARED
-#define ACE_LACKS_MUTEXATTR_PSHARED
-
-// IRIX 6.2 supports a variant of POSIX Pthreads, supposedly POSIX 1c
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_STD
-
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// The pthread_cond_timedwait call does not reset the timer.
-#define ACE_LACKS_COND_TIMEDWAIT_RESET 1
-
-// Scheduling functions are declared in <sched.h>
-#define ACE_NEEDS_SCHED_H
-
-// When threads are enabled READDIR_R is supported on IRIX.
-#undef ACE_LACKS_READDIR_R
-
-// Compile using multi-thread libraries
-#if !defined (ACE_MT_SAFE)
- #define ACE_MT_SAFE 1
-#endif /* ACE_MT_SAFE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_IRIX6X_H */
diff --git a/ace/config-kcc-common.h b/ace/config-kcc-common.h
deleted file mode 100644
index 3f0b9c6d00b..00000000000
--- a/ace/config-kcc-common.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This configuration file is designed to be included by another,
-// specific configuration file. It provides config information common
-// to all KAI C++ platforms (KCC version 3.3a).
-//
-// KAI C++ 3.2d for Linux had a known problem with being unable to call
-// static object constructors and destructors within shared libraries.
-//
-// KAI C++ 3.3a requires glibc 2. This configuration was tested with
-// egcs 1.0.2 and glibc-2.0.7-7. The KCC_BASE/bin/KCC script requires
-// the following settings for i386-linux to work:
-//
-//case i386-linux:
-// set common_na = "-Dlinux -Dunix -Di386"
-// set cpp_defines = "-D__CPLUSPLUS -D__inline__=inline -D__inline=inline -D__signed__=signed"
-// set c_defines = "-D__inline__= -D__inline= -D__signed__=signed"
-// set knr_c_defines = "-D__inline__= -D__inline= -D__signed__="
-// set ansi_c_defines = ""
-// breaksw
-//
-
-#ifndef ACE_KCC_COMMON_H
-#define ACE_KCC_COMMON_H
-#include "ace/pre.h"
-
-#if (defined (i386) || defined (__i386__)) && !defined (ACE_SIZEOF_LONG_DOUBLE)
-# define ACE_SIZEOF_LONG_DOUBLE 12
-#endif /* i386 */
-
-#if defined (i386) || defined (__i386__)
- // If running an Intel, assume that it's a Pentium so that
- // ACE_OS::gethrtime () can use the RDTSC instruction. If
- // running a 486 or lower, be sure to comment this out.
- // (If not running an Intel CPU, this #define will not be seen
- // because of the i386 protection, so it can be ignored.)
-# define ACE_HAS_PENTIUM
-#endif /* i386 */
-
-// ****** Need to move this somewhere else
-// #define TAO_YY_BREAK
-
-#define ACE_SIZEOF_LONG_LONG 8
-#define ACE_TEMPLATES_REQUIRE_SOURCE
-
-#define ACE_HAS_TEMPLATE_SPECIALIZATION
-#define ACE_HAS_STD_TEMPLATE_SPECIALIZATION
-#define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
-
-// Compiler doesn't support static data member templates.
-//#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
-
-#define ACE_HAS_USING_KEYWORD
-
-// Define this if you want to use the standard C++ library
-#define ACE_HAS_STANDARD_CPP_LIBRARY 1
-#define ACE_HAS_STRING_CLASS
-#define ACE_HAS_STDCPP_STL_INCLUDES 1
-#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
-#define ACE_LACKS_IOSTREAM_FX 1
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF 1
-#define ACE_LACKS_UNBUFFERED_STREAMBUF 1
-#define ACE_HAS_EXCEPTIONS 1
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_NEW_THROWS_EXCEPTIONS
-
-// __KCC_VERSION is not defined before 3.4.
-#if !defined (__KCC_VERSION)
-#define ACE_AUTO_PTR_LACKS_RESET
-#endif /* !__KCC_VERSION */
-
-//#define ACE_HAS_NONSTATIC_OBJECT_MANAGER 1
-
-#include "ace/post.h"
-#endif /* ACE_KCC_COMMON_H */
diff --git a/ace/config-linux-common.h b/ace/config-linux-common.h
deleted file mode 100644
index 9e731fc2535..00000000000
--- a/ace/config-linux-common.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This configuration file is designed to be included by another,
-// specific configuration file. It provides config information common
-// to all Linux platforms. It automatically determines the CPU
-// architecture, compiler (g++ or egcs), and libc (libc5 or glibc),
-// and configures based on those.
-
-#ifndef ACE_LINUX_COMMON_H
-#define ACE_LINUX_COMMON_H
-#include "ace/pre.h"
-
-#define ACE_HAS_BYTESEX_H
-
-#if ! defined (__ACE_INLINE__)
-#define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// Needed to make some prototypes visible.
-// #if ! defined (_GNU_SOURCE)
-// #define _GNU_SOURCE
-// #endif /* ! _GNU_SOURCE */
-
-// Needed to differentiate between libc 5 and libc 6 (aka glibc).
-// It's there on all libc 5 systems I checked.
-#include <features.h>
-
-
-// First the machine specific part
-
-#if defined (__alpha)
- // This is necessary on Alphas with glib 2.0.7-13.
-# define ACE_POLL_IS_BROKEN
-#elif defined (__powerpc__)
-# if !defined (ACE_DEFAULT_BASE_ADDR)
-# define ACE_DEFAULT_BASE_ADDR ((char *) 0x40000000)
-# endif /* ! ACE_DEFAULT_BASE_ADDR */
-#endif /* ! __alpha && ! __powerpc__ */
-
-// Then glibc/libc5 specific parts
-
-#if defined(__GLIBC__)
-# define ACE_HAS_BROKEN_SETRLIMIT
-# define ACE_HAS_RUSAGE_WHO_ENUM enum __rusage_who
-# define ACE_HAS_RLIMIT_RESOURCE_ENUM enum __rlimit_resource
-# define ACE_HAS_SOCKLEN_T
-# define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-
- // To avoid the strangeness with Linux's ::select (), which modifies
- // its timeout argument, use ::poll () instead.
-# define ACE_HAS_POLL
-
-// Don't define _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED in ACE to make
-// getpgid() prototype visible. ACE shouldn't depend on feature test
-// macros to make prototypes visible.
-# define ACE_LACKS_GETPGID_PROTOTYPE
-
-// NOTE: the following defines are necessary with glibc 2.0 (0.961212-5)
-// on Alpha. I assume that they're necessary on Intel as well,
-// but that may depend on the version of glibc that is used.
-//# define ACE_HAS_DLFCN_H_BROKEN_EXTERN_C
-# define ACE_HAS_VOIDPTR_SOCKOPT
-# define ACE_LACKS_SYSTIME_H
-
-// Don't define _POSIX_SOURCE in ACE to make strtok() prototype
-// visible. ACE shouldn't depend on feature test macros to make
-// prototypes visible.
-# define ACE_LACKS_STRTOK_R_PROTOTYPE
-// NOTE: end of glibc 2.0 (0.961212-5)-specific configuration.
-
-# if __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1
- // These were suggested by Robert Hanzlik <robi@codalan.cz> to get
- // ACE to compile on Linux using glibc 2.1 and libg++/gcc 2.8.
-# undef ACE_HAS_BYTESEX_H
-# define ACE_HAS_SIGINFO_T
-# define ACE_LACKS_SIGINFO_H
-# define ACE_HAS_UCONTEXT_T
-
- // Pre-glibc (RedHat 5.2) doesn't have sigtimedwait.
-# define ACE_HAS_SIGTIMEDWAIT
-# endif /* __GLIBC__ 2.1+ */
-#else /* ! __GLIBC__ */
- // Fixes a problem with some non-glibc versions of Linux...
-# define ACE_LACKS_MADVISE
-# define ACE_LACKS_MSG_ACCRIGHTS
-#endif /* ! __GLIBC__ */
-
-// Don't define _LARGEFILE64_SOURCE in ACE to make llseek() or
-// lseek64() prototype visible. ACE shouldn't depend on feature test
-// macros to make prototypes visible.
-#if __GLIBC__ > 1
-# if __GLIBC_MINOR__ == 0
-# define ACE_HAS_LLSEEK
-# define ACE_LACKS_LLSEEK_PROTOTYPE
-# else /* __GLIBC_MINOR__ > 0 */
-# define ACE_HAS_LSEEK64
-# define ACE_LACKS_LSEEK64_PROTOTYPE
-# endif
-#endif /* __GLIBC__ > 1 */
-
-#if __GLIBC__ > 1 && __GLIBC_MINOR__ >= 1
-# define ACE_HAS_P_READ_WRITE
-# define ACE_LACKS_PREAD_PROTOTYPE
-// Use ACE's alternate cuserid() implementation since the use of the
-// system cuserid() is discouraged.
-# define ACE_HAS_ALT_CUSERID
-#endif /* __GLIBC__ > 1 && __GLIBC_MINOR__ >= 0 */
-
-
-// Then the compiler specific parts
-
-#if defined (__GNUG__)
- // config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
- // this must appear before its #include.
-# define ACE_HAS_STRING_CLASS
-# include "ace/config-g++-common.h"
-#elif defined (__KCC)
-# define ACE_HAS_STRING_CLASS
-# include "ace/config-kcc-common.h"
-#elif defined (__DECCXX)
-# define ACE_CONFIG_INCLUDE_CXX_COMMON
-# include "ace/config-cxx-common.h"
-#else /* ! __GNUG__ && ! __KCC && !__DECCXX */
-# error unsupported compiler in ace/config-linux-common.h
-#endif /* ! __GNUG__ && ! __KCC */
-
-// Completely common part :-)
-
-// Platform/compiler has the sigwait(2) prototype
-# define ACE_HAS_SIGWAIT
-
-# define ACE_HAS_SIGSUSPEND
-
-#if !defined (ACE_DEFAULT_BASE_ADDR)
-# define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-#endif /* ! ACE_DEFAULT_BASE_ADDR */
-
-// Compiler/platform supports alloca().
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-#define ACE_HAS_GETRUSAGE_PROTO
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// ONLY define this if you have config'd multicast into a 2.0.34 or
-// prior kernel. It is enabled by default in 2.0.35 kernels.
-#if !defined (ACE_HAS_IP_MULTICAST)
-# define ACE_HAS_IP_MULTICAST
-#endif /* ! ACE_HAS_IP_MULTICAST */
-
-#define ACE_HAS_BIG_FD_SET
-
-// Linux defines struct msghdr in /usr/include/socket.h
-#define ACE_HAS_MSG
-
-// Linux "improved" the interface to select() so that it modifies
-// the struct timeval to reflect the amount of time not slept
-// (see NOTES in Linux's select(2) man page).
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-
-#define ACE_HAS_TERM_IOCTLS
-
-#define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65535
-
-#if !defined (ACE_DEFAULT_SELECT_REACTOR_SIZE)
-#define ACE_DEFAULT_SELECT_REACTOR_SIZE 256
-#endif /* ACE_DEFAULT_SELECT_REACTOR_SIZE */
-
-#define ACE_HAS_GETPAGESIZE 1
-
-// Platform lacks POSIX prototypes for certain System V functions
-// like shared memory and message queues.
-#define ACE_LACKS_SOME_POSIX_PROTOTYPES
-
-// Platform defines struct timespec but not timespec_t
-#define ACE_LACKS_TIMESPEC_T
-
-#define ACE_LACKS_STRRECVFD
-
-//#define ACE_LACKS_MSYNC
-
-// A conflict appears when including both <ucontext.h> and
-// <sys/procfs.h> with recent glibc headers.
-//#define ACE_HAS_PROC_FS
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-#define ACE_HAS_STRPTIME
-// Don't define _XOPEN_SOURCE in ACE to make strptime() prototype
-// visible. ACE shouldn't depend on feature test macros to make
-// prototypes visible.
-#define ACE_LACKS_STRPTIME_PROTOTYPE
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-#define ACE_HAS_POSIX_TIME
-
-#define ACE_HAS_GPERF
-
-#define ACE_HAS_DIRENT
-
-# define ACE_UINT64_FORMAT_SPECIFIER "%Lu"
-
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_LINUX_COMMON_H */
diff --git a/ace/config-linux-lxpthreads.h b/ace/config-linux-lxpthreads.h
deleted file mode 100644
index e76bb53315d..00000000000
--- a/ace/config-linux-lxpthreads.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-/* The following configuration file is designed to work for Linux
- platforms using GNU C++ and Xavier Leroy's pthreads package. For
- more information you should check out his Web site:
-
- http://pauillac.inria.fr/~xleroy/linuxthreads/
-
- The version I have installed and working is an RPM*
- based on Xavier's 0.5 release. I don't know where
- the tarball of 0.5 can be found, but I suspect that
- Xavier's site has it...
-
- * RPM == Redhat Package Management
-
- My system is a Caldera-based distribution with many upgraded
- packages. If you don't use RPM, there is a program (rpm2cpio)
- which will extract the files for "normal consumption".
-
- You may also want to check out the "ACE On Linux" pages at:
-
- http://users.deltanet.com/users/slg/ACE/
-
- (They were a little out of date when I last was there
- however.) */
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#include "ace/config-linux-common.h"
-
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Yes, we do have threads.
-#define ACE_HAS_THREADS
-// And they're even POSIX pthreads (MIT implementation)
-#define ACE_HAS_PTHREADS
-// ... and the final standard even!
-#define ACE_HAS_PTHREADS_STD
-
-#if !defined (ACE_MT_SAFE)
- #define ACE_MT_SAFE 1 // JCEJ 12/22/96 #1
-#endif
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE // jcej 12/22/96 #2
-#define PTHREAD_MIN_PRIORITY 0 // JCEJ 12/22/96 #3
-#if !defined(ACE_LACKS_PTHREAD_SIGMASK)
-# define PTHREAD_MAX_PRIORITY 99 // CJC 02/11/97
-#else
-# define PTHREAD_MAX_PRIORITY 32 // JCEJ 12/22/96 #3
-#endif
-
-#define ACE_LACKS_THREAD_STACK_ADDR // JCEJ 12/17/96
-#define ACE_LACKS_THREAD_STACK_SIZE // JCEJ 12/17/96
-
-#define ACE_LACKS_RWLOCK_T // JCEJ 12/23/96 #1
-#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS // JCEJ 1/7-8/96
-
-#if defined(__GLIBC__)
-// Platform supports reentrant functions (i.e., all the POSIX *_r
-// functions).
-#define ACE_HAS_REENTRANT_FUNCTIONS
-// getprotobyname_r have a different signature!
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-// uses ctime_r & asctime_r with only two parameters vs. three
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-#endif
-
-#include /**/ <pthread.h>
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-linux-pthread.h b/ace/config-linux-pthread.h
deleted file mode 100644
index 1371714910f..00000000000
--- a/ace/config-linux-pthread.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for Linux
-// platforms using GNU C++ and the MIT threads package.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#include "ace/config-linux-common.h"
-
-#define ACE_HAS_THREADS
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-// And they're even POSIX pthreads (MIT implementation)
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_STD
-#define ACE_LACKS_RWLOCK_T
-// If ACE doesn't compile due to the lack of these methods, please
-// send email to schmidt@cs.wustl.edu reporting this.
-// #define ACE_LACKS_CONDATTR_PSHARED
-// #define ACE_LACKS_MUTEXATTR_PSHARED
-
-// To use pthreads on Linux you'll need to use the MIT version, for
-// now...
-#define _MIT_POSIX_THREADS 1
-#include /**/ <pthread/mit/pthread.h>
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-linux.h b/ace/config-linux.h
deleted file mode 100644
index 2f8b40a0ceb..00000000000
--- a/ace/config-linux.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for Linux
-// platforms using GNU C++.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#include "ace/config-linux-common.h"
-
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-lynxos.h b/ace/config-lynxos.h
deleted file mode 100644
index 53354f97cf3..00000000000
--- a/ace/config-lynxos.h
+++ /dev/null
@@ -1,174 +0,0 @@
-// $Id$
-
-// The following configuration file is designed to work for LynxOS,
-// version 2.5.0 and later, using the GNU g++ compiler.
-
-// Note on why ACE_HAS_POSIX_SEM is not #defined:
-// ACE_HAS_POSIX_SEM would cause native LynxOS mutexes and condition
-// variables to be used. But, they don't appear to be intended to be
-// used between processes. Without ACE_HAS_POSIX_SEM, ACE uses
-// semaphores for all synchronization. Those can be used between
-// processes
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#if defined (__GNUG__)
-# if __GNUC_MINOR__ == 7
-
-# include "ace/config-g++-common.h"
-
- // The g++ that's distributed with LynxOS 3.0.0 needs this.
- // It won't hurt with 2.5.0.
-# undef ACE_HAS_TEMPLATE_SPECIALIZATION
-# elif __LYNXOS_SDK_VERSION <= 199603L
- // config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
- // this must appear before its #include.
-
- // If ACE_HAS_STRING_CLASS is used with LynxOS 3.0.0, some
- // executables, such as IOStream_Test, require linking with
- // libg++.
-# define ACE_HAS_STRING_CLASS
-
-# include "ace/config-g++-common.h"
-# endif /* __GNUC_MINOR__ == 7 */
-#endif /* __GNUG__ */
-
-#if defined (__x86__)
- // PowerPC libraries don't seem to have alloca (), so only use with x86.
-# define ACE_HAS_ALLOCA
-# define ACE_HAS_ALLOCA_H
-# define ACE_HAS_PENTIUM
-#elif defined (__powerpc__)
- // It looks like the default stack size is 15000.
- // ACE's Recursive_Mutex_Test needs more.
-# define ACE_NEEDS_HUGE_THREAD_STACKSIZE 32000
- // This doesn't work on LynxOS 3.0.0, because it resets the TimeBaseRegister.
- // # define ACE_HAS_POWERPC_TIMER
-#endif /* __x86__ || __powerpc__ */
-
-#define ACE_DEFAULT_BASE_ADDR ((char *) 0)
-#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-#define ACE_HAS_BROKEN_READV
-#define ACE_HAS_BROKEN_SETRLIMIT
-#define ACE_HAS_BROKEN_WRITEV
-#define ACE_HAS_CLOCK_GETTIME
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_DIRENT
-#define ACE_HAS_GETRUSAGE
-#define ACE_HAS_GNU_CSTRING_H
-#define ACE_HAS_GPERF
-#define ACE_HAS_IP_MULTICAST
-#define ACE_HAS_LYNXOS_SIGNALS
-#define ACE_HAS_MSG
-#define ACE_HAS_NONCONST_GETBY
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_POLL
-#define ACE_HAS_POSIX_NONBLOCK
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
-#define ACE_HAS_SEMUN
-#define ACE_HAS_SHM_OPEN
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_SOCKIO_H
-#define ACE_HAS_SSIZE_T
-#define ACE_HAS_STDARG_THR_DEST
-#define ACE_HAS_STRBUF_T
-#define ACE_HAS_STREAMS
-#define ACE_HAS_STRERROR
-#define ACE_HAS_SYSV_IPC
-#define ACE_HAS_SYS_SIGLIST
-#define ACE_HAS_TIMEZONE_GETTIMEOFDAY
-#define ACE_LACKS_CONST_TIMESPEC_PTR
-#define ACE_LACKS_GETHOSTENT
-#define ACE_LACKS_GETOPT_PROTO
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_MKTEMP
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_SIGINFO_H
-#define ACE_LACKS_SI_ADDR
-#define ACE_LACKS_SOME_POSIX_PROTOTYPES
-#define ACE_LACKS_STRCASECMP
-#define ACE_LACKS_TIMESPEC_T
-#define ACE_LACKS_UCONTEXT_H
-#define ACE_MALLOC_ALIGN 8
-#define ACE_HAS_TYPENAME_KEYWORD
-// Don't use MAP_FIXED, at least for now.
-#define ACE_MAP_FIXED 0
-// LynxOS, through 3.0.0, does not support MAP_PRIVATE, so map it to
-// MAP_SHARED.
-#define ACE_MAP_PRIVATE ACE_MAP_SHARED
-#define ACE_PAGE_SIZE 4096
-#define ACE_POLL_IS_BROKEN
-
-// Compile using multi-thread libraries.
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-# define _REENTRANT
-#endif
-
-#if ACE_MT_SAFE == 1
- // Platform supports threads.
-# define ACE_HAS_PTHREADS
-# define ACE_HAS_PTHREADS_DRAFT4
-# define ACE_HAS_THREADS
-# define ACE_HAS_THREAD_SPECIFIC_STORAGE
- // Without TSS emulation, you'll only have 3 native TSS keys, on
- // LynxOS 3.0.0/ppc.
-# define ACE_HAS_TSS_EMULATION
-# define ACE_LACKS_NULL_PTHREAD_STATUS
-# define ACE_LACKS_SETDETACH
-# define ACE_LACKS_THREAD_PROCESS_SCOPING
-# define ACE_LACKS_THREAD_STACK_ADDR
- // This gets around Lynx broken macro calls resulting in "::0"
-# define _POSIX_THREADS_CALLS
-#endif /* ACE_MT_SAFE */
-
-#define ACE_HAS_AIO_CALLS
-#define ACE_POSIX_AIOCB_PROACTOR
-// AIOCB Proactor works on Lynx. But it is not
-// multi-threaded.
-// Lynx OS 3.0.0 lacks POSIX call <pthread_sigmask>. So,we cannot use
-// SIG Proactor also, with multiple threads. So, let us use the AIOCB
-// Proactor. Once <pthreadd_sigmask> is available on Lynx, we can turn
-// on SIG Proactor for this platform.
-// #define ACE_POSIX_SIG_PROACTOR
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// By default, don't include RCS Id strings in object code.
-#if !defined (ACE_USE_RCSID)
-# define ACE_USE_RCSID 0
-#endif /* ! ACE_USE_RCSID */
-
-// System include files are not in sys/, this gets rid of warning.
-#define __NO_INCLUDE_WARN__
-
-extern "C"
-{
- int getopt (int, char *const *, const char *);
- int putenv (const char *);
-}
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-m88k.h b/ace/config-m88k.h
deleted file mode 100644
index 19f5f30886c..00000000000
--- a/ace/config-m88k.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for Motorola
-// 88k SVR4 platforms using pthreads from Florida State (ACE_HAS_FSU_PTHREADS).
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
- // This config file has not been tested with ACE_HAS_TEMPLATE_SPECIALIZATION.
- // Maybe it will work?
-# undef ACE_HAS_TEMPLATE_SPECIALIZATION
-#endif /* __GNUG__ */
-
-#if !defined (m88k)
-#define m88k
-#endif
-
-extern "C" void pthread_init();
-
-#define PTHREAD_STACK_MIN 1024
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#if !defined (IP_ADD_MEMBERSHIP)
-#define IP_ADD_MEMBERSHIP 0x13
-#endif /* m88k */
-
-#if !defined (IP_DROP_MEMBERSHIP)
-#define IP_DROP_MEMBERSHIP 0x14
-#endif /* m88k */
-
-struct sched_param
-{
- int sched_priority;
- int prio;
-};
-
-// This seems to be necessary for m88k.
-struct ip_mreq
-{
- struct in_addr imr_multiaddr; // IP multicast address of the group
- struct in_addr imr_interface; // local IP address of the interface
-};
-
-#if !defined (ACE_HAS_FSU_PTHREADS)
-# define ACE_HAS_FSU_PTHREADS
-#endif
-#if !defined (ACE_HAS_PTHREADS_DRAFT6)
-# define ACE_HAS_PTHREADS_DRAFT6
-#endif
-
-// Added for compilation on the m88k
-#if defined (m88k)
-# define ACE_LACKS_T_ERRNO
-# define ACE_LACKS_MADVISE
-# define ACE_HAS_GNU_CSTRING_H
-#endif /* m88k */
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Sun has the wrong prototype for sendmsg.
-#define ACE_HAS_BROKEN_SENDMSG
-
-// The SunOS 5.x version of rand_r is inconsistent with the header files...
-#define ACE_HAS_BROKEN_RANDR
-
-// Platform supports system configuration information.
-#define ACE_HAS_SYSINFO
-
-// Platform supports the POSIX regular expression library.
-#define ACE_HAS_REGEX
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-#if !defined (ACE_HAS_FSU_PTHREADS)
-// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
-#define ACE_HAS_REENTRANT_FUNCTIONS
-#endif /* ACE_HAS_FSU_PTHREADS */
-
-// Platform has terminal ioctl flags like TCGETS and TCSETS.
-#define ACE_HAS_TERM_IOCTLS
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-#if !defined (m88k)
-// Compiler/platform supports SunOS high resolution timers.
-# define ACE_HAS_HI_RES_TIMER
-#endif /* m88k */
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Compiler/platform supports alloca()
-#define ACE_HAS_ALLOCA
-
-#if !defined (m88k)
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-#endif /* m88k */
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// Platform supports the /proc file system.
-#define ACE_HAS_PROC_FS
-
-#if !defined (m88k)
-// Platform supports the prusage_t struct.
-#define ACE_HAS_PRUSAGE_T
-#endif /* m88k */
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes.
-#define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform supports SVR4 gettimeofday() prototype.
-#define ACE_HAS_SVR4_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_SVR4_SIGNAL_T
-
-// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
-#define ACE_HAS_SVR4_TLI
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-#if !defined (m88k)
-// Compiler/platform supports sys_siglist array.
-#define ACE_HAS_SYS_SIGLIST
-#endif /* m88k */
-
-/* Turn off the following five defines if you want to disable threading. */
-// Compile using multi-thread libraries.
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-#define ACE_HAS_PTHREADS
-#define ACE_LACKS_RWLOCK_T
-
-// Platform supports threads.
-#define ACE_HAS_THREADS
-
-#if defined (ACE_HAS_FSU_PTHREADS)
-#define ACE_LACKS_THREAD_STACK_ADDR
-#endif /* ACE_HAS_FSU_PTHREADS */
-
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// Reactor detects deadlock
-// #define ACE_REACTOR_HAS_DEADLOCK_DETECTION
-
-// Platform supports ACE_TLI timod STREAMS module.
-#define ACE_HAS_TIMOD_H
-
-// Platform supports ACE_TLI tiuser header.
-#define ACE_HAS_TIUSER_H
-
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-
-// Platform supports ACE_TLI.
-#define ACE_HAS_TLI
-
-// Use the poll() event demultiplexor rather than select().
-//#define ACE_USE_POLL
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-minimal.h b/ace/config-minimal.h
deleted file mode 100644
index 11d66eb7b01..00000000000
--- a/ace/config-minimal.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This configuration file is designed to build only the minimal
-// ACE_OS adaptation layer.
-
-#ifndef ACE_CONFIG_MINIMAL_H
-#define ACE_CONFIG_MINIMAL_H
-#include "ace/pre.h"
-
-#define ACE_HAS_MINIMAL_ACE_OS
-
-// Only instantiate the ACE_OS_Object_Manager.
-#define ACE_MAIN_OBJECT_MANAGER \
- ACE_OS_Object_Manager ace_os_object_manager;
-
-#if !defined(ACE_USE_THREAD_MANAGER_ADAPTER)
- // To prevent use of ACE_Thread_Exit functions in
- // ACE_Thread_Adapter::invoke ().
-# define ACE_USE_THREAD_MANAGER_ADAPTER
-#endif /* ! ACE_USE_THREAD_MANAGER_ADAPTER */
-
-#if defined (ACE_ASSERT)
-# undef ACE_ASSERT
-#endif /* ACE_ASSERT */
-#define ACE_ASSERT(x)
-
-#if defined (ACE_DEBUG)
-# undef ACE_DEBUG
-#endif /* ACE_DEBUG */
-#define ACE_DEBUG(x)
-
-#if defined (ACE_ERROR)
-# undef ACE_ERROR
-#endif /* ACE_ERROR */
-#define ACE_ERROR(x)
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_MINIMAL_H */
diff --git a/ace/config-mit-pthread.h b/ace/config-mit-pthread.h
deleted file mode 100644
index 03eda51c41b..00000000000
--- a/ace/config-mit-pthread.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// $Id$
-
-#ifndef ACE_CONFIG_MIT_PTHREAD_H
-#define ACE_CONFIG_MIT_PTHREAD_H
-#include "ace/pre.h"
-
-// Platform uses int for select() rather than fd_set.
-#if !defined(ACE_HAS_SELECT_H)
-#define ACE_HAS_SELECT_H
-#endif
-
-// Threads
-#define ACE_HAS_THREADS
-#if !defined (ACE_MT_SAFE)
- #define ACE_MT_SAFE 1
-#endif
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_STD
-#define ACE_LACKS_PTHREAD_CANCEL
-#define ACE_HAS_PTHREAD_SIGMASK
-#define ACE_HAS_SIGWAIT
-//#define ACE_HAS_PTHREAD_YIELD_VOID_PTR
-//#define ACE_HAS_PTHREAD_ATTR_INIT
-//#define ACE_HAS_PTHREAD_ATTR_DESTROY
-#define ACE_LACKS_THREAD_PROCESS_SCOPING
-//#define ACE_LACKS_THREAD_STACK_ADDR
-// If ACE doesn't compile due to the lack of these methods, please
-// send email to schmidt@cs.wustl.edu reporting this.
-// #define ACE_LACKS_CONDATTR_PSHARED
-// #define ACE_LACKS_MUTEXATTR_PSHARED
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_SETSCHED
-
-#include <pthread.h>
-#if defined(_M_UNIX)
-#include <sys/regset.h>
-#endif
-
-#define ACE_LACKS_TIMEDWAIT_PROTOTYPES
-#define ACE_HAS_RECV_TIMEDWAIT
-#define ACE_HAS_RECVFROM_TIMEDWAIT
-#define ACE_HAS_RECVMSG_TIMEDWAIT
-#define ACE_HAS_SEND_TIMEDWAIT
-#define ACE_HAS_SENDTO_TIMEDWAIT
-#define ACE_HAS_SENDMSG_TIMEDWAIT
-#define ACE_HAS_READ_TIMEDWAIT
-#define ACE_HAS_READV_TIMEDWAIT
-#define ACE_HAS_WRITE_TIMEDWAIT
-#define ACE_HAS_WRITEV_TIMEDWAIT
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_MIT_PTHREAD_H */
diff --git a/ace/config-mklinux.h b/ace/config-mklinux.h
deleted file mode 100644
index 31957b70be0..00000000000
--- a/ace/config-mklinux.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for MkLinux
-// platforms using GNU C++.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#include "ace/config-linux-common.h"
-
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-#undef ACE_HAS_SOCKLEN_T
-#define ACE_HAS_SIZET_SOCKET_LEN
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-mvs.h b/ace/config-mvs.h
deleted file mode 100644
index 721e4005651..00000000000
--- a/ace/config-mvs.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// Config file for MVS with OpenEdition
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// The following #defines are hacks to get around things
-// that seem to be missing or different in MVS land
-#define MAXPATHLEN 1024 /* sys/param.h not on MVS */
-#define NSIG 44 /* missing from Signal.h */
-#define MAXHOSTNAMELEN 256 /* missing form netdb.h */
-#define howmany __howmany /* MVS uses different names than most others */
-#define fd_mask __fd_mask
-#define MAXNAMLEN __DIR_NAME_MAX
-#define ERRMAX __sys_nerr
-#if defined (log) /* log is a macro in math.h */
-# undef log /* conflicts with log function in ACE */
-#endif /* log */
-
-#define ACE_MVS
-
-// Preprocesor requires an extra argument
-#define ACE_CC_PREPROCESSOR_ARGS "-+ -E"
-
-// See the README file in this directory
-// for a description of the following ACE_ macros
-
-#if __COMPILER_VER__ >= 0x21020000 /* OS/390 r2 or higher */
-# define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-# define ACE_HAS_UCONTEXT_T
-#else
-# define ACE_LACKS_UCONTEXT_H
-#endif /* __COMPILER_VER__ >= 0x21020000 */
-
-#define ACE_HAS_BROKEN_CTIME
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_DIRENT
-#define ACE_HAS_EXCEPTIONS
-#define ACE_HAS_GETPAGESIZE
-#define ACE_HAS_GETRUSAGE
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_LIMITED_RUSAGE_T
-#define ACE_HAS_MSG
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_NONSCALAR_THREAD_KEY_T
-#define ACE_HAS_POLL
-#define ACE_HAS_POSIX_NONBLOCK
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_DRAFT6
-#define ACE_HAS_PTHREAD_CONDATTR_SETKIND_NP
-#define ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_SIG_C_FUNC
-#define ACE_HAS_SIN_LEN
-#define ACE_HAS_SIZET_SOCKET_LEN
-#define ACE_HAS_SSIZE_T
-#define ACE_HAS_STRERROR
-#define ACE_HAS_STRINGS
-#define ACE_HAS_SYSV_IPC
-#define ACE_HAS_TEMPLATE_SPECIALIZATION
-#define ACE_HAS_THREADS
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_HAS_THR_C_DEST
-#define ACE_HAS_THR_C_FUNC
-#define ACE_HAS_TIMEZONE_GETTIMEOFDAY
-#define ACE_HAS_UALARM
-#define ACE_HAS_UTIME
-#define ACE_HAS_VOIDPTR_MMAP
-#define ACE_HAS_VOIDPTR_SOCKOPT
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-#define ACE_LACKS_CONDATTR_PSHARED
-#define ACE_LACKS_MUTEXATTR_PSHARED
-#define ACE_LACKS_IOSTREAM_FX
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-#define ACE_LACKS_LONGLONG_T
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_MALLOC_H
-#define ACE_LACKS_MSGBUF_T
-#define ACE_LACKS_PARAM_H
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-#define ACE_LACKS_READDIR_R
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_SETSCHED
-#define ACE_LACKS_SIGINFO_H
-#define ACE_LACKS_STRRECVFD
-#define ACE_LACKS_SYSTIME_H
-#define ACE_LACKS_SYS_NERR
-#define ACE_LACKS_TCP_H
-#define ACE_LACKS_THREAD_PROCESS_SCOPING
-#define ACE_LACKS_THREAD_STACK_ADDR
-#define ACE_LACKS_TIMESPEC_T
-
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_SIZEOF_FLOAT 4
-#define ACE_SIZEOF_DOUBLE 8
-#define ACE_SIZEOF_LONG_DOUBLE 16
-
-#define ACE_TEMPLATES_REQUIRE_SOURCE
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-netbsd.h b/ace/config-netbsd.h
deleted file mode 100644
index 386ef450277..00000000000
--- a/ace/config-netbsd.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ***** This configuration file is still under testing. *****
-
-// The following configuration file is designed to work for NetBSD
-// platforms using GNU g++.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if ! defined (__ACE_INLINE__)
-#define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// ********************************************************
-// uncomment next line if you are using FreeBSD 2.1.x[R]
-// #define FreeBSD_2_1
-// ********************************************************
-#define ACE_NETBSD
-
-#define ACE_SIZEOF_LONG_DOUBLE 12
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#endif /* __GNUG__ */
-
-// #define ACE_HAS_BROKEN_NETBSD_MSYNC
-
-// Platform specific directives
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-#define ACE_LACKS_RWLOCK_T
-#define ACE_HAS_SIG_MACROS
-#define ACE_HAS_CHARPTR_DL
-#define ACE_USES_ASM_SYMBOL_IN_DLSYM
-
-// NetBSD appears to have dirent support.
-#define ACE_HAS_DIRENT
-
-// NetBSD appears to have a sigset_t type.
-// #define ACE_LACKS_SIGSET
-
-// This is for 2.1.x only. By default, gcc defines __FreeBSD__ automatically
-#if defined(FreeBSD_2_1)
-
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// This is to fix the nested struct if_data definition on FreeBSD 2.1.x
-#include <sys/types.h>
-#include <sys/time.h>
-struct if_data {
-/* generic interface information */
- u_char ifi_type; /* ethernet, tokenring, etc */
- u_char ifi_physical; /* e.g., AUI, Thinnet, 10base-T, etc */
- u_char ifi_addrlen; /* media address length */
- u_char ifi_hdrlen; /* media header length */
- u_long ifi_mtu; /* maximum transmission unit */
- u_long ifi_metric; /* routing metric (external only) */
- u_long ifi_baudrate; /* linespeed */
-/* volatile statistics */
- u_long ifi_ipackets; /* packets received on interface */
- u_long ifi_ierrors; /* input errors on interface */
- u_long ifi_opackets; /* packets sent on interface */
- u_long ifi_oerrors; /* output errors on interface */
- u_long ifi_collisions; /* collisions on csma interfaces */
- u_long ifi_ibytes; /* total number of octets received */
- u_long ifi_obytes; /* total number of octets sent */
- u_long ifi_imcasts; /* packets received via multicast */
- u_long ifi_omcasts; /* packets sent via multicast */
- u_long ifi_iqdrops; /* dropped on input, this interface */
- u_long ifi_noproto; /* destined for unsupported protocol */
- struct timeval ifi_lastchange;/* time of last administrative ch
-ange */
-} ;
-
-// this is a hack, but since this only occured in FreeBSD 2.1.x,
-// I guess it is ok.
-#define ACE_HAS_BROKEN_TIMESPEC_MEMBERS
-
-#endif /* defined FreeBSD_2_1 */
-
-// Platform supports POSIX timers via struct timespec.
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_UALARM
-
-// Platform defines struct timespec but not timespec_t
-#define ACE_LACKS_TIMESPEC_T
-
-#define ACE_LACKS_SYSTIME_H
-
-#define ACE_LACKS_STRRECVFD
-
-#define ACE_HAS_SIN_LEN
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-#if !defined(FreeBSD_2_1)
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#endif /* defined FreeBSD_2_1 */
-
-// Compiler/platform supports SVR4 signal typedef
-#define ACE_HAS_SVR4_SIGNAL_T
-
-// Compiler/platform supports alloca().
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform supports SVR4 dynamic linking semantics..
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Explicit dynamic linking permits "lazy" symbol resolution
-#define ACE_HAS_RTLD_LAZY_V
-
-// platform supports POSIX O_NONBLOCK semantics
-#define ACE_HAS_POSIX_NONBLOCK
-
-// platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Compiler/platform has <alloca.h>
-//#define ACE_HAS_ALLOCA_H
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Compiler/platform supports sys_siglist array.
-// *** This refers to (_sys_siglist) instead of (sys_siglist)
-// #define ACE_HAS_SYS_SIGLIST
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform supports SVR4 gettimeofday() prototype
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-// #define ACE_HAS_TIMEZONE_GETTIMEOFDAY
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_HAS_MSG
-#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_LACKS_GETHOSTENT
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-osf1-3.2.h b/ace/config-osf1-3.2.h
deleted file mode 100644
index 6412896a0a3..00000000000
--- a/ace/config-osf1-3.2.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for OSF1 3.2
-// platforms with the DEC 5.1 C++ compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define ACE_LACKS_SETSCHED
-#define ACE_LACKS_RWLOCK_T
-// DF: this platform uses Digital's CXX compiler
-#define DEC_CXX
-
-// DF: DEC's CXX supports explicit template specialization.
-#define ACE_HAS_TEMPLATE_SPECIALIZATION
-
-// DF: 3.2 has getpgid but no prototype defined anywhere. So we cheat
-// and declare it here.
-extern "C" pid_t getpgid (pid_t);
-
-// DF: ACE_HAS_STRING_CLASS seems the right thing to do...
-#define ACE_HAS_STRING_CLASS
-
-// DF: Seems apropriate since this is a new compiler...
-#if !defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#define ACE_HAS_BROKEN_MSG_H
-#define ACE_LACKS_SYSV_MSQ_PROTOS
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Platform supports <sys/procfs.h>
-#define ACE_HAS_PROC_FS
-
-#define ACE_HAS_UALARM
-
-// If ACE doesn't compile due to the lack of these methods, please
-// send email to schmidt@cs.wustl.edu reporting this.
-// #define ACE_LACKS_CONDATTR_PSHARED
-// #define ACE_LACKS_MUTEXATTR_PSHARED
-
-// Platform lacks support for stack address information
-#define ACE_LACKS_THREAD_STACK_ADDR
-
-// Platform lacks thread process scoping
-#define ACE_LACKS_THREAD_PROCESS_SCOPING
-
-// Platform has non-POSIX setkind and other functions.
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-#define ACE_HAS_SETKIND_NP
-
-// Platform supports POSIX 1.b clock_gettime ()
-#define ACE_HAS_CLOCK_GETTIME
-
-// Platform defines MAP_FAILED as a long constant.
-#define ACE_HAS_LONG_MAP_FAILED
-
-// Platform's implementation of sendmsg() has a non-const msgheader parameter.
-#define ACE_HAS_BROKEN_SENDMSG
-
-// Platform's implementation of writev() has a non-const iovec parameter.
-#define ACE_HAS_BROKEN_WRITEV
-
-// Platform's implementation of setlrmit() has a non-const rlimit parameter.
-#define ACE_HAS_BROKEN_SETRLIMIT
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Compiler/platform correctly calls init()/fini().
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// Platform supports C++ headers
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Platform supports the OSF ACE_TLI timod STREAMS module.
-#define ACE_HAS_OSF_TIMOD_H
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// Platform defines struct timespec in <sys/timers.h>
-#define ACE_HAS_BROKEN_POSIX_TIME
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-// ACE supports POSIX Pthreads. OSF/1 3.2 has draft 4
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_DRAFT4
-#define ACE_HAS_THREAD_SELF
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Added 6/13/95, 1 line
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler/platform has ssize_t.
-#define ACE_HAS_SSIZE_T
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform has 64bit longs and 32bit ints...
-// NOTE: ACE_HAS_64BIT_LONGS is deprecated. Instead, use ACE_SIZEOF_LONG == 8.
-#define ACE_HAS_64BIT_LONGS
-
-// Platform supports STREAM pipes.
-// #define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Platform support OSF1 gettimeofday
-#define ACE_HAS_OSF1_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_SVR4_SIGNAL_T
-
-// Compiler/platform has strerror().
-#define ACE_HAS_STRERROR
-
-// ACE supports threads.
-#define ACE_HAS_THREADS
-
-// Platform supports ACE_TLI tiuser header.
-#define ACE_HAS_TIUSER_H
-
-// Platform supports ACE_TLI timod STREAMS module.
-// #define ACE_HAS_TIMOD_H
-
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-
-// Platform supports ACE_TLI.
-#define ACE_HAS_TLI
-
-// Compile using multi-thread libraries.
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 8192
-#define ACE_HAS_GETPAGESIZE
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-osf1-4.0.h b/ace/config-osf1-4.0.h
deleted file mode 100644
index fa54b414a98..00000000000
--- a/ace/config-osf1-4.0.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// NOTE: if you are using Digital UNIX V4.0f or later, you must
-// use config-tru64.h instead of directly using this config file.
-
-// The following configuration file is designed to work for the
-// Digital UNIX V4.0a through V4.0d with either the GNU g++, DEC
-// cxx 5.4 and later, Rational RCC (2.4.1) compilers, or KAI 3.3
-// compilers. It is configured to use the IEEE Std 1003.1c-1995,
-// POSIX System Application Program Interface, or DCE threads (with
-// cxx only); it automatically selects the proper thread interface
-// depending on whether the cxx -pthread or -threads option was
-// specified. By 4.0a, the version is meant that is called "V4.0 464"
-// by uname -a.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if !defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// Compile using multi-thread libraries.
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif /* ! ACE_MT_SAFE */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ! ACE_NTRACE */
-
-// Include unistd.h to define _POSIX_C_SOURCE.
-#include <unistd.h>
-
-// Configuration-specific #defines:
-// 1) g++ or cxx
-// 2) pthreads or DCE threads
-#if defined (__GNUG__)
- // g++ with pthreads
-
- // config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
- // this must appear before its #include.
-# define ACE_HAS_STRING_CLASS
-
-# include "ace/config-g++-common.h"
-
-# define ACE_HAS_GNU_CSTRING_H
-# define ACE_HAS_REENTRANT_FUNCTIONS
-#elif defined (__DECCXX)
-
-# define ACE_CONFIG_INCLUDE_CXX_COMMON
-# include "ace/config-cxx-common.h"
-
-#elif defined (__rational__)
-# define ACE_HAS_REENTRANT_FUNCTIONS
-# define ACE_HAS_STRING_CLASS
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF
-# define ACE_LACKS_SIGNED_CHAR
-
- // Exceptions are enabled by platform_osf1_4.0_rcc.GNU.
-# define ACE_HAS_ANSI_CASTS
-# define ACE_HAS_STDCPP_STL_INCLUDES
-# define ACE_HAS_TEMPLATE_SPECIALIZATION
-# define ACE_HAS_TYPENAME_KEYWORD
-# define ACE_HAS_USING_KEYWORD
-#elif defined (__KCC)
-# define ACE_HAS_STRING_CLASS
-# include "ace/config-kcc-common.h"
-#else
-# error unsupported compiler on Digital Unix
-#endif /* ! __GNUG__ && ! __DECCXX && ! __rational__ && !_KCC */
-
-#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 199506L)
- // cxx with POSIX 1003.1c-1995 threads (pthreads) . . .
-# define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-# define ACE_HAS_BROKEN_IF_HEADER
-# define ACE_HAS_BROKEN_R_ROUTINES
-# define ACE_HAS_PTHREADS
-# define ACE_HAS_PTHREADS_STD
-# define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
-# define ACE_LACKS_T_ERRNO
-# define ACE_POLL_IS_BROKEN
-# if !defined (DIGITAL_UNIX)
-# define DIGITAL_UNIX 0x400
-# endif /* ! DIGITAL_UNIX */
- // DJT removed this due to some minor issues related to the
- // definitions of timestruc_t and tid_t in procfs.h not sure what
- // functionality is lost? Platform supports <sys/procfs.h>
- //#define ACE_HAS_PROC_FS
-#else /* _POSIX_C_SOURCE < 199506L */
- // cxx with DCE threads . . .
- // This ACE configuration is only supported with cxx; it has not been
- // test with g++.
-# define ACE_HAS_BROKEN_MSG_H
-# define ACE_HAS_BROKEN_POSIX_TIME
-# define ACE_HAS_PTHREADS
-# define ACE_HAS_PTHREADS_DRAFT4
-# define ACE_HAS_GETPAGESIZE
-# define ACE_HAS_PROC_FS
-# define ACE_HAS_SETKIND_NP
-# define ACE_HAS_THREAD_SELF
-# define ACE_LACKS_CONST_TIMESPEC_PTR
-# define ACE_LACKS_THREAD_PROCESS_SCOPING
-# define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-# define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-# define ACE_LACKS_READDIR_R
-# define ACE_LACKS_SETSCHED
-# define ACE_LACKS_SIGNED_CHAR
-# define ACE_LACKS_SYSV_MSQ_PROTOS
-#endif /* _POSIX_C_SOURCE < 199506L */
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_DEFAULT_BASE_ADDR ((char *) 0x80000000)
-// NOTE: ACE_HAS_64BIT_LONGS is deprecated. Instead, use ACE_SIZEOF_LONG == 8.
-#define ACE_HAS_64BIT_LONGS
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-#define ACE_HAS_BROKEN_SETRLIMIT
-#define ACE_HAS_BROKEN_T_ERROR
-#define ACE_HAS_BROKEN_WRITEV
-#define ACE_HAS_CLOCK_GETTIME
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_DIRENT
-#define ACE_HAS_GETRUSAGE
-#define ACE_HAS_GPERF
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_IP_MULTICAST
-#define ACE_HAS_LLSEEK
-#define ACE_HAS_LONG_MAP_FAILED
-#define ACE_HAS_MSG
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_OSF1_GETTIMEOFDAY
-#define ACE_HAS_OSF_TIMOD_H
-#define ACE_HAS_POLL
-#define ACE_HAS_POSIX_NONBLOCK
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_PRIOCNTL
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_SSIZE_T
-#define ACE_HAS_STRBUF_T
-#define ACE_HAS_STREAMS
-#define ACE_HAS_STRERROR
-#define ACE_HAS_STRPTIME
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#define ACE_HAS_SVR4_SIGNAL_T
-#define ACE_HAS_SYSCALL_H
-#define ACE_HAS_SYSV_IPC
-#define ACE_HAS_THREADS
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_HAS_TIUSER_H
-#define ACE_HAS_TLI
-#define ACE_HAS_TLI_PROTOTYPES
-#define ACE_HAS_UALARM
-#define ACE_HAS_UCONTEXT_T
-#define ACE_LACKS_PRI_T
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_THREAD_STACK_ADDR
-#define ACE_PAGE_SIZE 8192
-#define ACE_HAS_SIGTIMEDWAIT
-#define ACE_HAS_SIGSUSPEND
-
-// DJT 6/10/96 All these broken macro's can now be removed with the
-// approporiate ordering of the include files. The Platinum release
-// now temporarily supports both forms. Platform's implementation of
-// sendmsg() has a non-const msgheader parameter.
-#define ACE_HAS_BROKEN_SENDMSG
-
-// As 1MB thread-stack size seems to become standard (at least Solaris and
-// NT have it), we should raise the minimum stack size to this level for
-// avoiding unpleasant surprises when porting ACE software to Digital UNIX.
-// Do not define this smaller than 64KB, because ACE_Log_Msg::log needs that!
-// TK, 05 Feb 97
-#define ACE_NEEDS_HUGE_THREAD_STACKSIZE (1024 * 1024)
-#define ACE_HAS_IDTYPE_T
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-pharlap.h b/ace/config-pharlap.h
deleted file mode 100644
index d8ebe03341f..00000000000
--- a/ace/config-pharlap.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This configuration file is for use with the PharLap Realtime ETS Kernel.
-// It has been tested with PharLap TNT Embedded ToolSuite version 9.1.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define ACE_HAS_PHARLAP
-// Some features are only available with the Realtime edition of ETS.
-// Assume that if using ACE, the realtime version is also being used, but
-// allow it to be turned off as well.
-#ifndef ACE_HAS_PHARLAP_RT
-# define ACE_HAS_PHARLAP_RT
-#else
-# if (ACE_HAS_PHARLAP_RT == 0)
-# undef ACE_HAS_PHARLAP_RT
-# endif
-#endif
-
-// Fortunately, PharLap ETS offers much of the Win32 API. But it's still on
-// WinNT 3.5, Winsock 1.1
-#define ACE_HAS_WINNT4 0
-#define ACE_HAS_WINSOCK2 0
-
-// The TSS implementation doesn't pass muster on the TSS_Test, but it works
-// well with ACE's TSS emulation.
-#define ACE_HAS_TSS_EMULATION
-
-#define ACE_LACKS_MMAP
-#define ACE_LACKS_MPROTECT
-#define ACE_LACKS_MSYNC
-#define ACE_LACKS_TCP_NODELAY
-#define ACE_LACKS_MSG_WFMO
-
-// There's no host table, by default. So using "localhost" won't work.
-// If your system does have the ability to use "localhost" and you want to,
-// define it before including this file.
-#if !defined (ACE_LOCALHOST)
-# define ACE_LOCALHOST "127.0.0.1"
-#endif /* ACE_LOCALHOST */
-
-// Don't know how to get the page size at execution time. This is most likely
-// the correct value.
-#define ACE_PAGE_SIZE 4096
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-// Let the config-win32.h file do its thing
-#undef ACE_CONFIG_H
-#include "ace/config-win32.h"
-#include /**/ <embkern.h>
-#if defined (ACE_HAS_PHARLAP_RT)
-# include /**/ <embtcpip.h>
-#endif /* ACE_HAS_PHARLAP_RT */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-psos-diab-mips.h b/ace/config-psos-diab-mips.h
deleted file mode 100644
index 954dcd9e2f9..00000000000
--- a/ace/config-psos-diab-mips.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for pSOSystem V2.2.1,
-// using the Diab Data D-C++ 4.2 p3 compiler (or a later version)
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// #if ! defined (__ACE_INLINE__)
-// # define __ACE_INLINE__
-// #endif /* ! __ACE_INLINE__ */
-#if defined (__ACE_INLINE__)
-# undef __ACE_INLINE__
-#endif /* __ACE_INLINE__ */
-
-#define ACE_LACKS_ISATTY
-
-#define ACE_LACKS_DIFFTIME
-
-#define ACE_LACKS_INLINE_FUNCTIONS
-
-#define ACE_LACKS_TEMPLATE_AS_TEMPLATE_PARAMETER
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#endif /* __GNUG__ */
-
-
-// Don't use RCSID
-#if !defined (ACE_USE_RCSID)
-#define ACE_USE_RCSID 0
-#endif /* #if !defined (ACE_USE_RCSID) */
-
-#define ACE_LACKS_ASSERT_MACRO
-
-#define ACE_LACKS_SIGSET
-#define ACE_LACKS_SIGACTION
-#define ACE_LACKS_FCNTL
-#define ACE_LACKS_FILELOCKS
-#define ACE_LACKS_TRUNCATE
-#define ACE_LACKS_PRAGMA_ONCE
-#define ACE_NLOGGING
-#define ACE_NDEBUG
-
-#define ACE_PSOS_LACKS_PREPC
-
-#define ACE_HAS_STRDUP_EMULATION
-
-#define ACE_HAS_IP_MULTICAST
-
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-#define ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS
-
-#define ACE_HAS_BROKEN_EXPLICIT_DESTRUCTOR
-
-# define ACE_HAS_BROKEN_NOOP_DTORS
-
-# define ACE_HAS_DIRENT
-# define ACE_LACKS_READDIR_R
-# define ACE_LACKS_TELLDIR
-# define ACE_LACKS_SEEKDIR
-# define ACE_LACKS_REWINDDIR
-
-# define ACE_THREADS_DONT_INHERIT_LOG_MSG
-
-// Template instantiation definitions
-// #define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_FILE
-#define ACE_TEMPLATES_REQUIRE_SOURCE
-#define ACE_LACKS_METHOD_DEFINITIONS_IN_CLASS_TEMPLATE
-
-#define ACE_LACKS_HRTIME_T
-
-// #define ACE_LACKS_EVENT_T
-
-// #define ACE_HAS_VERBOSE_NOTSUP
-
-#define ACE_LACKS_MEMORY_H
-
-// #define ACE_LACKS_MALLOC_H
-
-#define ACE_LACKS_MMAP
-
-#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
-
-#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-
-#define ACE_LACKS_SEMBUF_T
-
-#define ACE_LACKS_EXEC
-
-#define ACE_LACKS_FORK
-
-#define ACE_LACKS_WRITEV
-
-#define ACE_LACKS_READV
-
-// rename the main entry point
-// #define ACE_MAIN extern "C" void root
-
-// All this was commented out for the single threaded port
-/*
-#define ACE_HAS_THREADS
-
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-#define ACE_HAS_TSS_EMULATION
-
-#define ACE_DEFAULT_THREAD_KEYS 256
-
-#define ACE_LACKS_COND_T
-// #define ACE_HAS_TSS_EMULATION
-
-*/
-
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-/* #define ACE_HAS_BROKEN_SENDMSG */
-
-/* #define ACE_HAS_BROKEN_WRITEV */
-
-#define ACE_HAS_BROKEN_CONVERSIONS
-
-#define ACE_HAS_CHARPTR_SOCKOPT
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_MSG
-
-#define ACE_HAS_POSIX_NONBLOCK
-
-#define ACE_HAS_SIGINFO_T
-#define ACE_LACKS_SIGINFO_H
-#define ACE_SIGINFO_IS_SIGINFO_T
-#define ACE_LACKS_SIGSET_DEFINITIONS
-
-#define ACE_HAS_SIGWAIT
-
-//#define ACE_HAS_SIG_ATOMIC_T
-
-// #define ACE_HAS_STRERROR
-
-#define ACE_LACKS_ACCESS
-
-#define ACE_LACKS_GETHOSTENT
-
-#define ACE_LACKS_GETSERVBYNAME
-
-// IO Streams stuff
-/* #define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */
-#define ACE_LACKS_IOSTREAM_TOTALLY
-#define ACE_LACKS_ACE_IOSTREAM
-#define ACE_LACKS_IOSTREAM_FX
-#define ACE_DEFAULT_LOG_STREAM 0
-#define ostream FILE
-
-#define ACE_LACKS_IOSTREAM_FX
-
-#define ACE_LACKS_KEY_T
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-
-#define ACE_LACKS_LONGLONG_T
-
-#define ACE_LACKS_MADVISE
-
-#define ACE_LACKS_MKTEMP
-
-#define ACE_LACKS_MPROTECT
-
-#define ACE_LACKS_MSYNC
-
-#define ACE_LACKS_PARAM_H
-
-#define ACE_LACKS_PWD_FUNCTIONS
-
-#define ACE_LACKS_RLIMIT
-
-#define ACE_LACKS_RPC_H
-
-#define ACE_LACKS_RWLOCK_T
-
-#define ACE_LACKS_SBRK
-
-#define ACE_LACKS_SIGNED_CHAR
-
-#define ACE_LACKS_SI_ADDR
-
-#define ACE_LACKS_SOCKETPAIR
-
-#define ACE_LACKS_STRCASECMP
-
-#define ACE_LACKS_STRRECVFD
-
-#define ACE_LACKS_SYSCALL
-
-#define ACE_LACKS_SYSV_MSG_H
-
-#define ACE_LACKS_SYSV_SHMEM
-
-// #define ACE_LACKS_SYS_NERR
-
-#define ACE_LACKS_SYS_TYPES_H
-
-#define ACE_LACKS_TIMESPEC_T
-
-#define ACE_LACKS_UCONTEXT_H
-
-#define ACE_LACKS_UNIX_SIGNALS
-
-// #define ACE_LACKS_SYSTIME_H
-
-#define ACE_PAGE_SIZE 4096
-
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_PSOS_CANT_USE_SYS_TYPES
-
-// #define ACE_PSOS_SNARFS_HEADER_INFO
-
-#if !defined (ACE_PSOS)
-#define ACE_PSOS
-#endif /* ACE_PSOS */
-
-#if !defined (ACE_PSOS_TBD)
-#define ACE_PSOS_TBD
-#endif /* ACE_PSOS_TBD */
-
-#define ACE_LACKS_MKFIFO
-
-#define ACE_LACKS_MALLOC_H
-
-#define ACE_PSOS_DIAB
-
-#define ACE_PSOS_DIAB_MIPS
-#define ACE_MALLOC_ALIGN 8
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-psos-diab-ppc.h b/ace/config-psos-diab-ppc.h
deleted file mode 100644
index 65d26b1cb71..00000000000
--- a/ace/config-psos-diab-ppc.h
+++ /dev/null
@@ -1,277 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for:
-// a) pSOSystem V2.5.0 for PowerPC (pssppc.250)
-// b) DiabData C++ compiler - dplus 4.2b
-// *note pSOSystem V2.5.0 is contained in the PRISM+2.0.0 package
-
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// #if ! defined (__ACE_INLINE__)
-// # define __ACE_INLINE__
-// #endif /* ! __ACE_INLINE__ */
-#if defined (__ACE_INLINE__)
-# undef __ACE_INLINE__
-#endif /* __ACE_INLINE__ */
-
-#define ACE_LACKS_ISATTY
-
-#define ACE_LACKS_DIFFTIME
-
-#define ACE_LACKS_FCNTL
-
-#define ACE_LACKS_FILELOCKS
-
-#define ACE_LACKS_FSYNC
-
-#define ACE_LACKS_INLINE_FUNCTIONS
-
-#define ACE_LACKS_TEMPLATE_AS_TEMPLATE_PARAMETER
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#endif /* __GNUG__ */
-
-#define ACE_PSOS_LACKS_PREPC
-
-#define ACE_PSOS_HAS_TIME
-
-#define ACE_HAS_STRDUP_EMULATION
-
-#define ACE_HAS_IP_MULTICAST
-
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-#define ACE_HAS_BROKEN_EXPLICIT_TYPECAST_OPERATOR_INVOCATION
-
-#define ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS
-
-#define ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR
-
-# define ACE_HAS_BROKEN_NOOP_DTORS
-
-# define ACE_HAS_DIRENT
-# define ACE_LACKS_READDIR_R
-# define ACE_LACKS_TELLDIR
-# define ACE_LACKS_SEEKDIR
-# define ACE_LACKS_REWINDDIR
-
-#define ACE_LACKS_TRUNCATE
-
-// Template instantiation definitions
-// #define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_FILE
-#define ACE_TEMPLATES_REQUIRE_SOURCE
-
-// IO Streams stuff
-// #define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION
-//#define ACE_LACKS_IOSTREAM_TOTALLY
-//#define ACE_LACKS_ACE_IOSTREAM
-//#define ACE_LACKS_IOSTREAM_FX
-//#define ACE_DEFAULT_LOG_STREAM 0
-//#define ostream FILE
-
-#define ACE_LACKS_HRTIME_T
-
-// #define ACE_LACKS_EVENT_T
-
-#define ACE_HAS_VERBOSE_NOTSUP
-
-#define ACE_LACKS_MEMORY_H
-
-// #define ACE_LACKS_MALLOC_H
-
-#define ACE_LACKS_MMAP
-
-#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
-
-#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-
-#define ACE_LACKS_SEMBUF_T
-
-#define ACE_LACKS_EXEC
-
-#define ACE_LACKS_FORK
-
-#define ACE_LACKS_WRITEV
-
-#define ACE_LACKS_READV
-
-// rename the main entry point
-#define ACE_MAIN extern "C" void root
-
-// All this was commented out for the single threaded port
-
-#define ACE_HAS_THREADS
-
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-// #define ACE_HAS_TSS_EMULATION
-// #define ACE_DEFAULT_THREAD_KEYS 256
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_PSOS_HAS_TSS
-#define ACE_DEFAULT_THREAD_KEYS KC_NTSD
-
-#define ACE_PSOS_HAS_MUTEX
-#define ACE_PSOS_HAS_PRIO_MUTEX
-#define ACE_PSOS_HAS_PRIO_INHERIT_MUTEX
-#define ACE_HAS_RECURSIVE_MUTEXES
-
-// #define ACE_LACKS_COND_T
-#define ACE_PSOS_HAS_COND_T
-
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-/* #define ACE_HAS_BROKEN_SENDMSG */
-
-/* #define ACE_HAS_BROKEN_WRITEV */
-
-#define ACE_HAS_BROKEN_CONVERSIONS
-
-#define ACE_HAS_CHARPTR_SOCKOPT
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_MSG
-
-#define ACE_HAS_POSIX_NONBLOCK
-
-#define ACE_HAS_SIGINFO_T
-#define ACE_LACKS_SIGINFO_H
-#define ACE_SIGINFO_IS_SIGINFO_T
-#define ACE_LACKS_SIGSET_DEFINITIONS
-#define ACE_LACKS_SIGSET
-#define ACE_LACKS_SIGACTION
-
-#define ACE_HAS_SIGWAIT
-
-//#define ACE_HAS_SIG_ATOMIC_T
-
-#define ACE_HAS_STRERROR
-
-#define ACE_LACKS_ACCESS
-
-#define ACE_LACKS_GETHOSTENT
-
-#define ACE_LACKS_GETSERVBYNAME
-
-#define ACE_LACKS_KEY_T
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-
-#define ACE_LACKS_LONGLONG_T
-
-#define ACE_LACKS_LSTAT
-
-#define ACE_LACKS_MADVISE
-
-#define ACE_LACKS_MKTEMP
-
-#define ACE_LACKS_MPROTECT
-
-#define ACE_LACKS_MSYNC
-
-#define ACE_LACKS_PARAM_H
-
-#define ACE_LACKS_PWD_FUNCTIONS
-
-#define ACE_LACKS_READLINK
-
-#define ACE_LACKS_RLIMIT
-
-#define ACE_LACKS_RWLOCK_T
-
-#define ACE_LACKS_SBRK
-
-#define ACE_LACKS_SIGNED_CHAR
-
-#define ACE_LACKS_SI_ADDR
-
-#define ACE_LACKS_SOCKETPAIR
-
-#define ACE_LACKS_STRCASECMP
-
-#define ACE_LACKS_STRRECVFD
-
-#define ACE_LACKS_SYSCALL
-
-#define ACE_LACKS_SYSV_MSG_H
-
-#define ACE_LACKS_SYSV_SHMEM
-
-#define ACE_LACKS_SYS_NERR
-
-#define ACE_LACKS_SYS_TYPES_H
-
-#define ACE_LACKS_TIMESPEC_T
-
-#define ACE_LACKS_UCONTEXT_H
-
-#define ACE_LACKS_UNIX_SIGNALS
-
-#defined ACE_THREADS_LACK_SHARED_SOCKETS
-
-// #define ACE_MALLOC_ALIGN 8
-// #define ACE_LACKS_SYSTIME_H
-
-#define ACE_PAGE_SIZE 4096
-
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_PSOS_CANT_USE_SYS_TYPES
-
-// #define ACE_PSOS_LACKS_PHILE
-
-#define ACE_PSOS_HAS_C_LIBRARY
-
-#define ACE_PSOS_SNARFS_HEADER_INFO
-
-#define ACE_PSOS_LACKS_ARGC_ARGV
-
-#if !defined (ACE_PSOS)
-#define ACE_PSOS
-#endif /* ACE_PSOS */
-
-#if !defined (ACE_PSOS_TBD)
-#define ACE_PSOS_TBD
-#endif /* ACE_PSOS_TBD */
-
-#define ACE_LACKS_MKFIFO
-
-#define ACE_PSOS_DIAB
-
-#define ACE_PSOS_DIAB_PPC
-
-/* Defining PNANOREDEF will avoid the redefinition of close to pna_close in
- * pna.h In OS.i we make sure that pna_close is called in place of close
- * when a socket is closed.
- */
-#define _PNANOREDEF_
-
-/* needed for portability, due to non-standard ip_mreq
- structure definition for pSOS Diab PPC */
-#define IMR_MULTIADDR imr_mcastaddr
-
-#define ACE_THREADS_DONT_INHERIT_LOG_MSG /* Stream sharing problem for tasks */
-
-#define ACE_THREADS_MUST_EXPLICITLY_SHARE_SOCKETS /* Can't just share sockets */
-
-#define ACE_PSOS_DEFAULT_STACK_SIZE 30720 /* Default task stack size to 30K */
-
-#define ACE_DEFAULT_THREAD_PRIORITY 239
-
-#define ACE_THREAD_MANAGER_LACKS_STATICS
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-psos-diab.h b/ace/config-psos-diab.h
deleted file mode 100644
index 7c439aa677d..00000000000
--- a/ace/config-psos-diab.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for pSOSystem V2.2.2,
-// using the Diab Data D-C++ 4.2a compiler (or a later version)
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// #if ! defined (__ACE_INLINE__)
-// # define __ACE_INLINE__
-// #endif /* ! __ACE_INLINE__ */
-#if defined (__ACE_INLINE__)
-# undef __ACE_INLINE__
-#endif /* __ACE_INLINE__ */
-
-#define ACE_LACKS_ISATTY
-
-#define ACE_LACKS_DIFFTIME
-
-#define ACE_LACKS_FCNTL
-
-#define ACE_LACKS_FILELOCKS
-
-#define ACE_LACKS_FSYNC
-
-#define ACE_LACKS_INLINE_FUNCTIONS
-
-#define ACE_LACKS_TEMPLATE_AS_TEMPLATE_PARAMETER
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#endif /* __GNUG__ */
-
-#define ACE_PSOS_LACKS_PREPC
-
-#define ACE_PSOS_HAS_TIME
-
-#define ACE_HAS_STRDUP_EMULATION
-
-#define ACE_HAS_IP_MULTICAST
-
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-#define ACE_HAS_BROKEN_EXPLICIT_TYPECAST_OPERATOR_INVOCATION
-
-#define ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS
-
-#define ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR
-
-# define ACE_HAS_BROKEN_NOOP_DTORS
-
-# define ACE_HAS_DIRENT
-# define ACE_LACKS_READDIR_R
-# define ACE_LACKS_TELLDIR
-# define ACE_LACKS_SEEKDIR
-# define ACE_LACKS_REWINDDIR
-
-#define ACE_LACKS_TRUNCATE
-
-// Template instantiation definitions
-// #define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_FILE
-#define ACE_TEMPLATES_REQUIRE_SOURCE
-
-// IO Streams stuff
-// #define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION
-#define ACE_LACKS_IOSTREAM_TOTALLY
-#define ACE_LACKS_ACE_IOSTREAM
-#define ACE_LACKS_IOSTREAM_FX
-#define ACE_DEFAULT_LOG_STREAM 0
-#define ostream FILE
-
-#define ACE_LACKS_HRTIME_T
-
-// #define ACE_LACKS_EVENT_T
-
-#define ACE_HAS_VERBOSE_NOTSUP
-
-#define ACE_LACKS_MEMORY_H
-
-// #define ACE_LACKS_MALLOC_H
-
-#define ACE_LACKS_MMAP
-
-#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
-
-#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-
-#define ACE_LACKS_SEMBUF_T
-
-#define ACE_LACKS_EXEC
-
-#define ACE_LACKS_FORK
-
-#define ACE_LACKS_WRITEV
-
-#define ACE_LACKS_READV
-
-// rename the main entry point
-#define ACE_MAIN extern "C" void root
-
-// All this was commented out for the single threaded port
-
-#define ACE_HAS_THREADS
-
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-#define ACE_HAS_TSS_EMULATION
-
-#define ACE_DEFAULT_THREAD_KEYS 256
-
-#define ACE_LACKS_COND_T
-
-// #define ACE_HAS_TSS_EMULATION
-
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-/* #define ACE_HAS_BROKEN_SENDMSG */
-
-/* #define ACE_HAS_BROKEN_WRITEV */
-
-#define ACE_HAS_BROKEN_CONVERSIONS
-
-#define ACE_HAS_CHARPTR_SOCKOPT
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_MSG
-
-#define ACE_HAS_POSIX_NONBLOCK
-
-#define ACE_HAS_SIGINFO_T
-#define ACE_LACKS_SIGINFO_H
-#define ACE_SIGINFO_IS_SIGINFO_T
-#define ACE_LACKS_SIGSET_DEFINITIONS
-
-#define ACE_HAS_SIGWAIT
-
-#define ACE_HAS_SIG_ATOMIC_T
-
-#define ACE_HAS_STRERROR
-
-#define ACE_LACKS_ACCESS
-
-#define ACE_LACKS_GETHOSTENT
-
-#define ACE_LACKS_GETSERVBYNAME
-
-#define ACE_LACKS_KEY_T
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-
-#define ACE_LACKS_LONGLONG_T
-
-#define ACE_LACKS_LSTAT
-
-#define ACE_LACKS_MADVISE
-
-#define ACE_LACKS_MKTEMP
-
-#define ACE_LACKS_MPROTECT
-
-#define ACE_LACKS_MSYNC
-
-#define ACE_LACKS_PARAM_H
-
-#define ACE_LACKS_PWD_FUNCTIONS
-
-#define ACE_LACKS_READLINK
-
-#define ACE_LACKS_RLIMIT
-
-#define ACE_LACKS_RWLOCK_T
-
-#define ACE_LACKS_SBRK
-
-#define ACE_LACKS_SIGNED_CHAR
-
-#define ACE_LACKS_SI_ADDR
-
-#define ACE_LACKS_SOCKETPAIR
-
-#define ACE_LACKS_STRCASECMP
-
-#define ACE_LACKS_STRRECVFD
-
-#define ACE_LACKS_SYSCALL
-
-#define ACE_LACKS_SYSV_MSG_H
-
-#define ACE_LACKS_SYSV_SHMEM
-
-#define ACE_LACKS_SYS_NERR
-
-#define ACE_LACKS_SYS_TYPES_H
-
-#define ACE_LACKS_TIMESPEC_T
-
-#define ACE_LACKS_UCONTEXT_H
-
-#define ACE_LACKS_UNIX_SIGNALS
-
-// #define ACE_LACKS_SYSTIME_H
-
-#define ACE_PAGE_SIZE 4096
-
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_PSOS_CANT_USE_SYS_TYPES
-
-// #define ACE_PSOS_LACKS_PHILE
-
-#define ACE_PSOS_HAS_C_LIBRARY
-
-#define ACE_PSOS_SNARFS_HEADER_INFO
-
-#define ACE_PSOS_LACKS_ARGC_ARGV
-
-#if !defined (ACE_PSOS)
-#define ACE_PSOS
-#endif /* ACE_PSOS */
-
-#define ACE_MALLOC_ALIGN 8
-
-#if !defined (ACE_PSOS_DIAB)
-#define ACE_PSOS_DIAB
-#endif /* ACE_PSOS_DIAB */
-#define ACE_LACKS_MKFIFO
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-psos-tm.h b/ace/config-psos-tm.h
deleted file mode 100644
index aa077e2bca6..00000000000
--- a/ace/config-psos-tm.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for pSOSystem V2.2.1,
-// using the Diab Data D-C++ 4.1a compiler
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// #if ! defined (__ACE_INLINE__)
-// # define __ACE_INLINE__
-// #endif /* ! __ACE_INLINE__ */
-#if defined (__ACE_INLINE__)
-# undef __ACE_INLINE__
-#endif /* __ACE_INLINE__ */
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#endif /* __GNUG__ */
-
-#define ACE_HAS_STRDUP_EMULATION
-
-#define ACE_HAS_IP_MULTICAST
-
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-#define ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR
-
-// Template instantiation definitions
-// #define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_FILE
-#define ACE_TEMPLATES_REQUIRE_SOURCE
-
-#define ACE_DONT_INCLUDE_ACE_SIGNAL_H
-# include <signal.h> //JINLU
-#undef ACE_DONT_INCLUDE_ACE_SIGNAL_H
-#include <pna.h> //JINLU
-#define NSIG _NSIG //_NSIG = 32 defined in signal.h JINLU
-#define TCP_NODELAY 1 // this will be defined later by pSOS/TM
-
-/* #define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */
-
-#define ACE_LACKS_HRTIME_T
-
-// #define ACE_LACKS_EVENT_T
-
-#define ACE_HAS_VERBOSE_NOTSUP
-
-#define ACE_LACKS_MEMORY_H
-
-// #define ACE_LACKS_MALLOC_H
-
-#define ACE_LACKS_MMAP
-
-#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
-
-#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-
-#define ACE_LACKS_SEMBUF_T
-
-#define ACE_LACKS_EXEC
-
-#define ACE_LACKS_FORK
-
-#define ACE_LACKS_WRITEV
-
-#define ACE_LACKS_READV
-
-// rename the main entry point
-// #define ACE_MAIN extern "C" void root
-
-// All this was commented out for the single threaded port
-
-#define ACE_HAS_THREADS
-
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-#define ACE_HAS_TSS_EMULATION
-
-#define ACE_DEFAULT_THREAD_KEYS 256
-
-#define ACE_LACKS_COND_T
-
-// #define ACE_HAS_TSS_EMULATION
-
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-/* #define ACE_HAS_BROKEN_SENDMSG */
-
-/* #define ACE_HAS_BROKEN_WRITEV */
-
-#define ACE_HAS_BROKEN_CONVERSIONS
-
-#define ACE_HAS_CHARPTR_SOCKOPT
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_MSG
-
-#define ACE_HAS_POSIX_NONBLOCK
-
-#define ACE_HAS_SIGINFO_T
-#define ACE_LACKS_SIGINFO_H
-#define ACE_SIGINFO_IS_SIGINFO_T
-
-#define ACE_HAS_SIGWAIT
-
-#define ACE_HAS_SIG_ATOMIC_T
-
-#define ACE_HAS_STRERROR
-
-#define ACE_LACKS_ACCESS
-
-#define ACE_LACKS_GETHOSTENT
-
-#define ACE_LACKS_GETSERVBYNAME
-
-#define ACE_LACKS_IOSTREAM_FX
-
-#define ACE_LACKS_KEY_T
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-
-#define ACE_LACKS_LONGLONG_T
-
-#define ACE_LACKS_LSTAT
-
-#define ACE_LACKS_MADVISE
-
-#define ACE_LACKS_MKTEMP
-
-#define ACE_LACKS_MPROTECT
-
-#define ACE_LACKS_MSYNC
-
-#define ACE_LACKS_PARAM_H
-
-#define ACE_LACKS_PWD_FUNCTIONS
-
-#define ACE_LACKS_READLINK
-
-#define ACE_LACKS_RLIMIT
-
-#define ACE_LACKS_RWLOCK_T
-
-#define ACE_LACKS_SBRK
-
-#define ACE_LACKS_SIGNED_CHAR
-
-#define ACE_LACKS_SI_ADDR
-
-#define ACE_LACKS_SOCKETPAIR
-
-#define ACE_LACKS_STRCASECMP
-
-#define ACE_LACKS_STRRECVFD
-
-#define ACE_LACKS_SYSCALL
-
-#define ACE_LACKS_SYSV_MSG_H
-
-#define ACE_LACKS_SYSV_SHMEM
-
-#define ACE_LACKS_SYS_NERR // psos/tm does not have sys_nerr
-
-#define ACE_LACKS_SYS_TYPES_H
-
-#define ACE_LACKS_TIMESPEC_T
-
-#define ACE_LACKS_UCONTEXT_H
-
-#define ACE_LACKS_UNIX_SIGNALS
-
-// #define ACE_LACKS_SYSTIME_H
-
-#define ACE_PAGE_SIZE 4096
-
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_PSOS_TM
-#define ACE_PSOS_PROVIDES_ERROR_SYMBOLS_TM
-#define USER_INCLUDE_SYS_TIME_TM
-#define ACE_LACKS_FILELOCKS
-#define ACE_LACKS_SIGSET
-#define ACE_LACKS_SIGACTION
-#define ACE_LACKS_FCNTL
-#define ACE_PSOS_LACKS_PHILE
-#define ACE_PSOS_LACKS_PREPC
-#define ACE_PSOS_CANT_USE_SYS_TYPES
-#define ACE_PSOS_HAS_TIME
-
-//#define ACE_PSOS_SNARFS_HEADER_INFO
-
-#if !defined (ACE_PSOS)
-#define ACE_PSOS
-#endif /* ACE_PSOS */
-
-#if !defined (ACE_PSOS_TBD)
-#define ACE_PSOS_TBD
-#endif /* ACE_PSOS_TBD */
-#define ACE_LACKS_MKFIFO
-#define ACE_MALLOC_ALIGN 8
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-psosim-g++.h b/ace/config-psosim-g++.h
deleted file mode 100644
index f288b93f18e..00000000000
--- a/ace/config-psosim-g++.h
+++ /dev/null
@@ -1,246 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for pSOSim on SunOS5
-// using the GNU/Cygnus g++ 2.7.2 compiler, without repo patch.
-
-///////////////////////////////////////////////////////////////////////////////
-// * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * //
-// //
-// Because pSOSim includes UNIX system header files in order to do //
-// its emulation of pSOSystSem on Solaris, there are a number of //
-// things that are "available" to ACE on pSOSim that are *not* //
-// really available on pSOSystem. Every effort has been made to //
-// avoid dependencies on these "features" in the ACE pSOSim port, //
-// which has in turn necessarily required pSOSim specific definitions. //
-// //
-// To ease portability between pSOSim and pSOSystem, the definitions //
-// in this file have been separated into three groups: those that //
-// are known to be appropriate for both pSOSim and pSOSystem, those //
-// known to be appropriate for pSOSim but (probably) not for pSOSystem, //
-// and those that are (probably) appropriate for pSOSystem, but are //
-// not appropriate for pSOSim. //
-// //
-// When porting from pSOSim to pSOSystem, it is (probably) a good //
-// idea to leave the definitions in the first category alone, //
-// comment out the definitions in the second category, and uncomment //
-// the definitions in the third category. Additional definitions //
-// may need to be added to the third category, as only those that //
-// were encountered during the pSOSim port were added (that is, one //
-// of the system files included by pSOSim could be compensating for //
-// a definition pSOSystem really needs. //
-// //
-// * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * IMPORTANT * //
-///////////////////////////////////////////////////////////////////////////////
-
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-////////////////////////////////////////////////////////////////
-// //
-// Definitions appropriate for both pSOSim and pSOSystem //
-// //
-////////////////////////////////////////////////////////////////
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#endif /* __GNUG__ */
-
-#define ACE_HAS_IP_MULTICAST
-
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-/* #define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */
-
-// #define ACE_LACKS_U_LONG_LONG
-
-#define ACE_LACKS_HRTIME_T
-
-// #define ACE_LACKS_EVENT_T
-
-#define ACE_HAS_VERBOSE_NOTSUP
-
-#define ACE_LACKS_MEMORY_H
-
-#define ACE_LACKS_MALLOC_H
-
-#define ACE_LACKS_MMAP
-
-#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
-
-#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-
-#define ACE_LACKS_SEMBUF_T
-
-#define ACE_LACKS_EXEC
-
-#define ACE_LACKS_FORK
-
-
-// rename the main entry point
-#define ACE_MAIN extern "C" void root
-
-// All this is commented out for the single threaded port
-/*
-
-#define ACE_HAS_THREADS
-
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-#define ACE_DEFAULT_THREAD_KEYS 256
-
-#define ACE_LACKS_COND_T
-
-
-*/
-
-#define ACE_HAS_TSS_EMULATION
-
-
-////////////////////////////////////////////////////////////////
-// //
-// Definitions appropriate for pSOSim but not pSOSystem //
-// //
-////////////////////////////////////////////////////////////////
-
-#define ACE_HAS_POSIX_TIME
-
-////////////////////////////////////////////////////////////////
-// //
-// Definitions appropriate for pSOSystem but not pSOSim //
-// //
-////////////////////////////////////////////////////////////////
-
-
-////////////////////////////////////////////////////////////////
-// //
-// Definitions that have not been categorized //
-// //
-////////////////////////////////////////////////////////////////
-
-
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-/* #define ACE_HAS_BROKEN_SENDMSG */
-
-/* #define ACE_HAS_BROKEN_WRITEV */
-
-#define ACE_HAS_CHARPTR_SOCKOPT
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_MSG
-
-#define ACE_HAS_POSIX_NONBLOCK
-
-#define ACE_HAS_SIGINFO_T
-
-#define ACE_HAS_SIGWAIT
-
-#define ACE_HAS_SIG_ATOMIC_T
-
-#define ACE_HAS_STRERROR
-
-#define ACE_LACKS_ACCESS
-
-#define ACE_LACKS_GETHOSTENT
-
-#define ACE_LACKS_GETSERVBYNAME
-
-#define ACE_LACKS_IOSTREAM_FX
-
-#define ACE_LACKS_KEY_T
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-
-#define ACE_LACKS_LONGLONG_T
-
-#define ACE_LACKS_LSTAT
-
-#define ACE_LACKS_MADVISE
-
-#define ACE_LACKS_MKTEMP
-
-#define ACE_LACKS_MPROTECT
-
-#define ACE_LACKS_MSYNC
-
-#define ACE_LACKS_PARAM_H
-
-#define ACE_LACKS_PWD_FUNCTIONS
-
-#define ACE_LACKS_READLINK
-
-#define ACE_LACKS_RLIMIT
-
-#define ACE_LACKS_RWLOCK_T
-
-#define ACE_LACKS_SBRK
-
-#define ACE_LACKS_SIGINFO_H
-
-#define ACE_LACKS_SIGNED_CHAR
-
-#define ACE_LACKS_SI_ADDR
-
-#define ACE_LACKS_SOCKETPAIR
-
-#define ACE_LACKS_STRCASECMP
-
-#define ACE_LACKS_STRRECVFD
-
-#define ACE_LACKS_SYSCALL
-
-#define ACE_LACKS_SYSV_MSG_H
-
-#define ACE_LACKS_SYSV_SHMEM
-
-#define ACE_LACKS_SYS_NERR
-
-#define ACE_LACKS_TIMESPEC_T
-
-#define ACE_LACKS_UCONTEXT_H
-
-#define ACE_LACKS_UNIX_SIGNALS
-
-#define ACE_LACKS_UTSNAME_T
-
-// #define ACE_LACKS_SYSTIME_H
-
-#define ACE_PAGE_SIZE 4096
-
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#if !defined (ACE_PSOS)
-#define ACE_PSOS
-#endif /* ACE_PSOS */
-
-#if !defined (ACE_PSOSIM)
-#define ACE_PSOSIM
-#endif /* ACE_PSOSIM */
-
-#if !defined (ACE_PSOS_TBD)
-#define ACE_PSOS_TBD
-#endif /* ACE_PSOS_TBD */
-
-// By default, don't include RCS Id strings in object code.
-#if !defined (ACE_USE_RCSID)
-#define ACE_USE_RCSID 0
-#endif /* #if !defined (ACE_USE_RCSID) */
-#define ACE_LACKS_MKFIFO
-
-#define ACE_MALLOC_ALIGN 8
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-qnx-neutrino.h b/ace/config-qnx-neutrino.h
deleted file mode 100644
index df88c27ad52..00000000000
--- a/ace/config-qnx-neutrino.h
+++ /dev/null
@@ -1,146 +0,0 @@
-// $Id$
-
-// The following configuration file is designed to work for Neutrino
-// 2.0 (Beta) with GNU C++ and the POSIX (pthread) threads package.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define _POSIX_C_SOURCE 199506
-#define _QNX_SOURCE
-
-// These constants are in i386-nto/include/limits.h, but egcs
-// picks up its own limits.h instead:
-#define _POSIX_NAME_MAX 14 /* Max bytes in a filename */
-#define _POSIX_PATH_MAX 256 /* Num. bytes in pathname (excl. NULL) */
-
-// gcc can do inline
-#if __GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 8)
-# if !defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-# endif /* ! __ACE_INLINE__ */
-#endif
-
-#if defined(__OPTIMIZE__)
-# if defined(__X86__)
- // string.h can't be used by ACE with __OPTIMIZE__.
-# undef __OPTIMIZE__
-# include <string.h>
-# define __OPTIMIZE__
-# endif /* __X86__ */
-#endif /* __OPTIMIZE__ */
-
-#include "ace/config-g++-common.h"
-
-// The following defines the Neutrino compiler.
-// gcc should know to call g++ as necessary
-#ifdef __GNUC__
-# define ACE_CC_NAME "gcc"
-#else
-# define ACE_CC_NAME "NTO compiler ??"
-#endif
-
-// /usr/nto/include/float.h defines
-// FLT_MAX_EXP 127
-// DBL_MAX_EXP 1023
-// ace expects 128 & 1024 respectively
-// to set the following macros in ace/Basic_Types.h
-// These macros are:
-// #define ACE_SIZEOF_DOUBLE 8
-// #define ACE_SIZEOF_FLOAT 4
-
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-#define ACE_HAS_4_4BSD_SENDMSG_RECVMSG
-#define ACE_HAS_ALLOCA
-#define ACE_HAS_ALLOCA_H
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-#define ACE_HAS_CLOCK_GETTIME
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#define ACE_HAS_DIRENT
-#define ACE_HAS_GETPAGESIZE
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-#define ACE_HAS_INLINED_OSCALLS
-#define ACE_HAS_IP_MULTICAST
-#define ACE_HAS_MSG
-#define ACE_HAS_MT_SAFE_MKTIME
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_POSIX_SEM
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_STD
-#define ACE_HAS_PTHREAD_SIGMASK
-#define ACE_HAS_P_READ_WRITE
-#define ACE_HAS_REENTRANT_FUNCTIONS
-#define ACE_HAS_SELECT_H
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_SIGISMEMBER_BUG
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_SIG_MACROS
-#define ACE_HAS_SIN_LEN
-#define ACE_HAS_SIZET_SOCKET_LEN
-#define ACE_HAS_SSIZE_T
-#define ACE_HAS_STRERROR
-#define ACE_HAS_SVR4_GETTIMEOFDAY
-#define ACE_HAS_TERM_IOCTLS
-#define ACE_HAS_THREADS
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_HAS_THR_C_DEST
-#define ACE_HAS_THR_C_FUNC
-#define ACE_HAS_TIMEZONE_GETTIMEOFDAY
-#define ACE_HAS_UALARM
-#define ACE_HAS_UCONTEXT_T
-#define ACE_HAS_VOIDPTR_MMAP
-#define ACE_HAS_VOIDPTR_SOCKOPT
-#define ACE_LACKS_CMSG_DATA_MEMBER
-#define ACE_LACKS_CONDATTR_PSHARED
-#define ACE_LACKS_CONST_TIMESPEC_PTR
-#define ACE_LACKS_FORK
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_MSGBUF_T
-#define ACE_LACKS_MUTEXATTR_PSHARED
-#define ACE_LACKS_NAMED_POSIX_SEM
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-#define ACE_LACKS_RPC_H
-#define ACE_LACKS_RTTI
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_SBRK
-#define ACE_LACKS_SEEKDIR
-#define ACE_LACKS_SOCKET_BUFSIZ
-#define ACE_LACKS_SOCKETPAIR
-#define ACE_LACKS_SOME_POSIX_PROTOTYPES
-#define ACE_LACKS_STREAM_MODULES
-#define ACE_LACKS_STRRECVFD
-#define ACE_LACKS_SYSCALL
-#define ACE_LACKS_SYSTIME_H
-#define ACE_LACKS_SYSV_MSG_H
-#define ACE_LACKS_SYSV_SHMEM
-#define ACE_LACKS_TCP_NODELAY
-#define ACE_LACKS_TELLDIR
-#define ACE_LACKS_TIMESPEC_T
-#define ACE_LACKS_TRUNCATE
-#define ACE_LACKS_T_ERRNO
-#define ACE_LACKS_UALARM_PROTOTYPE
-#define ACE_LACKS_UCONTEXT_H
-#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
-#define ACE_LACKS_U_LONGLONG_T
-#define ACE_MT_SAFE 1
-#define ACE_NEEDS_FUNC_DEFINITIONS
-#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 64000
-#define ACE_TEMPLATES_REQUIRE_SOURCE
-#define ACE_THR_PRI_FIFO_DEF 10
-#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
-#define ACE_HAS_SIGTIMEDWAIT
-#define ACE_HAS_SIGSUSPEND
-
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sco-4.2-nothread.h b/ace/config-sco-4.2-nothread.h
deleted file mode 100644
index bb7df289328..00000000000
--- a/ace/config-sco-4.2-nothread.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SCO UNIX
-// version 4.2 without threads.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
- // This config file has not been tested with ACE_HAS_TEMPLATE_SPECIALIZATION.
- // Maybe it will work?
-# undef ACE_HAS_TEMPLATE_SPECIALIZATION
-#endif /* __GNUG__ */
-
-// Compiling for SCO.
-#if !defined (SCO)
-#define SCO
-#endif /* SCO */
-
-#if ! defined (__ACE_INLINE__)
-#define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_DEFAULT_CLOSE_ALL_HANDLES 0
-
-#if defined (SCO) && !defined (MAXPATHLEN)
-#define MAXPATHLEN 1023
-#endif /* SCO */
-
-#define ACE_HAS_SIG_MACROS
-#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
-#define ACE_LACKS_SYSCALL
-#define ACE_LACKS_STRRECVFD
-#define ACE_LACKS_MMAP
-#define ACE_LACKS_SOCKETPAIR
-#define ACE_HAS_SEMUN
-#define ACE_LACKS_MSYNC
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_WRITEV
-#define ACE_LACKS_READV
-#define ACE_NEEDS_FTRUNCATE
-#define ACE_LACKS_RLIMIT
-#define ACE_LACKS_RECVMSG
-#define ACE_LACKS_SENDMSG
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform supports recvmsg and sendmsg.
-//#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-//#define ACE_HAS_SYSCALL_H
-
-// Fixes a problem with HP/UX not wrapping the mmap(2) header files
-// with extern "C".
-//#define ACE_HAS_BROKEN_MMAP_H
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Header files lack t_errno for ACE_TLI.
-//#define ACE_LACKS_T_ERRNO
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Compiler supports the ssize_t typedef.
-//#define ACE_HAS_SSIZE_T
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// ???
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// HP/UX has an undefined syscall for GETRUSAGE...
-//#define ACE_HAS_SYSCALL_GETRUSAGE
-
-// Note, this only works if the flag is set above!
-//#define ACE_HAS_GETRUSAGE
-
-// Platform uses int for select() rather than fd_set.
-#define ACE_SELECT_USES_INT
-
-// Platform has prototypes for ACE_TLI.
-//#define ACE_HAS_TLI_PROTOTYPES
-// Platform has the XLI version of ACE_TLI.
-// #define ACE_HAS_XLI
-
-#define ACE_HAS_GNU_CSTRING_H
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-#define ACE_HAS_DIRENT
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sco-5.0.0-fsu-pthread.h b/ace/config-sco-5.0.0-fsu-pthread.h
deleted file mode 100644
index 2c873f48c87..00000000000
--- a/ace/config-sco-5.0.0-fsu-pthread.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#include "ace/config-g++-common.h"
-#include "ace/config-sco-5.0.0.h"
-#include "ace/config-fsu-pthread.h"
-
-#define ACE_HAS_GNU_CSTRING_H
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sco-5.0.0-mit-pthread.h b/ace/config-sco-5.0.0-mit-pthread.h
deleted file mode 100644
index 70ce1167694..00000000000
--- a/ace/config-sco-5.0.0-mit-pthread.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SCO UNIX
-// version 5.0 with MIT pthreads.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if !defined (__ACE_INLINE__)
-#define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
- // This config file has not been tested with ACE_HAS_TEMPLATE_SPECIALIZATION.
- // Maybe it will work?
-# undef ACE_HAS_TEMPLATE_SPECIALIZATION
-#endif /* __GNUG__ */
-
-// Compiling for SCO.
-#if !defined (SCO)
-#define SCO
-#define _SVID3
-#endif /* SCO */
-
-#define ACE_DEFAULT_CLOSE_ALL_HANDLES 0
-#define ACE_HAS_SIG_MACROS
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#if defined (SCO) && !defined (MAXPATHLEN)
-#define MAXPATHLEN 1023
-#endif /* SCO */
-
-#define ACE_LACKS_PWD_FUNCTIONS
-#define ACE_HAS_BIG_FD_SET
-
-//#define ACE_LACKS_SYSCALL
-//#define ACE_LACKS_STRRECVFD
-//#define ACE_NEEDS_FTRUNCATE
-#define ACE_LACKS_RLIMIT
-#define ACE_LACKS_MADVISE
-
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-#define ACE_HAS_NONCONST_MSGSND
-// #define ACE_LACKS_POSIX_PROTOTYPES
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports Term Ioctls
-#define ACE_HAS_TERM_IOCTLS
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-//#define ACE_HAS_SYSCALL_H
-
-// Fixes a problem with HP/UX not wrapping the mmap(2) header files
-// with extern "C".
-//#define ACE_HAS_BROKEN_MMAP_H
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Header files lack t_errno for ACE_TLI.
-//#define ACE_LACKS_T_ERRNO
-
-// Compiler/platform supports poll().
-// #define ACE_HAS_POLL
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Compiler supports the ssize_t typedef.
-//#define ACE_HAS_SSIZE_T
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// ???
-// #define ACE_HAS_SUNOS4_GETTIMEOFDAY
-#define ACE_HAS_TIMEZONE_GETTIMEOFDAY
-
-// HP/UX has an undefined syscall for GETRUSAGE...
-//#define ACE_HAS_SYSCALL_GETRUSAGE
-
-// Note, this only works if the flag is set above!
-//#define ACE_HAS_GETRUSAGE
-
-// Platform uses int for select() rather than fd_set.
-#define ACE_HAS_SELECT_H
-
-// Platform has prototypes for ACE_TLI.
-#define ACE_HAS_TLI
-//#define ACE_HAS_SVR4_TLI
-#define ACE_HAS_T_OPMGMT
-#define ACE_HAS_TLI_PROTOTYPES
-#define ACE_HAS_TIMOD_H
-#define ACE_HAS_TIUSER_H
-#define ACE_LACKS_T_ERRNO
-
-// Platform has the XLI version of ACE_TLI.
-// #define ACE_HAS_XLI
-
-#define ACE_HAS_GNU_CSTRING_H
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-#define ACE_LACKS_SYSTIME_H
-#define ACE_HAS_INLINED_OSCALLS
-
-#define ACE_HAS_STRBUF_T
-#define ACE_HAS_STREAMS
-//#define ACE_HAS_STREAM_PIPES
-#define ACE_HAS_IP_MULTICAST
-
-// Threads
-#define ACE_HAS_THREADS
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_HAS_PTHREADS
-#define ACE_HAS_PTHREADS_STD
-#define ACE_LACKS_PTHREAD_CANCEL
-#define ACE_HAS_SIGWAIT
-//#define ACE_HAS_PTHREAD_YIELD_VOID_PTR
-//#define ACE_HAS_PTHREAD_ATTR_INIT
-//#define ACE_HAS_PTHREAD_ATTR_DESTROY
-#define ACE_LACKS_THREAD_PROCESS_SCOPING
-//#define ACE_LACKS_THREAD_STACK_ADDR
-// If ACE doesn't compile due to the lack of these methods, please
-// send email to schmidt@cs.wustl.edu reporting this.
-// #define ACE_LACKS_CONDATTR_PSHARED
-// #define ACE_LACKS_MUTEXATTR_PSHARED
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_SETSCHED
-#define ACE_HAS_POSIX_TIME
-
-#include <pthread.h>
-#include <sys/regset.h>
-
-#define ACE_LACKS_TIMEDWAIT_PROTOTYPES
-#define ACE_HAS_RECV_TIMEDWAIT
-#define ACE_HAS_RECVFROM_TIMEDWAIT
-#define ACE_HAS_RECVMSG_TIMEDWAIT
-#define ACE_HAS_SEND_TIMEDWAIT
-#define ACE_HAS_SENDTO_TIMEDWAIT
-#define ACE_HAS_SENDMSG_TIMEDWAIT
-#define ACE_HAS_READ_TIMEDWAIT
-#define ACE_HAS_READV_TIMEDWAIT
-#define ACE_HAS_WRITE_TIMEDWAIT
-#define ACE_HAS_WRITEV_TIMEDWAIT
-#define ACE_HAS_DIRENT
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sco-5.0.0-nothread.h b/ace/config-sco-5.0.0-nothread.h
deleted file mode 100644
index ca241adbd1d..00000000000
--- a/ace/config-sco-5.0.0-nothread.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#include "ace/config-g++-common.h"
-#include "ace/config-sco-5.0.0.h"
-
-#define ACE_HAS_GNU_CSTRING_H
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sco-5.0.0.h b/ace/config-sco-5.0.0.h
deleted file mode 100644
index b8a2b738182..00000000000
--- a/ace/config-sco-5.0.0.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#ifndef ACE_CONFIG_SCO_5_0_0_H
-#define ACE_CONFIG_SCO_5_0_0_H
-#include "ace/pre.h"
-
-// Compiling for SCO.
-#if !defined (SCO)
-#define SCO
-#endif /* SCO */
-
-#if defined (SCO) && !defined (MAXPATHLEN)
-#define MAXPATHLEN 1023
-#endif /* SCO */
-
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_SIG_MACROS
-#define ACE_LACKS_CONST_TIMESPEC_PTR
-#define ACE_LACKS_SYSCALL
-#define ACE_LACKS_STRRECVFD
-#define ACE_NEEDS_FTRUNCATE
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-
-#define ACE_DEFAULT_CLOSE_ALL_HANDLES 0
-
-// Compiler doesn't support static data member templates.
-//#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-#define ACE_HAS_NONCONST_MSGSND
-#define ACE_HAS_BIG_FD_SET
-// #define ACE_LACKS_POSIX_PROTOTYPES
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports Term Ioctls
-#define ACE_HAS_TERM_IOCTLS
-
-// Compiler/platform contains the <sys/syscall.h> file.
-//#define ACE_HAS_SYSCALL_H
-
-// Fixes a problem with HP/UX not wrapping the mmap(2) header files
-// with extern "C".
-//#define ACE_HAS_BROKEN_MMAP_H
-
-// Prototypes for both signal() and struct sigaction are consistent.
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Header files lack t_errno for ACE_TLI.
-//#define ACE_LACKS_T_ERRNO
-
-// Compiler/platform supports poll().
-// #define ACE_HAS_POLL
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Compiler supports the ssize_t typedef.
-//#define ACE_HAS_SSIZE_T
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-#define ACE_HAS_TIMEZONE_GETTIMEOFDAY
-
-// HP/UX has an undefined syscall for GETRUSAGE...
-//#define ACE_HAS_SYSCALL_GETRUSAGE
-
-// Note, this only works if the flag is set above!
-//#define ACE_HAS_GETRUSAGE
-
-// Platform uses int for select() rather than fd_set.
-#define ACE_HAS_SELECT_H
-
-// Platform has prototypes for ACE_TLI.
-#define ACE_HAS_TLI_PROTOTYPES
-// Platform has the XLI version of ACE_TLI.
-// #define ACE_HAS_XLI
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-#define ACE_LACKS_SYSTIME_H
-#define ACE_LACKS_STRCASECMP
-
-// #define ACE_HAS_POSIX_TIME
-#define ACE_HAS_IP_MULTICAST
-#define ACE_HAS_DIRENT
-#define ACE_LACKS_READDIR_R
-#define ACE_HAS_GPERF
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_SCO_5_0_0_H */
diff --git a/ace/config-sunos4-g++.h b/ace/config-sunos4-g++.h
deleted file mode 100644
index 23924199d72..00000000000
--- a/ace/config-sunos4-g++.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// for SunOS4 platforms using the GNU g++ compiler
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if ! defined (__ACE_INLINE__)
-#define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
-// this must appear before its #include.
-#define ACE_HAS_STRING_CLASS
-
-#include "ace/config-g++-common.h"
-// This config file has not been tested with ACE_HAS_TEMPLATE_SPECIALIZATION.
-// Maybe it will work?
-#undef ACE_HAS_TEMPLATE_SPECIALIZATION
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_LACKS_SYSTIME_H
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-
-#define ACE_HAS_CHARPTR_SPRINTF
-#define ACE_HAS_UNION_WAIT
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Compiler/platform supports strerror ().
-// #define ACE_HAS_STRERROR
-#define ACE_HAS_SYS_ERRLIST
-
-// Header files lack t_errno for ACE_TLI.
-// #define ACE_LACKS_T_ERRNO
-
-// Compiler/platform uses old malloc()/free() prototypes (ugh).
-#define ACE_HAS_OLD_MALLOC
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler/platform supports struct strbuf
-#define ACE_HAS_STRBUF_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-// Platform supports ACE_TLI tiuser header.
-// #define ACE_HAS_TIUSER_H
-
-// Platform has ACE_TLI.
-// #define ACE_HAS_TLI
-
-#define ACE_LACKS_U_LONGLONG_T
-
-#define ACE_LACKS_DIFFTIME
-#define ACE_HAS_DIRENT
-
-// 10 millisecond fudge factor to account for Solaris timers...
-#if !defined (ACE_TIMER_SKEW)
-#define ACE_TIMER_SKEW 1000 * 10
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_SUNOS4_SIGNAL_T
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6))
-#define ACE_HAS_SYSENT_H
-#endif
-#define ACE_HAS_ALLOCA
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-#define ACE_HAS_SVR4_GETTIMEOFDAY
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos4-lucid3.2.h b/ace/config-sunos4-lucid3.2.h
deleted file mode 100644
index fe723d7db6b..00000000000
--- a/ace/config-sunos4-lucid3.2.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work
-// for SunOS4 platforms using the Lucid 3.2 compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_SYS_ERRLIST
-#define ACE_HAS_CHARPTR_SPRINTF
-#define ACE_HAS_UNION_WAIT
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Compiler/platform supports alloca()
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Header files lack t_errno for ACE_TLI.
-// #define ACE_LACKS_T_ERRNO
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler/platform supports struct strbuf
-#define ACE_HAS_STRBUF_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Compiler/platform supports strerror ().
-// #define ACE_HAS_STRERROR
-
-// SunOS 4 style prototype.
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Platform provides <sysent.h> header.
-#define ACE_HAS_SYSENT_H
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Platform supports ACE_TLI tiuser header.
-// #define ACE_HAS_TIUSER_H
-
-// Platform has ACE_TLI.
-// #define ACE_HAS_TLI
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-#define ACE_LACKS_U_LONGLONG_T
-
-#define ACE_LACKS_DIFFTIME
-
-// 10 millisecond fudge factor to account for Solaris timers...
-#if !defined (ACE_TIMER_SKEW)
-#define ACE_TIMER_SKEW 1000 * 10
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos4-sun3.x.h b/ace/config-sunos4-sun3.x.h
deleted file mode 100644
index 9115692b70b..00000000000
--- a/ace/config-sunos4-sun3.x.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SunOS4
-// platforms using the SunC++ 3.0.x compiler.
-
-#ifndef ACE_CONFIG_H
-
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_LACKS_POSIX_PROTOTYPES
-#define ACE_HAS_UNION_WAIT
-#define ACE_HAS_SPARCWORKS_401_SIGNALS
-
-#define ACE_CONFIG_H
-#define ACE_HAS_CHARPTR_SPRINTF
-#define ACE_HAS_SYS_ERRLIST
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Header files lack t_errno for ACE_TLI.
-// #define ACE_LACKS_T_ERRNO
-
-// Compiler/platform uses old malloc()/free() prototypes (ugh).
-#define ACE_HAS_OLD_MALLOC
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler/platform supports struct strbuf
-#define ACE_HAS_STRBUF_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// SunOS 4 style prototype.
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Platform supports ACE_TLI tiuser header.
-// #define ACE_HAS_TIUSER_H
-
-// Platform has ACE_TLI.
-// #define ACE_HAS_TLI
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-#define ACE_LACKS_SIGNED_CHAR
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-#define ACE_LACKS_U_LONGLONG_T
-
-#define ACE_LACKS_DIFFTIME
-
-// 10 millisecond fudge factor to account for Solaris timers...
-#if !defined (ACE_TIMER_SKEW)
-#define ACE_TIMER_SKEW 1000 * 10
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos4-sun4.1.4.h b/ace/config-sunos4-sun4.1.4.h
deleted file mode 100644
index 4d070ae887e..00000000000
--- a/ace/config-sunos4-sun4.1.4.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SunOS4.1.4
-// platforms using the SunC++ 4.x compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_CHARPTR_SPRINTF
-#define ACE_LACKS_SYSTIME_H
-#define ACE_HAS_UNION_WAIT
-
-// Special addition to handle sunOS 4.1 which is unable to
-// handle POSIX Prototypes !
-#define ACE_LACKS_POSIX_PROTOTYPES
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Compiler/platform supports strerror ().
-// #define ACE_HAS_STRERROR
-#define ACE_HAS_SYS_ERRLIST
-
-// Header files lack t_errno for ACE_TLI.
-// #define ACE_LACKS_T_ERRNO
-
-// Compiler/platform uses old malloc()/free() prototypes (ugh).
-#define ACE_HAS_OLD_MALLOC
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler has brain-damaged SPARCwork signal prototype...
-#define ACE_HAS_SPARCWORKS_401_SIGNALS
-
-// Compiler/platform supports struct strbuf
-#define ACE_HAS_STRBUF_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// SunOS 4 style prototype.
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Platform supports ACE_TLI tiuser header.
-// #define ACE_HAS_TIUSER_H
-
-// Platform has ACE_TLI.
-// #define ACE_HAS_TLI
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-#define ACE_LACKS_SIGNED_CHAR
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-#define ACE_LACKS_U_LONGLONG_T
-
-#define ACE_LACKS_DIFFTIME
-
-// 10 millisecond fudge factor to account for Solaris timers...
-#if !defined (ACE_TIMER_SKEW)
-#define ACE_TIMER_SKEW 1000 * 10
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos4-sun4.x-orbix.h b/ace/config-sunos4-sun4.x-orbix.h
deleted file mode 100644
index 8c5266605b7..00000000000
--- a/ace/config-sunos4-sun4.x-orbix.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work
-// for SunOS4 platforms using the SunC++ 4.x compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_CHARPTR_SPRINTF
-#define ACE_HAS_UNION_WAIT
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// ACE sparcworks 4.01 signal handling under SunOS
-#define ACE_HAS_SPARCWORKS_401_SIGNALS
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Platform contains Orbix CORBA implementation.
-#define ACE_HAS_ORBIX 1
-
-// Compiler/platform supports strerror ().
-// #define ACE_HAS_STRERROR
-#define ACE_HAS_SYS_ERRLIST
-
-// Header files lack t_errno for ACE_TLI.
-// #define ACE_LACKS_T_ERRNO
-
-// Compiler/platform uses old malloc()/free() prototypes (ugh).
-#define ACE_HAS_OLD_MALLOC
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler has brain-damaged SPARCwork signal prototype...
-#define ACE_HAS_SPARCWORKS_401_SIGNALS
-
-// Compiler/platform supports struct strbuf
-#define ACE_HAS_STRBUF_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// SunOS 4 style prototype.
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Platform supports ACE_TLI tiuser header.
-// #define ACE_HAS_TIUSER_H
-
-// Platform has ACE_TLI.
-// #define ACE_HAS_TLI
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-#define ACE_LACKS_SIGNED_CHAR
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-#define ACE_LACKS_U_LONGLONG_T
-
-#define ACE_LACKS_DIFFTIME
-
-// 10 millisecond fudge factor to account for Solaris timers...
-#if !defined (ACE_TIMER_SKEW)
-#define ACE_TIMER_SKEW 1000 * 10
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos4-sun4.x.h b/ace/config-sunos4-sun4.x.h
deleted file mode 100644
index a5f1fd23063..00000000000
--- a/ace/config-sunos4-sun4.x.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work
-// for SunOS4 platforms using the SunC++ 4.x compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define ACE_LACKS_SYSTIME_H
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-
-#define ACE_HAS_CHARPTR_SPRINTF
-#define ACE_LACKS_POSIX_PROTOTYPES
-// #define ACE_HAS_UNION_WAIT
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Compiler/platform has the getrusage() system call.
-#define ACE_HAS_GETRUSAGE
-
-// Compiler/platform supports strerror ().
-// #define ACE_HAS_STRERROR
-#define ACE_HAS_SYS_ERRLIST
-
-// Header files lack t_errno for ACE_TLI.
-// #define ACE_LACKS_T_ERRNO
-
-// Compiler/platform uses old malloc()/free() prototypes (ugh).
-#define ACE_HAS_OLD_MALLOC
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-// Compiler/platform supports poll().
-#define ACE_HAS_POLL
-
-// Compiler/platform defines a union semun for SysV shared memory.
-#define ACE_HAS_SEMUN
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler has brain-damaged SPARCwork signal prototype...
-#define ACE_HAS_SPARCWORKS_401_SIGNALS
-
-// Compiler/platform supports struct strbuf
-#define ACE_HAS_STRBUF_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// SunOS 4 style prototype.
-#define ACE_HAS_SUNOS4_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Platform supports ACE_TLI tiuser header.
-// #define ACE_HAS_TIUSER_H
-
-// Platform has ACE_TLI.
-// #define ACE_HAS_TLI
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-#define ACE_LACKS_SIGNED_CHAR
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-#define ACE_LACKS_U_LONGLONG_T
-
-#define ACE_LACKS_DIFFTIME
-
-// 10 millisecond fudge factor to account for Solaris timers...
-#if !defined (ACE_TIMER_SKEW)
-#define ACE_TIMER_SKEW 1000 * 10
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-#define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos5.4-centerline-2.x.h b/ace/config-sunos5.4-centerline-2.x.h
deleted file mode 100644
index a36db3e17af..00000000000
--- a/ace/config-sunos5.4-centerline-2.x.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SunOS 5.4
-// platforms using the Centerline 2.x C++ compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#define ACE_HAS_TEMPLATE_SPECIALIZATION
-
-// Platform supports pread() and pwrite()
-#define ACE_HAS_P_READ_WRITE
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Sun has the wrong prototype for sendmsg.
-#define ACE_HAS_BROKEN_SENDMSG
-
-// The SunOS 5.x version of rand_r is inconsistent with the header files...
-#define ACE_HAS_BROKEN_RANDR
-
-// Platform supports system configuration information.
-#define ACE_HAS_SYSINFO
-
-// Platform supports the POSIX regular expression library
-#define ACE_HAS_REGEX
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Platform has terminal ioctl flags like TCGETS and TCSETS.
-#define ACE_HAS_TERM_IOCTLS
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform supports SunOS high resolution timers.
-#define ACE_HAS_HI_RES_TIMER
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// Platform supports the /proc file system.
-#define ACE_HAS_PROC_FS
-
-// Platform supports the prusage_t struct.
-#define ACE_HAS_PRUSAGE_T
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes.
-#define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Andreas Ueltschi tells me this is a good thing...
-#define ACE_HAS_SVR5_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_SVR4_SIGNAL_T
-
-// Platform lacks pthread_sigaction
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
-#define ACE_HAS_SVR4_TLI
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform supports sys_siglist array.
-#define ACE_HAS_SYS_SIGLIST
-
-/* Turn off the following defines if you want to disable threading. */
-// Compile using multi-thread libraries.
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-// Platform supports threads.
-#define ACE_HAS_THREADS
-
-// Platform supports Solaris threads.
-#define ACE_HAS_STHREADS
-
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-/* end threading defines */
-
-#define ACE_HAS_PRIOCNTL
-#define ACE_NEEDS_LWP_PRIO_SET
-
-// Platform supports ACE_TLI timod STREAMS module.
-#define ACE_HAS_TIMOD_H
-
-// Platform supports ACE_TLI tiuser header.
-#define ACE_HAS_TIUSER_H
-
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-
-// Platform supports ACE_TLI.
-#define ACE_HAS_TLI
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-// 10 millisecond fudge factor to account for Solaris timers...
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 1000 * 10
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-#define ACE_HAS_IDTYPE_T
-#define ACE_HAS_DIRENT
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos5.4-g++.h b/ace/config-sunos5.4-g++.h
deleted file mode 100644
index 648557989db..00000000000
--- a/ace/config-sunos5.4-g++.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SunOS 5.4
-// platforms using the GNU g++ compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
-// this must appear before its #include.
-#define ACE_HAS_STRING_CLASS
-
-#include "ace/config-g++-common.h"
-#define ACE_HAS_GNU_CSTRING_H
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Platform supports pread() and pwrite()
-#define ACE_HAS_P_READ_WRITE
-
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-#define ACE_HAS_TERM_IOCTLS
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Sun has the wrong prototype for sendmsg.
-#define ACE_HAS_BROKEN_SENDMSG
-
-// The SunOS 5.x version of rand_r is inconsistent with the header files...
-#define ACE_HAS_BROKEN_RANDR
-
-// Platform supports system configuration information.
-#define ACE_HAS_SYSINFO
-
-// Platform supports the POSIX regular expression library
-#define ACE_HAS_REGEX
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform supports SunOS high resolution timers.
-#define ACE_HAS_HI_RES_TIMER
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Compiler/platform supports alloca()
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// Platform supports the /proc file system.
-#define ACE_HAS_PROC_FS
-
-// Platform supports the prusage_t struct.
-#define ACE_HAS_PRUSAGE_T
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes.
-#define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform supports SVR4 gettimeofday() prototype.
-#define ACE_HAS_SVR4_GETTIMEOFDAY
-
-// Platform lacks pthread_sigaction
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-// Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff)...
-#define ACE_HAS_SVR4_TLI
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform supports sys_siglist array.
-#define ACE_HAS_SYS_SIGLIST
-
-/* Turn off the following defines if you want to disable threading. */
-// Compile using multi-thread libraries.
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-# if !defined (_REENTRANT)
-# define _REENTRANT
-# endif /* _REENTRANT */
-#endif /* !ACE_MT_SAFE */
-
-// Platform supports Solaris threads.
-#define ACE_HAS_STHREADS
-
-// Platform supports threads.
-#define ACE_HAS_THREADS
-
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-/* end threading defines */
-
-#define ACE_HAS_PRIOCNTL
-#define ACE_NEEDS_LWP_PRIO_SET
-
-// Platform supports TLI timod STREAMS module.
-#define ACE_HAS_TIMOD_H
-
-// Platform supports TLI tiuser header.
-#define ACE_HAS_TIUSER_H
-
-// Platform provides TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-
-// Platform supports TLI.
-#define ACE_HAS_TLI
-
-// Use the poll() event demultiplexor rather than select().
-//#define ACE_USE_POLL
-
-// 10 millisecond fudge factor to account for Solaris timers...
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 1000 * 10
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-#define ACE_HAS_IDTYPE_T
-#define ACE_HAS_GPERF
-#define ACE_HAS_DIRENT
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos5.4-sunc++-4.x-orbix.h b/ace/config-sunos5.4-sunc++-4.x-orbix.h
deleted file mode 100644
index fa44d1521e5..00000000000
--- a/ace/config-sunos5.4-sunc++-4.x-orbix.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SunOS 5.4
-// platforms using the SunC++ 4.0.x compiler. This works with the
-// MT-Orbix CORBA IDL compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#define ACE_HAS_TEMPLATE_SPECIALIZATION
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Platform supports pread() and pwrite()
-#define ACE_HAS_P_READ_WRITE
-
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Sun has the wrong prototype for sendmsg.
-#define ACE_HAS_BROKEN_SENDMSG
-
-// The SunOS 5.x version of rand_r is inconsistent with the header files...
-#define ACE_HAS_BROKEN_RANDR
-
-// Platform supports system configuration information.
-#define ACE_HAS_SYSINFO
-
-// Platform supports the POSIX regular expression library
-#define ACE_HAS_REGEX
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Platform has terminal ioctl flags like TCGETS and TCSETS.
-#define ACE_HAS_TERM_IOCTLS
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform supports SunOS high resolution timers.
-#define ACE_HAS_HI_RES_TIMER
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Compiler/platform supports alloca()
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-
-// Platform contains the Orbix CORBA implementation.
-#define ACE_HAS_ORBIX 1
-
-// Platform contains the multi-threaded Orbix CORBA implementation.
-// #define ACE_HAS_MT_ORBIX
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// Platform supports the /proc file system.
-#define ACE_HAS_PROC_FS
-
-// Platform supports the prusage_t struct.
-#define ACE_HAS_PRUSAGE_T
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes.
-#define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform supports SVR4 gettimeofday() prototype.
-#define ACE_HAS_SVR4_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_SVR4_SIGNAL_T
-
-// Platform lacks pthread_sigaction
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
-#define ACE_HAS_SVR4_TLI
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform supports sys_siglist array.
-#define ACE_HAS_SYS_SIGLIST
-
-/* Turn off the following defines if you want to disable threading. */
-// Compile using multi-thread libraries.
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-// Platform supports Solaris threads.
-#define ACE_HAS_STHREADS
-
-// Platform supports threads.
-#define ACE_HAS_THREADS
-
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-/* end threading defines */
-
-#define ACE_HAS_PRIOCNTL
-#define ACE_NEEDS_LWP_PRIO_SET
-
-// Platform supports ACE_TLI timod STREAMS module.
-#define ACE_HAS_TIMOD_H
-
-// Platform supports ACE_TLI tiuser header.
-#define ACE_HAS_TIUSER_H
-
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-
-// Platform supports ACE_TLI.
-#define ACE_HAS_TLI
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-#define ACE_LACKS_SIGNED_CHAR
-
-// Use the poll() event demultiplexor rather than select().
-//#define ACE_USE_POLL
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-// 10 millisecond fudge factor to account for Solaris timers...
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 1000 * 10
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-#define ACE_HAS_IDTYPE_T
-#define ACE_HAS_GPERF
-#define ACE_HAS_DIRENT
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos5.4-sunc++-4.x.h b/ace/config-sunos5.4-sunc++-4.x.h
deleted file mode 100644
index 76392130c56..00000000000
--- a/ace/config-sunos5.4-sunc++-4.x.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SunOS 5.4
-// platforms using the SunC++ 4.0.x compiler.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#define ACE_HAS_TEMPLATE_SPECIALIZATION
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Platform supports pread() and pwrite()
-#define ACE_HAS_P_READ_WRITE
-
-#define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// Sun has the wrong prototype for sendmsg.
-#define ACE_HAS_BROKEN_SENDMSG
-
-// The SunOS 5.x version of rand_r is inconsistent with the header files...
-#define ACE_HAS_BROKEN_RANDR
-
-// Platform supports system configuration information.
-#define ACE_HAS_SYSINFO
-
-// Platform supports the POSIX regular expression library.
-#define ACE_HAS_REGEX
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Platform has terminal ioctl flags like TCGETS and TCSETS.
-#define ACE_HAS_TERM_IOCTLS
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Compiler/platform supports SunOS high resolution timers.
-#define ACE_HAS_HI_RES_TIMER
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Compiler/platform supports alloca()
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// Platform supports the /proc file system.
-#define ACE_HAS_PROC_FS
-
-// Platform supports the prusage_t struct.
-#define ACE_HAS_PRUSAGE_T
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes.
-#define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform supports SVR4 gettimeofday() prototype.
-#define ACE_HAS_SVR4_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 signal typedef.
-#define ACE_HAS_SVR4_SIGNAL_T
-
-// Platform lacks pthread_sigaction
-#define ACE_LACKS_PTHREAD_THR_SIGSETMASK
-
-// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
-#define ACE_HAS_SVR4_TLI
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform supports sys_siglist array.
-#define ACE_HAS_SYS_SIGLIST
-
-/* Turn off the following defines if you want to disable threading. */
-// Compile using multi-thread libraries.
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-// Platform supports Solaris threads.
-#define ACE_HAS_STHREADS
-
-// Platform supports threads.
-#define ACE_HAS_THREADS
-
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// Platform supports reentrant functions (i.e., all the POSIX *_r functions).
-#define ACE_HAS_REENTRANT_FUNCTIONS
-
-/* end threading defines */
-
-#define ACE_HAS_PRIOCNTL
-#define ACE_NEEDS_LWP_PRIO_SET
-
-// Reactor detects deadlock
-// #define ACE_REACTOR_HAS_DEADLOCK_DETECTION
-
-// Platform supports ACE_TLI timod STREAMS module.
-#define ACE_HAS_TIMOD_H
-
-// Platform supports ACE_TLI tiuser header.
-#define ACE_HAS_TIUSER_H
-
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-
-// Platform supports ACE_TLI.
-#define ACE_HAS_TLI
-
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-#define ACE_LACKS_SIGNED_CHAR
-
-// Use the poll() event demultiplexor rather than select().
-//#define ACE_USE_POLL
-
-#define ACE_NEEDS_DEV_IO_CONVERSION
-
-// 10 millisecond fudge factor to account for Solaris timers...
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 1000 * 10
-#endif /* ACE_TIMER_SKEW */
-
-// Turns off the tracing feature.
-// #define ACE_NTRACE 0
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-#define ACE_HAS_IDTYPE_T
-
-#define ACE_HAS_GPERF
-#define ACE_HAS_DIRENT
-
-# if defined (ACE_HAS_EXCEPTIONS)
- // If exceptions are enabled and we are using Sun/CC then
- // <operator new> throws an exception instead of returning 0.
-# define ACE_NEW_THROWS_EXCEPTIONS
-# endif /* ACE_HAS_EXCEPTIONS */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos5.5.h b/ace/config-sunos5.5.h
deleted file mode 100644
index 9d80a32857e..00000000000
--- a/ace/config-sunos5.5.h
+++ /dev/null
@@ -1,363 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This configuration file is designed to work for SunOS 5.5 platforms
-// using the following compilers:
-// * Sun C++ 4.2 and later (including 5.x), patched as noted below
-// * g++ 2.7.2 and later, including egcs
-// * Green Hills 1.8.8 and later
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// Compiler version-specific settings:
-#if defined (__SUNPRO_CC)
-# if (__SUNPRO_CC < 0x410)
- // The following might not be necessary, but I can't tell: my build
- // with Sun C++ 4.0.1 never completes.
-# define ACE_NEEDS_DEV_IO_CONVERSION
-# elif (__SUNPRO_CC >= 0x420)
-# define ACE_HAS_ANSI_CASTS
-# if (__SUNPRO_CC >= 0x500)
-// Sun C++ 5.0 supports the `using' and `typename' keywords.
-# define ACE_HAS_TYPENAME_KEYWORD
- /* Explicit instantiation requires the -instances=explicit
- CCFLAG. It seems to work for the most part, except for:
- 1) Static data members get instantiated multiple times.
- 2) In TAO, the TAO_Unbounded_Sequence vtbl can't be found.
- With CC 5.0, those problems may be fixed. And, this is necessary
- to work around problems with automatic template instantiation. */
-# define ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
-# define ACE_TEMPLATES_REQUIRE_SOURCE
- // If -compat=4 is turned on, the old 4.2 settings for iostreams are used,
- // but the newer, explicit instantiation is used (above)
-# if (__SUNPRO_CC_COMPAT >= 5)
-# define ACE_HAS_USING_KEYWORD
-# define ACE_HAS_STD_TEMPLATE_SPECIALIZATION
-// Note that SunC++ 5.0 doesn't yet appear to support
-// ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION...
-# define ACE_HAS_STANDARD_CPP_LIBRARY 1
-# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
-# define ACE_USES_OLD_IOSTREAMS
-# define ACE_HAS_THR_C_DEST
-# endif
-# if !defined (ACE_HAS_EXCEPTIONS)
- // See /opt/SUNWspro_5.0/SC5.0/include/CC/stdcomp.h:
-# define _RWSTD_NO_EXCEPTIONS 1
-# endif /* ! ACE_HAS_EXCEPTIONS */
-# elif (__SUNPRO_CC == 0x420)
-# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
-# endif /* __SUNPRO_CC >= 0x500 */
-# endif /* __SUNPRO_CC >= 0x420 */
-
-# define ACE_CAST_CONST const
-# define ACE_HAS_HI_RES_TIMER
-# define ACE_HAS_SIG_C_FUNC /* Sun CC 5.0 needs this, 4.2 doesn't mind. */
-# define ACE_HAS_TEMPLATE_SPECIALIZATION
-# define ACE_HAS_XPG4_MULTIBYTE_CHAR
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF
-# define ACE_LACKS_SIGNED_CHAR
-
- // ACE_HAS_EXCEPTIONS precludes -noex in
- // include/makeinclude/platform_macros.GNU. But beware, we have
- // seen problems with exception handling on multiprocessor
- // UltraSparcs: threaded executables core dump when threads exit.
- // This problem does not seem to appear on single-processor UltraSparcs.
- // And, it is solved with the application of patch
- // 104631-02 "C++ 4.2: Jumbo Patch for C++ 4.2 on Solaris SPARC"
- // to Sun C++ 4.2.
- // To provide optimum performance, ACE_HAS_EXCEPTIONS is disabled by
- // default. It can be enabled by adding "exceptions=1" to the "make"
- // invocation. See include/makeinclude/platform_sunos5_sunc++.GNU
- // for details.
-
-# if defined (ACE_HAS_EXCEPTIONS)
- // If exceptions are enabled and we are using Sun/CC then
- // <operator new> throws an exception instead of returning 0.
-# define ACE_NEW_THROWS_EXCEPTIONS
-# endif /* ACE_HAS_EXCEPTIONS */
-
- /* If you want to disable threading with Sun CC, remove -mt
- from your CFLAGS, e.g., using make threads=0. */
-
-#elif defined (__GNUG__)
- // config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
- // this must appear before its #include.
-# define ACE_HAS_STRING_CLASS
-# include "ace/config-g++-common.h"
-# define ACE_HAS_HI_RES_TIMER
- // Denotes that GNU has cstring.h as standard, to redefine memchr().
-# define ACE_HAS_GNU_CSTRING_H
-# define ACE_HAS_XPG4_MULTIBYTE_CHAR
-
-# if !defined (ACE_MT_SAFE) || ACE_MT_SAFE != 0
- // ACE_MT_SAFE is #defined below, for all compilers.
-# if !defined (_REENTRANT)
- /* If you want to disable threading, comment out the following
- line. Or, add -DACE_MT_SAFE=0 to your CFLAGS, e.g., using
- make threads=0. */
-# define _REENTRANT
-# endif /* _REENTRANT */
-# endif /* !ACE_MT_SAFE */
-
-#elif defined (ghs)
-
-# if !defined (ACE_MT_SAFE) || ACE_MT_SAFE != 0
- // ACE_MT_SAFE is #defined below, for all compilers.
-# if !defined (_REENTRANT)
- /* If you want to disable threading, comment out the following
- line. Or, add -DACE_MT_SAFE=0 to your CFLAGS, e.g., using
- make threads=0. */
-# define _REENTRANT
-# endif /* _REENTRANT */
-# endif /* !ACE_MT_SAFE */
-
-# define ACE_CONFIG_INCLUDE_GHS_COMMON
-# include "ace/config-ghs-common.h"
-
- // To avoid warning about inconsistent declaration between Sun's
- // stdlib.h and Green Hills' ctype.h.
-# include <stdlib.h>
-
- // IOStream_Test never halts with Green Hills 1.8.9.
-# define ACE_LACKS_ACE_IOSTREAM
-
-#elif defined (__KCC) /* KAI compiler */
-
-# define ACE_HAS_ANSI_CASTS
-# include "ace/config-kcc-common.h"
-
-#else /* ! __SUNPRO_CC && ! __GNUG__ && ! ghs */
-# error unsupported compiler in ace/config-sunos5.5.h
-#endif /* ! __SUNPRO_CC && ! __GNUG__ && ! ghs */
-
-#if !defined (__ACE_INLINE__)
-// NOTE: if you have link problems with undefined inline template
-// functions with Sun C++, be sure that the #define of __ACE_INLINE__
-// below is not commented out.
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// Platform supports the POSIX regular expression library.
-// NOTE: please comment out the ACE_HAS_REGEX #define if you
-// have link problems with g++ or egcs on SunOS 5.5.
-#define ACE_HAS_REGEX
-
-// Maximum compensation (10 ms) for early return from timed ::select ().
-#if !defined (ACE_TIMER_SKEW)
-# define ACE_TIMER_SKEW 10 * 1000
-#endif /* ACE_TIMER_SKEW */
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// select()'s timeval arg is not declared as const and may be modified
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-
-// Platform supports pread() and pwrite()
-#define ACE_HAS_P_READ_WRITE
-#define ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS
-#define ACE_HAS_UALARM
-#define ACE_LACKS_UALARM_PROTOTYPE
-
-// Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-
-// Platform supports system configuration information.
-#define ACE_HAS_SYSINFO
-
-// Platform supports recvmsg and sendmsg.
-#define ACE_HAS_MSG
-
-// Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-// Platform has terminal ioctl flags like TCGETS and TCSETS.
-#define ACE_HAS_TERM_IOCTLS
-
-// Compiler/platform correctly calls init()/fini() for shared libraries.
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports POSIX O_NONBLOCK semantics.
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform has correctly prototyped header files.
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Platform supports IP multicast
-#define ACE_HAS_IP_MULTICAST
-
-// Compiler/platform supports alloca()
-#define ACE_HAS_ALLOCA
-
-// Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-
-// Platform contains <poll.h>.
-#define ACE_HAS_POLL
-
-// Platform supports POSIX timers via timestruc_t.
-#define ACE_HAS_POSIX_TIME
-
-// ACE_HAS_CLOCK_GETTIME requires linking with -lposix4.
-#define ACE_HAS_CLOCK_GETTIME
-
-// Platform supports the /proc file system.
-#define ACE_HAS_PROC_FS
-
-// Platform supports the prusage_t struct.
-#define ACE_HAS_PRUSAGE_T
-
-// Compiler/platform defines the sig_atomic_t typedef.
-#define ACE_HAS_SIG_ATOMIC_T
-
-// Platform supports SVR4 extended signals.
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-
-// Compiler/platform provides the sockio.h file.
-#define ACE_HAS_SOCKIO_H
-
-// Compiler supports the ssize_t typedef.
-#define ACE_HAS_SSIZE_T
-
-// Platform supports STREAMS.
-#define ACE_HAS_STREAMS
-
-// Platform supports STREAM pipes.
-#define ACE_HAS_STREAM_PIPES
-
-// Compiler/platform supports strerror ().
-#define ACE_HAS_STRERROR
-
-// Compiler/platform supports struct strbuf.
-#define ACE_HAS_STRBUF_T
-
-// Compiler/platform supports SVR4 dynamic linking semantics.
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-
-// Compiler/platform supports SVR4 gettimeofday() prototype.
-#define ACE_HAS_SVR4_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 ACE_TLI (in particular, T_GETNAME stuff)...
-#define ACE_HAS_SVR4_TLI
-
-// Platform provides <sys/filio.h> header.
-#define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform supports sys_siglist array.
-#define ACE_HAS_SYS_SIGLIST
-
-#if defined (_REENTRANT) || \
- (defined (_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L)) || \
- defined (_POSIX_PTHREAD_SEMANTICS)
- // Compile using multi-thread libraries.
-# define ACE_HAS_THREADS
-
-# if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-# endif /* ACE_MT_SAFE */
-
- // Platform supports POSIX pthreads *and* Solaris threads, by
- // default! If you only want to use POSIX pthreads, add
- // -D_POSIX_PTHREAD_SEMANTICS to your CFLAGS. Or, #define it right
- // here. See the Intro (3) man page for information on
- // -D_POSIX_PTHREAD_SEMANTICS.
-# if defined (_POSIX_PTHREAD_SEMANTICS)
-# define ACE_LACKS_RWLOCK_T
-# else
-# define ACE_HAS_STHREADS
-# endif /* ! _POSIX_PTHREAD_SEMANTICS */
-
-# define ACE_HAS_PTHREADS
-# define ACE_HAS_PTHREADS_STD
- // . . . but only supports SCHED_OTHER scheduling policy
-# define ACE_HAS_ONLY_SCHED_OTHER
-# define ACE_HAS_SIGWAIT
-# define ACE_HAS_SIGTIMEDWAIT
-# define ACE_HAS_SIGSUSPEND
-
- // Compiler/platform has thread-specific storage
-# define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
- // Platform supports reentrant functions (i.e., all the POSIX *_r functions).
-# define ACE_HAS_REENTRANT_FUNCTIONS
-
-# define ACE_NEEDS_LWP_PRIO_SET
-# define ACE_HAS_THR_YIELD
-# define ACE_LACKS_PTHREAD_YIELD
-#endif /* _REENTRANT || _POSIX_C_SOURCE >= 199506L || \
- _POSIX_PTHREAD_SEMANTICS */
-
-# define ACE_HAS_PRIOCNTL
-
-// Platform supports ACE_TLI timod STREAMS module.
-#define ACE_HAS_TIMOD_H
-
-// Platform supports ACE_TLI tiuser header.
-#define ACE_HAS_TIUSER_H
-
-// Platform provides ACE_TLI function prototypes.
-#define ACE_HAS_TLI_PROTOTYPES
-
-// Platform has broken t_error() prototype.
-#define ACE_HAS_BROKEN_T_ERROR
-
-// Platform supports ACE_TLI.
-#define ACE_HAS_TLI
-
-#define ACE_HAS_STRPTIME
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_HAS_GETPAGESIZE 1
-
-#define ACE_HAS_STL_MAP_CONFLICT
-
-// Sieg - gcc 2.95.1 declares queue in stream.h. Might want to change
-// the == to >= to allow for future versions
-#if !( __GNUG__ && (__GNUC__ == 2) && (__GNUC_MINOR__ == 95) )
-#define ACE_HAS_STL_QUEUE_CONFLICT
-#endif /* !( __GNUG__ && (__GNUC__ == 2) && (__GNUC_MINOR__ == 95) ) */
-#define ACE_HAS_IDTYPE_T
-
-#define ACE_HAS_GPERF
-#define ACE_HAS_DIRENT
-#define ACE_HAS_MEMCHR
-
-#if defined (__SUNPRO_CC)
-# define ACE_CC_NAME "SunPro C++"
-# define ACE_CC_MAJOR_VERSION (__SUNPRO_CC >> 8)
-# define ACE_CC_MINOR_VERSION (__SUNPRO_CC & 0x00ff)
-# define ACE_CC_BETA_VERSION (0)
-#elif defined (__GNUG__)
-# define ACE_CC_MAJOR_VERSION __GNUC__
-# define ACE_CC_MINOR_VERSION __GNUC_MINOR__
-# define ACE_CC_BETA_VERSION (0)
-# if __GNUC_MINOR__ >= 90
-# define ACE_CC_NAME "egcs"
-# else
-# define ACE_CC_NAME "g++"
-# endif /* __GNUC_MINOR__ */
-#endif /* __GNUG__ */
-
-#if defined (i386)
-# define ACE_HAS_X86_STAT_MACROS
-#endif /* i386 */
-
-#define ACE_MALLOC_ALIGN 8
-#define ACE_LACKS_SETREUID_PROTOTYPE
-#define ACE_LACKS_SETREGID_PROTOTYPE
-
-#if defined (_LARGEFILE_SOURCE) || (_FILE_OFFSET_BITS==64)
-#undef ACE_HAS_PROC_FS
-#undef ACE_HAS_PRUSAGE_T
-#endif /* (_LARGEFILE_SOURCE) || (_FILE_OFFSET_BITS==64) */
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos5.6.h b/ace/config-sunos5.6.h
deleted file mode 100644
index 85c239302b7..00000000000
--- a/ace/config-sunos5.6.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SunOS 5.6
-// platforms using the SunC++ 4.x or g++ compilers.
-
-#ifndef ACE_CONFIG_H
-
-// ACE_CONFIG_H is defined by one of the following #included headers.
-
-// #include the SunOS 5.5 config file, then add SunOS 5.6 updates below.
-
-#include "ace/config-sunos5.5.h"
-
-#if defined(__GNUC__) && __GNUC__ >= 2 && __GNUC_MINOR__ >= 95
-// gcc-2.95 fixes this problem for us!
-#undef ACE_HAS_STL_QUEUE_CONFLICT
-#endif /* __GNUC__ */
-
-#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199506L) || \
- defined (__EXTENSIONS__)
-# define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-# define ACE_HAS_SIGWAIT
-// Hack 'cuz -DPOSIX_SOURCE=199506L and -DEXTENSIONS hides this.
-# include <sys/types.h>
- extern "C" int madvise(caddr_t, size_t, int);
-#endif /* _POSIX_C_SOURCE >= 199506L || __EXTENSIONS__ */
-
-// SunOS 5.6 has AIO calls.
-#define ACE_HAS_AIO_CALLS
-
-// Sunos 5.6's aio_* with RT signals is broken.
-#define ACE_POSIX_AIOCB_PROACTOR
-
-// SunOS 5.6 has a buggy select
-#define ACE_HAS_LIMITED_SELECT
-
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos5.7.h b/ace/config-sunos5.7.h
deleted file mode 100644
index 0f8f5f04cb3..00000000000
--- a/ace/config-sunos5.7.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SunOS 5.7
-// (Solaris 7) platforms using the SunC++ 4.x, 5.x, or g++ compilers.
-
-#ifndef ACE_CONFIG_H
-
-#define ACE_ONLY_LATEST_AND_GREATEST
-
-// ACE_CONFIG_H is defined by one of the following #included headers.
-
-// #include the SunOS 5.6 config file, then add SunOS 5.7 updates below.
-
-#include "ace/config-sunos5.6.h"
-
-#if defined (__GNUG__)
-# if __GNUC__ <= 2 && __GNUC_MINOR__ < 8
- // Assume that later g++ were built on SunOS 5.7, so they don't
- // have these problems . . .
-
- // Disable the following, because g++ 2.7.2.3 can't handle it.
- // Maybe later g++ versions can?
-# undef ACE_HAS_XPG4_MULTIBYTE_CHAR
-
- // The Solaris86 g++ 2.7.2.3 sys/types.h doesn't have these . . .
- typedef long t_scalar_t; /* historical versions */
- typedef unsigned long t_uscalar_t;
- typedef void *timeout_id_t;
-# endif /* __GNUC__ <= 2 && __GNUC_MINOR__ < 8 */
-
-#elif defined (ghs)
- // SunOS 5.7's /usr/include/sys/procfs_isa.h needs uint64_t,
- // but /usr/include/sys/int_types.h doesn't #define it because
- // _NO_LONGLONG is #
-# undef ACE_HAS_PROC_FS
-# undef ACE_HAS_PRUSAGE_T
-
-#elif defined (__KCC)
-typedef unsigned long long uint64_t;
-#endif /* __GNUG__ || ghs || __KCC */
-
-// SunOS 5.7 supports SCHED_FIFO and SCHED_RR, as well as SCHED_OTHER.
-#undef ACE_HAS_ONLY_SCHED_OTHER
-
-// SunOS 5.7 gets this right . . .
-#undef ACE_HAS_BROKEN_T_ERROR
-
-// And doesn't need to set LWP priorities, as shown by
-// performance-tests/Misc/preempt.
-#undef ACE_NEEDS_LWP_PRIO_SET
-
-// SunOS 2.7 can support Real-Time Signals and POSIX4 AIO operations
-// are supported.
-
-#if !defined (ACE_HAS_AIO_CALLS)
-#define ACE_HAS_AIO_CALLS
-#endif /* !ACE_HAS_AIO_CALLS */
-
-#if defined (ACE_POSIX_AIOCB_PROACTOR)
-#undef ACE_POSIX_AIOCB_PROACTOR
-#endif /* ACE_POSIX_AIOCB_PROACTOR */
-
-// This is anyway default.
-#define ACE_POSIX_SIG_PROACTOR
-
-#ifdef ACE_HAS_LIMITED_SELECT
-#undef ACE_HAS_LIMITED_SELECT
-#endif /* ACE_HAS_LIMITED_SELECT */
-
-#if defined (__sparcv9)
-#define ERRMAX 256 /* Needed for following define */
-#define ACE_LACKS_SYS_NERR
-#define _LP64
-#define ACE_SIZEOF_LONG 8 /* Needed to circumvent compiler bug #4294969 */
-#endif /* __sparcv9 */
-
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-sunos5.x-sunc++-4.x-orbix.h b/ace/config-sunos5.x-sunc++-4.x-orbix.h
deleted file mode 100644
index f48b35c2e8e..00000000000
--- a/ace/config-sunos5.x-sunc++-4.x-orbix.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for SunOS
-// 5.[56] platforms using the SunC++ 4.x compiler. This works with the
-// Orbix 2.x CORBA IDL compiler.
-
-#ifndef ACE_CONFIG_ORBIX_H
-#define ACE_CONFIG_ORBIX_H
-#include "ace/pre.h"
-
-// Pick up correct platform definition file based on compiler's predefined
-// macros.
-#if defined (__SunOS_5_5) || defined (__SunOS_5_5_1)
-# include "ace/config-sunos5.5.h"
-#elif defined (__SunOS_5_6)
-# include "ace/config-sunos5.6.h"
-#else
-# error "Need a new platform extension in config-sunos5.x-sunc++-4.x-orbix.h"
-#endif /* __SunOS_* */
-
-// Platform contains the Orbix CORBA implementation.
-#define ACE_HAS_ORBIX 1
-
-// Platform contains the multi-threaded Orbix CORBA implementation, unless
-// overridden by site config.
-#if !defined (ACE_HAS_MT_ORBIX)
-# define ACE_HAS_MT_ORBIX 1
-#endif /* ACE_HAS_MT_ORBIX */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_ORBIX_H */
diff --git a/ace/config-tandem.h b/ace/config-tandem.h
deleted file mode 100644
index e1a3f96578e..00000000000
--- a/ace/config-tandem.h
+++ /dev/null
@@ -1,453 +0,0 @@
-/* -*- C++ -*- */
-// Testing TANDEM
-// $Id$
-
-// The following configuration file is designed to work for Tandems NonStop-UX
-// 4.2MP platforms using the NCC 3.20 compiler.
-
-// Note this is a test version it might include several errors I
-// have done a test and set/unset until I errors disappered.
-// Some of the options that should be set aren't because of the simple fact
-// that i haven't the time to check what is wrong.
-// e.g. widecharacter are supported but a wcstok which only take 2 parameters
-// are included by the compiler, to get the correct wcstok that takes 3 params
-// we must set _XOPEN_SOURCE and we get ALOT of errors and warnings.
-// So this config is done to get things to start to work it isn't finished.
-// Janne (Jan.Perman@osd.Ericsson.se)
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-#define ACE_HAS_IDTYPE_T
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Tandem doesn't include this although they are defined
-// in sys/time.h and sys/resource.h
-#define ACE_LACKS_RLIMIT_PROTOTYPE // jjpp
-// Tandem has a function to set t_errno (set_t_errno)
-#define ACE_HAS_SET_T_ERRNO // jjpp
-
-//Platform supports System V IPC (most versions of UNIX, but not Win32)
-#define ACE_HAS_SYSV_IPC
-
-// OS/compiler omits the const from the sendmsg() prototype.
-#define ACE_HAS_BROKEN_SENDMSG
-
-//OS/compiler's header files are inconsistent with libC definition of rand_r().
-//#define ACE_HAS_BROKEN_RANDR // Defines it the same way as sunos5.4
-
-//Platform supports system configuration information
-#define ACE_HAS_SYSINFO
-
-//Platform supports the POSIX regular expression library
-#define ACE_HAS_REGEX
-
-// Platform supports recvmsg and sendmsg
-#define ACE_HAS_MSG
-
-//Compiler/platform contains the <sys/syscall.h> file.
-#define ACE_HAS_SYSCALL_H
-
-//Platform provides <sysent.h> header
-#define ACE_HAS_SYSENT_H
-
-// Platform has terminal ioctl flags like TCGETS and TCSETS.
-#define ACE_HAS_TERM_IOCTLS
-
-// ? ACE_HAS_AUTOMATIC_INIT_FINI Compiler/platform correctly calls
-// init()/fini() for shared libraries
-
-//Platform supports POSIX O_NONBLOCK semantics
-#define ACE_HAS_POSIX_NONBLOCK
-
-// Compiler/platform has correctly prototyped header files
-#define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Platform supports IP multicast
-//#define ACE_HAS_IP_MULTICAST
-
-//Compiler/platform supports alloca()
-#define ACE_HAS_ALLOCA
-//Compiler/platform has <alloca.h>
-#define ACE_HAS_ALLOCA_H
-
-//Platform contains <poll.h>
-#define ACE_HAS_POLL
-
-// Platform supports the POSIX struct timespec type
-#define ACE_HAS_POSIX_TIME // As i understand it, but i'm in deep water
-//Platform supports the SVR4 timestruc_t type
-
-//ACE_HAS_PROC_FS Platform supports the /proc file system
-
-//ACE_HAS_PRUSAGE_T Platform supports the prusage_t struct
-
-
-// To get this to work a patch in sys/signal must be made
-// typedef void SIG_FUNC_TYPE(int);
-//#if defined (__cplusplus)
-// void (*sa_handler)(int);
-//#else
-// ...
-//#endif
-//#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#define ACE_HAS_TANDEM_SIGNALS
-//Compiler/platform defines the sig_atomic_t typedef
-#define ACE_HAS_SIG_ATOMIC_T
-//Platform supports SVR4 extended signals
-#define ACE_HAS_SIGINFO_T
-//Platform supports ucontext_t (which is used in the extended signal API).
-#define ACE_HAS_UCONTEXT_T
-//Compiler/platform supports SVR4 signal typedef
-//#define ACE_HAS_SVR4_SIGNAL_T
-//ACE_HAS_SVR4_SIGNAL_T
-
-
-// Platform/compiler has the sigwait(2) prototype
-#define ACE_HAS_SIGWAIT
-
-//Compiler/platform provides the sockio.h file
-#define ACE_HAS_SOCKIO_H
-
-// Compiler supports the ssize_t typedef
-#define ACE_HAS_SSIZE_T // Limits.h must be included
-
-//Platform supports STREAMS
-#define ACE_HAS_STREAMS
-
-#define ACE_HAS_STREAM_PIPES
-//Platform supports STREAM pipes
-
-//Compiler/platform supports strerror ()
-#define ACE_HAS_STRERROR
-
-//Compiler/platform supports struct strbuf
-#define ACE_HAS_STRBUF_T
-
-//Compiler/platform supports SVR4 dynamic linking semantics
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-//Compiler/platform supports SVR4 gettimeofday() prototype
-//#define ACE_HAS_SVR4_GETTIMEOFDAY // Defines it the same way as sunos5.4
-
-//Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff)...
-#define ACE_HAS_SVR4_TLI
-
-//Platform provides <sys/filio.h> header
-#define ACE_HAS_SYS_FILIO_H
-
-//Platform supports TLI timod STREAMS module
-#define ACE_HAS_TIMOD_H
-//Platform supports TLI tiuser header
-#define ACE_HAS_TIUSER_H
-
-//Platform supports TLI
-#define ACE_HAS_TLI
-//Platform provides TLI function prototypes
-#define ACE_HAS_TLI_PROTOTYPES
-
-//Platform lacks streambuf "linebuffered ()".
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF
-
-// Platform lacks "signed char" type (broken!)
-#define ACE_LACKS_SIGNED_CHAR
-
-
-//? ACE_NEEDS_DEV_IO_CONVERSION Necessary with some compilers
-//to pass ACE_TTY_IO as parameter to DEV_Connector.
-
-#define ACE_PAGE_SIZE 4096
-// Defines the page size of the system (not used on Win32 or
-// with ACE_HAS_GETPAGESIZE).
-
-/****** THREAD SPECIFIC **********/
-/* If you want to remove threading then comment out the following four #defines .*/
-#if !defined (ACE_MT_SAFE)
- #define ACE_MT_SAFE 1 //Compile using multi-thread libraries
-#endif
-#define ACE_HAS_THREADS //Platform supports threads
-#define ACE_HAS_STHREADS //Platform supports Solaris threads
-
-// Compiler/platform has threadspecific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-//Platform supports thr_keydelete (e.g,. UNIXWARE)
-
-#define ACE_HAS_THR_MINSTACK // Tandem uses thr_minstack instead of thr_min_stack
-#define ACE_LACKS_PRI_T // Tandem lacks pri_t
-#define ACE_HAS_THR_KEYDELETE
-
-//ACE_HAS_REENTRANT_FUNCTIONS Platform supports reentrant
-// functions (i.e., all the POSIX *_r functions).
-//ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS Platform will recurse infinitely on
-// thread exits from TSS cleanup routines (e.g., AIX).
-//ACE_NEEDS_HUGE_THREAD_STACKSIZE Required by platforms with small
-// default stacks.
-//ACE_HAS_ONLY_SCHED_OTHER Platform, e.g., Solaris 2.5, only
-// supports SCHED_OTHER POSIX scheduling policy.
-
-
-//*************************************
-//ACE_HAS_PTHREADS Platform supports POSIX Pthreads
-//ACE_HAS_PTHREAD_CONDATTR_SETKIND_NP Platform has pthread_condattr_
-// setkind_np().
-//ACE_HAS_PTHREAD_MUTEXATTR_SETKIND_NP Platform has
-// pthread_mutexattr_setkind_np().
-//ACE_HAS_THREAD_SELF Platform has thread_self() rather
-// than pthread_self() (e.g., DCETHREADS and AIX)
-//ACE_HAS_THR_C_DEST The pthread_keycreate() routine *
-// must* take extern C functions.
-//ACE_HAS_THR_C_FUNC The pthread_create() routine *must*
-// take extern C functions.
-//ACE_LACKS_CONDATTR_PSHARED Platform has no implementation of
-// pthread_condattr_setpshared(), even though it supports pthreads!
-//ACE_LACKS_PTHREAD_THR_SIGSETMASK Platform lacks pthread_thr_
-// sigsetmask (e.g., MVS, HP/UX, and OSF/1 3.2)
-//ACE_LACKS_SETDETACH Platform lacks pthread_attr_
-// setdetachstate() (e.g., HP/UX 10.x)
-//ACE_LACKS_SETSCHED Platform lacks pthread_attr_
-// setsched() (e.g. MVS)
-//ACE_LACKS_THREAD_STACK_SIZE Platform lacks pthread_attr_
-// setstacksize() (e.g., Linux pthreads)
-
-//ACE_HAS_IRIX62_THREADS Platform supports the very odd IRIX
-// 6.2 threads...
-
-/*********************************/
-
-/******* SIGNAL STUFF *******/
-//ACE_HAS_SIGNAL_OBJECT_AND_WAIT Platform supports the Win32
-// SignalObjectAndWait() function (WinNT 4.0 and beyond).
-//#define ACE_HAS_SIGNAL_SAFE_OS_CALLS
-//Automatically restart OS system
-// calls when EINTR occurs
-
-// 10 millisecond fudge factor to account for Solaris timers...
-//#if !defined (ACE_TIMER_SKEW)
-//#define ACE_TIMER_SKEW 1000 * 10
-//#endif /* ACE_TIMER_SKEW */
-
-// Platform supports the getrusage() system call.
-//#define ACE_HAS_GETRUSAGE
-//Platform uses non-const char * in calls to gethostbyaddr, gethostbyname,
-// getservbyname
-#define ACE_HAS_NONCONST_GETBY
-// Platform's select() uses non-const timeval* (only found on Linux right now)
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-// And on Tandem :-)
-//Uses ctime_r & asctime_r with only two parameters vs. three.
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-//Platform has special header for select().
-#define ACE_HAS_SELECT_H
-// Platform/compiler supports Standard C++ Library
-#define ACE_HAS_STANDARD_CPP_LIBRARY
-//Platform/compiler supports _sys_errlist symbol
-//#define ACE_HAS_SYS_ERRLIST
-//Platform lacks madvise() (e.g., Linux)
-#define ACE_LACKS_MADVISE
-//Platform lacks the si_addr field of siginfo_t (e.g.,VxWorks and HP/UX 10.x)
-//?#define ACE_LACKS_SI_ADDR
-//Compiler/platform lacks strcasecmp() (e.g., DG/UX, UNIXWARE, VXWORKS)
-#define ACE_LACKS_STRCASECMP
-//<time.h> doesn't automatically #include /**/ <sys/time.h>
-#define ACE_LACKS_SYSTIME_H
-
-//ACE_HAS_AIX_BROKEN_SOCKET_HEADER Platform, such as AIX4, needs to wrap
-// #include of sys/socket.h with #undef/#define of __cplusplus.
-//ACE_HAS_AIX_HI_RES_TIMER Platform has AIX4 ::read_real_time ()
-// ? ACE_HAS_BROKEN_BITSHIFT Compiler has integer overflow
-// problem with bit-shift operations.
-// ? ACE_HAS_BROKEN_CONVERSIONS Compiler can't handle calls like
-// foo->operator T *()
-//ACE_HAS_BROKEN_CTIME Compiler/platform uses macro for ctime
-// (e.g., MVS)
-//ACE_HAS_BROKEN_HPUX_TEMPLATES Earlier versions of HP/UX C++ are
-// damned...
-//ACE_HAS_BROKEN_MSG_H Platform headers don't support <msg.h>
-// prototypes
-//ACE_HAS_BROKEN_MMAP_H HP/UX does not wrap the mmap(2) header
-// files with extern "C".
-//ACE_HAS_BROKEN_POSIX_TIME Platform defines struct timespec in
-// <sys/timers.h>
-//ACE_HAS_BROKEN_SETRLIMIT OS/compiler omits the const from the
-// rlimit parameter in the setrlimit() prototype.
-//ACE_HAS_BROKEN_WRITEV OS/compiler omits the const from the
-// iovec parameter in the writev() prototype.
-// There is a bstring in the Tandem but where man bstring OK, find bstring NOK
-// ? ACE_HAS_BSTRING Platform has <bstring.h> (which contains bzero() prototype)
-//ACE_HAS_CANCEL_IO Platform supports the Win32 CancelIO()
-// function (WinNT 4.0 and beyond).
-//ACE_HAS_CHARPTR_DL OS/platform uses char * for
-// dlopen/dlsym args, rather than const char *.
-// Yes in man, no in header file
-//ACE_HAS_CHARPTR_SOCKOPT OS/platform uses char * for sockopt,
-// rather than const char *
-// sprintf() returns char * rather than int (e.g., SunOS 4.x)
-//#define ACE_HAS_CHARPTR_SPRINTF
-//ACE_HAS_CLOCK_GETTIME Platform supports POSIX 1.b
-// clock_gettime ()
-//ACE_HAS_COMPLEX_LOCK Platform supports non-standard
-// readers/writer locks...
-//? ACE_HAS_EXCEPTIONS Compiler supports C++ exception
-// handling
-// Platform supports getpagesize() call (otherwise, ACE_PAGE_SIZE must be
-// defined, except on Win32)
-//#define ACE_HAS_GETPAGESIZE // Man getpagesize ok grep /usr/.. not
-// found
-//ACE_HAS_GNU_CSTRING_H Denotes that GNU has cstring.h as
-// standard which redefines memchr()
-//ACE_HAS_HI_RES_TIMER Compiler/platform supports SunOS
-// high resolution timers
-//ACE_HAS_INLINED_OSCALLS Inline all the static class OS
-// methods to remove call overhead
-//ACE_HAS_LIMITED_RUSAGE_T The rusage_t structure has only two
-// fields.
-//ACE_HAS_LONG_MAP_FAILED Platform defines MAP_FAILED as a
-// long constant.
-//? ACE_HAS_NONCONST_MSGSND Platform has a non-const parameter to
-// msgsend() (e.g., SCO).
-// Has it msgsend at all
-
-//ACE_HAS_OLD_MALLOC Compiler/platform uses old malloc()/
-// free() prototypes (ugh)
-#if !defined (ACE_HAS_ORBIX)
- #define ACE_HAS_ORBIX 0
-#endif
-// ACE_HAS_ORBIX Platform has Orbix CORBA implementation
-//? ACE_HAS_POSIX_SEM Platform supports POSIX real-time
-//semaphores (e.g., VxWorks and Solaris)
-//Compiler/platform defines a union semun for SysV shared memory
-//#define ACE_HAS_SEMUN
-//ACE_HAS_SIN_LEN Platform supports new BSD inet_addr
-// len field.
-//? ACE_HAS_SIZET_SOCKET_LEN OS/compiler uses size_t * rather
-//than int * for socket lengths
-//ACE_HAS_SOCKADDR_MSG_NAME Platform requires (struct sockaddr *)
-//for msg_name field of struct msghdr.
-//ACE_HAS_STRICT Use the STRICT compilation mode on Win32.
-//? ACE_HAS_STRUCT_NETDB_DATA Compiler/platform has strange
-// hostent API for socket *_r() calls
-//ACE_HAS_SUNOS4_GETTIMEOFDAY SunOS 4 style prototype.
-//? ACE_HAS_SYSCALL_GETRUSAGE HP/UX has an undefined syscall for
-//GETRUSAGE...
-//ACE_HAS_TEMPLATE_TYPEDEFS Compiler implements templates that
-// support typedefs inside of classes used as formal arguments to a template
-// class.
-//Platform/compiler supports timezone * as second parameter to gettimeofday()
-//#define ACE_HAS_TIMEZONE_GETTIMEOFDAY According to man we have but not
-//when compiling
-//ACE_HAS_UNION_WAIT The wait() system call takes a (
-// union wait *) rather than int *
-//? ACE_HAS_USING_KEYWORD Compiler supports the new using
-// keyword for C++ namespaces.
-//ACE_HAS_VOIDPTR_MMAP Platform requires void * for mmap().
-//ACE_HAS_VOIDPTR_SOCKOPT OS/compiler uses void * arg 4
-// setsockopt() rather than const char *
-//ACE_HAS_WIN32_TRYLOCK The Win32 platform support
-//TryEnterCriticalSection() (WinNT 4.0 and beyond)
-//ACE_HAS_WINSOCK2 The Win32 platform supports WinSock 2.0
-//ACE_HAS_XLI Platform has the XLI version of TLI
-//ACE_HAS_XT Platform has Xt and Motif
-//ACE_LACKS_CONST_TIMESPEC_PTR Platform forgot const in cond_timewait
-// (e.g., HP/UX).
-//ACE_LACKS_COND_T Platform lacks condition variables
-// (e.g., Win32 and VxWorks)
-//ACE_LACKS_EXEC Platform lacks the exec() family of
-// system calls (e.g., Win32, VxWorks, Chorus)
-//ACE_LACKS_FILELOCKS Platform lacks file locking mechanism
-//ACE_LACKS_IOSTREAM_FX iostream header does not declare
-// ipfx (), opfx (), etc.
-//ACE_LACKS_MALLOC_H Platform lacks malloc.h
-//ACE_LACKS_MEMORY_H Platform lacks memory.h
-//(e.g., VxWorks and Chorus)
-//ACE_LACKS_MKTEMP ACE has no mktemp()
-//ACE_LACKS_MMAP The platform doesn't have mmap(2)
-// (e.g., SCO UNIX).
-//ACE_LACKS_MODE_MASKS Platform/compiler doesn't have
-//open() mode masks.
-//ACE_LACKS_MPROTECT The platform doesn't have mprotect(2)
-//(e.g., EPLX real time OS from CDC (based on LYNX))
-//ACE_LACKS_MSGBUF_T Platform lacks struct msgbuf (e.g.,
-// NT and MSV).
-//ACE_LACKS_MSYNC Platform lacks msync() (e.g., Linux)
-//ACE_LACKS_NETDB_REENTRANT_FUNCTIONS Platform does not support reentrant
-// netdb functions (getprotobyname_r, getprotobynumber_r, gethostbyaddr_r,
-// gethostbyname_r, getservbyname_r).
-//ACE_LACKS_PARAM_H Platform lacks <sys/param.h> (e.g.,
-//MVS)
-//ACE_LACKS_POSIX_PROTOTYPES Platform lacks POSIX prototypes for
-//certain System V functions like shared memory and message queues.
-//ACE_LACKS_RECVMSG Platform lacks recvmsg() (e.g., Linux)
-//ACE_LACKS_RWLOCK_T Platform lacks readers/writer locks.
-//ACE_LACKS_SBRK Platform lacks a working sbrk()
-// (e.g., Win32 and VxWorks)
-//ACE_LACKS_SEMBUF_T Platform lacks struct sembuf
-//(e.g., Win32 and VxWorks)
-//ACE_LACKS_SIGACTION Platform lacks struct sigaction
-// (e.g., Win32 and Chorus)
-//? ACE_LACKS_SYS_NERR Platforms/compiler lacks the sys_nerr
-// variable (e.g., VxWorks and MVS).
-//ACE_LACKS_SYSV_MSG_H Platform lacks sys/msg.h
-//(e.g., Chorus and VxWorks)
-//ACE_LACKS_KEY_T Platform lacks key_t
-//(e.g., Chorus, VxWorks, Win32)
-//ACE_LACKS_SENDMSG Platform lacks sendmsg()
-// (e.g., Linux)
-//ACE_LACKS_SYSV_SHMEM Platform lacks System V shared
-// memory (e.g., Win32 and VxWorks)
-//ACE_LACKS_SIGINFO_H Platform lacks the siginfo.h include
-// file (e.g., MVS)
-//ACE_LACKS_SOCKETPAIR Platform lacks the socketpair()
-// call (e.g., SCO UNIX)
-//? ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES Compiler doesn't support
-// static data member templates
-//ACE_LACKS_STRRECVFD Platform doesn't define struct
-//strrecvfd.
-//ACE_LACKS_SYSCALL Platform doesn't have syscall()
-// prototype
-//ACE_LACKS_SYSV_MSQ_PROTOS Platform doesn't have prototypes for
-//Sys V msg()* queues.
-//ACE_LACKS_T_ERRNO Header files lack t_errno for TLI
-//ACE_LACKS_TCP_H Platform doesn't have netinet/tcp.h
-//ACE_LACKS_UCONTEXT_H Platform lacks the ucontext.h file
-//ACE_LACKS_UNIX_DOMAIN_SOCKETS ACE platform has no UNIX domain sockets
-//ACE_LACKS_UTSNAME_T Platform lacks struct utsname
-// (e.g., Win32 and VxWorks)
-//ACE_NDEBUG Turns off debugging features
-//ACE_LACKS_READV Platform doesn't define readv, so
-// use our own
-//ACE_LACKS_WRITEV Platform doesn't define writev, so
-//use our own
-//ACE_NLOGGING Turns off the LM_DEBUG and LM_ERROR
-//logging macros...
-//ACE_NTRACE Turns off the tracing feature.
-//ACE_REDEFINES_XTI_FUNCTIONS Platform redefines the t_... names
-//(UnixWare)
-//ACE_SELECT_USES_INT Platform uses int for select()
-//rather than fd_set
-//? ACE_TEMPLATES_REQUIRE_PRAGMA Compiler's template mechanism must
-// use a pragma This is used for AIX's C++ compiler.
-//? ACE_TEMPLATES_REQUIRE_SOURCE Compiler's template mechanim must
-// see source code (i.e., .cpp files). This is used for GNU G++.
-//? ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION Compiler's template mechanism
-//requires the use of explicit C++ specializations for all used
-//templates. This is also used for GNU G++ if you don't use the "repo"
-//patches.
-//ACE_USE_POLL Use the poll() event demultiplexor
-//rather than select().
-
-// Turns off the tracing feature.
-// #define ACE_NTRACE 0
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// Defines the page size of the system.
-#define ACE_PAGE_SIZE 4096
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-tru64.h b/ace/config-tru64.h
deleted file mode 100644
index e5558870db1..00000000000
--- a/ace/config-tru64.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for the
-// Digital UNIX V4.0a and later platforms. It relies on
-// config-osf1-4.0.h, and adds deltas for newer platforms.
-
-#ifndef ACE_CONFIG_TRU64_H
-#define ACE_CONFIG_TRU64_H
-#include "ace/pre.h"
-
-#if defined (DIGITAL_UNIX)
-# include "ace/config-osf1-4.0.h"
-# if DIGITAL_UNIX >= 0x40F
-# define ACE_LACKS_SYSTIME_H
-# endif /* DIGITAL_UNIX >= 0x40F */
-# if DIGITAL_UNIX >= 0x500
-# define _LIBC_POLLUTION_H_
-# endif /* DIGITAL_UNIX >= 0x500 */
-#else /* ! DIGITAL_UNIX */
-# include "ace/config-osf1-3.2.h"
-#endif /* ! DIGITAL_UNIX */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_TRU64_H */
diff --git a/ace/config-unixware-2.01-g++.h b/ace/config-unixware-2.01-g++.h
deleted file mode 100644
index 92fe9d4c58a..00000000000
--- a/ace/config-unixware-2.01-g++.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work
-// for Unixware platforms running UnixWare 2.01.
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// See README for what the ACE_HAS... and ACE_LACKS... macros mean
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
-// this must appear before its #include.
-#define ACE_HAS_STRING_CLASS
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#endif /* __GNUG__ */
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_HAS_IDTYPE_T
-#define ACE_LACKS_STRCASECMP
-#define ACE_HAS_SIZET_SOCKET_LEN
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_GNU_CSTRING_H
-#define ACE_HAS_MSG
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-// Not yet sure about threads
-#define ACE_HAS_NONCONST_GETBY
-#define ACE_HAS_OSF1_GETTIMEOFDAY
-#define ACE_HAS_POLL
-#define ACE_HAS_POSIX_NONBLOCK
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_REENTRANT_FUNCTIONS
-#define ACE_HAS_REGEX
-#define ACE_HAS_LAZY_V
-#define ACE_HAS_SELECT_H
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_SOCKIO_H
-#define ACE_HAS_SSIZE_T
-#define ACE_HAS_STHREADS
-#define ACE_HAS_THR_KEYDELETE
-#define ACE_HAS_STRBUF_T
-#define ACE_HAS_STREAMS
-#define ACE_HAS_STREAM_PIPES
-#define ACE_HAS_STRERROR
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#define ACE_HAS_SYSCALL_H
-#define ACE_HAS_SYSINFO
-#define ACE_HAS_SYSV_IPC
-#define ACE_HAS_SYS_FILIO_H
-#define ACE_HAS_SYS_SIGLIST
-#define ACE_HAS_TERM_IOCTLS
-#define ACE_HAS_THREADS
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_HAS_THREAD_T
-#define ACE_HAS_TIMOD_H
-#define ACE_HAS_TIUSER_H
-#define ACE_HAS_TLI
-#define ACE_HAS_TLI_PROTOTYPES
-#define ACE_HAS_UNIXWARE_SVR4_SIGNAL_T
-#define ACE_HAS_VOIDPTR_SOCKOPT
-
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_SYSCALL
-
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-#define ACE_PAGE_SIZE 4096
-#define ACE_REDEFINES_XTI_FUNCTIONS
-
-// Compiling for UNIXWARE
-#if !defined (UNIXWARE)
-# define UNIXWARE
-# define UNIXARE_2_0
-#endif /* UNIXWARE */
-
-// These seem to be missing... Process_Manager uses them
-//
-//typedef int Process_t;
-//typedef int hProcess_t;
-//typedef int hpid_t;
-
-
-// Compiler/platform supports OSF/1 gettimeofday() prototype.
-//#define ACE_HAS_OSF1_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff)...
-//#define ACE_HAS_SVR4_TLI
-
-
-// Platform doesn't have get<blah>by... char *arg defined as const
-//#define ACE_GET_BLAH_BY_NO_CONST
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-unixware-2.1.2-g++.h b/ace/config-unixware-2.1.2-g++.h
deleted file mode 100644
index fced5901150..00000000000
--- a/ace/config-unixware-2.1.2-g++.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work
-// for Unixware platforms running UnixWare 2.1.2 and gcc version 2.7.2.2
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-// See README for what the ACE_HAS... and ACE_LACKS... macros mean
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// config-g++-common.h undef's ACE_HAS_STRING_CLASS with -frepo, so
-// this must appear before its #include.
-#define ACE_HAS_STRING_CLASS
-
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-#endif /* __GNUG__ */
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-#define ACE_LACKS_SYSTIME_H
-// ualarm is only in BSD compatibility lib, but no header is provided
-// #define ACE_HAS_UALARM
-#define ACE_HAS_SIZET_SOCKET_LEN
-#define ACE_HAS_AUTOMATIC_INIT_FINI
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_GNU_CSTRING_H
-#define ACE_HAS_MSG
-#define ACE_HAS_SVR4_GETTIMEOFDAY
-#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
-#define ACE_HAS_NONCONST_GETBY
-#define ACE_HAS_POLL
-#define ACE_HAS_POSIX_NONBLOCK
-#define ACE_HAS_POSIX_TIME
-#define ACE_LACKS_TIMESPEC_T
-#define ACE_HAS_REENTRANT_FUNCTIONS
-#define ACE_HAS_REGEX
-#define ACE_HAS_LAZY_V
-#define ACE_HAS_SELECT_H
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_UCONTEXT_T
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_SOCKIO_H
-#define ACE_HAS_SSIZE_T
-#define ACE_HAS_STHREADS
-#define ACE_HAS_THR_KEYDELETE
-#define ACE_HAS_STRBUF_T
-#define ACE_HAS_STREAMS
-#define ACE_HAS_STREAM_PIPES
-#define ACE_HAS_STRERROR
-#define ACE_HAS_SVR4_DYNAMIC_LINKING
-#define ACE_HAS_SYSCALL_H
-#define ACE_HAS_SYSINFO
-#define ACE_HAS_SYSV_IPC
-#define ACE_HAS_SYS_FILIO_H
-#define ACE_HAS_TERM_IOCTLS
-#define ACE_HAS_THREADS
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-#define ACE_HAS_THREAD_T
-#define ACE_HAS_TIMOD_H
-#define ACE_HAS_TIUSER_H
-#define ACE_HAS_TLI
-#define ACE_HAS_TLI_PROTOTYPES
-#define ACE_HAS_UNIXWARE_SVR4_SIGNAL_T
-#define ACE_HAS_VOIDPTR_SOCKOPT
-#define ACE_HAS_THR_MINSTACK
-
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_STRCASECMP
-#define ACE_LACKS_PRI_T
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-#define ACE_LACKS_PWD_REENTRANT_FUNCTIONS
-
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-#define ACE_PAGE_SIZE 4096
-#define ACE_REDEFINES_XTI_FUNCTIONS
-
-#if !defined (UNIXWARE)
-# define UNIXWARE
-# define UNIXWARE_2_1
-#endif /* ! UNIXWARE */
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-#define ACE_HAS_IDTYPE_T
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-visualage.h b/ace/config-visualage.h
deleted file mode 100644
index ccaaec9c776..00000000000
--- a/ace/config-visualage.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// This configuration file automatically includes the proper
-// configurations for IBM's VisualAge C++ compiler on Win32 and AIX.
-
-#ifndef CONFIG_VISUALAGE_H
-#define CONFIG_VISUALAGE_H
-#include "ace/pre.h"
-
-#ifdef __TOS_WIN__
- #include "ace/config-win32.h"
-#elif __TOS_AIX__
- #include "ace/config-aix-4.x.h"
-#else
- #include "PLATFORM NOT SPECIFIED"
-#endif /* __TOS_WIN__ */
-
-#include "ace/post.h"
-#endif //CONFIG_VISUALAGE_H
diff --git a/ace/config-vxworks5.x.h b/ace/config-vxworks5.x.h
deleted file mode 100644
index 0387c805ff9..00000000000
--- a/ace/config-vxworks5.x.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for VxWorks
-// 5.2/5.3 platforms using one of these compilers:
-// 1) The GNU/Cygnus g++ compiler that is shipped with Tornado 1.0.1.
-// 2) The Green Hills 1.8.8 (not 1.8.7!!!!) and 1.8.9 compilers.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if ! defined (VXWORKS)
-# define VXWORKS
-#endif /* ! VXWORKS */
-
-#if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__
-#endif /* ! __ACE_INLINE__ */
-
-// Compiler-specific configuration.
-#if defined (__GNUG__)
-# include "ace/config-g++-common.h"
-# undef ACE_HAS_TEMPLATE_SPECIALIZATION
-
-# define ACE_LACKS_IOSTREAM_FX
-# if !defined (ACE_MAIN)
-# define ACE_MAIN ace_main
-# endif /* ! ACE_MAIN */
-
- // Even though the documentation suggests that g++/VxWorks 5.3.1
- // (Tornado 1.0.1) supports long long, Wind River tech support says
- // that it doesn't. It causes undefined symbols for math functions.
-# define ACE_LACKS_LONGLONG_T
-
- // On g++/VxWorks, iostream.h defines a static instance (yes, instance)
- // of the Iostream_init class. That causes all files that #include it
- // to put in the global constructor/destructor hooks. For files that
- // don't have any static instances of non-class (built-in) types, the
- // hooks refer to the file name, e.g., "foo.cpp". That file name gets
- // embedded in a variable name by munch. The output from munch won't
- // compile, though, because of the period! So, let g++/VxWorks users
- // include iostream.h only where they need it.
-# define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION
-
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF
-# define ACE_LACKS_SIGNED_CHAR
-
-#elif defined (ghs)
- // Processor type, if necessary. Green Hills defines "ppc".
-# if defined (ppc)
-# define ACE_HAS_POWERPC_TIMER
-# elif defined (i386) || defined (__i386__)
- // If running an Intel, assume that it's a Pentium so that
- // ACE_OS::gethrtime () can use the RDTSC instruction. If
- // running a 486 or lower, be sure to comment this out.
- // (If not running an Intel CPU, this #define will not be seen
- // because of the i386 protection, so it can be ignored.)
-# define ACE_HAS_PENTIUM
-# endif /* ppc || i386 */
-
-# define ACE_CONFIG_INCLUDE_GHS_COMMON
-# include "ace/config-ghs-common.h"
-
-# define ACE_LACKS_UNISTD_H
-
-#elif defined (__DCPLUSPLUS__)
- // Diab 4.2a or later.
-# if !defined (ACE_LACKS_PRAGMA_ONCE)
- // We define it with a -D with make depend.
-# define ACE_LACKS_PRAGMA_ONCE
-# endif /* ! ACE_LACKS_PRAGMA_ONCE */
-
- // Diab doesn't support VxWorks' iostream libraries.
-# define ACE_LACKS_IOSTREAM_TOTALLY
-
- // #include <new.h> causes strange compilation errors in
- // the system header files.
-# define ACE_LACKS_NEW_H
-
-#else /* ! __GNUG__ && ! ghs */
-# error unsupported compiler on VxWorks
-#endif /* ! __GNUG__ && ! ghs */
-
-// OS-specific configuration
-
-#define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 32768
-#define ACE_DEFAULT_THREAD_KEYS 16
-#define ACE_HAS_BROKEN_ACCEPT_ADDR
-#define ACE_HAS_BROKEN_SENDMSG
-#define ACE_HAS_BROKEN_WRITEV
-#define ACE_HAS_CHARPTR_SOCKOPT
-#define ACE_HAS_CLOCK_GETTIME
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_HAS_DIRENT
-#define ACE_HAS_DLL 0
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-#define ACE_HAS_MSG
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL
-#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-#define ACE_HAS_POSIX_NONBLOCK
-#define ACE_HAS_POSIX_TIME
-#define ACE_HAS_RECURSIVE_MUTEXES
-#define ACE_HAS_SIGINFO_T
-#define ACE_HAS_SIGWAIT
-#define ACE_HAS_SIG_ATOMIC_T
-#define ACE_HAS_STRDUP_EMULATION
-#define ACE_HAS_STRERROR
-#define ACE_HAS_THREADS
-#define ACE_HAS_TSS_EMULATION
-#define ACE_LACKS_ACCESS
-#define ACE_LACKS_COND_T
-#define ACE_LACKS_EXEC
-#define ACE_LACKS_FCNTL
-#define ACE_LACKS_FILELOCKS
-#define ACE_LACKS_FORK
-#define ACE_LACKS_FSYNC
-#define ACE_LACKS_GETHOSTENT
-#define ACE_LACKS_GETSERVBYNAME
-#define ACE_LACKS_KEY_T
-#define ACE_LACKS_LSTAT
-#define ACE_LACKS_MADVISE
-#define ACE_LACKS_MALLOC_H
-#define ACE_LACKS_MEMORY_H
-#define ACE_LACKS_MKFIFO
-#define ACE_LACKS_MKTEMP
-#define ACE_LACKS_MMAP
-#define ACE_LACKS_MPROTECT
-#define ACE_LACKS_MSYNC
-#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
-#define ACE_LACKS_PARAM_H
-#define ACE_LACKS_PWD_FUNCTIONS
-#define ACE_LACKS_READDIR_R
-#define ACE_LACKS_READLINK
-#define ACE_LACKS_RLIMIT
-#define ACE_LACKS_RWLOCK_T
-#define ACE_LACKS_SBRK
-#define ACE_LACKS_SEEKDIR
-#define ACE_LACKS_SEMBUF_T
-#define ACE_LACKS_SIGINFO_H
-#define ACE_LACKS_SI_ADDR
-#define ACE_LACKS_SOCKETPAIR
-#define ACE_LACKS_STRCASECMP
-#define ACE_LACKS_STRRECVFD
-#define ACE_LACKS_SYSCALL
-#define ACE_LACKS_SYSTIME_H
-#define ACE_LACKS_SYSV_MSG_H
-#define ACE_LACKS_SYSV_SHMEM
-#define ACE_LACKS_SYS_NERR
-#define ACE_LACKS_TELLDIR
-#define ACE_LACKS_TIMESPEC_T
-#define ACE_LACKS_TRUNCATE
-#define ACE_LACKS_UCONTEXT_H
-#define ACE_LACKS_UNIX_SIGNALS
-#define ACE_LACKS_UTSNAME_T
-#define ACE_PAGE_SIZE 4096
-#define ACE_THR_PRI_FIFO_DEF 101
-#define ACE_THR_PRI_OTHER_DEF ACE_THR_PRI_FIFO_DEF
-#define ACE_HAS_SIGTIMEDWAIT
-#define ACE_HAS_SIGSUSPEND
-#if !defined (ACE_VXWORKS_SPARE)
-# define ACE_VXWORKS_SPARE spare4
-#endif /* ! ACE_VXWORKS_SPARE */
-
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-#if !defined (ACE_NEEDS_HUGE_THREAD_STACKSIZE)
-# define ACE_NEEDS_HUGE_THREAD_STACKSIZE 64000
-#endif /* ACE_NEEDS_HUGE_THREAD_STACKSIZE */
-
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-
-// By default, don't include RCS Id strings in object code.
-#if !defined (ACE_USE_RCSID)
-#define ACE_USE_RCSID 0
-#endif /* #if !defined (ACE_USE_RCSID) */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/config-win32-borland.h b/ace/config-win32-borland.h
deleted file mode 100644
index 72563d92f0d..00000000000
--- a/ace/config-win32-borland.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// The following configuration file contains defines for Borland compilers.
-
-#ifndef ACE_WIN32_BORLAND_H
-#define ACE_WIN32_BORLAND_H
-#include "ace/pre.h"
-
-#if defined (__BORLANDC__)
-
-# if (__BORLANDC__ == 0x540)
-// The linker in C++Builder 4 has trouble with the large number of DLL
-// function exports created when you compile without inline
-// functions. Therefore we will use inline functions by default with
-// this version of the compiler.
-# if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__ 1
-# endif /* __ACE_INLINE__ */
-# endif /* __BORLANDC__ == 0x540 */
-
-# include "ace/config-win32-common.h"
-
-# define ACE_CC_NAME ACE_TEXT ("Borland C++ Builder")
-# define ACE_CC_MAJOR_VERSION (__BORLANDC__ / 0x100)
-# define ACE_CC_MINOR_VERSION (__BORLANDC__ % 0x100)
-# define ACE_CC_BETA_VERSION (0)
-# define ACE_CC_PREPROCESSOR "CPP32.EXE"
-# define ACE_CC_PREPROCESSOR_ARGS "-P- -ocon"
-
-# define ACE_EXPORT_NESTED_CLASSES 1
-# define ACE_HAS_ANSI_CASTS 1
-# define ACE_HAS_CPLUSPLUS_HEADERS 1
-# define ACE_HAS_EXCEPTIONS 1
-# define ACE_HAS_EXPLICIT_KEYWORD 1
-# define ACE_HAS_GNU_CSTRING_H 1
-# define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION 1
-# define ACE_HAS_MUTABLE_KEYWORD 1
-# define ACE_HAS_NONCONST_SELECT_TIMEVAL 1
-# define ACE_HAS_ONE_DEFINITION_RULE 1
-# define ACE_HAS_SIG_ATOMIC_T 1
-# define ACE_HAS_STANDARD_CPP_LIBRARY 1
-# if (__BORLANDC__ <= 0x540)
-# define ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION 1
-# endif
-# define ACE_HAS_STD_TEMPLATE_SPECIALIZATION 1
-# define ACE_HAS_STDCPP_STL_INCLUDES 1
-# define ACE_HAS_STRERROR 1
-# define ACE_HAS_STRING_CLASS 1
-# define ACE_HAS_STRPTIME 1
-# define ACE_HAS_TEMPLATE_SPECIALIZATION 1
-# define ACE_HAS_TEMPLATE_TYPEDEFS 1
-# define ACE_HAS_TYPENAME_KEYWORD 1
-# define ACE_HAS_USER_MODE_MASKS 1
-# define ACE_HAS_USING_KEYWORD 1
-# define ACE_LACKS_ACE_IOSTREAM 1
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF 1
-# define ACE_LACKS_MODE_MASKS 1
-# define ACE_LACKS_NATIVE_STRPTIME 1
-# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE 1
-# define ACE_LACKS_PRAGMA_ONCE 1
-# define ACE_LACKS_STRRECVFD 1
-# define ACE_NEW_THROWS_EXCEPTIONS 1
-# define ACE_SIZEOF_LONG_DOUBLE 10
-# define ACE_TEMPLATES_REQUIRE_SOURCE 1
-# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%Lu")
-# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT ("%Ld")
-# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
-# define ACE_WSTRING_HAS_USHORT_SUPPORT 1
-
-/* need to ensure these are included before <iomanip> */
-# include <time.h>
-# include <stdlib.h>
-
-#endif /* defined(__BORLANDC__) */
-
-#include "ace/post.h"
-#endif /* ACE_WIN32_BORLAND_H */
diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h
deleted file mode 100644
index 0850b9d285b..00000000000
--- a/ace/config-win32-common.h
+++ /dev/null
@@ -1,475 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for Windows 95,
-// Windows NT 3.51 and Windows NT 4.0 platforms using the Microsoft Visual C++
-// compilers 2.0, 4.0, 4.1, 4.2, 5.0 and 6.0
-
-#ifndef ACE_WIN32_COMMON_H
-#define ACE_WIN32_COMMON_H
-#include "ace/pre.h"
-
-// Complain if WIN32 is not already defined.
-#if !defined (WIN32) && !defined (ACE_HAS_WINCE)
-# error Please define WIN32 in your project settings.
-#endif
-
-#define ACE_WIN32
-
-// Define this if you're running NT 4.x
-// Setting applies to : building ACE
-// Runtime restrictions: System must be Windows NT => 4.0
-// Additonal notes: Defining _WIN32_WINNT as 0x0400 implies ACE_HAS_WINSOCK2
-// unless you set ACE_HAS_WINSOCK2 to 0 in the config.h file.
-#if !defined (ACE_HAS_WINNT4)
-# define ACE_HAS_WINNT4 1 // assuming Win NT 4.0 or greater
-#endif
-
-#if (defined (ACE_HAS_WINNT4) && ACE_HAS_WINNT4 != 0)
-# if !defined (_WIN32_WINNT)
-# define _WIN32_WINNT 0x0400
-# endif
-#endif
-
-// Define ACE_HAS_MFC to 1, if you want ACE to use CWinThread. This should
-// be defined, if your application uses MFC.
-// Setting applies to : building ACE
-// Runtime restrictions: MFC DLLs must be installed
-// Additonal notes : If both ACE_HAS_MFC and ACE_MT_SAFE are
-// defined, the MFC DLL (not the static lib)
-// will be used from ACE.
-#if !defined (ACE_HAS_MFC)
-# define ACE_HAS_MFC 0
-#endif
-
-// Define ACE_HAS_STRICT to 1 in your config.h file if you want to use
-// STRICT type checking. It is disabled by default because it will
-// break existing application code.
-// Setting applies to : building ACE, linking with ACE
-// Runtime restrictions: -
-// Additonal notes : ACE_HAS_MFC implies ACE_HAS_STRICT
-#if !defined (ACE_HAS_STRICT)
-# define ACE_HAS_STRICT 0
-#endif
-
-// Turn off the following define if you want to disable threading.
-// Compile using multi-thread libraries.
-// Setting applies to : building ACE, linking with ACE
-// Runtime restrictions: multithreaded runtime DLL must be installed
-#if !defined (ACE_MT_SAFE)
-# define ACE_MT_SAFE 1
-#endif
-
-// Build as as a DLL. Define ACE_HAS_DLL to 0 if you want to build a static
-// lib.
-// Setting applies to : building ACE, linking with ACE
-// Runtime restrictions: ACE DLL must be installed :-)
-#if !defined (ACE_HAS_DLL)
-# define ACE_HAS_DLL 1
-#endif
-
-// Build ACE services as DLLs. If you write a library and want it to
-// use ACE_Svc_Export, this will cause those macros to build dlls. If
-// you want your ACE service to be a static library, comment out this
-// line. As far as I know, the only reason to have a library be an
-// ACE "service" is to leverage the ACE_Svc_Export macros. It's just
-// as easy to define your own export macros.
-#if !defined (ACE_HAS_SVC_DLL)
-# define ACE_HAS_SVC_DLL 1
-#endif
-
-// Define the special export macros needed to export symbols outside a dll
-#define ACE_HAS_CUSTOM_EXPORT_MACROS
-#define ACE_Proper_Export_Flag __declspec (dllexport)
-#define ACE_Proper_Import_Flag __declspec (dllimport)
-#define ACE_EXPORT_SINGLETON_DECLARATION(T) template class __declspec (dllexport) T
-#define ACE_IMPORT_SINGLETON_DECLARATION(T) extern template class T
-#define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class __declspec (dllexport) SINGLETON_TYPE<CLASS, LOCK>
-#define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) extern template class SINGLETON_TYPE <CLASS, LOCK>
-
-// Define ACE_HAS_WINSOCK2 to 0 in your config.h file if you do *not*
-// want to compile with WinSock 2.0.
-// Setting applies to : building ACE
-// Runtime restrictions: winsock2 must be installed.
-// #define ACE_HAS_WINSOCK2 0
-
-// Define ACE_HAS_ORBIX to 1 in your config.h file if you want to integrate
-// ACE and Orbix in Win32.
-// Setting applies to : building ACE, linking with ACE
-// Runtime restrictions: system must have Orbix DLLs
-#if !defined (ACE_HAS_ORBIX)
-# define ACE_HAS_ORBIX 0
-#endif
-
-#if !defined (ACE_HAS_MT_ORBIX)
-# define ACE_HAS_MT_ORBIX 0
-#endif
-
-// By default, you will get the proper namespace usage for Orbix. If
-// you don't like this, comment out the #define line or #undef
-// ACE_ORBIX_HAS_NAMESPACES in your config.h file after including this
-// file.
-#if !defined (ACE_ORBIX_HAS_NAMESPACES)
-# define ACE_ORBIX_HAS_NAMESPACES
-#endif /* ACE_ORBIX_HAS_NAMESPACES */
-
-// By default, we use non-static object manager on Win32. That is,
-// the object manager is allocated in main's stack memory. If this
-// does not suit your need, i.e., if your programs depend on the use
-// of static object manager, you neet to disable the behavior by adding
-//
-// #undef ACE_HAS_NONSTATIC_OBJECT_MANAGER
-//
-// in the config.h after including config-win32.h
-//
-// MFC users: the main function is defined within a MFC library and
-// therefore, ACE won't be able to meddle with main function and
-// instantiate the non-static object manager for you. To solve the
-// problem, you'll need to instantiate the ACE_Object_Manager by
-// either:
-//
-// 1. Using static object manager (as described above), however, using
-// the non-static object manager is prefered, therefore,
-// 2. Instantiate the non-static object manager yourself by either 1)
-// call ACE::init () at the beginning and ACE::fini () at the end,
-// _or_ 2) instantiate the ACE_Object_Manager in your CWinApp
-// derived class.
-//
-// Optionally, you can #define
-// ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER in your
-// ace/config.h and always take care of the business by yourself.
-// ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER has no effect when
-// using static object managers.
-#if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
-# define ACE_HAS_NONSTATIC_OBJECT_MANAGER
-#elif (ACE_HAS_NONSTATIC_OBJECT_MANAGER == 0)
-# undef ACE_HAS_NONSTATIC_OBJECT_MANAGER
-#endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
-
-#define ACE_HAS_GPERF
-
-// ---------------- platform features or lack of them -------------
-
-// Windows doesn't like 65536 ;-) If 65536 is specified, it is
-// listenly ignored by the OS, i.e., setsockopt does not fail, and you
-// get stuck with the default size of 8k.
-#define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65535
-
-//
-// It seems like Win32 does not have a limit on the number of buffers
-// that can be transferred by the scatter/gather type of I/O
-// functions, e.g., WSASend and WSARecv. We are arbitrarily setting
-// this to be 1k for now. The typically use case is to create an I/O
-// vector array of size IOV_MAX on the stack and then filled in. Note
-// that we probably don't want too big a value for IOV_MAX since it
-// may mostly go to waste or the size of the activation record may
-// become excessively large.
-//
-#if !defined (IOV_MAX)
-# define IOV_MAX 1024
-#endif /* IOV_MAX */
-
-#if !defined (ACE_HAS_WINCE)
-// Platform supports pread() and pwrite()
-# define ACE_HAS_P_READ_WRITE
-# define ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS
-#endif /* ! ACE_HAS_WINCE */
-
-#define ACE_DEFAULT_THREAD_PRIORITY 0
-
-#define ACE_HAS_RECURSIVE_MUTEXES
-#define ACE_HAS_MSG
-#define ACE_HAS_DIRENT
-#define ACE_HAS_SOCKADDR_MSG_NAME
-#define ACE_LACKS_GETPGID
-#define ACE_LACKS_GETPPID
-#define ACE_LACKS_SETPGID
-#define ACE_LACKS_SETREGID
-#define ACE_LACKS_SETREUID
-#define ACE_HAS_THREAD_SAFE_ACCEPT
-#define ACE_LACKS_GETHOSTENT
-#define ACE_LACKS_SIGACTION
-#define ACE_LACKS_SIGSET
-#define ACE_LACKS_FORK
-#define ACE_LACKS_UNIX_SIGNALS
-#define ACE_LACKS_SBRK
-#define ACE_LACKS_UTSNAME_T
-#define ACE_LACKS_SEMBUF_T
-#define ACE_LACKS_MSGBUF_T
-#define ACE_LACKS_SYSV_SHMEM
-#define ACE_LACKS_UNISTD_H
-#define ACE_LACKS_RLIMIT
-#define ACE_LACKS_MKFIFO
-#define ACE_LACKS_TELLDIR
-#define ACE_LACKS_SEEKDIR
-#define ACE_LACKS_REWINDDIR
-#define ACE_LACKS_READDIR_R
-
-#define ACE_SIZEOF_LONG_LONG 8
-typedef unsigned __int64 ACE_UINT64;
-
-// Optimize ACE_Handle_Set for select().
-#define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
-
-// Win32 has wchar_t support
-#define ACE_HAS_WCHAR
-
-// Compiler/platform correctly calls init()/fini() for shared
-// libraries. - applied for DLLs ?
-//define ACE_HAS_AUTOMATIC_INIT_FINI
-
-// Platform supports POSIX O_NONBLOCK semantics.
-//define ACE_HAS_POSIX_NONBLOCK
-
-// Platform contains <poll.h>.
-//define ACE_HAS_POLL
-
-// Platform supports the /proc file system.
-//define ACE_HAS_PROC_FS
-
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
-// Platform supports the rusage struct.
-#define ACE_HAS_GETRUSAGE
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
-
-// Andreas Ueltschi tells me this is a good thing...
-#define ACE_HAS_SVR5_GETTIMEOFDAY
-
-// Compiler/platform supports SVR4 signal typedef.
-//define ACE_HAS_SVR4_SIGNAL_T
-
-// Platform provides <sys/filio.h> header.
-//define ACE_HAS_SYS_FILIO_H
-
-// Compiler/platform supports sys_siglist array.
-//define ACE_HAS_SYS_SIGLIST
-
-// Platform supports ACE_TLI timod STREAMS module.
-//define ACE_HAS_TIMOD_H
-
-// Platform supports ACE_TLI tiuser header.
-//define ACE_HAS_TIUSER_H
-
-// Platform provides ACE_TLI function prototypes.
-// For Win32, this is not really true, but saves a lot of hassle!
-#define ACE_HAS_TLI_PROTOTYPES
-
-// Platform supports ACE_TLI.
-//define ACE_HAS_TLI
-
-// I'm pretty sure NT lacks these
-#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
-
-// Windows NT needs readv() and writev()
-#define ACE_LACKS_WRITEV
-#define ACE_LACKS_READV
-
-#define ACE_LACKS_COND_T
-#define ACE_LACKS_RWLOCK_T
-
-#define ACE_LACKS_KEY_T
-
-// Platform support for non-blocking connects is broken
-#define ACE_HAS_BROKEN_NON_BLOCKING_CONNECTS
-
-// No system support for replacing any previous mappings.
-#define ACE_LACKS_AUTO_MMAP_REPLACEMENT
-
-// Turns off the tracing feature.
-#if !defined (ACE_NTRACE)
-# define ACE_NTRACE 1
-#endif /* ACE_NTRACE */
-// #define ACE_NLOGGING
-
-// MFC itself defines STRICT.
-#if defined( ACE_HAS_MFC ) && (ACE_HAS_MFC != 0)
-# if !defined(ACE_HAS_STRICT)
-# define ACE_HAS_STRICT 1
-# endif
-# if (ACE_HAS_STRICT != 1)
-# undef ACE_HAS_STRICT
-# define ACE_HAS_STRICT 1
-# endif
-#endif
-
-// If you want to use highres timers, ensure that
-// Build.Settings.C++.CodeGeneration.Processor is
-// set to Pentium !
-#if (_M_IX86 > 400)
-# define ACE_HAS_PENTIUM
-#endif
-
-#if defined(ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
-// Platform supports threads.
-# define ACE_HAS_THREADS
-
-// Platform supports Windows32 threads.
-# define ACE_HAS_WTHREADS
-
-// Compiler/platform has thread-specific storage
-# define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
-// Win32 doesn't have fcntl
-#define ACE_LACKS_FCNTL
-
-// must have _MT defined to include multithreading
-// features from win32 headers
-# if !defined(_MT) && !defined (ACE_HAS_WINCE)
-// *** DO NOT *** defeat this error message by defining _MT yourself.
-// On MSVC, this is changed by selecting the Multithreaded
-// DLL or Debug Multithreaded DLL in the Project Settings
-// under C++ Code Generation.
-# error You must link ACE against multi-threaded libraries (check your project settings)
-# endif /* !_MT && !ACE_HAS_WINCE */
-#endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */
-
-// We are using STL's min and max (in algobase.h). Therefore the
-// macros in window.h are extra
-#if !defined (NOMINMAX)
-# define NOMINMAX
-#endif /* NOMINMAX */
-
-#if !defined(_DEBUG)
-// If we are making a release, and the user has not specified
-// inline directives, we will default to inline
-# if ! defined (__ACE_INLINE__)
-# define __ACE_INLINE__ 1
-# endif /* __ACE_INLINE__ */
-#endif
-
-// If __ACE_INLINE__ is defined to be 0, we will undefine it
-#if defined (__ACE_INLINE__) && (__ACE_INLINE__ == 0)
-# undef __ACE_INLINE__
-#endif /* __ACE_INLINE__ */
-
-// ACE_USES_STATIC_MFC always implies ACE_HAS_MFC
-#if defined (ACE_USES_STATIC_MFC)
-# if defined (ACE_HAS_MFC)
-# undef ACE_HAS_MFC
-# endif
-# define ACE_HAS_MFC 1
-#endif /* ACE_USES_STATIC_MFC */
-
-// We are build ACE and want to use MFC (multithreaded)
-#if defined(ACE_HAS_MFC) && (ACE_HAS_MFC != 0) && defined (_MT)
-# if (ACE_HAS_DLL != 0) && defined(ACE_BUILD_DLL) && !defined (_WINDLL)
-// force multithreaded MFC DLL
-# define _WINDLL
-# endif /* _AFXDLL */
-# if !defined (_AFXDLL) && !defined (ACE_USES_STATIC_MFC)
-# define _AFXDLL
-# endif /* _AFXDLL */
-#endif
-
-// <windows.h> and MFC's <afxwin.h> are mutually
-// incompatible. <windows.h> is brain-dead about MFC; it doesn't check
-// to see whether MFC stuff is anticipated or already in progress
-// before doing its thing. ACE needs (practically always) <winsock.h>,
-// and winsock in turn needs support either from windows.h or from
-// afxwin.h. One or the other, not both.
-//
-// The MSVC++ V4.0 environment defines preprocessor macros that
-// indicate the programmer has chosen something from the
-// Build-->Settings-->General-->MFC combo-box. <afxwin.h> defines a
-// macro itself to protect against double inclusion. We'll take
-// advantage of all this to select the proper support for winsock. -
-// trl 26-July-1996
-
-// This is necessary since MFC users apparently can't #include
-// <windows.h> directly.
-#if defined (ACE_HAS_MFC) && (ACE_HAS_MFC != 0)
-# include /**/ <afxwin.h> /* He is doing MFC */
-// Windows.h will be included via afxwin.h->afx.h->afx_ver_.h->afxv_w32.h
-// #define _INC_WINDOWS // Prevent winsock.h from including windows.h
-#elif defined (ACE_HAS_WINCE)
-# include /**/ <windows.h>
-# include /**/ <wce.h>
-#endif
-
-#if !defined (_INC_WINDOWS) /* Already include windows.h ? */
-// Must define strict before including windows.h !
-# if defined (ACE_HAS_STRICT) && (ACE_HAS_STRICT != 0) && !defined (STRICT)
-# define STRICT 1
-# endif /* ACE_HAS_STRICT */
-
-# if !defined (WIN32_LEAN_AND_MEAN)
-# define WIN32_LEAN_AND_MEAN
-# endif /* WIN32_LEAN_AND_MEAN */
-
-#endif /* !defined (_INC_WINDOWS) */
-
-// Always use WS2 when available
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0))
-# if !defined(ACE_HAS_WINSOCK2)
-# define ACE_HAS_WINSOCK2 1
-# endif /* !defined(ACE_HAS_WINSOCK2) */
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) */
-
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-# if !defined (_WINSOCK2API_)
-// will also include windows.h, if not present
-# include /**/ <winsock2.h>
-# endif /* _WINSOCK2API */
-
-# if defined (ACE_HAS_FORE_ATM_WS2)
-# include /**/ <ws2atm.h>
-# endif /*ACE_HAS_FORE_ATM_WS2 */
-
-# if !defined _MSWSOCK_
-# include /**/ <mswsock.h>
-# endif /* _MSWSOCK_ */
-
-# if defined (_MSC_VER)
-# pragma comment(lib, "ws2_32.lib")
-# pragma comment(lib, "mswsock.lib")
-# endif /* _MSC_VER */
-
-# define ACE_WSOCK_VERSION 2, 0
-#else
-# if !defined (_WINSOCKAPI_)
- // will also include windows.h, if not present
-# include /**/ <winsock.h>
-# endif /* _WINSOCKAPI */
-
-// PharLap ETS has its own winsock lib, so don't grab the one
-// supplied with the OS.
-# if defined (_MSC_VER) && !defined (UNDER_CE) && !defined (ACE_HAS_PHARLAP)
-# pragma comment(lib, "wsock32.lib")
-# endif /* _MSC_VER */
-
-// We can't use recvmsg and sendmsg unless WinSock 2 is available
-# define ACE_LACKS_RECVMSG
-# define ACE_LACKS_SENDMSG
-
-// Version 1.1 of WinSock
-# define ACE_WSOCK_VERSION 1, 1
-#endif /* ACE_HAS_WINSOCK2 */
-
-// Platform supports IP multicast on Winsock 2
-#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
-# define ACE_HAS_IP_MULTICAST
-#endif /* ACE_HAS_WINSOCK2 */
-
-#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && !defined (ACE_USES_WINCE_SEMA_SIMULATION)
-# define ACE_HAS_INTERLOCKED_EXCHANGEADD
-# define ACE_HAS_WIN32_TRYLOCK
-# define ACE_HAS_SIGNAL_OBJECT_AND_WAIT
-
-// If CancelIO is undefined get the updated sp2-sdk from MS
-# define ACE_HAS_CANCEL_IO
-#endif /* (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) && !defined (ACE_USES_WINCE_SEMA_SIMULATION) */
-
-#if !defined (ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION)
-# define ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION EXCEPTION_CONTINUE_SEARCH
-#endif /* ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION */
-
-// Try to make a good guess whether we are compiling with the newer version
-// of WinSock 2 that has GQOS support.
-#if !defined (ACE_HAS_WINSOCK2_GQOS)
-# if defined (WINSOCK_VERSION)
-# define ACE_HAS_WINSOCK2_GQOS 1
-# endif /* WINSOCK_VERSION */
-#endif /* ACE_HAS_WINSOCK2_GQOS */
-
-#include "ace/post.h"
-#endif /* ACE_WIN32_COMMON_H */
diff --git a/ace/config-win32-msvc.h b/ace/config-win32-msvc.h
deleted file mode 100644
index 734f34857cc..00000000000
--- a/ace/config-win32-msvc.h
+++ /dev/null
@@ -1,208 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-// The following configuration file contains the defines
-// common to all Win32/MSVC/MFC combinations.
-
-#ifndef ACE_WIN32_MSVC_H
-#define ACE_WIN32_MSVC_H
-#include "ace/pre.h"
-
-#if defined (_MSC_VER)
-
-# include "ace/config-win32-common.h"
-
-# define ACE_CC_NAME ACE_TEXT ("Visual C++")
-# define ACE_CC_PREPROCESSOR "CL.EXE"
-# define ACE_CC_PREPROCESSOR_ARGS "-nologo -E"
-
-# if (_MSC_VER >= 1200)
-# define ACE_CC_MAJOR_VERSION 6
-# elif (_MSC_VER >= 1100)
-# define ACE_CC_MAJOR_VERSION 5
-# elif (_MSC_VER >= 1000)
-# define ACE_CC_MAJOR_VERSION 4
-# endif /* _MSC_VER >= 1200 */
-
-# define ACE_CC_MINOR_VERSION (_MSC_VER % 100)
-# define ACE_CC_BETA_VERSION (0)
-
-// Define this if you want to use the standard C++ library
-//#define ACE_HAS_STANDARD_CPP_LIBRARY 1
-
-// MSVC enforces the One Definition Rule
-# define ACE_HAS_ONE_DEFINITION_RULE
-
-# if defined (_MSC_VER) && (_MSC_VER >= 1020)
-# if !defined (ACE_HAS_STANDARD_CPP_LIBRARY)
-# define ACE_HAS_STANDARD_CPP_LIBRARY 0
-# endif
-# else
-# if defined (ACE_HAS_STANDARD_CPP_LIBRARY)
-# undef ACE_HAS_STANDARD_CPP_LIBRARY
-# endif
-# define ACE_HAS_STANDARD_CPP_LIBRARY 0
-# endif
-
-// The STL that comes with ACE uses the std namespace. Note however, it is not
-// part of the standard C++ library
-# if !defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
-# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
-# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
-
-# if !defined (ACE_HAS_BROKEN_NESTED_TEMPLATES)
-# define ACE_HAS_BROKEN_NESTED_TEMPLATES
-# endif /* ACE_HAS_BROKEN_NESTED_TEMPLATES */
-
-// By default, we disable the C++ casting because
-// it requires the RTTI support to be turned on which
-// is not something we usually do.
-# if !defined (ACE_HAS_ANSI_CASTS)
-# define ACE_HAS_ANSI_CASTS 0
-# endif
-
-# define ACE_HAS_EXPLICIT_KEYWORD
-# define ACE_HAS_MUTABLE_KEYWORD
-
-// VC5 doesn't support operator placement delete
-# if defined (_MSC_VER) && (_MSC_VER < 1200)
-# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE
-# endif /* _MSC_VER && _MSC_VER < 1200 */
-
-# if !defined (ACE_HAS_WINCE)
-# define ACE_HAS_EXCEPTIONS
-# endif /* ACE_HAS_WINCE */
-# define ACE_HAS_BROKEN_NAMESPACES
-# define ACE_HAS_BROKEN_IMPLICIT_CONST_CAST
-# define ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR
-
-# if defined (ACE_HAS_ANSI_CASTS) && (ACE_HAS_ANSI_CASTS == 0)
-# undef ACE_HAS_ANSI_CASTS
-# endif /* ACE_HAS_ANSI_CASTS && ACE_HAS_ANSI_CASTS == 0 */
-
-# if _MSC_VER < 1000
-# define ACE_LACKS_PRAGMA_ONCE
-# endif /* _MSC_VER < 1000 */
-
-// Only >= MSVC 5.0 definitions
-# if (_MSC_VER >= 1100)
-# if !defined (ACE_HAS_WINCE)
-# define ACE_HAS_SIG_ATOMIC_T
-# endif /* ACE_HAS_WINCE */
-# endif /* _MSC_VER >= 1100 */
-
-// Only >= MSVC 6.0 definitions
-# if (_MSC_VER >= 1200)
-# define ACE_HAS_TYPENAME_KEYWORD
-# define ACE_HAS_STD_TEMPLATE_SPECIALIZATION
-# endif /* _MSC_VER >= 1200 */
-
-// Compiler doesn't support static data member templates.
-# define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
-
-# define ACE_LACKS_MODE_MASKS
-# define ACE_LACKS_STRRECVFD
-
-// Compiler/platform has correctly prototyped header files.
-# define ACE_HAS_CPLUSPLUS_HEADERS
-
-// Platform supports POSIX timers via timestruc_t.
-//define ACE_HAS_POSIX_TIME
-# define ACE_HAS_STRPTIME
-# define ACE_LACKS_NATIVE_STRPTIME
-
-// Compiler/platform supports strerror ().
-# define ACE_HAS_STRERROR
-
-# define ACE_TEMPLATES_REQUIRE_SOURCE
-
-// Platform provides ACE_TLI function prototypes.
-// For Win32, this is not really true, but saves a lot of hassle!
-# define ACE_HAS_TLI_PROTOTYPES
-# define ACE_HAS_GNU_CSTRING_H
-
-// Platform support linebuffered streaming is broken
-# define ACE_LACKS_LINEBUFFERED_STREAMBUF
-
-// Template specialization is supported.
-# define ACE_HAS_TEMPLATE_SPECIALIZATION
-
-// ----------------- "derived" defines and includes -----------
-
-# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0)
-
-# if (_MSC_VER > 1020)
-// Platform has its Standard C++ library in the namespace std
-# if !defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
-# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
-# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
-# else /* (_MSC_VER > 1020) */
-# if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
-# undef ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB
-# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
-# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 0
-# endif /* (_MSC_VER > 1020) */
-
-// Microsoft's auto_ptr in standard cpp library doesn't have reset ().
-# define ACE_AUTO_PTR_LACKS_RESET
-
-// ace/iostream.h does not work with the standard cpp library (yet).
-# if !defined (ACE_USES_OLD_IOSTREAMS)
-# define ACE_LACKS_ACE_IOSTREAM
-# endif /* ! ACE_USES_OLD_IOSTREAMS */
-# else
-// iostream header lacks ipfx (), isfx (), etc., declarations
-# define ACE_LACKS_IOSTREAM_FX
-# endif
-
-// While digging the MSVC 4.0 include files, I found how to disable
-// MSVC warnings: --Amos Shapira
-
-// "C4355: 'this' : used in base member initializer list"
-# pragma warning(disable:4355) /* disable C4514 warning */
-// #pragma warning(default:4355) // use this to reenable, if desired
-
-# pragma warning(disable:4201) /* winnt.h uses nameless structs */
-
-# pragma warning(disable:4231)
-// Disable warning of using Microsoft Extension.
-
-// MSVC 4.0 or greater
-# if (_MSC_VER >= 1000)
-// Compiler/Platform supports the "using" keyword.
-# define ACE_HAS_USING_KEYWORD
-# endif
-
-// MSVC 2.2 or lower
-# if (_MSC_VER < 1000)
-// This needs to be here since MSVC++ 2.0 seems to have forgotten to
-// include it. Does anybody know which MSC_VER MSVC 2.0 has ?
-inline void *operator new (unsigned int, void *p) { return p; }
-# endif
-
-# if !defined(ACE_HAS_WINCE)
-# if defined(ACE_HAS_DLL) && (ACE_HAS_DLL != 0)
-# if !defined(_DLL)
-// *** DO NOT *** DO NOT *** defeat this error message
-// by defining _DLL yourself. RTFM and see who set _DLL.
-# error You must link against (Debug) Multithreaded DLL run-time libraries.
-# endif /* !_DLL */
-# endif /* ACE_HAS_DLL && ACE_HAS_DLL != 0 */
-# endif /* !ACE_HAS_WINCE */
-
-# ifdef _DEBUG
-# if !defined (ACE_HAS_WINCE)
-# include /**/ <crtdbg.h>
-# endif /* ACE_HAS_WINCE */
-# endif
-
-# pragma warning(default: 4201) /* winnt.h uses nameless structs */
-
-// At least for Win32 - MSVC compiler (ver. 5)
-# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT ("%I64d")
-# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%I64u")
-
-#endif /* _MSC_VER */
-
-#include "ace/post.h"
-#endif /* ACE_WIN32_COMMON_H */
diff --git a/ace/config-win32-visualage.h b/ace/config-win32-visualage.h
deleted file mode 100644
index 8a2823dbc0f..00000000000
--- a/ace/config-win32-visualage.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-//Created for IBMCPP
-// The following configuration file contains the defines
-// common to all VisualAge compilers.
-
-#ifndef ACE_WIN32_VISUALAGECPP_H
-#define ACE_WIN32_VISUALAGECPP_H
-#include "ace/pre.h"
-
-#if defined (__IBMCPP__) && (__IBMCPP__ >= 400)
-
-#define ACE_CC_NAME ACE_TEXT ("IBM VisualAge C++")
-#define ACE_CC_MAJOR_VERSION (__IBMCPP__ / 0x100)
-#define ACE_CC_MINOR_VERSION (__IBMCPP__ % 0x100)
-#define ACE_CC_BETA_VERSION (0)
-#define ACE_CC_PREPROCESSOR ""
-#define ACE_CC_PREPROCESSOR_ARGS ""
-
-//These need to be defined for VisualAgeC++
-#define ERRMAX 256 /* Needed for following define */
-#define ACE_LACKS_SYS_NERR /* Needed for sys_nerr in Log_Msg.cpp */
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES /* For signal handling */
-#define ACE_HAS_TYPENAME_KEYWORD
-#define ACE_LACKS_MKTEMP
-#define ACE_HAS_CONSISTENT_SIGNAL_PROTOTYPES
-#define NSIG 23 /* Maximum no. of signals + 1 */
-#define ACE_HAS_ANSI_CASTS 1
-#define ACE_HAS_BROKEN_NESTED_TEMPLATES 1
-#define ACE_HAS_CPLUSPLUS_HEADERS 1
-#define ACE_HAS_EXCEPTIONS 1
-#define ACE_HAS_EXPLICIT_KEYWORD 1
-#define ACE_HAS_GNU_CSTRING_H 1
-#define ACE_HAS_MUTABLE_KEYWORD 1
-#define ACE_HAS_NONCONST_SELECT_TIMEVAL 1
-#define ACE_HAS_ONE_DEFINITION_RULE 1
-#define ACE_HAS_SIG_ATOMIC_T 1
-#define ACE_HAS_STANDARD_CPP_LIBRARY 1
-#define ACE_HAS_STDCPP_STL_INCLUDES 1
-#define ACE_HAS_STRERROR 1
-#define ACE_HAS_STRING_CLASS 1
-#define ACE_HAS_STRPTIME 1
-#define ACE_HAS_TEMPLATE_SPECIALIZATION 1
-#define ACE_HAS_TEMPLATE_TYPEDEFS 1
-#define ACE_HAS_TYPENAME_KEYWORD 1
-#define ACE_HAS_USING_KEYWORD 1
-#define ACE_LACKS_ACE_IOSTREAM 1
-#define ACE_LACKS_LINEBUFFERED_STREAMBUF 1
-#define ACE_LACKS_MODE_MASKS 1
-#define ACE_LACKS_NATIVE_STRPTIME 1
-#define ACE_LACKS_PRAGMA_ONCE 1
-#define ACE_LACKS_STRRECVFD 1
-#define ACE_NEW_THROWS_EXCEPTIONS 1
-#define ACE_SIZEOF_LONG_DOUBLE 10
-#define ACE_TEMPLATES_REQUIRE_SOURCE 1
-#define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%I64u")
-#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
-
-#undef WIFEXITED
-#undef WEXITSTATUS
-
-#define _O_RDWR O_RDWR
-#define _O_WRONLY O_WRONLY
-#define _O_RDONLY O_RDONLY
-#define _O_APPEND O_APPEND
-#define _O_BINARY O_BINARY
-#define _O_TEXT O_TEXT
-
-#define _endthreadex _endthread
-#define _beginthreadex _beginthread
-
-//Error codes that are in MS Visual C++
-#define EFAULT 99 /* Error code (should be in errno.h) */
-#define ENODEV 19
-#define EPIPE 32
-#define ENAMETOOLONG 38
-
-#endif /* defined(__IBMCPP__) */
-
-#include "ace/post.h"
-#endif /* ACE_WIN32_VISUALAGECPP_H */
diff --git a/ace/config-win32.h b/ace/config-win32.h
deleted file mode 100644
index 58cc18a6fa8..00000000000
--- a/ace/config-win32.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// The following configuration file is designed to work for Windows
-// 9x, Windows NT 3.51, and Windows NT 4.0 platforms and supports a
-// variety of compilers.
-
-#ifndef ACE_CONFIG_H
-#define ACE_CONFIG_H
-#include "ace/pre.h"
-
-#if defined (ACE_HAS_WINCE) || defined (UNDER_CE)
-# include "ace/config-WinCE.h"
-#endif /* ACE_HAS_WINCE */
-
-#if defined (_MSC_VER)
-# include "ace/config-win32-msvc.h"
-#elif defined (__BORLANDC__)
-# include "ace/config-win32-borland.h"
-#elif defined (__IBMCPP__)
-# include "ace/config-win32-visualage.h"
-#else
-# error "Compiler does not seem to be supported"
-#endif /* _MSC_VER */
-
-#include "ace/post.h"
-#endif /* ACE_CONFIG_H */
diff --git a/ace/gethrtime.cpp b/ace/gethrtime.cpp
deleted file mode 100644
index 518d5172992..00000000000
--- a/ace/gethrtime.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// $Id$
-//
-// Build this file with g++. It can be linked in to a ACE application
-// that was compiled with GreenHills. It wouldn't be necessary if I
-// knew a way to correctly move values from registers to a 64-bit
-// variable in GHS asm code. That's easy with g++ asm.
-
-#include "ace/OS.h"
-
-ACE_RCSID(ace, gethrtime, "$Id$")
-
-extern "C"
-ACE_hrtime_t
-ACE_gethrtime (void)
-{
-#if defined (ACE_HAS_PENTIUM)
- // ACE_TRACE ("ACE_gethrtime");
-
-#if defined (ACE_LACKS_LONGLONG_T)
- double now;
-#else /* ! ACE_LACKS_LONGLONG_T */
- ACE_hrtime_t now;
-#endif /* ! ACE_LACKS_LONGLONG_T */
-
- // See comments about the RDTSC Pentium instruction for the
- // ACE_WIN32 version of ACE_OS::gethrtime () in ace/OS.i.
- //
- // Read the high-res tick counter directly into memory variable
- // "now". The A constraint signifies a 64-bit int.
-#if defined (__GNUG__)
- asm volatile ("rdtsc" : "=A" (now) : : "memory");
-// #elif defined (ghs)
-// The following doesn't work. For now, this file must be compile with g++.
-// asm ("rdtsc");
-// asm ("movl %edx,-16(%ebp)");
-// asm ("movl %eax,-12(%ebp)");
-#else
-# error unsupported compiler
-#endif
-
-#if defined (ACE_LACKS_LONGLONG_T)
- // ACE_U_LongLong doesn't have the same layout as now, so construct
- // it "properly".
- ACE_UINT32 least, most;
- ACE_OS::memcpy (&least, &now, sizeof (ACE_UINT32));
- ACE_OS::memcpy (&most, (unsigned char *) &now + sizeof (ACE_UINT32),
- sizeof (ACE_UINT32));
-
- const ACE_hrtime_t ret (least, most);
- return ret;
-#else /* ! ACE_LACKS_LONGLONG_T */
- return now;
-#endif /* ! ACE_LACKS_LONGLONG_T */
-
-#else /* ! ACE_HAS_PENTIUM */
-# error This file can _only_ be compiled with ACE_HAS_PENTIUM.
-#endif /* ! ACE_HAS_PENTIUM */
-}
diff --git a/ace/iosfwd.h b/ace/iosfwd.h
deleted file mode 100644
index d99e941bdfd..00000000000
--- a/ace/iosfwd.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// iosfwd.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// = DESCRIPTION
-// This file contains the portability ugliness for the Standard C++
-// Library. As implementations of the "standard" emerge, this file
-// will need to be updated.
-//
-// This files deals with forward declaration for the stream
-// classes. Remember that since the new Standard C++ Library code
-// for streams uses templates, simple forward declaration will not
-// work.
-//
-// ============================================================================
-
-#ifndef ACE_IOSFWD_H
-#define ACE_IOSFWD_H
-#include "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && \
- (ACE_HAS_STANDARD_CPP_LIBRARY != 0)
-
-# if !defined (ACE_USES_OLD_IOSTREAMS) || \
- defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION)
-# include /**/ <iosfwd>
-# endif /* ! ACE_USES_OLD_IOSTREAMS || ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */
-
-# if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \
- (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0)
-
-# if !defined (ACE_USES_OLD_IOSTREAMS)
- // Make these available in the global name space
- using std::ios;
- using std::streambuf;
- using std::istream;
- using std::ostream;
- using std::iostream;
- using std::filebuf;
- using std::ifstream;
- using std::ofstream;
- using std::fstream;
-# endif /* ! ACE_USES_OLD_IOSTREAMS */
-
-# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
-
-#else /* ! ACE_HAS_STANDARD_CPP_LIBRARY */
-
- class ios;
- class streambuf;
- class istream;
- class ostream;
- class iostream;
- class filebuf;
- class ifstream;
- class ofstream;
- class fstream;
-
-# endif /* ! ACE_HAS_STANDARD_CPP_LIBRARY */
-
-#include "ace/post.h"
-#endif /* ACE_IOSFWD_H */
diff --git a/ace/makefile-light b/ace/makefile-light
deleted file mode 100644
index 7086c0bb8a5..00000000000
--- a/ace/makefile-light
+++ /dev/null
@@ -1,883 +0,0 @@
-#----------------------------------------------------------------------------
-# @(#)makefile-light 1.1 10/18/96
-#
-# Sun Makefile for a lightweight version of the ACE library
-#
-# 1. The Reactor class category
-# 2. The SOCK_SAP C++ wrappers for sockets
-# 3. The threading and synchronization wrappers.
-# 4. The Acceptor/Connector classes
-#----------------------------------------------------------------------------
-
-LIB = libIR_ACE.a
-SHLIB = libIR_ACE.so
-
-SRC = Acceptor.C \
- Addr.C \
- Atomic_Op.C \
- Connector.C \
- Event_Handler.C \
- Event_Handler_T.C \
- Get_Opt.C \
- Handle_Set.C \
- INET_Addr.C \
- IPC_SAP.C \
- LSOCK.C \
- LSOCK_Acceptor.C \
- LSOCK_CODgram.C \
- LSOCK_Connector.C \
- LSOCK_Dgram.C \
- LSOCK_Stream.C \
- Misc.C \
- Reactor.C \
- SOCK.C \
- SOCK_Acceptor.C \
- SOCK_CODgram.C \
- SOCK_Connector.C \
- SOCK_Dgram.C \
- SOCK_Dgram_Bcast.C \
- SOCK_IO.C \
- SOCK_Dgram_Mcast.C \
- SOCK_Stream.C \
- Signal.C \
- Svc_Handler.C \
- Synch.C \
- Thread.C \
- Thread_Manager.C \
- Time_Value.C \
- Timer_Queue.C \
- Token.C \
- UNIX_Addr.C
-
-OBJ = Acceptor.o \
- Addr.o \
- Atomic_Op.o \
- Connector.o \
- Event_Handler.o \
- Event_Handler_T.o \
- Get_Opt.o \
- Handle_Set.o \
- INET_Addr.o \
- IPC_SAP.o \
- LSOCK.o \
- LSOCK_Acceptor.o \
- LSOCK_CODgram.o \
- LSOCK_Connector.o \
- LSOCK_Dgram.o \
- LSOCK_Stream.o \
- Misc.o \
- Reactor.o \
- SOCK.o \
- SOCK_Acceptor.o \
- SOCK_CODgram.o \
- SOCK_Connector.o \
- SOCK_Dgram.o \
- SOCK_Dgram_Bcast.o \
- SOCK_IO.o \
- SOCK_Dgram_Mcast.o \
- SOCK_Stream.o \
- Signal.o \
- Svc_Handler.o \
- Synch.o \
- Thread.o \
- Thread_Manager.o \
- Time_Value.o \
- Timer_Queue.o \
- Token.o \
- UNIX_Addr.o
-
-SHOBJ = Acceptor.so \
- Addr.so \
- Atomic_Op.so \
- Connector.so \
- Event_Handler.so \
- Event_Handler_T.so \
- Get_Opt.so \
- Handle_Set.so \
- INET_Addr.so \
- IPC_SAP.so \
- LSOCK.so \
- LSOCK_Acceptor.so \
- LSOCK_CODgram.so \
- LSOCK_Connector.so \
- LSOCK_Dgram.so \
- LSOCK_Stream.so \
- Misc.so \
- Reactor.so \
- SOCK.so \
- SOCK_Acceptor.so \
- SOCK_CODgram.so \
- SOCK_Connector.so \
- SOCK_Dgram.so \
- SOCK_Dgram_Bcast.so \
- SOCK_IO.so \
- SOCK_Dgram_Mcast.so \
- SOCK_Stream.so \
- Signal.so \
- Svc_Handler.so \
- Synch.so \
- Thread.so \
- Thread_Manager.so \
- Time_Value.so \
- Timer_Queue.so \
- Token.so \
- UNIX_Addr.so
-
-#----------------------------------------------------------------------------
-# Local Macros and Targets
-#----------------------------------------------------------------------------
-
-# Set up the suffixes for C++ and IDL.
-.SUFFIXES: .cc .C $(SUFFIXES)
-
-%.o: %.C
- $(COMPILE.cc) -o $@ $<
-
-%.o: %.cc
- $(COMPILE.cc) -o $@ $<
-
-%.so: %.C
- $(SOBUILD)
-
-# Turn off logging to remove the dependency on the Log_Msg class.
-AR = CC
-ARFLAGS = -xar -o
-DEFFLAGS += -DACE_NLOGGING
-INCLDIRS += -I$(ACE_ROOT)/include
-CPPFLAGS += $(DEFFLAGS) $(INCLDIRS)
-CCFLAGS += -g
-CXX = CC
-DLD = $(CXX)
-PIC = -pic
-SOFLAGS = -G $(CPPFLAGS)
-SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.o $<; \
- $(SOLINK.cc) -o $@ -h $@ $(LDFLAGS) $(VSHDIR)$*.o
-
-COMPILE.cc =$(CXX) $(CCFLAGS) $(CPPFLAGS) -c
-LINK.cc =$(CXX) $(CCFLAGS) $(CPPFLAGS)
-SOLINK.cc =$(DLD) $(SOFLAGS)
-
-all: build
-
-build: $(SHLIB) # Replace with $(LIB) if you only want to build static libs.
-
-$(LIB): $(OBJ)
- $(AR) $(ARFLAGS) $@ $?
-
-$(SHLIB): $(SHOBJ)
- $(SOLINK.cc) -o $@ $(LDFLAGS) *.o -lsocket -lnsl
-
- -$(RM) -rf *.o *.so *~ *.bak makefile-light.old core Templates.DB
-
- -$(RM) -f *.o *~ *.bak Makefile.old core
- -$(RM) -rf ptrepository Templates.DB
-
-realclean: clean
- -$(RM) -f $(LIB) $(SHLIB)
-
-#----------------------------------------------------------------------------
-# Dependency generation target
-#----------------------------------------------------------------------------
-
-depend: makefile-light
- @$(RM) -f makefile-light.old
- @cp makefile-light makefile-light.old
- $(ACE_ROOT)/bin/g++dep -f makefile-light $(CPPFLAGS) $(SRC)
- @cat makefile-light | \
- sed -e "s;$(ACE_ROOT);$$(ACE_ROOT);g" \
- -e "/:$$/d" \
- > makefile-light.new
- @mv makefile-light.new makefile-light
- @if cmp -s makefile-light makefile-light.old ;\
- then echo "Makefile dependencies unchanged." ;\
- else \
- echo "Makefile dependencies updated." ;\
- fi ;\
- $(RM) -f makefile-light.old ;
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-Acceptor.o: Acceptor.C \
- $(ACE_ROOT)/include/ace/Acceptor.h \
- $(ACE_ROOT)/include/ace/Service_Config.h \
- $(ACE_ROOT)/include/ace/Reactor.h \
- $(ACE_ROOT)/include/ace/Handle_Set.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Handle_Set.i \
- $(ACE_ROOT)/include/ace/Timer_Queue.h \
- $(ACE_ROOT)/include/ace/Event_Handler.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Timer_Queue.i \
- $(ACE_ROOT)/include/ace/Signal.h \
- $(ACE_ROOT)/include/ace/Thread.h \
- $(ACE_ROOT)/include/ace/Token.h \
- $(ACE_ROOT)/include/ace/Reactor.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i \
- $(ACE_ROOT)/include/ace/Service_Repository.h \
- $(ACE_ROOT)/include/ace/Service_Types.h \
- $(ACE_ROOT)/include/ace/Service_Object.h \
- $(ACE_ROOT)/include/ace/Shared_Object.h \
- $(ACE_ROOT)/include/ace/Stream.h \
- $(ACE_ROOT)/include/ace/Module.h \
- $(ACE_ROOT)/include/ace/Task.h \
- $(ACE_ROOT)/include/ace/Trace.h \
- $(ACE_ROOT)/include/ace/Message_Queue.h \
- $(ACE_ROOT)/include/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Manager.h \
- $(ACE_ROOT)/include/ace/Svc_Handler.h \
- $(ACE_ROOT)/include/ace/Svc_Handler.i \
- $(ACE_ROOT)/include/ace/Acceptor.i \
- $(ACE_ROOT)/include/ace/Get_Opt.h
-Addr.o: Addr.C \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Addr.i
-Atomic_Op.o: Atomic_Op.C
-Connector.o: Connector.C \
- $(ACE_ROOT)/include/ace/Connector.h \
- $(ACE_ROOT)/include/ace/Service_Config.h \
- $(ACE_ROOT)/include/ace/Reactor.h \
- $(ACE_ROOT)/include/ace/Handle_Set.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Handle_Set.i \
- $(ACE_ROOT)/include/ace/Timer_Queue.h \
- $(ACE_ROOT)/include/ace/Event_Handler.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Timer_Queue.i \
- $(ACE_ROOT)/include/ace/Signal.h \
- $(ACE_ROOT)/include/ace/Thread.h \
- $(ACE_ROOT)/include/ace/Token.h \
- $(ACE_ROOT)/include/ace/Reactor.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i \
- $(ACE_ROOT)/include/ace/Service_Repository.h \
- $(ACE_ROOT)/include/ace/Service_Types.h \
- $(ACE_ROOT)/include/ace/Service_Object.h \
- $(ACE_ROOT)/include/ace/Shared_Object.h \
- $(ACE_ROOT)/include/ace/Stream.h \
- $(ACE_ROOT)/include/ace/Module.h \
- $(ACE_ROOT)/include/ace/Task.h \
- $(ACE_ROOT)/include/ace/Trace.h \
- $(ACE_ROOT)/include/ace/Message_Queue.h \
- $(ACE_ROOT)/include/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Manager.h \
- $(ACE_ROOT)/include/ace/Map_Manager.h \
- $(ACE_ROOT)/include/ace/Svc_Handler.h \
- $(ACE_ROOT)/include/ace/Svc_Handler.i \
- $(ACE_ROOT)/include/ace/Connector.i
-Event_Handler.o: Event_Handler.C \
- $(ACE_ROOT)/include/ace/Event_Handler.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Event_Handler.i
-Event_Handler_T.o: Event_Handler_T.C \
- $(ACE_ROOT)/include/ace/Event_Handler_T.h \
- $(ACE_ROOT)/include/ace/Event_Handler.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Event_Handler_T.i
-Get_Opt.o: Get_Opt.C \
- $(ACE_ROOT)/include/ace/Get_Opt.h \
- $(ACE_ROOT)/include/ace/Get_Opt.i \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h
-Handle_Set.o: Handle_Set.C \
- $(ACE_ROOT)/include/ace/Handle_Set.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Handle_Set.i
-INET_Addr.o: INET_Addr.C \
- $(ACE_ROOT)/include/ace/INET_Addr.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/INET_Addr.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i
-IPC_SAP.o: IPC_SAP.C \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i
-LSOCK.o: LSOCK.C \
- $(ACE_ROOT)/include/ace/LSOCK.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/LSOCK.i
-LSOCK_Acceptor.o: LSOCK_Acceptor.C \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i \
- $(ACE_ROOT)/include/ace/LSOCK_Acceptor.h \
- $(ACE_ROOT)/include/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/include/ace/SOCK_Stream.h \
- $(ACE_ROOT)/include/ace/SOCK_IO.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_IO.i \
- $(ACE_ROOT)/include/ace/SOCK_Stream.i \
- $(ACE_ROOT)/include/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/include/ace/UNIX_Addr.h \
- $(ACE_ROOT)/include/ace/LSOCK_Stream.h \
- $(ACE_ROOT)/include/ace/LSOCK.h \
- $(ACE_ROOT)/include/ace/LSOCK.i \
- $(ACE_ROOT)/include/ace/LSOCK_Stream.i
-LSOCK_CODgram.o: LSOCK_CODgram.C \
- $(ACE_ROOT)/include/ace/LSOCK_CODgram.h \
- $(ACE_ROOT)/include/ace/LSOCK.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/LSOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_CODgram.h \
- $(ACE_ROOT)/include/ace/SOCK_IO.h \
- $(ACE_ROOT)/include/ace/SOCK_IO.i \
- $(ACE_ROOT)/include/ace/SOCK_CODgram.i \
- $(ACE_ROOT)/include/ace/LSOCK_CODgram.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i
-LSOCK_Connector.o: LSOCK_Connector.C \
- $(ACE_ROOT)/include/ace/LSOCK_Connector.h \
- $(ACE_ROOT)/include/ace/SOCK_Connector.h \
- $(ACE_ROOT)/include/ace/SOCK_Stream.h \
- $(ACE_ROOT)/include/ace/SOCK_IO.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_IO.i \
- $(ACE_ROOT)/include/ace/SOCK_Stream.i \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/SOCK_Connector.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i \
- $(ACE_ROOT)/include/ace/LSOCK_Stream.h \
- $(ACE_ROOT)/include/ace/LSOCK.h \
- $(ACE_ROOT)/include/ace/LSOCK.i \
- $(ACE_ROOT)/include/ace/LSOCK_Stream.i \
- $(ACE_ROOT)/include/ace/UNIX_Addr.h \
- $(ACE_ROOT)/include/ace/LSOCK_Connector.i
-LSOCK_Dgram.o: LSOCK_Dgram.C \
- $(ACE_ROOT)/include/ace/LSOCK_Dgram.h \
- $(ACE_ROOT)/include/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/include/ace/LSOCK.h \
- $(ACE_ROOT)/include/ace/LSOCK.i \
- $(ACE_ROOT)/include/ace/LSOCK_Dgram.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i
-LSOCK_Stream.o: LSOCK_Stream.C \
- $(ACE_ROOT)/include/ace/LSOCK_Stream.h \
- $(ACE_ROOT)/include/ace/SOCK_Stream.h \
- $(ACE_ROOT)/include/ace/SOCK_IO.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_IO.i \
- $(ACE_ROOT)/include/ace/SOCK_Stream.i \
- $(ACE_ROOT)/include/ace/LSOCK.h \
- $(ACE_ROOT)/include/ace/LSOCK.i \
- $(ACE_ROOT)/include/ace/LSOCK_Stream.i
-Misc.o: Misc.C \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Time_Value.h
-Reactor.o: Reactor.C \
- $(ACE_ROOT)/include/ace/Reactor.h \
- $(ACE_ROOT)/include/ace/Handle_Set.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Handle_Set.i \
- $(ACE_ROOT)/include/ace/Timer_Queue.h \
- $(ACE_ROOT)/include/ace/Event_Handler.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Timer_Queue.i \
- $(ACE_ROOT)/include/ace/Signal.h \
- $(ACE_ROOT)/include/ace/Thread.h \
- $(ACE_ROOT)/include/ace/Token.h \
- $(ACE_ROOT)/include/ace/Reactor.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i
-SOCK.o: SOCK.C \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i
-SOCK_Acceptor.o: SOCK_Acceptor.C \
- $(ACE_ROOT)/include/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/SOCK_Stream.h \
- $(ACE_ROOT)/include/ace/SOCK_IO.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_IO.i \
- $(ACE_ROOT)/include/ace/SOCK_Stream.i \
- $(ACE_ROOT)/include/ace/SOCK_Acceptor.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i
-SOCK_CODgram.o: SOCK_CODgram.C \
- $(ACE_ROOT)/include/ace/SOCK_CODgram.h \
- $(ACE_ROOT)/include/ace/SOCK_IO.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_IO.i \
- $(ACE_ROOT)/include/ace/SOCK_CODgram.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i
-SOCK_Connector.o: SOCK_Connector.C \
- $(ACE_ROOT)/include/ace/SOCK_Connector.h \
- $(ACE_ROOT)/include/ace/SOCK_Stream.h \
- $(ACE_ROOT)/include/ace/SOCK_IO.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_IO.i \
- $(ACE_ROOT)/include/ace/SOCK_Stream.i \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/SOCK_Connector.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i \
- $(ACE_ROOT)/include/ace/Handle_Set.h \
- $(ACE_ROOT)/include/ace/Handle_Set.i \
- $(ACE_ROOT)/include/ace/INET_Addr.h
-SOCK_Dgram.o: SOCK_Dgram.C \
- $(ACE_ROOT)/include/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i
-SOCK_Dgram_Bcast.o: SOCK_Dgram_Bcast.C \
- $(ACE_ROOT)/include/ace/SOCK_Dgram_Bcast.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/INET_Addr.h \
- $(ACE_ROOT)/include/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/include/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/include/ace/SOCK_Dgram_Bcast.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i
-SOCK_IO.o: SOCK_IO.C \
- $(ACE_ROOT)/include/ace/SOCK_IO.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_IO.i
-SOCK_Dgram_Mcast.o: SOCK_Dgram_Mcast.C \
- $(ACE_ROOT)/include/ace/SOCK_Dgram_Mcast.h \
- $(ACE_ROOT)/include/ace/SOCK_Dgram.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_Dgram.i \
- $(ACE_ROOT)/include/ace/INET_Addr.h \
- $(ACE_ROOT)/include/ace/SOCK_Dgram_Mcast.i
-SOCK_Stream.o: SOCK_Stream.C \
- $(ACE_ROOT)/include/ace/SOCK_Stream.h \
- $(ACE_ROOT)/include/ace/SOCK_IO.h \
- $(ACE_ROOT)/include/ace/SOCK.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/SOCK.i \
- $(ACE_ROOT)/include/ace/SOCK_IO.i \
- $(ACE_ROOT)/include/ace/SOCK_Stream.i
-Signal.o: Signal.C \
- $(ACE_ROOT)/include/ace/Signal.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/Event_Handler.h \
- $(ACE_ROOT)/include/ace/Signal.i
-Svc_Handler.o: Svc_Handler.C \
- $(ACE_ROOT)/include/ace/Svc_Handler.h \
- $(ACE_ROOT)/include/ace/Task.h \
- $(ACE_ROOT)/include/ace/Trace.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/Service_Object.h \
- $(ACE_ROOT)/include/ace/Shared_Object.h \
- $(ACE_ROOT)/include/ace/Event_Handler.h \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i \
- $(ACE_ROOT)/include/ace/Message_Queue.h \
- $(ACE_ROOT)/include/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Manager.h \
- $(ACE_ROOT)/include/ace/Thread.h \
- $(ACE_ROOT)/include/ace/Service_Config.h \
- $(ACE_ROOT)/include/ace/Reactor.h \
- $(ACE_ROOT)/include/ace/Handle_Set.h \
- $(ACE_ROOT)/include/ace/Handle_Set.i \
- $(ACE_ROOT)/include/ace/Timer_Queue.h \
- $(ACE_ROOT)/include/ace/Timer_Queue.i \
- $(ACE_ROOT)/include/ace/Signal.h \
- $(ACE_ROOT)/include/ace/Token.h \
- $(ACE_ROOT)/include/ace/Reactor.i \
- $(ACE_ROOT)/include/ace/Service_Repository.h \
- $(ACE_ROOT)/include/ace/Service_Types.h \
- $(ACE_ROOT)/include/ace/Stream.h \
- $(ACE_ROOT)/include/ace/Module.h \
- $(ACE_ROOT)/include/ace/Svc_Handler.i
-Synch.o: Synch.C \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/Synch.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i \
- $(ACE_ROOT)/include/ace/Thread.h
-Thread.o: Thread.C \
- $(ACE_ROOT)/include/ace/Thread.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Thread.i
-Thread_Manager.o: Thread_Manager.C \
- $(ACE_ROOT)/include/ace/Thread_Manager.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/Thread.h \
- $(ACE_ROOT)/include/ace/Thread_Manager.i \
- $(ACE_ROOT)/include/ace/Log_Msg.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.h \
- $(ACE_ROOT)/include/ace/FIFO_Send.h \
- $(ACE_ROOT)/include/ace/FIFO.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.h \
- $(ACE_ROOT)/include/ace/IPC_SAP.i \
- $(ACE_ROOT)/include/ace/FIFO_Send.i \
- $(ACE_ROOT)/include/ace/FIFO_Send_Msg.i \
- $(ACE_ROOT)/include/ace/Log_Record.h \
- $(ACE_ROOT)/include/ace/Log_Priority.h \
- $(ACE_ROOT)/include/ace/Log_Record.i \
- $(ACE_ROOT)/include/ace/Log_Msg.i
-Thread_Specific.o: Thread_Specific.C \
- $(ACE_ROOT)/include/ace/Thread_Specific.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/Thread_Specific.i
-Time_Value.o: Time_Value.C \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Time_Value.i
-Timer_Queue.o: Timer_Queue.C \
- $(ACE_ROOT)/include/ace/Timer_Queue.h \
- $(ACE_ROOT)/include/ace/Event_Handler.h \
- $(ACE_ROOT)/include/ace/Time_Value.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Timer_Queue.i
-Token.o: Token.C \
- $(ACE_ROOT)/include/ace/Thread.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/Token.h \
- $(ACE_ROOT)/include/ace/Synch.h \
- $(ACE_ROOT)/include/ace/Time_Value.h
-UNIX_Addr.o: UNIX_Addr.C \
- $(ACE_ROOT)/include/ace/UNIX_Addr.h \
- $(ACE_ROOT)/include/ace/Addr.h \
- $(ACE_ROOT)/include/ace/sysincludes.h \
- $(ACE_ROOT)/include/ace/config.h \
- $(ACE_ROOT)/include/ace/Misc.h \
- $(ACE_ROOT)/include/ace/UNIX_Addr.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/ace/post.h b/ace/post.h
deleted file mode 100644
index 419ea8af80b..00000000000
--- a/ace/post.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// post.h
-//
-// = AUTHOR
-// Christopher Kohlhoff <chris@kohlhoff.com>
-//
-// = DESCRIPTION
-// This file restore the original alignment rules.
-//
-// ============================================================================
-
-// No header guard
-#if defined (_MSC_VER)
-# pragma pack (pop)
-#elif defined (__BORLANDC__)
-# pragma option pop
-# pragma nopushoptwarn
-# pragma nopackwarning
-#endif
diff --git a/ace/pre.h b/ace/pre.h
deleted file mode 100644
index 0361b1a3c31..00000000000
--- a/ace/pre.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// pre.h
-//
-// = AUTHOR
-// Christopher Kohlhoff <chris@kohlhoff.com>
-//
-// = DESCRIPTION
-// This file save the original alignment rules and changes the alignment
-// boundary to ACE's default.
-//
-// ============================================================================
-
-// No header guard
-#if defined (_MSC_VER)
-# pragma warning (disable:4103)
-# pragma pack (push, 8)
-#elif defined (__BORLANDC__)
-# pragma option push -a8 -b -Ve- -Vx- -w-rvl -w-rch -w-par -w-ccc -w-obs -w-aus -w-pia -w-inl -w-sig
-# pragma nopushoptwarn
-# pragma nopackwarning
-#endif
diff --git a/ace/streams.h b/ace/streams.h
deleted file mode 100644
index e7f41bb821d..00000000000
--- a/ace/streams.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// streams.h
-//
-// = AUTHOR
-// Irfan Pyarali
-//
-// = DESCRIPTION
-// This file contains the portability ugliness for the Standard C++
-// Library. As implementations of the "standard" emerge, this file
-// will need to be updated.
-//
-// This files deals with the streams includes.
-//
-// ============================================================================
-
-#ifndef ACE_STREAMS_H
-#define ACE_STREAMS_H
-#include "ace/pre.h"
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-// Do this so the #pragma warning in the MSVC headers do not
-// affect our #pragma warning settings
-#if (_MSC_VER >= 1200)
-#pragma warning(push)
-#endif /* _MSC_VER >= 1200 */
-
-
-#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)
-
-# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && \
- (ACE_HAS_STANDARD_CPP_LIBRARY != 0)
-
-# if defined (_MSC_VER)
-# pragma warning(disable: 4018 4114 4146 4245)
-# pragma warning(disable: 4663 4664 4665 4511 4512)
-# endif /* _MSC_VER */
-
-# if defined (ACE_USES_OLD_IOSTREAMS)
-# include /**/ <iostream.h>
-# include /**/ <fstream.h>
- // This has been commented as it is not needed and causes problems with Qt.
- // (brunsch) But has been uncommented since it should be included. Qt
- // probably should have some sort of macro that will prevent including this
- // when it is used.
-# include /**/ <iomanip.h>
-# if defined (_MSC_VER)
-# include /**/ <strstrea.h>
-# else
-# include /**/ <strstream.h>
-# endif /* _MSC_VER */
-# else
-# include /**/ <iostream>
-# include /**/ <fstream>
-# include /**/ <istream>
-# include /**/ <ostream>
-# include /**/ <streambuf>
-# include /**/ <iomanip>
-# include /**/ <ios>
-# include /**/ <strstream>
-# endif /* ACE_USES_OLD_IOSTREAMS */
-
-# if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \
- (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0)
-
-# if !defined (ACE_USES_OLD_IOSTREAMS)
- // Make these available in the global name space
- using std::ios;
- using std::streambuf;
- using std::istream;
- using std::ostream;
- using std::iostream;
- using std::filebuf;
- using std::ifstream;
- using std::ofstream;
- using std::fstream;
-
- using std::istrstream;
- using std::ostrstream;
-
- using std::cin;
- using std::cout;
- using std::cerr;
- using std::clog;
-
- using std::endl;
- using std::ends;
- using std::flush;
-
- using std::ws;
-
- using std::resetiosflags;
- using std::setfill;
- using std::setiosflags;
- using std::setprecision;
- using std::setw;
-
- using std::dec;
- using std::hex;
- using std::oct;
-# endif /* ! ACE_USES_OLD_IOSTREAMS */
-
-# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
-
-# if defined (_MSC_VER)
-# pragma warning(4: 4018 4114 4146 4245)
-# pragma warning(4: 4663 4664 4665 4512 4511)
-# endif /* _MSC_VER */
-
-# else /* ! ACE_HAS_STANDARD_CPP_LIBRARY */
-
-# include /**/ <fstream.h>
-# include /**/ <iostream.h>
-# include /**/ <iomanip.h>
-
-# if defined (ACE_WIN32)
-# if defined(_MSC_VER) // VSB
-# include /**/ <ios.h>
-# include /**/ <streamb.h>
-# include /**/ <istream.h>
-# include /**/ <ostream.h>
-# endif /* _MSC_VER */
-# include /**/ <strstrea.h> // VSB
-# else
-# include /**/ <strstream.h>
-# endif /* ACE_WIN32 */
-
-# endif /* ! ACE_HAS_STANDARD_CPP_LIBRARY */
-
-#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */
-
-// Do this so the #pragma warning in the MSVC headers do not
-// affect our #pragma warning settings
-#if (_MSC_VER >= 1200)
-#pragma warning(pop)
-#endif /* _MSC_VER >= 1200 */
-
-#include "ace/post.h"
-#endif /* ACE_STREAMS_H */
diff --git a/ace/svc_export.h b/ace/svc_export.h
deleted file mode 100644
index 0b5ca323c56..00000000000
--- a/ace/svc_export.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-
-// This file was generated by generate_export_file.pl
-// but needed to be altered to support ACE_BUILD_SVC_DLL
-// instead of ACE_SVC_BUILD_DLL which was already being
-// used.
-
-// ------------------------------
-#if !defined (ACE_SVC_EXPORT_H)
-#define ACE_SVC_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if !defined (ACE_SVC_HAS_DLL)
-#define ACE_SVC_HAS_DLL 1
-#endif /* ! ACE_SVC_HAS_DLL */
-
-#if defined (ACE_SVC_HAS_DLL)
-# if (ACE_SVC_HAS_DLL == 1)
-# if defined (ACE_BUILD_SVC_DLL)
-# define ACE_Svc_Export ACE_Proper_Export_Flag
-# define ACE_SVC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# else
-# define ACE_Svc_Export ACE_Proper_Import_Flag
-# define ACE_SVC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# endif /* ACE_BUILD_SVC_DLL */
-# else
-# define ACE_Svc_Export
-# define ACE_SVC_SINGLETON_DECLARATION(T)
-# endif /* ! ACE_SVC_HAS_DLL == 1 */
-#else
-# define ACE_Svc_Export
-# define ACE_SVC_SINGLETON_DECLARATION(T)
-#endif /* ACE_SVC_HAS_DLL */
-
-#endif /* ACE_SVC_EXPORT_H */
-
-// End of auto generated file.
diff --git a/ace/ws2tcpip.h b/ace/ws2tcpip.h
deleted file mode 100644
index 5640f2e5989..00000000000
--- a/ace/ws2tcpip.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-** $Id$
-**
-** WS2TCPIP.H - WinSock2 Extension for TCP/IP protocols
-**
-** This file contains TCP/IP specific information for use
-** by WinSock2 compatible applications.
-**
-** To provide the backward compatibility, all the TCP/IP
-** specific definitions that were included in the WINSOCK.H
-** file are now included in WINSOCK2.H file. WS2TCPIP.H
-** file includes only the definitions introduced in the
-** "WinSock 2 Protocol-Specific Annex" document.
-**
-** Rev 0.3 Nov 13, 1995
-*/
-
-#ifndef _WS2TCPIP_H_
-#define _WS2TCPIP_H_
-#include "ace/pre.h"
-
-/* Structure to keep interface specific information */
-
-typedef struct _INTERFACE_INFO
-{
- u_long iiFlags; /* Interface flags */
- struct sockaddr iiAddress; /* Interface address */
- struct sockaddr iiBroadcastAddress; /* Broadcast address */
- struct sockaddr iiNetmask; /* Network mask */
-} INTERFACE_INFO, FAR * LPINTERFACE_INFO;
-
-/* Possible flags for the iiFlags - bitmask */
-
-#define IFF_UP 0x00000001 /* Interface is up */
-#define IFF_BROADCAST 0x00000002 /* Broadcast is supported */
-#define IFF_LOOPBACK 0x00000004 /* this is loopback interface */
-#define IFF_POINTTOPOINT 0x00000008 /*this is point-to-point
-interface*/
-#define IFF_MULTICAST 0x00000010 /* multicast is supported */
-
-/* Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP */
-
-struct ip_mreq {
- struct in_addr imr_multiaddr; /* IP multicast address of group */
- struct in_addr imr_interface; /* local IP address of interface */
-};
-
-/* TCP/IP specific Ioctl codes */
-
-#define SIO_GET_INTERFACE_LIST _IOR('t', 127, u_long) // <TBD>
-
-/* Option to use with [gs]etsockopt at the IPPROTO_IP level */
-
-#define IP_OPTIONS 1 /* set/get IP options */
-#define IP_HDRINCL 2 /* header is included with data */
-#define IP_TOS 3 /* IP type of service and preced*/
-#define IP_TTL 4 /* IP time to live */
-#define IP_MULTICAST_IF 9 /* set/get IP multicast i/f */
-#define IP_MULTICAST_TTL 10 /* set/get IP multicast ttl */
-#define IP_MULTICAST_LOOP 11 /*set/get IP multicast loopback */
-#define IP_ADD_MEMBERSHIP 12 /* add an IP group membership */
-#define IP_DROP_MEMBERSHIP 13/* drop an IP group membership */
-
-
-/* Option to use with [gs]etsockopt at the IPPROTO_UDP level */
-
-#define UDP_NOCHECKSUM 1
-
-/* Option to use with [gs]etsockopt at the IPPROTO_TCP level */
-
-#define TCP_EXPEDITED_1122 0x0002
-
-
-/* IPv6 definitions */
-
-struct in_addr6 {
- u_char s6_addr[16]; /* IPv6 address */
-};
-
-struct sockaddr_in6 {
- short sin6_family; /* AF_INET6 */
- u_short sin6_port; /* Transport level port numb
-er */
- u_long sin6_flowinfo; /* IPv6 flow information */
- struct in_addr6 sin6_addr; /* IPv6 address */
-};
-
-
-#include "ace/post.h"
-#endif /* _WS2TCPIP_H_ */