Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Feb 1999 12:40:06 -0600 (CST)
From:      Gurudatt Shenoy <gurudatt@cs.tamu.edu>
To:        freebsd-questions@freebsd.org
Subject:   Question: Adding a new system call
Message-ID:  <Pine.GSO.3.96.990221122904.10095A-100000@dilbert>

next in thread | raw e-mail | index | archive | help

I added a new system call (new_write) to the freebsd (2.2.7) kernel. The
kernel compiled successfully but when I tried to use the call in a
program, I got the following error:
"Undefined symbol '_new_write' referenced from text segment"


What am I missing? The steps I followed to add my system call were:

1. Declared a new entry in syscalls.master
   326	STD	0	BSD	{ void new_write(void);}
(325 is currently the last entry in syscalls.master)
2. Created a new file (called new_write.c) in sys/kern, containing the 
function definition for new_write

Do I have to declare an extern function prototype in some header file too?

I appreciate your feedback.
Thanks,
Guru



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.96.990221122904.10095A-100000>