ApertureOS
Macros | Functions
common.h File Reference
#include "types.h"
#include <stdarg.h>
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SET_BIT(x, index)   (x | (1 << index))
 
#define CLEAR_BIT(x, index)   (x & ~(1 << index))
 
#define TOGGLE_BIT(x, index)   (x ^ (1 << index))
 
#define CHECK_BIT(x, index)   ((x & (1 << index)) >> index)
 
#define SET_VAL_BIT(number, n, x)   ( number ^ ((-x ^ number) & (1 << n)))
 

Functions

void * memcpy (void *dest, void *src, size_t size)
 
void * memset (void *ptr, int val, size_t num)
 
void strrev (char *str)
 
size_t strlen (const char *str)
 
char * strcpy (char *destination, const char *source)
 
int strncmp (const char *s1, const char *s2, size_t n)
 
int vsnprintf (char *str, const char *format, va_list vl)
 
int sprintf (char *str, const char *format,...)
 
char * utoa (uint64_t val, char *ostr, int base)
 
char * itoa (int64_t val, char *ostr, int base)
 
char * strchr (const char *s, int c)
 
char * strrchr (const char *s, int c)
 
UID new_uid ()
 

Macro Definition Documentation

#define CHECK_BIT (   x,
  index 
)    ((x & (1 << index)) >> index)
#define CLEAR_BIT (   x,
  index 
)    (x & ~(1 << index))
#define SET_BIT (   x,
  index 
)    (x | (1 << index))
#define SET_VAL_BIT (   number,
  n,
 
)    ( number ^ ((-x ^ number) & (1 << n)))
#define TOGGLE_BIT (   x,
  index 
)    (x ^ (1 << index))

Function Documentation

char* itoa ( int64_t  val,
char *  ostr,
int  base 
)
void* memcpy ( void *  dest,
void *  src,
size_t  size 
)
void* memset ( void *  ptr,
int  val,
size_t  num 
)
UID new_uid ( )
int sprintf ( char *  str,
const char *  format,
  ... 
)
char* strchr ( const char *  s,
int  c 
)
char* strcpy ( char *  destination,
const char *  source 
)
size_t strlen ( const char *  str)
int strncmp ( const char *  s1,
const char *  s2,
size_t  n 
)
char* strrchr ( const char *  s,
int  c 
)
void strrev ( char *  str)
char* utoa ( uint64_t  val,
char *  ostr,
int  base 
)
int vsnprintf ( char *  str,
const char *  format,
va_list  vl 
)