From patchwork Wed Jun 15 16:48:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asias He X-Patchwork-Id: 882672 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5FGowP1008525 for ; Wed, 15 Jun 2011 16:50:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751495Ab1FOQuy (ORCPT ); Wed, 15 Jun 2011 12:50:54 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:61786 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751305Ab1FOQux (ORCPT ); Wed, 15 Jun 2011 12:50:53 -0400 Received: by mail-pz0-f46.google.com with SMTP id 9so395991pzk.19 for ; Wed, 15 Jun 2011 09:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=WRJDEgSL9HCZjenMTU6//zfN/PhUTq6LF+PIdkQiwnc=; b=vw7j+WYzGCZ6oklNCCJiiB8AZnlsbzj2LH2F6BnwIrZJRmCo1v2ulElJDjipo5HZDQ RKlcBPHJypIZCL5OMJHFXlJtVxEFk0sMOdgB/Ef8c7iEhCraCxZVxTRkBJCMoRwseaE9 dI3aDNmBGDokvSSbeHQWEtZTVu0gRPr/pWi6c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=xVOSee5ZLuM7x6oMZ1P0VtZ2PGExpjtHoXqhwgcFeK0vJrJ7YmZWPPc4qVTFfbs4Bp 61kvXVs2ewOf0HrAtHun+9BFHEgbfH4YMx89hJMMDDD6vc3Gxs6fI+5/dYzwI1ccWbNl NhZ7w32NhxUK7creTrOBHlw6Lp92w50OKxmcI= Received: by 10.68.59.198 with SMTP id b6mr481024pbr.6.1308156653297; Wed, 15 Jun 2011 09:50:53 -0700 (PDT) Received: from localhost.localdomain ([219.224.169.130]) by mx.google.com with ESMTPS id k4sm363957pbl.11.2011.06.15.09.50.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Jun 2011 09:50:52 -0700 (PDT) From: Asias He To: Pekka Enberg Cc: Cyrill Gorcunov , Ingo Molnar , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org, Asias He Subject: [PATCH 3/6] kvm tools: Block SIGALRM for theadpool thread Date: Thu, 16 Jun 2011 00:48:08 +0800 Message-Id: <1308156491-18488-3-git-send-email-asias.hejun@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1308156491-18488-1-git-send-email-asias.hejun@gmail.com> References: <1308156491-18488-1-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 15 Jun 2011 16:50:58 +0000 (UTC) thread pool thread is not interested in SIGALRM as well. Signed-off-by: Asias He --- tools/kvm/threadpool.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tools/kvm/threadpool.c b/tools/kvm/threadpool.c index 2db02184..fbd4887 100644 --- a/tools/kvm/threadpool.c +++ b/tools/kvm/threadpool.c @@ -5,6 +5,7 @@ #include #include #include +#include struct thread_pool__job { kvm_thread_callback_fn_t callback; @@ -85,6 +86,9 @@ static void thread_pool__threadfunc_cleanup(void *param) static void *thread_pool__threadfunc(void *param) { + + sig_block(SIGALRM); + pthread_cleanup_push(thread_pool__threadfunc_cleanup, NULL); for (;;) {