OSTaskCreate Return Values

Discussion to talk about software related topics only.
tpannone
Posts: 69
Joined: Fri Feb 15, 2013 1:04 pm

Re: OSTaskCreate Return Values

Post by tpannone »

The change to 25 indeed fixed my problem.

I'm still not sure how I exceeded the 20 tasks limit but obviously the system thinks I did. I wish there was a way to query the system to tell me how many task control blocks are actually running since I think I have less than I actually do.
ephogy
Posts: 35
Joined: Fri Aug 29, 2008 12:53 pm

Re: OSTaskCreate Return Values

Post by ephogy »

There is a way.

#include <taskmon.h>

make a call to EnableTaskMonitor()

and run \nburn\pcbin\TaskScan.exe

There are number of system tasks that are created depending on what you use.

Idle Task (I don't know if this counts as one of the tasks or not)
Main Task (UserMain())
TCPD Task
IP Task
Enet Task
HTTP Task if you've called StartHTTP();
FTPD Task if you've called FTPDStart();

Also, if you look at predefs.h, there are a couple of things you can look at.

#define UCOS_TASKLIST
ShowTaskList();

#define UCOS_STACKCHECK
OSDumpTasks();

There might be more stuff you'll want, you can check out the uCOSLibrary.pdf file in \nburn\docs\NetBurnerRuntimeLibrary
tpannone
Posts: 69
Joined: Fri Feb 15, 2013 1:04 pm

Re: OSTaskCreate Return Values

Post by tpannone »

Thanks ephogy! And thanks for quick tip on using TaskScan. I've seen it in the Netburner tools, but never looked into it.

As for the #define statements in predef.h, they are commented out in my copy so I'm guessing I'd need to uncomment them to use ShowTaskList() and OSDumpTasks().

/* #define UCOS_STACKCHECK (1) */
/* #define UCOS_TASKLIST (1) */
/* #define UCOS_TIME (1) */
/* #define BUFFER_DIAG (1) */
/* #define _DEBUG_PRINT (1) */
Post Reply