summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/lib/dlt_user.c14
-rwxr-xr-xsrc/lib/dlt_user_cfg.h3
2 files changed, 13 insertions, 4 deletions
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c
index 0764efc..4f153d5 100755
--- a/src/lib/dlt_user.c
+++ b/src/lib/dlt_user.c
@@ -197,12 +197,18 @@ int dlt_init(void)
return -1;
}
- /* Initialize thread */
+ /* Set default thread stack size */
if (pthread_attr_init(&dlt_receiverthread_attr)<0)
{
- dlt_log(LOG_WARNING, "Initialization of thread failed!\n");
- return -1;
- }
+ dlt_log(LOG_WARNING, "Initialization of default thread stack size failed!\n");
+ }
+ else
+ {
+ if (pthread_attr_setstacksize(&dlt_receiverthread_attr,DLT_USER_RECEIVERTHREAD_STACKSIZE)<0)
+ {
+ dlt_log(LOG_WARNING, "Setting of default thread stack size failed!\n");
+ }
+ }
/* Start receiver thread */
if (pthread_create(&(dlt_receiverthread_handle),
diff --git a/src/lib/dlt_user_cfg.h b/src/lib/dlt_user_cfg.h
index 31af24d..5b1e71e 100755
--- a/src/lib/dlt_user_cfg.h
+++ b/src/lib/dlt_user_cfg.h
@@ -106,6 +106,9 @@
/* Length of buffer for constructing text output */
#define DLT_USER_TEXT_LENGTH 10024
+/* Stack size of receiver thread */
+#define DLT_USER_RECEIVERTHREAD_STACKSIZE 100000
+
/* default value for storage to file, not used in daemon connection */
#define DLT_USER_DEFAULT_ECU_ID "ECU1"