Richard Henderson <[email protected]> writes:
Do I need to enclose `shmdt implmenetation` in a WITH_MMAP_LOCK_GUARD() block?
Mr.Warner forwared me a patch series ,that you sent on Sun 20 Aug,
for the linux-user, which encloses the implementation in such a block.
--
Karim Taha
> On 9/9/23 12:37, Karim Taha wrote:
>> +static inline abi_long do_bsd_shmdt(abi_ulong shmaddr)
>> +{
>> + int i;
>> +
>> + for (i = 0; i < N_BSD_SHM_REGIONS; ++i) {
>> + if (bsd_shm_regions[i].start == shmaddr) {
>> + bsd_shm_regions[i].start = 0;
>> + page_set_flags(shmaddr,
>> + shmaddr + bsd_shm_regions[i].size, 0);
>> + break;
>> + }
>> + }
>> +
>> + return get_errno(shmdt(g2h_untagged(shmaddr)));
>> +}
>
> On success, this needs to mmap_reserve the region for reserved_va.
>
>
> r~