Re: Broadcasting to terminals from kernelspace?

2010-08-27 Thread Scream
No, I don't want a printk() call, I want to broadcast to all open terminals, much like the 'wall' command does. Cheers, Stephen On 08/27/2010 04:14 PM, Martin wrote: this is probably the most basic thing to learn when getting into kernel development... have a look at this for example...

Re: spin_lock spin_trylock race

2010-08-27 Thread Peter Teoh
Someone can clarify my understanding? On Fri, Aug 27, 2010 at 5:03 AM, vinit dhatrak vinit.dhat...@gmail.comwrote: On Wed, Aug 25, 2010 at 1:18 AM, Lal learner.ker...@gmail.com wrote: Is below code race free? void process_context_function(void) { /* interrupts enabled here */

Re: spin_lock spin_trylock race

2010-08-27 Thread Peter Teoh
Let me be the first one to comment on myself: On Fri, Aug 27, 2010 at 11:59 AM, Peter Teoh htmldevelo...@gmail.comwrote: On Wed, Aug 25, 2010 at 1:18 PM, Lal learner.ker...@gmail.com wrote: Is below code race free? the answer (I suspect) is - yesboth SMP and UP. Conventional wisedom

Re: Broadcasting to terminals from kernelspace?

2010-08-27 Thread Scream
Cool, that's what I was looking for, thanks :) On 08/27/2010 05:57 PM, javad karabi wrote: why dont you just exec wall? also, echo hello from module /dev/pts0 will do something similar. writes to a terminal. therefore, maybe you can just write data into that device... -- To unsubscribe

Re: CPUID and leaf.

2010-08-27 Thread Peter Teoh
According to: http://software.intel.com/en-us/articles/multi-core-detect/ http://software.intel.com/en-us/articles/multi-core-detect/leaf means the core inside the packageie, CPU cores are organized in a certain hierarchyand multiple packages may exists...each package may have multiple

Re: source level debugging of DLKM

2010-08-27 Thread Peter Teoh
kgdb? u either need two hardware connected via serial portor poor people like me used VirtualBox. but the truth is.the kernel has got so much of codes to executes...that i only managed to steps through line by line (that is you wanted right?) only a few functions initiallyand

Re: Broadcasting to terminals from kernelspace?

2010-08-27 Thread Mulyadi Santosa
On Fri, Aug 27, 2010 at 13:20, Scream poisonthe...@gmail.com wrote: No, I don't want a printk() call, I want to broadcast to all open terminals, much like the 'wall' command does. Please don't top post :) Yes,it is printk() you needuse highest priority level...most likely the message will

git related: how to sync different k.o repos

2010-08-27 Thread Anuz Pratap Singh Tomar
Hi all, I generally clone linus tree, which as I understand is the mainline dev tree. but most people use kernel which is in stable branch(i think maintained by Greg) for some non dev work. So suppose I want to get stable branch as well, do I need to clone the stable repo or can I fetch the stable

Re: source level debugging of DLKM

2010-08-27 Thread Mulyadi Santosa
On Fri, Aug 27, 2010 at 12:41, san deep sandeep.al...@gmail.com wrote: Hi  Team, I request you to provide steps to do a source level debugging  of DLKM driver which is  up and running  on my development m/c. I tried searching related documents looks like need to have 2 systems and not sure

what is static inline void tvec_base

2010-08-27 Thread James Bond
Hi, I am new to kernel development. So after being able to have some basic understand of some things I just went through source code. I was going through a file known as linux-2.6.34/kernel/timer.c and found following code. I want to understand what is it doing. What should I be reading to be able

Re: what is static inline void tvec_base

2010-08-27 Thread Greg Freemyer
On Fri, Aug 27, 2010 at 1:23 PM, James Bond jamesbond.2...@gmail.com wrote: Hi, I am new to kernel development. So after being able to have some basic understand of some things I just went through source code. I was going through a file known as linux-2.6.34/kernel/timer.c and found

