From patchwork Tue Mar 5 18:30:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barker X-Patchwork-Id: 15245 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 593E923E67 for ; Tue, 5 Mar 2013 18:30:21 +0000 (UTC) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by fiordland.canonical.com (Postfix) with ESMTP id D8C04A18138 for ; Tue, 5 Mar 2013 18:30:20 +0000 (UTC) Received: by mail-ve0-f171.google.com with SMTP id b10so6090159vea.30 for ; Tue, 05 Mar 2013 10:30:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:content-type:mime-version:x-launchpad-project :x-launchpad-branch:x-launchpad-message-rationale :x-launchpad-branch-revision-number:x-launchpad-notification-type:to :from:subject:message-id:date:reply-to:sender:errors-to:precedence :x-generated-by:x-launchpad-hash:x-gm-message-state; bh=tUBDb5++kprdeYhTiQEYjmgxhw8x0gvSAD9JkgTqJiQ=; b=VfR3PmLM7Djq5b2lnvPg/g3cVVf1p8b+Gt1bGMVodsyNZ18uX3ZE2Gfo9+PaCAgBG/ FwQE/VwmaRdrRXUCbCk4C6lJe1T3f3GV+OMDz7JePGOAloBXdDs0IDRtUCP3rX9ykrTq ti6wWB0G9u12kElAePwVKEMK2qundg9qkYv6bzsd/WDAqPKTi8EglyWsPzVtZWHEhmwd FIcBRm0V3N2DzTdWmMOBgzIaQ0C5rICdhXppNuGNAyQ0LdzcD5jK8kpQf3Sh4NTxGxoZ 1NInYGadBoLnhPHgpjFMkcpIpR4SkR/NDS8bSFaQIuUtnXM8j/OpIWTDefzDqUCOZTzt sX3g== X-Received: by 10.52.29.18 with SMTP id f18mr8676957vdh.57.1362508220423; Tue, 05 Mar 2013 10:30:20 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp127347veb; Tue, 5 Mar 2013 10:30:19 -0800 (PST) X-Received: by 10.194.76.37 with SMTP id h5mr41844416wjw.21.1362508219356; Tue, 05 Mar 2013 10:30:19 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id p9si5229563wiz.71.2013.03.05.10.30.18 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 Mar 2013 10:30:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1UCwd0-0007uw-Ni for ; Tue, 05 Mar 2013 18:30:18 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id A1CF3E027E for ; Tue, 5 Mar 2013 18:30:18 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glmark2 X-Launchpad-Branch: ~glmark2-dev/glmark2/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 266 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 266: NativeStateDRM: A few small cleanup items. Message-Id: <20130305183018.26037.95716.launchpad@ackee.canonical.com> Date: Tue, 05 Mar 2013 18:30:18 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16514"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 2401eeefe772e1909d30ece896abbb8ea3622e7f X-Gm-Message-State: ALoCoQn1ao43sjK1GsF2S/KnTKEUZdRXbiiBnrasEicu1TVTVhQe8oP2lycOezDq5kvlA6CskEJH ------------------------------------------------------------ revno: 266 committer: Jesse Barker branch nick: trunk timestamp: Tue 2013-03-05 10:27:46 -0800 message: NativeStateDRM: A few small cleanup items. - Mark NativeStateDRM::should_quit_ as volatile and of type sig_atomic_t - Fixup a few C-style casts that snuck in during the last refactor - Comment out, rather than cast awaw unused function parameters modified: src/native-state-drm.cpp src/native-state-drm.h --- lp:glmark2 https://code.launchpad.net/~glmark2-dev/glmark2/trunk You are subscribed to branch lp:glmark2. To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription === modified file 'src/native-state-drm.cpp' --- src/native-state-drm.cpp 2013-03-04 18:52:20 +0000 +++ src/native-state-drm.cpp 2013-03-05 18:27:46 +0000 @@ -24,7 +24,6 @@ */ #include "native-state-drm.h" #include "log.h" -#include /****************** * Public methods * @@ -42,7 +41,7 @@ void* NativeStateDRM::display() { - return (void*)dev_; + return static_cast(dev_); } bool @@ -62,7 +61,7 @@ properties = WindowProperties(mode_->hdisplay, mode_->vdisplay, true, 0); - return (void*)surface_; + return static_cast(surface_); } void @@ -292,25 +291,19 @@ return true; } -bool NativeStateDRM::should_quit_ = false; +volatile std::sig_atomic_t NativeStateDRM::should_quit_(false); void -NativeStateDRM::quit_handler(int signo) +NativeStateDRM::quit_handler(int /*signo*/) { - Log::debug("Got SIGINT (%d).\n", signo); should_quit_ = true; } void -NativeStateDRM::page_flip_handler(int fd, unsigned int frame, unsigned int sec, unsigned int usec, void* data) +NativeStateDRM::page_flip_handler(int/* fd */, unsigned int /* frame */, unsigned int /* sec */, unsigned int /* usec */, void* data) { unsigned int* waiting = reinterpret_cast(data); *waiting = 0; - // Deal with unused parameters - static_cast(fd); - static_cast(frame); - static_cast(sec); - static_cast(usec); } void === modified file 'src/native-state-drm.h' --- src/native-state-drm.h 2013-03-04 18:52:20 +0000 +++ src/native-state-drm.h 2013-03-05 18:27:46 +0000 @@ -26,6 +26,7 @@ #define GLMARK2_NATIVE_STATE_DRM_H_ #include "native-state.h" +#include #include #include #include @@ -68,7 +69,7 @@ unsigned int usec, void* data); static void fb_destroy_callback(gbm_bo* bo, void* data); static void quit_handler(int signum); - static bool should_quit_; + static volatile std::sig_atomic_t should_quit_; DRMFBState* fb_get_from_bo(gbm_bo* bo); bool init_gbm();