win-pvdrivers

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/liblfds.6/test/src/structures.h	Sun Jan 31 21:28:42 2010 +1100
     1.3 @@ -0,0 +1,190 @@
     1.4 +/***** structs *****/
     1.5 +#pragma pack( push, ALIGN_DOUBLE_POINTER )
     1.6 +
     1.7 +/***** abstraction tests *****/
     1.8 +struct abstraction_test_dcas_state
     1.9 +{
    1.10 +  volatile atom_t
    1.11 +    *shared_counter;
    1.12 +
    1.13 +  atom_t
    1.14 +    local_counter;
    1.15 +};
    1.16 +
    1.17 +/***** freelist tests *****/
    1.18 +struct freelist_test_popping_state
    1.19 +{
    1.20 +  struct freelist_state
    1.21 +    *fs,
    1.22 +    *fs_thread_local;
    1.23 +};
    1.24 +
    1.25 +struct freelist_test_pushing_state
    1.26 +{
    1.27 +  atom_t
    1.28 +    thread_number;
    1.29 +
    1.30 +  struct freelist_state
    1.31 +    *source_fs,
    1.32 +    *fs;
    1.33 +};
    1.34 +
    1.35 +struct freelist_test_popping_and_pushing_state
    1.36 +{
    1.37 +  struct freelist_state
    1.38 +    *local_fs,
    1.39 +    *fs;
    1.40 +};
    1.41 +
    1.42 +struct freelist_test_counter_and_thread_number
    1.43 +{
    1.44 +  atom_t
    1.45 +    thread_number;
    1.46 +
    1.47 +  unsigned long long int
    1.48 +    counter;
    1.49 +};
    1.50 +
    1.51 +/***** queue tests *****/
    1.52 +struct queue_test_enqueuing_state
    1.53 +{
    1.54 +  struct queue_state
    1.55 +    *qs;
    1.56 +
    1.57 +  atom_t
    1.58 +    counter;
    1.59 +};
    1.60 +
    1.61 +struct queue_test_dequeuing_state
    1.62 +{
    1.63 +  struct queue_state
    1.64 +    *qs;
    1.65 +
    1.66 +  int
    1.67 +    error_flag;
    1.68 +};
    1.69 +
    1.70 +struct queue_test_enqueuing_and_dequeuing_state
    1.71 +{
    1.72 +  struct queue_state
    1.73 +    *qs;
    1.74 +
    1.75 +  atom_t
    1.76 +    counter,
    1.77 +    thread_number,
    1.78 +    *per_thread_counters;
    1.79 +
    1.80 +  unsigned int
    1.81 +    cpu_count;
    1.82 +
    1.83 +  int
    1.84 +    error_flag;
    1.85 +};
    1.86 +
    1.87 +struct queue_test_rapid_enqueuing_and_dequeuing_state
    1.88 +{
    1.89 +  struct queue_state
    1.90 +    *qs;
    1.91 +
    1.92 +  atom_t
    1.93 +    counter;
    1.94 +};
    1.95 +
    1.96 +/***** ringbuffer tests *****/
    1.97 +struct ringbuffer_test_reading_state
    1.98 +{
    1.99 +  struct ringbuffer_state
   1.100 +    *rs;
   1.101 +
   1.102 +  int
   1.103 +    error_flag;
   1.104 +
   1.105 +  atom_t
   1.106 +    read_count;
   1.107 +};
   1.108 +
   1.109 +struct ringbuffer_test_writing_state
   1.110 +{
   1.111 +  struct ringbuffer_state
   1.112 +    *rs;
   1.113 +
   1.114 +  atom_t
   1.115 +    write_count;
   1.116 +};
   1.117 +
   1.118 +struct ringbuffer_test_reading_and_writing_state
   1.119 +{
   1.120 +  struct ringbuffer_state
   1.121 +    *rs;
   1.122 +
   1.123 +  atom_t
   1.124 +    counter,
   1.125 +    *per_thread_counters;
   1.126 +
   1.127 +  unsigned int
   1.128 +    cpu_count;
   1.129 +
   1.130 +  int
   1.131 +    error_flag;
   1.132 +};
   1.133 +
   1.134 +/***** slist tests *****/
   1.135 +struct slist_thread_start_state
   1.136 +{
   1.137 +  struct slist_state
   1.138 +    *ss;
   1.139 +
   1.140 +  struct slist_element
   1.141 +    *se;
   1.142 +
   1.143 +  time_t
   1.144 +    duration;
   1.145 +
   1.146 +  unsigned long int
   1.147 +    iteration_modulo;
   1.148 +};
   1.149 +
   1.150 +/***** stack tests *****/
   1.151 +
   1.152 +/***** freelist benchmarks *****/
   1.153 +struct freelist_benchmark
   1.154 +{
   1.155 +  struct freelist_state
   1.156 +    *fs;
   1.157 +
   1.158 +  atom_t
   1.159 +    operation_count;
   1.160 +};
   1.161 +
   1.162 +/***** queue benchmarks *****/
   1.163 +struct queue_benchmark
   1.164 +{
   1.165 +  struct queue_state
   1.166 +    *qs;
   1.167 +
   1.168 +  atom_t
   1.169 +    operation_count;
   1.170 +};
   1.171 +
   1.172 +/***** ringbuffer benchmarks *****/
   1.173 +struct ringbuffer_benchmark
   1.174 +{
   1.175 +  struct ringbuffer_state
   1.176 +    *rs;
   1.177 +
   1.178 +  atom_t
   1.179 +    operation_count;
   1.180 +};
   1.181 +
   1.182 +/***** stack benchmarks *****/
   1.183 +struct stack_benchmark
   1.184 +{
   1.185 +  struct stack_state
   1.186 +    *ss;
   1.187 +
   1.188 +  atom_t
   1.189 +    operation_count;
   1.190 +};
   1.191 +
   1.192 +#pragma pack( pop )
   1.193 +