diff options
Diffstat (limited to 'include/linker_lists.h')
-rw-r--r-- | include/linker_lists.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linker_lists.h b/include/linker_lists.h index fd98ecd297c..2fea54c8343 100644 --- a/include/linker_lists.h +++ b/include/linker_lists.h @@ -212,6 +212,22 @@ }) /** + * ll_entry_ref() - Get a reference to a linker-generated array entry + * + * Once an extern ll_entry_declare() has been used to declare the reference, + * this macro allows the entry to be accessed. + * + * This is like ll_entry_get(), but without the extra code, so it is suitable + * for putting into data structures. + * + * @_type: C type of the list entry, e.g. 'struct foo' + * @_name: name of the entry + * @_list: name of the list + */ +#define ll_entry_ref(_type, _name, _list) \ + ((_type *)&_u_boot_list_2_##_list##_2_##_name) + +/** * ll_start() - Point to first entry of first linker-generated array * @_type: Data type of the entry * |