Branch: refs/heads/master
  Home:   https://github.com/conformal/btcd
  Commit: e5a1c6e5aca9eee937e774e45140802eda7035ef
      
https://github.com/conformal/btcd/commit/e5a1c6e5aca9eee937e774e45140802eda7035ef
  Author: Dave Collins <[email protected]>
  Date:   2014-02-13 (Thu, 13 Feb 2014)

  Changed paths:
    M peer.go
    M server.go

  Log Message:
  -----------
  Use mutexes for byte counts to fix i386/arm panic.

This commit changes the server byte counters over to use a mutex instead
of the atomic package.  The atomic.AddUint64 function requires the struct
fields to be 64-bit aligned on 32-bit platforms.  The byte counts are
fields in the server struct and are not 64-bit aligned.  While it would be
possible to arrange the fields to be aligned through various means, it
would make the code too fragile for my tastes.  I prefer code that doesn't
depend on platform specific alignment.

Fixes #96.


Reply via email to