thread: let spdk_thread_create() accept const spdk_cpuset*

the underlying spdk_cpuset_copy() takes `const spdk_cpuset*` as the
`src` parameter. there is no need to take non-const spdk_cpuset*.
hence, in this change, let's relax the requirement of the pointer type.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Change-Id: I1f626c7fea45cf7250bf56b891bcba4a0f2a8917
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13443
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
Kefu Chai 2022-06-23 20:21:17 +08:00 committed by Tomasz Zawadzki
parent ceaa4ee0f7
commit 9644491dde
2 changed files with 2 additions and 2 deletions

View File

@ -236,7 +236,7 @@ void spdk_thread_lib_fini(void);
* *
* \return a pointer to the allocated thread on success or NULL on failure.. * \return a pointer to the allocated thread on success or NULL on failure..
*/ */
struct spdk_thread *spdk_thread_create(const char *name, struct spdk_cpuset *cpumask); struct spdk_thread *spdk_thread_create(const char *name, const struct spdk_cpuset *cpumask);
/** /**
* Force the current system thread to act as if executing the given SPDK thread. * Force the current system thread to act as if executing the given SPDK thread.

View File

@ -388,7 +388,7 @@ _free_thread(struct spdk_thread *thread)
} }
struct spdk_thread * struct spdk_thread *
spdk_thread_create(const char *name, struct spdk_cpuset *cpumask) spdk_thread_create(const char *name, const struct spdk_cpuset *cpumask)
{ {
struct spdk_thread *thread; struct spdk_thread *thread;
struct spdk_msg *msgs[SPDK_MSG_MEMPOOL_CACHE_SIZE]; struct spdk_msg *msgs[SPDK_MSG_MEMPOOL_CACHE_SIZE];