Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

OutputDebugStringF code cleanup #2142

Merged
merged 1 commit into from Jan 14, 2013

Conversation

Projects
None yet
5 participants
Contributor

gavinandresen commented Jan 1, 2013

There was a bunch of shed-painting about this before the 0.7.1 release, and I promised to tidy up the code, so:

Initialize the OutputDebugStringF mutex and file pointer using boost::call_once, to be thread-safe.

Make the return value of OutputDebugStringF really be the number of characters written (*printf() semantics).

Declare the fReopenDebugLog flag volatile, since it is changed from a signal handler.

And don't declare OutputDebugStringF() as inline.

OutputDebugStringF code cleanup
Initialize the OutputDebugStringF mutex and file pointer using
boost::call_once, to be thread-safe.
Make the return value of OutputDebugStringF really be the number of
characters written (*printf() semantics).
Declare the fReopenDebugLog flag volatile, since it is changed from
a signal handler.
And don't declare OutputDebugStringF() as inline.

Diapolo commented Jan 2, 2013

Compiles fine, no obvious weird behaviour, while doing IBD and such.

Owner

laanwj commented Jan 2, 2013

ACK

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/ee3374234c60aba2cc4c5cd5cac1c0aefc2d817c for binaries and test log.

Owner

sipa commented Jan 6, 2013

ACK

gavinandresen added a commit that referenced this pull request Jan 14, 2013

Merge pull request #2142 from gavinandresen/utilprint
OutputDebugStringF code cleanup

@gavinandresen gavinandresen merged commit 40e31fd into bitcoin:master Jan 14, 2013

laudney pushed a commit to reddcoin-project/reddcoin that referenced this pull request Mar 19, 2014

Merge pull request #2142 from gavinandresen/utilprint
OutputDebugStringF code cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment