sylware / nyanmp (public) (License: AGPLv3) (since 2020-02-12) (hash sha1)
intended to become a collection of media players for gnu/linux based on ffmpeg, alsa, vulkan, x11, wayland, etc.
List of commits:
Subject Hash Author Date (UTC)
spin on futex waiting in threaded scaler e90420f459c608cbcbae423b3c487598a83de359 Sylvain BERTRAND 2020-05-13 21:05:48
npa tidying and npv addition, usable on our system 443ff39347c8b599dfaafff612caed84287f1a70 Sylvain BERTRAND 2020-05-13 15:12:15
here we go d5a2b11f4d73ec5365a340163f451fa8a123d728 Sylvain BERTRAND 2020-02-12 18:50:57
Commit e90420f459c608cbcbae423b3c487598a83de359 - spin on futex waiting in threaded scaler
Author: Sylvain BERTRAND
Author date (UTC): 2020-05-13 21:05
Committer name: Sylvain BERTRAND
Committer date (UTC): 2020-05-13 21:05
Parent(s): 443ff39347c8b599dfaafff612caed84287f1a70
Signer:
Signing key:
Signing status: N
Tree: bdb97dabf3245b891ba0fb38269b6b89452dc93b
File Lines added Lines deleted
npv/thdsws/local/code.frag.c 1 5
File npv/thdsws/local/code.frag.c changed (mode: 100644) (index 96d49b1..2028789)
... ... static long futex(atomic_u32 *uaddr, long futex_op, long val)
7 7 { {
8 8 return syscall(SYS_futex, uaddr, futex_op, val, 0, 0, 0); return syscall(SYS_futex, uaddr, futex_op, val, 0, 0, 0);
9 9 } }
10
11 10 static void do_work(struct thdsws_ctx_t *ctx, struct thdsws_ctx_private_t *ctx_priv) static void do_work(struct thdsws_ctx_t *ctx, struct thdsws_ctx_private_t *ctx_priv)
12 11 { {
13 12 ctx_priv->sws = sws_get_cached_ctx(ctx_priv->sws, ctx_priv->sws = sws_get_cached_ctx(ctx_priv->sws,
 
... ... static void do_work(struct thdsws_ctx_t *ctx, struct thdsws_ctx_private_t *ctx_p
25 24 (uint8_t*const*)&ctx->scale.dst_slice, (uint8_t*const*)&ctx->scale.dst_slice,
26 25 (int*)&ctx->scale.dst_stride); (int*)&ctx->scale.dst_stride);
27 26 } }
28
29 27 static void worker(struct thdsws_ctx_t *ctx, static void worker(struct thdsws_ctx_t *ctx,
30 28 struct thdsws_ctx_private_t *ctx_priv) struct thdsws_ctx_private_t *ctx_priv)
31 29 { {
 
... ... static void worker(struct thdsws_ctx_t *ctx,
35 33 errno = 0; errno = 0;
36 34 r = futex(&ctx_priv->futex, FUTEX_WAIT, IDLE); r = futex(&ctx_priv->futex, FUTEX_WAIT, IDLE);
37 35 if (r == -1) { if (r == -1) {
38 if (errno == EINTR) /* SIGSTOP/SIGCONT/etc */
36 if (errno == EINTR || errno == EAGAIN) /* SIGSTOP/SIGCONT/etc */
39 37 return; return;
40 /* include EAGAIN */
41 38 FATALTSW("unable to wait on futex:%s\n", strerror(errno)); FATALTSW("unable to wait on futex:%s\n", strerror(errno));
42 39 } }
43 40
 
... ... static void worker(struct thdsws_ctx_t *ctx,
55 52 */ */
56 53 atomic_store(&ctx_priv->futex, IDLE); atomic_store(&ctx_priv->futex, IDLE);
57 54 } }
58
59 55 static void *worker_entry(void *arg) static void *worker_entry(void *arg)
60 56 { {
61 57 int r; int r;
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/nyanmp

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/nyanmp

Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/nyanmp

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main