From patchwork Fri Feb 20 21:44:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 44873 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 61B5C21561 for ; Fri, 20 Feb 2015 21:45:00 +0000 (UTC) Received: by labge10 with SMTP id ge10sf5513255lab.3 for ; Fri, 20 Feb 2015 13:44:59 -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:mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=QIiHQOdLa1xTsd9ZjaNoX8GudlYnahc77dJ0vrLDYjk=; b=C1oNVMRG1wpgI+3rZqp98oAVgxghTsoYHtWIy8FJProBghl+YJBRJYqs9vpVhByDW8 u2GcfUEO/WOeddqGwcaLYjavW6i3agjTuT4z1zpEZJMi6tpHVNtDkjMYoRJe7r7lhPMj 1hQSiu9l8I51JKtP+ZtKCifS0U6YtF9LnROiilm0fIZz2hgWsnPWYw1RuH94wYPgC6uq m2m/8wpnbXJRbM3Tocg+JhAabDlVGvwtqVGaCmB/gmqPE8/Qr8WLrX3Dyk4bb4kOicRW 6ATJ27Hhi1Aq4emobJ9Uh8/g/9KHu5cQA8spw6243riCL67JGzgDWm8cbBVnPzz9RNw3 QAVw== X-Gm-Message-State: ALoCoQl6gNqYdY2p1pSs5rqDjbVnL7N3X4nVyrM8Z8mQogh62N4ZTn/uqK7xWq1JWB3J1ffOoGQv X-Received: by 10.194.86.1 with SMTP id l1mr1574528wjz.0.1424468699253; Fri, 20 Feb 2015 13:44:59 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.3 with SMTP id m3ls275455laj.57.gmail; Fri, 20 Feb 2015 13:44:59 -0800 (PST) X-Received: by 10.152.28.5 with SMTP id x5mr620921lag.112.1424468699024; Fri, 20 Feb 2015 13:44:59 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id uh4si1725276lbb.109.2015.02.20.13.44.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Feb 2015 13:44:59 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by labpn19 with SMTP id pn19so8852432lab.4 for ; Fri, 20 Feb 2015 13:44:58 -0800 (PST) X-Received: by 10.112.135.196 with SMTP id pu4mr10113454lbb.41.1424468698928; Fri, 20 Feb 2015 13:44:58 -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 h5csp141632lbj; Fri, 20 Feb 2015 13:44:58 -0800 (PST) X-Received: by 10.229.64.67 with SMTP id d3mr24362545qci.9.1424468697489; Fri, 20 Feb 2015 13:44:57 -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 z32si14212612qgd.1.2015.02.20.13.44.56 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Feb 2015 13:44:57 -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 1YOvNW-0005JG-Hm; Fri, 20 Feb 2015 21:44:54 +0000 Received: from mail-qg0-f49.google.com ([209.85.192.49]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YOvNE-0005HF-Tt for lng-odp@lists.linaro.org; Fri, 20 Feb 2015 21:44:36 +0000 Received: by mail-qg0-f49.google.com with SMTP id q107so16324151qgd.8 for ; Fri, 20 Feb 2015 13:44:31 -0800 (PST) X-Received: by 10.140.102.205 with SMTP id w71mr26437546qge.104.1424468671792; Fri, 20 Feb 2015 13:44:31 -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 t8sm19659303qga.24.2015.02.20.13.44.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Feb 2015 13:44:30 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Fri, 20 Feb 2015 16:44:11 -0500 Message-Id: <1424468661-967-4-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424468661-967-1-git-send-email-mike.holmes@linaro.org> References: <1424468661-967-1-git-send-email-mike.holmes@linaro.org> MIME-Version: 1.0 X-Topics: patch Subject: [lng-odp] [PATCH 02/12] example: odp_generator: fix c99 implicit declaration 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: , 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.53 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 odp_generator.c:391:4: error: implicit declaration of function ‘usleep’ [-Werror=implicit-function-declaration] usleep(args->appl.interval * 1000); Signed-off-by: Mike Holmes --- example/generator/odp_generator.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 2d5eb26..853a9f0 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -12,6 +12,8 @@ /* enable strtok */ #define _POSIX_C_SOURCE 200112L + +#include #include #include #include @@ -390,7 +392,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)