xref: /kernel/linux/linux-5.10/tools/perf/util/rwsem.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/tools/perf/util/
18c2ecf20Sopenharmony_ci#ifndef _PERF_RWSEM_H
28c2ecf20Sopenharmony_ci#define _PERF_RWSEM_H
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#include <pthread.h>
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_cistruct rw_semaphore {
78c2ecf20Sopenharmony_ci	pthread_rwlock_t lock;
88c2ecf20Sopenharmony_ci};
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciint init_rwsem(struct rw_semaphore *sem);
118c2ecf20Sopenharmony_ciint exit_rwsem(struct rw_semaphore *sem);
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciint down_read(struct rw_semaphore *sem);
148c2ecf20Sopenharmony_ciint up_read(struct rw_semaphore *sem);
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciint down_write(struct rw_semaphore *sem);
178c2ecf20Sopenharmony_ciint up_write(struct rw_semaphore *sem);
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#endif /* _PERF_RWSEM_H */
20

Indexes created Thu Nov 07 10:32:03 CST 2024