Re: ATOMIC_*() -- endian

From: Andrew Valencia <vandys_at_nospam.org>
Date: Tue Sep 20 1994 - 08:59:57 PDT

[Tim Newsham <newsham@uhunix.uhcc.Hawaii.Edu> writes:]

>the ATOMIC_INC() and ATOMIC_DEC() functions are currently
>dependant on the machine being little endian. There are both
>short (2 byte) and long (4 byte) values passed in.

Not on purpose! This is a bug. There should be ATOMIC_INCW() or something
to keep it honest.

>The prototypes specified void * previously
>which I changed to ushort *. There were a few values that
>were being passed in as long values: cpu ticks, number of threads
>and the statistics (if DEBUG is on) for malloc.

Yuck. Maybe Dave Hudson remembers more about the why's and wherefore's of
this? I will hunt down each reference and convert the calls accessing a
short value to use ATOMIC_INCW/_DECW() unless I hear something else.

                                                        Andy
Received on Tue Sep 20 07:48:35 1994

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:11:45 PDT