Title | Unclear when to use AVERT in mpsi.c |
Status | closed |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | In mpsi.c, the code sometimes uses AVERT() and sometimes AVER(TESTT). Is there an important distinction? If so, it should be documented somewhere. |
Analysis | AVERT is used inside ArenaEnter ... ArenaLeave and so need not be thread-safe, whereas AVER(TESTT) is used outside and so must be thread-safe. This needs to be documented, but also, the code does not quite adhere to this. In mps_pool_create_v there's AVERT(PoolClass, pool_class) outside the arena lock, and a call to pool_class->varargs. Need to document in design.mps.keyword-arguments that varargs methods must be thread-safe. |
How found | inspection |
Evidence | None |
Created by | Gareth Rees |
Created on | 2014-10-13 11:19:58 |
Last modified by | Gareth Rees |
Last modified on | 2014-10-13 14:36:15 |
History | 2014-10-13 GDR Created. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
187238 | closed | 2014-10-13 14:36:15 | Gareth Rees | Don't use AVERT unless the arena lock is held (it's not thread-safe in all varieties). Add design explaining this. |