diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-08-25 09:36:47 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-08-25 09:36:47 +0200 |
commit | 7c20585b55660fa4cee68ab1bd4b7de2b1f5be53 (patch) | |
tree | 54f3372275b19f52ccefc7c2936ec2685243ec23 /src | |
parent | 10c2f8ca9af659c5b7a56fdc8e8f84e931d3f6d4 (diff) | |
download | ouroboros-7c20585b55660fa4cee68ab1bd4b7de2b1f5be53.tar.gz ouroboros-7c20585b55660fa4cee68ab1bd4b7de2b1f5be53.zip |
lib: Fix bad locking in frcti_read
A read lock was taken when a write lock was needed.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c index 8009a186..1310afd8 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -375,7 +375,7 @@ static ssize_t frcti_read(int fd) clock_gettime(CLOCK_REALTIME_COARSE, &now); - pthread_rwlock_rdlock(&ai.lock); + pthread_rwlock_wrlock(&ai.lock); frcti = &(ai.frcti[fd]); |