/* Copyright 2005 Chris Thomasson */


#include "../appcore.h"
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>


#ifndef AC_SYS_H


#ifdef __cplusplus
extern "C"
{
#endif


#define AC_SYS_IS_MEM_ALIGNED( ac_macro_ptr, ac_macro_align ) \
  ( ! (((ptrdiff_t)(ac_macro_ptr)) % (ac_macro_align) ) ) ? 0 : EFAULT


#ifdef __cplusplus
}
#endif


#endif




/* i686 only, for now.  ;(...
   Luckly, the algorithms are portable to many different processors. =) */
#include "../cpu/i686/sys/ac_sys_i686.h"
#include "ac_sys_thread.h"




#ifndef AC_SYS_H
#define AC_SYS_H


#ifdef __cplusplus
extern "C"
{
#endif




#ifdef _MSC_VER 
/* 4324: structure was padded due to _declspec(align()) */
#pragma warning ( disable : 4324 )
#endif


typedef struct 
AC_DECLSPEC_ALIGN_CACHE_LINE
ac_sys_this_
{
  ac_cpu_this_t cpu;
  ac_sys_thread_this_t sys_thread;
  void *this_mem;

} ac_sys_this_t;


#ifdef _MSC_VER 
/* 4324: structure was padded due to _declspec(align()) */
#pragma warning ( default : 4324 )
#endif




#ifdef __cplusplus
}
#endif


#endif