Changeset 967c1438 in rtems


Ignore:
Timestamp:
Dec 9, 2013, 9:36:38 PM (6 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
798b8da
Parents:
8ae999c3
git-author:
Joel Sherrill <joel.sherrill@…> (12/09/13 21:36:38)
git-committer:
Joel Sherrill <joel.sherrill@…> (12/10/13 01:50:55)
Message:

alarm.c: Per comment add debug code for kill() failing

This is highly unlikely and would indicate a serious bug
in the system or corruption. But it is better to be cautious.

File:
1 edited

Legend:

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

    r8ae999c3 r967c1438  
    1010 */
    1111
    12 /*  COPYRIGHT (c) 1989-2007.
     12/*  COPYRIGHT (c) 1989-2013.
    1313 *  On-Line Applications Research Corporation (OAR).
    1414 *
     
    3333 *  _POSIX_signals_Alarm_TSR
    3434 */
    35 
    3635static void _POSIX_signals_Alarm_TSR(
    3736  Objects_Id      id __attribute__((unused)),
     
    3938)
    4039{
    41   kill( getpid(), SIGALRM );
    42   /* XXX can't print from an ISR, should this be fatal? */
     40  #if defined(RTEMS_DEBUG)
     41    int status;
     42    #define KILL_STATUS status =
     43  #else
     44    #define KILL_STATUS (void)
     45  #endif
     46
     47  KILL_STATUS kill( getpid(), SIGALRM );
     48
     49  #if defined(RTEMS_DEBUG)
     50    /*
     51     *  There is no reason to think this might fail but we should be
     52     *  cautious.
     53     */
     54    assert(status == 0);
     55  #endif
    4356}
    4457
Note: See TracChangeset for help on using the changeset viewer.