Project

General

Profile

Actions

Bug #780

closed

lockuninit()

Added by aoiko over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

It appears we don't have an uninit function for lockmgr locks. This means we
don't ever uninit the embedded spinlock (which does have a dummy
spin_uninit()) and this defeats the idea of providing spin_uninit(). There is
no purpose in having a dummy function that isn't used consistently; anybody
who wants to add debugging/verification code will be forced to go through
the source to add the missing calls or, worse yet, not even notice they are
missing.

I'm attaching a trivial (completely untested) lockuninit() implementation.
There are (grep tells me) 17 non-static uses of struct lock to check, so this
is only a first step, but I can't go through the tree changing things right
now.

Aggelos


Files

lockuninit.patch (1.77 KB) lockuninit.patch aoiko, 08/19/2007 06:11 PM
Actions #1

Updated by dillon over 16 years ago

:It appears we don't have an uninit function for lockmgr locks. This means we
:don't ever uninit the embedded spinlock (which does have a dummy
:spin_uninit()) and this defeats the idea of providing spin_uninit(). There is
:no purpose in having a dummy function that isn't used consistently; anybody
:who wants to add debugging/verification code will be forced to go through
:the source to add the missing calls or, worse yet, not even notice they are
:missing.
:
:I'm attaching a trivial (completely untested) lockuninit() implementation.
:There are (grep tells me) 17 non-static uses of struct lock to check, so this
:is only a first step, but I can't go through the tree changing things right
:now.
:
:Aggelos

I'll commit it so we have it.
I'm a bit on the fence as to whether we actually need the uninit
functions for lockmgr locks or spin locks. They might be useful for
debugging purposes but that's about it. Our lock use isn't as complex
as FreeBSD's.
-Matt
Actions #2

Updated by hasso over 16 years ago

Committed, so closing bug.

Actions

Also available in: Atom PDF