Re: libzpool assert vs libc assert

From: Andriy Gapon <avg_at_freebsd.org>
Date: Tue, 02 Jun 2009 17:14:16 +0300
on 02/06/2009 17:06 Andriy Gapon said the following:
> So I am quite sure that mutex_owned should be defined as follows:
> #define  mutex_owned(l)          pthread_mutex_isowned_np((l)->m_lock)

Actually:
#define  mutex_owned(l)          pthread_mutex_isowned_np(&(l)->m_lock)

And on dangers of ignored compiler warnings:
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c:606:
warning: passing argument 6 of 'dmu_buf_hold_array' discards qualifiers from
pointer target type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:264:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:267:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:270:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c:606:
warning: passing argument 6 of 'dmu_buf_hold_array' discards qualifiers from
pointer target type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:264:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:267:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type
/usr/src-head/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c:270:
warning: passing argument 1 of 'pthread_mutex_isowned_np' from incompatible
pointer type

This is during libzpool compilation.

-- 
Andriy Gapon
Received on Tue Jun 02 2009 - 12:14:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:49 UTC