grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / uuid / uuid_private.h
blob8f94d4f309abeca1139ec798a18b657db007c161
1 #ifndef UUID_PRIVATE_H_
2 #define UUID_PRIVATE_H_
4 /*
5 Copyright © 2007-2011, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include <inttypes.h>
10 #include <exec/libraries.h>
11 #include <exec/semaphores.h>
12 #include <devices/timer.h>
13 #include <dos/dos.h>
15 #include <libraries/uuid.h>
17 typedef struct {
18 uuid_time_t ts; /* saved timestamp */
19 uuid_node_t node; /* saved node ID */
20 uint16_t cs; /* saved clock sequence */
21 } uuid_state_t;
23 struct uuid_base {
24 struct Library uuid_LibNode;
25 struct SignalSemaphore uuid_GlobalLock;
26 struct DOSBase *uuid_DOSBase;
27 struct timerequest uuid_TR;
28 uuid_state_t uuid_State;
29 uuid_time_t uuid_NextUpdate;
30 uuid_time_t uuid_LastTime;
31 uint32_t uuid_RandomSeed;
32 uint16_t uuid_UUIDs_ThisTick;
33 uint8_t uuid_Initialized;
37 /* FIXME: Remove these #define xxxBase hacks
38 Do not use this in new code !
40 #ifdef DOSBase
41 #undef DOSBase
42 #endif
43 #define DOSBase (LIBBASE->uuid_DOSBase)
45 #ifdef TimerBase
46 #undef TimerBase
47 #endif
48 #define TimerBase (LIBBASE->uuid_TR.tr_node.io_Device)
50 #define UUIDS_PER_TICK 1024
52 #endif /*UUID_PRIVATE_H_*/