Linux-Development-Sys Digest #315, Volume #8      Fri, 1 Dec 00 13:13:10 EST

Contents:
  Re: Problems (raced conditions) with semaphores (Axel Straschil)
  Re: this sucks! ("Z")
  Re: Seeking clarification on linux's handling of inodes (Philip Armstrong)
  Re: gcc-2.95.2 forces ALL c++ programs to be GPL !!??!# (Philip Armstrong)
  S3fb ([EMAIL PROTECTED])
  Deamons ("Richard Fabian")
  Re: Deamons ("Richard Fabian")
  ATM support on Linux (Fernando Alfonso Villanueva)
  Re: Deamons ("Z")
  Re: this sucks! (Elizabeth Clarke)
  Re: this sucks! (Anders Larsen)
  Re: USB and IrDA Development on Linux (ich)
  Re: this sucks! (Lew Pitcher)
  Getting the CPU load value in a LKM... (Perego Paolo)
  Re: Global constructors in ELF so libs NOT CALLED! ("John C. Griggs")
  How to install a NMI ISR ([EMAIL PROTECTED])
  Re: PCMCIA card installation (Jerome Corre)
  How to access DMI info from the BIOS ([EMAIL PROTECTED])
  Re: this sucks! (Kaz Kylheku)
  Re: Modify the scheduler to manage shortest-job first (bill davidsen)

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

From: Axel Straschil <[EMAIL PROTECTED]>
Subject: Re: Problems (raced conditions) with semaphores
Date: 01 Dec 2000 10:16:55 +0100

Hi !

> you need two semaphores to serve

Thanks, now it works.
AXEL.
--
DLD? Slack? RedHat? SuSE? Linux? xBSD? WinX? 
GehIsDochEhWurscht: Stop the distri-war, make little users ;-)

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

From: "Z" <[EMAIL PROTECTED]>
Subject: Re: this sucks!
Date: Fri, 01 Dec 2000 10:20:48 +0100

Once upon a while [EMAIL PROTECTED] wrote:

> Ok, I've asked two really simple questions soo far in this group, but
> haven't received one single answer. I'm new to linux drivers, and I
> really can't figure out exactly WHAT you all Linux geeks thinks is
> soooo good with linux!? I've written drivers for
> Win95/98/ME/CE/NT4/2000 and that is heaven compared with this shit!
> 
> Open source - so what!? A good documentation can't be replaced by some
> nerdish source-code comments!
> 
> Will you please do two things right for once?
> 1. Tell me how to open a tty device from a kernel model.


If you just were able to ask a question! Would you please
explain what you intend to say by kernel model???

> 2. Buy a belt to those too-short and too-often weared jeans of yours.

Well have a belt, but no jeans, what's with you? Don't
you think it's dumb to offend others, just because you're
not able to do your homework?


-- 
Z ([EMAIL PROTECTED])
"LISP  is worth learning for  the profound enlightenment  experience
you will have when you finally get it; that experience will make you
a better programmer for the rest of your days."   -- Eric S. Raymond

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

From: [EMAIL PROTECTED] (Philip Armstrong)
Subject: Re: Seeking clarification on linux's handling of inodes
Date: 1 Dec 2000 09:25:18 -0000

In article <[EMAIL PROTECTED]>,
 <[EMAIL PROTECTED]> wrote:
