Linux-Development-Sys Digest #945, Volume #6      Fri, 9 Jul 99 22:14:36 EDT

Contents:
  Re: NT to Linux port questions (Rolf Fokkens)
  MidiShare source code publishing (MidiShare)
  Driver for AMCC 5933 S ("Patrick Rust")
  Need help with network (Robert Williams)
  Re: kernel programming (Scott Lanning)
  Irq controlling (Netnoice)
  Re: linx vs hurd (Adam Di Carlo)
  Re: egcs idiocy (Nick Ambrose)
  Does X assume bandwith is good? (Pete)
  "DbgPrint" in Linux? (Yung-Hsiang Lu)
  Re: ASSEMBLER problem
  Re: NT to Linux port questions (Tristan Wibberley)
  Re: NT to Linux port questions (Erik de Castro Lopo)
  slowing down the processes (Mahesh)
  undeletion (MENON Jean-Francois)
  Re: Does X assume bandwith is good? (Peter Samuelson)
  Re: undeletion (Peter Samuelson)

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

From: Rolf Fokkens <[EMAIL PROTECTED]>
Subject: Re: NT to Linux port questions
Date: Fri, 09 Jul 1999 17:13:22 +0200

Dave Rathnow wrote:

> I have two questions:
>
> This application is event driving and uses the NT WaitForMultipleObjects
>
> system call to wait on an array of events handles.   The array
> contains handles to a number of different event objects including NT
> Events
> timers, and thread handles.  Does Linux have something similar.  ie. a
> mechanism
> that allows a thread to wait for any one of a number of event to signal?
>

UNIX/Linux has two kinds of events, if I'm correct: signals, and state
changes of file descriptors. The select () system call waits for specified
file descriptors to change state (there's data available on a fd to be read
from, or there space available on an fd to write to), which makes select
() a little familiar to WaitForMultibleObjects. When signals are sent to
the proces while doing select (), the select () is aborted and the signal
can be handled.

>
> The second questions is about exception handling.  This application is
> written
> in C++ and makes use of M$VC C++'s facility to translate structure C
> exceptions
> to C++ exceptions.   Does such an animal exist in Linux or is that
> something
> that would be specific to the compiler?
>

I don't know the answer to this question.



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

From: [EMAIL PROTECTED] (MidiShare)
Crossposted-To: comp.os.linux.development.appls
Subject: MidiShare source code publishing
Date: Fri, 09 Jul 1999 18:47:20 +0200

============================================================================== 
MidiShare Source Code Publication
============================================================================== 
MidiShare is a multi-platforms musical operating system developped by
the Grame's Computer Music Research Laboratory. It awards the Apple
Trophy (1989), the Paris-City price (1990) and more recently, the Max
d'Or at the Bourges International Musical Software Competition (1999).
                                                     
Freely available on the Internet to developers since several years, it is now
supported by many projects. Companies such as Grame, IRCAM, SonyCSL,
Cakewalk, Mil-Productions, but also universities  (Paris VIII, Stockholm
Royal Institute of Technology,  Darmstadt University of Technology) and
individual developers have included MidiShare as the base architecture of
their MIDI developments.
                                                     
The MidiShare Source Code is now publicly available under the GNU Library
General Public License (LGPL)
                                                     
This new policy is the result of various requests which mainly concern
porting on new platforms and we expect to get first a new kernel for
GNU/Linux. It is also intended to maintain the different releases and to
improve the kernel in a more reactive way.
                                                     
The MidiShare Project is now opened to a collaborative development
over the Internet. For more information see at:
                                                     
http://www.grame.fr/MidiShare/
or
http://putney.music.uiowa.edu/~grame/Public/MidiShare/

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

From: "Patrick Rust" <[EMAIL PROTECTED]>
Subject: Driver for AMCC 5933 S
Date: Fri, 9 Jul 1999 18:36:35 +0200

Dear Linux-System developer,

I have a little problem !
How can I write in the Outgoing Mail Box (OMB1..4) and how can I read the
Incoming Mail Box (IMB1..4) from the Kernel Space?

The source code for my driver is nearly finished, but I can't read or write
the Operation-Registers!

If you would have some little bit source code for me, I would be very
pleased.

Thank you.

Patrick Rust

P.S. sorry for my bad english! :-)



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

From: Robert Williams <[EMAIL PROTECTED]>
Subject: Need help with network
Date: Fri, 09 Jul 1999 11:59:36 -0600

I am having a difficult time setting up my network with
ipchains.  I have the excellent how-to, but I can not
get it to work.

What I have:

A private network with IP's of 192.168.2.0 and 4
genuines IP network addresses.

