On Fri, 4 Mar 2016, Donald Sharp wrote:

Both the read and write functions used the same code
slightly modified for reading and writing.  Combine this
code together.

Ack, with one request:

/* Add new read thread. */
struct thread *
-funcname_thread_add_read (struct thread_master *m,
+funcname_thread_add_read_write (int dir, struct thread_master *m,

-/* Add new write thread. */
-struct thread *
-funcname_thread_add_write (struct thread_master *m,

-extern struct thread *funcname_thread_add_read (struct thread_master *,
-                                               int (*)(struct thread *),
-                                               void *, int, debugargdef);
-extern struct thread *funcname_thread_add_write (struct thread_master *,
-                                                int (*)(struct thread *),
-                                                void *, int, debugargdef);
+extern struct thread *funcname_thread_add_read_write (int dir, struct 
thread_master *,
+                                                     int (*)(struct thread *),
+                                                     void *, int, debugargdef);
extern struct thread *funcname_thread_add_timer (struct thread_master *,
                                                 int (*)(struct thread *),
                                                 void *, long, debugargdef);

Can you just make the _add_read_write version an internal, static symbol and keep the existing symbols with their existing interface as front-ends to it?

regards,
--
Paul Jakma      [email protected]  @pjakma Key ID: 64A2FF6A
Fortune:
Between grand theft and a legal fee, there only stands a law degree.

_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to