ck_barrier_mcs: Style clean-up.

ck_pring
Samy Al Bahra 12 years ago
parent 507ac1322c
commit 7c56d73433

@ -55,17 +55,17 @@ ck_barrier_mcs_init(struct ck_barrier_mcs *barrier,
/* The root thread does not have a parent. */
barrier[i].parent = (i == 0) ?
&barrier[i].dummy :
&barrier[(i - 1) >> 2].childnotready[(i - 1) & 3];
&barrier[i].dummy :
&barrier[(i - 1) >> 2].childnotready[(i - 1) & 3];
/* Leaf threads do not have any children. */
barrier[i].children[0] = ((i << 1) + 1 >= nthr) ?
&barrier[i].dummy :
&barrier[(i << 1) + 1].parentsense;
&barrier[i].dummy :
&barrier[(i << 1) + 1].parentsense;
barrier[i].children[1] = ((i << 1) + 2 >= nthr) ?
&barrier[i].dummy :
&barrier[(i << 1) + 2].parentsense;
&barrier[i].dummy :
&barrier[(i << 1) + 2].parentsense;
barrier[i].parentsense = 0;
}
@ -87,15 +87,15 @@ ck_barrier_mcs_check_children(unsigned int *childnotready)
{
if (ck_pr_load_uint(&childnotready[0]) != 0)
return (false);
return false;
if (ck_pr_load_uint(&childnotready[1]) != 0)
return (false);
return false;
if (ck_pr_load_uint(&childnotready[2]) != 0)
return (false);
return false;
if (ck_pr_load_uint(&childnotready[3]) != 0)
return (false);
return false;
return (true);
return true;
}
CK_CC_INLINE static void

Loading…
Cancel
Save