Skip to content

Commit

Permalink
Use proper type in the padding
Browse files Browse the repository at this point in the history
  • Loading branch information
puzpuzpuz committed Aug 20, 2023
1 parent 0f98a66 commit a0168db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpmcqueueof.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type MPMCQueueOf[I any] struct {
type slotOfPadded[I any] struct {
slotOf[I]
//lint:ignore U1000 prevents false sharing
pad [cacheLineSize - (unsafe.Sizeof(slot{}) % cacheLineSize)]byte
pad [cacheLineSize - (unsafe.Sizeof(slotOf[I]{}) % cacheLineSize)]byte

Check failure on line 34 in mpmcqueueof.go

View workflow job for this annotation

GitHub Actions / Build with Go 1.20.x

array length cacheLineSize - (unsafe.Sizeof(slotOf[I]{}) % cacheLineSize) (value of type uintptr) must be constant

Check failure on line 34 in mpmcqueueof.go

View workflow job for this annotation

GitHub Actions / Build with Go 1.20.x 32-bit

array length cacheLineSize - (unsafe.Sizeof(slotOf[I]{}) % cacheLineSize) (value of type uintptr) must be constant

Check failure on line 34 in mpmcqueueof.go

View workflow job for this annotation

GitHub Actions / Build with Go 1.18.x

array length cacheLineSize - (unsafe.Sizeof(slotOf[I]{}) % cacheLineSize) (value of type uintptr) must be constant

Check failure on line 34 in mpmcqueueof.go

View workflow job for this annotation

GitHub Actions / Build with Go 1.20.x

array length cacheLineSize - (unsafe.Sizeof(slotOf[I]{}) % cacheLineSize) (value of type uintptr) must be constant
}

type slotOf[I any] struct {
Expand Down

0 comments on commit a0168db

Please sign in to comment.