Linux-Development-Sys Digest #760, Volume #7     Wed, 12 Apr 00 07:13:07 EDT

Contents:
  Alternative OS Implementation Languages (Christopher Browne)
  Re: Multi thread in Linux ("Mark Graybill")
  Re: Idea !!! ("Mark Graybill")
  Read combining on memory-mapped I/O? ("David Ellsworth")
  I've got one too! (well, almost!) ("David Ellsworth")
  Re: gcc assembly code (Martin Kahlert)
  RPMS directory (ravi Venkat)
  Re: where is the compile? ("Slavoj Hruska jr.")
  Re: mmap PROT_NONE proposal ([EMAIL PROTECTED])
  Re: Flash disk driver for Linux beginning programmer (Mark McDougall)
  Modules versions and insmod -f (Mark McDougall)
  using pipe FIFO under kernel ??? (philippe Defert)
  Re: struct passwd * (Josef Moellers)
  Re: Idea !!! (Josef Moellers)
  WRITE into sockets takes much time (Andreas Gies)
  Re: R�cuperation d'1 PID en C ("Martijn Lievaart")
  URGENT: Need help with French Canadian keyboard and keymap (Chuck Mattern)
  Re: porting WIN32 to UNIX (Linux) ([EMAIL PROTECTED])

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

From: [EMAIL PROTECTED] (Christopher Browne)
Crossposted-To: comp.os.linux.advocacy
Subject: Alternative OS Implementation Languages
Reply-To: [EMAIL PROTECTED]
Date: Wed, 12 Apr 2000 04:39:35 GMT

Centuries ago, Nostradamus foresaw a time when Donal K. Fellows would say:
>In article <[EMAIL PROTECTED]>,
>Tom Mitchell  <[EMAIL PROTECTED]> wrote:
>> Are there M3 compilers in the gnu world that are up to the task?
>>    At least three processor targets.
>
>I think the one I'd heard of (log ago, admittedly) used the gcc
>back-end, so targetting loads of processors shouldn't be a problem.

<http://research.compaq.com/SRC/modula-3/html/platforms.html> reports
successful builds on:
a) AIX386 (believe it or not!)
b) Digital Alpha
c) HP PA-RISC
d) AIX PPC
e) IRIX MIPS
f) Linux ELF ia-32
g) Sun SPARC

<http://m3.polymtl.ca/m3/binaries/> reports a similar set of
successful platforms.  

They do not specifically include any non-IA-32 Linux platforms, but
*do* include commercial UNIXes on pretty much all the important
platforms that Linux runs on, so that it *ought* to be feasible to get
the SRC implementation running on other architectures...

This is *precisely* why I mentioned M3 as an option; it might be well
and neat to propose writing an OS using CMU-Lisp or some Scheme, but
neither of *those* "general options" provide code generators for such
a diverse set of architectures.

The other option would be Eiffel.
-- 
Warning: Dates in calendar are closer than they appear. 
[EMAIL PROTECTED] <http://www.hex.net/~cbbrowne/pascal.html>

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

From: "Mark Graybill" <[EMAIL PROTECTED]>
Subject: Re: Multi thread in Linux
Date: Wed, 12 Apr 2000 05:21:23 GMT


Pliev wrote in message <[EMAIL PROTECTED]>...
>Hello All!
>Do You can give me  examples of  using function "pthread_create" and other
>functions in this group. Or, may be, You can to tell me an address, on the
>net,where I can to see this examples.
>Thanks!
>Best regards! Dima.
>
>

Example code I found:

/*
 * hello.c
 *
 * Create a very simple thread that says "Hello world", just
 * because it has to be here.
 */
#include <pthread.h>
#include "errors.h"

void *hello_world (void *arg)
{
    printf ("Hello world\n");
    return NULL;
}

int main (int argc, char *argv[])
{
    pthread_t hello_id;
    int status;

    status = pthread_create (&hello_id, NULL, hello_world, NULL);
    if (status != 0)
        err_abort (status, "Create thread");
    status = pthread_join (hello_id, NULL);
    if (status != 0)
        err_abort (status, "Join thread");
    return 0;
}

