Linux-Development-Sys Digest #650, Volume #6 Sat, 24 Apr 99 22:14:13 EDT
Contents:
Docs on the Xlibs (Leon van Zantvoort)
how to access raw memory? (Jacek Pop�awski)
Re: Docs on the Xlibs (Andi Kleen)
Re: how to access raw memory? (Konrad Mieredorff)
Spontaneous reboots on a PII (Rowin Andruscavage)
Re: problem with C types : time_t (James Youngman)
2 sounds cards (Yu-Ou WANG)
wake_up_interruptible in 2.0.35 and up. ("Reinhold J. Gerharz")
writing kernel module with c++ ([EMAIL PROTECTED])
Re: Y2K bug in strptime ? (libc5) (John McKown)
Re: writing kernel module with c++ (Joe Buck)
Re: The UNIX GUI Manifesto ("Jethro Wright III")
Re: Any Comments About GTK and G++/CygWin for Cross Platform Development ("Jethro
Wright III")
----------------------------------------------------------------------------
From: Leon van Zantvoort <[EMAIL PROTECTED]>
Subject: Docs on the Xlibs
Date: Sat, 24 Apr 1999 13:26:52 +0200
I want to code some graphical stuff under the X window enviroment,
without
using the QT libs. Because QT can't is too slow. I will have to use the
Xlibs
but I can't find any documentation on it.
Do you know where I can find some docs?
You can mail me on [EMAIL PROTECTED]
Leon van Zantvoort
------------------------------
From: [EMAIL PROTECTED] (Jacek Pop�awski)
Subject: how to access raw memory?
Reply-To: [EMAIL PROTECTED]
Date: 24 Apr 1999 11:59:57 GMT
I want to write driver to work with VGA 320x200x256 mode. I am not
sure how to access IO ports, but i read HOWTO and some mans and I think
it will be possible :-), but what with memory? Only root can access all
memory, but how? How can i write to video ram? I read "man mem" but
it didn't help me... What should i read?
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: Docs on the Xlibs
Date: 24 Apr 1999 15:22:58 +0200
Leon van Zantvoort <[EMAIL PROTECTED]> writes:
> I want to code some graphical stuff under the X window enviroment,
> without
> using the QT libs. Because QT can't is too slow. I will have to use the
> Xlibs
> but I can't find any documentation on it.
>
> Do you know where I can find some docs?
ftp://ftp.gwdg.de/pub/xfree86/XFree86/3.3.3.1/untarred/xc/doc/
>
> You can mail me on [EMAIL PROTECTED]
>
Well, I don't.
-Andi
--
This is like TV. I don't like TV.
------------------------------
From: Konrad Mieredorff <[EMAIL PROTECTED]>
Subject: Re: how to access raw memory?
Date: Sat, 24 Apr 1999 20:01:49 +0000
"Jacek Pop�awski" wrote:
>
> I want to write driver to work with VGA 320x200x256 mode. I am not
> sure how to access IO ports, but i read HOWTO and some mans and I think
> it will be possible :-), but what with memory? Only root can access all
> memory, but how? How can i write to video ram? I read "man mem" but
> it didn't help me... What should i read?
You _cannot_ access the whole memory as root! The memory is devided into
kernel-space and user-space. Therefore you should consider writing a
kernel module to access the videomem or putting your whole driver into a
module.
Good luck!
- Konrad Mierendorff
P.S.: Please correct me if I'm wrong with the _cannot_.
------------------------------
From: Rowin Andruscavage <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Spontaneous reboots on a PII
Date: Sat, 24 Apr 1999 20:13:50 +0000
Hi, I'm having problems with spontaneous reboots on my friend's new PII
350. Every so often while running under Linux, it will reboot just as
if someone hit the reset button : no kernel panics, no log entries, just
a blip and the BIOS comes up. It's not very reproducible either... It
can stay up for as long as an hour doing things like compiling kernels
and running vmware, but usually goes down in 5 minutes, especially while
doing things that are I/O intensive. The reboots happen much more often
if the sound modules are installed and we're moving lots of things
around in X, though sometimes I can be swinging things all over the
place in Enlightenment with pixmap themes and have everything work fine.
I thought it was heat-related, so I disabled all the BIOS APM things
and the CPU fan controller, so CPU fan should be running all the time.
No luck.
We installed from RedHat5.2, and added GNOME and linux 2.2.6 . He has
a Matrox G100 AGP card and some OPL3SA2 sound card. I've upgraded to
XFree86 3.3.3.1 without much effect (besides, it's even rebooted under
the console once, though admittedly I was using the linux FB console at
that time). My current theory is that it has something to do with the
motherboard, which appears to be a BX something (windoze reports 82443BX
controllers). I've tried different combinations of kernels(2.0.36,
2.2.3, 2.2.6) with and without support for MTRR, different
windowmanagers (WM and E), with and without GNOME, and with various
system loads. What next?
It could be that it's not the best hardware, since he got some generic
machine from a custom NYC vendor. He told the guy at the shop that he
wanted to run Linux of it (and of course the guy says "Yep, sure thing"
and immediately turns around and bolts in a WinModem :P ). I've never
seen any of this happen on any other computer, like my K6 200 that's
running essentially all the same software. Windows 95/98 runs as usual
on his computer... it crashes occasionally, but not by spontaneous
reboots.
This thing is really temperamental... and really perplexing me. Does
anyone have any leads? Or at least pointers on how I can get this rig
to work more reliably? TIA!
--
<8X- Rowin Andruscavage http://www.people.cornell.edu/pages/rwa2
Human beings were created by water to transport it uphill.
------------------------------
From: James Youngman <[EMAIL PROTECTED]>
Subject: Re: problem with C types : time_t
Date: 24 Apr 1999 12:08:05 +0100
"JB" <[EMAIL PROTECTED]> writes:
> Hi, I've a problem converting an array of char (that should represent the
> number of seconds elapsed since 01/01/70) into a time_t
> variable.
Just fill in a struct tm, setting the tm_sec member to the converted
number, and the other fields to the epoch (01/01/1970). Then just
call mktime().
> Could anyone give me some specifications about the time_t type (browsing
> through includes didn't seem to tell me anything and man pages aren't such a
> big help about this !! ).
time_t is supposed to be an opaque type in ANSI C. Use the method I
described above.
--
ACTUALLY reachable as @free-lunch.demon.(whitehouse)co.uk:james+usenet
------------------------------
From: Yu-Ou WANG <[EMAIL PROTECTED]>
Subject: 2 sounds cards
Date: Sat, 24 Apr 1999 23:26:43 +0200
I've got 2 Soundblasters cards installed inside my computer : an AWE 64
and a PCI 128. And I want that Linux (Redhat 5.2) use the PCI 128 sound
card and not ISA soundcard.
How can I do ???
------------------------------
From: "Reinhold J. Gerharz" <[EMAIL PROTECTED]>
Subject: wake_up_interruptible in 2.0.35 and up.
Date: Sat, 24 Apr 1999 18:20:03 -0400
Is it safe to call wake_up_interruptible(&queue) where queue points to a
process that has been previously awakened?
--
Reinhold J. Gerharz
"The only good spammer is a DEAD spammer!" - Anonymous
------------------------------
From: [EMAIL PROTECTED]
Subject: writing kernel module with c++
Date: Sat, 24 Apr 1999 22:25:01 GMT
Dear all:
We developed some control programs using c++ and it works well with QNX.
Now we try to port them to RTLinux as kernel modules. But we have problems
to do so. I'm not sure if we can use constructor/destructor in the kernel
module.
Here is a simple example(tmp.cpp):
#define __KERNEL__
#define MODULE
#define __RT__
#include <linux/module.h>
#include <linux/kernel.h>
extern "C" init_module();
extern "C" cleanup_module();
class Myclass
{
public:
int c;
void printit();
Myclass();
~Myclass();
};
Myclass::Myclass()
{
c = 1;
printk("*******CONSTRUCTOR %d\n", c );
}
Myclass::~Myclass()
{
}
void Myclass::printit()
{
printk("******* PRINTIT %d\n", c );
}
Myclass mc;
int init_module()
{
mc.printit();
return 0;
}
void cleanup_module()
{
}
* CASE 1:
I compile it with "g++ -c tmp.cpp" and run "insmod tmp.o",
I get an error:
tmp.o: unresolved symbol __builtin_delete
* CASE 2:
If I move "Myclass mc;" into init_module(), then I got more error:
tmp.o: unresolved symbol __builtin_delete
tmp.o: unresolved symbol __eh_pc
tmp.o: unresolved symbol terminate__Fv
tmp.o: unresolved symbol __throw
* CASE 3:
If I comment out the destructor's declarataion and definition, the module
can be loaded. What we see in the console is:
******* PRINTIT 0
The constructor was not being executed at all!
Anybody can help on this?
Thanks in advance.
Daniel
------------------------------
From: [EMAIL PROTECTED] (John McKown)
Subject: Re: Y2K bug in strptime ? (libc5)
Date: 24 Apr 1999 22:29:11 GMT
Reply-To: [EMAIL PROTECTED]
Peter,
I entered your code as it. I get
The parsed year is 100
Which I think is correct since the epoc for UNIX is 01 Jan 1900. I am running
RedHat 5.1, glibc 2.0.7, GCC version 2.7.2.3
Since strptime() is a C library, I'd say that your version of libc is
returning an incorrect value. You might want to upgrade to the current
version, if at all possible.
I hope this information is of some use to you.
John
>
------------------------------
From: [EMAIL PROTECTED] (Joe Buck)
Subject: Re: writing kernel module with c++
Date: Sat, 24 Apr 1999 23:32:54 GMT
[EMAIL PROTECTED] writes:
>We developed some control programs using c++ and it works well with QNX.
>Now we try to port them to RTLinux as kernel modules. But we have problems
>to do so. I'm not sure if we can use constructor/destructor in the kernel
>module.
You can use constructors and destructors, but you can't use new and
delete. The reason is that the runtime support isn't linked into the
kernel. I don't see a delete in your example, so I don't know why
__builtin_delete is referenced. Do you do a delete in code you're
not showing? You also probably should say -fno-exceptions -fno-rtti
to avoid bringing in any code to support those features.
(actually you can use new and delete if you overload the operators
appropriately: you need to remember that there is no malloc in the
kernel, and if you want to use the kernel's memory allocator you need
to be careful to follow the rules).
>* CASE 1:
>I compile it with "g++ -c tmp.cpp" and run "insmod tmp.o",
>I get an error:
>tmp.o: unresolved symbol __builtin_delete
>
>* CASE 2:
>If I move "Myclass mc;" into init_module(), then I got more error:
>tmp.o: unresolved symbol __builtin_delete
>tmp.o: unresolved symbol __eh_pc
>tmp.o: unresolved symbol terminate__Fv
>tmp.o: unresolved symbol __throw
You need to disable exceptions.
>* CASE 3:
>If I comment out the destructor's declarataion and definition, the module
>can be loaded. What we see in the console is:
>******* PRINTIT 0
>The constructor was not being executed at all!
The kernel doesn't have the magic linked in to execute file-scope
constructors.
>Anybody can help on this?
You need a bit more understanding of the C++ runtime support if you want
to use C++ in the kernel.
--
The reasonable man adapts himself to the world; the unreasonable man
persists in trying to adapt the world to himself. Therefore, all progress
depends on the unreasonable man. -----George Bernard Shaw
------------------------------
From: "Jethro Wright III" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux
Subject: Re: The UNIX GUI Manifesto
Date: Sat, 24 Apr 1999 20:25:37 -0400
Brady Montz wrote in message ...
>"Jethro Wright III" <[EMAIL PROTECTED]> writes:
>
>> Don't know if anyone's interested, but I just did a bit of
>> compelling reading at: http://www.cybtrans.com/infostrc/unixgui.htm
>>
>> I DON'T WANT A FLAME WAR, but there are some who might
>> actually find this bit an interesting take on Unix and GUIs. It
>> certainly has gotten my attention as someone who's new to Unix
>> and wants to get into GUI app development in the shortest time
>> possible....Jet
>>
>> --
>>
>
>An interesting article. I really like Eric Raymond's response (including on
>the page).
>
>Here are my additions:
>
>1. I agree, as probably many do, that a better GUI environment for UNIX
> would be greatly appreciated. If one arises which is good enough,
> I'm sure it will quickly take over. KDE and Gnome both seem healthy
> contenders.
But, which is going dominate and how long will it take to determine
a "winner" ? I've got a little desktop accessory I want to port to
Linux from Windows. It's a great vehicle to start becoming a Unix
hack. But, GNOME and KDE are very different and it will take days
just to d/l all of the development stuf, to even *start* evaluating the
options. Certain choices (eg. which word processor, graphics
program, or language to use) are good. Choose what feels right
for *YOU* ! By now, the market (ie. the hackers/pioneers) shud've made
the GUI/desktop decision already ! Particularly since Unix was (and still
is) the proving ground for most of the exciting GUI/CHI research in
the '80s and '90s (I used to be an ACM member, subscribing to SIGCHI,
SIGSOFT, etc.) This is 1999, people, and Hoff's criticisms still ring
true.
(BTW: CHI refers to the Computer/Human Interface.)
>2. I disagree strongly with the implication that UNIX users and programmers
> (and I, like many, are in both categories) don't want a nice, coherent
> graphical environment.
>
If it weren't true, why in 1999, does this thread exist ? He's
(and I'm) not saying that *every* Unix hack doesn't want a good GUI and
Hoff definitely doesn't say that. It just hasn't been a priority in
the Unix community. Just reading these NGs, one can see that there are
still way too many immature "if you don't like it the way it is, go back
to watching TV" types, who're not getting the message out. "Not getting
the message out" can be translated into not making Unix into a consumer
product, which implies an easy-to-use GUI desktop environment and
accompanying apps.
>3. I'm not speaking on totally certain ground here, but it seems to me that
> in the last 25 years or so, the vast majority of people who have put
> solid effort into developing graphical environments were (a) employed
> by a company like Apple, Microsoft, Novell, NeXT, Sun (sunstep, or
> whatever that thing was called - yikes!) or (b) working in UNIX or VMS
> for free or in exchange for degrees. Compare the number of window
> manager and graphics toolkit projects in UNIX versus everywhere else.
> And it's NOT because the offerings from those companies are so awesome
> or complete so as to preclude competition. Developing overarching
> graphics environments is hard and requires cooperation from many people
> and projects. It seems to me that the vast majority of people willing
> to exert such effort for free are in the UNIX world, so it's unfair to
> blame any "failure" on any anti-gui mindset.
See comments to #1. UC Berkeley, MIT, CMU, Xerox PARC, et al, did
much of work. MSOFT and Apple proved the stuf will sell. The pioneers
in the free Unix world just haven't taken the ball and run w/ it. Having
ten different window managers/desktop environments is great if you're doing
CHI research, but if you just want to get work done (as a developer of
end-user apps or as pure end-user), that's eight or nine too many WMs.
Choice bet different toolkits for app development: great; choice of
desktop environments: not so great (at least not over the long haul.)
Let's say I wrote the best word processor in the world, but I wrote it
for KDE instead of GNOME. I have a problem, esp if GNOME doesn't go away
quietly. The support hassles would be non-trivial to say the least. I'd
be getting dozens of e-mails and phone calls about why drag-n-drop doesn't
work the way it's documented or that screens don't look the way they shud.
Get a load of this hypothetical tech support call:
Grandma: Mr. Wright, your GlobalGalatic WP pgm isn't working.
<after some back and forth....>
Mr. Wright: Well, Grandma, if you just go to www.kde.org and d/l a
copy of the KDE X.YY, then run the kpackage utility to install it, then
edit the .xinitrc file in your $HOME directory....
Grandma: <click !>
It's not bec Grandma is stupid, senile, or a slacker, she hung
up on me, bec she doesn't want to know about all of those details. I
grew up in family where my father has been a professional tech my
entire life (aircraft/auto mechanic and an electrician.) So, I learned
early on, that most folks just don't want to know how a cookoo clock
works, they only want to know it is....
[snip]
I, too, noticed some of the flaws in what Hobbs says, but his
core points are still unavoidable. He repeats frequently thru-out
the article that Unix is better and preferrable, but it isn't an option
for the people who're fueling the marketplace: the end-users. We drive,
the end-users provide the fuel. If it weren't for those folks,
microcomputers would still be curiousity items for hobbyists, CP/M and
TRSDOS would still rule, and there would be no Unix (as we know it today),
no Internet (as it exists today), no Pentiums, SPARCs, Alphas, laser
printers, or 15 GB hdrives. Without the end-user marketplace (blindly)
asking for those developments, we pioneers wouldn't be able to work for
companies that generate hundreds of billions of dollars to create the
world we *now* live in. We'd be doing fun stuf, just not *this* fun
stuf.
--
================================================================
In Paris, they simply stared when I spoke to them in French;
I never did succeed in making those idiots understand their
own language. - Mark Twain, The Innocent Abroad,1869
============================================= [EMAIL PROTECTED] ==
------------------------------
From: "Jethro Wright III" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Any Comments About GTK and G++/CygWin for Cross Platform Development
Date: Sat, 24 Apr 1999 20:55:19 -0400
There is a partial GTK+ port for Win32, but unfortunately
for me, it isn't finished yet (and the "porter" is doing it
as a one-man proj) but worse is that it doesn't use native
Win32 controls. The screenshot of his 1st cut looks good, but
it's not for me. wxWin it is. Thanx for the feedback....Jet
--
================================================================
In Paris, they simply stared when I spoke to them in French;
I never did succeed in making those idiots understand their
own language. - Mark Twain, The Innocent Abroad,1869
============================================= [EMAIL PROTECTED] ==
Erik de Castro Lopo wrote in message <[EMAIL PROTECTED]>...
>Jethro Wright III wrote:
>>
>> Folks: I'm a newbie, but I'm definitely sold on this Linux
>> stuf. I'm exploring cross-platform development options and would
>> like to use G++ on both sides of the Linux/Windows world. This
>> means CygWin (or possibly mingW32) and I'd like to know what the
>> real-world thinks about doing such things, especially WRT GTK. If
>> you have other suggestions/real-world comments about libs/frameworks
>> that could get the job done, pls feel free to chime in.
>>
>> Definitely skip the "Windoze sucks" comments....Jet
>
>Bummer!
>
>I did manage to use Linux as a cross development platform targeting
>Windows for a number of weeks as we tested out a windows development
>idea. The cross-tools worked well enough (I was programming directly
>to the Win32 API not MFC etc). As a linux/unix programmer I found
>this much more comfortable than the native windows tools.
>
>I do not know anything about getting GTK running under windows and
>I think this would be difficult part.
>
>Erik
>--
>+-------------------------------------------------+
> Erik de Castro Lopo [EMAIL PROTECTED]
>+-------------------------------------------------+
>Windows 2000 : The Tyranosaurus Rex of the software
>world. Large, ferocious and soon to be extinct.
------------------------------
** 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
******************************