>  I'm looking at the sources in fs/ and it looks like linux's 
>high-level fs interface uses a unified inode type for all fs's.
>This made me curious, because some fs's don't use inodes (eg,
>msdos's FAT fs), and then I saw that there's an "msdos" field 
>in a union in "struct inode" and explored further.  Does linux
>create inodes on the fly after mounting a filesystem that does
>not use inodes?  If so, where are these inodes stored?  

These are in memory inodes I would imagine. Which can be constructed
from whatever data is on the disc. There don't have to be inodes on
the disc for there to be inodes in the kernel representing part of an
on-disc filesystem.

Phil


-- 
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt


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

From: [EMAIL PROTECTED] (Philip Armstrong)
Subject: Re: gcc-2.95.2 forces ALL c++ programs to be GPL !!??!#
Date: 1 Dec 2000 09:21:33 -0000

In article <[EMAIL PROTECTED]>,
Stefaan A Eeckels <[EMAIL PROTECTED]> wrote:
>In article <902jk7$17e$[EMAIL PROTECTED]>,
>       [EMAIL PROTECTED] (Philip Armstrong) writes:
>> In article <[EMAIL PROTECTED]>,
>> Stefaan A Eeckels <[EMAIL PROTECTED]> wrote:
>> 
>> If you even link dynamically to a GPLd piece of code then you're
>> affected by the GPL. Thats why the LGPL exists.
>You are not. In case of dynamic linking, the only thing that
>gets distributed is your (compiled) code, hence the GPL does
>not apply. 
>The idea that the "user does the link" is equivalent to static
>linking is wishful thinking, and dangerous. It would make
>every application a derivative of the OS it runs on, which
>is so clearly nonsensical that it would never hold in -even
>a technology challenged- court.

Its never been tested in court, therefore any legal opinions such as
the above are just that; opinions.

I certainly wouldn't ship a piece of code which linked to a GPLd
library if I wanted to keep the source. The LGPL does exist for
precisely this purpose.

Phil
-- 
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt


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

From: [EMAIL PROTECTED]
Subject: S3fb
Date: Fri, 01 Dec 2000 09:19:52 GMT

I need to write a framebuffer driver for my PS/2. It has an S3 928
chipset. I also have J Garziks old S3fb code. Had anyone done this
before? I read somwehere that the framebuffer driver in linux cant be a
module. I should apply Mr Garzik's patch then? Then try to make that
work? That looks like a lot of rebooting to me. Considering that my
machine is a 486dx2 thats slowwwww tedious work! Whats the best way to
go about this? I need to use linux 2.2.17. I think I,ll try the S3 trio
code first. Maybe just add code to make it more generic S3?


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

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

From: "Richard Fabian" <[EMAIL PROTECTED]>
Subject: Deamons
Date: Fri, 1 Dec 2000 09:45:02 -0000

I would like to write a few servers for my game (that i am developing within
a MMORPG structure) and would like to konw how to make these servers into
daemons (this i so i can have the game running even if my machine isn't
logged into (seems fair enough to me))

So, either, can you tell me how to make a process go daemon; tell me where
to look to find out; or tell the ISBN of a book that would tell me how to do
it.

I like books, so ISBN would be the favourite result. next to that would be a
direct answer.
Thanks for listening.



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

From: "Richard Fabian" <[EMAIL PROTECTED]>
Subject: Re: Deamons
Date: Fri, 1 Dec 2000 09:50:04 -0000

whoops, I didn't read the group thouroughly enough ;-)


found this:
anyone got any other comments on daemons?

#v+
void
become_daemon()
{
        int i;

        if(fork()) {
                /* Parent */
                exit(0);
        }

        /* Start new session */
        setsid();

        /* Close low fd's and reopen as /dev/null */
        for(i=0; i < 3; i++) {
                close(i);
                open("/dev/null", O_RDWR, 0);
        }
}
#v-




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

From: Fernando Alfonso Villanueva <[EMAIL PROTECTED]>
Subject: ATM support on Linux
Date: Fri, 01 Dec 2000 11:11:02 +0100
Reply-To: [EMAIL PROTECTED]

Hi, I'm a tech student and I'm looking for some information about ATM
support on Linux.

First, I=B4ve found in the web that there=B4s an ATM API developed in
Switzerland called ATM on Linux, and the driver for the ATM adapter card
I've got (FORE PCA-200 E) is avaliable at Dresden University Web Page.
But this information seems to be a little obsolete, as I've heard that
Linux kernel versions 2.4 and late 2.3 include support for ATM as well
as the adapter driver. So, I would like you to confirm me wich is the
current state of the ATM support on Linux

Thank you

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

From: "Z" <[EMAIL PROTECTED]>
Subject: Re: Deamons
Date: Fri, 01 Dec 2000 11:30:30 +0100

Once upon a while "Richard Fabian" <[EMAIL PROTECTED]> wrote:

> whoops, I didn't read the group thouroughly enough ;-)
> 
> 
> found this:
> anyone got any other comments on daemons?
> 
> #v+
> void
> become_daemon()
> {
>         int i;
> 
>         if(fork()) {
>                 /* Parent */
>                 exit(0);
>         }
> 
>         /* Start new session */
>         setsid();
> 
>         /* Close low fd's and reopen as /dev/null */
>         for(i=0; i < 3; i++) {
>                 close(i);
>                 open("/dev/null", O_RDWR, 0);
>         }
> }
> #v-
> 
> 
> 

Read the FAQ of comp.unix.programmer at:
http://www.whitefang.com/unix/faq_toc.html
Question 1.7 gives the answer.
It is merrily the sollution you have posted.

-- 
Z ([EMAIL PROTECTED])
"LISP  is worth learning for  the profound enlightenment  experience
you will have when you finally get it; that experience will make you
a better programmer for the rest of your days."   -- Eric S. Raymond

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

From: Elizabeth Clarke <[EMAIL PROTECTED]>
Subject: Re: this sucks!
Date: 01 Dec 2000 10:19:50 +0000

[EMAIL PROTECTED] writes:

> Ok, I've asked two really simple questions soo far in this group, but
> haven't received one single answer. I'm new to linux drivers, and I
> really can't figure out exactly WHAT you all Linux geeks thinks is
> soooo good with linux!? I've written drivers for
> Win95/98/ME/CE/NT4/2000 and that is heaven compared with this shit!

With an attitude like that what do you expect?... P*ss off back to Windoze. 
Oh and whilst you're at it, get back under your bridge.

Beth


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

From: Anders Larsen <[EMAIL PROTECTED]>
Subject: Re: this sucks!
Date: Fri, 01 Dec 2000 12:00:18 +0100

[EMAIL PROTECTED] wrote:
> 
> Ok, I've asked two really simple questions soo far in this group, but
> haven't received one single answer.

Are you perhaps being too impatient?
You posted this complaint only 16 hours after having posted your
questions!
Please consider that usenet postings are propagated with some delay, and
the people you're attempting to reach are not necessarily located on the
same continent (time-zone) as you!

> I'm new to linux drivers, and I
> really can't figure out exactly WHAT you all Linux geeks thinks is
> soooo good with linux!? I've written drivers for
> Win95/98/ME/CE/NT4/2000 and that is heaven compared with this shit!

The Linux learning curve can certainly be steep, and it's a radically
different architecture, but IMHO, once you grok it, you'll no doubt
prefer it over Windblows.

> Open source - so what!? A good documentation can't be replaced by some
> nerdish source-code comments!

Are you trying to say source code comments are evil?

> Will you please do two things right for once?
> 1. Tell me how to open a tty device from a kernel model.
> 2. Buy a belt to those too-short and too-often weared jeans of yours.
> 
> /E. D.

Well, that attitude of yours is not going to earn you much sympathy here
- but you need that when asking for free advice!

BTW, you didn't explain why your "software modem driver" can't be
realized in user space - as you are going out on a serial line, it looks
as if you're talking to a real hardware modem...

In general, asking *specific* questions will give you more (useful)
response; crystal balls are rather uncommon   :-)

