{"action":"created","issue":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/10399","repository_url":"https://api.github.com/repos/RIOT-OS/RIOT","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/10399/labels{/name}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/10399/comments","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/10399/events","html_url":"https://github.com/RIOT-OS/RIOT/issues/10399","id":381162034,"node_id":"MDU6SXNzdWUzODExNjIwMzQ=","number":10399,"title":"core: merge `msg` into `mbox`","user":{"login":"miri64","id":675644,"node_id":"MDQ6VXNlcjY3NTY0NA==","avatar_url":"https://avatars1.githubusercontent.com/u/675644?v=4","gravatar_id":"","url":"https://api.github.com/users/miri64","html_url":"https://github.com/miri64","followers_url":"https://api.github.com/users/miri64/followers","following_url":"https://api.github.com/users/miri64/following{/other_user}","gists_url":"https://api.github.com/users/miri64/gists{/gist_id}","starred_url":"https://api.github.com/users/miri64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miri64/subscriptions","organizations_url":"https://api.github.com/users/miri64/orgs","repos_url":"https://api.github.com/users/miri64/repos","events_url":"https://api.github.com/users/miri64/events{/privacy}","received_events_url":"https://api.github.com/users/miri64/received_events","type":"User","site_admin":false},"labels":[{"id":91234472,"node_id":"MDU6TGFiZWw5MTIzNDQ3Mg==","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Area:%20core","name":"Area: core","color":"6600ff","default":false},{"id":100135107,"node_id":"MDU6TGFiZWwxMDAxMzUxMDc=","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Discussion:%20RFC","name":"Discussion: RFC","color":"66ccff","default":false},{"id":23399100,"node_id":"MDU6TGFiZWwyMzM5OTEwMA==","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Type:%20enhancement","name":"Type: enhancement","color":"ffff66","default":false}],"state":"open","locked":false,"assignee":{"login":"kaspar030","id":4679640,"node_id":"MDQ6VXNlcjQ2Nzk2NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/4679640?v=4","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false},"assignees":[{"login":"kaspar030","id":4679640,"node_id":"MDQ6VXNlcjQ2Nzk2NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/4679640?v=4","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-11-15T13:31:38Z","updated_at":"2018-11-15T15:40:36Z","closed_at":null,"author_association":"MEMBER","body":"From my understanding there is some shared functionality between the asynchronous behavior of `core_msg` and `core_mbox`: messages are put into a queue by *n* threads and gotten out *n* threads. In case of `core_msg` *n* is however one.\r\n\r\nOn one hand side we might get some code size benefits in merging the two, on the other we would put some more complexity into the asynchronous behavior of `core_msg`, since it isn't required to handle more than one reception thread.\r\n\r\nA good compromise in my opinion would be to provide an new `mbox` implementation that assumes only one reader and base the old `mbox` and `msg` implementation on it. I started something into that direction in [this branch](https://github.com/miri64/RIOT/tree/core/enh/merge-msg-into-mbox). But I\r\n\r\n1. did not port `msg` yet \r\n2. am not sure if this https://github.com/RIOT-OS/RIOT/blob/1631d2961a56fa1066da2a4966922a86291323d0/core/mbox_base.c#L63-L66 and that https://github.com/RIOT-OS/RIOT/blob/1631d2961a56fa1066da2a4966922a86291323d0/core/mbox_base.c#L92-L96 is still possible, as both `_mbox_base_put()` and `mbox_base_get()` would be called by the wrapper implementations of `mbox` and `msg`, both might have their own `irqstate` stored (and thus it might not properly return to the right IRQ state in both `_mbox_base_wait()` and `_mbox_base_notify()`."},"comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments/439084085","html_url":"https://github.com/RIOT-OS/RIOT/issues/10399#issuecomment-439084085","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/10399","id":439084085,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTA4NDA4NQ==","user":{"login":"miri64","id":675644,"node_id":"MDQ6VXNlcjY3NTY0NA==","avatar_url":"https://avatars1.githubusercontent.com/u/675644?v=4","gravatar_id":"","url":"https://api.github.com/users/miri64","html_url":"https://github.com/miri64","followers_url":"https://api.github.com/users/miri64/followers","following_url":"https://api.github.com/users/miri64/following{/other_user}","gists_url":"https://api.github.com/users/miri64/gists{/gist_id}","starred_url":"https://api.github.com/users/miri64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miri64/subscriptions","organizations_url":"https://api.github.com/users/miri64/orgs","repos_url":"https://api.github.com/users/miri64/repos","events_url":"https://api.github.com/users/miri64/events{/privacy}","received_events_url":"https://api.github.com/users/miri64/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T15:40:36Z","updated_at":"2018-11-15T15:40:36Z","author_association":"MEMBER","body":"@kaspar030 any thoughts on 2.?"}}
{"actor":{"display_login":"miri64"}}