diff options
author | jwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-14 05:36:28 +0000 |
---|---|---|
committer | jwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-14 05:36:28 +0000 |
commit | 4685a4af713ca0913928340138c5e29fe02718a0 (patch) | |
tree | b6cb85b405ecebd1bc5b6440cbb8c16950597ff7 | |
parent | 52faf75334b50b358abd7458fd61101454d344e9 (diff) | |
download | ATCD-4685a4af713ca0913928340138c5e29fe02718a0.tar.gz |
Fri Jul 14 00:30:38 2000 John Heitmann <jwh1@cs.wustl.edu>
-rw-r--r-- | PACE/ChangeLog | 18 | ||||
-rw-r--r-- | PACE/pace/posix/pthread.h | 25 | ||||
-rw-r--r-- | PACE/pace/posix/pthread.inl | 45 | ||||
-rw-r--r-- | PACE/pace/posix/signal.c | 8 | ||||
-rw-r--r-- | PACE/pace/posix/signal.h | 8 | ||||
-rw-r--r-- | PACE/pace/posix/signal.inl | 9 | ||||
-rw-r--r-- | PACE/pace/posix/stdlib.h | 7 | ||||
-rw-r--r-- | PACE/pace/posix/stdlib.inl | 21 | ||||
-rw-r--r-- | PACE/pace/signal.h | 8 |
9 files changed, 144 insertions, 5 deletions
diff --git a/PACE/ChangeLog b/PACE/ChangeLog index d3baf1b1864..add0ff841b2 100644 --- a/PACE/ChangeLog +++ b/PACE/ChangeLog @@ -1,3 +1,21 @@ +Fri Jul 14 00:30:38 2000 John Heitmann <jwh1@cs.wustl.edu> + + * ../ace/OS.i + Minor updates. Currently only LynxOS has a dirty build + of libACE, although libACE still can't be linked against + correctly. + + * pace/signal.h + * pace/posix/signal.* + * pace/stdlib.h + * pace/posix/stdlib.* + * pace/pthread.h + * pace/posix/pthread.* + + Added typedef of pointers to functions which forced + functions which take pointers to functions to accept + arguments of c++ linkage... I think. + Thu Jul 13 16:37:33 2000 John Heitmann <jwh1@cs.wustl.edu> * ../include/makeinclude/wrapper_macros.GNU diff --git a/PACE/pace/posix/pthread.h b/PACE/pace/posix/pthread.h index f031dc4ab8c..b998c50e7c1 100644 --- a/PACE/pace/posix/pthread.h +++ b/PACE/pace/posix/pthread.h @@ -50,6 +50,31 @@ extern "C" { #endif /* PACE_SCHED_PARAM */ #if defined (PACE_HAS_CPLUSPLUS) +# ifndef PACE_ATFORK_PF +# define PACE_ATFORK_PF + typedef void (*pace_atfork_pf) (void); +# endif /* PACE_ATFORK_PF */ + +# ifndef PACE_KEYCREATE_PF +# define PACE_KEYCREATE_PF + typedef void (*pace_keycreate_pf) (void*); +# endif /* PACE_KEYCREATE_PF */ + +# ifndef PACE_ONCE_PF +# define PACE_ONCE_PF + typedef void (*pace_once_pf) (void); +# endif /* PACE_ONCE_PF */ + +# ifndef PACE_CREATE_PF +# define PACE_CREATE_PF + typedef void* (*pace_create_pf) (void*); +# endif /* PACE_CREATE_PF */ + +#endif /* PACE_HAS_CPLUPLUS */ + + + +#if defined (PACE_HAS_CPLUSPLUS) } #endif /* PACE_HAS_CPLUSPLUS */ diff --git a/PACE/pace/posix/pthread.inl b/PACE/pace/posix/pthread.inl index 29a1ad0e379..79466cdefed 100644 --- a/PACE/pace/posix/pthread.inl +++ b/PACE/pace/posix/pthread.inl @@ -15,6 +15,16 @@ #include "pace/unistd.h" +#if defined (PACE_HAS_CPLUSPLUS) +PACE_INLINE +int +pace_pthread_atfork (pace_atfork_pf prepare, + pace_atfork_pf parent, + pace_atfork_pf child) +{ + return pthread_atfork (prepare, parent, child); +} +#else PACE_INLINE int pace_pthread_atfork (void (*prepare) (), @@ -23,6 +33,7 @@ pace_pthread_atfork (void (*prepare) (), { return pthread_atfork (prepare, parent, child); } +#endif /* PACE_HAS_CPLUSPLUS */ PACE_INLINE int @@ -249,6 +260,17 @@ pace_pthread_condattr_setpshared (pace_pthread_condattr_t * attr, #endif /* PACE_LINUX */ } +#if defined (PACE_HAS_CPLUSPLUS) +PACE_INLINE +int +pace_pthread_create (pace_pthread_t * thread, + const pace_pthread_attr_t * attr, + pace_create_pf start_routine, + void * arg) +{ + return pthread_create (thread, attr, start_routine, arg); +} +#else PACE_INLINE int pace_pthread_create (pace_pthread_t * thread, @@ -258,6 +280,7 @@ pace_pthread_create (pace_pthread_t * thread, { return pthread_create (thread, attr, start_routine, arg); } +#endif /* PACE_HAS_CPLUSPLUS */ PACE_INLINE int @@ -304,6 +327,15 @@ pace_pthread_join (pace_pthread_t thread, void ** value_ptr) return pthread_join (thread, value_ptr); } +#if defined (PACE_HAS_CPLUSPLUS) +PACE_INLINE +int +pace_pthread_key_create (pace_pthread_key_t * key, + pace_keycreate_pf destructor) +{ + return pthread_key_create (key, destructor); +} +#else PACE_INLINE int pace_pthread_key_create (pace_pthread_key_t * key, @@ -311,6 +343,7 @@ pace_pthread_key_create (pace_pthread_key_t * key, { return pthread_key_create (key, destructor); } +#endif /* PACE_HAS_CPLUSPLUS */ PACE_INLINE int @@ -502,13 +535,23 @@ pace_pthread_mutexattr_setpshared (pace_pthread_mutexattr_t * attr, #endif /* PACE_LINUX */ } +#if defined (PACE_HAS_CPLUSPLUS) +PACE_INLINE +int +pace_pthread_once (pace_pthread_once_t * once_control, + pace_once_pf void_routine) +{ + return pthread_once (once_control, void_routine); +} +#else PACE_INLINE int pace_pthread_once (pace_pthread_once_t * once_control, - void (*void_routine) ()) + void (*void_routine) (void)) { return pthread_once (once_control, void_routine); } +#endif /* PACE_HAS_CPLUSPLUS */ PACE_INLINE pace_pthread_t diff --git a/PACE/pace/posix/signal.c b/PACE/pace/posix/signal.c index 380a3fec811..46d96b76fb0 100644 --- a/PACE/pace/posix/signal.c +++ b/PACE/pace/posix/signal.c @@ -15,6 +15,14 @@ #include "pace/signal.h" +#if (PACE_HAS_CPLUSPLUS) +extern "C" { +#endif + #if !defined (PACE_HAS_INLINE) # include "pace/posix/signal.inl" #endif /* ! PACE_HAS_INLINE */ + +#if (PACE_HAS_CPLUSPLUS) +} +#endif diff --git a/PACE/pace/posix/signal.h b/PACE/pace/posix/signal.h index 16a78b9cbec..c5f0346b2e5 100644 --- a/PACE/pace/posix/signal.h +++ b/PACE/pace/posix/signal.h @@ -24,6 +24,14 @@ extern "C" { #endif /* PACE_HAS_CPLUSPLUS */ +/* Required to force correct linkage on signal() */ +#if defined (PACE_HAS_CPLUSPLUS) +# ifndef PACE_SIG_PF +# define PACE_SIG_PF + typedef void (*pace_sig_pf) (int); +# endif /* PACE_SIG_PF */ +#endif /* PACE_HAS_CPLUSPLUS */ + #ifndef PACE_SIG_ATOMIC_T #define PACE_SIG_ATOMIC_T typedef sig_atomic_t pace_sig_atomic_t; diff --git a/PACE/pace/posix/signal.inl b/PACE/pace/posix/signal.inl index 4e7053d23ac..e6373ba2cb0 100644 --- a/PACE/pace/posix/signal.inl +++ b/PACE/pace/posix/signal.inl @@ -74,12 +74,21 @@ pace_sigismember (const pace_sigset_t * set, int signo) return sigismember (set, signo); } +#if defined (PACE_HAS_CPLUSPLUS) +PACE_INLINE +pace_sig_pf +pace_signal (int sig, pace_sig_pf func) +{ + return signal (sig, func); +} +#else PACE_INLINE void (*pace_signal(int sig, void (*func)(int)))(int) { return signal (sig, func); } +#endif /* PACE_HAS_CPLUSPLUS */ PACE_INLINE int diff --git a/PACE/pace/posix/stdlib.h b/PACE/pace/posix/stdlib.h index 3c4326a161c..5631659bf03 100644 --- a/PACE/pace/posix/stdlib.h +++ b/PACE/pace/posix/stdlib.h @@ -49,6 +49,13 @@ extern "C" { #endif /* PACE_WCHAR_T */ #if defined (PACE_HAS_CPLUSPLUS) +# ifndef PACE_BSEARCH_PF +# define PACE_BSEARCH_PF + typedef int (*pace_bsearch_pf) (const void*, const void*); +# endif /* PACE_BSEARCH_PF */ +#endif /* PACE_HAS_CPLUSPLUS */ + +#if defined (PACE_HAS_CPLUSPLUS) } #endif /* PACE_HAS_CPLUSPLUS */ diff --git a/PACE/pace/posix/stdlib.inl b/PACE/pace/posix/stdlib.inl index 60141adae33..9d3cac09cc8 100644 --- a/PACE/pace/posix/stdlib.inl +++ b/PACE/pace/posix/stdlib.inl @@ -50,6 +50,16 @@ pace_atol (const char * str) return atol (str); } +#if defined (PACE_HAS_CPLUSPLUS) +PACE_INLINE +void * +pace_bsearch (const void *key, const void *base, + size_t nel, size_t size, + pace_bsearch_pf compar) +{ + return bsearch (key, base, nel, size, compar); +} +#else PACE_INLINE void * pace_bsearch (const void *key, const void *base, @@ -58,6 +68,7 @@ pace_bsearch (const void *key, const void *base, { return bsearch (key, base, nel, size, compar); } +#endif /* PACE_HAS_CPLUSPLUS */ PACE_INLINE void @@ -74,6 +85,15 @@ pace_getenv (const char * name) return getenv (name); } +#if defined (PACE_HAS_CPLUSPLUS) +PACE_INLINE +void +pace_qsort (void * base, size_t nel, size_t width, + pace_bsearch_pf compar) +{ + qsort (base, nel, width, compar); +} +#else PACE_INLINE void pace_qsort (void * base, size_t nel, size_t width, @@ -81,6 +101,7 @@ pace_qsort (void * base, size_t nel, size_t width, { qsort (base, nel, width, compar); } +#endif /* PACE_HAS_CPLUSPLUS */ PACE_INLINE int diff --git a/PACE/pace/signal.h b/PACE/pace/signal.h index 1473c7e806e..513061432f6 100644 --- a/PACE/pace/signal.h +++ b/PACE/pace/signal.h @@ -147,10 +147,6 @@ extern "C" { */ PACE_INLINE int pace_sigwaitinfo (const pace_sigset_t * set, pace_siginfo_t * info); -#if defined (PACE_HAS_CPLUSPLUS) -} -#endif /* PACE_HAS_CPLUSPLUS */ - #if defined (PACE_HAS_INLINE) # if (PACE_HAS_POSIX) # include "pace/posix/signal.inl" @@ -161,4 +157,8 @@ extern "C" { # endif #endif /* PACE_HAS_INLINE */ +#if defined (PACE_HAS_CPLUSPLUS) +} +#endif /* PACE_HAS_CPLUSPLUS */ + #endif /* PACE_SIGNAL_H */ |