Hi, Andrew,
Andrew Johnson wrote:
Andrew Johnson wrote:
**************
Modified
**************
# source files
(6) base-3.14.9/src/libCom/osi/epicsMutex.cpp
The function epicsMutexLockWithTimeout() is added.
(7) base-3.14.9/src/libCom/osi/epicsMutex.h
The constant LOG_LAST_OWNER is defined. The function
epicsMutexLockWithTimeout and epicsMutexOsdLockWithTimeout are
declared.
I would like to see modifications to libCom/test/epicsMutexTest.cpp to
comprehensively test these changes, checking for all combinations of
simultaneous calls to lock and lock with timeout on the same mutex. I
am not an expert on pthreads and I haven't had a chance to look at the
posix implementation in detail, but it definitely needs to be examined
closely. We will need implementations for RTEMS and Windows as well —
the first should not be a problem, but I don't know anything about
Windows.
(8) base-3.14.9/src/libCom/osi/epicsThread.h
The function epicsThreadDelete is declared.
As with both Eric and Kay, I have a fundamental problem with adding this
functionality: Deleting a thread leaves the software in an undefined
state; it is not possible to continue operation after doing this since
the deleter has no knowledge of what resources the thread has allocated
or reserved at the moment it was cancelled. This is precisely why the
epicsThread APIs have not supported the ability to delete a thread and
all thread shutdown must be performed by having the thread itself return
to its caller.
>
The function epicsThreadDelete is just used for RMT. We will give it up
and change the relevant codes.
(9) base-3.14.9/src/libCom/osi/epicsTime.h
The function epicsTimeGetTicks is declared.
A 'tick' has no meaning in some operating systems, and could be wildly
different in size. We removed all references to ticks from the IOC
portable code; why is this needed?
RMT code is vxWorks dependent originally and tickGet() is used. We will
give it up and change the relevant codes.
(10) base-3.14.9/src/libCom/osi/os/posix/osdMutex.c
The structure epicsMutexOSD is extended and the function
epicsMutexOsdLockWithTimeout is implemented.
(11) base-3.14.9/src/libCom/osi/os/posix/osdThread.c
The function epicsThreadDelete is implemented.
(12) base-3.14.9/src/libCom/osi/os/posix/osdTime.cpp
The function epicsTimeGetTicks is implemented.
(13) base-3.14.9/src/libCom/osi/os/vxWorks/iocClock.c
The function epicsTimeGetTicks is implemented.
(14) base-3.14.9/src/libCom/osi/os/vxWorks/osdMutex.c
The function epicsMutexOsdLockWithTimeout is implemented.
(15) base-3.14.9/src/libCom/osi/os/vxWorks/osdThread.c
The function epicsThreadDelete is implemented.
The above changes implement the facilities discussed above for vxWorks
and Posix-compliant OSs. If we accept the need for them, we will also
need implementations for WIN32 and RTEMS.
**************
Added
**************
(3) base-3.14.9/src/libCom/osi/os/Linux/osdFindSymbol.c
Implement the function epicsFindSymbol for Linux.
(4) base-3.14.9/src/libCom/osi/os/posix/osdFindSymbol.c
Implement the function epicsFindSymbol for posix.
This functionality is not required if suitable function pointers are
provided that the Base code calls at the appropriate place. It will
not be possible to create an RTEMS implementation of epicsFindSymbol()
until the RTEMS OS incorporates Till Strauman's 'cexp' shell, which
apparently is not likely to happen in the near term. I do not know
whether it will be possible to implement this on Windows.
- Andrew
Bernd Schoeneburg and Gongfa Liu
--
----------------------------------------------------------
Gongfa Liu MKS-2, DESY
phone: +49-40-8998-1642 Notkestr. 85
fax: +49-40-8998-4388 22607 Hamburg
e-mail: [email protected] Germany
----------------------------------------------------------
- Replies:
- Re: Redundancy Patch: libCom Andrew Johnson
- References:
- Redundancy Patch: libCom Andrew Johnson
- Re: Redundancy Patch: libCom Andrew Johnson
- Navigate by Date:
- Prev:
Re: Redundancy Patch: db Liu, Gongfa
- Next:
Re: Redundancy Patch: iocsh Andrew Johnson
- Index:
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:
Re: Redundancy Patch: libCom Andrew Johnson
- Next:
Re: Redundancy Patch: libCom Andrew Johnson
- Index:
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|