2013년 3월 5일 화요일

시스템 콜 추가

시스템 콜 추가.

man syscall

SYSCALL(2)                                                             Linux Programmer's Manual                                                             SYSCALL(2)

NAME
       syscall - indirect system call

SYNOPSIS
       #define _GNU_SOURCE        /* or _BSD_SOURCE or _SVID_SOURCE */
       #include
       #include   /* For SYS_xxx definitions */

       int syscall(int number, ...);

DESCRIPTION
       syscall() performs the system call whose assembly language interface has the specified number with the specified arguments.  Symbolic constants for system calls
       can be found in the header file .

RETURN VALUE
       The return value is defined by the system call being invoked.  In general, a 0 return value indicates success.  A -1 return value indicates  an  error,  and  an
       error code is stored in errno.

NOTES
       syscall() first appeared in 4BSD.

EXAMPLE
       #define _GNU_SOURCE
       #include
       #include
       #include

       int
       main(int argc, char *argv[])
       {
           pid_t tid;

           tid = syscall(SYS_gettid);
       }


1. android/kernel/arch/arm/include/asm/unistd.h 번호 추가

2. android/kernel/include/linux/syscalls.h 함수 추가

3. android/kernel/arch/arm/kerne/calls.S 시스템 콜 테이블에 추가(부여한 번호랑 순서가 같아야 한다.) -> 다른 칩셋 보면 syscall_table이라고 명명한 옳은 아해들도 있다.

함수 본체 추가는 암때나 android/kernel도 괜찮고 암때나.



댓글 없음:

댓글 쓰기

국정원의 댓글 공작을 지탄합니다.

대학원생의 투고 지도 ④ (완결) — 논문의 수준이란 무엇인가: 사다리와 사분위, 첫 논문 전략

완결편이다. "논문 수준"이라는 말을 해부하고, 에듀테크 석사생의 첫 논문 전략으로 마친다. 학위논문과 학술지 논문은 다른 장르다 먼저 가장 흔한 혼동부터. 학위논문(thesis)은 "내가 연구를 수행할 줄 안다...