Rev 2131 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2131 | Rev 2292 | ||
---|---|---|---|
Line 87... | Line 87... | ||
87 | #ifdef __OBJC__ |
87 | #ifdef __OBJC__ |
88 | @interface as_t : base_t { |
88 | @interface as_t : base_t { |
89 | @public |
89 | @public |
90 | /** Protected by asidlock. */ |
90 | /** Protected by asidlock. */ |
91 | link_t inactive_as_with_asid_link; |
91 | link_t inactive_as_with_asid_link; |
- | 92 | /** |
|
- | 93 | * Number of processors on wich is this address space active. |
|
- | 94 | * Protected by asidlock. |
|
- | 95 | */ |
|
- | 96 | count_t cpu_refcount; |
|
- | 97 | /** |
|
- | 98 | * Address space identifier. |
|
- | 99 | * Constant on architectures that do not support ASIDs. |
|
- | 100 | * Protected by asidlock. |
|
- | 101 | */ |
|
- | 102 | asid_t asid; |
|
92 | 103 | ||
93 | mutex_t lock; |
104 | mutex_t lock; |
94 | 105 | ||
95 | /** Number of references (i.e tasks that reference this as). */ |
106 | /** Number of references (i.e tasks that reference this as). */ |
96 | count_t refcount; |
107 | count_t refcount; |
97 | 108 | ||
98 | /** Number of processors on wich is this address space active. */ |
- | |
99 | count_t cpu_refcount; |
- | |
100 | - | ||
101 | /** B+tree of address space areas. */ |
109 | /** B+tree of address space areas. */ |
102 | btree_t as_area_btree; |
110 | btree_t as_area_btree; |
103 | 111 | ||
104 | /** |
- | |
105 | * Address space identifier. |
- | |
106 | * Constant on architectures that do not support ASIDs. |
- | |
107 | */ |
- | |
108 | asid_t asid; |
- | |
109 | - | ||
110 | /** Non-generic content. */ |
112 | /** Non-generic content. */ |
111 | as_genarch_t genarch; |
113 | as_genarch_t genarch; |
112 | 114 | ||
113 | /** Architecture specific content. */ |
115 | /** Architecture specific content. */ |
114 | as_arch_t arch; |
116 | as_arch_t arch; |
Line 131... | Line 133... | ||
131 | * set up during system initialization. |
133 | * set up during system initialization. |
132 | */ |
134 | */ |
133 | typedef struct as { |
135 | typedef struct as { |
134 | /** Protected by asidlock. */ |
136 | /** Protected by asidlock. */ |
135 | link_t inactive_as_with_asid_link; |
137 | link_t inactive_as_with_asid_link; |
- | 138 | /** |
|
- | 139 | * Number of processors on wich is this address space active. |
|
- | 140 | * Protected by asidlock. |
|
- | 141 | */ |
|
- | 142 | count_t cpu_refcount; |
|
- | 143 | /** |
|
- | 144 | * Address space identifier. |
|
- | 145 | * Constant on architectures that do not support ASIDs. |
|
- | 146 | * Protected by asidlock. |
|
- | 147 | */ |
|
- | 148 | asid_t asid; |
|
136 | 149 | ||
137 | mutex_t lock; |
150 | mutex_t lock; |
138 | 151 | ||
139 | /** Number of references (i.e tasks that reference this as). */ |
152 | /** Number of references (i.e tasks that reference this as). */ |
140 | count_t refcount; |
153 | count_t refcount; |
141 | 154 | ||
142 | /** Number of processors on wich is this address space active. */ |
- | |
143 | count_t cpu_refcount; |
- | |
144 | - | ||
145 | /** B+tree of address space areas. */ |
155 | /** B+tree of address space areas. */ |
146 | btree_t as_area_btree; |
156 | btree_t as_area_btree; |
147 | 157 | ||
148 | /** |
- | |
149 | * Address space identifier. |
- | |
150 | * Constant on architectures that do not support ASIDs. |
- | |
151 | */ |
- | |
152 | asid_t asid; |
- | |
153 | - | ||
154 | /** Non-generic content. */ |
158 | /** Non-generic content. */ |
155 | as_genarch_t genarch; |
159 | as_genarch_t genarch; |
156 | 160 | ||
157 | /** Architecture specific content. */ |
161 | /** Architecture specific content. */ |
158 | as_arch_t arch; |
162 | as_arch_t arch; |
Line 203... | Line 207... | ||
203 | } mem_backend_data_t; |
207 | } mem_backend_data_t; |
204 | 208 | ||
205 | /** Address space area structure. |
209 | /** Address space area structure. |
206 | * |
210 | * |
207 | * Each as_area_t structure describes one contiguous area of virtual memory. |
211 | * Each as_area_t structure describes one contiguous area of virtual memory. |
208 | * In the future, it should not be difficult to support shared areas. |
- | |
209 | */ |
212 | */ |
210 | typedef struct { |
213 | typedef struct { |
211 | mutex_t lock; |
214 | mutex_t lock; |
212 | /** Containing address space. */ |
215 | /** Containing address space. */ |
213 | as_t *as; |
216 | as_t *as; |
Line 248... | Line 251... | ||
248 | 251 | ||
249 | #ifndef __OBJC__ |
252 | #ifndef __OBJC__ |
250 | extern as_operations_t *as_operations; |
253 | extern as_operations_t *as_operations; |
251 | #endif |
254 | #endif |
252 | 255 | ||
253 | SPINLOCK_EXTERN(inactive_as_with_asid_lock); |
- | |
254 | extern link_t inactive_as_with_asid_head; |
256 | extern link_t inactive_as_with_asid_head; |
255 | 257 | ||
256 | extern void as_init(void); |
258 | extern void as_init(void); |
257 | 259 | ||
258 | extern as_t *as_create(int flags); |
260 | extern as_t *as_create(int flags); |