Commit e246a91b authored by Alessandro Rubini's avatar Alessandro Rubini

general (for diag): add ppi->flags and global flags

I'm going to split diagnostics into groups based on flags. And
with different diagnostics for each pp instance, to be ready to
debug multi-link situations.  This commit adds the flags in the proper
places and the first flag value, used in the next commit.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent ca608403
......@@ -4,6 +4,8 @@
#include <ppsi/ppsi.h>
#include <ppsi/diag.h>
unsigned long pp_global_flags; /* This is the only "global" file in ppsi */
/*
* This is the state machine code. i.e. the extension-independent
* function that runs the machine. Errors are managed and reported
......
......@@ -137,7 +137,7 @@ struct pp_net_path {
#define PROTO_PAYLOAD(x) ( (x) + NP(ppi)->proto_ofst);
/*
* Structure for the standard protocol
* Structure for the individual ppsi link
*/
struct pp_instance {
int state;
......@@ -147,6 +147,7 @@ struct pp_instance {
struct pp_runtime_opts *rt_opts;
struct pp_net_path *net_path;
struct pp_servo *servo;
unsigned long flags; /* ppi-specific flags (diag mainly) */
/* Data sets */
DSDefault *defaultDS; /* page 65 */
......@@ -187,6 +188,10 @@ struct pp_instance {
waiting_for_follow:1;
};
extern unsigned long pp_global_flags; /* Supplement ppi-specific ones */
#define PP_FLAG_NOTIMELOG 1 /* This is for a special case, I'm sorry */
/* We use data sets a lot, so have these helpers */
static inline struct pp_runtime_opts *OPTS(struct pp_instance *ppi)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment