Changeset cec0371 in rtems


Ignore:
Timestamp:
Nov 2, 1999, 6:39:52 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
63edcf24
Parents:
9f95a19
Message:

Wrong routine was initially cut into this file.

Files:
2 edited

Legend:

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

    r9f95a19 rcec0371  
    2222 */
    2323 
    24 int pthread_mutexattr_setprotocol(
    25   pthread_mutexattr_t   *attr,
    26   int                    protocol
     24int pthread_mutexattr_getprotocol(
     25  const pthread_mutexattr_t   *attr,
     26  int                         *protocol
    2727)
    2828{
    29   if ( !attr || !attr->is_initialized )
     29  if ( !attr || !attr->is_initialized || !protocol )
    3030    return EINVAL;
    3131
    32   switch ( protocol ) {
    33     case PTHREAD_PRIO_NONE:
    34     case PTHREAD_PRIO_INHERIT:
    35     case PTHREAD_PRIO_PROTECT:
    36       attr->protocol = protocol;
    37       return 0;
    38  
    39     default:
    40       return EINVAL;
    41   }
     32  *protocol = attr->protocol;
     33  return 0;
    4234}
  • cpukit/posix/src/mutexattrgetprotocol.c

    r9f95a19 rcec0371  
    2222 */
    2323 
    24 int pthread_mutexattr_setprotocol(
    25   pthread_mutexattr_t   *attr,
    26   int                    protocol
     24int pthread_mutexattr_getprotocol(
     25  const pthread_mutexattr_t   *attr,
     26  int                         *protocol
    2727)
    2828{
    29   if ( !attr || !attr->is_initialized )
     29  if ( !attr || !attr->is_initialized || !protocol )
    3030    return EINVAL;
    3131
    32   switch ( protocol ) {
    33     case PTHREAD_PRIO_NONE:
    34     case PTHREAD_PRIO_INHERIT:
    35     case PTHREAD_PRIO_PROTECT:
    36       attr->protocol = protocol;
    37       return 0;
    38  
    39     default:
    40       return EINVAL;
    41   }
     32  *protocol = attr->protocol;
     33  return 0;
    4234}
Note: See TracChangeset for help on using the changeset viewer.