diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-06 07:08:44 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-06 07:08:44 +0000 |
commit | 015911f7dc35163bb73046ca6441a8099fd838b2 (patch) | |
tree | 203e7725956b6dfa76b9a3814a4893cb724c02d6 /ace/OS.i | |
parent | 060efd35c5d2006b345af17d83e12f78137a4e92 (diff) | |
download | ATCD-015911f7dc35163bb73046ca6441a8099fd838b2.tar.gz |
ChangeLogTag:Fri Apr 6 02:02:01 2001 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'ace/OS.i')
-rw-r--r-- | ace/OS.i | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -3101,7 +3101,7 @@ ACE_OS::sema_destroy (ACE_sema_t *s) delete s->name_; return result; } -#else +# else if (s->name_) { ACE_OSCALL (::sem_unlink (s->name_), int, -1, result); @@ -3112,7 +3112,10 @@ ACE_OS::sema_destroy (ACE_sema_t *s) else { ACE_OSCALL (::sem_destroy (s->sema_), int, -1, result); - delete s->sema_; +# if defined (ACE_LACKS_NAMED_POSIX_SEM) + if (s->new_sema_ != 0) +# endif /* ACE_LACKS_NAMED_POSIX_SEM */ + delete s->sema_; s->sema_ = 0; return result; } @@ -3419,6 +3422,7 @@ ACE_OS::sema_init (ACE_sema_t *s, s->name_ = 0; # if defined (ACE_LACKS_NAMED_POSIX_SEM) + s->new_sema_ = 0; if (type == USYNC_PROCESS) { // Let's see if it already exists. @@ -3491,6 +3495,9 @@ ACE_OS::sema_init (ACE_sema_t *s, ACE_NEW_RETURN (s->sema_, sem_t, -1); +# if defined (ACE_LACKS_NAMED_POSIX_SEM) + s->new_sema_ = 1; +# endif /* ACE_LACKS_NAMED_POSIX_SEM */ ACE_OSCALL_RETURN (::sem_init (s->sema_, type != USYNC_THREAD, count), int, -1); |