Skip to contentSkip to conversation

kernel/sched.c: remove two unused functions

RFC PATCH In review Adrian Bunk 3 participants 3 messages May 13, 2005 – May 14, 2005

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 kernel/sched.c: remove two unused functions

This patch removes the unused functions wait_for_completion_timeout and wait_for_completion_interruptible_timeout.

Is any usage for them planned or is this patch OK?

---

This patch was already sent on:
- 7 May 2005

 include/linux/completion.h |    4 --
 kernel/sched.c             |   66 -------------------------------------
 2 files changed, 70 deletions(-)
include/linux/completion.h renamed from include/linux/completion.h.old +0 -4
@@ -29,10 +29,6 @@
 
 extern void FASTCALL(wait_for_completion(struct completion *));
 extern int FASTCALL(wait_for_completion_interruptible(struct completion *x));
-extern unsigned long FASTCALL(wait_for_completion_timeout(struct completion *x,
-						   unsigned long timeout));
-extern unsigned long FASTCALL(wait_for_completion_interruptible_timeout(
-			struct completion *x, unsigned long timeout));
 
 extern void FASTCALL(complete(struct completion *));
 extern void FASTCALL(complete_all(struct completion *));
kernel/sched.c renamed from kernel/sched.c.old +0 -66

78 lines not on this page · raw message

#1 lore raw
Quoted 4 lines · Adrian Bunk

This patch removes the unused functions wait_for_completion_timeout and wait_for_completion_interruptible_timeout.

Is any usage for them planned or is this patch OK?

yes, there's usage planned and patches pending - to convert certain sort of semaphore-based completion code to real completion code.

Ingo

#2 lore raw
In reply to Adrian Bunk
Quoted 8 lines · Adrian Bunk

This patch removes the unused functions wait_for_completion_timeout and wait_for_completion_interruptible_timeout.

Is any usage for them planned or is this patch OK?

From the changelog for the patch which added these functions:

Adds 3 new completion API calls, which are a straightforward extension of the current APIs:

int wait_for_completion_interruptible(struct completion *x); unsigned long wait_for_completion_timeout(struct completion *x,

                                                   unsigned long timeout);
 unsigned long wait_for_completion_interruptible_timeout(
                        struct completion *x, unsigned long timeout);

This enables the conversion of more semaphore-using code to completions. There is code that cannot be converted right now (and is forced to use semaphores) because these primitives are missing. Thomas Gleixner has a bunch of patches to make use of them.