Some small general interest definitions. More...
#include "ink_config.h"
#include <stddef.h>
#include <stdint.h>
#include <inttypes.h>
Go to the source code of this file.
Defines | |
#define | INT64_MAX (9223372036854775807LL) |
#define | INT64_MIN (-INT64_MAX -1LL) |
#define | INT32_MAX (2147483647) |
#define | INT32_MIN (-2147483647-1) |
#define | POSIX_THREAD |
#define | POSIX_THREAD_10031c |
#define | NUL '\0' |
#define | NULL_PTR static_cast<void*>(0) |
#define | countof(x) ((unsigned)(sizeof(x)/sizeof((x)[0]))) |
#define | SOCKOPT_ON ((char*)&on) |
#define | SOCKOPT_OFF ((char*)&off) |
#define | ABS(x) (((x) < 0) ? ( - (x)) : (x)) |
#define | MAX(x, y) (((x) >= (y)) ? (x) : (y)) |
#define | MIN(x, y) (((x) <= (y)) ? (x) : (y)) |
#define | ATS_UNUSED __attribute__ ((unused)) |
#define | ATS_WARN_IF_UNUSED __attribute__ ((warn_unused_result)) |
#define | ATS_UNUSED_RETURN(x) if (x) {} |
#define | likely(x) __builtin_expect (!!(x), 1) |
#define | unlikely(x) __builtin_expect (!!(x), 0) |
#define | ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) |
Typedefs | |
typedef void *(* | VPVP_PFN )(void *) |
typedef void(* | VVP_PFN )(void *) |
typedef void(* | VV_PFN )(void) |
typedef void(* | VI_PFN )(int) |
Functions | |
int | ink_sys_name_release (char *name, int namelen, char *release, int releaselen) |
int | ink_number_of_processors () |
Variables | |
int | debug_level |
int | off |
int | on |
Some small general interest definitions.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file ink_defs.h.
#define ABS | ( | x | ) | (((x) < 0) ? ( - (x)) : (x)) |
Definition at line 92 of file ink_defs.h.
#define ATS_UNUSED __attribute__ ((unused)) |
Definition at line 103 of file ink_defs.h.
Referenced by agg_copy(), and squid_timestamp_to_buf().
#define ATS_UNUSED_RETURN | ( | x | ) | if (x) {} |
Definition at line 105 of file ink_defs.h.
Referenced by adjust_sys_settings(), change_uid_gid(), net_signal_hook_callback(), net_signal_hook_function(), EventNotify::signal(), signal_handler(), and ts::msg::vlogf_errno().
#define ATS_WARN_IF_UNUSED __attribute__ ((warn_unused_result)) |
Definition at line 104 of file ink_defs.h.
#define countof | ( | x | ) | ((unsigned)(sizeof(x)/sizeof((x)[0]))) |
Definition at line 85 of file ink_defs.h.
Referenced by cmd_help(), cmd_index(), dns_process(), ProxyClientSession::get_user_arg(), Vol::init(), Ink_Inet(), main(), Http2ConnectionState::main_event_handler(), CommandLineArgs::parse_arguments(), persistent_stat(), process_args(), IOBufferBlock::realloc(), LogConfig::register_config_callbacks(), remap_load_plugin(), remap_parse_directive(), DNSHandler::retry_named(), ProxyClientSession::set_user_arg(), LogConfig::setup_log_objects(), SSLErrorName(), and DNSHandler::try_primary_named().
#define INT32_MAX (2147483647) |
Definition at line 46 of file ink_defs.h.
#define INT32_MIN (-2147483647-1) |
Definition at line 47 of file ink_defs.h.
#define INT64_MAX (9223372036854775807LL) |
Definition at line 44 of file ink_defs.h.
Referenced by HttpSM::attach_server_session(), HttpClientSession::attach_server_session(), TestProxy::cacheSendGetEvent(), TestProxy::clusterEvent(), TestProxy::clusterOpenEvent(), TestProxy::connectEvent(), IOBufferReader::consume(), HttpClientSession::do_io_close(), HttpSM::do_setup_post_tunnel(), HttpTransact::handle_content_length_header(), TransformControl::handle_event(), PrefetchTransform::handle_event(), HttpSM::handle_server_setup_error(), handle_transform(), KeepAliveConn::handleEvent(), CacheVC::handleWrite(), FetchSM::httpConnect(), OneWayMultiTunnel::init(), SocksProxy::mainEvent(), NetTesterSM::NetTesterSM(), ObjectReloadCont::ObjectReloadEvent(), HttpSM::parse_range_and_compare(), IOBufferReader::read_avail(), HttpClientSession::release(), ServerSessionPool::releaseSession(), HttpSM::setup_cache_read_transfer(), HttpSM::setup_client_read_request_header(), HttpSM::setup_push_read_response_header(), HttpSM::setup_server_read_response_header(), HttpSM::setup_transfer_from_transform(), HttpSM::setup_transfer_from_transform_to_cache_only(), Http2ClientSession::start(), TestAccept::startEvent(), HttpSM::state_request_wait_for_transform_read(), HttpSM::state_response_wait_for_transform_read(), synclient_txn_write_request_handler(), synserver_accept_handler(), HttpSM::tunnel_handler_cache_read(), HttpSM::tunnel_handler_post_server(), and HttpSM::tunnel_handler_post_ua().
#define INT64_MIN (-INT64_MAX -1LL) |
Definition at line 45 of file ink_defs.h.
#define likely | ( | x | ) | __builtin_expect (!!(x), 1) |
Definition at line 108 of file ink_defs.h.
#define MAX | ( | x, | ||
y | ||||
) | (((x) >= (y)) ? (x) : (y)) |
Definition at line 96 of file ink_defs.h.
Referenced by MultiCacheSync::mcEvent(), UDPQueue::service(), and MultiCacheHeapGC::startEvent().
#define MIN | ( | x, | ||
y | ||||
) | (((x) <= (y)) ? (x) : (y)) |
Definition at line 100 of file ink_defs.h.
Referenced by ChunkedHandler::generate_chunked_content(), synclient_txn_write_request(), synserver_txn_write_response(), and NetVCTest::write_handler().
#define NUL '\0' |
Definition at line 70 of file ink_defs.h.
Referenced by HttpTransactCache::CalcVariability(), does_language_range_match(), is_asterisk(), is_empty(), and HttpCompat::parse_tok_list().
#define NULL_PTR static_cast<void*>(0) |
Definition at line 75 of file ink_defs.h.
Referenced by RegressionSM().
#define POSIX_THREAD |
Definition at line 50 of file ink_defs.h.
#define POSIX_THREAD_10031c |
Definition at line 51 of file ink_defs.h.
#define ROUNDUP | ( | x, | ||
y | ||||
) | ((((x)+((y)-1))/(y))*(y)) |
Definition at line 120 of file ink_defs.h.
#define SOCKOPT_OFF ((char*)&off) |
Definition at line 89 of file ink_defs.h.
#define SOCKOPT_ON ((char*)&on) |
Definition at line 88 of file ink_defs.h.
Referenced by Server::accept(), NetAccept::acceptFastEvent(), Connection::apply_options(), LogSock::connect(), DNSConnection::connect(), LogSock::listen(), and Server::setup_fd_for_listen().
#define unlikely | ( | x | ) | __builtin_expect (!!(x), 0) |
Definition at line 111 of file ink_defs.h.
typedef void(* VI_PFN)(int) |
Definition at line 128 of file ink_defs.h.
typedef void*(* VPVP_PFN)(void *) |
Definition at line 125 of file ink_defs.h.
typedef void(* VV_PFN)(void) |
Definition at line 127 of file ink_defs.h.
typedef void(* VVP_PFN)(void *) |
Definition at line 126 of file ink_defs.h.
int ink_number_of_processors | ( | ) |
Definition at line 119 of file ink_defs.cc.
Referenced by getNumSSLThreads(), main(), EventProcessor::start(), and ClusterHandler::startClusterEvent().
int ink_sys_name_release | ( | char * | name, | |
int | namelen, | |||
char * | release, | |||
int | releaselen | |||
) |
Definition at line 72 of file ink_defs.cc.
References memcpy.
int debug_level |
int off |
Definition at line 42 of file ink_defs.cc.
int on |
Definition at line 43 of file ink_defs.cc.