Anders Larsen

-- 
Windoze is a 24x7 system -- up for 24 days, 7 hours per day

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

From: ich <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.help,comp.os.linux.misc,comp.os.linux.questions
Subject: Re: USB and IrDA Development on Linux
Date: Fri, 01 Dec 2000 13:50:31 +0100

Hi Alan,
How about
 http://irda.sourceforge.net/
or
 http://www.lirc.org/index.html

[EMAIL PROTECTED]

Alan Po wrote:

> Dear All
>
> I am trying to develop an application by using a USB IrDA. I have found some
> information about USB development under Linux. Unluckily, I cannot find the
> information of IrDA on Linux.
>
> Would you give me some ideas, advices or resources to help me to solve my
> problem?
>
> Alan PO
>
> [EMAIL PROTECTED]


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

From: [EMAIL PROTECTED] (Lew Pitcher)
Subject: Re: this sucks!
Reply-To: [EMAIL PROTECTED]
Date: Fri, 01 Dec 2000 13:24:25 GMT

On Fri, 01 Dec 2000 08:50:17 GMT, [EMAIL PROTECTED] wrote:

>Ok, I've asked two really simple questions soo far in this group, but
>haven't received one single answer. I'm new to linux drivers, and I
>really can't figure out exactly WHAT you all Linux geeks thinks is
>soooo good with linux!? I've written drivers for
>Win95/98/ME/CE/NT4/2000 and that is heaven compared with this shit!
[rest of rant deleted]

