Changeset 1894

Show
Ignore:
Timestamp:
09/12/10 12:48:12 (14 years ago)
Author:
arnonym
Message:

Fix #295: Aid debugging by naming the threads.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libutil/PosixThread.cpp

    r1763 r1894  
    5252#include <errno.h> 
    5353#include <assert.h> 
     54#include <sys/prctl.h> 
    5455 
    5556namespace Util 
     
    7576        return 0; 
    7677    } 
     78 
     79    std::string threadname = std::string("FW_") + obj->m_id; 
     80    prctl(PR_SET_NAME, threadname.c_str()); 
    7781 
    7882    debugOutput( DEBUG_LEVEL_VERBOSE, "(%s) ThreadHandler: start %p\n", obj->m_id.c_str(), obj);