Skip to content

Commit

Permalink
reorder fields that need 64bit alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
iychoi committed Dec 2, 2024
1 parent fad3c52 commit 5ca93eb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
7 changes: 4 additions & 3 deletions commons/bundle_transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ func (bundle *Bundle) SetCompleted() {
}

type BundleTransferManager struct {
// moved to top to avoid 64bit alignment issue
bundlesScheduledCounter int64
bundlesDoneCounter int64

account *irodsclient_types.IRODSAccount
filesystem *irodsclient_fs.FileSystem
transferReportManager *TransferReportManager
Expand Down Expand Up @@ -193,9 +197,6 @@ type BundleTransferManager struct {

scheduleWait sync.WaitGroup
transferWait sync.WaitGroup

bundlesScheduledCounter int64
bundlesDoneCounter int64
}

// NewBundleTransferManager creates a new BundleTransferManager
Expand Down
7 changes: 4 additions & 3 deletions commons/parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ func newParallelJob(manager *ParallelJobManager, index int64, name string, task
}

type ParallelJobManager struct {
// moved to top to avoid 64bit alignment issue
jobsScheduledCounter int64
jobsDoneCounter int64

filesystem *irodsclient_fs.FileSystem
nextJobIndex int64
pendingJobs chan *ParallelJob
Expand All @@ -65,9 +69,6 @@ type ParallelJobManager struct {
availableThreadWaitCondition *sync.Cond // used for checking available threads
scheduleWait sync.WaitGroup
jobWait sync.WaitGroup

jobsScheduledCounter int64
jobsDoneCounter int64
}

// NewParallelJobManager creates a new ParallelJobManager
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/creativeprojects/go-selfupdate v1.0.1
github.com/cyverse/go-irodsclient v0.15.6
github.com/cyverse/go-irodsclient v0.15.7-0.20241107220238-eb6905b152c6
github.com/dustin/go-humanize v1.0.1
github.com/gliderlabs/ssh v0.3.5
github.com/jedib0t/go-pretty/v6 v6.3.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creativeprojects/go-selfupdate v1.0.1 h1:5Un4MTv4puCR5GBgkDLC14J72fljGuMC60E63cFGq1o=
github.com/creativeprojects/go-selfupdate v1.0.1/go.mod h1:nm7AWUJfrfYt/SB97NAcMhR0KEpPqlrVHXkWFti+ezw=
github.com/cyverse/go-irodsclient v0.15.6 h1:9pbyNCKqEGWEcnkFMK3ygelc1rNIGMrFh2PWbRFDxPI=
github.com/cyverse/go-irodsclient v0.15.6/go.mod h1:NN+PxHfLDUmsqfqSY84JfmqXS4EYiuiNW6ti6oPGCgk=
github.com/cyverse/go-irodsclient v0.15.7-0.20241107220238-eb6905b152c6 h1:bS1BOcgLwdH5NhpocZCEJJ2nSbULa4kax0dja2c12xA=
github.com/cyverse/go-irodsclient v0.15.7-0.20241107220238-eb6905b152c6/go.mod h1:NN+PxHfLDUmsqfqSY84JfmqXS4EYiuiNW6ti6oPGCgk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down

0 comments on commit 5ca93eb

Please sign in to comment.