samples: use K_THREAD_STACK_DEFINE macros

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
diff --git a/samples/cpp_synchronization/src/main.cpp b/samples/cpp_synchronization/src/main.cpp
index c95207d..fe928f0 100644
--- a/samples/cpp_synchronization/src/main.cpp
+++ b/samples/cpp_synchronization/src/main.cpp
@@ -38,7 +38,7 @@
 #define STACKSIZE 2000
 
 struct k_thread coop_thread;
-char __stack coop_stack[STACKSIZE];
+K_THREAD_STACK_DEFINE(coop_stack, STACKSIZE);
 
 /*
  * @class cpp_semaphore