From patchwork Wed Feb 25 20:19:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 45106 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4E9FF2142A for ; Wed, 25 Feb 2015 20:20:08 +0000 (UTC) Received: by wesq59 with SMTP id q59sf4653084wes.2 for ; Wed, 25 Feb 2015 12:20:07 -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=Z/k1+Bd9zhWtptaLt3BXiS/8hkHuZcC84BiWz3jljkHKcLpbmwshGWCqRogpSnm/ES ZE+G62Qpksv4zMtmrkw7x5vNMvdiybniRYanQbbN/JR01ELP/+XRE5ql2HrjmvmaVn11 1DtT7l55GK/OyaiYY71f//oBZ11nBs4xx/WFb/9Xbb7v7hCc3MNtFdbnYQRdEHUnfLXV Ik3CYd0SKYyoBoIA5615mfPmkVH3xJSsQatOXWY+SZGr22iRTw/+mrMHVomjF9qtBD+8 oEH3cgQ3JDHn/Ee3lzAEAc9EqAczxED3R+w/9UczjqQVWEeGWe9STERercoQand0jbN+ a00g== X-Gm-Message-State: ALoCoQnyiSLmgXU0YV+tnfLZt9zsEs4IhV+Z0tZyVs1GcRwVzkQANo15PiEVHqI8x8YGlpS1AZ0V X-Received: by 10.112.145.133 with SMTP id su5mr750120lbb.17.1424895607484; Wed, 25 Feb 2015 12:20:07 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.140 with SMTP id jo12ls868864lab.19.gmail; Wed, 25 Feb 2015 12:20:07 -0800 (PST) X-Received: by 10.112.134.167 with SMTP id pl7mr4363290lbb.63.1424895607275; Wed, 25 Feb 2015 12:20:07 -0800 (PST) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id q10si29606930laq.122.2015.02.25.12.20.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 12:20:07 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by labhs14 with SMTP id hs14so6528343lab.1 for ; Wed, 25 Feb 2015 12:20:07 -0800 (PST) X-Received: by 10.152.4.227 with SMTP id n3mr1477646lan.72.1424895607116; Wed, 25 Feb 2015 12:20:07 -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 h5csp2863429lbj; Wed, 25 Feb 2015 12:20:06 -0800 (PST) X-Received: by 10.140.149.130 with SMTP id 124mr10920518qhv.40.1424895605944; Wed, 25 Feb 2015 12:20:05 -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 n52si10209176qge.91.2015.02.25.12.20.04 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 25 Feb 2015 12:20:05 -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 1YQiR8-0006k9-WD; Wed, 25 Feb 2015 20:20:03 +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 1YQiQz-0006iV-BL for lng-odp@lists.linaro.org; Wed, 25 Feb 2015 20:19:53 +0000 Received: by qcwb13 with SMTP id b13so5027079qcw.6 for ; Wed, 25 Feb 2015 12:19:48 -0800 (PST) X-Received: by 10.229.71.69 with SMTP id g5mr10877724qcj.7.1424895588249; Wed, 25 Feb 2015 12:19:48 -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 17sm14171410qhq.23.2015.02.25.12.19.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Feb 2015 12:19:47 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 25 Feb 2015 15:19:26 -0500 Message-Id: <1424895578-24971-2-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424895578-24971-1-git-send-email-mike.holmes@linaro.org> References: <1424895578-24971-1-git-send-email-mike.holmes@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH v2 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.215.49 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)