本文整理汇总了C++中APR_STATUS_IS_TIMEUP函数的典型用法代码示例。如果您正苦于以下问题:C++ APR_STATUS_IS_TIMEUP函数的具体用法?C++ APR_STATUS_IS_TIMEUP怎么用?C++ APR_STATUS_IS_TIMEUP使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了APR_STATUS_IS_TIMEUP函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: serf_context_run
apr_status_t serf_context_run(
serf_context_t *ctx,
apr_short_interval_time_t duration,
apr_pool_t *pool)
{
apr_status_t status;
apr_int32_t num;
const apr_pollfd_t *desc;
serf_pollset_t *ps = (serf_pollset_t*)ctx->pollset_baton;
if ((status = serf_context_prerun(ctx)) != APR_SUCCESS) {
return status;
}
if ((status = apr_pollset_poll(ps->pollset, duration, &num,
&desc)) != APR_SUCCESS) {
/* EINTR indicates a handled signal happened during the poll call,
ignore, the application can safely retry. */
if (APR_STATUS_IS_EINTR(status))
return APR_SUCCESS;
/* ### do we still need to dispatch stuff here?
### look at the potential return codes. map to our defined
### return values? ...
*/
/* Use the strict documented error for poll timeouts, to allow proper
handling of the other timeout types when returned from
serf_event_trigger */
if (APR_STATUS_IS_TIMEUP(status))
return APR_TIMEUP; /* Return the documented error */
return status;
}
while (num--) {
serf_io_baton_t *io = desc->client_data;
status = serf_event_trigger(ctx, io, desc);
if (status) {
/* Don't return APR_TIMEUP as a connection error, as our caller
will use that as a trigger to call us again */
if (APR_STATUS_IS_TIMEUP(status))
status = SERF_ERROR_CONNECTION_TIMEDOUT;
return status;
}
desc++;
}
return APR_SUCCESS;
}
开发者ID:KyleSanderson,项目名称:serf,代码行数:51,代码来源:context.c
示例2: multi_event_pollset
static void multi_event_pollset(abts_case *tc, void *data)
{
apr_status_t rv;
apr_pollfd_t socket_pollfd;
int lrv;
const apr_pollfd_t *descs = NULL;
ABTS_PTR_NOTNULL(tc, s[0]);
socket_pollfd.desc_type = APR_POLL_SOCKET;
socket_pollfd.reqevents = APR_POLLIN | APR_POLLOUT;
socket_pollfd.desc.s = s[0];
socket_pollfd.client_data = s[0];
rv = apr_pollset_add(pollset, &socket_pollfd);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
send_msg(s, sa, 0, tc);
rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
ABTS_INT_EQUAL(tc, 0, APR_STATUS_IS_TIMEUP(rv));
if (lrv == 1) {
ABTS_PTR_EQUAL(tc, s[0], descs[0].desc.s);
ABTS_INT_EQUAL(tc, APR_POLLIN | APR_POLLOUT, descs[0].rtnevents);
ABTS_PTR_EQUAL(tc, s[0], descs[0].client_data);
}
else if (lrv == 2) {
ABTS_PTR_EQUAL(tc, s[0], descs[0].desc.s);
ABTS_PTR_EQUAL(tc, s[0], descs[0].client_data);
ABTS_PTR_EQUAL(tc, s[0], descs[1].desc.s);
ABTS_PTR_EQUAL(tc, s[0], descs[1].client_data);
ABTS_ASSERT(tc, "returned events incorrect",
((descs[0].rtnevents | descs[1].rtnevents)
== (APR_POLLIN | APR_POLLOUT))
&& descs[0].rtnevents != descs[1].rtnevents);
}
else {
ABTS_ASSERT(tc, "either one or two events returned",
lrv == 1 || lrv == 2);
}
recv_msg(s, 0, p, tc);
rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
ABTS_INT_EQUAL(tc, 0, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 1, lrv);
ABTS_PTR_EQUAL(tc, s[0], descs[0].desc.s);
ABTS_INT_EQUAL(tc, APR_POLLOUT, descs[0].rtnevents);
ABTS_PTR_EQUAL(tc, s[0], descs[0].client_data);
rv = apr_pollset_remove(pollset, &socket_pollfd);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
}
开发者ID:KunZheng,项目名称:mosbench,代码行数:51,代码来源:testpoll.c
示例3: timeout_pollin_pollcb
static void timeout_pollin_pollcb(abts_case *tc, void *data)
{
apr_status_t rv;
pollcb_baton_t pcb;
apr_pollfd_t socket_pollfd;
POLLCB_PREREQ;
recv_msg(s, 0, p, tc);
ABTS_PTR_NOTNULL(tc, s[0]);
socket_pollfd.desc_type = APR_POLL_SOCKET;
socket_pollfd.reqevents = APR_POLLIN;
socket_pollfd.desc.s = s[0];
socket_pollfd.client_data = s[0];
rv = apr_pollcb_add(pollcb, &socket_pollfd);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
pcb.count = 0;
pcb.tc = tc;
rv = apr_pollcb_poll(pollcb, 1, trigger_pollcb_cb, &pcb);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 0, pcb.count);
rv = apr_pollcb_remove(pollcb, &socket_pollfd);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
}
开发者ID:Ga-vin,项目名称:apache,代码行数:28,代码来源:testpoll.c
示例4: procmgr_fetch_cmd
apr_status_t procmgr_fetch_cmd(fcgid_command * command,
server_rec * main_server)
{
apr_status_t rv;
/* Sanity check */
if (!g_pm_read_pipe)
return APR_EPIPE;
/* Wait for next command */
#if APR_MAJOR_VERSION < 2
rv = apr_wait_for_io_or_timeout(g_pm_read_pipe, NULL, FOR_READ);
#else
rv = apr_file_pipe_wait(g_pm_read_pipe, APR_WAIT_READ);
#endif
/* Log any unexpect result */
if (rv != APR_SUCCESS && !APR_STATUS_IS_TIMEUP(rv)) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rv, main_server,
"mod_fcgid: error while waiting for message from pipe");
return rv;
}
/* Timeout */
if (rv != APR_SUCCESS)
return rv;
return apr_file_read_full(g_pm_read_pipe, command, sizeof(*command),
NULL);
}
开发者ID:famzah,项目名称:mod_fcgid,代码行数:30,代码来源:fcgid_pm_unix.c
示例5: test_timeout
static void test_timeout(abts_case *tc, apr_reslist_t *rl)
{
apr_status_t rv;
my_resource_t *resources[RESLIST_HMAX];
my_resource_t *res;
void *vp;
int i;
apr_reslist_timeout_set(rl, 1000);
/* deplete all possible resources from the resource list
* so that the next call will block until timeout is reached
* (since there are no other threads to make a resource
* available)
*/
for (i = 0; i < RESLIST_HMAX; i++) {
rv = apr_reslist_acquire(rl, (void**)&resources[i]);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
}
/* next call will block until timeout is reached */
rv = apr_reslist_acquire(rl, &vp);
ABTS_TRUE(tc, APR_STATUS_IS_TIMEUP(rv));
res = vp;
/* release the resources; otherwise the destroy operation
* will blow
*/
for (i = 0; i < RESLIST_HMAX; i++) {
rv = apr_reslist_release(rl, resources[i]);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
}
}
开发者ID:QsBBQ,项目名称:masspinger,代码行数:35,代码来源:testreslist.c
示例6: read_pipe
// Called by parent process.
static std::string read_pipe(apr_file_t* in, bool timeout_ok = false)
{
char buf[256];
unsigned char bytes_to_read;
apr_size_t bytes_read;
apr_status_t status = apr_file_read_full(in, &bytes_to_read, 1, &bytes_read);
if (status != APR_SUCCESS)
{
if (APR_STATUS_IS_TIMEUP(status) && timeout_ok)
{
return "TIMEOUT";
}
llwarns << "apr_file_read_full: " << apr_strerror(status, buf, sizeof(buf)) << llendl;
assert(APR_STATUS_IS_EOF(status));
return "END OF FILE";
}
assert(bytes_read == 1);
status = apr_file_read_full(in, buf, bytes_to_read, &bytes_read);
if (status != APR_SUCCESS)
{
llwarns << "apr_file_read_full: " << apr_strerror(status, buf, sizeof(buf)) << llendl;
assert(status == APR_SUCCESS); // Fail
}
assert(bytes_read == bytes_to_read);
std::string received(buf, bytes_read);
llinfos << "Received: \"" << received << "\" (bytes read: " << bytes_read << ")" << llendl;
return received;
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:30,代码来源:llprocesslauncher.cpp
示例7: bif_poll_ports1
term_t bif_poll_ports1(term_t Time, process_t *ctx)
{
//apr_time_t t1, t2;
apr_status_t rs;
apr_interval_time_t micros;
if (!is_int(Time))
return A_BADARG;
micros = int_value(Time);
//if (micros != 0)
// printf("ports_poll for %ld\n", micros);
// XXX
//t1 = apr_time_now();
rs = ports_poll(micros);
//t2 = apr_time_now();
//if (t2 - t1 < micros)
// printf("ports_poll slept for less then requested: %ld instead of %ld\n",
// t2 - t1, micros);
if (rs && !APR_STATUS_IS_TIMEUP(rs))
return decipher_status(rs);
result(A_TRUE);
return AI_OK;
}
开发者ID:aidanhs,项目名称:teeterl,代码行数:30,代码来源:bif_code.c
示例8: dynamic_binding
static void dynamic_binding(abts_case *tc, void *data)
{
unsigned int i;
apr_status_t rv;
toolbox_t box[NTHREADS];
apr_thread_t *thread[NTHREADS];
apr_thread_mutex_t *mutex[NTHREADS];
apr_thread_cond_t *cond = NULL;
rv = apr_thread_cond_create(&cond, p);
ABTS_SUCCESS(rv);
ABTS_PTR_NOTNULL(tc, cond);
for (i = 0; i < NTHREADS; i++) {
rv = apr_thread_mutex_create(&mutex[i], APR_THREAD_MUTEX_DEFAULT, p);
ABTS_SUCCESS(rv);
rv = apr_thread_mutex_lock(mutex[i]);
ABTS_SUCCESS(rv);
box[i].tc = tc;
box[i].cond = cond;
box[i].mutex = mutex[i];
box[i].func = lock_and_signal;
rv = apr_thread_create(&thread[i], NULL, thread_routine, &box[i], p);
ABTS_SUCCESS(rv);
}
/*
* The dynamic binding should be preserved because we use only one waiter
*/
for (i = 0; i < NTHREADS; i++) {
rv = apr_thread_cond_wait(cond, mutex[i]);
ABTS_SUCCESS(rv);
}
for (i = 0; i < NTHREADS; i++) {
rv = apr_thread_cond_timedwait(cond, mutex[i], 10000);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
rv = apr_thread_mutex_unlock(mutex[i]);
ABTS_SUCCESS(rv);
}
for (i = 0; i < NTHREADS; i++) {
apr_status_t retval;
rv = apr_thread_join(&retval, thread[i]);
ABTS_SUCCESS(rv);
}
rv = apr_thread_cond_destroy(cond);
ABTS_SUCCESS(rv);
for (i = 0; i < NTHREADS; i++) {
rv = apr_thread_mutex_destroy(mutex[i]);
ABTS_SUCCESS(rv);
}
}
开发者ID:ohmann,项目名称:checkapi,代码行数:60,代码来源:testcond.c
示例9: main
int main(int argc, char *argv[])
{
apr_pool_t *p;
apr_socket_t *sock;
apr_status_t rv;
apr_sockaddr_t *remote_sa;
apr_initialize();
atexit(apr_terminate);
apr_pool_create(&p, NULL);
if (argc < 2) {
exit(-1);
}
rv = apr_sockaddr_info_get(&remote_sa, "127.0.0.1", APR_UNSPEC, 8021, 0, p);
if (rv != APR_SUCCESS) {
exit(-1);
}
if (apr_socket_create(&sock, remote_sa->family, SOCK_STREAM, 0,
p) != APR_SUCCESS) {
exit(-1);
}
rv = apr_socket_timeout_set(sock, apr_time_from_sec(3));
if (rv) {
exit(-1);
}
apr_socket_connect(sock, remote_sa);
if (!strcmp("read", argv[1])) {
char datarecv[STRLEN];
apr_size_t length = STRLEN;
apr_status_t rv;
memset(datarecv, 0, STRLEN);
rv = apr_socket_recv(sock, datarecv, &length);
apr_socket_close(sock);
if (APR_STATUS_IS_TIMEUP(rv)) {
exit(SOCKET_TIMEOUT);
}
if (strcmp(datarecv, DATASTR)) {
exit(-1);
}
exit((int)length);
}
else if (!strcmp("write", argv[1])) {
apr_size_t length = strlen(DATASTR);
apr_socket_send(sock, DATASTR, &length);
apr_socket_close(sock);
exit((int)length);
}
exit(-1);
}
开发者ID:Bernd8,项目名称:quantlib,代码行数:59,代码来源:sockchild.c
示例10: lost_signal
static void lost_signal(abts_case *tc, void *data)
{
apr_status_t rv;
apr_thread_cond_t *cond = NULL;
apr_thread_mutex_t *mutex = NULL;
rv = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, p);
ABTS_SUCCESS(rv);
ABTS_PTR_NOTNULL(tc, mutex);
rv = apr_thread_cond_create(&cond, p);
ABTS_SUCCESS(rv);
ABTS_PTR_NOTNULL(tc, cond);
rv = apr_thread_cond_signal(cond);
ABTS_SUCCESS(rv);
rv = apr_thread_mutex_lock(mutex);
ABTS_SUCCESS(rv);
rv = apr_thread_cond_timedwait(cond, mutex, 10000);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
rv = apr_thread_mutex_unlock(mutex);
ABTS_SUCCESS(rv);
rv = apr_thread_cond_broadcast(cond);
ABTS_SUCCESS(rv);
rv = apr_thread_mutex_lock(mutex);
ABTS_SUCCESS(rv);
rv = apr_thread_cond_timedwait(cond, mutex, 10000);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
rv = apr_thread_mutex_unlock(mutex);
ABTS_SUCCESS(rv);
rv = apr_thread_cond_destroy(cond);
ABTS_SUCCESS(rv);
rv = apr_thread_mutex_destroy(mutex);
ABTS_SUCCESS(rv);
}
开发者ID:ohmann,项目名称:checkapi,代码行数:44,代码来源:testcond.c
示例11: test_helper_run_requests_no_check
/* Helper function, runs the client and server context loops and validates
that no errors were encountered, and all messages were sent and received. */
apr_status_t
test_helper_run_requests_no_check(CuTest *tc, test_baton_t *tb,
int num_requests,
handler_baton_t handler_ctx[],
apr_pool_t *pool)
{
apr_pool_t *iter_pool;
int i, done = 0;
apr_status_t status;
apr_pool_create(&iter_pool, pool);
while (!done)
{
apr_pool_clear(iter_pool);
/* run server event loop */
status = run_test_server(tb->serv_ctx, 0, iter_pool);
if (!APR_STATUS_IS_TIMEUP(status) &&
SERF_BUCKET_READ_ERROR(status))
return status;
/* run proxy event loop */
if (tb->proxy_ctx) {
status = run_test_server(tb->proxy_ctx, 0, iter_pool);
if (!APR_STATUS_IS_TIMEUP(status) &&
SERF_BUCKET_READ_ERROR(status))
return status;
}
/* run client event loop */
status = serf_context_run(tb->context, 0, iter_pool);
if (!APR_STATUS_IS_TIMEUP(status) &&
SERF_BUCKET_READ_ERROR(status))
return status;
done = 1;
for (i = 0; i < num_requests; i++)
done &= handler_ctx[i].done;
}
apr_pool_destroy(iter_pool);
return APR_SUCCESS;
}
开发者ID:gunjanms,项目名称:svnmigration,代码行数:46,代码来源:test_util.c
示例12: cgi_bucket_read
/* Read method of CGI bucket: polls on stderr and stdout of the child,
* sending any stderr output immediately away to the error log. */
static apr_status_t cgi_bucket_read(apr_bucket *b, const char **str,
apr_size_t *len, apr_read_type_e block)
{
struct cgi_bucket_data *data = b->data;
apr_interval_time_t timeout;
apr_status_t rv;
int gotdata = 0;
timeout = block == APR_NONBLOCK_READ ? 0 : data->r->server->timeout;
do {
const apr_pollfd_t *results;
apr_int32_t num;
rv = apr_pollset_poll(data->pollset, timeout, &num, &results);
if (APR_STATUS_IS_TIMEUP(rv)) {
if (timeout) {
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, data->r,
"Timeout waiting for output from CGI script %s",
data->r->filename);
return rv;
}
else {
return APR_EAGAIN;
}
}
else if (APR_STATUS_IS_EINTR(rv)) {
continue;
}
else if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, data->r,
"poll failed waiting for CGI child");
return rv;
}
for (; num; num--, results++) {
if (results[0].client_data == (void *)1) {
/* stdout */
rv = cgi_read_stdout(b, results[0].desc.f, str, len);
if (APR_STATUS_IS_EOF(rv)) {
rv = APR_SUCCESS;
}
gotdata = 1;
} else {
/* stderr */
apr_status_t rv2 = log_script_err(data->r, results[0].desc.f);
if (APR_STATUS_IS_EOF(rv2)) {
apr_pollset_remove(data->pollset, &results[0]);
}
}
}
} while (!gotdata);
return rv;
}
开发者ID:daisukeokaoss,项目名称:ExpandProjectIntoOneFile,代码行数:58,代码来源:mod_cgi.c
示例13: nomessage_pollset
static void nomessage_pollset(CuTest *tc)
{
apr_status_t rv;
int lrv;
const apr_pollfd_t *descs = NULL;
rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
CuAssertIntEquals(tc, 1, APR_STATUS_IS_TIMEUP(rv));
CuAssertIntEquals(tc, 0, lrv);
CuAssertPtrEquals(tc, NULL, descs);
}
开发者ID:kheradmand,项目名称:Break,代码行数:11,代码来源:testpoll.c
示例14: nomessage
static void nomessage(CuTest *tc)
{
apr_status_t rv;
int srv = SMALL_NUM_SOCKETS;
rv = apr_poll(pollarray, SMALL_NUM_SOCKETS, &srv, 2 * APR_USEC_PER_SEC);
CuAssertIntEquals(tc, 1, APR_STATUS_IS_TIMEUP(rv));
check_sockets(pollarray, s, 0, 0, tc);
check_sockets(pollarray, s, 1, 0, tc);
check_sockets(pollarray, s, 2, 0, tc);
}
开发者ID:kheradmand,项目名称:Break,代码行数:11,代码来源:testpoll.c
示例15: APR_DECLARE
APR_DECLARE(apr_status_t) apr_socket_atreadeof(apr_socket_t *sock, int *atreadeof)
{
apr_pollfd_t pfds[1];
apr_status_t rv;
apr_int32_t nfds;
/* The purpose here is to return APR_SUCCESS only in cases in
* which it can be unambiguously determined whether or not the
* socket will return EOF on next read. In case of an unexpected
* error, return that. */
pfds[0].reqevents = APR_POLLIN;
pfds[0].desc_type = APR_POLL_SOCKET;
pfds[0].desc.s = sock;
do {
rv = apr_poll(&pfds[0], 1, &nfds, 0);
} while (APR_STATUS_IS_EINTR(rv));
if (APR_STATUS_IS_TIMEUP(rv)) {
/* Read buffer empty -> subsequent reads would block, so,
* definitely not at EOF. */
*atreadeof = 0;
return APR_SUCCESS;
}
else if (rv) {
/* Some other error -> unexpected error. */
return rv;
}
else if (nfds == 1 && pfds[0].rtnevents == APR_POLLIN) {
apr_sockaddr_t unused;
apr_size_t len = 1;
char buf;
/* The socket is readable - peek to see whether it returns EOF
* without consuming bytes from the socket buffer. */
rv = apr_socket_recvfrom(&unused, sock, MSG_PEEK, &buf, &len);
if (rv == APR_EOF) {
*atreadeof = 1;
return APR_SUCCESS;
}
else if (rv) {
/* Read error -> unexpected error. */
return rv;
}
else {
*atreadeof = 0;
return APR_SUCCESS;
}
}
/* Should not fall through here. */
return APR_EGENERAL;
}
开发者ID:321543223,项目名称:kbengine,代码行数:54,代码来源:socket_util.c
示例16: nomessage
static void nomessage(abts_case *tc, void *data)
{
apr_status_t rv;
int srv = SMALL_NUM_SOCKETS;
rv = apr_poll(pollarray, SMALL_NUM_SOCKETS, &srv, 2 * APR_USEC_PER_SEC);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
check_sockets(pollarray, s, 0, 0, tc);
check_sockets(pollarray, s, 1, 0, tc);
check_sockets(pollarray, s, 2, 0, tc);
}
开发者ID:Ga-vin,项目名称:apache,代码行数:11,代码来源:testpoll.c
示例17: nomessage_pollset
static void nomessage_pollset(abts_case *tc, void *data)
{
apr_status_t rv;
int lrv;
const apr_pollfd_t *descs = NULL;
rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 0, lrv);
ABTS_PTR_EQUAL(tc, NULL, descs);
}
开发者ID:Ga-vin,项目名称:apache,代码行数:11,代码来源:testpoll.c
示例18: clear_last_pollset
static void clear_last_pollset(abts_case *tc, void *data)
{
apr_status_t rv;
int lrv;
const apr_pollfd_t *descs = NULL;
recv_msg(s, LARGE_NUM_SOCKETS - 1, p, tc);
rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 0, lrv);
ABTS_PTR_EQUAL(tc, NULL, descs);
}
开发者ID:Ga-vin,项目名称:apache,代码行数:13,代码来源:testpoll.c
示例19: clear_last_pollset
static void clear_last_pollset(CuTest *tc)
{
apr_status_t rv;
int lrv;
const apr_pollfd_t *descs = NULL;
recv_msg(s, LARGE_NUM_SOCKETS - 1, p, tc);
rv = apr_pollset_poll(pollset, 0, &lrv, &descs);
CuAssertIntEquals(tc, 1, APR_STATUS_IS_TIMEUP(rv));
CuAssertIntEquals(tc, 0, lrv);
CuAssertPtrEquals(tc, NULL, descs);
}
开发者ID:kheradmand,项目名称:Break,代码行数:13,代码来源:testpoll.c
示例20: timeout_pollcb
static void timeout_pollcb(abts_case *tc, void *data)
{
apr_status_t rv;
pollcb_baton_t pcb;
POLLCB_PREREQ;
pcb.count = 0;
pcb.tc = tc;
rv = apr_pollcb_poll(pollcb, 1, trigger_pollcb_cb, &pcb);
ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv));
ABTS_INT_EQUAL(tc, 0, pcb.count);
}
开发者ID:Ga-vin,项目名称:apache,代码行数:14,代码来源:testpoll.c
注:本文中的APR_STATUS_IS_TIMEUP函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论