summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp-data.h
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-10-23 16:00:33 +0200
committerdimitri staessens <[email protected]>2016-10-23 16:00:33 +0200
commit5a2e524418154deab5cac0e65d48a8391c860eea (patch)
tree69170f9ac6b659233fb30c2bdf3429c801a5d1aa /src/ipcpd/ipcp-data.h
parentcd9a137216afe11620262e1df763b1c757cebd16 (diff)
downloadouroboros-5a2e524418154deab5cac0e65d48a8391c860eea.tar.gz
ouroboros-5a2e524418154deab5cac0e65d48a8391c860eea.zip
ipcpd: Improve locking in ipcp-data
This solves some potential data races in the shims.
Diffstat (limited to 'src/ipcpd/ipcp-data.h')
-rw-r--r--src/ipcpd/ipcp-data.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ipcpd/ipcp-data.h b/src/ipcpd/ipcp-data.h
index a9a637f0..4472a1d7 100644
--- a/src/ipcpd/ipcp-data.h
+++ b/src/ipcpd/ipcp-data.h
@@ -36,12 +36,10 @@ struct ipcp_data {
char * dif_name;
struct list_head registry;
- pthread_mutex_t reg_lock;
+ pthread_rwlock_t reg_lock;
struct list_head directory;
- pthread_mutex_t dir_lock;
-
- pthread_mutex_t lock;
+ pthread_rwlock_t dir_lock;
};
struct ipcp_data * ipcp_data_create(void);