RE: user-mode port 0.44-2.4.7

From: James W. Lake (
Date: Wed Jul 25 2001 - 14:03:48 EST

What about a case when you have a struct
struct queue
        int head;
        int tail;
} myqueue;
You update head in an isr and tail in one singular open fop_read() call.
Either don't mind getting old values of the one they don't update, want
to get the latest version of the variable as often as possible.
Should head and tail be volatile in the definition, or should they be
accessed with:
int head = (volatile)myqueue.head;
or with barrier() around the read/write?
Jim Lake

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:24 EST