diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-12-28 09:51:08 +0100 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-12-28 09:51:08 +0100 |
commit | f8e230049143412ac424d4cbfd4ca95b6c7f64e1 (patch) | |
tree | 3e722461be65504e6658f75b7b651f93bb8764e1 /src/irmd/registry.h | |
parent | 502e7bb39096f6ce7718c29d9616bbd0314d045e (diff) | |
download | ouroboros-f8e230049143412ac424d4cbfd4ca95b6c7f64e1.tar.gz ouroboros-f8e230049143412ac424d4cbfd4ca95b6c7f64e1.zip |
irmd: Hide reg_entry internal lock
Diffstat (limited to 'src/irmd/registry.h')
-rw-r--r-- | src/irmd/registry.h | 60 |
1 files changed, 34 insertions, 26 deletions
diff --git a/src/irmd/registry.h b/src/irmd/registry.h index f0da9267..1cb1d921 100644 --- a/src/irmd/registry.h +++ b/src/irmd/registry.h @@ -67,46 +67,54 @@ struct reg_entry { pthread_mutex_t state_lock; }; -int reg_entry_add_apn(struct reg_entry * e, - struct apn_entry * a); +int reg_entry_add_apn(struct reg_entry * e, + struct apn_entry * a); -void reg_entry_del_apn(struct reg_entry * e, - char * apn); +void reg_entry_del_apn(struct reg_entry * e, + char * apn); -char * reg_entry_get_apn(struct reg_entry * e); +char * reg_entry_get_apn(struct reg_entry * e); -int reg_entry_add_api(struct reg_entry * e, - pid_t api); +int reg_entry_add_api(struct reg_entry * e, + pid_t api); -void reg_entry_del_api(struct reg_entry * e, - pid_t api); +void reg_entry_del_api(struct reg_entry * e, + pid_t api); -pid_t reg_entry_get_api(struct reg_entry * e); +pid_t reg_entry_get_api(struct reg_entry * e); -struct reg_entry * registry_add_name(struct list_head * registry, - char * name); +enum reg_name_state reg_entry_get_state(struct reg_entry * e); -void registry_del_name(struct list_head * registry, - char * name); +int reg_entry_set_state(struct reg_entry * e, + enum reg_name_state state); -void registry_del_api(struct list_head * registry, - pid_t api); +int reg_entry_leave_state(struct reg_entry * e, + enum reg_name_state state); -void registry_sanitize_apis(struct list_head * registry); +struct reg_entry * registry_add_name(struct list_head * registry, + char * name); -struct reg_entry * registry_get_entry(struct list_head * registry, +void registry_del_name(struct list_head * registry, char * name); -int registry_add_name_to_dif(struct list_head * registry, - char * name, - char * dif_name, - enum ipcp_type type); +void registry_del_api(struct list_head * registry, + pid_t api); + +void registry_sanitize_apis(struct list_head * registry); + +struct reg_entry * registry_get_entry(struct list_head * registry, + char * name); + +int registry_add_name_to_dif(struct list_head * registry, + char * name, + char * dif_name, + enum ipcp_type type); -void registry_del_name_from_dif(struct list_head * registry, - char * name, - char * dif_name); +void registry_del_name_from_dif(struct list_head * registry, + char * name, + char * dif_name); -void registry_destroy(struct list_head * registry); +void registry_destroy(struct list_head * registry); #endif /* OUROBOROS_IRMD_REGISTRY_H */ |