mirror of
https://github.com/vlang/v.git
synced 2025-09-08 14:51:53 -04:00
sync: remove the call to C.pthread_rwlockattr_setpshared (not needed, since it is the default on POSIX) (#24166)
This commit is contained in:
parent
c675963a29
commit
55b16fbdf2
@ -17,7 +17,6 @@ fn C.pthread_mutex_unlock(voidptr) int
|
|||||||
fn C.pthread_mutex_destroy(voidptr) int
|
fn C.pthread_mutex_destroy(voidptr) int
|
||||||
fn C.pthread_rwlockattr_init(voidptr) int
|
fn C.pthread_rwlockattr_init(voidptr) int
|
||||||
fn C.pthread_rwlockattr_setkind_np(voidptr, int) int
|
fn C.pthread_rwlockattr_setkind_np(voidptr, int) int
|
||||||
fn C.pthread_rwlockattr_setpshared(voidptr, int) int
|
|
||||||
fn C.pthread_rwlock_init(voidptr, voidptr) int
|
fn C.pthread_rwlock_init(voidptr, voidptr) int
|
||||||
fn C.pthread_rwlock_rdlock(voidptr) int
|
fn C.pthread_rwlock_rdlock(voidptr) int
|
||||||
fn C.pthread_rwlock_wrlock(voidptr) int
|
fn C.pthread_rwlock_wrlock(voidptr) int
|
||||||
@ -110,7 +109,6 @@ pub fn (mut m RwMutex) init() {
|
|||||||
should_be_zero(C.pthread_rwlockattr_init(&a.attr))
|
should_be_zero(C.pthread_rwlockattr_init(&a.attr))
|
||||||
// Give writer priority over readers
|
// Give writer priority over readers
|
||||||
C.pthread_rwlockattr_setkind_np(&a.attr, C.PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP)
|
C.pthread_rwlockattr_setkind_np(&a.attr, C.PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP)
|
||||||
C.pthread_rwlockattr_setpshared(&a.attr, C.PTHREAD_PROCESS_PRIVATE)
|
|
||||||
should_be_zero(C.pthread_rwlock_init(&m.mutex, &a.attr))
|
should_be_zero(C.pthread_rwlock_init(&m.mutex, &a.attr))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ fn C.pthread_mutex_unlock(voidptr) int
|
|||||||
fn C.pthread_mutex_destroy(voidptr) int
|
fn C.pthread_mutex_destroy(voidptr) int
|
||||||
fn C.pthread_rwlockattr_init(voidptr) int
|
fn C.pthread_rwlockattr_init(voidptr) int
|
||||||
fn C.pthread_rwlockattr_setkind_np(voidptr, int) int
|
fn C.pthread_rwlockattr_setkind_np(voidptr, int) int
|
||||||
fn C.pthread_rwlockattr_setpshared(voidptr, int) int
|
|
||||||
fn C.pthread_rwlockattr_destroy(voidptr) int
|
fn C.pthread_rwlockattr_destroy(voidptr) int
|
||||||
fn C.pthread_rwlock_init(voidptr, voidptr) int
|
fn C.pthread_rwlock_init(voidptr, voidptr) int
|
||||||
fn C.pthread_rwlock_rdlock(voidptr) int
|
fn C.pthread_rwlock_rdlock(voidptr) int
|
||||||
@ -97,7 +96,6 @@ pub fn (mut m RwMutex) init() {
|
|||||||
C.pthread_rwlockattr_init(&a.attr)
|
C.pthread_rwlockattr_init(&a.attr)
|
||||||
// Give writer priority over readers
|
// Give writer priority over readers
|
||||||
C.pthread_rwlockattr_setkind_np(&a.attr, C.PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP)
|
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)
|
C.pthread_rwlock_init(&m.mutex, &a.attr)
|
||||||
C.pthread_rwlockattr_destroy(&a.attr) // destroy the attr when done
|
C.pthread_rwlockattr_destroy(&a.attr) // destroy the attr when done
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ fn C.pthread_mutex_unlock(voidptr) int
|
|||||||
fn C.pthread_mutex_destroy(voidptr) int
|
fn C.pthread_mutex_destroy(voidptr) int
|
||||||
fn C.pthread_rwlockattr_init(voidptr) int
|
fn C.pthread_rwlockattr_init(voidptr) int
|
||||||
fn C.pthread_rwlockattr_setkind_np(voidptr, int) int
|
fn C.pthread_rwlockattr_setkind_np(voidptr, int) int
|
||||||
fn C.pthread_rwlockattr_setpshared(voidptr, int) int
|
|
||||||
fn C.pthread_rwlockattr_destroy(voidptr) int
|
fn C.pthread_rwlockattr_destroy(voidptr) int
|
||||||
fn C.pthread_rwlock_init(voidptr, voidptr) int
|
fn C.pthread_rwlock_init(voidptr, voidptr) int
|
||||||
fn C.pthread_rwlock_rdlock(voidptr) int
|
fn C.pthread_rwlock_rdlock(voidptr) int
|
||||||
@ -95,7 +94,6 @@ pub fn (mut m RwMutex) init() {
|
|||||||
C.pthread_rwlockattr_init(&a.attr)
|
C.pthread_rwlockattr_init(&a.attr)
|
||||||
// Give writer priority over readers
|
// Give writer priority over readers
|
||||||
C.pthread_rwlockattr_setkind_np(&a.attr, C.PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP)
|
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)
|
C.pthread_rwlock_init(&m.mutex, &a.attr)
|
||||||
C.pthread_rwlockattr_destroy(&a.attr) // destroy the attr when done
|
C.pthread_rwlockattr_destroy(&a.attr) // destroy the attr when done
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user