Ticket #295: ffado-threadnames.patch

File ffado-threadnames.patch, 0.6 kB (added by adi, 10 years ago)
  • a/libffado/src/libutil/PosixThread.cpp

    old new  
    5151#include <string.h> // for memset 
    5252#include <errno.h> 
    5353#include <assert.h> 
     54#include <sys/prctl.h> 
    5455 
    5556namespace Util 
    5657{ 
     
    7576        return 0; 
    7677    } 
    7778 
     79    prctl(PR_SET_NAME, obj->m_id.c_str()); 
     80 
    7881    debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) ThreadHandler: start %p\n", obj->m_id.c_str(), obj); 
    7982 
    8083    // If Init succeed start the thread loop