Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
util.h File Reference
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <limits.h>
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  secp256k1_callback
 

Macros

#define TEST_FAILURE(msg)
 
#define EXPECT(x, c)
 
#define CHECK(cond)
 
#define VERIFY_CHECK(cond)
 
#define VERIFY_SETUP(stmt)
 
#define VG_UNDEF(x, y)
 
#define VG_CHECK(x, y)
 
#define VG_CHECK_VERIFY(x, y)
 
#define ALIGNMENT   16
 
#define ROUND_TO_ALIGN(size)
 
#define SECP256K1_RESTRICT
 
#define I64FORMAT   "lld"
 
#define I64uFORMAT   "llu"
 
#define SECP256K1_GNUC_EXT
 
#define SECP256K1_WIDEMUL_INT64   1
 
#define __has_builtin(x)
 

Macro Definition Documentation

◆ __has_builtin

#define __has_builtin ( x)
Value:
0

Definition at line 252 of file util.h.

◆ ALIGNMENT

#define ALIGNMENT   16

Definition at line 140 of file util.h.

◆ CHECK

#define CHECK ( cond)
Value:
do { \
if (EXPECT(!(cond), 0)) { \
TEST_FAILURE("test condition failed: " #cond); \
} \
} while(0)
#define EXPECT(x, c)
Definition util.h:70

Definition at line 80 of file util.h.

80#define CHECK(cond) do { \
81 if (EXPECT(!(cond), 0)) { \
82 TEST_FAILURE("test condition failed: " #cond); \
83 } \
84} while(0)

◆ EXPECT

#define EXPECT ( x,
c )
Value:
(x)

Definition at line 70 of file util.h.

◆ I64FORMAT

#define I64FORMAT   "lld"

Definition at line 166 of file util.h.

◆ I64uFORMAT

#define I64uFORMAT   "llu"

Definition at line 167 of file util.h.

◆ ROUND_TO_ALIGN

#define ROUND_TO_ALIGN ( size)
Value:
((((size) + ALIGNMENT - 1) / ALIGNMENT) * ALIGNMENT)
#define ALIGNMENT
Definition util.h:140

Definition at line 143 of file util.h.

◆ SECP256K1_GNUC_EXT

#define SECP256K1_GNUC_EXT

Definition at line 173 of file util.h.

◆ SECP256K1_RESTRICT

#define SECP256K1_RESTRICT

Definition at line 155 of file util.h.

◆ SECP256K1_WIDEMUL_INT64

#define SECP256K1_WIDEMUL_INT64   1

Definition at line 238 of file util.h.

◆ TEST_FAILURE

#define TEST_FAILURE ( msg)
Value:
do { \
fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, msg); \
abort(); \
} while(0)

Definition at line 61 of file util.h.

61#define TEST_FAILURE(msg) do { \
62 fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, msg); \
63 abort(); \
64} while(0)

◆ VERIFY_CHECK

#define VERIFY_CHECK ( cond)
Value:
do { (void)(cond); } while(0)

Definition at line 95 of file util.h.

◆ VERIFY_SETUP

#define VERIFY_SETUP ( stmt)

Definition at line 96 of file util.h.

◆ VG_CHECK

#define VG_CHECK ( x,
y )

Definition at line 107 of file util.h.

◆ VG_CHECK_VERIFY

#define VG_CHECK_VERIFY ( x,
y )

Definition at line 115 of file util.h.

◆ VG_UNDEF

#define VG_UNDEF ( x,
y )

Definition at line 106 of file util.h.