summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-08-03 13:25:12 +0200
committerSander Vrijders <[email protected]>2016-08-03 13:25:12 +0200
commit44b55f0b03ffc6aff4f1c290b5687d5ac95ddbf9 (patch)
tree6e80ca15368a75908ba4053ceb07c25269ae786c /include
parentd409fd569683d8f0e8c8f65d4820087dbf7c0786 (diff)
parentca494922f3815077efbcd28da3748df38c8a6961 (diff)
downloadouroboros-44b55f0b03ffc6aff4f1c290b5687d5ac95ddbf9.tar.gz
ouroboros-44b55f0b03ffc6aff4f1c290b5687d5ac95ddbf9.zip
Merged in dstaesse/ouroboros/be-select (pull request #184)
select() like call
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/dev.h2
-rw-r--r--include/ouroboros/shm_ap_rbuff.h3
-rw-r--r--include/ouroboros/shm_du_map.h13
3 files changed, 11 insertions, 7 deletions
diff --git a/include/ouroboros/dev.h b/include/ouroboros/dev.h
index eb779953..91d5c7de 100644
--- a/include/ouroboros/dev.h
+++ b/include/ouroboros/dev.h
@@ -22,6 +22,7 @@
#include <unistd.h>
#include <stdint.h>
+#include <sys/time.h>
#include <ouroboros/qos.h>
#include <ouroboros/flow.h>
@@ -53,5 +54,6 @@ int flow_dealloc(int fd);
int flow_cntl(int fd, int cmd, int oflags);
ssize_t flow_write(int fd, void * buf, size_t count);
ssize_t flow_read(int fd, void * buf, size_t count);
+int flow_select(const struct timespec * timeout);
#endif
diff --git a/include/ouroboros/shm_ap_rbuff.h b/include/ouroboros/shm_ap_rbuff.h
index 78926869..257a289d 100644
--- a/include/ouroboros/shm_ap_rbuff.h
+++ b/include/ouroboros/shm_ap_rbuff.h
@@ -25,6 +25,7 @@
#define OUROBOROS_SHM_AP_RBUFF_H
#include <sys/types.h>
+#include <sys/time.h>
#include <stdbool.h>
struct shm_ap_rbuff;
@@ -41,6 +42,8 @@ void shm_ap_rbuff_destroy(struct shm_ap_rbuff * rb);
int shm_ap_rbuff_write(struct shm_ap_rbuff * rb,
struct rb_entry * e);
struct rb_entry * shm_ap_rbuff_read(struct shm_ap_rbuff * rb);
+int shm_ap_rbuff_peek(struct shm_ap_rbuff * rb,
+ const struct timespec * timeout);
ssize_t shm_ap_rbuff_read_port(struct shm_ap_rbuff * rb,
int port_id);
pid_t shm_ap_rbuff_get_api(struct shm_ap_rbuff * rb);
diff --git a/include/ouroboros/shm_du_map.h b/include/ouroboros/shm_du_map.h
index 11fe35c6..b9c56cf8 100644
--- a/include/ouroboros/shm_du_map.h
+++ b/include/ouroboros/shm_du_map.h
@@ -39,13 +39,12 @@ void shm_du_map_destroy(struct shm_du_map * dum);
void * shm_du_map_sanitize(void * o);
/* returns the index of the buffer in the DU map */
-ssize_t shm_du_map_write(struct shm_du_map * dum,
- pid_t dst_api,
- size_t headspace,
- size_t tailspace,
- uint8_t * data,
- size_t data_len);
-
+ssize_t shm_du_map_write(struct shm_du_map * dum,
+ pid_t dst_api,
+ size_t headspace,
+ size_t tailspace,
+ uint8_t * data,
+ size_t data_len);
int shm_du_map_read(uint8_t ** dst,
struct shm_du_map * dum,
ssize_t idx);