커널이나 모듈 소스에서 current->uid로 현재 프로세스의 UID를 확인하려고 할 때, 구조체 전역변수인 current를 어떻게 선언해서 사용해야 하나요?
선언하지 않고 그냥 바로 사용하면 에러가 납니다 extern struct task_struct *current; 이와 같이 선언하고 사용해도 에러가 납니다
대부분의 아키텍처에서 current는 단순히 변수가 아닌 get_current() 호출로 치환됩니다.
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
linux/module.h
대부분의 아키텍처에서 current는 단순히 변수가 아닌 get_current() 호출로 치환됩니다.
댓글 달기