Commit Graph

1257 Commits

Author SHA1 Message Date
zimoch cbbbd67843 fdManager uses poll() on Windows and RTEMS too
RTEMS needs to use the "new" network stack
Windows has poll since Vista
Don't use poll on cygwin: it emulates poll() using select().
2025-02-10 08:47:59 +01:00
zimoch 57c0295024 fdManager changed to use poll()
The implementation using select() limits file desciptors to FD_SETSIZE,
typically 1024 on Linux. This number is too low for some applications,
for example for the CA gateway.
Therefore, Linux builds use poll() instead.
2025-02-10 08:47:59 +01:00
Michael Davidsaver 8f77e941c7 add fdManager test 2025-02-10 08:47:59 +01:00
Michael Davidsaver c76395abc6 remove fdmgrTest
Not a unittest, and not functional.
2025-02-10 08:47:59 +01:00
Michael Davidsaver 1d19ba4cc2 doc and log for *MustSucceed()
Replace the "never returns NULL." statement which is
manifestly not true.
2025-02-07 09:09:22 -08:00
JJL772 144f9756ea Add iocshSetError in a bunch of places 2025-02-05 10:16:16 -06:00
DW 48eed22f3b check IOCSH_STARTUP_SCRIPT before set 2025-02-05 10:03:35 -06:00
Érico Nogueira 8ac2c87156 Post monitors from compress record when resetting it
This way clients receive updates with an empty array after writing into
the RES field.
2025-02-05 09:59:18 -06:00
Timo Korhonen 065fe7cab6 Fix internal link 2025-01-28 15:05:55 -08:00
Michael Davidsaver e4ad4becde rationalize osdMutex
Avoids split allocation.
Eliminates special case free-list.

win32: eliminate pre-XP
rtems-score: eliminate non-fast
2024-12-29 16:35:26 -08:00
Michael Davidsaver 1cd141c540 dbLoadTemplate: error propagation and more context on .db syntax error 2024-12-29 16:35:26 -08:00
zimoch 72026a27a0 allow to load the same alias multiple times (unless dbRecordsOnceOnly is set) 2024-12-29 16:35:25 -08:00
Simon Rose 9fb820b46e Add tests for relative include paths 2024-12-29 16:34:10 -08:00
Jeremy Lorelli 721e9cc3a7 Add ABORT_ON_ASSERT flag to CONFIG_SITE
This flag causes EPICS to call abort() on assertion failures rather than
suspend the executing thread. With the epicsThreadSuspendSelf() behavior,
an IOC can end up in a difficult to detect error state where one or more
threads has essentially crashed due to an assertion failure.

This also matches the C behavior of assert(3)
2024-12-29 16:34:10 -08:00
Simon Rose 0186836449 Reading a file from the command-line should not use include paths 2024-12-29 16:34:10 -08:00
Simon Rose b90ab7de13 Improve relative path check for msi
For posix-ish systems, we previously checked that a path was relative
by simpy checking if it included a '/' character. This meant that you
could not, for example, do
```
$ cat foo.substitutions
file rel/to/bar.template {
}

$ msi -I /some/path foo.substitutions
```
where our template file is located at `/some/path/rel/to/bar.template`.

Note that relateive paths work differently on Windows, so we carve out
an exception there.
2024-12-29 16:34:10 -08:00
Jeremy Lorelli 333be085c0 Fix compile error in tsSLList.h 2024-12-28 12:40:27 -08:00
Ralph Lange 5a11954c51 Add documentation for the UDFS field 2024-12-26 18:44:23 +01:00
Jure Varlec d0cf47cd6f Propagate AMSG through MSS links
MS and MSI links do not propagate STAT and therefore do not propagate
AMSG, either. CA, CP and CPP links also do not propagate AMSG, but the
reason is technical: the message is not available over Channel Access.
2024-12-11 09:38:02 -06:00
zimoch dac620a708 loop safe wrapper for dbGet added 2024-12-11 09:31:49 -06:00
zimoch 4ee766b6b1 correct mask for finding field in linkGrp
It worked before because the get_xxx functions are never called for
the links (bit0 = 1), but checking both bits looks cleaner.
2024-12-11 09:31:49 -06:00
zimoch 5143258011 fix support for link 0 2024-12-11 09:31:49 -06:00
Michael Davidsaver ead8b7e82b doc getIocState() 2024-12-09 17:00:03 -08:00
Jure Varlec 8483ff9560 Clear NAMSG together with NSTAT and NSEV
Previously, there was no way to clear AMSG when setting a no-alarm
status: it kept the last error message, and it is strange to have a
record that has no alarm while showing an error. With this change, the
NAMSG field is treated the same as NSTA and NSEV: they are cleared when
their content is moved to STAT, SEVR, and AMSG.
2024-11-27 07:40:39 -08:00
zimoch b7cc33c3c9 Send DBE_PROPERTY events before DBE_VALUE | DBE_LOG events to allow clients to update their formatting etc in time 2024-11-13 10:00:12 -06:00
zimoch 9e7cd241e0 fix DBE_PROPERTY events for mbbi/mbbo records 2024-11-13 10:00:12 -06:00
zimoch faac1df1c6 send DBE_PROPERTY events only if property field actually changed 2024-11-13 10:00:12 -06:00
Chris Johns 594e5ee9db rtems: Set the name of EPICS threads so RTEMS commands report the name
Use the NP POSIX call pthread_setname_np to set the POSIX thread name.
2024-10-31 16:21:49 -05:00
Chris Johns 135193c4bd rtems: Fix shell networking commands
This patch cleans up the shell defines for the libbsd and legacy
network stack shell commands.

The top and rtems shell commands have been added.
2024-10-31 16:21:49 -05:00
Chris Johns 9d65da5c61 rtems: Fix rtems_bsdnet_bootp_server_address decl with RTEMS_LEGACY_STACK
The legacy stack provides this variable and this decl clashed. This was
seen before now due to the link order of libraries.
2024-10-31 16:21:49 -05:00
Chris Johns 83cbf8a4c7 freebsd: Add support for x86 and amd64 builds
Use the OS compiler, ie cc and c++.
2024-10-31 16:16:45 -05:00
Michael Davidsaver f6cd43b7cc asTrap serverSpecific is dbChannel
Save/restore dbAddr::pfield around callbacks to
avoid corruption if CB forgets to restore.

Need to peak at dbChannel.h during libCom build.
So generate dbCoreAPI.h early, and add extra
-I to source location when compiling dbTrapWrite.c
2024-10-31 12:30:15 -05:00
Timo Korhonen e6a2047bbf formatting fixes, as requested 2024-10-30 11:07:25 -05:00
Timo Korhonen 7923076b1c edit to reduce Codacy warnings. May not fix all but this is my best guess. 2024-10-30 11:07:25 -05:00
Timo Korhonen 46ad962cd8 replaced the html version of msi document with markdown. 2024-10-30 11:07:25 -05:00
Michael Davidsaver 022b8d468b document dbScan.h 2024-10-20 10:18:30 -07:00
Michael Davidsaver 152d306ad8 avoid UB with self pthread_join() 2024-10-02 09:22:00 -05:00
Michael Davidsaver 012139638d posix: epicsThreadCreateOpt() avoid leak of joinable on EPERM
On a system where RT priorities have been probed.
When creating a joinable thread, but still fails
with EPERM, the first epicsThreadOSD was leaked.
2024-10-02 09:22:00 -05:00
Minijackson dd5df7363c documentation: migrate ComponentReference to markdown
This enables us to use toctrees, which informs Sphinx on the global
documentation structure, and removes warnings about not-included
documents.

The old ComponentReference.pod was kept, in order to not break the old
HTML output, but the new Markdown file is used as source for the
generated markdown files in doc/
2024-10-02 09:16:29 -05:00
Minijackson c0aeb4c69b Move and fix ComponentReference.pod
Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
Co-authored-by: Andrew Johnson <anj@anl.gov>
2024-10-02 09:16:29 -05:00
Minijackson 7cdaaf716a Generate Markdown from all .pod and .dbd.pod files
Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
2024-10-02 09:16:29 -05:00
Minijackson 615ba73044 Rules to generate and install Markdown
Markdown can be generated from .pod and .dbd.pod files.
Markdown will be generated and installed by "make inc".

Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
Co-authored-by: Andrew Johnson <anj@anl.gov>
2024-10-02 09:16:29 -05:00
Minijackson c285f2a78f dbdToMD.pl: create
Co-authored-by: Timo Korhonen <timo.korhonen@ess.eu>
2024-10-02 09:16:29 -05:00
Érico Nogueira 8045770751 libCom: don't use std::unexpected in epicsThread.
Besides being deprecated in C++11 and removed in C++17, the intended use
case for this was always wrong, since std::unexpected() is called by the
C++ runtime when a function throws an exception that was not specified
in its "dynamic exception specification", which is different from an
exception thrown by user code which wasn't caught [1,2]. Using abort()
keeps the same behavior, but with the intended semantics.

We don't use std::abort() to simplify backwards compatibility.

[1] https://github.com/epics-base/epics-base/issues/343
[2] https://en.cppreference.com/w/cpp/error/unexpected
2024-09-09 07:27:32 -07:00
Michael Davidsaver 2e4113b63b Add typing to dbEvent.h opaque structs when -DUSE_TYPED_DBEVENT 2024-09-04 10:15:55 -05:00
zimoch 99f70a1081 Print link types as text instead of numbers 2024-09-04 10:13:08 -05:00
Grzegorz Kowalski 5d9ffe15da caget: free PV value after printing 2024-09-04 10:02:49 -05:00
Grzegorz Kowalski 3ac8dcc3de caget: free memory allocated for PV array 2024-09-04 10:02:49 -05:00
Jure Varlec 25e155ee8c Fix a mis-asssignemnt of copyright
Copyright was previously assigned based on the author's email, which had
been modifified by repository conversion from CVS to git. This rectifies
the situation by assigning copyright to the authors employer at the time
of creation of the file.
2024-09-04 10:02:04 -05:00
Jure Varlec 0d92b74aae Compactify SPDX tags in README files 2024-09-04 10:02:04 -05:00