diff options
Diffstat (limited to 'ACE/ace/OS_NS_Thread.inl')
-rw-r--r-- | ACE/ace/OS_NS_Thread.inl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index d4023d05704..65a7fba0482 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -1679,6 +1679,7 @@ ACE_OS::sema_init (ACE_sema_t *s, # if defined (ACE_LACKS_NAMED_POSIX_SEM) s->new_sema_ = true; # endif /* ACE_LACKS_NAMED_POSIX_SEM */ + ACE_OS::memset(s->sema_, 0, sizeof(*s->sema_)); ACE_OSCALL_RETURN (::sem_init (s->sema_, type != USYNC_THREAD, count), int, -1); @@ -3184,6 +3185,13 @@ ACE_OS::thr_id (char buffer[], size_t buffer_length) #endif /* WIN32 */ } +ACE_INLINE ssize_t +ACE_OS::thr_gettid (char buffer[], size_t buffer_length) +{ + return ACE_OS::snprintf (buffer, buffer_length, "%d", + static_cast<int> (ACE_OS::thr_gettid ())); +} + ACE_INLINE ACE_thread_t ACE_OS::thr_self (void) { |