BRL-CAD
parallel.h File Reference
#include "common.h"
#include <setjmp.h>
#include "bu/defines.h"
Include dependency graph for parallel.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_PSW   1024
 
#define BU_SEM_SYSCALL   0
 
#define BU_SEM_LISTS   1
 
#define BU_SEM_BN_NOISE   2
 
#define BU_SEM_MAPPEDFILE   3
 
#define BU_SEM_THREAD   4
 
#define BU_SEM_MALLOC   5
 
#define BU_SEM_DATETIME   6
 
#define BU_SEM_LAST   (BU_SEM_DATETIME+1) /* allocate this many for LIBBU+LIBBN */
 
#define BU_SETJUMP   setjmp((bu_setjmp_valid[bu_parallel_id()]=1, bu_jmpbuf[bu_parallel_id()]))
 
#define BU_UNSETJUMP   (bu_setjmp_valid[bu_parallel_id()]=0)
 

Functions

DEPRECATED int bu_is_parallel (void)
 
int bu_parallel_id (void)
 
int bu_terminate (int process)
 
int bu_process_id (void)
 
void bu_nice_set (int newnice)
 
size_t bu_avail_cpus (void)
 
void bu_parallel (void(*func)(int func_ncpu, void *func_data), int ncpu, void *data)
 
void bu_semaphore_init (unsigned int nsemaphores)
 
void bu_semaphore_free (void)
 
void bu_semaphore_acquire (unsigned int i)
 
void bu_semaphore_release (unsigned int i)
 

Variables

int bu_setjmp_valid [MAX_PSW]
 
jmp_buf bu_jmpbuf [MAX_PSW]