libcaps question

Dave Leimbach leimySPAM2k at mac.com
Sat Dec 13 09:30:34 PST 2003


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





More information about the Kernel mailing list