Commit Graph

4230 Commits

Author SHA1 Message Date
luz paz ae9993bb34 Fix typos 2023-01-28 16:48:31 +01:00
Daan De Meyer 328c58967d Remove usage of 'U' mode bit for opening files in python
The 'U' mode bit is removed in python 3.11. It has been
deprecated for a long time. The 'U' mode bit has no effect
so this change doesn't change any behavior.

See https://docs.python.org/3.11/whatsnew/3.11.html#changes-in-the-python-api
2023-01-28 16:40:13 +01:00
K 75516ffe6d
Fix ringbuffer thread safety on ARM. Fix #715 #388 (#886)
* fix ringbuffer thread safety on ARM. fix #715 #388

This patch addresses the thread safety problem of `jack_ringbuffer_t`
mentioned in #715 and #388. The overbound read bug caused by this problem
is impossible to reproduce on x86 due to its strong memory ordering, but
it is a problem on ARM and other weakly ordered architectures.

Basically, the main problem is that, on a weakly ordered architecture,
it is possible that the pointer increment after `memcpy` becomes visible
to the other thread before `memcpy` finishes:

	memcpy (&(rb->buf[rb->write_ptr]), src, n1);
	// vvv can be visible to reading thread before memcpy finishes
	rb->write_ptr = (rb->write_ptr + n1) & rb->size_mask;

If this happens, the other thread can read the remaining garbage values
in `rb->buf` due to be overwritten by the unfinished `memcpy`.

To fix this, an explicit pair of release/acquire memory fences [1] is
used to ensure the copy on the other thread *happens after* the `memcpy`
finishes so no garbage values can be read.

[1]: https://preshing.com/20130922/acquire-and-release-fences/

* remove volatile qualifier on ringbuf r/w pointers

The volatile constraints are excess when compiler barriers are present.
It generates unnecessary `mov` instructions when pointers aren't going
to be updated.

* simplify read/write space calculations

This optimization is possible because the buffer size is always a power
of 2. See [1] for details.

[1]: https://github.com/drobilla/zix/pull/1#issuecomment-1212687196

* move acq fences to separate lines
2023-01-28 16:38:05 +01:00
Florian Walpen f18660aa03
CI: Update FreeBSD image to 13.1, fix build.
In principle, major FreeBSD versions should be ABI compatible.
But in this case the python3 binary would only run on 13.1, not 13.0.
2023-01-26 23:20:24 +01:00
Nedko Arnaudov 6e06864b63 Adjust the other jack2 paper link to https
The http one is returning HTTP forbidden error.
2023-01-24 13:25:03 +02:00
Nedko Arnaudov dbeb1994bf update doc/jackdbus.html 2023-01-24 13:21:36 +02:00
Nedko Arnaudov 3655dc140c Adjust jack2 paper link to https
The http one is returning HTTP forbidden error.
2023-01-24 13:20:39 +02:00
Nedko Arnaudov eddfecc0f8 jackdbus.html: remove http-only badges 2022-09-17 21:36:47 +03:00
Nedko Arnaudov 110cf4c821 Update jackdbus.html 2022-09-17 20:18:38 +03:00
Nedko Arnaudov d4f379e560
Autogenerate AUTHORS through git-shortlog
Directories/paths not directly relevant to jackdbus
were intentionally removed from shortlog.

Authorship of the non-jack2dbus code is to be tracked
in jack2 context instead.
2022-09-11 23:02:30 +03:00
Nedko Arnaudov 588468e75a
Add .mailmap file (for git-shortlog) 2022-09-11 22:28:49 +03:00
Nedko Arnaudov 23631d757a
README: formatting fix 2022-09-11 04:53:17 +03:00
Nedko Arnaudov 04c0b86895
README: replace '- ' leftovers, slight reformat 2022-09-10 21:29:46 +03:00
Nedko Arnaudov 470164cb84
Move README.html to dedicated doc/ directory 2022-09-10 20:29:01 +03:00
Nedko Arnaudov 723d52cb37
README.html: regenerate 2022-09-10 20:20:27 +03:00
Nedko Arnaudov 8f1f92df8a
README.adoc: use https for github build CI status image 2022-09-10 20:17:54 +03:00
Nedko Arnaudov 0ff68c1083
Revert "Move README.adoc to dedicated doc/ directory"
This reverts commit 3477c29bbb.
2022-09-10 20:16:07 +03:00
Nedko Arnaudov 3477c29bbb
Move README.adoc to dedicated doc/ directory 2022-09-10 20:12:58 +03:00
Nedko Arnaudov 897e274ea6
Rewrite/reformat README.adoc and export it as html 2022-09-10 20:10:19 +03:00
Nedko Arnaudov 4629d5ba16 README.rst -> README.adoc 2022-09-10 17:34:09 +03:00
Nedko Arnaudov f070df37cf
README.rst: Fix typo in year reference
"As of year of this commit"
2022-09-10 17:21:26 +03:00
Nedko Arnaudov 76930a595b
README.rst: Adjust for LADI/jackdbus 2022-09-10 16:52:17 +03:00
Nedko Arnaudov 4cb45c8fa3 COPYING: improve wording 2022-09-10 16:16:19 +03:00
Nedko Arnaudov 977082ae94 Move LICENSE to COPYING 2022-09-10 16:16:19 +03:00
Nedko Arnaudov b75e75db77 Adjust my copyleft lines in wscripts
See https://github.com/jackaudio/jack2/pull/319
2022-09-10 16:16:17 +03:00
Karl Linden c4d0565898 License the project clearly
This adds a LICENSE file that describes which licenses this project is
licensed under. This is very important, as the project is licensed under
three licenses.

