Skip to content

Commit 4660d1a

Browse files
committed
Release 1.0.28
* Reduced poll interval for ipc::NativeExecutor to 20 milliseconds. * Fixed invalid access to missing built-in resources. * Fixed some command line options that caused JACK version to crash. * Updated build scripts. * Updated module versions in dependencies.
2 parents 23e0281 + ef6f4c9 commit 4660d1a

File tree

13 files changed

+69
-39
lines changed

13 files changed

+69
-39
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
image: opensuse/leap:latest
9898
steps:
9999
- name: Install dependencies
100-
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ libsndfile-devel
100+
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ glibc-locale libsndfile-devel
101101
- uses: actions/checkout@v3
102102
- name: Configure project
103103
run: make config TEST=1 STRICT=1
@@ -119,7 +119,7 @@ jobs:
119119
image: opensuse/tumbleweed:latest
120120
steps:
121121
- name: Install dependencies
122-
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ libstdc++-devel libsndfile-devel clang
122+
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ glibc-locale glibc-gconv-modules-extra libstdc++-devel libsndfile-devel clang
123123
- uses: actions/checkout@v3
124124
- name: Configure project
125125
run: make config TEST=1 STRICT=1 CC=clang CXX=clang++

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
* RECENT CHANGES
33
*******************************************************************************
44

5+
=== 1.0.28 ===
6+
* Reduced poll interval for ipc::NativeExecutor to 20 milliseconds.
7+
* Fixed invalid access to missing built-in resources.
8+
* Fixed some command line options that caused JACK version to crash.
9+
* Updated build scripts.
10+
* Updated module versions in dependencies.
11+
512
=== 1.0.27 ===
613
* Better support of MacOS.
714
* Added possibility to modify configuration parameters.

include/lsp-plug.in/ipc/NativeExecutor.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2024 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-runtime-lib
66
* Created on: 27 янв. 2016 г.
@@ -19,8 +19,8 @@
1919
* along with lsp-runtime-lib. If not, see <https://www.gnu.org/licenses/>.
2020
*/
2121

22-
#ifndef IPC_NATIVEEXECUTOR_H_
23-
#define IPC_NATIVEEXECUTOR_H_
22+
#ifndef LSP_PLUG_IN_IPC_NATIVEEXECUTOR_H_
23+
#define LSP_PLUG_IN_IPC_NATIVEEXECUTOR_H_
2424

2525
#include <lsp-plug.in/runtime/version.h>
2626
#include <lsp-plug.in/common/atomic.h>
@@ -81,4 +81,4 @@ namespace lsp
8181
} /* namespace ipc */
8282
} /* namespace lsp */
8383

84-
#endif /* IPC_NATIVEEXECUTOR_H_ */
84+
#endif /* LSP_PLUG_IN_IPC_NATIVEEXECUTOR_H_ */

include/lsp-plug.in/runtime/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#define LSP_RUNTIME_LIB_MAJOR 1
2626
#define LSP_RUNTIME_LIB_MINOR 0
27-
#define LSP_RUNTIME_LIB_MICRO 27
27+
#define LSP_RUNTIME_LIB_MICRO 28
2828

2929
#if defined(LSP_RUNTIME_LIB_PUBLISHER)
3030
#define LSP_RUNTIME_LIB_PUBLIC LSP_EXPORT_MODIFIER

make/tools.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ INSTALL ?= $(X_INSTALL_TOOL)
8989
FLAG_RELRO := -Wl,-z,relro,-z,now
9090
FLAG_STDLIB :=
9191
FLAG_GC_SECTIONS := -Wl,--gc-sections
92+
FLAG_AS_NEEDED := -Wl,-as-needed
9293
NOARCH_CFLAGS :=
9394
NOARCH_CXXFLAGS :=
9495
NOARCH_EXE_FLAGS :=
@@ -108,7 +109,8 @@ else ifeq ($(PLATFORM),Windows)
108109
NOARCH_LDFLAGS += -T $(CURDIR)/make/ld-windows.script
109110
else ifeq ($(PLATFORM),MacOS)
110111
FLAG_RELRO =
111-
FLAG_GC_SECTIONS =
112+
FLAG_GC_SECTIONS =
113+
FLAG_AS_NEEDED =
112114
NOARCH_CXXFLAGS += -std=c++0x
113115
NOARCH_LDFLAGS += -keep_private_externs
114116
else ifeq ($(PLATFORM),BSD)
@@ -200,11 +202,11 @@ NOARCH_LDFLAGS += -r
200202
LDFLAGS := $(ARCHITECTURE_LDFLAGS) $(NOARCH_LDFLAGS)
201203
HOST_LDFLAGS := $(HOST_ARCHITECTURE_LDFLAGS) $(NOARCH_LDFLAGS)
202204

