This is a functional change, because MPASS (via KASSERT) is only
enabled on DEBUG kernels.  Ideally we would have a kind of ASSERT that
worked on NODEBUG kernels.

Best,
Conrad

On Sat, Nov 4, 2017 at 3:49 AM, Konstantin Belousov <[email protected]> wrote:
> Author: kib
> Date: Sat Nov  4 10:49:34 2017
> New Revision: 325386
> URL: https://svnweb.freebsd.org/changeset/base/325386
>
> Log:
>   Convert explicit panic() call to assert.
>
>   Based on github pull request: #113
>   Submitted by: pmarillo@github
>   MFC after:    1 week
>
> Modified:
>   head/sys/kern/kern_umtx.c
>
> Modified: head/sys/kern/kern_umtx.c
> ==============================================================================
> --- head/sys/kern/kern_umtx.c   Sat Nov  4 10:10:34 2017        (r325385)
> +++ head/sys/kern/kern_umtx.c   Sat Nov  4 10:49:34 2017        (r325386)
> @@ -1579,8 +1579,7 @@ umtx_pi_setowner(struct umtx_pi *pi, struct thread *ow
>
>         uq_owner = owner->td_umtxq;
>         mtx_assert(&umtx_lock, MA_OWNED);
> -       if (pi->pi_owner != NULL)
> -               panic("pi_owner != NULL");
> +       MPASS(pi->pi_owner == NULL);
>         pi->pi_owner = owner;
>         TAILQ_INSERT_TAIL(&uq_owner->uq_pi_contested, pi, pi_link);
>  }
>
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to