diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-12 11:55:52 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-08-12 11:55:52 +0200 |
commit | 44cc6aaa41d88dc978a087178fd74a1c2dba70fd (patch) | |
tree | 10b398bf23356751a961c332a9dff053c6927f24 /src/ipcpd/ipcp.h | |
parent | cf30e07cf862b117013e8c7fa2fb5c2ac8fef245 (diff) | |
parent | 5432e665fd6eac776c5985d98058e5c4645ec0e4 (diff) | |
download | ouroboros-44cc6aaa41d88dc978a087178fd74a1c2dba70fd.tar.gz ouroboros-44cc6aaa41d88dc978a087178fd74a1c2dba70fd.zip |
Merged in sandervrijders/ouroboros/be-state-mutex (pull request #209)
ipcpd: Add condition variable to IPCP state
Diffstat (limited to 'src/ipcpd/ipcp.h')
-rw-r--r-- | src/ipcpd/ipcp.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ipcpd/ipcp.h b/src/ipcpd/ipcp.h index 630f7922..8b7d4ec9 100644 --- a/src/ipcpd/ipcp.h +++ b/src/ipcpd/ipcp.h @@ -45,10 +45,13 @@ struct ipcp { int irmd_fd; enum ipcp_state state; - pthread_rwlock_t state_lock; + pthread_mutex_t state_lock; + pthread_cond_t state_cond; }; struct ipcp * ipcp_instance_create(); +void ipcp_state_change(struct ipcp * ipcp, + enum ipcp_state state); void * ipcp_main_loop(void * o); void * ipcp_sdu_loop(void * o); int ipcp_parse_arg(int argc, char * argv[]); |