VOL-2292: Create application for scale testing of BAL
- Base framework created and is functional
- Able to provision ATT techprofile with scheduler, queue and eapol
flow creation.
- Extensible framework provided to add various operator workflows
- README has details about how to build, run, configure and extend
the framework.
Change-Id: I71774959281881278c14b48bee7f9adc0b81ec68
diff --git a/vendor/github.com/boljen/go-bitmap/uintmap.go b/vendor/github.com/boljen/go-bitmap/uintmap.go
new file mode 100644
index 0000000..72cbf4a
--- /dev/null
+++ b/vendor/github.com/boljen/go-bitmap/uintmap.go
@@ -0,0 +1,32 @@
+package bitmap
+
+import (
+ "sync/atomic"
+ "unsafe"
+)
+
+// SetAtomicUint32 sets the target bit to the target value inside the uint32
+// encded bitmap.
+func SetAtomicUint32(bitmap []uint32, targetBit int, targetValue bool) {
+ targetIndex := targetBit / 32
+ BitOffset := targetBit % 32
+
+ for {
+ localValue := atomic.LoadUint32(&bitmap[targetIndex])
+ targetBytes := (*[4]byte)(unsafe.Pointer(&localValue))[:]
+ if Get(targetBytes, BitOffset) == targetValue {
+ return
+ }
+ referenceValue := localValue
+ Set(targetBytes, BitOffset, targetValue)
+ if atomic.CompareAndSwapUint32(&bitmap[targetIndex], referenceValue, localValue) {
+ break
+ }
+ }
+}
+
+// GetAtomicUint32 gets the target bit from an uint32 encoded bitmap.
+func GetAtomicUint32(bitmap []uint32, targetBit int) bool {
+ data := (*[4]byte)(unsafe.Pointer(&bitmap[targetBit/32]))[:]
+ return Get(data, targetBit%32)
+}