upipe/uprobe_ubuf_mem_pool.h header reference

probe catching provide_request events asking for a ubuf manager, and keeping the managers in a pool More

Header inclusion  

Members  

Type  

Functions  

Description  

probe catching provide_request events asking for a ubuf manager, and keeping the managers in a pool

Members detail  

#define _UPIPE_UPROBE_UBUF_MEM_POOL_H_  

This macro is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 31.

struct uprobe_ubuf_mem_pool  

This struct is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 47.

This struct is a super-set of the uprobe structure with additional local members.

FieldDescription
struct umem_mgr * umem_mgr;pointer to umem_mgr to use to allocate ubuf manager
uint16_t ubuf_pool_depth;depth of the ubuf pool
uint16_t shared_pool_depth;depth of the shared object pool
uatomic_ptr_t first;chained list of ubuf managers, elements are never removed
struct uprobe uprobe;structure exported to modules

struct uprobe * uprobe_ubuf_mem_pool_alloc(struct uprobe *next, struct umem_mgr *umem_mgr, uint16_t ubuf_pool_depth, uint16_t shared_pool_depth)  

This function is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 104.

This function allocates a new uprobe_ubuf_mgr structure.

Parameter list:

  • next: next probe to test if this one doesn't catch the event
  • umem_mgr: memory allocator to use for buffers
  • ubuf_pool_depth: maximum number of ubuf structures in the pool
  • shared_pool_depth: maximum number of shared structures in the pool

The return value is pointer to uprobe, or NULL in case of error

void uprobe_ubuf_mem_pool_clean(struct uprobe_ubuf_mem_pool *uprobe_ubuf_mem_pool)  

This function is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 91.

This function cleans a uprobe_ubuf_mem_pool structure.

Parameter list:

  • uprobe_ubuf_mem_pool: structure to clean

struct uprobe * uprobe_ubuf_mem_pool_init(struct uprobe_ubuf_mem_pool *uprobe_ubuf_mem_pool, struct uprobe *next, struct umem_mgr *umem_mgr, uint16_t ubuf_pool_depth, uint16_t shared_pool_depth)  

This function is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 77.

This function initializes an already allocated uprobe_ubuf_mem_pool structure.

Parameter list:

  • uprobe_ubuf_mem_pool: pointer to the already allocated structure
  • next: next probe to test if this one doesn't catch the event
  • umem_mgr: memory allocator to use for buffers
  • ubuf_pool_depth: maximum number of ubuf structures in the pool
  • shared_pool_depth: maximum number of shared structures in the pool

The return value is pointer to uprobe, or NULL in case of error

void uprobe_ubuf_mem_pool_set(struct uprobe *uprobe, struct umem_mgr *umem_mgr)  

This function is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 111.

This function changes the umem_mgr used by this probe.

Parameter list:

  • uprobe: pointer to probe
  • umem_mgr: new umem manager to use

void uprobe_ubuf_mem_pool_vacuum(struct uprobe_ubuf_mem_pool *uprobe_ubuf_mem_pool)  

This function is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 85.

This function instructs an existing probe to release all manager currently kept in pools. Please not that this function is not thread-safe, and mustn't be used if the probe may be called from another thread.

Parameter list:

  • uprobe_ubuf_mem_pool: structure to vacuum

struct uprobe_ubuf_mem_pool * uprobe_ubuf_mem_pool_from_uprobe(struct uprobe *uprobe)  

This function is for internal use only.

This function is declared in UPROBE_HELPER_UPROBE function like macro expansion, line 19 in upipe/uprobe_ubuf_mem_pool.h source file, line 62.

This function returns the private uprobe_ubuf_mem_pool structure.

Parameter list:

  • uprobe: public description structure of the probe

The return value is pointer to the private uprobe_ubuf_mem_pool structure

struct uprobe * uprobe_ubuf_mem_pool_to_uprobe(struct uprobe_ubuf_mem_pool *s)  

This function is for internal use only.

This function is declared in UPROBE_HELPER_UPROBE function like macro expansion, line 9 in upipe/uprobe_ubuf_mem_pool.h source file, line 62.

This function returns the public uprobe structure.

Parameter list:

  • uprobe_ubuf_mem_pool: pointer to the private uprobe_ubuf_mem_pool structure

The return value is pointer to the public uprobe structure

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:19 2018 using MkDoc