Home
last modified time | relevance | path

Searched refs:list (Results 1 – 25 of 149) sorted by relevance

123456

/system/bt/osi/src/
Dlist.c20 static list_node_t *list_free_node_(list_t *list, list_node_t *node);
25 list_t *list = (list_t *)zeroed_allocator->alloc(sizeof(list_t)); in list_new_internal() local
26 if (!list) in list_new_internal()
29 list->free_cb = callback; in list_new_internal()
30 list->allocator = zeroed_allocator; in list_new_internal()
31 return list; in list_new_internal()
38 void list_free(list_t *list) { in list_free() argument
39 if (!list) in list_free()
42 list_clear(list); in list_free()
43 list->allocator->free(list); in list_free()
[all …]
Dfixed_queue.c31 list_t *list; member
50 ret->list = list_new(NULL); in fixed_queue_new()
51 if (!ret->list) in fixed_queue_new()
76 …for (const list_node_t *node = list_begin(queue->list); node != list_end(queue->list); node = list… in fixed_queue_free()
79 list_free(queue->list); in fixed_queue_free()
91 bool is_empty = list_is_empty(queue->list); in fixed_queue_is_empty()
102 size_t length = list_length(queue->list); in fixed_queue_length()
121 list_append(queue->list, data); in fixed_queue_enqueue()
133 void *ret = list_front(queue->list); in fixed_queue_dequeue()
134 list_remove(queue->list, ret); in fixed_queue_dequeue()
[all …]
Dhash_map.c29 list_t *list; member
119 list_t *hash_bucket_list = hash_map->bucket[hash_key].list; in hash_map_has_key()
131 if (hash_map->bucket[hash_key].list == NULL) { in hash_map_set()
132 hash_map->bucket[hash_key].list = list_new_internal(bucket_free_, hash_map->allocator); in hash_map_set()
133 if (hash_map->bucket[hash_key].list == NULL) in hash_map_set()
136 list_t *hash_bucket_list = hash_map->bucket[hash_key].list; in hash_map_set()
162 list_t *hash_bucket_list = hash_map->bucket[hash_key].list; in hash_map_erase()
178 list_t *hash_bucket_list = hash_map->bucket[hash_key].list; in hash_map_get()
191 if (hash_map->bucket[i].list == NULL) in hash_map_clear()
193 list_free(hash_map->bucket[i].list); in hash_map_clear()
[all …]
/system/bt/osi/test/
Dlist_test.cpp13 list_t *list = list_new(NULL); in TEST_F() local
14 ASSERT_TRUE(list != NULL); in TEST_F()
15 list_free(list); in TEST_F()
24 list_t *list = list_new(NULL); in TEST_F() local
25 EXPECT_TRUE(list_is_empty(list)); in TEST_F()
26 list_free(list); in TEST_F()
30 list_t *list = list_new(NULL); in TEST_F() local
31 EXPECT_EQ(list_length(list), 0U); in TEST_F()
32 list_free(list); in TEST_F()
36 list_t *list = list_new(NULL); in TEST_F() local
[all …]
/system/bt/osi/include/
Dlist.h30 void list_free(list_t *list);
34 bool list_is_empty(const list_t *list);
38 bool list_contains(const list_t *list, const void *data);
41 size_t list_length(const list_t *list);
45 void *list_front(const list_t *list);
49 void *list_back(const list_t *list);
53 list_node_t *list_back_node(const list_t *list);
60 bool list_insert_after(list_t *list, list_node_t *prev_node, void *data);
66 bool list_prepend(list_t *list, void *data);
72 bool list_append(list_t *list, void *data);
[all …]
/system/core/include/cutils/
Dlist.h41 #define list_for_each(node, list) \ argument
42 for (node = (list)->next; node != (list); node = node->next)
44 #define list_for_each_reverse(node, list) \ argument
45 for (node = (list)->prev; node != (list); node = node->prev)
47 #define list_for_each_safe(node, n, list) \ argument
48 for (node = (list)->next, n = node->next; \
49 node != (list); \
80 #define list_empty(list) ((list) == (list)->next) argument
81 #define list_head(list) ((list)->next) argument
82 #define list_tail(list) ((list)->prev) argument
/system/extras/showslab/
Dshowslab.c160 static void free_slablist(struct slab_info *list) in free_slablist() argument
162 while (list) { in free_slablist()
163 struct slab_info *temp = list->next; in free_slablist()
164 free(list); in free_slablist()
165 list = temp; in free_slablist()
171 struct slab_info list; in merge_objs() local
172 struct slab_info *p = &list; in merge_objs()
187 return list.next; in merge_objs()
193 static struct slab_info *slabsort(struct slab_info *list) in slabsort() argument
197 if (!list || !list->next) in slabsort()
[all …]
/system/extras/ext4_utils/
Dallocate.c34 alloc->list.first = NULL; in create_allocation()
35 alloc->list.last = NULL; in create_allocation()
38 alloc->list.iter = NULL; in create_allocation()
39 alloc->list.partial_iter = 0; in create_allocation()
66 static void region_list_remove(struct region_list *list, struct region *reg) in region_list_remove() argument
74 if (list->first == reg) in region_list_remove()
75 list->first = reg->next; in region_list_remove()
77 if (list->last == reg) in region_list_remove()
78 list->last = reg->prev; in region_list_remove()
84 void region_list_append(struct region_list *list, struct region *reg) in region_list_append() argument
[all …]
/system/connectivity/shill/net/
Dattribute_list_unittest.cc74 AttributeListRefPtr list(new AttributeList()); in TEST_F() local
75 EXPECT_TRUE(list->IterateAttributes( in TEST_F()
101 AttributeListRefPtr list(new AttributeList()); in TEST_F() local
102 EXPECT_TRUE(list->IterateAttributes( in TEST_F()
114 EXPECT_TRUE(list->IterateAttributes( in TEST_F()
125 EXPECT_FALSE(list->IterateAttributes( in TEST_F()
134 AttributeListRefPtr list(new AttributeList()); in TEST_F() local
135 EXPECT_FALSE(list->IterateAttributes( in TEST_F()
143 EXPECT_TRUE(list->IterateAttributes( in TEST_F()
152 EXPECT_FALSE(list->IterateAttributes( in TEST_F()
[all …]
Dnetlink_attribute.cc891 const AttributeListRefPtr& list, in InitNestedFromValue() argument
902 templates.cbegin()->second, list)); in InitNestedFromValue()
907 templates, list)); in InitNestedFromValue()
914 const AttributeListRefPtr& list, int id, const ByteString& value) { in AddAttributeToNestedArray() argument
918 array_template, attribute_name, list, id, value); in AddAttributeToNestedArray()
924 const AttributeListRefPtr& list, int id, const ByteString& value) { in AddAttributeToNestedMap() argument
932 nested_template, nested_template.attribute_name, list, id, value); in AddAttributeToNestedMap()
938 const string& attribute_name, const AttributeListRefPtr& list, in AddAttributeToNestedInner() argument
940 CHECK(list); in AddAttributeToNestedInner()
943 list.get(), id, attribute_name, value)) { in AddAttributeToNestedInner()
[all …]
Dnetlink_message_unittest.cc477 vector<uint32_t>list; in TEST_F() local
478 EXPECT_TRUE(GetScanFrequenciesFromMessage(*message, &list)); in TEST_F()
479 EXPECT_EQ(list.size(), arraysize(kScanFrequencyTrigger)); in TEST_F()
481 vector<uint32_t>::const_iterator j = list.begin(); in TEST_F()
482 while (j != list.end()) { in TEST_F()
530 vector<uint32_t>list; in TEST_F() local
531 EXPECT_TRUE(GetScanFrequenciesFromMessage(*message, &list)); in TEST_F()
532 EXPECT_EQ(arraysize(kScanFrequencyResults), list.size()); in TEST_F()
534 vector<uint32_t>::const_iterator j = list.begin(); in TEST_F()
535 while (j != list.end()) { in TEST_F()
/system/core/base/
Dstrings_test.cpp107 std::vector<std::string> list = {}; in TEST() local
108 ASSERT_EQ("", android::base::Join(list, ',')); in TEST()
112 std::vector<std::string> list = {"foo"}; in TEST() local
113 ASSERT_EQ("foo", android::base::Join(list, ',')); in TEST()
117 std::vector<std::string> list = {"foo", "bar", "baz"}; in TEST() local
118 ASSERT_EQ("foo,bar,baz", android::base::Join(list, ',')); in TEST()
122 std::vector<std::string> list = {",", ","}; in TEST() local
123 ASSERT_EQ(",,,", android::base::Join(list, ',')); in TEST()
127 std::set<int> list = {1, 2, 3}; in TEST() local
128 ASSERT_EQ("1,2,3", android::base::Join(list, ',')); in TEST()
[all …]
/system/core/liblog/
Dconfig_read.c26 struct listnode *list, struct android_log_transport_read *transport) { in __android_log_add_transport() argument
33 if (list_empty(list)) { in __android_log_add_transport()
35 list_add_tail(list, &transport->node); in __android_log_add_transport()
39 read_transport_for_each(transp, list) { in __android_log_add_transport()
46 list_add_tail(list, &transport->node); in __android_log_add_transport()
Dconfig_write.c26 struct listnode *list, struct android_log_transport_write *transport) { in __android_log_add_transport() argument
33 if (list_empty(list)) { in __android_log_add_transport()
35 list_add_tail(list, &transport->node); in __android_log_add_transport()
39 write_transport_for_each(transp, list) { in __android_log_add_transport()
46 list_add_tail(list, &transport->node); in __android_log_add_transport()
Dlogprint.c1031 } *list, *next; in convertMonotonic() local
1128 list = calloc(1, sizeof(struct conversionList)); in convertMonotonic()
1129 list_init(&list->node); in convertMonotonic()
1130 list->time = time; in convertMonotonic()
1131 subTimespec(&list->convert, &time, &monotonic); in convertMonotonic()
1132 list_add_tail(&convertHead, &list->node); in convertMonotonic()
1135 list = node_to_item(list_tail(&convertHead), in convertMonotonic()
1139 &list->time, in convertMonotonic()
1140 &list->convert), in convertMonotonic()
1143 subTimespec(&convert, &list->convert, &suspended_diff); in convertMonotonic()
[all …]
/system/core/libcutils/
Dandroid_reboot.c41 struct listnode list; member
89 list_add_tail(rw_entries, &item->list); in find_rw()
100 mntent_list* item = node_to_item(node, mntent_list, list); in free_entries()
113 mntent_list* item = node_to_item(node, mntent_list, list); in find_item()
180 list_remove(&item->list); in remount_ro()
181 list_add_tail(&ro_entries, &item->list); in remount_ro()
195 mntent_list* item = node_to_item(node, mntent_list, list); in remount_ro()
202 mntent_list* item = node_to_item(node, mntent_list, list); in remount_ro()
/system/extras/latencytop/
Dlatencytop.c44 static struct latency_entry *read_global_stats(struct latency_entry *list, int erase);
45 static struct latency_entry *read_process_stats(struct latency_entry *list, int erase, int pid);
46 static struct latency_entry *read_thread_stats(struct latency_entry *list, int erase, int pid, int …
52 static struct latency_entry *read_latency_file(FILE *f, struct latency_entry *list);
175 static struct latency_entry *read_global_stats(struct latency_entry *list, int erase) { in read_global_stats() argument
195 e = read_latency_file(f, list); in read_global_stats()
202 static struct latency_entry *read_process_stats(struct latency_entry *list, int erase, int pid) { in read_process_stats() argument
217 e = list; in read_process_stats()
232 static struct latency_entry *read_thread_stats(struct latency_entry *list, int erase, int pid, int … in read_thread_stats() argument
247 return list; in read_thread_stats()
[all …]
/system/core/logd/
DLogWhiteBlackList.cpp121 PruneCollection *list; in init() local
152 list = &mNaughty; in init()
154 list = &mNice; in init()
185 PruneCollection::iterator it = list->begin(); in init()
186 while (it != list->end()) { in init()
194 it = list->erase(it); in init()
201 list->insert(it, Prune(uid,pid)); in init()
207 if (it == list->end()) { in init()
208 list->push_back(Prune(uid,pid)); in init()
/system/core/adb/
Dadb_auth_client.cpp55 static void read_keys(const char *file, struct listnode *list) in read_keys() argument
94 list_add_tail(list, &key->node); in read_keys()
100 static void free_keys(struct listnode *list) in free_keys() argument
104 while (!list_empty(list)) { in free_keys()
105 item = list_head(list); in free_keys()
111 static void load_keys(struct listnode *list) in load_keys() argument
117 list_init(list); in load_keys()
122 read_keys(path, list); in load_keys()
/system/sepolicy/tools/
Dcheck_seapp.c45 #define list_for_each(list, var) \ argument
46 for(var = (list)->head; var != NULL; var = var->next)
59 typedef struct list list; typedef
87 struct list { struct
125 list violations;
168 static list input_file_list = list_init(input_file_list_freefn);
185 static list line_order_list = list_init(line_order_list_freefn);
190 static list nallow_list = list_init(line_order_list_freefn);
225 void list_append(list *list, list_element *e) { in list_append() argument
229 if (list->head == NULL ) { in list_append()
[all …]
/system/core/toolbox/upstream-netbsd/usr.bin/grep/
Dqueue.c50 STAILQ_ENTRY(qentry) list;
72 STAILQ_INSERT_TAIL(&queue, item, list); in enqueue()
90 STAILQ_REMOVE_HEAD(&queue, list); in dequeue()
/system/core/logcat/tests/
Dlogcat_test.cpp838 static bool get_white_black(char **list) { in get_white_black() argument
850 char *hold = *list; in get_white_black()
863 asprintf(list, "%s %s", hold, buf); in get_white_black()
866 asprintf(list, "%s", buf); in get_white_black()
870 return *list != NULL; in get_white_black()
873 static bool set_white_black(const char *list) { in set_white_black() argument
878 snprintf(buffer, sizeof(buffer), "logcat -P '%s' 2>&1", list ? list : ""); in set_white_black()
905 char *list = NULL; in TEST() local
908 get_white_black(&list); in TEST()
924 ASSERT_EQ(true, set_white_black(list)); in TEST()
[all …]
/system/netd/server/
DTetherController.h26 typedef std::list<char *> InterfaceCollection;
27 typedef std::list<std::string> NetAddressCollection;
/system/core/toolbox/
DNOTICE24 notice, this list of conditions and the following disclaimer.
26 notice, this list of conditions and the following disclaimer in
52 notice, this list of conditions and the following disclaimer.
54 notice, this list of conditions and the following disclaimer in the
81 notice, this list of conditions and the following disclaimer.
83 notice, this list of conditions and the following disclaimer in the
113 notice, this list of conditions and the following disclaimer.
115 notice, this list of conditions and the following disclaimer in the
142 notice, this list of conditions and the following disclaimer.
144 notice, this list of conditions and the following disclaimer in the
[all …]
/system/vold/
DVolumeManager.h121 void listVolumes(android::vold::VolumeBase::Type type, std::list<std::string>& list);
208 std::list<std::shared_ptr<DiskSource>> mDiskSources;
209 std::list<std::shared_ptr<android::vold::Disk>> mDisks;

123456