Skip to content

Commit

Permalink
[remux] name remux threads (#221)
Browse files Browse the repository at this point in the history
* Name remux threads
* Fix PR action
  • Loading branch information
Eeems authored May 28, 2024
1 parent d8b33c8 commit 3197799
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ jobs:

steps:
- name: "Checkout source"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

- name: "Build artifacts"
run: |
ARCH=rm make docker
ARCH=kobo make docker
CROSS_TC=arm-kobo-linux-gnueabihf DOCKERFILE=Dockerfile.kobo FBINK=1 TARGET=kobo make docker
TARGET=rm make docker
- uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/stable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:

steps:
- name: "Checkout source"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true


- name: "Build artifacts"
Expand Down
3 changes: 3 additions & 0 deletions src/remux/launcher.cpy
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <chrono>

#include <time.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
Expand Down Expand Up @@ -466,6 +467,7 @@ class App: public IApp:
_ := system("mkdir /run/ 2> /dev/null")
_ = system("/usr/bin/mkfifo /run/remux.api 2>/dev/null")
self.ipc_thread = new thread([=]() {
prctl(PR_SET_NAME, "fifo\0", 0, 0, 0)
fd := open("/run/remux.api", O_RDONLY)

string remainder = ""
Expand Down Expand Up @@ -495,6 +497,7 @@ class App: public IApp:
debug "STARTING SUSPEND THREAD"
version := util::get_remarkable_version()
self.idle_thread = new thread([=]() {
prctl(PR_SET_NAME, "suspend\0", 0, 0, 0)
last_wake := 0
while true:
now := time(NULL)
Expand Down

0 comments on commit 3197799

Please sign in to comment.