示例#1
0
文件: request.c 项目: sagar0/pelikan
void
request_return(struct request **request)
{
    struct request *req = *request;

    if (req == NULL) {
        return;
    }

    INCR(request_metrics, request_free);
    INCR(request_metrics, request_return);
    log_vverb("return req %p", req);

    req->free = true;
    FREEPOOL_RETURN(req, &reqp, next);

    *request = NULL;
}
示例#2
0
文件: response.c 项目: huayl/pelikan
/*
 * Return a single response object
 */
void
response_return(struct response **response)
{
    ASSERT(response != NULL);

    struct response *rsp = *response;

    if (rsp == NULL) {
        return;
    }

    INCR(response_metrics, response_free);
    INCR(response_metrics, response_return);
    log_vverb("return rsp %p", rsp);

    rsp->free = true;
    FREEPOOL_RETURN(rsp, &rspp, next);

    *response = NULL;
}