|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH 19/22] tcg: introduce tcg_context_clone |
Date: | Sun, 9 Jul 2017 10:48:27 -1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
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~
[Prev in Thread] | Current Thread | [Next in Thread] |