From patchwork Tue Nov 1 03:35:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Koi X-Patchwork-Id: 123014 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E99ABB6F7D for ; Tue, 1 Nov 2011 14:36:24 +1100 (EST) Received: from localhost ([::1]:37416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RL59A-0000Uc-N2 for incoming@patchwork.ozlabs.org; Mon, 31 Oct 2011 23:36:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]:40820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RL593-0000UV-Hz for qemu-devel@nongnu.org; Mon, 31 Oct 2011 23:36:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RL592-0000pn-M3 for qemu-devel@nongnu.org; Mon, 31 Oct 2011 23:36:13 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:55237) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RL592-0000pU-Ji for qemu-devel@nongnu.org; Mon, 31 Oct 2011 23:36:12 -0400 Received: by ywb3 with SMTP id 3so8243252ywb.4 for ; Mon, 31 Oct 2011 20:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=HF5R+N8Ju+WnMyfTthseBrDMHxE04WNsK9toZPv9nlk=; b=mIYZ5S67jx5Gzb92T8lAFr9fpJCusSyP7/iCPJkgnEFhbPQwh5ZF0Cr965wpYnACO3 bmSPs0zOLlbGsb7dg+u/PuWLwQApOF06ajRgO9wcUi+d3+J202aZq8PeRz9+LzFv96UU MvPkVyL/2TRQCm1ggkHOYDzqrRpP4sTjTV7dI= Received: by 10.182.13.1 with SMTP id d1mr3489078obc.74.1320118571480; Mon, 31 Oct 2011 20:36:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.182.35 with HTTP; Mon, 31 Oct 2011 20:35:48 -0700 (PDT) From: Jun Koi Date: Tue, 1 Nov 2011 11:35:48 +0800 Message-ID: To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.45 Subject: [Qemu-devel] [patch] explicitly initialize tcg_cpu_thread X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch explicitly initializes tcg_cpu_thread to NULL in cpus.c (One code patch in qemu_tcg_init_vcpu() relies on the value of tcg_cpu_thread to create env->thread and so on ) Signed-off-by: Jun Koi diff --git a/cpus.c b/cpus.c index f768683..47feb58 100644 --- a/cpus.c +++ b/cpus.c @@ -606,7 +606,7 @@ static bool iothread_requesting_mutex; static QemuThread io_thread; -static QemuThread *tcg_cpu_thread; +static QemuThread *tcg_cpu_thread = NULL; static QemuCond *tcg_halt_cond; /* cpu creation */