mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
venti: work around gcc 4.3 bug (reported by Lucho Ionkov)
This commit is contained in:
parent
17b19538a4
commit
dce4cbabd1
1 changed files with 13 additions and 1 deletions
|
@ -15,7 +15,19 @@ struct ICache
|
||||||
IHash *hash;
|
IHash *hash;
|
||||||
IEntry *entries;
|
IEntry *entries;
|
||||||
int nentries;
|
int nentries;
|
||||||
IEntry free;
|
|
||||||
|
/*
|
||||||
|
* gcc 4.3 inlines the pushfirst loop in initicache,
|
||||||
|
* but the inliner incorrectly deduces that
|
||||||
|
* icache.free.next has a constant value
|
||||||
|
* throughout the loop. (In fact, pushfirst
|
||||||
|
* assigns to it as ie->prev->next.)
|
||||||
|
* Marking it volatile should avoid this bug.
|
||||||
|
* The speed of linked list operations is dwarfed
|
||||||
|
* by the disk i/o anyway.
|
||||||
|
*/
|
||||||
|
volatile IEntry free;
|
||||||
|
|
||||||
IEntry clean;
|
IEntry clean;
|
||||||
IEntry dirty;
|
IEntry dirty;
|
||||||
u32int maxdirty;
|
u32int maxdirty;
|
||||||
|
|
Loading…
Reference in a new issue