{"action":"created","issue":{"url":"https://api.github.com/repos/nanvix/microkernel/issues/10","repository_url":"https://api.github.com/repos/nanvix/microkernel","labels_url":"https://api.github.com/repos/nanvix/microkernel/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/nanvix/microkernel/issues/10/comments","events_url":"https://api.github.com/repos/nanvix/microkernel/issues/10/events","html_url":"https://github.com/nanvix/microkernel/issues/10","id":330725688,"node_id":"MDU6SXNzdWUzMzA3MjU2ODg=","number":10,"title":"Query Running Core ID at Runtime","user":{"login":"ppenna","id":4939789,"node_id":"MDQ6VXNlcjQ5Mzk3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/4939789?v=4","gravatar_id":"","url":"https://api.github.com/users/ppenna","html_url":"https://github.com/ppenna","followers_url":"https://api.github.com/users/ppenna/followers","following_url":"https://api.github.com/users/ppenna/following{/other_user}","gists_url":"https://api.github.com/users/ppenna/gists{/gist_id}","starred_url":"https://api.github.com/users/ppenna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppenna/subscriptions","organizations_url":"https://api.github.com/users/ppenna/orgs","repos_url":"https://api.github.com/users/ppenna/repos","events_url":"https://api.github.com/users/ppenna/events{/privacy}","received_events_url":"https://api.github.com/users/ppenna/received_events","type":"User","site_admin":false},"labels":[{"id":937628218,"node_id":"MDU6TGFiZWw5Mzc2MjgyMTg=","url":"https://api.github.com/repos/nanvix/microkernel/labels/enhancement","name":"enhancement","color":"0052cc","default":true}],"state":"open","locked":false,"assignee":{"login":"ppenna","id":4939789,"node_id":"MDQ6VXNlcjQ5Mzk3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/4939789?v=4","gravatar_id":"","url":"https://api.github.com/users/ppenna","html_url":"https://github.com/ppenna","followers_url":"https://api.github.com/users/ppenna/followers","following_url":"https://api.github.com/users/ppenna/following{/other_user}","gists_url":"https://api.github.com/users/ppenna/gists{/gist_id}","starred_url":"https://api.github.com/users/ppenna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppenna/subscriptions","organizations_url":"https://api.github.com/users/ppenna/orgs","repos_url":"https://api.github.com/users/ppenna/repos","events_url":"https://api.github.com/users/ppenna/events{/privacy}","received_events_url":"https://api.github.com/users/ppenna/received_events","type":"User","site_admin":false},"assignees":[{"login":"ppenna","id":4939789,"node_id":"MDQ6VXNlcjQ5Mzk3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/4939789?v=4","gravatar_id":"","url":"https://api.github.com/users/ppenna","html_url":"https://github.com/ppenna","followers_url":"https://api.github.com/users/ppenna/followers","following_url":"https://api.github.com/users/ppenna/following{/other_user}","gists_url":"https://api.github.com/users/ppenna/gists{/gist_id}","starred_url":"https://api.github.com/users/ppenna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppenna/subscriptions","organizations_url":"https://api.github.com/users/ppenna/orgs","repos_url":"https://api.github.com/users/ppenna/repos","events_url":"https://api.github.com/users/ppenna/events{/privacy}","received_events_url":"https://api.github.com/users/ppenna/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/nanvix/microkernel/milestones/1","html_url":"https://github.com/nanvix/microkernel/milestone/1","labels_url":"https://api.github.com/repos/nanvix/microkernel/milestones/1/labels","id":3419319,"node_id":"MDk6TWlsZXN0b25lMzQxOTMxOQ==","number":1,"title":"Alpha Release","description":null,"creator":{"login":"ppenna","id":4939789,"node_id":"MDQ6VXNlcjQ5Mzk3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/4939789?v=4","gravatar_id":"","url":"https://api.github.com/users/ppenna","html_url":"https://github.com/ppenna","followers_url":"https://api.github.com/users/ppenna/followers","following_url":"https://api.github.com/users/ppenna/following{/other_user}","gists_url":"https://api.github.com/users/ppenna/gists{/gist_id}","starred_url":"https://api.github.com/users/ppenna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppenna/subscriptions","organizations_url":"https://api.github.com/users/ppenna/orgs","repos_url":"https://api.github.com/users/ppenna/repos","events_url":"https://api.github.com/users/ppenna/events{/privacy}","received_events_url":"https://api.github.com/users/ppenna/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":7,"state":"open","created_at":"2018-06-12T16:21:59Z","updated_at":"2018-06-12T17:13:47Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-06-08T16:34:02Z","updated_at":"2018-06-12T18:31:14Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Description**\r\n\r\nCurrently it is not possible to query the Core ID in which the thread is running on. Although `__k1_get_cpu_id()` does work for Compute Clusters, it does not for IO Clusters.\r\n\r\nWith no such feature, error-handling logic for NoC connectors becomes more complex, and even in some cases some assertions are not possible.\r\n\r\nTo avoid miss use of `__k1_get_cpu_id()` the HAL wrapper was removed in commit ece4f4e7192679c3f258f3d5dbcde99d3465e356.\r\n\r\n**Related Issues**\r\n\r\n- [Fault Injection Unit Tests for Mailboxes](https://github.com/nanvix/microkernel/issues/8): we cannot check for a bad mailbox open."},"comment":{"url":"https://api.github.com/repos/nanvix/microkernel/issues/comments/396689734","html_url":"https://github.com/nanvix/microkernel/issues/10#issuecomment-396689734","issue_url":"https://api.github.com/repos/nanvix/microkernel/issues/10","id":396689734,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjY4OTczNA==","user":{"login":"ppenna","id":4939789,"node_id":"MDQ6VXNlcjQ5Mzk3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/4939789?v=4","gravatar_id":"","url":"https://api.github.com/users/ppenna","html_url":"https://github.com/ppenna","followers_url":"https://api.github.com/users/ppenna/followers","following_url":"https://api.github.com/users/ppenna/following{/other_user}","gists_url":"https://api.github.com/users/ppenna/gists{/gist_id}","starred_url":"https://api.github.com/users/ppenna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppenna/subscriptions","organizations_url":"https://api.github.com/users/ppenna/orgs","repos_url":"https://api.github.com/users/ppenna/repos","events_url":"https://api.github.com/users/ppenna/events{/privacy}","received_events_url":"https://api.github.com/users/ppenna/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T18:31:14Z","updated_at":"2018-06-12T18:31:14Z","author_association":"CONTRIBUTOR","body":"`get_core_id()` was reintroduced in commit d5596153505a82abee4e31f4597656e3a869d596.\r\n\r\n`__k1_get_cpu_id()` odes return a good value on IO Clusters. However, the problems lies on the fact that we are using RTEMS instead of utask.\r\n\r\nSince the former runtime thus not offer multicore support, it ends ups that all threads are placed in the same core in the IO Clusters and thus they present the same core ID.\r\n\r\nSwitching to the utask library for now would be painful. Therefore, for the time being we will stick to the runtime solution introduced in commit 15ea0375f3597fd79a40922d52e3b6e8736f74de and ec91517452a754cde973ca508e57e6592741d4ae.\r\n\r\nThe overall idea is simple: whenever a thread is created, `hal_setup()` should be called. Conversely, whenever a thread terminates, it should call `hal_cleanup()`."}}
{"actor":{"display_login":"ppenna"}}