summaryrefslogtreecommitdiff
path: root/src/irmd/registry.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2023-03-14 12:50:25 +0100
committerSander Vrijders <sander@ouroboros.rocks>2023-03-18 17:12:27 +0100
commited90f46a8207cb1289704ea64bc490d5835f3010 (patch)
treeadfa5098e51d521984040a369e67f779d2dc2ba7 /src/irmd/registry.c
parent540e8b531a1f02b3b2cc58ac246ace16aabe774e (diff)
downloadouroboros-ed90f46a8207cb1289704ea64bc490d5835f3010.tar.gz
ouroboros-ed90f46a8207cb1289704ea64bc490d5835f3010.zip
irmd: Remove unused function reg_entry_wait_state
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/registry.c')
-rw-r--r--src/irmd/registry.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/irmd/registry.c b/src/irmd/registry.c
index 0aebdab7..b34e9494 100644
--- a/src/irmd/registry.c
+++ b/src/irmd/registry.c
@@ -455,45 +455,6 @@ int reg_entry_leave_state(struct reg_entry * e,
return ret;
}
-int reg_entry_wait_state(struct reg_entry * e,
- enum reg_name_state state,
- struct timespec * timeout)
-{
- struct timespec abstime;
- int ret = 0;
-
- assert(e);
- assert(state != REG_NAME_DESTROY);
-
- if (timeout != NULL) {
- clock_gettime(PTHREAD_COND_CLOCK, &abstime);
- ts_add(&abstime, timeout, &abstime);
- }
-
- pthread_mutex_lock(&e->state_lock);
-
- while (e->state != state &&
- e->state != REG_NAME_DESTROY &&
- ret != -ETIMEDOUT)
- if (timeout)
- ret = -pthread_cond_timedwait(&e->state_cond,
- &e->state_lock,
- &abstime);
- else
- ret = -pthread_cond_wait(&e->state_cond,
- &e->state_lock);
-
- if (e->state == REG_NAME_DESTROY) {
- ret = -1;
- e->state = REG_NAME_NULL;
- pthread_cond_broadcast(&e->state_cond);
- }
-
- pthread_mutex_unlock(&e->state_lock);
-
- return ret;
-}
-
struct reg_entry * registry_get_entry(struct list_head * registry,
const char * name)
{