zfs: add a lame emulation of cv_wait_sig(9) in userland to fix r353618
Not sure if we need anything better. Maybe we should try to port illumos libfakekernel or provide something similar natively. MFC after: 4 weeks X-MFC with: r353618
This commit is contained in:
parent
c67a6b9c7f
commit
ba2bbaffcf
@ -321,6 +321,18 @@ cv_wait(kcondvar_t *cv, kmutex_t *mp)
|
||||
mp->m_owner = curthread;
|
||||
}
|
||||
|
||||
/*
|
||||
* NB: this emulates FreeBSD cv_wait_sig(9), not the illumos one.
|
||||
* Meanings of the return code is different.
|
||||
* NB: this does not actually catch any siganls.
|
||||
*/
|
||||
int
|
||||
cv_wait_sig(kcondvar_t *cv, kmutex_t *mp)
|
||||
{
|
||||
cv_wait(cv, mp);
|
||||
return (0);
|
||||
}
|
||||
|
||||
clock_t
|
||||
cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime)
|
||||
{
|
||||
|
@ -330,6 +330,7 @@ typedef cond_t kcondvar_t;
|
||||
extern void cv_init(kcondvar_t *cv, char *name, int type, void *arg);
|
||||
extern void cv_destroy(kcondvar_t *cv);
|
||||
extern void cv_wait(kcondvar_t *cv, kmutex_t *mp);
|
||||
extern int cv_wait_sig(kcondvar_t *cv, kmutex_t *mp);
|
||||
extern clock_t cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime);
|
||||
extern clock_t cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim,
|
||||
hrtime_t res, int flag);
|
||||
|
Loading…
Reference in New Issue
Block a user