@@ -479,6 +479,19 @@ uint32_t cus__nr_entries(const struct cus *cus)
return cus->nr_entries;
}
+void __cus__remove(struct cus *cus, struct cu *cu)
+{
+ cus->nr_entries--;
+ list_del_init(&cu->node);
+}
+
+void cus__remove(struct cus *cus, struct cu *cu)
+{
+ cus__lock(cus);
+ __cus__remove(cus, cu);
+ cus__unlock(cus);
+}
+
void __cus__add(struct cus *cus, struct cu *cu)
{
cus->nr_entries++;
@@ -173,6 +173,10 @@ int cus__load_dir(struct cus *cus, struct conf_load *conf,
const int recursive);
void __cus__add(struct cus *cus, struct cu *cu);
void cus__add(struct cus *cus, struct cu *cu);
+
+void __cus__remove(struct cus *cus, struct cu *cu);
+void cus__remove(struct cus *cus, struct cu *cu);
+
void cus__print_error_msg(const char *progname, const struct cus *cus,
const char *filename, const int err);
struct cu *cus__find_pair(struct cus *cus, const char *name);