Re: ___spin_lock
Re: ___spin_lock
- Subject: Re: ___spin_lock
- From: alex <email@hidden>
- Date: Wed, 13 Dec 2006 10:36:59 -0800
Title: Re: ___spin_lock
To answer your question: __spin_lock is usually called
internally when you attempt to take a lock. If you look at the
source code for the pthreads implementation you will see that the code
first tries to spin on the lock before blocking the thread to wait for
it.
If the offset from __spin_lock + xxxx is huge than you can assume
the stack is not accurate.
Also, if it makes you feel any better I too get the error about
not being able to locate cpu_capabilities.h and I also tend to crash
gdb about 5 times a day doing simple work. There is nothing
worse than not being able to trust your debugger but this is something
you will get used to on the Mac. There has never been a good Mac
debugger (other than Macsbug, IMHO).
alex
At 9:14 AM +0100 12/13/06, Perry Winkel wrote:
the space where for other threads i see
the stack, is empty
except for the phrase
'___spin_lock'
i think you mean that xcode is not
displaying all the info
available. will look into this 'sample'
stuff. looks very interesting
thank you
still a bit puzzled though about this
"spin lock" what is it?
On Dec 13, 2006, at 1:36 AM, Shawn
Erickson wrote:
On 12/12/06, Perry Winkel <email@hidden> wrote:
hi,
i have a multi threaded application
(posix)
and if a pause it because it doesn't seem
'to move on'
although i see cpu activity, one of the
threads only shows the info
___spin_lock
at the bottom of my debug window i see a
message saying something
about a gdb error: xcode could not locate
source file cpu_capabilities.h
(line 216)
i would like to know what my thread is
doing, it obviously is hanging but
why
and what does this spin lock
mean
can anyone please help?
Do you have a more complete thread
backstrace? If not get a debug
build of your application into that state
and use something like sampe
(man sample) to understand the call stack
for the thread that is using
the spin lock.
-Shawn
--
met vriendelijke groeten
perry winkel
www.perry7.nl
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
>
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden