<div dir="ltr">Hi all,<div><br></div><div>This week I have tested all I have implemented until now. Message queues testing was a good way of testing shared memory and userland implementation behavior when calling <i>fork</i>. Among others, I found some atypical behavior when the parent removes the resource before the child finishes sysv initialization (connect to daemon, inform about all resources used, etc) and fixed it. I have also found scenarios when the memory used by clients is not cleaned properly when another client removes a resource used by it. </div>
<div><br></div><div>Another bug was caused by using pthread_mutex/pthread_rwlock for synchronizing access to semaphores and message queues. Those are implemented using shared memory so sending a message or setting a semaphore means writing in the shared memory area. Because more process can do this (those using the sysv resource), a synchronization object is necessary. I used pthread* but this can't work because pthread_mutex_init/pthread_rwlock_init use malloc. To solve this issue I have implemented a simple mutex inspired from pthread_mutex. Porting the rwlock implies porting condition variables too.</div>
<div><br></div><div>Larisa</div></div>