diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-11-28 10:45:44 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-12-07 15:38:18 +0100 |
commit | 66bfd16b75e8731a3b03a99e931e100b00c0d266 (patch) | |
tree | 028d78067a192b4a572944c1e1b798635e076066 /libnetfs | |
parent | a226c74609b12cac905d06ec97a077bb2633e8a8 (diff) |
libnetfs: add a payload-aware intrans function
* libnetfs/priv.h (begin_using_protid_payload): New function.
* libnetfs/mutations.h: Add mutator.
Diffstat (limited to 'libnetfs')
-rw-r--r-- | libnetfs/mutations.h | 3 | ||||
-rw-r--r-- | libnetfs/priv.h | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libnetfs/mutations.h b/libnetfs/mutations.h index e60a2208..088d8a06 100644 --- a/libnetfs/mutations.h +++ b/libnetfs/mutations.h @@ -23,12 +23,15 @@ #define IO_SELECT_REPLY_PORT #define FILE_INTRAN protid_t begin_using_protid_port (file_t) +#define FILE_INTRAN_PAYLOAD protid_t begin_using_protid_payload #define FILE_DESTRUCTOR end_using_protid_port (protid_t) #define IO_INTRAN protid_t begin_using_protid_port (io_t) +#define IO_INTRAN_PAYLOAD protid_t begin_using_protid_payload #define IO_DESTRUCTOR end_using_protid_port (protid_t) #define FSYS_INTRAN control_t begin_using_control_port (fsys_t) +#define FSYS_INTRAN_PAYLOAD control_t begin_using_control_payload #define FSYS_DESTRUCTOR end_using_control_port (control_t) #define FILE_IMPORTS import "libnetfs/netfs.h"; import "libnetfs/priv.h"; diff --git a/libnetfs/priv.h b/libnetfs/priv.h index ba310802..36c8f536 100644 --- a/libnetfs/priv.h +++ b/libnetfs/priv.h @@ -44,6 +44,12 @@ begin_using_control_port (fsys_t port) return ports_lookup_port (netfs_port_bucket, port, netfs_control_class); } +static inline struct netfs_control * __attribute__ ((unused)) +begin_using_control_payload (unsigned long payload) +{ + return ports_lookup_payload (netfs_port_bucket, payload, netfs_control_class); +} + static inline void __attribute__ ((unused)) end_using_control_port (struct netfs_control *cred) { |