2 #include "../acl_cpp_define.hpp" 36 void* tbox_create(
void);
37 void tbox_free(
void*,
void (*free_fn)(
void*));
38 bool tbox_push(
void*,
void*);
39 void* tbox_pop(
void*,
int);
40 size_t tbox_size(
void*);
78 tbox_ = tbox_create();
83 tbox_free(tbox_, tbox_free_fn);
93 return tbox_push(tbox_, t);
102 T*
pop(
int wait_ms = -1)
104 return (T*) tbox_pop(tbox_, wait_ms);
111 size_t size(
void)
const 113 return tbox_size(tbox_);
119 static void tbox_free_fn(
void* o)
T * pop(int wait_ms=-1, bool *found=NULL)
struct ACL_AQUEUE ACL_AQUEUE
bool push(T *t, bool notify_first=true)