Updated PCI IDs to latest snapshot.
[tangerine.git] / rom / utility / intern.h
blob9ee4202300e7286e08fc67b82300136b0bc36889
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Internal information for utility.library.
6 Lang:
7 */
8 #ifndef UTILITY_INTERN_H
9 #define UTILITY_INTERN_H
11 #ifndef EXEC_TYPES_H
12 #include <exec/types.h>
13 #endif
14 #ifndef EXEC_NODES_H
15 #include <exec/nodes.h>
16 #endif
17 #ifndef EXEC_LISTS_H
18 #include <exec/lists.h>
19 #endif
20 #ifndef EXEC_LIBRARIES_H
21 #include <exec/libraries.h>
22 #endif
23 #ifndef EXEC_MEMORY_H
24 #include <exec/memory.h>
25 #endif
26 #ifndef EXEC_IO_H
27 #include <exec/io.h>
28 #endif
29 #ifndef EXEC_SEMAPHORES_H
30 #include <exec/semaphores.h>
31 #endif
32 #ifndef UTILITY_TAGITEM_H
33 #include <utility/tagitem.h>
34 #endif
35 #ifndef UTILITY_NAME_H
36 #include <utility/name.h>
37 #endif
38 #ifndef UTILITY_DATE_H
39 #include <utility/date.h>
40 #endif
41 #ifndef UTILITY_PACK_H
42 #include <utility/pack.h>
43 #endif
44 #ifndef AROS_LIBCALL_H
45 #include <aros/libcall.h>
46 #endif
47 #ifndef AROS_DEBUG_H
48 #include <aros/debug.h>
49 #endif
50 #ifndef UTILITY_UTILITY_H
51 #include <utility/utility.h>
52 #endif
53 #ifndef PROTO_ALIB_H
54 #include <proto/alib.h>
55 #endif
56 #ifndef PROTO_EXEC_H
57 #include <proto/exec.h>
58 #endif
59 #ifndef PROTO_UTILITY_H
60 #include <proto/utility.h>
61 #endif
63 /* Definition of a utility namespace, needed here for the library base. */
65 struct NameSpace
67 struct MinList ns_List;
68 struct SignalSemaphore ns_Lock;
69 ULONG ns_Flags;
73 This is the internal version of the UtilityBase structure
76 struct IntUtilityBase
78 struct UtilityBase UBase;
80 /* This is where the private data starts. */
81 ULONG ub_LastID;
82 struct NameSpace ub_NameSpace;
85 #define GetIntUtilityBase(ub) ((struct IntUtilityBase *)(ub))
86 #define GetUtilityBase(ub) (&GetIntUtilityBase(ub)->UBase)
89 Internal versions of the NamedObject structures.
90 Access using GetIntNamedObject()
92 I have a problem here of sorts. The autodocs do not give enough
93 information really. They say it is possible to nest NamedObjects
94 with namespaces, however the implementation didn't allow NamedObjects
95 with their own namespaces to be members of a namespace.
97 However, the autodocs are right, so you can nest like that.
100 struct IntNamedObject
102 struct NamedObject no;
104 struct Node no_Node;
105 struct NameSpace *no_ParentSpace; /* The NameSpace I am in */
106 struct NameSpace *no_NameSpace; /* My NameSpace */
107 struct Message *no_FreeMessage;
108 UWORD no_UseCount;
109 BOOL no_FreeObject;
112 #define GetIntNamedObject(no) ((struct IntNamedObject *)(no))
113 #define GetNamedObject(no) (&GetIntNamedObject(no)->no)
115 /* Internal function prototypes */
116 struct NameSpace *GetNameSpace(struct NamedObject *, struct UtilityBase *);
117 struct IntNamedObject *IntFindNamedObj(struct NameSpace *, struct Node *, STRPTR, struct UtilityBase *);
120 Access union to get a some memory in Pack|UnpackStructureTags(). I use
121 this because
122 a) it's neater.
123 b) it avoids any bizarre aliasing problems in the compiler.
124 c) did I say it makes stuff easier to read? :-)
126 union memaccess
128 UBYTE ub;
129 UWORD uw;
130 ULONG ul;
131 BYTE sb;
132 WORD sw;
133 LONG sl;
136 #endif