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
47
Issues
47
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
b07673a4
Commit
b07673a4
authored
Dec 04, 2013
by
Pietro Fezzardi
Committed by
Alessandro Rubini
Mar 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arch-sim: refactorized net_ops
parent
7cd3719d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
14 deletions
+2
-14
ppsi-sim.h
arch-sim/ppsi-sim.h
+0
-3
sim-startup.c
arch-sim/sim-startup.c
+1
-2
sim-socket.c
time-sim/sim-socket.c
+1
-9
No files found.
arch-sim/ppsi-sim.h
View file @
b07673a4
...
...
@@ -124,6 +124,3 @@ static inline int pp_sim_is_slave(struct pp_instance *ppi)
extern
int
sim_fast_forward_ns
(
struct
pp_globals
*
ppg
,
int64_t
ff_ns
);
extern
int
sim_set_global_DS
(
struct
pp_instance
*
ppi
);
extern
void
sim_main_loop
(
struct
pp_globals
*
ppg
);
extern
struct
pp_network_operations
sim_master_net_ops
;
extern
struct
pp_network_operations
sim_slave_net_ops
;
arch-sim/sim-startup.c
View file @
b07673a4
...
...
@@ -154,13 +154,12 @@ int main(int argc, char **argv)
ppi
->
slave_only
=
1
;
}
ppi
->
t_ops
=
&
DEFAULT_TIME_OPS
;
ppi
->
n_ops
=
&
DEFAULT_NET_OPS
;
}
sim_set_global_DS
(
ppi_master
);
pp_init_globals
(
ppg
,
&
sim_master_rt_opts
);
ppi_master
->
n_ops
=
&
sim_master_net_ops
;
sim_set_global_DS
(
ppi_slave
);
pp_init_globals
(
ppg
,
&
__pp_default_rt_opts
);
ppi_slave
->
n_ops
=
&
sim_slave_net_ops
;
sim_main_loop
(
ppg
);
return
0
;
...
...
time-sim/sim-socket.c
View file @
b07673a4
...
...
@@ -283,15 +283,7 @@ static int sim_net_init(struct pp_instance *ppi)
return
0
;
}
struct
pp_network_operations
sim_master_net_ops
=
{
.
init
=
sim_net_init
,
.
exit
=
sim_net_exit
,
.
recv
=
sim_net_recv
,
.
send
=
sim_net_send
,
.
check_packet
=
NULL
,
};
struct
pp_network_operations
sim_slave_net_ops
=
{
struct
pp_network_operations
sim_net_ops
=
{
.
init
=
sim_net_init
,
.
exit
=
sim_net_exit
,
.
recv
=
sim_net_recv
,
...
...
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