Changeset fcd0c90 in rtems


Ignore:
Timestamp:
Jan 5, 2000, 5:11:36 PM (20 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
3ebd4c1
Parents:
cecd206
Message:

+ Added check for reading from a write only queue.
+ Added ability to return message priority from the core.

Files:
2 edited

Legend:

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

    rcecd206 rfcd0c90  
    4848  unsigned32                            status = 0;
    4949  unsigned32                            length_out;
     50  CORE_message_queue_Submit_types       core_priority;
    5051 
    5152  the_mq = _POSIX_Message_queue_Get( mqdes, &location );
     
    5859      set_errno_and_return_minus_one( EINVAL );
    5960    case OBJECTS_LOCAL:
     61      if ( (the_mq->oflag & O_ACCMODE) == O_WRONLY ) {
     62        _Thread_Enable_dispatch();
     63        set_errno_and_return_minus_one( EBADF );
     64      }
     65
    6066      /* XXX need to define the options argument to this */
    6167      length_out = msg_len;
     
    6571        msg_ptr,
    6672        &length_out,
    67         /* msg_prio,    XXXX */
    6873        the_mq->blocking,
     74        &core_priority,
    6975        timeout
    7076      );
     77     
     78      *msg_prio = _POSIX_Message_queue_Priority_from_core( core_priority );
     79
     80      /* XXX convert message priority from core to POSIX */
    7181      _Thread_Enable_dispatch();
     82      *msg_prio = _Thread_Executing->Wait.count;
    7283      if ( !status )
    7384        return length_out;
  • cpukit/posix/src/mqueuerecvsupp.c

    rcecd206 rfcd0c90  
    4848  unsigned32                            status = 0;
    4949  unsigned32                            length_out;
     50  CORE_message_queue_Submit_types       core_priority;
    5051 
    5152  the_mq = _POSIX_Message_queue_Get( mqdes, &location );
     
    5859      set_errno_and_return_minus_one( EINVAL );
    5960    case OBJECTS_LOCAL:
     61      if ( (the_mq->oflag & O_ACCMODE) == O_WRONLY ) {
     62        _Thread_Enable_dispatch();
     63        set_errno_and_return_minus_one( EBADF );
     64      }
     65
    6066      /* XXX need to define the options argument to this */
    6167      length_out = msg_len;
     
    6571        msg_ptr,
    6672        &length_out,
    67         /* msg_prio,    XXXX */
    6873        the_mq->blocking,
     74        &core_priority,
    6975        timeout
    7076      );
     77     
     78      *msg_prio = _POSIX_Message_queue_Priority_from_core( core_priority );
     79
     80      /* XXX convert message priority from core to POSIX */
    7181      _Thread_Enable_dispatch();
     82      *msg_prio = _Thread_Executing->Wait.count;
    7283      if ( !status )
    7384        return length_out;
Note: See TracChangeset for help on using the changeset viewer.