Lines Matching full:set
40 * For Mach-O, this is done by constructing a separate section for each set.
51 * violating the assumption that linker set elements are packed.
55 #define __MAKE_SET_QV(set, sym, qv) \ argument
58 __set_##set##_sym_##sym __section("__DATA,set_" #set) \
60 #define __MAKE_SET(set, sym) __MAKE_SET_QV(set, sym, __MAKE_SET_CONST) argument
85 #define __SET_RANGE(set) ({ \ argument
89 "set_" #set, &__set_size); \
91 __CONCAT(__typeof_set_,set) **begin; \
92 __CONCAT(__typeof_set_,set) **limit; \
94 .begin = (__CONCAT(__typeof_set_,set) **)__set_data, \
95 .limit = (__CONCAT(__typeof_set_,set) **)(__set_data + \
103 #define TEXT_SET(set, sym) __MAKE_SET(set, sym) argument
104 #define DATA_SET(set, sym) __MAKE_SET(set, sym) argument
105 #define DATA_WSET(set, sym) __MAKE_SET_QV(set, sym, ) argument
106 #define BSS_SET(set, sym) __MAKE_SET(set, sym) argument
107 #define ABS_SET(set, sym) __MAKE_SET(set, sym) argument
108 #define SET_ENTRY(set, sym) __MAKE_SET(set, sym) argument
111 * Initialize before referring to a given linker set.
113 #define SET_DECLARE(set, ptype) \ argument
114 typedef ptype __CONCAT(__typeof_set_,set)
116 #define SET_BEGIN(set) \ argument
117 (__SET_RANGE(set).begin)
118 #define SET_LIMIT(set) \ argument
119 (__SET_RANGE(set).limit)
122 * Iterate over all the elements of a set.
126 * and the address of each set item is obtained inside the loop by "*pvar".
128 #define SET_FOREACH(pvar, set) \ argument
129 for (pvar = SET_BEGIN(set); pvar < SET_LIMIT(set); pvar++)
131 #define SET_ITEM(set, i) \ argument
132 ((SET_BEGIN(set))[i])
135 * Provide a count of the items in a set.
137 #define SET_COUNT(set) \ argument
138 (SET_LIMIT(set) - SET_BEGIN(set))