mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-12 04:14:06 +00:00
853622ad8788209e55f3adfbc92e76075d65e32c
Estimated hours taken: 12 Branches: main Shift most of the STM runtime into the Mercury runtime. Rename a lot of the types and functions used by the STM runtime. Various other fixes and improvements to the STM runtime. library/exception.m: Add a new version of try_stm/4 that is intended for use within atomic blocks by user code. This version filters out and rethrows rollback exceptions. Rename the existing try_stm/4 to unsafe_try_stm/4. library/stm_builtin.m: Move all the STM runtime support from this module into the Mercury runtime. The foreign_procs in this module now just forward their work to the appropriate function or macro there. Rename most of the types and functions associated with STM so that they better conform to our coding standards. Add a unit dummy type for use with atomic blocks that have no outputs, for example atomically swapping the values of two transaction variables. This is needed because the call to unsafe_try_stm introduced by the source-to-source transformation still has to return a value if it succeeds. runtime/mercury_stm.h: runtime/mercury_stm.c: New files containing the runtime support for STM that was in library/stm_builtin.m Define thread identity for the low-level C grades. In such grades it just the context address. Add a macro that returns the identity of the (Mercury) thread that is currently executing. (The implementation of wait queues will need this information.) runtime/mercury_context.c: At program startup initialise the STM lock. runtime/mercury_conf_param.h: Document the macro MR_STM_DEBUG which will be used to enable low-level debugging of the STM runtime. runtime/Mmakefile: Add the new files.
…
…
…
…
…
…
…
Mercury 0.13 may not work on Solaris 10 (SunOS 5.10) due to incompatibilities with the version of Boehm GC shipped with that version of Mercury. (The above problem has been fixed in post-0.13 versions of Mercury.) Also, note that `--linkage static' is not supported on Solaris. Executables produced using this option will cause a segmentation fault.
Languages
Mercury
85.3%
C
8.7%
Shell
1.4%
Makefile
1%
JavaScript
1%
Other
2.1%