DragonFly BSD
DragonFly kernel List (threaded) for 2003-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

libcaps question


From: Dave Leimbach <leimySPAM2k@xxxxxxx>
Date: 13 Dec 2003 11:30:34 -0600

I realize this is a work in progress but I find this to be a little 
difficult to keep track of.  Its probably just me :)

    caps_port_t port;
    port = malloc(sizeof(*port));
    bzero(port, sizeof(*port));
    lwkt_initport(&port->lport, curthread);
    port->lport.mp_putport = cs_putport;
    port->lport.mp_waitport = cs_waitport;
    port->lport.mp_replyport = cs_replyport;
    port->lport.mp_refs = 1;

Basically I would be more comfortable if port were (caps_port_t *).

It would make the sizeof easier to get correct later so I don't just
accidentally allocate something that is the size of a pointer :).

Dave



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