mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10643] Update the ACE part we use to 5.8.2
Signed-off-by: Neo2003 <Neo.2003@Hotmail.fr>
This commit is contained in:
parent
8f71d95c0d
commit
23c920ca4b
739 changed files with 22031 additions and 40373 deletions
|
|
@ -9,6 +9,7 @@ MaNGOS 0.17 (??? ??? 2010)
|
|||
==== Server Features ====
|
||||
|
||||
* Improved: Updated MySQL client libs to 5.1.49.
|
||||
* Improved: Updated ACE framework to 5.8.2.
|
||||
|
||||
==== Statistics ====
|
||||
* Fixed Bugs: ??? tickets and many bugs reported at forum resolved
|
||||
|
|
|
|||
3
NEWS
3
NEWS
|
|
@ -15,7 +15,8 @@ http://mangos.lighthouseapp.com/
|
|||
|
||||
Version 0.17
|
||||
* Under discussion.
|
||||
* MySQL client libs updated to MySQL 5.1.49
|
||||
* ACE Framework updated to ACE 5.8.2.
|
||||
* MySQL client libs updated to MySQL 5.1.49.
|
||||
* Upgrade to client version 3.3.5a (build 12340).
|
||||
|
||||
Version 0.16
|
||||
|
|
|
|||
3044
dep/ACE_wrappers/ACE-INSTALL.html
Normal file
3044
dep/ACE_wrappers/ACE-INSTALL.html
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
_________________________________________________________________
|
||||
|
||||
|
||||
Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), and
|
||||
CoSMIC(TM)
|
||||
|
||||
|
||||
[1]ACE(TM), [2]TAO(TM), [3]CIAO(TM), and [4]CoSMIC(TM) (henceforth
|
||||
referred to as "DOC software") are copyrighted by [5]Douglas C.
|
||||
Schmidt and his [6]research group at [7]Washington University,
|
||||
[8]University of California, Irvine, and [9]Vanderbilt University,
|
||||
Copyright (c) 1993-2008, all rights reserved. Since DOC software is
|
||||
Copyright (c) 1993-2010, all rights reserved. Since DOC software is
|
||||
open-source, freely available software, you are free to use, modify,
|
||||
copy, and distribute--perpetually and irrevocably--the DOC software
|
||||
source code and object code produced from the source, as well as copy
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
include this copyright statement along with any code built using DOC
|
||||
software that you release. No copyright statement needs to be provided
|
||||
if you just ship binary executables of your software products.
|
||||
|
||||
|
||||
You can use DOC software in commercial and/or binary software releases
|
||||
and are under no obligation to redistribute any of your source code
|
||||
that is built using DOC software. Note, however, that you may not do
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
software in your software, though we encourage you to let [10]us know
|
||||
so we can promote your project in the [11]DOC software success
|
||||
stories.
|
||||
|
||||
|
||||
The [12]ACE, [13]TAO, [14]CIAO, and [15]CoSMIC web sites are
|
||||
maintained by the [16]DOC Group at the [17]Institute for Software
|
||||
Integrated Systems (ISIS) and the [18]Center for Distributed Object
|
||||
|
|
@ -50,13 +50,13 @@
|
|||
University, UC Irvine, or Vanderbilt University, their employees, or
|
||||
students be liable for any lost revenue or profits or other special,
|
||||
indirect and consequential damages.
|
||||
|
||||
|
||||
DOC software is provided with no support and without any obligation on
|
||||
the part of Washington University, UC Irvine, Vanderbilt University,
|
||||
their employees, or students to assist in its use, correction,
|
||||
modification, or enhancement. A [19]number of companies around the
|
||||
world provide commercial support for DOC software, however.
|
||||
|
||||
|
||||
DOC software is Y2K-compliant, as long as the underlying OS platform
|
||||
is Y2K-compliant. Likewise, DOC software is compliant with the new US
|
||||
daylight savings rule passed by Congress as "The Energy Policy Act of
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
obtains time/date and calendaring information from operating systems
|
||||
users will not be affected by the new DST rules as long as they
|
||||
upgrade their operating systems accordingly.
|
||||
|
||||
|
||||
The names ACE(TM), TAO(TM), CIAO(TM), CoSMIC(TM), Washington
|
||||
University, UC Irvine, and Vanderbilt University, may not be used to
|
||||
endorse or promote products or services derived from this source
|
||||
|
|
@ -75,13 +75,13 @@
|
|||
CIAO(TM), or CoSMIC(TM), nor does it grant permission for the name
|
||||
Washington University, UC Irvine, or Vanderbilt University to appear
|
||||
in their names.
|
||||
|
||||
|
||||
If you have any suggestions, additions, comments, or questions, please
|
||||
let [20]me know.
|
||||
|
||||
|
||||
[21]Douglas C. Schmidt
|
||||
_________________________________________________________________
|
||||
|
||||
|
||||
Back to the [22]ACE home page.
|
||||
|
||||
References
|
||||
|
|
@ -104,7 +104,7 @@ References
|
|||
16. http://www.dre.vanderbilt.edu/
|
||||
17. http://www.isis.vanderbilt.edu/
|
||||
18. http://www.cs.wustl.edu/~schmidt/doc-center.html
|
||||
19. http://www.cs.wustl.edu/~schmidt/commercial-support.html
|
||||
19. http://www.cs.wustl.edu/~schmidt/commercial-support.html
|
||||
20. mailto:d.schmidt@vanderbilt.edu
|
||||
21. http://www.dre.vanderbilt.edu/~schmidt/
|
||||
22. http://www.cs.wustl.edu/ACE.html
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -8,8 +8,7 @@
|
|||
## MPC Command:
|
||||
## /acebuilds/ACE_wrappers-repository/bin/mwc.pl -include /acebuilds/MPC/config -include /acebuilds/MPC/templates -feature_file /acebuilds/ACE_wrappers-repository/local.features -noreldefs -type automake -exclude build,Kokyu
|
||||
|
||||
SUBDIRS = \
|
||||
ace
|
||||
SUBDIRS = ace
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
|
|
|||
|
|
@ -1,9 +1,300 @@
|
|||
PLANNED MAJOR CHANGES "SOMETIME IN THE FUTURE" (i.e., exact beta not known)
|
||||
===========================================================================
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.8.1 and ACE-5.8.2
|
||||
====================================================
|
||||
|
||||
. RPM packaging as part of the release process by the doc_group (Remedy and user community)
|
||||
. Added support for the Microsoft Visual Studio 2010 IDE (vc10)
|
||||
|
||||
. Remove BCB6, BCB2006, and the borland MPC template after the release of x.6.6
|
||||
. Removed complete support for emulated C++ exceptions
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.8.0 and ACE-5.8.1
|
||||
====================================================
|
||||
|
||||
. Added support for Microsoft Visual Studio 2010 using nmake
|
||||
|
||||
. Reduced the amount of doxygen pages generated, the original settings caused
|
||||
a doxygen generated html package of 1.4GB which was way too large
|
||||
|
||||
. Extended ACE INet addon library with:
|
||||
* HTTP Basic Authentication
|
||||
* SSL/HTTPS support.
|
||||
* Proxy CONNECT tunneling.
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.7.9 and ACE-5.8.0
|
||||
====================================================
|
||||
|
||||
. There are two new ACE_Time_Value methods for getting and setting millisecond
|
||||
values to/from ACE_UINT64 values:
|
||||
|
||||
ACE_UINT64 ACE_Time_Value::get_msec () const
|
||||
void ACE_Time_Value::set_msec (const ACE_UINT64 &ms)
|
||||
|
||||
The former is a replacement for the existing msec(ACE_UINT64&) methods that
|
||||
are "getter" methods whose signatures look confusingly like "setters". See
|
||||
Bugzilla #3336 for the history behind this change.
|
||||
|
||||
The latter is for consistency and clarity.
|
||||
|
||||
. Added ACE INet addon library for Inet protocol clients (and possibly
|
||||
servers at some point) like http://, ftp:// etc.
|
||||
The library implements standard C++ iostream wrapper classes for
|
||||
ACE Svc_Handler and Reactor based input/output handling, URL classes
|
||||
and protocol handler classes.
|
||||
NOTE: This is work in progress! There is no guarentee that the API
|
||||
won't change in the next few releases.
|
||||
Protocol handling is currently restricted to client side download
|
||||
requests for HTTP and FTP.
|
||||
Handling for upload requests should be added in the near future as well
|
||||
as HTTP Basic Authentication.
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.7.8 and ACE-5.7.9
|
||||
====================================================
|
||||
|
||||
. ACE's default makefiles (traditional ACE/GNU, not autoconf/automake)
|
||||
now support installation with "make install".
|
||||
Please see the ACE-INSTALL.html file for instructions.
|
||||
|
||||
. Support for the ARCH make variable has been enhanced to apply to executables
|
||||
(in addition to libraries and object files), and the ARCH feature has been
|
||||
integrated into the MPC-generated makefiles (to work with MPC's requires
|
||||
and avoids features).
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.7.7 and ACE-5.7.8
|
||||
====================================================
|
||||
|
||||
. ACE now uses GCC builtin Atomic instructions for short,
|
||||
unsigned short, long, unsigned long, int, unsigned int,
|
||||
and bool. This makes our Atomic_Op around 7 times faster
|
||||
|
||||
. ACE Service Configuration Framework now process first service
|
||||
configuration files and then command-line directives. Thus if
|
||||
application uses both service configuration files and command-line
|
||||
directives then the command-line directives may override results of
|
||||
directives in the configuration files. At the same time if the
|
||||
application uses only the default svc.conf file and command-line
|
||||
directives then the directives from svc.conf can not override
|
||||
results of the user provided command-line directives.
|
||||
|
||||
. ACE_Dev_Poll_Reactor now dispatches notifications in only one thread at
|
||||
a time. This brings notification handling more in line with behavior in
|
||||
other Reactor implementations.
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.7.6 and ACE-5.7.7
|
||||
====================================================
|
||||
|
||||
. Integrated fix for bug 3104 and regression test for
|
||||
interval timers.
|
||||
|
||||
. Added support for GCC builtin Atomic instructions which
|
||||
are enabled with GCC >= 4.1 for PPC32/PPC64/IA64
|
||||
|
||||
. Improved autoconf support for debian
|
||||
|
||||
. Added support for -mcpu and -mtune. Add TCPU=.. to your
|
||||
environment/platform_macros.GNU to specify you cpu and
|
||||
than add cpumodelflag=1 and/or tunemodelflag=1. Using
|
||||
this with IBM Cell increased the performance significantly
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.7.5 and ACE-5.7.6
|
||||
====================================================
|
||||
|
||||
. Added support for iPhone/iPod Touch/iPad. The following
|
||||
environment variables are needed:
|
||||
|
||||
IPHONE_TARGET, should be set to either SIMULATOR or
|
||||
HARDWARE. Set to HARDWARE if you want to deploy
|
||||
on the iPhone/iPod Touch/iPad device.
|
||||
|
||||
IPHONE_VERSION, should be set to 3.1.2 or 3.2. One can
|
||||
set the version to any future or past versions, but
|
||||
only 3.1.2 and 3.2 have been tried.
|
||||
|
||||
Note that one has to compile ACE/TAO statically as
|
||||
it is believed that the iPhone OS does not support
|
||||
dynamic loading of external libraries. The usual
|
||||
procedure of cross compiling ACE/TAO applies
|
||||
(such as setting HOST_ROOT environment variable).
|
||||
|
||||
. Added support for Embarcadero C++ Builder 2010
|
||||
|
||||
. Added option to print a given ACE_Time_Value in the log
|
||||
message instead of system supplied timestamp as in %T
|
||||
and %D.
|
||||
The option is implemented as a variant of the %D/%T
|
||||
options by using the '#' flag character like '%#D' or
|
||||
'%#T'. When using this flag an ACE_Time_Value pointer is
|
||||
expected in the argument list supplied with the log message.
|
||||
This fixed Bugzilla #3221.
|
||||
|
||||
. Fixed problems with ACE_INET_Addr::is_multicast() on
|
||||
little endian platforms. This fixed bugzilla #3729.
|
||||
|
||||
. Added compilation support for VxWorks 6.8, no runtime
|
||||
testing has been performed
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.7.4 and ACE-5.7.5
|
||||
====================================================
|
||||
|
||||
. Added MacOSX Snow Leopard support
|
||||
|
||||
. Added strsignal() wrapper
|
||||
|
||||
. Improved LynxOS support
|
||||
|
||||
. Updated Interix port
|
||||
|
||||
. Fixed MinGW compilation problems
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.7.3 and ACE-5.7.4
|
||||
====================================================
|
||||
|
||||
. ACE_CDR::consolidate now returns an int, 0 is ok, -1 is failure
|
||||
|
||||
. Fixed a bug in the realclean feature of the GNU makefiles
|
||||
|
||||
. Improved Sun Studio for Linux support
|
||||
|
||||
. Improved OpenBSD support
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.7.2 and ACE-5.7.3
|
||||
====================================================
|
||||
|
||||
. C++ Builder 2009 Update 3 is the only C++Builder that is supported, older
|
||||
and newer compilers are not supported anymore
|
||||
|
||||
. Made final changes for the CEGCC port
|
||||
|
||||
. Added a set of tests to validate C++ compiler and the stl implementation
|
||||
they ship.
|
||||
|
||||
. HP-UX PARISC aCC < 3.80 are deprecated and can't be used anymore. Upgrade
|
||||
to aCC 3.80 or newer
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.7.1 and ACE-5.7.2
|
||||
====================================================
|
||||
|
||||
. Borland C++ makefiles aren't shipped anymore as part of the release
|
||||
but have to be generated by the user
|
||||
|
||||
. Refactored gperf to have its own shared library so that we can reuse
|
||||
that in TAO
|
||||
|
||||
. Added support for SuSE Enterprise 10
|
||||
|
||||
. ACE_Configuration_Heap::open() now returns -1 with errno EBUSY if it is
|
||||
called multiple times. Previous versions would allow multiple calls to
|
||||
open() but leak resources.
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.7.0 and ACE-5.7.1
|
||||
====================================================
|
||||
|
||||
. Added support for Sun Studio 12 Update Pack 1
|
||||
|
||||
. Fixed compile problems when using Windows CE x86 release mode
|
||||
|
||||
. Fixed compile problems for FreeBSD
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.6.9 and ACE-5.7.0
|
||||
====================================================
|
||||
|
||||
. Added support for the VxWorks vxAtomicLib which is available with VxWorks 6.6
|
||||
and newer. If you don't want to use this library undef ACE_HAS_VXATOMICLIB
|
||||
in your config.h file
|
||||
|
||||
. Added support for C++ Builder 2009 Update 3
|
||||
|
||||
. Added support for ACE/TAO using the CEGCC project
|
||||
|
||||
. Added support for upcoming Fedora 11 and OpenSuSE Factory
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.6.8 and ACE-5.6.9
|
||||
====================================================
|
||||
|
||||
. Removed Borland/CodeGear C++ Builder 2007 support. If you'd like to
|
||||
fund this support please let us know.
|
||||
|
||||
. Removed VxWorks 5.5.x, 6.2, and 6.3 support. If you'd like to fund
|
||||
this support please let us know.
|
||||
|
||||
. Improved Unicode support.
|
||||
|
||||
. Added support for the native Windows Vista and Windows Server 2008
|
||||
condition variables. These has to be enabled at compile time, and when
|
||||
enabled the application can only run on Vista or Server 2008. Add
|
||||
ACE_HAS_WTHREADS_CONDITION_VARIABLE to your config.h file to enable
|
||||
these
|
||||
|
||||
. Fixed a bug when trying to read a file of 1 byte when unicode is
|
||||
enabled
|
||||
|
||||
. Improved the Windows CE port
|
||||
|
||||
. Fixed several Klocwork reported issues
|
||||
|
||||
. Added support for MinGW 3.15
|
||||
|
||||
. Added support for Incredibuild, which is an MSVC++ feature that
|
||||
optimizes compiles via distributing builds.
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.6.7 and ACE-5.6.8
|
||||
====================================================
|
||||
|
||||
. Added a new function ACE::isdotdir() which determines if a specified
|
||||
pathname is "dot dir" (ie. "." or ".."). ACE::isdotdir() is significantly
|
||||
faster than pair of strcmp() calls.
|
||||
|
||||
. Last micro release that is maintained for Borland/CodeGear C++
|
||||
Builder 2007 and Intel C++ on Windows.
|
||||
|
||||
. Fixed crash when ACE thread tries to inherit the logging attributes
|
||||
from non ACE threads.
|
||||
|
||||
. Fixed many small compile and test errors that occur on some platforms.
|
||||
|
||||
. Fixed log output formatting on some platforms.
|
||||
|
||||
. Bugs fixed: 2748, 3164, 3480, 3494, 3502, 3541, 3542, 3544, 3557.
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.6.6 and ACE-5.6.7
|
||||
====================================================
|
||||
|
||||
. Changed the automake build's feature test for a "usable" config
|
||||
to warn on failure instead of exiting with an error. This should
|
||||
make it easier to diagnose configure failures, as the script will
|
||||
now generate a config.h file even when the test fails.
|
||||
|
||||
. Removed borland MPC template, use the bmake template from now
|
||||
|
||||
. Added Windows Mobile 6 support and improved the WinCE port
|
||||
|
||||
. Removed BCB6 and BCB2006 support
|
||||
|
||||
. Added BCB2009 MPC template
|
||||
|
||||
. Updated stat struct on Windows CE to match the stat struct on other
|
||||
platforms so that application code can be written portable
|
||||
|
||||
. Added new ACE_OS wrappers: raise, atof, atol, isblank, isascii,
|
||||
isctype, and iswctype
|
||||
|
||||
. Added ACE_OS wrapper for narrow-char version of strtoll.
|
||||
|
||||
. ACE_OS wrappers for wide-char versions of strtol, strtoul,
|
||||
strtoll, and strtoll.
|
||||
|
||||
. Added Visual Studio 2010 (vc10) support
|
||||
|
||||
. Added a new feature for the "Traditional Make" build facility to allow
|
||||
building for multiple architectures out of a single source directory.
|
||||
To use this facility, set the ARCH make variable. The ARCH value will be
|
||||
used to add a subdirectory layer below the source directory where the
|
||||
traditional .shobj, .obj, etc. directories will be placed.
|
||||
|
||||
. Added support for HP-UX 11iv3 on Integrity using aC++
|
||||
|
||||
. ACE (and TAO) can now be built using GNU make and the Microsoft Visual C++
|
||||
compiler and linker. See include/makeinclude/platform_win32_msvc.GNU for
|
||||
more details.
|
||||
|
||||
. Added support for FC10
|
||||
|
||||
USER VISIBLE CHANGES BETWEEN ACE-5.6.5 and ACE-5.6.6
|
||||
====================================================
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
To: ace-bugs@cs.wustl.edu
|
||||
Subject: [area]: [synopsis]
|
||||
|
||||
ACE VERSION: 5.6.6
|
||||
ACE VERSION: 5.8.2
|
||||
|
||||
HOST MACHINE and OPERATING SYSTEM:
|
||||
If on Windows based OS's, which version of WINSOCK do you
|
||||
|
|
@ -60,6 +60,9 @@ Subject: [area]: [synopsis]
|
|||
(unless this isn't used in this case, e.g., with Microsoft Visual
|
||||
C++)]:
|
||||
|
||||
BUILD METHOD USED:
|
||||
[Experimental ./configure or traditional makefile/project file?]
|
||||
|
||||
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
|
||||
(used by MPC when you generate your own makefiles):
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ Jean-Francois Ripouteau <Jean-Francois dot Ripouteau at netsurf dot org>
|
|||
Ajit Sagar <asagar at spdmail dot spd dot dsccc dot com>
|
||||
Ashish Singhai <singhai at delirius dot cs dot uiuc dot edu>
|
||||
David Sames <David dot L dot Sames dot 1 at gsfc dot nasa dot gov>
|
||||
Gonzalo Diethelm <gonzalo dot diethelm at aditiva dot com>
|
||||
Gonzalo Diethelm <gdiethelm at dcv dot cl>
|
||||
Raj <raj at itd dot ssb dot com>
|
||||
Darrin Edelman <darrin at aetherworks dot com>
|
||||
Steve Weismuller <spweismu at rsoc dot rockwell dot com>
|
||||
|
|
@ -776,7 +776,6 @@ Philipp Slusallek <slusallek at graphics dot stanford dot edu>
|
|||
Matthew Davis <matthew dot davis at solers dot com>
|
||||
Janusz Stopa <jstopa at bear dot com>
|
||||
Rusty Conover <rconover at zootweb dot com>
|
||||
Alex Mintz <amintz at bear dot com>
|
||||
Phillippe Merle <Philippe dot Merle at lifl dot fr>
|
||||
Mark Winrock <mwinrock at nortelnetworks dot com>
|
||||
Boris Kaminer <boris_kaminer at mail dot ru>
|
||||
|
|
@ -1069,7 +1068,7 @@ Giovanni Zito <gzito at mbox dot thunder dot it>
|
|||
Matthew Adams <madams at bexusa dot com>
|
||||
Sameer Schabungbam <schabungbam at hss dot hns dot com>
|
||||
Jeff Butler <jeff at panasas dot com>
|
||||
Roland Rüdenauer <roland dot ruedenauer at freenet dot de>
|
||||
Roland R<EFBFBD>denauer <roland dot ruedenauer at freenet dot de>
|
||||
John Buckman <john at lyris dot com>
|
||||
Guy Rosen <grosen at bigfoot dot com>
|
||||
<amoderni at viasoft dot com>
|
||||
|
|
@ -1140,7 +1139,7 @@ Mike Anderson <manderson at sonusnet dot com>
|
|||
David Singer <David_P_Singer at res dot raytheon dot com>
|
||||
Nick Lin <nicklin at vantech dot com dot tw>
|
||||
Ron Hashimshony <Ron at bandwiz dot com>
|
||||
Max Khon <mkhon at swsoft dot com>
|
||||
Max Khon <mkhon at parallels dot com>
|
||||
Jonas Nordin <jonas dot nordin at syncom dot se>
|
||||
Jonathan Stockdale <Jonathan dot Stockdale at locusdialogue dot com>
|
||||
Jean-Francois Daune <Daune at IBA dot be>
|
||||
|
|
@ -1963,7 +1962,7 @@ Arto Jalkanen <ajalkane at gmail dot com>
|
|||
Scott Zionic <sz at finsatconsulting dot com>
|
||||
Diana Ukleja <Diana_Ukleja at raytheon dot com>
|
||||
Shaun Cooley <scooley4241 at hotmail dot com>
|
||||
Aapo Mäkinen <aapo dot makinen at firstbeattechnologies dot com>
|
||||
Aapo M<EFBFBD>kinen <aapo dot makinen at firstbeattechnologies dot com>
|
||||
Matt Emerson <mjemerson at isis dot vanderbilt dot edu>
|
||||
Sean Parker <supinlick at yahoo dot com>
|
||||
Mark Wilson <mwil at lle dot rochester dot edu>
|
||||
|
|
@ -2009,7 +2008,7 @@ Timothy Wayne Gomez <gomezt at saic dot com>
|
|||
Ventimiglia Chere <Ventimiglia_Chere at emc dot com>
|
||||
Frederick Heckel <fwph at cse dot wustl dot edu>
|
||||
Ian Zagorskih <ianzag at megasignal dot com>
|
||||
Olivier Guérin <guerin35 at hotmail dot com>
|
||||
Olivier Gu<EFBFBD>rin <guerin35 at hotmail dot com>
|
||||
Abdel Rigumye <rigumyea at ociweb dot com>
|
||||
James Damour <james dot damour at request dot com>
|
||||
Alan Anderson <Alan dot Anderson at sdsmt dot edu>
|
||||
|
|
@ -2121,7 +2120,6 @@ Popeye Cai <popeye dot cai at utstar dot com>
|
|||
David Highley <dhighley at highley-recommended dot com>
|
||||
Sonicfly Zhou <zhoucn at txsec dot com>
|
||||
Phil Billingham <phil_billingham at ml dot com>
|
||||
David Giovannini <giovannd at ociweb dot com>
|
||||
Paul Daugherty <Paul at nextalk dot com>
|
||||
Robert Schwebel <robert at schwebel dot de>
|
||||
William Cote <William dot Cote at hp dot com>
|
||||
|
|
@ -2166,7 +2164,7 @@ Ray Lischner <rlischner at proteus-technologies dot com>
|
|||
Sergey Kosenko <sergey dot kosenko at gmail dot com>
|
||||
Pavel Zaichenko <zpf at ivl dot ua>
|
||||
Paul Riley <paul at riley dot net>
|
||||
Nelson Filipe Ferreira Gonçalves <ngoncalves at isr dot ist dot utl dot pt>
|
||||
Nelson Filipe Ferreira Gon<EFBFBD>alves <ngoncalves at isr dot ist dot utl dot pt>
|
||||
Harry Goldschmitt <harry at hgac dot com>
|
||||
Sail Zeng <sailzeng at tencent dot com>
|
||||
Markus Henschel <m dot henschel at bally-wulff dot de>
|
||||
|
|
@ -2222,7 +2220,7 @@ Hayim Shaul <hayim at iportent dot com>
|
|||
Erman Balcik <erman dot balcik at siemens dot com>
|
||||
Torsten Saliwada <sally at gmx dot net>
|
||||
Nathan Glasser <nglasser at cantata dot com>
|
||||
Grégor Boirie <gregor dot boirie at free dot fr>
|
||||
Gr<EFBFBD>gor Boirie <gregor dot boirie at free dot fr>
|
||||
Alex Solan <alex dot solan at gmail dot com>
|
||||
Venkat Sidhabathuni <venkats at idengines dot com>
|
||||
Nathan Ernst <Nathan dot Ernst at citadelgroup dot com>
|
||||
|
|
@ -2251,7 +2249,7 @@ Ittehad Shaikh <ishaikh at verivue dot com>
|
|||
Michael Doubez <michael dot doubez at gmail dot com>
|
||||
Namrata Gandhi <...>
|
||||
Michael Guntli <michael dot guntli at leica-geosystems dot com>
|
||||
Frank Förster <F dot Forster at herts dot ac dot uk>
|
||||
Frank F<EFBFBD>rster <F dot Forster at herts dot ac dot uk>
|
||||
Roger Leblanc <rog dot leblanc at gmail dot com>
|
||||
Bob Fiske <Robert dot Fiske at ironmountain dot com>
|
||||
Julien Vintrou <vintrouj at gmail dot com>
|
||||
|
|
@ -2260,6 +2258,81 @@ antred <NutJob at gmx dot net>
|
|||
Nathalie D'Amours <nathalie at bearsontheloose dot com>
|
||||
Mele Giovanni <giovanni dot mele at nagra dot com>
|
||||
Philipp Thomas <pth at suse dot de>
|
||||
Mark Hebbel <Mark dot Hebbel at baslerweb dot com>
|
||||
Tim Pollock <pollockt at ociweb dot com>
|
||||
Jack Lavender <jack dot lavender at seconcepts dot com>
|
||||
Alexandre Skrzyniarz <alexandre dot skrzyniarz at fr dot thalesgroup dot com>
|
||||
E Vahala <erkki dot vahala at pp dot inet dot fi>
|
||||
Christian Fromme <kaner dot strace dot org>
|
||||
Daniel Lang <danial dot lang at alphagate dot at>
|
||||
Greg Bothe <ace at netrats dot net>
|
||||
Anand Kumar <anandkumar95 at gmail dot com>
|
||||
Joe Pallas <pallas at cs dot stanford dot edu>
|
||||
Marcel Smit <msmit at remedy dot nl>
|
||||
Florent Vial <florent dot vial at gmail dot com>
|
||||
Pan Kai Luna <pan dot kai dot luna at gmail dot com>
|
||||
Jesus Martinez <jmcruz at lcc dot uma dot es>
|
||||
Martin Gaus <Gaus at gmx dot de>
|
||||
Steve Stallion <stallions at ociweb dot com>
|
||||
Ron van Hoof <rvhoof27 at gmail dot com>
|
||||
Joe Lihn <joelihn at hotmail dot com>
|
||||
Jani Hakala <jahakala at iki dot fi>
|
||||
Marcus Monaghan <marcus dot monaghan at wins dot co dot uk>
|
||||
Kashif Khan <kashif_khan198227 at yahoo dot com>
|
||||
JD Robertson <JD.Robertson at ni dot com>
|
||||
Andreas Drescher <ace at anticat dot ch>
|
||||
Alon Diamant <diamant at alon at gmail dot com>
|
||||
Igor Rayak <igor dot rayak at gmail dot com>
|
||||
Shai Kedem <shai_kedem at hotmail dot com>
|
||||
Steve Ramsay <steve dot ramsay at caris dot com>
|
||||
<moyyo at freetekno dot cz>
|
||||
Skrzyniarz Alexandre <alexandre dot skrzyniarz at fr dot thalesgroup dot com>
|
||||
Rob Beekmans <r dot a dot beekmans at philips dot com>
|
||||
Steven Hartmann <shartmann at militho dot com>
|
||||
Dicky <qianchendi at gmail dot com>
|
||||
Boyan Kasarov <bkasarov at gmail dot com>
|
||||
Brendan Murphy <brendan dot murphy at euro dot apple dot com>
|
||||
Ryan Carmichael <RCarmichael at drs-tem dot com>
|
||||
Koh Onishi <k_onishi at mtj dot biglobe dot ne dot jp>
|
||||
Markus Gaugusch <markus at gaugusch dot at>
|
||||
Annette Wilson <awilson at raytheonvtc dot com>
|
||||
Sharon Mizrahi <sharon dot mizrahi at gmail dot com>
|
||||
William Glenn <wglenn at scires dot com>
|
||||
Christian Ehrlicher <Ch dot Ehrlicher at gmx dot de>
|
||||
Hui Zhang <zhanghui9527 at gmail dot com>
|
||||
Marijke Hengstmengel <mhengstmengel at remedy dot nl>
|
||||
Christian Freund <freund at wrz dot de>
|
||||
Chris Shaw <google at cshaw-tech dot co dot uk>
|
||||
Matthew Carter <r_q_einstein-acetaobugs at yahoo dot com>
|
||||
Denis Budko <denis dot budko at remedy dot nl>
|
||||
Gaurav Kulshreshtha <gaurav dot kulshreshtha at onmobile dot com>
|
||||
Wolfgang Pickartz <Wolfgang dot Pickartz at procom.de>
|
||||
Joost Kraaijeveld <J dot Kraaijeveld at Askesis dot nl>
|
||||
Pau Garcia i Quiles <pgquiles at elpauer dot org>
|
||||
Sail Zeng <sailzeng at tencent dot com>
|
||||
Dirk Bonekaemper <dirk dot bonekaemper at dfs dot de>
|
||||
Sreejith <sreejithsmadhavan at gmail dot com>
|
||||
Guillaume Lahaye <Guillaume dot Lahaye at nuance dot com>
|
||||
Andrew Kaplan <alexande dot kaplan at tafcorp dot com>
|
||||
Alexander Mintz <alexande dot mintz at tafcorp dot com>
|
||||
Jennifer Kahng <jennifer dot kahng at lmco dot com>
|
||||
Trent Nadeau <Trent dot Nadeau at ngc dot com>
|
||||
Nick Meyer <nick dot meyer at sensis dot com>
|
||||
Olivier Langlois <olivier at olivierlanglois dot net>
|
||||
Patrick Soboljew <patrick dot soboljew at gmail dot com>
|
||||
Tim Pinkawa <tpinkawa at eagleseven dot com>
|
||||
Ed Blackmond <ed dot blackmond at themis dot com>
|
||||
Dave <dwh0403 at 163 dot com>
|
||||
Inma Perea <inma dot perea dot fdz at gmail dot com>
|
||||
David Ward <dpward at mit dot edu>
|
||||
Anatoli Sakhnik <sakhnik at gmail dot com>
|
||||
Max Zhou <earthdog at 126 dot com>
|
||||
Daynesh Mangal <daynesh at gmail dot com>
|
||||
Robert Shectman <shectman at llnl dot gov>
|
||||
Rafi <rafi dot net at gmail dot com>
|
||||
Kannan Ramaswamy <kannan dot ramaswamy at cogcap dot com>
|
||||
Brian Johnson <johnsonb at ociweb dot com>
|
||||
Catherine L. Paquin <catherine dot paquin at ngc dot com>
|
||||
|
||||
I would particularly like to thank Paul Stephenson, who worked with me
|
||||
at Ericsson in the early 1990's. Paul devised the recursive Makefile
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
This is ACE version 5.6.6, released Mon Sep 15 06:08:04 CDT 2008
|
||||
This is ACE version 5.8.2, released Sat Sep 04 11:30:18 CEST 2010
|
||||
|
||||
If you have any problems with or questions about ACE, please send
|
||||
email to the ACE mailing list (ace-users@cs.wustl.edu), using the form
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: ACE.cpp 82581 2008-08-11 08:58:24Z johnnyw $
|
||||
// $Id: ACE.cpp 91604 2010-09-02 14:51:58Z vzykov $
|
||||
|
||||
#include "ace/ACE.h"
|
||||
|
||||
|
|
@ -37,14 +37,8 @@ extern "C" int maxFiles;
|
|||
# include "ace/OS_NS_poll.h"
|
||||
#endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
|
||||
|
||||
|
||||
ACE_RCSID (ace,
|
||||
ACE,
|
||||
"$Id: ACE.cpp 82581 2008-08-11 08:58:24Z johnnyw $")
|
||||
|
||||
|
||||
// Open versioned namespace, if enabled by the user.
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
namespace ACE
|
||||
{
|
||||
|
|
@ -163,11 +157,18 @@ ACE::compiler_beta_version (void)
|
|||
#endif
|
||||
}
|
||||
|
||||
ACE_TCHAR
|
||||
ACE::nibble2hex (u_int n)
|
||||
{
|
||||
// Yes, this works for UNICODE
|
||||
return ACE_TEXT ("0123456789abcdef")[n & 0x0f];
|
||||
}
|
||||
|
||||
bool
|
||||
ACE::debug (void)
|
||||
{
|
||||
static const char* debug = ACE_OS::getenv ("ACE_DEBUG");
|
||||
return (ACE::debug_ != 0) ? ACE::debug_ : (debug != 0 ? (*debug != '0'): false);
|
||||
return (ACE::debug_ != 0) ? ACE::debug_ : (debug != 0 ? (*debug != '0') : false);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -373,7 +374,6 @@ ACE::hash_pjw (const wchar_t *str)
|
|||
}
|
||||
#endif /* ACE_HAS_WCHAR */
|
||||
|
||||
#if !defined (ACE_HAS_WINCE)
|
||||
ACE_TCHAR *
|
||||
ACE::strenvdup (const ACE_TCHAR *str)
|
||||
{
|
||||
|
|
@ -381,7 +381,6 @@ ACE::strenvdup (const ACE_TCHAR *str)
|
|||
|
||||
return ACE_OS::strenvdup (str);
|
||||
}
|
||||
#endif /* ACE_HAS_WINCE */
|
||||
|
||||
/*
|
||||
|
||||
|
|
@ -653,8 +652,7 @@ ACE::recv_n_i (ACE_HANDLE handle,
|
|||
errno == EWOULDBLOCK)
|
||||
{
|
||||
// Wait upto <timeout> for the blocking to subside.
|
||||
int rtn = ACE::handle_read_ready (handle,
|
||||
timeout);
|
||||
int const rtn = ACE::handle_read_ready (handle, timeout);
|
||||
|
||||
// Did select() succeed?
|
||||
if (rtn != -1)
|
||||
|
|
@ -715,8 +713,7 @@ ACE::t_rcv_n_i (ACE_HANDLE handle,
|
|||
if (errno == EWOULDBLOCK)
|
||||
{
|
||||
// Wait for the blocking to subside.
|
||||
int result = ACE::handle_read_ready (handle,
|
||||
0);
|
||||
int const result = ACE::handle_read_ready (handle, 0);
|
||||
|
||||
// Did select() succeed?
|
||||
if (result != -1)
|
||||
|
|
@ -773,8 +770,7 @@ ACE::t_rcv_n_i (ACE_HANDLE handle,
|
|||
errno == EWOULDBLOCK)
|
||||
{
|
||||
// Wait upto <timeout> for the blocking to subside.
|
||||
int rtn = ACE::handle_read_ready (handle,
|
||||
timeout);
|
||||
int const rtn = ACE::handle_read_ready (handle, timeout);
|
||||
|
||||
// Did select() succeed?
|
||||
if (rtn != -1)
|
||||
|
|
@ -834,8 +830,7 @@ ACE::recv_n_i (ACE_HANDLE handle,
|
|||
if (errno == EWOULDBLOCK)
|
||||
{
|
||||
// Wait for the blocking to subside.
|
||||
int result = ACE::handle_read_ready (handle,
|
||||
0);
|
||||
int const result = ACE::handle_read_ready (handle, 0);
|
||||
|
||||
// Did select() succeed?
|
||||
if (result != -1)
|
||||
|
|
@ -890,8 +885,7 @@ ACE::recv_n_i (ACE_HANDLE handle,
|
|||
errno == EWOULDBLOCK)
|
||||
{
|
||||
// Wait upto <timeout> for the blocking to subside.
|
||||
int rtn = ACE::handle_read_ready (handle,
|
||||
timeout);
|
||||
int const rtn = ACE::handle_read_ready (handle, timeout);
|
||||
|
||||
// Did select() succeed?
|
||||
if (rtn != -1)
|
||||
|
|
@ -929,8 +923,8 @@ ssize_t
|
|||
ACE::recv (ACE_HANDLE handle, size_t n, ...)
|
||||
{
|
||||
va_list argp;
|
||||
int total_tuples = static_cast<int> (n / 2);
|
||||
iovec *iovp;
|
||||
int const total_tuples = static_cast<int> (n / 2);
|
||||
iovec *iovp = 0;
|
||||
#if defined (ACE_HAS_ALLOCA)
|
||||
iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
|
||||
#else
|
||||
|
|
@ -947,7 +941,7 @@ ACE::recv (ACE_HANDLE handle, size_t n, ...)
|
|||
iovp[i].iov_len = va_arg (argp, int);
|
||||
}
|
||||
|
||||
ssize_t result = ACE_OS::recvv (handle, iovp, total_tuples);
|
||||
ssize_t const result = ACE_OS::recvv (handle, iovp, total_tuples);
|
||||
#if !defined (ACE_HAS_ALLOCA)
|
||||
delete [] iovp;
|
||||
#endif /* !defined (ACE_HAS_ALLOCA) */
|
||||
|
|
@ -987,14 +981,10 @@ ACE::recvv_n_i (ACE_HANDLE handle,
|
|||
size_t &bytes_transferred = bt == 0 ? temp : *bt;
|
||||
bytes_transferred = 0;
|
||||
|
||||
for (int s = 0;
|
||||
s < iovcnt;
|
||||
)
|
||||
for (int s = 0; s < iovcnt; )
|
||||
{
|
||||
// Try to transfer as much of the remaining data as possible.
|
||||
ssize_t n = ACE_OS::recvv (handle,
|
||||
iov + s,
|
||||
iovcnt - s);
|
||||
ssize_t n = ACE_OS::recvv (handle, iov + s, iovcnt - s);
|
||||
// Check EOF.
|
||||
if (n == 0)
|
||||
return 0;
|
||||
|
|
@ -1006,8 +996,7 @@ ACE::recvv_n_i (ACE_HANDLE handle,
|
|||
if (errno == EWOULDBLOCK)
|
||||
{
|
||||
// Wait for the blocking to subside.
|
||||
int result = ACE::handle_read_ready (handle,
|
||||
0);
|
||||
int const result = ACE::handle_read_ready (handle, 0);
|
||||
|
||||
// Did select() succeed?
|
||||
if (result != -1)
|
||||
|
|
@ -1055,28 +1044,21 @@ ACE::recvv_n_i (ACE_HANDLE handle,
|
|||
int val = 0;
|
||||
ACE::record_and_set_non_blocking_mode (handle, val);
|
||||
|
||||
for (int s = 0;
|
||||
s < iovcnt;
|
||||
)
|
||||
for (int s = 0; s < iovcnt; )
|
||||
{
|
||||
// Try to transfer as much of the remaining data as possible.
|
||||
// Since the socket is in non-blocking mode, this call will not
|
||||
// block.
|
||||
ssize_t n = ACE_OS::recvv (handle,
|
||||
iov + s,
|
||||
iovcnt - s);
|
||||
ssize_t n = ACE_OS::recvv (handle, iov + s, iovcnt - s);
|
||||
|
||||
// Check for errors.
|
||||
if (n == 0 ||
|
||||
n == -1)
|
||||
if (n == 0 || n == -1)
|
||||
{
|
||||
// Check for possible blocking.
|
||||
if (n == -1 &&
|
||||
errno == EWOULDBLOCK)
|
||||
if (n == -1 && errno == EWOULDBLOCK)
|
||||
{
|
||||
// Wait upto <timeout> for the blocking to subside.
|
||||
int rtn = ACE::handle_read_ready (handle,
|
||||
timeout);
|
||||
int const rtn = ACE::handle_read_ready (handle, timeout);
|
||||
|
||||
// Did select() succeed?
|
||||
if (rtn != -1)
|
||||
|
|
@ -1237,7 +1219,8 @@ ACE::send (ACE_HANDLE handle,
|
|||
return -1;
|
||||
else
|
||||
{
|
||||
ssize_t bytes_transferred = ACE_OS::send (handle, (const char *) buf, n, flags);
|
||||
ssize_t const bytes_transferred =
|
||||
ACE_OS::send (handle, (const char *) buf, n, flags);
|
||||
ACE::restore_non_blocking_mode (handle, val);
|
||||
return bytes_transferred;
|
||||
}
|
||||
|
|
@ -1262,7 +1245,8 @@ ACE::t_snd (ACE_HANDLE handle,
|
|||
return -1;
|
||||
else
|
||||
{
|
||||
ssize_t bytes_transferred = ACE_OS::t_snd (handle, (const char *) buf, n, flags);
|
||||
ssize_t const bytes_transferred =
|
||||
ACE_OS::t_snd (handle, (const char *) buf, n, flags);
|
||||
ACE::restore_non_blocking_mode (handle, val);
|
||||
return bytes_transferred;
|
||||
}
|
||||
|
|
@ -1286,7 +1270,7 @@ ACE::send (ACE_HANDLE handle,
|
|||
return -1;
|
||||
else
|
||||
{
|
||||
ssize_t bytes_transferred = ACE::send_i (handle, buf, n);
|
||||
ssize_t const bytes_transferred = ACE::send_i (handle, buf, n);
|
||||
ACE::restore_non_blocking_mode (handle, val);
|
||||
return bytes_transferred;
|
||||
}
|
||||
|
|
@ -1308,7 +1292,8 @@ ACE::sendmsg (ACE_HANDLE handle,
|
|||
return -1;
|
||||
else
|
||||
{
|
||||
ssize_t bytes_transferred = ACE_OS::sendmsg (handle, msg, flags);
|
||||
ssize_t const bytes_transferred =
|
||||
ACE_OS::sendmsg (handle, msg, flags);
|
||||
ACE::restore_non_blocking_mode (handle, val);
|
||||
return bytes_transferred;
|
||||
}
|
||||
|
|
@ -1333,7 +1318,7 @@ ACE::sendto (ACE_HANDLE handle,
|
|||
return -1;
|
||||
else
|
||||
{
|
||||
ssize_t bytes_transferred =
|
||||
ssize_t const bytes_transferred =
|
||||
ACE_OS::sendto (handle, buf, len, flags, addr, addrlen);
|
||||
ACE::restore_non_blocking_mode (handle, val);
|
||||
return bytes_transferred;
|
||||
|
|
@ -1376,8 +1361,7 @@ ACE::send_n_i (ACE_HANDLE handle,
|
|||
#endif /* ACE_WIN32 */
|
||||
{
|
||||
// Wait for the blocking to subside.
|
||||
int result = ACE::handle_write_ready (handle,
|
||||
0);
|
||||
int const result = ACE::handle_write_ready (handle, 0);
|
||||
|
||||
// Did select() succeed?
|
||||
if (result != -1)
|
||||
|
|
@ -1430,12 +1414,10 @@ ACE::send_n_i (ACE_HANDLE handle,
|
|||
n == -1)
|
||||
{
|
||||
// Check for possible blocking.
|
||||
if (n == -1 &&
|
||||
(errno == EWOULDBLOCK || errno == ENOBUFS))
|
||||
if (n == -1 && (errno == EWOULDBLOCK || errno == ENOBUFS))
|
||||
{
|
||||
// Wait upto <timeout> for the blocking to subside.
|
||||
int rtn = ACE::handle_write_ready (handle,
|
||||
timeout);
|
||||
int const rtn = ACE::handle_write_ready (handle, timeout);
|
||||
|
||||
// Did select() succeed?
|
||||
if (rtn != -1)
|
||||
|
|
@ -1500,8 +1482,7 @@ ACE::t_snd_n_i (ACE_HANDLE handle,
|
|||
if (errno == EWOULDBLOCK || errno == ENOBUFS)
|
||||
{
|
||||
// Wait for the blocking to subside.
|
||||
int result = ACE::handle_write_ready (handle,
|
||||
0);
|
||||
int const result = ACE::handle_write_ready (handle, 0);
|
||||
|
||||
// Did select() succeed?
|
||||
if (result != -1)
|
||||
|
|
@ -1558,8 +1539,7 @@ ACE::t_snd_n_i (ACE_HANDLE handle,
|
|||
errno == EWOULDBLOCK || errno == ENOBUFS)
|
||||
{
|
||||
// Wait upto <timeout> for the blocking to subside.
|
||||
int rtn = ACE::handle_write_ready (handle,
|
||||
timeout);
|
||||
int const rtn = ACE::handle_write_ready (handle, timeout);
|
||||
|
||||
// Did select() succeed?
|
||||
if (rtn != -1)
|
||||
|
|
@ -1620,8 +1600,7 @@ ACE::send_n_i (ACE_HANDLE handle,
|
|||
if (errno == EWOULDBLOCK || errno == ENOBUFS)
|
||||
{
|
||||
// Wait for the blocking to subside.
|
||||
int result = ACE::handle_write_ready (handle,
|
||||
0);
|
||||
int const result = ACE::handle_write_ready (handle, 0);
|
||||
|
||||
// Did select() succeed?
|
||||
if (result != -1)
|
||||
|
|
@ -1676,8 +1655,7 @@ ACE::send_n_i (ACE_HANDLE handle,
|
|||
(errno == EWOULDBLOCK || errno == ENOBUFS))
|
||||
{
|
||||
// Wait upto <timeout> for the blocking to subside.
|
||||
int rtn = ACE::handle_write_ready (handle,
|
||||
timeout);
|
||||
int const rtn = ACE::handle_write_ready (handle, timeout);
|
||||
|
||||
// Did select() succeed?
|
||||
if (rtn != -1)
|
||||
|
|
@ -1783,9 +1761,8 @@ ACE::sendv_n_i (ACE_HANDLE handle,
|
|||
)
|
||||
{
|
||||
// Try to transfer as much of the remaining data as possible.
|
||||
ssize_t n = ACE_OS::sendv (handle,
|
||||
iov + s,
|
||||
iovcnt - s);
|
||||
ssize_t n = ACE_OS::sendv (handle, iov + s, iovcnt - s);
|
||||
|
||||
// Check EOF.
|
||||
if (n == 0)
|
||||
return 0;
|
||||
|
|
@ -1797,8 +1774,7 @@ ACE::sendv_n_i (ACE_HANDLE handle,
|
|||
if (errno == EWOULDBLOCK || errno == ENOBUFS)
|
||||
{
|
||||
// Wait for the blocking to subside.
|
||||
int result = ACE::handle_write_ready (handle,
|
||||
0);
|
||||
int const result = ACE::handle_write_ready (handle, 0);
|
||||
|
||||
// Did select() succeed?
|
||||
if (result != -1)
|
||||
|
|
@ -1855,9 +1831,7 @@ ACE::sendv_n_i (ACE_HANDLE handle,
|
|||
// Try to transfer as much of the remaining data as possible.
|
||||
// Since the socket is in non-blocking mode, this call will not
|
||||
// block.
|
||||
ssize_t n = ACE_OS::sendv (handle,
|
||||
iov + s,
|
||||
iovcnt - s);
|
||||
ssize_t n = ACE_OS::sendv (handle, iov + s, iovcnt - s);
|
||||
|
||||
// Check for errors.
|
||||
if (n == 0 ||
|
||||
|
|
@ -1868,8 +1842,7 @@ ACE::sendv_n_i (ACE_HANDLE handle,
|
|||
(errno == EWOULDBLOCK || errno == ENOBUFS))
|
||||
{
|
||||
// Wait upto <timeout> for the blocking to subside.
|
||||
int rtn = ACE::handle_write_ready (handle,
|
||||
timeout);
|
||||
int const rtn = ACE::handle_write_ready (handle, timeout);
|
||||
|
||||
// Did select() succeed?
|
||||
if (rtn != -1)
|
||||
|
|
@ -2330,7 +2303,7 @@ ACE::format_hexdump (const char *buffer,
|
|||
|
||||
size_t i;
|
||||
|
||||
size_t lines = size / 16;
|
||||
size_t const lines = size / 16;
|
||||
for (i = 0; i < lines; i++)
|
||||
{
|
||||
size_t j;
|
||||
|
|
@ -2354,7 +2327,11 @@ ACE::format_hexdump (const char *buffer,
|
|||
textver[j] = 0;
|
||||
|
||||
ACE_OS::sprintf (obuf,
|
||||
#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
|
||||
ACE_TEXT (" %ls\n"),
|
||||
#else
|
||||
ACE_TEXT (" %s\n"),
|
||||
#endif
|
||||
textver);
|
||||
|
||||
while (*obuf != '\0')
|
||||
|
|
@ -2395,7 +2372,11 @@ ACE::format_hexdump (const char *buffer,
|
|||
|
||||
textver[i] = 0;
|
||||
ACE_OS::sprintf (obuf,
|
||||
#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
|
||||
ACE_TEXT (" %ls\n"),
|
||||
#else
|
||||
ACE_TEXT (" %s\n"),
|
||||
#endif
|
||||
textver);
|
||||
}
|
||||
return size;
|
||||
|
|
@ -2409,6 +2390,22 @@ ACE_TCHAR *
|
|||
ACE::timestamp (ACE_TCHAR date_and_time[],
|
||||
size_t date_and_timelen,
|
||||
bool return_pointer_to_first_digit)
|
||||
{
|
||||
return ACE::timestamp (ACE_Time_Value::zero,
|
||||
date_and_time,
|
||||
date_and_timelen,
|
||||
return_pointer_to_first_digit);
|
||||
}
|
||||
|
||||
// Returns the given 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.
|
||||
|
||||
ACE_TCHAR *
|
||||
ACE::timestamp (const ACE_Time_Value& time_value,
|
||||
ACE_TCHAR date_and_time[],
|
||||
size_t date_and_timelen,
|
||||
bool return_pointer_to_first_digit)
|
||||
{
|
||||
//ACE_TRACE ("ACE::timestamp");
|
||||
|
||||
|
|
@ -2419,52 +2416,57 @@ ACE::timestamp (ACE_TCHAR date_and_time[],
|
|||
}
|
||||
|
||||
#if defined (WIN32)
|
||||
// Emulate Unix. Win32 does NOT support all the UNIX versions
|
||||
// below, so DO we need this ifdef.
|
||||
static const ACE_TCHAR *day_of_week_name[] =
|
||||
{
|
||||
ACE_TEXT ("Sun"),
|
||||
ACE_TEXT ("Mon"),
|
||||
ACE_TEXT ("Tue"),
|
||||
ACE_TEXT ("Wed"),
|
||||
ACE_TEXT ("Thu"),
|
||||
ACE_TEXT ("Fri"),
|
||||
ACE_TEXT ("Sat")
|
||||
};
|
||||
|
||||
static const ACE_TCHAR *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")
|
||||
};
|
||||
|
||||
SYSTEMTIME local;
|
||||
::GetLocalTime (&local);
|
||||
|
||||
ACE_OS::sprintf (date_and_time,
|
||||
ACE_TEXT ("%3s %3s %2d %04d %02d:%02d:%02d.%06d"),
|
||||
day_of_week_name[local.wDayOfWeek],
|
||||
month_name[local.wMonth - 1],
|
||||
(int) local.wDay,
|
||||
(int) local.wYear,
|
||||
(int) local.wHour,
|
||||
(int) local.wMinute,
|
||||
(int) local.wSecond,
|
||||
(int) (local.wMilliseconds * 1000));
|
||||
return &date_and_time[15 + (return_pointer_to_first_digit != 0)];
|
||||
#else /* UNIX */
|
||||
if (time_value == ACE_Time_Value::zero)
|
||||
{
|
||||
// Emulate Unix. Win32 does NOT support all the UNIX versions
|
||||
// below, so DO we need this ifdef.
|
||||
static const ACE_TCHAR *day_of_week_name[] =
|
||||
{
|
||||
ACE_TEXT ("Sun"),
|
||||
ACE_TEXT ("Mon"),
|
||||
ACE_TEXT ("Tue"),
|
||||
ACE_TEXT ("Wed"),
|
||||
ACE_TEXT ("Thu"),
|
||||
ACE_TEXT ("Fri"),
|
||||
ACE_TEXT ("Sat")
|
||||
};
|
||||
|
||||
static const ACE_TCHAR *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")
|
||||
};
|
||||
|
||||
SYSTEMTIME local;
|
||||
::GetLocalTime (&local);
|
||||
|
||||
ACE_OS::sprintf (date_and_time,
|
||||
ACE_TEXT ("%3s %3s %2d %04d %02d:%02d:%02d.%06d"),
|
||||
day_of_week_name[local.wDayOfWeek],
|
||||
month_name[local.wMonth - 1],
|
||||
(int) local.wDay,
|
||||
(int) local.wYear,
|
||||
(int) local.wHour,
|
||||
(int) local.wMinute,
|
||||
(int) local.wSecond,
|
||||
(int) (local.wMilliseconds * 1000));
|
||||
return &date_and_time[15 + (return_pointer_to_first_digit != 0)];
|
||||
}
|
||||
#endif /* WIN32 */
|
||||
ACE_TCHAR timebuf[26]; // This magic number is based on the ctime(3c) man page.
|
||||
ACE_Time_Value cur_time = ACE_OS::gettimeofday ();
|
||||
ACE_Time_Value cur_time =
|
||||
(time_value == ACE_Time_Value::zero) ?
|
||||
ACE_Time_Value (ACE_OS::gettimeofday ()) : time_value;
|
||||
time_t secs = cur_time.sec ();
|
||||
|
||||
ACE_OS::ctime_r (&secs,
|
||||
|
|
@ -2493,7 +2495,6 @@ ACE::timestamp (ACE_TCHAR date_and_time[],
|
|||
cur_time.usec ());
|
||||
date_and_time[33] = '\0';
|
||||
return &date_and_time[15 + (return_pointer_to_first_digit != 0)];
|
||||
#endif /* WIN32 */
|
||||
}
|
||||
|
||||
// This function rounds the request to a multiple of the page size.
|
||||
|
|
@ -2538,14 +2539,14 @@ ACE::handle_timed_complete (ACE_HANDLE h,
|
|||
#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)
|
||||
// Winsock is different - it sets the exception bit for failed connect,
|
||||
// unlike other platforms, where the read bit is set.
|
||||
// unlike other platforms, where the write bit is set for both success
|
||||
// and fail.
|
||||
ACE_Handle_Set ex_handles;
|
||||
ex_handles.set_bit (h);
|
||||
#endif /* ACE_WIN32 */
|
||||
|
|
@ -2565,11 +2566,19 @@ ACE::handle_timed_complete (ACE_HANDLE h,
|
|||
int n = ACE_OS::poll (&fds, 1, timeout);
|
||||
|
||||
# else
|
||||
int n = ACE_OS::select (int (h) + 1,
|
||||
rd_handles,
|
||||
wr_handles,
|
||||
0,
|
||||
timeout);
|
||||
int n = 0;
|
||||
if (is_tli)
|
||||
n = ACE_OS::select (int (h) + 1,
|
||||
rd_handles,
|
||||
wr_handles,
|
||||
0,
|
||||
timeout);
|
||||
else
|
||||
n = ACE_OS::select (int (h) + 1,
|
||||
0,
|
||||
wr_handles,
|
||||
0,
|
||||
timeout);
|
||||
# endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
|
||||
#endif /* ACE_WIN32 */
|
||||
|
||||
|
|
@ -2583,11 +2592,14 @@ ACE::handle_timed_complete (ACE_HANDLE h,
|
|||
return ACE_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
// Usually, a ready-for-write handle is successfully connected, and
|
||||
// ready-for-read (exception on Win32) is a failure. On fails, we
|
||||
// need to grab the error code via getsockopt. On possible success for
|
||||
// any platform where we can't tell just from select() (e.g. AIX),
|
||||
// we also need to check for success/fail.
|
||||
// On Windows, a ready-for-write handle is successfully connected, and
|
||||
// ready-for-exception is a failure. On fails, we need to grab the error
|
||||
// code via getsockopt.
|
||||
// On BSD sockets using select(), the handle becomes writable on
|
||||
// completion either success or fail, so if the select() does not time
|
||||
// out, we need to check for success/fail.
|
||||
// It is believed that TLI sockets use the readable=fail, writeable=success
|
||||
// but that hasn't been as well tested.
|
||||
#if defined (ACE_WIN32)
|
||||
ACE_UNUSED_ARG (is_tli);
|
||||
|
||||
|
|
@ -2599,34 +2611,20 @@ ACE::handle_timed_complete (ACE_HANDLE h,
|
|||
need_to_check = true;
|
||||
known_failure = true;
|
||||
}
|
||||
#elif defined (ACE_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 = true;
|
||||
#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);
|
||||
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 = true;
|
||||
#else
|
||||
# if defined (ACE_HAS_POLL) && defined (ACE_HAS_LIMITED_SELECT)
|
||||
need_to_check = (fds.revents & POLLIN);
|
||||
need_to_check = (fds.revents & POLLIN);
|
||||
# else
|
||||
need_to_check = rd_handles.is_set (h);
|
||||
need_to_check = true;
|
||||
# endif /* ACE_HAS_POLL && ACE_HAS_LIMITED_SELECT */
|
||||
#endif /* AIX */
|
||||
#endif /* ACE_WIN32 */
|
||||
|
||||
if (need_to_check)
|
||||
|
|
@ -2681,7 +2679,7 @@ ACE::handle_timed_complete (ACE_HANDLE h,
|
|||
int
|
||||
ACE::handle_timed_accept (ACE_HANDLE listener,
|
||||
ACE_Time_Value *timeout,
|
||||
int restart)
|
||||
bool restart)
|
||||
{
|
||||
ACE_TRACE ("ACE::handle_timed_accept");
|
||||
// Make sure we don't bomb out on erroneous values.
|
||||
|
|
@ -2733,9 +2731,7 @@ ACE::handle_timed_accept (ACE_HANDLE listener,
|
|||
return -1;
|
||||
/* NOTREACHED */
|
||||
case 0:
|
||||
if (timeout != 0
|
||||
&& timeout->sec () == 0
|
||||
&& timeout->usec () == 0)
|
||||
if (timeout != 0 && *timeout == ACE_Time_Value::zero)
|
||||
errno = EWOULDBLOCK;
|
||||
else
|
||||
errno = ETIMEDOUT;
|
||||
|
|
@ -3386,27 +3382,82 @@ ACE::strnew (const wchar_t *s)
|
|||
}
|
||||
#endif /* ACE_HAS_WCHAR */
|
||||
|
||||
inline static bool equal_char(char a, char b, bool case_sensitive)
|
||||
// helper functions for ACE::wild_match()
|
||||
namespace
|
||||
{
|
||||
if (case_sensitive)
|
||||
return a == b;
|
||||
return ACE_OS::ace_tolower(a) == ACE_OS::ace_tolower(b);
|
||||
|
||||
inline bool equal_char (char a, char b, bool case_sensitive)
|
||||
{
|
||||
if (case_sensitive)
|
||||
return a == b;
|
||||
return ACE_OS::ace_tolower (a) == ACE_OS::ace_tolower (b);
|
||||
}
|
||||
|
||||
// precond: *p == '[' start of char class
|
||||
// postcond: *p == ']' end of the char class
|
||||
inline bool equal_class (char s, const char *&p, bool case_sensitive)
|
||||
{
|
||||
++p;
|
||||
bool negate = false;
|
||||
if (*p == '!')
|
||||
{
|
||||
negate = true;
|
||||
++p;
|
||||
}
|
||||
// ] and - are regular in 1st position
|
||||
for (bool first = true; *p && (first || *p != ']'); ++p)
|
||||
{
|
||||
if (!first && *p == '-' && p[1] != ']')
|
||||
{
|
||||
if (!p[1] || p[1] <= p[-1]) // invalid range
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Since we are in the POSIX locale, only the basic ASCII
|
||||
// characters are allowed as the range endpoints. These characters
|
||||
// are the same values in both signed and unsigned chars so we
|
||||
// don't have to account for any "pathological cases."
|
||||
for (char range = p[-1] + 1; range <= p[1]; ++range)
|
||||
{
|
||||
if (equal_char (s, range, case_sensitive))
|
||||
{
|
||||
while (*++p != ']') {}
|
||||
return !negate;
|
||||
}
|
||||
}
|
||||
++p; // consume the character 1 past the -
|
||||
}
|
||||
else if (equal_char (s, *p, case_sensitive))
|
||||
{
|
||||
while (*++p != ']') {}
|
||||
return !negate;
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
return negate;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ACE::wild_match(const char* str, const char* pat, bool case_sensitive)
|
||||
ACE::wild_match(const char *str, const char *pat, bool case_sensitive,
|
||||
bool character_classes)
|
||||
{
|
||||
if (str == pat)
|
||||
return true;
|
||||
if (pat == 0 || str == 0)
|
||||
return false;
|
||||
|
||||
bool star = false;
|
||||
const char* s = str;
|
||||
const char* p = pat;
|
||||
bool star = false, escape = false;
|
||||
const char *s = str;
|
||||
const char *p = pat;
|
||||
while (*s != '\0')
|
||||
{
|
||||
if (*p == '*')
|
||||
if (!escape && *p == '\\')
|
||||
{
|
||||
++p;
|
||||
escape = true;
|
||||
}
|
||||
else if (!escape && *p == '*')
|
||||
{
|
||||
star = true;
|
||||
pat = p;
|
||||
|
|
@ -3416,22 +3467,38 @@ ACE::wild_match(const char* str, const char* pat, bool case_sensitive)
|
|||
return true;
|
||||
p = pat;
|
||||
}
|
||||
else if (*p == '?')
|
||||
else if (!escape && *p == '?')
|
||||
{
|
||||
++s;
|
||||
++p;
|
||||
}
|
||||
else if (! equal_char(*s, *p, case_sensitive))
|
||||
else if (!escape && character_classes && *p == '[')
|
||||
{
|
||||
if (equal_class (*s, p, case_sensitive))
|
||||
{
|
||||
++p;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!star)
|
||||
return false;
|
||||
p = pat;
|
||||
}
|
||||
++s;
|
||||
}
|
||||
else if (!equal_char (*s, *p, case_sensitive))
|
||||
{
|
||||
if (!star)
|
||||
return false;
|
||||
s = ++str;
|
||||
++s;
|
||||
p = pat;
|
||||
escape = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
++s;
|
||||
++p;
|
||||
escape = false;
|
||||
}
|
||||
}
|
||||
if (*p == '*')
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file ACE.h
|
||||
*
|
||||
* $Id: ACE.h 82581 2008-08-11 08:58:24Z johnnyw $
|
||||
* $Id: ACE.h 91603 2010-09-01 21:02:28Z shuston $
|
||||
*
|
||||
* This file contains value added ACE functions that extend the
|
||||
* behavior of the UNIX and Win32 OS calls.
|
||||
|
|
@ -90,7 +90,13 @@ namespace ACE
|
|||
|
||||
/// Simple wildcard matching function supporting '*' and '?'
|
||||
/// return true if string s matches pattern.
|
||||
extern ACE_Export bool wild_match(const char* s, const char* pattern, bool case_sensitive = true);
|
||||
/// If character_classes is true, '[' is treated as a wildcard character
|
||||
/// as described in the fnmatch() POSIX API. The following POSIX "bracket
|
||||
/// expression" features are not implemented: collating symbols, equivalence
|
||||
/// class expressions, and character class expressions. The POSIX locale is
|
||||
/// assumed.
|
||||
extern ACE_Export bool wild_match(const char* s, const char* pattern,
|
||||
bool case_sensitive = true, bool character_classes = false);
|
||||
|
||||
/**
|
||||
* @name I/O operations
|
||||
|
|
@ -354,7 +360,7 @@ namespace ACE
|
|||
*/
|
||||
extern ACE_Export int handle_timed_accept (ACE_HANDLE listener,
|
||||
ACE_Time_Value *timeout,
|
||||
int restart);
|
||||
bool restart);
|
||||
|
||||
/**
|
||||
* Wait up to @a timeout amount of time to complete an actively
|
||||
|
|
@ -384,7 +390,6 @@ namespace ACE
|
|||
extern ACE_Export int max_handles (void);
|
||||
|
||||
// = String functions
|
||||
#if !defined (ACE_HAS_WINCE)
|
||||
/**
|
||||
* Return a dynamically allocated duplicate of @a str, substituting
|
||||
* the environment variable if @c str[0] @c == @c '$'. Note that
|
||||
|
|
@ -392,7 +397,6 @@ namespace ACE
|
|||
* by @c ACE_OS::free.
|
||||
*/
|
||||
extern ACE_Export ACE_TCHAR *strenvdup (const ACE_TCHAR *str);
|
||||
#endif /* ACE_HAS_WINCE */
|
||||
|
||||
/// Returns a pointer to the "end" of the string, i.e., the character
|
||||
/// past the '\0'.
|
||||
|
|
@ -414,6 +418,9 @@ namespace ACE
|
|||
/// @c ACE_OS::malloc to allocate the new string.
|
||||
extern ACE_Export char *strnnew (const char *str, size_t n);
|
||||
|
||||
/// Determine if a specified pathname is "dot dir" (ie. "." or "..").
|
||||
ACE_NAMESPACE_INLINE_FUNCTION bool isdotdir (const char *s);
|
||||
|
||||
#if defined (ACE_HAS_WCHAR)
|
||||
extern ACE_Export const wchar_t *strend (const wchar_t *s);
|
||||
|
||||
|
|
@ -425,6 +432,8 @@ namespace ACE
|
|||
|
||||
extern ACE_Export wchar_t *strnnew (const wchar_t *str, size_t n);
|
||||
|
||||
ACE_NAMESPACE_INLINE_FUNCTION bool isdotdir (const wchar_t *s);
|
||||
|
||||
#endif /* ACE_HAS_WCHAR */
|
||||
|
||||
/**
|
||||
|
|
@ -464,6 +473,22 @@ namespace ACE
|
|||
ACE_TCHAR delim =
|
||||
ACE_DIRECTORY_SEPARATOR_CHAR);
|
||||
|
||||
/**
|
||||
* Returns the given timestamp in the form
|
||||
* "hour:minute:second:microsecond." The month, day, and year are
|
||||
* also stored in the beginning of the @a date_and_time array, which
|
||||
* is a user-supplied array of size @a time_len> @c ACE_TCHARs.
|
||||
* Returns 0 if unsuccessful, else returns pointer to beginning of the
|
||||
* "time" portion of @a date_and_time. If @a
|
||||
* return_pointer_to_first_digit is 0 then return a pointer to the
|
||||
* space before the time, else return a pointer to the beginning of
|
||||
* the time portion.
|
||||
*/
|
||||
extern ACE_Export ACE_TCHAR *timestamp (const ACE_Time_Value& time_value,
|
||||
ACE_TCHAR date_and_time[],
|
||||
size_t time_len,
|
||||
bool return_pointer_to_first_digit = false);
|
||||
|
||||
/**
|
||||
* Returns the current timestamp in the form
|
||||
* "hour:minute:second:microsecond." The month, day, and year are
|
||||
|
|
@ -618,7 +643,7 @@ namespace ACE
|
|||
ACE_NAMESPACE_INLINE_FUNCTION u_long log2 (u_long num);
|
||||
|
||||
/// Hex conversion utility.
|
||||
ACE_NAMESPACE_INLINE_FUNCTION ACE_TCHAR nibble2hex (u_int n);
|
||||
extern ACE_Export ACE_TCHAR nibble2hex (u_int n);
|
||||
|
||||
/// Convert a hex character to its byte representation.
|
||||
ACE_NAMESPACE_INLINE_FUNCTION u_char hex2byte (ACE_TCHAR c);
|
||||
|
|
@ -641,21 +666,33 @@ namespace ACE
|
|||
const ACE_Time_Value *timeout = 0);
|
||||
|
||||
/// Timed wait for handle to get read ready.
|
||||
/// @retval -1 for error
|
||||
/// @retval 0 for timeout
|
||||
/// @retval 1 the handle is ready
|
||||
ACE_NAMESPACE_INLINE_FUNCTION
|
||||
int handle_read_ready (ACE_HANDLE handle,
|
||||
const ACE_Time_Value *timeout);
|
||||
|
||||
/// Timed wait for handle to get write ready.
|
||||
/// @retval -1 for error
|
||||
/// @retval 0 for timeout
|
||||
/// @retval 1 the handle is ready
|
||||
ACE_NAMESPACE_INLINE_FUNCTION
|
||||
int handle_write_ready (ACE_HANDLE handle,
|
||||
const ACE_Time_Value *timeout);
|
||||
|
||||
/// Timed wait for handle to get exception ready.
|
||||
/// @retval -1 for error
|
||||
/// @retval 0 for timeout
|
||||
/// @retval 1 the handle is ready
|
||||
ACE_NAMESPACE_INLINE_FUNCTION
|
||||
int handle_exception_ready (ACE_HANDLE handle,
|
||||
const ACE_Time_Value *timeout);
|
||||
|
||||
/// Timed wait for handle to get read, write, or exception ready.
|
||||
/// @retval -1 for error
|
||||
/// @retval 0 for timeout
|
||||
/// @retval 1 the handle is ready
|
||||
extern ACE_Export int handle_ready (ACE_HANDLE handle,
|
||||
const ACE_Time_Value *timeout,
|
||||
int read_ready,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// $Id: ACE.inl 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ACE.inl 87366 2009-11-05 20:16:30Z olli $
|
||||
|
||||
#include "ace/OS_NS_unistd.h"
|
||||
#include "ace/OS_NS_Thread.h"
|
||||
|
|
@ -284,6 +284,22 @@ ACE::strdelete (wchar_t *s)
|
|||
}
|
||||
#endif /* ACE_HAS_WCHAR */
|
||||
|
||||
ACE_INLINE bool
|
||||
ACE::isdotdir (const char *s)
|
||||
{
|
||||
return (s[0] == '.' &&
|
||||
((s[1] == 0) || (s[1] == '.' && s[2] == 0)));
|
||||
}
|
||||
|
||||
#if defined (ACE_HAS_WCHAR)
|
||||
ACE_INLINE bool
|
||||
ACE::isdotdir (const wchar_t *s)
|
||||
{
|
||||
return (s[0] == ACE_TEXT ('.') &&
|
||||
((s[1] == 0) || (s[1] == ACE_TEXT ('.') && s[2] == 0)));
|
||||
}
|
||||
#endif /* ACE_HAS_WCHAR */
|
||||
|
||||
ACE_INLINE void
|
||||
ACE::unique_name (const void *object,
|
||||
ACE_TCHAR *name,
|
||||
|
|
@ -303,24 +319,6 @@ ACE::log2 (u_long num)
|
|||
return log;
|
||||
}
|
||||
|
||||
ACE_INLINE ACE_TCHAR
|
||||
ACE::nibble2hex (u_int n)
|
||||
{
|
||||
// Hexadecimal characters.
|
||||
#if defined (ACE_VXWORKS) && !defined (__DCPLUSPLUS__)
|
||||
// temporary solution to prevent Windriver GNU toolchains from spewing
|
||||
// loads of warnings when inlining.
|
||||
// problem (incorrect warning leftover from older GNU) has been reported as
|
||||
// TSR to Windriver.
|
||||
const ACE_TCHAR hex_chars[] = ACE_TEXT ("0123456789abcdef");
|
||||
#else
|
||||
static const ACE_TCHAR hex_chars[] = ACE_TEXT ("0123456789abcdef");
|
||||
#endif
|
||||
|
||||
// Yes, this works for UNICODE
|
||||
return hex_chars[n & 0x0f];
|
||||
}
|
||||
|
||||
ACE_INLINE int
|
||||
ACE::map_errno (int error)
|
||||
{
|
||||
|
|
|
|||
10
dep/ACE_wrappers/ace/ACE.pc.in
Normal file
10
dep/ACE_wrappers/ace/ACE.pc.in
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: ACE
|
||||
Description: ADAPTIVE Communication Environment
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lACE @LIBS@
|
||||
Cflags: -I${includedir}
|
||||
|
|
@ -1,12 +1,7 @@
|
|||
// $Id: ACE_crc32.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ACE_crc32.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/ACE.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
ACE_crc32,
|
||||
"$Id: ACE_crc32.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
/*****************************************************************/
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
// $Id: ACE_crc_ccitt.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ACE_crc_ccitt.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/ACE.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
ACE_crc_ccitt,
|
||||
"$Id: ACE_crc_ccitt.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
namespace
|
||||
{
|
||||
/*****************************************************************/
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: ARGV.cpp 81374 2008-04-16 13:07:47Z iliyan $
|
||||
// $Id: ARGV.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#ifndef ACE_ARGV_CPP
|
||||
#define ACE_ARGV_CPP
|
||||
|
|
@ -12,8 +12,6 @@
|
|||
#include "ace/ARGV.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
ACE_RCSID(ace, ARGV, "$Id: ARGV.cpp 81374 2008-04-16 13:07:47Z iliyan $")
|
||||
|
||||
// Open versioned namespace, if enabled by the user.
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// $Id: ATM_Acceptor.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ATM_Acceptor.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/ATM_Acceptor.h"
|
||||
|
||||
ACE_RCSID(ace, ATM_Acceptor, "$Id: ATM_Acceptor.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
#if defined (ACE_HAS_ATM)
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ ACE_ATM_Acceptor::get_local_addr (ACE_ATM_Addr &local_addr)
|
|||
return -1;
|
||||
}
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
#else
|
||||
ACE_UNUSED_ARG (local_addr);
|
||||
|
||||
|
|
@ -236,8 +236,8 @@ int
|
|||
ACE_ATM_Acceptor::accept (ACE_ATM_Stream &new_sap,
|
||||
ACE_Addr *remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
int restart,
|
||||
int reset_new_handle,
|
||||
bool restart,
|
||||
bool reset_new_handle,
|
||||
ACE_ATM_Params params,
|
||||
ACE_ATM_QoS qos)
|
||||
{
|
||||
|
|
@ -298,7 +298,7 @@ ACE_ATM_Acceptor::accept (ACE_ATM_Stream &new_sap,
|
|||
ACE_UNUSED_ARG (reset_new_handle);
|
||||
ACE_UNUSED_ARG (params);
|
||||
ACE_UNUSED_ARG (qos);
|
||||
return (0);
|
||||
return 0;
|
||||
#endif /* ACE_HAS_FORE_ATM_XTI */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file ATM_Acceptor.h
|
||||
*
|
||||
* $Id: ATM_Acceptor.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: ATM_Acceptor.h 82723 2008-09-16 09:35:44Z johnnyw $
|
||||
*
|
||||
* @author Joe Hoffert
|
||||
*/
|
||||
|
|
@ -88,8 +88,8 @@ public:
|
|||
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,
|
||||
bool restart = true,
|
||||
bool reset_new_handle = false,
|
||||
ACE_ATM_Params params = ACE_ATM_Params(),
|
||||
ACE_ATM_QoS qos = ACE_ATM_QoS());
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: ATM_Addr.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ATM_Addr.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
// Defines the Internet domain address family address format.
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
#include "ace/ATM_Addr.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
ACE_RCSID(ace, ATM_Addr, "$Id: ATM_Addr.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
|
|
@ -338,7 +338,7 @@ ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[])
|
|||
}
|
||||
|
||||
if (WSALookupServiceEnd (hLookup) == SOCKET_ERROR) {
|
||||
ACE_OS::printf ("Error : WSALookupServiceEnd failed! %d \n",
|
||||
ACE_OS::printf ("Error : WSALookupServiceEnd failed! %d\n",
|
||||
::WSAGetLastError ());
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
// ATM_Connector.cpp
|
||||
// $Id: ATM_Connector.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ATM_Connector.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/ATM_Connector.h"
|
||||
#if defined (ACE_HAS_ATM)
|
||||
|
||||
#include "ace/Handle_Set.h"
|
||||
|
||||
ACE_RCSID(ace, ATM_Connector, "$Id: ATM_Connector.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/ATM_Connector.inl"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file ATM_Connector.h
|
||||
*
|
||||
* $Id: ATM_Connector.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: ATM_Connector.h 82723 2008-09-16 09:35:44Z johnnyw $
|
||||
*
|
||||
* @author Joe Hoffert <joeh@cs.wustl.edu>
|
||||
*/
|
||||
|
|
@ -136,7 +136,7 @@ public:
|
|||
ACE_ATM_QoS &qos);
|
||||
|
||||
/// Resets any event associations on this handle
|
||||
int reset_new_handle (ACE_HANDLE handle);
|
||||
bool reset_new_handle (ACE_HANDLE handle);
|
||||
|
||||
// = Meta-type info
|
||||
typedef ACE_ATM_Addr PEER_ADDR;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// $Id: ATM_Connector.inl 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ATM_Connector.inl 84565 2009-02-23 08:20:39Z johnnyw $
|
||||
|
||||
// Open versioned namespace, if enabled by the user.
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
|
@ -96,7 +96,7 @@ ACE_ATM_Connector::add_leaf (ACE_ATM_Stream ¤t_stream,
|
|||
|
||||
return (result != ACE_INVALID_HANDLE);
|
||||
#elif defined (ACE_HAS_LINUX_ATM)
|
||||
ACE_OS::printf("ATM_Connector(add_leaf): not yet implemented in Linux \n");
|
||||
ACE_OS::printf("ATM_Connector(add_leaf): not yet implemented in Linux\n");
|
||||
|
||||
ACE_UNUSED_ARG(current_stream);
|
||||
ACE_UNUSED_ARG(remote_sap);
|
||||
|
|
@ -114,7 +114,7 @@ ACE_ATM_Connector::add_leaf (ACE_ATM_Stream ¤t_stream,
|
|||
}
|
||||
|
||||
ACE_INLINE
|
||||
int
|
||||
bool
|
||||
ACE_ATM_Connector::reset_new_handle (ACE_HANDLE handle)
|
||||
{
|
||||
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
|
||||
|
|
@ -124,7 +124,7 @@ ACE_ATM_Connector::reset_new_handle (ACE_HANDLE handle)
|
|||
0);
|
||||
#else /* !defined ACE_HAS_WINSOCK2 */
|
||||
ACE_UNUSED_ARG (handle);
|
||||
return 0;
|
||||
return false;
|
||||
#endif /* ACE_WIN32 */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
// $Id: ATM_Params.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ATM_Params.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/ATM_Params.h"
|
||||
|
||||
#if defined (ACE_HAS_ATM)
|
||||
|
||||
ACE_RCSID(ace, ATM_Params, "$Id: ATM_Params.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/ATM_Params.inl"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// $Id: ATM_QoS.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ATM_QoS.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/ATM_QoS.h"
|
||||
|
||||
ACE_RCSID(ace, ATM_QoS, "$Id: ATM_QoS.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
#if defined (ACE_HAS_ATM)
|
||||
|
||||
|
|
@ -451,7 +451,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd,
|
|||
ACE_UNUSED_ARG (rate);
|
||||
ACE_UNUSED_ARG (flags);
|
||||
ACE_UNUSED_ARG (len);
|
||||
return (0);
|
||||
return 0;
|
||||
#elif defined (ACE_HAS_FORE_ATM_XTI)
|
||||
struct t_opthdr *popt;
|
||||
char *buf;
|
||||
|
|
@ -621,7 +621,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd,
|
|||
ACE_UNUSED_ARG (rate);
|
||||
ACE_UNUSED_ARG (flag);
|
||||
ACE_UNUSED_ARG (len);
|
||||
return (0);
|
||||
return 0;
|
||||
#endif /* ACE_HAS_FORE_ATM_WS2 */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
// $Id: ATM_Stream.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ATM_Stream.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/ATM_Stream.h"
|
||||
|
||||
ACE_RCSID (ace, ATM_Stream, "$Id: ATM_Stream.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
#if defined (ACE_HAS_ATM)
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
|
|
@ -216,7 +214,7 @@ ACE_ATM_Stream::get_vpi_vci (ACE_UINT16 &vpi,
|
|||
|
||||
vpi = conn_prop.vpi;
|
||||
vci = conn_prop.vci;
|
||||
return (0);
|
||||
return 0;
|
||||
#elif defined (ACE_HAS_FORE_ATM_WS2)
|
||||
ATM_CONNECTION_ID connID;
|
||||
DWORD bytes = 0;
|
||||
|
|
@ -278,10 +276,10 @@ ACE_ATM_Stream::get_vpi_vci (ACE_UINT16 &vpi,
|
|||
ACE_UNUSED_ARG (vci);
|
||||
ACE_UNUSED_ARG (vpi);
|
||||
|
||||
return (-1);
|
||||
return -1;
|
||||
#endif /* SO_ATMPVC || SO_VCID */
|
||||
#else
|
||||
return (-1);
|
||||
return -1;
|
||||
#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// $Id: ATM_Stream.inl 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: ATM_Stream.inl 84262 2009-01-29 10:34:33Z johnnyw $
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ ACE_ATM_Stream::recv (void *buf,
|
|||
ACE_UNUSED_ARG(buf);
|
||||
ACE_UNUSED_ARG(n);
|
||||
ACE_UNUSED_ARG(flags);
|
||||
return (0);
|
||||
return 0;
|
||||
#endif /* ACE_HAS_FORE_ATM_XTI */
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ ACE_ATM_Stream::send_n (const void *buf,
|
|||
ACE_UNUSED_ARG(buf);
|
||||
ACE_UNUSED_ARG(n);
|
||||
ACE_UNUSED_ARG(flags);
|
||||
return (0);
|
||||
return 0;
|
||||
#endif /* ACE_HAS_FORE_ATM_XTI */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: Acceptor.cpp 91604 2010-09-02 14:51:58Z vzykov $
|
||||
|
||||
#ifndef ACE_ACCEPTOR_CPP
|
||||
#define ACE_ACCEPTOR_CPP
|
||||
|
||||
|
|
@ -15,10 +17,6 @@
|
|||
#include "ace/OS_NS_string.h"
|
||||
#include "ace/OS_NS_sys_select.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Acceptor,
|
||||
"$Id: Acceptor.cpp 81991 2008-06-16 19:05:40Z elliott_c $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_ALLOC_HOOK_DEFINE(ACE_Acceptor)
|
||||
|
|
@ -287,12 +285,23 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler
|
|||
// 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 ();
|
||||
|
||||
ACE_Reactor *reactor = this->reactor ();
|
||||
bool reset_new_handle;
|
||||
|
||||
if (reactor)
|
||||
reset_new_handle = reactor->uses_event_associations ();
|
||||
else
|
||||
{
|
||||
// Acceptor is closed, so reject this call
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (this->acceptor ().accept (svc_handler->peer (), // stream
|
||||
0, // remote address
|
||||
0, // timeout
|
||||
1, // restart
|
||||
true, // restart
|
||||
reset_new_handle // reset new handler
|
||||
) == -1)
|
||||
{
|
||||
|
|
@ -984,7 +993,7 @@ 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)
|
||||
bool 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.
|
||||
|
|
@ -1037,8 +1046,8 @@ 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)
|
||||
bool restart,
|
||||
bool reset_new_handle)
|
||||
{
|
||||
ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::shared_accept");
|
||||
if (svc_handler == 0)
|
||||
|
|
@ -1074,8 +1083,8 @@ 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)
|
||||
bool restart,
|
||||
bool 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 >
|
||||
|
|
@ -1128,7 +1137,7 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE
|
|||
// 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 ();
|
||||
bool const reset_new_handle = this->reactor ()->uses_event_associations ();
|
||||
|
||||
// There is a use-case whereby this object will be gone upon return
|
||||
// from shared_accept - if the Svc_Handler deletes this Oneshot_Acceptor
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Acceptor.h
|
||||
*
|
||||
* $Id: Acceptor.h 81460 2008-04-28 11:34:23Z elliott_c $
|
||||
* $Id: Acceptor.h 88800 2010-02-01 23:18:34Z shuston $
|
||||
*
|
||||
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
|
||||
*/
|
||||
|
|
@ -89,7 +89,7 @@ public:
|
|||
* @param use_select Affects behavior when called back by the reactor
|
||||
* when a connection can be accepted. If non-zero,
|
||||
* this object will accept all pending connections,
|
||||
* intead of just the one that triggered the reactor
|
||||
* instead of just the one that triggered the reactor
|
||||
* callback. Uses ACE_OS::select() internally to
|
||||
* detect any remaining acceptable connections.
|
||||
* The default is 1.
|
||||
|
|
@ -128,7 +128,7 @@ public:
|
|||
* @param use_select Affects behavior when called back by the reactor
|
||||
* when a connection can be accepted. If non-zero,
|
||||
* this object will accept all pending connections,
|
||||
* intead of just the one that triggered the reactor
|
||||
* instead of just the one that triggered the reactor
|
||||
* callback. Uses ACE_OS::select() internally to
|
||||
* detect any remaining acceptable connections.
|
||||
* The default is 1.
|
||||
|
|
@ -187,7 +187,7 @@ protected:
|
|||
|
||||
/**
|
||||
* Bridge method for accepting the new connection into the
|
||||
* <svc_handler>. The default behavior delegates to the
|
||||
* @a svc_handler. The default behavior delegates to the
|
||||
* PEER_ACCEPTOR::accept.
|
||||
*/
|
||||
virtual int accept_svc_handler (SVC_HANDLER *svc_handler);
|
||||
|
|
@ -293,8 +293,6 @@ public:
|
|||
typedef ACE_Concurrency_Strategy<SVC_HANDLER> CONCURRENCY_STRATEGY;
|
||||
typedef ACE_Scheduling_Strategy<SVC_HANDLER> SCHEDULING_STRATEGY;
|
||||
|
||||
|
||||
|
||||
/// Default constructor.
|
||||
ACE_Strategy_Acceptor (const ACE_TCHAR service_name[] = 0,
|
||||
const ACE_TCHAR service_description[] = 0,
|
||||
|
|
@ -341,7 +339,7 @@ public:
|
|||
* @param use_select Affects behavior when called back by the reactor
|
||||
* when a connection can be accepted. If non-zero,
|
||||
* this object will accept all pending connections,
|
||||
* intead of just the one that triggered the reactor
|
||||
* instead of just the one that triggered the reactor
|
||||
* callback. Uses ACE_OS::select() internally to
|
||||
* detect any remaining acceptable connections.
|
||||
* The default is 1.
|
||||
|
|
@ -505,21 +503,30 @@ protected:
|
|||
* @class ACE_Oneshot_Acceptor
|
||||
*
|
||||
* @brief Generic factory for passively connecting clients and creating
|
||||
* exactly one service handler (SVC_HANDLER).
|
||||
* exactly one service handler of the type SVC_HANDLER specified in the
|
||||
* template.
|
||||
*
|
||||
* This class works similarly to the regular {ACE_Acceptor},
|
||||
* This class works similarly to the regular ACE_Acceptor, but
|
||||
* 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).
|
||||
* -# ACE_Oneshot_Acceptor doesn't automatically register itself with the
|
||||
* ACE_Reactor; the caller is expected to call the accept() method
|
||||
* directly. Since a later call to accept() may require a reactor,
|
||||
* the constructor and open() methods both accept an ACE_Reactor pointer
|
||||
* which is saved in case it's needed in accept().
|
||||
* -# ACE_Oneshot_Acceptor doesn't need an ACE_Creation_Strategy (because
|
||||
* the user supplies the SVC_HANDLER) or an ACE_Accept_Strategy (because
|
||||
* this class only accepts one connection and then removes all traces of
|
||||
* itself from the ACE_Reactor if it was registered for asynchronous
|
||||
* accepts).
|
||||
*
|
||||
* The usage model for ACE_Oneshot_Acceptor is:
|
||||
* - Instantiate an object and establish its local address to listen at.
|
||||
* This can be accomplished using either the address-accepting constructor
|
||||
* (but there's no error indication) or the default constructor followed
|
||||
* by a call to open().
|
||||
* - Call the accept() method. This will attempt to accept a connection
|
||||
* immediately. If there is no immediately available connection to accept,
|
||||
* behavior is governed by the ACE_Synch_Options argument passed to open().
|
||||
*/
|
||||
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
|
||||
class ACE_Oneshot_Acceptor : public ACE_Service_Object
|
||||
|
|
@ -537,10 +544,10 @@ public:
|
|||
|
||||
/**
|
||||
* 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
|
||||
* open the acceptor at the designated @a local_addr. Note
|
||||
* that unlike ACE_Acceptor and ACE_Strategy_Acceptor, this
|
||||
* method does NOT register this acceptor with the @a reactor at
|
||||
* this point -- the @a reactor parameter is saved in case it's
|
||||
* needed later.
|
||||
*/
|
||||
ACE_Oneshot_Acceptor (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
|
||||
|
|
@ -549,10 +556,10 @@ public:
|
|||
|
||||
/**
|
||||
* 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
|
||||
* open the acceptor at the designated @a local_addr. Note
|
||||
* that unlike ACE_Acceptor and ACE_Strategy_Acceptor, this
|
||||
* method does NOT register this acceptor with the @a reactor at
|
||||
* this point -- the @a reactor parameter is saved in case it's
|
||||
* needed later.
|
||||
*/
|
||||
int open (const ACE_PEER_ACCEPTOR_ADDR &,
|
||||
|
|
@ -568,8 +575,8 @@ public:
|
|||
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);
|
||||
bool restart = true,
|
||||
bool reset_new_handle = false);
|
||||
|
||||
/// Cancel a oneshot acceptor that was started asynchronously.
|
||||
virtual int cancel (void);
|
||||
|
|
@ -605,8 +612,8 @@ protected:
|
|||
int shared_accept (SVC_HANDLER *svc_handler,
|
||||
ACE_PEER_ACCEPTOR_ADDR *remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
int restart,
|
||||
int reset_new_handle);
|
||||
bool restart,
|
||||
bool reset_new_handle);
|
||||
|
||||
// = Demultiplexing hooks.
|
||||
/// Returns the listening acceptor's {ACE_HANDLE}.
|
||||
|
|
@ -654,13 +661,13 @@ private:
|
|||
*/
|
||||
int register_handler (SVC_HANDLER *svc_handler,
|
||||
const ACE_Synch_Options &options,
|
||||
int restart);
|
||||
bool restart);
|
||||
|
||||
/// Hold the svc_handler_ across asynchrony boundaries.
|
||||
SVC_HANDLER *svc_handler_;
|
||||
|
||||
/// Hold the restart flag across asynchrony boundaries.
|
||||
int restart_;
|
||||
bool restart_;
|
||||
|
||||
/// Factory that establishes connections passively.
|
||||
ACE_PEER_ACCEPTOR peer_acceptor_;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: Activation_Queue.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Activation_Queue.h"
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
|
|
@ -9,10 +11,6 @@
|
|||
#include "ace/Malloc_Base.h"
|
||||
#include "ace/Time_Value.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Activation_Queue,
|
||||
"$Id: Activation_Queue.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
void
|
||||
|
|
@ -23,7 +21,7 @@ ACE_Activation_Queue::dump (void) const
|
|||
ACE_DEBUG ((LM_DEBUG,
|
||||
ACE_TEXT ("delete_queue_ = %d\n"),
|
||||
this->delete_queue_));
|
||||
ACE_DEBUG ((LM_INFO, ACE_TEXT ("queue_: \n")));
|
||||
ACE_DEBUG ((LM_INFO, ACE_TEXT ("queue_:\n")));
|
||||
if (this->queue_)
|
||||
this->queue_->dump();
|
||||
else
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Activation_Queue.h
|
||||
*
|
||||
* $Id: Activation_Queue.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Activation_Queue.h 91066 2010-07-12 11:05:04Z johnnyw $
|
||||
*
|
||||
* @author Andres Kruse <Andres.Kruse@cern.ch>
|
||||
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
#endif /* ACE_LACKS_PRAGMA_ONCE */
|
||||
|
||||
#include "ace/Message_Queue.h"
|
||||
#include "ace/Copy_Disabled.h"
|
||||
#include "ace/Condition_Thread_Mutex.h"
|
||||
|
||||
/// Define to be compatible with the terminology in the POSA2 book!
|
||||
|
|
@ -35,7 +36,8 @@ class ACE_Method_Request;
|
|||
/**
|
||||
* @class ACE_Activation_Queue
|
||||
*
|
||||
* @brief Reifies a method into a request. Subclasses typically
|
||||
* @brief
|
||||
* Reifies a method into a request. Subclasses typically
|
||||
* represent necessary state and behavior.
|
||||
*
|
||||
* Maintains a priority-ordered queue of ACE_Method_Request objects.
|
||||
|
|
@ -47,10 +49,9 @@ class ACE_Method_Request;
|
|||
*
|
||||
* @sa ACE_Method_Request
|
||||
*/
|
||||
class ACE_Export ACE_Activation_Queue
|
||||
class ACE_Export ACE_Activation_Queue : private ACE_Copy_Disabled
|
||||
{
|
||||
public:
|
||||
// = Initialization and termination methods.
|
||||
/// Constructor.
|
||||
/**
|
||||
* Initializes a new activation queue.
|
||||
|
|
@ -139,12 +140,6 @@ public:
|
|||
/// Declare the dynamic allocation hooks.
|
||||
ACE_ALLOC_HOOK_DECLARE;
|
||||
|
||||
private:
|
||||
|
||||
// = Prevent copying and assignment.
|
||||
ACE_Activation_Queue (const ACE_Activation_Queue &);
|
||||
void operator= (const ACE_Activation_Queue &);
|
||||
|
||||
protected:
|
||||
|
||||
/// Stores the Method_Requests.
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
// $Id: Active_Map_Manager.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Active_Map_Manager.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Active_Map_Manager.h"
|
||||
|
||||
ACE_RCSID(ace, Active_Map_Manager, "$Id: Active_Map_Manager.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/Active_Map_Manager.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Active_Map_Manager.h
|
||||
*
|
||||
* $Id: Active_Map_Manager.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Active_Map_Manager.h 91066 2010-07-12 11:05:04Z johnnyw $
|
||||
*
|
||||
* @author Irfan Pyarali
|
||||
*/
|
||||
|
|
@ -78,7 +78,7 @@ public:
|
|||
// = This really should be protected but because of template
|
||||
// friends, they are not.
|
||||
|
||||
/// Increment the <slot_generation> number.
|
||||
/// Increment the slot_generation number.
|
||||
void increment_slot_generation_count (void);
|
||||
|
||||
private:
|
||||
|
|
@ -95,7 +95,7 @@ private:
|
|||
/// Slot index in the active map.
|
||||
ACE_UINT32 slot_index_;
|
||||
|
||||
/// Slot generation number of <slot_index_> slot in the active map.
|
||||
/// Slot generation number of @c slot_index_ slot in the active map.
|
||||
ACE_UINT32 slot_generation_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Active_Map_Manager_T.h
|
||||
*
|
||||
* $Id: Active_Map_Manager_T.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Active_Map_Manager_T.h 84316 2009-02-03 19:46:05Z johnnyw $
|
||||
*
|
||||
* @author Irfan Pyarali
|
||||
*/
|
||||
|
|
@ -53,22 +53,22 @@ public:
|
|||
typedef REVERSE_ITERATOR reverse_iterator;
|
||||
|
||||
// = Initialization and termination methods.
|
||||
/// Initialize a <Active_Map_Manager> with the ACE_DEFAULT_MAP_SIZE.
|
||||
/// Initialize a Active_Map_Manager with the ACE_DEFAULT_MAP_SIZE.
|
||||
ACE_Active_Map_Manager (ACE_Allocator *alloc = 0);
|
||||
|
||||
/// Initialize a <Active_Map_Manager> with @a size entries.
|
||||
/// Initialize a Active_Map_Manager with @a size entries.
|
||||
ACE_Active_Map_Manager (size_t size,
|
||||
ACE_Allocator *alloc = 0);
|
||||
|
||||
/// Close down a <Active_Map_Manager> and release dynamically
|
||||
/// Close down a Active_Map_Manager and release dynamically
|
||||
/// allocated resources.
|
||||
~ACE_Active_Map_Manager (void);
|
||||
|
||||
/// Initialize a <Active_Map_Manager> with size @a length.
|
||||
/// Initialize a Active_Map_Manager with size @a length.
|
||||
int open (size_t length = ACE_DEFAULT_MAP_SIZE,
|
||||
ACE_Allocator *alloc = 0);
|
||||
|
||||
/// Close down a <Active_Map_Manager> and release dynamically
|
||||
/// Close down a Active_Map_Manager and release dynamically
|
||||
/// allocated resources.
|
||||
int close (void);
|
||||
|
||||
|
|
@ -84,8 +84,8 @@ public:
|
|||
/**
|
||||
* Reserves a slot in the internal structure and returns the key and
|
||||
* a pointer to the value. User should place their @a value into
|
||||
* <*internal_value>. This method is useful in reducing the number
|
||||
* of copies required in some cases. Note that <internal_value> is
|
||||
* @a internal_value. This method is useful in reducing the number
|
||||
* of copies required in some cases. Note that @a 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.
|
||||
|
|
@ -126,8 +126,8 @@ public:
|
|||
|
||||
/**
|
||||
* Locate @a value associated with @a 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
|
||||
* @a internal_value and hence a copy is saved. Note that
|
||||
* @a 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.
|
||||
*/
|
||||
|
|
@ -148,8 +148,8 @@ public:
|
|||
|
||||
/**
|
||||
* Locate @a value associated with @a 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
|
||||
* @a internal_value and hence a copy is saved. Note that
|
||||
* @a 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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,13 +1,7 @@
|
|||
// $Id: Addr.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Addr.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Addr.h"
|
||||
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Addr,
|
||||
"$Id: Addr.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/Addr.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// $Id: Addr.inl 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Addr.inl 87295 2009-11-02 14:45:59Z johnnyw $
|
||||
|
||||
// Return the address of the address.
|
||||
|
||||
|
|
@ -20,32 +20,28 @@ ACE_Addr::operator != (const ACE_Addr &sap) const
|
|||
sap.addr_size_ != this->addr_size_ );
|
||||
}
|
||||
|
||||
// Return the size of the address.
|
||||
|
||||
/// 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.
|
||||
|
||||
/// 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.
|
||||
|
||||
/// 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.
|
||||
|
||||
/// Set the type of the address.
|
||||
ACE_INLINE void
|
||||
ACE_Addr::set_type (int type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: Arg_Shifter.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#ifndef ACE_ARG_SHIFTER_T_CPP
|
||||
#define ACE_ARG_SHIFTER_T_CPP
|
||||
|
||||
|
|
@ -7,11 +9,6 @@
|
|||
#include "ace/OS_Errno.h"
|
||||
#include "ace/OS_Memory.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Arg_Shifter,
|
||||
"$Id: Arg_Shifter.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
template <typename CHAR_TYPE>
|
||||
|
|
@ -133,8 +130,7 @@ ACE_Arg_Shifter_T<CHAR_TYPE>::cur_arg_strncasecmp (const CHAR_TYPE *flag)
|
|||
flag,
|
||||
flag_length) == 0)
|
||||
{
|
||||
if (ACE_OS::strlen(temp_[current_index_]) ==
|
||||
flag_length)
|
||||
if (ACE_OS::strlen(temp_[current_index_]) == flag_length)
|
||||
{
|
||||
// match and lengths are equal
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Arg_Shifter.h
|
||||
*
|
||||
* $Id: Arg_Shifter.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Arg_Shifter.h 91459 2010-08-25 09:51:01Z mcorino $
|
||||
*
|
||||
* @author Seth Widoff
|
||||
*/
|
||||
|
|
@ -33,13 +33,23 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
|||
* @a argv vector, so deeper levels of argument parsing can locate the yet
|
||||
* unprocessed arguments at the beginning of the vector.
|
||||
*
|
||||
* Nomenclature:
|
||||
* argument - a member of the argv array
|
||||
* option - an argument starting with '-'
|
||||
* flag - synonym for "option"
|
||||
* parameter value - an argument not starting with '-'
|
||||
* parameter - synonym for "parameter value"
|
||||
*
|
||||
* The @c ACE_Arg_Shifter copies the pointers of the @a argv vector
|
||||
* into a temporary array. As the @c ACE_Arg_Shifter iterates over
|
||||
* the copied vector, it places known arguments in the rear of the
|
||||
* vector, leaving the unknown ones in the beginning. So, after having
|
||||
* visited all the arguments in the temporary vector, @c ACE_Arg_Shifter
|
||||
* has placed all the unknown arguments in their original order at
|
||||
* the front of original @a argv.
|
||||
* into a temporary array, emptying the original. As the @c ACE_Arg_Shifter
|
||||
* iterates over the temporary array, it places known arguments in the rear
|
||||
* of the original array and places the unknown ones in the beginning of the
|
||||
* original array. It modifies argc to be the number of unknown arguments,
|
||||
* so it looks to the caller as if the original array contains only unknown
|
||||
* arguments. So, after @c ACE_Arg_Shifter has visited all the arguments
|
||||
* in the temporary array, the original @a argv array appears to contain
|
||||
* only the unknown arguments in their original order (but it actually has
|
||||
* all the known arguments, too, beyond argc).
|
||||
*/
|
||||
template <typename CHAR_TYPE>
|
||||
class ACE_Arg_Shifter_T
|
||||
|
|
@ -106,7 +116,7 @@ public:
|
|||
* 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
|
||||
* If the flag is matched and the flag and parameter 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"
|
||||
|
|
@ -118,7 +128,7 @@ public:
|
|||
const CHAR_TYPE *get_the_parameter (const CHAR_TYPE* flag);
|
||||
|
||||
/**
|
||||
* Check if the current argument matches (case insensitive) <flag>
|
||||
* Check if the current argument matches (case insensitive) @a flag
|
||||
*
|
||||
* ------------------------------------------------------------
|
||||
*
|
||||
|
|
@ -202,6 +212,9 @@ private:
|
|||
/// The index of <argv_> in which we'll stick the next known
|
||||
/// argument.
|
||||
int front_;
|
||||
/* This is not really the "front" at all. It's the point after
|
||||
* which the unknown arguments end and at which the known arguments begin.
|
||||
*/
|
||||
};
|
||||
|
||||
typedef ACE_Arg_Shifter_T<ACE_TCHAR> ACE_Arg_Shifter;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: Argv_Type_Converter.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Argv_Type_Converter.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Argv_Type_Converter.h"
|
||||
|
||||
|
|
@ -6,10 +6,6 @@
|
|||
#include "ace/Argv_Type_Converter.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Argv_Type_Converter,
|
||||
"$Id: Argv_Type_Converter.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
#include "ace/OS_NS_string.h"
|
||||
#include "ace/OS_Errno.h"
|
||||
|
||||
|
|
@ -108,11 +104,10 @@ ACE_Argv_Type_Converter::initialize (void)
|
|||
void
|
||||
ACE_Argv_Type_Converter::align_char_with_wchar (void)
|
||||
{
|
||||
int wchar_argv_index = 0;
|
||||
wchar_t* match_argv = this->wchar_argv_[0]; // pick the initial entry
|
||||
|
||||
while (wchar_argv_index < this->saved_argc_)
|
||||
for (int wchar_argv_index = 0; wchar_argv_index < this->saved_argc_;
|
||||
++wchar_argv_index)
|
||||
{
|
||||
wchar_t *match_argv = this->wchar_argv_[wchar_argv_index];
|
||||
// if n'th entries of both argv lists are different
|
||||
if (ACE_OS::strcmp (this->char_argv_[wchar_argv_index],
|
||||
ACE_TEXT_ALWAYS_CHAR (match_argv)) != 0)
|
||||
|
|
@ -132,9 +127,6 @@ ACE_Argv_Type_Converter::align_char_with_wchar (void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// move to the next wchar argv list entry
|
||||
match_argv = this->wchar_argv_[++wchar_argv_index];
|
||||
}
|
||||
|
||||
this->cleanup ();
|
||||
|
|
@ -143,11 +135,10 @@ ACE_Argv_Type_Converter::align_char_with_wchar (void)
|
|||
void
|
||||
ACE_Argv_Type_Converter::align_wchar_with_char (void)
|
||||
{
|
||||
int char_argv_index = 0;
|
||||
char* match_argv = this->char_argv_[0]; // pick the initial entry
|
||||
|
||||
while (char_argv_index < saved_argc_)
|
||||
for (int char_argv_index = 0; char_argv_index < saved_argc_;
|
||||
++char_argv_index)
|
||||
{
|
||||
char* match_argv = this->char_argv_[char_argv_index];
|
||||
// if n'th entries of both argv lists are different
|
||||
if (ACE_OS::strcmp (
|
||||
ACE_TEXT_ALWAYS_CHAR (this->wchar_argv_[char_argv_index]),
|
||||
|
|
@ -168,9 +159,6 @@ ACE_Argv_Type_Converter::align_wchar_with_char (void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// move to the next wchar argv list entry
|
||||
match_argv = this->char_argv_[++char_argv_index];
|
||||
}
|
||||
|
||||
this->cleanup();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Argv_Type_Converter.h
|
||||
*
|
||||
* $Id: Argv_Type_Converter.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Argv_Type_Converter.h 83891 2008-11-28 11:01:50Z johnnyw $
|
||||
*
|
||||
* @author Si Mong Park <spark@ociweb.com>
|
||||
*/
|
||||
|
|
@ -29,7 +29,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
|||
*
|
||||
* @brief To convert 'char' input/command line parameter to 'wchar_t'.
|
||||
*
|
||||
* This class is to convert 'char' type command line paramter to
|
||||
* This class is to convert 'char' type command line parameter to
|
||||
* wide-character (wchar_t) format and stores the copy of it.
|
||||
* This is useful for all classes that use 'char**' argv but cannot
|
||||
* be converted into 'ACE_TCHAR**' version.
|
||||
|
|
@ -54,7 +54,7 @@ public:
|
|||
/// Returns the pointer of ASCII (char) command line.
|
||||
char** get_ASCII_argv (void);
|
||||
|
||||
/// Returns the number of sub paramters (argc).
|
||||
/// Returns the number of sub parameters (argc).
|
||||
int& get_argc (void);
|
||||
|
||||
private:
|
||||
|
|
@ -83,7 +83,7 @@ private:
|
|||
#endif // ACE_USES_WCHAR
|
||||
|
||||
private:
|
||||
/// Original number of input paramter, same as 'argc'.
|
||||
/// Original number of input parameter, same as 'argc'.
|
||||
int &saved_argc_;
|
||||
|
||||
/// Data member pointer that contains converted argv in ACE_ANTI_TCHAR.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Array_Base.h
|
||||
*
|
||||
* $Id: Array_Base.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Array_Base.h 84477 2009-02-16 13:30:38Z johnnyw $
|
||||
*
|
||||
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
|
||||
*/
|
||||
|
|
@ -118,7 +118,7 @@ public:
|
|||
size_type size (void) const;
|
||||
|
||||
/**
|
||||
* Changes the size of the array to match <new_size>.
|
||||
* Changes the size of the array to match @a new_size.
|
||||
* It copies the old contents into the new array.
|
||||
* Return -1 on failure.
|
||||
*/
|
||||
|
|
@ -128,7 +128,7 @@ public:
|
|||
size_type max_size (void) const;
|
||||
|
||||
/**
|
||||
* Changes the size of the array to match <new_size>.
|
||||
* Changes the size of the array to match @a new_size.
|
||||
* It copies the old contents into the new array.
|
||||
* Return -1 on failure.
|
||||
* It does not affect new_size
|
||||
|
|
@ -166,11 +166,11 @@ public:
|
|||
protected:
|
||||
|
||||
/// Returns 1 if @a slot is within range, i.e., 0 >= @a slot <
|
||||
/// <cur_size_>, else returns 0.
|
||||
/// @c cur_size_, else returns 0.
|
||||
bool in_range (size_type slot) const;
|
||||
|
||||
/// Maximum size of the array, i.e., the total number of <T> elements
|
||||
/// in <array_>.
|
||||
/// Maximum size of the array, i.e., the total number of @c T elements
|
||||
/// in @c array_.
|
||||
size_type max_size_;
|
||||
|
||||
/**
|
||||
|
|
@ -212,7 +212,7 @@ public:
|
|||
|
||||
// = Iteration methods.
|
||||
|
||||
/// Pass back the <next_item> that hasn't been seen in the Array.
|
||||
/// Pass back the @a next_item that hasn't been seen in the Array.
|
||||
/// Returns 0 when all items have been seen, else 1.
|
||||
int next (T *&next_item);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Array_Map.h
|
||||
*
|
||||
* $Id: Array_Map.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Array_Map.h 84136 2009-01-12 11:01:17Z johnnyw $
|
||||
*
|
||||
* Light weight array-based map with fast iteration but linear
|
||||
* (i.e. O(n)) search times. STL-style interface is exposed.
|
||||
|
|
@ -41,7 +41,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
|||
* (i.e. O(n)) search times.
|
||||
*
|
||||
* Map implementation that focuses on small footprint and fast
|
||||
* iteration. Search times are, however, linear (O(n)) meaning that
|
||||
* iteration. Search times are, however, linear (O(n)) meaning that
|
||||
* this map isn't suitable for large data sets that will be searched
|
||||
* in performance critical areas of code. Iteration over large data
|
||||
* sets, however, is faster than linked list-based maps, for example,
|
||||
|
|
@ -159,7 +159,7 @@ public:
|
|||
/// Return @c true if the map is empty, else @c false.
|
||||
bool is_empty (void) const; // ACE style
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return @c true if the map is empty, else @c false. We recommend
|
||||
* using @c is_empty() instead since it's more consistent with the
|
||||
* ACE container naming conventions.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
// $Id: Assert.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Assert.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Assert.h"
|
||||
#include "ace/Log_Msg.h"
|
||||
|
||||
ACE_RCSID(ace, Assert, "$Id: Assert.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
// The following ASSERT macro is courtesy of Alexandre Karev
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Assert.h
|
||||
*
|
||||
* $Id: Assert.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Assert.h 82808 2008-09-23 11:27:27Z smcqueen $
|
||||
*
|
||||
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
|
||||
*/
|
||||
|
|
@ -23,14 +23,16 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
|||
ACE_Export void __ace_assert(const char *file, int line, const ACE_TCHAR *expression);
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#define ACE_TEST_ASSERT(X) \
|
||||
((X) \
|
||||
? static_cast<void>(0) \
|
||||
: ACE_VERSIONED_NAMESPACE_NAME::__ace_assert(__FILE__, __LINE__, ACE_TEXT_CHAR_TO_TCHAR (#X)))
|
||||
|
||||
#if defined (ACE_NDEBUG)
|
||||
#define ACE_ASSERT(x) \
|
||||
(static_cast<void>(0))
|
||||
#else
|
||||
#define ACE_ASSERT(X) \
|
||||
((X) \
|
||||
? static_cast<void>(0) \
|
||||
: ACE_VERSIONED_NAMESPACE_NAME::__ace_assert(__FILE__, __LINE__, ACE_TEXT_CHAR_TO_TCHAR (#X)))
|
||||
#define ACE_ASSERT(X) ACE_TEST_ASSERT(X)
|
||||
#endif /* ACE_NDEBUG */
|
||||
|
||||
#include /**/ "ace/post.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* -*- C++ -*- */
|
||||
// $Id: Asynch_Acceptor.cpp 82444 2008-07-28 13:33:07Z johnnyw $
|
||||
// $Id: Asynch_Acceptor.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#ifndef ACE_ASYNCH_ACCEPTOR_C
|
||||
#define ACE_ASYNCH_ACCEPTOR_C
|
||||
|
|
@ -10,8 +10,6 @@
|
|||
# pragma once
|
||||
#endif /* ACE_LACKS_PRAGMA_ONCE */
|
||||
|
||||
ACE_RCSID(ace, Asynch_Acceptor, "$Id: Asynch_Acceptor.cpp 82444 2008-07-28 13:33:07Z johnnyw $")
|
||||
|
||||
#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
|
||||
// This only works on platforms that support async i/o.
|
||||
|
||||
|
|
@ -338,7 +336,7 @@ ACE_Asynch_Acceptor<HANDLER>::handle_accept (const ACE_Asynch_Accept::Result &re
|
|||
&& result.error () != ECANCELED
|
||||
#endif
|
||||
)
|
||||
this->accept (this->bytes_to_read_);
|
||||
this->accept (this->bytes_to_read_, result.act ());
|
||||
}
|
||||
|
||||
template <class HANDLER> int
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
// $Id: Asynch_IO.cpp 82559 2008-08-07 20:23:07Z parsons $
|
||||
// $Id: Asynch_IO.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Asynch_IO.h"
|
||||
|
||||
ACE_RCSID(ace, Asynch_IO, "$Id: Asynch_IO.cpp 82559 2008-08-07 20:23:07Z parsons $")
|
||||
|
||||
#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
|
||||
// This only works on platforms with Asynchronous IO
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Asynch_IO.h
|
||||
*
|
||||
* $Id: Asynch_IO.h 81870 2008-06-09 20:53:53Z shuston $
|
||||
* $Id: Asynch_IO.h 84837 2009-03-16 13:01:15Z johnnyw $
|
||||
*
|
||||
* This works on Win32 (defined (ACE_WIN32) && !defined
|
||||
* (ACE_HAS_WINCE)) platforms and on POSIX4 platforms with {aio_*}
|
||||
|
|
@ -411,6 +411,9 @@ public:
|
|||
/// The implementation class.
|
||||
ACE_Asynch_Read_Stream_Result_Impl *implementation_;
|
||||
};
|
||||
private:
|
||||
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Read_Stream &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Read_Stream (const ACE_Asynch_Read_Stream &))
|
||||
};
|
||||
|
||||
// Forward declarations
|
||||
|
|
@ -564,6 +567,9 @@ public:
|
|||
/// Implementation class.
|
||||
ACE_Asynch_Write_Stream_Result_Impl *implementation_;
|
||||
};
|
||||
private:
|
||||
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Write_Stream &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Write_Stream (const ACE_Asynch_Write_Stream &))
|
||||
};
|
||||
|
||||
// Forward declarations
|
||||
|
|
@ -712,6 +718,9 @@ public:
|
|||
/// one auto generated by MSVC is flagged as infinitely recursive
|
||||
void operator= (Result &) {}
|
||||
};
|
||||
private:
|
||||
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Read_File &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Read_File (const ACE_Asynch_Read_File &))
|
||||
};
|
||||
|
||||
// Forward declarations
|
||||
|
|
@ -845,6 +854,9 @@ public:
|
|||
/// one auto generated by MSVC is flagged as infinitely recursive
|
||||
void operator= (Result &) {};
|
||||
};
|
||||
private:
|
||||
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Write_File &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Write_File (const ACE_Asynch_Write_File &))
|
||||
};
|
||||
|
||||
// Forward declarations
|
||||
|
|
@ -982,6 +994,9 @@ public:
|
|||
/// Impelmentation class.
|
||||
ACE_Asynch_Accept_Result_Impl *implementation_;
|
||||
};
|
||||
private:
|
||||
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Accept &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Accept (const ACE_Asynch_Accept &))
|
||||
};
|
||||
// Forward declarations
|
||||
class ACE_Asynch_Connect_Result_Impl;
|
||||
|
|
@ -1076,6 +1091,9 @@ public:
|
|||
/// Impelmentation class.
|
||||
ACE_Asynch_Connect_Result_Impl *implementation_;
|
||||
};
|
||||
private:
|
||||
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Connect &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Connect (const ACE_Asynch_Connect &))
|
||||
};
|
||||
|
||||
// Forward declarations
|
||||
|
|
@ -1287,6 +1305,9 @@ public:
|
|||
/// Target data structure.
|
||||
ACE_TRANSMIT_FILE_BUFFERS transmit_buffers_;
|
||||
};
|
||||
private:
|
||||
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Transmit_File &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Transmit_File (const ACE_Asynch_Transmit_File &))
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1422,6 +1443,9 @@ public:
|
|||
/// The implementation class.
|
||||
ACE_Asynch_Read_Dgram_Result_Impl *implementation_;
|
||||
};
|
||||
private:
|
||||
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Read_Dgram &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Read_Dgram (const ACE_Asynch_Read_Dgram &))
|
||||
};
|
||||
|
||||
// Forward declarations
|
||||
|
|
@ -1552,6 +1576,9 @@ public:
|
|||
/// Implementation class.
|
||||
ACE_Asynch_Write_Dgram_Result_Impl *implementation_;
|
||||
};
|
||||
private:
|
||||
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Write_Dgram &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Write_Dgram (const ACE_Asynch_Write_Dgram &))
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
// $Id: Asynch_Pseudo_Task.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Asynch_Pseudo_Task.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Asynch_Pseudo_Task.h"
|
||||
|
||||
#include "ace/OS_NS_errno.h"
|
||||
#include "ace/OS_NS_signal.h"
|
||||
|
||||
ACE_RCSID(ace, Asynch_Pseudo_Task, "$Id: Asynch_Pseudo_Task.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_Asynch_Pseudo_Task::ACE_Asynch_Pseudo_Task ()
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
// $Id: Atomic_Op.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Atomic_Op.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Atomic_Op.h"
|
||||
#include "ace/OS_NS_unistd.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Atomic_Op,
|
||||
"$Id: Atomic_Op.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/Atomic_Op.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
|
@ -34,8 +30,8 @@ single_cpu_increment (volatile long *value)
|
|||
unsigned long addr = reinterpret_cast<unsigned long> (value);
|
||||
asm( "xadd %0, (%1)" : "+r"(tmp) : "r"(addr) );
|
||||
return tmp + 1;
|
||||
#elif defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))
|
||||
#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
|
||||
return ace_atomic_add_long (
|
||||
reinterpret_cast<volatile unsigned long*> (value), 1);
|
||||
#elif defined(__GNUC__) && defined(PPC)
|
||||
|
|
@ -58,8 +54,8 @@ single_cpu_decrement (volatile long *value)
|
|||
unsigned long addr = reinterpret_cast<unsigned long> (value);
|
||||
asm( "xadd %0, (%1)" : "+r"(tmp) : "r"(addr) );
|
||||
return tmp - 1;
|
||||
#elif defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))
|
||||
#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
|
||||
return ace_atomic_add_long (
|
||||
reinterpret_cast<volatile unsigned long*> (value), -1);
|
||||
#elif defined(__GNUC__) && defined(PPC)
|
||||
|
|
@ -81,8 +77,8 @@ single_cpu_exchange (volatile long *value, long rhs)
|
|||
unsigned long addr = reinterpret_cast<unsigned long> (value);
|
||||
asm( "xchg %0, (%1)" : "+r"(rhs) : "r"(addr) );
|
||||
return rhs;
|
||||
#elif defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))
|
||||
#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
|
||||
return ace_atomic_swap_long (
|
||||
reinterpret_cast<volatile unsigned long*> (value), rhs);
|
||||
#elif defined(__GNUC__) && defined(PPC)
|
||||
|
|
@ -104,8 +100,8 @@ single_cpu_exchange_add (volatile long *value, long rhs)
|
|||
unsigned long addr = reinterpret_cast<unsigned long> (value);
|
||||
asm( "xadd %0, (%1)" : "+r"(rhs) : "r"(addr) );
|
||||
return rhs;
|
||||
#elif defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))
|
||||
#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
|
||||
return ace_atomic_swap_add_long (
|
||||
reinterpret_cast<volatile unsigned long*> (value), rhs);
|
||||
#elif defined(__GNUC__) && defined(PPC)
|
||||
|
|
@ -147,8 +143,8 @@ multi_cpu_increment (volatile long *value)
|
|||
unsigned long addr = reinterpret_cast<unsigned long> (value);
|
||||
asm( "lock ; xadd %0, (%1)" : "+r"(tmp) : "r"(addr) );
|
||||
return tmp + 1;
|
||||
#elif defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))
|
||||
#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
|
||||
return ace_atomic_add_long (
|
||||
reinterpret_cast<volatile unsigned long*> (value), 1);
|
||||
#else /* ACE_HAS_INTEL_ASSEMBLY*/
|
||||
|
|
@ -165,8 +161,8 @@ multi_cpu_decrement (volatile long *value)
|
|||
unsigned long addr = reinterpret_cast<unsigned long> (value);
|
||||
asm( "lock ; xadd %0, (%1)" : "+r"(tmp) : "r"(addr) );
|
||||
return tmp - 1;
|
||||
#elif defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))
|
||||
#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
|
||||
return ace_atomic_add_long (
|
||||
reinterpret_cast<volatile unsigned long*> (value), -1);
|
||||
#else /* ACE_HAS_INTEL_ASSEMBLY*/
|
||||
|
|
@ -183,8 +179,8 @@ multi_cpu_exchange (volatile long *value, long rhs)
|
|||
// The XCHG instruction automatically follows LOCK semantics
|
||||
asm( "xchg %0, (%1)" : "+r"(rhs) : "r"(addr) );
|
||||
return rhs;
|
||||
#elif defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))
|
||||
#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
|
||||
return ace_atomic_swap_long (
|
||||
reinterpret_cast<volatile unsigned long*> (value), rhs);
|
||||
#else /* ACE_HAS_INTEL_ASSEMBLY*/
|
||||
|
|
@ -201,8 +197,8 @@ multi_cpu_exchange_add (volatile long *value, long rhs)
|
|||
unsigned long addr = reinterpret_cast<unsigned long> (value);
|
||||
asm( "lock ; xadd %0, (%1)" : "+r"(rhs) : "r"(addr) );
|
||||
return rhs;
|
||||
#elif defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))
|
||||
#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \
|
||||
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
|
||||
return ace_atomic_swap_add_long (
|
||||
reinterpret_cast<volatile unsigned long*> (value), rhs);
|
||||
#elif defined (WIN32) && !defined (ACE_HAS_INTERLOCKED_EXCHANGEADD)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Atomic_Op.h
|
||||
*
|
||||
* $Id: Atomic_Op.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Atomic_Op.h 91523 2010-08-27 14:18:02Z johnnyw $
|
||||
*
|
||||
* @author Douglas C. Schmidt <schmidt@uci.edu>
|
||||
*/
|
||||
|
|
@ -43,16 +43,26 @@
|
|||
# endif /* ACE_HAS_INTERLOCKED_EXCHANGEADD */
|
||||
# elif defined (ACE_HAS_INTEL_ASSEMBLY)
|
||||
# define ACE_HAS_BUILTIN_ATOMIC_OP
|
||||
# elif defined (ACE_HAS_VXATOMICLIB)
|
||||
# define ACE_HAS_BUILTIN_ATOMIC_OP
|
||||
# elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && !defined (ACE_HAS_BUILTIN_ATOMIC_OP)
|
||||
# define ACE_HAS_BUILTIN_ATOMIC_OP
|
||||
# endif /* WIN32 */
|
||||
#endif /* ACE_HAS_THREADS */
|
||||
|
||||
#if defined (ACE_HAS_BUILTIN_ATOMIC_OP)
|
||||
// If we have the GCC Atomic builtin support, use it
|
||||
#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1)
|
||||
# undef ACE_HAS_BUILTIN_ATOMIC_OP
|
||||
#endif
|
||||
|
||||
// Include the templates here.
|
||||
#include "ace/Atomic_Op_GCC_T.h"
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#if defined (ACE_HAS_BUILTIN_ATOMIC_OP)
|
||||
|
||||
/**
|
||||
* @class ACE_Atomic_Op<ACE_Thread_Mutex, long>
|
||||
*
|
||||
* @brief Specialization of ACE_Atomic_Op for platforms that
|
||||
* support atomic integer operations.
|
||||
*
|
||||
|
|
@ -63,64 +73,64 @@ template<>
|
|||
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, long>
|
||||
{
|
||||
public:
|
||||
/// Initialize <value_> to 0.
|
||||
/// Initialize @c value_ to 0.
|
||||
ACE_Atomic_Op (void);
|
||||
|
||||
/// Initialize <value_> to c.
|
||||
/// Initialize @c value_ to c.
|
||||
ACE_Atomic_Op (long c);
|
||||
|
||||
/// Manage copying...
|
||||
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, long> &c);
|
||||
|
||||
/// Atomically pre-increment <value_>.
|
||||
/// Atomically pre-increment @c value_.
|
||||
long operator++ (void);
|
||||
|
||||
/// Atomically post-increment <value_>.
|
||||
/// Atomically post-increment @c value_.
|
||||
long operator++ (int);
|
||||
|
||||
/// Atomically increment <value_> by rhs.
|
||||
/// Atomically increment @c value_ by rhs.
|
||||
long operator+= (long rhs);
|
||||
|
||||
/// Atomically pre-decrement <value_>.
|
||||
/// Atomically pre-decrement @c value_.
|
||||
long operator-- (void);
|
||||
|
||||
/// Atomically post-decrement <value_>.
|
||||
/// Atomically post-decrement @c value_.
|
||||
long operator-- (int);
|
||||
|
||||
/// Atomically decrement <value_> by rhs.
|
||||
/// Atomically decrement @c value_ by rhs.
|
||||
long operator-= (long rhs);
|
||||
|
||||
/// Atomically compare <value_> with rhs.
|
||||
/// Atomically compare @c value_ with rhs.
|
||||
bool operator== (long rhs) const;
|
||||
|
||||
/// Atomically compare <value_> with rhs.
|
||||
/// Atomically compare @c value_ with rhs.
|
||||
bool operator!= (long rhs) const;
|
||||
|
||||
/// Atomically check if <value_> greater than or equal to rhs.
|
||||
/// Atomically check if @c value_ greater than or equal to rhs.
|
||||
bool operator>= (long rhs) const;
|
||||
|
||||
/// Atomically check if <value_> greater than rhs.
|
||||
/// Atomically check if @c value_ greater than rhs.
|
||||
bool operator> (long rhs) const;
|
||||
|
||||
/// Atomically check if <value_> less than or equal to rhs.
|
||||
/// Atomically check if @c value_ less than or equal to rhs.
|
||||
bool operator<= (long rhs) const;
|
||||
|
||||
/// Atomically check if <value_> less than rhs.
|
||||
/// Atomically check if @c value_ less than rhs.
|
||||
bool operator< (long rhs) const;
|
||||
|
||||
/// Atomically assign rhs to <value_>.
|
||||
/// Atomically assign rhs to @c value_.
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, long> &operator= (long rhs);
|
||||
|
||||
/// Atomically assign <rhs> to <value_>.
|
||||
/// Atomically assign <rhs> to @c value_.
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, long> &operator= (const ACE_Atomic_Op<ACE_Thread_Mutex, long> &rhs);
|
||||
|
||||
/// Explicitly return <value_>.
|
||||
/// Explicitly return @c value_.
|
||||
long value (void) const;
|
||||
|
||||
/// Dump the state of an object.
|
||||
void dump (void) const;
|
||||
|
||||
/// Explicitly return <value_> (by reference).
|
||||
/// Explicitly return @c value_ (by reference).
|
||||
volatile long &value_i (void);
|
||||
|
||||
// ACE_ALLOC_HOOK_DECLARE;
|
||||
|
|
@ -132,9 +142,9 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
// This function cannot be supported by this template specialization.
|
||||
// If you need access to an underlying lock, use the ACE_Atomic_Op_Ex
|
||||
// template instead.
|
||||
/// This function cannot be supported by this template specialization.
|
||||
/// If you need access to an underlying lock, use the ACE_Atomic_Op_Ex
|
||||
/// template instead.
|
||||
ACE_Thread_Mutex &mutex (void);
|
||||
|
||||
private:
|
||||
|
|
@ -142,7 +152,7 @@ private:
|
|||
/// Current object decorated by the atomic op.
|
||||
volatile long value_;
|
||||
|
||||
// Pointers to selected atomic op implementations.
|
||||
/// Pointers to selected atomic op implementations.
|
||||
static long (*increment_fn_) (volatile long *);
|
||||
static long (*decrement_fn_) (volatile long *);
|
||||
static long (*exchange_fn_) (volatile long *, long);
|
||||
|
|
@ -150,8 +160,6 @@ private:
|
|||
};
|
||||
|
||||
/**
|
||||
* @class ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>
|
||||
*
|
||||
* @brief Specialization of ACE_Atomic_Op for platforms that
|
||||
* support atomic integer operations.
|
||||
*
|
||||
|
|
@ -162,64 +170,64 @@ template<>
|
|||
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>
|
||||
{
|
||||
public:
|
||||
/// Initialize <value_> to 0.
|
||||
/// Initialize @c value_ to 0.
|
||||
ACE_Atomic_Op (void);
|
||||
|
||||
/// Initialize <value_> to c.
|
||||
/// Initialize @c value_ to c.
|
||||
ACE_Atomic_Op (unsigned long c);
|
||||
|
||||
/// Manage copying...
|
||||
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> &c);
|
||||
|
||||
/// Atomically pre-increment <value_>.
|
||||
/// Atomically pre-increment @c value_.
|
||||
unsigned long operator++ (void);
|
||||
|
||||
/// Atomically post-increment <value_>.
|
||||
/// Atomically post-increment @c value_.
|
||||
unsigned long operator++ (int);
|
||||
|
||||
/// Atomically increment <value_> by rhs.
|
||||
/// Atomically increment @c value_ by rhs.
|
||||
unsigned long operator+= (unsigned long rhs);
|
||||
|
||||
/// Atomically pre-decrement <value_>.
|
||||
/// Atomically pre-decrement @c value_.
|
||||
unsigned long operator-- (void);
|
||||
|
||||
/// Atomically post-decrement <value_>.
|
||||
/// Atomically post-decrement @c value_.
|
||||
unsigned long operator-- (int);
|
||||
|
||||
/// Atomically decrement <value_> by rhs.
|
||||
/// Atomically decrement @c value_ by rhs.
|
||||
unsigned long operator-= (unsigned long rhs);
|
||||
|
||||
/// Atomically compare <value_> with rhs.
|
||||
/// Atomically compare @c value_ with rhs.
|
||||
bool operator== (unsigned long rhs) const;
|
||||
|
||||
/// Atomically compare <value_> with rhs.
|
||||
/// Atomically compare @c value_ with rhs.
|
||||
bool operator!= (unsigned long rhs) const;
|
||||
|
||||
/// Atomically check if <value_> greater than or equal to rhs.
|
||||
/// Atomically check if @c value_ greater than or equal to rhs.
|
||||
bool operator>= (unsigned long rhs) const;
|
||||
|
||||
/// Atomically check if <value_> greater than rhs.
|
||||
/// Atomically check if @c value_ greater than rhs.
|
||||
bool operator> (unsigned long rhs) const;
|
||||
|
||||
/// Atomically check if <value_> less than or equal to rhs.
|
||||
/// Atomically check if @c value_ less than or equal to rhs.
|
||||
bool operator<= (unsigned long rhs) const;
|
||||
|
||||
/// Atomically check if <value_> less than rhs.
|
||||
/// Atomically check if @c value_ less than rhs.
|
||||
bool operator< (unsigned long rhs) const;
|
||||
|
||||
/// Atomically assign rhs to <value_>.
|
||||
/// Atomically assign rhs to @c value_.
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> &operator= (unsigned long rhs);
|
||||
|
||||
/// Atomically assign <rhs> to <value_>.
|
||||
/// Atomically assign <rhs> to @c value_.
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> &operator= (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> &rhs);
|
||||
|
||||
/// Explicitly return <value_>.
|
||||
/// Explicitly return @c value_.
|
||||
unsigned long value (void) const;
|
||||
|
||||
/// Dump the state of an object.
|
||||
void dump (void) const;
|
||||
|
||||
/// Explicitly return <value_> (by reference).
|
||||
/// Explicitly return @c value_ (by reference).
|
||||
volatile unsigned long &value_i (void);
|
||||
|
||||
// ACE_ALLOC_HOOK_DECLARE;
|
||||
|
|
@ -231,9 +239,9 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
// This function cannot be supported by this template specialization.
|
||||
// If you need access to an underlying lock, use the ACE_Atomic_Op_Ex
|
||||
// template instead.
|
||||
/// This function cannot be supported by this template specialization.
|
||||
/// If you need access to an underlying lock, use the ACE_Atomic_Op_Ex
|
||||
/// template instead.
|
||||
ACE_Thread_Mutex &mutex (void);
|
||||
|
||||
private:
|
||||
|
|
@ -248,10 +256,97 @@ private:
|
|||
static long (*exchange_add_fn_) (volatile long *, long);
|
||||
};
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
#endif /* !ACE_HAS_BUILTIN_ATOMIC_OP */
|
||||
|
||||
#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1)
|
||||
|
||||
template<>
|
||||
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, int>
|
||||
: public ACE_Atomic_Op_GCC<int>
|
||||
{
|
||||
public:
|
||||
ACE_Atomic_Op (void);
|
||||
ACE_Atomic_Op (int c);
|
||||
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, int> &c);
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, int> &operator= (int rhs);
|
||||
};
|
||||
|
||||
template<>
|
||||
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int>
|
||||
: public ACE_Atomic_Op_GCC<unsigned int>
|
||||
{
|
||||
public:
|
||||
ACE_Atomic_Op (void);
|
||||
ACE_Atomic_Op (unsigned int c);
|
||||
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned> &c);
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int> &operator= (unsigned int rhs);
|
||||
};
|
||||
|
||||
// If we have built in atomic op, use that, the assignment operator
|
||||
// is faster for a long/unsinged long
|
||||
template<>
|
||||
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, long>
|
||||
: public ACE_Atomic_Op_GCC<long>
|
||||
{
|
||||
public:
|
||||
ACE_Atomic_Op (void);
|
||||
ACE_Atomic_Op (long c);
|
||||
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, long> &c);
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, long> &operator= (long rhs);
|
||||
};
|
||||
|
||||
template<>
|
||||
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>
|
||||
: public ACE_Atomic_Op_GCC<unsigned long>
|
||||
{
|
||||
public:
|
||||
ACE_Atomic_Op (void);
|
||||
ACE_Atomic_Op (unsigned long c);
|
||||
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> &c);
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> &operator= (unsigned long rhs);
|
||||
};
|
||||
|
||||
#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_2)
|
||||
template<>
|
||||
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, short>
|
||||
: public ACE_Atomic_Op_GCC<short>
|
||||
{
|
||||
public:
|
||||
ACE_Atomic_Op (void);
|
||||
ACE_Atomic_Op (short c);
|
||||
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, short> &c);
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, short> &operator= (short rhs);
|
||||
};
|
||||
|
||||
template<>
|
||||
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short>
|
||||
: public ACE_Atomic_Op_GCC<unsigned short>
|
||||
{
|
||||
public:
|
||||
ACE_Atomic_Op (void);
|
||||
ACE_Atomic_Op (unsigned short c);
|
||||
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short> &c);
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short> &operator= (unsigned short rhs);
|
||||
};
|
||||
#endif
|
||||
|
||||
#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_1)
|
||||
template<>
|
||||
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, bool>
|
||||
: public ACE_Atomic_Op_GCC<bool>
|
||||
{
|
||||
public:
|
||||
ACE_Atomic_Op (void);
|
||||
ACE_Atomic_Op (bool c);
|
||||
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, bool> &c);
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, bool> &operator= (bool rhs);
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* ACE_HAS_BUILTIN_ATOMIC_OP */
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#if defined (__ACE_INLINE__)
|
||||
#include "ace/Atomic_Op.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
|
|
|||
|
|
@ -1,17 +1,24 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// $Id: Atomic_Op.inl 80826 2008-03-04 14:51:23Z wotte $
|
||||
|
||||
#if defined (ACE_HAS_BUILTIN_ATOMIC_OP)
|
||||
// $Id: Atomic_Op.inl 89905 2010-04-16 13:04:47Z johnnyw $
|
||||
|
||||
#if defined (ACE_HAS_INTRINSIC_INTERLOCKED)
|
||||
# include "ace/os_include/os_intrin.h"
|
||||
|
||||
#pragma intrinsic (_InterlockedExchange, _InterlockedExchangeAdd, _InterlockedIncrement, _InterlockedDecrement)
|
||||
# include "ace/os_include/os_intrin.h"
|
||||
# pragma intrinsic (_InterlockedExchange, _InterlockedExchangeAdd, _InterlockedIncrement, _InterlockedDecrement)
|
||||
#endif /* ACE_HAS_INTRINSIC_INTERLOCKED */
|
||||
|
||||
#if defined (ACE_HAS_VXATOMICLIB)
|
||||
# include <vxAtomicLib.h>
|
||||
#endif
|
||||
|
||||
#if defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
# include <atomic.h>
|
||||
#endif
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#if defined (ACE_HAS_BUILTIN_ATOMIC_OP)
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, long>::ACE_Atomic_Op (void)
|
||||
: value_ (0)
|
||||
|
|
@ -38,6 +45,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator++ (void)
|
|||
return ::_InterlockedIncrement (const_cast<long *> (&this->value_));
|
||||
#elif defined (WIN32)
|
||||
return ::InterlockedIncrement (const_cast<long *> (&this->value_));
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
return ::vxAtomicInc (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_))) + 1;
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
return ::atomic_inc_ulong_nv (reinterpret_cast<volatile unsigned long*>(&this->value_));
|
||||
#else /* WIN32 */
|
||||
return (*increment_fn_) (&this->value_);
|
||||
#endif /* WIN32 */
|
||||
|
|
@ -56,6 +67,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-- (void)
|
|||
return ::_InterlockedDecrement (const_cast<long *> (&this->value_));
|
||||
#elif defined (WIN32)
|
||||
return ::InterlockedDecrement (const_cast<long *> (&this->value_));
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
return ::vxAtomicDec (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_))) - 1;
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
return ::atomic_dec_ulong_nv (reinterpret_cast<volatile unsigned long*>(&this->value_));
|
||||
#else /* WIN32 */
|
||||
return (*decrement_fn_) (&this->value_);
|
||||
#endif /* WIN32 */
|
||||
|
|
@ -76,6 +91,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator+= (long rhs)
|
|||
#elif defined (WIN32) && defined (ACE_HAS_INTERLOCKED_EXCHANGEADD)
|
||||
return ::InterlockedExchangeAdd (const_cast<long *> (&this->value_),
|
||||
rhs) + rhs;
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
return ::vxAtomicAdd (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs) + rhs;
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
return ::atomic_add_long_nv (reinterpret_cast<volatile unsigned long*>(&this->value_), rhs);
|
||||
#else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
|
||||
return (*exchange_add_fn_) (&this->value_, rhs) + rhs;
|
||||
#endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
|
||||
|
|
@ -90,6 +109,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator-= (long rhs)
|
|||
#elif defined (WIN32) && defined (ACE_HAS_INTERLOCKED_EXCHANGEADD)
|
||||
return ::InterlockedExchangeAdd (const_cast<long *> (&this->value_),
|
||||
-rhs) - rhs;
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
return ::vxAtomicSub (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs) - rhs;
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
return ::atomic_add_long_nv (reinterpret_cast<volatile unsigned long*>(&this->value_), -rhs);
|
||||
#else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
|
||||
return (*exchange_add_fn_) (&this->value_, -rhs) - rhs;
|
||||
#endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
|
||||
|
|
@ -138,6 +161,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= (long rhs)
|
|||
::_InterlockedExchange (const_cast<long *> (&this->value_), rhs);
|
||||
#elif defined (WIN32)
|
||||
::InterlockedExchange (const_cast<long *> (&this->value_), rhs);
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs);
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
::atomic_swap_ulong (reinterpret_cast<volatile unsigned long*>(&this->value_), rhs);
|
||||
#else /* WIN32 */
|
||||
(*exchange_fn_) (&this->value_, rhs);
|
||||
#endif /* WIN32 */
|
||||
|
|
@ -152,6 +179,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= (
|
|||
::_InterlockedExchange (const_cast<long *> (&this->value_), rhs.value_);
|
||||
#elif defined (WIN32)
|
||||
::InterlockedExchange (const_cast<long *> (&this->value_), rhs.value_);
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (&this->value_)), rhs.value_);
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
::atomic_swap_ulong (reinterpret_cast<volatile unsigned long*>(&this->value_), rhs.value_);
|
||||
#else /* WIN32 */
|
||||
(*exchange_fn_) (&this->value_, rhs.value_);
|
||||
#endif /* WIN32 */
|
||||
|
|
@ -197,6 +228,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator++ (void)
|
|||
return static_cast<unsigned long> (::_InterlockedIncrement (const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))));
|
||||
#elif defined (WIN32)
|
||||
return static_cast<unsigned long> (::InterlockedIncrement (const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))));
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
return static_cast<unsigned long> (::vxAtomicInc (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))))) + 1;
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
return ::atomic_inc_ulong_nv (&this->value_);
|
||||
#else /* WIN32 */
|
||||
return static_cast<unsigned long> ((*increment_fn_) (reinterpret_cast<volatile long *> (&this->value_)));
|
||||
#endif /* WIN32 */
|
||||
|
|
@ -215,6 +250,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator-- (void)
|
|||
return static_cast<unsigned long> (::_InterlockedDecrement (const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))));
|
||||
#elif defined (WIN32)
|
||||
return static_cast<unsigned long> (::InterlockedDecrement (const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))));
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
return static_cast<unsigned long> (::vxAtomicDec (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))))) - 1;
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
return ::atomic_dec_ulong_nv (&this->value_);
|
||||
#else /* WIN32 */
|
||||
return static_cast<unsigned long> ((*decrement_fn_) (reinterpret_cast<volatile long *> (&this->value_)));
|
||||
#endif /* WIN32 */
|
||||
|
|
@ -235,6 +274,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator+= (unsigned long rhs)
|
|||
#elif defined (WIN32) && defined (ACE_HAS_INTERLOCKED_EXCHANGEADD)
|
||||
return static_cast<unsigned long> (::InterlockedExchangeAdd (const_cast<long *> (reinterpret_cast <volatile long *>(&this->value_)),
|
||||
rhs)) + rhs;
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
return static_cast<unsigned long> (::vxAtomicAdd (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))), rhs)) + rhs;
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
return ::atomic_add_long_nv (&this->value_, rhs);
|
||||
#else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
|
||||
return static_cast<unsigned long> ((*exchange_add_fn_) (reinterpret_cast<volatile long *> (&this->value_), rhs)) + rhs;
|
||||
#endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
|
||||
|
|
@ -249,6 +292,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator-= (unsigned long rhs)
|
|||
#elif defined (WIN32) && defined (ACE_HAS_INTERLOCKED_EXCHANGEADD)
|
||||
return static_cast<unsigned long> (::InterlockedExchangeAdd (const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_)),
|
||||
-static_cast<long>(rhs))) - rhs;
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
return static_cast<unsigned long> (::vxAtomicSub (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long *>(&this->value_))), rhs)) - rhs;
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
return ::atomic_add_long_nv (&this->value_, -rhs);
|
||||
#else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */
|
||||
long l_rhs = static_cast<long> (rhs);
|
||||
return static_cast<unsigned long> ((*exchange_add_fn_) (reinterpret_cast<volatile long *> (&this->value_), -l_rhs)) - rhs;
|
||||
|
|
@ -298,6 +345,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator= (unsigned long rhs)
|
|||
::_InterlockedExchange (const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_)), rhs);
|
||||
#elif defined (WIN32)
|
||||
::InterlockedExchange (const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_)), rhs);
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_))), rhs);
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
::atomic_swap_ulong (&this->value_, rhs);
|
||||
#else /* WIN32 */
|
||||
(*exchange_fn_) (reinterpret_cast<volatile long *> (&this->value_), rhs);
|
||||
#endif /* WIN32 */
|
||||
|
|
@ -312,6 +363,10 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator= (
|
|||
::_InterlockedExchange (const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_)), rhs.value_);
|
||||
#elif defined (WIN32)
|
||||
::InterlockedExchange (const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_)), rhs.value_);
|
||||
#elif defined (ACE_HAS_VXATOMICLIB)
|
||||
::vxAtomicSet (reinterpret_cast <atomic_t*>(const_cast<long *> (reinterpret_cast<volatile long*> (&this->value_))), rhs.value_);
|
||||
#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB)
|
||||
::atomic_swap_ulong (&this->value_, rhs.value_);
|
||||
#else /* WIN32 */
|
||||
(*exchange_fn_) (reinterpret_cast<volatile long *> (&this->value_), rhs.value_);
|
||||
#endif /* WIN32 */
|
||||
|
|
@ -330,6 +385,198 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::value_i (void)
|
|||
return this->value_;
|
||||
}
|
||||
|
||||
#endif /* ACE_HAS_BUILTIN_ATOMIC_OP */
|
||||
|
||||
#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1)
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, int>::ACE_Atomic_Op (void) :
|
||||
ACE_Atomic_Op_GCC<int> ()
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, int>::ACE_Atomic_Op (int c) :
|
||||
ACE_Atomic_Op_GCC<int>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, int>::ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, int> &c) :
|
||||
ACE_Atomic_Op_GCC<int>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, int>&
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, int>::operator= (int rhs)
|
||||
{
|
||||
ACE_Atomic_Op_GCC<int>::operator= (rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int>::ACE_Atomic_Op (void) :
|
||||
ACE_Atomic_Op_GCC<unsigned int>()
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int>::ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int> &c) :
|
||||
ACE_Atomic_Op_GCC<unsigned int>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int>::ACE_Atomic_Op (unsigned int c) :
|
||||
ACE_Atomic_Op_GCC<unsigned int>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int>&
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int>::operator= (unsigned int rhs)
|
||||
{
|
||||
ACE_Atomic_Op_GCC<unsigned int>::operator= (rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, long>::ACE_Atomic_Op (void) :
|
||||
ACE_Atomic_Op_GCC<long>()
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, long>::ACE_Atomic_Op (long c) :
|
||||
ACE_Atomic_Op_GCC<long>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, long>::ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, long> &c) :
|
||||
ACE_Atomic_Op_GCC<long>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, long>&
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= (long rhs)
|
||||
{
|
||||
ACE_Atomic_Op_GCC<long>::operator= (rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::ACE_Atomic_Op (void) :
|
||||
ACE_Atomic_Op_GCC<unsigned long> ()
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::ACE_Atomic_Op (unsigned long c) :
|
||||
ACE_Atomic_Op_GCC<unsigned long>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> &c) :
|
||||
ACE_Atomic_Op_GCC<unsigned long>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>&
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator= (unsigned long rhs)
|
||||
{
|
||||
ACE_Atomic_Op_GCC<unsigned long>::operator= (rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_2)
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, short>::ACE_Atomic_Op (void) :
|
||||
ACE_Atomic_Op_GCC<short>()
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, short>::ACE_Atomic_Op (short c) :
|
||||
ACE_Atomic_Op_GCC<short>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, short>::ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, short> &c) :
|
||||
ACE_Atomic_Op_GCC<short>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, short>&
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, short>::operator= (short rhs)
|
||||
{
|
||||
ACE_Atomic_Op_GCC<short>::operator= (rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short>::ACE_Atomic_Op (void) :
|
||||
ACE_Atomic_Op_GCC<unsigned short> ()
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short>::ACE_Atomic_Op (unsigned short c) :
|
||||
ACE_Atomic_Op_GCC<unsigned short>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short>::ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short> &c) :
|
||||
ACE_Atomic_Op_GCC<unsigned short>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short>&
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short>::operator= (unsigned short rhs)
|
||||
{
|
||||
ACE_Atomic_Op_GCC<unsigned short>::operator= (rhs);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_1)
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, bool>::ACE_Atomic_Op (void) :
|
||||
ACE_Atomic_Op_GCC<bool> ()
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, bool>::ACE_Atomic_Op (bool c) :
|
||||
ACE_Atomic_Op_GCC<bool>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, bool>::ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, bool> &c) :
|
||||
ACE_Atomic_Op_GCC<bool>(c)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, bool>&
|
||||
ACE_Atomic_Op<ACE_Thread_Mutex, bool>::operator= (bool rhs)
|
||||
{
|
||||
ACE_Atomic_Op_GCC<bool>::operator= (rhs);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ACE_HAS_GCC_ATOMIC_BUILTINS==1 */
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#endif /* ACE_HAS_BUILTIN_ATOMIC_OP */
|
||||
|
|
|
|||
25
dep/ACE_wrappers/ace/Atomic_Op_GCC_T.cpp
Normal file
25
dep/ACE_wrappers/ace/Atomic_Op_GCC_T.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// $Id: Atomic_Op_GCC_T.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/OS_NS_unistd.h"
|
||||
|
||||
#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1)
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/Atomic_Op_GCC_T.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
ACE_Atomic_Op_GCC<T>::dump (void) const
|
||||
{
|
||||
#if defined (ACE_HAS_DUMP)
|
||||
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
|
||||
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
|
||||
#endif /* ACE_HAS_DUMP */
|
||||
}
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#endif /* ACE_HAS_GCC_ATOMIC_BUILTINS */
|
||||
136
dep/ACE_wrappers/ace/Atomic_Op_GCC_T.h
Normal file
136
dep/ACE_wrappers/ace/Atomic_Op_GCC_T.h
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
// -*- C++ -*-
|
||||
|
||||
//=============================================================================
|
||||
/**
|
||||
* @file Atomic_Op_GCC_T.h
|
||||
*
|
||||
* $Id: Atomic_Op_GCC_T.h 89339 2010-03-05 12:20:47Z johnnyw $
|
||||
*
|
||||
* @author Johnny Willemsen <jwillemsen@remedy.nl
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ACE_ATOMIC_OP_GCC_T_H
|
||||
#define ACE_ATOMIC_OP_GCC_T_H
|
||||
#include /**/ "ace/pre.h"
|
||||
|
||||
#include /**/ "ace/config-all.h"
|
||||
|
||||
#if !defined (ACE_LACKS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif /* ACE_LACKS_PRAGMA_ONCE */
|
||||
|
||||
#include "ace/Thread_Mutex.h"
|
||||
#include "ace/ACE_export.h"
|
||||
|
||||
#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1)
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
/**
|
||||
* @brief Specialization of ACE_Atomic_Op for platforms that
|
||||
* support atomic integer operations.
|
||||
*
|
||||
* Specialization of ACE_Atomic_Op for platforms that support atomic
|
||||
* integer operations.
|
||||
*/
|
||||
template<typename T>
|
||||
class ACE_Export ACE_Atomic_Op_GCC
|
||||
{
|
||||
public:
|
||||
/// Atomically pre-increment @c value_.
|
||||
T operator++ (void);
|
||||
|
||||
/// Atomically post-increment @c value_.
|
||||
T operator++ (int);
|
||||
|
||||
/// Atomically increment @c value_ by rhs.
|
||||
T operator+= (T rhs);
|
||||
|
||||
/// Atomically pre-decrement @c value_.
|
||||
T operator-- (void);
|
||||
|
||||
/// Atomically post-decrement @c value_.
|
||||
T operator-- (int);
|
||||
|
||||
/// Atomically decrement @c value_ by rhs.
|
||||
T operator-= (T rhs);
|
||||
|
||||
/// Atomically compare @c value_ with rhs.
|
||||
bool operator== (T rhs) const;
|
||||
|
||||
/// Atomically compare @c value_ with rhs.
|
||||
bool operator!= (T rhs) const;
|
||||
|
||||
/// Atomically check if @c value_ greater than or equal to rhs.
|
||||
bool operator>= (T rhs) const;
|
||||
|
||||
/// Atomically check if @c value_ greater than rhs.
|
||||
bool operator> (T rhs) const;
|
||||
|
||||
/// Atomically check if @c value_ less than or equal to rhs.
|
||||
bool operator<= (T rhs) const;
|
||||
|
||||
/// Atomically check if @c value_ less than rhs.
|
||||
bool operator< (T rhs) const;
|
||||
|
||||
/// Explicitly return @c value_.
|
||||
T value (void) const;
|
||||
|
||||
/// Dump the state of an object.
|
||||
void dump (void) const;
|
||||
|
||||
/// Explicitly return @c value_ (by reference).
|
||||
volatile T &value_i (void);
|
||||
|
||||
// ACE_ALLOC_HOOK_DECLARE;
|
||||
// Declare the dynamic allocation hooks.
|
||||
|
||||
protected:
|
||||
/// Atomically assign rhs to @c value_.
|
||||
ACE_Atomic_Op_GCC<T> &operator= (T rhs);
|
||||
|
||||
/// Atomically assign <rhs> to @c value_.
|
||||
ACE_Atomic_Op_GCC<T> &operator= (const ACE_Atomic_Op_GCC<T> &rhs);
|
||||
|
||||
/// Initialize @c value_ to 0.
|
||||
ACE_Atomic_Op_GCC (void);
|
||||
|
||||
/// Initialize @c value_ to c.
|
||||
ACE_Atomic_Op_GCC (T c);
|
||||
|
||||
/// Manage copying...
|
||||
ACE_Atomic_Op_GCC (const ACE_Atomic_Op_GCC<T> &c);
|
||||
|
||||
private:
|
||||
|
||||
// This function cannot be supported by this template specialization.
|
||||
// If you need access to an underlying lock, use the ACE_Atomic_Op_Ex
|
||||
// template instead.
|
||||
ACE_Thread_Mutex &mutex (void);
|
||||
|
||||
private:
|
||||
|
||||
/// Current object decorated by the atomic op.
|
||||
volatile T value_;
|
||||
};
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#if defined (__ACE_INLINE__)
|
||||
#include "ace/Atomic_Op_GCC_T.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
|
||||
#include "ace/Atomic_Op_GCC_T.cpp"
|
||||
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
|
||||
|
||||
#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
|
||||
#pragma implementation ("Atomic_Op_GCC_T.cpp")
|
||||
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
|
||||
|
||||
|
||||
#endif /* ACE_HAS_GCC_ATOMIC_BUILTINS */
|
||||
|
||||
#include /**/ "ace/post.h"
|
||||
#endif /*ACE_ATOMIC_OP_GCC_T_H*/
|
||||
148
dep/ACE_wrappers/ace/Atomic_Op_GCC_T.inl
Normal file
148
dep/ACE_wrappers/ace/Atomic_Op_GCC_T.inl
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// $Id: Atomic_Op_GCC_T.inl 89391 2010-03-08 13:53:30Z johnnyw $
|
||||
|
||||
#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1)
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op_GCC<T>::ACE_Atomic_Op_GCC (void)
|
||||
: value_ (0)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op_GCC<T>::ACE_Atomic_Op_GCC (T c)
|
||||
: value_ (c)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE
|
||||
ACE_Atomic_Op_GCC<T>::ACE_Atomic_Op_GCC (
|
||||
const ACE_Atomic_Op_GCC<T> &rhs)
|
||||
: value_ (rhs.value_)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE T
|
||||
ACE_Atomic_Op_GCC<T>::operator++ (void)
|
||||
{
|
||||
return __sync_add_and_fetch (&this->value_, 1);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE T
|
||||
ACE_Atomic_Op_GCC<T>::operator++ (int)
|
||||
{
|
||||
return __sync_fetch_and_add (&this->value_, 1);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE T
|
||||
ACE_Atomic_Op_GCC<T>::operator-- (void)
|
||||
{
|
||||
return __sync_sub_and_fetch (&this->value_, 1);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE T
|
||||
ACE_Atomic_Op_GCC<T>::operator-- (int)
|
||||
{
|
||||
return __sync_fetch_and_sub (&this->value_, 1);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE T
|
||||
ACE_Atomic_Op_GCC<T>::operator+= (T rhs)
|
||||
{
|
||||
return __sync_add_and_fetch (&this->value_, rhs);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE T
|
||||
ACE_Atomic_Op_GCC<T>::operator-= (T rhs)
|
||||
{
|
||||
return __sync_sub_and_fetch (&this->value_, rhs);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE bool
|
||||
ACE_Atomic_Op_GCC<T>::operator== (T rhs) const
|
||||
{
|
||||
return (this->value_ == rhs);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE bool
|
||||
ACE_Atomic_Op_GCC<T>::operator!= (T rhs) const
|
||||
{
|
||||
return (this->value_ != rhs);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE bool
|
||||
ACE_Atomic_Op_GCC<T>::operator>= (T rhs) const
|
||||
{
|
||||
return (this->value_ >= rhs);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE bool
|
||||
ACE_Atomic_Op_GCC<T>::operator> (T rhs) const
|
||||
{
|
||||
return (this->value_ > rhs);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE bool
|
||||
ACE_Atomic_Op_GCC<T>::operator<= (T rhs) const
|
||||
{
|
||||
return (this->value_ <= rhs);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE bool
|
||||
ACE_Atomic_Op_GCC<T>::operator< (T rhs) const
|
||||
{
|
||||
return (this->value_ < rhs);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE ACE_Atomic_Op_GCC<T> &
|
||||
ACE_Atomic_Op_GCC<T>::operator= (T rhs)
|
||||
{
|
||||
(void) __sync_lock_test_and_set (&this->value_, rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE ACE_Atomic_Op_GCC<T> &
|
||||
ACE_Atomic_Op_GCC<T>::operator= (
|
||||
const ACE_Atomic_Op_GCC<T> &rhs)
|
||||
{
|
||||
(void) __sync_lock_test_and_set (&this->value_, rhs.value_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE T
|
||||
ACE_Atomic_Op_GCC<T>::value (void) const
|
||||
{
|
||||
return this->value_;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ACE_INLINE volatile T &
|
||||
ACE_Atomic_Op_GCC<T>::value_i (void)
|
||||
{
|
||||
return this->value_;
|
||||
}
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#endif /* ACE_HAS_GCC_ATOMIC_BUILTINS */
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: Atomic_Op_T.cpp 91287 2010-08-05 10:30:49Z johnnyw $
|
||||
|
||||
#ifndef ACE_ATOMIC_OP_T_CPP
|
||||
#define ACE_ATOMIC_OP_T_CPP
|
||||
|
||||
|
|
@ -20,8 +22,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
|||
ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op_Ex)
|
||||
ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op)
|
||||
|
||||
ACE_RCSID(ace, Atomic_Op_T, "$Id: Atomic_Op_T.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
// *************************************************
|
||||
template <class ACE_LOCK, class TYPE> ACE_LOCK &
|
||||
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::mutex (void)
|
||||
|
|
@ -38,7 +38,7 @@ ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::dump (void) const
|
|||
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::dump");
|
||||
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
|
||||
this->mutex_.dump ();
|
||||
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
|
||||
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP, this));
|
||||
#endif /* ACE_HAS_DUMP */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: Auto_Event.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Auto_Event.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $
|
||||
|
||||
#include "ace/Auto_Event.h"
|
||||
|
||||
|
|
@ -6,10 +6,6 @@
|
|||
#include "ace/Auto_Event.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Auto_Event,
|
||||
"$Id: Auto_Event.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_Auto_Event::ACE_Auto_Event (int initial_state,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Auto_IncDec_T.h
|
||||
*
|
||||
* $Id: Auto_IncDec_T.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Auto_IncDec_T.h 84675 2009-03-02 11:44:35Z johnnyw $
|
||||
*
|
||||
* @author Edan Ayal <EdanA@cti2.com>
|
||||
*/
|
||||
|
|
@ -60,8 +60,8 @@ 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> &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Auto_IncDec (const
|
||||
ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> &))
|
||||
};
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: Auto_Ptr.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Auto_Ptr.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#ifndef ACE_AUTO_PTR_CPP
|
||||
#define ACE_AUTO_PTR_CPP
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
#include "ace/Auto_Ptr.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
ACE_RCSID(ace, Auto_Ptr, "$Id: Auto_Ptr.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: Barrier.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Barrier.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Barrier.h"
|
||||
|
||||
|
|
@ -15,10 +15,6 @@
|
|||
# include "ace/Log_Msg.h"
|
||||
#endif /* ACE_HAS_DUMP */
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Barrier,
|
||||
"$Id: Barrier.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_ALLOC_HOOK_DEFINE(ACE_Sub_Barrier)
|
||||
|
|
@ -31,8 +27,7 @@ ACE_Sub_Barrier::dump (void) const
|
|||
|
||||
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_TEXT ("running_threads_ = %d\n"), this->running_threads_));
|
||||
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
|
||||
#endif /* ACE_HAS_DUMP */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
// $Id: Base_Thread_Adapter.cpp 81239 2008-04-04 22:28:48Z iliyan $
|
||||
// $Id: Base_Thread_Adapter.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Base_Thread_Adapter.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Base_Thread_Adapter,
|
||||
"$Id: Base_Thread_Adapter.cpp 81239 2008-04-04 22:28:48Z iliyan $")
|
||||
|
||||
#if !defined (ACE_HAS_INLINED_OSCALLS)
|
||||
# include "ace/Base_Thread_Adapter.inl"
|
||||
#endif /* ACE_HAS_INLINED_OSCALLS */
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Based_Pointer_Repository.h
|
||||
*
|
||||
* $Id: Based_Pointer_Repository.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Based_Pointer_Repository.h 84837 2009-03-16 13:01:15Z johnnyw $
|
||||
*
|
||||
* @author Dietrich Quehl <Dietrich.Quehl@med.siemens.de>
|
||||
* @author Douglas C. Schmidt <schmidt@.cs.wustl.edu>
|
||||
|
|
@ -71,6 +71,9 @@ private:
|
|||
/// order to avoid circular #include dependencies.
|
||||
ACE_Based_Pointer_Repository_Rep *rep_;
|
||||
|
||||
private:
|
||||
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Based_Pointer_Repository &))
|
||||
ACE_UNIMPLEMENTED_FUNC (ACE_Based_Pointer_Repository (const ACE_Based_Pointer_Repository &))
|
||||
};
|
||||
|
||||
// ----------------------------------
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: Basic_Stats.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Basic_Stats.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Basic_Stats.h"
|
||||
#include "ace/Log_Msg.h"
|
||||
|
|
@ -7,10 +7,6 @@
|
|||
#include "ace/Basic_Stats.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
ACE_RCSID(ace,
|
||||
Basic_Stats,
|
||||
"$Id: Basic_Stats.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: Basic_Types.cpp 91366 2010-08-16 12:42:35Z mhengstmengel $
|
||||
|
||||
#include "ace/Basic_Types.h"
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
|
|
@ -5,11 +7,6 @@
|
|||
#endif /* ! __ACE_INLINE__ */
|
||||
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Basic_Types,
|
||||
"$Id: Basic_Types.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
#if defined (ACE_LACKS_LONGLONG_T) && !defined (ACE_LACKS_UNSIGNEDLONGLONG_T)
|
||||
# include "ace/Log_Msg.h"
|
||||
# include "ace/OS_NS_stdio.h"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Basic_Types.h
|
||||
*
|
||||
* $Id: Basic_Types.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Basic_Types.h 91161 2010-07-21 18:25:12Z schmidt $
|
||||
*
|
||||
* @author David L. Levine
|
||||
*
|
||||
|
|
@ -349,13 +349,6 @@ typedef unsigned char ACE_Byte;
|
|||
# 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 defined (ACE_HAS_WINCE) && (_WIN32_WCE < 400)
|
||||
typedef unsigned long ptrdiff_t; // evc3, PocketPC don't defined ptrdiff_t
|
||||
# endif
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
// Byte-order (endian-ness) determination.
|
||||
|
|
@ -391,10 +384,13 @@ ACE_END_VERSIONED_NAMESPACE_DECL
|
|||
# endif /* __BYTE_ORDER */
|
||||
# else /* ! BYTE_ORDER && ! __BYTE_ORDER */
|
||||
// We weren't explicitly told, so we have to figure it out . . .
|
||||
// Note that Itanium hardware (IA64) can run in either byte order. It's
|
||||
// selected by the OS when loading; Windows runs little, HP-UX runs big.
|
||||
# if defined (i386) || defined (__i386__) || defined (_M_IX86) || \
|
||||
defined (vax) || defined (__alpha) || defined (__LITTLE_ENDIAN__) || \
|
||||
defined (ARM) || defined (_M_IA64) || defined (__ia64__) || \
|
||||
defined (_M_AMD64) || defined (__amd64)
|
||||
defined (ARM) || defined (_M_IA64) || defined (_M_AMD64) || \
|
||||
defined (__amd64) || \
|
||||
((defined (__ia64__) || defined (__ia64)) && !defined (__hpux))
|
||||
// We know these are little endian.
|
||||
# define ACE_LITTLE_ENDIAN 0x0123
|
||||
# define ACE_BYTE_ORDER ACE_LITTLE_ENDIAN
|
||||
|
|
@ -704,94 +700,166 @@ ACE_END_VERSIONED_NAMESPACE_DECL
|
|||
# define ACE_INT64_LITERAL(n) n ## ll
|
||||
# endif /* ! ACE_WIN32 && ! ACE_LACKS_LONGLONG_T */
|
||||
|
||||
#if !defined (ACE_INT8_FORMAT_SPECIFIER_ASCII)
|
||||
# if defined (PRId8)
|
||||
# define ACE_INT8_FORMAT_SPECIFIER_ASCII "%" PRId8
|
||||
# else
|
||||
# define ACE_INT8_FORMAT_SPECIFIER_ASCII "%d"
|
||||
# endif /* defined (PRId8) */
|
||||
#endif /* ACE_INT8_FORMAT_SPECIFIER_ASCII */
|
||||
|
||||
#if !defined (ACE_INT8_FORMAT_SPECIFIER)
|
||||
# if defined (PRId8)
|
||||
# define ACE_INT8_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRId8)
|
||||
# else
|
||||
# define ACE_INT8_FORMAT_SPECIFIER ACE_TEXT ("%d")
|
||||
# define ACE_INT8_FORMAT_SPECIFIER ACE_TEXT (ACE_INT8_FORMAT_SPECIFIER_ASCII)
|
||||
# endif /* defined (PRId8) */
|
||||
#endif /* ACE_INT8_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_UINT8_FORMAT_SPECIFIER_ASCII)
|
||||
# if defined (PRIu8)
|
||||
# define ACE_UINT8_FORMAT_SPECIFIER_ASCII "%" PRIu8
|
||||
# else
|
||||
# define ACE_UINT8_FORMAT_SPECIFIER_ASCII "%u"
|
||||
# endif /* defined (PRIu8) */
|
||||
#endif /* ACE_UINT8_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_UINT8_FORMAT_SPECIFIER)
|
||||
# if defined (PRIu8)
|
||||
# define ACE_UINT8_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRIu8)
|
||||
# else
|
||||
# define ACE_UINT8_FORMAT_SPECIFIER ACE_TEXT ("%u")
|
||||
# define ACE_UINT8_FORMAT_SPECIFIER ACE_TEXT (ACE_UINT8_FORMAT_SPECIFIER_ASCII)
|
||||
# endif /* defined (PRIu8) */
|
||||
#endif /* ACE_UINT8_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_INT16_FORMAT_SPECIFIER_ASCII)
|
||||
# if defined (PRId16)
|
||||
# define ACE_INT16_FORMAT_SPECIFIER_ASCII "%" PRId16
|
||||
# else
|
||||
# define ACE_INT16_FORMAT_SPECIFIER_ASCII "%d"
|
||||
# endif /* defined (PRId16) */
|
||||
#endif /* ACE_INT16_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_INT16_FORMAT_SPECIFIER)
|
||||
# if defined (PRId16)
|
||||
# define ACE_INT16_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRId16)
|
||||
# else
|
||||
# define ACE_INT16_FORMAT_SPECIFIER ACE_TEXT ("%d")
|
||||
# define ACE_INT16_FORMAT_SPECIFIER ACE_TEXT (ACE_INT16_FORMAT_SPECIFIER_ASCII)
|
||||
# endif /* defined (PRId16) */
|
||||
#endif /* ACE_INT16_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_UINT16_FORMAT_SPECIFIER_ASCII)
|
||||
# if defined (PRIu16)
|
||||
# define ACE_UINT16_FORMAT_SPECIFIER_ASCII "%" PRIu16
|
||||
# else
|
||||
# define ACE_UINT16_FORMAT_SPECIFIER_ASCII "%u"
|
||||
# endif /* defined (PRIu16) */
|
||||
#endif /* ACE_UINT16_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_UINT16_FORMAT_SPECIFIER)
|
||||
# if defined (PRIu16)
|
||||
# define ACE_UINT16_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRIu16)
|
||||
# else
|
||||
# define ACE_UINT16_FORMAT_SPECIFIER ACE_TEXT ("%u")
|
||||
# define ACE_UINT16_FORMAT_SPECIFIER ACE_TEXT (ACE_UINT16_FORMAT_SPECIFIER_ASCII)
|
||||
# endif /* defined (PRIu16) */
|
||||
#endif /* ACE_UINT16_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_INT32_FORMAT_SPECIFIER_ASCII)
|
||||
# if defined (PRId32)
|
||||
# define ACE_INT32_FORMAT_SPECIFIER_ASCII "%" PRId32
|
||||
# elif ACE_SIZEOF_INT == 4
|
||||
# define ACE_INT32_FORMAT_SPECIFIER_ASCII "%d"
|
||||
# else
|
||||
# define ACE_INT32_FORMAT_SPECIFIER_ASCII "%ld"
|
||||
# endif /* defined (PRId32) */
|
||||
#endif /* ACE_INT32_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_INT32_FORMAT_SPECIFIER)
|
||||
# if defined (PRId32)
|
||||
# define ACE_INT32_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRId32)
|
||||
# elif ACE_SIZEOF_INT == 4
|
||||
# define ACE_INT32_FORMAT_SPECIFIER ACE_TEXT ("%d")
|
||||
# else
|
||||
# define ACE_INT32_FORMAT_SPECIFIER ACE_TEXT ("%ld")
|
||||
# define ACE_INT32_FORMAT_SPECIFIER ACE_TEXT (ACE_INT32_FORMAT_SPECIFIER_ASCII)
|
||||
# endif /* defined (PRId32) */
|
||||
#endif /* ACE_INT32_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_UINT32_FORMAT_SPECIFIER_ASCII)
|
||||
# if defined (PRIu32)
|
||||
# define ACE_UINT32_FORMAT_SPECIFIER_ASCII "%" PRIu32
|
||||
# elif ACE_SIZEOF_INT == 4
|
||||
# define ACE_UINT32_FORMAT_SPECIFIER_ASCII "%u"
|
||||
# else
|
||||
# define ACE_UINT32_FORMAT_SPECIFIER_ASCII "%lu"
|
||||
# endif /* defined (PRIu32) */
|
||||
#endif /* ACE_UINT32_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_UINT32_FORMAT_SPECIFIER)
|
||||
# if defined (PRIu32)
|
||||
# define ACE_UINT32_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRIu32)
|
||||
# elif ACE_SIZEOF_INT == 4
|
||||
# define ACE_UINT32_FORMAT_SPECIFIER ACE_TEXT ("%u")
|
||||
# else
|
||||
# define ACE_UINT32_FORMAT_SPECIFIER ACE_TEXT ("%lu")
|
||||
# define ACE_UINT32_FORMAT_SPECIFIER ACE_TEXT (ACE_UINT32_FORMAT_SPECIFIER_ASCII)
|
||||
# endif /* defined (PRIu32) */
|
||||
#endif /* ACE_UINT32_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_INT64_FORMAT_SPECIFIER_ASCII)
|
||||
# if defined (PRId64)
|
||||
# define ACE_INT64_FORMAT_SPECIFIER_ASCII "%" PRId64
|
||||
# elif ACE_SIZEOF_LONG == 8
|
||||
# define ACE_INT64_FORMAT_SPECIFIER_ASCII "%ld"
|
||||
# else
|
||||
# define ACE_INT64_FORMAT_SPECIFIER_ASCII "%lld"
|
||||
# endif /* defined (PRId64) */
|
||||
#endif /* ACE_INT64_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_INT64_FORMAT_SPECIFIER)
|
||||
# if defined (PRId64)
|
||||
# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRId64)
|
||||
# elif ACE_SIZEOF_LONG == 8
|
||||
# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT ("%ld")
|
||||
# else
|
||||
# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT ("%lld")
|
||||
# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT (ACE_INT64_FORMAT_SPECIFIER_ASCII)
|
||||
# endif /* defined (PRId64) */
|
||||
#endif /* ACE_INT64_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_UINT64_FORMAT_SPECIFIER_ASCII)
|
||||
# if defined (PRIu64)
|
||||
# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%" PRIu64
|
||||
# elif ACE_SIZEOF_LONG == 8
|
||||
# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%lu"
|
||||
# else
|
||||
# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%llu"
|
||||
# endif /* defined (PRIu64) */
|
||||
#endif /* ACE_UINT64_FORMAT_SPECIFIER_ASCII */
|
||||
|
||||
#if !defined (ACE_UINT64_FORMAT_SPECIFIER)
|
||||
# if defined (PRIu64)
|
||||
# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRIu64)
|
||||
# elif ACE_SIZEOF_LONG == 8
|
||||
# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%lu")
|
||||
# else
|
||||
# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%llu")
|
||||
# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT (ACE_UINT64_FORMAT_SPECIFIER_ASCII)
|
||||
# endif /* defined (PRIu64) */
|
||||
#endif /* ACE_UINT64_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_SSIZE_T_FORMAT_SPECIFIER)
|
||||
#if !defined (ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII)
|
||||
# if defined (ACE_WIN64)
|
||||
# define ACE_SSIZE_T_FORMAT_SPECIFIER ACE_TEXT ("%I64d")
|
||||
# define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%I64d"
|
||||
# else
|
||||
# define ACE_SSIZE_T_FORMAT_SPECIFIER ACE_TEXT ("%d")
|
||||
# define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%d"
|
||||
# endif /* ACE_WIN64 */
|
||||
#endif /* ACE_SSIZE_T_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_SIZE_T_FORMAT_SPECIFIER)
|
||||
#if !defined (ACE_SSIZE_T_FORMAT_SPECIFIER)
|
||||
#define ACE_SSIZE_T_FORMAT_SPECIFIER ACE_TEXT (ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII)
|
||||
#endif /* ACE_SSIZE_T_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_SIZE_T_FORMAT_SPECIFIER_ASCII)
|
||||
# if defined (ACE_WIN64)
|
||||
# define ACE_SIZE_T_FORMAT_SPECIFIER ACE_TEXT ("%I64u")
|
||||
# define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%I64u"
|
||||
# else
|
||||
# define ACE_SIZE_T_FORMAT_SPECIFIER ACE_TEXT ("%u")
|
||||
# define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%u"
|
||||
# endif /* ACE_WIN64 */
|
||||
#endif /* ACE_SIZE_T_FORMAT_SPECIFIER */
|
||||
|
||||
#if !defined (ACE_SIZE_T_FORMAT_SPECIFIER)
|
||||
#define ACE_SIZE_T_FORMAT_SPECIFIER ACE_TEXT (ACE_SIZE_T_FORMAT_SPECIFIER_ASCII)
|
||||
#endif /* ACE_SIZE_T_FORMAT_SPECIFIER */
|
||||
|
||||
// Cast from UINT64 to a double requires an intermediate cast to INT64
|
||||
// on some platforms.
|
||||
# if defined (ACE_LACKS_LONGLONG_T)
|
||||
|
|
@ -833,13 +901,17 @@ ACE_END_VERSIONED_NAMESPACE_DECL
|
|||
# if LDBL_MAX_EXP == 128
|
||||
# define ACE_SIZEOF_LONG_DOUBLE 4
|
||||
# elif LDBL_MAX_EXP == 1024
|
||||
# define ACE_SIZEOF_LONG_DOUBLE 8
|
||||
# if defined (__powerpc64__)
|
||||
# define ACE_SIZEOF_LONG_DOUBLE 16
|
||||
# else
|
||||
# define ACE_SIZEOF_LONG_DOUBLE 8
|
||||
# endif
|
||||
# elif LDBL_MAX_EXP == 16384
|
||||
# if defined (LDBL_DIG) && LDBL_DIG == 18
|
||||
# if defined (__ia64) || defined (__x86_64)
|
||||
# define ACE_SIZEOF_LONG_DOUBLE 16
|
||||
# else /* ! __ia64 */
|
||||
# define ACE_SIZEOF_LONG_DOUBLE 12
|
||||
# else /* ! __ia64 || __x86_64 */
|
||||
# define ACE_SIZEOF_LONG_DOUBLE 12
|
||||
# endif /* __ia64 */
|
||||
# else /* ! LDBL_DIG || LDBL_DIG != 18 */
|
||||
# define ACE_SIZEOF_LONG_DOUBLE 16
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Bound_Ptr.h
|
||||
*
|
||||
* $Id: Bound_Ptr.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Bound_Ptr.h 82723 2008-09-16 09:35:44Z johnnyw $
|
||||
*
|
||||
* @author Christopher Kohlhoff <chris@kohlhoff.com>
|
||||
* @author Boris Kolpackov <boris@codesynthesis.com>
|
||||
|
|
@ -223,7 +223,7 @@ public:
|
|||
|
||||
/// Allows us to check for NULL on all ACE_Strong_Bound_Ptr
|
||||
/// objects.
|
||||
int null (void) const;
|
||||
bool null (void) const;
|
||||
|
||||
/// Declare the dynamic allocation hooks.
|
||||
ACE_ALLOC_HOOK_DECLARE;
|
||||
|
|
@ -359,7 +359,7 @@ public:
|
|||
long remove_ref (void);
|
||||
|
||||
/// Allows us to check for NULL on all ACE_Weak_Bound_Ptr objects.
|
||||
int null (void) const;
|
||||
bool null (void) const;
|
||||
|
||||
/// Declare the dynamic allocation hooks.
|
||||
ACE_ALLOC_HOOK_DECLARE;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* -*- C++ -*- */
|
||||
// $Id: Bound_Ptr.inl 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Bound_Ptr.inl 82723 2008-09-16 09:35:44Z johnnyw $
|
||||
|
||||
// Bound_Ptr.i
|
||||
|
||||
|
|
@ -288,7 +288,7 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::get (void) const
|
|||
return this->ptr_;
|
||||
}
|
||||
|
||||
template <class X, class ACE_LOCK> inline int
|
||||
template <class X, class ACE_LOCK> inline bool
|
||||
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::null (void) const
|
||||
{
|
||||
return this->ptr_ == 0;
|
||||
|
|
@ -453,13 +453,13 @@ ACE_Weak_Bound_Ptr<X, ACE_LOCK>::unsafe_get (void) const
|
|||
return this->ptr_;
|
||||
}
|
||||
|
||||
template <class X, class ACE_LOCK> inline int
|
||||
template <class X, class ACE_LOCK> inline bool
|
||||
ACE_Weak_Bound_Ptr<X, ACE_LOCK>::null (void) const
|
||||
{
|
||||
// A weak pointer must behave as though it is automatically set to null
|
||||
// if the underlying object has been deleted.
|
||||
if (COUNTER::object_was_deleted (this->counter_))
|
||||
return 1;
|
||||
return true;
|
||||
|
||||
return this->ptr_ == 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: CDR_Base.cpp 91287 2010-08-05 10:30:49Z johnnyw $
|
||||
|
||||
#include "ace/CDR_Base.h"
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
|
|
@ -8,10 +10,6 @@
|
|||
#include "ace/OS_Memory.h"
|
||||
#include "ace/OS_NS_string.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
CDR_Base,
|
||||
"$Id: CDR_Base.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#if defined (NONNATIVE_LONGDOUBLE)
|
||||
|
|
@ -549,20 +547,22 @@ ACE_CDR::total_length (const ACE_Message_Block* begin,
|
|||
return l;
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
ACE_CDR::consolidate (ACE_Message_Block *dst,
|
||||
const ACE_Message_Block *src)
|
||||
{
|
||||
if (src == 0)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
size_t newsize =
|
||||
size_t const newsize =
|
||||
ACE_CDR::first_size (ACE_CDR::total_length (src, 0)
|
||||
+ ACE_CDR::MAX_ALIGNMENT);
|
||||
dst->size (newsize);
|
||||
|
||||
if (dst->size (newsize) == -1)
|
||||
return -1;
|
||||
|
||||
#if !defined (ACE_CDR_IGNORE_ALIGNMENT)
|
||||
// We must copy the contents of <src> into the new buffer, but
|
||||
// We must copy the contents of src into the new buffer, but
|
||||
// respecting the alignment.
|
||||
ptrdiff_t srcalign =
|
||||
ptrdiff_t(src->rd_ptr ()) % ACE_CDR::MAX_ALIGNMENT;
|
||||
|
|
@ -586,6 +586,7 @@ ACE_CDR::consolidate (ACE_Message_Block *dst,
|
|||
else
|
||||
dst->wr_ptr (i->length ());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined (NONNATIVE_LONGLONG)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file CDR_Base.h
|
||||
*
|
||||
* $Id: CDR_Base.h 82088 2008-06-19 16:22:16Z shuston $
|
||||
* $Id: CDR_Base.h 88488 2010-01-12 14:20:13Z olli $
|
||||
*
|
||||
* ACE Common Data Representation (CDR) basic types.
|
||||
*
|
||||
|
|
@ -124,7 +124,7 @@ public:
|
|||
/// Use whichever byte order is native to this machine.
|
||||
BYTE_ORDER_NATIVE = ACE_CDR_BYTE_ORDER
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Do byte swapping for each basic IDL type size. There exist only
|
||||
* routines to put byte, halfword (2 bytes), word (4 bytes),
|
||||
|
|
@ -177,10 +177,14 @@ public:
|
|||
*/
|
||||
static int grow (ACE_Message_Block *mb, size_t minsize);
|
||||
|
||||
/// Copy a message block chain into a single message block,
|
||||
/// preserving the alignment of the first message block of the
|
||||
/// original stream, not the following message blocks.
|
||||
static void consolidate (ACE_Message_Block *dst,
|
||||
/**
|
||||
* Copy a message block chain into a single message block,
|
||||
* preserving the alignment of the first message block of the
|
||||
* original stream, not the following message blocks.
|
||||
* @retval -1 Failure
|
||||
* @retval 0 Success.
|
||||
*/
|
||||
static int consolidate (ACE_Message_Block *dst,
|
||||
const ACE_Message_Block *src);
|
||||
|
||||
static size_t total_length (const ACE_Message_Block *begin,
|
||||
|
|
@ -216,7 +220,6 @@ public:
|
|||
// 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 */
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: CDR_Size.cpp 91287 2010-08-05 10:30:49Z johnnyw $
|
||||
|
||||
#include "ace/CDR_Size.h"
|
||||
#include "ace/SString.h"
|
||||
#include "ace/OS_Memory.h"
|
||||
|
|
@ -7,10 +9,6 @@
|
|||
# include "ace/CDR_Size.inl"
|
||||
#endif /* ! __ACE_INLINE__ */
|
||||
|
||||
ACE_RCSID (ace,
|
||||
CDR_Size,
|
||||
"$Id: CDR_Size.cpp 82559 2008-08-07 20:23:07Z parsons $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_CDR::Boolean
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: CDR_Stream.cpp 91373 2010-08-17 07:35:27Z mhengstmengel $
|
||||
|
||||
#include "ace/CDR_Stream.h"
|
||||
#include "ace/SString.h"
|
||||
#include "ace/Auto_Ptr.h"
|
||||
|
|
@ -7,10 +9,6 @@
|
|||
# include "ace/CDR_Stream.inl"
|
||||
#endif /* ! __ACE_INLINE__ */
|
||||
|
||||
ACE_RCSID (ace,
|
||||
CDR_Stream,
|
||||
"$Id: CDR_Stream.cpp 82559 2008-08-07 20:23:07Z parsons $")
|
||||
|
||||
// ****************************************************************
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
|
@ -379,7 +377,7 @@ ACE_OutputCDR::write_wstring (ACE_CDR::ULong len,
|
|||
this->write_ulong (
|
||||
ACE_Utils::truncate_cast<ACE_CDR::ULong> (
|
||||
ACE_OutputCDR::wchar_maxbytes_ * len));
|
||||
|
||||
|
||||
if (good_ulong)
|
||||
{
|
||||
return this->write_wchar_array (x, len);
|
||||
|
|
@ -533,7 +531,7 @@ ACE_OutputCDR::write_8 (const ACE_CDR::ULongLong *x)
|
|||
|
||||
if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0)
|
||||
{
|
||||
#if defined (__arm__)
|
||||
#if defined (__arm__) && !defined (ACE_HAS_IPHONE)
|
||||
// Convert to Intel format (12345678 => 56781234)
|
||||
const char *orig = reinterpret_cast<const char *> (x);
|
||||
char *target = buf;
|
||||
|
|
@ -703,7 +701,6 @@ ACE_OutputCDR::write_boolean_array (const ACE_CDR::Boolean* x,
|
|||
return this->good_bit ();
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
ACE_OutputCDR::write_long_placeholder (void)
|
||||
{
|
||||
|
|
@ -715,7 +712,6 @@ ACE_OutputCDR::write_long_placeholder (void)
|
|||
return buf;
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
ACE_OutputCDR::write_short_placeholder (void)
|
||||
{
|
||||
|
|
@ -727,7 +723,6 @@ ACE_OutputCDR::write_short_placeholder (void)
|
|||
return buf;
|
||||
}
|
||||
|
||||
|
||||
ACE_CDR::Boolean
|
||||
ACE_OutputCDR::replace (ACE_CDR::Long x, char* loc)
|
||||
{
|
||||
|
|
@ -1371,7 +1366,7 @@ ACE_InputCDR::read_wstring (ACE_CDR::WChar*& x)
|
|||
}
|
||||
|
||||
ACE_CDR::ULong len = 0;
|
||||
|
||||
|
||||
if (!this->read_ulong (len))
|
||||
{
|
||||
return false;
|
||||
|
|
@ -1615,7 +1610,7 @@ ACE_InputCDR::read_8 (ACE_CDR::ULongLong *x)
|
|||
if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0)
|
||||
{
|
||||
#if !defined (ACE_DISABLE_SWAP_ON_READ)
|
||||
# if defined (__arm__)
|
||||
# if defined (__arm__) && !defined (ACE_HAS_IPHONE)
|
||||
if (!this->do_byte_swap_)
|
||||
{
|
||||
// Convert from Intel format (12345678 => 56781234)
|
||||
|
|
@ -1897,8 +1892,7 @@ ACE_InputCDR::clone_from (ACE_InputCDR &cdr)
|
|||
|
||||
ACE_CDR::mb_align (&this->start_);
|
||||
|
||||
ACE_Data_Block *db =
|
||||
this->start_.data_block ();
|
||||
ACE_Data_Block *db = this->start_.data_block ();
|
||||
|
||||
// If the size of the data that needs to be copied are higher than
|
||||
// what is available, then do a reallocation.
|
||||
|
|
@ -1906,8 +1900,7 @@ ACE_InputCDR::clone_from (ACE_InputCDR &cdr)
|
|||
{
|
||||
// @@NOTE: We need to probably add another method to the message
|
||||
// block interface to simplify this
|
||||
db =
|
||||
cdr.start_.data_block ()->clone_nocopy ();
|
||||
db = cdr.start_.data_block ()->clone_nocopy ();
|
||||
|
||||
if (db == 0 || db->size ((wr_bytes) +
|
||||
ACE_CDR::MAX_ALIGNMENT) == -1)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file CDR_Stream.h
|
||||
*
|
||||
* $Id: CDR_Stream.h 82350 2008-07-22 07:36:47Z johnnyw $
|
||||
* $Id: CDR_Stream.h 84527 2009-02-19 14:01:42Z johnnyw $
|
||||
*
|
||||
* ACE Common Data Representation (CDR) marshaling and demarshaling
|
||||
* classes.
|
||||
|
|
@ -120,8 +120,8 @@ public:
|
|||
ACE_CDR::Octet minor_version = ACE_CDR_GIOP_MINOR_VERSION);
|
||||
|
||||
/// Build a CDR stream with an initial buffer, it will *not* remove
|
||||
/// <data>, since it did not allocated it. It's important to be careful
|
||||
/// with the alignment of <data>.
|
||||
/// @a data, since it did not allocated it. It's important to be careful
|
||||
/// with the alignment of @a data.
|
||||
/**
|
||||
* Create an output stream from an arbitrary buffer, care must be
|
||||
* exercised with alignment, because this contructor will align if
|
||||
|
|
@ -254,8 +254,8 @@ public:
|
|||
const ACE_CDR::WChar *x);
|
||||
//@}
|
||||
|
||||
/// @note the portion written starts at <x> and ends
|
||||
/// at <x + length>.
|
||||
/// @note the portion written starts at @a x and ends
|
||||
/// at @a x + @a length.
|
||||
/// The length is *NOT* stored into the CDR stream.
|
||||
//@{ @name Array write operations
|
||||
ACE_CDR::Boolean write_boolean_array (const ACE_CDR::Boolean *x,
|
||||
|
|
@ -663,7 +663,7 @@ public:
|
|||
ACE_Lock* lock = 0);
|
||||
|
||||
/// Create an input stream from an ACE_Data_Block. The <flag>
|
||||
/// indicates whether the <data> can be deleted by the CDR stream
|
||||
/// indicates whether the @a data can be deleted by the CDR stream
|
||||
/// or not
|
||||
ACE_InputCDR (ACE_Data_Block *data,
|
||||
ACE_Message_Block::Message_Flags flag = 0,
|
||||
|
|
@ -919,7 +919,7 @@ public:
|
|||
*/
|
||||
void exchange_data_blocks (ACE_InputCDR &cdr);
|
||||
|
||||
/// Copy the data portion from the @c cdr to this cdr and return the
|
||||
/// Copy the data portion from the @a cdr to this cdr and return the
|
||||
/// data content (ie. the ACE_Data_Block) from this CDR to the
|
||||
/// caller.
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// $Id: CDR_Stream.inl 82350 2008-07-22 07:36:47Z johnnyw $
|
||||
// $Id: CDR_Stream.inl 84206 2009-01-21 02:49:26Z schmidt $
|
||||
|
||||
#include "ace/OS_NS_string.h"
|
||||
#include "ace/OS_Memory.h"
|
||||
|
|
@ -572,7 +572,6 @@ ACE_OutputCDR::current_alignment (size_t current_alignment)
|
|||
this->current_alignment_ = current_alignment;
|
||||
#else
|
||||
ACE_UNUSED_ARG (current_alignment);
|
||||
return 0;
|
||||
#endif /* ACE_LACKS_CDR_ALIGNMENT */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file CORBA_macros.h
|
||||
*
|
||||
* $Id: CORBA_macros.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: CORBA_macros.h 91285 2010-08-05 08:29:30Z johnnyw $
|
||||
*
|
||||
* Writing code that is portable between platforms with or without
|
||||
* native C++ exceptions is hard. The following macros offer some
|
||||
|
|
@ -30,10 +30,6 @@
|
|||
# pragma once
|
||||
# endif /* ACE_LACKS_PRAGMA_ONCE */
|
||||
|
||||
#define ACE_ENV_POLLUTE_NAMES
|
||||
|
||||
#include "ace/Exception_Macros.h"
|
||||
|
||||
// The Windows MFC exception mechanism requires that a caught CException
|
||||
// (including the CMemoryException in use here) be freed using its Delete()
|
||||
// method. Thus, when MFC is in use and we're catching exceptions as a result
|
||||
|
|
@ -450,126 +446,6 @@
|
|||
ACE_Write_Guard< MUTEX > OBJ (LOCK); \
|
||||
if (OBJ.locked () == 0) throw EXCEPTION;
|
||||
|
||||
#if !defined (ACE_LACKS_DEPRECATED_MACROS)
|
||||
|
||||
//@{
|
||||
/**
|
||||
* @name Native C++ exceptions portability macros.
|
||||
*
|
||||
* The following macros are used to write code portable between platforms
|
||||
* with and without native C++ exception support. Their main goal is to
|
||||
* hide the presence of the ACE_ENV_TYPE argument, but they collaborate
|
||||
* with the ACE_TRY_* macros to emulate the try/catch blocks.
|
||||
*/
|
||||
|
||||
/// Define a macro to emit code only when ACE_ENV_TYPE is used
|
||||
#if !defined (ACE_USES_NATIVE_EXCEPTIONS) || defined (ACE_ENV_BKWD_COMPAT)
|
||||
# define ACE_ENV_EMIT_CODE(X) X
|
||||
#else
|
||||
# define ACE_ENV_EMIT_CODE(X)
|
||||
#endif /* ACE_USES_NATIVE_EXCEPTIONS && ! ACE_ENV_BKWD_COMPAT */
|
||||
|
||||
/// Another macro to emit code only when ACE_ENV_TYPE is used
|
||||
#if !defined (ACE_USES_NATIVE_EXCEPTIONS) || defined (ACE_ENV_BKWD_COMPAT)
|
||||
# define ACE_ENV_EMIT_CODE2(X,Y) X,Y
|
||||
#else
|
||||
# define ACE_ENV_EMIT_CODE2(X,Y)
|
||||
#endif /* ACE_USES_NATIVE_EXCEPTIONS && ! ACE_ENV_BKWD_COMPAT */
|
||||
|
||||
/// Helper macro
|
||||
#define ACE_ENV_EMIT_DUMMY
|
||||
|
||||
/// Declare a ACE_ENV_TYPE argument as the last argument of a
|
||||
/// function
|
||||
/**
|
||||
* Normally this macro is used as follows:
|
||||
*
|
||||
* <CODE>void my_funct (int x, int y ACE_ENV_ARG_DECL);</CODE>
|
||||
*
|
||||
* Its purpose is to provide developers (and users) with a mechanism to
|
||||
* write code that is portable to platforms with and without native C++
|
||||
* exceptions.
|
||||
*/
|
||||
#define ACE_ENV_ARG_DECL \
|
||||
ACE_ENV_EMIT_CODE2(ACE_ENV_EMIT_DUMMY, \
|
||||
ACE_ENV_TYPE &ACE_TRY_ENV)
|
||||
|
||||
/// Declare a ACE_ENV_TYPE argument with the default value obtained from
|
||||
/// the ORB/application.
|
||||
/**
|
||||
* It is similar to ACE_ENV_ARG_DECL. The name of the default environment
|
||||
* getter method needs to be changed when switching ORBs or when used with
|
||||
* another application.
|
||||
*/
|
||||
#define ACE_ENV_ARG_DECL_WITH_DEFAULTS \
|
||||
ACE_ENV_EMIT_CODE2(ACE_ENV_EMIT_DUMMY, \
|
||||
ACE_ENV_TYPE &ACE_TRY_ENV = \
|
||||
ACE_DEFAULT_GET_ENV_METHOD ())
|
||||
|
||||
/// Declare a ACE_ENV_TYPE argument that is not used by the
|
||||
/// function definition.
|
||||
/**
|
||||
* Similar to ACE_ENV_ARG_DECL, but the formal parameter name is dropped to
|
||||
* avoid warnings about unused parameters
|
||||
*/
|
||||
#define ACE_ENV_ARG_DECL_NOT_USED \
|
||||
ACE_ENV_EMIT_CODE2(ACE_ENV_EMIT_DUMMY, \
|
||||
ACE_ENV_TYPE &)
|
||||
|
||||
/// Declare a ACE_ENV_TYPE argument for methods that do not take any other
|
||||
/// parameters
|
||||
#define ACE_ENV_SINGLE_ARG_DECL \
|
||||
ACE_ENV_EMIT_CODE(ACE_ENV_TYPE &ACE_TRY_ENV)
|
||||
|
||||
/// Declare a ACE_ENV_TYPE argument with a default value for methods that
|
||||
/// do not take any other parameters. The name of the default environment
|
||||
/// getter method needs to be changed when switching ORBs or when used in
|
||||
/// another application.
|
||||
#define ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS \
|
||||
ACE_ENV_EMIT_CODE(ACE_ENV_TYPE &ACE_TRY_ENV = \
|
||||
ACE_DEFAULT_GET_ENV_METHOD ())
|
||||
|
||||
/// Declare a ACE_ENV_TYPE argument for methods which don't use it.
|
||||
#define ACE_ENV_SINGLE_ARG_DECL_NOT_USED \
|
||||
ACE_ENV_EMIT_CODE(ACE_ENV_TYPE &)
|
||||
|
||||
/// Use the ACE_ENV_TYPE argument in a nested call
|
||||
#define ACE_ENV_ARG_PARAMETER \
|
||||
ACE_ENV_EMIT_CODE2(ACE_ENV_EMIT_DUMMY, \
|
||||
ACE_TRY_ENV)
|
||||
|
||||
/// Use the ACE_ENV_TYPE argument in a nested call, assuming that the
|
||||
/// called function takes only the ACE_TRY_ENV argument.
|
||||
#define ACE_ENV_SINGLE_ARG_PARAMETER \
|
||||
ACE_ENV_EMIT_CODE(ACE_TRY_ENV)
|
||||
|
||||
/// Eliminate unused argument warnings about ACE_TRY_ENV
|
||||
#define ACE_ENV_ARG_NOT_USED \
|
||||
ACE_ENV_EMIT_CODE(ACE_UNUSED_ARG(ACE_TRY_ENV))
|
||||
//@}
|
||||
|
||||
#if !defined (ACE_USES_NATIVE_EXCEPTIONS)
|
||||
// This thing can be moved above when we drop ACE_ENV_BKWD_COMPAT.
|
||||
# define ACE_ENV_RAISE(ex) ACE_TRY_ENV.exception (ex)
|
||||
#else
|
||||
# define ACE_ENV_RAISE(ex) (ex)->_raise ()
|
||||
#endif /* ACE_USES_NATIVE_EXCEPTIONS */
|
||||
|
||||
// ============================================================
|
||||
|
||||
// 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 */
|
||||
|
||||
#endif /* !ACE_LACKS_DEPRECATED_MACROS */
|
||||
|
||||
#include /**/ "ace/post.h"
|
||||
|
||||
#endif /* ACE_CORBA_MACROS_H */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//$Id: Cached_Connect_Strategy_T.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
//$Id: Cached_Connect_Strategy_T.cpp 82771 2008-09-17 18:47:48Z johnnyw $
|
||||
|
||||
#ifndef ACE_CACHED_CONNECT_STRATEGY_T_CPP
|
||||
#define ACE_CACHED_CONNECT_STRATEGY_T_CPP
|
||||
|
|
@ -51,7 +51,7 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::check_hint_i
|
|||
const ACE_PEER_CONNECTOR_ADDR &remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
const ACE_PEER_CONNECTOR_ADDR &local_addr,
|
||||
int reuse_addr,
|
||||
bool reuse_addr,
|
||||
int flags,
|
||||
int perms,
|
||||
ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, ACE_Pair<SVC_HANDLER *, ATTRIBUTES> > *&entry,
|
||||
|
|
@ -141,7 +141,7 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::find_or_create_svc_handler_i
|
|||
const ACE_PEER_CONNECTOR_ADDR &remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
const ACE_PEER_CONNECTOR_ADDR &local_addr,
|
||||
int reuse_addr,
|
||||
bool reuse_addr,
|
||||
int flags,
|
||||
int perms,
|
||||
ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, ACE_Pair<SVC_HANDLER *, ATTRIBUTES> > *&entry,
|
||||
|
|
@ -256,7 +256,7 @@ 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,
|
||||
bool reuse_addr,
|
||||
int flags,
|
||||
int perms)
|
||||
{
|
||||
|
|
@ -319,7 +319,7 @@ ACE_Cached_Connect_Strategy_Ex<ACE_T2>::connect_svc_handler_i
|
|||
const ACE_PEER_CONNECTOR_ADDR &remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
const ACE_PEER_CONNECTOR_ADDR &local_addr,
|
||||
int reuse_addr,
|
||||
bool reuse_addr,
|
||||
int flags,
|
||||
int perms,
|
||||
int& found)
|
||||
|
|
@ -587,7 +587,7 @@ ACE_Bounded_Cached_Connect_Strategy<ACE_T2>::find_or_create_svc_handler_i
|
|||
const ACE_PEER_CONNECTOR_ADDR &remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
const ACE_PEER_CONNECTOR_ADDR &local_addr,
|
||||
int reuse_addr,
|
||||
bool reuse_addr,
|
||||
int flags,
|
||||
int perms,
|
||||
ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Cached_Connect_Strategy_T.h
|
||||
*
|
||||
* $Id: Cached_Connect_Strategy_T.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Cached_Connect_Strategy_T.h 91077 2010-07-13 14:33:08Z johnnyw $
|
||||
*
|
||||
* @author Kirthika Parameswaran <kirthika@cs.wustl.edu>
|
||||
*/
|
||||
|
|
@ -116,12 +116,12 @@ protected:
|
|||
/// Add to cache (non-locking version).
|
||||
virtual int cache_i (const void *recycling_act);
|
||||
|
||||
/// Get/Set <recycle_state> (non-locking version).
|
||||
/// Get/Set recycle_state (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;
|
||||
|
||||
/// Cleanup hint and reset <*act_holder> to zero if <act_holder != 0>.
|
||||
/// Cleanup hint and reset @c *act_holder to zero if @a act_holder != 0.
|
||||
virtual int cleanup_hint_i (const void *recycling_act,
|
||||
void **act_holder);
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ protected:
|
|||
const ACE_PEER_CONNECTOR_ADDR &remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
const ACE_PEER_CONNECTOR_ADDR &local_addr,
|
||||
int reuse_addr,
|
||||
bool reuse_addr,
|
||||
int flags,
|
||||
int perms,
|
||||
ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, ACE_Pair<SVC_HANDLER *, ATTRIBUTES> > *&entry,
|
||||
|
|
@ -140,7 +140,7 @@ protected:
|
|||
const ACE_PEER_CONNECTOR_ADDR &remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
const ACE_PEER_CONNECTOR_ADDR &local_addr,
|
||||
int reuse_addr,
|
||||
bool reuse_addr,
|
||||
int flags,
|
||||
int perms,
|
||||
ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>, ACE_Pair<SVC_HANDLER *, ATTRIBUTES> > *&entry,
|
||||
|
|
@ -150,7 +150,7 @@ protected:
|
|||
const ACE_PEER_CONNECTOR_ADDR &remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
const ACE_PEER_CONNECTOR_ADDR &local_addr,
|
||||
int reuse_addr,
|
||||
bool reuse_addr,
|
||||
int flags,
|
||||
int perms,
|
||||
int &found);
|
||||
|
|
@ -168,7 +168,7 @@ protected:
|
|||
const ACE_PEER_CONNECTOR_ADDR &remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
const ACE_PEER_CONNECTOR_ADDR &local_addr,
|
||||
int reuse_addr,
|
||||
bool reuse_addr,
|
||||
int flags,
|
||||
int perms);
|
||||
|
||||
|
|
@ -184,19 +184,20 @@ protected:
|
|||
/**
|
||||
* @class ACE_Bounded_Cached_Connect_Strategy
|
||||
*
|
||||
* @brief A connection strategy which caches connections to peers
|
||||
* (represented by SVC_HANDLER instances), thereby allowing
|
||||
* subsequent re-use of unused, but available, connections.
|
||||
* This strategy should be used when the cache is bounded by
|
||||
* maximum size.
|
||||
* @brief
|
||||
* A connection strategy which caches connections to peers
|
||||
* (represented by SVC_HANDLER instances), thereby allowing
|
||||
* subsequent re-use of unused, but available, connections.
|
||||
* This strategy should be used when the cache is bounded by
|
||||
* maximum size.
|
||||
*
|
||||
* <Bounded_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.
|
||||
* Thanks to Edan Ayal <edana@bandwiz.com> for contributing this
|
||||
* class and Susan Liebeskind <shl@janis.gtri.gatech.edu> for
|
||||
* brainstorming about it.
|
||||
* Bounded_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.
|
||||
* Thanks to Edan Ayal <edana@bandwiz.com> for contributing this
|
||||
* class and Susan Liebeskind <shl@janis.gtri.gatech.edu> for
|
||||
* brainstorming about it.
|
||||
*/
|
||||
template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1,
|
||||
class CACHING_STRATEGY, class ATTRIBUTES,
|
||||
|
|
@ -235,7 +236,7 @@ protected:
|
|||
const ACE_PEER_CONNECTOR_ADDR &remote_addr,
|
||||
ACE_Time_Value *timeout,
|
||||
const ACE_PEER_CONNECTOR_ADDR &local_addr,
|
||||
int reuse_addr,
|
||||
bool reuse_addr,
|
||||
int flags,
|
||||
int perms,
|
||||
ACE_Hash_Map_Entry<ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR>,
|
||||
|
|
@ -244,7 +245,7 @@ protected:
|
|||
|
||||
protected:
|
||||
|
||||
/// max items in the cache, used as a bound for the creation of svc_handlers.
|
||||
/// Max items in the cache, used as a bound for the creation of svc_handlers.
|
||||
size_t max_size_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: Capabilities.cpp 91287 2010-08-05 10:30:49Z johnnyw $
|
||||
|
||||
#include "ace/Capabilities.h"
|
||||
#include "ace/OS_NS_ctype.h"
|
||||
#include "ace/OS_Memory.h"
|
||||
|
|
@ -9,11 +11,6 @@
|
|||
|
||||
#include "ace/OS_NS_stdio.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Capabilities,
|
||||
"$Id: Capabilities.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
#define ACE_ESC ((ACE_TCHAR)0x1b)
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Capabilities.h
|
||||
*
|
||||
* $Id: Capabilities.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Capabilities.h 91077 2010-07-13 14:33:08Z johnnyw $
|
||||
*
|
||||
* @author Arturo Montes <mitosys@colomsat.net.co>
|
||||
*/
|
||||
|
|
@ -124,16 +124,17 @@ protected:
|
|||
/**
|
||||
* @class ACE_Capabilities
|
||||
*
|
||||
* @brief This class implement the ACE Capabilities.
|
||||
* @brief
|
||||
* This class implement the ACE Capabilities.
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* FILE is a container for ACE_Capabilities, the
|
||||
* ACE_Capabilities has a name in the file, as a termcap file.
|
||||
*/
|
||||
class ACE_Export ACE_Capabilities
|
||||
|
|
@ -188,7 +189,6 @@ private:
|
|||
|
||||
/// This is the set of ACE_CapEntry.
|
||||
CAPABILITIES_MAP caps_;
|
||||
|
||||
};
|
||||
|
||||
#if defined (ACE_IS_SPLITTING)
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
// $Id: Cleanup.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Cleanup.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $
|
||||
|
||||
#include "ace/Cleanup.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Cleanup,
|
||||
"$Id: Cleanup.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
#if !defined (ACE_HAS_INLINED_OSCALLS)
|
||||
# include "ace/Cleanup.inl"
|
||||
#endif /* ACE_HAS_INLINED_OSCALLS */
|
||||
|
||||
#include "ace/OS_Memory.h"
|
||||
#include "ace/OS_NS_string.h"
|
||||
#include "ace/os_include/os_typeinfo.h"
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
|
|
@ -20,7 +18,6 @@ ACE_Cleanup::cleanup (void *)
|
|||
delete this;
|
||||
}
|
||||
|
||||
|
||||
ACE_Cleanup::~ACE_Cleanup (void)
|
||||
{
|
||||
}
|
||||
|
|
@ -35,15 +32,33 @@ ACE_CLEANUP_DESTROYER_NAME (ACE_Cleanup *object, void *param)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
ACE_Cleanup_Info::ACE_Cleanup_Info (void)
|
||||
ACE_Cleanup_Info_Node::ACE_Cleanup_Info_Node (void)
|
||||
: object_ (0),
|
||||
cleanup_hook_ (0),
|
||||
param_ (0)
|
||||
param_ (0),
|
||||
name_ (0)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_Cleanup_Info_Node::ACE_Cleanup_Info_Node (void *object,
|
||||
ACE_CLEANUP_FUNC cleanup_hook,
|
||||
void *param,
|
||||
const char *name)
|
||||
: object_ (object),
|
||||
cleanup_hook_ (cleanup_hook),
|
||||
param_ (param),
|
||||
name_ (name ? ACE_OS::strdup (name) : 0)
|
||||
{
|
||||
}
|
||||
|
||||
ACE_Cleanup_Info_Node::~ACE_Cleanup_Info_Node (void)
|
||||
{
|
||||
if (this->name_)
|
||||
ACE_OS::free ((void *) name_);
|
||||
}
|
||||
|
||||
bool
|
||||
ACE_Cleanup_Info::operator== (const ACE_Cleanup_Info &o) const
|
||||
ACE_Cleanup_Info_Node::operator== (const ACE_Cleanup_Info_Node &o) const
|
||||
{
|
||||
return o.object_ == this->object_
|
||||
&& o.cleanup_hook_ == this->cleanup_hook_
|
||||
|
|
@ -51,141 +66,111 @@ ACE_Cleanup_Info::operator== (const ACE_Cleanup_Info &o) const
|
|||
}
|
||||
|
||||
bool
|
||||
ACE_Cleanup_Info::operator!= (const ACE_Cleanup_Info &o) const
|
||||
ACE_Cleanup_Info_Node::operator!= (const ACE_Cleanup_Info_Node &o) const
|
||||
{
|
||||
return !(*this == o);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
* @class ACE_Cleanup_Info_Node
|
||||
*
|
||||
* @brief For maintaining a list of ACE_Cleanup_Info items.
|
||||
*
|
||||
* For internal use by ACE_Object_Manager.
|
||||
*/
|
||||
class ACE_Cleanup_Info_Node
|
||||
{
|
||||
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 = 0;
|
||||
|
||||
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)
|
||||
void *param,
|
||||
const char* name)
|
||||
{
|
||||
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 = 0;
|
||||
|
||||
if ((new_node = registered_objects_->insert (new_info)) == 0)
|
||||
return -1;
|
||||
else
|
||||
{
|
||||
registered_objects_ = new_node;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
ACE_NEW_RETURN (new_node,
|
||||
ACE_Cleanup_Info_Node (object, cleanup_hook, param, name),
|
||||
-1);
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
registered_objects_.push_front (new_node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool
|
||||
ACE_OS_Exit_Info::find (void *object)
|
||||
{
|
||||
for (ACE_Cleanup_Info_Node *iter = registered_objects_.head ();
|
||||
iter != 0;
|
||||
iter = iter->next ())
|
||||
{
|
||||
if (iter->object () == object)
|
||||
{
|
||||
// The object has already been registered.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
ACE_OS_Exit_Info::remove (void *object)
|
||||
{
|
||||
ACE_Cleanup_Info_Node *node = 0;
|
||||
for (ACE_Cleanup_Info_Node *iter = registered_objects_.head ();
|
||||
iter != 0;
|
||||
iter = iter->next ())
|
||||
{
|
||||
if (iter->object () == object)
|
||||
{
|
||||
node = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (node)
|
||||
{
|
||||
registered_objects_.remove (node);
|
||||
delete node;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ACE_OS_Exit_Info::call_hooks (void)
|
||||
{
|
||||
// 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_)
|
||||
for (ACE_Cleanup_Info_Node *iter = registered_objects_.pop_front ();
|
||||
iter != 0;
|
||||
iter = registered_objects_.pop_front ())
|
||||
{
|
||||
ACE_Cleanup_Info &info = iter->cleanup_info_;
|
||||
if (info.cleanup_hook_ == reinterpret_cast<ACE_CLEANUP_FUNC> (
|
||||
if (iter->cleanup_hook () == reinterpret_cast<ACE_CLEANUP_FUNC> (
|
||||
ACE_CLEANUP_DESTROYER_NAME))
|
||||
// The object is an ACE_Cleanup.
|
||||
ACE_CLEANUP_DESTROYER_NAME (
|
||||
reinterpret_cast<ACE_Cleanup *> (info.object_),
|
||||
info.param_);
|
||||
else if (info.object_ == &ace_exit_hook_marker)
|
||||
// The hook is an ACE_EXIT_HOOK.
|
||||
(* reinterpret_cast<ACE_EXIT_HOOK> (info.cleanup_hook_)) ();
|
||||
{
|
||||
// The object is an ACE_Cleanup.
|
||||
ACE_CLEANUP_DESTROYER_NAME (
|
||||
reinterpret_cast<ACE_Cleanup *> (iter->object ()),
|
||||
iter->param ());
|
||||
}
|
||||
else if (iter->object () == &ace_exit_hook_marker)
|
||||
{
|
||||
// The hook is an ACE_EXIT_HOOK.
|
||||
(* reinterpret_cast<ACE_EXIT_HOOK> (iter->cleanup_hook ())) ();
|
||||
}
|
||||
else
|
||||
(*info.cleanup_hook_) (info.object_, info.param_);
|
||||
{
|
||||
(*iter->cleanup_hook ()) (iter->object (), iter->param ());
|
||||
}
|
||||
delete iter;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Cleanup.h
|
||||
*
|
||||
* $Id: Cleanup.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Cleanup.h 84163 2009-01-15 07:57:27Z johnnyw $
|
||||
*
|
||||
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
|
||||
* @author Jesper S. M|ller<stophph@diku.dk>
|
||||
|
|
@ -27,6 +27,9 @@
|
|||
|
||||
#include /**/ "ace/ACE_export.h"
|
||||
|
||||
# include "ace/Intrusive_List.h"
|
||||
# include "ace/Intrusive_List_Node.h"
|
||||
|
||||
#if (defined (ACE_HAS_VERSIONED_NAMESPACE) && ACE_HAS_VERSIONED_NAMESPACE == 1)
|
||||
# include "ace/Global_Macros.h"
|
||||
# define ACE_CLEANUP_DESTROYER_NAME ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _ace_cleanup_destroyer)
|
||||
|
|
@ -54,27 +57,39 @@ public:
|
|||
virtual void cleanup (void *param = 0);
|
||||
};
|
||||
|
||||
// Adapter for cleanup, used by ACE_Object_Manager.
|
||||
/// Adapter for cleanup, used by ACE_Object_Manager.
|
||||
extern "C" ACE_Export
|
||||
void ACE_CLEANUP_DESTROYER_NAME (ACE_Cleanup *, void *param = 0);
|
||||
|
||||
/**
|
||||
* @class ACE_Cleanup_Info
|
||||
* @class ACE_Cleanup_Info_Node
|
||||
*
|
||||
* @brief Hold cleanup information for thread/process
|
||||
* @brief For maintaining a list of ACE_Cleanup_Info items.
|
||||
*
|
||||
* For internal use by ACE_Object_Manager.
|
||||
*/
|
||||
class ACE_Export ACE_Cleanup_Info
|
||||
class ACE_Cleanup_Info_Node : public ACE_Intrusive_List_Node<ACE_Cleanup_Info_Node>
|
||||
{
|
||||
public:
|
||||
/// Default constructor.
|
||||
ACE_Cleanup_Info (void);
|
||||
ACE_Cleanup_Info_Node (void);
|
||||
ACE_Cleanup_Info_Node (void *object,
|
||||
ACE_CLEANUP_FUNC cleanup_hook,
|
||||
void *param,
|
||||
const char *name);
|
||||
~ACE_Cleanup_Info_Node (void);
|
||||
|
||||
/// Equality operator.
|
||||
bool operator== (const ACE_Cleanup_Info &o) const;
|
||||
bool operator== (const ACE_Cleanup_Info_Node &o) const;
|
||||
|
||||
/// Inequality operator.
|
||||
bool operator!= (const ACE_Cleanup_Info &o) const;
|
||||
bool operator!= (const ACE_Cleanup_Info_Node &o) const;
|
||||
|
||||
void* object(void);
|
||||
|
||||
ACE_CLEANUP_FUNC cleanup_hook (void);
|
||||
|
||||
void *param (void);
|
||||
private:
|
||||
/// Point to object that gets passed into the <cleanup_hook_>.
|
||||
void *object_;
|
||||
|
||||
|
|
@ -83,15 +98,20 @@ public:
|
|||
|
||||
/// Parameter passed to the <cleanup_hook_>.
|
||||
void *param_;
|
||||
|
||||
/// Name of the cleanup object
|
||||
const char *name_;
|
||||
};
|
||||
|
||||
class ACE_Cleanup_Info_Node;
|
||||
typedef ACE_Intrusive_List<ACE_Cleanup_Info_Node> ACE_Cleanup_Info_Node_List;
|
||||
|
||||
/**
|
||||
* @class ACE_OS_Exit_Info
|
||||
*
|
||||
* @brief Hold Object Manager cleanup (exit) information.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* For internal use by the ACE library, only.
|
||||
*/
|
||||
class ACE_Export ACE_OS_Exit_Info
|
||||
|
|
@ -104,11 +124,15 @@ public:
|
|||
~ACE_OS_Exit_Info (void);
|
||||
|
||||
/// Use to register a cleanup hook.
|
||||
int at_exit_i (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param);
|
||||
int at_exit_i (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param, const char* name = 0);
|
||||
|
||||
/// Look for a registered cleanup hook object. Returns 1 if already
|
||||
/// registered, 0 if not.
|
||||
int find (void *object);
|
||||
/// Look for a registered cleanup hook object. Returns true if already
|
||||
/// registered, false if not.
|
||||
bool find (void *object);
|
||||
|
||||
/// Remove a registered cleanup hook object. Returns true if removed
|
||||
/// false if not.
|
||||
bool remove (void *object);
|
||||
|
||||
/// Call all registered cleanup hooks, in reverse order of
|
||||
/// registration.
|
||||
|
|
@ -116,13 +140,12 @@ public:
|
|||
|
||||
private:
|
||||
/**
|
||||
* 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).
|
||||
* Keeps track of all registered objects.
|
||||
*/
|
||||
ACE_Cleanup_Info_Node *registered_objects_;
|
||||
ACE_Cleanup_Info_Node_List registered_objects_;
|
||||
};
|
||||
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
# if defined (ACE_HAS_INLINED_OSCALLS)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// $Id: Cleanup.inl 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Cleanup.inl 83956 2008-12-03 07:57:38Z johnnyw $
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
|
|
@ -9,4 +9,22 @@ ACE_Cleanup::ACE_Cleanup (void)
|
|||
{
|
||||
}
|
||||
|
||||
ACE_INLINE void*
|
||||
ACE_Cleanup_Info_Node::object(void)
|
||||
{
|
||||
return this->object_;
|
||||
}
|
||||
|
||||
ACE_INLINE ACE_CLEANUP_FUNC
|
||||
ACE_Cleanup_Info_Node::cleanup_hook (void)
|
||||
{
|
||||
return this->cleanup_hook_;
|
||||
}
|
||||
|
||||
ACE_INLINE void *
|
||||
ACE_Cleanup_Info_Node::param (void)
|
||||
{
|
||||
return this->param_;
|
||||
}
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
// $Id: Codecs.cpp 91368 2010-08-16 13:03:34Z mhengstmengel $
|
||||
|
||||
#include "ace/Codecs.h"
|
||||
#include "ace/Log_Msg.h"
|
||||
#include "ace/OS_Memory.h"
|
||||
#include "ace/OS_NS_ctype.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Codecs,
|
||||
"$Id: Codecs.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
namespace
|
||||
{
|
||||
// Just in case ...
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* @file Codeset_IBM1047.cpp
|
||||
*
|
||||
* $Id: Codeset_IBM1047.cpp 81661 2008-05-09 12:05:34Z johnnyw $
|
||||
* $Id: Codeset_IBM1047.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
*
|
||||
* Defines the arrays required to convert between ISO8859 (aka
|
||||
* Latin/1) and IBM1047 (aka EBCDIC).
|
||||
|
|
@ -18,10 +18,6 @@
|
|||
|
||||
#if defined (ACE_HAS_EBCDIC)
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Codeset_IBM1047,
|
||||
"$Id: Codeset_IBM1047.cpp 81661 2008-05-09 12:05:34Z johnnyw $")
|
||||
|
||||
#include "ace/OS_Memory.h"
|
||||
#include "ace/OS_NS_string.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @file Codeset_Registry.cpp
|
||||
*
|
||||
* $Id: Codeset_Registry.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Codeset_Registry.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
*
|
||||
* emulated codset regstry functions
|
||||
*
|
||||
|
|
@ -15,16 +15,12 @@
|
|||
#include "ace/OS_Memory.h"
|
||||
#include "ace/OS_NS_string.h"
|
||||
|
||||
// $Id: Codeset_Registry.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Codeset_Registry.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/Codeset_Registry.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Codeset_Registry,
|
||||
"$Id: Codeset_Registry.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
int
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* @file Condition_Recursive_Thread_Mutex.cpp
|
||||
*
|
||||
* $Id: Condition_Recursive_Thread_Mutex.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Condition_Recursive_Thread_Mutex.cpp 89127 2010-02-22 19:58:18Z schmidt $
|
||||
*
|
||||
* Originally in Synch.cpp
|
||||
*
|
||||
|
|
@ -63,7 +63,7 @@ ACE_Condition<ACE_Recursive_Thread_Mutex>::wait (ACE_Recursive_Thread_Mutex &mut
|
|||
const ACE_Time_Value *abstime)
|
||||
{
|
||||
ACE_recursive_mutex_state mutex_state_holder;
|
||||
ACE_recursive_thread_mutex_t &recursive_mutex = mutex.mutex ();
|
||||
ACE_recursive_thread_mutex_t &recursive_mutex = mutex.lock ();
|
||||
|
||||
if (ACE_OS::recursive_mutex_cond_unlock (&recursive_mutex,
|
||||
mutex_state_holder) == -1)
|
||||
|
|
@ -78,7 +78,7 @@ ACE_Condition<ACE_Recursive_Thread_Mutex>::wait (ACE_Recursive_Thread_Mutex &mut
|
|||
// returned with the lock held, but waiters primed and waiting to be
|
||||
// released. At cond_wait below, the mutex will be released.
|
||||
// On return, it will be reacquired.
|
||||
const int result = abstime == 0
|
||||
int const result = abstime == 0
|
||||
? ACE_OS::cond_wait (&this->cond_,
|
||||
&mutex.get_nesting_mutex ())
|
||||
: ACE_OS::cond_timedwait (&this->cond_,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Condition_Recursive_Thread_Mutex.h
|
||||
*
|
||||
* $Id: Condition_Recursive_Thread_Mutex.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Condition_Recursive_Thread_Mutex.h 86731 2009-09-17 12:23:48Z johnnyw $
|
||||
*
|
||||
* Moved from Synch.h.
|
||||
*
|
||||
|
|
@ -32,8 +32,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
|||
template <class ACE_LOCK> class ACE_Condition;
|
||||
|
||||
/**
|
||||
* @class ACE_Condition<ACE_Recursive_Thread_Mutex>
|
||||
*
|
||||
* @brief ACE_Condition template specialization written using
|
||||
* @a ACE_Recursive_Thread_Mutex. This allows threads to block until
|
||||
* shared data changes state using recursive mutexes.
|
||||
|
|
@ -57,7 +55,7 @@ public:
|
|||
|
||||
/**
|
||||
* Block on condition, or until absolute time-of-day has passed. If
|
||||
* abstime == 0 use "blocking" <wait> semantics. Else, if <abstime>
|
||||
* abstime == 0 use "blocking" <wait> semantics. Else, if @a abstime
|
||||
* != 0 and the call times out before the condition is signaled
|
||||
* <wait> returns -1 and sets errno to ETIME.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: Condition_T.cpp 81283 2008-04-09 01:28:18Z schmidt $
|
||||
// $Id: Condition_T.cpp 89127 2010-02-22 19:58:18Z schmidt $
|
||||
|
||||
#ifndef ACE_CONDITION_T_CPP
|
||||
#define ACE_CONDITION_T_CPP
|
||||
|
|
@ -87,7 +87,7 @@ ACE_Condition<MUTEX>::wait (void)
|
|||
{
|
||||
// ACE_TRACE ("ACE_Condition<MUTEX>::wait");
|
||||
return ACE_OS::cond_wait (&this->cond_,
|
||||
&this->mutex_.lock_);
|
||||
&this->mutex_.lock ());
|
||||
}
|
||||
|
||||
template <class MUTEX> int
|
||||
|
|
@ -96,12 +96,17 @@ ACE_Condition<MUTEX>::wait (MUTEX &mutex,
|
|||
{
|
||||
// ACE_TRACE ("ACE_Condition<MUTEX>::wait");
|
||||
if (abstime == 0)
|
||||
{
|
||||
return ACE_OS::cond_wait (&this->cond_,
|
||||
&mutex.lock_);
|
||||
&mutex.lock ());
|
||||
}
|
||||
else
|
||||
return ACE_OS::cond_timedwait (&this->cond_,
|
||||
&mutex.lock_,
|
||||
(ACE_Time_Value *) abstime);
|
||||
{
|
||||
ACE_Time_Value tv = *abstime;
|
||||
return ACE_OS::cond_timedwait (&this->cond_,
|
||||
&mutex.lock (),
|
||||
&tv);
|
||||
}
|
||||
}
|
||||
|
||||
// Peform an "alertable" timed wait. If the argument ABSTIME == 0
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @file Condition_Thread_Mutex.cpp
|
||||
*
|
||||
* $Id: Condition_Thread_Mutex.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Condition_Thread_Mutex.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
*
|
||||
* Originally in Synch.cpp
|
||||
*
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "ace/Log_Msg.h"
|
||||
|
||||
ACE_RCSID(ace, Condition_Thread_Mutex, "$Id: Condition_Thread_Mutex.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
// $Id: Configuration.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Configuration.cpp 86348 2009-08-04 14:45:29Z shuston $
|
||||
#include "ace/Configuration.h"
|
||||
#include "ace/Auto_Ptr.h"
|
||||
#include "ace/SString.h"
|
||||
#include "ace/OS_NS_string.h"
|
||||
#include "ace/OS_NS_strings.h"
|
||||
#include "ace/Tokenizer_T.h"
|
||||
|
||||
// Can remove this when import_config and export_config are removed from
|
||||
// ACE_Configuration. They're deprecated at ACE 5.2.
|
||||
|
|
@ -518,11 +519,7 @@ ACE_Configuration_Win32Registry::open_section (const ACE_Configuration_Section_K
|
|||
KEY_ALL_ACCESS,
|
||||
0,
|
||||
&result_key,
|
||||
#if defined (__MINGW32__)
|
||||
(PDWORD) 0
|
||||
#else
|
||||
0
|
||||
#endif /* __MINGW32__ */
|
||||
)) != ERROR_SUCCESS)
|
||||
{
|
||||
errno = errnum;
|
||||
|
|
@ -540,7 +537,7 @@ ACE_Configuration_Win32Registry::open_section (const ACE_Configuration_Section_K
|
|||
int
|
||||
ACE_Configuration_Win32Registry::remove_section (const ACE_Configuration_Section_Key& key,
|
||||
const ACE_TCHAR* sub_section,
|
||||
int recursive)
|
||||
bool recursive)
|
||||
{
|
||||
if (validate_name (sub_section))
|
||||
return -1;
|
||||
|
|
@ -574,13 +571,12 @@ ACE_Configuration_Win32Registry::remove_section (const ACE_Configuration_Section
|
|||
0,
|
||||
0) == ERROR_SUCCESS)
|
||||
{
|
||||
remove_section (section, name_buffer, 1);
|
||||
remove_section (section, name_buffer, true);
|
||||
buffer_size = ACE_DEFAULT_BUFSIZE;
|
||||
}
|
||||
}
|
||||
|
||||
int errnum;
|
||||
errnum = ACE_TEXT_RegDeleteKey (base_key, sub_section);
|
||||
int const errnum = ACE_TEXT_RegDeleteKey (base_key, sub_section);
|
||||
if (errnum != ERROR_SUCCESS)
|
||||
{
|
||||
errno = errnum;
|
||||
|
|
@ -1049,11 +1045,7 @@ ACE_Configuration_Win32Registry::resolve_key (HKEY hKey,
|
|||
KEY_ALL_ACCESS,
|
||||
0,
|
||||
&subkey,
|
||||
#if defined (__MINGW32__)
|
||||
(PDWORD) 0
|
||||
#else
|
||||
0
|
||||
#endif /* __MINGW32__ */
|
||||
)) !=ERROR_SUCCESS)
|
||||
{
|
||||
errno = errnum;
|
||||
|
|
@ -1267,6 +1259,12 @@ ACE_Configuration_Heap::~ACE_Configuration_Heap (void)
|
|||
int
|
||||
ACE_Configuration_Heap::open (size_t default_map_size)
|
||||
{
|
||||
if (this->allocator_ != 0)
|
||||
{
|
||||
errno = EBUSY;
|
||||
return -1;
|
||||
}
|
||||
|
||||
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
|
||||
|
|
@ -1283,6 +1281,12 @@ ACE_Configuration_Heap::open (const ACE_TCHAR* file_name,
|
|||
void* base_address,
|
||||
size_t default_map_size)
|
||||
{
|
||||
if (this->allocator_ != 0)
|
||||
{
|
||||
errno = EBUSY;
|
||||
return -1;
|
||||
}
|
||||
|
||||
default_map_size_ = default_map_size;
|
||||
|
||||
// Make sure that the file name is of the legal length.
|
||||
|
|
@ -1595,7 +1599,7 @@ ACE_Configuration_Heap::open_simple_section (const ACE_Configuration_Section_Key
|
|||
int
|
||||
ACE_Configuration_Heap::remove_section (const ACE_Configuration_Section_Key& key,
|
||||
const ACE_TCHAR* sub_section,
|
||||
int recursive)
|
||||
bool recursive)
|
||||
{
|
||||
ACE_ASSERT (this->allocator_);
|
||||
if (validate_name (sub_section))
|
||||
|
|
@ -1617,7 +1621,7 @@ ACE_Configuration_Heap::remove_section (const ACE_Configuration_Section_Key& key
|
|||
|
||||
section += sub_section;
|
||||
ACE_Configuration_ExtId SectionExtId (section.fast_rep ());
|
||||
SECTION_HASH::ENTRY* section_entry;
|
||||
SECTION_HASH::ENTRY* section_entry = 0;
|
||||
SECTION_HASH* hashmap = index_;
|
||||
if (hashmap->find (SectionExtId, section_entry))
|
||||
return -1;
|
||||
|
|
@ -1632,7 +1636,7 @@ ACE_Configuration_Heap::remove_section (const ACE_Configuration_Section_Key& key
|
|||
ACE_TString name;
|
||||
while (!enumerate_sections (section, index, name))
|
||||
{
|
||||
if (remove_section (section, name.fast_rep (), 1))
|
||||
if (remove_section (section, name.fast_rep (), true))
|
||||
return -1;
|
||||
|
||||
++index;
|
||||
|
|
@ -1801,7 +1805,7 @@ ACE_Configuration_Heap::set_string_value (const ACE_Configuration_Section_Key& k
|
|||
return -1;
|
||||
|
||||
// Get the entry for this item (if it exists)
|
||||
VALUE_HASH::ENTRY* entry;
|
||||
VALUE_HASH::ENTRY* entry = 0;
|
||||
ACE_Configuration_ExtId item_name (t_name);
|
||||
if (section_int.value_hash_map_->VALUE_HASH::find (item_name, entry) == 0)
|
||||
{
|
||||
|
|
@ -1860,7 +1864,7 @@ ACE_Configuration_Heap::set_integer_value (const ACE_Configuration_Section_Key&
|
|||
return -1; // section does not exist
|
||||
|
||||
// Get the entry for this item (if it exists)
|
||||
VALUE_HASH::ENTRY* entry;
|
||||
VALUE_HASH::ENTRY* entry = 0;
|
||||
ACE_Configuration_ExtId item_name (t_name);
|
||||
if (section_int.value_hash_map_->VALUE_HASH::find (item_name, entry) == 0)
|
||||
{
|
||||
|
|
@ -1910,7 +1914,7 @@ ACE_Configuration_Heap::set_binary_value (const ACE_Configuration_Section_Key& k
|
|||
return -1; // section does not exist
|
||||
|
||||
// Get the entry for this item (if it exists)
|
||||
VALUE_HASH::ENTRY* entry;
|
||||
VALUE_HASH::ENTRY* entry = 0;
|
||||
ACE_Configuration_ExtId item_name (t_name);
|
||||
if (section_int.value_hash_map_->VALUE_HASH::find (item_name, entry) == 0)
|
||||
{
|
||||
|
|
@ -2100,7 +2104,7 @@ ACE_Configuration_Heap::find_value (const ACE_Configuration_Section_Key& key,
|
|||
|
||||
// Find it
|
||||
ACE_Configuration_ExtId ValueExtId (t_name);
|
||||
VALUE_HASH::ENTRY* value_entry;
|
||||
VALUE_HASH::ENTRY* value_entry = 0;
|
||||
if (((VALUE_HASH *) IntId.value_hash_map_)->find (ValueExtId, value_entry))
|
||||
return -1; // value does not exist
|
||||
|
||||
|
|
@ -2130,7 +2134,7 @@ ACE_Configuration_Heap::remove_value (const ACE_Configuration_Section_Key& key,
|
|||
|
||||
// Find it
|
||||
ACE_Configuration_ExtId ValueExtId (t_name);
|
||||
VALUE_HASH::ENTRY* value_entry;
|
||||
VALUE_HASH::ENTRY* value_entry = 0;
|
||||
if (((VALUE_HASH *) IntId.value_hash_map_)->find (ValueExtId, value_entry))
|
||||
return -1;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Configuration.h
|
||||
*
|
||||
* $Id: Configuration.h 82294 2008-07-12 13:03:37Z johnnyw $
|
||||
* $Id: Configuration.h 86348 2009-08-04 14:45:29Z shuston $
|
||||
*
|
||||
* @author Chris Hafey <chafey@stentor.com>
|
||||
*
|
||||
|
|
@ -177,7 +177,7 @@ public:
|
|||
/**
|
||||
* @param key Section key to remove the named section from.
|
||||
* @param sub_section Name of the section to remove.
|
||||
* @param recursive If non zero, any subkeys below @a sub_section are
|
||||
* @param recursive If true, any subkeys below @a sub_section are
|
||||
* removed as well.
|
||||
*
|
||||
* @retval 0 for success.
|
||||
|
|
@ -185,7 +185,7 @@ public:
|
|||
*/
|
||||
virtual int remove_section (const ACE_Configuration_Section_Key &key,
|
||||
const ACE_TCHAR *sub_section,
|
||||
int recursive) = 0;
|
||||
bool recursive) = 0;
|
||||
|
||||
/**
|
||||
* Enumerates through the values in a section.
|
||||
|
|
@ -483,7 +483,7 @@ public:
|
|||
|
||||
virtual int remove_section (const ACE_Configuration_Section_Key& key,
|
||||
const ACE_TCHAR* sub_section,
|
||||
int recursive);
|
||||
bool recursive);
|
||||
|
||||
virtual int enumerate_values (const ACE_Configuration_Section_Key& key,
|
||||
int index,
|
||||
|
|
@ -598,7 +598,7 @@ public:
|
|||
/// allocator name_ was created in
|
||||
void free (ACE_Allocator *alloc);
|
||||
|
||||
/// <hash> function is required in order for this class to be usable by
|
||||
/// hash function is required in order for this class to be usable by
|
||||
/// ACE_Hash_Map_Manager.
|
||||
u_long hash (void) const;
|
||||
|
||||
|
|
@ -791,12 +791,37 @@ public:
|
|||
/// Destructor
|
||||
virtual ~ACE_Configuration_Heap (void);
|
||||
|
||||
/// Opens a configuration based on a file name
|
||||
/**
|
||||
* Opens a configuration that allocates its memory from a memory-mapped file.
|
||||
* This makes it possible to persist a configuration to permanent storage.
|
||||
* This is not the same as exporting the configuration to a file; the
|
||||
* memory-mapped file is not likely to be very readable by humans.
|
||||
*
|
||||
* @param file_name Name of the file to map into memory.
|
||||
*
|
||||
* @param base_address Address to map the base of @a file_name to.
|
||||
*
|
||||
* @param default_map_size Starting size for the internal hash tables that
|
||||
* contain configuration information.
|
||||
*
|
||||
* @retval 0 for success.
|
||||
* @retval -1 for error, with errno set to indicate the cause. If open()
|
||||
* is called multiple times, errno will be @c EBUSY.
|
||||
*/
|
||||
int open (const ACE_TCHAR* file_name,
|
||||
void* base_address = ACE_DEFAULT_BASE_ADDR,
|
||||
size_t default_map_size = ACE_DEFAULT_CONFIG_SECTION_SIZE);
|
||||
|
||||
/// Opens a heap based configuration
|
||||
/**
|
||||
* Opens a configuration that allocates memory from the heap.
|
||||
*
|
||||
* @param default_map_size Starting size for the internal hash tables that
|
||||
* contain configuration information.
|
||||
*
|
||||
* @retval 0 for success.
|
||||
* @retval -1 for error, with errno set to indicate the cause. If open()
|
||||
* is called multiple times, errno will be @c EBUSY.
|
||||
*/
|
||||
int open (size_t default_map_size = ACE_DEFAULT_CONFIG_SECTION_SIZE);
|
||||
|
||||
virtual int open_section (const ACE_Configuration_Section_Key& base,
|
||||
|
|
@ -805,7 +830,7 @@ public:
|
|||
|
||||
virtual int remove_section (const ACE_Configuration_Section_Key& key,
|
||||
const ACE_TCHAR* sub_section,
|
||||
int recursive);
|
||||
bool recursive);
|
||||
|
||||
virtual int enumerate_values (const ACE_Configuration_Section_Key& key,
|
||||
int index,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: Configuration_Import_Export.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Configuration_Import_Export.cpp 84565 2009-02-23 08:20:39Z johnnyw $
|
||||
|
||||
#include "ace/Configuration_Import_Export.h"
|
||||
#include "ace/OS_Errno.h"
|
||||
|
|
@ -254,7 +254,7 @@ ACE_Registry_ImpExp::export_section (const ACE_Configuration_Section_Key& sectio
|
|||
ACE_TString header = ACE_TEXT ("[");
|
||||
header += path;
|
||||
header += ACE_TEXT ("]");
|
||||
header += ACE_TEXT (" \n");
|
||||
header += ACE_TEXT ("\n");
|
||||
if (ACE_OS::fputs (header.fast_rep (), out) < 0)
|
||||
return -1;
|
||||
// Write out each value
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
// $Id: Connection_Recycling_Strategy.cpp 91287 2010-08-05 10:30:49Z johnnyw $
|
||||
|
||||
#include "ace/Connection_Recycling_Strategy.h"
|
||||
|
||||
|
||||
ACE_RCSID(ace, Connection_Recycling_Strategy, "$Id: Connection_Recycling_Strategy.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_Connection_Recycling_Strategy::~ACE_Connection_Recycling_Strategy (void)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// $Id: Connector.cpp 81991 2008-06-16 19:05:40Z elliott_c $
|
||||
// $Id: Connector.cpp 91527 2010-08-27 15:03:31Z shuston $
|
||||
|
||||
#ifndef ACE_CONNECTOR_CPP
|
||||
#define ACE_CONNECTOR_CPP
|
||||
|
|
@ -24,12 +24,33 @@ ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::ACE_NonBlocking_Connect_Handler
|
|||
long id)
|
||||
: connector_ (connector)
|
||||
, svc_handler_ (sh)
|
||||
, cleanup_svc_handler_ (0)
|
||||
, timer_id_ (id)
|
||||
{
|
||||
ACE_TRACE ("ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::ACE_NonBlocking_Connect_Handler");
|
||||
|
||||
this->reference_counting_policy ().value
|
||||
(ACE_Event_Handler::Reference_Counting_Policy::ENABLED);
|
||||
|
||||
if (this->svc_handler_ != 0 &&
|
||||
this->svc_handler_->reference_counting_policy ().value () ==
|
||||
ACE_Event_Handler::Reference_Counting_Policy::ENABLED)
|
||||
{
|
||||
// If SVC_HANDLER is reference counted then NBCH holds a reference
|
||||
// in cleanup_svc_handle_ which is both a pointer to SVC_HANDLER
|
||||
// and a flag that triggers remove_reference in NBCH destructor.
|
||||
this->cleanup_svc_handler_ = sh;
|
||||
this->cleanup_svc_handler_->add_reference ();
|
||||
}
|
||||
}
|
||||
|
||||
template <class SVC_HANDLER>
|
||||
ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::~ACE_NonBlocking_Connect_Handler (void)
|
||||
{
|
||||
if (this->cleanup_svc_handler_)
|
||||
{
|
||||
this->cleanup_svc_handler_->remove_reference ();
|
||||
}
|
||||
}
|
||||
|
||||
template <class SVC_HANDLER> SVC_HANDLER *
|
||||
|
|
@ -100,9 +121,9 @@ ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::close (SVC_HANDLER *&sh)
|
|||
return false;
|
||||
|
||||
// Remove from Reactor.
|
||||
if (this->reactor ()->remove_handler (
|
||||
if (-1 == this->reactor ()->remove_handler (
|
||||
h,
|
||||
ACE_Event_Handler::ALL_EVENTS_MASK) == -1)
|
||||
ACE_Event_Handler::ALL_EVENTS_MASK | ACE_Event_Handler::DONT_CALL))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +140,7 @@ ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::handle_timeout
|
|||
ACE_TRACE ("ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::handle_timeout");
|
||||
|
||||
SVC_HANDLER *svc_handler = 0;
|
||||
int retval = this->close (svc_handler) ? 0 : -1;
|
||||
int const retval = this->close (svc_handler) ? 0 : -1;
|
||||
|
||||
// Forward to the SVC_HANDLER the <arg> that was passed in as a
|
||||
// magic cookie during ACE_Connector::connect(). This gives the
|
||||
|
|
@ -145,11 +166,27 @@ ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::handle_input (ACE_HANDLE)
|
|||
|
||||
// Close Svc_Handler.
|
||||
if (svc_handler != 0)
|
||||
svc_handler->close (NORMAL_CLOSE_OPERATION);
|
||||
{
|
||||
svc_handler->close (NORMAL_CLOSE_OPERATION);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
template <class SVC_HANDLER> int
|
||||
ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::handle_close (ACE_HANDLE handle,
|
||||
ACE_Reactor_Mask m)
|
||||
{
|
||||
// epoll on Linux will, at least sometimes, return EPOLLERR when a connect
|
||||
// fails, triggering a total removal from the reactor. This is different from
|
||||
// select()-based systems which select the fd for read on a connect failure.
|
||||
// So just call handle_input() to rejoin common handling for a failed
|
||||
// connect.
|
||||
if (m == ACE_Event_Handler::ALL_EVENTS_MASK)
|
||||
return this->handle_input (handle);
|
||||
return -1;
|
||||
}
|
||||
|
||||
template <class SVC_HANDLER> int
|
||||
ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::handle_output (ACE_HANDLE handle)
|
||||
{
|
||||
|
|
@ -162,7 +199,9 @@ ACE_NonBlocking_Connect_Handler<SVC_HANDLER>::handle_output (ACE_HANDLE handle)
|
|||
int const retval = this->close (svc_handler) ? 0 : -1;
|
||||
|
||||
if (svc_handler != 0)
|
||||
connector.initialize_svc_handler (handle, svc_handler);
|
||||
{
|
||||
connector.initialize_svc_handler (handle, svc_handler);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
@ -593,7 +632,7 @@ ACE_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::initialize_svc_handler
|
|||
{
|
||||
// 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 =
|
||||
bool reset_new_handle =
|
||||
this->reactor ()->uses_event_associations ();
|
||||
|
||||
if (reset_new_handle)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Connector.h
|
||||
*
|
||||
* $Id: Connector.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Connector.h 91527 2010-08-27 15:03:31Z shuston $
|
||||
*
|
||||
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
|
||||
*/
|
||||
|
|
@ -67,6 +67,9 @@ public:
|
|||
SVC_HANDLER *,
|
||||
long timer_id);
|
||||
|
||||
/// Destructor.
|
||||
~ACE_NonBlocking_Connect_Handler (void);
|
||||
|
||||
/// Close up and return underlying SVC_HANDLER through @c sh.
|
||||
/**
|
||||
* If the return value is true the close was performed succesfully,
|
||||
|
|
@ -99,6 +102,9 @@ public:
|
|||
/// Called by ACE_Reactor when asynchronous connections fail.
|
||||
virtual int handle_input (ACE_HANDLE);
|
||||
|
||||
/// Called by ACE_Dev_Poll_Reactor when asynchronous connections fail.
|
||||
virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask);
|
||||
|
||||
/// Called by ACE_Reactor when asynchronous connections succeed.
|
||||
virtual int handle_output (ACE_HANDLE);
|
||||
|
||||
|
|
@ -127,6 +133,9 @@ private:
|
|||
/// Associated SVC_HANDLER.
|
||||
SVC_HANDLER *svc_handler_;
|
||||
|
||||
/// Same as svc_handler_ if svc_handler_ is reference counted.
|
||||
SVC_HANDLER *cleanup_svc_handler_;
|
||||
|
||||
/// Associated timer id.
|
||||
long timer_id_;
|
||||
};
|
||||
|
|
@ -190,7 +199,7 @@ public:
|
|||
* 1). @a flags and @a 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
|
||||
* the <close> hook on the @a svc_handler will be called
|
||||
* automatically to prevent resource leaks.
|
||||
*/
|
||||
virtual int connect (SVC_HANDLER *&svc_handler,
|
||||
|
|
@ -209,7 +218,7 @@ public:
|
|||
* 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 @a svc_handler. If the connection fails the
|
||||
* <close> hook on the <svc_handler> will be called automatically to
|
||||
* <close> hook on the @a svc_handler will be called automatically to
|
||||
* prevent resource leaks.
|
||||
*/
|
||||
virtual int connect (SVC_HANDLER *&svc_handler_hint,
|
||||
|
|
@ -418,7 +427,7 @@ public:
|
|||
SUPER;
|
||||
|
||||
/**
|
||||
* Initialize a connector. @a flags indicates how <SVC_HANDLER>'s
|
||||
* Initialize a connector. @a 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.
|
||||
|
|
@ -529,21 +538,21 @@ protected:
|
|||
/// Creation strategy for an Connector.
|
||||
CREATION_STRATEGY *creation_strategy_;
|
||||
|
||||
/// true if Connector created the creation strategy and thus should
|
||||
/// True if Connector created the creation strategy and thus should
|
||||
/// delete it, else false.
|
||||
bool delete_creation_strategy_;
|
||||
|
||||
/// Connect strategy for a Connector.
|
||||
CONNECT_STRATEGY *connect_strategy_;
|
||||
|
||||
/// true if Connector created the connect strategy and thus should
|
||||
/// True if Connector created the connect strategy and thus should
|
||||
/// delete it, else false.
|
||||
bool delete_connect_strategy_;
|
||||
|
||||
/// Concurrency strategy for an <Connector>.
|
||||
/// Concurrency strategy for a Connector.
|
||||
CONCURRENCY_STRATEGY *concurrency_strategy_;
|
||||
|
||||
/// true if Connector created the concurrency strategy and thus should
|
||||
/// True if Connector created the concurrency strategy and thus should
|
||||
/// delete it, else false.
|
||||
bool delete_concurrency_strategy_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
// $Id: Containers.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
// $Id: Containers.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/Containers.h"
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Containers,
|
||||
"$Id: Containers.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/Containers.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file Containers_T.h
|
||||
*
|
||||
* $Id: Containers_T.h 82588 2008-08-11 13:37:41Z johnnyw $
|
||||
* $Id: Containers_T.h 88975 2010-02-12 19:19:38Z johnnyw $
|
||||
*
|
||||
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
|
||||
*/
|
||||
|
|
@ -1993,13 +1993,8 @@ class ACE_Array : public ACE_Array_Base<T>
|
|||
public:
|
||||
// Define a "trait"
|
||||
typedef T TYPE;
|
||||
|
||||
typedef ACE_Array_Iterator<T> ITERATOR;
|
||||
|
||||
// = Exceptions.
|
||||
|
||||
// = Initialization and termination methods.
|
||||
|
||||
|
||||
/// Dynamically create an uninitialized array.
|
||||
/**
|
||||
* Initialize an empty array of the specified size using the provided
|
||||
|
|
|
|||
|
|
@ -1,19 +1,13 @@
|
|||
/**
|
||||
* @file Copy_Disabled.cpp
|
||||
*
|
||||
* $Id: Copy_Disabled.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Copy_Disabled.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
*
|
||||
* @author Carlos O'Ryan <coryan@uci.edu>
|
||||
*/
|
||||
|
||||
#include "ace/Copy_Disabled.h"
|
||||
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Copy_Disabled,
|
||||
"$Id: Copy_Disabled.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_Copy_Disabled::ACE_Copy_Disabled (void)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue