@@ -187,12 +187,12 @@ int odp_schedule_num_prio(void);
/**
* Schedule group create
*
- * Creates a schedule group with the thread mask. Only threads in the
+ * Create a schedule group with the specified thread mask. Only threads in the
* mask will receive events from a queue that belongs to the schedule group.
* Thread masks of various schedule groups may overlap. There are predefined
* groups such as ODP_SCHED_GROUP_ALL and ODP_SCHED_GROUP_WORKER, which are
- * always present and automatically updated. Group name is optional
- * (may be NULL) and can have ODP_SCHED_GROUP_NAME_LEN characters in maximum.
+ * always present and automatically updated. Group name is optional (may be
+ * NULL) and can contain a maximum of ODP_SCHED_GROUP_NAME_LEN characters.
*
* @param name Schedule group name
* @param mask Thread mask
@@ -208,7 +208,7 @@ odp_schedule_group_t odp_schedule_group_create(const char *name,
/**
* Schedule group destroy
*
- * Destroys a schedule group. All queues belonging to the schedule group must
+ * Destroy a schedule group. All queues belonging to the schedule group must
* be destroyed before destroying the group. Other operations on this group
* must not be invoked in parallel.
*
@@ -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);
+
+/**
* @}
*/
Add the following scheduler group APIs: odp_schedule_group_lookup() odp_schedule_group_join() odp_schedule_group_leave() odp_schedule_group_thrmask() Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- include/odp/api/schedule.h | 65 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-)