EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  <20022003  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  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: et_wish, threadInit and osiThread.h
From: Janet <[email protected]>
To: Benjamin Sailer <[email protected]>, [email protected]
Date: Thu, 31 Jan 2002 12:33:00 -0600
Hi Benjamin,

I put tar file containing the latest source for caTCL out on our EPICS - Host
software - TCL/TK web page for you. I built this latest caTCL source with
R3.14.0beta1
on solaris using the sun C/C++ compilers and then executed a modified version of
your tcl script and it worked without problems.  (The threadInit() call was
needed
for an earlier version of R3.14 and was later reomved from the caTCL code)

Janet


Here is the modified script I used:

#!/home/phoebus/JBA/epics/extensions/bin/solaris-sparc/et_wish

set pvnum 0

entry .pvname -relief sunken -textvariable pvname -width 30
pack .pvname

bind .pvname <Return> {
    set pvname$pvnum $pvname
    set pvvalue$pvnum "not connected"
    pv linkw pvvalue$pvnum [set pvname$pvnum]
    set pvswitch$pvnum 1
    pv umon pvvalue$pvnum
    frame .pv$pvnum
    button .pvswitch$pvnum -command "toggleMonitor $pvnum" \
    -textvariable pvname$pvnum -width 20
    label .pvshow$pvnum -textvariable pvvalue$pvnum -width 20
    pack .pvswitch$pvnum .pvshow$pvnum -in .pv$pvnum -side left -fill x
    pack .pv$pvnum -fill x
    set pvname ""
    incr pvnum 1
}
proc toggleMonitor {num} {
    global pvvalue$num
    global pvswitch$num
    if {[set pvswitch$num] == 1} {
        set pvswitch$num 0
        pv cmon pvvalue$num
    } else {
       set pvswitch$num 1
       pv umon pvvalue$num
    }
}



Benjamin Sailer wrote:

> Hello again,
>
> reviewing documents of EPICS base 3.14 and the new sequencer again,
> I came to the "handwaving" conclusion that the unability to run
> et_wish with R3.14 has nothing to do with the commented-out
> threadInit()-call in the et_wish sources. Nevertheless maybe somebody
> can clean up my confusion about osiThread.h and the threadInit function.
>
> In "AppDevGuide.pdf" for R3.14.0alpha1 on pages 224 ff. one can read:
>
> ...
> 20.13 osiThread.h
> ...
> void threadInit(void);
> ...
> which means osiThread.h contains this function call. Compiling and
> installing the tarballs of base-3.14.0alpha1 and base-3.14.0beta1 I
> did not find this header file at all.
>
> Going further, one can read:
>
> threadInit - This is called automatically by the thread implementation.
>              NOTE: This should not appear in osiThread.h
>
> ? This statement seems to be directed to developers of libCom asking
> where else to put this function?
>
> main - On systems requiring a main routine, threadInit MUST be called
>        before any thread or semaphore routines. Since the errlog facility,
>        which is used by many components of libCom, calls threadCreate,
>        threadInit should be called before any other routines supplied with
>        epics base. If a main routine finishes its work but wants to leave
>        other threads running it can call threadExitMain, which should be
>        the last statement in main.
>
> So its necessary to call threadInit also with the new sequencer. Nevertheless
> a version of the sequencer I compiled seemed to work at least partly without
> this call.
>
> So concluding: Is it needed or not, and if so, where do I find it (or any
> replacing call)?
>
> Is this the reason for crashing et_wish or are there other incompatibilities
> of these sources with R3.14 (which would be consistent with a running
> version of it under Solaris 8 and R3.13.4)?
>
> Greetings
>
> Benjamin
>
> --
> *****************************************************************
> Benjamin Sailer
> eMail: [email protected]
> *****************************************************************
> You'll see it's all a show, keep on laughing as You go
> just remember that the last laugh is on You



Replies:
Re: et_wish, threadInit and osiThread.h Benjamin Sailer
References:
et_wish, threadInit and osiThread.h Benjamin Sailer

Navigate by Date:
Prev: Re: CA client library and Connection handler Brian McAllister
Next: Re: et_wish, threadInit and osiThread.h Benjamin Sailer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  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: Re: et_wish, threadInit and osiThread.h Benjamin Sailer
Next: Re: et_wish, threadInit and osiThread.h Benjamin Sailer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  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 ·