[CRIU] Re: [PATCH RFC] IPC: message queue stealing feature
introduced
Cyrill Gorcunov
gorcunov at openvz.org
Fri Feb 10 13:11:35 EST 2012
On Fri, Feb 10, 2012 at 09:33:45PM +0400, Stanislav Kinsbursky wrote:
> include/linux/msg.h | 8 ++++++++
> ipc/msg.c | 43 ++++++++++++++++++++++++++++++++++++++-----
> 2 files changed, 46 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/msg.h b/include/linux/msg.h
> index 6689e73..2bace1a 100644
> --- a/include/linux/msg.h
> +++ b/include/linux/msg.h
> @@ -11,6 +11,7 @@
> /* msgrcv options */
> #define MSG_NOERROR 010000 /* no error if message is too big */
> #define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/
> +#define MSG_STEAL 040000 /* copy (not remove) all queue messages */
If it's a copy, maybe MSG_COPY?
>
> /* Obsolete, used only for backwards compatibility and libc5 compiles */
> struct msqid_ds {
> @@ -38,6 +39,13 @@ struct msgbuf {
> char mtext[1]; /* message text */
> };
>
> +/* message buffer for msgrcv in case of array calls */
> +struct msgbuf_a {
> + long mtype; /* type of message */
> + size_t msize; /* size of message */
> + char mtext[0]; /* message text */
> +};
> +
I think no need for m prefix here, since it's bound to structure
and there is no many members in it.
struct msgbuf {
long type;
size_t size;
char data[0];
}
No?
Cyrill
More information about the CRIU
mailing list