svn commit: r219196 - stable/8/sys/compat/linux
Dmitry Chagin
dchagin at FreeBSD.org
Wed Mar 2 19:41:10 UTC 2011
Author: dchagin
Date: Wed Mar 2 19:41:09 2011
New Revision: 219196
URL: http://svn.freebsd.org/changeset/base/219196
Log:
MFC r218621:
Rename used_requeue and use it as bitwise field to store more flags.
Reimplement used_requeue logic with LINUX_XDEPR_REQUEUEOP flag.
Modified:
stable/8/sys/compat/linux/linux_emul.c
stable/8/sys/compat/linux/linux_emul.h
stable/8/sys/compat/linux/linux_futex.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/compat/linux/linux_emul.c
==============================================================================
--- stable/8/sys/compat/linux/linux_emul.c Wed Mar 2 19:39:42 2011 (r219195)
+++ stable/8/sys/compat/linux/linux_emul.c Wed Mar 2 19:41:09 2011 (r219196)
@@ -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: stable/8/sys/compat/linux/linux_emul.h
==============================================================================
--- stable/8/sys/compat/linux/linux_emul.h Wed Mar 2 19:39:42 2011 (r219195)
+++ stable/8/sys/compat/linux/linux_emul.h Wed Mar 2 19:41:09 2011 (r219196)
@@ -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: stable/8/sys/compat/linux/linux_futex.c
==============================================================================
--- stable/8/sys/compat/linux/linux_futex.c Wed Mar 2 19:39:42 2011 (r219195)
+++ stable/8/sys/compat/linux/linux_futex.c Wed Mar 2 19:41:09 2011 (r219196)
@@ -691,11 +691,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);
More information about the svn-src-stable-8
mailing list