File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ extern void wait_for_completion(struct completion *);
103
103
extern void wait_for_completion_io (struct completion * );
104
104
extern int wait_for_completion_interruptible (struct completion * x );
105
105
extern int wait_for_completion_killable (struct completion * x );
106
+ extern int wait_for_completion_state (struct completion * x , unsigned int state );
106
107
extern unsigned long wait_for_completion_timeout (struct completion * x ,
107
108
unsigned long timeout );
108
109
extern unsigned long wait_for_completion_io_timeout (struct completion * x ,
Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ EXPORT_SYMBOL(wait_for_completion_io_timeout);
204
204
int __sched wait_for_completion_interruptible (struct completion * x )
205
205
{
206
206
long t = wait_for_common (x , MAX_SCHEDULE_TIMEOUT , TASK_INTERRUPTIBLE );
207
+
207
208
if (t == - ERESTARTSYS )
208
209
return t ;
209
210
return 0 ;
@@ -241,12 +242,23 @@ EXPORT_SYMBOL(wait_for_completion_interruptible_timeout);
241
242
int __sched wait_for_completion_killable (struct completion * x )
242
243
{
243
244
long t = wait_for_common (x , MAX_SCHEDULE_TIMEOUT , TASK_KILLABLE );
245
+
244
246
if (t == - ERESTARTSYS )
245
247
return t ;
246
248
return 0 ;
247
249
}
248
250
EXPORT_SYMBOL (wait_for_completion_killable );
249
251
252
+ int __sched wait_for_completion_state (struct completion * x , unsigned int state )
253
+ {
254
+ long t = wait_for_common (x , MAX_SCHEDULE_TIMEOUT , state );
255
+
256
+ if (t == - ERESTARTSYS )
257
+ return t ;
258
+ return 0 ;
259
+ }
260
+ EXPORT_SYMBOL (wait_for_completion_state );
261
+
250
262
/**
251
263
* wait_for_completion_killable_timeout: - waits for completion of a task (w/(to,killable))
252
264
* @x: holds the state of this particular completion
You can’t perform that action at this time.
0 commit comments