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
Usermode/lspci - Recreated without the huge database of vendors
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
vfs
/
handle.c
diff --git
a/KernelLand/Kernel/vfs/handle.c
b/KernelLand/Kernel/vfs/handle.c
index
d22f965
..
8cae804
100644
(file)
--- a/
KernelLand/Kernel/vfs/handle.c
+++ b/
KernelLand/Kernel/vfs/handle.c
@@
-60,7
+60,7
@@
int VFS_AllocHandle(int bIsUser, tVFS_Node *Node, int Mode)
{
int max_handles = *Threads_GetMaxFD();
// Allocate Buffer
- if( MM_GetPhysAddr(
(tVAddr)
gaUserHandles ) == 0 )
+ if( MM_GetPhysAddr( gaUserHandles ) == 0 )
{
Uint addr, size;
size = max_handles * sizeof(tVFS_Handle);
@@
-87,7
+87,7
@@
int VFS_AllocHandle(int bIsUser, tVFS_Node *Node, int Mode)
else
{
// Allocate space if not already
- if( MM_GetPhysAddr(
(tVAddr)
gaKernelHandles ) == 0 )
+ if( MM_GetPhysAddr( gaKernelHandles ) == 0 )
{
Uint addr, size;
size = MAX_KERNEL_FILES * sizeof(tVFS_Handle);
@@
-121,7
+121,7
@@
void VFS_ReferenceUserHandles(void)
int max_handles = *Threads_GetMaxFD();
// Check if this process has any handles
- if( MM_GetPhysAddr(
(tVAddr)
gaUserHandles ) == 0 )
+ if( MM_GetPhysAddr( gaUserHandles ) == 0 )
return ;
for( i = 0; i < max_handles; i ++ )
@@
-141,7
+141,7
@@
void VFS_CloseAllUserHandles(void)
int max_handles = *Threads_GetMaxFD();
// Check if this process has any handles
- if( MM_GetPhysAddr(
(tVAddr)
gaUserHandles ) == 0 )
+ if( MM_GetPhysAddr( gaUserHandles ) == 0 )
return ;
for( i = 0; i < max_handles; i ++ )
@@
-165,7
+165,7
@@
void *VFS_SaveHandles(int NumFDs, int *FDs)
int max_handles = *Threads_GetMaxFD();
// Check if this process has any handles
- if( MM_GetPhysAddr(
(tVAddr)
gaUserHandles ) == 0 )
+ if( MM_GetPhysAddr( gaUserHandles ) == 0 )
return NULL;
// Allocate
@@
-198,6
+198,7
@@
void *VFS_SaveHandles(int NumFDs, int *FDs)
continue ;
if( h->Node->Type && h->Node->Type->Reference )
h->Node->Type->Reference( h->Node );
+ h->Mount->OpenHandleCount ++;
}
return ret;
@@
-213,7
+214,7
@@
void VFS_RestoreHandles(int NumFDs, void *Handles)
return ;
// Check if there is already a set of handles
- if( MM_GetPhysAddr(
(tVAddr)
gaUserHandles ) != 0 )
+ if( MM_GetPhysAddr( gaUserHandles ) != 0 )
return ;
@@
-244,6
+245,7
@@
void VFS_RestoreHandles(int NumFDs, void *Handles)
continue ;
if( h->Node->Type && h->Node->Type->Reference )
h->Node->Type->Reference( h->Node );
+ h->Mount->OpenHandleCount ++;
}
}
@@
-265,6
+267,7
@@
void VFS_FreeSavedHandles(int NumFDs, void *Handles)
continue ;
if( h->Node->Type && h->Node->Type->Close )
h->Node->Type->Close( h->Node );
+ h->Mount->OpenHandleCount --;
}
free( Handles );
}
UCC
git Repository :: git.ucc.asn.au