From patchwork Wed Feb 25 20:36:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 45120 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 283C420502 for ; Wed, 25 Feb 2015 20:37:07 +0000 (UTC) Received: by lbiz11 with SMTP id z11sf4768968lbi.2 for ; Wed, 25 Feb 2015 12:37:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=WdknxIfy4RZV1liSeiUpxKYCxtd9PKnxhoe2+jcsM8Q=; b=meIhBx7GCP9RY0nbaBHfXzibmAmw+2jVNz7td+ok5+4dsNfgIxk0q+UfE0/DhbI5BQ WsIpfVW0AP0V+yLI55N12uS30xuln/tQMUcAU6m6ib+skHwPiLiI6VPOMvPo8xVywIrf a6w4q7waDNTdMEkPOlc86JI4oXH7Gd9m/L14jmJCdhWk0a+RRQuIOUt+rhDr3wQW34Zb DibynfKBy+7cr+ks22cQNyMuCInQlCd/1ZWoPkR9SPgNowqEnoR9wdXhGzvzw+cs0MNk EMYzUJQ5MBWcbNUDr3JMVHeq6wF5aQ3sItm0k7c02WZznO3Imqn1EPSvkj9pg34CCeD7 KEdw== X-Gm-Message-State: ALoCoQmlcaSmVov5H0t0J8fDm4H0DeoUlqMYYZ89bXDsBm1bikBgD4UQHl9JtsBvI5XEgh8F4IX3 X-Received: by 10.180.182.201 with SMTP id eg9mr811675wic.3.1424896626161; Wed, 25 Feb 2015 12:37:06 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.231 with SMTP id bb7ls866096lab.50.gmail; Wed, 25 Feb 2015 12:37:05 -0800 (PST) X-Received: by 10.152.115.136 with SMTP id jo8mr4742250lab.32.1424896625925; Wed, 25 Feb 2015 12:37:05 -0800 (PST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id js5si31669367lab.173.2015.02.25.12.37.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 12:37:05 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbiz11 with SMTP id z11so6527429lbi.5 for ; Wed, 25 Feb 2015 12:37:05 -0800 (PST) X-Received: by 10.112.118.211 with SMTP id ko19mr4561789lbb.19.1424896625839; Wed, 25 Feb 2015 12:37:05 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2871922lbj; Wed, 25 Feb 2015 12:37:05 -0800 (PST) X-Received: by 10.140.93.23 with SMTP id c23mr10598215qge.0.1424896624324; Wed, 25 Feb 2015 12:37:04 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id t5si22913162qgd.84.2015.02.25.12.37.03 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 25 Feb 2015 12:37:04 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQihU-00008i-Eg; Wed, 25 Feb 2015 20:36:56 +0000 Received: from mail-qc0-f178.google.com ([209.85.216.178]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQihL-00007e-0r for lng-odp@lists.linaro.org; Wed, 25 Feb 2015 20:36:47 +0000 Received: by qcvp6 with SMTP id p6so5042061qcv.12 for ; Wed, 25 Feb 2015 12:36:41 -0800 (PST) X-Received: by 10.229.3.8 with SMTP id 8mr11217880qcl.12.1424896601860; Wed, 25 Feb 2015 12:36:41 -0800 (PST) Received: from mike-desktop.?.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id i46sm32171405qgd.35.2015.02.25.12.36.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Feb 2015 12:36:41 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 25 Feb 2015 15:36:19 -0500 Message-Id: <1424896591-4639-2-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424896591-4639-1-git-send-email-mike.holmes@linaro.org> References: <1424896591-4639-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v3 01/13] example: odp_generator: fix c99 usleep X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Mike Holmes --- example/generator/odp_generator.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 47cab6c..f3a315d 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -10,6 +10,7 @@ * @example odp_generator.c ODP loopback demo application */ +#include #include #include #include @@ -397,7 +398,10 @@ static void *gen_send_thread(void *arg) odp_atomic_load_u64(&counters.seq), odp_atomic_load_u64(&counters.seq)%0xffff); /* TODO use odp timer */ - usleep(args->appl.interval * 1000); + struct timespec ts; + ts.tv_sec = 0; + ts.tv_nsec = args->appl.interval; + nanosleep(&ts, NULL); } if (args->appl.number != -1 && odp_atomic_load_u64(&counters.seq)