I have 2 network cards in my Linux machine and I want
to let the computers on the 192.168.2.0 network access
the internet with MASQ.  I have 4 genuine IP addresses
and I set my LAN Modem to one of these and one of the
ethernet cards to another real IP address.  I can
access the net fine from the Linux box, but I can not
get the other machines to see the internet.  I also
need to set this linux box up as a FTP server.

I have tried with ipchains and route, but I can not get
it all to work together.  I have compiled the right
features into the 2.2.10 kernel.

Please help.

--
Robert Williams        [EMAIL PROTECTED]
Jarob Consulting       [EMAIL PROTECTED]
Provo, Utah




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

From: [EMAIL PROTECTED] (Scott Lanning)
Subject: Re: kernel programming
Date: 8 Jul 1999 22:47:07 GMT

dave frost ([EMAIL PROTECTED]) wrote:
: I am just about getting into compilers and os programming.  I
: would realy like to have a very small version of linux.  Posiibly
: a very old version so that i can install bug fixes etc to help
: learning.

Check out ELKS--the Embeddable Linux Kernel Subset. Otherwise, it
shouldn't be too hard to find an old version of Linux on some FTP
site somewhere. On the LDP website, there are several projects.
Maybe some have things you'd be interested in (I'll look up URL
if you can't find it).

--
Scott Lanning: [EMAIL PROTECTED], http://physics.bu.edu/~slanning
"If lightning is the anger of the gods, the gods are concerned mostly
with trees." --Lao Tse

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

From: [EMAIL PROTECTED]  (Netnoice)
Subject: Irq controlling
Date: Fri, 09 Jul 1999 17:06:36 GMT
Reply-To: netnoice-NOSPAM-#@freemail.it

Hi,
I'm just trying programming an IRQ on a linux-box, I found the
functions request_irq(9) and free_irq(9), which should be usefull; but
I can't understand why my code doesn't compile (well... it just
doesn't link); infact it tell me that function doesn't exist such as I
forgot including same libs; but those function should belong to
kernel, they aren't in any libs.

Help me please.

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

From: Adam Di Carlo <[EMAIL PROTECTED]>
Crossposted-To: gnu.misc.discuss
Subject: Re: linx vs hurd
Date: 09 Jul 1999 13:18:34 -0400

[EMAIL PROTECTED] (Christopher Browne) writes:

> *No files?* That's a bit more original than the ideas I've seen so
> far.
> 
> Although I guess that arguably allows one to correspond this to a DBMS
> that doesn't allow BLOBs.

No, it's all about generalizing files and directories.  They are all
just nodes which can have subnodes.  This doesn't mean that there are
no files, just that there is really no distinciton between files and
directories.  That is, a file is just a node which has no children.

--
.....Adam Di [EMAIL PROTECTED]<URL:http://www.onShore.com/>

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

From: Nick Ambrose <[EMAIL PROTECTED]>
Subject: Re: egcs idiocy
Date: Fri, 09 Jul 1999 11:41:19 -0700



John McKown wrote:

> On Tue, 6 Jul 1999 13:22:27 -0400, SV <[EMAIL PROTECTED]> wrote:
> >
> >I feel like the whole linux is becoming just a heap
> >of bugfixes piled up by a bunch of non-professional
> >bafoons
> >
> >Cordially,
> >SV
>
> Just remember. Those who can, do. Those who can't, teach. Those who can
> do neither, critize.

And those who cant teach teach teachers ;)

Nick



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

From: Pete <[EMAIL PROTECTED]>
Subject: Does X assume bandwith is good?
Date: Fri, 09 Jul 1999 20:31:05 +0000
Reply-To: [EMAIL PROTECTED]

Hi 

I'm afraid I'm pretty bloody ignorant about X.

Best regards
Pete M.

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

From: [EMAIL PROTECTED] (Yung-Hsiang Lu)
Subject: "DbgPrint" in Linux?
Date: 9 Jul 1999 18:55:33 GMT

Hi,

Is there anything like Windows NT "DbgPrint" in Linux?  It allows
programmers to print debugging information through a serial cable to
another computer.

Thanks!

-- 
                                                   Sincerely,
                                                   Yung-Hsiang Lu
                                                   [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] ()
Subject: Re: ASSEMBLER problem
Date: Fri, 9 Jul 1999 23:52:03 +0100

In article <[EMAIL PROTECTED]>,
 Vincent <[EMAIL PROTECTED]> writes:
|> How can I put a varaible in a register
|> 
|> void toto()
|> {
|>     int val=0;
|> 
|>     __asm__("mov val,ax");
|>     printf("%d\n", val);
|> }
|> 
|> When I compil, I've this message: unindentifer ax !!!
|> 
|> I've tryed with %ax but the variable val is always 0 but it's compil and
|> run.

