diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-01-16 23:16:19 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-01-16 23:16:19 +0000 |
commit | cf24ab9beadeea8ba4552e0882b2cb323c96a040 (patch) | |
tree | 629be4905e322de9bedc74c91d07461b4e7356fa /ace | |
parent | b0be299d1300d2bfaf2bf9b72592c05976d39668 (diff) | |
download | ATCD-cf24ab9beadeea8ba4552e0882b2cb323c96a040.tar.gz |
.
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Asynch_IO.cpp | 10 | ||||
-rw-r--r-- | ace/OS.i | 30 | ||||
-rw-r--r-- | ace/config-sunos5.6.h | 1 |
3 files changed, 24 insertions, 17 deletions
diff --git a/ace/Asynch_IO.cpp b/ace/Asynch_IO.cpp index ec5ecd17032..50d3ea6323d 100644 --- a/ace/Asynch_IO.cpp +++ b/ace/Asynch_IO.cpp @@ -804,18 +804,18 @@ private: // Queue of Result pointers that correspond to all the <accept>'s // pending. - ACE_Reactor* reactor_; + ACE_Reactor *reactor_; // Reactor used by the Asynch_Accept. We need this here to enable // and disable the <handle> now and then, depending on whether any // <accept> is pending or no. - ACE_Thread_Mutex lock_; + ACE_SYNCH_MUTEX lock_; // The lock to protect the result queue which is shared. The queue // is updated by main thread in the register function call and // through the auxillary thread in the deregister fun. So let us // mutex it. - ACE_Proactor* proactor_; + ACE_Proactor *proactor_; // Proactor used by the Asynch_Accept class. }; @@ -838,7 +838,7 @@ ACE_Asynch_Accept_Handler::register_accept_call (ACE_Asynch_Accept::Result* resu // The queue is updated by main thread in the register function call // and thru the auxillary thread in the deregister fun. So let us // mutex it. - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1); + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->lock_, -1); // Insert this result to the queue. int insert_result = this->result_queue_.enqueue_tail (result); @@ -867,7 +867,7 @@ ACE_Asynch_Accept_Handler::deregister_accept_call (void) // The queue is updated by main thread in the register function call and // thru the auxillary thread in the deregister fun. So let us mutex // it. - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0); + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->lock_, 0); // Get the first item (result ptr) from the Queue. ACE_Asynch_Accept::Result* result = 0; @@ -10665,21 +10665,24 @@ ACE_OS::readdir (DIR *d) { #if defined (ACE_HAS_DIRENT) # if defined (ACE_PSOS) - // The returned pointer to the dirent struct must be - // deleted by the caller to avoid a memory leak. + // The returned pointer to the dirent struct must be deleted by the + // caller to avoid a memory leak. struct dirent *dir_ent; u_long result; - ACE_NEW_RETURN (dir_ent, dirent, 0); + + ACE_NEW_RETURN (dir_ent, + dirent, + 0); result = ::read_dir (d, dir_ent); + if (0 == result) - { return dir_ent; - } else - { - errno = result; - return 0; - } + { + errno = result; + return 0; + } + # else /* ! defined (ACE_PSOS) */ return ::readdir (d); # endif /* ! defined (ACE_PSOS) */ @@ -10694,8 +10697,11 @@ ACE_OS::readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result) { -#if defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_READDIR_R) - +# if !defined (ACE_HAS_REENTRANT_FUNCTIONS) + // <result> has better not be 0! + *result = ACE_OS::readdir (dirp); + return 0; +# elif defined (ACE_HAS_DIRENT) && !defined (ACE_LACKS_READDIR_R) # if (defined (sun) && defined (_POSIX_PTHREAD_SEMANTICS)) || \ (!defined (sun) && (defined (ACE_HAS_PTHREADS_STD) || \ defined (ACE_HAS_PTHREADS_DRAFT7) || \ @@ -10717,7 +10723,7 @@ ACE_OS::readdir_r (DIR *dirp, ACE_UNUSED_ARG (result); ACE_NOTSUP_RETURN (0); -#endif /* ! ACE_HAS_DIRENT || ACE_LACKS_READDIR_R */ +#endif /* !ACE_HAS_REENTRANT_FUNCTIONS */ } ACE_INLINE long diff --git a/ace/config-sunos5.6.h b/ace/config-sunos5.6.h index 5baea22d5b1..86aedbb7b5c 100644 --- a/ace/config-sunos5.6.h +++ b/ace/config-sunos5.6.h @@ -15,6 +15,7 @@ #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199506L) || \ defined (__EXTENSIONS__) # define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R +# define ACE_HAS_SIGWAIT // Hack 'cuz -DPOSIX_SOURCE=199506L and -DEXTENSIONS hides this. # include <sys/types.h> extern "C" int madvise(caddr_t, size_t, int); |