#ifndef LOCKING_H #define LOCKING_H #include struct spinlock { pthread_spinlock_t lock; }; struct mutexlock { pthread_mutex_t lock; }; #define MUTEXLOCK_INITIALIZER { .lock = PTHREAD_MUTEX_INITIALIZER } struct rwlock { pthread_rwlock_t lock; }; static inline int spinlock_init(struct spinlock *l) { return -pthread_spin_init(&l->lock, 0); } static inline void spinlock_destroy(struct spinlock *l) { pthread_spin_destroy(&l->lock); } static inline void spinlock_lock(struct spinlock *l) { pthread_spin_lock(&l->lock); } static inline void spinlock_unlock(struct spinlock *l) { pthread_spin_unlock(&l->lock); } static inline int mutexlock_init(struct mutexlock *l) { return -pthread_mutex_init(&l->lock, 0); } static inline void mutexlock_destroy(struct mutexlock *l) { pthread_mutex_destroy(&l->lock); } static inline void mutexlock_lock(struct mutexlock *l) { pthread_mutex_lock(&l->lock); } static inline void mutexlock_unlock(struct mutexlock *l) { pthread_mutex_unlock(&l->lock); } static inline int rwlock_init(struct rwlock *l) { return -pthread_rwlock_init(&l->lock, 0); } static inline int rwlock_init2(struct rwlock *l, pthread_rwlockattr_t *attr) { return -pthread_rwlock_init(&l->lock, attr); } static inline void rwlock_destroy(struct rwlock *l) { pthread_rwlock_destroy(&l->lock); } static inline void rwlock_rd_lock(struct rwlock *l) { pthread_rwlock_rdlock(&l->lock); } static inline void rwlock_wr_lock(struct rwlock *l) { pthread_rwlock_wrlock(&l->lock); } static inline void rwlock_unlock(struct rwlock *l) { pthread_rwlock_unlock(&l->lock); } #endif /* LOCKING_H */ 90b2284a68c727c5'>refslogtreecommitdiff
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2016-04-11 12:57:50 +0900
committerKrzysztof Kozlowski <k.kozlowski@samsung.com>2016-05-03 12:22:56 +0200
commite9a53680de225a9df146a90e90b2284a68c727c5 (patch)
treed35e59dd6efe17bba9df770139df6fc4a3e96860
parent6b088a62ebc327a204bd102233515d2b67235285 (diff)
ARM: dts: exynos: Add DMC bus frequency for exynos3250-rinato/monk
This patch adds the DMC (Dynamic Memory Controller) bus frequency node which includes the devfreq-events and regulator properties. The bus frequency support the DVFS (Dynamic Voltage Frequency Scaling) feature with ondemand governor. The devfreq-events (ppmu_dmc0*) can monitor the utilization of DMC bus on runtime and the buck1_reg (VDD_MIF power line) supplies the power to the DMC block. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>