Gee, but even Microsoft disagrees with you.

They prepared a position paper (check out ESR's analysis of the
"Halloween Documents") that indicated that Linux drivers were easier
to build (and build correctly) than MSWindows drivers were. I'd take
Microsoft's opinion on this one, if I were you.



Lew Pitcher
Information Technology Consultant
Toronto Dominion Bank Financial Group

([EMAIL PROTECTED])


(Opinions expressed are my own, not my employer's.)

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

From: Perego Paolo <[EMAIL PROTECTED]>
Subject: Getting the CPU load value in a LKM...
Date: 1 Dec 2000 15:19:22 GMT

Hi guys, it's me again! :) In my kernel module I'm writing, I need to
know the CPU load value calculated by the kernel. Linking timer.c file
in my module I think isn't the right things so, how can I have exported
for my module this value.

BTW I need the CPU load because I want try to prevent some processes do
a Denial of service against my host.

Thanx a lot

-- 
$>cd /pub
$>more beer

Perego Paolo <[EMAIL PROTECTED]>
Tutor at D.S.I. - University of Milan
I'm Linux zion 2.4.0-test9 #1 Fri Oct 20 14:09:56 CEST 2000 i586 unknown

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

Date: Fri, 01 Dec 2000 10:23:28 -0500
From: "John C. Griggs" <[EMAIL PROTECTED]>
Subject: Re: Global constructors in ELF so libs NOT CALLED!

Erik Westlin wrote:
> 
> John C. Griggs wrote:
> >
> > Erik Westlin wrote:
> > >
> > > Or am i wrong?
> >
> > Yes, you are wrong.
> >
> > > Then how to do it please?
> >
> > Tell us how you're doing it now and we can help.  Otherwise it is
> > impossible to guess what the problem might be.
> >
> > > Thank you!
> >
> > You are welcome.
> >
> > Regards,
> >         John Griggs
> 
> I though i would embaress this list by being to obvious :-) (or rather
> see at the bottom).
> 
> Also i see so many news messages i wish there was a way to
> speed read them and still manage to comprehend whats important.
> 
> Anyway to make things more explicit then.
> 
>>> Insulting description of basics of Object Oriented Programming SNIPPED <<<

Eric,

I think most of the people who responded understand what global objects
and constructors are.  What we need to know is how you are loading the
library - are you using dlopen() or are you simply linking it to your
code and how the "global object" that is giving you grief is declared
and defined.  

An ELF shared library with static objects should contain two default
functions (_init and _fini) that are responsible for initializing and
destroying (respectively) static objects.  If you are relying on the
linker to bring the library into your program, then I suspect there is
something wrong with the way you have your object declared and defined
or the way you are building the library.  If you are using dlopen(), it
should also call _init for you (see the man page), so my guess is that
the problem is still your code - either in the object itself or the way
you are accessing the shared library.

A good first guess is that you are not compiling your library as
Position Independant Code (PIC), but until we see your code and build
instructions, this is just a wild guess.

