* libdiskfs/diskfs.h (diskfs_begin_using_protid_payload): New function. * libdiskfs/fsmutations.h: Add mutator. --- libdiskfs/diskfs.h | 9 +++++++++ libdiskfs/fsmutations.h | 2 ++ 2 files changed, 11 insertions(+)
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 22262aa..6bb42c9 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -794,6 +794,7 @@ 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 protid * diskfs_begin_using_protid_payload (unsigned long); extern void diskfs_end_using_protid_port (struct protid *cred); @@ -808,6 +809,14 @@ diskfs_begin_using_protid_port (file_t port) return ports_lookup_port (diskfs_port_bucket, port, diskfs_protid_class); } +DISKFS_EXTERN_INLINE struct protid * +diskfs_begin_using_protid_payload (unsigned long payload) +{ + return ports_lookup_payload (diskfs_port_bucket, + payload, + diskfs_protid_class); +} + /* 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. */ diff --git a/libdiskfs/fsmutations.h b/libdiskfs/fsmutations.h index 5026810..49755b7 100644 --- a/libdiskfs/fsmutations.h +++ b/libdiskfs/fsmutations.h @@ -18,9 +18,11 @@ /* Only CPP macro definitions should go in this file. */ #define FILE_INTRAN protid_t diskfs_begin_using_protid_port (file_t) +#define FILE_INTRAN_PAYLOAD protid_t diskfs_begin_using_protid_payload #define FILE_DESTRUCTOR diskfs_end_using_protid_port (protid_t) #define IO_INTRAN protid_t diskfs_begin_using_protid_port (io_t) +#define IO_INTRAN_PAYLOAD protid_t diskfs_begin_using_protid_payload #define IO_DESTRUCTOR diskfs_end_using_protid_port (protid_t) #define FILE_IMPORTS import "priv.h"; -- 1.7.10.4