tech-kern archive

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

Re: fetch32/store32 et al



Eduardo Horvath <eeh%NetBSD.org@localhost> wrote:
> > <...>
> > 
> >     int     fetch32(void *addr, uint32_t *c);
> >     int     store32(void *addr, uint32_t c);
> > 
> > And equivalent routines to fetch/store 8, 16 and 64 (if needed) bit
> > values. Routines would return 0 on success and EFAULT on failure.
> > 
> > <...>
> 
> Careful.  Looks like you're switching from unsigned to signed.  This can 
> cause all sorts of unexpected behavior in some cases if the return values 
> aren't properly masked.

That is not what was written above.  Rather vice-versa.

> 
> Eduardo

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index