mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-03 21:53:18 +00:00
Since libosmocore Id7711893b34263baacac6caf4d489467053131bb, a new API log_enable_multithread() is available which takes care of protecting logging infrastructure from us (and actually does it correctly since we cannot protect internal libosmocore structures from osmo-trx). Let's drop all mutex related code from osmo-trx logging infra and simply rely on libosmocore's. Related: OS#4088 Change-Id: I519d0f30bce871005ca26b90177ea4aa4839360a
25 lines
496 B
C
25 lines
496 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <pthread.h>
|
|
|
|
#include <osmocom/core/logging.h>
|
|
|
|
extern const struct log_info log_info;
|
|
|
|
/* Debug Areas of the code */
|
|
enum {
|
|
DMAIN,
|
|
DTRXCTRL,
|
|
DDEV,
|
|
DLMS,
|
|
};
|
|
|
|
#define CLOGC(category, level, fmt, args...) do { \
|
|
LOGP(category, level, "[tid=%lu] " fmt, pthread_self(), ##args); \
|
|
} while(0)
|
|
|
|
#define CLOGCHAN(chan, category, level, fmt, args...) do { \
|
|
LOGP(category, level, "[tid=%lu][chan=%lu] " fmt, pthread_self(), chan, ##args); \
|
|
} while(0)
|