The mutexes implementation can be fount in the utils
subdirectory. The distribution contains the object files mutex.mo
and __mutex.mo
, plus the signature MUTEX
. These objects are not part of the bases, and are therefore not automatically loaded into the image.
Mutexes work with the thread mechanism running in preemption mode.
There are five different demonstration programs in MLWorks\examples\threads
:
dining_philosophers.sml sleeping_barber.sml bounded_buffer.sml cigarette_smokers.sml readers_writers.sml
Documentation of the mutex interface follows.