[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH hurd 07/30] libnetfs: add a payload-aware intrans function
From: |
Justus Winter |
Subject: |
[PATCH hurd 07/30] libnetfs: add a payload-aware intrans function |
Date: |
Thu, 27 Nov 2014 14:18:47 +0100 |
* libnetfs/priv.h (begin_using_protid_payload): New function.
* libnetfs/mutations.h: Add mutator.
---
libnetfs/mutations.h | 3 +++
libnetfs/priv.h | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/libnetfs/mutations.h b/libnetfs/mutations.h
index e60a220..088d8a0 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 ba31080..36c8f53 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)
{
--
2.1.3
- [PATCH hurd 21/30] trans/fakeroot: make the demuxer payload-aware, (continued)
- [PATCH hurd 21/30] trans/fakeroot: make the demuxer payload-aware, Justus Winter, 2014/11/27
- [PATCH hurd 22/30] trans/ifsock: add a payload-aware intrans function, Justus Winter, 2014/11/27
- [PATCH hurd 20/30] term: add a payload-aware intrans function, Justus Winter, 2014/11/27
- [PATCH hurd 24/30] trans/streamio: make the translator payload-aware, Justus Winter, 2014/11/27
- [PATCH hurd 29/30] libports: Fix build, Justus Winter, 2014/11/27
- [PATCH hurd 25/30] trans/symlink: disable default payload to port mapping, Justus Winter, 2014/11/27
- [PATCH hurd 27/30] hurd: add intranpayload functions to all hurd types, Justus Winter, 2014/11/27
- [PATCH hurd 26/30] utils/rpctrace: make `trace_and_forward' payload-aware, Justus Winter, 2014/11/27
- [PATCH hurd 30/30] mach-defpager: fix build, Justus Winter, 2014/11/27
- [PATCH hurd 28/30] libports: use protected payloads to optimize the object lookup, Justus Winter, 2014/11/27
- [PATCH hurd 07/30] libnetfs: add a payload-aware intrans function,
Justus Winter <=
- Re: [PATCH hurd 01/30] proc: fix NULL dereference, Samuel Thibault, 2014/11/27
- [PATCH hurd-dde 1/4] devnode: add a payload-aware intrans function, Justus Winter, 2014/11/27