summaryrefslogtreecommitdiff
path: root/libpod/lock/lock.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-08-10 13:46:07 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-01-04 09:51:09 -0500
commite73484c176839b2f2adf3d07cc09222a7b75bf69 (patch)
treeca5226c7c3247901bb3732e207fdc929e3432343 /libpod/lock/lock.go
parentf38fccb48c9acc2b7d55c1746c9e6dbde492cff5 (diff)
downloadpodman-e73484c176839b2f2adf3d07cc09222a7b75bf69.tar.gz
podman-e73484c176839b2f2adf3d07cc09222a7b75bf69.tar.bz2
podman-e73484c176839b2f2adf3d07cc09222a7b75bf69.zip
Move to POSIX mutexes for SHM locks
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/lock/lock.go')
-rw-r--r--libpod/lock/lock.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpod/lock/lock.go b/libpod/lock/lock.go
index 6d17828f6..5258c641f 100644
--- a/libpod/lock/lock.go
+++ b/libpod/lock/lock.go
@@ -23,7 +23,7 @@ type Manager interface {
// RetrieveLock retrieves a lock given its UUID.
// The underlying lock MUST be the same as another other lock with the
// same UUID.
- RetrieveLock(id string) (Locker, error)
+ RetrieveLock(id uint32) (Locker, error)
}
// Locker is similar to sync.Locker, but provides a method for freeing the lock
@@ -37,7 +37,7 @@ type Locker interface {
// ID is guaranteed to uniquely identify the lock within the
// Manager - that is, calling RetrieveLock with this ID will return
// another instance of the same lock.
- ID() string
+ ID() uint32
// Lock locks the lock.
// This call MUST block until it successfully acquires the lock or
// encounters a fatal error.
@@ -46,8 +46,8 @@ type Locker interface {
// A call to Unlock() on a lock that is already unlocked lock MUST
// error.
Unlock() error
- // Deallocate deallocates the underlying lock, allowing its reuse by
- // other pods and containers.
+ // Free deallocates the underlying lock, allowing its reuse by other
+ // pods and containers.
// The lock MUST still be usable after a Free() - some libpod instances
// may still retain Container structs with the old lock. This simply
// advises the manager that the lock may be reallocated.