[Fwd: [Fwd: RFC.. defining __rangeof() in cdefs.h]]

From: Julian Elischer (julian_at_elischer.org)
Date: 08/12/04

  • Next message: John-Mark Gurney: "Re: valid dup lock logic for witness"
    Date: Wed, 11 Aug 2004 17:44:58 -0700
    To: arch@freebsd.org
    
    
    

    Warner suggested this should be asked here..

    
    

    attached mail follows:


    Date: Wed, 11 Aug 2004 15:47:31 -0700
    To: current@freebsd.org
    
    
    

    Interresting.. not a single comment.. :-/

    
    

    attached mail follows:


    Date: Mon, 09 Aug 2004 14:40:37 -0700
    To: current@freebsd.org
    
    

    I'm considdereing adding:
    Index: sys/cdefs.h
    ===================================================================
    RCS file: /home/ncvs/src/sys/sys/cdefs.h,v
    retrieving revision 1.83
    diff -u -r1.83 cdefs.h
    --- sys/cdefs.h 28 Jul 2004 07:03:42 -0000 1.83
    +++ sys/cdefs.h 9 Aug 2004 21:36:41 -0000
    @@ -241,6 +241,8 @@
      * require it.
      */
     #define __offsetof(type, field) ((size_t)(&((type *)0)->field))
    +#define __rangeof(type, start, end) \
    + (__offsetof(type, end) - __offsetof(type, start))
     
     /*
      * Compiler-dependent macros to declare that functions take printf-like

    it is used in several places. most importantly in fork1()

    and it is defined in several files (*).. we should probably just have
    one copy...

    (*) in the form RANGEOF() but if we define it in cdefs.h I'd change that to
    __rangeof() to match __offsetof()

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

    
    

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

    
    

    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: John-Mark Gurney: "Re: valid dup lock logic for witness"

    Relevant Pages

    • [Fwd: RFC.. defining __rangeof() in cdefs.h]
      ... retrieving revision 1.83 ... diff -u -r1.83 cdefs.h ... * Compiler-dependent macros to declare that functions take printf-like ... To unsubscribe, ...
      (freebsd-current)
    • Re: buildworld error (CVS july 4)
      ... retrieving revision 1.23.2.7 ... * compact the IP header into a structure which contains just the info. ... diff -u -r1.25.2.7 ip_fil.c ... I do not "unsubscribe" from email "services" to which I have not explicitly ...
      (freebsd-stable)
    • [PATCH 2/9] convert crypto to virt_to_pageoff()
      ... convert cryptoapi to virt_to_pageoff. ... retrieving revision 1.3 ... diff -u -r1.13 tcrypt.c ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH 8/9] convert drivers/usb to virt_to_pageoff()
      ... retrieving revision 1.19 ... diff -u -r1.19 usbtest.c ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH 3/9] convert net to virt_to_pageoff()
      ... retrieving revision 1.3 ... diff -u -r1.3 gss_krb5_crypto.c ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)