Searched refs:array (Results 1 - 25 of 377) sorted by relevance

1234567891011>>

/linux-master/sound/hda/
H A Darray.c11 * 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) argument
21 if (snd_BUG_ON(!array->elem_size))
23 if (array->used >= array
45 snd_array_free(struct snd_array *array) argument
[all...]
/linux-master/drivers/misc/vmw_vmci/
H A Dvmci_handle_array.c13 struct vmci_handle_arr *array; local
22 array = kmalloc(struct_size(array, entries, capacity), GFP_ATOMIC);
23 if (!array)
26 array->capacity = capacity;
27 array->max_capacity = max_capacity;
28 array->size = 0;
30 return array;
33 void vmci_handle_arr_destroy(struct vmci_handle_arr *array) argument
35 kfree(array);
41 struct vmci_handle_arr *array = *array_ptr; local
71 vmci_handle_arr_remove_entry(struct vmci_handle_arr *array, struct vmci_handle entry_handle) argument
93 vmci_handle_arr_remove_tail(struct vmci_handle_arr *array) argument
110 vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, u32 index) argument
118 vmci_handle_arr_has_entry(const struct vmci_handle_arr *array, struct vmci_handle entry_handle) argument
134 vmci_handle_arr_get_handles(struct vmci_handle_arr *array) argument
[all...]
H A Dvmci_handle_array.h23 /* Select a default capacity that results in a 64 byte sized array */
27 void vmci_handle_arr_destroy(struct vmci_handle_arr *array);
30 struct vmci_handle vmci_handle_arr_remove_entry(struct vmci_handle_arr *array,
33 struct vmci_handle vmci_handle_arr_remove_tail(struct vmci_handle_arr *array);
35 vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, u32 index);
36 bool vmci_handle_arr_has_entry(const struct vmci_handle_arr *array,
38 struct vmci_handle *vmci_handle_arr_get_handles(struct vmci_handle_arr *array);
41 const struct vmci_handle_arr *array)
43 return array->size;
40 vmci_handle_arr_get_size( const struct vmci_handle_arr *array) argument
/linux-master/drivers/dma-buf/
H A Ddma-fence-array.c3 * 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, argument
36 cmpxchg(&array->base.error, PENDING_ERROR, error);
39 static void dma_fence_array_clear_pending_error(struct dma_fence_array *array) argument
42 cmpxchg(&array->base.error, PENDING_ERROR, 0);
47 struct dma_fence_array *array = container_of(wrk, typeof(*array), work); local
49 dma_fence_array_clear_pending_error(array);
51 dma_fence_signal(&array
60 struct dma_fence_array *array = array_cb->array; local
72 struct dma_fence_array *array = to_dma_fence_array(fence); local
105 struct dma_fence_array *array = to_dma_fence_array(fence); local
116 struct dma_fence_array *array = to_dma_fence_array(fence); local
129 struct dma_fence_array *array = to_dma_fence_array(fence); local
170 struct dma_fence_array *array; local
221 struct dma_fence_array *array = to_dma_fence_array(fence); local
238 struct dma_fence_array *array; local
257 struct dma_fence_array *array = to_dma_fence_array(head); local
[all...]
H A Ddma-fence-unwrap.c11 #include <linux/dma-fence-array.h>
16 /* Internal helper to start new array iteration, don't use directly */
20 cursor->array = dma_fence_chain_contained(cursor->chain);
22 return dma_fence_array_first(cursor->array);
53 tmp = dma_fence_array_next(cursor->array, cursor->index);
68 struct dma_fence *tmp, **array; local
95 array = kmalloc_array(count, sizeof(*array), GFP_KERNEL);
96 if (!array)
100 * This trashes the input fence array an
[all...]
H A Dst-dma-fence-unwrap.c8 #include <linux/dma-fence-array.h>
48 struct dma_fence_array *array; local
62 array = dma_fence_array_create(num_fences, fences,
65 if (!array)
67 return &array->base;
98 struct dma_fence *f, *chain, *array; local
107 array = mock_array(1, f);
108 if (!array)
111 chain = mock_chain(NULL, array);
121 struct dma_fence *fence, *f1, *f2, *array; local
209 struct dma_fence *fence, *f1, *f2, *array, *chain; local
[all...]
/linux-master/fs/xfs/scrub/
H A Dxfarray.h9 /* xfile array index type, along with cursor initialization */
13 /* Iterate each index of an xfile array. */
14 #define foreach_xfarray_idx(array, idx) \
16 (idx) < xfarray_length(array); \
20 /* Underlying file that backs the array. */
23 /* Number of array elements. */
26 /* Maximum possible array size. */
29 /* Number of unset slots in the array below @nr. */
32 /* Size of an array element. */
35 /* log2 of array elemen
53 xfarray_load_sparse( struct xfarray *array, uint64_t idx, void *rec) argument
68 xfarray_append(struct xfarray *array, const void *ptr) argument
84 xfarray_iter( struct xfarray *array, xfarray_idx_t *idx, void *rec) argument
110 struct xfarray *array; member in struct:xfarray_sortinfo
[all...]
H A Dxfarray.c19 * This memory array uses an xfile (which itself is a shmem file) to store
22 * because we don't have to pin so much memory. However, array access is less
23 * direct than would be in a regular memory array. Access to the array is
34 * buffer array items when we need space to store values temporarily.
36 static inline void *xfarray_scratch(struct xfarray *array) argument
38 return (array + 1);
41 /* Compute array index given an xfile offset. */
44 struct xfarray *array,
47 if (array
43 xfarray_idx( struct xfarray *array, loff_t pos) argument
54 xfarray_pos(struct xfarray *array, xfarray_idx_t idx) argument
76 struct xfarray *array; local
122 xfarray_destroy( struct xfarray *array) argument
131 xfarray_load( struct xfarray *array, xfarray_idx_t idx, void *ptr) argument
145 xfarray_is_unset( struct xfarray *array, loff_t pos) argument
167 xfarray_unset( struct xfarray *array, xfarray_idx_t idx) argument
200 xfarray_store( struct xfarray *array, xfarray_idx_t idx, const void *ptr) argument
223 xfarray_element_is_null( struct xfarray *array, const void *ptr) argument
235 xfarray_store_anywhere( struct xfarray *array, const void *ptr) argument
269 xfarray_length( struct xfarray *array) argument
286 xfarray_find_data( struct xfarray *array, xfarray_idx_t *cur, loff_t *pos) argument
339 xfarray_load_next( struct xfarray *array, xfarray_idx_t *idx, void *rec) argument
432 xfarray_pivot_rec_sz( struct xfarray *array) argument
440 xfarray_sortinfo_alloc( struct xfarray *array, xfarray_cmp_fn cmp_fn, unsigned int flags, struct xfarray_sortinfo **infop) argument
902 xfarray_sort( struct xfarray *array, xfarray_cmp_fn cmp_fn, unsigned int flags) argument
[all...]
/linux-master/include/linux/
H A Dassoc_array.h2 /* Generic associative array implementation.
20 * Generic associative array.
28 * Operations on objects and index keys for use by array manipulation routines.
54 static inline void assoc_array_init(struct assoc_array *array) argument
56 array->root = NULL;
57 array->nr_leaves_on_tree = 0;
60 extern int assoc_array_iterate(const struct assoc_array *array,
64 extern void *assoc_array_find(const struct assoc_array *array,
67 extern void assoc_array_destroy(struct assoc_array *array,
69 extern struct assoc_array_edit *assoc_array_insert(struct assoc_array *array,
[all...]
/linux-master/arch/s390/tools/
H A Dgen_facilities.c124 unsigned long long *array; local
126 array = calloc(1, 8);
127 if (!array)
134 array = realloc(array, (dword + 1) * 8);
135 if (!array)
137 memset(array + high + 1, 0, (dword - high) * 8);
140 array[dword] |= 1ULL << bit;
144 printf("_AC(0x%016llx,UL)%c", array[i], i < high ? ',' : '\n');
145 free(array);
[all...]
/linux-master/tools/perf/arch/powerpc/util/
H A Devent.c15 const __u64 *array, u64 type)
19 weight.full = *array;
30 __u64 *array, u64 type)
32 *array = data->weight;
35 *array &= 0xffffffff;
36 *array |= ((u64)data->ins_lat << 32);
14 arch_perf_parse_sample_weight(struct perf_sample *data, const __u64 *array, u64 type) argument
29 arch_perf_synthesize_sample_weight(const struct perf_sample *data, __u64 *array, u64 type) argument
/linux-master/drivers/gpu/drm/imagination/
H A Dpvr_sync.h24 * The job submission logic collects all signal operations in an array of
25 * pvr_sync_signal objects. This array also serves as a cache to get the
61 pvr_sync_signal_array_cleanup(struct xarray *array);
64 pvr_sync_signal_array_collect_ops(struct xarray *array,
70 pvr_sync_signal_array_update_fences(struct xarray *array,
76 pvr_sync_signal_array_push_fences(struct xarray *array);
/linux-master/tools/testing/selftests/bpf/progs/
H A Dtest_global_func16.c19 int array[10]; local
21 const int rv = foo(&array);
H A Dsample_map_ret0.c17 } array SEC(".maps");
29 value = bpf_map_lookup_elem(&array, &key64);
/linux-master/drivers/gpio/
H A Dgpiolib-legacy.c78 * @array: array of the 'struct gpio'
79 * @num: how many GPIOs in the array
83 int gpio_request_array(const struct gpio *array, size_t num) argument
87 for (i = 0; i < num; i++, array++) {
88 err = gpio_request_one(array->gpio, array->flags, array->label);
96 gpio_free((--array)->gpio);
103 * @array
108 gpio_free_array(const struct gpio *array, size_t num) argument
[all...]
/linux-master/kernel/bpf/
H A Dreuseport_array.c52 struct reuseport_array *array = reuseport_array(map); local
55 if (unlikely(index >= array->map.max_entries))
58 return rcu_dereference(array->ptrs[index]);
64 struct reuseport_array *array = reuseport_array(map); local
72 if (!rcu_access_pointer(array->ptrs[index]))
77 sk = rcu_dereference_protected(array->ptrs[index],
82 RCU_INIT_POINTER(array->ptrs[index], NULL);
96 struct reuseport_array *array = reuseport_array(map); local
102 * array now. Hence, this function only races with
107 * both removing sk from "array"
152 struct reuseport_array *array; local
188 reuseport_array_update_check(const struct reuseport_array *array, const struct sock *nsk, const struct sock *osk, const struct sock_reuseport *nsk_reuse, u32 map_flags) argument
235 struct reuseport_array *array = reuseport_array(map); local
319 struct reuseport_array *array = reuseport_array(map); local
337 struct reuseport_array *array; local
[all...]
H A Darraymap.c22 static void bpf_array_free_percpu(struct bpf_array *array) argument
26 for (i = 0; i < array->map.max_entries; i++) {
27 free_percpu(array->pptrs[i]);
32 static int bpf_array_alloc_percpu(struct bpf_array *array) argument
37 for (i = 0; i < array->map.max_entries; i++) {
38 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8,
41 bpf_array_free_percpu(array);
44 array->pptrs[i] = ptr;
87 struct bpf_array *array; local
157 array_map_elem_ptr(struct bpf_array* array, u32 index) argument
165 struct bpf_array *array = container_of(map, struct bpf_array, map); local
177 struct bpf_array *array = container_of(map, struct bpf_array, map); local
191 struct bpf_array *array = container_of(map, struct bpf_array, map); local
207 struct bpf_array *array = container_of(map, struct bpf_array, map); local
240 struct bpf_array *array = container_of(map, struct bpf_array, map); local
251 struct bpf_array *array = container_of(map, struct bpf_array, map); local
265 struct bpf_array *array = container_of(map, struct bpf_array, map); local
293 struct bpf_array *array = container_of(map, struct bpf_array, map); local
313 struct bpf_array *array = container_of(map, struct bpf_array, map); local
352 struct bpf_array *array = container_of(map, struct bpf_array, map); local
394 array_map_vmalloc_addr(struct bpf_array *array) argument
401 struct bpf_array *array = container_of(map, struct bpf_array, map); local
415 struct bpf_array *array = container_of(map, struct bpf_array, map); local
468 struct bpf_array *array = container_of(map, struct bpf_array, map); local
522 struct bpf_array *array = container_of(map, struct bpf_array, map); local
555 struct bpf_array *array; local
574 struct bpf_array *array; local
594 struct bpf_array *array = container_of(map, struct bpf_array, map); local
645 struct bpf_array *array = container_of(map, struct bpf_array, map); local
693 struct bpf_array *array; local
726 struct bpf_array *array = container_of(map, struct bpf_array, map); local
806 struct bpf_array *array = container_of(map, struct bpf_array, map); local
845 struct bpf_array *array = container_of(map, struct bpf_array, map); local
876 struct bpf_array *array = container_of(map, struct bpf_array, map); local
935 struct bpf_array *array = container_of(map, struct bpf_array, map); local
1219 struct bpf_array *array = container_of(map, struct bpf_array, map); local
1336 struct bpf_array *array = container_of(map, struct bpf_array, map); local
[all...]
/linux-master/drivers/scsi/isci/
H A Dunsolicited_frame_control.c85 uf_control->headers.array = virt + SCI_UFI_BUF_SIZE;
95 uf_control->address_table.array = virt + SCI_UFI_BUF_SIZE + SCI_UFI_HDR_SIZE;
107 * the controller's array of UFs.
110 uf = &uf_control->buffers.array[i];
112 uf_control->address_table.array[i] = dma;
115 uf->header = &uf_control->headers.array[i];
136 *frame_header = &uf_control->buffers.array[frame_index].header->data;
149 *frame_buffer = uf_control->buffers.array[frame_index].buffer;
171 while (lower_32_bits(uf_control->address_table.array[frame_get]) == 0 &&
172 upper_32_bits(uf_control->address_table.array[frame_ge
[all...]
/linux-master/drivers/infiniband/hw/mthca/
H A Dmthca_allocator.c108 * serialize access to the array.
113 void *mthca_array_get(struct mthca_array *array, int index) argument
117 if (array->page_list[p].page)
118 return array->page_list[p].page[index & MTHCA_ARRAY_MASK];
123 int mthca_array_set(struct mthca_array *array, int index, void *value) argument
128 if (!array->page_list[p].page)
129 array->page_list[p].page = (void **) get_zeroed_page(GFP_ATOMIC);
131 if (!array->page_list[p].page)
134 array->page_list[p].page[index & MTHCA_ARRAY_MASK] = value;
135 ++array
140 mthca_array_clear(struct mthca_array *array, int index) argument
155 mthca_array_init(struct mthca_array *array, int nent) argument
173 mthca_array_cleanup(struct mthca_array *array, int nent) argument
[all...]
/linux-master/tools/testing/radix-tree/
H A Diteration_check_2.c57 DEFINE_XARRAY(array);
64 xa_store(&array, 100, xa_mk_value(100), GFP_KERNEL);
65 xa_set_mark(&array, 100, XA_MARK_0);
67 if (pthread_create(&threads[0], NULL, iterator, &array)) {
71 if (pthread_create(&threads[1], NULL, throbber, &array)) {
86 xa_destroy(&array);
/linux-master/tools/lib/perf/tests/
H A Dtest-threadmap.c14 static int test_threadmap_array(int nr, pid_t *array) argument
19 threads = perf_thread_map__new_array(nr, array);
26 perf_thread_map__pid(threads, i) == (array ? array[i] : -1));
33 perf_thread_map__pid(threads, 0) == (array ? array[0] : -1));
/linux-master/tools/lib/perf/Documentation/examples/
H A Dsampling.c86 __u64 ip, period, *array; local
89 array = event->sample.array;
91 ip = *array;
92 array++;
94 u.val64 = *array;
97 array++;
99 u.val64 = *array;
101 array++;
103 period = *array;
[all...]
/linux-master/kernel/trace/
H A Dtracing_map.h25 * zeroed array of struct tracing_map_entry (stored in the map field
28 * variable and a pointer named 'val'. This array of struct
32 * this indirectly via an array of tracing_map_sort_entry - see the
39 * It then uses this key, truncated to the array size, as an index
40 * into the array of tracing_map_entries. If the value of the 'key'
63 * tracing_map_entries in the tracing_map_entry array which can be
66 * with the tracing_map_entry array in the tracing_map. Because of
68 * tracing_map_entry array is always twice the maximum number of
74 * both the tracing_map_entry array and a pool of max_elts
78 * The tracing_map_entry array i
[all...]
/linux-master/drivers/net/wireless/ath/ath9k/
H A Dcalib.h36 #define STATIC_INI_ARRAY(array) { \
37 .ia_array = (u32 *)(array), \
38 .ia_rows = ARRAY_SIZE(array), \
39 .ia_columns = ARRAY_SIZE(array[0]), \
42 #define INIT_INI_ARRAY(iniarray, array) do { \
43 (iniarray)->ia_array = (u32 *)(array); \
44 (iniarray)->ia_rows = ARRAY_SIZE(array); \
45 (iniarray)->ia_columns = ARRAY_SIZE(array[0]); \
/linux-master/samples/ftrace/
H A DMakefile10 CFLAGS_sample-trace-array.o := -I$(src)
11 obj-$(CONFIG_SAMPLE_TRACE_ARRAY) += sample-trace-array.o

Completed in 322 milliseconds

1234567891011>>