203-
NOARCH_EXE_FLAGS += $(FLAG_RELRO) $(FLAG_GC_SECTIONS)
205+
NOARCH_EXE_FLAGS += $(FLAG_RELRO) $(FLAG_GC_SECTIONS) $(FLAG_AS_NEEDED)
204206
EXE_FLAGS := $(ARCHITECTURE_CFLAGS) $(NOARCH_EXE_FLAGS)
205207
HOST_EXE_FLAGS := $(HOST_ARCHITECTURE_CFLAGS) $(NOARCH_EXE_FLAGS)
206208

207-
NOARCH_SO_FLAGS += $(FLAG_RELRO) $(FLAG_GC_SECTIONS) -shared $(FLAG_STDLIB) -fPIC
209+
NOARCH_SO_FLAGS += $(FLAG_RELRO) $(FLAG_GC_SECTIONS) $(FLAG_AS_NEEDED) -shared $(FLAG_STDLIB) -fPIC
208210
SO_FLAGS := $(ARCHITECTURE_CFLAGS) $(NOARCH_SO_FLAGS)
209211
HOST_SO_FLAGS := $(HOST_ARCHITECTURE_CFLAGS) $(NOARCH_SO_FLAGS)
210212

modules.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
#
2020

2121
# Variables that describe dependencies
22-
LSP_COMMON_LIB_VERSION := 1.0.41
22+
LSP_COMMON_LIB_VERSION := 1.0.42
2323
LSP_COMMON_LIB_NAME := lsp-common-lib
2424
LSP_COMMON_LIB_TYPE := src
2525
LSP_COMMON_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_COMMON_LIB_NAME).git
2626
LSP_COMMON_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_COMMON_LIB_NAME).git
2727

28-
LSP_LLTL_LIB_VERSION := 1.0.24
28+
LSP_LLTL_LIB_VERSION := 1.0.25
2929
LSP_LLTL_LIB_NAME := lsp-lltl-lib
3030
LSP_LLTL_LIB_TYPE := src
3131
LSP_LLTL_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_LLTL_LIB_NAME).git
3232
LSP_LLTL_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_LLTL_LIB_NAME).git
3333

34-
LSP_TEST_FW_VERSION := 1.0.30
34+
LSP_TEST_FW_VERSION := 1.0.31
3535
LSP_TEST_FW_NAME := lsp-test-fw
3636
LSP_TEST_FW_TYPE := src
3737
LSP_TEST_FW_URL_RO := https://github.com/lsp-plugins/$(LSP_TEST_FW_NAME).git

project.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ ARTIFACT_ID = LSP_RUNTIME_LIB
2323
ARTIFACT_NAME = lsp-runtime-lib
2424
ARTIFACT_DESC = Runtime library used by LSP Project for plugin development
2525
ARTIFACT_HEADERS = lsp-plug.in
26-
ARTIFACT_VERSION = 1.0.27
26+
ARTIFACT_VERSION = 1.0.28
2727
ARTIFACT_EXPORT_SYMBOLS = 1

