Change in ...libosmocore[master]: add osmo_fsm_inst_watch()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Oct 4 18:00:00 UTC 2019


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/15660 )

Change subject: add osmo_fsm_inst_watch()
......................................................................


Patch Set 2:

A few notes:

* with my proposal, there's no need for a osmo_gsm_free_cb_remove(), Simply use:
"osmo_fsm_free_cb(fi, NULL, NULL);" and you are done.

* Regarding the "deferred until osmo_select_main_ctx()", I'd be fine with it, as long as it doesn't become a hard dependency of osmo_fsm_inst to have a main loop. There could be a "osmo_fsm_defer_free_select_ctx(fi, bool defer);", which when set to true, instead of deallocating it, ->terminated=true is set instead and scheduled to be freed. However, with this option the process may end up accessing the terminated (but still allocated) FSM and we'll not notice it with ASan.

* I still don't think we need this really specific watch API you presented, at least in the libosmocore osmo_fsm API. The API I'm suggesting is pretty similar in lines of code and style, and still provides for far more uses (since the user can program the cb as he wishes).

So all in all, I still think the free_cb is the best option here tbh.


-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15660
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4d8306488506c60b4c2fc1c4cb3ac04654db9c43
Gerrit-Change-Number: 15660
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-CC: fixeria <axilirator at gmail.com>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Fri, 04 Oct 2019 18:00:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191004/fd88fa87/attachment.htm>


More information about the gerrit-log mailing list