Re: implementing new device drivers

2010-08-27 Thread Lutz
Thanks for input. It seems that chip i actually programmed wasn't tested with the driver provided by the kernel-rc. There might be room for improvement. I'm on it. Cheers Lutz -- Go vegan! -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to

Re: what is static inline void tvec_base

2010-08-27 Thread James Bond
On Sat, Aug 28, 2010 at 1:51 AM, Greg Freemyer greg.freem...@gmail.comwrote: in the kernel use advance C constructs which even advanced user space C programmers find hard to grasp. Questions about those types of usage are very appropriate for this list and will often be better addressed in

Re: what is static inline void tvec_base

2010-08-27 Thread StephanT
Please give some online link to what you said I will go through it. http://www.google.com/search?hl=enclient=firefox-ahs=yTXrls=org.mozilla%3Aen-US%3Aofficialchannel=sq=dennis+ritchie+c+pdfcts=1282966271211aq=2sxaqi=g-s1g-sx9aql=oq=denis+ritcgs_rfai= Say a short prayer every time you open

Re: what is static inline void tvec_base

2010-08-27 Thread James Bond
On Sat, Aug 28, 2010 at 9:44 AM, zeal zealc...@gmail.com wrote: On Sat, Aug 28, 2010 at 11:41 AM, James Bond jamesbond.2...@gmail.com wrote: Hi, Stephan thanks a lot for the link. I also have a small doubt.Please see if you can resolve As per my understanding 1) Defining any

Re: what is static inline void tvec_base

2010-08-27 Thread Mulyadi Santosa
Hi.. Sorry for crossing ,... On Sat, Aug 28, 2010 at 11:23, James Bond jamesbond.2...@gmail.com wrote: 1) Defining any function as static tells the compiler that the function can only be used in the file the function was defined in Yes. So why is that used in the code timer.c?

Re: what is static inline void tvec_base

2010-08-27 Thread Tapas Mishra
What I understand with respect to static and inline functions is To make a function call CPU has to save registers and pass on ret instructions when ever the function call ends if we have a small fucntion which is used in a file and a function call via CPU then over head of saving flag registers

Re: what is static inline void tvec_base

2010-08-27 Thread Tapas Mishra
Sorry in previous post I did not made clear actually what I wanted to say is if you have a function is used at 10 places and you declare it inline 10 times then there would be cache miss more and then it will have disadvantage. On Sat, Aug 28, 2010 at 10:37 AM, Tapas Mishra mightydre...@gmail.com

Re: what is static inline void tvec_base

2010-08-27 Thread Mulyadi Santosa
On Sat, Aug 28, 2010 at 12:09, Tapas Mishra mightydre...@gmail.com wrote: Sorry in previous post I did not made clear actually what I wanted to say is if you have a function is used at 10 places and you declare it inline 10 times then there would be cache miss more and then it will have

Re: what is static inline void tvec_base

2010-08-27 Thread Mulyadi Santosa
On Sat, Aug 28, 2010 at 12:19, James Bond jamesbond.2...@gmail.com wrote: Please don't top post :) What is that top post I never came across such a thing in timer code? top post is a way to put your reply on top of the quoted previous message...while what we do in kernelnewbies is the other

Making a SCHED_FIFO process monopolize the processor

2010-08-27 Thread Pablo Antonio
Hello, I know this is in the border line with off-topic, since my question is not exactly about how to develop for the kernel but about how the kernel works. Please forgive me if my question is not appropriate. I want to know if it's possible to create a real-time process with SCHED_FIFO

Re: what is static inline void tvec_base

2010-08-27 Thread James Bond
On Sat, Aug 28, 2010 at 10:41 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: On Sat, Aug 28, 2010 at 12:09, Tapas Mishra mightydre...@gmail.com wrote: Sorry in previous post I did not made clear actually what I wanted to say is if you have a function is used at 10 places and you