From 935292ce446b18628b2b7ac75292242bca3b7185 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cenk=20G=C3=BCndo=C4=9Fan?= <mail-github@cgundogan.de>
Date: Wed, 7 Jun 2017 08:20:35 +0200
Subject: [PATCH] gcoap: make stack size configurable

---
 sys/include/net/gcoap.h                | 7 +++++++
 sys/net/application_layer/coap/gcoap.c | 3 ---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/sys/include/net/gcoap.h b/sys/include/net/gcoap.h
index 87bc627720..ebac4e16d4 100644
--- a/sys/include/net/gcoap.h
+++ b/sys/include/net/gcoap.h
@@ -386,6 +386,13 @@ extern "C" {
 #define GCOAP_OBS_INIT_UNUSED   (-2)
 /** @} */
 
+/**
+ * @brief Stack size for module thread
+ */
+#ifndef GCOAP_STACK_SIZE
+#define GCOAP_STACK_SIZE (THREAD_STACKSIZE_DEFAULT + DEBUG_EXTRA_STACKSIZE)
+#endif
+
 /**
  * @brief   A modular collection of resources for a server
  */
diff --git a/sys/net/application_layer/coap/gcoap.c b/sys/net/application_layer/coap/gcoap.c
index 55fc98ae06..cd933dbe2c 100644
--- a/sys/net/application_layer/coap/gcoap.c
+++ b/sys/net/application_layer/coap/gcoap.c
@@ -26,9 +26,6 @@
 #define ENABLE_DEBUG (0)
 #include "debug.h"
 
-/** @brief Stack size for module thread */
-#define GCOAP_STACK_SIZE (THREAD_STACKSIZE_DEFAULT + DEBUG_EXTRA_STACKSIZE)
-
 /* Internal functions */
 static void *_event_loop(void *arg);
 static void _listen(sock_udp_t *sock);
-- 
GitLab