From: Vladimir T. <vtz...@gm...> - 2017-06-19 15:16:04
|
On Mon, Jun 19, 2017 at 1:40 PM, Compro Prasad <com...@gm...> wrote: > > 4) I was considering to provide each symbol with a mutex so that they > could be > locked when any function tries to change the value of the symbol. And > this > has to be done in the function itself. For example, if > struct symbol_ > { > /* other contents */ > xmutex_raw_t mut; > } > is the definition of a symbol_ then mut can be used to lock it for > writing > purposes or even deletion too. > 1. How is this change related to hash tables? Such mutex may guard changes in symbol record but I guess your intention is to serialize modifications of the object pointed by symbol value cell. Symbols A and B value cells may point to same object which is not guarded in any way by the above mutex. I think you should limit you scope to hashtabl.d and Hashtable struct. 2. Don't use xmutex_t or xmutex_raw_t in records. These won't be properly restored during image loading. Instead use 'normal' lisp mutex objects - see Package struct for an example. |