GetResource() / ReleaseResource()
Posted: Mon Apr 04, 2011 8:32 pm
How can I delcare a resource in EE? I do not see the "DeclareResource()" API in the EE basic reference manual. Can I simply define it, e.g., "ResourceType S1;" ?
Can I use GetResource() / ReleaseResource() pair to block the calling task (put it into a waiting state) when the resource is already occupied by another task? Is there any sample code for using this pair for such purposes, e.g., a typical producer / consumer example?
Thanks,
Moon
Can I use GetResource() / ReleaseResource() pair to block the calling task (put it into a waiting state) when the resource is already occupied by another task? Is there any sample code for using this pair for such purposes, e.g., a typical producer / consumer example?
Thanks,
Moon