Linux-Development-Sys Digest #706, Volume #7     Sun, 26 Mar 00 00:13:10 EST

Contents:
  Re: UART overrun errors (Mika)
  unresolved symbol: kernel_flag
  gethostbyname() returns "unknown host" ("Someone Insignificant")
  Re: Linux Kernel Installation Problems??????? (Jerry Peters)
  Re: ioctl block pthread_create ?? (Nathan Krasney)
  Re: gethostbyname() returns "unknown host" ("Daniel Beer")
  /usr/include messed up how to I get the files ? (Michael Meding)
  Linux Serial Port Interrupt Problem ([EMAIL PROTECTED])
  Linux Serial Port Interrupt Problem ([EMAIL PROTECTED])
  Linux Serial Port Interrupt Problem ([EMAIL PROTECTED])
  Re: plz....help me.....how can i do? (Me)

----------------------------------------------------------------------------

From: Mika <[EMAIL PROTECTED]>
Subject: Re: UART overrun errors
Date: Sat, 25 Mar 2000 17:51:25 +0200
Reply-To: [EMAIL PROTECTED]


==============41B91E17E19B08F1218AFD1E
Content-Type: text/plain; charset=x-user-defined
Content-Transfer-Encoding: 7bit

My application works really fine at 115kbps with NO handshaking.
System is based on Red-Hat 6.0, kernel 2.2.10 with RTAI 0.7. I am switched
off the default /dev/ttyS1 driver and using the rt_com package. I use
my own kernel module to read the rt_com's internal buffers and the user
space process takes the data via FIFO or SHMEM. Just today I downloaded the

60MB file to my disk while I was playing the game in the another process...

BUT, I have not checked the real speed yet... but it seems like it is 115k

Well that is the situation just now, but dunno whats coming on when
the whole application is ready ;)

Anyway if you are going to need realtime responses and other realtime stuff

it is worth to look more closely the rtai ... or rtl extensions at
http://www.rtai.org

Hope this gives any helps for you.

Mika Lauronen

Mats Byggmastar wrote:

> Etienne Lorrain wrote:
> >
> >   You may have the same problem (serial overruns) when using any
> >  function which switch back to real mode and calls the BIOS - I do not
> >  know if the BIOS is called while switching console.
> >
> >   The problem is that BIOS manufacturers (standart BIOS, video BIOS,
> >  SCSI BIOS...) do not want the user to view their assembly code, with
> >  a debugger or another way - so they make (nearly) impossible to trace
> >  or single step their code. I suspect they are not only disabling
> >  interrupts but also relocate the interrupt table (l/sidt assembly
> >  instruction) and put the stack in an un-useable state, like pointing
> >  in ROM. Their BIOS is not necessarily optimised (it maybe the first
> >  reason they do not want us to see it) so it takes quite a long time
> >  with interrupts disabled...
> >
> >   Hope that helps,
>
> Yes, it helps. It helps in the way that I'm becomming more and more
> convinced that Linux is not the correct OS for our application.
> The realtime issues with Linux I've been avare of for a long time
> but it hasn't had any major impact on our product although it is
> a realtime type of application (a GSM protocol analyser/simulator
> for the A and Abis interfaces, E1, 2 Mbit/s). We have managed to
> work around the problems. However, with these serial port problems
> I've had lately I'm becomming very skeptic. We simply have to move
> over to a RTOS.
>
> Mats

--
Mastersoft Oy
Kyllikinkatu 3
SF-80260 Joensuu
Finland
tel.+358-40-556 0728
fax.+358-13-223 613
mailto: [EMAIL PROTECTED]



