Hi All,
I am working on vxworks with the testcase as:
**********************
int main(int argc, char* argv[]) {
TASK_ID id;
printf("Task spawn 0x%x\n", id = taskSpawn((char*)"JobA", 127, VX_FP_TASK, 12u * 1024u, (FUNCPTR)Job, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
taskDelay(5);
printf("Task delete %d\n", taskDelete(id));
std::cout << ""; /* <= REMOVING THIS LINE "SOLVES" THE PROBLEM*/
printf("Task spawn 0x%x\n", id = taskSpawn((char*)"JobB", 127, VX_FP_TASK, 12u * 1024u, (FUNCPTR)Job, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
taskDelay(5);
errnoSet(0);
STATUS result = taskDelete(id);
int e = errnoGet();
printf("Task delete %d\n", result);
printf("Errno = %d\n", e);
**********************
But here when i invoke "std::cout" then the next task will automatically get deleted before invoking the actual taskDelete API.
Also here the error is not reported when i invoke the taskDelete API.
The behavior i am seeing is:
+++++++++++++++++++++
Task spawn 0x330032
job: 1
Task delete 0
Task spawn 0x350034
job: 1
Task delete -1 ---> taskDelete after "::std::cout"
Errno = 0
+++++++++++++++++++++
Please help me on this.
Thanks in advance.
Regards,
Atul
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 462 |
Nodes: | 16 (2 / 14) |
Uptime: | 124:48:00 |
Calls: | 9,377 |
Files: | 13,555 |
Messages: | 6,092,991 |