Tasks (-entry-points
)
Specify functions that serve as tasks to your multitasking application
Description
This option is not available for code generated from MATLAB® code or Simulink® models.
Specify functions that serve as tasks to your code. If the function does not exist, the verification warns you and continues the verification.
Set Option
User interface (desktop products only): In your project configuration, the option is available on the Multitasking node. See Dependencies for other options you must also enable.
User interface (Polyspace Platform, desktop products only): In your project configuration, the option is on the Static Analysis tab on the Multitasking node. See Dependencies for other options you must also enable.
Command line and options file: Use the option
-entry-points
. See Command-Line Information.
Why Use This Option
Use this option when your code is intended for multitasking.
To specify cyclic tasks and interrupts, use the options Cyclic
tasks (-cyclic-tasks)
and Interrupts (-interrupts)
. Use this option to specify other
tasks.
A Code Prover analysis uses your specifications to determine:
Whether a global variable is shared.
See Global Variables (Polyspace Code Prover).
Whether a run-time error can occur.
For instance, if the operation
var++
occurs in the body of a cyclic task and you do not impose a limit onvar
, the operation can overflow. The analysis detects the possible overflow.
A Bug Finder analysis uses your specifications to look for concurrency defects. For more information, see Concurrency Defects.
Settings
No Default
Enter function names or choose from a list.
Click to add a field and enter the function name.
Click to list functions in your code. Choose functions from the list.
Dependencies
To enable this option in the user interface of the desktop products, first select the
option Configure multitasking manually
.
Tips
In Code Prover, the functions representing entry points must have the form
void functionName (void)
If a function
func
takes arguments or returns a value, you cannot use it directly as an entry point. To usefunc
as an entry point:, callfunc
from a wrappervoid
-void
function and specify the wrapper as an entry point. See Configuring Polyspace Multitasking Analysis Manually.If you specify a function as a task, you must provide its definition. Otherwise, a Code Prover verification stops with the error message:
task func_name must be a userdef function without parameters
A Bug Finder analysis continues but does not consider the function as an entry point.
If you run a file by file verification in Code Prover, your multitasking options are ignored. See
Verify files independently (-unit-by-unit)
.The Polyspace® multitasking analysis assumes that a task cannot interrupt itself.
Command-Line Information
Parameter:
-entry-points |
No Default |
Value:
|
Example (Bug Finder):
polyspace-bug-finder -sources |
Example (Code Prover):
polyspace-code-prover -sources
|
Example (Bug Finder Server): polyspace-bug-finder-server -sources |
Example (Code Prover Server):
polyspace-code-prover-server -sources |
See Also
Cyclic tasks (-cyclic-tasks)
| Interrupts (-interrupts)
| -preemptable-interrupts
| -non-preemptable-tasks
| Show global
variable sharing and usage only (-shared-variables-mode)
(Polyspace Code Prover)