linux-kernel

Is there any way of an app in Linux have access to 2 network cards?

My app needs to access two network cards. One to receive data (eth0) and another to send data (3G modem). Normally, the kernel force the app to work with only one card at a time. Is there any thing that I can do to make it run? Thank you. ...

Kernel.Select from ruby causing Thread(0x7f1a159abd58): deadlock (fatal)

I don't have multiple threads or anything like that, and I thought select() was non-blocking, however, as I add more items to an array used as the IO object, and using select(), after about 1000~ items in the array (with some interaction on them).. the whole script exits with a deadlock / fatal error... Hope any1 could help Thank you so...

User to kernel mode big picture?

I've to implement a char device, a LKM. I know some basics about OS, but I feel I don't have the big picture. In a C programm, when I call a syscall what I think it happens is that the CPU is changed to ring0, then goes to the syscall vector and jumps to a kernel memmory space function that handle it. (I think that it does int 0x80 and...

Android V4L or V4L2

Does Android Linux Kernel support V4L or V4L2 (Video for Linux). If not, it'is possible to add it ...

What is the sequence followed by the Linux kernel to configure a device?

As I understood after reading the chapter related to The Linux Device Model in the Linux Device Drivers 3rd Edition, when a new device is configured, the kernel (2.6) follows more or less this sequence: The Device is registered in the driver core (device_register(), what includes device initialization) A kobject is registered in the de...

Problem calling linux C code from FIQ handler

I'm working on an armv6 core and have an FIQ hander that works great when I do all of my work in it. However I need to branch to some additional code that's too large for the FIQ memory area. The FIQ handler gets copied from fiq_start to fiq_end to 0xFFFF001C when registered static void test_fiq_handler(void) { asm volatile("\ ...

where to start linux kernel programming?

I have been programming in C for a couple of years in Linux. Now I want to work on linux kernel and contribute to kernel, if possible. I have been looking on the internet for the information about a starting point but I couldn't find one. So can any one please tell me where to begin? ...

What does a linux device need to be seen by Hal?

I'm trying to learn about device drivers on Linux Kernel, for that I've created three modules with: A bus type A device driver A fake device that does nothing now, only is registered Everything works fine, I can load the bus, the driver and the module that creates the device. Everything appears on sysfs, including the link between th...

Is transmitted bytes event exist in Linux kernel?

I need to write a rate limiter, that will perform some stuff each time X bytes were transmitted. The straightforward is to check the length of each transmitted packet, but I think it will be to slow for me. Is there a way to use some kind of network event, that will be triggered by transmitted packets/bytes? ...

Read linux kernel version using C?

Hi, I am using Ubuntu and I want to read the version of its kernel. I found a file named version in /proc/ that records the version of the current kernel. If I dont want to read file, is there any other way, like built-in function in C, that I can read the version in C? Thanks ...

Process identifier in the kernel which is portable between linux like versiones

When I use current->pid on ancicent platforms they doesn't support current->pid does *FILE has something equal to pid that ican use ? some we can call it process "key" ? ...

how to identify process in kernel read func without using current->pid

my lecture wants us to build module where we need to identify each read process and where the same read process called twice on the same writer massage we should insert him to an queue who's we wake up when all readers have read I achieved this goal by by using list of pid's and boolean read/not_read inside each node but he decided to ...

Need complete picture of virtual adress space

Hello, This image gives a good picture about Virtual Adress space. But it only says half of the story. It only gives complete picture of User Adress space ie.. lower 50% (or 75% in some cases). What about the rest 50% (or 25%) which is occupied by the kernel. I know kernel also has so many different things like kernel modules , devic...

Contributing to a Linux distribution

I'm interested in contributing to a Linux distro, but regarding the various distro's developer communities, I'm having a bit of trouble figuring out which one I'd most like to join. What languages I know: C, C++, Lua, Python, and fairly familiar with Perl (though I wouldn't say I "know" it). In particular, I have very little experience ...

How to find the Instantaneous size of the transmission buffer in Linux kernel?

I want to measure the instantaneous size of the transmission buffer or the number of packets waiting to be sent on an Ethernet interface. The problem is that the kernel takes the packet from the transmission queue and puts it in a Transmission Ring Buffer (Tx-Ring) before sending it out on the wire. Therefore: Total instantaneous size...

How to detect interrupt handle routine of a device driver?

Hi, I'm using Linux platform to program in embedded device. Is there any way that a kernel module can detect the interrupt handler routine of an another device driver module? Like for example, I have a kernel module(.ko), then I want this kernel module detect if a particular device driver execute its interrupt handle routine? Is this...

kernel get stack when signalled

hi there i write readers and writers where the kernel have to syncronize between them and block writer who already read a massage when i am in the queue waiting I get signal so I do the fallowing while (i_Allready_Read(myf) == ALLREADY_READ || isExistWriter == false ) //while (!(i_Allready_Read(aliveProc,current->pid))) { int i,...

Timing the Linux Kernel boot-time optimisation

I am trying to optimise the boot-up time of linux on an embedded device (not PC) Currently to profile the boot-up sequence, I have enabled the timing info on printk logs. Is this the most optimum way? If not, how do i profile the boot-up sequence (with timing) with minimum overhead? PS: I have a terminal (of the device) over a serial-...

What is tagged structure initialization syntax?

struct file_operations scull_fops = { .owner = THIS_MODULE, .llseek = scull_llseek, .read = scull_read, .write = scull_write, .ioctl = scull_ioctl, .open = scull_open, .release = scull_release, }; This declaration uses the standard C tagged structure initialization syntax. Can someone elaborate? ...

Books for transport layer protocol implementation in Computer Networks

Hello. I am trying to implement a transport layer protocol for my project. I am going to use Linux as my operating system. Could you please suggest me some books or links that explain the implementation of transport layer (like TCP)? Thank you.. Thanks, Bala ...