FreeBSD, OpenBSD thread renaming. #6033

pull sinetek wants to merge 1 commits into bitcoin:master from sinetek:tn changing 1 files +6 −4
  1. sinetek commented at 1:02 PM on April 20, 2015: contributor

    Add support for thread renaming on FreeBSD, OpenBSD.

  2. sinetek commented at 1:03 PM on April 20, 2015: contributor

    Also possible would be NetBSD and DragonFlyBSD. I still have to test those, but I know the functions exist, just a matter of adding the right preprocessor macro's.

  3. laanwj commented at 1:38 PM on April 20, 2015: member

    utACK

  4. in src/util.cpp:None in cd558b421c
       6 | @@ -7,6 +7,11 @@
       7 |  #include "config/bitcoin-config.h"
       8 |  #endif
       9 |  
      10 | +#if (defined(__FreeBSD__) || defined(__OpenBSD__))
    


    Diapolo commented at 2:12 PM on April 20, 2015:

    IMHO this should be moved below #include <stdarg.h> and also take into account what we have there Win/Linux def/ifdef etc. (I didn't check that).


    sinetek commented at 2:18 PM on April 20, 2015:

    I suppose you're right, however there is namespace pollution in the bitcoin includes, so if I move it too much down (for example one line down below util.h) stuff breaks dramatically in the openbsd sys/* includes.

  5. jgarzik commented at 5:05 PM on April 20, 2015: contributor

    ut ACK

  6. sipa commented at 5:26 PM on April 20, 2015: member

    Concept ACK

  7. theuni commented at 5:40 PM on April 20, 2015: member

    Generally, I'd rather see this tested in configure and used via

    #if defined(HAS_PTHREAD_SET_NAME_NP)
    

    These BSD defines tend to become messy otherwise. Plus, we'd automatically get support for dragonflybsd/netbsd/etc. As a rule, test for the feature, not the host.

    I'm not sure it's worth the complication for this case though, because there are so many incompatible versions of the function.

    ut ACK, new macros can be added if it proves necessary.

  8. FreeBSD, OpenBSD thread renaming. cd558b421c
  9. laanwj merged this on Apr 24, 2015
  10. laanwj closed this on Apr 24, 2015

  11. laanwj referenced this in commit 1623f6e337 on Apr 24, 2015
  12. laanwj added the label Feature on Apr 24, 2015
  13. MarcoFalke locked this on Sep 8, 2021

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 18:15 UTC

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