]> Kevux Git Server - controller/commit
Progress: Continue changes to locking.
authorKevin Day <Kevin@kevux.org>
Mon, 3 Nov 2025 04:03:04 +0000 (22:03 -0600)
committerKevin Day <Kevin@kevux.org>
Mon, 3 Nov 2025 04:03:04 +0000 (22:03 -0600)
commit9e32268e56ff19378e01fa9cafc9b597e65e4021
tree824aaf810d1980578c500e2a9c400fb81a464571
parent2c623bffab4a72397f6fcb7013d300f745379931
Progress: Continue changes to locking.

Change the rules array to be an array of pointers.
This better allows for locking and unlocking individual rules without having to hold locks on the rules array.
The rules array locks can now be shorter lived.

The stack itself needs to be an array of rule pointers now.
The index location is no longer needed or used.
This further allows for avouding needing locks on the rules array.

This refactoring is very much incomplete and controller probably does not work yet.

There are no locks available on individual rules yet.
This needs to happen!
I have added an explicit `@todo` in at least one location describing this.

Utilize the more granular error codes from the `f_thread_mutex_full_delete()` to handle the attibute delete even if the mutex delete itself fails.
I do not know how that should be handled.
There are still long term plans to make this program ever-running.
In such cases, all error states must be as recoverable as possible.
I doubt that I will get to this anytime soon.
25 files changed:
sources/c/program/controller/main/common/print.c
sources/c/program/controller/main/common/print.h
sources/c/program/controller/main/common/type/cache.c
sources/c/program/controller/main/common/type/cache.h
sources/c/program/controller/main/common/type/defs.h
sources/c/program/controller/main/common/type/instance.c
sources/c/program/controller/main/common/type/instance.h
sources/c/program/controller/main/common/type/lock.c
sources/c/program/controller/main/common/type/lock.h
sources/c/program/controller/main/common/type/process.c
sources/c/program/controller/main/common/type/rule.c
sources/c/program/controller/main/common/type/rule.h
sources/c/program/controller/main/controller.h
sources/c/program/controller/main/entry/process.c
sources/c/program/controller/main/file.c
sources/c/program/controller/main/instance.c
sources/c/program/controller/main/instance.h
sources/c/program/controller/main/lock.c
sources/c/program/controller/main/lock.h
sources/c/program/controller/main/rule.c
sources/c/program/controller/main/rule.h
sources/c/program/controller/main/rule/instance.c
sources/c/program/controller/main/rule/instance.h
sources/c/program/controller/main/rule/read.c
sources/c/program/controller/main/thread/cleanup.c