{"action":"created","comment":{"url":"https://api.github.com/repos/gwsystems/composite/pulls/comments/178529553","pull_request_review_id":108598124,"id":178529553,"diff_hunk":"@@ -65,3 +65,35 @@ memmgr_shared_page_map_cserialized(vaddr_t *pgaddr, int *unused, int idx)\n done:\n \treturn num_pages;\n }\n+\n+/* These functions return the address at which the gs register is set to */\n+void *\n+memmgr_tls_alloc(unsigned int dst_tid)","path":"src/components/implementation/capmgr/naive/mem_mgr.c","position":7,"original_position":7,"commit_id":"a1a4510935d6e88f9eff5a060d7117ebbabebccc","original_commit_id":"a1a4510935d6e88f9eff5a060d7117ebbabebccc","user":{"login":"RobertGiff","id":5796818,"avatar_url":"https://avatars3.githubusercontent.com/u/5796818?v=4","gravatar_id":"","url":"https://api.github.com/users/RobertGiff","html_url":"https://github.com/RobertGiff","followers_url":"https://api.github.com/users/RobertGiff/followers","following_url":"https://api.github.com/users/RobertGiff/following{/other_user}","gists_url":"https://api.github.com/users/RobertGiff/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertGiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertGiff/subscriptions","organizations_url":"https://api.github.com/users/RobertGiff/orgs","repos_url":"https://api.github.com/users/RobertGiff/repos","events_url":"https://api.github.com/users/RobertGiff/events{/privacy}","received_events_url":"https://api.github.com/users/RobertGiff/received_events","type":"User","site_admin":false},"body":"\"Shouldn't we check if the client (calling) component has been initialized with capmgr ??\" - We should, do you have an example of where we do that currently?\r\n\r\nThe name choice of alloc is bad.\r\n","created_at":"2018-04-02T11:39:00Z","updated_at":"2018-04-02T11:39:00Z","html_url":"https://github.com/gwsystems/composite/pull/341#discussion_r178529553","pull_request_url":"https://api.github.com/repos/gwsystems/composite/pulls/341","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gwsystems/composite/pulls/comments/178529553"},"html":{"href":"https://github.com/gwsystems/composite/pull/341#discussion_r178529553"},"pull_request":{"href":"https://api.github.com/repos/gwsystems/composite/pulls/341"}},"in_reply_to_id":178481398},"pull_request":{"url":"https://api.github.com/repos/gwsystems/composite/pulls/341","id":177920955,"html_url":"https://github.com/gwsystems/composite/pull/341","diff_url":"https://github.com/gwsystems/composite/pull/341.diff","patch_url":"https://github.com/gwsystems/composite/pull/341.patch","issue_url":"https://api.github.com/repos/gwsystems/composite/issues/341","number":341,"state":"open","locked":false,"title":"Enable tls management through capmgr component","user":{"login":"RobertGiff","id":5796818,"avatar_url":"https://avatars3.githubusercontent.com/u/5796818?v=4","gravatar_id":"","url":"https://api.github.com/users/RobertGiff","html_url":"https://github.com/RobertGiff","followers_url":"https://api.github.com/users/RobertGiff/followers","following_url":"https://api.github.com/users/RobertGiff/following{/other_user}","gists_url":"https://api.github.com/users/RobertGiff/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertGiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertGiff/subscriptions","organizations_url":"https://api.github.com/users/RobertGiff/orgs","repos_url":"https://api.github.com/users/RobertGiff/repos","events_url":"https://api.github.com/users/RobertGiff/events{/privacy}","received_events_url":"https://api.github.com/users/RobertGiff/received_events","type":"User","site_admin":false},"body":"### Summary of this Pull Request (PR)\r\n\r\nThis PR adds tls management to the capmgr component. Upon boot, the capmgr component maps a tls region for every possible thread in the system. Each thread, (identified with thread id), has a virtual address offset from 0x7000... where there will be guaranteed mapped pages. Each component has different mapped pages into this region. There are two interfaces which other components can manage their tls regions. The first simply returns the virtual address at which the component has its TLS range. This lets components like the rumpkernel who already manage their own tls continue to do this with minimal changes. Capmgr component tls management for the RK is debugged and will be coming in a later PR. The second interface included in this PR is for components to set the current running thread tls region. This enables components that need Rust and other tls related necessities to easily set up their tls region when needed. **This second interface has not yet been debugged for use with Rust.** I will be working with @maloneya to debug when he begins using this for his Rust components.\r\n\r\n### Intent for your PR\r\n\r\nChoose one (Mandatory):\r\n\r\n- [ ] This PR is for a code-review and is intended to get feedback, but not to be pulled yet.\r\n- [X] This PR is mature, and ready to be integrated into the repo.\r\n\r\n### Reviewers (Mandatory):\r\n@gparmer, @Others, @phanikishoreg \r\n\r\n### Code Quality\r\n\r\nAs part of this pull request, I've considered the following:\r\n\r\n[Style](https://github.com/gparmer/composite/raw/ppos/doc/style_guide/composite_coding_style.pdf):\r\n\r\n- [X] Comments adhere to the Style Guide (SG)\r\n- [X] Spacing adhere's to the SG\r\n- [X] Naming adhere's to the SG\r\n- [X] All other aspects of the SG are adhered to, or exceptions are justified in this pull request\r\n- [ ] I have run the auto formatter on my code before submitting this PR (see doc/auto_formatter.md for instructions)\r\n\r\n[Code Craftsmanship](http://www2.seas.gwu.edu/~gparmer/posts/2016-03-07-code-craftsmanship.html):\r\n\r\n- [X] I've made an attempt to remove all redundant code\r\n- [X] I've considered ways in which my changes might impact existing code, and cleaned it up\r\n- [X] I've formatted the code in an effort to make it easier to read (proper error handling, function use, etc...)\r\n- [X] I've commented appropriately where code is tricky\r\n- [X] I agree that there is no \"throw-away\" code, and that code in this PR is of high quality\r\n\r\n### Testing\r\n\r\nI've tested the code using the following test programs (provide list here):\r\n\r\n- rumpkern_boot.sh\r\n- llbooter_pong.sh\r\n- llbooter_test.sh\r\n- micro_boot.sh\r\n- unit_capmgrtest.sh\r\n- unit_hierschedcomps.sh\r\n- unit_schedcomp.sh\r\n- unit_schedtests.sh\r\n","created_at":"2018-03-28T03:31:20Z","updated_at":"2018-04-02T11:39:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"674c20d36df0264d6128781a1c41c37a817d3fae","assignee":{"login":"RobertGiff","id":5796818,"avatar_url":"https://avatars3.githubusercontent.com/u/5796818?v=4","gravatar_id":"","url":"https://api.github.com/users/RobertGiff","html_url":"https://github.com/RobertGiff","followers_url":"https://api.github.com/users/RobertGiff/followers","following_url":"https://api.github.com/users/RobertGiff/following{/other_user}","gists_url":"https://api.github.com/users/RobertGiff/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertGiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertGiff/subscriptions","organizations_url":"https://api.github.com/users/RobertGiff/orgs","repos_url":"https://api.github.com/users/RobertGiff/repos","events_url":"https://api.github.com/users/RobertGiff/events{/privacy}","received_events_url":"https://api.github.com/users/RobertGiff/received_events","type":"User","site_admin":false},"assignees":[{"login":"RobertGiff","id":5796818,"avatar_url":"https://avatars3.githubusercontent.com/u/5796818?v=4","gravatar_id":"","url":"https://api.github.com/users/RobertGiff","html_url":"https://github.com/RobertGiff","followers_url":"https://api.github.com/users/RobertGiff/followers","following_url":"https://api.github.com/users/RobertGiff/following{/other_user}","gists_url":"https://api.github.com/users/RobertGiff/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertGiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertGiff/subscriptions","organizations_url":"https://api.github.com/users/RobertGiff/orgs","repos_url":"https://api.github.com/users/RobertGiff/repos","events_url":"https://api.github.com/users/RobertGiff/events{/privacy}","received_events_url":"https://api.github.com/users/RobertGiff/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"gparmer","id":454733,"avatar_url":"https://avatars0.githubusercontent.com/u/454733?v=4","gravatar_id":"","url":"https://api.github.com/users/gparmer","html_url":"https://github.com/gparmer","followers_url":"https://api.github.com/users/gparmer/followers","following_url":"https://api.github.com/users/gparmer/following{/other_user}","gists_url":"https://api.github.com/users/gparmer/gists{/gist_id}","starred_url":"https://api.github.com/users/gparmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gparmer/subscriptions","organizations_url":"https://api.github.com/users/gparmer/orgs","repos_url":"https://api.github.com/users/gparmer/repos","events_url":"https://api.github.com/users/gparmer/events{/privacy}","received_events_url":"https://api.github.com/users/gparmer/received_events","type":"User","site_admin":false},{"login":"Others","id":6342225,"avatar_url":"https://avatars0.githubusercontent.com/u/6342225?v=4","gravatar_id":"","url":"https://api.github.com/users/Others","html_url":"https://github.com/Others","followers_url":"https://api.github.com/users/Others/followers","following_url":"https://api.github.com/users/Others/following{/other_user}","gists_url":"https://api.github.com/users/Others/gists{/gist_id}","starred_url":"https://api.github.com/users/Others/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Others/subscriptions","organizations_url":"https://api.github.com/users/Others/orgs","repos_url":"https://api.github.com/users/Others/repos","events_url":"https://api.github.com/users/Others/events{/privacy}","received_events_url":"https://api.github.com/users/Others/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gwsystems/composite/pulls/341/commits","review_comments_url":"https://api.github.com/repos/gwsystems/composite/pulls/341/comments","review_comment_url":"https://api.github.com/repos/gwsystems/composite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gwsystems/composite/issues/341/comments","statuses_url":"https://api.github.com/repos/gwsystems/composite/statuses/a1a4510935d6e88f9eff5a060d7117ebbabebccc","head":{"label":"RobertGiff:ppos-tls","ref":"ppos-tls","sha":"a1a4510935d6e88f9eff5a060d7117ebbabebccc","user":{"login":"RobertGiff","id":5796818,"avatar_url":"https://avatars3.githubusercontent.com/u/5796818?v=4","gravatar_id":"","url":"https://api.github.com/users/RobertGiff","html_url":"https://github.com/RobertGiff","followers_url":"https://api.github.com/users/RobertGiff/followers","following_url":"https://api.github.com/users/RobertGiff/following{/other_user}","gists_url":"https://api.github.com/users/RobertGiff/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertGiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertGiff/subscriptions","organizations_url":"https://api.github.com/users/RobertGiff/orgs","repos_url":"https://api.github.com/users/RobertGiff/repos","events_url":"https://api.github.com/users/RobertGiff/events{/privacy}","received_events_url":"https://api.github.com/users/RobertGiff/received_events","type":"User","site_admin":false},"repo":{"id":38386076,"name":"Composite","full_name":"RobertGiff/Composite","owner":{"login":"RobertGiff","id":5796818,"avatar_url":"https://avatars3.githubusercontent.com/u/5796818?v=4","gravatar_id":"","url":"https://api.github.com/users/RobertGiff","html_url":"https://github.com/RobertGiff","followers_url":"https://api.github.com/users/RobertGiff/followers","following_url":"https://api.github.com/users/RobertGiff/following{/other_user}","gists_url":"https://api.github.com/users/RobertGiff/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertGiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertGiff/subscriptions","organizations_url":"https://api.github.com/users/RobertGiff/orgs","repos_url":"https://api.github.com/users/RobertGiff/repos","events_url":"https://api.github.com/users/RobertGiff/events{/privacy}","received_events_url":"https://api.github.com/users/RobertGiff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RobertGiff/Composite","description":"A component-based OS","fork":true,"url":"https://api.github.com/repos/RobertGiff/Composite","forks_url":"https://api.github.com/repos/RobertGiff/Composite/forks","keys_url":"https://api.github.com/repos/RobertGiff/Composite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RobertGiff/Composite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RobertGiff/Composite/teams","hooks_url":"https://api.github.com/repos/RobertGiff/Composite/hooks","issue_events_url":"https://api.github.com/repos/RobertGiff/Composite/issues/events{/number}","events_url":"https://api.github.com/repos/RobertGiff/Composite/events","assignees_url":"https://api.github.com/repos/RobertGiff/Composite/assignees{/user}","branches_url":"https://api.github.com/repos/RobertGiff/Composite/branches{/branch}","tags_url":"https://api.github.com/repos/RobertGiff/Composite/tags","blobs_url":"https://api.github.com/repos/RobertGiff/Composite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RobertGiff/Composite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RobertGiff/Composite/git/refs{/sha}","trees_url":"https://api.github.com/repos/RobertGiff/Composite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RobertGiff/Composite/statuses/{sha}","languages_url":"https://api.github.com/repos/RobertGiff/Composite/languages","stargazers_url":"https://api.github.com/repos/RobertGiff/Composite/stargazers","contributors_url":"https://api.github.com/repos/RobertGiff/Composite/contributors","subscribers_url":"https://api.github.com/repos/RobertGiff/Composite/subscribers","subscription_url":"https://api.github.com/repos/RobertGiff/Composite/subscription","commits_url":"https://api.github.com/repos/RobertGiff/Composite/commits{/sha}","git_commits_url":"https://api.github.com/repos/RobertGiff/Composite/git/commits{/sha}","comments_url":"https://api.github.com/repos/RobertGiff/Composite/comments{/number}","issue_comment_url":"https://api.github.com/repos/RobertGiff/Composite/issues/comments{/number}","contents_url":"https://api.github.com/repos/RobertGiff/Composite/contents/{+path}","compare_url":"https://api.github.com/repos/RobertGiff/Composite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RobertGiff/Composite/merges","archive_url":"https://api.github.com/repos/RobertGiff/Composite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RobertGiff/Composite/downloads","issues_url":"https://api.github.com/repos/RobertGiff/Composite/issues{/number}","pulls_url":"https://api.github.com/repos/RobertGiff/Composite/pulls{/number}","milestones_url":"https://api.github.com/repos/RobertGiff/Composite/milestones{/number}","notifications_url":"https://api.github.com/repos/RobertGiff/Composite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RobertGiff/Composite/labels{/name}","releases_url":"https://api.github.com/repos/RobertGiff/Composite/releases{/id}","deployments_url":"https://api.github.com/repos/RobertGiff/Composite/deployments","created_at":"2015-07-01T17:52:31Z","updated_at":"2017-09-05T01:33:56Z","pushed_at":"2018-03-29T15:40:47Z","git_url":"git://github.com/RobertGiff/Composite.git","ssh_url":"git@github.com:RobertGiff/Composite.git","clone_url":"https://github.com/RobertGiff/Composite.git","svn_url":"https://github.com/RobertGiff/Composite","homepage":"composite.seas.gwu.edu","size":24338,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"ppos"}},"base":{"label":"gwsystems:ppos","ref":"ppos","sha":"7e888bde02961a6379ddb331299522c5b2b2f7ec","user":{"login":"gwsystems","id":24600102,"avatar_url":"https://avatars2.githubusercontent.com/u/24600102?v=4","gravatar_id":"","url":"https://api.github.com/users/gwsystems","html_url":"https://github.com/gwsystems","followers_url":"https://api.github.com/users/gwsystems/followers","following_url":"https://api.github.com/users/gwsystems/following{/other_user}","gists_url":"https://api.github.com/users/gwsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/gwsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwsystems/subscriptions","organizations_url":"https://api.github.com/users/gwsystems/orgs","repos_url":"https://api.github.com/users/gwsystems/repos","events_url":"https://api.github.com/users/gwsystems/events{/privacy}","received_events_url":"https://api.github.com/users/gwsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":3140667,"name":"composite","full_name":"gwsystems/composite","owner":{"login":"gwsystems","id":24600102,"avatar_url":"https://avatars2.githubusercontent.com/u/24600102?v=4","gravatar_id":"","url":"https://api.github.com/users/gwsystems","html_url":"https://github.com/gwsystems","followers_url":"https://api.github.com/users/gwsystems/followers","following_url":"https://api.github.com/users/gwsystems/following{/other_user}","gists_url":"https://api.github.com/users/gwsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/gwsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwsystems/subscriptions","organizations_url":"https://api.github.com/users/gwsystems/orgs","repos_url":"https://api.github.com/users/gwsystems/repos","events_url":"https://api.github.com/users/gwsystems/events{/privacy}","received_events_url":"https://api.github.com/users/gwsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gwsystems/composite","description":"A component-based OS","fork":false,"url":"https://api.github.com/repos/gwsystems/composite","forks_url":"https://api.github.com/repos/gwsystems/composite/forks","keys_url":"https://api.github.com/repos/gwsystems/composite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gwsystems/composite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gwsystems/composite/teams","hooks_url":"https://api.github.com/repos/gwsystems/composite/hooks","issue_events_url":"https://api.github.com/repos/gwsystems/composite/issues/events{/number}","events_url":"https://api.github.com/repos/gwsystems/composite/events","assignees_url":"https://api.github.com/repos/gwsystems/composite/assignees{/user}","branches_url":"https://api.github.com/repos/gwsystems/composite/branches{/branch}","tags_url":"https://api.github.com/repos/gwsystems/composite/tags","blobs_url":"https://api.github.com/repos/gwsystems/composite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gwsystems/composite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gwsystems/composite/git/refs{/sha}","trees_url":"https://api.github.com/repos/gwsystems/composite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gwsystems/composite/statuses/{sha}","languages_url":"https://api.github.com/repos/gwsystems/composite/languages","stargazers_url":"https://api.github.com/repos/gwsystems/composite/stargazers","contributors_url":"https://api.github.com/repos/gwsystems/composite/contributors","subscribers_url":"https://api.github.com/repos/gwsystems/composite/subscribers","subscription_url":"https://api.github.com/repos/gwsystems/composite/subscription","commits_url":"https://api.github.com/repos/gwsystems/composite/commits{/sha}","git_commits_url":"https://api.github.com/repos/gwsystems/composite/git/commits{/sha}","comments_url":"https://api.github.com/repos/gwsystems/composite/comments{/number}","issue_comment_url":"https://api.github.com/repos/gwsystems/composite/issues/comments{/number}","contents_url":"https://api.github.com/repos/gwsystems/composite/contents/{+path}","compare_url":"https://api.github.com/repos/gwsystems/composite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gwsystems/composite/merges","archive_url":"https://api.github.com/repos/gwsystems/composite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gwsystems/composite/downloads","issues_url":"https://api.github.com/repos/gwsystems/composite/issues{/number}","pulls_url":"https://api.github.com/repos/gwsystems/composite/pulls{/number}","milestones_url":"https://api.github.com/repos/gwsystems/composite/milestones{/number}","notifications_url":"https://api.github.com/repos/gwsystems/composite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gwsystems/composite/labels{/name}","releases_url":"https://api.github.com/repos/gwsystems/composite/releases{/id}","deployments_url":"https://api.github.com/repos/gwsystems/composite/deployments","created_at":"2012-01-09T22:20:27Z","updated_at":"2018-03-30T23:29:01Z","pushed_at":"2018-04-02T04:41:56Z","git_url":"git://github.com/gwsystems/composite.git","ssh_url":"git@github.com:gwsystems/composite.git","clone_url":"https://github.com/gwsystems/composite.git","svn_url":"https://github.com/gwsystems/composite","homepage":"composite.seas.gwu.edu","size":25959,"stargazers_count":63,"watchers_count":63,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"archived":false,"open_issues_count":83,"license":null,"forks":41,"open_issues":83,"watchers":63,"default_branch":"ppos"}},"_links":{"self":{"href":"https://api.github.com/repos/gwsystems/composite/pulls/341"},"html":{"href":"https://github.com/gwsystems/composite/pull/341"},"issue":{"href":"https://api.github.com/repos/gwsystems/composite/issues/341"},"comments":{"href":"https://api.github.com/repos/gwsystems/composite/issues/341/comments"},"review_comments":{"href":"https://api.github.com/repos/gwsystems/composite/pulls/341/comments"},"review_comment":{"href":"https://api.github.com/repos/gwsystems/composite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gwsystems/composite/pulls/341/commits"},"statuses":{"href":"https://api.github.com/repos/gwsystems/composite/statuses/a1a4510935d6e88f9eff5a060d7117ebbabebccc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"RobertGiff"}}