lkml.org 
[lkml]   [2002]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] Workqueue Abstraction, 2.5.40-H7
On Tue, Oct 01, 2002 at 10:29:02PM +0200, Ingo Molnar wrote:
> On Tue, 1 Oct 2002, Linus Torvalds wrote:
> > Pease don't introduce more typedefs. They only hide what the hell the
> > thing is, which is actively _bad_ for structures, since passing a
[...]
> Despite all the previous fuss about the problems of typedefs, i've never
> had *any* problem with using typedefs in various code i wrote. It only
> ever made things cleaner - to me.

Hi Ingo,

I follow your reasoning, but one thing I don't follow -

+typedef struct work_s {
+ unsigned long pending;
+ struct list_head entry;
+ void (*func)(void *);
+ void *data;
+ void *wq_data;
+ timer_t timer;
+} work_t;

- why two names for the structure ("struct work_s" and "work_t")?

Either convention will work, but by declaring the structure twice it only
encourages users to employ their own favorite - thus defeating the purpose
of a convention.

Just curious,
-Kevin

--
------------------------------------------------------------------------
| Kevin O'Connor "BTW, IMHO we need a FAQ for |
| kevin@koconnor.net 'IMHO', 'FAQ', 'BTW', etc. !" |
------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.125 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site