diff options
author | mcorino <mcorino@users.noreply.github.com> | 2005-05-27 08:53:18 +0000 |
---|---|---|
committer | mcorino <mcorino@users.noreply.github.com> | 2005-05-27 08:53:18 +0000 |
commit | f8574a50f07f054b7b79884d627f5ff754ac4535 (patch) | |
tree | f6055522d46dd1b578d2b4887e0c386399ab9d46 /ace | |
parent | d828e4f3500612a4fdf68181fb357ac2250ea463 (diff) | |
download | ATCD-f8574a50f07f054b7b79884d627f5ff754ac4535.tar.gz |
ChangeLogTag: Fri May 27 08:49:12 UTC 2005 Martin Corino <mcorino@remedy.nl>
Diffstat (limited to 'ace')
-rw-r--r-- | ace/OS_NS_Thread.inl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ace/OS_NS_Thread.inl b/ace/OS_NS_Thread.inl index 9374617f92a..ac084d571e2 100644 --- a/ace/OS_NS_Thread.inl +++ b/ace/OS_NS_Thread.inl @@ -4218,20 +4218,25 @@ ACE_OS::thr_sigsetmask (int how, ACE_NOTSUP_RETURN (-1); # elif defined (VXWORKS) + int old_mask = 0; switch (how) { case SIG_BLOCK: case SIG_UNBLOCK: { // get the old mask - *osm = ::sigsetmask (*nsm); + old_mask = ::sigsetmask (*nsm); // create a new mask: the following assumes that sigset_t is 4 bytes, // which it is on VxWorks 5.2, so bit operations are done simply . . . - ::sigsetmask (how == SIG_BLOCK ? (*osm |= *nsm) : (*osm &= ~*nsm)); + ::sigsetmask (how == SIG_BLOCK ? (old_mask |= *nsm) : (old_mask &= ~*nsm)); + if (osm) + *osm = old_mask; break; } case SIG_SETMASK: - *osm = ::sigsetmask (*nsm); + old_mask = ::sigsetmask (*nsm); + if (osm) + *osm = old_mask; break; default: return -1; |