qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [linux-user] Added posix message queue syscalls except


From: Riku Voipio
Subject: Re: [Qemu-devel] [linux-user] Added posix message queue syscalls except mq_notify
Date: Mon, 12 Jan 2009 14:12:35 +0200
User-agent: Mutt/1.5.11+cvs20060126

On Mon, Dec 15, 2008 at 10:01:41PM +0100, Lionel Landwerlin wrote:
> +    case TARGET_NR_mq_getsetattr:
> +    {
> +        struct mq_attr posix_mq_attr_in, posix_mq_attr_out;

ret = 0;

> +
> +        if (arg3 != 0) {
> +            ret = mq_getattr(arg1, &posix_mq_attr_out);
> +            copy_to_user_mq_attr(arg3, &posix_mq_attr_out);
> +        }
> +        if (arg2 != 0) {
> +            copy_from_user_mq_attr(&posix_mq_attr_in, arg2);
> +            ret |= mq_setattr(arg1, &posix_mq_attr_in, &posix_mq_attr_out);
> +        }
> +
> +        break;

mq_getsetattr might end up called without both arg3 and arg2. Other than
that, looks good to me.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]