win-pvdrivers

view liblfds.6/test/src/structures.h @ 766:6300617040e0

Big changes - not ready for production use.
Removed all the custom DMA handling code as it was completely incompatible with the Windows verifier.
Added liblfds (using the lock free stack) from liblfds.org so that grant's can be obtained at DIRQL.
Fixed xennet and xenvbd to support the changes.
xenusb and xenscsi almost certainly will not yet work after the changes.
author James Harper <james.harper@bendigoit.com.au>
date Sun Jan 31 21:28:42 2010 +1100 (2010-01-31)
parents
children
line source
1 /***** structs *****/
2 #pragma pack( push, ALIGN_DOUBLE_POINTER )
4 /***** abstraction tests *****/
5 struct abstraction_test_dcas_state
6 {
7 volatile atom_t
8 *shared_counter;
10 atom_t
11 local_counter;
12 };
14 /***** freelist tests *****/
15 struct freelist_test_popping_state
16 {
17 struct freelist_state
18 *fs,
19 *fs_thread_local;
20 };
22 struct freelist_test_pushing_state
23 {
24 atom_t
25 thread_number;
27 struct freelist_state
28 *source_fs,
29 *fs;
30 };
32 struct freelist_test_popping_and_pushing_state
33 {
34 struct freelist_state
35 *local_fs,
36 *fs;
37 };
39 struct freelist_test_counter_and_thread_number
40 {
41 atom_t
42 thread_number;
44 unsigned long long int
45 counter;
46 };
48 /***** queue tests *****/
49 struct queue_test_enqueuing_state
50 {
51 struct queue_state
52 *qs;
54 atom_t
55 counter;
56 };
58 struct queue_test_dequeuing_state
59 {
60 struct queue_state
61 *qs;
63 int
64 error_flag;
65 };
67 struct queue_test_enqueuing_and_dequeuing_state
68 {
69 struct queue_state
70 *qs;
72 atom_t
73 counter,
74 thread_number,
75 *per_thread_counters;
77 unsigned int
78 cpu_count;
80 int
81 error_flag;
82 };
84 struct queue_test_rapid_enqueuing_and_dequeuing_state
85 {
86 struct queue_state
87 *qs;
89 atom_t
90 counter;
91 };
93 /***** ringbuffer tests *****/
94 struct ringbuffer_test_reading_state
95 {
96 struct ringbuffer_state
97 *rs;
99 int
100 error_flag;
102 atom_t
103 read_count;
104 };
106 struct ringbuffer_test_writing_state
107 {
108 struct ringbuffer_state
109 *rs;
111 atom_t
112 write_count;
113 };
115 struct ringbuffer_test_reading_and_writing_state
116 {
117 struct ringbuffer_state
118 *rs;
120 atom_t
121 counter,
122 *per_thread_counters;
124 unsigned int
125 cpu_count;
127 int
128 error_flag;
129 };
131 /***** slist tests *****/
132 struct slist_thread_start_state
133 {
134 struct slist_state
135 *ss;
137 struct slist_element
138 *se;
140 time_t
141 duration;
143 unsigned long int
144 iteration_modulo;
145 };
147 /***** stack tests *****/
149 /***** freelist benchmarks *****/
150 struct freelist_benchmark
151 {
152 struct freelist_state
153 *fs;
155 atom_t
156 operation_count;
157 };
159 /***** queue benchmarks *****/
160 struct queue_benchmark
161 {
162 struct queue_state
163 *qs;
165 atom_t
166 operation_count;
167 };
169 /***** ringbuffer benchmarks *****/
170 struct ringbuffer_benchmark
171 {
172 struct ringbuffer_state
173 *rs;
175 atom_t
176 operation_count;
177 };
179 /***** stack benchmarks *****/
180 struct stack_benchmark
181 {
182 struct stack_state
183 *ss;
185 atom_t
186 operation_count;
187 };
189 #pragma pack( pop )