Linux-Development-Sys Digest #173, Volume #7      Wed, 8 Sep 99 19:14:20 EDT

Contents:
  egcs and stropts.h (David Grothe)
  Linux Kernel Modules 2.2.12 question ([EMAIL PROTECTED])
  Re: glibc-2.1.2 (Allin Cottrell)
  Re: spin lock (Kaz Kylheku)
  Re: glibc-2.1.2 (Andreas Jaeger)
  Re: More kind words from M$. (Phil Howard)
  Re: XServer (Kaz Kylheku)
  Re: dev->hard_start_xmit (Kaz Kylheku)
  Re: egcs and stropts.h (Andreas Jaeger)
  Zoltrix Plus IO != 0x20c &&  IO != 0x30c ([Dark])
  Re: Statically linked binaries - why so big? (Greg Franks)
  Re: increasing process limits ("Donald Setlur")
  Re: Unix and the ISO/IEC 14882-1998 Standard C++ Library (Dietmar Kuehl)
  Re: Embedded X-server anyone ? ? (Mitch Blevins)
  Re: Statically linked binaries - why so big? (Paul Jackson)
  Re: acurate timing ("Ron Ruble")
  Re: watchdog - multiple instances (Andrew Daviel)

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

From: David Grothe <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: egcs and stropts.h
Date: Wed, 08 Sep 1999 09:43:24 -0500

Can someone explain to me the purpose of egcs putting in place a file
named /usr/include/stropts.h?  This file contains the standard SVR4 type
user level prototypes for STREAMS constructs.  Any attempt to actually
use them results in the linker error:

warning: getmsg is not implemented and will always fail.

