Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305923
b: refs/heads/master
c: 6a32847
h: refs/heads/master
i:
  305921: 50a0d1d
  305919: e19180d
v: v3
  • Loading branch information
Jim Kukunas authored and NeilBrown committed May 22, 2012
1 parent 1fde51e commit 13f754b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ea7daa5d7fde47cd41f4d56c2deb949114da9d6
refs/heads/master: 6a328475cccacb99a13b06978091da936dd51d89
8 changes: 5 additions & 3 deletions trunk/crypto/xor.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static void
do_xor_speed(struct xor_block_template *tmpl, void *b1, void *b2)
{
int speed;
unsigned long now;
unsigned long now, j;
int i, count, max;

tmpl->next = template_list;
Expand All @@ -76,9 +76,11 @@ do_xor_speed(struct xor_block_template *tmpl, void *b1, void *b2)
*/
max = 0;
for (i = 0; i < 5; i++) {
now = jiffies;
j = jiffies;
count = 0;
while (jiffies == now) {
while ((now = jiffies) == j)
cpu_relax();
while (time_before(jiffies, now + 1)) {
mb(); /* prevent loop optimzation */
tmpl->do_2(BENCH_SIZE, b1, b2);
mb();
Expand Down

0 comments on commit 13f754b

Please sign in to comment.