Mercurial > archived > louis > epitech > mq > rathaxes
comparison rathaxes_rename_pci_device_to_pci_abstractdevice.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 | 3e715b3e0ecd |
children |
comparison
equal
deleted
inserted
replaced
98:147519512c3d | 99:e2c237d6c37b |
---|---|
1 # HG changeset patch | 1 # HG changeset patch |
2 # Parent 71f853429e57cb8926fb03e2cacf04a45ad4e8dd | 2 # Parent 4fad2a334860f1c79c7f735c48cd70f6bcadbcad |
3 rathaxes: rename PCI::Device to PCI::AbstractDevice in the e1000 sample | 3 rathaxes: rename PCI::Device to PCI::AbstractDevice in the e1000 sample |
4 | 4 |
5 To respect my "new" convention of prefixing Rathaxes types that just map | 5 To respect my "new" convention of prefixing Rathaxes types that just map |
6 types from the kernel with "Abstract". | 6 types from the kernel with "Abstract". |
7 | 7 |
8 | |
9 diff --git a/rathaxes/samples/e1000/e1000.blt b/rathaxes/samples/e1000/e1000.blt | 8 diff --git a/rathaxes/samples/e1000/e1000.blt b/rathaxes/samples/e1000/e1000.blt |
10 --- a/rathaxes/samples/e1000/e1000.blt | 9 --- a/rathaxes/samples/e1000/e1000.blt |
11 +++ b/rathaxes/samples/e1000/e1000.blt | 10 +++ b/rathaxes/samples/e1000/e1000.blt |
12 @@ -479,7 +479,7 @@ | 11 @@ -447,7 +447,7 @@ |
13 | 12 |
14 template sequence e1000::create_device() | 13 template sequence e1000::create_device() |
15 { | 14 { |
16 - chunk Ethernet::create_device(PCI::Device pdev, Ethernet::Device rtx_ether_ctx) | 15 - chunk Ethernet::create_device(PCI::Device pdev, Ethernet::Device rtx_ether_ctx) |
17 + chunk Ethernet::create_device(PCI::AbstractDevice pdev, Ethernet::Device rtx_ether_ctx) | 16 + chunk Ethernet::create_device(PCI::AbstractDevice pdev, Ethernet::Device rtx_ether_ctx) |
18 { | 17 { |
19 /* | 18 /* |
20 * PCI init stuff: | 19 * PCI init stuff: |
21 @@ -547,7 +547,7 @@ | 20 @@ -515,7 +515,7 @@ |
22 | 21 |
23 template sequence e1000::destroy_device() | 22 template sequence e1000::destroy_device() |
24 { | 23 { |
25 - chunk Ethernet::destroy_device(PCI::Device pdev, Ethernet::Device rtx_ether_ctx) | 24 - chunk Ethernet::destroy_device(PCI::Device pdev, Ethernet::Device rtx_ether_ctx) |
26 + chunk Ethernet::destroy_device(PCI::AbstractDevice pdev, Ethernet::Device rtx_ether_ctx) | 25 + chunk Ethernet::destroy_device(PCI::AbstractDevice pdev, Ethernet::Device rtx_ether_ctx) |
28 /* | 27 /* |
29 * Here, we should have some checks to avoid to free resources that | 28 * Here, we should have some checks to avoid to free resources that |
30 diff --git a/rathaxes/samples/e1000/e1000.rti b/rathaxes/samples/e1000/e1000.rti | 29 diff --git a/rathaxes/samples/e1000/e1000.rti b/rathaxes/samples/e1000/e1000.rti |
31 --- a/rathaxes/samples/e1000/e1000.rti | 30 --- a/rathaxes/samples/e1000/e1000.rti |
32 +++ b/rathaxes/samples/e1000/e1000.rti | 31 +++ b/rathaxes/samples/e1000/e1000.rti |
33 @@ -78,13 +78,13 @@ | 32 @@ -72,13 +72,13 @@ |
34 | 33 |
35 provided sequence create_device() | 34 provided sequence create_device() |
36 { | 35 { |
37 - provided chunk Ethernet::create_device(PCI::Device, Ethernet::Device); | 36 - provided chunk Ethernet::create_device(PCI::Device, Ethernet::Device); |
38 + provided chunk Ethernet::create_device(PCI::AbstractDevice, Ethernet::Device); | 37 + provided chunk Ethernet::create_device(PCI::AbstractDevice, Ethernet::Device); |
60 struct pci_dev *pci_dev; | 59 struct pci_dev *pci_dev; |
61 @@ -100,7 +100,7 @@ | 60 @@ -100,7 +100,7 @@ |
62 } *rtx_ethernet_dev_p; | 61 } *rtx_ethernet_dev_p; |
63 } | 62 } |
64 | 63 |
65 - chunk ::init(Ethernet::AbstractDevice net_dev, PCI::Device pci_dev) | 64 - method init(Ethernet::AbstractDevice net_dev, PCI::Device pci_dev) |
66 + chunk ::init(Ethernet::AbstractDevice net_dev, PCI::AbstractDevice pci_dev) | 65 + method init(Ethernet::AbstractDevice net_dev, PCI::AbstractDevice pci_dev) |
67 { | 66 { |
68 ${self} = netdev_priv(${net_dev}); | 67 ${self} = netdev_priv(${net_dev}); |
69 /* | 68 /* |
70 @@ -211,7 +211,7 @@ | 69 @@ -211,7 +211,7 @@ |
71 } | 70 } |
87 struct net_device *net_dev = pci_get_drvdata(${pdev}); | 86 struct net_device *net_dev = pci_get_drvdata(${pdev}); |
88 diff --git a/rathaxes/samples/e1000/ethernet.rti b/rathaxes/samples/e1000/ethernet.rti | 87 diff --git a/rathaxes/samples/e1000/ethernet.rti b/rathaxes/samples/e1000/ethernet.rti |
89 --- a/rathaxes/samples/e1000/ethernet.rti | 88 --- a/rathaxes/samples/e1000/ethernet.rti |
90 +++ b/rathaxes/samples/e1000/ethernet.rti | 89 +++ b/rathaxes/samples/e1000/ethernet.rti |
91 @@ -17,16 +17,11 @@ | 90 @@ -17,16 +17,11 @@ |
92 method decl(); | 91 decl data_types(); |
93 } | 92 } |
94 | 93 |
95 - /* | 94 - /* |
96 - * Unlike PCI::Device, Ethernet::Device doesn't match the struct net_device | 95 - * Unlike PCI::Device, Ethernet::Device doesn't match the struct net_device |
97 - * from Linux. Ethernet::Device is the type that we use in the private | 96 - * from Linux. Ethernet::Device is the type that we use in the private |
98 - * field of the struct net_device. | 97 - * field of the struct net_device. |
99 - */ | 98 - */ |
100 provided type Device | 99 provided type Device |
101 { | 100 { |
102 chunk LKM::includes(); | 101 chunk LKM::includes(); |
103 method decl(); | 102 decl data_types(); |
104 - method init(Ethernet::AbstractDevice, PCI::Device); | 103 - method init(Ethernet::AbstractDevice, PCI::Device); |
105 + method init(Ethernet::AbstractDevice, PCI::AbstractDevice); | 104 + method init(Ethernet::AbstractDevice, PCI::AbstractDevice); |
106 pointcut Ethernet::SubContext(); | 105 pointcut Ethernet::SubContext(); |
107 } | 106 } |
108 | 107 |
139 { | 138 { |
140 @@ -12,7 +12,7 @@ | 139 @@ -12,7 +12,7 @@ |
141 struct pci_dev; | 140 struct pci_dev; |
142 } | 141 } |
143 | 142 |
144 - chunk ::init(PCI::Device) | 143 - method init(PCI::Device) |
145 + chunk ::init(PCI::AbstractDevice) | 144 + method init(PCI::AbstractDevice) |
146 { | 145 { |
147 } | 146 } |
148 | 147 |
149 @@ -41,7 +41,7 @@ | 148 @@ -41,7 +41,7 @@ |
150 goto fail; | 149 goto fail; |
172 { | 171 { |
173 - provided type PCI::Device | 172 - provided type PCI::Device |
174 + provided type PCI::AbstractDevice | 173 + provided type PCI::AbstractDevice |
175 { | 174 { |
176 chunk LKM::includes(); | 175 chunk LKM::includes(); |
177 method decl(); | 176 decl data_types(); |
178 - method init(PCI::Device); | 177 - method init(PCI::Device); |
179 + method init(PCI::AbstractDevice); | 178 + method init(PCI::AbstractDevice); |
180 } | 179 } |
181 | 180 |
182 required variable Builtin::number PCI::vendor_id; | 181 required variable Builtin::number PCI::vendor_id; |