Date: Fri, 5 Feb 1999 08:28:11 -0800 (PST) From: notso <bright@neptho.net> To: Ilhwan Kwon <ik26+@andrew.cmu.edu> Cc: freebsd-hackers@freefall.cdrom.com Subject: Re: [help] creating system calls Message-ID: <Pine.BSF.4.03.9902050826120.18107-100000@cadaverene.neptho.net> In-Reply-To: <EqilfLe00Ui503yG00@andrew.cmu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 5 Feb 1999, Ilhwan Kwon wrote: > Hi. > > I am trying to write my own system call functions for BSD. > I am trying to calculate the maximum amount of memory a PC needs > when it is used as a router. > First, I declare "u_long max_memused" in /usr/src/sys/sys/mbuf.h. > void clear_mem_stat __P((void)); ... > I write a small program which includes <sys/mbuf.h> and calls get_mem_stat > and clear_mem_stat system calls. > > Whe I compile, I get > "get_mem_stat" : undefined reference from the text segent" > "clear_mem_stat" : undefined reference from the text segent" You must add the functions to libc. look at: /usr/src/lib/libc/sys/* you can use your functions without modifing libc if you use the SYSCALL macro stuff to do it in your .c file -Alfred > > What did I do wrong? > Any help on this matter will be greatly appreciated. > > Thanks > -James Kwon > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.03.9902050826120.18107-100000>