summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
27d65bc)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
perror("Error in pthread mutex lock");
exit(-1);
}
perror("Error in pthread mutex lock");
exit(-1);
}
- if (rcu_reader.need_mb) {
+ if (LOAD_SHARED(rcu_reader.need_mb)) {
- rcu_reader.need_mb = 0;
+ _STORE_SHARED(rcu_reader.need_mb, 0);
smp_mb();
}
poll(NULL,0,10);
smp_mb();
}
poll(NULL,0,10);
* cache flush is enforced.
*/
list_for_each_entry(index, ®istry, head) {
* cache flush is enforced.
*/
list_for_each_entry(index, ®istry, head) {
- index->need_mb = 1;
- smp_mc(); /* write need_mb before sending the signal */
+ STORE_SHARED(index->need_mb, 1);
pthread_kill(index->tid, SIGRCU);
}
/*
pthread_kill(index->tid, SIGRCU);
}
/*
* the Linux Test Project (LTP).
*/
list_for_each_entry(index, ®istry, head) {
* the Linux Test Project (LTP).
*/
list_for_each_entry(index, ®istry, head) {
- while (index->need_mb) {
+ while (LOAD_SHARED(index->need_mb)) {
pthread_kill(index->tid, SIGRCU);
poll(NULL, 0, 1);
}
pthread_kill(index->tid, SIGRCU);
poll(NULL, 0, 1);
}
* executed on.
*/
smp_mb();
* executed on.
*/
smp_mb();
- rcu_reader.need_mb = 0;
+ _STORE_SHARED(rcu_reader.need_mb, 0);