Only the read lock needs priority inversion
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
bd8b97f428
commit
9cb3696feb
2 changed files with 9 additions and 9 deletions
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -304,7 +304,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -qq
|
sudo apt-get update -qq
|
||||||
sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static
|
sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static
|
||||||
sudo apt-get install -yqq pandoc texlive-latex-base
|
sudo apt-get install -yqq pandoc texlive-latex-recommended
|
||||||
- name: Bootstrap toolchain
|
- name: Bootstrap toolchain
|
||||||
if: steps.mpb-cache.outputs.cache-hit != 'true'
|
if: steps.mpb-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
|
@ -343,7 +343,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -qq
|
sudo apt-get update -qq
|
||||||
sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static
|
sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static
|
||||||
sudo apt-get install -yqq pandoc texlive-latex-base
|
sudo apt-get install -yqq pandoc texlive-latex-recommended
|
||||||
- name: Bootstrap toolchain
|
- name: Bootstrap toolchain
|
||||||
if: steps.mpb-cache.outputs.cache-hit != 'true'
|
if: steps.mpb-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
|
@ -382,7 +382,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -qq
|
sudo apt-get update -qq
|
||||||
sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static
|
sudo apt-get install -yqq acl bc curl cvs git mercurial rsync subversion wget bison bzip2 flex gawk gperf gzip help2man nano perl patch tar texinfo unzip automake binutils build-essential cpio libtool libncurses-dev pkg-config python libtool-bin liblo-dev qemu-user-static
|
||||||
sudo apt-get install -yqq pandoc texlive-latex-base
|
sudo apt-get install -yqq pandoc texlive-latex-recommended
|
||||||
- name: Bootstrap toolchain
|
- name: Bootstrap toolchain
|
||||||
if: steps.mpb-cache.outputs.cache-hit != 'true'
|
if: steps.mpb-cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -29,18 +29,18 @@ struct SharedMutex {
|
||||||
|
|
||||||
SharedMutex() noexcept {
|
SharedMutex() noexcept {
|
||||||
pthread_mutexattr_t attr;
|
pthread_mutexattr_t attr;
|
||||||
|
|
||||||
pthread_mutexattr_init(&attr);
|
pthread_mutexattr_init(&attr);
|
||||||
pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
|
pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
|
||||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||||
pthread_mutex_init(&readLock, &attr);
|
pthread_mutex_init(&readLock, &attr);
|
||||||
pthread_mutexattr_destroy(&attr);
|
pthread_mutexattr_destroy(&attr);
|
||||||
|
|
||||||
pthread_mutexattr_init(&attr);
|
pthread_mutexattr_t attr2;
|
||||||
pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
|
pthread_mutexattr_init(&attr2);
|
||||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
|
pthread_mutexattr_setprotocol(&attr2, PTHREAD_PRIO_NONE);
|
||||||
pthread_mutex_init(&writeLock, &attr);
|
pthread_mutexattr_settype(&attr2, PTHREAD_MUTEX_NORMAL);
|
||||||
pthread_mutexattr_destroy(&attr);
|
pthread_mutex_init(&writeLock, &attr2);
|
||||||
|
pthread_mutexattr_destroy(&attr2);
|
||||||
}
|
}
|
||||||
|
|
||||||
~SharedMutex() noexcept {
|
~SharedMutex() noexcept {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue