From patchwork Mon Aug 3 01:17:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 51824 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id DB975229FD for ; Mon, 3 Aug 2015 01:19:23 +0000 (UTC) Received: by lbcjf8 with SMTP id jf8sf39138608lbc.0 for ; Sun, 02 Aug 2015 18:19:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to: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=OH1UiOfwV+4eb4ZsrQ8A+uYeT/uJQJkKmYJvUg6iess=; b=bcA/W4R7vzfb4Tzs41m79ow/v5+06vo6vzbXW8w1nL84KoqbYn4Zr400kD+pHZvZFk WcPeuM314AVQV8KgRmxLnv3Mx1tT+2KW3rJdMoNRFzjbu2Qs6nOLhBKoIRNrmAcE0rZ6 ccZl0gwwckt7Kn05jJw5CTxtuRLzppjraXTsmP/a+mKxRe2+XVrSvFDE4wZEO0ySNG8F NSzBOrnLxu4a2tu/CIJKa0hTx/iJcx+aFoMndt8/Ddu2LEGYxGWRzWfvXRDd08XKZ3jP KxAxRu6MkCBOZa+KtstpcQa8A2z5BlQTNvBXQhsoj0f1GKfQPx3FddQWlDJ2cyJ1PykD 4PBQ== X-Gm-Message-State: ALoCoQnskVPWujn+Emk91pA5OHdS4tFhBItcDZCGIGFy5k1yuvpPDrklawLKuzBMceOaJOmTBv+G X-Received: by 10.180.87.201 with SMTP id ba9mr4896066wib.3.1438564762434; Sun, 02 Aug 2015 18:19:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.178.197 with SMTP id da5ls70956lac.61.gmail; Sun, 02 Aug 2015 18:19:22 -0700 (PDT) X-Received: by 10.112.168.102 with SMTP id zv6mr14451067lbb.45.1438564762273; Sun, 02 Aug 2015 18:19:22 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id ex6si10636002lac.82.2015.08.02.18.19.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Aug 2015 18:19:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by labsr2 with SMTP id sr2so1297747lab.2 for ; Sun, 02 Aug 2015 18:19:21 -0700 (PDT) X-Received: by 10.112.125.34 with SMTP id mn2mr13030735lbb.76.1438564761849; Sun, 02 Aug 2015 18:19:21 -0700 (PDT) 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.7.198 with SMTP id l6csp1598183lba; Sun, 2 Aug 2015 18:19:20 -0700 (PDT) X-Received: by 10.140.86.41 with SMTP id o38mr21151450qgd.102.1438564760107; Sun, 02 Aug 2015 18:19:20 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z12si15323800qhd.79.2015.08.02.18.19.19; Sun, 02 Aug 2015 18:19:20 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 3825361D85; Mon, 3 Aug 2015 01:19:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id DDBAA61CB1; Mon, 3 Aug 2015 01:19:08 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id BB60061D83; Mon, 3 Aug 2015 01:19:05 +0000 (UTC) Received: from mail-qg0-f48.google.com (mail-qg0-f48.google.com [209.85.192.48]) by lists.linaro.org (Postfix) with ESMTPS id 93E4B61B7F for ; Mon, 3 Aug 2015 01:18:04 +0000 (UTC) Received: by qged69 with SMTP id d69so79669278qge.0 for ; Sun, 02 Aug 2015 18:18:04 -0700 (PDT) X-Received: by 10.140.196.8 with SMTP id r8mr22848078qha.25.1438564684386; Sun, 02 Aug 2015 18:18:04 -0700 (PDT) Received: from localhost.localdomain ([64.88.227.134]) by smtp.gmail.com with ESMTPSA id 60sm6125044qgy.37.2015.08.02.18.17.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Aug 2015 18:18:03 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sun, 2 Aug 2015 18:17:27 -0700 Message-Id: <1438564655-12686-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438564655-12686-1-git-send-email-bill.fischofer@linaro.org> References: <1438564655-12686-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv5 1/9] api: schedule: additional scheduler group functions X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 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" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@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.46 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: Bill Fischofer --- include/odp/api/schedule.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/include/odp/api/schedule.h b/include/odp/api/schedule.h index 36e52cd..95fc8df 100644 --- a/include/odp/api/schedule.h +++ b/include/odp/api/schedule.h @@ -220,6 +220,61 @@ odp_schedule_group_t odp_schedule_group_create(const char *name, int odp_schedule_group_destroy(odp_schedule_group_t group); /** + * Look up a schedule group by name + * + * Returns the handle of a schedule group from its name + * + * @param name Name of schedule group + * + * @return Handle of schedule group for specified name + * @retval ODP_SCHEDULE_GROUP_INVALID No matching schedule group found + */ +odp_schedule_group_t odp_schedule_group_lookup(const char *name); + +/** + * Join a schedule group + * + * Joins a threadmask to an existing schedule group + * + * @param group Schdule group handle + * @param mask Thread mask + * + * @retval 0 on success + * @retval <0 on failure + */ +int odp_schedule_group_join(odp_schedule_group_t group, + const odp_thrmask_t *mask); + +/** + * Leave a schedule group + * + * Removes a threadmask from an existing schedule group + * + * @param group Schedule group handle + * @param mask Thread mask + * + * @retval 0 on success + * @retval <0 on failure + * + * @note Leaving a schedule group means threads in the specified mask will no + * longer receive events from queues belonging to the specified schedule + * group. This effect is not instantaneous, however, and events that have been + * prestaged may still be presented to the masked threads. + */ +int odp_schedule_group_leave(odp_schedule_group_t group, + const odp_thrmask_t *mask); + +/** + * Count members in a schedule group + * + * @param group Schedule group handle + * + * @return Count of threads currently members of this schedule group. + * @retval <0 Invalid group specified + */ +int odp_schedule_group_count(odp_schedule_group_t group); + +/** * Initialize ordered context lock * * Initialize an ordered queue context lock. The lock can be associated only