<INTEGRITY RTOS> Error "ObjectTableIsFull" while CreateProtectedTask()



=============
INTEGRITY RTOS
=============

Here is fragment of a program that produces error.

Two task are to be created, both are using the same entry point
function.

The second task is not created.

Is there something wrong in this program?


====== Fragments of program ======

void CheckError(Error error)
{
if (error == Success) return;

cerr << IntegrityError = " << error << " : " << ErrorString (error)
<< endl;
HaltTask(CurrentTask());
}



Task task[2];

for (size_t i = 0; i < 2; i++)
{
char taskName[25];
sprintf (taskName, "task-%d", i);

CheckError (CreateProtectedTask(1, (Address)func, 0x7000, taskName,
&task[i]));
cerr << taskName << ": CreateProtectedTask() performed" << endl;

CheckError (SetTaskIdentification(interfaceTask[i],
(Address)&taskData[i]));
cerr << taskName << ": SetTaskIdentification() performed" << endl;

CheckError (RunTask(interfaceTask[i]));
cerr << taskName << ": RunTask() performed" << endl;
}

==================================


====== Output ======

task-0: CreateProtectedTask() performed
task-0: SetTaskIdentification() performed
task-0: RunTask() performed
IntegrityError = 3 : ObjectTableIsFull

====================


Error "ObjectTableIsFull" for CreateProtectedTask means
"The caller cannot create the required Object Table Entries for
allocating the stack segment"


---
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn

.