* include/grub/kernel.h (FOR_MODULES): Make it a bit faster.
This commit is contained in:
parent
a14b16d1f9
commit
7a7f7cc9c3
2 changed files with 7 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-12-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* include/grub/kernel.h (FOR_MODULES): Make it a bit faster.
|
||||
|
||||
2011-12-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* include/grub/types.h (GRUB_PROPERLY_ALIGNED_ARRAY): Add missing
|
||||
|
|
|
@ -71,15 +71,13 @@ struct grub_module_info64
|
|||
|
||||
extern grub_addr_t EXPORT_VAR (grub_modbase);
|
||||
|
||||
#define FOR_MODULES(var) for (var = grub_modbase ? (struct grub_module_header *) \
|
||||
#define FOR_MODULES(var) for (\
|
||||
var = grub_modbase ? (struct grub_module_header *) \
|
||||
(grub_modbase + (((struct grub_module_info *) grub_modbase)->offset)) : 0;\
|
||||
var && (grub_addr_t) var \
|
||||
< (grub_modbase + (((struct grub_module_info *) grub_modbase)->size)); \
|
||||
var = (struct grub_module_header *) \
|
||||
((grub_uint32_t *) var \
|
||||
+ ((((struct grub_module_header *) var)->size \
|
||||
+ sizeof (grub_uint32_t) - 1) \
|
||||
/ sizeof (grub_uint32_t))))
|
||||
((grub_uint32_t *) var + ((struct grub_module_header *) var)->size / 4))
|
||||
|
||||
grub_addr_t grub_modules_get_end (void);
|
||||
|
||||
|
|
Loading…
Reference in a new issue