Re: [PATCH 2/7] Initial implementation of the trec driver and include files
- From: Johannes Weiner <hannes-kernel@xxxxxxxxxxxx>
- Date: Wed, 21 Mar 2007 19:17:40 +0100
Hi,
On Wed, Mar 21, 2007 at 09:49:12AM -0700, Wink Saville wrote:
Would p_next, p_cur and p_end be OK?Please don't use camel-case - in general.
I think it's generally disliked. Quoting Documentation/CodingStyle:
``Encoding the type of a function into the name (so-called Hungarian
notation) is brain damaged - the compiler knows the types anyway and can
check those, and it only confuses the programmer. No wonder MicroSoft
makes buggy programs.''
[...]--- /dev/null
+++ b/include/linux/trec.h
@@ -0,0 +1,34 @@
+/*
+#define TREC0() trec_write(TREC_PC_ADDR, TREC_PID,
0, 0)
+Why not seperate them by an #ifndef? So you don't have to replace TREC?
+#define ZREC0() do { } while (0)
with ZREC? but rather change one #define knob.
The reason is to allow the user easily change individual TREC's from
active to inactive by just
changing a single character. Eventually I envision adding runtime
support for changing if a
particular set of TREC's are active or not, but this was simple.
You can implement a sysctl-setting to enable/disable the whole system
(which then would be runtime changeable).
=Hannes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 2/7] Initial implementation of the trec driver and include files
- From: Wink Saville
- Re: [PATCH 2/7] Initial implementation of the trec driver and include files
- References:
- [PATCH 2/7] Initial implementation of the trec driver and include files
- From: Wink Saville
- Re: [PATCH 2/7] Initial implementation of the trec driver and include files
- From: Johannes Weiner
- Re: [PATCH 2/7] Initial implementation of the trec driver and include files
- From: Wink Saville
- [PATCH 2/7] Initial implementation of the trec driver and include files
- Prev by Date: Re: [linux-pm] 2.6.21-rc4-mm1: freezing of processes broken
- Next by Date: Re: revert PIE randomization?
- Previous by thread: Re: [PATCH 2/7] Initial implementation of the trec driver and include files
- Next by thread: Re: [PATCH 2/7] Initial implementation of the trec driver and include files
- Index(es):
Relevant Pages
|
Loading