hc
2023-11-06 1622ff3442ff6aecc1f538cda437379d1f6a4a93
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Copyright (c) 2014, Linaro Limited
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License Version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 */
#ifndef TEE_MUTEX_WAIT_H
#define TEE_MUTEX_WAIT_H
 
#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/device.h>
 
struct tee_mutex_wait_private {
   struct mutex mu;
   struct list_head db;
};
 
int tee_mutex_wait_init(struct tee_mutex_wait_private *priv);
void tee_mutex_wait_exit(struct tee_mutex_wait_private *priv);
 
void tee_mutex_wait_delete(struct device *dev,
           struct tee_mutex_wait_private *priv,
           u32 key);
void tee_mutex_wait_wakeup(struct device *dev,
           struct tee_mutex_wait_private *priv,
           u32 key, u32 wait_after);
void tee_mutex_wait_sleep(struct device *dev,
           struct tee_mutex_wait_private *priv,
           u32 key, u32 wait_tick);
 
#endif /*TEE_MUTEX_WAIT_H*/