/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*/
/*
* rwlock(9f)
*/
/* This is the API we're emulating */
/* avoiding synch.h */
int rwlock_init(lwp_rwlock_t *, int, void *);
int rwlock_destroy(lwp_rwlock_t *);
int rw_rdlock(lwp_rwlock_t *);
int rw_wrlock(lwp_rwlock_t *);
int rw_unlock(lwp_rwlock_t *);
int rw_tryrdlock(lwp_rwlock_t *);
int rw_trywrlock(lwp_rwlock_t *);
int _rw_read_held(void *);
int _rw_write_held(void *);
/*ARGSUSED*/
void
{
}
void
{
}
void
{
int rc;
} else {
}
}
void
{
}
}
int
{
int rv;
if (rv == 0)
} else
return ((rv == 0) ? 1 : 0);
}
/*ARGSUSED*/
int
{
return (0);
}
void
{
}
int
{
return (_rw_read_held(rwlp));
}
int
{
return (_rw_write_held(rwlp));
}
int
{
}
/*
* Return the kthread_t * of the lock owner
*/
void *
{
}