Download Salvo User Manual

Transcript
Chapter 7 • Reference
User Services
This section describes the Salvo user services that you will use to
build your multitasking application. Each user service description
includes information on:
• the service type (function or macro),
• the service prototype (for a function) or declaration
(for a macro),
• where the service is callable from (the foreground, the
background or within a task),
• which Salvo C source or include files contain the
source code for the service,
• which configuration options (if any) enable the
service,
• which configuration options (if any) affect the service
(i.e. alter its execution speed or code size),
• a description of what the service does,
• the parameter(s) (if any) expected by the service call,
• the service's return value(s) (if any),
• the service's stack usage (if any), in terms of levels of
call…return stack used,80
• notes particular to the service,
• related services and
• an example using the service.
Salvo functions comprise the majority of the user services you will
call from C in your application. Salvo user services that do not result in a context switch are implemented as functions and are prefixed by "OS".
Salvo uses macros wherever a context-switch is implicit in the action being performed (e.g. delaying for a number of ticks, via
OS_Delay()). All of Salvo's services that result in a context-switch
are implemented via macros and are prefixed by "OS_".
80
Salvo User Manual
For call…return stack depth calculations, OSUSE_INSELIG_MACRO is assumed
to be the default value, TRUE. If FALSE, those services that cause a task to be
placed in the eligible, delay and/or event queue(s) will consume an additional
call…return stack level. Stack usage does not take into account any library
functions invoked by the compiler.
253