/* 
 * @COPYRIGHT@
 * 
 * x-kernel v3.3
 * 
 * Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 * 
 * @COPYRIGHT@
 *
 * $RCSfile: platform.h,v $
 *
 * HISTORY
 * $Log: platform.h,v $
 * Revision 1.2  1997/01/28 22:36:13  rrp
 * Pulled over from OSF/1 to support scout threads.
 *
 * Revision 1.3  1996/01/30  21:03:30  slm
 * Updated copyright and version.
 *
 * Revision 1.2.1.1  1994/10/26  00:02:59  hkaram
 * New branch
 *
 * Revision 1.2  1994/06/11  00:02:19  menze
 * Added copyright notice
 *
 * Revision 1.1  1994/05/15  00:24:22  davidm
 * Initial revision
 */
#ifndef platform_h
#define platform_h

/*
 * Macro to assist in declaring the format attribute of printf/sscanf
 * like functions so that GCC can do type checking on the args:
 */
#if __GNUC__ > 1
#  define XFMT(a,s,f)	__attribute__ ((format (a, s, f)))
#  define XNORETURN	__attribute__ ((noreturn))
#else
#  define XFMT(a,s,f)
#  define XNORETURN
#endif /* __GNUC__ > 1 */

#if defined(__GNUC__) && !defined(XK_DEBUG)
# define XK_USE_INLINE
#endif

#define XK_ALIGNED(a,t)	(((unsigned long)(a) & (sizeof(t) - 1)) == 0)
#define XK_ROUNDUP(v,t)	(((v) + sizeof(t) - 1) & ~(sizeof(t) - 1))

#include "xk_config.h"
#include "xk_arch.h"
#include "xtype.h"
#include "xendian.h"
#include "xmalloc.h"
#include "x_stdio.h"
#include "x_libc.h"
#include "msg_p.h"	/* this is a platform independent file! */
#include "process.h"

#ifndef NULL
# define NULL	0
#endif

#ifndef TRUE
# define	TRUE	1
# define	FALSE	0
#endif /* TRUE */

#ifdef __PREDICTIONS__
# define PREDICT_FALSE  @0
# define PREDICT_TRUE   @1
#else
# define PREDICT_FALSE
# define PREDICT_TRUE
#endif

#ifdef __LASTCALL__
# define FORCE_LASTCALL !
#else
# define FORCE_LASTCALL
#endif

#define ROM_MAX_LINES 	100 	/* Up to 100 table entries */
#define ROM_MAX_FIELDS 	20

extern	char *rom[ROM_MAX_LINES + 1][ROM_MAX_FIELDS + 1];  


#endif /* platform_h */
