Skip to content

Tag: linux-kernel

Add syscalls to linux kernel

I’m new in working with kernel. I want to add a linked list to my kernel, and I try to fix it like this link : Linux Kernel Programming–Linked List here is code’s that I added to sys.c : syscall defenition: and my struct for linked list: and when I compile the kernel, I saw this error: thanks for …

How to estimate the time for spinlock holing/waiting time?

I’m doing a research on spinlock in Linux kernel. And I need to estimate the time for lock holding and lock waiting. To do that, I first tried to modify the spinlock function (arch_spin_lock()) but I could not modify that function because I could not build the kernel. This function was originally an inl…

(deleted) file creating issue on Linux

My process reads a files and deletes it. This activity happens more than 2000 times. When I check the file in /proc/PID/fd, I see the file there and I see at the end of each line as (deleted). But I see 1024 records, with 1020 being the (deleted) entries. Later the new file operation from this PID fails. To o…

V4L2: What happens when the queue is full

In video capture mode, what happens when the queue is full and a new frame comes in? Does the kernel drop frames? If so, does the newest frame (just arrived) get dropped or the oldest one in the queue gets dropped? Answer Yes if the queue becomes full kernel drops the buffer newest frame which just arrived, i…