Mutexes are here defined as values that reside in shared heaps ([root:Netmcore_heap]), for example in the header field of [root:Netmcore_array] or somewhere else in heap-allocated data structures.
In order to ensure that the mutex is in the heap, the
create must be used to initialize it
create requires a mutator as argument, this is
only possible by calling
create from the callback of
Mutexes are special values, and cannot be copied or moved.
Mutexes are implemented on top of semaphores. For mutex types with deadlock handling, the process is considered as the owner, and process ID is the identifier.
Only mutexes of type
`Normal are thread-safe, i.e. can be used
when the worker processes also use threads internally.
`Normalmutexes have no checks for deadlocks.
`Errorcheckmutexes check whether the process locks the mutex again, and fail in this case. Also, only the owning process can unlock a mutex.
`Recursivemutexes allow that the owner locks several times. The same number of unlock requests need to be issued to give up the ownership
A dummy mutex is non-functional, but can be used to put something