달력

1

« 2025/1 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
2011. 12. 24. 19:54

_syscall# OS이야기2011. 12. 24. 19:54

ssize_t write(int fd, const void *buf, size_t count);

_syscall3(int , write, int, fd, const void *,buf, unsigned int, count); <-- 매크로

#define _syscall3(type, name, type1, arg1, type2, arg2, type3,arg3) \
type name(type1, arg1, type2, arg2, type3, arg3) \
{
long __res ; \
__asm__ volatile("int $0x80" \
: "=a" (__res) \
: "0" (__NR_##name) , "b", ((long)(arg1)) , "c" ((long)(arg2)), \
      "d" ((long))(arg3)) : "memory"); \
__syscall_return(type, __res); \

'OS이야기' 카테고리의 다른 글

문자 디바이스 호출과정  (0) 2011.12.31
EXPORT_SYMBOL  (1) 2011.12.24
메모리 회수처리  (0) 2011.12.23
swap_info_struct  (0) 2011.12.23
do_mmap_pgoff  (0) 2011.12.23
:
Posted by НooпeУ


Code Start Code End