what do PADL_ & PADR_ mean? - BSD

This is a discussion on what do PADL_ & PADR_ mean? - BSD ; hi: i saw the code in freebsd like this: struct thr_exit_args { char state_l_[PADL_(long *)]; long *state; char state_r_[PADR_(long *)]; }; can any one tell me the meaning of macro PADL_ and PADR_? i guess they are used to argument ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: what do PADL_ & PADR_ mean?

  1. what do PADL_ & PADR_ mean?

    hi:
    i saw the code in freebsd like this:
    struct thr_exit_args {
    char state_l_[PADL_(long *)]; long *state; char state_r_[PADR_(long *)];
    };

    can any one tell me the meaning of macro PADL_ and PADR_?
    i guess they are used to argument alignment.
    but i can't figure out the detail.

  2. Re: what do PADL_ & PADR_ mean?

    duloc wrote:
    > hi:
    > i saw the code in freebsd like this:
    > struct thr_exit_args {
    > char state_l_[PADL_(long *)]; long *state; char state_r_[PADR_(long *)];
    > };
    >
    > can any one tell me the meaning of macro PADL_ and PADR_?
    > i guess they are used to argument alignment.
    > but i can't figure out the detail.


    See sys/sys/sysproto.h - it adds padding at the left or the right of the data
    depending on whether the platform is big- or little-endian.

    - Philip

    --
    Philip Paeps Please don't email any replies
    philip@paeps.cx I follow the newsgroup.

    BOFH Excuse #24:
    network packets travelling uphill (use a carrier pigeon)

+ Reply to Thread