Sha256: 10e0d69498d6a4446012129031c1f7fa6d9a2f95c030c15a73aa169f186b6fa7

Contents?: true

Size: 1.04 KB

Versions: 12

Compression:

Stored size: 1.04 KB

Contents

#pragma once

#include <stdint.h>

// Used to mark symbols to be exported to the outside of the extension.
// Consider very carefully before tagging a function with this.
#define DDTRACE_EXPORT __attribute__ ((visibility ("default")))

// Used to mark function arguments that are deliberately left unused
#ifdef __GNUC__
  #define DDTRACE_UNUSED  __attribute__((unused))
#else
  #define DDTRACE_UNUSED
#endif

// @ivoanjo: After trying to read through https://stackoverflow.com/questions/3437404/min-and-max-in-c I decided I
// don't like C and I just implemented this as a function.
inline static uint64_t uint64_max_of(uint64_t a, uint64_t b) { return a > b ? a : b; }
inline static uint64_t uint64_min_of(uint64_t a, uint64_t b) { return a > b ? b : a; }
inline static long long_max_of(long a, long b) { return a > b ? a : b; }
inline static long long_min_of(long a, long b) { return a > b ? b : a; }
inline static double double_max_of(double a, double b) { return a > b ? a : b; }
inline static double double_min_of(double a, double b) { return a > b ? b : a; }

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
datadog-2.2.0 ext/datadog_profiling_native_extension/helpers.h
ddtrace-1.23.3 ext/datadog_profiling_native_extension/helpers.h
ddtrace-1.23.2 ext/datadog_profiling_native_extension/helpers.h
datadog-2.1.0 ext/datadog_profiling_native_extension/helpers.h
datadog-2.0.0 ext/datadog_profiling_native_extension/helpers.h
ddtrace-1.23.1 ext/datadog_profiling_native_extension/helpers.h
datadog-2.0.0.beta2 ext/datadog_profiling_native_extension/helpers.h
ddtrace-1.22.0 ext/datadog_profiling_native_extension/helpers.h
datadog-2.0.0.beta1 ext/datadog_profiling_native_extension/helpers.h
ddtrace-1.21.1 ext/datadog_profiling_native_extension/helpers.h
ddtrace-1.21.0 ext/datadog_profiling_native_extension/helpers.h
ddtrace-1.20.0 ext/ddtrace_profiling_native_extension/helpers.h