- /*
- * assert that one only registration is made per-node type
- */
- if (vec_len(ad_vfts) > type)
- ASSERT(NULL == ad_vfts[type].adv_last_lock);
-
- /*
- * Assert that we are getting each of the required functions
- */
- ASSERT(NULL != vft->adv_last_lock);
-
- vec_validate(ad_vfts, type);
- ad_vfts[type] = *vft;
+ /*
+ * assert that one only registration is made per-node type
+ */
+ if (vec_len(ad_vfts) > type)
+ ASSERT(NULL == ad_vfts[type].adv_adj_deleted);
+
+ vec_validate(ad_vfts, type);
+ ad_vfts[type] = *vft;
+}
+
+/**
+ * adj_delegate_register_new_type
+ *
+ * Register the function table for a new type
+ */
+adj_delegate_type_t
+adj_delegate_register_new_type (const adj_delegate_vft_t *vft)
+{
+ adj_delegate_type_t type;
+
+ type = ++ad_max_id;
+
+ vec_validate(ad_vfts, type);
+ ad_vfts[type] = *vft;
+
+ return (type);