Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759232AbZCYQYp (ORCPT ); Wed, 25 Mar 2009 12:24:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755308AbZCYQYg (ORCPT ); Wed, 25 Mar 2009 12:24:36 -0400 Received: from x35.xmailserver.org ([64.71.152.41]:34161 "EHLO x35.xmailserver.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752879AbZCYQYg (ORCPT ); Wed, 25 Mar 2009 12:24:36 -0400 X-AuthUser: davidel@xmailserver.org Date: Wed, 25 Mar 2009 09:23:21 -0700 (PDT) From: Davide Libenzi X-X-Sender: davide@makko.or.mcafeemobile.com To: nicolas sitbon cc: linux-kernel@vger.kernel.org Subject: Re: epoll_ctl and const correctness In-Reply-To: <84a01a8b0903250545n799a8727o1faad60c8eaf372e@mail.gmail.com> Message-ID: References: <84a01a8b0903250545n799a8727o1faad60c8eaf372e@mail.gmail.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) X-GPG-FINGRPRINT: CFAE 5BEE FD36 F65E E640 56FE 0974 BF23 270F 474E X-GPG-PUBLIC_KEY: http://www.xmailserver.org/davidel.asc MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 821 Lines: 24 On Wed, 25 Mar 2009, nicolas sitbon wrote: > Currently, the prototype of epoll_ctl is : > > int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event); > > I searched in the man of epoll_ctl and google, and it seems that the > structure pointed to by event isn't modify, valgrind confirms this > behaviour, so am I wrong? or the good prototype is > > int epoll_ctl(int epfd, int op, int fd, struct epoll_event const *event); According to the current ctl operations, yes. But doing that would prevent other non-const operations to be added later on. - Davide -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/