Date: Sat, 11 May 2013 20:59:34 +0200 From: Oliver Pinter <oliver.pntr@gmail.com> To: Alfred Perlstein <bright@mu.org> Cc: freebsd-hackers@freebsd.org Subject: Re: syscall to userland interface Message-ID: <CAPjTQNHtut%2BVnSXOckd5i4cAyRi1btH=Chm3RQ-xuiQdGTWGHQ@mail.gmail.com> In-Reply-To: <518E7B1E.9050704@mu.org> References: <1368214284.29611.YahooMailNeo@web171503.mail.ir2.yahoo.com> <518D4C4F.90902@mu.org> <1368260611.67320.YahooMailNeo@web171505.mail.ir2.yahoo.com> <518E7B1E.9050704@mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5/11/13, Alfred Perlstein <bright@mu.org> wrote: > On 5/11/13 1:23 AM, Karl Dreger wrote: >> >> I am feeling rather stupid at the moment, but I can't find the assembler >> >> files that you are referring to. Do you mean that every syscall under >> >> sys/kern/*.c has a corresponding .S file in src/lib/libc/? > > Nope, the .S files are under the object directory: > >> When you build the system a whole bunch of assembler files are >> automatically generated that define the functions you are looking for. >> >> Look for .S files under the object directory. >> >> Those assembler files have the magic to cause a system call to happen. >> >> example: src/lib/libc/getauid.S (note, this file is GENERATED, it's not >> part of src.) > > > >> >> >> The actual transition from user to kernelland and back probably takes >> >> place via the assembler routines in sys/i386/i386. Most notably >> exception.s >> >> for my i386 cpu. >> >> >> What my question boils down to is this: when running fork and friends >> >> from userland they are invoked as: >> >> fork();, open();, read();, close(); ... >> >> >> but are defined as: >> >> sys_fork(), sys_open(), sys_read(), sys_close(), ... >> >> in their actual c definition. >> >> If the assembler files that you spoke about answer this discrepancy, >> >> then the reason why the penny hasn't dropped yet is because I haven't >> found them. >> >> > Again, they are generated as part of build. You will NOT find them > during a checkout. cd /usr/obj/*/lib/libc/ ls *.S > > -Alfred > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPjTQNHtut%2BVnSXOckd5i4cAyRi1btH=Chm3RQ-xuiQdGTWGHQ>