Skip to content

Commit 9c37397

Browse files
dlt_user: Rework on dlt global mutex locks (#780)
1 parent 27683d3 commit 9c37397

File tree

5 files changed

+167
-159
lines changed

5 files changed

+167
-159
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ option(WITH_DLT_NETWORK_TRACE "Set to ON to enable network trace (if message que
9191
option(WITH_DLT_LOG_LEVEL_APP_CONFIG "Set to ON to enable default log levels based on application ids" OFF)
9292
option(WITH_DLT_TRACE_LOAD_CTRL "Set to ON to enable trace load control in libdlt and dlt-daemon" OFF)
9393

94-
9594
set(DLT_IPC "FIFO"
9695
CACHE STRING "UNIX_SOCKET,FIFO")
9796
set(DLT_USER "covesa"

include/dlt/dlt_user.h.in

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,6 @@ extern "C" {
109109

110110
# define DLT_USER_RESENDBUF_MAX_SIZE (DLT_USER_BUF_MAX_SIZE + 100) /**< Size of resend buffer; Max DLT message size is 1390 bytes plus some extra header space */
111111

112-
/* Use a semaphore or mutex from your OS to prevent concurrent access to the DLT buffer. */
113-
#define DLT_SEM_LOCK() do{ \
114-
int err_check = pthread_mutex_lock(&dlt_mutex); \
115-
if (err_check != 0) { \
116-
dlt_vlog(LOG_ERR, \
117-
"DLT sem lock error: %d - %s pid=%i\n", \
118-
err_check, \
119-
strerror(err_check), \
120-
getpid()); \
121-
}} while(false)
122-
123-
#define DLT_SEM_FREE() do{ \
124-
int err_check = pthread_mutex_unlock(&dlt_mutex); \
125-
if (err_check != 0) { \
126-
dlt_vlog(LOG_ERR, \
127-
"DLT sem free error: %d - %s in pid=%i\n", \
128-
err_check, \
129-
strerror(err_check), \
130-
getpid()); \
131-
}} while(false)
132-
133112
/**
134113
* This structure is used for every context used in an application.
135114
*/

0 commit comments

Comments
 (0)