sharing data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can anyone tell me whether the following assumptions are correct or not.

 

1. I share a data between a kernel thread and an ISR. ( this is a uniprocessor system). In kernel thread I do spin_lock_irqsave

 and then unlocking. Where as accessing the data from the ISR I do not use any spin lock coz I know when the ISR is running the kernel thread does not get a chance to run. Am I right ???

 

2. I want to implement a message quque send and recv routine between two kernel threads. ( here I can not use the standard message quques)

What I do is in recv call I check if there is any message in the queue. If no then I sleep on a wait queue.

While sending a message I always add the message to the queue and and use wake up call on wait queue.

Is my implementation leak proff…..or there are some flaws???

 


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux