EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Unaligned access
From: Geoff Savage <[email protected]>
To: tech-talk <[email protected]>
Date: Tue, 29 Aug 2000 12:56:09 -0500
Hi,

When using  CA puts on our 64-bit alpha machines running Tru64 Unix I am
getting unaligned access faults.  Here's the reason.

In src/ca/access.c issue_ca_array_put are the lines
    case    DBR_LONG:
        *(long *)pdest = htonl (*(dbr_long_t *)pvalue);
        break;

in src/db_db_access.h

typedef epicsInt32      dbr_long_t;

in src/include/epicsTypes.h

typedef int             epicsInt32;

The code is attempting to equate a long with an int.  This works on a 32
bit machine but not a 64 bit machine.

All the native C data types (long, char, ...) in the issue_ca_array_put
routine should be changed to be the epics dbr_xxxx data types for
consistency.

Would someone please correct this in the next release so that I don't
have to keep patching our code.  Are we the only ones using 64-bit
computers?  Has anyone else encoutered this problem?

Thanks

Geoff



Replies:
RE: Unaligned access Jeff Hill

Navigate by Date:
Prev: RE: Newport 850f motor control Joe Ballek
Next: RE: Unaligned access Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: November Collaboration Meeting Leo Dalesio
Next: RE: Unaligned access Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·