From patchwork Tue Aug 4 22:41:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 51917 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id C7B6522E8E for ; Tue, 4 Aug 2015 22:46:39 +0000 (UTC) Received: by lady2 with SMTP id y2sf8796283lad.1 for ; Tue, 04 Aug 2015 15:46:38 -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=Rwg3/gLBQoLnMMMZ67G0pIShkXvCAb/3YmVOtgy2E5gZ/bWlD7cncg/8Fli2bQ+RsY rmtktNKxNFTNyNWNkA2w5v3sTCnJ9Psm4P7fFESt2pKYaxLsGR1vGRU11UQ1XvcEYio4 mEVo8/sfL9suJ2L1p6luAXbmn5A4QaprVDBzJ55tufYQ6Xl1XUq5XuYNGI2K+qsaDdIz Sk32LUIiDrRRj+y4bzehJ9u2EWy8S8UUEusUaIiAD3HlJBneIK/6YXqTrm2qG1j1KICY iahjJVKw59mdkyhIO60bwrobNNxrl85pJAH2ksnQFHatz0b/RrdMaiS2PqrhC1IFwrj+ h5nw== X-Gm-Message-State: ALoCoQnAyYfi7VE4IjNXi9McYxWGVe3xOEpQnwPa3OhVTIfoOZ1Qc1aURFuLMxA5o3ikWT47Bem0 X-Received: by 10.152.182.226 with SMTP id eh2mr1793375lac.0.1438728398377; Tue, 04 Aug 2015 15:46:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.100 with SMTP id j4ls116427lah.9.gmail; Tue, 04 Aug 2015 15:46:38 -0700 (PDT) X-Received: by 10.152.3.199 with SMTP id e7mr6538509lae.98.1438728398231; Tue, 04 Aug 2015 15:46:38 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id e8si843933lah.96.2015.08.04.15.46.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Aug 2015 15:46:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by labgo9 with SMTP id go9so17125043lab.3 for ; Tue, 04 Aug 2015 15:46:38 -0700 (PDT) X-Received: by 10.152.9.66 with SMTP id x2mr6119343laa.76.1438728398007; Tue, 04 Aug 2015 15:46:38 -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 l6csp34545lba; Tue, 4 Aug 2015 15:46:36 -0700 (PDT) X-Received: by 10.50.13.10 with SMTP id d10mr2601298igc.20.1438728396099; Tue, 04 Aug 2015 15:46:36 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id hz1si10151433igb.78.2015.08.04.15.46.33; Tue, 04 Aug 2015 15:46:36 -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 0013D61F3F; Tue, 4 Aug 2015 22:46:32 +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_H3, RCVD_IN_MSPIKE_WL, 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 F299E61F7F; Tue, 4 Aug 2015 22:45:18 +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 6647761DF6; Tue, 4 Aug 2015 22:42:51 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by lists.linaro.org (Postfix) with ESMTPS id 832ED61E27 for ; Tue, 4 Aug 2015 22:41:33 +0000 (UTC) Received: by oihn130 with SMTP id n130so13361754oih.2 for ; Tue, 04 Aug 2015 15:41:33 -0700 (PDT) X-Received: by 10.202.176.213 with SMTP id z204mr5140650oie.38.1438728093066; Tue, 04 Aug 2015 15:41:33 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by smtp.gmail.com with ESMTPSA id sx2sm519170obc.0.2015.08.04.15.41.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Aug 2015 15:41:32 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 4 Aug 2015 17:41:13 -0500 Message-Id: <1438728085-3240-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438728085-3240-1-git-send-email-bill.fischofer@linaro.org> References: <1438728085-3240-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv7 01/13] 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.44 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