set threadnames to unique values

Origin commit data
------------------
Branch: ni/coolstream
Commit: fca14b17c5
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2015-02-28 (Sat, 28 Feb 2015)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2015-02-28 10:53:18 +01:00
parent 55a5cbe7a4
commit 022bcb2f08
9 changed files with 24 additions and 3 deletions

View File

@@ -79,6 +79,7 @@
#include <global.h>
#include <system/settings.h>
#include <system/set_threadname.h>
#include <neutrino.h>
#include <gui/color.h>
@@ -2369,6 +2370,7 @@ void CRadioText::setPid(uint inPid)
void CRadioText::run()
{
set_threadname("n:radiotext");
uint current_pid = 0;
printf("CRadioText::run: ###################### Starting thread ######################\n");

View File

@@ -45,6 +45,7 @@
#include <video.h>
#include <cs_api.h>
#include <driver/screenshot.h>
#include <system/set_threadname.h>
extern "C" {
#include <jpeglib.h>
@@ -106,6 +107,7 @@ bool CScreenShot::GetData()
/* start ::run in new thread to save file in selected format */
bool CScreenShot::Start()
{
set_threadname("n:screenshot");
bool ret = false;
if(GetData())
ret = (start() == 0);

View File

@@ -56,6 +56,7 @@
#include <driver/streamts.h>
#include <driver/record.h>
#include <driver/genpsi.h>
#include <system/set_threadname.h>
/* experimental mode:
* stream not possible, if record running
@@ -163,6 +164,7 @@ void CStreamInstance::RemoveClient(int clientfd)
void CStreamInstance::run()
{
printf("CStreamInstance::run: %" PRIx64 "\n", channel_id);
set_threadname("n:streaminstance");
CZapitChannel * tmpchan = CServiceManager::getInstance()->FindChannel(channel_id);
if (!tmpchan)
@@ -539,6 +541,7 @@ void CStreamManager::run()
int poll_timeout = -1;
printf("Starting STREAM thread keeper, tid %ld\n", syscall(__NR_gettid));
set_threadname("n:streammanager");
while (running) {
mutex.lock();

View File

@@ -46,6 +46,7 @@
#include <eventserver.h>
#include <driver/abstime.h>
#include <system/helpers.h>
#include <system/set_threadname.h>
#include <OpenThreads/ScopedLock>
#include "eitd.h"
@@ -1419,7 +1420,8 @@ void CTimeThread::run()
{
time_t dvb_time = 0;
xprintf("%s::run:: starting, pid %d (%lu)\n", name.c_str(), getpid(), pthread_self());
const char *tn = ("sd:" + name).c_str();
set_threadname(tn);
addFilters();
DMX::start();
@@ -1544,6 +1546,8 @@ int CSectionThread::Sleep()
void CSectionThread::run()
{
xprintf("%s::run:: starting, pid %d (%lu)\n", name.c_str(), getpid(), pthread_self());
const char *tn = ("sd:" + name).c_str();
set_threadname(tn);
if (sections_debug)
dump_sched_info(name);
@@ -2198,6 +2202,7 @@ void CEitManager::run()
int rc;
xprintf("[sectionsd] starting\n");
set_threadname("sd:eitmanager");
printf("SIevent size: %d\n", (int)sizeof(SIevent));
/* "export NO_SLOW_ADDEVENT=true" to disable this */

View File

@@ -120,7 +120,7 @@ void thread_cleanup (void *p)
#ifndef Y_CONFIG_BUILD_AS_DAEMON
void * nhttpd_main_thread(void *) {
set_threadname(__func__);
set_threadname("yweb:main_thread");
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0);
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
aprintf("Webserver %s tid %ld\n", WEBSERVERNAME, syscall(__NR_gettid));
@@ -338,7 +338,7 @@ bool Cyhttpd::Configure() {
// Main Webserver call
//-----------------------------------------------------------------------------
void Cyhttpd::run() {
set_threadname(__func__);
set_threadname("yweb:run");
if (webserver) {
if (flag_threading_off)
webserver->is_threading = false;

View File

@@ -36,6 +36,7 @@
#include <zapit/scansdt.h>
#include <zapit/scannit.h>
#include <zapit/scanbat.h>
#include <system/set_threadname.h>
//#define USE_BAT
@@ -96,6 +97,7 @@ bool CServiceScan::Stop()
void CServiceScan::run()
{
set_threadname("zap:servicescan");
running = true;
CleanAllMaps();

View File

@@ -29,6 +29,7 @@
#include <dvbsi++/private_data_specifier_descriptor.h>
#include <math.h>
#include <eitd/edvbstring.h>
#include <system/set_threadname.h>
#define DEBUG_BAT
#define DEBUG_BAT_UNUSED
@@ -68,6 +69,7 @@ bool CBat::Stop()
void CBat::run()
{
set_threadname("zap:bat");
if(Parse())
printf("[scan] BAT finished.\n");
else

View File

@@ -29,6 +29,7 @@
#include <dvbsi++/private_data_specifier_descriptor.h>
#include <math.h>
#include <eitd/edvbstring.h>
#include <system/set_threadname.h>
//#define DEBUG_NIT
//#define DEBUG_NIT_UNUSED
@@ -65,6 +66,7 @@ bool CNit::Stop()
void CNit::run()
{
set_threadname("zap:nit");
if(Parse())
printf("[scan] NIT finished.\n");
else

View File

@@ -71,6 +71,7 @@
#endif
#include <driver/abstime.h>
#include <system/set_threadname.h>
#include <libdvbsub/dvbsub.h>
#include <OpenThreads/ScopedLock>
#include <libtuxtxt/teletext.h>
@@ -2595,6 +2596,7 @@ void CZapit::run()
#if HAVE_SPARK_HARDWARE
bool v_stopped = false;
#endif
set_threadname("zap:main");
printf("[zapit] starting... tid %ld\n", syscall(__NR_gettid));
abort_zapit = 0;
@@ -2793,6 +2795,7 @@ void CZapitSdtMonitor::run()
t_satellite_position satellitePosition = 0;
freq_id_t freq = 0;
transponder_id_t tpid = 0;
set_threadname("zap:sdtmonitor");
tcur = time(0);
//tstart = time(0);