[ 
https://issues.apache.org/jira/browse/TS-4952?focusedWorklogId=30393&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30393
 ]

ASF GitHub Bot logged work on TS-4952:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Oct/16 18:25
            Start Date: 11/Oct/16 18:25
    Worklog Time Spent: 10m 
      Work Description: Github user PSUdaemon commented on a diff in the pull 
request:

    https://github.com/apache/trafficserver/pull/1091#discussion_r82853486
  
    --- 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 --
    
    Has the Solaris case changed?


Issue Time Tracking
-------------------

    Worklog Id:     (was: 30393)
    Time Spent: 1h  (was: 50m)

> Improve mutex error checking.
> -----------------------------
>
>                 Key: TS-4952
>                 URL: https://issues.apache.org/jira/browse/TS-4952
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: James Peach
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> If any {{ink_mutex}} operations fail, we just abort. Use {{ink_abort}} so 
> that we can log an error if this happens.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to