OIL files selection (-osek-multitasking)
Set up multitasking configuration from OIL file definition
Description
Specify the OIL files that Polyspace® parses to set up the multitasking configuration of your OSEK project.
Set Option
Set the option using one of these methods:
- Polyspace user interface (desktop products only): In your project configuration, select the Multitasking node and then select this option. See Dependencies for other options you must enable first. 
- Polyspace Platform user interface (desktop products only): In your project configuration, on the Static Analysis tab, select the Multitasking node and then select this option. See Dependencies for other options you must enable first. 
- Command line and options file: Use the option - -osek-multitasking. See Command-Line Information.
Why Use This Option
If your project includes OIL files, Polyspace can parse these files to set up tasks, interrupts, cyclical tasks, and critical sections. You do not have to set them up manually.
Settings
 Off (default) Off (default)
- Polyspace does not set up a multitasking configuration for your OSEK project. 
 On On
- Polyspace looks for and parses OIL files to set up your multitasking configuration. 
- auto
- Look for OIL files in your project source and include folders, but not in their subfolders. 
- custom
- Look for OIL files on the specified path and the path subfolders. You can specify a path to the OIL files or to the folder containing the files. 
When you select this option, in your source code, Polyspace supports these OSEK multitasking keywords:
- TASK
- DeclareTask
- ActivateTask
- DeclareResource
- GetResource
- ReleaseResource
- ISR
- DeclareEvent
- DeclareAlarm
Polyspace parses the OIL files that you provide for TASK,
                ISR, RESOURCE, and ALARM
            definitions. The analysis uses these definitions and the supported multitasking keywords
            to configure tasks, interrupts, cyclical tasks, and critical sections.
To see how Polyspace models the TASK, ISR, and
                RESOURCE definitions from your OIL files, open the
                Concurrency window from the Dashboard
            pane.
Polyspace uses this decision tree to determine whether a task is an entry point or a cyclic task:

 Example: Analyze Your OSEK Multitasking Project
 Example: Analyze Your OSEK Multitasking Project
Additional Considerations
- Make sure that you declare all tasks by using the - DeclareTaskor- TASKkeywords before you pass those tasks as parameters to functions or macros that expect a task. For example , if you pass task- footo- ActivateTaskwithout using- DeclareTask(foo);first, Polyspace considers task- fooundefined which results in a compilation error.
- The analysis ignores - TerminateTask()declarations in your source code and considers that subsequent code is executed.
- Polyspace ignores syntax elements of your OIL files that do not follow the syntax defined here. 
- This option is supported only for projects that use C code. 
Dependencies
To enable this option in the user interface of the desktop products:
- Set the value of the option - Source code language (-lang)to- C.
- Select the value - osekfor the option- External multitasking configuration(renamed to- External file for multitaskingin the Polyspace Platform user interface).
Command-Line Information
| Parameter: -osek-multitasking | 
| Value: auto|custom=' | 
| Default: Off | 
| 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
                         | 
Version History
Introduced in R2017b