Home
last modified time | relevance | path

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

12345678910>>...23

/freebsd-12-stable/contrib/apr-util/misc/
Dapr_queue.c73 #define apr_queue_full(queue) ((queue)->nelts == (queue)->bounds) argument
79 #define apr_queue_empty(queue) ((queue)->nelts == 0) argument
87 apr_queue_t *queue = data; in queue_destroy() local
91 apr_thread_cond_destroy(queue->not_empty); in queue_destroy()
92 apr_thread_cond_destroy(queue->not_full); in queue_destroy()
93 apr_thread_mutex_destroy(queue->one_big_mutex); in queue_destroy()
106 apr_queue_t *queue; in apr_queue_create() local
107 queue = apr_palloc(a, sizeof(apr_queue_t)); in apr_queue_create()
108 *q = queue; in apr_queue_create()
111 rv = apr_thread_mutex_create(&queue->one_big_mutex, in apr_queue_create()
[all …]
/freebsd-12-stable/sys/contrib/vchiq/interface/vchiq_arm/
Dvchiq_util.c41 int vchiu_queue_init(VCHIU_QUEUE_T *queue, int size) in vchiu_queue_init() argument
45 queue->size = size; in vchiu_queue_init()
46 queue->read = 0; in vchiu_queue_init()
47 queue->write = 0; in vchiu_queue_init()
48 queue->initialized = 1; in vchiu_queue_init()
50 _sema_init(&queue->pop, 0); in vchiu_queue_init()
51 _sema_init(&queue->push, 0); in vchiu_queue_init()
53 queue->storage = kzalloc(size * sizeof(VCHIQ_HEADER_T *), GFP_KERNEL); in vchiu_queue_init()
54 if (queue->storage == NULL) { in vchiu_queue_init()
55 vchiu_queue_delete(queue); in vchiu_queue_init()
[all …]
/freebsd-12-stable/sys/contrib/zstd/contrib/pzstd/utils/test/
DWorkQueueTest.cpp23 WorkQueue<int>* queue; member
29 while (queue->pop(result)) { in operator ()()
38 WorkQueue<int> queue; in TEST() local
41 queue.push(5); in TEST()
42 EXPECT_TRUE(queue.pop(result)); in TEST()
45 queue.push(1); in TEST()
46 queue.push(2); in TEST()
47 EXPECT_TRUE(queue.pop(result)); in TEST()
49 EXPECT_TRUE(queue.pop(result)); in TEST()
52 queue.push(1); in TEST()
[all …]
/freebsd-12-stable/sys/kern/
Dsubr_taskqueue.c108 _timeout_task_init(struct taskqueue *queue, struct timeout_task *timeout_task, in _timeout_task_init() argument
113 callout_init_mtx(&timeout_task->c, &queue->tq_mutex, in _timeout_task_init()
115 timeout_task->q = queue; in _timeout_task_init()
132 struct taskqueue *queue; in _taskqueue_create() local
139 queue = malloc(sizeof(struct taskqueue), M_TASKQUEUE, mflags | M_ZERO); in _taskqueue_create()
140 if (queue == NULL) { in _taskqueue_create()
147 STAILQ_INIT(&queue->tq_queue); in _taskqueue_create()
148 LIST_INIT(&queue->tq_active); in _taskqueue_create()
149 queue->tq_enqueue = enqueue; in _taskqueue_create()
150 queue->tq_context = context; in _taskqueue_create()
[all …]
Dsubr_gtaskqueue.c54 static int task_is_running(struct gtaskqueue *queue, struct gtask *gtask);
55 static void gtaskqueue_drain_locked(struct gtaskqueue *queue, struct gtask *gtask);
130 struct gtaskqueue *queue; in _gtaskqueue_create() local
139 queue = malloc(sizeof(struct gtaskqueue), M_GTASKQUEUE, mflags | M_ZERO); in _gtaskqueue_create()
140 if (!queue) { in _gtaskqueue_create()
145 STAILQ_INIT(&queue->tq_queue); in _gtaskqueue_create()
146 LIST_INIT(&queue->tq_active); in _gtaskqueue_create()
147 queue->tq_enqueue = enqueue; in _gtaskqueue_create()
148 queue->tq_context = context; in _gtaskqueue_create()
149 queue->tq_name = tq_name; in _gtaskqueue_create()
[all …]
/freebsd-12-stable/share/man/man3/
DMakefile18 queue.3 \
77 MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \
78 queue.3 LIST_CLASS_HEAD.3 \
79 queue.3 LIST_EMPTY.3 \
80 queue.3 LIST_ENTRY.3 \
81 queue.3 LIST_FIRST.3 \
82 queue.3 LIST_FOREACH.3 \
83 queue.3 LIST_FOREACH_FROM.3 \
84 queue.3 LIST_FOREACH_FROM_SAFE.3 \
85 queue.3 LIST_FOREACH_SAFE.3 \
[all …]
/freebsd-12-stable/sys/cam/
Dcam_queue.c100 camq_free(struct camq *queue) in camq_free() argument
102 if (queue != NULL) { in camq_free()
103 camq_fini(queue); in camq_free()
104 free(queue, M_CAMQ); in camq_free()
109 camq_fini(struct camq *queue) in camq_fini() argument
111 if (queue->queue_array != NULL) { in camq_fini()
116 queue->queue_array++; in camq_fini()
117 free(queue->queue_array, M_CAMQ); in camq_fini()
122 camq_resize(struct camq *queue, int new_size) in camq_resize() argument
126 KASSERT(new_size >= queue->entries, ("camq_resize: " in camq_resize()
[all …]
Dcam_queue.h63 struct camq queue; member
112 u_int32_t camq_resize(struct camq *queue, int new_size);
124 void camq_free(struct camq *queue);
129 void camq_fini(struct camq *queue);
135 void camq_insert(struct camq *queue, cam_pinfo *new_entry);
141 cam_pinfo *camq_remove(struct camq *queue, int index);
155 void camq_change_priority(struct camq *queue, int index,
174 cam_ccbq_send_ccb(struct cam_ccbq *queue, union ccb *send_ccb);
186 return (ccbq->queue.entries + ccbq->queue_extra_entries); in cam_ccbq_pending_ccb_count()
200 struct camq *queue = &ccbq->queue; in cam_ccbq_insert_ccb() local
[all …]
/freebsd-12-stable/contrib/dma/
Ddma.c99 set_from(struct queue *queue, const char *osender) in set_from() argument
133 queue->sender = sender; in set_from()
157 do_alias(struct queue *queue, const char *addr) in do_alias() argument
167 if (add_recp(queue, sit->str, EXPAND_ADDR) != 0) in do_alias()
177 add_recp(struct queue *queue, const char *str, int expand) in add_recp() argument
191 it->sender = queue->sender; in add_recp()
198 LIST_FOREACH(tit, &queue->queue, next) { in add_recp()
206 LIST_INSERT_HEAD(&queue->queue, it, next); in add_recp()
215 aliased = do_alias(queue, it->addr); in add_recp()
217 aliased = do_alias(queue, "*"); in add_recp()
[all …]
Dspool.c75 newspoolf(struct queue *queue) in newspoolf() argument
93 queue->tmpf = strdup(fn); in newspoolf()
94 if (queue->tmpf == NULL) in newspoolf()
102 if (asprintf(&queue->id, "%"PRIxMAX, (uintmax_t)st.st_ino) < 0) in newspoolf()
105 queue->mailf = fdopen(fd, "r+"); in newspoolf()
106 if (queue->mailf == NULL) in newspoolf()
111 t->str = queue->tmpf; in newspoolf()
117 if (queue->mailf != NULL) in newspoolf()
118 fclose(queue->mailf); in newspoolf()
157 readqueuef(struct queue *queue, char *queuefn) in readqueuef() argument
[all …]
Dmail.c52 struct queue bounceq; in bounce()
64 LIST_INIT(&bounceq.queue); in bounce()
168 parse_addrs(struct parse_state *ps, char *s, struct queue *queue) in parse_addrs() argument
343 if (add_recp(queue, addr, EXPAND_WILDCARD) != 0) in parse_addrs()
350 writeline(struct queue *queue, const char *line, ssize_t linelen) in writeline() argument
360 if (fwrite(line, len, 1, queue->mailf) != 1) in writeline()
366 if (fwrite("\n", 1, 1, queue->mailf) != 1) in writeline()
376 readmail(struct queue *queue, int nodot, int recp_from_header) in readmail() argument
395 error = fprintf(queue->mailf, in readmail()
402 queue->sender, in readmail()
[all …]
/freebsd-12-stable/contrib/subversion/subversion/libsvn_subr/
Dsorts.c415 heap_is_less(svn_priority_queue__t *queue, in heap_is_less() argument
419 char *lhs_value = queue->elements->elts + lhs * queue->elements->elt_size; in heap_is_less()
420 char *rhs_value = queue->elements->elts + rhs * queue->elements->elt_size; in heap_is_less()
423 assert(lhs < (apr_size_t)queue->elements->nelts); in heap_is_less()
424 assert(rhs < (apr_size_t)queue->elements->nelts); in heap_is_less()
425 return queue->compare_func(lhs_value, rhs_value) < 0; in heap_is_less()
431 heap_swap(svn_priority_queue__t *queue, in heap_swap() argument
436 char *lhs_value = queue->elements->elts + lhs * queue->elements->elt_size; in heap_swap()
437 char *rhs_value = queue->elements->elts + rhs * queue->elements->elt_size; in heap_swap()
439 for (i = 0; i < queue->elements->elt_size; ++i) in heap_swap()
[all …]
/freebsd-12-stable/sys/contrib/octeon-sdk/
Dcvmx-pko.c287 int queue, base_queue, num_queues; in __cvmx_pko_iport_config() local
309 for (queue = 0; queue < num_queues; queue++) in __cvmx_pko_iport_config()
312 priorities[queue] == CVMX_PKO_QUEUE_STATIC_PRIORITY) in __cvmx_pko_iport_config()
313 static_priority_base = queue; in __cvmx_pko_iport_config()
317 priorities[queue] != CVMX_PKO_QUEUE_STATIC_PRIORITY && in __cvmx_pko_iport_config()
318 queue) in __cvmx_pko_iport_config()
319 static_priority_end = queue - 1; in __cvmx_pko_iport_config()
322 queue == num_queues - 1) in __cvmx_pko_iport_config()
323 static_priority_end = queue; /* all queues are static priority */ in __cvmx_pko_iport_config()
331 (int)queue > static_priority_end && in __cvmx_pko_iport_config()
[all …]
Dcvmx-zip.c96 int cvmx_zip_queue_initialize(int queue, int zcoremask) in cvmx_zip_queue_initialize() argument
110 result = cvmx_cmd_queue_initialize(CVMX_CMD_QUEUE_ZIP_QUE(queue), 0, in cvmx_zip_queue_initialize()
122 zip_que_buf.s.ptr = cvmx_ptr_to_phys(cvmx_cmd_queue_buffer(CVMX_CMD_QUEUE_ZIP_QUE(queue)))>>7; in cvmx_zip_queue_initialize()
123 cvmx_write_csr(CVMX_ZIP_QUEX_BUF(queue), zip_que_buf.u64); in cvmx_zip_queue_initialize()
126 que_map.u64 = cvmx_read_csr(CVMX_ZIP_QUEX_MAP(queue)); in cvmx_zip_queue_initialize()
128 cvmx_write_csr(CVMX_ZIP_QUEX_MAP(queue), que_map.u64); in cvmx_zip_queue_initialize()
132 que_ena.s.ena |= (1<<queue); in cvmx_zip_queue_initialize()
139 if (queue) in cvmx_zip_queue_initialize()
146 cvmx_read_csr(CVMX_ZIP_QUEX_BUF(queue)); in cvmx_zip_queue_initialize()
183 int cvmx_zip_queue_shutdown(int queue) in cvmx_zip_queue_shutdown() argument
[all …]
/freebsd-12-stable/share/examples/pf/
Dfaq-example310 # enable queueing on the external interface to queue packets going out
12 # each queue can be controlled. the max outgoing bandwidth is 1.5Mbps.
14 altq on fxp0 cbq bandwidth 1.5Mb queue { std_ext, www_ext, boss_ext }
17 # std_ext - the standard queue. also the default queue for
19 # www_ext - container queue for WWW server queues. limit to
25 queue std_ext bandwidth 500Kb cbq(default borrow)
26 queue www_ext bandwidth 500Kb { www_ext_http, www_ext_misc }
27 queue www_ext_http bandwidth 50% priority 3 cbq(red borrow)
28 queue www_ext_misc bandwidth 50% priority 1 cbq(borrow)
29 queue boss_ext bandwidth 500Kb priority 3 cbq(borrow)
[all …]
Dfaq-example213 # ACK queue.
15 altq on fxp0 priq bandwidth 610Kb queue { std_out, ssh_im_out, dns_out, \
19 # std_out - the standard queue. any filter rule below that does not
20 # explicitly specify a queue will have its traffic added
21 # to this queue.
26 queue std_out priq(default)
27 queue ssh_im_out priority 4 priq(red)
28 queue dns_out priority 5
29 queue tcp_ack_out priority 6
35 altq on dc0 cbq bandwidth 2Mb queue { std_in, ssh_im_in, dns_in, bob_in }
[all …]
Dqueue23 # advanced queue example.
10 altq on $ext_if cbq bandwidth 5Mb queue { std, http, mail, ssh }
12 queue std bandwidth 10% cbq(default)
13 queue http bandwidth 60% priority 2 cbq(borrow red) { employees, developers }
14 queue developers bandwidth 75% cbq(borrow)
15 queue employees bandwidth 15%
16 queue mail bandwidth 10% priority 0 cbq(borrow ecn)
17 queue ssh bandwidth 20% cbq(borrow) { ssh_interactive, ssh_bulk }
18 queue ssh_interactive bandwidth 25% priority 7
19 queue ssh_bulk bandwidth 75% priority 0
[all …]
Dqueue17 queue { deflt, http, ssh, mail, rsets }
8 queue deflt bandwidth 10% priority 0 cbq(default ecn)
9 queue http bandwidth 1.5Mb priority 3 { http_vhosts, http_cust1 }
10 queue http_vhosts bandwidth 40% cbq(borrow red)
11 queue http_cust1 bandwidth 0.5Mb
12 queue mail bandwidth 10% priority 1
13 queue ssh bandwidth 100Kb priority 7 cbq(borrow)
14 queue rsets bandwidth 7500b priority 0 cbq(red)
16 block return in on $ext_if inet all queue rsets
17 pass in on $ext_if inet proto tcp from any to any port 80 queue http
[all …]
/freebsd-12-stable/sys/contrib/ck/src/
Dck_barrier_combining.c39 ck_barrier_combining_queue_dequeue(struct ck_barrier_combining_queue *queue) in ck_barrier_combining_queue_dequeue() argument
43 if (queue->head != NULL) { in ck_barrier_combining_queue_dequeue()
44 front = queue->head; in ck_barrier_combining_queue_dequeue()
45 queue->head = queue->head->next; in ck_barrier_combining_queue_dequeue()
76 ck_barrier_combining_queue_enqueue(struct ck_barrier_combining_queue *queue, in ck_barrier_combining_queue_enqueue() argument
81 if (queue->head == NULL) { in ck_barrier_combining_queue_enqueue()
82 queue->head = queue->tail = node_value; in ck_barrier_combining_queue_enqueue()
86 queue->tail->next = node_value; in ck_barrier_combining_queue_enqueue()
87 queue->tail = node_value; in ck_barrier_combining_queue_enqueue()
99 struct ck_barrier_combining_queue queue; in ck_barrier_combining_group_init() local
[all …]
/freebsd-12-stable/sys/dev/vmware/vmci/
Dvmci_kernel_if.c515 struct vmci_queue *queue; in vmci_alloc_queue() local
520 sizeof(*queue) + sizeof(*(queue->kernel_if)) + dmas_size; in vmci_alloc_queue()
528 queue = malloc(queue_size, M_DEVBUF, M_NOWAIT); in vmci_alloc_queue()
529 if (!queue) in vmci_alloc_queue()
532 queue->q_header = NULL; in vmci_alloc_queue()
533 queue->saved_header = NULL; in vmci_alloc_queue()
534 queue->kernel_if = (struct vmci_queue_kernel_if *)(queue + 1); in vmci_alloc_queue()
535 queue->kernel_if->num_pages = num_pages; in vmci_alloc_queue()
536 queue->kernel_if->dmas = (struct vmci_dma_alloc *)(queue->kernel_if + in vmci_alloc_queue()
539 vmci_dma_malloc(PAGE_SIZE, 1, &queue->kernel_if->dmas[i]); in vmci_alloc_queue()
[all …]
/freebsd-12-stable/contrib/llvm-project/libcxx/include/
Dqueue2 //===--------------------------- queue ------------------------------------===//
14 queue synopsis
20 class queue
33 queue() = default;
34 ~queue() = default;
36 queue(const queue& q) = default;
37 queue(queue&& q) = default;
39 queue& operator=(const queue& q) = default;
40 queue& operator=(queue&& q) = default;
42 explicit queue(const container_type& c);
[all …]
/freebsd-12-stable/sys/sys/
Dtaskqueue.h84 int taskqueue_enqueue(struct taskqueue *queue, struct task *task);
85 int taskqueue_enqueue_timeout(struct taskqueue *queue,
87 int taskqueue_enqueue_timeout_sbt(struct taskqueue *queue,
90 int taskqueue_poll_is_busy(struct taskqueue *queue, struct task *task);
91 int taskqueue_cancel(struct taskqueue *queue, struct task *task,
93 int taskqueue_cancel_timeout(struct taskqueue *queue,
95 void taskqueue_drain(struct taskqueue *queue, struct task *task);
96 void taskqueue_drain_timeout(struct taskqueue *queue,
98 void taskqueue_drain_all(struct taskqueue *queue);
99 void taskqueue_quiesce(struct taskqueue *queue);
[all …]
/freebsd-12-stable/contrib/ntp/include/
Dntp_prio_q.h35 } queue; typedef
44 void destroy_queue(queue *my_queue);
47 int empty(queue *my_queue);
48 void *queue_head(queue *my_queue);
49 queue *enqueue(queue *my_queue, void *my_node);
50 void append_queue(queue *q1, queue *q2);
51 void *dequeue(queue *my_queue);
52 int get_no_of_elements(queue *my_queue);
67 queue *debug_create_priority_queue(
/freebsd-12-stable/contrib/libstdc++/include/bits/
Dstl_queue.h95 class queue in _GLIBCXX_BEGIN_NAMESPACE()
106 operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); in _GLIBCXX_BEGIN_NAMESPACE()
110 operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); in _GLIBCXX_BEGIN_NAMESPACE()
135 queue(const _Sequence& __c = _Sequence()) : c(__c) {} in _GLIBCXX_BEGIN_NAMESPACE()
239 operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
257 operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
263 operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
269 operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
275 operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
281 operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
/freebsd-12-stable/sys/contrib/ck/include/spinlock/
Dmcs.h48 ck_spinlock_mcs_init(struct ck_spinlock_mcs **queue) in ck_spinlock_mcs_init() argument
51 *queue = NULL; in ck_spinlock_mcs_init()
57 ck_spinlock_mcs_trylock(struct ck_spinlock_mcs **queue, in ck_spinlock_mcs_trylock() argument
66 r = ck_pr_cas_ptr(queue, NULL, node); in ck_spinlock_mcs_trylock()
72 ck_spinlock_mcs_locked(struct ck_spinlock_mcs **queue) in ck_spinlock_mcs_locked() argument
76 r = ck_pr_load_ptr(queue) != NULL; in ck_spinlock_mcs_locked()
82 ck_spinlock_mcs_lock(struct ck_spinlock_mcs **queue, in ck_spinlock_mcs_lock() argument
100 previous = ck_pr_fas_ptr(queue, node); in ck_spinlock_mcs_lock()
116 ck_spinlock_mcs_unlock(struct ck_spinlock_mcs **queue, in ck_spinlock_mcs_unlock() argument
130 if (ck_pr_load_ptr(queue) == node && in ck_spinlock_mcs_unlock()
[all …]

12345678910>>...23