From ef4b4b71f727cf72515ede4da0362d3b152dc33d Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sun, 21 Mar 2004 17:41:33 +0000 Subject: [PATCH] add a rmb() in mite_bytes_transferred() --- comedi/drivers/mite.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/comedi/drivers/mite.c b/comedi/drivers/mite.c index 43000a32..fe5dd2b4 100644 --- a/comedi/drivers/mite.c +++ b/comedi/drivers/mite.c @@ -53,6 +53,7 @@ #include #include +#include #include "mite.h" @@ -348,9 +349,10 @@ unsigned int mite_bytes_transferred(struct mite_struct *mite, unsigned int chan) { unsigned int bytes_read; + bytes_read = mite_bytes_read( mite, chan ); /* to avoid race, we want to read bytes read before reading bytes * in transit */ - bytes_read = mite_bytes_read( mite, chan ); + rmb(); return bytes_read - mite_bytes_in_transit( mite, chan ); } -- 2.26.2