From patchwork Thu Feb 26 16:42:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 45186 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0B3562043C for ; Thu, 26 Feb 2015 16:43:36 +0000 (UTC) Received: by wghk14 with SMTP id k14sf9182569wgh.0 for ; Thu, 26 Feb 2015 08:43:35 -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=e6nv2P/SgxlWc+MhuHAmSlc6nSue6PxjRGPUIfHnh6hRaFJnNd8t9EPtejrdww+JPU G5FxINWJ4bQ5xfDcI5hDO+9WqDGZFptwBy2rometCP2fAlK3Dv9/Nob/q2pkYCNEp049 EMZky21OEL99vJ16/4SHEeW12/d13IdzYEmX6jTA8LcajOKtXuiExJfq3sTRxZdeSiG5 R6faqjHe8chuvGD+jU5nR3545A5519zlG3dZ/Quuu1drAJ5r+81LeqcZmV3T7C62tA7Y kPvy9wQFiFw/q/WydhJSe1F3MKOgIn6QOXOLsnNEcR2wbygewL01sfEf7moLf+YOFR7E 4xLw== X-Gm-Message-State: ALoCoQlSV44zhtF76y8tXFjec+d3v8uirtxpMvByAuexgFSzbkA74drFRPUU+7dia6w/0eMn3Lsh X-Received: by 10.112.131.106 with SMTP id ol10mr1472124lbb.20.1424969015277; Thu, 26 Feb 2015 08:43:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.72 with SMTP id lm8ls63638lac.3.gmail; Thu, 26 Feb 2015 08:43:35 -0800 (PST) X-Received: by 10.112.24.235 with SMTP id x11mr8500866lbf.18.1424969015127; Thu, 26 Feb 2015 08:43:35 -0800 (PST) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id dx6si985410lbd.101.2015.02.26.08.43.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Feb 2015 08:43:35 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbjf15 with SMTP id f15so11869013lbj.13 for ; Thu, 26 Feb 2015 08:43:35 -0800 (PST) X-Received: by 10.112.57.139 with SMTP id i11mr8556095lbq.106.1424969015007; Thu, 26 Feb 2015 08:43:35 -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 h5csp3416426lbj; Thu, 26 Feb 2015 08:43:34 -0800 (PST) X-Received: by 10.140.147.147 with SMTP id 141mr20413529qht.57.1424969013386; Thu, 26 Feb 2015 08:43:33 -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 l8si1219203qcg.46.2015.02.26.08.43.32 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Feb 2015 08:43:33 -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 1YR1X8-0001p2-O4; Thu, 26 Feb 2015 16:43:30 +0000 Received: from mail-qa0-f44.google.com ([209.85.216.44]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YR1Wz-0001nZ-BY for lng-odp@lists.linaro.org; Thu, 26 Feb 2015 16:43:21 +0000 Received: by mail-qa0-f44.google.com with SMTP id n8so8605497qaq.3 for ; Thu, 26 Feb 2015 08:43:16 -0800 (PST) X-Received: by 10.140.165.150 with SMTP id l144mr20387473qhl.39.1424968996144; Thu, 26 Feb 2015 08:43:16 -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 g21sm808681qhc.35.2015.02.26.08.43.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Feb 2015 08:43:15 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org, bill.fischofer@linaro.org Date: Thu, 26 Feb 2015 11:42:58 -0500 Message-Id: <1424968984-30171-2-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424968984-30171-1-git-send-email-mike.holmes@linaro.org> References: <1424968984-30171-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v4 1/7] 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.169 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)