System Call

1999-11-13 Thread Parthasarathy M. Aji

Dear Sir,
How do I set up a system call of my own in the FreeBSD kernel?
1) Do I just change the syscalls.master and my new function and rebuild
the entire kernel?. If so where do I put my implementation files? in the
same directory as syscalls.master exists? I am new to writing custom system
calls.. Thank you,
regards,
Partha Aji




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: How does sio handle full clists?

1999-11-13 Thread Mike Smith

 I've been digging around in the sio driver, trying to find out how it handles
 receive interrupts when the clists are full.
 
 What I think I found (which is why I'm asking) is that if an RX interrupt
 occurs, and the clists are full and the driver can't offload all of the
 data from the UART, it disables the interrupts.

I don't believe it does this, no.

 I guess I'm looking for confirmation of this, and, if I'm way off, maybe a 
 quick explanatio of what _really_ happens. I'm looking at trying to reuse
 the behavior elsewhere, so I want a good understanding of the process before I
 get myself in to too much trouble.

You should expect to see the dreaded "tty-level buffer overflow" 
message, when the soft interrupt handler flushes the interrupt-level 
buffers into the tty subsystem.

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  [EMAIL PROTECTED]
\\ and he'll hate you for a lifetime. \\  [EMAIL PROTECTED]




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Proposal for the kill-list (userland nfs)

1999-11-13 Thread John Baldwin


On 13-Nov-99 David O'Brien wrote:
 On Tue, Oct 05, 1999 at 03:49:31PM -0700, Alec Wolman wrote:
  Digital Unix, aka Compaq Tru64 Unix, formerly know as DEC OSF/1
  supports this syntax.  In fact, this is the only syntax it
  supports,
  IIRC, so FreeBSD is not the only OS to use it.
 
 Ultrix was the one that only suported this syntax.

Ah.  One thing to note is that the graphical configuration utilities
under at least 4.0D would use the /dir@machine syntax when generating
/etc/fstab.

---

John Baldwin [EMAIL PROTECTED] -- http://www.cslab.vt.edu/~jobaldwi/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



readdir_r vs readdir in libc_r?

1999-11-13 Thread Charles Randall

I'm using FreeBSD 3.3-R and have noted that there's a readdir() in libc_r
but no readdir_r().

Based on archived messages from last year, it appears that the readir() in
libc_r is not reentrant. To access readdir from multiple threads with
different DIR entries, it appears that all of the directory functions must
be protected by a locking mechanism.

What is the current status of this?

Charles



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: readdir_r vs readdir in libc_r?

1999-11-13 Thread Daniel Eischen

Alfred Perlstein has ported this from NetBSD along with pthread_cancel
support.  I'm suppose to be reviewing it - actually I'm done, I've
just got to gather my comments and get back to him.  I'll get back
to him this weekend.

 I'm using FreeBSD 3.3-R and have noted that there's a readdir() in libc_r
 but no readdir_r().
 
 Based on archived messages from last year, it appears that the readir() in
 libc_r is not reentrant. To access readdir from multiple threads with
 different DIR entries, it appears that all of the directory functions must
 be protected by a locking mechanism.
 
 What is the current status of this?

Dan Eischen
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Which egcs port should I use?

1999-11-13 Thread Bjoern Fischer

On Fri, Nov 12, 1999 at 09:18:33PM -0800, David O'Brien wrote:
 On Sat, Nov 13, 1999 at 03:06:26AM +0100, Bjoern Fischer wrote:
  Which egcs would you recommend, if I want to minimize the hassle to
  switch from that egcs to the FreeBSD4.x native egcs?
 
 /usr/ports/lang/egcs.  It is the one that is released code.
 ``gcc-devel'' is equivent to our -CURRENT and can bleed just as bad.

Thank you for your help.

Yes, egcs is 2.95.x and gcc-devel is 2.96 and the bleeding edge.
This is irrelevant since I don't plan to use egcs for production.
I'd like to know whether the ports behave like the native compiler
in -CURRENT. E.g. now I tell Joe User to use -R/vol/foo/lib for
the runtime library search path (Joe User is familiar with Solaris
and enjoys everything he already knows). But when he wishes to
perform some experiments wich egcs, then he should use -Wl,-rpath.
And when we switch to the next FreeBSD brach, I tell him that he
has to use something completely different for the native egcs.

  Björn

-- 
-BEGIN GEEK CODE BLOCK-
GCS d--(+) s++: a- C+++(-) UBOSI$ P+++(-) L---(++) !E W- N+ o+
K- !w !O !M !V  PS++  PE-  PGP++  t+++  !5 X++ tv- b+++ D++ G e+ h-- y+ 
--END GEEK CODE BLOCK--


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: System Call

1999-11-13 Thread Jake Burkholder

 Dear Sir,
 How do I set up a system call of my own in the FreeBSD kernel?
 1) Do I just change the syscalls.master and my new function and rebuild
 the entire kernel?. If so where do I put my implementation files? in the
 same directory as syscalls.master exists? I am new to writing custom system
 calls.. Thank you,

I think the easiest way to do this is with a kld.  It's less intrusive
and allows you to unload/recompile/reload without recompiling the
whole kernel and rebooting.

There should be a simple example of how to do this in
/usr/share/examples/kld/syscall.  Also check out
http://thc.inferno.tusculum.edu/files/thc/bsdkern.html

hope this helps...



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



upcall

1999-11-13 Thread Clinton Xavier Berni


Hello,

How do I access a user level data structure from the kernel. Are there any
Upcalls that I could use?

Xavier



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Thinkpad 750

1999-11-13 Thread Jonathan Towne

I've got a Thinkpad 750, 2 pc card slots, no cdrom, only a mere
486SL/33 CPU, and 8meg of RAM, and i'm trying to install a copy
of 3.3-RELEASE on it to replace win3.11.  Since the thinkpad
uses an odd keyboard of some sort, i give syscons the 0x2 flag,
which fixed the keyboard one time (the only time i got it to
boot correctly).  Anyways, i've tried the standard installation
floppies, and the pccard floppies, neither would get past the
"Probing devices, please wait (...)" dialog, it just hangs there,
and will not accept any keyboard commands or anything like that.
This problem previously happened to me on a set of installation
floppies that didn't have FPU emulation in the kernel on my
486sx/25, but, 3.3-RELEASE is supposed to have it, so, I'm sure
that can't be the problem, any answers would be greatly
appreciated.. :)

-- 
Jonathan Towne  [EMAIL PROTECTED][EMAIL PROTECTED]
Systems Administratorhttp://massive.geek.edu/

-BEGIN GEEK CODE BLOCK-
Version: 3.1
GU d- s: a--- C+++ UB P L- E--- W--- N++ o K w--- 
O-- M V- PS PE Y-- PGP- t+ 5 X+ R+ tv- b+ DI+ D++ 
G e- h-- r-- y
--END GEEK CODE BLOCK--


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



How to do source route

1999-11-13 Thread Sunthiti Patchararungruang

Dear Sir,

I need to create a program to forward IP packets, already have IP header.
All packets have destination in remote network. Therefore, I cannot send
them with normal raw-IP-socket. I think I need to do source-route packet
sending. However, I don't know how to do it. Please give me the method.

Thank you.



Regards,
Sunthiti Patchararungruang



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message