diff options
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r-- | src/ipcpd/ipcp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c index 544b10df..0263d7b5 100644 --- a/src/ipcpd/ipcp.c +++ b/src/ipcpd/ipcp.c @@ -33,6 +33,8 @@ struct ipcp * ipcp_instance_create() { + pthread_condattr_t cattr; + struct ipcp * i = malloc(sizeof *i); if (i == NULL) return NULL; @@ -43,7 +45,9 @@ struct ipcp * ipcp_instance_create() i->state = IPCP_INIT; pthread_mutex_init(&i->state_lock, NULL); - pthread_cond_init(&i->state_cond, NULL); + pthread_condattr_init(&cattr); + pthread_condattr_setclock(&cattr, PTHREAD_COND_CLOCK); + pthread_cond_init(&i->state_cond, &cattr); return i; } |