Changeset 327fbd6 in rtems


Ignore:
Timestamp:
12/09/13 21:25:16 (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, master
Children:
8ae999c3
Parents:
96281908
git-author:
Joel Sherrill <joel.sherrill@…> (12/09/13 21:25:16)
git-committer:
Joel Sherrill <joel.sherrill@…> (12/10/13 01:50:55)
Message:

condwaitsupp.c: Return EPERM if waiting and mutex is not locked

This error check was commented out because it is not in the POSIX
specification. However, the GNU/Linux manual page does document
that EPERM is to be returned in this situation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/condwaitsupp.c

    r96281908 r327fbd6  
    5959      }
    6060
    61       (void) pthread_mutex_unlock( mutex );
    62 /* XXX ignore this for now  since behavior is undefined
     61
     62      mutex_status = pthread_mutex_unlock( mutex );
     63      /*
     64       *  Historically, we ignored the return code since the behavior
     65       *  is undefined by POSIX. But GNU/Linux returns EPERM in this
     66       *  case, so we follow their lead.
     67       */
    6368      if ( mutex_status ) {
    6469        _Objects_Put( &the_cond->Object );
    65         return EINVAL;
     70        return EPERM;
    6671      }
    67 */
    6872
    6973      if ( !already_timedout ) {
Note: See TracChangeset for help on using the changeset viewer.