On 07/08/2017 09:50 PM, Emilio G. Cota wrote:
@@ -409,6 +411,18 @@ void tcg_context_init(TCGContext *s)
  }
/*
+ * Clone the initial TCGContext. Used by TCG threads to copy the TCGContext
+ * set up by their parent thread via tcg_context_init().
+ */
+void tcg_context_clone(TCGContext *s)
+{
+    if (unlikely(tcg_init_ctx == NULL || tcg_init_ctx == s)) {
+        tcg_abort();
+    }
+    memcpy(s, tcg_init_ctx, sizeof(*s));
+}

Under what conditions will this be called? How much of this might you need to zero out again after the fact?


r~

Reply via email to