src/main/ipc/NativeExecutor.cpp

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2024 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-runtime-lib
66
* Created on: 27 янв. 2016 г.
@@ -26,6 +26,8 @@ namespace lsp
2626
{
2727
namespace ipc
2828
{
29+
static constexpr size_t POLL_INTERVAL = 20;
30+
2931
NativeExecutor::NativeExecutor():
3032
hThread(execute, this)
3133
{
@@ -88,7 +90,7 @@ namespace lsp
8890
atomic_unlock(nLock);
8991
}
9092

91-
ipc::Thread::sleep(100);
93+
ipc::Thread::sleep(POLL_INTERVAL);
9294
}
9395

9496
// Now there are no pending tasks, terminate thread
@@ -105,7 +107,7 @@ namespace lsp
105107
// Sleep until critical section is acquired
106108
while (!atomic_trylock(nLock))
107109
{
108-
if (ipc::Thread::sleep(100) == STATUS_CANCELLED)
110+
if (ipc::Thread::sleep(POLL_INTERVAL) == STATUS_CANCELLED)
109111
return;
110112
}
111113

@@ -117,7 +119,7 @@ namespace lsp
117119
atomic_unlock(nLock);
118120

119121
// Wait for a while
120-
if (ipc::Thread::sleep(100) == STATUS_CANCELLED)
122+
if (ipc::Thread::sleep(POLL_INTERVAL) == STATUS_CANCELLED)
121123
return;
122124
}
123125
else
@@ -131,9 +133,18 @@ namespace lsp
131133
atomic_unlock(nLock);
132134

133135
// Execute task
136+
#ifdef LSP_TRACE
134137
lsp_trace("executing task %p", task);
138+
const system::time_millis_t start = system::get_time_millis();
139+
#endif /* LSP_TRACE */
140+
135141
run_task(task);
136-
lsp_trace("executed task %p with code %d", task, int(task->code()));
142+
143+
#ifdef LSP_TRACE
144+
const system::time_millis_t end = system::get_time_millis();
145+
lsp_trace("executed task %p with code %d, time=%d ms",
146+
task, int(task->code()), int(end - start));
147+
#endif /* LSP_TRACE */
137148
}
138149
}
139150
}

src/main/ipc/SharedMutex.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2024 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-runtime-lib
66
* Created on: 24 апр. 2024 г.
@@ -189,8 +189,8 @@ namespace lsp
189189
return (hLock != NULL) ? STATUS_OK : STATUS_IO_ERROR;
190190
#elif defined(LSP_ROBUST_MUTEX_SUPPORTED)
191191
int error;
192-
const char *path = name->get_native();
193-
if (name == NULL)
192+
const char *path = (name != NULL) ? name->get_native() : NULL;
193+
if (path == NULL)
194194
return STATUS_NO_MEM;
195195

196196
static constexpr int open_mode =
@@ -286,7 +286,7 @@ namespace lsp
286286
if ((error = pthread_mutexattr_init(&attr)) != 0)
287287
return STATUS_UNKNOWN_ERR;
288288

289-
if ((error = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED) != 0))
289+
if ((error = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED)) != 0)
290290
{
291291
switch (error)
292292
{

src/main/resource/BuiltinLoader.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ namespace lsp
168168
// Find entry and check that it is of directory type
169169
status_t res = find_entry(&index, path);
170170
if (res != STATUS_OK)
171-
return res;
171+
return -set_error(res);
172172

173173
ent = &pCatalog[index];
174174
if (ent->type != RES_DIR)
175-
return STATUS_NOT_DIRECTORY;
175+
return -set_error(STATUS_NOT_DIRECTORY);
176176
}
177177

178178
// Now create list of nested items
@@ -184,7 +184,7 @@ namespace lsp
184184

185185
resource_t *item = xlist.add();
186186
if (item == NULL)
187-
return STATUS_NO_MEM;
187+
return -set_error(STATUS_NO_MEM);
188188

189189
strncpy(item->name, ent->name, RESOURCE_NAME_MAX);
190190
item->name[RESOURCE_NAME_MAX - 1] = '\0';
@@ -194,6 +194,8 @@ namespace lsp
194194
// Return result
195195
index = xlist.size();
196196
*list = xlist.release();
197+
198+
set_error(STATUS_OK);
197199
return index;
198200
}
199201
} /* namespace resource */

0 commit comments

Comments
 (0)