| /kernel/linux/linux-5.10/drivers/misc/vmw_vmci/ |
| D | vmci_handle_array.c | 19 struct vmci_handle_arr *array; in vmci_handle_arr_create() local 28 array = kmalloc(handle_arr_calc_size(capacity), GFP_ATOMIC); in vmci_handle_arr_create() 29 if (!array) in vmci_handle_arr_create() 32 array->capacity = capacity; in vmci_handle_arr_create() 33 array->max_capacity = max_capacity; in vmci_handle_arr_create() 34 array->size = 0; in vmci_handle_arr_create() 36 return array; in vmci_handle_arr_create() 39 void vmci_handle_arr_destroy(struct vmci_handle_arr *array) in vmci_handle_arr_destroy() argument 41 kfree(array); in vmci_handle_arr_destroy() 47 struct vmci_handle_arr *array = *array_ptr; in vmci_handle_arr_append_entry() local [all …]
|
| /kernel/linux/linux-4.19/drivers/misc/vmw_vmci/ |
| D | vmci_handle_array.c | 27 struct vmci_handle_arr *array; in vmci_handle_arr_create() local 36 array = kmalloc(handle_arr_calc_size(capacity), GFP_ATOMIC); in vmci_handle_arr_create() 37 if (!array) in vmci_handle_arr_create() 40 array->capacity = capacity; in vmci_handle_arr_create() 41 array->max_capacity = max_capacity; in vmci_handle_arr_create() 42 array->size = 0; in vmci_handle_arr_create() 44 return array; in vmci_handle_arr_create() 47 void vmci_handle_arr_destroy(struct vmci_handle_arr *array) in vmci_handle_arr_destroy() argument 49 kfree(array); in vmci_handle_arr_destroy() 55 struct vmci_handle_arr *array = *array_ptr; in vmci_handle_arr_append_entry() local [all …]
|
| /kernel/linux/linux-5.10/drivers/dma-buf/ |
| D | dma-fence-array.c | 3 * dma-fence-array: aggregate fences to be waited together 14 #include <linux/dma-fence-array.h> 28 static void dma_fence_array_set_pending_error(struct dma_fence_array *array, in dma_fence_array_set_pending_error() argument 36 cmpxchg(&array->base.error, PENDING_ERROR, error); in dma_fence_array_set_pending_error() 39 static void dma_fence_array_clear_pending_error(struct dma_fence_array *array) in dma_fence_array_clear_pending_error() argument 42 cmpxchg(&array->base.error, PENDING_ERROR, 0); in dma_fence_array_clear_pending_error() 47 struct dma_fence_array *array = container_of(wrk, typeof(*array), work); in irq_dma_fence_array_work() local 49 dma_fence_array_clear_pending_error(array); in irq_dma_fence_array_work() 51 dma_fence_signal(&array->base); in irq_dma_fence_array_work() 52 dma_fence_put(&array->base); in irq_dma_fence_array_work() [all …]
|
| /kernel/linux/linux-4.19/drivers/dma-buf/ |
| D | dma-fence-array.c | 2 * dma-fence-array: aggregate fences to be waited together 22 #include <linux/dma-fence-array.h> 36 struct dma_fence_array *array = container_of(wrk, typeof(*array), work); in irq_dma_fence_array_work() local 38 dma_fence_signal(&array->base); in irq_dma_fence_array_work() 39 dma_fence_put(&array->base); in irq_dma_fence_array_work() 47 struct dma_fence_array *array = array_cb->array; in dma_fence_array_cb_func() local 49 if (atomic_dec_and_test(&array->num_pending)) in dma_fence_array_cb_func() 50 irq_work_queue(&array->work); in dma_fence_array_cb_func() 52 dma_fence_put(&array->base); in dma_fence_array_cb_func() 57 struct dma_fence_array *array = to_dma_fence_array(fence); in dma_fence_array_enable_signaling() local [all …]
|
| /kernel/linux/linux-5.10/sound/hda/ |
| D | array.c | 11 * snd_array_new - get a new element from the given array 12 * @array: the array object 14 * Get a new element from the given array. If it exceeds the 15 * pre-allocated array size, re-allocate the array. 19 void *snd_array_new(struct snd_array *array) in snd_array_new() argument 21 if (snd_BUG_ON(!array->elem_size)) in snd_array_new() 23 if (array->used >= array->alloced) { in snd_array_new() 24 int num = array->alloced + array->alloc_align; in snd_array_new() 25 int oldsize = array->alloced * array->elem_size; in snd_array_new() 26 int size = (num + 1) * array->elem_size; in snd_array_new() [all …]
|
| /kernel/linux/linux-4.19/sound/hda/ |
| D | array.c | 10 * snd_array_new - get a new element from the given array 11 * @array: the array object 13 * Get a new element from the given array. If it exceeds the 14 * pre-allocated array size, re-allocate the array. 18 void *snd_array_new(struct snd_array *array) in snd_array_new() argument 20 if (snd_BUG_ON(!array->elem_size)) in snd_array_new() 22 if (array->used >= array->alloced) { in snd_array_new() 23 int num = array->alloced + array->alloc_align; in snd_array_new() 24 int oldsize = array->alloced * array->elem_size; in snd_array_new() 25 int size = (num + 1) * array->elem_size; in snd_array_new() [all …]
|
| /kernel/linux/linux-4.19/Documentation/ |
| D | flexible-arrays.txt | 19 piecing together an array from smaller parts; the flexible array library 22 A flexible array holds an arbitrary (within limits) number of fixed-sized 27 system page size, and putting data into a flexible array requires a copy 29 locking at all; if concurrent access to an array is possible, then the 32 The creation of a flexible array is done with:: 41 maximum number of objects which can be stored in the array. The flags 50 This macro will result in a definition of an array with the given name; the 53 Storing data into a flexible array is accomplished with a call to:: 55 int flex_array_put(struct flex_array *array, unsigned int element_nr, 58 This call will copy the data from src into the array, in the position [all …]
|
| /kernel/linux/linux-5.10/drivers/md/persistent-data/ |
| D | dm-array.h | 14 * The dm-array is a persistent version of an array. It packs the data 25 * size along with the array root in your encompassing data. 27 * Array entries are indexed via an unsigned integer starting from zero. 28 * Arrays are not sparse; if you resize an array to have 'n' entries then 33 * a) initialise a dm_array_info structure. This describes the array 39 * disk that holds a particular instance of an array. You may have a 41 * want to create a brand new, empty array with dm_array_empty(). 45 * root for a _new_ array. If you've incremented the old root, via 49 * c) resize an array with dm_array_resize(). 51 * d) Get a value from the array with dm_array_get_value(). [all …]
|
| /kernel/linux/linux-4.19/drivers/md/persistent-data/ |
| D | dm-array.h | 14 * The dm-array is a persistent version of an array. It packs the data 25 * size along with the array root in your encompassing data. 27 * Array entries are indexed via an unsigned integer starting from zero. 28 * Arrays are not sparse; if you resize an array to have 'n' entries then 33 * a) initialise a dm_array_info structure. This describes the array 39 * disk that holds a particular instance of an array. You may have a 41 * want to create a brand new, empty array with dm_array_empty(). 45 * root for a _new_ array. If you've incremented the old root, via 49 * c) resize an array with dm_array_resize(). 51 * d) Get a value from the array with dm_array_get_value(). [all …]
|
| /kernel/linux/linux-4.19/Documentation/core-api/ |
| D | flexible-arrays.rst | 17 together an array from smaller parts; the flexible array library exists to make 20 A flexible array holds an arbitrary (within limits) number of fixed-sized 25 system page size, and putting data into a flexible array requires a copy 27 locking at all; if concurrent access to an array is possible, then the 30 The creation of a flexible array is done with :c:func:`flex_array_alloc()`:: 39 maximum number of objects which can be stored in the array. The flags 48 This macro will result in a definition of an array with the given name; the 51 Storing data into a flexible array is accomplished with a call to 54 int flex_array_put(struct flex_array *array, unsigned int element_nr, 57 This call will copy the data from src into the array, in the position [all …]
|
| D | assoc_array.rst | 2 Generic Associative Array Implementation 8 This associative array implementation is an object container with the following 18 2. Objects do not need to contain linkage blocks for use by the array. This 20 Rather, the array is made up of metadata blocks that point to objects. 22 3. Objects require index keys to locate them within the array. 25 already in the array will replace the old object. 32 7. Index keys can include a hash to scatter objects throughout the array. 34 8. The array can iterated over. The objects will not necessarily come out in 37 9. The array can be iterated over whilst it is being modified, provided the 43 10. Objects in the array can be looked up by means of their index key. [all …]
|
| /kernel/linux/linux-4.19/kernel/bpf/ |
| D | arraymap.c | 27 static void bpf_array_free_percpu(struct bpf_array *array) in bpf_array_free_percpu() argument 31 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu() 32 free_percpu(array->pptrs[i]); in bpf_array_free_percpu() 37 static int bpf_array_alloc_percpu(struct bpf_array *array) in bpf_array_alloc_percpu() argument 42 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu() 43 ptr = __alloc_percpu_gfp(array->elem_size, 8, in bpf_array_alloc_percpu() 46 bpf_array_free_percpu(array); in bpf_array_alloc_percpu() 49 array->pptrs[i] = ptr; in bpf_array_alloc_percpu() 85 struct bpf_array *array; in array_map_alloc() local 101 /* round up array size to nearest power of 2, in array_map_alloc() [all …]
|
| D | reuseport_array.c | 51 struct reuseport_array *array = reuseport_array(map); in reuseport_array_lookup_elem() local 54 if (unlikely(index >= array->map.max_entries)) in reuseport_array_lookup_elem() 57 return rcu_dereference(array->ptrs[index]); in reuseport_array_lookup_elem() 63 struct reuseport_array *array = reuseport_array(map); in reuseport_array_delete_elem() local 71 if (!rcu_access_pointer(array->ptrs[index])) in reuseport_array_delete_elem() 76 sk = rcu_dereference_protected(array->ptrs[index], in reuseport_array_delete_elem() 81 RCU_INIT_POINTER(array->ptrs[index], NULL); in reuseport_array_delete_elem() 95 struct reuseport_array *array = reuseport_array(map); in reuseport_array_free() local 103 * array now. Hence, this function only races with in reuseport_array_free() 108 * both removing sk from "array". Who removes it in reuseport_array_free() [all …]
|
| /kernel/linux/linux-5.10/Documentation/admin-guide/ |
| D | md.rst | 22 or, to assemble a partitionable array:: 44 level of the RAID array 92 If a raid5 or raid6 array is both dirty and degraded, it could have 98 For this reason, md will normally refuse to start such an array. This 99 requires the sysadmin to take action to explicitly start the array 104 This option is not really available if the array has the root 106 array, md supports a module parameter ``start_dirty_degraded`` which, 131 An array is ``created`` by writing appropriate superblocks to all 138 An array should be created by a user-space tool. This will write 139 superblocks to all devices. It will usually mark the array as [all …]
|
| /kernel/linux/linux-4.19/Documentation/admin-guide/ |
| D | md.rst | 22 or, to assemble a partitionable array:: 44 level of the RAID array 92 If a raid5 or raid6 array is both dirty and degraded, it could have 98 For this reason, md will normally refuse to start such an array. This 99 requires the sysadmin to take action to explicitly start the array 104 This option is not really available if the array has the root 106 array, md supports a module parameter ``start_dirty_degraded`` which, 131 An array is ``created`` by writing appropriate superblocks to all 138 An array should be created by a user-space tool. This will write 139 superblocks to all devices. It will usually mark the array as [all …]
|
| /kernel/linux/linux-5.10/kernel/bpf/ |
| D | arraymap.c | 21 static void bpf_array_free_percpu(struct bpf_array *array) in bpf_array_free_percpu() argument 25 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu() 26 free_percpu(array->pptrs[i]); in bpf_array_free_percpu() 31 static int bpf_array_alloc_percpu(struct bpf_array *array) in bpf_array_alloc_percpu() argument 36 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu() 37 ptr = __alloc_percpu_gfp(array->elem_size, 8, in bpf_array_alloc_percpu() 40 bpf_array_free_percpu(array); in bpf_array_alloc_percpu() 43 array->pptrs[i] = ptr; in bpf_array_alloc_percpu() 89 struct bpf_array *array; in array_map_alloc() local 105 /* round up array size to nearest power of 2, in array_map_alloc() [all …]
|
| D | reuseport_array.c | 54 struct reuseport_array *array = reuseport_array(map); in reuseport_array_lookup_elem() local 57 if (unlikely(index >= array->map.max_entries)) in reuseport_array_lookup_elem() 60 return rcu_dereference(array->ptrs[index]); in reuseport_array_lookup_elem() 66 struct reuseport_array *array = reuseport_array(map); in reuseport_array_delete_elem() local 74 if (!rcu_access_pointer(array->ptrs[index])) in reuseport_array_delete_elem() 79 sk = rcu_dereference_protected(array->ptrs[index], in reuseport_array_delete_elem() 84 RCU_INIT_POINTER(array->ptrs[index], NULL); in reuseport_array_delete_elem() 98 struct reuseport_array *array = reuseport_array(map); in reuseport_array_free() local 104 * array now. Hence, this function only races with in reuseport_array_free() 109 * both removing sk from "array". Who removes it in reuseport_array_free() [all …]
|
| /kernel/linux/linux-4.19/Documentation/RCU/ |
| D | arrayRCU.txt | 14 array that is separately indexed. It might be tempting to consider use 15 of RCU to instead protect the index into an array, however, this use 30 Hash tables are often implemented as an array, where each array entry 33 to other array-of-list situations, such as radix trees. 39 located in each array element, and where the array is never resized, 51 function formerly used by the System V IPC code. The array is used 60 the new array, and invokes ipc_rcu_putref() to free up the old array. 92 * contents of the new array are visible before the new 93 * array becomes visible. 101 The ipc_rcu_putref() function decrements the array's reference count [all …]
|
| /kernel/linux/linux-5.10/Documentation/core-api/ |
| D | assoc_array.rst | 2 Generic Associative Array Implementation 8 This associative array implementation is an object container with the following 18 2. Objects do not need to contain linkage blocks for use by the array. This 20 Rather, the array is made up of metadata blocks that point to objects. 22 3. Objects require index keys to locate them within the array. 25 already in the array will replace the old object. 32 7. Index keys can include a hash to scatter objects throughout the array. 34 8. The array can iterated over. The objects will not necessarily come out in 37 9. The array can be iterated over while it is being modified, provided the 43 10. Objects in the array can be looked up by means of their index key. [all …]
|
| /kernel/linux/linux-4.19/include/linux/ |
| D | flex_array.h | 15 * This is meant to replace cases where an array-like 51 * Defines a statically allocated flex array and ensures its parameters are 66 * flex_array_alloc() - Creates a flexible array. 79 * @fa: array to allocate memory to. 89 * flex_array_free() - Removes all elements of a flexible array. 90 * @fa: array to be freed. 95 * flex_array_free_parts() - Removes all elements of a flexible array, but 96 * leaves the array itself in place. 97 * @fa: array to be emptied. 102 * flex_array_put() - Stores data into a flexible array. [all …]
|
| /kernel/linux/linux-5.10/kernel/ |
| D | stacktrace.c | 19 * @entries: Pointer to storage array 20 * @nr_entries: Number of entries in the storage array 40 * @entries: Pointer to storage array 41 * @nr_entries: Number of entries in the storage array 104 * stack_trace_save - Save a stack trace into a storage array 105 * @store: Pointer to storage array 106 * @size: Size of the storage array 127 * stack_trace_save_tsk - Save a task stack trace into a storage array 129 * @store: Pointer to storage array 130 * @size: Size of the storage array [all …]
|
| /kernel/linux/linux-5.10/Documentation/RCU/ |
| D | arrayRCU.rst | 16 array that is separately indexed. It might be tempting to consider use 17 of RCU to instead protect the index into an array, however, this use 34 Hash tables are often implemented as an array, where each array entry 37 to other array-of-list situations, such as radix trees. 45 located in each array element, and where the array is never resized, 61 function formerly used by the System V IPC code. The array is used 70 the new array, and invokes ipc_rcu_putref() to free up the old array. 102 * contents of the new array are visible before the new 103 * array becomes visible. 111 The ipc_rcu_putref() function decrements the array's reference count [all …]
|
| /kernel/linux/linux-4.19/tools/perf/util/ |
| D | evsel.c | 115 * PERF_SAMPLE_IDENTIFIER) in a sample event i.e. in the array of struct 2012 const u64 *array = event->sample.array; in perf_evsel__parse_id_sample() local 2016 array += ((event->header.size - in perf_evsel__parse_id_sample() 2020 sample->id = *array; in perf_evsel__parse_id_sample() 2021 array--; in perf_evsel__parse_id_sample() 2025 u.val64 = *array; in perf_evsel__parse_id_sample() 2033 array--; in perf_evsel__parse_id_sample() 2037 sample->stream_id = *array; in perf_evsel__parse_id_sample() 2038 array--; in perf_evsel__parse_id_sample() 2042 sample->id = *array; in perf_evsel__parse_id_sample() [all …]
|
| /kernel/linux/linux-5.10/drivers/infiniband/hw/mthca/ |
| D | mthca_allocator.c | 111 * Array of pointers with lazy allocation of leaf pages. Callers of 113 * serialize access to the array. 118 void *mthca_array_get(struct mthca_array *array, int index) in mthca_array_get() argument 122 if (array->page_list[p].page) in mthca_array_get() 123 return array->page_list[p].page[index & MTHCA_ARRAY_MASK]; in mthca_array_get() 128 int mthca_array_set(struct mthca_array *array, int index, void *value) in mthca_array_set() argument 133 if (!array->page_list[p].page) in mthca_array_set() 134 array->page_list[p].page = (void **) get_zeroed_page(GFP_ATOMIC); in mthca_array_set() 136 if (!array->page_list[p].page) in mthca_array_set() 139 array->page_list[p].page[index & MTHCA_ARRAY_MASK] = value; in mthca_array_set() [all …]
|
| /kernel/linux/linux-4.19/drivers/infiniband/hw/mthca/ |
| D | mthca_allocator.c | 111 * Array of pointers with lazy allocation of leaf pages. Callers of 113 * serialize access to the array. 118 void *mthca_array_get(struct mthca_array *array, int index) in mthca_array_get() argument 122 if (array->page_list[p].page) in mthca_array_get() 123 return array->page_list[p].page[index & MTHCA_ARRAY_MASK]; in mthca_array_get() 128 int mthca_array_set(struct mthca_array *array, int index, void *value) in mthca_array_set() argument 133 if (!array->page_list[p].page) in mthca_array_set() 134 array->page_list[p].page = (void **) get_zeroed_page(GFP_ATOMIC); in mthca_array_set() 136 if (!array->page_list[p].page) in mthca_array_set() 139 array->page_list[p].page[index & MTHCA_ARRAY_MASK] = value; in mthca_array_set() [all …]
|