compat.h File Reference

#include <locale.h>
#include <libintl.h>
#include <stdatomic.h>
#include <endian.h>
#include <cstdint>
#include <sys/types.h>
Include dependency graph for compat.h:

Go to the source code of this file.

Defines

#define _(STRING)   gettext(STRING)
#define __STDC_LIMIT_MACROS
#define __STDC_CONSTANT_MACROS
#define TLSDATA   __thread
#define CALLBACK
#define ATOMIC_INT32(x)   std::atomic<int32_t> x
#define ATOMIC_INCREMENT(x)   x.fetch_add(1)
#define ATOMIC_DECREMENT(x)   x.fetch_sub(1)

Functions

int aligned_malloc (void **memptr, size_t alignment, size_t size)
void aligned_free (void *mem)
int imin (int a, int b)
int imax (int a, int b)
double dmin (double a, double b)
double dmax (double a, double b)
std::uint64_t compat_msectiming ()
void compat_msleep (unsigned int time)
std::uint64_t compat_get_current_time_ms ()
std::uint64_t compat_get_current_time_us ()
std::uint64_t compat_get_thread_cputime_us ()
int kill_child (pid_t p)

Define Documentation

#define _ ( STRING   )     gettext(STRING)

Definition at line 29 of file compat.h.

#define __STDC_CONSTANT_MACROS

Definition at line 90 of file compat.h.

#define __STDC_LIMIT_MACROS

Definition at line 86 of file compat.h.

#define ATOMIC_DECREMENT (  )     x.fetch_sub(1)

Definition at line 99 of file compat.h.

#define ATOMIC_INCREMENT (  )     x.fetch_add(1)

Definition at line 98 of file compat.h.

#define ATOMIC_INT32 (  )     std::atomic<int32_t> x

Definition at line 97 of file compat.h.

#define CALLBACK

Definition at line 94 of file compat.h.

#define TLSDATA   __thread

Definition at line 93 of file compat.h.


Function Documentation

void aligned_free ( void *  mem  ) 

Definition at line 91 of file compat.cpp.

int aligned_malloc ( void **  memptr,
size_t  alignment,
size_t  size 
)

Definition at line 87 of file compat.cpp.

std::uint64_t compat_get_current_time_ms (  ) 

Definition at line 69 of file compat.cpp.

std::uint64_t compat_get_current_time_us (  ) 
std::uint64_t compat_get_thread_cputime_us (  ) 

Definition at line 77 of file compat.cpp.

std::uint64_t compat_msectiming (  ) 

Definition at line 54 of file compat.cpp.

void compat_msleep ( unsigned int  time  ) 

Definition at line 32 of file compat.cpp.

double dmax ( double  a,
double  b 
) [inline]

Definition at line 143 of file compat.h.

double dmin ( double  a,
double  b 
) [inline]

Definition at line 138 of file compat.h.

int imax ( int  a,
int  b 
) [inline]

Definition at line 133 of file compat.h.

int imin ( int  a,
int  b 
) [inline]

Definition at line 128 of file compat.h.

int kill_child ( pid_t  p  ) 

Definition at line 96 of file compat.cpp.

Generated on Tue Aug 24 19:50:35 2010 for Lightspark by  doxygen 1.6.3