/* open upvalues point to values in a thread, so those values should be marked when the thread is traversed except in the atomic phase (because then the value cannot be changed by the thread and the thread may not be traversed again)  */
static lu_mem traverseLclosure(global_State *g, LClosure *cl)
/* open upvalues point to values in a thread, so those values should be marked when the thread is traversed except in the atomic phase (because then the value cannot be changed by the thread and the thread may not be traversed again)  */
static lu_mem traverseLclosure(global_State *g, LClosure *cl)
{
    UpVal *uv = cl->upvals[i];
    if (uv != NULL) {
      if (upisopen(uv) && g->gcstate != GCSinsideatomic)
        uv->u.open.touched = 1;
      else
        markvalue(g, uv->v);
    }
  }
  return sizeLclosure(cl->nupvalues);
}