시스템 콜 추가.
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도 괜찮고 암때나.
댓글 없음:
댓글 쓰기
국정원의 댓글 공작을 지탄합니다.