Linux-Development-Sys Digest #45, Volume #8 Tue, 25 Jul 00 15:13:16 EDT
Contents:
Re: where is "clear" source?? (Zirong Wang)
Re: Writing Device Drivers for Newer Kernels (Horst von Brand)
RTAI or RTL? (Kang Tin LAI)
Baud rate v.s. Port emulator (8623805)
Async IO in Linux... ("Kevin Beard")
Re: Programming newbie's question (Andreas Rottmann)
Reproducable crashing linux-2.2.16 (Martin Kahlert)
Re: Reproducable crashing linux-2.2.16 ("chris G�nther")
pthreads ("Emanuel Harangus")
Re: Async IO in Linux... (Andreas Jaeger)
Re: Database Modeling Tools for Linux? ("Frank V. Castellucci")
Re: pthreads (Kaz Kylheku)
request_irq problem (Daniel Etzold)
Re: request_irq problem (Mathias Waack)
Re: reentrant - explanation (John Reynolds)
Re: Port Emulator.... (Grant Edwards)
Re: Reproducable crashing linux-2.2.16 (Thomas Zajic)
read() question (Fro-Man)
Re: Can i get a MAC address ? (Rick Ellis)
Re: Can i get a MAC address ? (Rick Ellis)
Re: Developer position (Rick Ellis)
----------------------------------------------------------------------------
From: Zirong Wang <[EMAIL PROTECTED]>
Subject: Re: where is "clear" source??
Date: Tue, 25 Jul 2000 10:58:57 +0200
Hi dan,
try printf(stdout, "\033\143");
A derelict Engineer wrote:
>
> Can anyone tell me where the source code for the "clear" utility is
> included?? I'd like to find out how to execute a clear_screen() function,
> without having to link curses, which I don't otherwise use... I've been
> using system("clear") up to now, and that works adequately, but I'd rather
> learn how to do it directly...
>
> Thanks!!
=====================================================================
Zirong Wang Oce Industries 1, Rue J. Lemoine 94015 Creteil France
------------------------------
From: [EMAIL PROTECTED] (Horst von Brand)
Subject: Re: Writing Device Drivers for Newer Kernels
Date: 25 Jul 2000 00:54:08 GMT
Reply-To: [EMAIL PROTECTED]
On Tue, 18 Jul 2000 16:51:05 GMT,
William F. Simmons <[EMAIL PROTECTED]> wrote:
[...]
>as specified in Rubini's book. But when the linker kicks in, it
>complains of numerous unresolved and undefined symbols. All of the
>undefined symbols come from the kernel header files (they are not
>symbols private to the driver). In response, I went through all of
>the header files looking for these offending symbol definitions, and
>they were already in header files that I had included in the driver
>source.
Perhaps wrong gcc flags (no -D__KERNEL__ and so, perhaps no -O2 (so inlines
do get inlined), ...)?
--
Horst von Brand [EMAIL PROTECTED]
Casilla 9G, Vin~a del Mar, Chile +56 32 672616
------------------------------
From: Kang Tin LAI <[EMAIL PROTECTED]>
Subject: RTAI or RTL?
Date: Tue, 25 Jul 2000 17:23:25 +0800
I can't get a conclusion after studying their home pages.
RTAI or RTL?
------------------------------
From: [EMAIL PROTECTED] (8623805)
Subject: Baud rate v.s. Port emulator
Date: 25 Jul 2000 09:51:44 GMT
Hello,
Could anyone tell me where to find source codes of port
emulators which transmit/receive data according to their
baud-rate settings ?
That is, the port emulator will buffer the data by itself,
and transmit/receive data according to the baud-rate
settings.
I navigated the Linux source codes. Howerver, all the
port drivers I found just set the baud rate to the hardware.
They don't manage the transmission speed themself.
Could anyone help me ?
Thanks!
--
==========================================================
David Chang
Operating System Laboratory
CIS Department, NCTU, Taiwan
Email Address: [EMAIL PROTECTED]
==========================================================
------------------------------
From: "Kevin Beard" <[EMAIL PROTECTED]>
Subject: Async IO in Linux...
Date: Tue, 25 Jul 2000 11:29:16 +0100
Just wondering if anyone knows why this code SIGSEGV's under Linux
It compiles under both Solaris2.6 and Linux (Redhat 6.2 kernel� 2.2.14-5)
but only gets errors on Linux.
I understand that Linux complies with POSIX4 (POSIX1b):
main()
{
�� for(counter=0; counter<NUM_OF_AIOCBS; counter++)
�� {
����� out_data[counter] = (char*)malloc(sizeof(char)+2);
����� sprintf(out_data[counter], "%1.1d\n", counter);
����� printf("%s", out_data[counter]);
�� }
�� for(counter=0; counter<NUM_OF_AIOCBS; counter++)
�� {
����� async_ctrl_blk[counter] = (aiocb*)malloc(sizeof(aiocb_t));
����� async_ctrl_blk[counter]->aio_fildes = open(FILENAME,O_RDWR | O_APPEND
| O_CREAT, 0666);
����� async_ctrl_blk[counter]->aio_offset = 0;
����� async_ctrl_blk[counter]->aio_lio_opcode = LIO_WRITE;
����� async_ctrl_blk[counter]->aio_buf = out_data[counter];
����� async_ctrl_blk[counter]->aio_nbytes = sizeof(char)+2;
�� }
�� if (lio_listio(LIO_NOWAIT, async_ctrl_blk, NUM_OF_AIOCBS, NULL) < 0 )
����� perror("lio_listio");
�� aio_suspend(async_ctrl_blk,NUM_OF_AIOCBS,NULL);
}
------------------------------
From: Andreas Rottmann <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Programming newbie's question
Date: 25 Jul 2000 12:18:55 +0200
Sunny Han <[EMAIL PROTECTED]> writes:
> Hello.
>
> I'm using redhat linux 6.0, I had following errors in compiling example
> source library.
> Although I have some experience in linux, I am a novice in programming.
> Please help me. This is the first day in learning C programing in Unix
> and Linux.
>
[snip]
> strerror.c:3: conflicting types for `sys_errlist'
> /usr/include/stdio.h:553: previous declaration of `sys_errlist'
>
This error seems pretty obvious to me, but what the FSCK are you
doing? Looks like you're trying to compile some libc - not a good
place to start...
Find a good book on C under Linux/Unix and write some little programs
yourself. That will get you bootstrapped.
Andy
--
Andreas Rottmann | Dru@ICQ | 54523380@ICQ | [EMAIL PROTECTED]
Pfeilgasse 4-6/725 | A-1080 Wien | Austria | Europe
http://www.8ung.at/rotty | GnuPG Key: www.8ung.at/rotty/dru.asc
Fingerprint | 3E9A C485 49A4 1D17 2EA7 2BA7 22AE C9BF 8173 6279
[one of 78,35% Austrians who didn�t vote for Haider!]
------------------------------
From: [EMAIL PROTECTED] (Martin Kahlert)
Subject: Reproducable crashing linux-2.2.16
Date: 25 Jul 2000 10:48:16 GMT
Reply-To: [EMAIL PROTECTED]
Hi!
Could anybody check this (it would be best *not* to try it on a
production machine...)
cat crash.c
#include <alloca.h>
#include <string.h>
#include <stdlib.h>
int main(int argc,char *argv[])
{
if(argc==2)
{
unsigned int n = 1 << atoi(argv[1]);
char *b = alloca(n);
if(b)
memset(b,0,n);
}
return 0;
}
gcc -o crash crash.c
./crash 30
Will reproducable crash my linux machine.
It is a dual Pentium III running a vanilla linux 2.2.16.
free
total used free shared buffers cached
Mem: 517260 43220 474040 10516 10484 15976
-/+ buffers/cache: 16760 500500
Swap: 265032 22064 242968
The mashine simply stops working. You don't have to be root for that!
I assume, that's a bug.
Bye,
Martin.
PS: Our HP box simply sais, that the stackspace is too small.
--
The early bird gets the worm. If you want something else for
breakfast, get up later.
------------------------------
From: "chris G�nther" <[EMAIL PROTECTED]>
Subject: Re: Reproducable crashing linux-2.2.16
Date: Tue, 25 Jul 2000 13:43:24 +0200
I tried it and nothing happened to my mashine.
I have a single Pentium III 600e with 256MB PC100 SD-RAm
an Adaptec 29160 with 3 IBM DPSS SCA 9,1 GB 7/4096/7200
one running RedHat Linux 6.1de (Cartman), the other two running Solaris 8
chris
"Martin Kahlert" <[EMAIL PROTECTED]> schrieb im
Newsbeitrag news:8ljr9g$f73$[EMAIL PROTECTED]...
> Hi!
> Could anybody check this (it would be best *not* to try it on a
> production machine...)
>
> cat crash.c
> #include <alloca.h>
> #include <string.h>
> #include <stdlib.h>
>
> int main(int argc,char *argv[])
> {
> if(argc==2)
> {
> unsigned int n = 1 << atoi(argv[1]);
> char *b = alloca(n);
>
> if(b)
> memset(b,0,n);
> }
>
> return 0;
> }
>
> gcc -o crash crash.c
> ./crash 30
>
> Will reproducable crash my linux machine.
> It is a dual Pentium III running a vanilla linux 2.2.16.
>
> free
> total used free shared buffers cached
> Mem: 517260 43220 474040 10516 10484 15976
> -/+ buffers/cache: 16760 500500
> Swap: 265032 22064 242968
>
> The mashine simply stops working. You don't have to be root for that!
>
> I assume, that's a bug.
>
> Bye,
> Martin.
>
> PS: Our HP box simply sais, that the stackspace is too small.
>
> --
> The early bird gets the worm. If you want something else for
> breakfast, get up later.
------------------------------
From: "Emanuel Harangus" <[EMAIL PROTECTED]>
Subject: pthreads
Date: Tue, 25 Jul 2000 15:19:52 +0300
I am running a program that is creating threads to ident ppl that are
connecting to that program. After the thread is done (I use
remove_thread(d->idthread);) the processes are there. Did I do something
wrong??? Shall I kill them within the main program (I thought remove_thread
is doing that)??
Anyway after the thread had indetified the user that is trying to connect
and it reaches the remove_thread the thread is still there... did I do
something wrong?? I have to add other things along remove_thread?? Like
what??
Hoping I didnt give ya headaches,
Rygars is signing out
------------------------------
From: Andreas Jaeger <[EMAIL PROTECTED]>
Subject: Re: Async IO in Linux...
Date: 25 Jul 2000 15:12:40 +0200
>>>>> Kevin Beard writes:
> Just wondering if anyone knows why this code SIGSEGV's under Linux
> It compiles under both Solaris2.6 and Linux (Redhat 6.2 kernel� 2.2.14-5)
> but only gets errors on Linux.
Could you please send a complete program? Which glibc version are you
running (run /lib/libc.so.6 to get it)? The AIO in glibc 2.1.1 is
broken.
Andreas
--
Andreas Jaeger
SuSE Labs [EMAIL PROTECTED]
private [EMAIL PROTECTED]
------------------------------
Date: Tue, 25 Jul 2000 09:23:42 -0400
From: "Frank V. Castellucci" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Database Modeling Tools for Linux?
Nope, it must have been Dia as far as graphical ER modeling.
Although UML is used on an ever increasing basis for same (easy to
capture the richness of most schemas), the free UML tool (ArgoUML) does
not generate DDL or DFD.
Opportunities abound on this one.
Gene Montgomery wrote:
>
> "Frank V. Castellucci" wrote:
> >
> > Thomas Gagne wrote:
> > >
> > > dia's great for drawing pictures, but I want the modeling tool to actually
> > > allow me to type-in information about keys and attributes--and eventually
> > > generate the SQL for building the database. I guess I assumed people may have
> > > been more familiar with erwin or erstudio.
> >
> > I am very aware of ER tools for windows, I am also aware that there are
> > tools that can help you with generation. Take a look on freshmeat or
> > sourceforge.
> >
> > --
> > Frank V. Castellucci
> > http://corelinux.sourceforge.net
> > OOA/OOD/C++ Standards and Guidelines for Linux
> > http://PythPat.sourceforge.net
> > Pythons Pattern Package
> I make it a point to lurk around freshmeat and sourceforge quite a bit.
> I too would like to see a tool like Erwin which runs under Linux.
> But I have not stumbled across same. You say ".. there are tools .."
> could you name some so as to make the search easier. dia and
> argoUML are not comparable in any significant way to Erwin, IMHO.
>
> Gene Montgomery
--
Frank V. Castellucci
http://corelinux.sourceforge.net
OOA/OOD/C++ Standards and Guidelines for Linux
http://PythPat.sourceforge.net
Pythons Pattern Package
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: pthreads
Reply-To: [EMAIL PROTECTED]
Date: Tue, 25 Jul 2000 14:26:46 GMT
On Tue, 25 Jul 2000 15:19:52 +0300, Emanuel Harangus <[EMAIL PROTECTED]> wrote:
>I am running a program that is creating threads to ident ppl that are
>connecting to that program. After the thread is done (I use
>remove_thread(d->idthread);) the processes are there. Did I do something
>wrong??? Shall I kill them within the main program (I thought remove_thread
>is doing that)??
I have never heard of remove_thread. This function is not in the POSIX
threading interface. To terminate a thread, you should have it return from the
top level function or call pthread_exit. Alternately, you can use cancellation:
have another thread call pthread_cancel on it. Either way, if the thread is
joinable, some other thread must call pthread_join to collect it.
--
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.
------------------------------
From: Daniel Etzold <[EMAIL PROTECTED]>
Subject: request_irq problem
Date: Tue, 25 Jul 2000 17:08:58 +0200
My system hangs whenever the INTERRUPT occurs.
Where is the problem?
[...]
ret = request_irq(INTERRUPT, irq_handler, 0, "myirq", NULL);
[...]
void irq_handler(int irq, void *dev_id, struct pt_regs *regs)
{
// do nothing
}
================================================
Daniel Etzold
~
� �
/V\
// \\
/( )\
^`~'^
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: request_irq problem
Date: 25 Jul 2000 16:51:38 +0200
Daniel Etzold <[EMAIL PROTECTED]> writes:
> My system hangs whenever the INTERRUPT occurs. Where is the problem?
>
>
> [...] ret = request_irq(INTERRUPT, irq_handler, 0, "myirq", NULL);
> [...]
>
>
> void irq_handler(int irq, void *dev_id, struct pt_regs *regs) {
> // do nothing }
Do nothing? And the interrupt remains pending? Looks like an endless
loop. Could this be the reason?
Mathias
------------------------------
From: John Reynolds <[EMAIL PROTECTED]>
Subject: Re: reentrant - explanation
Date: Tue, 25 Jul 2000 15:07:54 GMT
In article <8libgv$voj$[EMAIL PROTECTED]>,
"Norman Black" <[EMAIL PROTECTED]> wrote:
> Re-entrancy usually refers to the following.
> All other data is
> shared, unless by algorithm only one thread will possibly access it.
> This problem can be resolved by using an exclusion object to protect
> the thread
> shared data from multiple access.
Like a semaphore I suppose.
>
> In sum, a re-entrant procedure, means that two or more threads can
safely
> execute the procedure at the same time.
Thanks!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: Port Emulator....
Date: Tue, 25 Jul 2000 15:29:55 GMT
In article <8ljaee$6ko$[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
> I want to implement a virtual COM port emulator which is
> similar to 'VCOMM' in Windows platforms.
I've no idea what VCOMM is, but the pty devices already present
in Linux are serial port emulators. Will they do what you want?
--
Grant Edwards grante Yow! ... Just enough
at time to do my LIBERACE
visi.com impression...
------------------------------
From: [EMAIL PROTECTED] (Thomas Zajic)
Subject: Re: Reproducable crashing linux-2.2.16
Reply-To: [EMAIL PROTECTED] (Thomas Zajic)
Date: Tue, 25 Jul 2000 16:53:32 GMT
On 25 Jul 2000 10:48:16 GMT, Martin Kahlert wrote:
> Could anybody check this (it would be best *not* to try it on a
> production machine...)
> [ ... ]
> gcc -o crash crash.c
> ./crash 30
[zlatko@sphere]:~/tmp/scratch$ ./crash 30
Segmentation fault
No crash, though. Kernel 2.2.16, gcc-2.95.2, glibc-2.1.2 (Slack 7.0).
Thomas
--
=-------------------------------------------------------------------------=
- Thomas "ZlatkO" Zajic <[EMAIL PROTECTED]> Linux-2.2.16/slrn-0.9.6.2+ -
- "It is not easy to cut through a human head with a hacksaw." (M. C.) -
=-------------------------------------------------------------------------=
------------------------------
From: Fro-Man <[EMAIL PROTECTED]>
Subject: read() question
Date: Tue, 25 Jul 2000 13:00:21 -0400
When I am reading from stdin with read like such:
rbytes = read( 0, buf, BUF_SIZE );
It will not return until I hit enter. If I read() from a normal file, I
do not have a problem with it reading only upto the next new line.
I have been remote whenever I have tried this, but I would not assume a
telnet session would wait until it finds a new line to send data.
Is it possibley something some sort of buffering with the terminal?
* Aaron Day * [EMAIL PROTECTED] * http://www.csis.gvsu.edu/~daya *
Of Modern Greece--
Well, they are pretty close to Italy, they probably speak Spanish.
--Brian Smith
------------------------------
From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: Can i get a MAC address ?
Date: 25 Jul 2000 18:20:23 GMT
In article <[EMAIL PROTECTED]>,
Michael Meding <[EMAIL PROTECTED]> wrote:
>I don't think the mac adress can be changed.
It can be changed on most modern cards.
--
http://www.fnet.net/~ellis/photo/linux.html
------------------------------
From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: Can i get a MAC address ?
Date: 25 Jul 2000 18:21:22 GMT
In article <[EMAIL PROTECTED]>,
Frank Sweetser <[EMAIL PROTECTED]> wrote:
>Well, that's how it's *supposed* to work. Unfortunatelly, I've seen at least
>two cases where cheap-ass NIC manufacturers put the same MAC on two or more
>different NIC's.
Intel shipped a lot of cards with the same MAC address. Loads
of fun!
--
http://www.fnet.net/~ellis/photo/linux.html
------------------------------
From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: Developer position
Date: 25 Jul 2000 18:54:14 GMT
In article <397cc79e$[EMAIL PROTECTED]>,
Richard Rice <[EMAIL PROTECTED]> wrote:
>I am a recruiter up in the Seattle area who is currently networking to
>locate a Sr. Developer for a client in Bellevue.
>I am seeking an individual who has the ability to port PCI device drivers
>from NT over to Linux and also write interrupt handlers.
>My client is on the absolute cutting edge of Java streaming media
>technology.
>It has been my experience that individuals with specific skills generally
>know of others with those same skills.
>Any kind of assistance as far as pointing me in the right direction would be
>immensely appreciated.
Does it have to be on site?
------------------------------
** 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
******************************