From: Frank Mori Hess Date: Sun, 21 Mar 2004 17:41:33 +0000 (+0000) Subject: add a rmb() in mite_bytes_transferred() X-Git-Tag: r0_7_69~76 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ef4b4b71f727cf72515ede4da0362d3b152dc33d;p=comedi.git add a rmb() in mite_bytes_transferred() --- 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 ); }