kernel: fix k_thread_stack_t definition

Currently this is defined as a k_thread_stack_t pointer.
However this isn't correct, stacks are defined as arrays. Extern
references to k_thread_stack_t doesn't work properly as the compiler
treats it as a pointer to the stack array and not the array itself.

Declaring as an unsized array of k_thread_stack_t doesn't work
well either. The least amount of confusion is to leave out the
pointer/array status completely, use pointers for function prototypes,
and define K_THREAD_STACK_EXTERN() to properly create an extern
reference.

The definitions for all functions and struct that use
k_thread_stack_t need to be updated, but code that uses them should
be unchanged.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-10-16 14:46:34 -07:00 committed by Andrew Boie
commit c5c104f91e
21 changed files with 46 additions and 35 deletions

View file

@ -1664,7 +1664,7 @@ int https_client_init(struct http_client_ctx *ctx,
const char *cert_host,
https_entropy_src_cb_t entropy_src_cb,
struct k_mem_pool *pool,
k_thread_stack_t https_stack,
k_thread_stack_t *https_stack,
size_t https_stack_size)
{
int ret;