/usr/include/bind9/isc
NameSizeModeActions
aes.h10800644editdlrm
app.h104780644editdlrm
assertions.h29070644editdlrm
atomic.h41680644editdlrm
backtrace.h38910644editdlrm
base32.h44530644editdlrm
base64.h28660644editdlrm
bind9.h8300644editdlrm
boolean.h5940644editdlrm
buffer.h262680644editdlrm
bufferlist.h14520644editdlrm
cmocka.h13830644editdlrm
commandline.h17130644editdlrm
condition.h14780644editdlrm
counter.h19260644editdlrm
crc64.h9980644editdlrm
deprecated.h6230644editdlrm
dir.h15980644editdlrm
endian.h47780644editdlrm
entropy.h103730644editdlrm
errno.h6590644editdlrm
errno2result.h9020644editdlrm
error.h14300644editdlrm
event.h30530644editdlrm
eventclass.h13810644editdlrm
file.h116670644editdlrm
formatcheck.h8930644editdlrm
fsaccess.h74420644editdlrm
hash.h76620644editdlrm
heap.h52640644editdlrm
hex.h28060644editdlrm
hmacmd5.h17870644editdlrm
hmacsha.h45110644editdlrm
ht.h43960644editdlrm
httpd.h23180644editdlrm
int.h10880644editdlrm
interfaceiter.h31200644editdlrm
iterated_hash.h10460644editdlrm
json.h14590644editdlrm
keyboard.h9890644editdlrm
lang.h6370644editdlrm
lex.h97710644editdlrm
lfsr.h29580644editdlrm
lib.h10680644editdlrm
likely.h8180644editdlrm
list.h57510644editdlrm
log.h287340644editdlrm
magic.h9940644editdlrm
md5.h23800644editdlrm
mem.h211100644editdlrm
meminfo.h7100644editdlrm
msgcat.h27260644editdlrm
msgs.h84220644editdlrm
mutex.h35240644editdlrm
mutexblock.h13750644editdlrm
net.h105340644editdlrm
netaddr.h45900644editdlrm
netdb.h8630644editdlrm
netscope.h9670644editdlrm
offset.h7000644editdlrm
once.h9830644editdlrm
ondestroy.h27990644editdlrm
os.h6710644editdlrm
parseint.h15420644editdlrm
platform.h97170644editdlrm
pool.h35020644editdlrm
portset.h32950644editdlrm
print.h24750644editdlrm
queue.h52040644editdlrm
quota.h24400644editdlrm
radix.h64910644editdlrm
random.h35820644editdlrm
ratelimiter.h34970644editdlrm
refcount.h81930644editdlrm
regex.h7670644editdlrm
region.h20340644editdlrm
resource.h28620644editdlrm
result.h49820644editdlrm
resultclass.h15990644editdlrm
rwlock.h38070644editdlrm
safe.h13520644editdlrm
serial.h13680644editdlrm
sha1.h15560644editdlrm
sha2.h57330644editdlrm
siphash.h7340644editdlrm
sockaddr.h60390644editdlrm
socket.h366550644editdlrm
stat.h8060644editdlrm
stats.h37090644editdlrm
stdatomic.h52500644editdlrm
stdio.h17870644editdlrm
stdlib.h7040644editdlrm
stdtime.h10650644editdlrm
strerror.h7770644editdlrm
string.h60190644editdlrm
symtab.h43260644editdlrm
syslog.h8440644editdlrm
task.h215440644editdlrm
taskpool.h37090644editdlrm
thread.h15060644editdlrm
time.h88760644editdlrm
timer.h107950644editdlrm
tm.h8950644editdlrm
types.h57800644editdlrm
utf8.h9280644editdlrm
util.h105370644editdlrm
version.h6890644editdlrm
xml.h10940644editdlrm
Edit: /usr/include/bind9/isc/taskpool.h (3709B)
/* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #ifndef ISC_TASKPOOL_H #define ISC_TASKPOOL_H 1 /***** ***** Module Info *****/ /*! \file isc/taskpool.h * \brief A task pool is a mechanism for sharing a small number of tasks * among a large number of objects such that each object is * assigned a unique task, but each task may be shared by several * objects. * * Task pools are used to let objects that can exist in large * numbers (e.g., zones) use tasks for synchronization without * the memory overhead and unfair scheduling competition that * could result from creating a separate task for each object. */ /*** *** Imports. ***/ #include #include #include ISC_LANG_BEGINDECLS /***** ***** Types. *****/ typedef struct isc_taskpool isc_taskpool_t; /***** ***** Functions. *****/ isc_result_t isc_taskpool_create(isc_taskmgr_t *tmgr, isc_mem_t *mctx, unsigned int ntasks, unsigned int quantum, isc_taskpool_t **poolp); /*%< * Create a task pool of "ntasks" tasks, each with quantum * "quantum". * * Requires: * *\li 'tmgr' is a valid task manager. * *\li 'mctx' is a valid memory context. * *\li poolp != NULL && *poolp == NULL * * Ensures: * *\li On success, '*taskp' points to the new task pool. * * Returns: * *\li #ISC_R_SUCCESS *\li #ISC_R_NOMEMORY *\li #ISC_R_UNEXPECTED */ void isc_taskpool_gettask(isc_taskpool_t *pool, isc_task_t **targetp); /*%< * Attach to a task from the pool. Currently the next task is chosen * from the pool at random. (This may be changed in the future to * something that guaratees balance.) */ int isc_taskpool_size(isc_taskpool_t *pool); /*%< * Returns the number of tasks in the task pool 'pool'. */ isc_result_t isc_taskpool_expand(isc_taskpool_t **sourcep, unsigned int size, isc_taskpool_t **targetp); /*%< * If 'size' is larger than the number of tasks in the pool pointed to by * 'sourcep', then a new taskpool of size 'size' is allocated, the existing * tasks from are moved into it, additional tasks are created to bring the * total number up to 'size', and the resulting pool is attached to * 'targetp'. * * If 'size' is less than or equal to the tasks in pool 'source', then * 'sourcep' is attached to 'targetp' without any other action being taken. * * In either case, 'sourcep' is detached. * * Requires: * * \li 'sourcep' is not NULL and '*source' is not NULL * \li 'targetp' is not NULL and '*source' is NULL * * Ensures: * * \li On success, '*targetp' points to a valid task pool. * \li On success, '*sourcep' points to NULL. * * Returns: * * \li #ISC_R_SUCCESS * \li #ISC_R_NOMEMORY */ void isc_taskpool_destroy(isc_taskpool_t **poolp); /*%< * Destroy a task pool. The tasks in the pool are detached but not * shut down. * * Requires: * \li '*poolp' is a valid task pool. */ void isc_taskpool_setprivilege(isc_taskpool_t *pool, bool priv); /*%< * Set the privilege flag on all tasks in 'pool' to 'priv'. If 'priv' is * true, then when the task manager is set into privileged mode, only * tasks wihin this pool will be able to execute. (Note: It is important * to turn the pool tasks' privilege back off before the last task finishes * executing.) * * Requires: * \li 'pool' is a valid task pool. */ ISC_LANG_ENDDECLS #endif /* ISC_TASKPOOL_H */