tech-kern archive

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

Re: rfc: vmem(9) API/implementation changes



On Wed, 27 Jul 2011, David Young wrote:

> There are a couple of changes to the API that I would like to make.
> First, I don't think that vmem_addr_t 0 should be reserved for error
> indications (0 == VMEM_ADDR_NULL), but the API should change from
> this:

I'd recommend returning -1 on error.  0 is a valid address, but while -1 
is a valid address, when do you ever use this interface to allocate 
something that starts at address -1?  And it gets around all the noxious 
problems involved in returning data through reference parameters.

Eduardo


Home | Main Index | Thread Index | Old Index