assertions.h File Reference

#include <isc/lang.h>
#include <isc/platform.h>

Go to the source code of this file.

Defines

#define ISC_ASSERTIONS_H   1
#define ISC_CHECK_REQUIRE   1
#define ISC_CHECK_ENSURE   1
#define ISC_CHECK_INSIST   1
#define ISC_CHECK_INVARIANT   1
#define ISC_REQUIRE(cond)
#define ISC_ENSURE(cond)
#define ISC_INSIST(cond)
#define ISC_INVARIANT(cond)

Typedefs

typedef void(* isc_assertioncallback_t )(const char *, int, isc_assertiontype_t, const char *)

Enumerations

enum  isc_assertiontype_t { isc_assertiontype_require, isc_assertiontype_ensure, isc_assertiontype_insist, isc_assertiontype_invariant }
 isc assertion type More...

Functions

ISC_PLATFORM_NORETURN_PRE void isc_assertion_failed (const char *, int, isc_assertiontype_t, const char *) ISC_PLATFORM_NORETURN_POST
 Public.
void isc_assertion_setcallback (isc_assertioncallback_t)
 Set callback.
const char * isc_assertion_typetotext (isc_assertiontype_t type)
 Type to Text.


Detailed Description

Definition in file assertions.h.


Define Documentation

#define ISC_ASSERTIONS_H   1

Definition at line 25 of file assertions.h.

#define ISC_CHECK_REQUIRE   1

Definition at line 69 of file assertions.h.

#define ISC_CHECK_ENSURE   1

Definition at line 73 of file assertions.h.

#define ISC_CHECK_INSIST   1

Definition at line 77 of file assertions.h.

#define ISC_CHECK_INVARIANT   1

Definition at line 81 of file assertions.h.

#define ISC_REQUIRE ( cond   ) 

Value:

((void) ((cond) || \
                 ((isc_assertion_failed)(__FILE__, __LINE__, \
                                         isc_assertiontype_require, \
                                         #cond), 0)))

Definition at line 85 of file assertions.h.

#define ISC_ENSURE ( cond   ) 

Value:

((void) ((cond) || \
                 ((isc_assertion_failed)(__FILE__, __LINE__, \
                                         isc_assertiontype_ensure, \
                                         #cond), 0)))

Definition at line 94 of file assertions.h.

#define ISC_INSIST ( cond   ) 

Value:

((void) ((cond) || \
                 ((isc_assertion_failed)(__FILE__, __LINE__, \
                                         isc_assertiontype_insist, \
                                         #cond), 0)))

Definition at line 103 of file assertions.h.

#define ISC_INVARIANT ( cond   ) 

Value:

((void) ((cond) || \
                 ((isc_assertion_failed)(__FILE__, __LINE__, \
                                         isc_assertiontype_invariant, \
                                         #cond), 0)))

Definition at line 112 of file assertions.h.


Typedef Documentation

typedef void(* isc_assertioncallback_t)(const char *, int, isc_assertiontype_t, const char *)

Definition at line 40 of file assertions.h.


Enumeration Type Documentation

enum isc_assertiontype_t

isc assertion type

Enumerator:
isc_assertiontype_require 
isc_assertiontype_ensure 
isc_assertiontype_insist 
isc_assertiontype_invariant 

Definition at line 33 of file assertions.h.


Function Documentation

ISC_PLATFORM_NORETURN_PRE void isc_assertion_failed ( const char *  file,
int  line,
isc_assertiontype_t  type,
const char *  cond 
)

Public.

assertion failed handler

Definition at line 54 of file assertions.c.

References isc_assertion_failed_cb.

void isc_assertion_setcallback ( isc_assertioncallback_t   ) 

Set callback.

Definition at line 64 of file assertions.c.

References default_callback(), and isc_assertion_failed_cb.

Referenced by addrdataset(), allrdatasets(), assertion_failed(), attachversion(), closeversion(), deleterdataset(), dump(), find(), findrdataset(), getnsec3parameters(), main(), resigned(), and subtract().

const char* isc_assertion_typetotext ( isc_assertiontype_t  type  ) 

Type to Text.

Definition at line 73 of file assertions.c.

References isc_assertiontype_ensure, isc_assertiontype_insist, isc_assertiontype_invariant, and isc_assertiontype_require.

Referenced by assertion_failed(), and default_callback().


Generated on Tue Apr 28 17:41:14 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha