Skip to content

Added rtapi_ioperm() declaration for hal_speaker#2164

Merged
andypugh merged 2 commits intoLinuxCNC:2.9from
petterreinholdtsen:2.9-rtapi-ioperm
Dec 7, 2022
Merged

Added rtapi_ioperm() declaration for hal_speaker#2164
andypugh merged 2 commits intoLinuxCNC:2.9from
petterreinholdtsen:2.9-rtapi-ioperm

Conversation

@petterreinholdtsen
Copy link
Copy Markdown
Collaborator

This fixes the following compiler warning:

hal/drivers/hal_speaker.c: In function ‘rtapi_app_main’: hal/drivers/hal_speaker.c:164:9: warning: implicit declaration of function ‘ioperm’ [-Wimplicit-function-declaration]
164 | if (ioperm(SPEAKER_PORT, 1, 1) < 0) {
| ^~~~~~

@petterreinholdtsen
Copy link
Copy Markdown
Collaborator Author

Note, I do not know if this is a good idea, as I do not understand the scope and purpose of the rtapi set of methods.

@SebKuzminsky
Copy link
Copy Markdown
Collaborator

The Realtime API (RTAPI) is meant to be an abstraction layer that makes it so all our realtime code can run on all the available realtime kernels.

Functionality like starting threads, allocating shared memory segments, or accessing I/O ports is done differently on different realtime kernels and platforms, but RTAPI provides an API that hides all those differences. So yes, i think this new function belongs in RTAPI.

Please also add it to the rtapi_io manpage.

This fixes the following compiler warning:

hal/drivers/hal_speaker.c: In function ‘rtapi_app_main’:
hal/drivers/hal_speaker.c:164:9: warning: implicit declaration of function ‘ioperm’ [-Wimplicit-function-declaration]
  164 |     if (ioperm(SPEAKER_PORT, 1, 1) < 0) {
      |         ^~~~~~
@petterreinholdtsen
Copy link
Copy Markdown
Collaborator Author

petterreinholdtsen commented Nov 29, 2022 via email

@andypugh andypugh merged commit 09fdfb7 into LinuxCNC:2.9 Dec 7, 2022
@petterreinholdtsen petterreinholdtsen deleted the 2.9-rtapi-ioperm branch December 12, 2022 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants