pthread flow name



  • How to name the flow, so that the donut would not see the flow, but his name.



  • http://manpages.courier-mta.org/htmlman2/prctl.2.html c PR_SET_NAME

    In glibc v2.12, pthread_setname_np and pthread_getname_np:

    #include <pthread.h>  // or maybe <pthread_np.h> for some OSes
    

    // Linux
    int pthread_setname_np(pthread_t thread, const char *name);

    // NetBSD: name + arg work like printf(name, arg)
    int pthread_setname_np(pthread_t thread, const char *name, void *arg);

    // FreeBSD & OpenBSD: function name is slightly different, and has no return value
    void pthread_set_name_np(pthread_t tid, const char *name);

    // Mac OS X: must be set from within the thread (can't specify thread ID)
    int pthread_setname_np(const char*);




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2