1#ifndef COMMON_H 2#define COMMON_H 3 4#include <bulk_transfer/bulk_transfer.h> 5#include <bulk_transfer/bulk_allocator.h> 6 7#define expect_success(e) expect_success_(e,__FILE__,__LINE__) 8 9static inline void expect_success_(errval_t err, const char *file, 10 int line) 11{ 12 if (err_is_ok(err)) return; 13 debug_printf("Operation on %s:%d failed unexpectedly\n", file, line); 14 err_print_calltrace(err); 15 abort(); 16} 17 18void initialize_channel(const char *str, struct bulk_channel *channel, 19 struct bulk_channel_callbacks *cb, struct waitset *ws, 20 enum bulk_channel_direction dir, size_t bufsz, size_t metasz, 21 bool *done); 22 23errval_t cb_bind_received(struct bulk_channel *channel); 24extern bool is_no_copy; 25 26#endif // ndef COMMON_H 27 28