File tree 1 file changed +4
-11
lines changed
1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ static int pthread_barrier_wait(pthread_barrier_t *barrier)
148
148
149
149
#define THREAD_STATE_WAIT_TIMED_OUT ETIMEDOUT
150
150
151
- typdef struct
151
+ typedef struct
152
152
{
153
153
pthread_t thread ;
154
154
pthread_mutex_t mutex ; /* Protects input_reports */
@@ -171,15 +171,8 @@ static void thread_state_free(hid_device_thread_state *state)
171
171
pthread_mutex_destroy (& state -> mutex );
172
172
}
173
173
174
- static void thread_state_push_cleanup (void (* routine )(void * ), void * arg )
175
- {
176
- pthread_cleanup_push (& cleanup_mutex , dev );
177
- }
178
-
179
- static void thread_state_pop_cleanup (int execute )
180
- {
181
- pthread_cleanup_pop (execute );
182
- }
174
+ #define thread_state_push_cleanup pthread_cleanup_push
175
+ #define thread_state_pop_cleanup pthread_cleanup_pop
183
176
184
177
static void thread_state_lock (hid_device_thread_state * state )
185
178
{
@@ -218,7 +211,7 @@ static void thread_state_wait_barrier(hid_device_thread_state *state)
218
211
219
212
static void thread_state_create_thread (hid_device_thread_state * state , void * (* func )(void * ), void * func_arg )
220
213
{
221
- pthread_create (& dev -> thread , NULL , func , param );
214
+ pthread_create (& state -> thread , NULL , func , func_arg );
222
215
}
223
216
224
217
static void thread_state_join_thread (hid_device_thread_state * state )
You can’t perform that action at this time.
0 commit comments