@@ -479,13 +479,16 @@ uint32_t cus__nr_entries(const struct cus *cus)
return cus->nr_entries;
}
-void cus__add(struct cus *cus, struct cu *cu)
+void __cus__add(struct cus *cus, struct cu *cu)
{
- cus__lock(cus);
-
cus->nr_entries++;
list_add_tail(&cu->node, &cus->cus);
+}
+void cus__add(struct cus *cus, struct cu *cu)
+{
+ cus__lock(cus);
+ __cus__add(cus, cu);
cus__unlock(cus);
cu__find_class_holes(cu);
@@ -171,6 +171,7 @@ int cus__fprintf_load_files_err(struct cus *cus, const char *tool,
int cus__load_dir(struct cus *cus, struct conf_load *conf,
const char *dirname, const char *filename_mask,
const int recursive);
+void __cus__add(struct cus *cus, struct cu *cu);
void cus__add(struct cus *cus, struct cu *cu);
void cus__print_error_msg(const char *progname, const struct cus *cus,
const char *filename, const int err);