Commit Graph

338 Commits

Author SHA1 Message Date
Jeff Hill
43fa23bba6 fixed vxWorks name for epicsAtomicTest 2011-08-30 10:49:52 -06:00
unknown
f0afcef02e o changed to more generic implementation to reduce the code size
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
2011-08-29 19:02:41 -06:00
Jeff Hill
bd1b1479f4 o no longer need to define OSD_ATOMIC_GCC
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
2011-08-15 17:00:01 -06:00
Jeff Hill
c872c44668 added epicsAtomicGetUIntT for completeness 2011-08-12 10:06:09 -06:00
Jeff Hill
9e60e923e7 redo change reversed by merge 2011-08-08 18:38:39 -06:00
Jeff Hill
092e161485 o fixed compile errors in epicsAtomicOSD.h (I didnt have the proper version of solaris to test)
o fixed darwin compile errors (I dont have access to darwin)
2011-08-08 17:54:43 -06:00
Jeff Hill
b051875f22 changed test iterations to accomodate old systems 2011-08-05 11:14:37 -06:00
Jeff Hill
747a59fd7f o added epicsAtomic implementation including compiler and os specific files
o added functionality and performance testing
2011-08-05 09:13:38 -06:00
Jeff Hill
fa55316272 o added CMPL_CLASD definition to CONFIG.gnuCommon, CONFIG.solarisCommon.solarisCommon, configure/os/CONFIG.win32-x86.win32-x86
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
2011-08-05 08:57:15 -06:00
Michael Davidsaver
2714ff703b Fix source reorg issues from Windows
* 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
2011-08-30 18:09:11 -05:00
Andrew Johnson
e15e42cff3 Merged Murali Shankar's iocLogPrefix changes.
Adjusted a few things during the merge.
2011-08-25 18:17:09 -05:00
Murali Shankar
c12f6808f1 Added a couple of units tests for iocLogPrefix 2011-08-24 11:25:06 -07:00
Andrew Johnson
712bb052ef Merged the epicsEvent-api branch.
Modified epicsEventTest.cpp to use the new names.
2011-08-23 18:19:55 -05:00
Andrew Johnson
8418aa059a libCom/test: Suppress g++ build warnings from epicsCalcTest
Newer versions of gcc support #pragma GCC diagnostic
2011-04-07 17:25:02 -05:00
Andrew Johnson
038ac0cd38 Fix some build issues with old Solaris C++ compiler.
src/libCom/test/epicsExceptionTest.cpp:
  exThread needs a destructor

src/cas/generic/st/casStreamOS.cc:
  Can't use inline as armSend already called
2011-04-05 16:08:49 -05:00
Andrew Johnson
f4528ff5e1 libCom: Fix msgbufGetNode() in errlog.c
Systems that generate large numbers of errlog messages or have a slow
message listener could overwrite older messages in the message buffer
after the buffer wraps.  This also corrects and annotates the test
code to describe what's being checked.
2011-03-01 15:03:33 -06:00
Andrew Johnson
1e6464cdc4 libCom/test: Various improvements.
Made epicsThreadOnceTest more deterministic, replacing an
epicsThreadSleep() with epicsEventMustWait(), and added a diagnostic
message before running the thread recurse test.

