#ifndef SP_RSN_H #define SP_RSN_H #pragma once /* runtime serial number */ #include "sp_uid.h" #define SP_RSN_UNKNOWN 0ULL #define SP_ORIGINAL_T_UNKNOWN 0 #define SP_ORIGINAL_T_TIMER 1 #define SP_ORIGINAL_T_CALLBACK 2 #define SP_ORIGINAL_T_USER 3 #define SP_ORIGINAL_T_FRAMEWORK 4 typedef struct sp_rsn_context_t { sp_uid_t previous_rsn; sp_uid_t current_rsn; int original_type; int depth; }sp_rsn_context_t; void sp_rsn_context_init_original(sp_uid_t rsn, int original_type, sp_rsn_context_t *ctx); void sp_rsn_context_init_downstream(sp_uid_t rsn, const sp_rsn_context_t *upstream, sp_rsn_context_t *ctx); sp_rsn_context_t *sp_rsn_context_create_original(sp_uid_t rsn, int original_type); sp_rsn_context_t *sp_rsn_context_create_downstream(sp_uid_t rsn, const sp_rsn_context_t *upstream); void sp_rsn_context_destroy(sp_rsn_context_t *ctx); void sp_rsn_context_copy(sp_rsn_context_t *dst_ctx, const sp_rsn_context_t *src_ctx); sp_rsn_context_t *sp_rsn_context_clone(const sp_rsn_context_t *src_ctx); #endif // SP_RSN_H