diff options
author | Dimitri Staessens <[email protected]> | 2023-03-14 12:50:25 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2023-03-18 17:12:27 +0100 |
commit | ed90f46a8207cb1289704ea64bc490d5835f3010 (patch) | |
tree | adfa5098e51d521984040a369e67f779d2dc2ba7 /src/irmd/registry.c | |
parent | 540e8b531a1f02b3b2cc58ac246ace16aabe774e (diff) | |
download | ouroboros-ed90f46a8207cb1289704ea64bc490d5835f3010.tar.gz ouroboros-ed90f46a8207cb1289704ea64bc490d5835f3010.zip |
irmd: Remove unused function reg_entry_wait_state
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/irmd/registry.c')
-rw-r--r-- | src/irmd/registry.c | 39 |
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) { |