Changeset f9a2d36 in rtems


Ignore:
Timestamp:
Jun 2, 2015, 11:57:35 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
863dcf4
Parents:
2764bd43
git-author:
Sebastian Huber <sebastian.huber@…> (06/02/15 11:57:35)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/03/15 07:18:52)
Message:

posix: Fix _POSIX_Timer_Insert_helper() locking

Close #2358.

File:
1 edited

Legend:

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

    r2764bd43 rf9a2d36  
    3838)
    3939{
    40   ISR_Level            level;
     40  ISR_lock_Context  lock_context;
     41  Watchdog_Header  *header;
    4142
    4243  _Watchdog_Remove_ticks( timer );
    43   _ISR_Disable( level );
     44
     45  header = &_Watchdog_Ticks_header;
     46  _Watchdog_Acquire( header, &lock_context );
    4447
    4548    /*
     
    4851     */
    4952    if ( timer->state != WATCHDOG_INACTIVE ) {
    50       _ISR_Enable( level );
     53      _Watchdog_Release( header, &lock_context );
    5154      return false;
    5255    }
     
    5760     */
    5861    _Watchdog_Initialize( timer, TSR, id, arg );
    59     _Watchdog_Insert_ticks( timer, ticks );
    60   _ISR_Enable( level );
     62    timer->initial = ticks;
     63    _Watchdog_Insert_locked( header, timer, &lock_context );
     64  _Watchdog_Release( header, &lock_context );
    6165  return true;
    6266}
Note: See TracChangeset for help on using the changeset viewer.