Here are some links:

Source code:
http://cseng.aw.com/bookdetail.qry?ISBN=0-201-63392-2&ptype=1482

Threading libraries w/ source:
http://pauillac.inria.fr/~xleroy/linuxthreads/
http://members.aa.net/~mtp/PCthreads.html

FAQ:
http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html
http://www.serpentine.com/~bos/threads-faq/
http://www.LambdaCS.com/newsgroup/FAQ.html

Programming & Development tools:
http://home.xnet.com/~blatura/linapp6.html#tools

Look for a C++ threading library that hides all threading details.  You just
inherit from ThreadContext and at override at least DoBusinessWork(), which
is the context of your thread processing.  It has simple singleton access to
runing a context (i.e. RunContext()), along with thread pooling and
exception handling.  The library is in Win32 version being ported (I wrote
it with porting in mind.)

Best,
Mark ([EMAIL PROTECTED])



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

From: "Mark Graybill" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: Idea !!!
Date: Wed, 12 Apr 2000 05:37:45 GMT


Kenneth Mankoff wrote in message ...
>>Akbar Avliyaev wrote:
>>
>>> The main problem of Linux is hardware support.
>>> On the other hand Windows supports most of hardware,
>>> most vendors ship products with drivers for windows.
>>> I'm thinking about making a way to use windows drivers in Linux.
>>> Have anyone thought about it?
>>> Is it reasonable/possible?


Emulation would be pretty slow, considering many things such as system
calls, device loading and I/O emulation, and matching processor ring
control.

The ideal is to develop a standard API for devices access.   Port the
underlying assembly that's specific to a platform, then the device companies
has to only write one driver to the standard API for all platforms
(including loading, chaining, and I/O control.)   If I could freeze time I
would do this myself.

IBM was working on this concept with their Warp for PPC operating system
(formerly known as WorkplaceOS), but the chief moron in charge (Gersner)
canned it because of timing.  It would have been the most sophisticated and
advanced operating system to hit the desktop computer market (originally
intended as a server), and IBM would be contributing advanced technology to
mankind once again.  But, there is quite a bit of RLHD (Rectal Lodging of
Head Disorder) infestation in IBM mgt. and marketing.

-Mark



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

From: "David Ellsworth" <[EMAIL PROTECTED]>
Subject: Read combining on memory-mapped I/O?
Date: Wed, 12 Apr 2000 05:54:19 GMT

I have an ATI All-in-Wonder Pro and I want to capture a raw, full-framed
NTSC video stream. The problem is, the stream goes at just under 18
Mbytes/sec, and reading from video memory seems to be limited to ~8
Mbytes/sec.

There doesn't seem to be any MTRR "read combining" mode, so I tried setting
the window of video memory I'm using for video capture
(0xE7000000-0xE7FFFFFF) to "write through". This *did* allow me to capture
the stream with no drop-outs, but there are two problems:

1) The read caching is undesirable; all I want is read combining. Under
certain conditions, cache hits never occurs, and I get an intact video
stream. But if I make certain unrelated changes to the code, cache hits
randomly occur and I get a partially garbled video stream.

2) The way Linux does memory management, reading from cached memory-mapped
I/O will randomly crash the kernel swap daemon (kswapd), locking the system.
I'm guessing it is trying to access a table element, but the table is only
sized for normal RAM. And physical addresses for memory-mapped I/O lie
outside this range.

An ideal solution for #1 would be an undocumented MTRR "read combining"
mode. But short of that, marking the appropriate area of the cache as dirty
between each block read should solve the problem. What I need to know is --
how do I do this in Linux?

As for #2... it seems I need to patch the kernel. But where do I start? I'm
hoping all I need to do is add a range check somewhere. But where?

=====
Please remove "NO" and "SPAM" from email address to reply through email



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

From: "David Ellsworth" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: I've got one too! (well, almost!)
Date: Wed, 12 Apr 2000 06:06:57 GMT

I've got a 36 GB HD :-) and I do have a 28 GB FAT32 partition at the
beginning of it, and a 7 GB ext2 partition at the end of it. I haven't had
any problems.

