From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNy8O-0005LD-RA for qemu-devel@nongnu.org; Thu, 14 Sep 2006 16:48:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNy8L-0005Kt-Gt for qemu-devel@nongnu.org; Thu, 14 Sep 2006 16:48:32 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNy8L-0005Kq-Bb for qemu-devel@nongnu.org; Thu, 14 Sep 2006 16:48:29 -0400 Received: from [64.233.182.186] (helo=nf-out-0910.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GNyAM-0008NR-EN for qemu-devel@nongnu.org; Thu, 14 Sep 2006 16:50:34 -0400 Received: by nf-out-0910.google.com with SMTP id p46so2629523nfa for ; Thu, 14 Sep 2006 13:48:28 -0700 (PDT) Message-ID: <564d96fb0609141348y3bf4bbaat539cea1694c5c02d@mail.gmail.com> Date: Thu, 14 Sep 2006 17:48:27 -0300 From: "=?UTF-8?Q?Rafael_Esp=C3=ADndola?=" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_139729_31980472.1158266907639" Subject: [Qemu-devel] cpustate patch Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_139729_31980472.1158266907639 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline While hunting a tls related bug in ARM emulation, I found that that qemu distributed with scratchbox includes the attached patch. Without the patch python's configure halts when checking for the -pthread option. The patch inverts the order of the list and makes the code simpler. I think that there is a remaining problem, if first_cpu == NULL then env->cpu_index is not initialized. Should an else be added? Any thoughts on the patch? Thanks, Rafael ------=_Part_139729_31980472.1158266907639 Content-Type: application/octet-stream; name=cpustate.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_es3lws3f Content-Disposition: attachment; filename="cpustate.patch" SW5kZXg6IGV4ZWMuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvc291cmNlcy9xZW11L3FlbXUvZXhl Yy5jLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjgyCmRpZmYgLXUgLXIxLjgyIGV4ZWMuYwotLS0g ZXhlYy5jCTQgSnVsIDIwMDYgMDk6NDc6MzQgLTAwMDAJMS44MgorKysgZXhlYy5jCTE0IFNlcCAy MDA2IDIwOjI2OjExIC0wMDAwCkBAIC0yNTYsMjMgKzI1NiwxNyBAQAogCiB2b2lkIGNwdV9leGVj X2luaXQoQ1BVU3RhdGUgKmVudikKIHsKLSAgICBDUFVTdGF0ZSAqKnBlbnY7Ci0gICAgaW50IGNw dV9pbmRleDsKLQogICAgIGlmICghY29kZV9nZW5fcHRyKSB7CiAgICAgICAgIGNvZGVfZ2VuX3B0 ciA9IGNvZGVfZ2VuX2J1ZmZlcjsKICAgICAgICAgcGFnZV9pbml0KCk7CiAgICAgICAgIGlvX21l bV9pbml0KCk7CiAgICAgfQotICAgIGVudi0+bmV4dF9jcHUgPSBOVUxMOwotICAgIHBlbnYgPSAm Zmlyc3RfY3B1OwotICAgIGNwdV9pbmRleCA9IDA7Ci0gICAgd2hpbGUgKCpwZW52ICE9IE5VTEwp IHsKLSAgICAgICAgcGVudiA9IChDUFVTdGF0ZSAqKikmKCpwZW52KS0+bmV4dF9jcHU7Ci0gICAg ICAgIGNwdV9pbmRleCsrOwotICAgIH0KLSAgICBlbnYtPmNwdV9pbmRleCA9IGNwdV9pbmRleDsK LSAgICAqcGVudiA9IGVudjsKKworICAgIGlmIChmaXJzdF9jcHUpCisgICAgICBlbnYtPmNwdV9p bmRleCA9IGZpcnN0X2NwdS0+Y3B1X2luZGV4ICsgMTsKKworICAgIGVudi0+bmV4dF9jcHUgPSBm aXJzdF9jcHU7CisgICAgZmlyc3RfY3B1ID0gZW52OwogfQogCiBzdGF0aWMgaW5saW5lIHZvaWQg aW52YWxpZGF0ZV9wYWdlX2JpdG1hcChQYWdlRGVzYyAqcCkK ------=_Part_139729_31980472.1158266907639--