==============41B91E17E19B08F1218AFD1E
Content-Type: text/html; charset=x-user-defined
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
My application works really fine at 115kbps with NO handshaking.
<br>System is based on Red-Hat 6.0, kernel 2.2.10 with RTAI&nbsp;0.7. I
am switched
<br>off the default /dev/ttyS1 driver and using the rt_com package. I use
<br>my own kernel module to read the rt_com's internal buffers and the
user
<br>space process takes the data via FIFO or SHMEM. Just today I&nbsp;downloaded
the
<br>60MB file to my disk while I was playing the game in the another process...
<p>BUT, I have not checked the real speed yet... but it seems like it is
115k
<p>Well that is the situation just now, but dunno whats coming on when
<br>the whole application is ready ;)
<p>Anyway if you are going to need realtime responses and other realtime
stuff
<br>it is worth to look more closely the rtai ... or rtl extensions at
<br><A HREF="http://www.rtai.org">http://www.rtai.org</A>
<p>Hope this gives any helps for you.
<p>Mika Lauronen
<p>Mats Byggmastar wrote:
<blockquote TYPE=CITE>Etienne Lorrain wrote:
<br>>
<br>>&nbsp;&nbsp; You may have the same problem (serial overruns) when
using any
<br>>&nbsp; function which switch back to real mode and calls the BIOS
- I do not
<br>>&nbsp; know if the BIOS is called while switching console.
<br>>
<br>>&nbsp;&nbsp; The problem is that BIOS manufacturers (standart BIOS,
video BIOS,
<br>>&nbsp; SCSI BIOS...) do not want the user to view their assembly code,
with
<br>>&nbsp; a debugger or another way - so they make (nearly) impossible
to trace
<br>>&nbsp; or single step their code. I suspect they are not only disabling
<br>>&nbsp; interrupts but also relocate the interrupt table (l/sidt assembly
<br>>&nbsp; instruction) and put the stack in an un-useable state, like
pointing
<br>>&nbsp; in ROM. Their BIOS is not necessarily optimised (it maybe the
first
<br>>&nbsp; reason they do not want us to see it) so it takes quite a long
time
<br>>&nbsp; with interrupts disabled...
<br>>
<br>>&nbsp;&nbsp; Hope that helps,
<p>Yes, it helps. It helps in the way that I'm becomming more and more
<br>convinced that Linux is not the correct OS for our application.
<br>The realtime issues with Linux I've been avare of for a long time
<br>but it hasn't had any major impact on our product although it is
<br>a realtime type of application (a GSM protocol analyser/simulator
<br>for the A and Abis interfaces, E1, 2 Mbit/s). We have managed to
<br>work around the problems. However, with these serial port problems
<br>I've had lately I'm becomming very skeptic. We simply have to move
<br>over to a RTOS.
<p>Mats</blockquote>

<pre>--&nbsp;
Mastersoft Oy
Kyllikinkatu 3
SF-80260 Joensuu
Finland
tel.+358-40-556 0728
fax.+358-13-223 613
mailto: [EMAIL PROTECTED]</pre>
&nbsp;</html>

==============41B91E17E19B08F1218AFD1E==


------------------------------

From: [EMAIL PROTECTED] ()
Subject: unresolved symbol: kernel_flag
Date: 25 Mar 2000 19:05:13 +0100

Hi.

I'm trying to enhance the stat_systemcall by
intercepting it via a LKM. Therefore I copied
the old call from the sources into my module.
It compiles, but refuses to install via insmod with:

unresolved symbol: kernel_flag.

By the way, I'm compiling with 

gcc -O2 -Wall -DMODULE -D__KERNEL__ -DLINUX -D__SMP__ -c syscall.c

Any idea ?


--
--
    Regards & Gruesse from Mickey @ http://www.Vanille.de
  ---------------------------------------------------------
  How could anyone know me - when I don't even know myself ?



------------------------------

From: "Someone Insignificant" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.development,comp.os.linux.development.apps,linux.dev.c-programming,linux.redhat.development
Subject: gethostbyname() returns "unknown host"
Date: Sat, 25 Mar 2000 19:56:42 GMT

Hi All.

I am having the absolute worst time trying to figure out what is going on
with a gethostbyname() function call in a c program that I am writing, and
certainly hope someone can help. This message may be a little long, but I
want to include all of the necessary system information in the hopes that
someone can spot it or point me in the right direction.

The following C code does a host name lookup by calling gethostbyname as
follows:

struct hostent *rhe;
char rhost[100];

strcpy(rhost,"www.internalhost.com");
rhe = gethostbyname(rhost);

This works fine for hosts that have an entry in /etc/hosts.

 It does not work for hosts that are not in the /etc/hosts file. If I add
the entry

192.168.2.10    test.internal.com

It will find the address.

If I comment the entry out of the /etc/hosts file like

#192.168.2.10    test.internal.com

It will return with a "unknown host" error.

If i run ping on the hostname test.internal.com ( after uncommenting it of
course ) it will find the address and execute correctly.

