{"action":"created","comment":{"url":"https://api.github.com/repos/cahirwpz/mimiker/pulls/comments/196573096","pull_request_review_id":130153316,"id":196573096,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjU3MzA5Ng==","diff_hunk":"@@ -58,6 +58,11 @@ typedef enum {\n #define TDF_NEEDLOCK 0x00000008   /* acquire td_spin on context switch */\n #define TDF_BORROWING 0x00000010  /* priority propagation */\n #define TDF_SLEEPY 0x00000020     /* thread is about to go to sleep */\n+#define TDF_SLEEP_INT 0x00000040  /* thread is in interruptible sleep */","path":"include/thread.h","position":4,"original_position":4,"commit_id":"45f9a4892d7b0578d28faadc3227866c89d5cb00","original_commit_id":"e4c4634e916617ea6f21febb463d3d52b805457e","user":{"login":"melouber","id":24853486,"node_id":"MDQ6VXNlcjI0ODUzNDg2","avatar_url":"https://avatars3.githubusercontent.com/u/24853486?v=4","gravatar_id":"","url":"https://api.github.com/users/melouber","html_url":"https://github.com/melouber","followers_url":"https://api.github.com/users/melouber/followers","following_url":"https://api.github.com/users/melouber/following{/other_user}","gists_url":"https://api.github.com/users/melouber/gists{/gist_id}","starred_url":"https://api.github.com/users/melouber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melouber/subscriptions","organizations_url":"https://api.github.com/users/melouber/orgs","repos_url":"https://api.github.com/users/melouber/repos","events_url":"https://api.github.com/users/melouber/events{/privacy}","received_events_url":"https://api.github.com/users/melouber/received_events","type":"User","site_admin":false},"body":"I would not stick to less meaningful nomenclature.\r\nIf you like to follow other systems' names or be consistent with ours then:\r\n* in FreeBSD interruptible sleep state is called `TDF_[...]INTR`\r\n* we have `intr_disable` and `intr_enable`\r\n* we have `WITH_INTR_DISABLED`, `intr_chain_t`, and a lot of other `intr`","created_at":"2018-06-19T20:48:23Z","updated_at":"2018-06-19T20:48:23Z","html_url":"https://github.com/cahirwpz/mimiker/pull/450#discussion_r196573096","pull_request_url":"https://api.github.com/repos/cahirwpz/mimiker/pulls/450","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/cahirwpz/mimiker/pulls/comments/196573096"},"html":{"href":"https://github.com/cahirwpz/mimiker/pull/450#discussion_r196573096"},"pull_request":{"href":"https://api.github.com/repos/cahirwpz/mimiker/pulls/450"}},"in_reply_to_id":196052885},"pull_request":{"url":"https://api.github.com/repos/cahirwpz/mimiker/pulls/450","id":193801337,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzODAxMzM3","html_url":"https://github.com/cahirwpz/mimiker/pull/450","diff_url":"https://github.com/cahirwpz/mimiker/pull/450.diff","patch_url":"https://github.com/cahirwpz/mimiker/pull/450.patch","issue_url":"https://api.github.com/repos/cahirwpz/mimiker/issues/450","number":450,"state":"open","locked":false,"title":"Interruptible sleep","user":{"login":"ilikeheaps","id":17334993,"node_id":"MDQ6VXNlcjE3MzM0OTkz","avatar_url":"https://avatars3.githubusercontent.com/u/17334993?v=4","gravatar_id":"","url":"https://api.github.com/users/ilikeheaps","html_url":"https://github.com/ilikeheaps","followers_url":"https://api.github.com/users/ilikeheaps/followers","following_url":"https://api.github.com/users/ilikeheaps/following{/other_user}","gists_url":"https://api.github.com/users/ilikeheaps/gists{/gist_id}","starred_url":"https://api.github.com/users/ilikeheaps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilikeheaps/subscriptions","organizations_url":"https://api.github.com/users/ilikeheaps/orgs","repos_url":"https://api.github.com/users/ilikeheaps/repos","events_url":"https://api.github.com/users/ilikeheaps/events{/privacy}","received_events_url":"https://api.github.com/users/ilikeheaps/received_events","type":"User","site_admin":false},"body":"* add function `sleepq_wait_abortable` for sleeping with some special options (only `SLPF_INT` currently)\r\n  * it will return the cause of wake-up\r\n  * regular `sleepq_wait` has no change in semantics\r\n  * I want to use at least one more flag (for timed sleep) so that's why it appears a bit over-engineered right now\r\n* add function `sleepq_abort` to wake up a particular thread (with special reason like `SLEEPQ_WKP_INT`)\r\n  * the functions returns true if it succeeded; false otherwise (if the thread isn't sleeping or doesn't accept the reason)\r\n* use that function to wake up the target thread in `sig_send`\r\n","created_at":"2018-06-09T23:47:25Z","updated_at":"2018-06-19T20:48:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce4c4b0622eb334e5df1b12ebad7e7762bda1bdc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":505184827,"node_id":"MDU6TGFiZWw1MDUxODQ4Mjc=","url":"https://api.github.com/repos/cahirwpz/mimiker/labels/WIP","name":"WIP","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cahirwpz/mimiker/pulls/450/commits","review_comments_url":"https://api.github.com/repos/cahirwpz/mimiker/pulls/450/comments","review_comment_url":"https://api.github.com/repos/cahirwpz/mimiker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cahirwpz/mimiker/issues/450/comments","statuses_url":"https://api.github.com/repos/cahirwpz/mimiker/statuses/45f9a4892d7b0578d28faadc3227866c89d5cb00","head":{"label":"melouber:int-sleep","ref":"int-sleep","sha":"45f9a4892d7b0578d28faadc3227866c89d5cb00","user":{"login":"melouber","id":24853486,"node_id":"MDQ6VXNlcjI0ODUzNDg2","avatar_url":"https://avatars3.githubusercontent.com/u/24853486?v=4","gravatar_id":"","url":"https://api.github.com/users/melouber","html_url":"https://github.com/melouber","followers_url":"https://api.github.com/users/melouber/followers","following_url":"https://api.github.com/users/melouber/following{/other_user}","gists_url":"https://api.github.com/users/melouber/gists{/gist_id}","starred_url":"https://api.github.com/users/melouber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melouber/subscriptions","organizations_url":"https://api.github.com/users/melouber/orgs","repos_url":"https://api.github.com/users/melouber/repos","events_url":"https://api.github.com/users/melouber/events{/privacy}","received_events_url":"https://api.github.com/users/melouber/received_events","type":"User","site_admin":false},"repo":{"id":127903109,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc5MDMxMDk=","name":"mimiker","full_name":"melouber/mimiker","owner":{"login":"melouber","id":24853486,"node_id":"MDQ6VXNlcjI0ODUzNDg2","avatar_url":"https://avatars3.githubusercontent.com/u/24853486?v=4","gravatar_id":"","url":"https://api.github.com/users/melouber","html_url":"https://github.com/melouber","followers_url":"https://api.github.com/users/melouber/followers","following_url":"https://api.github.com/users/melouber/following{/other_user}","gists_url":"https://api.github.com/users/melouber/gists{/gist_id}","starred_url":"https://api.github.com/users/melouber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melouber/subscriptions","organizations_url":"https://api.github.com/users/melouber/orgs","repos_url":"https://api.github.com/users/melouber/repos","events_url":"https://api.github.com/users/melouber/events{/privacy}","received_events_url":"https://api.github.com/users/melouber/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/melouber/mimiker","description":"An experiment with implementation of very simple operating system for Malta board","fork":true,"url":"https://api.github.com/repos/melouber/mimiker","forks_url":"https://api.github.com/repos/melouber/mimiker/forks","keys_url":"https://api.github.com/repos/melouber/mimiker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/melouber/mimiker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/melouber/mimiker/teams","hooks_url":"https://api.github.com/repos/melouber/mimiker/hooks","issue_events_url":"https://api.github.com/repos/melouber/mimiker/issues/events{/number}","events_url":"https://api.github.com/repos/melouber/mimiker/events","assignees_url":"https://api.github.com/repos/melouber/mimiker/assignees{/user}","branches_url":"https://api.github.com/repos/melouber/mimiker/branches{/branch}","tags_url":"https://api.github.com/repos/melouber/mimiker/tags","blobs_url":"https://api.github.com/repos/melouber/mimiker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/melouber/mimiker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/melouber/mimiker/git/refs{/sha}","trees_url":"https://api.github.com/repos/melouber/mimiker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/melouber/mimiker/statuses/{sha}","languages_url":"https://api.github.com/repos/melouber/mimiker/languages","stargazers_url":"https://api.github.com/repos/melouber/mimiker/stargazers","contributors_url":"https://api.github.com/repos/melouber/mimiker/contributors","subscribers_url":"https://api.github.com/repos/melouber/mimiker/subscribers","subscription_url":"https://api.github.com/repos/melouber/mimiker/subscription","commits_url":"https://api.github.com/repos/melouber/mimiker/commits{/sha}","git_commits_url":"https://api.github.com/repos/melouber/mimiker/git/commits{/sha}","comments_url":"https://api.github.com/repos/melouber/mimiker/comments{/number}","issue_comment_url":"https://api.github.com/repos/melouber/mimiker/issues/comments{/number}","contents_url":"https://api.github.com/repos/melouber/mimiker/contents/{+path}","compare_url":"https://api.github.com/repos/melouber/mimiker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/melouber/mimiker/merges","archive_url":"https://api.github.com/repos/melouber/mimiker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/melouber/mimiker/downloads","issues_url":"https://api.github.com/repos/melouber/mimiker/issues{/number}","pulls_url":"https://api.github.com/repos/melouber/mimiker/pulls{/number}","milestones_url":"https://api.github.com/repos/melouber/mimiker/milestones{/number}","notifications_url":"https://api.github.com/repos/melouber/mimiker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/melouber/mimiker/labels{/name}","releases_url":"https://api.github.com/repos/melouber/mimiker/releases{/id}","deployments_url":"https://api.github.com/repos/melouber/mimiker/deployments","created_at":"2018-04-03T12:15:37Z","updated_at":"2018-06-10T12:11:55Z","pushed_at":"2018-06-18T19:54:38Z","git_url":"git://github.com/melouber/mimiker.git","ssh_url":"git@github.com:melouber/mimiker.git","clone_url":"https://github.com/melouber/mimiker.git","svn_url":"https://github.com/melouber/mimiker","homepage":"","size":2250,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cahirwpz:master","ref":"master","sha":"5ce803bc4dd0ae064b936dc8b449eec7f076d7c9","user":{"login":"cahirwpz","id":265236,"node_id":"MDQ6VXNlcjI2NTIzNg==","avatar_url":"https://avatars3.githubusercontent.com/u/265236?v=4","gravatar_id":"","url":"https://api.github.com/users/cahirwpz","html_url":"https://github.com/cahirwpz","followers_url":"https://api.github.com/users/cahirwpz/followers","following_url":"https://api.github.com/users/cahirwpz/following{/other_user}","gists_url":"https://api.github.com/users/cahirwpz/gists{/gist_id}","starred_url":"https://api.github.com/users/cahirwpz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cahirwpz/subscriptions","organizations_url":"https://api.github.com/users/cahirwpz/orgs","repos_url":"https://api.github.com/users/cahirwpz/repos","events_url":"https://api.github.com/users/cahirwpz/events{/privacy}","received_events_url":"https://api.github.com/users/cahirwpz/received_events","type":"User","site_admin":false},"repo":{"id":46346617,"node_id":"MDEwOlJlcG9zaXRvcnk0NjM0NjYxNw==","name":"mimiker","full_name":"cahirwpz/mimiker","owner":{"login":"cahirwpz","id":265236,"node_id":"MDQ6VXNlcjI2NTIzNg==","avatar_url":"https://avatars3.githubusercontent.com/u/265236?v=4","gravatar_id":"","url":"https://api.github.com/users/cahirwpz","html_url":"https://github.com/cahirwpz","followers_url":"https://api.github.com/users/cahirwpz/followers","following_url":"https://api.github.com/users/cahirwpz/following{/other_user}","gists_url":"https://api.github.com/users/cahirwpz/gists{/gist_id}","starred_url":"https://api.github.com/users/cahirwpz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cahirwpz/subscriptions","organizations_url":"https://api.github.com/users/cahirwpz/orgs","repos_url":"https://api.github.com/users/cahirwpz/repos","events_url":"https://api.github.com/users/cahirwpz/events{/privacy}","received_events_url":"https://api.github.com/users/cahirwpz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cahirwpz/mimiker","description":"An experiment with implementation of very simple operating system for Malta board","fork":false,"url":"https://api.github.com/repos/cahirwpz/mimiker","forks_url":"https://api.github.com/repos/cahirwpz/mimiker/forks","keys_url":"https://api.github.com/repos/cahirwpz/mimiker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cahirwpz/mimiker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cahirwpz/mimiker/teams","hooks_url":"https://api.github.com/repos/cahirwpz/mimiker/hooks","issue_events_url":"https://api.github.com/repos/cahirwpz/mimiker/issues/events{/number}","events_url":"https://api.github.com/repos/cahirwpz/mimiker/events","assignees_url":"https://api.github.com/repos/cahirwpz/mimiker/assignees{/user}","branches_url":"https://api.github.com/repos/cahirwpz/mimiker/branches{/branch}","tags_url":"https://api.github.com/repos/cahirwpz/mimiker/tags","blobs_url":"https://api.github.com/repos/cahirwpz/mimiker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cahirwpz/mimiker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cahirwpz/mimiker/git/refs{/sha}","trees_url":"https://api.github.com/repos/cahirwpz/mimiker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cahirwpz/mimiker/statuses/{sha}","languages_url":"https://api.github.com/repos/cahirwpz/mimiker/languages","stargazers_url":"https://api.github.com/repos/cahirwpz/mimiker/stargazers","contributors_url":"https://api.github.com/repos/cahirwpz/mimiker/contributors","subscribers_url":"https://api.github.com/repos/cahirwpz/mimiker/subscribers","subscription_url":"https://api.github.com/repos/cahirwpz/mimiker/subscription","commits_url":"https://api.github.com/repos/cahirwpz/mimiker/commits{/sha}","git_commits_url":"https://api.github.com/repos/cahirwpz/mimiker/git/commits{/sha}","comments_url":"https://api.github.com/repos/cahirwpz/mimiker/comments{/number}","issue_comment_url":"https://api.github.com/repos/cahirwpz/mimiker/issues/comments{/number}","contents_url":"https://api.github.com/repos/cahirwpz/mimiker/contents/{+path}","compare_url":"https://api.github.com/repos/cahirwpz/mimiker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cahirwpz/mimiker/merges","archive_url":"https://api.github.com/repos/cahirwpz/mimiker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cahirwpz/mimiker/downloads","issues_url":"https://api.github.com/repos/cahirwpz/mimiker/issues{/number}","pulls_url":"https://api.github.com/repos/cahirwpz/mimiker/pulls{/number}","milestones_url":"https://api.github.com/repos/cahirwpz/mimiker/milestones{/number}","notifications_url":"https://api.github.com/repos/cahirwpz/mimiker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cahirwpz/mimiker/labels{/name}","releases_url":"https://api.github.com/repos/cahirwpz/mimiker/releases{/id}","deployments_url":"https://api.github.com/repos/cahirwpz/mimiker/deployments","created_at":"2015-11-17T12:46:47Z","updated_at":"2018-06-19T14:32:22Z","pushed_at":"2018-06-19T19:14:09Z","git_url":"git://github.com/cahirwpz/mimiker.git","ssh_url":"git@github.com:cahirwpz/mimiker.git","clone_url":"https://github.com/cahirwpz/mimiker.git","svn_url":"https://github.com/cahirwpz/mimiker","homepage":"","size":2373,"stargazers_count":13,"watchers_count":13,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":21,"open_issues":46,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cahirwpz/mimiker/pulls/450"},"html":{"href":"https://github.com/cahirwpz/mimiker/pull/450"},"issue":{"href":"https://api.github.com/repos/cahirwpz/mimiker/issues/450"},"comments":{"href":"https://api.github.com/repos/cahirwpz/mimiker/issues/450/comments"},"review_comments":{"href":"https://api.github.com/repos/cahirwpz/mimiker/pulls/450/comments"},"review_comment":{"href":"https://api.github.com/repos/cahirwpz/mimiker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cahirwpz/mimiker/pulls/450/commits"},"statuses":{"href":"https://api.github.com/repos/cahirwpz/mimiker/statuses/45f9a4892d7b0578d28faadc3227866c89d5cb00"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"melouber"}}