summaryrefslogtreecommitdiff
path: root/libdiskfs/diskfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs/diskfs.h')
-rw-r--r--libdiskfs/diskfs.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index db6a1d84..359b11b8 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -121,6 +121,11 @@ struct node
int author_tracks_uid;
};
+struct diskfs_control
+{
+ struct port_info pi;
+};
+
/* Possibly lookup types for diskfs_lookup call */
enum lookup_type
{
@@ -795,8 +800,10 @@ error_t diskfs_start_protid (struct peropen *po, struct protid **cred);
void diskfs_finish_protid (struct protid *cred, struct iouser *user);
extern struct protid * diskfs_begin_using_protid_port (file_t port);
+extern struct diskfs_control * diskfs_begin_using_control_port (fsys_t port);
extern void diskfs_end_using_protid_port (struct protid *cred);
+extern void diskfs_end_using_control_port (struct diskfs_control *cred);
#if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE)
@@ -809,6 +816,13 @@ diskfs_begin_using_protid_port (file_t port)
return ports_lookup_port (diskfs_port_bucket, port, diskfs_protid_class);
}
+/* And for the fsys interface. */
+DISKFS_EXTERN_INLINE struct diskfs_control *
+diskfs_begin_using_control_port (fsys_t port)
+{
+ return ports_lookup_port (diskfs_port_bucket, port, NULL);
+}
+
/* Called by MiG after server routines have been run; this
balances begin_using_protid_port, and is arranged for the io
and fs interfaces by fsmutations.h. */
@@ -819,6 +833,14 @@ diskfs_end_using_protid_port (struct protid *cred)
ports_port_deref (cred);
}
+/* And for the fsys interface. */
+DISKFS_EXTERN_INLINE void
+diskfs_end_using_control_port (struct diskfs_control *cred)
+{
+ if (cred)
+ ports_port_deref (cred);
+}
+
#endif /* Use extern inlines. */
/* Called when a protid CRED has no more references. (Because references\