MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/local/ssl/include/orbit-2.0/orbit/util/orbit-util.h
#ifndef ORBIT_UTIL_H
#define ORBIT_UTIL_H 1

#include <glib.h>
#include <orbit/orbit-config.h>
#include <orbit/util/basic_types.h>
#include <orbit/util/orbit-genrand.h>

G_BEGIN_DECLS

/* Align a value upward to a boundary, expressed as a number of bytes.
   E.g. align to an 8-byte boundary with argument of 8.  */

/*
 *   (this + boundary - 1)
 *          &
 *    ~(boundary - 1)
 */

#define ALIGN_VALUE(this, boundary) \
  (( ((gulong)(this)) + (((gulong)(boundary)) -1)) & (~(((gulong)(boundary))-1)))

#define ALIGN_ADDRESS(this, boundary) \
  ((gpointer)ALIGN_VALUE(this, boundary))

#ifdef ORBIT2_INTERNAL_API

gulong ORBit_wchar_strlen(CORBA_wchar *wstr);

#define num2hexdigit(n) (((n)>9)?((n)+'a'-10):((n)+'0'))

#endif /* ORBIT2_INTERNAL_API */

G_END_DECLS

#endif