From patchwork Wed Aug 26 23:41:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 52743 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id B202122E9E for ; Wed, 26 Aug 2015 23:43:38 +0000 (UTC) Received: by lbcli1 with SMTP id li1sf806145lbc.2 for ; Wed, 26 Aug 2015 16:43:37 -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=/5+SvrTh3P7ubfUuYufC5OJb5oQNYsOOW0sHUDmsfGM=; b=icPlGVck9SyJtYraaw8izhiEK4edtIYu8idyQOba67jnrgmHL8ATAF/Vf9UBbYEovx EsQxPlMG7kLjCxTbcdlEUmB+ciLZydVSkYqKf7uBDzeI5EbW+RvYPZj4DiLzIQTuR0+4 N4rwRyoQCnqhPePQGwPQSOQB9uKOYw6ol/NSo7aPHeQWnZtuMIjmp8y5KcpUffZyL0GA d/ln/cLAZSi2e4ZJPGNUrRSIkdMc8kOQDrFZ5II0H0BukZocxQeTjaiALvvgh0WwiA7F bryMlyoOBQwNTKR2u/Fcc6Bw0DhKLtP6yqTxT4oHF55OkJWOeKeWhK9otni6XP56yf7G 3oBQ== X-Gm-Message-State: ALoCoQkIYuXowJ96mMumRDKoAwLD1+BW68y2ZQnbwvfP9u2ref8ycJUJGpVHNayLMktX3Re3KMot X-Received: by 10.112.16.200 with SMTP id i8mr280876lbd.20.1440632617680; Wed, 26 Aug 2015 16:43:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.72 with SMTP id w8ls39841laj.7.gmail; Wed, 26 Aug 2015 16:43:37 -0700 (PDT) X-Received: by 10.152.23.132 with SMTP id m4mr707244laf.107.1440632617547; Wed, 26 Aug 2015 16:43:37 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id j10si286626lbp.23.2015.08.26.16.43.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Aug 2015 16:43:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbbtg9 with SMTP id tg9so1582793lbb.1 for ; Wed, 26 Aug 2015 16:43:37 -0700 (PDT) X-Received: by 10.152.42.132 with SMTP id o4mr758773lal.88.1440632617440; Wed, 26 Aug 2015 16:43:37 -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.162.200 with SMTP id yc8csp4256974lbb; Wed, 26 Aug 2015 16:43:36 -0700 (PDT) X-Received: by 10.140.151.212 with SMTP id 203mr2098951qhx.1.1440632615844; Wed, 26 Aug 2015 16:43:35 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n61si288836qge.59.2015.08.26.16.43.35; Wed, 26 Aug 2015 16:43:35 -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 E7FE96212E; Wed, 26 Aug 2015 23:43:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 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 [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id AA2AA6209A; Wed, 26 Aug 2015 23:41:49 +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 116ED6212C; Wed, 26 Aug 2015 23:41:44 +0000 (UTC) Received: from mail-ob0-f179.google.com (mail-ob0-f179.google.com [209.85.214.179]) by lists.linaro.org (Postfix) with ESMTPS id 0563162048 for ; Wed, 26 Aug 2015 23:41:41 +0000 (UTC) Received: by obkg7 with SMTP id g7so2555574obk.3 for ; Wed, 26 Aug 2015 16:41:40 -0700 (PDT) X-Received: by 10.182.76.100 with SMTP id j4mr1036457obw.14.1440632500509; Wed, 26 Aug 2015 16:41:40 -0700 (PDT) Received: from Ubuntu15.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by smtp.gmail.com with ESMTPSA id np9sm194060obb.14.2015.08.26.16.41.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Aug 2015 16:41:40 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 26 Aug 2015 18:41:26 -0500 Message-Id: <1440632493-31734-4-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1440632493-31734-1-git-send-email-bill.fischofer@linaro.org> References: <1440632493-31734-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv3 03/10] api: schedule: add additional scheduler group APIs 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.217.170 as permitted sender) smtp.mailfrom=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 Add the following additional scheduler group APIs: odp_schedule_group_lookup() odp_schedule_group_join() odp_schedule_group_leave() odp_schedule_group_thrmask() Signed-off-by: Bill Fischofer --- include/odp/api/schedule.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/include/odp/api/schedule.h b/include/odp/api/schedule.h index 7c5955b..9f62bf1 100644 --- a/include/odp/api/schedule.h +++ b/include/odp/api/schedule.h @@ -220,6 +220,63 @@ 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 + * + * Return 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 + * + * Join 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 + * + * Remove 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); + +/** + * Get a schedule group's thrmask + * + * @param group Schedule group handle + * @param[out] thrmask The current thrmask used for this schedule group + * + * @retval 0 On success + * @retval <0 Invalid group specified + */ +int odp_schedule_group_thrmask(odp_schedule_group_t group, + odp_thrmask_t *thrmask); + +/** * Initialize ordered context lock * * Initialize an ordered queue context lock. The lock can be associated only