+ CHECK0(pthread_attr_destroy(&attr));\r
+\r
+ %if extMode == 1\r
+ /* External mode */\r
+ while(rtmGetErrorStatus(%<modelName>_M) == NULL && !rtmGetStopRequested(%<modelName>_M)) {\r
+ rtExtModeOneStep(rtmGetRTWExtModeInfo(RT_MDL), NUMST, (boolean_T *)&rtmGetStopRequested(RT_MDL));\r
+ usleep(%<FEVAL("uint32", fundamentalStepSize * 1000000)>);\r
+ }\r
+ %endif\r