git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'eb98f1f2915446ef05120482a2fc353c76330b50' into mmap_binary
[tpg/acess2.git]
/
Kernel
/
vfs
/
nodecache.c
diff --git
a/Kernel/vfs/nodecache.c
b/Kernel/vfs/nodecache.c
index
b1b1b61
..
ad85ac3
100644
(file)
--- a/
Kernel/vfs/nodecache.c
+++ b/
Kernel/vfs/nodecache.c
@@
-2,7
+2,7
@@
* AcessMicro VFS
* - File IO Passthru's
*/
* AcessMicro VFS
* - File IO Passthru's
*/
-#include <
common
.h>
+#include <
acess
.h>
#include "vfs.h"
#include "vfs_int.h"
#include "vfs.h"
#include "vfs_int.h"
@@
-23,7
+23,7
@@
tInodeCache *Inode_int_GetFSCache(int Handle);
// === GLOBALS ===
int gVFS_NextInodeHandle = 1;
// === GLOBALS ===
int gVFS_NextInodeHandle = 1;
-
int gilVFS_InodeCache = 0
;
+
tShortSpinlock glVFS_InodeCache
;
tInodeCache *gVFS_InodeCache = NULL;
// === CODE ===
tInodeCache *gVFS_InodeCache = NULL;
// === CODE ===
@@
-40,10
+40,10
@@
int Inode_GetHandle()
ent->Next = NULL; ent->FirstNode = NULL;
// Add to list
ent->Next = NULL; ent->FirstNode = NULL;
// Add to list
-
LOCK( &gi
lVFS_InodeCache );
+
SHORTLOCK( &g
lVFS_InodeCache );
ent->Next = gVFS_InodeCache;
gVFS_InodeCache = ent;
ent->Next = gVFS_InodeCache;
gVFS_InodeCache = ent;
-
RELEASE( &gi
lVFS_InodeCache );
+
SHORTREL( &g
lVFS_InodeCache );
return gVFS_NextInodeHandle-1;
}
return gVFS_NextInodeHandle-1;
}
@@
-121,9
+121,9
@@
void Inode_UncacheNode(int Handle, Uint64 Inode)
tCachedInode *ent, *prev;
cache = Inode_int_GetFSCache(Handle);
tCachedInode *ent, *prev;
cache = Inode_int_GetFSCache(Handle);
- if(!cache) return;
+ if(!cache) return
;
- if(Inode > cache->MaxCached) return;
+ if(Inode > cache->MaxCached) return
;
// Search Cache
ent = cache->FirstNode;
// Search Cache
ent = cache->FirstNode;
@@
-147,8
+147,10
@@
void Inode_UncacheNode(int Handle, Uint64 Inode)
free(ent);
}
free(ent);
}
- return;
+ return
;
}
}
+
+ return ;
}
/**
}
/**
UCC
git Repository :: git.ucc.asn.au