Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern - Nuke __P().



details:   https://anonhg.NetBSD.org/src/rev/85f99b0b1fb3
branches:  trunk
changeset: 559759:85f99b0b1fb3
user:      junyoung <junyoung%NetBSD.org@localhost>
date:      Tue Mar 23 13:22:32 2004 +0000

description:
- Nuke __P().
- Drop trailing spaces.

diffstat:

 sys/kern/exec_macho.c   |  63 +++++++++++++++----------------
 sys/kern/kern_kcont.c   |  28 +++++++-------
 sys/kern/kern_lkm.c     |  32 ++++++++--------
 sys/kern/kern_physio.c  |  14 +++---
 sys/kern/kern_subr.c    |  55 +++++++++++++--------------
 sys/kern/subr_extent.c  |  20 +++++-----
 sys/kern/sysv_shm.c     |  37 +++++++++---------
 sys/kern/tty_conf.c     |  96 ++++++++++++++++++++++++------------------------
 sys/kern/vfs_subr.c     |  64 ++++++++++++++++----------------
 sys/kern/vfs_syscalls.c |  46 +++++++++++------------
 10 files changed, 224 insertions(+), 231 deletions(-)

diffs (truncated from 1346 to 300 lines):

diff -r 10432e1bedd4 -r 85f99b0b1fb3 sys/kern/exec_macho.c
--- a/sys/kern/exec_macho.c     Tue Mar 23 13:22:03 2004 +0000
+++ b/sys/kern/exec_macho.c     Tue Mar 23 13:22:32 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_macho.c,v 1.29 2003/10/20 22:42:40 manu Exp $     */
+/*     $NetBSD: exec_macho.c,v 1.30 2004/03/23 13:22:32 junyoung Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exec_macho.c,v 1.29 2003/10/20 22:42:40 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exec_macho.c,v 1.30 2004/03/23 13:22:32 junyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -73,20 +73,17 @@
     struct vnode *, struct exec_macho_fat_header *, u_long *, int, int, int);
 
 #ifdef DEBUG_MACHO
-static void exec_macho_print_segment_command 
-    __P((struct exec_macho_segment_command *));
-static void exec_macho_print_fat_header __P((struct exec_macho_fat_header *));
-static void exec_macho_print_fat_arch __P((struct exec_macho_fat_arch *));
-static void exec_macho_print_object_header 
-    __P((struct exec_macho_object_header *));
-static void exec_macho_print_load_command 
-    __P((struct exec_macho_load_command *));
-static void exec_macho_print_dylinker_command 
-    __P((struct exec_macho_dylinker_command *));
-static void exec_macho_print_dylib_command 
-    __P((struct exec_macho_dylib_command *));
-static void exec_macho_print_thread_command 
-    __P((struct exec_macho_thread_command *));
+static void exec_macho_print_segment_command
+    (struct exec_macho_segment_command *);
+static void exec_macho_print_fat_header(struct exec_macho_fat_header *);
+static void exec_macho_print_fat_arch(struct exec_macho_fat_arch *);
+static void exec_macho_print_object_header(struct exec_macho_object_header *);
+static void exec_macho_print_load_command(struct exec_macho_load_command *);
+static void exec_macho_print_dylinker_command
+    (struct exec_macho_dylinker_command *);
+static void exec_macho_print_dylib_command(struct exec_macho_dylib_command *);
+static void exec_macho_print_thread_command
+    (struct exec_macho_thread_command *);
 
 static void
 exec_macho_print_segment_command(ls)
@@ -114,7 +111,7 @@
 }
 
 static void
-exec_macho_print_fat_arch(arch) 
+exec_macho_print_fat_arch(arch)
        struct exec_macho_fat_arch *arch;
 {
        printf("arch.cputype %x\n", be32toh(arch->cputype));
@@ -216,7 +213,7 @@
                if (strcmp(ls->segname, "__TEXT") == 0) {
                        epp->ep_taddr = addr;
                        epp->ep_tsize = round_page(ls->vmsize);
-                       emea->macho_hdr = 
+                       emea->macho_hdr =
                            (struct exec_macho_object_header *)addr;
                }
                if ((strcmp(ls->segname, "__DATA") == 0) ||
@@ -228,7 +225,7 @@
                }
        }
 
-       /* 
+       /*
         * Some libraries do not have a load base address. The Darwin
         * kernel seems to skip them, and dyld will do the job.
         */
