Specify Generation of Reentrant Code
Specify Generation of Reentrant Code Using the MATLAB Coder App
On the Generate Code page, click the Generate arrow .
Set Build type to one of the following:
Source Code
Static Library (.lib)
Dynamic Library (.dll)
Executable (.exe)
Click More Settings.
On the Memory tab, select the Generate re-entrant code check box.
Specify Generation of Reentrant Code Using the Command-Line Interface
Create a code configuration object for
'lib'
,'dll'
, or'exe'
. For example:cfg = coder.config('lib'); % or dll or exe
Set the
MultiInstanceCode
property totrue
. For example:cfg.MultiInstanceCode = true;
Related Examples
- Generate Reentrant C Code from MATLAB Code
- Call Reentrant Code with No Persistent or Global Data (UNIX Only)
- Call Reentrant Code — Multithreaded with Persistent Data (Windows Only)
- Call Reentrant Code — Multithreaded with Persistent Data (UNIX Only)