Eric added a series of checks to epicsEventTest.cpp which ensure that
epicsEventSignal() only wakes one waiting thread.
2010-10-29 11:58:44 -05:00
Andrew Johnson
03539b05a4 libCom/test: run epicsMutexTest loops a fixed number of times.
Windows sometimes managed to run an extra loop before this change.
2010-10-26 11:45:13 -05:00
Andrew Johnson
881d13ac07 Merged the expand-calc-size branch.
This allows calc and calcout record expressions to be up to
79 characters long, and shortens the postfix buffer needed by
introducing integer literals.  Also removes the length limit
for access security CALC expressions.
2010-10-07 14:16:24 -05:00
Andrew Johnson
fbda9f3280 RCS keyword updates for Bazaar
Replaced $Id$ and $Header$ keywords with $Revision-Id$
Deleted $Log$ keywords and any log messages
2010-10-05 14:27:37 -05:00
Andrew Johnson
6d1cc23a7e libCom/test: Enhanced epicsCalcTest.
Added testArgs() function and tests, and more bad expression tests.
2010-10-04 13:39:02 -05:00
Andrew Johnson
641aa70eb1 libCom/test: Added Michael Davidsaver's unit tests for errlog 2010-09-30 14:36:30 -05:00
Andrew Johnson
48aabfc6ad libCom/test/epicsStringTest: %Zd isn't portable. 2010-09-29 17:44:10 -05:00
Andrew Johnson
a6a01e6822 Converted buckTest.c to use epicsTime.h instead of time.h
This should finally resolve the build conflict between RTEMS-uc5282
and Windows, and remove the build warning on vxWorks.
2010-08-17 17:53:43 -05:00
Jeff Hill
a3dd3e1a2f unistd.h isnt available on windows, and doesnt appear to be required by this code? 2010-08-16 17:34:39 -06:00
Andrew Johnson
cc95161af0 Merged base-tests branch from epics-base-testing team.
Modified testspec output to omit Tests: line when empty
Added testspec generation to src/db/test/Makefile.
2010-08-04 14:16:14 -05:00
Eric Norum
31326b8b9f Add RTEMS R4.10 support 2010-07-23 09:21:02 -07:00
Nick Rees
31790737e4 Added Andrews changes to RULES_BUILD to generate a hint file for the runner 2010-05-27 15:36:52 +01:00
Andrew Johnson
6790acf78f Fix for hang from Ron Sluiter. 2010-05-18 16:12:36 -05:00
Andrew Johnson
e9593e4b6c Run epicsMessageQueueTest last, since it takes 5 minutes. 2010-05-05 15:43:58 -05:00
Andrew Johnson
831f48e719 Fix the macLib buffer overflow issue, Bug 551909.
This is mostly Eric's patches, without the valend name change.
2010-05-04 15:43:20 -05:00
Andrew Johnson
b4be728539 cvtFastPerform measures performance, it doesn't do functional testing.
* Cleaned up some warning messages in it on darwin
* Removed it from the epicsRunLibComTests function.
2010-04-26 17:19:10 -05:00
Andrew Johnson
6ece3235c9 Added libCom/test code for epicsThreadOnce() implementations.
Also fixed subsystems that were not using epicsThreadOnce correctly.
2010-04-26 15:48:42 -05:00
Andrew Johnson
3b0036b389 Improve code readablity, add more numeric tests. 2010-03-09 10:49:21 -06:00
Andrew Johnson
534ca2c86e Make ellFree() a 1-argument macro, calls ellFree2() with free as freeFunc. 2009-08-28 18:34:38 +00:00
Jeff Hill
fa24d119dd use verify instead of assert (in tests) 2009-08-24 17:07:03 +00:00
Andrew Johnson
c28520bea6 Adjust test 66 so it doesn't fail if the gcc optimizer result gives -1 but
glibc returns +1.  Both are correct, gcc is following a newer standard.
2009-08-21 14:49:01 +00:00
Jeff Hill
d764e7d4df added "using namespace std" 2009-07-29 15:10:24 +00:00
W. Eric Norum
49ddec4294 Add cvtFastPerform to test harness. 2009-07-29 14:29:54 +00:00
Jeff Hill
844ed6345a test also numbers in -5 to 5 range 2009-07-23 17:32:33 +00:00
Jeff Hill
7315f02888 added cvtFastPerfotm test 2009-07-23 17:25:51 +00:00
Andrew Johnson
70bf066ba9 Added ELLNODE_INIT and ELLLIST_INIT macros. 2009-07-08 19:04:22 +00:00
Andrew Johnson
13f064fd7f Resource allocation checks missing 2009-04-23 22:28:44 +00:00
Andrew Johnson
31d149d8d9 Fixed 64 bit compiler warnings from Tom Palaia/MacOS. 2009-04-23 18:49:40 +00:00
Andrew Johnson
d545a8f04f Added test code, fixed bug found in epicsStrnEscapedFromRawSize(). 2009-04-10 19:58:34 +00:00
Andrew Johnson
23b3154fa8 Declare epicsEllTest before calling... 2009-04-09 20:38:49 +00:00
Andrew Johnson
f3d07ad12f ellLib changes: ANSIfication patch; moved test code out of ellLib.c into
its own unit test program in libCom/test; changed ellFree() to take a
function pointer for the free() routine, so it can be used on Windows;
modified epicsExit and dbBkpt to use it and pass in the free routine.
2009-04-09 16:51:05 +00:00
Andrew Johnson
134509a8ea Thread name may not be available during termination. 2009-04-08 22:39:27 +00:00
Andrew Johnson
5d5fd663ff Use epicsNAN and epicsINF. 2009-04-03 21:16:25 +00:00
W. Eric Norum
cc4b462f8c Reflect ring bytes changes. 2009-04-03 19:43:41 +00:00