{"action":"created","comment":{"url":"https://api.github.com/repos/tock/tock/pulls/comments/207257584","pull_request_review_id":142832241,"id":207257584,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzI1NzU4NA==","diff_hunk":"@@ -84,6 +69,130 @@ pub unsafe fn load_processes(\n     }\n }\n \n+/// This trait is implemented by process structs.\n+pub trait ProcessType {\n+    /// Queue a callback for the process. This will be added to a per-process\n+    /// buffer and passed to the process by the scheduler.\n+    fn schedule(&self, callback: FunctionCall) -> bool;\n+\n+    /// Queue an IPC operation for this process.\n+    fn schedule_ipc(&self, from: AppId, cb_type: IPCType);\n+\n+    /// Remove the scheduled operation from the front of the queue.\n+    fn unschedule(&self) -> Option<Task>;\n+\n+    /// Returns the current state of the process. Common states are \"running\" or\n+    /// \"yielded\".\n+    fn current_state(&self) -> State;\n+\n+    /// Move this process from the running state to the yield state.\n+    fn yield_state(&self);\n+\n+    /// Put this process in the fault state. This will trigger the\n+    /// `FaultResponse` for this process to occur.\n+    unsafe fn fault_state(&self);\n+\n+    /// Get the name of the process. Used for IPC.\n+    fn get_package_name(&self) -> &[u8];","path":"kernel/src/process.rs","position":98,"original_position":98,"commit_id":"285543a3812559cb23aec1888821fb653c2bfa74","original_commit_id":"285543a3812559cb23aec1888821fb653c2bfa74","user":{"login":"alevy","id":4689,"node_id":"MDQ6VXNlcjQ2ODk=","avatar_url":"https://avatars1.githubusercontent.com/u/4689?v=4","gravatar_id":"","url":"https://api.github.com/users/alevy","html_url":"https://github.com/alevy","followers_url":"https://api.github.com/users/alevy/followers","following_url":"https://api.github.com/users/alevy/following{/other_user}","gists_url":"https://api.github.com/users/alevy/gists{/gist_id}","starred_url":"https://api.github.com/users/alevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alevy/subscriptions","organizations_url":"https://api.github.com/users/alevy/orgs","repos_url":"https://api.github.com/users/alevy/repos","events_url":"https://api.github.com/users/alevy/events{/privacy}","received_events_url":"https://api.github.com/users/alevy/received_events","type":"User","site_admin":false},"body":"I don't think so","created_at":"2018-08-02T14:52:50Z","updated_at":"2018-08-02T14:52:51Z","html_url":"https://github.com/tock/tock/pull/1113#discussion_r207257584","pull_request_url":"https://api.github.com/repos/tock/tock/pulls/1113","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/tock/tock/pulls/comments/207257584"},"html":{"href":"https://github.com/tock/tock/pull/1113#discussion_r207257584"},"pull_request":{"href":"https://api.github.com/repos/tock/tock/pulls/1113"}},"in_reply_to_id":207091746},"pull_request":{"url":"https://api.github.com/repos/tock/tock/pulls/1113","id":201166738,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMTY2NzM4","html_url":"https://github.com/tock/tock/pull/1113","diff_url":"https://github.com/tock/tock/pull/1113.diff","patch_url":"https://github.com/tock/tock/pull/1113.patch","issue_url":"https://api.github.com/repos/tock/tock/issues/1113","number":1113,"state":"open","locked":false,"title":"Move architecture-dependent syscall code to arch/cortex-m","user":{"login":"bradjc","id":1467890,"node_id":"MDQ6VXNlcjE0Njc4OTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1467890?v=4","gravatar_id":"","url":"https://api.github.com/users/bradjc","html_url":"https://github.com/bradjc","followers_url":"https://api.github.com/users/bradjc/followers","following_url":"https://api.github.com/users/bradjc/following{/other_user}","gists_url":"https://api.github.com/users/bradjc/gists{/gist_id}","starred_url":"https://api.github.com/users/bradjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradjc/subscriptions","organizations_url":"https://api.github.com/users/bradjc/orgs","repos_url":"https://api.github.com/users/bradjc/repos","events_url":"https://api.github.com/users/bradjc/events{/privacy}","received_events_url":"https://api.github.com/users/bradjc/received_events","type":"User","site_admin":false},"body":"### Pull Request Overview\r\n\r\nThis pull request moves all of the code that is cortex-m syscall specific out of process.rs and into the cortex-m crate. This is part of #985.\r\n\r\nIt does this by:\r\n- Making a new `SyscallInterface` trait that is implemented in the cortex-m crate. Each process has a reference to the implementing struct.\r\n- Making a new `ProcessType` trait that all process types implement (right now we only have one, `Process` in process.rs). This allows the `Process` struct to be templated over the `SyscallInterface` type while the `processes` array in the `Kernel` struct keeps an array of `ProcessType` implementations:\r\n\r\n    ```rust\r\n    Kernel {\r\n        processes: &'static [Option<&'static process::ProcessType>]\r\n    }\r\n    ```\r\n\r\n    which means the template parameter stays only in the process.rs file and does not spread to all of Tock.\r\n    \r\nThe panic! prints in process.rs are partially commented out because they relied on many architecture-specific fields. Also the `SCB_REGISTERS` global static variable still exists. Moving those to the cortex-m crate is forthcoming in a different PR.\r\n\r\nThis is blocked on #1111.\r\n\r\n### Testing Strategy\r\n\r\nHail on Hail, but needs more.\r\n\r\n\r\n### TODO or Help Wanted\r\nn/a\r\n\r\n\r\n### Documentation Updated\r\n\r\n- [x] Updated the relevant files in `/docs`, or no updates are required.\r\n\r\n### Formatting\r\n\r\n- [x] Ran `make formatall`.\r\n","created_at":"2018-07-13T01:38:17Z","updated_at":"2018-08-02T14:52:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e50b371bb919b536c2906da541bae32ebd8d6b34","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":820349457,"node_id":"MDU6TGFiZWw4MjAzNDk0NTc=","url":"https://api.github.com/repos/tock/tock/labels/P-Significant","name":"P-Significant","color":"a80a31","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/tock/tock/pulls/1113/commits","review_comments_url":"https://api.github.com/repos/tock/tock/pulls/1113/comments","review_comment_url":"https://api.github.com/repos/tock/tock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tock/tock/issues/1113/comments","statuses_url":"https://api.github.com/repos/tock/tock/statuses/285543a3812559cb23aec1888821fb653c2bfa74","head":{"label":"tock:arch-agnostic5","ref":"arch-agnostic5","sha":"285543a3812559cb23aec1888821fb653c2bfa74","user":{"login":"tock","id":34076064,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc2MDY0","avatar_url":"https://avatars1.githubusercontent.com/u/34076064?v=4","gravatar_id":"","url":"https://api.github.com/users/tock","html_url":"https://github.com/tock","followers_url":"https://api.github.com/users/tock/followers","following_url":"https://api.github.com/users/tock/following{/other_user}","gists_url":"https://api.github.com/users/tock/gists{/gist_id}","starred_url":"https://api.github.com/users/tock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tock/subscriptions","organizations_url":"https://api.github.com/users/tock/orgs","repos_url":"https://api.github.com/users/tock/repos","events_url":"https://api.github.com/users/tock/events{/privacy}","received_events_url":"https://api.github.com/users/tock/received_events","type":"Organization","site_admin":false},"repo":{"id":36428094,"node_id":"MDEwOlJlcG9zaXRvcnkzNjQyODA5NA==","name":"tock","full_name":"tock/tock","owner":{"login":"tock","id":34076064,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc2MDY0","avatar_url":"https://avatars1.githubusercontent.com/u/34076064?v=4","gravatar_id":"","url":"https://api.github.com/users/tock","html_url":"https://github.com/tock","followers_url":"https://api.github.com/users/tock/followers","following_url":"https://api.github.com/users/tock/following{/other_user}","gists_url":"https://api.github.com/users/tock/gists{/gist_id}","starred_url":"https://api.github.com/users/tock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tock/subscriptions","organizations_url":"https://api.github.com/users/tock/orgs","repos_url":"https://api.github.com/users/tock/repos","events_url":"https://api.github.com/users/tock/events{/privacy}","received_events_url":"https://api.github.com/users/tock/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tock/tock","description":"A secure embedded operating system for Cortex-M based microcontrollers","fork":false,"url":"https://api.github.com/repos/tock/tock","forks_url":"https://api.github.com/repos/tock/tock/forks","keys_url":"https://api.github.com/repos/tock/tock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tock/tock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tock/tock/teams","hooks_url":"https://api.github.com/repos/tock/tock/hooks","issue_events_url":"https://api.github.com/repos/tock/tock/issues/events{/number}","events_url":"https://api.github.com/repos/tock/tock/events","assignees_url":"https://api.github.com/repos/tock/tock/assignees{/user}","branches_url":"https://api.github.com/repos/tock/tock/branches{/branch}","tags_url":"https://api.github.com/repos/tock/tock/tags","blobs_url":"https://api.github.com/repos/tock/tock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tock/tock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tock/tock/git/refs{/sha}","trees_url":"https://api.github.com/repos/tock/tock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tock/tock/statuses/{sha}","languages_url":"https://api.github.com/repos/tock/tock/languages","stargazers_url":"https://api.github.com/repos/tock/tock/stargazers","contributors_url":"https://api.github.com/repos/tock/tock/contributors","subscribers_url":"https://api.github.com/repos/tock/tock/subscribers","subscription_url":"https://api.github.com/repos/tock/tock/subscription","commits_url":"https://api.github.com/repos/tock/tock/commits{/sha}","git_commits_url":"https://api.github.com/repos/tock/tock/git/commits{/sha}","comments_url":"https://api.github.com/repos/tock/tock/comments{/number}","issue_comment_url":"https://api.github.com/repos/tock/tock/issues/comments{/number}","contents_url":"https://api.github.com/repos/tock/tock/contents/{+path}","compare_url":"https://api.github.com/repos/tock/tock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tock/tock/merges","archive_url":"https://api.github.com/repos/tock/tock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tock/tock/downloads","issues_url":"https://api.github.com/repos/tock/tock/issues{/number}","pulls_url":"https://api.github.com/repos/tock/tock/pulls{/number}","milestones_url":"https://api.github.com/repos/tock/tock/milestones{/number}","notifications_url":"https://api.github.com/repos/tock/tock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tock/tock/labels{/name}","releases_url":"https://api.github.com/repos/tock/tock/releases{/id}","deployments_url":"https://api.github.com/repos/tock/tock/deployments","created_at":"2015-05-28T09:26:47Z","updated_at":"2018-08-02T13:59:54Z","pushed_at":"2018-08-02T03:48:06Z","git_url":"git://github.com/tock/tock.git","ssh_url":"git@github.com:tock/tock.git","clone_url":"https://github.com/tock/tock.git","svn_url":"https://github.com/tock/tock","homepage":"https://www.tockos.org","size":136204,"stargazers_count":954,"watchers_count":954,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":120,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":120,"open_issues":59,"watchers":954,"default_branch":"master"}},"base":{"label":"tock:master","ref":"master","sha":"818931da80436b36cee438fb5e28f7fba6b72b59","user":{"login":"tock","id":34076064,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc2MDY0","avatar_url":"https://avatars1.githubusercontent.com/u/34076064?v=4","gravatar_id":"","url":"https://api.github.com/users/tock","html_url":"https://github.com/tock","followers_url":"https://api.github.com/users/tock/followers","following_url":"https://api.github.com/users/tock/following{/other_user}","gists_url":"https://api.github.com/users/tock/gists{/gist_id}","starred_url":"https://api.github.com/users/tock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tock/subscriptions","organizations_url":"https://api.github.com/users/tock/orgs","repos_url":"https://api.github.com/users/tock/repos","events_url":"https://api.github.com/users/tock/events{/privacy}","received_events_url":"https://api.github.com/users/tock/received_events","type":"Organization","site_admin":false},"repo":{"id":36428094,"node_id":"MDEwOlJlcG9zaXRvcnkzNjQyODA5NA==","name":"tock","full_name":"tock/tock","owner":{"login":"tock","id":34076064,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc2MDY0","avatar_url":"https://avatars1.githubusercontent.com/u/34076064?v=4","gravatar_id":"","url":"https://api.github.com/users/tock","html_url":"https://github.com/tock","followers_url":"https://api.github.com/users/tock/followers","following_url":"https://api.github.com/users/tock/following{/other_user}","gists_url":"https://api.github.com/users/tock/gists{/gist_id}","starred_url":"https://api.github.com/users/tock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tock/subscriptions","organizations_url":"https://api.github.com/users/tock/orgs","repos_url":"https://api.github.com/users/tock/repos","events_url":"https://api.github.com/users/tock/events{/privacy}","received_events_url":"https://api.github.com/users/tock/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tock/tock","description":"A secure embedded operating system for Cortex-M based microcontrollers","fork":false,"url":"https://api.github.com/repos/tock/tock","forks_url":"https://api.github.com/repos/tock/tock/forks","keys_url":"https://api.github.com/repos/tock/tock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tock/tock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tock/tock/teams","hooks_url":"https://api.github.com/repos/tock/tock/hooks","issue_events_url":"https://api.github.com/repos/tock/tock/issues/events{/number}","events_url":"https://api.github.com/repos/tock/tock/events","assignees_url":"https://api.github.com/repos/tock/tock/assignees{/user}","branches_url":"https://api.github.com/repos/tock/tock/branches{/branch}","tags_url":"https://api.github.com/repos/tock/tock/tags","blobs_url":"https://api.github.com/repos/tock/tock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tock/tock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tock/tock/git/refs{/sha}","trees_url":"https://api.github.com/repos/tock/tock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tock/tock/statuses/{sha}","languages_url":"https://api.github.com/repos/tock/tock/languages","stargazers_url":"https://api.github.com/repos/tock/tock/stargazers","contributors_url":"https://api.github.com/repos/tock/tock/contributors","subscribers_url":"https://api.github.com/repos/tock/tock/subscribers","subscription_url":"https://api.github.com/repos/tock/tock/subscription","commits_url":"https://api.github.com/repos/tock/tock/commits{/sha}","git_commits_url":"https://api.github.com/repos/tock/tock/git/commits{/sha}","comments_url":"https://api.github.com/repos/tock/tock/comments{/number}","issue_comment_url":"https://api.github.com/repos/tock/tock/issues/comments{/number}","contents_url":"https://api.github.com/repos/tock/tock/contents/{+path}","compare_url":"https://api.github.com/repos/tock/tock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tock/tock/merges","archive_url":"https://api.github.com/repos/tock/tock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tock/tock/downloads","issues_url":"https://api.github.com/repos/tock/tock/issues{/number}","pulls_url":"https://api.github.com/repos/tock/tock/pulls{/number}","milestones_url":"https://api.github.com/repos/tock/tock/milestones{/number}","notifications_url":"https://api.github.com/repos/tock/tock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tock/tock/labels{/name}","releases_url":"https://api.github.com/repos/tock/tock/releases{/id}","deployments_url":"https://api.github.com/repos/tock/tock/deployments","created_at":"2015-05-28T09:26:47Z","updated_at":"2018-08-02T13:59:54Z","pushed_at":"2018-08-02T03:48:06Z","git_url":"git://github.com/tock/tock.git","ssh_url":"git@github.com:tock/tock.git","clone_url":"https://github.com/tock/tock.git","svn_url":"https://github.com/tock/tock","homepage":"https://www.tockos.org","size":136204,"stargazers_count":954,"watchers_count":954,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":120,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":120,"open_issues":59,"watchers":954,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tock/tock/pulls/1113"},"html":{"href":"https://github.com/tock/tock/pull/1113"},"issue":{"href":"https://api.github.com/repos/tock/tock/issues/1113"},"comments":{"href":"https://api.github.com/repos/tock/tock/issues/1113/comments"},"review_comments":{"href":"https://api.github.com/repos/tock/tock/pulls/1113/comments"},"review_comment":{"href":"https://api.github.com/repos/tock/tock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tock/tock/pulls/1113/commits"},"statuses":{"href":"https://api.github.com/repos/tock/tock/statuses/285543a3812559cb23aec1888821fb653c2bfa74"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alevy"}}