Messages in this thread |  | | Date | Wed, 06 Sep 2000 00:48:20 +0200 | From | Martin Dalecki <> | Subject | Re: kernel debugging |
| |
Elmer Joandi wrote: > > > understanding the > > > underlying principles and the code. > > Speaking about that, I have been long time dreaming > about following strict standard template for linux kernel functions: > (macroplay intended) > ---------------------- > INLINE(context,level,for_speed, fixed) returntype functionname > (PARM(parameters)){ > DEBUG(ENTRY,SUBSYSTEM, module, functionname); > /* function body starts */ > do something > do something > on success goto ok; > on failure goto failure_reason_name; > /* function body ends */ > ok: > on ok do something > DEBUG(EXIT,SUBSYSTEM, module functionname, OK); > exit or return whatever > failure_reason_name; > on this reason do something > DEBUG(EXIT,SUBSYSTEM, module, functionname, reason_name); > exit or return whatever > failure_reason_name1; > on this reason do something > DEBUG(EXIT,SUBSYSTEM, module, functionname, reason_name1); > exit or return whatever > }; > ----------------------
Please have a tought look at the floppy tape streamer driver to see why this is a BAD IDEA. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |