Defines | Typedefs | Functions | Variables

ink_defs.h File Reference

Some small general interest definitions. More...

#include "ink_config.h"
#include <stddef.h>
#include <stdint.h>
#include <inttypes.h>
Include dependency graph for ink_defs.h:
This graph shows which files directly or indirectly include this file:

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

Detailed Description

Some small general interest definitions.

License

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 Documentation

#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) {}
#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])))
#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)
#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))
#define MIN (   x,
  y 
)    (((x) <= (y)) ? (x) : (y))
#define NUL   '\0'
#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)
#define unlikely (   x  )     __builtin_expect (!!(x), 0)

Definition at line 111 of file ink_defs.h.


Typedef Documentation

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.


Function Documentation

int ink_number_of_processors (  ) 
int ink_sys_name_release ( char *  name,
int  namelen,
char *  release,
int  releaselen 
)

Definition at line 72 of file ink_defs.cc.

References memcpy.


Variable Documentation

int off

Definition at line 42 of file ink_defs.cc.

int on

Definition at line 43 of file ink_defs.cc.