If I run ping www.yahoo.com ping will find the address and ping yahoo. If I
run my program with www.yahoo.com as the hostname, it returns with a "host
unknown" error.

Also, named is running, and gets its resolv.conf file from pump as I am on a
cable modem connection.

The /etc/resolv.conf file looks like this:

search bigcity.rr.com rr.com
nameserver xx.xx.x.xx

and I do not have any other problems with name resolution.

The system that I am running this on is

RedHat Linux 6.0
Kernel Version 2.2.14
Latest Bind RPM's from RedHat..com have been installed.
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

I have searched various search engines and newsgroups looking for a problem
similiar to this with no luck. If anyone knows what might be causing my c
program to return with "unknown host" while regular command line programs
like ping work without a problem, I would certainly appreciate a reply via
email as this one has me stumped.

Thanks in advance.

mike
[EMAIL PROTECTED]



------------------------------

From: Jerry Peters <[EMAIL PROTECTED]>
Subject: Re: Linux Kernel Installation Problems???????
Date: Sat, 25 Mar 2000 20:50:19 GMT

drunKmonK <[EMAIL PROTECTED]> wrote:
> When I try installing Linux Mandrake on my cpu it gives me this error
> message:



> VFS: Cannot open root device 08:01
> Kernel panic: VFS: Unable to mount root FS on 08:01

This is /dev/sda1, yet you don't indicate that you have a scsi
controller. If you have an ide disk it should be /dev/hda1 (assuming
you're using the first partition).


> heres my info if it helps:


> Dell Pentium II
> 400 mhz
> Windows 98
> Hp cd writer plus Burner
> Riva/TNT AGP Graphics Card
> Sporster 56k fax Modem
> Cannon BJC-4400

> PLEASE HELP I NEED LINUX





------------------------------

From: Nathan Krasney <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer,comp.unix.questions,comp.unix.solaris
Subject: Re: ioctl block pthread_create ??
Date: Sat, 25 Mar 2000 23:56:20 +0200


==============C4F983E5D597CEFF21FBF295
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Thank you for your answer !
i have few questions :

   * are you suggesting to use PTHREAD_SCOPE_SYSTEM because this will produce
     bound thread which will guaranty LWP for this created thread ??
   * are you suggesting to use always PTHREAD_SCOPE_SYSTEM for threads in
     solaris ?? or in other words when should i use PTHREAD_SCOPE_SYSTEM and
     when PTHREAD_SCOPE_PROCESS ??
   * is there any documentation about this (bad) behavior of libthread.??


"Roger A. Faulkner" wrote:

> In article <[EMAIL PROTECTED]>,
> Nathan Krasney  <[EMAIL PROTECTED]> wrote:
> >Hello all
> >
> >i have very strange phenomenon. i have a user mode application that talk
> >to a file system driver via ioctl. this ioctl is envoked by user mode
> >thread , problem is that creation of a new thread is suspended by the os
> >until this ioctl return !!!
> >
> >e.g.
> >main()
> >{
> >    pthread_create  run f1()
> >    pthread_create  run ioctl
> >    pthread_create  run f2()
> >    while(1)
> >    ......;
> >}
> >
> >f1 will continue to run independently but f2 will NOT start running
> >until the ioctl has return !!
> >
> >what can possibly be the problem ???
>
> This is not a problem with the ioctl(), it is a (bad) behavior
> of libthread.
>
> Either create your threads with the PTHREAD_SCOPE_SYSTEM attribute
> or call pthread_setconcurrency() to tell libthread how many LWPs
> you want to have running at once (before calling pthread_create()).
>
> Roger Faulkner
> [EMAIL PROTECTED]

==============C4F983E5D597CEFF21FBF295
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Thank you for your answer !
<br>i have few questions :
<ul>
<li>
are you suggesting to use PTHREAD_SCOPE_SYSTEM because this will produce
bound thread which will guaranty LWP for this created thread ??</li>

<li>
are you suggesting to use always PTHREAD_SCOPE_SYSTEM for threads in solaris
?? or in other words when should i use PTHREAD_SCOPE_SYSTEM and when 
PTHREAD_SCOPE_PROCESS
??</li>

<li>
is there any documentation about this (bad) behavior of libthread.??</li>

<br>&nbsp;</ul>

<p><br>"Roger A. Faulkner" wrote:
<blockquote TYPE=CITE>In article &lt;[EMAIL PROTECTED]>,
<br>Nathan Krasney&nbsp; &lt;[EMAIL PROTECTED]> wrote:
<br>>Hello all
<br>>
<br>>i have very strange phenomenon. i have a user mode application that
talk
<br>>to a file system driver via ioctl. this ioctl is envoked by user mode
<br>>thread , problem is that creation of a new thread is suspended by
the os
<br>>until this ioctl return !!!
<br>>
<br>>e.g.
<br>>main()
<br>>{
<br>>&nbsp;&nbsp;&nbsp; pthread_create&nbsp; run f1()
<br>>&nbsp;&nbsp;&nbsp; pthread_create&nbsp; run ioctl
<br>>&nbsp;&nbsp;&nbsp; pthread_create&nbsp; run f2()
<br>>&nbsp;&nbsp;&nbsp; while(1)
<br>>&nbsp;&nbsp;&nbsp; ......;
<br>>}
<br>>
<br>>f1 will continue to run independently but f2 will NOT start running
<br>>until the ioctl has return !!
<br>>
<br>>what can possibly be the problem ???
<p>This is not a problem with the ioctl(), it is a (bad) behavior
<br>of libthread.
<p>Either create your threads with the PTHREAD_SCOPE_SYSTEM attribute
<br>or call pthread_setconcurrency() to tell libthread how many LWPs
<br>you want to have running at once (before calling pthread_create()).
<p>Roger Faulkner
<br>[EMAIL PROTECTED]</blockquote>
</html>

==============C4F983E5D597CEFF21FBF295==


------------------------------

Crossposted-To: 
comp.os.linux.development,comp.os.linux.development.apps,linux.dev.c-programming,linux.redhat.development
Subject: Re: gethostbyname() returns "unknown host"
From: "Daniel Beer" <[EMAIL PROTECTED]>
Reply-To: "Daniel Beer" <[EMAIL PROTECTED]>
Date: Sun, 26 Mar 2000 11:18:29 +1300

On Sat, 25 Mar 2000 19:56:42 GMT, "Someone Insignificant"
<[EMAIL PROTECTED]> wrote:
>I have searched various search engines and newsgroups looking for a problem
>similiar to this with no luck. If anyone knows what might be causing my c
>program to return with "unknown host" while regular command line programs
>like ping work without a problem, I would certainly appreciate a reply via
>email as this one has me stumped.

That's really strange.  Post the whole program, so we can have a more
in-depth look.

--
   _     _
 o' \,=./ `o   Daniel Beer <[EMAIL PROTECTED]>
    (o o)      dlbeer.freeshell.org
ooO--(_)--Ooo-


------------------------------

From: Michael Meding <[EMAIL PROTECTED]>
Subject: /usr/include messed up how to I get the files ?
Date: Sun, 26 Mar 2000 03:58:58 +0200
Reply-To: [EMAIL PROTECTED]

Hi everybody,

I messed up my directory /usr/include and now I am trying to dig a place
up from where thos files originate ;-))

