diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-08-23 13:48:07 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-01-04 09:51:09 -0500 |
commit | a364b656eaef1be5329abfd02d3fcd2dbcd37d64 (patch) | |
tree | 454478de97e3d1831b6b64acdeaeafac9b9052e7 /libpod/lock/shm/shm_lock.go | |
parent | e73484c176839b2f2adf3d07cc09222a7b75bf69 (diff) | |
download | podman-a364b656eaef1be5329abfd02d3fcd2dbcd37d64.tar.gz podman-a364b656eaef1be5329abfd02d3fcd2dbcd37d64.tar.bz2 podman-a364b656eaef1be5329abfd02d3fcd2dbcd37d64.zip |
Add lock manager to libpod runtime
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/lock/shm/shm_lock.go')
-rw-r--r-- | libpod/lock/shm/shm_lock.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libpod/lock/shm/shm_lock.go b/libpod/lock/shm/shm_lock.go index 16d7f2008..3372a8c71 100644 --- a/libpod/lock/shm/shm_lock.go +++ b/libpod/lock/shm/shm_lock.go @@ -12,9 +12,13 @@ import ( "unsafe" "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) -const ( +var ( + // BitmapSize is the size of the bitmap used when managing SHM locks. + // an SHM lock manager's max locks will be rounded up to a multiple of + // this number. BitmapSize uint32 = uint32(C.bitmap_size_c) ) @@ -51,6 +55,8 @@ func CreateSHMLock(path string, numLocks uint32) (*SHMLocks, error) { locks.maxLocks = uint32(lockStruct.num_locks) locks.valid = true + logrus.Debugf("Initialized SHM lock manager at path %s", path) + return locks, nil } |