Compare commits

..

7 Commits

Author SHA1 Message Date
Vadim Yanitskiy
a1ea63f777 gitignore: remove non-existing 'doc/manuals/osmomsc-usermanual.xml'
Change-Id: If0fef3f12f15780ed3a3e33db25cd29082ff142a
2021-04-16 19:04:48 +02:00
Pau Espin Pedrol
c7930b0b22 ipc: Makefile.am: Clean LDADD variable
Change-Id: I26c942496ab12883a4a1e0d549cb462642570636
2021-03-01 16:35:42 +01:00
Pau Espin Pedrol
17ce7740e5 Threads: Avoid printing pthread_self()
The type used to represent a thread ID is implementation
specific, and may be an opaqe structure, making it unsuitable to be
printed by standard means. Let's use osmo_gettid() instead.

Change-Id: Iaa4d0eaf52b901fff06cc67f8dd8b61ac6084911
Related: OS#5032
2021-03-01 16:35:42 +01:00
Pau Espin Pedrol
d06259f348 Drop logging pthread ID
new libosmocore osmo-trx already depends on does support printing thread
ID as prefix to all messages (confgiurable through VTY), so there's no
use in printing it in osmo-trx unconditionally.

Moreover, The type used to represent a thread ID is implementation
specific, and may be an opaqe structure, making it unsuitable to be
printed by standard means, so in any case we should be better printing
system's TID instead.

Related: OS#5032
Change-Id: Ie98a21246230c946afc47f4f5b9c6618eefde494
2021-03-01 16:35:42 +01:00
Pau Espin Pedrol
6c646c35b9 Threads.cpp: Fix missing extern C around libosmocore include
Change-Id: I76975ed71382ff2afa8cfaff2950e23ff750201e
2021-03-01 16:35:35 +01:00
Harald Welte
90d841748e Bump version: 1.3.0.1-e2404 → 1.3.1
Change-Id: I559b8d8608b3e492ae1ba0d5a54e226ab424b23b
2021-02-28 11:32:12 +01:00
Harald Welte
e2404f4e41 mark uhddev_ipc.cpp as BUILT_SOURCES
fixes "make dist-bzip2" on a clean checkout

Closes: OS#5052
Change-Id: Ieb4cefb16c8f43e708a96353c13342fe40ffdb54
2021-02-28 11:02:25 +01:00
6 changed files with 21 additions and 17 deletions

1
.gitignore vendored
View File

@@ -67,7 +67,6 @@ doc/manuals/generated/
doc/manuals/vty/osmotrx-*-vty-reference.xml
doc/manuals/vty/osmotrx-*-vty-reference.xml.inc.gen
doc/manuals/vty/osmotrx-*-vty-reference.xml.inc.merged
doc/manuals/osmomsc-usermanual.xml
doc/manuals/common
doc/manuals/build

View File

@@ -50,19 +50,19 @@ extern "C" {
#endif
#define LOG(level) \
Log(DMAIN, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "] "
Log(DMAIN, LOGL_##level, __BASE_FILE__, __LINE__).get()
#define LOGC(category, level) \
Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "] "
Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get()
#define LOGLV(category, level) \
Log(category, level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "] "
Log(category, level, __BASE_FILE__, __LINE__).get()
#define LOGSRC(category, level, file, line) \
Log(category, level, file, line).get() << "[tid=" << pthread_self() << "] "
Log(category, level, file, line).get()
#define LOGCHAN(chan, category, level) \
Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "][chan=" << chan << "] "
Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[chan=" << chan << "] "
/**
A C++ stream-based thread-safe logger.

View File

@@ -32,7 +32,9 @@
#include "Timeval.h"
#include "Logger.h"
extern "C" {
#include <osmocom/core/thread.h>
}
using namespace std;
@@ -47,7 +49,7 @@ void lockCout()
{
gStreamLock.lock();
Timeval entryTime;
cout << entryTime << " " << pthread_self() << ": ";
cout << entryTime << " " << osmo_gettid() << ": ";
}
@@ -62,7 +64,7 @@ void lockCerr()
{
gStreamLock.lock();
Timeval entryTime;
cerr << entryTime << " " << pthread_self() << ": ";
cerr << entryTime << " " << osmo_gettid() << ": ";
}
void unlockCerr()

View File

@@ -3,7 +3,6 @@
#include <stdbool.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/thread.h>
extern const struct log_info log_info;
@@ -19,10 +18,6 @@ enum {
DCTR,
};
#define CLOGC(category, level, fmt, args...) do { \
LOGP(category, level, "[tid=%ld] " fmt, (long int) osmo_gettid(), ##args); \
} while(0)
#define CLOGCHAN(chan, category, level, fmt, args...) do { \
LOGP(category, level, "[tid=%ld][chan=%zu] " fmt, (long int) osmo_gettid(), chan, ##args); \
LOGP(category, level, "[chan=%zu] " fmt, chan, ##args); \
} while(0)

View File

@@ -17,25 +17,27 @@ libdevice_la_SOURCES = IPCDevice.cpp shm.c ipc_shm.c ipc_chan.c ipc_sock.c
libdevice_la_LIBADD = $(top_builddir)/Transceiver52M/device/common/libdevice_common.la
libdevice_la_CXXFLAGS = $(AM_CXXFLAGS) -DIPCMAGIC
if DEVICE_UHD
#work around distclean issue on older autotools vers:
#a direct build of ../uhd/UHDDevice.cpp tries to clean
#../uhd/.dep/UHDDevice.Plo twice and fails
uhddev_ipc.cpp:
echo "#include \"../uhd/UHDDevice.cpp\"" >$@
CLEANFILES= uhddev_ipc.cpp
BUILT_SOURCES = uhddev_ipc.cpp
if DEVICE_UHD
bin_PROGRAMS = ipc-driver-test
#ipc_driver_test_SHORTNAME = drvt
ipc_driver_test_SOURCES = ipc-driver-test.c uhdwrap.cpp ipc_shm.c ipc_chan.c ipc_sock.c uhddev_ipc.cpp
ipc_driver_test_LDADD = \
shm.lo \
$(top_builddir)/Transceiver52M/device/common/libdevice_common.la \
$(COMMON_LA)
$(LIBOSMOCORE_LIBS) \
$(NULL)
ipc_driver_test_CXXFLAGS = $(AM_CXXFLAGS) $(UHD_CFLAGS)
ipc_driver_test_CPPFLAGS = $(AM_CPPFLAGS) $(UHD_CFLAGS)
ipc_driver_test_CFLAGS = $(AM_CFLAGS) $(UHD_CFLAGS)
ipc_driver_test_LDFLAGS = $(AM_LDFLAGS) $(UHD_LIBS)
ipc_driver_test_LDADD += $(top_builddir)/Transceiver52M/device/common/libdevice_common.la $(top_builddir)/CommonLibs/libcommon.la
endif

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
osmo-trx (1.3.1) unstable; urgency=medium
* mark uhddev_ipc.cpp as BUILT_SOURCES
-- Harald Welte <laforge@osmocom.org> Sun, 28 Feb 2021 11:32:11 +0100
osmo-trx (1.3.0) unstable; urgency=medium
[ Pau Espin Pedrol ]