Kernel/VFS - Kernel-side implementation of marshalled FDs
[tpg/acess2.git] / KernelLand / Kernel / include / vfs_ext.h
index 65a8162..99a64e3 100644 (file)
@@ -226,6 +226,20 @@ extern int VFS_DuplicateFD(int SrcFD, int DstFD);
  */
 extern int     VFS_SetFDFlags(int FD, int Mask, int Value);
 
+/**
+ * \brief Save specified file handle such that it can be passed between processes
+ * \param FD   File descriptor to save
+ * \return Marshalled handle, or (uint64_t)-1 on error
+ */
+extern Uint64  VFS_MarshalHandle(int FD);
+
+/**
+ * \brief Restore a marshalled handle into the current process
+ * \param Handle returned by VFS_MarshalHandle
+ * \return File descriptor, or -1 on error
+ */
+extern int     VFS_UnmarshalHandle(Uint64 Handle);
+
 /**
  * \brief Get file information from an open file
  * \param FD   File handle returned by ::VFS_Open

UCC git Repository :: git.ucc.asn.au