TBCI Numerical high perf. C++ Library  2.8.0
Classes | Macros | Typedefs | Functions | Variables
smp.h File Reference
#include "tbci/basics.h"
Include dependency graph for smp.h:

Go to the source code of this file.

Classes

struct  job_input
 
struct  job_output
 
struct  thr_struct
 
struct  thr_ctrl
 

Macros

#define THREAD_MAX_ARGS   6
 
#define THREAD_MAX_RES_LN   16
 
#define MAIN_PID   (getpid())
 
#define num_threads   (0)
 
#define thrno   (0)
 
#define ismainthread   (1)
 
#define threads_avail(x)   (0)
 

Typedefs

typedef void(* thr_job_t )(struct thr_ctrl *)
 Before the double inclusion guard on purpose! More...
 
typedef void *(* useful_job_t )(void *)
 

Functions

struct thr_struct ALIGN (64)
 
static int init_threads (const int=0, const bool=false)
 
static void bind_threads (bool=true, bool=true, bool=false)
 
static void free_threads ()
 
static void disable_threads ()
 
static void reenable_threads ()
 

Variables

int t_no
 
pid_t t_pid
 
pthread_t t_id
 
int t_pipe_to_thread [2]
 
int t_pipe_from_thread [2]
 
unsigned int t_done_var
 
int numa_node
 
struct thr_ctrl ALIGN
 

Detailed Description

Multithreading support framework based on POSIX threads. Control via TBCI::thr_ctrl

Author
Kurt Garloff
Date
1998-11-02
Version
Id:
smp.h,v 1.25.2.59 2019/06/03 16:49:32 garloff Exp

License: GNU LGPL

Definition in file smp.h.

Macro Definition Documentation

#define ismainthread   (1)

Definition at line 321 of file smp.h.

#define MAIN_PID   (getpid())

Definition at line 317 of file smp.h.

#define num_threads   (0)

Definition at line 319 of file smp.h.

#define THREAD_MAX_ARGS   6

Definition at line 129 of file smp.h.

Referenced by _thread_start_off().

#define THREAD_MAX_RES_LN   16

Definition at line 130 of file smp.h.

Referenced by dot(), and Vector< T >::operator*().

#define threads_avail (   x)    (0)
#define thrno   (0)

Definition at line 320 of file smp.h.

Typedef Documentation

typedef void(* thr_job_t)(struct thr_ctrl *)

Before the double inclusion guard on purpose!

Definition at line 126 of file smp.h.

typedef void*(* useful_job_t)(void *)

Definition at line 127 of file smp.h.

Function Documentation

struct thr_struct ALIGN ( 64  )
static void bind_threads ( bool  = true,
bool  = true,
bool  = false 
)
static

Definition at line 324 of file smp.h.

static void disable_threads ( )
static

Definition at line 326 of file smp.h.

static void free_threads ( )
static

Definition at line 325 of file smp.h.

static int init_threads ( const int  = 0,
const bool  = false 
)
static

Definition at line 323 of file smp.h.

static void reenable_threads ( )
static

Definition at line 332 of file smp.h.

Variable Documentation

struct thr_ctrl ALIGN
int numa_node

Definition at line 133 of file smp.h.

unsigned int t_done_var

Definition at line 132 of file smp.h.

pthread_t t_id

Definition at line 130 of file smp.h.

int t_no

Definition at line 128 of file smp.h.

pid_t t_pid

Definition at line 129 of file smp.h.

int t_pipe_from_thread[2]

Definition at line 131 of file smp.h.

int t_pipe_to_thread[2]

Definition at line 131 of file smp.h.