Add initial version of renumber backend

Renumber is a way of renumbering container locks after the number
of locks available has changed.

For now, renumber only works with containers.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2019-02-14 17:25:58 -05:00
parent 84feff2e06
commit 7fdd20ae5a
9 changed files with 150 additions and 7 deletions

View File

@ -71,6 +71,11 @@ func (m *SHMLockManager) RetrieveLock(id uint32) (Locker, error) {
return lock, nil
}
// FreeAllLocks frees all locks in the manager
func (m *SHMLockManager) FreeAllLocks() error {
return m.locks.DeallocateAllSemaphores()
}
// SHMLock is an individual shared memory lock.
type SHMLock struct {
lockID uint32