<p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span style="font-size:16px;line-height:24px;">제가 임베디드라는 과목을 듣고있는데요...</span></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span style="font-size:16px;line-height:24px;">RTOS 배우는 단계인데. 문제 답을모르겠어요...</span></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span style="font-size:16px;line-height:24px;">풀어보실수있는 능력자분 계신가요 .. ㅠㅠ 도와주세요`</span></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span style="font-size:12pt;"><br></span></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span style="font-size:12pt;">다음의 코드는 시스템에서 변수 <span lang="en-us">iSharedDeviceXData </span>를 사용하는 유일한 코드라고 가정하자<span lang="en-us">. </span>루틴<span lang="en-us">vGetDataFromDeviceXData </span>은 인터럽트 루틴이다<span lang="en-us">. vTaskZ </span>에 있는 모든 인터럽트를 금지시키는 대신<span lang="en-us">, </span>아래에 나와있는 것처럼 장치<span lang="en-us"> X </span>의 인터럽트를 금지시키고 다른 모든 인터럽트는 가능하게 했다고 가정하자<span lang="en-us">. </span>이 방법은 여전히 변수 <span lang="en-us">iSharedDeviceXData </span>를 보호하는가<span lang="en-us">? </span>만약 그렇지 않다면<span lang="en-us">, </span>왜 그렇지 않은가<span lang="en-us">? </span>만약 그렇다면<span lang="en-us">, </span>이 방법은 모든 인터럽트를 금지시키는 것과 비교해서 장점<span lang="en-us">(</span>있다면<span lang="en-us">)</span>은 무엇이고 단점<span lang="en-us">(</span>있다면<span lang="en-us">)</span>은 무엇인가<span lang="en-us">?</span></span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> </span></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;">Int iSharedDeviceXData;</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;">Void interrupt vGetDataFromDeviceX (void)</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;">{</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> iSharedDeviceXData = !! </span><span style="font-size:12pt;">장치<span lang="en-us"> X </span>하드웨어로부터 데이터를 가져온다<span lang="en-us">.</span></span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> !! </span><span style="font-size:12pt;">하드웨어를 초기화 시킨다<span lang="en-us">.</span></span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;">}</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;">void vTaskZ (void) /* </span><span style="font-size:12pt;">낮은 우선 순위 태스크<span lang="en-us"> */</span></span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;">{</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> Int iTemp;</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> While (FOREVER)</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> {</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> .</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> .</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> .</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> !! </span><span style="font-size:12pt;">인터럽트 금지<span lang="en-us"></span></span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> iTemp = iSharedDeviceXData;</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> !! </span><span style="font-size:12pt;">인터럽트 복원<span lang="en-us"></span></span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> !! iTemp</span><span style="font-size:12pt;">로 계산수행<span lang="en-us"></span></span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;"> }</span></p> <p style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"></p> <p class="MsoNormal" style="margin:0px;font-family:gulim;line-height:21.6000003814697px;"><span lang="en-us" style="font-size:12pt;">}</span></p>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.