Anybody knows anything about this and is willing to help a dumb user ?

Thanks in advance

With best regards

M.E.Meding


------------------------------

From: [EMAIL PROTECTED]
Subject: Linux Serial Port Interrupt Problem
Date: Sun, 26 Mar 2000 04:09:09 GMT

I have been working on writing a device driver for
linux that operates as an ethernet device but uses
the serial port (COM1).  I've tested the driver on
an AMD Athlon with SD11 motherboard that uses VIA
686 south bridge, AMD 750 north bridge, and 16550A
UART.  The driver works fine and the UART
interrupts work well, and the linux kernel calls
my interrupt routine.

I've tried running the Driver on my other system,
Intel Pentium 233 MMX, with ASUS 430TX motherboard
and also two (COM1 & COM2) 16550A UARTS.  The
problem is that when I try to send and receive
data, my interrupt service routine is never
called.  I've read the Interrupt Identification
Register, and verified that there is an interrupt
pending, but the kernel never calls my interrupt
routine.  I've tried lots of things and cant see
why I'm not getting the interrupts.

Both systems are running Red hat 6.1 with the
2.2.14 Kernel release.  I've also verified that
the IO Address and IRQ are not in use by another
device.  I also have a serial mouse that I've
tried on both COM ports and verified that it
works.  So the interrupts are being sent.  So I'm
assuming the problem occurs between when the
interrupt gets sent by the UART to when the Kernel
calls the interrupt service routine in my driver.

