Messages in this thread | | | Date | Tue, 18 May 1999 00:41:18 +0200 (CEST) | From | Davide Libenzi <> | Subject | Re: schedule() "spaghetti" in 2.3.2 .. |
| |
Hi Rik,
I've proposed to Linus a solution that IMVHO keep the code in schedule() a little bit cleaner. This is what I suggest :
#define block_begin(f) begin_##f: #define block_end(f) goto ret_##f #define block_call(f) goto begin_##f; ret_##f:
void schedule() {
...
if (...) block_call(foo1);
if (...) block_call(foo2);
...
block_begin(foo1) ... block_end(foo1)
block_begin(foo2) ... block_end(foo2)
}
Cheers, Davide.
-- "Debian, the Freedom in Freedom."
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |