2016-09-21 21:25:55 +02:00
|
|
|
package fusefrontend_reverse
|
|
|
|
|
|
|
|
import (
|
|
|
|
"sync/atomic"
|
|
|
|
)
|
|
|
|
|
2016-10-02 06:14:18 +02:00
|
|
|
func newInoGen() *inoGenT {
|
2016-09-21 21:25:55 +02:00
|
|
|
var ino uint64 = 1
|
|
|
|
return &inoGenT{&ino}
|
|
|
|
}
|
|
|
|
|
|
|
|
type inoGenT struct {
|
|
|
|
ino *uint64
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get the next inode counter value
|
|
|
|
func (i *inoGenT) next() uint64 {
|
|
|
|
return atomic.AddUint64(i.ino, 1)
|
|
|
|
}
|