Commit 3faa1fd7 authored by Geoff Simmons's avatar Geoff Simmons

add a write memory barrier before submitting transactions, and a read

mb before reading them to format for log output
parent 6ba2caa8
......@@ -70,6 +70,7 @@
#include "vtim.h"
#include "vpf.h"
#include "vcs_version.h"
#include "vmb.h"
#define DEFAULT_CONFIG "/etc/varnishevent.conf"
......@@ -220,6 +221,7 @@ submit(tx_t *tx)
{
CHECK_OBJ_NOTNULL(tx, TX_MAGIC);
assert(OCCUPIED(tx));
VWMB();
SPSCQ_Enq(tx);
signal_spscq_ready();
submitted++;
......
......@@ -188,7 +188,8 @@ wrt_write(tx_t *tx)
reopen = 0;
}
AZ(pthread_mutex_unlock(&reopen_lock));
VRMB();
VSB_clear(os);
FMT_Format(tx, os);
VSB_finish(os);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment