1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: remove rwshared keyword, make its semantics default for shared (#5710)

This commit is contained in:
Uwe Krüger
2020-07-07 01:57:31 +02:00
committed by GitHub
parent 013c0e6e16
commit ef02373061
14 changed files with 70 additions and 96 deletions

View File

@@ -33,6 +33,7 @@ pub fn new_rwmutex() &RwMutex {
C.pthread_rwlockattr_init(&a.attr)
// Give writer priority over readers
C.pthread_rwlockattr_setkind_np(&a.attr, C.PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP)
C.pthread_rwlockattr_setpshared(&a.attr, C.PTHREAD_PROCESS_PRIVATE)
C.pthread_rwlock_init(&m.mutex, &a.attr)
return m
}