Are thread holding spinlocks deletion safe?
I mean if say a thread t1 is holding a spinlock, then can an another thread t2 wanting the spinlock delete the thread t1 if t1 is not releasing the spinlock?
on 07/02/2012 – Made popular on 07/02/2012
I want to modify spin_lock & spin_unlock API in spinlock.h of 220.127.116.11. I want to add a counter for each core so that every time a lock is taken on a core, its counter in incremented and decremented when spin_lock is called. At any point of time I can get lock_depth of each core.
I am modifying the lock & unlock API of 2.6.36 linux.
I want to add a per cpu counter, such that every time some thread does a spin_lock I increment this counter and decrement on spin_unlock.
I tried adding DEFINE_PER_CPU(int, counter) in /usr/src/linux-2.6**/include/linux/spinlock.h but I get errors since the percpu.h #includes spinlock.h.
I also tried creating a static array and use get_cpu(
I have a core of an multi-threaded application. when i check all the threads it shows me that many threads are blocked for taking a mutex lock. In GDB how I can identify that thread which is holding the mutex lock.
In dbx I can do that using thread -blockedby but in GDB i am not getting how I can do that.
I am trying to assign a routine to the posix thread. When it is completing the routine, the calling thread is not exiting. Every time i am creating a new thread and assigning a same routine to the new thread in while loop. New thread is created only for 379 times, after that thread creation is failed with status 11 means PTHREAD_MAX_LIMIT has been reached.
Please assist me in closing a thread in the forum Linux networking. I have posted in that thread saying that the thread w'd be closed but I find no link for the same.
The heading of the thread is: how to connect internet in linux
brian_panneton wrote:I keep getting a kernel dump ( generally when using flash or downloading a file ). It may have something to do with conky since I'm pretty sure it shouldn't be able to schedule while atomic. If I could get hints on whats happening that would be great.No, this has nothing to do with conky. Conky is a userspace process which is supposed to never crash the system.