I'm writing a xenomai applications which spawns a few threads:
rt_task_spawn(&fcThread, "fcThread", FC_THREAD_STACK, FC_THREAD_PRIO, 0, &run, (void*)(this))
Each thread is very simple and looks like this:
while (true)
{
rt_queue_read(pThis->pMsgQueue, (void*)(&msg), sizeof(mystruct), TM_INFINITE)
…
}
They are simple threads but...
Hi,
I am new to android kernel and Mobile Operating Systems and I have a few questions regarding android kernel.
1) Does Android OS has Kernel Mode and a User mode like Normal desktop OSs ? Also does it support things like Virtual Memory ? Also I heard about Dalvik VMM. Is a copy of dalvik VMM created for each and every process ?
2) A...
Hello!
I've recently read section 5.5.2 (Spinlocks and Atomic Context) of LDDv3 book:
Avoiding sleep while holding a lock can be more difficult; many kernel functions can sleep, and this behavior is not always well documented. Copying data to or from user space is an obvious example: the required user-space page may need to be swapp...
Can I do floating point operations in interrupt handler ? (x86 or 64) Also I would like know can I use print function inside the interrupt handler ?
...
I wanna port Linux kernel 2.6.x to new MIPS board. Unfortunatelly, I can't find good actual documentation with step by step explaination. Hope, you'll help me. Paper books are OK too.
Thank you in advance!
...
For the purpose of security-oriented source code review, I'm interested in finding (comprehensively) all ioctl commands that are registered in the Linux kernel. Also, I'd like to classify them as either accessible by administrators (e.g root), and which ones are accessible by unprivileged users.
I'm not sure if it would be easier to rea...
There are some books about Linux developing, internals, managers and so on. but I'm thinking about a documentation that Linux developers write when the commit a patch on the kernel. Does something like that exist? I know there is a mailing list for kernel newbies and some stuff like this but I'm not a newbie and I don't want to be kernel...
ok I'm trying to compile a simple kernel module, when I point to any of the below that contain includes, it complains about all kinds of stuff.
linux-headers-2.6.31-21 linux-headers-2.6.31-22
linux-headers-2.6.31-21-generic linux-headers-2.6.31-22-generic
linux-headers-2.6.31-21-generic-pae linux-h...
Hi,
This is regarding the void spin_lock_irqsave(spinlock_t *lock, unsigned long flags); function call. It is mentioned that previous interrupt state is stored in flags and we can restore them by passing this to spin_unlock_irqrestore function.
But I did not get how flags which is passed by values captures the previous interrupt state...
Yes, as the title, I don't know how to program and compile "Hello World" code in kernel mode of linux , please help me in the shortest and easy to understand way. Thank you !
(Any related document is welcomed too, I'm just new to this)
...
I have a Fibre Optic link, with a proprietary Device Driver and message format.
The link goes into a PCIe card. Running on a RHEL 5.2 (2.6.18-128~)
I have mmap'ed the interface on the card for setup and FIFO access etc, but cannot use this for interrupts as this should be done via the kernel-space interrupt routine (correct me if require...
Hi,
I have a program running two threads - they communicate using message queues.
In one thread, I call ioctl() to access the hardware decryptor. The code goes like:
void Decrypt
{
...
..
...
if(<condition 1>)
{.
...
...
retVal = ioctl(...);
comesInHere1++;
}
if(<condition 2>)
{
...
...
retVal = ioctl(...);
comesInHere2++;
}
come...
Hi,
I have couple of questions on threads. Could you please clarify.
Suppose process with one or multiple threads. If the process is prempted/suspended, does the threads also get preempted or does the threads continue to run?
When the suspended process rescheduled, does the process threads also gets scheduled? If the process has proc...
am trying to move data from a buffer in kernel space into the hard
disk without having to incur any additional copies from kernel buffer to
user buffers or any other kernel buffers. Any ideas/suggestions would be
most helpful.
The use case is basically a demux driver which collects data into a
demux buffer in kernel space and this buffe...
xpost from linuxquestions.org, sorry...
I wrote a small test program to see if a simple proxy would benefit from using splice() but it always takes 200ms for the data that I spliced from a pipe to a TCP socket to be read from the other end of the socket.
Here is the Perl program to test it:
package test_pipes_2;
use strict;
use warnin...
Hi,
I'm looking for a good book on the linux kernel.
I've found this one http://www.kroah.com/lkn/ which is free.
I'd like something I can read when away from my computer though and so want to buy a good book.
I was thinking about getting this hxxp://oreilly.com/catalog/9780596000028 (cannot submit more than one link). Has anyone any...
As those familiar with network device drivers are aware, the interface between the kernel and driver has been changed to use NAPI (New API). In this paradigm, a polling function is associated with a napi_struct, which is a new structure that must be allocated by the device driver. At any rate, I have an old driver and don't have the ti...
How many bytes does memory arbiter protect?
While reading "Understanding the linux kernel, 3rd edition" chapter 2, section2.1, I encounter the following statement:
In multiprocessor systems, all CPUs usually share the same memory; this means that RAM chips may be accessed concurrently by independent CPUs. Because read or write operation...
Hi aLL,
I am a linux device driver programmer.
Recentely i write driver for sniffer hardware.
This sniffer hardware will continously read data from the bus line.
I have an interrupt handler in my driver to notify the received data.
I am used dma address mapping for store the data.
h/w use pyhsical address, driver use vitual address...
I was stracing some of the common commands in the linux kernel, and saw mprotect() was used a lot many times. I'm just wondering, what is the deciding factor that mprotect() uses to find out that the memory address it is setting a protection value for, is in its own address space?
...