MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / preinit_thread

Function preinit_thread

libraries/AP_Scripting/lua/src/lstate.c:229–247  ·  view source on GitHub ↗

** preinitialize a thread with consistent values without allocating ** any memory (to avoid errors) */

Source from the content-addressed store, hash-verified

227** any memory (to avoid errors)
228*/
229static void preinit_thread (lua_State *L, global_State *g) {
230 G(L) = g;
231 L->stack = NULL;
232 L->ci = NULL;
233 L->nci = 0;
234 L->stacksize = 0;
235 L->twups = L; /* thread has no upvalues */
236 L->errorJmp = NULL;
237 L->nCcalls = 0;
238 L->hook = NULL;
239 L->hookmask = 0;
240 L->basehookcount = 0;
241 L->allowhook = 1;
242 resethookcount(L);
243 L->openupval = NULL;
244 L->nny = 1;
245 L->status = LUA_OK;
246 L->errfunc = 0;
247}
248
249
250static void close_state (lua_State *L) {

Callers 2

lua_newthreadFunction · 0.85
lua_newstateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected