Changeset 862b24a in rtems for cpukit/librpc


Ignore:
Timestamp:
May 26, 2010, 3:41:49 AM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
f6b5ed2
Parents:
d02ddd5
Message:

2010-05-26 Ralf Corsépius <ralf.corsepius@…>

  • librpc/src/rpc/clnt_raw.c: Partial merger from freebsd (Improved 16 bit compatibility; Fix strict-aliasing).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/librpc/src/rpc/clnt_raw.c

    rd02ddd5 r862b24a  
    4242 * Interface to create an rpc client and server in the same process.
    4343 * This lets us similate rpc and get round trip overhead, without
    44  * any interference from the kernal.
     44 * any interference from the kernel.
    4545 */
    4646
     
    6262        XDR     xdr_stream;
    6363        char    _raw_buf[UDPMSGSIZE];
    64         char    mashl_callmsg[MCALL_MSG_SIZE];
     64        union {
     65            struct rpc_msg      mashl_rpcmsg;
     66            char                mashl_callmsg[MCALL_MSG_SIZE];
     67        } u;
    6568        u_int   mcnt;
    6669};
     
    9194        u_long vers )
    9295{
    93         register struct clnt_raw_private *clp = clntraw_private;
     96        struct clnt_raw_private *clp = clntraw_private;
    9497        struct rpc_msg call_msg;
    9598        XDR *xdrs = &clp->xdr_stream;
     
    109112        call_msg.rm_call.cb_prog = prog;
    110113        call_msg.rm_call.cb_vers = vers;
    111         xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
     114        xdrmem_create(xdrs, clp->u.mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
    112115        if (! xdr_callhdr(xdrs, &call_msg)) {
    113116                perror("clnt_raw.c - Fatal header serialization error.");
     
    139142        struct timeval timeout )
    140143{
    141         register struct clnt_raw_private *clp = clntraw_private;
    142         register XDR *xdrs = &clp->xdr_stream;
     144        struct clnt_raw_private *clp = clntraw_private;
     145        XDR *xdrs = &clp->xdr_stream;
    143146        struct rpc_msg msg;
    144147        enum clnt_stat status;
     
    153156        xdrs->x_op = XDR_ENCODE;
    154157        XDR_SETPOS(xdrs, 0);
    155         ((struct rpc_msg *)clp->mashl_callmsg)->rm_xid ++ ;
    156         if ((! XDR_PUTBYTES(xdrs, clp->mashl_callmsg, clp->mcnt)) ||
     158        clp->u.mashl_rpcmsg.rm_xid ++ ;
     159        if ((! XDR_PUTBYTES(xdrs, clp->u.mashl_callmsg, clp->mcnt)) ||
    157160            (! XDR_PUTLONG(xdrs, (long *)&proc)) ||
    158161            (! AUTH_MARSHALL(h->cl_auth, xdrs)) ||
     
    216219        caddr_t res_ptr )
    217220{
    218         register struct clnt_raw_private *clp = clntraw_private;
    219         register XDR *xdrs = &clp->xdr_stream;
     221        struct clnt_raw_private *clp = clntraw_private;
     222        XDR *xdrs = &clp->xdr_stream;
    220223        bool_t rval;
    221224
Note: See TracChangeset for help on using the changeset viewer.