summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/timercreate.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-06-13 15:29:04 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-06-13 15:51:21 +0200
commit80fca28198170a84cde8a9f22dbb29c3a6c4123b (patch)
treeacea5eb27023816bd447d6fe004f8f00a7830d1e /cpukit/posix/src/timercreate.c
parentscore: Delete unused state WATCHDOG_REMOVE_IT (diff)
downloadrtems-80fca28198170a84cde8a9f22dbb29c3a6c4123b.tar.bz2
score: Add _Watchdog_Preinitialize()
Add an assert to ensure that the watchdog is the proper state for a _Watchdog_Initialize(). This helps to detect invalid initializations which may lead to a corrupt watchdog chain.
Diffstat (limited to 'cpukit/posix/src/timercreate.c')
-rw-r--r--cpukit/posix/src/timercreate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/posix/src/timercreate.c b/cpukit/posix/src/timercreate.c
index 6d822b3928..a5261cc57a 100644
--- a/cpukit/posix/src/timercreate.c
+++ b/cpukit/posix/src/timercreate.c
@@ -92,7 +92,7 @@ int timer_create(
ptimer->timer_data.it_interval.tv_sec = 0;
ptimer->timer_data.it_interval.tv_nsec = 0;
- _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
+ _Watchdog_Preinitialize( &ptimer->Timer );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;