Mercurial > archived > louis > epitech > mq > rathaxes
comparison rathaxes_cleanups_in_ethernet_rti_blt.patch @ 99:e2c237d6c37b
Update patches against David's new decl system
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Thu, 22 Nov 2012 22:47:25 -0800 |
parents | 147519512c3d |
children |
comparison
equal
deleted
inserted
replaced
98:147519512c3d | 99:e2c237d6c37b |
---|---|
1 # HG changeset patch | 1 # HG changeset patch |
2 # Parent 6cc56c206e65a31121a9e9745003fed8276b0b60 | 2 # Parent 47ae8b89654899f0d6e2c0d656ca52c996d53262 |
3 rathaxes: tidy up ethernet.{rti,blt} in the e1000 sample | 3 rathaxes: tidy up ethernet.{rti,blt} in the e1000 sample |
4 | 4 |
5 - Remove typedefs; | 5 - Remove typedefs; |
6 - Rename Ethernet::SubContext in Ethernet::HardwareContext: I think this | 6 - Rename Ethernet::SubContext in Ethernet::HardwareContext: I think this |
7 is more clear. This pointcut is here to allow the underlying real | 7 is more clear. This pointcut is here to allow the underlying real |
9 Ethernet subsystem. | 9 Ethernet subsystem. |
10 | 10 |
11 diff --git a/rathaxes/samples/e1000/e1000.blt b/rathaxes/samples/e1000/e1000.blt | 11 diff --git a/rathaxes/samples/e1000/e1000.blt b/rathaxes/samples/e1000/e1000.blt |
12 --- a/rathaxes/samples/e1000/e1000.blt | 12 --- a/rathaxes/samples/e1000/e1000.blt |
13 +++ b/rathaxes/samples/e1000/e1000.blt | 13 +++ b/rathaxes/samples/e1000/e1000.blt |
14 @@ -284,7 +284,7 @@ | 14 @@ -267,7 +267,7 @@ |
15 }; | 15 }; |
16 } | 16 } |
17 | 17 |
18 - chunk Ethernet::SubContext() | 18 - chunk Ethernet::SubContext() |
19 + chunk Ethernet::HardwareContext() | 19 + chunk Ethernet::HardwareContext() |
21 /* | 21 /* |
22 * Force the generation of the structure in the "headers" part, we | 22 * Force the generation of the structure in the "headers" part, we |
23 diff --git a/rathaxes/samples/e1000/e1000.rti b/rathaxes/samples/e1000/e1000.rti | 23 diff --git a/rathaxes/samples/e1000/e1000.rti b/rathaxes/samples/e1000/e1000.rti |
24 --- a/rathaxes/samples/e1000/e1000.rti | 24 --- a/rathaxes/samples/e1000/e1000.rti |
25 +++ b/rathaxes/samples/e1000/e1000.rti | 25 +++ b/rathaxes/samples/e1000/e1000.rti |
26 @@ -9,7 +9,7 @@ | 26 @@ -7,7 +7,7 @@ |
27 | |
28 provided type Context | |
27 { | 29 { |
28 method decl(); | |
29 | |
30 - chunk Ethernet::SubContext(); | 30 - chunk Ethernet::SubContext(); |
31 + chunk Ethernet::HardwareContext(); | 31 + chunk Ethernet::HardwareContext(); |
32 decl data_types(); | |
33 method init(); | |
32 | 34 |
33 /* Callbacks/Hooks which should probably be in the front-end: */ | |
34 chunk Ethernet::adapter_init_context(Ethernet::Device, | |
35 diff --git a/rathaxes/samples/e1000/ethernet.blt b/rathaxes/samples/e1000/ethernet.blt | 35 diff --git a/rathaxes/samples/e1000/ethernet.blt b/rathaxes/samples/e1000/ethernet.blt |
36 --- a/rathaxes/samples/e1000/ethernet.blt | 36 --- a/rathaxes/samples/e1000/ethernet.blt |
37 +++ b/rathaxes/samples/e1000/ethernet.blt | 37 +++ b/rathaxes/samples/e1000/ethernet.blt |
38 @@ -59,7 +59,7 @@ | 38 @@ -59,7 +59,7 @@ |
39 | 39 |
40 chunk ::decl() | 40 decl data_types() |
41 { | 41 { |
42 - typedef struct net_device *net_devp; | 42 - typedef struct net_device *net_devp; |
43 + struct net_device; | 43 + struct net_device; |
44 } | 44 } |
45 | 45 |
46 map | 46 map |
47 @@ -76,14 +76,7 @@ | 47 @@ -76,14 +76,7 @@ |
48 | 48 |
49 chunk ::decl() | 49 decl data_types() |
50 { | 50 { |
51 - /* | 51 - /* |
52 - * So, at first sight, it sucks to typedef it as pointer but (for | 52 - * So, at first sight, it sucks to typedef it as pointer but (for |
53 - * now) it makes sense for two reasons: | 53 - * now) it makes sense for two reasons: |
54 - * - This structure will always be used through a pointer; | 54 - * - This structure will always be used through a pointer; |
68 - } *rtx_ethernet_dev_p; | 68 - } *rtx_ethernet_dev_p; |
69 + ${pointcut Ethernet::HardwareContext()}; | 69 + ${pointcut Ethernet::HardwareContext()}; |
70 + }; | 70 + }; |
71 } | 71 } |
72 | 72 |
73 chunk ::init(Ethernet::AbstractDevice net_dev, PCI::AbstractDevice pci_dev) | 73 method init(Ethernet::AbstractDevice net_dev, PCI::AbstractDevice pci_dev) |
74 @@ -105,7 +98,7 @@ | 74 @@ -105,7 +98,7 @@ |
75 ${self} = netdev_priv(${net_dev}); | 75 ${self} = netdev_priv(${net_dev}); |
76 /* | 76 /* |
77 * We can use -> because we know that ${self} will be always a | 77 * We can use -> because we know that ${self} will be always a |
78 - * pointer ("thanks" to the typedef) | 78 - * pointer ("thanks" to the typedef) |
160 diff --git a/rathaxes/samples/e1000/ethernet.rti b/rathaxes/samples/e1000/ethernet.rti | 160 diff --git a/rathaxes/samples/e1000/ethernet.rti b/rathaxes/samples/e1000/ethernet.rti |
161 --- a/rathaxes/samples/e1000/ethernet.rti | 161 --- a/rathaxes/samples/e1000/ethernet.rti |
162 +++ b/rathaxes/samples/e1000/ethernet.rti | 162 +++ b/rathaxes/samples/e1000/ethernet.rti |
163 @@ -22,7 +22,7 @@ | 163 @@ -22,7 +22,7 @@ |
164 chunk LKM::includes(); | 164 chunk LKM::includes(); |
165 method decl(); | 165 decl data_types(); |
166 method init(Ethernet::AbstractDevice, PCI::AbstractDevice); | 166 method init(Ethernet::AbstractDevice, PCI::AbstractDevice); |
167 - pointcut Ethernet::SubContext(); | 167 - pointcut Ethernet::SubContext(); |
168 + pointcut Ethernet::HardwareContext(); | 168 + pointcut Ethernet::HardwareContext(); |
169 | 169 |
170 attribute PCI::AbstractDevice pci_device; | 170 attribute PCI::AbstractDevice pci_device; |