@@ -236,7 +233,7 @@
                return ENOMEM;
 
        if (ls->filesize > 0) {
-               NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_map_pagedvn, size, 
+               NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_map_pagedvn, size,
                    addr, vp, (off_t)(ls->fileoff + foff),
                    ls->initprot, flags);
                DPRINTF(("map(0x%lx, 0x%lx, %o, fd@ 0x%lx)\n",
@@ -247,7 +244,7 @@
        if (ls->vmsize > size) {
                addr += size;
                size = round_page(ls->vmsize - size);
-               NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_map_zero, size, 
+               NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_map_zero, size,
                    addr, vp, (off_t)(ls->fileoff + foff),
                    ls->initprot, flags);
                DPRINTF(("mmap(0x%lx, 0x%lx, %o, zero)\n",
@@ -342,7 +339,7 @@
         */
        if (depth++ > 6)
                return E2BIG;
-       
+
        /*
         * 1. open file
         * 2. read filehdr
@@ -381,7 +378,7 @@
        if ((error = exec_read_from(p, vp, 0, &fat, sizeof(fat))) != 0)
                goto bad;
 
-       if ((error = exec_macho_load_vnode(p, epp, vp, &fat, 
+       if ((error = exec_macho_load_vnode(p, epp, vp, &fat,
            entry, type, recursive, depth)) != 0)
                goto bad;
 
@@ -431,7 +428,7 @@
 #endif
 
        switch(be32toh(fat->magic)){
-       case MACHO_FAT_MAGIC:           
+       case MACHO_FAT_MAGIC:
                for (i = 0; i < be32toh(fat->nfat_arch); i++, arch) {
                        if ((error = exec_read_from(p, vp, sizeof(*fat) +
                            sizeof(arch) * i, &arch, sizeof(arch))) != 0)
@@ -443,7 +440,7 @@
                                if (*sc == be32toh(arch.cputype))
                                        break;
 
-                       if (sc != NULL) 
+                       if (sc != NULL)
                                break;
                }
                if (sc == NULL || *sc == 0) {
@@ -454,7 +451,7 @@
                break;
 
        case MACHO_MOH_MAGIC:
-               /* 
+               /*
                 * This is not a FAT Mach-O binary, the file starts
                 * with the object header.
                 */
@@ -491,7 +488,7 @@
                goto bad;
        }
 
-               
+
        aoffs = be32toh(arch.offset);
        offs = aoffs + sizeof(hdr);
        size = sizeof(lc);
@@ -517,7 +514,7 @@
 
                switch (lc.cmd) {
                case MACHO_LC_SEGMENT:
-                       error = exec_macho_load_segment(epp, vp, aoffs, 
+                       error = exec_macho_load_segment(epp, vp, aoffs,
                            (struct exec_macho_segment_command *)buf, type);
 
                        switch(error) {
@@ -544,15 +541,15 @@
                        emea->dynamic = 1;
                        break;
                case MACHO_LC_LOAD_DYLIB:
-                       /* 
-                        * We should only load libraries required by the 
-                        * binary we want to load, not libraries required 
+                       /*
+                        * We should only load libraries required by the
+                        * binary we want to load, not libraries required
                         * by theses libraries.
                         */
                        if (recursive == 0)
                                break;
                        if ((error = exec_macho_load_dylib(p, epp,
-                           (struct exec_macho_dylib_command *)buf, 
+                           (struct exec_macho_dylib_command *)buf,
                            depth)) != 0) {
                                DPRINTF(("load dylib failed\n"));
                                goto bad;
@@ -643,7 +640,7 @@
         * has been found yet.
         */
        epp->ep_entry = 0;
-               
+
        if ((error = exec_macho_load_vnode(p, epp, epp->ep_vp, fat,
            &epp->ep_entry, MACHO_MOH_EXECUTE, 1, 0)) != 0)
                goto bad;
diff -r 10432e1bedd4 -r 85f99b0b1fb3 sys/kern/kern_kcont.c
--- a/sys/kern/kern_kcont.c     Tue Mar 23 13:22:03 2004 +0000
+++ b/sys/kern/kern_kcont.c     Tue Mar 23 13:22:32 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_kcont.c,v 1.4 2004/03/20 18:34:57 he Exp $ */
+/* $NetBSD: kern_kcont.c,v 1.5 2004/03/23 13:22:32 junyoung Exp $ */
 
 /*
  * Copyright 2003 Jonathan Stone.
@@ -37,7 +37,7 @@
 /*
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_kcont.c,v 1.4 2004/03/20 18:34:57 he Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: kern_kcont.c,v 1.5 2004/03/23 13:22:32 junyoung Exp $ ");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -59,7 +59,7 @@
 
 /* Accessors for struct kc_queue */
 static __inline struct kc * kc_set(struct kc *,
-       void (*func) __P((void *, void *, int)),
+       void (*func)(void *, void *, int),
        void *env_arg, int ipl);
 
 static __inline void kcont_enqueue_atomic(kcq_t *kcq, struct kc *kc);
@@ -115,18 +115,18 @@
        if (kc != NULL) {
                SIMPLEQ_REMOVE_HEAD(kcq, kc_next);
                SIMPLEQ_NEXT(kc, kc_next) = NULL;
-       }               
+       }
        splx(s);
        return kc;
 }
 
 /*
  * Construct a continuation object from pre-allocated memory.
- * Used by functions that are about call an asynchronous operation, 
+ * Used by functions that are about call an asynchronous operation,
  * to build a continuation to be called once the operation completes.
  */
 static __inline struct kc *
-kc_set(struct kc *kc, void (*func) __P((void *, void *, int)),
+kc_set(struct kc *kc, void (*func)(void *, void *, int),
        void *env_arg, int ipl)
 {
        kc->kc_fn = func;
@@ -142,10 +142,10 @@
 }
 
 /*
- * Request a continuation. Caller provides space for the struct kc *. 
+ * Request a continuation. Caller provides space for the struct kc *.
  */
 struct kc *
-kcont(struct kc *kc, void (*func) __P((void *, void *, int)),
+kcont(struct kc *kc, void (*func)(void *, void *, int),
        void *env_arg, int continue_ipl)
 {
        /* Just save the arguments in the kcont *. */
@@ -161,7 +161,7 @@
  */
 struct kc *
 kcont_malloc(int malloc_flags,
-              void (*func) __P((void *, void *, int)),
+              void (*func)(void *, void *, int),
               void *env_arg, int continue_ipl)
 {
        struct kc *kc;
@@ -180,7 +180,7 @@
 void
 kcont_defer(struct kc *kc, void *obj, int status)
 {
-       /* 
+       /*
         * IPL at which to synchronize access to object is
         * above the continuer's requested callback IPL,
         * (e.g., continuer wants IPL_SOFTNET but the object
@@ -236,7 +236,7 @@
 
 void
 kcont_defer_malloc(int mallocflags,
-       void (*func) __P((void *, void *, int)),
+       void (*func)(void *, void *, int),
        void * obj, void *env_arg, int status, int ipl)
 {
        struct kc *kc;
@@ -261,8 +261,8 @@
  * Run through a list of continuations, calling (or handing off)
  * continuation functions.
  * If the caller-provided IPL is the same as the requested  IPL,
- * deliver the callback. 
- * If the caller-provided IPL is higher than the requested 
+ * deliver the callback.
+ * If the caller-provided IPL is higher than the requested
  * callback IPL, re-enqueue the continuation to a lower-priority queue.
  */
 void
@@ -349,7 +349,7 @@
 /*
  * Initialize kcont subsystem.
  */
-void 
+void
 kcont_init()
 {
 
diff -r 10432e1bedd4 -r 85f99b0b1fb3 sys/kern/kern_lkm.c
--- a/sys/kern/kern_lkm.c       Tue Mar 23 13:22:03 2004 +0000
+++ b/sys/kern/kern_lkm.c       Tue Mar 23 13:22:32 2004 +0000
@@ -1,4 +1,4 @@



Home | Main Index | Thread Index | Old Index