Do you want to put the value of the variable in the register, or to put the value
of the register in the variable.  If you want to see the value of eax, then this
should work, but bear in mind that the result is pretty meaningless and
compiler/system/phase of the moon dependant and the code assumes you are using
gcc/egcs and gas.

#include <stdio.h>

int main(void){
   int val=0;
   asm("movl %%eax,%0\n" : "=g"(val): : "eax" );
   printf("%d\n",val);
   return 0;
}
/*
brief explanation:
movl (move long, same as an int on x86, 32 bits)
%%eax, (from eax, the 32bit accumulator.  The %% is needed to escape the %, gas
       expects it to be refered to as %eax)
%0     (to the first varaible referenced (val))
\n     (escaped newline to keep the assembler source looking pretty)
: "=g"(val):  (destination varaible (the = sign indicates this), the g indicates
       that the compiler can use any old where so long as it doesn't interfere,
       and (val) indicates that the variable to use is val)
: :   (there are no source variables, if there were it would look like :"g"(foo):
: "eax"); (the last field indicates any registers that may be clobbered, you dont
           actually touch eax, but this tells the compiler to save it 
           just in case.)
*/

Have fun,
Derry Hamilton
[EMAIL PROTECTED]

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

From: Tristan Wibberley <[EMAIL PROTECTED]>
Subject: Re: NT to Linux port questions
Date: Thu, 08 Jul 1999 23:04:46 +0100
Reply-To: [EMAIL PROTECTED]

Dave Rathnow wrote:
> 
> Hi,
> 
> I'm in the process of redesigning an app that currently runs on NT
> but will be ported to Linux eventually.  Both platforms will alway need
> to be supported so there will obviously be some conditional compilation
> but since this app was originally implemented for NT, I'm concerned that
> 
> there may some NTism that don't have an equivalent under Linux.
> 
> I have two questions:
> 
> This application is event driving and uses the NT WaitForMultipleObjects
> 
> system call to wait on an array of events handles.   The array
> contains handles to a number of different event objects including NT
> Events
> timers, and thread handles.  Does Linux have something similar.  ie. a
> mechanism
> that allows a thread to wait for any one of a number of event to signal?

The particular elegance of a UNIX-like system is what's often called the
"everything is a file" principle.

Your events occur through files (the event happens, and the thing which
is going to tell your app about the event pushes the data through what
your app sees as file. Though you will want to hide the details for
cross-platformability. This means that you just have to wait for the
files which will provide the events you want to become readable (ie,
have data for you to read) - you do this by means of the standard select
call.

There are times where your events will only be made easily available
through a shared library (at the discretion of whoever wrote the
library). This means you can't always wait on all combinations of event
sources unless you use multiple threads which one just signals the
operation thread when it stops waiting and tells it to weave it's magic
on what you just found to be available.

> The second questions is about exception handling.  This application is
> written
> in C++ and makes use of M$VC C++'s facility to translate structure C
> exceptions
> to C++ exceptions.   Does such an animal exist in Linux or is that
> something
> that would be specific to the compiler?

If you want to be cross-platform you'll need to adhere to standards,
MSVC++ has lots of non-standard extras that aren't found in GNU C/C++,
ans GNU C/C++ has lots of non-standard extras that aren't found in
MSVC++. Don't use them on any part of the app that is to be compiled on
both platforms. An exception mechanism in C is not included in standard
C, so you'll have to implement it yourself.

To make it cross-platform, I would suggest writing a common codebase
that uses only standard C/C++, but uses a well-defined abstract
interface to the system which you will define, you then write two
implementations of this interface (a Linux/UNIX one and a Win32 one) -
or you can use 3rd party interaces.

If you have a GUI on it, I wouldn't suggest using a cross-platform GUI
toolkit, as your app may not fit into one or the others GUI standard.
Instead, give your application guts a well structured external interface
as if it were being written as a 3rd party library, and write a GUI
layer for each platform. This is more work, but making thing XP does
take work.

            +-----------+
            | GUI Layer | Draws the interface to screen, provides
            +-----+-----+ functions to the app guts to draw XP bits
                  |
         +--------+--------+
         | (BIG) App Guts  | Does all the work
         +--------+--------+
                  |
        +---------+---------+
        | Your system layer | Contains system specific stuff like
        +---------+---------+ *how* to wait for events
                  |
               +--+-+
               | OS |
               +----+

If you don't intend to maintain and improve the app (possibly porting to
other platforms too), much of this can be safely ignored to reduce the
initiatial workload, but later work on the app will be harder.

-- 
Tristan Wibberley

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

From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Subject: Re: NT to Linux port questions
Date: Sat, 10 Jul 1999 09:17:35 +1000

