From patchwork Thu Jul 30 10:53:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 51686 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 35B7A22E7D for ; Thu, 30 Jul 2015 10:54:13 +0000 (UTC) Received: by lbbnr7 with SMTP id nr7sf10598568lbb.2 for ; Thu, 30 Jul 2015 03:54:12 -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=NB/pbkhJe32ueIRGKUKkfbYOZQwUAQ3jMC2Kg6tFHp8U6Ef+IY1E9judNQUMaq+8fK JA3FMaOGcacTbMxA75rs1Lm7tSZdtCZXZUCv4+sTdK4ca5WsxBR6DUeZnnjmVAHEcCkW pBqkNTsXGvBdoIsjnXIC6yGyORUMtyHZPU28cgAhggMYVQYC3zbL7socSJp7LOZTaynk /Ogmz5vpe4VIBYdMrl+i3B0wmuukQdyxDRjCKUsRtL/pf8MimZ9fcDP6nyfB+vQr1zlY URCa/inaWp1O2KfORdvyqZEbVvRMNgNrjhBFPmR7qM1gCzNsR/EPahRMayijaKv/jUUg ckTA== X-Gm-Message-State: ALoCoQllJm/3uU+luIWg32Jamzitcc1OB0Tc0Hb42aUuBI7ypL5RqXKYc/lItSKypHic7ukxZcJB X-Received: by 10.112.122.42 with SMTP id lp10mr11598342lbb.5.1438253652101; Thu, 30 Jul 2015 03:54:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.179.39 with SMTP id dd7ls164092lac.60.gmail; Thu, 30 Jul 2015 03:54:11 -0700 (PDT) X-Received: by 10.112.83.135 with SMTP id q7mr44004625lby.13.1438253651876; Thu, 30 Jul 2015 03:54:11 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id pa1si504770lbb.148.2015.07.30.03.54.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2015 03:54:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbud7 with SMTP id ud7so20557871lbb.3 for ; Thu, 30 Jul 2015 03:54:11 -0700 (PDT) X-Received: by 10.152.120.135 with SMTP id lc7mr42682810lab.41.1438253651625; Thu, 30 Jul 2015 03:54:11 -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 l6csp504724lba; Thu, 30 Jul 2015 03:54:10 -0700 (PDT) X-Received: by 10.140.22.135 with SMTP id 7mr68488583qgn.98.1438253650204; Thu, 30 Jul 2015 03:54:10 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j63si689698qgd.48.2015.07.30.03.54.09; Thu, 30 Jul 2015 03:54:10 -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 77D2561D53; Thu, 30 Jul 2015 10:54:09 +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 EB2CD61D6C; Thu, 30 Jul 2015 10:53:40 +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 2054261D60; Thu, 30 Jul 2015 10:53:35 +0000 (UTC) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by lists.linaro.org (Postfix) with ESMTPS id D22C66181A for ; Thu, 30 Jul 2015 10:53:33 +0000 (UTC) Received: by pdbbh15 with SMTP id bh15so22553403pdb.1 for ; Thu, 30 Jul 2015 03:53:33 -0700 (PDT) X-Received: by 10.70.100.103 with SMTP id ex7mr83666377pdb.91.1438253612945; Thu, 30 Jul 2015 03:53:32 -0700 (PDT) Received: from localhost.localdomain (205.158.164.101.ptr.us.xo.net. [205.158.164.101]) by smtp.gmail.com with ESMTPSA id mk6sm1560817pab.9.2015.07.30.03.53.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Jul 2015 03:53:32 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Thu, 30 Jul 2015 03:53:21 -0700 Message-Id: <1438253605-24259-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438253605-24259-1-git-send-email-bill.fischofer@linaro.org> References: <1438253605-24259-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv2 1/5] 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.217.178 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