libsys: add Tomas Hruby's asynsend barrier
This barrier ensures that all fields of an asynchronously sent message are properly initialized before the message is marked as valid. Change-Id: I7b9590c11c4e040c8f992f1dd2581e54201bf214
This commit is contained in:
parent
3091b8cf26
commit
a082b2af62
1 changed files with 1 additions and 0 deletions
|
@ -126,6 +126,7 @@ int fl;
|
||||||
fl |= AMF_VALID; /* Mark in use */
|
fl |= AMF_VALID; /* Mark in use */
|
||||||
msgtable[next_slot].dst = dst;
|
msgtable[next_slot].dst = dst;
|
||||||
msgtable[next_slot].msg = *mp;
|
msgtable[next_slot].msg = *mp;
|
||||||
|
__insn_barrier();
|
||||||
msgtable[next_slot].flags = fl; /* Has to be last. The kernel
|
msgtable[next_slot].flags = fl; /* Has to be last. The kernel
|
||||||
* scans this table while we
|
* scans this table while we
|
||||||
* are sleeping.
|
* are sleeping.
|
||||||
|
|
Loading…
Reference in a new issue