On Thu, 2007-11-15 at 20:30 +0530, Abhishek Sagar wrote: > On Nov 15, 2007 4:21 AM, Jim Keniston <[EMAIL PROTECTED]> wrote: > > 2. Simplify the task of correlating data (e.g., timestamps) between > > function entry and function return. > > Would adding of data and len fields in ri help? Instead of "pouching" > data in one go at registration time, this would let user handlers do > the allocation
Yes and no. Adding just a data field -- void*, or maybe unsigned long long so it's big enought to accommodate big timestamps -- would be a big improvement on your current proposal. That would save the user the drudgery of mapping the ri pointer to his/her per-instance data. There's plenty of precedent for passing "private_data" values to callbacks. I don't think a len field would help much. If such info were needed, it could be stored in the data structure pointed to by the data field. I still don't think "letting [i.e., requiring that] user handlers do the allocation" is a win. I'm still interested to see how this plays out in real examples. > and allow them to use different kinds of data > structures per-instance. I haven't been able to think of any scenarios where this would be useful. A "data pouch" could always contain a union, FWIW. > > - Abhishek Sagar Jim - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

