Added function for increasing ref count.

pull/2874/head
andreas.larsson 2016-10-03 09:43:32 +02:00
parent 1e7ba5fe79
commit b418fce8ac
2 changed files with 13 additions and 0 deletions

View File

@ -80,4 +80,9 @@ uint32_t emac_stack_mem_chain_len(emac_stack_t* stack, emac_stack_mem_chain_t *c
return ((struct pbuf*)chain)->tot_len;
}
void emac_stack_mem_ref(emac_stack_t* stack, emac_stack_mem_t *mem)
{
pbuf_ref((struct pbuf*)mem);
}
#endif /* DEVICE_EMAC */

View File

@ -96,6 +96,14 @@ emac_stack_mem_t *emac_stack_mem_chain_dequeue(emac_stack_t* stack, emac_stack_m
*/
uint32_t emac_stack_mem_chain_len(emac_stack_t* stack, emac_stack_mem_chain_t *chain);
/**
* Increases the reference counter for the memory
*
* @param stack Emac stack context
* @param mem Memory structure
*/
void emac_stack_mem_ref(emac_stack_t* stack, emac_stack_mem_t *mem);
#endif /* DEVICE_EMAC */
#endif /* EMAC_MBED_STACK_MEM_h */