/system/bt/osi/test/ |
H A D | fixed_queue_test.cc | 39 // Function for performing dequeue operations from the queue when is ready 40 static void fixed_queue_ready(fixed_queue_t* queue, UNUSED_ATTR void* context) { argument 41 void* msg = fixed_queue_try_dequeue(queue); 55 fixed_queue_t* queue; local 57 // Test a corner case: queue of size 0 58 queue = fixed_queue_new(0); 59 EXPECT_TRUE(queue != NULL); 60 fixed_queue_free(queue, NULL); 62 // Test a corner case: queue of size 1 63 queue 83 fixed_queue_t* queue; local 125 fixed_queue_t* queue; local 147 fixed_queue_t* queue; local 169 fixed_queue_t* queue; local 197 fixed_queue_t* queue = fixed_queue_new(TEST_QUEUE_SIZE); local 234 fixed_queue_t* queue = fixed_queue_new(TEST_QUEUE_SIZE); local 264 fixed_queue_t* queue = fixed_queue_new(TEST_QUEUE_SIZE); local 295 fixed_queue_t* queue = fixed_queue_new(TEST_QUEUE_SIZE); local [all...] |
H A D | leaky_bonded_queue_test.cc | 54 LeakyBondedQueue<MockItem>* queue = new LeakyBondedQueue<MockItem>(3); local 55 EXPECT_EQ(queue->Capacity(), static_cast<size_t>(3)); 56 EXPECT_EQ(queue->Length(), static_cast<size_t>(0)); 57 queue->Enqueue(item1); 58 EXPECT_EQ(queue->Length(), static_cast<size_t>(1)); 59 queue->Enqueue(item2); 60 EXPECT_EQ(queue->Length(), static_cast<size_t>(2)); 61 queue->Enqueue(item3); 62 EXPECT_EQ(queue->Length(), static_cast<size_t>(3)); 64 queue 90 LeakyBondedQueue<MockItem>* queue = new LeakyBondedQueue<MockItem>(2); local 124 LeakyBondedQueue<MockItem>* queue = new LeakyBondedQueue<MockItem>(2); local 164 LeakyBondedQueue<MockItem>* queue = new LeakyBondedQueue<MockItem>(2); local 193 LeakyBondedQueue<MockItem>* queue = new LeakyBondedQueue<MockItem>(2); local 218 LeakyBondedQueue<MockItem>* queue = new LeakyBondedQueue<MockItem>(2); local 227 LeakyBondedQueue<MockItem>* queue = new LeakyBondedQueue<MockItem>(1); local 237 LeakyBondedQueue<MockItem>* queue = new LeakyBondedQueue<MockItem>(2); local [all...] |
/system/bt/osi/src/ |
H A D | fixed_queue.cc | 68 void fixed_queue_free(fixed_queue_t* queue, fixed_queue_free_cb free_cb) { argument 69 if (!queue) return; 71 fixed_queue_unregister_dequeue(queue); 74 for (const list_node_t* node = list_begin(queue->list); 75 node != list_end(queue->list); node = list_next(node)) 78 list_free(queue->list); 79 semaphore_free(queue->enqueue_sem); 80 semaphore_free(queue->dequeue_sem); 81 delete queue->mutex; 82 osi_free(queue); 85 fixed_queue_flush(fixed_queue_t* queue, fixed_queue_free_cb free_cb) argument 96 fixed_queue_is_empty(fixed_queue_t* queue) argument 103 fixed_queue_length(fixed_queue_t* queue) argument 110 fixed_queue_capacity(fixed_queue_t* queue) argument 116 fixed_queue_enqueue(fixed_queue_t* queue, void* data) argument 130 fixed_queue_dequeue(fixed_queue_t* queue) argument 147 fixed_queue_try_enqueue(fixed_queue_t* queue, void* data) argument 162 fixed_queue_try_dequeue(fixed_queue_t* queue) argument 179 fixed_queue_try_peek_first(fixed_queue_t* queue) argument 186 fixed_queue_try_peek_last(fixed_queue_t* queue) argument 193 fixed_queue_try_remove_from_queue(fixed_queue_t* queue, void* data) argument 213 fixed_queue_get_list(fixed_queue_t* queue) argument 222 fixed_queue_get_dequeue_fd(const fixed_queue_t* queue) argument 227 fixed_queue_get_enqueue_fd(const fixed_queue_t* queue) argument 232 fixed_queue_register_dequeue(fixed_queue_t* queue, reactor_t* reactor, fixed_queue_cb ready_cb, void* context) argument 248 fixed_queue_unregister_dequeue(fixed_queue_t* queue) argument 260 fixed_queue_t* queue = static_cast<fixed_queue_t*>(context); local [all...] |
H A D | alarm.cc | 102 fixed_queue_t* queue; // The processing queue to add this alarm to member in struct:alarm_t 138 // Default alarm callback thread and queue 147 fixed_queue_t* queue, bool for_msg_loop); 152 static void alarm_queue_ready(fixed_queue_t* queue, void* context); 158 // Registers |queue| for processing alarm callbacks on |thread|. 159 // |queue| may not be NULL. |thread| may not be NULL. 160 static void alarm_register_processing_queue(fixed_queue_t* queue, 232 fixed_queue_t* queue, bool for_msg_loop) { 241 alarm->queue 230 alarm_set_internal(alarm_t* alarm, period_ms_t period, alarm_callback_t cb, void* data, fixed_queue_t* queue, bool for_msg_loop) argument 549 alarm_register_processing_queue(fixed_queue_t* queue, thread_t* thread) argument 598 alarm_queue_ready(fixed_queue_t* queue, UNUSED_ATTR void* context) argument [all...] |
H A D | thread.cc | 131 // of queue space, we should abort this operation, otherwise we'll 134 // Queue item is freed either when the queue itself is destroyed 135 // or when the item is removed from the queue for dispatch. 239 LOG_DEBUG(LOG_TAG, "%s growing event queue on shutdown.", __func__); 249 fixed_queue_t* queue = (fixed_queue_t*)context; local 250 work_item_t* item = static_cast<work_item_t*>(fixed_queue_dequeue(queue));
|
/system/bt/osi/include/ |
H A D | fixed_queue.h | 31 typedef void (*fixed_queue_cb)(fixed_queue_t* queue, void* context); 33 // Creates a new fixed queue with the given |capacity|. If more elements than 34 // |capacity| are added to the queue, the caller is blocked until space is 35 // made available in the queue. Returns NULL on failure. The caller must free 36 // the returned queue with |fixed_queue_free|. 39 // Frees a queue and (optionally) the enqueued elements. 40 // |queue| is the queue to free. If the |free_cb| callback is not null, 41 // it is called on each queue element to free it. 42 // Freeing a queue tha [all...] |
H A D | leaky_bonded_queue.h | 22 #include <queue> 29 * - LeakyLondedQueue<T> is a fixed size queue that leaks oldest item when 32 * - The queue is protected by a simple mutex and is thread-safe, although 35 * - The queue uses unique_ptr to automatically free its content when it is 46 * Call Clear() and free the queue structure itself 50 * Add item NEW_ITEM to the underlining queue. If the queue is full, pop 55 * Add item NEW_ITEM to the underlining queue. If the queue is full, dequeue 60 * Dequeues the oldest item from the queue [all...] |
/system/chre/platform/linux/include/chre/target_platform/ |
H A D | platform_log_base.h | 23 #include <queue> 42 //! A mutex to guard the shared queue and exit condition of this class. 49 //! A queue of incoming log messages. 50 std::queue<std::unique_ptr<char>> mLogQueue;
|
/system/core/toolbox/upstream-netbsd/usr.bin/grep/ |
H A D | queue.c | 1 /* $NetBSD: queue.c,v 1.5 2011/08/31 16:24:57 plunky Exp $ */ 2 /* $FreeBSD: head/usr.bin/grep/queue.c 211496 2010-08-19 09:28:59Z des $ */ 30 * A really poor man's queue. It does only what it has to and gets out of 31 * Dodge. It is used in place of <sys/queue.h> to get a better performance. 39 __RCSID("$NetBSD: queue.c,v 1.5 2011/08/31 16:24:57 plunky Exp $"); 42 #include <sys/queue.h> 54 static STAILQ_HEAD(, qentry) queue = STAILQ_HEAD_INITIALIZER(queue); 72 STAILQ_INSERT_TAIL(&queue, item, list); 86 item = STAILQ_FIRST(&queue); [all...] |
/system/core/adb/ |
H A D | adb_utils.h | 59 // A thread-safe blocking queue. 64 std::vector<T> queue; member in class:BlockingQueue 70 queue.push_back(t); 81 cv.wait(lock, [this]() { return !queue.empty(); }); 82 popped = std::move(queue); 83 queue.clear();
|
H A D | fdevent_test.cpp | 22 #include <queue> 71 std::queue<char> queue_;
|
/system/core/logd/ |
H A D | LogAudit.h | 20 #include <queue> 38 std::queue<log_time> bucket;
|
/system/core/storaged/ |
H A D | storaged.cpp | 66 mMean.queue = (uint32_t)mStats.queue.get_mean(); 75 mStd.queue = (uint32_t)mStats.queue.get_std(); 83 mStats.queue.add(perf->queue); 91 mStats.queue.evict(perf->queue); 95 return ((double)perf->queue >= (double)mMean.queue [all...] |
/system/core/fastboot/ |
H A D | socket_mock.h | 33 #include <queue> 96 std::queue<Event> events_;
|
/system/extras/simpleperf/ |
H A D | callchain.h | 25 #include <queue> 91 std::queue<std::vector<std::unique_ptr<NodeT>>*> queue; local 92 queue.push(&children); 93 while (!queue.empty()) { 94 std::vector<std::unique_ptr<NodeT>>* v = queue.front(); 95 queue.pop(); 99 queue.push(&node->children);
|
/system/libhidl/base/include/hidl/ |
H A D | SynchronizedQueue.h | 22 #include <queue> 28 /* Threadsafe queue. 34 /* Gets an item from the front of the queue. 40 /* Puts an item onto the end of the queue. 51 std::queue<T> mQueue;
|
/system/bt/stack/rfcomm/ |
H A D | port_utils.cc | 125 p_port->tx.queue = fixed_queue_new(SIZE_MAX); 126 p_port->rx.queue = fixed_queue_new(SIZE_MAX); 210 while ((p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_port->rx.queue)) != NULL) 214 while ((p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_port->tx.queue)) != NULL) 234 fixed_queue_free(p_port->tx.queue, NULL); 235 p_port->tx.queue = NULL; 236 fixed_queue_free(p_port->rx.queue, NULL); 237 p_port->rx.queue = NULL; 396 (fixed_queue_length(p_port->tx.queue) > PORT_TX_BUF_HIGH_WM); 491 /* if queue coun [all...] |
H A D | port_api.cc | 79 "TX queue disabled", 611 * Description This function return number of buffers on the rx queue. 614 * p_rx_queue_count - Pointer to return queue count in. 640 "PORT_GetRxQueueCnt() p_rx_queue_count:%d, p_port->rx.queue.count = %d", 1085 count = fixed_queue_length(p_port->rx.queue); 1087 while ((p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_port->rx.queue)) != NULL) 1101 while ((p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_port->tx.queue)) != NULL) 1160 if (fixed_queue_is_empty(p_port->rx.queue)) return (PORT_SUCCESS); 1165 p_buf = (BT_HDR*)fixed_queue_try_peek_first(p_port->rx.queue); 1196 osi_free(fixed_queue_try_dequeue(p_port->rx.queue)); [all...] |
/system/core/libappfuse/include/libappfuse/ |
H A D | FuseBridgeLoop.h | 22 #include <queue>
|
/system/bt/test/suite/core/ |
H A D | thread_performance_test.cc | 25 void callback(fixed_queue_t* queue, void* data) { argument 26 if (queue != nullptr) { 27 fixed_queue_dequeue(queue); 102 thread = thread_new("queue performance test thread");
|
/system/core/init/ |
H A D | action.h | 21 #include <queue> 114 std::queue<std::variant<EventTrigger, PropertyChange, BuiltinAction>> event_queue_; 115 std::queue<const Action*> current_executing_actions_;
|
/system/core/debuggerd/tombstoned/ |
H A D | tombstoned.cpp | 99 static CrashQueue queue("/data/tombstones", "tombstone_" /* file_name_prefix */, 102 return &queue; 106 static CrashQueue queue("/data/anr", "trace_" /* file_name_prefix */, 109 return &queue; 357 CrashQueue* queue = CrashQueue::for_crash(crash); local 361 queue->maybe_dequeue_crashes(perform_request);
|
/system/core/storaged/include/ |
H A D | storaged.h | 24 #include <queue> 73 uint64_t read_merges; // number of read I/Os merged with in-queue I/Os 77 uint64_t write_merges; // number of write I/Os merged with in-queue I/Os 97 uint32_t queue; // I/Os in queue member in struct:disk_perf 167 std::queue<struct disk_perf> mBuffer; 173 stream_stats queue; // I/Os in queue member in struct:disk_stats_monitor::__anon1708
|
/system/libfmq/tests/ |
H A D | msgq_test_client.cpp | 119 * Utility function to verify data read from the fast message queue. 148 MessageQueueUnsync* queue = nullptr; local 149 getQueue(&queue, &testService, true /* setupQueue */); 152 ASSERT_NE(queue, nullptr); 153 ASSERT_TRUE(queue->isValid()); 155 size_t numMessagesMax = queue->getQuantumCount(); 168 ASSERT_FALSE(queue->read(&readData[0], numMessagesMax)); 180 ASSERT_TRUE(queue->read(&readData[0], dataLen)); 183 delete queue; 196 MessageQueueUnsync* queue local [all...] |
/system/core/storaged/tests/ |
H A D | storaged_test.cpp | 190 retval.queue = (double)perf.queue * mul; 226 .queue = 5 254 test_perf.queue = (double)test_mean.queue + i * test_std.queue;
|