Move cs_main locking annotations from .cpp to .h #14063

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:mv-cs_main-annotations changing 3 files +4 −3
  1. practicalswift commented at 10:57 PM on August 25, 2018: contributor

    Move cs_main locking annotations from .cpp to .h.

  2. practicalswift commented at 10:57 PM on August 25, 2018: contributor

    As suggested by @MarcoFalke :-)

  3. fanquake added the label Refactoring on Aug 25, 2018
  4. in src/txmempool.h:368 in d4cf669268 outdated
     364 | @@ -365,6 +365,8 @@ class SaltedTxidHasher
     365 |      }
     366 |  };
     367 |  
     368 | +extern CCriticalSection cs_main;
    


    MarcoFalke commented at 11:26 PM on August 25, 2018:

    Could move this all the way up (right after the includes?)

  5. Move cs_main locking annotations from .cpp to .h 9e2de6b9d0
  6. practicalswift force-pushed on Aug 26, 2018
  7. practicalswift commented at 9:16 AM on August 26, 2018: contributor

    @MarcoFalke Feedback addressed. Please re-review :-)

  8. MarcoFalke merged this on Aug 26, 2018
  9. MarcoFalke closed this on Aug 26, 2018

  10. MarcoFalke referenced this in commit 683838b7e4 on Aug 26, 2018
  11. laanwj commented at 10:50 AM on August 26, 2018: member

    does this make any difference to the functionality? or is this just better from a documentation point of view?

  12. MarcoFalke commented at 11:11 AM on August 26, 2018: member

    The locking annotations are only evaluated at compile time, so when they are not in the header file, they are ignored outside of that translation unit.

  13. jasonbcox referenced this in commit b77978dd2b on Sep 27, 2019
  14. jonspock referenced this in commit 00af96a2ec on Dec 24, 2019
  15. jonspock referenced this in commit b2d197db39 on Dec 26, 2019
  16. jonspock referenced this in commit 63990a52fc on Dec 27, 2019
  17. practicalswift deleted the branch on Apr 10, 2021
  18. PastaPastaPasta referenced this in commit 0f66cc37b9 on Jun 27, 2021
  19. PastaPastaPasta referenced this in commit 308aaab208 on Jun 28, 2021
  20. PastaPastaPasta referenced this in commit 20ea02b5c7 on Jun 29, 2021
  21. PastaPastaPasta referenced this in commit 377aad4e4a on Jun 29, 2021
  22. PastaPastaPasta referenced this in commit bfeaeb742a on Jun 29, 2021
  23. PastaPastaPasta referenced this in commit c812f2d8a4 on Jun 29, 2021
  24. PastaPastaPasta referenced this in commit 3716c5e8e6 on Jun 29, 2021
  25. Munkybooty referenced this in commit 132e165516 on Jun 30, 2021
  26. Munkybooty referenced this in commit 58ceb51f9b on Jun 30, 2021
  27. Munkybooty referenced this in commit aa53244166 on Jul 1, 2021
  28. PastaPastaPasta referenced this in commit 32b571bd13 on Jul 1, 2021
  29. gades referenced this in commit 060182e525 on May 24, 2022
  30. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me