comparison rathaxes_samples_e1000_add_alloc_sequences_in_socket.patch @ 111:b072f682823d

Start a new series to refactor e1000::set_up_device
author Louis Opter <louis@lse.epita.fr>
date Sun, 14 Jul 2013 23:14:33 -0700
parents
children b22983cb9e3a
comparison
equal deleted inserted replaced
110:b83b0432a45b 111:b072f682823d
1 # HG changeset patch
2 # Parent 0082bea09b4bed6ed6215afb7a14d43a948cecd8
3 Add alloc_rx and alloc_tx in the Socket abstraction
4
5 This will help to hide platform dependent code from
6 e1000::set_up_device.
7
8
9 diff --git a/rathaxes/samples/e1000/socket.rti b/rathaxes/samples/e1000/socket.rti
10 --- a/rathaxes/samples/e1000/socket.rti
11 +++ b/rathaxes/samples/e1000/socket.rti
12 @@ -1,4 +1,4 @@
13 -interface Socket : LKM, Device
14 +interface Socket : LKM, Device, Ethernet, Builtin
15 {
16 /* The SKBuff type from the kernel */
17 provided type AbstractSKBuff
18 @@ -10,14 +10,24 @@
19
20 provided type SKBuff
21 {
22 - chunk LKM::prototypes();
23 - chunk LKM::code();
24 - decl data_types();
25 - method init(Socket::AbstractSKBuff);
26 - method dump_infos();
27 - method map_to(Device::AbstractDevice);
28 - method map_from(Device::AbstractDevice);
29 - method unmap_to_and_free(Device::AbstractDevice);
30 - method unmap_from_and_free(Device::AbstractDevice);
31 + chunk LKM::prototypes();
32 + chunk LKM::code();
33 + decl data_types();
34 + method init(Socket::AbstractSKBuff);
35 + method dump_infos();
36 + method map_to(Device::AbstractDevice);
37 + method map_from(Device::AbstractDevice);
38 + method unmap_to_and_free(Device::AbstractDevice);
39 + method unmap_from_and_free(Device::AbstractDevice);
40 + }
41 +
42 + provided sequence alloc_rx(Ethernet::Device, Builtin::number)
43 + {
44 + chunk ::CALL();
45 + }
46 +
47 + provided sequence alloc_tx(Ethernet::Device, Builtin::number)
48 + {
49 + chunk ::CALL();
50 }
51 }