Apache HTTPD
framework
httpd-2.4.62
srclib
apr-util
include
apr_thread_pool.h
Go to the documentation of this file.
1
/*
2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed
4
* with this work for additional information regarding copyright
5
* ownership. The ASF licenses this file to you under the Apache
6
* License, Version 2.0 (the "License"); you may not use this file
7
* except in compliance with the License. You may obtain a copy of
8
* the License at
9
*
10
* http://www.apache.org/licenses/LICENSE-2.0
11
*
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15
* implied. See the License for the specific language governing
16
* permissions and limitations under the License.
17
*/
18
19
#ifndef APU_THREAD_POOL_H
20
#define APU_THREAD_POOL_H
21
22
#include "apu.h"
23
#include "
apr_thread_proc.h
"
24
45
#if APR_HAS_THREADS
46
47
#ifdef __cplusplus
48
extern
"C"
{
49
#endif
/* __cplusplus */
50
58
typedef
struct
apr_thread_pool
apr_thread_pool_t
;
59
60
#define APR_THREAD_TASK_PRIORITY_LOWEST 0
61
#define APR_THREAD_TASK_PRIORITY_LOW 63
62
#define APR_THREAD_TASK_PRIORITY_NORMAL 127
63
#define APR_THREAD_TASK_PRIORITY_HIGH 191
64
#define APR_THREAD_TASK_PRIORITY_HIGHEST 255
65
77
APU_DECLARE
(
apr_status_t
)
apr_thread_pool_create
(
apr_thread_pool_t
**
me
,
78
apr_size_t
init_threads
,
79
apr_size_t
max_threads
,
80
apr_pool_t
*
pool
);
81
86
APU_DECLARE
(
apr_status_t
)
apr_thread_pool_destroy
(
apr_thread_pool_t
*
me
);
87
97
APU_DECLARE
(
apr_status_t
)
apr_thread_pool_push
(
apr_thread_pool_t
*
me
,
98
apr_thread_start_t
func
,
99
void
*
param
,
100
apr_byte_t
priority,
101
void
*owner);
111
APU_DECLARE
(
apr_status_t
)
apr_thread_pool_schedule
(
apr_thread_pool_t
*
me
,
112
apr_thread_start_t
func
,
113
void
*
param
,
114
apr_interval_time_t
time,
115
void
*owner);
116
126
APU_DECLARE
(
apr_status_t
)
apr_thread_pool_top
(
apr_thread_pool_t
*
me
,
127
apr_thread_start_t
func
,
128
void
*
param
,
129
apr_byte_t
priority,
130
void
*owner);
131
141
APU_DECLARE
(
apr_status_t
)
apr_thread_pool_tasks_cancel
(
apr_thread_pool_t
*
me
,
142
void
*owner);
143
149
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_tasks_count
(
apr_thread_pool_t
*
me
);
150
156
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_scheduled_tasks_count
(
apr_thread_pool_t
*
me
);
157
163
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_threads_count
(
apr_thread_pool_t
*
me
);
164
170
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_busy_count
(
apr_thread_pool_t
*
me
);
171
177
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_idle_count
(
apr_thread_pool_t
*
me
);
178
186
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_idle_max_set
(
apr_thread_pool_t
*
me
,
187
apr_size_t
cnt
);
188
194
APU_DECLARE
(
apr_size_t
)
195
apr_thread_pool_tasks_run_count
(
apr_thread_pool_t
*
me
);
196
202
APU_DECLARE
(
apr_size_t
)
203
apr_thread_pool_tasks_high_count
(
apr_thread_pool_t
*
me
);
204
210
APU_DECLARE
(
apr_size_t
)
211
apr_thread_pool_threads_high_count
(
apr_thread_pool_t
*
me
);
212
218
APU_DECLARE
(
apr_size_t
)
219
apr_thread_pool_threads_idle_timeout_count
(
apr_thread_pool_t
*
me
);
220
226
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_idle_max_get
(
apr_thread_pool_t
*
me
);
227
234
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_thread_max_set
(
apr_thread_pool_t
*
me
,
235
apr_size_t
cnt
);
236
247
APU_DECLARE
(
apr_interval_time_t
)
248
apr_thread_pool_idle_wait_set
(
apr_thread_pool_t
*
me
,
249
apr_interval_time_t
timeout
);
250
257
APU_DECLARE
(
apr_interval_time_t
)
258
apr_thread_pool_idle_wait_get
(
apr_thread_pool_t
*
me
);
259
265
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_thread_max_get
(
apr_thread_pool_t
*
me
);
266
273
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_threshold_set
(
apr_thread_pool_t
*
me
,
274
apr_size_t
val
);
275
281
APU_DECLARE
(
apr_size_t
)
apr_thread_pool_threshold_get
(
apr_thread_pool_t
*
me
);
282
289
APU_DECLARE
(
apr_status_t
)
apr_thread_pool_task_owner_get
(
apr_thread_t
*
thd
,
290
void
**owner);
291
294
#ifdef __cplusplus
295
}
296
#endif
297
298
#endif
/* APR_HAS_THREADS */
299
#endif
/* !APR_THREAD_POOL_H */
APU_DECLARE
APU_DECLARE(void)
Computes SipHash-2-4, producing a 64bit (APR_SIPHASH_DSIZE) hash from a message and a 128bit (APR_SIP...
Definition
apr_sha1.c:206
apr_thread_proc.h
APR Thread and Process Library.
size
apr_size_t size
Definition
apr_allocator.h:115
val
apr_uint32_t val
Definition
apr_atomic.h:66
pool
const char int apr_pool_t * pool
Definition
apr_cstr.h:84
apr_status_t
int apr_status_t
Definition
apr_errno.h:44
func
apr_interval_time_t apr_pollcb_cb_t func
Definition
apr_poll.h:422
apr_thread_start_t
void *(APR_THREAD_FUNC * apr_thread_start_t)(apr_thread_t *, void *)
Definition
apr_thread_proc.h:198
apr_interval_time_t
apr_int64_t apr_interval_time_t
Definition
apr_time.h:55
apr_pool_t
Definition
apr_pools.c:562
apr_thread_t
Definition
apr_arch_threadproc.h:42
param_s
Definition
mod_mime.c:96
timeout
IN ULONG IN INT timeout
Definition
apr_arch_misc.h:482
Generated by
1.9.8