Skip to content

hal: Fix constructor signature and remove rtapi_app's access to private HAL API - #4280

Merged
grandixximo merged 1 commit into
LinuxCNC:masterfrom
BsAtHome:halgs_newinst-rtapi_app
Jul 29, 2026
Merged

hal: Fix constructor signature and remove rtapi_app's access to private HAL API#4280
grandixximo merged 1 commit into
LinuxCNC:masterfrom
BsAtHome:halgs_newinst-rtapi_app

Conversation

@BsAtHome

Copy link
Copy Markdown
Contributor

This PR updates the constructor signature for constructable modules (rtapi_app's newinst command). Note that constructable modules are highly experimental, completely untested and not readily accessible by normal users.
There are no in-tree components that use the construct and the mailing list has been silent. It is assumed to be a dormant feature never fully developed. It can therefore be assumed that the newinst construct has no users. It is inaccessible from halcmd and needs direct rtapi_app interaction to be activated.

Regardless, the old code was problematic because the constructor signature was lacking const in its arguments and rtapi_app used private HAL APIs to achieve its goal. This is no longer allowed and the construction needs to be inside the HAL library with a proper call from rtapi_app. Both problems are fixed.

Changing the constructor signature should not be a problem considering it is only accessible by being a very experimentation happy user. We already require recompilation on many of the committed changes. This is no different.

The PR moves the already exposed function from hal_lib_extra.c into hal_lib.c so that it (easily) can become part of the RT HAL library, which is a requirement for the call from rtapi_app because of the dynamic load.

@grandixximo
grandixximo merged commit d5c3687 into LinuxCNC:master Jul 29, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants