Commit Graph
276 Commits
Author SHA1 Message Date
Michael Davidsaver cb6442da71 epicsThreadShow() zombies
Flag when the thread has returned, but the tracking
struct is still around.  eg. in need of joining.
2023-12-01 15:01:10 +01:00
Érico Nogueira 49b9573f3a libCom: detect support for backtrace() with __has_include.
This is necessary in order to build epics-base with musl libc, for
example, and any other C libraries which don't include this
functionality. In order to not regress builds with older compilers, we
still support the uclibc check. Furthermore, it has been checked that
uclibc-ng (the maintained version of uclibc) doesn't install the
<execinfo.h> header when the functionality is disabled [1] [2].

To avoid repetition, we don't define HAS_EXECINFO to 0 when it is not
available.

[1] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/Makefile.in?id=cdb07d2cd52af39feb425e6d36c02b30916b9f0a#n224
[2] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/Makefile.in?id=cdb07d2cd52af39feb425e6d36c02b30916b9f0a#n277
2023-12-01 15:01:01 +01:00
zimoch 1d3a2defa2 Merge 7.0 commit 'ca9c95' into PSI-7.0 2023-12-01 14:21:07 +01:00
Michael Davidsaver 1595ed8860 quieting clang-tidy, non-functional changes
Changes to syntax which should not effect generated code
2023-08-28 14:17:00 +02:00
zimoch 73f80cced9 Merge branch '7.0' into PSI-7.0 2023-08-21 14:14:16 +02:00
Ralph Lange 6636b4b9e7 libCom: check calloc() failure in RTEMS-posix/osdMessageQueue.c 2023-07-22 08:35:59 -07:00
Ralph Lange b51d1de283 libCom: fix possible memory leak in RTEMS-posix/osdMessageQueue.c
found by static code analysis (cppcheck @ sonarqube)
2023-07-22 08:35:59 -07:00
zimoch 5b058d7d27 Merge branch '7.0' into PSI-7.0 2023-06-22 16:36:32 +02:00
Michael Davidsaver 42604fc794 Allow clang with GCC compilerSpecific.h
Check EditorConfig / editorconfig (push) Failing after 1s
Base / Cross linux-aarch64 (push) Failing after 2s
Base / Cross linux-arm gnueabi (push) Failing after 1s
Base / Cross linux-arm gnueabihf (push) Failing after 2s
Base / CentOS-7 (push) Failing after 1s
Base / Fedora-33 (push) Failing after 2s
Base / Fedora-latest (push) Failing after 1s
Base / Ub-20 clang-10 C++11 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 xilinx_zynq_a9_qemu (push) Has been cancelled
Base / Win2019 mingw (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW (push) Has been cancelled
Base / Ub-20 gcc-9 unsigned char (push) Has been cancelled
Base / Ub-20 gcc-9 C++11, static (push) Has been cancelled
Base / Ub-20 gcc-9 + MinGW, static (push) Has been cancelled
Base / MacOS clang-12 (push) Has been cancelled
Base / Ub-20 clang-10 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 beatnik (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-4.9 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 pc686 (push) Has been cancelled
Base / Ub-20 gcc-9 + RT-5.1 uC5282 (push) Has been cancelled
Base / Win2019 MSC-19 (push) Has been cancelled
Base / Win2019 MSC-19, debug (push) Has been cancelled
Base / Win2019 MSC-19, static (push) Has been cancelled
Makes it easier to run clang derivative analysis tools
on builds configured for GCC.
2023-06-13 08:47:13 -07:00
Freddie Akeroyd f56412d6a5 WIN32: use FlsAlloc() to cleanup epicsThreadOSD
Adjust macros for compiling for older MSVC/Win SDK versions

Try to cover missing fibres include in 7.0 SDK

Support Windows XP and above.
Also removed explicit define of _WIN32_WINNT in code if it has not
been passed on compile line. This is possibly a matter for
further discussion
2023-05-01 09:03:52 -07:00
Eva Lott b878295d06 Added the new annotation EPICS_PRINTF_FMT 2023-05-01 09:03:45 -07:00
zimoch f41f11c7f6 fix compiler warning on 32 bit systems 2023-04-28 09:35:49 -05:00
Michael Davidsaver 5507646ce7 posix: optimize epicsThreadOnce()
Use atomic ops to short circuit when already initialized
2023-04-18 09:51:24 -05:00
zimoch d3dc2afd8d Merge branch '7.0' (after codeathon 2023) into PSI-7.0 2023-03-29 13:36:52 +02:00
Michael Davidsaver e22d74310b RTEMS: ensure epicsThreadMustJoin() short-circuits 2023-03-10 09:52:08 +00:00
zimoch 64f67d036b fix epicsThreadSleepQuantum not to fail epicsTimeTest because of unrealistically high clock resolution 2023-02-28 16:08:22 +01:00
zimoch 5db310813f Merge branch '7.0' into PSI-7.0 2023-02-15 16:54:36 +01:00
Andrew Johnson c2364d9d1c Add license header to new epicsReadlinePvt.h 2022-12-28 12:42:51 -06:00
Michael Davidsaver 166267a32f ringPointerTest in thread 2022-12-20 20:12:04 -08:00
Michael Davidsaver 07ffc1ffae Com: introduce epicsReadlinePvt.h
Helping IDEs understand gnuReadline.c and osdReadline.c
2022-12-20 20:11:45 -08:00
zimoch 25a2258663 make NTP driver more robust against strange time stamps 2022-09-12 17:31:25 +02:00
Andrew Johnson 20fb6b9ef5 Merge 3.15 changes into 7.0 2022-08-21 16:44:38 -05:00
Andrew Johnson 5d92d406a1 Darwin: Resolve soft-links in epicsGetExecName() 2022-08-18 12:17:06 -05:00
Andrew Johnson ad1a13730a Remove unused var 2022-08-16 15:08:23 -05:00
Andrew Johnson 0a20825c6e NTPTimeSync: Show when NTP sync failed, recovered 2022-08-15 19:12:05 -05:00
Andrew Johnson 752ca97f7e VxWorks: Stop VxWorks clock sync if EPICS_TS_FORCE_NTPTIME
Use ipcom_ipd_kill() to do it properly, announce when doing it.
Suspending the ipsntps task is dangerous, can hang the OS so
don't try to kill it if user already suspended the task.
Also drops checks for the "ipntpd" thread, not used.
2022-07-28 13:11:59 -07:00
Andrew Johnson bf0b4d2f61 VxWorks: Re-run tz2timezone() whenever the year increases
In the event that it then goes backwards we won't run it again; that
should never happen, but if it did we should prefer stability!
2022-07-28 13:11:59 -07:00
Andrew Johnson 87d5c01853 Set useNTP if VxWorks sync task is suspended
Also report that state instead of "running".
2022-07-28 13:11:59 -07:00
Andrew Johnson 956af730a9 osiClockTime.c: Clarify message wording
Distinguish between IOC's clock sync thread and OS's one.
Show our sync interval even when not synchronized.
Only mention the clock sync thread where there can be one.
2022-07-28 13:11:59 -07:00
Andrew Johnson 32564b1a94 osiClockTime.c: Move some things around
Group the private variables, note which are mutex-protected.
Reset the sync interval to 1 second if sync is restarted.
Initialize the syncFromPriority variable.
2022-07-28 13:11:59 -07:00
Andrew Johnson 5b690d5467 VxWorks: Pass interest level into osdClockReport 2022-07-28 13:11:59 -07:00
Andrew Johnson 9efebb6d3d osiClock: Register ClockTime_Init with iocsh
ClockTime_Init and ClockTime_Shutdown are only on VxWorks & RTEMS.
Adjust help text to match.
ClockTime_Init can be re-run later to start or stop the sync thread.
2022-07-28 13:11:59 -07:00
Andrew Johnson 1df973b234 VxWorks: Provide osdClockReport() for OS clock sync tasks. 2022-07-28 13:11:59 -07:00
Andrew Johnson c71ebd1221 VxWorks: Set timezone when using OS own time-sync tasks 2022-07-28 13:11:59 -07:00
Andrew Johnson 167807f0c4 Rename OS Clock provider on macOS, uses a different implementation. 2022-07-28 13:11:59 -07:00
Jure Varlec e6b8ecd55e Add space to the message printed by errMessage() 2022-07-28 13:11:29 -07:00
Elaine Chandler ccdd2808d9 add doxygen comments for epicsAtomic.h 2022-07-04 20:19:45 -05:00
Brendan Chandler 1be06fc0e9 Fix doxygen annotations in epicsGuard and osiSock
Change addresses some review feedback kindly given by @minijackson
2022-07-04 19:38:15 -05:00
Brendan Chandler 7cdc44434c Doxygen annotation proofreading fixes in osiSock.h 2022-07-04 19:38:15 -05:00
Brendan Chandler f3dfb36117 Update doxygen annotations on osiSock.h 2022-07-04 19:38:15 -05:00
Brendan Chandler a3b09ef1b8 Add doxygen annotations for osiSock.h 2022-07-04 19:38:15 -05:00
Brendan Chandler 55d4801eb0 Fix a couple doxygen warnings
Warnings complained about undocumented parameters.
2022-07-04 19:37:57 -05:00
Andrew Johnson bfd2684e58 Minor fixes to Elaine's annotations 2022-07-04 16:47:44 -05:00
Elaine Chandler 95fcf690ad add doxygen comments for epicsStackTrace 2022-07-04 16:27:48 -05:00
Elaine Chandler 0fa3337404 add doxygen comments for epicsSpin.h 2022-07-04 16:27:48 -05:00
Elaine Chandler 5b64eaac73 add doxygen comments for osiProcess.h 2022-07-04 16:27:48 -05:00
Andrew Johnson b5105740e6 Fix warnings from Doxygen 2022-07-04 16:18:46 -05:00
Andrew Johnson 9bb11e6e88 Fix VxWorks time sync initialization bug 2022-06-14 16:07:39 -05:00
Michael Davidsaver 2f8272d3a1 doc for: posix: use pthread_key_create() to cleanup epicsThreadOSD 2022-06-08 09:40:12 -07:00
Michael Davidsaver d019e9787a posix: use pthread_key_create() to cleanup epicsThreadOSD
Ensure that cleanup happens for all threads,
including implicitly created.
2022-06-08 09:40:12 -07:00