Changeset 1b20da0 in mainline for kernel/generic/include/cpu/cpu_mask.h
- Timestamp:
- 2018-02-28T17:52:03Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3061bc1
- Parents:
- df6ded8
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/cpu/cpu_mask.h
rdf6ded8 r1b20da0 39 39 #include <lib/memfnc.h> 40 40 41 /** Iterates over all cpu id's whose bit is included in the cpu mask. 42 * 41 /** Iterates over all cpu id's whose bit is included in the cpu mask. 42 * 43 43 * Example usage: 44 44 * @code 45 45 * DEFINE_CPU_MASK(cpu_mask); 46 46 * cpu_mask_active(&cpu_mask); 47 * 47 * 48 48 * cpu_mask_for_each(cpu_mask, cpu_id) { 49 49 * printf("Cpu with logical id %u is active.\n", cpu_id); … … 53 53 #define cpu_mask_for_each(mask, cpu_id) \ 54 54 for (unsigned int (cpu_id) = 0; (cpu_id) < config.cpu_count; ++(cpu_id)) \ 55 if (cpu_mask_is_set(&(mask), (cpu_id))) 55 if (cpu_mask_is_set(&(mask), (cpu_id))) 56 56 57 57 /** Allocates a cpu_mask_t on stack. */ … … 74 74 extern bool cpu_mask_is_none(cpu_mask_t *); 75 75 76 #endif /* KERN_CPU_CPU_MASK_H_ */ 76 #endif /* KERN_CPU_CPU_MASK_H_ */ 77 77 78 78 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.