lkml.org 
[lkml]   [2000]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: INIT_LIST_HEAD marco audit
"Mohammad A. Haque" wrote:
>
> Thinko.
>
> Question is... Adam Richter posted a patch for i2o_lan.c that does
> this...
>
> static struct tq_struct i2o_post_buckets_task = {
> list: LIST_HEAD_INIT(i2o_post_buckets_task.list),
> sync: 0,
> routine: (void (*)(void *))i2o_lan_receive_post,
> data: (void *) 0
> };
>

Will someone pleeeeze compile, test, use and submit this?

--- linux-2.4.0-test12-pre7/include/linux/tqueue.h Mon Dec 11 13:21:04 2000
+++ linux/include/linux/tqueue.h Tue Dec 12 10:03:51 2000
@@ -47,6 +47,16 @@
#define DECLARE_TASK_QUEUE(q) LIST_HEAD(q)
#define TQ_ACTIVE(q) (!list_empty(&q))

+#define INIT_TQ_STRUCT(routine, data) \
+ { list: LIST_HEAD_INIT(*(struct list_head *)0), \
+ sync: 0, \
+ routine: (routine), \
+ data: (data), \
+ }
+
+#define DECLARE_TQ_STRUCT(name, routine, data) \
+ struct tq_struct name = INIT_TQ_STRUCT(routine, data)
+
extern task_queue tq_timer, tq_immediate, tq_disk;

/*
-
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/
\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.046 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site