Pumpkin, Inc.

Pumpkin User Forums

OSCreate() and resources

If you can't make Salvo do what you want it to do, post it here.

OSCreate() and resources

Postby luben » Fri Feb 16, 2001 9:57 am

Hello,

in salvocfg.h I set the maximal number fo tasks and events. If I put number of tasks = 3 but I use only 2 taks will the SALVO consume the resources like 3 tasks? I mean, in salvocfg.h are the maximum resources that SALVO can consume or the exactly resources that will be used. Or this depends of the optimization power of the compiler - to be able to remove unused sections.

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: OSCreate() and resources

Postby aek » Sat Feb 17, 2001 12:35 pm

quote:
I mean, in salvocfg.h are the maximum resources that SALVO can consume or the exactly resources that will be used.

The former.

When you set OSTASKS to 3, two things happen: 1) Salvo creates an array of three task control blocks (tcbs), and 2) if error checking is enabled, it sets an upper limit for valid taskIDs to be 2 (0, 1, 2 for OSTASKS = 3) for services that take taskID as a parameter.

So if you set OSTASKS to 3 but only create and use two tasks, there is a single initialized but unused tcb in memory. Same goes for events (ecbs), etc.

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm


Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest

cron