Changeset 0ca4fc8 in rtems


Ignore:
Timestamp:
Nov 22, 1999, 4:09:55 PM (21 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
2c3af4c5
Parents:
f85409c
Message:

+ Corrected error processing code.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/semaphorewaitsupp.c

    rf85409c r0ca4fc8  
    3030  register POSIX_Semaphore_Control *the_semaphore;
    3131  Objects_Locations                 location;
    32   int                               code;
    3332 
    3433  the_semaphore = _POSIX_Semaphore_Get( sem, &location );
     
    3837    case OBJECTS_REMOTE:
    3938      _Thread_Dispatch();
    40       return POSIX_MP_NOT_IMPLEMENTED();
    4139      set_errno_and_return_minus_one( EINVAL );
    4240    case OBJECTS_LOCAL:
     
    4846      );
    4947      _Thread_Enable_dispatch();
    50       code = _Thread_Executing->Wait.return_code;
    51       switch (_Thread_Executing->Wait.return_code) {
    52         case 1:
    53           errno = EAGAIN;
    54           code = -1;
     48      switch ( _Thread_Executing->Wait.return_code ) {
     49        case CORE_SEMAPHORE_STATUS_SUCCESSFUL:
    5550          break;
    56         case 3:
    57           errno = ETIMEDOUT;
    58           code = -1;
     51        case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
     52          set_errno_and_return_minus_one( EAGAIN );
     53        case CORE_SEMAPHORE_WAS_DELETED:
     54          set_errno_and_return_minus_one( EAGAIN );
     55        case CORE_SEMAPHORE_TIMEOUT:
     56          set_errno_and_return_minus_one( ETIMEDOUT );
    5957          break;
     58        case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED:
     59          /*
     60           *  This error can not occur since we set the maximum
     61           *  count to the largest value the count can hold.
     62           */
     63          break;
    6064      }
    61 
    62       /*return _Thread_Executing->Wait.return_code;*/
    63       return code;
    6465  }
    65   return POSIX_BOTTOM_REACHED();
     66  return 0;
    6667}
  • cpukit/posix/src/semaphorewaitsupp.c

    rf85409c r0ca4fc8  
    3030  register POSIX_Semaphore_Control *the_semaphore;
    3131  Objects_Locations                 location;
    32   int                               code;
    3332 
    3433  the_semaphore = _POSIX_Semaphore_Get( sem, &location );
     
    3837    case OBJECTS_REMOTE:
    3938      _Thread_Dispatch();
    40       return POSIX_MP_NOT_IMPLEMENTED();
    4139      set_errno_and_return_minus_one( EINVAL );
    4240    case OBJECTS_LOCAL:
     
    4846      );
    4947      _Thread_Enable_dispatch();
    50       code = _Thread_Executing->Wait.return_code;
    51       switch (_Thread_Executing->Wait.return_code) {
    52         case 1:
    53           errno = EAGAIN;
    54           code = -1;
     48      switch ( _Thread_Executing->Wait.return_code ) {
     49        case CORE_SEMAPHORE_STATUS_SUCCESSFUL:
    5550          break;
    56         case 3:
    57           errno = ETIMEDOUT;
    58           code = -1;
     51        case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
     52          set_errno_and_return_minus_one( EAGAIN );
     53        case CORE_SEMAPHORE_WAS_DELETED:
     54          set_errno_and_return_minus_one( EAGAIN );
     55        case CORE_SEMAPHORE_TIMEOUT:
     56          set_errno_and_return_minus_one( ETIMEDOUT );
    5957          break;
     58        case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED:
     59          /*
     60           *  This error can not occur since we set the maximum
     61           *  count to the largest value the count can hold.
     62           */
     63          break;
    6064      }
    61 
    62       /*return _Thread_Executing->Wait.return_code;*/
    63       return code;
    6465  }
    65   return POSIX_BOTTOM_REACHED();
     66  return 0;
    6667}
Note: See TracChangeset for help on using the changeset viewer.