summaryrefslogtreecommitdiffhomepage
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-07-30 11:12:23 +0000
committermidipix <writeonce@midipix.org>2018-08-03 21:13:29 -0400
commitf1dbc60ab6cc4bc2422441c9028c7edc56684b82 (patch)
tree5a87872c2e7f8882355680dc56bda3d6d88a8b84 /src/internal
parent69198475911da5e1f543178bc0a801aac5ff2bc0 (diff)
downloadmdso-f1dbc60ab6cc4bc2422441c9028c7edc56684b82.tar.bz2
mdso-f1dbc60ab6cc4bc2422441c9028c7edc56684b82.tar.xz
driver, library interfaces: support alternate fd's for input/output/error/log.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/mdso_driver_impl.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/internal/mdso_driver_impl.h b/src/internal/mdso_driver_impl.h
index 8fe6f35..fc4782f 100644
--- a/src/internal/mdso_driver_impl.h
+++ b/src/internal/mdso_driver_impl.h
@@ -48,6 +48,7 @@ struct mdso_expsyms {
struct mdso_driver_ctx_impl {
struct mdso_common_ctx cctx;
struct mdso_driver_ctx ctx;
+ struct mdso_fd_ctx fdctx;
char * asmbase;
char * implib;
int fddst;
@@ -93,4 +94,46 @@ static inline void mdso_driver_set_ectx(
ictx->eunit = unit;
}
+static inline int mdso_driver_fdin(const struct mdso_driver_ctx * dctx)
+{
+ struct mdso_fd_ctx fdctx;
+ mdso_get_driver_fdctx(dctx,&fdctx);
+ return fdctx.fdin;
+}
+
+static inline int mdso_driver_fdout(const struct mdso_driver_ctx * dctx)
+{
+ struct mdso_fd_ctx fdctx;
+ mdso_get_driver_fdctx(dctx,&fdctx);
+ return fdctx.fdout;
+}
+
+static inline int mdso_driver_fderr(const struct mdso_driver_ctx * dctx)
+{
+ struct mdso_fd_ctx fdctx;
+ mdso_get_driver_fdctx(dctx,&fdctx);
+ return fdctx.fderr;
+}
+
+static inline int mdso_driver_fdlog(const struct mdso_driver_ctx * dctx)
+{
+ struct mdso_fd_ctx fdctx;
+ mdso_get_driver_fdctx(dctx,&fdctx);
+ return fdctx.fdlog;
+}
+
+static inline int mdso_driver_fdcwd(const struct mdso_driver_ctx * dctx)
+{
+ struct mdso_fd_ctx fdctx;
+ mdso_get_driver_fdctx(dctx,&fdctx);
+ return fdctx.fdcwd;
+}
+
+static inline int mdso_driver_fddst(const struct mdso_driver_ctx * dctx)
+{
+ struct mdso_fd_ctx fdctx;
+ mdso_get_driver_fdctx(dctx,&fdctx);
+ return fdctx.fddst;
+}
+
#endif