| 174 | SYSINIT(linker_class, SI_SUB_KLD, SI_ORDER_ANY, linker_stop_class_add, NULL); |
| 175 | |
| 176 | int |
| 177 | linker_add_class(linker_class_t lc) |
| 178 | { |
| 179 | |
| 180 | /* |
| 181 | * We disallow any class registration past SI_ORDER_ANY |
| 182 | * of SI_SUB_KLD. We bump the reference count to keep the |
| 183 | * ops from being freed. |
| 184 | */ |
| 185 | if (linker_no_more_classes == 1) |
| 186 | return (EPERM); |
| 187 | kobj_class_compile((kobj_class_t) lc); |
| 188 | ((kobj_class_t)lc)->refs++; /* XXX: kobj_mtx */ |
| 189 | TAILQ_INSERT_TAIL(&classes, lc, link); |
| 190 | return (0); |
| 191 | } |
| 192 | |
| 193 | static void |
| 194 | linker_file_sysinit(linker_file_t lf) |
no test coverage detected