2 * Copyright 2017 The Chromium OS Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
9 struct drv_array *drv_array_init(uint32_t item_size);
11 /* The data will be copied and appended to the array. */
12 void *drv_array_append(struct drv_array *array, void *data);
14 /* The data at the specified index will be freed -- the array will shrink. */
15 void drv_array_remove(struct drv_array *array, uint32_t idx);
17 void *drv_array_at_idx(struct drv_array *array, uint32_t idx);
19 uint32_t drv_array_size(struct drv_array *array);
21 /* The array and all associated data will be freed. */
22 void drv_array_destroy(struct drv_array *array);