Changes in benchmark/readyQ/locality.go [3d19ae6:f4f79dd]
- File:
-
- 1 edited
-
benchmark/readyQ/locality.go (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/locality.go
r3d19ae6 rf4f79dd 18 18 // ================================================== 19 19 type MyData struct { 20 _p1 [16]uint64 // padding21 20 ttid int 22 21 id int 23 22 data [] uint64 24 _p2 [16]uint64 // padding25 23 } 26 24 … … 31 29 data[i] = 0 32 30 } 33 return &MyData{ [16]uint64{0}, syscall.Gettid(), id, data,[16]uint64{0}}31 return &MyData{syscall.Gettid(), id, data} 34 32 } 35 33 … … 48 46 // ================================================== 49 47 type MyCtx struct { 50 _p1 [16]uint64 // padding51 48 s * semaphore.Weighted 52 49 d unsafe.Pointer … … 54 51 ttid int 55 52 id int 56 _p2 [16]uint64 // padding57 53 } 58 54 59 55 func NewCtx( data * MyData, id int ) (MyCtx) { 60 r := MyCtx{ [16]uint64{0},semaphore.NewWeighted(1), unsafe.Pointer(data), context.Background(), syscall.Gettid(), id,[16]uint64{0}}56 r := MyCtx{semaphore.NewWeighted(1), unsafe.Pointer(data), context.Background(), syscall.Gettid(), id} 61 57 r.s.Acquire(context.Background(), 1) 62 58 return r … … 77 73 ptr uintptr // atomic variable use fo MES 78 74 id int // id for debugging 79 _p [16]uint64 // padding80 75 } 81 76 … … 244 239 channels := make([]Spot, nthreads - nprocs) // Number of spots 245 240 for i := range channels { 246 channels[i] = Spot{uintptr(0), i ,[16]uint64{0}} // init spots241 channels[i] = Spot{uintptr(0), i} // init spots 247 242 } 248 243
Note:
See TracChangeset
for help on using the changeset viewer.