diff options
-rw-r--r-- | sys/amd64/linux32/linux.h | 11 | ||||
-rw-r--r-- | sys/compat/linux/linux_futex.c | 6 | ||||
-rw-r--r-- | sys/compat/linux/linux_futex.h | 12 | ||||
-rw-r--r-- | sys/i386/linux/linux.h | 11 |
4 files changed, 25 insertions, 15 deletions
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 918f7ef..0acdd68 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -880,4 +880,15 @@ typedef int l_mqd_t; (LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES | \ LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD) +/* robust futexes */ +struct linux_robust_list { + l_uintptr_t next; +}; + +struct linux_robust_list_head { + struct linux_robust_list list; + l_ulong futex_offset; + l_uintptr_t pending_list; +}; + #endif /* !_AMD64_LINUX_H_ */ diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 043962e..c279276 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -661,17 +661,17 @@ release_futexes(struct proc *p) if (head == NULL) return; - if (fetch_robust_entry(&entry, &head->list.next, &pi)) + if (fetch_robust_entry(&entry, PTRIN(&head->list.next), &pi)) return; if (copyin(&head->futex_offset, &futex_offset, sizeof(l_ulong))) return; - if (fetch_robust_entry(&pending, &head->pending_list, &pip)) + if (fetch_robust_entry(&pending, PTRIN(&head->pending_list), &pip)) return; while (entry != &head->list) { - rc = fetch_robust_entry(&next_entry, &entry->next, &next_pi); + rc = fetch_robust_entry(&next_entry, PTRIN(&entry->next), &next_pi); if (entry != pending) if (handle_futex_death((char *)entry + futex_offset, diff --git a/sys/compat/linux/linux_futex.h b/sys/compat/linux/linux_futex.h index 0f7a393..d658925 100644 --- a/sys/compat/linux/linux_futex.h +++ b/sys/compat/linux/linux_futex.h @@ -63,18 +63,6 @@ #define FUTEX_OP_CMP_GT 4 /* if (oldval > CMPARG) wake */ #define FUTEX_OP_CMP_GE 5 /* if (oldval >= CMPARG) wake */ -/* This is defined by Linux user-space */ - -struct linux_robust_list { - struct linux_robust_list *next; -}; - -struct linux_robust_list_head { - struct linux_robust_list list; - l_ulong futex_offset; - struct linux_robust_list *pending_list; -}; - #define FUTEX_WAITERS 0x80000000 #define FUTEX_OWNER_DIED 0x40000000 #define FUTEX_TID_MASK 0x3fffffff diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 4d556c6..4f2dbe9 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -845,4 +845,15 @@ typedef int l_mqd_t; (LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES | \ LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD) +/* robust futexes */ +struct linux_robust_list { + struct linux_robust_list *next; +}; + +struct linux_robust_list_head { + struct linux_robust_list list; + l_ulong futex_offset; + struct linux_robust_list *pending_list; +}; + #endif /* !_I386_LINUX_H_ */ |