Add call to clockInit.

Clean up some threadInit calls.
This commit is contained in:
W. Eric Norum
2000-06-13 22:30:40 +00:00
parent 0c5b00ce4c
commit 78b8324a8d

View File

@@ -210,18 +210,20 @@ void
threadInit (void)
{
if (!initialized) {
rtems_id tid;
rtems_task_priority old;
rtems_id tid;
rtems_task_priority old;
extern void clockInit (void);
rtems_task_set_priority (RTEMS_SELF, threadGetOssPriorityValue(99), &old);
onceMutex = semMutexMustCreate();
taskVarMutex = semMutexMustCreate ();
rtems_task_ident (RTEMS_SELF, 0, &tid);
setThreadInfo (tid, "_main_", NULL, NULL);
initialized = 1;
threadCreate ("ImsgDaemon", 99,
threadGetStackSize (threadStackSmall),
InterruptContextMessageDaemon, NULL);
clockInit ();
rtems_task_set_priority (RTEMS_SELF, threadGetOssPriorityValue(99), &old);
onceMutex = semMutexMustCreate();
taskVarMutex = semMutexMustCreate ();
rtems_task_ident (RTEMS_SELF, 0, &tid);
setThreadInfo (tid, "_main_", NULL, NULL);
initialized = 1;
threadCreate ("ImsgDaemon", 99,
threadGetStackSize (threadStackSmall),
InterruptContextMessageDaemon, NULL);
}
}
@@ -439,7 +441,7 @@ threadPrivateId threadPrivateCreate ()
unsigned int taskVarIndex;
static volatile unsigned int threadVariableCount = 0;
threadInit ();
if (!initialized) threadInit ();
taskVarLock ();
taskVarIndex = ++threadVariableCount;
taskVarUnlock ();