riot_sys

Type Alias os_mempool_put_fn

Source
pub type os_mempool_put_fn = Option<unsafe extern "C" fn(ome: *mut os_mempool_ext, data: *mut c_void, arg: *mut c_void) -> os_error_t>;
Expand description

Block put callback function. If configured, this callback gets executed whenever a block is freed to the corresponding extended mempool. Note: The os_memblock_put() function calls this callback instead of freeing the block itself. Therefore, it is the callback’s responsibility to free the block via a call to os_memblock_put_from_cb().

@param ome The extended mempool that a block is being freed back to. @param data The block being freed. @param arg Optional argument configured along with the callback.

@return Indicates whether the block was successfully freed. A non-zero value should only be returned if the block was not successfully released back to its pool.

Aliased Type§

enum os_mempool_put_fn {
    None,
    Some(unsafe extern "C" fn(_: *mut os_mempool_ext, _: *mut c_void, _: *mut c_void) -> u8),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut os_mempool_ext, _: *mut c_void, _: *mut c_void) -> u8)

Some value of type T.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 4 bytes

Size for each variant:

  • None: 0 bytes
  • Some: 4 bytes