If anyone out there has seen or heard of this type
of problem please respond, I've been pulling my
hair out for a couple of days now.


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: [EMAIL PROTECTED]
Subject: Linux Serial Port Interrupt Problem
Date: Sun, 26 Mar 2000 04:09:07 GMT

I have been working on writing a device driver for
linux that operates as an ethernet device but uses
the serial port (COM1).  I've tested the driver on
an AMD Athlon with SD11 motherboard that uses VIA
686 south bridge, AMD 750 north bridge, and 16550A
UART.  The driver works fine and the UART
interrupts work well, and the linux kernel calls
my interrupt routine.

I've tried running the Driver on my other system,
Intel Pentium 233 MMX, with ASUS 430TX motherboard
and also two (COM1 & COM2) 16550A UARTS.  The
problem is that when I try to send and receive
data, my interrupt service routine is never
called.  I've read the Interrupt Identification
Register, and verified that there is an interrupt
pending, but the kernel never calls my interrupt
routine.  I've tried lots of things and cant see
why I'm not getting the interrupts.

Both systems are running Red hat 6.1 with the
2.2.14 Kernel release.  I've also verified that
the IO Address and IRQ are not in use by another
device.  I also have a serial mouse that I've
tried on both COM ports and verified that it
works.  So the interrupts are being sent.  So I'm
assuming the problem occurs between when the
interrupt gets sent by the UART to when the Kernel
calls the interrupt service routine in my driver.

If anyone out there has seen or heard of this type
of problem please respond, I've been pulling my
hair out for a couple of days now.


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: [EMAIL PROTECTED]
Subject: Linux Serial Port Interrupt Problem
Date: Sun, 26 Mar 2000 04:09:11 GMT

I have been working on writing a device driver for
linux that operates as an ethernet device but uses
the serial port (COM1).  I've tested the driver on
an AMD Athlon with SD11 motherboard that uses VIA
686 south bridge, AMD 750 north bridge, and 16550A
UART.  The driver works fine and the UART
interrupts work well, and the linux kernel calls
my interrupt routine.

I've tried running the Driver on my other system,
Intel Pentium 233 MMX, with ASUS 430TX motherboard
and also two (COM1 & COM2) 16550A UARTS.  The
problem is that when I try to send and receive
data, my interrupt service routine is never
called.  I've read the Interrupt Identification
Register, and verified that there is an interrupt
pending, but the kernel never calls my interrupt
routine.  I've tried lots of things and cant see
why I'm not getting the interrupts.

Both systems are running Red hat 6.1 with the
2.2.14 Kernel release.  I've also verified that
the IO Address and IRQ are not in use by another
device.  I also have a serial mouse that I've
tried on both COM ports and verified that it
works.  So the interrupts are being sent.  So I'm
assuming the problem occurs between when the
interrupt gets sent by the UART to when the Kernel
calls the interrupt service routine in my driver.

If anyone out there has seen or heard of this type
of problem please respond, I've been pulling my
hair out for a couple of days now.


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: Me <[EMAIL PROTECTED]>
Subject: Re: plz....help me.....how can i do?
Date: 26 Mar 2000 04:26:58 GMT

Your premise is correct.  If you want to write your own layer 3 network
protocol, the best way to do it is as a kernel module.  If I recall
correctly, there are several hooks in the kernel for "user-defined"
modules, so people who aren't intimately involved in the kernel development
can still write their own modules and do weird things like that.  <grin>

I would look at the source for the TCP/IP, IPX, and AppleTalk stacks.  The
IP stack will give you clues on how things can be done nicely.  The others
can give you some perspective for how things *can* be done (even if you 
*shouldn't* do it that way; broadcast, broadcast, broadcast).

Hope that helps.

--J

daewoois <[EMAIL PROTECTED]> wrote:
: Now i learn the Linux_kernel................

: but...

: i want to make an other protocol....not TCP/IP

: many problems make my headache....T.T

: i think that......i make my device driver for my protocol....

: is it right?

: and then install my protocol module into kernel....

: is it right?

: i don't want to touch the TCP/IP protocl...

: my thinking is right?

: if not right, how can i do for this protocol.....

: PLZ...help me.....



------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to