Linux-Development-Sys Digest #9, Volume #8 Mon, 10 Jul 00 23:13:11 EDT
Contents:
Re: Interrupt handling in Linux (Grant Edwards)
pure virtual function. ([EMAIL PROTECTED])
Re: unresolved symbol __builtin_vec_new? ([EMAIL PROTECTED])
Re: How to port MSVC++ app to Linux? (Dima Maziuk)
Re: RedHat 6.1 kernel module oddities (Bill Waddington)
question about /proc file system ("Duke Lee")
Re: RedHat 6.1 kernel module oddities (Bill Waddington)
Re: pure virtual function. (Kaz Kylheku)
Re: How to port MSVC++ app to Linux? (Pjtg0707)
URGENT: NFS Mount RedHat 6.2 from Solaris (Barry Evans)
Re: How to port MSVC++ app to Linux? (Kaz Kylheku)
Re: keyboard with additional function keys (B'ichela)
Dealing with core files? ("Kenneth J. Ingram")
Re: pure virtual function. ([EMAIL PROTECTED])
Upload of the Ctrans Algol 68 development system (Sian Leitch)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: Interrupt handling in Linux
Date: Mon, 10 Jul 2000 22:18:30 GMT
>I guess the problem that I'm trying to address is that the
>communication in this application that I'm working on is
>completely asynchronous and comes into the port in blocks that
>need to be handled separately,
Eh? You have a data stream that you have to tear apart and
then process various chunks in parallel rather than one-at-time
in the order they arrive?
>but I think I might have some ideas about where to start, but I
>guess I just need to figure out the buffering system in Linux,
>and how incoming data is structured. Your help is still
>appreciated.
I'd be happy to advise, but I'm pretty confused about what
you're trying to do.
--
Grant Edwards grante Yow! This is my WILLIAM
at BENDIX memorial CORNER
visi.com where I worship William
Bendix like a GOD!!
------------------------------
From: [EMAIL PROTECTED]
Subject: pure virtual function.
Date: Mon, 10 Jul 2000 22:15:04 GMT
Hi,
I just wrote an example to verify a pure virtual function, and it just
like as below:
class MySuperClass
{
public:
MySuperClass() {};
~MySuperClass() {};
virtual void dummy() = 0; // pure virtual function
}
class MyClass
{
public:
MyClass() {};
~MyClass() {};
void dummy() { printk("dummy() in MyClass.\n"); };
}
extern "C"
{
MyClass *myClass;
int init_module()
{
myClass = new MyClass();
myClass->dummy();
return 0;
}
void cleanup_module()
{
delete myClass;
}
}
I compiled it by g++ -fno-exceptions -fno-builtin -fno-rtti -m486 -
D__KERNEL__ -DMODULE
After I insmod mytest.o module, I got the following message:
mytest.o: unresolved symbol __pure_virtual
If I would like to use the pure virtual function in my program, how can
I solve this problem?
Thanks in advance!
- Sam
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: unresolved symbol __builtin_vec_new?
Date: Mon, 10 Jul 2000 22:22:11 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> On Mon, 10 Jul 2000 20:44:45 GMT, [EMAIL PROTECTED] <samhsieh@my-
deja.com>
> wrote:
> >> I suggest an overload which allows you to use the placement syntax
to
> >specify
> >> the kmalloc flags:
> >>
> >> void *operator new (size_t size, int flags = GFP_KERNEL)
> >> {
> >> return kmalloc(size, flags);
> >> }
> >>
> >> void operator delete (void *ptr)
> >> {
> >> kfree(ptr);
> >> }
> >>
> >This new operator is only used by initializing an instance, like new
> >myClass(), but not for the case I mentioned. When I called new char
> >[len], it will try to call the builtin function __builtin_vec_new,
> >which is a 'vector' new operator. I don't know what's the difference
> >between __builtin_new and __builtin_vec_new.
>
> The difference is that one is used for new [] and the other is used
> for new. These two operators are distinct, and the structure of the
> allocated object may actually differ.
>
> >So, the problem is still there. Can I solve the unsolved symbols of
> >__builtin_vec_new and __builtin_vec_delete.
>
> Then why don't you also write your own overrides for operators new[]
and
> delete[]?
>
Ya! I got it! Thanks very much!
> --
> #exclude <windows.h>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Dima Maziuk <[EMAIL PROTECTED]>
Subject: Re: How to port MSVC++ app to Linux?
Date: Mon, 10 Jul 2000 17:56:41 -0500
Gene Montgomery <[EMAIL PROTECTED]> wrote:
> I would appreciate hearing any tips regarding porting MS-dependent code
> to the Linux/GNU world, or a steer to a web site with such information.
If it's a gooey app I'm afraid you should consider rolling your own.
MSVC++ tends to put app logic code into UI; MFC was not designed with
portability in mind (IMO when they designed MFC the mind wasn't there
at all). You may well spend the rest of your life just trying to find
model, view & controller in MSVC/MFC app. Then you'll need to re-write
the view (UI) part and port model & controller parts. Writing a new
program will probably take much less time and effort. :(
YMMV, of course.
Dima
--
Event being observed is indistinguishable from the observer.
-- Shroedinger's cat
============================================================
Sweetmorn, 45 Confusion 3166, 193:2:0 (1)
------------------------------
From: Bill Waddington <[EMAIL PROTECTED]>
Subject: Re: RedHat 6.1 kernel module oddities
Date: Mon, 10 Jul 2000 22:56:11 GMT
In article <8kd5vq$2ib$[EMAIL PROTECTED]>,
Bill Waddington <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Richard Bonomo <[EMAIL PROTECTED]> wrote:
> > Villy Kruse wrote:
> > >
> > > On Fri, 07 Jul 2000 17:39:31 -0500, Richard Bonomo
> <[EMAIL PROTECTED]> wrote:
> > > >
> > > >I am writing a device driver for RehHat 6.1
> > > >(kernel version 2.2.12).
> > > >
> > > >I have found, so far that:
> > > >
> > > >"ioremap" is not recognized. I have to
> > > >call "__ioremap" with an additional parameter.
> > > >For some reason the definition is not taking.
> > > >
> > > >While calls to "inb" and "outb" worked just fine
> > > >in a privileged user program, and while gcc -c <name>
> > > >produces no errors, attempts to load the module
> > > >(with insmod) immediately generates messages to the
> > > >effect that outb and inb are not recognized symbols (!!).
> > > >
> > > >Can anyone enlighten me?
> > > >
> > >
> > > ioremap is an inline function, and that works only if you
> > > compile with -O2. Same for inb and outb.
> > >
> > > These inline functions are defined in <asm/io.h>.
> > >
> > > Villy
> >
> > Yes, I know they are defined in <asm/io.h>, but the
> > subtlety about -O being REQUIRED had escaped me.
> > This explains much. Thank you very much!
> >
> > Rich
> >
> > P.S. Do you know if there is a "sleep" or "usleep"
> > function (or equivalent) available to the kernel, or
> > is it necessary to employ a do-nothing loop to put
> > in a delay?
> >
>
> Hello,
>
> If you aren't worried about the delay being longer than requested,
this
> at least lets other processes have a slice while you are "doing
> nothing":
>
> /*
> * wait ...
> */
>
> wait_j = jiffies + desired_delay_in_jiffies;
>
> while (jiffies < wait_j)
> schedule();
>
> Perhaps there are better ways of doing this ....
>
And another thing ....
If you are using something like the above to provide timing between i/o
accesses, remember that in an architecture with write posting buffers
(or bridge chips w/write buffers), a CPU delay isn't necessarily
reflected on the bus.
Bill
--
Bill Waddington
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: "Duke Lee" <[EMAIL PROTECTED]>
Subject: question about /proc file system
Date: Mon, 10 Jul 2000 16:14:47 -0700
Hello, I am implmenting a device driver that is composed of both user
process and kernel module. I have to exchange information between the
kernel process and the user process. Someone from this newsgroup kindly
told me that /proc file system is written out whenever some process tries to
read from it. I have implemented the folling polling function:
struct wait_queue * procfs_wait = NULL;
static unsigned int procfs_poll(struct file *file, poll_table *wait)
{
poll_wait(file, &procfs_wait, wait);
if (data4user == 1)
return POLLIN | POLLRDNORM
else
return 0;
}
but the problem is that my user process is never waken up becuase no process
tries to read from it. My question is if it is possible to flush the data
from the kernel side so that /proc files are written out? Or is there some
other solution? Thank you for your help.
duke
------------------------------
From: Bill Waddington <[EMAIL PROTECTED]>
Subject: Re: RedHat 6.1 kernel module oddities
Date: Mon, 10 Jul 2000 23:08:44 GMT
In article <8kdka2$dvd$[EMAIL PROTECTED]>,
Bill Waddington <[EMAIL PROTECTED]> wrote:
> In article <8kd5vq$2ib$[EMAIL PROTECTED]>,
> Bill Waddington <[EMAIL PROTECTED]> wrote:
> > In article <[EMAIL PROTECTED]>,
> > Richard Bonomo <[EMAIL PROTECTED]> wrote:
> > > Villy Kruse wrote:
> > > >
> > > > On Fri, 07 Jul 2000 17:39:31 -0500, Richard Bonomo
> > <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >I am writing a device driver for RehHat 6.1
> > > > >(kernel version 2.2.12).
> > > > >
> > > > >I have found, so far that:
> > > > >
> > > > >"ioremap" is not recognized. I have to
> > > > >call "__ioremap" with an additional parameter.
> > > > >For some reason the definition is not taking.
> > > > >
> > > > >While calls to "inb" and "outb" worked just fine
> > > > >in a privileged user program, and while gcc -c <name>
> > > > >produces no errors, attempts to load the module
> > > > >(with insmod) immediately generates messages to the
> > > > >effect that outb and inb are not recognized symbols (!!).
> > > > >
> > > > >Can anyone enlighten me?
> > > > >
> > > >
> > > > ioremap is an inline function, and that works only if you
> > > > compile with -O2. Same for inb and outb.
> > > >
> > > > These inline functions are defined in <asm/io.h>.
> > > >
> > > > Villy
> > >
> > > Yes, I know they are defined in <asm/io.h>, but the
> > > subtlety about -O being REQUIRED had escaped me.
> > > This explains much. Thank you very much!
> > >
> > > Rich
> > >
> > > P.S. Do you know if there is a "sleep" or "usleep"
> > > function (or equivalent) available to the kernel, or
> > > is it necessary to employ a do-nothing loop to put
> > > in a delay?
> > >
> >
> > Hello,
> >
> > If you aren't worried about the delay being longer than requested,
> this
> > at least lets other processes have a slice while you are "doing
> > nothing":
> >
> > /*
> > * wait ...
> > */
> >
> > wait_j = jiffies + desired_delay_in_jiffies;
> >
> > while (jiffies < wait_j)
> > schedule();
> >
> > Perhaps there are better ways of doing this ....
> >
>
> And another thing ....
>
> If you are using something like the above to provide timing between
i/o
> accesses, remember that in an architecture with write posting buffers
> (or bridge chips w/write buffers), a CPU delay isn't necessarily
> reflected on the bus.
>
Sorry Richard,
You would think that I could reply to a simple question with a single
post. I should have mentioned:
#include <linux/delay.h>
void udelay(unsigned long usecs);
This one busy-waits the CPU, and doesn't let anything run. It might be
the way to go for short (a few to a few 100s of usecs).
I'll be quiet now, and leave the posting to those who know what the hell
they are talking about.
Bill
--
Bill Waddington
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: pure virtual function.
Reply-To: [EMAIL PROTECTED]
Date: Mon, 10 Jul 2000 23:38:35 GMT
On Mon, 10 Jul 2000 22:15:04 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>Hi,
>
>I just wrote an example to verify a pure virtual function, and it just
>like as below:
>
>class MySuperClass
>{
[ snip ]
> virtual void dummy() = 0; // pure virtual function
>}
[ snip ]
>class MyClass
>{
>After I insmod mytest.o module, I got the following message:
>mytest.o: unresolved symbol __pure_virtual
Well, yes, the compiler would have to have human intuition to guess that a call
to the pure virtual in MySuperClass is supposed to be routed to a function in
My Class.
What you have to do this this:
class MyClass : public MySuperClass { /* ... */ };
^^^^^^^^^^^^^^^^^^^^^
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (Pjtg0707)
Subject: Re: How to port MSVC++ app to Linux?
Date: Tue, 11 Jul 2000 00:40:30 GMT
Reply-To: [EMAIL PROTECTED]
On Mon, 10 Jul 2000 17:56:41 -0500, Dima Maziuk <[EMAIL PROTECTED]> wrote:
>Gene Montgomery <[EMAIL PROTECTED]> wrote:
>> I would appreciate hearing any tips regarding porting MS-dependent code
>> to the Linux/GNU world, or a steer to a web site with such information.
>
>If it's a gooey app I'm afraid you should consider rolling your own.
>MSVC++ tends to put app logic code into UI; MFC was not designed with
>portability in mind (IMO when they designed MFC the mind wasn't there
>at all). You may well spend the rest of your life just trying to find
>model, view & controller in MSVC/MFC app. Then you'll need to re-write
>the view (UI) part and port model & controller parts. Writing a new
>program will probably take much less time and effort. :(
>YMMV, of course.
>Dima
>--
>Event being observed is indistinguishable from the observer.
> -- Shroedinger's cat
>------------------------------------------------------------
>Sweetmorn, 45 Confusion 3166, 193:2:0 (1)
Can't that be said of pretty much of OOP in general? Unless you have
the classes on the platforms you intend to port to, the OOP advantage
just isn't there anymore. Perhaps Microsoft may one day decide to
port MFC
to Linux; we will then have all the Microsoft apps we can handle!
------------------------------
From: Barry Evans <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking,alt.linux,linux.redhat
Subject: URGENT: NFS Mount RedHat 6.2 from Solaris
Date: Mon, 10 Jul 2000 23:08:43 GMT
We recently upgraded from Red Hat 4.2 to VA/Red Hat 6.2 (kernel
2.2.14?) and can no longer NFS mount the linux drive from our other
UNIX (Solaris, AIX & HPUX) boxes. It appears that the new kernel NFS
daemon does not work with anything other than other Linux boxes.
Has anyone found a workaround to this issue or alternate means of
exporting file systems between other UNIX* and linux? Smbmount is not
an option. (Filesystem must be read+writeable by users)
Thanks,
BP
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: How to port MSVC++ app to Linux?
Reply-To: [EMAIL PROTECTED]
Date: Tue, 11 Jul 2000 01:16:22 GMT
On Tue, 11 Jul 2000 00:40:30 GMT, Pjtg0707 <[EMAIL PROTECTED]> wrote:
>Can't that be said of pretty much of OOP in general? Unless you have
>the classes on the platforms you intend to port to, the OOP advantage
>just isn't there anymore. Perhaps Microsoft may one day decide to
No, it can't be said of OOP in general. You are confusing two terms, namely
``OOP'' and ``use of platform specific user interface libraries''.
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (B'ichela)
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.development,comp.os.linux.hardware
Subject: Re: keyboard with additional function keys
Date: Mon, 10 Jul 2000 20:10:34 -0400
Reply-To: [EMAIL PROTECTED]
On Mon, 10 Jul 2000 21:47:20 +0200, LY <[EMAIL PROTECTED]> wrote:
>Thanx for the information, but I still have the problem. I've mentioned that
>if I press a key that I'll get a sequence of scancodes e.g. scancode for the
>number "4" is 0x85, after pressing the additional function key I get 0x85
>0x85. I can't work with this sequence of scancodes, because it's not unique.
>
>However, thanx for the information!!!
Whoa! whoa! I think you are slightly confused. On the IBM
keyboard the Fkeys are two digits for the scan codes. (grumble I wish
I still had my Dos books here). If the preceding digit is a 0 followd
by a number. press F1 for example. you will see a number like this
0;32 (its an example ok, I don't have my books anymore as I dumped
them when I went to linux full time).
What you Need to do is... If you can give us the manufactuers
name and Model Number, One can look on the web for the specs
reguarding the double byte scan codes sent by your 30 extra keys!
Isn't here a program that will show this table? I checked
dumpkeys and it looks at keytable (when it comes to IBM compat
keyboards I even get lost). Perhaps these keys are user Programmed
either via software or by keyboard settings. AGain without the
instructions one cannot be certain of which it is!
Flip up the keyboard, give us the Manufactuer, and the model
number (AT LEAST!!!!) and perhaps someone who has a similar keyboard
will be able to speak up.
--
B'ichela
------------------------------
From: "Kenneth J. Ingram" <[EMAIL PROTECTED]>
Subject: Dealing with core files?
Date: Mon, 10 Jul 2000 19:07:47 -0700
==============99927CEE7B7C6DD763EC6213
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
What tools are available to debug core files? I recall a couple of tools
in AIX
but I can't remember the name.
--
"Great spirits have always encountered violent opposition from
mediocre minds." - Albert Einstein
==============99927CEE7B7C6DD763EC6213
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
What tools are available to debug core files? I recall a couple of tools
in AIX
<br>but I can't remember the name.
<pre>--
"Great spirits have always encountered violent opposition from
mediocre minds." - Albert Einstein</pre>
</html>
==============99927CEE7B7C6DD763EC6213==
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: pure virtual function.
Date: Tue, 11 Jul 2000 02:34:54 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> On Mon, 10 Jul 2000 22:15:04 GMT, [EMAIL PROTECTED] <samhsieh@my-
deja.com>
> wrote:
> >Hi,
> >
> >I just wrote an example to verify a pure virtual function, and it
just
> >like as below:
> >
> >class MySuperClass
> >{
>
> [ snip ]
>
> > virtual void dummy() = 0; // pure virtual function
> >}
>
> [ snip ]
>
> >class MyClass
> >{
>
> >After I insmod mytest.o module, I got the following message:
> >mytest.o: unresolved symbol __pure_virtual
>
> Well, yes, the compiler would have to have human intuition to guess
that a call
> to the pure virtual in MySuperClass is supposed to be routed to a
function in
> My Class.
>
> What you have to do this this:
>
> class MyClass : public MySuperClass { /* ... */ };
> ^^^^^^^^^^^^^^^^^^^^^
>
This is inheritance. I won't implement some method functions in the
super class, but in the subclass which uses the same function name and
with its own behavior implemented.
I already solved this problem. I just implemented a dummy function to
replace it as below:
extern "C" int __pure_virtual()
{
/* do nothing */
return 0;
}
Anyway, thanks for your help.
- Sam
> --
> #exclude <windows.h>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Sian Leitch)
Subject: Upload of the Ctrans Algol 68 development system
Date: Sun, 9 Jul 2000 22:24:30 +0100
Reply-To: [EMAIL PROTECTED]
Ctrans is a portable implementation of the high-level language Algol
68 with a translator producing C source code.
The package is fully documented, but does not yet include the
language book
"Programming Algol 68 Made Easy"
which I should be uploading in August this year.
Any queries to me.
--
Sian Leitch (Software Engineer specialising in Algol 68)
Algol 68 for Linux is available from me or at
<ftp://vestein.arb-phys.uni-dortmund.de>
Look for ctrans_version.tar.gz
------------------------------
** 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
******************************