2005-11-08 02:02:16 +00:00
|
|
|
/*
|
|
|
|
*
|
2006-09-15 14:55:39 +00:00
|
|
|
* (c) 2004,2005 Laurent Vivier <Laurent@lvivier.info>
|
2005-11-08 02:02:16 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MACOS_OSUTILS_H__
|
|
|
|
#define __MACOS_OSUTILS_H__
|
|
|
|
|
|
|
|
#include <macos/types.h>
|
|
|
|
#include <macos/traps.h>
|
|
|
|
|
2007-09-29 21:19:52 +00:00
|
|
|
struct QElem {
|
|
|
|
struct QElem *qLink;
|
|
|
|
int16_t qType;
|
|
|
|
short qData[1];
|
|
|
|
};
|
|
|
|
typedef struct QElem QElem;
|
|
|
|
typedef QElem * QElemPtr;
|
|
|
|
|
2005-11-08 02:02:16 +00:00
|
|
|
struct QHdr {
|
2007-09-29 21:19:52 +00:00
|
|
|
volatile int16_t qFlags;
|
|
|
|
volatile QElemPtr qHead;
|
|
|
|
volatile QElemPtr qTail;
|
2005-11-08 02:02:16 +00:00
|
|
|
};
|
|
|
|
typedef struct QHdr QHdr;
|
|
|
|
typedef QHdr * QHdrPtr;
|
|
|
|
|
|
|
|
struct MachineLocation
|
|
|
|
{
|
|
|
|
int32_t latitude;
|
|
|
|
int32_t longitude;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
int8_t dlsDelta;
|
|
|
|
int32_t gmtDelta;
|
|
|
|
} u;
|
|
|
|
};
|
|
|
|
typedef struct MachineLocation MachineLocation;
|
|
|
|
|
2006-12-29 20:27:15 +00:00
|
|
|
#ifdef __mc68000__
|
2005-11-08 02:02:16 +00:00
|
|
|
static inline void ReadLocation(MachineLocation * loc)
|
|
|
|
{
|
|
|
|
asm("move.l %0, %%a0\n"
|
|
|
|
XPRam(_ReadLocation)
|
|
|
|
:: "g" (loc) : "%%d0", UNPRESERVED_REGS);
|
|
|
|
}
|
2006-12-29 20:27:15 +00:00
|
|
|
#endif /* __mc68000__ */
|
2005-11-08 02:02:16 +00:00
|
|
|
#endif /* __MACOS_OSUTILS_H__ */
|