From owner-svn-src-all@FreeBSD.ORG Sat Feb 12 20:58:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DFD51065672; Sat, 12 Feb 2011 20:58:59 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7306D8FC0A; Sat, 12 Feb 2011 20:58:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1CKwxrk014761; Sat, 12 Feb 2011 20:58:59 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1CKwxCi014757; Sat, 12 Feb 2011 20:58:59 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <201102122058.p1CKwxCi014757@svn.freebsd.org> From: Dmitry Chagin Date: Sat, 12 Feb 2011 20:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218621 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Feb 2011 20:58:59 -0000 Author: dchagin Date: Sat Feb 12 20:58:59 2011 New Revision: 218621 URL: http://svn.freebsd.org/changeset/base/218621 Log: Rename used_requeue and use it as bitwise field to store more flags. Reimplement used_requeue logic with LINUX_XDEPR_REQUEUEOP flag. Modified: head/sys/compat/linux/linux_emul.c head/sys/compat/linux/linux_emul.h head/sys/compat/linux/linux_futex.c Modified: head/sys/compat/linux/linux_emul.c ============================================================================== --- head/sys/compat/linux/linux_emul.c Sat Feb 12 20:42:53 2011 (r218620) +++ head/sys/compat/linux/linux_emul.c Sat Feb 12 20:58:59 2011 (r218621) @@ -87,7 +87,7 @@ linux_proc_init(struct thread *td, pid_t em = malloc(sizeof *em, M_LINUX, M_WAITOK | M_ZERO); em->pid = child; em->pdeath_signal = 0; - em->used_requeue = 0; + em->flags = 0; em->robust_futexes = NULL; if (flags & LINUX_CLONE_THREAD) { /* handled later in the code */ Modified: head/sys/compat/linux/linux_emul.h ============================================================================== --- head/sys/compat/linux/linux_emul.h Sat Feb 12 20:42:53 2011 (r218620) +++ head/sys/compat/linux/linux_emul.h Sat Feb 12 20:58:59 2011 (r218621) @@ -55,7 +55,7 @@ struct linux_emuldata { struct linux_emuldata_shared *shared; int pdeath_signal; /* parent death signal */ - int used_requeue; /* uses deprecated futex op */ + int flags; /* different emuldata flags */ struct linux_robust_list_head *robust_futexes; @@ -76,6 +76,10 @@ struct linux_emuldata *em_find(struct pr #define EMUL_DOLOCK 1 #define EMUL_DONTLOCK 0 +/* emuldata flags */ +#define LINUX_XDEPR_REQUEUEOP 0x00000001 /* uses deprecated + futex REQUEUE op*/ + int linux_proc_init(struct thread *, pid_t, int); void linux_proc_exit(void *, struct proc *); void linux_schedtail(void *, struct proc *); Modified: head/sys/compat/linux/linux_futex.c ============================================================================== --- head/sys/compat/linux/linux_futex.c Sat Feb 12 20:42:53 2011 (r218620) +++ head/sys/compat/linux/linux_futex.c Sat Feb 12 20:58:59 2011 (r218621) @@ -678,11 +678,11 @@ linux_sys_futex(struct thread *td, struc * FUTEX_REQUEUE returned EINVAL. */ em = em_find(td->td_proc, EMUL_DONTLOCK); - if (em->used_requeue == 0) { + if ((em->flags & LINUX_XDEPR_REQUEUEOP) == 0) { linux_msg(td, "linux_sys_futex: " "unsupported futex_requeue op\n"); - em->used_requeue = 1; + em->flags |= LINUX_XDEPR_REQUEUEOP; } return (EINVAL);