Commit Graph
155 Commits
Author SHA1 Message Date
Andrew Johnson 99432d6809 caProvider: Minor cleanup 2021-10-01 09:54:48 -05:00
Andrew Johnson 161eac3a38 caProvider: speed up monitor list handling
Not a major speed-up since the list of monitors is per-channel,
but using wptr::expired() is more efficient than wptr::lock().
2021-10-01 09:54:14 -05:00
Andrew Johnson 671f5a406c caProvider: Speed up addChannel()
Use wptr::expired() instead of wptr::lock() for testing if the
shared pointer is still valid, *much* faster!
Also switched from index to interator, but that's incidental.
2021-10-01 09:32:11 -05:00
Andrew Johnson 7240f97e76 Fix error string in ca/dbdToPv.cpp 2021-09-17 11:51:23 -05:00
Sinisa Veseli cd152c37a4 add checks for null pointers 2021-08-10 11:11:59 -05:00
Sinisa Veseli 9a88e5e879 fix issue with null pointer check for DBR_ENUM 2021-08-04 11:19:47 -05:00
Sinisa Veseli deefe12491 avoid probleem with pv structures that do not have value subfield 2021-07-28 23:33:01 -05:00
Andrew Johnsonandmdavidsaver 4638c11c8c Fix for 3.15 DLL builds 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 7910f7a794 Another include epicsGuard.h missing for 3.15 builds 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 62cbbd6722 caChannel: Use epicsMutex and epicsGuard<> 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver ece8b94357 include epicsGuard.h for 3.15 builds 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver bf04c69bda Conveyor: Don't try to support self-deletion 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver e0c2496e52 Add a Notification constructor that also sets client 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver e00ccbeb9c Conveyor: Change run() to follow MAD's skeleton
This is still broken if a client method (notify() or the destructor)
deletes the conveyor, which accesses data members before exiting.
2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver a9725834dc Add tests for notifyConveyor 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver a078e03041 Notifyer: Give conveyor threads a unique name 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 98e81a542e Use epicsMutex and epicsEvent instead of pv::data equivalents 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 0332d0f2c1 notifierConveyer destruction protection
Remove the work variable
2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 345f2782cd caContext: Restore existing context in constructor
Don't assume other code might be using our context.
Fix destructor to reattach the right context.
2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver b0b2228558 Make ca::Attach::context a reference, not a smart pointer 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 92002b6ba2 Include pvAccess.h before exportSharedSym's in caContext.cpp 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 33cc9b1fdb Define epicsExportSharedSymbols in ca/notifierConveyor.cpp 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 8b3a057a69 Have notifierConveyor trap and drop any exceptions 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver f9c40e96cf Collect ca_client_context operations
Each instance of the caContext class represents a separate CA context,
so each CAChannelProvider creates one and keeps a shared_ptr to it,
making that available to its channels and channel operations. These
also take their own shared_ptr to it as well so the context cannot be
destroyed while it might be needed.

A related caContext Attach object is intended to be short-lived, and
to be allocated on the stack. When created it saves the current CA
context for the thread, replacing it from the caContext given to its
constructor. CA operations will now use the attached context. When the
Attach destructor runs it detaches the thread from the current context
(checking still has the expected value) and re-attaches the thread to
any context that was saved by the constructor.
2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 25dde0f4ba Make Codacy happier 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 06c2fb579f Replaced 4 notification threads with 2 notifierConveyors
Channel connection notifications are now handled by connectNotifier,
getDone, putDone and monitor events handled by resultNotifier.
A notifierConveyor is generic, and contains a queue and a thread.
You pass a Notification pointing to a NotifierClient to a Conveyor's
notifyClient() method, and the thread will call the client's
notifyClient() method once it reaches the front of the queue.

The conveyor threads stop when the caProvider is destroyed.
The queue stores weak pointers, so queued notifications won't prevent
client objects from being destroyed.
2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 2729903a10 Make the channelConnectThread per-provider
This passes the tests (on MacOS).
2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 601280836d Move caProvider worker threads shutdown to static destructors 2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 44fda51935 Start of major overhaul
Moved duplicated EXCEPTION_GUARD macro to private header file.
Removed all DEBUG_LEVEL and similar prints.
Some reformatting and code simplification.
2021-01-05 11:01:02 -08:00
Andrew Johnsonandmdavidsaver 9671ee132e caProvider threads: Lock the mutex while reading isStop state 2021-01-05 11:01:02 -08:00
zimochandmdavidsaver 3ba6679e67 removed spaces at end of line 2020-04-15 08:17:03 -07:00
zimochandmdavidsaver 40300a12cb replaced tabs with spaces 2020-04-15 08:17:03 -07:00
Heesterman, Peter J 208eef0962 Static analysis of epics base during the Codathon at Diamond. 2020-02-17 12:04:43 +00:00
Michael Davidsaver e0dc94a91d always epicsThreadStackBig
on RTEMS at least, c++ code needs the largest standard
stack frame size.
2019-07-15 13:54:36 -07:00
Michael Davidsaver f9ac164ee7 Revert "try to fix downstream win32 linking"
This reverts commit 4f0c4c46a3.
2019-05-16 18:09:47 -07:00
Michael Davidsaver 4f0c4c46a3 try to fix downstream win32 linking 2019-05-16 14:03:45 -07:00
Michael Davidsaver 736e0c169a Merge branch 'auth'
* auth:
  fix osdGetRoles
  oops
  Add showauth executable
  getgrouplist() on OSX has different sig.
  auth fix mingw static
  fix search PeerInfo
  PeerInfo in pva/server.h and pva/sharedstate.h
  make PeerInfo available during search phase
  auth status void accidental success.
  minor doc
  always need to link with netapi32 now
  authorize with local group lookup
  Add osdGetRoles()
  authorization framework
  pvasr show PeerInfo
  redo security (aka. access control)
  remove asCheck

# Conflicts:
#	src/server/pv/responseHandlers.h
#	src/server/responseHandlers.cpp
2019-05-12 14:40:29 -07:00
Michael Davidsaver 5b14bbef5a drop display.format 2019-02-19 19:58:47 -08:00
Michael Davidsaver bfff9275bd always need to link with netapi32 now 2019-01-12 17:07:24 -08:00
Andrew Johnson 39d0706cf1 Fix typo in CAChannelGet class member 2018-10-30 16:19:12 -05:00
mrkraimer 1204874481 implement field options 2018-09-27 10:02:00 -04:00
mrkraimer e9d2114e96 latest changes to match caProvider.html 2018-09-24 13:45:21 -04:00
mrkraimer 10bb8039e5 fix problem with pvget and pvinfo 2018-09-13 08:36:33 -04:00
mrkraimer 7b7511fc0f channelConnectThread changes 2018-09-12 14:12:08 -04:00
mrkraimer 36e18bfd21 merge with epics-base 2018-09-10 14:11:19 -04:00
mrkraimer ef623eef91 merge with epics-base 2018-09-10 13:46:50 -04:00
Andrew JohnsonandGitHub 28002fa6d7 Merge pull request #121 from epics-base/issue119
From Marty, fixes #119
2018-08-29 13:56:27 -05:00
mrkraimer 8e40907171 fix issues 117 118 119 2018-08-13 14:19:10 -04:00
mrkraimer 39ede57fe2 change ChannelConnectThread to channelConnectThread 2018-08-10 15:11:02 -04:00
mrkraimer f210c81e45 fix issue 119 2018-08-02 05:55:22 -04:00