My problem with this is that there is a _real_ STREAMS package for Linux
(http://www.gcom.com/LiS) and these dummied up include files get in the
way when LiS is installed.

Maybe the compiler maintainers would like to coordinate a bit on this?
Maybe they would like to distribute the LiS version of <stropts.h>?
Maybe also the system call versions of these functions?  (There _are_
reserved system call slots for getmsg/putmsg.)

-- Dave


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

From: [EMAIL PROTECTED]
Subject: Linux Kernel Modules 2.2.12 question
Date: Wed, 08 Sep 1999 17:50:25 +0200

Hi folks,

I try to compile a module under 2.2.12 that uses the get_user() and
put_user() macros. I included asm/uaccess.h and everything else.
Compilation works very fine. But when I try to
'insmod' the module I get the error that the __get_user_X() can't be
resolved.
I have the same problem on using memcpy()...

What's going wrong ?


Thanks a lot!

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

From: Allin Cottrell <[EMAIL PROTECTED]>
Subject: Re: glibc-2.1.2
Date: Wed, 08 Sep 1999 14:43:51 -0400

Paul Kimoto wrote:

> : In case you decide to compile glibc yourself you need to read the file
> : INSTALL.  It will explain among other things which tools are
> : necessary.  The most important one is the compiler.  Although other
> : versions might work it is recommended to get gcc 2.96.
> 
> Should this say "gcc 2.95"? 

It should say "gcc 2.95.1".

-- 
Allin Cottrell
Department of Economics
Wake Forest University, NC

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: spin lock
Reply-To: [EMAIL PROTECTED]
Date: Wed, 08 Sep 1999 16:06:17 GMT

On Wed, 08 Sep 1999 12:36:40 +0200, Gerhard Fuernkranz
<[EMAIL PROTECTED]> wrote:
>So I'm wondering which kernel parts are already protected
>by the global lock and which have to protect themselves
>by using spinlocks?

When you are writing new code, you should use your own fine-grained locks, and
try not to rely on surrounding locks that may disappear from under you.

You should use spinlocks to only protect brief critical regions of code. Larger
critical regions can be protected by semaphores---but semaphores only protect
tasks from each other, not tasks versus interrupts.

Byt the way I've hacked up an experimental implemenation of mutexes and
conditions that are directly based on spinlocks. It can simplify mutual
exclusion and synchronization. http://users.footprints.net/~kaz/lmc.html

You can use these mutexes to protect shared data against concurrent access by
multiple processors, regardless of their execution context (task versus
interrupt). A task can atomically give up a mutex to wait on a condition.  A
conditon may be signalled by anything: a task or an interrupt.

The library hides the explicit management of processor flags, wait queue
insertion/deletion, task state, checking for signals, etc. 

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

From: Andreas Jaeger <[EMAIL PROTECTED]>
Subject: Re: glibc-2.1.2
Date: 08 Sep 1999 21:40:58 +0200

>>>>> Jonathan Stott writes:

 > In article <vhdB3.16661$[EMAIL PROTECTED]>,
 > A Guy Called Tyketto <[EMAIL PROTECTED]> wrote:
>> 
>> I see the full release of glibc-2.1.2 is now on egcs.cygnus.com,
>> and alpha.gnu.org. I've found no docs, or announcements that it has been

 > If its on alpha.gnu.org and not prep.ai.mit.edu, then it's probably not
 > released yet.  alpha.gnu.org has pre-release software (the server is named
 > "alpha" for a reason).  That would explain the missing doc's too.

It is released.  Take my word for it.

Andreas
-- 
 Andreas Jaeger   [EMAIL PROTECTED]    [EMAIL PROTECTED]
  for pgp-key finger [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Phil Howard)
Subject: Re: More kind words from M$.
Crossposted-To: comp.os.linux.misc
Date: Wed, 08 Sep 1999 15:54:02 GMT

The notation scheme results in "sz" used for many names (null terminated
strings).  The Hungarian language itself has many words and names with
"sz".  I would bet this had an influence, as it would have made the variable
names kinda look like some form of Hungarian prose to someone who did not
know Hungarian, but noted all the "sz" strings around.

Words beginning with "sz" are common enough in Hungarian.  Some examples:

szemantika      semantics
szintaxis       syntax
szoftver        software
szorzat         product
szubrutin       subroutine



On Tue, 07 Sep 1999 22:17:59 -0700 David Schwartz ([EMAIL PROTECTED]) wrote:

|       My recollection is that it was named for the ethnicity of its
| originator, not the content of his native language.
|
|       DS
|
| Peter Samuelson wrote:
| > 
| > [Brett Hall <[EMAIL PROTECTED]>]
| > > Well as long as you don't count all the gobbledy-gook the prepend to
| > > every word to tell you what kind of word it actually is ;)
| > 
| > LOL!
| > 
| > I have it from reliable sources that the real Hungarian language does
| > *not* do this.... (:
| > 
| > --
| > Peter Samuelson
| > <sampo.creighton.edu!psamuels>

--
Phil Howard           KA9WGN
[EMAIL PROTECTED] [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: XServer
Reply-To: [EMAIL PROTECTED]
Date: Wed, 08 Sep 1999 16:09:54 GMT

On 8 Sep 1999 12:26:57 GMT, J_Bolz <[EMAIL PROTECTED]> wrote:
>Hi @ll!
>
>I have a question, that sounds simple but it isn't:
>
>How does a XServer work?

Try comp.windows.x.

>e.g. Which program sends the data to the server?

An X server obtains its inputs from the keyboard, mouse and client programs
(X applications).

>       Or how does the server get his data and where does he put them?

The data from the clients comes over a socket interface.

>       If I send a command to the server (e. g. draw a blue circle) what
>is the server doing?
>       Does he simple draw the circle in blue or have I to say: "put a
>dot on xy in color
>       BLUE)?

The X protocol has fairly high level graphics primitives, like polylines, etc.
Yo do not have to draw pixel by pixel. Drawing pixel by pixel is excruciatingly
slow since you end up spamming the server with small messages.  If you need to
render sophisticated raster graphics, it's better to construct images on the
local end and transmit them to the X server in one operation like XPutImage.

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: dev->hard_start_xmit
Reply-To: [EMAIL PROTECTED]
Date: Wed, 08 Sep 1999 15:51:37 GMT

On Wed, 08 Sep 1999 11:40:41 GMT, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>hi all,
>
>i am trying to make a kernel network module. ive added to syscalls to

What exactly are you writing? A protocol? Or a device driver?  The term
``network module'' is too vague.

>send and recieve. however when i try to send using dev->hard_start_xmit

You should probably use a the proper interface function dev_queue_xmit().  The
dev->hard_start_xmit function isn't meant to be called directly. If you call
the driver's transmit function directly, you are jumping the queue. Also,
if the driver is busy, your packet will be rejected. dev_queue_xmit() takes
care of the queuing.

>the function returns 0 but the packet is not recieved by the
>destination. i used dev->hard_header to make the ethernet headers. then


>locked the skb and sent it to hard_start_xmit. my recieve function
>recieves can recieve ip packets but does not recieve my packets. What am
>i doing wrong ?

Maybe you are calling dev->hard_header() incorrectly.  Since your protocol
probably doesn't support ARP, you have to provide a full destination
MAC address. There has to be enough headroom in the sk_buff to build
the header, etc.

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

From: Andreas Jaeger <[EMAIL PROTECTED]>
Subject: Re: egcs and stropts.h
Date: 08 Sep 1999 18:24:56 +0200

>>>>> David Grothe writes:

 > Can someone explain to me the purpose of egcs putting in place a file
 > named /usr/include/stropts.h?  This file contains the standard SVR4 type
<stropts.h> comes with the GNU C library.
 > user level prototypes for STREAMS constructs.  Any attempt to actually
 > use them results in the linker error:

 > warning: getmsg is not implemented and will always fail.
That's ok.
 > My problem with this is that there is a _real_ STREAMS package for Linux
 > (http://www.gcom.com/LiS) and these dummied up include files get in the
 > way when LiS is installed.

 > Maybe the compiler maintainers would like to coordinate a bit on this?
 > Maybe they would like to distribute the LiS version of <stropts.h>?
 > Maybe also the system call versions of these functions?  (There _are_
 > reserved system call slots for getmsg/putmsg.)
When an official kernel support these, glibc will support these as
well.

Andreas
-- 
 Andreas Jaeger   [EMAIL PROTECTED]    [EMAIL PROTECTED]
  for pgp-key finger [EMAIL PROTECTED]

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

From: [Dark] <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,redhat.kernel.general
Subject: Zoltrix Plus IO != 0x20c &&  IO != 0x30c
Date: Wed, 08 Sep 1999 17:31:12 GMT

I tried to put a Zoltrix Radio Plus to work in my linux box [RH6], but it
seems the driver (radio-zoltrix.o) only accepts 0x20c and 0x30c as possible
values for IO. I know this should be ok, but this one comes with another
set of IO, 0x300, 0x320, 0x340 and 0x360.

I already tried to modify the driver but having no success.

Everything I need to change is in here or I have to dig little more ?
If this is the case, please, give me some kind of tip ...


Anyway, thanks.

==================  Posted via CNET Linux Help  ==================
                    http://www.searchlinux.com

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

From: Greg Franks <[EMAIL PROTECTED]>
Subject: Re: Statically linked binaries - why so big?
Date: 08 Sep 1999 16:42:27 -0400

Ron House <[EMAIL PROTECTED]> writes:

> Statically linked binaries, even if they only do a 'hello world', have
> trouble coming in under a Mb. Why? Surely there can't be that much code
> in the library that is _needed_ by the app? Does the linker just slap
> the entire library in every time?
> 

printf drags in tons of stuff (like floating point).  Try puts
instead.  Here's a comparison of the two on a Solaris system.

-rwxr-x---   1 rgfranks softrel   295808 Sep  8  1999 a.out
-rwxr-x---   1 rgfranks softrel    89056 Sep  8  1999 a.out

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

From: "Donald Setlur" <[EMAIL PROTECTED]>
Subject: Re: increasing process limits
Date: 9 Sep 1999 08:08:21 GMT

Thanks for your thought-provoking answer. How many problems have you solved
in your life already ? Did school let out ? 

DS

David Schwartz <[EMAIL PROTECTED]> wrote in article
<[EMAIL PROTECTED]>...
> 
>       Redesign your program. I have never heard of a legitimate case where
> more than 64 threads were needed.
> 
>       DS
> 
> Donald Setlur wrote:
> > 
> > I have a program written to create multiple threads which will be
> > simultaneously active in the system.
> > 
> > I am experiencing problems with creating more than 251 concurrent
threads
> > (probably the limit being 255 by default).
> > 
> > Another event that I also notice is that at the time the program has
251
> > threads, no other processes are allowed to exec.
> > 
> > Will increasing the process limit help ? If so how can a get a quick
> > cheatsheet to increase the number of allowable processes on the system
?
> > 
> > I am using Redhat 5.* for a OS. Please let me know if there is some
more
> > details I need to supply to get an answer. Thanks in advance,
> 

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

From: Dietmar Kuehl <[EMAIL PROTECTED]>
Crossposted-To: comp.programming.threads,comp.std.c++,comp.unix.programmer
Subject: Re: Unix and the ISO/IEC 14882-1998 Standard C++ Library
Date: 8 Sep 1999 16:18:27 GMT


Hi,
In article <7r2ntv$76t$[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> > "Robert DiFalco" <[EMAIL PROTECTED]> writes:
> > > I am totally open to choices like GNU/OSF but using these for
> > > commercial projects is very new to me. The last I looked, the GNU
> > > C++ libraries didn't look like the 14882-1998 standard libraries,
> > > especially regarding NTMBS, NTWCS, locales, and facets. However, I
> > > would love to support these efforts by using them if there is a
> > > compliant implementation that will compiler with KAI and work with
> > > NT, SGI, Linux, Solaris/Intel, HPUX, and AIX.
>
> Well, one way of supporting them would be to implement it yourself,
> then
> donate the results to the cause:-).  Seriously, getting some one to
> implement it for you on contract might be your best bet.  (I'd love
> such
> a contract, but I'm not free at present:-(.)

Here is another approach how to support such an implementation: I'm
mostly done although I have to admit that most of the missing stuff is
indeed in the locales area. That is, I have currently only implemented
those facets which are necessary to get IOStreams up and running. Also,
I have not yet implemented the '_byname' classes. Other than this, you
can a free implementation from <http://www.claas-solutions.de/cxxrt/>.
I'm open to support contracts to complete missing features in a timely
fashion, to remove bugs, and, of course, to help with using the C++
standard library. Currently, I support gcc-2.95 on Linux but the library
compiles on Solaris (using the same compiler), too. However, not all of
my test cases are successful (the testsuite is part of the
distribution). I'm mainly working on porting the stuff to MSVC++ 6.0
which is mostly done (a few files cannot be compiled due to missing C++
features in MSVC++ 6.0) but the code is not in namespace 'std' because
this would conflict with the implementation shipping with this
compiler (I think I can remove the conflicts but I haven't worked on
this yet).

You might want to contact Matt Austern concerning the SGI implementation
of the standard C++ library which is supposed to be also freely
available. I'm not sure whether the SGI implementation is already
available to the public. I know that this implementation is pretty
complete.
--
<mailto:[EMAIL PROTECTED]>
homepage: <http://www.informatik.uni-konstanz.de/~kuehl>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:[EMAIL PROTECTED]    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]


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

From: [EMAIL PROTECTED] (Mitch Blevins)
Crossposted-To: comp.os.linux.x,comp.windows.x,comp.sys.palmtops.pilot
Subject: Re: Embedded X-server anyone ? ?
Date: 8 Sep 1999 21:40:15 GMT
Reply-To: [EMAIL PROTECTED]

Nash Aragam <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Am lookin' for any/all info that might be available on the
> idea/concept/design/implementation of a SMALL_FOOTPRINT X-server for use
> in embedded OSs and embedded/handheld palmtops. Actually, a
> mono-chromatic (mfb and/or cfb8 only) Display Server would be a better
> technical description, but, the same result could be achieved via
> heavy-pruning and porting of the existing XFree86 or the general
> X-distribution code (Linux is one of my target OS's)....
> 
> Please send me any info and/or pointers....Thanks very much in advance,

You would probably be interested in the "NanoGUI", at
http://www.linuxhacker.org/nanogui/

Also of interest would be VNC (I forget the URL, but a search should suffice)
made by Olliveti Research Labs.  It is more like a PC-Anywhere product
that already runs as a client on the PalmOS, and can control a desktop
computer of almost any flavor.

Cheers,
-Mitch


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

From: [EMAIL PROTECTED] (Paul Jackson)
Subject: Re: Statically linked binaries - why so big?
Date: 8 Sep 1999 21:22:57 GMT


The main reason static binaries are usually large is that
the C runtime, crt0.o, which includes the essential prolog to
the call into main(), also usually has a call following the
return of main() to the exit() routine, to flush stdio buffers.
This drags in all of stdio.

I've had some luck adding such lines as:

    void exit(i) int i; {_exit(i);}

to my source code, to avoid this.  But the list of symbols that I
have to provide such crude substitutes for keeps getting longer
and longer over the years.

-- 

=======================================================================
I won't rest till it's the best ...        Software Production Engineer
Paul Jackson ([EMAIL PROTECTED]; [EMAIL PROTECTED]) 3x1373 http://sam.engr.sgi.com/pj

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

From: "Ron Ruble" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux,comp.os.linux.misc
Subject: Re: acurate timing
Date: Wed, 8 Sep 1999 18:04:50 -0400


Steve D. Perkins wrote in message <[EMAIL PROTECTED]>...
>> Is it possible to know the time spent by a process into the processor
>> with a better accuracy than jiffies (100 jiffies in one second)?
>
> I hate to sound ignornant, but is that REALLY a technical
>term?!?  I had always thought that a "jiffy" was just slang for a
>very quick period of time....


No, it's a technical term. And, in DOS programming
at least, mouse speed was measured in 'mickeys'.

Silly but true.




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

From: [EMAIL PROTECTED] (Andrew Daviel)
Subject: Re: watchdog - multiple instances
Date: 8 Sep 1999 18:42:02 GMT

Oliver Lehm ([EMAIL PROTECTED]) wrote:
: I need to check that different programs continue running. But by reading the
: sources of the watchdog driver I saw that only one open for the driver is
: possible.
: Is there an extension which allows mutiple instances (maybe a further layer
: above the watchdog driver).

As long as the basic system is running, you can check stuff with cron
or a simple cron-like daemon. Then use the watchdog to check that this
is running properly (or is able to re-start processes).

I built a watchdog circuit a couple of years ago (I'm not sure whether
watchdog support was in the kernel at that point) which hooks to a serial
line. The watchdog daemon monitors the exit status of a shell script,
and if good keeps sending "breaks" to the serial line which resets
the watchdog.  See http://vancouver-webpages.com/watchdog/

I haven't got round to writing a proper monitor. Currently I just check
on network operation by pinging several nearby hosts. I have a cron job
which re-starts httpd if that dies, but I should really check other things
like inetd and sendmail, and monitor cron with the watchdog, too.

Next problem - if the system hangs and the watchdog pulls the reset line, the
system comes up with dirty filesystems and may require "user intervention".
I really need some method of robustly getting past this, perhaps running
with a ramdisk and getting the network up, logins enabled etc. and maybe
running httpd read-only. Has anyone done anything like this ?


--
Deniable unless digitally signed
Andrew Daviel, TRIUMF, Canada
Tel. +1 (604) 222-7376
http://andrew.triumf.ca/andrew 

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


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