This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH RFC] Protoize lin-thread.c, linux-thread.c


More protoization...

The only head scratcher in this one was get_lwp_from_thread_id().  I
didn't know what to make of the comment, so I left it next to the
parameter name.  When I ran indent on the line in question, it decided
to put a tab in.  I didn't realize this until I created the patch --
it looks like a single space in the editor.  (If someone can suggest
something better to do with this comment, I'll happily move it
elsewhere.)

	* lin-thread.c (threadlist_iter, get_lwp_from_thread_id,
	thread_db_xfer_memory): Protoize.
	* linux-thread.c (iterate_active_threads): Protoize.

Index: lin-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/lin-thread.c,v
retrieving revision 1.7
diff -u -r1.7 lin-thread.c
--- lin-thread.c	2000/09/03 11:51:49	1.7
+++ lin-thread.c	2000/09/11 07:47:51
@@ -813,11 +813,8 @@
 }
 
 static void
-threadlist_iter (func, data, state, type)
-     int (*func) ();
-     void *data;
-     td_thr_state_e state;
-     td_thr_type_e  type;
+threadlist_iter (int (*func) (), void *data, td_thr_state_e state,
+		 td_thr_type_e type)
 {
   int i;
 
@@ -1149,8 +1146,7 @@
  */
 
 static int	/* lwpid_t or pid_t */
-get_lwp_from_thread_id (tid)
-     int tid;	/* thread_t? */
+get_lwp_from_thread_id (int tid	/* thread_t? */)
 {
   td_thrhandle_t th;
   td_err_e       ret;
@@ -1218,12 +1214,8 @@
  */
 
 static int
-thread_db_xfer_memory (memaddr, myaddr, len, dowrite, target)
-     CORE_ADDR memaddr;
-     char *myaddr;
-     int len;
-     int dowrite;
-     struct target_ops *target;	/* ignored */
+thread_db_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int dowrite,
+		       struct target_ops *target)
 {
   struct cleanup *old_chain;
   int ret;
Index: linux-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-thread.c,v
retrieving revision 1.8
diff -u -r1.8 linux-thread.c
--- linux-thread.c	2000/07/30 01:48:26	1.8
+++ linux-thread.c	2000/09/11 07:47:53
@@ -568,9 +568,7 @@
    If ALL is non-zero, process all threads.
    If ALL is zero, skip threads with pending status.  */
 static void
-iterate_active_threads (func, all)
-    void (*func)(int);
-    int all;
+iterate_active_threads (void (*func) (int), int all)
 {
   CORE_ADDR descr;
   int pid;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]