summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-12-10 22:15:26 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-12-10 22:15:26 +0000
commita06a3f712dd51b902a7fbb2a042fd6e4624ae5cf (patch)
treee6be4e3feaf97fcd1f64e143333c108b0f889baf
parent2009-12-10 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-a06a3f712dd51b902a7fbb2a042fd6e4624ae5cf.tar.bz2
2009-12-10 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1482 * posix/src/timersettime.c: Exit dispatching critical section.
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/posix/src/timersettime.c12
2 files changed, 13 insertions, 4 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 58824cc8e2..6d30ef8206 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,10 @@
2009-12-10 Joel Sherrill <joel.sherrill@OARcorp.com>
+ PR 1482
+ * posix/src/timersettime.c: Exit dispatching critical section.
+
+2009-12-10 Joel Sherrill <joel.sherrill@OARcorp.com>
+
PR 1480/cpukit
* rtems/src/ratemonperiod.c: Use _Rate_monotonic_Update_statistics()
when period is expired, not _Rate_monotonic_Initiate_statistics().
diff --git a/cpukit/posix/src/timersettime.c b/cpukit/posix/src/timersettime.c
index 6099ae0400..3518c4448e 100644
--- a/cpukit/posix/src/timersettime.c
+++ b/cpukit/posix/src/timersettime.c
@@ -102,11 +102,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;
@@ -114,7 +118,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)