<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libubox/lua, branch master</title>
<subtitle>C utility functions for OpenWrt</subtitle>
<id>https://git.openwrt.org/project/libubox/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/libubox/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/'/>
<updated>2025-10-07T12:19:52Z</updated>
<entry>
<title>lua: CMakeLists: drop redundant cmake_minimum_required</title>
<updated>2025-10-07T12:19:52Z</updated>
<author>
<name>David Härdeman</name>
</author>
<published>2025-10-05T15:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=7a3863acfb15413d9346d6e7b0c951b8fba72220'/>
<id>urn:sha1:7a3863acfb15413d9346d6e7b0c951b8fba72220</id>
<content type='text'>
The Lua module depends on the parent libubox project and can't be built
independently.

Drop redundant cmake_minimum_required from lua/CMakeLists.txt and
inherit the version from the parent CMake project to keep version
consistency.

Signed-off-by: David Härdeman &lt;david@hardeman.nu&gt;
Link: https://github.com/openwrt/libubox/pull/21
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>lua: build: require CMake &gt;= 3.10 due to dropped legacy support</title>
<updated>2025-10-04T10:05:10Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2025-10-03T17:44:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=c163d7ab8cdc248a4f82efe339ba29fd8001b5e7'/>
<id>urn:sha1:c163d7ab8cdc248a4f82efe339ba29fd8001b5e7</id>
<content type='text'>
CMake version 4.0 and later require minimum version of 3.5 or later.
Update to minimum version 3.10 which is the last not deprecated minimum
version.

CMake 3.10 was released in November 2017 and is included in Ubuntu 18.04.

Suggested-by: Hannu Nyman &lt;hannu.nyman@iki.fi&gt;
Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>uloop: add support for user defined signal handlers</title>
<updated>2023-11-02T16:56:45Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2023-10-16T14:35:28Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=13d9b04fb09d39a7204ba1e9cc9c8403fa22efa8'/>
<id>urn:sha1:13d9b04fb09d39a7204ba1e9cc9c8403fa22efa8</id>
<content type='text'>
Reuse and extend the existing signal waker pipe mechanism to add user
defined signal handling functionality to uloop.

This commit introduces two new api functions `uloop_signal_add()` and
`uloop_signal_remove()` along with a new structure type `uloop_signal`
to allow adding and removing arbitrary signal handlers.

Registered signal handlers are maintained in a linked list and matched
by their signo member value which allows registering multiple handlers
for the same signal numbers.

Upon registering a new signal handler, the existing handler is saved
in the `uloop_signal` structure. When removing the user defined signal
handler, the original behavior is restored.

The Lua binding has been updated as well to support the new signal
handler mechanism.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>uloop: add support for interval timers</title>
<updated>2023-11-02T16:49:55Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2023-10-14T22:17:36Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=82fa6480de7a85d0ced0701ab7c8825e31b90770'/>
<id>urn:sha1:82fa6480de7a85d0ced0701ab7c8825e31b90770</id>
<content type='text'>
So far, the only way to implement periodic interval timers was to use
one-shot uloop_timeout timers which are rearmed within their completion
callback immediately on expiration.

While simple, this approach is not very precise and interval lengths will
slowly drift over time, due to callback execution overhead, scheduling
granularity etc.

In order to make uloop provide stable and precise interval timer
capabilities, this commit introduces a new `uloop_interval` structure
along with the new related `uloop_interval_set()`, `uloop_interval_cancel()`
and `uloop_interval_remaining()` api functions.

Periodic timers are implemented using the timerfd facility an Linux and
kqueue EVFILT_TIMER events on macOS/BSD.

The Lua binding has been updated to include support for the new timer type
as well.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>lua/uloop: use uloop_timeout_remaining64</title>
<updated>2021-11-04T11:05:29Z</updated>
<author>
<name>Stijn Tintel</name>
</author>
<published>2021-11-04T10:31:28Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=c87d3e1fb67d169f484e22f18572b5329f1267ee'/>
<id>urn:sha1:c87d3e1fb67d169f484e22f18572b5329f1267ee</id>
<content type='text'>
We will deprecate uloop_timeout_remaining soon.

Signed-off-by: Stijn Tintel &lt;stijn@linux-ipv6.be&gt;
Acked-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
Acked-by: John Crispin &lt;john@phrozen.org&gt;
</content>
</entry>
<entry>
<title>lua/uloop: fd_add: use absolute indices for arguments</title>
<updated>2020-07-11T09:15:12Z</updated>
<author>
<name>Karl Palsson</name>
</author>
<published>2020-06-30T10:38:43Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=53b9a2123fc6f0a7fa09ada066cbb0491c72bcf5'/>
<id>urn:sha1:53b9a2123fc6f0a7fa09ada066cbb0491c72bcf5</id>
<content type='text'>
Instead of having to adjust the index repeatedly as the stack is
manipulated, use absolute addressing for the function arguments, so they
stay the same throughout the call.  Zero functional change, just
subjectively easier to follow variables.

Signed-off-by: Karl Palsson &lt;karlp@etactica.com&gt;
</content>
</entry>
<entry>
<title>lua/uloop: make get_sock_fd capable of absolute addresses</title>
<updated>2020-07-11T09:15:12Z</updated>
<author>
<name>Karl Palsson</name>
</author>
<published>2020-06-30T10:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=c0941d3289fc0f1468ad6384f7af141cfd4adead'/>
<id>urn:sha1:c0941d3289fc0f1468ad6384f7af141cfd4adead</id>
<content type='text'>
The original code required the use of relative addresses into the lua
stack.  It should accept either.

Signed-off-by: Karl Palsson &lt;karlp@etactica.com&gt;
</content>
</entry>
<entry>
<title>lua/uloop: fd_add() better args checking</title>
<updated>2020-07-11T09:15:12Z</updated>
<author>
<name>Karl Palsson</name>
</author>
<published>2020-06-30T10:38:41Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=161c25960ba23e46ff960e84f25055f94758b909'/>
<id>urn:sha1:161c25960ba23e46ff960e84f25055f94758b909</id>
<content type='text'>
Actually check for flags being valid, instead of simply ignoring the
call if flags was zero.

Use standard lua checks for the function argument, so you can get a
normal "argument #2 was invalid, expected function, got xxx" instead of
the vague, "invalid arg list"

Signed-off-by: Karl Palsson &lt;karlp@etactica.com&gt;
</content>
</entry>
<entry>
<title>libubox: allow reading out the pid of uloop process in lua</title>
<updated>2016-12-13T16:13:20Z</updated>
<author>
<name>Florian Eckert</name>
</author>
<published>2016-12-13T11:34:31Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=4a9f74f7ae6c092c731969c93f90ab4d6a07b524'/>
<id>urn:sha1:4a9f74f7ae6c092c731969c93f90ab4d6a07b524</id>
<content type='text'>
Add Lua method to get the forked pid of a uloop process

Signed-off-by: Florian Eckert &lt;Eckert.Florian@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libubox: allow reading out the remaining time of a uloop timer in Lua</title>
<updated>2016-12-05T17:11:50Z</updated>
<author>
<name>Stijn Cleynhens</name>
</author>
<published>2016-12-05T14:11:05Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/libubox/commit/?id=f9db1cb918da64101fdc72422551d95b054b1a38'/>
<id>urn:sha1:f9db1cb918da64101fdc72422551d95b054b1a38</id>
<content type='text'>
Add Lua method to the uloop wrapper to allow reading out the remaining time of a uloop timer

Signed-off-by: Stijn Cleynhens &lt;stijncleynhens@gmail.com&gt;
</content>
</entry>
</feed>
