Title | Purpose of mps_alert_collection_set is unclear |
Status | closed |
Priority | optional |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | In mps.h [1] there's an undocumented function "mps_alert_collection_set". Looking at the implementation in mpsi.c [2], it sets "arena->alertCollection". This is a "client alert fn" that is called when a collection starts or finishes: see TracePostStartMessage and TracePostMessage in traceanc.c [3]. This seems dodgy: (a) it's calling back to the client program asynchronously; (b) there's already a (safe, synchronous) mechanism for the MPS to tell the client program about collection starting and stopping (that is, the message queue). |
Analysis | This function is used by the amcss test case, but in fact all it does is print messages to confirm that the alert has been received. For the moment I've left this function undocumented. GDR 2013-03-08: I propose that we deprecate it in the documentation and remove it in version 1.112. Or just remove it now: it's never been documented, and it's not used by OpenDylan. |
How found | inspection |
Evidence | [1] <https://info.ravenbrook.com/project/mps/master/code/mps.h >[2] < https://info.ravenbrook.com/project/mps/master/code/mpsi.c >[3] < https://info.ravenbrook.com/project/mps/master/code/traceanc.c > |
Observed in | 1.110.0 |
Created by | Gareth Rees |
Created on | 2012-10-19 16:13:51 |
Last modified by | Gareth Rees |
Last modified on | 2013-03-12 14:33:27 |
History | 2012-10-19 GDR Created. 2013-03-08 GDR Proposal. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
181119 | closed | 2013-03-12 14:33:27 | Gareth Rees | Remove "mps_alert_collection_set" from public interface and remove its implementation and test case. Client programs should use the messages interface to find out what the MPS is doing. |