Source
38
38
#include <ti/ipc/mm/MmRpc.h>
39
39
#include "dce_priv.h"
40
40
#include "libdce.h"
41
41
#include "dce_rpc.h"
42
42
#include "memplugin.h"
43
43
44
44
45
45
extern MmRpc_Handle MmRpcHandle[];
46
46
extern pthread_mutex_t ipc_mutex;
47
47
int is_ipc_ready = 0;
48
+
static int dce_buf_count = 0;
48
49
49
50
int dce_buf_lock(int num, size_t *handle)
50
51
{
51
52
int i;
52
53
MmRpc_BufDesc *desc = NULL;
53
54
dce_error_status eError = DCE_EOK;
54
55
55
56
pthread_mutex_lock(&ipc_mutex);
56
57
57
58
if (!is_ipc_ready) {
106
107
EXIT:
107
108
if( desc ) {
108
109
free(desc);
109
110
}
110
111
111
112
pthread_mutex_unlock(&ipc_mutex);
112
113
113
114
return (eError);
114
115
}
115
116
116
-
117
+
void dce_ipc_recover(void)
118
+
{
119
+
if (is_ipc_ready) {
120
+
dce_ipc_deinit(IPU, -1);
121
+
is_ipc_ready = 0;
122
+
}
123
+
}