Support Concurrent Execution of Multiple Tasks
If a custom embedded target must support concurrent execution of multiple tasks on a
multicore platform, the target must declare support for concurrent execution by setting the
target configuration option
ConcurrentExecutionCompliant. Otherwise, you
will not be able to configure a multicore target model for concurrent execution.
ConcurrentExecutionCompliant is not already configured for your
custom target, you can set the option in the following ways:
Include the following code directly in your system target file (
rtwgensettings.SelectCallback = 'slConfigUISetVal(hDlg,hSrc,... ''ConcurrentExecutionCompliant'',''on'');'; rtwgensettings.ActivateCallback = 'slConfigUISetVal(hDlg,hSrc,... ''ConcurrentExecutionCompliant'',''on'');';
Implement a callback function that sets the
ConcurrentExecutionCompliantoption, and then install the callback function in the
SelectCallbackfield of the
rtwgensettingsstructure in your system target file. The callback function is triggered whenever the user selects the target in the System Target File Browser. For example, the following system target file code installs a
rtwgensettings.SelectCallback = 'custom_select_callback_handler(hDlg,hSrc)';
The arguments to the
hSrc) are handles to private data used by the callback API functions. These handles are restricted to use in system target file callback functions. They should be passed in without alteration.
Your callback function should set the
ConcurrentExecutionCompliantoption as follows:
slConfigUISetVal(hDlg,hSrc,'ConcurrentExecutionCompliant','on'); slConfigUISetEnabled(hDlg,hSrc,'ConcurrentExecutionCompliant',false); hSrc.refreshDialog;
For more information about the system target file callback API, see the
slConfigUISetValfunction reference pages.
ConcurrentExecutionCompliant target configuration option is
'on', you can select the custom target and configure your multicore
target model for concurrent execution.
For an example that shows how to configure custom target optional features, see Customize System Target Files.