diff options
author | Christian Muck <q270506@QMUC300924.(none)> | 2011-09-22 14:10:14 +0200 |
---|---|---|
committer | Christian Muck <q270506@QMUC300924.(none)> | 2011-09-22 14:10:14 +0200 |
commit | f70762185c496f2bb92caa617dada6f2fb4c130f (patch) | |
tree | 482ed7a5f00a37221b353ae2ba92eb9a02cc3ab8 | |
parent | ad16ddcf08343ca4f8a75478476148a9b5af3be2 (diff) | |
download | DLT-daemon-f70762185c496f2bb92caa617dada6f2fb4c130f.tar.gz |
Revert "[GSW-46] DLT client library sets a huge stack size for internal thread. fixed"
This reverts commit 56f1617fede49235d8de1b9e84aa69d238127243.
-rwxr-xr-x | src/lib/dlt_user.c | 14 | ||||
-rwxr-xr-x | src/lib/dlt_user_cfg.h | 3 |
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"
|