Commit Graph

5 Commits

Author SHA1 Message Date
Daniel Verkamp
b5176ded58 util: add spdk_u32_is_pow2() function
Change-Id: I438053d85360f1c3ecc2b7661dbd573e0217ac46
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/373672
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-11 19:36:30 -04:00
Ben Walker
60e8fb4979 blob: Use a separate md and I/O target
This allows us to allocate different size channels and
not require the unique flag.

Change-Id: I4b1ffd244b60e9e9ab06f9ab4da8161ab57e1169
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/361668
Tested-by: <sys_sgsw@intel.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-05-22 19:27:17 -04:00
Daniel Verkamp
45cab335bc include: move standard includes into spdk/stdinc.h
This is the first step toward isolating standard C and POSIX headers
into a single replaceable header file.

Change-Id: I527297f5e7260b01103018ad3429922962ee9add
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-08 10:11:01 -07:00
Daniel Verkamp
b58a5d73ef util: add SPDK_COUNTOF() array size macro
SPDK_COUNTOF works like sizeof, except it returns the number of elements
in an array instead of the number of bytes.

Change-Id: I38ff4dd3485ed9b630cc5660ff84851d0031911f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-07 12:43:42 -07:00
Daniel Verkamp
84d904841f util: move common helper functions to util.h
These were repeated a few different places, so pull them into a common
header file.

Change-Id: Id807fa2cfec0de2e0363aeb081510fb801781985
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-10 09:38:52 -07:00