ANDROID: rwsem: Export rwsem_waiter struct for loadable modules

The rwsem_waiter struct is needed in vendor hook alter_rwsem_list_add.
It has parameter sem which is a struct rw_semaphore (already export in
rwsem.h), inside the structure there is a wait_list to link
"struct rwsem_waiter" items. The task information in each item of the
wait_list is needed to be referenced in vendor loadable modules.

Bug: 174902706
Signed-off-by: Huang Yiwei <hyiwei@codeaurora.org>
Change-Id: Ic7d21ffdd795eaa203989751d26f8b1f32134d8b
This commit is contained in:
Huang Yiwei
2020-12-25 18:07:37 +08:00
committed by Todd Kjos
parent 4eae6d1947
commit a34582fecc
2 changed files with 13 additions and 12 deletions

View File

@@ -346,18 +346,6 @@ void __init_rwsem(struct rw_semaphore *sem, const char *name,
}
EXPORT_SYMBOL(__init_rwsem);
enum rwsem_waiter_type {
RWSEM_WAITING_FOR_WRITE,
RWSEM_WAITING_FOR_READ
};
struct rwsem_waiter {
struct list_head list;
struct task_struct *task;
enum rwsem_waiter_type type;
unsigned long timeout;
unsigned long last_rowner;
};
#define rwsem_first_waiter(sem) \
list_first_entry(&sem->wait_list, struct rwsem_waiter, list)