cpuset: Expose internal of struct spdk_cpuset in header file

This will make other structures to allocate struct spdk_cpuset
statically and will reduce potential malloc failures.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I067ec2c79824b04796a8b6f717e610727a861461
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459716
Reviewed-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-06-28 13:08:16 +09:00 committed by Changpeng Liu
parent 12d6dce2aa
commit 6de3d418df
2 changed files with 4 additions and 6 deletions

View File

@ -50,7 +50,10 @@ extern "C" {
/**
* List of CPUs.
*/
struct spdk_cpuset;
struct spdk_cpuset {
char str[SPDK_CPUSET_SIZE / 4 + 1];
uint8_t cpus[SPDK_CPUSET_SIZE / 8];
};
/**
* Allocate CPU set object.

View File

@ -34,11 +34,6 @@
#include "spdk/cpuset.h"
#include "spdk/log.h"
struct spdk_cpuset {
char str[SPDK_CPUSET_SIZE / 4 + 1];
uint8_t cpus[SPDK_CPUSET_SIZE / 8];
};
struct spdk_cpuset *
spdk_cpuset_alloc(void)
{