Project

General

Profile

Bug #780 ยป lockuninit.patch

aoiko, 08/19/2007 06:11 PM

View differences:

kern/kern_lock.c 19 Aug 2007 17:54:28 -0000
*
* @(#)kern_lock.c 8.18 (Berkeley) 5/21/95
* $FreeBSD: src/sys/kern/kern_lock.c,v 1.31.2.3 2001/12/25 01:44:44 dillon Exp $
* $DragonFly: src/sys/kern/kern_lock.c,v 1.25 2006-12-23 00:35:04 swildner Exp $
* $DragonFly: src/sys/kern/kern_lock.c,v 1.25 2006/12/23 00:35:04 swildner Exp $
*/
#include "opt_lint.h"
......
spin_unlock_wr(&lkp->lk_spinlock);
}
void
lockuninit(struct lock *l)
{
spin_lock_wr(&l->lk_spinlock);
KKASSERT(l->lk_waitcount == 0);
l->lk_wmesg = "BUG";
spin_uninit(&l->lk_spinlock);
}
/*
* Determine the status of a lock.
*/
sys/lock.h 19 Aug 2007 17:55:43 -0000
*
* @(#)lock.h 8.12 (Berkeley) 5/19/95
* $FreeBSD: src/sys/sys/lock.h,v 1.17.2.3 2001/12/25 01:44:44 dillon Exp $
* $DragonFly: src/sys/sys/lock.h,v 1.18 2006-08-11 01:55:00 dillon Exp $
* $DragonFly: src/sys/sys/lock.h,v 1.18 2006/08/11 01:55:00 dillon Exp $
*/
#ifndef _SYS_LOCK_H_
......
void lockinit (struct lock *, char *wmesg, int timo, int flags);
void lockreinit (struct lock *, char *wmesg, int timo, int flags);
void lockuninit(struct lock *);
#ifdef DEBUG_LOCKS
int debuglockmgr (struct lock *, u_int flags,
const char *,
    (1-1/1)