Lines Matching full:co
22 lua_State *co = lua_tothread(L, 1); in getco() local
23 luaL_argexpected(L, co, 1, "thread"); in getco()
24 return co; in getco()
32 static int auxresume (lua_State *L, lua_State *co, int narg) { in auxresume() argument
34 if (l_unlikely(!lua_checkstack(co, narg))) { in auxresume()
38 lua_xmove(L, co, narg); in auxresume()
39 status = lua_resume(co, L, narg, &nres); in auxresume()
42 lua_pop(co, nres); /* remove results anyway */ in auxresume()
46 lua_xmove(co, L, nres); /* move yielded values */ in auxresume()
50 lua_xmove(co, L, 1); /* move error message */ in auxresume()
57 lua_State *co = getco(L); in luaB_coresume() local
59 r = auxresume(L, co, lua_gettop(L) - 1); in luaB_coresume()
74 lua_State *co = lua_tothread(L, lua_upvalueindex(1)); in luaB_auxwrap() local
75 int r = auxresume(L, co, lua_gettop(L)); in luaB_auxwrap()
77 int stat = lua_status(co); in luaB_auxwrap()
79 stat = lua_closethread(co, L); /* close its tbc variables */ in luaB_auxwrap()
81 lua_xmove(co, L, 1); /* move error message to the caller */ in luaB_auxwrap()
127 static int auxstatus (lua_State *L, lua_State *co) { in auxstatus() argument
128 if (L == co) return COS_RUN; in auxstatus()
130 switch (lua_status(co)) { in auxstatus()
135 if (lua_getstack(co, 0, &ar)) /* does it have frames? */ in auxstatus()
137 else if (lua_gettop(co) == 0) in auxstatus()
150 lua_State *co = getco(L); in luaB_costatus() local
151 lua_pushstring(L, statname[auxstatus(L, co)]); in luaB_costatus()
157 lua_State *co = lua_isnone(L, 1) ? L : getco(L); in luaB_yieldable() local
158 lua_pushboolean(L, lua_isyieldable(co)); in luaB_yieldable()
171 lua_State *co = getco(L); in luaB_close() local
172 int status = auxstatus(L, co); in luaB_close()
175 status = lua_closethread(co, L); in luaB_close()
182 lua_xmove(co, L, 1); /* move error message */ in luaB_close()