Classes | Macros | Functions | Variables
StackTrace.c File Reference
#include "StackTrace.h"
#include "Log.h"
#include "LinkedList.h"
#include "Clients.h"
#include "Thread.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Include dependency graph for StackTrace.c:

Go to the source code of this file.

Classes

struct  stackEntry
 
struct  threadEntry
 

Macros

#define MAX_FUNCTION_NAME_LENGTH   30
 
#define MAX_STACK_DEPTH   50
 
#define MAX_THREADS   255
 

Functions

int setStack (int create)
 
void StackTrace_entry (const char *name, int line, enum LOG_LEVELS trace_level)
 
void StackTrace_exit (const char *name, int line, void *rc, enum LOG_LEVELS trace_level)
 
char * StackTrace_get (thread_id_type threadid, char *buf, int bufsize)
 
void StackTrace_printStack (FILE *dest)
 

Variables

static threadEntrymy_thread = NULL
 
static mutex_type stack_mutex = &stack_mutex_store
 
static pthread_mutex_t stack_mutex_store = PTHREAD_MUTEX_INITIALIZER
 
static int thread_count = 0
 
static threadEntry threads [MAX_THREADS]
 

Macro Definition Documentation

#define MAX_FUNCTION_NAME_LENGTH   30

Definition at line 43 of file StackTrace.c.

#define MAX_STACK_DEPTH   50

Definition at line 42 of file StackTrace.c.

#define MAX_THREADS   255

Definition at line 44 of file StackTrace.c.

Function Documentation

int setStack ( int  create)

Definition at line 80 of file StackTrace.c.

void StackTrace_entry ( const char *  name,
int  line,
enum LOG_LEVELS  trace_level 
)

Definition at line 106 of file StackTrace.c.

void StackTrace_exit ( const char *  name,
int  line,
void *  rc,
enum LOG_LEVELS  trace_level 
)

Definition at line 124 of file StackTrace.c.

char* StackTrace_get ( thread_id_type  threadid,
char *  buf,
int  bufsize 
)

Definition at line 175 of file StackTrace.c.

void StackTrace_printStack ( FILE *  dest)

Definition at line 145 of file StackTrace.c.

Variable Documentation

threadEntry* my_thread = NULL
static

Definition at line 67 of file StackTrace.c.

mutex_type stack_mutex = &stack_mutex_store
static

Definition at line 73 of file StackTrace.c.

pthread_mutex_t stack_mutex_store = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 72 of file StackTrace.c.

int thread_count = 0
static

Definition at line 65 of file StackTrace.c.

threadEntry threads[MAX_THREADS]
static

Definition at line 66 of file StackTrace.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:49