[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/5] include: add msgh_protected_payload to mach_msg_header_t
From: |
Justus Winter |
Subject: |
[PATCH 3/5] include: add msgh_protected_payload to mach_msg_header_t |
Date: |
Fri, 21 Feb 2014 17:49:26 +0100 |
* include/mach/message.h (mach_msg_header_t): Add
msgh_protected_payload as a union with msgh_local_port.
* doc/mach.texi (Message Format): Document msgh_protected_payload.
---
doc/mach.texi | 9 +++++++++
include/mach/message.h | 5 ++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/doc/mach.texi b/doc/mach.texi
index 766cd48..6a376f7 100644
--- a/doc/mach.texi
+++ b/doc/mach.texi
@@ -1330,6 +1330,15 @@ which is conventionally used as a reply port by the
recipient of the
message. The field must carry a send right, a send-once right,
@code{MACH_PORT_NULL}, or @code{MACH_PORT_DEAD}.
+@item mach_port_t msgh_protected_payload
+The @code{msgh_protected_payload} field carries a payload that is set
+by the kernel during message delivery. The payload is an opaque
+identifier that can be used by the receiver to lookup the associated
+data structure.
+
+It is only valid in received messages. See @ref{Message Receive} for
+further information.
+
@item mach_port_seqno_t msgh_seqno
The @code{msgh_seqno} field provides a sequence number for the message.
It is only valid in received messages; its value in sent messages is
diff --git a/include/mach/message.h b/include/mach/message.h
index f78e978..7464a57 100644
--- a/include/mach/message.h
+++ b/include/mach/message.h
@@ -136,7 +136,10 @@ typedef struct {
mach_msg_bits_t msgh_bits;
mach_msg_size_t msgh_size;
mach_port_t msgh_remote_port;
- mach_port_t msgh_local_port;
+ union {
+ mach_port_t msgh_local_port;
+ unsigned long msgh_protected_payload;
+ };
mach_port_seqno_t msgh_seqno;
mach_msg_id_t msgh_id;
} mach_msg_header_t;
--
1.8.5.2
- [PATCH 1/5] ipc: add protected payload, Justus Winter, 2014/02/21
- [PATCH 2/5] ipc: implement mach_port_{set,clear}_protected_payload, Justus Winter, 2014/02/21
- [PATCH 3/5] include: add msgh_protected_payload to mach_msg_header_t, Justus Winter, 2014/02/21
- [PATCH 4/5] include: define MACH_MSG_TYPE_PROTECTED_PAYLOAD, Justus Winter, 2014/02/21
- [PATCH 5/5] ipc: provide the protected payload in ipc_kmsg_copyout_header, Justus Winter, 2014/02/21
- Re: [PATCH 1/5] ipc: add protected payload, Richard Braun, 2014/02/21
- [PATCH 1/5] ipc: add protected payload, Justus Winter, 2014/02/21
- [PATCH 2/5] ipc: implement mach_port_{set,clear}_protected_payload, Justus Winter, 2014/02/21
- [PATCH 3/5] include: add msgh_protected_payload to mach_msg_header_t,
Justus Winter <=
- [PATCH 4/5] include: define MACH_MSG_TYPE_PROTECTED_PAYLOAD, Justus Winter, 2014/02/21
- [PATCH 5/5] ipc: provide the protected payload in ipc_kmsg_copyout_header, Justus Winter, 2014/02/21
- Re: [PATCH 5/5] ipc: provide the protected payload in ipc_kmsg_copyout_header, Samuel Thibault, 2014/02/22
- Re: [PATCH 1/5] ipc: add protected payload, Richard Braun, 2014/02/21