EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: sequencer on 64bit linux
From: Benjamin Franksen <[email protected]>
To: <[email protected]>
Date: Sun, 3 Apr 2011 18:34:39 +0200
Hi All

since CA does not support 64bit integer types, I wonder what to do about SNL
programs with declarations like

long x;
assign x to "whatever";

on a system where sizeof(long)==8 (like linux-x86_64). Note that in SNL code,
the type of a variable determines the request type for CA requests. In this
case DBR_LONG is certainly wrong, as it is defined to be 32bit.

So, should this be a warning? An error? Or should I use the smaller DBR_LONG
request and convert? Conversion might lead to quite subtle bugs, however, so
ATM my preference is to make it an error, i.e. the SNL compiler checks if
sizeof(long)!=4 and if so forbids 'assign x ...' for variables of type long or
unsigned long. This might be inconvenient to people who want to port old
sequencer programs; they'd have to replace long with int for all assigned SNL
variables, and then maybe the rest of the program won't work as expected...

BTW, I doubt that the current stable version 2.0.12 works properly on such
systems but I haven't tried it yet.

Cheers
Ben

________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn- Rudolph
Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Prof. Dr. Dr. h.c. Wolfgang Eberhardt, Dr. Ulrich Breuer

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


Replies:
Re: sequencer on 64bit linux Andrew Johnson

Navigate by Date:
Prev: Agilent/HP E440B driver Pierrick Hanlet
Next: RE: MAXv question matthew.pearson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Agilent/HP E440B driver Pierrick Hanlet
Next: Re: sequencer on 64bit linux Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·