Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  Index 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: CA server message buffers
From: Peregrine McGehee <mcgehee@cfht.hawaii.edu>
To: hill@luke.atdiv.lanl.gov
Cc: tech-talk@epics.aps.anl.gov
Date: Thu, 3 Aug 95 11:14:22 HST
[cc'ed to tech-talk]

Jeff, 
	I'm getting R3.12.1 to run on Sparc targets and need some insight
into how the buffers are managed in the server code.

	My Sparcs were generating memory alignment exceptions when 
getEnumDouble() attempted to write a double into the send buffer address.
I traced this back into cas_alloc_msg() (rsrv/caserverio.c) and found that
although the message sizes were aligned to 8 bytes, the base address of the
send buffer wasn't - so the buffer addresses weren't - hence the error.

	The simplest solution seemed to be to add the following line to
the start of cas_message_align() to force the alignment of the send buffer:
	pclient->send.stk += 
		CA_MESSAGE_ALIGN((long)EXTMSGPTR(pclient)) -
		(long)EXTMSGPTR(pclient);

	While this had the desired effect of forcing the message buffer
addresses to be 8-byte aligned it had the following side-effects:
	1) The stack index (pclient->send.stk) no longer changes, and
	2) The client (in this case caget) complaines about bad UDP
	messages.
	
	I suspect there is something in how END_MSG() works to actually
post the message that I've come into conflict with.

Peregrine
(mcgehee@cfht.hawaii.edu)


References:
Re: client_stat program Jeff Hill

Navigate by Date:
Prev: Re: client_stat program Jeff Hill
Next: Re: CA completion question Jeff Hill
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: Re: client_stat program Jeff Hill
Next: Re: CA completion question Jeff Hill
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
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 ·