@@ -152,9 +152,10 @@ VirtioNet::VirtioNet(hw::PCI_Device& d)
152152 if (is_msix ())
153153 {
154154 // for now use service queues, otherwise stress test fails
155- auto recv_del (delegate<void ()>::from<VirtioNet,&VirtioNet::msix_recv_handler>(this ));
156- auto xmit_del (delegate<void ()>::from<VirtioNet,&VirtioNet::msix_xmit_handler>(this ));
157- auto conf_del (delegate<void ()>::from<VirtioNet,&VirtioNet::msix_conf_handler>(this ));
155+ auto recv_del (delegate<void ()>{this , &VirtioNet::msix_recv_handler});
156+ auto xmit_del (delegate<void ()>{this , &VirtioNet::msix_xmit_handler});
157+ auto conf_del (delegate<void ()>{this , &VirtioNet::msix_conf_handler});
158+
158159 // update BSP IDT
159160 IRQ_manager::get ().subscribe (irq () + 0 , recv_del);
160161 IRQ_manager::get ().subscribe (irq () + 1 , xmit_del);
@@ -163,7 +164,7 @@ VirtioNet::VirtioNet(hw::PCI_Device& d)
163164 else
164165 {
165166 // legacy PCI interrupt
166- auto del (delegate<void ()>::from<VirtioNet, &VirtioNet::irq_handler>( this ) );
167+ auto del (delegate<void ()>{ this , &VirtioNet::irq_handler} );
167168 IRQ_manager::get ().subscribe (irq (),del);
168169 }
169170
@@ -302,7 +303,7 @@ VirtioNet::recv_packet(uint8_t* data, uint16_t size)
302303{
303304 auto * ptr = (Packet*) (data + sizeof (VirtioNet::virtio_net_hdr) - sizeof (Packet));
304305 new (ptr) Packet (bufsize (), size,
305- delegate<void (void *)>::from<BufferStore , &BufferStore::release> (& bufstore ()) );
306+ delegate<void (void *)>{& bufstore () , &BufferStore::release} );
306307
307308 return std::shared_ptr<Packet> (ptr);
308309}
@@ -367,7 +368,7 @@ void VirtioNet::service_queues(){
367368 auto buf = transmit_queue_;
368369 transmit_queue_ = 0 ;
369370 transmit (buf);
370- }else {
371+ } else {
371372 debug (" <VirtioNet> Transmit queue is empty \n " );
372373 }
373374
@@ -400,7 +401,7 @@ void VirtioNet::add_to_tx_buffer(net::Packet_ptr pckt){
400401 debug (" Buffering, %i packets chained \n " , chain_length);
401402}
402403#include < cstdlib>
403- void VirtioNet::transmit (net::Packet_ptr pckt){
404+ void VirtioNet::transmit (net::Packet_ptr pckt) {
404405 /* * @note We have to send a virtio header first, then the packet.
405406
406407 From Virtio std. §5.1.6.6:
0 commit comments