diff options
author | Nicolas Dato <nicolas.dato@gmail.com> | 2023-11-05 15:07:12 -0300 |
---|---|---|
committer | Nicolas Dato <nicolas.dato@gmail.com> | 2023-11-05 15:07:12 -0300 |
commit | 3c3935dc6d5ba6e4ed33bad1e969aa9888bd3a8a (patch) | |
tree | ef6e9118e42c23ed7fb0b363ab47c6f1cc81b11b /src/itc.h | |
parent | 0ad04cccbecd82d2683b54338b8dd088492b7215 (diff) | |
download | libtuberia-3c3935dc6d5ba6e4ed33bad1e969aa9888bd3a8a.tar.gz |
Adding some initial code. utils.c for some auxiliary functions, and itc.c for intra-tuberia-communication
Diffstat (limited to 'src/itc.h')
-rw-r--r-- | src/itc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/itc.h b/src/itc.h new file mode 100644 index 0000000..0d43e3d --- /dev/null +++ b/src/itc.h @@ -0,0 +1,14 @@ +#ifndef __LIBTUBERIA_ITC_H__ +#define __LIBTUBERIA_ITC_H__ + +typedef struct itc itc; +typedef void (*itc_free_element)(void *element); + +itc *itc_alloc(int nslots); +void itc_free(itc **ctx, itc_free_element free_element); + +void *itc_retrive(itc *ctx, int timeout_ms); +int itc_inject(itc *ctx, int timeout_ms, void *element); +void itc_drop(itc *ctx, itc_free_element free_element); + +#endif //__LIBTUBERIA_ITC_H__ |