Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bpm-sw
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
bpm
bpm-sw
Commits
836941d5
Commit
836941d5
authored
9 years ago
by
Lucas Russo
Browse files
Options
Downloads
Patches
Plain Diff
include/sm_io_mod_dispatch.h: add macros for declaring structure in linker table
parent
b639279a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/sm_io_mod_dispatch.h
+20
-1
20 additions, 1 deletion
include/sm_io_mod_dispatch.h
with
20 additions
and
1 deletion
include/sm_io_mod_dispatch.h
+
20
−
1
View file @
836941d5
...
...
@@ -20,7 +20,26 @@ typedef struct {
const
smio_bootstrap_ops_t
*
bootstrap_ops
;
}
smio_mod_dispatch_t
;
extern
const
smio_mod_dispatch_t
smio_mod_dispatch
[];
/*
* WARNING! Using SMIO_MOD_DECLARE requires .smio_mod_dispatch section in linker script
* .smio_mod_dispatch : ALIGN(4)
* {
* _smio_mod_dispatch = .;
* KEEP(*(.smio_mod_dispatch))
* _esmio_mod_dispatch = .;
* }
*/
extern
const
smio_mod_dispatch_t
*
_smio_mod_dispatch
;
extern
const
smio_mod_dispatch_t
*
_esmio_mod_dispatch
;
#define SMIO_MOD_DECLARE(mod_id, mod_name, mod_bootstrap_ops) \
const smio_mod_dispatch_t __attribute__ ((section (".smio_mod_dispatch"))) \
smio_mod_ ## mod_id ## _ ## mod_name = { \
.id = mod_id, \
.name = mod_name, \
.bootstrap_ops = &mod_bootstrap_ops \
};
#ifdef __cplusplus
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment