[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] mach-defpager: add function mig_reply_setup
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 4/5] mach-defpager: add function mig_reply_setup |
Date: |
Mon, 24 Feb 2014 22:47:16 -0500 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Mon 24 Feb 2014 15:41:55 +0100, a écrit :
> Currently, mig_reply_setup is not provided by libmachuser or the
> glibc. Provide it locally.
>
> * mach-defpager/default_pager.c (mig_reply_setup): New function.
Ack.
> ---
> mach-defpager/default_pager.c | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
> index 4d604fe..805e065 100644
> --- a/mach-defpager/default_pager.c
> +++ b/mach-defpager/default_pager.c
> @@ -3028,6 +3028,37 @@ extern void bootstrap_compat();
>
> mach_msg_size_t default_pager_msg_size_object = 128;
>
> +/* Fill in default response. */
> +static void
> +mig_reply_setup (
> + const mach_msg_header_t *in,
> + mach_msg_header_t *out)
> +{
> + static const mach_msg_type_t RetCodeType = {
> + /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
> + /* msgt_size = */ 32,
> + /* msgt_number = */ 1,
> + /* msgt_inline = */ TRUE,
> + /* msgt_longform = */ FALSE,
> + /* msgt_deallocate = */ FALSE,
> + /* msgt_unused = */ 0
> + };
> +
> +#define InP (in)
> +#define OutP ((mig_reply_header_t *) out)
> + OutP->Head.msgh_bits =
> + MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(InP->msgh_bits), 0);
> + OutP->Head.msgh_size = sizeof *OutP;
> + OutP->Head.msgh_remote_port = InP->msgh_remote_port;
> + OutP->Head.msgh_local_port = MACH_PORT_NULL;
> + OutP->Head.msgh_seqno = 0;
> + OutP->Head.msgh_id = InP->msgh_id + 100;
> + OutP->RetCodeType = RetCodeType;
> + OutP->RetCode = MIG_BAD_ID;
> +#undef InP
> +#undef OutP
> +}
> +
> boolean_t
> default_pager_demux_object(in, out)
> mach_msg_header_t *in;
> --
> 1.8.5.2
>
--
Samuel
/*
* [...] Note that 120 sec is defined in the protocol as the maximum
* possible RTT. I guess we'll have to use something other than TCP
* to talk to the University of Mars.
* PAWS allows us longer timeouts and large windows, so once implemented
* ftp to mars will work nicely.
*/
(from /usr/src/linux/net/inet/tcp.c, concerning RTT [retransmission timeout])
- [PATCH 1/5] utils/umount: do not remove passive translator records, Justus Winter, 2014/02/24
- [PATCH 3/5] mach-defpager: fix definition of seqnos_memory_object_data_unlock, Justus Winter, 2014/02/24
- [PATCH 2/5] libpager: improve the pager_demuxer function, Justus Winter, 2014/02/24
- [PATCH 4/5] mach-defpager: add function mig_reply_setup, Justus Winter, 2014/02/24
- Re: [PATCH 4/5] mach-defpager: add function mig_reply_setup,
Samuel Thibault <=
- [PATCH 5/5] mach-defpager: improve the default_pager_demux_object function, Justus Winter, 2014/02/24
- Re: [PATCH 1/5] utils/umount: do not remove passive translator records, Samuel Thibault, 2014/02/24