diff options
author | jwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-19 04:33:06 +0000 |
---|---|---|
committer | jwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-19 04:33:06 +0000 |
commit | 490e3b7bde827dbd2d2e58c6079a6ba16c6ee01b (patch) | |
tree | 872ccd5802f75e99e5343fb54ded522e16037638 /ace | |
parent | 8ff33e5c23740d3f6a29ff86f53e2afed43661be (diff) | |
download | ATCD-490e3b7bde827dbd2d2e58c6079a6ba16c6ee01b.tar.gz |
Tue Jul 18 23:30:59 2000 John Heitmann <jwh1@cs.wustl.edu>
Diffstat (limited to 'ace')
-rw-r--r-- | ace/ACE.cpp | 19 | ||||
-rw-r--r-- | ace/OS.h | 5 | ||||
-rw-r--r-- | ace/OS_Memory.h | 59 |
3 files changed, 58 insertions, 25 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp index 17f0ff7c134..e77503d8821 100644 --- a/ace/ACE.cpp +++ b/ace/ACE.cpp @@ -158,7 +158,9 @@ ACE::compiler_beta_version (void) int ACE::terminate_process (pid_t pid) { -#if defined (ACE_HAS_PHARLAP) +#if defined (ACE_HAS_PACE) + return pace_kill (pid, 9); +#elif defined (ACE_HAS_PHARLAP) ACE_UNUSED_ARG (pid); ACE_NOTSUP_RETURN (-1); #elif defined (ACE_WIN32) @@ -194,13 +196,22 @@ ACE::terminate_process (pid_t pid) return -1; #else return ACE_OS::kill (pid, 9); -#endif /* ACE_WIN32 */ +#endif /* ACE_HAS_PACE */ } int ACE::process_active (pid_t pid) { -#if !defined(ACE_WIN32) +#if defined (ACE_HAS_PACE) + int retval = pace_kill (pid, 0); + + if (retval == 0) + return 1; + else if (errno == ESRCH) + return 0; + else + return -1; +#elif !defined(ACE_WIN32) int retval = ACE_OS::kill (pid, 0); if (retval == 0) @@ -226,7 +237,7 @@ ACE::process_active (pid_t pid) else return 1; } -#endif /* ACE_WIN32 */ +#endif /* ACE_HAS_PACE */ } // Split a string up into 'token'-delimited pieces, ala Perl's @@ -4005,11 +4005,6 @@ struct sigaction # endif # endif /* SIG_DFL */ -# if defined (ACE_HAS_PACE) && PACE_LYNXOS -# undef SIG_IGN -# define SIG_IGN ((pace_sig_pf) 1) -# endif /* (ACE_HAS_PACE) && PACE_LYNXOS */ - # if !defined (SIG_IGN) # if defined (ACE_PSOS_DIAB_MIPS) || defined (ACE_PSOS_DIAB_PPC) # define SIG_IGN ((void *) 1) /* ignore signal */ diff --git a/ace/OS_Memory.h b/ace/OS_Memory.h index d8165755388..1b115230dcc 100644 --- a/ace/OS_Memory.h +++ b/ace/OS_Memory.h @@ -27,7 +27,12 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/OS_Export.h" -#include /**/ <stddef.h> +#if defined (ACE_HAS_PACE) +# include "pace/stddef.h" +# include "pace/stdlib.h" +#else +# include /**/ <stddef.h> +#endif /* ACE_HAS_PACE */ # if !defined (ACE_MALLOC_ALIGN) # define ACE_MALLOC_ALIGN ((int) sizeof (long)) @@ -53,25 +58,47 @@ // too, so that you guarantee that strdup() calls your desired mallocator // and not the system mallocator. // -# if !defined (ACE_MALLOC_FUNC) -# define ACE_MALLOC_FUNC ::malloc -# endif -# if !defined (ACE_CALLOC_FUNC) -# define ACE_CALLOC_FUNC ::calloc -# endif -# if !defined (ACE_FREE_FUNC) -# define ACE_FREE_FUNC ::free -# endif -# if !defined (ACE_REALLOC_FUNC) -# define ACE_REALLOC_FUNC ::realloc -# endif +# if defined (ACE_HAS_PACE) +# if !defined (ACE_MALLOC_FUNC) +# define ACE_MALLOC_FUNC pace_malloc +# endif +# if !defined (ACE_CALLOC_FUNC) +# define ACE_CALLOC_FUNC pace_calloc +# endif +# if !defined (ACE_FREE_FUNC) +# define ACE_FREE_FUNC pace_free +# endif +# if !defined (ACE_REALLOC_FUNC) +# define ACE_REALLOC_FUNC pace_realloc +# endif -# if defined (ACE_HAS_OLD_MALLOC) +# if defined (ACE_HAS_OLD_MALLOC) typedef char *ACE_MALLOC_T; -# else +# else typedef void *ACE_MALLOC_T; -# endif /* ACE_HAS_OLD_MALLOC */ +# endif /* ACE_HAS_OLD_MALLOC */ + +# else +# if !defined (ACE_MALLOC_FUNC) +# define ACE_MALLOC_FUNC ::malloc +# endif +# if !defined (ACE_CALLOC_FUNC) +# define ACE_CALLOC_FUNC ::calloc +# endif +# if !defined (ACE_FREE_FUNC) +# define ACE_FREE_FUNC ::free +# endif +# if !defined (ACE_REALLOC_FUNC) +# define ACE_REALLOC_FUNC ::realloc +# endif + +# if defined (ACE_HAS_OLD_MALLOC) +typedef char *ACE_MALLOC_T; +# else +typedef void *ACE_MALLOC_T; +# endif /* ACE_HAS_OLD_MALLOC */ +#endif /* ACE_HAS_PACE */ class ACE_OS_Export ACE_OS_Memory // = TITLE |