Perhaps the problem has to do with putting your FAT32 partition at the *end*
of the drive?

"Victor A. Grinberg" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> As you can tell I'm proud of my new 40 GB HD :-).  Here's my problem: I
> put a 24GB FAT32 partition at the end of the drive, for data, so I could
> access it from both win98 and linux.  Win 98 can get to it fine, which
> means the partition is properly formatted :-).  Linux can't mount it,
> however.  Is this a bug in linux FAT32 support??
>  -vg
>
> P.S. RedHat 6.2, stock kernel, i.e. 2.2.14.  The disk also has a boot
> win98 partition, an ext2 partition, and a swap partition, all of which
> linux can get to.
>
> P.P.S. Before posting this nonsense question I spent at least 20 minutes
> on dejanews looking for the answer, and the only thing I can conclude is
> that, perhaps, people with >33 GB drives don't use them for FAT32
> partitions..  Hmm..
>
> P.P.S. When replying by e-mail, don't forget to remove NOSPAM from the
> address (I sometimes do=;)
>
>



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

From: [EMAIL PROTECTED] (Martin Kahlert)
Subject: Re: gcc assembly code
Date: 12 Apr 2000 06:03:22 GMT
Reply-To: [EMAIL PROTECTED]

[Posted and mailed]

In article <8cvfqm$7te$[EMAIL PROTECTED]>,
        "Long" <[EMAIL PROTECTED]> writes:
> Hello,
> 
> Does anybody knows any link to where I can find a quick reference on GCC
> assembly code?  The instruction to this is a little different compared to
> Borland compiler which I can guess but just want to double check.  Thanks in
> advance.

http://www.cs.virginia.edu/~clc5q/links.html
especially
http://www.cs.virginia.edu/~clc5q/gcc-inline-asm.ps (or .pdf)

Bye,
Martin.


-- 
The early bird gets the worm. If you want something else for       
breakfast, get up later.

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

From: ravi Venkat <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux
Subject: RPMS directory
Date: Tue, 11 Apr 2000 23:11:49 -0700


Hi

I am building a software package in my home directory and I have
specified the --buildroot <homedir/build_dir>
and each time the RPM is built and written in
/usr/src/redhat/RPMS/<myproduct>/  directory
Is there a way in which I can specify where the RPM file can be written
instead of the default.
I check maximum RPM book and it is not there, I mean there is no shell
variable which has the name
RPM_RPMDIR (or some such thing)
Appreciate any pointers.

Ravi


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

From: "Slavoj Hruska jr." <[EMAIL PROTECTED]>
Subject: Re: where is the compile?
Date: Mon, 10 Apr 2000 14:45:29 +0200


Yangfei p��e ve zpr�v� <8cs2qi$3po$[EMAIL PROTECTED]>.
>Dear all:
>  please tell me where is the compile? I am a newer, thanks.
>best rgds
whatabout compile are you talking ?
There is just gcc and make ...
if you wana compile some c program you need gcc.
sample:
gcc ./source1.c -o target1
and you get executable file named target1



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

From: [EMAIL PROTECTED]
Subject: Re: mmap PROT_NONE proposal
Date: Wed, 12 Apr 2000 07:30:23 GMT

