]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2005-04-22 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
authorajs <ajs>
Fri, 22 Apr 2005 14:23:34 +0000 (14:23 +0000)
committerajs <ajs>
Fri, 22 Apr 2005 14:23:34 +0000 (14:23 +0000)
* thread.h: Fix type for struct thread_master add_type: should be
  unsigned char.  Also, add some documentation of thread_add_background
  args.  And remove extraneous declaration of
  show_thread_work_queues_cmd.

lib/ChangeLog
lib/thread.h

index bef71f4d3dbe0ba7db61b7d6d37751861dbff2f9..5d3239b6ea6441384054030b4d200140ff606b23 100644 (file)
@@ -1,3 +1,10 @@
+2005-04-22 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * thread.h: Fix type for struct thread_master add_type: should be
+         unsigned char.  Also, add some documentation of thread_add_background
+         args.  And remove extraneous declaration of
+         show_thread_work_queues_cmd.
+
 2005-04-22 Paul Jakma <paul.jakma@sun.com>
 
        * memory.h: Move include of memtypes.h to after the definition of
index ae3f5509cfdcdfdffc9477fbe70679ef0d035caa..aef9df7904c978272c57363f4738c0687f4895f5 100644 (file)
@@ -58,7 +58,7 @@ struct thread_master
 struct thread
 {
   unsigned char type;          /* thread type */
-  unsigned add_type;           /* thread type */
+  unsigned char add_type;      /* thread type */
   struct thread *next;         /* next pointer of the thread */   
   struct thread *prev;         /* previous pointer of the thread */
   struct thread_master *master;        /* pointer to the struct thread_master. */
@@ -136,6 +136,8 @@ struct cpu_thread_history  {
 #define thread_add_timer_msec(m,f,a,v) funcname_thread_add_timer_msec(m,f,a,v,#f)
 #define thread_add_event(m,f,a,v) funcname_thread_add_event(m,f,a,v,#f)
 #define thread_execute(m,f,a,v) funcname_thread_execute(m,f,a,v,#f)
+
+/* The 4th arg to thread_add_background is the # of milliseconds to delay. */
 #define thread_add_background(m,f,a,v) funcname_thread_add_background(m,f,a,v,#f)
 
 /* Prototypes. */
@@ -151,9 +153,10 @@ struct thread *funcname_thread_add_timer_msec (struct thread_master *,
 struct thread *funcname_thread_add_event (struct thread_master *,
                                 int (*)(struct thread *), void *, int, const char*);
 struct thread *funcname_thread_add_background (struct thread_master *,
-                                              int (*)(struct thread *),
-                                              void *, 
-                                              long, const char*);
+                                              int (*func)(struct thread *),
+                                              void *arg,
+                                              long milliseconds_to_delay,
+                                              const char *funcname);
 
 void thread_cancel (struct thread *);
 void thread_cancel_event (struct thread_master *, void *);
@@ -166,7 +169,6 @@ unsigned long thread_timer_remain_second (struct thread *);
 int thread_should_yield (struct thread *);
 
 extern struct cmd_element show_thread_cpu_cmd;
-extern struct cmd_element show_thread_work_queues_cmd;
 
 extern unsigned long thread_consumed_time(RUSAGE_T *after, RUSAGE_T *before);