For compatibility with msi; users can put -Mvar=value into a
xxx_DBFLAGS variable to have msi define that macro when
generating the xxx.db file. This lets mkmf accept the same
DBFLAGS variable that msi does in this case.
Allows static libraries and DLLs to be built without having
to do a 'make clean' in between on Cygwin and MinGW targets.
The Cygwin build still crashes when SHARED_LIBRARIES = YES
though, loading Com.dll seems to cause the problem.
Added a new Files: line to the testspec file to document which
files need to be available for the tests to be run properly.
This is generated from the Makefile variable TESTFILES.
This branch fixes several tests.
I also added some changes that tell users which .db/.dbd file
was missing if the db and filter test programs abort, and
extend the search path so the tests can be run from the test
directory as well as from the O.<arch> directory.
test*() uses printf() so don't print
any results until all results are collected.
On RTEMS/vxWorks buffering of printf() gives
long delays which skew the test results.
Also made additional changes:
* Simplified xRecord.c so it can run on vxWorks.
* Standard way to load DBD and DB files in tests
All test harnesses now run on vxWorks (but some tests still fail).
- call (generic) exit hook after calling the (specific) epicsExitCallAtThreadExits()
- for start hooks added as 1-2-3, run exit hooks in opposite order: 3-2-1
- add calls to hooks module to WIN32 osdThread.c
- add lock/unlock to hook list traversal
The strtoul() routine accepts negative numbers. This fix
ensures we handle them properly, and adds suitable tests.
Also fix the test for 1e300, in case the compiler gives a
slightly different literal constant than strtod() returns.
Move cleanup from event thread to caller.
This handles cases (unit tests) where the task
is never started.
The pexitsem flag serves as the indicatior that
the event task was started.
plugins don't need to inspect more than
field_type, field_size, and no_elements.
In case they do define type=val to prevent
accidental use of uninitialized pointer.
This lets us use epicsParseDouble() for scan rate parsing.
Ensure the scanOnce thread is a higher priority than the fastest
periodic scan thread, irrespective of how many threads there are.
- add Linux implementation that
+ sets the system command name to the EPICS thread name
+ retrieves the Linux LWP ID and prints it instead of the posix thread ID
in show commands
Adds new routines for converting numeric strings into the
standard epicsInt8, epicsUInt8, epicsInt16, epicsUInt16,
epicsInt32 and epicsUInt32 types, along with Long, ULong,
Double and Float. These all provide error checking and
detection of extraneous characters. The epicsScanDouble
and epicsScanFloat routines originally in epicsStdlib.h
are replaced by macros that call the epicsParse routine,
and this also provides epicsScanLong and epicsScanULong
to match.
A test file is added to ensure conversions work properly
and report appropriate errors. This file also checks the
native strtod() routine if not used to check whether the
epicsStrtod() code is required on this platform.
The filter plugins are now in src/std/filters
and their tests in the test subdirectory.
Various portability issues found and fixed:
* Variable declarations after statements in a block
* Code assuming that epicsInt32 = long
* // comments in C files
Removed a number of tests that weren't really tests;
preconditions for future tests that don't actually check
the code being tested should call testAbort() if the
condition fails, which tells the test harness that you
meant to die at that point.
Split up lots of very long source lines.
Probably made a few other changes that I forget about now.
Michael backed out a few changes and added some others.
I added some modifications to default/osdMessageQueue.cpp to
remove arguments from a couple of internal (static) functions.
All are now robust against overflow, NAN or negative argument.
Passing seconds=0 calls the OS scheduler, offering to yield.
Passing seconds>0 delays at least the requested time, up to a
limit which usually depends on the OS tick rate.
Mostly just layout changes, removing unnecessary casts, and
replacing 'unsigned short' with epicsEnum16 types.
The only significant code change is in the alarm filtering
code of the mbbi record, which wasn't handling UDF alarms
or unknown state alarms quite right.
Avoid installing xRecord.dbd. This would otherwise be installed
by the DBDINC.
Also must split out recordtype definition from record instance
definition and run the registrar function between the two loads.
This is due to new sanity checks in the loading process
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Add forced write of '\0' to destination to end strings correctly
* Add dbExtractArrayFromBuf() to make array copies from ref type field logs easier
* ...Show functions take an indent argument (number of spaces to print
in front of each line) instead of a char* intro to avoid allocation at each level,
replacing '\t' with 8 spaces in top level code where necessary
* Refactor element_size -> field_size (as used in dbAddr), also in dbChannel
functions
* Fix: wrong macro name in unused part of db_field_log.h
* Add tests for callback registration (pre and post)
* Add tests for callback execution (pre and post)
* Add tests for report function and array destructor
* Add test for combinations of two plugins (that register pre eventq, post eventq or in
both chains), checking the order of calls and db_field_log changes independently
* Make test messages more verbose and comprehensive
* Add new db_field_log type "probe" for type change detection
* Move linked lists for pre- and post-event-queue chains into dbChannel,
function pointers and arguments into chFilter
* Remove set-type-chain completely
* Simplify register functions in filter and plugin interfaces
* Add functions to run the pre and post chains to dbChannel
* Refactor in db_field_log: field_size -> element_size
* Refactor in dbEvent:
db_post_single_event_first -> db_create_event_log
db_post_single_event_final -> db_queue_event_log (removed from public interface)
* Change tests to compile
* Add field_size to db_field_log
* Add final type, dbr_type, no_elements, and field size to dbChannel
(plus matching access methods)
* Add set-type callback chain to find out final sizes and types
* Add registration calls for pre-event-queue and post-event-queue insertion
* db_field_log now is one of rec = use record, val = val inside, ref = reference inside
* add field_type and no_elements (to allow plugins change type and array size)
* add destructor in the ref type (called when deleting the db_field_log)
* change dbEvent.c and dbAccess.c to use the new field log features
* Redefine db_field_log to be a union between a "value" type (as before)
and a "reference" type (pointers to values, dtor for plugin array copies).
* Add db_delete_field_log function that correctly destructs a db_field_log.
* Move evSubscrip from dbEvent.[ch] (private) to dbChannel.h (public).
* Split up db_post_single_event_private into two parts:
..._first creates a new db_field_log chunk and copies from db.
..._final puts a db_field_log into the event queue.
* Add a typedef for the pre-event-queue recursive callbacks.
* Add a register function for the callback (plus void* arg) to filter and
plugin interfaces.
* Add the code that builds up the pre-event-queue callback chain.
* Changes to the test files to compile (no tests added yet).
* Fix missing include in db_field_log.h.
- chfPlugin.h contains the simple jump table and doxygen documentation
- chfPlugin.c is a wrapper library around the yajl callbacks that parses
any client-supplied configuration into the user's structure
- test/chfPluginTest.c tests the library and the data conversion
- Made chFilterPlugin public (moved from dbChannel.c to dbChannel.h)
- Made the interface jump table chFilterIf part of the chFilterPlugin
(i.e. once per plugin) instead of chFilter (once per instance)
- Added a pointer from chFilter (instance) to chFilterPlugin (plugin)
- Added a private user pointer in chFilterPlugin
- Changed dbFindFilter() to return a chFilterPlugin* (instead of the jump table)
- Changed dbRegisterFilter() to accept a user private pointer as 3rd arg
* Moved routines into dbLink.h and dbLink.c
* Created separate routines for DB_LINK processing
* Added dbinitLink() and dbAddLink()
* Started a Link Support Entry Table, not used yet
* Everything should still work as before...
* Added dbChannelGet()
* Implement dbChannelGetField() using dbChannelGet()
* Close filters in reverse order of opening
* Messages and comments improved.
* dbGet() now handles DBF_*LINK fields,
* Simplify dbGetField(),
* Split out getAttrValue(),
* Rename dbGetFieldLink() to getLinkValue(),
* Reduce number of casts.
* Routines with a db_access interface are named dbChannel_xxx
* Using dbch for member variable names in Jeff's code
It seems to work!
TODO: Make dbChannel use a freelist
* Deleted the chan->magic member and associated checks.
* Moved rset->cvt_dbaddr() call into dbChannelCreate()
* Added many accessor routines
* Renamed dbChannelReport() to dbChannelShow() and added dbChannelFilterShow()
* A filter's parse routines now return a parse_result (enum)
* Return value from test filter parse routines is configurable
* Either call parse_end() or parse_abort(), but never both.
Pattern mode changes the behaviour of substituteGetReplacements()
which breaks the parsing of global definitions. Add a separate
routine substituteGetGlobalReplacements() which is used for parsing
global definitions and ignores the isPattern flag.
This removes various calls to cantProceed() and its relatives
and replaces them with an error return status when a resource
allocation fails. It only does it for routines that already
have an error status return, so it makes no API changes, and
will prevent threads from being suspended unnecessarily.
This separates out the rules for %.d files from the rules that
create the related target file (%.o etc). Doing this can reduce
the amount of work to be done when rebuilding applications after
making source changes. For files in O.Common which can be built
by any target architecture this can solve problems when parallel
builds (-j) are used.
Removed %.C and %.H from vpath (rules were deleted some time ago)
Added %.pl to vpath for use in ioc/registry/Makefile
configure/tools doesn't exist any more, remove from configure/Makefile
Now works properly on Darwin where the version number comes
before the .dylib extension. This also makes Windows-specific
conditional tests fully generic.
This is really a workaround for a Win32/MinGW bug in sscanf, which
will only set the %n argument for the format "%u %n" when there is
a space following the unsigned number.
This changes the IOC's behavior very slightly.
Report throw from first call to epicsTime::getCurrent().
Reorganized test order so a bad time provider doesn't stop
all tests from being run. Also cleaned up a few extraneous
variables.
This test fails if the cwd is not writable, but on vxWorks the
fault appears at the fclose() not the fopen() line. The code
now detects this and tells the user what's probably wrong.
Windows stack sizes were the same as vxWorks - tiny.
The stack sizes are now multiples of sizeof(void*).
On 32-bit systems they give 256KB, 512KB and 1MB;
64-bit systems get twice those numbers.
Fixes lp:903448
Replaced Dirk's fixed precision=2 and limit=10 seconds with
global variables which can be set for each IOC. Also changed
the upper control limit for delay fields from 10 to 100,000.
When generating a DBE_PROPERTY event because of a modified
enum string, also post DBE_VALUE and DBE_LOG events if the
record is currently in that particular state.
Clients try to use long string support to fetch DBF_STRING
fields use DBF_CTRL_CHAR with a 1-element array, but the IOC
was rejecting that. This permits it, and also ensures that
the resulting strings are zero-terminated.
Fixes lp:907761
Merged J. Lewis Muir's fix for comments introduced by macro.
Added fixes to allow comments to be indented too, which used
to work if the '#' was followed by white-space or any argument
separator character.
The handling of comment lines is only performed before macro
expansion, thus lines with macros that expand to comment lines will
not be correctly handled as comment lines.
By chance this kind of worked sometimes because a "#" command that
does nothing is internally added to the command registry to make it
show up in the help output. Relying on this is broken. Furthermore,
if the line starts with '#' followed by a non-separator character
(e.g. "##", "#whatever", etc.) it will not work (i.e. it will produce
a command-not-found error).
This fix checks to see if the first character of the line after macro
expansion is '#'. If it is, it considers the line to be a comment.
This allows the same version of Base to be used from both RHEL5 and RHEL6
for example; they use different Perl versions which are not compatible at
the ABI level.
Most shells strip the single-quote chars from arguments, but on
win32-x86 this is not happening so we need to do it ourselves.
The single quotes are important to prevent un-escaping of things
that shouldn't be unescaped.
The finite() function is provided in glibc but not in uClibc.
C99 requires isfinite() to be a macro, so we can test for it
and define our own finite() macro in osi/os/posix/epicsMath.h
o fixed issue introduced by last revision where definition of lock functions and lock key were not present if its sunos 5.10 or greater
(its time consuming to develop code if you can only run the (SUNPRO) compiler indirectly)
o dont include epicsAtomicOSD.h from any of the implementations of epicsAtomicCD.h unless the compiler has support for an inline keyword
o removed superfluous ifdef on EPICS_ATOMIC_INLINE all versions of epicsAtomicDefault.h and epicsAtomicOSD.h
o In the implementations of epicsAtomicOSD.cpp if EPICS_ATOMIC_INLINE isnt defined define it to be empty and then include epicsAtomicOSD.h
o fixing some compile time issues for solaris version of epicsAtomicOSD.h (so that Janet can run another compile on that os)
Use the '-t' option to flex to generate a unique output filename.
Needed for parallel builds when multiple lexers are built in
the same object directory.
* fix libCom exports for things which used to be built differently
* logserver needs winsock
* errlog prefix: fix warnings on win32
* fix dll imports in ioc/db
o changed name, OSD_ATOMIC_INLINE to EPICS_ATOMIC_INLINE
o changed supported data types, unsigned removed and int added (per reveiw at codeathon)
o added add/subtract functions (per reveiw at codeathon)
o now presuming that __sync_synchronize available all gcc 4 mingw does not provide windows mem barrier)
o consolodated on one implemention for Microsoft invarient of cmplr intrinisic or win32 by using macros to config a shared header file
o improved doc in epicsAtomic.h
o added overloaded c++ interface in namespace epics :: atomic to epicsAtomic.h
o added epicsAtomicReadMemoryBarrier and epicsAtomicWriteMemoryBarrier interface to epicsAtomic.h
o changed the implementation so that each of the functions can be individually specified for a particular compiler, os, or in the generic implementation (this is accomplished with macros)
o modified the functional and performance test so that they are based on templates so we can easily support new data types
o modified performance tests to repeat function calls and measure performance using a template
Refactored logClientSend in libCom/logClient/logClient.c; took the code between the mutex operations and
moved it to a private method - sendLogMessageinChunks. Call this method once for the prefix (if it exists) and once
for the actual message.
Added ioCsh registration code into src/libCom/iocsh/libComRegister.c registering a command called
"iocLogPrefix" that sets this prefix.
Unit tested with and without prefixes.
Performance tested with and without prefixes - without prefix is approx the same. With prefix is about
twice the time (reflecting the two calls to sendLogMessageinChunks I think)
o refactored compilerDependencies.h into code that is compiler specific (one libCom/osi/compiler/xxx/compilerDependent.h for each comiler) and code that isnt libCom/osi/compilerDependencies.h (this is a new location and is no longer in libCom/misc).
o removed function
epicsAtomicTestAndSetUIntT
o added new functions
epicsAtomicSetPtrT
epicsAtomicGetPtrT
epicsAtomicCmpAndSwapUIntT
epicsAtomicCmpAndSwapPtrT
o changed msvc intrinsics to define memory fence
o fixed mutex synchronized version so that its slow, but correct if the c++ compiler doesnt synchronized local scope static initialization
o changed most of the set/get methods to use memory barriers instead of some other primitive
o added additional tests
o removed function
epicsAtomicTestAndSetUIntT
o added new functions
epicsAtomicSetPtrT
epicsAtomicGetPtrT
epicsAtomicCmpAndSwapUIntT
epicsAtomicCmpAndSwapPtrT
o changed msvc intrinsics to define memory fence
o fixed mutex synchronized version so that its slow, but correct if the c++ compiler doesnt synchronized local scope static initialization
o changed most of the set/get methods to use memory barriers instead of some other primitive
o added additional tests
configure/os/CONFIG.Common.cygwin-x86
configure/os/CONFIG.Common.linux-x86
configure/os/CONFIG.Common.win32-x86-cygwin
configure/os/CONFIG.Common.win32-x86-mingw
added commented out "-march=i586" to
configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86
configure/os/CONFIG_SITE.win32-x86-cygwin.win32-x86-cygwin
added "-march=i586" to (I know that this compiler currently defaults to 386)
configure/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw
configure/os/CONFIG.Common.cygwin-x86
configure/os/CONFIG.Common.linux-x86
configure/os/CONFIG.Common.win32-x86-cygwin
configure/os/CONFIG.Common.win32-x86-mingw
added commented out "-march=i586" to
configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86
configure/os/CONFIG_SITE.win32-x86-cygwin.win32-x86-cygwin
added "-march=i586" to (I know that this compiler currently defaults to 386)
configure/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw
o removed -march=i586 from CONFIG.linux-x86.linux-x86
o fixed compile errors in epicsAtomicOSD.h (I didnt have the proper version of solaris for initial testing here)
o removed -march=i586 from CONFIG.linux-x86.linux-x86
o fixed compile errors in epicsAtomicOSD.h (I didnt have the proper version of solaris for initial testing here)
o added CMPLR_SRC_DIRS to ALL_SRC_DIRS, and added compiler/$CMPLR_CLASS) to INSTALL_INCLUDES in CONFIG_COMMON
o added additional compiler specific rule deciding where things are installed to in CONFIG_COMMON
o added compiler specific include install to RULES_BUILD
o changed configure/os/CONFIG.linux-x86.linux-x86 to specify minimum arch is 586 (pentium circa 1995)
o changed configure/os/CONFIG.win32-x86-cygwin.win32-x86-cygwin to specify minimum arch is 586 (pentium circa 1995)
o added epicsAtoimic facility to libCom/Makefile
o added testing and performance measurement to libCom/test/Makefile
o added CMPLR_SRC_DIRS to ALL_SRC_DIRS, and added compiler/$CMPLR_CLASS) to INSTALL_INCLUDES in CONFIG_COMMON
o added additional compiler specific rule deciding where things are installed to in CONFIG_COMMON
o added compiler specific include install to RULES_BUILD
o changed configure/os/CONFIG.linux-x86.linux-x86 to specify minimum arch is 586 (pentium circa 1995)
o changed configure/os/CONFIG.win32-x86-cygwin.win32-x86-cygwin to specify minimum arch is 586 (pentium circa 1995)
o added epicsAtoimic facility to libCom/Makefile
o added testing and performance measurement to libCom/test/Makefile
Combine recIoc and softDevIoc libraries into dbRecStd
Move base.dbd from ioc/misc/ to std/softIoc/
Generate stdRecords.dbd from the std/rec/Makefile list of record
types instead of hard-coding it in base.dbd
Merge miscIoc rsrvIoc dbtoolsIoc asIoc dbIoc registryIoc dbStaticIoc
into dbCore.
Move ioc/misc/asSubRecordFunctions.c to std/dev/asSubRecordFunctions.c
since it depends on the subRecord type.
Extracted ioc variable definitions from base.dbd into dbCore.dbd
Build lexer and parser from libCom/Makefile.
Since libCom now includes asLib.c and asLib_lex.c we must build
antelope and flex without linking them to Com. This works because
they only need epicsTempFile anyway. However make doesn't like a
subdirectory with the same name as a target object, so the antelope
source directory is now called yacc. The two main.c files were also
renamed to avoid other build problems.
Merge asHost into Com and remove mentions in CONFIG_BASE
Lots of noise since SRCS must be renamed to Com_SRCS
The new Makefile fragments in the subdirectories are incomplete and will
not work individually. Build rules are placed in a separate RULES file.
This approach keeps the instructions for building each file local and
easier to find than in a large Makefile in the parent directory.
* Renamed the enum epicsEventWaitStatus to epicsEventStatus
* Defined epicsEventWaitStatus as a macro for epicsEventStatus
* Renamed epicsEventWaitOk to epicsEventOk
* Renamed epicsEventWaitError to epicsEventError
* Defined epicsEventWaitOK and epicsEventWaitError as macros
* Added epicsEventTrigger(id) which triggers an event and returns OK or an
error status if the underlying OS primitives report an error
* Added epicsEventMustTrigger(id) which halts on error
* Defined epicsEventSignal(id) as a macro for epicsEventMustTrigger(id)
* Added a new C++ method epicsEvent::trigger() which throws an
epicsEvent::invalidSemaphore in the event of an error
* epicsEvent::signal() makes an inline call to epicsEvent::trigger()
* epicsEventWait() and epicsEventWaitWithTimeout() now return an error
status if the underlying OS primitives report an error
* All the epicsEventMust...() routines are now implemented in the common
libCom/osi/epicsEvent.cpp source file, and call cantProceed() instead of
mis-using assert()
* Implemented epicsEventShow() on Posix
Use '-b' argument of antelope to control generated file name
for safe parallel builds.
Move conditional into command so that it is possible to build
parsers which generate a header in the same directory as parsers
which do not. Allow YACCOPT per target, but default to global.
Each SRC_DIR gets its own Makefile fragment, and where it needs
private build rules a RULES files.
If this pattern gets used elsewhere we could automate the include
lines (search $(SRC_DIRS) for Makefiles and RULES files?).
Make the *iSoftCallback devices allocate a single buffer for private
storage instead of several, and cope with calloc failures without
suspending the IOC thread.
This is a test program which implements the template expansion
capabilities of msi, but using the dbLoadTemplate.c code. It should
be useful for testing, to make sure that both versions generate the
same output. It won't work on Windows at the moment due to a clash in
the function decorations of the dbLoadRecords() function.
Rewrote the YACC grammar, with help from Benjamin Franksen in formally
defining the substitution file format in EBNF. This version also
changes the way in which variables are added to the sub_collect
string; previously it appended a ',' after every entry, and removed it
off the end before calling dbLoadRecords(), but now we put the ',' at
the beginning of each entry, and just offer dbLoadRecords() the string
starting at the second character (not that this really matters, macLib
will quite happily ignore either a leading or a trailing comma in the
variable definition string).
We now warn if there are substitution values for which we have no
name, or if the file uses the deprecated syntax which permitted a
bareword token in front of the variable substitution or pattern
definition braces.
* Added (c) header, expanded tabs
* Set library path and use new library names
* Added -D (dependency) output handling
* Added -o (output file) support
* Use <td> instead of <th> for normal cell data
This is by no means complete, but it does seem to work.
He also wrote:
Here is at least a short list of things to think about:
How do we add this into the other documentation?
How do we add the long description?
Modify Readfile to do includes or not?
Modify for multiple records in a file?
Modify for no records in the file i.e. dbCommon?
Automatically add link to menu information if DBF_MENU?
Should we go through and set promptgroup on all fields to make this more
correct?
The list of reserved words is combined from C++ and the DB/DBD file parser.
This also requires a small change in the rules for generating the C name
from the DBD field name, since the aSub record has a field NOT; now if we
find the lower-case version is reserved, we use the original instead.
Since the aSubRecord.c file doesn't use prec->not this is back-compatible.
* Moved Readfile and macLib into tools/EPICS
* dbHost/Getopts was a duplicate
* Added (c) headers
* Build in the dbHost dir
* Switch build system to use Perl versions.
Added a class for each Recfield DBF_TYPE, use this to
simplify conversion to C code.
dbToRecordtypeH incomplete, but it outputs the record struct.
190 tests, 100% ok.
Added new PN_LINK type in link.h, make dbStaticLib display it.
Made all device support extended so links can be changed at runtime.
Modified startup so add_record() always called before regular link processing.
Incomplete, stilll need to add MS/MSS/MSI support, currently disabled.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.