diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-08-21 18:19:05 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-08-21 18:19:05 +0000 |
commit | a45af3cb0e1168022300e760c51efc4484cf39f7 (patch) | |
tree | a95fb857ec1b4457081ff1b6f72641c4656e1bb2 /ace | |
parent | 51eb19838f6c0d35820dde2c0629c322a9e668f9 (diff) | |
download | ATCD-a45af3cb0e1168022300e760c51efc4484cf39f7.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r-- | ace/OS.h | 65 | ||||
-rw-r--r-- | ace/Profile_Timer.h | 66 | ||||
-rw-r--r-- | ace/README | 2 | ||||
-rw-r--r-- | ace/Synch_Options.h | 2 | ||||
-rw-r--r-- | ace/Thread_Manager.h | 1 | ||||
-rw-r--r-- | ace/UPIPE_Addr.h | 15 |
6 files changed, 72 insertions, 79 deletions
@@ -9,11 +9,6 @@ // = FILENAME // OS.h // -// = DESCRIPTION -// This file and its associated OS.i and OS.cpp files are the primary -// point of portability for ACE. Once you get this file ported to a -// new platform, then pretty much everything else comes for "free." -// // = AUTHOR // Doug Schmidt <schmidt@cs.wustl.edu>, Jesper S. M|ller // <stophph@diku.dk>, and a cast of thousands... @@ -27,6 +22,12 @@ // configuration file (e.g., config-sunos5-sunc++-4.x.h). # include "ace/inc_user_config.h" +#if defined (ACE_LACKS_FLOATING_POINT) +typedef ACE_UINT32 ACE_timer_t; +#else +typedef double ACE_timer_t; +#endif /* ACE_LACKS_FLOATING_POINT */ + # if defined (ACE_HAS_MOSTLY_UNICODE_APIS) && !defined (UNICODE) # error UNICODE must be defined when using ACE_HAS_MOSTLY_UNICODE_APIS, check your compiler document on how to enable UNICODE. # endif /* ACE_HAS_MOSTLY_UNICODE_APIS && !UNICODE */ @@ -1008,13 +1009,12 @@ class ACE_Export ACE_Time_Value // Operations on "timeval" structures. // // = DESCRIPTION - // This class centralizes all the time-related processing in - // ACE. These timers are typically used in conjunction with - // lower-level OS mechanisms like <select>, <poll>, or - // <cond_timedwait>. ACE_Time_Value help make the use of these - // mechanisms portable across OS platforms, + // This class centralizes all the time related processing in + // ACE. These timers are typically used in conjunction with OS + // mechanisms like <select>, <poll>, or <cond_timedwait>. + // <ACE_Time_Value> makes the use of these mechanisms portable + // across OS platforms, public: - // = Useful constants. static const ACE_Time_Value zero; @@ -4078,43 +4078,50 @@ private: // destructor and has no friends. }; +#if defined (ACE_HAS_PRUSAGE_T) + typedef prusage_t ACE_Rusage; +#elif defined (ACE_HAS_GETRUSAGE) + typedef rusage ACE_Rusage; +#endif /* ACE_HAS_PRUSAGE_T */ + class ACE_Export ACE_OS { // = TITLE - // This class defines an operating system independent - // programming API that shields developers from non-portable - // aspects of writing efficient system programs on Win32, POSIX, - // and other versions of UNIX. If you are porting ACE to a new - // platform, this is the place to focus your attention. Please - // see the README file in this directory for complete - // information on the meaning of the various macros. + // This class defines an OS independent programming API that + // shields developers from nonportable aspects of writing + // efficient system programs on Win32, POSIX and other versions + // of UNIX, and various real-time operating systems. // // = DESCRIPTION - // This class encapsulates all the differences between various - // versions of UNIX and WIN32! The other components in - // ACE are programmed to use only the methods in this class, - // which makes it *much* easier to move ACE to a new platform. - // The methods in this class also automatically restart when - // interrupts occur during system calls (assuming that the - // <ACE_Log_Msg::restart> flag is enabled). + // This class encapsulates the differences between various OS + // platforms. When porting ACE to a new platform, this class is + // the place to focus on. Once this file is ported to a new + // platform, pretty much everything else comes for "free." See + // <www.cs.wustl.edu/~schmidt/ACE_wrappers/etc/ACE-porting.html> + // for instructions on porting ACE. Please see the README file + // in this directory for complete information on the meaning of + // the various macros. ACE_CLASS_IS_NAMESPACE (ACE_OS); - public: +# if defined (CHORUS) + // We must format this code as follows to avoid confusing OSE. enum ACE_HRTimer_Op { -# if defined (CHORUS) ACE_HRTIMER_START = K_BSTART, ACE_HRTIMER_INCR = K_BPOINT, ACE_HRTIMER_STOP = K_BSTOP, ACE_HRTIMER_GETTIME = 0xFFFF + }; # else /* ! CHORUS */ + enum ACE_HRTimer_Op + { ACE_HRTIMER_START = 0x0, // Only use these if you can stand ACE_HRTIMER_INCR = 0x1, // for interrupts to be disabled during ACE_HRTIMER_STOP = 0x2, // the timed interval!!!! ACE_HRTIMER_GETTIME = 0xFFFF -# endif /* ! CHORUS */ }; +# endif /* ! CHORUS */ class ace_flock_t { @@ -4137,8 +4144,8 @@ public: // Handle to the underlying file. }; - // = Default Win32 Security Attributes definition. #if defined (ACE_WIN32) + // = Default Win32 Security Attributes definition. static LPSECURITY_ATTRIBUTES default_win32_security_attributes (LPSECURITY_ATTRIBUTES); #endif /* ACE_WIN32 */ diff --git a/ace/Profile_Timer.h b/ace/Profile_Timer.h index 3886a6107a2..7afefd9e895 100644 --- a/ace/Profile_Timer.h +++ b/ace/Profile_Timer.h @@ -21,25 +21,29 @@ #include "ace/Time_Value.h" #include "ace/High_Res_Timer.h" -#if defined (ACE_HAS_PRUSAGE_T) || defined (ACE_HAS_GETRUSAGE) - class ACE_Export ACE_Profile_Timer { // = TITLE // This class provides both a timing mechanism and a mechanism // for reporting the resource usage of a process. public: - struct ACE_Elapsed_Time - { - double real_time; - double user_time; - double system_time; - }; -#if defined (ACE_HAS_PRUSAGE_T) - typedef prusage_t Rusage; -#elif defined (ACE_HAS_GETRUSAGE) - typedef rusage Rusage; -#endif /* ACE_HAS_PRUSAGE_T */ + + class ACE_Elapsed_Time + { + // = TITLE + // Keeps track of the various user, system, and elapsed (real) + // times. + // + // = DESCRIPTION + // If <ACE_HAS_FLOATING_POINT> is enabled these values are in + // microseconds, otherwise, they are in seconds. + public: + ACE_timer_t real_time; + ACE_timer_t user_time; + ACE_timer_t system_time; + }; + + typedef ACE_Rusage Rusage; // = Initialization and termination methods. ACE_Profile_Timer (void); @@ -112,43 +116,11 @@ private: ACE_Time_Value last_time_; // Keep track of the last time for incremental timing. - -#endif /* ACE_HAS_PRUSAGE_T */ -}; - -#else /* ! ACE_HAS_PRUSAGE_T && ! ACE_HAS_GETRUSAGE */ - -class ACE_Export ACE_Profile_Timer -{ -public: - struct ACE_Elapsed_Time - { -#if defined (ACE_LACKS_FLOATING_POINT) - ACE_UINT32 real_time; // units of microseconds! - ACE_UINT32 user_time; - ACE_UINT32 system_time; -#else /* ! ACE_LACKS_FLOATING_POINT */ - double real_time; // units of seconds - double user_time; - double system_time; -#endif /* ! ACE_LACKS_FLOATING_POINT */ - }; - - ACE_Profile_Timer (void); - ~ACE_Profile_Timer (void); - int start (void); - int stop (void); - int elapsed_time (ACE_Elapsed_Time &et); - - void dump (void) const; - // Dump the state of an object. - -private: +#else ACE_High_Res_Timer timer_; +#endif /* ACE_HAS_PRUSAGE_T */ }; -#endif /* ! ACE_HAS_PRUSAGE_T && ! ACE_HAS_GETRUSAGE */ - #if defined (__ACE_INLINE__) # include "ace/Profile_Timer.i" #endif /* __ACE_INLINE__ */ diff --git a/ace/README b/ace/README index dbd7fab354e..bf7135c541b 100644 --- a/ace/README +++ b/ace/README @@ -247,7 +247,7 @@ ACE_LACKS_CONDATTR_PSHARED Platform has no implementation of pthrea ACE_LACKS_DIFFTIME Platform lacks difftime() implementation ACE_LACKS_EXEC Platform lacks the exec() family of system calls (e.g., Win32, VxWorks, Chorus) ACE_LACKS_FILELOCKS Platform lacks file locking mechanism -ACE_LACKS_FLOATING_POINT Platform does not support floating point operations +ACE_LACKS_FLOATING_POINT Platform does not support floating point operations (e.g., certain Chorus hardware platforms) ACE_LACKS_FORK Platform lacks the fork() system call (e.g., Win32, VxWorks, Chorus) ACE_LACKS_GETOPT_PROTO Platform lacks the getopt() prototype (e.g., LynxOS) ACE_LACKS_GETPGID Platform lacks getpgid() call (e.g., Win32, Chorus, and FreeBSD). diff --git a/ace/Synch_Options.h b/ace/Synch_Options.h index cd65556921e..d4e9693a488 100644 --- a/ace/Synch_Options.h +++ b/ace/Synch_Options.h @@ -25,7 +25,7 @@ class ACE_Export ACE_Synch_Options // Contains the values of options used to determine the // synchronous and asynchronous behavior. // - // DESCRIPTION = + // = DESCRIPTION // Values support the following behavior (TV == "timeout" // and UR == "use ACE_Reactor"): // diff --git a/ace/Thread_Manager.h b/ace/Thread_Manager.h index 4e95e4871b1..893d47130af 100644 --- a/ace/Thread_Manager.h +++ b/ace/Thread_Manager.h @@ -54,7 +54,6 @@ // this is a big number #endif /* ACE_DEFAULT_THREAD_MANAGER_HWM */ - // This is the synchronization mechanism used to prevent a thread // descriptor gets removed from the Thread_Manager before it gets // stash into it. If you want to disable this feature (and risk of diff --git a/ace/UPIPE_Addr.h b/ace/UPIPE_Addr.h index 6f86a99547f..1eadd334b93 100644 --- a/ace/UPIPE_Addr.h +++ b/ace/UPIPE_Addr.h @@ -22,4 +22,19 @@ typedef ACE_SPIPE_Addr ACE_UPIPE_Addr; +#if 0 +// We need this "class" to make the class2man documentation utility +// happy. +class ACE_Export ACE_UPIPE_Addr +{ + // = TITLE + // Defines the ACE "user pipe" address family address format. + // + // = DESCRIPTION + // This class has an identical interface to the <ACE_SPIPE_Addr> + // class. In fact, it's simply a typedef! +public: + // = Same interface as <ACE_SPIPE_Addr>. +}; +#endif /* 0 */ #endif /* ACE_UPIPE_ADDR_H */ |