Changes in / [8339225:6f84007]
- Location:
- benchmark/readyQ
- Files:
-
- 2 edited
-
locality.go (modified) (6 diffs)
-
locality.rs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/locality.go
r8339225 r6f84007 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 -
benchmark/readyQ/locality.rs
r8339225 r6f84007 53 53 // ================================================== 54 54 struct MyCtx { 55 _p1: [16]u64,56 55 s: sync::Semaphore, 57 56 d: MyDataPtr, 58 57 ttid: ThreadId, 59 58 _id: usize, 60 _p2: [16]u64,61 59 } 62 60
Note:
See TracChangeset
for help on using the changeset viewer.