Page 1 of 1

Timeout option and global variables

PostPosted: Tue May 11, 2004 2:18 am
by kamyip
Hi again;

1)If I were to use the timeout option for OS_Delay and OS_Wait.. how much more memory does it need.

2) before Salvo, my old program have a number of global variables as boolean flag to tell the state of certain program. It's a nightmare to keep track of it. With Salvo I can do the signalling easily using BinSem. However, are there any overhead in using BinSem? I was wondering if I can migrate all the conventional globals to EFLAG and BinSem etc..

over2u... :-)


Re: Timeout option and global variables

PostPosted: Tue May 11, 2004 6:57 am
by aek
Hello.

1) You'll have to try it and see -- timeouts require one additional byte per tcb (on PIC18 w/MPLAB-C18) and more ROM to handle the timeout code. Rebuild your application with a t-config library.

2) Each binSem costs 4 bytes of RAM. Generally, beyond a certain level of complexity you'll start to win by using Salvo as the foundation of your code, with its built-in support for events like binSems.

------------------