]> git.corax.cc Git - toolbox/log
toolbox
4 years agoinclude/sem: Add POSIX-like semaphore implementation
Matthias Kruk [Sat, 20 Mar 2021 23:55:16 +0000 (08:55 +0900)]
include/sem: Add POSIX-like semaphore implementation

In certain situations, mutex are not enough for synchronization. This
commit adds a POSIX-like semaphore implementation that can be used to
implement things like queues or singleton scripts.

4 years agoinclude/mutex: Add symlink-based mutex implementation
Matthias Kruk [Sat, 20 Mar 2021 23:49:59 +0000 (08:49 +0900)]
include/mutex: Add symlink-based mutex implementation

Scripts that access shared resources need a means to synchronize accesses
to those resources. This commit adds a symlink-based mutex implementation
that can be used for this purpose.

4 years agotoolbox: Implement toolbox initialization and module loading
Matthias Kruk [Sat, 20 Mar 2021 23:23:32 +0000 (08:23 +0900)]
toolbox: Implement toolbox initialization and module loading

When writing shell scripts, I often find myself copying or rewriting
functions because bash does not provide a mechanism to easily reuse
code. This commit adds a mechanism for loadable bash "modules".