env.h: fix coding style
Only function definitions should have a line break between the return type and function name, not prototypes. Change-Id: Ic547a6c6541e31bbf95e3d95a28077c9e6510ba6 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
fc9983b638
commit
e2abf192c7
@ -53,29 +53,25 @@ struct spdk_pci_device;
|
||||
* Allocate a pinned, physically contiguous memory buffer with the
|
||||
* given size and alignment.
|
||||
*/
|
||||
void *
|
||||
spdk_malloc(size_t size, size_t align, uint64_t *phys_addr);
|
||||
void *spdk_malloc(size_t size, size_t align, uint64_t *phys_addr);
|
||||
|
||||
/**
|
||||
* Allocate a pinned, physically contiguous memory buffer with the
|
||||
* given size and alignment. The buffer will be zeroed.
|
||||
*/
|
||||
void *
|
||||
spdk_zmalloc(size_t size, size_t align, uint64_t *phys_addr);
|
||||
void *spdk_zmalloc(size_t size, size_t align, uint64_t *phys_addr);
|
||||
|
||||
/**
|
||||
* Resize the allocated and pinned memory buffer with the given
|
||||
* new size and alignment. Existing contents are preserved.
|
||||
*/
|
||||
void *
|
||||
spdk_realloc(void *buf, size_t size, size_t align, uint64_t *phys_addr);
|
||||
void *spdk_realloc(void *buf, size_t size, size_t align, uint64_t *phys_addr);
|
||||
|
||||
/**
|
||||
* Free a memory buffer previously allocated with spdk_zmalloc.
|
||||
* This call is never made from the performance path.
|
||||
*/
|
||||
void
|
||||
spdk_free(void *buf);
|
||||
void spdk_free(void *buf);
|
||||
|
||||
/**
|
||||
* Reserve a named, process shared memory zone with the given size,
|
||||
@ -84,28 +80,24 @@ spdk_free(void *buf);
|
||||
* cannot be done, return NULL.
|
||||
* Note: to pick any socket id, just set socket_id to -1.
|
||||
*/
|
||||
void *
|
||||
spdk_memzone_reserve(const char *name, size_t len, int socket_id, unsigned flags);
|
||||
void *spdk_memzone_reserve(const char *name, size_t len, int socket_id, unsigned flags);
|
||||
|
||||
/**
|
||||
* Lookup the memory zone identified by the given name.
|
||||
* Return a pointer to the reserved memory address. If the reservation
|
||||
* cannot be found, return NULL.
|
||||
*/
|
||||
void *
|
||||
spdk_memzone_lookup(const char *name);
|
||||
void *spdk_memzone_lookup(const char *name);
|
||||
|
||||
/**
|
||||
* Free the memory zone identified by the given name.
|
||||
*/
|
||||
int
|
||||
spdk_memzone_free(const char *name);
|
||||
int spdk_memzone_free(const char *name);
|
||||
|
||||
/**
|
||||
* Dump debug information about all memzones.
|
||||
*/
|
||||
void
|
||||
spdk_memzone_dump(FILE *f);
|
||||
void spdk_memzone_dump(FILE *f);
|
||||
|
||||
struct spdk_mempool;
|
||||
|
||||
@ -114,40 +106,34 @@ struct spdk_mempool;
|
||||
* elements in a thread-local cache. Can be 0 for no caching, or -1
|
||||
* for unspecified.
|
||||
*/
|
||||
struct spdk_mempool *
|
||||
spdk_mempool_create(const char *name, size_t count,
|
||||
size_t ele_size, size_t cache_size);
|
||||
struct spdk_mempool *spdk_mempool_create(const char *name, size_t count,
|
||||
size_t ele_size, size_t cache_size);
|
||||
|
||||
/**
|
||||
* Free a memory pool.
|
||||
*/
|
||||
void
|
||||
spdk_mempool_free(struct spdk_mempool *mp);
|
||||
void spdk_mempool_free(struct spdk_mempool *mp);
|
||||
|
||||
/**
|
||||
* Get an element from a memory pool. If no elements remain, return NULL.
|
||||
*/
|
||||
void *
|
||||
spdk_mempool_get(struct spdk_mempool *mp);
|
||||
void *spdk_mempool_get(struct spdk_mempool *mp);
|
||||
|
||||
/**
|
||||
* Put an element back into the memory pool.
|
||||
*/
|
||||
void
|
||||
spdk_mempool_put(struct spdk_mempool *mp, void *ele);
|
||||
void spdk_mempool_put(struct spdk_mempool *mp, void *ele);
|
||||
|
||||
/**
|
||||
* Put multiple elements back into the memory pool.
|
||||
*/
|
||||
void
|
||||
spdk_mempool_put_bulk(struct spdk_mempool *mp, void *const *ele_arr, size_t count);
|
||||
void spdk_mempool_put_bulk(struct spdk_mempool *mp, void *const *ele_arr, size_t count);
|
||||
|
||||
|
||||
/**
|
||||
* Return true if the calling process is primary process
|
||||
*/
|
||||
bool
|
||||
spdk_process_is_primary(void);
|
||||
bool spdk_process_is_primary(void);
|
||||
|
||||
/**
|
||||
* Get a monotonic timestamp counter.
|
||||
|
Loading…
Reference in New Issue
Block a user