diff options
author | netchild <netchild@FreeBSD.org> | 2007-01-07 19:00:38 +0000 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2007-01-07 19:00:38 +0000 |
commit | 977ef4a8bc07aa2c92b23e4bb7186faa23962c01 (patch) | |
tree | 2e7e3c97c0aff026ed87ffff86d825e74404ebfe /sys/compat | |
parent | dbeee4cdb70c4f3e6ed86a2e3c135873e756084c (diff) | |
download | FreeBSD-src-977ef4a8bc07aa2c92b23e4bb7186faa23962c01.zip FreeBSD-src-977ef4a8bc07aa2c92b23e4bb7186faa23962c01.tar.gz |
MFp4 (112498):
Rename the locking flags to EMUL_DOLOCK and EMUL_DONTLOCK to prevent confusion.
Submitted by: rdivacky
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_emul.c | 18 | ||||
-rw-r--r-- | sys/compat/linux/linux_emul.h | 4 | ||||
-rw-r--r-- | sys/compat/linux/linux_misc.c | 12 | ||||
-rw-r--r-- | sys/compat/linux/linux_signal.c | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c index 0240094..4083f53 100644 --- a/sys/compat/linux/linux_emul.c +++ b/sys/compat/linux/linux_emul.c @@ -63,12 +63,12 @@ em_find(struct proc *p, int locked) { struct linux_emuldata *em; - if (locked == EMUL_UNLOCKED) + if (locked == EMUL_DOLOCK) EMUL_LOCK(&emul_lock); em = p->p_emuldata; - if (em == NULL && locked == EMUL_UNLOCKED) + if (em == NULL && locked == EMUL_DOLOCK) EMUL_UNLOCK(&emul_lock); return (em); @@ -104,7 +104,7 @@ linux_proc_init(struct thread *td, pid_t child, int flags) EMUL_LOCK(&emul_lock); } else { /* lookup the old one */ - em = em_find(td->td_proc, EMUL_UNLOCKED); + em = em_find(td->td_proc, EMUL_DOLOCK); KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); } @@ -119,7 +119,7 @@ linux_proc_init(struct thread *td, pid_t child, int flags) if (child != 0) { if (flags & CLONE_THREAD) { /* lookup the parent */ - p_em = em_find(td->td_proc, EMUL_LOCKED); + p_em = em_find(td->td_proc, EMUL_DONTLOCK); KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_THREAD\n")); em->shared = p_em->shared; em->shared->refs++; @@ -159,7 +159,7 @@ linux_proc_exit(void *arg __unused, struct proc *p) return; /* find the emuldata */ - em = em_find(p, EMUL_UNLOCKED); + em = em_find(p, EMUL_DOLOCK); KASSERT(em != NULL, ("proc_exit: emuldata not found.\n")); @@ -217,7 +217,7 @@ linux_proc_exit(void *arg __unused, struct proc *p) continue; if (__predict_false(q->p_sysent != &elf_linux_sysvec)) continue; - em = em_find(q, EMUL_UNLOCKED); + em = em_find(q, EMUL_DOLOCK); KASSERT(em != NULL, ("linux_reparent: emuldata not found: %i\n", q->p_pid)); if (em->pdeath_signal != 0) { PROC_LOCK(q); @@ -244,7 +244,7 @@ linux_proc_exec(void *arg __unused, struct proc *p, struct image_params *imgp) && p->p_sysent == &elf_linux_sysvec)) { struct linux_emuldata *em; - em = em_find(p, EMUL_UNLOCKED); + em = em_find(p, EMUL_DOLOCK); KASSERT(em != NULL, ("proc_exec: emuldata not found.\n")); @@ -280,7 +280,7 @@ linux_schedtail(void *arg __unused, struct proc *p) retry: /* find the emuldata */ - em = em_find(p, EMUL_UNLOCKED); + em = em_find(p, EMUL_DOLOCK); if (em == NULL) { /* @@ -315,7 +315,7 @@ linux_set_tid_address(struct thread *td, struct linux_set_tid_address_args *args #endif /* find the emuldata */ - em = em_find(td->td_proc, EMUL_UNLOCKED); + em = em_find(td->td_proc, EMUL_DOLOCK); KASSERT(em != NULL, ("set_tid_address: emuldata not found.\n")); diff --git a/sys/compat/linux/linux_emul.h b/sys/compat/linux/linux_emul.h index 2f9fc98..d1e82eb 100644 --- a/sys/compat/linux/linux_emul.h +++ b/sys/compat/linux/linux_emul.h @@ -66,8 +66,8 @@ struct linux_emuldata *em_find(struct proc *, int locked); #define EMUL_SHARED_WUNLOCK(l) sx_xunlock(l) /* for em_find use */ -#define EMUL_LOCKED 1 -#define EMUL_UNLOCKED 0 +#define EMUL_DOLOCK 1 +#define EMUL_DONTLOCK 0 int linux_proc_init(struct thread *, pid_t, int); void linux_proc_exit(void *, struct proc *); diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index e137e6b..ff08e67 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1439,7 +1439,7 @@ linux_getpid(struct thread *td, struct linux_getpid_args *args) #endif if (linux_use26(td)) { - em = em_find(td->td_proc, EMUL_UNLOCKED); + em = em_find(td->td_proc, EMUL_DOLOCK); KASSERT(em != NULL, ("getpid: emuldata not found.\n")); td->td_retval[0] = em->shared->group_pid; EMUL_UNLOCK(&emul_lock); @@ -1481,7 +1481,7 @@ linux_getppid(struct thread *td, struct linux_getppid_args *args) return (0); } - em = em_find(td->td_proc, EMUL_UNLOCKED); + em = em_find(td->td_proc, EMUL_DOLOCK); KASSERT(em != NULL, ("getppid: process emuldata not found.\n")); @@ -1501,7 +1501,7 @@ linux_getppid(struct thread *td, struct linux_getppid_args *args) /* if its also linux process */ if (pp->p_sysent == &elf_linux_sysvec) { - em = em_find(pp, EMUL_LOCKED); + em = em_find(pp, EMUL_DONTLOCK); KASSERT(em != NULL, ("getppid: parent emuldata not found.\n")); td->td_retval[0] = em->shared->group_pid; @@ -1608,7 +1608,7 @@ linux_exit_group(struct thread *td, struct linux_exit_group_args *args) #endif if (linux_use26(td)) { - td_em = em_find(td->td_proc, EMUL_UNLOCKED); + td_em = em_find(td->td_proc, EMUL_DOLOCK); KASSERT(td_em != NULL, ("exit_group: emuldata not found.\n")); @@ -1656,13 +1656,13 @@ linux_prctl(struct thread *td, struct linux_prctl_args *args) case LINUX_PR_SET_PDEATHSIG: if (!LINUX_SIG_VALID(args->arg2)) return (EINVAL); - em = em_find(p, EMUL_UNLOCKED); + em = em_find(p, EMUL_DOLOCK); KASSERT(em != NULL, ("prctl: emuldata not found.\n")); em->pdeath_signal = args->arg2; EMUL_UNLOCK(&emul_lock); break; case LINUX_PR_GET_PDEATHSIG: - em = em_find(p, EMUL_UNLOCKED); + em = em_find(p, EMUL_DOLOCK); KASSERT(em != NULL, ("prctl: emuldata not found.\n")); error = copyout(&em->pdeath_signal, (void *)(register_t)args->arg2, diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 7a6c9e6..c9904a8 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -561,7 +561,7 @@ linux_tgkill(struct thread *td, struct linux_tgkill_args *args) PROC_UNLOCK(p); - em = em_find(p, EMUL_UNLOCKED); + em = em_find(p, EMUL_DOLOCK); if (em == NULL) { #ifdef DEBUG |