Linux-Development-Sys Digest #787, Volume #7 Thu, 20 Apr 00 06:16:31 EDT
Contents:
Re: To core or not to core - You tell me (Mark McIntyre)
Re: To core or not to core - You tell me (Chris Thompson)
Re: Questions on C GUI development for X/Linux (Chris Mach)
Where can I find kernel debuger? ([EMAIL PROTECTED])
Re: Where can I find kernel debuger? ("Ian S. Nelson")
Interrupt handling...please help !!! (Badrinath Venkatachari)
HELP : need info on how to connect a win98 box to a linux machine ("ckho")
HELP : need help on how to connect a win98 box to a linux machine ("ckho")
Re: File Size Limitations (Christopher Browne)
Re: Where can I find syntax page for make utility for Linux ("Arthur H. Gold")
Re: What's the difference between bzImage and zImage ("[EMAIL PROTECTED]")
ppp modules (Bob Cunius)
Re: To core or not to core - You tell me (Erik Max Francis)
Re: To core or not to core - You tell me (Erik Max Francis)
Re: Compiling glibc-2.1.3 (W R Carr)
Re: Select() in Linux 2.2.5 - threadsafe? ("Mark Graybill")
Re: Select() in Linux 2.2.5 - threadsafe? ("Mark Graybill")
Re: File Size Limitations (Alexander Viro)
Problem with kernel module.../proc/<pid> ([EMAIL PROTECTED])
Re: Select() in Linux 2.2.5 - threadsafe? (Kaz Kylheku)
Re: Obtaining Program Counter (Anand Krishnamoorthy)
----------------------------------------------------------------------------
From: Mark McIntyre <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.lang.c++,comp.unix.programmer
Subject: Re: To core or not to core - You tell me
Date: Tue, 18 Apr 2000 23:29:06 +0100
Reply-To: [EMAIL PROTECTED]
On Mon, 17 Apr 2000 17:22:24 -0400, Ron Natalie <[EMAIL PROTECTED]>
wrote:
>
>
>Mark McIntyre wrote:
>>
>> On Mon, 17 Apr 2000 10:31:01 -0400, Ron Natalie <[EMAIL PROTECTED]>
>> wrote:
>>
>> >
>> >
>> >Mark McIntyre wrote:
>> >
>> >>
>> >> >which in and of itself is not a pointer.
>> >>
>> >> says who?
>> >
>> >Says the language, it's an literal of type int. The null pointer constant
>> >only has meaning when compared/assigned-to a pointer.
>>
>> I've forgotten the context, we've snipped so much but... if you mean
>> zero is a literal of type int hten ok. If you mean NULL is a literal
>> of type int then nope.
>
>The line you snipped off said "0"
Good, then my statement is true. "0" is not an int its a value. It
coudl even be a pointer...
>And in C++ NULL can not have the void* cast in it.
I'm reading it in C land so it can have the void*.
Mark McIntyre
C- FAQ: http://www.eskimo.com/~scs/C-faq/top.html
------------------------------
From: [EMAIL PROTECTED] (Chris Thompson)
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.lang.c++,comp.unix.programmer
Subject: Re: To core or not to core - You tell me
Date: 18 Apr 2000 23:03:51 GMT
In article <[EMAIL PROTECTED]>,
Mark McIntyre <[EMAIL PROTECTED]> wrote:
>On Mon, 17 Apr 2000 14:21:08 -0700, Erik Max Francis <[EMAIL PROTECTED]>
>wrote:
>
>>Mark McIntyre wrote:
[various insults omitted]
When this thread was just about the intracacies of the C standard, it was
getting pretty inappropriate for the OS-specific newsgroups on the list.
Now it has moved on to vulgar abuse, it's time to protest.
Prune the newsgroups, friends. [In a very loose sense, that is...]
Chris Thompson
Email: cet1 [at] cam.ac.uk
------------------------------
From: [EMAIL PROTECTED] (Chris Mach)
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.questions,comp.os.linux.development,linux.dev.newbie,uklinux.help.newbies,uk.comp.os.linux
Subject: Re: Questions on C GUI development for X/Linux
Date: 18 Apr 2000 23:20:53 GMT
Michael Hopkins ([EMAIL PROTECTED]) wrote:
: Hi all,
: First of all, many thanks to those that recently told me what to
: include to get the math functions working. Much appreciated. I have
: some other questions as I optimistically start out on the steep
: learning curve to build working GUI C/C++ programs on X/Linux.
: Does anyone have any recommendations on a good, reliable IDE for
: looking after coding projects. I know that there are a few now for
: Linux (gIDE, C-forge, JX, CodeWarrior) but I don=92t have enough
: experience of the platform & compilers to make an informed decision on
: the best one to go with.
: A related question to the above is:
: Are there any RAD environments as easy to use as C++ Builder in Linux
: for either C or C++. I know of Glade, gtk etc. but again don=92t know
: enough about what I=92m looking at to make an informed choice. Which
: has the gentlest learning curve! I=92m only wanting simple front ends
: with some menus & dialog boxes. Are the =91C++ based=92 ones easier to
: use?
: Can anyone tell me how easy it is to do the following. Code or
: library refs would be MUCH appreciated. I just want to call a
: function in C that brings up an open(save) dialogue box which allows
: the user to browse around and select(name) a file. The function
: whould return a string containing the full pathname of the file. This
: would be given to fopen() to allow reading(writing) of ascii files. I
: have achieved this on the Mac but know nothing about the X-window
: version of the Mac toolbox. I=92m sure that someone else must have
: wanted to do this at some point; maybe some of the standard GUI
: libraries include it somewhere?
: Finally, I have little experience with C++ but am considering adapting
: all my numerically intensive ANSI C code to C++ to facilitate:
: 1) Making it easier to support a GUI library.
: 2) Making code re-use/organisation easier.
: Any thoughts? I particularly want to know how much of a performance
: hit I will take for numerical loops/matrix operations (if at all)
: using standard C++ approaches. If there aren=92t any advantages to
: making all my code C++ I really don=92t want to bother.
: Thanks again for your time & any thoughts,
: Mike
I think a look at Code Crusader might be worth a look. You can down
load it for free, but if you wish to get serious about using it
the manual is a must have. You can check them out at
www.newplanetsoftware.com
I hope this is of some help.
Chris Mach
------------------------------
From: [EMAIL PROTECTED]
Subject: Where can I find kernel debuger?
Date: Wed, 19 Apr 2000 00:32:12 GMT
I want to write a driver, but it's buggy. Someone told me that I could
find the bug by using kdgb, but I can't find it in my Redhat box.
Any help?
Many thanks.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: "Ian S. Nelson" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Where can I find kernel debuger?
Date: Tue, 18 Apr 2000 19:17:37 -0600
[EMAIL PROTECTED] wrote:
> I want to write a driver, but it's buggy. Someone told me that I could
> find the bug by using kdgb, but I can't find it in my Redhat box.
>
> Any help?
>
> Many thanks.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
oss.sgi.com
------------------------------
From: Badrinath Venkatachari <[EMAIL PROTECTED]>
Subject: Interrupt handling...please help !!!
Date: Tue, 18 Apr 2000 21:47:16 -0700
Hi,
I want to set-up a mechanism to Q up requests destined for the hard
disk, make the process requesting data do a sleep_on(), have a timer
-driven function wake up every 10ms, dQ a certain number of requests,
issue make_requests on behalf of the process which is waiting for the
requests to be satisfied.... and finally do a wake_up() for the sleeping
process. As a result I have a wait_queue associated with each request
that I Qup...to have the context of the process to be woken up.
After the set the flag by calling exported_function1() (see in the code
below), the kernel starts queuing requests. But then I get a
Aiee: scheduling in the interrupt handler <address>
error in the syslog... and after some time the system hangs... Any
pointers to potential issues that I have ignored. Can anyone suggest a
general mechanism by which I could Qup requests, process them out of
sync with the requesting process, wake up the process sleeping on the
wait_queue of the requests....as shown below in the code..
I am making a wake_up() call in the timer-driven fuction (which I
presume is an interrupt handler). Does this cause problems ?? Do I have
to disable interrupts on entry and enable them while exiting so that any
scheduling attempt does not happen before I exit the interrupt handler??
I have not provided the complete code, but filled relevant part with
comments to make it understandable....
thanks a ton !!! Please let me know if anyone needs more info...
regards
badri
PS: a snippet of code (with all relevant details provided below).
The mechanism of Qing is started off from a KLM which simply calls an
kernel exported function to set a flag on.
My code is :
==============
scheduleRequest(struct buffer_head **bh, int rw, int nr)
{
reqNode *rn;
if (1 == flag)
{
rn->bh = bh;
rn->rw = rw;
rn->nr = nr;
rn->wq = NULL;
Q rn;
sleep (&(rn->wq));
}
else
{
// this portion is called when the Qing flag has not been
set...normal scheduler
for (i = o; i < nr ; i++)
{
loop to issue make_requests just like in
ll_rw_block();
make_request(); /* not complete in this posting but
basically a copy from
ll_rw_block() of what
linux does under normal
scheduling
conditions...when not Qing */
}
exported_function1() /* to start the Qing */
{
// all declarations made
flag = 1;
tl.function = scheduleQ;
tl.expires = jiffies + 1;
tl. data = (unsigned long)&unused;
add_timer(&tl);
}
exported_function2() /* to stop Qing any more requests and return to
normal way of
processing */
{
flag = 0;
sleep_on(&till_all_requests_serviced);
}
void scheduleQ(unsigned long unused)
{
reqNode *rn = NULL;
if (1 == flag)
{
for (i = 0; i < #certain no. of requests in Q; i++)
{
dQ(&rn);
if (NULL == rn)
break;
for (j = 0; j < rn->nr; j++)
{
/* basically the loop for sending
make_request() exactly as in
ll_rw_block() */
}
wake_up(&(rn->wq)); /* wake up the process that
slept on this set of
requests */
/* does this
wake_up() call result in an attempt
to call
schedule() */
kfree(rn);
rn = NULL;
}
tl.function = scheduleQ;
tl.expires = jiffies + 1;
tl.data = (unsigned long)&unused;
add_timer(&tl); /* to call it again */
}
else
{
/* it means that the flag has been reset */
/* so dQ all the requests */
for (;;)
{
dQ(&rn);
if (NULL == rn)
{
wake_up(&till_all_requests_serviced); /*signal that
u are done */
return; /* no requests any more to service...and
future requests will not be queued since the flag has been set to 0 by
calling another exported function() in an LKM. */
}
}
for (i = 0; i < rn->nr; i++)
{
Issue make_request for each and every device. Same loop
as above for
issuing make_request();
}
}
}
------------------------------
From: "ckho" <[EMAIL PROTECTED]>
Subject: HELP : need info on how to connect a win98 box to a linux machine
Date: Wed, 12 Apr 2000 16:50:22 +0800
how do i make a client-sever connection frm win98(notebook) to linux(pc).
i have a nc, and a utp cat5 (cross cable) that's all.
The question here is do i really need a hub to do the job????
i think the cross cable should be fine.
and the next part is how do i configure linux to accept connection frm
win98
the thing i'm going to do here is, I want access apache web server
in my linux from the win box and also share files in between those 2 machine
any help would be great, thanks in advance
ckho
([EMAIL PROTECTED])
------------------------------
From: "ckho" <[EMAIL PROTECTED]>
Subject: HELP : need help on how to connect a win98 box to a linux machine
Date: Wed, 12 Apr 2000 16:51:44 +0800
how do i make a client-sever connection frm win98(notebook) to linux(pc).
i have a nc, and a utp cat5 (cross cable) that's all.
The question here is do i really need a hub to do the job????
i think the cross cable should be fine.
and the next part is how do i configure linux to accept connection frm
win98
the thing i'm going to do here is, I want access apache web server
in my linux from the win box and also share files in between those 2 machine
any help would be great, thanks in advance
ckho
([EMAIL PROTECTED])
------------------------------
From: [EMAIL PROTECTED] (Christopher Browne)
Crossposted-To: comp.os.linux.misc
Subject: Re: File Size Limitations
Reply-To: [EMAIL PROTECTED]
Date: Wed, 19 Apr 2000 02:07:33 GMT
Centuries ago, Nostradamus foresaw a time when Dances With Crows would say:
>On Tue, 18 Apr 2000 13:58:57 -0600, Larry Irons
><<[EMAIL PROTECTED]>> shouted forth into the ether:
>>Does Anyone know if there are any file size limitations in the 2.2.x
>>kernel? I am loading a variable block file from a scsi tape drive. It
>>loads approximately 2.0 GB and then stops but the file on the tape is
>
>On a 32-bit architecture, Linux presently has a file size limit of 2G.
>Alpha and Sparc-64 do not have this problem; when the successor to ext2
>comes out, 32-bit machines will not have this problem either.
False. ext2 is designed with a file size limit of 2TB. It enforces a
2GB limit on 32 bit platforms in that the APIs don't happily support
more than 2GB.
And VFS (I suspect Alexander Viro can speak to this more
authoritatively) has only been providing a 32 bit interface on IA-32.
_THAT_ is a vastly more critical limit.
Further, the API that GLIBC has been exporting to applications has a
file size limit of 2GB.
Thus, the [relatively minor] patch to ext2 that is needed to "fix" the
2GB problem does _nothing_ to help the average application.
Similarly, would-be successors, such as XFS or ReiserFS, do
_absolutely nothing_ to help support larger file sizes so long as
bottlenecks in the GLIBC and VFS layers remain.
A. Viro has been doing rather a lot of work on VFS; hopefully he can
say something more coherent about support for Large Files in VFS.
--
Why are cigarettes sold in gas stations when smoking is prohibited
there?
[EMAIL PROTECTED] <http://www.hex.net/~cbbrowne/linuxkernel.html>
------------------------------
Date: Tue, 18 Apr 2000 21:26:02 -0500
From: "Arthur H. Gold" <[EMAIL PROTECTED]>
Subject: Re: Where can I find syntax page for make utility for Linux
Long wrote:
>
> Thanks in advance.
>
> Long
Assuming everything's been installed correctly, `info make' will give
you the entire lowdown.
HTH,
--ag
--
Artie Gold, Austin, TX (finger the cs.utexas.edu account for more info)
mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
--
A: Look for a lawyer who speaks Aramaic...about trademark infringement.
------------------------------
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: Re: What's the difference between bzImage and zImage
Date: Tue, 18 Apr 2000 22:35:25 -0400
Reply-To: [EMAIL PROTECTED]
I got the soundcard to work. I had to turn the volume knob clockwise. Very technical
problem.
Thanks in advance for help no longer needed.
"[EMAIL PROTECTED]" wrote:
> Thanks! By the way, unlike bzImage, which I moved to my /boot directory as
> vmlinuz-2...., I don't have to move the modules around that are generated from 'make
> modules' and 'make modules_install', do I? I ask because I can't my Soundblaster
>Live
> sound card to work. Is there a way to find out which modules are loaded at a given
> time? (Sorry, I guess I asked two questions.)
>
> John Reiser wrote:
>
> > Only the zImage file itself (/usr/src/linux/arch/i386/boot/zImage) is "leftover
> > garbage", and should be removed. Everything else is needed for making bzImage.
------------------------------
From: Bob Cunius <[EMAIL PROTECTED]>
Subject: ppp modules
Date: Wed, 19 Apr 2000 02:34:45 GMT
Hi,
I recently updated my kernel from 2.2.13 to 2.3.99-pre3 and i
recompiled the modules for ppp support. And now when i try to connect
using pppd it told me it could not find ppp.o module. So i looked to
see what the difference between the modules for 2.3.99-pre3 and 2.2.13
was. I noticed that the name of the module changed from ppp.o to
ppp_generic.o. I figured i just had to create a hard link from ppp.o
to ppp_generic.o. But when i did that, there were unresolved
dependencies for ppp.o, even though there were no unresolved
dependencies in ppp_generic.o. I had even modified modules.dep so that
ppp.o reflected the same dependencies as ppp_generic. What do i have
to do to get pppd to load the ppp* module?
Thanks,
Bob Cunius
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Erik Max Francis <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.lang.c++,comp.unix.programmer
Subject: Re: To core or not to core - You tell me
Date: Tue, 18 Apr 2000 20:21:57 -0700
Mark McIntyre wrote:
> On Mon, 17 Apr 2000 14:32:52 -0700, Erik Max Francis <[EMAIL PROTECTED]>
> wrote:
>
> > Mark McIntyre wrote:
> >
> > You're the one who brought up the internals of processors and
> > registers,
> > which is irrelevant to what the C standard has to say about null
> > pointers.
>
> then we agree on something. Thats a start
Then I repeat the question: What did you bring it up for, if you knew
that it was irrelevant?
> Oh dear, a big backward step, and we were doing so well. I'm afraid
> I'm going to have to plonk you so that I can avoid being worked up by
> your gratuitous insults.
Please do, and while you're at it, you might as well killfile the others
in this thread you have pointed out that you are wrong. That way your
worldview will be secure.
--
Erik Max Francis | email [EMAIL PROTECTED] | icq 16063900
Alcyone Systems | web http://www.alcyone.com/max/ | q3a Product
San Jose, CA | languages en, eo | icbm 37 20 07 N 121 53 38 W
USA | 970.273 Ms p.L. | 257 days left | &tSftDotIotE
__
/ \ If love be good, from whence cometh my woe?
\__/ Chaucer
------------------------------
From: Erik Max Francis <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c,comp.unix.solaris,comp.lang.c++,comp.unix.programmer
Subject: Re: To core or not to core - You tell me
Date: Tue, 18 Apr 2000 20:24:21 -0700
Mark McIntyre wrote:
> On Mon, 17 Apr 2000 14:21:08 -0700, Erik Max Francis <[EMAIL PROTECTED]>
> wrote:
>
> > NULL (the macro) most certainly can
> > be defined as 0.
> >
> > #define NULL 0
> >
> > is a strictly-conforming definition of NULL.
>
> golly well stap me. If I didn't write that down about two hundred
> messages ago. Buf also
> #define NULL (void*)0
> is valid in C.
Yes. And that means that the definition of NULL _can_ be an integral
constant, making your comment about the "bit pattern of NULL" all the
more meaningless.
> If you'r in C++ land then begone foul fiend.
In C++, NULL must be defined as 0, not (void *) 0.
> ps I apologise for calling you a moron but really you do have to pay
> attention here!
You are the one who is being insufficiently precise. You even admitted
it yourself. In that case, it's not very advisable for you to suggest
that _others_ "pay attention," since as several people other than me
have also pointed out, you're the one making incorrect statements.
--
Erik Max Francis | email [EMAIL PROTECTED] | icq 16063900
Alcyone Systems | web http://www.alcyone.com/max/ | q3a Product
San Jose, CA | languages en, eo | icbm 37 20 07 N 121 53 38 W
USA | 970.274 Ms p.L. | 257 days left | &tSftDotIotE
__
/ \ The golden rule is that there are no golden rules.
\__/ George Bernard Shaw
------------------------------
From: W R Carr <[EMAIL PROTECTED]>
Subject: Re: Compiling glibc-2.1.3
Date: Tue, 18 Apr 2000 22:39:51 -0500
On Tue, 18 Apr 2000 20:06:49 GMT, [EMAIL PROTECTED]
(Juergen Heinzl) wrote:
>In article <[EMAIL PROTECTED]>, W R Carr wrote:
>>I've been trying for several months to compile glibc-2.1.3 optimized for
>>a K6-III. Although the "make" runs fine and throws no errors, the "make
>>check" halts in the ./math directory with an error from "test-float".
>>When I manually invoke "./test-float", I receive the following message:
>[...]
>
>glibc-2.1.3 has been released about 1 month ago ...
>>
The "release" version on the ftp.gnu.org server is dated 02/25/2000.
The "pre" version on the zeus.kernel.org server has been there since
the beginning of January, 2000. Thus, I have been trying to compile a
working glibc-2.1.3 "for several months".
You mentioned errors with the pgcc patch to gcc. Are you referring to
the newest patch that came out sometime last month, or the patch
that's been there since the end of last year?
------------------------------
Reply-To: "Mark Graybill" <[EMAIL PROTECTED]>
From: "Mark Graybill" <[EMAIL PROTECTED]>
Subject: Re: Select() in Linux 2.2.5 - threadsafe?
Date: Wed, 19 Apr 2000 05:06:59 GMT
Kaz Kylheku wrote in message ...
>
>The select function is a system call that can be used by multiple
processes,
>so it is safe. Linux threads are just processes that share certain
resources,
>like the address space, file descriptor table and signal handlers.
>
Interesting... Then the kernel isn't thread based like the mach kernel is?
If so, this is disappointing.
Best,
Mark
------------------------------
Reply-To: "Mark Graybill" <[EMAIL PROTECTED]>
From: "Mark Graybill" <[EMAIL PROTECTED]>
Subject: Re: Select() in Linux 2.2.5 - threadsafe?
Date: Wed, 19 Apr 2000 05:16:14 GMT
Mark Graybill wrote in message ...
>
>Kaz Kylheku wrote in message ...
>>
>>The select function is a system call that can be used by multiple
>processes,
>>so it is safe. Linux threads are just processes that share certain
>resources,
>>like the address space, file descriptor table and signal handlers.
>>
>
>
>Interesting... Then the kernel isn't thread based like the mach kernel is?
>If so, this is disappointing.
>
I sat here contemplating multithreading under mach, microkernel, OS/2, and
NT, and in actuality, the same mechanisms for scheduling are used for
threads that were used for process. The difference is the overhead of
resource allocation for a process happens only with the creation of the
first thread of that process, and not for additional threads (except there
are some idiot nuances with NT threads that don't fit this description.)
So in actuality, I guess Kaz's statement is logically correct (my thought
thread that was working on this was preempted until after I posted the last
message.) :)
-Mark
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Crossposted-To: comp.os.linux.misc
Subject: Re: File Size Limitations
Date: 19 Apr 2000 01:59:45 -0400
In article <Fx8L4.885$[EMAIL PROTECTED]>,
Christopher Browne <[EMAIL PROTECTED]> wrote:
>False. ext2 is designed with a file size limit of 2TB. It enforces a
>2GB limit on 32 bit platforms in that the APIs don't happily support
>more than 2GB.
>
>And VFS (I suspect Alexander Viro can speak to this more
>authoritatively) has only been providing a 32 bit interface on IA-32.
>_THAT_ is a vastly more critical limit.
Actually it's a question to Ingo and Matti - they've done the work on large
files. Anyway:
1) 2.2 is limited (in VFS) to MAXINT bytes per file. For ext2, reiserfs,
whatever. On 32bit architectures it's 2Gb, on 64bit for all practical
purposes it's infinity.
2) 2.3 is limited (in VFS) to MAXINT pages per file. On x86 it's
8Tb (2G pages, 4Kb each).
3) Ext2 layout also adds some limits. They depend on the block size.
With the 4Kb blocks the limit on file size is slightly above 4Tb (it's 4Tb +
4Gb + 4Mb + 12*4Kb).
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid. Get yourself a better computer" - Dilbert.
------------------------------
From: [EMAIL PROTECTED]
Subject: Problem with kernel module.../proc/<pid>
Date: Wed, 19 Apr 2000 06:04:40 GMT
Hi,
I am creating a kernel module that adds a file to the /proc/<pid>. Here
is my file declaration.
static struct proc_dir_entry proc_pid_ckpt =
{ 0, 9, "ckpt_info", S_IFREG | S_IRUGO, 1, 0, 0, 0,
&Inode_Ops_4_Our_Proc_File, NULL, &our_pid_fill_inode, };
This is what I believe I need to create a file called ckpt_info under
the pid directory for every pid. The function our_pid_fill_inode I took
straight from the kernel source. This is given as below.
This compiles just fine. But when I do the insmod, I get the following
error:
./cmodule.o: unresolved symbol pidhash
I tracked the pidhash to being defined in <linux/sched.h>, which is
included.
Please help. Thanks.
Usman
/*
* The fill argument is non-zero when the inode is being filled ...
* we don't need to do anything when it's being deleted.
*/
static void our_pid_fill_inode(struct inode * inode, int fill)
{
struct task_struct *p;
int pid = inode->i_ino >> 16;
int ino = inode->i_ino & 0xffff;
read_lock(&tasklist_lock);
if (fill && (p = find_task_by_pid(pid)) != NULL) {
uid_t uid = 0;
gid_t gid = 0;
if (p->dumpable || ino == PROC_PID_INO) {
uid = p->euid;
gid = p->egid;
}
inode->i_uid = uid;
inode->i_gid = gid;
}
read_unlock(&tasklist_lock);
}
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Select() in Linux 2.2.5 - threadsafe?
Reply-To: [EMAIL PROTECTED]
Date: Wed, 19 Apr 2000 06:53:29 GMT
On Wed, 19 Apr 2000 05:16:14 GMT, Mark Graybill <[EMAIL PROTECTED]> wrote:
>
>Mark Graybill wrote in message ...
>>
>>Kaz Kylheku wrote in message ...
>>>
>>>The select function is a system call that can be used by multiple
>>processes,
>>>so it is safe. Linux threads are just processes that share certain
>>resources,
>>>like the address space, file descriptor table and signal handlers.
>>>
>>
>>
>>Interesting... Then the kernel isn't thread based like the mach kernel is?
>>If so, this is disappointing.
>>
>
>
>I sat here contemplating multithreading under mach, microkernel, OS/2, and
>NT, and in actuality, the same mechanisms for scheduling are used for
>threads that were used for process. The difference is the overhead of
>resource allocation for a process happens only with the creation of the
>first thread of that process, and not for additional threads (except there
>are some idiot nuances with NT threads that don't fit this description.)
When clone() is used to create a thread, that thread shares most resources with
the parent. No resource allocation is done beyond the allocation of the thread
task itself. Merely, the new thread has to be given references to the
individual shared resources---as opposed to being given a reference to a
common ``bag'' of resources that is known as a process in other operating
systems.
>So in actuality, I guess Kaz's statement is logically correct (my thought
>thread that was working on this was preempted until after I posted the last
>message.) :)
I don't know about logically; it's just a statement of fact. This is how
it works.
--
#exclude <windows.h>
------------------------------
From: Anand Krishnamoorthy <[EMAIL PROTECTED]>
Subject: Re: Obtaining Program Counter
Date: Wed, 19 Apr 2000 12:34:21 -0400
==============371E468B18E8D84DA5BE0EE5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Thomas van Gulick wrote:
> Is it possible to get the value of the PC for a certain task? I'd like to be
> able to get the PC or IC from a task that has stalled.
The task structure of any task contains the register set for that task, stored
in a structure called the "thread struct". That should contain the EIP which is
the PC you are referrning to.
Anand
==============371E468B18E8D84DA5BE0EE5
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
<I>Thomas van Gulick wrote:</I>
<BLOCKQUOTE TYPE=CITE><I>Is it possible to get the value of the PC for
a certain task? I'd like to be</I>
<BR><I>able to get the PC or IC from a task that has stalled.</I></BLOCKQUOTE>
The task structure of any task contains the register set for that task,
stored in a structure called the "thread struct". That should contain the
EIP which is the PC you are referrning to.
<P>Anand</HTML>
==============371E468B18E8D84DA5BE0EE5==
------------------------------
** 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
******************************