From dc09e38067bde323b85ad8e333182418e720b6fe Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 10 Dec 2009 22:20:11 +0000 Subject: 2009-12-10 Joel Sherrill PR 1482 * posix/src/timersettime.c: Exit dispatching critical section. --- cpukit/posix/src/timersettime.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'cpukit/posix/src/timersettime.c') diff --git a/cpukit/posix/src/timersettime.c b/cpukit/posix/src/timersettime.c index d7f9176a10..de81dab694 100644 --- a/cpukit/posix/src/timersettime.c +++ b/cpukit/posix/src/timersettime.c @@ -104,11 +104,15 @@ int timer_settime( _POSIX_Timer_TSR, ptimer ); - if ( !activated ) + if ( !activated ) { + _Thread_Enable_dispatch(); return 0; + } - /* The timer has been started and is running */ - /* return the old ones in "ovalue" */ + /* + * The timer has been started and is running. So we return the + * old ones in "ovalue" + */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; @@ -116,7 +120,7 @@ int timer_settime( /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); - _Thread_Enable_dispatch(); + _Thread_Enable_dispatch(); return 0; #if defined(RTEMS_MULTIPROCESSING) -- cgit v1.2.3