Dave Rathnow wrote:
> 
> Hi,
> 
> I'm in the process of redesigning an app that currently runs on NT
> but will be ported to Linux eventually.  Both platforms will alway need
> to be supported so there will obviously be some conditional compilation
> but since this app was originally implemented for NT, I'm concerned that
> there may some NTism that don't have an equivalent under Linux.
> 
> I have two questions:

<snip>

> The second questions is about exception handling.  This application is
> written
> in C++ and makes use of M$VC C++'s facility to translate structure C
> exceptions to C++ exceptions.   

The EGCS version of the C++ compiler has real exceptions, that from 
what I've heard actually work.

> Does such an animal exist in Linux or is that
> something that would be specific to the compiler?

What you are describing seems to be a Microsoft-ism. If you 
can live with the real exceptions of g++ you should be OK.

Erik
-- 
+-------------------------------------------------+
     Erik de Castro Lopo     [EMAIL PROTECTED]
+-------------------------------------------------+
The Earth is around 70% water. Fish rule the seas.
Humans are over 90% water. It's only a matter of time.

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

From: Mahesh <[EMAIL PROTECTED]>
Subject: slowing down the processes
Date: Fri, 09 Jul 1999 19:28:32 -0400


Hi,

I've just installed Red Hat 5.0 (kernel 2.2.5) on a laptop. and this is
my first time. I managed to get it on to the network. But it becomes
very slow when it is not hooked to the network. (PC card is 3COM
LAN+modem). It takes more than a minute just to open a terminal in
xwindows and more than 4 minutes to start xwindows. During this time if
I hook it to the network it starts immediately. Any ideas what could be
causing this. During the shutdown process I noticed that it failed to
shutdown httpd. Is it in anyway relevant to the above problem.

And also if you can, please let me know where can I find the
documentation for ezppp set up.

Thanks a lot

-Mahesh




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

From: MENON Jean-Francois <[EMAIL PROTECTED]>
Subject: undeletion
Date: Sat, 10 Jul 1999 01:14:07 +0000

Hello
I would like to try to implement my own version of an undelete facility
on my linux, and I read in  "The linux-kernel mailing list FAQ " :

11.How about an undelete facility in the kernel?
        (REG) This idea keeps being raised again and again. There is no
need for kernel support to do this. You can easily do it in user space.
There are
        replacement versions of the rm utility which will move/copy
files to a wastebasket area instead of actually deleting. If you're
really keen, you could
        implement a wrapper for the unlink system call, and use
LD_PRELOAD to override the function for all applications.

Can someone help me about how to implement a wrapper ? and how to use
this mysterious LD_PRELOAD ?

thx

jf





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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: Does X assume bandwith is good?
Date: 9 Jul 1999 20:28:40 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[Pete <[EMAIL PROTECTED]>]
> Does X assume bandwith is good?

Depends on what you mean by "good".  I think it performs better under
low bandwidth than Citrix Winframe or pcANYWHERE, but I haven't
verified this.  Also there exists the X extension LBX (Low-Bandwidth X)
which tries to minimize network traffic at the cost of some extra CPU
time at each end and a little of the responsiveness.  I haven't used
LBX so far so I can't comment on how well it works.

> I'm afraid I'm pretty bloody ignorant about X.

And about Usenet hierarchy, it seems: FYI this was probably a
comp.windows.x question.  HTH.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: undeletion
Date: 9 Jul 1999 20:46:20 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

  [LKML FAQ]
> > If you're really keen, you could implement a wrapper for the unlink 
> > system call, and use LD_PRELOAD to override the function for all
> > applications.
[MENON Jean-Francois <[EMAIL PROTECTED]>]
> Can someone help me about how to implement a wrapper ? and how to use
> this mysterious LD_PRELOAD ?

The LKML FAQ says "if you're really keen" for a reason.  �Ici y a-t-il
de b�tes dangereuses� which is my poor paraphrase for "Here there be
dragons."

LD_PRELOAD is an environment variable which tells the dynamic linker
(which gets loaded as part of pretty much every executable on your
system) to load a custom shared library before loading whatever shared
libs a program normally uses, so that the custom library can provide
symbols (i.e. function/variable names) that override normal library
symbols.  In this case you would override the C function unlink() which 
removes a file.  Write your own .c file with a custom unlink() in it,
compile it into a shared library:

  gcc -O -shared -fPIC -o libnodelete.so nodelete.c

Then set LD_PRELOAD=/some/path/to/libnodelete.so before running any
programs, and arrange to have them inherit the value of LD_PRELOAD.

This will not work for setuid binaries.  Why not is left as an exercise
for the reader.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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


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