44 #ifndef CCXX_BUFFER_H_
45 #define CCXX_BUFFER_H_
47 #ifndef CCXX_THREAD_H_
50 #ifndef CCXX_STRING_H_
53 #ifdef CCXX_NAMESPACES
97 virtual size_t onPeek(
void *buf) = 0;
104 virtual size_t onWait(
void *buf) = 0;
111 virtual size_t onPost(
void *buf) = 0;
166 size_t post(
void *buf,
timeout_t timeout = 0);
174 size_t peek(
void *buf);
180 virtual bool isValid(
void);
202 size_t onPeek(
void *buf);
209 size_t onWait(
void *buf);
216 size_t onPost(
void *buf);
283 virtual void final();
289 virtual void startQueue(
void);
296 virtual void stopQueue(
void);
301 virtual void onTimer(
void);
311 virtual void runQueue(
void *data) = 0;
321 ThreadQueue(
const char *
id,
int pri,
size_t stack = 0);
345 void post(
const void *data,
unsigned len);
351 {
return b.wait(o, t);}
355 {
return b.
post(o, t);}
362 #ifdef CCXX_NAMESPACES
Common C++ generic string class.
size_t post(void *buf, timeout_t timeout=0)
Post an object into the buffer and enable a waiting thread to receive it.
A semaphore is generally used as a synchronization object between multiple threads or to protect a li...
The Mutex class is used to protect a section of code so that at any given time only a single thread c...
This is a generic and portable string class.
A conditional variable synchcronization object for one to one and one to many signal and control even...
size_t peek(Buffer &b, void *o)
Synchronization and threading services.
The buffer class represents an IPC service that is built upon a buffer of fixed capacity that can be ...
static const size_t timeout
value to return when a timed operation returned with a timeout.
A buffer class that holds a known capacity of fixed sized objects defined during creation.
size_t put(Buffer &b, void *o, timeout_t t=0)
Somewhat generic queue processing class to establish a producer consumer queue.
size_t getSize(void)
Return the capacity of the buffer as specified at creation.
Every thread of execution in an application is created by instantiating an object of a class derived ...
size_t getUsed(void)
Return the current capacity in use for the buffer.
size_t peek(void *buf)
Peek at the current content (first object) in the buffer.