tech-kern archive

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

Re: RFC: New userspace fetch/store API




> On Feb 24, 2019, at 2:34 AM, Edgar Fuß <ef%math.uni-bonn.de@localhost> wrote:
> 
>> The following aliases must also be provided, mapped to the appropriate fixed-size primitives:
>> 
>> int     ufetch_char(const unsigned char *uaddr, unsigned char *valp);
>> int     ufetch_short(const unsigned short *uaddr, unsigned short *valp);
>> int     ufetch_int(const unsigned int *uaddr, unsigned int *valp);
>> int     ufetch_long(const unsigned long *uaddr, unsigned long *valp);
> I would have expected the argument of a funtion called xxx_short etc. 
> to be a short etc., not an unsigned short etc.
> Does it make sense to either make the argument char/short/int/long or 
> change the name to ufetch_uXXX?

My proposed names match the pattern used by atomic_ops(3) (which in turn matches how Solaris named those routines).  In general I would favor consistency with atomic_ops(3) for consistency’s sake, but I’m not wedded to the names and will change them if the consensus is that they should change.

-- thorpej



Home | Main Index | Thread Index | Old Index