Instead of trying to teach us all the basics of Object Oriented
programming (which you don't seem to have that firm a grasp of anyway),
why don't you post your code (preferably the most simplified version you
can manage that still exhibits the problem) and the commands you are
using to compile and link it so _you_ might learn something (and maybe
even solve your problem?

Regards,
        John Griggs

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

From: [EMAIL PROTECTED]
Subject: How to install a NMI ISR
Date: Fri, 01 Dec 2000 16:32:53 GMT

Does anybody know how to install a NMI interrupt handler for Intel PII
and PIII motherboards.

I know you call call request_irq() and free_irq() for irq 0-15. But are
there similar routines for the NMI.

Thanks



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

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

From: Jerome Corre <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: PCMCIA card installation
Date: Fri, 01 Dec 2000 16:42:21 GMT

hi,

> 1. How should I verify that the driver for PCMCIA controller has been
> detected and installed correctly ? The laptop come with a Ricoh
cardbus
> controller.

if you look in the file /var/log/messages you will be able to see what
Card Services (the PCMCIA controler) says about your card. (just type
less /var/log/messages and scroll down to the relevant lines)

>
> 2. How should I install the driver for any PCMCIA card that is slotted
> in ?
>
Normally if Card Services is installed and configured properlly the
driver for your card should be loaded automatically. To download and
install the latest version with all the driver take a look at
//sourceforge.net/projects/pcmcia-cs/
or
http://pcmcia-cs.sourceforge.net/


> 3. If everything is fine, can I have hot swap of PCMCIA card just like
> Win98/2000 ? How should I stop the driver before the eject the card?
>
when card services is instaled properly the command
cardctl eject <socket nb>
will unload the driver for the card in the socket you've specified so
that you can eject it.

hope it helps


--
Jerome Corre


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

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

From: [EMAIL PROTECTED]
Subject: How to access DMI info from the BIOS
Date: Fri, 01 Dec 2000 17:09:36 GMT

Does anyone knows how to access the DMI info form the BIOS? Or how to
access the BIOS info in general?

Thanks


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

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: this sucks!
Reply-To: [EMAIL PROTECTED]
Date: Fri, 01 Dec 2000 17:18:28 GMT

On Fri, 01 Dec 2000 08:50:17 GMT, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>Ok, I've asked two really simple questions soo far in this group, but
>haven't received one single answer. I'm new to linux drivers, and I
>really can't figure out exactly WHAT you all Linux geeks thinks is
>soooo good with linux!? I've written drivers for
>Win95/98/ME/CE/NT4/2000 and that is heaven compared with this shit!

That could be why so many idiots write crappy drivers for these operating
systems, which in turn provide Microsoft with an endless supply of excuses for
the horrible instability. A convenient arrangement.

>Will you please do two things right for once?
>1. Tell me how to open a tty device from a kernel model.
>2. Buy a belt to those too-short and too-often weared jeans of yours.

Why should anyone help a troll? Why do you need to open a tty device from the
kernel anyway?  The usual way of hooking into tty drivers is to write a tty
line discipline module. A user space program opens the tty, and then uses a
special ioctl() to configure the registered line discipline on the tty.  The
line discipline can asynchronously receive data from the low level driver and
also send data to it. This lets you implement a custom protocol that will work
over anything that is represented as a tty device. 

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

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: Modify the scheduler to manage shortest-job first
Date: 1 Dec 2000 17:28:56 GMT

In article <[EMAIL PROTECTED]>,
Kaz Kylheku <[EMAIL PROTECTED]> wrote:

| In the Linux kernel, scheduling is done in fine-grained timeslices (short term)
| scheduling, not at the job level. So the ``longest job'' is a task which uses
| up a full timeslice of computation. So essentially here you are looking at the
| distinction between CPU versus I/O intensive tasks, rather than long or short
| jobs.

  All things being equal, you want to run i/o bound jobs ahead of cpu
bound jobs to get more throughput from the machine. Do reread the first
four words of this paragraph before making a fool of yourself by
describing what you would do in some other case...

  You can also make a case for running largest resident memory processes
first to clear memory, scheduling based on getting equal page fault
rates among processes, and many other things.

  It would be dead useful to have a tunable scheduler which could handle
special cases, but few people have the need and no one has done one
which could be also used as the default scheduler. I would love to have
a class for idle processes, the inverse of the realtime stuff we do
have. You could put in processes which would never compete for the CPU.
Setiathome comes to mind, but there are others.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
The line from the immutable past to the desired future is useful to
justify continuing to tack into the wind, making a major change in
course, or coasting into safe harbor. It is not a map of where you are
going, just how to get where you want to go.

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


** 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