Message ID | 1438310507-10750-2-git-send-email-bill.fischofer@linaro.org |
---|---|
State | New |
Headers | show |
On 07/31/15 05:41, Bill Fischofer wrote: > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > 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 > + * I just found thing which are not consistent in our api. Some times in function description we write "Joins a threadmask to an existing schedule group", but in other case it is "Join a threadmask to an existing schedule group". I.e. what function does vice what to do with that function (conjunctive mood and imperative mood). And for now it's about 50% of each one :) Maxim. > + * @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
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
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- include/odp/api/schedule.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+)