fmd_subr.h revision d9638e547d8811f2c689977f8dd2a353938b61fd
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _FMD_SUBR_H
#define _FMD_SUBR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <pthread.h>
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
extern int fmd_rw_read_held(pthread_rwlock_t *);
extern int fmd_rw_write_held(pthread_rwlock_t *);
extern int fmd_mutex_held(pthread_mutex_t *);
#define RW_READ_HELD(x) fmd_rw_read_held(x)
#define RW_WRITE_HELD(x) fmd_rw_write_held(x)
#define MUTEX_HELD(x) fmd_mutex_held(x)
#ifdef DEBUG
extern int fmd_assert(const char *, const char *, int);
#else
#define ASSERT(x)
#endif
extern void fmd_vpanic(const char *, va_list);
extern void fmd_panic(const char *, ...);
extern void fmd_verror(int, const char *, va_list);
extern void fmd_error(int, const char *, ...);
extern void fmd_vdprintf(int, const char *, va_list);
extern void fmd_dprintf(int, const char *, ...);
extern void fmd_trace_cpp(void *, const char *, int);
#ifdef DEBUG
#else
#endif
extern const char *fmd_ea_strerror(int);
#ifdef __cplusplus
}
#endif
#endif /* _FMD_SUBR_H */