In article <[EMAIL PROTECTED]>,
  Nix <$}xinix{[email protected]> wrote:
> [EMAIL PROTECTED] writes:
>
> > I think it should allocate memory with the allocator, but not in the
> > swap file at all. So I can, say, mmap 256 MB with PROT_NONE, then unmap
> > and re-mmap to /dev/zero (or a file) as much as I want, without fearing
> > that a library using mmap(NULL, ...) has eaten up my space.
>
> This is, after all, what mmap() is for in the first place. Writable
> mmap()s do not go via the swap file --- not in Linux, at least. What
> would be the point? They go via the file being mmap()ed.

The point is, I want to use /dev/zero, not a file.  I think writable
mmaps to /dev/zero can be swapped out. My problem is, if a
mmap(NULL, ...) allocates an area that is adjacent to what I have
already mmap-ped, I would not be able to enlarge my mmap-managed heap.

> with your semantics, mmap with PROT_NONE would still eat up
> address space

That was what I wanted and what Win32's VirtualAlloc does. But you
said that if I mmap the same 4096 bytes of a file with write access to
different areas I'd not eat up swap file space? I'd lose memory
protection though.  Anyway PROT_NONE areas do eat up address space
with the current implementation, and since you can't do anythings
interesting with them, it makes sense to only waste address space, not
precious memory and/or swap space, for them.

bonz


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

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

From: Mark McDougall <[EMAIL PROTECTED]>
Subject: Re: Flash disk driver for Linux beginning programmer
Date: Wed, 12 Apr 2000 18:11:10 +1000

Long wrote:

> I got an error trying to run "insmod flashfx.o" after rebuilding the driver:
> FLASHFX: Cout not get major 31
> ./flashfx.o: init_module: Device or resource busy
> I had to reboot linux in order to load the driver again.  Is there any I can
> do to load the new rebuilt driver w/o having to reboot the machine
> everytime?

You need to "rmmod" the driver first. You have to make sure that nothing
is using the device (eg. it's not mounted, etc). And this all assumes of
course that it isn't broken and unloads nicely for you! :)

Regards,

--
|     Mark McDougall    |
|        Engineer       |
| Virtual Logic Pty Ltd |
| http://www.vl.com.au  |


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

From: Mark McDougall <[EMAIL PROTECTED]>
Subject: Modules versions and insmod -f
Date: Wed, 12 Apr 2000 18:19:43 +1000

Hi all,

I've developed a driver which is to be distributed in binary form (not
my call). I've compiled in versioning support under 2.2.5-15.

On a 2.2.12-20 system, I need to specify the "-f" option to insmod in
order to load the driver. Is this normal for *all* version mismatches,
or does it imply that my driver is not compatible??? BTW the driver
appears to work fine after insmod -f...

Assuming then that everything is as expected and my driver is fully
compatible, is there any way to have the driver load on-demand? This
works fine by aliasing the device-major-XX in conf.modules under the
2.2.5 kernel - I can simply access the device and have the module load
on demand - but doesn't work under 2.2.12. I'm assuming this is related
to the insmod problem/warning!?!

TIA,
Regards,

--
|     Mark McDougall    |
|        Engineer       |
| Virtual Logic Pty Ltd |
| http://www.vl.com.au  |

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

From: philippe Defert <[EMAIL PROTECTED]>
Subject: using pipe FIFO under kernel ???
Date: Wed, 12 Apr 2000 13:32:59 +0200
Reply-To: [EMAIL PROTECTED]

how do you use the pipe FIFO with kernel (open;read write, close)?
can you give me some few examples ?

thanks

philippe


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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: struct passwd *
Date: Wed, 12 Apr 2000 11:42:48 +0200

Nix wrote:
> =

> [EMAIL PROTECTED] (bill davidsen) writes:
> =

> > In article <[EMAIL PROTECTED]>,
> > Dan McGuirk  <[EMAIL PROTECTED]> wrote:
> > | bill davidsen wrote:
> > | >   Someone have the source for glibc handy? I don't, and I'm not g=
oing to
> > | > go grab it.
> > |
> > | You don't need the source, just the documentation.  From the glibc
> > | manual:
> >
> >   I'm looking at a Redhat 5.2 man page right now, and it doesn't say
> > anything like that, and even warns that you can get ENOMEM if there's=
 no
> > memory available to allocate.
> =

> Bear in mind that {passwd|name} database lookup routines can allocate
> memory themselves, and this has to be reported somehow.

At least my SuSE 6.3 says:

RETURN VALUE
       The getpwnam() and getpwuid() functions return the  passwd
       structure,  or  NULL if the matching entry is not found or
       an error occurs.

ERRORS
       ENOMEM Insufficient memory to allocate passwd structure.

Which leaves little to speculate.

-- =

Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1

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

From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: Idea !!!
Date: Wed, 12 Apr 2000 11:55:10 +0200

Mark Graybill wrote:

> The ideal is to develop a standard API for devices access.   Port the
> underlying assembly that's specific to a platform, then the device comp=
anies
> has to only write one driver to the standard API for all platforms
> (including loading, chaining, and I/O control.)   If I could freeze tim=
e I
> would do this myself.

This is called UDI (Universal Driver Interface).
I guess, it won't be in the interest of everyone involved to support
this concept.

-- =

Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1

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

From: Andreas Gies <[EMAIL PROTECTED]>
Subject: WRITE into sockets takes much time
Date: Wed, 12 Apr 2000 12:05:03 +0000

Hello there,

I have a problem with the communication between two
LINUX-programs, written in C. The communication is
realized by using sockets and building up a Server-
Client-structure.
If both programs (client is sending, server is
receiving) run on the SAME computer, the first WRITE
statement is executed in nearly half a second (!!)
which is absolutely too much time. The next WRITEs only
take less than a millisecond, if they follow
immediately.
This 'waiting time' occures at the beginning of any
message package.
If the two programs run on DIFFERENT computers, the 
problem does not exist, all WRITEs take only 1 ms.

What may be the reason for this? Does the connection
break if there is no communication for a few seconds ?
Is it possible to minimize this waiting time?

thanks a lot
  Andreas Gies

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

From: "Martijn Lievaart" <[EMAIL PROTECTED]>
Crossposted-To: 
fr.comp.lang.c,fr.comp.developpement,alt.comp.lang.learn.c-c++,comp.os.linux.development.apps
Subject: Re: R�cuperation d'1 PID en C
Date: Wed, 12 Apr 2000 12:09:43 +0200
Reply-To: "Martijn Lievaart" <[EMAIL PROTECTED]>

[ Fup to a.c.l.l.c-c++ ]

"Julien Curto" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Salut,
>

Salut,

PLEASE, don't post linux related questions to alt.comp.lang.learn.c-c++.
This group is about the standard C/C++ languages only.

M4
--
Contrary to popular believe, the number of the beast is not 666,
it's 555-37689.
Please post replies to this newsgroup. If you must reach
me by email, use <newsgroup-name> at greebo.orion in nl.




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

Reply-To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED] (Chuck Mattern)
Subject: URGENT: Need help with French Canadian keyboard and keymap
Crossposted-To: comp.os.linux.setup
Date: Wed, 12 Apr 2000 10:29:38 GMT

