| 159 | |
| 160 | |
| 161 | void perform_test ( |
| 162 | ) |
| 163 | { |
| 164 | num_write = 0; |
| 165 | num_read = 0; |
| 166 | max_read = 0; |
| 167 | failure = false; |
| 168 | |
| 169 | // doing this big block of weird stuff should have no effect. |
| 170 | { |
| 171 | m.unlock(); |
| 172 | |
| 173 | m.lock_readonly(); |
| 174 | m.lock_readonly(); |
| 175 | m.unlock(); |
| 176 | m.unlock_readonly(); |
| 177 | m.unlock(); |
| 178 | m.unlock_readonly(); |
| 179 | |
| 180 | m.unlock(); |
| 181 | m.unlock_readonly(); |
| 182 | |
| 183 | m.lock(); |
| 184 | m.unlock_readonly(); |
| 185 | m.unlock_readonly(); |
| 186 | m.unlock(); |
| 187 | } |
| 188 | |
| 189 | |
| 190 | // start up our testing threads |
| 191 | start(); |
| 192 | |
| 193 | // wait for the threads to finish |
| 194 | wait(); |
| 195 | |
| 196 | |
| 197 | DLIB_TEST(failure == false); |
| 198 | DLIB_TEST_MSG(max_read == 6, "max_read: "<< max_read); |
| 199 | |
| 200 | } |
| 201 | |
| 202 | } a; |
| 203 |
nothing calls this directly
no test coverage detected