...

Source file src/github.com/Microsoft/hcsshim/internal/uvm/counter.go

Documentation: github.com/Microsoft/hcsshim/internal/uvm

     1  //go:build windows
     2  
     3  package uvm
     4  
     5  import (
     6  	"sync/atomic"
     7  )
     8  
     9  // ContainerCounter is used for where we layout things for a container in
    10  // a utility VM. For WCOW it'll be C:\c\N\. For LCOW it'll be /run/gcs/c/N/.
    11  func (uvm *UtilityVM) ContainerCounter() uint64 {
    12  	return atomic.AddUint64(&uvm.containerCounter, 1)
    13  }
    14  
    15  // mountCounter is used for maintaining the number of mounts to the UVM.
    16  // This helps in generating unique mount paths for every mount.
    17  func (uvm *UtilityVM) UVMMountCounter() uint64 {
    18  	return atomic.AddUint64(&uvm.mountCounter, 1)
    19  }
    20  

View as plain text