diff options
Diffstat (limited to 'drivers/edgetpu/edgetpu-device-group.h')
-rw-r--r-- | drivers/edgetpu/edgetpu-device-group.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/edgetpu/edgetpu-device-group.h b/drivers/edgetpu/edgetpu-device-group.h index 7ec262f..5c5eaaf 100644 --- a/drivers/edgetpu/edgetpu-device-group.h +++ b/drivers/edgetpu/edgetpu-device-group.h @@ -157,6 +157,11 @@ struct edgetpu_list_group { for (l = list_entry(etdev->groups.next, typeof(*l), list), g = l->grp; \ &l->list != &etdev->groups; \ l = list_entry(l->list.next, typeof(*l), list), g = l->grp) + +/* Loop through group->clients (hold group->lock prior). */ +#define for_each_list_group_client(c, group) \ + list_for_each_entry(c, &group->clients, list) + /* * Returns if the group is waiting for members to join. * @@ -330,6 +335,9 @@ int edgetpu_device_group_sync_buffer(struct edgetpu_device_group *group, /* Clear all mappings for a device group. */ void edgetpu_mappings_clear_group(struct edgetpu_device_group *group); +/* Return total size of all mappings for the group in bytes */ +size_t edgetpu_group_mappings_total_size(struct edgetpu_device_group *group); + /* * Return context ID for group MMU mappings. * |