From 9a382d263f4ace806724dcf4c9d96d7180c234f8 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 25 Oct 2016 17:03:43 -0400 Subject: driver: internals: error trace support: added unit context marks. --- src/internal/perk_driver_impl.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/internal') diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h index f3af901..843d3f1 100644 --- a/src/internal/perk_driver_impl.h +++ b/src/internal/perk_driver_impl.h @@ -29,6 +29,8 @@ struct pe_driver_ctx_impl { struct pe_io_ctx ioctx; struct pe_common_ctx cctx; struct pe_driver_ctx ctx; + const struct pe_unit_ctx * euctx; + const char * eunit; struct pe_error_info ** errinfp; struct pe_error_info ** erricap; struct pe_error_info * erriptr[64]; @@ -57,4 +59,16 @@ static inline struct pe_driver_ctx_impl * pe_get_driver_ictx( return 0; } +static inline void pe_driver_set_ectx( + const struct pe_driver_ctx * dctx, + const struct pe_unit_ctx * uctx, + const char * unit) +{ + struct pe_driver_ctx_impl * ictx; + + ictx = pe_get_driver_ictx(dctx); + ictx->euctx = uctx; + ictx->eunit = unit; +} + #endif -- cgit v1.2.3