From db669dda273b31215a6b002fd7c753f394649369 Mon Sep 17 00:00:00 2001 From: Vo Trung Chi Date: Tue, 1 Oct 2019 15:22:56 +0700 Subject: libdlt: reattachment and improvement in dlt thread (#171) Improvement: housekeeper thread with poll - Change name receiver thread to housekeeper thread - Use poll() in housekeeper thread to get new received message from DLT Daemon. - Remove resend buffer inside of dlt_user_log_reattach_to_daemon() - Only try to resend buffer if fd is valid. This commit removes the event driven dlt_user_log_reattach_to_daemon() that is called e.g. by DLT_LOG. Now, only the DLT housekeeper thread handles the retrial to attach to daemon. Signed-off-by: Vo Trung Chi Signed-off-by: Saya Sugiura Signed-off-by: Simon Herkenhoff Signed-off-by: Bui Nguyen Quoc Thanh --- src/lib/dlt_user_cfg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/dlt_user_cfg.h') diff --git a/src/lib/dlt_user_cfg.h b/src/lib/dlt_user_cfg.h index 9f3cc92..8951b75 100644 --- a/src/lib/dlt_user_cfg.h +++ b/src/lib/dlt_user_cfg.h @@ -123,8 +123,8 @@ /* default message id for non-verbose mode, if no message id was provided */ #define DLT_USER_DEFAULT_MSGID 0xffff -/* delay for receiver thread (nsec) */ -#define DLT_USER_RECEIVE_NDELAY (100000000) +/* delay for housekeeper thread (nsec) while receiving messages*/ +#define DLT_USER_RECEIVE_NDELAY (500 * 1000 * 1000) /* Name of environment variable for local print mode */ #define DLT_USER_ENV_LOCAL_PRINT_MODE "DLT_LOCAL_PRINT_MODE" -- cgit v1.2.1