diff options
author | jwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-28 11:28:09 +0000 |
---|---|---|
committer | jwh1 <jwh1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-07-28 11:28:09 +0000 |
commit | 18861e54e54fbb0fc6e06e1cab312084541a156b (patch) | |
tree | 73df127e804f4925ad4e84d75a1e4e7e7efdb7e7 | |
parent | d6d5402a014ff847a5494470ddc2061a31427f89 (diff) | |
download | ATCD-18861e54e54fbb0fc6e06e1cab312084541a156b.tar.gz |
Fri Jul 28 00:23:37 2000 John Heitmann <jwh1@cs.wustl.edu>
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 9 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 9 | ||||
-rw-r--r-- | ace/OS.h | 24 | ||||
-rw-r--r-- | ace/OS.i | 11 |
5 files changed, 55 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index 537e7841d6a..3ad0288abb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ Fri Jul 28 00:23:37 2000 John Heitmann <jwh1@cs.wustl.edu> + * ace/OS.h + Slightly modified semaphore code for pace. + + * ace/OS.i + Updated cond_timedwait in ACE_HAS_PACE to + initialize name_ to null. + + Linux uses native gettimeofday. + * docs/ACE-SSL.html Updated with new information about obtaining ACE+SSL. diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 537e7841d6a..3ad0288abb4 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,5 +1,14 @@ Fri Jul 28 00:23:37 2000 John Heitmann <jwh1@cs.wustl.edu> + * ace/OS.h + Slightly modified semaphore code for pace. + + * ace/OS.i + Updated cond_timedwait in ACE_HAS_PACE to + initialize name_ to null. + + Linux uses native gettimeofday. + * docs/ACE-SSL.html Updated with new information about obtaining ACE+SSL. diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 537e7841d6a..3ad0288abb4 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,5 +1,14 @@ Fri Jul 28 00:23:37 2000 John Heitmann <jwh1@cs.wustl.edu> + * ace/OS.h + Slightly modified semaphore code for pace. + + * ace/OS.i + Updated cond_timedwait in ACE_HAS_PACE to + initialize name_ to null. + + Linux uses native gettimeofday. + * docs/ACE-SSL.html Updated with new information about obtaining ACE+SSL. @@ -1774,9 +1774,27 @@ typedef const struct rlimit ACE_SETRLIMIT_TYPE; ACE_Read_Guard< MUTEX > OBJ (LOCK); \ if (OBJ.locked () == 0) return RETURN; -# if defined (ACE_HAS_POSIX_SEM) -# include /**/ <semaphore.h> +#if defined (ACE_HAS_PACE) +# include "pace/semaphore.h" +# if !defined (SEM_FAILED) +# define SEM_FAILED ((pace_sem_t *) -1) +# endif /* !SEM_FAILED */ + +typedef struct +{ + pace_sem_t *sema_; + // Pointer to semaphore handle. This is allocated by ACE if we are + // working with an unnamed POSIX semaphore or by the OS if we are + // working with a named POSIX semaphore. + + char *name_; + // Name of the semaphore (if this is non-NULL then this is a named + // POSIX semaphore, else its an unnamed POSIX semaphore). +} ACE_sema_t; + +# elif defined (ACE_HAS_POSIX_SEM) +# include /**/ <semaphore.h> # if !defined (SEM_FAILED) && !defined (ACE_LACKS_NAMED_POSIX_SEM) # define SEM_FAILED ((sem_t *) -1) # endif /* !SEM_FAILED */ @@ -1792,7 +1810,7 @@ typedef struct // Name of the semaphore (if this is non-NULL then this is a named // POSIX semaphore, else its an unnamed POSIX semaphore). } ACE_sema_t; -# endif /* ACE_HAS_POSIX_SEM */ +# endif /* ACE_HAS_PACE */ struct cancel_state { @@ -1035,7 +1035,7 @@ ACE_OS::gettimeofday (void) timeval tv; int result = 0; -#if defined (ACE_HAS_PACE) +#if (0) struct timespec ts; ACE_OSCALL (ACE_OS::clock_gettime (CLOCK_REALTIME, &ts), int, -1, result); @@ -2408,14 +2408,16 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv, ACE_Time_Value *timeout) { ACE_TRACE ("ACE_OS::cond_timedwait"); -#if defined (ACE_HAS_PACE) +#if (0) int result; timespec_t ts; if (timeout != 0) ts = *timeout; // Calls ACE_Time_Value::operator timespec_t(). - timeout == 0 ? (result = pace_pthread_cond_wait (cv, external_mutex)) : - (result = pace_pthread_cond_timedwait (cv, external_mutex, (ACE_TIMESPEC_PTR) &ts)); + ACE_OSCALL (ACE_ADAPT_RETVAL (timeout == 0 + ? (pace_pthread_cond_wait (cv, external_mutex)) + : (pace_pthread_cond_timedwait (cv, external_mutex, (ACE_TIMESPEC_PTR) &ts), + int, -1, result); // We need to adjust this to make the POSIX and Solaris return // values consistent. EAGAIN is from Pthreads DRAFT4 (HP-UX 10.20 and @@ -3128,6 +3130,7 @@ ACE_OS::sema_init (ACE_sema_t *s, ACE_UNUSED_ARG (arg); ACE_UNUSED_ARG (max); ACE_UNUSED_ARG (sa); + s->name_ = 0; if (name) { ACE_ALLOCATOR_RETURN (s->name_, |