summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2022-02-17 19:10:18 +0100
committerSander Vrijders <sander@ouroboros.rocks>2022-02-18 08:43:14 +0100
commit9f80503e9e970ba828bc347d13eaad9e3c36b8f5 (patch)
tree3c5b63cbbd6a12cb3074f06a7b9fd90e0634c7d6 /src/ipcpd/ipcp.c
parent9277021361a82617b595052ef3bdaf368981f1d8 (diff)
downloadouroboros-9f80503e9e970ba828bc347d13eaad9e3c36b8f5.tar.gz
ouroboros-9f80503e9e970ba828bc347d13eaad9e3c36b8f5.zip
ipcpd: Remove unused wait_state function
Probably a leftover from previous shutdown logic. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index cd09a7cf..12caac17 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -954,37 +954,6 @@ enum ipcp_state ipcp_get_state()
return state;
}
-int ipcp_wait_state(enum ipcp_state state,
- const struct timespec * timeout)
-{
- struct timespec abstime;
- int ret = 0;
-
- clock_gettime(PTHREAD_COND_CLOCK, &abstime);
- ts_add(&abstime, timeout, &abstime);
-
- pthread_mutex_lock(&ipcpi.state_mtx);
-
- pthread_cleanup_push(__cleanup_mutex_unlock, &ipcpi.state_mtx);
-
- while (ipcpi.state != state
- && ipcpi.state != IPCP_SHUTDOWN
- && ipcpi.state != IPCP_NULL
- && ret != -ETIMEDOUT) {
- if (timeout == NULL)
- ret = -pthread_cond_wait(&ipcpi.state_cond,
- &ipcpi.state_mtx);
- else
- ret = -pthread_cond_timedwait(&ipcpi.state_cond,
- &ipcpi.state_mtx,
- &abstime);
- }
-
- pthread_cleanup_pop(true);
-
- return ret;
-}
-
void ipcp_lock_to_core(void)
{
#if defined(__linux__) && !defined(DISABLE_CORE_LOCK)