Commit a52040a9 authored by Aurelio Colosimo's avatar Aurelio Colosimo

servo moved to struct pp_globals

Signed-off-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
parent 16707d53
...@@ -63,7 +63,7 @@ int main(int argc, char **argv) ...@@ -63,7 +63,7 @@ int main(int argc, char **argv)
ppi->parentDS = calloc(1, sizeof(*ppi->parentDS)); ppi->parentDS = calloc(1, sizeof(*ppi->parentDS));
ppi->portDS = calloc(1, sizeof(*ppi->portDS)); ppi->portDS = calloc(1, sizeof(*ppi->portDS));
ppi->timePropertiesDS = calloc(1, sizeof(*ppi->timePropertiesDS)); ppi->timePropertiesDS = calloc(1, sizeof(*ppi->timePropertiesDS));
ppi->servo = calloc(1, sizeof(*ppi->servo)); GLBS(ppi)->servo = calloc(1, sizeof(*GLBS(ppi)->servo));
ppi->arch_data = calloc(1, sizeof(struct posix_arch_data)); ppi->arch_data = calloc(1, sizeof(struct posix_arch_data));
ppi->n_ops = &posix_net_ops; ppi->n_ops = &posix_net_ops;
......
...@@ -134,7 +134,6 @@ struct pp_instance { ...@@ -134,7 +134,6 @@ struct pp_instance {
void *arch_data; /* if arch needs it */ void *arch_data; /* if arch needs it */
void *ext_data; /* if protocol ext needs it */ void *ext_data; /* if protocol ext needs it */
struct pp_runtime_opts *rt_opts; struct pp_runtime_opts *rt_opts;
struct pp_servo *servo;
unsigned long flags; /* ppi-specific flags (diag mainly) */ unsigned long flags; /* ppi-specific flags (diag mainly) */
/* Pointer to global instance owning this pp_instance*/ /* Pointer to global instance owning this pp_instance*/
...@@ -190,6 +189,8 @@ struct pp_globals { ...@@ -190,6 +189,8 @@ struct pp_globals {
Integer16 frgn_rec_i; Integer16 frgn_rec_i;
Integer16 frgn_rec_best; Integer16 frgn_rec_best;
struct pp_frgn_master frgn_master[PP_NR_FOREIGN_RECORDS]; struct pp_frgn_master frgn_master[PP_NR_FOREIGN_RECORDS];
struct pp_servo *servo;
/* FIXME Here include all is common to many interfaces */ /* FIXME Here include all is common to many interfaces */
}; };
......
...@@ -68,7 +68,7 @@ static inline struct pp_net_path *NP(struct pp_instance *ppi) ...@@ -68,7 +68,7 @@ static inline struct pp_net_path *NP(struct pp_instance *ppi)
static inline struct pp_servo *SRV(struct pp_instance *ppi) static inline struct pp_servo *SRV(struct pp_instance *ppi)
{ {
return ppi->servo; return GLBS(ppi)->servo;
} }
......
...@@ -44,7 +44,7 @@ int ppsi_main(int argc, char **argv) ...@@ -44,7 +44,7 @@ int ppsi_main(int argc, char **argv)
ppi->parentDS = &parentDS; ppi->parentDS = &parentDS;
ppi->portDS = &portDS; ppi->portDS = &portDS;
ppi->timePropertiesDS = &timePropertiesDS; ppi->timePropertiesDS = &timePropertiesDS;
ppi->servo = &servo; GLBS(ppi)->servo = &servo;
ppi->arch_data = NULL; ppi->arch_data = NULL;
ppi->n_ops = &bare_net_ops; ppi->n_ops = &bare_net_ops;
ppi->t_ops = &bare_time_ops; ppi->t_ops = &bare_time_ops;
......
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