Also added are copyright notices to the wscript files. I added myself as
copyright holder to them, but there are other people who have
contributed to these files which should have their name in the copyright
header. Clearly stating the license of the wscript files should have
been done long ago.
2022-09-10 16:15:51 +03:00
Martin Bruset Solberg 6ce70b7d34 refactor: fixed typo
(cherry picked from commit ba0fd27b9c51c34d6a2de4339e45d44edbd48518)
2022-09-10 13:01:31 +03:00
Nedko Arnaudov 44e4db9f38 CI: build on ubuntu 18.04 and ubuntu 22.04 2022-08-28 14:57:38 +03:00
Nedko Arnaudov 227cd9946a CI: Use absolute URL for jack2 git repo clone 2022-08-28 01:46:52 +03:00
Nedko Arnaudov 4802d3194b CI/jack2dbus: use match jack2 branch name 2022-08-28 01:42:47 +03:00
Nedko Arnaudov bda7594532 Revert "Use jack2 git submodule for CI"
This reverts commit a307d5fa1d.
2022-08-28 01:32:15 +03:00
Nedko Arnaudov d0cd113b5d Remove unused stuff in compat dir 2022-08-28 00:38:52 +03:00
Nedko Arnaudov db019a2692 Fix github build badge URLs 2022-08-28 00:29:58 +03:00
Nedko Arnaudov 5c4e5cff25 GNUmakefile: fix jack2dbus build 2022-08-28 00:27:47 +03:00
Nedko Arnaudov b0f8d64ed1 wscript: disable broken autooption stuff (for now) 2022-08-28 00:08:12 +03:00
Nedko Arnaudov 7cd63aaa07 GNUmakefile: spaces->tabs 2022-08-28 00:03:12 +03:00
Nedko Arnaudov b3975bdefe build.yml: fix syntax issue (hopefully) 2022-08-28 00:01:32 +03:00
Nedko Arnaudov 17a5a4fbc0 Use GNUmakefile for github jack2dbus CI 2022-08-27 23:58:17 +03:00
Nedko Arnaudov a307d5fa1d Use jack2 git submodule for CI 2022-08-27 23:52:12 +03:00
Nedko Arnaudov bcaed7850d Adjust jack2dbus build.yml 2022-08-27 23:47:12 +03:00
Nedko Arnaudov a5693beeca NEWS: Add entry about jackdbus 2.21.0 release 2022-08-27 22:38:10 +03:00
Nedko Arnaudov d59e099145 Rename ChangeLog.rst to NEWS.rst 2022-08-27 22:30:32 +03:00
Nedko Arnaudov aeffa508d7 Upgrade waf to 2.0.24 2022-08-27 22:05:10 +03:00
Nedko Arnaudov b28b97ee1b Cleanup jackdbus 2022-08-27 21:35:48 +03:00
Nedko Arnaudov 343b63b8e7 Remove non-jackdbus man pages 2022-08-27 20:09:15 +03:00
Nedko Arnaudov d921ff4dff Fix manpage installation
Before this commit the fill_template script used to always
preprocess/install jackd.0 file.

This commit makes preprocessing/installation of jackd.0 man page to
only happen when jackd is configured to be built.

(cherry picked from commit a219673cac80f3f7090abb16ad015e5730587d6b)
2022-08-27 20:07:15 +03:00
Nedko Arnaudov 819bedf737 Merge branch jackdbus-split into jackdbus/stable
This brings single change:
 * autooptions: switch to git submodule
2022-08-27 17:27:56 +03:00
Nedko Arnaudov 9e3cd203f1 autooptions: switch to git submodule 2022-08-15 03:12:07 +03:00
Filipe Coelho 99e5d115ea
Update link to new-session-manager jackaudio page 2022-08-14 23:23:54 +01:00
Nedko Arnaudov 0fbb9c161a Switch build badge to github one 2022-08-14 21:21:23 +03:00