vdr 2.7.3
thread.c File Reference
#include "thread.h"
#include <cxxabi.h>
#include <dlfcn.h>
#include <errno.h>
#include <execinfo.h>
#include <linux/unistd.h>
#include <malloc.h>
#include <stdarg.h>
#include <stdlib.h>
#include <sys/prctl.h>
#include <sys/resource.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <unistd.h>
#include "tools.h"

Go to the source code of this file.

Classes

class  cStateLockLog
 

Macros

#define ABORT   { dsyslog("ABORT!"); cBackTrace::BackTrace(); abort(); }
 
#define DEBUG_LOCKSEQ
 
#define dbglocking(a...)
 
#define THREAD_STOP_TIMEOUT   3000
 
#define THREAD_STOP_SLEEP   30
 
#define BT_BUF_SIZE   100
 
#define SLL_SIZE   20
 
#define SLL_LENGTH   512
 
#define SLL_THREADS   20
 
#define SLL_MAX_LIST   9
 
#define SLL_WRITE_FLAG   0x80000000
 
#define SLL_LOCK_FLAG   0x40000000
 
#define dbglockseq(n, l, w)
 

Functions

static bool GetAbsTime (struct timespec *Abstime, int MillisecondsFromNow)
 
int SystemExec (const char *Command, bool Detached)
 

Variables

static cStateLockLog StateLockLog
 

Macro Definition Documentation

◆ ABORT

◆ BT_BUF_SIZE

#define BT_BUF_SIZE   100

Definition at line 439 of file thread.c.

Referenced by cBackTrace::BackTrace(), and cBackTrace::GetCaller().

◆ dbglocking

#define dbglocking ( a...)

Definition at line 36 of file thread.c.

Referenced by cStateLock::Lock(), cStateLock::SetSyncStateKey(), and cStateLock::Unlock().

◆ dbglockseq

#define dbglockseq ( n,
l,
w )
Value:
void Check(const char *Name, bool Lock, bool Write=false)
Definition thread.c:641
static cStateLockLog StateLockLog
Definition thread.c:704

Definition at line 706 of file thread.c.

Referenced by cStateLock::Lock(), and cStateLock::Unlock().

◆ DEBUG_LOCKSEQ

#define DEBUG_LOCKSEQ

Definition at line 30 of file thread.c.

◆ SLL_LENGTH

#define SLL_LENGTH   512

Definition at line 560 of file thread.c.

Referenced by cStateLockLog::Check(), and cStateLockLog::Dump().

◆ SLL_LOCK_FLAG

#define SLL_LOCK_FLAG   0x40000000

Definition at line 564 of file thread.c.

Referenced by cStateLockLog::Check(), and cStateLockLog::Dump().

◆ SLL_MAX_LIST

#define SLL_MAX_LIST   9

Definition at line 562 of file thread.c.

Referenced by cStateLockLog::Check(), and cStateLockLog::Dump().

◆ SLL_SIZE

#define SLL_SIZE   20

Definition at line 559 of file thread.c.

Referenced by cStateLockLog::Check(), and cStateLockLog::Dump().

◆ SLL_THREADS

#define SLL_THREADS   20

Definition at line 561 of file thread.c.

Referenced by cStateLockLog::Check().

◆ SLL_WRITE_FLAG

#define SLL_WRITE_FLAG   0x80000000

Definition at line 563 of file thread.c.

Referenced by cStateLockLog::Check(), and cStateLockLog::Dump().

◆ THREAD_STOP_SLEEP

#define THREAD_STOP_SLEEP   30

Definition at line 302 of file thread.c.

Referenced by cThread::Start().

◆ THREAD_STOP_TIMEOUT

#define THREAD_STOP_TIMEOUT   3000

Definition at line 301 of file thread.c.

Referenced by cThread::Start().

Function Documentation

◆ GetAbsTime()

static bool GetAbsTime ( struct timespec * Abstime,
int MillisecondsFromNow )
static

Definition at line 39 of file thread.c.

Referenced by cRwLock::Lock(), cCondVar::TimedWait(), and cCondWait::Wait().

◆ SystemExec()

int SystemExec ( const char * Command,
bool Detached )

Variable Documentation

◆ StateLockLog

cStateLockLog StateLockLog
static

Definition at line 704 of file thread.c.