Skip to content

dlopen: Introduce the ChapelProgramRegistration.chpl module - #28720

Merged
dlongnecke-cray merged 3 commits into
chapel-lang:mainfrom
dlongnecke-cray:dynamic-loading-30
Apr 30, 2026
Merged

dlongnecke-cray merged 3 commits into
chapel-lang:mainfrom
dlongnecke-cray:dynamic-loading-30

Conversation

@dlongnecke-cray

@dlongnecke-cray dlongnecke-cray commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

This PR introduces a new internal module which is responsible for setting up a chpl_rt_prginfo struct with details from the Chapel program. It is a companion to #28716 (and the branch is currently based on top of it).

This PR is meant to introduce the structure of the module. Not all of the callbacks and constants are wired up here - I will add that as a subsequent PR.

Reviewed by @jabraham17. Thanks much!

Comment on lines +79 to +83
// NOTE: This absolutely, should not, under ANY circumstances, create a
// Chapel procedure pointer from 'callback'! The only thing that
// should be happening here is to cast the local address of the
// 'callback' to a 'void*'! (Otherwise, everything explodes...)
const ptr1: c_fn_ptr = __primitive("capture fn", callback, true);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

Comment on lines +137 to +138
// TODO: In the future we can generate a module containing this function by
// using a script, similiar to what we do for 'SysCTypes.chpl'.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah this is gonna need to be generated, I can already see it becoming unwieldy

Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
Signed-off-by: David Longnecker <dlongnecke-cray@users.noreply.github.com>
@dlongnecke-cray
dlongnecke-cray merged commit 4d8167a into chapel-lang:main Apr 30, 2026
12 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