Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
430232ac
Commit
430232ac
authored
Mar 15, 2016
by
Davide Ciminaghi
Committed by
Alessandro Rubini
Apr 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppsi.h: add macros for setting up struct pp_argline tables
Signed-off-by:
Davide Ciminaghi
<
ciminaghi@gnudd.com
>
parent
f1d048c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
ppsi.h
include/ppsi/ppsi.h
+38
-0
No files found.
include/ppsi/ppsi.h
View file @
430232ac
...
...
@@ -313,6 +313,44 @@ struct pp_argline {
int
needs_port
;
};
/* Below are macros for setting up pp_argline arrays */
#define OFFS(s,f) offsetof(struct s, f)
#define OPTION(s,func,k,typ,a,field,i) \
{ \
.f = func, \
.keyword = k, \
.t = typ, \
.args = a, \
.field_offset = OFFS(s,field), \
.needs_port = i, \
}
#define LEGACY_OPTION(func,k,typ) \
{ \
.f = func, \
.keyword = k, \
.t = typ, \
}
#define INST_OPTION(func,k,t,a,field) \
OPTION(pp_instance,func,k,t,a,field,1)
#define INST_OPTION_INT(k,t,a,field) \
INST_OPTION(f_simple_int,k,t,a,field)
#define RT_OPTION(func,k,t,a,field) \
OPTION(pp_runtime_opts,func,k,t,a,field,0)
#define GLOB_OPTION(func,k,t,a,field) \
OPTION(pp_globals,func,k,t,a,field,0)
#define RT_OPTION_INT(k,t,a,field) \
RT_OPTION(f_simple_int,k,t,a,field)
#define GLOB_OPTION_INT(k,t,a,field) \
GLOB_OPTION(f_simple_int,k,t,a,field)
/* Both the architecture and the extension can provide config arguments */
extern
struct
pp_argline
pp_arch_arglines
[];
extern
struct
pp_argline
pp_ext_arglines
[];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment