{"action":"created","issue":{"url":"https://api.github.com/repos/paparazzi/paparazzi/issues/1117","labels_url":"https://api.github.com/repos/paparazzi/paparazzi/issues/1117/labels{/name}","comments_url":"https://api.github.com/repos/paparazzi/paparazzi/issues/1117/comments","events_url":"https://api.github.com/repos/paparazzi/paparazzi/issues/1117/events","html_url":"https://github.com/paparazzi/paparazzi/pull/1117","id":58628235,"number":1117,"title":"[arch/linux] sys time thread","user":{"login":"flixr","id":104257,"avatar_url":"https://avatars.githubusercontent.com/u/104257?v=3","gravatar_id":"","url":"https://api.github.com/users/flixr","html_url":"https://github.com/flixr","followers_url":"https://api.github.com/users/flixr/followers","following_url":"https://api.github.com/users/flixr/following{/other_user}","gists_url":"https://api.github.com/users/flixr/gists{/gist_id}","starred_url":"https://api.github.com/users/flixr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flixr/subscriptions","organizations_url":"https://api.github.com/users/flixr/orgs","repos_url":"https://api.github.com/users/flixr/repos","events_url":"https://api.github.com/users/flixr/events{/privacy}","received_events_url":"https://api.github.com/users/flixr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/paparazzi/paparazzi/labels/arch/linux","name":"arch/linux","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-23T18:36:41Z","updated_at":"2015-02-25T16:47:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/paparazzi/paparazzi/pulls/1117","html_url":"https://github.com/paparazzi/paparazzi/pull/1117","diff_url":"https://github.com/paparazzi/paparazzi/pull/1117.diff","patch_url":"https://github.com/paparazzi/paparazzi/pull/1117.patch"},"body":"Since using SIGALRM to call the sys_tick_handler (via `setitimer`) can cause problems like interrupting some other syscalls (i.e. read,write, ioctl), setup a separate thread and use timer_fd instead.\r\nThat is a Linux-specific set of functions that presents POSIX timers as file descriptors rather than signals.\r\n\r\nIf the thread runs with a normal priority it can happen that some timer events are missed (and hence sys_time not updated in time). So added a function to set a higher prio for that thread (needs root rights or properly set up limits for the user).\r\nIn some simple tests no events were missed when running with prio 29 via SCHED_FIFO, even if events would be missed, the sys_tick_handler is called the appropriate number of times (so that the time is correct again after)..."},"comment":{"url":"https://api.github.com/repos/paparazzi/paparazzi/issues/comments/75998026","html_url":"https://github.com/paparazzi/paparazzi/pull/1117#issuecomment-75998026","issue_url":"https://api.github.com/repos/paparazzi/paparazzi/issues/1117","id":75998026,"user":{"login":"fvantienen","id":1078038,"avatar_url":"https://avatars.githubusercontent.com/u/1078038?v=3","gravatar_id":"","url":"https://api.github.com/users/fvantienen","html_url":"https://github.com/fvantienen","followers_url":"https://api.github.com/users/fvantienen/followers","following_url":"https://api.github.com/users/fvantienen/following{/other_user}","gists_url":"https://api.github.com/users/fvantienen/gists{/gist_id}","starred_url":"https://api.github.com/users/fvantienen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvantienen/subscriptions","organizations_url":"https://api.github.com/users/fvantienen/orgs","repos_url":"https://api.github.com/users/fvantienen/repos","events_url":"https://api.github.com/users/fvantienen/events{/privacy}","received_events_url":"https://api.github.com/users/fvantienen/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T16:47:51Z","updated_at":"2015-02-25T16:47:51Z","body":"Tested it on both the ardrone2 and bebop and works :)\r\nSo for me it is ok to merge this.."}}