Date: Thu, 4 Jan 2007 22:31:02 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 112498 for review Message-ID: <200701042231.l04MV2cb044628@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112498 Change 112498 by rdivacky@rdivacky_witten on 2007/01/04 22:30:33 Change names of the locking flags to EMUL_DOLOCK and EMUL_DONTLOC to be less confusing. Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#17 edit .. //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#18 edit .. //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.h#7 edit .. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#49 edit .. //depot/projects/linuxolator/src/sys/compat/linux/linux_signal.c#8 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#13 edit Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#17 (text+ko) ==== @@ -581,7 +581,7 @@ /* create the emuldata */ error = linux_proc_init(td, p2->p_pid, args->flags); /* reference it - no need to check this */ - em = em_find(p2, EMUL_UNLOCKED); + em = em_find(p2, EMUL_DOLOCK); KASSERT(em != NULL, ("clone: emuldata not found.\n")); /* and adjust it */ if (args->flags & CLONE_PARENT_SETTID) { ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#18 (text+ko) ==== @@ -63,12 +63,12 @@ { 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ && 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 @@ retry: /* find the emuldata */ - em = em_find(p, EMUL_UNLOCKED); + em = em_find(p, EMUL_DOLOCK); if (em == NULL) { /* @@ -315,7 +315,7 @@ #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")); ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.h#7 (text+ko) ==== @@ -66,8 +66,8 @@ #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 *); ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#49 (text+ko) ==== @@ -1448,7 +1448,7 @@ #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); @@ -1490,7 +1490,7 @@ 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")); @@ -1512,7 +1512,7 @@ /* 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; @@ -1619,7 +1619,7 @@ #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")); @@ -1667,13 +1667,13 @@ 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, ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_signal.c#8 (text+ko) ==== @@ -561,7 +561,7 @@ PROC_UNLOCK(p); - em = em_find(p, EMUL_UNLOCKED); + em = em_find(p, EMUL_DOLOCK); if (em == NULL) { #ifdef DEBUG ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#13 (text+ko) ==== @@ -408,7 +408,7 @@ /* create the emuldata */ error = linux_proc_init(td, p2->p_pid, args->flags); /* reference it - no need to check this */ - em = em_find(p2, EMUL_UNLOCKED); + em = em_find(p2, EMUL_DOLOCK); KASSERT(em != NULL, ("clone: emuldata not found.\n")); /* and adjust it */ if (args->flags & CLONE_PARENT_SETTID) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701042231.l04MV2cb044628>