Home
last modified time | relevance | path

Searched refs:queue (Results 1 – 25 of 889) sorted by relevance

12345678910>>...36

/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/stack/platform/src/
H A Dqueue.c59 return queue; in QueueCreate()
89 free(queue); in QueueDelete()
94 ASSERT(queue); in QueueEnqueue()
107 ASSERT(queue); in QueueTryEnqueue()
125 ASSERT(queue); in QueueDequeue()
143 ASSERT(queue); in QueueTryDequeue()
164 ASSERT(queue); in QueueGetEnqueueFd()
170 ASSERT(queue); in QueueGetDequeueFd()
176 ASSERT(queue); in QueueFlush()
188 ASSERT(queue); in QueueIsEmpty()
[all …]
/ohos5.0/base/security/device_security_level/baselib/utils/src/
H A Dutils_work_queue.c60 while ((IsEmptyList(&queue->head)) && (queue->state == RUN)) { in WorkQueueThread()
61 pthread_cond_wait(&queue->cond, &queue->mutex); in WorkQueueThread()
102 queue->size = 0; in CreateWorkQueue()
107 FREE(queue); in CreateWorkQueue()
114 FREE(queue); in CreateWorkQueue()
122 FREE(queue); in CreateWorkQueue()
126 return queue; in CreateWorkQueue()
185 return queue; in CreateWorkQueue()
209 FREE(queue); in DestroyWorkQueue()
221 if (queue->size >= queue->capacity) { in QueueWork()
[all …]
/ohos5.0/drivers/hdf_core/framework/support/platform/src/fwk/
H A Dplatform_queue.c26 OsalMemFree(queue); in PlatformQueueDoDestroy()
40 queue->depth--; in PlatformQueueNextMsg()
69 (void)(queue->handle(queue, msg)); in PlatformQueueWorker()
80 queue = (struct PlatformQueue *)OsalMemCalloc(sizeof(*queue)); in PlatformQueueCreate()
81 if (queue == NULL) { in PlatformQueueCreate()
91 queue->depth = 0; in PlatformQueueCreate()
93 queue->data = data; in PlatformQueueCreate()
96 return queue; in PlatformQueueCreate()
138 if (queue->start) { in PlatformQueueDestroy()
160 if (queue->depth >= queue->depthMax) { in PlatformQueueAddMsg()
[all …]
/ohos5.0/drivers/hdf_core/framework/model/camera/buffer_manager/src/
H A Dbuffer_queue.c35 queue->queuedCount = 0; in BufferQueueStop()
53 if (((queue->ioModes & MEMTYPE_MMAP) == 0) || (queue->memOps->mmapAlloc == NULL) || in BufferQueueCheckMmapOps()
54 (queue->memOps->mmapFree == NULL) || (queue->memOps->mmap == NULL)) { in BufferQueueCheckMmapOps()
62 if (((queue->ioModes & MEMTYPE_USERPTR) == 0) || (queue->memOps->allocUserPtr == NULL) || in BufferQueueCheckUserPtrOps()
71 if (((queue->ioModes & MEMTYPE_DMABUF) == 0) || (queue->memOps->attachDmaBuf == NULL) || in BufferQueueCheckDmaBufOps()
72 (queue->memOps->detachDmaBuf == NULL) || (queue->memOps->mapDmaBuf == NULL) || in BufferQueueCheckDmaBufOps()
110 for (i = queue->numBuffers - count; i < queue->numBuffers; ++i) { in BufferQueueFree()
147 (queue->memType != MEMTYPE_UNKNOWN && queue->memType != userRequest->memType)) { in BufferQueueReleaseBuffers()
150 ret = BufferQueueFree(queue, queue->numBuffers); in BufferQueueReleaseBuffers()
216 ret = queue->queueOps->queueSetup != NULL ? queue->queueOps->queueSetup(queue, &numBuffers, in BufferQueueRequestBuffers()
[all …]
H A Dcamera_buffer_manager.c91 if (queue == NULL) { in BufferQueueInit()
100 if (queue->queueOps == NULL || queue->memOps == NULL || queue->ioModes == 0) { in BufferQueueInit()
105 if (queue->queueOps->queueSetup == NULL || queue->queueOps->queueBuffer == NULL) { in BufferQueueInit()
152 ret = queue->queueOps->queueSetup != NULL ? queue->queueOps->queueSetup(queue, &numBuffers, in BufferQueueRequest()
228 (queue->queuedCount >= queue->minBuffersNeeded)) { in BufferQueueReturnBuffer()
320 queue->queuedCount--; in BufferQueueAcquireBuffer()
330 if ((queue->flags & QUEUE_STATE_STREAMING) != 0 || (queue->numBuffers) == 0 || in BufferQueueStreamOn()
331 (queue->numBuffers < queue->minBuffersNeeded)) { in BufferQueueStreamOn()
335 if (queue->queuedCount >= queue->minBuffersNeeded) { in BufferQueueStreamOn()
349 BufferQueueStop(queue); in BufferQueueStreamOff()
[all …]
H A Dcamera_buffer.c74 if (queue->memOps->detachDmaBuf != NULL) { in CameraBufferFreeDmaPlane()
96 if (queue->memType == MEMTYPE_MMAP) { in CameraBufferFree()
115 if (queue->memOps->mmapAlloc != NULL) { in CameraBufferAllocMmapPlane()
116 memPriv = queue->memOps->mmapAlloc(queue, planeNum, size); in CameraBufferAllocMmapPlane()
236 OsalAtomicInc(&queue->driverOwnCount); in CameraBufferEnqueue()
238 queue->queueOps->queueBuffer(queue, buffer); in CameraBufferEnqueue()
248 queue->queuedCount++; in CameraBufferQueueBuffer()
259 if (queue->memType == MEMTYPE_DMABUF) { in CameraBufferSetCacheSync()
322 memPriv = queue->memOps->allocUserPtr(queue, planeNum, userPtr, length); in CameraBufferPrepareUserPtrPlane()
391 memPriv = queue->memOps->attachDmaBuf(queue, planeNum, dmaBuf, planes[planeNum].length); in CameraBufferAttachDmaPlane()
[all …]
/ohos5.0/foundation/systemabilitymgr/samgr_lite/samgr/adapter/posix/
H A Dlock_free_queue.c32 if (queue == NULL) { in LFQUE_Create()
35 queue->write = 0; in LFQUE_Create()
36 queue->read = 0; in LFQUE_Create()
39 return queue; in LFQUE_Create()
53 return (queue->write == queue->read); in LFQUE_IsEmpty()
66 uint32 copyLen = (queue->totalSize - queue->write < queue->itemSize) ? in LFQUE_Push()
67 (queue->totalSize - queue->write) : queue->itemSize; in LFQUE_Push()
80 uint32 write = queue->write + queue->itemSize; in LFQUE_Push()
98 uint32 copyLen = (queue->totalSize - queue->read < queue->itemSize) ? in LFQUE_Pop()
99 (queue->totalSize - queue->read) : queue->itemSize; in LFQUE_Pop()
[all …]
H A Dqueue_adapter.c26 LockFreeQueue *queue; member
32 if (queue == NULL) { in QUEUE_Create()
35 queue->queue = LFQUE_Create(size, count); in QUEUE_Create()
36 if (queue->queue == NULL) { in QUEUE_Create()
37 SAMGR_Free(queue); in QUEUE_Create()
43 return (MQueueId)queue; in QUEUE_Create()
53 int ret = LFQUE_Push(queue->queue, element, pri); in QUEUE_Put()
69 while (LFQUE_Pop(queue->queue, element, pri) != EC_SUCCESS) { in QUEUE_Pop()
70 pthread_cond_wait(&queue->cond, &queue->rMutex); in QUEUE_Pop()
86 SAMGR_Free(queue->queue); in QUEUE_Destroy()
[all …]
/ohos5.0/drivers/hdf_core/framework/utils/src/
H A Dhdf_task_queue.c22 ret = OsalThreadCreate(&queue->thread, (OsalThreadEntry)HdfThreadTasker, queue); in HdfCreateThread()
35 queue = (struct HdfTaskQueue *)OsalMemCalloc(sizeof(*queue)); in HdfTaskQueueCreate()
36 if (queue == NULL) { in HdfTaskQueueCreate()
38 return queue; in HdfTaskQueueCreate()
46 OsalMemFree(queue); in HdfTaskQueueCreate()
54 OsalMemFree(queue); in HdfTaskQueueCreate()
63 OsalMemFree(queue); in HdfTaskQueueCreate()
74 return queue; in HdfTaskQueueCreate()
81 if (queue == NULL) { in HdfQueueStopThread()
96 if (queue == NULL) { in HdfTaskQueueDestroy()
[all …]
H A Dosal_msg_queue.c15 if (queue != NULL) { in OsalMessageQueueInit()
16 OsalMutexInit(&queue->mutex); in OsalMessageQueueInit()
18 HdfSListInit(&queue->list); in OsalMessageQueueInit()
24 if (queue != NULL) { in OsalMessageQueueDestroy()
41 OsalMutexLock(&queue->mutex); in HdfMessageQueueEnqueue()
53 OsalMutexUnlock(&queue->mutex); in HdfMessageQueueEnqueue()
54 OsalSemPost(&queue->semaphore); in HdfMessageQueueEnqueue()
63 OsalMutexLock(&queue->mutex); in HdfMessageQueueNext()
74 OsalMutexUnlock(&queue->mutex); in HdfMessageQueueNext()
82 OsalMutexLock(&queue->mutex); in HdfMessageQueueFlush()
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/stylemgr/test/unittest/common/
H A Dlink_queue_test.cpp34 LinkQueue queue; variable
35 queue.InitQueue();
41 queue.FreeNode();
52 LinkQueue queue; variable
57 queue.FreeNode();
70 LinkQueue queue; variable
88 LinkQueue queue; variable
90 queue.Dequeue(&getvalue);
131 LinkQueue queue; variable
133 node = queue.GetNext();
[all …]
/ohos5.0/foundation/communication/dsoftbus/core/common/include/
H A Dsoftbus_queue.h79 if (queue == NULL) { in QueueIsEmpty()
83 producerTail = queue->producer.tail; in QueueIsEmpty()
84 consumerTail = queue->consumer.tail; in QueueIsEmpty()
85 mask = queue->producer.mask; in QueueIsEmpty()
102 if (queue == NULL || node == NULL) { in QueueSingleProducerEnqueue()
105 mask = queue->producer.mask; in QueueSingleProducerEnqueue()
156 mask = queue->producer.mask; in QueueMultiProducerEnqueue()
202 queue->producer.tail += 1; in QueueMultiProducerEnqueue()
218 mask = queue->producer.mask; in QueueSingleConsumerDequeue()
272 mask = queue->producer.mask; in QueueMultiConsumerDequeue()
[all …]
/ohos5.0/foundation/ai/ai_engine/test/common/queuepool/
H A Dqueuepool_test.cpp71 ASSERT_NE(queue, nullptr);
122 queuePool->Push(queue);
180 queuePool->Push(queue);
219 queue->PushBack(iv);
240 queue->PushBack(i);
278 queue->PushBack(iv);
364 queue->PushBack(iv);
436 queue->PushBack(i);
441 queue->PushBack(i);
442 count = queue->Count();
[all …]
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/stack/src/btm/
H A Dbtm_thread.c36 Queue *queue; member
84 Queue *queue; member
109 .queue = queue, in RunAllTaskInQueue()
148 queue = NULL; in FindProcessingQueueById()
153 return queue; in FindProcessingQueueById()
192 if (queue != NULL) { in BTM_CreateProcessingQueue()
211 if (queue != NULL) { in BTM_DeleteProcessingQueue()
212 taskQueue = queue->queue; in BTM_DeleteProcessingQueue()
213 queue->queue = NULL; in BTM_DeleteProcessingQueue()
235 if (queue != NULL) { in BTM_RunTaskInProcessingQueue()
[all …]
/ohos5.0/docs/en/device-dev/kernel/
H A Dkernel-small-basic-trans-queue.md6queue, also called a message queue, is a data structure used for communication between tasks. The
16 - Both the read queue and write queue support the timeout mechanism.
53 Each queue control block contains information about the queue status.
62 - The queue ID is returned when a queue is created successfully.
70queue is to be deleted, the system locates the queue based on the queue ID, sets the queue status …
86 …ge queue| - **LOS_QueueCreate**: creates a message queue. The system dynamically allocates the que…
94 1. Call **LOS_QueueCreate** to create a queue. The queue ID is returned when the queue is created.
125 Create a queue and two tasks. Enable task 1 to write data to the queue, and task 2 to read data fro…
235 start queue example
236 create the queue success!
[all …]
H A Dkernel-mini-basic-ipc-queue.md6queue, also called a queue, is a mechanism for communication between tasks. The queue receives mes…
15 - Both the read queue and write queue support the timeout mechanism.
52 Each queue control block contains information about the queue status.
61 - The queue ID is returned when a queue is created successfully.
69queue is to be deleted, the system locates the queue based on the queue ID, sets the queue status …
82queue| **LOS_QueueCreate**: creates a message queue. The system dynamically allocates the queue sp…
90 1. Call **LOS_QueueCreate** to create a queue. The queue ID is returned when the queue is created.
122 Create a queue and two tasks. Enable task 1 to write data to the queue, and task 2 to read data fro…
234 start queue example.
235 create the queue success.
[all …]
/ohos5.0/base/notification/eventhandler/frameworks/eventhandler/test/unittest/
H A Dlib_event_handler_event_queue_test.cpp131 queue.Prepare(); in DelayTest()
164 queue.Prepare(); in InsertPriorityTest()
395 queue.Prepare();
420 queue.Prepare();
445 queue.Finish();
457 queue.Prepare();
566 queue.Prepare();
593 queue.Prepare();
635 queue.Prepare();
686 queue.Prepare();
[all …]
/ohos5.0/base/notification/eventhandler/frameworks/eventhandler/src/
H A Devent_queue_ffrt.cpp56 inline ffrt_queue_t* TransferQueuePtr(std::shared_ptr<ffrt::queue> queue) in TransferQueuePtr() argument
58 if (queue) { in TransferQueuePtr()
111 if (queue == nullptr) { in RemoveOrphanByHandlerId()
134 if (queue == nullptr) { in RemoveAll()
158 if (queue == nullptr) { in Remove()
182 if (queue == nullptr) { in Remove()
207 if (queue == nullptr) { in Remove()
231 if (queue == nullptr) { in Remove()
254 if (queue == nullptr) { in HasInnerEvent()
276 if (queue == nullptr) { in HasInnerEvent()
[all …]
/ohos5.0/foundation/communication/dsoftbus/core/common/queue/
H A Dsoftbus_queue.c34 if (queue == NULL) { in QueueInit()
46 queue->producer.size = unitNum; in QueueInit()
50 queue->producer.head = 0; in QueueInit()
51 queue->consumer.head = 0; in QueueInit()
52 queue->producer.tail = 0; in QueueInit()
53 queue->consumer.tail = 0; in QueueInit()
54 queue->unitNum = unitNum; in QueueInit()
89 mask = queue->producer.mask; in QueueCountGet()
106 if (queue == NULL) { in CreateQueue()
113 SoftBusFree(queue); in CreateQueue()
[all …]
/ohos5.0/drivers/hdf_core/framework/test/unittest/model/network/wifi/unittest/message/
H A Dhdf_queue_test.c32 if (queue == NULL) { in MessageQueueTest001()
49 p = PopPriorityQueue(queue, 0); in MessageQueueTest001()
53 p = PopPriorityQueue(queue, 0); in MessageQueueTest001()
57 p = PopPriorityQueue(queue, 0); in MessageQueueTest001()
66 DestroyPriorityQueue(queue); in MessageQueueTest001()
80 PriorityQueue *queue = NULL; in MessageQueueTest002() local
82 if (queue == NULL) { in MessageQueueTest002()
116 DestroyPriorityQueue(queue); in MessageQueueTest002()
137 PriorityQueue *queue = NULL; in MessageQueueTest003() local
142 if (queue == NULL) { in MessageQueueTest003()
[all …]
/ohos5.0/docs/zh-cn/application-dev/reference/apis-arkts/
H A Djs-apis-queue.md136 queue.add(2);
137 queue.add(4);
138 queue.add(5);
139 queue.add(2);
140 queue.add(4);
172 queue.add(2);
173 queue.add(4);
174 queue.add(5);
175 queue.add(2);
218 queue.add(2);
[all …]
/ohos5.0/foundation/resourceschedule/ffrt/src/queue/
H A Dqueue_api.cpp41 QueueHandler* handler = static_cast<QueueHandler*>(queue); in ffrt_queue_submit_base()
156 void ffrt_queue_destroy(ffrt_queue_t queue)
159 QueueHandler* handler = static_cast<QueueHandler*>(queue);
206 uint64_t ffrt_queue_get_task_cnt(ffrt_queue_t queue)
209 QueueHandler* handler = static_cast<QueueHandler*>(queue);
225 void ffrt_queue_cancel_all(ffrt_queue_t queue)
228 QueueHandler* handler = static_cast<QueueHandler*>(queue);
233 void ffrt_queue_cancel_and_wait(ffrt_queue_t queue)
236 QueueHandler* handler = static_cast<QueueHandler*>(queue);
245 QueueHandler* handler = static_cast<QueueHandler*>(queue);
[all …]
/ohos5.0/drivers/hdf_core/adapter/khdf/liteos/model/network/wifi/platform/src/
H A Dhdf_wlan_queue.c37 HdfWlanQueue queue; member
44 if (queue == NULL) { in CreateQueue()
51 OsalMemFree(queue); in CreateQueue()
54 return (HdfWlanQueue *)queue; in CreateQueue()
56 void DestroyQueue(HdfWlanQueue *queue) in DestroyQueue() argument
58 if (queue == NULL) { in DestroyQueue()
66 OsalMemFree(queue); in DestroyQueue()
69 void *PopQueue(HdfWlanQueue *queue) in PopQueue() argument
71 if (queue == NULL) { in PopQueue()
86 int32_t PushQueue(HdfWlanQueue *queue, void *context) in PushQueue() argument
[all …]
/ohos5.0/base/startup/appspawn/modules/sandbox/
H A Dappspawn_permission.c56 if (GetPermissionNodeInQueue(queue, name) != NULL) { in AddSandboxPermissionNode()
81 int32_t DeleteSandboxPermissions(SandboxQueue *queue) in DeleteSandboxPermissions() argument
84 ListNode *node = queue->front.next; in DeleteSandboxPermissions()
85 while (node != &queue->front) { in DeleteSandboxPermissions()
95 node = queue->front.next; in DeleteSandboxPermissions()
100 int32_t PermissionRenumber(SandboxQueue *queue) in PermissionRenumber() argument
102 APPSPAWN_CHECK_ONLY_EXPER(queue != NULL, return -1); in PermissionRenumber()
103 ListNode *node = queue->front.next; in PermissionRenumber()
105 while (node != &queue->front) { in PermissionRenumber()
122 if (queue == NULL || permission == NULL) { in GetPermissionNodeInQueue()
[all …]
/ohos5.0/docs/en/application-dev/reference/apis-ffrt-kit/
H A Dqueue_8h.md1 # queue.h
6 The **queue.h** file declares the queue interfaces in C.
20 | typedef void\* [ffrt_queue_t](_f_f_r_t.md) | Defines the handle to a queue. |
42 …nt max_concurrency) | Sets the maximum concurrency for a queue, which must be a concurrent queue. …
43 …tr__t.md)\* attr) | Obtains the maximum concurrency of a queue, which must be a concurrent queue. …
45 …destroy](_f_f_r_t.md#ffrt_queue_destroy) ([ffrt_queue_t](_f_f_r_t.md) queue) | Destroys a queue. |
46queue, [ffrt_function_header_t](ffrt__function__header__t.md)\* f, const [ffrt_task_attr_t](ffrt_…
47queue, [ffrt_function_header_t](ffrt__function__header__t.md)\* f, const [ffrt_task_attr_t](ffrt_…
49 ….md#ffrt_queue_cancel) ([ffrt_task_handle_t](_f_f_r_t.md) handle) | Cancels a task in the queue. |
50 …_t.md)[ffrt_get_main_queue](_f_f_r_t.md#ffrt_get_main_queue) () | Obtains the main thread queue. |
[all …]

12345678910>>...36