>I was trying to know how "printf" works in FreeBSD... I hvae reached >to this >point : > >#define _write(fd, s, n) \ > __syscall(SYS_write, (int)(fd), (const void *)(s), (size_t)(n)) > >I'am not really familiar with the way FreeBSD handle interrupts. I >like from >any one of you to tell me what functions will be called next and in >which >files, till we get the string of the printf function argment displayed >in >the terminal.
Look in /usr/src/sys/kern/syscalls.master. You will see that this write() is listed as a system call. If you run the script makesyscalls.sh which is in the same directory, it will create syscalls.c, syscalls.h, sysproto.h, and syscall.mk. If you look at /usr/src/sys/sys/syscall.h, you will see SYS_write defined in that file. You can see the man page for syscall() to see what it does when you do syscall(SYS_write, ...); Look in /usr/src/sys/kern/sys_generic.c, and look at the write() function there..... I'm not familiar with DOS interrupts, but hopefully that will give you more clues....:) You should also look at the Developer's Handbook: http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/ -- Craig Rodrigues http://home.attbi.com/~rodrigc [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message