Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
a1b593e1
Commit
a1b593e1
authored
Apr 24, 2018
by
Jean-Claude BAU
Committed by
Adam Wujek
Nov 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code optimization: force static functions when public is nor required
(636 bytes)
parent
1ab26446
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
18 deletions
+8
-18
ppsi.h
include/ppsi/ppsi.h
+0
-12
bmc.c
proto-standard/bmc.c
+8
-6
No files found.
include/ppsi/ppsi.h
View file @
a1b593e1
...
...
@@ -376,25 +376,13 @@ extern void bmc_s1(struct pp_instance *ppi,
struct
pp_frgn_master
*
frgn_master
);
extern
void
bmc_p1
(
struct
pp_instance
*
ppi
);
extern
void
bmc_p2
(
struct
pp_instance
*
ppi
);
extern
void
bmc_setup_local_frgn_master
(
struct
pp_instance
*
ppi
,
struct
pp_frgn_master
*
frgn_master
);
extern
int
bmc_idcmp
(
struct
ClockIdentity
*
a
,
struct
ClockIdentity
*
b
);
extern
int
bmc_pidcmp
(
struct
PortIdentity
*
a
,
struct
PortIdentity
*
b
);
extern
int
bmc
(
struct
pp_instance
*
ppi
);
extern
int
bmc_gm_cmp
(
struct
pp_instance
*
ppi
,
struct
pp_frgn_master
*
a
,
struct
pp_frgn_master
*
b
);
extern
int
bmc_topology_cmp
(
struct
pp_instance
*
ppi
,
struct
pp_frgn_master
*
a
,
struct
pp_frgn_master
*
b
);
extern
int
bmc_dataset_cmp
(
struct
pp_instance
*
ppi
,
struct
pp_frgn_master
*
a
,
struct
pp_frgn_master
*
b
);
extern
void
bmc_store_frgn_master
(
struct
pp_instance
*
ppi
,
struct
pp_frgn_master
*
frgn_master
,
void
*
buf
,
int
len
);
extern
void
bmc_add_frgn_master
(
struct
pp_instance
*
ppi
,
void
*
buf
,
int
len
);
extern
int
bmc_check_frgn_master
(
struct
pp_instance
*
ppi
);
/* msg.c */
extern
void
msg_init_header
(
struct
pp_instance
*
ppi
,
void
*
buf
);
...
...
proto-standard/bmc.c
View file @
a1b593e1
...
...
@@ -301,7 +301,7 @@ void bmc_p2(struct pp_instance *ppi)
}
/* Copy local data set into header and announce message. 9.3.4 table 12. */
void
bmc_setup_local_frgn_master
(
struct
pp_instance
*
ppi
,
static
void
bmc_setup_local_frgn_master
(
struct
pp_instance
*
ppi
,
struct
pp_frgn_master
*
frgn_master
)
{
int
i
;
...
...
@@ -348,7 +348,7 @@ int bmc_pidcmp(struct PortIdentity *a, struct PortIdentity *b)
}
/* compare part2 of the datasets which is the topology, fig 27, page 89 */
int
bmc_gm_cmp
(
struct
pp_instance
*
ppi
,
static
int
bmc_gm_cmp
(
struct
pp_instance
*
ppi
,
struct
pp_frgn_master
*
a
,
struct
pp_frgn_master
*
b
)
{
...
...
@@ -434,7 +434,7 @@ int bmc_gm_cmp(struct pp_instance *ppi,
}
/* compare part2 of the datasets which is the topology, fig 28, page 90 */
int
bmc_topology_cmp
(
struct
pp_instance
*
ppi
,
static
int
bmc_topology_cmp
(
struct
pp_instance
*
ppi
,
struct
pp_frgn_master
*
a
,
struct
pp_frgn_master
*
b
)
{
...
...
@@ -544,12 +544,13 @@ int bmc_topology_cmp(struct pp_instance *ppi,
return
bmc_pidcmp
(
pidrxa
,
pidrxb
);
}
/*
* Data set comparison between two foreign masters. Return similar to
* memcmp(). However, lower values take precedence, so in A-B (like
* in comparisons, > 0 means B wins (and < 0 means A wins).
*/
int
bmc_dataset_cmp
(
struct
pp_instance
*
ppi
,
static
int
bmc_dataset_cmp
(
struct
pp_instance
*
ppi
,
struct
pp_frgn_master
*
a
,
struct
pp_frgn_master
*
b
)
{
...
...
@@ -565,6 +566,7 @@ int bmc_dataset_cmp(struct pp_instance *ppi,
}
}
/* State decision algorithm 9.3.3 Fig 26 */
static
int
bmc_state_decision
(
struct
pp_instance
*
ppi
)
{
...
...
@@ -1090,7 +1092,7 @@ static void bmc_age_frgn_master(struct pp_instance *ppi)
/* returns 0 if erbest is not from another port of the device,
* 1 if the port shall go to passive
*/
int
bmc_check_frgn_master
(
struct
pp_instance
*
ppi
)
static
int
bmc_check_frgn_master
(
struct
pp_instance
*
ppi
)
{
int
i
;
struct
PortIdentity
*
pid
;
...
...
@@ -1145,7 +1147,7 @@ static int bmc_any_port_initializing(struct pp_globals *ppg)
return
0
;
}
static
void
inline
bmc_update_erbest_inst
(
struct
pp_instance
*
ppi
)
{
static
void
bmc_update_erbest_inst
(
struct
pp_instance
*
ppi
)
{
struct
pp_frgn_master
*
frgn_master
;
PortIdentity
*
frgn_master_pid
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment