Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
Thread.h File Reference
#include <cstdlib>
#include <pthread.h>
#include "core/Exceptions.h"
Include dependency graph for Thread.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  lm::thread::PthreadException
 An Exception class for handling pthread exceptions. More...
class  lm::thread::Thread
 A base class wrapping pthreads. More...

Namespaces

namespace  lm
namespace  lm::thread

Macros

#define PTHREAD_EXCEPTION_CHECK(pthread_call)
 Exception wrapping for the pthread api.
#define PTHREAD_EXCEPTION_CHECK_NOTHROW(pthread_call)

Macro Definition Documentation

◆ PTHREAD_EXCEPTION_CHECK

#define PTHREAD_EXCEPTION_CHECK ( pthread_call)
Value:
{int _pthread_ret_=pthread_call; if (_pthread_ret_ != 0) throw lm::thread::PthreadException(_pthread_ret_,__FILE__,__LINE__);}
An Exception class for handling pthread exceptions.
Definition Thread.h:53

Exception wrapping for the pthread api.

◆ PTHREAD_EXCEPTION_CHECK_NOTHROW

#define PTHREAD_EXCEPTION_CHECK_NOTHROW ( pthread_call)
Value:
{int _pthread_ret_=pthread_call; if (_pthread_ret_ != 0) {fprintf(stderr, "%s:%d: Pthread error, returned %d\n", __FILE__, __LINE__, _pthread_ret_); abort();}}