/
usr
/
include
/
bind9
/
isc
/
/usr/include/bind9/isc
mkdir
upload
Name
Size
Mode
Actions
aes.h
1015
0644
edit
dl
rm
align.h
569
0644
edit
dl
rm
app.h
7139
0644
edit
dl
rm
assertions.h
2227
0644
edit
dl
rm
astack.h
1137
0644
edit
dl
rm
atomic.h
3082
0644
edit
dl
rm
backtrace.h
3894
0644
edit
dl
rm
barrier.h
1052
0644
edit
dl
rm
base32.h
4453
0644
edit
dl
rm
base64.h
2865
0644
edit
dl
rm
bind9.h
829
0644
edit
dl
rm
buffer.h
30625
0644
edit
dl
rm
bufferlist.h
1453
0644
edit
dl
rm
cmocka.h
1383
0644
edit
dl
rm
commandline.h
1711
0644
edit
dl
rm
condition.h
1914
0644
edit
dl
rm
counter.h
1922
0644
edit
dl
rm
crc64.h
998
0644
edit
dl
rm
deprecated.h
662
0644
edit
dl
rm
dir.h
1545
0644
edit
dl
rm
endian.h
4868
0644
edit
dl
rm
errno.h
659
0644
edit
dl
rm
errno2result.h
901
0644
edit
dl
rm
error.h
1434
0644
edit
dl
rm
event.h
3442
0644
edit
dl
rm
eventclass.h
1442
0644
edit
dl
rm
file.h
11669
0644
edit
dl
rm
formatcheck.h
940
0644
edit
dl
rm
fsaccess.h
7453
0644
edit
dl
rm
fuzz.h
593
0644
edit
dl
rm
hash.h
1649
0644
edit
dl
rm
heap.h
5263
0644
edit
dl
rm
hex.h
2805
0644
edit
dl
rm
hmac.h
3970
0644
edit
dl
rm
hp.h
4588
0644
edit
dl
rm
ht.h
4485
0644
edit
dl
rm
httpd.h
2291
0644
edit
dl
rm
interfaceiter.h
3141
0644
edit
dl
rm
iterated_hash.h
933
0644
edit
dl
rm
lang.h
686
0644
edit
dl
rm
lex.h
10004
0644
edit
dl
rm
lfsr.h
2955
0644
edit
dl
rm
lib.h
1155
0644
edit
dl
rm
likely.h
868
0644
edit
dl
rm
list.h
8085
0644
edit
dl
rm
log.h
26497
0644
edit
dl
rm
magic.h
999
0644
edit
dl
rm
managers.h
776
0644
edit
dl
rm
md.h
5760
0644
edit
dl
rm
mem.h
18086
0644
edit
dl
rm
meminfo.h
710
0644
edit
dl
rm
mutex.h
4178
0644
edit
dl
rm
mutexatomic.h
9790
0644
edit
dl
rm
mutexblock.h
1162
0644
edit
dl
rm
net.h
8564
0644
edit
dl
rm
netaddr.h
4786
0644
edit
dl
rm
netdb.h
860
0644
edit
dl
rm
netmgr.h
15732
0644
edit
dl
rm
netscope.h
966
0644
edit
dl
rm
nonce.h
743
0644
edit
dl
rm
offset.h
687
0644
edit
dl
rm
once.h
767
0644
edit
dl
rm
os.h
765
0644
edit
dl
rm
parseint.h
1541
0644
edit
dl
rm
platform.h
1859
0644
edit
dl
rm
pool.h
3491
0644
edit
dl
rm
portset.h
3294
0644
edit
dl
rm
print.h
680
0644
edit
dl
rm
queue.h
1337
0644
edit
dl
rm
quota.h
3560
0644
edit
dl
rm
radix.h
7019
0644
edit
dl
rm
random.h
1482
0644
edit
dl
rm
ratelimiter.h
3492
0644
edit
dl
rm
refcount.h
5103
0644
edit
dl
rm
regex.h
767
0644
edit
dl
rm
region.h
2234
0644
edit
dl
rm
resource.h
2860
0644
edit
dl
rm
result.h
5580
0644
edit
dl
rm
resultclass.h
1597
0644
edit
dl
rm
rwlock.h
2535
0644
edit
dl
rm
safe.h
1145
0644
edit
dl
rm
serial.h
1367
0644
edit
dl
rm
siphash.h
916
0644
edit
dl
rm
sockaddr.h
6275
0644
edit
dl
rm
socket.h
24120
0644
edit
dl
rm
stat.h
803
0644
edit
dl
rm
stats.h
6689
0644
edit
dl
rm
stdatomic.h
9116
0644
edit
dl
rm
stdio.h
1728
0644
edit
dl
rm
stdtime.h
1392
0644
edit
dl
rm
strerr.h
575
0644
edit
dl
rm
string.h
851
0644
edit
dl
rm
symtab.h
4325
0644
edit
dl
rm
syslog.h
843
0644
edit
dl
rm
task.h
17126
0644
edit
dl
rm
taskpool.h
3281
0644
edit
dl
rm
thread.h
1908
0644
edit
dl
rm
time.h
11106
0644
edit
dl
rm
timer.h
7961
0644
edit
dl
rm
tm.h
894
0644
edit
dl
rm
types.h
5854
0644
edit
dl
rm
url.h
2681
0644
edit
dl
rm
utf8.h
928
0644
edit
dl
rm
util.h
14291
0644
edit
dl
rm
version.h
499
0644
edit
dl
rm
Edit:
/usr/include/bind9/isc/app.h
(7139B)
/* * 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_APP_H #define ISC_APP_H 1 /***** ***** Module Info *****/ /*! \file isc/app.h * \brief ISC Application Support * * Dealing with program termination can be difficult, especially in a * multithreaded program. The routines in this module help coordinate * the shutdown process. They are used as follows by the initial (main) * thread of the application: * *\li isc_app_start(); Call very early in main(), before * any other threads have been created. * *\li isc_app_run(); This will post any on-run events, * and then block until application * shutdown is requested. A shutdown * request is made by calling * isc_app_shutdown(), or by sending * SIGINT or SIGTERM to the process. * After isc_app_run() returns, the * application should shutdown itself. * *\li isc_app_finish(); Call very late in main(). * * Applications that want to use SIGHUP/isc_app_reload() to trigger reloading * should check the result of isc_app_run() and call the reload routine if * the result is ISC_R_RELOAD. They should then call isc_app_run() again * to resume waiting for reload or termination. * * Use of this module is not required. In particular, isc_app_start() is * NOT an ISC library initialization routine. * * This module also supports per-thread 'application contexts'. With this * mode, a thread-based application will have a separate context, in which * it uses other ISC library services such as tasks or timers. Signals are * not caught in this mode, so that the application can handle the signals * in its preferred way. * * \li MP: * Clients must ensure that isc_app_start(), isc_app_run(), and * isc_app_finish() are called at most once. isc_app_shutdown() * is safe to use by any thread (provided isc_app_start() has been * called previously). * * The same note applies to isc_app_ctxXXX() functions, but in this case * it's a per-thread restriction. For example, a thread with an * application context must ensure that isc_app_ctxstart() with the * context is called at most once. * * \li Reliability: * No anticipated impact. * * \li Resources: * None. * * \li Security: * No anticipated impact. * * \li Standards: * None. */ #include <stdbool.h> #include <isc/eventclass.h> #include <isc/lang.h> #include <isc/magic.h> #include <isc/result.h> /*** *** Types ***/ typedef isc_event_t isc_appevent_t; #define ISC_APPEVENT_FIRSTEVENT (ISC_EVENTCLASS_APP + 0) #define ISC_APPEVENT_SHUTDOWN (ISC_EVENTCLASS_APP + 1) #define ISC_APPEVENT_LASTEVENT (ISC_EVENTCLASS_APP + 65535) ISC_LANG_BEGINDECLS isc_result_t isc_app_ctxstart(isc_appctx_t *ctx); isc_result_t isc_app_start(void); /*!< * \brief Start an ISC library application. * * Notes: * This call should be made before any other ISC library call, and as * close to the beginning of the application as possible. * * Requires: *\li 'ctx' is a valid application context (for app_ctxstart()). */ isc_result_t isc_app_ctxonrun(isc_appctx_t *ctx, isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action, void *arg); isc_result_t isc_app_onrun(isc_mem_t *mctx, isc_task_t *task, isc_taskaction_t action, void *arg); /*!< * \brief Request delivery of an event when the application is run. * * Requires: *\li isc_app_start() has been called. *\li 'ctx' is a valid application context (for app_ctxonrun()). * * Returns: * ISC_R_SUCCESS * ISC_R_NOMEMORY */ isc_result_t isc_app_ctxrun(isc_appctx_t *ctx); isc_result_t isc_app_run(void); /*!< * \brief Run an ISC library application. * * Notes: *\li The caller (typically the initial thread of an application) will * block until shutdown is requested. When the call returns, the * caller should start shutting down the application. * * Requires: *\li isc_app_[ctx]start() has been called. * * Ensures: *\li Any events requested via isc_app_onrun() will have been posted (in * FIFO order) before isc_app_run() blocks. *\li 'ctx' is a valid application context (for app_ctxrun()). * * Returns: *\li ISC_R_SUCCESS Shutdown has been requested. *\li ISC_R_RELOAD Reload has been requested. */ bool isc_app_isrunning(void); /*!< * \brief Return if the ISC library application is running. * * Returns: *\li true App is running. *\li false App is not running. */ void isc_app_ctxshutdown(isc_appctx_t *ctx); void isc_app_shutdown(void); /*!< * \brief Request application shutdown. * * Notes: *\li It is safe to call isc_app_shutdown() multiple times. Shutdown will * only be triggered once. * * Requires: *\li isc_app_[ctx]run() has been called. *\li 'ctx' is a valid application context (for app_ctxshutdown()). * * Returns: *\li ISC_R_SUCCESS *\li ISC_R_UNEXPECTED */ void isc_app_ctxsuspend(isc_appctx_t *ctx); /*!< * \brief This has the same behavior as isc_app_ctxsuspend(). */ void isc_app_reload(void); /*!< * \brief Request application reload. * * Requires: *\li isc_app_run() has been called. * * Returns: *\li ISC_R_SUCCESS *\li ISC_R_UNEXPECTED */ void isc_app_ctxfinish(isc_appctx_t *ctx); void isc_app_finish(void); /*!< * \brief Finish an ISC library application. * * Notes: *\li This call should be made at or near the end of main(). * * Requires: *\li isc_app_start() has been called. *\li 'ctx' is a valid application context (for app_ctxfinish()). * * Ensures: *\li Any resources allocated by isc_app_start() have been released. */ void isc_app_block(void); /*!< * \brief Indicate that a blocking operation will be performed. * * Notes: *\li If a blocking operation is in process, a call to isc_app_shutdown() * or an external signal will abort the program, rather than allowing * clean shutdown. This is primarily useful for reading user input. * * Requires: * \li isc_app_start() has been called. * \li No other blocking operations are in progress. */ void isc_app_unblock(void); /*!< * \brief Indicate that a blocking operation is complete. * * Notes: * \li When a blocking operation has completed, return the program to a * state where a call to isc_app_shutdown() or an external signal will * shutdown normally. * * Requires: * \li isc_app_start() has been called. * \li isc_app_block() has been called by the same thread. */ isc_result_t isc_appctx_create(isc_mem_t *mctx, isc_appctx_t **ctxp); /*!< * \brief Create an application context. * * Requires: *\li 'mctx' is a valid memory context. *\li 'ctxp' != NULL && *ctxp == NULL. */ void isc_appctx_destroy(isc_appctx_t **ctxp); /*!< * \brief Destroy an application context. * * Requires: *\li '*ctxp' is a valid application context. * * Ensures: *\li *ctxp == NULL. */ ISC_LANG_ENDDECLS #endif /* ISC_APP_H */
Save
cmd:
run