convert tsleep()->ltsleep(), which makes the kernel complain less

when compiled with LOCKDEBUG.
This commit is contained in:
oster 2000-09-21 01:45:46 +00:00
parent 014e17fbdc
commit 3ee0550572
3 changed files with 12 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_driver.c,v 1.37 2000/06/04 02:05:13 oster Exp $ */
/* $NetBSD: rf_driver.c,v 1.38 2000/09/21 01:45:46 oster Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@ -142,7 +142,8 @@ RF_DECLARE_MUTEX(rf_printf_mutex) /* debug only: avoids interleaved
#define SIGNAL_QUIESCENT_COND(_raid_) wakeup(&((_raid_)->accesses_suspended))
#define WAIT_FOR_QUIESCENCE(_raid_) \
tsleep(&((_raid_)->accesses_suspended),PRIBIO,"raidframe quiesce", 0);
ltsleep(&((_raid_)->accesses_suspended), PRIBIO, \
"raidframe quiesce", 0, &((_raid_)->access_suspend_mutex))
#define IO_BUF_ERR(bp, err) { \
bp->b_flags |= B_ERROR; \

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_mcpair.h,v 1.5 2000/09/11 02:23:14 oster Exp $ */
/* $NetBSD: rf_mcpair.h,v 1.6 2000/09/21 01:45:46 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -43,7 +43,7 @@ struct RF_MCPair_s {
RF_MCPair_t *next;
};
#define RF_WAIT_MCPAIR(_mcp) \
tsleep(&((_mcp)->cond), PRIBIO, "mcpair", 0)
ltsleep(&((_mcp)->cond), PRIBIO, "mcpair", 0, &((_mcp)->mutex))
int rf_ConfigureMCPair(RF_ShutdownList_t ** listp);
RF_MCPair_t *rf_AllocMCPair(void);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_revent.c,v 1.8 2000/09/11 00:22:45 oster Exp $ */
/* $NetBSD: rf_revent.c,v 1.9 2000/09/21 01:45:46 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -50,7 +50,8 @@ static RF_FreeList_t *rf_revent_freelist;
#include <sys/kernel.h>
#define DO_WAIT(_rc) \
tsleep(&(_rc)->eventQueue, PRIBIO, "raidframe eventq", 0)
ltsleep(&(_rc)->eventQueue, PRIBIO, "raidframe eventq", \
0, &((_rc)->eq_mutex))
#define DO_SIGNAL(_rc) wakeup(&(_rc)->eventQueue)
@ -141,8 +142,10 @@ rf_GetNextReconEvent(reconDesc, row, continueFunc, continueArg)
#if RF_RECON_STATS > 0
reconDesc->numReconExecDelays++;
#endif /* RF_RECON_STATS > 0 */
status = tsleep(&reconDesc->reconExecTicks,
PRIBIO, "recon delay", RECON_TIMO);
status = ltsleep(&reconDesc->reconExecTicks, PRIBIO,
"recon delay", RECON_TIMO,
&rctrl->eq_mutex);
RF_ASSERT(status == EWOULDBLOCK);
reconDesc->reconExecTicks = 0;
}