Github user jpeach commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/1091#discussion_r82859672
--- Diff: lib/ts/ink_mutex.h ---
@@ -48,61 +49,58 @@ class x_pthread_mutexattr_t
{
public:
pthread_mutexattr_t attr;
+
x_pthread_mutexattr_t();
- ~x_pthread_mutexattr_t() {}
+ ~x_pthread_mutexattr_t();
};
-inline x_pthread_mutexattr_t::x_pthread_mutexattr_t()
-{
- pthread_mutexattr_init(&attr);
-#ifndef POSIX_THREAD_10031c
- pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
-#endif
-}
extern class x_pthread_mutexattr_t _g_mattr;
-static inline int
-ink_mutex_init(ink_mutex *m, const char *name)
+static inline void
+ink_mutex_init(ink_mutex *m, const char * /* name */)
{
- (void)name;
+ int error;
-#if defined(solaris)
- if (pthread_mutex_init(m, NULL) != 0) {
- abort();
- }
-#else
- if (pthread_mutex_init(m, &_g_mattr.attr) != 0) {
- abort();
+ error = pthread_mutex_init(m, &_g_mattr.attr);
--- End diff --
No. I checked the Solaris man pages and AFAICT Solaris supports everything
we are doing here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---