Changeset 3e9f4c92 in rtems


Ignore:
Timestamp:
Oct 31, 2016, 12:05:55 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
bb9f09f
Parents:
7eec247
git-author:
Sebastian Huber <sebastian.huber@…> (10/31/16 12:05:55)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/31/16 12:09:50)
Message:

posix: Fix timeout handling in sigtimedwait()

Update #2798.

File:
1 edited

Legend:

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

    r7eec247 r3e9f4c92  
    7272  Thread_Control       *executing;
    7373  POSIX_API_Control    *api;
    74   Watchdog_Interval     interval;
    7574  siginfo_t             signal_information;
    7675  siginfo_t            *the_info;
     
    8584    rtems_set_errno_and_return_minus_one( EINVAL );
    8685
     86  _Thread_queue_Context_initialize( &queue_context );
     87
    8788  /*  NOTE: This is very specifically a RELATIVE not ABSOLUTE time
    8889   *        in the Open Group specification.
    8990   */
    9091
    91   interval = 0;
    9292  if ( timeout ) {
     93    Watchdog_Interval interval;
    9394
    9495    if ( !_Timespec_Is_valid( timeout ) )
     
    99100    if ( !interval )
    100101      rtems_set_errno_and_return_minus_one( EINVAL );
     102
     103    _Thread_queue_Context_set_relative_timeout( &queue_context, interval );
     104  } else {
     105    _Thread_queue_Context_set_no_timeout( &queue_context );
    101106  }
    102107
     
    116121  /* API signals pending? */
    117122
    118   _Thread_queue_Context_initialize( &queue_context );
    119123  _POSIX_signals_Acquire( &queue_context );
    120124  if ( *set & api->signals_pending ) {
     
    154158  executing->Wait.return_argument = the_info;
    155159  _Thread_queue_Context_set_expected_level( &queue_context, 1 );
    156   _Thread_queue_Context_set_relative_timeout( &queue_context, interval );
    157160  _Thread_queue_Enqueue_critical(
    158161    &_POSIX_signals_Wait_queue.Queue,
Note: See TracChangeset for help on using the changeset viewer.