xref: /kernel/linux/linux-6.6/tools/perf/util/rwsem.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/tools/perf/util/
162306a36Sopenharmony_ci#ifndef _PERF_RWSEM_H
262306a36Sopenharmony_ci#define _PERF_RWSEM_H
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci#include <pthread.h>
562306a36Sopenharmony_ci
662306a36Sopenharmony_cistruct rw_semaphore {
762306a36Sopenharmony_ci	pthread_rwlock_t lock;
862306a36Sopenharmony_ci};
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ciint init_rwsem(struct rw_semaphore *sem);
1162306a36Sopenharmony_ciint exit_rwsem(struct rw_semaphore *sem);
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciint down_read(struct rw_semaphore *sem);
1462306a36Sopenharmony_ciint up_read(struct rw_semaphore *sem);
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciint down_write(struct rw_semaphore *sem);
1762306a36Sopenharmony_ciint up_write(struct rw_semaphore *sem);
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci#endif /* _PERF_RWSEM_H */
20

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