Mercurial > archived > louis > epitech > mq > rathaxes
view rathaxes_samples_e1000_add_alloc_sequences_in_socket.patch @ 118:ad21d8a182ad
WIP: put up (hopefully the last) some touches on the dma abstraction
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Fri, 26 Jul 2013 16:44:08 -0700 |
parents | b22983cb9e3a |
children | d84bc9a46771 |
line wrap: on
line source
# HG changeset patch # Parent 9f743313820393d900d65aa6f2532c7d820de04b Add alloc_rx and alloc_tx in the Socket abstraction This will help to hide platform dependent code from e1000::set_up_device. diff --git a/rathaxes/samples/e1000/socket.rti b/rathaxes/samples/e1000/socket.rti --- a/rathaxes/samples/e1000/socket.rti +++ b/rathaxes/samples/e1000/socket.rti @@ -1,4 +1,4 @@ -interface Socket : LKM, Device, DMA +interface Socket : LKM, Device, DMA, Ethernet, Builtin { /* The SKBuff type from the kernel */ provided type AbstractSKBuff @@ -10,15 +10,25 @@ provided type SKBuff { - chunk LKM::prototypes(); - chunk LKM::code(); - decl data_types(); - method init(Socket::AbstractSKBuff); - method dump_infos(); - method map_to(Device::AbstractDevice); - method map_from(Device::AbstractDevice); - method unmap_to_and_free(Device::AbstractDevice); - method unmap_from_and_free(Device::AbstractDevice); + chunk LKM::prototypes(); + chunk LKM::code(); + decl data_types(); + method init(Socket::AbstractSKBuff); + method dump_infos(); + method map_to(Device::AbstractDevice); + method map_from(Device::AbstractDevice); + method unmap_to_and_free(Device::AbstractDevice); + method unmap_from_and_free(Device::AbstractDevice); + } + + provided sequence alloc_rx(Ethernet::Device, Builtin::number) + { + chunk ::CALL(); + } + + provided sequence alloc_tx(Ethernet::Device, Builtin::number) + { + chunk ::CALL(); attribute Socket::AbstractSKBuff.ref k_sk_buff; attribute DMA::AbstractDMAHandle.scalar k_dma_handle;