diff options
Diffstat (limited to 'tests/expectations/tests/layout_array.rs')
-rw-r--r-- | tests/expectations/tests/layout_array.rs | 82 |
1 files changed, 32 insertions, 50 deletions
diff --git a/tests/expectations/tests/layout_array.rs b/tests/expectations/tests/layout_array.rs index 3ca0ffe8..06bc213c 100644 --- a/tests/expectations/tests/layout_array.rs +++ b/tests/expectations/tests/layout_array.rs @@ -13,63 +13,53 @@ pub const RTE_HEAP_NUM_FREELISTS: ::std::os::raw::c_uint = 13; pub struct rte_mempool { _unused: [u8; 0], } -/** - * Prototype for implementation specific data provisioning function. - * - * The function should provide the implementation specific memory for - * for use by the other mempool ops functions in a given mempool ops struct. - * E.g. the default ops provides an instance of the rte_ring for this purpose. - * it will most likely point to a different type of data structure, and - * will be transparent to the application programmer. - * This function should set mp->pool_data. - */ +/// Prototype for implementation specific data provisioning function. +/// +/// The function should provide the implementation specific memory for +/// for use by the other mempool ops functions in a given mempool ops struct. +/// E.g. the default ops provides an instance of the rte_ring for this purpose. +/// it will most likely point to a different type of data structure, and +/// will be transparent to the application programmer. +/// This function should set mp->pool_data. pub type rte_mempool_alloc_t = ::std::option::Option<unsafe extern "C" fn(mp: *mut rte_mempool) -> ::std::os::raw::c_int>; -/** - * Free the opaque private data pointed to by mp->pool_data pointer. - */ +/// Free the opaque private data pointed to by mp->pool_data pointer. pub type rte_mempool_free_t = ::std::option::Option<unsafe extern "C" fn(mp: *mut rte_mempool)>; -/** - * Enqueue an object into the external pool. - */ +/// Enqueue an object into the external pool. pub type rte_mempool_enqueue_t = ::std::option::Option<unsafe extern "C" fn(mp: *mut rte_mempool, obj_table: *const *const ::std::os::raw::c_void, n: ::std::os::raw::c_uint) -> ::std::os::raw::c_int>; -/** - * Dequeue an object from the external pool. - */ +/// Dequeue an object from the external pool. pub type rte_mempool_dequeue_t = ::std::option::Option<unsafe extern "C" fn(mp: *mut rte_mempool, obj_table: *mut *mut ::std::os::raw::c_void, n: ::std::os::raw::c_uint) -> ::std::os::raw::c_int>; -/** - * Return the number of available objects in the external pool. - */ +/// Return the number of available objects in the external pool. pub type rte_mempool_get_count = ::std::option::Option<unsafe extern "C" fn(mp: *const rte_mempool) -> ::std::os::raw::c_uint>; -/** Structure defining mempool operations structure */ +/// Structure defining mempool operations structure #[repr(C)] #[derive(Debug, Copy)] pub struct rte_mempool_ops { - /**< Name of mempool ops struct. */ + /// < Name of mempool ops struct. pub name: [::std::os::raw::c_char; 32usize], - /**< Allocate private data. */ + /// < Allocate private data. pub alloc: rte_mempool_alloc_t, - /**< Free the external pool. */ + /// < Free the external pool. pub free: rte_mempool_free_t, - /**< Enqueue an object. */ + /// < Enqueue an object. pub enqueue: rte_mempool_enqueue_t, - /**< Dequeue an object. */ + /// < Dequeue an object. pub dequeue: rte_mempool_dequeue_t, - /**< Get qty of available objs. */ + /// < Get qty of available objs. pub get_count: rte_mempool_get_count, pub __bindgen_padding_0: [u64; 7usize], } @@ -114,13 +104,11 @@ impl Clone for rte_mempool_ops { impl Default for rte_mempool_ops { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } -/** - * The rte_spinlock_t type. - */ +/// The rte_spinlock_t type. #[repr(C)] #[derive(Debug, Default, Copy)] pub struct rte_spinlock_t { - /**< lock status 0 = unlocked, 1 = locked */ + /// < lock status 0 = unlocked, 1 = locked pub locked: ::std::os::raw::c_int, } #[test] @@ -138,26 +126,22 @@ fn bindgen_test_layout_rte_spinlock_t() { impl Clone for rte_spinlock_t { fn clone(&self) -> Self { *self } } -/** - * Structure storing the table of registered ops structs, each of which contain - * the function pointers for the mempool ops functions. - * Each process has its own storage for this ops struct array so that - * the mempools can be shared across primary and secondary processes. - * The indices used to access the array are valid across processes, whereas - * any function pointers stored directly in the mempool struct would not be. - * This results in us simply having "ops_index" in the mempool struct. - */ +/// Structure storing the table of registered ops structs, each of which contain +/// the function pointers for the mempool ops functions. +/// Each process has its own storage for this ops struct array so that +/// the mempools can be shared across primary and secondary processes. +/// The indices used to access the array are valid across processes, whereas +/// any function pointers stored directly in the mempool struct would not be. +/// This results in us simply having "ops_index" in the mempool struct. #[repr(C)] #[derive(Debug, Copy)] pub struct rte_mempool_ops_table { - /**< Spinlock for add/delete. */ + /// < Spinlock for add/delete. pub sl: rte_spinlock_t, - /**< Number of used ops structs in the table. */ + /// < Number of used ops structs in the table. pub num_ops: u32, pub __bindgen_padding_0: [u64; 7usize], - /** - * Storage for all possible ops structs. - */ + /// Storage for all possible ops structs. pub ops: [rte_mempool_ops; 16usize], } #[test] @@ -187,9 +171,7 @@ impl Clone for rte_mempool_ops_table { impl Default for rte_mempool_ops_table { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } -/** - * Structure to hold malloc heap - */ +/// Structure to hold malloc heap #[repr(C)] #[derive(Debug, Copy)] pub struct malloc_heap { |