I'm in need of some quick assistance due to a time line imposed from
above.  I need to deploy a large number of i386 clients running Linux as
front ends to an HP-9000 machine in Quebec.  First hurdle: I don't speak
French.  I have gone through as much as I can of the Francophone HOWTO
and it looks like I need to be loading a qc keymap instead of the
es.kmap.gz one that I have loaded for my Spanish implementation.  Problem 
is I can't locate such a keymap file on the RedHat 6.1 release I am
working from.  I have an IBM French Canadian keyboard using the QWERTY
layout.

Can anyone offer any assistance with the location of a keymap file,
words of wisdom or any experience in this area?

Thanks in advance,
Chuck
-- 
=============================================================================
|Chuck Mattern           | "That which does not kill us, makes us stronger."|
|[EMAIL PROTECTED]   | -Friedrich Nietzsche-                            |
=============================================================================

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

From: [EMAIL PROTECTED]
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.development,comp.os.ms-windows.programmer.win32
Subject: Re: porting WIN32 to UNIX (Linux)
Date: Wed, 12 Apr 2000 10:25:31 GMT

...method can then implement whatever is needed to wake up
> the target object's internal thread---such as signalling a single
internal
> condition variable or semaphore or what have you.  Otherwise you end
up with a
> situation where you need notification from two or more objecs that all
export
> event handles. So what do you do? WaitForMultipleObjects. Oops!
>
> --
> #exclude <windows.h>
>

Thanks for the pointers.  I've implemented a class to handle
multi-resource access but was wondering if there was a standard way of
implementing timeouts while waiting on semaphores or mutexes.

Cheers
Al


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

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


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