Till Straumann wrote:
> Folks.
> the caRepeater thread calls 'exit()' which is not really
> what you want to do from the ca server (I guess)
> -- T.
>
Many thanks to Till Straumann for tracking down this bug.
A while ago, I posted the following message to tech-talk:
> The IOC hung at iocInit() after we tried to add the eighth
> motor controller cards in the crate running RTEMS-mvme2307.
> Further tests showed that, as a wokaround,one clock tick of delay is
> needed between the end of the scaler_init_record()
> and before it entered the oms_init_record(). At this point, it seems
> that the bug might not be even RTEMS related.
> rtems_task_wake_after(0) works fine.
After applying this patch to my 3.14.6 EPICS base, I do not need the
workaround of one clock tick delay in the drvOms58.cc motor driver.
Indeed, the bug is not RTEMS related.
Thanks,
Kate
>
> ------------------------------------------------------------------------
> *** base-3.14.6/src/ca/repeater.cpp.orig Mon Feb 2 22:32:00 2004
> --- base-3.14.6/src/ca/repeater.cpp Wed Sep 15 18:31:58 2004
> ***************
> *** 484,490 ****
> /*
> * ca_repeater ()
> */
> ! void ca_repeater ()
> {
> tsFreeList < repeaterClient, 0x20 > freeList;
> int size;
> --- 484,490 ----
> /*
> * ca_repeater ()
> */
> ! static int ca_repeater_func ()
> {
> tsFreeList < repeaterClient, 0x20 > freeList;
> int size;
> ***************
> *** 506,512 ****
> if ( SOCKERRNO == SOCK_EADDRINUSE ) {
> osiSockRelease ();
> debugPrintf ( ( "CA Repeater: exiting because a repeater is already running\n" ) );
> ! exit (0);
> }
> char sockErrBuf[64];
> epicsSocketConvertErrnoToString (
> --- 506,512 ----
> if ( SOCKERRNO == SOCK_EADDRINUSE ) {
> osiSockRelease ();
> debugPrintf ( ( "CA Repeater: exiting because a repeater is already running\n" ) );
> ! return (0);
> }
> char sockErrBuf[64];
> epicsSocketConvertErrnoToString (
> ***************
> *** 515,521 ****
> __FILE__, sockErrBuf );
> osiSockRelease ();
> delete [] pBuf;
> ! exit(0);
> }
>
> debugPrintf ( ( "CA Repeater: Attached and initialized\n" ) );
> --- 515,521 ----
> __FILE__, sockErrBuf );
> osiSockRelease ();
> delete [] pBuf;
> ! return(0);
> }
>
> debugPrintf ( ( "CA Repeater: Attached and initialized\n" ) );
> ***************
> *** 574,579 ****
> --- 574,586 ----
>
> fanOut ( from, pMsg, size, freeList );
> }
> + return -1;
> + }
> +
> + void ca_repeater(void)
> + {
> + if ( 0 == ca_repeater_func() )
> + exit(0);
> }
>
> /*
> ***************
> *** 582,588 ****
> extern "C" void caRepeaterThread ( void * /* pDummy */ )
> {
> taskwdInsert ( epicsThreadGetIdSelf(), NULL, NULL );
> ! ca_repeater ();
> }
>
>
> --- 589,596 ----
> extern "C" void caRepeaterThread ( void * /* pDummy */ )
> {
> taskwdInsert ( epicsThreadGetIdSelf(), NULL, NULL );
> ! if ( 0 == ca_repeater_func () )
> ! taskwdRemove( epicsThreadGetIdSelf() );
> }
>
>
- References:
- ca_repeater bug Till Straumann
- Navigate by Date:
- Prev:
RE: compiler base using C++ Builder 6[Scanned] Ralph Lange
- Next:
GpibCore generates "broken pipe" Eric Williams
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
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:
ca_repeater bug Till Straumann
- Next:
RE: ca_repeater bug (probably observable only on RTEMS) Jeff Hill
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
<2004>
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|