Re: How do _you_ read the linux source?

2015-04-20 Thread Milton Krutt
> On Sun, Apr 19, 2015 at 06:57:49PM -0700, r0...@simplecpu.com wrote: > > The problem a lot of newbies are having is in 'separating the trunk > > from the leaves.' So my question is this: Experienced kernel developers, how > > do _you_ read source code? How do you separate the trunk from the l

Re: percolating ERESTARTSYS beyond PCI subsystem

2015-04-19 Thread Milton Krutt
> On Sat, Apr 18, 2015 at 01:40:57PM +0200, Milton Krutt wrote: > > Hi. The scenario is a PCI driver on a kernel 3.19.2: > > > > is it possible, in case pending_signal(current) is true, to return > > -ERESTARTSYS > > to insmod process, in order to get it restar

percolating ERESTARTSYS beyond PCI subsystem

2015-04-18 Thread Milton Krutt
Hi. The scenario is a PCI driver on a kernel 3.19.2: is it possible, in case pending_signal(current) is true, to return -ERESTARTSYS to insmod process, in order to get it restart (as expectable)? After some attempts (with pending_signal(current) being true), it seems that -ERESTARTSYS is caught

[mil...@krutt.org: Re: Delaying an interrupt handler]

2015-04-08 Thread Milton Krutt
- Forwarded message from Milton Krutt - Date: Tue, 7 Apr 2015 18:46:46 +0200 From: Milton Krutt To: Malte Vesper Subject: Re: Delaying an interrupt handler Not that late! I take your advice, and I inform all the folks who suggested me to jump on a new kernel that now I am on a 3.19

Re: Delaying an interrupt handler

2015-03-23 Thread Milton Krutt
> On Mon, Mar 23, 2015 at 2:18 PM, Milton Krutt wrote: > > Hi. > > It is known that no semaphore synchronization should be > > used inside an interrupt handler. > > > > Anyway, I am looking at a freeBSD device driver (written by > > a profesionist) and t

Delaying an interrupt handler

2015-03-23 Thread Milton Krutt
Hi. It is known that no semaphore synchronization should be used inside an interrupt handler. Anyway, I am looking at a freeBSD device driver (written by a profesionist) and there are semaphores inside an interrupt handler's subroutine. Since I should port to linux that driver, I ask you how can

apparent sleep

2015-03-23 Thread Milton Krutt
Hi. Following LDD3, I am dealing with wait queues, on a 2.6.10. My loop is like: while(enough()){ prepare_to_wait(&queue_head, &queue_entry, TASK_INTERRUPTIBLE); atomic_set(&flag, 0); if (!atomic_read(&flag, 0)) schedule(); finish_wait(&queue_head, &queue_entry); }