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_SEMAPHORE_DEFINE(x)   x = bu_semaphore_register(CPP_STR(x))
 
#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)
 subroutine to determine if we are multi-threaded More...
 
int bu_parallel_id (void)
 
void bu_nice_set (int newnice)
 process management routines More...
 
size_t bu_avail_cpus (void)
 
void bu_parallel (void(*func)(int func_cpu_id, void *func_data), size_t ncpu, void *data)
 
int bu_semaphore_register (const char *name)
 semaphore implementation More...
 
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_SEM_GENERAL
 
int BU_SEM_SYSCALL
 
int BU_SEM_MAPPEDFILE
 
int bu_setjmp_valid [MAX_PSW]
 
jmp_buf bu_jmpbuf [MAX_PSW]